@k8o/arte-odyssey 0.0.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/LICENSE +21 -0
- package/dist/components/accordion/accordion-button.d.ts +2 -0
- package/dist/components/accordion/accordion-button.js +40 -0
- package/dist/components/accordion/accordion-item.d.ts +4 -0
- package/dist/components/accordion/accordion-item.js +11 -0
- package/dist/components/accordion/accordion-panel.d.ts +2 -0
- package/dist/components/accordion/accordion-panel.js +21 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordion.js +17 -0
- package/dist/components/accordion/accordion.stories.js +89 -0
- package/dist/components/accordion/context.d.ts +10 -0
- package/dist/components/accordion/context.js +38 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/components/alert/alert.d.ts +8 -0
- package/dist/components/alert/alert.js +46 -0
- package/dist/components/alert/alert.stories.js +51 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/anchor/anchor.d.ts +14 -0
- package/dist/components/anchor/anchor.js +31 -0
- package/dist/components/anchor/anchor.stories.js +23 -0
- package/dist/components/anchor/index.d.ts +1 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/baseline-status/baseline-status.d.ts +16 -0
- package/dist/components/baseline-status/baseline-status.js +39 -0
- package/dist/components/baseline-status/baseline-status.stories.js +15 -0
- package/dist/components/baseline-status/index.d.ts +1 -0
- package/dist/components/baseline-status/index.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +18 -0
- package/dist/components/breadcrumb/breadcrumb.js +36 -0
- package/dist/components/breadcrumb/breadcrumb.stories.js +40 -0
- package/dist/components/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.js +55 -0
- package/dist/components/button/button.stories.js +96 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/card/card.d.ts +3 -0
- package/dist/components/card/card.js +26 -0
- package/dist/components/card/card.stories.js +38 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card/interactive-card.d.ts +3 -0
- package/dist/components/card/interactive-card.js +34 -0
- package/dist/components/card/type.d.ts +6 -0
- package/dist/components/card/type.js +0 -0
- package/dist/components/code/code.d.ts +4 -0
- package/dist/components/code/code.js +38 -0
- package/dist/components/code/code.stories.js +60 -0
- package/dist/components/code/index.d.ts +1 -0
- package/dist/components/code/index.js +4 -0
- package/dist/components/dialog/dialog.d.ts +17 -0
- package/dist/components/dialog/dialog.js +85 -0
- package/dist/components/dialog/dialog.stories.js +98 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/drawer/drawer.d.ts +6 -0
- package/dist/components/drawer/drawer.js +56 -0
- package/dist/components/drawer/drawer.stories.js +25 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +130 -0
- package/dist/components/dropdown-menu/dropdown-menu.stories.js +111 -0
- package/dist/components/dropdown-menu/hooks.d.ts +23 -0
- package/dist/components/dropdown-menu/hooks.js +56 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/error-boundary/index.d.ts +1 -0
- package/dist/components/error-boundary/index.js +4 -0
- package/dist/components/form/autocomplete/autocomplete.d.ts +14 -0
- package/dist/components/form/autocomplete/autocomplete.js +225 -0
- package/dist/components/form/autocomplete/autocomplete.stories.js +59 -0
- package/dist/components/form/autocomplete/index.d.ts +1 -0
- package/dist/components/form/autocomplete/index.js +1 -0
- package/dist/components/form/checkbox/checkbox.d.ts +8 -0
- package/dist/components/form/checkbox/checkbox.js +40 -0
- package/dist/components/form/checkbox/checkbox.stories.js +27 -0
- package/dist/components/form/checkbox/index.d.ts +1 -0
- package/dist/components/form/checkbox/index.js +1 -0
- package/dist/components/form/form-control/form-control.d.ts +20 -0
- package/dist/components/form/form-control/form-control.js +53 -0
- package/dist/components/form/form-control/form-control.stories.js +94 -0
- package/dist/components/form/form-control/index.d.ts +1 -0
- package/dist/components/form/form-control/index.js +1 -0
- package/dist/components/form/number-field/index.d.ts +1 -0
- package/dist/components/form/number-field/index.js +1 -0
- package/dist/components/form/number-field/number-field.d.ts +17 -0
- package/dist/components/form/number-field/number-field.js +150 -0
- package/dist/components/form/number-field/number-field.stories.js +106 -0
- package/dist/components/form/radio/index.d.ts +1 -0
- package/dist/components/form/radio/index.js +1 -0
- package/dist/components/form/radio/radio.d.ts +11 -0
- package/dist/components/form/radio/radio.js +51 -0
- package/dist/components/form/radio/radio.stories.js +55 -0
- package/dist/components/form/range-field/index.d.ts +1 -0
- package/dist/components/form/range-field/index.js +4 -0
- package/dist/components/form/range-field/range-field.d.ts +17 -0
- package/dist/components/form/range-field/range-field.js +54 -0
- package/dist/components/form/range-field/range-field.stories.js +162 -0
- package/dist/components/form/select/index.d.ts +1 -0
- package/dist/components/form/select/index.js +1 -0
- package/dist/components/form/select/select.d.ts +14 -0
- package/dist/components/form/select/select.js +39 -0
- package/dist/components/form/select/select.stories.js +58 -0
- package/dist/components/form/text-field/index.d.ts +1 -0
- package/dist/components/form/text-field/index.js +1 -0
- package/dist/components/form/text-field/text-field.d.ts +15 -0
- package/dist/components/form/text-field/text-field.js +40 -0
- package/dist/components/form/text-field/text-field.stories.js +61 -0
- package/dist/components/form/textarea/index.d.ts +1 -0
- package/dist/components/form/textarea/index.js +1 -0
- package/dist/components/form/textarea/textarea.d.ts +18 -0
- package/dist/components/form/textarea/textarea.js +56 -0
- package/dist/components/form/textarea/textarea.stories.js +92 -0
- package/dist/components/heading/heading.d.ts +8 -0
- package/dist/components/heading/heading.js +77 -0
- package/dist/components/heading/heading.stories.js +52 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/icon-button/icon-button.d.ts +8 -0
- package/dist/components/icon-button/icon-button.js +38 -0
- package/dist/components/icon-button/icon-button.stories.js +54 -0
- package/dist/components/icon-button/index.d.ts +1 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/icon-link/icon-link.d.ts +17 -0
- package/dist/components/icon-link/icon-link.js +37 -0
- package/dist/components/icon-link/icon-link.stories.js +40 -0
- package/dist/components/icon-link/index.d.ts +1 -0
- package/dist/components/icon-link/index.js +1 -0
- package/dist/components/icons/arte-odyssey.d.ts +3 -0
- package/dist/components/icons/arte-odyssey.js +463 -0
- package/dist/components/icons/base.d.ts +9 -0
- package/dist/components/icons/base.js +13 -0
- package/dist/components/icons/github-mark.d.ts +3 -0
- package/dist/components/icons/github-mark.js +33 -0
- package/dist/components/icons/icons.stories.js +276 -0
- package/dist/components/icons/index.d.ts +7 -0
- package/dist/components/icons/index.js +7 -0
- package/dist/components/icons/logo.d.ts +6 -0
- package/dist/components/icons/logo.js +50 -0
- package/dist/components/icons/lucide.d.ts +50 -0
- package/dist/components/icons/lucide.js +569 -0
- package/dist/components/icons/qiita.d.ts +3 -0
- package/dist/components/icons/qiita.js +48 -0
- package/dist/components/icons/twitter.d.ts +3 -0
- package/dist/components/icons/twitter.js +34 -0
- package/dist/components/icons/zenn.d.ts +6 -0
- package/dist/components/icons/zenn.js +41 -0
- package/dist/components/index.d.ts +37 -0
- package/dist/components/index.js +37 -0
- package/dist/components/link-button/index.d.ts +1 -0
- package/dist/components/link-button/index.js +1 -0
- package/dist/components/link-button/link-button.d.ts +19 -0
- package/dist/components/link-button/link-button.js +46 -0
- package/dist/components/link-button/link-button.stories.js +51 -0
- package/dist/components/list-box/hooks.d.ts +37 -0
- package/dist/components/list-box/hooks.js +70 -0
- package/dist/components/list-box/index.d.ts +1 -0
- package/dist/components/list-box/index.js +1 -0
- package/dist/components/list-box/list-box.d.ts +22 -0
- package/dist/components/list-box/list-box.js +145 -0
- package/dist/components/list-box/list-box.stories.js +69 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/modal/modal.d.ts +8 -0
- package/dist/components/modal/modal.js +118 -0
- package/dist/components/modal/modal.stories.js +22 -0
- package/dist/components/popover/hooks.d.ts +65 -0
- package/dist/components/popover/hooks.js +187 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +18 -0
- package/dist/components/popover/popover.js +141 -0
- package/dist/components/popover/popover.stories.js +45 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +7 -0
- package/dist/components/progress/progress.js +21 -0
- package/dist/components/progress/progress.stories.js +16 -0
- package/dist/components/providers/component-provider.d.ts +2 -0
- package/dist/components/providers/component-provider.js +9 -0
- package/dist/components/providers/index.d.ts +2 -0
- package/dist/components/providers/index.js +2 -0
- package/dist/components/providers/portal-root.d.ts +5 -0
- package/dist/components/providers/portal-root.js +17 -0
- package/dist/components/scroll-linked/index.d.ts +1 -0
- package/dist/components/scroll-linked/index.js +1 -0
- package/dist/components/scroll-linked/scroll-linked.d.ts +2 -0
- package/dist/components/scroll-linked/scroll-linked.js +21 -0
- package/dist/components/scroll-linked/scroll-linked.stories.js +18 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +20 -0
- package/dist/components/separator/separator.stories.js +27 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/tabs.d.ts +16 -0
- package/dist/components/tabs/tabs.js +145 -0
- package/dist/components/tabs/tabs.stories.js +49 -0
- package/dist/components/text-tag/index.d.ts +1 -0
- package/dist/components/text-tag/index.js +1 -0
- package/dist/components/text-tag/text-tag.d.ts +5 -0
- package/dist/components/text-tag/text-tag.js +23 -0
- package/dist/components/text-tag/text-tag.stories.js +30 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +5 -0
- package/dist/components/toast/provider.d.ts +11 -0
- package/dist/components/toast/provider.js +125 -0
- package/dist/components/toast/toast.d.ts +9 -0
- package/dist/components/toast/toast.js +19 -0
- package/dist/components/toast/toast.stories.js +45 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +13 -0
- package/dist/components/tooltip/tooltip.js +60 -0
- package/dist/components/tooltip/tooltip.stories.js +40 -0
- package/dist/helpers/cn.d.ts +2 -0
- package/dist/helpers/cn.js +8 -0
- package/dist/helpers/color/find-all-colors.d.ts +12 -0
- package/dist/helpers/color/find-all-colors.js +210 -0
- package/dist/helpers/is-internal-route.d.ts +1 -0
- package/dist/helpers/is-internal-route.js +12 -0
- package/dist/helpers/number/between.d.ts +1 -0
- package/dist/helpers/number/between.js +19 -0
- package/dist/helpers/number/cast.d.ts +1 -0
- package/dist/helpers/number/cast.js +41 -0
- package/dist/helpers/number/commalize.d.ts +1 -0
- package/dist/helpers/number/commalize.js +22 -0
- package/dist/helpers/number/index.d.ts +4 -0
- package/dist/helpers/number/index.js +10 -0
- package/dist/helpers/number/to-precision.d.ts +1 -0
- package/dist/helpers/number/to-precision.js +17 -0
- package/dist/helpers/uuid-v4.d.ts +1 -0
- package/dist/helpers/uuid-v4.js +32 -0
- package/dist/hooks/click-away/index.d.ts +2 -0
- package/dist/hooks/click-away/index.js +24 -0
- package/dist/hooks/click-away/index.test.js +31 -0
- package/dist/hooks/client/index.d.ts +1 -0
- package/dist/hooks/client/index.js +12 -0
- package/dist/hooks/clipboard/index.d.ts +4 -0
- package/dist/hooks/clipboard/index.js +17 -0
- package/dist/hooks/clipboard/index.test.js +35 -0
- package/dist/hooks/hash/index.d.ts +1 -0
- package/dist/hooks/hash/index.js +28 -0
- package/dist/hooks/hash/index.test.js +46 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/interval/index.d.ts +1 -0
- package/dist/hooks/interval/index.js +17 -0
- package/dist/hooks/interval/index.test.js +32 -0
- package/dist/hooks/local-storage/index.d.ts +1 -0
- package/dist/hooks/local-storage/index.js +48 -0
- package/dist/hooks/local-storage/index.test.js +82 -0
- package/dist/hooks/scroll-direction/index.d.ts +6 -0
- package/dist/hooks/scroll-direction/index.js +40 -0
- package/dist/hooks/scroll-direction/index.test.js +174 -0
- package/dist/hooks/step/index.d.ts +13 -0
- package/dist/hooks/step/index.js +39 -0
- package/dist/hooks/step/index.test.js +85 -0
- package/dist/hooks/timeout/index.d.ts +1 -0
- package/dist/hooks/timeout/index.js +17 -0
- package/dist/hooks/timeout/index.test.js +31 -0
- package/dist/hooks/window-size/index.d.ts +6 -0
- package/dist/hooks/window-size/index.js +22 -0
- package/dist/hooks/window-size/index.test.js +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/package.json +6 -0
- package/dist/styles/index.css +394 -0
- package/dist/types/variables.d.ts +6 -0
- package/dist/types/variables.js +0 -0
- package/package.json +110 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Koki Sakano
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as motion from "motion/react-client";
|
|
4
|
+
import { cn } from "./../../helpers/cn";
|
|
5
|
+
import { ChevronIcon } from "../icons";
|
|
6
|
+
import { useItemId, useOpen, useToggleOpen } from "./context";
|
|
7
|
+
const AccordionButton = ({ children }) => {
|
|
8
|
+
const id = useItemId();
|
|
9
|
+
const open = useOpen();
|
|
10
|
+
const toggleOpen = useToggleOpen();
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
"button",
|
|
13
|
+
{
|
|
14
|
+
"aria-controls": `${id}-panel`,
|
|
15
|
+
"aria-expanded": open,
|
|
16
|
+
className: cn(
|
|
17
|
+
"flex w-full flex-row items-center justify-between rounded-md p-2",
|
|
18
|
+
"hover:bg-bg-mute",
|
|
19
|
+
"focus-visible::first:bordertransparent focus-visible:bg-bg-mute focus-visible::first:outline-none focus-visible::first:ring-2 focus-visible::first:ring-border-info"
|
|
20
|
+
),
|
|
21
|
+
id: `${id}-button`,
|
|
22
|
+
onClick: toggleOpen,
|
|
23
|
+
type: "button",
|
|
24
|
+
children: [
|
|
25
|
+
children,
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
motion.span,
|
|
28
|
+
{
|
|
29
|
+
animate: open ? { rotate: 180 } : { rotate: 0 },
|
|
30
|
+
transition: { duration: 0.3 },
|
|
31
|
+
children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "down" })
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
AccordionButton
|
|
40
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { AccordionItemProvider } from "./context";
|
|
5
|
+
const AccordionItem = ({ children, defaultOpen = false }) => {
|
|
6
|
+
const id = useId();
|
|
7
|
+
return /* @__PURE__ */ jsx(AccordionItemProvider, { defaultOpen, id, children: /* @__PURE__ */ jsx("div", { className: "border-border-mute border-t last:border-b", children }) });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
AccordionItem
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "./../../helpers/cn";
|
|
4
|
+
import { useItemId, useOpen } from "./context";
|
|
5
|
+
const AccordionPanel = ({ children }) => {
|
|
6
|
+
const id = useItemId();
|
|
7
|
+
const open = useOpen();
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"section",
|
|
10
|
+
{
|
|
11
|
+
"aria-labelledby": `${id}-button`,
|
|
12
|
+
className: cn({ hidden: !open }, "p-2"),
|
|
13
|
+
hidden: !open,
|
|
14
|
+
id: `${id}-panel`,
|
|
15
|
+
children
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
AccordionPanel
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./../../helpers/cn";
|
|
3
|
+
const Accordion = ({ children }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: cn(
|
|
8
|
+
"rounded-md border-2 border-border-mute bg-bg-base p-2",
|
|
9
|
+
"focus-within:bordertransparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-border-info"
|
|
10
|
+
),
|
|
11
|
+
children
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
Accordion
|
|
17
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion } from "./accordion";
|
|
3
|
+
import { AccordionButton } from "./accordion-button";
|
|
4
|
+
import { AccordionItem } from "./accordion-item";
|
|
5
|
+
import { AccordionPanel } from "./accordion-panel";
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "components/accordion",
|
|
8
|
+
component: Accordion
|
|
9
|
+
};
|
|
10
|
+
var accordion_stories_default = meta;
|
|
11
|
+
const Primary = {
|
|
12
|
+
args: {},
|
|
13
|
+
render: () => {
|
|
14
|
+
return /* @__PURE__ */ jsxs(Accordion, { children: [
|
|
15
|
+
/* @__PURE__ */ jsxs(AccordionItem, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx(AccordionButton, { children: /* @__PURE__ */ jsx("p", { className: "text-lg", children: "\u96E8\u30CB\u30E2\u30DE\u30B1\u30BA" }) }) }),
|
|
17
|
+
/* @__PURE__ */ jsxs(AccordionPanel, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx("p", { children: "\u96E8\u30CB\u30E2\u30DE\u30B1\u30BA" }),
|
|
19
|
+
/* @__PURE__ */ jsx("p", { children: "\u98A8\u30CB\u30E2\u30DE\u30B1\u30BA" }),
|
|
20
|
+
/* @__PURE__ */ jsx("p", { children: "\u96EA\u30CB\u30E2\u590F\u30CE\u6691\u30B5\u30CB\u30E2\u30DE\u30B1\u30CC" }),
|
|
21
|
+
/* @__PURE__ */ jsx("p", { children: "\u4E08\u592B\u30CA\u30AB\u30E9\u30C0\u30F2\u30E2\u30C1" }),
|
|
22
|
+
/* @__PURE__ */ jsx("p", { children: "\u617E\u30CF\u30CA\u30AF" }),
|
|
23
|
+
/* @__PURE__ */ jsx("p", { children: "\u6C7A\u30B7\u30C6\u778B\u30E9\u30BA" }),
|
|
24
|
+
/* @__PURE__ */ jsx("p", { children: "\u30A4\u30C4\u30E2\u30B7\u30C5\u30AB\u30CB\u30EF\u30E9\u30C3\u30C6\u30F0\u30EB" }),
|
|
25
|
+
/* @__PURE__ */ jsx("p", { children: "\u4E00\u65E5\u30CB\u7384\u7C73\u56DB\u5408\u30C8" }),
|
|
26
|
+
/* @__PURE__ */ jsx("p", { children: "\u5473\u564C\u30C8\u5C11\u30B7\u30CE\u91CE\u83DC\u30F2\u30BF\u30D9" }),
|
|
27
|
+
/* @__PURE__ */ jsx("p", { children: "\u30A2\u30E9\u30E6\u30EB\u30B3\u30C8\u30F2" }),
|
|
28
|
+
/* @__PURE__ */ jsx("p", { children: "\u30B8\u30D6\u30F3\u30F2\u30AB\u30F3\u30B8\u30E7\u30A6\u30CB\u5165\u30EC\u30BA\u30CB" }),
|
|
29
|
+
/* @__PURE__ */ jsx("p", { children: "\u30E8\u30AF\u30DF\u30AD\u30AD\u30B7\u30EF\u30AB\u30EA" }),
|
|
30
|
+
/* @__PURE__ */ jsx("p", { children: "\u30BD\u30B7\u30C6\u30EF\u30B9\u30EC\u30BA" }),
|
|
31
|
+
/* @__PURE__ */ jsx("p", { children: "\u91CE\u539F\u30CE\u677E\u30CE\u6797\u30CE" }),
|
|
32
|
+
/* @__PURE__ */ jsx("p", { children: "\u5C0F\u30B5\u30CA\u8413\u30D6\u30AD\u30CE\u5C0F\u5C4B\u30CB\u30F0\u30C6" }),
|
|
33
|
+
/* @__PURE__ */ jsx("p", { children: "\u6771\u30CB\u75C5\u6C17\u30CE\u30B3\u30C9\u30E2\u30A2\u30EC\u30D0" }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { children: "\u884C\u30C3\u30C6\u770B\u75C5\u30B7\u30C6\u30E4\u30EA" }),
|
|
35
|
+
/* @__PURE__ */ jsx("p", { children: "\u897F\u30CB\u30C4\u30AB\u30EC\u30BF\u6BCD\u30A2\u30EC\u30D0" }),
|
|
36
|
+
/* @__PURE__ */ jsx("p", { children: "\u884C\u30C3\u30C6\u30BD\u30CE\u7A32\u30CE\u673F\u30F2\uFF3B\uFF03\u300C\u673F\u30F2\u300D\u306F\u30DE\u30DE\uFF3D\u8CA0\u30D2" }),
|
|
37
|
+
/* @__PURE__ */ jsx("p", { children: "\u5357\u30CB\u6B7B\u30CB\u30B5\u30A6\u30CA\u4EBA\u30A2\u30EC\u30D0" }),
|
|
38
|
+
/* @__PURE__ */ jsx("p", { children: "\u884C\u30C3\u30C6\u30B3\u30CF\u30AC\u30E9\u30CA\u30AF\u30C6\u30E2\u30A4\u30FD\u30C8\u30A4\u30D2" }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { children: "\u5317\u30CB\u30B1\u30F3\u30AF\u30EE\u30E4\u30BD\u30B7\u30E7\u30A6\u30AC\u30A2\u30EC\u30D0" }),
|
|
40
|
+
/* @__PURE__ */ jsx("p", { children: "\u30C4\u30DE\u30E9\u30CA\u30A4\u30AB\u30E9\u30E4\u30E1\u30ED\u30C8\u30A4\u30D2" }),
|
|
41
|
+
/* @__PURE__ */ jsx("p", { children: "\u30D2\u30C9\u30EA\u30CE\u30C8\u30AD\u30CF\u30CA\u30DF\u30C0\u30F2\u30CA\u30AC\u30B7" }),
|
|
42
|
+
/* @__PURE__ */ jsx("p", { children: "\u30B5\u30E0\u30B5\u30CE\u30CA\u30C4\u30CF\u30AA\u30ED\u30AA\u30ED\u30A2\u30EB\u30AD" }),
|
|
43
|
+
/* @__PURE__ */ jsx("p", { children: "\u30DF\u30F3\u30CA\u30CB\u30C7\u30AF\u30CE\u30DC\u30FC\u30C8\u30E8\u30D0\u30EC" }),
|
|
44
|
+
/* @__PURE__ */ jsx("p", { children: "\u30DB\u30E1\u30E9\u30EC\u30E2\u30BB\u30BA" }),
|
|
45
|
+
/* @__PURE__ */ jsx("p", { children: "\u30AF\u30CB\u30E2\u30B5\u30EC\u30BA" }),
|
|
46
|
+
/* @__PURE__ */ jsx("p", { children: "\u30B5\u30A6\u30A4\u30D5\u30E2\u30CE\u30CB" }),
|
|
47
|
+
/* @__PURE__ */ jsx("p", { children: "\u30EF\u30BF\u30B7\u30CF\u30CA\u30EA\u30BF\u30A4" })
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsxs(AccordionItem, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx(AccordionButton, { children: /* @__PURE__ */ jsx("p", { className: "text-lg", children: "\u3042\u3069\u3051\u306A\u3044\u8A71" }) }) }),
|
|
52
|
+
/* @__PURE__ */ jsxs(AccordionPanel, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx("p", { children: "\u667A\u6075\u5B50\u306F\u6771\u4EAC\u306B\u7A7A\u304C\u7121\u3044\u3068\u3044\u3075\u3001" }),
|
|
54
|
+
/* @__PURE__ */ jsx("p", { children: "\u307B\u3093\u3068\u306E\u7A7A\u304C\u898B\u305F\u3044\u3068\u3044\u3075\u3002" }),
|
|
55
|
+
/* @__PURE__ */ jsx("p", { children: "\u79C1\u306F\u9A5A\u3044\u3066\u7A7A\u3092\u898B\u308B\u3002" }),
|
|
56
|
+
/* @__PURE__ */ jsx("p", { children: "\u685C\u82E5\u8449\u306E\u9593\u306B\u5728\u308B\u306E\u306F\u3001" }),
|
|
57
|
+
/* @__PURE__ */ jsx("p", { children: "\u5207\u3064\u3066\u3082\u5207\u308C\u306A\u3044" }),
|
|
58
|
+
/* @__PURE__ */ jsx("p", { children: "\u3080\u304B\u3057\u306A\u3058\u307F\u306E\u304D\u308C\u3044\u306A\u7A7A\u3060\u3002" }),
|
|
59
|
+
/* @__PURE__ */ jsx("p", { children: "\u3069\u3093\u3088\u308A\u3051\u3080\u308B\u5730\u5E73\u306E\u307C\u304B\u3057\u306F" }),
|
|
60
|
+
/* @__PURE__ */ jsx("p", { children: "\u3046\u3059\u3082\u3082\u8272\u306E\u671D\u306E\u3057\u3081\u308A\u3060\u3002" }),
|
|
61
|
+
/* @__PURE__ */ jsx("p", { children: "\u667A\u6075\u5B50\u306F\u9060\u304F\u3092\u898B\u306A\u304C\u3089\u8A00\u3075\u3002" }),
|
|
62
|
+
/* @__PURE__ */ jsx("p", { children: "\u963F\u591A\u591A\u7F85\u5C71\u3042\u305F\u305F\u3089\u3084\u307E\u306E\u5C71\u306E\u4E0A\u306B" }),
|
|
63
|
+
/* @__PURE__ */ jsx("p", { children: "\u6BCE\u65E5\u51FA\u3066\u3090\u308B\u9752\u3044\u7A7A\u304C" }),
|
|
64
|
+
/* @__PURE__ */ jsx("p", { children: "\u667A\u6075\u5B50\u306E\u307B\u3093\u3068\u306E\u7A7A\u3060\u3068\u3044\u3075\u3002" }),
|
|
65
|
+
/* @__PURE__ */ jsx("p", { children: "\u3042\u3069\u3051\u306A\u3044\u7A7A\u306E\u8A71\u3067\u3042\u308B\u3002" })
|
|
66
|
+
] })
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ jsxs(AccordionItem, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx(AccordionButton, { children: /* @__PURE__ */ jsx("p", { className: "text-lg", children: "\u304B\u306A\u3057\u307F" }) }) }),
|
|
70
|
+
/* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
72
|
+
/* @__PURE__ */ jsx("p", { children: "\u3042\u306E\u9752\u3044\u7A7A\u306E\u6CE2\u306E\u97F3\u304C\u805E\u3048\u308B\u3042\u305F\u308A\u306B" }),
|
|
73
|
+
/* @__PURE__ */ jsx("p", { children: "\u4F55\u304B\u3068\u3093\u3067\u3082\u306A\u3044\u304A\u3068\u3057\u7269\u3092" }),
|
|
74
|
+
/* @__PURE__ */ jsx("p", { children: "\u50D5\u306F\u3057\u3066\u304D\u3066\u3057\u307E\u3063\u305F\u3089\u3057\u3044" })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
77
|
+
/* @__PURE__ */ jsx("p", { children: "\u900F\u660E\u306A\u904E\u53BB\u306E\u99C5\u3067" }),
|
|
78
|
+
/* @__PURE__ */ jsx("p", { children: "\u907A\u5931\u7269\u4FC2\u306E\u524D\u306B\u7ACB\u3063\u305F\u3089" }),
|
|
79
|
+
/* @__PURE__ */ jsx("p", { children: "\u50D5\u306F\u4F59\u8A08\u306B\u60B2\u3057\u304F\u306A\u3063\u3066\u3057\u307E\u3063\u305F" })
|
|
80
|
+
] })
|
|
81
|
+
] }) })
|
|
82
|
+
] })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
Primary,
|
|
88
|
+
accordion_stories_default as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
2
|
+
type ToggleOpen = () => void;
|
|
3
|
+
export declare const useOpen: () => boolean;
|
|
4
|
+
export declare const useToggleOpen: () => ToggleOpen;
|
|
5
|
+
export declare const useItemId: () => string;
|
|
6
|
+
export declare const AccordionItemProvider: FC<PropsWithChildren<{
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
}>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
use,
|
|
5
|
+
useCallback,
|
|
6
|
+
useState
|
|
7
|
+
} from "react";
|
|
8
|
+
const OpenContext = createContext(false);
|
|
9
|
+
const ToggleOpenContext = createContext(void 0);
|
|
10
|
+
const ItemIdContext = createContext(void 0);
|
|
11
|
+
const useOpen = () => use(OpenContext);
|
|
12
|
+
const useToggleOpen = () => {
|
|
13
|
+
const toggleOpen = use(ToggleOpenContext);
|
|
14
|
+
if (!toggleOpen) {
|
|
15
|
+
throw new Error("useToggleOpen must be used within AccordionProvider");
|
|
16
|
+
}
|
|
17
|
+
return toggleOpen;
|
|
18
|
+
};
|
|
19
|
+
const useItemId = () => {
|
|
20
|
+
const id = use(ItemIdContext);
|
|
21
|
+
if (!id) {
|
|
22
|
+
throw new Error("useItemId must be used within AccordionProvider");
|
|
23
|
+
}
|
|
24
|
+
return id;
|
|
25
|
+
};
|
|
26
|
+
const AccordionItemProvider = ({ defaultOpen = false, id, children }) => {
|
|
27
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
28
|
+
const toggleOpen = useCallback(() => {
|
|
29
|
+
setOpen((open2) => !open2);
|
|
30
|
+
}, []);
|
|
31
|
+
return /* @__PURE__ */ jsx(OpenContext, { value: open, children: /* @__PURE__ */ jsx(ToggleOpenContext, { value: toggleOpen, children: /* @__PURE__ */ jsx(ItemIdContext, { value: id, children }) }) });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
AccordionItemProvider,
|
|
35
|
+
useItemId,
|
|
36
|
+
useOpen,
|
|
37
|
+
useToggleOpen
|
|
38
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./../../helpers/cn";
|
|
3
|
+
import { AlertIcon } from "../icons";
|
|
4
|
+
const STATUS_LABEL = {
|
|
5
|
+
success: "\u6210\u529F",
|
|
6
|
+
info: "\u60C5\u5831",
|
|
7
|
+
warning: "\u8B66\u544A",
|
|
8
|
+
error: "\u30A8\u30E9\u30FC"
|
|
9
|
+
};
|
|
10
|
+
const Alert = ({ status, message }) => {
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"flex items-center gap-2 rounded-md p-4",
|
|
16
|
+
status === "success" && "bg-bg-success",
|
|
17
|
+
status === "info" && "bg-bg-info",
|
|
18
|
+
status === "warning" && "bg-bg-warning",
|
|
19
|
+
status === "error" && "bg-bg-error"
|
|
20
|
+
),
|
|
21
|
+
role: status === "error" || status === "warning" ? "alert" : "status",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsxs(
|
|
24
|
+
"span",
|
|
25
|
+
{
|
|
26
|
+
className: cn(
|
|
27
|
+
"size-8",
|
|
28
|
+
status === "success" && "text-fg-success",
|
|
29
|
+
status === "info" && "text-fg-info",
|
|
30
|
+
status === "warning" && "text-fg-warning",
|
|
31
|
+
status === "error" && "text-fg-error"
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(AlertIcon, { size: "lg", status }),
|
|
35
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: STATUS_LABEL[status] })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
Array.isArray(message) ? message.length > 1 ? /* @__PURE__ */ jsx("ul", { className: "ml-4 list-disc", children: message.map((msg) => /* @__PURE__ */ jsx("li", { className: "text-lg", children: msg }, msg)) }) : /* @__PURE__ */ jsx("p", { className: "font-bold text-lg", children: message[0] }) : /* @__PURE__ */ jsx("p", { className: "font-bold text-lg", children: message })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
Alert
|
|
46
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Alert } from "./alert";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "components/alert",
|
|
4
|
+
component: Alert
|
|
5
|
+
};
|
|
6
|
+
var alert_stories_default = meta;
|
|
7
|
+
const Success = {
|
|
8
|
+
args: {
|
|
9
|
+
status: "success",
|
|
10
|
+
message: "Success"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Info = {
|
|
14
|
+
args: {
|
|
15
|
+
status: "info",
|
|
16
|
+
message: "Info"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const Warning = {
|
|
20
|
+
args: {
|
|
21
|
+
status: "warning",
|
|
22
|
+
message: "Warning"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const Error = {
|
|
26
|
+
args: {
|
|
27
|
+
status: "error",
|
|
28
|
+
message: "Error"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const ArrayMessage = {
|
|
32
|
+
args: {
|
|
33
|
+
status: "success",
|
|
34
|
+
message: ["Success1", "Success2", "Success3"]
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const SingleArrayMessage = {
|
|
38
|
+
args: {
|
|
39
|
+
status: "success",
|
|
40
|
+
message: ["Success"]
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
ArrayMessage,
|
|
45
|
+
Error,
|
|
46
|
+
Info,
|
|
47
|
+
SingleArrayMessage,
|
|
48
|
+
Success,
|
|
49
|
+
Warning,
|
|
50
|
+
alert_stories_default as default
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./alert";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const Anchor: ({ href, children, openInNewTab, renderAnchor, }: {
|
|
3
|
+
href: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
openInNewTab?: boolean;
|
|
6
|
+
renderAnchor?: (props: {
|
|
7
|
+
type: "internal" | "external";
|
|
8
|
+
href: string;
|
|
9
|
+
className: string;
|
|
10
|
+
target?: string;
|
|
11
|
+
rel?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
}) => ReactNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isInternalRoute } from "./../../helpers/is-internal-route";
|
|
3
|
+
import { ExternalLinkIcon } from "../icons";
|
|
4
|
+
const Anchor = ({
|
|
5
|
+
href,
|
|
6
|
+
children,
|
|
7
|
+
openInNewTab = false,
|
|
8
|
+
renderAnchor = ({ children: children2, ...props }) => /* @__PURE__ */ jsx("a", { ...props, children: children2 })
|
|
9
|
+
}) => {
|
|
10
|
+
const type = isInternalRoute(href) && !openInNewTab ? "internal" : "external";
|
|
11
|
+
const props = type === "internal" ? {
|
|
12
|
+
className: "text-fg-info cursor-pointer underline",
|
|
13
|
+
children
|
|
14
|
+
} : {
|
|
15
|
+
className: "text-fg-info inline-flex cursor-pointer items-center gap-0.5 underline",
|
|
16
|
+
target: "_blank",
|
|
17
|
+
rel: "noopener noreferrer",
|
|
18
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
children,
|
|
20
|
+
/* @__PURE__ */ jsx(ExternalLinkIcon, { size: "sm" })
|
|
21
|
+
] })
|
|
22
|
+
};
|
|
23
|
+
return renderAnchor({
|
|
24
|
+
type,
|
|
25
|
+
href,
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
Anchor
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Anchor } from "./anchor";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "components/anchor",
|
|
4
|
+
component: Anchor
|
|
5
|
+
};
|
|
6
|
+
var anchor_stories_default = meta;
|
|
7
|
+
const External = {
|
|
8
|
+
args: {
|
|
9
|
+
href: "https://example.com",
|
|
10
|
+
children: "external link"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Internal = {
|
|
14
|
+
args: {
|
|
15
|
+
href: "/blog",
|
|
16
|
+
children: "internal link"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
External,
|
|
21
|
+
Internal,
|
|
22
|
+
anchor_stories_default as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './anchor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./anchor";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace React {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
interface IntrinsicElements {
|
|
6
|
+
'baseline-status': {
|
|
7
|
+
featureId: string;
|
|
8
|
+
className: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export declare const BaselineStatus: FC<{
|
|
15
|
+
featureId: string;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
4
|
+
let didInit = false;
|
|
5
|
+
const BaselineStatus = ({ featureId }) => {
|
|
6
|
+
const isLoad = useSyncExternalStore(
|
|
7
|
+
(onStoreChange) => {
|
|
8
|
+
if (!didInit) {
|
|
9
|
+
didInit = true;
|
|
10
|
+
void import("baseline-status").then(() => {
|
|
11
|
+
onStoreChange();
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return () => {
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
() => didInit,
|
|
18
|
+
() => false
|
|
19
|
+
);
|
|
20
|
+
if (!isLoad) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: "max-w-full animate-pulse rounded-md border border-border-base bg-bg-base p-4",
|
|
25
|
+
style: { height: "120px" }
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
"baseline-status",
|
|
31
|
+
{
|
|
32
|
+
className: "wrap-normal max-w-full rounded-md border border-border-base bg-bg-base p-4",
|
|
33
|
+
featureId
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
BaselineStatus
|
|
39
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaselineStatus } from "./baseline-status";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "components/baseline-status",
|
|
4
|
+
component: BaselineStatus
|
|
5
|
+
};
|
|
6
|
+
var baseline_status_stories_default = meta;
|
|
7
|
+
const Primary = {
|
|
8
|
+
args: {
|
|
9
|
+
featureId: "promise-try"
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
Primary,
|
|
14
|
+
baseline_status_stories_default as default
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './baseline-status';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./baseline-status";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
export declare const Breadcrumb: {
|
|
3
|
+
List: FC<PropsWithChildren<{
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
}>>;
|
|
6
|
+
Item: FC<{
|
|
7
|
+
children?: React.ReactNode | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
Separator: FC;
|
|
10
|
+
Link: FC<PropsWithChildren<{
|
|
11
|
+
href: string;
|
|
12
|
+
current?: boolean;
|
|
13
|
+
component?: FC<{
|
|
14
|
+
href: string;
|
|
15
|
+
className: string;
|
|
16
|
+
}>;
|
|
17
|
+
}>>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "./../../helpers/cn";
|
|
3
|
+
import { ChevronIcon } from "../icons";
|
|
4
|
+
const List = ({ children, size = "md" }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "\u30D1\u30F3\u30AF\u30BA\u30EA\u30B9\u30C8", children: /* @__PURE__ */ jsx(
|
|
6
|
+
"ol",
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"flex list-none items-center gap-1 font-bold text-fg-mute",
|
|
10
|
+
size === "sm" && "text-xs",
|
|
11
|
+
size === "md" && "text-xs md:text-md",
|
|
12
|
+
size === "lg" && "text-xl md:text-2xl"
|
|
13
|
+
),
|
|
14
|
+
children
|
|
15
|
+
}
|
|
16
|
+
) });
|
|
17
|
+
};
|
|
18
|
+
const Item = ({ children }) => {
|
|
19
|
+
return /* @__PURE__ */ jsx("li", { className: "inline-flex items-center", children });
|
|
20
|
+
};
|
|
21
|
+
const Separator = () => {
|
|
22
|
+
return /* @__PURE__ */ jsx("li", { className: "text-fg-mute", children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "right", size: "sm" }) });
|
|
23
|
+
};
|
|
24
|
+
const _Link = ({ href, current = false, children, component }) => {
|
|
25
|
+
const Link = component ?? "a";
|
|
26
|
+
return current ? /* @__PURE__ */ jsx("span", { className: "text-fg-base", children }) : /* @__PURE__ */ jsx(Link, { className: "text-fg-mute underline hover:text-fg-base", href, children });
|
|
27
|
+
};
|
|
28
|
+
const Breadcrumb = {
|
|
29
|
+
List,
|
|
30
|
+
Item,
|
|
31
|
+
Separator,
|
|
32
|
+
Link: _Link
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
Breadcrumb
|
|
36
|
+
};
|