@nationaldesignstudio/react 0.3.0 → 0.5.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/component-registry.md +1310 -127
- package/dist/components/atoms/button/button.d.ts +55 -47
- package/dist/components/atoms/button/button.figma.d.ts +1 -0
- package/dist/components/atoms/input/input.d.ts +24 -24
- package/dist/components/atoms/popover/popover.d.ts +195 -0
- package/dist/components/atoms/select/select.d.ts +24 -24
- package/dist/components/atoms/tooltip/tooltip.d.ts +161 -0
- package/dist/components/organisms/card/card.d.ts +1 -1
- package/dist/components/sections/hero/hero.d.ts +2 -2
- package/dist/components/sections/tout/tout.d.ts +3 -3
- package/dist/components/shared/floating-arrow.d.ts +34 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +11602 -8499
- package/dist/index.js.map +1 -1
- package/dist/lib/form-control.d.ts +25 -24
- package/dist/tokens.css +4797 -3940
- package/package.json +2 -1
- package/src/components/atoms/accordion/accordion.stories.tsx +1 -1
- package/src/components/atoms/accordion/accordion.tsx +2 -2
- package/src/components/atoms/button/button.figma.tsx +37 -0
- package/src/components/atoms/button/button.stories.tsx +236 -140
- package/src/components/atoms/button/button.test.tsx +289 -5
- package/src/components/atoms/button/button.tsx +37 -33
- package/src/components/atoms/button/button.visual.test.tsx +26 -76
- package/src/components/atoms/button/icon-button.stories.tsx +44 -101
- package/src/components/atoms/button/icon-button.test.tsx +26 -94
- package/src/components/atoms/button/icon-button.tsx +3 -3
- package/src/components/atoms/input/input-group.stories.tsx +4 -8
- package/src/components/atoms/input/input-group.test.tsx +14 -28
- package/src/components/atoms/input/input-group.tsx +57 -32
- package/src/components/atoms/input/input.stories.tsx +14 -18
- package/src/components/atoms/input/input.test.tsx +4 -20
- package/src/components/atoms/input/input.tsx +16 -9
- package/src/components/atoms/pager-control/pager-control.stories.tsx +6 -8
- package/src/components/atoms/pager-control/pager-control.tsx +12 -12
- package/src/components/atoms/popover/index.ts +30 -0
- package/src/components/atoms/popover/popover.stories.tsx +531 -0
- package/src/components/atoms/popover/popover.test.tsx +486 -0
- package/src/components/atoms/popover/popover.tsx +488 -0
- package/src/components/atoms/select/select.tsx +12 -8
- package/src/components/atoms/tooltip/index.ts +24 -0
- package/src/components/atoms/tooltip/tooltip.stories.tsx +348 -0
- package/src/components/atoms/tooltip/tooltip.test.tsx +363 -0
- package/src/components/atoms/tooltip/tooltip.tsx +347 -0
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +8 -13
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.tsx +3 -3
- package/src/components/organisms/card/card.stories.tsx +19 -19
- package/src/components/organisms/card/card.tsx +1 -1
- package/src/components/organisms/card/card.visual.test.tsx +11 -11
- package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
- package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +2 -2
- package/src/components/sections/banner/banner.stories.tsx +1 -5
- package/src/components/sections/banner/banner.test.tsx +2 -2
- package/src/components/sections/banner/banner.tsx +6 -6
- package/src/components/sections/card-grid/card-grid.tsx +4 -4
- package/src/components/sections/hero/hero.stories.tsx +7 -7
- package/src/components/sections/hero/hero.tsx +10 -11
- package/src/components/sections/prose/prose.tsx +2 -2
- package/src/components/sections/river/river.test.tsx +3 -3
- package/src/components/sections/river/river.tsx +6 -12
- package/src/components/sections/tout/tout.stories.tsx +7 -31
- package/src/components/sections/tout/tout.tsx +9 -9
- package/src/components/sections/two-column-section/two-column-section.tsx +7 -9
- package/src/components/shared/floating-arrow.tsx +78 -0
- package/src/components/shared/index.ts +5 -0
- package/src/index.ts +57 -0
- package/src/lib/form-control.ts +8 -6
- package/src/stories/grid-system.stories.tsx +309 -0
- package/src/stories/{ThemeProvider.stories.tsx → theme-provider.stories.tsx} +7 -19
- package/src/stories/{TokenShowcase.stories.tsx → token-showcase.stories.tsx} +1 -1
- package/src/stories/{TokenShowcase.tsx → token-showcase.tsx} +34 -34
- package/src/styles.css +3 -3
- package/src/tests/token-resolution.test.tsx +6 -9
- package/src/theme/hooks.ts +1 -1
- package/src/theme/index.ts +1 -1
- package/src/theme/theme-provider.test.tsx +270 -0
- package/src/theme/{ThemeProvider.tsx → theme-provider.tsx} +18 -2
- package/src/stories/GridSystem.stories.tsx +0 -84
- /package/src/stories/{Introduction.mdx → introduction.mdx} +0 -0
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
export declare const formControlBase: string[];
|
|
15
15
|
/**
|
|
16
16
|
* Size variants shared by form controls
|
|
17
|
+
* Uses spatial tokens for consistent sizing across form controls
|
|
17
18
|
*/
|
|
18
19
|
export declare const formControlSizes: {
|
|
19
|
-
readonly sm: "h-
|
|
20
|
-
readonly default: "h-
|
|
21
|
-
readonly lg: "h-
|
|
20
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
21
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
22
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* Error state styles shared by form controls
|
|
@@ -33,9 +34,9 @@ export declare const formControlError: {
|
|
|
33
34
|
*/
|
|
34
35
|
export declare const formControlVariants: import('tailwind-variants').TVReturnType<{
|
|
35
36
|
size: {
|
|
36
|
-
readonly sm: "h-
|
|
37
|
-
readonly default: "h-
|
|
38
|
-
readonly lg: "h-
|
|
37
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
38
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
39
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
39
40
|
};
|
|
40
41
|
error: {
|
|
41
42
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -43,9 +44,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
43
44
|
};
|
|
44
45
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
45
46
|
size: {
|
|
46
|
-
readonly sm: "h-
|
|
47
|
-
readonly default: "h-
|
|
48
|
-
readonly lg: "h-
|
|
47
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
48
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
49
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
49
50
|
};
|
|
50
51
|
error: {
|
|
51
52
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -53,9 +54,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
53
54
|
};
|
|
54
55
|
}, {
|
|
55
56
|
size: {
|
|
56
|
-
readonly sm: "h-
|
|
57
|
-
readonly default: "h-
|
|
58
|
-
readonly lg: "h-
|
|
57
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
58
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
59
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
59
60
|
};
|
|
60
61
|
error: {
|
|
61
62
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -63,9 +64,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
63
64
|
};
|
|
64
65
|
}>, {
|
|
65
66
|
size: {
|
|
66
|
-
readonly sm: "h-
|
|
67
|
-
readonly default: "h-
|
|
68
|
-
readonly lg: "h-
|
|
67
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
68
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
69
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
69
70
|
};
|
|
70
71
|
error: {
|
|
71
72
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -73,9 +74,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
73
74
|
};
|
|
74
75
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
75
76
|
size: {
|
|
76
|
-
readonly sm: "h-
|
|
77
|
-
readonly default: "h-
|
|
78
|
-
readonly lg: "h-
|
|
77
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
78
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
79
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
79
80
|
};
|
|
80
81
|
error: {
|
|
81
82
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -83,9 +84,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
83
84
|
};
|
|
84
85
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
85
86
|
size: {
|
|
86
|
-
readonly sm: "h-
|
|
87
|
-
readonly default: "h-
|
|
88
|
-
readonly lg: "h-
|
|
87
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
88
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
89
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
89
90
|
};
|
|
90
91
|
error: {
|
|
91
92
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -93,9 +94,9 @@ export declare const formControlVariants: import('tailwind-variants').TVReturnTy
|
|
|
93
94
|
};
|
|
94
95
|
}, {
|
|
95
96
|
size: {
|
|
96
|
-
readonly sm: "h-
|
|
97
|
-
readonly default: "h-
|
|
98
|
-
readonly lg: "h-
|
|
97
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
98
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
99
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
99
100
|
};
|
|
100
101
|
error: {
|
|
101
102
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|