@bridge-ui/vue 0.0.2 → 0.0.3
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/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +19 -35
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +41 -54
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Alert/alertDefaultIcons.d.ts +1 -1
- package/dist/Components/Alert/composables/useAlert.js +2 -2
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Avatar/avatar.types.d.ts +34 -1
- package/dist/Components/Avatar/composables/useAvatar.d.ts +4 -4
- package/dist/Components/Avatar/composables/useAvatar.js +10 -9
- package/dist/Components/Avatar/index.d.ts +1 -1
- package/dist/Components/Badge/composables/useBadge.js +2 -2
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Button/composables/useButton.js +2 -2
- package/dist/Components/Card/composables/useCard.js +4 -4
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +5 -10
- package/dist/Components/Checkbox/composables/useCheckbox.js +2 -2
- package/dist/Components/Chip/composables/useChip.js +2 -2
- package/dist/Components/Divider/composables/useDivider.js +2 -2
- package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +2 -2
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/Components/FormControl/FormControlLabel.js +5 -0
- package/dist/Components/FormControl/FormControlLabel.vue.d.ts +8 -0
- package/dist/Components/FormControl/FormControlLabel.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/Components/FormControl/composables/useFormControl.d.ts +7 -11
- package/dist/Components/FormControl/composables/useFormControl.js +62 -68
- package/dist/Components/FormControl/formControl.types.d.ts +19 -30
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/FormFieldLabel.js +5 -0
- package/dist/Components/FormField/FormFieldLabel.vue.d.ts +7 -0
- package/dist/Components/FormField/FormFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +22 -24
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +25 -27
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/composables/useFormField.d.ts +3 -3
- package/dist/Components/FormField/composables/useFormField.js +112 -111
- package/dist/Components/FormField/formField.types.d.ts +6 -3
- package/dist/Components/Icon/composables/useIcon.js +2 -2
- package/dist/Components/Label/composables/useLabel.js +2 -2
- package/dist/Components/Link/composables/useLink.js +2 -2
- package/dist/Components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -118
- package/dist/Components/Listbox/composables/useListbox.js +2 -2
- package/dist/Components/Listbox/listbox.types.d.ts +39 -5
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.d.ts +1 -1
- package/dist/Components/Menu/composables/useMenu.js +2 -2
- package/dist/Components/Modal/composables/useModal.js +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +42 -44
- package/dist/Components/NumberField/composables/useNumberField.d.ts +3 -4
- package/dist/Components/NumberField/numberField.types.d.ts +34 -2
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +28 -29
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +3 -4
- package/dist/Components/PasswordField/passwordField.types.d.ts +22 -2
- package/dist/Components/Progress/composables/useProgress.js +2 -2
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/Components/Radio/composables/useRadio.d.ts +5 -10
- package/dist/Components/Radio/composables/useRadio.js +2 -2
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +55 -54
- package/dist/Components/Select/composables/useSelect.d.ts +16 -16
- package/dist/Components/Select/composables/useSelect.js +13 -13
- package/dist/Components/Select/select.types.d.ts +19 -3
- package/dist/Components/Skeleton/composables/useSkeleton.js +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
- package/dist/Components/Spinner/composables/useSpinner.js +2 -2
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/Components/Switch/composables/useSwitch.d.ts +5 -10
- package/dist/Components/Switch/composables/useSwitch.js +2 -2
- package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/Components/Tabs/composables/useTabs.js +2 -2
- package/dist/Components/Tabs/tabs.types.d.ts +27 -1
- package/dist/Components/TextField/composables/useTextField.d.ts +3 -4
- package/dist/Components/Textarea/composables/useTextarea.d.ts +3 -4
- package/dist/Components/Textarea/composables/useTextarea.js +2 -2
- package/dist/Utils/index.d.ts +9 -2
- package/dist/Utils/index.js +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -14
- package/dist/theme.css +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { usePasswordField as
|
|
5
|
-
import { computed as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Eye as
|
|
1
|
+
import { mergePartBind as e, resolveFieldAdornmentIconSize as t } from "../../Utils/index.js";
|
|
2
|
+
import n from "../Icon/Icon.js";
|
|
3
|
+
import r from "../FormField/FormField.js";
|
|
4
|
+
import { usePasswordField as i } from "./composables/usePasswordField.js";
|
|
5
|
+
import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeModels as d, mergeProps as f, normalizeProps as p, openBlock as m, unref as h, useModel as g, vModelDynamic as _, withCtx as v, withDirectives as y } from "vue";
|
|
6
|
+
import { cn as b } from "@bridge-ui/core";
|
|
7
|
+
import { Eye as x, EyeOff as S } from "@lucide/vue";
|
|
8
8
|
//#region src/Components/PasswordField/PasswordField.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var C = /* @__PURE__ */ l({
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "PasswordField",
|
|
12
|
-
props: /* @__PURE__ */
|
|
12
|
+
props: /* @__PURE__ */ d({
|
|
13
13
|
classes: {},
|
|
14
|
+
customProps: {},
|
|
14
15
|
visible: {
|
|
15
16
|
type: [null, Boolean],
|
|
16
17
|
default: null
|
|
@@ -18,7 +19,6 @@ var x = ["disabled", "aria-label"], S = /* @__PURE__ */ c({
|
|
|
18
19
|
color: {},
|
|
19
20
|
controlId: {},
|
|
20
21
|
corner: {},
|
|
21
|
-
customProps: {},
|
|
22
22
|
description: {},
|
|
23
23
|
disabled: { type: Boolean },
|
|
24
24
|
end: {},
|
|
@@ -41,27 +41,26 @@ var x = ["disabled", "aria-label"], S = /* @__PURE__ */ c({
|
|
|
41
41
|
modelValue: {},
|
|
42
42
|
modelModifiers: {}
|
|
43
43
|
}),
|
|
44
|
-
emits: /* @__PURE__ */
|
|
45
|
-
setup(
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
size:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
default: g(() => [_(o("input", u({ "onUpdate:modelValue": r[0] ||= (e) => C.value = e }, p(E)), null, 16), [[h, C.value]])]),
|
|
44
|
+
emits: /* @__PURE__ */ d(["visibility-change"], ["update:modelValue"]),
|
|
45
|
+
setup(l, { emit: d }) {
|
|
46
|
+
let C = d, w = g(l, "modelValue"), T = l, { formField: E, inputBind: D, isVisible: O, mergedClasses: k, toggleVisibility: A } = i(T, { onVisibilityChange: (e) => C("visibility-change", e) }), j = a(() => e(T.customProps?.toggle, {
|
|
47
|
+
type: "button",
|
|
48
|
+
disabled: T.disabled,
|
|
49
|
+
onClick: A,
|
|
50
|
+
"aria-label": O.value ? "Hide password" : "Show password"
|
|
51
|
+
}, b({
|
|
52
|
+
"bridge-end-adornment bridge-field-adornment-button inline-flex h-full items-center justify-center px-2.5": !0,
|
|
53
|
+
[k.value.toggle ?? ""]: !0
|
|
54
|
+
})));
|
|
55
|
+
return (e, i) => (m(), o(h(r), { field: h(E) }, {
|
|
56
|
+
end: v(() => [s("button", p(u(j.value)), [c(h(n), f({
|
|
57
|
+
icon: h(O) ? h(S) : h(x),
|
|
58
|
+
size: h(t)(T.size)
|
|
59
|
+
}, T.customProps?.toggleIcon), null, 16, ["icon", "size"])], 16)]),
|
|
60
|
+
default: v(() => [y(s("input", f({ "onUpdate:modelValue": i[0] ||= (e) => w.value = e }, h(D)), null, 16), [[_, w.value]])]),
|
|
62
61
|
_: 1
|
|
63
62
|
}, 8, ["field"]));
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
65
|
//#endregion
|
|
67
|
-
export {
|
|
66
|
+
export { C as default };
|
|
@@ -433,10 +433,9 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
433
433
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
434
434
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
435
435
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
436
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
436
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
|
|
437
437
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
438
438
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
439
|
-
labelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
440
439
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
441
440
|
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
442
441
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -446,12 +445,12 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
446
445
|
endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
447
446
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
448
447
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
449
|
-
requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
450
448
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
451
449
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
452
450
|
}>>;
|
|
453
451
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
454
452
|
startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
453
|
+
fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
455
454
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
456
455
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
457
456
|
stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
@@ -682,7 +681,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
682
681
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
683
682
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
684
683
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
685
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
684
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>, {
|
|
686
685
|
type: string;
|
|
687
686
|
}>>;
|
|
688
687
|
isVisible: import('vue').ComputedRef<boolean>;
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'vue';
|
|
1
|
+
import { ButtonHTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
2
|
import { MergeHtmlProps } from '@bridge-ui/core';
|
|
3
3
|
import { FormFieldClasses, FormFieldCustomProps, FormFieldOwnProps, FormFieldSlots } from '../FormField/formField.types';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
4
5
|
export interface PasswordFieldClasses extends FormFieldClasses {
|
|
5
6
|
/**
|
|
6
7
|
* The classes to apply to the visibility toggle button.
|
|
7
8
|
*/
|
|
8
9
|
toggle?: string;
|
|
9
10
|
}
|
|
10
|
-
export interface PasswordFieldCustomProps extends FormFieldCustomProps {
|
|
11
|
+
export interface PasswordFieldCustomProps extends FormFieldCustomProps {
|
|
12
|
+
/**
|
|
13
|
+
* Props forwarded to the visibility toggle button.
|
|
14
|
+
*
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
toggle?: ButtonHTMLAttributes;
|
|
18
|
+
/**
|
|
19
|
+
* Props forwarded to the visibility toggle `Icon` (`icon` is set by the field).
|
|
20
|
+
*
|
|
21
|
+
* @default undefined
|
|
22
|
+
*/
|
|
23
|
+
toggleIcon?: Partial<Omit<IconProps, "icon">>;
|
|
24
|
+
}
|
|
11
25
|
export interface PasswordFieldEmits {
|
|
12
26
|
/**
|
|
13
27
|
* Emitted when password visibility changes.
|
|
@@ -20,6 +34,12 @@ export interface PasswordFieldOwnProps extends Omit<FormFieldOwnProps, "type" |
|
|
|
20
34
|
* The classes to apply to the password field.
|
|
21
35
|
*/
|
|
22
36
|
classes?: PasswordFieldClasses;
|
|
37
|
+
/**
|
|
38
|
+
* Extra props for FormField parts and the visibility toggle.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
customProps?: PasswordFieldCustomProps;
|
|
23
43
|
/**
|
|
24
44
|
* Whether the password is visible. Omit for uncontrolled mode.
|
|
25
45
|
*/
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
3
|
import { get as a, isNil as o } from "es-toolkit/compat";
|
|
4
4
|
import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
|
|
5
|
-
import { colorProps as u, roundedProps as d, sizeProps as f, variantProps as p } from "@bridge-ui/core/
|
|
5
|
+
import { colorProps as u, roundedProps as d, sizeProps as f, variantProps as p } from "@bridge-ui/core/Tokens/Progress";
|
|
6
6
|
//#region src/Components/Progress/composables/useProgress.ts
|
|
7
7
|
var m = [
|
|
8
8
|
"size",
|
|
@@ -31,7 +31,7 @@ function g(o, g) {
|
|
|
31
31
|
}), x = n({
|
|
32
32
|
entry: b,
|
|
33
33
|
props: () => v.value.componentProps
|
|
34
|
-
}), S = r(() => y.value.customProps), C = r(() => a(c(u, b.value?.
|
|
34
|
+
}), S = r(() => y.value.customProps), C = r(() => a(c(u, b.value?.tokens?.color), y.value.color)), w = r(() => a(c(f, b.value?.tokens?.size), y.value.size)), T = r(() => a(c(d, b.value?.tokens?.rounded), y.value.rounded)), E = r(() => a(c(p, b.value?.tokens?.variant), y.value.variant)), D = r(() => y.value.variant === "buffer"), O = r(() => y.value.variant === "determinate" || y.value.variant === "buffer"), k = r(() => y.value.variant === "indeterminate" || y.value.variant === "query"), A = r(() => h(y.value.value)), j = r(() => h(y.value.valueBuffer)), M = r(() => e(S.value?.root, v.value.inheritedAttrs, {
|
|
35
35
|
role: "progressbar",
|
|
36
36
|
...O.value ? {
|
|
37
37
|
"aria-valuemin": 0,
|
|
@@ -240,7 +240,7 @@ export declare function useRadio(props: MaybeRefOrGetter<RadioOwnProps>, libDefa
|
|
|
240
240
|
withoutErrorMessage: NonNullable<boolean | undefined>;
|
|
241
241
|
}>;
|
|
242
242
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
243
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "
|
|
243
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
|
|
244
244
|
controlId: import('vue').ComputedRef<string>;
|
|
245
245
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
246
246
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -253,15 +253,10 @@ export declare function useRadio(props: MaybeRefOrGetter<RadioOwnProps>, libDefa
|
|
|
253
253
|
"aria-invalid": true | undefined;
|
|
254
254
|
}>;
|
|
255
255
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
for: string;
|
|
261
|
-
}>>;
|
|
262
|
-
startLabelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
263
|
-
for: string;
|
|
264
|
-
}>>;
|
|
256
|
+
fieldLabelProps: import('vue').ComputedRef<{
|
|
257
|
+
endLabel: import('../../Label').LabelProps;
|
|
258
|
+
startLabel: import('../../Label').LabelProps;
|
|
259
|
+
}>;
|
|
265
260
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
266
261
|
id: string;
|
|
267
262
|
}>>;
|
|
@@ -3,7 +3,7 @@ import { useFormControl as r } from "../../FormControl/composables/useFormContro
|
|
|
3
3
|
import { computed as i, toValue as a, useAttrs as o } from "vue";
|
|
4
4
|
import { get as s, omit as c } from "es-toolkit/compat";
|
|
5
5
|
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core";
|
|
6
|
-
import { colorProps as f, invalidatedProps as p, roundedProps as m, sizeProps as h } from "@bridge-ui/core/
|
|
6
|
+
import { colorProps as f, invalidatedProps as p, roundedProps as m, sizeProps as h } from "@bridge-ui/core/Tokens/Radio";
|
|
7
7
|
//#region src/Components/Radio/composables/useRadio.ts
|
|
8
8
|
var g = [
|
|
9
9
|
"name",
|
|
@@ -35,7 +35,7 @@ function _(_, v, y) {
|
|
|
35
35
|
}), T = i(() => C.value.customProps), E = n({
|
|
36
36
|
entry: w,
|
|
37
37
|
props: () => S.value.componentProps
|
|
38
|
-
}), D = i(() => a(y) === C.value.value), O = i(() => s(u(f, w.value?.
|
|
38
|
+
}), D = i(() => a(y) === C.value.value), O = i(() => s(u(f, w.value?.tokens?.color), C.value.color ?? "primary")), k = i(() => u(p, w.value?.tokens?.invalidated)), A = i(() => x.invalidated.value ? k.value : O.value), j = i(() => s(u(h, w.value?.tokens?.size), C.value.size ?? "sm")), M = i(() => s(u(m, w.value?.tokens?.rounded), C.value.rounded ?? "full")), N = i(() => e({
|
|
39
39
|
...T.value?.input,
|
|
40
40
|
...x.controlBind.value,
|
|
41
41
|
type: "radio",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
|
|
2
|
+
import { mergeNestedComponentProps as n } from "../../Utils/index.js";
|
|
2
3
|
import ee from "../Icon/Icon.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSelect as
|
|
7
|
-
import { SELECT_OPTION_KEY as
|
|
8
|
-
import { Fragment as
|
|
4
|
+
import r from "../Chip/Chip.js";
|
|
5
|
+
import i from "../FormField/FormField.js";
|
|
6
|
+
import a from "../Listbox/Listbox.js";
|
|
7
|
+
import { useSelect as o } from "./composables/useSelect.js";
|
|
8
|
+
import { SELECT_OPTION_KEY as s } from "./selectInjectionKey.js";
|
|
9
|
+
import { Fragment as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, isRef as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useModel as te, useTemplateRef as A, withCtx as j, withKeys as M, withModifiers as N } from "vue";
|
|
9
10
|
import { X as P } from "@lucide/vue";
|
|
10
11
|
//#region src/Components/Select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
11
12
|
var F = {
|
|
@@ -18,10 +19,10 @@ var F = {
|
|
|
18
19
|
key: 0,
|
|
19
20
|
hidden: "",
|
|
20
21
|
"aria-hidden": "true"
|
|
21
|
-
}, R = /* @__PURE__ */
|
|
22
|
+
}, R = /* @__PURE__ */ g({
|
|
22
23
|
inheritAttrs: !1,
|
|
23
24
|
__name: "Select",
|
|
24
|
-
props: /* @__PURE__ */
|
|
25
|
+
props: /* @__PURE__ */ y({
|
|
25
26
|
asyncData: {},
|
|
26
27
|
clearable: {
|
|
27
28
|
type: Boolean,
|
|
@@ -76,7 +77,7 @@ var F = {
|
|
|
76
77
|
modelValue: {},
|
|
77
78
|
modelModifiers: {}
|
|
78
79
|
}),
|
|
79
|
-
emits: /* @__PURE__ */
|
|
80
|
+
emits: /* @__PURE__ */ y([
|
|
80
81
|
"change",
|
|
81
82
|
"clear",
|
|
82
83
|
"close",
|
|
@@ -86,9 +87,9 @@ var F = {
|
|
|
86
87
|
"select",
|
|
87
88
|
"update:modelValue"
|
|
88
89
|
], ["update:modelValue"]),
|
|
89
|
-
setup(
|
|
90
|
-
let R =
|
|
91
|
-
|
|
90
|
+
setup(g, { emit: y }) {
|
|
91
|
+
let R = te(g, "modelValue"), z = g, B = y, V = A("trigger"), H = w([]);
|
|
92
|
+
C(s, {
|
|
92
93
|
unregister(e) {
|
|
93
94
|
H.value = H.value.filter((t) => String(t.value) !== String(e));
|
|
94
95
|
},
|
|
@@ -96,76 +97,76 @@ var F = {
|
|
|
96
97
|
H.value.some((t) => String(t.value) === String(e.value)) || (H.value = [...H.value, e]);
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
|
-
let { open: U, slots: W, hasValue: G, multiple: K, formField: q, clearable: J, clearBind: Y, clearValue: X, removeChip: Z, triggerBind: Q, selectOption:
|
|
100
|
-
return (
|
|
101
|
-
|
|
102
|
-
default: j(() => [
|
|
100
|
+
let { open: U, slots: W, hasValue: G, multiple: K, formField: q, clearable: J, clearBind: Y, clearValue: X, removeChip: Z, triggerBind: Q, selectOption: ne, containerRef: re, listboxProps: ie, clearIconSize: ae, mergedClasses: oe, selectedOptions: se, hasComposedList: $, handleRegisteredOptionsChange: ce } = o(z, R, V, B, H);
|
|
101
|
+
return (o, s) => (S(), d(c, null, [
|
|
102
|
+
h(k(i), { field: k(q) }, {
|
|
103
|
+
default: j(() => [k(K) ? (S(), d("div", F, [(S(!0), d(c, null, T(k(se), (e) => (S(), l(k(r), b({
|
|
103
104
|
dismissible: "",
|
|
104
105
|
key: String(e.value),
|
|
105
|
-
size:
|
|
106
|
-
|
|
107
|
-
disabled: O(q).isDisabled.value,
|
|
106
|
+
size: k(q).merged.value.size,
|
|
107
|
+
disabled: k(q).isDisabled.value,
|
|
108
108
|
"clear-label": `Remove ${e.label}`,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
onDismiss: (t) => k(Z)(e, t)
|
|
110
|
+
}, { ref_for: !0 }, k(n)(z.customProps?.chip, {
|
|
111
|
+
classes: { root: k(oe).chip },
|
|
112
|
+
customProps: { clear: k(Y) }
|
|
113
|
+
})), {
|
|
114
|
+
default: j(() => [E(o.$slots, "chip", { option: e }, () => [m(O(e.label), 1)])]),
|
|
113
115
|
_: 2
|
|
114
|
-
},
|
|
116
|
+
}, 1040, [
|
|
115
117
|
"size",
|
|
116
|
-
"custom-props",
|
|
117
118
|
"disabled",
|
|
118
119
|
"clear-label",
|
|
119
|
-
"classes",
|
|
120
120
|
"onDismiss"
|
|
121
|
-
]))), 128)),
|
|
121
|
+
]))), 128)), f("textarea", b({ ref: "trigger" }, k(Q)), null, 16)])) : (S(), d("div", I, [f("input", b({
|
|
122
122
|
ref: "trigger",
|
|
123
123
|
class: "min-w-0 flex-1"
|
|
124
|
-
},
|
|
125
|
-
onClick:
|
|
124
|
+
}, k(Q)), null, 16), k(J) && k(G) && !k(q).isDisabled.value ? (S(), d("span", b({ key: 0 }, k(Y), {
|
|
125
|
+
onClick: s[0] ||= (...e) => k(X) && k(X)(...e),
|
|
126
126
|
"aria-label": "Clear selection",
|
|
127
|
-
onKeydown: [
|
|
128
|
-
}), [
|
|
129
|
-
icon:
|
|
130
|
-
size:
|
|
131
|
-
}, null,
|
|
127
|
+
onKeydown: [s[1] ||= M(N((...e) => k(X) && k(X)(...e), ["prevent"]), ["enter"]), s[2] ||= M(N((...e) => k(X) && k(X)(...e), ["prevent"]), ["space"])]
|
|
128
|
+
}), [h(k(ee), b({
|
|
129
|
+
icon: k(P),
|
|
130
|
+
size: k(ae)
|
|
131
|
+
}, z.customProps?.clearIcon), null, 16, ["icon", "size"])], 16)) : u("", !0)]))]),
|
|
132
132
|
_: 3
|
|
133
133
|
}, 8, ["field"]),
|
|
134
|
-
|
|
135
|
-
modelValue:
|
|
136
|
-
"onUpdate:modelValue":
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
h(k(a), b({
|
|
135
|
+
modelValue: k(U),
|
|
136
|
+
"onUpdate:modelValue": s[3] ||= (e) => v(U) ? U.value = e : null
|
|
137
|
+
}, k(ie), {
|
|
138
|
+
"anchor-el": k(re),
|
|
139
|
+
onSelect: k(ne),
|
|
140
|
+
onRegisteredOptionsChange: k(ce)
|
|
141
|
+
}), p({ _: 2 }, [
|
|
142
|
+
k($) ? {
|
|
142
143
|
name: "default",
|
|
143
|
-
fn: j(() => [
|
|
144
|
+
fn: j(() => [E(o.$slots, "default")]),
|
|
144
145
|
key: "0"
|
|
145
146
|
} : void 0,
|
|
146
|
-
|
|
147
|
+
k(e)(k(W), "beforeOptions") ? {
|
|
147
148
|
name: "beforeOptions",
|
|
148
|
-
fn: j(() => [(
|
|
149
|
+
fn: j(() => [(S(), l(D(k(t)(k(W), "beforeOptions"))))]),
|
|
149
150
|
key: "1"
|
|
150
151
|
} : void 0,
|
|
151
|
-
|
|
152
|
+
k(e)(k(W), "loading") ? {
|
|
152
153
|
name: "loading",
|
|
153
|
-
fn: j(() => [(
|
|
154
|
+
fn: j(() => [(S(), l(D(k(t)(k(W), "loading"))))]),
|
|
154
155
|
key: "2"
|
|
155
156
|
} : void 0,
|
|
156
|
-
|
|
157
|
+
k(e)(k(W), "option") ? {
|
|
157
158
|
name: "option",
|
|
158
|
-
fn: j((e) => [
|
|
159
|
+
fn: j((e) => [E(o.$slots, "option", x(_(e)))]),
|
|
159
160
|
key: "3"
|
|
160
161
|
} : void 0,
|
|
161
|
-
|
|
162
|
+
k(e)(k(W), "empty") ? {
|
|
162
163
|
name: "empty",
|
|
163
|
-
fn: j(() => [(
|
|
164
|
+
fn: j(() => [(S(), l(D(k(t)(k(W), "empty"))))]),
|
|
164
165
|
key: "4"
|
|
165
166
|
} : void 0,
|
|
166
|
-
|
|
167
|
+
k(e)(k(W), "afterOptions") ? {
|
|
167
168
|
name: "afterOptions",
|
|
168
|
-
fn: j(() => [(
|
|
169
|
+
fn: j(() => [(S(), l(D(k(t)(k(W), "afterOptions"))))]),
|
|
169
170
|
key: "5"
|
|
170
171
|
} : void 0
|
|
171
172
|
]), 1040, [
|
|
@@ -174,7 +175,7 @@ var F = {
|
|
|
174
175
|
"onSelect",
|
|
175
176
|
"onRegisteredOptionsChange"
|
|
176
177
|
]),
|
|
177
|
-
|
|
178
|
+
k($) ? u("", !0) : (S(), d("div", L, [E(o.$slots, "default")]))
|
|
178
179
|
], 64));
|
|
179
180
|
}
|
|
180
181
|
});
|
|
@@ -437,10 +437,9 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
437
437
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
438
438
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
439
439
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
440
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
440
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
|
|
441
441
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
442
442
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
443
|
-
labelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
444
443
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
445
444
|
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
446
445
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -450,12 +449,12 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
450
449
|
endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
451
450
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
452
451
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
453
|
-
requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
454
452
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
455
453
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
456
454
|
}>>;
|
|
457
455
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
458
456
|
startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
457
|
+
fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
459
458
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
460
459
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
461
460
|
stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
@@ -721,32 +720,33 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
721
720
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
722
721
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
723
722
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
724
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
723
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>>;
|
|
725
724
|
selectOption: (option: SelectOption) => void;
|
|
726
725
|
containerRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
727
726
|
listboxProps: import('vue').ComputedRef<{
|
|
728
|
-
|
|
729
|
-
isSelected: (value: SelectValue) => boolean;
|
|
730
|
-
loading: boolean;
|
|
731
|
-
multiple: boolean;
|
|
732
|
-
entries: ListboxEntry[];
|
|
733
|
-
options: import('@bridge-ui/core').ListboxOption[];
|
|
734
|
-
labelledBy: string;
|
|
735
|
-
rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
736
|
-
invalidated: boolean;
|
|
737
|
-
highlightedIndex: number;
|
|
738
|
-
color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
|
|
739
|
-
size: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
|
|
727
|
+
anchorEl?: null | HTMLElement;
|
|
740
728
|
classes?: import('../../Listbox').ListboxClasses;
|
|
729
|
+
color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
|
|
741
730
|
customProps?: import('../../Listbox').ListboxCustomProps;
|
|
742
731
|
disableAutoFocus: boolean;
|
|
743
732
|
disableMaxHeight: boolean;
|
|
744
733
|
emptyMessage: string;
|
|
734
|
+
entries: ListboxEntry[];
|
|
745
735
|
hideEmptyMessage: boolean;
|
|
736
|
+
highlightedIndex: number;
|
|
737
|
+
invalidated: boolean;
|
|
738
|
+
isSelected: (value: import('@bridge-ui/core').ListboxValue) => boolean;
|
|
739
|
+
labelledBy: string;
|
|
740
|
+
listboxId: string;
|
|
741
|
+
loading: boolean;
|
|
746
742
|
loadingMessage: string;
|
|
747
743
|
maxHeight: string;
|
|
744
|
+
multiple: boolean;
|
|
745
|
+
options: import('@bridge-ui/core').ListboxOption[];
|
|
748
746
|
placement?: import('@floating-ui/utils').Placement;
|
|
747
|
+
rounded: "2xl" | "lg" | "md" | "sm" | "xl" | "xs" | "none" | "3xl" | "4xl" | "full";
|
|
749
748
|
showCheckmark?: boolean;
|
|
749
|
+
size: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
|
|
750
750
|
}>;
|
|
751
751
|
clearIconSize: import('vue').ComputedRef<keyof import('@bridge-ui/core').IconSize>;
|
|
752
752
|
mergedClasses: import('vue').ComputedRef<Partial<SelectClasses>>;
|
|
@@ -6,7 +6,7 @@ import { Comment as re, Text as ie, computed as a, nextTick as ae, onBeforeUnmou
|
|
|
6
6
|
import { get as c, isNil as de, omit as fe } from "es-toolkit/compat";
|
|
7
7
|
import { adjustAutosizeTextareaHeight as pe, cn as l, createSelectAsyncSearch as me, filterListboxEntries as he, flattenListboxOptions as u, mergeBridgeUILayeredClasses as d, normalizeListboxEntries as f, normalizeSelectOptions as ge, resolveSelectAsyncDebounce as _e, resolveSelectAsyncOptions as ve, selectValuesEqual as p, splitComponentProps as ye } from "@bridge-ui/core";
|
|
8
8
|
import { ChevronsUpDown as be } from "@lucide/vue";
|
|
9
|
-
import { colorProps as xe, invalidatedProps as Se } from "@bridge-ui/core/
|
|
9
|
+
import { colorProps as xe, invalidatedProps as Se } from "@bridge-ui/core/Tokens/Listbox";
|
|
10
10
|
//#region src/Components/Select/composables/useSelect.ts
|
|
11
11
|
var Ce = [
|
|
12
12
|
"classes",
|
|
@@ -240,12 +240,12 @@ function m(m, h, g, _, we) {
|
|
|
240
240
|
let Ye = a(() => {
|
|
241
241
|
let e = c(d(xe, c(j.value, [
|
|
242
242
|
"Listbox",
|
|
243
|
-
"
|
|
243
|
+
"tokens",
|
|
244
244
|
"color"
|
|
245
245
|
])), K.merged.value.color ?? "primary");
|
|
246
246
|
return K.invalidated.value ? d(Se, c(j.value, [
|
|
247
247
|
"Listbox",
|
|
248
|
-
"
|
|
248
|
+
"tokens",
|
|
249
249
|
"invalidated"
|
|
250
250
|
])) : e;
|
|
251
251
|
}), Xe = a(() => Ye.value?.value), Ze = a(() => {
|
|
@@ -303,25 +303,25 @@ function m(m, h, g, _, we) {
|
|
|
303
303
|
[M.value.clear ?? ""]: !0
|
|
304
304
|
})
|
|
305
305
|
})), et = a(() => ({
|
|
306
|
-
disableAutoFocus: !0,
|
|
307
|
-
maxHeight: m.maxHeight,
|
|
308
|
-
size: K.merged.value.size,
|
|
309
|
-
color: K.merged.value.color,
|
|
310
|
-
disableMaxHeight: m.disableMaxHeight === !0,
|
|
311
|
-
emptyMessage: k.value.emptyMessage ?? "No options",
|
|
312
|
-
hideEmptyMessage: k.value.hideEmptyMessage === !0,
|
|
313
|
-
loadingMessage: k.value.loadingMessage ?? "Loading...",
|
|
314
|
-
...Ve.value,
|
|
315
306
|
listboxId: y,
|
|
316
307
|
isSelected: J,
|
|
308
|
+
disableAutoFocus: !0,
|
|
317
309
|
loading: Ne.value,
|
|
318
310
|
multiple: N.value,
|
|
311
|
+
maxHeight: m.maxHeight,
|
|
319
312
|
entries: Pe.value,
|
|
320
313
|
options: W.value,
|
|
314
|
+
size: K.merged.value.size,
|
|
315
|
+
color: K.merged.value.color,
|
|
321
316
|
labelledBy: K.controlId.value,
|
|
322
317
|
rounded: K.merged.value.rounded,
|
|
323
318
|
invalidated: K.invalidated.value,
|
|
324
|
-
highlightedIndex: S.value
|
|
319
|
+
highlightedIndex: S.value,
|
|
320
|
+
disableMaxHeight: m.disableMaxHeight === !0,
|
|
321
|
+
emptyMessage: k.value.emptyMessage ?? "No options",
|
|
322
|
+
hideEmptyMessage: k.value.hideEmptyMessage === !0,
|
|
323
|
+
loadingMessage: k.value.loadingMessage ?? "Loading...",
|
|
324
|
+
...Ve.value
|
|
325
325
|
}));
|
|
326
326
|
function tt(e) {
|
|
327
327
|
let t = I.value;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InputHTMLAttributes, Slot, TextareaHTMLAttributes } from 'vue';
|
|
2
2
|
import { ListboxOptionsInput, MergeHtmlProps, SelectAsyncData, SelectModel, SelectOption, SelectValue } from '@bridge-ui/core';
|
|
3
|
+
import { ChipOwnProps } from '../Chip/chip.types';
|
|
3
4
|
import { FormFieldClasses, FormFieldCustomProps, FormFieldOwnProps, FormFieldSlots } from '../FormField/formField.types';
|
|
5
|
+
import { IconProps } from '../Icon';
|
|
4
6
|
import { ListboxOwnProps } from '../Listbox/listbox.types';
|
|
5
7
|
export type { ListboxOptionGroup, ListboxOptionsInput, SelectAsyncData, SelectModel, SelectOption, SelectOptionInput, SelectOptionLike, SelectValue, } from '@bridge-ui/core';
|
|
6
8
|
export interface SelectClasses extends FormFieldClasses {
|
|
@@ -26,13 +28,26 @@ export interface SelectClasses extends FormFieldClasses {
|
|
|
26
28
|
value?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface SelectCustomProps extends FormFieldCustomProps {
|
|
31
|
+
/**
|
|
32
|
+
* Props forwarded to each selected-value `Chip` (multiple mode).
|
|
33
|
+
* Dismiss behavior, size, and label stay owned by `Select`.
|
|
34
|
+
*
|
|
35
|
+
* @default undefined
|
|
36
|
+
*/
|
|
37
|
+
chip?: Partial<Omit<ChipOwnProps, "size" | "label" | "disabled" | "clearLabel" | "dismissible">>;
|
|
38
|
+
/**
|
|
39
|
+
* Props forwarded to the clear `Icon` (`icon` is set by `Select`).
|
|
40
|
+
*
|
|
41
|
+
* @default undefined
|
|
42
|
+
*/
|
|
43
|
+
clearIcon?: Partial<Omit<IconProps, "icon">>;
|
|
29
44
|
/**
|
|
30
45
|
* Props forwarded to the internal `Listbox`.
|
|
31
|
-
*
|
|
46
|
+
* Merged last so they override Select defaults.
|
|
32
47
|
*
|
|
33
48
|
* @default undefined
|
|
34
49
|
*/
|
|
35
|
-
listbox?: Partial<
|
|
50
|
+
listbox?: Partial<ListboxOwnProps>;
|
|
36
51
|
}
|
|
37
52
|
export interface SelectEmits {
|
|
38
53
|
/**
|
|
@@ -98,7 +113,8 @@ export interface SelectOwnProps extends Omit<FormFieldOwnProps, "field"> {
|
|
|
98
113
|
*/
|
|
99
114
|
clearable?: boolean;
|
|
100
115
|
/**
|
|
101
|
-
* Extra props for FormField parts and the
|
|
116
|
+
* Extra props for FormField parts, selected chips, clear icon, and the
|
|
117
|
+
* internal `Listbox`.
|
|
102
118
|
*
|
|
103
119
|
* @default undefined
|
|
104
120
|
*/
|