wave-ui 4.2.5 → 4.3.1
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/types/components/WButton.d.ts +7 -0
- package/dist/types/types/components/WButtons.d.ts +223 -0
- package/dist/types/types/components/WButtons.js +2 -0
- package/dist/types/types/components/WList.d.ts +7 -1
- package/dist/types/types/components/WSelect.d.ts +7 -1
- package/dist/types/types/components/index.d.ts +1 -0
- package/dist/wave-ui.cjs.js +3 -3
- package/dist/wave-ui.css +1 -1
- package/dist/{wave-ui.esm.js → wave-ui.es.js} +685 -568
- package/dist/wave-ui.umd.js +3 -3
- package/package.json +33 -31
- package/src/wave-ui/components/index.js +1 -0
- package/src/wave-ui/components/w-button/button.vue +9 -1
- package/src/wave-ui/components/w-button/index.vue +33 -3
- package/src/wave-ui/components/w-buttons.vue +265 -0
- package/src/wave-ui/components/w-list.vue +4 -4
- package/src/wave-ui/components/w-select.vue +4 -4
|
@@ -203,6 +203,13 @@ export interface WaveButtonProps {
|
|
|
203
203
|
* @see https://antoniandre.github.io/wave-ui/w-button
|
|
204
204
|
*/
|
|
205
205
|
noRipple?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Marks the button as selected/active (e.g. when used inside a `w-buttons` group).
|
|
208
|
+
* Adds the `w-button--active` class and applies a persistent overlay.
|
|
209
|
+
* @property {boolean} active
|
|
210
|
+
* @see https://antoniandre.github.io/wave-ui/w-button
|
|
211
|
+
*/
|
|
212
|
+
active?: boolean;
|
|
206
213
|
}
|
|
207
214
|
export type WaveButtonEmits = {};
|
|
208
215
|
export interface WaveButtonComputeds extends ComputedOptions {
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { DefineComponent, EmitsOptions, ExtractDefaultPropTypes, SlotsType } from 'vue';
|
|
2
|
+
import type { PublicProps, ResolveProps } from '../extra-vue-types';
|
|
3
|
+
export interface WaveButtonsItem {
|
|
4
|
+
/** Button label (used when no default slot is provided). */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Optional id — used as the v-model value when present on all items. */
|
|
7
|
+
id?: string | number;
|
|
8
|
+
/** Optional value — used as the v-model value when no `id` key is present. */
|
|
9
|
+
value?: any;
|
|
10
|
+
/** Whether this button starts active (overridden by `modelValue` when provided). */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** Disable this individual button. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Override the button icon for this item. */
|
|
15
|
+
icon?: string;
|
|
16
|
+
/** Props forwarded to `w-icon` when `icon` is set. */
|
|
17
|
+
iconProps?: {};
|
|
18
|
+
/** Override the text color for this item. */
|
|
19
|
+
color?: string;
|
|
20
|
+
/** Override the background color for this item (active state only). */
|
|
21
|
+
bgColor?: string;
|
|
22
|
+
/** Extra CSS class(es) for this item's button. */
|
|
23
|
+
class?: string | object | any[];
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
export interface WaveButtonsProps {
|
|
27
|
+
/**
|
|
28
|
+
* Array of button definitions. When omitted, place `w-button` elements in the default slot.
|
|
29
|
+
* @property {WaveButtonsItem[]} items
|
|
30
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
31
|
+
*/
|
|
32
|
+
items?: WaveButtonsItem[];
|
|
33
|
+
/**
|
|
34
|
+
* Active selection. A single value (index or id/value key) for single mode, or an array for multiple mode.
|
|
35
|
+
* @property {number|string|any[]} modelValue
|
|
36
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
37
|
+
*/
|
|
38
|
+
modelValue?: number | string | any[];
|
|
39
|
+
/**
|
|
40
|
+
* The key in each item object used to build the v-model value.
|
|
41
|
+
* Auto-detected if omitted: checks for `id` first, then `value`, then falls back to 0-based index.
|
|
42
|
+
* @property {string} itemValueKey
|
|
43
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
44
|
+
*/
|
|
45
|
+
itemValueKey?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Allows multiple buttons to be active simultaneously. The v-model becomes an array.
|
|
48
|
+
* @property {boolean} multiple
|
|
49
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
50
|
+
*/
|
|
51
|
+
multiple?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Forces at least one button to remain active at all times.
|
|
54
|
+
* @property {boolean} mandatory
|
|
55
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
56
|
+
*/
|
|
57
|
+
mandatory?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Disables all buttons in the group.
|
|
60
|
+
* @property {boolean} disabled
|
|
61
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Gap between buttons in base-increment units. `0` (default) sticks the buttons together.
|
|
66
|
+
* @property {number|string} gap - Default: 0
|
|
67
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
68
|
+
*/
|
|
69
|
+
gap?: number | string;
|
|
70
|
+
/**
|
|
71
|
+
* CSS class applied to every button.
|
|
72
|
+
* @property {string|object|any[]} buttonClass
|
|
73
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
74
|
+
*/
|
|
75
|
+
buttonClass?: string | object | any[];
|
|
76
|
+
/**
|
|
77
|
+
* Text color applied to all buttons.
|
|
78
|
+
* @property {string} color
|
|
79
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
80
|
+
*/
|
|
81
|
+
color?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Background color applied to all buttons.
|
|
84
|
+
* @property {string} bgColor
|
|
85
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
86
|
+
*/
|
|
87
|
+
bgColor?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Text color of the active button. Falls back to `color`.
|
|
90
|
+
* @property {string} activeColor
|
|
91
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
92
|
+
*/
|
|
93
|
+
activeColor?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Background color of the active button. Defaults to `primary`.
|
|
96
|
+
* @property {string} activeBgColor
|
|
97
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
98
|
+
*/
|
|
99
|
+
activeBgColor?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Sets white text on all buttons.
|
|
102
|
+
* @property {boolean} dark
|
|
103
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
104
|
+
*/
|
|
105
|
+
dark?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Sets dark text on all buttons.
|
|
108
|
+
* @property {boolean} light
|
|
109
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
110
|
+
*/
|
|
111
|
+
light?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Outline style for inactive buttons.
|
|
114
|
+
* @property {boolean} outline
|
|
115
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
116
|
+
*/
|
|
117
|
+
outline?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Transparent background (text style) for inactive buttons.
|
|
120
|
+
* @property {boolean} text
|
|
121
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
122
|
+
*/
|
|
123
|
+
text?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* In stuck mode: outer rounded corners. In gap mode: each button is individually rounded.
|
|
126
|
+
* @property {boolean} round
|
|
127
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
128
|
+
*/
|
|
129
|
+
round?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* In stuck mode: shadow on the wrapper. In gap mode: shadow on each button.
|
|
132
|
+
* @property {boolean} shadow
|
|
133
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
134
|
+
*/
|
|
135
|
+
shadow?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Removes border-radius globally.
|
|
138
|
+
* @property {boolean} tile
|
|
139
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
140
|
+
*/
|
|
141
|
+
tile?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Native HTML type attribute forwarded to all buttons.
|
|
144
|
+
* @property {string} type
|
|
145
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
146
|
+
*/
|
|
147
|
+
type?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Disables the pointer ripple on all buttons.
|
|
150
|
+
* @property {boolean} noRipple
|
|
151
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
152
|
+
*/
|
|
153
|
+
noRipple?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Sets the size of all buttons to extra small.
|
|
156
|
+
* @property {boolean} xs
|
|
157
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
158
|
+
*/
|
|
159
|
+
xs?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Sets the size of all buttons to small.
|
|
162
|
+
* @property {boolean} sm
|
|
163
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
164
|
+
*/
|
|
165
|
+
sm?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Sets the size of all buttons to medium (default).
|
|
168
|
+
* @property {boolean} md
|
|
169
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
170
|
+
*/
|
|
171
|
+
md?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Sets the size of all buttons to large.
|
|
174
|
+
* @property {boolean} lg
|
|
175
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
176
|
+
*/
|
|
177
|
+
lg?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Sets the size of all buttons to extra large.
|
|
180
|
+
* @property {boolean} xl
|
|
181
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
182
|
+
*/
|
|
183
|
+
xl?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Sets a fixed width on all buttons.
|
|
186
|
+
* @property {number|string} width
|
|
187
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
188
|
+
*/
|
|
189
|
+
width?: number | string;
|
|
190
|
+
/**
|
|
191
|
+
* Sets a fixed height on all buttons.
|
|
192
|
+
* @property {number|string} height
|
|
193
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
194
|
+
*/
|
|
195
|
+
height?: number | string;
|
|
196
|
+
}
|
|
197
|
+
export interface WaveButtonsEmits {
|
|
198
|
+
/**
|
|
199
|
+
* Emitted when the active selection changes.
|
|
200
|
+
* @param value The new active value or array of values.
|
|
201
|
+
*/
|
|
202
|
+
'update:modelValue': (value: number | string | any[] | null) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Emitted when a button is clicked.
|
|
205
|
+
* @param item The item object (null in slot mode).
|
|
206
|
+
* @param index The 0-based button index.
|
|
207
|
+
* @param event The original MouseEvent.
|
|
208
|
+
*/
|
|
209
|
+
'click': (item: WaveButtonsItem | null, index: number, event: MouseEvent) => void;
|
|
210
|
+
}
|
|
211
|
+
export type WaveButtonsSlots = SlotsType<{
|
|
212
|
+
/**
|
|
213
|
+
* In items mode: custom content for each button, receiving item context.
|
|
214
|
+
* In slot mode: place `w-button` elements directly.
|
|
215
|
+
* @see https://antoniandre.github.io/wave-ui/w-buttons
|
|
216
|
+
*/
|
|
217
|
+
'default': (props: {
|
|
218
|
+
item: WaveButtonsItem;
|
|
219
|
+
index: number;
|
|
220
|
+
active: boolean;
|
|
221
|
+
}) => any;
|
|
222
|
+
}>;
|
|
223
|
+
export type WButtons = DefineComponent<WaveButtonsProps, {}, {}, {}, {}, {}, {}, WaveButtonsEmits & EmitsOptions, string, PublicProps, ResolveProps<WaveButtonsProps & WaveButtonsEmits, EmitsOptions>, ExtractDefaultPropTypes<WaveButtonsProps>, WaveButtonsSlots>;
|
|
@@ -134,7 +134,13 @@ export interface WaveListProps {
|
|
|
134
134
|
*/
|
|
135
135
|
returnObject?: boolean;
|
|
136
136
|
/**
|
|
137
|
-
* Once at least one item is selected, prevents the list
|
|
137
|
+
* Once at least one item is selected, prevents the list from having no selection.
|
|
138
|
+
* @property {boolean} mandatory
|
|
139
|
+
* @see https://antoniandre.github.io/wave-ui/w-list
|
|
140
|
+
*/
|
|
141
|
+
mandatory?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Use `mandatory` instead.
|
|
138
144
|
* @property {boolean} noUnselect
|
|
139
145
|
* @see https://antoniandre.github.io/wave-ui/w-list
|
|
140
146
|
*/
|
|
@@ -182,7 +182,13 @@ export interface WaveSelectProps {
|
|
|
182
182
|
*/
|
|
183
183
|
returnObject?: boolean;
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* When set to true, forces the select list to always have at least one selected item.
|
|
186
|
+
* @property {boolean} mandatory
|
|
187
|
+
* @see https://antoniandre.github.io/wave-ui/w-select
|
|
188
|
+
*/
|
|
189
|
+
mandatory?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Use `mandatory` instead.
|
|
186
192
|
* @property {boolean} noUnselect
|
|
187
193
|
* @see https://antoniandre.github.io/wave-ui/w-select
|
|
188
194
|
*/
|
|
@@ -4,6 +4,7 @@ export { WAutocomplete, WAutocompleteItem } from './WAutocomplete';
|
|
|
4
4
|
export { WBadge } from './WBadge';
|
|
5
5
|
export { WBreadcrumbs } from './WBreadcrumbs';
|
|
6
6
|
export { WButton } from './WButton';
|
|
7
|
+
export { WButtons, type WaveButtonsItem } from './WButtons';
|
|
7
8
|
export { WCard } from './WCard';
|
|
8
9
|
export { WCheckbox } from './WCheckbox';
|
|
9
10
|
export { WCheckboxes } from './WCheckboxes';
|