@optiaxiom/react 0.1.0-next.14 → 0.1.0-next.15
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-DIhLXmjU.d.ts → PopoverContent-DHQm-nPQ.d.ts} +17 -7
- package/dist/accordion-trigger/AccordionTrigger-css.js +1 -1
- package/dist/alert/Alert-css.js +1 -1
- package/dist/alert-dialog/AlertDialog.js +16 -15
- package/dist/alert-dialog-action/AlertDialogAction.js +1 -3
- package/dist/alert-dialog-content/AlertDialogContent-css.js +8 -0
- package/dist/alert-dialog-content/AlertDialogContent.js +20 -0
- package/dist/alert-dialog-footer/AlertDialogFooter-css.js +1 -1
- package/dist/alert-dialog-title/AlertDialogTitle.js +2 -3
- package/dist/alert-dialog-trigger/AlertDialogTrigger.js +14 -0
- package/dist/animate-presence/AnimatePresence.js +4 -3
- package/dist/assets/src/{alert-dialog/AlertDialog.css.ts.vanilla-CpKGfNgS.css → alert-dialog-content/AlertDialogContent.css.ts.vanilla-CLM10r0f.css} +5 -5
- package/dist/assets/src/{dialog/Dialog.css.ts.vanilla-BlNHlzx8.css → dialog-content/DialogContent.css.ts.vanilla-B-pX7DR_.css} +6 -6
- package/dist/assets/src/{menu-content/MenuContent.css.ts.vanilla-BVK7SB5f.css → dropdown-menu-content/DropdownMenuContent.css.ts.vanilla-EXOZ-w-n.css} +1 -1
- package/dist/assets/src/dropdown-menu-item/DropdownMenuItem.css.ts.vanilla-iU0t5wQu.css +30 -0
- package/dist/assets/src/input-base/{InputBase.css.ts.vanilla-By5uGeYP.css → InputBase.css.ts.vanilla-CXpyZISC.css} +1 -0
- package/dist/assets/src/{search/Search.css.ts.vanilla-8Mi7WZBC.css → search-input/SearchInput.css.ts.vanilla-BTRVQpev.css} +1 -1
- package/dist/assets/src/styles/{theme.css.ts.vanilla-D9K5B5ZA.css → theme.css.ts.vanilla-BZP-0Wgr.css} +2 -2
- package/dist/avatar/Avatar-css.js +1 -1
- package/dist/axiom-provider/AxiomProvider.js +3 -1
- package/dist/badge/Badge-css.js +1 -1
- package/dist/box/Box-css.js +1 -1
- package/dist/{breadcrumbs/Breadcrumbs.js → breadcrumb/Breadcrumb.js} +5 -7
- package/dist/breadcrumb-ellipsis/BreadcrumbEllipsis.js +10 -0
- package/dist/breadcrumb-item/BreadcrumbItem.js +11 -4
- package/dist/breadcrumb-link/BreadcrumbLink.js +12 -0
- package/dist/breadcrumb-page/BreadcrumbPage.js +12 -0
- package/dist/breadcrumb-separator/BreadcrumbSeparator.js +14 -0
- package/dist/button/Button-css.js +1 -1
- package/dist/checkbox/Checkbox-css.js +1 -1
- package/dist/combobox/Combobox.js +3 -3
- package/dist/combobox-content/ComboboxContent.js +2 -2
- package/dist/command-item/CommandItem-css.js +1 -1
- package/dist/control-base/ControlBase-css.js +2 -2
- package/dist/control-base/ControlBase.js +9 -1
- package/dist/dialog/Dialog.js +27 -39
- package/dist/dialog-body/DialogBody-css.js +1 -1
- package/dist/{menu-trigger/MenuTrigger.js → dialog-close/DialogClose.js} +5 -6
- package/dist/{dialog/Dialog-css.js → dialog-content/DialogContent-css.js} +4 -4
- package/dist/dialog-content/DialogContent.js +38 -0
- package/dist/dialog-context/DialogContext.js +5 -0
- package/dist/dialog-description/DialogDescription.js +23 -0
- package/dist/dialog-title/DialogTitle.js +15 -11
- package/dist/dialog-trigger/DialogTrigger.js +16 -0
- package/dist/{menu/Menu.js → dropdown-menu/DropdownMenu.js} +7 -7
- package/dist/{menu-content/MenuContent-css.js → dropdown-menu-content/DropdownMenuContent-css.js} +2 -2
- package/dist/{menu-content/MenuContent.js → dropdown-menu-content/DropdownMenuContent.js} +6 -6
- package/dist/dropdown-menu-context/DropdownMenuContext.js +5 -0
- package/dist/dropdown-menu-item/DropdownMenuItem-css.js +8 -0
- package/dist/{menu-item/MenuItem.js → dropdown-menu-item/DropdownMenuItem.js} +4 -4
- package/dist/{menu-label/MenuLabel.js → dropdown-menu-label/DropdownMenuLabel.js} +3 -3
- package/dist/dropdown-menu-separator/DropdownMenuSeparator.js +9 -0
- package/dist/dropdown-menu-trigger/DropdownMenuTrigger.js +15 -0
- package/dist/hover-card/HoverCard.js +3 -3
- package/dist/index.d.ts +197 -175
- package/dist/index.js +13 -9
- package/dist/input-base/InputBase-css.js +3 -3
- package/dist/link/Link-css.js +1 -1
- package/dist/pagination/Pagination-css.js +1 -1
- package/dist/pill/Pill-css.js +1 -1
- package/dist/popover/Popover.js +3 -3
- package/dist/radio-group/RadioGroup.js +26 -8
- package/dist/radio-group-item/RadioGroupItem-css.js +1 -1
- package/dist/search-input/SearchInput-css.js +8 -0
- package/dist/{search/Search.js → search-input/SearchInput.js} +4 -4
- package/dist/sprinkles/sprinkles-css.js +1 -1
- package/dist/styles/theme-css.js +1 -1
- package/dist/switch/Switch-css.js +1 -1
- package/dist/table-cell/TableCell-css.js +1 -1
- package/dist/tabs-list/TabsList-css.js +1 -1
- package/dist/tabs-trigger/TabsTrigger-css.js +1 -1
- package/dist/toast/Toast-css.js +1 -1
- package/dist/transition/Transition.js +1 -1
- package/dist/unstable.d.ts +69 -25
- package/dist/unstable.js +6 -0
- package/package.json +7 -7
- package/dist/alert-dialog/AlertDialog-css.js +0 -8
- package/dist/assets/src/menu-item/MenuItem.css.ts.vanilla-BjEdkhqZ.css +0 -30
- package/dist/breadcrumbs/useBreadcrumbItems.js +0 -35
- package/dist/menu-context/MenuContext.js +0 -5
- package/dist/menu-item/MenuItem-css.js +0 -8
- package/dist/menu-separator/MenuSeparator.js +0 -11
- package/dist/search/Search-css.js +0 -8
package/dist/dialog/Dialog.js
CHANGED
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '../animate-presence/PresenceContext.js';
|
|
6
|
-
import { Box } from '../box/Box.js';
|
|
7
|
-
import { Button } from '../button/Button.js';
|
|
8
|
-
import { IconX } from '../icons/IconX.js';
|
|
9
|
-
import { Transition } from '../transition/Transition.js';
|
|
10
|
-
import { overlay, content, close } from './Dialog-css.js';
|
|
3
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
+
import { DialogContextProvider } from '../dialog-context/DialogContext.js';
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
] }) }) })
|
|
39
|
-
] }) }) });
|
|
40
|
-
}
|
|
41
|
-
);
|
|
6
|
+
function Dialog({
|
|
7
|
+
children,
|
|
8
|
+
defaultOpen,
|
|
9
|
+
modal,
|
|
10
|
+
onOpenChange,
|
|
11
|
+
open: openProp,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
const [open, setOpen] = useControllableState({
|
|
15
|
+
defaultProp: defaultOpen,
|
|
16
|
+
onChange: onOpenChange,
|
|
17
|
+
prop: openProp
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
RadixDialog.Root,
|
|
21
|
+
{
|
|
22
|
+
modal,
|
|
23
|
+
onOpenChange: setOpen,
|
|
24
|
+
open,
|
|
25
|
+
...props,
|
|
26
|
+
children: /* @__PURE__ */ jsx(DialogContextProvider, { open, children })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
42
30
|
Dialog.displayName = "@optiaxiom/react/Dialog";
|
|
43
31
|
|
|
44
32
|
export { Dialog };
|
|
@@ -2,6 +2,6 @@ import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
|
2
2
|
import './../assets/src/dialog-body/DialogBody.css.ts.vanilla-C_QoodTy.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var body = recipeRuntime({base:[{fontSize:'md',overflow:'auto',
|
|
5
|
+
var body = recipeRuntime({base:[{fontSize:'md',overflow:'auto',pb:'md',pt:'lg',px:'lg'},'qdjgpq0']});
|
|
6
6
|
|
|
7
7
|
export { body };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
2
|
+
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Button } from '../button/Button.js';
|
|
5
|
-
import { IconAngleDown } from '../icons/IconAngleDown.js';
|
|
6
5
|
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
7
6
|
import '../sprinkles/sprinkles-css.js';
|
|
8
7
|
|
|
9
|
-
const
|
|
8
|
+
const DialogClose = forwardRef(
|
|
10
9
|
({ asChild, children, ...props }, ref) => {
|
|
11
10
|
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, ref, ...sprinkleProps, children: asChild ? children : /* @__PURE__ */ jsx(Button, { ...restProps, children }) });
|
|
13
12
|
}
|
|
14
13
|
);
|
|
15
|
-
|
|
14
|
+
DialogClose.displayName = "@optiaxiom/react/DialogClose";
|
|
16
15
|
|
|
17
|
-
export {
|
|
16
|
+
export { DialogClose };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
-
import './../assets/src/dialog/
|
|
2
|
+
import './../assets/src/dialog-content/DialogContent.css.ts.vanilla-B-pX7DR_.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
5
|
-
var close = recipeRuntime({base:[{rounded:'full'},'
|
|
6
|
-
var content = recipeRuntime({base:[{bg:'surface',rounded:'lg',shadow:'md',z:'popover'},'
|
|
7
|
-
var overlay = recipeRuntime({base:[{bg:'overlay',z:'popover'},'
|
|
5
|
+
var close = recipeRuntime({base:[{rounded:'full'},'_16k1qec5']});
|
|
6
|
+
var content = recipeRuntime({base:[{bg:'surface',rounded:'lg',shadow:'md',z:'popover'},'_16k1qec0'],variants:{size:{sm:'_16k1qec1',md:'_16k1qec2',lg:'_16k1qec3'}}});
|
|
7
|
+
var overlay = recipeRuntime({base:[{bg:'overlay',z:'popover'},'_16k1qec4']});
|
|
8
8
|
|
|
9
9
|
export { close, content, overlay };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { AnimatePresence } from '../animate-presence/AnimatePresence.js';
|
|
5
|
+
import '../animate-presence/PresenceContext.js';
|
|
6
|
+
import { Box } from '../box/Box.js';
|
|
7
|
+
import { Button } from '../button/Button.js';
|
|
8
|
+
import { useDialogContext } from '../dialog-context/DialogContext.js';
|
|
9
|
+
import { IconX } from '../icons/IconX.js';
|
|
10
|
+
import { Transition } from '../transition/Transition.js';
|
|
11
|
+
import { overlay, content, close } from './DialogContent-css.js';
|
|
12
|
+
|
|
13
|
+
const DialogContent = forwardRef(
|
|
14
|
+
({ children, size = "md", withCloseButton = false, ...props }, ref) => {
|
|
15
|
+
const { open } = useDialogContext("DialogContent");
|
|
16
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(RadixDialog.Portal, { forceMount: true, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Transition, { children: /* @__PURE__ */ jsx(Box, { asChild: true, ...overlay(), children: /* @__PURE__ */ jsx(RadixDialog.Overlay, {}) }) }),
|
|
18
|
+
/* @__PURE__ */ jsx(Transition, { "data-side": "bottom", type: "fade", children: /* @__PURE__ */ jsx(Box, { asChild: true, ...content({ size }), children: /* @__PURE__ */ jsxs(RadixDialog.Content, { ref, ...props, children: [
|
|
19
|
+
children,
|
|
20
|
+
withCloseButton && /* @__PURE__ */ jsx(
|
|
21
|
+
Button,
|
|
22
|
+
{
|
|
23
|
+
appearance: "secondary",
|
|
24
|
+
"aria-label": "Close",
|
|
25
|
+
asChild: true,
|
|
26
|
+
icon: /* @__PURE__ */ jsx(IconX, {}),
|
|
27
|
+
size: "sm",
|
|
28
|
+
...close(),
|
|
29
|
+
children: /* @__PURE__ */ jsx(RadixDialog.Close, {})
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] }) }) })
|
|
33
|
+
] }) });
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
DialogContent.displayName = "@optiaxiom/react/DialogContent";
|
|
37
|
+
|
|
38
|
+
export { DialogContent };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Text } from '../text/Text.js';
|
|
5
|
+
|
|
6
|
+
const DialogDescription = forwardRef(({ children, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Text,
|
|
9
|
+
{
|
|
10
|
+
asChild: true,
|
|
11
|
+
color: "fg.secondary",
|
|
12
|
+
fontWeight: "400",
|
|
13
|
+
pb: "xs",
|
|
14
|
+
px: "lg",
|
|
15
|
+
ref,
|
|
16
|
+
...props,
|
|
17
|
+
children: /* @__PURE__ */ jsx(RadixDialog.Description, { children })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
DialogDescription.displayName = "@optiaxiom/react/DialogDescription";
|
|
22
|
+
|
|
23
|
+
export { DialogDescription };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { Flex } from '../flex/Flex.js';
|
|
5
4
|
import { Heading } from '../heading/Heading.js';
|
|
6
|
-
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
7
|
-
import '../sprinkles/sprinkles-css.js';
|
|
8
|
-
import { Text } from '../text/Text.js';
|
|
9
5
|
|
|
10
6
|
const DialogTitle = forwardRef(
|
|
11
|
-
({ children,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
({ children, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Heading,
|
|
10
|
+
{
|
|
11
|
+
asChild: true,
|
|
12
|
+
fontWeight: "500",
|
|
13
|
+
level: "3",
|
|
14
|
+
p: "lg",
|
|
15
|
+
pb: "xs",
|
|
16
|
+
ref,
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(RadixDialog.Title, { children })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
17
21
|
}
|
|
18
22
|
);
|
|
19
23
|
DialogTitle.displayName = "@optiaxiom/react/DialogTitle";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button } from '../button/Button.js';
|
|
5
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
6
|
+
import '../sprinkles/sprinkles-css.js';
|
|
7
|
+
|
|
8
|
+
const DialogTrigger = forwardRef(
|
|
9
|
+
({ asChild, children, ...props }, ref) => {
|
|
10
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
11
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, { asChild: true, ref, ...sprinkleProps, children: asChild ? children : /* @__PURE__ */ jsx(Button, { ...restProps, children }) });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
DialogTrigger.displayName = "@optiaxiom/react/DialogTrigger";
|
|
15
|
+
|
|
16
|
+
export { DialogTrigger };
|
|
@@ -1,22 +1,22 @@
|
|
|
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 { DropdownMenuContextProvider } from '../dropdown-menu-context/DropdownMenuContext.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function DropdownMenu({
|
|
7
7
|
children,
|
|
8
8
|
defaultOpen,
|
|
9
9
|
onOpenChange,
|
|
10
10
|
open: openProp,
|
|
11
11
|
...props
|
|
12
|
-
})
|
|
12
|
+
}) {
|
|
13
13
|
const [open, setOpen] = useControllableState({
|
|
14
14
|
defaultProp: defaultOpen,
|
|
15
15
|
onChange: onOpenChange,
|
|
16
16
|
prop: openProp
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */ jsx(RadixMenu.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(
|
|
19
|
-
}
|
|
20
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(RadixMenu.Root, { onOpenChange: setOpen, open, ...props, children: /* @__PURE__ */ jsx(DropdownMenuContextProvider, { open, children }) });
|
|
19
|
+
}
|
|
20
|
+
DropdownMenu.displayName = "@optiaxiom/react/DropdownMenu";
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { DropdownMenu };
|
package/dist/{menu-content/MenuContent-css.js → dropdown-menu-content/DropdownMenuContent-css.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
-
import './../assets/src/menu-content/
|
|
2
|
+
import './../assets/src/dropdown-menu-content/DropdownMenuContent.css.ts.vanilla-EXOZ-w-n.css';
|
|
3
3
|
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
4
|
|
|
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'},'
|
|
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'},'yxbc160']});
|
|
6
6
|
|
|
7
7
|
export { content };
|
|
@@ -4,13 +4,13 @@ import { forwardRef } from 'react';
|
|
|
4
4
|
import { AnimatePresence } from '../animate-presence/AnimatePresence.js';
|
|
5
5
|
import '../animate-presence/PresenceContext.js';
|
|
6
6
|
import { Box } from '../box/Box.js';
|
|
7
|
-
import {
|
|
7
|
+
import { useDropdownMenuContext } from '../dropdown-menu-context/DropdownMenuContext.js';
|
|
8
8
|
import { Transition } from '../transition/Transition.js';
|
|
9
|
-
import { content } from './
|
|
9
|
+
import { content } from './DropdownMenuContent-css.js';
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const DropdownMenuContent = forwardRef(
|
|
12
12
|
({ align = "start", children, className, sideOffset = 2, ...props }, ref) => {
|
|
13
|
-
const { open } =
|
|
13
|
+
const { open } = useDropdownMenuContext("MenuContent");
|
|
14
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
|
{
|
|
@@ -22,6 +22,6 @@ const MenuContent = forwardRef(
|
|
|
22
22
|
) }) }) }) });
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
|
|
25
|
+
DropdownMenuContent.displayName = "@optiaxiom/react/DropdownMenuContent";
|
|
26
26
|
|
|
27
|
-
export {
|
|
27
|
+
export { DropdownMenuContent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
+
import './../assets/src/styles/theme.css.ts.vanilla-BZP-0Wgr.css';
|
|
3
|
+
import './../assets/src/dropdown-menu-item/DropdownMenuItem.css.ts.vanilla-iU0t5wQu.css';
|
|
4
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
5
|
+
|
|
6
|
+
var item = recipeRuntime({base:[{flexDirection:'row',fontSize:'md',gap:'xs',p:'xs',rounded:'sm',transition:'colors'},'_10p8y0d2'],variants:{colorScheme:{danger:'_10p8y0d3',neutral:'_10p8y0d4'}}});
|
|
7
|
+
|
|
8
|
+
export { item };
|
|
@@ -7,9 +7,9 @@ import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
|
7
7
|
import '../sprinkles/sprinkles-css.js';
|
|
8
8
|
import '../utils/conditions.js';
|
|
9
9
|
import { fallbackSpan } from '../utils/fallbackSpan.js';
|
|
10
|
-
import { item } from './
|
|
10
|
+
import { item } from './DropdownMenuItem-css.js';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const DropdownMenuItem = forwardRef(
|
|
13
13
|
({
|
|
14
14
|
children,
|
|
15
15
|
colorScheme = "neutral",
|
|
@@ -34,6 +34,6 @@ const MenuItem = forwardRef(
|
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
|
-
|
|
37
|
+
DropdownMenuItem.displayName = "@optiaxiom/react/DropdownMenuItem";
|
|
38
38
|
|
|
39
|
-
export {
|
|
39
|
+
export { DropdownMenuItem };
|
|
@@ -3,7 +3,7 @@ import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Box } from '../box/Box.js';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const DropdownMenuLabel = forwardRef(
|
|
7
7
|
({ children, ...props }, ref) => {
|
|
8
8
|
return /* @__PURE__ */ jsx(
|
|
9
9
|
Box,
|
|
@@ -20,6 +20,6 @@ const MenuLabel = forwardRef(
|
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
DropdownMenuLabel.displayName = "@optiaxiom/react/DropdownMenuLabel";
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { DropdownMenuLabel };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Separator } from '../separator/Separator.js';
|
|
5
|
+
|
|
6
|
+
const DropdownMenuSeparator = forwardRef((props, ref) => /* @__PURE__ */ jsx(Separator, { asChild: true, bg: "border.secondary", mx: "-4", my: "2", ...props, children: /* @__PURE__ */ jsx(RadixMenu.Separator, { ref }) }));
|
|
7
|
+
DropdownMenuSeparator.displayName = "@optiaxiom/react/DropdownMenuSeparator";
|
|
8
|
+
|
|
9
|
+
export { DropdownMenuSeparator };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button } from '../button/Button.js';
|
|
5
|
+
import { IconAngleDown } from '../icons/IconAngleDown.js';
|
|
6
|
+
import { extractSprinkles } from '../sprinkles/extractSprinkles.js';
|
|
7
|
+
import '../sprinkles/sprinkles-css.js';
|
|
8
|
+
|
|
9
|
+
const DropdownMenuTrigger = forwardRef(({ asChild, children, ...props }, ref) => {
|
|
10
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
11
|
+
return /* @__PURE__ */ jsx(RadixMenu.Trigger, { asChild: true, ref, ...sprinkleProps, children: asChild ? children : /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(IconAngleDown, {}), iconPosition: "end", ...restProps, children }) });
|
|
12
|
+
});
|
|
13
|
+
DropdownMenuTrigger.displayName = "@optiaxiom/react/DropdownMenuTrigger";
|
|
14
|
+
|
|
15
|
+
export { DropdownMenuTrigger };
|
|
@@ -3,7 +3,7 @@ import * as RadixHoverCard from '@radix-ui/react-hover-card';
|
|
|
3
3
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
4
|
import { HoverCardContextProvider } from '../hover-card-context/HoverCardContext.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function HoverCard({
|
|
7
7
|
children,
|
|
8
8
|
defaultOpen,
|
|
9
9
|
keepOpenOnActivation,
|
|
@@ -11,7 +11,7 @@ const HoverCard = ({
|
|
|
11
11
|
open: openProp,
|
|
12
12
|
openDelay = 500,
|
|
13
13
|
...props
|
|
14
|
-
})
|
|
14
|
+
}) {
|
|
15
15
|
const [open, setOpen] = useControllableState({
|
|
16
16
|
defaultProp: defaultOpen,
|
|
17
17
|
onChange: onOpenChange,
|
|
@@ -35,7 +35,7 @@ const HoverCard = ({
|
|
|
35
35
|
)
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
39
|
HoverCard.displayName = "@optiaxiom/react/HoverCard";
|
|
40
40
|
|
|
41
41
|
export { HoverCard };
|