@k8o/arte-odyssey 2.0.2 → 3.1.0
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/components/accordion/context.js +1 -0
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +4 -1
- package/dist/components/anchor/index.d.ts +1 -1
- package/dist/components/anchor/index.js +4 -1
- package/dist/components/baseline-status/index.d.ts +1 -1
- package/dist/components/baseline-status/index.js +4 -1
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/index.js +4 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +4 -1
- package/dist/components/card/card.js +9 -10
- package/dist/components/card/card.stories.js +22 -10
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js +6 -2
- package/dist/components/card/interactive-card.js +8 -9
- package/dist/components/card/type.d.ts +1 -1
- package/dist/components/dialog/dialog.js +1 -0
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +5 -1
- package/dist/components/drawer/drawer.d.ts +3 -2
- package/dist/components/drawer/drawer.js +25 -15
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +4 -1
- package/dist/components/dropdown-menu/index.d.ts +1 -1
- package/dist/components/dropdown-menu/index.js +4 -1
- package/dist/components/form/autocomplete/autocomplete.js +1 -0
- package/dist/components/form/autocomplete/index.d.ts +1 -1
- package/dist/components/form/autocomplete/index.js +4 -1
- package/dist/components/form/checkbox/checkbox.js +1 -0
- package/dist/components/form/checkbox/index.d.ts +1 -1
- package/dist/components/form/checkbox/index.js +4 -1
- package/dist/components/form/file-field/index.d.ts +1 -1
- package/dist/components/form/file-field/index.js +5 -1
- package/dist/components/form/form-control/form-control.js +1 -0
- package/dist/components/form/form-control/index.d.ts +1 -1
- package/dist/components/form/form-control/index.js +4 -1
- package/dist/components/form/number-field/index.d.ts +1 -1
- package/dist/components/form/number-field/index.js +4 -1
- package/dist/components/form/number-field/number-field.js +1 -0
- package/dist/components/form/radio/index.d.ts +1 -1
- package/dist/components/form/radio/index.js +4 -1
- package/dist/components/form/range-field/range-field.js +1 -0
- package/dist/components/form/select/index.d.ts +1 -1
- package/dist/components/form/select/index.js +4 -1
- package/dist/components/form/text-field/index.d.ts +1 -1
- package/dist/components/form/text-field/index.js +4 -1
- package/dist/components/form/textarea/index.d.ts +1 -1
- package/dist/components/form/textarea/index.js +4 -1
- package/dist/components/form/textarea/textarea.js +1 -0
- package/dist/components/heading/index.d.ts +1 -1
- package/dist/components/heading/index.js +4 -1
- package/dist/components/icon-button/index.d.ts +1 -1
- package/dist/components/icon-button/index.js +4 -1
- package/dist/components/icon-link/index.d.ts +1 -1
- package/dist/components/icon-link/index.js +4 -1
- package/dist/components/icons/index.d.ts +6 -6
- package/dist/components/icons/index.js +107 -6
- package/dist/components/icons/lucide.d.ts +5 -0
- package/dist/components/icons/lucide.js +65 -0
- package/dist/components/index.d.ts +38 -38
- package/dist/components/index.js +183 -38
- package/dist/components/link-button/index.d.ts +1 -1
- package/dist/components/link-button/index.js +4 -1
- package/dist/components/list-box/index.d.ts +1 -1
- package/dist/components/list-box/index.js +4 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.js +4 -1
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/modal.js +22 -2
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +5 -1
- package/dist/components/progress/index.d.ts +1 -1
- package/dist/components/progress/index.js +4 -1
- package/dist/components/providers/index.d.ts +2 -2
- package/dist/components/providers/index.js +7 -2
- package/dist/components/scroll-linked/index.d.ts +1 -1
- package/dist/components/scroll-linked/index.js +4 -1
- package/dist/components/separator/index.d.ts +1 -1
- package/dist/components/separator/index.js +4 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.js +4 -1
- package/dist/components/text-tag/index.d.ts +1 -1
- package/dist/components/text-tag/index.js +4 -1
- package/dist/components/toast/toast.js +1 -0
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +4 -1
- package/dist/hooks/client/index.js +1 -0
- package/dist/hooks/clipboard/index.js +1 -0
- package/dist/hooks/hash/index.js +1 -0
- package/dist/hooks/index.d.ts +12 -12
- package/dist/hooks/index.js +26 -12
- package/dist/hooks/interval/index.js +1 -0
- package/dist/hooks/local-storage/index.js +1 -0
- package/dist/hooks/timeout/index.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +212 -2
- package/dist/styles/index.css +31 -0
- package/package.json +71 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Alert } from './alert';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Anchor } from './anchor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { BaselineStatus } from './baseline-status';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Breadcrumb } from './breadcrumb';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Button } from './button';
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "./../../helpers/cn";
|
|
3
3
|
const Card = ({
|
|
4
4
|
children,
|
|
5
5
|
variant = "primary",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}) => /* @__PURE__ */
|
|
9
|
-
"
|
|
6
|
+
width = "full",
|
|
7
|
+
appearance = "shadow"
|
|
8
|
+
}) => /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
10
|
{
|
|
11
11
|
className: cn(
|
|
12
|
-
"
|
|
12
|
+
"rounded-lg",
|
|
13
|
+
appearance === "shadow" && "shadow-sm",
|
|
14
|
+
appearance === "bordered" && "border border-border-mute",
|
|
13
15
|
width === "full" && "w-full",
|
|
14
16
|
width === "fit" && "w-fit",
|
|
15
17
|
variant === "primary" && "bg-bg-base",
|
|
16
18
|
variant === "secondary" && "bg-bg-mute"
|
|
17
19
|
),
|
|
18
|
-
children
|
|
19
|
-
title && /* @__PURE__ */ jsx("div", { className: "bg-primary-bg/10 px-4 py-3", children: /* @__PURE__ */ jsx("p", { className: "font-bold", children: title }) }),
|
|
20
|
-
children
|
|
21
|
-
]
|
|
20
|
+
children
|
|
22
21
|
}
|
|
23
22
|
);
|
|
24
23
|
export {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "./../button";
|
|
3
|
+
import { LinkButton } from "./../link-button";
|
|
2
4
|
import { Card } from "./card";
|
|
3
5
|
import { InteractiveCard } from "./interactive-card";
|
|
4
6
|
const meta = {
|
|
@@ -12,29 +14,39 @@ const Primary = {
|
|
|
12
14
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-fg-mute", children: "\u3053\u308C\u306F\u30AB\u30FC\u30C9\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u8AAC\u660E\u6587\u3067\u3059\u3002\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u56F2\u3093\u3067\u8996\u899A\u7684\u306B\u30B0\u30EB\u30FC\u30D7\u5316\u3057\u307E\u3059\u3002" })
|
|
13
15
|
] }) })
|
|
14
16
|
};
|
|
15
|
-
const WithTitle = {
|
|
16
|
-
render: () => /* @__PURE__ */ jsx(Card, { title: "\u304A\u77E5\u3089\u305B", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
17
|
-
/* @__PURE__ */ jsx("p", { children: "\u30B7\u30B9\u30C6\u30E0\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u306E\u304A\u77E5\u3089\u305B\u3067\u3059\u3002" }),
|
|
18
|
-
/* @__PURE__ */ jsx("p", { className: "mt-2 text-fg-mute text-sm", children: "2024\u5E741\u670820\u65E5 10:00\u301C12:00" })
|
|
19
|
-
] }) })
|
|
20
|
-
};
|
|
21
17
|
const Secondary = {
|
|
22
18
|
render: () => /* @__PURE__ */ jsx(Card, { variant: "secondary", children: /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx("p", { className: "text-fg-mute", children: "\u30BB\u30AB\u30F3\u30C0\u30EA\u30D0\u30EA\u30A8\u30FC\u30B7\u30E7\u30F3\u306F\u80CC\u666F\u8272\u304C\u5C11\u3057\u6697\u304F\u306A\u308A\u307E\u3059\u3002" }) }) })
|
|
23
19
|
};
|
|
24
20
|
const Interactive = {
|
|
25
|
-
render: () => /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ jsx("
|
|
27
|
-
|
|
21
|
+
render: () => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(InteractiveCard, { children: /* @__PURE__ */ jsxs("a", { className: "block p-4", href: "https://example.com", children: [
|
|
23
|
+
/* @__PURE__ */ jsx("h3", { className: "font-bold", children: "\u30AB\u30FC\u30C9\u5168\u4F53\u304C\u30EA\u30F3\u30AF" }),
|
|
24
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-fg-mute text-sm", children: "\u30AB\u30FC\u30C9\u5168\u4F53\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9077\u79FB\u3057\u307E\u3059\u3002" })
|
|
25
|
+
] }) }),
|
|
26
|
+
/* @__PURE__ */ jsx(InteractiveCard, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("h3", { className: "font-bold", children: "\u30AB\u30FC\u30C9\u5185\u306B\u30DC\u30BF\u30F3\u3068\u30EA\u30F3\u30AF" }),
|
|
28
|
+
/* @__PURE__ */ jsx("p", { className: "text-fg-mute text-sm", children: "\u30AB\u30FC\u30C9\u5185\u306B\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6\u8981\u7D20\u3092\u914D\u7F6E\u3067\u304D\u307E\u3059\u3002" }),
|
|
29
|
+
/* @__PURE__ */ jsxs("nav", { className: "flex gap-2", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(LinkButton, { href: "https://example.com", size: "sm", children: "\u8A73\u7D30\u3092\u898B\u308B" }),
|
|
31
|
+
/* @__PURE__ */ jsx(Button, { color: "gray", size: "sm", variant: "outlined", children: "\u4FDD\u5B58" })
|
|
32
|
+
] })
|
|
33
|
+
] }) })
|
|
34
|
+
] })
|
|
35
|
+
};
|
|
36
|
+
const Bordered = {
|
|
37
|
+
render: () => /* @__PURE__ */ jsx(Card, { appearance: "bordered", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
38
|
+
/* @__PURE__ */ jsx("h3", { className: "font-bold text-lg", children: "\u30DC\u30FC\u30C0\u30FC\u30B9\u30BF\u30A4\u30EB" }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-fg-mute", children: "\u30B7\u30E3\u30C9\u30A6\u306E\u4EE3\u308F\u308A\u306B\u30DC\u30FC\u30C0\u30FC\u3067\u533A\u5207\u308B\u30B9\u30BF\u30A4\u30EB\u3067\u3059\u3002" })
|
|
28
40
|
] }) })
|
|
29
41
|
};
|
|
30
42
|
const FitWidth = {
|
|
31
43
|
render: () => /* @__PURE__ */ jsx(Card, { width: "fit", children: /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx("p", { children: "\u5E45\u304C\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u5408\u308F\u305B\u3066\u8ABF\u6574\u3055\u308C\u307E\u3059\u3002" }) }) })
|
|
32
44
|
};
|
|
33
45
|
export {
|
|
46
|
+
Bordered,
|
|
34
47
|
FitWidth,
|
|
35
48
|
Interactive,
|
|
36
49
|
Primary,
|
|
37
50
|
Secondary,
|
|
38
|
-
WithTitle,
|
|
39
51
|
card_stories_default as default
|
|
40
52
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { Card } from './card';
|
|
2
|
+
export { InteractiveCard } from './interactive-card';
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "./../../helpers/cn";
|
|
3
3
|
const InteractiveCard = ({
|
|
4
4
|
children,
|
|
5
5
|
variant = "primary",
|
|
6
6
|
width = "full",
|
|
7
|
-
|
|
8
|
-
}) => /* @__PURE__ */
|
|
9
|
-
"
|
|
7
|
+
appearance = "shadow"
|
|
8
|
+
}) => /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
10
|
{
|
|
11
11
|
className: cn(
|
|
12
|
-
"
|
|
12
|
+
"rounded-lg transition-transform hover:scale-[1.02] active:scale-[0.98]",
|
|
13
|
+
appearance === "shadow" && "shadow-sm",
|
|
14
|
+
appearance === "bordered" && "border border-border-mute",
|
|
13
15
|
width === "full" && "w-full",
|
|
14
16
|
width === "fit" && "w-fit",
|
|
15
17
|
variant === "primary" && "bg-bg-base",
|
|
16
18
|
variant === "secondary" && "bg-bg-mute"
|
|
17
19
|
),
|
|
18
|
-
children
|
|
19
|
-
title && /* @__PURE__ */ jsx("div", { className: "bg-primary-bg/10 px-4 py-3", children: /* @__PURE__ */ jsx("p", { className: "font-bold", children: title }) }),
|
|
20
|
-
children
|
|
21
|
-
]
|
|
20
|
+
children
|
|
22
21
|
}
|
|
23
22
|
);
|
|
24
23
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Content, Dialog } from './dialog';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type FC, type PropsWithChildren } from 'react';
|
|
1
|
+
import { type FC, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
export declare const Drawer: FC<PropsWithChildren<{
|
|
3
|
-
title:
|
|
3
|
+
title: ReactNode;
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
onClose: () => void;
|
|
6
|
+
side?: 'left' | 'right';
|
|
6
7
|
}>>;
|
|
@@ -1,45 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useId } from "react";
|
|
4
|
+
import { cn } from "../../helpers/cn";
|
|
4
5
|
import { Heading } from "../heading";
|
|
5
6
|
import { IconButton } from "../icon-button";
|
|
6
7
|
import { CloseIcon } from "../icons";
|
|
7
8
|
import { Modal } from "../modal";
|
|
8
|
-
const Drawer = ({ title, isOpen, onClose, children }) => {
|
|
9
|
+
const Drawer = ({ title, isOpen, onClose, side = "right", children }) => {
|
|
9
10
|
const rootId = useId();
|
|
10
|
-
return /* @__PURE__ */ jsx(Modal, { isOpen, onClose, type:
|
|
11
|
+
return /* @__PURE__ */ jsx(Modal, { isOpen, onClose, type: side, children: /* @__PURE__ */ jsxs(
|
|
11
12
|
"section",
|
|
12
13
|
{
|
|
13
14
|
"aria-describedby": `${rootId}-content`,
|
|
14
15
|
"aria-labelledby": `${rootId}-header`,
|
|
15
|
-
className: "
|
|
16
|
+
className: "flex h-full flex-col",
|
|
16
17
|
id: rootId,
|
|
17
18
|
children: [
|
|
18
19
|
/* @__PURE__ */ jsxs(
|
|
19
20
|
"div",
|
|
20
21
|
{
|
|
21
|
-
className: "flex items-center justify-center p-4 pb-2",
|
|
22
|
+
className: "flex shrink-0 items-center justify-center p-4 pb-2",
|
|
22
23
|
id: `${rootId}-header`,
|
|
23
24
|
children: [
|
|
24
|
-
/* @__PURE__ */ jsx(Heading, { type: "h3", children: title }),
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
|
|
25
|
+
typeof title === "string" ? /* @__PURE__ */ jsx(Heading, { type: "h3", children: title }) : title,
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
27
28
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
className: cn(
|
|
30
|
+
"absolute top-2",
|
|
31
|
+
side === "left" ? "left-2" : "right-2"
|
|
32
|
+
),
|
|
33
|
+
children: /* @__PURE__ */ jsx(
|
|
34
|
+
IconButton,
|
|
35
|
+
{
|
|
36
|
+
label: "\u9589\u3058\u308B",
|
|
37
|
+
onClick: (e) => {
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
onClose();
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ jsx(CloseIcon, { size: "sm" })
|
|
42
|
+
}
|
|
43
|
+
)
|
|
34
44
|
}
|
|
35
|
-
)
|
|
45
|
+
)
|
|
36
46
|
]
|
|
37
47
|
}
|
|
38
48
|
),
|
|
39
49
|
/* @__PURE__ */ jsx(
|
|
40
50
|
"div",
|
|
41
51
|
{
|
|
42
|
-
className: "p-4",
|
|
52
|
+
className: "flex-1 overflow-y-auto overscroll-contain p-4",
|
|
43
53
|
id: `${rootId}-content`,
|
|
44
54
|
onClick: (e) => {
|
|
45
55
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Drawer } from './drawer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { DropdownMenu } from './dropdown-menu';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Autocomplete } from './autocomplete';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Checkbox } from './checkbox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { FileField, FileFieldProvider } from './file-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { FormControl } from './form-control';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { NumberField } from './number-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Radio } from './radio';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Select } from './select';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { TextField } from './text-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Textarea } from './textarea';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Heading } from './heading';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { IconButton } from './icon-button';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { IconLink } from './icon-link';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export { ArteOdyssey } from './arte-odyssey';
|
|
2
|
+
export { GitHubIcon } from './github-mark';
|
|
3
|
+
export { Logo, LogoIcon } from './logo';
|
|
4
|
+
export { AccessibilityIcon, AIIcon, AlertIcon, AtomIcon, BadIcon, BlogIcon, BoringIcon, CheckIcon, ChevronIcon, CloseIcon, ColorContrastIcon, ColorInfoIcon, CopyIcon, DarkModeIcon, DifficultIcon, EasyIcon, ExternalLinkIcon, FormIcon, GoodIcon, HistoryIcon, InformativeIcon, InterestingIcon, LightModeIcon, LinkIcon, ListIcon, LocationIcon, MailIcon, MinusIcon, MixedColorIcon, NavigationMenuIcon, NewsIcon, PaletteIcon, PlusIcon, PrepareIcon, PublishDateIcon, RSSIcon, SendIcon, ShallowIcon, ShieldCheckIcon, SlideIcon, SparklesIcon, SubscribeIcon, TableIcon, TagIcon, UpdateDateIcon, ViewIcon, } from './lucide';
|
|
5
|
+
export { QiitaIcon } from './qiita';
|
|
6
|
+
export { TwitterIcon } from './twitter';
|