bitboss-ui 2.1.112 → 2.1.114
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/components/BaseCheckbox/types.d.ts +8 -0
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +1 -222
- package/dist/components/BaseCheckboxGroup/types.d.ts +283 -0
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +5 -151
- package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +1 -17
- package/dist/components/BaseColorInput/types.d.ts +233 -0
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +1 -1
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +9 -3
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +4 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index109.js +9 -9
- package/dist/index110.js +17 -17
- package/dist/index118.js +1 -1
- package/dist/index122.js +1 -0
- package/dist/index124.js +4 -4
- package/dist/index126.js +13 -13
- package/dist/index134.js +1 -1
- package/dist/index136.js +5 -5
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index144.js +1 -1
- package/dist/index146.js +2 -2
- package/dist/index148.js +1 -1
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +70 -59
- package/dist/index22.js +14 -14
- package/dist/index221.js +138 -2
- package/dist/index222.js +2 -2
- package/dist/index223.js +2 -138
- package/dist/index227.js +1 -1
- package/dist/index229.js +4 -2
- package/dist/index230.js +13 -2
- package/dist/index231.js +20 -3
- package/dist/index232.js +2 -4
- package/dist/index233.js +4 -13
- package/dist/index234.js +85 -19
- package/dist/index236.js +30 -3
- package/dist/index237.js +17 -5
- package/dist/index238.js +51 -5
- package/dist/index239.js +18 -5
- package/dist/index24.js +10 -10
- package/dist/index240.js +3 -5
- package/dist/index241.js +12 -5
- package/dist/index242.js +18 -5
- package/dist/index243.js +8 -3
- package/dist/index244.js +2 -8
- package/dist/index245.js +3 -135
- package/dist/index246.js +7 -0
- package/dist/index247.js +5 -3
- package/dist/index248.js +5 -6
- package/dist/index249.js +5 -16
- package/dist/index250.js +5 -2
- package/dist/index251.js +5 -13
- package/dist/index252.js +3 -13
- package/dist/index253.js +135 -4
- package/dist/index255.js +2 -86
- package/dist/index256.js +108 -0
- package/dist/index258.js +100 -17
- package/dist/index26.js +3 -3
- package/dist/index260.js +9 -17
- package/dist/index261.js +3 -3
- package/dist/index262.js +4 -12
- package/dist/index263.js +3 -18
- package/dist/index264.js +187 -66
- package/dist/index265.js +3 -2
- package/dist/index266.js +5 -9
- package/dist/index267.js +5 -20
- package/dist/index268.js +268 -4
- package/dist/index269.js +52 -25
- package/dist/index270.js +52 -2
- package/dist/index271.js +31 -17
- package/dist/index272.js +60 -12
- package/dist/index273.js +7 -106
- package/dist/index274.js +4 -0
- package/dist/index275.js +367 -94
- package/dist/index277.js +2 -107
- package/dist/index278.js +7 -11
- package/dist/index279.js +7 -5
- package/dist/index28.js +1 -1
- package/dist/index280.js +2 -6
- package/dist/index281.js +30 -264
- package/dist/index282.js +9 -52
- package/dist/index283.js +25 -52
- package/dist/index284.js +11 -32
- package/dist/index285.js +13 -60
- package/dist/index286.js +22 -6
- package/dist/index289.js +5 -6
- package/dist/index290.js +9 -10
- package/dist/index291.js +21 -3
- package/dist/index292.js +6 -34
- package/dist/index293.js +15 -32
- package/dist/index294.js +16 -371
- package/dist/index295.js +14 -0
- package/dist/index296.js +107 -3
- package/dist/index297.js +6 -53
- package/dist/index298.js +3 -5
- package/dist/index299.js +53 -9
- package/dist/index30.js +3 -3
- package/dist/index300.js +13 -2
- package/dist/index301.js +67 -7
- package/dist/index302.js +33 -7
- package/dist/index306.js +3 -6
- package/dist/index307.js +7 -5
- package/dist/index308.js +3 -719
- package/dist/index309.js +17 -366
- package/dist/index310.js +23 -52
- package/dist/index311.js +1 -1
- package/dist/index312.js +3 -280
- package/dist/index313.js +5 -2
- package/dist/index314.js +3 -125
- package/dist/index315.js +3 -2
- package/dist/index316.js +278 -13
- package/dist/index317.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index322.js +25 -17
- package/dist/index324.js +1 -1
- package/dist/index325.js +2 -28
- package/dist/index326.js +2 -17
- package/dist/index327.js +2 -3
- package/dist/index328.js +2 -4
- package/dist/index329.js +120 -22
- package/dist/index330.js +2 -2
- package/dist/index331.js +15 -2
- package/dist/index332.js +2 -2
- package/dist/index333.js +19 -2
- package/dist/index334.js +2 -2
- package/dist/index335.js +1 -1
- package/dist/index336.js +719 -3
- package/dist/index337.js +366 -3
- package/dist/index338.js +57 -2
- package/dist/index34.js +8 -8
- package/dist/index340.js +5 -2
- package/dist/index341.js +2 -6
- package/dist/index342.js +6 -5
- package/dist/index343.js +2 -3
- package/dist/index344.js +6 -34
- package/dist/index345.js +66 -128
- package/dist/index346.js +65 -396
- package/dist/index347.js +35 -67
- package/dist/index348.js +128 -66
- package/dist/index349.js +390 -220
- package/dist/index352.js +1 -1
- package/dist/index353.js +1 -1
- package/dist/index354.js +1 -1
- package/dist/index355.js +200 -7
- package/dist/index356.js +208 -149
- package/dist/index357.js +91 -257
- package/dist/index358.js +225 -131
- package/dist/index359.js +133 -21
- package/dist/index36.js +4 -4
- package/dist/index360.js +24 -0
- package/dist/index362.js +1 -1
- package/dist/index363.js +2 -93
- package/dist/index367.js +1 -1
- package/dist/index38.js +133 -131
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +16 -15
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index66.js +3 -1
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +4 -4
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index93.js +3 -3
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +2 -2
- package/dist/index235.js +0 -190
- package/dist/index254.js +0 -25
- package/dist/index257.js +0 -32
- package/dist/index259.js +0 -53
- package/dist/index361.js +0 -4
|
@@ -176,7 +176,15 @@ export type BaseCheckboxIconSlotProps = {
|
|
|
176
176
|
* @defaultValue `false`
|
|
177
177
|
*/
|
|
178
178
|
hasErrors: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* The `id` attribute forwarded to the native input.
|
|
181
|
+
* Mirrors `props.id`.
|
|
182
|
+
*/
|
|
179
183
|
id: BaseCheckboxProps['id'];
|
|
184
|
+
/**
|
|
185
|
+
* The `name` attribute forwarded to the native input.
|
|
186
|
+
* Mirrors `props.name`.
|
|
187
|
+
*/
|
|
180
188
|
name: BaseCheckboxProps['name'];
|
|
181
189
|
/**
|
|
182
190
|
* Serialized `trueValue` used by native form submission.
|
|
@@ -1,225 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseCheckboxIconSlotProps } from '../BaseCheckbox/types';
|
|
3
|
-
export type BaseCheckboxGroupProps<T> = {
|
|
4
|
-
/**
|
|
5
|
-
* ID of the element that describes the entire checkbox group for assistive
|
|
6
|
-
* technologies. Forwarded to each generated input as `aria-describedby`.
|
|
7
|
-
*/
|
|
8
|
-
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
9
|
-
/**
|
|
10
|
-
* Automatically focuses the first checkbox on mount when true.
|
|
11
|
-
* Applied only to the first option.
|
|
12
|
-
* @defaultValue `false`
|
|
13
|
-
*/
|
|
14
|
-
autofocus?: InputHTMLAttributes['autofocus'];
|
|
15
|
-
/**
|
|
16
|
-
* Visual color of the checkboxes.
|
|
17
|
-
* - If a valid CSS color (HEX/RGB/HSL/etc.), it is applied via the `--color`
|
|
18
|
-
* CSS variable.
|
|
19
|
-
* - Otherwise, a BEM modifier class `bb-base-checkbox--{color}` is added for
|
|
20
|
-
* theme-based styling.
|
|
21
|
-
*/
|
|
22
|
-
color?: string;
|
|
23
|
-
/**
|
|
24
|
-
* List of reactive values which, when changed, trigger items re-fetching.
|
|
25
|
-
* Useful to reload options based on external inputs.
|
|
26
|
-
* @defaultValue `[]`
|
|
27
|
-
*/
|
|
28
|
-
dependencies?: any[];
|
|
29
|
-
/**
|
|
30
|
-
* Debounce delay (ms) applied when reacting to `dependencies` changes.
|
|
31
|
-
* @defaultValue `0`
|
|
32
|
-
*/
|
|
33
|
-
depsDebounceTime?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Direction of the group layout.
|
|
36
|
-
* - `horizontal`: options flow in rows
|
|
37
|
-
* - `vertical`: options stack in a column
|
|
38
|
-
* @defaultValue `'horizontal'`
|
|
39
|
-
*/
|
|
40
|
-
direction?: 'horizontal' | 'vertical';
|
|
41
|
-
/**
|
|
42
|
-
* Disables interaction for the whole group.
|
|
43
|
-
* @defaultValue `false`
|
|
44
|
-
*/
|
|
45
|
-
disabled?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Enforces that `modelValue` contains only values present in `items`.
|
|
48
|
-
* Incoherent values are removed and `update:modelValue` is emitted with a
|
|
49
|
-
* coherent array. Please check out {@link https://ui-components-docs.vercel.app/it/guides/coherence | the docs} for more information.
|
|
50
|
-
* @defaultValue `false`
|
|
51
|
-
*/
|
|
52
|
-
enforceCoherence?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Puts the component into an error state adds the error styling class.
|
|
55
|
-
* @defaultValue `false`
|
|
56
|
-
*/
|
|
57
|
-
hasErrors?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Visually hides the label while keeping it accessible to screen readers.
|
|
60
|
-
* @defaultValue `false`
|
|
61
|
-
*/
|
|
62
|
-
hideLabel?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Identifier of the group. Used to derive per-option IDs
|
|
65
|
-
* for accessible labeling.
|
|
66
|
-
*/
|
|
67
|
-
id?: HTMLAttributes['id'];
|
|
68
|
-
/**
|
|
69
|
-
* Items provider. Can be:
|
|
70
|
-
* - An array of items
|
|
71
|
-
* - A sync/async function `(prefill, modelValue) => items`
|
|
72
|
-
*
|
|
73
|
-
* When a function is provided, it is invoked on prefill and when dependencies
|
|
74
|
-
* change to load options dynamically.
|
|
75
|
-
* @defaultValue `[]`
|
|
76
|
-
*/
|
|
77
|
-
items: T[] | ((prefill: boolean, modelValue?: any[]) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[]) => T[]);
|
|
78
|
-
/**
|
|
79
|
-
* Defines how to derive the display text from an item. Accepts a nested key path
|
|
80
|
-
* into the item or a function `(item) => string`.
|
|
81
|
-
* @example `'address.city.label'`
|
|
82
|
-
* @example `(item) => item.address.city.label`
|
|
83
|
-
* @defaultValue `JSON.stringify(item)`
|
|
84
|
-
*/
|
|
85
|
-
itemText?: T extends object ? string | ((item: T) => string) : (item: T) => string;
|
|
86
|
-
/**
|
|
87
|
-
* Defines how to derive the value from an item. Accepts a nested key path into the
|
|
88
|
-
* item or a function `(item) => any`.
|
|
89
|
-
* @example `'address.city.value'`
|
|
90
|
-
* @example `(item) => item.address.city.value`
|
|
91
|
-
* @defaultValue `JSON.stringify(item)`
|
|
92
|
-
*/
|
|
93
|
-
itemValue?: T extends object ? string | ((item: T) => string) : (item: T) => any;
|
|
94
|
-
/**
|
|
95
|
-
* Text displayed while items are loading.
|
|
96
|
-
* @defaultValue `'Loading...'`
|
|
97
|
-
*/
|
|
98
|
-
loadingText?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Maximum number of selectable items.
|
|
101
|
-
* @defaultValue `Infinity`
|
|
102
|
-
*/
|
|
103
|
-
max?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Selected values for the group. Used with `v-model`.
|
|
106
|
-
* Must be an array.
|
|
107
|
-
*/
|
|
108
|
-
modelValue: any[];
|
|
109
|
-
/**
|
|
110
|
-
* Debounce delay (ms) applied when reacting to `modelValue` changes.
|
|
111
|
-
* @defaultValue `0`
|
|
112
|
-
*/
|
|
113
|
-
modelValueDebounceTime?: number;
|
|
114
|
-
/**
|
|
115
|
-
* Name attribute applied to each input for form submission.
|
|
116
|
-
*/
|
|
117
|
-
name?: InputHTMLAttributes['name'];
|
|
118
|
-
/**
|
|
119
|
-
* Text displayed when there are no items to show.
|
|
120
|
-
* @defaultValue `'No data to display'`
|
|
121
|
-
*/
|
|
122
|
-
noDataText?: MaybeRefOrGetter<string>;
|
|
123
|
-
/**
|
|
124
|
-
* Makes all checkboxes read-only. Since checkboxes do not support native
|
|
125
|
-
* `readonly`, inputs are disabled while styled as read-only.
|
|
126
|
-
* @defaultValue `false`
|
|
127
|
-
*/
|
|
128
|
-
readonly?: boolean;
|
|
129
|
-
};
|
|
130
|
-
export type BaseCheckboxGroupEvents = {
|
|
131
|
-
(e: 'blur', event: FocusEvent): void;
|
|
132
|
-
(e: 'change', event: Event): void;
|
|
133
|
-
(e: 'click', event: MouseEvent): void;
|
|
134
|
-
(e: 'focus', event: FocusEvent): void;
|
|
135
|
-
(e: 'inactive'): void;
|
|
136
|
-
(e: 'input', event: Event): void;
|
|
137
|
-
(e: 'keydown', event: KeyboardEvent): void;
|
|
138
|
-
(e: 'mousedown', event: MouseEvent): void;
|
|
139
|
-
(e: 'mouseup', event: MouseEvent): void;
|
|
140
|
-
(e: 'update:modelValue', value: any): void;
|
|
141
|
-
};
|
|
142
|
-
export type BaseCheckboxGroupSlots<T> = {
|
|
143
|
-
/**
|
|
144
|
-
* Content rendered after the last option, inside the options container.
|
|
145
|
-
*/
|
|
146
|
-
append?: (props: object) => any;
|
|
147
|
-
/**
|
|
148
|
-
* Replaces the default checkmark icon for each checkbox option. Receives all `BaseCheckbox`
|
|
149
|
-
* slot attributes plus the source item and its display text.
|
|
150
|
-
* @param checked - Whether this option is currently checked.
|
|
151
|
-
* @param disabled - Whether this option is disabled.
|
|
152
|
-
* @param falseValue - The unchecked value for this option.
|
|
153
|
-
* @param focused - Whether this option's input currently has focus.
|
|
154
|
-
* @param focusVisible - Whether focus is keyboard-visible (`:focus-visible`).
|
|
155
|
-
* @param hasErrors - Whether the group is in an error state.
|
|
156
|
-
* @param id - The `id` of this option's input.
|
|
157
|
-
* @param name - The `name` of this option's input.
|
|
158
|
-
* @param parsedValue - The `trueValue` serialized for form submission.
|
|
159
|
-
* @param readonly - Whether this option is read-only.
|
|
160
|
-
* @param trueValue - The checked value for this option.
|
|
161
|
-
* @param value - The current effective value for this option.
|
|
162
|
-
* @param item - The raw item from the `items` prop.
|
|
163
|
-
* @param text - The display text resolved for this option.
|
|
164
|
-
*/
|
|
165
|
-
icon?: (props: BaseCheckboxIconSlotProps & {
|
|
166
|
-
item: T;
|
|
167
|
-
text: string;
|
|
168
|
-
}) => any;
|
|
169
|
-
/**
|
|
170
|
-
* Replaces the default label text for each option.
|
|
171
|
-
* @param item - The raw item from the `items` prop.
|
|
172
|
-
* @param text - The resolved display text for this option.
|
|
173
|
-
* @param checked - Whether this option is currently checked.
|
|
174
|
-
*/
|
|
175
|
-
label?: (props: {
|
|
176
|
-
item: T;
|
|
177
|
-
text: string;
|
|
178
|
-
checked: boolean;
|
|
179
|
-
}) => any;
|
|
180
|
-
/**
|
|
181
|
-
* Content shown while options are loading (replaces the default loading text).
|
|
182
|
-
*/
|
|
183
|
-
loading?: (props: object) => any;
|
|
184
|
-
/**
|
|
185
|
-
* Content shown when no options are available (replaces the default "no data" text).
|
|
186
|
-
*/
|
|
187
|
-
'no-data'?: (props: object) => any;
|
|
188
|
-
/**
|
|
189
|
-
* Content rendered after each option's checkbox and label.
|
|
190
|
-
* @param checked - Whether this option is currently checked.
|
|
191
|
-
* @param disabled - Whether this option is disabled.
|
|
192
|
-
* @param id - The `id` of this option's input, if set.
|
|
193
|
-
* @param item - The raw item from the `items` prop.
|
|
194
|
-
* @param text - The display text for this option.
|
|
195
|
-
*/
|
|
196
|
-
'option:append'?: (props: {
|
|
197
|
-
checked: boolean;
|
|
198
|
-
disabled: boolean;
|
|
199
|
-
id?: string;
|
|
200
|
-
item: T;
|
|
201
|
-
text: string;
|
|
202
|
-
}) => any;
|
|
203
|
-
/**
|
|
204
|
-
* Content rendered before each option's checkbox.
|
|
205
|
-
* @param checked - Whether this option is currently checked.
|
|
206
|
-
* @param disabled - Whether this option is disabled.
|
|
207
|
-
* @param id - The `id` of this option's input, if set.
|
|
208
|
-
* @param item - The raw item from the `items` prop.
|
|
209
|
-
* @param text - The display text for this option.
|
|
210
|
-
*/
|
|
211
|
-
'option:prepend'?: (props: {
|
|
212
|
-
checked: boolean;
|
|
213
|
-
disabled: boolean;
|
|
214
|
-
id?: string;
|
|
215
|
-
item: T;
|
|
216
|
-
text: string;
|
|
217
|
-
}) => any;
|
|
218
|
-
/**
|
|
219
|
-
* Content rendered before the first option, inside the options container.
|
|
220
|
-
*/
|
|
221
|
-
prepend?: (props: object) => any;
|
|
222
|
-
};
|
|
1
|
+
import { BaseCheckboxGroupEvents, BaseCheckboxGroupProps, BaseCheckboxGroupSlots } from './types';
|
|
223
2
|
declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
224
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
225
4
|
readonly onInput?: ((event: Event) => any) | undefined;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { HTMLAttributes, InputHTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { BaseCheckboxIconSlotProps } from '../BaseCheckbox/types';
|
|
3
|
+
export type BaseCheckboxGroupProps<T = any> = {
|
|
4
|
+
/**
|
|
5
|
+
* ID of the element that describes the entire checkbox group for assistive
|
|
6
|
+
* technologies. Forwarded to each generated input as `aria-describedby`.
|
|
7
|
+
*/
|
|
8
|
+
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
9
|
+
/**
|
|
10
|
+
* Automatically focuses the first checkbox on mount when true.
|
|
11
|
+
* Applied only to the first option.
|
|
12
|
+
* @defaultValue `false`
|
|
13
|
+
*/
|
|
14
|
+
autofocus?: InputHTMLAttributes['autofocus'];
|
|
15
|
+
/**
|
|
16
|
+
* Visual color of the checkboxes.
|
|
17
|
+
* - If a valid CSS color (HEX/RGB/HSL/etc.), it is applied via the `--color`
|
|
18
|
+
* CSS variable.
|
|
19
|
+
* - Otherwise, a BEM modifier class `bb-base-checkbox--{color}` is added for
|
|
20
|
+
* theme-based styling.
|
|
21
|
+
*/
|
|
22
|
+
color?: string;
|
|
23
|
+
/**
|
|
24
|
+
* List of reactive values which, when changed, trigger items re-fetching.
|
|
25
|
+
* Useful to reload options based on external inputs.
|
|
26
|
+
* @defaultValue `[]`
|
|
27
|
+
*/
|
|
28
|
+
dependencies?: any[];
|
|
29
|
+
/**
|
|
30
|
+
* Debounce delay (ms) applied when reacting to `dependencies` changes.
|
|
31
|
+
* @defaultValue `0`
|
|
32
|
+
*/
|
|
33
|
+
depsDebounceTime?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Direction of the group layout.
|
|
36
|
+
* - `horizontal`: options flow in rows
|
|
37
|
+
* - `vertical`: options stack in a column
|
|
38
|
+
* @defaultValue `'horizontal'`
|
|
39
|
+
*/
|
|
40
|
+
direction?: 'horizontal' | 'vertical';
|
|
41
|
+
/**
|
|
42
|
+
* Disables interaction for the whole group.
|
|
43
|
+
* @defaultValue `false`
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Enforces that `modelValue` contains only values present in `items`.
|
|
48
|
+
* Incoherent values are removed and `update:modelValue` is emitted with a
|
|
49
|
+
* coherent array. Please check out {@link https://ui-components-docs.vercel.app/it/guides/coherence | the docs} for more information.
|
|
50
|
+
* @defaultValue `false`
|
|
51
|
+
*/
|
|
52
|
+
enforceCoherence?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Puts the component into an error state adds the error styling class.
|
|
55
|
+
* @defaultValue `false`
|
|
56
|
+
*/
|
|
57
|
+
hasErrors?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Visually hides the label while keeping it accessible to screen readers.
|
|
60
|
+
* @defaultValue `false`
|
|
61
|
+
*/
|
|
62
|
+
hideLabel?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Identifier of the group. Used to derive per-option IDs
|
|
65
|
+
* for accessible labeling.
|
|
66
|
+
*/
|
|
67
|
+
id?: HTMLAttributes['id'];
|
|
68
|
+
/**
|
|
69
|
+
* Items provider. Can be:
|
|
70
|
+
* - An array of items
|
|
71
|
+
* - A sync/async function `(prefill, modelValue) => items`
|
|
72
|
+
*
|
|
73
|
+
* When a function is provided, it is invoked on prefill and when dependencies
|
|
74
|
+
* change to load options dynamically.
|
|
75
|
+
* @defaultValue `[]`
|
|
76
|
+
*/
|
|
77
|
+
items: T[] | ((prefill: boolean, modelValue?: any) => Promise<T[]>) | ((prefill: boolean, modelValue?: any) => T[]);
|
|
78
|
+
/**
|
|
79
|
+
* Defines how to derive the display text from an item. Accepts a nested key path
|
|
80
|
+
* into the item or a function `(item) => string`.
|
|
81
|
+
* @example `'address.city.label'`
|
|
82
|
+
* @example `(item) => item.address.city.label`
|
|
83
|
+
* @defaultValue `JSON.stringify(item)`
|
|
84
|
+
*/
|
|
85
|
+
itemText?: T extends object ? string | ((item: T) => string) : (item: T) => string;
|
|
86
|
+
/**
|
|
87
|
+
* Defines how to derive the value from an item. Accepts a nested key path into the
|
|
88
|
+
* item or a function `(item) => any`.
|
|
89
|
+
* @example `'address.city.value'`
|
|
90
|
+
* @example `(item) => item.address.city.value`
|
|
91
|
+
* @defaultValue `JSON.stringify(item)`
|
|
92
|
+
*/
|
|
93
|
+
itemValue?: T extends object ? string | ((item: T) => string) : (item: T) => any;
|
|
94
|
+
/**
|
|
95
|
+
* Text displayed while items are loading.
|
|
96
|
+
* @defaultValue `'Loading...'`
|
|
97
|
+
*/
|
|
98
|
+
loadingText?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Maximum number of selectable items.
|
|
101
|
+
* @defaultValue `Infinity`
|
|
102
|
+
*/
|
|
103
|
+
max?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Selected values for the group. Used with `v-model`.
|
|
106
|
+
* Single value when `multiple` is false, array when `multiple` is true.
|
|
107
|
+
*/
|
|
108
|
+
modelValue: any;
|
|
109
|
+
/**
|
|
110
|
+
* Enables multi-selection behavior.
|
|
111
|
+
* When `true`, `modelValue` must be an array and emitted updates are arrays.
|
|
112
|
+
* When `false`, `modelValue` must be a single value (or `null`) and emitted
|
|
113
|
+
* updates are single values.
|
|
114
|
+
* @defaultValue `true`
|
|
115
|
+
*/
|
|
116
|
+
multiple?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Debounce delay (ms) applied when reacting to `modelValue` changes.
|
|
119
|
+
* @defaultValue `0`
|
|
120
|
+
*/
|
|
121
|
+
modelValueDebounceTime?: number;
|
|
122
|
+
/**
|
|
123
|
+
* Name attribute applied to each input for form submission.
|
|
124
|
+
*/
|
|
125
|
+
name?: InputHTMLAttributes['name'];
|
|
126
|
+
/**
|
|
127
|
+
* Text displayed when there are no items to show.
|
|
128
|
+
* @defaultValue `'No data to display'`
|
|
129
|
+
*/
|
|
130
|
+
noDataText?: MaybeRefOrGetter<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Makes all checkboxes read-only. Since checkboxes do not support native
|
|
133
|
+
* `readonly`, inputs are disabled while styled as read-only.
|
|
134
|
+
* @defaultValue `false`
|
|
135
|
+
*/
|
|
136
|
+
readonly?: boolean;
|
|
137
|
+
};
|
|
138
|
+
export type BaseCheckboxGroupEvents = {
|
|
139
|
+
/**
|
|
140
|
+
* Emitted when one of the generated checkbox inputs loses focus.
|
|
141
|
+
* Forwards the original DOM `FocusEvent`.
|
|
142
|
+
*/
|
|
143
|
+
(e: 'blur', event: FocusEvent): void;
|
|
144
|
+
/**
|
|
145
|
+
* Emitted when a checkbox option is toggled.
|
|
146
|
+
* Forwards the original DOM `Event` from the checkbox input.
|
|
147
|
+
*/
|
|
148
|
+
(e: 'change', event: Event): void;
|
|
149
|
+
/**
|
|
150
|
+
* Emitted when one of the generated checkbox inputs is clicked.
|
|
151
|
+
* Forwards the original DOM `MouseEvent`.
|
|
152
|
+
*/
|
|
153
|
+
(e: 'click', event: MouseEvent): void;
|
|
154
|
+
/**
|
|
155
|
+
* Emitted when one of the generated checkbox inputs receives focus.
|
|
156
|
+
* Forwards the original DOM `FocusEvent`.
|
|
157
|
+
*/
|
|
158
|
+
(e: 'focus', event: FocusEvent): void;
|
|
159
|
+
/**
|
|
160
|
+
* Emitted when focus/click moves outside the group after it was active.
|
|
161
|
+
* Useful for validation-on-blur flows at group level.
|
|
162
|
+
*/
|
|
163
|
+
(e: 'inactive'): void;
|
|
164
|
+
/**
|
|
165
|
+
* Emitted on native input events from generated checkbox inputs.
|
|
166
|
+
* Forwards the original DOM `Event`.
|
|
167
|
+
*/
|
|
168
|
+
(e: 'input', event: Event): void;
|
|
169
|
+
/**
|
|
170
|
+
* Emitted for keyboard interaction on generated checkbox inputs.
|
|
171
|
+
* Forwards the original DOM `KeyboardEvent`.
|
|
172
|
+
*/
|
|
173
|
+
(e: 'keydown', event: KeyboardEvent): void;
|
|
174
|
+
/**
|
|
175
|
+
* Emitted when a pointing device button is pressed over a checkbox input.
|
|
176
|
+
* Forwards the original DOM `MouseEvent`.
|
|
177
|
+
*/
|
|
178
|
+
(e: 'mousedown', event: MouseEvent): void;
|
|
179
|
+
/**
|
|
180
|
+
* Emitted when a pointing device button is released over a checkbox input.
|
|
181
|
+
* Forwards the original DOM `MouseEvent`.
|
|
182
|
+
*/
|
|
183
|
+
(e: 'mouseup', event: MouseEvent): void;
|
|
184
|
+
/**
|
|
185
|
+
* Emitted with the coherent next selection array whenever selection changes.
|
|
186
|
+
*/
|
|
187
|
+
(e: 'update:modelValue', value: any): void;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Marker type for slots that do not expose scoped props.
|
|
191
|
+
*/
|
|
192
|
+
type BaseCheckboxGroupEmptySlotProps = Record<string, never>;
|
|
193
|
+
/**
|
|
194
|
+
* Props exposed by the `icon` slot for each option.
|
|
195
|
+
*/
|
|
196
|
+
type BaseCheckboxGroupIconSlotProps<T> = BaseCheckboxIconSlotProps & {
|
|
197
|
+
/**
|
|
198
|
+
* Original source item for this option.
|
|
199
|
+
*/
|
|
200
|
+
item: T;
|
|
201
|
+
/**
|
|
202
|
+
* Resolved display text for this option.
|
|
203
|
+
*/
|
|
204
|
+
text: string;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Props exposed by the `label` slot for each option.
|
|
208
|
+
*/
|
|
209
|
+
type BaseCheckboxGroupLabelSlotProps<T> = {
|
|
210
|
+
/**
|
|
211
|
+
* Original source item for this option.
|
|
212
|
+
*/
|
|
213
|
+
item: T;
|
|
214
|
+
/**
|
|
215
|
+
* Resolved display text for this option.
|
|
216
|
+
*/
|
|
217
|
+
text: string;
|
|
218
|
+
/**
|
|
219
|
+
* Whether this option is currently selected.
|
|
220
|
+
*/
|
|
221
|
+
checked: boolean;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Props exposed by option affix slots (`option:prepend` / `option:append`).
|
|
225
|
+
*/
|
|
226
|
+
type BaseCheckboxGroupOptionAffixSlotProps<T> = {
|
|
227
|
+
/**
|
|
228
|
+
* Whether this option is currently selected.
|
|
229
|
+
*/
|
|
230
|
+
checked: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Whether this option is currently disabled.
|
|
233
|
+
*/
|
|
234
|
+
disabled: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Generated id for the underlying checkbox input, when available.
|
|
237
|
+
*/
|
|
238
|
+
id?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Original source item for this option.
|
|
241
|
+
*/
|
|
242
|
+
item: T;
|
|
243
|
+
/**
|
|
244
|
+
* Resolved display text for this option.
|
|
245
|
+
*/
|
|
246
|
+
text: string;
|
|
247
|
+
};
|
|
248
|
+
export type BaseCheckboxGroupSlots<T> = {
|
|
249
|
+
/**
|
|
250
|
+
* Content rendered after the last option, inside the options container.
|
|
251
|
+
*/
|
|
252
|
+
append?: (props: BaseCheckboxGroupEmptySlotProps) => any;
|
|
253
|
+
/**
|
|
254
|
+
* Replaces the default checkmark icon for each checkbox option. Receives all `BaseCheckbox`
|
|
255
|
+
* slot attributes plus the source item and its display text.
|
|
256
|
+
*/
|
|
257
|
+
icon?: (props: BaseCheckboxGroupIconSlotProps<T>) => any;
|
|
258
|
+
/**
|
|
259
|
+
* Replaces the default label text for each option.
|
|
260
|
+
*/
|
|
261
|
+
label?: (props: BaseCheckboxGroupLabelSlotProps<T>) => any;
|
|
262
|
+
/**
|
|
263
|
+
* Content shown while options are loading (replaces the default loading text).
|
|
264
|
+
*/
|
|
265
|
+
loading?: (props: BaseCheckboxGroupEmptySlotProps) => any;
|
|
266
|
+
/**
|
|
267
|
+
* Content shown when no options are available (replaces the default "no data" text).
|
|
268
|
+
*/
|
|
269
|
+
'no-data'?: (props: BaseCheckboxGroupEmptySlotProps) => any;
|
|
270
|
+
/**
|
|
271
|
+
* Content rendered after each option's checkbox and label.
|
|
272
|
+
*/
|
|
273
|
+
'option:append'?: (props: BaseCheckboxGroupOptionAffixSlotProps<T>) => any;
|
|
274
|
+
/**
|
|
275
|
+
* Content rendered before each option's checkbox.
|
|
276
|
+
*/
|
|
277
|
+
'option:prepend'?: (props: BaseCheckboxGroupOptionAffixSlotProps<T>) => any;
|
|
278
|
+
/**
|
|
279
|
+
* Content rendered before the first option, inside the options container.
|
|
280
|
+
*/
|
|
281
|
+
prepend?: (props: BaseCheckboxGroupEmptySlotProps) => any;
|
|
282
|
+
};
|
|
283
|
+
export {};
|
|
@@ -1,150 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconType } from '../../types/Icon';
|
|
3
|
-
/**
|
|
4
|
-
* Color input with hex value masking and an optional palette popover.
|
|
5
|
-
* Accepts and emits `#RRGGBB` (or `#RRGGBBAA` when `alpha` is enabled) values via v-model
|
|
6
|
-
* and supports full input chrome slots.
|
|
7
|
-
*/
|
|
8
|
-
export type BaseColorInputProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Enable the alpha channel. When true the picker shows an opacity slider and
|
|
11
|
-
* emits / accepts `#RRGGBBAA` hex8 values.
|
|
12
|
-
*/
|
|
13
|
-
alpha?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Name of the icon to render at the right hand side of the input.
|
|
16
|
-
*/
|
|
17
|
-
'append:icon'?: IconType;
|
|
18
|
-
/**
|
|
19
|
-
* Id(s) of element(s) describing this input for assistive tech (space-separated).
|
|
20
|
-
* Typically includes the container hint id if used within a BaseInputContainer.
|
|
21
|
-
*/
|
|
22
|
-
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
23
|
-
/**
|
|
24
|
-
* Autocomplete hint for the browser.
|
|
25
|
-
* @default 'off'
|
|
26
|
-
*/
|
|
27
|
-
autocomplete?: InputHTMLAttributes['autocomplete'];
|
|
28
|
-
/**
|
|
29
|
-
* Focus the input on mount.
|
|
30
|
-
*/
|
|
31
|
-
autofocus?: InputHTMLAttributes['autofocus'];
|
|
32
|
-
/**
|
|
33
|
-
* Show a clear button when the input has a value.
|
|
34
|
-
*/
|
|
35
|
-
clearable?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Display the component in a compact layout.
|
|
38
|
-
*/
|
|
39
|
-
compact?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Disable all interactions.
|
|
42
|
-
*/
|
|
43
|
-
disabled?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Visually mark the component as invalid (also sets aria-invalid on the input).
|
|
46
|
-
*/
|
|
47
|
-
hasErrors?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* The id attribute for the input element. Defaults to a generated `bb_<unique>` id when omitted.
|
|
50
|
-
*/
|
|
51
|
-
id?: HTMLAttributes['id'];
|
|
52
|
-
/**
|
|
53
|
-
* Display the loading state.
|
|
54
|
-
*/
|
|
55
|
-
loading?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* v-model value: `#RRGGBB` hex string or `null` when empty.
|
|
58
|
-
* Example: `#1A2B3C`
|
|
59
|
-
*/
|
|
60
|
-
modelValue: string | null;
|
|
61
|
-
/**
|
|
62
|
-
* Name attribute of the input.
|
|
63
|
-
*/
|
|
64
|
-
name?: InputHTMLAttributes['name'];
|
|
65
|
-
/**
|
|
66
|
-
* Placeholder text when there is no value.
|
|
67
|
-
*/
|
|
68
|
-
placeholder?: InputHTMLAttributes['placeholder'];
|
|
69
|
-
/**
|
|
70
|
-
* Name of the icon to render at the start of the input.
|
|
71
|
-
*/
|
|
72
|
-
'prepend:icon'?: IconType;
|
|
73
|
-
/**
|
|
74
|
-
* Make the input read-only.
|
|
75
|
-
*/
|
|
76
|
-
readonly?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Mark the input as required.
|
|
79
|
-
*/
|
|
80
|
-
required?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Show an eyedropper button to sample any color on screen.
|
|
83
|
-
* Uses the native EyeDropper API — hidden automatically on unsupported browsers.
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
picker?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Controls swatches display in the picker:
|
|
89
|
-
* - `true` — show the built-in Material-palette swatches
|
|
90
|
-
* - `string[][]` — show custom swatches (each inner array = a column of shades)
|
|
91
|
-
* - `false` / omitted — no swatches section
|
|
92
|
-
*/
|
|
93
|
-
swatches?: boolean | string[][];
|
|
94
|
-
/**
|
|
95
|
-
* Transition duration (ms) of the palette popover.
|
|
96
|
-
* @default 250
|
|
97
|
-
*/
|
|
98
|
-
transitionDuration?: number;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Events emitted by the color input.
|
|
102
|
-
* - blur/change/click/focus/input/keydown/mousedown/mouseup: native input events (payload: original event)
|
|
103
|
-
* - update:modelValue: emits `#RRGGBB` when valid, `null` when cleared/invalid
|
|
104
|
-
*/
|
|
105
|
-
export type BaseColorInputEvents = {
|
|
106
|
-
(e: 'blur', event: FocusEvent): void;
|
|
107
|
-
(e: 'change', event: Event): void;
|
|
108
|
-
(e: 'click', event: MouseEvent): void;
|
|
109
|
-
(e: 'focus', event: FocusEvent): void;
|
|
110
|
-
(e: 'input', event: Event): void;
|
|
111
|
-
(e: 'keydown', event: KeyboardEvent): void;
|
|
112
|
-
(e: 'mousedown', event: MouseEvent): void;
|
|
113
|
-
(e: 'mouseup', event: MouseEvent): void;
|
|
114
|
-
(e: 'update:modelValue', value: string | null): void;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Slots to customize the input chrome.
|
|
118
|
-
* Use `prepend`/`append` for inline adornments; `prepend-outer`/`append-outer` for the outer container areas.
|
|
119
|
-
*/
|
|
120
|
-
export type BaseColorInputSlots = {
|
|
121
|
-
/**
|
|
122
|
-
* Content rendered after the color picker indicator button, at the end of the inner container.
|
|
123
|
-
* When provided, replaces the default suffix wrapper (use the `suffix` slot if you only need inline trailing text).
|
|
124
|
-
*/
|
|
125
|
-
append?: (props: object) => any;
|
|
126
|
-
/**
|
|
127
|
-
* Content rendered after the entire input control, outside the input chrome.
|
|
128
|
-
*/
|
|
129
|
-
'append-outer'?: (props: object) => any;
|
|
130
|
-
/**
|
|
131
|
-
* Inline content rendered at the start of the input field area, before the typed text.
|
|
132
|
-
*/
|
|
133
|
-
prefix?: (props: object) => any;
|
|
134
|
-
/**
|
|
135
|
-
* Content rendered before the text input, at the start of the inner container.
|
|
136
|
-
*/
|
|
137
|
-
prepend?: (props: object) => any;
|
|
138
|
-
/**
|
|
139
|
-
* Content rendered before the entire input control, outside the input chrome.
|
|
140
|
-
*/
|
|
141
|
-
'prepend-outer'?: (props: object) => any;
|
|
142
|
-
/**
|
|
143
|
-
* Inline content rendered at the end of the input field area, after the typed text.
|
|
144
|
-
* Renders inside the default `append` area's suffix wrapper.
|
|
145
|
-
*/
|
|
146
|
-
suffix?: (props: object) => any;
|
|
147
|
-
};
|
|
1
|
+
import { BaseColorInputProps, BaseColorInputSlots } from './types';
|
|
148
2
|
declare function __VLS_template(): {
|
|
149
3
|
attrs: Partial<{}>;
|
|
150
4
|
slots: Readonly<BaseColorInputSlots> & BaseColorInputSlots;
|
|
@@ -202,9 +56,9 @@ declare function __VLS_template(): {
|
|
|
202
56
|
$: import('vue').ComponentInternalInstance;
|
|
203
57
|
$data: {};
|
|
204
58
|
$props: {
|
|
205
|
-
readonly 'append:icon'?: IconType | undefined;
|
|
59
|
+
readonly 'append:icon'?: import('../..').IconType | undefined;
|
|
206
60
|
readonly clearable?: boolean | undefined;
|
|
207
|
-
readonly 'prepend:icon'?: IconType | undefined;
|
|
61
|
+
readonly 'prepend:icon'?: import('../..').IconType | undefined;
|
|
208
62
|
readonly preventFocus?: boolean | undefined;
|
|
209
63
|
readonly "onClick:clear"?: (() => any) | undefined;
|
|
210
64
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
@@ -347,9 +201,9 @@ declare const __VLS_component: import('vue').DefineComponent<BaseColorInputProps
|
|
|
347
201
|
$: import('vue').ComponentInternalInstance;
|
|
348
202
|
$data: {};
|
|
349
203
|
$props: {
|
|
350
|
-
readonly 'append:icon'?: IconType | undefined;
|
|
204
|
+
readonly 'append:icon'?: import('../..').IconType | undefined;
|
|
351
205
|
readonly clearable?: boolean | undefined;
|
|
352
|
-
readonly 'prepend:icon'?: IconType | undefined;
|
|
206
|
+
readonly 'prepend:icon'?: import('../..').IconType | undefined;
|
|
353
207
|
readonly preventFocus?: boolean | undefined;
|
|
354
208
|
readonly "onClick:clear"?: (() => any) | undefined;
|
|
355
209
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|