@bridge-ui/vue 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/BridgeUIHosts.js +5 -0
- package/dist/Actions/BridgeUIHosts.vue.d.ts +18 -0
- package/dist/Actions/BridgeUIHosts.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/Actions/Dialog/BridgeDialogAction.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogAction.vue.d.ts +8 -0
- package/dist/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Actions/Dialog/BridgeDialogHost.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogHost.vue.d.ts +14 -0
- package/dist/Actions/Dialog/BridgeDialogHost.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/Actions/Dialog/BridgeDialogItem.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogItem.vue.d.ts +4 -0
- package/dist/Actions/Dialog/BridgeDialogItem.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.js +5 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue.d.ts +4 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Actions/Dialog/bridgeDialog.types.d.ts +128 -0
- package/dist/Actions/Dialog/bridgeDialogInjectionKey.d.ts +3 -0
- package/dist/Actions/Dialog/bridgeDialogInjectionKey.js +4 -0
- package/dist/Actions/Dialog/createBridgeDialogApi.d.ts +2 -0
- package/dist/Actions/Dialog/createBridgeDialogApi.js +49 -0
- package/dist/Actions/Dialog/index.d.ts +3 -0
- package/dist/Actions/Dialog/index.js +3 -0
- package/dist/Actions/Dialog/useDialogAction.d.ts +5 -0
- package/dist/Actions/Dialog/useDialogAction.js +26 -0
- package/dist/Actions/Modal/BridgeModalHost.js +5 -0
- package/dist/Actions/Modal/BridgeModalHost.vue.d.ts +14 -0
- package/dist/Actions/Modal/BridgeModalHost.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Actions/Modal/bridgeModal.types.d.ts +44 -0
- package/dist/Actions/Modal/bridgeModalInjectionKey.d.ts +3 -0
- package/dist/Actions/Modal/bridgeModalInjectionKey.js +4 -0
- package/dist/Actions/Modal/createBridgeModalApi.d.ts +2 -0
- package/dist/Actions/Modal/createBridgeModalApi.js +49 -0
- package/dist/Actions/Modal/index.d.ts +3 -0
- package/dist/Actions/Modal/index.js +3 -0
- package/dist/Actions/Modal/useModalAction.d.ts +5 -0
- package/dist/Actions/Modal/useModalAction.js +26 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue.d.ts +8 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue.d.ts +16 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue.d.ts +4 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/Actions/Snackbar/bridgeSnackbar.types.d.ts +127 -0
- package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.d.ts +3 -0
- package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.js +4 -0
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.d.ts +14 -0
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +59 -0
- package/dist/Actions/Snackbar/index.d.ts +3 -0
- package/dist/Actions/Snackbar/index.js +3 -0
- package/dist/Actions/Snackbar/useSnackbarAction.d.ts +5 -0
- package/dist/Actions/Snackbar/useSnackbarAction.js +27 -0
- package/dist/Actions/bridgeUIHosts.types.d.ts +17 -0
- package/dist/Actions/index.d.ts +8 -0
- package/dist/Actions/index.js +8 -0
- package/dist/Components/Alert/Alert.js +5 -0
- package/dist/Components/Alert/Alert.vue.d.ts +11 -0
- package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/Components/Alert/alert.types.d.ts +134 -0
- package/dist/Components/Alert/alertDefaultIcons.d.ts +4 -0
- package/dist/Components/Alert/alertDefaultIcons.js +13 -0
- package/dist/Components/Alert/composables/useAlert.d.ts +18 -0
- package/dist/Components/Alert/composables/useAlert.js +71 -0
- package/dist/Components/Alert/index.d.ts +3 -0
- package/dist/Components/Alert/index.js +3 -0
- package/dist/Components/Avatar/Avatar.js +5 -0
- package/dist/Components/Avatar/Avatar.vue.d.ts +11 -0
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/Components/Avatar/avatar.types.d.ts +81 -0
- package/dist/Components/Avatar/composables/useAvatar.d.ts +23 -0
- package/dist/Components/Avatar/composables/useAvatar.js +73 -0
- package/dist/Components/Avatar/index.d.ts +3 -0
- package/dist/Components/Avatar/index.js +3 -0
- package/dist/Components/Badge/Badge.js +5 -0
- package/dist/Components/Badge/Badge.vue.d.ts +4 -0
- package/dist/Components/Badge/Badge.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Badge/badge.types.d.ts +64 -0
- package/dist/Components/Badge/composables/useBadge.d.ts +9 -0
- package/dist/Components/Badge/composables/useBadge.js +47 -0
- package/dist/Components/Badge/index.d.ts +3 -0
- package/dist/Components/Badge/index.js +3 -0
- package/dist/Components/Button/Button.js +5 -0
- package/dist/Components/Button/Button.vue.d.ts +11 -0
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/Components/Button/button.types.d.ts +181 -0
- package/dist/Components/Button/composables/useButton.d.ts +22 -0
- package/dist/Components/Button/composables/useButton.js +91 -0
- package/dist/Components/Button/index.d.ts +3 -0
- package/dist/Components/Button/index.js +3 -0
- package/dist/Components/Card/Card.js +5 -0
- package/dist/Components/Card/Card.vue.d.ts +11 -0
- package/dist/Components/Card/Card.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/Card/card.types.d.ts +124 -0
- package/dist/Components/Card/composables/useCard.d.ts +18 -0
- package/dist/Components/Card/composables/useCard.js +80 -0
- package/dist/Components/Card/index.d.ts +3 -0
- package/dist/Components/Card/index.js +3 -0
- package/dist/Components/Checkbox/Checkbox.js +5 -0
- package/dist/Components/Checkbox/Checkbox.vue.d.ts +20 -0
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/Components/Checkbox/checkbox.types.d.ts +98 -0
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +279 -0
- package/dist/Components/Checkbox/composables/useCheckbox.js +76 -0
- package/dist/Components/Checkbox/index.d.ts +3 -0
- package/dist/Components/Checkbox/index.js +3 -0
- package/dist/Components/FormControl/FormControl.js +5 -0
- package/dist/Components/FormControl/FormControl.vue.d.ts +17 -0
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/FormControl/composables/useFormControl.d.ts +45 -0
- package/dist/Components/FormControl/composables/useFormControl.js +110 -0
- package/dist/Components/FormControl/formControl.types.d.ts +198 -0
- package/dist/Components/FormControl/index.d.ts +4 -0
- package/dist/Components/FormControl/index.js +3 -0
- package/dist/Components/FormField/FilledFormField.js +5 -0
- package/dist/Components/FormField/FilledFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/FormField.js +5 -0
- package/dist/Components/FormField/FormField.vue.d.ts +15 -0
- package/dist/Components/FormField/FormField.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/Components/FormField/NotchedFormField.js +5 -0
- package/dist/Components/FormField/NotchedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/Components/FormField/OutlinedFormField.js +5 -0
- package/dist/Components/FormField/OutlinedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/StackedFormField.js +5 -0
- package/dist/Components/FormField/StackedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/Components/FormField/UnderlinedFormField.js +5 -0
- package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +474 -0
- package/dist/Components/FormField/composables/useFormField.js +219 -0
- package/dist/Components/FormField/formField.types.d.ts +294 -0
- package/dist/Components/FormField/index.d.ts +4 -0
- package/dist/Components/FormField/index.js +3 -0
- package/dist/Components/Icon/Icon.js +5 -0
- package/dist/Components/Icon/Icon.vue.d.ts +4 -0
- package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Icon/composables/useIcon.d.ts +9 -0
- package/dist/Components/Icon/composables/useIcon.js +26 -0
- package/dist/Components/Icon/icon.types.d.ts +17 -0
- package/dist/Components/Icon/index.d.ts +3 -0
- package/dist/Components/Icon/index.js +3 -0
- package/dist/Components/Label/Label.js +5 -0
- package/dist/Components/Label/Label.vue.d.ts +4 -0
- package/dist/Components/Label/Label.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/Components/Label/composables/useLabel.d.ts +10 -0
- package/dist/Components/Label/composables/useLabel.js +44 -0
- package/dist/Components/Label/index.d.ts +3 -0
- package/dist/Components/Label/index.js +3 -0
- package/dist/Components/Label/label.types.d.ts +52 -0
- package/dist/Components/Link/Link.js +5 -0
- package/dist/Components/Link/Link.vue.d.ts +11 -0
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/Components/Link/composables/useLink.d.ts +18 -0
- package/dist/Components/Link/composables/useLink.js +66 -0
- package/dist/Components/Link/index.d.ts +3 -0
- package/dist/Components/Link/index.js +3 -0
- package/dist/Components/Link/link.types.d.ts +113 -0
- package/dist/Components/List/List.js +5 -0
- package/dist/Components/List/List.vue.d.ts +9 -0
- package/dist/Components/List/List.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/List/composables/useList.d.ts +11 -0
- package/dist/Components/List/composables/useList.js +44 -0
- package/dist/Components/List/index.d.ts +5 -0
- package/dist/Components/List/index.js +4 -0
- package/dist/Components/List/list.types.d.ts +57 -0
- package/dist/Components/List/listInjectionKey.d.ts +5 -0
- package/dist/Components/List/listInjectionKey.js +4 -0
- package/dist/Components/ListItem/ListItem.js +5 -0
- package/dist/Components/ListItem/ListItem.vue.d.ts +19 -0
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/ListItem/composables/useListItem.d.ts +40 -0
- package/dist/Components/ListItem/composables/useListItem.js +104 -0
- package/dist/Components/ListItem/index.d.ts +3 -0
- package/dist/Components/ListItem/index.js +3 -0
- package/dist/Components/ListItem/listItem.types.d.ts +164 -0
- package/dist/Components/ListSection/ListSection.js +5 -0
- package/dist/Components/ListSection/ListSection.vue.d.ts +15 -0
- package/dist/Components/ListSection/ListSection.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/ListSection/composables/useListSection.d.ts +13 -0
- package/dist/Components/ListSection/composables/useListSection.js +51 -0
- package/dist/Components/ListSection/index.d.ts +3 -0
- package/dist/Components/ListSection/index.js +3 -0
- package/dist/Components/ListSection/listSection.types.d.ts +71 -0
- package/dist/Components/Listbox/Listbox.js +5 -0
- package/dist/Components/Listbox/Listbox.vue.d.ts +34 -0
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/Components/Listbox/composables/useListbox.d.ts +13 -0
- package/dist/Components/Listbox/composables/useListbox.js +47 -0
- package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +16 -0
- package/dist/Components/Listbox/composables/useListboxNavigation.js +62 -0
- package/dist/Components/Listbox/index.d.ts +4 -0
- package/dist/Components/Listbox/index.js +4 -0
- package/dist/Components/Listbox/listbox.types.d.ts +170 -0
- package/dist/Components/Menu/Menu.js +5 -0
- package/dist/Components/Menu/Menu.vue.d.ts +36 -0
- package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/Components/Menu/composables/useMenu.d.ts +54 -0
- package/dist/Components/Menu/composables/useMenu.js +217 -0
- package/dist/Components/Menu/index.d.ts +4 -0
- package/dist/Components/Menu/index.js +3 -0
- package/dist/Components/Menu/menu.types.d.ts +172 -0
- package/dist/Components/Modal/Modal.js +5 -0
- package/dist/Components/Modal/Modal.vue.d.ts +38 -0
- package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/Components/Modal/composables/useModal.d.ts +61 -0
- package/dist/Components/Modal/composables/useModal.js +191 -0
- package/dist/Components/Modal/index.d.ts +4 -0
- package/dist/Components/Modal/index.js +3 -0
- package/dist/Components/Modal/modal.types.d.ts +177 -0
- package/dist/Components/NumberField/NumberField.js +5 -0
- package/dist/Components/NumberField/NumberField.vue.d.ts +24 -0
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/Components/NumberField/composables/useNumberField.d.ts +696 -0
- package/dist/Components/NumberField/composables/useNumberField.js +64 -0
- package/dist/Components/NumberField/index.d.ts +4 -0
- package/dist/Components/NumberField/index.js +3 -0
- package/dist/Components/NumberField/numberField.types.d.ts +52 -0
- package/dist/Components/PasswordField/PasswordField.js +5 -0
- package/dist/Components/PasswordField/PasswordField.vue.d.ts +24 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +691 -0
- package/dist/Components/PasswordField/composables/usePasswordField.js +40 -0
- package/dist/Components/PasswordField/index.d.ts +4 -0
- package/dist/Components/PasswordField/index.js +3 -0
- package/dist/Components/PasswordField/passwordField.types.d.ts +34 -0
- package/dist/Components/Radio/Radio.js +5 -0
- package/dist/Components/Radio/Radio.vue.d.ts +20 -0
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/Radio/composables/useRadio.d.ts +278 -0
- package/dist/Components/Radio/composables/useRadio.js +78 -0
- package/dist/Components/Radio/index.d.ts +3 -0
- package/dist/Components/Radio/index.js +3 -0
- package/dist/Components/Radio/radio.types.d.ts +104 -0
- package/dist/Components/Select/Select.js +5 -0
- package/dist/Components/Select/Select.vue.d.ts +40 -0
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +191 -0
- package/dist/Components/Select/SelectOption.js +5 -0
- package/dist/Components/Select/SelectOption.vue.d.ts +4 -0
- package/dist/Components/Select/SelectOption.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/Select/composables/useSelect.d.ts +733 -0
- package/dist/Components/Select/composables/useSelect.js +305 -0
- package/dist/Components/Select/index.d.ts +4 -0
- package/dist/Components/Select/index.js +4 -0
- package/dist/Components/Select/select.types.d.ts +231 -0
- package/dist/Components/Select/selectInjectionKey.d.ts +7 -0
- package/dist/Components/Select/selectInjectionKey.js +4 -0
- package/dist/Components/Snackbar/Snackbar.js +5 -0
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +32 -0
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +156 -0
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +248 -0
- package/dist/Components/Snackbar/composables/useSnackbar.js +210 -0
- package/dist/Components/Snackbar/index.d.ts +4 -0
- package/dist/Components/Snackbar/index.js +3 -0
- package/dist/Components/Snackbar/snackbar.types.d.ts +214 -0
- package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +4 -0
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +13 -0
- package/dist/Components/Switch/Switch.js +5 -0
- package/dist/Components/Switch/Switch.vue.d.ts +20 -0
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/Components/Switch/composables/useSwitch.d.ts +278 -0
- package/dist/Components/Switch/composables/useSwitch.js +73 -0
- package/dist/Components/Switch/index.d.ts +3 -0
- package/dist/Components/Switch/index.js +3 -0
- package/dist/Components/Switch/switch.types.d.ts +92 -0
- package/dist/Components/TextField/TextField.js +5 -0
- package/dist/Components/TextField/TextField.vue.d.ts +22 -0
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/TextField/composables/useTextField.d.ts +680 -0
- package/dist/Components/TextField/composables/useTextField.js +21 -0
- package/dist/Components/TextField/index.d.ts +3 -0
- package/dist/Components/TextField/index.js +3 -0
- package/dist/Components/TextField/textField.types.d.ts +15 -0
- package/dist/Components/Textarea/Textarea.js +5 -0
- package/dist/Components/Textarea/Textarea.vue.d.ts +22 -0
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/Textarea/composables/useTextarea.d.ts +685 -0
- package/dist/Components/Textarea/composables/useTextarea.js +72 -0
- package/dist/Components/Textarea/index.d.ts +3 -0
- package/dist/Components/Textarea/index.js +3 -0
- package/dist/Components/Textarea/textarea.types.d.ts +34 -0
- package/dist/Provider/BridgeUIProvider.js +5 -0
- package/dist/Provider/BridgeUIProvider.vue.d.ts +18 -0
- package/dist/Provider/BridgeUIProvider.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/Provider/bridgeUITypes.d.ts +8 -0
- package/dist/Provider/createBridgeUI.d.ts +3 -0
- package/dist/Provider/createBridgeUI.js +15 -0
- package/dist/Provider/createBridgeUIApi.d.ts +7 -0
- package/dist/Provider/createBridgeUIApi.js +36 -0
- package/dist/Provider/index.d.ts +5 -0
- package/dist/Provider/index.js +4 -0
- package/dist/Provider/injectionKey.d.ts +3 -0
- package/dist/Provider/injectionKey.js +4 -0
- package/dist/Provider/useBridgeUI.d.ts +2 -0
- package/dist/Provider/useBridgeUI.js +8 -0
- package/dist/Utils/index.d.ts +47 -0
- package/dist/Utils/index.js +55 -0
- package/dist/Utils/slotOrProp.d.ts +28 -0
- package/dist/Utils/slotOrProp.js +23 -0
- package/dist/Utils/useHoldRepeat.d.ts +13 -0
- package/dist/Utils/useHoldRepeat.js +38 -0
- package/dist/augments.d.ts +113 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +53 -0
- package/dist/theme.css +205 -0
- package/package.json +90 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { hasNamedSlot as e } from "../../../Utils/slotOrProp.js";
|
|
2
|
+
import { mergePartBind as t, resolveFieldAdornmentIconSize as n, useBridgeUIComponent as r, useBridgeUIMergedRegistryClasses as ee } from "../../../Utils/index.js";
|
|
3
|
+
import { formFieldBridgeKeys as te, useFormField as ne } from "../../FormField/composables/useFormField.js";
|
|
4
|
+
import { useListboxNavigation as re } from "../../Listbox/composables/useListboxNavigation.js";
|
|
5
|
+
import { computed as i, nextTick as a, onBeforeUnmount as ie, onMounted as ae, ref as o, useAttrs as oe, useId as se, useSlots as ce, watch as s } from "vue";
|
|
6
|
+
import { get as c, isNil as le, omit as ue } from "es-toolkit/compat";
|
|
7
|
+
import { adjustAutosizeTextareaHeight as de, cn as l, createSelectAsyncSearch as fe, mergeBridgeUILayeredClasses as u, normalizeSelectOptions as d, resolveSelectAsyncDebounce as pe, resolveSelectAsyncOptions as me, selectValuesEqual as f, splitComponentProps as p } from "@bridge-ui/core";
|
|
8
|
+
import { ChevronsUpDown as he } from "lucide-vue-next";
|
|
9
|
+
import { colorProps as ge, invalidatedProps as _e } from "@bridge-ui/core/Components/Listbox";
|
|
10
|
+
//#region src/Components/Select/composables/useSelect.ts
|
|
11
|
+
var ve = [
|
|
12
|
+
"classes",
|
|
13
|
+
"loading",
|
|
14
|
+
"options",
|
|
15
|
+
"multiple",
|
|
16
|
+
"asyncData",
|
|
17
|
+
"clearable",
|
|
18
|
+
"maxHeight",
|
|
19
|
+
"searchable",
|
|
20
|
+
"flipOptions",
|
|
21
|
+
"optionLabel",
|
|
22
|
+
"optionValue",
|
|
23
|
+
"placeholder",
|
|
24
|
+
"defaultValue",
|
|
25
|
+
"emptyMessage",
|
|
26
|
+
"disableMaxHeight",
|
|
27
|
+
"hideEmptyMessage",
|
|
28
|
+
"minItemsForSearch",
|
|
29
|
+
"optionDescription"
|
|
30
|
+
];
|
|
31
|
+
function m(m, h, g, _, v) {
|
|
32
|
+
let ye = oe(), y = ce(), b = se(), x = o(!1), S = o(""), C = o(-1), w = o(null), T = o(!1), E = o([]), D = null, O = o([]), k = i(() => p({
|
|
33
|
+
bridgeKeys: ve,
|
|
34
|
+
props: {
|
|
35
|
+
...ye,
|
|
36
|
+
...m
|
|
37
|
+
}
|
|
38
|
+
})), A = i(() => k.value.componentProps), j = i(() => ({ classes: A.value.classes })), { components: M, entry: be } = r({
|
|
39
|
+
componentName: "Select",
|
|
40
|
+
props: () => j.value
|
|
41
|
+
}), N = ee({
|
|
42
|
+
entry: be,
|
|
43
|
+
props: () => j.value
|
|
44
|
+
}), P = i(() => !!A.value.multiple), F = i(() => ({
|
|
45
|
+
optionLabel: A.value.optionLabel ?? "label",
|
|
46
|
+
optionValue: A.value.optionValue ?? "value",
|
|
47
|
+
optionDescription: A.value.optionDescription ?? "description"
|
|
48
|
+
})), I = i(() => v.value.length > 0 ? v.value : d(A.value.options, F.value)), L = i(() => {
|
|
49
|
+
let e = E.value.length > 0 ? E.value : I.value;
|
|
50
|
+
return A.value.flipOptions ? [...e].reverse() : e;
|
|
51
|
+
}), R = i(() => {
|
|
52
|
+
let e = h.value;
|
|
53
|
+
return P.value ? Array.isArray(e) ? e : [] : !le(e) && e !== "" ? [e] : [];
|
|
54
|
+
}), z = i(() => {
|
|
55
|
+
let e = /* @__PURE__ */ new Map();
|
|
56
|
+
for (let t of [...L.value, ...O.value]) e.set(t.value, t);
|
|
57
|
+
return R.value.map((t) => e.get(t) ?? {
|
|
58
|
+
value: t,
|
|
59
|
+
label: String(t)
|
|
60
|
+
});
|
|
61
|
+
}), B = i(() => R.value.length > 0), xe = i(() => A.value.clearable !== !1), V = i(() => !!A.value.asyncData), H = i(() => {
|
|
62
|
+
if (V.value || A.value.searchable) return !0;
|
|
63
|
+
let e = A.value.minItemsForSearch ?? 11;
|
|
64
|
+
return I.value.length >= e;
|
|
65
|
+
}), U = i(() => x.value && H.value), Se = i(() => !!A.value.loading || T.value), W = i(() => {
|
|
66
|
+
if (!U.value || !S.value.trim()) return L.value;
|
|
67
|
+
let e = S.value.trim().toLowerCase();
|
|
68
|
+
return L.value.filter((t) => t.label.toLowerCase().includes(e));
|
|
69
|
+
}), G = re(() => W.value, C, b), Ce = i(() => m.readonly || m.disabled ? !0 : !U.value), we = i(() => U.value || P.value ? S.value : z.value[0]?.label ?? ""), Te = (e) => {
|
|
70
|
+
w.value = e instanceof HTMLElement ? e : null;
|
|
71
|
+
};
|
|
72
|
+
function Ee(e) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
}
|
|
75
|
+
function De(e) {
|
|
76
|
+
if (m.disabled || m.readonly) return;
|
|
77
|
+
let t = e.target;
|
|
78
|
+
if (!t.closest("[data-select-clear]") && !(t.closest(".wrapper-start-slot") || t.closest(".wrapper-end-slot"))) {
|
|
79
|
+
if (!x.value) {
|
|
80
|
+
Z();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
U.value || (Q(), g.value?.focus({ preventScroll: !0 }));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let Oe = i(() => {
|
|
87
|
+
let n = p({
|
|
88
|
+
bridgeKeys: te,
|
|
89
|
+
props: ue(k.value.inheritedAttrs, ["class"])
|
|
90
|
+
}).componentProps, r = n.endIcon ?? (e(y, "end") ? void 0 : he);
|
|
91
|
+
return {
|
|
92
|
+
...n,
|
|
93
|
+
endIcon: r,
|
|
94
|
+
classes: N.value,
|
|
95
|
+
customProps: {
|
|
96
|
+
...n.customProps,
|
|
97
|
+
container: t(n.customProps?.container, {}, {
|
|
98
|
+
ref: Te,
|
|
99
|
+
onClick: De,
|
|
100
|
+
class: l({ "cursor-pointer": !m.disabled && !m.readonly && !U.value })
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}), K = ne(() => Oe.value, {
|
|
105
|
+
size: "md",
|
|
106
|
+
rounded: "md",
|
|
107
|
+
color: "primary",
|
|
108
|
+
variant: "outline",
|
|
109
|
+
withErrorIcon: !0
|
|
110
|
+
}, {
|
|
111
|
+
likeInput: () => P.value,
|
|
112
|
+
control: () => P.value ? "textarea" : "input"
|
|
113
|
+
}), q = (e) => {
|
|
114
|
+
!e || !P.value || de(e);
|
|
115
|
+
};
|
|
116
|
+
function J(e) {
|
|
117
|
+
return R.value.some((t) => f(t, e));
|
|
118
|
+
}
|
|
119
|
+
function Y(e) {
|
|
120
|
+
h.value = e;
|
|
121
|
+
}
|
|
122
|
+
function X(e) {
|
|
123
|
+
if (P.value) {
|
|
124
|
+
let t = Array.isArray(e) ? e : [];
|
|
125
|
+
_("update:modelValue", t), _("change", t);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let t = e ?? "";
|
|
129
|
+
_("update:modelValue", t), _("change", t);
|
|
130
|
+
}
|
|
131
|
+
function Z() {
|
|
132
|
+
m.disabled || m.readonly || x.value || (x.value = !0, S.value = "", G.highlightCurrentSelection(J), _("open"), V.value && A.value.asyncData && D?.searchImmediate(""));
|
|
133
|
+
}
|
|
134
|
+
function Q() {
|
|
135
|
+
D?.cancel(), x.value && (x.value = !1, S.value = "", C.value = -1, _("close"));
|
|
136
|
+
}
|
|
137
|
+
function ke(e) {
|
|
138
|
+
if (!e.disabled) {
|
|
139
|
+
if (P.value) {
|
|
140
|
+
let t = [...R.value], n = t.findIndex((t) => f(t, e.value));
|
|
141
|
+
n >= 0 ? (t.splice(n, 1), _("deselect", e)) : (t.push(e.value), _("select", e)), Y(t), X(t), S.value = "", C.value = -1, a(() => {
|
|
142
|
+
q(g.value), g.value?.focus({ preventScroll: !0 });
|
|
143
|
+
});
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
Y(e.value), X(e.value), _("select", e), Q();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function Ae(e) {
|
|
150
|
+
e?.preventDefault(), e?.stopPropagation(), P.value ? (Y([]), X([])) : (Y(null), X(null)), _("clear"), Q();
|
|
151
|
+
}
|
|
152
|
+
function je(e, t) {
|
|
153
|
+
if (t.preventDefault(), t.stopPropagation(), !P.value) return;
|
|
154
|
+
let n = R.value.filter((t) => !f(t, e.value));
|
|
155
|
+
Y(n), X(n), _("deselect", e), a(() => q(g.value));
|
|
156
|
+
}
|
|
157
|
+
function Me() {
|
|
158
|
+
let e = G.getHighlightedOption();
|
|
159
|
+
e && ke(e);
|
|
160
|
+
}
|
|
161
|
+
function Ne(e) {
|
|
162
|
+
S.value = e.target.value, _("search", S.value), x.value || Z(), G.resetHighlight(), V.value && D?.searchDebounced(S.value);
|
|
163
|
+
}
|
|
164
|
+
function Pe(e) {
|
|
165
|
+
if (!(m.disabled || m.readonly)) switch (e.key) {
|
|
166
|
+
case "ArrowDown":
|
|
167
|
+
e.preventDefault(), x.value ? G.moveHighlight(1) : Z();
|
|
168
|
+
break;
|
|
169
|
+
case "ArrowUp":
|
|
170
|
+
e.preventDefault(), x.value ? G.moveHighlight(-1) : Z();
|
|
171
|
+
break;
|
|
172
|
+
case "Enter":
|
|
173
|
+
e.preventDefault(), x.value ? Me() : Z();
|
|
174
|
+
break;
|
|
175
|
+
case "Escape":
|
|
176
|
+
e.preventDefault(), Q();
|
|
177
|
+
break;
|
|
178
|
+
case "Home":
|
|
179
|
+
x.value && (e.preventDefault(), G.highlightFirst());
|
|
180
|
+
break;
|
|
181
|
+
case "End":
|
|
182
|
+
x.value && (e.preventDefault(), G.highlightLast());
|
|
183
|
+
break;
|
|
184
|
+
case "Backspace":
|
|
185
|
+
if (P.value && !S.value && z.value.length > 0) {
|
|
186
|
+
e.preventDefault();
|
|
187
|
+
let t = z.value.at(-1);
|
|
188
|
+
t && je(t, e);
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
case "Tab":
|
|
192
|
+
Q();
|
|
193
|
+
break;
|
|
194
|
+
default: break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async function Fe(e) {
|
|
198
|
+
let t = A.value.asyncData;
|
|
199
|
+
if (t) {
|
|
200
|
+
T.value = !0;
|
|
201
|
+
try {
|
|
202
|
+
let { options: n, resolvedSelected: r } = await me(t, e, R.value, (e) => d(e, F.value));
|
|
203
|
+
r.length > 0 && (O.value = r), E.value = n;
|
|
204
|
+
} finally {
|
|
205
|
+
T.value = !1;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function Ie() {
|
|
210
|
+
let e = A.value.asyncData;
|
|
211
|
+
!e?.resolve || R.value.length === 0 || (O.value = d(await e.resolve(R.value), F.value));
|
|
212
|
+
}
|
|
213
|
+
let $ = i(() => {
|
|
214
|
+
let e = c(u(ge, c(M.value, [
|
|
215
|
+
"Listbox",
|
|
216
|
+
"customProps",
|
|
217
|
+
"color"
|
|
218
|
+
])), K.merged.value.color ?? "primary");
|
|
219
|
+
return K.invalidated.value ? u(_e, c(M.value, [
|
|
220
|
+
"Listbox",
|
|
221
|
+
"customProps",
|
|
222
|
+
"invalidated"
|
|
223
|
+
])) : e;
|
|
224
|
+
}), Le = i(() => $.value?.value), Re = i(() => {
|
|
225
|
+
let e = !m.disabled && !m.readonly && !U.value, n = !m.disabled && !m.readonly && U.value && H.value, r = B.value && !P.value && !U.value;
|
|
226
|
+
return t({
|
|
227
|
+
role: "combobox",
|
|
228
|
+
value: we.value,
|
|
229
|
+
"aria-controls": b,
|
|
230
|
+
"aria-expanded": x.value,
|
|
231
|
+
readonly: Ce.value,
|
|
232
|
+
onKeydown: Pe,
|
|
233
|
+
placeholder: A.value.placeholder,
|
|
234
|
+
"aria-autocomplete": H.value ? "list" : void 0,
|
|
235
|
+
"aria-activedescendant": x.value ? G.activeDescendantId.value : void 0,
|
|
236
|
+
...P.value ? {
|
|
237
|
+
rows: 1,
|
|
238
|
+
onInput: (e) => {
|
|
239
|
+
Ne(e), q(e.target);
|
|
240
|
+
}
|
|
241
|
+
} : { onInput: Ne }
|
|
242
|
+
}, K.inputBind.value, l({
|
|
243
|
+
"cursor-text": n,
|
|
244
|
+
"cursor-pointer": e,
|
|
245
|
+
"resize-none overflow-hidden": P.value,
|
|
246
|
+
[l(Le.value, N.value.value) ?? ""]: r
|
|
247
|
+
}));
|
|
248
|
+
});
|
|
249
|
+
s(() => [
|
|
250
|
+
x.value,
|
|
251
|
+
P.value,
|
|
252
|
+
g.value
|
|
253
|
+
], () => {
|
|
254
|
+
q(g.value);
|
|
255
|
+
}, { immediate: !0 }), s(() => h.value, () => {
|
|
256
|
+
Ie();
|
|
257
|
+
}, { immediate: !0 }), s(() => A.value.asyncData, (e) => {
|
|
258
|
+
if (D?.cancel(), E.value = [], Ie(), !e) {
|
|
259
|
+
D = null;
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
D = fe((e) => void Fe(e), pe(e));
|
|
263
|
+
}, { immediate: !0 }), ie(() => {
|
|
264
|
+
D?.cancel();
|
|
265
|
+
}), ae(() => {
|
|
266
|
+
q(g.value);
|
|
267
|
+
});
|
|
268
|
+
let ze = i(() => n(K.merged.value.size));
|
|
269
|
+
return {
|
|
270
|
+
open: x,
|
|
271
|
+
slots: y,
|
|
272
|
+
hasValue: B,
|
|
273
|
+
multiple: P,
|
|
274
|
+
listboxId: b,
|
|
275
|
+
formField: K,
|
|
276
|
+
isLoading: Se,
|
|
277
|
+
clearable: xe,
|
|
278
|
+
clearBind: i(() => t({}, {}, {
|
|
279
|
+
tabindex: 0,
|
|
280
|
+
role: "button",
|
|
281
|
+
"data-select-clear": !0,
|
|
282
|
+
onMousedown: Ee,
|
|
283
|
+
class: l({
|
|
284
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors duration-150": !0,
|
|
285
|
+
[$.value?.clear ?? ""]: !0,
|
|
286
|
+
[N.value.clear ?? ""]: !0
|
|
287
|
+
})
|
|
288
|
+
})),
|
|
289
|
+
isSelected: J,
|
|
290
|
+
clearValue: Ae,
|
|
291
|
+
removeChip: je,
|
|
292
|
+
triggerBind: Re,
|
|
293
|
+
selectOption: ke,
|
|
294
|
+
containerRef: w,
|
|
295
|
+
clearIconSize: ze,
|
|
296
|
+
visibleOptions: W,
|
|
297
|
+
isSearchActive: U,
|
|
298
|
+
selectedOptions: z,
|
|
299
|
+
highlightedIndex: C,
|
|
300
|
+
emptyMessage: i(() => A.value.emptyMessage ?? "No options"),
|
|
301
|
+
hideEmptyMessage: i(() => A.value.hideEmptyMessage === !0)
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
export { m as useSelect };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useSelect } from './composables/useSelect';
|
|
2
|
+
export type { SelectAsyncData, SelectClasses, SelectEmits, SelectModel, SelectOption as SelectOptionData, SelectOptionProps, SelectProps, SelectSlots, SelectValue, } from './select.types';
|
|
3
|
+
export { default as Select } from './Select.vue';
|
|
4
|
+
export { default as SelectOption } from './SelectOption.vue';
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { InputHTMLAttributes, Slot, TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
import { MergeHtmlProps, SelectAsyncData, SelectModel, SelectOption, SelectOptionInput, SelectValue } from '@bridge-ui/core';
|
|
3
|
+
import { FormFieldClasses, FormFieldCustomProps, FormFieldOwnProps, FormFieldSlots } from '../FormField/formField.types';
|
|
4
|
+
export type { SelectAsyncData, SelectModel, SelectOption, SelectOptionInput, SelectOptionLike, SelectValue, } from '@bridge-ui/core';
|
|
5
|
+
export interface SelectClasses extends FormFieldClasses {
|
|
6
|
+
/**
|
|
7
|
+
* The classes to apply to selected chips (multiple mode).
|
|
8
|
+
*/
|
|
9
|
+
chip?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The classes to apply to clear icons (rest + hover).
|
|
12
|
+
*/
|
|
13
|
+
clear?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The classes to apply to the dropdown content.
|
|
16
|
+
*/
|
|
17
|
+
content?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The classes to apply to the option item.
|
|
20
|
+
*/
|
|
21
|
+
item?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The classes to apply to the selected value text in the trigger (single mode).
|
|
24
|
+
*/
|
|
25
|
+
value?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SelectCustomProps extends FormFieldCustomProps {}
|
|
28
|
+
export interface SelectEmits {
|
|
29
|
+
/**
|
|
30
|
+
* Emitted when the selection changes.
|
|
31
|
+
*/
|
|
32
|
+
change: [value: SelectModel];
|
|
33
|
+
/**
|
|
34
|
+
* Emitted when the value is cleared.
|
|
35
|
+
*/
|
|
36
|
+
clear: [];
|
|
37
|
+
/**
|
|
38
|
+
* Emitted when the menu closes.
|
|
39
|
+
*/
|
|
40
|
+
close: [];
|
|
41
|
+
/**
|
|
42
|
+
* Emitted when an option is deselected (multiple mode).
|
|
43
|
+
*/
|
|
44
|
+
deselect: [option: SelectOption];
|
|
45
|
+
/**
|
|
46
|
+
* Emitted when the menu opens.
|
|
47
|
+
*/
|
|
48
|
+
open: [];
|
|
49
|
+
/**
|
|
50
|
+
* Emitted when the search query changes.
|
|
51
|
+
*/
|
|
52
|
+
search: [query: string];
|
|
53
|
+
/**
|
|
54
|
+
* Emitted when an option is selected.
|
|
55
|
+
*/
|
|
56
|
+
select: [option: SelectOption];
|
|
57
|
+
/**
|
|
58
|
+
* Emitted when `v-model` should update.
|
|
59
|
+
*/
|
|
60
|
+
"update:modelValue": [value: SelectModel];
|
|
61
|
+
}
|
|
62
|
+
export interface SelectOptionProps {
|
|
63
|
+
/**
|
|
64
|
+
* Secondary line below the label.
|
|
65
|
+
*/
|
|
66
|
+
description?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the option is disabled.
|
|
69
|
+
*/
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The label of the option.
|
|
73
|
+
*/
|
|
74
|
+
label: string;
|
|
75
|
+
/**
|
|
76
|
+
* The value of the option.
|
|
77
|
+
*/
|
|
78
|
+
value: SelectValue;
|
|
79
|
+
}
|
|
80
|
+
export interface SelectOwnProps extends Omit<FormFieldOwnProps, "field"> {
|
|
81
|
+
/**
|
|
82
|
+
* Remote data source. Implies `searchable`.
|
|
83
|
+
*/
|
|
84
|
+
asyncData?: SelectAsyncData;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the value can be cleared.
|
|
87
|
+
*
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
clearable?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Initial value when uncontrolled.
|
|
93
|
+
*/
|
|
94
|
+
defaultValue?: SelectModel;
|
|
95
|
+
/**
|
|
96
|
+
* When true, the dropdown options list is not height-limited.
|
|
97
|
+
* Forwarded to the internal `Listbox`.
|
|
98
|
+
*
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
disableMaxHeight?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Message when the filtered list is empty.
|
|
104
|
+
*
|
|
105
|
+
* @default "No options"
|
|
106
|
+
*/
|
|
107
|
+
emptyMessage?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Inverts the visual order of options.
|
|
110
|
+
*
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
flipOptions?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Hides the empty-state message.
|
|
116
|
+
*
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
hideEmptyMessage?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* External or async loading state.
|
|
122
|
+
*/
|
|
123
|
+
loading?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Tailwind max-height class for the dropdown options area.
|
|
126
|
+
* Forwarded to the internal `Listbox`.
|
|
127
|
+
*
|
|
128
|
+
* @default "max-h-60"
|
|
129
|
+
*/
|
|
130
|
+
maxHeight?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Minimum option count before search UI is enabled.
|
|
133
|
+
*
|
|
134
|
+
* @default 11
|
|
135
|
+
*/
|
|
136
|
+
minItemsForSearch?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Whether multiple values can be selected.
|
|
139
|
+
*
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
multiple?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Key used to read the description from option objects.
|
|
145
|
+
*
|
|
146
|
+
* @default "description"
|
|
147
|
+
*/
|
|
148
|
+
optionDescription?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Key used to read the label from option objects.
|
|
151
|
+
*
|
|
152
|
+
* @default "label"
|
|
153
|
+
*/
|
|
154
|
+
optionLabel?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The list of options to display.
|
|
157
|
+
*/
|
|
158
|
+
options?: SelectOptionInput[];
|
|
159
|
+
/**
|
|
160
|
+
* Key used to read the value from option objects.
|
|
161
|
+
*
|
|
162
|
+
* @default "value"
|
|
163
|
+
*/
|
|
164
|
+
optionValue?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Placeholder shown when no value is selected.
|
|
167
|
+
*/
|
|
168
|
+
placeholder?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Whether options can be filtered via the trigger input.
|
|
171
|
+
*
|
|
172
|
+
* @default false
|
|
173
|
+
*/
|
|
174
|
+
searchable?: boolean;
|
|
175
|
+
}
|
|
176
|
+
export interface SelectSlots extends FormFieldSlots {
|
|
177
|
+
/**
|
|
178
|
+
* Content below the trigger, above the option list.
|
|
179
|
+
*/
|
|
180
|
+
afterOptions?: Slot;
|
|
181
|
+
/**
|
|
182
|
+
* Content above the option list.
|
|
183
|
+
*/
|
|
184
|
+
beforeOptions?: Slot;
|
|
185
|
+
/**
|
|
186
|
+
* Custom chip content (multiple mode).
|
|
187
|
+
*/
|
|
188
|
+
chip?: Slot<{
|
|
189
|
+
option: SelectOption;
|
|
190
|
+
}>;
|
|
191
|
+
/**
|
|
192
|
+
* Custom empty-state content.
|
|
193
|
+
*/
|
|
194
|
+
empty?: Slot;
|
|
195
|
+
/**
|
|
196
|
+
* Custom loading content.
|
|
197
|
+
*/
|
|
198
|
+
loading?: Slot;
|
|
199
|
+
/**
|
|
200
|
+
* Custom option item content.
|
|
201
|
+
*/
|
|
202
|
+
option?: Slot<{
|
|
203
|
+
option: SelectOption;
|
|
204
|
+
selected: boolean;
|
|
205
|
+
}>;
|
|
206
|
+
}
|
|
207
|
+
export type SelectSingleProps = MergeHtmlProps<SelectOwnProps, InputHTMLAttributes> & {
|
|
208
|
+
/**
|
|
209
|
+
* Bound with `v-model` on the component.
|
|
210
|
+
*/
|
|
211
|
+
modelValue?: null | SelectValue;
|
|
212
|
+
/**
|
|
213
|
+
* Whether multiple values can be selected.
|
|
214
|
+
*
|
|
215
|
+
* @default false
|
|
216
|
+
*/
|
|
217
|
+
multiple: false;
|
|
218
|
+
};
|
|
219
|
+
export type SelectMultipleProps = MergeHtmlProps<SelectOwnProps, TextareaHTMLAttributes> & {
|
|
220
|
+
/**
|
|
221
|
+
* Bound with `v-model` on the component.
|
|
222
|
+
*/
|
|
223
|
+
modelValue?: null | SelectValue[];
|
|
224
|
+
/**
|
|
225
|
+
* Whether multiple values can be selected.
|
|
226
|
+
*
|
|
227
|
+
* @default true
|
|
228
|
+
*/
|
|
229
|
+
multiple: true;
|
|
230
|
+
};
|
|
231
|
+
export type SelectProps = SelectSingleProps | SelectMultipleProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { SelectOption } from './select.types';
|
|
3
|
+
export type SelectOptionRegistration = {
|
|
4
|
+
register: (option: SelectOption) => void;
|
|
5
|
+
unregister: (value: SelectOption["value"]) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const SELECT_OPTION_KEY: InjectionKey<SelectOptionRegistration>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SnackbarOwnProps, SnackbarSlots } from './snackbar.types';
|
|
2
|
+
type __VLS_Slots = SnackbarSlots;
|
|
3
|
+
type __VLS_Props = SnackbarOwnProps;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: boolean) => any;
|
|
10
|
+
close: () => any;
|
|
11
|
+
"show-change": (show: boolean) => any;
|
|
12
|
+
"leave-complete": () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
onClose?: (() => any) | undefined;
|
|
16
|
+
"onShow-change"?: ((show: boolean) => any) | undefined;
|
|
17
|
+
"onLeave-complete"?: (() => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
teleportTo: false | string;
|
|
20
|
+
closeButton: boolean;
|
|
21
|
+
duration: false | number;
|
|
22
|
+
position: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').SnackbarPosition, import('./snackbar.types').SnackbarPositionOverrides>;
|
|
23
|
+
progressbar: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|