@bridge-ui/vue 0.0.6 → 0.0.8
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/ai/AGENTS.md +31 -0
- package/ai/README.md +35 -0
- package/ai/guidelines/core.md +44 -0
- package/ai/llms.txt +38 -0
- package/ai/skills/bridge-ui-components/SKILL.md +37 -0
- package/ai/skills/bridge-ui-forms/SKILL.md +38 -0
- package/ai/skills/bridge-ui-overlays/SKILL.md +37 -0
- package/ai/skills/bridge-ui-setup/SKILL.md +38 -0
- package/bin/__tests__/ai.test.ts +319 -0
- package/bin/ai.mjs +469 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
- package/dist/Adapters/I18n/index.d.ts +1 -1
- package/dist/Adapters/I18n/index.js +2 -2
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +7 -3
- package/dist/Adapters/I18n/useI18nAdapter.js +12 -7
- package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
- package/dist/Adapters/index.d.ts +1 -1
- package/dist/Adapters/index.js +3 -3
- package/dist/Components/Alert/composables/useAlert.js +17 -17
- package/dist/Components/Autocomplete/Autocomplete.js +5 -0
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
- package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +763 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +386 -0
- package/dist/Components/Autocomplete/index.d.ts +4 -0
- package/dist/Components/Autocomplete/index.js +4 -0
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/Avatar/composables/useAvatar.js +13 -13
- package/dist/Components/Badge/composables/useBadge.js +8 -8
- package/dist/Components/BaseField/BaseField.js +5 -0
- package/dist/Components/BaseField/BaseField.vue.d.ts +15 -0
- package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/Components/BaseField/BaseFieldLabel.js +5 -0
- package/dist/Components/BaseField/BaseFieldLabel.vue.d.ts +7 -0
- package/dist/Components/BaseField/BaseFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/BaseField/baseField.types.d.ts +222 -0
- package/dist/Components/BaseField/composables/useBaseField.d.ts +55 -0
- package/dist/Components/BaseField/composables/useBaseField.js +131 -0
- package/dist/Components/BaseField/index.d.ts +4 -0
- package/dist/Components/BaseField/index.js +3 -0
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Button/composables/useButton.js +14 -14
- package/dist/Components/Card/composables/useCard.js +27 -27
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
- package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.js +6 -6
- package/dist/Components/Divider/composables/useDivider.js +5 -5
- package/dist/Components/Drawer/Drawer.vue.d.ts +2 -2
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +23 -23
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/FormControl/composables/useFormControl.d.ts +13 -4
- package/dist/Components/FormControl/composables/useFormControl.js +63 -59
- package/dist/Components/FormControl/formControl.types.d.ts +6 -6
- package/dist/Components/FormControl/index.d.ts +1 -1
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/composables/useFormField.d.ts +7 -3
- package/dist/Components/FormField/composables/useFormField.js +29 -29
- package/dist/Components/FormField/formField.types.d.ts +14 -14
- package/dist/Components/Icon/composables/useIcon.js +5 -5
- package/dist/Components/Label/composables/useLabel.js +5 -5
- package/dist/Components/Link/composables/useLink.js +9 -9
- package/dist/Components/List/composables/useList.js +6 -6
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.js +20 -20
- package/dist/Components/ListSection/composables/useListSection.js +8 -8
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/Components/Listbox/composables/useListbox.d.ts +10 -1
- package/dist/Components/Listbox/composables/useListbox.js +23 -23
- package/dist/Components/Listbox/index.d.ts +1 -0
- package/dist/Components/Listbox/index.js +3 -3
- package/dist/Components/Listbox/listbox.types.d.ts +6 -0
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.js +43 -43
- package/dist/Components/Modal/Modal.vue.d.ts +2 -2
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.js +18 -18
- package/dist/Components/NumberField/NumberField.vue.d.ts +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/Components/NumberField/composables/useNumberField.d.ts +4 -4
- package/dist/Components/NumberField/composables/useNumberField.js +13 -10
- package/dist/Components/OtpField/OtpField.js +5 -0
- package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
- package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Components/OtpField/composables/useOtpField.d.ts +287 -0
- package/dist/Components/OtpField/composables/useOtpField.js +154 -0
- package/dist/Components/OtpField/index.d.ts +4 -0
- package/dist/Components/OtpField/index.js +3 -0
- package/dist/Components/OtpField/otpField.types.d.ts +120 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +4 -4
- package/dist/Components/PasswordField/composables/usePasswordField.js +6 -3
- package/dist/Components/Progress/composables/useProgress.js +11 -11
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
- package/dist/Components/Radio/composables/useRadio.js +9 -9
- package/dist/Components/Select/Select.vue.d.ts +5 -5
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/Components/Select/composables/useSelect.d.ts +5 -4
- package/dist/Components/Select/composables/useSelect.js +167 -163
- package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
- package/dist/Components/Slider/Slider.js +5 -0
- package/dist/Components/Slider/Slider.vue.d.ts +25 -0
- package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/Components/Slider/composables/useSlider.d.ts +482 -0
- package/dist/Components/Slider/composables/useSlider.js +287 -0
- package/dist/Components/Slider/index.d.ts +4 -0
- package/dist/Components/Slider/index.js +3 -0
- package/dist/Components/Slider/slider.types.d.ts +169 -0
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +2 -2
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
- package/dist/Components/Spinner/composables/useSpinner.js +11 -11
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
- package/dist/Components/Switch/composables/useSwitch.js +9 -9
- package/dist/Components/Tab/composables/useTab.js +11 -11
- package/dist/Components/TabList/composables/useTabList.js +7 -7
- package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
- package/dist/Components/Tabs/Tabs.vue.d.ts +2 -2
- package/dist/Components/Tabs/composables/useTabs.js +22 -22
- package/dist/Components/TextField/TextField.vue.d.ts +1 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/TextField/composables/useTextField.d.ts +4 -4
- package/dist/Components/TextField/composables/useTextField.js +2 -2
- package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/Textarea/composables/useTextarea.d.ts +4 -4
- package/dist/Components/Textarea/composables/useTextarea.js +10 -9
- package/dist/Components/Tooltip/composables/useTooltip.js +17 -17
- package/dist/Provider/bridgeUITypes.d.ts +4 -1
- package/dist/Provider/createBridgeUIApi.js +13 -1
- package/dist/Utils/index.d.ts +3 -3
- package/dist/Utils/index.js +11 -8
- package/dist/Utils/useBreakpoint.js +7 -7
- package/dist/augments.d.ts +29 -17
- package/dist/index.d.ts +11 -3
- package/dist/index.js +88 -80
- package/docs/README.md +56 -0
- package/docs/components/Alert.md +96 -0
- package/docs/components/Autocomplete.md +198 -0
- package/docs/components/Avatar.md +60 -0
- package/docs/components/Badge.md +47 -0
- package/docs/components/BaseField.md +126 -0
- package/docs/components/BridgeUIProvider.md +151 -0
- package/docs/components/Button.md +93 -0
- package/docs/components/Card.md +287 -0
- package/docs/components/Checkbox.md +87 -0
- package/docs/components/Divider.md +56 -0
- package/docs/components/Drawer.md +137 -0
- package/docs/components/FormControl.md +66 -0
- package/docs/components/FormField.md +71 -0
- package/docs/components/I18n.md +125 -0
- package/docs/components/Icon.md +88 -0
- package/docs/components/Label.md +31 -0
- package/docs/components/Link.md +71 -0
- package/docs/components/List.md +167 -0
- package/docs/components/Menu.md +97 -0
- package/docs/components/Modal.md +154 -0
- package/docs/components/NumberField.md +80 -0
- package/docs/components/OtpField.md +133 -0
- package/docs/components/PasswordField.md +82 -0
- package/docs/components/Progress.md +68 -0
- package/docs/components/Radio.md +91 -0
- package/docs/components/Select.md +181 -0
- package/docs/components/Skeleton.md +38 -0
- package/docs/components/Slider.md +140 -0
- package/docs/components/Snackbar.md +99 -0
- package/docs/components/Spinner.md +61 -0
- package/docs/components/Switch.md +72 -0
- package/docs/components/Tabs.md +207 -0
- package/docs/components/TextField.md +72 -0
- package/docs/components/Textarea.md +80 -0
- package/docs/components/Tooltip.md +125 -0
- package/docs/components/useBreakpoint.md +100 -0
- package/docs/components/useDialogAction.md +97 -0
- package/docs/components/useDrawerAction.md +75 -0
- package/docs/components/useModalAction.md +75 -0
- package/docs/components/useSnackbarAction.md +85 -0
- package/docs/examples/i18n-dictionary.ts +48 -0
- package/docs/examples/i18n-vue-i18n.ts +34 -0
- package/docs/examples/icon-fontawesome.ts +112 -0
- package/docs/examples/icon-heroicons.ts +57 -0
- package/docs/examples/icon-lucide.ts +57 -0
- package/docs/examples/icon-phosphor.ts +57 -0
- package/docs/examples/icon-tabler.ts +57 -0
- package/package.json +13 -5
|
@@ -20,13 +20,13 @@ var x = [
|
|
|
20
20
|
u("div", h(p(f.api.containerBind.value)), [
|
|
21
21
|
b(e)(f.api.slots, "start") ? (g(), l("div", h(m({ key: 0 }, f.api.startSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "start"))))], 16)) : b(n)(f.api.merged.value.start) ? (g(), l("div", h(m({ key: 1 }, f.api.startBind.value)), y(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), l("div", h(m({ key: 2 }, f.api.startBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0),
|
|
22
22
|
_(w.$slots, "default"),
|
|
23
|
-
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.
|
|
23
|
+
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), l("div", h(m({ key: 5 }, f.api.endBind.value)), [d(b(a), m({
|
|
24
24
|
icon: f.api.errorIcon.value,
|
|
25
25
|
size: f.api.merged.value.size
|
|
26
26
|
}, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), l("div", h(m({ key: 6 }, f.api.endBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0)
|
|
27
27
|
], 16),
|
|
28
28
|
!f.api.invalidated.value && b(t)(f.api.slots, "description", f.api.merged.value.description) ? (g(), l("p", m({ key: 1 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [(g(), s(v(b(i)(f.api.slots, "description", f.api.merged.value.description))))], 16, S)) : c("", !0),
|
|
29
|
-
f.api.merged.value.
|
|
29
|
+
f.api.merged.value.hideErrorMessage ? c("", !0) : (g(), l("p", m({ key: 2 }, f.api.errorBind.value, {
|
|
30
30
|
id: `${f.api.controlId.value}-error`,
|
|
31
31
|
"aria-hidden": f.api.showErrorMessageContent.value ? void 0 : !0
|
|
32
32
|
}), [f.api.showErrorMessageContent.value ? (g(), s(v(b(i)(f.api.slots, "errorMessage", f.api.merged.value.errorMessage)), { key: 0 })) : c("", !0)], 16, C))
|
|
@@ -21,7 +21,7 @@ var x = [
|
|
|
21
21
|
u("div", h(p(f.api.stackedBodyBind.value)), [f.api.hasInsetLabelRow.value ? (g(), l("div", h(m({ key: 0 }, f.api.insetLabelRowBind.value)), [d(o, { api: f.api }, null, 8, ["api"]), b(t)(f.api.slots, "corner", f.api.merged.value.corner) ? (g(), l("span", h(m({ key: 0 }, f.api.cornerBind.value)), [(g(), s(v(b(i)(f.api.slots, "corner", f.api.merged.value.corner))))], 16)) : c("", !0)], 16)) : c("", !0), u("div", h(p(f.api.stackedInputRowBind.value)), [
|
|
22
22
|
b(n)(f.api.merged.value.start) ? (g(), l("div", h(m({ key: 0 }, f.api.startBind.value)), y(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), l("div", h(m({ key: 1 }, f.api.startBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0),
|
|
23
23
|
_(w.$slots, "default"),
|
|
24
|
-
b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 2 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.
|
|
24
|
+
b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 2 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), l("div", h(m({ key: 3 }, f.api.endBind.value)), [d(b(a), m({
|
|
25
25
|
icon: f.api.errorIcon.value,
|
|
26
26
|
size: f.api.merged.value.size
|
|
27
27
|
}, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0)
|
|
@@ -29,7 +29,7 @@ var x = [
|
|
|
29
29
|
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 1 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : c("", !0)
|
|
30
30
|
], 16),
|
|
31
31
|
!f.api.invalidated.value && b(t)(f.api.slots, "description", f.api.merged.value.description) ? (g(), l("p", m({ key: 0 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [(g(), s(v(b(i)(f.api.slots, "description", f.api.merged.value.description))))], 16, S)) : c("", !0),
|
|
32
|
-
f.api.merged.value.
|
|
32
|
+
f.api.merged.value.hideErrorMessage ? c("", !0) : (g(), l("p", m({ key: 1 }, f.api.errorBind.value, {
|
|
33
33
|
id: `${f.api.controlId.value}-error`,
|
|
34
34
|
"aria-hidden": f.api.showErrorMessageContent.value ? void 0 : !0
|
|
35
35
|
}), [f.api.showErrorMessageContent.value ? (g(), s(v(b(i)(f.api.slots, "errorMessage", f.api.merged.value.errorMessage)), { key: 0 })) : c("", !0)], 16, C))
|
package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -20,13 +20,13 @@ var x = [
|
|
|
20
20
|
u("div", h(p(f.api.containerBind.value)), [
|
|
21
21
|
b(e)(f.api.slots, "start") ? (g(), l("div", h(m({ key: 0 }, f.api.startSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "start"))))], 16)) : b(n)(f.api.merged.value.start) ? (g(), l("div", h(m({ key: 1 }, f.api.startBind.value)), y(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), l("div", h(m({ key: 2 }, f.api.startBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0),
|
|
22
22
|
_(w.$slots, "default"),
|
|
23
|
-
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.
|
|
23
|
+
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), l("div", h(m({ key: 5 }, f.api.endBind.value)), [d(b(a), m({
|
|
24
24
|
icon: f.api.errorIcon.value,
|
|
25
25
|
size: f.api.merged.value.size
|
|
26
26
|
}, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), l("div", h(m({ key: 6 }, f.api.endBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0)
|
|
27
27
|
], 16),
|
|
28
28
|
!f.api.invalidated.value && b(t)(f.api.slots, "description", f.api.merged.value.description) ? (g(), l("p", m({ key: 1 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [(g(), s(v(b(i)(f.api.slots, "description", f.api.merged.value.description))))], 16, S)) : c("", !0),
|
|
29
|
-
f.api.merged.value.
|
|
29
|
+
f.api.merged.value.hideErrorMessage ? c("", !0) : (g(), l("p", m({ key: 2 }, f.api.errorBind.value, {
|
|
30
30
|
id: `${f.api.controlId.value}-error`,
|
|
31
31
|
"aria-hidden": f.api.showErrorMessageContent.value ? void 0 : !0
|
|
32
32
|
}), [f.api.showErrorMessageContent.value ? (g(), s(v(b(i)(f.api.slots, "errorMessage", f.api.merged.value.errorMessage)), { key: 0 })) : c("", !0)], 16, C))
|
|
@@ -4,6 +4,10 @@ import { FormFieldOwnProps, FormFieldSlots } from '../formField.types';
|
|
|
4
4
|
import { LabelProps } from '../../Label/label.types';
|
|
5
5
|
export type FormFieldReservedSlotName = Exclude<keyof FormFieldSlots, "default">;
|
|
6
6
|
export type FormFieldOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Public registry key that owns FormField chrome defaults/tokens.
|
|
9
|
+
*/
|
|
10
|
+
componentName?: "Select" | "Textarea" | "TextField" | "NumberField" | "Autocomplete" | "PasswordField";
|
|
7
11
|
/**
|
|
8
12
|
* Native control rendered by the field composable (`<input>` vs `<textarea>`).
|
|
9
13
|
*
|
|
@@ -20,8 +24,8 @@ export type FormFieldOptions = {
|
|
|
20
24
|
*/
|
|
21
25
|
reservedSlots?: () => undefined | readonly FormFieldReservedSlotName[];
|
|
22
26
|
};
|
|
23
|
-
export declare const formFieldBridgeKeys: readonly ["end", "size", "color", "error", "label", "start", "corner", "classes", "endIcon", "rounded", "variant", "disabled", "readonly", "required", "errorIcon", "startIcon", "customProps", "description", "errorMessage", "
|
|
24
|
-
type FormFieldLibDefaults = LibDefaultsShape<FormFieldOwnProps, "size" | "color" | "rounded" | "variant" | "errorIcon" | "
|
|
27
|
+
export declare const formFieldBridgeKeys: readonly ["end", "size", "color", "error", "label", "start", "corner", "classes", "endIcon", "rounded", "variant", "disabled", "readonly", "required", "errorIcon", "startIcon", "customProps", "description", "errorMessage", "showErrorIcon", "hideErrorMessage"];
|
|
28
|
+
type FormFieldLibDefaults = LibDefaultsShape<FormFieldOwnProps, "size" | "color" | "rounded" | "variant" | "errorIcon" | "showErrorIcon">;
|
|
25
29
|
type FormFieldMerged = MergeLibDefaults<FormFieldOwnProps, FormFieldLibDefaults>;
|
|
26
30
|
export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnProps, "field">>, libDefaults: FormFieldLibDefaults, options?: FormFieldOptions): {
|
|
27
31
|
slots: Readonly<{
|
|
@@ -443,7 +447,7 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
|
|
|
443
447
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
444
448
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
445
449
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
446
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
450
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "required" | "corner" | "description" | "errorMessage" | "start" | "endIcon" | "errorIcon" | "hideErrorMessage" | "readonly" | "showErrorIcon" | "startIcon">>>>;
|
|
447
451
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
448
452
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
449
453
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { hasNamedSlot as e, hasSlotOrProp as t } from "../../../Utils/slotOrProp.js";
|
|
2
2
|
import { mergeNestedComponentProps as n, mergePartBind as r, useBridgeUIComponent as i, useBridgeUIMergedRegistryClasses as a } from "../../../Utils/index.js";
|
|
3
3
|
import { computed as o, toValue as s, useId as c, useSlots as l } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
|
|
5
|
+
import { get as p, omit as m } from "es-toolkit/compat";
|
|
6
6
|
import { colorProps as h, invalidatedProps as g, roundedProps as _, sizeProps as v, variantProps as y } from "@bridge-ui/core/Tokens/FormField";
|
|
7
7
|
//#region src/Components/FormField/composables/useFormField.ts
|
|
8
8
|
var b = [
|
|
@@ -25,42 +25,42 @@ var b = [
|
|
|
25
25
|
"customProps",
|
|
26
26
|
"description",
|
|
27
27
|
"errorMessage",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"showErrorIcon",
|
|
29
|
+
"hideErrorMessage"
|
|
30
30
|
];
|
|
31
31
|
function x(x, S, C = {}) {
|
|
32
|
-
let ee = c(), w = l(), T = o(() =>
|
|
32
|
+
let ee = c(), w = l(), T = o(() => f({
|
|
33
33
|
props: s(x),
|
|
34
34
|
bridgeKeys: b
|
|
35
35
|
})), { merged: E, entry: D } = i({
|
|
36
36
|
libDefaults: S,
|
|
37
|
-
componentName:
|
|
37
|
+
componentName: C.componentName,
|
|
38
38
|
props: () => T.value.componentProps
|
|
39
39
|
}), O = o(() => E.value.customProps), k = o(() => C.control?.() ?? "input"), A = a({
|
|
40
40
|
entry: D,
|
|
41
41
|
props: () => T.value.componentProps
|
|
42
|
-
}), j = o(() => E.value.error === !0), M = o(() => !!E.value.disabled), N = o(() => !!E.value.readonly), P = o(() => E.value.variant ?? "outline"), F = o(() => E.value.errorIcon ?? "alert"), I = o(() => P.value === "notched"), L = o(() => P.value === "stacked"), R = o(() => P.value === "underlined"), z = o(() => k.value === "textarea"), B = o(() => z.value && !!C.likeInput?.()), V = o(() => !E.value.
|
|
42
|
+
}), j = o(() => E.value.error === !0), M = o(() => !!E.value.disabled), N = o(() => !!E.value.readonly), P = o(() => E.value.variant ?? "outline"), F = o(() => E.value.errorIcon ?? "alert"), I = o(() => P.value === "notched"), L = o(() => P.value === "stacked"), R = o(() => P.value === "underlined"), z = o(() => k.value === "textarea"), B = o(() => z.value && !!C.likeInput?.()), V = o(() => !E.value.hideErrorMessage), H = o(() => {
|
|
43
43
|
let e = T.value.inheritedAttrs.id;
|
|
44
44
|
return E.value.controlId ?? e ?? ee;
|
|
45
45
|
}), U = o(() => j.value && t(w, "errorMessage", E.value.errorMessage)), W = o(() => (I.value || L.value) && (t(w, "label", E.value.label) || t(w, "corner", E.value.corner))), G = o(() => t(w, "label", E.value.label) ? "justify-between items-end" : "justify-end"), K = o(() => {
|
|
46
46
|
let e = [];
|
|
47
|
-
return !j.value && t(w, "description", E.value.description) && e.push(`${H.value}-description`), j.value && !E.value.
|
|
48
|
-
}), q = o(() =>
|
|
47
|
+
return !j.value && t(w, "description", E.value.description) && e.push(`${H.value}-description`), j.value && !E.value.hideErrorMessage && t(w, "errorMessage", E.value.errorMessage) && e.push(`${H.value}-error`), e.length > 0 ? e.join(" ") : void 0;
|
|
48
|
+
}), q = o(() => p(d(v, D.value?.tokens?.size), [E.value.size, P.value])), J = o(() => p(d(h, D.value?.tokens?.color), E.value.color ?? "primary")), Y = o(() => d(g, D.value?.tokens?.invalidated, E.value.customProps?.invalidated)), X = o(() => j.value ? Y.value : void 0), Z = o(() => p(d(_, D.value?.tokens?.rounded), E.value.rounded)), Q = o(() => p(d(y, D.value?.tokens?.variant), P.value)), te = o(() => {
|
|
49
49
|
let e = j.value ? Y.value : J.value;
|
|
50
50
|
return R.value ? e?.underlined : e?.input;
|
|
51
51
|
}), ne = o(() => {
|
|
52
|
-
if (L.value) return
|
|
52
|
+
if (L.value) return u({
|
|
53
53
|
[q.value?.insetTop ?? ""]: !0,
|
|
54
54
|
[q.value?.insetStart ?? ""]: !0,
|
|
55
55
|
[q.value?.insetEnd ?? ""]: !0
|
|
56
56
|
});
|
|
57
57
|
}), re = o(() => {
|
|
58
58
|
let t = C.reservedSlots?.() ?? [], n = e(w, "end") || t.includes("end"), r = e(w, "start") || t.includes("start");
|
|
59
|
-
if (!L.value) return !r && !n ? q.value?.padding :
|
|
59
|
+
if (!L.value) return !r && !n ? q.value?.padding : u({
|
|
60
60
|
[q.value?.insetStart ?? ""]: !r,
|
|
61
61
|
[q.value?.insetEnd ?? ""]: !n
|
|
62
62
|
});
|
|
63
|
-
}), ie = o(() => r(O.value?.end, {},
|
|
63
|
+
}), ie = o(() => r(O.value?.end, {}, u({
|
|
64
64
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
65
65
|
"text-gray-500": !j.value,
|
|
66
66
|
[Z.value?.end ?? ""]: !R.value && !L.value,
|
|
@@ -70,15 +70,15 @@ function x(x, S, C = {}) {
|
|
|
70
70
|
}))), ae = o(() => {
|
|
71
71
|
let e = T.value.inheritedAttrs;
|
|
72
72
|
return r(O.value?.root, {
|
|
73
|
-
class:
|
|
74
|
-
...
|
|
75
|
-
},
|
|
73
|
+
class: u(e.class),
|
|
74
|
+
...m(e, ["class"])
|
|
75
|
+
}, u({
|
|
76
76
|
"group w-full relative": !0,
|
|
77
77
|
"aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
|
|
78
78
|
"aria-readonly:pointer-events-none aria-readonly:select-none": !0,
|
|
79
79
|
[A.value.root ?? ""]: !0
|
|
80
80
|
}));
|
|
81
|
-
}), oe = o(() => r(O.value?.errorMessage, {},
|
|
81
|
+
}), oe = o(() => r(O.value?.errorMessage, {}, u({
|
|
82
82
|
"mt-2": !0,
|
|
83
83
|
"min-h-[1lh]": V.value,
|
|
84
84
|
[X.value?.errorMessage ?? ""]: !0,
|
|
@@ -91,7 +91,7 @@ function x(x, S, C = {}) {
|
|
|
91
91
|
readonly: N.value,
|
|
92
92
|
"aria-describedby": K.value,
|
|
93
93
|
"aria-invalid": j.value || void 0
|
|
94
|
-
},
|
|
94
|
+
}, m(T.value.inheritedAttrs, ["class"]), u({
|
|
95
95
|
"flex-1 min-w-0 min-h-0 bg-transparent border-0 shadow-none": !0,
|
|
96
96
|
"h-full": !z.value && !L.value,
|
|
97
97
|
"max-h-none": z.value,
|
|
@@ -109,26 +109,26 @@ function x(x, S, C = {}) {
|
|
|
109
109
|
required: E.value.required,
|
|
110
110
|
classes: {
|
|
111
111
|
required: A.value.required,
|
|
112
|
-
root:
|
|
112
|
+
root: u({
|
|
113
113
|
[Q.value?.label ?? ""]: I.value,
|
|
114
114
|
[A.value.label ?? ""]: !0
|
|
115
115
|
})
|
|
116
116
|
}
|
|
117
|
-
})), ce = o(() => r(O.value?.start, {},
|
|
117
|
+
})), ce = o(() => r(O.value?.start, {}, u({
|
|
118
118
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
119
119
|
"text-gray-400": !j.value,
|
|
120
120
|
[Z.value?.start ?? ""]: !R.value && !L.value,
|
|
121
121
|
[J.value?.start ?? ""]: !j.value,
|
|
122
122
|
[X.value?.adornment ?? ""]: j.value,
|
|
123
123
|
[A.value.start ?? ""]: !0
|
|
124
|
-
}))), le = o(() => r(O.value?.corner, {},
|
|
124
|
+
}))), le = o(() => r(O.value?.corner, {}, u({
|
|
125
125
|
"text-gray-500 dark:text-gray-400": !I.value,
|
|
126
126
|
[q.value?.text ?? ""]: !0,
|
|
127
127
|
[Q.value?.corner ?? ""]: I.value,
|
|
128
128
|
[A.value.corner ?? ""]: !0
|
|
129
129
|
}))), ue = o(() => {
|
|
130
130
|
let e = t(w, "label", E.value.label);
|
|
131
|
-
return r(O.value?.header, {},
|
|
131
|
+
return r(O.value?.header, {}, u({
|
|
132
132
|
flex: !0,
|
|
133
133
|
"w-full shrink-0": !0,
|
|
134
134
|
"justify-between": e,
|
|
@@ -138,20 +138,20 @@ function x(x, S, C = {}) {
|
|
|
138
138
|
[Q.value?.labelRow ?? ""]: W.value,
|
|
139
139
|
[A.value.header ?? ""]: !0
|
|
140
140
|
}));
|
|
141
|
-
}), de = o(() => r(O.value?.header, {},
|
|
141
|
+
}), de = o(() => r(O.value?.header, {}, u({
|
|
142
142
|
flex: !0,
|
|
143
143
|
"mb-1": !0,
|
|
144
144
|
[G.value]: !0,
|
|
145
145
|
[A.value.header ?? ""]: !0
|
|
146
|
-
}))), fe = o(() => r(O.value?.endIcon, {},
|
|
146
|
+
}))), fe = o(() => r(O.value?.endIcon, {}, u({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))), pe = o(() => r(O.value?.end, {}, u({
|
|
147
147
|
"group/end wrapper-end-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
148
148
|
"self-stretch min-h-0 overflow-hidden py-0.5 pe-0.5": L.value,
|
|
149
149
|
"h-full min-h-0 overflow-hidden py-0.5 pe-0.5": !L.value,
|
|
150
150
|
[A.value.end ?? ""]: !0
|
|
151
|
-
}))), me = o(() => r({}, {},
|
|
151
|
+
}))), me = o(() => r({}, {}, u({
|
|
152
152
|
"flex min-h-0 min-w-0 flex-1 flex-col": !0,
|
|
153
153
|
[ne.value ?? ""]: !0
|
|
154
|
-
}))), he = o(() => r({}, {},
|
|
154
|
+
}))), he = o(() => r({}, {}, u({
|
|
155
155
|
"flex w-full min-w-0 flex-1 items-stretch gap-x-2": !0,
|
|
156
156
|
[q.value?.controlRow ?? ""]: !0
|
|
157
157
|
})));
|
|
@@ -176,7 +176,7 @@ function x(x, S, C = {}) {
|
|
|
176
176
|
endIconBind: fe,
|
|
177
177
|
endSlotBind: pe,
|
|
178
178
|
invalidated: j,
|
|
179
|
-
containerBind: o(() => r(O.value?.container, { "data-bridge-rounded": E.value.rounded ?? "md" },
|
|
179
|
+
containerBind: o(() => r(O.value?.container, { "data-bridge-rounded": E.value.rounded ?? "md" }, u({
|
|
180
180
|
"group/field relative flex flex-row items-stretch overflow-hidden": L.value,
|
|
181
181
|
"group/field relative flex justify-start gap-x-2 items-stretch": !L.value,
|
|
182
182
|
"transition-all ease-in-out duration-150 outline-none": !0,
|
|
@@ -193,8 +193,8 @@ function x(x, S, C = {}) {
|
|
|
193
193
|
[X.value?.containerUnderlined ?? ""]: j.value && R.value,
|
|
194
194
|
[A.value.container ?? ""]: !0
|
|
195
195
|
}))),
|
|
196
|
-
startIconBind: o(() => r(O.value?.startIcon, {},
|
|
197
|
-
startSlotBind: o(() => r(O.value?.start, {},
|
|
196
|
+
startIconBind: o(() => r(O.value?.startIcon, {}, u({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))),
|
|
197
|
+
startSlotBind: o(() => r(O.value?.start, {}, u({
|
|
198
198
|
"group/start wrapper-start-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
199
199
|
"self-stretch min-h-0 overflow-hidden py-0.5 ps-0.5": L.value,
|
|
200
200
|
"h-full min-h-0 overflow-hidden py-0.5 ps-0.5": !L.value,
|
|
@@ -202,7 +202,7 @@ function x(x, S, C = {}) {
|
|
|
202
202
|
}))),
|
|
203
203
|
fieldLabelProps: se,
|
|
204
204
|
ariaDescribedBy: K,
|
|
205
|
-
descriptionBind: o(() => r(O.value?.description, {},
|
|
205
|
+
descriptionBind: o(() => r(O.value?.description, {}, u({
|
|
206
206
|
"mt-2 text-gray-500 dark:text-gray-400": !0,
|
|
207
207
|
[q.value?.text ?? ""]: !0,
|
|
208
208
|
[A.value.description ?? ""]: !0
|
|
@@ -175,7 +175,7 @@ export interface FormFieldOwnProps {
|
|
|
175
175
|
*/
|
|
176
176
|
error?: boolean;
|
|
177
177
|
/**
|
|
178
|
-
* Icon used when `
|
|
178
|
+
* Icon used when `showErrorIcon` is enabled and the field is invalid.
|
|
179
179
|
*
|
|
180
180
|
* @default "alert"
|
|
181
181
|
*/
|
|
@@ -194,6 +194,12 @@ export interface FormFieldOwnProps {
|
|
|
194
194
|
* @default undefined
|
|
195
195
|
*/
|
|
196
196
|
field?: UseFormFieldReturn;
|
|
197
|
+
/**
|
|
198
|
+
* When `true`, does not reserve space below the control for error messages.
|
|
199
|
+
*
|
|
200
|
+
* @default false
|
|
201
|
+
*/
|
|
202
|
+
hideErrorMessage?: boolean;
|
|
197
203
|
/**
|
|
198
204
|
* The primary label text above the control.
|
|
199
205
|
*
|
|
@@ -218,6 +224,13 @@ export interface FormFieldOwnProps {
|
|
|
218
224
|
* @default "md"
|
|
219
225
|
*/
|
|
220
226
|
rounded?: MergeProps<FormFieldRounded, FormFieldRoundedOverrides>;
|
|
227
|
+
/**
|
|
228
|
+
* When `true` and the field is invalid, shows an error icon at the inline end
|
|
229
|
+
* when no `endIcon` or `end` slot is present.
|
|
230
|
+
*
|
|
231
|
+
* @default true
|
|
232
|
+
*/
|
|
233
|
+
showErrorIcon?: boolean;
|
|
221
234
|
/**
|
|
222
235
|
* Typography scale for label, corner, description, and error message, and
|
|
223
236
|
* control sizing (input, container, icons).
|
|
@@ -248,19 +261,6 @@ export interface FormFieldOwnProps {
|
|
|
248
261
|
* @default "outline"
|
|
249
262
|
*/
|
|
250
263
|
variant?: MergeProps<FormFieldVariant, FormFieldVariantOverrides>;
|
|
251
|
-
/**
|
|
252
|
-
* When `true` and the field is invalid, shows an error icon at the inline end
|
|
253
|
-
* when no `endIcon` or `end` slot is present.
|
|
254
|
-
*
|
|
255
|
-
* @default true
|
|
256
|
-
*/
|
|
257
|
-
withErrorIcon?: boolean;
|
|
258
|
-
/**
|
|
259
|
-
* When `true`, does not reserve space below the control for error messages.
|
|
260
|
-
*
|
|
261
|
-
* @default false
|
|
262
|
-
*/
|
|
263
|
-
withoutErrorMessage?: boolean;
|
|
264
264
|
}
|
|
265
265
|
export interface FormFieldSlots {
|
|
266
266
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useIconAdapter as e } from "../../../Adapters/Icon/useIconAdapter.js";
|
|
2
2
|
import { mergePartBind as t, useBridgeUIComponent as n } from "../../../Utils/index.js";
|
|
3
3
|
import { computed as r, useAttrs as i } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as a, mergeBridgeUILayeredClasses as o, resolveIconSource as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
+
import { get as l } from "es-toolkit/compat";
|
|
6
6
|
import { sizeProps as u } from "@bridge-ui/core/Tokens/Icon";
|
|
7
7
|
//#region src/Components/Icon/composables/useIcon.ts
|
|
8
8
|
var d = ["icon", "size"];
|
|
9
9
|
function f(f, p) {
|
|
10
|
-
let m = i(), h = r(() =>
|
|
10
|
+
let m = i(), h = r(() => c({
|
|
11
11
|
bridgeKeys: d,
|
|
12
12
|
props: {
|
|
13
13
|
...m,
|
|
@@ -17,10 +17,10 @@ function f(f, p) {
|
|
|
17
17
|
libDefaults: p,
|
|
18
18
|
componentName: "Icon",
|
|
19
19
|
props: () => h.value.componentProps
|
|
20
|
-
}), v = e(), y = r(() =>
|
|
20
|
+
}), v = e(), y = r(() => s(g.value.icon, v.value)), b = r(() => l(o(u, _.value?.tokens?.size), g.value.size));
|
|
21
21
|
return {
|
|
22
22
|
merged: g,
|
|
23
|
-
rootBind: r(() => t({}, h.value.inheritedAttrs,
|
|
23
|
+
rootBind: r(() => t({}, h.value.inheritedAttrs, a({ [b.value ?? ""]: !0 }))),
|
|
24
24
|
resolvedIcon: y
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
|
|
4
|
+
import { get as c } from "es-toolkit/compat";
|
|
5
5
|
import { invalidatedProps as l, sizeProps as u } from "@bridge-ui/core/Tokens/Label";
|
|
6
6
|
//#region src/Components/Label/composables/useLabel.ts
|
|
7
7
|
var d = [
|
|
@@ -11,7 +11,7 @@ var d = [
|
|
|
11
11
|
"required"
|
|
12
12
|
];
|
|
13
13
|
function f(f, p) {
|
|
14
|
-
let m = i(), h = r(() =>
|
|
14
|
+
let m = i(), h = r(() => s({
|
|
15
15
|
bridgeKeys: d,
|
|
16
16
|
props: {
|
|
17
17
|
...m,
|
|
@@ -24,13 +24,13 @@ function f(f, p) {
|
|
|
24
24
|
}), v = n({
|
|
25
25
|
entry: _,
|
|
26
26
|
props: () => h.value.componentProps
|
|
27
|
-
}), y = r(() =>
|
|
27
|
+
}), y = r(() => c(o(u, _.value?.tokens?.size), g.value.size)), b = r(() => o(l, _.value?.tokens?.invalidated)), x = r(() => e({}, {}, a({
|
|
28
28
|
[b.value.required ?? ""]: !0,
|
|
29
29
|
[v.value.required ?? ""]: !0
|
|
30
30
|
})));
|
|
31
31
|
return {
|
|
32
32
|
merged: g,
|
|
33
|
-
rootBind: r(() => e({}, h.value.inheritedAttrs,
|
|
33
|
+
rootBind: r(() => e({}, h.value.inheritedAttrs, a({
|
|
34
34
|
"inline-flex items-center gap-x-0.5 font-medium leading-none": !0,
|
|
35
35
|
"text-gray-700 dark:text-gray-300": !g.value.error,
|
|
36
36
|
[b.value.label ?? ""]: g.value.error,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, useAttrs as i, useSlots as a } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
4
|
+
import { get as l } from "es-toolkit/compat";
|
|
5
5
|
import { colorProps as u, sizeProps as d, underlineProps as f } from "@bridge-ui/core/Tokens/Link";
|
|
6
6
|
//#region src/Components/Link/composables/useLink.ts
|
|
7
7
|
var p = [
|
|
@@ -17,7 +17,7 @@ var p = [
|
|
|
17
17
|
"customProps"
|
|
18
18
|
];
|
|
19
19
|
function m(m, h) {
|
|
20
|
-
let g = i(), _ = a(), v = r(() =>
|
|
20
|
+
let g = i(), _ = a(), v = r(() => c({
|
|
21
21
|
bridgeKeys: p,
|
|
22
22
|
props: {
|
|
23
23
|
...g,
|
|
@@ -34,28 +34,28 @@ function m(m, h) {
|
|
|
34
34
|
if (y.value.external && !C.value) return "_blank";
|
|
35
35
|
}), D = r(() => {
|
|
36
36
|
if (y.value.external && !C.value) return "noopener noreferrer";
|
|
37
|
-
}), O = r(() =>
|
|
37
|
+
}), O = r(() => l(s(d, b.value?.tokens?.size), y.value.size)), k = r(() => l(s(u, b.value?.tokens?.color), y.value.color)), A = r(() => l(s(f, b.value?.tokens?.underline), y.value.underline));
|
|
38
38
|
return {
|
|
39
39
|
slots: _,
|
|
40
40
|
merged: y,
|
|
41
41
|
rootRel: D,
|
|
42
|
-
rootBind: r(() => e(x.value?.root, v.value.inheritedAttrs,
|
|
42
|
+
rootBind: r(() => e(x.value?.root, v.value.inheritedAttrs, o({
|
|
43
43
|
"inline-flex items-center gap-x-1 font-medium": !0,
|
|
44
44
|
"transition-colors duration-200": !0,
|
|
45
45
|
[O.value ?? ""]: !0,
|
|
46
46
|
[A.value ?? ""]: !0,
|
|
47
|
-
[
|
|
48
|
-
[
|
|
47
|
+
[l(k.value, "base") ?? ""]: !0,
|
|
48
|
+
[l(k.value, "hover") ?? ""]: !0,
|
|
49
49
|
"aria-disabled:opacity-80 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none": !0,
|
|
50
50
|
[S.value.root ?? ""]: !0
|
|
51
51
|
}))),
|
|
52
52
|
rootHref: T,
|
|
53
53
|
rootTarget: E,
|
|
54
|
-
leftIconBind: r(() => e(x.value?.leftIcon, {},
|
|
54
|
+
leftIconBind: r(() => e(x.value?.leftIcon, {}, o({
|
|
55
55
|
"shrink-0": !0,
|
|
56
56
|
[S.value.leftIcon ?? ""]: !0
|
|
57
57
|
}))),
|
|
58
|
-
rightIconBind: r(() => e(x.value?.rightIcon, {},
|
|
58
|
+
rightIconBind: r(() => e(x.value?.rightIcon, {}, o({
|
|
59
59
|
"shrink-0": !0,
|
|
60
60
|
[S.value.rightIcon ?? ""]: !0
|
|
61
61
|
}))),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { LIST_INJECTION_KEY as r } from "../listInjectionKey.js";
|
|
3
3
|
import { computed as i, provide as a, useAttrs as o } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
+
import { get as l, omit as u } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/List/composables/useList.ts
|
|
7
7
|
var d = [
|
|
8
8
|
"as",
|
|
@@ -12,7 +12,7 @@ var d = [
|
|
|
12
12
|
"customProps"
|
|
13
13
|
];
|
|
14
14
|
function f(f) {
|
|
15
|
-
let p = o(), m = i(() =>
|
|
15
|
+
let p = o(), m = i(() => c({
|
|
16
16
|
bridgeKeys: d,
|
|
17
17
|
props: {
|
|
18
18
|
...p,
|
|
@@ -26,13 +26,13 @@ function f(f) {
|
|
|
26
26
|
props: () => m.value.componentProps
|
|
27
27
|
});
|
|
28
28
|
a(r, i(() => ({ dense: h.value.dense === !0 })));
|
|
29
|
-
let y = i(() =>
|
|
29
|
+
let y = i(() => u(m.value.inheritedAttrs, []));
|
|
30
30
|
return {
|
|
31
31
|
merged: h,
|
|
32
|
-
rootBind: i(() => e(_.value?.root, y.value,
|
|
32
|
+
rootBind: i(() => e(_.value?.root, y.value, s({
|
|
33
33
|
"m-0 list-none py-2 text-dark-900 dark:text-dark-100": !0,
|
|
34
34
|
"pl-4": h.value.nested,
|
|
35
|
-
[
|
|
35
|
+
[l(v.value, "root") ?? ""]: !0
|
|
36
36
|
})))
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -2,8 +2,8 @@ import { ListItemOwnProps, ListItemSlots } from './listItem.types';
|
|
|
2
2
|
type __VLS_Slots = ListItemSlots;
|
|
3
3
|
declare const __VLS_base: import('vue').DefineComponent<ListItemOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ListItemOwnProps> & Readonly<{}>, {
|
|
4
4
|
role: "button" | "option" | "menuitem";
|
|
5
|
-
as: "li" | "div";
|
|
6
5
|
disabled: boolean;
|
|
6
|
+
as: "li" | "div";
|
|
7
7
|
divider: boolean;
|
|
8
8
|
interactive: boolean;
|
|
9
9
|
selected: boolean;
|
|
@@ -11,7 +11,7 @@ export declare function useListItem(props: ListItemOwnProps, libDefaults: ListIt
|
|
|
11
11
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
|
|
12
12
|
class: string;
|
|
13
13
|
id: string | undefined;
|
|
14
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<ListItemProps, "role" | "value" | "classes" | "customProps" | "primary" | "secondary" | "
|
|
14
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<ListItemProps, "role" | "value" | "classes" | "customProps" | "primary" | "secondary" | "disabled" | "as" | "dense" | "divider" | "interactive" | "selected" | "selectedIcon">, never>>>;
|
|
15
15
|
rowClass: import('vue').ComputedRef<string>;
|
|
16
16
|
hasStart: import('vue').ComputedRef<boolean>;
|
|
17
17
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { hasNamedSlot as e, isPropPresent as t, resolveNamedSlot as n } from "../../../Utils/slotOrProp.js";
|
|
2
2
|
import { mergePartBind as r, useBridgeUIComponent as i, useBridgeUIMergedRegistryClasses as a } from "../../../Utils/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getListboxOptionId as o } from "../../Listbox/composables/useListboxNavigation.js";
|
|
4
|
+
import { LIST_INJECTION_KEY as s } from "../../List/listInjectionKey.js";
|
|
5
5
|
import { LISTBOX_INJECTION_KEY as c } from "../../Listbox/listboxInjectionKey.js";
|
|
6
6
|
import { computed as l, getCurrentInstance as u, inject as d, onBeforeUnmount as f, toValue as p, useAttrs as m, watch as h } from "vue";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { cn as g, splitComponentProps as _ } from "@bridge-ui/core";
|
|
8
|
+
import { get as v, isNull as y, omit as b } from "es-toolkit/compat";
|
|
9
9
|
//#region src/Components/ListItem/composables/useListItem.ts
|
|
10
10
|
var x = [
|
|
11
11
|
"as",
|
|
@@ -23,7 +23,7 @@ var x = [
|
|
|
23
23
|
"selectedIcon"
|
|
24
24
|
];
|
|
25
25
|
function S(t, n, S) {
|
|
26
|
-
let C = m(), w = d(
|
|
26
|
+
let C = m(), w = d(s, null), T = d(c, null), E = T != null, D = l(() => _({
|
|
27
27
|
props: {
|
|
28
28
|
...C,
|
|
29
29
|
...t
|
|
@@ -52,13 +52,13 @@ function S(t, n, S) {
|
|
|
52
52
|
let N = l(() => j.value != null), P = l(() => !j.value || !A.value ? !1 : A.value.isSelected(j.value.value)), F = l(() => !j.value || !A.value ? -1 : A.value.getOptionIndex(j.value.value)), I = l(() => !A.value || F.value < 0 ? !1 : A.value.highlightedIndex === F.value), L = l(() => O.value.customProps), R = a({
|
|
53
53
|
entry: k,
|
|
54
54
|
props: () => D.value.componentProps
|
|
55
|
-
}), z = l(() => "dense" in (u()?.vnode.props ?? {}) ? t.dense === !0 : t.dense === !0 ? !0 : w ? p(w).dense : !1), B = l(() => e(S, "primary") || e(S, "default") || !!O.value.primary), V = l(() => e(S, "secondary") || !!O.value.secondary), H = l(() => e(S, "start")), U = l(() => N.value ? !P.value || !A.value?.showCheckmark ? null : "check" : !O.value.selected ||
|
|
56
|
-
class:
|
|
55
|
+
}), z = l(() => "dense" in (u()?.vnode.props ?? {}) ? t.dense === !0 : t.dense === !0 ? !0 : w ? p(w).dense : !1), B = l(() => e(S, "primary") || e(S, "default") || !!O.value.primary), V = l(() => e(S, "secondary") || !!O.value.secondary), H = l(() => e(S, "start")), U = l(() => N.value ? !P.value || !A.value?.showCheckmark ? null : "check" : !O.value.selected || y(O.value.selectedIcon) ? null : O.value.selectedIcon ?? "check"), W = l(() => e(S, "end") || U.value != null), G = l(() => b(D.value.inheritedAttrs, [])), K = l(() => r(L.value?.root, G.value, {
|
|
56
|
+
class: g({
|
|
57
57
|
"list-none": !0,
|
|
58
58
|
"border-b border-black/10 last:border-b-0 dark:border-white/10": O.value.divider,
|
|
59
|
-
[
|
|
59
|
+
[v(R.value, "root") ?? ""]: !0
|
|
60
60
|
}),
|
|
61
|
-
id: N.value && A.value?.listboxId && F.value >= 0 ?
|
|
61
|
+
id: N.value && A.value?.listboxId && F.value >= 0 ? o(A.value.listboxId, F.value) : void 0
|
|
62
62
|
})), q = l(() => O.value.interactive || N.value ? r(L.value?.interactive, {}, {
|
|
63
63
|
"aria-disabled": O.value.disabled ? !0 : void 0,
|
|
64
64
|
role: N.value ? "option" : O.value.role,
|
|
@@ -71,7 +71,7 @@ function S(t, n, S) {
|
|
|
71
71
|
onClick: N.value ? () => {
|
|
72
72
|
j.value && A.value?.onSelect(j.value);
|
|
73
73
|
} : void 0,
|
|
74
|
-
class:
|
|
74
|
+
class: g({
|
|
75
75
|
"flex w-full min-w-0 items-center gap-x-3 text-left text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
|
|
76
76
|
"cursor-pointer select-none": !O.value.disabled,
|
|
77
77
|
"px-4": !0,
|
|
@@ -84,28 +84,28 @@ function S(t, n, S) {
|
|
|
84
84
|
[A.value?.optionHighlightedClass ?? ""]: N.value && I.value && !P.value,
|
|
85
85
|
[A.value?.mergedClasses.optionHighlighted ?? ""]: N.value && I.value && !P.value,
|
|
86
86
|
"opacity-50 pointer-events-none": O.value.disabled,
|
|
87
|
-
[
|
|
87
|
+
[v(R.value, "interactive") ?? ""]: !0,
|
|
88
88
|
[A.value?.sizeClasses?.option ?? ""]: !0
|
|
89
89
|
})
|
|
90
|
-
}) : null), J = l(() =>
|
|
90
|
+
}) : null), J = l(() => g({
|
|
91
91
|
"flex w-full min-w-0 gap-x-3": !0,
|
|
92
92
|
"items-center text-dark-900 dark:text-dark-100": !O.value.interactive,
|
|
93
93
|
"px-4": !O.value.interactive,
|
|
94
94
|
"py-2": !O.value.interactive && !z.value,
|
|
95
95
|
"py-1.5": !O.value.interactive && z.value
|
|
96
|
-
})), Y = l(() => r(L.value?.start, {},
|
|
96
|
+
})), Y = l(() => r(L.value?.start, {}, g({
|
|
97
97
|
"flex shrink-0 text-dark-600 dark:text-dark-300": !0,
|
|
98
|
-
[
|
|
99
|
-
}))), X = l(() => r(L.value?.content, {},
|
|
98
|
+
[v(R.value, "start") ?? ""]: !0
|
|
99
|
+
}))), X = l(() => r(L.value?.content, {}, g({
|
|
100
100
|
"min-w-0 flex-1": !0,
|
|
101
|
-
[
|
|
102
|
-
}))), Z = l(() => r(L.value?.primary, {},
|
|
101
|
+
[v(R.value, "content") ?? ""]: !0
|
|
102
|
+
}))), Z = l(() => r(L.value?.primary, {}, g("block truncate text-sm font-medium", A.value?.sizeClasses?.primary, v(R.value, "primary")))), Q = l(() => r(L.value?.secondary, {}, g("mt-0.5 block truncate text-xs text-dark-500 dark:text-dark-400", A.value?.sizeClasses?.secondary, v(R.value, "secondary"))));
|
|
103
103
|
return {
|
|
104
104
|
merged: O,
|
|
105
105
|
hasEnd: W,
|
|
106
|
-
endBind: l(() => r(L.value?.end, {},
|
|
106
|
+
endBind: l(() => r(L.value?.end, {}, g({
|
|
107
107
|
"ml-auto flex shrink-0 items-center": !0,
|
|
108
|
-
[
|
|
108
|
+
[v(R.value, "end") ?? ""]: !0
|
|
109
109
|
}))),
|
|
110
110
|
rootBind: K,
|
|
111
111
|
rowClass: J,
|
|
@@ -119,7 +119,7 @@ function S(t, n, S) {
|
|
|
119
119
|
interactiveBind: q,
|
|
120
120
|
selectedIconBind: l(() => r(L.value?.selectedIcon, {}, {
|
|
121
121
|
size: "sm",
|
|
122
|
-
class:
|
|
122
|
+
class: g("shrink-0", A.value?.checkClass, v(R.value, "selectedIcon"))
|
|
123
123
|
})),
|
|
124
124
|
resolvedSelectedIcon: U
|
|
125
125
|
};
|