@coreui/vue-pro 4.1.2 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/button/CButton.d.ts +29 -2
- package/dist/components/dropdown/CDropdown.d.ts +25 -0
- package/dist/components/dropdown/CDropdownToggle.d.ts +35 -1
- package/dist/components/smart-table/CSmartTable.d.ts +0 -3
- package/dist/components/smart-table/CSmartTableBody.d.ts +0 -11
- package/dist/components/smart-table/CSmartTableHead.d.ts +1 -1
- package/dist/index.es.js +206 -101
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +205 -100
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/components/accordion/CAccordionButton.ts +1 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionButton.spec.ts.snap +1 -1
- package/src/components/accordion/__tests__/__snapshots__/CAccordionHeader.spec.ts.snap +1 -1
- package/src/components/button/CButton.ts +30 -1
- package/src/components/button/__tests__/__snapshots__/CButton.spec.ts.snap +1 -1
- package/src/components/close-button/CCloseButton.ts +4 -1
- package/src/components/dropdown/CDropdown.ts +48 -49
- package/src/components/dropdown/CDropdownMenu.ts +50 -7
- package/src/components/dropdown/CDropdownToggle.ts +78 -29
- package/src/components/dropdown/__tests__/CDropdownMenu.spec.ts +7 -7
- package/src/components/dropdown/__tests__/CDropdownToggle.spec.ts +4 -5
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownToggle.spec.ts.snap +2 -2
- package/src/components/form/CFormCheck.ts +2 -1
- package/src/components/form/CFormSwitch.ts +1 -7
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.ts.snap +2 -8
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.ts.snap +2 -1
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.ts.snap +8 -2
- package/src/components/smart-table/CSmartTable.ts +18 -15
- package/src/components/smart-table/CSmartTableBody.ts +0 -5
- package/src/components/toast/__tests__/__snapshots__/CToastClose.spec.ts.snap +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
Several quick start options are available:
|
|
45
45
|
|
|
46
|
-
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.
|
|
46
|
+
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.2.0.zip)
|
|
47
47
|
- Clone the repo: `git clone https://github.com/coreui/coreui-vue-pro.git`
|
|
48
48
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue-pro`
|
|
49
49
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue-pro`
|
|
@@ -59,6 +59,18 @@ export declare const CButton: import("vue").DefineComponent<{
|
|
|
59
59
|
required: false;
|
|
60
60
|
validator: (value: string) => boolean;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Specifies the type of button. Always specify the type attribute for the `<button>` element.
|
|
64
|
+
* Different browsers may use different default types for the `<button>` element.
|
|
65
|
+
*
|
|
66
|
+
* @values 'button', 'submit', 'reset'
|
|
67
|
+
*/
|
|
68
|
+
type: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
required: false;
|
|
72
|
+
validator: (value: string) => boolean;
|
|
73
|
+
};
|
|
62
74
|
/**
|
|
63
75
|
* Set the button variant to an outlined button or a ghost button.
|
|
64
76
|
*
|
|
@@ -72,7 +84,7 @@ export declare const CButton: import("vue").DefineComponent<{
|
|
|
72
84
|
};
|
|
73
85
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
74
86
|
[key: string]: any;
|
|
75
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
87
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
76
88
|
/**
|
|
77
89
|
* Toggle the active state for the component.
|
|
78
90
|
*/
|
|
@@ -133,6 +145,18 @@ export declare const CButton: import("vue").DefineComponent<{
|
|
|
133
145
|
required: false;
|
|
134
146
|
validator: (value: string) => boolean;
|
|
135
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Specifies the type of button. Always specify the type attribute for the `<button>` element.
|
|
150
|
+
* Different browsers may use different default types for the `<button>` element.
|
|
151
|
+
*
|
|
152
|
+
* @values 'button', 'submit', 'reset'
|
|
153
|
+
*/
|
|
154
|
+
type: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: string;
|
|
157
|
+
required: false;
|
|
158
|
+
validator: (value: string) => boolean;
|
|
159
|
+
};
|
|
136
160
|
/**
|
|
137
161
|
* Set the button variant to an outlined button or a ghost button.
|
|
138
162
|
*
|
|
@@ -144,7 +168,10 @@ export declare const CButton: import("vue").DefineComponent<{
|
|
|
144
168
|
required: false;
|
|
145
169
|
validator: (value: string) => boolean;
|
|
146
170
|
};
|
|
147
|
-
}
|
|
171
|
+
}>> & {
|
|
172
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
type: string;
|
|
148
175
|
disabled: boolean;
|
|
149
176
|
variant: string;
|
|
150
177
|
component: string;
|
|
@@ -12,6 +12,18 @@ declare const CDropdown: import("vue").DefineComponent<{
|
|
|
12
12
|
required: false;
|
|
13
13
|
validator: (value: string | any) => boolean;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Configure the auto close behavior of the dropdown:
|
|
17
|
+
* - `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.
|
|
18
|
+
* - `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
|
|
19
|
+
* - `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.
|
|
20
|
+
* - `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.
|
|
21
|
+
*/
|
|
22
|
+
autoClose: {
|
|
23
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
24
|
+
default: boolean;
|
|
25
|
+
validator: (value: boolean | string) => boolean;
|
|
26
|
+
};
|
|
15
27
|
/**
|
|
16
28
|
* Sets a darker color scheme to match a dark navbar.
|
|
17
29
|
*/
|
|
@@ -97,6 +109,18 @@ declare const CDropdown: import("vue").DefineComponent<{
|
|
|
97
109
|
required: false;
|
|
98
110
|
validator: (value: string | any) => boolean;
|
|
99
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* Configure the auto close behavior of the dropdown:
|
|
114
|
+
* - `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.
|
|
115
|
+
* - `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
|
|
116
|
+
* - `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.
|
|
117
|
+
* - `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.
|
|
118
|
+
*/
|
|
119
|
+
autoClose: {
|
|
120
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
121
|
+
default: boolean;
|
|
122
|
+
validator: (value: boolean | string) => boolean;
|
|
123
|
+
};
|
|
100
124
|
/**
|
|
101
125
|
* Sets a darker color scheme to match a dark navbar.
|
|
102
126
|
*/
|
|
@@ -176,6 +200,7 @@ declare const CDropdown: import("vue").DefineComponent<{
|
|
|
176
200
|
variant: string;
|
|
177
201
|
direction: string;
|
|
178
202
|
alignment: string | Record<string, any>;
|
|
203
|
+
autoClose: string | boolean;
|
|
179
204
|
placement: Placement;
|
|
180
205
|
popper: boolean;
|
|
181
206
|
trigger: string | unknown[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Triggers } from '../Types';
|
|
1
3
|
declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
2
4
|
/**
|
|
3
5
|
* Toggle the active state for the component.
|
|
@@ -32,6 +34,10 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
32
34
|
default: string;
|
|
33
35
|
require: boolean;
|
|
34
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Create a custom toggler which accepts any content.
|
|
39
|
+
*/
|
|
40
|
+
custom: BooleanConstructor;
|
|
35
41
|
/**
|
|
36
42
|
* Toggle the disabled state for the component.
|
|
37
43
|
*/
|
|
@@ -64,6 +70,16 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
64
70
|
type: BooleanConstructor;
|
|
65
71
|
required: false;
|
|
66
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
|
|
75
|
+
*
|
|
76
|
+
* @type 'hover' | 'focus' | 'click'
|
|
77
|
+
*/
|
|
78
|
+
trigger: {
|
|
79
|
+
type: PropType<Triggers>;
|
|
80
|
+
default: string;
|
|
81
|
+
required: false;
|
|
82
|
+
};
|
|
67
83
|
/**
|
|
68
84
|
* Set the button variant to an outlined button or a ghost button.
|
|
69
85
|
*
|
|
@@ -77,7 +93,9 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
77
93
|
};
|
|
78
94
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
79
95
|
[key: string]: any;
|
|
80
|
-
}
|
|
96
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
81
99
|
/**
|
|
82
100
|
* Toggle the active state for the component.
|
|
83
101
|
*/
|
|
@@ -111,6 +129,10 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
111
129
|
default: string;
|
|
112
130
|
require: boolean;
|
|
113
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* Create a custom toggler which accepts any content.
|
|
134
|
+
*/
|
|
135
|
+
custom: BooleanConstructor;
|
|
114
136
|
/**
|
|
115
137
|
* Toggle the disabled state for the component.
|
|
116
138
|
*/
|
|
@@ -143,6 +165,16 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
143
165
|
type: BooleanConstructor;
|
|
144
166
|
required: false;
|
|
145
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
|
|
170
|
+
*
|
|
171
|
+
* @type 'hover' | 'focus' | 'click'
|
|
172
|
+
*/
|
|
173
|
+
trigger: {
|
|
174
|
+
type: PropType<Triggers>;
|
|
175
|
+
default: string;
|
|
176
|
+
required: false;
|
|
177
|
+
};
|
|
146
178
|
/**
|
|
147
179
|
* Set the button variant to an outlined button or a ghost button.
|
|
148
180
|
*
|
|
@@ -161,6 +193,8 @@ declare const CDropdownToggle: import("vue").DefineComponent<{
|
|
|
161
193
|
component: string;
|
|
162
194
|
size: string;
|
|
163
195
|
active: boolean;
|
|
196
|
+
trigger: Triggers;
|
|
164
197
|
caret: boolean;
|
|
198
|
+
custom: boolean;
|
|
165
199
|
}>;
|
|
166
200
|
export { CDropdownToggle };
|
|
@@ -66,7 +66,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
66
66
|
*/
|
|
67
67
|
columns: {
|
|
68
68
|
type: PropType<string[] | Column[]>;
|
|
69
|
-
default: () => never[];
|
|
70
69
|
required: false;
|
|
71
70
|
};
|
|
72
71
|
/**
|
|
@@ -345,7 +344,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
345
344
|
*/
|
|
346
345
|
columns: {
|
|
347
346
|
type: PropType<string[] | Column[]>;
|
|
348
|
-
default: () => never[];
|
|
349
347
|
required: false;
|
|
350
348
|
};
|
|
351
349
|
/**
|
|
@@ -574,7 +572,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
574
572
|
pagination: boolean;
|
|
575
573
|
activePage: number;
|
|
576
574
|
clickableRows: boolean;
|
|
577
|
-
columns: string[] | Column[];
|
|
578
575
|
selectable: boolean;
|
|
579
576
|
columnFilterValue: ColumnFilterValue;
|
|
580
577
|
columnSorter: boolean | Sorter;
|
|
@@ -20,11 +20,6 @@ declare const CSmartTableBody: import("vue").DefineComponent<{
|
|
|
20
20
|
default: undefined;
|
|
21
21
|
require: boolean;
|
|
22
22
|
};
|
|
23
|
-
columns: {
|
|
24
|
-
type: ArrayConstructor;
|
|
25
|
-
default: () => never[];
|
|
26
|
-
require: boolean;
|
|
27
|
-
};
|
|
28
23
|
rawColumnNames: {
|
|
29
24
|
type: PropType<string[]>;
|
|
30
25
|
default: () => never[];
|
|
@@ -58,11 +53,6 @@ declare const CSmartTableBody: import("vue").DefineComponent<{
|
|
|
58
53
|
default: undefined;
|
|
59
54
|
require: boolean;
|
|
60
55
|
};
|
|
61
|
-
columns: {
|
|
62
|
-
type: ArrayConstructor;
|
|
63
|
-
default: () => never[];
|
|
64
|
-
require: boolean;
|
|
65
|
-
};
|
|
66
56
|
rawColumnNames: {
|
|
67
57
|
type: PropType<string[]>;
|
|
68
58
|
default: () => never[];
|
|
@@ -82,7 +72,6 @@ declare const CSmartTableBody: import("vue").DefineComponent<{
|
|
|
82
72
|
currentItems: Item[];
|
|
83
73
|
firstItemOnActivePageIndex: number;
|
|
84
74
|
noItemLabel: string;
|
|
85
|
-
columns: unknown[];
|
|
86
75
|
rawColumnNames: string[];
|
|
87
76
|
scopedSlots: Record<string, any>;
|
|
88
77
|
selectable: boolean;
|
|
@@ -81,10 +81,10 @@ declare const CSmartTableHead: import("vue").DefineComponent<{
|
|
|
81
81
|
onSortClick?: ((...args: any[]) => any) | undefined;
|
|
82
82
|
}, {
|
|
83
83
|
component: string;
|
|
84
|
-
columns: string[] | Column[];
|
|
85
84
|
selectable: boolean;
|
|
86
85
|
clearSorterAndFilter: string;
|
|
87
86
|
columnSorter: boolean | Sorter;
|
|
87
|
+
columns: string[] | Column[];
|
|
88
88
|
sorterState: SorterValue;
|
|
89
89
|
}>;
|
|
90
90
|
export { CSmartTableHead };
|