@kuina-ui/vue 0.6.0 → 0.7.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 (252) hide show
  1. package/dist/blocks/pagination/Pagination.js +4 -0
  2. package/dist/blocks/pagination/Pagination.vue.d.ts +39 -0
  3. package/dist/blocks/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +151 -0
  4. package/dist/blocks/pagination/index.d.ts +2 -0
  5. package/dist/blocks/pagination/pagination.theme.d.ts +12 -0
  6. package/dist/blocks/pagination/pagination.theme.js +12 -0
  7. package/dist/blocks/table/Table.js +4 -0
  8. package/dist/blocks/table/Table.vue.d.ts +149 -0
  9. package/dist/blocks/table/Table.vue_vue_type_script_setup_true_lang.js +933 -0
  10. package/dist/blocks/table/TableCellText.js +4 -0
  11. package/dist/blocks/table/TableCellText.vue.d.ts +8 -0
  12. package/dist/blocks/table/TableCellText.vue_vue_type_script_setup_true_lang.js +30 -0
  13. package/dist/blocks/table/index.d.ts +2 -0
  14. package/dist/blocks/table/table.theme.d.ts +286 -0
  15. package/dist/blocks/table/table.theme.js +391 -0
  16. package/dist/blocks/table/useLoadMoreTrigger.d.ts +11 -0
  17. package/dist/blocks/table/useLoadMoreTrigger.js +31 -0
  18. package/dist/blocks/table/usePinnedColumnOffsets.d.ts +10 -0
  19. package/dist/blocks/table/usePinnedColumnOffsets.js +63 -0
  20. package/dist/blocks/table/useRowReorder.d.ts +18 -0
  21. package/dist/blocks/table/useRowReorder.js +92 -0
  22. package/dist/blocks/table/useRowVirtualizer.d.ts +17 -0
  23. package/dist/blocks/table/useRowVirtualizer.js +45 -0
  24. package/dist/blocks/table/useTableSections.d.ts +46 -0
  25. package/dist/blocks/table/useTableSections.js +86 -0
  26. package/dist/components/alert/Alert.js +4 -0
  27. package/dist/components/alert/Alert.vue.d.ts +2 -2
  28. package/dist/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +87 -0
  29. package/dist/components/alert/alert.theme.js +93 -0
  30. package/dist/components/avatar-group/AvatarGroup.js +4 -0
  31. package/dist/components/avatar-group/AvatarGroup.vue.d.ts +1 -1
  32. package/dist/components/avatar-group/AvatarGroup.vue_vue_type_script_setup_true_lang.js +42 -0
  33. package/dist/components/avatar-group/avatar-group.theme.js +22 -0
  34. package/dist/components/date-picker/DateCalendar.js +4 -0
  35. package/dist/components/date-picker/DateCalendar.vue_vue_type_script_setup_true_lang.js +194 -0
  36. package/dist/components/date-picker/DateCalendarMonth.js +4 -0
  37. package/dist/components/date-picker/DateCalendarMonth.vue_vue_type_script_setup_true_lang.js +106 -0
  38. package/dist/components/date-picker/DateCalendarPopover.js +4 -0
  39. package/dist/components/date-picker/DateCalendarPopover.vue_vue_type_script_setup_true_lang.js +161 -0
  40. package/dist/components/date-picker/DatePicker.js +4 -0
  41. package/dist/components/date-picker/DatePicker.vue.d.ts +6 -6
  42. package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +224 -0
  43. package/dist/components/date-picker/DatePickerField.js +4 -0
  44. package/dist/components/date-picker/DatePickerField.vue.d.ts +6 -6
  45. package/dist/components/date-picker/DatePickerField.vue_vue_type_script_setup_true_lang.js +241 -0
  46. package/dist/components/date-picker/DatePickerPanel.js +4 -0
  47. package/dist/components/date-picker/DatePickerPanel.vue_vue_type_script_setup_true_lang.js +55 -0
  48. package/dist/components/date-picker/DateRangePicker.js +4 -0
  49. package/dist/components/date-picker/DateRangePicker.vue.d.ts +6 -6
  50. package/dist/components/date-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +212 -0
  51. package/dist/components/date-picker/DateRangePickerField.js +4 -0
  52. package/dist/components/date-picker/DateRangePickerField.vue.d.ts +7 -7
  53. package/dist/components/date-picker/DateRangePickerField.vue_vue_type_script_setup_true_lang.js +228 -0
  54. package/dist/components/date-picker/date-calendar.theme.js +46 -0
  55. package/dist/components/date-picker/date-picker.theme.js +16 -0
  56. package/dist/components/date-picker/useDatePickerControl.js +47 -0
  57. package/dist/components/date-picker/useDatePickerPopover.js +39 -0
  58. package/dist/components/date-picker/useDateRangeSelection.js +50 -0
  59. package/dist/components/date-picker/useDateRangeTyping.js +59 -0
  60. package/dist/components/date-picker/useDateTypingFocus.js +37 -0
  61. package/dist/components/date-picker/useSingleDateSelection.js +11 -0
  62. package/dist/components/date-picker/useSingleDateTyping.js +31 -0
  63. package/dist/components/date-picker/useTypedDateInput.js +39 -0
  64. package/dist/components/menu/Menu.js +4 -0
  65. package/dist/components/menu/Menu.vue.d.ts +3 -2
  66. package/dist/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +137 -0
  67. package/dist/components/menu/MenuItemRow.js +4 -0
  68. package/dist/components/menu/MenuItemRow.vue_vue_type_script_setup_true_lang.js +117 -0
  69. package/dist/components/menu/MenuPanel.js +4 -0
  70. package/dist/components/menu/MenuPanel.vue.d.ts +2 -1
  71. package/dist/components/menu/MenuPanel.vue_vue_type_script_setup_true_lang.js +249 -0
  72. package/dist/components/menu/menu.theme.d.ts +5 -0
  73. package/dist/components/menu/menu.theme.js +174 -0
  74. package/dist/components/menu/menuContext.js +9 -0
  75. package/dist/components/menu/menuEntries.js +25 -0
  76. package/dist/components/select/Select.js +4 -0
  77. package/dist/components/select/Select.vue.d.ts +2 -2
  78. package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +262 -0
  79. package/dist/components/select/SelectField.js +4 -0
  80. package/dist/components/select/SelectField.vue.d.ts +2 -2
  81. package/dist/components/select/SelectField.vue_vue_type_script_setup_true_lang.js +271 -0
  82. package/dist/components/select/SelectOptionRow.js +4 -0
  83. package/dist/components/select/SelectOptionRow.vue_vue_type_script_setup_true_lang.js +55 -0
  84. package/dist/components/select/SelectPanel.js +4 -0
  85. package/dist/components/select/SelectPanel.vue_vue_type_script_setup_true_lang.js +169 -0
  86. package/dist/components/select/select-panel.theme.js +44 -0
  87. package/dist/components/select/selectOptions.d.ts +0 -2
  88. package/dist/components/select/selectOptions.js +66 -0
  89. package/dist/components/select/useSelectControl.d.ts +3 -3
  90. package/dist/components/select/useSelectControl.js +62 -0
  91. package/dist/components/select/useSelectListbox.js +169 -0
  92. package/dist/components/slider/RangeSlider.js +4 -0
  93. package/dist/components/slider/RangeSlider.vue_vue_type_script_setup_true_lang.js +214 -0
  94. package/dist/components/slider/Slider.js +4 -0
  95. package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +151 -0
  96. package/dist/components/slider/SliderHeader.js +4 -0
  97. package/dist/components/slider/SliderHeader.vue_vue_type_script_setup_true_lang.js +61 -0
  98. package/dist/components/slider/slider.theme.js +34 -0
  99. package/dist/components/text-field/TextField.js +4 -0
  100. package/dist/components/text-field/TextField.vue.d.ts +2 -2
  101. package/dist/components/text-field/TextField.vue_vue_type_script_setup_true_lang.js +122 -0
  102. package/dist/components/text-field/text-field.theme.js +379 -0
  103. package/dist/components/textarea/Textarea.js +4 -0
  104. package/dist/components/textarea/Textarea.vue.d.ts +1 -1
  105. package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +93 -0
  106. package/dist/components/textarea/textarea.theme.js +222 -0
  107. package/dist/elements/avatar/Avatar.js +4 -0
  108. package/dist/elements/avatar/Avatar.vue.d.ts +3 -3
  109. package/dist/elements/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +71 -0
  110. package/dist/elements/avatar/avatar.theme.js +141 -0
  111. package/dist/elements/badge/Badge.js +4 -0
  112. package/dist/elements/badge/Badge.vue.d.ts +2 -2
  113. package/dist/elements/badge/Badge.vue_vue_type_script_setup_true_lang.js +49 -0
  114. package/dist/elements/badge/badge.theme.js +111 -0
  115. package/dist/elements/button/Button.js +4 -0
  116. package/dist/elements/button/Button.vue.d.ts +3 -3
  117. package/dist/elements/button/Button.vue_vue_type_script_setup_true_lang.js +83 -0
  118. package/dist/elements/button/button.theme.js +424 -0
  119. package/dist/elements/checkbox/Checkbox.js +4 -0
  120. package/dist/elements/checkbox/Checkbox.vue.d.ts +3 -1
  121. package/dist/elements/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +69 -0
  122. package/dist/elements/checkbox/checkbox.theme.d.ts +1 -0
  123. package/dist/elements/checkbox/checkbox.theme.js +22 -0
  124. package/dist/elements/circular-progress/CircularProgress.js +4 -0
  125. package/dist/elements/circular-progress/CircularProgress.vue_vue_type_script_setup_true_lang.js +44 -0
  126. package/dist/elements/circular-progress/circular-progress.theme.js +8 -0
  127. package/dist/elements/input/Input.js +4 -0
  128. package/dist/elements/input/Input.vue.d.ts +62 -0
  129. package/dist/elements/input/Input.vue_vue_type_script_setup_true_lang.js +138 -0
  130. package/dist/elements/input/focusInputFromContainer.d.ts +2 -0
  131. package/dist/elements/input/focusInputFromContainer.js +28 -0
  132. package/dist/elements/input/index.d.ts +2 -0
  133. package/dist/elements/input/input.theme.d.ts +81 -0
  134. package/dist/elements/input/input.theme.js +391 -0
  135. package/dist/elements/loading-dots/LoadingDots.js +4 -0
  136. package/dist/elements/loading-dots/LoadingDots.vue_vue_type_script_setup_true_lang.js +26 -0
  137. package/dist/elements/loading-dots/loading-dots.theme.js +4 -0
  138. package/dist/elements/loading-indicator/LoadingIndicator.js +4 -0
  139. package/dist/elements/loading-indicator/LoadingIndicator.vue_vue_type_script_setup_true_lang.js +26 -0
  140. package/dist/elements/loading-indicator/loading-indicator.theme.js +4 -0
  141. package/dist/elements/popover/Popover.js +4 -0
  142. package/dist/elements/popover/Popover.vue.d.ts +60 -0
  143. package/dist/elements/popover/Popover.vue_vue_type_script_setup_true_lang.js +218 -0
  144. package/dist/elements/popover/index.d.ts +2 -0
  145. package/dist/elements/popover/popover.theme.d.ts +20 -0
  146. package/dist/elements/popover/popover.theme.js +17 -0
  147. package/dist/elements/popover/popoverLayers.d.ts +5 -0
  148. package/dist/elements/popover/popoverLayers.js +22 -0
  149. package/dist/elements/radio-group/RadioGroup.js +4 -0
  150. package/dist/elements/radio-group/RadioGroup.vue.d.ts +1 -1
  151. package/dist/elements/radio-group/RadioGroup.vue_vue_type_script_setup_true_lang.js +105 -0
  152. package/dist/elements/radio-group/radio-group.theme.js +126 -0
  153. package/dist/elements/segmented-control/SegmentedControl.js +4 -0
  154. package/dist/elements/segmented-control/SegmentedControl.vue.d.ts +1 -1
  155. package/dist/elements/segmented-control/SegmentedControl.vue_vue_type_script_setup_true_lang.js +98 -0
  156. package/dist/elements/segmented-control/segmented-control.theme.js +201 -0
  157. package/dist/elements/select-control/SelectControl.js +4 -0
  158. package/dist/elements/select-control/SelectControl.vue.d.ts +1 -1
  159. package/dist/elements/select-control/SelectControl.vue_vue_type_script_setup_true_lang.js +105 -0
  160. package/dist/elements/select-control/select-control.theme.js +360 -0
  161. package/dist/elements/select-field-control/SelectFieldControl.js +4 -0
  162. package/dist/elements/select-field-control/SelectFieldControl.vue.d.ts +1 -1
  163. package/dist/elements/select-field-control/SelectFieldControl.vue_vue_type_script_setup_true_lang.js +123 -0
  164. package/dist/elements/select-field-control/select-field-control.theme.js +299 -0
  165. package/dist/elements/slider-control/SliderControl.js +4 -0
  166. package/dist/elements/slider-control/SliderControl.vue_vue_type_script_setup_true_lang.js +228 -0
  167. package/dist/elements/slider-control/slider-control.theme.js +35 -0
  168. package/dist/elements/slider-control/useSliderMarksLayout.js +25 -0
  169. package/dist/elements/switch/Switch.js +4 -0
  170. package/dist/elements/switch/Switch.vue.d.ts +1 -1
  171. package/dist/elements/switch/Switch.vue_vue_type_script_setup_true_lang.js +71 -0
  172. package/dist/elements/switch/switch.theme.js +37 -0
  173. package/dist/elements/text-link/TextLink.js +4 -0
  174. package/dist/elements/text-link/TextLink.vue_vue_type_script_setup_true_lang.js +64 -0
  175. package/dist/elements/text-link/text-link.theme.js +25 -0
  176. package/dist/elements/tooltip/Tooltip.js +4 -0
  177. package/dist/elements/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +161 -0
  178. package/dist/elements/tooltip/tooltip.theme.js +46 -0
  179. package/dist/elements/tooltip/useTooltipOpenState.js +57 -0
  180. package/dist/index.d.ts +17 -0
  181. package/dist/index.js +38 -1
  182. package/dist/nuxt.js +12 -13
  183. package/dist/shared/composables/useApplePlatform.js +10 -0
  184. package/dist/shared/composables/useCalendarLabels.js +13 -0
  185. package/dist/shared/composables/useCustomColor.js +10 -0
  186. package/dist/shared/composables/useDismissOnOutsidePointerDown.d.ts +1 -1
  187. package/dist/shared/composables/useDismissOnOutsidePointerDown.js +14 -0
  188. package/dist/shared/composables/useFieldDescription.js +16 -0
  189. package/dist/shared/composables/useFloatingPosition.d.ts +3 -2
  190. package/dist/shared/composables/useFloatingPosition.js +113 -0
  191. package/dist/shared/composables/useMask.js +32 -0
  192. package/dist/shared/composables/useMaskedFieldModel.d.ts +7 -0
  193. package/dist/shared/composables/useMaskedFieldModel.js +19 -0
  194. package/dist/shared/composables/useNumberFieldTyping.js +70 -0
  195. package/dist/shared/composables/usePointerGraceArea.js +40 -0
  196. package/dist/shared/composables/useRowSelection.d.ts +17 -0
  197. package/dist/shared/composables/useRowSelection.js +40 -0
  198. package/dist/shared/composables/useShortcuts.js +21 -0
  199. package/dist/shared/composables/useSlidingThumb.js +65 -0
  200. package/dist/shared/composables/useTableRows.d.ts +26 -0
  201. package/dist/shared/composables/useTableRows.js +41 -0
  202. package/dist/shared/types/floating-position.d.ts +9 -0
  203. package/dist/shared/types/table.d.ts +59 -0
  204. package/dist/shared/types/value-path.d.ts +6 -0
  205. package/dist/shared/utils/calendarMonth.js +23 -0
  206. package/dist/shared/utils/computeFloatingPosition.js +32 -0
  207. package/dist/shared/utils/createDateFormatters.js +31 -0
  208. package/dist/shared/utils/createDateInputMask.js +103 -0
  209. package/dist/shared/utils/createDebouncedCallback.js +17 -0
  210. package/dist/shared/utils/createMask.js +65 -0
  211. package/dist/shared/utils/createShortcutHandler.js +60 -0
  212. package/dist/shared/utils/createTypeaheadSearch.js +16 -0
  213. package/dist/shared/utils/editableFieldGuard.js +11 -0
  214. package/dist/shared/utils/findFirstRenderedVNode.js +14 -0
  215. package/dist/shared/utils/flipFloatingPosition.js +28 -0
  216. package/dist/shared/utils/floatingPanelTransition.js +25 -0
  217. package/dist/shared/utils/formatShortcut.js +86 -0
  218. package/dist/shared/utils/isApplePlatform.js +5 -0
  219. package/dist/shared/utils/isExternalUrl.js +5 -0
  220. package/dist/shared/utils/isoDate.js +50 -0
  221. package/dist/shared/utils/normalizeSearchText.d.ts +2 -0
  222. package/dist/shared/utils/normalizeSearchText.js +6 -0
  223. package/dist/shared/utils/parseShortcut.js +48 -0
  224. package/dist/shared/utils/pointerGraceArea.js +92 -0
  225. package/dist/shared/utils/readValueAtPath.d.ts +2 -0
  226. package/dist/shared/utils/readValueAtPath.js +7 -0
  227. package/dist/shared/utils/resolveFloatingAnchor.d.ts +4 -0
  228. package/dist/shared/utils/resolveFloatingAnchor.js +15 -0
  229. package/dist/shared/utils/resolvePressScale.js +5 -0
  230. package/dist/shared/utils/shiftFloatingPosition.js +21 -0
  231. package/dist/shared/utils/sliderPosition.js +27 -0
  232. package/dist/shared/utils/sliderThumbs.js +16 -0
  233. package/dist/shared/utils/steppedValue.js +21 -0
  234. package/dist/shared/utils/tableColumnTypes.d.ts +21 -0
  235. package/dist/shared/utils/tableColumnTypes.js +77 -0
  236. package/dist/shared/utils/tableColumns.d.ts +20 -0
  237. package/dist/shared/utils/tableColumns.js +77 -0
  238. package/dist/shared/utils/tableGroups.d.ts +10 -0
  239. package/dist/shared/utils/tableGroups.js +34 -0
  240. package/dist/shared/utils/tableRows.d.ts +25 -0
  241. package/dist/shared/utils/tableRows.js +80 -0
  242. package/dist/shared/utils/tableTree.d.ts +15 -0
  243. package/dist/shared/utils/tableTree.js +22 -0
  244. package/dist/shared/utils/toggleColumnSort.d.ts +5 -0
  245. package/dist/shared/utils/toggleColumnSort.js +27 -0
  246. package/dist/shared/utils/tv.js +1 -0
  247. package/dist/shared/utils/warnInDevelopment.d.ts +3 -0
  248. package/dist/shared/utils/warnInDevelopment.js +13 -0
  249. package/package.json +1 -1
  250. package/src/index.css +1 -0
  251. package/src/shared/styles/utilities/shake.css +21 -0
  252. package/dist/src-Rouj5r7z.js +0 -9111
@@ -0,0 +1,123 @@
1
+ import { selectFieldControlTheme as e } from "./select-field-control.theme.js";
2
+ import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useSlots as _, useTemplateRef as v, withModifiers as y } from "vue";
3
+ import { CircleAlert as b, X as x } from "lucide-vue-next";
4
+ // src/elements/select-field-control/SelectFieldControl.vue?vue&type=script&setup=true&lang.ts
5
+ var S = ["id", "aria-hidden"], C = ["aria-label"], w = ["id"], T = ["id"], E = ["id"], D = /*@__PURE__*/ l({
6
+ __name: "SelectFieldControl",
7
+ props: {
8
+ label: {},
9
+ labelId: {},
10
+ valueId: {},
11
+ hintId: {},
12
+ errorMessageId: {},
13
+ placeholder: {},
14
+ hint: {},
15
+ errorMessage: {},
16
+ size: { default: "4xl" },
17
+ variant: { default: "outline" },
18
+ pill: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ floatLabel: { default: "auto" },
23
+ open: { type: Boolean },
24
+ invalid: { type: Boolean },
25
+ disabled: { type: Boolean },
26
+ hasValue: { type: Boolean },
27
+ leadingIcon: {},
28
+ trailingIcon: {},
29
+ showsClearButton: { type: Boolean },
30
+ clearLabel: { default: "Clear current value" },
31
+ spokenValue: {},
32
+ triggerAttributes: {},
33
+ ui: {},
34
+ class: { type: [
35
+ Array,
36
+ String,
37
+ null,
38
+ Number,
39
+ Boolean
40
+ ] }
41
+ },
42
+ emits: ["clear"],
43
+ setup(l, { expose: D, emit: O }) {
44
+ let k = l, A = O, j = _(), M = v("containerElement"), N = v("triggerElement");
45
+ D({
46
+ containerElement: M,
47
+ triggerElement: N
48
+ });
49
+ let P = n(() => k.invalid ? "invalid" : k.disabled ? "disabled" : k.open ? "open" : "idle"), F = n(() => e({
50
+ size: k.size,
51
+ variant: k.variant,
52
+ pill: k.pill,
53
+ fieldState: P.value,
54
+ floatLabel: k.floatLabel,
55
+ labelFloating: k.floatLabel === "always" || k.hasValue || k.open,
56
+ hasLeadingIcon: !!k.leadingIcon,
57
+ disabled: k.disabled,
58
+ open: k.open,
59
+ hasTrailingIcon: !!k.trailingIcon
60
+ }));
61
+ return (e, n) => (f(), a("div", { class: d(F.value.root({ class: [l.ui?.root, k.class] })) }, [o("div", {
62
+ ref_key: "containerElement",
63
+ ref: M,
64
+ class: d(F.value.container({ class: l.ui?.container }))
65
+ }, [
66
+ o("div", u({
67
+ ref_key: "triggerElement",
68
+ ref: N
69
+ }, l.triggerAttributes, { class: F.value.base({ class: l.ui?.base }) }), [
70
+ j.leading ? (f(), a("span", {
71
+ key: 0,
72
+ class: d(F.value.leadingAvatar({ class: l.ui?.leadingAvatar }))
73
+ }, [p(e.$slots, "leading")], 2)) : l.leadingIcon ? (f(), r(m(l.leadingIcon), {
74
+ key: 1,
75
+ class: d(F.value.leadingIcon({ class: l.ui?.leadingIcon }))
76
+ }, null, 8, ["class"])) : i("", !0),
77
+ j.input ? p(e.$slots, "input", { inputClass: F.value.input({ class: l.ui?.input }) }, void 0, void 0, 2) : (f(), a(t, { key: 3 }, [o("span", {
78
+ id: l.valueId,
79
+ "aria-hidden": l.spokenValue ? !0 : void 0,
80
+ class: d(F.value.value({ class: l.ui?.value }))
81
+ }, [l.hasValue ? p(e.$slots, "default", {}, void 0, void 0, 0) : l.placeholder ? (f(), a("span", {
82
+ key: 1,
83
+ class: d(F.value.placeholder({ class: l.ui?.placeholder }))
84
+ }, h(l.placeholder), 3)) : i("", !0)], 10, S), l.spokenValue ? (f(), a("span", {
85
+ key: 0,
86
+ class: d(F.value.selectionForScreenReaders({ class: l.ui?.selectionForScreenReaders }))
87
+ }, h(l.spokenValue), 3)) : i("", !0)], 64)),
88
+ l.showsClearButton || j.status || l.trailingIcon ? (f(), a("span", {
89
+ key: 4,
90
+ class: d(F.value.trailing({ class: l.ui?.trailing }))
91
+ }, [
92
+ l.showsClearButton ? (f(), a("button", {
93
+ key: 0,
94
+ type: "button",
95
+ "aria-label": l.clearLabel,
96
+ class: d(F.value.clearButton({ class: l.ui?.clearButton })),
97
+ onClick: n[0] ||= y((e) => A("clear"), ["stop"]),
98
+ onKeydown: n[1] ||= y(() => {}, ["stop"])
99
+ }, [c(g(x), { class: d(F.value.clearIcon({ class: l.ui?.clearIcon })) }, null, 8, ["class"])], 42, C)) : i("", !0),
100
+ p(e.$slots, "status", { statusClass: F.value.loadingIndicator({ class: l.ui?.loadingIndicator }) }),
101
+ l.trailingIcon ? (f(), r(m(l.trailingIcon), {
102
+ key: 1,
103
+ class: d(F.value.trailingIcon({ class: l.ui?.trailingIcon }))
104
+ }, null, 8, ["class"])) : i("", !0)
105
+ ], 2)) : i("", !0)
106
+ ], 16),
107
+ o("span", {
108
+ id: l.labelId,
109
+ class: d(F.value.label({ class: l.ui?.label }))
110
+ }, h(l.label), 11, w),
111
+ p(e.$slots, "popup")
112
+ ], 2), l.errorMessage ? (f(), a("p", {
113
+ key: 0,
114
+ id: l.errorMessageId,
115
+ class: d(F.value.errorMessage({ class: l.ui?.errorMessage }))
116
+ }, [c(g(b), { class: d(F.value.errorIcon({ class: l.ui?.errorIcon })) }, null, 8, ["class"]), s(" " + h(l.errorMessage), 1)], 10, T)) : l.hint ? (f(), a("p", {
117
+ key: 1,
118
+ id: l.hintId,
119
+ class: d(F.value.hint({ class: l.ui?.hint }))
120
+ }, h(l.hint), 11, E)) : i("", !0)], 2));
121
+ }
122
+ });
123
+ export { D as default };
@@ -0,0 +1,299 @@
1
+ import { tv as e } from "../../shared/utils/tv.js";
2
+ // src/elements/select-field-control/select-field-control.theme.ts
3
+ var t = {
4
+ md: {
5
+ height: "h-8",
6
+ fontSize: "text-sm",
7
+ leadingIconSize: "size-3",
8
+ trailingIconSize: "size-4",
9
+ loadingIndicatorSize: "text-base",
10
+ clearButtonSize: "size-5.5",
11
+ clearIconSize: "size-3.5",
12
+ floatingLabelFontSize: "text-[11px]",
13
+ restingLabelFontSize: "text-sm peer-focus-within:text-[11px]",
14
+ pillShape: {
15
+ corners: "rounded-full",
16
+ gutter: "px-4",
17
+ labelOffset: "left-3",
18
+ restingLabelOffsetWithLeadingIcon: "left-8 peer-focus-within:left-3"
19
+ },
20
+ roundedShape: {
21
+ corners: "rounded-lg",
22
+ gutter: "px-3",
23
+ labelOffset: "left-2",
24
+ restingLabelOffsetWithLeadingIcon: "left-7 peer-focus-within:left-2"
25
+ }
26
+ },
27
+ lg: {
28
+ height: "h-9",
29
+ fontSize: "text-sm",
30
+ leadingIconSize: "size-3",
31
+ trailingIconSize: "size-4",
32
+ loadingIndicatorSize: "text-base",
33
+ clearButtonSize: "size-5.5",
34
+ clearIconSize: "size-3.5",
35
+ floatingLabelFontSize: "text-[11px]",
36
+ restingLabelFontSize: "text-sm peer-focus-within:text-[11px]",
37
+ pillShape: {
38
+ corners: "rounded-full",
39
+ gutter: "px-4",
40
+ labelOffset: "left-3",
41
+ restingLabelOffsetWithLeadingIcon: "left-8 peer-focus-within:left-3"
42
+ },
43
+ roundedShape: {
44
+ corners: "rounded-lg",
45
+ gutter: "px-3",
46
+ labelOffset: "left-2",
47
+ restingLabelOffsetWithLeadingIcon: "left-7 peer-focus-within:left-2"
48
+ }
49
+ },
50
+ xl: {
51
+ height: "h-10",
52
+ fontSize: "text-base",
53
+ leadingIconSize: "size-3.5",
54
+ trailingIconSize: "size-4",
55
+ loadingIndicatorSize: "text-lg",
56
+ clearButtonSize: "size-6",
57
+ clearIconSize: "size-4",
58
+ floatingLabelFontSize: "text-[11px]",
59
+ restingLabelFontSize: "text-base peer-focus-within:text-[11px]",
60
+ pillShape: {
61
+ corners: "rounded-full",
62
+ gutter: "px-4.75",
63
+ labelOffset: "left-3.75",
64
+ restingLabelOffsetWithLeadingIcon: "left-9.25 peer-focus-within:left-3.75"
65
+ },
66
+ roundedShape: {
67
+ corners: "rounded-[10px]",
68
+ gutter: "px-3.5",
69
+ labelOffset: "left-2.5",
70
+ restingLabelOffsetWithLeadingIcon: "left-8 peer-focus-within:left-2.5"
71
+ }
72
+ },
73
+ "2xl": {
74
+ height: "h-11",
75
+ fontSize: "text-base",
76
+ leadingIconSize: "size-4",
77
+ trailingIconSize: "size-4",
78
+ loadingIndicatorSize: "text-lg",
79
+ clearButtonSize: "size-6",
80
+ clearIconSize: "size-4",
81
+ floatingLabelFontSize: "text-xs",
82
+ restingLabelFontSize: "text-base peer-focus-within:text-xs",
83
+ pillShape: {
84
+ corners: "rounded-full",
85
+ gutter: "px-5.25",
86
+ labelOffset: "left-4.25",
87
+ restingLabelOffsetWithLeadingIcon: "left-10.25 peer-focus-within:left-4.25"
88
+ },
89
+ roundedShape: {
90
+ corners: "rounded-xl",
91
+ gutter: "px-4",
92
+ labelOffset: "left-3",
93
+ restingLabelOffsetWithLeadingIcon: "left-9 peer-focus-within:left-3"
94
+ }
95
+ },
96
+ "3xl": {
97
+ height: "h-12",
98
+ fontSize: "text-base",
99
+ leadingIconSize: "size-4",
100
+ trailingIconSize: "size-4.5",
101
+ loadingIndicatorSize: "text-xl",
102
+ clearButtonSize: "size-6",
103
+ clearIconSize: "size-4",
104
+ floatingLabelFontSize: "text-xs",
105
+ restingLabelFontSize: "text-base peer-focus-within:text-xs",
106
+ pillShape: {
107
+ corners: "rounded-full",
108
+ gutter: "px-5.25",
109
+ labelOffset: "left-4.25",
110
+ restingLabelOffsetWithLeadingIcon: "left-10.25 peer-focus-within:left-4.25"
111
+ },
112
+ roundedShape: {
113
+ corners: "rounded-xl",
114
+ gutter: "px-4",
115
+ labelOffset: "left-3",
116
+ restingLabelOffsetWithLeadingIcon: "left-9 peer-focus-within:left-3"
117
+ }
118
+ },
119
+ "4xl": {
120
+ height: "h-14",
121
+ fontSize: "text-base",
122
+ leadingIconSize: "size-4",
123
+ trailingIconSize: "size-5",
124
+ loadingIndicatorSize: "text-2xl",
125
+ clearButtonSize: "size-7",
126
+ clearIconSize: "size-4.5",
127
+ floatingLabelFontSize: "text-xs",
128
+ restingLabelFontSize: "text-base peer-focus-within:text-xs",
129
+ pillShape: {
130
+ corners: "rounded-full",
131
+ gutter: "px-6",
132
+ labelOffset: "left-5",
133
+ restingLabelOffsetWithLeadingIcon: "left-11 peer-focus-within:left-5"
134
+ },
135
+ roundedShape: {
136
+ corners: "rounded-2xl",
137
+ gutter: "px-4.5",
138
+ labelOffset: "left-3.5",
139
+ restingLabelOffsetWithLeadingIcon: "left-9.5 peer-focus-within:left-3.5"
140
+ }
141
+ }
142
+ }, n = Object.keys(t);
143
+ function r(e) {
144
+ return {
145
+ base: [e.height, e.fontSize],
146
+ leadingIcon: e.leadingIconSize,
147
+ trailingIcon: e.trailingIconSize,
148
+ loadingIndicator: e.loadingIndicatorSize,
149
+ clearButton: e.clearButtonSize,
150
+ clearIcon: e.clearIconSize
151
+ };
152
+ }
153
+ function i(e) {
154
+ let n = t[e];
155
+ return [!0, !1].flatMap((t) => {
156
+ let r = t ? n.pillShape : n.roundedShape;
157
+ return [
158
+ {
159
+ size: e,
160
+ pill: t,
161
+ class: { base: [r.corners, r.gutter] }
162
+ },
163
+ {
164
+ size: e,
165
+ pill: t,
166
+ labelFloating: !0,
167
+ class: { label: [r.labelOffset, n.floatingLabelFontSize] }
168
+ },
169
+ {
170
+ size: e,
171
+ pill: t,
172
+ labelFloating: !1,
173
+ hasLeadingIcon: !1,
174
+ class: { label: [r.labelOffset, n.restingLabelFontSize] }
175
+ },
176
+ {
177
+ size: e,
178
+ pill: t,
179
+ labelFloating: !1,
180
+ hasLeadingIcon: !0,
181
+ class: { label: [r.restingLabelOffsetWithLeadingIcon, n.restingLabelFontSize] }
182
+ }
183
+ ];
184
+ });
185
+ }
186
+ var a = Object.fromEntries(n.map((e) => [e, r(t[e])])), o = e({
187
+ slots: {
188
+ root: "",
189
+ container: "relative",
190
+ base: "peer group flex w-full items-center gap-2 border bg-field whitespace-nowrap outline-hidden transition-colors select-none",
191
+ leadingIcon: "shrink-0 text-muted",
192
+ leadingAvatar: "flex shrink-0",
193
+ value: "min-w-0 flex-1 truncate",
194
+ input: "min-w-0 flex-1 truncate bg-transparent outline-hidden placeholder:text-muted placeholder:opacity-0 placeholder:transition-opacity focus:placeholder:opacity-100",
195
+ placeholder: "text-muted opacity-0 transition-opacity group-focus-within:opacity-100",
196
+ selectionForScreenReaders: "sr-only",
197
+ trailing: "flex shrink-0 items-center gap-1",
198
+ clearButton: "flex cursor-pointer items-center justify-center rounded-full outline-primary transition focus-visible:outline-2",
199
+ clearIcon: "",
200
+ loadingIndicator: "",
201
+ trailingIcon: "shrink-0 text-muted transition-opacity group-hover:opacity-100",
202
+ label: "pointer-events-none absolute -translate-y-1/2 from-canvas from-50% to-field to-50% px-1 whitespace-nowrap transition-all",
203
+ hint: "mt-2 text-xs text-muted",
204
+ errorMessage: "mt-2 flex items-start gap-x-1.5 text-xs light:text-red-600 dark:text-red-400",
205
+ errorIcon: "mt-px size-3.5 shrink-0"
206
+ },
207
+ variants: {
208
+ size: a,
209
+ variant: {
210
+ outline: "",
211
+ soft: ""
212
+ },
213
+ pill: {
214
+ true: "",
215
+ false: ""
216
+ },
217
+ fieldState: {
218
+ invalid: {
219
+ base: "light:border-red-600 dark:border-red-500",
220
+ label: "light:text-red-600 dark:text-red-400"
221
+ },
222
+ disabled: { label: "text-muted" },
223
+ open: {
224
+ base: "border-primary",
225
+ label: "text-primary"
226
+ },
227
+ idle: { label: "text-muted peer-focus-within:text-primary" }
228
+ },
229
+ floatLabel: {
230
+ auto: "",
231
+ always: {
232
+ placeholder: "opacity-100",
233
+ input: "placeholder:opacity-100"
234
+ }
235
+ },
236
+ labelFloating: {
237
+ true: { label: "top-0 bg-linear-to-b" },
238
+ false: { label: "top-1/2 peer-focus-within:top-0 peer-focus-within:bg-linear-to-b" }
239
+ },
240
+ hasLeadingIcon: {
241
+ true: "",
242
+ false: ""
243
+ },
244
+ disabled: {
245
+ true: {
246
+ container: "opacity-50",
247
+ base: "cursor-not-allowed"
248
+ },
249
+ false: { base: "cursor-pointer" }
250
+ },
251
+ open: {
252
+ true: {
253
+ trailingIcon: "opacity-100",
254
+ placeholder: "opacity-100"
255
+ },
256
+ false: { trailingIcon: "opacity-75" }
257
+ },
258
+ hasTrailingIcon: {
259
+ true: { clearButton: "text-muted opacity-75 hover:opacity-100 light:hover:bg-stone-950/8 dark:hover:bg-stone-200/12" },
260
+ false: { clearButton: "light:bg-stone-600 light:text-white dark:bg-stone-600 dark:text-white" }
261
+ }
262
+ },
263
+ compoundVariants: [
264
+ ...n.flatMap(i),
265
+ {
266
+ fieldState: "disabled",
267
+ variant: "outline",
268
+ class: { base: "border-line" }
269
+ },
270
+ {
271
+ fieldState: "disabled",
272
+ variant: "soft",
273
+ class: { base: "border-transparent" }
274
+ },
275
+ {
276
+ fieldState: "idle",
277
+ variant: "outline",
278
+ class: { base: "border-line light:not-focus-within:hover:border-stone-950/20 dark:not-focus-within:hover:border-white/20 focus-within:border-primary" }
279
+ },
280
+ {
281
+ fieldState: "idle",
282
+ variant: "soft",
283
+ class: { base: "border-transparent focus-within:border-primary" }
284
+ }
285
+ ],
286
+ defaultVariants: {
287
+ size: "4xl",
288
+ variant: "outline",
289
+ pill: !0,
290
+ fieldState: "idle",
291
+ floatLabel: "auto",
292
+ labelFloating: !1,
293
+ hasLeadingIcon: !1,
294
+ disabled: !1,
295
+ open: !1,
296
+ hasTrailingIcon: !0
297
+ }
298
+ });
299
+ export { o as selectFieldControlTheme };
@@ -0,0 +1,4 @@
1
+ import e from "./SliderControl.vue_vue_type_script_setup_true_lang.js";
2
+ // src/elements/slider-control/SliderControl.vue
3
+ var t = e;
4
+ export { t as default };
@@ -0,0 +1,228 @@
1
+ import { createShortcutHandler as e } from "../../shared/utils/createShortcutHandler.js";
2
+ import { convertPointerToValue as t, convertValueToPercent as n, convertValueToRatio as r, sortSliderMarks as i } from "../../shared/utils/sliderPosition.js";
3
+ import { findClosestThumbIndex as a, isThumbStacked as o, resolveThumbBounds as s } from "../../shared/utils/sliderThumbs.js";
4
+ import { clampToRange as ee, moveByStep as te, snapToStep as c } from "../../shared/utils/steppedValue.js";
5
+ import { sliderControlTheme as ne } from "./slider-control.theme.js";
6
+ import { useSliderMarksLayout as re } from "./useSliderMarksLayout.js";
7
+ import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, defineComponent as m, mergeModels as h, mergeProps as ie, nextTick as ae, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as oe, onMounted as se, openBlock as v, ref as y, renderList as b, toDisplayString as ce, unref as x, useModel as le, useTemplateRef as S, watch as ue } from "vue";
8
+ // src/elements/slider-control/SliderControl.vue?vue&type=script&setup=true&lang.ts
9
+ var C = ["data-disabled"], de = ["onFocus"], fe = ["name", "value"], w = /*@__PURE__*/ m({
10
+ __name: "SliderControl",
11
+ props: /*@__PURE__*/ h({
12
+ min: {},
13
+ max: {},
14
+ step: {},
15
+ minRange: { default: 0 },
16
+ disabled: { type: Boolean },
17
+ name: {},
18
+ marks: { default: () => [] },
19
+ trackColor: {},
20
+ rangeColor: {},
21
+ thumbLabels: { default: () => [] },
22
+ thumbAttributes: {},
23
+ ui: {},
24
+ class: { type: [
25
+ Array,
26
+ String,
27
+ null,
28
+ Number,
29
+ Boolean
30
+ ] }
31
+ }, {
32
+ modelValue: { required: !0 },
33
+ modelModifiers: {}
34
+ }),
35
+ emits: ["update:modelValue"],
36
+ setup(m, { expose: h }) {
37
+ let w = m, T = le(m, "modelValue"), E = {
38
+ direction: 1,
39
+ stepCount: 1
40
+ }, D = {
41
+ direction: -1,
42
+ stepCount: 1
43
+ }, O = {
44
+ direction: 1,
45
+ stepCount: 10
46
+ }, k = {
47
+ direction: -1,
48
+ stepCount: 10
49
+ }, A = S("rootElement"), j = S("controlElement"), M = S("marksElement"), N = S("formValueInputs"), P = [], F = y(!1), I = y(!1), L = y(), R = y(0), z = y(0), pe = [...T.value], B = !1, V, H = null, U;
50
+ h({ isPointerPressing: F });
51
+ let W = u(() => i(w.marks, w.min, w.max)), me = u(() => W.value.map((e) => `${e.value}:${e.label}`).join("|")), { marksLayout: he } = re(M, [
52
+ me,
53
+ () => w.min,
54
+ () => w.max,
55
+ L
56
+ ]), G = u(() => T.value.map((e) => n(e, w.min, w.max)));
57
+ ue(() => T.value.map((e) => r(e, w.min, w.max)), (e, t) => {
58
+ let n = Math.max(...e.map((e, n) => Math.abs(e - (t[n] ?? e))));
59
+ R.value = Math.max(n * 300, 100);
60
+ });
61
+ let ge = u(() => F.value ? 0 : R.value), K = u(() => ne({
62
+ disabled: w.disabled,
63
+ marksLayout: he.value
64
+ })), _e = u(() => L.value === void 0 ? void 0 : { "--slider-thumb-size": `${L.value}px` }), ve = u(() => ({
65
+ "--slider-value-transition-duration": `${ge.value}ms`,
66
+ "--slider-track-color": w.trackColor,
67
+ "--slider-range-color": w.rangeColor
68
+ })), ye = u(() => ({
69
+ left: `${G.value.length > 1 ? Math.min(...G.value) : 0}%`,
70
+ right: `${100 - Math.max(...G.value)}%`
71
+ }));
72
+ function be(e) {
73
+ return { left: `calc(${e}% + var(--slider-thumb-size) * ${.5 - e / 100})` };
74
+ }
75
+ function xe(e) {
76
+ let { lowestValue: t, highestValue: n } = s(T.value, e, w);
77
+ return {
78
+ tabindex: w.disabled ? void 0 : 0,
79
+ "aria-label": w.thumbLabels[e],
80
+ "aria-valuemin": t,
81
+ "aria-valuenow": T.value[e],
82
+ "aria-valuemax": n,
83
+ "aria-disabled": w.disabled || void 0,
84
+ "data-disabled": w.disabled ? "" : void 0
85
+ };
86
+ }
87
+ function Se(e, t) {
88
+ e instanceof HTMLElement && (P[t] = e);
89
+ }
90
+ function q(e) {
91
+ z.value = e;
92
+ }
93
+ function Ce() {
94
+ ae(() => N.value?.[0]?.dispatchEvent(new Event("input", { bubbles: !0 })));
95
+ }
96
+ function J(e, t, n) {
97
+ if (w.disabled) return;
98
+ let { lowestValue: r, highestValue: i } = s(T.value, e, w), a = ee(c(t, w), r, i);
99
+ a !== T.value[e] && (T.value = T.value.map((t, n) => n === e ? a : t), q(e), P[e]?.focus({
100
+ preventScroll: !0,
101
+ focusVisible: n
102
+ }), Ce());
103
+ }
104
+ function Y(e) {
105
+ let t = T.value[z.value] ?? w.min;
106
+ J(z.value, te(t, w, e), !0);
107
+ }
108
+ let X = e({
109
+ home: () => J(z.value, w.min, !0),
110
+ end: () => J(z.value, w.max, !0),
111
+ arrowright: () => Y(E),
112
+ arrowup: () => Y(E),
113
+ arrowleft: () => Y(D),
114
+ arrowdown: () => Y(D),
115
+ "shift+arrowright": () => Y(O),
116
+ "shift+arrowup": () => Y(O),
117
+ "shift+arrowleft": () => Y(k),
118
+ "shift+arrowdown": () => Y(k),
119
+ pageup: () => Y(O),
120
+ "shift+pageup": () => Y(O),
121
+ pagedown: () => Y(k),
122
+ "shift+pagedown": () => Y(k)
123
+ });
124
+ function Z(e) {
125
+ return V ??= j.value?.getBoundingClientRect(), V ? t(e.clientX - V.left, V.width, w.min, w.max) : T.value[z.value] ?? w.min;
126
+ }
127
+ function we(e) {
128
+ let t = T.value[z.value];
129
+ B && c(e, w) !== t && (q(a(T.value, e)), B = !1);
130
+ }
131
+ function Te(e) {
132
+ let t = e.target;
133
+ if (e.button !== 0 || !(t instanceof HTMLElement) || (F.value = !0, t.setPointerCapture(e.pointerId), e.preventDefault(), w.disabled)) return;
134
+ let n = P.indexOf(t);
135
+ if (n >= 0) {
136
+ q(n), B = o(T.value, n), t.focus({
137
+ preventScroll: !0,
138
+ focusVisible: !1
139
+ });
140
+ return;
141
+ }
142
+ let r = Z(e), i = a(T.value, r);
143
+ q(i), B = o(T.value, i), J(i, r, !1);
144
+ }
145
+ function Ee(e) {
146
+ let t = e.target;
147
+ if (!(t instanceof HTMLElement) || !t.hasPointerCapture(e.pointerId)) return;
148
+ let n = Z(e);
149
+ we(n), J(z.value, n, !1);
150
+ }
151
+ function Q(e) {
152
+ let t = e.target;
153
+ F.value = !1, B = !1, V = void 0, t instanceof HTMLElement && t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId);
154
+ }
155
+ function $() {
156
+ T.value = [...pe];
157
+ }
158
+ function De([e]) {
159
+ L.value = e?.borderBoxSize[0]?.inlineSize ?? P[0]?.offsetWidth;
160
+ }
161
+ return se(() => {
162
+ H = A.value?.closest("form") ?? null, I.value = !!H, H?.addEventListener("reset", $), P[0] && (U = new ResizeObserver(De), U.observe(P[0]));
163
+ }), oe(() => {
164
+ H?.removeEventListener("reset", $), U?.disconnect();
165
+ }), (e, t) => (v(), f("div", {
166
+ ref_key: "rootElement",
167
+ ref: A,
168
+ style: _(_e.value),
169
+ class: g(K.value.root({ class: [m.ui?.root, w.class] }))
170
+ }, [
171
+ p("span", {
172
+ ref_key: "controlElement",
173
+ ref: j,
174
+ "data-orientation": "horizontal",
175
+ "data-disabled": m.disabled ? "" : void 0,
176
+ style: _(ve.value),
177
+ class: g(K.value.control({ class: m.ui?.control })),
178
+ onPointerdown: Te,
179
+ onPointermove: Ee,
180
+ onPointerup: Q,
181
+ onPointercancel: Q,
182
+ onKeydown: t[0] ||= (...e) => x(X) && x(X)(...e)
183
+ }, [p("span", { class: g(K.value.track({ class: m.ui?.track })) }, [p("span", {
184
+ style: _(ye.value),
185
+ class: g(K.value.range({ class: m.ui?.range }))
186
+ }, null, 6)], 2), (v(!0), f(l, null, b(G.value, (e, t) => (v(), f("span", {
187
+ key: t,
188
+ style: _(be(e)),
189
+ class: g(K.value.thumbAnchor({
190
+ isActiveThumb: t === z.value,
191
+ class: m.ui?.thumbAnchor
192
+ }))
193
+ }, [p("span", ie({
194
+ ref_for: !0,
195
+ ref: (e) => Se(e, t),
196
+ role: "slider",
197
+ "aria-orientation": "horizontal",
198
+ "data-orientation": "horizontal"
199
+ }, { ref_for: !0 }, {
200
+ ...xe(t),
201
+ ...m.thumbAttributes
202
+ }, {
203
+ class: K.value.thumb({ class: m.ui?.thumb }),
204
+ onFocus: (e) => q(t)
205
+ }), null, 16, de)], 6))), 128))], 46, C),
206
+ m.name || I.value ? (v(!0), f(l, { key: 0 }, b(T.value, (e, t) => (v(), f("input", {
207
+ key: t,
208
+ ref_for: !0,
209
+ ref_key: "formValueInputs",
210
+ ref: N,
211
+ type: "hidden",
212
+ name: m.name && T.value.length > 1 ? `${m.name}[]` : m.name,
213
+ value: e
214
+ }, null, 8, fe))), 128)) : d("", !0),
215
+ W.value.length > 0 ? (v(), f("div", {
216
+ key: 1,
217
+ ref_key: "marksElement",
218
+ ref: M,
219
+ class: g(K.value.marks({ class: m.ui?.marks }))
220
+ }, [(v(!0), f(l, null, b(W.value, (e) => (v(), f("div", {
221
+ key: e.value,
222
+ style: _({ "--slider-mark-ratio": x(r)(e.value, m.min, m.max) }),
223
+ class: g(K.value.mark({ class: m.ui?.mark }))
224
+ }, [p("span", { class: g(K.value.markLabel({ class: m.ui?.markLabel })) }, ce(e.label), 3)], 6))), 128))], 2)) : d("", !0)
225
+ ], 6));
226
+ }
227
+ });
228
+ export { w as default };
@@ -0,0 +1,35 @@
1
+ import { tv as e } from "../../shared/utils/tv.js";
2
+ // src/elements/slider-control/slider-control.theme.ts
3
+ var t = e({
4
+ slots: {
5
+ root: "relative w-full [--slider-thumb-size:14px]",
6
+ control: "relative flex w-full touch-none items-center pb-1.5 select-none dark:[--slider-range-color:var(--color-stone-400)] dark:[--slider-track-color:var(--color-stone-700)] light:[--slider-range-color:var(--color-stone-500)] light:[--slider-track-color:var(--color-stone-200)]",
7
+ track: "relative h-1 w-full grow rounded-xs bg-(--slider-track-color)",
8
+ range: "absolute h-full rounded-xs bg-(--slider-range-color) transition-[left,right] duration-(--slider-value-transition-duration) ease-[cubic-bezier(0.65,0,0.35,1)]",
9
+ thumbAnchor: "absolute -translate-x-1/2 transition-[left] duration-(--slider-value-transition-duration) ease-[cubic-bezier(0.65,0,0.35,1)]",
10
+ thumb: "block size-3.5 rounded-full inset-ring-2 inset-ring-(--slider-range-color) outline-primary focus-visible:outline-2 focus-visible:outline-offset-2 dark:bg-stone-950 light:bg-white",
11
+ marks: "@container mt-1 grid",
12
+ mark: "col-start-1 row-start-1 slider-mark-position justify-self-start text-xs font-normal",
13
+ markLabel: "inline-block text-center wrap-break-word"
14
+ },
15
+ variants: {
16
+ disabled: {
17
+ true: {
18
+ control: "cursor-not-allowed",
19
+ thumb: "cursor-not-allowed"
20
+ },
21
+ false: { thumb: "cursor-grab active:cursor-grabbing" }
22
+ },
23
+ isActiveThumb: { true: { thumbAnchor: "z-1" } },
24
+ marksLayout: {
25
+ inline: "",
26
+ wrapped: { mark: "w-min" },
27
+ hidden: { mark: "hidden" }
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ disabled: !1,
32
+ marksLayout: "inline"
33
+ }
34
+ });
35
+ export { t as sliderControlTheme };