bitboss-ui 2.1.44 → 2.1.46
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/BaseButton/BaseButton.vue.d.ts +92 -14
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +45 -21
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +74 -41
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +35 -19
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +7 -3
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +4 -3
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +54 -33
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +79 -19
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +31 -21
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +37 -23
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +22 -16
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +30 -23
- package/dist/components/BaseRating/BaseRating.vue.d.ts +24 -10
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +62 -55
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +38 -17
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +8 -0
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +4 -0
- package/dist/components/BaseTag/BaseTag.vue.d.ts +40 -23
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +35 -21
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +32 -19
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +8 -4
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +2 -2
- package/dist/components/Transitions/Slide.vue.d.ts +1 -1
- package/dist/index106.js +9 -9
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +11 -11
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +6 -6
- package/dist/index133.js +1 -1
- package/dist/index139.js +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.js +1 -1
- package/dist/index142.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +5 -5
- package/dist/index19.js +8 -8
- package/dist/index21.js +88 -83
- package/dist/index212.js +138 -2
- package/dist/index213.js +2 -138
- package/dist/index214.js +2 -2
- package/dist/index215.js +34 -2
- package/dist/index216.js +13 -4
- package/dist/index217.js +13 -2
- package/dist/index218.js +13 -13
- package/dist/index219.js +5 -4
- package/dist/index220.js +5 -20
- package/dist/index221.js +5 -197
- package/dist/index222.js +7 -0
- package/dist/index223.js +5 -121
- package/dist/index224.js +7 -0
- package/dist/index225.js +2 -34
- package/dist/index226.js +3 -11
- package/dist/index227.js +19 -7
- package/dist/index228.js +117 -82
- package/dist/index23.js +143 -125
- package/dist/index230.js +86 -29
- package/dist/index232.js +26 -48
- package/dist/index233.js +14 -12
- package/dist/index234.js +51 -3
- package/dist/index235.js +14 -11
- package/dist/index236.js +3 -16
- package/dist/index237.js +12 -2
- package/dist/index238.js +16 -106
- package/dist/index239.js +7 -0
- package/dist/index240.js +5 -100
- package/dist/index241.js +4 -0
- package/dist/index242.js +8 -2
- package/dist/index243.js +271 -2
- package/dist/index244.js +52 -5
- package/dist/index245.js +44 -5
- package/dist/index246.js +4 -4
- package/dist/index247.js +60 -5
- package/dist/index248.js +4 -5
- package/dist/index249.js +197 -5
- package/dist/index25.js +10 -10
- package/dist/index251.js +3 -2
- package/dist/index252.js +6 -6
- package/dist/index253.js +2 -7
- package/dist/index254.js +2 -13
- package/dist/index255.js +4 -13
- package/dist/index256.js +18 -178
- package/dist/index257.js +7 -16
- package/dist/index258.js +23 -12
- package/dist/index259.js +2 -229
- package/dist/index260.js +7 -3
- package/dist/index261.js +6 -8
- package/dist/index262.js +6 -5
- package/dist/index263.js +16 -5
- package/dist/index264.js +180 -247
- package/dist/index265.js +4 -52
- package/dist/index266.js +2 -44
- package/dist/index267.js +18 -5
- package/dist/index268.js +12 -60
- package/dist/index269.js +104 -7
- package/dist/index27.js +1 -1
- package/dist/index271.js +100 -4
- package/dist/index273.js +229 -10
- package/dist/index274.js +9 -3
- package/dist/index275.js +3 -3
- package/dist/index276.js +10 -8
- package/dist/index277.js +10 -23
- package/dist/index278.js +3 -6
- package/dist/index279.js +8 -15
- package/dist/index280.js +8 -7
- package/dist/index282.js +1 -1
- package/dist/index285.js +5 -67
- package/dist/index286.js +67 -5
- package/dist/index287.js +5 -4
- package/dist/index29.js +3 -3
- package/dist/index290.js +2 -7
- package/dist/index303.js +1 -1
- package/dist/index304.js +7 -3
- package/dist/index305.js +3 -17
- package/dist/index306.js +3 -28
- package/dist/index307.js +17 -2
- package/dist/index308.js +28 -3
- package/dist/index309.js +19 -3
- package/dist/index31.js +2 -2
- package/dist/index310.js +2 -3
- package/dist/index311.js +27 -5
- package/dist/index312.js +2 -2
- package/dist/index313.js +2 -19
- package/dist/index314.js +2 -2
- package/dist/index315.js +2 -27
- package/dist/index316.js +2 -2
- package/dist/index317.js +21 -1
- package/dist/index319.js +4 -2
- package/dist/index320.js +718 -2
- package/dist/index321.js +366 -22
- package/dist/index322.js +60 -0
- package/dist/index323.js +4 -4
- package/dist/index324.js +3 -718
- package/dist/index325.js +3 -366
- package/dist/index326.js +2 -58
- package/dist/index327.js +5 -4
- package/dist/index328.js +34 -7
- package/dist/index329.js +6 -2
- package/dist/index33.js +8 -8
- package/dist/index330.js +128 -5
- package/dist/index331.js +364 -30
- package/dist/index332.js +5 -6
- package/dist/index333.js +7 -128
- package/dist/index334.js +56 -367
- package/dist/index335.js +33 -33
- package/dist/index336.js +2 -58
- package/dist/index337.js +92 -7
- package/dist/index338.js +7 -5
- package/dist/index339.js +6 -8
- package/dist/index340.js +8 -47
- package/dist/index341.js +6 -227
- package/dist/index342.js +18 -6
- package/dist/index343.js +5 -17
- package/dist/index344.js +128 -6
- package/dist/index345.js +44 -126
- package/dist/index346.js +222 -482
- package/dist/index347.js +480 -85
- package/dist/index35.js +52 -50
- package/dist/index350.js +3 -49
- package/dist/index351.js +49 -3
- package/dist/index37.js +18 -18
- package/dist/index39.js +132 -131
- package/dist/index41.js +4 -4
- package/dist/index43.js +8 -8
- package/dist/index45.js +6 -6
- package/dist/index49.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +3 -3
- package/dist/index67.js +1 -1
- package/dist/index75.js +14 -11
- package/dist/index77.js +7 -7
- package/dist/index79.js +6 -6
- package/dist/index81.js +1 -1
- package/dist/index83.js +2 -2
- package/dist/index85.js +3 -3
- package/dist/index87.js +1 -1
- package/dist/index90.js +3 -3
- package/dist/index92.js +2 -2
- package/dist/index94.js +25 -25
- package/dist/index96.js +1 -1
- package/dist/utilities/functions/empty.d.ts +1 -5
- package/dist/utilities/functions/max.d.ts +2 -0
- package/package.json +1 -1
- package/dist/index231.js +0 -19
- package/dist/index250.js +0 -4
- package/dist/index270.js +0 -10
- package/dist/index272.js +0 -25
- package/dist/index318.js +0 -4
|
@@ -1,75 +1,153 @@
|
|
|
1
1
|
import { RouteLocationRaw } from 'vue-router';
|
|
2
2
|
export type BaseButtonProps = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* CSS class applied when the component renders as a router link (`to` provided)
|
|
5
|
+
* and the target route is active.
|
|
6
|
+
*
|
|
7
|
+
* When using Vue Router this mirrors the behavior of `RouterLink`'s
|
|
8
|
+
* `activeClass`.
|
|
5
9
|
*/
|
|
6
10
|
activeClass?: string;
|
|
7
11
|
/**
|
|
8
|
-
* Value
|
|
12
|
+
* Value forwarded to the `aria-current` attribute when the component renders
|
|
13
|
+
* as a router link and the target route is an exact match.
|
|
9
14
|
*
|
|
15
|
+
* Use to communicate the current location to assistive technologies.
|
|
10
16
|
* @defaultValue `'page'`
|
|
11
17
|
*/
|
|
12
18
|
ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
20
|
+
* Makes the component take the full available width (block-level layout).
|
|
21
|
+
* Adds the `base-btn--block` modifier class.
|
|
15
22
|
*/
|
|
16
23
|
block?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Request payload forwarded to Inertia when navigating via `href` in an
|
|
26
|
+
* Inertia-enabled app. Ignored when not using Inertia.
|
|
27
|
+
*/
|
|
17
28
|
data?: object;
|
|
18
29
|
/**
|
|
19
|
-
* Disables
|
|
30
|
+
* Disables user interaction.
|
|
31
|
+
*
|
|
32
|
+
* - When rendering as a native button, sets the `disabled` attribute.
|
|
33
|
+
* - When rendering as a link (anchor/Inertia), removes `href`, adds
|
|
34
|
+
* `aria-disabled="true"`, and prevents navigation while keeping focusable
|
|
35
|
+
* semantics consistent.
|
|
20
36
|
*/
|
|
21
37
|
disabled?: boolean;
|
|
22
38
|
/**
|
|
23
|
-
*
|
|
39
|
+
* CSS class applied when the component renders as a router link and the
|
|
40
|
+
* target route is an exact match.
|
|
41
|
+
*
|
|
42
|
+
* Mirrors `RouterLink`'s `exactActiveClass` behavior.
|
|
24
43
|
*/
|
|
25
44
|
exactActiveClass?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Additional HTTP headers forwarded to Inertia when navigating via `href`
|
|
47
|
+
* in an Inertia-enabled app.
|
|
48
|
+
*/
|
|
26
49
|
headers?: object;
|
|
27
50
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
51
|
+
* Hyperlink reference used when rendering as an anchor (or as an Inertia
|
|
52
|
+
* link in Inertia-enabled apps). If provided and not disabled, the component
|
|
53
|
+
* renders as an anchor/Inertia link.
|
|
31
54
|
*/
|
|
32
55
|
href?: HTMLAnchorElement['href'];
|
|
56
|
+
/**
|
|
57
|
+
* HTTP method used for Inertia navigation when `href` is provided in an
|
|
58
|
+
* Inertia-enabled app. Ignored otherwise.
|
|
59
|
+
*/
|
|
33
60
|
method?: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
61
|
+
/**
|
|
62
|
+
* Lifecycle hook invoked by Inertia right before the request is sent.
|
|
63
|
+
*/
|
|
34
64
|
onBefore?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Lifecycle hook invoked by Inertia when a request is cancelled.
|
|
67
|
+
*/
|
|
35
68
|
onCancel?: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Receives the Inertia cancel token source when a request is initiated.
|
|
71
|
+
* Can be used to cancel the request.
|
|
72
|
+
*/
|
|
36
73
|
onCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Lifecycle hook invoked by Inertia after the request has finished
|
|
76
|
+
* (regardless of success or error).
|
|
77
|
+
*/
|
|
37
78
|
onFinish?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Limits the properties that are preserved in Inertia partial reloads.
|
|
81
|
+
*/
|
|
38
82
|
only?: string[];
|
|
83
|
+
/**
|
|
84
|
+
* Progress callback invoked by Inertia with the upload/download percentage
|
|
85
|
+
* when available.
|
|
86
|
+
*/
|
|
39
87
|
onProgress?: (progress: {
|
|
40
88
|
percentage: number | undefined;
|
|
41
89
|
}) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Lifecycle hook invoked by Inertia when a request starts.
|
|
92
|
+
*/
|
|
42
93
|
onStart?: () => void;
|
|
94
|
+
/**
|
|
95
|
+
* Lifecycle hook invoked by Inertia when a request succeeds.
|
|
96
|
+
*/
|
|
43
97
|
onSuccess?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* Controls whether Inertia should preserve the current scroll position after
|
|
100
|
+
* navigation. Can be a boolean or a predicate receiving the visit props.
|
|
101
|
+
* @defaultValue `false`
|
|
102
|
+
*/
|
|
44
103
|
preserveScroll?: boolean | ((props: {
|
|
45
104
|
[key: string]: unknown;
|
|
46
105
|
}) => boolean);
|
|
106
|
+
/**
|
|
107
|
+
* Controls whether Inertia should preserve the current state after navigation.
|
|
108
|
+
* Can be a boolean or a predicate receiving the visit props.
|
|
109
|
+
* @defaultValue `false`
|
|
110
|
+
*/
|
|
47
111
|
preserveState?: boolean | ((props: {
|
|
48
112
|
[key: string]: unknown;
|
|
49
113
|
}) => boolean) | null;
|
|
114
|
+
/**
|
|
115
|
+
* Format to use when serializing array values into the query string for
|
|
116
|
+
* Inertia requests.
|
|
117
|
+
*/
|
|
50
118
|
queryStringArrayFormat?: 'brackets' | 'indices';
|
|
51
119
|
/**
|
|
52
|
-
*
|
|
120
|
+
* Uses history replacement instead of push navigation.
|
|
121
|
+
*
|
|
122
|
+
* - With Vue Router (`to`), calls `router.replace`.
|
|
123
|
+
* - With Inertia (`href`), performs a replace visit.
|
|
53
124
|
*/
|
|
54
125
|
replace?: boolean;
|
|
55
126
|
/**
|
|
56
|
-
*
|
|
127
|
+
* Custom HTML tag used when rendering as a native element (neither router
|
|
128
|
+
* link nor anchor). Must correspond to a non-void HTML element.
|
|
129
|
+
* @defaultValue `'button'`
|
|
57
130
|
*/
|
|
58
131
|
tag?: string;
|
|
59
132
|
/**
|
|
60
|
-
*
|
|
133
|
+
* Target browsing context for anchor/Inertia links (e.g. `_self`, `_blank`).
|
|
134
|
+
* Ignored when rendering as a native button.
|
|
61
135
|
*/
|
|
62
136
|
target?: HTMLAnchorElement['target'];
|
|
63
137
|
/**
|
|
64
|
-
*
|
|
138
|
+
* Fallback text content rendered when no default slot is provided.
|
|
65
139
|
*/
|
|
66
140
|
text?: string;
|
|
67
141
|
/**
|
|
68
|
-
* Route
|
|
142
|
+
* Route location to navigate to. When provided (and not disabled), the
|
|
143
|
+
* component renders as a Vue Router link.
|
|
69
144
|
*/
|
|
70
145
|
to?: RouteLocationRaw;
|
|
71
146
|
/**
|
|
72
|
-
*
|
|
147
|
+
* Native `type` attribute used when rendering as a button (e.g. `button`,
|
|
148
|
+
* `submit`, `reset`).
|
|
149
|
+
*
|
|
150
|
+
* @defaultValue `'button'`
|
|
73
151
|
*/
|
|
74
152
|
type?: HTMLButtonElement['type'];
|
|
75
153
|
};
|
|
@@ -1,68 +1,92 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
2
|
export type BaseCheckboxProps = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* ID of the element that describes this checkbox for assistive technologies.
|
|
5
|
+
* Forwarded to the input as `aria-describedby`.
|
|
5
6
|
*/
|
|
6
7
|
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Automatically focuses the checkbox when the page/component loads.
|
|
10
|
+
* Use sparingly to avoid usability issues.
|
|
11
|
+
* @defaultValue `false`
|
|
9
12
|
*/
|
|
10
13
|
autofocus?: InputHTMLAttributes['autofocus'];
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
15
|
+
* Forces the checkbox checked state (controlled prop). Accepts booleanish
|
|
16
|
+
* values (`true`/`false` or `'true'`/`'false'`). When omitted, the checked
|
|
17
|
+
* state is derived from `modelValue === trueValue`.
|
|
18
|
+
* @defaultValue `false`
|
|
13
19
|
*/
|
|
14
20
|
checked?: boolean | 'true' | 'false';
|
|
15
21
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
22
|
+
* Visual color of the checkbox.
|
|
23
|
+
* - If a valid CSS color (HEX/RGB/HSL/etc.), it is applied via the `--color`
|
|
24
|
+
* CSS variable.
|
|
25
|
+
* - Otherwise, a BEM modifier class `bb-base-checkbox--{color}` is added for
|
|
26
|
+
* theme-based styling.
|
|
19
27
|
*/
|
|
20
28
|
color?: string;
|
|
21
29
|
/**
|
|
22
|
-
* Disables
|
|
30
|
+
* Disables user interaction. Also applied when `readonly` is set, since
|
|
31
|
+
* native checkboxes do not support `readonly`.
|
|
32
|
+
* @defaultValue `false`
|
|
23
33
|
*/
|
|
24
34
|
disabled?: boolean;
|
|
25
35
|
/**
|
|
26
|
-
* Value
|
|
36
|
+
* Value submitted/emitted when the checkbox is unchecked. Accepts any
|
|
37
|
+
* serializable value. Serialized to a string for form submission.
|
|
38
|
+
* @defaultValue `false`
|
|
27
39
|
*/
|
|
28
40
|
falseValue?: any;
|
|
29
41
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
42
|
+
* Puts the component into an error state (adds error styling class `bb-base-checkbox--errors`).
|
|
43
|
+
* @defaultValue `false`
|
|
32
44
|
*/
|
|
33
45
|
hasErrors?: boolean;
|
|
34
46
|
/**
|
|
35
|
-
*
|
|
47
|
+
* Identifier forwarded to the input.
|
|
36
48
|
*/
|
|
37
49
|
id?: HTMLAttributes['id'];
|
|
38
50
|
/**
|
|
39
|
-
*
|
|
51
|
+
* Renders the checkbox in the indeterminate state (neither checked nor
|
|
52
|
+
* unchecked). Note: the native `indeterminate` state resets on user click;
|
|
53
|
+
* this component re-applies it to keep UI and prop aligned.
|
|
54
|
+
* @defaultValue `false`
|
|
40
55
|
*/
|
|
41
56
|
indeterminate?: InputHTMLAttributes['indeterminate'];
|
|
42
57
|
/**
|
|
43
|
-
*
|
|
58
|
+
* Bound value for `v-model`. When it equals `trueValue` the checkbox is
|
|
59
|
+
* considered checked, otherwise unchecked.
|
|
60
|
+
*/
|
|
61
|
+
modelValue?: any;
|
|
62
|
+
/**
|
|
63
|
+
* Name attribute of the input, used during form submission.
|
|
44
64
|
*/
|
|
45
65
|
name?: InputHTMLAttributes['name'];
|
|
46
66
|
/**
|
|
47
|
-
*
|
|
67
|
+
* Puts the input in a read-only state. Since checkboxes do not support
|
|
68
|
+
* native `readonly`, the input is disabled while styled as read-only.
|
|
69
|
+
* @defaultValue `false`
|
|
48
70
|
*/
|
|
49
71
|
readonly?: boolean;
|
|
50
72
|
/**
|
|
51
|
-
*
|
|
73
|
+
* Marks the input as required for form validation.
|
|
74
|
+
* @defaultValue `false`
|
|
52
75
|
*/
|
|
53
76
|
required?: boolean;
|
|
54
77
|
/**
|
|
55
|
-
*
|
|
78
|
+
* When unchecked, submits a hidden input with `falseValue` so that a value
|
|
79
|
+
* is still posted with the form. When checked, the visible input submits
|
|
80
|
+
* `trueValue` as usual.
|
|
81
|
+
* @defaultValue `false`
|
|
56
82
|
*/
|
|
57
83
|
submitWhenFalse?: boolean;
|
|
58
84
|
/**
|
|
59
|
-
* Value
|
|
85
|
+
* Value submitted/emitted when the checkbox is checked. Accepts any
|
|
86
|
+
* serializable value. Serialized to a string for form submission.
|
|
87
|
+
* @defaultValue `true`
|
|
60
88
|
*/
|
|
61
89
|
trueValue?: any;
|
|
62
|
-
/**
|
|
63
|
-
* Used by v-model. Can be any serializable type.
|
|
64
|
-
*/
|
|
65
|
-
modelValue?: any;
|
|
66
90
|
};
|
|
67
91
|
export type BaseCheckboxEvents = {
|
|
68
92
|
(e: 'blur', event: FocusEvent): void;
|
|
@@ -1,96 +1,129 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import { NestedKeyOf } from '../../types/NestedKeyOf';
|
|
3
2
|
import { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';
|
|
4
3
|
export type BaseCheckboxGroupProps<T> = {
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* ID of the element that describes the entire checkbox group for assistive
|
|
6
|
+
* technologies. Forwarded to each generated input as `aria-describedby`.
|
|
7
7
|
*/
|
|
8
8
|
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Automatically focuses the first checkbox on mount when true.
|
|
11
|
+
* Applied only to the first option.
|
|
12
|
+
* @defaultValue `false`
|
|
11
13
|
*/
|
|
12
14
|
autofocus?: InputHTMLAttributes['autofocus'];
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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.
|
|
17
21
|
*/
|
|
18
22
|
color?: string;
|
|
19
23
|
/**
|
|
20
|
-
*
|
|
24
|
+
* List of reactive values which, when changed, trigger items re-fetching.
|
|
25
|
+
* Useful to reload options based on external inputs.
|
|
26
|
+
* @defaultValue `[]`
|
|
21
27
|
*/
|
|
22
28
|
dependencies?: any[];
|
|
23
29
|
/**
|
|
24
|
-
*
|
|
30
|
+
* Debounce delay (ms) applied when reacting to `dependencies` changes.
|
|
31
|
+
* @defaultValue `0`
|
|
25
32
|
*/
|
|
26
33
|
depsDebounceTime?: number;
|
|
27
34
|
/**
|
|
28
|
-
* Direction of the layout
|
|
35
|
+
* Direction of the group layout.
|
|
36
|
+
* - `horizontal`: options flow in rows
|
|
37
|
+
* - `vertical`: options stack in a column
|
|
38
|
+
* @defaultValue `'horizontal'`
|
|
29
39
|
*/
|
|
30
40
|
direction?: 'horizontal' | 'vertical';
|
|
31
41
|
/**
|
|
32
|
-
* Disables the
|
|
42
|
+
* Disables interaction for the whole group.
|
|
43
|
+
* @defaultValue `false`
|
|
33
44
|
*/
|
|
34
45
|
disabled?: boolean;
|
|
35
46
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* modelValue will be reset upon incoherence.
|
|
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`
|
|
41
51
|
*/
|
|
42
52
|
enforceCoherence?: boolean;
|
|
43
53
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
54
|
+
* Puts the component into an error state adds the error styling class.
|
|
55
|
+
* @defaultValue `false`
|
|
46
56
|
*/
|
|
47
57
|
hasErrors?: boolean;
|
|
48
58
|
/**
|
|
49
|
-
* Visually hides the label
|
|
59
|
+
* Visually hides the label while keeping it accessible to screen readers.
|
|
60
|
+
* @defaultValue `false`
|
|
50
61
|
*/
|
|
51
62
|
hideLabel?: boolean;
|
|
52
63
|
/**
|
|
53
|
-
*
|
|
64
|
+
* Identifier of the group. Used to derive per-option IDs
|
|
65
|
+
* for accessible labeling.
|
|
54
66
|
*/
|
|
55
67
|
id?: HTMLAttributes['id'];
|
|
56
68
|
/**
|
|
57
|
-
*
|
|
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 `[]`
|
|
58
76
|
*/
|
|
59
77
|
items: T[] | ((prefill: boolean, modelValue?: any[]) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[]) => T[]);
|
|
60
78
|
/**
|
|
61
|
-
* Defines
|
|
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)`
|
|
62
84
|
*/
|
|
63
|
-
itemText?: T extends object ?
|
|
85
|
+
itemText?: T extends object ? string | ((item: T) => string) : (item: T) => string;
|
|
64
86
|
/**
|
|
65
|
-
* Defines
|
|
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)`
|
|
66
92
|
*/
|
|
67
|
-
itemValue?: T extends object ?
|
|
93
|
+
itemValue?: T extends object ? string | ((item: T) => string) : (item: T) => any;
|
|
68
94
|
/**
|
|
69
|
-
*
|
|
95
|
+
* Text displayed while items are loading.
|
|
96
|
+
* @defaultValue `'Loading...'`
|
|
70
97
|
*/
|
|
71
98
|
loadingText?: string;
|
|
72
99
|
/**
|
|
73
100
|
* Maximum number of selectable items.
|
|
101
|
+
* @defaultValue `Infinity`
|
|
74
102
|
*/
|
|
75
103
|
max?: number;
|
|
76
104
|
/**
|
|
77
|
-
*
|
|
105
|
+
* Selected values for the group. Used with `v-model`.
|
|
106
|
+
* Must be an array.
|
|
78
107
|
*/
|
|
79
108
|
modelValue: any[];
|
|
80
109
|
/**
|
|
81
|
-
*
|
|
110
|
+
* Debounce delay (ms) applied when reacting to `modelValue` changes.
|
|
111
|
+
* @defaultValue `0`
|
|
82
112
|
*/
|
|
83
113
|
modelValueDebounceTime?: number;
|
|
84
114
|
/**
|
|
85
|
-
*
|
|
115
|
+
* Name attribute applied to each input for form submission.
|
|
86
116
|
*/
|
|
87
117
|
name?: InputHTMLAttributes['name'];
|
|
88
118
|
/**
|
|
89
|
-
*
|
|
119
|
+
* Text displayed when there are no items to show.
|
|
120
|
+
* @defaultValue `'No data to display'`
|
|
90
121
|
*/
|
|
91
122
|
noDataText?: MaybeRefOrGetter<string>;
|
|
92
123
|
/**
|
|
93
|
-
*
|
|
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`
|
|
94
127
|
*/
|
|
95
128
|
readonly?: boolean;
|
|
96
129
|
};
|
|
@@ -107,16 +140,7 @@ export type BaseCheckboxGroupEvents = {
|
|
|
107
140
|
(e: 'update:modelValue', value: any): void;
|
|
108
141
|
};
|
|
109
142
|
export type BaseCheckboxGroupSlots<T> = {
|
|
110
|
-
|
|
111
|
-
loading?: (props: object) => any;
|
|
112
|
-
'no-data'?: (props: object) => any;
|
|
113
|
-
'option:prepend'?: (props: {
|
|
114
|
-
checked: boolean;
|
|
115
|
-
disabled: boolean;
|
|
116
|
-
id?: string;
|
|
117
|
-
item: T;
|
|
118
|
-
text: string;
|
|
119
|
-
}) => any;
|
|
143
|
+
append?: (props: object) => any;
|
|
120
144
|
icon?: (props: SlotAttributes & {
|
|
121
145
|
item: T;
|
|
122
146
|
text: string;
|
|
@@ -126,6 +150,8 @@ export type BaseCheckboxGroupSlots<T> = {
|
|
|
126
150
|
text: string;
|
|
127
151
|
checked: boolean;
|
|
128
152
|
}) => any;
|
|
153
|
+
loading?: (props: object) => any;
|
|
154
|
+
'no-data'?: (props: object) => any;
|
|
129
155
|
'option:append'?: (props: {
|
|
130
156
|
checked: boolean;
|
|
131
157
|
disabled: boolean;
|
|
@@ -133,7 +159,14 @@ export type BaseCheckboxGroupSlots<T> = {
|
|
|
133
159
|
item: T;
|
|
134
160
|
text: string;
|
|
135
161
|
}) => any;
|
|
136
|
-
|
|
162
|
+
'option:prepend'?: (props: {
|
|
163
|
+
checked: boolean;
|
|
164
|
+
disabled: boolean;
|
|
165
|
+
id?: string;
|
|
166
|
+
item: T;
|
|
167
|
+
text: string;
|
|
168
|
+
}) => any;
|
|
169
|
+
prepend?: (props: object) => any;
|
|
137
170
|
};
|
|
138
171
|
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<{
|
|
139
172
|
props: __VLS_PrettifyLocal<any & BaseCheckboxGroupProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
@@ -1,76 +1,88 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
2
|
import { IconType } from '../../types/Icon';
|
|
3
|
+
/**
|
|
4
|
+
* Color input with hex value masking and an optional palette popover.
|
|
5
|
+
* Accepts and emits `#RRGGBB` values via v-model and supports full input chrome slots.
|
|
6
|
+
*/
|
|
3
7
|
export type BaseColorInputProps = {
|
|
4
8
|
/**
|
|
5
|
-
* Name of the icon to
|
|
9
|
+
* Name of the icon to render at the right hand side of the input.
|
|
6
10
|
*/
|
|
7
11
|
'append:icon'?: IconType;
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
13
|
+
* Id(s) of element(s) describing this input for assistive tech (space-separated).
|
|
14
|
+
* Typically includes the container hint id if used within a BaseInputContainer.
|
|
10
15
|
*/
|
|
11
16
|
ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
18
|
+
* Autocomplete hint for the browser.
|
|
19
|
+
* @default 'off'
|
|
14
20
|
*/
|
|
15
21
|
autocomplete?: InputHTMLAttributes['autocomplete'];
|
|
16
22
|
/**
|
|
17
|
-
*
|
|
23
|
+
* Focus the input on mount.
|
|
18
24
|
*/
|
|
19
25
|
autofocus?: InputHTMLAttributes['autofocus'];
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
27
|
+
* Show a clear button when the input has a value.
|
|
22
28
|
*/
|
|
23
29
|
clearable?: boolean;
|
|
24
30
|
/**
|
|
25
|
-
*
|
|
31
|
+
* Display the component in a compact layout.
|
|
26
32
|
*/
|
|
27
33
|
compact?: boolean;
|
|
28
34
|
/**
|
|
29
|
-
*
|
|
35
|
+
* Disable all interactions.
|
|
30
36
|
*/
|
|
31
37
|
disabled?: boolean;
|
|
32
38
|
/**
|
|
33
|
-
*
|
|
34
|
-
* It usually attaches a CSS class for styling purposes.
|
|
39
|
+
* Visually mark the component as invalid (also sets aria-invalid on the input).
|
|
35
40
|
*/
|
|
36
41
|
hasErrors?: boolean;
|
|
37
42
|
/**
|
|
38
|
-
* The
|
|
43
|
+
* The id attribute for the input element. Defaults to a generated `bb_<unique>` id when omitted.
|
|
39
44
|
*/
|
|
40
45
|
id?: HTMLAttributes['id'];
|
|
41
46
|
/**
|
|
42
|
-
*
|
|
47
|
+
* Display the loading state.
|
|
43
48
|
*/
|
|
44
49
|
loading?: boolean;
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
51
|
+
* v-model value: `#RRGGBB` hex string or `null` when empty.
|
|
52
|
+
* Example: `#1A2B3C`
|
|
47
53
|
*/
|
|
48
54
|
modelValue: string | null;
|
|
49
55
|
/**
|
|
50
|
-
*
|
|
56
|
+
* Name attribute of the input.
|
|
51
57
|
*/
|
|
52
58
|
name?: InputHTMLAttributes['name'];
|
|
53
59
|
/**
|
|
54
|
-
*
|
|
60
|
+
* Placeholder text when there is no value.
|
|
55
61
|
*/
|
|
56
62
|
placeholder?: InputHTMLAttributes['placeholder'];
|
|
57
63
|
/**
|
|
58
|
-
* Name of the icon to
|
|
64
|
+
* Name of the icon to render at the start of the input.
|
|
59
65
|
*/
|
|
60
66
|
'prepend:icon'?: IconType;
|
|
61
67
|
/**
|
|
62
|
-
*
|
|
68
|
+
* Make the input read-only.
|
|
63
69
|
*/
|
|
64
70
|
readonly?: boolean;
|
|
65
71
|
/**
|
|
66
|
-
*
|
|
72
|
+
* Mark the input as required.
|
|
67
73
|
*/
|
|
68
74
|
required?: boolean;
|
|
69
75
|
/**
|
|
70
|
-
*
|
|
76
|
+
* Transition duration (ms) of the palette popover.
|
|
77
|
+
* @default 250
|
|
71
78
|
*/
|
|
72
79
|
transitionDuration?: number;
|
|
73
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Events emitted by the color input.
|
|
83
|
+
* - blur/change/click/focus/input/keydown/mousedown/mouseup: native input events (payload: original event)
|
|
84
|
+
* - update:modelValue: emits `#RRGGBB` when valid, `null` when cleared/invalid
|
|
85
|
+
*/
|
|
74
86
|
export type BaseColorInputEvents = {
|
|
75
87
|
(e: 'blur', event: FocusEvent): void;
|
|
76
88
|
(e: 'change', event: Event): void;
|
|
@@ -82,9 +94,13 @@ export type BaseColorInputEvents = {
|
|
|
82
94
|
(e: 'mouseup', event: MouseEvent): void;
|
|
83
95
|
(e: 'update:modelValue', value: string | null): void;
|
|
84
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Slots to customize the input chrome.
|
|
99
|
+
* Use `prepend`/`append` for inline adornments; `prepend-outer`/`append-outer` for the outer container areas.
|
|
100
|
+
*/
|
|
85
101
|
export type BaseColorInputSlots = {
|
|
86
|
-
'append-outer'?: (props: object) => any;
|
|
87
102
|
append?: (props: object) => any;
|
|
103
|
+
'append-outer'?: (props: object) => any;
|
|
88
104
|
prefix?: (props: object) => any;
|
|
89
105
|
prepend?: (props: object) => any;
|
|
90
106
|
'prepend-outer'?: (props: object) => any;
|
|
@@ -9,6 +9,10 @@ export type BaseDatePickerProps = {
|
|
|
9
9
|
* Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday
|
|
10
10
|
*/
|
|
11
11
|
firstDayOfWeek?: (typeof it)['weekStart'];
|
|
12
|
+
/**
|
|
13
|
+
* If true the date will have a format YYYY-MM-DD instead of the default ISO string.
|
|
14
|
+
*/
|
|
15
|
+
floating?: boolean;
|
|
12
16
|
/**
|
|
13
17
|
* The identifier of the component.
|
|
14
18
|
*/
|
|
@@ -20,11 +24,11 @@ export type BaseDatePickerProps = {
|
|
|
20
24
|
/**
|
|
21
25
|
* Maximum selectable date
|
|
22
26
|
*/
|
|
23
|
-
max?:
|
|
27
|
+
max?: string;
|
|
24
28
|
/**
|
|
25
29
|
* Minimum selectable date
|
|
26
30
|
*/
|
|
27
|
-
min?:
|
|
31
|
+
min?: string;
|
|
28
32
|
/**
|
|
29
33
|
* Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed
|
|
30
34
|
*/
|
|
@@ -45,7 +49,7 @@ export type BaseDatePickerProps = {
|
|
|
45
49
|
* Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected
|
|
46
50
|
* @param date
|
|
47
51
|
*/
|
|
48
|
-
selectable?: (date:
|
|
52
|
+
selectable?: (date: string) => boolean;
|
|
49
53
|
};
|
|
50
54
|
declare function __VLS_template(): {
|
|
51
55
|
attrs: Partial<{}>;
|
|
@@ -6,13 +6,14 @@ type Props = {
|
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
firstDayOfWeek: number;
|
|
8
8
|
id?: HTMLAttributes['id'];
|
|
9
|
+
floating?: boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed
|
|
11
12
|
*/
|
|
12
13
|
modelValue: string | string[] | null;
|
|
13
|
-
max?:
|
|
14
|
-
min?:
|
|
15
|
-
selectable?: (date:
|
|
14
|
+
max?: string;
|
|
15
|
+
min?: string;
|
|
16
|
+
selectable?: (date: string) => boolean;
|
|
16
17
|
range?: boolean;
|
|
17
18
|
multiple?: boolean;
|
|
18
19
|
readonly?: boolean;
|