@stevederico/skateboard-ui 3.0.2 → 3.6.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 (175) hide show
  1. package/App.jsx +13 -13
  2. package/CHANGELOG.md +64 -0
  3. package/README.md +59 -65
  4. package/components/AuthOverlay.jsx +4 -4
  5. package/components/ProtectedRoute.jsx +1 -1
  6. package/components/ThemeToggle.jsx +1 -1
  7. package/components/UpgradeSheet.jsx +2 -2
  8. package/{core → components/core}/DynamicIcon.jsx +1 -1
  9. package/{layout → components/layout}/Header.jsx +4 -4
  10. package/{layout → components/layout}/Layout.jsx +1 -1
  11. package/{layout → components/layout}/Sidebar.jsx +2 -2
  12. package/{layout → components/layout}/TabBar.jsx +1 -1
  13. package/{views → components/views}/LandingView.jsx +5 -5
  14. package/{views → components/views}/NotFound.jsx +2 -2
  15. package/{views → components/views}/PaymentView.jsx +1 -1
  16. package/{views → components/views}/SettingsView.jsx +6 -6
  17. package/{views → components/views}/SignInView.jsx +6 -6
  18. package/{views → components/views}/SignOutView.jsx +1 -1
  19. package/{views → components/views}/SignUpView.jsx +6 -6
  20. package/{views → components/views}/TextView.jsx +3 -3
  21. package/hooks/useAuthGate.js +1 -1
  22. package/index.js +1 -1
  23. package/package.json +32 -50
  24. package/shadcn/lib/base-ui/LICENSE +21 -0
  25. package/shadcn/lib/base-ui/_chunk-01rqe37g.js +70 -0
  26. package/shadcn/lib/base-ui/_chunk-0h5sskyw.js +347 -0
  27. package/shadcn/lib/base-ui/_chunk-0xhx4g7r.js +57 -0
  28. package/shadcn/lib/base-ui/_chunk-1e6khrvm.js +218 -0
  29. package/shadcn/lib/base-ui/_chunk-1s41sngz.js +302 -0
  30. package/shadcn/lib/base-ui/_chunk-20rtfsz9.js +23 -0
  31. package/shadcn/lib/base-ui/_chunk-2tyt8f8r.js +6034 -0
  32. package/shadcn/lib/base-ui/_chunk-3f31ka8n.js +11 -0
  33. package/shadcn/lib/base-ui/_chunk-3h6zpchb.js +89 -0
  34. package/shadcn/lib/base-ui/_chunk-4s0k3h7t.js +114 -0
  35. package/shadcn/lib/base-ui/_chunk-502wngfc.js +598 -0
  36. package/shadcn/lib/base-ui/_chunk-536jvgeq.js +68 -0
  37. package/shadcn/lib/base-ui/_chunk-611pz5sm.js +10 -0
  38. package/shadcn/lib/base-ui/_chunk-65zw5gs2.js +15 -0
  39. package/shadcn/lib/base-ui/_chunk-6b17g8t7.js +34 -0
  40. package/shadcn/lib/base-ui/_chunk-6xevjepc.js +15 -0
  41. package/shadcn/lib/base-ui/_chunk-71zm6zgv.js +16 -0
  42. package/shadcn/lib/base-ui/_chunk-7fmjymvh.js +32 -0
  43. package/shadcn/lib/base-ui/_chunk-7jjzay8b.js +176 -0
  44. package/shadcn/lib/base-ui/_chunk-7v1t86x1.js +43 -0
  45. package/shadcn/lib/base-ui/_chunk-85vrgzwr.js +227 -0
  46. package/shadcn/lib/base-ui/_chunk-8jz3hb7q.js +9 -0
  47. package/shadcn/lib/base-ui/_chunk-8kh3xk78.js +35 -0
  48. package/shadcn/lib/base-ui/_chunk-97tas84n.js +67 -0
  49. package/shadcn/lib/base-ui/_chunk-9nyxkvte.js +13 -0
  50. package/shadcn/lib/base-ui/_chunk-a8fwg9d0.js +52 -0
  51. package/shadcn/lib/base-ui/_chunk-agc6ew3g.js +29 -0
  52. package/shadcn/lib/base-ui/_chunk-aqwsk46c.js +64 -0
  53. package/shadcn/lib/base-ui/_chunk-atd5kq5q.js +803 -0
  54. package/shadcn/lib/base-ui/_chunk-atnkefgd.js +104 -0
  55. package/shadcn/lib/base-ui/_chunk-b40erthe.js +7 -0
  56. package/shadcn/lib/base-ui/_chunk-b5jsqt97.js +50 -0
  57. package/shadcn/lib/base-ui/_chunk-bk7n9s9e.js +15 -0
  58. package/shadcn/lib/base-ui/_chunk-c3572b5x.js +19 -0
  59. package/shadcn/lib/base-ui/_chunk-cwr896nf.js +25 -0
  60. package/shadcn/lib/base-ui/_chunk-drfb9kp2.js +27 -0
  61. package/shadcn/lib/base-ui/_chunk-ds8fnpjj.js +0 -0
  62. package/shadcn/lib/base-ui/_chunk-ek863ta9.js +82 -0
  63. package/shadcn/lib/base-ui/_chunk-f09cp81f.js +12 -0
  64. package/shadcn/lib/base-ui/_chunk-f5d01bp9.js +0 -0
  65. package/shadcn/lib/base-ui/_chunk-f9tgee1q.js +21 -0
  66. package/shadcn/lib/base-ui/_chunk-fch5cba8.js +84 -0
  67. package/shadcn/lib/base-ui/_chunk-gfce3j3z.js +18 -0
  68. package/shadcn/lib/base-ui/_chunk-ha06w2pp.js +2391 -0
  69. package/shadcn/lib/base-ui/_chunk-hzgetm70.js +23 -0
  70. package/shadcn/lib/base-ui/_chunk-j0eqdjta.js +39 -0
  71. package/shadcn/lib/base-ui/_chunk-k1e5fvcj.js +48 -0
  72. package/shadcn/lib/base-ui/_chunk-k4mc2kan.js +81 -0
  73. package/shadcn/lib/base-ui/_chunk-kfz96xv1.js +128 -0
  74. package/shadcn/lib/base-ui/_chunk-m45547cc.js +15 -0
  75. package/shadcn/lib/base-ui/_chunk-mbn76q14.js +184 -0
  76. package/shadcn/lib/base-ui/_chunk-mvv30fkv.js +9 -0
  77. package/shadcn/lib/base-ui/_chunk-mznt6ktj.js +33 -0
  78. package/shadcn/lib/base-ui/_chunk-n7dnqnbw.js +7 -0
  79. package/shadcn/lib/base-ui/_chunk-nya71ccw.js +546 -0
  80. package/shadcn/lib/base-ui/_chunk-p6qynd6r.js +146 -0
  81. package/shadcn/lib/base-ui/_chunk-q3nee19r.js +323 -0
  82. package/shadcn/lib/base-ui/_chunk-q7yw9mz4.js +385 -0
  83. package/shadcn/lib/base-ui/_chunk-qce0xt57.js +107 -0
  84. package/shadcn/lib/base-ui/_chunk-qgzhcjsj.js +14 -0
  85. package/shadcn/lib/base-ui/_chunk-qt6r015s.js +38 -0
  86. package/shadcn/lib/base-ui/_chunk-r0vsdknk.js +4 -0
  87. package/shadcn/lib/base-ui/_chunk-sx6vkz01.js +150 -0
  88. package/shadcn/lib/base-ui/_chunk-szcr6mhk.js +6 -0
  89. package/shadcn/lib/base-ui/_chunk-t7j3rbpv.js +67 -0
  90. package/shadcn/lib/base-ui/_chunk-tmfmrzwe.js +39 -0
  91. package/shadcn/lib/base-ui/_chunk-v92ycsfj.js +9 -0
  92. package/shadcn/lib/base-ui/_chunk-vdc01ss3.js +6 -0
  93. package/shadcn/lib/base-ui/_chunk-vjbnhhg1.js +26 -0
  94. package/shadcn/lib/base-ui/_chunk-w68yxg9d.js +21 -0
  95. package/shadcn/lib/base-ui/_chunk-wana68v3.js +477 -0
  96. package/shadcn/lib/base-ui/_chunk-wtw745qd.js +12 -0
  97. package/shadcn/lib/base-ui/_chunk-xb7ph1ka.js +6 -0
  98. package/shadcn/lib/base-ui/_chunk-xfagb0fq.js +28 -0
  99. package/shadcn/lib/base-ui/_chunk-xxhqanfd.js +16 -0
  100. package/shadcn/lib/base-ui/_chunk-y887e46p.js +15 -0
  101. package/shadcn/lib/base-ui/_chunk-ymj1dpqg.js +14 -0
  102. package/shadcn/lib/base-ui/accordion.js +650 -0
  103. package/shadcn/lib/base-ui/alert-dialog.js +138 -0
  104. package/shadcn/lib/base-ui/avatar.js +235 -0
  105. package/shadcn/lib/base-ui/button.js +52 -0
  106. package/shadcn/lib/base-ui/checkbox.js +454 -0
  107. package/shadcn/lib/base-ui/collapsible.js +283 -0
  108. package/shadcn/lib/base-ui/context-menu.js +324 -0
  109. package/shadcn/lib/base-ui/dialog.js +71 -0
  110. package/shadcn/lib/base-ui/input.js +1028 -0
  111. package/shadcn/lib/base-ui/menu.js +61 -0
  112. package/shadcn/lib/base-ui/menubar.js +157 -0
  113. package/shadcn/lib/base-ui/merge-props.js +15 -0
  114. package/shadcn/lib/base-ui/navigation-menu.js +1854 -0
  115. package/shadcn/lib/base-ui/popover.js +1090 -0
  116. package/shadcn/lib/base-ui/preview-card.js +709 -0
  117. package/shadcn/lib/base-ui/progress.js +278 -0
  118. package/shadcn/lib/base-ui/radio-group.js +247 -0
  119. package/shadcn/lib/base-ui/radio.js +382 -0
  120. package/shadcn/lib/base-ui/scroll-area.js +1061 -0
  121. package/shadcn/lib/base-ui/select.js +2438 -0
  122. package/shadcn/lib/base-ui/separator.js +11 -0
  123. package/shadcn/lib/base-ui/slider.js +1595 -0
  124. package/shadcn/lib/base-ui/switch.js +333 -0
  125. package/shadcn/lib/base-ui/tabs.js +892 -0
  126. package/shadcn/lib/base-ui/toggle-group.js +152 -0
  127. package/shadcn/lib/base-ui/toggle.js +133 -0
  128. package/shadcn/lib/base-ui/tooltip.js +791 -0
  129. package/shadcn/lib/base-ui/use-render.js +15 -0
  130. package/shadcn/lib/tailwind-merge.js +3312 -0
  131. package/shadcn/lib/utils.js +1 -1
  132. package/shadcn/ui/accordion.jsx +1 -1
  133. package/shadcn/ui/alert-dialog.jsx +1 -1
  134. package/shadcn/ui/avatar.jsx +1 -1
  135. package/shadcn/ui/badge.jsx +2 -2
  136. package/shadcn/ui/breadcrumb.jsx +2 -2
  137. package/shadcn/ui/button-group.jsx +2 -2
  138. package/shadcn/ui/button.jsx +1 -1
  139. package/shadcn/ui/calendar.jsx +1 -1
  140. package/shadcn/ui/checkbox.jsx +1 -1
  141. package/shadcn/ui/collapsible.jsx +1 -1
  142. package/shadcn/ui/command.jsx +1 -1
  143. package/shadcn/ui/context-menu.jsx +1 -1
  144. package/shadcn/ui/dialog.jsx +1 -1
  145. package/shadcn/ui/drawer.jsx +176 -74
  146. package/shadcn/ui/dropdown-menu.jsx +1 -1
  147. package/shadcn/ui/hover-card.jsx +1 -1
  148. package/shadcn/ui/input.jsx +1 -1
  149. package/shadcn/ui/item.jsx +2 -2
  150. package/shadcn/ui/menubar.jsx +2 -2
  151. package/shadcn/ui/navigation-menu.jsx +1 -1
  152. package/shadcn/ui/popover.jsx +1 -1
  153. package/shadcn/ui/progress.jsx +1 -1
  154. package/shadcn/ui/radio-group.jsx +2 -2
  155. package/shadcn/ui/scroll-area.jsx +1 -1
  156. package/shadcn/ui/select.jsx +1 -1
  157. package/shadcn/ui/separator.jsx +1 -1
  158. package/shadcn/ui/sheet.jsx +1 -1
  159. package/shadcn/ui/sidebar.jsx +3 -3
  160. package/shadcn/ui/slider.jsx +1 -1
  161. package/shadcn/ui/switch.jsx +1 -1
  162. package/shadcn/ui/tabs.jsx +1 -1
  163. package/shadcn/ui/toggle-group.jsx +2 -2
  164. package/shadcn/ui/toggle.jsx +1 -1
  165. package/shadcn/ui/tooltip.jsx +1 -1
  166. package/styles.css +31 -0
  167. package/MIGRATION.md +0 -230
  168. package/shadcn/ui/carousel.jsx +0 -195
  169. package/shadcn/ui/chart.jsx +0 -312
  170. package/shadcn/ui/resizable.jsx +0 -47
  171. /package/{core → components/core}/Calendar.jsx +0 -0
  172. /package/{core → components/core}/Command.jsx +0 -0
  173. /package/{core → components/core}/Context.jsx +0 -0
  174. /package/{core → components/core}/ThemeProvider.jsx +0 -0
  175. /package/{core → components/core}/Utilities.js +0 -0
@@ -0,0 +1,454 @@
1
+ /* @base-ui/react 1.4.1 — vendored (MIT — MUI Inc).
2
+ * Refresh: scripts/vendor-base-ui.js (see header for instructions).
3
+ * Do not edit by hand. */
4
+ import {
5
+ useAriaLabelledBy
6
+ } from "./_chunk-a8fwg9d0.js";
7
+ import {
8
+ useCheckboxGroupContext
9
+ } from "./_chunk-bk7n9s9e.js";
10
+ import {
11
+ useFieldItemContext
12
+ } from "./_chunk-qgzhcjsj.js";
13
+ import {
14
+ useFormContext,
15
+ useRegisterFieldControl
16
+ } from "./_chunk-97tas84n.js";
17
+ import {
18
+ fieldValidityMapping,
19
+ useFieldRootContext,
20
+ useLabelableContext
21
+ } from "./_chunk-kfz96xv1.js";
22
+ import"./_chunk-ds8fnpjj.js";
23
+ import {
24
+ useControlled
25
+ } from "./_chunk-01rqe37g.js";
26
+ import {
27
+ useValueChanged
28
+ } from "./_chunk-cwr896nf.js";
29
+ import {
30
+ visuallyHidden,
31
+ visuallyHiddenInput
32
+ } from "./_chunk-hzgetm70.js";
33
+ import {
34
+ createChangeEventDetails,
35
+ exports_reason_parts
36
+ } from "./_chunk-4s0k3h7t.js";
37
+ import {
38
+ useBaseUiId
39
+ } from "./_chunk-8kh3xk78.js";
40
+ import {
41
+ transitionStatusMapping,
42
+ useOpenChangeComplete,
43
+ useTransitionStatus
44
+ } from "./_chunk-mbn76q14.js";
45
+ import"./_chunk-v92ycsfj.js";
46
+ import"./_chunk-3h6zpchb.js";
47
+ import"./_chunk-8jz3hb7q.js";
48
+ import {
49
+ useButton
50
+ } from "./_chunk-85vrgzwr.js";
51
+ import"./_chunk-71zm6zgv.js";
52
+ import"./_chunk-6xevjepc.js";
53
+ import"./_chunk-sx6vkz01.js";
54
+ import"./_chunk-n7dnqnbw.js";
55
+ import {
56
+ useStableCallback
57
+ } from "./_chunk-mznt6ktj.js";
58
+ import {
59
+ useIsoLayoutEffect
60
+ } from "./_chunk-b40erthe.js";
61
+ import {
62
+ EMPTY_OBJECT,
63
+ NOOP,
64
+ useMergedRefs,
65
+ useRefWithInit,
66
+ useRenderElement
67
+ } from "./_chunk-1s41sngz.js";
68
+ import {
69
+ __export,
70
+ mergeProps
71
+ } from "./_chunk-1e6khrvm.js";
72
+
73
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/index.parts.js
74
+ var exports_index_parts = {};
75
+ __export(exports_index_parts, {
76
+ Root: () => CheckboxRoot,
77
+ Indicator: () => CheckboxIndicator
78
+ });
79
+
80
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/root/CheckboxRoot.js
81
+ import * as React3 from "react";
82
+
83
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/utils/useStateAttributesMapping.js
84
+ import * as React from "react";
85
+
86
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/root/CheckboxRootDataAttributes.js
87
+ var CheckboxRootDataAttributes = /* @__PURE__ */ function(CheckboxRootDataAttributes2) {
88
+ CheckboxRootDataAttributes2["checked"] = "data-checked";
89
+ CheckboxRootDataAttributes2["unchecked"] = "data-unchecked";
90
+ CheckboxRootDataAttributes2["indeterminate"] = "data-indeterminate";
91
+ CheckboxRootDataAttributes2["disabled"] = "data-disabled";
92
+ CheckboxRootDataAttributes2["readonly"] = "data-readonly";
93
+ CheckboxRootDataAttributes2["required"] = "data-required";
94
+ CheckboxRootDataAttributes2["valid"] = "data-valid";
95
+ CheckboxRootDataAttributes2["invalid"] = "data-invalid";
96
+ CheckboxRootDataAttributes2["touched"] = "data-touched";
97
+ CheckboxRootDataAttributes2["dirty"] = "data-dirty";
98
+ CheckboxRootDataAttributes2["filled"] = "data-filled";
99
+ CheckboxRootDataAttributes2["focused"] = "data-focused";
100
+ return CheckboxRootDataAttributes2;
101
+ }({});
102
+
103
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/utils/useStateAttributesMapping.js
104
+ "use client";
105
+ function useStateAttributesMapping(state) {
106
+ return React.useMemo(() => ({
107
+ checked(value) {
108
+ if (state.indeterminate) {
109
+ return {};
110
+ }
111
+ if (value) {
112
+ return {
113
+ [CheckboxRootDataAttributes.checked]: ""
114
+ };
115
+ }
116
+ return {
117
+ [CheckboxRootDataAttributes.unchecked]: ""
118
+ };
119
+ },
120
+ ...fieldValidityMapping
121
+ }), [state.indeterminate]);
122
+ }
123
+
124
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/root/CheckboxRootContext.js
125
+ import * as React2 from "react";
126
+ "use client";
127
+ var CheckboxRootContext = /* @__PURE__ */ React2.createContext(undefined);
128
+ if (true)
129
+ CheckboxRootContext.displayName = "CheckboxRootContext";
130
+ function useCheckboxRootContext() {
131
+ const context = React2.useContext(CheckboxRootContext);
132
+ if (context === undefined) {
133
+ throw new Error("Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.");
134
+ }
135
+ return context;
136
+ }
137
+
138
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/root/CheckboxRoot.js
139
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
140
+ "use client";
141
+ var PARENT_CHECKBOX = "data-parent";
142
+ var CheckboxRoot = /* @__PURE__ */ React3.forwardRef(function CheckboxRoot2(componentProps, forwardedRef) {
143
+ const {
144
+ checked: checkedProp,
145
+ className,
146
+ defaultChecked = false,
147
+ "aria-labelledby": ariaLabelledByProp,
148
+ disabled: disabledProp = false,
149
+ form,
150
+ id: idProp,
151
+ indeterminate = false,
152
+ inputRef: inputRefProp,
153
+ name: nameProp,
154
+ onCheckedChange: onCheckedChangeProp,
155
+ parent = false,
156
+ readOnly = false,
157
+ render,
158
+ required = false,
159
+ uncheckedValue,
160
+ value: valueProp,
161
+ nativeButton = false,
162
+ style,
163
+ ...elementProps
164
+ } = componentProps;
165
+ const {
166
+ clearErrors
167
+ } = useFormContext();
168
+ const {
169
+ disabled: rootDisabled,
170
+ name: fieldName,
171
+ setDirty,
172
+ setFilled,
173
+ setFocused,
174
+ setTouched,
175
+ state: fieldState,
176
+ validationMode,
177
+ validityData,
178
+ shouldValidateOnChange,
179
+ validation: localValidation
180
+ } = useFieldRootContext();
181
+ const fieldItemContext = useFieldItemContext();
182
+ const {
183
+ labelId,
184
+ controlId,
185
+ registerControlId,
186
+ getDescriptionProps
187
+ } = useLabelableContext();
188
+ const groupContext = useCheckboxGroupContext();
189
+ const parentContext = groupContext?.parent;
190
+ const isGroupedWithParent = parentContext && groupContext.allValues;
191
+ const disabled = rootDisabled || fieldItemContext.disabled || groupContext?.disabled || disabledProp;
192
+ const name = fieldName ?? nameProp;
193
+ const value = valueProp ?? name;
194
+ const id = useBaseUiId();
195
+ const parentId = useBaseUiId();
196
+ let inputId = controlId;
197
+ if (isGroupedWithParent) {
198
+ inputId = parent ? parentId : `${parentContext.id}-${value}`;
199
+ } else if (idProp) {
200
+ inputId = idProp;
201
+ }
202
+ let groupProps = {};
203
+ if (isGroupedWithParent) {
204
+ if (parent) {
205
+ groupProps = groupContext.parent.getParentProps();
206
+ } else if (value) {
207
+ groupProps = groupContext.parent.getChildProps(value);
208
+ }
209
+ }
210
+ const onCheckedChange = useStableCallback(onCheckedChangeProp);
211
+ const {
212
+ checked: groupChecked = checkedProp,
213
+ indeterminate: groupIndeterminate = indeterminate,
214
+ onCheckedChange: groupOnChange,
215
+ ...otherGroupProps
216
+ } = groupProps;
217
+ const groupValue = groupContext?.value;
218
+ const setGroupValue = groupContext?.setValue;
219
+ const defaultGroupValue = groupContext?.defaultValue;
220
+ const controlRef = React3.useRef(null);
221
+ const controlSourceRef = useRefWithInit(() => Symbol("checkbox-control"));
222
+ const hasRegisteredRef = React3.useRef(false);
223
+ const {
224
+ getButtonProps,
225
+ buttonRef
226
+ } = useButton({
227
+ disabled,
228
+ native: nativeButton
229
+ });
230
+ const validation = groupContext?.validation ?? localValidation;
231
+ const [checked, setCheckedState] = useControlled({
232
+ controlled: value && groupValue && !parent ? groupValue.includes(value) : groupChecked,
233
+ default: value && defaultGroupValue && !parent ? defaultGroupValue.includes(value) : defaultChecked,
234
+ name: "Checkbox",
235
+ state: "checked"
236
+ });
237
+ useIsoLayoutEffect(() => {
238
+ if (registerControlId === NOOP) {
239
+ return;
240
+ }
241
+ hasRegisteredRef.current = true;
242
+ registerControlId(controlSourceRef.current, inputId);
243
+ return;
244
+ }, [inputId, groupContext, registerControlId, parent, controlSourceRef]);
245
+ React3.useEffect(() => {
246
+ const controlSource = controlSourceRef.current;
247
+ return () => {
248
+ if (!hasRegisteredRef.current || registerControlId === NOOP) {
249
+ return;
250
+ }
251
+ hasRegisteredRef.current = false;
252
+ registerControlId(controlSource, undefined);
253
+ };
254
+ }, [registerControlId, controlSourceRef]);
255
+ useRegisterFieldControl(controlRef, {
256
+ enabled: !groupContext,
257
+ id,
258
+ value: checked
259
+ });
260
+ const inputRef = React3.useRef(null);
261
+ const mergedInputRef = useMergedRefs(inputRefProp, inputRef, validation.inputRef);
262
+ const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, inputRef, !nativeButton, inputId ?? undefined);
263
+ useIsoLayoutEffect(() => {
264
+ if (inputRef.current) {
265
+ inputRef.current.indeterminate = groupIndeterminate;
266
+ if (checked) {
267
+ setFilled(true);
268
+ }
269
+ }
270
+ }, [checked, groupIndeterminate, setFilled]);
271
+ useValueChanged(checked, () => {
272
+ if (groupContext && !parent) {
273
+ return;
274
+ }
275
+ clearErrors(name);
276
+ setFilled(checked);
277
+ setDirty(checked !== validityData.initialValue);
278
+ if (shouldValidateOnChange()) {
279
+ validation.commit(checked);
280
+ } else {
281
+ validation.commit(checked, true);
282
+ }
283
+ });
284
+ const inputProps = mergeProps({
285
+ checked,
286
+ disabled,
287
+ form,
288
+ name: parent ? undefined : name,
289
+ id: nativeButton ? undefined : inputId ?? undefined,
290
+ required,
291
+ ref: mergedInputRef,
292
+ style: name ? visuallyHiddenInput : visuallyHidden,
293
+ tabIndex: -1,
294
+ type: "checkbox",
295
+ "aria-hidden": true,
296
+ onChange(event) {
297
+ if (event.nativeEvent.defaultPrevented) {
298
+ return;
299
+ }
300
+ if (readOnly) {
301
+ event.preventDefault();
302
+ return;
303
+ }
304
+ const nextChecked = event.currentTarget.checked;
305
+ const details = createChangeEventDetails(exports_reason_parts.none, event.nativeEvent);
306
+ groupOnChange?.(nextChecked, details);
307
+ onCheckedChange(nextChecked, details);
308
+ if (details.isCanceled) {
309
+ return;
310
+ }
311
+ setCheckedState(nextChecked);
312
+ if (value && groupValue && setGroupValue && !parent && !isGroupedWithParent) {
313
+ const nextGroupValue = nextChecked ? [...groupValue, value] : groupValue.filter((item) => item !== value);
314
+ setGroupValue(nextGroupValue, details);
315
+ }
316
+ },
317
+ onFocus() {
318
+ controlRef.current?.focus();
319
+ }
320
+ }, valueProp !== undefined ? {
321
+ value: (groupContext ? checked && valueProp : valueProp) || ""
322
+ } : EMPTY_OBJECT, getDescriptionProps, groupContext ? validation.getValidationProps : validation.getInputValidationProps);
323
+ const computedChecked = isGroupedWithParent ? Boolean(groupChecked) : checked;
324
+ const computedIndeterminate = isGroupedWithParent ? groupIndeterminate || indeterminate : indeterminate;
325
+ React3.useEffect(() => {
326
+ if (!parentContext || !value) {
327
+ return;
328
+ }
329
+ const disabledStates = parentContext.disabledStatesRef.current;
330
+ disabledStates.set(value, disabled);
331
+ return () => {
332
+ disabledStates.delete(value);
333
+ };
334
+ }, [parentContext, disabled, value]);
335
+ const state = React3.useMemo(() => ({
336
+ ...fieldState,
337
+ checked: computedChecked,
338
+ disabled,
339
+ readOnly,
340
+ required,
341
+ indeterminate: computedIndeterminate
342
+ }), [fieldState, computedChecked, disabled, readOnly, required, computedIndeterminate]);
343
+ const stateAttributesMapping = useStateAttributesMapping(state);
344
+ const element = useRenderElement("span", componentProps, {
345
+ state,
346
+ ref: [buttonRef, controlRef, forwardedRef, groupContext?.registerControlRef],
347
+ props: [{
348
+ id: nativeButton ? inputId ?? undefined : id,
349
+ role: "checkbox",
350
+ "aria-checked": groupIndeterminate ? "mixed" : checked,
351
+ "aria-readonly": readOnly || undefined,
352
+ "aria-required": required || undefined,
353
+ "aria-labelledby": ariaLabelledBy,
354
+ [PARENT_CHECKBOX]: parent ? "" : undefined,
355
+ onFocus() {
356
+ setFocused(true);
357
+ },
358
+ onBlur() {
359
+ const inputEl = inputRef.current;
360
+ if (!inputEl) {
361
+ return;
362
+ }
363
+ setTouched(true);
364
+ setFocused(false);
365
+ if (validationMode === "onBlur") {
366
+ validation.commit(groupContext ? groupValue : inputEl.checked);
367
+ }
368
+ },
369
+ onClick(event) {
370
+ if (readOnly || disabled) {
371
+ return;
372
+ }
373
+ event.preventDefault();
374
+ inputRef.current?.dispatchEvent(new PointerEvent("click", {
375
+ bubbles: true,
376
+ shiftKey: event.shiftKey,
377
+ ctrlKey: event.ctrlKey,
378
+ altKey: event.altKey,
379
+ metaKey: event.metaKey
380
+ }));
381
+ }
382
+ }, getDescriptionProps, validation.getValidationProps, elementProps, otherGroupProps, getButtonProps],
383
+ stateAttributesMapping
384
+ });
385
+ return /* @__PURE__ */ _jsxs(CheckboxRootContext.Provider, {
386
+ value: state,
387
+ children: [element, !checked && !groupContext && name && !parent && uncheckedValue !== undefined && /* @__PURE__ */ _jsx("input", {
388
+ type: "hidden",
389
+ form,
390
+ name,
391
+ value: uncheckedValue
392
+ }), /* @__PURE__ */ _jsx("input", {
393
+ ...inputProps,
394
+ suppressHydrationWarning: true
395
+ })]
396
+ });
397
+ });
398
+ if (true)
399
+ CheckboxRoot.displayName = "CheckboxRoot";
400
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/checkbox/indicator/CheckboxIndicator.js
401
+ import * as React4 from "react";
402
+ "use client";
403
+ var CheckboxIndicator = /* @__PURE__ */ React4.forwardRef(function CheckboxIndicator2(componentProps, forwardedRef) {
404
+ const {
405
+ render,
406
+ className,
407
+ style,
408
+ keepMounted = false,
409
+ ...elementProps
410
+ } = componentProps;
411
+ const rootState = useCheckboxRootContext();
412
+ const rendered = rootState.checked || rootState.indeterminate;
413
+ const {
414
+ mounted,
415
+ transitionStatus,
416
+ setMounted
417
+ } = useTransitionStatus(rendered);
418
+ const indicatorRef = React4.useRef(null);
419
+ const state = {
420
+ ...rootState,
421
+ transitionStatus
422
+ };
423
+ useOpenChangeComplete({
424
+ open: rendered,
425
+ ref: indicatorRef,
426
+ onComplete() {
427
+ if (!rendered) {
428
+ setMounted(false);
429
+ }
430
+ }
431
+ });
432
+ const baseStateAttributesMapping = useStateAttributesMapping(rootState);
433
+ const stateAttributesMapping = React4.useMemo(() => ({
434
+ ...baseStateAttributesMapping,
435
+ ...transitionStatusMapping,
436
+ ...fieldValidityMapping
437
+ }), [baseStateAttributesMapping]);
438
+ const shouldRender = keepMounted || mounted;
439
+ const element = useRenderElement("span", componentProps, {
440
+ ref: [forwardedRef, indicatorRef],
441
+ state,
442
+ stateAttributesMapping,
443
+ props: elementProps
444
+ });
445
+ if (!shouldRender) {
446
+ return null;
447
+ }
448
+ return element;
449
+ });
450
+ if (true)
451
+ CheckboxIndicator.displayName = "CheckboxIndicator";
452
+ export {
453
+ exports_index_parts as Checkbox
454
+ };