@entropix/react 1.0.0 → 1.0.1

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 (120) hide show
  1. package/dist/accordion.cjs +27 -0
  2. package/dist/accordion.css +57 -0
  3. package/dist/accordion.d.cts +30 -0
  4. package/dist/accordion.d.ts +30 -0
  5. package/dist/accordion.js +6 -0
  6. package/dist/button.cjs +15 -0
  7. package/dist/button.css +113 -0
  8. package/dist/button.d.cts +25 -0
  9. package/dist/button.d.ts +25 -0
  10. package/dist/button.js +6 -0
  11. package/dist/checkbox.cjs +15 -0
  12. package/dist/checkbox.css +89 -0
  13. package/dist/checkbox.d.cts +26 -0
  14. package/dist/checkbox.d.ts +26 -0
  15. package/dist/checkbox.js +6 -0
  16. package/dist/chunk-2MKJZEUK.cjs +4 -0
  17. package/dist/chunk-34IVVIO3.cjs +119 -0
  18. package/dist/chunk-36ZHHJYV.js +79 -0
  19. package/dist/chunk-5DKE5YQD.cjs +10 -0
  20. package/dist/chunk-664P2RGR.js +108 -0
  21. package/dist/chunk-6NKHMBF3.cjs +97 -0
  22. package/dist/chunk-6UAQCHIW.js +8 -0
  23. package/dist/chunk-7AUIZOEH.cjs +84 -0
  24. package/dist/chunk-AVCBDUKH.js +3 -0
  25. package/dist/chunk-B5JZHE4I.cjs +90 -0
  26. package/dist/chunk-BN57JPKV.js +26 -0
  27. package/dist/chunk-BY4E26CV.js +114 -0
  28. package/dist/chunk-CL6JXZIY.js +88 -0
  29. package/dist/chunk-CTT3LXMZ.js +76 -0
  30. package/dist/chunk-EASSPJBG.cjs +110 -0
  31. package/dist/chunk-EWY7MSXF.cjs +94 -0
  32. package/dist/chunk-FJGLK3I4.js +89 -0
  33. package/dist/chunk-GTVBKK3W.js +88 -0
  34. package/dist/chunk-GZXXUFCJ.cjs +15 -0
  35. package/dist/chunk-IXH7OVN3.cjs +86 -0
  36. package/dist/chunk-KGIUECLG.cjs +91 -0
  37. package/dist/chunk-LDOP6DVX.cjs +28 -0
  38. package/dist/chunk-LJK6KK2H.cjs +43 -0
  39. package/dist/chunk-OT2HJUCB.js +84 -0
  40. package/dist/chunk-PILZGMQG.js +87 -0
  41. package/dist/chunk-PN42JF6U.js +92 -0
  42. package/dist/chunk-RPIYYBFJ.cjs +90 -0
  43. package/dist/chunk-S6DVQAH4.cjs +240 -0
  44. package/dist/chunk-U5CZHO6D.js +13 -0
  45. package/dist/chunk-UGCCJI2F.js +111 -0
  46. package/dist/chunk-W6N4D4N4.js +230 -0
  47. package/dist/chunk-Y2M2LJGJ.js +41 -0
  48. package/dist/chunk-YJG5KX6O.cjs +81 -0
  49. package/dist/chunk-ZG4PZBSL.cjs +113 -0
  50. package/dist/dialog.cjs +39 -0
  51. package/dist/dialog.css +89 -0
  52. package/dist/dialog.d.cts +62 -0
  53. package/dist/dialog.d.ts +62 -0
  54. package/dist/dialog.js +6 -0
  55. package/dist/index.cjs +170 -1223
  56. package/dist/index.d.cts +17 -477
  57. package/dist/index.d.ts +17 -477
  58. package/dist/index.js +19 -1189
  59. package/dist/input.cjs +15 -0
  60. package/dist/input.css +135 -0
  61. package/dist/input.d.cts +37 -0
  62. package/dist/input.d.ts +37 -0
  63. package/dist/input.js +6 -0
  64. package/dist/layout.cjs +25 -0
  65. package/dist/layout.css +176 -0
  66. package/dist/layout.d.cts +108 -0
  67. package/dist/layout.d.ts +108 -0
  68. package/dist/layout.js +4 -0
  69. package/dist/menu.cjs +27 -0
  70. package/dist/menu.css +51 -0
  71. package/dist/menu.d.cts +31 -0
  72. package/dist/menu.d.ts +31 -0
  73. package/dist/menu.js +6 -0
  74. package/dist/radio.cjs +19 -0
  75. package/dist/radio.css +93 -0
  76. package/dist/radio.d.cts +37 -0
  77. package/dist/radio.d.ts +37 -0
  78. package/dist/radio.js +6 -0
  79. package/dist/select.cjs +27 -0
  80. package/dist/select.css +114 -0
  81. package/dist/select.d.cts +59 -0
  82. package/dist/select.d.ts +59 -0
  83. package/dist/select.js +6 -0
  84. package/dist/styles/accordion.css +1 -67
  85. package/dist/styles/button.css +1 -133
  86. package/dist/styles/checkbox.css +1 -119
  87. package/dist/styles/dialog.css +1 -102
  88. package/dist/styles/index.css +1 -14
  89. package/dist/styles/input.css +1 -176
  90. package/dist/styles/layout.css +1 -125
  91. package/dist/styles/menu.css +1 -62
  92. package/dist/styles/radio.css +1 -128
  93. package/dist/styles/select.css +1 -148
  94. package/dist/styles/switch.css +1 -53
  95. package/dist/styles/tabs.css +1 -84
  96. package/dist/styles/toggle.css +1 -45
  97. package/dist/switch.cjs +16 -0
  98. package/dist/switch.css +89 -0
  99. package/dist/switch.d.cts +14 -0
  100. package/dist/switch.d.ts +14 -0
  101. package/dist/switch.js +7 -0
  102. package/dist/tabs.cjs +27 -0
  103. package/dist/tabs.css +69 -0
  104. package/dist/tabs.d.cts +31 -0
  105. package/dist/tabs.d.ts +31 -0
  106. package/dist/tabs.js +6 -0
  107. package/dist/textarea.cjs +15 -0
  108. package/dist/textarea.css +135 -0
  109. package/dist/textarea.d.cts +41 -0
  110. package/dist/textarea.d.ts +41 -0
  111. package/dist/textarea.js +6 -0
  112. package/dist/toggle.cjs +19 -0
  113. package/dist/toggle.css +41 -0
  114. package/dist/toggle.d.cts +34 -0
  115. package/dist/toggle.d.ts +34 -0
  116. package/dist/toggle.js +6 -0
  117. package/package.json +135 -4
  118. package/dist/index.cjs.map +0 -1
  119. package/dist/index.css.map +0 -1
  120. package/dist/index.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,1126 +1,24 @@
1
1
  'use strict';
2
2
 
3
+ var chunkEASSPJBG_cjs = require('./chunk-EASSPJBG.cjs');
4
+ var chunkZG4PZBSL_cjs = require('./chunk-ZG4PZBSL.cjs');
5
+ require('./chunk-2MKJZEUK.cjs');
6
+ var chunkRPIYYBFJ_cjs = require('./chunk-RPIYYBFJ.cjs');
7
+ var chunkKGIUECLG_cjs = require('./chunk-KGIUECLG.cjs');
8
+ var chunk34IVVIO3_cjs = require('./chunk-34IVVIO3.cjs');
9
+ var chunkYJG5KX6O_cjs = require('./chunk-YJG5KX6O.cjs');
10
+ var chunkIXH7OVN3_cjs = require('./chunk-IXH7OVN3.cjs');
11
+ var chunkGZXXUFCJ_cjs = require('./chunk-GZXXUFCJ.cjs');
12
+ var chunkB5JZHE4I_cjs = require('./chunk-B5JZHE4I.cjs');
13
+ var chunkS6DVQAH4_cjs = require('./chunk-S6DVQAH4.cjs');
14
+ var chunk7AUIZOEH_cjs = require('./chunk-7AUIZOEH.cjs');
15
+ var chunkEWY7MSXF_cjs = require('./chunk-EWY7MSXF.cjs');
16
+ var chunk6NKHMBF3_cjs = require('./chunk-6NKHMBF3.cjs');
17
+ var chunkLDOP6DVX_cjs = require('./chunk-LDOP6DVX.cjs');
18
+ var chunkLJK6KK2H_cjs = require('./chunk-LJK6KK2H.cjs');
19
+ require('./chunk-5DKE5YQD.cjs');
3
20
  var react = require('react');
4
- var core = require('@entropix/core');
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var reactDom = require('react-dom');
7
21
 
8
- // src/utils/map-accessibility-to-aria.ts
9
- var ARIA_MAP = {
10
- role: "role",
11
- label: "aria-label",
12
- labelledBy: "aria-labelledby",
13
- describedBy: "aria-describedby",
14
- disabled: "aria-disabled",
15
- expanded: "aria-expanded",
16
- selected: "aria-selected",
17
- checked: "aria-checked",
18
- pressed: "aria-pressed",
19
- busy: "aria-busy",
20
- modal: "aria-modal",
21
- hasPopup: "aria-haspopup",
22
- controls: "aria-controls",
23
- owns: "aria-owns",
24
- live: "aria-live",
25
- orientation: "aria-orientation",
26
- tabIndex: "tabIndex",
27
- hidden: "aria-hidden",
28
- valueNow: "aria-valuenow",
29
- valueMin: "aria-valuemin",
30
- valueMax: "aria-valuemax",
31
- valueText: "aria-valuetext",
32
- required: "aria-required",
33
- invalid: "aria-invalid"
34
- };
35
- function mapAccessibilityToAria(props) {
36
- const result = {};
37
- for (const [key, attrName] of Object.entries(ARIA_MAP)) {
38
- const value = props[key];
39
- if (value !== void 0) {
40
- result[attrName] = value;
41
- }
42
- }
43
- return result;
44
- }
45
- function useKeyboardHandler(keyboardConfig, actionMap) {
46
- const handler = react.useCallback(
47
- (event) => {
48
- if (!keyboardConfig) return;
49
- const intent = keyboardConfig.getIntent(event.key, {
50
- shift: event.shiftKey,
51
- meta: event.metaKey,
52
- alt: event.altKey
53
- });
54
- if (intent && actionMap[intent]) {
55
- event.preventDefault();
56
- actionMap[intent]();
57
- }
58
- },
59
- [keyboardConfig, actionMap]
60
- );
61
- if (!keyboardConfig) return void 0;
62
- return handler;
63
- }
64
- var FOCUSABLE_SELECTOR = [
65
- "a[href]",
66
- "button:not([disabled])",
67
- "input:not([disabled])",
68
- "select:not([disabled])",
69
- "textarea:not([disabled])",
70
- '[tabindex]:not([tabindex="-1"])'
71
- ].join(", ");
72
- function useFocusTrap(containerRef, isActive) {
73
- react.useEffect(() => {
74
- if (!isActive) return;
75
- const container = containerRef.current;
76
- if (!container) return;
77
- const focusableElements = container.querySelectorAll(FOCUSABLE_SELECTOR);
78
- if (focusableElements.length > 0) {
79
- focusableElements[0].focus();
80
- }
81
- function handleKeyDown(event) {
82
- if (event.key !== "Tab") return;
83
- const focusable = container.querySelectorAll(FOCUSABLE_SELECTOR);
84
- if (focusable.length === 0) return;
85
- const first = focusable[0];
86
- const last = focusable[focusable.length - 1];
87
- if (event.shiftKey) {
88
- if (document.activeElement === first) {
89
- event.preventDefault();
90
- last.focus();
91
- }
92
- } else {
93
- if (document.activeElement === last) {
94
- event.preventDefault();
95
- first.focus();
96
- }
97
- }
98
- }
99
- container.addEventListener("keydown", handleKeyDown);
100
- return () => {
101
- container.removeEventListener("keydown", handleKeyDown);
102
- };
103
- }, [isActive, containerRef]);
104
- }
105
- function useFocusRestore(isActive) {
106
- const savedElement = react.useRef(null);
107
- react.useEffect(() => {
108
- if (isActive) {
109
- savedElement.current = document.activeElement;
110
- } else if (savedElement.current) {
111
- const el = savedElement.current;
112
- if (el && document.body.contains(el) && typeof el.focus === "function") {
113
- el.focus();
114
- }
115
- savedElement.current = null;
116
- }
117
- }, [isActive]);
118
- }
119
-
120
- // src/utils/cn.ts
121
- function cn(...classes) {
122
- return classes.filter(Boolean).join(" ");
123
- }
124
- var Button = react.forwardRef(function Button2({
125
- disabled,
126
- loading,
127
- onPress,
128
- as: Component = "button",
129
- variant,
130
- size,
131
- className,
132
- style,
133
- children,
134
- onClick,
135
- onKeyDown: externalOnKeyDown,
136
- ...rest
137
- }, ref) {
138
- const elementType = typeof Component === "string" ? Component : "div";
139
- const { isDisabled, isLoading, getButtonProps } = core.useButton({
140
- disabled,
141
- loading,
142
- onPress,
143
- elementType
144
- });
145
- const propGetterReturn = getButtonProps();
146
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
147
- const actionMap = react.useMemo(
148
- () => ({
149
- activate: propGetterReturn.onAction ?? (() => {
150
- })
151
- }),
152
- [propGetterReturn.onAction]
153
- );
154
- const onKeyDown = useKeyboardHandler(
155
- propGetterReturn.keyboardConfig,
156
- actionMap
157
- );
158
- const handleClick = react.useCallback(
159
- (event) => {
160
- propGetterReturn.onAction?.();
161
- onClick?.(event);
162
- },
163
- [propGetterReturn.onAction, onClick]
164
- );
165
- const handleKeyDown = react.useCallback(
166
- (event) => {
167
- onKeyDown?.(event);
168
- externalOnKeyDown?.(event);
169
- },
170
- [onKeyDown, externalOnKeyDown]
171
- );
172
- const dataState = isLoading ? "loading" : isDisabled ? "disabled" : void 0;
173
- return /* @__PURE__ */ jsxRuntime.jsx(
174
- Component,
175
- {
176
- ref,
177
- className: cn(
178
- "entropix-button",
179
- variant && `entropix-button--${variant}`,
180
- size && `entropix-button--${size}`,
181
- className
182
- ),
183
- style,
184
- ...ariaProps,
185
- ...rest,
186
- type: Component === "button" ? "button" : void 0,
187
- disabled: Component === "button" && isDisabled ? true : void 0,
188
- onClick: propGetterReturn.onAction || onClick ? handleClick : void 0,
189
- onKeyDown: onKeyDown || externalOnKeyDown ? handleKeyDown : void 0,
190
- "data-state": dataState,
191
- "data-variant": variant,
192
- "data-size": size,
193
- children
194
- }
195
- );
196
- });
197
- var Toggle = react.forwardRef(
198
- function Toggle2(props, ref) {
199
- return /* @__PURE__ */ jsxRuntime.jsx(ToggleInner, { ...props, ref, role: "checkbox", componentClass: "entropix-toggle" });
200
- }
201
- );
202
- var ToggleInner = react.forwardRef(
203
- function ToggleInner2({
204
- checked,
205
- defaultChecked,
206
- onChange,
207
- disabled,
208
- label,
209
- role = "checkbox",
210
- componentClass = "entropix-toggle",
211
- className,
212
- style,
213
- children,
214
- onClick,
215
- onKeyDown: externalOnKeyDown,
216
- ...rest
217
- }, ref) {
218
- const { isChecked, isDisabled, getToggleProps } = core.useToggle({
219
- checked,
220
- defaultChecked,
221
- onChange,
222
- disabled,
223
- role
224
- });
225
- const propGetterReturn = getToggleProps();
226
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
227
- if (label && !children) {
228
- ariaProps["aria-label"] = label;
229
- }
230
- const actionMap = react.useMemo(
231
- () => ({
232
- toggle: propGetterReturn.onAction ?? (() => {
233
- })
234
- }),
235
- [propGetterReturn.onAction]
236
- );
237
- const onKeyDown = useKeyboardHandler(
238
- propGetterReturn.keyboardConfig,
239
- actionMap
240
- );
241
- const handleClick = react.useCallback(
242
- (event) => {
243
- propGetterReturn.onAction?.();
244
- onClick?.(event);
245
- },
246
- [propGetterReturn.onAction, onClick]
247
- );
248
- const handleKeyDown = react.useCallback(
249
- (event) => {
250
- onKeyDown?.(event);
251
- externalOnKeyDown?.(event);
252
- },
253
- [onKeyDown, externalOnKeyDown]
254
- );
255
- return /* @__PURE__ */ jsxRuntime.jsx(
256
- "button",
257
- {
258
- ref,
259
- type: "button",
260
- className: cn(componentClass, className),
261
- style,
262
- ...ariaProps,
263
- ...rest,
264
- disabled: isDisabled || void 0,
265
- onClick: propGetterReturn.onAction || onClick ? handleClick : void 0,
266
- onKeyDown: onKeyDown || externalOnKeyDown ? handleKeyDown : void 0,
267
- "data-state": isChecked ? "checked" : "unchecked",
268
- children: children ?? label ?? (isChecked ? "On" : "Off")
269
- }
270
- );
271
- }
272
- );
273
- var Switch = react.forwardRef(
274
- function Switch2(props, ref) {
275
- return /* @__PURE__ */ jsxRuntime.jsx(ToggleInner, { ...props, ref, role: "switch", componentClass: "entropix-switch" });
276
- }
277
- );
278
- var DialogContext = react.createContext(null);
279
- function useDialogContext() {
280
- const context = react.useContext(DialogContext);
281
- if (!context) {
282
- throw new Error(
283
- "Dialog compound components must be used within a <Dialog> provider."
284
- );
285
- }
286
- return context;
287
- }
288
- function Dialog({
289
- children,
290
- isOpen,
291
- defaultOpen,
292
- onOpenChange,
293
- closeOnOverlayPress,
294
- closeOnEscape,
295
- modal,
296
- role
297
- }) {
298
- const dialog = core.useDialog({
299
- isOpen,
300
- defaultOpen,
301
- onOpenChange,
302
- closeOnOverlayPress,
303
- closeOnEscape,
304
- modal,
305
- role
306
- });
307
- return /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: dialog, children });
308
- }
309
- var DialogTrigger = react.forwardRef(
310
- function DialogTrigger2({ children, className, onClick, ...rest }, ref) {
311
- const { getTriggerProps } = useDialogContext();
312
- const propGetterReturn = getTriggerProps();
313
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
314
- const handleClick = react.useCallback(
315
- (event) => {
316
- propGetterReturn.onAction?.();
317
- onClick?.(event);
318
- },
319
- [propGetterReturn.onAction, onClick]
320
- );
321
- return /* @__PURE__ */ jsxRuntime.jsx(
322
- "button",
323
- {
324
- ref,
325
- type: "button",
326
- ...ariaProps,
327
- ...rest,
328
- className: cn("entropix-dialog-trigger", className),
329
- onClick: handleClick,
330
- children
331
- }
332
- );
333
- }
334
- );
335
- var DialogContent = react.forwardRef(
336
- function DialogContent2({ children, className, onKeyDown: externalOnKeyDown, ...rest }, ref) {
337
- const { isOpen, close, ids, focusManagement, getContentProps } = useDialogContext();
338
- const [mounted, setMounted] = react.useState(false);
339
- react.useEffect(() => {
340
- setMounted(true);
341
- }, []);
342
- const internalRef = react.useRef(null);
343
- useFocusTrap(internalRef, isOpen && focusManagement.trapFocus);
344
- useFocusRestore(isOpen && focusManagement.restoreFocus);
345
- const propGetterReturn = getContentProps();
346
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
347
- const actionMap = react.useMemo(() => ({ dismiss: close }), [close]);
348
- const onKeyDown = useKeyboardHandler(
349
- propGetterReturn.keyboardConfig,
350
- actionMap
351
- );
352
- if (!mounted || !isOpen) return null;
353
- const content = /* @__PURE__ */ jsxRuntime.jsx(
354
- "div",
355
- {
356
- ref: (node) => {
357
- internalRef.current = node;
358
- if (typeof ref === "function") {
359
- ref(node);
360
- } else if (ref) {
361
- ref.current = node;
362
- }
363
- },
364
- id: ids.content,
365
- ...ariaProps,
366
- ...rest,
367
- className: cn("entropix-dialog-content", className),
368
- onKeyDown: onKeyDown ? (event) => {
369
- onKeyDown(event);
370
- externalOnKeyDown?.(event);
371
- } : externalOnKeyDown,
372
- "data-state": isOpen ? "open" : "closed",
373
- children
374
- }
375
- );
376
- return reactDom.createPortal(content, document.body);
377
- }
378
- );
379
- var DialogTitle = react.forwardRef(
380
- function DialogTitle2({ children, className, ...rest }, ref) {
381
- const { ids } = useDialogContext();
382
- return /* @__PURE__ */ jsxRuntime.jsx("h2", { ref, id: ids.title, ...rest, className: cn("entropix-dialog-title", className), children });
383
- }
384
- );
385
- var DialogDescription = react.forwardRef(function DialogDescription2({ children, className, ...rest }, ref) {
386
- const { ids } = useDialogContext();
387
- return /* @__PURE__ */ jsxRuntime.jsx("p", { ref, id: ids.description, ...rest, className: cn("entropix-dialog-description", className), children });
388
- });
389
- var DialogClose = react.forwardRef(
390
- function DialogClose2({ children, className, onClick, ...rest }, ref) {
391
- const { getCloseProps } = useDialogContext();
392
- const propGetterReturn = getCloseProps();
393
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
394
- const handleClick = react.useCallback(
395
- (event) => {
396
- propGetterReturn.onAction?.();
397
- onClick?.(event);
398
- },
399
- [propGetterReturn.onAction, onClick]
400
- );
401
- return /* @__PURE__ */ jsxRuntime.jsx(
402
- "button",
403
- {
404
- ref,
405
- type: "button",
406
- ...ariaProps,
407
- ...rest,
408
- className: cn("entropix-dialog-close", className),
409
- onClick: handleClick,
410
- children
411
- }
412
- );
413
- }
414
- );
415
- var DialogOverlay = react.forwardRef(
416
- function DialogOverlay2({ className, onClick, ...rest }, ref) {
417
- const { isOpen, getOverlayProps } = useDialogContext();
418
- const propGetterReturn = getOverlayProps();
419
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
420
- const handleClick = react.useCallback(
421
- (event) => {
422
- propGetterReturn.onAction?.();
423
- onClick?.(event);
424
- },
425
- [propGetterReturn.onAction, onClick]
426
- );
427
- if (!isOpen) return null;
428
- return /* @__PURE__ */ jsxRuntime.jsx(
429
- "div",
430
- {
431
- ref,
432
- ...ariaProps,
433
- ...rest,
434
- className: cn("entropix-dialog-overlay", className),
435
- onClick: propGetterReturn.onAction || onClick ? handleClick : void 0,
436
- "data-state": isOpen ? "open" : "closed"
437
- }
438
- );
439
- }
440
- );
441
- var TabsContext = react.createContext(null);
442
- function useTabsContext() {
443
- const context = react.useContext(TabsContext);
444
- if (!context) {
445
- throw new Error(
446
- "Tabs compound components must be used within a <Tabs> provider."
447
- );
448
- }
449
- return context;
450
- }
451
- function Tabs({
452
- children,
453
- className,
454
- orientation = "horizontal",
455
- activationMode = "automatic",
456
- ...options
457
- }) {
458
- const tabs = core.useTabs({ ...options, orientation, activationMode });
459
- return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { ...tabs, orientation, activationMode }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("entropix-tabs", className), "data-orientation": orientation, children }) });
460
- }
461
- function TabList({ children, className }) {
462
- const { getTabListProps } = useTabsContext();
463
- const propGetterReturn = getTabListProps();
464
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
465
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...ariaProps, className: cn("entropix-tablist", className), children });
466
- }
467
- function Tab({ value, children, className }) {
468
- const { getTabProps, select, selectedKey, orientation } = useTabsContext();
469
- const propGetterReturn = getTabProps(value);
470
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
471
- const baseId = ariaProps["aria-controls"] ? String(ariaProps["aria-controls"]).replace(`-panel-${value}`, "") : "";
472
- const handleClick = react.useCallback(() => {
473
- propGetterReturn.onAction?.();
474
- }, [propGetterReturn.onAction]);
475
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
476
- activate: () => select(value)
477
- });
478
- return /* @__PURE__ */ jsxRuntime.jsx(
479
- "button",
480
- {
481
- ...ariaProps,
482
- id: `${baseId}-tab-${value}`,
483
- className: cn("entropix-tab", className),
484
- onClick: handleClick,
485
- onKeyDown,
486
- "data-state": selectedKey === value ? "active" : "inactive",
487
- "data-orientation": orientation,
488
- children
489
- }
490
- );
491
- }
492
- function TabPanel({ value, children, className }) {
493
- const { getTabPanelProps, selectedKey } = useTabsContext();
494
- const propGetterReturn = getTabPanelProps(value);
495
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
496
- const baseId = ariaProps["aria-labelledby"] ? String(ariaProps["aria-labelledby"]).replace(`-tab-${value}`, "") : "";
497
- if (selectedKey !== value) return null;
498
- return /* @__PURE__ */ jsxRuntime.jsx(
499
- "div",
500
- {
501
- ...ariaProps,
502
- id: `${baseId}-panel-${value}`,
503
- className: cn("entropix-tabpanel", className),
504
- "data-state": "active",
505
- children
506
- }
507
- );
508
- }
509
- var AccordionContext = react.createContext(null);
510
- function useAccordionContext() {
511
- const context = react.useContext(AccordionContext);
512
- if (!context) {
513
- throw new Error(
514
- "Accordion compound components must be used within an <Accordion> provider."
515
- );
516
- }
517
- return context;
518
- }
519
- var AccordionItemContext = react.createContext(null);
520
- function useAccordionItemContext() {
521
- const context = react.useContext(AccordionItemContext);
522
- if (context === null) {
523
- throw new Error(
524
- "AccordionTrigger and AccordionPanel must be used within an <AccordionItem>."
525
- );
526
- }
527
- return context;
528
- }
529
- function Accordion({ children, className, ...options }) {
530
- const accordion = core.useAccordion(options);
531
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionContext.Provider, { value: accordion, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("entropix-accordion", className), children }) });
532
- }
533
- function AccordionItem({
534
- value,
535
- children,
536
- className
537
- }) {
538
- const { isExpanded } = useAccordionContext();
539
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
540
- "div",
541
- {
542
- className: cn("entropix-accordion-item", className),
543
- "data-state": isExpanded(value) ? "open" : "closed",
544
- children
545
- }
546
- ) });
547
- }
548
- function AccordionTrigger({
549
- children,
550
- className
551
- }) {
552
- const itemKey = useAccordionItemContext();
553
- const { getItemTriggerProps, toggle } = useAccordionContext();
554
- const propGetterReturn = getItemTriggerProps(itemKey);
555
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
556
- const triggerId = propGetterReturn.accessibility.controls ? String(propGetterReturn.accessibility.controls).replace("panel-", "trigger-") : void 0;
557
- const handleClick = react.useCallback(() => {
558
- propGetterReturn.onAction?.();
559
- }, [propGetterReturn.onAction]);
560
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
561
- activate: () => toggle(itemKey)
562
- });
563
- return /* @__PURE__ */ jsxRuntime.jsx(
564
- "button",
565
- {
566
- ...ariaProps,
567
- id: triggerId,
568
- className: cn("entropix-accordion-trigger", className),
569
- onClick: handleClick,
570
- onKeyDown,
571
- children
572
- }
573
- );
574
- }
575
- function AccordionPanel({ children, className }) {
576
- const itemKey = useAccordionItemContext();
577
- const { getItemPanelProps, isExpanded } = useAccordionContext();
578
- const propGetterReturn = getItemPanelProps(itemKey);
579
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
580
- const panelId = propGetterReturn.accessibility.labelledBy ? String(propGetterReturn.accessibility.labelledBy).replace(
581
- "trigger-",
582
- "panel-"
583
- ) : void 0;
584
- if (!isExpanded(itemKey)) return null;
585
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...ariaProps, id: panelId, className: cn("entropix-accordion-panel", className), "data-state": "open", children });
586
- }
587
- var MenuContext = react.createContext(null);
588
- function useMenuContext() {
589
- const context = react.useContext(MenuContext);
590
- if (!context) {
591
- throw new Error(
592
- "Menu compound components must be used within a <Menu> provider."
593
- );
594
- }
595
- return context;
596
- }
597
- function Menu({ children, ...options }) {
598
- const menu = core.useMenu(options);
599
- return /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value: menu, children });
600
- }
601
- function MenuTrigger({ children, className }) {
602
- const { getTriggerProps, toggle, open } = useMenuContext();
603
- const propGetterReturn = getTriggerProps();
604
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
605
- const handleClick = react.useCallback(() => {
606
- propGetterReturn.onAction?.();
607
- }, [propGetterReturn.onAction]);
608
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
609
- activate: toggle,
610
- moveDown: open,
611
- moveUp: open
612
- });
613
- return /* @__PURE__ */ jsxRuntime.jsx(
614
- "button",
615
- {
616
- ...ariaProps,
617
- className: cn("entropix-menu-trigger", className),
618
- onClick: handleClick,
619
- onKeyDown,
620
- children
621
- }
622
- );
623
- }
624
- function MenuContent({ children, className }) {
625
- const { isOpen, getMenuProps, close } = useMenuContext();
626
- const propGetterReturn = getMenuProps();
627
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
628
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
629
- dismiss: close
630
- });
631
- if (!isOpen) return null;
632
- return /* @__PURE__ */ jsxRuntime.jsx(
633
- "div",
634
- {
635
- ...ariaProps,
636
- className: cn("entropix-menu-content", className),
637
- onKeyDown,
638
- "data-state": "open",
639
- children
640
- }
641
- );
642
- }
643
- function MenuItem({
644
- index,
645
- onSelect,
646
- disabled,
647
- children,
648
- className
649
- }) {
650
- const { getItemProps, activeIndex } = useMenuContext();
651
- const propGetterReturn = getItemProps(index, { onSelect, disabled });
652
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
653
- const handleClick = react.useCallback(() => {
654
- propGetterReturn.onAction?.();
655
- }, [propGetterReturn.onAction]);
656
- return /* @__PURE__ */ jsxRuntime.jsx(
657
- "div",
658
- {
659
- ...ariaProps,
660
- className: cn("entropix-menu-item", className),
661
- onClick: handleClick,
662
- "data-state": activeIndex === index ? "active" : "inactive",
663
- "data-disabled": disabled || void 0,
664
- children
665
- }
666
- );
667
- }
668
- var Input = react.forwardRef(function Input2({
669
- value,
670
- defaultValue,
671
- onChange,
672
- disabled,
673
- readOnly,
674
- required,
675
- invalid,
676
- label,
677
- helperText,
678
- errorMessage,
679
- variant = "default",
680
- size = "md",
681
- className,
682
- type,
683
- placeholder,
684
- name,
685
- ...rest
686
- }, ref) {
687
- const isInvalid = invalid || !!errorMessage;
688
- const {
689
- value: inputValue,
690
- isDisabled,
691
- isReadOnly,
692
- isRequired,
693
- isInvalid: _,
694
- getInputProps,
695
- getLabelProps,
696
- getHelperTextProps,
697
- getErrorMessageProps
698
- } = core.useInput({
699
- value,
700
- defaultValue,
701
- onChange,
702
- disabled,
703
- readOnly,
704
- required,
705
- invalid: isInvalid,
706
- type,
707
- placeholder,
708
- name
709
- });
710
- const propGetterReturn = getInputProps();
711
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
712
- const labelProps = getLabelProps();
713
- const helperProps = getHelperTextProps();
714
- const errorProps = getErrorMessageProps();
715
- const handleChange = react.useCallback(
716
- (event) => {
717
- onChange?.(event.target.value);
718
- },
719
- [onChange]
720
- );
721
- const dataState = isInvalid ? "invalid" : isDisabled ? "disabled" : void 0;
722
- return /* @__PURE__ */ jsxRuntime.jsxs(
723
- "div",
724
- {
725
- className: cn("entropix-input-wrapper", className),
726
- "data-state": dataState,
727
- "data-variant": variant,
728
- "data-size": size,
729
- children: [
730
- label && /* @__PURE__ */ jsxRuntime.jsxs(
731
- "label",
732
- {
733
- className: "entropix-input-label",
734
- id: labelProps.id,
735
- htmlFor: labelProps.htmlFor,
736
- children: [
737
- label,
738
- isRequired && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-required", children: "*" })
739
- ]
740
- }
741
- ),
742
- /* @__PURE__ */ jsxRuntime.jsx(
743
- "input",
744
- {
745
- ref,
746
- className: "entropix-input",
747
- ...ariaProps,
748
- ...rest,
749
- type,
750
- name,
751
- placeholder,
752
- value: inputValue,
753
- onChange: handleChange,
754
- disabled: isDisabled || void 0,
755
- readOnly: isReadOnly || void 0,
756
- "data-state": dataState,
757
- "data-variant": variant,
758
- "data-size": size
759
- }
760
- ),
761
- isInvalid && errorMessage ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-error", ...errorProps, children: errorMessage }) : helperText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-helper", ...helperProps, children: helperText }) : null
762
- ]
763
- }
764
- );
765
- });
766
- var Textarea = react.forwardRef(
767
- function Textarea2({
768
- value,
769
- defaultValue,
770
- onChange,
771
- disabled,
772
- readOnly,
773
- required,
774
- invalid,
775
- label,
776
- helperText,
777
- errorMessage,
778
- variant = "default",
779
- size = "md",
780
- rows,
781
- resize = "vertical",
782
- className,
783
- placeholder,
784
- name,
785
- style,
786
- ...rest
787
- }, ref) {
788
- const isInvalid = invalid || !!errorMessage;
789
- const {
790
- value: inputValue,
791
- isDisabled,
792
- isReadOnly,
793
- isRequired,
794
- getInputProps,
795
- getLabelProps,
796
- getHelperTextProps,
797
- getErrorMessageProps
798
- } = core.useInput({
799
- value,
800
- defaultValue,
801
- onChange,
802
- disabled,
803
- readOnly,
804
- required,
805
- invalid: isInvalid,
806
- placeholder,
807
- name
808
- });
809
- const propGetterReturn = getInputProps();
810
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
811
- const labelProps = getLabelProps();
812
- const helperProps = getHelperTextProps();
813
- const errorProps = getErrorMessageProps();
814
- const handleChange = react.useCallback(
815
- (event) => {
816
- onChange?.(event.target.value);
817
- },
818
- [onChange]
819
- );
820
- const dataState = isInvalid ? "invalid" : isDisabled ? "disabled" : void 0;
821
- return /* @__PURE__ */ jsxRuntime.jsxs(
822
- "div",
823
- {
824
- className: cn("entropix-input-wrapper", className),
825
- "data-state": dataState,
826
- "data-variant": variant,
827
- "data-size": size,
828
- children: [
829
- label && /* @__PURE__ */ jsxRuntime.jsxs(
830
- "label",
831
- {
832
- className: "entropix-input-label",
833
- id: labelProps.id,
834
- htmlFor: labelProps.htmlFor,
835
- children: [
836
- label,
837
- isRequired && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-required", children: "*" })
838
- ]
839
- }
840
- ),
841
- /* @__PURE__ */ jsxRuntime.jsx(
842
- "textarea",
843
- {
844
- ref,
845
- className: "entropix-textarea",
846
- ...ariaProps,
847
- ...rest,
848
- name,
849
- placeholder,
850
- value: inputValue,
851
- onChange: handleChange,
852
- disabled: isDisabled || void 0,
853
- readOnly: isReadOnly || void 0,
854
- rows,
855
- style: { ...style, resize },
856
- "data-state": dataState,
857
- "data-variant": variant,
858
- "data-size": size
859
- }
860
- ),
861
- isInvalid && errorMessage ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-error", ...errorProps, children: errorMessage }) : helperText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-helper", ...helperProps, children: helperText }) : null
862
- ]
863
- }
864
- );
865
- }
866
- );
867
- var Checkbox = react.forwardRef(
868
- function Checkbox2({
869
- checked,
870
- defaultChecked,
871
- onChange,
872
- disabled,
873
- label,
874
- indeterminate = false,
875
- className,
876
- style,
877
- children,
878
- onClick,
879
- onKeyDown: externalOnKeyDown,
880
- ...rest
881
- }, ref) {
882
- const { isChecked, isDisabled, getToggleProps } = core.useToggle({
883
- checked,
884
- defaultChecked,
885
- onChange,
886
- disabled,
887
- role: "checkbox"
888
- });
889
- const propGetterReturn = getToggleProps();
890
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
891
- if (indeterminate) {
892
- ariaProps["aria-checked"] = "mixed";
893
- }
894
- if (label && !children) {
895
- ariaProps["aria-label"] = label;
896
- }
897
- const actionMap = react.useMemo(
898
- () => ({
899
- toggle: propGetterReturn.onAction ?? (() => {
900
- })
901
- }),
902
- [propGetterReturn.onAction]
903
- );
904
- const onKeyDown = useKeyboardHandler(
905
- propGetterReturn.keyboardConfig,
906
- actionMap
907
- );
908
- const handleClick = react.useCallback(
909
- (event) => {
910
- propGetterReturn.onAction?.();
911
- onClick?.(event);
912
- },
913
- [propGetterReturn.onAction, onClick]
914
- );
915
- const handleKeyDown = react.useCallback(
916
- (event) => {
917
- onKeyDown?.(event);
918
- externalOnKeyDown?.(event);
919
- },
920
- [onKeyDown, externalOnKeyDown]
921
- );
922
- const dataState = indeterminate ? "indeterminate" : isChecked ? "checked" : "unchecked";
923
- return /* @__PURE__ */ jsxRuntime.jsxs(
924
- "button",
925
- {
926
- ref,
927
- type: "button",
928
- className: cn("entropix-checkbox", className),
929
- style,
930
- ...ariaProps,
931
- ...rest,
932
- disabled: isDisabled || void 0,
933
- onClick: propGetterReturn.onAction || onClick ? handleClick : void 0,
934
- onKeyDown: onKeyDown || externalOnKeyDown ? handleKeyDown : void 0,
935
- "data-state": dataState,
936
- children: [
937
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-checkbox__indicator", "data-state": dataState }),
938
- (label || children) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-checkbox__label", children: label || children })
939
- ]
940
- }
941
- );
942
- }
943
- );
944
- var RadioContext = react.createContext(null);
945
- function useRadioContext() {
946
- const context = react.useContext(RadioContext);
947
- if (!context) {
948
- throw new Error(
949
- "Radio compound components must be used within a <RadioGroup> provider."
950
- );
951
- }
952
- return context;
953
- }
954
- function RadioGroup({
955
- children,
956
- label,
957
- className,
958
- ...options
959
- }) {
960
- const radioGroup = core.useRadioGroup(options);
961
- const propGetterReturn = radioGroup.getRadioGroupProps();
962
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
963
- if (label) {
964
- ariaProps["aria-label"] = label;
965
- }
966
- return /* @__PURE__ */ jsxRuntime.jsx(RadioContext.Provider, { value: radioGroup, children: /* @__PURE__ */ jsxRuntime.jsx(
967
- "div",
968
- {
969
- ...ariaProps,
970
- className: cn("entropix-radio-group", className),
971
- "data-orientation": options.orientation ?? "vertical",
972
- children
973
- }
974
- ) });
975
- }
976
- function RadioItem({
977
- value,
978
- disabled,
979
- label,
980
- children,
981
- className
982
- }) {
983
- const { getRadioProps, selectedValue } = useRadioContext();
984
- const propGetterReturn = getRadioProps(value, { disabled });
985
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
986
- const isChecked = value === selectedValue;
987
- const actionMap = react.useMemo(
988
- () => ({}),
989
- []
990
- );
991
- const onKeyDown = useKeyboardHandler(
992
- propGetterReturn.keyboardConfig,
993
- actionMap
994
- );
995
- const handleClick = react.useCallback(() => {
996
- propGetterReturn.onAction?.();
997
- }, [propGetterReturn.onAction]);
998
- return /* @__PURE__ */ jsxRuntime.jsxs(
999
- "button",
1000
- {
1001
- type: "button",
1002
- ...ariaProps,
1003
- className: cn("entropix-radio-item", className),
1004
- onClick: handleClick,
1005
- onKeyDown,
1006
- "data-state": isChecked ? "checked" : "unchecked",
1007
- "data-disabled": disabled || void 0,
1008
- children: [
1009
- /* @__PURE__ */ jsxRuntime.jsx(
1010
- "span",
1011
- {
1012
- className: "entropix-radio-item__indicator",
1013
- "data-state": isChecked ? "checked" : "unchecked"
1014
- }
1015
- ),
1016
- (label || children) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-radio-item__label", children: label || children })
1017
- ]
1018
- }
1019
- );
1020
- }
1021
- var SelectContext = react.createContext(null);
1022
- function useSelectContext() {
1023
- const context = react.useContext(SelectContext);
1024
- if (!context) {
1025
- throw new Error(
1026
- "Select compound components must be used within a <Select> provider."
1027
- );
1028
- }
1029
- return context;
1030
- }
1031
- function Select({ children, label, className, ...options }) {
1032
- const select = core.useSelect(options);
1033
- const labelProps = select.getLabelProps();
1034
- return /* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value: select, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("entropix-select", className), children: [
1035
- label && /* @__PURE__ */ jsxRuntime.jsx(
1036
- "label",
1037
- {
1038
- className: "entropix-select-label",
1039
- id: labelProps.id,
1040
- htmlFor: labelProps.htmlFor,
1041
- children: label
1042
- }
1043
- ),
1044
- children
1045
- ] }) });
1046
- }
1047
- function SelectTrigger({
1048
- placeholder = "Select...",
1049
- children,
1050
- className
1051
- }) {
1052
- const { getTriggerProps, toggle, open, selectedValue, isDisabled } = useSelectContext();
1053
- const propGetterReturn = getTriggerProps();
1054
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
1055
- const handleClick = react.useCallback(() => {
1056
- propGetterReturn.onAction?.();
1057
- }, [propGetterReturn.onAction]);
1058
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
1059
- activate: toggle,
1060
- moveDown: open,
1061
- moveUp: open
1062
- });
1063
- return /* @__PURE__ */ jsxRuntime.jsxs(
1064
- "button",
1065
- {
1066
- type: "button",
1067
- ...ariaProps,
1068
- className: cn("entropix-select-trigger", className),
1069
- onClick: handleClick,
1070
- onKeyDown,
1071
- disabled: isDisabled || void 0,
1072
- children: [
1073
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-select-trigger__value", children: children ?? (selectedValue || placeholder) }),
1074
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-select-trigger__chevron", "aria-hidden": "true", children: "\u25BE" })
1075
- ]
1076
- }
1077
- );
1078
- }
1079
- function SelectContent({ children, className }) {
1080
- const { isOpen, getListboxProps, close } = useSelectContext();
1081
- const propGetterReturn = getListboxProps();
1082
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
1083
- const onKeyDown = useKeyboardHandler(propGetterReturn.keyboardConfig, {
1084
- dismiss: close
1085
- });
1086
- if (!isOpen) return null;
1087
- return /* @__PURE__ */ jsxRuntime.jsx(
1088
- "div",
1089
- {
1090
- ...ariaProps,
1091
- className: cn("entropix-select-content", className),
1092
- onKeyDown,
1093
- "data-state": "open",
1094
- children
1095
- }
1096
- );
1097
- }
1098
- function SelectOption({
1099
- value,
1100
- index,
1101
- disabled,
1102
- children,
1103
- className
1104
- }) {
1105
- const { getOptionProps, selectedValue } = useSelectContext();
1106
- const propGetterReturn = getOptionProps(value, index ?? 0, { disabled });
1107
- const ariaProps = mapAccessibilityToAria(propGetterReturn.accessibility);
1108
- const isSelected = value === selectedValue;
1109
- const handleClick = react.useCallback(() => {
1110
- propGetterReturn.onAction?.();
1111
- }, [propGetterReturn.onAction]);
1112
- return /* @__PURE__ */ jsxRuntime.jsx(
1113
- "div",
1114
- {
1115
- ...ariaProps,
1116
- className: cn("entropix-select-option", className),
1117
- onClick: handleClick,
1118
- "data-state": isSelected ? "selected" : "unselected",
1119
- "data-disabled": disabled || void 0,
1120
- children
1121
- }
1122
- );
1123
- }
1124
22
  var BREAKPOINTS = {
1125
23
  sm: 640,
1126
24
  md: 768,
@@ -1168,117 +66,166 @@ function useMediaQuery(query) {
1168
66
  function useBreakpointValue(breakpoint) {
1169
67
  return useMediaQuery(`(min-width: ${BREAKPOINTS[breakpoint]}px)`);
1170
68
  }
1171
- var Stack = react.forwardRef(function Stack2({ gap, align, fullWidth, as: Component = "div", className, children, ...rest }, ref) {
1172
- return /* @__PURE__ */ jsxRuntime.jsx(
1173
- Component,
1174
- {
1175
- ref,
1176
- className: cn(
1177
- "entropix-stack",
1178
- gap && `entropix-stack--gap-${gap}`,
1179
- align && `entropix-stack--align-${align}`,
1180
- fullWidth && "entropix-stack--full-width",
1181
- className
1182
- ),
1183
- ...rest,
1184
- children
1185
- }
1186
- );
69
+
70
+ Object.defineProperty(exports, "Input", {
71
+ enumerable: true,
72
+ get: function () { return chunkEASSPJBG_cjs.Input; }
1187
73
  });
1188
- var Inline = react.forwardRef(function Inline2({ gap, align, justify, wrap, as: Component = "div", className, children, ...rest }, ref) {
1189
- return /* @__PURE__ */ jsxRuntime.jsx(
1190
- Component,
1191
- {
1192
- ref,
1193
- className: cn(
1194
- "entropix-inline",
1195
- gap && `entropix-inline--gap-${gap}`,
1196
- align && `entropix-inline--align-${align}`,
1197
- justify && `entropix-inline--justify-${justify}`,
1198
- wrap && "entropix-inline--wrap",
1199
- className
1200
- ),
1201
- ...rest,
1202
- children
1203
- }
1204
- );
74
+ Object.defineProperty(exports, "Textarea", {
75
+ enumerable: true,
76
+ get: function () { return chunkZG4PZBSL_cjs.Textarea; }
1205
77
  });
1206
- var Container = react.forwardRef(function Container2({ maxWidth = "lg", center, as: Component = "div", className, children, ...rest }, ref) {
1207
- return /* @__PURE__ */ jsxRuntime.jsx(
1208
- Component,
1209
- {
1210
- ref,
1211
- className: cn(
1212
- "entropix-container",
1213
- `entropix-container--${maxWidth}`,
1214
- center && "entropix-container--center",
1215
- className
1216
- ),
1217
- ...rest,
1218
- children
1219
- }
1220
- );
78
+ Object.defineProperty(exports, "Checkbox", {
79
+ enumerable: true,
80
+ get: function () { return chunkRPIYYBFJ_cjs.Checkbox; }
1221
81
  });
1222
- var Divider = react.forwardRef(function Divider2({ orientation = "horizontal", spacing, className, ...rest }, ref) {
1223
- return /* @__PURE__ */ jsxRuntime.jsx(
1224
- "hr",
1225
- {
1226
- ref,
1227
- role: orientation === "vertical" ? "separator" : void 0,
1228
- "aria-orientation": orientation === "vertical" ? "vertical" : void 0,
1229
- className: cn(
1230
- "entropix-divider",
1231
- orientation === "vertical" && "entropix-divider--vertical",
1232
- spacing && `entropix-divider--spacing-${spacing}`,
1233
- className
1234
- ),
1235
- ...rest
1236
- }
1237
- );
82
+ Object.defineProperty(exports, "RadioGroup", {
83
+ enumerable: true,
84
+ get: function () { return chunkKGIUECLG_cjs.RadioGroup; }
85
+ });
86
+ Object.defineProperty(exports, "RadioItem", {
87
+ enumerable: true,
88
+ get: function () { return chunkKGIUECLG_cjs.RadioItem; }
89
+ });
90
+ Object.defineProperty(exports, "Select", {
91
+ enumerable: true,
92
+ get: function () { return chunk34IVVIO3_cjs.Select; }
93
+ });
94
+ Object.defineProperty(exports, "SelectContent", {
95
+ enumerable: true,
96
+ get: function () { return chunk34IVVIO3_cjs.SelectContent; }
97
+ });
98
+ Object.defineProperty(exports, "SelectOption", {
99
+ enumerable: true,
100
+ get: function () { return chunk34IVVIO3_cjs.SelectOption; }
101
+ });
102
+ Object.defineProperty(exports, "SelectTrigger", {
103
+ enumerable: true,
104
+ get: function () { return chunk34IVVIO3_cjs.SelectTrigger; }
105
+ });
106
+ Object.defineProperty(exports, "Container", {
107
+ enumerable: true,
108
+ get: function () { return chunkYJG5KX6O_cjs.Container; }
109
+ });
110
+ Object.defineProperty(exports, "Divider", {
111
+ enumerable: true,
112
+ get: function () { return chunkYJG5KX6O_cjs.Divider; }
113
+ });
114
+ Object.defineProperty(exports, "Inline", {
115
+ enumerable: true,
116
+ get: function () { return chunkYJG5KX6O_cjs.Inline; }
117
+ });
118
+ Object.defineProperty(exports, "Stack", {
119
+ enumerable: true,
120
+ get: function () { return chunkYJG5KX6O_cjs.Stack; }
121
+ });
122
+ Object.defineProperty(exports, "Button", {
123
+ enumerable: true,
124
+ get: function () { return chunkIXH7OVN3_cjs.Button; }
125
+ });
126
+ Object.defineProperty(exports, "Switch", {
127
+ enumerable: true,
128
+ get: function () { return chunkGZXXUFCJ_cjs.Switch; }
129
+ });
130
+ Object.defineProperty(exports, "Toggle", {
131
+ enumerable: true,
132
+ get: function () { return chunkB5JZHE4I_cjs.Toggle; }
133
+ });
134
+ Object.defineProperty(exports, "Dialog", {
135
+ enumerable: true,
136
+ get: function () { return chunkS6DVQAH4_cjs.Dialog; }
137
+ });
138
+ Object.defineProperty(exports, "DialogClose", {
139
+ enumerable: true,
140
+ get: function () { return chunkS6DVQAH4_cjs.DialogClose; }
141
+ });
142
+ Object.defineProperty(exports, "DialogContent", {
143
+ enumerable: true,
144
+ get: function () { return chunkS6DVQAH4_cjs.DialogContent; }
145
+ });
146
+ Object.defineProperty(exports, "DialogDescription", {
147
+ enumerable: true,
148
+ get: function () { return chunkS6DVQAH4_cjs.DialogDescription; }
149
+ });
150
+ Object.defineProperty(exports, "DialogOverlay", {
151
+ enumerable: true,
152
+ get: function () { return chunkS6DVQAH4_cjs.DialogOverlay; }
153
+ });
154
+ Object.defineProperty(exports, "DialogTitle", {
155
+ enumerable: true,
156
+ get: function () { return chunkS6DVQAH4_cjs.DialogTitle; }
157
+ });
158
+ Object.defineProperty(exports, "DialogTrigger", {
159
+ enumerable: true,
160
+ get: function () { return chunkS6DVQAH4_cjs.DialogTrigger; }
161
+ });
162
+ Object.defineProperty(exports, "useFocusRestore", {
163
+ enumerable: true,
164
+ get: function () { return chunkS6DVQAH4_cjs.useFocusRestore; }
165
+ });
166
+ Object.defineProperty(exports, "useFocusTrap", {
167
+ enumerable: true,
168
+ get: function () { return chunkS6DVQAH4_cjs.useFocusTrap; }
169
+ });
170
+ Object.defineProperty(exports, "Tab", {
171
+ enumerable: true,
172
+ get: function () { return chunk7AUIZOEH_cjs.Tab; }
173
+ });
174
+ Object.defineProperty(exports, "TabList", {
175
+ enumerable: true,
176
+ get: function () { return chunk7AUIZOEH_cjs.TabList; }
177
+ });
178
+ Object.defineProperty(exports, "TabPanel", {
179
+ enumerable: true,
180
+ get: function () { return chunk7AUIZOEH_cjs.TabPanel; }
181
+ });
182
+ Object.defineProperty(exports, "Tabs", {
183
+ enumerable: true,
184
+ get: function () { return chunk7AUIZOEH_cjs.Tabs; }
185
+ });
186
+ Object.defineProperty(exports, "Accordion", {
187
+ enumerable: true,
188
+ get: function () { return chunkEWY7MSXF_cjs.Accordion; }
189
+ });
190
+ Object.defineProperty(exports, "AccordionItem", {
191
+ enumerable: true,
192
+ get: function () { return chunkEWY7MSXF_cjs.AccordionItem; }
193
+ });
194
+ Object.defineProperty(exports, "AccordionPanel", {
195
+ enumerable: true,
196
+ get: function () { return chunkEWY7MSXF_cjs.AccordionPanel; }
197
+ });
198
+ Object.defineProperty(exports, "AccordionTrigger", {
199
+ enumerable: true,
200
+ get: function () { return chunkEWY7MSXF_cjs.AccordionTrigger; }
201
+ });
202
+ Object.defineProperty(exports, "Menu", {
203
+ enumerable: true,
204
+ get: function () { return chunk6NKHMBF3_cjs.Menu; }
205
+ });
206
+ Object.defineProperty(exports, "MenuContent", {
207
+ enumerable: true,
208
+ get: function () { return chunk6NKHMBF3_cjs.MenuContent; }
209
+ });
210
+ Object.defineProperty(exports, "MenuItem", {
211
+ enumerable: true,
212
+ get: function () { return chunk6NKHMBF3_cjs.MenuItem; }
213
+ });
214
+ Object.defineProperty(exports, "MenuTrigger", {
215
+ enumerable: true,
216
+ get: function () { return chunk6NKHMBF3_cjs.MenuTrigger; }
217
+ });
218
+ Object.defineProperty(exports, "useKeyboardHandler", {
219
+ enumerable: true,
220
+ get: function () { return chunkLDOP6DVX_cjs.useKeyboardHandler; }
221
+ });
222
+ Object.defineProperty(exports, "mapAccessibilityToAria", {
223
+ enumerable: true,
224
+ get: function () { return chunkLJK6KK2H_cjs.mapAccessibilityToAria; }
1238
225
  });
1239
-
1240
- exports.Accordion = Accordion;
1241
- exports.AccordionItem = AccordionItem;
1242
- exports.AccordionPanel = AccordionPanel;
1243
- exports.AccordionTrigger = AccordionTrigger;
1244
226
  exports.BREAKPOINTS = BREAKPOINTS;
1245
- exports.Button = Button;
1246
- exports.Checkbox = Checkbox;
1247
- exports.Container = Container;
1248
- exports.Dialog = Dialog;
1249
- exports.DialogClose = DialogClose;
1250
- exports.DialogContent = DialogContent;
1251
- exports.DialogDescription = DialogDescription;
1252
- exports.DialogOverlay = DialogOverlay;
1253
- exports.DialogTitle = DialogTitle;
1254
- exports.DialogTrigger = DialogTrigger;
1255
- exports.Divider = Divider;
1256
- exports.Inline = Inline;
1257
- exports.Input = Input;
1258
- exports.Menu = Menu;
1259
- exports.MenuContent = MenuContent;
1260
- exports.MenuItem = MenuItem;
1261
- exports.MenuTrigger = MenuTrigger;
1262
- exports.RadioGroup = RadioGroup;
1263
- exports.RadioItem = RadioItem;
1264
- exports.Select = Select;
1265
- exports.SelectContent = SelectContent;
1266
- exports.SelectOption = SelectOption;
1267
- exports.SelectTrigger = SelectTrigger;
1268
- exports.Stack = Stack;
1269
- exports.Switch = Switch;
1270
- exports.Tab = Tab;
1271
- exports.TabList = TabList;
1272
- exports.TabPanel = TabPanel;
1273
- exports.Tabs = Tabs;
1274
- exports.Textarea = Textarea;
1275
- exports.Toggle = Toggle;
1276
- exports.mapAccessibilityToAria = mapAccessibilityToAria;
1277
227
  exports.useBreakpoint = useBreakpoint;
1278
228
  exports.useBreakpointValue = useBreakpointValue;
1279
- exports.useFocusRestore = useFocusRestore;
1280
- exports.useFocusTrap = useFocusTrap;
1281
- exports.useKeyboardHandler = useKeyboardHandler;
1282
229
  exports.useMediaQuery = useMediaQuery;
1283
230
  //# sourceMappingURL=index.cjs.map
1284
231
  //# sourceMappingURL=index.cjs.map