sparkle-design 0.9.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 (125) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +5 -0
  3. package/README.en.md +275 -0
  4. package/README.md +328 -0
  5. package/dist/components/ui/badge/index.d.ts +67 -0
  6. package/dist/components/ui/badge/index.figma.d.ts +1 -0
  7. package/dist/components/ui/badge/index.figma.js +28 -0
  8. package/dist/components/ui/badge/index.js +129 -0
  9. package/dist/components/ui/breadcrumb/index.d.ts +70 -0
  10. package/dist/components/ui/breadcrumb/index.figma.d.ts +1 -0
  11. package/dist/components/ui/breadcrumb/index.figma.js +28 -0
  12. package/dist/components/ui/breadcrumb/index.js +96 -0
  13. package/dist/components/ui/button/index.d.ts +145 -0
  14. package/dist/components/ui/button/index.figma.d.ts +1 -0
  15. package/dist/components/ui/button/index.figma.js +59 -0
  16. package/dist/components/ui/button/index.js +375 -0
  17. package/dist/components/ui/card/index.d.ts +193 -0
  18. package/dist/components/ui/card/index.figma.d.ts +1 -0
  19. package/dist/components/ui/card/index.figma.js +28 -0
  20. package/dist/components/ui/card/index.js +219 -0
  21. package/dist/components/ui/checkbox/index.d.ts +62 -0
  22. package/dist/components/ui/checkbox/index.figma.d.ts +1 -0
  23. package/dist/components/ui/checkbox/index.figma.js +34 -0
  24. package/dist/components/ui/checkbox/index.js +192 -0
  25. package/dist/components/ui/dialog/index.d.ts +106 -0
  26. package/dist/components/ui/dialog/index.figma.d.ts +1 -0
  27. package/dist/components/ui/dialog/index.figma.js +21 -0
  28. package/dist/components/ui/dialog/index.js +157 -0
  29. package/dist/components/ui/divider/index.d.ts +44 -0
  30. package/dist/components/ui/divider/index.figma.d.ts +1 -0
  31. package/dist/components/ui/divider/index.figma.js +39 -0
  32. package/dist/components/ui/divider/index.js +81 -0
  33. package/dist/components/ui/form/index.d.ts +171 -0
  34. package/dist/components/ui/form/index.figma.d.ts +1 -0
  35. package/dist/components/ui/form/index.figma.js +129 -0
  36. package/dist/components/ui/form/index.js +214 -0
  37. package/dist/components/ui/form/label.d.ts +4 -0
  38. package/dist/components/ui/form/label.js +20 -0
  39. package/dist/components/ui/icon/index.d.ts +71 -0
  40. package/dist/components/ui/icon/index.figma.d.ts +1 -0
  41. package/dist/components/ui/icon/index.figma.js +1858 -0
  42. package/dist/components/ui/icon/index.js +57 -0
  43. package/dist/components/ui/icon-button/index.d.ts +77 -0
  44. package/dist/components/ui/icon-button/index.figma.d.ts +1 -0
  45. package/dist/components/ui/icon-button/index.figma.js +43 -0
  46. package/dist/components/ui/icon-button/index.js +341 -0
  47. package/dist/components/ui/inline-message/index.d.ts +83 -0
  48. package/dist/components/ui/inline-message/index.figma.d.ts +1 -0
  49. package/dist/components/ui/inline-message/index.figma.js +26 -0
  50. package/dist/components/ui/inline-message/index.js +154 -0
  51. package/dist/components/ui/input/index.d.ts +118 -0
  52. package/dist/components/ui/input/index.figma.d.ts +1 -0
  53. package/dist/components/ui/input/index.figma.js +36 -0
  54. package/dist/components/ui/input/index.js +256 -0
  55. package/dist/components/ui/input-password/index.d.ts +27 -0
  56. package/dist/components/ui/input-password/index.figma.d.ts +1 -0
  57. package/dist/components/ui/input-password/index.figma.js +36 -0
  58. package/dist/components/ui/input-password/index.js +35 -0
  59. package/dist/components/ui/link/index.d.ts +68 -0
  60. package/dist/components/ui/link/index.figma.d.ts +1 -0
  61. package/dist/components/ui/link/index.figma.js +22 -0
  62. package/dist/components/ui/link/index.js +92 -0
  63. package/dist/components/ui/modal/index.d.ts +83 -0
  64. package/dist/components/ui/modal/index.figma.d.ts +1 -0
  65. package/dist/components/ui/modal/index.figma.js +61 -0
  66. package/dist/components/ui/modal/index.js +143 -0
  67. package/dist/components/ui/overlay/index.d.ts +19 -0
  68. package/dist/components/ui/overlay/index.figma.d.ts +1 -0
  69. package/dist/components/ui/overlay/index.figma.js +14 -0
  70. package/dist/components/ui/overlay/index.js +39 -0
  71. package/dist/components/ui/radio/index.d.ts +94 -0
  72. package/dist/components/ui/radio/index.figma.d.ts +1 -0
  73. package/dist/components/ui/radio/index.figma.js +63 -0
  74. package/dist/components/ui/radio/index.js +204 -0
  75. package/dist/components/ui/select/index.d.ts +175 -0
  76. package/dist/components/ui/select/index.figma.d.ts +1 -0
  77. package/dist/components/ui/select/index.figma.js +30 -0
  78. package/dist/components/ui/select/index.js +281 -0
  79. package/dist/components/ui/skeleton/index.d.ts +21 -0
  80. package/dist/components/ui/skeleton/index.figma.d.ts +1 -0
  81. package/dist/components/ui/skeleton/index.figma.js +14 -0
  82. package/dist/components/ui/skeleton/index.js +32 -0
  83. package/dist/components/ui/slider/index.d.ts +75 -0
  84. package/dist/components/ui/slider/index.figma.d.ts +1 -0
  85. package/dist/components/ui/slider/index.figma.js +28 -0
  86. package/dist/components/ui/slider/index.js +113 -0
  87. package/dist/components/ui/slider/utils.d.ts +16 -0
  88. package/dist/components/ui/slider/utils.js +56 -0
  89. package/dist/components/ui/spinner/index.d.ts +42 -0
  90. package/dist/components/ui/spinner/index.figma.d.ts +1 -0
  91. package/dist/components/ui/spinner/index.figma.js +16 -0
  92. package/dist/components/ui/spinner/index.js +51 -0
  93. package/dist/components/ui/switch/index.d.ts +46 -0
  94. package/dist/components/ui/switch/index.figma.d.ts +1 -0
  95. package/dist/components/ui/switch/index.figma.js +27 -0
  96. package/dist/components/ui/switch/index.js +75 -0
  97. package/dist/components/ui/tabs/index.d.ts +53 -0
  98. package/dist/components/ui/tabs/index.figma.d.ts +1 -0
  99. package/dist/components/ui/tabs/index.figma.js +55 -0
  100. package/dist/components/ui/tabs/index.js +164 -0
  101. package/dist/components/ui/tag/index.d.ts +50 -0
  102. package/dist/components/ui/tag/index.figma.d.ts +1 -0
  103. package/dist/components/ui/tag/index.figma.js +32 -0
  104. package/dist/components/ui/tag/index.js +177 -0
  105. package/dist/components/ui/textarea/index.d.ts +49 -0
  106. package/dist/components/ui/textarea/index.figma.d.ts +1 -0
  107. package/dist/components/ui/textarea/index.figma.js +27 -0
  108. package/dist/components/ui/textarea/index.js +94 -0
  109. package/dist/components/ui/toast/index.d.ts +60 -0
  110. package/dist/components/ui/toast/index.figma.d.ts +1 -0
  111. package/dist/components/ui/toast/index.figma.js +26 -0
  112. package/dist/components/ui/toast/index.js +57 -0
  113. package/dist/components/ui/tooltip/index.d.ts +52 -0
  114. package/dist/components/ui/tooltip/index.figma.d.ts +1 -0
  115. package/dist/components/ui/tooltip/index.figma.js +23 -0
  116. package/dist/components/ui/tooltip/index.js +65 -0
  117. package/dist/index.d.ts +27 -0
  118. package/dist/index.js +27 -0
  119. package/dist/lib/utils.d.ts +2 -0
  120. package/dist/lib/utils.js +5 -0
  121. package/dist/test/helpers.d.ts +56 -0
  122. package/dist/test/helpers.js +182 -0
  123. package/dist/test/setup.d.ts +1 -0
  124. package/dist/test/setup.js +38 -0
  125. package/package.json +253 -0
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Copyright 2026 Goodpatch Inc.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import * as React from "react";
6
+ export interface ClickableCardProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7
+ /**
8
+ * クリック時の処理
9
+ * en: Click handler function
10
+ */
11
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
12
+ /**
13
+ * ボタンを無効化するかどうか
14
+ * en: Whether the button is disabled
15
+ */
16
+ isDisabled?: boolean;
17
+ }
18
+ /**
19
+ * **概要 / Overview**
20
+ *
21
+ * - カードはコンテンツをグルーピングして表示するために使用するコンポーネントです。
22
+ * - en: The Card component is used to group and display content.
23
+ *
24
+ * **使用例 / Usage Example**
25
+ *
26
+ * ```tsx
27
+ * <ClickableCard onClick={() => console.log('Clicked')}>
28
+ * クリック可能なカードです
29
+ * </ClickableCard>
30
+ * ```
31
+ *
32
+ * @param {ClickableCardProps} props
33
+ */
34
+ declare const ClickableCard: React.ForwardRefExoticComponent<ClickableCardProps & React.RefAttributes<HTMLButtonElement>>;
35
+ /**
36
+ * **概要 / Overview**
37
+ *
38
+ * - カードはコンテンツをグルーピングして表示するために使用するコンポーネントです。
39
+ * - en: The Card component is used to group and display content.
40
+ *
41
+ * **使用例 / Usage Example**
42
+ *
43
+ * ```tsx
44
+ * <Card>
45
+ * <CardHeader>
46
+ * <CardTitle>
47
+ * タイトル
48
+ * <CardDescription className="character-3-regular-pro text-text-low">
49
+ * 全 12 件
50
+ * </CardDescription>
51
+ * </CardTitle>
52
+ * </CardHeader>
53
+ * <CardContent>
54
+ * コンテンツの内容
55
+ * </CardContent>
56
+ * </Card>
57
+ * ```
58
+ *
59
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
60
+ */
61
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
62
+ /**
63
+ * **アンチパターン / Anti-patterns**
64
+ *
65
+ * - CardHeader 内で手動の flex レイアウト(`<div className="flex justify-between">`)を使わないでください。CardHeader は内部で flex レイアウトを適用済みです。アクションボタンは `CardControl` で囲んでください。
66
+ * en: Do not use manual flex layout inside CardHeader. CardHeader already applies flex layout internally. Wrap action buttons with `CardControl`.
67
+ * - CardTitle の補足情報や件数は、`span` などを直書きせず `CardDescription` を使ってください。
68
+ * en: For supporting text or counts inside CardTitle, do not inline a `span`; use `CardDescription`.
69
+ * - `CardDescription` はタイトルの補足テキスト用です。長い説明文は `CardContent` に配置してください。
70
+ * en: Use `CardDescription` for short supporting text in CardTitle. Put long descriptive copy inside `CardContent`.
71
+ *
72
+ * ```tsx
73
+ * // ✅ Correct
74
+ * <CardHeader>
75
+ * <CardTitle>
76
+ * タイトル
77
+ * <CardDescription className="character-3-regular-pro text-text-low">
78
+ * 全 12 件
79
+ * </CardDescription>
80
+ * </CardTitle>
81
+ * <CardControl>
82
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
83
+ * <Button>保存</Button>
84
+ * </CardControl>
85
+ * </CardHeader>
86
+ *
87
+ * // ❌ Wrong - 手動 flex を使わない
88
+ * <CardHeader>
89
+ * <div className="flex justify-between">
90
+ * <CardTitle>タイトル</CardTitle>
91
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
92
+ * <Button>保存</Button>
93
+ * </div>
94
+ * </CardHeader>
95
+ *
96
+ * // ❌ Wrong - CardTitle 内に補足を入れない
97
+ * <CardHeader>
98
+ * <CardTitle>
99
+ * タイトル
100
+ * <span className="text-sm text-neutral-500">全 12 件</span>
101
+ * </CardTitle>
102
+ * </CardHeader>
103
+ * ```
104
+
105
+ */
106
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
107
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
108
+ /**
109
+ * **概要 / Overview**
110
+ *
111
+ * - カードタイトル内の補足情報や件数表示に使用するコンポーネントです。
112
+ * - en: The CardDescription component is used for supporting text or counts inside CardTitle.
113
+ *
114
+ * **使用例 / Usage Example**
115
+ *
116
+ * ```tsx
117
+ * <CardTitle>
118
+ * タイトル
119
+ * <CardDescription className="character-3-regular-pro text-text-low">
120
+ * 全 12 件
121
+ * </CardDescription>
122
+ * </CardTitle>
123
+ * ```
124
+ *
125
+ * **アンチパターン / Anti-patterns**
126
+ *
127
+ * - `CardDescription` は CardTitle 内の短い補足テキスト用です。長い説明文は `CardContent` に配置してください。
128
+ * en: `CardDescription` is for short supporting text inside CardTitle. Put long descriptive copy inside `CardContent`.
129
+ * - Typography や text color は用途に応じて className で明示してください。
130
+ * en: Specify typography and text color explicitly with className based on the use case.
131
+ *
132
+ * ```tsx
133
+ * // ✅ Correct
134
+ * <CardTitle>
135
+ * プロジェクト一覧
136
+ * <CardDescription className="character-3-regular-pro text-text-low">
137
+ * 全 12 件
138
+ * </CardDescription>
139
+ * </CardTitle>
140
+ *
141
+ * // ❌ Wrong - 長い説明文を CardTitle 内に入れない
142
+ * <CardTitle>
143
+ * プロジェクト一覧
144
+ * <CardDescription>
145
+ * このカードはダッシュボードで重要な進捗と担当者の状態を表示します。
146
+ * </CardDescription>
147
+ * </CardTitle>
148
+ * ```
149
+
150
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
151
+ */
152
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
153
+ /**
154
+ * **概要 / Overview**
155
+ *
156
+ * - CardHeader 右側のアクションをまとめるコンポーネントです。
157
+ * - en: CardControl groups right-side actions inside CardHeader.
158
+ *
159
+ * **使用例 / Usage Example**
160
+ *
161
+ * ```tsx
162
+ * <CardControl>
163
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
164
+ * <Button>保存</Button>
165
+ * </CardControl>
166
+ * ```
167
+ *
168
+ * **アンチパターン / Anti-patterns**
169
+ *
170
+ * - CardHeader の右側アクションは `CardControl` に集約してください。複数ボタンでも追加の layout class は不要です。
171
+ * en: Place right-side actions in `CardControl`. No extra layout classes are needed even with multiple buttons.
172
+ *
173
+ * ```tsx
174
+ * // ✅ Correct
175
+ * <CardControl>
176
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
177
+ * <Button>保存</Button>
178
+ * </CardControl>
179
+ * ```
180
+
181
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
182
+ */
183
+ declare const CardControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
184
+ export interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {
185
+ /**
186
+ * スペースを入れるかどうか
187
+ * en: Whether to add spacing
188
+ */
189
+ isSpace?: boolean;
190
+ }
191
+ declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
192
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
193
+ export { ClickableCard, Card, CardHeader, CardFooter, CardTitle, CardControl, CardDescription, CardContent, };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import figma from "@figma/code-connect";
3
+ import { Card, ClickableCard, CardHeader, CardTitle, CardControl, CardDescription, CardContent, CardFooter, } from "./index.js";
4
+ /**
5
+ * Card - 基本的なカードコンポーネント
6
+ * en: Card - Basic card component
7
+ */
8
+ figma.connect(Card, "https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=1274-60861&t=A1ymB6VaQrqwNcKU-4", {
9
+ props: {},
10
+ example: props => (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { children: ["\u30BF\u30A4\u30C8\u30EB", _jsx(CardDescription, { className: "character-3-regular-pro text-text-low", children: "Description" })] }), _jsx(CardControl, { children: "Control" })] }), _jsx(CardContent, { children: "Content" }), _jsx(CardFooter, { children: "Footer" })] })),
11
+ });
12
+ /**
13
+ * ClickableCard - クリック可能なカードコンポーネント
14
+ * en: ClickableCard - Clickable card component
15
+ */
16
+ figma.connect(ClickableCard, "https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=8271-617&t=A1ymB6VaQrqwNcKU-4", {
17
+ props: {
18
+ /**
19
+ * 無効化状態
20
+ * en: Disabled state
21
+ */
22
+ isDisabled: figma.enum("state", {
23
+ disabled: true,
24
+ default: false,
25
+ }),
26
+ },
27
+ example: props => (_jsxs(ClickableCard, { isDisabled: props.isDisabled, children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { children: ["\u30BF\u30A4\u30C8\u30EB", _jsx(CardDescription, { className: "character-3-regular-pro text-text-low", children: "Description" })] }), _jsx(CardControl, { children: "Control" })] }), _jsx(CardContent, { children: "Content" })] })),
28
+ });
@@ -0,0 +1,219 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ /**
14
+ * Copyright 2026 Goodpatch Inc.
15
+ * SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ import * as React from "react";
18
+ import { cn } from "../../../lib/utils.js";
19
+ /**
20
+ * **概要 / Overview**
21
+ *
22
+ * - カードはコンテンツをグルーピングして表示するために使用するコンポーネントです。
23
+ * - en: The Card component is used to group and display content.
24
+ *
25
+ * **使用例 / Usage Example**
26
+ *
27
+ * ```tsx
28
+ * <ClickableCard onClick={() => console.log('Clicked')}>
29
+ * クリック可能なカードです
30
+ * </ClickableCard>
31
+ * ```
32
+ *
33
+ * @param {ClickableCardProps} props
34
+ */
35
+ const ClickableCard = React.forwardRef((_a, ref) => {
36
+ var { className, isDisabled, onClick } = _a, props = __rest(_a, ["className", "isDisabled", "onClick"]);
37
+ return (_jsx("button", Object.assign({ ref: ref, className: cn("rounded-action border border-divider-middle bg-white shadow-raise text-text-middle py-4 cursor-pointer hover:bg-neutral-50", "transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-[var(--color-ring-normal)] focus-visible:ring-offset-2", "active:bg-neutral-50 active:shadow-float active:border-primary-400", "disabled:cursor-not-allowed disabled:bg-white disabled:border-secondary-100 disabled:text-secondary-200 disabled:shadow-flat", className), onClick: onClick, disabled: isDisabled, type: "button" }, props)));
38
+ });
39
+ ClickableCard.displayName = "ClickableCard";
40
+ /**
41
+ * **概要 / Overview**
42
+ *
43
+ * - カードはコンテンツをグルーピングして表示するために使用するコンポーネントです。
44
+ * - en: The Card component is used to group and display content.
45
+ *
46
+ * **使用例 / Usage Example**
47
+ *
48
+ * ```tsx
49
+ * <Card>
50
+ * <CardHeader>
51
+ * <CardTitle>
52
+ * タイトル
53
+ * <CardDescription className="character-3-regular-pro text-text-low">
54
+ * 全 12 件
55
+ * </CardDescription>
56
+ * </CardTitle>
57
+ * </CardHeader>
58
+ * <CardContent>
59
+ * コンテンツの内容
60
+ * </CardContent>
61
+ * </Card>
62
+ * ```
63
+ *
64
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
65
+ */
66
+ const Card = React.forwardRef((_a, ref) => {
67
+ var { className } = _a, props = __rest(_a, ["className"]);
68
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("rounded-minimum border border-divider-middle bg-white text-text-middle py-4", className) }, props)));
69
+ });
70
+ Card.displayName = "Card";
71
+ /**
72
+ * **アンチパターン / Anti-patterns**
73
+ *
74
+ * - CardHeader 内で手動の flex レイアウト(`<div className="flex justify-between">`)を使わないでください。CardHeader は内部で flex レイアウトを適用済みです。アクションボタンは `CardControl` で囲んでください。
75
+ * en: Do not use manual flex layout inside CardHeader. CardHeader already applies flex layout internally. Wrap action buttons with `CardControl`.
76
+ * - CardTitle の補足情報や件数は、`span` などを直書きせず `CardDescription` を使ってください。
77
+ * en: For supporting text or counts inside CardTitle, do not inline a `span`; use `CardDescription`.
78
+ * - `CardDescription` はタイトルの補足テキスト用です。長い説明文は `CardContent` に配置してください。
79
+ * en: Use `CardDescription` for short supporting text in CardTitle. Put long descriptive copy inside `CardContent`.
80
+ *
81
+ * ```tsx
82
+ * // ✅ Correct
83
+ * <CardHeader>
84
+ * <CardTitle>
85
+ * タイトル
86
+ * <CardDescription className="character-3-regular-pro text-text-low">
87
+ * 全 12 件
88
+ * </CardDescription>
89
+ * </CardTitle>
90
+ * <CardControl>
91
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
92
+ * <Button>保存</Button>
93
+ * </CardControl>
94
+ * </CardHeader>
95
+ *
96
+ * // ❌ Wrong - 手動 flex を使わない
97
+ * <CardHeader>
98
+ * <div className="flex justify-between">
99
+ * <CardTitle>タイトル</CardTitle>
100
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
101
+ * <Button>保存</Button>
102
+ * </div>
103
+ * </CardHeader>
104
+ *
105
+ * // ❌ Wrong - CardTitle 内に補足を入れない
106
+ * <CardHeader>
107
+ * <CardTitle>
108
+ * タイトル
109
+ * <span className="text-sm text-neutral-500">全 12 件</span>
110
+ * </CardTitle>
111
+ * </CardHeader>
112
+ * ```
113
+
114
+ */
115
+ const CardHeader = React.forwardRef((_a, ref) => {
116
+ var { className } = _a, props = __rest(_a, ["className"]);
117
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("flex flex-row gap-2 justify-between px-6 py-2 items-center", className) }, props)));
118
+ });
119
+ CardHeader.displayName = "CardHeader";
120
+ const CardTitle = React.forwardRef((_a, ref) => {
121
+ var { className } = _a, props = __rest(_a, ["className"]);
122
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("character-4-bold-pro flex items-center gap-2", className) }, props)));
123
+ });
124
+ CardTitle.displayName = "CardTitle";
125
+ /**
126
+ * **概要 / Overview**
127
+ *
128
+ * - カードタイトル内の補足情報や件数表示に使用するコンポーネントです。
129
+ * - en: The CardDescription component is used for supporting text or counts inside CardTitle.
130
+ *
131
+ * **使用例 / Usage Example**
132
+ *
133
+ * ```tsx
134
+ * <CardTitle>
135
+ * タイトル
136
+ * <CardDescription className="character-3-regular-pro text-text-low">
137
+ * 全 12 件
138
+ * </CardDescription>
139
+ * </CardTitle>
140
+ * ```
141
+ *
142
+ * **アンチパターン / Anti-patterns**
143
+ *
144
+ * - `CardDescription` は CardTitle 内の短い補足テキスト用です。長い説明文は `CardContent` に配置してください。
145
+ * en: `CardDescription` is for short supporting text inside CardTitle. Put long descriptive copy inside `CardContent`.
146
+ * - Typography や text color は用途に応じて className で明示してください。
147
+ * en: Specify typography and text color explicitly with className based on the use case.
148
+ *
149
+ * ```tsx
150
+ * // ✅ Correct
151
+ * <CardTitle>
152
+ * プロジェクト一覧
153
+ * <CardDescription className="character-3-regular-pro text-text-low">
154
+ * 全 12 件
155
+ * </CardDescription>
156
+ * </CardTitle>
157
+ *
158
+ * // ❌ Wrong - 長い説明文を CardTitle 内に入れない
159
+ * <CardTitle>
160
+ * プロジェクト一覧
161
+ * <CardDescription>
162
+ * このカードはダッシュボードで重要な進捗と担当者の状態を表示します。
163
+ * </CardDescription>
164
+ * </CardTitle>
165
+ * ```
166
+
167
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
168
+ */
169
+ const CardDescription = React.forwardRef((_a, ref) => {
170
+ var { className } = _a, props = __rest(_a, ["className"]);
171
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("", className) }, props)));
172
+ });
173
+ CardDescription.displayName = "CardDescription";
174
+ /**
175
+ * **概要 / Overview**
176
+ *
177
+ * - CardHeader 右側のアクションをまとめるコンポーネントです。
178
+ * - en: CardControl groups right-side actions inside CardHeader.
179
+ *
180
+ * **使用例 / Usage Example**
181
+ *
182
+ * ```tsx
183
+ * <CardControl>
184
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
185
+ * <Button>保存</Button>
186
+ * </CardControl>
187
+ * ```
188
+ *
189
+ * **アンチパターン / Anti-patterns**
190
+ *
191
+ * - CardHeader の右側アクションは `CardControl` に集約してください。複数ボタンでも追加の layout class は不要です。
192
+ * en: Place right-side actions in `CardControl`. No extra layout classes are needed even with multiple buttons.
193
+ *
194
+ * ```tsx
195
+ * // ✅ Correct
196
+ * <CardControl>
197
+ * <Button theme="neutral" variant="outline">キャンセル</Button>
198
+ * <Button>保存</Button>
199
+ * </CardControl>
200
+ * ```
201
+
202
+ * @param {React.HTMLAttributes<HTMLDivElement>} props
203
+ */
204
+ const CardControl = React.forwardRef((_a, ref) => {
205
+ var { className } = _a, props = __rest(_a, ["className"]);
206
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("flex items-center gap-2", className) }, props)));
207
+ });
208
+ CardControl.displayName = "CardControl";
209
+ const CardContent = React.forwardRef((_a, ref) => {
210
+ var { className, isSpace = true } = _a, props = __rest(_a, ["className", "isSpace"]);
211
+ return (_jsx("div", Object.assign({ ref: ref, className: cn(isSpace ? "px-6 py-2" : "", className) }, props)));
212
+ });
213
+ CardContent.displayName = "CardContent";
214
+ const CardFooter = React.forwardRef((_a, ref) => {
215
+ var { className } = _a, props = __rest(_a, ["className"]);
216
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("flex items-center justify-end px-6 py-2", className) }, props)));
217
+ });
218
+ CardFooter.displayName = "CardFooter";
219
+ export { ClickableCard, Card, CardHeader, CardFooter, CardTitle, CardControl, CardDescription, CardContent, };
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const checkboxRootVariants: (props?: ({
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ isInvalid?: boolean | null | undefined;
7
+ isDisabled?: boolean | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ type CheckboxPrimitiveProps = React.ComponentProps<typeof CheckboxPrimitive.Root>;
10
+ type CheckboxVariants = VariantProps<typeof checkboxRootVariants>;
11
+ interface CheckboxItemProps extends CheckboxPrimitiveProps {
12
+ /**
13
+ * チェックボックスのサイズ
14
+ * en: Size of the checkbox
15
+ * @default "md"
16
+ */
17
+ size?: CheckboxVariants["size"];
18
+ /**
19
+ * エラー状態かどうか
20
+ * en: Whether the checkbox is in an error state
21
+ * @default false
22
+ */
23
+ isInvalid?: boolean;
24
+ /**
25
+ * 無効状態かどうか
26
+ * en: Whether the checkbox is disabled
27
+ * @default false
28
+ */
29
+ isDisabled?: boolean;
30
+ /**
31
+ * ラベルのテキスト
32
+ * en: Label text for the checkbox
33
+ */
34
+ label?: string;
35
+ /**
36
+ * 不確定状態かどうか
37
+ * en: Whether the checkbox is in an indeterminate state
38
+ */
39
+ indeterminate?: boolean;
40
+ /**
41
+ * チェック状態
42
+ * en: Checked state of the checkbox
43
+ */
44
+ checked?: CheckboxPrimitiveProps["checked"];
45
+ }
46
+ /**
47
+ * **概要 / Overview**
48
+ *
49
+ * - チェックボックスは複数のオプショングループから複数の項目を選択する形式でユーザーからの入力を取得するために使用するコンポーネントです。
50
+ * - en: The Checkbox component is used to capture user input by selecting multiple items from multiple option groups.
51
+ *
52
+ * **使用例 / Usage Example**
53
+ *
54
+ * ```tsx
55
+ * <Checkbox size="md" label="利用規約に同意する" />
56
+ * ```
57
+ *
58
+ * @param {CheckboxItemProps} props
59
+ */
60
+ declare function Checkbox({ className, size, isInvalid, isDisabled, disabled, label, id, checked: controlledChecked, defaultChecked, indeterminate, onCheckedChange, ...props }: CheckboxItemProps): import("react/jsx-runtime").JSX.Element;
61
+ export { Checkbox };
62
+ export type { CheckboxItemProps };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import figma from "@figma/code-connect";
3
+ import { Checkbox } from "./index.js";
4
+ /**
5
+ * -- This file was auto-generated by Code Connect --
6
+ * `props` includes a mapping from your code props to Figma properties.
7
+ * You should check this is correct, and update the `example` function
8
+ * to return the code example you'd like to see in Figma
9
+ */
10
+ figma.connect(Checkbox, "https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=176%3A7554", {
11
+ props: {
12
+ // These props were automatically mapped based on your linked code:
13
+ size: figma.enum("size", {
14
+ sm: "sm",
15
+ md: "md",
16
+ lg: "lg",
17
+ }),
18
+ isInvalid: figma.boolean("isInvalid"),
19
+ label: figma.string("label"),
20
+ indeterminate: figma.enum("body", {
21
+ indeterminate: true,
22
+ }),
23
+ defaultChecked: figma.enum("body", {
24
+ checked: true,
25
+ }),
26
+ isDisabled: figma.enum("state", {
27
+ disabled: true,
28
+ }),
29
+ // No matching props could be found for these Figma properties:
30
+ // "isLabel": figma.boolean('isLabel'),
31
+ // "isFocused": figma.boolean('isFocused'),
32
+ },
33
+ example: props => (_jsx(Checkbox, { size: props.size, isInvalid: props.isInvalid, label: props.label, indeterminate: props.indeterminate, isDisabled: props.isDisabled, defaultChecked: props.defaultChecked })),
34
+ });