@optiaxiom/react 0.1.0-next.11 → 0.1.0-next.13
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-_Tn-IzNJ.d.ts +369 -0
- package/dist/accordion/Accordion.js +29 -0
- package/dist/accordion-content/AccordionContent-css.js +7 -0
- package/dist/accordion-content/AccordionContent.js +12 -0
- package/dist/accordion-context/AccordionContext.js +5 -0
- package/dist/accordion-item/AccordionItem.js +16 -0
- package/dist/accordion-trigger/AccordionTrigger-css.js +9 -0
- package/dist/accordion-trigger/AccordionTrigger.js +26 -0
- package/dist/alert/Alert-css.js +9 -0
- package/dist/alert/Alert.js +56 -0
- package/dist/alert-description/AlertDescription.js +10 -0
- package/dist/alert-dialog/AlertDialog-css.js +3 -4
- package/dist/alert-dialog/AlertDialog.js +16 -5
- package/dist/alert-title/AlertTitle.js +12 -0
- package/dist/assets/src/accordion-content/AccordionContent.css.ts.vanilla-CSw56YSK.css +25 -0
- package/dist/assets/src/accordion-trigger/AccordionTrigger.css.ts.vanilla-DWIMlWE2.css +16 -0
- package/dist/assets/src/alert/Alert.css.ts.vanilla-SoeL3DzR.css +43 -0
- package/dist/assets/src/avatar/Avatar.css.ts.vanilla-DxtsIDr-.css +24 -0
- package/dist/assets/src/badge/{Badge.css.ts.vanilla-DcRGjqhS.css → Badge.css.ts.vanilla-D5YRrHke.css} +0 -4
- package/dist/assets/src/box/{Box.css.ts.vanilla-Be3pFtBa.css → Box.css.ts.vanilla-D1mbecuN.css} +1 -0
- package/dist/assets/src/button/{Button.css.ts.vanilla--8P13svI.css → Button.css.ts.vanilla-BVWox07Y.css} +26 -20
- 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/drawer/Drawer.css.ts.vanilla-Bn4YKWDR.css +30 -0
- package/dist/assets/src/hover-card-content/HoverCardContent.css.ts.vanilla-C10dKVXP.css +7 -0
- package/dist/assets/src/input-base/{InputBase.css.ts.vanilla-ktVP2iXx.css → InputBase.css.ts.vanilla-By5uGeYP.css} +2 -6
- package/dist/assets/src/kbd/{Kbd.css.ts.vanilla-d7Xg4vLz.css → Kbd.css.ts.vanilla-CBcapUTx.css} +3 -1
- package/dist/assets/src/{avatar/Avatar.css.ts.vanilla-CihLlW6Z.css → pagination/Pagination.css.ts.vanilla-CP7Jjsxf.css} +2 -2
- package/dist/assets/src/pill/Pill.css.ts.vanilla-CMi1obNV.css +12 -0
- package/dist/assets/src/separator/Separator.css.ts.vanilla-CnlaHICJ.css +45 -0
- package/dist/assets/src/sprinkles/{sprinkles.css.ts.vanilla-BqeB0PjV.css → sprinkles.css.ts.vanilla-I48qUKRQ.css} +2206 -2086
- package/dist/assets/src/styles/{theme.css.ts.vanilla-Eou6ov6w.css → theme.css.ts.vanilla-EbjT5N3_.css} +19 -13
- package/dist/assets/src/tabs-list/{TabsList.css.ts.vanilla-CiXRbV1t.css → TabsList.css.ts.vanilla-B8IFbvV2.css} +13 -3
- package/dist/assets/src/toast/{Toast.css.ts.vanilla-DPyqeeIY.css → Toast.css.ts.vanilla-N6bXbnrT.css} +17 -10
- package/dist/assets/src/toast-provider/{ToastProvider.css.ts.vanilla-iuWIkpzW.css → ToastProvider.css.ts.vanilla-C2Olq0Jl.css} +7 -12
- package/dist/avatar/Avatar-css.js +7 -4
- package/dist/avatar/Avatar.js +8 -5
- package/dist/avatar-context/AvatarContext.js +7 -0
- package/dist/avatar-group/AvatarGroup-css.js +7 -0
- package/dist/avatar-group/AvatarGroup.js +14 -0
- package/dist/axiom-provider/AxiomProvider.js +7 -0
- package/dist/badge/Badge-css.js +3 -3
- package/dist/box/Box-css.js +2 -2
- package/dist/box/Box.js +12 -3
- package/dist/breadcrumb-item/BreadcrumbItem.js +8 -0
- package/dist/breadcrumbs/Breadcrumbs.js +17 -0
- package/dist/breadcrumbs/useBreadcrumbItems.js +35 -0
- package/dist/button/Button-css.js +7 -6
- package/dist/button/Button.js +37 -34
- package/dist/button-group/ButtonGroup-css.js +1 -1
- package/dist/checkbox/Checkbox-css.js +1 -1
- package/dist/combobox/Combobox.js +40 -0
- package/dist/combobox-content/ComboboxContent.js +24 -0
- package/dist/combobox-context/ComboboxContext.js +5 -0
- package/dist/combobox-multi-trigger/ComboboxMultiTrigger.js +34 -0
- package/dist/combobox-single-trigger/ComboboxSingleTrigger.js +17 -0
- package/dist/combobox-trigger/ComboboxTrigger.js +21 -0
- package/dist/command/Command.js +16 -0
- package/dist/command-checkbox-item/CommandCheckboxItem.js +58 -0
- package/dist/command-empty/CommandEmpty.js +16 -0
- package/dist/command-footer/CommandFooter-css.js +6 -0
- package/dist/command-footer/CommandFooter.js +13 -0
- package/dist/command-group/CommandGroup.js +16 -0
- package/dist/command-input/CommandInput.js +16 -0
- package/dist/command-item/CommandItem-css.js +8 -0
- package/dist/command-item/CommandItem.js +41 -0
- package/dist/command-list/CommandList-css.js +7 -0
- package/dist/command-list/CommandList.js +17 -0
- package/dist/command-separator/CommandSeparator.js +16 -0
- package/dist/control-base/ControlBase-css.js +1 -1
- package/dist/dialog/Dialog-css.js +1 -1
- package/dist/dialog/Dialog.js +8 -5
- package/dist/dialog-title/DialogTitle.js +2 -2
- package/dist/drawer/Drawer-css.js +9 -0
- package/dist/drawer/Drawer.js +56 -0
- package/dist/drawer-body/DrawerBody.js +24 -0
- package/dist/drawer-footer/DrawerFooter.js +24 -0
- package/dist/drawer-title/DrawerTitle.js +18 -0
- package/dist/field/Field.js +20 -14
- package/dist/hover-card/HoverCard.js +41 -0
- package/dist/hover-card-content/HoverCardContent-css.js +7 -0
- package/dist/hover-card-content/HoverCardContent.js +70 -0
- package/dist/hover-card-context/HoverCardContext.js +5 -0
- package/dist/hover-card-trigger/HoverCardTrigger.js +28 -0
- package/dist/icons/IconAngleDown.js +14 -20
- package/dist/icons/IconAngleLeft.js +22 -0
- package/dist/icons/IconAngleRight.js +22 -0
- package/dist/icons/IconCircleCheckFilled.js +19 -0
- package/dist/icons/IconCircleExclamationFilled.js +19 -0
- package/dist/icons/IconCircleInfoFilled.js +19 -0
- package/dist/icons/IconEllipsis.js +35 -0
- package/dist/icons/IconTriangleExclamationFilled.js +19 -0
- package/dist/icons/withIcon.js +2 -1
- package/dist/index.d.ts +282 -436
- package/dist/index.js +19 -2
- package/dist/input-base/InputBase-css.js +4 -4
- package/dist/input-base/InputBase.js +19 -4
- package/dist/kbd/Kbd-css.js +4 -3
- package/dist/kbd/Kbd.js +6 -21
- package/dist/link/Link-css.js +1 -1
- package/dist/menu/Menu.js +2 -2
- package/dist/menu-content/MenuContent-css.js +1 -1
- package/dist/menu-content/MenuContent.js +5 -5
- package/dist/menu-context/MenuContext.js +3 -5
- package/dist/menu-item/MenuItem-css.js +1 -1
- package/dist/menu-item/MenuItem.js +4 -2
- package/dist/pagination/Pagination-css.js +8 -0
- package/dist/pagination/Pagination.js +91 -0
- package/dist/pill/Pill-css.js +8 -0
- package/dist/pill/Pill.js +39 -0
- package/dist/popover/Popover.js +2 -2
- package/dist/popover-content/PopoverContent-css.js +1 -1
- package/dist/popover-content/PopoverContent.js +5 -5
- package/dist/popover-context/PopoverContext.js +3 -5
- package/dist/radio-group-item/RadioGroupItem-css.js +1 -1
- package/dist/separator/Separator-css.js +1 -1
- 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/tabs/Tabs.js +3 -2
- package/dist/tabs-context/TabsContext.js +5 -0
- package/dist/tabs-list/TabsList-css.js +3 -3
- package/dist/tabs-list/TabsList.js +3 -1
- package/dist/tabs-trigger/TabsTrigger-css.js +2 -2
- package/dist/tabs-trigger/TabsTrigger.js +31 -3
- package/dist/textarea/Textarea.js +13 -5
- package/dist/toast/Toast-css.js +4 -4
- package/dist/toast/Toast.js +30 -44
- package/dist/toast-action/ToastAction.js +11 -2
- package/dist/toast-provider/ToastProvider-css.js +2 -2
- package/dist/toast-provider/ToastProvider.js +7 -2
- package/dist/toast-provider/createToaster.js +12 -2
- package/dist/toast-provider/useOverflowAnchor.js +5 -5
- package/dist/toast-title/ToastTitle.js +1 -1
- package/dist/tokens/colors.js +8 -4
- package/dist/tokens/size.js +2 -1
- package/dist/tokens/zIndex.js +2 -2
- package/dist/tooltip/Tooltip.js +21 -7
- package/dist/unstable.d.ts +340 -0
- package/dist/unstable.js +15 -0
- package/dist/vanilla-extract/recipeRuntime.js +3 -1
- package/package.json +17 -2
- package/dist/assets/src/chip/Chip.css.ts.vanilla-SD4SsrSx.css +0 -26
- package/dist/assets/src/separator/Separator.css.ts.vanilla-C_EYtori.css +0 -42
- package/dist/chip/Chip-css.js +0 -8
- package/dist/chip/Chip.js +0 -31
- package/dist/icons/IconDanger.js +0 -17
- package/dist/icons/IconInfoCircle.js +0 -17
- package/dist/icons/IconSuccess.js +0 -17
- package/dist/icons/IconWarning.js +0 -17
- package/dist/paper/Paper.js +0 -12
- /package/dist/assets/src/{button-group/ButtonGroup.css.ts.vanilla-4BGjgIuZ.css → avatar-group/AvatarGroup.css.ts.vanilla-4BGjgIuZ.css} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,22 +1,39 @@
|
|
|
1
|
+
export { Accordion } from './accordion/Accordion.js';
|
|
2
|
+
export { AccordionContent } from './accordion-content/AccordionContent.js';
|
|
3
|
+
export { AccordionItem } from './accordion-item/AccordionItem.js';
|
|
4
|
+
export { AccordionTrigger } from './accordion-trigger/AccordionTrigger.js';
|
|
5
|
+
export { Alert } from './alert/Alert.js';
|
|
6
|
+
export { AlertDescription } from './alert-description/AlertDescription.js';
|
|
1
7
|
export { AlertDialog } from './alert-dialog/AlertDialog.js';
|
|
8
|
+
export { AlertTitle } from './alert-title/AlertTitle.js';
|
|
2
9
|
export { AnimatePresence } from './animate-presence/AnimatePresence.js';
|
|
3
10
|
export { usePresence } from './animate-presence/usePresence.js';
|
|
4
11
|
export { Avatar } from './avatar/Avatar.js';
|
|
12
|
+
export { AvatarGroup } from './avatar-group/AvatarGroup.js';
|
|
13
|
+
export { AxiomProvider } from './axiom-provider/AxiomProvider.js';
|
|
5
14
|
export { Badge } from './badge/Badge.js';
|
|
6
15
|
export { Box } from './box/Box.js';
|
|
16
|
+
export { BreadcrumbItem } from './breadcrumb-item/BreadcrumbItem.js';
|
|
17
|
+
export { Breadcrumbs } from './breadcrumbs/Breadcrumbs.js';
|
|
7
18
|
export { Button } from './button/Button.js';
|
|
8
19
|
export { ButtonGroup } from './button-group/ButtonGroup.js';
|
|
9
20
|
export { Checkbox } from './checkbox/Checkbox.js';
|
|
10
|
-
export { Chip } from './chip/Chip.js';
|
|
11
21
|
export { Code } from './code/Code.js';
|
|
12
22
|
export { Dialog } from './dialog/Dialog.js';
|
|
13
23
|
export { DialogBody } from './dialog-body/DialogBody.js';
|
|
14
24
|
export { DialogFooter } from './dialog-footer/DialogFooter.js';
|
|
15
25
|
export { DialogTitle } from './dialog-title/DialogTitle.js';
|
|
26
|
+
export { Drawer } from './drawer/Drawer.js';
|
|
27
|
+
export { DrawerBody } from './drawer-body/DrawerBody.js';
|
|
28
|
+
export { DrawerFooter } from './drawer-footer/DrawerFooter.js';
|
|
29
|
+
export { DrawerTitle } from './drawer-title/DrawerTitle.js';
|
|
16
30
|
export { Field } from './field/Field.js';
|
|
17
31
|
export { Flex } from './flex/Flex.js';
|
|
18
32
|
export { Grid } from './grid/Grid.js';
|
|
19
33
|
export { Heading } from './heading/Heading.js';
|
|
34
|
+
export { HoverCard } from './hover-card/HoverCard.js';
|
|
35
|
+
export { HoverCardContent } from './hover-card-content/HoverCardContent.js';
|
|
36
|
+
export { HoverCardTrigger } from './hover-card-trigger/HoverCardTrigger.js';
|
|
20
37
|
export { Indicator } from './indicator/Indicator.js';
|
|
21
38
|
export { Input } from './input/Input.js';
|
|
22
39
|
export { Kbd } from './kbd/Kbd.js';
|
|
@@ -27,7 +44,7 @@ export { MenuItem } from './menu-item/MenuItem.js';
|
|
|
27
44
|
export { MenuLabel } from './menu-label/MenuLabel.js';
|
|
28
45
|
export { MenuSeparator } from './menu-separator/MenuSeparator.js';
|
|
29
46
|
export { MenuTrigger } from './menu-trigger/MenuTrigger.js';
|
|
30
|
-
export {
|
|
47
|
+
export { Pagination } from './pagination/Pagination.js';
|
|
31
48
|
export { Popover } from './popover/Popover.js';
|
|
32
49
|
export { PopoverContent } from './popover-content/PopoverContent.js';
|
|
33
50
|
export { PopoverTrigger } from './popover-trigger/PopoverTrigger.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
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/input-base/InputBase.css.ts.vanilla-
|
|
2
|
+
import './../assets/src/styles/theme.css.ts.vanilla-EbjT5N3_.css';
|
|
3
|
+
import './../assets/src/input-base/InputBase.css.ts.vanilla-By5uGeYP.css';
|
|
4
4
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
5
|
|
|
6
|
-
var input = recipeRuntime({base:['_4nrdl00',{bg:'transparent',flex:'auto'},'_4nrdl02','_4nrdl03'],variants:{size:{sm:{px:'4',py:'0'},md:{px:'8',py:'4'},lg:{
|
|
7
|
-
var wrapper = recipeRuntime({base:[{border:'1',flexDirection:'row',gap:'0',rounded:'
|
|
6
|
+
var input = recipeRuntime({base:['_4nrdl00',{bg:'transparent',flex:'auto'},'_4nrdl02','_4nrdl03'],variants:{size:{sm:{px:'4',py:'0'},md:{px:'8',py:'4'},lg:{p:'8'}}}});
|
|
7
|
+
var wrapper = recipeRuntime({base:[{border:'1',flexDirection:'row',gap:'0',rounded:'md'},'_4nrdl01']});
|
|
8
8
|
|
|
9
9
|
export { input, wrapper };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useComposedRefs } from '@radix-ui/react-compose-refs';
|
|
3
|
+
import { forwardRef, useRef, cloneElement } from 'react';
|
|
3
4
|
import { Box } from '../box/Box.js';
|
|
4
5
|
import '../field-context/FieldContext.js';
|
|
5
6
|
import { useFieldContext } from '../field-context/useFieldContext.js';
|
|
@@ -15,6 +16,7 @@ const InputBase = forwardRef(
|
|
|
15
16
|
({
|
|
16
17
|
children,
|
|
17
18
|
className,
|
|
19
|
+
decoratorPointerEvents = "auto",
|
|
18
20
|
disabled,
|
|
19
21
|
endDecorator,
|
|
20
22
|
error: errorProp,
|
|
@@ -22,9 +24,22 @@ const InputBase = forwardRef(
|
|
|
22
24
|
size = "md",
|
|
23
25
|
startDecorator,
|
|
24
26
|
...props
|
|
25
|
-
},
|
|
27
|
+
}, outerRef) => {
|
|
26
28
|
const { error, id, required } = useFieldContext({ error: errorProp });
|
|
27
29
|
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
30
|
+
const innerRef = useRef(null);
|
|
31
|
+
const ref = useComposedRefs(innerRef, outerRef);
|
|
32
|
+
const decoratorProps = decoratorPointerEvents === "none" && {
|
|
33
|
+
cursor: "text",
|
|
34
|
+
onMouseDown: (event) => {
|
|
35
|
+
if (event.target !== event.currentTarget) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
innerRef.current?.focus();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
28
43
|
return /* @__PURE__ */ jsxs(
|
|
29
44
|
Flex,
|
|
30
45
|
{
|
|
@@ -34,7 +49,7 @@ const InputBase = forwardRef(
|
|
|
34
49
|
...wrapper({}, className),
|
|
35
50
|
...sprinkleProps,
|
|
36
51
|
children: [
|
|
37
|
-
startDecorator && /* @__PURE__ */ jsx(Text, { asChild: true, children: fallbackSpan(startDecorator) }),
|
|
52
|
+
startDecorator && /* @__PURE__ */ jsx(Text, { asChild: true, ...decoratorProps, children: fallbackSpan(startDecorator) }),
|
|
38
53
|
/* @__PURE__ */ jsx(
|
|
39
54
|
Box,
|
|
40
55
|
{
|
|
@@ -55,7 +70,7 @@ const InputBase = forwardRef(
|
|
|
55
70
|
})
|
|
56
71
|
}
|
|
57
72
|
),
|
|
58
|
-
endDecorator && /* @__PURE__ */ jsx(Text, { asChild: true, children: fallbackSpan(endDecorator) })
|
|
73
|
+
endDecorator && /* @__PURE__ */ jsx(Text, { asChild: true, ...decoratorProps, children: fallbackSpan(endDecorator) })
|
|
59
74
|
]
|
|
60
75
|
}
|
|
61
76
|
);
|
package/dist/kbd/Kbd-css.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
-
import './../assets/src/kbd/Kbd.css.ts.vanilla-
|
|
2
|
+
import './../assets/src/kbd/Kbd.css.ts.vanilla-CBcapUTx.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var kbd = recipeRuntime({base:{alignItems:'center',display:'inline-flex',flexDirection:'row',whiteSpace:'nowrap'},variants:{variant:{outline:{border:'1',borderB:'2',fontWeight:'600',gap:'4'},subtle:{bg:'transparent',color:'fg.secondary',fontFamily:'sans',gap:'2',px:'0'}}}});
|
|
6
|
+
var keys = recipeRuntime({base:'q5e32p0',variants:{variant:{outline:'q5e32p1',subtle:{}}}});
|
|
6
7
|
|
|
7
|
-
export { keys };
|
|
8
|
+
export { kbd, keys };
|
package/dist/kbd/Kbd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Code } from '../code/Code.js';
|
|
4
|
-
import { keys } from './Kbd-css.js';
|
|
4
|
+
import { kbd, keys } from './Kbd-css.js';
|
|
5
5
|
|
|
6
6
|
const mapKeyToCode = {
|
|
7
7
|
command: "\u2318",
|
|
@@ -19,26 +19,11 @@ const mapKeyToCode = {
|
|
|
19
19
|
up: "\u2191"
|
|
20
20
|
};
|
|
21
21
|
const Kbd = forwardRef(
|
|
22
|
-
({ children, keys: keys$1, ...props }, ref) => {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
asChild: true,
|
|
28
|
-
border: "1",
|
|
29
|
-
borderB: "2",
|
|
30
|
-
display: "inline-flex",
|
|
31
|
-
flexDirection: "row",
|
|
32
|
-
fontWeight: "600",
|
|
33
|
-
gap: "4",
|
|
34
|
-
whiteSpace: "nowrap",
|
|
35
|
-
...props,
|
|
36
|
-
children: /* @__PURE__ */ jsxs("kbd", { ref, children: [
|
|
37
|
-
keys$1 && (Array.isArray(keys$1) ? keys$1 : [keys$1]).map((key) => /* @__PURE__ */ jsx("abbr", { title: key, ...keys(), children: mapKeyToCode[key] }, key)),
|
|
38
|
-
children
|
|
39
|
-
] })
|
|
40
|
-
}
|
|
41
|
-
);
|
|
22
|
+
({ children, className, keys: keys$1, variant = "outline", ...props }, ref) => {
|
|
23
|
+
return /* @__PURE__ */ jsx(Code, { asChild: true, ...kbd({ variant }, className), ...props, children: /* @__PURE__ */ jsxs("kbd", { ref, children: [
|
|
24
|
+
keys$1 && (Array.isArray(keys$1) ? keys$1 : [keys$1]).map((key) => /* @__PURE__ */ jsx("abbr", { title: key, ...keys({ variant }), children: mapKeyToCode[key] }, key)),
|
|
25
|
+
children
|
|
26
|
+
] }) });
|
|
42
27
|
}
|
|
43
28
|
);
|
|
44
29
|
Kbd.displayName = "@optiaxiom/react/Kbd";
|
package/dist/link/Link-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-EbjT5N3_.css';
|
|
3
3
|
import './../assets/src/link/Link.css.ts.vanilla-PjwC2Bar.css';
|
|
4
4
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
5
|
|
package/dist/menu/Menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
-
import {
|
|
4
|
+
import { MenuContextProvider } from '../menu-context/MenuContext.js';
|
|
5
5
|
|
|
6
6
|
const Menu = ({
|
|
7
7
|
children,
|
|
@@ -15,7 +15,7 @@ const Menu = ({
|
|
|
15
15
|
onChange: onOpenChange,
|
|
16
16
|
prop: openProp
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */ jsx(RadixMenu.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(RadixMenu.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(MenuContextProvider, { open, children }) });
|
|
19
19
|
};
|
|
20
20
|
Menu.displayName = "@optiaxiom/react/Menu";
|
|
21
21
|
|
|
@@ -2,6 +2,6 @@ import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
|
2
2
|
import './../assets/src/menu-content/MenuContent.css.ts.vanilla-BVK7SB5f.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var content = recipeRuntime({base:[{border:'1',borderColor:'border.secondary',display:'flex',flexDirection:'column',gap:'2',maxW:'xs',overflow:'auto',p:'4',rounded:'lg',shadow:'md',z:'popover'},'wh2a2g0']});
|
|
5
|
+
var content = recipeRuntime({base:[{bg:'surface',border:'1',borderColor:'border.secondary',display:'flex',flexDirection:'column',gap:'2',maxW:'xs',overflow:'auto',p:'4',rounded:'lg',shadow:'md',z:'popover'},'wh2a2g0']});
|
|
6
6
|
|
|
7
7
|
export { content };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
-
import { forwardRef
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
4
|
import { AnimatePresence } from '../animate-presence/AnimatePresence.js';
|
|
5
5
|
import '../animate-presence/PresenceContext.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Box } from '../box/Box.js';
|
|
7
|
+
import { useMenuContext } from '../menu-context/MenuContext.js';
|
|
8
8
|
import { Transition } from '../transition/Transition.js';
|
|
9
9
|
import { content } from './MenuContent-css.js';
|
|
10
10
|
|
|
11
11
|
const MenuContent = forwardRef(
|
|
12
12
|
({ align = "start", children, className, sideOffset = 2, ...props }, ref) => {
|
|
13
|
-
const { open } =
|
|
14
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(RadixMenu.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(Transition, { duration: "sm", type: "pop", children: /* @__PURE__ */ jsx(
|
|
13
|
+
const { open } = useMenuContext("MenuContent");
|
|
14
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(RadixMenu.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(Transition, { duration: "sm", type: "pop", children: /* @__PURE__ */ jsx(Box, { asChild: true, ...content({}, className), ...props, children: /* @__PURE__ */ jsx(
|
|
15
15
|
RadixMenu.Content,
|
|
16
16
|
{
|
|
17
17
|
align,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
1
|
+
import { createContext } from '@radix-ui/react-context';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
open: void 0
|
|
5
|
-
});
|
|
3
|
+
const [MenuContextProvider, useMenuContext] = createContext("Menu");
|
|
6
4
|
|
|
7
|
-
export {
|
|
5
|
+
export { MenuContextProvider, useMenuContext };
|
|
@@ -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-EbjT5N3_.css';
|
|
3
3
|
import './../assets/src/menu-item/MenuItem.css.ts.vanilla-BjEdkhqZ.css';
|
|
4
4
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
5
|
|
|
@@ -5,6 +5,8 @@ import { Box } from '../box/Box.js';
|
|
|
5
5
|
import { Flex } from '../flex/Flex.js';
|
|
6
6
|
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
7
7
|
import '../sprinkles/sprinkles-css.js';
|
|
8
|
+
import '../utils/conditions.js';
|
|
9
|
+
import { fallbackSpan } from '../utils/fallbackSpan.js';
|
|
8
10
|
import { item } from './MenuItem-css.js';
|
|
9
11
|
|
|
10
12
|
const MenuItem = forwardRef(
|
|
@@ -24,9 +26,9 @@ const MenuItem = forwardRef(
|
|
|
24
26
|
...item({ colorScheme }),
|
|
25
27
|
...sprinkleProps,
|
|
26
28
|
children: /* @__PURE__ */ jsxs(RadixMenu.Item, { ...restProps, children: [
|
|
27
|
-
startDecorator,
|
|
29
|
+
startDecorator && /* @__PURE__ */ jsx(Box, { asChild: true, h: "16", w: "auto", children: fallbackSpan(startDecorator) }),
|
|
28
30
|
/* @__PURE__ */ jsx(Box, { flex: "1", children }),
|
|
29
|
-
endDecorator
|
|
31
|
+
endDecorator && /* @__PURE__ */ jsx(Box, { asChild: true, ml: "xs", children: fallbackSpan(endDecorator) })
|
|
30
32
|
] })
|
|
31
33
|
}
|
|
32
34
|
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
+
import './../assets/src/styles/theme.css.ts.vanilla-EbjT5N3_.css';
|
|
3
|
+
import './../assets/src/pagination/Pagination.css.ts.vanilla-CP7Jjsxf.css';
|
|
4
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
|
+
|
|
6
|
+
var button = recipeRuntime({base:'_1w594c40'});
|
|
7
|
+
|
|
8
|
+
export { button };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { usePagination } from '@mantine/hooks';
|
|
3
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
+
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
import { Box } from '../box/Box.js';
|
|
7
|
+
import { Button } from '../button/Button.js';
|
|
8
|
+
import { Flex } from '../flex/Flex.js';
|
|
9
|
+
import { IconAngleLeft } from '../icons/IconAngleLeft.js';
|
|
10
|
+
import { IconAngleRight } from '../icons/IconAngleRight.js';
|
|
11
|
+
import { IconEllipsis } from '../icons/IconEllipsis.js';
|
|
12
|
+
import { Tooltip } from '../tooltip/Tooltip.js';
|
|
13
|
+
import { button } from './Pagination-css.js';
|
|
14
|
+
|
|
15
|
+
const Pagination = forwardRef(
|
|
16
|
+
({
|
|
17
|
+
boundaries = 1,
|
|
18
|
+
defaultPage,
|
|
19
|
+
disabled,
|
|
20
|
+
onPageChange,
|
|
21
|
+
page: pageProp,
|
|
22
|
+
siblings = 1,
|
|
23
|
+
total,
|
|
24
|
+
...props
|
|
25
|
+
}, ref) => {
|
|
26
|
+
const [value, setValue] = useControllableState({
|
|
27
|
+
defaultProp: defaultPage,
|
|
28
|
+
onChange: onPageChange,
|
|
29
|
+
prop: pageProp
|
|
30
|
+
});
|
|
31
|
+
const { active, next, previous, range, setPage } = usePagination({
|
|
32
|
+
boundaries,
|
|
33
|
+
onChange: setValue,
|
|
34
|
+
page: value,
|
|
35
|
+
siblings,
|
|
36
|
+
total
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ jsx(Box, { asChild: true, ...props, children: /* @__PURE__ */ jsx("nav", { "aria-label": "pagination", ref, children: /* @__PURE__ */ jsx(Flex, { asChild: true, flexDirection: "row", gap: "2", children: /* @__PURE__ */ jsxs("ul", { children: [
|
|
39
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Tooltip, { content: "Prev", children: /* @__PURE__ */ jsx(
|
|
40
|
+
Button,
|
|
41
|
+
{
|
|
42
|
+
appearance: "secondary",
|
|
43
|
+
"aria-label": "Previous page",
|
|
44
|
+
disabled: disabled || active === 1,
|
|
45
|
+
icon: /* @__PURE__ */ jsx(IconAngleLeft, {}),
|
|
46
|
+
onClick: previous
|
|
47
|
+
}
|
|
48
|
+
) }) }),
|
|
49
|
+
range.map((page, index) => /* @__PURE__ */ jsx("li", { children: page === "dots" ? /* @__PURE__ */ jsx(
|
|
50
|
+
Box,
|
|
51
|
+
{
|
|
52
|
+
alignItems: "stretch",
|
|
53
|
+
display: "flex",
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
py: "10",
|
|
56
|
+
size: "md",
|
|
57
|
+
children: /* @__PURE__ */ jsx(Box, { alignItems: "end", display: "flex", children: /* @__PURE__ */ jsx(Box, { asChild: true, children: /* @__PURE__ */ jsx(IconEllipsis, {}) }) })
|
|
58
|
+
}
|
|
59
|
+
) : /* @__PURE__ */ jsx(
|
|
60
|
+
Button,
|
|
61
|
+
{
|
|
62
|
+
appearance: "secondary",
|
|
63
|
+
"aria-current": active === page ? "page" : void 0,
|
|
64
|
+
"data-state": active === page ? "active" : void 0,
|
|
65
|
+
disabled,
|
|
66
|
+
onClick: () => setPage(page),
|
|
67
|
+
...button(),
|
|
68
|
+
children: /* @__PURE__ */ jsxs(Box, { mx: "0", children: [
|
|
69
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: "page" }),
|
|
70
|
+
" ",
|
|
71
|
+
page,
|
|
72
|
+
page === 1 ? /* @__PURE__ */ jsx(VisuallyHidden, { children: "(first page)" }) : page === total ? /* @__PURE__ */ jsx(VisuallyHidden, { children: "(last page)" }) : null
|
|
73
|
+
] })
|
|
74
|
+
}
|
|
75
|
+
) }, `${index}`)),
|
|
76
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Tooltip, { content: "Next", children: /* @__PURE__ */ jsx(
|
|
77
|
+
Button,
|
|
78
|
+
{
|
|
79
|
+
appearance: "secondary",
|
|
80
|
+
"aria-label": "Next page",
|
|
81
|
+
disabled: disabled || active === total,
|
|
82
|
+
icon: /* @__PURE__ */ jsx(IconAngleRight, {}),
|
|
83
|
+
onClick: next
|
|
84
|
+
}
|
|
85
|
+
) }) })
|
|
86
|
+
] }) }) }) });
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
Pagination.displayName = "@optiaxiom/react/Pagination";
|
|
90
|
+
|
|
91
|
+
export { Pagination };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
+
import './../assets/src/styles/theme.css.ts.vanilla-EbjT5N3_.css';
|
|
3
|
+
import './../assets/src/pill/Pill.css.ts.vanilla-CMi1obNV.css';
|
|
4
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
|
+
|
|
6
|
+
var pill = recipeRuntime({base:[{bg:'neutral.100',border:'0',fontSize:'sm',rounded:'md'},'_176xwa50'],variants:{size:{md:{h:'xs'},lg:{h:'sm'}}}});
|
|
7
|
+
|
|
8
|
+
export { pill };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Button } from '../button/Button.js';
|
|
4
|
+
import { Text } from '../text/Text.js';
|
|
5
|
+
import { Tooltip } from '../tooltip/Tooltip.js';
|
|
6
|
+
import { pill } from './Pill-css.js';
|
|
7
|
+
|
|
8
|
+
const Pill = forwardRef(
|
|
9
|
+
({
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
endDecorator,
|
|
13
|
+
onRemove,
|
|
14
|
+
size = "md",
|
|
15
|
+
startDecorator,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
const handleKeyDown = (e) => {
|
|
19
|
+
if (e.key === "Backspace" && onRemove) {
|
|
20
|
+
onRemove();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsx(Tooltip, { auto: true, content: children, children: /* @__PURE__ */ jsx(
|
|
24
|
+
Button,
|
|
25
|
+
{
|
|
26
|
+
endDecorator,
|
|
27
|
+
onKeyDown: handleKeyDown,
|
|
28
|
+
ref,
|
|
29
|
+
startDecorator,
|
|
30
|
+
...pill({ size }, className),
|
|
31
|
+
...props,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Text, { display: "block", fontSize: "inherit", truncate: true, children })
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
Pill.displayName = "@optiaxiom/react/Pill";
|
|
38
|
+
|
|
39
|
+
export { Pill };
|
package/dist/popover/Popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
3
3
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
-
import {
|
|
4
|
+
import { PopoverContextProvider } from '../popover-context/PopoverContext.js';
|
|
5
5
|
|
|
6
6
|
const Popover = ({
|
|
7
7
|
children,
|
|
@@ -15,7 +15,7 @@ const Popover = ({
|
|
|
15
15
|
onChange: onOpenChange,
|
|
16
16
|
prop: openProp
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */ jsx(RadixPopover.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(RadixPopover.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(PopoverContextProvider, { open, children }) });
|
|
19
19
|
};
|
|
20
20
|
Popover.displayName = "@optiaxiom/react/Popover";
|
|
21
21
|
|
|
@@ -2,6 +2,6 @@ import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
|
2
2
|
import './../assets/src/popover-content/PopoverContent.css.ts.vanilla-RHzagv6W.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var content = recipeRuntime({base:[{border:'1',borderColor:'border.secondary',display:'flex',flexDirection:'column',gap:'2',p:'sm',rounded:'lg',shadow:'md',z:'popover'},'_1nk03ow0']});
|
|
5
|
+
var content = recipeRuntime({base:[{bg:'surface',border:'1',borderColor:'border.secondary',display:'flex',flexDirection:'column',gap:'2',p:'sm',rounded:'lg',shadow:'md',z:'popover'},'_1nk03ow0']});
|
|
6
6
|
|
|
7
7
|
export { content };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
3
|
-
import { forwardRef
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
4
|
import { AnimatePresence } from '../animate-presence/AnimatePresence.js';
|
|
5
5
|
import '../animate-presence/PresenceContext.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Box } from '../box/Box.js';
|
|
7
|
+
import { usePopoverContext } from '../popover-context/PopoverContext.js';
|
|
8
8
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
9
9
|
import { theme } from '../styles/theme-css.js';
|
|
10
10
|
import { Transition } from '../transition/Transition.js';
|
|
@@ -19,8 +19,8 @@ const PopoverContent = forwardRef(
|
|
|
19
19
|
withArrow,
|
|
20
20
|
...props
|
|
21
21
|
}, ref) => {
|
|
22
|
-
const { open } =
|
|
23
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(Transition, { duration: "sm", type: "pop", children: /* @__PURE__ */ jsx(
|
|
22
|
+
const { open } = usePopoverContext("PopoverContent");
|
|
23
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(Transition, { duration: "sm", type: "pop", children: /* @__PURE__ */ jsx(Box, { asChild: true, ...content({}, className), ...props, children: /* @__PURE__ */ jsxs(
|
|
24
24
|
RadixPopover.Content,
|
|
25
25
|
{
|
|
26
26
|
align,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
1
|
+
import { createContext } from '@radix-ui/react-context';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
open: void 0
|
|
5
|
-
});
|
|
3
|
+
const [PopoverContextProvider, usePopoverContext] = createContext("Popover");
|
|
6
4
|
|
|
7
|
-
export {
|
|
5
|
+
export { PopoverContextProvider, usePopoverContext };
|
|
@@ -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-EbjT5N3_.css';
|
|
3
3
|
import './../assets/src/control-base/ControlBase.css.ts.vanilla-DGX7Yb9J.css';
|
|
4
4
|
import './../assets/src/radio-group-item/RadioGroupItem.css.ts.vanilla-BFZr4-E-.css';
|
|
5
5
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
-
import './../assets/src/separator/Separator.css.ts.vanilla-
|
|
2
|
+
import './../assets/src/separator/Separator.css.ts.vanilla-CnlaHICJ.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
import { createSprinkles } from '@vanilla-extract/sprinkles/createRuntimeSprinkles';
|
|
5
5
|
|