@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.
Files changed (276) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/accordion/accordion-button.d.ts +2 -0
  3. package/dist/components/accordion/accordion-button.js +40 -0
  4. package/dist/components/accordion/accordion-item.d.ts +4 -0
  5. package/dist/components/accordion/accordion-item.js +11 -0
  6. package/dist/components/accordion/accordion-panel.d.ts +2 -0
  7. package/dist/components/accordion/accordion-panel.js +21 -0
  8. package/dist/components/accordion/accordion.d.ts +2 -0
  9. package/dist/components/accordion/accordion.js +17 -0
  10. package/dist/components/accordion/accordion.stories.js +89 -0
  11. package/dist/components/accordion/context.d.ts +10 -0
  12. package/dist/components/accordion/context.js +38 -0
  13. package/dist/components/accordion/index.d.ts +4 -0
  14. package/dist/components/accordion/index.js +4 -0
  15. package/dist/components/alert/alert.d.ts +8 -0
  16. package/dist/components/alert/alert.js +46 -0
  17. package/dist/components/alert/alert.stories.js +51 -0
  18. package/dist/components/alert/index.d.ts +1 -0
  19. package/dist/components/alert/index.js +1 -0
  20. package/dist/components/anchor/anchor.d.ts +14 -0
  21. package/dist/components/anchor/anchor.js +31 -0
  22. package/dist/components/anchor/anchor.stories.js +23 -0
  23. package/dist/components/anchor/index.d.ts +1 -0
  24. package/dist/components/anchor/index.js +1 -0
  25. package/dist/components/baseline-status/baseline-status.d.ts +16 -0
  26. package/dist/components/baseline-status/baseline-status.js +39 -0
  27. package/dist/components/baseline-status/baseline-status.stories.js +15 -0
  28. package/dist/components/baseline-status/index.d.ts +1 -0
  29. package/dist/components/baseline-status/index.js +1 -0
  30. package/dist/components/breadcrumb/breadcrumb.d.ts +18 -0
  31. package/dist/components/breadcrumb/breadcrumb.js +36 -0
  32. package/dist/components/breadcrumb/breadcrumb.stories.js +40 -0
  33. package/dist/components/breadcrumb/index.d.ts +1 -0
  34. package/dist/components/breadcrumb/index.js +1 -0
  35. package/dist/components/button/button.d.ts +10 -0
  36. package/dist/components/button/button.js +55 -0
  37. package/dist/components/button/button.stories.js +96 -0
  38. package/dist/components/button/index.d.ts +1 -0
  39. package/dist/components/button/index.js +1 -0
  40. package/dist/components/card/card.d.ts +3 -0
  41. package/dist/components/card/card.js +26 -0
  42. package/dist/components/card/card.stories.js +38 -0
  43. package/dist/components/card/index.d.ts +2 -0
  44. package/dist/components/card/index.js +2 -0
  45. package/dist/components/card/interactive-card.d.ts +3 -0
  46. package/dist/components/card/interactive-card.js +34 -0
  47. package/dist/components/card/type.d.ts +6 -0
  48. package/dist/components/card/type.js +0 -0
  49. package/dist/components/code/code.d.ts +4 -0
  50. package/dist/components/code/code.js +38 -0
  51. package/dist/components/code/code.stories.js +60 -0
  52. package/dist/components/code/index.d.ts +1 -0
  53. package/dist/components/code/index.js +4 -0
  54. package/dist/components/dialog/dialog.d.ts +17 -0
  55. package/dist/components/dialog/dialog.js +85 -0
  56. package/dist/components/dialog/dialog.stories.js +98 -0
  57. package/dist/components/dialog/index.d.ts +1 -0
  58. package/dist/components/dialog/index.js +1 -0
  59. package/dist/components/drawer/drawer.d.ts +6 -0
  60. package/dist/components/drawer/drawer.js +56 -0
  61. package/dist/components/drawer/drawer.stories.js +25 -0
  62. package/dist/components/drawer/index.d.ts +1 -0
  63. package/dist/components/drawer/index.js +1 -0
  64. package/dist/components/dropdown-menu/dropdown-menu.d.ts +24 -0
  65. package/dist/components/dropdown-menu/dropdown-menu.js +130 -0
  66. package/dist/components/dropdown-menu/dropdown-menu.stories.js +111 -0
  67. package/dist/components/dropdown-menu/hooks.d.ts +23 -0
  68. package/dist/components/dropdown-menu/hooks.js +56 -0
  69. package/dist/components/dropdown-menu/index.d.ts +1 -0
  70. package/dist/components/dropdown-menu/index.js +1 -0
  71. package/dist/components/error-boundary/index.d.ts +1 -0
  72. package/dist/components/error-boundary/index.js +4 -0
  73. package/dist/components/form/autocomplete/autocomplete.d.ts +14 -0
  74. package/dist/components/form/autocomplete/autocomplete.js +225 -0
  75. package/dist/components/form/autocomplete/autocomplete.stories.js +59 -0
  76. package/dist/components/form/autocomplete/index.d.ts +1 -0
  77. package/dist/components/form/autocomplete/index.js +1 -0
  78. package/dist/components/form/checkbox/checkbox.d.ts +8 -0
  79. package/dist/components/form/checkbox/checkbox.js +40 -0
  80. package/dist/components/form/checkbox/checkbox.stories.js +27 -0
  81. package/dist/components/form/checkbox/index.d.ts +1 -0
  82. package/dist/components/form/checkbox/index.js +1 -0
  83. package/dist/components/form/form-control/form-control.d.ts +20 -0
  84. package/dist/components/form/form-control/form-control.js +53 -0
  85. package/dist/components/form/form-control/form-control.stories.js +94 -0
  86. package/dist/components/form/form-control/index.d.ts +1 -0
  87. package/dist/components/form/form-control/index.js +1 -0
  88. package/dist/components/form/number-field/index.d.ts +1 -0
  89. package/dist/components/form/number-field/index.js +1 -0
  90. package/dist/components/form/number-field/number-field.d.ts +17 -0
  91. package/dist/components/form/number-field/number-field.js +150 -0
  92. package/dist/components/form/number-field/number-field.stories.js +106 -0
  93. package/dist/components/form/radio/index.d.ts +1 -0
  94. package/dist/components/form/radio/index.js +1 -0
  95. package/dist/components/form/radio/radio.d.ts +11 -0
  96. package/dist/components/form/radio/radio.js +51 -0
  97. package/dist/components/form/radio/radio.stories.js +55 -0
  98. package/dist/components/form/range-field/index.d.ts +1 -0
  99. package/dist/components/form/range-field/index.js +4 -0
  100. package/dist/components/form/range-field/range-field.d.ts +17 -0
  101. package/dist/components/form/range-field/range-field.js +54 -0
  102. package/dist/components/form/range-field/range-field.stories.js +162 -0
  103. package/dist/components/form/select/index.d.ts +1 -0
  104. package/dist/components/form/select/index.js +1 -0
  105. package/dist/components/form/select/select.d.ts +14 -0
  106. package/dist/components/form/select/select.js +39 -0
  107. package/dist/components/form/select/select.stories.js +58 -0
  108. package/dist/components/form/text-field/index.d.ts +1 -0
  109. package/dist/components/form/text-field/index.js +1 -0
  110. package/dist/components/form/text-field/text-field.d.ts +15 -0
  111. package/dist/components/form/text-field/text-field.js +40 -0
  112. package/dist/components/form/text-field/text-field.stories.js +61 -0
  113. package/dist/components/form/textarea/index.d.ts +1 -0
  114. package/dist/components/form/textarea/index.js +1 -0
  115. package/dist/components/form/textarea/textarea.d.ts +18 -0
  116. package/dist/components/form/textarea/textarea.js +56 -0
  117. package/dist/components/form/textarea/textarea.stories.js +92 -0
  118. package/dist/components/heading/heading.d.ts +8 -0
  119. package/dist/components/heading/heading.js +77 -0
  120. package/dist/components/heading/heading.stories.js +52 -0
  121. package/dist/components/heading/index.d.ts +1 -0
  122. package/dist/components/heading/index.js +1 -0
  123. package/dist/components/icon-button/icon-button.d.ts +8 -0
  124. package/dist/components/icon-button/icon-button.js +38 -0
  125. package/dist/components/icon-button/icon-button.stories.js +54 -0
  126. package/dist/components/icon-button/index.d.ts +1 -0
  127. package/dist/components/icon-button/index.js +1 -0
  128. package/dist/components/icon-link/icon-link.d.ts +17 -0
  129. package/dist/components/icon-link/icon-link.js +37 -0
  130. package/dist/components/icon-link/icon-link.stories.js +40 -0
  131. package/dist/components/icon-link/index.d.ts +1 -0
  132. package/dist/components/icon-link/index.js +1 -0
  133. package/dist/components/icons/arte-odyssey.d.ts +3 -0
  134. package/dist/components/icons/arte-odyssey.js +463 -0
  135. package/dist/components/icons/base.d.ts +9 -0
  136. package/dist/components/icons/base.js +13 -0
  137. package/dist/components/icons/github-mark.d.ts +3 -0
  138. package/dist/components/icons/github-mark.js +33 -0
  139. package/dist/components/icons/icons.stories.js +276 -0
  140. package/dist/components/icons/index.d.ts +7 -0
  141. package/dist/components/icons/index.js +7 -0
  142. package/dist/components/icons/logo.d.ts +6 -0
  143. package/dist/components/icons/logo.js +50 -0
  144. package/dist/components/icons/lucide.d.ts +50 -0
  145. package/dist/components/icons/lucide.js +569 -0
  146. package/dist/components/icons/qiita.d.ts +3 -0
  147. package/dist/components/icons/qiita.js +48 -0
  148. package/dist/components/icons/twitter.d.ts +3 -0
  149. package/dist/components/icons/twitter.js +34 -0
  150. package/dist/components/icons/zenn.d.ts +6 -0
  151. package/dist/components/icons/zenn.js +41 -0
  152. package/dist/components/index.d.ts +37 -0
  153. package/dist/components/index.js +37 -0
  154. package/dist/components/link-button/index.d.ts +1 -0
  155. package/dist/components/link-button/index.js +1 -0
  156. package/dist/components/link-button/link-button.d.ts +19 -0
  157. package/dist/components/link-button/link-button.js +46 -0
  158. package/dist/components/link-button/link-button.stories.js +51 -0
  159. package/dist/components/list-box/hooks.d.ts +37 -0
  160. package/dist/components/list-box/hooks.js +70 -0
  161. package/dist/components/list-box/index.d.ts +1 -0
  162. package/dist/components/list-box/index.js +1 -0
  163. package/dist/components/list-box/list-box.d.ts +22 -0
  164. package/dist/components/list-box/list-box.js +145 -0
  165. package/dist/components/list-box/list-box.stories.js +69 -0
  166. package/dist/components/modal/index.d.ts +1 -0
  167. package/dist/components/modal/index.js +1 -0
  168. package/dist/components/modal/modal.d.ts +8 -0
  169. package/dist/components/modal/modal.js +118 -0
  170. package/dist/components/modal/modal.stories.js +22 -0
  171. package/dist/components/popover/hooks.d.ts +65 -0
  172. package/dist/components/popover/hooks.js +187 -0
  173. package/dist/components/popover/index.d.ts +1 -0
  174. package/dist/components/popover/index.js +1 -0
  175. package/dist/components/popover/popover.d.ts +18 -0
  176. package/dist/components/popover/popover.js +141 -0
  177. package/dist/components/popover/popover.stories.js +45 -0
  178. package/dist/components/progress/index.d.ts +1 -0
  179. package/dist/components/progress/index.js +1 -0
  180. package/dist/components/progress/progress.d.ts +7 -0
  181. package/dist/components/progress/progress.js +21 -0
  182. package/dist/components/progress/progress.stories.js +16 -0
  183. package/dist/components/providers/component-provider.d.ts +2 -0
  184. package/dist/components/providers/component-provider.js +9 -0
  185. package/dist/components/providers/index.d.ts +2 -0
  186. package/dist/components/providers/index.js +2 -0
  187. package/dist/components/providers/portal-root.d.ts +5 -0
  188. package/dist/components/providers/portal-root.js +17 -0
  189. package/dist/components/scroll-linked/index.d.ts +1 -0
  190. package/dist/components/scroll-linked/index.js +1 -0
  191. package/dist/components/scroll-linked/scroll-linked.d.ts +2 -0
  192. package/dist/components/scroll-linked/scroll-linked.js +21 -0
  193. package/dist/components/scroll-linked/scroll-linked.stories.js +18 -0
  194. package/dist/components/separator/index.d.ts +1 -0
  195. package/dist/components/separator/index.js +1 -0
  196. package/dist/components/separator/separator.d.ts +4 -0
  197. package/dist/components/separator/separator.js +20 -0
  198. package/dist/components/separator/separator.stories.js +27 -0
  199. package/dist/components/tabs/index.d.ts +1 -0
  200. package/dist/components/tabs/index.js +1 -0
  201. package/dist/components/tabs/tabs.d.ts +16 -0
  202. package/dist/components/tabs/tabs.js +145 -0
  203. package/dist/components/tabs/tabs.stories.js +49 -0
  204. package/dist/components/text-tag/index.d.ts +1 -0
  205. package/dist/components/text-tag/index.js +1 -0
  206. package/dist/components/text-tag/text-tag.d.ts +5 -0
  207. package/dist/components/text-tag/text-tag.js +23 -0
  208. package/dist/components/text-tag/text-tag.stories.js +30 -0
  209. package/dist/components/toast/index.d.ts +1 -0
  210. package/dist/components/toast/index.js +5 -0
  211. package/dist/components/toast/provider.d.ts +11 -0
  212. package/dist/components/toast/provider.js +125 -0
  213. package/dist/components/toast/toast.d.ts +9 -0
  214. package/dist/components/toast/toast.js +19 -0
  215. package/dist/components/toast/toast.stories.js +45 -0
  216. package/dist/components/tooltip/index.d.ts +1 -0
  217. package/dist/components/tooltip/index.js +1 -0
  218. package/dist/components/tooltip/tooltip.d.ts +13 -0
  219. package/dist/components/tooltip/tooltip.js +60 -0
  220. package/dist/components/tooltip/tooltip.stories.js +40 -0
  221. package/dist/helpers/cn.d.ts +2 -0
  222. package/dist/helpers/cn.js +8 -0
  223. package/dist/helpers/color/find-all-colors.d.ts +12 -0
  224. package/dist/helpers/color/find-all-colors.js +210 -0
  225. package/dist/helpers/is-internal-route.d.ts +1 -0
  226. package/dist/helpers/is-internal-route.js +12 -0
  227. package/dist/helpers/number/between.d.ts +1 -0
  228. package/dist/helpers/number/between.js +19 -0
  229. package/dist/helpers/number/cast.d.ts +1 -0
  230. package/dist/helpers/number/cast.js +41 -0
  231. package/dist/helpers/number/commalize.d.ts +1 -0
  232. package/dist/helpers/number/commalize.js +22 -0
  233. package/dist/helpers/number/index.d.ts +4 -0
  234. package/dist/helpers/number/index.js +10 -0
  235. package/dist/helpers/number/to-precision.d.ts +1 -0
  236. package/dist/helpers/number/to-precision.js +17 -0
  237. package/dist/helpers/uuid-v4.d.ts +1 -0
  238. package/dist/helpers/uuid-v4.js +32 -0
  239. package/dist/hooks/click-away/index.d.ts +2 -0
  240. package/dist/hooks/click-away/index.js +24 -0
  241. package/dist/hooks/click-away/index.test.js +31 -0
  242. package/dist/hooks/client/index.d.ts +1 -0
  243. package/dist/hooks/client/index.js +12 -0
  244. package/dist/hooks/clipboard/index.d.ts +4 -0
  245. package/dist/hooks/clipboard/index.js +17 -0
  246. package/dist/hooks/clipboard/index.test.js +35 -0
  247. package/dist/hooks/hash/index.d.ts +1 -0
  248. package/dist/hooks/hash/index.js +28 -0
  249. package/dist/hooks/hash/index.test.js +46 -0
  250. package/dist/hooks/index.d.ts +10 -0
  251. package/dist/hooks/index.js +10 -0
  252. package/dist/hooks/interval/index.d.ts +1 -0
  253. package/dist/hooks/interval/index.js +17 -0
  254. package/dist/hooks/interval/index.test.js +32 -0
  255. package/dist/hooks/local-storage/index.d.ts +1 -0
  256. package/dist/hooks/local-storage/index.js +48 -0
  257. package/dist/hooks/local-storage/index.test.js +82 -0
  258. package/dist/hooks/scroll-direction/index.d.ts +6 -0
  259. package/dist/hooks/scroll-direction/index.js +40 -0
  260. package/dist/hooks/scroll-direction/index.test.js +174 -0
  261. package/dist/hooks/step/index.d.ts +13 -0
  262. package/dist/hooks/step/index.js +39 -0
  263. package/dist/hooks/step/index.test.js +85 -0
  264. package/dist/hooks/timeout/index.d.ts +1 -0
  265. package/dist/hooks/timeout/index.js +17 -0
  266. package/dist/hooks/timeout/index.test.js +31 -0
  267. package/dist/hooks/window-size/index.d.ts +6 -0
  268. package/dist/hooks/window-size/index.js +22 -0
  269. package/dist/hooks/window-size/index.test.js +18 -0
  270. package/dist/index.d.ts +2 -0
  271. package/dist/index.js +2 -0
  272. package/dist/package.json +6 -0
  273. package/dist/styles/index.css +394 -0
  274. package/dist/types/variables.d.ts +6 -0
  275. package/dist/types/variables.js +0 -0
  276. 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,2 @@
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ export declare const AccordionButton: FC<PropsWithChildren>;
@@ -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,4 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ export declare const AccordionItem: FC<PropsWithChildren<{
3
+ defaultOpen?: boolean;
4
+ }>>;
@@ -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,2 @@
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ export declare const AccordionPanel: FC<PropsWithChildren>;
@@ -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,2 @@
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ export declare const Accordion: FC<PropsWithChildren>;
@@ -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,4 @@
1
+ export * from './accordion';
2
+ export * from './accordion-button';
3
+ export * from './accordion-item';
4
+ export * from './accordion-panel';
@@ -0,0 +1,4 @@
1
+ export * from "./accordion";
2
+ export * from "./accordion-button";
3
+ export * from "./accordion-item";
4
+ export * from "./accordion-panel";
@@ -0,0 +1,8 @@
1
+ import type { FC } from 'react';
2
+ import type { Status } from './../../types/variables';
3
+ type Props = {
4
+ status: Status;
5
+ message: string | string[];
6
+ };
7
+ export declare const Alert: FC<Props>;
8
+ export {};
@@ -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
+ };