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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
export type ToastVariant = "default" | "positive" | "negative" | "warning";
|
|
2
|
+
export type ToastVariant = "default" | "positive" | "negative" | "warning" | "info";
|
|
3
3
|
export interface ToastData {
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
@@ -24,7 +24,7 @@ interface ToastContextValue {
|
|
|
24
24
|
toast: (options: ToastOptions) => void;
|
|
25
25
|
}
|
|
26
26
|
export declare function useToast(): ToastContextValue;
|
|
27
|
-
export declare function ToastProvider({ children, closeLabel, containerLabel }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function ToastProvider({ children, closeLabel, containerLabel, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export declare namespace ToastProvider {
|
|
29
29
|
var displayName: string;
|
|
30
30
|
}
|
|
@@ -41,7 +41,7 @@ export type { DialogProps, DialogHeaderProps, DialogTitleProps, DialogBodyProps,
|
|
|
41
41
|
export { Divider } from "./Divider";
|
|
42
42
|
export type { DividerProps } from "./Divider";
|
|
43
43
|
export { Sidebar, NavItem, SidebarGroupLabel, SidebarDivider } from "./Sidebar";
|
|
44
|
-
export type { SidebarProps, NavItemProps, SidebarGroupLabelProps, SidebarDividerProps } from "./Sidebar";
|
|
44
|
+
export type { SidebarProps, NavItemProps, SidebarGroupLabelProps, SidebarDividerProps, } from "./Sidebar";
|
|
45
45
|
export { TopBar } from "./TopBar";
|
|
46
46
|
export type { TopBarProps } from "./TopBar";
|
|
47
47
|
export { AppLayout } from "./Layout";
|
|
@@ -57,7 +57,7 @@ export type { DropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownIt
|
|
|
57
57
|
export { CommandPalette } from "./CommandPalette";
|
|
58
58
|
export type { CommandPaletteProps, Command } from "./CommandPalette";
|
|
59
59
|
export { Icon } from "./Icon";
|
|
60
|
-
export type { IconProps, IconSize } from "./Icon";
|
|
60
|
+
export type { IconComponent, IconProps, IconSize } from "./Icon";
|
|
61
61
|
export { Heading } from "./Heading";
|
|
62
62
|
export type { HeadingProps, HeadingLevel } from "./Heading";
|
|
63
63
|
export { Text } from "./Text";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { Navbar, NavbarLinks, NavbarLink } from "./Navbar";
|
|
2
|
+
export type { NavbarProps, NavbarLinksProps, NavbarLinkProps } from "./Navbar";
|
|
3
|
+
export { Hero } from "./Hero";
|
|
4
|
+
export type { HeroProps } from "./Hero";
|
|
5
|
+
export { Section, SectionHeader } from "./Section";
|
|
6
|
+
export type { SectionProps, SectionHeaderProps, SectionSize, SectionBackground } from "./Section";
|
|
7
|
+
export { SplitSection } from "./SplitSection";
|
|
8
|
+
export type { SplitSectionProps } from "./SplitSection";
|
|
9
|
+
export { FeatureGrid, FeatureCard } from "./FeatureGrid";
|
|
10
|
+
export type { FeatureGridProps, FeatureCardProps, FeatureGridColumns } from "./FeatureGrid";
|
|
11
|
+
export { Stats, StatItem } from "./Stats";
|
|
12
|
+
export type { StatsProps, StatItemProps } from "./Stats";
|
|
13
|
+
export { PricingGrid, PricingCard } from "./Pricing";
|
|
14
|
+
export type { PricingGridProps, PricingCardProps } from "./Pricing";
|
|
15
|
+
export { TestimonialGrid, TestimonialCard } from "./Testimonial";
|
|
16
|
+
export type { TestimonialGridProps, TestimonialCardProps } from "./Testimonial";
|
|
17
|
+
export { FAQ, FAQItem } from "./FAQ";
|
|
18
|
+
export type { FAQProps, FAQItemProps } from "./FAQ";
|
|
19
|
+
export { CTABanner } from "./CTABanner";
|
|
20
|
+
export type { CTABannerProps } from "./CTABanner";
|
|
21
|
+
export { LPFooter } from "./LPFooter";
|
|
22
|
+
export type { LPFooterProps, FooterColumn } from "./LPFooter";
|
|
@@ -13,5 +13,5 @@ export interface ThemeProviderProps {
|
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
defaultTheme?: Theme;
|
|
15
15
|
}
|
|
16
|
-
export declare function ThemeProvider({ children, defaultTheme
|
|
16
|
+
export declare function ThemeProvider({ children, defaultTheme }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export declare function useTheme(): ThemeContextValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ClassValue } from "./types";
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -82,5 +82,18 @@ export declare const radius: {
|
|
|
82
82
|
readonly "2xl": "var(--radius-2xl)";
|
|
83
83
|
readonly full: "var(--radius-full)";
|
|
84
84
|
};
|
|
85
|
+
/** Switched by `data-density="compact"` on an ancestor. */
|
|
86
|
+
export declare const density: {
|
|
87
|
+
readonly controlHeight: "var(--density-control-height)";
|
|
88
|
+
readonly rowPy: "var(--density-row-py)";
|
|
89
|
+
readonly rowPx: "var(--density-row-px)";
|
|
90
|
+
readonly fontSizeUi: "var(--density-font-size-ui)";
|
|
91
|
+
readonly lineHeightUi: "var(--density-line-height-ui)";
|
|
92
|
+
readonly navPy: "var(--density-nav-py)";
|
|
93
|
+
readonly navGap: "var(--density-nav-gap)";
|
|
94
|
+
readonly dropdownPy: "var(--density-dropdown-py)";
|
|
95
|
+
readonly tabPy: "var(--density-tab-py)";
|
|
96
|
+
};
|
|
85
97
|
export type Theme = "light" | "dark";
|
|
86
98
|
export type Palette = "warm" | "cool";
|
|
99
|
+
export type Density = "default" | "compact";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaze-design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/yuki930/kaze-design-system/issues"
|
|
14
14
|
},
|
|
15
|
-
"description": "Minimal React design system for dashboards and Japanese UI
|
|
15
|
+
"description": "Minimal React design system for dashboards, landing pages and Japanese UI: warm neutral grays, 63 components, light/dark themes, typography tuned for CJK text",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"design-system",
|
|
18
18
|
"react",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./dist/types/components/index.d.ts",
|
|
33
33
|
"import": "./dist/index.js"
|
|
34
34
|
},
|
|
35
|
+
"./marketing": {
|
|
36
|
+
"types": "./dist/types/components/marketing.d.ts",
|
|
37
|
+
"import": "./dist/marketing.js"
|
|
38
|
+
},
|
|
35
39
|
"./hooks": {
|
|
36
40
|
"types": "./dist/types/hooks/index.d.ts",
|
|
37
41
|
"import": "./dist/hooks.js"
|
|
@@ -40,6 +44,7 @@
|
|
|
40
44
|
"types": "./dist/types/tokens/tokens.d.ts",
|
|
41
45
|
"import": "./dist/tokens.js"
|
|
42
46
|
},
|
|
47
|
+
"./package.json": "./package.json",
|
|
43
48
|
"./css/tokens": "./tokens.css",
|
|
44
49
|
"./css/reset": "./reset.css",
|
|
45
50
|
"./css/components": "./components.css",
|
|
@@ -54,6 +59,9 @@
|
|
|
54
59
|
"utilities.css",
|
|
55
60
|
"kaze.css"
|
|
56
61
|
],
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=18"
|
|
64
|
+
},
|
|
57
65
|
"sideEffects": [
|
|
58
66
|
"*.css"
|
|
59
67
|
],
|
|
@@ -63,19 +71,19 @@
|
|
|
63
71
|
"build": "next build",
|
|
64
72
|
"docs:llms": "node scripts/generate-llms.mjs",
|
|
65
73
|
"docs:stories": "node scripts/generate-stories.mjs",
|
|
66
|
-
"
|
|
74
|
+
"size": "npm run build:lib && node scripts/measure-size.mjs",
|
|
75
|
+
"test": "vitest run --project unit",
|
|
76
|
+
"test:storybook": "vitest run --project storybook",
|
|
77
|
+
"test:all": "vitest run",
|
|
67
78
|
"test:watch": "vitest",
|
|
68
79
|
"start": "next start",
|
|
69
80
|
"build:lib": "rm -rf dist && vite build --config vite.config.lib.ts && tsc -p tsconfig.build.json",
|
|
70
81
|
"storybook": "storybook dev -p 6006",
|
|
71
82
|
"build-storybook": "storybook build",
|
|
72
|
-
"typecheck": "tsc --noEmit"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"next": "^16.1.6",
|
|
77
|
-
"react": "^19.2.4",
|
|
78
|
-
"react-dom": "^19.2.4"
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"lint": "biome lint .",
|
|
85
|
+
"format": "biome format .",
|
|
86
|
+
"format:fix": "biome check --write ."
|
|
79
87
|
},
|
|
80
88
|
"peerDependencies": {
|
|
81
89
|
"lucide-react": "^0.575.0",
|
|
@@ -88,6 +96,7 @@
|
|
|
88
96
|
}
|
|
89
97
|
},
|
|
90
98
|
"devDependencies": {
|
|
99
|
+
"@biomejs/biome": "2.6.3",
|
|
91
100
|
"@chromatic-com/storybook": "^5.0.1",
|
|
92
101
|
"@storybook/addon-a11y": "^10.2.10",
|
|
93
102
|
"@storybook/addon-docs": "^10.2.10",
|
|
@@ -104,7 +113,11 @@
|
|
|
104
113
|
"@vitest/browser-playwright": "^4.0.18",
|
|
105
114
|
"@vitest/coverage-v8": "^4.0.18",
|
|
106
115
|
"jsdom": "^28.1.0",
|
|
116
|
+
"lucide-react": "^0.575.0",
|
|
117
|
+
"next": "^16.1.6",
|
|
107
118
|
"playwright": "^1.58.2",
|
|
119
|
+
"react": "^19.2.4",
|
|
120
|
+
"react-dom": "^19.2.4",
|
|
108
121
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
109
122
|
"storybook": "^10.2.10",
|
|
110
123
|
"typescript": "^5.9.3",
|
package/tokens.css
CHANGED
|
@@ -296,6 +296,22 @@
|
|
|
296
296
|
--topbar-height: 3.5rem;
|
|
297
297
|
--content-max-width: 1280px;
|
|
298
298
|
|
|
299
|
+
/* ── Density (component sizing — orthogonal to color theme) ──
|
|
300
|
+
Two-stage system: normal values here, [data-density="compact"]
|
|
301
|
+
overrides below. Attach the attribute to :root or any container;
|
|
302
|
+
custom properties inherit down the subtree either way.
|
|
303
|
+
Every normal value below equals the literal it replaces, so the
|
|
304
|
+
default appearance does not change when this section is added. */
|
|
305
|
+
--density-control-height: 2.25rem; /* Input / Select / Button (default size) */
|
|
306
|
+
--density-row-py: var(--space-3); /* Table cell / List-item vertical padding */
|
|
307
|
+
--density-row-px: var(--space-4); /* Table cell horizontal padding */
|
|
308
|
+
--density-font-size-ui: var(--font-size-sm); /* Table / List / Tabs / Dropdown / Sidebar / controls */
|
|
309
|
+
--density-line-height-ui: var(--line-height-normal); /* Table / List row line-height */
|
|
310
|
+
--density-nav-py: var(--space-2); /* Sidebar nav-item vertical padding */
|
|
311
|
+
--density-nav-gap: var(--space-2-5); /* Sidebar nav-item icon gap */
|
|
312
|
+
--density-dropdown-py: var(--space-1-5); /* Dropdown item vertical padding */
|
|
313
|
+
--density-tab-py: var(--space-2); /* Tabs vertical padding */
|
|
314
|
+
|
|
299
315
|
/* ── Fluid Typography (inspired by Pico CSS) ─────────── */
|
|
300
316
|
/* Root font-size scales fluidly between 640px and 1280px viewport */
|
|
301
317
|
/* Components using rem will scale proportionally */
|
|
@@ -310,6 +326,24 @@
|
|
|
310
326
|
/* 2xl: 1536px — 超ワイド */
|
|
311
327
|
}
|
|
312
328
|
|
|
329
|
+
/* ── Density: compact ──────────────────────────────────────────
|
|
330
|
+
Tightens control height, row padding, UI font-size and line-height
|
|
331
|
+
by roughly one step. Works wherever the attribute is applied —
|
|
332
|
+
:root for a whole app, or a single container (e.g. a dense table
|
|
333
|
+
panel) — since custom properties inherit to descendants either way.
|
|
334
|
+
Orthogonal to [data-theme] / [data-palette]: combine freely. ──── */
|
|
335
|
+
[data-density="compact"] {
|
|
336
|
+
--density-control-height: 2rem;
|
|
337
|
+
--density-row-py: var(--space-2);
|
|
338
|
+
--density-row-px: var(--space-3);
|
|
339
|
+
--density-font-size-ui: var(--font-size-xs);
|
|
340
|
+
--density-line-height-ui: var(--line-height-snug);
|
|
341
|
+
--density-nav-py: var(--space-1-5);
|
|
342
|
+
--density-nav-gap: var(--space-2);
|
|
343
|
+
--density-dropdown-py: var(--space-1);
|
|
344
|
+
--density-tab-py: var(--space-1-5);
|
|
345
|
+
}
|
|
346
|
+
|
|
313
347
|
/* ── Dark Theme ────────────────────────────────────────────── */
|
|
314
348
|
[data-theme="dark"] {
|
|
315
349
|
--color-bg: var(--zinc-950);
|
|
@@ -446,8 +480,10 @@
|
|
|
446
480
|
/* ── Dark Theme Fallback (JS-disabled) ────────────────────── */
|
|
447
481
|
/* When JS is unavailable, respect OS dark mode preference.
|
|
448
482
|
If JS sets data-theme="light", this will NOT apply (thanks to :not()).
|
|
449
|
-
If JS sets data-theme="dark",
|
|
450
|
-
|
|
483
|
+
If JS sets data-theme="dark", this block applies too (same values as
|
|
484
|
+
[data-theme="dark"]; :root:not(...) is the higher specificity).
|
|
485
|
+
The cool palette needs its own fallback below, otherwise this block
|
|
486
|
+
(0,2,0, later in source) overrides [data-palette="cool"][data-theme="dark"]. */
|
|
451
487
|
@media (prefers-color-scheme: dark) {
|
|
452
488
|
:root:not([data-theme="light"]) {
|
|
453
489
|
--color-bg: var(--zinc-950);
|
|
@@ -515,3 +551,37 @@
|
|
|
515
551
|
--ring-color: rgba(168, 162, 158, 0.3);
|
|
516
552
|
}
|
|
517
553
|
}
|
|
554
|
+
|
|
555
|
+
/* Cool palette × OS dark fallback (specificity 0,3,0 beats the zinc fallback) */
|
|
556
|
+
@media (prefers-color-scheme: dark) {
|
|
557
|
+
:root[data-palette="cool"]:not([data-theme="light"]) {
|
|
558
|
+
--color-bg: var(--slate-950);
|
|
559
|
+
--color-bg-secondary: var(--slate-900);
|
|
560
|
+
--color-bg-tertiary: var(--slate-800);
|
|
561
|
+
--color-bg-inverse: #ffffff;
|
|
562
|
+
|
|
563
|
+
--color-fg: var(--slate-50);
|
|
564
|
+
--color-fg-secondary: var(--slate-400);
|
|
565
|
+
--color-fg-tertiary: var(--slate-400);
|
|
566
|
+
--color-fg-inverse: var(--slate-950);
|
|
567
|
+
--color-fg-muted: var(--slate-400);
|
|
568
|
+
|
|
569
|
+
--color-border: var(--slate-800);
|
|
570
|
+
--color-border-strong: var(--slate-700);
|
|
571
|
+
--color-border-subtle: var(--slate-900);
|
|
572
|
+
|
|
573
|
+
--color-surface: var(--slate-900);
|
|
574
|
+
--color-surface-hover: var(--slate-800);
|
|
575
|
+
--color-surface-active: var(--slate-700);
|
|
576
|
+
|
|
577
|
+
--color-primary: #ffffff;
|
|
578
|
+
--color-primary-fg: var(--slate-950);
|
|
579
|
+
--color-primary-hover: var(--slate-200);
|
|
580
|
+
|
|
581
|
+
--color-secondary: var(--slate-800);
|
|
582
|
+
--color-secondary-fg: var(--slate-100);
|
|
583
|
+
--color-secondary-hover: var(--slate-700);
|
|
584
|
+
|
|
585
|
+
--ring-color: rgba(204, 202, 216, 0.3);
|
|
586
|
+
}
|
|
587
|
+
}
|
package/utilities.css
CHANGED
|
@@ -404,6 +404,11 @@
|
|
|
404
404
|
[data-theme="dark"] .theme-photo {
|
|
405
405
|
filter: brightness(0.8) contrast(1.1);
|
|
406
406
|
}
|
|
407
|
+
@media (prefers-color-scheme: dark) {
|
|
408
|
+
:root:not([data-theme="light"]) .theme-photo {
|
|
409
|
+
filter: brightness(0.8) contrast(1.1);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
407
412
|
|
|
408
413
|
/* ============================================================
|
|
409
414
|
Responsive Utilities
|