@bridge-ui/vue 0.13.0 → 0.15.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.
Files changed (208) hide show
  1. package/ai/AGENTS.md +1 -1
  2. package/ai/README.md +1 -1
  3. package/ai/llms.txt +4 -3
  4. package/ai/skills/bridge-ui-forms/SKILL.md +3 -3
  5. package/ai/skills/bridge-ui-setup/SKILL.md +9 -8
  6. package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
  7. package/dist/Adapters/Icon/mockIconAdapter.d.ts +5 -0
  8. package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
  9. package/dist/Adapters/RichText/useRichTextAdapter.d.ts +1 -1
  10. package/dist/Components/ActionFooter/ActionFooter.vue_vue_type_script_setup_true_lang.js +3 -5
  11. package/dist/Components/ActionFooter/actionFooter.types.d.ts +7 -12
  12. package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +4 -4
  13. package/dist/Components/ActionFooter/composables/useActionFooter.js +3 -4
  14. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +2 -2
  15. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +3 -3
  16. package/dist/Components/Autocomplete/composables/useAutocomplete.js +2 -0
  17. package/dist/Components/BaseField/composables/useBaseField.d.ts +2 -2
  18. package/dist/Components/BaseField/composables/useBaseField.js +1 -0
  19. package/dist/Components/Calendar/Calendar.vue.d.ts +14 -6
  20. package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +78 -74
  21. package/dist/Components/Calendar/calendar.types.d.ts +12 -7
  22. package/dist/Components/Calendar/composables/useCalendar.d.ts +5 -9
  23. package/dist/Components/Calendar/composables/useCalendar.js +144 -143
  24. package/dist/Components/CalendarDate/CalendarDate.vue.d.ts +14 -6
  25. package/dist/Components/CalendarDate/CalendarDate.vue_vue_type_script_setup_true_lang.js +20 -16
  26. package/dist/Components/CalendarDate/calendarDate.types.d.ts +13 -8
  27. package/dist/Components/CalendarDate/composables/useCalendarDate.d.ts +4 -8
  28. package/dist/Components/CalendarDate/composables/useCalendarDate.js +105 -105
  29. package/dist/Components/CalendarMonth/CalendarMonth.vue.d.ts +9 -2
  30. package/dist/Components/CalendarMonth/CalendarMonth.vue_vue_type_script_setup_true_lang.js +19 -12
  31. package/dist/Components/CalendarMonth/calendarMonth.types.d.ts +14 -8
  32. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +4 -7
  33. package/dist/Components/CalendarMonth/composables/useCalendarMonth.js +92 -89
  34. package/dist/Components/CalendarRange/CalendarRange.vue.d.ts +14 -6
  35. package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +109 -105
  36. package/dist/Components/CalendarRange/calendarRange.types.d.ts +12 -7
  37. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +5 -9
  38. package/dist/Components/CalendarRange/composables/useCalendarRange.js +181 -154
  39. package/dist/Components/CalendarYear/CalendarYear.vue.d.ts +9 -2
  40. package/dist/Components/CalendarYear/CalendarYear.vue_vue_type_script_setup_true_lang.js +20 -13
  41. package/dist/Components/CalendarYear/calendarYear.types.d.ts +12 -6
  42. package/dist/Components/CalendarYear/composables/useCalendarYear.d.ts +4 -7
  43. package/dist/Components/CalendarYear/composables/useCalendarYear.js +91 -88
  44. package/dist/Components/Carousel/composables/useCarousel.js +117 -117
  45. package/dist/Components/Checkbox/composables/useCheckbox.js +1 -0
  46. package/dist/Components/ColorField/ColorField.vue.d.ts +2 -2
  47. package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +4 -2
  48. package/dist/Components/ColorField/composables/useColorField.d.ts +2 -2
  49. package/dist/Components/ColorField/composables/useColorField.js +2 -0
  50. package/dist/Components/ColorPicker/ColorPicker.vue.d.ts +9 -2
  51. package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +53 -45
  52. package/dist/Components/ColorPicker/colorPicker.types.d.ts +20 -9
  53. package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +4 -4
  54. package/dist/Components/ColorPicker/composables/useColorPicker.js +151 -150
  55. package/dist/Components/DateField/DateField.vue.d.ts +2 -2
  56. package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +2 -2
  57. package/dist/Components/DateField/composables/useDateField.d.ts +2 -2
  58. package/dist/Components/DateField/composables/useDateField.js +2 -0
  59. package/dist/Components/DatePicker/DatePicker.vue.d.ts +12 -4
  60. package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +57 -51
  61. package/dist/Components/DatePicker/composables/useDatePicker.d.ts +3 -3
  62. package/dist/Components/DatePicker/composables/useDatePicker.js +52 -25
  63. package/dist/Components/DatePicker/datePicker.types.d.ts +12 -7
  64. package/dist/Components/DateRangeField/DateRangeField.vue.d.ts +2 -2
  65. package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
  66. package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -2
  67. package/dist/Components/DateRangeField/composables/useDateRangeField.js +2 -0
  68. package/dist/Components/DateRangePicker/DateRangePicker.vue.d.ts +12 -4
  69. package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +56 -50
  70. package/dist/Components/DateRangePicker/composables/useDateRangePicker.d.ts +3 -3
  71. package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +26 -26
  72. package/dist/Components/DateRangePicker/dateRangePicker.types.d.ts +12 -7
  73. package/dist/Components/DateTimeField/DateTimeField.vue.d.ts +2 -2
  74. package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +2 -2
  75. package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -2
  76. package/dist/Components/DateTimeField/composables/useDateTimeField.js +2 -0
  77. package/dist/Components/DateTimePicker/DateTimePicker.vue.d.ts +9 -2
  78. package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +84 -78
  79. package/dist/Components/DateTimePicker/composables/useDateTimePicker.d.ts +3 -3
  80. package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +64 -63
  81. package/dist/Components/DateTimePicker/dateTimePicker.types.d.ts +12 -7
  82. package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue.d.ts +2 -2
  83. package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
  84. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -2
  85. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +2 -0
  86. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +12 -4
  87. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +112 -106
  88. package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.d.ts +3 -3
  89. package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +71 -70
  90. package/dist/Components/DateTimeRangePicker/dateTimeRangePicker.types.d.ts +12 -7
  91. package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
  92. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  93. package/dist/Components/FileUpload/FileUpload.vue.d.ts +2 -2
  94. package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +1 -1
  95. package/dist/Components/FileUpload/fileUpload.types.d.ts +1 -1
  96. package/dist/Components/FormControl/composables/useFormControl.js +46 -45
  97. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  98. package/dist/Components/FormField/composables/useFormField.js +144 -143
  99. package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
  100. package/dist/Components/Listbox/Listbox.vue.d.ts +0 -1
  101. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +3 -2
  102. package/dist/Components/Modal/Modal.vue.d.ts +1 -1
  103. package/dist/Components/Modal/composables/useModal.d.ts +1 -1
  104. package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
  105. package/dist/Components/NumberField/composables/useNumberField.js +1 -0
  106. package/dist/Components/OtpField/composables/useOtpField.js +1 -0
  107. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
  108. package/dist/Components/PasswordField/composables/usePasswordField.js +1 -0
  109. package/dist/Components/Radio/composables/useRadio.js +1 -0
  110. package/dist/Components/Rating/Rating.js +5 -0
  111. package/dist/Components/Rating/Rating.vue.d.ts +20 -0
  112. package/dist/Components/Rating/Rating.vue_vue_type_script_setup_true_lang.js +62 -0
  113. package/dist/Components/Rating/composables/useRating.d.ts +112 -0
  114. package/dist/Components/Rating/composables/useRating.js +191 -0
  115. package/dist/Components/Rating/index.d.ts +4 -0
  116. package/dist/Components/Rating/index.js +3 -0
  117. package/dist/Components/Rating/rating.types.d.ts +107 -0
  118. package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +36 -32
  119. package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +2 -1
  120. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +143 -141
  121. package/dist/Components/Select/Select.vue.d.ts +2 -2
  122. package/dist/Components/Select/composables/useSelect.d.ts +3 -3
  123. package/dist/Components/Select/composables/useSelect.js +2 -0
  124. package/dist/Components/Sidebar/composables/useSidebar.js +1 -1
  125. package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
  126. package/dist/Components/Slider/composables/useSlider.js +1 -0
  127. package/dist/Components/Switch/composables/useSwitch.js +1 -0
  128. package/dist/Components/Tabs/composables/useTabs.d.ts +0 -156
  129. package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
  130. package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
  131. package/dist/Components/Textarea/composables/useTextarea.js +1 -0
  132. package/dist/Components/TimeField/TimeField.vue.d.ts +2 -2
  133. package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +2 -2
  134. package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -2
  135. package/dist/Components/TimeField/composables/useTimeField.js +2 -0
  136. package/dist/Components/TimePanel/TimePanel.vue.d.ts +10 -2
  137. package/dist/Components/TimePanel/TimePanel.vue_vue_type_script_setup_true_lang.js +37 -34
  138. package/dist/Components/TimePanel/composables/useTimePanel.d.ts +5 -5
  139. package/dist/Components/TimePanel/composables/useTimePanel.js +108 -109
  140. package/dist/Components/TimePanel/timePanel.types.d.ts +10 -4
  141. package/dist/Components/TimePicker/TimePicker.vue.d.ts +10 -2
  142. package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +48 -42
  143. package/dist/Components/TimePicker/composables/useTimePicker.d.ts +3 -3
  144. package/dist/Components/TimePicker/composables/useTimePicker.js +37 -36
  145. package/dist/Components/TimePicker/timePicker.types.d.ts +12 -7
  146. package/dist/Components/TimeRangeField/TimeRangeField.vue.d.ts +2 -2
  147. package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
  148. package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -2
  149. package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +2 -0
  150. package/dist/Components/TimeRangePicker/TimeRangePicker.vue.d.ts +12 -4
  151. package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +74 -68
  152. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +4 -4
  153. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +88 -87
  154. package/dist/Components/TimeRangePicker/timeRangePicker.types.d.ts +12 -7
  155. package/dist/Components/Tooltip/Tooltip.vue.d.ts +0 -1
  156. package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
  157. package/dist/Utils/index.d.ts +16 -6
  158. package/dist/Utils/index.js +39 -35
  159. package/dist/augments.d.ts +1 -1
  160. package/dist/index.d.ts +2 -0
  161. package/dist/index.js +69 -67
  162. package/dist/theme.css +10 -1
  163. package/docs/README.md +28 -13
  164. package/docs/components/ActionFooter.md +16 -14
  165. package/docs/components/BaseField.md +3 -3
  166. package/docs/components/BridgeUIProvider.md +108 -16
  167. package/docs/components/Calendar.md +0 -1
  168. package/docs/components/CalendarDate.md +0 -1
  169. package/docs/components/CalendarMonth.md +0 -1
  170. package/docs/components/CalendarRange.md +0 -1
  171. package/docs/components/CalendarYear.md +0 -1
  172. package/docs/components/ColorPicker.md +27 -27
  173. package/docs/components/DatePicker.md +0 -1
  174. package/docs/components/DateRangePicker.md +0 -1
  175. package/docs/components/DateTimePicker.md +0 -1
  176. package/docs/components/DateTimeRangePicker.md +0 -1
  177. package/docs/components/I18n.md +6 -6
  178. package/docs/components/Icon.md +10 -10
  179. package/docs/components/Rating.md +86 -0
  180. package/docs/components/RichTextEditor.md +4 -4
  181. package/docs/components/TimePanel.md +0 -1
  182. package/docs/components/TimePicker.md +0 -1
  183. package/docs/components/TimeRangePicker.md +0 -1
  184. package/package.json +3 -102
  185. package/dist/Adapters/Examples/date-date-fns.d.ts +0 -9
  186. package/dist/Adapters/Examples/date-date-fns.js +0 -151
  187. package/dist/Adapters/Examples/date-dayjs.d.ts +0 -19
  188. package/dist/Adapters/Examples/date-dayjs.js +0 -174
  189. package/dist/Adapters/Examples/date-luxon.d.ts +0 -7
  190. package/dist/Adapters/Examples/date-luxon.js +0 -164
  191. package/dist/Adapters/Examples/date-moment.d.ts +0 -19
  192. package/dist/Adapters/Examples/date-moment.js +0 -172
  193. package/dist/Adapters/Examples/i18n-dictionary.d.ts +0 -15
  194. package/dist/Adapters/Examples/i18n-dictionary.js +0 -97
  195. package/dist/Adapters/Examples/i18n-vue-i18n.d.ts +0 -7
  196. package/dist/Adapters/Examples/i18n-vue-i18n.js +0 -14
  197. package/dist/Adapters/Examples/icon-fontawesome.d.ts +0 -19
  198. package/dist/Adapters/Examples/icon-fontawesome.js +0 -81
  199. package/dist/Adapters/Examples/icon-heroicons.d.ts +0 -5
  200. package/dist/Adapters/Examples/icon-heroicons.js +0 -55
  201. package/dist/Adapters/Examples/icon-lucide.d.ts +0 -5
  202. package/dist/Adapters/Examples/icon-lucide.js +0 -55
  203. package/dist/Adapters/Examples/icon-phosphor.d.ts +0 -5
  204. package/dist/Adapters/Examples/icon-phosphor.js +0 -55
  205. package/dist/Adapters/Examples/icon-tabler.d.ts +0 -5
  206. package/dist/Adapters/Examples/icon-tabler.js +0 -55
  207. package/dist/Adapters/Examples/rich-text-tiptap.d.ts +0 -5
  208. package/dist/Adapters/Examples/rich-text-tiptap.js +0 -138
@@ -1,19 +1,21 @@
1
- import e from "../ActionFooter/ActionFooter.js";
2
- import { useColorPicker as t } from "./composables/useColorPicker.js";
3
- import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeProps as l, normalizeClass as u, normalizeProps as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _ } from "vue";
4
- import { cn as v } from "@bridge-ui/core/Utils";
1
+ import { useOptionalModel as e } from "../../Utils/useOptionalModel.js";
2
+ import t from "../ActionFooter/ActionFooter.js";
3
+ import { useColorPicker as n } from "./composables/useColorPicker.js";
4
+ import { Fragment as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, useModel as x } from "vue";
5
+ import { cn as S } from "@bridge-ui/core/Utils";
5
6
  //#region src/Components/ColorPicker/ColorPicker.vue?vue&type=script&setup=true&lang.ts
6
- var y = { class: "min-w-0 truncate text-sm text-dark-700 dark:text-dark-100" }, b = [
7
+ var C = { class: "min-w-0 truncate text-sm text-dark-700 dark:text-dark-100" }, w = [
7
8
  "aria-label",
8
9
  "onClick",
9
10
  "aria-pressed",
10
11
  "disabled"
11
- ], x = /*@__PURE__*/ s({
12
+ ], T = /*@__PURE__*/ c({
12
13
  inheritAttrs: !1,
13
14
  __name: "ColorPicker",
14
- props: {
15
+ props: /*@__PURE__*/ u({
15
16
  alpha: { type: Boolean },
16
17
  classes: {},
18
+ color: {},
17
19
  customProps: {},
18
20
  defaultValue: {},
19
21
  disabled: { type: Boolean },
@@ -25,68 +27,74 @@ var y = { class: "min-w-0 truncate text-sm text-dark-700 dark:text-dark-100" },
25
27
  type: Boolean,
26
28
  default: void 0
27
29
  },
28
- swatches: {},
29
- value: {}
30
- },
31
- emits: [
30
+ swatches: {}
31
+ }, {
32
+ modelValue: {},
33
+ modelModifiers: {}
34
+ }),
35
+ emits: /*@__PURE__*/ u([
32
36
  "apply",
33
37
  "cancel",
34
- "change"
35
- ],
36
- setup(s, { emit: x }) {
37
- let { merged: S, hueBind: C, rootBind: w, areaBind: T, alphaBind: E, showAlpha: D, swatchCss: O, footerBind: k, showFooter: A, previewBind: j, contentBind: M, handleApply: N, swatchesBind: P, handleCancel: F, hueThumbBind: I, areaThumbBind: L, alphaFillBind: R, formattedValue: z, alphaThumbBind: B, presetSwatches: V, applyButtonProps: H, isSwatchSelected: U, previewSwatchBind: W, handleSwatchClick: G, swatchButtonClass: K, cancelButtonProps: q, swatchSelectedClass: J, previewSwatchFillBind: Y } = t(s, {
38
+ "change",
39
+ "update:modelValue"
40
+ ], ["update:modelValue"]),
41
+ setup(c, { emit: u }) {
42
+ let T = x(c, "modelValue"), E = u, D = c, O = g(D.defaultValue ?? null), k = e(T, O), { merged: A, hueBind: j, rootBind: M, areaBind: N, alphaBind: P, showAlpha: F, swatchCss: I, footerBind: ee, showFooter: L, previewBind: R, contentBind: z, handleApply: B, swatchesBind: V, handleCancel: H, hueThumbBind: U, areaThumbBind: W, alphaFillBind: G, formattedValue: K, alphaThumbBind: q, presetSwatches: J, applyButtonProps: Y, isSwatchSelected: X, previewSwatchBind: Z, handleSwatchClick: Q, swatchButtonClass: $, cancelButtonProps: te, swatchSelectedClass: ne, previewSwatchFillBind: re } = n(D, {
38
43
  rounded: "md",
39
- format: "hex"
40
- }, x);
41
- return (t, s) => (p(), i("div", d(c(_(w))), [a("div", { class: u(_(M)) }, [
42
- a("div", d(c(_(T))), [
43
- s[0] ||= a("span", {
44
+ format: "hex",
45
+ color: "primary"
46
+ }, k, E);
47
+ return (e, n) => (h(), a("div", p(l(b(M))), [o("div", { class: f(b(z)) }, [
48
+ o("div", p(l(b(N))), [
49
+ n[0] ||= o("span", {
44
50
  "aria-hidden": "",
45
51
  class: "pointer-events-none absolute inset-0",
46
52
  style: { backgroundImage: "linear-gradient(to right, #fff, transparent)" }
47
53
  }, null, -1),
48
- s[1] ||= a("span", {
54
+ n[1] ||= o("span", {
49
55
  "aria-hidden": "",
50
56
  class: "pointer-events-none absolute inset-0",
51
57
  style: { backgroundImage: "linear-gradient(to top, #000, transparent)" }
52
58
  }, null, -1),
53
- a("span", d(c(_(L))), null, 16)
59
+ o("span", p(l(b(W))), null, 16)
54
60
  ], 16),
55
- a("div", d(c(_(C))), [a("span", d(c(_(I))), null, 16)], 16),
56
- _(D) ? (p(), i("div", d(l({ key: 0 }, _(E))), [a("span", d(c(_(R))), null, 16), a("span", d(c(_(B))), null, 16)], 16)) : r("", !0),
57
- a("div", d(c(_(j))), [a("span", d(c(_(W))), [a("span", d(c(_(Y))), null, 16)], 16), a("span", y, g(_(z)), 1)], 16),
58
- _(V).length > 0 ? (p(), i("div", d(l({ key: 1 }, _(P))), [(p(!0), i(n, null, m(_(V), (e) => (p(), i("button", {
61
+ o("div", p(l(b(j))), [o("span", p(l(b(U))), null, 16)], 16),
62
+ b(F) ? (h(), a("div", p(d({ key: 0 }, b(P))), [o("span", p(l(b(G))), null, 16), o("span", p(l(b(q))), null, 16)], 16)) : i("", !0),
63
+ o("div", p(l(b(R))), [o("span", p(l(b(Z))), [o("span", p(l(b(re))), null, 16)], 16), o("span", C, y(b(K)), 1)], 16),
64
+ b(J).length > 0 ? (h(), a("div", p(d({ key: 1 }, b(V))), [(h(!0), a(r, null, _(b(J), (e) => (h(), a("button", {
59
65
  type: "button",
60
66
  key: e,
61
67
  "aria-label": e,
62
- onClick: (t) => _(G)(e),
63
- "aria-pressed": _(U)(e),
64
- disabled: _(S).disabled || _(S).readOnly,
65
- class: u(_(v)({
66
- [_(K)]: !0,
67
- [_(J)]: _(U)(e)
68
+ onClick: (t) => b(Q)(e),
69
+ "aria-pressed": b(X)(e),
70
+ disabled: b(A).disabled || b(A).readOnly,
71
+ class: f(b(S)({
72
+ [b($)]: !0,
73
+ [b(ne)]: b(X)(e)
68
74
  }))
69
- }, [a("span", {
75
+ }, [o("span", {
70
76
  "aria-hidden": "",
71
77
  class: "absolute inset-0",
72
- style: f({ backgroundColor: _(O)(e) })
73
- }, null, 4)], 10, b))), 128))], 16)) : r("", !0)
74
- ], 2), _(A) ? (p(), i("div", d(l({ key: 0 }, _(k))), [h(t.$slots, "footer", {
75
- apply: _(N),
76
- cancel: _(F)
77
- }, () => [o(_(e), {
78
- onApply: _(N),
79
- onCancel: _(F),
78
+ style: m({ backgroundColor: b(I)(e) })
79
+ }, null, 4)], 10, w))), 128))], 16)) : i("", !0)
80
+ ], 2), b(L) ? (h(), a("div", p(d({ key: 0 }, b(ee))), [v(e.$slots, "footer", {
81
+ apply: b(B),
82
+ cancel: b(H)
83
+ }, () => [s(b(t), {
84
+ color: b(A).color,
85
+ onApply: b(B),
86
+ onCancel: b(H),
80
87
  "custom-props": {
81
- applyButton: _(H),
82
- cancelButton: _(q)
88
+ applyButton: b(Y),
89
+ cancelButton: b(te)
83
90
  }
84
91
  }, null, 8, [
92
+ "color",
85
93
  "onApply",
86
94
  "onCancel",
87
95
  "custom-props"
88
- ])])], 16)) : r("", !0)], 16));
96
+ ])])], 16)) : i("", !0)], 16));
89
97
  }
90
98
  });
91
99
  //#endregion
92
- export { x as default };
100
+ export { T as default };
@@ -1,8 +1,8 @@
1
1
  import { HTMLAttributes, Slot } from 'vue';
2
2
  import { ColorFormat, FieldOverlayFooterSlotProps } from '@bridge-ui/core/Domain';
3
- import { ColorPickerRounded } from '@bridge-ui/core/Tokens';
3
+ import { ButtonColor, ColorPickerRounded } from '@bridge-ui/core/Tokens';
4
4
  import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
5
- import { ButtonProps } from '../Button/button.types';
5
+ import { ButtonColorOverrides, ButtonProps } from '../Button/button.types';
6
6
  export interface ColorPickerRoundedOverrides {}
7
7
  export interface ColorPickerClasses {
8
8
  /**
@@ -103,6 +103,10 @@ export interface ColorPickerEmits {
103
103
  * Emitted when Apply is pressed (`showFooter`) or when the value commits.
104
104
  */
105
105
  change: [value: null | string];
106
+ /**
107
+ * Emitted when `v-model` should update.
108
+ */
109
+ "update:modelValue": [value: null | string];
106
110
  }
107
111
  export interface ColorPickerOwnProps {
108
112
  /**
@@ -118,6 +122,12 @@ export interface ColorPickerOwnProps {
118
122
  * @default undefined
119
123
  */
120
124
  classes?: ColorPickerClasses;
125
+ /**
126
+ * Color of the Cancel / Apply footer actions.
127
+ *
128
+ * @default "primary"
129
+ */
130
+ color?: MergeProps<ButtonColor, ButtonColorOverrides>;
121
131
  /**
122
132
  * Extra props for internal parts.
123
133
  *
@@ -181,12 +191,6 @@ export interface ColorPickerOwnProps {
181
191
  * @default undefined
182
192
  */
183
193
  swatches?: string[];
184
- /**
185
- * Controlled value.
186
- *
187
- * @default undefined
188
- */
189
- value?: null | string;
190
194
  }
191
195
  export interface ColorPickerSlots {
192
196
  /**
@@ -197,4 +201,11 @@ export interface ColorPickerSlots {
197
201
  */
198
202
  footer?: Slot<FieldOverlayFooterSlotProps>;
199
203
  }
200
- export type ColorPickerProps = MergeHtmlProps<ColorPickerOwnProps, HTMLAttributes>;
204
+ export type ColorPickerProps = MergeHtmlProps<ColorPickerOwnProps, HTMLAttributes> & {
205
+ /**
206
+ * Bound with `v-model` on the component (`defineModel` internally).
207
+ *
208
+ * @default undefined
209
+ */
210
+ modelValue?: null | string;
211
+ };
@@ -1,12 +1,12 @@
1
- import { MaybeRefOrGetter, SetupContext } from 'vue';
1
+ import { MaybeRefOrGetter, Ref, SetupContext } from 'vue';
2
2
  import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
3
3
  import { ColorPickerEmits, ColorPickerOwnProps } from '../colorPicker.types';
4
- type ColorPickerLibDefaults = LibDefaultsShape<ColorPickerOwnProps, "format" | "rounded">;
4
+ type ColorPickerLibDefaults = LibDefaultsShape<ColorPickerOwnProps, "color" | "format" | "rounded">;
5
5
  type ColorPickerMerged = MergeLibDefaults<ColorPickerOwnProps, ColorPickerLibDefaults>;
6
6
  /**
7
7
  * Owns controlled/uncontrolled value, optional footer draft, and panel binds.
8
8
  */
9
- export declare function useColorPicker(props: MaybeRefOrGetter<ColorPickerOwnProps>, libDefaults: ColorPickerLibDefaults, emit: SetupContext<ColorPickerEmits>["emit"]): {
9
+ export declare function useColorPicker(props: MaybeRefOrGetter<ColorPickerOwnProps>, libDefaults: ColorPickerLibDefaults, model: Ref<null | string>, emit: SetupContext<ColorPickerEmits>["emit"]): {
10
10
  merged: import('vue').ComputedRef<ColorPickerMerged>;
11
11
  hueBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
12
12
  role: string;
@@ -22,7 +22,7 @@ export declare function useColorPicker(props: MaybeRefOrGetter<ColorPickerOwnPro
22
22
  onPointerdown: (event: PointerEvent) => void;
23
23
  onPointermove: (event: PointerEvent) => void;
24
24
  }>>;
25
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<ColorPickerOwnProps, "fill" | "format" | "value" | "classes" | "showFooter" | "customProps" | "disabled" | "rounded" | "alpha" | "defaultValue" | "readOnly" | "swatches">>>>;
25
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<ColorPickerOwnProps, "color" | "fill" | "format" | "classes" | "showFooter" | "customProps" | "disabled" | "rounded" | "alpha" | "defaultValue" | "readOnly" | "swatches">>>>;
26
26
  areaBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
27
27
  role: string;
28
28
  onKeydown: (event: KeyboardEvent) => void;
@@ -1,16 +1,16 @@
1
1
  import { useResolveMessage as e } from "../../../Adapters/I18n/useI18nAdapter.js";
2
2
  import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
3
3
  import { FIELD_OVERLAY_INJECTION_KEY as i } from "../../FieldOverlay/fieldOverlayInjectionKey.js";
4
- import { computed as a, inject as o, ref as s, toValue as c, useAttrs as ee, watch as te } from "vue";
4
+ import { computed as a, inject as ee, ref as te, toValue as o, useAttrs as s, watch as c } from "vue";
5
5
  import { get as l, omit as u } from "es-toolkit/compat";
6
- import { DEFAULT_COLOR_FORMAT as d, DEFAULT_HSVA as f, colorStringsEqual as p, formatColor as m, hueToCssRgb as ne, parseColor as h, resolveColorAlpha as g, saturationValueFromPointer as _, toCssRgba as v, unitFromPointer as y } from "@bridge-ui/core/Domain";
7
- import { colorPickerRoundedProps as b, colorPickerSizeProps as re } from "@bridge-ui/core/Tokens";
8
- import { cn as x, mergeBridgeUILayeredClasses as S, splitComponentProps as ie } from "@bridge-ui/core/Utils";
6
+ import { DEFAULT_COLOR_FORMAT as d, DEFAULT_HSVA as f, colorStringsEqual as p, formatColor as m, hueToCssRgb as ne, parseColor as h, resolveColorAlpha as re, saturationValueFromPointer as g, toCssRgba as _, unitFromPointer as v } from "@bridge-ui/core/Domain";
7
+ import { colorPickerRoundedProps as y, colorPickerSizeProps as b } from "@bridge-ui/core/Tokens";
8
+ import { cn as x, mergeBridgeUILayeredClasses as S, splitComponentProps as C } from "@bridge-ui/core/Utils";
9
9
  //#region src/Components/ColorPicker/composables/useColorPicker.ts
10
- var ae = [
10
+ var w = [
11
11
  "fill",
12
12
  "alpha",
13
- "value",
13
+ "color",
14
14
  "format",
15
15
  "classes",
16
16
  "rounded",
@@ -21,231 +21,232 @@ var ae = [
21
21
  "customProps",
22
22
  "defaultValue"
23
23
  ];
24
- function C(e) {
24
+ function T(e) {
25
25
  return h(e) ?? f;
26
26
  }
27
- function w(f, w, T) {
28
- let oe = ee(), E = o(i, {
27
+ function E(f, E, D, O) {
28
+ let ie = s(), k = ee(i, {
29
29
  apply: () => void 0,
30
30
  cancel: () => void 0
31
- }), D = e(), O = a(() => ie({
32
- bridgeKeys: ae,
31
+ }), A = e(), j = a(() => C({
32
+ bridgeKeys: w,
33
33
  props: {
34
- ...oe,
35
- ...c(f)
34
+ ...ie,
35
+ ...o(f)
36
36
  }
37
- })), { merged: k, entry: A } = n({
38
- libDefaults: w,
37
+ })), { merged: M, entry: N } = n({
38
+ libDefaults: E,
39
39
  componentName: "ColorPicker",
40
- props: () => O.value.componentProps
41
- }), j = a(() => k.value.customProps), M = a(() => u(O.value.inheritedAttrs, [
40
+ props: () => j.value.componentProps
41
+ }), P = a(() => M.value.customProps), F = a(() => u(j.value.inheritedAttrs, [
42
42
  "onApply",
43
43
  "onCancel",
44
- "onChange"
45
- ])), N = r({
46
- entry: A,
47
- props: () => O.value.componentProps
48
- }), P = a(() => c(f)), F = a(() => P.value.value !== void 0), I = s(k.value.defaultValue ?? null), L = a(() => F.value ? P.value.value ?? null : I.value), R = a(() => k.value.format ?? d), z = s(C(L.value));
49
- te(() => [L.value, k.value.showFooter], ([e, t]) => {
50
- t && (z.value = C(e));
44
+ "onChange",
45
+ "onUpdate:modelValue"
46
+ ])), I = r({
47
+ entry: N,
48
+ props: () => j.value.componentProps
49
+ }), L = a(() => M.value.format ?? d), R = te(T(D.value));
50
+ c(() => [D.value, M.value.showFooter], ([e, t]) => {
51
+ t && (R.value = T(e));
51
52
  });
52
- let B = a(() => k.value.showFooter ? z.value : C(L.value)), V = a(() => g(k.value.alpha, R.value)), H = a(() => m(B.value, R.value)), U = a(() => v(B.value)), W = a(() => ne(B.value.h)), G = a(() => v({
53
- ...B.value,
53
+ let z = a(() => M.value.showFooter ? R.value : T(D.value)), B = a(() => re(M.value.alpha, L.value)), V = a(() => m(z.value, L.value)), H = a(() => _(z.value)), U = a(() => ne(z.value.h)), W = a(() => _({
54
+ ...z.value,
54
55
  a: 1
55
- })), K = a(() => {
56
- let e = S(re, A.value?.tokens?.size);
56
+ })), G = a(() => {
57
+ let e = S(b, N.value?.tokens?.size);
57
58
  return l(e, ["md", "swatch"]) ?? "";
58
- }), q = a(() => {
59
- let e = S(b, A.value?.tokens?.rounded);
60
- return l(e, k.value.rounded ?? "md") ?? "";
61
- }), J = a(() => (k.value.swatches ?? []).filter((e) => h(e))), Y = a(() => !k.value.disabled && !k.value.readOnly), X = (e) => {
62
- F.value || (I.value = e), T("change", e);
63
- }, Z = (e) => {
64
- if (k.value.showFooter) {
65
- z.value = e;
59
+ }), K = a(() => {
60
+ let e = S(y, N.value?.tokens?.rounded);
61
+ return l(e, M.value.rounded ?? "md") ?? "";
62
+ }), q = a(() => (M.value.swatches ?? []).filter((e) => h(e))), J = a(() => !M.value.disabled && !M.value.readOnly), Y = (e) => {
63
+ D.value = e, O("change", e);
64
+ }, X = (e) => {
65
+ if (M.value.showFooter) {
66
+ R.value = e;
66
67
  return;
67
68
  }
68
- X(m(e, R.value));
69
- }, Q = (e) => {
70
- Z({
71
- ...B.value,
69
+ Y(m(e, L.value));
70
+ }, Z = (e) => {
71
+ X({
72
+ ...z.value,
72
73
  ...e
73
74
  });
74
- }, se = (e) => {
75
+ }, ae = (e) => {
75
76
  let t = h(e);
76
- t && Y.value && Z(t);
77
- }, ce = () => {
78
- X(m(z.value, R.value)), T("apply"), E.apply();
79
- }, le = () => {
80
- z.value = C(L.value), T("cancel"), E.cancel();
77
+ t && J.value && X(t);
78
+ }, oe = () => {
79
+ Y(m(R.value, L.value)), O("apply"), k.apply();
80
+ }, se = () => {
81
+ R.value = T(D.value), O("cancel"), k.cancel();
82
+ }, ce = (e) => {
83
+ if (!J.value) return;
84
+ let t = e.currentTarget.getBoundingClientRect(), n = g(e.clientX, e.clientY, t);
85
+ Z(n);
86
+ }, le = (e) => {
87
+ if (!J.value) return;
88
+ let t = e.currentTarget.getBoundingClientRect(), n = v(e.clientX, t.left, t.width);
89
+ Z({ h: n * 360 });
81
90
  }, ue = (e) => {
82
- if (!Y.value) return;
83
- let t = e.currentTarget.getBoundingClientRect(), n = _(e.clientX, e.clientY, t);
84
- Q(n);
85
- }, de = (e) => {
86
- if (!Y.value) return;
87
- let t = e.currentTarget.getBoundingClientRect(), n = y(e.clientX, t.left, t.width);
88
- Q({ h: n * 360 });
89
- }, fe = (e) => {
90
- if (!Y.value) return;
91
- let t = e.currentTarget.getBoundingClientRect(), n = y(e.clientX, t.left, t.width);
92
- Q({ a: n });
93
- }, $ = (e) => ({
91
+ if (!J.value) return;
92
+ let t = e.currentTarget.getBoundingClientRect(), n = v(e.clientX, t.left, t.width);
93
+ Z({ a: n });
94
+ }, Q = (e) => ({
94
95
  onPointerdown: (t) => {
95
96
  t.preventDefault(), t.currentTarget.setPointerCapture(t.pointerId), e(t);
96
97
  },
97
98
  onPointermove: (t) => {
98
99
  t.currentTarget.hasPointerCapture(t.pointerId) && e(t);
99
100
  }
100
- }), pe = (e) => {
101
- if (!Y.value) return;
101
+ }), de = (e) => {
102
+ if (!J.value) return;
102
103
  let t = e.shiftKey ? 10 : 1;
103
- e.key === "ArrowLeft" ? (e.preventDefault(), Q({ s: B.value.s - t })) : e.key === "ArrowRight" ? (e.preventDefault(), Q({ s: B.value.s + t })) : e.key === "ArrowDown" ? (e.preventDefault(), Q({ v: B.value.v - t })) : e.key === "ArrowUp" && (e.preventDefault(), Q({ v: B.value.v + t }));
104
- }, me = (e) => {
105
- if (!Y.value) return;
104
+ e.key === "ArrowLeft" ? (e.preventDefault(), Z({ s: z.value.s - t })) : e.key === "ArrowRight" ? (e.preventDefault(), Z({ s: z.value.s + t })) : e.key === "ArrowDown" ? (e.preventDefault(), Z({ v: z.value.v - t })) : e.key === "ArrowUp" && (e.preventDefault(), Z({ v: z.value.v + t }));
105
+ }, fe = (e) => {
106
+ if (!J.value) return;
106
107
  let t = e.shiftKey ? 10 : 1;
107
- e.key === "ArrowLeft" || e.key === "ArrowDown" ? (e.preventDefault(), Q({ h: B.value.h - t })) : (e.key === "ArrowRight" || e.key === "ArrowUp") && (e.preventDefault(), Q({ h: B.value.h + t }));
108
- }, he = (e) => {
109
- if (!Y.value) return;
108
+ e.key === "ArrowLeft" || e.key === "ArrowDown" ? (e.preventDefault(), Z({ h: z.value.h - t })) : (e.key === "ArrowRight" || e.key === "ArrowUp") && (e.preventDefault(), Z({ h: z.value.h + t }));
109
+ }, pe = (e) => {
110
+ if (!J.value) return;
110
111
  let t = e.shiftKey ? .1 : .01;
111
- e.key === "ArrowLeft" || e.key === "ArrowDown" ? (e.preventDefault(), Q({ a: B.value.a - t })) : (e.key === "ArrowRight" || e.key === "ArrowUp") && (e.preventDefault(), Q({ a: B.value.a + t }));
112
- }, ge = a(() => t(j.value?.root, M.value, x({
112
+ e.key === "ArrowLeft" || e.key === "ArrowDown" ? (e.preventDefault(), Z({ a: z.value.a - t })) : (e.key === "ArrowRight" || e.key === "ArrowUp") && (e.preventDefault(), Z({ a: z.value.a + t }));
113
+ }, me = a(() => t(P.value?.root, F.value, x({
113
114
  "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-900": !0,
114
- "w-full": k.value.fill,
115
- "w-72": !k.value.fill,
116
- [q.value]: !0,
117
- [N.value.root ?? ""]: !0
118
- }))), _e = a(() => x({ "flex flex-col gap-3 p-3": !0 })), ve = a(() => t(j.value?.area, {
119
- ...$(ue),
115
+ "w-full": M.value.fill,
116
+ "w-72": !M.value.fill,
117
+ [K.value]: !0,
118
+ [I.value.root ?? ""]: !0
119
+ }))), he = a(() => x({ "flex flex-col gap-3 p-3": !0 })), ge = a(() => t(P.value?.area, {
120
+ ...Q(ce),
120
121
  role: "slider",
121
- onKeydown: pe,
122
- tabindex: Y.value ? 0 : -1,
123
- style: { backgroundColor: W.value },
124
- "aria-label": D("Saturation and brightness"),
125
- "aria-valuetext": `Saturation ${Math.round(B.value.s)}%, Brightness ${Math.round(B.value.v)}%`
122
+ onKeydown: de,
123
+ tabindex: J.value ? 0 : -1,
124
+ style: { backgroundColor: U.value },
125
+ "aria-label": A("Saturation and brightness"),
126
+ "aria-valuetext": `Saturation ${Math.round(z.value.s)}%, Brightness ${Math.round(z.value.v)}%`
126
127
  }, x({
127
128
  "relative h-40 w-full cursor-crosshair overflow-hidden touch-none": !0,
128
- [q.value]: !0,
129
- "cursor-not-allowed": !Y.value,
130
- [N.value.area ?? ""]: !0
131
- }))), ye = a(() => ({
129
+ [K.value]: !0,
130
+ "cursor-not-allowed": !J.value,
131
+ [I.value.area ?? ""]: !0
132
+ }))), _e = a(() => ({
132
133
  "aria-hidden": !0,
133
134
  style: {
134
- left: `${B.value.s}%`,
135
- top: `${100 - B.value.v}%`
135
+ left: `${z.value.s}%`,
136
+ top: `${100 - z.value.v}%`
136
137
  },
137
138
  class: "pointer-events-none absolute z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow"
138
- })), be = a(() => t(j.value?.hue, {
139
- ...$(de),
139
+ })), ve = a(() => t(P.value?.hue, {
140
+ ...Q(le),
140
141
  role: "slider",
141
142
  "aria-valuemin": 0,
142
143
  "aria-valuemax": 360,
143
- onKeydown: me,
144
- "aria-label": D("Hue"),
145
- tabindex: Y.value ? 0 : -1,
146
- "aria-valuenow": Math.round(B.value.h),
144
+ onKeydown: fe,
145
+ "aria-label": A("Hue"),
146
+ tabindex: J.value ? 0 : -1,
147
+ "aria-valuenow": Math.round(z.value.h),
147
148
  style: { backgroundImage: "linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)" }
148
149
  }, x({
149
150
  "relative h-3 w-full cursor-pointer touch-none": !0,
150
151
  "rounded-full": !0,
151
- "cursor-not-allowed": !Y.value,
152
- [N.value.hue ?? ""]: !0
153
- }))), xe = a(() => ({
152
+ "cursor-not-allowed": !J.value,
153
+ [I.value.hue ?? ""]: !0
154
+ }))), ye = a(() => ({
154
155
  "aria-hidden": !0,
155
156
  style: {
156
- backgroundColor: W.value,
157
- left: `${B.value.h / 360 * 100}%`
157
+ backgroundColor: U.value,
158
+ left: `${z.value.h / 360 * 100}%`
158
159
  },
159
160
  class: "pointer-events-none absolute top-1/2 z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow"
160
- })), Se = a(() => t(j.value?.alpha, {
161
- ...$(fe),
161
+ })), be = a(() => t(P.value?.alpha, {
162
+ ...Q(ue),
162
163
  role: "slider",
163
164
  "aria-valuemin": 0,
164
165
  "aria-valuemax": 100,
165
- onKeydown: he,
166
- tabindex: Y.value ? 0 : -1,
167
- "aria-label": D("Alpha"),
168
- "aria-valuenow": Math.round(B.value.a * 100)
166
+ onKeydown: pe,
167
+ tabindex: J.value ? 0 : -1,
168
+ "aria-label": A("Alpha"),
169
+ "aria-valuenow": Math.round(z.value.a * 100)
169
170
  }, x({
170
171
  "relative h-3 w-full cursor-pointer overflow-hidden touch-none": !0,
171
172
  "bg-[image:repeating-conic-gradient(#d1d5db_0%_25%,#ffffff_0%_50%)] bg-[size:0.5rem_0.5rem] dark:bg-[image:repeating-conic-gradient(#4b5563_0%_25%,#1f2937_0%_50%)]": !0,
172
173
  "rounded-full": !0,
173
- "cursor-not-allowed": !Y.value,
174
- [N.value.alpha ?? ""]: !0
175
- }))), Ce = a(() => ({
174
+ "cursor-not-allowed": !J.value,
175
+ [I.value.alpha ?? ""]: !0
176
+ }))), $ = a(() => ({
176
177
  "aria-hidden": !0,
177
178
  class: "pointer-events-none absolute inset-0",
178
- style: { backgroundImage: `linear-gradient(to right, transparent, ${G.value})` }
179
- })), we = a(() => ({
179
+ style: { backgroundImage: `linear-gradient(to right, transparent, ${W.value})` }
180
+ })), xe = a(() => ({
180
181
  "aria-hidden": !0,
181
182
  style: {
182
- backgroundColor: U.value,
183
- left: `${B.value.a * 100}%`
183
+ backgroundColor: H.value,
184
+ left: `${z.value.a * 100}%`
184
185
  },
185
186
  class: "pointer-events-none absolute top-1/2 z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow"
186
- })), Te = a(() => t(j.value?.preview, {}, x({
187
+ })), Se = a(() => t(P.value?.preview, {}, x({
187
188
  "flex items-center gap-2": !0,
188
- [N.value.preview ?? ""]: !0
189
- }))), Ee = a(() => ({
189
+ [I.value.preview ?? ""]: !0
190
+ }))), Ce = a(() => ({
190
191
  "aria-hidden": !0,
191
192
  class: x({
192
193
  "relative shrink-0 overflow-hidden": !0,
193
194
  "bg-[image:repeating-conic-gradient(#d1d5db_0%_25%,#ffffff_0%_50%)] bg-[size:0.5rem_0.5rem] dark:bg-[image:repeating-conic-gradient(#4b5563_0%_25%,#1f2937_0%_50%)]": !0,
194
- [K.value]: !0,
195
- [q.value]: !0
195
+ [G.value]: !0,
196
+ [K.value]: !0
196
197
  })
197
- })), De = a(() => ({
198
+ })), we = a(() => ({
198
199
  class: "absolute inset-0",
199
- style: { backgroundColor: U.value }
200
- })), Oe = a(() => t(j.value?.swatches, {}, x({
200
+ style: { backgroundColor: H.value }
201
+ })), Te = a(() => t(P.value?.swatches, {}, x({
201
202
  "flex flex-wrap gap-2": !0,
202
- [N.value.swatches ?? ""]: !0
203
+ [I.value.swatches ?? ""]: !0
203
204
  })));
204
205
  return {
205
- merged: k,
206
- hueBind: be,
207
- rootBind: ge,
208
- areaBind: ve,
209
- cssColor: U,
210
- alphaBind: Se,
211
- showAlpha: V,
212
- footerBind: a(() => t(j.value?.footer, {}, x({
206
+ merged: M,
207
+ hueBind: ve,
208
+ rootBind: me,
209
+ areaBind: ge,
210
+ cssColor: H,
211
+ alphaBind: be,
212
+ showAlpha: B,
213
+ footerBind: a(() => t(P.value?.footer, {}, x({
213
214
  "flex items-center justify-end gap-2 border-t border-dark-100 bg-dark-50 px-3 py-2 dark:border-dark-800 dark:bg-dark-950/40": !0,
214
- [N.value.footer ?? ""]: !0
215
+ [I.value.footer ?? ""]: !0
215
216
  }))),
216
- showFooter: a(() => !!k.value.showFooter),
217
- previewBind: Te,
218
- contentBind: _e,
219
- handleApply: ce,
220
- swatchesBind: Oe,
221
- handleCancel: le,
222
- hueThumbBind: xe,
223
- areaThumbBind: ye,
224
- alphaFillBind: Ce,
225
- formattedValue: H,
226
- alphaThumbBind: we,
227
- presetSwatches: J,
228
- previewSwatchBind: Ee,
229
- handleSwatchClick: se,
217
+ showFooter: a(() => !!M.value.showFooter),
218
+ previewBind: Se,
219
+ contentBind: he,
220
+ handleApply: oe,
221
+ swatchesBind: Te,
222
+ handleCancel: se,
223
+ hueThumbBind: ye,
224
+ areaThumbBind: _e,
225
+ alphaFillBind: $,
226
+ formattedValue: V,
227
+ alphaThumbBind: xe,
228
+ presetSwatches: q,
229
+ previewSwatchBind: Ce,
230
+ handleSwatchClick: ae,
230
231
  swatchButtonClass: a(() => x({
231
232
  "relative shrink-0 overflow-hidden": !0,
232
233
  "bg-[image:repeating-conic-gradient(#d1d5db_0%_25%,#ffffff_0%_50%)] bg-[size:0.5rem_0.5rem] dark:bg-[image:repeating-conic-gradient(#4b5563_0%_25%,#1f2937_0%_50%)]": !0,
234
+ [G.value]: !0,
233
235
  [K.value]: !0,
234
- [q.value]: !0,
235
236
  "border border-black/10 dark:border-white/15": !0,
236
- "hover:ring-2 hover:ring-dark-300 hover:ring-offset-2 hover:ring-offset-white dark:hover:ring-dark-500 dark:hover:ring-offset-dark-900": Y.value,
237
- "cursor-not-allowed opacity-50": !Y.value
237
+ "hover:ring-2 hover:ring-dark-300 hover:ring-offset-2 hover:ring-offset-white dark:hover:ring-dark-500 dark:hover:ring-offset-dark-900": J.value,
238
+ "cursor-not-allowed opacity-50": !J.value
238
239
  })),
239
240
  swatchSelectedClass: a(() => "ring-2 ring-dark-500 ring-offset-2 ring-offset-white dark:ring-dark-400 dark:ring-offset-dark-900"),
240
- previewSwatchFillBind: De,
241
- applyButtonProps: a(() => j.value?.applyButton),
242
- cancelButtonProps: a(() => j.value?.cancelButton),
243
- isSwatchSelected: (e) => p(e, H.value),
241
+ previewSwatchFillBind: we,
242
+ applyButtonProps: a(() => P.value?.applyButton),
243
+ cancelButtonProps: a(() => P.value?.cancelButton),
244
+ isSwatchSelected: (e) => p(e, V.value),
244
245
  swatchCss: (e) => {
245
246
  let t = h(e);
246
- return t ? v(t) : void 0;
247
+ return t ? _(t) : void 0;
247
248
  }
248
249
  };
249
250
  }
250
251
  //#endregion
251
- export { w as useColorPicker };
252
+ export { E as useColorPicker };