kaze-design-system 0.6.0 → 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/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 +1 -4
- package/dist/components/DonutChart/DonutChart.js +54 -50
- package/dist/components/Dropdown/Dropdown.js +2 -11
- 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 -116
- 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/types/components/Dropdown/Dropdown.d.ts +2 -3
- package/dist/types/components/Sidebar/index.d.ts +1 -1
- package/dist/types/components/Toast/Toast.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/hooks/useTheme.d.ts +1 -1
- package/dist/types/lib/utils.d.ts +1 -1
- package/package.json +6 -2
|
@@ -2,22 +2,13 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
4
|
const Alert = forwardRef(
|
|
5
|
-
({ variant = "info", icon, title, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
|
|
6
|
-
"
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
children: [
|
|
13
|
-
icon && /* @__PURE__ */ jsx("span", { className: "alert__icon", children: icon }),
|
|
14
|
-
/* @__PURE__ */ jsxs("div", { className: "alert__content", children: [
|
|
15
|
-
title && /* @__PURE__ */ jsx("p", { className: "alert__title", children: title }),
|
|
16
|
-
/* @__PURE__ */ jsx("div", { className: "alert__description", children })
|
|
17
|
-
] })
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
)
|
|
5
|
+
({ variant = "info", icon, title, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs("div", { ref, role: "alert", className: cn("alert", `alert--${variant}`, className), ...rest, children: [
|
|
6
|
+
icon && /* @__PURE__ */ jsx("span", { className: "alert__icon", children: icon }),
|
|
7
|
+
/* @__PURE__ */ jsxs("div", { className: "alert__content", children: [
|
|
8
|
+
title && /* @__PURE__ */ jsx("p", { className: "alert__title", children: title }),
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "alert__description", children })
|
|
10
|
+
] })
|
|
11
|
+
] })
|
|
21
12
|
);
|
|
22
13
|
Alert.displayName = "Alert";
|
|
23
14
|
export {
|
|
@@ -8,12 +8,7 @@ const Badge = forwardRef(
|
|
|
8
8
|
{
|
|
9
9
|
ref,
|
|
10
10
|
...live ? { role: "status" } : {},
|
|
11
|
-
className: cn(
|
|
12
|
-
"badge",
|
|
13
|
-
`badge--${variant}`,
|
|
14
|
-
solid && "badge--solid",
|
|
15
|
-
className
|
|
16
|
-
),
|
|
11
|
+
className: cn("badge", `badge--${variant}`, solid && "badge--solid", className),
|
|
17
12
|
...rest,
|
|
18
13
|
children: [
|
|
19
14
|
dot && /* @__PURE__ */ jsx("span", { className: "badge__dot", "aria-hidden": "true" }),
|
|
@@ -6,21 +6,25 @@ const BarChart = forwardRef(
|
|
|
6
6
|
({ data, max, formatValue, "aria-label": ariaLabel, className, ...rest }, ref) => {
|
|
7
7
|
const maxVal = max ?? Math.max(...data.map((d) => d.value));
|
|
8
8
|
const fmt = formatValue ?? ((v) => String(v));
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
role: "img",
|
|
14
|
+
"aria-label": ariaLabel,
|
|
15
|
+
className: cn("bar-chart", className),
|
|
16
|
+
...rest,
|
|
17
|
+
children: data.map((item, i) => {
|
|
18
|
+
const pct = maxVal > 0 ? item.value / maxVal * 100 : 0;
|
|
19
|
+
const color = item.color ?? CHART_COLORS[i % CHART_COLORS.length];
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: "bar-chart__item", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("span", { className: "bar-chart__label", children: item.label }),
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "bar-chart__track", children: /* @__PURE__ */ jsx("span", { className: "bar-chart__fill", style: { width: `${pct}%`, background: color } }) }),
|
|
23
|
+
/* @__PURE__ */ jsx("span", { className: "bar-chart__value", children: fmt(item.value) })
|
|
24
|
+
] }, item.label);
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
);
|
|
24
28
|
}
|
|
25
29
|
);
|
|
26
30
|
BarChart.displayName = "BarChart";
|
|
@@ -2,13 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
4
|
const BarList = forwardRef(
|
|
5
|
-
({
|
|
6
|
-
data,
|
|
7
|
-
sortOrder = "descending",
|
|
8
|
-
valueFormatter,
|
|
9
|
-
className,
|
|
10
|
-
...rest
|
|
11
|
-
}, ref) => {
|
|
5
|
+
({ data, sortOrder = "descending", valueFormatter, className, ...rest }, ref) => {
|
|
12
6
|
const sorted = sortOrder === "none" ? data : [...data].sort(
|
|
13
7
|
(a, b) => sortOrder === "ascending" ? a.value - b.value : b.value - a.value
|
|
14
8
|
);
|
|
@@ -33,15 +27,7 @@ const BarList = forwardRef(
|
|
|
33
27
|
/* @__PURE__ */ jsx("span", { className: "barlist__value", children: display })
|
|
34
28
|
] });
|
|
35
29
|
const LinkComponent = item.as ?? "a";
|
|
36
|
-
return item.href ? /* @__PURE__ */ jsx(
|
|
37
|
-
LinkComponent,
|
|
38
|
-
{
|
|
39
|
-
href: item.href,
|
|
40
|
-
className: "barlist__row barlist__row--link",
|
|
41
|
-
children: content
|
|
42
|
-
},
|
|
43
|
-
i
|
|
44
|
-
) : /* @__PURE__ */ jsx("div", { className: "barlist__row", children: content }, i);
|
|
30
|
+
return item.href ? /* @__PURE__ */ jsx(LinkComponent, { href: item.href, className: "barlist__row barlist__row--link", children: content }, i) : /* @__PURE__ */ jsx("div", { className: "barlist__row", children: content }, i);
|
|
45
31
|
}) });
|
|
46
32
|
}
|
|
47
33
|
);
|
|
@@ -33,9 +33,11 @@ const CardTitle = forwardRef(
|
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
CardTitle.displayName = "CardTitle";
|
|
36
|
-
const CardDescription = forwardRef(
|
|
37
|
-
|
|
38
|
-
});
|
|
36
|
+
const CardDescription = forwardRef(
|
|
37
|
+
({ className, children, ...rest }, ref) => {
|
|
38
|
+
return /* @__PURE__ */ jsx("p", { ref, className: cn("card__description", className), ...rest, children });
|
|
39
|
+
}
|
|
40
|
+
);
|
|
39
41
|
CardDescription.displayName = "CardDescription";
|
|
40
42
|
const CardBody = forwardRef(
|
|
41
43
|
({ className, children, ...rest }, ref) => {
|
|
@@ -6,16 +6,7 @@ const Checkbox = forwardRef(
|
|
|
6
6
|
const generatedId = useId();
|
|
7
7
|
const id = idProp ?? generatedId;
|
|
8
8
|
return /* @__PURE__ */ jsxs("label", { htmlFor: id, className: cn("checkbox", className), children: [
|
|
9
|
-
/* @__PURE__ */ jsx(
|
|
10
|
-
"input",
|
|
11
|
-
{
|
|
12
|
-
ref,
|
|
13
|
-
id,
|
|
14
|
-
type: "checkbox",
|
|
15
|
-
className: "checkbox__input",
|
|
16
|
-
...rest
|
|
17
|
-
}
|
|
18
|
-
),
|
|
9
|
+
/* @__PURE__ */ jsx("input", { ref, id, type: "checkbox", className: "checkbox__input", ...rest }),
|
|
19
10
|
label && /* @__PURE__ */ jsx("span", { children: label })
|
|
20
11
|
] });
|
|
21
12
|
}
|
|
@@ -62,9 +62,7 @@ const CommandPalette = forwardRef(
|
|
|
62
62
|
}, [open]);
|
|
63
63
|
useEffect(() => {
|
|
64
64
|
if (!listRef.current) return;
|
|
65
|
-
const items = listRef.current.querySelectorAll(
|
|
66
|
-
"[data-command-item]"
|
|
67
|
-
);
|
|
65
|
+
const items = listRef.current.querySelectorAll("[data-command-item]");
|
|
68
66
|
const highlighted = items[highlightedIndex];
|
|
69
67
|
highlighted?.scrollIntoView({ block: "nearest" });
|
|
70
68
|
}, [highlightedIndex]);
|
|
@@ -84,16 +82,12 @@ const CommandPalette = forwardRef(
|
|
|
84
82
|
switch (e.key) {
|
|
85
83
|
case "ArrowDown": {
|
|
86
84
|
e.preventDefault();
|
|
87
|
-
setHighlightedIndex(
|
|
88
|
-
(prev) => prev < flatList.length - 1 ? prev + 1 : 0
|
|
89
|
-
);
|
|
85
|
+
setHighlightedIndex((prev) => prev < flatList.length - 1 ? prev + 1 : 0);
|
|
90
86
|
break;
|
|
91
87
|
}
|
|
92
88
|
case "ArrowUp": {
|
|
93
89
|
e.preventDefault();
|
|
94
|
-
setHighlightedIndex(
|
|
95
|
-
(prev) => prev > 0 ? prev - 1 : flatList.length - 1
|
|
96
|
-
);
|
|
90
|
+
setHighlightedIndex((prev) => prev > 0 ? prev - 1 : flatList.length - 1);
|
|
97
91
|
break;
|
|
98
92
|
}
|
|
99
93
|
case "Enter": {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
const DescriptionList = forwardRef(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"dl",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
children
|
|
16
|
-
}
|
|
17
|
-
));
|
|
4
|
+
const DescriptionList = forwardRef(
|
|
5
|
+
({ horizontal, bordered, className, children, ...rest }, ref) => /* @__PURE__ */ jsx(
|
|
6
|
+
"dl",
|
|
7
|
+
{
|
|
8
|
+
ref,
|
|
9
|
+
className: cn("dl", horizontal && "dl--horizontal", bordered && "dl--bordered", className),
|
|
10
|
+
...rest,
|
|
11
|
+
children
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
);
|
|
18
15
|
DescriptionList.displayName = "DescriptionList";
|
|
19
16
|
const DescriptionItem = forwardRef(
|
|
20
17
|
({ term, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("dl__group", className), ...rest, children: [
|
|
@@ -97,16 +97,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
97
97
|
const DialogTitle = forwardRef(
|
|
98
98
|
({ className, children, id, ...rest }, ref) => {
|
|
99
99
|
const contextId = useContext(DialogTitleIdContext);
|
|
100
|
-
return /* @__PURE__ */ jsx(
|
|
101
|
-
"h2",
|
|
102
|
-
{
|
|
103
|
-
ref,
|
|
104
|
-
id: id ?? contextId,
|
|
105
|
-
className: cn("dialog__title", className),
|
|
106
|
-
...rest,
|
|
107
|
-
children
|
|
108
|
-
}
|
|
109
|
-
);
|
|
100
|
+
return /* @__PURE__ */ jsx("h2", { ref, id: id ?? contextId, className: cn("dialog__title", className), ...rest, children });
|
|
110
101
|
}
|
|
111
102
|
);
|
|
112
103
|
DialogTitle.displayName = "DialogTitle";
|
|
@@ -100,10 +100,7 @@ const Disclosure = forwardRef(
|
|
|
100
100
|
iconPosition === "left" && /* @__PURE__ */ jsx(
|
|
101
101
|
"span",
|
|
102
102
|
{
|
|
103
|
-
className: cn(
|
|
104
|
-
"disclosure__icon",
|
|
105
|
-
isBuiltInIcon && "disclosure__icon--rotate"
|
|
106
|
-
),
|
|
103
|
+
className: cn("disclosure__icon", isBuiltInIcon && "disclosure__icon--rotate"),
|
|
107
104
|
"aria-hidden": "true",
|
|
108
105
|
children: markerNode
|
|
109
106
|
}
|
|
@@ -30,56 +30,60 @@ const DonutChart = forwardRef(
|
|
|
30
30
|
dashOffset
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
|
-
return /* @__PURE__ */ jsxs(
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
role: "img",
|
|
38
|
+
"aria-label": ariaLabel,
|
|
39
|
+
className: cn("donut-chart", className),
|
|
40
|
+
...rest,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsxs(
|
|
43
|
+
"svg",
|
|
44
|
+
{
|
|
45
|
+
className: "donut-chart__svg",
|
|
46
|
+
width: size,
|
|
47
|
+
height: size,
|
|
48
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
"circle",
|
|
53
|
+
{
|
|
54
|
+
className: "donut-chart__track",
|
|
55
|
+
cx: center,
|
|
56
|
+
cy: center,
|
|
57
|
+
r: radius,
|
|
58
|
+
strokeWidth
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
segments.map((seg) => /* @__PURE__ */ jsx(
|
|
62
|
+
"circle",
|
|
63
|
+
{
|
|
64
|
+
className: "donut-chart__segment",
|
|
65
|
+
cx: center,
|
|
66
|
+
cy: center,
|
|
67
|
+
r: radius,
|
|
68
|
+
strokeWidth,
|
|
69
|
+
stroke: seg.color,
|
|
70
|
+
strokeDasharray: `${seg.dashLength} ${circumference - seg.dashLength}`,
|
|
71
|
+
strokeDashoffset: seg.dashOffset
|
|
72
|
+
},
|
|
73
|
+
seg.label
|
|
74
|
+
)),
|
|
75
|
+
centerLabel && /* @__PURE__ */ jsx("text", { className: "donut-chart__center-label", x: center, y: center, children: centerLabel })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
showLegend && /* @__PURE__ */ jsx("div", { className: "donut-chart__legend", children: segments.map((seg) => /* @__PURE__ */ jsxs("span", { className: "donut-chart__legend-item", children: [
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "donut-chart__legend-dot", style: { background: seg.color } }),
|
|
81
|
+
/* @__PURE__ */ jsx("span", { className: "donut-chart__legend-label", children: seg.label }),
|
|
82
|
+
/* @__PURE__ */ jsx("span", { className: "donut-chart__legend-value", children: seg.value })
|
|
83
|
+
] }, seg.label)) })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
83
87
|
}
|
|
84
88
|
);
|
|
85
89
|
DonutChart.displayName = "DonutChart";
|
|
@@ -7,9 +7,7 @@ const DropdownContext = createContext(null);
|
|
|
7
7
|
function useDropdownContext() {
|
|
8
8
|
const context = useContext(DropdownContext);
|
|
9
9
|
if (!context) {
|
|
10
|
-
throw new Error(
|
|
11
|
-
"Dropdown compound components must be used within a <Dropdown>"
|
|
12
|
-
);
|
|
10
|
+
throw new Error("Dropdown compound components must be used within a <Dropdown>");
|
|
13
11
|
}
|
|
14
12
|
return context;
|
|
15
13
|
}
|
|
@@ -91,14 +89,7 @@ const DropdownTrigger = forwardRef(
|
|
|
91
89
|
DropdownTrigger.displayName = "DropdownTrigger";
|
|
92
90
|
const DropdownMenu = forwardRef(
|
|
93
91
|
({ children, className, ...rest }, ref) => {
|
|
94
|
-
const {
|
|
95
|
-
open,
|
|
96
|
-
setOpen,
|
|
97
|
-
triggerRef,
|
|
98
|
-
highlightedIndex,
|
|
99
|
-
setHighlightedIndex,
|
|
100
|
-
resetItems
|
|
101
|
-
} = useDropdownContext();
|
|
92
|
+
const { open, setOpen, triggerRef, highlightedIndex, setHighlightedIndex, resetItems } = useDropdownContext();
|
|
102
93
|
const menuRef = useRef(null);
|
|
103
94
|
const [position, setPosition] = useState({
|
|
104
95
|
top: 0,
|
|
@@ -2,59 +2,49 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useState } from "react";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
const FAQ = forwardRef(
|
|
6
|
-
({ className,
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
);
|
|
5
|
+
const FAQ = forwardRef(({ className, children, ...rest }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("faq", className), ...rest, children });
|
|
7
|
+
});
|
|
10
8
|
FAQ.displayName = "FAQ";
|
|
11
9
|
const FAQItem = forwardRef(
|
|
12
10
|
({ question, answer, className, children, ...rest }, ref) => {
|
|
13
11
|
const [open, setOpen] = useState(false);
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("faq__item", open && "faq__item--open", className), ...rest, children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(
|
|
14
|
+
"button",
|
|
15
|
+
{
|
|
16
|
+
type: "button",
|
|
17
|
+
className: "faq__trigger",
|
|
18
|
+
"aria-expanded": open,
|
|
19
|
+
onClick: () => setOpen((prev) => !prev),
|
|
20
|
+
children: [
|
|
21
|
+
question,
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
className: "faq__chevron",
|
|
26
|
+
width: "16",
|
|
27
|
+
height: "16",
|
|
28
|
+
viewBox: "0 0 16 16",
|
|
29
|
+
fill: "none",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: /* @__PURE__ */ jsx(
|
|
32
|
+
"path",
|
|
32
33
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"aria-hidden": "true",
|
|
39
|
-
children: /* @__PURE__ */ jsx(
|
|
40
|
-
"path",
|
|
41
|
-
{
|
|
42
|
-
d: "M4 6l4 4 4-4",
|
|
43
|
-
stroke: "currentColor",
|
|
44
|
-
strokeWidth: "2",
|
|
45
|
-
strokeLinecap: "round",
|
|
46
|
-
strokeLinejoin: "round"
|
|
47
|
-
}
|
|
48
|
-
)
|
|
34
|
+
d: "M4 6l4 4 4-4",
|
|
35
|
+
stroke: "currentColor",
|
|
36
|
+
strokeWidth: "2",
|
|
37
|
+
strokeLinecap: "round",
|
|
38
|
+
strokeLinejoin: "round"
|
|
49
39
|
}
|
|
50
40
|
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
);
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "faq__answer", children: /* @__PURE__ */ jsx("div", { className: "faq__answer-inner", children: answer ?? children }) })
|
|
47
|
+
] });
|
|
58
48
|
}
|
|
59
49
|
);
|
|
60
50
|
FAQItem.displayName = "FAQItem";
|
|
@@ -7,11 +7,7 @@ const FeatureGrid = forwardRef(
|
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref,
|
|
10
|
-
className: cn(
|
|
11
|
-
"feature-grid",
|
|
12
|
-
columns !== 3 && `feature-grid--cols-${columns}`,
|
|
13
|
-
className
|
|
14
|
-
),
|
|
10
|
+
className: cn("feature-grid", columns !== 3 && `feature-grid--cols-${columns}`, className),
|
|
15
11
|
...rest,
|
|
16
12
|
children
|
|
17
13
|
}
|
|
@@ -9,11 +9,7 @@ const FilterPill = forwardRef(
|
|
|
9
9
|
{
|
|
10
10
|
ref,
|
|
11
11
|
type: "button",
|
|
12
|
-
className: cn(
|
|
13
|
-
"filter-pill",
|
|
14
|
-
active && "filter-pill--active",
|
|
15
|
-
className
|
|
16
|
-
),
|
|
12
|
+
className: cn("filter-pill", active && "filter-pill--active", className),
|
|
17
13
|
style: pillStyle,
|
|
18
14
|
"aria-pressed": active,
|
|
19
15
|
...rest,
|
|
@@ -2,17 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef, useId, isValidElement, cloneElement } from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
4
|
const FormField = forwardRef(
|
|
5
|
-
({
|
|
6
|
-
label,
|
|
7
|
-
description,
|
|
8
|
-
error,
|
|
9
|
-
required,
|
|
10
|
-
maxLength,
|
|
11
|
-
currentLength,
|
|
12
|
-
children,
|
|
13
|
-
className,
|
|
14
|
-
...rest
|
|
15
|
-
}, ref) => {
|
|
5
|
+
({ label, description, error, required, maxLength, currentLength, children, className, ...rest }, ref) => {
|
|
16
6
|
const generatedId = useId();
|
|
17
7
|
const inputId = `form-field-${generatedId}`;
|
|
18
8
|
const descriptionId = description ? `${inputId}-description` : void 0;
|
|
@@ -29,10 +19,7 @@ const FormField = forwardRef(
|
|
|
29
19
|
"label",
|
|
30
20
|
{
|
|
31
21
|
htmlFor: inputId,
|
|
32
|
-
className: cn(
|
|
33
|
-
"form-field__label",
|
|
34
|
-
required && "form-field__label--required"
|
|
35
|
-
),
|
|
22
|
+
className: cn("form-field__label", required && "form-field__label--required"),
|
|
36
23
|
children: label
|
|
37
24
|
}
|
|
38
25
|
),
|
|
@@ -35,15 +35,7 @@ const Grid = forwardRef(
|
|
|
35
35
|
...resolvedGapMd != null ? { "--grid-gap-md": resolvedGapMd } : {},
|
|
36
36
|
...resolvedGapSm != null ? { "--grid-gap-sm": resolvedGapSm } : {}
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
-
"div",
|
|
40
|
-
{
|
|
41
|
-
ref,
|
|
42
|
-
className: cn("grid", className),
|
|
43
|
-
style: vars,
|
|
44
|
-
...rest
|
|
45
|
-
}
|
|
46
|
-
);
|
|
38
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("grid", className), style: vars, ...rest });
|
|
47
39
|
}
|
|
48
40
|
);
|
|
49
41
|
Grid.displayName = "Grid";
|
|
@@ -31,15 +31,7 @@ function computePosition(trigger, pop, side) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
const HelpButton = forwardRef(
|
|
34
|
-
({
|
|
35
|
-
title,
|
|
36
|
-
children,
|
|
37
|
-
position = "bottom",
|
|
38
|
-
size = "md",
|
|
39
|
-
icon,
|
|
40
|
-
ariaLabel = "ヘルプ",
|
|
41
|
-
className
|
|
42
|
-
}, ref) => {
|
|
34
|
+
({ title, children, position = "bottom", size = "md", icon, ariaLabel = "ヘルプ", className }, ref) => {
|
|
43
35
|
const [open, setOpen] = useState(false);
|
|
44
36
|
const [coords, setCoords] = useState({
|
|
45
37
|
top: 0,
|
|
@@ -2,16 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
4
|
const LPFooter = forwardRef(
|
|
5
|
-
({
|
|
6
|
-
logo,
|
|
7
|
-
description,
|
|
8
|
-
columns,
|
|
9
|
-
bottomLeft,
|
|
10
|
-
bottomRight,
|
|
11
|
-
className,
|
|
12
|
-
children,
|
|
13
|
-
...rest
|
|
14
|
-
}, ref) => {
|
|
5
|
+
({ logo, description, columns, bottomLeft, bottomRight, className, children, ...rest }, ref) => {
|
|
15
6
|
return /* @__PURE__ */ jsx("footer", { ref, className: cn("lp-footer", className), ...rest, children: /* @__PURE__ */ jsxs("div", { className: "lp-footer__inner", children: [
|
|
16
7
|
/* @__PURE__ */ jsxs("div", { className: "lp-footer__grid", children: [
|
|
17
8
|
/* @__PURE__ */ jsxs("div", { className: "lp-footer__brand", children: [
|
|
@@ -22,24 +22,11 @@ const List = forwardRef(
|
|
|
22
22
|
);
|
|
23
23
|
List.displayName = "List";
|
|
24
24
|
const ListItem = forwardRef(
|
|
25
|
-
({
|
|
26
|
-
leading,
|
|
27
|
-
trailing,
|
|
28
|
-
title,
|
|
29
|
-
description,
|
|
30
|
-
interactive,
|
|
31
|
-
className,
|
|
32
|
-
children,
|
|
33
|
-
...rest
|
|
34
|
-
}, ref) => /* @__PURE__ */ jsxs(
|
|
25
|
+
({ leading, trailing, title, description, interactive, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
|
|
35
26
|
"li",
|
|
36
27
|
{
|
|
37
28
|
ref,
|
|
38
|
-
className: cn(
|
|
39
|
-
"list-item",
|
|
40
|
-
interactive && "list-item--interactive",
|
|
41
|
-
className
|
|
42
|
-
),
|
|
29
|
+
className: cn("list-item", interactive && "list-item--interactive", className),
|
|
43
30
|
...rest,
|
|
44
31
|
children: [
|
|
45
32
|
leading && /* @__PURE__ */ jsx("span", { className: "list-item__leading", children: leading }),
|
|
@@ -47,16 +47,7 @@ const Logo = forwardRef(
|
|
|
47
47
|
({ size = "md", showText = true, className, ...rest }, ref) => {
|
|
48
48
|
const iconSize = size === "sm" ? 18 : size === "lg" ? 32 : 22;
|
|
49
49
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("logo", className), ...rest, children: [
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: cn(
|
|
54
|
-
"logo__mark",
|
|
55
|
-
`logo__mark--${size}`
|
|
56
|
-
),
|
|
57
|
-
children: /* @__PURE__ */ jsx(WindMark, { size: iconSize })
|
|
58
|
-
}
|
|
59
|
-
),
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: cn("logo__mark", `logo__mark--${size}`), children: /* @__PURE__ */ jsx(WindMark, { size: iconSize }) }),
|
|
60
51
|
showText && /* @__PURE__ */ jsxs("span", { className: cn("logo__text", size === "lg" && "logo__text--lg"), children: [
|
|
61
52
|
"kaze",
|
|
62
53
|
/* @__PURE__ */ jsx("span", { className: "logo__kanji", children: "風" })
|