@nation-a/ui 0.2.1 → 0.4.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/index.cjs +4356 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +4356 -0
- package/dist/index.js.map +1 -0
- package/dist/styled-system/css/conditions.mjs +36 -0
- package/dist/styled-system/css/css.d.ts +22 -0
- package/dist/styled-system/css/css.mjs +45 -0
- package/dist/styled-system/css/cva.d.ts +6 -0
- package/dist/styled-system/css/cva.mjs +87 -0
- package/dist/styled-system/css/cx.d.ts +5 -0
- package/dist/styled-system/css/cx.mjs +15 -0
- package/dist/styled-system/css/index.d.ts +5 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.d.ts +4 -0
- package/dist/styled-system/css/sva.mjs +41 -0
- package/dist/styled-system/helpers.mjs +336 -0
- package/dist/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/dist/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/dist/styled-system/jsx/bleed.d.ts +10 -0
- package/dist/styled-system/jsx/bleed.mjs +14 -0
- package/dist/styled-system/jsx/box.d.ts +10 -0
- package/dist/styled-system/jsx/box.mjs +14 -0
- package/dist/styled-system/jsx/center.d.ts +10 -0
- package/dist/styled-system/jsx/center.mjs +14 -0
- package/dist/styled-system/jsx/circle.d.ts +10 -0
- package/dist/styled-system/jsx/circle.mjs +14 -0
- package/dist/styled-system/jsx/container.d.ts +10 -0
- package/dist/styled-system/jsx/container.mjs +14 -0
- package/dist/styled-system/jsx/cq.d.ts +10 -0
- package/dist/styled-system/jsx/cq.mjs +14 -0
- package/dist/styled-system/jsx/divider.d.ts +10 -0
- package/dist/styled-system/jsx/divider.mjs +14 -0
- package/dist/styled-system/jsx/factory-helper.mjs +22 -0
- package/dist/styled-system/jsx/factory.d.ts +3 -0
- package/dist/styled-system/jsx/factory.mjs +80 -0
- package/dist/styled-system/jsx/flex.d.ts +10 -0
- package/dist/styled-system/jsx/flex.mjs +14 -0
- package/dist/styled-system/jsx/float.d.ts +10 -0
- package/dist/styled-system/jsx/float.mjs +14 -0
- package/dist/styled-system/jsx/grid-item.d.ts +10 -0
- package/dist/styled-system/jsx/grid-item.mjs +14 -0
- package/dist/styled-system/jsx/grid.d.ts +10 -0
- package/dist/styled-system/jsx/grid.mjs +14 -0
- package/dist/styled-system/jsx/hstack.d.ts +10 -0
- package/dist/styled-system/jsx/hstack.mjs +14 -0
- package/dist/styled-system/jsx/index.d.ts +24 -0
- package/dist/styled-system/jsx/index.mjs +22 -0
- package/dist/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/dist/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/dist/styled-system/jsx/link-overlay.d.ts +10 -0
- package/dist/styled-system/jsx/link-overlay.mjs +14 -0
- package/dist/styled-system/jsx/spacer.d.ts +10 -0
- package/dist/styled-system/jsx/spacer.mjs +14 -0
- package/dist/styled-system/jsx/square.d.ts +10 -0
- package/dist/styled-system/jsx/square.mjs +14 -0
- package/dist/styled-system/jsx/stack.d.ts +10 -0
- package/dist/styled-system/jsx/stack.mjs +14 -0
- package/dist/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/dist/styled-system/jsx/visually-hidden.mjs +14 -0
- package/dist/styled-system/jsx/vstack.d.ts +10 -0
- package/dist/styled-system/jsx/vstack.mjs +14 -0
- package/dist/styled-system/jsx/wrap.d.ts +10 -0
- package/dist/styled-system/jsx/wrap.mjs +14 -0
- package/dist/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/dist/styled-system/patterns/bleed.d.ts +22 -0
- package/dist/styled-system/patterns/bleed.mjs +24 -0
- package/dist/styled-system/patterns/box.d.ts +21 -0
- package/dist/styled-system/patterns/box.mjs +15 -0
- package/dist/styled-system/patterns/center.d.ts +21 -0
- package/dist/styled-system/patterns/center.mjs +21 -0
- package/dist/styled-system/patterns/circle.d.ts +21 -0
- package/dist/styled-system/patterns/circle.mjs +25 -0
- package/dist/styled-system/patterns/container.d.ts +21 -0
- package/dist/styled-system/patterns/container.mjs +21 -0
- package/dist/styled-system/patterns/cq.d.ts +22 -0
- package/dist/styled-system/patterns/cq.mjs +21 -0
- package/dist/styled-system/patterns/divider.d.ts +23 -0
- package/dist/styled-system/patterns/divider.mjs +25 -0
- package/dist/styled-system/patterns/flex.d.ts +27 -0
- package/dist/styled-system/patterns/flex.mjs +26 -0
- package/dist/styled-system/patterns/float.d.ts +24 -0
- package/dist/styled-system/patterns/float.mjs +52 -0
- package/dist/styled-system/patterns/grid-item.d.ts +26 -0
- package/dist/styled-system/patterns/grid-item.mjs +25 -0
- package/dist/styled-system/patterns/grid.d.ts +25 -0
- package/dist/styled-system/patterns/grid.mjs +27 -0
- package/dist/styled-system/patterns/hstack.d.ts +22 -0
- package/dist/styled-system/patterns/hstack.mjs +24 -0
- package/dist/styled-system/patterns/index.d.ts +21 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-overlay.d.ts +21 -0
- package/dist/styled-system/patterns/link-overlay.mjs +24 -0
- package/dist/styled-system/patterns/spacer.d.ts +21 -0
- package/dist/styled-system/patterns/spacer.mjs +21 -0
- package/dist/styled-system/patterns/square.d.ts +21 -0
- package/dist/styled-system/patterns/square.mjs +24 -0
- package/dist/styled-system/patterns/stack.d.ts +24 -0
- package/dist/styled-system/patterns/stack.mjs +24 -0
- package/dist/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +18 -0
- package/dist/styled-system/patterns/vstack.d.ts +22 -0
- package/dist/styled-system/patterns/vstack.mjs +24 -0
- package/dist/styled-system/patterns/wrap.d.ts +25 -0
- package/dist/styled-system/patterns/wrap.mjs +25 -0
- package/dist/styled-system/styles.css +1497 -0
- package/dist/styled-system/tokens/index.d.ts +9 -0
- package/dist/styled-system/tokens/index.mjs +1884 -0
- package/dist/styled-system/tokens/tokens.d.ts +63 -0
- package/dist/styled-system/types/composition.d.ts +164 -0
- package/dist/styled-system/types/conditions.d.ts +288 -0
- package/dist/styled-system/types/csstype.d.ts +21298 -0
- package/dist/styled-system/types/global.d.ts +20 -0
- package/dist/styled-system/types/index.d.ts +8 -0
- package/dist/styled-system/types/jsx.d.ts +52 -0
- package/dist/styled-system/types/parts.d.ts +8 -0
- package/dist/styled-system/types/pattern.d.ts +78 -0
- package/dist/styled-system/types/prop-type.d.ts +253 -0
- package/dist/styled-system/types/recipe.d.ts +181 -0
- package/dist/styled-system/types/selectors.d.ts +59 -0
- package/dist/styled-system/types/static-css.d.ts +56 -0
- package/dist/styled-system/types/style-props.d.ts +7492 -0
- package/dist/styled-system/types/system-types.d.ts +193 -0
- package/dist/types/components/Button/button.recipe.d.ts +109 -0
- package/dist/types/components/Button/index.d.ts +17 -0
- package/dist/types/components/Dialog/dialog.recipe.d.ts +2 -0
- package/dist/types/components/Dialog/index.d.ts +15 -0
- package/dist/types/components/IconButton/icon-button.recipe.d.ts +79 -0
- package/dist/types/components/IconButton/index.d.ts +13 -0
- package/dist/types/components/Spinner/index.d.ts +24 -0
- package/dist/types/components/Spinner/spinner.recipe.d.ts +21 -0
- package/dist/types/components/Text/index.d.ts +7 -0
- package/dist/types/components/Text/text.recipe.d.ts +38 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/index.d.ts +2 -1205
- package/dist/types/theme/breakpoints.d.ts +7 -0
- package/dist/types/theme/conditions.d.ts +16 -0
- package/dist/types/theme/global-css.d.ts +1 -0
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/theme/keyframes.d.ts +1 -0
- package/dist/types/theme/tokens/animations.d.ts +41 -0
- package/dist/types/theme/tokens/blurs.d.ts +23 -0
- package/dist/types/theme/tokens/borders.d.ts +5 -0
- package/dist/types/theme/tokens/durations.d.ts +23 -0
- package/dist/types/theme/tokens/easings.d.ts +14 -0
- package/dist/types/theme/tokens/index.d.ts +833 -0
- package/dist/types/theme/tokens/radii.d.ts +32 -0
- package/dist/types/theme/tokens/sizes.d.ts +158 -0
- package/dist/types/theme/tokens/spacing.d.ts +107 -0
- package/dist/types/theme/tokens/typography.d.ts +121 -0
- package/dist/types/theme/tokens/z-index.d.ts +38 -0
- package/dist/types/utils/create-style-context.d.ts +20 -0
- package/dist/types/vite-env.d.ts +1 -0
- package/package.json +45 -14
- package/dist/cjs/index.cjs +0 -25
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/esm/index.mjs +0 -26344
- package/dist/esm/index.mjs.map +0 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue, Nested } from './conditions';
|
|
3
|
+
import type { AtRule, Globals, PropertiesFallback } from './csstype';
|
|
4
|
+
import type { SystemProperties, CssVarProperties } from './style-props';
|
|
5
|
+
|
|
6
|
+
type String = string & {}
|
|
7
|
+
type Number = number & {}
|
|
8
|
+
|
|
9
|
+
export type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
10
|
+
|
|
11
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
12
|
+
|
|
13
|
+
export type DistributiveUnion<T, U> = {
|
|
14
|
+
[K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
|
|
15
|
+
} & DistributiveOmit<U, keyof T>
|
|
16
|
+
|
|
17
|
+
export type Assign<T, U> = {
|
|
18
|
+
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
19
|
+
} & U
|
|
20
|
+
|
|
21
|
+
/* -----------------------------------------------------------------------------
|
|
22
|
+
* Native css properties
|
|
23
|
+
* -----------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
type DashedIdent = `--${string}`
|
|
26
|
+
|
|
27
|
+
type StringToMultiple<T extends string> = T | `${T}, ${T}`
|
|
28
|
+
|
|
29
|
+
export type PositionAreaAxis =
|
|
30
|
+
| 'left'
|
|
31
|
+
| 'center'
|
|
32
|
+
| 'right'
|
|
33
|
+
| 'x-start'
|
|
34
|
+
| 'x-end'
|
|
35
|
+
| 'span-x-start'
|
|
36
|
+
| 'span-x-end'
|
|
37
|
+
| 'x-self-start'
|
|
38
|
+
| 'x-self-end'
|
|
39
|
+
| 'span-x-self-start'
|
|
40
|
+
| 'span-x-self-end'
|
|
41
|
+
| 'span-all'
|
|
42
|
+
| 'top'
|
|
43
|
+
| 'bottom'
|
|
44
|
+
| 'span-top'
|
|
45
|
+
| 'span-bottom'
|
|
46
|
+
| 'y-start'
|
|
47
|
+
| 'y-end'
|
|
48
|
+
| 'span-y-start'
|
|
49
|
+
| 'span-y-end'
|
|
50
|
+
| 'y-self-start'
|
|
51
|
+
| 'y-self-end'
|
|
52
|
+
| 'span-y-self-start'
|
|
53
|
+
| 'span-y-self-end'
|
|
54
|
+
| 'block-start'
|
|
55
|
+
| 'block-end'
|
|
56
|
+
| 'span-block-start'
|
|
57
|
+
| 'span-block-end'
|
|
58
|
+
| 'inline-start'
|
|
59
|
+
| 'inline-end'
|
|
60
|
+
| 'span-inline-start'
|
|
61
|
+
| 'span-inline-end'
|
|
62
|
+
| 'self-block-start'
|
|
63
|
+
| 'self-block-end'
|
|
64
|
+
| 'span-self-block-start'
|
|
65
|
+
| 'span-self-block-end'
|
|
66
|
+
| 'self-inline-start'
|
|
67
|
+
| 'self-inline-end'
|
|
68
|
+
| 'span-self-inline-start'
|
|
69
|
+
| 'span-self-inline-end'
|
|
70
|
+
| 'start'
|
|
71
|
+
| 'end'
|
|
72
|
+
| 'span-start'
|
|
73
|
+
| 'span-end'
|
|
74
|
+
| 'self-start'
|
|
75
|
+
| 'self-end'
|
|
76
|
+
| 'span-self-start'
|
|
77
|
+
| 'span-self-end'
|
|
78
|
+
|
|
79
|
+
type PositionTry =
|
|
80
|
+
| 'normal'
|
|
81
|
+
| 'flip-block'
|
|
82
|
+
| 'flip-inline'
|
|
83
|
+
| 'top'
|
|
84
|
+
| 'bottom'
|
|
85
|
+
| 'left'
|
|
86
|
+
| 'right'
|
|
87
|
+
| 'block-start'
|
|
88
|
+
| 'block-end'
|
|
89
|
+
| 'inline-start'
|
|
90
|
+
| 'inline-end'
|
|
91
|
+
| DashedIdent
|
|
92
|
+
|
|
93
|
+
export interface ModernCssProperties {
|
|
94
|
+
anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
|
|
95
|
+
anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
|
|
96
|
+
fieldSizing?: Globals | 'fixed' | 'content'
|
|
97
|
+
interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
|
|
98
|
+
positionAnchor?: Globals | 'auto' | DashedIdent
|
|
99
|
+
positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
|
|
100
|
+
positionTry?: Globals | StringToMultiple<PositionTry> | String
|
|
101
|
+
positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
|
|
102
|
+
positionTryOrder?: Globals | 'normal' | 'most-width' | 'most-height' | 'most-block-size' | 'most-inline-size'
|
|
103
|
+
positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
|
|
104
|
+
textWrapMode?: Globals | 'wrap' | 'nowrap'
|
|
105
|
+
textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
|
|
106
|
+
textWrapStyle?: Globals | 'auto' | 'balance' | 'pretty' | 'stable'
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type CssProperty = keyof PropertiesFallback
|
|
110
|
+
|
|
111
|
+
export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties, ModernCssProperties {}
|
|
112
|
+
|
|
113
|
+
export interface CssKeyframes {
|
|
114
|
+
[name: string]: {
|
|
115
|
+
[time: string]: CssProperties
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* -----------------------------------------------------------------------------
|
|
120
|
+
* Conditional css properties
|
|
121
|
+
* -----------------------------------------------------------------------------*/
|
|
122
|
+
|
|
123
|
+
interface GenericProperties {
|
|
124
|
+
[key: string]: ConditionalValue<String | Number | boolean>
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* -----------------------------------------------------------------------------
|
|
128
|
+
* Native css props
|
|
129
|
+
* -----------------------------------------------------------------------------*/
|
|
130
|
+
|
|
131
|
+
export type NestedCssProperties = Nested<CssProperties>
|
|
132
|
+
|
|
133
|
+
export type SystemStyleObject = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
|
|
134
|
+
|
|
135
|
+
export interface GlobalStyleObject {
|
|
136
|
+
[selector: string]: SystemStyleObject
|
|
137
|
+
}
|
|
138
|
+
export interface ExtendableGlobalStyleObject {
|
|
139
|
+
[selector: string]: SystemStyleObject | undefined
|
|
140
|
+
extend?: GlobalStyleObject | undefined
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* -----------------------------------------------------------------------------
|
|
144
|
+
* Composition (text styles, layer styles)
|
|
145
|
+
* -----------------------------------------------------------------------------*/
|
|
146
|
+
|
|
147
|
+
type FilterStyleObject<P extends string> = {
|
|
148
|
+
[K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
|
|
152
|
+
|
|
153
|
+
/* -----------------------------------------------------------------------------
|
|
154
|
+
* Font face
|
|
155
|
+
* -----------------------------------------------------------------------------*/
|
|
156
|
+
|
|
157
|
+
export type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>
|
|
158
|
+
|
|
159
|
+
export type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>
|
|
160
|
+
|
|
161
|
+
export interface GlobalFontface {
|
|
162
|
+
[name: string]: FontfaceRule | FontfaceRule[]
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface ExtendableGlobalFontface {
|
|
166
|
+
[name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined
|
|
167
|
+
extend?: GlobalFontface | undefined
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* -----------------------------------------------------------------------------
|
|
171
|
+
* Jsx style props
|
|
172
|
+
* -----------------------------------------------------------------------------*/
|
|
173
|
+
interface WithCss {
|
|
174
|
+
css?: SystemStyleObject | SystemStyleObject[]
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type JsxStyleProps = SystemStyleObject & WithCss
|
|
178
|
+
|
|
179
|
+
export interface PatchedHTMLProps {
|
|
180
|
+
htmlWidth?: string | number
|
|
181
|
+
htmlHeight?: string | number
|
|
182
|
+
htmlTranslate?: 'yes' | 'no' | undefined
|
|
183
|
+
htmlContent?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
187
|
+
|
|
188
|
+
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
189
|
+
|
|
190
|
+
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
191
|
+
WithHTMLProps<T>,
|
|
192
|
+
P
|
|
193
|
+
>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type ButtonVariantProps = typeof buttonRecipe.__type;
|
|
2
|
+
export declare const buttonRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
variant: {
|
|
4
|
+
solid: {
|
|
5
|
+
_disabled: {
|
|
6
|
+
background: "background.neutral.disabled";
|
|
7
|
+
color: "content.neutral.disabled";
|
|
8
|
+
cursor: "not-allowed";
|
|
9
|
+
pointerEvents: "none";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
outline: {
|
|
13
|
+
background: "transparent";
|
|
14
|
+
borderWidth: "1px";
|
|
15
|
+
borderStyle: "solid";
|
|
16
|
+
borderColor: "border.neutral.default";
|
|
17
|
+
_disabled: {
|
|
18
|
+
background: "transparent";
|
|
19
|
+
color: "content.neutral.disabled";
|
|
20
|
+
borderColor: "border.neutral.disabled";
|
|
21
|
+
cursor: "not-allowed";
|
|
22
|
+
pointerEvents: "none";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
light: {
|
|
26
|
+
background: "transparent";
|
|
27
|
+
_disabled: {
|
|
28
|
+
background: "transparent";
|
|
29
|
+
color: "content.neutral.disabled";
|
|
30
|
+
cursor: "not-allowed";
|
|
31
|
+
pointerEvents: "none";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
color: {
|
|
36
|
+
neuroid_primary: {};
|
|
37
|
+
neuroid_secondary: {};
|
|
38
|
+
zoltarina_primary: {};
|
|
39
|
+
zoltarina_secondary: {};
|
|
40
|
+
heyd_primary: {};
|
|
41
|
+
heyd_secondary: {};
|
|
42
|
+
heybee_primary: {};
|
|
43
|
+
neutral: {};
|
|
44
|
+
danger: {};
|
|
45
|
+
warning: {};
|
|
46
|
+
success: {};
|
|
47
|
+
informative: {};
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
xs: {
|
|
51
|
+
h: number;
|
|
52
|
+
textStyle: "label.sm";
|
|
53
|
+
px: "8px";
|
|
54
|
+
gap: number;
|
|
55
|
+
'& :where(svg)': {
|
|
56
|
+
width: "20px";
|
|
57
|
+
height: "20px";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
sm: {
|
|
61
|
+
h: number;
|
|
62
|
+
textStyle: "label.sm";
|
|
63
|
+
px: "16px";
|
|
64
|
+
gap: number;
|
|
65
|
+
'& :where(svg)': {
|
|
66
|
+
width: "20px";
|
|
67
|
+
height: "20px";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
md: {
|
|
71
|
+
h: number;
|
|
72
|
+
textStyle: "label.md";
|
|
73
|
+
px: "20px";
|
|
74
|
+
gap: number;
|
|
75
|
+
'& :where(svg)': {
|
|
76
|
+
width: "24px";
|
|
77
|
+
height: "24px";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
lg: {
|
|
81
|
+
h: number;
|
|
82
|
+
textStyle: "body.lg";
|
|
83
|
+
px: "28px";
|
|
84
|
+
gap: number;
|
|
85
|
+
'& :where(svg)': {
|
|
86
|
+
width: "24px";
|
|
87
|
+
height: "24px";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
radius: {
|
|
92
|
+
full: {
|
|
93
|
+
borderRadius: "full";
|
|
94
|
+
};
|
|
95
|
+
lg: {
|
|
96
|
+
borderRadius: "lg";
|
|
97
|
+
};
|
|
98
|
+
md: {
|
|
99
|
+
borderRadius: "md";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
fullWidth: {
|
|
103
|
+
true: {
|
|
104
|
+
width: "full";
|
|
105
|
+
flexBasis: "auto";
|
|
106
|
+
flexGrow: number;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonVariantProps } from './button.recipe';
|
|
3
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariantProps & {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
loadingText?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const Button: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
variant?: "outline" | "solid" | "light" | undefined;
|
|
9
|
+
color?: "neutral" | "neuroid_primary" | "neuroid_secondary" | "zoltarina_primary" | "zoltarina_secondary" | "heyd_primary" | "heyd_secondary" | "heybee_primary" | "danger" | "warning" | "success" | "informative" | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
11
|
+
radius?: "md" | "lg" | "full" | undefined;
|
|
12
|
+
fullWidth?: boolean | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
loadingText?: React.ReactNode;
|
|
16
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export default Button;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type DialogVariantProps = keyof typeof dialogRecipe.variantMap;
|
|
2
|
+
export declare const dialogRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"content" | "title" | "description" | "trigger" | "backdrop" | "positioner" | "closeTrigger", import('../../../styled-system/types').SlotRecipeVariantRecord<"content" | "title" | "description" | "trigger" | "backdrop" | "positioner" | "closeTrigger">>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dialog as ArkDialog } from '@ark-ui/react/dialog';
|
|
2
|
+
import { ComponentProps } from '../../../styled-system/types';
|
|
3
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
4
|
+
export type DialogProps = ComponentProps<typeof Root>;
|
|
5
|
+
declare const Root: (props: ArkDialog.RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const Dialog: {
|
|
7
|
+
Root: (props: ArkDialog.RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Backdrop: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "asChild"> & ArkDialog.BackdropBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Trigger: import('react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "asChild"> & ArkDialog.TriggerBaseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
Content: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "asChild"> & ArkDialog.ContentBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Title: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLHeadingElement>, "asChild"> & ArkDialog.TitleBaseProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
12
|
+
Description: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "asChild"> & ArkDialog.DescriptionBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Positioner: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "asChild"> & ArkDialog.PositionerBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
};
|
|
15
|
+
export default Dialog;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type IconButtonVariantProps = typeof iconButtonRecipe.__type;
|
|
2
|
+
export declare const iconButtonRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
variant: {
|
|
4
|
+
solid: {
|
|
5
|
+
_disabled: {
|
|
6
|
+
background: "background.neutral.disabled";
|
|
7
|
+
color: "content.neutral.disabled";
|
|
8
|
+
cursor: "not-allowed";
|
|
9
|
+
pointerEvents: "none";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
outline: {
|
|
13
|
+
background: "transparent";
|
|
14
|
+
borderWidth: "1px";
|
|
15
|
+
borderStyle: "solid";
|
|
16
|
+
borderColor: "border.neutral.default";
|
|
17
|
+
color: "content.neutral.bold";
|
|
18
|
+
_disabled: {
|
|
19
|
+
background: "transparent";
|
|
20
|
+
color: "content.neutral.disabled";
|
|
21
|
+
borderColor: "border.neutral.disabled";
|
|
22
|
+
cursor: "not-allowed";
|
|
23
|
+
pointerEvents: "none";
|
|
24
|
+
};
|
|
25
|
+
_hover: {
|
|
26
|
+
background: "background.neutral.selected";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
light: {
|
|
30
|
+
background: "transparent";
|
|
31
|
+
color: "content.neutral.bold";
|
|
32
|
+
_disabled: {
|
|
33
|
+
background: "transparent";
|
|
34
|
+
color: "content.neutral.disabled";
|
|
35
|
+
cursor: "not-allowed";
|
|
36
|
+
pointerEvents: "none";
|
|
37
|
+
};
|
|
38
|
+
_hover: {
|
|
39
|
+
background: "background.neutral.selected";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
color: {
|
|
44
|
+
neuroid_primary: {};
|
|
45
|
+
zoltarina_primary: {};
|
|
46
|
+
heyd_primary: {};
|
|
47
|
+
heybee_primary: {};
|
|
48
|
+
neutral: {};
|
|
49
|
+
};
|
|
50
|
+
size: {
|
|
51
|
+
sm: {
|
|
52
|
+
h: number;
|
|
53
|
+
w: number;
|
|
54
|
+
p: "4px";
|
|
55
|
+
'& :where(svg)': {
|
|
56
|
+
width: "20px";
|
|
57
|
+
height: "20px";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
md: {
|
|
61
|
+
h: number;
|
|
62
|
+
w: number;
|
|
63
|
+
p: "4px";
|
|
64
|
+
'& :where(svg)': {
|
|
65
|
+
width: "24px";
|
|
66
|
+
height: "24px";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
lg: {
|
|
70
|
+
h: number;
|
|
71
|
+
w: number;
|
|
72
|
+
p: "8px";
|
|
73
|
+
'& :where(svg)': {
|
|
74
|
+
width: "24px";
|
|
75
|
+
height: "24px";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { IconButtonVariantProps } from './icon-button.recipe';
|
|
3
|
+
export type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & IconButtonVariantProps & {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const IconButton: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
variant?: "outline" | "solid" | "light" | undefined;
|
|
8
|
+
color?: "neutral" | "neuroid_primary" | "zoltarina_primary" | "heyd_primary" | "heybee_primary" | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export default IconButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { SpinnerVariantProps } from './spinner.recipe';
|
|
3
|
+
import { ColorToken } from '../../../styled-system/tokens';
|
|
4
|
+
export type SpinnerProps = HTMLAttributes<HTMLDivElement> & SpinnerVariantProps & {
|
|
5
|
+
/**
|
|
6
|
+
* For accessibility, it is important to add a fallback loading text.
|
|
7
|
+
* This text will be visible to screen readers.
|
|
8
|
+
* @default "Loading..."
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
color?: ColorToken;
|
|
12
|
+
};
|
|
13
|
+
declare const Spinner: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
14
|
+
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
/**
|
|
17
|
+
* For accessibility, it is important to add a fallback loading text.
|
|
18
|
+
* This text will be visible to screen readers.
|
|
19
|
+
* @default "Loading..."
|
|
20
|
+
*/
|
|
21
|
+
label?: string;
|
|
22
|
+
color?: ColorToken;
|
|
23
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export default Spinner;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type SpinnerVariantProps = typeof spinnerRecipe.__type;
|
|
2
|
+
export declare const spinnerRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
size: {
|
|
4
|
+
sm: {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
md: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
xl: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { TextVariantProps } from './text.recipe';
|
|
3
|
+
export type TextProps = HTMLAttributes<HTMLParagraphElement> & TextVariantProps;
|
|
4
|
+
declare const Text: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & {
|
|
5
|
+
variant?: "label.sm" | "body.md" | "body.lg" | "body.sm" | "label.md" | "title.md" | "title.lg" | "headline.sm" | "headline.md" | "display.md" | "display.lg" | undefined;
|
|
6
|
+
} & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
export default Text;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type TextVariantProps = typeof textRecipe.__type;
|
|
2
|
+
export declare const textRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
variant: {
|
|
4
|
+
'display.lg': {
|
|
5
|
+
textStyle: "display.lg";
|
|
6
|
+
};
|
|
7
|
+
'display.md': {
|
|
8
|
+
textStyle: "display.md";
|
|
9
|
+
};
|
|
10
|
+
'headline.md': {
|
|
11
|
+
textStyle: "headline.md";
|
|
12
|
+
};
|
|
13
|
+
'headline.sm': {
|
|
14
|
+
textStyle: "headline.sm";
|
|
15
|
+
};
|
|
16
|
+
'title.lg': {
|
|
17
|
+
textStyle: "title.lg";
|
|
18
|
+
};
|
|
19
|
+
'title.md': {
|
|
20
|
+
textStyle: "title.md";
|
|
21
|
+
};
|
|
22
|
+
'body.lg': {
|
|
23
|
+
textStyle: "body.lg";
|
|
24
|
+
};
|
|
25
|
+
'body.md': {
|
|
26
|
+
textStyle: "body.md";
|
|
27
|
+
};
|
|
28
|
+
'body.sm': {
|
|
29
|
+
textStyle: "body.sm";
|
|
30
|
+
};
|
|
31
|
+
'label.sm': {
|
|
32
|
+
textStyle: "label.sm";
|
|
33
|
+
};
|
|
34
|
+
'label.md': {
|
|
35
|
+
textStyle: "label.md";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Button, type ButtonProps } from './Button';
|
|
2
|
+
export { default as Text, type TextProps } from './Text';
|
|
3
|
+
export { default as Dialog, type DialogProps } from './Dialog';
|
|
4
|
+
export { default as Spinner, type SpinnerProps } from './Spinner';
|
|
5
|
+
export { default as IconButton, type IconButtonProps } from './IconButton';
|
|
6
|
+
export { Portal, type PortalProps } from '@ark-ui/react';
|