@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.d.ts CHANGED
@@ -1,7 +1,19 @@
1
- import { AccessibilityProps, KeyboardHandlerConfig, KeyIntent, UseDialogOptions, UseTabsOptions, UseAccordionOptions, UseMenuOptions, UseRadioGroupOptions, UseSelectOptions } from '@entropix/core';
2
- import * as react from 'react';
3
- import react__default from 'react';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import { AccessibilityProps, KeyboardHandlerConfig, KeyIntent } from '@entropix/core';
2
+ export { Button, ButtonProps } from './button.js';
3
+ export { Toggle, ToggleProps } from './toggle.js';
4
+ export { Switch, SwitchProps } from './switch.js';
5
+ export { Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogOverlay, DialogOverlayProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps } from './dialog.js';
6
+ export { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from './tabs.js';
7
+ export { Accordion, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionTrigger, AccordionTriggerProps } from './accordion.js';
8
+ export { Menu, MenuContent, MenuContentProps, MenuItem, MenuItemProps, MenuProps, MenuTrigger, MenuTriggerProps } from './menu.js';
9
+ export { Input, InputProps } from './input.js';
10
+ export { Textarea, TextareaProps } from './textarea.js';
11
+ export { Checkbox, CheckboxProps } from './checkbox.js';
12
+ export { RadioGroup, RadioGroupProps, RadioItem, RadioItemProps } from './radio.js';
13
+ export { Select, SelectContent, SelectContentProps, SelectOption, SelectOptionProps, SelectProps, SelectTrigger, SelectTriggerProps } from './select.js';
14
+ export { Container, ContainerProps, ContainerSize, Divider, DividerProps, Inline, InlineProps, SpacingSize, Stack, StackProps } from './layout.js';
15
+ import 'react';
16
+ import 'react/jsx-runtime';
5
17
 
6
18
  /**
7
19
  * Maps platform-neutral AccessibilityProps from @entropix/core
@@ -39,373 +51,6 @@ declare function useFocusTrap(containerRef: React.RefObject<HTMLElement | null>,
39
51
  */
40
52
  declare function useFocusRestore(isActive: boolean): void;
41
53
 
42
- interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLElement>, "disabled"> {
43
- /** Whether the button is disabled */
44
- disabled?: boolean;
45
- /** Whether the button is in a loading state */
46
- loading?: boolean;
47
- /** Called when the button is activated */
48
- onPress?: () => void;
49
- /** Render as a different element type */
50
- as?: React.ElementType;
51
- /** Visual variant for CSS targeting via data-variant */
52
- variant?: string;
53
- /** Size for CSS targeting via data-size */
54
- size?: string;
55
- }
56
- /**
57
- * Button component — web adapter for @entropix/core's useButton.
58
- *
59
- * Renders a `<button>` by default. Use the `as` prop for other elements.
60
- * Provides data-state, data-variant, data-size attributes for CSS targeting.
61
- */
62
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
63
-
64
- interface ToggleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "disabled"> {
65
- /** Controlled checked state */
66
- checked?: boolean;
67
- /** Default checked state for uncontrolled mode */
68
- defaultChecked?: boolean;
69
- /** Called when checked state changes */
70
- onChange?: (checked: boolean) => void;
71
- /** Whether the toggle is disabled */
72
- disabled?: boolean;
73
- /** Accessible label (if no children) */
74
- label?: string;
75
- }
76
- /**
77
- * Toggle component — web adapter for @entropix/core's useToggle.
78
- *
79
- * Renders a `<button type="button">` with role="checkbox".
80
- * Use the Switch component for role="switch" semantics.
81
- * Sets data-state="checked"|"unchecked" for CSS targeting.
82
- */
83
- declare const Toggle: react.ForwardRefExoticComponent<ToggleProps & react.RefAttributes<HTMLButtonElement>>;
84
-
85
- type SwitchProps = ToggleProps;
86
- /**
87
- * Switch component — Toggle with role="switch" semantics.
88
- *
89
- * API-identical to Toggle, but renders with `role="switch"`
90
- * instead of `role="checkbox"`.
91
- */
92
- declare const Switch: react.ForwardRefExoticComponent<ToggleProps & react.RefAttributes<HTMLButtonElement>>;
93
-
94
- interface DialogProps extends UseDialogOptions {
95
- children: React.ReactNode;
96
- }
97
- /**
98
- * Dialog root — provides dialog state to compound sub-components.
99
- * Renders no DOM of its own.
100
- */
101
- declare function Dialog({ children, isOpen, defaultOpen, onOpenChange, closeOnOverlayPress, closeOnEscape, modal, role, }: DialogProps): react_jsx_runtime.JSX.Element;
102
-
103
- interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
104
- }
105
- /**
106
- * DialogTrigger — button that opens/closes the dialog.
107
- * Maps core's getTriggerProps() to DOM attributes.
108
- */
109
- declare const DialogTrigger: react.ForwardRefExoticComponent<DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
110
-
111
- interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
112
- }
113
- /**
114
- * DialogContent — the dialog panel rendered in a portal.
115
- *
116
- * Implements focus trap, focus restore, Escape-to-close keyboard handling,
117
- * and portal rendering. SSR-safe via useEffect mount gating.
118
- */
119
- declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDivElement>>;
120
-
121
- interface DialogTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
122
- }
123
- /**
124
- * DialogTitle — heading element with auto-linked ID for aria-labelledby.
125
- */
126
- declare const DialogTitle: react.ForwardRefExoticComponent<DialogTitleProps & react.RefAttributes<HTMLHeadingElement>>;
127
-
128
- interface DialogDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
129
- }
130
- /**
131
- * DialogDescription — paragraph element with auto-linked ID for aria-describedby.
132
- */
133
- declare const DialogDescription: react.ForwardRefExoticComponent<DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>>;
134
-
135
- interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
136
- }
137
- /**
138
- * DialogClose — button that closes the dialog.
139
- * Maps core's getCloseProps() to DOM attributes.
140
- */
141
- declare const DialogClose: react.ForwardRefExoticComponent<DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
142
-
143
- interface DialogOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
144
- }
145
- /**
146
- * DialogOverlay — backdrop element behind the dialog.
147
- * Hidden from the accessibility tree. Optionally closes the dialog on click.
148
- */
149
- declare const DialogOverlay: react.ForwardRefExoticComponent<DialogOverlayProps & react.RefAttributes<HTMLDivElement>>;
150
-
151
- interface TabsProps extends UseTabsOptions {
152
- children: react__default.ReactNode;
153
- className?: string;
154
- }
155
- declare function Tabs({ children, className, orientation, activationMode, ...options }: TabsProps): react_jsx_runtime.JSX.Element;
156
-
157
- interface TabListProps {
158
- children: react__default.ReactNode;
159
- className?: string;
160
- }
161
- declare function TabList({ children, className }: TabListProps): react_jsx_runtime.JSX.Element;
162
-
163
- interface TabProps {
164
- value: string;
165
- children: react__default.ReactNode;
166
- className?: string;
167
- }
168
- declare function Tab({ value, children, className }: TabProps): react_jsx_runtime.JSX.Element;
169
-
170
- interface TabPanelProps {
171
- value: string;
172
- children: react__default.ReactNode;
173
- className?: string;
174
- }
175
- declare function TabPanel({ value, children, className }: TabPanelProps): react_jsx_runtime.JSX.Element | null;
176
-
177
- interface AccordionProps extends UseAccordionOptions {
178
- children: react__default.ReactNode;
179
- className?: string;
180
- }
181
- declare function Accordion({ children, className, ...options }: AccordionProps): react_jsx_runtime.JSX.Element;
182
-
183
- interface AccordionItemProps {
184
- value: string;
185
- children: react__default.ReactNode;
186
- className?: string;
187
- }
188
- declare function AccordionItem({ value, children, className, }: AccordionItemProps): react_jsx_runtime.JSX.Element;
189
-
190
- interface AccordionTriggerProps {
191
- children: react__default.ReactNode;
192
- className?: string;
193
- }
194
- declare function AccordionTrigger({ children, className, }: AccordionTriggerProps): react_jsx_runtime.JSX.Element;
195
-
196
- interface AccordionPanelProps {
197
- children: react__default.ReactNode;
198
- className?: string;
199
- }
200
- declare function AccordionPanel({ children, className }: AccordionPanelProps): react_jsx_runtime.JSX.Element | null;
201
-
202
- interface MenuProps extends UseMenuOptions {
203
- children: react__default.ReactNode;
204
- }
205
- declare function Menu({ children, ...options }: MenuProps): react_jsx_runtime.JSX.Element;
206
-
207
- interface MenuTriggerProps {
208
- children: react__default.ReactNode;
209
- className?: string;
210
- }
211
- declare function MenuTrigger({ children, className }: MenuTriggerProps): react_jsx_runtime.JSX.Element;
212
-
213
- interface MenuContentProps {
214
- children: react__default.ReactNode;
215
- className?: string;
216
- }
217
- declare function MenuContent({ children, className }: MenuContentProps): react_jsx_runtime.JSX.Element | null;
218
-
219
- interface MenuItemProps {
220
- index: number;
221
- onSelect?: () => void;
222
- disabled?: boolean;
223
- children: react__default.ReactNode;
224
- className?: string;
225
- }
226
- declare function MenuItem({ index, onSelect, disabled, children, className, }: MenuItemProps): react_jsx_runtime.JSX.Element;
227
-
228
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "disabled" | "value" | "size"> {
229
- /** Controlled value */
230
- value?: string;
231
- /** Default value for uncontrolled mode */
232
- defaultValue?: string;
233
- /** Called when the value changes */
234
- onChange?: (value: string) => void;
235
- /** Whether the input is disabled */
236
- disabled?: boolean;
237
- /** Whether the input is read-only */
238
- readOnly?: boolean;
239
- /** Whether the input is required */
240
- required?: boolean;
241
- /** Whether the input is in an invalid state */
242
- invalid?: boolean;
243
- /** Label text */
244
- label?: string;
245
- /** Helper text displayed below the input */
246
- helperText?: string;
247
- /** Error message displayed below the input (sets invalid=true when present) */
248
- errorMessage?: string;
249
- /** Visual variant */
250
- variant?: "default" | "filled";
251
- /** Size */
252
- size?: "sm" | "md" | "lg";
253
- }
254
- /**
255
- * Input component — web adapter for @entropix/core's useInput.
256
- *
257
- * Renders a wrapper div with label, input, helper text, and error message.
258
- * Sets data-state, data-variant, and data-size attributes for CSS targeting.
259
- */
260
- declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
261
-
262
- interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "disabled" | "value"> {
263
- /** Controlled value */
264
- value?: string;
265
- /** Default value for uncontrolled mode */
266
- defaultValue?: string;
267
- /** Called when the value changes */
268
- onChange?: (value: string) => void;
269
- /** Whether the textarea is disabled */
270
- disabled?: boolean;
271
- /** Whether the textarea is read-only */
272
- readOnly?: boolean;
273
- /** Whether the textarea is required */
274
- required?: boolean;
275
- /** Whether the textarea is in an invalid state */
276
- invalid?: boolean;
277
- /** Label text */
278
- label?: string;
279
- /** Helper text displayed below the textarea */
280
- helperText?: string;
281
- /** Error message displayed below the textarea (sets invalid=true when present) */
282
- errorMessage?: string;
283
- /** Visual variant */
284
- variant?: "default" | "filled";
285
- /** Size */
286
- size?: "sm" | "md" | "lg";
287
- /** Number of visible text rows */
288
- rows?: number;
289
- /** Resize behavior */
290
- resize?: "none" | "vertical" | "both";
291
- }
292
- /**
293
- * Textarea component — web adapter for @entropix/core's useInput.
294
- *
295
- * Renders a wrapper div with label, textarea, helper text, and error message.
296
- * Sets data-state, data-variant, and data-size attributes for CSS targeting.
297
- */
298
- declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
299
-
300
- interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "disabled"> {
301
- /** Controlled checked state */
302
- checked?: boolean;
303
- /** Default checked state for uncontrolled mode */
304
- defaultChecked?: boolean;
305
- /** Called when checked state changes */
306
- onChange?: (checked: boolean) => void;
307
- /** Whether the checkbox is disabled */
308
- disabled?: boolean;
309
- /** Accessible label text */
310
- label?: string;
311
- /** Whether the checkbox is in an indeterminate state */
312
- indeterminate?: boolean;
313
- }
314
- /**
315
- * Checkbox component — web adapter for @entropix/core's useToggle.
316
- *
317
- * Renders a `<button type="button">` with role="checkbox" containing
318
- * an indicator span and a label span.
319
- * Sets data-state="checked"|"unchecked"|"indeterminate" for CSS targeting.
320
- */
321
- declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLButtonElement>>;
322
-
323
- interface RadioGroupProps extends UseRadioGroupOptions {
324
- /** Label for the radio group */
325
- label?: string;
326
- children: react__default.ReactNode;
327
- className?: string;
328
- }
329
- /**
330
- * RadioGroup component — web adapter for @entropix/core's useRadioGroup.
331
- *
332
- * Renders a `<div role="radiogroup">` that provides context to RadioItem children.
333
- * Sets data-orientation for CSS targeting.
334
- */
335
- declare function RadioGroup({ children, label, className, ...options }: RadioGroupProps): react_jsx_runtime.JSX.Element;
336
-
337
- interface RadioItemProps {
338
- /** The value this radio option represents */
339
- value: string;
340
- /** Whether this specific radio is disabled */
341
- disabled?: boolean;
342
- /** Label text */
343
- label?: string;
344
- children?: react__default.ReactNode;
345
- className?: string;
346
- }
347
- /**
348
- * RadioItem component — a single radio option within a RadioGroup.
349
- *
350
- * Renders a `<button type="button" role="radio">` with an indicator
351
- * circle and label. Sets data-state="checked"|"unchecked" for CSS targeting.
352
- */
353
- declare function RadioItem({ value, disabled, label, children, className, }: RadioItemProps): react_jsx_runtime.JSX.Element;
354
-
355
- interface SelectProps extends UseSelectOptions {
356
- /** Label for the select */
357
- label?: string;
358
- children: react__default.ReactNode;
359
- className?: string;
360
- }
361
- /**
362
- * Select component — web adapter for @entropix/core's useSelect.
363
- *
364
- * Provides context to SelectTrigger, SelectContent, and SelectOption children.
365
- */
366
- declare function Select({ children, label, className, ...options }: SelectProps): react_jsx_runtime.JSX.Element;
367
-
368
- interface SelectTriggerProps {
369
- /** Placeholder text when no value is selected */
370
- placeholder?: string;
371
- children?: react__default.ReactNode;
372
- className?: string;
373
- }
374
- /**
375
- * SelectTrigger — renders like a styled input with a chevron.
376
- *
377
- * Displays the currently selected value or placeholder text.
378
- */
379
- declare function SelectTrigger({ placeholder, children, className, }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
380
-
381
- interface SelectContentProps {
382
- children: react__default.ReactNode;
383
- className?: string;
384
- }
385
- /**
386
- * SelectContent — renders the dropdown container for options.
387
- *
388
- * Only visible when the select is open.
389
- */
390
- declare function SelectContent({ children, className }: SelectContentProps): react_jsx_runtime.JSX.Element | null;
391
-
392
- interface SelectOptionProps {
393
- /** The value this option represents */
394
- value: string;
395
- /** The index of this option in the list (auto-assigned by SelectContent if omitted) */
396
- index?: number;
397
- /** Whether this option is disabled */
398
- disabled?: boolean;
399
- children: react__default.ReactNode;
400
- className?: string;
401
- }
402
- /**
403
- * SelectOption — renders an option within SelectContent.
404
- *
405
- * Sets data-state="selected"|"unselected" for CSS targeting.
406
- */
407
- declare function SelectOption({ value, index, disabled, children, className, }: SelectOptionProps): react_jsx_runtime.JSX.Element;
408
-
409
54
  /**
410
55
  * Breakpoint values in pixels, matching @entropix/tokens breakpoint primitives.
411
56
  */
@@ -452,109 +97,4 @@ declare function useMediaQuery(query: string): boolean;
452
97
  */
453
98
  declare function useBreakpointValue(breakpoint: Exclude<Breakpoint, "base">): boolean;
454
99
 
455
- type SpacingSize$1 = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
456
- interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
457
- /** Gap between children. Default uses --entropix-space-layout-stack token */
458
- gap?: SpacingSize$1;
459
- /** Cross-axis alignment */
460
- align?: "start" | "center" | "end" | "stretch";
461
- /** Whether to take full width */
462
- fullWidth?: boolean;
463
- /** Render as a different element */
464
- as?: React.ElementType;
465
- }
466
- /**
467
- * Stack — vertical flex layout primitive.
468
- *
469
- * Uses the `space.layout.stack` token (16px) as default gap.
470
- *
471
- * ```tsx
472
- * <Stack gap="lg" align="center">
473
- * <Button>First</Button>
474
- * <Button>Second</Button>
475
- * </Stack>
476
- * ```
477
- */
478
- declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<HTMLDivElement>>;
479
-
480
- type SpacingSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
481
- interface InlineProps extends React.HTMLAttributes<HTMLDivElement> {
482
- /** Gap between children. Default uses --entropix-space-layout-inline token */
483
- gap?: SpacingSize;
484
- /** Cross-axis alignment */
485
- align?: "start" | "center" | "end" | "stretch" | "baseline";
486
- /** Main-axis justification */
487
- justify?: "start" | "center" | "end" | "between" | "around";
488
- /** Whether to wrap children */
489
- wrap?: boolean;
490
- /** Render as a different element */
491
- as?: React.ElementType;
492
- }
493
- /**
494
- * Inline — horizontal flex layout primitive.
495
- *
496
- * Uses the `space.layout.inline` token (12px) as default gap.
497
- *
498
- * ```tsx
499
- * <Inline gap="sm" justify="between" wrap>
500
- * <Button variant="primary">Save</Button>
501
- * <Button variant="ghost">Cancel</Button>
502
- * </Inline>
503
- * ```
504
- */
505
- declare const Inline: react.ForwardRefExoticComponent<InlineProps & react.RefAttributes<HTMLDivElement>>;
506
-
507
- type ContainerSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
508
- interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
509
- /** Maximum width constraint. Default: "lg" (1024px) */
510
- maxWidth?: ContainerSize;
511
- /** Whether to center children vertically */
512
- center?: boolean;
513
- /** Render as a different element */
514
- as?: React.ElementType;
515
- }
516
- /**
517
- * Container — page-level width constraint with horizontal margins.
518
- *
519
- * Uses the `space.layout.page-margin` token (24px) for horizontal padding.
520
- * Centers itself horizontally via auto margins.
521
- *
522
- * ```tsx
523
- * <Container maxWidth="lg">
524
- * <Stack gap="xl">
525
- * <h1>Page Title</h1>
526
- * <p>Content</p>
527
- * </Stack>
528
- * </Container>
529
- * ```
530
- */
531
- declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLDivElement>>;
532
-
533
- interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {
534
- /** Orientation of the divider */
535
- orientation?: "horizontal" | "vertical";
536
- /** Spacing above and below (or left and right for vertical) */
537
- spacing?: "sm" | "md" | "lg";
538
- }
539
- /**
540
- * Divider — visual separator line.
541
- *
542
- * Uses the `color.border.default` token for line color.
543
- *
544
- * ```tsx
545
- * <Stack>
546
- * <p>Section A</p>
547
- * <Divider spacing="md" />
548
- * <p>Section B</p>
549
- * </Stack>
550
- *
551
- * <Inline>
552
- * <span>Left</span>
553
- * <Divider orientation="vertical" spacing="sm" />
554
- * <span>Right</span>
555
- * </Inline>
556
- * ```
557
- */
558
- declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLHRElement>>;
559
-
560
- export { Accordion, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, BREAKPOINTS, type Breakpoint, Button, type ButtonProps, Checkbox, type CheckboxProps, Container, type ContainerProps, type ContainerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Divider, type DividerProps, Inline, type InlineProps, Input, type InputProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, type MenuProps, MenuTrigger, type MenuTriggerProps, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, Select, SelectContent, type SelectContentProps, SelectOption, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerProps, type SpacingSize$1 as SpacingSize, Stack, type StackProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Textarea, type TextareaProps, Toggle, type ToggleProps, mapAccessibilityToAria, useBreakpoint, useBreakpointValue, useFocusRestore, useFocusTrap, useKeyboardHandler, useMediaQuery };
100
+ export { BREAKPOINTS, type Breakpoint, mapAccessibilityToAria, useBreakpoint, useBreakpointValue, useFocusRestore, useFocusTrap, useKeyboardHandler, useMediaQuery };