@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.
- package/dist/{PopoverContent-DGBVbvBc.d.ts → PopoverContent-DIhLXmjU.d.ts} +49 -54
- package/dist/accordion/Accordion.js +4 -3
- package/dist/accordion-content/AccordionContent.js +1 -1
- package/dist/accordion-context/AccordionContext.js +5 -0
- package/dist/accordion-item/AccordionItem.js +4 -1
- package/dist/accordion-trigger/AccordionTrigger-css.js +5 -3
- package/dist/accordion-trigger/AccordionTrigger.js +12 -20
- package/dist/alert/Alert-css.js +1 -1
- package/dist/alert-dialog/AlertDialog-css.js +2 -6
- package/dist/alert-dialog/AlertDialog.js +6 -25
- package/dist/alert-dialog-action/AlertDialogAction.js +16 -0
- package/dist/alert-dialog-cancel/AlertDialogCancel.js +14 -0
- package/dist/alert-dialog-context/AlertDialogContext.js +5 -0
- package/dist/alert-dialog-description/AlertDialogDescription-css.js +7 -0
- package/dist/alert-dialog-description/AlertDialogDescription.js +12 -0
- package/dist/alert-dialog-footer/AlertDialogFooter-css.js +8 -0
- package/dist/alert-dialog-footer/AlertDialogFooter.js +11 -0
- package/dist/alert-dialog-title/AlertDialogTitle.js +24 -0
- package/dist/assets/src/accordion-trigger/AccordionTrigger.css.ts.vanilla-DWIMlWE2.css +16 -0
- package/dist/assets/src/alert-dialog/{AlertDialog.css.ts.vanilla-WdIe6m3g.css → AlertDialog.css.ts.vanilla-CpKGfNgS.css} +0 -6
- package/dist/assets/src/alert-dialog-description/AlertDialogDescription.css.ts.vanilla-B7BawTGq.css +6 -0
- package/dist/assets/src/alert-dialog-footer/AlertDialogFooter.css.ts.vanilla-3HiYmspb.css +6 -0
- package/dist/assets/src/avatar/Avatar.css.ts.vanilla-DxtsIDr-.css +24 -0
- package/dist/assets/src/box/{Box.css.ts.vanilla-D1mbecuN.css → Box.css.ts.vanilla-DLsoitAb.css} +5 -0
- package/dist/assets/src/button/{Button.css.ts.vanilla-BVWox07Y.css → Button.css.ts.vanilla-DeHH8Xkd.css} +43 -34
- package/dist/assets/src/command-item/CommandItem.css.ts.vanilla-ml8xjFWy.css +17 -0
- package/dist/assets/src/command-list/CommandList.css.ts.vanilla-1Rf8xvwM.css +9 -0
- package/dist/assets/src/pill/Pill.css.ts.vanilla-CMi1obNV.css +12 -0
- package/dist/assets/src/sprinkles/{sprinkles.css.ts.vanilla-DVqWpdFR.css → sprinkles.css.ts.vanilla-o1FSIYj0.css} +2292 -2243
- package/dist/assets/src/styles/{theme.css.ts.vanilla-DWW2Oo9s.css → theme.css.ts.vanilla-D9K5B5ZA.css} +10 -6
- package/dist/assets/src/table/Table.css.ts.vanilla-C9ntYW9X.css +9 -0
- package/dist/assets/src/table-body/TableBody.css.ts.vanilla-WI2VmycQ.css +6 -0
- package/dist/assets/src/table-cell/TableCell.css.ts.vanilla-Bn9ccAMh.css +10 -0
- package/dist/assets/src/table-header-cell/TableHeaderCell.css.ts.vanilla-DEMkJMmk.css +6 -0
- package/dist/assets/src/toast/{Toast.css.ts.vanilla-N6bXbnrT.css → Toast.css.ts.vanilla-D1qN8JIH.css} +6 -7
- package/dist/avatar/Avatar-css.js +7 -6
- package/dist/avatar/Avatar.js +6 -6
- package/dist/avatar-context/AvatarContext.js +2 -2
- package/dist/avatar-group/AvatarGroup-css.js +1 -1
- package/dist/avatar-group/AvatarGroup.js +5 -21
- package/dist/axiom-provider/AxiomProvider.js +7 -0
- package/dist/badge/Badge-css.js +1 -1
- package/dist/box/Box-css.js +2 -2
- package/dist/box/Box.js +10 -9
- package/dist/button/Button-css.js +9 -7
- package/dist/button/Button.js +19 -10
- package/dist/button-group/ButtonGroup-css.js +1 -1
- package/dist/checkbox/Checkbox-css.js +1 -1
- package/dist/checkbox/Checkbox.js +7 -10
- package/dist/combobox/Combobox.js +16 -8
- package/dist/combobox-content/ComboboxContent.js +8 -44
- package/dist/combobox-context/ComboboxContext.js +3 -5
- package/dist/combobox-multi-trigger/ComboboxMultiTrigger.js +34 -0
- package/dist/combobox-single-trigger/ComboboxSingleTrigger.js +17 -0
- package/dist/combobox-trigger/ComboboxTrigger.js +15 -11
- package/dist/command-checkbox-item/CommandCheckboxItem.js +58 -0
- package/dist/command-empty/CommandEmpty.js +1 -1
- package/dist/command-footer/CommandFooter-css.js +6 -0
- package/dist/command-footer/CommandFooter.js +13 -0
- package/dist/command-item/CommandItem-css.js +3 -3
- package/dist/command-item/CommandItem.js +26 -10
- package/dist/command-list/CommandList-css.js +7 -0
- package/dist/command-list/CommandList.js +3 -2
- package/dist/control-base/ControlBase-css.js +1 -1
- package/dist/control-base/ControlBase.js +3 -3
- package/dist/dialog-title/DialogTitle.js +2 -2
- package/dist/grid/Grid.js +1 -1
- package/dist/heading/Heading.js +2 -2
- package/dist/index.d.ts +164 -75
- package/dist/index.js +8 -0
- package/dist/input/Input-css.js +1 -1
- package/dist/input/Input.js +2 -2
- package/dist/input-base/InputBase-css.js +1 -1
- package/dist/link/Link-css.js +1 -1
- package/dist/menu-item/MenuItem-css.js +1 -1
- package/dist/pagination/Pagination-css.js +1 -1
- package/dist/pill/Pill-css.js +8 -0
- package/dist/pill/Pill.js +39 -0
- package/dist/radio-group-item/RadioGroupItem-css.js +1 -1
- package/dist/radio-group-item/RadioGroupItem.js +4 -7
- package/dist/spinner/Spinner.js +56 -0
- package/dist/sprinkles/sprinkles-css.js +3 -3
- package/dist/styles/theme-css.js +2 -2
- package/dist/switch/Switch-css.js +1 -1
- package/dist/switch/Switch.js +4 -7
- package/dist/table/Table-css.js +8 -0
- package/dist/table/Table.js +11 -0
- package/dist/table-body/TableBody-css.js +7 -0
- package/dist/table-body/TableBody.js +11 -0
- package/dist/table-cell/TableCell-css.js +9 -0
- package/dist/table-cell/TableCell.js +13 -0
- package/dist/table-head/TableHead.js +10 -0
- package/dist/table-header-cell/TableHeaderCell-css.js +7 -0
- package/dist/table-header-cell/TableHeaderCell.js +11 -0
- package/dist/table-row/TableRow-css.js +7 -0
- package/dist/table-row/TableRow.js +11 -0
- package/dist/tabs-list/TabsList-css.js +1 -1
- package/dist/tabs-trigger/TabsTrigger-css.js +1 -1
- package/dist/textarea/Textarea.js +13 -5
- package/dist/toast/Toast-css.js +3 -2
- package/dist/toast/Toast.js +2 -2
- package/dist/toast-action/ToastAction.js +1 -1
- package/dist/toast-provider/ToastProvider-css.js +1 -1
- package/dist/toggle/Toggle.js +13 -0
- package/dist/tokens/colors.js +4 -3
- package/dist/tokens/size.js +2 -1
- package/dist/tooltip/Tooltip.js +19 -5
- package/dist/unstable.d.ts +222 -34
- package/dist/unstable.js +11 -1
- package/package.json +1 -1
- package/dist/assets/src/accordion-trigger/AccordionTrigger.css.ts.vanilla-B3KNV6RG.css +0 -6
- package/dist/assets/src/avatar/Avatar.css.ts.vanilla-esFrnsM7.css +0 -12
- package/dist/assets/src/chip/Chip.css.ts.vanilla-SD4SsrSx.css +0 -26
- package/dist/assets/src/command-item/CommandItem.css.ts.vanilla-DUMU-Chn.css +0 -25
- package/dist/chip/Chip-css.js +0 -8
- package/dist/chip/Chip.js +0 -31
- /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-
|
|
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: #
|
|
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:
|
|
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-
|
|
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: #
|
|
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:
|
|
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%;
|
|
@@ -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% +
|
|
51
|
+
--_1egjidm1: 0 calc(100% + var(--ax-spacing-24));
|
|
53
52
|
}
|
|
54
53
|
._1egjidm5[data-swipe-direction="left"] {
|
|
55
|
-
--_1egjidm1: calc(-100% -
|
|
54
|
+
--_1egjidm1: calc(-100% - var(--ax-spacing-24)) 0;
|
|
56
55
|
}
|
|
57
56
|
._1egjidm5[data-swipe-direction="right"] {
|
|
58
|
-
--_1egjidm1: calc(100% +
|
|
57
|
+
--_1egjidm1: calc(100% + var(--ax-spacing-24)) 0;
|
|
59
58
|
}
|
|
60
59
|
._1egjidm5[data-swipe-direction="up"] {
|
|
61
|
-
--_1egjidm1: 0 calc(-100% -
|
|
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-
|
|
3
|
-
import './../assets/src/
|
|
4
|
-
import './../assets/src/avatar/Avatar.css.ts.vanilla-
|
|
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.
|
|
8
|
-
var fallback = recipeRuntime({base:{alignItems:'center',display:'flex',justifyContent:'center',rounded:'inherit',size:'full',textTransform:'uppercase'}
|
|
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 };
|
package/dist/avatar/Avatar.js
CHANGED
|
@@ -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 {
|
|
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
|
|
27
|
-
const size = sizeProp ||
|
|
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({
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
-
import './../assets/src/
|
|
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 {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
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,
|
|
13
|
-
|
|
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 };
|
package/dist/badge/Badge-css.js
CHANGED
|
@@ -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-
|
|
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
|
|
package/dist/box/Box-css.js
CHANGED
|
@@ -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-
|
|
3
|
-
import './../assets/src/box/Box.css.ts.vanilla-
|
|
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,
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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-
|
|
3
|
-
import './../assets/src/
|
|
4
|
-
import './../assets/src/button/Button.css.ts.vanilla-
|
|
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'},'
|
|
8
|
-
var
|
|
9
|
-
var
|
|
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 };
|
package/dist/button/Button.js
CHANGED
|
@@ -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 =
|
|
40
|
-
const 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":
|
|
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:
|
|
77
|
-
|
|
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/
|
|
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-
|
|
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
|
-
...
|
|
23
|
-
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 {
|
|
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
|
-
|
|
10
|
+
mode = "single",
|
|
12
11
|
onOpenChange,
|
|
13
|
-
|
|
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] =
|
|
21
|
+
const [value, setValue] = useControllableState({
|
|
22
|
+
defaultProp: defaultValue,
|
|
23
|
+
onChange: onValueChange,
|
|
24
|
+
prop: valueProp
|
|
25
|
+
});
|
|
22
26
|
return /* @__PURE__ */ jsx(
|
|
23
|
-
|
|
27
|
+
ComboboxContextProvider,
|
|
24
28
|
{
|
|
25
|
-
|
|
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
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
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,
|
|
18
|
-
const context =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
4
|
-
void 0
|
|
5
|
-
);
|
|
3
|
+
const [ComboboxContextProvider, useComboboxContext] = createContext("Combobox");
|
|
6
4
|
|
|
7
|
-
export {
|
|
5
|
+
export { ComboboxContextProvider, useComboboxContext };
|