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.
- package/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.en.md +275 -0
- package/README.md +328 -0
- package/dist/components/ui/badge/index.d.ts +67 -0
- package/dist/components/ui/badge/index.figma.d.ts +1 -0
- package/dist/components/ui/badge/index.figma.js +28 -0
- package/dist/components/ui/badge/index.js +129 -0
- package/dist/components/ui/breadcrumb/index.d.ts +70 -0
- package/dist/components/ui/breadcrumb/index.figma.d.ts +1 -0
- package/dist/components/ui/breadcrumb/index.figma.js +28 -0
- package/dist/components/ui/breadcrumb/index.js +96 -0
- package/dist/components/ui/button/index.d.ts +145 -0
- package/dist/components/ui/button/index.figma.d.ts +1 -0
- package/dist/components/ui/button/index.figma.js +59 -0
- package/dist/components/ui/button/index.js +375 -0
- package/dist/components/ui/card/index.d.ts +193 -0
- package/dist/components/ui/card/index.figma.d.ts +1 -0
- package/dist/components/ui/card/index.figma.js +28 -0
- package/dist/components/ui/card/index.js +219 -0
- package/dist/components/ui/checkbox/index.d.ts +62 -0
- package/dist/components/ui/checkbox/index.figma.d.ts +1 -0
- package/dist/components/ui/checkbox/index.figma.js +34 -0
- package/dist/components/ui/checkbox/index.js +192 -0
- package/dist/components/ui/dialog/index.d.ts +106 -0
- package/dist/components/ui/dialog/index.figma.d.ts +1 -0
- package/dist/components/ui/dialog/index.figma.js +21 -0
- package/dist/components/ui/dialog/index.js +157 -0
- package/dist/components/ui/divider/index.d.ts +44 -0
- package/dist/components/ui/divider/index.figma.d.ts +1 -0
- package/dist/components/ui/divider/index.figma.js +39 -0
- package/dist/components/ui/divider/index.js +81 -0
- package/dist/components/ui/form/index.d.ts +171 -0
- package/dist/components/ui/form/index.figma.d.ts +1 -0
- package/dist/components/ui/form/index.figma.js +129 -0
- package/dist/components/ui/form/index.js +214 -0
- package/dist/components/ui/form/label.d.ts +4 -0
- package/dist/components/ui/form/label.js +20 -0
- package/dist/components/ui/icon/index.d.ts +71 -0
- package/dist/components/ui/icon/index.figma.d.ts +1 -0
- package/dist/components/ui/icon/index.figma.js +1858 -0
- package/dist/components/ui/icon/index.js +57 -0
- package/dist/components/ui/icon-button/index.d.ts +77 -0
- package/dist/components/ui/icon-button/index.figma.d.ts +1 -0
- package/dist/components/ui/icon-button/index.figma.js +43 -0
- package/dist/components/ui/icon-button/index.js +341 -0
- package/dist/components/ui/inline-message/index.d.ts +83 -0
- package/dist/components/ui/inline-message/index.figma.d.ts +1 -0
- package/dist/components/ui/inline-message/index.figma.js +26 -0
- package/dist/components/ui/inline-message/index.js +154 -0
- package/dist/components/ui/input/index.d.ts +118 -0
- package/dist/components/ui/input/index.figma.d.ts +1 -0
- package/dist/components/ui/input/index.figma.js +36 -0
- package/dist/components/ui/input/index.js +256 -0
- package/dist/components/ui/input-password/index.d.ts +27 -0
- package/dist/components/ui/input-password/index.figma.d.ts +1 -0
- package/dist/components/ui/input-password/index.figma.js +36 -0
- package/dist/components/ui/input-password/index.js +35 -0
- package/dist/components/ui/link/index.d.ts +68 -0
- package/dist/components/ui/link/index.figma.d.ts +1 -0
- package/dist/components/ui/link/index.figma.js +22 -0
- package/dist/components/ui/link/index.js +92 -0
- package/dist/components/ui/modal/index.d.ts +83 -0
- package/dist/components/ui/modal/index.figma.d.ts +1 -0
- package/dist/components/ui/modal/index.figma.js +61 -0
- package/dist/components/ui/modal/index.js +143 -0
- package/dist/components/ui/overlay/index.d.ts +19 -0
- package/dist/components/ui/overlay/index.figma.d.ts +1 -0
- package/dist/components/ui/overlay/index.figma.js +14 -0
- package/dist/components/ui/overlay/index.js +39 -0
- package/dist/components/ui/radio/index.d.ts +94 -0
- package/dist/components/ui/radio/index.figma.d.ts +1 -0
- package/dist/components/ui/radio/index.figma.js +63 -0
- package/dist/components/ui/radio/index.js +204 -0
- package/dist/components/ui/select/index.d.ts +175 -0
- package/dist/components/ui/select/index.figma.d.ts +1 -0
- package/dist/components/ui/select/index.figma.js +30 -0
- package/dist/components/ui/select/index.js +281 -0
- package/dist/components/ui/skeleton/index.d.ts +21 -0
- package/dist/components/ui/skeleton/index.figma.d.ts +1 -0
- package/dist/components/ui/skeleton/index.figma.js +14 -0
- package/dist/components/ui/skeleton/index.js +32 -0
- package/dist/components/ui/slider/index.d.ts +75 -0
- package/dist/components/ui/slider/index.figma.d.ts +1 -0
- package/dist/components/ui/slider/index.figma.js +28 -0
- package/dist/components/ui/slider/index.js +113 -0
- package/dist/components/ui/slider/utils.d.ts +16 -0
- package/dist/components/ui/slider/utils.js +56 -0
- package/dist/components/ui/spinner/index.d.ts +42 -0
- package/dist/components/ui/spinner/index.figma.d.ts +1 -0
- package/dist/components/ui/spinner/index.figma.js +16 -0
- package/dist/components/ui/spinner/index.js +51 -0
- package/dist/components/ui/switch/index.d.ts +46 -0
- package/dist/components/ui/switch/index.figma.d.ts +1 -0
- package/dist/components/ui/switch/index.figma.js +27 -0
- package/dist/components/ui/switch/index.js +75 -0
- package/dist/components/ui/tabs/index.d.ts +53 -0
- package/dist/components/ui/tabs/index.figma.d.ts +1 -0
- package/dist/components/ui/tabs/index.figma.js +55 -0
- package/dist/components/ui/tabs/index.js +164 -0
- package/dist/components/ui/tag/index.d.ts +50 -0
- package/dist/components/ui/tag/index.figma.d.ts +1 -0
- package/dist/components/ui/tag/index.figma.js +32 -0
- package/dist/components/ui/tag/index.js +177 -0
- package/dist/components/ui/textarea/index.d.ts +49 -0
- package/dist/components/ui/textarea/index.figma.d.ts +1 -0
- package/dist/components/ui/textarea/index.figma.js +27 -0
- package/dist/components/ui/textarea/index.js +94 -0
- package/dist/components/ui/toast/index.d.ts +60 -0
- package/dist/components/ui/toast/index.figma.d.ts +1 -0
- package/dist/components/ui/toast/index.figma.js +26 -0
- package/dist/components/ui/toast/index.js +57 -0
- package/dist/components/ui/tooltip/index.d.ts +52 -0
- package/dist/components/ui/tooltip/index.figma.d.ts +1 -0
- package/dist/components/ui/tooltip/index.figma.js +23 -0
- package/dist/components/ui/tooltip/index.js +65 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +27 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/dist/test/helpers.d.ts +56 -0
- package/dist/test/helpers.js +182 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.js +38 -0
- package/package.json +253 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Goodpatch Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
7
|
+
var t = {};
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
9
|
+
t[p] = s[p];
|
|
10
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
11
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
13
|
+
t[p[i]] = s[p[i]];
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import * as React from "react";
|
|
19
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
20
|
+
import { cva } from "class-variance-authority";
|
|
21
|
+
import { cn } from "../../../lib/utils.js";
|
|
22
|
+
import { Icon } from "../../../components/ui/icon/index.js";
|
|
23
|
+
const checkboxItemVariants = cva([
|
|
24
|
+
"relative rounded-sm transition-colors flex items-center justify-center cursor-pointer",
|
|
25
|
+
"focus:outline-none",
|
|
26
|
+
].join(" "), {
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
sm: "h-8 w-8",
|
|
30
|
+
md: "h-10 w-10",
|
|
31
|
+
lg: "h-12 w-12",
|
|
32
|
+
},
|
|
33
|
+
isDisabled: {
|
|
34
|
+
true: "cursor-not-allowed",
|
|
35
|
+
false: "",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
size: "md",
|
|
40
|
+
isDisabled: false,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const checkboxRootVariants = cva([
|
|
44
|
+
"rounded-xs border-2 transition-colors",
|
|
45
|
+
"[.group:focus_&]:outline-hidden [.group:focus-visible_&]:ring-2 [.group:focus-visible_&]:ring-[var(--color-ring-normal)] [.group:focus-visible_&]:ring-offset-2",
|
|
46
|
+
].join(" "), {
|
|
47
|
+
variants: {
|
|
48
|
+
size: {
|
|
49
|
+
sm: "h-4 w-4",
|
|
50
|
+
md: "h-5 w-5",
|
|
51
|
+
lg: "h-6 w-6",
|
|
52
|
+
},
|
|
53
|
+
isInvalid: {
|
|
54
|
+
true: [
|
|
55
|
+
"border-negative-500",
|
|
56
|
+
"[.group[data-state=checked]_&]:bg-negative-500 [.group[data-state=checked]_&]:border-none",
|
|
57
|
+
"[.group[data-state=indeterminate]_&]:bg-negative-500 [.group[data-state=indeterminate]_&]:border-none",
|
|
58
|
+
].join(" "),
|
|
59
|
+
false: [
|
|
60
|
+
"border-neutral-500",
|
|
61
|
+
"[.group[data-state=checked]_&]:bg-primary-500 [.group[data-state=checked]_&]:border-none",
|
|
62
|
+
"[.group[data-state=indeterminate]_&]:bg-primary-500 [.group[data-state=indeterminate]_&]:border-none",
|
|
63
|
+
].join(" "),
|
|
64
|
+
},
|
|
65
|
+
isDisabled: {
|
|
66
|
+
true: "",
|
|
67
|
+
false: "",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
compoundVariants: [
|
|
71
|
+
{
|
|
72
|
+
isDisabled: false,
|
|
73
|
+
isInvalid: false,
|
|
74
|
+
className: [
|
|
75
|
+
"hover:border-neutral-600",
|
|
76
|
+
"[.group[data-state=checked]_&]:hover:bg-primary-600",
|
|
77
|
+
"[.group[data-state=indeterminate]_&]:hover:bg-primary-600",
|
|
78
|
+
].join(" "),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
isDisabled: false,
|
|
82
|
+
isInvalid: true,
|
|
83
|
+
className: [
|
|
84
|
+
"hover:border-negative-600",
|
|
85
|
+
"[.group[data-state=checked]_&]:hover:bg-negative-600",
|
|
86
|
+
"[.group[data-state=indeterminate]_&]:hover:bg-negative-600",
|
|
87
|
+
].join(" "),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
isDisabled: true,
|
|
91
|
+
isInvalid: false,
|
|
92
|
+
className: [
|
|
93
|
+
"border-neutral-200",
|
|
94
|
+
"[.group[data-state=checked]_&]:bg-primary-200 [.group[data-state=checked]_&]:border-primary-200",
|
|
95
|
+
"[.group[data-state=indeterminate]_&]:bg-primary-200 [.group[data-state=indeterminate]_&]:border-primary-200",
|
|
96
|
+
].join(" "),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
isDisabled: true,
|
|
100
|
+
isInvalid: true,
|
|
101
|
+
className: [
|
|
102
|
+
"border-negative-200",
|
|
103
|
+
"[.group[data-state=checked]_&]:bg-negative-200 [.group[data-state=checked]_&]:border-negative-200",
|
|
104
|
+
"[.group[data-state=indeterminate]_&]:bg-negative-200 [.group[data-state=indeterminate]_&]:border-negative-200",
|
|
105
|
+
].join(" "),
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
size: "md",
|
|
110
|
+
isInvalid: false,
|
|
111
|
+
isDisabled: false,
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
const checkboxLabelVariants = cva("cursor-pointer", {
|
|
115
|
+
variants: {
|
|
116
|
+
size: {
|
|
117
|
+
sm: "character-2-regular-pro",
|
|
118
|
+
md: "character-3-regular-pro",
|
|
119
|
+
lg: "character-4-regular-pro",
|
|
120
|
+
},
|
|
121
|
+
isDisabled: {
|
|
122
|
+
true: "text-text-disabled cursor-not-allowed",
|
|
123
|
+
false: "text-text-middle",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
defaultVariants: {
|
|
127
|
+
size: "md",
|
|
128
|
+
isDisabled: false,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
/**
|
|
132
|
+
* **概要 / Overview**
|
|
133
|
+
*
|
|
134
|
+
* - チェックボックスは複数のオプショングループから複数の項目を選択する形式でユーザーからの入力を取得するために使用するコンポーネントです。
|
|
135
|
+
* - en: The Checkbox component is used to capture user input by selecting multiple items from multiple option groups.
|
|
136
|
+
*
|
|
137
|
+
* **使用例 / Usage Example**
|
|
138
|
+
*
|
|
139
|
+
* ```tsx
|
|
140
|
+
* <Checkbox size="md" label="利用規約に同意する" />
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @param {CheckboxItemProps} props
|
|
144
|
+
*/
|
|
145
|
+
function Checkbox(_a) {
|
|
146
|
+
var { className, size = "md", isInvalid = false, isDisabled = false, disabled, label, id, checked: controlledChecked, defaultChecked, indeterminate = false, onCheckedChange } = _a, props = __rest(_a, ["className", "size", "isInvalid", "isDisabled", "disabled", "label", "id", "checked", "defaultChecked", "indeterminate", "onCheckedChange"]);
|
|
147
|
+
// 内部状態の初期値を決定
|
|
148
|
+
const initialChecked = React.useMemo(() => {
|
|
149
|
+
if (controlledChecked !== undefined)
|
|
150
|
+
return controlledChecked;
|
|
151
|
+
if (indeterminate)
|
|
152
|
+
return "indeterminate";
|
|
153
|
+
return defaultChecked || false;
|
|
154
|
+
}, [controlledChecked, indeterminate, defaultChecked]);
|
|
155
|
+
const [internalChecked, setInternalChecked] = React.useState(initialChecked);
|
|
156
|
+
// 制御されているかどうかを判定
|
|
157
|
+
const isControlled = controlledChecked !== undefined;
|
|
158
|
+
const checked = isControlled ? controlledChecked : internalChecked;
|
|
159
|
+
// indeterminateプロパティが変更された場合の処理
|
|
160
|
+
React.useEffect(() => {
|
|
161
|
+
if (!isControlled && indeterminate) {
|
|
162
|
+
setInternalChecked("indeterminate");
|
|
163
|
+
}
|
|
164
|
+
}, [indeterminate, isControlled]);
|
|
165
|
+
const handleChange = React.useCallback((newChecked) => {
|
|
166
|
+
if (!isControlled) {
|
|
167
|
+
setInternalChecked(newChecked);
|
|
168
|
+
}
|
|
169
|
+
onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(newChecked);
|
|
170
|
+
}, [isControlled, onCheckedChange]);
|
|
171
|
+
// isDisabledとdisabledの組み合わせで無効状態を管理
|
|
172
|
+
const isCheckboxDisabled = isDisabled || disabled;
|
|
173
|
+
return (_jsxs("div", { className: "flex items-center", children: [_jsx(CheckboxPrimitive.Root, Object.assign({ "data-slot": "checkbox", id: id, "aria-invalid": isInvalid || undefined, className: cn(checkboxItemVariants({ size, isDisabled: isCheckboxDisabled }), "group", className), disabled: isCheckboxDisabled, checked: checked, onCheckedChange: handleChange }, props, { children: _jsx("div", { className: cn(checkboxRootVariants({
|
|
174
|
+
size,
|
|
175
|
+
isInvalid,
|
|
176
|
+
isDisabled: isCheckboxDisabled,
|
|
177
|
+
})), children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-white", children: _jsx(Icon, { icon: checked === "indeterminate"
|
|
178
|
+
? "check_indeterminate_small"
|
|
179
|
+
: "check", size: (function () {
|
|
180
|
+
switch (size) {
|
|
181
|
+
case "sm":
|
|
182
|
+
return 3;
|
|
183
|
+
case "md":
|
|
184
|
+
return 5;
|
|
185
|
+
case "lg":
|
|
186
|
+
return 6;
|
|
187
|
+
default:
|
|
188
|
+
return 5;
|
|
189
|
+
}
|
|
190
|
+
})() }) }) }) })), label && (_jsx("label", { htmlFor: id, className: cn(checkboxLabelVariants({ size, isDisabled: isCheckboxDisabled })), children: label }))] }));
|
|
191
|
+
}
|
|
192
|
+
export { Checkbox };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AlertDialog as DialogPrimitive } from "radix-ui";
|
|
3
|
+
import { ButtonProps } from "@/components/ui/button";
|
|
4
|
+
import { IconProps } from "../icon";
|
|
5
|
+
/**
|
|
6
|
+
* **概要 / Overview**
|
|
7
|
+
*
|
|
8
|
+
* - ダイアログはユーザーにアクションの実行や中断を確認するために使用するコンポーネントです。
|
|
9
|
+
* - en: The Dialog component is used to confirm the execution or interruption of actions with users.
|
|
10
|
+
* - フォーム入力や詳細表示には使わず、削除確認や再試行確認などのアクション確認に使います。
|
|
11
|
+
* - en: Do not use Dialog for forms or detail views. Use it for action confirmations such as delete and retry flows.
|
|
12
|
+
*
|
|
13
|
+
* **使用例 / Usage Example**
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Dialog>
|
|
17
|
+
* <DialogTrigger>ダイアログを開く</DialogTrigger>
|
|
18
|
+
* <DialogContent>
|
|
19
|
+
* <DialogHeader>
|
|
20
|
+
* <DialogTitle>確認</DialogTitle>
|
|
21
|
+
* <DialogDescription>本当に削除しますか?</DialogDescription>
|
|
22
|
+
* </DialogHeader>
|
|
23
|
+
* <DialogFooter>
|
|
24
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
25
|
+
* <DialogAction>削除</DialogAction>
|
|
26
|
+
* </DialogFooter>
|
|
27
|
+
* </DialogContent>
|
|
28
|
+
* </Dialog>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* **アンチパターン / Anti-patterns**
|
|
32
|
+
*
|
|
33
|
+
* - フォーム入力や詳細表示には使わず、削除確認や再試行確認などのアクション確認に使ってください。
|
|
34
|
+
* en: Do not use Dialog for forms or detail views. Use it for action confirmations such as delete and retry flows.
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* // ✅ Correct
|
|
38
|
+
* <Dialog>
|
|
39
|
+
* <DialogContent>
|
|
40
|
+
* <DialogHeader>
|
|
41
|
+
* <DialogTitle>削除確認</DialogTitle>
|
|
42
|
+
* <DialogDescription>本当に削除しますか?</DialogDescription>
|
|
43
|
+
* </DialogHeader>
|
|
44
|
+
* <DialogFooter>
|
|
45
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
46
|
+
* <DialogAction>削除</DialogAction>
|
|
47
|
+
* </DialogFooter>
|
|
48
|
+
* </DialogContent>
|
|
49
|
+
* </Dialog>
|
|
50
|
+
*
|
|
51
|
+
* // ❌ Wrong - フォーム入力に Dialog を使わない
|
|
52
|
+
* <Dialog>
|
|
53
|
+
* <DialogContent>
|
|
54
|
+
* <Input />
|
|
55
|
+
* <Select />
|
|
56
|
+
* </DialogContent>
|
|
57
|
+
* </Dialog>
|
|
58
|
+
* ```
|
|
59
|
+
|
|
60
|
+
* @param {React.ComponentProps<typeof DialogPrimitive.Root>} props
|
|
61
|
+
*/
|
|
62
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
67
|
+
showCloseButton?: boolean;
|
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
declare function DialogIcon({ className, icon, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
/**
|
|
75
|
+
* **アンチパターン / Anti-patterns**
|
|
76
|
+
*
|
|
77
|
+
* - `DialogCancel` の children に `<Button>` を渡さないでください。内部で Button を描画します。
|
|
78
|
+
* en: Do not pass `<Button>` as children. DialogCancel renders a Button internally.
|
|
79
|
+
*
|
|
80
|
+
* ```tsx
|
|
81
|
+
* // ✅ Correct
|
|
82
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
83
|
+
*
|
|
84
|
+
* // ❌ Wrong - 二重ラップ
|
|
85
|
+
* <DialogCancel><Button>キャンセル</Button></DialogCancel>
|
|
86
|
+
* ```
|
|
87
|
+
|
|
88
|
+
*/
|
|
89
|
+
declare function DialogCancel({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
/**
|
|
91
|
+
* **アンチパターン / Anti-patterns**
|
|
92
|
+
*
|
|
93
|
+
* - `DialogAction` の children に `<Button>` を渡さないでください。内部で Button を描画します。
|
|
94
|
+
* en: Do not pass `<Button>` as children. DialogAction renders a Button internally.
|
|
95
|
+
*
|
|
96
|
+
* ```tsx
|
|
97
|
+
* // ✅ Correct
|
|
98
|
+
* <DialogAction>確定</DialogAction>
|
|
99
|
+
*
|
|
100
|
+
* // ❌ Wrong - 二重ラップ
|
|
101
|
+
* <DialogAction><Button>確定</Button></DialogAction>
|
|
102
|
+
* ```
|
|
103
|
+
|
|
104
|
+
*/
|
|
105
|
+
declare function DialogAction({ className, children, theme, variant, ...props }: React.ComponentProps<typeof DialogPrimitive.Action> & ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogIcon, DialogTitle, DialogTrigger, DialogCancel, DialogAction, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import figma from "@figma/code-connect";
|
|
3
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogCancel, DialogAction, } 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(Dialog, "https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=14857-825", {
|
|
11
|
+
props: {
|
|
12
|
+
variant: figma.enum("status", {
|
|
13
|
+
neutral: "neutral",
|
|
14
|
+
warning: "warning",
|
|
15
|
+
negative: "negative",
|
|
16
|
+
}),
|
|
17
|
+
title: figma.string("title"),
|
|
18
|
+
description: figma.string("description"),
|
|
19
|
+
},
|
|
20
|
+
example: props => (_jsx(Dialog, { children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: props.title }), _jsx(DialogDescription, { children: props.description })] }), _jsxs(DialogFooter, { children: [_jsx(DialogCancel, { children: "\u30AD\u30E3\u30F3\u30BB\u30EB" }), _jsx(DialogAction, { children: "\u4FDD\u5B58" })] })] }) })),
|
|
21
|
+
});
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Goodpatch Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
7
|
+
var t = {};
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
9
|
+
t[p] = s[p];
|
|
10
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
11
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
13
|
+
t[p[i]] = s[p[i]];
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { AlertDialog as DialogPrimitive } from "radix-ui";
|
|
19
|
+
import { cn } from "../../../lib/utils.js";
|
|
20
|
+
import { Button } from "../../../components/ui/button/index.js";
|
|
21
|
+
import { Icon } from "../icon/index.js";
|
|
22
|
+
/**
|
|
23
|
+
* **概要 / Overview**
|
|
24
|
+
*
|
|
25
|
+
* - ダイアログはユーザーにアクションの実行や中断を確認するために使用するコンポーネントです。
|
|
26
|
+
* - en: The Dialog component is used to confirm the execution or interruption of actions with users.
|
|
27
|
+
* - フォーム入力や詳細表示には使わず、削除確認や再試行確認などのアクション確認に使います。
|
|
28
|
+
* - en: Do not use Dialog for forms or detail views. Use it for action confirmations such as delete and retry flows.
|
|
29
|
+
*
|
|
30
|
+
* **使用例 / Usage Example**
|
|
31
|
+
*
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Dialog>
|
|
34
|
+
* <DialogTrigger>ダイアログを開く</DialogTrigger>
|
|
35
|
+
* <DialogContent>
|
|
36
|
+
* <DialogHeader>
|
|
37
|
+
* <DialogTitle>確認</DialogTitle>
|
|
38
|
+
* <DialogDescription>本当に削除しますか?</DialogDescription>
|
|
39
|
+
* </DialogHeader>
|
|
40
|
+
* <DialogFooter>
|
|
41
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
42
|
+
* <DialogAction>削除</DialogAction>
|
|
43
|
+
* </DialogFooter>
|
|
44
|
+
* </DialogContent>
|
|
45
|
+
* </Dialog>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **アンチパターン / Anti-patterns**
|
|
49
|
+
*
|
|
50
|
+
* - フォーム入力や詳細表示には使わず、削除確認や再試行確認などのアクション確認に使ってください。
|
|
51
|
+
* en: Do not use Dialog for forms or detail views. Use it for action confirmations such as delete and retry flows.
|
|
52
|
+
*
|
|
53
|
+
* ```tsx
|
|
54
|
+
* // ✅ Correct
|
|
55
|
+
* <Dialog>
|
|
56
|
+
* <DialogContent>
|
|
57
|
+
* <DialogHeader>
|
|
58
|
+
* <DialogTitle>削除確認</DialogTitle>
|
|
59
|
+
* <DialogDescription>本当に削除しますか?</DialogDescription>
|
|
60
|
+
* </DialogHeader>
|
|
61
|
+
* <DialogFooter>
|
|
62
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
63
|
+
* <DialogAction>削除</DialogAction>
|
|
64
|
+
* </DialogFooter>
|
|
65
|
+
* </DialogContent>
|
|
66
|
+
* </Dialog>
|
|
67
|
+
*
|
|
68
|
+
* // ❌ Wrong - フォーム入力に Dialog を使わない
|
|
69
|
+
* <Dialog>
|
|
70
|
+
* <DialogContent>
|
|
71
|
+
* <Input />
|
|
72
|
+
* <Select />
|
|
73
|
+
* </DialogContent>
|
|
74
|
+
* </Dialog>
|
|
75
|
+
* ```
|
|
76
|
+
|
|
77
|
+
* @param {React.ComponentProps<typeof DialogPrimitive.Root>} props
|
|
78
|
+
*/
|
|
79
|
+
function Dialog(_a) {
|
|
80
|
+
var props = __rest(_a, []);
|
|
81
|
+
return _jsx(DialogPrimitive.Root, Object.assign({ "data-slot": "dialog" }, props));
|
|
82
|
+
}
|
|
83
|
+
function DialogTrigger(_a) {
|
|
84
|
+
var props = __rest(_a, []);
|
|
85
|
+
return _jsx(DialogPrimitive.Trigger, Object.assign({ "data-slot": "dialog-trigger" }, props));
|
|
86
|
+
}
|
|
87
|
+
function DialogPortal(_a) {
|
|
88
|
+
var props = __rest(_a, []);
|
|
89
|
+
return _jsx(DialogPrimitive.Portal, Object.assign({ "data-slot": "dialog-portal" }, props));
|
|
90
|
+
}
|
|
91
|
+
function DialogOverlay(_a) {
|
|
92
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
93
|
+
return (_jsx(DialogPrimitive.Overlay, Object.assign({ "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
|
|
94
|
+
}
|
|
95
|
+
function DialogContent(_a) {
|
|
96
|
+
var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
97
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Content, Object.assign({ "data-slot": "dialog-content", className: cn("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-popout duration-200 sm:max-w-lg", className) }, props, { children: children }))] }));
|
|
98
|
+
}
|
|
99
|
+
function DialogHeader(_a) {
|
|
100
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
101
|
+
return (_jsx("div", Object.assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-3 text-center sm:text-left", className) }, props)));
|
|
102
|
+
}
|
|
103
|
+
function DialogFooter(_a) {
|
|
104
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
105
|
+
return (_jsx("div", Object.assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
106
|
+
}
|
|
107
|
+
function DialogIcon(_a) {
|
|
108
|
+
var { className, icon } = _a, props = __rest(_a, ["className", "icon"]);
|
|
109
|
+
return _jsx(Icon, Object.assign({ icon: icon, className: className, size: 7 }, props));
|
|
110
|
+
}
|
|
111
|
+
function DialogTitle(_a) {
|
|
112
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
113
|
+
return (_jsx(DialogPrimitive.Title, Object.assign({ "data-slot": "dialog-title", className: cn("text-text-high leading-none character-4-bold-pro flex gap-2 items-center justify-start", className) }, props)));
|
|
114
|
+
}
|
|
115
|
+
function DialogDescription(_a) {
|
|
116
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
117
|
+
return (_jsx(DialogPrimitive.Description, Object.assign({ "data-slot": "dialog-description", className: cn("text-text-high character-2-regular-pro", className) }, props)));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* **アンチパターン / Anti-patterns**
|
|
121
|
+
*
|
|
122
|
+
* - `DialogCancel` の children に `<Button>` を渡さないでください。内部で Button を描画します。
|
|
123
|
+
* en: Do not pass `<Button>` as children. DialogCancel renders a Button internally.
|
|
124
|
+
*
|
|
125
|
+
* ```tsx
|
|
126
|
+
* // ✅ Correct
|
|
127
|
+
* <DialogCancel>キャンセル</DialogCancel>
|
|
128
|
+
*
|
|
129
|
+
* // ❌ Wrong - 二重ラップ
|
|
130
|
+
* <DialogCancel><Button>キャンセル</Button></DialogCancel>
|
|
131
|
+
* ```
|
|
132
|
+
|
|
133
|
+
*/
|
|
134
|
+
function DialogCancel(_a) {
|
|
135
|
+
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
136
|
+
return (_jsx(DialogPrimitive.Cancel, Object.assign({ "data-slot": "dialog-cancel", asChild: true }, props, { children: _jsx(Button, { variant: "ghost", theme: "neutral", size: "sm", className: className, children: children }) })));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* **アンチパターン / Anti-patterns**
|
|
140
|
+
*
|
|
141
|
+
* - `DialogAction` の children に `<Button>` を渡さないでください。内部で Button を描画します。
|
|
142
|
+
* en: Do not pass `<Button>` as children. DialogAction renders a Button internally.
|
|
143
|
+
*
|
|
144
|
+
* ```tsx
|
|
145
|
+
* // ✅ Correct
|
|
146
|
+
* <DialogAction>確定</DialogAction>
|
|
147
|
+
*
|
|
148
|
+
* // ❌ Wrong - 二重ラップ
|
|
149
|
+
* <DialogAction><Button>確定</Button></DialogAction>
|
|
150
|
+
* ```
|
|
151
|
+
|
|
152
|
+
*/
|
|
153
|
+
function DialogAction(_a) {
|
|
154
|
+
var { className, children, theme = "primary", variant = "solid" } = _a, props = __rest(_a, ["className", "children", "theme", "variant"]);
|
|
155
|
+
return (_jsx(DialogPrimitive.Action, Object.assign({ "data-slot": "dialog-action", asChild: true }, props, { children: _jsx(Button, { variant: variant, theme: theme, size: "sm", className: className, children: children }) })));
|
|
156
|
+
}
|
|
157
|
+
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogIcon, DialogTitle, DialogTrigger, DialogCancel, DialogAction, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Goodpatch Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { type VariantProps } from "class-variance-authority";
|
|
7
|
+
declare const dividerVariants: (props?: ({
|
|
8
|
+
emphasis?: "low" | "middle" | "high" | null | undefined;
|
|
9
|
+
lineStyle?: "solid" | "dashed" | null | undefined;
|
|
10
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {
|
|
13
|
+
/**
|
|
14
|
+
* ディバイダーの強調度(low、middle、high)
|
|
15
|
+
* en: Emphasis level of the divider (low, middle, high)
|
|
16
|
+
*/
|
|
17
|
+
emphasis?: "low" | "middle" | "high";
|
|
18
|
+
/**
|
|
19
|
+
* 線のスタイル(solid、dashed)
|
|
20
|
+
* en: Line style (solid, dashed)
|
|
21
|
+
*/
|
|
22
|
+
lineStyle?: "solid" | "dashed";
|
|
23
|
+
/**
|
|
24
|
+
* ディバイダーの方向(horizontal、vertical)
|
|
25
|
+
* en: Direction of the divider (horizontal, vertical)
|
|
26
|
+
*/
|
|
27
|
+
direction?: "horizontal" | "vertical";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* **概要 / Overview**
|
|
31
|
+
*
|
|
32
|
+
* - ディバイダーコンポーネントはグループ内のコンテンツを視覚的に区切ってユーザーに提示する際に使用します。
|
|
33
|
+
* - en: The Divider component is used to visually separate content within groups for users.
|
|
34
|
+
*
|
|
35
|
+
* **使用例 / Usage Example**
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Divider emphasis="middle" lineStyle="solid" direction="horizontal" />
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param {DividerProps} props
|
|
42
|
+
*/
|
|
43
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export { Divider, dividerVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import figma from "@figma/code-connect";
|
|
3
|
+
import { Divider } 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(Divider, "https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=817-5328&t=lCPcHH1Zd0uroqLb-4", {
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* ディバイダーの強調度
|
|
14
|
+
* en: Emphasis level of the divider
|
|
15
|
+
*/
|
|
16
|
+
emphasis: figma.enum("emphasis", {
|
|
17
|
+
low: "low",
|
|
18
|
+
middle: "middle",
|
|
19
|
+
high: "high",
|
|
20
|
+
}),
|
|
21
|
+
/**
|
|
22
|
+
* 線のスタイル
|
|
23
|
+
* en: Line style
|
|
24
|
+
*/
|
|
25
|
+
lineStyle: figma.enum("style", {
|
|
26
|
+
solid: "solid",
|
|
27
|
+
dashed: "dashed",
|
|
28
|
+
}),
|
|
29
|
+
/**
|
|
30
|
+
* ディバイダーの方向
|
|
31
|
+
* en: Direction of the divider
|
|
32
|
+
*/
|
|
33
|
+
direction: figma.enum("direction", {
|
|
34
|
+
horizontal: "horizontal",
|
|
35
|
+
vertical: "vertical",
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
example: props => (_jsx(Divider, { emphasis: props.emphasis, lineStyle: props.lineStyle, direction: props.direction })),
|
|
39
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
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 { cva } from "class-variance-authority";
|
|
19
|
+
import { cn } from "../../../lib/utils.js";
|
|
20
|
+
// Dividerのスタイル定義
|
|
21
|
+
const dividerVariants = cva("shrink-0", {
|
|
22
|
+
variants: {
|
|
23
|
+
emphasis: {
|
|
24
|
+
low: "border-base-100 bg-base-100",
|
|
25
|
+
middle: "border-base-200 bg-base-200",
|
|
26
|
+
high: "border-base-300 bg-base-300",
|
|
27
|
+
},
|
|
28
|
+
lineStyle: {
|
|
29
|
+
solid: "",
|
|
30
|
+
dashed: "border-dashed",
|
|
31
|
+
},
|
|
32
|
+
direction: {
|
|
33
|
+
horizontal: "w-full h-px",
|
|
34
|
+
vertical: "h-full w-px",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
compoundVariants: [
|
|
38
|
+
// 水平方向の破線
|
|
39
|
+
{
|
|
40
|
+
direction: "horizontal",
|
|
41
|
+
lineStyle: "dashed",
|
|
42
|
+
className: "bg-transparent border-t",
|
|
43
|
+
},
|
|
44
|
+
// 垂直方向の破線
|
|
45
|
+
{
|
|
46
|
+
direction: "vertical",
|
|
47
|
+
lineStyle: "dashed",
|
|
48
|
+
className: "bg-transparent border-l",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
emphasis: "middle",
|
|
53
|
+
lineStyle: "solid",
|
|
54
|
+
direction: "horizontal",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* **概要 / Overview**
|
|
59
|
+
*
|
|
60
|
+
* - ディバイダーコンポーネントはグループ内のコンテンツを視覚的に区切ってユーザーに提示する際に使用します。
|
|
61
|
+
* - en: The Divider component is used to visually separate content within groups for users.
|
|
62
|
+
*
|
|
63
|
+
* **使用例 / Usage Example**
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Divider emphasis="middle" lineStyle="solid" direction="horizontal" />
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param {DividerProps} props
|
|
70
|
+
*/
|
|
71
|
+
const Divider = React.forwardRef((_a, ref) => {
|
|
72
|
+
var { className, emphasis, lineStyle, direction } = _a, props = __rest(_a, ["className", "emphasis", "lineStyle", "direction"]);
|
|
73
|
+
return (_jsx("div", Object.assign({ ref: ref, className: cn(dividerVariants({
|
|
74
|
+
emphasis,
|
|
75
|
+
lineStyle,
|
|
76
|
+
direction,
|
|
77
|
+
className,
|
|
78
|
+
})) }, props)));
|
|
79
|
+
});
|
|
80
|
+
Divider.displayName = "Divider";
|
|
81
|
+
export { Divider, dividerVariants };
|