@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
|
@@ -6,17 +6,18 @@ import * as React from "react";
|
|
|
6
6
|
* Button component based on Figma Button component
|
|
7
7
|
*
|
|
8
8
|
* Variants (matches Figma):
|
|
9
|
-
* - primary:
|
|
10
|
-
* -
|
|
11
|
-
* - secondary:
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* - ghost
|
|
9
|
+
* - primary: Blue filled button for primary actions
|
|
10
|
+
* - default: Dark filled button for secondary prominence
|
|
11
|
+
* - secondary: Light gray filled button with subtle border
|
|
12
|
+
* - destructive: Red filled button for destructive actions
|
|
13
|
+
* - outline: Bordered button with transparent background
|
|
14
|
+
* - ghost: Transparent button with subtle hover
|
|
15
|
+
* - link: Text-only button with underline on hover
|
|
15
16
|
*
|
|
16
|
-
* Sizes:
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
17
|
+
* Sizes (matches Figma):
|
|
18
|
+
* - sm: Small buttons (32px height)
|
|
19
|
+
* - default: Default buttons (36px height)
|
|
20
|
+
* - lg: Large buttons (40px height)
|
|
20
21
|
*
|
|
21
22
|
* For icon-only buttons, use the IconButton component instead.
|
|
22
23
|
*
|
|
@@ -26,107 +27,114 @@ import * as React from "react";
|
|
|
26
27
|
declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
27
28
|
variant: {
|
|
28
29
|
primary: string;
|
|
29
|
-
|
|
30
|
+
default: string;
|
|
30
31
|
secondary: string;
|
|
31
|
-
|
|
32
|
+
destructive: string;
|
|
33
|
+
outline: string;
|
|
32
34
|
ghost: string;
|
|
33
|
-
|
|
35
|
+
link: string;
|
|
34
36
|
themed: string;
|
|
35
37
|
};
|
|
36
38
|
size: {
|
|
37
|
-
lg: string;
|
|
38
|
-
md: string;
|
|
39
39
|
sm: string;
|
|
40
|
+
default: string;
|
|
41
|
+
lg: string;
|
|
40
42
|
};
|
|
41
|
-
}, undefined, "inline-flex items-center justify-center gap-
|
|
43
|
+
}, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
42
44
|
variant: {
|
|
43
45
|
primary: string;
|
|
44
|
-
|
|
46
|
+
default: string;
|
|
45
47
|
secondary: string;
|
|
46
|
-
|
|
48
|
+
destructive: string;
|
|
49
|
+
outline: string;
|
|
47
50
|
ghost: string;
|
|
48
|
-
|
|
51
|
+
link: string;
|
|
49
52
|
themed: string;
|
|
50
53
|
};
|
|
51
54
|
size: {
|
|
52
|
-
lg: string;
|
|
53
|
-
md: string;
|
|
54
55
|
sm: string;
|
|
56
|
+
default: string;
|
|
57
|
+
lg: string;
|
|
55
58
|
};
|
|
56
59
|
}, {
|
|
57
60
|
variant: {
|
|
58
61
|
primary: string;
|
|
59
|
-
|
|
62
|
+
default: string;
|
|
60
63
|
secondary: string;
|
|
61
|
-
|
|
64
|
+
destructive: string;
|
|
65
|
+
outline: string;
|
|
62
66
|
ghost: string;
|
|
63
|
-
|
|
67
|
+
link: string;
|
|
64
68
|
themed: string;
|
|
65
69
|
};
|
|
66
70
|
size: {
|
|
67
|
-
lg: string;
|
|
68
|
-
md: string;
|
|
69
71
|
sm: string;
|
|
72
|
+
default: string;
|
|
73
|
+
lg: string;
|
|
70
74
|
};
|
|
71
75
|
}>, {
|
|
72
76
|
variant: {
|
|
73
77
|
primary: string;
|
|
74
|
-
|
|
78
|
+
default: string;
|
|
75
79
|
secondary: string;
|
|
76
|
-
|
|
80
|
+
destructive: string;
|
|
81
|
+
outline: string;
|
|
77
82
|
ghost: string;
|
|
78
|
-
|
|
83
|
+
link: string;
|
|
79
84
|
themed: string;
|
|
80
85
|
};
|
|
81
86
|
size: {
|
|
82
|
-
lg: string;
|
|
83
|
-
md: string;
|
|
84
87
|
sm: string;
|
|
88
|
+
default: string;
|
|
89
|
+
lg: string;
|
|
85
90
|
};
|
|
86
91
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
87
92
|
variant: {
|
|
88
93
|
primary: string;
|
|
89
|
-
|
|
94
|
+
default: string;
|
|
90
95
|
secondary: string;
|
|
91
|
-
|
|
96
|
+
destructive: string;
|
|
97
|
+
outline: string;
|
|
92
98
|
ghost: string;
|
|
93
|
-
|
|
99
|
+
link: string;
|
|
94
100
|
themed: string;
|
|
95
101
|
};
|
|
96
102
|
size: {
|
|
97
|
-
lg: string;
|
|
98
|
-
md: string;
|
|
99
103
|
sm: string;
|
|
104
|
+
default: string;
|
|
105
|
+
lg: string;
|
|
100
106
|
};
|
|
101
|
-
}, undefined, "inline-flex items-center justify-center gap-
|
|
107
|
+
}, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
102
108
|
variant: {
|
|
103
109
|
primary: string;
|
|
104
|
-
|
|
110
|
+
default: string;
|
|
105
111
|
secondary: string;
|
|
106
|
-
|
|
112
|
+
destructive: string;
|
|
113
|
+
outline: string;
|
|
107
114
|
ghost: string;
|
|
108
|
-
|
|
115
|
+
link: string;
|
|
109
116
|
themed: string;
|
|
110
117
|
};
|
|
111
118
|
size: {
|
|
112
|
-
lg: string;
|
|
113
|
-
md: string;
|
|
114
119
|
sm: string;
|
|
120
|
+
default: string;
|
|
121
|
+
lg: string;
|
|
115
122
|
};
|
|
116
123
|
}, {
|
|
117
124
|
variant: {
|
|
118
125
|
primary: string;
|
|
119
|
-
|
|
126
|
+
default: string;
|
|
120
127
|
secondary: string;
|
|
121
|
-
|
|
128
|
+
destructive: string;
|
|
129
|
+
outline: string;
|
|
122
130
|
ghost: string;
|
|
123
|
-
|
|
131
|
+
link: string;
|
|
124
132
|
themed: string;
|
|
125
133
|
};
|
|
126
134
|
size: {
|
|
127
|
-
lg: string;
|
|
128
|
-
md: string;
|
|
129
135
|
sm: string;
|
|
136
|
+
default: string;
|
|
137
|
+
lg: string;
|
|
130
138
|
};
|
|
131
139
|
}>, unknown, unknown, undefined>>;
|
|
132
140
|
export type HTMLButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,15 +11,15 @@ import * as React from "react";
|
|
|
11
11
|
* - Disabled: Disabled background (via :disabled)
|
|
12
12
|
*
|
|
13
13
|
* Sizes:
|
|
14
|
-
* - sm: Smaller height and padding
|
|
15
|
-
* - default: Standard 48px
|
|
16
|
-
* - lg: Larger height and padding
|
|
14
|
+
* - sm: Smaller height and padding (36px)
|
|
15
|
+
* - default: Standard height (48px)
|
|
16
|
+
* - lg: Larger height and padding (56px)
|
|
17
17
|
*/
|
|
18
18
|
declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
19
19
|
size: {
|
|
20
|
-
readonly sm: "h-
|
|
21
|
-
readonly default: "h-
|
|
22
|
-
readonly lg: "h-
|
|
20
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
21
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
22
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
23
23
|
};
|
|
24
24
|
error: {
|
|
25
25
|
true: string;
|
|
@@ -27,9 +27,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
27
27
|
};
|
|
28
28
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
29
29
|
size: {
|
|
30
|
-
readonly sm: "h-
|
|
31
|
-
readonly default: "h-
|
|
32
|
-
readonly lg: "h-
|
|
30
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
31
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
32
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
33
33
|
};
|
|
34
34
|
error: {
|
|
35
35
|
true: string;
|
|
@@ -37,9 +37,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
37
37
|
};
|
|
38
38
|
}, {
|
|
39
39
|
size: {
|
|
40
|
-
readonly sm: "h-
|
|
41
|
-
readonly default: "h-
|
|
42
|
-
readonly lg: "h-
|
|
40
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
41
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
42
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
43
43
|
};
|
|
44
44
|
error: {
|
|
45
45
|
true: string;
|
|
@@ -47,9 +47,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
47
47
|
};
|
|
48
48
|
}>, {
|
|
49
49
|
size: {
|
|
50
|
-
readonly sm: "h-
|
|
51
|
-
readonly default: "h-
|
|
52
|
-
readonly lg: "h-
|
|
50
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
51
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
52
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
53
53
|
};
|
|
54
54
|
error: {
|
|
55
55
|
true: string;
|
|
@@ -57,9 +57,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
57
57
|
};
|
|
58
58
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
59
59
|
size: {
|
|
60
|
-
readonly sm: "h-
|
|
61
|
-
readonly default: "h-
|
|
62
|
-
readonly lg: "h-
|
|
60
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
61
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
62
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
63
63
|
};
|
|
64
64
|
error: {
|
|
65
65
|
true: string;
|
|
@@ -67,9 +67,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
67
67
|
};
|
|
68
68
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
69
69
|
size: {
|
|
70
|
-
readonly sm: "h-
|
|
71
|
-
readonly default: "h-
|
|
72
|
-
readonly lg: "h-
|
|
70
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
71
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
72
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
73
73
|
};
|
|
74
74
|
error: {
|
|
75
75
|
true: string;
|
|
@@ -77,9 +77,9 @@ declare const inputVariants: import('tailwind-variants').TVReturnType<{
|
|
|
77
77
|
};
|
|
78
78
|
}, {
|
|
79
79
|
size: {
|
|
80
|
-
readonly sm: "h-
|
|
81
|
-
readonly default: "h-
|
|
82
|
-
readonly lg: "h-
|
|
80
|
+
readonly sm: "h-spatial-ui-input-height-small px-spatial-ui-input-padding-x-small py-spatial-ui-input-padding-y-small typography-body-sm-md";
|
|
81
|
+
readonly default: "h-spatial-ui-input-height-medium px-spatial-ui-input-padding-x-medium py-spatial-ui-input-padding-y-medium typography-body-md-md";
|
|
82
|
+
readonly lg: "h-spatial-ui-input-height-large px-spatial-ui-input-padding-x-large py-spatial-ui-input-padding-y-large typography-body-md-lg";
|
|
83
83
|
};
|
|
84
84
|
error: {
|
|
85
85
|
true: string;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Popover as BasePopover } from '@base-ui-components/react/popover';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Popover popup variants
|
|
6
|
+
*
|
|
7
|
+
* Uses semantic overlay tokens for themeable styling:
|
|
8
|
+
* - color.overlay.background - Light background
|
|
9
|
+
* - color.overlay.border - Subtle border
|
|
10
|
+
* - color.overlay.text - Primary text
|
|
11
|
+
* - surface.overlay.radius - Rounded corners
|
|
12
|
+
* - spatial.component.overlay.padding/gap - Consistent spacing
|
|
13
|
+
*/
|
|
14
|
+
declare const popoverPopupVariants: import('tailwind-variants').TVReturnType<{
|
|
15
|
+
variant: {
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
19
|
+
variant: {
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
variant: {
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}>, {
|
|
27
|
+
variant: {
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
31
|
+
variant: {
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
35
|
+
variant: {
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
variant: {
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
}>, unknown, unknown, undefined>>;
|
|
43
|
+
/**
|
|
44
|
+
* Popover arrow variants - uses shared floating arrow variants
|
|
45
|
+
*/
|
|
46
|
+
declare const popoverArrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
47
|
+
export interface PopoverRootProps extends BasePopover.Root.Props {
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Popover Root
|
|
52
|
+
*
|
|
53
|
+
* Groups all popover parts. Does not render an element.
|
|
54
|
+
*/
|
|
55
|
+
declare const PopoverRoot: ({ children, ...props }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export interface PopoverTriggerProps extends React.ComponentProps<typeof BasePopover.Trigger> {
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Popover Trigger
|
|
61
|
+
*
|
|
62
|
+
* The element that triggers the popover on click.
|
|
63
|
+
* Renders as the child element with popover behavior attached.
|
|
64
|
+
* When children is a single React element, uses `render` prop to avoid wrapper element.
|
|
65
|
+
*/
|
|
66
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
export interface PopoverPortalProps extends BasePopover.Portal.Props {
|
|
68
|
+
children: React.ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Popover Portal
|
|
72
|
+
*
|
|
73
|
+
* Renders the popover popup in a portal outside the DOM hierarchy.
|
|
74
|
+
*/
|
|
75
|
+
declare const PopoverPortal: ({ children, ...props }: PopoverPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export interface PopoverBackdropProps extends Omit<React.ComponentProps<typeof BasePopover.Backdrop>, "className"> {
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Popover Backdrop
|
|
81
|
+
*
|
|
82
|
+
* Optional backdrop element that can be used to close the popover on click.
|
|
83
|
+
*/
|
|
84
|
+
declare const PopoverBackdrop: React.ForwardRefExoticComponent<Omit<PopoverBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
export interface PopoverPositionerProps extends Omit<React.ComponentProps<typeof BasePopover.Positioner>, "className"> {
|
|
86
|
+
className?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Popover Positioner
|
|
90
|
+
*
|
|
91
|
+
* Positions the popover popup relative to the trigger.
|
|
92
|
+
*/
|
|
93
|
+
declare const PopoverPositioner: React.ForwardRefExoticComponent<Omit<PopoverPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
export interface PopoverPopupProps extends Omit<React.ComponentProps<typeof BasePopover.Popup>, "className">, VariantProps<typeof popoverPopupVariants> {
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Popover Popup
|
|
99
|
+
*
|
|
100
|
+
* The popover content container with styled appearance.
|
|
101
|
+
*/
|
|
102
|
+
declare const PopoverPopup: React.ForwardRefExoticComponent<Omit<PopoverPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
export interface PopoverArrowProps extends Omit<React.ComponentProps<typeof BasePopover.Arrow>, "className"> {
|
|
104
|
+
className?: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Popover Arrow
|
|
108
|
+
*
|
|
109
|
+
* Visual pointer element for the popover.
|
|
110
|
+
* Uses shared FloatingArrowSvg with overlay color tokens for fill and border.
|
|
111
|
+
*/
|
|
112
|
+
declare const PopoverArrow: React.ForwardRefExoticComponent<Omit<PopoverArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
export interface PopoverTitleProps extends Omit<React.ComponentProps<typeof BasePopover.Title>, "className"> {
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Popover Title
|
|
118
|
+
*
|
|
119
|
+
* Title element for the popover content.
|
|
120
|
+
*/
|
|
121
|
+
declare const PopoverTitle: React.ForwardRefExoticComponent<Omit<PopoverTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
122
|
+
export interface PopoverDescriptionProps extends Omit<React.ComponentProps<typeof BasePopover.Description>, "className"> {
|
|
123
|
+
className?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Popover Description
|
|
127
|
+
*
|
|
128
|
+
* Description element for the popover content.
|
|
129
|
+
*/
|
|
130
|
+
declare const PopoverDescription: React.ForwardRefExoticComponent<Omit<PopoverDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
131
|
+
export interface PopoverCloseProps extends Omit<React.ComponentProps<typeof BasePopover.Close>, "className"> {
|
|
132
|
+
className?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Popover Close
|
|
136
|
+
*
|
|
137
|
+
* Close button for the popover.
|
|
138
|
+
*/
|
|
139
|
+
declare const PopoverClose: React.ForwardRefExoticComponent<Omit<PopoverCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
140
|
+
export interface PopoverProps {
|
|
141
|
+
/** The content to show in the popover */
|
|
142
|
+
children: React.ReactNode;
|
|
143
|
+
/** The element that triggers the popover */
|
|
144
|
+
trigger: React.ReactNode;
|
|
145
|
+
/** Title for the popover (optional) */
|
|
146
|
+
title?: React.ReactNode;
|
|
147
|
+
/** Side of the trigger to show the popover */
|
|
148
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
149
|
+
/** Offset from the trigger */
|
|
150
|
+
sideOffset?: number;
|
|
151
|
+
/** Alignment along the side */
|
|
152
|
+
align?: "start" | "center" | "end";
|
|
153
|
+
/** Whether to show an arrow */
|
|
154
|
+
showArrow?: boolean;
|
|
155
|
+
/** Whether to show a close button */
|
|
156
|
+
showClose?: boolean;
|
|
157
|
+
/** Controlled open state */
|
|
158
|
+
open?: boolean;
|
|
159
|
+
/** Default open state */
|
|
160
|
+
defaultOpen?: boolean;
|
|
161
|
+
/** Callback when open state changes */
|
|
162
|
+
onOpenChange?: (open: boolean) => void;
|
|
163
|
+
/** Additional className for the popup */
|
|
164
|
+
className?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Popover
|
|
168
|
+
*
|
|
169
|
+
* A simple, pre-composed popover component for common use cases.
|
|
170
|
+
* For more complex needs, use the compound components directly.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```tsx
|
|
174
|
+
* <Popover
|
|
175
|
+
* trigger={<Button>Click me</Button>}
|
|
176
|
+
* title="Popover Title"
|
|
177
|
+
* >
|
|
178
|
+
* <p>This is the popover content.</p>
|
|
179
|
+
* </Popover>
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
declare const Popover: ({ children, trigger, title, side, sideOffset, align, showArrow, showClose, open, defaultOpen, onOpenChange, className, }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
183
|
+
export declare const PopoverParts: (({ children, ...props }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
184
|
+
Root: ({ children, ...props }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
185
|
+
Trigger: React.ForwardRefExoticComponent<Omit<PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
186
|
+
Portal: ({ children, ...props }: PopoverPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
187
|
+
Backdrop: React.ForwardRefExoticComponent<Omit<PopoverBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
188
|
+
Positioner: React.ForwardRefExoticComponent<Omit<PopoverPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
189
|
+
Popup: React.ForwardRefExoticComponent<Omit<PopoverPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
190
|
+
Arrow: React.ForwardRefExoticComponent<Omit<PopoverArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
191
|
+
Title: React.ForwardRefExoticComponent<Omit<PopoverTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
192
|
+
Description: React.ForwardRefExoticComponent<Omit<PopoverDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
193
|
+
Close: React.ForwardRefExoticComponent<Omit<PopoverCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
194
|
+
};
|
|
195
|
+
export { Popover, PopoverRoot, PopoverTrigger, PopoverPortal, PopoverBackdrop, PopoverPositioner, PopoverPopup, PopoverArrow, PopoverTitle, PopoverDescription, PopoverClose, popoverPopupVariants, popoverArrowVariants, };
|
|
@@ -13,9 +13,9 @@ import * as React from "react";
|
|
|
13
13
|
*/
|
|
14
14
|
declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
15
15
|
size: {
|
|
16
|
-
readonly sm: "h-
|
|
17
|
-
readonly default: "h-
|
|
18
|
-
readonly lg: "h-
|
|
16
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
17
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
18
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
19
19
|
};
|
|
20
20
|
error: {
|
|
21
21
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -23,9 +23,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
23
23
|
};
|
|
24
24
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
25
25
|
size: {
|
|
26
|
-
readonly sm: "h-
|
|
27
|
-
readonly default: "h-
|
|
28
|
-
readonly lg: "h-
|
|
26
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
27
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
28
|
+
readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
|
|
29
29
|
};
|
|
30
30
|
error: {
|
|
31
31
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -33,9 +33,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
33
33
|
};
|
|
34
34
|
}, {
|
|
35
35
|
size: {
|
|
36
|
-
readonly sm: "h-
|
|
37
|
-
readonly default: "h-
|
|
38
|
-
readonly lg: "h-
|
|
36
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
37
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
38
|
+
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
39
|
};
|
|
40
40
|
error: {
|
|
41
41
|
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 +43,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
43
43
|
};
|
|
44
44
|
}>, {
|
|
45
45
|
size: {
|
|
46
|
-
readonly sm: "h-
|
|
47
|
-
readonly default: "h-
|
|
48
|
-
readonly lg: "h-
|
|
46
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
47
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
48
|
+
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
49
|
};
|
|
50
50
|
error: {
|
|
51
51
|
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 +53,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
53
53
|
};
|
|
54
54
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
55
55
|
size: {
|
|
56
|
-
readonly sm: "h-
|
|
57
|
-
readonly default: "h-
|
|
58
|
-
readonly lg: "h-
|
|
56
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
57
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
58
|
+
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
59
|
};
|
|
60
60
|
error: {
|
|
61
61
|
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 +63,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
63
63
|
};
|
|
64
64
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
65
65
|
size: {
|
|
66
|
-
readonly sm: "h-
|
|
67
|
-
readonly default: "h-
|
|
68
|
-
readonly lg: "h-
|
|
66
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
67
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
68
|
+
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
69
|
};
|
|
70
70
|
error: {
|
|
71
71
|
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 +73,9 @@ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
|
73
73
|
};
|
|
74
74
|
}, {
|
|
75
75
|
size: {
|
|
76
|
-
readonly sm: "h-
|
|
77
|
-
readonly default: "h-
|
|
78
|
-
readonly lg: "h-
|
|
76
|
+
readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
|
|
77
|
+
readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
|
|
78
|
+
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
79
|
};
|
|
80
80
|
error: {
|
|
81
81
|
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
@@ -96,10 +96,10 @@ declare const selectPopupVariants: import('tailwind-variants').TVReturnType<{} |
|
|
|
96
96
|
* - Disabled: Reduced opacity
|
|
97
97
|
*/
|
|
98
98
|
declare const selectOptionVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
99
|
-
export interface SelectProps extends BaseSelect.Root.Props {
|
|
99
|
+
export interface SelectProps<Value = string> extends BaseSelect.Root.Props<Value> {
|
|
100
100
|
children: React.ReactNode;
|
|
101
101
|
}
|
|
102
|
-
declare const SelectRoot: ({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
declare const SelectRoot: <Value = string>({ children, ...props }: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element;
|
|
103
103
|
export interface SelectTriggerProps extends Omit<React.ComponentProps<typeof BaseSelect.Trigger>, "className">, VariantProps<typeof selectTriggerVariants> {
|
|
104
104
|
className?: string;
|
|
105
105
|
placeholder?: string;
|
|
@@ -121,7 +121,7 @@ export interface SelectGroupLabelProps extends Omit<React.ComponentProps<typeof
|
|
|
121
121
|
className?: string;
|
|
122
122
|
}
|
|
123
123
|
declare const SelectGroupLabel: React.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
124
|
-
export declare const Select: (({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
124
|
+
export declare const Select: (<Value = string>({ children, ...props }: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element) & {
|
|
125
125
|
Trigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
126
126
|
Popup: React.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
127
127
|
Option: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|