@nationaldesignstudio/react 0.2.0 → 0.3.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/dist/components/atoms/background/background.d.ts +13 -27
- package/dist/components/atoms/button/button.d.ts +55 -71
- package/dist/components/atoms/button/icon-button.d.ts +62 -110
- package/dist/components/atoms/input/input-group.d.ts +278 -0
- package/dist/components/atoms/input/input.d.ts +121 -0
- package/dist/components/atoms/select/select.d.ts +131 -0
- package/dist/components/organisms/card/card.d.ts +2 -2
- package/dist/components/sections/prose/prose.d.ts +3 -3
- package/dist/components/sections/river/river.d.ts +1 -1
- package/dist/components/sections/tout/tout.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11034 -7824
- package/dist/index.js.map +1 -1
- package/dist/lib/form-control.d.ts +105 -0
- package/dist/tokens.css +2132 -17329
- package/package.json +1 -1
- package/src/components/atoms/background/background.tsx +71 -109
- package/src/components/atoms/button/button.stories.tsx +42 -0
- package/src/components/atoms/button/button.test.tsx +1 -1
- package/src/components/atoms/button/button.tsx +38 -103
- package/src/components/atoms/button/button.visual.test.tsx +70 -24
- package/src/components/atoms/button/icon-button.tsx +81 -224
- package/src/components/atoms/input/index.ts +17 -0
- package/src/components/atoms/input/input-group.stories.tsx +650 -0
- package/src/components/atoms/input/input-group.test.tsx +376 -0
- package/src/components/atoms/input/input-group.tsx +384 -0
- package/src/components/atoms/input/input.stories.tsx +232 -0
- package/src/components/atoms/input/input.test.tsx +183 -0
- package/src/components/atoms/input/input.tsx +97 -0
- package/src/components/atoms/select/index.ts +18 -0
- package/src/components/atoms/select/select.stories.tsx +455 -0
- package/src/components/atoms/select/select.tsx +320 -0
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
- package/src/components/foundation/typography/typography.stories.tsx +401 -0
- package/src/components/organisms/card/card.stories.tsx +11 -11
- package/src/components/organisms/card/card.test.tsx +1 -1
- package/src/components/organisms/card/card.tsx +2 -2
- package/src/components/organisms/card/card.visual.test.tsx +6 -6
- package/src/components/organisms/navbar/navbar.tsx +2 -2
- package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
- package/src/components/sections/card-grid/card-grid.tsx +1 -1
- package/src/components/sections/faq-section/faq-section.tsx +2 -2
- package/src/components/sections/hero/hero.test.tsx +5 -5
- package/src/components/sections/prose/prose.test.tsx +2 -2
- package/src/components/sections/prose/prose.tsx +4 -5
- package/src/components/sections/river/river.stories.tsx +8 -8
- package/src/components/sections/river/river.test.tsx +1 -1
- package/src/components/sections/river/river.tsx +2 -4
- package/src/components/sections/tout/tout.test.tsx +1 -1
- package/src/components/sections/tout/tout.tsx +2 -2
- package/src/index.ts +41 -0
- package/src/lib/form-control.ts +69 -0
- package/src/stories/Introduction.mdx +29 -15
- package/src/stories/ThemeProvider.stories.tsx +1 -3
- package/src/stories/TokenShowcase.stories.tsx +0 -19
- package/src/stories/TokenShowcase.tsx +714 -1366
- package/src/styles.css +3 -0
- package/src/tests/token-resolution.test.tsx +301 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared form control styles for Input, Select, and similar components.
|
|
3
|
+
*
|
|
4
|
+
* These base styles ensure consistent appearance across all form controls:
|
|
5
|
+
* - Consistent height and padding
|
|
6
|
+
* - Unified focus ring and border treatment
|
|
7
|
+
* - Shared hover/disabled states
|
|
8
|
+
*
|
|
9
|
+
* Based on Figma BaseKit / Interface / Input & Dropdown designs.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Base styles shared by all form controls (input, select, etc.)
|
|
13
|
+
*/
|
|
14
|
+
export declare const formControlBase: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Size variants shared by form controls
|
|
17
|
+
*/
|
|
18
|
+
export declare const formControlSizes: {
|
|
19
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
20
|
+
readonly default: "h-48 px-16 py-10";
|
|
21
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Error state styles shared by form controls
|
|
25
|
+
*/
|
|
26
|
+
export declare const formControlError: {
|
|
27
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
28
|
+
readonly false: "";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Form control variants using tailwind-variants
|
|
32
|
+
* Can be composed with other variants for specific components
|
|
33
|
+
*/
|
|
34
|
+
export declare const formControlVariants: import('tailwind-variants').TVReturnType<{
|
|
35
|
+
size: {
|
|
36
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
37
|
+
readonly default: "h-48 px-16 py-10";
|
|
38
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
39
|
+
};
|
|
40
|
+
error: {
|
|
41
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
42
|
+
readonly false: "";
|
|
43
|
+
};
|
|
44
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
45
|
+
size: {
|
|
46
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
47
|
+
readonly default: "h-48 px-16 py-10";
|
|
48
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
49
|
+
};
|
|
50
|
+
error: {
|
|
51
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
52
|
+
readonly false: "";
|
|
53
|
+
};
|
|
54
|
+
}, {
|
|
55
|
+
size: {
|
|
56
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
57
|
+
readonly default: "h-48 px-16 py-10";
|
|
58
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
59
|
+
};
|
|
60
|
+
error: {
|
|
61
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
62
|
+
readonly false: "";
|
|
63
|
+
};
|
|
64
|
+
}>, {
|
|
65
|
+
size: {
|
|
66
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
67
|
+
readonly default: "h-48 px-16 py-10";
|
|
68
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
69
|
+
};
|
|
70
|
+
error: {
|
|
71
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
72
|
+
readonly false: "";
|
|
73
|
+
};
|
|
74
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
75
|
+
size: {
|
|
76
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
77
|
+
readonly default: "h-48 px-16 py-10";
|
|
78
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
79
|
+
};
|
|
80
|
+
error: {
|
|
81
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
82
|
+
readonly false: "";
|
|
83
|
+
};
|
|
84
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
85
|
+
size: {
|
|
86
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
87
|
+
readonly default: "h-48 px-16 py-10";
|
|
88
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
89
|
+
};
|
|
90
|
+
error: {
|
|
91
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
92
|
+
readonly false: "";
|
|
93
|
+
};
|
|
94
|
+
}, {
|
|
95
|
+
size: {
|
|
96
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
97
|
+
readonly default: "h-48 px-16 py-10";
|
|
98
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
99
|
+
};
|
|
100
|
+
error: {
|
|
101
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
102
|
+
readonly false: "";
|
|
103
|
+
};
|
|
104
|
+
}>, unknown, unknown, undefined>>;
|
|
105
|
+
export type FormControlSize = keyof typeof formControlSizes;
|