@marigold/system 0.3.0 → 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/CHANGELOG.md CHANGED
@@ -1,95 +1,70 @@
1
1
  # @marigold/system
2
2
 
3
- ## 0.3.0
4
- ### Minor Changes
5
-
3
+ ## 0.4.0
6
4
 
5
+ ### Minor Changes
7
6
 
8
- - [#1163](https://github.com/marigold-ui/marigold/pull/1163) [`51af6693`](https://github.com/marigold-ui/marigold/commit/51af669330fd52e4e31fe5ad71d2b202ab8d2231) Thanks [@sebald](https://github.com/sebald)! - feat(system): Expose helper to transpile style object
7
+ - [`f9526234`](https://github.com/marigold-ui/marigold/commit/f9526234257a149b12c14191a524691470da3942) Thanks [@sebald](https://github.com/sebald)! - chore: Use `tsup` to build packages
9
8
 
9
+ * [`f9526234`](https://github.com/marigold-ui/marigold/commit/f9526234257a149b12c14191a524691470da3942) Thanks [@sebald](https://github.com/sebald)! - Improved size in node_modules
10
10
 
11
11
  ### Patch Changes
12
12
 
13
+ - Updated dependencies [[`f9526234`](https://github.com/marigold-ui/marigold/commit/f9526234257a149b12c14191a524691470da3942)]:
14
+ - @marigold/types@0.4.0
13
15
 
16
+ ## 0.3.1
14
17
 
15
- - [#1549](https://github.com/marigold-ui/marigold/pull/1549) [`c030aa85`](https://github.com/marigold-ui/marigold/commit/c030aa85156356c294bafe9831024f6b6f2ce4db) Thanks [@sebald](https://github.com/sebald)! - refa: use emotion's theme function in <Element>
16
-
17
-
18
+ ### Patch Changes
18
19
 
19
- - [#1515](https://github.com/marigold-ui/marigold/pull/1515) [`8eda245f`](https://github.com/marigold-ui/marigold/commit/8eda245f01a918fcdaa9f0ac211889ed869aa375) Thanks [@sebald](https://github.com/sebald)! - feat: add normalization for body and html & fix emotion leak
20
+ - [#1676](https://github.com/marigold-ui/marigold/pull/1676) [`379041bc`](https://github.com/marigold-ui/marigold/commit/379041bc7d4502bca98029a95afe43ce693222cd) Thanks [@ti10le](https://github.com/ti10le)! - remove the last mdx stories
20
21
 
22
+ ## 0.3.0
21
23
 
24
+ ### Minor Changes
22
25
 
23
- - [#1491](https://github.com/marigold-ui/marigold/pull/1491) [`5a04de11`](https://github.com/marigold-ui/marigold/commit/5a04de110637d004f5824679697ee4d6a90eaf34) Thanks [@ti10le](https://github.com/ti10le)! - remove useStyles from Element
26
+ - [#1163](https://github.com/marigold-ui/marigold/pull/1163) [`51af6693`](https://github.com/marigold-ui/marigold/commit/51af669330fd52e4e31fe5ad71d2b202ab8d2231) Thanks [@sebald](https://github.com/sebald)! - feat(system): Expose helper to transpile style object
24
27
 
28
+ ### Patch Changes
25
29
 
30
+ - [#1549](https://github.com/marigold-ui/marigold/pull/1549) [`c030aa85`](https://github.com/marigold-ui/marigold/commit/c030aa85156356c294bafe9831024f6b6f2ce4db) Thanks [@sebald](https://github.com/sebald)! - refa: use emotion's theme function in <Element>
26
31
 
27
- - [#1440](https://github.com/marigold-ui/marigold/pull/1440) [`c1da52c0`](https://github.com/marigold-ui/marigold/commit/c1da52c0f035b141608fd606e6ba3bc2b5482dc1) Thanks [@ti10le](https://github.com/ti10le)! - feature: use Element in Box + necessary fix changes
32
+ * [#1515](https://github.com/marigold-ui/marigold/pull/1515) [`8eda245f`](https://github.com/marigold-ui/marigold/commit/8eda245f01a918fcdaa9f0ac211889ed869aa375) Thanks [@sebald](https://github.com/sebald)! - feat: add normalization for body and html & fix emotion leak
28
33
 
34
+ - [#1491](https://github.com/marigold-ui/marigold/pull/1491) [`5a04de11`](https://github.com/marigold-ui/marigold/commit/5a04de110637d004f5824679697ee4d6a90eaf34) Thanks [@ti10le](https://github.com/ti10le)! - remove useStyles from Element
29
35
 
36
+ * [#1440](https://github.com/marigold-ui/marigold/pull/1440) [`c1da52c0`](https://github.com/marigold-ui/marigold/commit/c1da52c0f035b141608fd606e6ba3bc2b5482dc1) Thanks [@ti10le](https://github.com/ti10le)! - feature: use Element in Box + necessary fix changes
30
37
 
31
38
  - [#1591](https://github.com/marigold-ui/marigold/pull/1591) [`1448ddca`](https://github.com/marigold-ui/marigold/commit/1448ddcaa0f647f48b018fa74a8686af30eccc53) Thanks [@sebald](https://github.com/sebald)! - feat(jest): Improve snapshot readability
32
39
 
33
-
34
-
35
- - [#1514](https://github.com/marigold-ui/marigold/pull/1514) [`5107b943`](https://github.com/marigold-ui/marigold/commit/5107b943cb3085eb3137d84e79966acad6173a26) Thanks [@sebald](https://github.com/sebald)! - feat(system): Use emotion's context
36
-
37
-
40
+ * [#1514](https://github.com/marigold-ui/marigold/pull/1514) [`5107b943`](https://github.com/marigold-ui/marigold/commit/5107b943cb3085eb3137d84e79966acad6173a26) Thanks [@sebald](https://github.com/sebald)! - feat(system): Use emotion's context
38
41
 
39
42
  - [#1647](https://github.com/marigold-ui/marigold/pull/1647) [`cd3a0d3e`](https://github.com/marigold-ui/marigold/commit/cd3a0d3edb3f2ddc1f561e8007e1c20000f7855a) Thanks [@ti10le](https://github.com/ti10le)! - feat: conditional function to allow state props in variants
40
43
 
41
-
42
-
43
- - [#1230](https://github.com/marigold-ui/marigold/pull/1230) [`ebd6e26f`](https://github.com/marigold-ui/marigold/commit/ebd6e26f71f675b98b663bc45c6a2d5badddcd47) Thanks [@viktoria-schwarz](https://github.com/viktoria-schwarz)! - feat: add GlobalStyles via theme
44
-
45
-
44
+ * [#1230](https://github.com/marigold-ui/marigold/pull/1230) [`ebd6e26f`](https://github.com/marigold-ui/marigold/commit/ebd6e26f71f675b98b663bc45c6a2d5badddcd47) Thanks [@viktoria-schwarz](https://github.com/viktoria-schwarz)! - feat: add GlobalStyles via theme
46
45
 
47
46
  - [#1563](https://github.com/marigold-ui/marigold/pull/1563) [`6e485f5a`](https://github.com/marigold-ui/marigold/commit/6e485f5a8800094fe54c075a2b21f8abe726b3cd) Thanks [@sebald](https://github.com/sebald)! - feat: Introduce a `Theme` with all available scales
48
47
 
49
-
50
-
51
- - [#1620](https://github.com/marigold-ui/marigold/pull/1620) [`80a2abe5`](https://github.com/marigold-ui/marigold/commit/80a2abe5804ba2c5a48cc6b05211245c37baf266) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): extend Box to handle __default variants
52
-
53
-
48
+ * [#1620](https://github.com/marigold-ui/marigold/pull/1620) [`80a2abe5`](https://github.com/marigold-ui/marigold/commit/80a2abe5804ba2c5a48cc6b05211245c37baf266) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): extend Box to handle \_\_default variants
54
49
 
55
50
  - [#1579](https://github.com/marigold-ui/marigold/pull/1579) [`e13e3cc1`](https://github.com/marigold-ui/marigold/commit/e13e3cc1fc66b261209973b1fc90eb48117076e9) Thanks [@ti10le](https://github.com/ti10le)! - feat: remove Heading from marigold
56
51
 
57
-
58
-
59
- - [#1622](https://github.com/marigold-ui/marigold/pull/1622) [`1829cf17`](https://github.com/marigold-ui/marigold/commit/1829cf17e16c574e5577b3e1709c34dc7ed4faaf) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Card default variant
60
-
61
-
52
+ * [#1622](https://github.com/marigold-ui/marigold/pull/1622) [`1829cf17`](https://github.com/marigold-ui/marigold/commit/1829cf17e16c574e5577b3e1709c34dc7ed4faaf) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Card default variant
62
53
 
63
54
  - [#1501](https://github.com/marigold-ui/marigold/pull/1501) [`1c1f8648`](https://github.com/marigold-ui/marigold/commit/1c1f864820a060214406ef711f4ed873746c16c4) Thanks [@ti10le](https://github.com/ti10le)! - feat(storybook): remove use styles stories
64
55
 
65
-
66
-
67
- - [#1190](https://github.com/marigold-ui/marigold/pull/1190) [`a00b7eb9`](https://github.com/marigold-ui/marigold/commit/a00b7eb971131634414d3912d059fb505bb7a370) Thanks [@sebald](https://github.com/sebald)! - fix(system): List reset should not remove the enumeration
68
-
69
-
56
+ * [#1190](https://github.com/marigold-ui/marigold/pull/1190) [`a00b7eb9`](https://github.com/marigold-ui/marigold/commit/a00b7eb971131634414d3912d059fb505bb7a370) Thanks [@sebald](https://github.com/sebald)! - fix(system): List reset should not remove the enumeration
70
57
 
71
58
  - [#1499](https://github.com/marigold-ui/marigold/pull/1499) [`ec5baf85`](https://github.com/marigold-ui/marigold/commit/ec5baf85a9a0f82a4fca5bbd1e1680316c186593) Thanks [@sebald](https://github.com/sebald)! - feat: Update and simplify normalization
72
59
 
73
-
74
-
75
- - [#1652](https://github.com/marigold-ui/marigold/pull/1652) [`0bb8f19e`](https://github.com/marigold-ui/marigold/commit/0bb8f19ebdec0e2f9dc3f6164f4373cac5c10880) Thanks [@sebald](https://github.com/sebald)! - refa(system): Groupt variant related fns in own file
76
-
77
-
60
+ * [#1652](https://github.com/marigold-ui/marigold/pull/1652) [`0bb8f19e`](https://github.com/marigold-ui/marigold/commit/0bb8f19ebdec0e2f9dc3f6164f4373cac5c10880) Thanks [@sebald](https://github.com/sebald)! - refa(system): Groupt variant related fns in own file
78
61
 
79
62
  - [#1436](https://github.com/marigold-ui/marigold/pull/1436) [`c4ae5c5c`](https://github.com/marigold-ui/marigold/commit/c4ae5c5ca442f93034ff8f4c70adc295547951d4) Thanks [@ti10le](https://github.com/ti10le)! - create Element component + normalize file
80
63
 
81
-
82
-
83
- - [#1508](https://github.com/marigold-ui/marigold/pull/1508) [`a1ef2108`](https://github.com/marigold-ui/marigold/commit/a1ef2108dd6c8e6838b517dd58c82d38e71dae2b) Thanks [@sebald](https://github.com/sebald)! - feat: Add default styling to `<Element>`
84
-
85
-
64
+ * [#1508](https://github.com/marigold-ui/marigold/pull/1508) [`a1ef2108`](https://github.com/marigold-ui/marigold/commit/a1ef2108dd6c8e6838b517dd58c82d38e71dae2b) Thanks [@sebald](https://github.com/sebald)! - feat: Add default styling to `<Element>`
86
65
 
87
66
  - [#1621](https://github.com/marigold-ui/marigold/pull/1621) [`2f7b936f`](https://github.com/marigold-ui/marigold/commit/2f7b936f5b07eade00a51cb138c3c492f1e08c9d) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Badge default variant
88
67
 
89
-
90
-
91
- - [#1550](https://github.com/marigold-ui/marigold/pull/1550) [`846eb640`](https://github.com/marigold-ui/marigold/commit/846eb640ad035c7f3410b4a8a451f8de56e62339) Thanks [@sebald](https://github.com/sebald)! - feat: Merge <Box> and <Element>
92
-
93
-
68
+ * [#1550](https://github.com/marigold-ui/marigold/pull/1550) [`846eb640`](https://github.com/marigold-ui/marigold/commit/846eb640ad035c7f3410b4a8a451f8de56e62339) Thanks [@sebald](https://github.com/sebald)! - feat: Merge <Box> and <Element>
94
69
 
95
70
  - [#1614](https://github.com/marigold-ui/marigold/pull/1614) [`5d63cd9c`](https://github.com/marigold-ui/marigold/commit/5d63cd9c14578787083c82c85d93bbd2ff0efac6) Thanks [@ti10le](https://github.com/ti10le)! - remove all purple color things
package/dist/index.d.ts CHANGED
@@ -1,8 +1,364 @@
1
- export * from './Box';
2
- export * from './Global';
3
- export * from './normalize';
4
- export * from './SVG';
5
- export * from './theme';
6
- export * from './types';
7
- export * from './useTheme';
8
- export * from './variant';
1
+ import { PolymorphicPropsWithRef, PolymorphicComponentWithRef, ComponentProps } from '@marigold/types';
2
+ import * as _theme_ui_css from '@theme-ui/css';
3
+ import { ResponsiveStyleValue as ResponsiveStyleValue$1, ThemeUIStyleObject, ThemeUICSSObject, ThemeUICSSProperties, NestedScaleDict } from '@theme-ui/css';
4
+ import React, { ElementType, ReactNode } from 'react';
5
+ import * as CSS from 'csstype';
6
+
7
+ /**
8
+ * Create type aliases for `theme-ui` so that it doesn't leak too much into our code.
9
+ */
10
+
11
+ declare type ResponsiveStyleValue<T> = ResponsiveStyleValue$1<T>;
12
+ declare type StyleObject = ThemeUIStyleObject;
13
+ declare type CSSObject = ThemeUICSSObject;
14
+ declare type CSSProperties = ThemeUICSSProperties;
15
+
16
+ declare type StyleProps = Pick<CSSObject, 'display' | 'height' | 'width' | 'minWidth' | 'maxWidth' | 'position' | 'top' | 'bottom' | 'right' | 'left' | 'zIndex' | 'p' | 'px' | 'py' | 'pt' | 'pb' | 'pl' | 'pr' | 'm' | 'mx' | 'my' | 'mt' | 'mb' | 'ml' | 'mr' | 'flexDirection' | 'flexWrap' | 'flexShrink' | 'flexGrow' | 'alignItems' | 'justifyContent' | 'bg' | 'border' | 'borderRadius' | 'boxShadow' | 'opacity' | 'overflow' | 'transition'>;
17
+ declare type BoxOwnProps = {
18
+ css?: CSSObject;
19
+ variant?: string | string[];
20
+ /**
21
+ * Use to set base styles for the component
22
+ * @internal Used to set default styles for Marigold components
23
+ */
24
+ __baseCSS?: CSSObject;
25
+ } & StyleProps;
26
+ declare type BoxProps = PolymorphicPropsWithRef<BoxOwnProps, 'div'>;
27
+ declare const Box: PolymorphicComponentWithRef<BoxOwnProps, 'div'>;
28
+
29
+ declare const Global: () => JSX.Element;
30
+
31
+ /**
32
+ * Normalize styling of certain elements between browsers.
33
+ * Based on https://www.joshwcomeau.com/css/custom-css-reset/
34
+ */
35
+
36
+ declare const normalize: {
37
+ readonly base: {
38
+ readonly boxSizing: "border-box";
39
+ readonly margin: 0;
40
+ readonly minWidth: 0;
41
+ };
42
+ readonly a: {
43
+ readonly textDecoration: "none";
44
+ readonly boxSizing: "border-box";
45
+ readonly margin: 0;
46
+ readonly minWidth: 0;
47
+ };
48
+ readonly p: {
49
+ readonly overflowWrap: "break-word";
50
+ readonly boxSizing: "border-box";
51
+ readonly margin: 0;
52
+ readonly minWidth: 0;
53
+ };
54
+ readonly h1: {
55
+ readonly overflowWrap: "break-word";
56
+ readonly boxSizing: "border-box";
57
+ readonly margin: 0;
58
+ readonly minWidth: 0;
59
+ };
60
+ readonly h2: {
61
+ readonly overflowWrap: "break-word";
62
+ readonly boxSizing: "border-box";
63
+ readonly margin: 0;
64
+ readonly minWidth: 0;
65
+ };
66
+ readonly h3: {
67
+ readonly overflowWrap: "break-word";
68
+ readonly boxSizing: "border-box";
69
+ readonly margin: 0;
70
+ readonly minWidth: 0;
71
+ };
72
+ readonly h4: {
73
+ readonly overflowWrap: "break-word";
74
+ readonly boxSizing: "border-box";
75
+ readonly margin: 0;
76
+ readonly minWidth: 0;
77
+ };
78
+ readonly h5: {
79
+ readonly overflowWrap: "break-word";
80
+ readonly boxSizing: "border-box";
81
+ readonly margin: 0;
82
+ readonly minWidth: 0;
83
+ };
84
+ readonly h6: {
85
+ readonly overflowWrap: "break-word";
86
+ readonly boxSizing: "border-box";
87
+ readonly margin: 0;
88
+ readonly minWidth: 0;
89
+ };
90
+ readonly img: {
91
+ readonly display: "block";
92
+ readonly maxWidth: "100%";
93
+ readonly boxSizing: "border-box";
94
+ readonly margin: 0;
95
+ readonly minWidth: 0;
96
+ };
97
+ readonly picture: {
98
+ readonly display: "block";
99
+ readonly maxWidth: "100%";
100
+ readonly boxSizing: "border-box";
101
+ readonly margin: 0;
102
+ readonly minWidth: 0;
103
+ };
104
+ readonly video: {
105
+ readonly display: "block";
106
+ readonly maxWidth: "100%";
107
+ readonly boxSizing: "border-box";
108
+ readonly margin: 0;
109
+ readonly minWidth: 0;
110
+ };
111
+ readonly canvas: {
112
+ readonly display: "block";
113
+ readonly maxWidth: "100%";
114
+ readonly boxSizing: "border-box";
115
+ readonly margin: 0;
116
+ readonly minWidth: 0;
117
+ };
118
+ readonly svg: {
119
+ readonly display: "block";
120
+ readonly maxWidth: "100%";
121
+ readonly boxSizing: "border-box";
122
+ readonly margin: 0;
123
+ readonly minWidth: 0;
124
+ };
125
+ readonly select: {
126
+ readonly display: "block";
127
+ readonly appearance: "none";
128
+ readonly font: "inherit";
129
+ readonly '&::-ms-expand': {
130
+ readonly display: "none";
131
+ };
132
+ readonly boxSizing: "border-box";
133
+ readonly margin: 0;
134
+ readonly minWidth: 0;
135
+ };
136
+ readonly button: {
137
+ readonly display: "block";
138
+ readonly appearance: "none";
139
+ readonly font: "inherit";
140
+ readonly background: "transparent";
141
+ readonly textAlign: "center";
142
+ readonly boxSizing: "border-box";
143
+ readonly margin: 0;
144
+ readonly minWidth: 0;
145
+ };
146
+ readonly textarea: {
147
+ readonly display: "block";
148
+ readonly appearance: "none";
149
+ readonly font: "inherit";
150
+ readonly boxSizing: "border-box";
151
+ readonly margin: 0;
152
+ readonly minWidth: 0;
153
+ };
154
+ readonly input: {
155
+ readonly display: "block";
156
+ readonly appearance: "none";
157
+ readonly font: "inherit";
158
+ readonly '&::-ms-clear': {
159
+ readonly display: "none";
160
+ };
161
+ readonly '&::-webkit-search-cancel-button': {
162
+ readonly WebkitAppearance: "none";
163
+ };
164
+ readonly boxSizing: "border-box";
165
+ readonly margin: 0;
166
+ readonly minWidth: 0;
167
+ };
168
+ };
169
+ declare type NormalizedElement = keyof typeof normalize;
170
+ /**
171
+ * Type-safe helper to get normalization. If no normalization is found,
172
+ * returns the *base* normalization.
173
+ */
174
+ declare const getNormalizedStyles: (val?: ElementType<any> | undefined) => {
175
+ readonly boxSizing: "border-box";
176
+ readonly margin: 0;
177
+ readonly minWidth: 0;
178
+ };
179
+
180
+ declare type SVGProps = {
181
+ size?: number;
182
+ } & ComponentProps<'svg'>;
183
+ declare const SVG: React.FC<SVGProps>;
184
+
185
+ /**
186
+ * Value used to define a scale.
187
+ *
188
+ * Can be nested to support a default value.
189
+ *
190
+ * @example
191
+ * Given a theme
192
+ * ```
193
+ * {
194
+ * colors: {
195
+ * primary: { __default: '#00f', light: '#33f' }
196
+ * }
197
+ * }
198
+ * ```
199
+ * `css{{ color: 'primary' }}` resolves to `color: #00f`.
200
+ */
201
+ declare type ScaleValue<T> = T | T[] | NestedScaleDict<T> | undefined;
202
+ /**
203
+ * Scales are a set of named, pre-defined CSS values which are used
204
+ * to create consitency in sizing across visual elements. They give
205
+ * plain values semantics meaning.
206
+ *
207
+ * Marigold uses a plain object to define scales, where the key should be a
208
+ * descriptive name for the scale (e.g. `small`/`medium`/.. or `body`/`heading`/...),
209
+ * and the value is the CSS value.
210
+ */
211
+ declare type Scale<T> = {
212
+ [key: string]: ScaleValue<T>;
213
+ };
214
+ /**
215
+ * Predefined {@link Scale} scale which uses size values.
216
+ */
217
+ declare type SizeScale<T> = {
218
+ xxsmall?: ScaleValue<T>;
219
+ xsmall?: ScaleValue<T>;
220
+ small?: ScaleValue<T>;
221
+ medium?: ScaleValue<T>;
222
+ large?: ScaleValue<T>;
223
+ xlarge?: ScaleValue<T>;
224
+ xxlarge?: ScaleValue<T>;
225
+ };
226
+ /**
227
+ * A {@link SizeScale} that also includes a required `none` value, which is
228
+ * usually used to define the blank value (e.g `0`).
229
+ */
230
+ declare type ZeroScale<T> = {
231
+ none: ScaleValue<T>;
232
+ } & Scale<T>;
233
+ /**
234
+ * Base theme with typings for available scales properties.
235
+ */
236
+ interface Theme {
237
+ /**
238
+ * To configure the default breakpoints used in responsive array values,
239
+ * add a breakpoints array to your theme.
240
+ *
241
+ * Each breakpoint should be a string with a CSS length unit included or a
242
+ * string including a CSS media query. String values with a CSS length unit
243
+ * will be used to generate a mobile-first (i.e. min-width) media query.
244
+ *
245
+ * @example
246
+ * ```ts
247
+ * {
248
+ * breakpoints: [
249
+ * '40em', '@media (min-width: 56em) and (orientation: landscape)', '64em',
250
+ * ],
251
+ * }
252
+ * ```
253
+ */
254
+ breakpoints?: Array<string>;
255
+ colors?: Scale<CSS.Property.Color | NestedScaleDict<CSS.Property.Color>>;
256
+ /**
257
+ * Used to define a scale for whitspace values,
258
+ * like `padding`, `margin`, `gap`, etc.
259
+ */
260
+ space?: ZeroScale<CSS.Property.Margin<number | string>>;
261
+ /**
262
+ * Used to define a `font-size` scale.
263
+ */
264
+ fontSizes?: Scale<CSS.Property.FontSize<number>>;
265
+ /**
266
+ * Used to define a `font-family` scale.
267
+ */
268
+ fonts?: Scale<CSS.Property.FontFamily>;
269
+ /**
270
+ * Used to define a `font-weight` scale.
271
+ */
272
+ fontWeights?: Scale<CSS.Property.FontWeight>;
273
+ /**
274
+ * Used to define a `line-height` scale.
275
+ */
276
+ lineHeights?: Scale<CSS.Property.LineHeight<string | 0 | number>>;
277
+ /**
278
+ * Used to define a `letter-spacing` scale.
279
+ */
280
+ letterSpacings?: ZeroScale<CSS.Property.LetterSpacing<string | 0 | number>>;
281
+ /**
282
+ * Used to define a scale for size values,
283
+ * like `height`, `width`, `flexBasis`, etc.
284
+ */
285
+ sizes?: ZeroScale<CSS.Property.Height<{}> | CSS.Property.Width<{}>>;
286
+ /**
287
+ * Used to define different `border` styles.
288
+ */
289
+ borders?: ZeroScale<CSS.Property.Border<{}>>;
290
+ /**
291
+ * Used to define `border-style` styles.
292
+ */
293
+ borderStyles?: Scale<CSS.Property.Border<{}>>;
294
+ /**
295
+ * Used to define `border-width` styles.
296
+ */
297
+ borderWidths?: ZeroScale<CSS.Property.BorderWidth<string | 0 | number>>;
298
+ /**
299
+ * Used to define `border-radius` styles.
300
+ */
301
+ radii?: ZeroScale<CSS.Property.BorderRadius<string | 0 | number>>;
302
+ /**
303
+ * Used to define `Shadow` styles.
304
+ */
305
+ shadows?: ZeroScale<CSS.Property.BoxShadow>;
306
+ /**
307
+ * Used to define a `z-index` scake.
308
+ */
309
+ zIndices?: Scale<CSS.Property.ZIndex>;
310
+ /**
311
+ * Used to define a `opacity` scale.
312
+ */
313
+ opacities?: Scale<CSS.Property.Opacity>;
314
+ /**
315
+ * Used to define a `transition` styles.
316
+ */
317
+ transitions?: ZeroScale<CSS.Property.Transition>;
318
+ }
319
+
320
+ /**
321
+ * @internal
322
+ */
323
+ declare const __defaultTheme: Theme;
324
+ declare const useTheme: () => {
325
+ theme: Theme;
326
+ css: (style: StyleObject) => _theme_ui_css.CSSObject;
327
+ };
328
+ declare type ThemeProviderProps<T extends Theme> = {
329
+ theme: T;
330
+ children: ReactNode;
331
+ };
332
+ declare function ThemeProvider<T extends Theme>({ theme, children, }: ThemeProviderProps<T>): JSX.Element;
333
+
334
+ /**
335
+ * Ensures that the `val` is an array. Will return an empty array if `val` is falsy.
336
+ */
337
+ declare const ensureArray: <T>(val?: T | T[] | undefined) => T[];
338
+ /**
339
+ * Removes trailing dot from variant, if necessary. This is necessary to support
340
+ * `__default` styles. See https://github.com/system-ui/theme-ui/pull/951
341
+ */
342
+ declare const ensureVariantDefault: (val: string) => string;
343
+ /**
344
+ * Ensures that the `variant` is an array and supports the `__default` key.
345
+ */
346
+ declare const ensureArrayVariant: <T extends string>(variant?: T | T[] | undefined) => string[];
347
+ declare type State = {
348
+ checked?: boolean;
349
+ focus?: boolean;
350
+ hover?: boolean;
351
+ disabled?: boolean;
352
+ error?: boolean;
353
+ };
354
+ /**
355
+ * Appends given `state` to a `variant`.
356
+ */
357
+ declare const appendVariantState: (variant: string, state: keyof State) => string;
358
+ /**
359
+ * Create a variant array from a `variant` and `state` containing
360
+ * passed states, if they are truthy.
361
+ */
362
+ declare const conditional: (variant: string, { disabled, ...states }: State) => string[];
363
+
364
+ export { Box, BoxOwnProps, BoxProps, CSSObject, CSSProperties, Global, NormalizedElement, ResponsiveStyleValue, SVG, SVGProps, Scale, ScaleValue, SizeScale, State, StyleObject, StyleProps, Theme, ThemeProvider, ThemeProviderProps, ZeroScale, __defaultTheme, appendVariantState, conditional, ensureArray, ensureArrayVariant, ensureVariantDefault, getNormalizedStyles, normalize, useTheme };