@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,219 @@
|
|
|
1
|
+
import { hasNamedSlot as e, hasSlotOrProp as t } from "../../../Utils/slotOrProp.js";
|
|
2
|
+
import { mergePartBind as n, useBridgeUIComponent as r, useBridgeUIMergedRegistryClasses as i } from "../../../Utils/index.js";
|
|
3
|
+
import { computed as a, toValue as o, useId as s, useSlots as c } from "vue";
|
|
4
|
+
import { get as l, omit as u } from "es-toolkit/compat";
|
|
5
|
+
import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core";
|
|
6
|
+
import { CircleAlert as m } from "lucide-vue-next";
|
|
7
|
+
import { colorProps as h, invalidatedProps as g, roundedProps as _, sizeProps as v, variantProps as y } from "@bridge-ui/core/Components/FormField";
|
|
8
|
+
//#region src/Components/FormField/composables/useFormField.ts
|
|
9
|
+
var b = [
|
|
10
|
+
"end",
|
|
11
|
+
"size",
|
|
12
|
+
"color",
|
|
13
|
+
"error",
|
|
14
|
+
"label",
|
|
15
|
+
"start",
|
|
16
|
+
"corner",
|
|
17
|
+
"classes",
|
|
18
|
+
"endIcon",
|
|
19
|
+
"rounded",
|
|
20
|
+
"variant",
|
|
21
|
+
"disabled",
|
|
22
|
+
"readonly",
|
|
23
|
+
"required",
|
|
24
|
+
"errorIcon",
|
|
25
|
+
"startIcon",
|
|
26
|
+
"customProps",
|
|
27
|
+
"description",
|
|
28
|
+
"errorMessage",
|
|
29
|
+
"withErrorIcon",
|
|
30
|
+
"withoutErrorMessage"
|
|
31
|
+
];
|
|
32
|
+
function x(x, S, C = {}) {
|
|
33
|
+
let ee = s(), w = c(), T = a(() => p({
|
|
34
|
+
props: o(x),
|
|
35
|
+
bridgeKeys: b
|
|
36
|
+
})), { merged: E, entry: D } = r({
|
|
37
|
+
libDefaults: S,
|
|
38
|
+
componentName: "FormField",
|
|
39
|
+
props: () => T.value.componentProps
|
|
40
|
+
}), O = a(() => E.value.customProps), k = a(() => C.control?.() ?? "input"), A = i({
|
|
41
|
+
entry: D,
|
|
42
|
+
props: () => T.value.componentProps
|
|
43
|
+
}), j = a(() => E.value.error === !0), M = a(() => !!E.value.disabled), N = a(() => !!E.value.readonly), P = a(() => E.value.variant ?? "outline"), F = a(() => E.value.errorIcon ?? m), I = a(() => P.value === "notched"), L = a(() => P.value === "stacked"), R = a(() => P.value === "underlined"), z = a(() => k.value === "textarea"), B = a(() => z.value && !!C.likeInput?.()), V = a(() => !E.value.withoutErrorMessage), H = a(() => {
|
|
44
|
+
let e = T.value.inheritedAttrs.id;
|
|
45
|
+
return E.value.controlId ?? e ?? ee;
|
|
46
|
+
}), U = a(() => j.value && t(w, "errorMessage", E.value.errorMessage)), W = a(() => (I.value || L.value) && (t(w, "label", E.value.label) || t(w, "corner", E.value.corner))), G = a(() => t(w, "label", E.value.label) ? "justify-between items-end" : "justify-end"), K = a(() => {
|
|
47
|
+
let e = [];
|
|
48
|
+
return !j.value && t(w, "description", E.value.description) && e.push(`${H.value}-description`), j.value && !E.value.withoutErrorMessage && t(w, "errorMessage", E.value.errorMessage) && e.push(`${H.value}-error`), e.length > 0 ? e.join(" ") : void 0;
|
|
49
|
+
}), q = a(() => l(f(v, D.value?.customProps?.size), [E.value.size, P.value])), J = a(() => l(f(h, D.value?.customProps?.color), E.value.color ?? "primary")), Y = a(() => f(g, D.value?.customProps?.invalidated, E.value.customProps?.invalidated)), X = a(() => j.value ? Y.value : void 0), Z = a(() => l(f(_, D.value?.customProps?.rounded), E.value.rounded)), Q = a(() => l(f(y, D.value?.customProps?.variant), P.value)), te = a(() => {
|
|
50
|
+
let e = j.value ? Y.value : J.value;
|
|
51
|
+
return R.value ? e?.underlined : e?.input;
|
|
52
|
+
}), ne = a(() => {
|
|
53
|
+
if (L.value) return d({
|
|
54
|
+
[q.value?.insetTop ?? ""]: !0,
|
|
55
|
+
[q.value?.insetStart ?? ""]: !0,
|
|
56
|
+
[q.value?.insetEnd ?? ""]: !0
|
|
57
|
+
});
|
|
58
|
+
}), re = a(() => {
|
|
59
|
+
let t = C.reservedSlots?.() ?? [], n = e(w, "end") || t.includes("end"), r = e(w, "start") || t.includes("start");
|
|
60
|
+
if (!L.value) return !r && !n ? q.value?.padding : d({
|
|
61
|
+
[q.value?.insetStart ?? ""]: !r,
|
|
62
|
+
[q.value?.insetEnd ?? ""]: !n
|
|
63
|
+
});
|
|
64
|
+
}), ie = a(() => n(O.value?.end, {}, d({
|
|
65
|
+
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
66
|
+
"text-gray-500": !j.value,
|
|
67
|
+
[Z.value?.end ?? ""]: !R.value && !L.value,
|
|
68
|
+
[J.value?.end ?? ""]: !j.value,
|
|
69
|
+
[X.value?.adornment ?? ""]: j.value,
|
|
70
|
+
[A.value.end ?? ""]: !0
|
|
71
|
+
}))), ae = a(() => {
|
|
72
|
+
let e = T.value.inheritedAttrs;
|
|
73
|
+
return n(O.value?.root, {
|
|
74
|
+
class: d(e.class),
|
|
75
|
+
...u(e, ["class"])
|
|
76
|
+
}, d({
|
|
77
|
+
"group w-full relative": !0,
|
|
78
|
+
"aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
|
|
79
|
+
"aria-readonly:pointer-events-none aria-readonly:select-none": !0,
|
|
80
|
+
[A.value.root ?? ""]: !0
|
|
81
|
+
}));
|
|
82
|
+
}), oe = a(() => n(O.value?.errorMessage, {}, d({
|
|
83
|
+
"mt-2": !0,
|
|
84
|
+
"min-h-[1lh]": V.value,
|
|
85
|
+
[X.value?.errorMessage ?? ""]: !0,
|
|
86
|
+
[q.value?.text ?? ""]: !0,
|
|
87
|
+
[A.value.errorMessage ?? ""]: !0
|
|
88
|
+
}))), $ = a(() => n({
|
|
89
|
+
...O.value?.input,
|
|
90
|
+
id: H.value,
|
|
91
|
+
disabled: M.value,
|
|
92
|
+
readonly: N.value,
|
|
93
|
+
"aria-describedby": K.value,
|
|
94
|
+
"aria-invalid": j.value || void 0
|
|
95
|
+
}, u(T.value.inheritedAttrs, ["class"]), d({
|
|
96
|
+
"flex-1 min-w-0 min-h-0 bg-transparent border-0 shadow-none": !0,
|
|
97
|
+
"h-full": !z.value && !L.value,
|
|
98
|
+
"max-h-none": z.value,
|
|
99
|
+
"text-gray-900 dark:text-gray-100 placeholder:text-gray-400": !0,
|
|
100
|
+
"outline-none ring-0 focus:outline-none focus:ring-0": !0,
|
|
101
|
+
"disabled:cursor-not-allowed": !0,
|
|
102
|
+
[q.value?.input ?? ""]: !z.value,
|
|
103
|
+
[q.value?.textarea ?? ""]: z.value,
|
|
104
|
+
[q.value?.textareaLikeInput ?? ""]: B.value,
|
|
105
|
+
[A.value.input ?? ""]: !0
|
|
106
|
+
}))), se = a(() => n(O.value?.label, {}, d({
|
|
107
|
+
"inline-flex items-center gap-x-0.5 font-medium leading-none": !0,
|
|
108
|
+
"text-gray-700 dark:text-gray-300": !j.value,
|
|
109
|
+
[X.value?.label ?? ""]: j.value,
|
|
110
|
+
[q.value?.text ?? ""]: !0,
|
|
111
|
+
[Q.value?.label ?? ""]: I.value,
|
|
112
|
+
[A.value.label ?? ""]: !0
|
|
113
|
+
}))), ce = a(() => n(O.value?.start, {}, d({
|
|
114
|
+
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
115
|
+
"text-gray-400": !j.value,
|
|
116
|
+
[Z.value?.start ?? ""]: !R.value && !L.value,
|
|
117
|
+
[J.value?.start ?? ""]: !j.value,
|
|
118
|
+
[X.value?.adornment ?? ""]: j.value,
|
|
119
|
+
[A.value.start ?? ""]: !0
|
|
120
|
+
}))), le = a(() => n(O.value?.corner, {}, d({
|
|
121
|
+
"text-gray-500 dark:text-gray-400": !I.value,
|
|
122
|
+
[q.value?.text ?? ""]: !0,
|
|
123
|
+
[Q.value?.corner ?? ""]: I.value,
|
|
124
|
+
[A.value.corner ?? ""]: !0
|
|
125
|
+
}))), ue = a(() => {
|
|
126
|
+
let e = t(w, "label", E.value.label);
|
|
127
|
+
return n(O.value?.header, {}, d({
|
|
128
|
+
flex: !0,
|
|
129
|
+
"w-full shrink-0": !0,
|
|
130
|
+
"justify-between": e,
|
|
131
|
+
"justify-end": !e,
|
|
132
|
+
"items-center": I.value,
|
|
133
|
+
"items-end": L.value,
|
|
134
|
+
[Q.value?.labelRow ?? ""]: W.value,
|
|
135
|
+
[A.value.header ?? ""]: !0
|
|
136
|
+
}));
|
|
137
|
+
}), de = a(() => n(O.value?.header, {}, d({
|
|
138
|
+
flex: !0,
|
|
139
|
+
"mb-1": !0,
|
|
140
|
+
[G.value]: !0,
|
|
141
|
+
[A.value.header ?? ""]: !0
|
|
142
|
+
}))), fe = a(() => n(O.value?.endIcon, {}, d({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))), pe = a(() => n(O.value?.end, {}, d({
|
|
143
|
+
"group/end wrapper-end-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
144
|
+
"self-stretch min-h-0 overflow-hidden py-0.5 pe-0.5": L.value,
|
|
145
|
+
"h-full min-h-0 overflow-hidden py-0.5 pe-0.5": !L.value,
|
|
146
|
+
[A.value.end ?? ""]: !0
|
|
147
|
+
}))), me = a(() => n({}, {}, d({
|
|
148
|
+
[Y.value?.required ?? ""]: !0,
|
|
149
|
+
[A.value.required ?? ""]: !0
|
|
150
|
+
}))), he = a(() => n({}, {}, d({
|
|
151
|
+
"flex min-h-0 min-w-0 flex-1 flex-col": !0,
|
|
152
|
+
[ne.value ?? ""]: !0
|
|
153
|
+
}))), ge = a(() => n({}, {}, d({
|
|
154
|
+
"flex w-full min-w-0 flex-1 items-stretch gap-x-2": !0,
|
|
155
|
+
[q.value?.controlRow ?? ""]: !0
|
|
156
|
+
})));
|
|
157
|
+
return {
|
|
158
|
+
slots: w,
|
|
159
|
+
merged: E,
|
|
160
|
+
control: k,
|
|
161
|
+
endBind: ie,
|
|
162
|
+
rootBind: ae,
|
|
163
|
+
controlId: H,
|
|
164
|
+
errorBind: oe,
|
|
165
|
+
errorIcon: F,
|
|
166
|
+
inputBind: $,
|
|
167
|
+
isNotched: I,
|
|
168
|
+
isStacked: L,
|
|
169
|
+
labelBind: se,
|
|
170
|
+
startBind: ce,
|
|
171
|
+
cornerBind: le,
|
|
172
|
+
headerBind: de,
|
|
173
|
+
isDisabled: M,
|
|
174
|
+
isReadonly: N,
|
|
175
|
+
variantKey: P,
|
|
176
|
+
endIconBind: fe,
|
|
177
|
+
endSlotBind: pe,
|
|
178
|
+
invalidated: j,
|
|
179
|
+
requiredBind: me,
|
|
180
|
+
containerBind: a(() => n(O.value?.container, { "data-bridge-rounded": E.value.rounded ?? "md" }, d({
|
|
181
|
+
"group/field relative flex flex-row items-stretch overflow-hidden": L.value,
|
|
182
|
+
"group/field relative flex justify-start gap-x-2 items-stretch": !L.value,
|
|
183
|
+
"transition-all ease-in-out duration-150 outline-none": !0,
|
|
184
|
+
"bg-gray-100 dark:bg-gray-800": M.value && !j.value,
|
|
185
|
+
[q.value?.container ?? ""]: !z.value,
|
|
186
|
+
[q.value?.containerTextareaLikeInput ?? ""]: B.value,
|
|
187
|
+
[q.value?.containerTextarea ?? ""]: z.value && !B.value,
|
|
188
|
+
[Q.value?.container ?? ""]: !0,
|
|
189
|
+
[Z.value?.input ?? ""]: !R.value,
|
|
190
|
+
[re.value ?? ""]: !0,
|
|
191
|
+
[te.value ?? ""]: !0,
|
|
192
|
+
"rounded-none": R.value,
|
|
193
|
+
[X.value?.container ?? ""]: j.value && !R.value,
|
|
194
|
+
[X.value?.containerUnderlined ?? ""]: j.value && R.value,
|
|
195
|
+
[A.value.container ?? ""]: !0
|
|
196
|
+
}))),
|
|
197
|
+
startIconBind: a(() => n(O.value?.startIcon, {}, d({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))),
|
|
198
|
+
startSlotBind: a(() => n(O.value?.start, {}, d({
|
|
199
|
+
"group/start wrapper-start-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
200
|
+
"self-stretch min-h-0 overflow-hidden py-0.5 ps-0.5": L.value,
|
|
201
|
+
"h-full min-h-0 overflow-hidden py-0.5 ps-0.5": !L.value,
|
|
202
|
+
[A.value.start ?? ""]: !0
|
|
203
|
+
}))),
|
|
204
|
+
ariaDescribedBy: K,
|
|
205
|
+
descriptionBind: a(() => n(O.value?.description, {}, d({
|
|
206
|
+
"mt-2 text-gray-500 dark:text-gray-400": !0,
|
|
207
|
+
[q.value?.text ?? ""]: !0,
|
|
208
|
+
[A.value.description ?? ""]: !0
|
|
209
|
+
}))),
|
|
210
|
+
stackedBodyBind: he,
|
|
211
|
+
hasInsetLabelRow: W,
|
|
212
|
+
insetLabelRowBind: ue,
|
|
213
|
+
stackedInputRowBind: ge,
|
|
214
|
+
showErrorMessageContent: U,
|
|
215
|
+
reservesErrorMessageSpace: V
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
export { b as formFieldBridgeKeys, x as useFormField };
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-vue-next';
|
|
2
|
+
import { HTMLAttributes, InputHTMLAttributes, Slot } from 'vue';
|
|
3
|
+
import { FormFieldColor, FormFieldInvalidated, FormFieldRounded, FormFieldSize, FormFieldVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
4
|
+
import { UseFormFieldReturn } from './composables/useFormField';
|
|
5
|
+
import { IconProps } from '../Icon';
|
|
6
|
+
export interface FormFieldSizeOverrides {}
|
|
7
|
+
export interface FormFieldColorOverrides {}
|
|
8
|
+
export interface FormFieldRoundedOverrides {}
|
|
9
|
+
export interface FormFieldVariantOverrides {}
|
|
10
|
+
export interface FormFieldClasses {
|
|
11
|
+
/**
|
|
12
|
+
* The classes to apply to the input container (`<div>` wrapper).
|
|
13
|
+
*/
|
|
14
|
+
container?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Classes merged onto the corner label in the header row.
|
|
17
|
+
*/
|
|
18
|
+
corner?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Classes merged onto the helper text below the control.
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The classes to apply to the inline-end adornment (icon or slot).
|
|
25
|
+
*/
|
|
26
|
+
end?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Classes merged onto the error message below the control.
|
|
29
|
+
*/
|
|
30
|
+
errorMessage?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Classes merged onto the label + corner header row.
|
|
33
|
+
*/
|
|
34
|
+
header?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The classes to apply to the input element.
|
|
37
|
+
*/
|
|
38
|
+
input?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Classes merged onto the primary label in the header row.
|
|
41
|
+
*/
|
|
42
|
+
label?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Classes merged onto the required asterisk.
|
|
45
|
+
*/
|
|
46
|
+
required?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Classes merged onto the root wrapper.
|
|
49
|
+
*/
|
|
50
|
+
root?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The classes to apply to the inline-start adornment (icon or slot).
|
|
53
|
+
*/
|
|
54
|
+
start?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface FormFieldCustomProps {
|
|
57
|
+
/**
|
|
58
|
+
* Props forwarded to the input container (`<div>`).
|
|
59
|
+
*/
|
|
60
|
+
container?: HTMLAttributes;
|
|
61
|
+
/**
|
|
62
|
+
* Props forwarded to the corner label element.
|
|
63
|
+
*/
|
|
64
|
+
corner?: HTMLAttributes;
|
|
65
|
+
/**
|
|
66
|
+
* Props forwarded to the helper text below the control.
|
|
67
|
+
*/
|
|
68
|
+
description?: HTMLAttributes;
|
|
69
|
+
/**
|
|
70
|
+
* Props forwarded to the inline-end adornment wrapper.
|
|
71
|
+
*/
|
|
72
|
+
end?: HTMLAttributes;
|
|
73
|
+
/**
|
|
74
|
+
* Props forwarded to the inline-end `Icon` (`icon` is set by the field).
|
|
75
|
+
*/
|
|
76
|
+
endIcon?: Partial<Omit<IconProps, "icon">>;
|
|
77
|
+
/**
|
|
78
|
+
* Props forwarded to the error message element.
|
|
79
|
+
*/
|
|
80
|
+
errorMessage?: HTMLAttributes;
|
|
81
|
+
/**
|
|
82
|
+
* Props forwarded to the label + corner header row.
|
|
83
|
+
*/
|
|
84
|
+
header?: HTMLAttributes;
|
|
85
|
+
/**
|
|
86
|
+
* Props forwarded to the `<input>`.
|
|
87
|
+
*/
|
|
88
|
+
input?: Partial<InputHTMLAttributes>;
|
|
89
|
+
/**
|
|
90
|
+
* Error-state field chrome colors (label, container, adornments, …).
|
|
91
|
+
*
|
|
92
|
+
* @default undefined
|
|
93
|
+
*/
|
|
94
|
+
invalidated?: Partial<FormFieldInvalidated>;
|
|
95
|
+
/**
|
|
96
|
+
* Props forwarded to the primary label element.
|
|
97
|
+
*/
|
|
98
|
+
label?: HTMLAttributes;
|
|
99
|
+
/**
|
|
100
|
+
* Props forwarded to the root wrapper.
|
|
101
|
+
*/
|
|
102
|
+
root?: HTMLAttributes;
|
|
103
|
+
/**
|
|
104
|
+
* Props forwarded to the inline-start adornment wrapper.
|
|
105
|
+
*/
|
|
106
|
+
start?: HTMLAttributes;
|
|
107
|
+
/**
|
|
108
|
+
* Props forwarded to the inline-start `Icon` (`icon` is set by the field).
|
|
109
|
+
*/
|
|
110
|
+
startIcon?: Partial<Omit<IconProps, "icon">>;
|
|
111
|
+
}
|
|
112
|
+
export interface FormFieldOwnProps {
|
|
113
|
+
/**
|
|
114
|
+
* Classes for the field chrome and the control (includes label, container, adornments).
|
|
115
|
+
*
|
|
116
|
+
* @default undefined
|
|
117
|
+
*/
|
|
118
|
+
classes?: FormFieldClasses;
|
|
119
|
+
/**
|
|
120
|
+
* The color to apply to the field control.
|
|
121
|
+
*
|
|
122
|
+
* @default "primary"
|
|
123
|
+
*/
|
|
124
|
+
color?: MergeProps<FormFieldColor, FormFieldColorOverrides>;
|
|
125
|
+
/**
|
|
126
|
+
* Associates labels and helper text with a form control. When omitted, an id
|
|
127
|
+
* is generated automatically.
|
|
128
|
+
*
|
|
129
|
+
* @default undefined
|
|
130
|
+
*/
|
|
131
|
+
controlId?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Secondary label text at the inline end of the header row.
|
|
134
|
+
*
|
|
135
|
+
* @default undefined
|
|
136
|
+
*/
|
|
137
|
+
corner?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Extra props for internal parts (`header`, `label`, `input`, `container`, …).
|
|
140
|
+
*
|
|
141
|
+
* @default undefined
|
|
142
|
+
*/
|
|
143
|
+
customProps?: FormFieldCustomProps;
|
|
144
|
+
/**
|
|
145
|
+
* Helper text below the control (hidden when the field is invalid).
|
|
146
|
+
*
|
|
147
|
+
* @default undefined
|
|
148
|
+
*/
|
|
149
|
+
description?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the control is disabled.
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
disabled?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Inline-end text inside the field (suffix), e.g. `@mail.com`.
|
|
158
|
+
*
|
|
159
|
+
* @default undefined
|
|
160
|
+
*/
|
|
161
|
+
end?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Icon at the **inline end** (physical right in `ltr`, physical left in `rtl`).
|
|
164
|
+
*
|
|
165
|
+
* @default undefined
|
|
166
|
+
*/
|
|
167
|
+
endIcon?: LucideIcon;
|
|
168
|
+
/**
|
|
169
|
+
* When `true`, applies invalid styling on the label and hides description.
|
|
170
|
+
*
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
error?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Icon used when `withErrorIcon` is enabled and the field is invalid.
|
|
176
|
+
*
|
|
177
|
+
* @default CircleAlert
|
|
178
|
+
*/
|
|
179
|
+
errorIcon?: LucideIcon;
|
|
180
|
+
/**
|
|
181
|
+
* Error message below the control. Shown only when set (or via `#errorMessage`
|
|
182
|
+
* slot).
|
|
183
|
+
*
|
|
184
|
+
* @default undefined
|
|
185
|
+
*/
|
|
186
|
+
errorMessage?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Pre-composed field API from a parent composable (e.g. `useTextField`). Used
|
|
189
|
+
* by `<FormField :field="…" />`; not set on field wrappers such as TextField.
|
|
190
|
+
*
|
|
191
|
+
* @default undefined
|
|
192
|
+
*/
|
|
193
|
+
field?: UseFormFieldReturn;
|
|
194
|
+
/**
|
|
195
|
+
* The primary label text above the control.
|
|
196
|
+
*
|
|
197
|
+
* @default undefined
|
|
198
|
+
*/
|
|
199
|
+
label?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Whether the control is read-only.
|
|
202
|
+
*
|
|
203
|
+
* @default false
|
|
204
|
+
*/
|
|
205
|
+
readonly?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Shows a red asterisk on the label.
|
|
208
|
+
*
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
required?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The roundedness of the field control.
|
|
214
|
+
*
|
|
215
|
+
* @default "md"
|
|
216
|
+
*/
|
|
217
|
+
rounded?: MergeProps<FormFieldRounded, FormFieldRoundedOverrides>;
|
|
218
|
+
/**
|
|
219
|
+
* Typography scale for label, corner, description, and error message, and
|
|
220
|
+
* control sizing (input, container, icons).
|
|
221
|
+
*
|
|
222
|
+
* @default "md"
|
|
223
|
+
*/
|
|
224
|
+
size?: MergeProps<FormFieldSize, FormFieldSizeOverrides>;
|
|
225
|
+
/**
|
|
226
|
+
* Chrome slots (`label`, `description`, `errorMessage`, …) via `#slot` or prop;
|
|
227
|
+
* inline adornments use `#start` / `#end`.
|
|
228
|
+
*/
|
|
229
|
+
slots?: FormFieldSlots;
|
|
230
|
+
/**
|
|
231
|
+
* Inline-start text inside the field (prefix), e.g. `https://`.
|
|
232
|
+
*
|
|
233
|
+
* @default undefined
|
|
234
|
+
*/
|
|
235
|
+
start?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Icon at the **inline start** (physical left in `ltr`, physical right in `rtl`).
|
|
238
|
+
*
|
|
239
|
+
* @default undefined
|
|
240
|
+
*/
|
|
241
|
+
startIcon?: LucideIcon;
|
|
242
|
+
/**
|
|
243
|
+
* The visual variant of the field shell and control.
|
|
244
|
+
*
|
|
245
|
+
* @default "outline"
|
|
246
|
+
*/
|
|
247
|
+
variant?: MergeProps<FormFieldVariant, FormFieldVariantOverrides>;
|
|
248
|
+
/**
|
|
249
|
+
* When `true` and the field is invalid, shows an error icon at the inline end
|
|
250
|
+
* when no `endIcon` or `end` slot is present.
|
|
251
|
+
*
|
|
252
|
+
* @default true
|
|
253
|
+
*/
|
|
254
|
+
withErrorIcon?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* When `true`, does not reserve space below the control for error messages.
|
|
257
|
+
*
|
|
258
|
+
* @default false
|
|
259
|
+
*/
|
|
260
|
+
withoutErrorMessage?: boolean;
|
|
261
|
+
}
|
|
262
|
+
export interface FormFieldSlots {
|
|
263
|
+
/**
|
|
264
|
+
* Slot at the inline end of the header row (secondary label).
|
|
265
|
+
*/
|
|
266
|
+
corner?: Slot;
|
|
267
|
+
/**
|
|
268
|
+
* The form control (input, textarea, select trigger, etc.).
|
|
269
|
+
*/
|
|
270
|
+
default?: Slot;
|
|
271
|
+
/**
|
|
272
|
+
* Helper text below the control (hidden when the field is invalid).
|
|
273
|
+
*/
|
|
274
|
+
description?: Slot;
|
|
275
|
+
/**
|
|
276
|
+
* Inline-end slot for custom content (e.g. a `Button`). Prefer the `end` prop
|
|
277
|
+
* for plain suffix text.
|
|
278
|
+
*/
|
|
279
|
+
end?: Slot;
|
|
280
|
+
/**
|
|
281
|
+
* Custom error message content.
|
|
282
|
+
*/
|
|
283
|
+
errorMessage?: Slot;
|
|
284
|
+
/**
|
|
285
|
+
* Slot at the inline start of the header row (primary label).
|
|
286
|
+
*/
|
|
287
|
+
label?: Slot;
|
|
288
|
+
/**
|
|
289
|
+
* Inline-start slot for custom content (e.g. a `Button`). Prefer the `start`
|
|
290
|
+
* prop for plain prefix text.
|
|
291
|
+
*/
|
|
292
|
+
start?: Slot;
|
|
293
|
+
}
|
|
294
|
+
export type FormFieldProps = MergeHtmlProps<FormFieldOwnProps, HTMLAttributes>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useFormField } from './composables/useFormField';
|
|
2
|
+
export type { FormFieldOptions, FormFieldReservedSlotName, UseFormFieldReturn, } from './composables/useFormField';
|
|
3
|
+
export type { FormFieldClasses, FormFieldColorOverrides, FormFieldCustomProps, FormFieldOwnProps, FormFieldProps, FormFieldRoundedOverrides, FormFieldSizeOverrides, FormFieldSlots, FormFieldVariantOverrides, } from './formField.types';
|
|
4
|
+
export { default as FormField } from './FormField.vue';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IconOwnProps } from './icon.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<IconOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useIcon as e } from "./composables/useIcon.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, resolveDynamicComponent as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Icon/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /* @__PURE__ */ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Icon",
|
|
7
|
+
props: {
|
|
8
|
+
icon: { type: [Function, Object] },
|
|
9
|
+
size: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
let { merged: c, rootBind: l } = e(n, { size: "md" });
|
|
13
|
+
return (e, n) => (a(), t(o(s(c).icon), i(r(s(l))), null, 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { c as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { IconOwnProps, IconProps } from '../icon.types';
|
|
3
|
+
type IconLibDefaults = LibDefaultsShape<IconOwnProps, "size">;
|
|
4
|
+
type IconMerged = MergeLibDefaults<IconOwnProps, IconLibDefaults>;
|
|
5
|
+
export declare function useIcon(props: IconOwnProps, libDefaults: IconLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<IconMerged>;
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<IconProps, "icon" | "size">>>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as n, useAttrs as r } from "vue";
|
|
3
|
+
import { get as i } from "es-toolkit/compat";
|
|
4
|
+
import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
|
|
5
|
+
import { sizeProps as c } from "@bridge-ui/core/Components/Icon";
|
|
6
|
+
//#region src/Components/Icon/composables/useIcon.ts
|
|
7
|
+
var l = ["icon", "size"];
|
|
8
|
+
function u(u, d) {
|
|
9
|
+
let f = r(), p = n(() => s({
|
|
10
|
+
bridgeKeys: l,
|
|
11
|
+
props: {
|
|
12
|
+
...f,
|
|
13
|
+
...u
|
|
14
|
+
}
|
|
15
|
+
})), { merged: m, entry: h } = t({
|
|
16
|
+
libDefaults: d,
|
|
17
|
+
componentName: "Icon",
|
|
18
|
+
props: () => p.value.componentProps
|
|
19
|
+
}), g = n(() => i(o(c, h.value?.customProps?.size), m.value.size));
|
|
20
|
+
return {
|
|
21
|
+
merged: m,
|
|
22
|
+
rootBind: n(() => e({}, p.value.inheritedAttrs, a({ [g.value ?? ""]: !0 })))
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { u as useIcon };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-vue-next';
|
|
2
|
+
import { SVGAttributes } from 'vue';
|
|
3
|
+
import { IconSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
4
|
+
export interface IconSizeOverrides {}
|
|
5
|
+
export interface IconOwnProps {
|
|
6
|
+
/**
|
|
7
|
+
* Lucide icon component.
|
|
8
|
+
*/
|
|
9
|
+
icon: LucideIcon;
|
|
10
|
+
/**
|
|
11
|
+
* The size of the icon.
|
|
12
|
+
*
|
|
13
|
+
* @default "md"
|
|
14
|
+
*/
|
|
15
|
+
size?: MergeProps<IconSize, IconSizeOverrides>;
|
|
16
|
+
}
|
|
17
|
+
export type IconProps = MergeHtmlProps<IconOwnProps, SVGAttributes>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LabelOwnProps } from './label.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<LabelOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LabelOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { resolveNamedSlot as e } from "../../Utils/slotOrProp.js";
|
|
2
|
+
import { useLabel as t } from "./composables/useLabel.js";
|
|
3
|
+
import { createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, guardReactiveProps as o, mergeProps as s, normalizeProps as c, openBlock as l, resolveDynamicComponent as u, unref as d, useSlots as f } from "vue";
|
|
4
|
+
//#region src/Components/Label/Label.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var p = /* @__PURE__ */ a({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "Label",
|
|
8
|
+
props: {
|
|
9
|
+
classes: {},
|
|
10
|
+
error: { type: Boolean },
|
|
11
|
+
for: {},
|
|
12
|
+
required: { type: Boolean },
|
|
13
|
+
size: {}
|
|
14
|
+
},
|
|
15
|
+
setup(a) {
|
|
16
|
+
let p = f(), { merged: m, rootBind: h, requiredBind: g } = t(a, { size: "md" });
|
|
17
|
+
return (t, a) => (l(), i("label", c(o(d(h))), [(l(), n(u(d(e)(d(p), "default")))), d(m).required ? (l(), i("span", c(s({ key: 0 }, d(g))), "*", 16)) : r("", !0)], 16));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { p as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { LabelOwnProps, LabelProps } from '../label.types';
|
|
3
|
+
type LabelLibDefaults = LibDefaultsShape<LabelOwnProps, "size">;
|
|
4
|
+
type LabelMerged = MergeLibDefaults<LabelOwnProps, LabelLibDefaults>;
|
|
5
|
+
export declare function useLabel(props: LabelOwnProps, libDefaults: LabelLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<LabelMerged>;
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<LabelProps, "size" | "classes" | "error" | "required">>>;
|
|
8
|
+
requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|