@bridge-ui/vue 0.0.5 → 0.0.7

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.
Files changed (152) hide show
  1. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
  2. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
  3. package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
  4. package/dist/Adapters/I18n/index.d.ts +1 -0
  5. package/dist/Adapters/I18n/index.js +2 -0
  6. package/dist/Adapters/I18n/useI18nAdapter.d.ts +16 -0
  7. package/dist/Adapters/I18n/useI18nAdapter.js +18 -0
  8. package/dist/Adapters/Icon/iconSource.types.d.ts +11 -0
  9. package/dist/Adapters/Icon/index.d.ts +2 -0
  10. package/dist/Adapters/Icon/index.js +2 -0
  11. package/dist/Adapters/Icon/useIconAdapter.d.ts +11 -0
  12. package/dist/Adapters/Icon/useIconAdapter.js +13 -0
  13. package/dist/Adapters/index.d.ts +3 -0
  14. package/dist/Adapters/index.js +3 -0
  15. package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +1 -5
  16. package/dist/Components/Alert/alert.types.d.ts +2 -2
  17. package/dist/Components/Alert/alertDefaultIcons.d.ts +2 -2
  18. package/dist/Components/Alert/alertDefaultIcons.js +9 -10
  19. package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
  20. package/dist/Components/Alert/composables/useAlert.js +17 -17
  21. package/dist/Components/Autocomplete/Autocomplete.js +5 -0
  22. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
  23. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
  24. package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
  25. package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
  26. package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
  27. package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
  28. package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
  29. package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
  30. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +762 -0
  31. package/dist/Components/Autocomplete/composables/useAutocomplete.js +382 -0
  32. package/dist/Components/Autocomplete/index.d.ts +4 -0
  33. package/dist/Components/Autocomplete/index.js +4 -0
  34. package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
  35. package/dist/Components/Avatar/avatar.types.d.ts +2 -2
  36. package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
  37. package/dist/Components/Avatar/composables/useAvatar.js +46 -47
  38. package/dist/Components/Badge/composables/useBadge.js +8 -8
  39. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +24 -25
  40. package/dist/Components/Button/button.types.d.ts +4 -4
  41. package/dist/Components/Button/composables/useButton.d.ts +1 -1
  42. package/dist/Components/Button/composables/useButton.js +14 -14
  43. package/dist/Components/Card/composables/useCard.js +27 -27
  44. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +27 -27
  45. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +4 -4
  46. package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
  47. package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +8 -9
  48. package/dist/Components/Chip/composables/useChip.js +6 -6
  49. package/dist/Components/Divider/composables/useDivider.js +5 -5
  50. package/dist/Components/Drawer/composables/useDrawer.js +23 -23
  51. package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
  52. package/dist/Components/FormControl/composables/useFormControl.d.ts +3 -3
  53. package/dist/Components/FormControl/composables/useFormControl.js +12 -12
  54. package/dist/Components/FormControl/formControl.types.d.ts +6 -6
  55. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  56. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  57. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  58. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  59. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  60. package/dist/Components/FormField/composables/useFormField.d.ts +6 -6
  61. package/dist/Components/FormField/composables/useFormField.js +108 -109
  62. package/dist/Components/FormField/formField.types.d.ts +19 -19
  63. package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +7 -7
  64. package/dist/Components/Icon/composables/useIcon.d.ts +2 -0
  65. package/dist/Components/Icon/composables/useIcon.js +20 -18
  66. package/dist/Components/Icon/icon.types.d.ts +3 -3
  67. package/dist/Components/Label/composables/useLabel.d.ts +1 -1
  68. package/dist/Components/Label/composables/useLabel.js +5 -5
  69. package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +2 -2
  70. package/dist/Components/Link/composables/useLink.js +9 -9
  71. package/dist/Components/Link/link.types.d.ts +3 -3
  72. package/dist/Components/List/composables/useList.js +6 -6
  73. package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
  74. package/dist/Components/ListItem/composables/useListItem.js +81 -82
  75. package/dist/Components/ListItem/listItem.types.d.ts +2 -2
  76. package/dist/Components/ListSection/composables/useListSection.js +8 -8
  77. package/dist/Components/Listbox/Listbox.vue.d.ts +0 -2
  78. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +75 -74
  79. package/dist/Components/Listbox/composables/useListbox.js +7 -7
  80. package/dist/Components/Listbox/index.js +3 -3
  81. package/dist/Components/Menu/composables/useMenu.js +43 -43
  82. package/dist/Components/Modal/composables/useModal.js +18 -18
  83. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +43 -43
  84. package/dist/Components/NumberField/composables/useNumberField.d.ts +8 -8
  85. package/dist/Components/NumberField/composables/useNumberField.js +9 -9
  86. package/dist/Components/OtpField/OtpField.js +5 -0
  87. package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
  88. package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +80 -0
  89. package/dist/Components/OtpField/OtpFieldLabel.js +5 -0
  90. package/dist/Components/OtpField/OtpFieldLabel.vue.d.ts +7 -0
  91. package/dist/Components/OtpField/OtpFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
  92. package/dist/Components/OtpField/composables/useOtpField.d.ts +460 -0
  93. package/dist/Components/OtpField/composables/useOtpField.js +212 -0
  94. package/dist/Components/OtpField/index.d.ts +4 -0
  95. package/dist/Components/OtpField/index.js +3 -0
  96. package/dist/Components/OtpField/otpField.types.d.ts +290 -0
  97. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +27 -27
  98. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +8 -8
  99. package/dist/Components/PasswordField/composables/usePasswordField.js +2 -2
  100. package/dist/Components/Progress/composables/useProgress.js +11 -11
  101. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
  102. package/dist/Components/Radio/composables/useRadio.d.ts +4 -4
  103. package/dist/Components/Radio/composables/useRadio.js +9 -9
  104. package/dist/Components/Select/Select.vue.d.ts +1 -2
  105. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +72 -68
  106. package/dist/Components/Select/composables/useSelect.d.ts +10 -10
  107. package/dist/Components/Select/composables/useSelect.js +193 -193
  108. package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
  109. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +81 -75
  110. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +4 -4
  111. package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
  112. package/dist/Components/Snackbar/snackbar.types.d.ts +2 -2
  113. package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +3 -3
  114. package/dist/Components/Snackbar/snackbarDefaultIcons.js +9 -10
  115. package/dist/Components/Spinner/composables/useSpinner.js +11 -11
  116. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
  117. package/dist/Components/Switch/composables/useSwitch.d.ts +4 -4
  118. package/dist/Components/Switch/composables/useSwitch.js +9 -9
  119. package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +2 -2
  120. package/dist/Components/Tab/composables/useTab.js +11 -11
  121. package/dist/Components/Tab/tab.types.d.ts +3 -3
  122. package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +2 -2
  123. package/dist/Components/TabItem/tabItem.types.d.ts +3 -3
  124. package/dist/Components/TabList/composables/useTabList.js +7 -7
  125. package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
  126. package/dist/Components/Tabs/composables/useTabs.d.ts +468 -4
  127. package/dist/Components/Tabs/composables/useTabs.js +22 -22
  128. package/dist/Components/Tabs/tabsInjectionKey.d.ts +5 -5
  129. package/dist/Components/TextField/TextField.vue.d.ts +1 -1
  130. package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
  131. package/dist/Components/TextField/composables/useTextField.d.ts +8 -8
  132. package/dist/Components/TextField/composables/useTextField.js +1 -1
  133. package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
  134. package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
  135. package/dist/Components/Textarea/composables/useTextarea.d.ts +8 -8
  136. package/dist/Components/Textarea/composables/useTextarea.js +9 -9
  137. package/dist/Components/Tooltip/Tooltip.js +5 -0
  138. package/dist/Components/Tooltip/Tooltip.vue.d.ts +35 -0
  139. package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +73 -0
  140. package/dist/Components/Tooltip/composables/useTooltip.d.ts +50 -0
  141. package/dist/Components/Tooltip/composables/useTooltip.js +208 -0
  142. package/dist/Components/Tooltip/index.d.ts +4 -0
  143. package/dist/Components/Tooltip/index.js +3 -0
  144. package/dist/Components/Tooltip/tooltip.types.d.ts +166 -0
  145. package/dist/Provider/bridgeUITypes.d.ts +4 -1
  146. package/dist/Provider/createBridgeUIApi.js +15 -2
  147. package/dist/Utils/index.js +7 -7
  148. package/dist/Utils/useBreakpoint.js +7 -7
  149. package/dist/augments.d.ts +2 -2
  150. package/dist/index.d.ts +11 -1
  151. package/dist/index.js +84 -76
  152. package/package.json +21 -3
@@ -15,7 +15,7 @@ function l(l, u = {}) {
15
15
  return {
16
16
  ...d,
17
17
  ...r,
18
- withErrorIcon: !1,
18
+ showErrorIcon: !1,
19
19
  classes: v.value
20
20
  };
21
21
  }, {
@@ -23,7 +23,7 @@ function l(l, u = {}) {
23
23
  rounded: "md",
24
24
  color: "primary",
25
25
  variant: "outline",
26
- withErrorIcon: !1
26
+ showErrorIcon: !1
27
27
  }, { reservedSlots: () => ["end"] });
28
28
  return {
29
29
  formField: y,
@@ -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 { get as a, isNil as o } from "es-toolkit/compat";
4
- import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
3
+ import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
4
+ import { get as c, isNil as l } from "es-toolkit/compat";
5
5
  import { colorProps as u, roundedProps as d, sizeProps as f, variantProps as p } from "@bridge-ui/core/Tokens/Progress";
6
6
  //#region src/Components/Progress/composables/useProgress.ts
7
7
  var m = [
@@ -15,13 +15,13 @@ var m = [
15
15
  "valueBuffer"
16
16
  ];
17
17
  function h(e) {
18
- return o(e) || Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
18
+ return l(e) || Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
19
19
  }
20
- function g(o, g) {
21
- let _ = i(), v = r(() => l({
20
+ function g(l, g) {
21
+ let _ = i(), v = r(() => s({
22
22
  props: {
23
23
  ..._,
24
- ...o
24
+ ...l
25
25
  },
26
26
  bridgeKeys: m
27
27
  })), { merged: y, entry: b } = t({
@@ -31,25 +31,25 @@ function g(o, g) {
31
31
  }), x = n({
32
32
  entry: b,
33
33
  props: () => v.value.componentProps
34
- }), S = r(() => y.value.customProps), C = r(() => a(c(u, b.value?.tokens?.color), y.value.color)), w = r(() => a(c(f, b.value?.tokens?.size), y.value.size)), T = r(() => a(c(d, b.value?.tokens?.rounded), y.value.rounded)), E = r(() => a(c(p, b.value?.tokens?.variant), y.value.variant)), D = r(() => y.value.variant === "buffer"), O = r(() => y.value.variant === "determinate" || y.value.variant === "buffer"), k = r(() => y.value.variant === "indeterminate" || y.value.variant === "query"), A = r(() => h(y.value.value)), j = r(() => h(y.value.valueBuffer)), M = r(() => e(S.value?.root, v.value.inheritedAttrs, {
34
+ }), S = r(() => y.value.customProps), C = r(() => c(o(u, b.value?.tokens?.color), y.value.color)), w = r(() => c(o(f, b.value?.tokens?.size), y.value.size)), T = r(() => c(o(d, b.value?.tokens?.rounded), y.value.rounded)), E = r(() => c(o(p, b.value?.tokens?.variant), y.value.variant)), D = r(() => y.value.variant === "buffer"), O = r(() => y.value.variant === "determinate" || y.value.variant === "buffer"), k = r(() => y.value.variant === "indeterminate" || y.value.variant === "query"), A = r(() => h(y.value.value)), j = r(() => h(y.value.valueBuffer)), M = r(() => e(S.value?.root, v.value.inheritedAttrs, {
35
35
  role: "progressbar",
36
36
  ...O.value ? {
37
37
  "aria-valuemin": 0,
38
38
  "aria-valuemax": 100,
39
39
  "aria-valuenow": A.value
40
40
  } : {},
41
- class: s({
41
+ class: a({
42
42
  "relative w-full overflow-hidden": !0,
43
43
  [w.value ?? ""]: !0,
44
44
  [T.value ?? ""]: !0,
45
45
  [x.value.root ?? ""]: !0
46
46
  })
47
- })), N = r(() => e(S.value?.track, {}, s({
47
+ })), N = r(() => e(S.value?.track, {}, a({
48
48
  "absolute inset-0": !0,
49
49
  [C.value?.track ?? ""]: !0,
50
50
  [T.value ?? ""]: !0,
51
51
  [x.value.track ?? ""]: !0
52
- }))), P = r(() => D.value ? e(S.value?.buffer, { style: { width: `${j.value}%` } }, s({
52
+ }))), P = r(() => D.value ? e(S.value?.buffer, { style: { width: `${j.value}%` } }, a({
53
53
  "absolute top-0 left-0 h-full transition-[width] duration-200 ease-linear": !0,
54
54
  [C.value?.buffer ?? ""]: !0,
55
55
  [T.value ?? ""]: !0,
@@ -57,7 +57,7 @@ function g(o, g) {
57
57
  })) : null);
58
58
  return {
59
59
  merged: y,
60
- barBind: r(() => e(S.value?.bar, O.value ? { style: { width: `${A.value}%` } } : {}, s({
60
+ barBind: r(() => e(S.value?.bar, O.value ? { style: { width: `${A.value}%` } } : {}, a({
61
61
  "absolute top-0 left-0 h-full": !0,
62
62
  "transition-[width] duration-200 ease-linear": O.value,
63
63
  [E.value ?? ""]: k.value,
@@ -22,10 +22,10 @@ var _ = ["for"], v = ["checked"], y = /* @__PURE__ */ a({
22
22
  endLabel: {},
23
23
  error: { type: Boolean },
24
24
  errorMessage: {},
25
+ hideErrorMessage: { type: Boolean },
25
26
  readonly: { type: Boolean },
26
27
  required: { type: Boolean },
27
- startLabel: {},
28
- withoutErrorMessage: { type: Boolean }
28
+ startLabel: {}
29
29
  }, {
30
30
  modelValue: {},
31
31
  modelModifiers: {}
@@ -234,13 +234,13 @@ export declare function useRadio(props: MaybeRefOrGetter<RadioOwnProps>, libDefa
234
234
  slots: Readonly<{
235
235
  [name: string]: import('vue').Slot<any> | undefined;
236
236
  }>;
237
- merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "size" | "error" | "withoutErrorMessage"> & {
238
- size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
237
+ merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "error" | "size" | "hideErrorMessage"> & {
239
238
  error: NonNullable<boolean | undefined>;
240
- withoutErrorMessage: NonNullable<boolean | undefined>;
239
+ size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
240
+ hideErrorMessage: NonNullable<boolean | undefined>;
241
241
  }>;
242
242
  rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
243
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
243
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "hideErrorMessage" | "readonly" | "startLabel">>>>;
244
244
  controlId: import('vue').ComputedRef<string>;
245
245
  isDisabled: import('vue').ComputedRef<boolean>;
246
246
  isReadonly: import('vue').ComputedRef<boolean>;
@@ -1,8 +1,8 @@
1
1
  import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
2
  import { useFormControl as r } from "../../FormControl/composables/useFormControl.js";
3
3
  import { computed as i, toValue as a, useAttrs as o } from "vue";
4
- import { get as s, omit as c } from "es-toolkit/compat";
5
- import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core";
4
+ import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
5
+ import { get as u, omit as d } from "es-toolkit/compat";
6
6
  import { colorProps as f, invalidatedProps as p, roundedProps as m, sizeProps as h } from "@bridge-ui/core/Tokens/Radio";
7
7
  //#region src/Components/Radio/composables/useRadio.ts
8
8
  var g = [
@@ -21,9 +21,9 @@ function _(_, v, y) {
21
21
  ...a(_)
22
22
  }), {
23
23
  error: !1,
24
- withoutErrorMessage: !1,
24
+ hideErrorMessage: !1,
25
25
  size: v.size ?? "sm"
26
- }), S = i(() => d({
26
+ }), S = i(() => l({
27
27
  bridgeKeys: g,
28
28
  props: {
29
29
  ...b,
@@ -36,16 +36,16 @@ function _(_, v, y) {
36
36
  }), T = i(() => C.value.customProps), E = n({
37
37
  entry: w,
38
38
  props: () => S.value.componentProps
39
- }), D = i(() => a(y) === C.value.value), O = i(() => s(u(f, w.value?.tokens?.color), C.value.color ?? "primary")), k = i(() => u(p, w.value?.tokens?.invalidated)), A = i(() => x.invalidated.value ? k.value : O.value), j = i(() => s(u(h, w.value?.tokens?.size), C.value.size ?? "sm")), M = i(() => s(u(m, w.value?.tokens?.rounded), C.value.rounded ?? "full")), N = i(() => e({
39
+ }), D = i(() => a(y) === C.value.value), O = i(() => u(c(f, w.value?.tokens?.color), C.value.color ?? "primary")), k = i(() => c(p, w.value?.tokens?.invalidated)), A = i(() => x.invalidated.value ? k.value : O.value), j = i(() => u(c(h, w.value?.tokens?.size), C.value.size ?? "sm")), M = i(() => u(c(m, w.value?.tokens?.rounded), C.value.rounded ?? "full")), N = i(() => e({
40
40
  ...T.value?.input,
41
41
  ...x.controlBind.value,
42
42
  type: "radio",
43
43
  name: C.value.name,
44
44
  value: C.value.value
45
- }, c(S.value.inheritedAttrs, ["class"]), l({
45
+ }, d(S.value.inheritedAttrs, ["class"]), s({
46
46
  "sr-only": !0,
47
47
  [E.value.input ?? ""]: !0
48
- }))), P = i(() => e(T.value?.control, { "aria-hidden": !0 }, l({
48
+ }))), P = i(() => e(T.value?.control, { "aria-hidden": !0 }, s({
49
49
  "inline-flex shrink-0 items-center justify-center border shadow-sm transition ease-in-out duration-100": !0,
50
50
  "pointer-events-none": !0,
51
51
  [j.value ?? ""]: !0,
@@ -56,14 +56,14 @@ function _(_, v, y) {
56
56
  })));
57
57
  return {
58
58
  merged: C,
59
- dotBind: i(() => e(T.value?.dot, {}, l({
59
+ dotBind: i(() => e(T.value?.dot, {}, s({
60
60
  "rounded-full bg-white transition-transform duration-100": !0,
61
61
  "scale-0": !D.value,
62
62
  "scale-100": D.value,
63
63
  "h-[42%] w-[42%]": !0,
64
64
  [E.value.dot ?? ""]: !0
65
65
  }))),
66
- fieldBind: i(() => e({}, {}, l({
66
+ fieldBind: i(() => e({}, {}, s({
67
67
  "relative inline-flex shrink-0 cursor-pointer items-center": !0,
68
68
  "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2": !0,
69
69
  [M.value ?? ""]: !0,
@@ -24,8 +24,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
24
24
  onOpen?: (() => any) | undefined;
25
25
  onDeselect?: ((option: import('@bridge-ui/core').ListboxOption) => any) | undefined;
26
26
  }>, {
27
- withErrorIcon: boolean;
28
- emptyMessage: string;
27
+ showErrorIcon: boolean;
29
28
  clearable: boolean;
30
29
  minItemsForSearch: number;
31
30
  searchable: boolean;
@@ -1,26 +1,27 @@
1
- import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
- import { mergeNestedComponentProps as n } from "../../Utils/index.js";
1
+ import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
2
+ import { hasNamedSlot as t, resolveNamedSlot as n } from "../../Utils/slotOrProp.js";
3
+ import { mergeNestedComponentProps as ee } from "../../Utils/index.js";
3
4
  import r from "../Icon/Icon.js";
4
- import ee from "../Chip/Chip.js";
5
- import i from "../FormField/FormField.js";
6
- import a from "../Listbox/Listbox.js";
5
+ import i from "../Chip/Chip.js";
6
+ import a from "../FormField/FormField.js";
7
+ import te from "../Listbox/Listbox.js";
7
8
  import { useSelect as o } from "./composables/useSelect.js";
8
9
  import { SELECT_OPTION_KEY as s } from "./selectInjectionKey.js";
9
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as te, createTextVNode as ne, createVNode as m, defineComponent as h, guardReactiveProps as g, isRef as _, mergeModels as v, mergeProps as y, normalizeProps as b, openBlock as x, provide as re, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as ie, unref as E, useModel as ae, useTemplateRef as D, withCtx as O, withKeys as k, withModifiers as A } from "vue";
10
- import { isUndefined as j } from "es-toolkit/compat";
11
- import { X as M } from "@lucide/vue";
10
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as ne, createTextVNode as re, createVNode as m, defineComponent as h, guardReactiveProps as g, isRef as _, mergeModels as v, mergeProps as y, normalizeProps as b, openBlock as x, provide as S, ref as C, renderList as ie, renderSlot as w, resolveDynamicComponent as T, toDisplayString as ae, unref as E, useModel as D, useTemplateRef as O, withCtx as k, withKeys as A, withModifiers as j } from "vue";
11
+ import { cn as M } from "@bridge-ui/core";
12
+ import { isUndefined as N } from "es-toolkit/compat";
12
13
  //#region src/Components/Select/Select.vue?vue&type=script&setup=true&lang.ts
13
- var N = {
14
+ var P = {
14
15
  key: 0,
15
16
  class: "flex min-w-0 flex-1 flex-wrap items-center gap-0.5"
16
- }, P = {
17
+ }, F = {
17
18
  key: 1,
18
19
  class: "flex min-w-0 flex-1 items-center gap-1"
19
- }, F = {
20
+ }, I = ["aria-label"], L = {
20
21
  key: 0,
21
22
  hidden: "",
22
23
  "aria-hidden": "true"
23
- }, I = /* @__PURE__ */ h({
24
+ }, R = /* @__PURE__ */ h({
24
25
  inheritAttrs: !1,
25
26
  __name: "Select",
26
27
  props: /* @__PURE__ */ v({
@@ -32,7 +33,7 @@ var N = {
32
33
  customProps: {},
33
34
  defaultValue: {},
34
35
  disableMaxHeight: { type: Boolean },
35
- emptyMessage: { default: "No options" },
36
+ emptyMessage: {},
36
37
  flipOptions: { type: Boolean },
37
38
  hideEmptyMessage: { type: Boolean },
38
39
  loading: { type: Boolean },
@@ -60,20 +61,20 @@ var N = {
60
61
  error: { type: Boolean },
61
62
  errorIcon: {},
62
63
  errorMessage: {},
64
+ hideErrorMessage: { type: Boolean },
63
65
  label: {},
64
66
  readonly: { type: Boolean },
65
67
  required: { type: Boolean },
66
68
  rounded: {},
69
+ showErrorIcon: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
67
73
  size: {},
68
74
  slots: {},
69
75
  start: {},
70
76
  startIcon: {},
71
- variant: {},
72
- withErrorIcon: {
73
- type: Boolean,
74
- default: !0
75
- },
76
- withoutErrorMessage: { type: Boolean }
77
+ variant: {}
77
78
  }, {
78
79
  modelValue: {},
79
80
  modelModifiers: {}
@@ -89,90 +90,93 @@ var N = {
89
90
  "update:modelValue"
90
91
  ], ["update:modelValue"]),
91
92
  setup(h, { emit: v }) {
92
- let I = ae(h, "modelValue"), L = h, R = v, z = S(L.defaultValue), B = l({
93
+ let R = D(h, "modelValue"), z = h, B = v, V = e(), H = C(z.defaultValue), oe = l({
93
94
  set: (e) => {
94
- I.value = e, z.value = e;
95
+ R.value = e, H.value = e;
95
96
  },
96
- get: () => j(I.value) ? z.value : I.value
97
- }), V = D("trigger"), H = S([]);
98
- re(s, {
97
+ get: () => N(R.value) ? H.value : R.value
98
+ }), U = O("trigger"), W = C([]);
99
+ S(s, {
99
100
  unregister(e) {
100
- H.value = H.value.filter((t) => String(t.value) !== String(e));
101
+ W.value = W.value.filter((t) => String(t.value) !== String(e));
101
102
  },
102
103
  register(e) {
103
- H.value.some((t) => String(t.value) === String(e.value)) || (H.value = [...H.value, e]);
104
+ W.value.some((t) => String(t.value) === String(e.value)) || (W.value = [...W.value, e]);
104
105
  }
105
106
  });
106
- let { open: U, slots: W, hasValue: G, multiple: K, formField: q, clearable: J, clearBind: Y, clearValue: X, removeChip: oe, triggerBind: Z, selectOption: se, containerRef: ce, listboxProps: le, clearIconSize: ue, mergedClasses: Q, selectedOptions: de, hasComposedList: $, handleRegisteredOptionsChange: fe } = o(L, B, V, R, H);
107
- return (o, s) => (x(), f(c, null, [
108
- m(E(i), { field: E(q) }, {
109
- default: O(() => [E(K) ? (x(), f("div", N, [(x(!0), f(c, null, C(E(de), (e) => (x(), u(E(ee), y({
107
+ let { open: G, slots: K, hasValue: q, multiple: se, formField: J, clearable: ce, clearBind: Y, clearValue: X, removeChip: le, triggerBind: Z, selectOption: ue, containerRef: Q, listboxProps: de, clearIconSize: fe, mergedClasses: pe, selectedOptions: me, hasComposedList: $, handleRegisteredOptionsChange: he } = o(z, oe, U, B, W);
108
+ return (e, o) => (x(), f(c, null, [
109
+ m(E(a), { field: E(J) }, {
110
+ default: k(() => [E(se) ? (x(), f("div", P, [(x(!0), f(c, null, ie(E(me), (t) => (x(), u(E(i), y({
110
111
  dismissible: "",
111
- key: String(e.value),
112
- size: E(q).merged.value.size,
113
- disabled: E(q).isDisabled.value,
114
- "clear-label": `Remove ${e.label}`,
115
- onDismiss: (t) => E(oe)(e, t)
116
- }, { ref_for: !0 }, E(n)(L.customProps?.chip, {
117
- classes: { root: E(Q).chip },
118
- customProps: { clear: E(Y) }
112
+ key: String(t.value),
113
+ size: E(J).merged.value.size,
114
+ disabled: E(J).isDisabled.value,
115
+ "clear-label": `Remove ${t.label}`,
116
+ onDismiss: (e) => E(le)(t, e)
117
+ }, { ref_for: !0 }, E(ee)(z.customProps?.chip, {
118
+ customProps: { clear: E(Y) },
119
+ classes: { root: E(M)({
120
+ "bg-white ring-1 ring-inset ring-gray-200 dark:bg-gray-700 dark:ring-gray-600": !0,
121
+ [E(pe).chip ?? ""]: !0
122
+ }) }
119
123
  })), {
120
- default: O(() => [w(o.$slots, "chip", { option: e }, () => [ne(ie(e.label), 1)])]),
124
+ default: k(() => [w(e.$slots, "chip", { option: t }, () => [re(ae(t.label), 1)])]),
121
125
  _: 2
122
126
  }, 1040, [
123
127
  "size",
124
128
  "disabled",
125
129
  "clear-label",
126
130
  "onDismiss"
127
- ]))), 128)), p("textarea", y({ ref: "trigger" }, E(Z)), null, 16)])) : (x(), f("div", P, [p("input", y({
131
+ ]))), 128)), p("textarea", y({ ref: "trigger" }, E(Z)), null, 16)])) : (x(), f("div", F, [p("input", y({
128
132
  ref: "trigger",
129
133
  class: "min-w-0 flex-1"
130
- }, E(Z)), null, 16), E(J) && E(G) && !E(q).isDisabled.value ? (x(), f("span", y({ key: 0 }, E(Y), {
131
- onClick: s[0] ||= (...e) => E(X) && E(X)(...e),
132
- "aria-label": "Clear selection",
133
- onKeydown: [s[1] ||= k(A((...e) => E(X) && E(X)(...e), ["prevent"]), ["enter"]), s[2] ||= k(A((...e) => E(X) && E(X)(...e), ["prevent"]), ["space"])]
134
+ }, E(Z)), null, 16), E(ce) && E(q) && !E(J).isDisabled.value ? (x(), f("span", y({ key: 0 }, E(Y), {
135
+ onClick: o[0] ||= (...e) => E(X) && E(X)(...e),
136
+ onKeydown: [o[1] ||= A(j((...e) => E(X) && E(X)(...e), ["prevent"]), ["enter"]), o[2] ||= A(j((...e) => E(X) && E(X)(...e), ["prevent"]), ["space"])],
137
+ "aria-label": E(V)("Clear selection")
134
138
  }), [m(E(r), y({
135
- icon: E(M),
136
- size: E(ue)
137
- }, L.customProps?.clearIcon), null, 16, ["icon", "size"])], 16)) : d("", !0)]))]),
139
+ icon: "clear",
140
+ size: E(fe)
141
+ }, z.customProps?.clearIcon), null, 16, ["size"])], 16, I)) : d("", !0)]))]),
138
142
  _: 3
139
143
  }, 8, ["field"]),
140
- m(E(a), y({
141
- modelValue: E(U),
142
- "onUpdate:modelValue": s[3] ||= (e) => _(U) ? U.value = e : null
143
- }, E(le), {
144
- "anchor-el": E(ce),
145
- onSelect: E(se),
146
- onRegisteredOptionsChange: E(fe)
147
- }), te({ _: 2 }, [
144
+ m(E(te), y({
145
+ modelValue: E(G),
146
+ "onUpdate:modelValue": o[3] ||= (e) => _(G) ? G.value = e : null
147
+ }, E(de), {
148
+ "anchor-el": E(Q),
149
+ onSelect: E(ue),
150
+ onRegisteredOptionsChange: E(he)
151
+ }), ne({ _: 2 }, [
148
152
  E($) ? {
149
153
  name: "default",
150
- fn: O(() => [w(o.$slots, "default")]),
154
+ fn: k(() => [w(e.$slots, "default")]),
151
155
  key: "0"
152
156
  } : void 0,
153
- E(e)(E(W), "beforeOptions") ? {
157
+ E(t)(E(K), "beforeOptions") ? {
154
158
  name: "beforeOptions",
155
- fn: O(() => [(x(), u(T(E(t)(E(W), "beforeOptions"))))]),
159
+ fn: k(() => [(x(), u(T(E(n)(E(K), "beforeOptions"))))]),
156
160
  key: "1"
157
161
  } : void 0,
158
- E(e)(E(W), "loading") ? {
162
+ E(t)(E(K), "loading") ? {
159
163
  name: "loading",
160
- fn: O(() => [(x(), u(T(E(t)(E(W), "loading"))))]),
164
+ fn: k(() => [(x(), u(T(E(n)(E(K), "loading"))))]),
161
165
  key: "2"
162
166
  } : void 0,
163
- E(e)(E(W), "option") ? {
167
+ E(t)(E(K), "option") ? {
164
168
  name: "option",
165
- fn: O((e) => [w(o.$slots, "option", b(g(e)))]),
169
+ fn: k((t) => [w(e.$slots, "option", b(g(t)))]),
166
170
  key: "3"
167
171
  } : void 0,
168
- E(e)(E(W), "empty") ? {
172
+ E(t)(E(K), "empty") ? {
169
173
  name: "empty",
170
- fn: O(() => [(x(), u(T(E(t)(E(W), "empty"))))]),
174
+ fn: k(() => [(x(), u(T(E(n)(E(K), "empty"))))]),
171
175
  key: "4"
172
176
  } : void 0,
173
- E(e)(E(W), "afterOptions") ? {
177
+ E(t)(E(K), "afterOptions") ? {
174
178
  name: "afterOptions",
175
- fn: O(() => [(x(), u(T(E(t)(E(W), "afterOptions"))))]),
179
+ fn: k(() => [(x(), u(T(E(n)(E(K), "afterOptions"))))]),
176
180
  key: "5"
177
181
  } : void 0
178
182
  ]), 1040, [
@@ -181,9 +185,9 @@ var N = {
181
185
  "onSelect",
182
186
  "onRegisteredOptionsChange"
183
187
  ]),
184
- E($) ? d("", !0) : (x(), f("div", F, [w(o.$slots, "default")]))
188
+ E($) ? d("", !0) : (x(), f("div", L, [w(e.$slots, "default")]))
185
189
  ], 64));
186
190
  }
187
191
  });
188
192
  //#endregion
189
- export { I as default };
193
+ export { R as default };
@@ -14,13 +14,13 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
14
14
  slots: Readonly<{
15
15
  [name: string]: import('vue').Slot<any> | undefined;
16
16
  }>;
17
- merged: import('vue').ComputedRef<Omit<FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "withErrorIcon"> & {
17
+ merged: import('vue').ComputedRef<Omit<FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "showErrorIcon"> & {
18
18
  color: NonNullable<keyof import('@bridge-ui/core').FormFieldColor | undefined>;
19
19
  size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
20
20
  rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
21
21
  variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
22
- errorIcon: import('@lucide/vue').LucideIcon;
23
- withErrorIcon: NonNullable<boolean | undefined>;
22
+ errorIcon: NonNullable<import('../../..').IconSource | undefined>;
23
+ showErrorIcon: NonNullable<boolean | undefined>;
24
24
  }>;
25
25
  control: import('vue').ComputedRef<string>;
26
26
  endBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
@@ -175,13 +175,13 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
175
175
  'aria-valuenow'?: (string | number) | undefined;
176
176
  'aria-valuetext'?: string | undefined | undefined;
177
177
  accesskey?: string | undefined | undefined;
178
- contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
178
+ contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
179
179
  contextmenu?: string | undefined | undefined;
180
180
  dir?: string | undefined | undefined;
181
181
  draggable?: (boolean | "true" | "false") | undefined;
182
182
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
183
183
  enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
184
- hidden?: "" | "until-found" | (boolean | "true" | "false") | "hidden" | undefined;
184
+ hidden?: "" | "until-found" | "hidden" | (boolean | "true" | "false") | undefined;
185
185
  inert?: (boolean | "true" | "false") | undefined;
186
186
  placeholder?: string | undefined | undefined;
187
187
  spellcheck?: (boolean | "true" | "false") | undefined;
@@ -215,7 +215,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
215
215
  }>>;
216
216
  controlId: import('vue').ComputedRef<string>;
217
217
  errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
218
- errorIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
218
+ errorIcon: import('vue').ComputedRef<NonNullable<import('../../..').IconSource | undefined>>;
219
219
  inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
220
220
  id: string;
221
221
  disabled: boolean;
@@ -437,7 +437,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
437
437
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
438
438
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
439
439
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
440
- }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
440
+ }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "hideErrorMessage" | "readonly" | "errorIcon" | "showErrorIcon" | "corner">>>>;
441
441
  isNotched: import('vue').ComputedRef<boolean>;
442
442
  isStacked: import('vue').ComputedRef<boolean>;
443
443
  startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
@@ -720,13 +720,13 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
720
720
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
721
721
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
722
722
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
723
- }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>>;
723
+ }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "hideErrorMessage" | "readonly" | "errorIcon" | "showErrorIcon" | "corner">>>>>;
724
724
  selectOption: (option: SelectOption) => void;
725
725
  containerRef: Ref<HTMLElement | null, HTMLElement | null>;
726
726
  listboxProps: import('vue').ComputedRef<{
727
727
  anchorEl?: null | HTMLElement;
728
728
  classes?: import('../../Listbox').ListboxClasses;
729
- color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
729
+ color: "info" | "error" | "success" | "warning" | "dark" | "primary" | "secondary";
730
730
  customProps?: import('../../Listbox').ListboxCustomProps;
731
731
  disableAutoFocus: boolean;
732
732
  disableMaxHeight: boolean;
@@ -756,7 +756,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
756
756
  hasComposedList: import('vue').ComputedRef<boolean>;
757
757
  highlightedIndex: Ref<number, number>;
758
758
  handleRegisteredOptionsChange: (options: SelectOption[]) => void;
759
- emptyMessage: import('vue').ComputedRef<string>;
760
759
  hideEmptyMessage: import('vue').ComputedRef<boolean>;
760
+ emptyMessage: import('vue').ComputedRef<string>;
761
761
  loadingMessage: import('vue').ComputedRef<string>;
762
762
  };