ingred-ui 28.0.0 → 28.2.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 (36) hide show
  1. package/dist/components/Button/Button.d.ts +7 -0
  2. package/dist/components/Button/Button.stories.d.ts +7 -0
  3. package/dist/components/Button/styled.d.ts +4 -0
  4. package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
  5. package/dist/components/Checkbox/checkboxMarkDataUrls.d.ts +26 -0
  6. package/dist/components/CheckboxCard/CheckboxCard.d.ts +8 -0
  7. package/dist/components/CheckboxCard/CheckboxCard.stories.d.ts +46 -0
  8. package/dist/components/CheckboxCard/__tests__/CheckboxCard.test.d.ts +1 -0
  9. package/dist/components/CheckboxCard/index.d.ts +2 -0
  10. package/dist/components/CheckboxCard/types.d.ts +9 -0
  11. package/dist/components/IconText/IconText.d.ts +25 -0
  12. package/dist/components/IconText/IconText.stories.d.ts +10 -0
  13. package/dist/components/IconText/__tests__/IconText.test.d.ts +1 -0
  14. package/dist/components/IconText/index.d.ts +3 -0
  15. package/dist/components/IconText/styled.d.ts +11 -0
  16. package/dist/components/IconText/types.d.ts +25 -0
  17. package/dist/components/RadioCard/RadioCard.d.ts +8 -0
  18. package/dist/components/RadioCard/RadioCard.stories.d.ts +41 -0
  19. package/dist/components/RadioCard/__tests__/RadioCard.test.d.ts +1 -0
  20. package/dist/components/RadioCard/index.d.ts +2 -0
  21. package/dist/components/RadioCard/types.d.ts +10 -0
  22. package/dist/components/SelectableCard/SelectableCardLayout.d.ts +4 -0
  23. package/dist/components/SelectableCard/__tests__/utils.test.d.ts +1 -0
  24. package/dist/components/SelectableCard/styled.d.ts +24 -0
  25. package/dist/components/SelectableCard/types.d.ts +11 -0
  26. package/dist/components/SelectableCard/useSelectableCardHeaderClick.d.ts +10 -0
  27. package/dist/components/SelectableCard/utils.d.ts +2 -0
  28. package/dist/components/Tag/Tag.stories.d.ts +13 -12
  29. package/dist/components/Tag/types.d.ts +10 -3
  30. package/dist/components/index.d.ts +5 -0
  31. package/dist/index.es.js +839 -721
  32. package/dist/index.es.js.map +1 -1
  33. package/dist/index.js +841 -723
  34. package/dist/index.js.map +1 -1
  35. package/dist/styles/interaction.d.ts +3 -1
  36. package/package.json +1 -1
@@ -44,6 +44,13 @@ type baseProps = {
44
44
  icon?: React.ReactNode;
45
45
  size?: ButtonSize;
46
46
  onClick?: (event: React.MouseEvent<Element, MouseEvent>) => void;
47
+ /**
48
+ * `true` のときボーダーとシャドウ(通常・ホバー・アクティブ)を付けず、視覚的に抑えた見た目にする。
49
+ * 補足的なヒントやヘルプのトリガーなど、目立たせすぎない操作向け。**アイコン単体**(`icon` のみ)での利用を想定。
50
+ * `color` は **`secondaryLight` / `secondaryDark` を主に使う**想定(それ以外は用途に応じて)。
51
+ * `:active` は押し込み(位置ずれ)やシャドウの変化はせず、背景のみホバーより一段暗い色に変える。
52
+ */
53
+ isQuiet?: boolean;
47
54
  /**
48
55
  * ローディング状態を表示するかどうか。文字列を指定した場合はそれがローディングテキストとして使用されます。
49
56
  * - `true`: デフォルトの"Loading..."テキストを使用
@@ -7,6 +7,12 @@ declare const _default: {
7
7
  args: {
8
8
  onClick: any;
9
9
  };
10
+ argTypes: {
11
+ isQuiet: {
12
+ control: string;
13
+ description: string;
14
+ };
15
+ };
10
16
  parameters: {
11
17
  docs: {
12
18
  source: {
@@ -23,6 +29,7 @@ export declare const Danger: StoryObj<ButtonProps>;
23
29
  export declare const Clear: StoryObj<ButtonProps>;
24
30
  export declare const SecondaryDark: StoryObj<ButtonProps>;
25
31
  export declare const PrimarySubtle: StoryObj<ButtonProps>;
32
+ export declare const IsQuiet: StoryObj<ButtonProps>;
26
33
  export declare const Small: StoryObj<ButtonProps>;
27
34
  export declare const Medium: StoryObj<ButtonProps>;
28
35
  export declare const Large: StoryObj<ButtonProps>;
@@ -8,6 +8,8 @@ export type ContainerProps = ButtonColorStyle & {
8
8
  height: string;
9
9
  href?: string;
10
10
  disabled?: boolean;
11
+ /** ボーダー・シャドウなしの抑えたスタイル(disabled 時の見た目調整にも使用) */
12
+ $isQuiet?: boolean;
11
13
  };
12
14
  export declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
13
15
  $textColor?: string | undefined;
@@ -21,6 +23,8 @@ export declare const ButtonContainer: import("styled-components").StyledComponen
21
23
  height: string;
22
24
  href?: string | undefined;
23
25
  disabled?: boolean | undefined;
26
+ /** ボーダー・シャドウなしの抑えたスタイル(disabled 時の見た目調整にも使用) */
27
+ $isQuiet?: boolean | undefined;
24
28
  } & {
25
29
  size: ButtonSize;
26
30
  }, never>;
@@ -53,7 +53,7 @@ declare const _default: {
53
53
  results?: number | undefined;
54
54
  security?: string | undefined;
55
55
  unselectable?: "on" | "off" | undefined;
56
- inputMode?: "text" | "search" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
56
+ inputMode?: "text" | "none" | "search" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
57
57
  is?: string | undefined;
58
58
  'aria-activedescendant'?: string | undefined;
59
59
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
@@ -98,7 +98,7 @@ declare const _default: {
98
98
  'aria-rowspan'?: number | undefined;
99
99
  'aria-selected'?: (boolean | "true" | "false") | undefined;
100
100
  'aria-setsize'?: number | undefined;
101
- 'aria-sort'?: "other" | "none" | "ascending" | "descending" | undefined;
101
+ 'aria-sort'?: "none" | "other" | "ascending" | "descending" | undefined;
102
102
  'aria-valuemax'?: number | undefined;
103
103
  'aria-valuemin'?: number | undefined;
104
104
  'aria-valuenow'?: number | undefined;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Checkbox ::before 用 background-image の data URL(SVG base64)。
3
+ * Checkbox / CheckboxSize には依存しない(循環参照回避)。
4
+ */
5
+ export declare const CHECKBOX_MARK_DATA_URLS: {
6
+ readonly enabled: {
7
+ readonly minus: {
8
+ readonly small: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhla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jQwODkxIDQuNTAyNTIgOC4yOTE3NkwwLjkzMzA4MyA0LjcyMzJDMC44MTU5MjYgNC42MDUxNiAwLjgxNTkyNiA0LjQxNTIxIDAuOTMzMDgzIDQuMjk4MDVMMi4wNjU5IDMuMTY1MjNDMi4xODMwNiAzLjA0ODA3IDIuMzczMDEgMy4wNDgwNyAyLjQ5MDE3IDMuMTY1MjNMNi4wNTk2OCA2LjczNDc0QzYuMTc2ODQgNi44NTE5IDYuMTc2ODQgNy4wNDE4NSA2LjA1OTY4IDcuMTU5MDFMNC45MjY3OSA4LjI5MTc2WiIgZmlsbD0id2hpdGUiLz4gPC9zdmc+')";
14
+ };
15
+ };
16
+ readonly disabled: {
17
+ readonly minus: {
18
+ readonly small: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMyIgdmlld0JveD0iMCAwIDEwIDMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxyZWN0IHg9IjAuNDU4OTg0IiB5PSIwLjUiIHdpZHRoPSI5LjA4MjUyIiBoZWlnaHQ9IjIuMDAwMDIiIHJ4PSIwLjMiIGZpbGw9IiNCM0JBQzEiLz4gPC9zdmc+')";
19
+ readonly medium: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMyIgdmlld0JveD0iMCAwIDEwIDMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxyZWN0IHk9IjAuMzk4OTI2IiB3aWR0aD0iMTAiIGhlaWdodD0iMi4yMDIwNSIgZmlsbD0iI0IzQkFDMSIvPiA8L3N2Zz4=')";
20
+ };
21
+ readonly check: {
22
+ readonly small: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwO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jI1MjU1IDcuMDQxNzggMy4yNTI1NSA2Ljg1MTgzIDMuMzY5NyA2LjczNDY3TDEwLjAxNjUgMC4wODc4NjgxQzEwLjEzMzcgLTAuMDI5Mjg5MiAxMC4zMjM2IC0wLjAyOTI4OTQgMTAuNDQwOCAwLjA4Nzg2NzlMMTEuNTczNiAxLjIyMDY5QzExLjY5MDcgMS4zMzc4NSAxMS42OTA3IDEuNTI3OCAxMS41NzM2IDEuNjQ0OTVMNC45MjY3OSA4LjI5MTc2QzQuODA5NjMgOC40MDg5MSA0LjYxOTY4IDguNDA4OTEgNC41MDI1MiA4LjI5MTc2TDMuMzY5NyA3LjE1ODk0WiIgZmlsbD0iI0IzQkFDMSIvPiA8cGF0aCBkPSJNNC45MjY3OSA4LjI5MTc2QzQuODA5NjMgOC40MDg5MSA0LjYxOTY4IDguNDA4OTEgNC41MDI1MiA4LjI5MTc2TDAuOTMzMDgzIDQuNzIyMzJDMC44MTU5MjYgNC42MDUxNiAwLjgxNTkyNiA0LjQxNTIxIDAuOTMzMDgzIDQuMjk4MDVMMi4wNjU5IDMuMTY1MjNDMi4xODMwNiAzLjA0ODA3IDIuMzczMDEgMy4wNDgwNyAyLjQ5MDE3IDMuMTY1MjNMNi4wNTk2OCA2LjczNDc0QzYuMTc2ODQgNi44NTE5IDYuMTc2ODQgNy4wNDE4NSA2LjA1OTY4IDcuMTU5MDFMNC45MjY3OSA4LjI5MTc2WiIgZmlsbD0iI0IzQkFDMSIvPiA8L3N2Zz4=')";
24
+ };
25
+ };
26
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ declare const CheckboxCard: React.ForwardRefExoticComponent<Omit<import("../Checkbox").CheckBoxProps, "slot" | "children"> & {
3
+ title: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ slotContent?: React.ReactNode;
6
+ slotExpansion?: import("..").SlotExpansion | undefined;
7
+ } & React.RefAttributes<HTMLDivElement>>;
8
+ export default CheckboxCard;
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react-vite";
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Omit<import("..").CheckBoxProps, "slot" | "children"> & {
6
+ title: React.ReactNode;
7
+ description?: React.ReactNode;
8
+ slotContent?: React.ReactNode;
9
+ slotExpansion?: import("..").SlotExpansion | undefined;
10
+ } & React.RefAttributes<HTMLDivElement>>;
11
+ parameters: {
12
+ docs: {
13
+ description: {
14
+ component: string;
15
+ };
16
+ };
17
+ };
18
+ argTypes: {
19
+ disabled: {
20
+ control: {
21
+ type: string;
22
+ };
23
+ };
24
+ checked: {
25
+ control: {
26
+ type: string;
27
+ };
28
+ };
29
+ indeterminate: {
30
+ control: {
31
+ type: string;
32
+ };
33
+ };
34
+ slotExpansion: {
35
+ control: {
36
+ type: string;
37
+ };
38
+ options: string[];
39
+ };
40
+ };
41
+ };
42
+ export default _default;
43
+ /** 上からシンプル→複雑(各ブロック独立した state) */
44
+ export declare const Showcase: StoryObj;
45
+ /** 未チェックのときだけスロット内容を disabled にする例(slot は always で常時表示) */
46
+ export declare const SlotInputsDependOnChecked: StoryObj;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,2 @@
1
+ export { default } from "./CheckboxCard";
2
+ export type { CheckboxCardProps } from "./types";
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CheckBoxProps } from "../Checkbox";
3
+ import type { SlotExpansion } from "../SelectableCard/types";
4
+ export type CheckboxCardProps = Omit<CheckBoxProps, "children" | "slot"> & {
5
+ title: ReactNode;
6
+ description?: ReactNode;
7
+ slotContent?: ReactNode;
8
+ slotExpansion?: SlotExpansion;
9
+ };
@@ -0,0 +1,25 @@
1
+ import { type AnchorHTMLAttributes, type ReactElement, type ReactNode } from "react";
2
+ import { type IconTextSize, type IconTextPos } from "./types";
3
+ export type IconTextProps = {
4
+ /** 単体アイコンのとき(`prependIcon`/`appendIcon` 未指定時)。 */
5
+ icon?: ReactElement;
6
+ size?: IconTextSize;
7
+ /** 単体 `icon` の配置。両端アイコン指定時は無視される。 */
8
+ pos?: IconTextPos;
9
+ /** テキスト左側のアイコン。`appendIcon` と同時指定可。その場合 `icon` / `pos` は無視。 */
10
+ prependIcon?: ReactElement;
11
+ /** テキスト右側のアイコン。同上。 */
12
+ appendIcon?: ReactElement;
13
+ /**
14
+ * テキストとアイコンの共通デフォルト色(CSS カラー)。
15
+ * 非リンク時: 省略時は黒。`iconColor` / `textColor` で個別上書き可。
16
+ * リンク時: 共通色には使わず(プライマリが既定)。個別指定は `iconColor` / `textColor`。
17
+ */
18
+ color?: string;
19
+ /** アイコン色のみ指定。省略時は `color`(非リンク)またはプライマリ(リンク)にフォールバック */
20
+ iconColor?: string;
21
+ /** テキスト色のみ指定。省略時は `color`(非リンク)またはプライマリ(リンク)にフォールバック */
22
+ textColor?: string;
23
+ children: ReactNode;
24
+ } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color">;
25
+ export declare const IconText: ({ icon, size, pos, prependIcon, appendIcon, color, iconColor, textColor, children, ...rest }: IconTextProps) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { StoryObj } from "@storybook/react-vite";
3
+ declare const meta: Meta<({ icon, size, pos, prependIcon, appendIcon, color, iconColor, textColor, children, ...rest }: import("./IconText").IconTextProps) => JSX.Element>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Sizes: Story;
8
+ export declare const Positions: Story;
9
+ export declare const DualIcons: Story;
10
+ export declare const Colors: Story;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,3 @@
1
+ export { IconText } from "./IconText";
2
+ export type { IconTextProps } from "./IconText";
3
+ export type { IconTextSize, IconTextPos } from "./types";
@@ -0,0 +1,11 @@
1
+ import { IconTextSize } from "./types";
2
+ type StyledIconTextProps = {
3
+ $size: IconTextSize;
4
+ $isLink: boolean;
5
+ };
6
+ /** 先に定義し、Container の hover で参照して下線色をテキストの color と揃える */
7
+ export declare const Text: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
8
+ $color: string;
9
+ }, never>;
10
+ export declare const Container: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, StyledIconTextProps, never>;
11
+ export {};
@@ -0,0 +1,25 @@
1
+ export type IconTextSize = "xs" | "small" | "medium" | "large";
2
+ export type IconTextPos = "prepend" | "append";
3
+ /** Figma Icon text と対応(xs〜large) */
4
+ export declare const ICON_TEXT_SIZES: {
5
+ readonly xs: {
6
+ readonly iconSize: 14;
7
+ readonly fontSize: 12;
8
+ readonly gap: "2px";
9
+ };
10
+ readonly small: {
11
+ readonly iconSize: 16;
12
+ readonly fontSize: 13;
13
+ readonly gap: "4px";
14
+ };
15
+ readonly medium: {
16
+ readonly iconSize: 18;
17
+ readonly fontSize: 14;
18
+ readonly gap: "6px";
19
+ };
20
+ readonly large: {
21
+ readonly iconSize: 20;
22
+ readonly fontSize: 16;
23
+ readonly gap: "6px";
24
+ };
25
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ declare const RadioCard: React.ForwardRefExoticComponent<Omit<import("../RadioButton").RadioButtonProps, "slot" | "children"> & {
3
+ title: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ slotContent?: React.ReactNode;
6
+ slotExpansion?: import("./types").SlotExpansion | undefined;
7
+ } & React.RefAttributes<HTMLDivElement>>;
8
+ export default RadioCard;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react-vite";
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Omit<import("..").RadioButtonProps, "slot" | "children"> & {
6
+ title: React.ReactNode;
7
+ description?: React.ReactNode;
8
+ slotContent?: React.ReactNode;
9
+ slotExpansion?: import("..").SlotExpansion | undefined;
10
+ } & React.RefAttributes<HTMLDivElement>>;
11
+ parameters: {
12
+ docs: {
13
+ description: {
14
+ component: string;
15
+ };
16
+ };
17
+ };
18
+ argTypes: {
19
+ disabled: {
20
+ control: {
21
+ type: string;
22
+ };
23
+ };
24
+ checked: {
25
+ control: {
26
+ type: string;
27
+ };
28
+ };
29
+ slotExpansion: {
30
+ control: {
31
+ type: string;
32
+ };
33
+ options: string[];
34
+ };
35
+ };
36
+ };
37
+ export default _default;
38
+ /** 上からシンプル→複雑(各ブロック独立した state) */
39
+ export declare const Showcase: StoryObj;
40
+ /** 未選択のときだけスロット内容を disabled にする例(slot は always で常時表示) */
41
+ export declare const SlotInputsDependOnChecked: StoryObj;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,2 @@
1
+ export { default } from "./RadioCard";
2
+ export type { RadioCardProps, SlotExpansion } from "./types";
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from "react";
2
+ import type { RadioButtonProps } from "../RadioButton";
3
+ import type { SlotExpansion } from "../SelectableCard/types";
4
+ export type { SlotExpansion };
5
+ export type RadioCardProps = Omit<RadioButtonProps, "children" | "slot"> & {
6
+ title: ReactNode;
7
+ description?: ReactNode;
8
+ slotContent?: ReactNode;
9
+ slotExpansion?: SlotExpansion;
10
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { SelectableCardLayoutProps } from "./types";
3
+ declare const SelectableCardLayout: React.ForwardRefExoticComponent<SelectableCardLayoutProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default SelectableCardLayout;
@@ -0,0 +1,24 @@
1
+ export declare const Root: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ $checked: boolean;
3
+ $disabled: boolean;
4
+ }, never>;
5
+ export declare const HeaderRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
6
+ $checked: boolean;
7
+ $disabled: boolean;
8
+ $clickable?: boolean | undefined;
9
+ }, never>;
10
+ /** grid 0fr/1fr でスロット開閉をアニメーション */
11
+ export declare const SlotExpandWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
12
+ $open: boolean;
13
+ }, never>;
14
+ export declare const SlotOverflow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
15
+ export declare const Slot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
16
+ $checked: boolean;
17
+ $disabled: boolean;
18
+ }, never>;
19
+ /** For click-boundary checks only; does not generate a box (no extra height vs bare span). */
20
+ export declare const ControlWrap: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
21
+ export declare const HeaderControlRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
22
+ export declare const CardDescription: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
23
+ $disabled?: boolean | undefined;
24
+ }, never>;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export type SlotExpansion = "whenChecked" | "always";
3
+ export type SelectableCardLayoutProps = {
4
+ checked: boolean;
5
+ disabled?: boolean;
6
+ header: React.ReactNode;
7
+ /** ヘッダー領域全体のクリック(コントロール外からの選択用) */
8
+ onHeaderClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
9
+ slot?: React.ReactNode;
10
+ slotExpansion?: SlotExpansion;
11
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ /**
3
+ * ヘッダー領域クリックで input をトグルするための ref・ハンドラ。
4
+ * コントロール本体(ラベル内)のクリックと二重発火しないよう ControlWrap + contains で抑止する。
5
+ */
6
+ export declare function useSelectableCardHeaderClick(disabled: boolean | undefined, inputRefProp: React.Ref<HTMLInputElement> | undefined): {
7
+ controlWrapRef: React.MutableRefObject<HTMLSpanElement | null>;
8
+ assignInputRef: (node: HTMLInputElement | null) => void;
9
+ handleHeaderClick: (e: React.MouseEvent<HTMLDivElement>) => void;
10
+ };
@@ -0,0 +1,2 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function hasRenderableDescription(description?: ReactNode): boolean;
@@ -1,17 +1,18 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { StoryObj } from "@storybook/react-vite";
3
3
  import { Tag } from "./Tag";
4
4
  declare const meta: Meta<({ label, size, variant, onRemove, className, disabled, boldText, onClick, "aria-label": ariaLabel, "data-tag": dataTag, prepend, }: import("./types").TagProps) => JSX.Element>;
5
5
  export default meta;
6
6
  type Story = StoryObj<typeof Tag>;
7
- export declare const Default: Story;
8
- export declare const Sizes: Story;
9
- export declare const Variants: Story;
10
- export declare const WithoutRemove: Story;
11
- export declare const Disabled: Story;
12
- export declare const BoldText: Story;
13
- export declare const Clickable: Story;
14
- export declare const BoldAndClickable: Story;
15
- export declare const AllFeatures: Story;
16
- export declare const PrependSizes: Story;
17
- export declare const PrependWithClickable: Story;
7
+ /** Storybook Playground 用(prepend / onRemove は show* で組み立て) */
8
+ type TagPlaygroundArgs = Omit<React.ComponentProps<typeof Tag>, "prepend" | "onRemove"> & {
9
+ showPrepend?: boolean;
10
+ showRemove?: boolean;
11
+ };
12
+ /** Controls で主要 props を試す(既定の確認用) */
13
+ export declare const Playground: StoryObj<TagPlaygroundArgs>;
14
+ /**
15
+ * サイズ・variant・状態・prepend・bold・複合までを1画面で比較する。
16
+ * (静的表示のため Controls は無効)
17
+ */
18
+ export declare const Overview: Story;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- export type TagSize = "small" | "medium" | "large";
2
+ export type TagSize = "small" | "medium" | "large" | "xl";
3
3
  export type TagVariant = "light" | "dark";
4
4
  export type TagProps = {
5
5
  label: string;
@@ -21,9 +21,7 @@ export declare const TAG_SIZES: {
21
21
  readonly padding: "2px 4px";
22
22
  readonly iconSize: "12px";
23
23
  readonly borderRadius: "4px";
24
- /** prepend とラベルテキストの間 */
25
24
  readonly prependGap: "2px";
26
- /** ラベルと削除ボタンなど、従来ルート gap で取っていた間隔 */
27
25
  readonly itemGap: "4px";
28
26
  };
29
27
  readonly medium: {
@@ -44,6 +42,15 @@ export declare const TAG_SIZES: {
44
42
  readonly prependGap: "4px";
45
43
  readonly itemGap: "8px";
46
44
  };
45
+ readonly xl: {
46
+ readonly height: "30px";
47
+ readonly fontSize: "14px";
48
+ readonly padding: "4px 8px";
49
+ readonly iconSize: "16px";
50
+ readonly borderRadius: "4px";
51
+ readonly prependGap: "4px";
52
+ readonly itemGap: "8px";
53
+ };
47
54
  };
48
55
  export declare const TAG_VARIANTS: {
49
56
  readonly light: {
@@ -19,6 +19,8 @@ export { default as Card } from "./Card";
19
19
  export * from "./Card";
20
20
  export { default as Checkbox } from "./Checkbox";
21
21
  export * from "./Checkbox";
22
+ export { default as CheckboxCard } from "./CheckboxCard";
23
+ export * from "./CheckboxCard";
22
24
  export { default as ClickAwayListener } from "./ClickAwayListener";
23
25
  export * from "./ClickAwayListener";
24
26
  export { default as ConfirmModal } from "./ConfirmModal";
@@ -67,6 +69,7 @@ export { default as Grow } from "./Grow";
67
69
  export * from "./Grow";
68
70
  export { default as Icon } from "./Icon";
69
71
  export * from "./Icon";
72
+ export * from "./IconText";
70
73
  export { default as Input } from "./Input";
71
74
  export * from "./Input";
72
75
  export { default as ItemEmpty } from "./ItemEmpty";
@@ -97,6 +100,8 @@ export { default as Popover } from "./Popover";
97
100
  export * from "./Popover";
98
101
  export { default as Portal } from "./Portal";
99
102
  export * from "./Portal";
103
+ export { default as RadioCard } from "./RadioCard";
104
+ export * from "./RadioCard";
100
105
  export { default as RadioButton } from "./RadioButton";
101
106
  export * from "./RadioButton";
102
107
  export { default as ScrollArea } from "./ScrollArea";