kaze-design-system 0.4.2 → 0.6.1
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/README.md +95 -32
- package/components.css +73 -34
- package/dist/components/Alert/Alert.js +7 -16
- package/dist/components/Badge/Badge.js +1 -6
- package/dist/components/BarChart/BarChart.js +19 -15
- package/dist/components/BarList/BarList.js +2 -16
- package/dist/components/Card/Card.js +5 -3
- package/dist/components/Checkbox/Checkbox.js +1 -10
- package/dist/components/CommandPalette/CommandPalette.js +3 -9
- package/dist/components/DescriptionList/DescriptionList.js +11 -14
- package/dist/components/Dialog/Dialog.js +1 -10
- package/dist/components/Disclosure/Disclosure.js +18 -7
- package/dist/components/DonutChart/DonutChart.js +54 -50
- package/dist/components/Dropdown/Dropdown.js +2 -16
- package/dist/components/FAQ/FAQ.js +36 -46
- package/dist/components/FeatureGrid/FeatureGrid.js +1 -5
- package/dist/components/FilterPill/FilterPill.js +1 -5
- package/dist/components/FormField/FormField.js +2 -15
- package/dist/components/Grid/Grid.js +1 -9
- package/dist/components/HelpButton/HelpButton.js +1 -9
- package/dist/components/LPFooter/LPFooter.js +1 -10
- package/dist/components/List/List.js +2 -15
- package/dist/components/Logo/Logo.js +1 -10
- package/dist/components/Meter/Meter.js +1 -4
- package/dist/components/Metric/Metric.js +2 -17
- package/dist/components/Navbar/Navbar.js +2 -10
- package/dist/components/NumberField/NumberField.js +30 -7
- package/dist/components/Pagination/Pagination.js +37 -46
- package/dist/components/Pricing/Pricing.js +2 -17
- package/dist/components/Progress/Progress.js +3 -18
- package/dist/components/Radio/Radio.js +2 -14
- package/dist/components/Search/Search.js +10 -1
- package/dist/components/Section/Section.js +4 -12
- package/dist/components/Sidebar/Sidebar.js +7 -31
- package/dist/components/SplitSection/SplitSection.js +1 -5
- package/dist/components/StatusBadge/StatusBadge.js +1 -11
- package/dist/components/Stepper/Stepper.js +29 -27
- package/dist/components/Table/Table.js +5 -3
- package/dist/components/Tabs/Tabs.js +29 -36
- package/dist/components/Testimonial/Testimonial.js +19 -23
- package/dist/components/Text/Text.js +1 -11
- package/dist/components/Toast/Toast.js +103 -97
- package/dist/components/Tooltip/Tooltip.js +89 -92
- package/dist/components/TopBar/TopBar.js +4 -12
- package/dist/hooks/useLegendToggle.js +1 -4
- package/dist/hooks/useTheme.js +1 -4
- package/dist/marketing.js +33 -0
- package/dist/tokens.js +12 -0
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -3
- package/dist/types/components/Grid/Grid.d.ts +4 -4
- package/dist/types/components/Hero/Hero.d.ts +2 -2
- package/dist/types/components/Icon/Icon.d.ts +10 -5
- package/dist/types/components/Icon/index.d.ts +1 -1
- package/dist/types/components/NumberField/NumberField.d.ts +1 -1
- package/dist/types/components/Sidebar/index.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/types/components/Toast/Toast.d.ts +2 -2
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/marketing.d.ts +22 -0
- package/dist/types/hooks/useTheme.d.ts +1 -1
- package/dist/types/lib/utils.d.ts +1 -1
- package/dist/types/tokens/tokens.d.ts +13 -0
- package/package.json +23 -10
- package/tokens.css +72 -2
- package/utilities.css +5 -0
|
@@ -32,104 +32,110 @@ function ToastItem(props) {
|
|
|
32
32
|
};
|
|
33
33
|
}, [data.duration, dismiss]);
|
|
34
34
|
const variantClass = data.variant && data.variant !== "default" ? `toast--${data.variant}` : void 0;
|
|
35
|
-
return /* @__PURE__ */ jsxs(
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("toast", variantClass), role: "status", "data-removing": removing || void 0, children: [
|
|
36
|
+
data.variant && data.variant !== "default" && /* @__PURE__ */ jsxs("span", { className: "toast__icon", "aria-hidden": "true", children: [
|
|
37
|
+
data.variant === "positive" && /* @__PURE__ */ jsx(
|
|
38
|
+
"svg",
|
|
39
|
+
{
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: "16",
|
|
42
|
+
height: "16",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "none",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
strokeWidth: "2",
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round",
|
|
49
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
data.variant === "negative" && /* @__PURE__ */ jsxs(
|
|
53
|
+
"svg",
|
|
54
|
+
{
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
width: "16",
|
|
57
|
+
height: "16",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
fill: "none",
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
strokeWidth: "2",
|
|
62
|
+
strokeLinecap: "round",
|
|
63
|
+
strokeLinejoin: "round",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
66
|
+
/* @__PURE__ */ jsx("path", { d: "m15 9-6 6" }),
|
|
67
|
+
/* @__PURE__ */ jsx("path", { d: "m9 9 6 6" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
data.variant === "warning" && /* @__PURE__ */ jsxs(
|
|
72
|
+
"svg",
|
|
73
|
+
{
|
|
74
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75
|
+
width: "16",
|
|
76
|
+
height: "16",
|
|
77
|
+
viewBox: "0 0 24 24",
|
|
78
|
+
fill: "none",
|
|
79
|
+
stroke: "currentColor",
|
|
80
|
+
strokeWidth: "2",
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
85
|
+
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
86
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
data.variant === "info" && /* @__PURE__ */ jsxs(
|
|
91
|
+
"svg",
|
|
92
|
+
{
|
|
93
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
+
width: "16",
|
|
95
|
+
height: "16",
|
|
96
|
+
viewBox: "0 0 24 24",
|
|
97
|
+
fill: "none",
|
|
98
|
+
stroke: "currentColor",
|
|
99
|
+
strokeWidth: "2",
|
|
100
|
+
strokeLinecap: "round",
|
|
101
|
+
strokeLinejoin: "round",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
104
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16v-4" }),
|
|
105
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ jsxs("div", { className: "toast__content", children: [
|
|
111
|
+
/* @__PURE__ */ jsx("div", { className: "toast__title", children: data.title }),
|
|
112
|
+
data.description && /* @__PURE__ */ jsx("div", { className: "toast__description", children: data.description })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "toast__close", onClick: dismiss, "aria-label": closeLabel, children: /* @__PURE__ */ jsxs(
|
|
115
|
+
"svg",
|
|
116
|
+
{
|
|
117
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
118
|
+
width: "14",
|
|
119
|
+
height: "14",
|
|
120
|
+
viewBox: "0 0 24 24",
|
|
121
|
+
fill: "none",
|
|
122
|
+
stroke: "currentColor",
|
|
123
|
+
strokeWidth: "2",
|
|
124
|
+
strokeLinecap: "round",
|
|
125
|
+
strokeLinejoin: "round",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
128
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
) })
|
|
132
|
+
] });
|
|
131
133
|
}
|
|
132
|
-
function ToastProvider({
|
|
134
|
+
function ToastProvider({
|
|
135
|
+
children,
|
|
136
|
+
closeLabel = "閉じる",
|
|
137
|
+
containerLabel = "通知"
|
|
138
|
+
}) {
|
|
133
139
|
const [toasts, setToasts] = useState([]);
|
|
134
140
|
const counterRef = useRef(0);
|
|
135
141
|
const toast = useCallback((options) => {
|
|
@@ -29,102 +29,99 @@ function getPosition(triggerRect, tooltipRect, side) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const Tooltip = forwardRef(
|
|
33
|
-
content,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
setVisible(true);
|
|
61
|
-
}, delay);
|
|
62
|
-
}, [delay]);
|
|
63
|
-
const hide = useCallback(() => {
|
|
64
|
-
if (timerRef.current) {
|
|
65
|
-
clearTimeout(timerRef.current);
|
|
66
|
-
timerRef.current = null;
|
|
67
|
-
}
|
|
68
|
-
setVisible(false);
|
|
69
|
-
}, []);
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
return () => {
|
|
32
|
+
const Tooltip = forwardRef(
|
|
33
|
+
({ content, children, side = "top", delay = 200 }, ref) => {
|
|
34
|
+
const [visible, setVisible] = useState(false);
|
|
35
|
+
const [position, setPosition] = useState({
|
|
36
|
+
top: 0,
|
|
37
|
+
left: 0
|
|
38
|
+
});
|
|
39
|
+
const triggerRef = useRef(null);
|
|
40
|
+
const tooltipRef = useRef(null);
|
|
41
|
+
const timerRef = useRef(null);
|
|
42
|
+
const tooltipId = useId();
|
|
43
|
+
const updatePosition = useCallback(() => {
|
|
44
|
+
if (!triggerRef.current || !tooltipRef.current) return;
|
|
45
|
+
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
46
|
+
const tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
47
|
+
setPosition(getPosition(triggerRect, tooltipRect, side));
|
|
48
|
+
}, [side]);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (visible) {
|
|
51
|
+
requestAnimationFrame(updatePosition);
|
|
52
|
+
}
|
|
53
|
+
}, [visible, updatePosition]);
|
|
54
|
+
const show = useCallback(() => {
|
|
55
|
+
timerRef.current = setTimeout(() => {
|
|
56
|
+
setVisible(true);
|
|
57
|
+
}, delay);
|
|
58
|
+
}, [delay]);
|
|
59
|
+
const hide = useCallback(() => {
|
|
72
60
|
if (timerRef.current) {
|
|
73
61
|
clearTimeout(timerRef.current);
|
|
62
|
+
timerRef.current = null;
|
|
74
63
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const childRef = children.ref;
|
|
82
|
-
if (typeof childRef === "function") {
|
|
83
|
-
childRef(node);
|
|
84
|
-
} else if (childRef && typeof childRef === "object" && "current" in childRef) {
|
|
85
|
-
childRef.current = node;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
onMouseEnter: (e) => {
|
|
89
|
-
show();
|
|
90
|
-
childProps.onMouseEnter?.(e);
|
|
91
|
-
},
|
|
92
|
-
onMouseLeave: (e) => {
|
|
93
|
-
hide();
|
|
94
|
-
childProps.onMouseLeave?.(e);
|
|
95
|
-
},
|
|
96
|
-
onFocus: (e) => {
|
|
97
|
-
show();
|
|
98
|
-
childProps.onFocus?.(e);
|
|
99
|
-
},
|
|
100
|
-
onBlur: (e) => {
|
|
101
|
-
hide();
|
|
102
|
-
childProps.onBlur?.(e);
|
|
103
|
-
},
|
|
104
|
-
"aria-describedby": visible ? tooltipId : void 0
|
|
105
|
-
});
|
|
106
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
-
trigger,
|
|
108
|
-
visible && typeof document !== "undefined" && createPortal(
|
|
109
|
-
/* @__PURE__ */ jsx(
|
|
110
|
-
"div",
|
|
111
|
-
{
|
|
112
|
-
ref: (node) => {
|
|
113
|
-
tooltipRef.current = node;
|
|
114
|
-
if (typeof ref === "function") ref(node);
|
|
115
|
-
else if (ref) ref.current = node;
|
|
116
|
-
},
|
|
117
|
-
id: tooltipId,
|
|
118
|
-
role: "tooltip",
|
|
119
|
-
className: "tooltip",
|
|
120
|
-
style: { top: position.top, left: position.left },
|
|
121
|
-
children: content
|
|
64
|
+
setVisible(false);
|
|
65
|
+
}, []);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
return () => {
|
|
68
|
+
if (timerRef.current) {
|
|
69
|
+
clearTimeout(timerRef.current);
|
|
122
70
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
71
|
+
};
|
|
72
|
+
}, []);
|
|
73
|
+
const childProps = children.props;
|
|
74
|
+
const trigger = cloneElement(children, {
|
|
75
|
+
ref: (node) => {
|
|
76
|
+
triggerRef.current = node;
|
|
77
|
+
const childRef = children.ref;
|
|
78
|
+
if (typeof childRef === "function") {
|
|
79
|
+
childRef(node);
|
|
80
|
+
} else if (childRef && typeof childRef === "object" && "current" in childRef) {
|
|
81
|
+
childRef.current = node;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
onMouseEnter: (e) => {
|
|
85
|
+
show();
|
|
86
|
+
childProps.onMouseEnter?.(e);
|
|
87
|
+
},
|
|
88
|
+
onMouseLeave: (e) => {
|
|
89
|
+
hide();
|
|
90
|
+
childProps.onMouseLeave?.(e);
|
|
91
|
+
},
|
|
92
|
+
onFocus: (e) => {
|
|
93
|
+
show();
|
|
94
|
+
childProps.onFocus?.(e);
|
|
95
|
+
},
|
|
96
|
+
onBlur: (e) => {
|
|
97
|
+
hide();
|
|
98
|
+
childProps.onBlur?.(e);
|
|
99
|
+
},
|
|
100
|
+
"aria-describedby": visible ? tooltipId : void 0
|
|
101
|
+
});
|
|
102
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
|
+
trigger,
|
|
104
|
+
visible && typeof document !== "undefined" && createPortal(
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
ref: (node) => {
|
|
109
|
+
tooltipRef.current = node;
|
|
110
|
+
if (typeof ref === "function") ref(node);
|
|
111
|
+
else if (ref) ref.current = node;
|
|
112
|
+
},
|
|
113
|
+
id: tooltipId,
|
|
114
|
+
role: "tooltip",
|
|
115
|
+
className: "tooltip",
|
|
116
|
+
style: { top: position.top, left: position.left },
|
|
117
|
+
children: content
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
document.body
|
|
121
|
+
)
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
);
|
|
128
125
|
Tooltip.displayName = "Tooltip";
|
|
129
126
|
export {
|
|
130
127
|
Tooltip
|
|
@@ -3,18 +3,10 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
4
|
const TopBar = forwardRef(
|
|
5
5
|
({ children, actions, className, ...rest }, ref) => {
|
|
6
|
-
return /* @__PURE__ */ jsxs(
|
|
7
|
-
"
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
className: cn("top-bar", className),
|
|
11
|
-
...rest,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx("div", { children }),
|
|
14
|
-
actions && /* @__PURE__ */ jsx("div", { className: "top-bar__actions", children: actions })
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
);
|
|
6
|
+
return /* @__PURE__ */ jsxs("header", { ref, className: cn("top-bar", className), ...rest, children: [
|
|
7
|
+
/* @__PURE__ */ jsx("div", { children }),
|
|
8
|
+
actions && /* @__PURE__ */ jsx("div", { className: "top-bar__actions", children: actions })
|
|
9
|
+
] });
|
|
18
10
|
}
|
|
19
11
|
);
|
|
20
12
|
TopBar.displayName = "TopBar";
|
|
@@ -11,10 +11,7 @@ function useLegendToggle() {
|
|
|
11
11
|
return next;
|
|
12
12
|
});
|
|
13
13
|
}, []);
|
|
14
|
-
const isHidden = useCallback(
|
|
15
|
-
(dataKey) => hiddenSeries.has(dataKey),
|
|
16
|
-
[hiddenSeries]
|
|
17
|
-
);
|
|
14
|
+
const isHidden = useCallback((dataKey) => hiddenSeries.has(dataKey), [hiddenSeries]);
|
|
18
15
|
const reset = useCallback(() => setHiddenSeries(/* @__PURE__ */ new Set()), []);
|
|
19
16
|
const legendProps = useMemo(
|
|
20
17
|
() => ({
|
package/dist/hooks/useTheme.js
CHANGED
|
@@ -34,10 +34,7 @@ function applyPalette(palette) {
|
|
|
34
34
|
document.documentElement.removeAttribute("data-palette");
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function ThemeProvider({
|
|
38
|
-
children,
|
|
39
|
-
defaultTheme
|
|
40
|
-
}) {
|
|
37
|
+
function ThemeProvider({ children, defaultTheme }) {
|
|
41
38
|
const [theme, setThemeState] = useState(defaultTheme ?? "light");
|
|
42
39
|
const [palette, setPaletteState] = useState("warm");
|
|
43
40
|
const [resolvedTheme, setResolvedTheme] = useState(
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CTABanner } from "./components/CTABanner/CTABanner.js";
|
|
3
|
+
import { FAQ, FAQItem } from "./components/FAQ/FAQ.js";
|
|
4
|
+
import { FeatureCard, FeatureGrid } from "./components/FeatureGrid/FeatureGrid.js";
|
|
5
|
+
import { Hero } from "./components/Hero/Hero.js";
|
|
6
|
+
import { LPFooter } from "./components/LPFooter/LPFooter.js";
|
|
7
|
+
import { Navbar, NavbarLink, NavbarLinks } from "./components/Navbar/Navbar.js";
|
|
8
|
+
import { PricingCard, PricingGrid } from "./components/Pricing/Pricing.js";
|
|
9
|
+
import { Section, SectionHeader } from "./components/Section/Section.js";
|
|
10
|
+
import { SplitSection } from "./components/SplitSection/SplitSection.js";
|
|
11
|
+
import { StatItem, Stats } from "./components/Stats/Stats.js";
|
|
12
|
+
import { TestimonialCard, TestimonialGrid } from "./components/Testimonial/Testimonial.js";
|
|
13
|
+
export {
|
|
14
|
+
CTABanner,
|
|
15
|
+
FAQ,
|
|
16
|
+
FAQItem,
|
|
17
|
+
FeatureCard,
|
|
18
|
+
FeatureGrid,
|
|
19
|
+
Hero,
|
|
20
|
+
LPFooter,
|
|
21
|
+
Navbar,
|
|
22
|
+
NavbarLink,
|
|
23
|
+
NavbarLinks,
|
|
24
|
+
PricingCard,
|
|
25
|
+
PricingGrid,
|
|
26
|
+
Section,
|
|
27
|
+
SectionHeader,
|
|
28
|
+
SplitSection,
|
|
29
|
+
StatItem,
|
|
30
|
+
Stats,
|
|
31
|
+
TestimonialCard,
|
|
32
|
+
TestimonialGrid
|
|
33
|
+
};
|
package/dist/tokens.js
CHANGED
|
@@ -78,9 +78,21 @@ const radius = {
|
|
|
78
78
|
"2xl": "var(--radius-2xl)",
|
|
79
79
|
full: "var(--radius-full)"
|
|
80
80
|
};
|
|
81
|
+
const density = {
|
|
82
|
+
controlHeight: "var(--density-control-height)",
|
|
83
|
+
rowPy: "var(--density-row-py)",
|
|
84
|
+
rowPx: "var(--density-row-px)",
|
|
85
|
+
fontSizeUi: "var(--density-font-size-ui)",
|
|
86
|
+
lineHeightUi: "var(--density-line-height-ui)",
|
|
87
|
+
navPy: "var(--density-nav-py)",
|
|
88
|
+
navGap: "var(--density-nav-gap)",
|
|
89
|
+
dropdownPy: "var(--density-dropdown-py)",
|
|
90
|
+
tabPy: "var(--density-tab-py)"
|
|
91
|
+
};
|
|
81
92
|
export {
|
|
82
93
|
chart,
|
|
83
94
|
color,
|
|
95
|
+
density,
|
|
84
96
|
radius,
|
|
85
97
|
space
|
|
86
98
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, type HTMLAttributes } from "react";
|
|
2
|
-
export type AlertVariant = "
|
|
2
|
+
export type AlertVariant = "default" | "positive" | "negative" | "warning" | "info";
|
|
3
3
|
export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
variant?: AlertVariant;
|
|
5
5
|
icon?: ReactNode;
|
|
@@ -3,7 +3,7 @@ export type BadgeVariant = "default" | "positive" | "negative" | "warning" | "in
|
|
|
3
3
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
4
|
variant?: BadgeVariant;
|
|
5
5
|
dot?: boolean;
|
|
6
|
-
/** Solid (inverted) style
|
|
6
|
+
/** Solid (inverted) style: filled background with white text */
|
|
7
7
|
solid?: boolean;
|
|
8
8
|
/** When true, adds role="status" for live-region announcements */
|
|
9
9
|
live?: boolean;
|
|
@@ -2,7 +2,7 @@ import { type HTMLAttributes, type RefObject } from "react";
|
|
|
2
2
|
export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
/** @deprecated useFocusTrap handles focus restoration automatically. Kept for backward compat
|
|
5
|
+
/** @deprecated useFocusTrap handles focus restoration automatically. Kept for backward compat: ignored. */
|
|
6
6
|
returnFocusRef?: RefObject<HTMLElement | null>;
|
|
7
7
|
}
|
|
8
8
|
export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -15,10 +15,9 @@ export interface DropdownItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
}
|
|
18
|
+
export type DropdownSeparatorProps = Record<string, never>;
|
|
20
19
|
export declare const Dropdown: import("react").ForwardRefExoticComponent<DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
20
|
export declare const DropdownTrigger: import("react").ForwardRefExoticComponent<DropdownTriggerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
22
21
|
export declare const DropdownMenu: import("react").ForwardRefExoticComponent<DropdownMenuProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
22
|
export declare const DropdownItem: import("react").ForwardRefExoticComponent<DropdownItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
-
export declare const DropdownSeparator: import("react").ForwardRefExoticComponent<DropdownSeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export declare const DropdownSeparator: import("react").ForwardRefExoticComponent<Omit<DropdownSeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
|
-
import { space } from "
|
|
2
|
+
import { space } from "../../tokens/tokens";
|
|
3
3
|
export type GridColumns = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
4
|
type SpaceToken = keyof typeof space;
|
|
5
5
|
export type GridGap = "xs" | "sm" | "md" | "lg" | "xl" | SpaceToken | number | (string & {});
|
|
@@ -10,11 +10,11 @@ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
columnsMd?: GridColumns;
|
|
11
11
|
/** Column count at ≤640px */
|
|
12
12
|
columnsSm?: GridColumns;
|
|
13
|
-
/** Gap between items
|
|
13
|
+
/** Gap between items: semantic token ("sm", "md", etc.), space token (e.g. 4), or any CSS value */
|
|
14
14
|
gap?: GridGap;
|
|
15
|
-
/** Gap at ≤1024px
|
|
15
|
+
/** Gap at ≤1024px: falls back to gap */
|
|
16
16
|
gapMd?: GridGap;
|
|
17
|
-
/** Gap at ≤640px
|
|
17
|
+
/** Gap at ≤640px: falls back to gapMd, then gap */
|
|
18
18
|
gapSm?: GridGap;
|
|
19
19
|
}
|
|
20
20
|
export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,9 +3,9 @@ export interface HeroProps extends HTMLAttributes<HTMLElement> {
|
|
|
3
3
|
badge?: string;
|
|
4
4
|
title: string;
|
|
5
5
|
subtitle?: string;
|
|
6
|
-
/** Background color
|
|
6
|
+
/** Background color: any CSS value, e.g. "var(--blue-500)" */
|
|
7
7
|
bg?: string;
|
|
8
|
-
/** Background image
|
|
8
|
+
/** Background image: URL or CSS gradient, e.g. "url(...)" or "linear-gradient(...)" */
|
|
9
9
|
bgImage?: string;
|
|
10
10
|
/** Dark overlay opacity (0–1). true = 0.5. Useful for readability on images. */
|
|
11
11
|
overlay?: boolean | number;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "react";
|
|
2
|
-
import type { LucideIcon } from "lucide-react";
|
|
1
|
+
import { type ComponentType, type HTMLAttributes } from "react";
|
|
3
2
|
export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
3
|
+
/** Any icon component accepting `size` / `strokeWidth` (e.g. a lucide-react icon).
|
|
4
|
+
* Typed structurally so the published types don't require lucide-react. */
|
|
5
|
+
export type IconComponent = ComponentType<{
|
|
6
|
+
size?: number | string;
|
|
7
|
+
strokeWidth?: number | string;
|
|
8
|
+
}>;
|
|
4
9
|
export interface IconProps extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
-
/**
|
|
6
|
-
icon:
|
|
10
|
+
/** An icon component such as a lucide-react icon */
|
|
11
|
+
icon: IconComponent;
|
|
7
12
|
/** Size of the icon */
|
|
8
13
|
size?: IconSize;
|
|
9
|
-
/** Accessible label
|
|
14
|
+
/** Accessible label. If omitted, the icon is decorative (aria-hidden) */
|
|
10
15
|
label?: string;
|
|
11
16
|
}
|
|
12
17
|
export declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Icon } from "./Icon";
|
|
2
|
-
export type { IconProps, IconSize } from "./Icon";
|
|
2
|
+
export type { IconComponent, IconProps, IconSize } from "./Icon";
|
|
@@ -23,7 +23,7 @@ export interface NumberFieldProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
23
23
|
error?: boolean;
|
|
24
24
|
/** Error message */
|
|
25
25
|
errorMessage?: string;
|
|
26
|
-
/** Prefix text (e.g. "¥")
|
|
26
|
+
/** Prefix text (e.g. "¥"): auto-set by currency */
|
|
27
27
|
prefix?: string;
|
|
28
28
|
/** Suffix text (e.g. "%", "件") */
|
|
29
29
|
suffix?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Sidebar, NavItem, SidebarGroupLabel, SidebarDivider } from "./Sidebar";
|
|
2
|
-
export type { SidebarProps, NavItemProps, SidebarGroupLabelProps, SidebarDividerProps } from "./Sidebar";
|
|
2
|
+
export type { SidebarProps, NavItemProps, SidebarGroupLabelProps, SidebarDividerProps, } from "./Sidebar";
|
|
@@ -26,7 +26,7 @@ export declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps &
|
|
|
26
26
|
export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
27
27
|
active?: boolean;
|
|
28
28
|
id?: string;
|
|
29
|
-
/** Tab の value
|
|
29
|
+
/** Tab の value。aria-controls / id の自動生成に使用 */
|
|
30
30
|
value?: string;
|
|
31
31
|
}
|
|
32
32
|
export declare const Tab: import("react").ForwardRefExoticComponent<TabProps & import("react").RefAttributes<HTMLButtonElement>>;
|