Skip to content

Commit cf8a594

Browse files
committed
release: v4.0.0-beta.4
1 parent c20ef0d commit cf8a594

26 files changed

+5822
-5317
lines changed

dist/components/Types.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ export declare type Placements = 'auto' | 'auto-start' | 'auto-end' | 'top-end'
66
export declare const placementPropType: PropTypes.Requireable<Placements>;
77
export declare type Shapes = 'rounded' | 'rounded-top' | 'rounded-end' | 'rounded-bottom' | 'rounded-start' | 'rounded-circle' | 'rounded-pill' | 'rounded-0' | 'rounded-1' | 'rounded-2' | 'rounded-3' | string;
88
export declare const shapePropType: PropTypes.Requireable<string>;
9+
export declare type TextColors = Colors | 'white' | 'muted' | string;
10+
export declare const textColorsPropType: PropTypes.Requireable<string>;
911
export declare type Triggers = 'hover' | 'focus' | 'click';
1012
export declare const triggerPropType: PropTypes.Requireable<Triggers>;

dist/components/avatar/CAvatar.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { HTMLAttributes } from 'react';
2-
import { Colors, Shapes } from '../Types';
2+
import { Colors, Shapes, TextColors } from '../Types';
33
export interface CAvatarProps extends HTMLAttributes<HTMLDivElement> {
44
/**
55
* A string of all className you want applied to the component. [docs]
@@ -33,7 +33,9 @@ export interface CAvatarProps extends HTMLAttributes<HTMLDivElement> {
3333
status?: Colors;
3434
/**
3535
* Sets the text color of the component to one of CoreUI’s themed colors. [docs]
36+
*
37+
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted' | string
3638
*/
37-
textColor?: string;
39+
textColor?: TextColors;
3840
}
3941
export declare const CAvatar: React.ForwardRefExoticComponent<CAvatarProps & React.RefAttributes<HTMLDivElement>>;

dist/components/badge/CBadge.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ElementType, HTMLAttributes } from 'react';
2-
import { Colors, Shapes } from '../Types';
2+
import { Colors, Shapes, TextColors } from '../Types';
33
export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
44
/**
55
* A string of all className you want applied to the component. [docs]
@@ -31,7 +31,9 @@ export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanEle
3131
size?: 'sm';
3232
/**
3333
* Sets the text color of the component to one of CoreUI’s themed colors. [docs]
34+
*
35+
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted' | string
3436
*/
35-
textColor?: string;
37+
textColor?: TextColors;
3638
}
3739
export declare const CBadge: React.ForwardRefExoticComponent<CBadgeProps & React.RefAttributes<HTMLDivElement | HTMLSpanElement>>;

dist/components/dropdown/CDropdown.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
5353
popper?: boolean;
5454
/**
5555
* Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. [docs]
56+
*
57+
* @default 'btn-group'
5658
*/
5759
variant?: 'btn-group' | 'dropdown' | 'input-group' | 'nav-item';
5860
/**

dist/components/form/CFormCheck.d.ts

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
import React, { HTMLAttributes, ReactNode } from 'react';
22
import { Colors, Shapes } from '../Types';
3-
export interface CFormCheckProps extends HTMLAttributes<HTMLInputElement> {
4-
button?: boolean;
3+
export declare type ButtonObject = {
54
/**
65
* Sets the color context of the component to one of CoreUI’s themed colors. [docs]
76
*
87
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
98
*/
10-
buttonColor?: Colors;
9+
color?: Colors;
1110
/**
1211
* Select the shape of the component. [docs]
1312
*
1413
* @type 'rounded' | 'rounded-top' | 'rounded-end' | 'rounded-bottom' | 'rounded-start' | 'rounded-circle' | 'rounded-pill' | 'rounded-0' | 'rounded-1' | 'rounded-2' | 'rounded-3' | string
1514
*/
16-
buttonShape?: Shapes;
15+
shape?: Shapes;
1716
/**
1817
* Size the component small or large. [docs]
1918
*
2019
* @type 'sm' | 'lg'
2120
*/
22-
buttonSize?: 'sm' | 'lg';
21+
size?: 'sm' | 'lg';
2322
/**
2423
* Set the button variant to an outlined button or a ghost button. [docs]
2524
*/
26-
buttonVariant?: 'outline' | 'ghost';
25+
variant?: 'outline' | 'ghost';
26+
};
27+
export interface CFormCheckProps extends HTMLAttributes<HTMLInputElement> {
28+
/**
29+
* Create button-like checkboxes and radio buttons. [docs]
30+
*/
31+
button?: ButtonObject;
2732
/**
2833
* A string of all className you want applied to the component. [docs]
2934
*/
@@ -44,16 +49,6 @@ export interface CFormCheckProps extends HTMLAttributes<HTMLInputElement> {
4449
* The element represents a caption for a component. [docs]
4550
*/
4651
label?: string | ReactNode;
47-
/**
48-
* Size the component large or extra large. Works only with `switch` [docs]
49-
*
50-
* @type 'lg' | 'xl'
51-
*/
52-
size?: 'lg' | 'xl';
53-
/**
54-
* Render component as a toggle switch. [docs]
55-
*/
56-
switch?: boolean;
5752
/**
5853
* Specifies the type of component. [docs]
5954
*

dist/components/form/CFormInput.d.ts

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React, { ChangeEventHandler, HTMLAttributes } from 'react';
2+
export interface CFormInputProps extends HTMLAttributes<HTMLInputElement> {
3+
/**
4+
* A string of all className you want applied to the component. [docs]
5+
*/
6+
className?: string;
7+
/**
8+
* Toggle the disabled state for the component. [docs]
9+
*/
10+
disabled?: boolean;
11+
/**
12+
* Set component validation state to invalid. [docs]
13+
*/
14+
invalid?: boolean;
15+
/**
16+
* Method called immediately after the `value` prop changes. [docs]
17+
*/
18+
onChange?: ChangeEventHandler<HTMLInputElement>;
19+
/**
20+
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` [docs]
21+
*/
22+
plainText?: boolean;
23+
/**
24+
* Toggle the readonly state for the component. [docs]
25+
*/
26+
readOnly?: boolean;
27+
/**
28+
* Size the component small or large. [docs]
29+
*
30+
* @type 'sm' | 'lg'
31+
*/
32+
size?: 'sm' | 'lg';
33+
/**
34+
* Specifies the type of component. [docs]
35+
*
36+
* @type 'color' | 'file' | 'text' | string
37+
* @default 'text'
38+
*/
39+
type?: 'color' | 'file' | 'text' | string;
40+
/**
41+
* Set component validation state to valid. [docs]
42+
*/
43+
valid?: boolean;
44+
/**
45+
* The `value` attribute of component. [docs]
46+
*
47+
* @controllable onChange
48+
* */
49+
value?: string | string[] | number;
50+
}
51+
export declare const CFormInput: React.ForwardRefExoticComponent<CFormInputProps & React.RefAttributes<HTMLInputElement>>;

dist/components/form/CFormLabel.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ export interface CFormLabelProps extends HTMLAttributes<HTMLLabelElement> {
44
* A string of all className you want applied to the component. [docs]
55
*/
66
className?: string;
7-
classNameParent?: string;
7+
/**
8+
* A string of all className you want to be applied to the component, and override standard className value. [docs]
9+
*/
10+
customClassName?: string;
811
}
912
export declare const CFormLabel: React.ForwardRefExoticComponent<CFormLabelProps & React.RefAttributes<HTMLLabelElement>>;

dist/components/form/CFormSwitch.d.ts

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React, { HTMLAttributes, ReactNode } from 'react';
2+
export interface CFormSwitchProps extends HTMLAttributes<HTMLInputElement> {
3+
/**
4+
* A string of all className you want applied to the component. [docs]
5+
*/
6+
className?: string;
7+
/**
8+
* The id global attribute defines an identifier (ID) that must be unique in the whole document. [docs]
9+
*/
10+
id?: string;
11+
/**
12+
* Set component validation state to invalid. [docs]
13+
*/
14+
invalid?: boolean;
15+
/**
16+
* The element represents a caption for a component. [docs]
17+
*/
18+
label?: string | ReactNode;
19+
/**
20+
* Size the component large or extra large. Works only with `switch` [docs]
21+
*
22+
* @type 'lg' | 'xl'
23+
*/
24+
size?: 'lg' | 'xl';
25+
/**
26+
* Specifies the type of component. [docs]
27+
*
28+
* @type checkbox' | 'radio'
29+
* @default 'checkbox'
30+
*/
31+
type?: 'checkbox' | 'radio';
32+
/**
33+
* Set component validation state to valid. [docs]
34+
*/
35+
valid?: boolean;
36+
}
37+
export declare const CFormSwitch: React.ForwardRefExoticComponent<CFormSwitchProps & React.RefAttributes<HTMLInputElement>>;
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React, { ChangeEventHandler, HTMLAttributes } from 'react';
2+
export interface CFormTextareaProps extends HTMLAttributes<HTMLTextAreaElement> {
3+
/**
4+
* A string of all className you want applied to the component. [docs]
5+
*/
6+
className?: string;
7+
/**
8+
* Toggle the disabled state for the component. [docs]
9+
*/
10+
disabled?: boolean;
11+
/**
12+
* Set component validation state to invalid. [docs]
13+
*/
14+
invalid?: boolean;
15+
/**
16+
* Method called immediately after the `value` prop changes. [docs]
17+
*/
18+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
19+
/**
20+
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` [docs]
21+
*/
22+
plainText?: boolean;
23+
/**
24+
* Toggle the readonly state for the component. [docs]
25+
*/
26+
readOnly?: boolean;
27+
/**
28+
* Set component validation state to valid. [docs]
29+
*/
30+
valid?: boolean;
31+
/**
32+
* The `value` attribute of component. [docs]
33+
*
34+
* @controllable onChange
35+
* */
36+
value?: string | string[] | number;
37+
}
38+
export declare const CFormTextarea: React.ForwardRefExoticComponent<CFormTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;

dist/components/grid/CContainer.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { HTMLAttributes } from 'react';
22
export interface CContainerProps extends HTMLAttributes<HTMLDivElement> {
3-
breakpoint?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
43
/**
54
* A string of all className you want applied to the base component. [docs]
65
*/

dist/components/image/CImage.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import React, { HTMLAttributes } from 'react';
22
export interface CImageProps extends HTMLAttributes<HTMLImageElement> {
3+
/**
4+
* Set the horizontal aligment.
5+
*/
36
align?: 'start' | 'center' | 'end';
47
/**
58
* A string of all className you want applied to the component. [docs]

dist/components/nav/CNavGroup.d.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ export interface CNavGroupProps {
55
* A string of all className you want applied to the component. [docs]
66
*/
77
className?: string;
8-
/**
9-
* Set component's icon. [docs]
10-
*/
11-
icon?: string | ReactNode;
128
/**
139
* Set group toggler label. [docs]
1410
*/
15-
toggler?: string;
11+
toggler?: string | ReactNode;
1612
/**
1713
* Show nav group items. [docs]
1814
*/

dist/components/nav/CNavLink.d.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ElementType, ReactNode } from 'react';
1+
import React, { ElementType } from 'react';
22
import { CLinkProps } from '../link/CLink';
33
export interface CNavLinkProps extends Omit<CLinkProps, 'idx'> {
44
/**
@@ -19,10 +19,6 @@ export interface CNavLinkProps extends Omit<CLinkProps, 'idx'> {
1919
* Toggle the disabled state for the component. [docs]
2020
*/
2121
disabled?: boolean;
22-
/**
23-
* Set component's icon. [docs]
24-
*/
25-
icon?: string | ReactNode;
2622
/**
2723
* @ignore
2824
*/

dist/components/offcanvas/COffcanvas.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { HTMLAttributes } from 'react';
22
export interface COffcanvasProps extends HTMLAttributes<HTMLDivElement> {
33
/**
44
* Apply a backdrop on body while offcanvas is open. [docs]
5+
*
56
* @default true
67
*/
78
backdrop?: boolean;
@@ -11,6 +12,7 @@ export interface COffcanvasProps extends HTMLAttributes<HTMLDivElement> {
1112
className?: string;
1213
/**
1314
* Closes the offcanvas when escape key is pressed [docs]
15+
*
1416
* @default true
1517
*/
1618
keyboard?: boolean;

dist/components/pagination/CPaginationItem.d.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import React, { ElementType, HTMLAttributes } from 'react';
22
export interface CPaginationItemProps extends HTMLAttributes<HTMLAnchorElement> {
3-
/**
4-
* Define a string that labels the current element. Use it in cases where a text label is not visible on the screen. [docs]
5-
*/
6-
ariaLabel?: string;
73
/**
84
* Toggle the active state for the component. [docs]
95
*/

dist/components/progress/CProgress.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export interface CProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'co
77
className?: string;
88
/**
99
* Sets the height of the component. If you set that value the inner <CProgressBar> will automatically resize accordingly. [docs]
10-
*
11-
* @default 'undefined'
1210
*/
1311
height?: number;
1412
/**

dist/components/progress/CProgressBar.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { Colors } from '../Types';
33
export interface CProgressBarProps extends HTMLAttributes<HTMLDivElement> {
44
/**
55
* Use to animate the stripes right to left via CSS3 animations. [docs]
6-
*
7-
* @default false
86
*/
97
animated?: boolean;
108
/**

dist/components/spinner/CSpinner.d.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { Colors } from '../Types';
33
export interface CSpinnerProps extends HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
44
/**
55
* A string of all className you want applied to the component. [docs]
6-
*
7-
* @default 'undefined'
86
*/
97
className?: string;
108
/**
@@ -21,8 +19,6 @@ export interface CSpinnerProps extends HTMLAttributes<HTMLDivElement | HTMLSpanE
2119
component?: string | ElementType;
2220
/**
2321
* Size the component small. [docs]
24-
*
25-
* @default 'undefined'
2622
*/
2723
size?: 'sm';
2824
/**
@@ -31,5 +27,11 @@ export interface CSpinnerProps extends HTMLAttributes<HTMLDivElement | HTMLSpanE
3127
* @default 'border'
3228
*/
3329
variant?: 'border' | 'grow';
30+
/**
31+
* Set visually hidden label for accessibility purposes. [docs]
32+
*
33+
* @default 'Loading...'
34+
*/
35+
visuallyHiddenLabel?: string;
3436
}
3537
export declare const CSpinner: React.ForwardRefExoticComponent<CSpinnerProps & React.RefAttributes<HTMLDivElement | HTMLSpanElement>>;

0 commit comments

Comments
 (0)