@optiaxiom/react 0.1.0-next.8 → 0.1.0-next.9
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/alert-dialog/AlertDialog-css.js +12 -0
- package/dist/alert-dialog/AlertDialog.js +51 -0
- package/dist/assets/src/alert-dialog/AlertDialog.css.ts.vanilla-CeDk9JQ5.css +29 -0
- package/dist/assets/src/button/{Button.css.ts.vanilla-BopXGX13.css → Button.css.ts.vanilla-CmOG82Kg.css} +53 -41
- package/dist/assets/src/checkbox/Checkbox.css.ts.vanilla-w5cdPwHc.css +23 -0
- package/dist/assets/src/chip/Chip.css.ts.vanilla-SD4SsrSx.css +26 -0
- package/dist/assets/src/control-base/ControlBase.css.ts.vanilla-BRvl57K9.css +32 -0
- package/dist/assets/src/dialog/Dialog.css.ts.vanilla-B7OE7tnX.css +28 -0
- package/dist/assets/src/dialog-body/DialogBody.css.ts.vanilla-C_QoodTy.css +6 -0
- package/dist/assets/src/{input/Input.css.ts.vanilla-X0R-SsOp.css → input-base/InputBase.css.ts.vanilla-CZg9RekC.css} +10 -8
- package/dist/assets/src/kbd/{Kbd.css.ts.vanilla-DB-l95Nr.css → Kbd.css.ts.vanilla-C9xHGnsD.css} +0 -3
- package/dist/assets/src/link/Link.css.ts.vanilla-Cpe5mdsJ.css +32 -0
- package/dist/assets/src/radio-group-item/RadioGroupItem.css.ts.vanilla-BFZr4-E-.css +9 -0
- package/dist/assets/src/sprinkles/{sprinkles.css.ts.vanilla-Cj5eURGG.css → sprinkles.css.ts.vanilla-3EoQkW4g.css} +2244 -2741
- package/dist/assets/src/styles/{theme.css.ts.vanilla-BftJbjRk.css → theme.css.ts.vanilla-CQvpCMCS.css} +53 -51
- package/dist/assets/src/switch/Switch.css.ts.vanilla-DqRWTr5T.css +23 -0
- package/dist/assets/src/textarea/Textarea.css.ts.vanilla-B4lEj1jX.css +9 -0
- package/dist/box/Box-css.js +1 -1
- package/dist/button/Button-css.js +3 -3
- package/dist/button/Button.js +7 -5
- package/dist/checkbox/Checkbox-css.js +12 -0
- package/dist/checkbox/Checkbox.js +32 -0
- package/dist/checkbox/icons-svg/IconChecked.js +27 -0
- package/dist/checkbox/icons-svg/IconIndeterminate.js +23 -0
- package/dist/chip/Chip-css.js +8 -0
- package/dist/chip/Chip.js +31 -0
- package/dist/chip/IconCross.js +21 -0
- package/dist/code/Code-css.js +1 -1
- package/dist/code/Code.js +4 -13
- package/dist/control-base/ControlBase-css.js +10 -0
- package/dist/control-base/ControlBase.js +30 -0
- package/dist/dialog/CloseIcon.js +21 -0
- package/dist/dialog/Dialog-css.js +9 -0
- package/dist/dialog/Dialog.js +51 -0
- package/dist/dialog-body/DialogBody-css.js +7 -0
- package/dist/dialog-body/DialogBody.js +13 -0
- package/dist/dialog-footer/DialogFooter-css.js +6 -0
- package/dist/dialog-footer/DialogFooter.js +13 -0
- package/dist/dialog-title/DialogTitle.js +21 -0
- package/dist/field/Field.js +24 -7
- package/dist/field/IconInfo.js +26 -0
- package/dist/index.d.ts +537 -376
- package/dist/index.js +12 -0
- package/dist/input/Input-css.js +3 -5
- package/dist/input/Input.js +11 -23
- package/dist/input-base/InputBase-css.js +9 -0
- package/dist/input-base/InputBase.js +44 -0
- package/dist/kbd/Kbd-css.js +3 -4
- package/dist/kbd/Kbd.js +3 -3
- package/dist/link/IconUpRight.js +24 -0
- package/dist/link/Link-css.js +8 -0
- package/dist/link/Link.js +39 -0
- package/dist/radio-group/RadioGroup.js +28 -0
- package/dist/radio-group-item/RadioGroupItem-css.js +10 -0
- package/dist/radio-group-item/RadioGroupItem.js +27 -0
- package/dist/skeleton/Skeleton-css.js +1 -1
- package/dist/skeleton/Skeleton.js +3 -8
- package/dist/sprinkles/sprinkles-css.js +3 -3
- package/dist/styles/theme-css.js +2 -2
- package/dist/switch/Switch-css.js +10 -0
- package/dist/switch/Switch.js +27 -0
- package/dist/text/Text-css.js +1 -1
- package/dist/text/Text.js +0 -1
- package/dist/textarea/Textarea-css.js +8 -0
- package/dist/textarea/Textarea.js +40 -0
- package/dist/tokens/colors.js +16 -1
- package/dist/tokens/fontSize.js +13 -9
- package/dist/tokens/spacing.js +0 -6
- package/dist/tooltip/Tooltip.js +36 -7
- package/dist/transition/Transition.js +7 -8
- package/dist/vanilla-extract/recipeRuntime.js +2 -2
- package/package.json +21 -12
|
@@ -0,0 +1,51 @@
|
|
|
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 { Paper } from '../paper/Paper.js';
|
|
9
|
+
import { Transition } from '../transition/Transition.js';
|
|
10
|
+
import { CloseIcon } from './CloseIcon.js';
|
|
11
|
+
import { overlay, content, close } from './Dialog-css.js';
|
|
12
|
+
|
|
13
|
+
const Dialog = forwardRef(
|
|
14
|
+
({
|
|
15
|
+
children,
|
|
16
|
+
defaultOpen,
|
|
17
|
+
modal,
|
|
18
|
+
onClose,
|
|
19
|
+
open,
|
|
20
|
+
size = "md",
|
|
21
|
+
withCloseButton = false,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
RadixDialog.Root,
|
|
26
|
+
{
|
|
27
|
+
defaultOpen,
|
|
28
|
+
modal,
|
|
29
|
+
onOpenChange: onClose,
|
|
30
|
+
open,
|
|
31
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(RadixDialog.Portal, { forceMount: true, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Transition, { children: /* @__PURE__ */ jsx(Box, { asChild: true, ...overlay(), children: /* @__PURE__ */ jsx(RadixDialog.Overlay, {}) }) }),
|
|
33
|
+
/* @__PURE__ */ jsx(Transition, { type: "fade-down", children: /* @__PURE__ */ jsx(Paper, { asChild: true, ...content({ size }), children: /* @__PURE__ */ jsxs(RadixDialog.Content, { ref, ...props, children: [
|
|
34
|
+
children,
|
|
35
|
+
withCloseButton && /* @__PURE__ */ jsx(Box, { asChild: true, ...close(), children: /* @__PURE__ */ jsx(RadixDialog.Close, { "aria-label": "Close", asChild: true, children: /* @__PURE__ */ jsx(
|
|
36
|
+
Button,
|
|
37
|
+
{
|
|
38
|
+
appearance: "secondary",
|
|
39
|
+
icon: /* @__PURE__ */ jsx(CloseIcon, {}),
|
|
40
|
+
size: "sm"
|
|
41
|
+
}
|
|
42
|
+
) }) })
|
|
43
|
+
] }) }) })
|
|
44
|
+
] }) })
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
Dialog.displayName = "@optiaxiom/react/Dialog";
|
|
50
|
+
|
|
51
|
+
export { Dialog };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
+
import './../assets/src/dialog-body/DialogBody.css.ts.vanilla-C_QoodTy.css';
|
|
3
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
4
|
+
|
|
5
|
+
var body = recipeRuntime({base:[{fontSize:'md',overflow:'auto',px:'lg',py:'md'},'qdjgpq0']});
|
|
6
|
+
|
|
7
|
+
export { body };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '../box/Box.js';
|
|
4
|
+
import { body } from './DialogBody-css.js';
|
|
5
|
+
|
|
6
|
+
const DialogBody = forwardRef(
|
|
7
|
+
({ children, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, { ref, ...body(), ...props, children });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
DialogBody.displayName = "@optiaxiom/react/DialogBody";
|
|
12
|
+
|
|
13
|
+
export { DialogBody };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './../assets/src/styles/layers.css.ts.vanilla-D5zCXZwe.css';
|
|
2
|
+
import { recipeRuntime } from '../vanilla-extract/recipeRuntime.js';
|
|
3
|
+
|
|
4
|
+
var footer = recipeRuntime({base:[{borderColor:'border.secondary',borderT:'1',flexDirection:'row',gap:'md',justifyContent:'end',px:'lg',py:'20'}]});
|
|
5
|
+
|
|
6
|
+
export { footer };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Flex } from '../flex/Flex.js';
|
|
4
|
+
import { footer } from './DialogFooter-css.js';
|
|
5
|
+
|
|
6
|
+
const DialogFooter = forwardRef(
|
|
7
|
+
({ children, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Flex, { ref, ...footer(), ...props, children });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
DialogFooter.displayName = "@optiaxiom/react/DialogFooter";
|
|
12
|
+
|
|
13
|
+
export { DialogFooter };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Flex } from '../flex/Flex.js';
|
|
5
|
+
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
|
+
|
|
10
|
+
const DialogTitle = forwardRef(
|
|
11
|
+
({ children, description, ...props }, ref) => {
|
|
12
|
+
const { restProps, sprinkleProps } = extractSprinkles(props);
|
|
13
|
+
return /* @__PURE__ */ jsxs(Flex, { gap: "xs", pb: "md", pt: "lg", px: "lg", ...sprinkleProps, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Heading, { asChild: true, level: "4", children: /* @__PURE__ */ jsx(RadixDialog.Title, { ref, ...restProps, children }) }),
|
|
15
|
+
description && /* @__PURE__ */ jsx(Text, { asChild: true, fontWeight: "400", children: /* @__PURE__ */ jsx(RadixDialog.Description, { children: description }) })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
DialogTitle.displayName = "@optiaxiom/react/DialogTitle";
|
|
20
|
+
|
|
21
|
+
export { DialogTitle };
|
package/dist/field/Field.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as RadixLabel from '@radix-ui/react-label';
|
|
3
|
+
import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
|
3
4
|
import { useId } from '@reach/auto-id';
|
|
4
5
|
import { forwardRef, cloneElement } from 'react';
|
|
5
6
|
import { Flex } from '../flex/Flex.js';
|
|
6
7
|
import { Text } from '../text/Text.js';
|
|
8
|
+
import { Tooltip } from '../tooltip/Tooltip.js';
|
|
9
|
+
import { IconInfo } from './IconInfo.js';
|
|
7
10
|
|
|
8
11
|
const Field = forwardRef(
|
|
9
12
|
({
|
|
@@ -12,19 +15,33 @@ const Field = forwardRef(
|
|
|
12
15
|
disabled,
|
|
13
16
|
error,
|
|
14
17
|
id: idProp,
|
|
18
|
+
info,
|
|
15
19
|
label,
|
|
16
20
|
required,
|
|
17
21
|
...props
|
|
18
22
|
}, ref) => {
|
|
19
23
|
const id = useId(idProp);
|
|
20
24
|
return /* @__PURE__ */ jsxs(Flex, { flexDirection: "column", gap: "2", maxW: "sm", ref, ...props, children: [
|
|
21
|
-
label && /* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
label && /* @__PURE__ */ jsxs(Flex, { flexDirection: "row", gap: "4", children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
Text,
|
|
28
|
+
{
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
asChild: true,
|
|
31
|
+
display: "flex",
|
|
32
|
+
fontWeight: "500",
|
|
33
|
+
gap: "2",
|
|
34
|
+
children: /* @__PURE__ */ jsxs(RadixLabel.Root, { htmlFor: id, children: [
|
|
35
|
+
label,
|
|
36
|
+
required && /* @__PURE__ */ jsx(Text, { "aria-hidden": "true", as: "span", color: "fg.error", children: "*" })
|
|
37
|
+
] })
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
info && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Tooltip, { content: info, children: /* @__PURE__ */ jsx(IconInfo, { "aria-details": `info${id}` }) }),
|
|
42
|
+
/* @__PURE__ */ jsx(VisuallyHidden.Root, { id: `info${id}`, children: info })
|
|
26
43
|
] })
|
|
27
|
-
] })
|
|
44
|
+
] }),
|
|
28
45
|
cloneElement(children, {
|
|
29
46
|
disabled,
|
|
30
47
|
error: !!error,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
const IconInfo = forwardRef(
|
|
5
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
height: "12",
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 12 12",
|
|
11
|
+
width: "12",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
...props,
|
|
14
|
+
children: /* @__PURE__ */ jsx(
|
|
15
|
+
"path",
|
|
16
|
+
{
|
|
17
|
+
d: "M5.99355 0.400024C2.8873 0.400024 0.393555 2.91565 0.393555 6.00002C0.393555 9.10627 2.8873 11.6 5.99355 11.6C9.07793 11.6 11.5936 9.10627 11.5936 6.00002C11.5936 2.91565 9.07793 0.400024 5.99355 0.400024ZM5.99355 10.9C3.28105 10.9 1.09355 8.71252 1.09355 6.00002C1.09355 3.3094 3.28105 1.10002 5.99355 1.10002C8.68418 1.10002 10.8936 3.3094 10.8936 6.00002C10.8936 8.71252 8.68418 10.9 5.99355 10.9ZM5.64355 7.92502C5.3373 7.92502 5.11855 8.16565 5.11855 8.45002C5.11855 8.75627 5.3373 8.97502 5.64355 8.97502C5.92793 8.97502 6.16855 8.75627 6.16855 8.45002C6.16855 8.16565 5.92793 7.92502 5.64355 7.92502ZM6.62793 3.20002H5.3373C4.52793 3.20002 3.89355 3.85627 3.89355 4.66565V4.86252C3.89355 5.0594 4.04668 5.21252 4.24355 5.21252C4.41855 5.21252 4.59355 5.0594 4.59355 4.86252V4.66565C4.59355 4.25002 4.92168 3.90002 5.3373 3.90002H6.62793C7.04355 3.90002 7.39355 4.25002 7.39355 4.66565C7.39355 4.92815 7.24043 5.19065 6.9998 5.3219L5.6873 5.97815C5.44668 6.1094 5.29355 6.3719 5.29355 6.65627V7.05002C5.29355 7.2469 5.44668 7.40002 5.64355 7.40002C5.81855 7.40002 5.99355 7.2469 5.99355 7.05002V6.65627C5.99355 6.6344 5.99355 6.61252 6.01543 6.59065L7.32793 5.9344C7.7873 5.6719 8.09355 5.19065 8.09355 4.66565C8.09355 3.85627 7.4373 3.20002 6.62793 3.20002Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
IconInfo.displayName = "@optiaxiom/react/IconInfo";
|
|
25
|
+
|
|
26
|
+
export { IconInfo };
|