kaze-design-system 0.10.3 → 0.10.4
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/CHANGELOG.md +7 -0
- package/dist/components/Alert/Alert.js +28 -28
- package/dist/components/Avatar/Avatar.js +22 -21
- package/dist/components/Badge/Badge.js +19 -25
- package/dist/components/BarChart/BarChart.js +48 -38
- package/dist/components/BarList/BarList.js +42 -43
- package/dist/components/Breadcrumb/Breadcrumb.js +27 -10
- package/dist/components/Button/Button.js +21 -44
- package/dist/components/CTABanner/CTABanner.js +25 -14
- package/dist/components/Card/Card.js +52 -54
- package/dist/components/CategoryBar/CategoryBar.js +88 -86
- package/dist/components/ChartLegend/ChartLegend.js +32 -41
- package/dist/components/Checkbox/Checkbox.js +20 -25
- package/dist/components/ColumnChart/ColumnChart.js +274 -268
- package/dist/components/CommandPalette/CommandPalette.js +166 -233
- package/dist/components/DescriptionList/DescriptionList.js +22 -23
- package/dist/components/Dialog/Dialog.js +133 -153
- package/dist/components/Disclosure/Disclosure.js +94 -139
- package/dist/components/Divider/Divider.js +17 -28
- package/dist/components/DonutChart/DonutChart.js +91 -105
- package/dist/components/Dropdown/Dropdown.js +236 -244
- package/dist/components/EmptyState/EmptyState.js +28 -22
- package/dist/components/FAB/FAB.js +25 -49
- package/dist/components/FAQ/FAQ.js +58 -55
- package/dist/components/FeatureGrid/FeatureGrid.js +33 -28
- package/dist/components/FilterPill/FilterPill.js +23 -26
- package/dist/components/FormField/FormField.js +61 -55
- package/dist/components/Grid/Grid.js +35 -39
- package/dist/components/Heading/Heading.js +15 -27
- package/dist/components/Heatmap/Heatmap.js +245 -253
- package/dist/components/HelpButton/HelpButton.js +101 -116
- package/dist/components/Hero/Hero.js +47 -38
- package/dist/components/Icon/Icon.js +26 -18
- package/dist/components/Input/Input.js +13 -19
- package/dist/components/LPFooter/LPFooter.js +40 -25
- package/dist/components/Layout/Layout.js +18 -16
- package/dist/components/LineChart/LineChart.js +275 -290
- package/dist/components/List/List.js +55 -47
- package/dist/components/Logo/Logo.js +50 -57
- package/dist/components/Meter/Meter.js +56 -75
- package/dist/components/Metric/Metric.js +25 -14
- package/dist/components/Navbar/Navbar.js +35 -46
- package/dist/components/NumberField/NumberField.js +228 -220
- package/dist/components/Pagination/Pagination.js +60 -84
- package/dist/components/Pricing/Pricing.js +65 -60
- package/dist/components/Progress/Progress.js +36 -39
- package/dist/components/Radio/Radio.js +62 -61
- package/dist/components/Search/Search.js +62 -91
- package/dist/components/Section/Section.js +29 -32
- package/dist/components/SegmentedControl/SegmentedControl.js +88 -118
- package/dist/components/Select/Select.js +14 -20
- package/dist/components/Sidebar/Sidebar.js +58 -51
- package/dist/components/Skeleton/Skeleton.js +15 -17
- package/dist/components/Sparkline/Sparkline.js +35 -50
- package/dist/components/SplitSection/SplitSection.js +21 -24
- package/dist/components/Stats/Stats.js +33 -20
- package/dist/components/StatusBadge/StatusBadge.js +37 -18
- package/dist/components/Stepper/Stepper.js +48 -65
- package/dist/components/Switch/Switch.js +30 -26
- package/dist/components/Table/Table.js +56 -40
- package/dist/components/Tabs/Tabs.js +152 -164
- package/dist/components/Testimonial/Testimonial.js +40 -26
- package/dist/components/Text/Text.js +10 -25
- package/dist/components/Textarea/Textarea.js +13 -19
- package/dist/components/Timeline/Timeline.js +35 -26
- package/dist/components/Toast/Toast.js +230 -242
- package/dist/components/Tooltip/Tooltip.js +175 -182
- package/dist/components/TopBar/TopBar.js +15 -13
- package/dist/components/Tracker/Tracker.js +40 -46
- package/dist/components/Watermark/Watermark.js +51 -78
- package/dist/components/_internal/aria.js +7 -7
- package/dist/hooks/ThemeScript.js +14 -5
- package/dist/hooks/useFocusTrap.js +57 -55
- package/dist/hooks/useLegendToggle.js +51 -44
- package/dist/hooks/useTheme.js +83 -91
- package/dist/hooks.js +2 -8
- package/dist/index.js +57 -167
- package/dist/lib/Slot.js +42 -43
- package/dist/lib/chartColors.js +16 -16
- package/dist/lib/chartScale.js +35 -30
- package/dist/lib/composeEventHandlers.js +11 -7
- package/dist/lib/deprecate.js +24 -20
- package/dist/lib/jaText.js +26 -13
- package/dist/lib/useChartWidth.js +29 -25
- package/dist/lib/utils.js +3 -4
- package/dist/marketing.js +7 -27
- package/dist/tokens.js +93 -93
- package/dist/utils/scrollLock.js +40 -29
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,13 @@ CHANGELOG entries and version bumps are generated automatically by `.github/work
|
|
|
16
16
|
### 0.x policy
|
|
17
17
|
|
|
18
18
|
While the major version is 0, a **minor** release may include breaking changes (they are called out in the release notes with a migration note); a **patch** release never does. The public API will be frozen at 1.0.
|
|
19
|
+
## [0.10.4] - 2026-10-29
|
|
20
|
+
|
|
21
|
+
### Other
|
|
22
|
+
|
|
23
|
+
- build: move to vite 8 and vitest 5 (#52)
|
|
24
|
+
|
|
25
|
+
|
|
19
26
|
## [0.10.3] - 2026-10-29
|
|
20
27
|
|
|
21
28
|
### Other
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { renamedProp } from "../../lib/deprecate.js";
|
|
4
1
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
import { renamedProp } from "../../lib/deprecate.js";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Alert/Alert.tsx
|
|
6
|
+
var Alert = forwardRef(({ tone: toneProp, variant, icon, title, className, children, ...rest }, ref) => {
|
|
7
|
+
const tone = renamedProp("Alert", "variant", "tone", variant, toneProp) ?? "info";
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
ref,
|
|
10
|
+
role: "alert",
|
|
11
|
+
"data-tone": tone,
|
|
12
|
+
className: cn("alert", `alert--${tone}`, className),
|
|
13
|
+
...rest,
|
|
14
|
+
children: [icon && /* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: "alert__icon",
|
|
16
|
+
children: icon
|
|
17
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "alert__content",
|
|
19
|
+
children: [title && /* @__PURE__ */ jsx("p", {
|
|
20
|
+
className: "alert__title",
|
|
21
|
+
children: title
|
|
22
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "alert__description",
|
|
24
|
+
children
|
|
25
|
+
})]
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
});
|
|
27
29
|
Alert.displayName = "Alert";
|
|
28
|
-
export {
|
|
29
|
-
Alert
|
|
30
|
-
};
|
|
30
|
+
export { Alert };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
)
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Avatar/Avatar.tsx
|
|
5
|
+
var Avatar = forwardRef(({ size = "md", src, alt, fallback, className, ...rest }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("span", {
|
|
7
|
+
ref,
|
|
8
|
+
...!src && fallback ? {
|
|
9
|
+
role: "img",
|
|
10
|
+
"aria-label": fallback
|
|
11
|
+
} : {},
|
|
12
|
+
className: cn("avatar", `avatar--${size}`, className),
|
|
13
|
+
...rest,
|
|
14
|
+
children: src ? /* @__PURE__ */ jsx("img", {
|
|
15
|
+
src,
|
|
16
|
+
alt: alt ?? ""
|
|
17
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
children: fallback
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
});
|
|
20
23
|
Avatar.displayName = "Avatar";
|
|
21
|
-
export {
|
|
22
|
-
Avatar
|
|
23
|
-
};
|
|
24
|
+
export { Avatar };
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { renamedProp } from "../../lib/deprecate.js";
|
|
4
1
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
2
|
+
import { renamedProp } from "../../lib/deprecate.js";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Badge/Badge.tsx
|
|
6
|
+
var Badge = forwardRef(({ tone: toneProp, variant, dot, solid, live, className, children, ...rest }, ref) => {
|
|
7
|
+
const tone = renamedProp("Badge", "variant", "tone", variant, toneProp) ?? "default";
|
|
8
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
9
|
+
ref,
|
|
10
|
+
...live ? { role: "status" } : {},
|
|
11
|
+
"data-tone": tone,
|
|
12
|
+
className: cn("badge", `badge--${tone}`, solid && "badge--solid", className),
|
|
13
|
+
...rest,
|
|
14
|
+
children: [dot && /* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: "badge__dot",
|
|
16
|
+
"aria-hidden": "true"
|
|
17
|
+
}), children]
|
|
18
|
+
});
|
|
19
|
+
});
|
|
24
20
|
Badge.displayName = "Badge";
|
|
25
|
-
export {
|
|
26
|
-
Badge
|
|
27
|
-
};
|
|
21
|
+
export { Badge };
|
|
@@ -1,41 +1,51 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
2
|
import { CHART_COLORS } from "../../lib/chartColors.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/BarChart/BarChart.tsx
|
|
6
|
+
var BarChart = forwardRef(({ data, max, formatValue, "aria-label": ariaLabel, className, ...rest }, ref) => {
|
|
7
|
+
const maxVal = max ?? Math.max(...data.map((d) => d.value));
|
|
8
|
+
const fmt = formatValue ?? ((v) => String(v));
|
|
9
|
+
const pctOf = (value) => maxVal > 0 ? value / maxVal * 100 : 0;
|
|
10
|
+
const summary = data.map((d) => `${d.label} ${fmt(d.value)}(${Math.round(pctOf(d.value))}%)`).join("、");
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
ref,
|
|
13
|
+
role: "figure",
|
|
14
|
+
"aria-label": ariaLabel,
|
|
15
|
+
className: cn("bar-chart", className),
|
|
16
|
+
...rest,
|
|
17
|
+
children: [data.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "sr-only",
|
|
19
|
+
children: summary
|
|
20
|
+
}), data.map((item, i) => {
|
|
21
|
+
const pct = pctOf(item.value);
|
|
22
|
+
const color = item.color ?? CHART_COLORS[i % CHART_COLORS.length];
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "bar-chart__item",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", {
|
|
27
|
+
className: "bar-chart__label",
|
|
28
|
+
children: item.label
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "bar-chart__track",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: "bar-chart__fill",
|
|
35
|
+
style: {
|
|
36
|
+
width: `${pct}%`,
|
|
37
|
+
background: color
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: "bar-chart__value",
|
|
43
|
+
children: fmt(item.value)
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}, item.label);
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
});
|
|
38
50
|
BarChart.displayName = "BarChart";
|
|
39
|
-
export {
|
|
40
|
-
BarChart
|
|
41
|
-
};
|
|
51
|
+
export { BarChart };
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
);
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/components/BarList/BarList.tsx
|
|
5
|
+
var BarList = forwardRef(({ data, sortOrder = "descending", valueFormatter, className, ...rest }, ref) => {
|
|
6
|
+
const sorted = sortOrder === "none" ? data : [...data].sort((a, b) => sortOrder === "ascending" ? a.value - b.value : b.value - a.value);
|
|
7
|
+
const maxValue = Math.max(...sorted.map((d) => d.value), 1);
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
ref,
|
|
10
|
+
className: cn("barlist", className),
|
|
11
|
+
...rest,
|
|
12
|
+
children: sorted.map((item) => {
|
|
13
|
+
const pct = item.value / maxValue * 100;
|
|
14
|
+
const display = item.displayValue ?? (valueFormatter ? valueFormatter(item.value) : String(item.value));
|
|
15
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "barlist__bar-wrapper",
|
|
17
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
18
|
+
className: "barlist__bar",
|
|
19
|
+
style: {
|
|
20
|
+
width: `${pct}%`,
|
|
21
|
+
...item.color ? { backgroundColor: item.color } : {}
|
|
22
|
+
}
|
|
23
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "barlist__label",
|
|
25
|
+
children: item.label
|
|
26
|
+
})]
|
|
27
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
28
|
+
className: "barlist__value",
|
|
29
|
+
children: display
|
|
30
|
+
})] });
|
|
31
|
+
const LinkComponent = item.as ?? "a";
|
|
32
|
+
return item.href ? /* @__PURE__ */ jsx(LinkComponent, {
|
|
33
|
+
href: item.href,
|
|
34
|
+
className: "barlist__row barlist__row--link",
|
|
35
|
+
children: content
|
|
36
|
+
}, item.label) : /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "barlist__row",
|
|
38
|
+
children: content
|
|
39
|
+
}, item.label);
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
});
|
|
42
43
|
BarList.displayName = "BarList";
|
|
43
|
-
export {
|
|
44
|
-
BarList
|
|
45
|
-
};
|
|
44
|
+
export { BarList };
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
import { forwardRef } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
4
|
+
var Breadcrumb = forwardRef(({ items, label = "パンくず", className, ...rest }, ref) => /* @__PURE__ */ jsx("nav", {
|
|
5
|
+
ref,
|
|
6
|
+
"aria-label": label,
|
|
7
|
+
className,
|
|
8
|
+
...rest,
|
|
9
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
10
|
+
className: "breadcrumb",
|
|
11
|
+
children: items.map((item, i) => {
|
|
12
|
+
const LinkComponent = item.as ?? "a";
|
|
13
|
+
return /* @__PURE__ */ jsx("li", {
|
|
14
|
+
className: "breadcrumb__item",
|
|
15
|
+
children: i < items.length - 1 && item.href ? /* @__PURE__ */ jsx(LinkComponent, {
|
|
16
|
+
href: item.href,
|
|
17
|
+
className: "breadcrumb__link",
|
|
18
|
+
children: item.label
|
|
19
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "breadcrumb__current",
|
|
21
|
+
"aria-current": "page",
|
|
22
|
+
children: item.label
|
|
23
|
+
})
|
|
24
|
+
}, item.href ?? item.label);
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
9
28
|
Breadcrumb.displayName = "Breadcrumb";
|
|
10
|
-
export {
|
|
11
|
-
Breadcrumb
|
|
12
|
-
};
|
|
29
|
+
export { Breadcrumb };
|
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
2
|
import { Slot } from "../../lib/Slot.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Comp,
|
|
26
|
-
{
|
|
27
|
-
ref,
|
|
28
|
-
onClick,
|
|
29
|
-
...disabled ? disabledProps : {},
|
|
30
|
-
className: cn(
|
|
31
|
-
"btn",
|
|
32
|
-
`btn--${variant}`,
|
|
33
|
-
`btn--${size}`,
|
|
34
|
-
fullWidth && "btn--full",
|
|
35
|
-
iconOnly && "btn--icon",
|
|
36
|
-
className
|
|
37
|
-
),
|
|
38
|
-
...rest,
|
|
39
|
-
children
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
);
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Button/Button.tsx
|
|
6
|
+
var Button = forwardRef(({ variant = "primary", size = "md", fullWidth, iconOnly, disabled, asChild, className, children, onClick, ...rest }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
8
|
+
ref,
|
|
9
|
+
onClick,
|
|
10
|
+
...disabled ? asChild ? {
|
|
11
|
+
"aria-disabled": true,
|
|
12
|
+
"data-disabled": "",
|
|
13
|
+
onClick: (e) => e.preventDefault()
|
|
14
|
+
} : {
|
|
15
|
+
disabled,
|
|
16
|
+
"aria-disabled": true
|
|
17
|
+
} : {},
|
|
18
|
+
className: cn("btn", `btn--${variant}`, `btn--${size}`, fullWidth && "btn--full", iconOnly && "btn--icon", className),
|
|
19
|
+
...rest,
|
|
20
|
+
children
|
|
21
|
+
});
|
|
22
|
+
});
|
|
44
23
|
Button.displayName = "Button";
|
|
45
|
-
export {
|
|
46
|
-
Button
|
|
47
|
-
};
|
|
24
|
+
export { Button };
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/components/CTABanner/CTABanner.tsx
|
|
5
|
+
var CTABanner = forwardRef(({ title, description, className, children, ...rest }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
ref,
|
|
8
|
+
className: cn("cta-banner", className),
|
|
9
|
+
...rest,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx("h2", {
|
|
12
|
+
className: "cta-banner__title",
|
|
13
|
+
children: title
|
|
14
|
+
}),
|
|
15
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
16
|
+
className: "cta-banner__description",
|
|
17
|
+
children: description
|
|
18
|
+
}),
|
|
19
|
+
children && /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: "cta-banner__actions",
|
|
21
|
+
children
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
13
26
|
CTABanner.displayName = "CTABanner";
|
|
14
|
-
export {
|
|
15
|
-
CTABanner
|
|
16
|
-
};
|
|
27
|
+
export { CTABanner };
|
|
@@ -1,61 +1,59 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className
|
|
16
|
-
),
|
|
17
|
-
...rest,
|
|
18
|
-
children
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
);
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Card/Card.tsx
|
|
5
|
+
var Card = forwardRef(({ variant = "default", className, children, ...rest }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
ref,
|
|
8
|
+
className: cn("card", variant === "interactive" && "card--interactive", variant === "compact" && "card--compact", variant === "fill" && "card--fill", className),
|
|
9
|
+
...rest,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
});
|
|
23
13
|
Card.displayName = "Card";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
var CardHeader = forwardRef(({ className, children, ...rest }, ref) => {
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("card__header", className),
|
|
18
|
+
...rest,
|
|
19
|
+
children
|
|
20
|
+
});
|
|
21
|
+
});
|
|
29
22
|
CardHeader.displayName = "CardHeader";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
var CardTitle = forwardRef(({ className, children, ...rest }, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx("h3", {
|
|
25
|
+
ref,
|
|
26
|
+
className: cn("card__title", className),
|
|
27
|
+
...rest,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
});
|
|
35
31
|
CardTitle.displayName = "CardTitle";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
var CardDescription = forwardRef(({ className, children, ...rest }, ref) => {
|
|
33
|
+
return /* @__PURE__ */ jsx("p", {
|
|
34
|
+
ref,
|
|
35
|
+
className: cn("card__description", className),
|
|
36
|
+
...rest,
|
|
37
|
+
children
|
|
38
|
+
});
|
|
39
|
+
});
|
|
41
40
|
CardDescription.displayName = "CardDescription";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
var CardBody = forwardRef(({ className, children, ...rest }, ref) => {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
ref,
|
|
44
|
+
className: cn("card__body", className),
|
|
45
|
+
...rest,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
});
|
|
47
49
|
CardBody.displayName = "CardBody";
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
var CardFooter = forwardRef(({ className, children, ...rest }, ref) => {
|
|
51
|
+
return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
ref,
|
|
53
|
+
className: cn("card__footer", className),
|
|
54
|
+
...rest,
|
|
55
|
+
children
|
|
56
|
+
});
|
|
57
|
+
});
|
|
53
58
|
CardFooter.displayName = "CardFooter";
|
|
54
|
-
export {
|
|
55
|
-
Card,
|
|
56
|
-
CardBody,
|
|
57
|
-
CardDescription,
|
|
58
|
-
CardFooter,
|
|
59
|
-
CardHeader,
|
|
60
|
-
CardTitle
|
|
61
|
-
};
|
|
59
|
+
export { Card, CardBody, CardDescription, CardFooter, CardHeader, CardTitle };
|