wave-ui 3.11.0 → 3.12.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/dist/types/$waveui.d.ts +194 -2
- package/dist/types/components/WInput.d.ts +14 -0
- package/dist/types/components/WSelect.d.ts +80 -35
- package/dist/types/components/WTable.d.ts +130 -32
- package/dist/types/components/WTabs.d.ts +64 -22
- package/dist/types/components/WTextarea.d.ts +14 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +359 -333
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-autocomplete.vue +1 -8
- package/src/wave-ui/components/w-input.vue +1 -0
- package/src/wave-ui/components/w-select.vue +10 -8
- package/src/wave-ui/components/w-switch.vue +1 -1
- package/src/wave-ui/components/w-table.vue +18 -1
- package/src/wave-ui/components/w-textarea.vue +12 -10
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import { ComputedGetter, ComputedOptions, DefineComponent, EmitsOptions, ExtractDefaultPropTypes, MethodOptions, SlotsType } from 'vue';
|
|
2
2
|
import { PublicProps, ResolveProps } from '../extra-vue-types';
|
|
3
|
+
export interface WTabsItem {
|
|
4
|
+
/**
|
|
5
|
+
* The title of the tab. It will use `v-html` to display it.
|
|
6
|
+
* NOTE: This key can be overridden by the `itemTitleKey` prop.
|
|
7
|
+
* @property {string} [title]
|
|
8
|
+
*/
|
|
9
|
+
title?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The content of the tab. It will use `v-html` to display it.
|
|
12
|
+
* NOTE: This key can be overridden by the `itemContentKey` prop.
|
|
13
|
+
* @property {string} [content]
|
|
14
|
+
*/
|
|
15
|
+
content?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Any additional content you'd like to pass to the tab, or for custom keys.
|
|
18
|
+
*/
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
3
21
|
export interface WaveTabsProps {
|
|
4
22
|
/**
|
|
5
|
-
*
|
|
23
|
+
* `value` in Vue 2.
|
|
6
24
|
* Provide a tab index (a number starting from 0) to open it. This value gets updated when using a v-model.
|
|
7
25
|
* @property {number|string} modelValue
|
|
8
26
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
@@ -27,10 +45,10 @@ export interface WaveTabsProps {
|
|
|
27
45
|
/**
|
|
28
46
|
* Expecting an array of objects. Each object being an tab item, it should include a `title` and `content` attributes.
|
|
29
47
|
* Alternatively, you can provide an integer number (call it `x`), to loop through and create `x` tabs. You can then use the individual slots `item-title.x` & `item-content.x` to define each item title and content.
|
|
30
|
-
* @property {Array<
|
|
48
|
+
* @property {Array<WTabsItem>|number} items
|
|
31
49
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
32
50
|
*/
|
|
33
|
-
items?: Array<
|
|
51
|
+
items?: Array<WTabsItem> | number;
|
|
34
52
|
/**
|
|
35
53
|
* Specifies the name of the attribute in each item object where to find the item's unique ID.
|
|
36
54
|
* Having a unique ID is important when injecting and replacing tabs. If no unique id is provided, Wave UI will generate one and `inject it in each item`.
|
|
@@ -155,22 +173,22 @@ export interface WaveTabsProps {
|
|
|
155
173
|
export interface WaveTabsEmits {
|
|
156
174
|
/**
|
|
157
175
|
* Emitted each time the current tab changes.<br>Updates the v-model value in Vue 2.x only.
|
|
158
|
-
* @param {
|
|
176
|
+
* @param {Array<boolean>} tabsOpened - An array of booleans representing the active state of each tab.
|
|
159
177
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
160
178
|
*/
|
|
161
|
-
'onInput'?: (
|
|
179
|
+
'onInput'?: (tabsOpened: Array<boolean>) => void;
|
|
162
180
|
/**
|
|
163
181
|
* Emitted each time the current tab changes.<br>Updates the v-model value in Vue 3 only.
|
|
164
|
-
* @param {
|
|
182
|
+
* @param {Array<boolean>} tabsOpened - An array of booleans representing the active state of each tab.
|
|
165
183
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
166
184
|
*/
|
|
167
|
-
'onUpdate:modelValue'?: (
|
|
185
|
+
'onUpdate:modelValue'?: (tabsOpened: Array<boolean>) => void;
|
|
168
186
|
/**
|
|
169
187
|
* Emitted on each tab title focus.
|
|
170
|
-
* @param {
|
|
188
|
+
* @param {WTabsItem} tab - The focused tab item object.
|
|
171
189
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
172
190
|
*/
|
|
173
|
-
'onFocus'?: (
|
|
191
|
+
'onFocus'?: (tab: WTabsItem) => void;
|
|
174
192
|
}
|
|
175
193
|
export interface WaveTabsComputeds extends ComputedOptions {
|
|
176
194
|
/**
|
|
@@ -270,32 +288,56 @@ export interface WaveTabsMethods extends MethodOptions {
|
|
|
270
288
|
export type WaveTabsSlots = SlotsType<{
|
|
271
289
|
/**
|
|
272
290
|
* Provide a custom title for every tab. Applies to all the tabs, but can be overridden by the `item-title.x` slot.
|
|
273
|
-
* @param {
|
|
274
|
-
* @param {
|
|
275
|
-
* @param {
|
|
291
|
+
* @param {WTabsItem} item The current tab object.
|
|
292
|
+
* @param {number} index The tab index in the array of tabs. Starts at 1 to be consistent with the `item.x` slot.
|
|
293
|
+
* @param {boolean} active A boolean representing the active state of the tab.
|
|
276
294
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
277
295
|
*/
|
|
278
296
|
'item-title': (_: {
|
|
279
|
-
item:
|
|
280
|
-
index:
|
|
281
|
-
active:
|
|
297
|
+
item: WTabsItem;
|
|
298
|
+
index: number;
|
|
299
|
+
active: boolean;
|
|
282
300
|
}) => any;
|
|
283
301
|
/**
|
|
284
|
-
*
|
|
302
|
+
* Any addition content to be appended to the end of the tabs bar
|
|
285
303
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
286
304
|
*/
|
|
287
305
|
'tabs-bar-extra': () => any;
|
|
288
306
|
/**
|
|
289
307
|
* Provide a custom content for every tab. Applies to all the tabs, but can be overridden by the `item-content.x` slot.
|
|
290
|
-
* @param {
|
|
291
|
-
* @param {
|
|
292
|
-
* @param {
|
|
308
|
+
* @param {WTabsItem} item The current tab object.
|
|
309
|
+
* @param {number} index The tab index in the array of tabs. Starts at 1 to be consistent with the `item.x` slot.
|
|
310
|
+
* @param {boolean} active A boolean representing the active state of the tab.
|
|
293
311
|
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
294
312
|
*/
|
|
295
313
|
'item-content': (_: {
|
|
296
|
-
item:
|
|
297
|
-
index:
|
|
298
|
-
active:
|
|
314
|
+
item: WTabsItem;
|
|
315
|
+
index: number;
|
|
316
|
+
active: boolean;
|
|
317
|
+
}) => any;
|
|
318
|
+
/**
|
|
319
|
+
* Provide a custom title for every tab. Applies to all the tabs, but can be overridden by the `item-title.x` slot.
|
|
320
|
+
* @param {WTabsItem} item The current tab object.
|
|
321
|
+
* @param {number} index The tab index in the array of tabs. Starts at 1 to be consistent with the `item.x` slot.
|
|
322
|
+
* @param {boolean} active A boolean representing the active state of the tab.
|
|
323
|
+
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
324
|
+
*/
|
|
325
|
+
[key: `item-title.${number}`]: (_: {
|
|
326
|
+
item: WTabsItem;
|
|
327
|
+
index: number;
|
|
328
|
+
active: boolean;
|
|
329
|
+
}) => any;
|
|
330
|
+
/**
|
|
331
|
+
* Provide a custom content for every tab. Applies to all the tabs, but can be overridden by the `item-content.x` slot.
|
|
332
|
+
* @param {WTabsItem} item The current tab object.
|
|
333
|
+
* @param {number} index The tab index in the array of tabs. Starts at 1 to be consistent with the `item.x` slot.
|
|
334
|
+
* @param {boolean} active A boolean representing the active state of the tab.
|
|
335
|
+
* @see https://antoniandre.github.io/wave-ui/w-tabs
|
|
336
|
+
*/
|
|
337
|
+
[key: `item-content.${number}`]: (_: {
|
|
338
|
+
item: WTabsItem;
|
|
339
|
+
index: number;
|
|
340
|
+
active: boolean;
|
|
299
341
|
}) => any;
|
|
300
342
|
}>;
|
|
301
343
|
export type WTabs = DefineComponent<WaveTabsProps, {}, {}, WaveTabsComputeds, WaveTabsMethods, {}, {}, WaveTabsEmits & EmitsOptions, string, PublicProps, ResolveProps<WaveTabsProps & WaveTabsEmits, EmitsOptions>, ExtractDefaultPropTypes<WaveTabsProps>, WaveTabsSlots>;
|
|
@@ -239,5 +239,19 @@ export type WaveTextareaSlots = SlotsType<{
|
|
|
239
239
|
* @see https://antoniandre.github.io/wave-ui/w-textarea
|
|
240
240
|
*/
|
|
241
241
|
'default': () => any;
|
|
242
|
+
/**
|
|
243
|
+
* The left icon, if the `innerIconLeft` prop is not flexible enough.
|
|
244
|
+
* @see https://antoniandre.github.io/wave-ui/w-input
|
|
245
|
+
*/
|
|
246
|
+
'icon-left': (_: {
|
|
247
|
+
inputId: string;
|
|
248
|
+
}) => any;
|
|
249
|
+
/**
|
|
250
|
+
* The right icon, if the `innerIconRight` prop is not flexible enough.
|
|
251
|
+
* @see https://antoniandre.github.io/wave-ui/w-input
|
|
252
|
+
*/
|
|
253
|
+
'icon-right': (_: {
|
|
254
|
+
inputId: string;
|
|
255
|
+
}) => any;
|
|
242
256
|
}>;
|
|
243
257
|
export type WTextarea = DefineComponent<WaveTextareaProps, {}, {}, WaveTextareaComputeds, WaveTextareaMethods, {}, {}, WaveTextareaEmits & EmitsOptions, string, PublicProps, ResolveProps<WaveTextareaProps & WaveTextareaEmits, EmitsOptions>, ExtractDefaultPropTypes<WaveTextareaProps>, WaveTextareaSlots>;
|
|
@@ -27,12 +27,12 @@ export { WProgress } from './WProgress';
|
|
|
27
27
|
export { WRadio } from './WRadio';
|
|
28
28
|
export { WRadios } from './WRadios';
|
|
29
29
|
export { WRating } from './WRating';
|
|
30
|
-
export { WSelect } from './WSelect';
|
|
30
|
+
export { WSelect, WSelectDropdownItem } from './WSelect';
|
|
31
31
|
export { WSlider } from './WSlider';
|
|
32
32
|
export { WSpinner } from './WSpinner';
|
|
33
33
|
export { WSteps } from './WSteps';
|
|
34
34
|
export { WSwitch } from './WSwitch';
|
|
35
|
-
export { WTable } from './WTable';
|
|
35
|
+
export { WTable, WTableHeader, WTablePagination } from './WTable';
|
|
36
36
|
export { WTabs } from './WTabs';
|
|
37
37
|
export { WTag } from './WTag';
|
|
38
38
|
export { WTextarea } from './WTextarea';
|