@wirekyt/vue 0.0.1 → 0.0.3

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 (291) hide show
  1. package/dist/accordion.cjs +273 -0
  2. package/dist/accordion.d.cts +195 -0
  3. package/dist/accordion.d.ts +195 -0
  4. package/dist/accordion.js +250 -0
  5. package/dist/angle-slider.cjs +268 -0
  6. package/dist/angle-slider.d.cts +228 -0
  7. package/dist/angle-slider.d.ts +228 -0
  8. package/dist/angle-slider.js +244 -0
  9. package/dist/avatar.cjs +145 -0
  10. package/dist/avatar.d.cts +114 -0
  11. package/dist/avatar.d.ts +114 -0
  12. package/dist/avatar.js +126 -0
  13. package/dist/boolean-BCaEpMxQ.js +6 -0
  14. package/dist/boolean-Dyu9-5Wp.cjs +11 -0
  15. package/dist/carousel.cjs +342 -0
  16. package/dist/carousel.d.cts +303 -0
  17. package/dist/carousel.d.ts +303 -0
  18. package/dist/carousel.js +320 -0
  19. package/dist/checkbox.cjs +345 -0
  20. package/dist/checkbox.d.cts +272 -0
  21. package/dist/checkbox.d.ts +272 -0
  22. package/dist/checkbox.js +324 -0
  23. package/dist/clean-props--1kqQE0Y.js +8 -0
  24. package/dist/clean-props-MyKqus13.cjs +13 -0
  25. package/dist/client-only.cjs +17 -0
  26. package/dist/client-only.d.cts +18 -0
  27. package/dist/client-only.d.ts +18 -0
  28. package/dist/client-only.js +16 -0
  29. package/dist/clipboard.cjs +229 -0
  30. package/dist/clipboard.d.cts +203 -0
  31. package/dist/clipboard.d.ts +203 -0
  32. package/dist/clipboard.js +206 -0
  33. package/dist/collapsible-BnUr4dTo.cjs +232 -0
  34. package/dist/collapsible-jvqnRz16.js +179 -0
  35. package/dist/collapsible.cjs +23 -0
  36. package/dist/collapsible.d.cts +161 -0
  37. package/dist/collapsible.d.ts +161 -0
  38. package/dist/collapsible.js +2 -0
  39. package/dist/collection-B0onOyyK.cjs +254 -0
  40. package/dist/collection-Dg6EtML_.js +211 -0
  41. package/dist/collection.cjs +9 -0
  42. package/dist/collection.d.cts +2 -0
  43. package/dist/collection.d.ts +2 -0
  44. package/dist/collection.js +2 -0
  45. package/dist/color-picker.cjs +804 -0
  46. package/dist/color-picker.d.cts +605 -0
  47. package/dist/color-picker.d.ts +605 -0
  48. package/dist/color-picker.js +759 -0
  49. package/dist/combobox.cjs +552 -0
  50. package/dist/combobox.d.cts +442 -0
  51. package/dist/combobox.d.ts +442 -0
  52. package/dist/combobox.js +521 -0
  53. package/dist/create-split-props-BBxrD7TV.js +10 -0
  54. package/dist/create-split-props-Jx-IEwdk.cjs +15 -0
  55. package/dist/date-input.cjs +293 -0
  56. package/dist/date-input.d.cts +212 -0
  57. package/dist/date-input.d.ts +212 -0
  58. package/dist/date-input.js +270 -0
  59. package/dist/date-picker.cjs +821 -0
  60. package/dist/date-picker.d.cts +637 -0
  61. package/dist/date-picker.d.ts +637 -0
  62. package/dist/date-picker.js +776 -0
  63. package/dist/dialog.cjs +333 -0
  64. package/dist/dialog.d.cts +272 -0
  65. package/dist/dialog.d.ts +272 -0
  66. package/dist/dialog.js +308 -0
  67. package/dist/download-trigger.cjs +65 -0
  68. package/dist/download-trigger.d.cts +34 -0
  69. package/dist/download-trigger.d.ts +34 -0
  70. package/dist/download-trigger.js +63 -0
  71. package/dist/drawer.cjs +448 -0
  72. package/dist/drawer.d.cts +346 -0
  73. package/dist/drawer.d.ts +346 -0
  74. package/dist/drawer.js +415 -0
  75. package/dist/editable.cjs +331 -0
  76. package/dist/editable.d.cts +285 -0
  77. package/dist/editable.d.ts +285 -0
  78. package/dist/editable.js +306 -0
  79. package/dist/factory-8Ao0DEy3.js +34 -0
  80. package/dist/factory-BNwuanv4.d.cts +21 -0
  81. package/dist/factory-BNwuanv4.d.ts +21 -0
  82. package/dist/factory-JL7MPjkk.cjs +45 -0
  83. package/dist/field-C3pLqz1S.js +435 -0
  84. package/dist/field-DRz-v4rB.cjs +524 -0
  85. package/dist/field.cjs +22 -0
  86. package/dist/field.d.cts +344 -0
  87. package/dist/field.d.ts +344 -0
  88. package/dist/field.js +2 -0
  89. package/dist/fieldset-ByP_r1Uq.js +216 -0
  90. package/dist/fieldset-C5aj6Ims.cjs +275 -0
  91. package/dist/fieldset.cjs +17 -0
  92. package/dist/fieldset.d.cts +159 -0
  93. package/dist/fieldset.d.ts +159 -0
  94. package/dist/fieldset.js +2 -0
  95. package/dist/file-upload.cjs +421 -0
  96. package/dist/file-upload.d.cts +327 -0
  97. package/dist/file-upload.d.ts +327 -0
  98. package/dist/file-upload.js +392 -0
  99. package/dist/floating-panel.cjs +412 -0
  100. package/dist/floating-panel.d.cts +337 -0
  101. package/dist/floating-panel.d.ts +337 -0
  102. package/dist/floating-panel.js +383 -0
  103. package/dist/focus-trap.cjs +79 -0
  104. package/dist/focus-trap.d.cts +46 -0
  105. package/dist/focus-trap.d.ts +46 -0
  106. package/dist/focus-trap.js +78 -0
  107. package/dist/format.cjs +116 -0
  108. package/dist/format.d.cts +46 -0
  109. package/dist/format.d.ts +46 -0
  110. package/dist/format.js +106 -0
  111. package/dist/frame.cjs +93 -0
  112. package/dist/frame.d.cts +37 -0
  113. package/dist/frame.d.ts +37 -0
  114. package/dist/frame.js +92 -0
  115. package/dist/highlight.cjs +44 -0
  116. package/dist/highlight.d.cts +32 -0
  117. package/dist/highlight.d.ts +32 -0
  118. package/dist/highlight.js +42 -0
  119. package/dist/hover-card.cjs +269 -0
  120. package/dist/hover-card.d.cts +202 -0
  121. package/dist/hover-card.d.ts +202 -0
  122. package/dist/hover-card.js +246 -0
  123. package/dist/image-cropper.cjs +252 -0
  124. package/dist/image-cropper.d.cts +207 -0
  125. package/dist/image-cropper.d.ts +207 -0
  126. package/dist/image-cropper.js +235 -0
  127. package/dist/index-B-o8jLyV.d.cts +31 -0
  128. package/dist/index-BSoF1D-v.d.ts +31 -0
  129. package/dist/index-BTNfeIXf.d.ts +104 -0
  130. package/dist/index-C8zR9eg3.d.ts +444 -0
  131. package/dist/index-Cc4qS0rQ.d.cts +38 -0
  132. package/dist/index-Cc4qS0rQ.d.ts +38 -0
  133. package/dist/index-DaLvr6SW.d.ts +37 -0
  134. package/dist/index-Di84rFjS.d.cts +444 -0
  135. package/dist/index-Dpm1wGVS.d.cts +74 -0
  136. package/dist/index-Zc9P69Ka.d.cts +104 -0
  137. package/dist/index-kCBQJqpU.d.ts +74 -0
  138. package/dist/index-vIbTjrJ-.d.cts +37 -0
  139. package/dist/index.cjs +43 -0
  140. package/dist/index.d.cts +5 -0
  141. package/dist/index.d.ts +5 -0
  142. package/dist/index.js +7 -0
  143. package/dist/json-tree-view.cjs +346 -0
  144. package/dist/json-tree-view.d.cts +86 -0
  145. package/dist/json-tree-view.d.ts +86 -0
  146. package/dist/json-tree-view.js +336 -0
  147. package/dist/listbox.cjs +386 -0
  148. package/dist/listbox.d.cts +323 -0
  149. package/dist/listbox.d.ts +323 -0
  150. package/dist/listbox.js +361 -0
  151. package/dist/marquee.cjs +256 -0
  152. package/dist/marquee.d.cts +208 -0
  153. package/dist/marquee.d.ts +208 -0
  154. package/dist/marquee.js +235 -0
  155. package/dist/menu.cjs +650 -0
  156. package/dist/menu.d.cts +501 -0
  157. package/dist/menu.d.ts +501 -0
  158. package/dist/menu.js +613 -0
  159. package/dist/navigation-menu.cjs +408 -0
  160. package/dist/navigation-menu.d.cts +271 -0
  161. package/dist/navigation-menu.d.ts +271 -0
  162. package/dist/navigation-menu.js +380 -0
  163. package/dist/number-input.cjs +298 -0
  164. package/dist/number-input.d.cts +253 -0
  165. package/dist/number-input.d.ts +253 -0
  166. package/dist/number-input.js +274 -0
  167. package/dist/pagination.cjs +249 -0
  168. package/dist/pagination.d.cts +209 -0
  169. package/dist/pagination.d.ts +209 -0
  170. package/dist/pagination.js +226 -0
  171. package/dist/password-input.cjs +232 -0
  172. package/dist/password-input.d.cts +208 -0
  173. package/dist/password-input.d.ts +208 -0
  174. package/dist/password-input.js +210 -0
  175. package/dist/pin-input.cjs +245 -0
  176. package/dist/pin-input.d.cts +199 -0
  177. package/dist/pin-input.d.ts +199 -0
  178. package/dist/pin-input.js +224 -0
  179. package/dist/popover.cjs +377 -0
  180. package/dist/popover.d.cts +324 -0
  181. package/dist/popover.d.ts +324 -0
  182. package/dist/popover.js +349 -0
  183. package/dist/presence-DD3l4Tgb.cjs +60 -0
  184. package/dist/presence-jaHZaD_O.js +43 -0
  185. package/dist/presence.cjs +7 -0
  186. package/dist/presence.d.cts +3 -0
  187. package/dist/presence.d.ts +3 -0
  188. package/dist/presence.js +3 -0
  189. package/dist/progress.cjs +270 -0
  190. package/dist/progress.d.cts +229 -0
  191. package/dist/progress.d.ts +229 -0
  192. package/dist/progress.js +245 -0
  193. package/dist/providers-5QhcwgSd.cjs +190 -0
  194. package/dist/providers-C3XQH-uu.js +119 -0
  195. package/dist/qr-code.cjs +195 -0
  196. package/dist/qr-code.d.cts +157 -0
  197. package/dist/qr-code.d.ts +157 -0
  198. package/dist/qr-code.js +174 -0
  199. package/dist/radio-group.cjs +274 -0
  200. package/dist/radio-group.d.cts +230 -0
  201. package/dist/radio-group.d.ts +230 -0
  202. package/dist/radio-group.js +249 -0
  203. package/dist/rating-group.cjs +243 -0
  204. package/dist/rating-group.d.cts +200 -0
  205. package/dist/rating-group.d.ts +200 -0
  206. package/dist/rating-group.js +220 -0
  207. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  208. package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
  209. package/dist/scroll-area.cjs +206 -0
  210. package/dist/scroll-area.d.cts +169 -0
  211. package/dist/scroll-area.d.ts +169 -0
  212. package/dist/scroll-area.js +184 -0
  213. package/dist/segment-group.cjs +318 -0
  214. package/dist/segment-group.d.cts +229 -0
  215. package/dist/segment-group.d.ts +229 -0
  216. package/dist/segment-group.js +298 -0
  217. package/dist/select.cjs +560 -0
  218. package/dist/select.d.cts +430 -0
  219. package/dist/select.d.ts +430 -0
  220. package/dist/select.js +523 -0
  221. package/dist/signature-pad.cjs +260 -0
  222. package/dist/signature-pad.d.cts +200 -0
  223. package/dist/signature-pad.d.ts +200 -0
  224. package/dist/signature-pad.js +237 -0
  225. package/dist/slider.cjs +350 -0
  226. package/dist/slider.d.cts +299 -0
  227. package/dist/slider.d.ts +299 -0
  228. package/dist/slider.js +323 -0
  229. package/dist/splitter.cjs +225 -0
  230. package/dist/splitter.d.cts +166 -0
  231. package/dist/splitter.d.ts +166 -0
  232. package/dist/splitter.js +198 -0
  233. package/dist/steps.cjs +348 -0
  234. package/dist/steps.d.cts +289 -0
  235. package/dist/steps.d.ts +289 -0
  236. package/dist/steps.js +319 -0
  237. package/dist/swap.cjs +154 -0
  238. package/dist/swap.d.cts +98 -0
  239. package/dist/swap.d.ts +98 -0
  240. package/dist/swap.js +141 -0
  241. package/dist/switch.cjs +213 -0
  242. package/dist/switch.d.cts +177 -0
  243. package/dist/switch.d.ts +177 -0
  244. package/dist/switch.js +192 -0
  245. package/dist/tabs.cjs +240 -0
  246. package/dist/tabs.d.cts +179 -0
  247. package/dist/tabs.d.ts +179 -0
  248. package/dist/tabs.js +218 -0
  249. package/dist/tags-input.cjs +405 -0
  250. package/dist/tags-input.d.cts +340 -0
  251. package/dist/tags-input.d.ts +340 -0
  252. package/dist/tags-input.js +376 -0
  253. package/dist/timer.cjs +221 -0
  254. package/dist/timer.d.cts +176 -0
  255. package/dist/timer.d.ts +176 -0
  256. package/dist/timer.js +199 -0
  257. package/dist/toast.cjs +211 -0
  258. package/dist/toast.d.cts +157 -0
  259. package/dist/toast.d.ts +157 -0
  260. package/dist/toast.js +189 -0
  261. package/dist/toggle-group.cjs +150 -0
  262. package/dist/toggle-group.d.cts +122 -0
  263. package/dist/toggle-group.d.ts +122 -0
  264. package/dist/toggle-group.js +132 -0
  265. package/dist/toggle.cjs +107 -0
  266. package/dist/toggle.d.cts +98 -0
  267. package/dist/toggle.d.ts +98 -0
  268. package/dist/toggle.js +94 -0
  269. package/dist/tooltip.cjs +265 -0
  270. package/dist/tooltip.d.cts +204 -0
  271. package/dist/tooltip.d.ts +204 -0
  272. package/dist/tooltip.js +242 -0
  273. package/dist/tour.cjs +418 -0
  274. package/dist/tour.d.cts +304 -0
  275. package/dist/tour.d.ts +304 -0
  276. package/dist/tour.js +374 -0
  277. package/dist/tree-view-DnTVwhew.cjs +651 -0
  278. package/dist/tree-view-goUH3_RC.js +508 -0
  279. package/dist/tree-view.cjs +41 -0
  280. package/dist/tree-view.d.cts +3 -0
  281. package/dist/tree-view.d.ts +3 -0
  282. package/dist/tree-view.js +3 -0
  283. package/dist/types-rSRkzyd6.d.cts +13 -0
  284. package/dist/types-rSRkzyd6.d.ts +13 -0
  285. package/dist/use-presence-BSp_dR-C.d.cts +22 -0
  286. package/dist/use-presence-CtEY6ZT8.cjs +49 -0
  287. package/dist/use-presence-DkGU_j9h.d.ts +22 -0
  288. package/dist/use-presence-oNdFU2c2.js +42 -0
  289. package/dist/utils-D95V66v9.js +548 -0
  290. package/dist/utils-XrBZd2Yk.cjs +625 -0
  291. package/package.json +277 -6
@@ -0,0 +1,324 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { a as mergeProps$1, c as normalizeProps$1, d as useForwardExpose, m as createContext, s as useMachine, t as useVModel } from "./utils-D95V66v9.js";
3
+ import { a as DEFAULT_LOCALE, d as useEnvironmentContext, o as useLocaleContext, u as DEFAULT_ENVIRONMENT } from "./providers-C3XQH-uu.js";
4
+ import { t as cleanProps } from "./clean-props--1kqQE0Y.js";
5
+ import { t as toBooleanValue } from "./boolean-BCaEpMxQ.js";
6
+ import { n as wire } from "./factory-8Ao0DEy3.js";
7
+ import { u as useFieldsetContext } from "./fieldset-ByP_r1Uq.js";
8
+ import { h as useFieldContext } from "./field-C3pLqz1S.js";
9
+ import { computed, createBlock, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toRefs, toValue, unref, useId, withCtx } from "vue";
10
+ import * as checkbox from "@wirekyt/dom/machines/checkbox";
11
+ import { anatomy } from "@wirekyt/dom/machines/checkbox";
12
+ //#region src/components/checkbox/use-context.ts
13
+ const [CheckboxProvider, useCheckboxContext] = createContext("CheckboxContext");
14
+ //#endregion
15
+ //#region src/components/checkbox/context.vue
16
+ const _sfc_main = /*@__PURE__*/ defineComponent({
17
+ __name: "context",
18
+ setup(__props) {
19
+ const checkbox = useCheckboxContext();
20
+ return (_ctx, _cache) => {
21
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(checkbox))));
22
+ };
23
+ }
24
+ });
25
+ //#endregion
26
+ //#region src/components/checkbox/control.vue
27
+ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
28
+ __name: "control",
29
+ props: { asChild: { type: Boolean } },
30
+ setup(__props) {
31
+ const checkbox = useCheckboxContext();
32
+ useForwardExpose();
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createBlock(unref(wire).div, mergeProps(unref(checkbox).getControlProps(), { "as-child": __props.asChild }), {
35
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
36
+ _: 3
37
+ }, 16, ["as-child"]);
38
+ };
39
+ }
40
+ });
41
+ //#endregion
42
+ //#region src/components/checkbox/anatomy.ts
43
+ const checkboxAnatomy = anatomy.extendWith("group");
44
+ //#endregion
45
+ //#region src/components/checkbox/use-group.ts
46
+ function useCheckboxGroup(props, emit) {
47
+ const fieldset = useFieldsetContext();
48
+ const disabled = computed(() => props.disabled ?? fieldset?.value?.disabled);
49
+ const invalid = computed(() => props.invalid ?? fieldset?.value?.invalid);
50
+ const interactive = computed(() => !(disabled.value || props.readOnly));
51
+ const { defaultValue } = toRefs(props);
52
+ const valueRef = useVModel(props, "modelValue", emit, {
53
+ defaultValue: defaultValue?.value ?? [],
54
+ passive: props.modelValue === void 0,
55
+ eventName: ["valueChange", "update:modelValue"]
56
+ });
57
+ const isChecked = (val) => {
58
+ return valueRef.value.some((v) => String(v) === String(val));
59
+ };
60
+ const toggleValue = (val) => {
61
+ if (isChecked(val)) removeValue(val);
62
+ else addValue(val);
63
+ };
64
+ const isAtMax = computed(() => props.maxSelectedValues != null && valueRef.value.length >= props.maxSelectedValues);
65
+ const addValue = (val) => {
66
+ if (!interactive.value) return;
67
+ if (isChecked(val)) return;
68
+ if (isAtMax.value) return;
69
+ valueRef.value = valueRef.value.concat(val);
70
+ };
71
+ const removeValue = (val) => {
72
+ if (!interactive.value) return;
73
+ valueRef.value = valueRef.value.filter((v) => String(v) !== String(val));
74
+ };
75
+ const getItemProps = (itemProps) => {
76
+ const checked = itemProps.value != null ? isChecked(itemProps.value) : void 0;
77
+ return {
78
+ checked,
79
+ onCheckedChange() {
80
+ if (itemProps.value != null) toggleValue(itemProps.value);
81
+ },
82
+ name: props.name,
83
+ disabled: toBooleanValue(disabled.value) || isAtMax.value && !checked,
84
+ readOnly: props.readOnly,
85
+ invalid: invalid.value
86
+ };
87
+ };
88
+ const setValue = (value) => {
89
+ valueRef.value = value;
90
+ };
91
+ return computed(() => ({
92
+ isChecked,
93
+ value: valueRef.value,
94
+ name: props.name,
95
+ disabled: toBooleanValue(disabled.value),
96
+ readOnly: props.readOnly,
97
+ invalid: invalid.value,
98
+ addValue,
99
+ setValue,
100
+ toggleValue,
101
+ getItemProps
102
+ }));
103
+ }
104
+ //#endregion
105
+ //#region src/components/checkbox/use-group-context.ts
106
+ const [CheckboxGroupContextProvider, useCheckboxGroupContext] = createContext("CheckboxGroupContext");
107
+ //#endregion
108
+ //#region src/components/checkbox/group.vue
109
+ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
110
+ __name: "group",
111
+ props: /*@__PURE__*/ mergeDefaults({
112
+ defaultValue: {},
113
+ modelValue: {},
114
+ disabled: { type: Boolean },
115
+ readOnly: { type: Boolean },
116
+ name: {},
117
+ invalid: { type: Boolean },
118
+ maxSelectedValues: {},
119
+ asChild: { type: Boolean }
120
+ }, {
121
+ disabled: void 0,
122
+ readOnly: void 0,
123
+ invalid: void 0
124
+ }),
125
+ emits: ["valueChange", "update:modelValue"],
126
+ setup(__props, { emit: __emit }) {
127
+ CheckboxGroupContextProvider(useCheckboxGroup(__props, __emit));
128
+ useForwardExpose();
129
+ return (_ctx, _cache) => {
130
+ return openBlock(), createBlock(unref(wire).div, mergeProps({ role: "group" }, { ...unref(checkboxAnatomy).build().group.attrs }, { "as-child": __props.asChild }), {
131
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
132
+ _: 3
133
+ }, 16, ["as-child"]);
134
+ };
135
+ }
136
+ });
137
+ //#endregion
138
+ //#region src/components/checkbox/group-provider.vue
139
+ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
140
+ __name: "group-provider",
141
+ props: {
142
+ value: {},
143
+ asChild: { type: Boolean }
144
+ },
145
+ setup(__props) {
146
+ const props = __props;
147
+ CheckboxGroupContextProvider(computed(() => props.value));
148
+ useForwardExpose();
149
+ return (_ctx, _cache) => {
150
+ return openBlock(), createBlock(unref(wire).div, mergeProps({ role: "group" }, unref(checkboxAnatomy).build().group.attrs, { "as-child": __props.asChild }), {
151
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
152
+ _: 3
153
+ }, 16, ["as-child"]);
154
+ };
155
+ }
156
+ });
157
+ //#endregion
158
+ //#region src/components/checkbox/hidden-input.vue
159
+ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
160
+ __name: "hidden-input",
161
+ props: { asChild: { type: Boolean } },
162
+ setup(__props) {
163
+ const checkbox = useCheckboxContext();
164
+ const field = useFieldContext();
165
+ useForwardExpose();
166
+ return (_ctx, _cache) => {
167
+ return openBlock(), createBlock(unref(wire).input, mergeProps({ "aria-describedby": unref(field)?.ariaDescribedby }, unref(checkbox).getHiddenInputProps(), { "as-child": __props.asChild }), {
168
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
169
+ _: 3
170
+ }, 16, ["aria-describedby", "as-child"]);
171
+ };
172
+ }
173
+ });
174
+ //#endregion
175
+ //#region src/components/checkbox/indicator.vue
176
+ const _sfc_main$5 = /*@__PURE__*/ defineComponent({
177
+ __name: "indicator",
178
+ props: {
179
+ indeterminate: { type: Boolean },
180
+ asChild: { type: Boolean }
181
+ },
182
+ setup(__props) {
183
+ const props = __props;
184
+ const checkbox = useCheckboxContext();
185
+ const isHidden = computed(() => props.indeterminate ? checkbox.value.indeterminate : checkbox.value.checked);
186
+ useForwardExpose();
187
+ return (_ctx, _cache) => {
188
+ return openBlock(), createBlock(unref(wire).div, mergeProps(unref(checkbox).getIndicatorProps(), {
189
+ hidden: !isHidden.value,
190
+ "as-child": __props.asChild
191
+ }), {
192
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
193
+ _: 3
194
+ }, 16, ["hidden", "as-child"]);
195
+ };
196
+ }
197
+ });
198
+ //#endregion
199
+ //#region src/components/checkbox/label.vue
200
+ const _sfc_main$6 = /*@__PURE__*/ defineComponent({
201
+ __name: "label",
202
+ props: { asChild: { type: Boolean } },
203
+ setup(__props) {
204
+ const checkbox = useCheckboxContext();
205
+ useForwardExpose();
206
+ return (_ctx, _cache) => {
207
+ return openBlock(), createBlock(unref(wire).span, mergeProps(unref(checkbox).getLabelProps(), { "as-child": __props.asChild }), {
208
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
209
+ _: 3
210
+ }, 16, ["as-child"]);
211
+ };
212
+ }
213
+ });
214
+ //#endregion
215
+ //#region src/components/checkbox/root-provider.vue
216
+ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
217
+ __name: "root-provider",
218
+ props: {
219
+ value: {},
220
+ asChild: { type: Boolean }
221
+ },
222
+ setup(__props) {
223
+ const props = __props;
224
+ const checkbox = computed(() => props.value);
225
+ CheckboxProvider(checkbox);
226
+ useForwardExpose();
227
+ return (_ctx, _cache) => {
228
+ return openBlock(), createBlock(unref(wire).label, mergeProps(checkbox.value.getRootProps(), { "as-child": __props.asChild }), {
229
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
230
+ _: 3
231
+ }, 16, ["as-child"]);
232
+ };
233
+ }
234
+ });
235
+ //#endregion
236
+ //#region src/components/checkbox/use.ts
237
+ const useCheckbox = (props = {}, emit) => {
238
+ const id = useId();
239
+ const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
240
+ const locale = useLocaleContext(DEFAULT_LOCALE);
241
+ const field = useFieldContext();
242
+ const checkboxGroup = useCheckboxGroupContext();
243
+ const computedProps = computed(() => {
244
+ const propsValue = toValue(props);
245
+ return mergeProps$1(checkboxGroup?.value.getItemProps({ value: propsValue.value }) ?? {}, propsValue);
246
+ });
247
+ const context = computed(() => {
248
+ const localProps = toValue(computedProps);
249
+ return {
250
+ id,
251
+ ids: {
252
+ label: field?.value.ids.label,
253
+ hiddenInput: field?.value.ids.control
254
+ },
255
+ disabled: field?.value.disabled,
256
+ readOnly: field?.value.readOnly,
257
+ invalid: field?.value.invalid,
258
+ required: field?.value.required,
259
+ dir: locale.value.dir,
260
+ getRootNode: env?.value.getRootNode,
261
+ ...cleanProps(localProps),
262
+ onCheckedChange(details) {
263
+ emit?.("checkedChange", details);
264
+ emit?.("update:checked", details.checked);
265
+ localProps.onCheckedChange?.(details);
266
+ }
267
+ };
268
+ });
269
+ const service = useMachine(checkbox.machine, context);
270
+ return computed(() => checkbox.connect(service, normalizeProps$1));
271
+ };
272
+ //#endregion
273
+ //#region src/components/checkbox/root.vue
274
+ const _sfc_main$7 = /*@__PURE__*/ defineComponent({
275
+ __name: "root",
276
+ props: /*@__PURE__*/ mergeDefaults({
277
+ checked: {},
278
+ defaultChecked: {},
279
+ disabled: { type: Boolean },
280
+ form: {},
281
+ id: {},
282
+ ids: {},
283
+ invalid: { type: Boolean },
284
+ name: {},
285
+ readOnly: { type: Boolean },
286
+ required: { type: Boolean },
287
+ value: {},
288
+ asChild: { type: Boolean }
289
+ }, {
290
+ checked: void 0,
291
+ defaultChecked: void 0,
292
+ disabled: void 0,
293
+ invalid: void 0,
294
+ readOnly: void 0,
295
+ required: void 0
296
+ }),
297
+ emits: ["checkedChange", "update:checked"],
298
+ setup(__props, { emit: __emit }) {
299
+ const checkbox = useCheckbox(__props, __emit);
300
+ CheckboxProvider(checkbox);
301
+ useForwardExpose();
302
+ return (_ctx, _cache) => {
303
+ return openBlock(), createBlock(unref(wire).label, mergeProps(unref(checkbox).getRootProps(), { "as-child": __props.asChild }), {
304
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
305
+ _: 3
306
+ }, 16, ["as-child"]);
307
+ };
308
+ }
309
+ });
310
+ //#endregion
311
+ //#region src/components/checkbox/checkbox.ts
312
+ var checkbox_exports = /* @__PURE__ */ __exportAll({
313
+ Context: () => _sfc_main,
314
+ Control: () => _sfc_main$1,
315
+ Group: () => _sfc_main$2,
316
+ GroupProvider: () => _sfc_main$3,
317
+ HiddenInput: () => _sfc_main$4,
318
+ Indicator: () => _sfc_main$5,
319
+ Label: () => _sfc_main$6,
320
+ Root: () => _sfc_main$7,
321
+ RootProvider: () => _sfc_main$8
322
+ });
323
+ //#endregion
324
+ export { checkbox_exports as Checkbox, _sfc_main as CheckboxContext, _sfc_main$1 as CheckboxControl, _sfc_main$2 as CheckboxGroup, _sfc_main$3 as CheckboxGroupProvider, _sfc_main$4 as CheckboxHiddenInput, _sfc_main$5 as CheckboxIndicator, _sfc_main$6 as CheckboxLabel, _sfc_main$7 as CheckboxRoot, _sfc_main$8 as CheckboxRootProvider, checkboxAnatomy, useCheckbox, useCheckboxContext, useCheckboxGroup, useCheckboxGroupContext };
@@ -0,0 +1,8 @@
1
+ //#region src/utils/clean-props.ts
2
+ const cleanProps = (obj) => {
3
+ const result = {};
4
+ for (const [key, value] of Object.entries(obj)) if (value !== void 0) result[key] = value;
5
+ return result;
6
+ };
7
+ //#endregion
8
+ export { cleanProps as t };
@@ -0,0 +1,13 @@
1
+ //#region src/utils/clean-props.ts
2
+ const cleanProps = (obj) => {
3
+ const result = {};
4
+ for (const [key, value] of Object.entries(obj)) if (value !== void 0) result[key] = value;
5
+ return result;
6
+ };
7
+ //#endregion
8
+ Object.defineProperty(exports, "cleanProps", {
9
+ enumerable: true,
10
+ get: function() {
11
+ return cleanProps;
12
+ }
13
+ });
@@ -0,0 +1,17 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let vue = require("vue");
3
+ //#region src/components/client-only/client-only.vue
4
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
5
+ __name: "client-only",
6
+ setup(__props) {
7
+ const isClient = (0, vue.ref)(false);
8
+ (0, vue.onMounted)(() => {
9
+ isClient.value = true;
10
+ });
11
+ return (_ctx, _cache) => {
12
+ return isClient.value ? (0, vue.renderSlot)(_ctx.$slots, "default", {}, void 0, void 0, 0) : (0, vue.renderSlot)(_ctx.$slots, "fallback", {}, void 0, void 0, 1);
13
+ };
14
+ }
15
+ });
16
+ //#endregion
17
+ exports.ClientOnly = _sfc_main;
@@ -0,0 +1,18 @@
1
+ //#region src/components/client-only/client-only.vue.d.ts
2
+ type ClientOnlyProps = {};
3
+ declare var __VLS_1: {}, __VLS_3: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_1) => any;
6
+ } & {
7
+ fallback?: (props: typeof __VLS_3) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
17
+ //#endregion
18
+ export { _default as ClientOnly, type ClientOnlyProps };
@@ -0,0 +1,18 @@
1
+ //#region src/components/client-only/client-only.vue.d.ts
2
+ type ClientOnlyProps = {};
3
+ declare var __VLS_1: {}, __VLS_3: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_1) => any;
6
+ } & {
7
+ fallback?: (props: typeof __VLS_3) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
17
+ //#endregion
18
+ export { _default as ClientOnly, type ClientOnlyProps };
@@ -0,0 +1,16 @@
1
+ import { defineComponent, onMounted, ref, renderSlot } from "vue";
2
+ //#region src/components/client-only/client-only.vue
3
+ const _sfc_main = /*@__PURE__*/ defineComponent({
4
+ __name: "client-only",
5
+ setup(__props) {
6
+ const isClient = ref(false);
7
+ onMounted(() => {
8
+ isClient.value = true;
9
+ });
10
+ return (_ctx, _cache) => {
11
+ return isClient.value ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "fallback", {}, void 0, void 0, 1);
12
+ };
13
+ }
14
+ });
15
+ //#endregion
16
+ export { _sfc_main as ClientOnly };
@@ -0,0 +1,229 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
3
+ const require_utils = require("./utils-XrBZd2Yk.cjs");
4
+ const require_providers = require("./providers-5QhcwgSd.cjs");
5
+ const require_clean_props = require("./clean-props-MyKqus13.cjs");
6
+ const require_factory = require("./factory-JL7MPjkk.cjs");
7
+ let vue = require("vue");
8
+ let _wirekyt_dom_machines_clipboard = require("@wirekyt/dom/machines/clipboard");
9
+ _wirekyt_dom_machines_clipboard = require_rolldown_runtime.__toESM(_wirekyt_dom_machines_clipboard, 1);
10
+ //#region src/components/clipboard/use-context.ts
11
+ const [ClipboardProvider, useClipboardContext] = require_utils.createContext("ClipboardContext");
12
+ //#endregion
13
+ //#region src/components/clipboard/context.vue
14
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
15
+ __name: "context",
16
+ setup(__props) {
17
+ const clipboard = useClipboardContext();
18
+ return (_ctx, _cache) => {
19
+ return (0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(clipboard))));
20
+ };
21
+ }
22
+ });
23
+ //#endregion
24
+ //#region src/components/clipboard/control.vue
25
+ const _sfc_main$1 = /*@__PURE__*/ (0, vue.defineComponent)({
26
+ __name: "control",
27
+ props: { asChild: { type: Boolean } },
28
+ setup(__props) {
29
+ const clipboard = useClipboardContext();
30
+ require_utils.useForwardExpose();
31
+ return (_ctx, _cache) => {
32
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(clipboard).getControlProps(), { "as-child": __props.asChild }), {
33
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
34
+ _: 3
35
+ }, 16, ["as-child"]);
36
+ };
37
+ }
38
+ });
39
+ //#endregion
40
+ //#region src/components/clipboard/indicator.vue
41
+ const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
42
+ __name: "indicator",
43
+ props: { asChild: { type: Boolean } },
44
+ setup(__props) {
45
+ const clipboard = useClipboardContext();
46
+ require_utils.useForwardExpose();
47
+ return (_ctx, _cache) => {
48
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(clipboard).getIndicatorProps({ copied: (0, vue.unref)(clipboard).copied }), { "as-child": __props.asChild }), {
49
+ default: (0, vue.withCtx)(() => [(0, vue.unref)(clipboard).copied ? (0, vue.renderSlot)(_ctx.$slots, "copied", {}, void 0, void 0, 0) : (0, vue.renderSlot)(_ctx.$slots, "default", {}, void 0, void 0, 1)]),
50
+ _: 3
51
+ }, 16, ["as-child"]);
52
+ };
53
+ }
54
+ });
55
+ //#endregion
56
+ //#region src/components/clipboard/input.vue
57
+ const _sfc_main$3 = /*@__PURE__*/ (0, vue.defineComponent)({
58
+ __name: "input",
59
+ props: { asChild: { type: Boolean } },
60
+ setup(__props) {
61
+ const clipboard = useClipboardContext();
62
+ require_utils.useForwardExpose();
63
+ return (_ctx, _cache) => {
64
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).input, (0, vue.mergeProps)((0, vue.unref)(clipboard).getInputProps(), { "as-child": __props.asChild }), {
65
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
66
+ _: 3
67
+ }, 16, ["as-child"]);
68
+ };
69
+ }
70
+ });
71
+ //#endregion
72
+ //#region src/components/clipboard/label.vue
73
+ const _sfc_main$4 = /*@__PURE__*/ (0, vue.defineComponent)({
74
+ __name: "label",
75
+ props: { asChild: { type: Boolean } },
76
+ setup(__props) {
77
+ const clipboard = useClipboardContext();
78
+ require_utils.useForwardExpose();
79
+ return (_ctx, _cache) => {
80
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).label, (0, vue.mergeProps)((0, vue.unref)(clipboard).getLabelProps(), { "as-child": __props.asChild }), {
81
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
82
+ _: 3
83
+ }, 16, ["as-child"]);
84
+ };
85
+ }
86
+ });
87
+ //#endregion
88
+ //#region src/components/clipboard/root-provider.vue
89
+ const _sfc_main$6 = /*@__PURE__*/ (0, vue.defineComponent)({
90
+ __name: "root-provider",
91
+ props: {
92
+ value: {},
93
+ asChild: { type: Boolean }
94
+ },
95
+ setup(__props) {
96
+ const props = __props;
97
+ const clipboard = (0, vue.computed)(() => props.value);
98
+ ClipboardProvider(clipboard);
99
+ require_utils.useForwardExpose();
100
+ return (_ctx, _cache) => {
101
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)(clipboard.value.getRootProps(), { "as-child": __props.asChild }), {
102
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
103
+ _: 3
104
+ }, 16, ["as-child"]);
105
+ };
106
+ }
107
+ });
108
+ //#endregion
109
+ //#region src/components/clipboard/use.ts
110
+ const useClipboard = (props = {}, emit) => {
111
+ const id = (0, vue.useId)();
112
+ const env = require_providers.useEnvironmentContext(require_providers.DEFAULT_ENVIRONMENT);
113
+ const context = (0, vue.computed)(() => {
114
+ const localeProps = (0, vue.toValue)(props);
115
+ return {
116
+ id,
117
+ getRootNode: env?.value.getRootNode,
118
+ value: localeProps.modelValue,
119
+ onStatusChange: (details) => emit?.("statusChange", details),
120
+ ...require_clean_props.cleanProps(localeProps),
121
+ onValueChange(details) {
122
+ emit?.("valueChange", details);
123
+ emit?.("update:modelValue", details.value);
124
+ localeProps.onValueChange?.(details);
125
+ }
126
+ };
127
+ });
128
+ const service = require_utils.useMachine(_wirekyt_dom_machines_clipboard.machine, context);
129
+ return (0, vue.computed)(() => _wirekyt_dom_machines_clipboard.connect(service, require_utils.normalizeProps));
130
+ };
131
+ //#endregion
132
+ //#region src/components/clipboard/root.vue
133
+ const _sfc_main$5 = /*@__PURE__*/ (0, vue.defineComponent)({
134
+ __name: "root",
135
+ props: {
136
+ translations: {},
137
+ defaultValue: {},
138
+ id: {},
139
+ ids: {},
140
+ modelValue: {},
141
+ timeout: {},
142
+ asChild: { type: Boolean }
143
+ },
144
+ emits: [
145
+ "statusChange",
146
+ "valueChange",
147
+ "update:modelValue"
148
+ ],
149
+ setup(__props, { emit: __emit }) {
150
+ const clipboard = useClipboard(__props, __emit);
151
+ ClipboardProvider(clipboard);
152
+ require_utils.useForwardExpose();
153
+ return (_ctx, _cache) => {
154
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(clipboard).getRootProps(), { "as-child": __props.asChild }), {
155
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
156
+ _: 3
157
+ }, 16, ["as-child"]);
158
+ };
159
+ }
160
+ });
161
+ //#endregion
162
+ //#region src/components/clipboard/trigger.vue
163
+ const _sfc_main$7 = /*@__PURE__*/ (0, vue.defineComponent)({
164
+ __name: "trigger",
165
+ props: { asChild: { type: Boolean } },
166
+ setup(__props) {
167
+ const clipboard = useClipboardContext();
168
+ require_utils.useForwardExpose();
169
+ return (_ctx, _cache) => {
170
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(clipboard).getTriggerProps(), { "as-child": __props.asChild }), {
171
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
172
+ _: 3
173
+ }, 16, ["as-child"]);
174
+ };
175
+ }
176
+ });
177
+ //#endregion
178
+ //#region src/components/clipboard/value-text.vue
179
+ const _sfc_main$8 = /*@__PURE__*/ (0, vue.defineComponent)({
180
+ __name: "value-text",
181
+ props: { asChild: { type: Boolean } },
182
+ setup(__props) {
183
+ const clipboard = useClipboardContext();
184
+ require_utils.useForwardExpose();
185
+ return (_ctx, _cache) => {
186
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).span, { "as-child": __props.asChild }, {
187
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(clipboard).value), 1)])]),
188
+ _: 3
189
+ }, 8, ["as-child"]);
190
+ };
191
+ }
192
+ });
193
+ //#endregion
194
+ //#region src/components/clipboard/clipboard.ts
195
+ var clipboard_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
196
+ Context: () => _sfc_main,
197
+ Control: () => _sfc_main$1,
198
+ Indicator: () => _sfc_main$2,
199
+ Input: () => _sfc_main$3,
200
+ Label: () => _sfc_main$4,
201
+ Root: () => _sfc_main$5,
202
+ RootProvider: () => _sfc_main$6,
203
+ Trigger: () => _sfc_main$7,
204
+ ValueText: () => _sfc_main$8
205
+ });
206
+ //#endregion
207
+ Object.defineProperty(exports, "Clipboard", {
208
+ enumerable: true,
209
+ get: function() {
210
+ return clipboard_exports;
211
+ }
212
+ });
213
+ exports.ClipboardContext = _sfc_main;
214
+ exports.ClipboardControl = _sfc_main$1;
215
+ exports.ClipboardIndicator = _sfc_main$2;
216
+ exports.ClipboardInput = _sfc_main$3;
217
+ exports.ClipboardLabel = _sfc_main$4;
218
+ exports.ClipboardRoot = _sfc_main$5;
219
+ exports.ClipboardRootProvider = _sfc_main$6;
220
+ exports.ClipboardTrigger = _sfc_main$7;
221
+ exports.ClipboardValueText = _sfc_main$8;
222
+ Object.defineProperty(exports, "clipboardAnatomy", {
223
+ enumerable: true,
224
+ get: function() {
225
+ return _wirekyt_dom_machines_clipboard.anatomy;
226
+ }
227
+ });
228
+ exports.useClipboard = useClipboard;
229
+ exports.useClipboardContext = useClipboardContext;