stoop 0.1.0 → 0.2.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/LICENSE.md +21 -0
- package/README.md +142 -51
- package/dist/api/create-theme.d.ts +13 -0
- package/dist/api/css.d.ts +16 -0
- package/dist/api/global-css.d.ts +18 -0
- package/dist/api/keyframes.d.ts +16 -0
- package/dist/api/provider.d.ts +19 -0
- package/dist/api/styled.d.ts +41 -0
- package/dist/api/use-theme.d.ts +13 -0
- package/dist/constants.d.ts +21 -0
- package/dist/core/cache.d.ts +39 -0
- package/dist/core/compiler.d.ts +19 -0
- package/dist/core/theme-manager.d.ts +30 -0
- package/dist/core/variants.d.ts +15 -0
- package/dist/create-stoop.d.ts +12 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -156
- package/dist/inject/browser.d.ts +59 -0
- package/dist/inject/dedup.d.ts +29 -0
- package/dist/inject/index.d.ts +41 -0
- package/dist/inject/ssr.d.ts +28 -0
- package/dist/types/index.d.ts +141 -0
- package/dist/types/react-polymorphic-types.d.ts +17 -0
- package/dist/utils/string.d.ts +102 -0
- package/dist/utils/theme-map.d.ts +25 -0
- package/dist/utils/theme-validation.d.ts +13 -0
- package/dist/utils/theme.d.ts +43 -0
- package/dist/utils/type-guards.d.ts +26 -0
- package/dist/utils/utilities.d.ts +14 -0
- package/package.json +65 -41
- package/dist/components/Badge/index.d.ts +0 -13
- package/dist/components/Badge/styles.d.ts +0 -3
- package/dist/components/Badge/types.d.ts +0 -13
- package/dist/components/Button/index.d.ts +0 -14
- package/dist/components/Button/styles.d.ts +0 -6
- package/dist/components/Button/types.d.ts +0 -22
- package/dist/components/Card/index.d.ts +0 -14
- package/dist/components/Card/styles.d.ts +0 -16
- package/dist/components/Card/types.d.ts +0 -18
- package/dist/components/Input/index.d.ts +0 -13
- package/dist/components/Input/styles.d.ts +0 -3
- package/dist/components/Input/types.d.ts +0 -8
- package/dist/components/Menu/index.d.ts +0 -13
- package/dist/components/Menu/styles.d.ts +0 -9
- package/dist/components/Menu/types.d.ts +0 -26
- package/dist/components/Modal/index.d.ts +0 -14
- package/dist/components/Modal/styles.d.ts +0 -14
- package/dist/components/Modal/types.d.ts +0 -18
- package/dist/components/Popover/index.d.ts +0 -13
- package/dist/components/Popover/styles.d.ts +0 -4
- package/dist/components/Popover/types.d.ts +0 -16
- package/dist/components/Provider/GlobalStyles.d.ts +0 -10
- package/dist/components/Provider/StoopProvider.d.ts +0 -41
- package/dist/components/Provider/index.d.ts +0 -2
- package/dist/components/Section/index.d.ts +0 -15
- package/dist/components/Section/styles.d.ts +0 -5
- package/dist/components/Section/types.d.ts +0 -20
- package/dist/components/Select/index.d.ts +0 -13
- package/dist/components/Select/styles.d.ts +0 -7
- package/dist/components/Select/types.d.ts +0 -30
- package/dist/components/Stack/index.d.ts +0 -16
- package/dist/components/Stack/styles.d.ts +0 -10
- package/dist/components/Stack/types.d.ts +0 -42
- package/dist/components/Tabs/index.d.ts +0 -13
- package/dist/components/Tabs/styles.d.ts +0 -8
- package/dist/components/Tabs/types.d.ts +0 -20
- package/dist/components/Text/index.d.ts +0 -14
- package/dist/components/Text/styles.d.ts +0 -4
- package/dist/components/Text/types.d.ts +0 -21
- package/dist/components/Textarea/index.d.ts +0 -15
- package/dist/components/Textarea/styles.d.ts +0 -3
- package/dist/components/Textarea/types.d.ts +0 -10
- package/dist/components/index.d.ts +0 -27
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/useBreakpoints.d.ts +0 -14
- package/dist/hooks/useEventListener.d.ts +0 -6
- package/dist/hooks/useFloating.d.ts +0 -18
- package/dist/hooks/useOutsideClick.d.ts +0 -6
- package/dist/hooks/usePortal.d.ts +0 -9
- package/dist/styles/compiler.d.ts +0 -25
- package/dist/styles/index.d.ts +0 -2
- package/dist/styles/theme.d.ts +0 -495
- package/dist/styles/types.d.ts +0 -66
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ElementRef, JSX, forwardRef } from "react";
|
|
2
|
-
import type { CSSObject, VariantConfig, StyledBaseProps } from "./types";
|
|
3
|
-
type HTMLElements = keyof JSX.IntrinsicElements;
|
|
4
|
-
/**
|
|
5
|
-
* Compile CSS object to class name with caching and injection
|
|
6
|
-
* Usage: const className = css({ color: 'red', fontSize: '14px' })
|
|
7
|
-
*/
|
|
8
|
-
export declare function css(styles: CSSObject): string;
|
|
9
|
-
type VariantKeys<T extends VariantConfig> = keyof T;
|
|
10
|
-
type VariantPropsFromConfig<T extends VariantConfig> = {
|
|
11
|
-
[K in VariantKeys<T>]?: keyof T[K] | boolean;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Creates a styled component with polymorphic "as" prop support and variants
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
* const MyButton = styled('button', { padding: '12px' }, {
|
|
18
|
-
* variant: { primary: { color: 'blue' }, secondary: { color: 'gray' } }
|
|
19
|
-
* })
|
|
20
|
-
* <MyButton variant="primary" as="a" href="/link">Renders as anchor</MyButton>
|
|
21
|
-
*/
|
|
22
|
-
export declare function styled<DefaultElement extends HTMLElements, Variants extends VariantConfig = {}>(defaultElement: DefaultElement, baseStyles?: CSSObject, variants?: Variants): ReturnType<typeof forwardRef<ElementRef<DefaultElement>, ComponentPropsWithoutRef<DefaultElement> & StyledBaseProps & (Variants extends {} ? VariantPropsFromConfig<Variants> : {})>>;
|
|
23
|
-
export type StyledComponent<T extends HTMLElements> = ReturnType<typeof styled<T>>;
|
|
24
|
-
export type PolymorphicComponentProps<T extends HTMLElements> = ComponentPropsWithoutRef<T> & StyledBaseProps;
|
|
25
|
-
export {};
|
package/dist/styles/index.d.ts
DELETED
package/dist/styles/theme.d.ts
DELETED
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
export declare const colors: {
|
|
2
|
-
readonly background: "#F5F5F5";
|
|
3
|
-
readonly border: "rgba(214, 209, 204, 0.5)";
|
|
4
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
5
|
-
readonly fill: "#fff";
|
|
6
|
-
readonly hover: "rgba(214, 209, 204, 0.25)";
|
|
7
|
-
readonly overlay: "rgba(0, 0, 0, 0.5)";
|
|
8
|
-
readonly text: "#000";
|
|
9
|
-
};
|
|
10
|
-
export declare const breakpoints: {
|
|
11
|
-
readonly large: "1200px";
|
|
12
|
-
readonly medium: "1024px";
|
|
13
|
-
readonly small: "768px";
|
|
14
|
-
};
|
|
15
|
-
export declare const spacing: {
|
|
16
|
-
readonly huge: "48px";
|
|
17
|
-
readonly large: "24px";
|
|
18
|
-
readonly larger: "32px";
|
|
19
|
-
readonly massive: "64px";
|
|
20
|
-
readonly medium: "16px";
|
|
21
|
-
readonly small: "8px";
|
|
22
|
-
readonly smaller: "4px";
|
|
23
|
-
};
|
|
24
|
-
export declare const fonts: {
|
|
25
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
26
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
27
|
-
};
|
|
28
|
-
export declare const typography: {
|
|
29
|
-
readonly bold: "700";
|
|
30
|
-
readonly div: "inherit";
|
|
31
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
32
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
33
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
34
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
35
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
36
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
37
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
38
|
-
readonly medium: "500";
|
|
39
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
40
|
-
readonly normalHeight: "1.4";
|
|
41
|
-
readonly normalWeight: "400";
|
|
42
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
43
|
-
readonly relaxed: "1.6";
|
|
44
|
-
readonly semibold: "600";
|
|
45
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
46
|
-
readonly span: "inherit";
|
|
47
|
-
readonly strong: "inherit";
|
|
48
|
-
readonly tight: "1.2";
|
|
49
|
-
};
|
|
50
|
-
export declare const transitions: {
|
|
51
|
-
readonly default: "all 0.2s ease";
|
|
52
|
-
readonly fast: "all 0.15s ease";
|
|
53
|
-
readonly slow: "all 0.3s ease";
|
|
54
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
55
|
-
};
|
|
56
|
-
export declare const opacities: {
|
|
57
|
-
readonly disabled: "0.5";
|
|
58
|
-
readonly light: "0.55";
|
|
59
|
-
readonly muted: "0.7";
|
|
60
|
-
readonly overlay: "0.8";
|
|
61
|
-
};
|
|
62
|
-
export declare const zIndices: {
|
|
63
|
-
readonly base: 1;
|
|
64
|
-
readonly dropdown: 10;
|
|
65
|
-
readonly modal: 40;
|
|
66
|
-
readonly popover: 30;
|
|
67
|
-
readonly toast: 50;
|
|
68
|
-
readonly tooltip: 20;
|
|
69
|
-
};
|
|
70
|
-
export declare const borderRadius: {
|
|
71
|
-
readonly medium: "6px";
|
|
72
|
-
readonly none: "0px";
|
|
73
|
-
readonly small: "3px";
|
|
74
|
-
};
|
|
75
|
-
export declare const media: {
|
|
76
|
-
readonly large: "@media (min-width: 1024px)";
|
|
77
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
78
|
-
readonly small: "@media (max-width: 768px)";
|
|
79
|
-
};
|
|
80
|
-
export declare const lightTheme: {
|
|
81
|
-
readonly borderRadius: {
|
|
82
|
-
readonly medium: "6px";
|
|
83
|
-
readonly none: "0px";
|
|
84
|
-
readonly small: "3px";
|
|
85
|
-
};
|
|
86
|
-
readonly breakpoints: {
|
|
87
|
-
readonly large: "1200px";
|
|
88
|
-
readonly medium: "1024px";
|
|
89
|
-
readonly small: "768px";
|
|
90
|
-
};
|
|
91
|
-
readonly colors: {
|
|
92
|
-
readonly background: "#F5F5F5";
|
|
93
|
-
readonly border: "rgba(214, 209, 204, 0.5)";
|
|
94
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
95
|
-
readonly fill: "#fff";
|
|
96
|
-
readonly hover: "rgba(214, 209, 204, 0.25)";
|
|
97
|
-
readonly overlay: "rgba(0, 0, 0, 0.5)";
|
|
98
|
-
readonly text: "#000";
|
|
99
|
-
};
|
|
100
|
-
readonly fonts: {
|
|
101
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
102
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
103
|
-
};
|
|
104
|
-
readonly media: {
|
|
105
|
-
readonly large: "@media (min-width: 1024px)";
|
|
106
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
107
|
-
readonly small: "@media (max-width: 768px)";
|
|
108
|
-
};
|
|
109
|
-
readonly opacities: {
|
|
110
|
-
readonly disabled: "0.5";
|
|
111
|
-
readonly light: "0.55";
|
|
112
|
-
readonly muted: "0.7";
|
|
113
|
-
readonly overlay: "0.8";
|
|
114
|
-
};
|
|
115
|
-
readonly spacing: {
|
|
116
|
-
readonly huge: "48px";
|
|
117
|
-
readonly large: "24px";
|
|
118
|
-
readonly larger: "32px";
|
|
119
|
-
readonly massive: "64px";
|
|
120
|
-
readonly medium: "16px";
|
|
121
|
-
readonly small: "8px";
|
|
122
|
-
readonly smaller: "4px";
|
|
123
|
-
};
|
|
124
|
-
readonly transitions: {
|
|
125
|
-
readonly default: "all 0.2s ease";
|
|
126
|
-
readonly fast: "all 0.15s ease";
|
|
127
|
-
readonly slow: "all 0.3s ease";
|
|
128
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
129
|
-
};
|
|
130
|
-
readonly typography: {
|
|
131
|
-
readonly bold: "700";
|
|
132
|
-
readonly div: "inherit";
|
|
133
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
134
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
135
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
136
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
137
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
138
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
139
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
140
|
-
readonly medium: "500";
|
|
141
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
142
|
-
readonly normalHeight: "1.4";
|
|
143
|
-
readonly normalWeight: "400";
|
|
144
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
145
|
-
readonly relaxed: "1.6";
|
|
146
|
-
readonly semibold: "600";
|
|
147
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
148
|
-
readonly span: "inherit";
|
|
149
|
-
readonly strong: "inherit";
|
|
150
|
-
readonly tight: "1.2";
|
|
151
|
-
};
|
|
152
|
-
readonly zIndices: {
|
|
153
|
-
readonly base: 1;
|
|
154
|
-
readonly dropdown: 10;
|
|
155
|
-
readonly modal: 40;
|
|
156
|
-
readonly popover: 30;
|
|
157
|
-
readonly toast: 50;
|
|
158
|
-
readonly tooltip: 20;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
export declare const darkTheme: {
|
|
162
|
-
readonly borderRadius: {
|
|
163
|
-
readonly medium: "6px";
|
|
164
|
-
readonly none: "0px";
|
|
165
|
-
readonly small: "3px";
|
|
166
|
-
};
|
|
167
|
-
readonly breakpoints: {
|
|
168
|
-
readonly large: "1200px";
|
|
169
|
-
readonly medium: "1024px";
|
|
170
|
-
readonly small: "768px";
|
|
171
|
-
};
|
|
172
|
-
readonly colors: {
|
|
173
|
-
readonly background: "#1a1a1a";
|
|
174
|
-
readonly border: "rgba(255, 255, 255, 0.1)";
|
|
175
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
176
|
-
readonly fill: "#2a2a2a";
|
|
177
|
-
readonly hover: "rgba(255, 255, 255, 0.05)";
|
|
178
|
-
readonly overlay: "rgba(0, 0, 0, 0.8)";
|
|
179
|
-
readonly text: "#fff";
|
|
180
|
-
};
|
|
181
|
-
readonly fonts: {
|
|
182
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
183
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
184
|
-
};
|
|
185
|
-
readonly media: {
|
|
186
|
-
readonly large: "@media (min-width: 1024px)";
|
|
187
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
188
|
-
readonly small: "@media (max-width: 768px)";
|
|
189
|
-
};
|
|
190
|
-
readonly opacities: {
|
|
191
|
-
readonly disabled: "0.5";
|
|
192
|
-
readonly light: "0.55";
|
|
193
|
-
readonly muted: "0.7";
|
|
194
|
-
readonly overlay: "0.8";
|
|
195
|
-
};
|
|
196
|
-
readonly spacing: {
|
|
197
|
-
readonly huge: "48px";
|
|
198
|
-
readonly large: "24px";
|
|
199
|
-
readonly larger: "32px";
|
|
200
|
-
readonly massive: "64px";
|
|
201
|
-
readonly medium: "16px";
|
|
202
|
-
readonly small: "8px";
|
|
203
|
-
readonly smaller: "4px";
|
|
204
|
-
};
|
|
205
|
-
readonly transitions: {
|
|
206
|
-
readonly default: "all 0.2s ease";
|
|
207
|
-
readonly fast: "all 0.15s ease";
|
|
208
|
-
readonly slow: "all 0.3s ease";
|
|
209
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
210
|
-
};
|
|
211
|
-
readonly typography: {
|
|
212
|
-
readonly bold: "700";
|
|
213
|
-
readonly div: "inherit";
|
|
214
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
215
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
216
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
217
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
218
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
219
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
220
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
221
|
-
readonly medium: "500";
|
|
222
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
223
|
-
readonly normalHeight: "1.4";
|
|
224
|
-
readonly normalWeight: "400";
|
|
225
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
226
|
-
readonly relaxed: "1.6";
|
|
227
|
-
readonly semibold: "600";
|
|
228
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
229
|
-
readonly span: "inherit";
|
|
230
|
-
readonly strong: "inherit";
|
|
231
|
-
readonly tight: "1.2";
|
|
232
|
-
};
|
|
233
|
-
readonly zIndices: {
|
|
234
|
-
readonly base: 1;
|
|
235
|
-
readonly dropdown: 10;
|
|
236
|
-
readonly modal: 40;
|
|
237
|
-
readonly popover: 30;
|
|
238
|
-
readonly toast: 50;
|
|
239
|
-
readonly tooltip: 20;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
export declare const themes: {
|
|
243
|
-
readonly dark: {
|
|
244
|
-
readonly borderRadius: {
|
|
245
|
-
readonly medium: "6px";
|
|
246
|
-
readonly none: "0px";
|
|
247
|
-
readonly small: "3px";
|
|
248
|
-
};
|
|
249
|
-
readonly breakpoints: {
|
|
250
|
-
readonly large: "1200px";
|
|
251
|
-
readonly medium: "1024px";
|
|
252
|
-
readonly small: "768px";
|
|
253
|
-
};
|
|
254
|
-
readonly colors: {
|
|
255
|
-
readonly background: "#1a1a1a";
|
|
256
|
-
readonly border: "rgba(255, 255, 255, 0.1)";
|
|
257
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
258
|
-
readonly fill: "#2a2a2a";
|
|
259
|
-
readonly hover: "rgba(255, 255, 255, 0.05)";
|
|
260
|
-
readonly overlay: "rgba(0, 0, 0, 0.8)";
|
|
261
|
-
readonly text: "#fff";
|
|
262
|
-
};
|
|
263
|
-
readonly fonts: {
|
|
264
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
265
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
266
|
-
};
|
|
267
|
-
readonly media: {
|
|
268
|
-
readonly large: "@media (min-width: 1024px)";
|
|
269
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
270
|
-
readonly small: "@media (max-width: 768px)";
|
|
271
|
-
};
|
|
272
|
-
readonly opacities: {
|
|
273
|
-
readonly disabled: "0.5";
|
|
274
|
-
readonly light: "0.55";
|
|
275
|
-
readonly muted: "0.7";
|
|
276
|
-
readonly overlay: "0.8";
|
|
277
|
-
};
|
|
278
|
-
readonly spacing: {
|
|
279
|
-
readonly huge: "48px";
|
|
280
|
-
readonly large: "24px";
|
|
281
|
-
readonly larger: "32px";
|
|
282
|
-
readonly massive: "64px";
|
|
283
|
-
readonly medium: "16px";
|
|
284
|
-
readonly small: "8px";
|
|
285
|
-
readonly smaller: "4px";
|
|
286
|
-
};
|
|
287
|
-
readonly transitions: {
|
|
288
|
-
readonly default: "all 0.2s ease";
|
|
289
|
-
readonly fast: "all 0.15s ease";
|
|
290
|
-
readonly slow: "all 0.3s ease";
|
|
291
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
292
|
-
};
|
|
293
|
-
readonly typography: {
|
|
294
|
-
readonly bold: "700";
|
|
295
|
-
readonly div: "inherit";
|
|
296
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
297
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
298
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
299
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
300
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
301
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
302
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
303
|
-
readonly medium: "500";
|
|
304
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
305
|
-
readonly normalHeight: "1.4";
|
|
306
|
-
readonly normalWeight: "400";
|
|
307
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
308
|
-
readonly relaxed: "1.6";
|
|
309
|
-
readonly semibold: "600";
|
|
310
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
311
|
-
readonly span: "inherit";
|
|
312
|
-
readonly strong: "inherit";
|
|
313
|
-
readonly tight: "1.2";
|
|
314
|
-
};
|
|
315
|
-
readonly zIndices: {
|
|
316
|
-
readonly base: 1;
|
|
317
|
-
readonly dropdown: 10;
|
|
318
|
-
readonly modal: 40;
|
|
319
|
-
readonly popover: 30;
|
|
320
|
-
readonly toast: 50;
|
|
321
|
-
readonly tooltip: 20;
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
readonly light: {
|
|
325
|
-
readonly borderRadius: {
|
|
326
|
-
readonly medium: "6px";
|
|
327
|
-
readonly none: "0px";
|
|
328
|
-
readonly small: "3px";
|
|
329
|
-
};
|
|
330
|
-
readonly breakpoints: {
|
|
331
|
-
readonly large: "1200px";
|
|
332
|
-
readonly medium: "1024px";
|
|
333
|
-
readonly small: "768px";
|
|
334
|
-
};
|
|
335
|
-
readonly colors: {
|
|
336
|
-
readonly background: "#F5F5F5";
|
|
337
|
-
readonly border: "rgba(214, 209, 204, 0.5)";
|
|
338
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
339
|
-
readonly fill: "#fff";
|
|
340
|
-
readonly hover: "rgba(214, 209, 204, 0.25)";
|
|
341
|
-
readonly overlay: "rgba(0, 0, 0, 0.5)";
|
|
342
|
-
readonly text: "#000";
|
|
343
|
-
};
|
|
344
|
-
readonly fonts: {
|
|
345
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
346
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
347
|
-
};
|
|
348
|
-
readonly media: {
|
|
349
|
-
readonly large: "@media (min-width: 1024px)";
|
|
350
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
351
|
-
readonly small: "@media (max-width: 768px)";
|
|
352
|
-
};
|
|
353
|
-
readonly opacities: {
|
|
354
|
-
readonly disabled: "0.5";
|
|
355
|
-
readonly light: "0.55";
|
|
356
|
-
readonly muted: "0.7";
|
|
357
|
-
readonly overlay: "0.8";
|
|
358
|
-
};
|
|
359
|
-
readonly spacing: {
|
|
360
|
-
readonly huge: "48px";
|
|
361
|
-
readonly large: "24px";
|
|
362
|
-
readonly larger: "32px";
|
|
363
|
-
readonly massive: "64px";
|
|
364
|
-
readonly medium: "16px";
|
|
365
|
-
readonly small: "8px";
|
|
366
|
-
readonly smaller: "4px";
|
|
367
|
-
};
|
|
368
|
-
readonly transitions: {
|
|
369
|
-
readonly default: "all 0.2s ease";
|
|
370
|
-
readonly fast: "all 0.15s ease";
|
|
371
|
-
readonly slow: "all 0.3s ease";
|
|
372
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
373
|
-
};
|
|
374
|
-
readonly typography: {
|
|
375
|
-
readonly bold: "700";
|
|
376
|
-
readonly div: "inherit";
|
|
377
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
378
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
379
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
380
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
381
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
382
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
383
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
384
|
-
readonly medium: "500";
|
|
385
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
386
|
-
readonly normalHeight: "1.4";
|
|
387
|
-
readonly normalWeight: "400";
|
|
388
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
389
|
-
readonly relaxed: "1.6";
|
|
390
|
-
readonly semibold: "600";
|
|
391
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
392
|
-
readonly span: "inherit";
|
|
393
|
-
readonly strong: "inherit";
|
|
394
|
-
readonly tight: "1.2";
|
|
395
|
-
};
|
|
396
|
-
readonly zIndices: {
|
|
397
|
-
readonly base: 1;
|
|
398
|
-
readonly dropdown: 10;
|
|
399
|
-
readonly modal: 40;
|
|
400
|
-
readonly popover: 30;
|
|
401
|
-
readonly toast: 50;
|
|
402
|
-
readonly tooltip: 20;
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
export type ColorToken = keyof typeof colors;
|
|
407
|
-
export type SpacingToken = keyof typeof spacing;
|
|
408
|
-
export type BorderRadiusToken = keyof typeof borderRadius;
|
|
409
|
-
export type BreakpointToken = keyof typeof breakpoints;
|
|
410
|
-
export type TypographyToken = keyof typeof typography;
|
|
411
|
-
export type FontToken = keyof typeof fonts;
|
|
412
|
-
export type TransitionToken = keyof typeof transitions;
|
|
413
|
-
export type OpacityToken = keyof typeof opacities;
|
|
414
|
-
export type ZIndexToken = keyof typeof zIndices;
|
|
415
|
-
export declare const theme: {
|
|
416
|
-
borderRadius: {
|
|
417
|
-
readonly medium: "6px";
|
|
418
|
-
readonly none: "0px";
|
|
419
|
-
readonly small: "3px";
|
|
420
|
-
};
|
|
421
|
-
breakpoints: {
|
|
422
|
-
readonly large: "1200px";
|
|
423
|
-
readonly medium: "1024px";
|
|
424
|
-
readonly small: "768px";
|
|
425
|
-
};
|
|
426
|
-
colors: {
|
|
427
|
-
readonly background: "#F5F5F5";
|
|
428
|
-
readonly border: "rgba(214, 209, 204, 0.5)";
|
|
429
|
-
readonly brand: "rgb(255, 140, 0)";
|
|
430
|
-
readonly fill: "#fff";
|
|
431
|
-
readonly hover: "rgba(214, 209, 204, 0.25)";
|
|
432
|
-
readonly overlay: "rgba(0, 0, 0, 0.5)";
|
|
433
|
-
readonly text: "#000";
|
|
434
|
-
};
|
|
435
|
-
fonts: {
|
|
436
|
-
readonly default: "'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
437
|
-
readonly heading: "'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif";
|
|
438
|
-
};
|
|
439
|
-
media: {
|
|
440
|
-
readonly large: "@media (min-width: 1024px)";
|
|
441
|
-
readonly medium: "@media (min-width: 768px) and (max-width: 1024px)";
|
|
442
|
-
readonly small: "@media (max-width: 768px)";
|
|
443
|
-
};
|
|
444
|
-
opacities: {
|
|
445
|
-
readonly disabled: "0.5";
|
|
446
|
-
readonly light: "0.55";
|
|
447
|
-
readonly muted: "0.7";
|
|
448
|
-
readonly overlay: "0.8";
|
|
449
|
-
};
|
|
450
|
-
spacing: {
|
|
451
|
-
readonly huge: "48px";
|
|
452
|
-
readonly large: "24px";
|
|
453
|
-
readonly larger: "32px";
|
|
454
|
-
readonly massive: "64px";
|
|
455
|
-
readonly medium: "16px";
|
|
456
|
-
readonly small: "8px";
|
|
457
|
-
readonly smaller: "4px";
|
|
458
|
-
};
|
|
459
|
-
transitions: {
|
|
460
|
-
readonly default: "all 0.2s ease";
|
|
461
|
-
readonly fast: "all 0.15s ease";
|
|
462
|
-
readonly slow: "all 0.3s ease";
|
|
463
|
-
readonly spring: "all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)";
|
|
464
|
-
};
|
|
465
|
-
typography: {
|
|
466
|
-
readonly bold: "700";
|
|
467
|
-
readonly div: "inherit";
|
|
468
|
-
readonly h1: "clamp(2rem, 1.75rem + 1vw, 3rem)";
|
|
469
|
-
readonly h2: "clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)";
|
|
470
|
-
readonly h3: "clamp(1.5rem, 1.25rem + 0.75vw, 2rem)";
|
|
471
|
-
readonly h4: "clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)";
|
|
472
|
-
readonly h5: "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)";
|
|
473
|
-
readonly h6: "clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)";
|
|
474
|
-
readonly label: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
475
|
-
readonly medium: "500";
|
|
476
|
-
readonly micro: "clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)";
|
|
477
|
-
readonly normalHeight: "1.4";
|
|
478
|
-
readonly normalWeight: "400";
|
|
479
|
-
readonly p: "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)";
|
|
480
|
-
readonly relaxed: "1.6";
|
|
481
|
-
readonly semibold: "600";
|
|
482
|
-
readonly small: "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)";
|
|
483
|
-
readonly span: "inherit";
|
|
484
|
-
readonly strong: "inherit";
|
|
485
|
-
readonly tight: "1.2";
|
|
486
|
-
};
|
|
487
|
-
zIndices: {
|
|
488
|
-
readonly base: 1;
|
|
489
|
-
readonly dropdown: 10;
|
|
490
|
-
readonly modal: 40;
|
|
491
|
-
readonly popover: 30;
|
|
492
|
-
readonly toast: 50;
|
|
493
|
-
readonly tooltip: 20;
|
|
494
|
-
};
|
|
495
|
-
};
|
package/dist/styles/types.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, ElementType, JSX } from "react";
|
|
2
|
-
import { styled } from "./compiler";
|
|
3
|
-
export type CSSPropertyValue = string | number;
|
|
4
|
-
export interface CSSObject {
|
|
5
|
-
[property: string]: CSSPropertyValue | CSSObject | undefined;
|
|
6
|
-
small?: CSSObject;
|
|
7
|
-
medium?: CSSObject;
|
|
8
|
-
large?: CSSObject;
|
|
9
|
-
}
|
|
10
|
-
export interface VariantConfig {
|
|
11
|
-
[variantName: string]: {
|
|
12
|
-
[variantValue: string]: CSSObject;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface VariantProps {
|
|
16
|
-
[variantName: string]: string | boolean | undefined;
|
|
17
|
-
}
|
|
18
|
-
type HTMLElements = keyof JSX.IntrinsicElements;
|
|
19
|
-
export interface StyledBaseProps {
|
|
20
|
-
/** Custom CSS styles */
|
|
21
|
-
css?: CSSObject;
|
|
22
|
-
/** Override the underlying HTML element */
|
|
23
|
-
as?: ElementType;
|
|
24
|
-
}
|
|
25
|
-
export type StyledComponent = ReturnType<typeof styled>;
|
|
26
|
-
export type PolymorphicComponentProps<T extends HTMLElements> = ComponentPropsWithoutRef<T> & StyledBaseProps;
|
|
27
|
-
export type ColorToken = keyof typeof import("./theme").colors;
|
|
28
|
-
export type SpacingToken = keyof typeof import("./theme").spacing;
|
|
29
|
-
export type BorderRadiusToken = keyof typeof import("./theme").borderRadius;
|
|
30
|
-
export type BreakpointToken = keyof typeof import("./theme").breakpoints;
|
|
31
|
-
export type TypographyToken = keyof typeof import("./theme").typography;
|
|
32
|
-
export type FontToken = keyof typeof import("./theme").fonts;
|
|
33
|
-
export type TransitionToken = keyof typeof import("./theme").transitions;
|
|
34
|
-
export type OpacityToken = keyof typeof import("./theme").opacities;
|
|
35
|
-
export type ZIndexToken = keyof typeof import("./theme").zIndices;
|
|
36
|
-
export type ThemeName = "light" | "dark";
|
|
37
|
-
export type Theme = {
|
|
38
|
-
colors: {
|
|
39
|
-
background: string;
|
|
40
|
-
border: string;
|
|
41
|
-
brand: string;
|
|
42
|
-
fill: string;
|
|
43
|
-
hover: string;
|
|
44
|
-
overlay: string;
|
|
45
|
-
text: string;
|
|
46
|
-
};
|
|
47
|
-
spacing: typeof import("./theme").spacing;
|
|
48
|
-
typography: typeof import("./theme").typography;
|
|
49
|
-
fonts: typeof import("./theme").fonts;
|
|
50
|
-
transitions: typeof import("./theme").transitions;
|
|
51
|
-
opacities: typeof import("./theme").opacities;
|
|
52
|
-
zIndices: typeof import("./theme").zIndices;
|
|
53
|
-
borderRadius: typeof import("./theme").borderRadius;
|
|
54
|
-
breakpoints: typeof import("./theme").breakpoints;
|
|
55
|
-
media: typeof import("./theme").media;
|
|
56
|
-
};
|
|
57
|
-
export type ThemeColors = {
|
|
58
|
-
background: string;
|
|
59
|
-
border: string;
|
|
60
|
-
brand: string;
|
|
61
|
-
fill: string;
|
|
62
|
-
hover: string;
|
|
63
|
-
overlay: string;
|
|
64
|
-
text: string;
|
|
65
|
-
};
|
|
66
|
-
export {};
|