@k8o/arte-odyssey 8.0.3 → 9.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.
Files changed (132) hide show
  1. package/dist/components/buttons/button/button.d.mts +1 -1
  2. package/dist/components/buttons/button/button.mjs +1 -1
  3. package/dist/components/buttons/icon-button/icon-button.d.mts +1 -1
  4. package/dist/components/buttons/icon-button/icon-button.mjs +5 -16
  5. package/dist/components/data-display/accordion/accordion-button.mjs +2 -2
  6. package/dist/components/data-display/accordion/accordion-item.mjs +4 -1
  7. package/dist/components/data-display/accordion/accordion.mjs +1 -1
  8. package/dist/components/data-display/accordion/context.d.mts +1 -1
  9. package/dist/components/data-display/accordion/context.mjs +3 -12
  10. package/dist/components/data-display/avatar/avatar.d.mts +1 -1
  11. package/dist/components/data-display/avatar/avatar.mjs +2 -2
  12. package/dist/components/data-display/badge/badge.d.mts +1 -1
  13. package/dist/components/data-display/badge/badge.mjs +3 -3
  14. package/dist/components/data-display/card/card.mjs +2 -2
  15. package/dist/components/data-display/card/interactive-card.mjs +2 -2
  16. package/dist/components/data-display/card/type.d.mts +1 -1
  17. package/dist/components/data-display/code/code.d.mts +1 -1
  18. package/dist/components/data-display/code/code.mjs +4 -5
  19. package/dist/{helpers/color → components/data-display/code}/find-all-colors.d.mts +1 -1
  20. package/dist/{helpers/color → components/data-display/code}/find-all-colors.mjs +1 -1
  21. package/dist/components/data-display/heading/heading.d.mts +1 -1
  22. package/dist/components/data-display/heading/heading.mjs +7 -7
  23. package/dist/components/data-display/table/table.d.mts +12 -17
  24. package/dist/components/data-display/table/table.mjs +23 -21
  25. package/dist/components/feedback/alert/alert.d.mts +1 -1
  26. package/dist/components/feedback/alert/alert.mjs +2 -2
  27. package/dist/components/feedback/progress/progress.d.mts +1 -1
  28. package/dist/components/feedback/progress/progress.mjs +6 -7
  29. package/dist/components/feedback/skeleton/skeleton.d.mts +1 -1
  30. package/dist/components/feedback/skeleton/skeleton.mjs +2 -2
  31. package/dist/components/feedback/spinner/spinner.d.mts +1 -1
  32. package/dist/components/feedback/spinner/spinner.mjs +2 -2
  33. package/dist/components/feedback/toast/context.d.mts +2 -2
  34. package/dist/components/feedback/toast/context.mjs +6 -7
  35. package/dist/components/feedback/toast/provider.mjs +1 -1
  36. package/dist/components/form/autocomplete/autocomplete.d.mts +1 -1
  37. package/dist/components/form/autocomplete/autocomplete.mjs +75 -51
  38. package/dist/components/form/checkbox/checkbox.d.mts +1 -1
  39. package/dist/components/form/checkbox/checkbox.mjs +7 -4
  40. package/dist/components/form/checkbox-card/checkbox-card.d.mts +1 -1
  41. package/dist/components/form/checkbox-card/checkbox-card.mjs +10 -9
  42. package/dist/components/form/checkbox-group/checkbox-group.d.mts +1 -1
  43. package/dist/components/form/checkbox-group/index.d.mts +3 -3
  44. package/dist/components/form/file-field/file-field.d.mts +1 -1
  45. package/dist/components/form/file-field/file-field.mjs +4 -10
  46. package/dist/components/form/form/form.d.mts +1 -1
  47. package/dist/components/form/form/form.mjs +2 -3
  48. package/dist/{helpers/number → components/form/number-field}/cast.d.mts +1 -1
  49. package/dist/{helpers/number → components/form/number-field}/cast.mjs +2 -2
  50. package/dist/components/form/number-field/number-field.d.mts +1 -1
  51. package/dist/components/form/number-field/number-field.mjs +25 -24
  52. package/dist/components/form/password-input/password-input.d.mts +1 -1
  53. package/dist/components/form/password-input/password-input.mjs +3 -3
  54. package/dist/components/form/radio/radio.d.mts +1 -1
  55. package/dist/components/form/radio/radio.mjs +6 -4
  56. package/dist/components/form/radio-card/radio-card.d.mts +1 -1
  57. package/dist/components/form/radio-card/radio-card.mjs +11 -8
  58. package/dist/components/form/select/select.d.mts +1 -1
  59. package/dist/components/form/select/select.mjs +5 -4
  60. package/dist/components/form/slider/slider.d.mts +1 -1
  61. package/dist/components/form/slider/slider.mjs +15 -8
  62. package/dist/components/form/switch/switch.d.mts +1 -1
  63. package/dist/components/form/switch/switch.mjs +9 -6
  64. package/dist/components/form/text-field/text-field.d.mts +1 -1
  65. package/dist/components/form/text-field/text-field.mjs +1 -1
  66. package/dist/components/form/textarea/textarea.d.mts +1 -1
  67. package/dist/components/form/textarea/textarea.mjs +1 -1
  68. package/dist/components/icons/index.d.mts +3 -2
  69. package/dist/components/icons/index.mjs +3 -2
  70. package/dist/components/icons/logo.mjs +3 -3
  71. package/dist/components/icons/lucide.d.mts +2 -1
  72. package/dist/components/icons/lucide.mjs +6 -2
  73. package/dist/components/icons/qiita.mjs +4 -4
  74. package/dist/components/icons/twitter.mjs +1 -1
  75. package/dist/components/icons/vertical-writing.d.mts +7 -0
  76. package/dist/components/icons/vertical-writing.mjs +25 -0
  77. package/dist/components/index.d.mts +3 -2
  78. package/dist/components/index.mjs +3 -2
  79. package/dist/components/layout/separator/separator.d.mts +1 -1
  80. package/dist/components/layout/separator/separator.mjs +2 -5
  81. package/dist/components/navigation/anchor/anchor.d.mts +1 -1
  82. package/dist/components/navigation/anchor/anchor.mjs +1 -2
  83. package/dist/components/navigation/breadcrumb/breadcrumb.mjs +1 -1
  84. package/dist/components/navigation/pagination/pagination.mjs +12 -6
  85. package/dist/components/navigation/tabs/tabs.mjs +25 -25
  86. package/dist/components/overlays/dialog/dialog.mjs +3 -7
  87. package/dist/components/overlays/drawer/drawer.mjs +1 -1
  88. package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +1 -1
  89. package/dist/components/overlays/dropdown-menu/hooks.d.mts +2 -3
  90. package/dist/components/overlays/dropdown-menu/hooks.mjs +4 -9
  91. package/dist/components/overlays/list-box/hooks.d.mts +0 -1
  92. package/dist/components/overlays/list-box/hooks.mjs +3 -8
  93. package/dist/components/overlays/list-box/list-box.mjs +1 -1
  94. package/dist/components/overlays/modal/modal.mjs +9 -5
  95. package/dist/components/overlays/popover/hooks.d.mts +1 -3
  96. package/dist/components/overlays/popover/hooks.mjs +3 -8
  97. package/dist/components/overlays/popover/popover.mjs +8 -2
  98. package/dist/components/overlays/tooltip/tooltip.mjs +19 -6
  99. package/dist/helpers/chain.d.mts +5 -0
  100. package/dist/helpers/chain.mjs +29 -0
  101. package/dist/helpers/create-safe-context.d.mts +7 -0
  102. package/dist/helpers/create-safe-context.mjs +13 -0
  103. package/dist/helpers/index.d.mts +5 -8
  104. package/dist/helpers/index.mjs +5 -8
  105. package/dist/helpers/merge-props.d.mts +6 -0
  106. package/dist/helpers/merge-props.mjs +56 -0
  107. package/dist/hooks/click-away/index.mjs +1 -1
  108. package/dist/hooks/index.d.mts +2 -1
  109. package/dist/hooks/index.mjs +2 -1
  110. package/dist/hooks/writing-mode/index.d.mts +7 -0
  111. package/dist/hooks/writing-mode/index.mjs +22 -0
  112. package/dist/index.d.mts +8 -9
  113. package/dist/index.mjs +8 -9
  114. package/dist/internal/clamp.d.mts +4 -0
  115. package/dist/internal/clamp.mjs +15 -0
  116. package/dist/{helpers/number → internal}/to-precision.d.mts +1 -1
  117. package/dist/{helpers/number → internal}/to-precision.mjs +1 -1
  118. package/dist/styles/index.css +37 -0
  119. package/dist/styles/tokens.d.mts +12 -1
  120. package/dist/styles/tokens.mjs +25 -1
  121. package/docs/references/typography.md +29 -0
  122. package/package.json +2 -2
  123. package/dist/helpers/is-internal-route.d.mts +0 -4
  124. package/dist/helpers/is-internal-route.mjs +0 -12
  125. package/dist/helpers/number/between.d.mts +0 -4
  126. package/dist/helpers/number/between.mjs +0 -15
  127. package/dist/helpers/number/commalize.d.mts +0 -4
  128. package/dist/helpers/number/commalize.mjs +0 -20
  129. package/dist/helpers/number/index.d.mts +0 -5
  130. package/dist/helpers/number/index.mjs +0 -5
  131. package/dist/helpers/uuid-v4.d.mts +0 -4
  132. package/dist/helpers/uuid-v4.mjs +0 -28
@@ -15,7 +15,7 @@ type Props = {
15
15
  className: string;
16
16
  children: ReactNode;
17
17
  }) => ReactNode;
18
- } & Omit<HTMLProps<HTMLButtonElement>, 'size' | 'type'>;
18
+ } & Omit<HTMLProps<HTMLButtonElement>, 'size' | 'type' | 'className' | 'style'>;
19
19
  declare const Button: FC<Props>;
20
20
  //#endregion
21
21
  export { Button };
@@ -31,7 +31,7 @@ const Button = ({ ref, children, type = "button", size = "md", color = "primary"
31
31
  "border-secondary-border bg-bg-base text-secondary-fg hover:bg-bg-subtle active:bg-bg-mute": variant === "outlined" && color === "secondary",
32
32
  "border-border-base bg-bg-base text-fg-base hover:bg-bg-subtle active:bg-bg-mute": variant === "outlined" && color === "gray",
33
33
  "border-transparent bg-transparent text-fg-mute hover:bg-bg-subtle hover:text-fg-base active:bg-bg-mute active:text-fg-base": variant === "skeleton"
34
- }, "focus-visible:border-transparent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-border-info", size === "sm" && "px-3 py-1 text-sm", size === "md" && "px-4 py-2 text-md", size === "lg" && "px-6 py-3 text-lg", fullWidth && "w-full", (hasStartIcon || hasEndIcon) && "flex items-center gap-2", hasStartIcon && hasEndIcon ? "justify-between" : hasStartIcon && variant !== "skeleton" ? "justify-center" : hasEndIcon && "justify-between", isActive && "text-fg-info");
34
+ }, "focus-visible:border-transparent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-border-info", size === "sm" && "px-3 py-1 text-sm", size === "md" && "px-4 py-2 text-md", size === "lg" && "px-6 py-3 text-lg", fullWidth && "w-full vertical:w-auto", (hasStartIcon || hasEndIcon) && "flex items-center gap-2", hasStartIcon && hasEndIcon ? "justify-between" : hasStartIcon && variant !== "skeleton" ? "justify-center" : hasEndIcon && "justify-between", isActive && "text-fg-info");
35
35
  const composedChildren = /* @__PURE__ */ jsxs(Fragment$1, { children: [
36
36
  resolvedStartIcon,
37
37
  children,
@@ -17,7 +17,7 @@ type Props = {
17
17
  'aria-label': string;
18
18
  triggerProps: IconButtonTriggerProps;
19
19
  }) => ReactNode;
20
- } & Omit<HTMLProps<HTMLButtonElement>, 'size' | 'type'>;
20
+ } & Omit<HTMLProps<HTMLButtonElement>, 'size' | 'type' | 'className' | 'style'>;
21
21
  declare const IconButton: FC<Props>;
22
22
  //#endregion
23
23
  export { IconButton, IconButtonTriggerProps };
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../../../helpers/cn.mjs";
3
3
  import { Tooltip } from "../../overlays/tooltip/tooltip.mjs";
4
+ import { chain } from "../../../helpers/chain.mjs";
4
5
  import { mergeRefs } from "../../../helpers/merge-refs.mjs";
5
6
  import { useTransition } from "react";
6
7
  import { useFormStatus } from "react-dom";
@@ -66,23 +67,11 @@ const IconButton = ({ ref, size = "md", bg = "transparent", label, tooltipPlacem
66
67
  "aria-label": label,
67
68
  className,
68
69
  disabled: isDisabled,
69
- onBlur: (e) => {
70
- triggerProps.onBlur(e);
71
- onBlur?.(e);
72
- },
70
+ onBlur: chain(triggerProps.onBlur, onBlur),
73
71
  onClick: handleClick,
74
- onFocus: (e) => {
75
- triggerProps.onFocus(e);
76
- onFocus?.(e);
77
- },
78
- onMouseEnter: (e) => {
79
- triggerProps.onMouseEnter(e);
80
- onMouseEnter?.(e);
81
- },
82
- onMouseLeave: (e) => {
83
- triggerProps.onMouseLeave(e);
84
- onMouseLeave?.(e);
85
- },
72
+ onFocus: chain(triggerProps.onFocus, onFocus),
73
+ onMouseEnter: chain(triggerProps.onMouseEnter, onMouseEnter),
74
+ onMouseLeave: chain(triggerProps.onMouseLeave, onMouseLeave),
86
75
  ref: mergeRefs(ref, triggerProps.ref),
87
76
  type: "button",
88
77
  children
@@ -11,12 +11,12 @@ const AccordionButton = ({ children }) => {
11
11
  return /* @__PURE__ */ jsxs("button", {
12
12
  "aria-controls": `${id}-panel`,
13
13
  "aria-expanded": open,
14
- className: cn("flex w-full cursor-pointer items-center justify-between rounded-md p-4 text-fg-base transition-colors", "hover:bg-primary-bg-subtle hover:text-primary-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-info"),
14
+ className: cn("flex w-full cursor-pointer items-center justify-between rounded-md p-4 text-fg-base transition-colors vertical:h-full", "hover:bg-primary-bg-subtle hover:text-primary-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-info"),
15
15
  id: `${id}-button`,
16
16
  onClick: toggleOpen,
17
17
  type: "button",
18
18
  children: [children, /* @__PURE__ */ jsx("span", {
19
- className: cn("transition-transform duration-150", open && "rotate-180"),
19
+ className: cn("transition-transform duration-150", !open && "vertical:rotate-90", open && "rotate-180 vertical:-rotate-90"),
20
20
  children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "down" })
21
21
  })]
22
22
  });
@@ -7,7 +7,10 @@ const AccordionItem = ({ children, defaultOpen = false }) => {
7
7
  return /* @__PURE__ */ jsx(AccordionItemProvider, {
8
8
  defaultOpen,
9
9
  id: useId(),
10
- children: /* @__PURE__ */ jsx("div", { children })
10
+ children: /* @__PURE__ */ jsx("div", {
11
+ className: "vertical:h-full",
12
+ children
13
+ })
11
14
  });
12
15
  };
13
16
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  //#region src/components/data-display/accordion/accordion.tsx
3
3
  const Accordion = ({ children }) => /* @__PURE__ */ jsx("div", {
4
- className: "divide-border-mute divide-y",
4
+ className: "divide-border-mute vertical:flex vertical:h-full vertical:flex-col vertical:divide-y-0 vertical:[&>:not(:last-child)]:border-l vertical:[&>:not(:last-child)]:border-border-mute divide-y",
5
5
  children
6
6
  });
7
7
  //#endregion
@@ -2,9 +2,9 @@ import { FC, PropsWithChildren } from "react";
2
2
 
3
3
  //#region src/components/data-display/accordion/context.d.ts
4
4
  type ToggleOpen = () => void;
5
- declare const useOpen: () => boolean;
6
5
  declare const useToggleOpen: () => ToggleOpen;
7
6
  declare const useItemId: () => string;
7
+ declare const useOpen: () => boolean;
8
8
  declare const AccordionItemProvider: FC<PropsWithChildren<{
9
9
  defaultOpen?: boolean;
10
10
  id: string;
@@ -1,22 +1,13 @@
1
1
  "use client";
2
2
  import { useDisclosure } from "../../../hooks/disclosure/index.mjs";
3
+ import { createSafeContext } from "../../../helpers/create-safe-context.mjs";
3
4
  import { createContext, use } from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/components/data-display/accordion/context.tsx
6
7
  const OpenContext = createContext(false);
7
- const ToggleOpenContext = createContext(void 0);
8
- const ItemIdContext = createContext(void 0);
8
+ const [ToggleOpenContext, useToggleOpen] = createSafeContext("useToggleOpen must be used within AccordionProvider");
9
+ const [ItemIdContext, useItemId] = createSafeContext("useItemId must be used within AccordionProvider");
9
10
  const useOpen = () => use(OpenContext);
10
- const useToggleOpen = () => {
11
- const toggleOpen = use(ToggleOpenContext);
12
- if (!toggleOpen) throw new Error("useToggleOpen must be used within AccordionProvider");
13
- return toggleOpen;
14
- };
15
- const useItemId = () => {
16
- const id = use(ItemIdContext);
17
- if (id === void 0 || id === "") throw new Error("useItemId must be used within AccordionProvider");
18
- return id;
19
- };
20
11
  const AccordionItemProvider = ({ defaultOpen = false, id, children }) => {
21
12
  const { isOpen, toggle } = useDisclosure(defaultOpen);
22
13
  return /* @__PURE__ */ jsx(OpenContext, {
@@ -7,7 +7,7 @@ type Props = {
7
7
  name?: string;
8
8
  size?: 'sm' | 'md' | 'lg';
9
9
  src?: string;
10
- } & Omit<HTMLAttributes<HTMLSpanElement>, 'role' | 'aria-label'>;
10
+ } & Omit<HTMLAttributes<HTMLSpanElement>, 'role' | 'aria-label' | 'className' | 'style'>;
11
11
  declare const Avatar: FC<Props>;
12
12
  //#endregion
13
13
  export { Avatar };
@@ -8,7 +8,7 @@ const getInitials = (name) => {
8
8
  const initials = name.trim().split(/\s+/).slice(0, 2).map((part) => part.charAt(0).toUpperCase()).join("");
9
9
  return initials === "" ? "?" : initials;
10
10
  };
11
- const Avatar = ({ alt, fallback, name, size = "md", src, className, ...rest }) => {
11
+ const Avatar = ({ alt, fallback, name, size = "md", src, ...rest }) => {
12
12
  const [failedSrc, setFailedSrc] = useState(null);
13
13
  const showImage = Boolean(src) && failedSrc !== src;
14
14
  const label = alt ?? name ?? "Avatar";
@@ -16,7 +16,7 @@ const Avatar = ({ alt, fallback, name, size = "md", src, className, ...rest }) =
16
16
  return /* @__PURE__ */ jsx("span", {
17
17
  ...rest,
18
18
  "aria-label": label,
19
- className: cn("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border-base bg-bg-mute font-medium text-fg-base", size === "sm" && "size-8 text-xs", size === "md" && "size-10 text-sm", size === "lg" && "size-14 text-lg", className),
19
+ className: cn("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border-base bg-bg-mute font-medium text-fg-base", size === "sm" && "size-8 text-xs", size === "md" && "size-10 text-sm", size === "lg" && "size-14 text-lg"),
20
20
  role: "img",
21
21
  children: showImage ? /* @__PURE__ */ jsx("img", {
22
22
  alt: alt ?? "",
@@ -7,7 +7,7 @@ type Props = {
7
7
  interactive?: boolean;
8
8
  tone?: 'neutral' | 'info' | 'success' | 'warning' | 'error';
9
9
  variant?: 'solid' | 'outline';
10
- } & Omit<HTMLAttributes<HTMLElement>, 'children'>;
10
+ } & Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>;
11
11
  declare const Badge: FC<Props>;
12
12
  //#endregion
13
13
  export { Badge };
@@ -1,18 +1,18 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/data-display/badge/badge.tsx
4
- const Badge = ({ interactive = false, size = "md", text, tone = "neutral", variant = "solid", className, ...rest }) => {
4
+ const Badge = ({ interactive = false, size = "md", text, tone = "neutral", variant = "solid", ...rest }) => {
5
5
  const interactiveClassName = cn(interactive && "cursor-pointer focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-border-info", interactive && tone === "neutral" && variant === "solid" && "hover:bg-bg-emphasize active:bg-bg-base", interactive && tone === "neutral" && variant === "outline" && "hover:bg-bg-subtle active:bg-bg-mute", interactive && tone === "info" && variant === "solid" && "hover:bg-bg-info/80 active:bg-bg-info/60", interactive && tone === "info" && variant === "outline" && "hover:bg-bg-info active:bg-bg-info/80", interactive && tone === "success" && variant === "solid" && "hover:bg-bg-success/80 active:bg-bg-success/60", interactive && tone === "success" && variant === "outline" && "hover:bg-bg-success active:bg-bg-success/80", interactive && tone === "warning" && variant === "solid" && "hover:bg-bg-warning/80 active:bg-bg-warning/60", interactive && tone === "warning" && variant === "outline" && "hover:bg-bg-warning active:bg-bg-warning/80", interactive && tone === "error" && variant === "solid" && "hover:bg-bg-error/80 active:bg-bg-error/60", interactive && tone === "error" && variant === "outline" && "hover:bg-bg-error active:bg-bg-error/80");
6
6
  const badgeClassName = cn("inline-flex items-center rounded-full border font-medium transition-colors", size === "sm" && "px-2 py-0.5 text-xs", size === "md" && "px-2.5 py-1 text-xs", tone === "neutral" && variant === "solid" && "border-border-mute bg-bg-mute text-fg-base", tone === "neutral" && variant === "outline" && "border-border-base bg-bg-base text-fg-base", tone === "info" && variant === "solid" && "border-border-info bg-bg-info text-fg-info", tone === "info" && variant === "outline" && "border-border-info bg-bg-base text-fg-info", tone === "success" && variant === "solid" && "border-border-success bg-bg-success text-fg-success", tone === "success" && variant === "outline" && "border-border-success bg-bg-base text-fg-success", tone === "warning" && variant === "solid" && "border-border-warning bg-bg-warning text-fg-warning", tone === "warning" && variant === "outline" && "border-border-warning bg-bg-base text-fg-warning", tone === "error" && variant === "solid" && "border-border-error bg-bg-error text-fg-error", tone === "error" && variant === "outline" && "border-border-error bg-bg-base text-fg-error", interactiveClassName);
7
7
  if (interactive) return /* @__PURE__ */ jsx("button", {
8
8
  ...rest,
9
- className: cn(badgeClassName, className),
9
+ className: badgeClassName,
10
10
  type: "button",
11
11
  children: text
12
12
  });
13
13
  return /* @__PURE__ */ jsx("span", {
14
14
  ...rest,
15
- className: cn(badgeClassName, className),
15
+ className: badgeClassName,
16
16
  children: text
17
17
  });
18
18
  };
@@ -1,9 +1,9 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/data-display/card/card.tsx
4
- const Card = ({ children, width = "full", appearance = "shadow", className, ...rest }) => /* @__PURE__ */ jsx("div", {
4
+ const Card = ({ children, width = "full", appearance = "shadow", ...rest }) => /* @__PURE__ */ jsx("div", {
5
5
  ...rest,
6
- className: cn("rounded-xl", appearance === "shadow" && "shadow-sm", appearance === "bordered" && "border border-border-mute", width === "full" && "w-full", width === "fit" && "w-fit", "bg-bg-base", className),
6
+ className: cn("rounded-xl", appearance === "shadow" && "shadow-sm", appearance === "bordered" && "border border-border-mute", width === "full" && "w-full", width === "fit" && "w-fit", "bg-bg-base"),
7
7
  children
8
8
  });
9
9
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/data-display/card/interactive-card.tsx
4
- const InteractiveCard = ({ children, width = "full", appearance = "shadow", className, ...rest }) => /* @__PURE__ */ jsx("div", {
4
+ const InteractiveCard = ({ children, width = "full", appearance = "shadow", ...rest }) => /* @__PURE__ */ jsx("div", {
5
5
  ...rest,
6
- className: cn("rounded-xl transition-transform hover:scale-[1.02] active:scale-[0.98]", appearance === "shadow" && "shadow-sm", appearance === "bordered" && "border border-border-mute", width === "full" && "w-full", width === "fit" && "w-fit", "bg-bg-base", className),
6
+ className: cn("rounded-xl transition-transform hover:scale-[1.02] active:scale-[0.98]", appearance === "shadow" && "shadow-sm", appearance === "bordered" && "border border-border-mute", width === "full" && "w-full", width === "fit" && "w-fit", "bg-bg-base"),
7
7
  children
8
8
  });
9
9
  //#endregion
@@ -4,6 +4,6 @@ import { HTMLAttributes } from "react";
4
4
  type CardProps = {
5
5
  width?: 'full' | 'fit';
6
6
  appearance?: 'shadow' | 'bordered';
7
- } & HTMLAttributes<HTMLDivElement>;
7
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>;
8
8
  //#endregion
9
9
  export { CardProps };
@@ -3,7 +3,7 @@ import { FC, HTMLAttributes } from "react";
3
3
  //#region src/components/data-display/code/code.d.ts
4
4
  type Props = {
5
5
  children: string;
6
- } & Omit<HTMLAttributes<HTMLElement>, 'children'>;
6
+ } & Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style'>;
7
7
  declare const Code: FC<Props>;
8
8
  //#endregion
9
9
  export { Code };
@@ -1,13 +1,12 @@
1
- import { cn } from "../../../helpers/cn.mjs";
2
- import { findAllColors } from "../../../helpers/color/find-all-colors.mjs";
1
+ import { findAllColors } from "./find-all-colors.mjs";
3
2
  import { Fragment } from "react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
  //#region src/components/data-display/code/code.tsx
6
- const Code = ({ children, className, ...rest }) => {
5
+ const Code = ({ children, ...rest }) => {
7
6
  const colors = findAllColors(children);
8
7
  if (colors.length === 0) return /* @__PURE__ */ jsx("code", {
9
8
  ...rest,
10
- className: cn("bg-bg-mute m-0.5 rounded-md px-1.5 sm:py-0.5", className),
9
+ className: "bg-bg-mute m-0.5 rounded-md px-1.5 sm:py-0.5",
11
10
  children
12
11
  });
13
12
  const parts = [];
@@ -25,7 +24,7 @@ const Code = ({ children, className, ...rest }) => {
25
24
  if (lastIndex < children.length) parts.push(children.slice(lastIndex));
26
25
  return /* @__PURE__ */ jsx("code", {
27
26
  ...rest,
28
- className: cn("bg-bg-mute m-0.5 inline-flex items-center gap-1 rounded-md px-1.5 sm:py-0.5", className),
27
+ className: "bg-bg-mute vertical:inline vertical:gap-0 m-0.5 inline-flex items-center gap-1 rounded-md px-1.5 sm:py-0.5",
29
28
  children: parts
30
29
  });
31
30
  };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/color/find-all-colors.d.ts
1
+ //#region src/components/data-display/code/find-all-colors.d.ts
2
2
  type ColorMatch = {
3
3
  color: string;
4
4
  start: number;
@@ -1,4 +1,4 @@
1
- //#region src/helpers/color/find-all-colors.ts
1
+ //#region src/components/data-display/code/find-all-colors.ts
2
2
  const extractFunctionContent = (source, funcName) => {
3
3
  const funcPattern = new RegExp(`${funcName}\\s*\\(`, "gi");
4
4
  const matches = [];
@@ -4,7 +4,7 @@ import { FC, HTMLAttributes } from "react";
4
4
  type Props = {
5
5
  type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6
6
  lineClamp?: number;
7
- } & HTMLAttributes<HTMLHeadingElement>;
7
+ } & Omit<HTMLAttributes<HTMLHeadingElement>, 'className' | 'style'>;
8
8
  declare const Heading: FC<Props>;
9
9
  //#endregion
10
10
  export { Heading };
@@ -1,36 +1,36 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/data-display/heading/heading.tsx
4
- const Heading = ({ children, type, lineClamp, className, ...rest }) => {
4
+ const Heading = ({ children, type, lineClamp, ...rest }) => {
5
5
  const lineClampClass = { [`line-clamp-${lineClamp?.toString() ?? ""}`]: lineClamp };
6
6
  if (type === "h1") return /* @__PURE__ */ jsx("h1", {
7
7
  ...rest,
8
- className: cn("font-bold text-2xl md:text-3xl", lineClampClass, className),
8
+ className: cn("font-bold text-2xl md:text-3xl", lineClampClass),
9
9
  children
10
10
  });
11
11
  if (type === "h2") return /* @__PURE__ */ jsx("h2", {
12
12
  ...rest,
13
- className: cn("font-bold text-xl md:text-2xl", lineClampClass, className),
13
+ className: cn("font-bold text-xl md:text-2xl", lineClampClass),
14
14
  children
15
15
  });
16
16
  if (type === "h3") return /* @__PURE__ */ jsx("h3", {
17
17
  ...rest,
18
- className: cn("font-bold text-lg md:text-xl", lineClampClass, className),
18
+ className: cn("font-bold text-lg md:text-xl", lineClampClass),
19
19
  children
20
20
  });
21
21
  if (type === "h4") return /* @__PURE__ */ jsx("h4", {
22
22
  ...rest,
23
- className: cn("font-bold text-md md:text-lg", lineClampClass, className),
23
+ className: cn("font-bold text-md md:text-lg", lineClampClass),
24
24
  children
25
25
  });
26
26
  if (type === "h5") return /* @__PURE__ */ jsx("h5", {
27
27
  ...rest,
28
- className: cn("font-bold text-sm md:text-md", lineClampClass, className),
28
+ className: cn("font-bold text-sm md:text-md", lineClampClass),
29
29
  children
30
30
  });
31
31
  return /* @__PURE__ */ jsx("h6", {
32
32
  ...rest,
33
- className: cn("font-bold text-xs md:text-sm", lineClampClass, className),
33
+ className: cn("font-bold text-xs md:text-sm", lineClampClass),
34
34
  children
35
35
  });
36
36
  };
@@ -1,43 +1,38 @@
1
1
  import { FC, PropsWithChildren, ReactNode } from "react";
2
2
 
3
3
  //#region src/components/data-display/table/table.d.ts
4
- type RootProps = PropsWithChildren<{
5
- className?: string;
6
- containerClassName?: string;
7
- }>;
8
4
  type RowProps = PropsWithChildren<{
9
- className?: string;
10
5
  interactive?: boolean;
11
6
  }>;
12
7
  type CellAlign = 'left' | 'center' | 'right';
13
8
  type HeaderCellProps = PropsWithChildren<{
14
9
  align?: CellAlign;
15
- className?: string;
16
10
  }>;
17
11
  type CellProps = PropsWithChildren<{
18
12
  align?: CellAlign;
19
- className?: string;
20
13
  colSpan?: number;
21
14
  tone?: 'default' | 'muted';
22
15
  }>;
23
- type SectionProps = PropsWithChildren<{
24
- className?: string;
25
- }>;
26
- type CaptionProps = PropsWithChildren<{
27
- className?: string;
28
- }>;
29
16
  type EmptyStateProps = {
30
17
  colSpan: number;
31
18
  children: ReactNode;
32
19
  };
33
20
  declare const Table: {
34
- readonly Root: FC<RootProps>;
35
- readonly Head: FC<SectionProps>;
36
- readonly Body: FC<SectionProps>;
21
+ readonly Root: FC<{
22
+ children?: ReactNode | undefined;
23
+ }>;
24
+ readonly Head: FC<{
25
+ children?: ReactNode | undefined;
26
+ }>;
27
+ readonly Body: FC<{
28
+ children?: ReactNode | undefined;
29
+ }>;
37
30
  readonly Row: FC<RowProps>;
38
31
  readonly HeaderCell: FC<HeaderCellProps>;
39
32
  readonly Cell: FC<CellProps>;
40
- readonly Caption: FC<CaptionProps>;
33
+ readonly Caption: FC<{
34
+ children?: ReactNode | undefined;
35
+ }>;
41
36
  readonly EmptyState: FC<EmptyStateProps>;
42
37
  };
43
38
  //#endregion
@@ -1,45 +1,47 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/data-display/table/table.tsx
4
- const Root = ({ children, className, containerClassName }) => /* @__PURE__ */ jsx("div", {
5
- className: cn("w-full overflow-x-auto rounded-lg border border-border-mute bg-bg-base", containerClassName),
4
+ const Root = ({ children }) => /* @__PURE__ */ jsx("div", {
5
+ className: "border-border-mute bg-bg-base vertical:writing-sideways-rl vertical:h-fit vertical:w-fit w-full overflow-x-auto rounded-lg border",
6
6
  children: /* @__PURE__ */ jsx("table", {
7
- className: cn("min-w-full border-collapse text-left text-sm", className),
7
+ className: "min-w-full border-collapse text-left text-sm",
8
8
  children
9
9
  })
10
10
  });
11
- const Head = ({ children, className }) => /* @__PURE__ */ jsx("thead", {
12
- className: cn("bg-bg-subtle", className),
11
+ const Head = ({ children }) => /* @__PURE__ */ jsx("thead", {
12
+ className: "bg-bg-subtle",
13
13
  children
14
14
  });
15
- const Body = ({ children, className }) => /* @__PURE__ */ jsx("tbody", {
16
- className: cn("[&_tr:last-child]:border-b-0", className),
15
+ const Body = ({ children }) => /* @__PURE__ */ jsx("tbody", {
16
+ className: "vertical:[&_tr:last-child]:border-l-0 [&_tr:last-child]:border-b-0",
17
17
  children
18
18
  });
19
- const Row = ({ children, className, interactive = false }) => /* @__PURE__ */ jsx("tr", {
20
- className: cn("border-border-mute border-b transition-colors", interactive && "hover:bg-bg-mute", className),
19
+ const Row = ({ children, interactive = false }) => /* @__PURE__ */ jsx("tr", {
20
+ className: cn("border-border-mute border-b transition-colors vertical:border-b-0 vertical:border-l", interactive && "hover:bg-bg-mute"),
21
21
  children
22
22
  });
23
- const HeaderCell = ({ align = "left", children, className }) => /* @__PURE__ */ jsx("th", {
24
- className: cn("px-4 py-3 font-medium text-fg-base", align === "center" && "text-center", align === "right" && "text-right", className),
23
+ const HeaderCell = ({ align = "left", children }) => /* @__PURE__ */ jsx("th", {
24
+ className: cn("px-4 py-3 font-medium text-fg-base", align === "center" && "text-center", align === "right" && "text-right"),
25
25
  scope: "col",
26
26
  children
27
27
  });
28
- const Cell = ({ align = "left", children, className, colSpan, tone = "default" }) => /* @__PURE__ */ jsx("td", {
29
- className: cn("px-4 py-3 align-middle", tone === "muted" ? "text-fg-mute" : "text-fg-base", align === "center" && "text-center", align === "right" && "text-right", className),
28
+ const Cell = ({ align = "left", children, colSpan, tone = "default" }) => /* @__PURE__ */ jsx("td", {
29
+ className: cn("px-4 py-3 align-middle", tone === "muted" ? "text-fg-mute" : "text-fg-base", align === "center" && "text-center", align === "right" && "text-right"),
30
30
  colSpan,
31
31
  children
32
32
  });
33
- const Caption = ({ children, className }) => /* @__PURE__ */ jsx("caption", {
34
- className: cn("caption-bottom px-4 py-3 text-fg-mute text-sm", className),
33
+ const Caption = ({ children }) => /* @__PURE__ */ jsx("caption", {
34
+ className: "text-fg-mute caption-bottom px-4 py-3 text-sm",
35
35
  children
36
36
  });
37
- const EmptyState = ({ children, colSpan }) => /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Cell, {
38
- align: "center",
39
- className: "text-fg-mute py-10",
40
- colSpan,
41
- children
42
- }) });
37
+ const EmptyState = ({ children, colSpan }) => /* @__PURE__ */ jsx("tr", {
38
+ className: "border-border-mute border-b transition-colors",
39
+ children: /* @__PURE__ */ jsx("td", {
40
+ className: "text-fg-mute px-4 py-10 text-center align-middle",
41
+ colSpan,
42
+ children
43
+ })
44
+ });
43
45
  const Table = {
44
46
  Root,
45
47
  Head,
@@ -5,7 +5,7 @@ import { FC, HTMLAttributes } from "react";
5
5
  type Props = {
6
6
  status: Status;
7
7
  message: string | string[];
8
- } & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role'>;
8
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role' | 'className' | 'style'>;
9
9
  declare const Alert: FC<Props>;
10
10
  //#endregion
11
11
  export { Alert };
@@ -8,9 +8,9 @@ const STATUS_LABEL = {
8
8
  warning: "警告",
9
9
  error: "エラー"
10
10
  };
11
- const Alert = ({ status, message, className, ...rest }) => /* @__PURE__ */ jsxs("div", {
11
+ const Alert = ({ status, message, ...rest }) => /* @__PURE__ */ jsxs("div", {
12
12
  ...rest,
13
- className: cn("flex items-center gap-3 rounded-lg p-4", status === "success" && "bg-bg-success", status === "info" && "bg-bg-info", status === "warning" && "bg-bg-warning", status === "error" && "bg-bg-error", className),
13
+ className: cn("flex items-center gap-3 rounded-lg p-4", status === "success" && "bg-bg-success", status === "info" && "bg-bg-info", status === "warning" && "bg-bg-warning", status === "error" && "bg-bg-error"),
14
14
  role: status === "error" || status === "warning" ? "alert" : "status",
15
15
  children: [/* @__PURE__ */ jsxs("span", {
16
16
  className: cn(status === "success" && "text-fg-success", status === "info" && "text-fg-info", status === "warning" && "text-fg-warning", status === "error" && "text-fg-error"),
@@ -6,7 +6,7 @@ type Props = {
6
6
  maxProgress: number;
7
7
  minProgress?: number;
8
8
  label?: string;
9
- } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
9
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style'>;
10
10
  declare const Progress: FC<Props>;
11
11
  //#endregion
12
12
  export { Progress };
@@ -1,18 +1,17 @@
1
- import { cn } from "../../../helpers/cn.mjs";
2
- import { toPrecision } from "../../../helpers/number/to-precision.mjs";
1
+ import { toPrecision } from "../../../internal/to-precision.mjs";
3
2
  import { jsx } from "react/jsx-runtime";
4
3
  //#region src/components/feedback/progress/progress.tsx
5
- const Progress = ({ progress, maxProgress, minProgress = 0, label, className, ...rest }) => /* @__PURE__ */ jsx("div", {
4
+ const Progress = ({ progress, maxProgress, minProgress = 0, label, ...rest }) => /* @__PURE__ */ jsx("div", {
6
5
  ...rest,
7
- className: cn("bg-bg-emphasize w-full rounded-full", className),
6
+ className: "bg-bg-emphasize vertical:inline-48 rounded-full block-4 inline-full",
7
+ style: { "--progress-fill": `${(progress / maxProgress * 100).toString()}%` },
8
8
  children: /* @__PURE__ */ jsx("div", {
9
9
  "aria-label": label ?? `${toPrecision(progress / maxProgress).toString()}%`,
10
10
  "aria-valuemax": maxProgress,
11
11
  "aria-valuemin": minProgress,
12
12
  "aria-valuenow": progress,
13
- className: "bg-primary-bg h-4 rounded-full transition-all",
14
- role: "progressbar",
15
- style: { width: `${(progress / maxProgress * 100).toString()}%` }
13
+ className: "bg-primary-bg rounded-full transition-all block-full inline-(--progress-fill)",
14
+ role: "progressbar"
16
15
  })
17
16
  });
18
17
  //#endregion
@@ -5,7 +5,7 @@ type Props = {
5
5
  animate?: boolean;
6
6
  shape?: 'rect' | 'circle';
7
7
  size?: 'sm' | 'md' | 'lg';
8
- } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
8
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style'>;
9
9
  declare const Skeleton: FC<Props>;
10
10
  //#endregion
11
11
  export { Skeleton };
@@ -1,10 +1,10 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/feedback/skeleton/skeleton.tsx
4
- const Skeleton = ({ animate = true, shape = "rect", size = "md", className, ...rest }) => /* @__PURE__ */ jsx("div", {
4
+ const Skeleton = ({ animate = true, shape = "rect", size = "md", ...rest }) => /* @__PURE__ */ jsx("div", {
5
5
  ...rest,
6
6
  "aria-hidden": true,
7
- className: cn("bg-bg-mute", animate && "animate-pulse", shape === "rect" && "rounded-lg", shape === "rect" && size === "sm" && "h-3 w-24", shape === "rect" && size === "md" && "h-4 w-40", shape === "rect" && size === "lg" && "h-5 w-56", shape === "circle" && "rounded-full", shape === "circle" && size === "sm" && "size-8", shape === "circle" && size === "md" && "size-12", shape === "circle" && size === "lg" && "size-16", className)
7
+ className: cn("bg-bg-mute", animate && "animate-pulse", shape === "rect" && "rounded-lg", shape === "rect" && size === "sm" && "h-3 w-24", shape === "rect" && size === "md" && "h-4 w-40", shape === "rect" && size === "lg" && "h-5 w-56", shape === "circle" && "rounded-full", shape === "circle" && size === "sm" && "size-8", shape === "circle" && size === "md" && "size-12", shape === "circle" && size === "lg" && "size-16")
8
8
  });
9
9
  //#endregion
10
10
  export { Skeleton };
@@ -4,7 +4,7 @@ import { FC, OutputHTMLAttributes } from "react";
4
4
  type Props = {
5
5
  label?: string;
6
6
  size?: 'sm' | 'md' | 'lg';
7
- } & Omit<OutputHTMLAttributes<HTMLOutputElement>, 'children' | 'aria-label'>;
7
+ } & Omit<OutputHTMLAttributes<HTMLOutputElement>, 'children' | 'aria-label' | 'className' | 'style'>;
8
8
  declare const Spinner: FC<Props>;
9
9
  //#endregion
10
10
  export { Spinner };
@@ -1,11 +1,11 @@
1
1
  import { cn } from "../../../helpers/cn.mjs";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  //#region src/components/feedback/spinner/spinner.tsx
4
- const Spinner = ({ label = "Loading", size = "md", className, ...rest }) => /* @__PURE__ */ jsxs("output", {
4
+ const Spinner = ({ label = "Loading", size = "md", ...rest }) => /* @__PURE__ */ jsxs("output", {
5
5
  ...rest,
6
6
  "aria-label": label,
7
7
  "aria-live": "polite",
8
- className: cn("inline-flex items-center justify-center", className),
8
+ className: "inline-flex items-center justify-center",
9
9
  children: [/* @__PURE__ */ jsx("span", {
10
10
  "aria-hidden": true,
11
11
  className: cn("inline-block animate-spin rounded-full border-4 border-border-base border-t-primary-border", size === "sm" && "size-4", size === "md" && "size-6", size === "lg" && "size-8")
@@ -8,11 +8,11 @@ type ToastType = {
8
8
  status: Status;
9
9
  message: string;
10
10
  };
11
- declare const SetToastContext: _$react.Context<Dispatch<SetStateAction<ToastType[]>> | undefined>;
11
+ declare const SetToastContext: _$react.Context<Dispatch<SetStateAction<ToastType[]>> | null>, useSetToast: () => Dispatch<SetStateAction<ToastType[]>>;
12
12
  declare const useToast: () => {
13
13
  onOpen: (status: Status, message: string) => void;
14
14
  onClose: (id: string) => void;
15
15
  onCloseAll: () => void;
16
16
  };
17
17
  //#endregion
18
- export { SetToastContext, ToastType, useToast };
18
+ export { SetToastContext, ToastType, useSetToast, useToast };