@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,892 @@
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
+ useIsHydrating
6
+ } from "./_chunk-vjbnhhg1.js";
7
+ import {
8
+ useCSPContext
9
+ } from "./_chunk-ymj1dpqg.js";
10
+ import {
11
+ CompositeRoot
12
+ } from "./_chunk-0h5sskyw.js";
13
+ import {
14
+ ACTIVE_COMPOSITE_ITEM
15
+ } from "./_chunk-r0vsdknk.js";
16
+ import"./_chunk-ds8fnpjj.js";
17
+ import {
18
+ useCompositeItem
19
+ } from "./_chunk-b5jsqt97.js";
20
+ import {
21
+ getCssDimensions
22
+ } from "./_chunk-xfagb0fq.js";
23
+ import {
24
+ useCompositeListItem
25
+ } from "./_chunk-ek863ta9.js";
26
+ import"./_chunk-vdc01ss3.js";
27
+ import {
28
+ CompositeList
29
+ } from "./_chunk-p6qynd6r.js";
30
+ import"./_chunk-20rtfsz9.js";
31
+ import"./_chunk-wtw745qd.js";
32
+ import {
33
+ useControlled
34
+ } from "./_chunk-01rqe37g.js";
35
+ import {
36
+ inertValue
37
+ } from "./_chunk-9nyxkvte.js";
38
+ import"./_chunk-aqwsk46c.js";
39
+ import {
40
+ ownerDocument
41
+ } from "./_chunk-xb7ph1ka.js";
42
+ import {
43
+ activeElement,
44
+ contains
45
+ } from "./_chunk-atnkefgd.js";
46
+ import"./_chunk-qce0xt57.js";
47
+ import"./_chunk-nya71ccw.js";
48
+ import"./_chunk-t7j3rbpv.js";
49
+ import"./_chunk-f5d01bp9.js";
50
+ import {
51
+ createChangeEventDetails,
52
+ exports_reason_parts
53
+ } from "./_chunk-4s0k3h7t.js";
54
+ import {
55
+ useBaseUiId
56
+ } from "./_chunk-8kh3xk78.js";
57
+ import {
58
+ TransitionStatusDataAttributes,
59
+ transitionStatusMapping,
60
+ useOpenChangeComplete,
61
+ useTransitionStatus
62
+ } from "./_chunk-mbn76q14.js";
63
+ import"./_chunk-v92ycsfj.js";
64
+ import"./_chunk-3h6zpchb.js";
65
+ import"./_chunk-8jz3hb7q.js";
66
+ import {
67
+ useButton
68
+ } from "./_chunk-85vrgzwr.js";
69
+ import"./_chunk-71zm6zgv.js";
70
+ import"./_chunk-6xevjepc.js";
71
+ import"./_chunk-sx6vkz01.js";
72
+ import"./_chunk-n7dnqnbw.js";
73
+ import {
74
+ useStableCallback
75
+ } from "./_chunk-mznt6ktj.js";
76
+ import {
77
+ useIsoLayoutEffect
78
+ } from "./_chunk-b40erthe.js";
79
+ import {
80
+ EMPTY_ARRAY,
81
+ useRenderElement
82
+ } from "./_chunk-1s41sngz.js";
83
+ import {
84
+ __export
85
+ } from "./_chunk-1e6khrvm.js";
86
+
87
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/index.parts.js
88
+ var exports_index_parts = {};
89
+ __export(exports_index_parts, {
90
+ Tab: () => TabsTab,
91
+ Root: () => TabsRoot,
92
+ Panel: () => TabsPanel,
93
+ List: () => TabsList,
94
+ Indicator: () => TabsIndicator
95
+ });
96
+
97
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/root/TabsRoot.js
98
+ import * as React2 from "react";
99
+
100
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/root/TabsRootContext.js
101
+ import * as React from "react";
102
+ "use client";
103
+ var TabsRootContext = /* @__PURE__ */ React.createContext(undefined);
104
+ if (true)
105
+ TabsRootContext.displayName = "TabsRootContext";
106
+ function useTabsRootContext() {
107
+ const context = React.useContext(TabsRootContext);
108
+ if (context === undefined) {
109
+ throw new Error("Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");
110
+ }
111
+ return context;
112
+ }
113
+
114
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/root/TabsRootDataAttributes.js
115
+ var TabsRootDataAttributes = /* @__PURE__ */ function(TabsRootDataAttributes2) {
116
+ TabsRootDataAttributes2["activationDirection"] = "data-activation-direction";
117
+ TabsRootDataAttributes2["orientation"] = "data-orientation";
118
+ return TabsRootDataAttributes2;
119
+ }({});
120
+
121
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/root/stateAttributesMapping.js
122
+ var tabsStateAttributesMapping = {
123
+ tabActivationDirection: (dir) => ({
124
+ [TabsRootDataAttributes.activationDirection]: dir
125
+ })
126
+ };
127
+
128
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/root/TabsRoot.js
129
+ import { jsx as _jsx } from "react/jsx-runtime";
130
+ "use client";
131
+ var TabsRoot = /* @__PURE__ */ React2.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
132
+ const {
133
+ className,
134
+ defaultValue: defaultValueProp = 0,
135
+ onValueChange: onValueChangeProp,
136
+ orientation = "horizontal",
137
+ render,
138
+ value: valueProp,
139
+ style,
140
+ ...elementProps
141
+ } = componentProps;
142
+ const hasExplicitDefaultValueProp = Object.hasOwn(componentProps, "defaultValue");
143
+ const tabPanelRefs = React2.useRef([]);
144
+ const [mountedTabPanels, setMountedTabPanels] = React2.useState(() => new Map);
145
+ const [value, setValue] = useControlled({
146
+ controlled: valueProp,
147
+ default: defaultValueProp,
148
+ name: "Tabs",
149
+ state: "value"
150
+ });
151
+ const isControlled = valueProp !== undefined;
152
+ const [tabMap, setTabMap] = React2.useState(() => new Map);
153
+ const getTabElementBySelectedValue = React2.useCallback((selectedValue) => {
154
+ if (selectedValue === undefined) {
155
+ return null;
156
+ }
157
+ for (const [tabElement, tabMetadata] of tabMap.entries()) {
158
+ if (tabMetadata != null && selectedValue === (tabMetadata.value ?? tabMetadata.index)) {
159
+ return tabElement;
160
+ }
161
+ }
162
+ return null;
163
+ }, [tabMap]);
164
+ const [activationDirectionState, setActivationDirectionState] = React2.useState(() => ({
165
+ previousValue: value,
166
+ tabActivationDirection: "none"
167
+ }));
168
+ const {
169
+ previousValue,
170
+ tabActivationDirection: committedTabActivationDirection
171
+ } = activationDirectionState;
172
+ let tabActivationDirection = committedTabActivationDirection;
173
+ let directionComputationIncomplete = false;
174
+ if (previousValue !== value) {
175
+ tabActivationDirection = computeActivationDirection(previousValue, value, orientation, tabMap);
176
+ directionComputationIncomplete = previousValue != null && value != null && getTabElementBySelectedValue(value) == null;
177
+ }
178
+ const nextPreviousValue = directionComputationIncomplete ? previousValue : value;
179
+ const shouldSyncActivationDirectionState = previousValue !== nextPreviousValue || committedTabActivationDirection !== tabActivationDirection;
180
+ useIsoLayoutEffect(() => {
181
+ if (!shouldSyncActivationDirectionState) {
182
+ return;
183
+ }
184
+ setActivationDirectionState({
185
+ previousValue: nextPreviousValue,
186
+ tabActivationDirection
187
+ });
188
+ }, [nextPreviousValue, shouldSyncActivationDirectionState, tabActivationDirection]);
189
+ const onValueChange = useStableCallback((newValue, eventDetails) => {
190
+ const activationDirection = computeActivationDirection(value, newValue, orientation, tabMap);
191
+ eventDetails.activationDirection = activationDirection;
192
+ onValueChangeProp?.(newValue, eventDetails);
193
+ if (eventDetails.isCanceled) {
194
+ return;
195
+ }
196
+ setValue(newValue);
197
+ });
198
+ const registerMountedTabPanel = useStableCallback((panelValue, panelId) => {
199
+ setMountedTabPanels((prev) => {
200
+ if (prev.get(panelValue) === panelId) {
201
+ return prev;
202
+ }
203
+ const next = new Map(prev);
204
+ next.set(panelValue, panelId);
205
+ return next;
206
+ });
207
+ });
208
+ const unregisterMountedTabPanel = useStableCallback((panelValue, panelId) => {
209
+ setMountedTabPanels((prev) => {
210
+ if (!prev.has(panelValue) || prev.get(panelValue) !== panelId) {
211
+ return prev;
212
+ }
213
+ const next = new Map(prev);
214
+ next.delete(panelValue);
215
+ return next;
216
+ });
217
+ });
218
+ const getTabPanelIdByValue = React2.useCallback((tabValue) => {
219
+ return mountedTabPanels.get(tabValue);
220
+ }, [mountedTabPanels]);
221
+ const getTabIdByPanelValue = React2.useCallback((tabPanelValue) => {
222
+ for (const tabMetadata of tabMap.values()) {
223
+ if (tabPanelValue === tabMetadata?.value) {
224
+ return tabMetadata?.id;
225
+ }
226
+ }
227
+ return;
228
+ }, [tabMap]);
229
+ const tabsContextValue = React2.useMemo(() => ({
230
+ getTabElementBySelectedValue,
231
+ getTabIdByPanelValue,
232
+ getTabPanelIdByValue,
233
+ onValueChange,
234
+ orientation,
235
+ registerMountedTabPanel,
236
+ setTabMap,
237
+ unregisterMountedTabPanel,
238
+ tabActivationDirection,
239
+ value
240
+ }), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, unregisterMountedTabPanel, tabActivationDirection, value]);
241
+ const selectedTabMetadata = React2.useMemo(() => {
242
+ for (const tabMetadata of tabMap.values()) {
243
+ if (tabMetadata != null && tabMetadata.value === value) {
244
+ return tabMetadata;
245
+ }
246
+ }
247
+ return;
248
+ }, [tabMap, value]);
249
+ const firstEnabledTabValue = React2.useMemo(() => {
250
+ for (const tabMetadata of tabMap.values()) {
251
+ if (tabMetadata != null && !tabMetadata.disabled) {
252
+ return tabMetadata.value;
253
+ }
254
+ }
255
+ return;
256
+ }, [tabMap]);
257
+ useIsoLayoutEffect(() => {
258
+ if (isControlled || tabMap.size === 0) {
259
+ return;
260
+ }
261
+ const selectionIsDisabled = selectedTabMetadata?.disabled;
262
+ const selectionIsMissing = selectedTabMetadata == null && value !== null;
263
+ const shouldHonorExplicitDefaultSelection = hasExplicitDefaultValueProp && selectionIsDisabled && value === defaultValueProp;
264
+ if (shouldHonorExplicitDefaultSelection) {
265
+ return;
266
+ }
267
+ if (!selectionIsDisabled && !selectionIsMissing) {
268
+ return;
269
+ }
270
+ const fallbackValue = firstEnabledTabValue ?? null;
271
+ if (value === fallbackValue) {
272
+ return;
273
+ }
274
+ setValue(fallbackValue);
275
+ setActivationDirectionState((prev) => {
276
+ if (prev.tabActivationDirection === "none") {
277
+ return prev;
278
+ }
279
+ return {
280
+ ...prev,
281
+ tabActivationDirection: "none"
282
+ };
283
+ });
284
+ }, [defaultValueProp, firstEnabledTabValue, hasExplicitDefaultValueProp, isControlled, selectedTabMetadata, setValue, tabMap, value]);
285
+ const state = {
286
+ orientation,
287
+ tabActivationDirection
288
+ };
289
+ const element = useRenderElement("div", componentProps, {
290
+ state,
291
+ ref: forwardedRef,
292
+ props: elementProps,
293
+ stateAttributesMapping: tabsStateAttributesMapping
294
+ });
295
+ return /* @__PURE__ */ _jsx(TabsRootContext.Provider, {
296
+ value: tabsContextValue,
297
+ children: /* @__PURE__ */ _jsx(CompositeList, {
298
+ elementsRef: tabPanelRefs,
299
+ children: element
300
+ })
301
+ });
302
+ });
303
+ if (true)
304
+ TabsRoot.displayName = "TabsRoot";
305
+ function computeActivationDirection(oldValue, newValue, orientation, tabMap) {
306
+ if (oldValue == null || newValue == null) {
307
+ return "none";
308
+ }
309
+ let oldTab = null;
310
+ let newTab = null;
311
+ for (const [tabElement, tabMetadata] of tabMap.entries()) {
312
+ if (tabMetadata == null) {
313
+ continue;
314
+ }
315
+ const tabValue = tabMetadata.value ?? tabMetadata.index;
316
+ if (oldValue === tabValue) {
317
+ oldTab = tabElement;
318
+ }
319
+ if (newValue === tabValue) {
320
+ newTab = tabElement;
321
+ }
322
+ if (oldTab != null && newTab != null) {
323
+ break;
324
+ }
325
+ }
326
+ if (oldTab == null || newTab == null) {
327
+ if (oldTab !== newTab && (typeof oldValue === "number" || typeof oldValue === "string") && typeof oldValue === typeof newValue) {
328
+ if (orientation === "horizontal") {
329
+ return newValue > oldValue ? "right" : "left";
330
+ }
331
+ return newValue > oldValue ? "down" : "up";
332
+ }
333
+ return "none";
334
+ }
335
+ const oldRect = oldTab.getBoundingClientRect();
336
+ const newRect = newTab.getBoundingClientRect();
337
+ if (orientation === "horizontal") {
338
+ if (newRect.left < oldRect.left) {
339
+ return "left";
340
+ }
341
+ if (newRect.left > oldRect.left) {
342
+ return "right";
343
+ }
344
+ } else {
345
+ if (newRect.top < oldRect.top) {
346
+ return "up";
347
+ }
348
+ if (newRect.top > oldRect.top) {
349
+ return "down";
350
+ }
351
+ }
352
+ return "none";
353
+ }
354
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/tab/TabsTab.js
355
+ import * as React4 from "react";
356
+
357
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/list/TabsListContext.js
358
+ import * as React3 from "react";
359
+ "use client";
360
+ var TabsListContext = /* @__PURE__ */ React3.createContext(undefined);
361
+ if (true)
362
+ TabsListContext.displayName = "TabsListContext";
363
+ function useTabsListContext() {
364
+ const context = React3.useContext(TabsListContext);
365
+ if (context === undefined) {
366
+ throw new Error("Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");
367
+ }
368
+ return context;
369
+ }
370
+
371
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/tab/TabsTab.js
372
+ "use client";
373
+ var TabsTab = /* @__PURE__ */ React4.forwardRef(function TabsTab2(componentProps, forwardedRef) {
374
+ const {
375
+ className,
376
+ disabled = false,
377
+ render,
378
+ value,
379
+ id: idProp,
380
+ nativeButton = true,
381
+ style,
382
+ ...elementProps
383
+ } = componentProps;
384
+ const {
385
+ value: activeTabValue,
386
+ getTabPanelIdByValue,
387
+ orientation
388
+ } = useTabsRootContext();
389
+ const {
390
+ activateOnFocus,
391
+ highlightedTabIndex,
392
+ onTabActivation,
393
+ registerTabResizeObserverElement,
394
+ setHighlightedTabIndex,
395
+ tabsListElement
396
+ } = useTabsListContext();
397
+ const id = useBaseUiId(idProp);
398
+ const tabMetadata = React4.useMemo(() => ({
399
+ disabled,
400
+ id,
401
+ value
402
+ }), [disabled, id, value]);
403
+ const {
404
+ compositeProps,
405
+ compositeRef,
406
+ index
407
+ } = useCompositeItem({
408
+ metadata: tabMetadata
409
+ });
410
+ const active = value === activeTabValue;
411
+ const isNavigatingRef = React4.useRef(false);
412
+ const tabElementRef = React4.useRef(null);
413
+ React4.useEffect(() => {
414
+ const tabElement = tabElementRef.current;
415
+ if (!tabElement) {
416
+ return;
417
+ }
418
+ return registerTabResizeObserverElement(tabElement);
419
+ }, [registerTabResizeObserverElement]);
420
+ useIsoLayoutEffect(() => {
421
+ if (isNavigatingRef.current) {
422
+ isNavigatingRef.current = false;
423
+ return;
424
+ }
425
+ if (!(active && index > -1 && highlightedTabIndex !== index)) {
426
+ return;
427
+ }
428
+ const listElement = tabsListElement;
429
+ if (listElement != null) {
430
+ const activeEl = activeElement(ownerDocument(listElement));
431
+ if (activeEl && contains(listElement, activeEl)) {
432
+ return;
433
+ }
434
+ }
435
+ if (!disabled) {
436
+ setHighlightedTabIndex(index);
437
+ }
438
+ }, [active, index, highlightedTabIndex, setHighlightedTabIndex, disabled, tabsListElement]);
439
+ const {
440
+ getButtonProps,
441
+ buttonRef
442
+ } = useButton({
443
+ disabled,
444
+ native: nativeButton,
445
+ focusableWhenDisabled: true
446
+ });
447
+ const tabPanelId = getTabPanelIdByValue(value);
448
+ const isPressingRef = React4.useRef(false);
449
+ const isMainButtonRef = React4.useRef(false);
450
+ function onClick(event) {
451
+ if (active || disabled) {
452
+ return;
453
+ }
454
+ onTabActivation(value, createChangeEventDetails(exports_reason_parts.none, event.nativeEvent, undefined, {
455
+ activationDirection: "none"
456
+ }));
457
+ }
458
+ function onFocus(event) {
459
+ if (active) {
460
+ return;
461
+ }
462
+ if (index > -1 && !disabled) {
463
+ setHighlightedTabIndex(index);
464
+ }
465
+ if (disabled) {
466
+ return;
467
+ }
468
+ if (activateOnFocus && (!isPressingRef.current || isPressingRef.current && isMainButtonRef.current)) {
469
+ onTabActivation(value, createChangeEventDetails(exports_reason_parts.none, event.nativeEvent, undefined, {
470
+ activationDirection: "none"
471
+ }));
472
+ }
473
+ }
474
+ function onPointerDown(event) {
475
+ if (active || disabled) {
476
+ return;
477
+ }
478
+ isPressingRef.current = true;
479
+ function handlePointerUp() {
480
+ isPressingRef.current = false;
481
+ isMainButtonRef.current = false;
482
+ }
483
+ if (!event.button || event.button === 0) {
484
+ isMainButtonRef.current = true;
485
+ const doc = ownerDocument(event.currentTarget);
486
+ doc.addEventListener("pointerup", handlePointerUp, {
487
+ once: true
488
+ });
489
+ }
490
+ }
491
+ const state = {
492
+ disabled,
493
+ active,
494
+ orientation
495
+ };
496
+ const element = useRenderElement("button", componentProps, {
497
+ state,
498
+ ref: [forwardedRef, buttonRef, compositeRef, tabElementRef],
499
+ props: [compositeProps, {
500
+ role: "tab",
501
+ "aria-controls": tabPanelId,
502
+ "aria-selected": active,
503
+ id,
504
+ onClick,
505
+ onFocus,
506
+ onPointerDown,
507
+ [ACTIVE_COMPOSITE_ITEM]: active ? "" : undefined,
508
+ onKeyDownCapture() {
509
+ isNavigatingRef.current = true;
510
+ }
511
+ }, elementProps, getButtonProps]
512
+ });
513
+ return element;
514
+ });
515
+ if (true)
516
+ TabsTab.displayName = "TabsTab";
517
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/indicator/TabsIndicator.js
518
+ import * as React6 from "react";
519
+
520
+ // node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/useForcedRerendering.js
521
+ import * as React5 from "react";
522
+ "use client";
523
+ function useForcedRerendering() {
524
+ const [, setState] = React5.useState({});
525
+ return React5.useCallback(() => {
526
+ setState({});
527
+ }, []);
528
+ }
529
+
530
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/indicator/prehydrationScript.min.js
531
+ var script = '!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';
532
+
533
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/indicator/TabsIndicatorCssVars.js
534
+ var TabsIndicatorCssVars = /* @__PURE__ */ function(TabsIndicatorCssVars2) {
535
+ TabsIndicatorCssVars2["activeTabLeft"] = "--active-tab-left";
536
+ TabsIndicatorCssVars2["activeTabRight"] = "--active-tab-right";
537
+ TabsIndicatorCssVars2["activeTabTop"] = "--active-tab-top";
538
+ TabsIndicatorCssVars2["activeTabBottom"] = "--active-tab-bottom";
539
+ TabsIndicatorCssVars2["activeTabWidth"] = "--active-tab-width";
540
+ TabsIndicatorCssVars2["activeTabHeight"] = "--active-tab-height";
541
+ return TabsIndicatorCssVars2;
542
+ }({});
543
+
544
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/indicator/TabsIndicator.js
545
+ import { jsx as _jsx2, jsxs as _jsxs } from "react/jsx-runtime";
546
+ "use client";
547
+ var stateAttributesMapping = {
548
+ ...tabsStateAttributesMapping,
549
+ activeTabPosition: () => null,
550
+ activeTabSize: () => null
551
+ };
552
+ var TabsIndicator = /* @__PURE__ */ React6.forwardRef(function TabIndicator(componentProps, forwardedRef) {
553
+ const {
554
+ className,
555
+ render,
556
+ renderBeforeHydration = false,
557
+ style: styleProp,
558
+ ...elementProps
559
+ } = componentProps;
560
+ const {
561
+ nonce
562
+ } = useCSPContext();
563
+ const {
564
+ getTabElementBySelectedValue,
565
+ orientation,
566
+ tabActivationDirection,
567
+ value
568
+ } = useTabsRootContext();
569
+ const {
570
+ tabsListElement,
571
+ registerIndicatorUpdateListener
572
+ } = useTabsListContext();
573
+ const isHydrating = useIsHydrating();
574
+ const rerender = useForcedRerendering();
575
+ React6.useEffect(() => {
576
+ return registerIndicatorUpdateListener(rerender);
577
+ }, [registerIndicatorUpdateListener, rerender]);
578
+ let left = 0;
579
+ let right = 0;
580
+ let top = 0;
581
+ let bottom = 0;
582
+ let width = 0;
583
+ let height = 0;
584
+ let isTabSelected = false;
585
+ if (value != null && tabsListElement != null) {
586
+ const activeTab = getTabElementBySelectedValue(value);
587
+ isTabSelected = true;
588
+ if (activeTab != null) {
589
+ const {
590
+ width: computedWidth,
591
+ height: computedHeight
592
+ } = getCssDimensions(activeTab);
593
+ const {
594
+ width: tabListWidth,
595
+ height: tabListHeight
596
+ } = getCssDimensions(tabsListElement);
597
+ const tabRect = activeTab.getBoundingClientRect();
598
+ const tabsListRect = tabsListElement.getBoundingClientRect();
599
+ const scaleX = tabListWidth > 0 ? tabsListRect.width / tabListWidth : 1;
600
+ const scaleY = tabListHeight > 0 ? tabsListRect.height / tabListHeight : 1;
601
+ const hasNonZeroScale = Math.abs(scaleX) > Number.EPSILON && Math.abs(scaleY) > Number.EPSILON;
602
+ if (hasNonZeroScale) {
603
+ const tabLeftDelta = tabRect.left - tabsListRect.left;
604
+ const tabTopDelta = tabRect.top - tabsListRect.top;
605
+ left = tabLeftDelta / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
606
+ top = tabTopDelta / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
607
+ } else {
608
+ left = activeTab.offsetLeft;
609
+ top = activeTab.offsetTop;
610
+ }
611
+ width = computedWidth;
612
+ height = computedHeight;
613
+ right = tabsListElement.scrollWidth - left - width;
614
+ bottom = tabsListElement.scrollHeight - top - height;
615
+ }
616
+ }
617
+ const activeTabPosition = React6.useMemo(() => isTabSelected ? {
618
+ left,
619
+ right,
620
+ top,
621
+ bottom
622
+ } : null, [left, right, top, bottom, isTabSelected]);
623
+ const activeTabSize = React6.useMemo(() => isTabSelected ? {
624
+ width,
625
+ height
626
+ } : null, [width, height, isTabSelected]);
627
+ const style = React6.useMemo(() => {
628
+ if (!isTabSelected) {
629
+ return;
630
+ }
631
+ return {
632
+ [TabsIndicatorCssVars.activeTabLeft]: `${left}px`,
633
+ [TabsIndicatorCssVars.activeTabRight]: `${right}px`,
634
+ [TabsIndicatorCssVars.activeTabTop]: `${top}px`,
635
+ [TabsIndicatorCssVars.activeTabBottom]: `${bottom}px`,
636
+ [TabsIndicatorCssVars.activeTabWidth]: `${width}px`,
637
+ [TabsIndicatorCssVars.activeTabHeight]: `${height}px`
638
+ };
639
+ }, [left, right, top, bottom, width, height, isTabSelected]);
640
+ const displayIndicator = isTabSelected && width > 0 && height > 0;
641
+ const state = {
642
+ orientation,
643
+ activeTabPosition,
644
+ activeTabSize,
645
+ tabActivationDirection
646
+ };
647
+ const element = useRenderElement("span", componentProps, {
648
+ state,
649
+ ref: forwardedRef,
650
+ props: [{
651
+ role: "presentation",
652
+ style,
653
+ hidden: !displayIndicator
654
+ }, elementProps, {
655
+ suppressHydrationWarning: true
656
+ }],
657
+ stateAttributesMapping
658
+ });
659
+ if (value == null) {
660
+ return null;
661
+ }
662
+ return /* @__PURE__ */ _jsxs(React6.Fragment, {
663
+ children: [element, isHydrating && renderBeforeHydration && /* @__PURE__ */ _jsx2("script", {
664
+ nonce,
665
+ dangerouslySetInnerHTML: {
666
+ __html: script
667
+ },
668
+ suppressHydrationWarning: true
669
+ })]
670
+ });
671
+ });
672
+ if (true)
673
+ TabsIndicator.displayName = "TabsIndicator";
674
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/panel/TabsPanel.js
675
+ import * as React7 from "react";
676
+
677
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/panel/TabsPanelDataAttributes.js
678
+ var TabsPanelDataAttributes = function(TabsPanelDataAttributes2) {
679
+ TabsPanelDataAttributes2["index"] = "data-index";
680
+ TabsPanelDataAttributes2["activationDirection"] = "data-activation-direction";
681
+ TabsPanelDataAttributes2["orientation"] = "data-orientation";
682
+ TabsPanelDataAttributes2["hidden"] = "data-hidden";
683
+ TabsPanelDataAttributes2[TabsPanelDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
684
+ TabsPanelDataAttributes2[TabsPanelDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
685
+ return TabsPanelDataAttributes2;
686
+ }({});
687
+
688
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/panel/TabsPanel.js
689
+ "use client";
690
+ var stateAttributesMapping2 = {
691
+ ...tabsStateAttributesMapping,
692
+ ...transitionStatusMapping
693
+ };
694
+ var TabsPanel = /* @__PURE__ */ React7.forwardRef(function TabPanel(componentProps, forwardedRef) {
695
+ const {
696
+ className,
697
+ value,
698
+ render,
699
+ keepMounted = false,
700
+ style,
701
+ ...elementProps
702
+ } = componentProps;
703
+ const {
704
+ value: selectedValue,
705
+ getTabIdByPanelValue,
706
+ orientation,
707
+ tabActivationDirection,
708
+ registerMountedTabPanel,
709
+ unregisterMountedTabPanel
710
+ } = useTabsRootContext();
711
+ const id = useBaseUiId();
712
+ const metadata = React7.useMemo(() => ({
713
+ id,
714
+ value
715
+ }), [id, value]);
716
+ const {
717
+ ref: listItemRef,
718
+ index
719
+ } = useCompositeListItem({
720
+ metadata
721
+ });
722
+ const open = value === selectedValue;
723
+ const {
724
+ mounted,
725
+ transitionStatus,
726
+ setMounted
727
+ } = useTransitionStatus(open);
728
+ const hidden = !mounted;
729
+ const correspondingTabId = getTabIdByPanelValue(value);
730
+ const state = {
731
+ hidden,
732
+ orientation,
733
+ tabActivationDirection,
734
+ transitionStatus
735
+ };
736
+ const panelRef = React7.useRef(null);
737
+ const element = useRenderElement("div", componentProps, {
738
+ state,
739
+ ref: [forwardedRef, listItemRef, panelRef],
740
+ props: [{
741
+ "aria-labelledby": correspondingTabId,
742
+ hidden,
743
+ id,
744
+ role: "tabpanel",
745
+ tabIndex: open ? 0 : -1,
746
+ inert: inertValue(!open),
747
+ [TabsPanelDataAttributes.index]: index
748
+ }, elementProps],
749
+ stateAttributesMapping: stateAttributesMapping2
750
+ });
751
+ useOpenChangeComplete({
752
+ open,
753
+ ref: panelRef,
754
+ onComplete() {
755
+ if (!open) {
756
+ setMounted(false);
757
+ }
758
+ }
759
+ });
760
+ useIsoLayoutEffect(() => {
761
+ if (hidden && !keepMounted) {
762
+ return;
763
+ }
764
+ if (id == null) {
765
+ return;
766
+ }
767
+ registerMountedTabPanel(value, id);
768
+ return () => {
769
+ unregisterMountedTabPanel(value, id);
770
+ };
771
+ }, [hidden, keepMounted, value, id, registerMountedTabPanel, unregisterMountedTabPanel]);
772
+ const shouldRender = keepMounted || mounted;
773
+ if (!shouldRender) {
774
+ return null;
775
+ }
776
+ return element;
777
+ });
778
+ if (true)
779
+ TabsPanel.displayName = "TabsPanel";
780
+ // node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/tabs/list/TabsList.js
781
+ import * as React8 from "react";
782
+ import { jsx as _jsx3 } from "react/jsx-runtime";
783
+ "use client";
784
+ var TabsList = /* @__PURE__ */ React8.forwardRef(function TabsList2(componentProps, forwardedRef) {
785
+ const {
786
+ activateOnFocus = false,
787
+ className,
788
+ loopFocus = true,
789
+ render,
790
+ style,
791
+ ...elementProps
792
+ } = componentProps;
793
+ const {
794
+ onValueChange,
795
+ orientation,
796
+ value,
797
+ setTabMap,
798
+ tabActivationDirection
799
+ } = useTabsRootContext();
800
+ const [highlightedTabIndex, setHighlightedTabIndex] = React8.useState(0);
801
+ const [tabsListElement, setTabsListElement] = React8.useState(null);
802
+ const indicatorUpdateListenersRef = React8.useRef(new Set);
803
+ const tabResizeObserverElementsRef = React8.useRef(new Set);
804
+ const resizeObserverRef = React8.useRef(null);
805
+ const notifyIndicatorUpdateListeners = useStableCallback(() => {
806
+ indicatorUpdateListenersRef.current.forEach((listener) => {
807
+ listener();
808
+ });
809
+ });
810
+ React8.useEffect(() => {
811
+ if (typeof ResizeObserver === "undefined") {
812
+ return;
813
+ }
814
+ const resizeObserver = new ResizeObserver(() => {
815
+ if (!indicatorUpdateListenersRef.current.size) {
816
+ return;
817
+ }
818
+ notifyIndicatorUpdateListeners();
819
+ });
820
+ resizeObserverRef.current = resizeObserver;
821
+ if (tabsListElement) {
822
+ resizeObserver.observe(tabsListElement);
823
+ }
824
+ tabResizeObserverElementsRef.current.forEach((element) => {
825
+ resizeObserver.observe(element);
826
+ });
827
+ return () => {
828
+ resizeObserver.disconnect();
829
+ resizeObserverRef.current = null;
830
+ };
831
+ }, [tabsListElement, notifyIndicatorUpdateListeners]);
832
+ const registerIndicatorUpdateListener = useStableCallback((listener) => {
833
+ indicatorUpdateListenersRef.current.add(listener);
834
+ return () => {
835
+ indicatorUpdateListenersRef.current.delete(listener);
836
+ };
837
+ });
838
+ const registerTabResizeObserverElement = useStableCallback((element) => {
839
+ tabResizeObserverElementsRef.current.add(element);
840
+ resizeObserverRef.current?.observe(element);
841
+ return () => {
842
+ tabResizeObserverElementsRef.current.delete(element);
843
+ resizeObserverRef.current?.unobserve(element);
844
+ };
845
+ });
846
+ const onTabActivation = useStableCallback((newValue, eventDetails) => {
847
+ if (newValue !== value) {
848
+ onValueChange(newValue, eventDetails);
849
+ }
850
+ });
851
+ const state = {
852
+ orientation,
853
+ tabActivationDirection
854
+ };
855
+ const defaultProps = {
856
+ "aria-orientation": orientation === "vertical" ? "vertical" : undefined,
857
+ role: "tablist"
858
+ };
859
+ const tabsListContextValue = React8.useMemo(() => ({
860
+ activateOnFocus,
861
+ highlightedTabIndex,
862
+ registerIndicatorUpdateListener,
863
+ registerTabResizeObserverElement,
864
+ onTabActivation,
865
+ setHighlightedTabIndex,
866
+ tabsListElement
867
+ }), [activateOnFocus, highlightedTabIndex, registerIndicatorUpdateListener, registerTabResizeObserverElement, onTabActivation, setHighlightedTabIndex, tabsListElement]);
868
+ return /* @__PURE__ */ _jsx3(TabsListContext.Provider, {
869
+ value: tabsListContextValue,
870
+ children: /* @__PURE__ */ _jsx3(CompositeRoot, {
871
+ render,
872
+ className,
873
+ style,
874
+ state,
875
+ refs: [forwardedRef, setTabsListElement],
876
+ props: [defaultProps, elementProps],
877
+ stateAttributesMapping: tabsStateAttributesMapping,
878
+ highlightedIndex: highlightedTabIndex,
879
+ enableHomeAndEndKeys: true,
880
+ loopFocus,
881
+ orientation,
882
+ onHighlightedIndexChange: setHighlightedTabIndex,
883
+ onMapChange: setTabMap,
884
+ disabledIndices: EMPTY_ARRAY
885
+ })
886
+ });
887
+ });
888
+ if (true)
889
+ TabsList.displayName = "TabsList";
890
+ export {
891
+ exports_index_parts as Tabs
892
+ };