@ox0/ui 0.1.0 → 0.2.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 (102) hide show
  1. package/dist/components/accordion.d.ts +49 -0
  2. package/dist/components/accordion.d.ts.map +1 -0
  3. package/dist/components/accordion.test.d.ts +2 -0
  4. package/dist/components/accordion.test.d.ts.map +1 -0
  5. package/dist/components/badge.d.ts +31 -0
  6. package/dist/components/badge.d.ts.map +1 -0
  7. package/dist/components/banner.d.ts +22 -0
  8. package/dist/components/banner.d.ts.map +1 -0
  9. package/dist/components/box.d.ts +12 -0
  10. package/dist/components/box.d.ts.map +1 -0
  11. package/dist/components/button-group.d.ts +13 -0
  12. package/dist/components/button-group.d.ts.map +1 -0
  13. package/dist/components/button.d.ts +58 -0
  14. package/dist/components/button.d.ts.map +1 -0
  15. package/dist/components/caption.d.ts +14 -0
  16. package/dist/components/caption.d.ts.map +1 -0
  17. package/dist/components/card.d.ts +23 -0
  18. package/dist/components/card.d.ts.map +1 -0
  19. package/dist/components/checkbox.d.ts +12 -0
  20. package/dist/components/checkbox.d.ts.map +1 -0
  21. package/dist/components/code-block.d.ts +8 -0
  22. package/dist/components/code-block.d.ts.map +1 -0
  23. package/dist/components/code.d.ts +6 -0
  24. package/dist/components/code.d.ts.map +1 -0
  25. package/dist/components/dialog.d.ts +8 -0
  26. package/dist/components/dialog.d.ts.map +1 -0
  27. package/dist/components/disclosure-triangle.d.ts +7 -0
  28. package/dist/components/disclosure-triangle.d.ts.map +1 -0
  29. package/dist/components/divider.d.ts +9 -0
  30. package/dist/components/divider.d.ts.map +1 -0
  31. package/dist/components/heading.d.ts +11 -0
  32. package/dist/components/heading.d.ts.map +1 -0
  33. package/dist/components/icon-button.d.ts +19 -0
  34. package/dist/components/icon-button.d.ts.map +1 -0
  35. package/dist/components/icon-label.d.ts +23 -0
  36. package/dist/components/icon-label.d.ts.map +1 -0
  37. package/dist/components/keyboard.d.ts +6 -0
  38. package/dist/components/keyboard.d.ts.map +1 -0
  39. package/dist/components/label.d.ts +16 -0
  40. package/dist/components/label.d.ts.map +1 -0
  41. package/dist/components/link.d.ts +47 -0
  42. package/dist/components/link.d.ts.map +1 -0
  43. package/dist/components/link.test.d.ts +2 -0
  44. package/dist/components/link.test.d.ts.map +1 -0
  45. package/dist/components/numeric.d.ts +13 -0
  46. package/dist/components/numeric.d.ts.map +1 -0
  47. package/dist/components/popover.d.ts +19 -0
  48. package/dist/components/popover.d.ts.map +1 -0
  49. package/dist/components/select.d.ts +20 -0
  50. package/dist/components/select.d.ts.map +1 -0
  51. package/dist/components/spinner.d.ts +21 -0
  52. package/dist/components/spinner.d.ts.map +1 -0
  53. package/dist/components/surface.d.ts +25 -0
  54. package/dist/components/surface.d.ts.map +1 -0
  55. package/dist/components/switch.d.ts +12 -0
  56. package/dist/components/switch.d.ts.map +1 -0
  57. package/dist/components/text-area.d.ts +15 -0
  58. package/dist/components/text-area.d.ts.map +1 -0
  59. package/dist/components/text-field.d.ts +11 -0
  60. package/dist/components/text-field.d.ts.map +1 -0
  61. package/dist/components/text.d.ts +43 -0
  62. package/dist/components/text.d.ts.map +1 -0
  63. package/dist/components/toast.d.ts +28 -0
  64. package/dist/components/toast.d.ts.map +1 -0
  65. package/dist/components/tooltip-manager.d.ts +15 -0
  66. package/dist/components/tooltip-manager.d.ts.map +1 -0
  67. package/dist/components/tooltip.d.ts +17 -0
  68. package/dist/components/tooltip.d.ts.map +1 -0
  69. package/dist/index.d.ts +38 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +2235 -163
  72. package/dist/layout/grid.d.ts +29 -0
  73. package/dist/layout/grid.d.ts.map +1 -0
  74. package/dist/layout/inline.d.ts +19 -0
  75. package/dist/layout/inline.d.ts.map +1 -0
  76. package/dist/layout/split.d.ts +12 -0
  77. package/dist/layout/split.d.ts.map +1 -0
  78. package/dist/layout/stack.d.ts +15 -0
  79. package/dist/layout/stack.d.ts.map +1 -0
  80. package/dist/mixins/aria.d.ts +14 -0
  81. package/dist/mixins/aria.d.ts.map +1 -0
  82. package/dist/mixins/borders.d.ts +27 -0
  83. package/dist/mixins/borders.d.ts.map +1 -0
  84. package/dist/mixins/flex-item.d.ts +30 -0
  85. package/dist/mixins/flex-item.d.ts.map +1 -0
  86. package/dist/mixins/grid-item.d.ts +14 -0
  87. package/dist/mixins/grid-item.d.ts.map +1 -0
  88. package/dist/mixins/index.d.ts +9 -0
  89. package/dist/mixins/index.d.ts.map +1 -0
  90. package/dist/mixins/placement.d.ts +20 -0
  91. package/dist/mixins/placement.d.ts.map +1 -0
  92. package/dist/mixins/sizing.d.ts +30 -0
  93. package/dist/mixins/sizing.d.ts.map +1 -0
  94. package/dist/mixins/spacing.d.ts +27 -0
  95. package/dist/mixins/spacing.d.ts.map +1 -0
  96. package/dist/mixins/surface.d.ts +16 -0
  97. package/dist/mixins/surface.d.ts.map +1 -0
  98. package/dist/providers/ox0-provider.d.ts +47 -0
  99. package/dist/providers/ox0-provider.d.ts.map +1 -0
  100. package/dist/providers/router-context.d.ts +6 -0
  101. package/dist/providers/router-context.d.ts.map +1 -0
  102. package/package.json +10 -6
package/dist/index.js CHANGED
@@ -1,194 +1,2266 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__ from "@ox0/hooks";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__ from "@floating-ui/react";
1
5
  import * as __WEBPACK_EXTERNAL_MODULE__ox0_i18n_ad8e896a__ from "@ox0/i18n";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__ox0_tokens_b8bc2fee__ from "@ox0/tokens";
2
7
  import "@ox0/tokens/styles.css";
3
- const sizeStyles = {
4
- lg: "0.875rem 1rem",
5
- md: "0.625rem 0.875rem",
6
- sm: "0.5rem 0.75rem"
7
- };
8
- const variantStyles = {
9
- ghost: {
10
- background: "transparent",
11
- border: "1px solid transparent",
12
- color: "var(--ox0-color-foreground)"
13
- },
14
- primary: {
15
- background: "var(--ox0-color-accent)",
16
- border: "1px solid var(--ox0-color-accent)",
17
- color: "white"
18
- },
19
- secondary: {
20
- background: "var(--ox0-color-surface)",
21
- border: "1px solid var(--ox0-color-border)",
22
- color: "var(--ox0-color-foreground)"
23
- }
8
+ const radiusMap = {
9
+ none: "0",
10
+ xs: "var(--ox0-radius-xs)",
11
+ sm: "var(--ox0-radius-sm)",
12
+ md: "var(--ox0-radius-md)",
13
+ lg: "var(--ox0-radius-lg)",
14
+ xl: "var(--ox0-radius-xl)",
15
+ "2xl": "var(--ox0-radius-2xl)",
16
+ full: "var(--ox0-radius-full)"
24
17
  };
25
- function Button({ children, size = "md", style, type = "button", variant = "secondary", ...props }) {
26
- return /*#__PURE__*/ React.createElement("button", {
27
- ...props,
18
+ const shadowMap = {
19
+ none: "none",
20
+ xs: "var(--ox0-shadow-xs)",
21
+ sm: "var(--ox0-shadow-sm)",
22
+ md: "var(--ox0-shadow-md)",
23
+ lg: "var(--ox0-shadow-lg)",
24
+ xl: "var(--ox0-shadow-xl)"
25
+ };
26
+ const useBorders = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
27
+ const style = {};
28
+ if (props.borderRadius) style.borderRadius = radiusMap[props.borderRadius];
29
+ if (props.shadow) style.boxShadow = shadowMap[props.shadow];
30
+ const hasAll = props.border;
31
+ const hasAny = hasAll ?? props.borderTop ?? props.borderRight ?? props.borderBottom ?? props.borderLeft;
32
+ if (hasAny) {
33
+ style.borderStyle = "solid";
34
+ style.borderColor = "var(--ox0-color-border)";
35
+ if (hasAll) style.borderWidth = "1px";
36
+ else {
37
+ style.borderTopWidth = props.borderTop ? "1px" : "0";
38
+ style.borderRightWidth = props.borderRight ? "1px" : "0";
39
+ style.borderBottomWidth = props.borderBottom ? "1px" : "0";
40
+ style.borderLeftWidth = props.borderLeft ? "1px" : "0";
41
+ }
42
+ }
43
+ return {
44
+ style
45
+ };
46
+ }, [
47
+ props.borderRadius,
48
+ props.shadow,
49
+ props.border,
50
+ props.borderTop,
51
+ props.borderRight,
52
+ props.borderBottom,
53
+ props.borderLeft
54
+ ]);
55
+ const alignSelfMap = {
56
+ auto: "auto",
57
+ start: "flex-start",
58
+ center: "center",
59
+ end: "flex-end",
60
+ stretch: "stretch",
61
+ baseline: "baseline"
62
+ };
63
+ const useFlexItem = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
64
+ const style = {};
65
+ if (void 0 !== props.flex) {
66
+ const grow = "number" == typeof props.flex ? props.flex : 1;
67
+ style.flex = `${grow} 1 0%`;
68
+ }
69
+ if (void 0 !== props.flexGrow) style.flexGrow = props.flexGrow;
70
+ if (void 0 !== props.flexShrink) style.flexShrink = props.flexShrink;
71
+ if (void 0 !== props.flexBasis) style.flexBasis = props.flexBasis;
72
+ if (void 0 !== props.alignSelf) style.alignSelf = alignSelfMap[props.alignSelf];
73
+ return {
74
+ style
75
+ };
76
+ }, [
77
+ props.flex,
78
+ props.flexGrow,
79
+ props.flexShrink,
80
+ props.flexBasis,
81
+ props.alignSelf
82
+ ]);
83
+ const useGridItem = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
84
+ const style = {};
85
+ if (void 0 !== props.gridArea) style.gridArea = props.gridArea;
86
+ return {
87
+ style
88
+ };
89
+ }, [
90
+ props.gridArea
91
+ ]);
92
+ const usePlacement = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
93
+ const style = {};
94
+ if (void 0 !== props.gridArea) style.gridArea = props.gridArea;
95
+ if (void 0 !== props.gridColumn) style.gridColumn = props.gridColumn;
96
+ if (void 0 !== props.gridRow) style.gridRow = props.gridRow;
97
+ if (void 0 !== props.order) style.order = props.order;
98
+ return {
99
+ style
100
+ };
101
+ }, [
102
+ props.gridArea,
103
+ props.gridColumn,
104
+ props.gridRow,
105
+ props.order
106
+ ]);
107
+ const maxWidthMap = {
108
+ xs: "var(--ox0-maxw-xs)",
109
+ sm: "var(--ox0-maxw-sm)",
110
+ md: "var(--ox0-maxw-md)",
111
+ lg: "var(--ox0-maxw-lg)",
112
+ xl: "var(--ox0-maxw-xl)",
113
+ content: "var(--ox0-maxw-content)",
114
+ prose: "var(--ox0-maxw-prose)",
115
+ full: "100%"
116
+ };
117
+ const resolveSize = (value)=>{
118
+ if (void 0 === value) return;
119
+ if ("number" == typeof value) return `${value}px`;
120
+ return value;
121
+ };
122
+ const isMaxWidthToken = (v)=>v in maxWidthMap;
123
+ const resolveMaxWidth = (value)=>{
124
+ if (void 0 === value) return;
125
+ if ("number" == typeof value) return `${value}px`;
126
+ if (isMaxWidthToken(value)) return maxWidthMap[value];
127
+ return value;
128
+ };
129
+ const useSizing = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
130
+ const style = {};
131
+ const width = resolveSize(props.width);
132
+ const minWidth = resolveSize(props.minWidth);
133
+ const maxWidth = resolveMaxWidth(props.maxWidth);
134
+ const height = resolveSize(props.height);
135
+ const minHeight = resolveSize(props.minHeight);
136
+ const maxHeight = resolveSize(props.maxHeight);
137
+ if (void 0 !== width) style.width = width;
138
+ if (void 0 !== minWidth) style.minWidth = minWidth;
139
+ if (void 0 !== maxWidth) style.maxWidth = maxWidth;
140
+ if (void 0 !== height) style.height = height;
141
+ if (void 0 !== minHeight) style.minHeight = minHeight;
142
+ if (void 0 !== maxHeight) style.maxHeight = maxHeight;
143
+ if (void 0 !== props.aspectRatio) style.aspectRatio = props.aspectRatio;
144
+ return {
145
+ style
146
+ };
147
+ }, [
148
+ props.width,
149
+ props.minWidth,
150
+ props.maxWidth,
151
+ props.height,
152
+ props.minHeight,
153
+ props.maxHeight,
154
+ props.aspectRatio
155
+ ]);
156
+ const spacingMap = {
157
+ none: "0",
158
+ "2xs": "var(--ox0-space-2xs)",
159
+ xs: "var(--ox0-space-xs)",
160
+ sm: "var(--ox0-space-sm)",
161
+ md: "var(--ox0-space-md)",
162
+ lg: "var(--ox0-space-lg)",
163
+ xl: "var(--ox0-space-xl)",
164
+ "2xl": "var(--ox0-space-2xl)",
165
+ "3xl": "var(--ox0-space-3xl)",
166
+ "4xl": "var(--ox0-space-4xl)"
167
+ };
168
+ const resolveSide = (side, axis, base)=>{
169
+ const token = side ?? axis ?? base;
170
+ return void 0 !== token ? spacingMap[token] : void 0;
171
+ };
172
+ const useSpacing = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
173
+ const style = {};
174
+ const pt = resolveSide(props.paddingTop, props.paddingY, props.padding);
175
+ const pr = resolveSide(props.paddingRight, props.paddingX, props.padding);
176
+ const pb = resolveSide(props.paddingBottom, props.paddingY, props.padding);
177
+ const pl = resolveSide(props.paddingLeft, props.paddingX, props.padding);
178
+ if (void 0 !== pt) style.paddingTop = pt;
179
+ if (void 0 !== pr) style.paddingRight = pr;
180
+ if (void 0 !== pb) style.paddingBottom = pb;
181
+ if (void 0 !== pl) style.paddingLeft = pl;
182
+ if (void 0 !== props.gap) style.gap = spacingMap[props.gap];
183
+ return {
184
+ style
185
+ };
186
+ }, [
187
+ props.padding,
188
+ props.paddingX,
189
+ props.paddingY,
190
+ props.paddingTop,
191
+ props.paddingRight,
192
+ props.paddingBottom,
193
+ props.paddingLeft,
194
+ props.gap
195
+ ]);
196
+ const surfaceMap = {
197
+ transparent: "transparent",
198
+ canvas: "var(--ox0-color-canvas)",
199
+ surface: "var(--ox0-color-surface)",
200
+ "surface-raised": "var(--ox0-color-surface-raised)",
201
+ "surface-sunken": "var(--ox0-color-surface-sunken)",
202
+ "accent-subtle": "var(--ox0-color-accent-subtle)",
203
+ "success-subtle": "var(--ox0-color-success-subtle)",
204
+ "warning-subtle": "var(--ox0-color-warning-subtle)",
205
+ "danger-subtle": "var(--ox0-color-danger-subtle)",
206
+ "info-subtle": "var(--ox0-color-info-subtle)"
207
+ };
208
+ const useSurface = (props)=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
209
+ const style = {};
210
+ if (props.surface) style.backgroundColor = surfaceMap[props.surface];
211
+ return {
212
+ style
213
+ };
214
+ }, [
215
+ props.surface
216
+ ]);
217
+ const disclosure_triangle_module = {
218
+ root: "root-K5WgfS",
219
+ sm: "sm-xYhR5U",
220
+ md: "md-KTvDRu",
221
+ lg: "lg-xA8hvF",
222
+ glyph: "glyph-aJntEn",
223
+ open: "open-JnCVCh"
224
+ };
225
+ const sizeClass = {
226
+ sm: disclosure_triangle_module.sm ?? "",
227
+ md: disclosure_triangle_module.md ?? "",
228
+ lg: disclosure_triangle_module.lg ?? ""
229
+ };
230
+ const disclosure_triangle_DisclosureTriangle = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ isOpen = false, size = "md" }, ref) {
231
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
232
+ ref: ref,
233
+ "aria-hidden": "true",
234
+ className: [
235
+ disclosure_triangle_module.root,
236
+ sizeClass[size],
237
+ isOpen ? disclosure_triangle_module.open : ""
238
+ ].filter(Boolean).join(" "),
239
+ "data-open": isOpen,
240
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
241
+ className: disclosure_triangle_module.glyph,
242
+ fill: "none",
243
+ stroke: "currentColor",
244
+ strokeLinecap: "round",
245
+ strokeLinejoin: "round",
246
+ strokeWidth: "2",
247
+ viewBox: "0 0 24 24",
248
+ xmlns: "http://www.w3.org/2000/svg",
249
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("polyline", {
250
+ points: "9 18 15 12 9 6"
251
+ })
252
+ })
253
+ });
254
+ });
255
+ const accordion_module = {
256
+ accordion: "accordion-qUGxLO",
257
+ bordered: "bordered-ImZNt4",
258
+ item: "item-T1OsUq",
259
+ heading: "heading-r2lh_N",
260
+ trigger: "trigger-aPJB4a",
261
+ panel: "panel-FuGklX",
262
+ open: "open-LotSGS",
263
+ panelInner: "panelInner-mOjdDX"
264
+ };
265
+ const AccordionContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(null);
266
+ const AccordionItemContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(null);
267
+ function Accordion({ children, variant = "bordered", multiple = false, defaultExpandedKeys = [], expandedKeys, onExpandedChange }) {
268
+ const [internalKeys, setInternalKeys] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([
269
+ ...defaultExpandedKeys
270
+ ]);
271
+ const isControlled = void 0 !== expandedKeys;
272
+ const activeKeys = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>isControlled ? expandedKeys ?? [] : multiple ? internalKeys : internalKeys.slice(0, 1), [
273
+ isControlled,
274
+ expandedKeys,
275
+ multiple,
276
+ internalKeys
277
+ ]);
278
+ const toggle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((id)=>{
279
+ const next = activeKeys.includes(id) ? activeKeys.filter((k)=>k !== id) : multiple ? [
280
+ ...activeKeys,
281
+ id
282
+ ] : [
283
+ id
284
+ ];
285
+ if (!isControlled) setInternalKeys(next);
286
+ onExpandedChange?.(next);
287
+ }, [
288
+ isControlled,
289
+ activeKeys,
290
+ multiple,
291
+ onExpandedChange
292
+ ]);
293
+ const isExpanded = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((id)=>activeKeys.includes(id), [
294
+ activeKeys
295
+ ]);
296
+ const ctx = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
297
+ isExpanded,
298
+ toggle
299
+ }), [
300
+ isExpanded,
301
+ toggle
302
+ ]);
303
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AccordionContext.Provider, {
304
+ value: ctx,
305
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
306
+ className: [
307
+ accordion_module.accordion,
308
+ accordion_module[variant]
309
+ ].join(" "),
310
+ children: children
311
+ })
312
+ });
313
+ }
314
+ function AccordionItem({ children, itemKey }) {
315
+ const accordion = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(AccordionContext);
316
+ if (!accordion) throw new Error("AccordionItem must be used inside Accordion");
317
+ const uid = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
318
+ const triggerId = `${uid}-trigger`;
319
+ const panelId = `${uid}-panel`;
320
+ const isExpanded = accordion.isExpanded(itemKey);
321
+ const toggle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>accordion.toggle(itemKey), [
322
+ accordion,
323
+ itemKey
324
+ ]);
325
+ const ctx = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
326
+ triggerId,
327
+ panelId,
328
+ isExpanded,
329
+ toggle
330
+ }), [
331
+ triggerId,
332
+ panelId,
333
+ isExpanded,
334
+ toggle
335
+ ]);
336
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AccordionItemContext.Provider, {
337
+ value: ctx,
338
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
339
+ className: accordion_module.item,
340
+ children: children
341
+ })
342
+ });
343
+ }
344
+ function AccordionHeader({ children, className, level = 3, style }) {
345
+ const item = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(AccordionItemContext);
346
+ if (!item) throw new Error("AccordionHeader must be used inside AccordionItem");
347
+ const { pressProps } = (0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.usePress)({
348
+ onPress: item.toggle
349
+ });
350
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)(`h${level}`, {
351
+ className: [
352
+ accordion_module.heading,
353
+ className
354
+ ].filter(Boolean).join(" "),
355
+ style
356
+ }, /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("button", {
357
+ id: item.triggerId,
358
+ "aria-controls": item.panelId,
359
+ "aria-expanded": item.isExpanded,
360
+ className: accordion_module.trigger,
361
+ type: "button",
362
+ ...pressProps,
363
+ children: [
364
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(disclosure_triangle_DisclosureTriangle, {
365
+ isOpen: item.isExpanded,
366
+ size: "sm"
367
+ }),
368
+ children
369
+ ]
370
+ }));
371
+ }
372
+ function AccordionPanel({ children }) {
373
+ const item = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(AccordionItemContext);
374
+ if (!item) throw new Error("AccordionPanel must be used inside AccordionItem");
375
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("section", {
376
+ id: item.panelId,
377
+ "aria-labelledby": item.triggerId,
378
+ className: [
379
+ accordion_module.panel,
380
+ item.isExpanded ? accordion_module.open : ""
381
+ ].filter(Boolean).join(" "),
382
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
383
+ className: accordion_module.panelInner,
384
+ children: children
385
+ })
386
+ });
387
+ }
388
+ const alignMap = {
389
+ start: "flex-start",
390
+ center: "center",
391
+ end: "flex-end",
392
+ stretch: "stretch",
393
+ baseline: "baseline"
394
+ };
395
+ const justifyMap = {
396
+ start: "flex-start",
397
+ center: "center",
398
+ end: "flex-end",
399
+ between: "space-between",
400
+ around: "space-around"
401
+ };
402
+ const inline_Inline = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, align = "center", justify = "start", wrap = true, as: Tag = "div", gap = "md", padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, gridArea }, ref) {
403
+ const { style: gridItemStyle } = useGridItem({
404
+ gridArea
405
+ });
406
+ const { style: spacingStyle } = useSpacing({
407
+ gap,
408
+ padding,
409
+ paddingX,
410
+ paddingY,
411
+ paddingTop,
412
+ paddingRight,
413
+ paddingBottom,
414
+ paddingLeft
415
+ });
416
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tag, {
417
+ ref: ref,
28
418
  style: {
29
- alignItems: "center",
30
- background: variantStyles[variant].background,
31
- border: variantStyles[variant].border,
32
- borderRadius: "var(--ox0-radius-md)",
33
- boxShadow: "var(--ox0-shadow-sm)",
34
- color: variantStyles[variant].color,
35
- cursor: "pointer",
36
- display: "inline-flex",
37
- font: "inherit",
38
- gap: "0.5rem",
39
- justifyContent: "center",
40
- lineHeight: 1.2,
41
- padding: sizeStyles[size],
42
- ...style
419
+ alignItems: alignMap[align],
420
+ display: "flex",
421
+ flexWrap: wrap ? "wrap" : "nowrap",
422
+ justifyContent: justifyMap[justify],
423
+ ...gridItemStyle,
424
+ ...spacingStyle
43
425
  },
44
- type: type
426
+ children: children
427
+ });
428
+ });
429
+ const banner_module = {
430
+ banner: "banner-Of0UoY",
431
+ neutral: "neutral-sD6Vvt",
432
+ info: "info-iDoz4Z",
433
+ success: "success-POasIG",
434
+ warning: "warning-KgTeFh",
435
+ danger: "danger-lQesqY",
436
+ icon: "icon-kvnUtG",
437
+ body: "body-ixgP7o",
438
+ title: "title-kJqFjS",
439
+ message: "message-tqoG6h",
440
+ actionButton: "actionButton-mlF1y2",
441
+ dismissButton: "dismissButton-X6Uinf"
442
+ };
443
+ const CloseIcon = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
444
+ "aria-hidden": "true",
445
+ fill: "none",
446
+ height: "12",
447
+ stroke: "currentColor",
448
+ strokeLinecap: "round",
449
+ strokeLinejoin: "round",
450
+ strokeWidth: "2",
451
+ viewBox: "0 0 12 12",
452
+ width: "12",
453
+ children: [
454
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
455
+ x1: "1",
456
+ y1: "1",
457
+ x2: "11",
458
+ y2: "11"
459
+ }),
460
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
461
+ x1: "11",
462
+ y1: "1",
463
+ x2: "1",
464
+ y2: "11"
465
+ })
466
+ ]
467
+ });
468
+ const ToneIcon = ({ tone })=>{
469
+ if ("neutral" === tone) return null;
470
+ if ("info" === tone) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
471
+ "aria-hidden": "true",
472
+ fill: "none",
473
+ height: "16",
474
+ stroke: "currentColor",
475
+ strokeLinecap: "round",
476
+ strokeLinejoin: "round",
477
+ strokeWidth: "2",
478
+ viewBox: "0 0 16 16",
479
+ width: "16",
480
+ children: [
481
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
482
+ cx: "8",
483
+ cy: "8",
484
+ r: "7"
485
+ }),
486
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
487
+ x1: "8",
488
+ x2: "8",
489
+ y1: "5",
490
+ y2: "5.01",
491
+ strokeWidth: "2.5"
492
+ }),
493
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
494
+ x1: "8",
495
+ x2: "8",
496
+ y1: "8",
497
+ y2: "11"
498
+ })
499
+ ]
500
+ });
501
+ if ("success" === tone) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
502
+ "aria-hidden": "true",
503
+ fill: "none",
504
+ height: "16",
505
+ stroke: "currentColor",
506
+ strokeLinecap: "round",
507
+ strokeLinejoin: "round",
508
+ strokeWidth: "2",
509
+ viewBox: "0 0 16 16",
510
+ width: "16",
511
+ children: [
512
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
513
+ cx: "8",
514
+ cy: "8",
515
+ r: "7"
516
+ }),
517
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("polyline", {
518
+ points: "5,8.5 7,10.5 11,6"
519
+ })
520
+ ]
521
+ });
522
+ if ("warning" === tone) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
523
+ "aria-hidden": "true",
524
+ fill: "none",
525
+ height: "16",
526
+ stroke: "currentColor",
527
+ strokeLinecap: "round",
528
+ strokeLinejoin: "round",
529
+ strokeWidth: "2",
530
+ viewBox: "0 0 16 16",
531
+ width: "16",
532
+ children: [
533
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
534
+ d: "M8 2L14.5 13H1.5Z"
535
+ }),
536
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
537
+ x1: "8",
538
+ x2: "8",
539
+ y1: "7",
540
+ y2: "9.5"
541
+ }),
542
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
543
+ x1: "8",
544
+ x2: "8",
545
+ y1: "11.5",
546
+ y2: "11.51",
547
+ strokeWidth: "2.5"
548
+ })
549
+ ]
550
+ });
551
+ if ("danger" === tone) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
552
+ "aria-hidden": "true",
553
+ fill: "none",
554
+ height: "16",
555
+ stroke: "currentColor",
556
+ strokeLinecap: "round",
557
+ strokeLinejoin: "round",
558
+ strokeWidth: "2",
559
+ viewBox: "0 0 16 16",
560
+ width: "16",
561
+ children: [
562
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
563
+ cx: "8",
564
+ cy: "8",
565
+ r: "7"
566
+ }),
567
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
568
+ x1: "5.5",
569
+ x2: "10.5",
570
+ y1: "5.5",
571
+ y2: "10.5"
572
+ }),
573
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
574
+ x1: "10.5",
575
+ x2: "5.5",
576
+ y1: "5.5",
577
+ y2: "10.5"
578
+ })
579
+ ]
580
+ });
581
+ return null;
582
+ };
583
+ const banner_Banner = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, dismissLabel = "Dismiss", onDismiss, action, title, tone = "neutral" }, ref) {
584
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
585
+ ref: ref,
586
+ className: [
587
+ banner_module.banner,
588
+ banner_module[tone],
589
+ className
590
+ ].filter(Boolean).join(" "),
591
+ role: "note",
592
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(inline_Inline, {
593
+ gap: "sm",
594
+ align: "start",
595
+ wrap: false,
596
+ children: [
597
+ "neutral" !== tone && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
598
+ className: banner_module.icon,
599
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToneIcon, {
600
+ tone: tone
601
+ })
602
+ }),
603
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
604
+ className: banner_module.body,
605
+ children: [
606
+ title && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
607
+ className: banner_module.title,
608
+ children: title
609
+ }),
610
+ null != children && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
611
+ className: banner_module.message,
612
+ children: children
613
+ }),
614
+ action && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
615
+ className: banner_module.actionButton,
616
+ type: "button",
617
+ onClick: action.onPress,
618
+ children: action.label
619
+ })
620
+ ]
621
+ }),
622
+ onDismiss && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
623
+ "aria-label": dismissLabel,
624
+ className: banner_module.dismissButton,
625
+ type: "button",
626
+ onClick: onDismiss,
627
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CloseIcon, {})
628
+ })
629
+ ]
630
+ })
631
+ });
632
+ });
633
+ const badge_module = {
634
+ badge: "badge-t1VHUm",
635
+ xs: "xs-eft47d",
636
+ sm: "sm-DV14Km",
637
+ md: "md-RI_xI8",
638
+ closable: "closable-BgA3ET",
639
+ neutral: "neutral-RWoxfc",
640
+ info: "info-u7K2Np",
641
+ success: "success-iwwfIM",
642
+ warning: "warning-DpTjBW",
643
+ danger: "danger-aVQUy6",
644
+ positive: "positive-HCX6pY",
645
+ negative: "negative-yw6KhL",
646
+ pressContent: "pressContent-PByWwy",
647
+ dismissButton: "dismissButton-mKuVWx"
648
+ };
649
+ const DismissIcon = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
650
+ "aria-hidden": "true",
651
+ fill: "none",
652
+ height: "10",
653
+ stroke: "currentColor",
654
+ strokeWidth: "2",
655
+ viewBox: "0 0 10 10",
656
+ width: "10",
657
+ children: [
658
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
659
+ x1: "2",
660
+ x2: "8",
661
+ y1: "2",
662
+ y2: "8"
663
+ }),
664
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
665
+ x1: "8",
666
+ x2: "2",
667
+ y1: "2",
668
+ y2: "8"
669
+ })
670
+ ]
671
+ });
672
+ const badge_Badge = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, dismissLabel = "Dismiss", onDismiss, onPress, size = "sm", tone = "neutral", variant = "subtle" }, ref) {
673
+ const { pressProps } = (0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.usePress)({
674
+ onPress
675
+ });
676
+ const { pressProps: dismissPressProps } = (0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.usePress)({
677
+ onPress: onDismiss ? ()=>onDismiss() : void 0
678
+ });
679
+ const cls = [
680
+ badge_module.badge,
681
+ badge_module[tone],
682
+ badge_module[size],
683
+ onDismiss && badge_module.closable,
684
+ className
685
+ ].filter(Boolean).join(" ");
686
+ const dismissButton = onDismiss ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
687
+ "aria-label": dismissLabel,
688
+ className: badge_module.dismissButton,
689
+ type: "button",
690
+ ...dismissPressProps,
691
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DismissIcon, {})
692
+ }) : null;
693
+ if (onPress && onDismiss) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("span", {
694
+ ref: ref,
695
+ "data-variant": variant,
696
+ className: cls,
697
+ children: [
698
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
699
+ className: badge_module.pressContent,
700
+ type: "button",
701
+ ...pressProps,
702
+ children: children
703
+ }),
704
+ dismissButton
705
+ ]
706
+ });
707
+ if (onPress) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)("button", {
708
+ ref,
709
+ "data-variant": variant,
710
+ className: cls,
711
+ type: "button",
712
+ ...pressProps
45
713
  }, children);
46
- }
47
- function Checkbox({ label, ...props }) {
48
- return /*#__PURE__*/ React.createElement("label", {
714
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("span", {
715
+ ref: ref,
716
+ "data-variant": variant,
717
+ className: cls,
718
+ children: [
719
+ children,
720
+ dismissButton
721
+ ]
722
+ });
723
+ });
724
+ const box_Box = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, as: Tag = "div", className, gap, padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, borderRadius, shadow, border, borderTop, borderRight, borderBottom, borderLeft, surface, gridArea }, ref) {
725
+ const { style: gridItemStyle } = useGridItem({
726
+ gridArea
727
+ });
728
+ const { style: spacingStyle } = useSpacing({
729
+ gap,
730
+ padding,
731
+ paddingX,
732
+ paddingY,
733
+ paddingTop,
734
+ paddingRight,
735
+ paddingBottom,
736
+ paddingLeft
737
+ });
738
+ const { style: bordersStyle } = useBorders({
739
+ borderRadius,
740
+ shadow,
741
+ border,
742
+ borderTop,
743
+ borderRight,
744
+ borderBottom,
745
+ borderLeft
746
+ });
747
+ const { style: surfaceStyle } = useSurface({
748
+ surface
749
+ });
750
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tag, {
751
+ ref: ref,
752
+ className: className,
49
753
  style: {
50
- alignItems: "center",
51
- display: "inline-flex",
52
- gap: "0.5rem"
53
- }
54
- }, /*#__PURE__*/ React.createElement("input", {
55
- ...props,
56
- type: "checkbox"
57
- }), label ? /*#__PURE__*/ React.createElement("span", null, label) : null);
58
- }
59
- function Dialog({ children, footer, isOpen, title }) {
60
- if (!isOpen) return null;
61
- return /*#__PURE__*/ React.createElement("div", {
754
+ ...gridItemStyle,
755
+ ...spacingStyle,
756
+ ...bordersStyle,
757
+ ...surfaceStyle
758
+ },
759
+ children: children
760
+ });
761
+ });
762
+ const card_module = {
763
+ card: "card-HAsVif",
764
+ header: "header-EoCwVt",
765
+ body: "body-UmIYhr",
766
+ footer: "footer-zBL2Cb"
767
+ };
768
+ const card_Card = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, footer, header, padding = "lg", surface = "surface", borderRadius = "lg", shadow = "sm", as }, ref) {
769
+ const sectionStyle = {
770
+ padding: "none" === padding ? "0" : `var(--ox0-space-${padding})`
771
+ };
772
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(box_Box, {
773
+ ref: ref,
774
+ border: true,
775
+ borderRadius: borderRadius,
776
+ className: [
777
+ card_module.card,
778
+ className
779
+ ].filter(Boolean).join(" "),
780
+ shadow: shadow,
781
+ surface: surface,
782
+ as: as,
783
+ children: [
784
+ null != header && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
785
+ className: card_module.header,
786
+ style: sectionStyle,
787
+ children: header
788
+ }),
789
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
790
+ className: card_module.body,
791
+ style: sectionStyle,
792
+ children: children
793
+ }),
794
+ null != footer && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
795
+ className: card_module.footer,
796
+ style: sectionStyle,
797
+ children: footer
798
+ })
799
+ ]
800
+ });
801
+ });
802
+ const surface_Surface = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, surface, borderRadius, shadow, border, padding, paddingX, paddingY, as, className }, ref) {
803
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(box_Box, {
804
+ ref: ref,
805
+ border: border,
806
+ borderRadius: borderRadius,
807
+ className: className,
808
+ padding: padding,
809
+ paddingX: paddingX,
810
+ paddingY: paddingY,
811
+ shadow: shadow,
812
+ surface: surface,
813
+ as: as,
814
+ children: children
815
+ });
816
+ });
817
+ const text_module = {
818
+ text: "text-ojiRZM",
819
+ display: "display-FqY2br",
820
+ "heading-lg": "heading-lg-sGfoZF",
821
+ headingLg: "heading-lg-sGfoZF",
822
+ heading: "heading-udDMTP",
823
+ "heading-sm": "heading-sm-pEPDma",
824
+ headingSm: "heading-sm-pEPDma",
825
+ body: "body-YOwBr4",
826
+ "body-sm": "body-sm-IYrNKl",
827
+ bodySm: "body-sm-IYrNKl",
828
+ label: "label-gX6o1x",
829
+ caption: "caption-F0inTg",
830
+ numeric: "numeric-lD47Jl",
831
+ code: "code-chvwDx",
832
+ foreground: "foreground-dzHYHe",
833
+ muted: "muted-zeNDqn",
834
+ accent: "accent-ah7uAs",
835
+ success: "success-sVYlMj",
836
+ warning: "warning-na51J9",
837
+ danger: "danger-AufKYd",
838
+ inherit: "inherit-gJHLfJ",
839
+ truncate: "truncate-qrGgXB",
840
+ "align-left": "align-left-UPkxat",
841
+ alignLeft: "align-left-UPkxat",
842
+ "align-center": "align-center-_fPJYn",
843
+ alignCenter: "align-center-_fPJYn",
844
+ "align-right": "align-right-uScNpc",
845
+ alignRight: "align-right-uScNpc"
846
+ };
847
+ const caption_Caption = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ as: Element = "span", children, className, color = "muted", id, lineClamp, truncate, ...props }, ref) {
848
+ const inlineStyle = {};
849
+ if (void 0 !== lineClamp) {
850
+ inlineStyle.display = "-webkit-box";
851
+ inlineStyle.WebkitLineClamp = lineClamp;
852
+ inlineStyle.WebkitBoxOrient = "vertical";
853
+ inlineStyle.overflow = "hidden";
854
+ }
855
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)(Element, {
856
+ ref,
857
+ id,
858
+ className: [
859
+ text_module.text,
860
+ text_module.caption,
861
+ text_module[color],
862
+ truncate && !lineClamp ? text_module.truncate : void 0,
863
+ className
864
+ ].filter(Boolean).join(" "),
865
+ style: Object.keys(inlineStyle).length > 0 ? inlineStyle : void 0,
866
+ ...props
867
+ }, children);
868
+ });
869
+ const code_Code = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children }, ref) {
870
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("code", {
871
+ ref: ref,
62
872
  style: {
63
- alignItems: "center",
64
- background: "rgb(16 32 51 / 0.4)",
65
- display: "grid",
66
- inset: 0,
67
- padding: "1.5rem",
68
- position: "fixed"
69
- }
70
- }, /*#__PURE__*/ React.createElement("dialog", {
71
- "aria-modal": "true",
72
- open: true,
873
+ fontFamily: "var(--ox0-font-mono)",
874
+ fontSize: "0.875em",
875
+ fontWeight: "var(--ox0-font-weight-normal)",
876
+ padding: "0.15em 0.35em",
877
+ background: "var(--ox0-color-canvas)",
878
+ border: "1px solid var(--ox0-color-border-subtle)",
879
+ borderRadius: "var(--ox0-radius-sm)",
880
+ color: "var(--ox0-color-accent-text)"
881
+ },
882
+ children: children
883
+ });
884
+ });
885
+ const code_block_CodeBlock = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, language }, ref) {
886
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("pre", {
887
+ ref: ref,
888
+ "data-language": language,
73
889
  style: {
74
- background: "var(--ox0-color-surface)",
75
- border: "1px solid var(--ox0-color-border)",
890
+ fontFamily: "var(--ox0-font-mono)",
891
+ fontSize: "0.875em",
892
+ lineHeight: "var(--ox0-line-height-relaxed)",
893
+ padding: "var(--ox0-space-md)",
894
+ background: "var(--ox0-color-surface-sunken)",
895
+ border: "1px solid var(--ox0-color-border-subtle)",
76
896
  borderRadius: "var(--ox0-radius-md)",
77
- boxShadow: "0 20px 40px rgb(16 32 51 / 0.15)",
78
- display: "grid",
79
- gap: "1rem",
80
- margin: "0 auto",
81
- maxWidth: "32rem",
82
- padding: "1rem",
83
- width: "100%"
84
- }
85
- }, title ? /*#__PURE__*/ React.createElement("strong", null, title) : null, /*#__PURE__*/ React.createElement("div", null, children), footer ? /*#__PURE__*/ React.createElement("div", null, footer) : null));
86
- }
87
- function IconButton({ icon, ...props }) {
88
- return /*#__PURE__*/ React.createElement(Button, props, icon);
89
- }
90
- function Popover({ children, isOpen }) {
91
- if (!isOpen) return null;
92
- return /*#__PURE__*/ React.createElement("div", {
897
+ overflowX: "auto",
898
+ margin: 0
899
+ },
900
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("code", {
901
+ className: language ? `language-${language}` : void 0,
902
+ children: children
903
+ })
904
+ });
905
+ });
906
+ const keyboard_Keyboard = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children }, ref) {
907
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("kbd", {
908
+ ref: ref,
93
909
  style: {
910
+ display: "inline-block",
911
+ fontFamily: "var(--ox0-font-mono)",
912
+ fontSize: "var(--ox0-font-size-xs)",
913
+ fontWeight: "var(--ox0-font-weight-medium)",
914
+ lineHeight: 1,
915
+ padding: "0.2em 0.45em",
94
916
  background: "var(--ox0-color-surface)",
95
917
  border: "1px solid var(--ox0-color-border)",
96
- borderRadius: "var(--ox0-radius-md)",
97
- boxShadow: "0 16px 32px rgb(16 32 51 / 0.12)",
98
- padding: "0.75rem"
99
- }
918
+ borderBottomWidth: "2px",
919
+ borderRadius: "var(--ox0-radius-sm)",
920
+ color: "var(--ox0-color-foreground)",
921
+ whiteSpace: "nowrap"
922
+ },
923
+ children: children
924
+ });
925
+ });
926
+ const label_Label = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ as: Element = "label", children, className, color = "muted", htmlFor, id, truncate, ...props }, ref) {
927
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)(Element, {
928
+ ref,
929
+ htmlFor: "label" === Element ? htmlFor : void 0,
930
+ id,
931
+ className: [
932
+ text_module.text,
933
+ text_module.label,
934
+ text_module[color],
935
+ truncate ? text_module.truncate : void 0,
936
+ className
937
+ ].filter(Boolean).join(" "),
938
+ ...props
100
939
  }, children);
940
+ });
941
+ const numeric_Numeric = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ align, children, className, color = "foreground", id, truncate, ...props }, ref) {
942
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
943
+ ref: ref,
944
+ id: id,
945
+ className: [
946
+ text_module.text,
947
+ text_module.numeric,
948
+ text_module[color],
949
+ align ? text_module[`align-${align}`] : void 0,
950
+ truncate ? text_module.truncate : void 0,
951
+ className
952
+ ].filter(Boolean).join(" "),
953
+ ...props,
954
+ children: children
955
+ });
956
+ });
957
+ function createTextStyles(textStyles) {
958
+ const vars = {};
959
+ for (const [variant, style] of Object.entries(textStyles))if (!!style) {
960
+ if (void 0 !== style.size) vars[`--ox0-text-${variant}-size`] = style.size;
961
+ if (void 0 !== style.weight) vars[`--ox0-text-${variant}-weight`] = style.weight;
962
+ if (void 0 !== style.leading) vars[`--ox0-text-${variant}-leading`] = style.leading;
963
+ if (void 0 !== style.tracking) vars[`--ox0-text-${variant}-tracking`] = style.tracking;
964
+ if (void 0 !== style.transform) vars[`--ox0-text-${variant}-transform`] = style.transform;
965
+ }
966
+ return vars;
101
967
  }
102
- function Switch({ label, ...props }) {
103
- const ariaChecked = "boolean" == typeof props.checked ? props.checked : "boolean" == typeof props.defaultChecked ? props.defaultChecked : false;
104
- return /*#__PURE__*/ React.createElement("label", {
105
- style: {
106
- alignItems: "center",
107
- display: "inline-flex",
108
- gap: "0.5rem"
109
- }
110
- }, /*#__PURE__*/ React.createElement("input", {
968
+ const defaultElement = {
969
+ display: "p",
970
+ "heading-lg": "h2",
971
+ heading: "h3",
972
+ "heading-sm": "h4",
973
+ body: "p",
974
+ "body-sm": "p",
975
+ label: "span",
976
+ caption: "span",
977
+ numeric: "span",
978
+ code: "code"
979
+ };
980
+ const defaultWrap = {
981
+ display: "balance",
982
+ "heading-lg": "balance",
983
+ heading: "balance",
984
+ "heading-sm": "balance"
985
+ };
986
+ const defaultColor = {
987
+ display: "foreground",
988
+ "heading-lg": "foreground",
989
+ heading: "foreground",
990
+ "heading-sm": "foreground",
991
+ body: "foreground",
992
+ "body-sm": "foreground",
993
+ label: "muted",
994
+ caption: "muted",
995
+ numeric: "foreground",
996
+ code: "foreground"
997
+ };
998
+ const text_Text = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ align, as, children, className, color, id, lineClamp, truncate = false, variant = "body", wrap, ...props }, ref) {
999
+ const Element = as ?? defaultElement[variant];
1000
+ const resolvedColor = color ?? defaultColor[variant];
1001
+ const resolvedWrap = wrap ?? defaultWrap[variant];
1002
+ const inlineStyle = {};
1003
+ if (resolvedWrap) inlineStyle.textWrap = resolvedWrap;
1004
+ if (void 0 !== lineClamp) {
1005
+ inlineStyle.display = "-webkit-box";
1006
+ inlineStyle.WebkitLineClamp = lineClamp;
1007
+ inlineStyle.WebkitBoxOrient = "vertical";
1008
+ inlineStyle.overflow = "hidden";
1009
+ }
1010
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Element, {
1011
+ ref: ref,
1012
+ id: id,
1013
+ className: [
1014
+ text_module.text,
1015
+ text_module[variant],
1016
+ text_module[resolvedColor],
1017
+ align ? text_module[`align-${align}`] : void 0,
1018
+ truncate && !lineClamp ? text_module.truncate : void 0,
1019
+ className
1020
+ ].filter(Boolean).join(" "),
1021
+ style: Object.keys(inlineStyle).length > 0 ? inlineStyle : void 0,
111
1022
  ...props,
112
- "aria-checked": ariaChecked,
113
- role: "switch",
114
- type: "checkbox"
115
- }), label ? /*#__PURE__*/ React.createElement("span", null, label) : null);
1023
+ children: children
1024
+ });
1025
+ });
1026
+ const button_module = {
1027
+ button: "button-gV6kKp",
1028
+ sm: "sm-l24p0Q",
1029
+ md: "md-tnc3LH",
1030
+ lg: "lg-DJZrEA",
1031
+ primary: "primary-VXuTnQ",
1032
+ pressed: "pressed-egzbhE",
1033
+ secondary: "secondary-yGEbH1",
1034
+ circle: "circle-Hk06Xp",
1035
+ ghost: "ghost-jToGzF",
1036
+ flat: "flat-WzquwN",
1037
+ danger: "danger-S8YoTI",
1038
+ "danger-secondary": "danger-secondary-SKDzBf",
1039
+ dangerSecondary: "danger-secondary-SKDzBf",
1040
+ inline: "inline-gS_3vk",
1041
+ hinted: "hinted-IDtzxY",
1042
+ selected: "selected-ndu0qD",
1043
+ hasIcon: "hasIcon-AtG6pQ",
1044
+ hasIconEnd: "hasIconEnd-PZ2yhA"
1045
+ };
1046
+ const iconSize = {
1047
+ sm: 14,
1048
+ md: 16,
1049
+ lg: 20
1050
+ };
1051
+ const MIN_PRESS_MS = 150;
1052
+ function useMinPressDuration(isPressed) {
1053
+ const [isVisuallyPressed, setIsVisuallyPressed] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
1054
+ const pressStartRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(0);
1055
+ const timeoutRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(void 0);
1056
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
1057
+ if (isPressed) {
1058
+ clearTimeout(timeoutRef.current);
1059
+ pressStartRef.current = Date.now();
1060
+ setIsVisuallyPressed(true);
1061
+ } else {
1062
+ const remaining = MIN_PRESS_MS - (Date.now() - pressStartRef.current);
1063
+ if (remaining > 0) timeoutRef.current = setTimeout(()=>setIsVisuallyPressed(false), remaining);
1064
+ else setIsVisuallyPressed(false);
1065
+ }
1066
+ return ()=>clearTimeout(timeoutRef.current);
1067
+ }, [
1068
+ isPressed
1069
+ ]);
1070
+ return isVisuallyPressed;
116
1071
  }
117
- function TextField({ description, errorMessage, id, label, style, ...props }) {
118
- return /*#__PURE__*/ React.createElement("div", {
119
- style: {
120
- color: "var(--ox0-color-foreground)",
121
- display: "grid",
122
- fontSize: "0.875rem",
123
- gap: "0.375rem"
1072
+ const button_Button = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, icon: Icon, iconEnd: IconEnd, isDisabled, isSelected, onPress, onPressStart, onPressEnd, onPressChange, onPressUp, onPointerEnter, onPointerLeave, size = "md", type = "button", variant = "secondary", ...rest }, ref) {
1073
+ const { pressProps, isPressed: isActuallyPressed } = (0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.usePress)({
1074
+ onPress,
1075
+ onPressStart,
1076
+ onPressEnd,
1077
+ onPressChange,
1078
+ onPressUp,
1079
+ isDisabled
1080
+ });
1081
+ const isPressed = useMinPressDuration(isActuallyPressed);
1082
+ const composedPointerEnter = onPointerEnter ? (e)=>{
1083
+ onPointerEnter(e);
1084
+ pressProps.onPointerEnter?.(e);
1085
+ } : pressProps.onPointerEnter;
1086
+ const composedPointerLeave = onPointerLeave ? (e)=>{
1087
+ onPointerLeave(e);
1088
+ pressProps.onPointerLeave?.(e);
1089
+ } : pressProps.onPointerLeave;
1090
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("button", {
1091
+ ref: ref,
1092
+ ...rest,
1093
+ ...pressProps,
1094
+ onPointerEnter: composedPointerEnter,
1095
+ onPointerLeave: composedPointerLeave,
1096
+ "aria-pressed": isSelected,
1097
+ className: [
1098
+ button_module.button,
1099
+ button_module[variant],
1100
+ button_module[size],
1101
+ isPressed && button_module.pressed,
1102
+ isSelected && button_module.selected,
1103
+ Icon && button_module.hasIcon,
1104
+ IconEnd && button_module.hasIconEnd,
1105
+ className
1106
+ ].filter(Boolean).join(" "),
1107
+ disabled: isDisabled,
1108
+ type: type,
1109
+ children: [
1110
+ Icon && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {
1111
+ size: iconSize[size]
1112
+ }),
1113
+ children,
1114
+ IconEnd && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconEnd, {
1115
+ size: iconSize[size]
1116
+ })
1117
+ ]
1118
+ });
1119
+ });
1120
+ const RouterContext = (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(null);
1121
+ function useRouter() {
1122
+ return (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(RouterContext);
1123
+ }
1124
+ const link_module = {
1125
+ link: "link-n3JkJ3",
1126
+ invalid: "invalid-uX0aiX",
1127
+ externalIcon: "externalIcon-XLLYBy"
1128
+ };
1129
+ const SAFE_HREF = /^(\/|\.\.?\/|#.+|https?:\/\/|mailto:|tel:)/i;
1130
+ function isValidTo(to) {
1131
+ return SAFE_HREF.test(to);
1132
+ }
1133
+ const ExternalIcon = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
1134
+ "aria-hidden": "true",
1135
+ className: link_module.externalIcon,
1136
+ fill: "none",
1137
+ height: "0.8em",
1138
+ stroke: "currentColor",
1139
+ strokeLinecap: "round",
1140
+ strokeLinejoin: "round",
1141
+ strokeWidth: "2",
1142
+ viewBox: "0 0 12 12",
1143
+ width: "0.8em",
1144
+ children: [
1145
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
1146
+ d: "M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7"
1147
+ }),
1148
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("polyline", {
1149
+ points: "8 1 11 1 11 4"
1150
+ }),
1151
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
1152
+ x1: "11",
1153
+ y1: "1",
1154
+ x2: "5",
1155
+ y2: "7"
1156
+ })
1157
+ ]
1158
+ });
1159
+ const link_Link = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, isExternal: isExternalProp, to, onClick, onPress, onPressStart, onPressEnd, onPressChange, onPressUp, ...rest }, ref) {
1160
+ const router = useRouter();
1161
+ const { pressProps } = (0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.usePress)({
1162
+ onPress,
1163
+ onPressStart,
1164
+ onPressEnd,
1165
+ onPressChange,
1166
+ onPressUp
1167
+ });
1168
+ if (!isValidTo(to)) {
1169
+ if ("production" !== process.env.NODE_ENV) console.error(`[ox0/ui] <Link> blocked unsafe or invalid \`to\`: "${to}". Accepted: /path, ./path, ../path, #fragment, https://, http://, mailto:, tel:. Bare "#" is not allowed. Rendering as <span>.`);
1170
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1171
+ className: [
1172
+ link_module.link,
1173
+ link_module.invalid,
1174
+ className
1175
+ ].filter(Boolean).join(" "),
1176
+ children: children
1177
+ });
1178
+ }
1179
+ const isExternal = isExternalProp ?? /^https?:\/\//.test(to);
1180
+ const { onClick: pressOnClick, ...spreadPressProps } = pressProps;
1181
+ function handleClick(e) {
1182
+ pressOnClick?.(e);
1183
+ onClick?.(e);
1184
+ if (e.defaultPrevented || isExternal) return;
1185
+ if (router) {
1186
+ e.preventDefault();
1187
+ router.navigate(to);
124
1188
  }
125
- }, label ? /*#__PURE__*/ React.createElement("label", {
126
- htmlFor: id
127
- }, label) : null, /*#__PURE__*/ React.createElement("input", {
128
- ...props,
129
- id: id,
130
- style: {
131
- background: "var(--ox0-color-surface)",
132
- border: "1px solid var(--ox0-color-border)",
133
- borderRadius: "var(--ox0-radius-md)",
134
- color: "var(--ox0-color-foreground)",
135
- font: "inherit",
136
- padding: "0.625rem 0.75rem",
137
- ...style
1189
+ }
1190
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("a", {
1191
+ ref: ref,
1192
+ ...rest,
1193
+ ...spreadPressProps,
1194
+ className: [
1195
+ link_module.link,
1196
+ className
1197
+ ].filter(Boolean).join(" "),
1198
+ href: to,
1199
+ onClick: handleClick,
1200
+ rel: isExternal ? "noopener noreferrer" : rest.rel,
1201
+ target: isExternal ? "_blank" : rest.target,
1202
+ children: [
1203
+ children,
1204
+ isExternal && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ExternalIcon, {})
1205
+ ]
1206
+ });
1207
+ });
1208
+ const button_group_module = {
1209
+ group: "group-KDa85S",
1210
+ touching: "touching-zJSk0m"
1211
+ };
1212
+ const button_group_ButtonGroup = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, isTouching = false }, ref) {
1213
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1214
+ ref: ref,
1215
+ className: [
1216
+ button_group_module.group,
1217
+ isTouching ? button_group_module.touching : ""
1218
+ ].filter(Boolean).join(" "),
1219
+ children: children
1220
+ });
1221
+ });
1222
+ const checkbox_module = {
1223
+ root: "root-ZfGmPt",
1224
+ label: "label-NpcnDS",
1225
+ disabled: "disabled-37Ma1q",
1226
+ input: "input-LnwEg8",
1227
+ error: "error-HlZR91"
1228
+ };
1229
+ function Checkbox({ label, isDisabled, isInvalid, isSelected, defaultSelected, errorMessage, onChange, id: idProp, ...props }) {
1230
+ const generatedId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
1231
+ const id = idProp ?? generatedId;
1232
+ const errorId = errorMessage ? `${id}-error` : void 0;
1233
+ const invalid = isInvalid || !!errorMessage;
1234
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1235
+ className: checkbox_module.root,
1236
+ children: [
1237
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("label", {
1238
+ className: `${checkbox_module.label}${isDisabled ? ` ${checkbox_module.disabled}` : ""}`,
1239
+ children: [
1240
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("input", {
1241
+ ...props,
1242
+ "aria-describedby": errorId,
1243
+ "aria-invalid": invalid || void 0,
1244
+ checked: isSelected,
1245
+ className: checkbox_module.input,
1246
+ defaultChecked: defaultSelected,
1247
+ disabled: isDisabled,
1248
+ id: id,
1249
+ onChange: (e)=>onChange?.(e.target.checked),
1250
+ type: "checkbox"
1251
+ }),
1252
+ label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1253
+ children: label
1254
+ }) : null
1255
+ ]
1256
+ }),
1257
+ errorMessage ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1258
+ className: checkbox_module.error,
1259
+ id: errorId,
1260
+ children: errorMessage
1261
+ }) : null
1262
+ ]
1263
+ });
1264
+ }
1265
+ const dialog_module = {
1266
+ overlay: "overlay-KCSdjX",
1267
+ dialog: "dialog-WXDUzL",
1268
+ title: "title-uK_Bbe"
1269
+ };
1270
+ function Dialog({ children, footer, isOpen, title }) {
1271
+ if (!isOpen) return null;
1272
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1273
+ className: dialog_module.overlay,
1274
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("dialog", {
1275
+ "aria-modal": "true",
1276
+ className: dialog_module.dialog,
1277
+ open: true,
1278
+ children: [
1279
+ title ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
1280
+ className: dialog_module.title,
1281
+ children: title
1282
+ }) : null,
1283
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1284
+ children: children
1285
+ }),
1286
+ footer ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1287
+ children: footer
1288
+ }) : null
1289
+ ]
1290
+ })
1291
+ });
1292
+ }
1293
+ const divider_module = {
1294
+ divider: "divider-kFs3jn",
1295
+ vertical: "vertical-zScVIz",
1296
+ subtle: "subtle-mZysM0",
1297
+ strong: "strong-pgJzla"
1298
+ };
1299
+ const divider_Divider = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ isVertical = false, tone = "default" }, ref) {
1300
+ const cls = [
1301
+ divider_module.divider,
1302
+ isVertical && divider_module.vertical,
1303
+ "default" !== tone && divider_module[tone]
1304
+ ].filter(Boolean).join(" ");
1305
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("hr", {
1306
+ ref: ref,
1307
+ "aria-orientation": isVertical ? "vertical" : "horizontal",
1308
+ className: cls
1309
+ });
1310
+ });
1311
+ const heading_module = {
1312
+ heading: "heading-gDgjx2",
1313
+ h1: "h1-HyQSOQ",
1314
+ h2: "h2-LFrWtM",
1315
+ h3: "h3-Q0U0vZ",
1316
+ anchor: "anchor-OEWzis"
1317
+ };
1318
+ const levelClass = {
1319
+ 1: heading_module.h1 ?? "",
1320
+ 2: heading_module.h2 ?? "",
1321
+ 3: heading_module.h3 ?? ""
1322
+ };
1323
+ const heading_Heading = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, className, id, level = 2 }, ref) {
1324
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createElement)(`h${level}`, {
1325
+ ref,
1326
+ id,
1327
+ className: [
1328
+ heading_module.heading,
1329
+ levelClass[level],
1330
+ className
1331
+ ].filter(Boolean).join(" ")
1332
+ }, /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
1333
+ children: [
1334
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1335
+ children: children
1336
+ }),
1337
+ id ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("a", {
1338
+ "aria-label": `Link to ${id}`,
1339
+ className: heading_module.anchor,
1340
+ href: `#${id}`,
1341
+ children: "#"
1342
+ }) : null
1343
+ ]
1344
+ }));
1345
+ });
1346
+ const WARMUP_MS = 1000;
1347
+ const COOLDOWN_MS = 500;
1348
+ let warm = false;
1349
+ let cooldownTimer = null;
1350
+ const tooltipManager = {
1351
+ getDelay () {
1352
+ return warm ? 0 : WARMUP_MS;
1353
+ },
1354
+ onOpen () {
1355
+ if (null !== cooldownTimer) {
1356
+ clearTimeout(cooldownTimer);
1357
+ cooldownTimer = null;
138
1358
  }
139
- }), description ? /*#__PURE__*/ React.createElement("span", {
140
- style: {
141
- color: "var(--ox0-color-muted)",
142
- fontSize: "0.75rem"
1359
+ warm = true;
1360
+ },
1361
+ onClose () {
1362
+ if (null !== cooldownTimer) clearTimeout(cooldownTimer);
1363
+ cooldownTimer = setTimeout(()=>{
1364
+ warm = false;
1365
+ cooldownTimer = null;
1366
+ }, COOLDOWN_MS);
1367
+ }
1368
+ };
1369
+ const tooltip_module = {
1370
+ tooltip: "tooltip-NkB3V8"
1371
+ };
1372
+ function Tooltip({ content, placement = "top", children, isDisabled = false }) {
1373
+ const [open, setOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
1374
+ const openTimerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1375
+ const isHoveringRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(false);
1376
+ const isFocusedRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(false);
1377
+ const clearOpenTimer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1378
+ if (null !== openTimerRef.current) {
1379
+ clearTimeout(openTimerRef.current);
1380
+ openTimerRef.current = null;
143
1381
  }
144
- }, description) : null, errorMessage ? /*#__PURE__*/ React.createElement("span", {
145
- style: {
146
- color: "#b42318",
147
- fontSize: "0.75rem"
1382
+ }, []);
1383
+ const { refs, floatingStyles, context } = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useFloating)({
1384
+ open,
1385
+ onOpenChange: (nextOpen)=>{
1386
+ if (!nextOpen) {
1387
+ clearOpenTimer();
1388
+ isHoveringRef.current = false;
1389
+ isFocusedRef.current = false;
1390
+ setOpen(false);
1391
+ tooltipManager.onClose();
1392
+ }
1393
+ },
1394
+ placement,
1395
+ middleware: [
1396
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.offset)(8),
1397
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.flip)(),
1398
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.shift)({
1399
+ padding: 8
1400
+ })
1401
+ ],
1402
+ whileElementsMounted: __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.autoUpdate
1403
+ });
1404
+ const dismiss = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useDismiss)(context, {
1405
+ referencePress: false
1406
+ });
1407
+ const role = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useRole)(context, {
1408
+ role: "tooltip"
1409
+ });
1410
+ const { getReferenceProps, getFloatingProps } = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useInteractions)([
1411
+ dismiss,
1412
+ role
1413
+ ]);
1414
+ const doOpen = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1415
+ clearOpenTimer();
1416
+ setOpen(true);
1417
+ tooltipManager.onOpen();
1418
+ }, [
1419
+ clearOpenTimer
1420
+ ]);
1421
+ const tryClose = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1422
+ if (!isHoveringRef.current && !isFocusedRef.current) {
1423
+ clearOpenTimer();
1424
+ setOpen(false);
1425
+ tooltipManager.onClose();
148
1426
  }
149
- }, errorMessage) : null);
150
- }
151
- function Grid({ children, columns = "repeat(auto-fit, minmax(12rem, 1fr))", gap = "var(--ox0-space-md)" }) {
152
- return /*#__PURE__*/ React.createElement("div", {
153
- style: {
154
- display: "grid",
155
- gap,
156
- gridTemplateColumns: columns
1427
+ }, [
1428
+ clearOpenTimer
1429
+ ]);
1430
+ const referenceProps = getReferenceProps({
1431
+ onPointerEnter (e) {
1432
+ if ("touch" === e.pointerType) return;
1433
+ if (isHoveringRef.current) return;
1434
+ isHoveringRef.current = true;
1435
+ const delay = tooltipManager.getDelay();
1436
+ if (0 === delay) doOpen();
1437
+ else openTimerRef.current = setTimeout(()=>{
1438
+ openTimerRef.current = null;
1439
+ doOpen();
1440
+ }, delay);
1441
+ },
1442
+ onPointerLeave () {
1443
+ isHoveringRef.current = false;
1444
+ tryClose();
1445
+ },
1446
+ onFocus () {
1447
+ if (!(0, __WEBPACK_EXTERNAL_MODULE__ox0_hooks_ab75bf8c__.isFocusVisible)()) return;
1448
+ isFocusedRef.current = true;
1449
+ clearOpenTimer();
1450
+ doOpen();
1451
+ },
1452
+ onBlur () {
1453
+ isFocusedRef.current = false;
1454
+ tryClose();
157
1455
  }
158
- }, children);
1456
+ });
1457
+ if (isDisabled) return children;
1458
+ const trigger = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.cloneElement)(children, {
1459
+ ref: refs.setReference,
1460
+ ...referenceProps
1461
+ });
1462
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
1463
+ children: [
1464
+ trigger,
1465
+ open && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.FloatingPortal, {
1466
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1467
+ ref: refs.setFloating,
1468
+ style: floatingStyles,
1469
+ className: tooltip_module.tooltip,
1470
+ ...getFloatingProps(),
1471
+ children: content
1472
+ })
1473
+ })
1474
+ ]
1475
+ });
159
1476
  }
160
- function Inline({ children, gap = "var(--ox0-space-md)" }) {
161
- return /*#__PURE__*/ React.createElement("div", {
162
- style: {
163
- alignItems: "center",
164
- display: "flex",
165
- flexWrap: "wrap",
166
- gap
167
- }
168
- }, children);
1477
+ function IconButton({ icon: Icon, label, size = "md", tooltipPlacement, variant = "circle", ...props }) {
1478
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tooltip, {
1479
+ content: label,
1480
+ placement: tooltipPlacement,
1481
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(button_Button, {
1482
+ ...props,
1483
+ "aria-label": label,
1484
+ size: size,
1485
+ variant: variant,
1486
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {
1487
+ size: iconSize[size]
1488
+ })
1489
+ })
1490
+ });
169
1491
  }
170
- function Split({ children }) {
171
- return /*#__PURE__*/ React.createElement("div", {
1492
+ const icon_label_IconLabel = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ icon: Icon, children }, ref) {
1493
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("span", {
1494
+ ref: ref,
172
1495
  style: {
173
1496
  alignItems: "center",
174
- display: "flex",
175
- gap: "var(--ox0-space-md)",
176
- justifyContent: "space-between"
1497
+ display: "inline-flex",
1498
+ gap: "var(--ox0-space-sm)"
1499
+ },
1500
+ children: [
1501
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {
1502
+ size: "1em"
1503
+ }),
1504
+ children
1505
+ ]
1506
+ });
1507
+ });
1508
+ const spinner_module = {
1509
+ spinner: "spinner-IvRx9r",
1510
+ track: "track-Lo7_17",
1511
+ indeterminate: "indeterminate-nkYXQ9",
1512
+ arc: "arc-DUVlPk",
1513
+ "spinner-rotate": "spinner-rotate-OVlhz7",
1514
+ spinnerRotate: "spinner-rotate-OVlhz7",
1515
+ "spinner-dash": "spinner-dash-euu6Fa",
1516
+ spinnerDash: "spinner-dash-euu6Fa",
1517
+ check: "check-nNnIkN",
1518
+ "check-draw": "check-draw-qyL748",
1519
+ checkDraw: "check-draw-qyL748",
1520
+ determinate: "determinate-WK75Ej"
1521
+ };
1522
+ const RADIUS = 10;
1523
+ const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
1524
+ const spinner_Spinner = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ progress, label, className }, ref) {
1525
+ const isDeterminate = void 0 !== progress;
1526
+ const isComplete = isDeterminate && progress >= 1;
1527
+ const arcLength = isDeterminate ? Math.max(0, Math.min(1, progress)) * CIRCUMFERENCE : void 0;
1528
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
1529
+ ref: ref,
1530
+ viewBox: "0 0 24 24",
1531
+ width: "1em",
1532
+ height: "1em",
1533
+ className: [
1534
+ spinner_module.spinner,
1535
+ isDeterminate ? spinner_module.determinate : spinner_module.indeterminate,
1536
+ className
1537
+ ].filter(Boolean).join(" "),
1538
+ ...label ? {
1539
+ role: "status",
1540
+ "aria-label": label
1541
+ } : {
1542
+ "aria-hidden": true
1543
+ },
1544
+ children: [
1545
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
1546
+ className: spinner_module.track,
1547
+ cx: "12",
1548
+ cy: "12",
1549
+ r: RADIUS,
1550
+ fill: "none",
1551
+ strokeWidth: "2.5"
1552
+ }),
1553
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
1554
+ className: spinner_module.arc,
1555
+ cx: "12",
1556
+ cy: "12",
1557
+ r: RADIUS,
1558
+ fill: "none",
1559
+ strokeWidth: "2.5",
1560
+ ...isDeterminate ? {
1561
+ strokeDasharray: `${arcLength} ${CIRCUMFERENCE}`,
1562
+ strokeDashoffset: 0
1563
+ } : {}
1564
+ }),
1565
+ isComplete && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
1566
+ className: spinner_module.check,
1567
+ d: "M7 12.5 L10.5 16 L17 8.5",
1568
+ fill: "none",
1569
+ strokeWidth: "2",
1570
+ strokeLinecap: "round",
1571
+ strokeLinejoin: "round"
1572
+ })
1573
+ ]
1574
+ });
1575
+ });
1576
+ const popover_module = {
1577
+ popover: "popover-ufn1fo"
1578
+ };
1579
+ function Popover({ content, placement = "bottom-start", children, isOpen: controlledOpen, onOpenChange }) {
1580
+ const [internalOpen, setInternalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
1581
+ const isControlled = void 0 !== controlledOpen;
1582
+ const open = isControlled ? controlledOpen : internalOpen;
1583
+ const handleOpenChange = (next)=>{
1584
+ if (!isControlled) setInternalOpen(next);
1585
+ onOpenChange?.(next);
1586
+ };
1587
+ const { refs, floatingStyles, context } = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useFloating)({
1588
+ open,
1589
+ onOpenChange: handleOpenChange,
1590
+ placement,
1591
+ middleware: [
1592
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.offset)(8),
1593
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.flip)(),
1594
+ (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.shift)({
1595
+ padding: 8
1596
+ })
1597
+ ],
1598
+ whileElementsMounted: __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.autoUpdate
1599
+ });
1600
+ const click = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useClick)(context);
1601
+ const dismiss = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useDismiss)(context);
1602
+ const role = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useRole)(context, {
1603
+ role: "dialog"
1604
+ });
1605
+ const { getReferenceProps, getFloatingProps } = (0, __WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.useInteractions)([
1606
+ click,
1607
+ dismiss,
1608
+ role
1609
+ ]);
1610
+ const trigger = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.cloneElement)(children, {
1611
+ ref: refs.setReference,
1612
+ ...getReferenceProps()
1613
+ });
1614
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
1615
+ children: [
1616
+ trigger,
1617
+ open && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.FloatingPortal, {
1618
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.FloatingFocusManager, {
1619
+ context: context,
1620
+ modal: false,
1621
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1622
+ ref: refs.setFloating,
1623
+ style: floatingStyles,
1624
+ className: popover_module.popover,
1625
+ ...getFloatingProps(),
1626
+ children: content
1627
+ })
1628
+ })
1629
+ })
1630
+ ]
1631
+ });
1632
+ }
1633
+ const toast_module = {
1634
+ region: "region-usSlIk",
1635
+ toastWrapper: "toastWrapper-sYOVI0",
1636
+ "toast-in": "toast-in-X29Xf4",
1637
+ toastIn: "toast-in-X29Xf4",
1638
+ exiting: "exiting-RcV5Ab",
1639
+ "toast-out": "toast-out-LqOm2R",
1640
+ toastOut: "toast-out-LqOm2R",
1641
+ toast: "toast-IaPMrq",
1642
+ neutral: "neutral-ud0XaK",
1643
+ info: "info-qCsWQF",
1644
+ success: "success-BjAK6q",
1645
+ warning: "warning-OKigu2",
1646
+ danger: "danger-LklBtF",
1647
+ body: "body-tmPCh0",
1648
+ message: "message-kZji67",
1649
+ description: "description-uROdxr",
1650
+ actions: "actions-NAScjf",
1651
+ actionButton: "actionButton-ju2Jqp",
1652
+ closeButton: "closeButton-Zka7v8"
1653
+ };
1654
+ function reducer(state, action) {
1655
+ switch(action.type){
1656
+ case "add":
1657
+ return [
1658
+ ...state,
1659
+ action.entry
1660
+ ];
1661
+ case "startExit":
1662
+ return state.map((t)=>t.id === action.id ? {
1663
+ ...t,
1664
+ exiting: true
1665
+ } : t);
1666
+ case "remove":
1667
+ return state.filter((t)=>t.id !== action.id);
1668
+ }
1669
+ }
1670
+ const ToastContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(null);
1671
+ function useToast() {
1672
+ const ctx = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(ToastContext);
1673
+ if (!ctx) throw new Error("useToast must be used inside ToastProvider");
1674
+ return ctx;
1675
+ }
1676
+ function ToastProvider({ children }) {
1677
+ const [toasts, dispatch] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useReducer)(reducer, []);
1678
+ const addToast = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((options)=>{
1679
+ const id = Math.random().toString(36).slice(2);
1680
+ dispatch({
1681
+ type: "add",
1682
+ entry: {
1683
+ ...options,
1684
+ id
1685
+ }
1686
+ });
1687
+ return id;
1688
+ }, []);
1689
+ const startExit = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((id)=>{
1690
+ dispatch({
1691
+ type: "startExit",
1692
+ id
1693
+ });
1694
+ }, []);
1695
+ const removeToast = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((id)=>{
1696
+ dispatch({
1697
+ type: "remove",
1698
+ id
1699
+ });
1700
+ }, []);
1701
+ const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
1702
+ addToast
1703
+ }), [
1704
+ addToast
1705
+ ]);
1706
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ToastContext.Provider, {
1707
+ value: contextValue,
1708
+ children: [
1709
+ children,
1710
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__floating_ui_react_3ddd630a__.FloatingPortal, {
1711
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToastRegion, {
1712
+ toasts: toasts,
1713
+ onStartExit: startExit,
1714
+ onRemove: removeToast
1715
+ })
1716
+ })
1717
+ ]
1718
+ });
1719
+ }
1720
+ function ToastRegion({ toasts, onStartExit, onRemove }) {
1721
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("section", {
1722
+ "aria-label": "Notifications",
1723
+ "aria-live": "polite",
1724
+ className: toast_module.region,
1725
+ children: toasts.map((toast)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToastItem, {
1726
+ toast: toast,
1727
+ onStartExit: onStartExit,
1728
+ onRemove: onRemove
1729
+ }, toast.id))
1730
+ });
1731
+ }
1732
+ function ToastItem({ toast, onStartExit, onRemove }) {
1733
+ const { id, message, description, tone = "neutral", duration = 5000, action, exiting } = toast;
1734
+ const remove = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>onStartExit(id), [
1735
+ id,
1736
+ onStartExit
1737
+ ]);
1738
+ const wrapperRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1739
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
1740
+ if (!exiting) return;
1741
+ const el = wrapperRef.current;
1742
+ if (!el) {
1743
+ onRemove(id);
1744
+ return;
177
1745
  }
178
- }, children);
1746
+ const handleEnd = ()=>onRemove(id);
1747
+ el.addEventListener("animationend", handleEnd, {
1748
+ once: true
1749
+ });
1750
+ return ()=>el.removeEventListener("animationend", handleEnd);
1751
+ }, [
1752
+ exiting,
1753
+ id,
1754
+ onRemove
1755
+ ]);
1756
+ const timerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1757
+ const remainingRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(duration);
1758
+ const startedAtRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
1759
+ const pausedRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(false);
1760
+ const startTimer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1761
+ if (0 === duration || pausedRef.current) return;
1762
+ startedAtRef.current = Date.now();
1763
+ timerRef.current = setTimeout(remove, remainingRef.current);
1764
+ }, [
1765
+ duration,
1766
+ remove
1767
+ ]);
1768
+ const pauseTimer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1769
+ if (null === timerRef.current) return;
1770
+ clearTimeout(timerRef.current);
1771
+ timerRef.current = null;
1772
+ if (null !== startedAtRef.current) {
1773
+ remainingRef.current -= Date.now() - startedAtRef.current;
1774
+ startedAtRef.current = null;
1775
+ }
1776
+ pausedRef.current = true;
1777
+ }, []);
1778
+ const resumeTimer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
1779
+ pausedRef.current = false;
1780
+ startTimer();
1781
+ }, [
1782
+ startTimer
1783
+ ]);
1784
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
1785
+ startTimer();
1786
+ return ()=>{
1787
+ if (null !== timerRef.current) clearTimeout(timerRef.current);
1788
+ };
1789
+ }, [
1790
+ startTimer
1791
+ ]);
1792
+ const handleKeyDown = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
1793
+ if ("Escape" === e.key) remove();
1794
+ }, [
1795
+ remove
1796
+ ]);
1797
+ const liveAttr = "danger" === tone ? "assertive" : "polite";
1798
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1799
+ ref: wrapperRef,
1800
+ className: [
1801
+ toast_module.toastWrapper,
1802
+ exiting ? toast_module.exiting : ""
1803
+ ].filter(Boolean).join(" "),
1804
+ onFocus: pauseTimer,
1805
+ onBlur: resumeTimer,
1806
+ onMouseEnter: pauseTimer,
1807
+ onMouseLeave: resumeTimer,
1808
+ onKeyDown: handleKeyDown,
1809
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1810
+ "aria-atomic": "true",
1811
+ "aria-live": liveAttr,
1812
+ className: `${toast_module.toast} ${toast_module[tone]}`,
1813
+ role: "alert",
1814
+ children: [
1815
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1816
+ className: toast_module.body,
1817
+ children: [
1818
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
1819
+ className: toast_module.message,
1820
+ children: message
1821
+ }),
1822
+ description && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
1823
+ className: toast_module.description,
1824
+ children: description
1825
+ })
1826
+ ]
1827
+ }),
1828
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1829
+ className: toast_module.actions,
1830
+ children: [
1831
+ action && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
1832
+ className: toast_module.actionButton,
1833
+ type: "button",
1834
+ onClick: ()=>{
1835
+ action.onPress();
1836
+ remove();
1837
+ },
1838
+ children: action.label
1839
+ }),
1840
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
1841
+ "aria-label": "Dismiss notification",
1842
+ className: toast_module.closeButton,
1843
+ type: "button",
1844
+ onClick: remove,
1845
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
1846
+ "aria-hidden": "true",
1847
+ fill: "none",
1848
+ height: "12",
1849
+ stroke: "currentColor",
1850
+ strokeLinecap: "round",
1851
+ strokeLinejoin: "round",
1852
+ strokeWidth: "2",
1853
+ viewBox: "0 0 12 12",
1854
+ width: "12",
1855
+ children: [
1856
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
1857
+ x1: "1",
1858
+ y1: "1",
1859
+ x2: "11",
1860
+ y2: "11"
1861
+ }),
1862
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
1863
+ x1: "11",
1864
+ y1: "1",
1865
+ x2: "1",
1866
+ y2: "11"
1867
+ })
1868
+ ]
1869
+ })
1870
+ })
1871
+ ]
1872
+ })
1873
+ ]
1874
+ })
1875
+ });
1876
+ }
1877
+ const select_module = {
1878
+ root: "root-FHU2Km",
1879
+ label: "label-QcwXLk",
1880
+ select: "select-gSATBt",
1881
+ invalid: "invalid-KfZYsG",
1882
+ error: "error-j2vRdG"
1883
+ };
1884
+ const select_Select = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ ariaLabel, className, defaultValue, errorMessage, id, isDisabled, isInvalid, label, onChange, options, placeholder, value: valueProp, ...props }, ref) {
1885
+ if (!label && !ariaLabel) throw new Error("Select requires `label` or `ariaLabel`.");
1886
+ const generatedId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
1887
+ const controlId = id ?? generatedId;
1888
+ const errorId = errorMessage ? `${controlId}-error` : void 0;
1889
+ const invalid = isInvalid || !!errorMessage;
1890
+ const isControlled = void 0 !== valueProp;
1891
+ const firstValue = options[0]?.value ?? "";
1892
+ const [uncontrolled, setUncontrolled] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultValue ?? firstValue);
1893
+ const value = isControlled ? valueProp ?? firstValue : uncontrolled;
1894
+ const hasPlaceholder = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>Boolean(placeholder && !options.some((o)=>"" === o.value)), [
1895
+ options,
1896
+ placeholder
1897
+ ]);
1898
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1899
+ className: select_module.root,
1900
+ children: [
1901
+ label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("label", {
1902
+ className: select_module.label,
1903
+ htmlFor: controlId,
1904
+ children: label
1905
+ }) : null,
1906
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("select", {
1907
+ ...props,
1908
+ ref: ref,
1909
+ "aria-describedby": errorId,
1910
+ "aria-invalid": invalid || void 0,
1911
+ "aria-label": ariaLabel,
1912
+ className: [
1913
+ select_module.select,
1914
+ invalid ? select_module.invalid : null,
1915
+ className
1916
+ ].filter(Boolean).join(" "),
1917
+ disabled: isDisabled,
1918
+ id: controlId,
1919
+ value: value,
1920
+ onChange: (e)=>{
1921
+ const next = e.target.value;
1922
+ if (!isControlled) setUncontrolled(next);
1923
+ onChange?.(next);
1924
+ },
1925
+ children: [
1926
+ hasPlaceholder ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("option", {
1927
+ disabled: true,
1928
+ value: "",
1929
+ children: placeholder
1930
+ }) : null,
1931
+ options.map((o)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("option", {
1932
+ disabled: o.disabled,
1933
+ value: o.value,
1934
+ children: o.label
1935
+ }, o.value))
1936
+ ]
1937
+ }),
1938
+ errorMessage ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1939
+ className: select_module.error,
1940
+ id: errorId,
1941
+ children: errorMessage
1942
+ }) : null
1943
+ ]
1944
+ });
1945
+ });
1946
+ const switch_module = {
1947
+ root: "root-oT5_Un",
1948
+ label: "label-hZdO11",
1949
+ disabled: "disabled-F77GvV",
1950
+ input: "input-VfbfH9",
1951
+ track: "track-Bj1t0E",
1952
+ thumb: "thumb-HnOuup",
1953
+ error: "error-MpcTPC"
1954
+ };
1955
+ function Switch({ label, isDisabled, isInvalid, isSelected, defaultSelected, errorMessage, onChange, id: idProp, ...props }) {
1956
+ const generatedId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
1957
+ const id = idProp ?? generatedId;
1958
+ const errorId = errorMessage ? `${id}-error` : void 0;
1959
+ const ariaChecked = "boolean" == typeof isSelected ? isSelected : "boolean" == typeof defaultSelected ? defaultSelected : false;
1960
+ const invalid = isInvalid || !!errorMessage;
1961
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
1962
+ className: switch_module.root,
1963
+ children: [
1964
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("label", {
1965
+ className: `${switch_module.label}${isDisabled ? ` ${switch_module.disabled}` : ""}`,
1966
+ children: [
1967
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("input", {
1968
+ ...props,
1969
+ "aria-checked": ariaChecked,
1970
+ "aria-describedby": errorId,
1971
+ "aria-invalid": invalid || void 0,
1972
+ checked: isSelected,
1973
+ className: switch_module.input,
1974
+ defaultChecked: defaultSelected,
1975
+ disabled: isDisabled,
1976
+ id: id,
1977
+ onChange: (e)=>onChange?.(e.target.checked),
1978
+ role: "switch",
1979
+ type: "checkbox"
1980
+ }),
1981
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1982
+ className: switch_module.track,
1983
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1984
+ className: switch_module.thumb
1985
+ })
1986
+ }),
1987
+ label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1988
+ children: label
1989
+ }) : null
1990
+ ]
1991
+ }),
1992
+ errorMessage ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1993
+ className: switch_module.error,
1994
+ id: errorId,
1995
+ children: errorMessage
1996
+ }) : null
1997
+ ]
1998
+ });
1999
+ }
2000
+ const text_field_module = {
2001
+ root: "root-EDj_sz",
2002
+ label: "label-S2rwc9",
2003
+ input: "input-pJgRNM",
2004
+ invalid: "invalid-M29JY3",
2005
+ description: "description-U5SfzR",
2006
+ error: "error-PaIi5f"
2007
+ };
2008
+ const text_area_TextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ className, description, errorMessage, id: idProp, isDisabled, isInvalid, label, lines, minLines = lines ?? 1, maxLines = lines ?? 1 / 0, onChange, style, value, defaultValue, ...props }, forwardedRef) {
2009
+ const generatedId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
2010
+ const id = idProp ?? generatedId;
2011
+ const descriptionId = description ? `${id}-description` : void 0;
2012
+ const errorId = errorMessage ? `${id}-error` : void 0;
2013
+ const describedBy = [
2014
+ descriptionId,
2015
+ errorId
2016
+ ].filter(Boolean).join(" ") || void 0;
2017
+ const invalid = isInvalid || !!errorMessage;
2018
+ const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
2019
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(forwardedRef, ()=>ref.current);
2020
+ function resize() {
2021
+ const el = ref.current;
2022
+ if (!el) return;
2023
+ el.style.height = "auto";
2024
+ const lineHeight = parseFloat(getComputedStyle(el).lineHeight);
2025
+ const paddingTop = parseFloat(getComputedStyle(el).paddingTop);
2026
+ const paddingBottom = parseFloat(getComputedStyle(el).paddingBottom);
2027
+ const min = paddingTop + paddingBottom + minLines * lineHeight;
2028
+ const max = maxLines === 1 / 0 ? 1 / 0 : paddingTop + paddingBottom + maxLines * lineHeight;
2029
+ el.style.height = `${Math.min(Math.max(el.scrollHeight, min), max)}px`;
2030
+ el.style.overflowY = el.scrollHeight > max ? "auto" : "hidden";
2031
+ }
2032
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2033
+ resize();
2034
+ }, [
2035
+ value,
2036
+ minLines,
2037
+ maxLines
2038
+ ]);
2039
+ (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
2040
+ resize();
2041
+ }, []);
2042
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2043
+ className: text_field_module.root,
2044
+ children: [
2045
+ label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("label", {
2046
+ className: text_field_module.label,
2047
+ htmlFor: id,
2048
+ children: label
2049
+ }) : null,
2050
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("textarea", {
2051
+ ...props,
2052
+ ref: ref,
2053
+ "aria-describedby": describedBy,
2054
+ "aria-invalid": invalid || void 0,
2055
+ className: [
2056
+ text_field_module.input,
2057
+ invalid ? text_field_module.invalid : null,
2058
+ className
2059
+ ].filter(Boolean).join(" "),
2060
+ defaultValue: defaultValue,
2061
+ disabled: isDisabled,
2062
+ id: id,
2063
+ onChange: (e)=>{
2064
+ onChange?.(e.target.value);
2065
+ resize();
2066
+ },
2067
+ rows: minLines,
2068
+ style: {
2069
+ resize: "none",
2070
+ ...style
2071
+ },
2072
+ value: value
2073
+ }),
2074
+ description ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2075
+ className: text_field_module.description,
2076
+ id: descriptionId,
2077
+ children: description
2078
+ }) : null,
2079
+ errorMessage ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2080
+ className: text_field_module.error,
2081
+ id: errorId,
2082
+ children: errorMessage
2083
+ }) : null
2084
+ ]
2085
+ });
2086
+ });
2087
+ function TextField({ className, description, errorMessage, id: idProp, isDisabled, isInvalid, label, onChange, ...props }) {
2088
+ const generatedId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
2089
+ const id = idProp ?? generatedId;
2090
+ const descriptionId = description ? `${id}-description` : void 0;
2091
+ const errorId = errorMessage ? `${id}-error` : void 0;
2092
+ const describedBy = [
2093
+ descriptionId,
2094
+ errorId
2095
+ ].filter(Boolean).join(" ") || void 0;
2096
+ const invalid = isInvalid || !!errorMessage;
2097
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
2098
+ className: text_field_module.root,
2099
+ children: [
2100
+ label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("label", {
2101
+ className: text_field_module.label,
2102
+ htmlFor: id,
2103
+ children: label
2104
+ }) : null,
2105
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("input", {
2106
+ ...props,
2107
+ "aria-describedby": describedBy,
2108
+ "aria-invalid": invalid || void 0,
2109
+ className: [
2110
+ text_field_module.input,
2111
+ invalid ? text_field_module.invalid : null,
2112
+ className
2113
+ ].filter(Boolean).join(" "),
2114
+ disabled: isDisabled,
2115
+ id: id,
2116
+ onChange: onChange ? (e)=>onChange(e.target.value) : void 0
2117
+ }),
2118
+ description ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2119
+ className: text_field_module.description,
2120
+ id: descriptionId,
2121
+ children: description
2122
+ }) : null,
2123
+ errorMessage ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
2124
+ className: text_field_module.error,
2125
+ id: errorId,
2126
+ children: errorMessage
2127
+ }) : null
2128
+ ]
2129
+ });
179
2130
  }
180
- function Stack({ children, gap = "var(--ox0-space-md)" }) {
181
- return /*#__PURE__*/ React.createElement("div", {
2131
+ function resolveTrack(value) {
2132
+ if ("number" == typeof value) return `repeat(${value}, 1fr)`;
2133
+ if (Array.isArray(value)) return value.join(" ");
2134
+ return value;
2135
+ }
2136
+ const grid_Grid = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, columns = "repeat(auto-fit, minmax(12rem, 1fr))", rows, areas, as: Tag = "div", gap = "md", padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft }, ref) {
2137
+ const { style: spacingStyle } = useSpacing({
2138
+ gap,
2139
+ padding,
2140
+ paddingX,
2141
+ paddingY,
2142
+ paddingTop,
2143
+ paddingRight,
2144
+ paddingBottom,
2145
+ paddingLeft
2146
+ });
2147
+ const gridTemplateColumns = resolveTrack(columns);
2148
+ const gridTemplateRows = void 0 !== rows ? resolveTrack(rows) : void 0;
2149
+ const gridTemplateAreas = void 0 !== areas ? areas.map((row)=>`"${row.join(" ")}"`).join(" ") : void 0;
2150
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tag, {
2151
+ ref: ref,
182
2152
  style: {
183
2153
  display: "grid",
184
- gap
185
- }
186
- }, children);
187
- }
188
- function Ox0Provider({ children, locale, messages }) {
189
- return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__ox0_i18n_ad8e896a__.Ox0I18nProvider, {
190
- locale: locale,
191
- messages: messages
192
- }, children);
2154
+ gridTemplateColumns,
2155
+ gridTemplateRows,
2156
+ gridTemplateAreas,
2157
+ ...spacingStyle
2158
+ },
2159
+ children: children
2160
+ });
2161
+ });
2162
+ const split_alignMap = {
2163
+ start: "flex-start",
2164
+ center: "center",
2165
+ end: "flex-end",
2166
+ stretch: "stretch",
2167
+ baseline: "baseline"
2168
+ };
2169
+ const split_Split = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, align = "center", as: Tag = "div", gap = "md", padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft }, ref) {
2170
+ const { style: spacingStyle } = useSpacing({
2171
+ gap,
2172
+ padding,
2173
+ paddingX,
2174
+ paddingY,
2175
+ paddingTop,
2176
+ paddingRight,
2177
+ paddingBottom,
2178
+ paddingLeft
2179
+ });
2180
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tag, {
2181
+ ref: ref,
2182
+ style: {
2183
+ alignItems: split_alignMap[align],
2184
+ display: "flex",
2185
+ justifyContent: "space-between",
2186
+ ...spacingStyle
2187
+ },
2188
+ children: children
2189
+ });
2190
+ });
2191
+ const stack_alignMap = {
2192
+ start: "flex-start",
2193
+ center: "center",
2194
+ end: "flex-end",
2195
+ stretch: "stretch"
2196
+ };
2197
+ const stack_Stack = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(function({ children, align = "stretch", as: Tag = "div", gap = "md", padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, borderRadius, shadow, border, borderTop, borderRight, borderBottom, borderLeft, surface, gridArea }, ref) {
2198
+ const { style: gridItemStyle } = useGridItem({
2199
+ gridArea
2200
+ });
2201
+ const { style: spacingStyle } = useSpacing({
2202
+ gap,
2203
+ padding,
2204
+ paddingX,
2205
+ paddingY,
2206
+ paddingTop,
2207
+ paddingRight,
2208
+ paddingBottom,
2209
+ paddingLeft
2210
+ });
2211
+ const { style: bordersStyle } = useBorders({
2212
+ borderRadius,
2213
+ shadow,
2214
+ border,
2215
+ borderTop,
2216
+ borderRight,
2217
+ borderBottom,
2218
+ borderLeft
2219
+ });
2220
+ const { style: surfaceStyle } = useSurface({
2221
+ surface
2222
+ });
2223
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Tag, {
2224
+ ref: ref,
2225
+ style: {
2226
+ alignItems: stack_alignMap[align],
2227
+ display: "flex",
2228
+ flexDirection: "column",
2229
+ ...gridItemStyle,
2230
+ ...spacingStyle,
2231
+ ...bordersStyle,
2232
+ ...surfaceStyle
2233
+ },
2234
+ children: children
2235
+ });
2236
+ });
2237
+ function Ox0Provider({ children, colorScheme, density, locale, messages, navigate, neutralTheme, textStyles, tokenOverrides }) {
2238
+ const themeVars = tokenOverrides ? (0, __WEBPACK_EXTERNAL_MODULE__ox0_tokens_b8bc2fee__.createTheme)(tokenOverrides) : void 0;
2239
+ const textStyleVars = textStyles ? createTextStyles(textStyles) : void 0;
2240
+ const dataColorScheme = "system" === colorScheme ? void 0 : colorScheme;
2241
+ const dataDensity = "comfortable" === density ? void 0 : density;
2242
+ const routerValue = navigate ? {
2243
+ navigate
2244
+ } : null;
2245
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToastProvider, {
2246
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__ox0_i18n_ad8e896a__.Ox0I18nProvider, {
2247
+ locale: locale,
2248
+ messages: messages,
2249
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RouterContext.Provider, {
2250
+ value: routerValue,
2251
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2252
+ "data-theme": neutralTheme,
2253
+ "data-color-scheme": dataColorScheme,
2254
+ "data-density": dataDensity,
2255
+ style: {
2256
+ display: "contents",
2257
+ ...themeVars,
2258
+ ...textStyleVars
2259
+ },
2260
+ children: children
2261
+ })
2262
+ })
2263
+ })
2264
+ });
193
2265
  }
194
- export { Button, Checkbox, Dialog, Grid, IconButton, Inline, Ox0Provider, Popover, Split, Stack, Switch, TextField };
2266
+ export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, badge_Badge as Badge, banner_Banner as Banner, box_Box as Box, button_Button as Button, button_group_ButtonGroup as ButtonGroup, caption_Caption as Caption, card_Card as Card, Checkbox, code_Code as Code, code_block_CodeBlock as CodeBlock, Dialog, disclosure_triangle_DisclosureTriangle as DisclosureTriangle, divider_Divider as Divider, grid_Grid as Grid, heading_Heading as Heading, IconButton, icon_label_IconLabel as IconLabel, inline_Inline as Inline, keyboard_Keyboard as Keyboard, label_Label as Label, link_Link as Link, numeric_Numeric as Numeric, Ox0Provider, Popover, select_Select as Select, spinner_Spinner as Spinner, split_Split as Split, stack_Stack as Stack, surface_Surface as Surface, Switch, text_Text as Text, text_area_TextArea as TextArea, TextField, ToastProvider, Tooltip, createTextStyles, iconSize, useBorders, useFlexItem, useGridItem, usePlacement, useSizing, useSpacing, useSurface, useToast };