@optiaxiom/react 0.1.0-next.12 → 0.1.0-next.14

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 (117) hide show
  1. package/dist/{PopoverContent-DGBVbvBc.d.ts → PopoverContent-DIhLXmjU.d.ts} +49 -54
  2. package/dist/accordion/Accordion.js +4 -3
  3. package/dist/accordion-content/AccordionContent.js +1 -1
  4. package/dist/accordion-context/AccordionContext.js +5 -0
  5. package/dist/accordion-item/AccordionItem.js +4 -1
  6. package/dist/accordion-trigger/AccordionTrigger-css.js +5 -3
  7. package/dist/accordion-trigger/AccordionTrigger.js +12 -20
  8. package/dist/alert/Alert-css.js +1 -1
  9. package/dist/alert-dialog/AlertDialog-css.js +2 -6
  10. package/dist/alert-dialog/AlertDialog.js +6 -25
  11. package/dist/alert-dialog-action/AlertDialogAction.js +16 -0
  12. package/dist/alert-dialog-cancel/AlertDialogCancel.js +14 -0
  13. package/dist/alert-dialog-context/AlertDialogContext.js +5 -0
  14. package/dist/alert-dialog-description/AlertDialogDescription-css.js +7 -0
  15. package/dist/alert-dialog-description/AlertDialogDescription.js +12 -0
  16. package/dist/alert-dialog-footer/AlertDialogFooter-css.js +8 -0
  17. package/dist/alert-dialog-footer/AlertDialogFooter.js +11 -0
  18. package/dist/alert-dialog-title/AlertDialogTitle.js +24 -0
  19. package/dist/assets/src/accordion-trigger/AccordionTrigger.css.ts.vanilla-DWIMlWE2.css +16 -0
  20. package/dist/assets/src/alert-dialog/{AlertDialog.css.ts.vanilla-WdIe6m3g.css → AlertDialog.css.ts.vanilla-CpKGfNgS.css} +0 -6
  21. package/dist/assets/src/alert-dialog-description/AlertDialogDescription.css.ts.vanilla-B7BawTGq.css +6 -0
  22. package/dist/assets/src/alert-dialog-footer/AlertDialogFooter.css.ts.vanilla-3HiYmspb.css +6 -0
  23. package/dist/assets/src/avatar/Avatar.css.ts.vanilla-DxtsIDr-.css +24 -0
  24. package/dist/assets/src/box/{Box.css.ts.vanilla-D1mbecuN.css → Box.css.ts.vanilla-DLsoitAb.css} +5 -0
  25. package/dist/assets/src/button/{Button.css.ts.vanilla-BVWox07Y.css → Button.css.ts.vanilla-DeHH8Xkd.css} +43 -34
  26. package/dist/assets/src/command-item/CommandItem.css.ts.vanilla-ml8xjFWy.css +17 -0
  27. package/dist/assets/src/command-list/CommandList.css.ts.vanilla-1Rf8xvwM.css +9 -0
  28. package/dist/assets/src/pill/Pill.css.ts.vanilla-CMi1obNV.css +12 -0
  29. package/dist/assets/src/sprinkles/{sprinkles.css.ts.vanilla-DVqWpdFR.css → sprinkles.css.ts.vanilla-o1FSIYj0.css} +2292 -2243
  30. package/dist/assets/src/styles/{theme.css.ts.vanilla-DWW2Oo9s.css → theme.css.ts.vanilla-D9K5B5ZA.css} +10 -6
  31. package/dist/assets/src/table/Table.css.ts.vanilla-C9ntYW9X.css +9 -0
  32. package/dist/assets/src/table-body/TableBody.css.ts.vanilla-WI2VmycQ.css +6 -0
  33. package/dist/assets/src/table-cell/TableCell.css.ts.vanilla-Bn9ccAMh.css +10 -0
  34. package/dist/assets/src/table-header-cell/TableHeaderCell.css.ts.vanilla-DEMkJMmk.css +6 -0
  35. package/dist/assets/src/toast/{Toast.css.ts.vanilla-N6bXbnrT.css → Toast.css.ts.vanilla-D1qN8JIH.css} +6 -7
  36. package/dist/avatar/Avatar-css.js +7 -6
  37. package/dist/avatar/Avatar.js +6 -6
  38. package/dist/avatar-context/AvatarContext.js +2 -2
  39. package/dist/avatar-group/AvatarGroup-css.js +1 -1
  40. package/dist/avatar-group/AvatarGroup.js +5 -21
  41. package/dist/axiom-provider/AxiomProvider.js +7 -0
  42. package/dist/badge/Badge-css.js +1 -1
  43. package/dist/box/Box-css.js +2 -2
  44. package/dist/box/Box.js +10 -9
  45. package/dist/button/Button-css.js +9 -7
  46. package/dist/button/Button.js +19 -10
  47. package/dist/button-group/ButtonGroup-css.js +1 -1
  48. package/dist/checkbox/Checkbox-css.js +1 -1
  49. package/dist/checkbox/Checkbox.js +7 -10
  50. package/dist/combobox/Combobox.js +16 -8
  51. package/dist/combobox-content/ComboboxContent.js +8 -44
  52. package/dist/combobox-context/ComboboxContext.js +3 -5
  53. package/dist/combobox-multi-trigger/ComboboxMultiTrigger.js +34 -0
  54. package/dist/combobox-single-trigger/ComboboxSingleTrigger.js +17 -0
  55. package/dist/combobox-trigger/ComboboxTrigger.js +15 -11
  56. package/dist/command-checkbox-item/CommandCheckboxItem.js +58 -0
  57. package/dist/command-empty/CommandEmpty.js +1 -1
  58. package/dist/command-footer/CommandFooter-css.js +6 -0
  59. package/dist/command-footer/CommandFooter.js +13 -0
  60. package/dist/command-item/CommandItem-css.js +3 -3
  61. package/dist/command-item/CommandItem.js +26 -10
  62. package/dist/command-list/CommandList-css.js +7 -0
  63. package/dist/command-list/CommandList.js +3 -2
  64. package/dist/control-base/ControlBase-css.js +1 -1
  65. package/dist/control-base/ControlBase.js +3 -3
  66. package/dist/dialog-title/DialogTitle.js +2 -2
  67. package/dist/grid/Grid.js +1 -1
  68. package/dist/heading/Heading.js +2 -2
  69. package/dist/index.d.ts +164 -75
  70. package/dist/index.js +8 -0
  71. package/dist/input/Input-css.js +1 -1
  72. package/dist/input/Input.js +2 -2
  73. package/dist/input-base/InputBase-css.js +1 -1
  74. package/dist/link/Link-css.js +1 -1
  75. package/dist/menu-item/MenuItem-css.js +1 -1
  76. package/dist/pagination/Pagination-css.js +1 -1
  77. package/dist/pill/Pill-css.js +8 -0
  78. package/dist/pill/Pill.js +39 -0
  79. package/dist/radio-group-item/RadioGroupItem-css.js +1 -1
  80. package/dist/radio-group-item/RadioGroupItem.js +4 -7
  81. package/dist/spinner/Spinner.js +56 -0
  82. package/dist/sprinkles/sprinkles-css.js +3 -3
  83. package/dist/styles/theme-css.js +2 -2
  84. package/dist/switch/Switch-css.js +1 -1
  85. package/dist/switch/Switch.js +4 -7
  86. package/dist/table/Table-css.js +8 -0
  87. package/dist/table/Table.js +11 -0
  88. package/dist/table-body/TableBody-css.js +7 -0
  89. package/dist/table-body/TableBody.js +11 -0
  90. package/dist/table-cell/TableCell-css.js +9 -0
  91. package/dist/table-cell/TableCell.js +13 -0
  92. package/dist/table-head/TableHead.js +10 -0
  93. package/dist/table-header-cell/TableHeaderCell-css.js +7 -0
  94. package/dist/table-header-cell/TableHeaderCell.js +11 -0
  95. package/dist/table-row/TableRow-css.js +7 -0
  96. package/dist/table-row/TableRow.js +11 -0
  97. package/dist/tabs-list/TabsList-css.js +1 -1
  98. package/dist/tabs-trigger/TabsTrigger-css.js +1 -1
  99. package/dist/textarea/Textarea.js +13 -5
  100. package/dist/toast/Toast-css.js +3 -2
  101. package/dist/toast/Toast.js +2 -2
  102. package/dist/toast-action/ToastAction.js +1 -1
  103. package/dist/toast-provider/ToastProvider-css.js +1 -1
  104. package/dist/toggle/Toggle.js +13 -0
  105. package/dist/tokens/colors.js +4 -3
  106. package/dist/tokens/size.js +2 -1
  107. package/dist/tooltip/Tooltip.js +19 -5
  108. package/dist/unstable.d.ts +222 -34
  109. package/dist/unstable.js +11 -1
  110. package/package.json +1 -1
  111. package/dist/assets/src/accordion-trigger/AccordionTrigger.css.ts.vanilla-B3KNV6RG.css +0 -6
  112. package/dist/assets/src/avatar/Avatar.css.ts.vanilla-esFrnsM7.css +0 -12
  113. package/dist/assets/src/chip/Chip.css.ts.vanilla-SD4SsrSx.css +0 -26
  114. package/dist/assets/src/command-item/CommandItem.css.ts.vanilla-DUMU-Chn.css +0 -25
  115. package/dist/chip/Chip-css.js +0 -8
  116. package/dist/chip/Chip.js +0 -31
  117. /package/dist/assets/src/{avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css → table-row/TableRow.css.ts.vanilla-4BGjgIuZ.css} +0 -0
@@ -82,8 +82,9 @@
82
82
  --ax-colors-neutral-1000: #1C2029;
83
83
  --ax-colors-neutral-1100: #171A23;
84
84
  --ax-colors-neutral-1200: #091E42;
85
+ --ax-colors-neutral-50-6: #F9FAFC0F;
85
86
  --ax-colors-neutral-50-32: #F9FAFC52;
86
- --ax-colors-neutral-1200-5: #091E420D;
87
+ --ax-colors-neutral-1200-4: #091E420A;
87
88
  --ax-colors-neutral-1200-12: #091E421F;
88
89
  --ax-colors-neutral-1200-18: #091E422E;
89
90
  --ax-colors-neutral-1200-22: #091E4238;
@@ -138,7 +139,7 @@
138
139
  --ax-colors-bg-error-solid-hover: #B21313;
139
140
  --ax-colors-bg-information: #E7F3FE;
140
141
  --ax-colors-bg-information-solid: #1668AC;
141
- --ax-colors-bg-input-disabled: #091E420D;
142
+ --ax-colors-bg-input-disabled: #091E420A;
142
143
  --ax-colors-bg-neutral: #F5F6FA;
143
144
  --ax-colors-bg-neutral-inverse: #2E3442;
144
145
  --ax-colors-bg-neutral-inverse-hover: #262B37;
@@ -294,7 +295,8 @@
294
295
  --ax-size-sm: 1.5rem;
295
296
  --ax-size-md: 2rem;
296
297
  --ax-size-lg: 2.5rem;
297
- --ax-size-xl: 4rem;
298
+ --ax-size-xl: 3rem;
299
+ --ax-size-5xl: 5rem;
298
300
  --ax-size-1-2: 50%;
299
301
  --ax-size-1-3: 33.333333%;
300
302
  --ax-size-2-3: 66.666666%;
@@ -419,8 +421,9 @@
419
421
  --ax-colors-neutral-1000: #1C2029;
420
422
  --ax-colors-neutral-1100: #171A23;
421
423
  --ax-colors-neutral-1200: #091E42;
424
+ --ax-colors-neutral-50-6: #F9FAFC0F;
422
425
  --ax-colors-neutral-50-32: #F9FAFC52;
423
- --ax-colors-neutral-1200-5: #091E420D;
426
+ --ax-colors-neutral-1200-4: #091E420A;
424
427
  --ax-colors-neutral-1200-12: #091E421F;
425
428
  --ax-colors-neutral-1200-18: #091E422E;
426
429
  --ax-colors-neutral-1200-22: #091E4238;
@@ -475,7 +478,7 @@
475
478
  --ax-colors-bg-error-solid-hover: #B21313;
476
479
  --ax-colors-bg-information: #1C2B41;
477
480
  --ax-colors-bg-information-solid: #1668AC;
478
- --ax-colors-bg-input-disabled: #091E420D;
481
+ --ax-colors-bg-input-disabled: #091E420A;
479
482
  --ax-colors-bg-neutral: #1e293b;
480
483
  --ax-colors-bg-neutral-inverse: #E9EDF5;
481
484
  --ax-colors-bg-neutral-inverse-hover: #CACFDC;
@@ -631,7 +634,8 @@
631
634
  --ax-size-sm: 1.5rem;
632
635
  --ax-size-md: 2rem;
633
636
  --ax-size-lg: 2.5rem;
634
- --ax-size-xl: 4rem;
637
+ --ax-size-xl: 3rem;
638
+ --ax-size-5xl: 5rem;
635
639
  --ax-size-1-2: 50%;
636
640
  --ax-size-1-3: 33.333333%;
637
641
  --ax-size-2-3: 66.666666%;
@@ -0,0 +1,9 @@
1
+ @layer optiaxiom._1kfj4ga1;
2
+ @layer optiaxiom._1kfj4ga1 {
3
+ .n7dxra0 {
4
+ caption-side: bottom;
5
+ }
6
+ .n7dxra1 {
7
+ position: relative;
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ @layer optiaxiom._1kfj4ga1;
2
+ @layer optiaxiom._1kfj4ga1 {
3
+ .gt6egm0 {
4
+ position: relative;
5
+ }
6
+ }
@@ -0,0 +1,10 @@
1
+ @layer optiaxiom._1kfj4ga1;
2
+ @layer optiaxiom._1kfj4ga1 {
3
+ ._15qsgdy0 {
4
+ vertical-align: middle;
5
+ word-break: break-word;
6
+ }
7
+ .ozx0pm0:hover ._15qsgdy0 {
8
+ background-color: var(--ax-colors-bg-input-disabled);
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ @layer optiaxiom._1kfj4ga1;
2
+ @layer optiaxiom._1kfj4ga1 {
3
+ ._1nhtayz0 {
4
+ vertical-align: middle;
5
+ }
6
+ }
@@ -32,7 +32,6 @@
32
32
  }
33
33
  ._1egjidm5[data-state="closed"] ~ ._1egjidm5 {
34
34
  transition: translate 100ms ease-in 100ms;
35
- translate: 0 -100%;
36
35
  }
37
36
  ._1egjidm5[data-state="open"] {
38
37
  animation: _1egjidm3 150ms cubic-bezier(0.16, 1, 0.3, 1);
@@ -49,28 +48,28 @@
49
48
  translate: var(--radix-toast-swipe-move-x) var(--radix-toast-swipe-move-y);
50
49
  }
51
50
  ._1egjidm5[data-swipe-direction="down"] {
52
- --_1egjidm1: 0 calc(100% + 24px);
51
+ --_1egjidm1: 0 calc(100% + var(--ax-spacing-24));
53
52
  }
54
53
  ._1egjidm5[data-swipe-direction="left"] {
55
- --_1egjidm1: calc(-100% - 24px) 0;
54
+ --_1egjidm1: calc(-100% - var(--ax-spacing-24)) 0;
56
55
  }
57
56
  ._1egjidm5[data-swipe-direction="right"] {
58
- --_1egjidm1: calc(100% + 24px) 0;
57
+ --_1egjidm1: calc(100% + var(--ax-spacing-24)) 0;
59
58
  }
60
59
  ._1egjidm5[data-swipe-direction="up"] {
61
- --_1egjidm1: 0 calc(-100% - 24px);
60
+ --_1egjidm1: 0 calc(-100% - var(--ax-spacing-24));
62
61
  }
63
62
  [data-position^="bottom"] ._1egjidm5:first-child {
64
63
  margin-bottom: auto;
65
64
  }
66
65
  [data-position^="bottom"] ._1egjidm5[data-state="closed"] ~ ._1egjidm5 {
67
- translate: 0 100%;
66
+ translate: 0 calc(100% + var(--ax-spacing-md));
68
67
  }
69
68
  [data-position^="top"] ._1egjidm5:last-child {
70
69
  margin-top: auto;
71
70
  }
72
71
  [data-position^="top"] ._1egjidm5[data-state="closed"] ~ ._1egjidm5 {
73
- translate: 0 -100%;
72
+ translate: 0 calc(-100% - var(--ax-spacing-md));
74
73
  }
75
74
  ._1egjidm6 {
76
75
  --_1egjidm0: var(--ax-colors-red-300);
@@ -1,10 +1,11 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/styles/theme.css.ts.vanilla-DWW2Oo9s.css';
3
- import './../assets/src/avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css';
4
- import './../assets/src/avatar/Avatar.css.ts.vanilla-esFrnsM7.css';
2
+ import './../assets/src/styles/theme.css.ts.vanilla-D9K5B5ZA.css';
3
+ import './../assets/src/table-row/TableRow.css.ts.vanilla-4BGjgIuZ.css';
4
+ import './../assets/src/avatar/Avatar.css.ts.vanilla-DxtsIDr-.css';
5
5
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
6
6
 
7
- var avatar = recipeRuntime({base:[{alignItems:'center',display:'inline-flex',justifyContent:'center',overflow:'hidden',rounded:'full'},'t64xwp0'],variants:{colorScheme:{blue:{bg:'blue.50',color:'blue.500'},brand:{bg:'brand.50',color:'brand.500'},dark:{bg:'dark.50',color:'dark.500'},gray:{bg:'gray.50',color:'gray.500'},green:{bg:'green.50',color:'green.500'},magenta:{bg:'magenta.50',color:'magenta.500'},neutral:{bg:'neutral.50',color:'neutral.500'},orange:{bg:'orange.50',color:'orange.500'},purple:{bg:'purple.50',color:'purple.500'},red:{bg:'red.50',color:'red.500'},slate:{bg:'slate.50',color:'slate.500'},yellow:{bg:'yellow.50',color:'yellow.500'}},size:{xs:{fontSize:'xs',size:'xs'},sm:{fontSize:'sm',size:'sm'},md:{fontSize:'md',size:'md'},lg:{fontSize:'lg',size:'lg'},xl:{fontSize:'xl',size:'xl'}}}});
8
- var fallback = recipeRuntime({base:{alignItems:'center',display:'flex',justifyContent:'center',rounded:'inherit',size:'full',textTransform:'uppercase'},variants:{size:{xs:{px:'4'},sm:{px:'6'},md:{px:'8'},lg:{px:'10'},xl:{px:'20'}}}});
7
+ var avatar = recipeRuntime({base:[{alignItems:'center',display:'inline-flex',fontWeight:'500',justifyContent:'center',overflow:'hidden',rounded:'full'},'t64xwp0'],variants:{colorScheme:{blue:{bg:'blue.500',color:'white'},brand:{bg:'brand.500',color:'white'},dark:{bg:'dark.500',color:'white'},gray:{bg:'gray.500',color:'white'},green:{bg:'green.500',color:'white'},magenta:{bg:'magenta.500',color:'white'},neutral:{bg:'neutral.150',color:'bg.neutral.inverse'},orange:{bg:'orange.500',color:'white'},purple:{bg:'purple.500',color:'white'},red:{bg:'red.500',color:'white'},slate:{bg:'slate.500',color:'white'},yellow:{bg:'yellow.500',color:'white'}},size:{xs:[{fontSize:'xs',fontWeight:'400',size:'xs'},'t64xwp1'],sm:[{fontSize:'xs',size:'sm'},'t64xwp2'],md:[{fontSize:'md',size:'md'},'t64xwp3'],xl:[{fontSize:'2xl',size:'xl'},'t64xwp4'],'5xl':[{fontSize:'4xl',size:'5xl'},'t64xwp5']}}});
8
+ var fallback = recipeRuntime({base:{alignItems:'center',display:'flex',justifyContent:'center',rounded:'inherit',size:'full',textTransform:'uppercase'}});
9
+ var icon = recipeRuntime({base:[{h:'auto'}],variants:{size:{xs:{w:'12'},sm:{w:'12'},md:{w:'16'},xl:{w:'20'},'5xl':{w:'32'}}}});
9
10
 
10
- export { avatar, fallback };
11
+ export { avatar, fallback, icon };
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import * as RadixAvatar from '@radix-ui/react-avatar';
3
3
  import { forwardRef, useContext } from 'react';
4
- import { AvatarGroupContext } from '../avatar-context/AvatarContext.js';
4
+ import { AvatarContext } from '../avatar-context/AvatarContext.js';
5
5
  import { Box } from '../box/Box.js';
6
- import { avatar, fallback } from './Avatar-css.js';
6
+ import { avatar, fallback, icon } from './Avatar-css.js';
7
7
 
8
8
  const FALLBACK_DELAY_IN_MS = 600;
9
9
  function getInitialsFromName(name) {
@@ -17,14 +17,14 @@ const Avatar = forwardRef(
17
17
  children,
18
18
  className,
19
19
  colorScheme = "neutral",
20
- icon,
20
+ icon: icon$1,
21
21
  name,
22
22
  size: sizeProp,
23
23
  src,
24
24
  ...props
25
25
  }, ref) => {
26
- const groupContext = useContext(AvatarGroupContext);
27
- const size = sizeProp || groupContext?.size || "md";
26
+ const context = useContext(AvatarContext);
27
+ const size = sizeProp || context?.size || "md";
28
28
  return /* @__PURE__ */ jsx(
29
29
  Box,
30
30
  {
@@ -33,7 +33,7 @@ const Avatar = forwardRef(
33
33
  ...props,
34
34
  children: /* @__PURE__ */ jsxs(RadixAvatar.Root, { ref, children: [
35
35
  /* @__PURE__ */ jsx(Box, { asChild: true, objectFit: "cover", rounded: "inherit", size: "full", children: /* @__PURE__ */ jsx(RadixAvatar.Image, { alt: name, src }) }),
36
- /* @__PURE__ */ jsx(Box, { asChild: true, ...fallback({ size }), children: /* @__PURE__ */ jsx(RadixAvatar.Fallback, { delayMs: FALLBACK_DELAY_IN_MS, children: icon ? icon : name ? getInitialsFromName(name) : children }) })
36
+ /* @__PURE__ */ jsx(Box, { asChild: true, ...fallback({}), children: /* @__PURE__ */ jsx(RadixAvatar.Fallback, { delayMs: FALLBACK_DELAY_IN_MS, children: icon$1 ? /* @__PURE__ */ jsx(Box, { asChild: true, ...icon({ size }), children: icon$1 }) : name ? getInitialsFromName(name) : children }) })
37
37
  ] })
38
38
  }
39
39
  );
@@ -1,7 +1,7 @@
1
1
  import { createContext } from 'react';
2
2
 
3
- const AvatarGroupContext = createContext({
3
+ const AvatarContext = createContext({
4
4
  size: void 0
5
5
  });
6
6
 
7
- export { AvatarGroupContext };
7
+ export { AvatarContext };
@@ -1,5 +1,5 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css';
2
+ import './../assets/src/table-row/TableRow.css.ts.vanilla-4BGjgIuZ.css';
3
3
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
4
4
 
5
5
  var avatarGroup = recipeRuntime({base:['_11600940',{display:'flex'}]});
@@ -1,28 +1,12 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef, Children } from 'react';
3
- import { Avatar } from '../avatar/Avatar.js';
4
- import { AvatarGroupContext } from '../avatar-context/AvatarContext.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { AvatarContext } from '../avatar-context/AvatarContext.js';
5
4
  import { Box } from '../box/Box.js';
6
- import { HoverCard } from '../hover-card/HoverCard.js';
7
- import { HoverCardContent } from '../hover-card-content/HoverCardContent.js';
8
- import { HoverCardTrigger } from '../hover-card-trigger/HoverCardTrigger.js';
9
5
  import { avatarGroup } from './AvatarGroup-css.js';
10
6
 
11
7
  const AvatarGroup = forwardRef(
12
- ({ children, className, maxItems = 3, size = "md", ...props }, ref) => {
13
- const allChildren = Children.toArray(children);
14
- const visibleChildren = allChildren.slice(0, maxItems);
15
- const overflowChildren = allChildren.slice(maxItems);
16
- return /* @__PURE__ */ jsxs(Box, { ref, ...avatarGroup({}, className), ...props, children: [
17
- /* @__PURE__ */ jsx(AvatarGroupContext.Provider, { value: { size }, children: visibleChildren }),
18
- overflowChildren.length > 0 && /* @__PURE__ */ jsxs(HoverCard, { children: [
19
- /* @__PURE__ */ jsx(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Avatar, { colorScheme: "gray", size, children: [
20
- "+",
21
- overflowChildren.length
22
- ] }) }),
23
- /* @__PURE__ */ jsx(HoverCardContent, { flexDirection: "row", children: overflowChildren.map((child, index) => /* @__PURE__ */ jsx(Box, { asChild: true, children: child }, index)) })
24
- ] })
25
- ] });
8
+ ({ children, className, size = "md", ...props }, ref) => {
9
+ return /* @__PURE__ */ jsx(Box, { ref, ...avatarGroup({}, className), ...props, children: /* @__PURE__ */ jsx(AvatarContext.Provider, { value: { size }, children }) });
26
10
  }
27
11
  );
28
12
  AvatarGroup.displayName = "@optiaxiom/react/AvatarGroup";
@@ -0,0 +1,7 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import * as RadixTooltip from '@radix-ui/react-tooltip';
3
+
4
+ const AxiomProvider = ({ children, tooltip }) => /* @__PURE__ */ jsx(RadixTooltip.Provider, { ...tooltip, children });
5
+ AxiomProvider.displayName = "@optiaxiom/react/AxiomProvider";
6
+
7
+ export { AxiomProvider };
@@ -1,5 +1,5 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/styles/theme.css.ts.vanilla-DWW2Oo9s.css';
2
+ import './../assets/src/styles/theme.css.ts.vanilla-D9K5B5ZA.css';
3
3
  import './../assets/src/badge/Badge.css.ts.vanilla-D5YRrHke.css';
4
4
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/styles/theme.css.ts.vanilla-DWW2Oo9s.css';
3
- import './../assets/src/box/Box.css.ts.vanilla-D1mbecuN.css';
2
+ import './../assets/src/styles/theme.css.ts.vanilla-D9K5B5ZA.css';
3
+ import './../assets/src/box/Box.css.ts.vanilla-DLsoitAb.css';
4
4
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
5
5
 
6
6
  var box = recipeRuntime({base:'_1jn0ep0'});
package/dist/box/Box.js CHANGED
@@ -3,31 +3,32 @@ import '@fontsource-variable/fira-code';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import clsx from 'clsx';
5
5
  import 'inter-ui/inter-variable.css';
6
- import { forwardRef, isValidElement } from 'react';
6
+ import { createContext, forwardRef, useContext } from 'react';
7
7
  import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
8
8
  import { sprinkles } from '../sprinkles/sprinkles-css.js';
9
9
  import { box } from './Box-css.js';
10
10
 
11
+ const SprinklesContext = createContext(void 0);
11
12
  const Box = forwardRef(
12
13
  ({ asChild, className, ...props }, ref) => {
13
14
  const Comp = asChild ? Slot : "div";
14
15
  const { restProps, sprinkleProps } = extractSprinkles(props);
15
- if (asChild && isValidElement(props.children)) {
16
- const { sprinkleProps: childrenSprinkleProps } = extractSprinkles(
17
- props.children.props
18
- );
19
- for (const key in childrenSprinkleProps) {
20
- delete sprinkleProps[key];
16
+ const outerSprinkleProps = useContext(SprinklesContext);
17
+ if (className && outerSprinkleProps) {
18
+ for (const [key, value] of Object.entries(outerSprinkleProps)) {
19
+ if (key in sprinkleProps) {
20
+ className = (" " + className + " ").replace(" " + sprinkles({ [key]: value }) + " ", " ").trim();
21
+ }
21
22
  }
22
23
  }
23
- return /* @__PURE__ */ jsx(
24
+ return /* @__PURE__ */ jsx(SprinklesContext.Provider, { value: asChild ? sprinkleProps : void 0, children: /* @__PURE__ */ jsx(
24
25
  Comp,
25
26
  {
26
27
  ref,
27
28
  ...box({}, clsx(className, sprinkles(sprinkleProps))),
28
29
  ...restProps
29
30
  }
30
- );
31
+ ) });
31
32
  }
32
33
  );
33
34
  Box.displayName = "@optiaxiom/react/Box";
@@ -1,11 +1,13 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/styles/theme.css.ts.vanilla-DWW2Oo9s.css';
3
- import './../assets/src/avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css';
4
- import './../assets/src/button/Button.css.ts.vanilla-BVWox07Y.css';
2
+ import './../assets/src/styles/theme.css.ts.vanilla-D9K5B5ZA.css';
3
+ import './../assets/src/table-row/TableRow.css.ts.vanilla-4BGjgIuZ.css';
4
+ import './../assets/src/button/Button.css.ts.vanilla-DeHH8Xkd.css';
5
5
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
6
6
 
7
- var button = recipeRuntime({base:[{alignItems:'center',display:'inline-flex',flexDirection:'row',justifyContent:'center',transition:'colors'},'_1gqmi2d6'],variants:{colorScheme:{danger:'_1gqmi2d7',neutral:'_1gqmi2d8',primary:'_1gqmi2d9'},iconOnly:{false:'_1gqmi2da',true:{}},size:{sm:{fontSize:'sm',h:'sm'},md:{fontSize:'md',gap:'2',h:'md'},lg:{fontSize:'md',gap:'4',h:'lg'}},variant:{outline:'_1gqmi2db',solid:'_1gqmi2dc',subtle:'_1gqmi2dd'}},variantsCompounded:[{style:'_1gqmi2de',variants:{colorScheme:'neutral',variant:'outline'}},{style:'_1gqmi2df',variants:{iconOnly:true,size:'sm'}},{style:'_1gqmi2dg',variants:{iconOnly:false,size:'sm'}},{style:'_1gqmi2dh',variants:{iconOnly:true,size:'md'}},{style:'_1gqmi2di',variants:{iconOnly:false,size:'md'}},{style:'_1gqmi2dj',variants:{iconOnly:true,size:'lg'}},{style:'_1gqmi2dk',variants:{iconOnly:false,size:'lg'}}]});
8
- var icon = recipeRuntime({base:{h:'auto',w:'20'}});
9
- var label = recipeRuntime({base:{flexDirection:'row',gap:'4',mx:'4'}});
7
+ var button = recipeRuntime({base:['_1gqmi2d6',{alignItems:'center',display:'inline-flex',flexDirection:'row',justifyContent:'center',transition:'colors'},'_1gqmi2d7'],variants:{colorScheme:{danger:'_1gqmi2d8',neutral:'_1gqmi2d9',primary:'_1gqmi2da'},iconOnly:{false:'_1gqmi2db',true:{}},size:{sm:{fontSize:'sm',h:'sm'},md:{fontSize:'md',gap:'2',h:'md'},lg:{fontSize:'md',gap:'4',h:'lg'}},variant:{outline:'_1gqmi2dc',solid:'_1gqmi2dd',subtle:'_1gqmi2de'}},variantsCompounded:[{style:'_1gqmi2df',variants:{colorScheme:'neutral',variant:'outline'}},{style:'_1gqmi2dg',variants:{iconOnly:true,size:'sm'}},{style:'_1gqmi2dh',variants:{iconOnly:false,size:'sm'}},{style:'_1gqmi2di',variants:{iconOnly:true,size:'md'}},{style:'_1gqmi2dj',variants:{iconOnly:false,size:'md'}},{style:'_1gqmi2dk',variants:{iconOnly:true,size:'lg'}},{style:'_1gqmi2dl',variants:{iconOnly:false,size:'lg'}}]});
8
+ var decorator = recipeRuntime({base:[{transition:'opacity'},'_1gqmi2dm']});
9
+ var icon = recipeRuntime({base:[{h:'auto',w:'20'},{transition:'opacity'},'_1gqmi2dm']});
10
+ var label = recipeRuntime({base:[{flexDirection:'row',gap:'4',mx:'4'},{transition:'opacity'},'_1gqmi2dm']});
11
+ var spinner = recipeRuntime({base:'_1gqmi2dn'});
10
12
 
11
- export { button, icon, label };
13
+ export { button, decorator, icon, label, spinner };
@@ -1,18 +1,23 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Slottable, Slot } from '@radix-ui/react-slot';
3
3
  import { forwardRef, isValidElement, cloneElement } from 'react';
4
+ import { AnimatePresence } from '../animate-presence/AnimatePresence.js';
5
+ import '../animate-presence/PresenceContext.js';
4
6
  import { Box } from '../box/Box.js';
5
7
  import { Flex } from '../flex/Flex.js';
8
+ import { Spinner } from '../spinner/Spinner.js';
6
9
  import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
7
10
  import '../sprinkles/sprinkles-css.js';
11
+ import { Transition } from '../transition/Transition.js';
8
12
  import '../utils/conditions.js';
9
13
  import { fallbackSpan } from '../utils/fallbackSpan.js';
10
- import { icon, label, button } from './Button-css.js';
14
+ import { icon, label, button, spinner, decorator } from './Button-css.js';
11
15
 
12
16
  const appearances = {
13
17
  danger: { colorScheme: "danger", variant: "solid" },
14
18
  "danger-outline": { colorScheme: "danger", variant: "outline" },
15
19
  default: { colorScheme: "neutral", variant: "outline" },
20
+ inverse: { colorScheme: "neutral", variant: "solid" },
16
21
  primary: { colorScheme: "primary", variant: "solid" },
17
22
  secondary: { colorScheme: "neutral", variant: "subtle" }
18
23
  };
@@ -22,7 +27,6 @@ const Button = forwardRef(
22
27
  asChild,
23
28
  children,
24
29
  className,
25
- colorScheme: colorSchemeProp,
26
30
  disabled,
27
31
  endDecorator,
28
32
  icon: icon$1,
@@ -30,15 +34,13 @@ const Button = forwardRef(
30
34
  loading,
31
35
  size = "md",
32
36
  startDecorator,
33
- variant: variantProp,
34
37
  ...props
35
38
  }, ref) => {
36
39
  const Comp = asChild ? Slot : "button";
37
40
  const { restProps, sprinkleProps } = extractSprinkles(props);
38
41
  const presetProps = appearances[appearance];
39
- const colorScheme = colorSchemeProp ?? presetProps.colorScheme;
40
- const variant = variantProp ?? presetProps.variant;
41
- const isDisabled = Boolean(disabled || loading);
42
+ const colorScheme = presetProps.colorScheme;
43
+ const variant = presetProps.variant;
42
44
  let isIconOnly = Boolean(!children && icon$1);
43
45
  if (asChild) {
44
46
  const newElement = isValidElement(children) ? children : null;
@@ -62,7 +64,8 @@ const Button = forwardRef(
62
64
  Box,
63
65
  {
64
66
  asChild: true,
65
- "data-disabled": isDisabled ? "" : void 0,
67
+ "data-disabled": disabled ? "" : void 0,
68
+ "data-loading": loading ? "" : void 0,
66
69
  ...button(
67
70
  {
68
71
  colorScheme,
@@ -73,10 +76,16 @@ const Button = forwardRef(
73
76
  className
74
77
  ),
75
78
  ...sprinkleProps,
76
- children: /* @__PURE__ */ jsxs(Comp, { disabled: isDisabled, ref, ...restProps, children: [
77
- startDecorator,
79
+ children: /* @__PURE__ */ jsxs(Comp, { disabled: disabled || loading, ref, ...restProps, children: [
80
+ /* @__PURE__ */ jsx(AnimatePresence, { children: loading && /* @__PURE__ */ jsx(Transition, { duration: "sm", children: /* @__PURE__ */ jsx(Box, { "aria-hidden": "true", ...spinner(), children: /* @__PURE__ */ jsx(
81
+ Spinner,
82
+ {
83
+ colorScheme: variant === "solid" ? "inverse" : "default"
84
+ }
85
+ ) }) }) }),
86
+ startDecorator && /* @__PURE__ */ jsx(Box, { asChild: true, ...decorator(), children: fallbackSpan(startDecorator) }),
78
87
  /* @__PURE__ */ jsx(Slottable, { children }),
79
- endDecorator
88
+ endDecorator && /* @__PURE__ */ jsx(Box, { asChild: true, ...decorator(), children: fallbackSpan(endDecorator) })
80
89
  ] })
81
90
  }
82
91
  );
@@ -1,5 +1,5 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css';
2
+ import './../assets/src/table-row/TableRow.css.ts.vanilla-4BGjgIuZ.css';
3
3
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
4
4
 
5
5
  var buttonGroup = recipeRuntime({base:'_1sewcgl0'});
@@ -1,5 +1,5 @@
1
1
  import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
2
- import './../assets/src/styles/theme.css.ts.vanilla-DWW2Oo9s.css';
2
+ import './../assets/src/styles/theme.css.ts.vanilla-D9K5B5ZA.css';
3
3
  import './../assets/src/control-base/ControlBase.css.ts.vanilla-DGX7Yb9J.css';
4
4
  import './../assets/src/checkbox/Checkbox.css.ts.vanilla-w5cdPwHc.css';
5
5
  import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
@@ -5,25 +5,22 @@ import { Box } from '../box/Box.js';
5
5
  import { ControlBase } from '../control-base/ControlBase.js';
6
6
  import { IconCheck } from '../icons/IconCheck.js';
7
7
  import { IconMinus } from '../icons/IconMinus.js';
8
- import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
9
- import '../sprinkles/sprinkles-css.js';
10
8
  import { checkbox, indicator, iconChecked, iconIndeterminate } from './Checkbox-css.js';
11
9
 
12
10
  const Checkbox = forwardRef(
13
- ({ children, endDecorator, id, ...props }, ref) => {
14
- const { restProps, sprinkleProps } = extractSprinkles(props);
11
+ ({ children, defaultChecked, endDecorator, id, ...props }, ref) => {
15
12
  return /* @__PURE__ */ jsx(
16
13
  ControlBase,
17
14
  {
15
+ control: /* @__PURE__ */ jsx(Box, { asChild: true, ...checkbox(), children: /* @__PURE__ */ jsx(RadixCheckbox.Root, { defaultChecked, children: /* @__PURE__ */ jsx(Box, { asChild: true, ...indicator(), children: /* @__PURE__ */ jsxs(RadixCheckbox.Indicator, { children: [
16
+ /* @__PURE__ */ jsx(Box, { asChild: true, ...iconChecked(), children: /* @__PURE__ */ jsx(IconCheck, {}) }),
17
+ /* @__PURE__ */ jsx(Box, { asChild: true, ...iconIndeterminate(), children: /* @__PURE__ */ jsx(IconMinus, {}) })
18
+ ] }) }) }) }),
18
19
  endDecorator,
19
20
  id,
20
- label: children,
21
21
  ref,
22
- ...sprinkleProps,
23
- children: /* @__PURE__ */ jsx(Box, { asChild: true, ...checkbox(), children: /* @__PURE__ */ jsx(RadixCheckbox.Root, { ...restProps, children: /* @__PURE__ */ jsx(Box, { asChild: true, ...indicator(), children: /* @__PURE__ */ jsxs(RadixCheckbox.Indicator, { children: [
24
- /* @__PURE__ */ jsx(Box, { asChild: true, ...iconChecked(), children: /* @__PURE__ */ jsx(IconCheck, {}) }),
25
- /* @__PURE__ */ jsx(Box, { asChild: true, ...iconIndeterminate(), children: /* @__PURE__ */ jsx(IconMinus, {}) })
26
- ] }) }) }) })
22
+ ...props,
23
+ children
27
24
  }
28
25
  );
29
26
  }
@@ -1,28 +1,36 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
3
- import { useState } from 'react';
4
- import { ComboboxContext } from '../combobox-context/ComboboxContext.js';
3
+ import { ComboboxContextProvider } from '../combobox-context/ComboboxContext.js';
5
4
  import { Popover } from '../popover/Popover.js';
6
5
 
7
6
  const Combobox = ({
8
7
  children,
9
8
  defaultOpen,
10
9
  defaultValue = "",
11
- items = [],
10
+ mode = "single",
12
11
  onOpenChange,
13
- onSelect,
14
- open: openProp
12
+ onValueChange,
13
+ open: openProp,
14
+ value: valueProp
15
15
  }) => {
16
16
  const [open, setOpen] = useControllableState({
17
17
  defaultProp: defaultOpen,
18
18
  onChange: onOpenChange,
19
19
  prop: openProp
20
20
  });
21
- const [value, setValue] = useState(defaultValue);
21
+ const [value, setValue] = useControllableState({
22
+ defaultProp: defaultValue,
23
+ onChange: onValueChange,
24
+ prop: valueProp
25
+ });
22
26
  return /* @__PURE__ */ jsx(
23
- ComboboxContext.Provider,
27
+ ComboboxContextProvider,
24
28
  {
25
- value: { items, onSelect, open, setOpen, setValue, value },
29
+ mode,
30
+ open,
31
+ setOpen,
32
+ setValue,
33
+ value,
26
34
  children: /* @__PURE__ */ jsx(Popover, { onOpenChange: setOpen, open, children })
27
35
  }
28
36
  );
@@ -1,57 +1,21 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { forwardRef, useContext } from 'react';
3
- import { Box } from '../box/Box.js';
4
- import { ComboboxContext } from '../combobox-context/ComboboxContext.js';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { useComboboxContext } from '../combobox-context/ComboboxContext.js';
5
4
  import { Command } from '../command/Command.js';
6
- import { CommandEmpty } from '../command-empty/CommandEmpty.js';
7
5
  import { CommandInput } from '../command-input/CommandInput.js';
8
- import { CommandItem } from '../command-item/CommandItem.js';
9
- import { CommandList } from '../command-list/CommandList.js';
10
6
  import { CommandSeparator } from '../command-separator/CommandSeparator.js';
11
- import { Flex } from '../flex/Flex.js';
12
- import { IconCheck } from '../icons/IconCheck.js';
13
7
  import { PopoverContent } from '../popover-content/PopoverContent.js';
14
8
  import { Search } from '../search/Search.js';
15
9
 
16
10
  const ComboboxContent = forwardRef(
17
- ({ asChild, children, emptyResult, ...props }, ref) => {
18
- const context = useContext(ComboboxContext);
11
+ ({ asChild, children, ...props }, ref) => {
12
+ const context = useComboboxContext("Combobox");
19
13
  if (!context)
20
14
  throw new Error("ComboboxContent must be used within a Combobox");
21
- const { items, onSelect, setOpen, setValue, value } = context;
22
- return /* @__PURE__ */ jsx(PopoverContent, { asChild: true, p: "0", ref, ...props, children: asChild ? children : /* @__PURE__ */ jsxs(Command, { alignItems: "center", children: [
15
+ return /* @__PURE__ */ jsx(PopoverContent, { asChild: true, p: "0", ref, ...props, children: asChild ? children : /* @__PURE__ */ jsxs(Command, { children: [
23
16
  /* @__PURE__ */ jsx(CommandInput, { asChild: true, children: /* @__PURE__ */ jsx(Search, { m: "2" }) }),
24
- /* @__PURE__ */ jsx(CommandSeparator, {}),
25
- /* @__PURE__ */ jsx(CommandEmpty, { asChild: true, children: /* @__PURE__ */ jsx(Flex, { alignItems: "center", py: "4", children: emptyResult || "No results found" }) }),
26
- /* @__PURE__ */ jsx(CommandList, { maxH: "sm", mt: "4", overflow: "auto", children: items?.map((item) => /* @__PURE__ */ jsx(
27
- CommandItem,
28
- {
29
- keywords: [item.value, item.label],
30
- onSelect: (currentValue) => {
31
- setValue(currentValue === value ? "" : currentValue);
32
- setOpen(false);
33
- if (onSelect) {
34
- onSelect(currentValue);
35
- }
36
- },
37
- tabIndex: 0,
38
- value: item.value,
39
- children: /* @__PURE__ */ jsxs(
40
- Box,
41
- {
42
- display: "flex",
43
- flexDirection: "row",
44
- justifyContent: "space-between",
45
- w: "full",
46
- children: [
47
- item.label,
48
- value == item.value ? /* @__PURE__ */ jsx(Box, { color: "black", mr: "2", children: /* @__PURE__ */ jsx(IconCheck, {}) }) : /* @__PURE__ */ jsx(Fragment, {})
49
- ]
50
- }
51
- )
52
- },
53
- item.value
54
- )) })
17
+ /* @__PURE__ */ jsx(CommandSeparator, { alwaysRender: true }),
18
+ children
55
19
  ] }) });
56
20
  }
57
21
  );
@@ -1,7 +1,5 @@
1
- import { createContext } from 'react';
1
+ import { createContext } from '@radix-ui/react-context';
2
2
 
3
- const ComboboxContext = createContext(
4
- void 0
5
- );
3
+ const [ComboboxContextProvider, useComboboxContext] = createContext("Combobox");
6
4
 
7
- export { ComboboxContext };
5
+ export { ComboboxContextProvider, useComboboxContext };