@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 +25 -50
- package/dist/index.d.ts +364 -8
- package/dist/index.js +399 -5
- package/dist/index.mjs +361 -0
- package/package.json +32 -7
- package/dist/Box.d.ts +0 -14
- package/dist/Global.d.ts +0 -2
- package/dist/SVG.d.ts +0 -6
- package/dist/normalize.d.ts +0 -144
- package/dist/system.cjs.development.js +0 -409
- package/dist/system.cjs.development.js.map +0 -1
- package/dist/system.cjs.production.min.js +0 -2
- package/dist/system.cjs.production.min.js.map +0 -1
- package/dist/system.esm.js +0 -392
- package/dist/system.esm.js.map +0 -1
- package/dist/theme.d.ts +0 -136
- package/dist/types.d.ts +0 -8
- package/dist/useTheme.d.ts +0 -16
- package/dist/variant.d.ts +0 -29
- package/src/Box.test.tsx +0 -308
- package/src/Box.tsx +0 -199
- package/src/Colors.stories.mdx +0 -499
- package/src/Global.test.tsx +0 -57
- package/src/Global.tsx +0 -34
- package/src/SVG.stories.mdx +0 -55
- package/src/SVG.test.tsx +0 -82
- package/src/SVG.tsx +0 -24
- package/src/concepts-principles.mdx +0 -84
- package/src/index.ts +0 -8
- package/src/normalize.test.tsx +0 -15
- package/src/normalize.ts +0 -100
- package/src/theme.ts +0 -157
- package/src/types.ts +0 -14
- package/src/useTheme.test.tsx +0 -123
- package/src/useTheme.tsx +0 -50
- package/src/variant.test.ts +0 -93
- package/src/variant.ts +0 -54
- package/tsconfig.build.json +0 -3
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a2, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a2, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a2, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a2;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/Box.tsx
|
|
34
|
+
import { jsx } from "@emotion/react";
|
|
35
|
+
import { css as transformStyleObject } from "@theme-ui/css";
|
|
36
|
+
import { forwardRef } from "react";
|
|
37
|
+
|
|
38
|
+
// src/normalize.ts
|
|
39
|
+
var base = {
|
|
40
|
+
boxSizing: "border-box",
|
|
41
|
+
margin: 0,
|
|
42
|
+
minWidth: 0
|
|
43
|
+
};
|
|
44
|
+
var a = __spreadProps(__spreadValues({}, base), {
|
|
45
|
+
textDecoration: "none"
|
|
46
|
+
});
|
|
47
|
+
var text = __spreadProps(__spreadValues({}, base), {
|
|
48
|
+
overflowWrap: "break-word"
|
|
49
|
+
});
|
|
50
|
+
var media = __spreadProps(__spreadValues({}, base), {
|
|
51
|
+
display: "block",
|
|
52
|
+
maxWidth: "100%"
|
|
53
|
+
});
|
|
54
|
+
var button = __spreadProps(__spreadValues({}, base), {
|
|
55
|
+
display: "block",
|
|
56
|
+
appearance: "none",
|
|
57
|
+
font: "inherit",
|
|
58
|
+
background: "transparent",
|
|
59
|
+
textAlign: "center"
|
|
60
|
+
});
|
|
61
|
+
var input = __spreadProps(__spreadValues({}, base), {
|
|
62
|
+
display: "block",
|
|
63
|
+
appearance: "none",
|
|
64
|
+
font: "inherit",
|
|
65
|
+
"&::-ms-clear": {
|
|
66
|
+
display: "none"
|
|
67
|
+
},
|
|
68
|
+
"&::-webkit-search-cancel-button": {
|
|
69
|
+
WebkitAppearance: "none"
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var select = __spreadProps(__spreadValues({}, base), {
|
|
73
|
+
display: "block",
|
|
74
|
+
appearance: "none",
|
|
75
|
+
font: "inherit",
|
|
76
|
+
"&::-ms-expand": {
|
|
77
|
+
display: "none"
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
var textarea = __spreadProps(__spreadValues({}, base), {
|
|
81
|
+
display: "block",
|
|
82
|
+
appearance: "none",
|
|
83
|
+
font: "inherit"
|
|
84
|
+
});
|
|
85
|
+
var normalize = {
|
|
86
|
+
base,
|
|
87
|
+
a,
|
|
88
|
+
p: text,
|
|
89
|
+
h1: text,
|
|
90
|
+
h2: text,
|
|
91
|
+
h3: text,
|
|
92
|
+
h4: text,
|
|
93
|
+
h5: text,
|
|
94
|
+
h6: text,
|
|
95
|
+
img: media,
|
|
96
|
+
picture: media,
|
|
97
|
+
video: media,
|
|
98
|
+
canvas: media,
|
|
99
|
+
svg: media,
|
|
100
|
+
select,
|
|
101
|
+
button,
|
|
102
|
+
textarea,
|
|
103
|
+
input
|
|
104
|
+
};
|
|
105
|
+
var getNormalizedStyles = (val) => typeof val === "string" && val in normalize ? normalize[val] : normalize.base;
|
|
106
|
+
|
|
107
|
+
// src/variant.ts
|
|
108
|
+
var isNil = (value) => value === null || value === void 0;
|
|
109
|
+
var ensureArray = (val) => isNil(val) ? [] : Array.isArray(val) ? val : [val];
|
|
110
|
+
var ensureVariantDefault = (val) => val.replace(/\.$/, "");
|
|
111
|
+
var ensureArrayVariant = (variant) => ensureArray(variant).map(ensureVariantDefault);
|
|
112
|
+
var appendVariantState = (variant, state) => {
|
|
113
|
+
return `${ensureVariantDefault(variant)}.:${state}`;
|
|
114
|
+
};
|
|
115
|
+
var conditional = (variant, _a) => {
|
|
116
|
+
var _b = _a, { disabled = false } = _b, states = __objRest(_b, ["disabled"]);
|
|
117
|
+
const entries = [...Object.entries(states), ["disabled", disabled]];
|
|
118
|
+
const stateVariants = entries.filter(([, val]) => Boolean(val)).map(([key]) => appendVariantState(variant, key));
|
|
119
|
+
return [variant, ...stateVariants];
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// src/Box.tsx
|
|
123
|
+
var isNotEmpty = (val) => !(val && Object.keys(val).length === 0 && val.constructor === Object);
|
|
124
|
+
var createThemedStyle = ({ as, __baseCSS, variant, styles, css: css2 }) => (theme) => {
|
|
125
|
+
return [
|
|
126
|
+
getNormalizedStyles(as),
|
|
127
|
+
transformStyleObject(__baseCSS)(theme),
|
|
128
|
+
...ensureArrayVariant(variant).map((v) => transformStyleObject({ variant: v })(theme)),
|
|
129
|
+
transformStyleObject(styles)(theme),
|
|
130
|
+
transformStyleObject(css2)(theme)
|
|
131
|
+
].filter(isNotEmpty);
|
|
132
|
+
};
|
|
133
|
+
var Box = forwardRef((_a, ref) => {
|
|
134
|
+
var _b = _a, {
|
|
135
|
+
as = "div",
|
|
136
|
+
children,
|
|
137
|
+
__baseCSS,
|
|
138
|
+
variant,
|
|
139
|
+
css: css2 = {},
|
|
140
|
+
display,
|
|
141
|
+
height,
|
|
142
|
+
width,
|
|
143
|
+
minWidth,
|
|
144
|
+
maxWidth,
|
|
145
|
+
position,
|
|
146
|
+
top,
|
|
147
|
+
bottom,
|
|
148
|
+
right,
|
|
149
|
+
left,
|
|
150
|
+
zIndex,
|
|
151
|
+
p,
|
|
152
|
+
px,
|
|
153
|
+
py,
|
|
154
|
+
pt,
|
|
155
|
+
pb,
|
|
156
|
+
pl,
|
|
157
|
+
pr,
|
|
158
|
+
m,
|
|
159
|
+
mx,
|
|
160
|
+
my,
|
|
161
|
+
mt,
|
|
162
|
+
mb,
|
|
163
|
+
ml,
|
|
164
|
+
mr,
|
|
165
|
+
flexDirection,
|
|
166
|
+
flexWrap,
|
|
167
|
+
flexShrink,
|
|
168
|
+
flexGrow,
|
|
169
|
+
alignItems,
|
|
170
|
+
justifyContent,
|
|
171
|
+
bg,
|
|
172
|
+
border,
|
|
173
|
+
borderRadius,
|
|
174
|
+
boxShadow,
|
|
175
|
+
opacity,
|
|
176
|
+
overflow,
|
|
177
|
+
transition
|
|
178
|
+
} = _b, props = __objRest(_b, [
|
|
179
|
+
"as",
|
|
180
|
+
"children",
|
|
181
|
+
"__baseCSS",
|
|
182
|
+
"variant",
|
|
183
|
+
"css",
|
|
184
|
+
"display",
|
|
185
|
+
"height",
|
|
186
|
+
"width",
|
|
187
|
+
"minWidth",
|
|
188
|
+
"maxWidth",
|
|
189
|
+
"position",
|
|
190
|
+
"top",
|
|
191
|
+
"bottom",
|
|
192
|
+
"right",
|
|
193
|
+
"left",
|
|
194
|
+
"zIndex",
|
|
195
|
+
"p",
|
|
196
|
+
"px",
|
|
197
|
+
"py",
|
|
198
|
+
"pt",
|
|
199
|
+
"pb",
|
|
200
|
+
"pl",
|
|
201
|
+
"pr",
|
|
202
|
+
"m",
|
|
203
|
+
"mx",
|
|
204
|
+
"my",
|
|
205
|
+
"mt",
|
|
206
|
+
"mb",
|
|
207
|
+
"ml",
|
|
208
|
+
"mr",
|
|
209
|
+
"flexDirection",
|
|
210
|
+
"flexWrap",
|
|
211
|
+
"flexShrink",
|
|
212
|
+
"flexGrow",
|
|
213
|
+
"alignItems",
|
|
214
|
+
"justifyContent",
|
|
215
|
+
"bg",
|
|
216
|
+
"border",
|
|
217
|
+
"borderRadius",
|
|
218
|
+
"boxShadow",
|
|
219
|
+
"opacity",
|
|
220
|
+
"overflow",
|
|
221
|
+
"transition"
|
|
222
|
+
]);
|
|
223
|
+
return jsx(as, __spreadProps(__spreadValues({}, props), {
|
|
224
|
+
css: createThemedStyle({
|
|
225
|
+
as,
|
|
226
|
+
__baseCSS,
|
|
227
|
+
variant,
|
|
228
|
+
css: css2,
|
|
229
|
+
styles: {
|
|
230
|
+
display,
|
|
231
|
+
height,
|
|
232
|
+
width,
|
|
233
|
+
minWidth,
|
|
234
|
+
maxWidth,
|
|
235
|
+
position,
|
|
236
|
+
top,
|
|
237
|
+
bottom,
|
|
238
|
+
right,
|
|
239
|
+
left,
|
|
240
|
+
zIndex,
|
|
241
|
+
p,
|
|
242
|
+
px,
|
|
243
|
+
py,
|
|
244
|
+
pt,
|
|
245
|
+
pb,
|
|
246
|
+
pl,
|
|
247
|
+
pr,
|
|
248
|
+
m,
|
|
249
|
+
mx,
|
|
250
|
+
my,
|
|
251
|
+
mt,
|
|
252
|
+
mb,
|
|
253
|
+
ml,
|
|
254
|
+
mr,
|
|
255
|
+
flexDirection,
|
|
256
|
+
flexWrap,
|
|
257
|
+
flexShrink,
|
|
258
|
+
flexGrow,
|
|
259
|
+
alignItems,
|
|
260
|
+
justifyContent,
|
|
261
|
+
bg,
|
|
262
|
+
border,
|
|
263
|
+
borderRadius,
|
|
264
|
+
boxShadow,
|
|
265
|
+
opacity,
|
|
266
|
+
overflow,
|
|
267
|
+
transition
|
|
268
|
+
}
|
|
269
|
+
}),
|
|
270
|
+
ref
|
|
271
|
+
}), children);
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// src/Global.tsx
|
|
275
|
+
import React2 from "react";
|
|
276
|
+
import { Global as EmotionGlobal } from "@emotion/react";
|
|
277
|
+
|
|
278
|
+
// src/useTheme.tsx
|
|
279
|
+
import React, {
|
|
280
|
+
createContext,
|
|
281
|
+
useCallback,
|
|
282
|
+
useContext
|
|
283
|
+
} from "react";
|
|
284
|
+
import { css as transformStyleObject2 } from "@theme-ui/css";
|
|
285
|
+
import { ThemeProvider as EmotionProvider } from "@emotion/react";
|
|
286
|
+
var __defaultTheme = {};
|
|
287
|
+
var InternalContext = createContext(__defaultTheme);
|
|
288
|
+
var useTheme = () => {
|
|
289
|
+
const theme = useContext(InternalContext);
|
|
290
|
+
const css2 = useCallback((style) => transformStyleObject2(style)(theme), [theme]);
|
|
291
|
+
return { theme, css: css2 };
|
|
292
|
+
};
|
|
293
|
+
function ThemeProvider({
|
|
294
|
+
theme,
|
|
295
|
+
children
|
|
296
|
+
}) {
|
|
297
|
+
return /* @__PURE__ */ React.createElement(EmotionProvider, {
|
|
298
|
+
theme
|
|
299
|
+
}, /* @__PURE__ */ React.createElement(InternalContext.Provider, {
|
|
300
|
+
value: theme
|
|
301
|
+
}, children));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// src/Global.tsx
|
|
305
|
+
var reduceMotionStyles = {
|
|
306
|
+
"@media screen and (prefers-reduced-motion: reduce), (update: slow)": {
|
|
307
|
+
"*": {
|
|
308
|
+
animationDuration: "0.001ms !important",
|
|
309
|
+
animationIterationCount: "1 !important",
|
|
310
|
+
transitionDuration: "0.001ms !important"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
var Global = () => {
|
|
315
|
+
const { css: css2 } = useTheme();
|
|
316
|
+
const styles = css2({
|
|
317
|
+
html: {
|
|
318
|
+
height: "100%",
|
|
319
|
+
variant: "root.html"
|
|
320
|
+
},
|
|
321
|
+
body: {
|
|
322
|
+
height: "100%",
|
|
323
|
+
lineHeight: 1.5,
|
|
324
|
+
WebkitFontSmoothing: "antialiased",
|
|
325
|
+
variant: "root.body"
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
return /* @__PURE__ */ React2.createElement(EmotionGlobal, {
|
|
329
|
+
styles: __spreadValues({ reduceMotionStyles }, styles)
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// src/SVG.tsx
|
|
334
|
+
import { jsx as jsx2 } from "@emotion/react";
|
|
335
|
+
var css = getNormalizedStyles("svg");
|
|
336
|
+
var SVG = (_a) => {
|
|
337
|
+
var _b = _a, { size = 24, children } = _b, props = __objRest(_b, ["size", "children"]);
|
|
338
|
+
return jsx2("svg", __spreadProps(__spreadValues({
|
|
339
|
+
width: size,
|
|
340
|
+
height: size,
|
|
341
|
+
viewBox: "0 0 24 24",
|
|
342
|
+
fill: "currentcolor"
|
|
343
|
+
}, props), {
|
|
344
|
+
css
|
|
345
|
+
}), children);
|
|
346
|
+
};
|
|
347
|
+
export {
|
|
348
|
+
Box,
|
|
349
|
+
Global,
|
|
350
|
+
SVG,
|
|
351
|
+
ThemeProvider,
|
|
352
|
+
__defaultTheme,
|
|
353
|
+
appendVariantState,
|
|
354
|
+
conditional,
|
|
355
|
+
ensureArray,
|
|
356
|
+
ensureArrayVariant,
|
|
357
|
+
ensureVariantDefault,
|
|
358
|
+
getNormalizedStyles,
|
|
359
|
+
normalize,
|
|
360
|
+
useTheme
|
|
361
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marigold/system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Marigold System Library",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/system.esm.js",
|
|
7
|
-
"typings": "dist/index.d.ts",
|
|
8
5
|
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"marigold",
|
|
8
|
+
"system",
|
|
9
|
+
"library",
|
|
10
|
+
"react",
|
|
11
|
+
"theme-ui",
|
|
12
|
+
"styling",
|
|
13
|
+
"css",
|
|
14
|
+
"emotion"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "github:marigold-ui/marigold",
|
|
26
|
+
"directory": "packages/system"
|
|
27
|
+
},
|
|
9
28
|
"dependencies": {
|
|
10
29
|
"@emotion/react": "11.7.1",
|
|
30
|
+
"@marigold/types": "0.4.0",
|
|
11
31
|
"@theme-ui/css": "0.13.1",
|
|
12
32
|
"csstype": "3.0.10"
|
|
13
33
|
},
|
|
@@ -15,8 +35,13 @@
|
|
|
15
35
|
"react": "^16.x || ^17.0.0",
|
|
16
36
|
"react-dom": "^16.x || ^17.0.0"
|
|
17
37
|
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@marigold/tsconfig": "0.3.0",
|
|
40
|
+
"tsup": "5.11.13"
|
|
41
|
+
},
|
|
18
42
|
"scripts": {
|
|
19
|
-
"build": "
|
|
20
|
-
"watch": "
|
|
43
|
+
"build": "tsup src/index.ts",
|
|
44
|
+
"watch": "tsup src/index.ts --watch",
|
|
45
|
+
"clean": "rm -rf node_modules && rm -rf dist"
|
|
21
46
|
}
|
|
22
|
-
}
|
|
47
|
+
}
|
package/dist/Box.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PolymorphicPropsWithRef, PolymorphicComponentWithRef } from '@marigold/types';
|
|
2
|
-
import { CSSObject } from './types';
|
|
3
|
-
export 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'>;
|
|
4
|
-
export declare type BoxOwnProps = {
|
|
5
|
-
css?: CSSObject;
|
|
6
|
-
variant?: string | string[];
|
|
7
|
-
/**
|
|
8
|
-
* Use to set base styles for the component
|
|
9
|
-
* @internal Used to set default styles for Marigold components
|
|
10
|
-
*/
|
|
11
|
-
__baseCSS?: CSSObject;
|
|
12
|
-
} & StyleProps;
|
|
13
|
-
export declare type BoxProps = PolymorphicPropsWithRef<BoxOwnProps, 'div'>;
|
|
14
|
-
export declare const Box: PolymorphicComponentWithRef<BoxOwnProps, 'div'>;
|
package/dist/Global.d.ts
DELETED
package/dist/SVG.d.ts
DELETED
package/dist/normalize.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const normalize: {
|
|
3
|
-
readonly base: {
|
|
4
|
-
readonly boxSizing: "border-box";
|
|
5
|
-
readonly margin: 0;
|
|
6
|
-
readonly minWidth: 0;
|
|
7
|
-
};
|
|
8
|
-
readonly a: {
|
|
9
|
-
readonly textDecoration: "none";
|
|
10
|
-
readonly boxSizing: "border-box";
|
|
11
|
-
readonly margin: 0;
|
|
12
|
-
readonly minWidth: 0;
|
|
13
|
-
};
|
|
14
|
-
readonly p: {
|
|
15
|
-
readonly overflowWrap: "break-word";
|
|
16
|
-
readonly boxSizing: "border-box";
|
|
17
|
-
readonly margin: 0;
|
|
18
|
-
readonly minWidth: 0;
|
|
19
|
-
};
|
|
20
|
-
readonly h1: {
|
|
21
|
-
readonly overflowWrap: "break-word";
|
|
22
|
-
readonly boxSizing: "border-box";
|
|
23
|
-
readonly margin: 0;
|
|
24
|
-
readonly minWidth: 0;
|
|
25
|
-
};
|
|
26
|
-
readonly h2: {
|
|
27
|
-
readonly overflowWrap: "break-word";
|
|
28
|
-
readonly boxSizing: "border-box";
|
|
29
|
-
readonly margin: 0;
|
|
30
|
-
readonly minWidth: 0;
|
|
31
|
-
};
|
|
32
|
-
readonly h3: {
|
|
33
|
-
readonly overflowWrap: "break-word";
|
|
34
|
-
readonly boxSizing: "border-box";
|
|
35
|
-
readonly margin: 0;
|
|
36
|
-
readonly minWidth: 0;
|
|
37
|
-
};
|
|
38
|
-
readonly h4: {
|
|
39
|
-
readonly overflowWrap: "break-word";
|
|
40
|
-
readonly boxSizing: "border-box";
|
|
41
|
-
readonly margin: 0;
|
|
42
|
-
readonly minWidth: 0;
|
|
43
|
-
};
|
|
44
|
-
readonly h5: {
|
|
45
|
-
readonly overflowWrap: "break-word";
|
|
46
|
-
readonly boxSizing: "border-box";
|
|
47
|
-
readonly margin: 0;
|
|
48
|
-
readonly minWidth: 0;
|
|
49
|
-
};
|
|
50
|
-
readonly h6: {
|
|
51
|
-
readonly overflowWrap: "break-word";
|
|
52
|
-
readonly boxSizing: "border-box";
|
|
53
|
-
readonly margin: 0;
|
|
54
|
-
readonly minWidth: 0;
|
|
55
|
-
};
|
|
56
|
-
readonly img: {
|
|
57
|
-
readonly display: "block";
|
|
58
|
-
readonly maxWidth: "100%";
|
|
59
|
-
readonly boxSizing: "border-box";
|
|
60
|
-
readonly margin: 0;
|
|
61
|
-
readonly minWidth: 0;
|
|
62
|
-
};
|
|
63
|
-
readonly picture: {
|
|
64
|
-
readonly display: "block";
|
|
65
|
-
readonly maxWidth: "100%";
|
|
66
|
-
readonly boxSizing: "border-box";
|
|
67
|
-
readonly margin: 0;
|
|
68
|
-
readonly minWidth: 0;
|
|
69
|
-
};
|
|
70
|
-
readonly video: {
|
|
71
|
-
readonly display: "block";
|
|
72
|
-
readonly maxWidth: "100%";
|
|
73
|
-
readonly boxSizing: "border-box";
|
|
74
|
-
readonly margin: 0;
|
|
75
|
-
readonly minWidth: 0;
|
|
76
|
-
};
|
|
77
|
-
readonly canvas: {
|
|
78
|
-
readonly display: "block";
|
|
79
|
-
readonly maxWidth: "100%";
|
|
80
|
-
readonly boxSizing: "border-box";
|
|
81
|
-
readonly margin: 0;
|
|
82
|
-
readonly minWidth: 0;
|
|
83
|
-
};
|
|
84
|
-
readonly svg: {
|
|
85
|
-
readonly display: "block";
|
|
86
|
-
readonly maxWidth: "100%";
|
|
87
|
-
readonly boxSizing: "border-box";
|
|
88
|
-
readonly margin: 0;
|
|
89
|
-
readonly minWidth: 0;
|
|
90
|
-
};
|
|
91
|
-
readonly select: {
|
|
92
|
-
readonly display: "block";
|
|
93
|
-
readonly appearance: "none";
|
|
94
|
-
readonly font: "inherit";
|
|
95
|
-
readonly '&::-ms-expand': {
|
|
96
|
-
readonly display: "none";
|
|
97
|
-
};
|
|
98
|
-
readonly boxSizing: "border-box";
|
|
99
|
-
readonly margin: 0;
|
|
100
|
-
readonly minWidth: 0;
|
|
101
|
-
};
|
|
102
|
-
readonly button: {
|
|
103
|
-
readonly display: "block";
|
|
104
|
-
readonly appearance: "none";
|
|
105
|
-
readonly font: "inherit";
|
|
106
|
-
readonly background: "transparent";
|
|
107
|
-
readonly textAlign: "center";
|
|
108
|
-
readonly boxSizing: "border-box";
|
|
109
|
-
readonly margin: 0;
|
|
110
|
-
readonly minWidth: 0;
|
|
111
|
-
};
|
|
112
|
-
readonly textarea: {
|
|
113
|
-
readonly display: "block";
|
|
114
|
-
readonly appearance: "none";
|
|
115
|
-
readonly font: "inherit";
|
|
116
|
-
readonly boxSizing: "border-box";
|
|
117
|
-
readonly margin: 0;
|
|
118
|
-
readonly minWidth: 0;
|
|
119
|
-
};
|
|
120
|
-
readonly input: {
|
|
121
|
-
readonly display: "block";
|
|
122
|
-
readonly appearance: "none";
|
|
123
|
-
readonly font: "inherit";
|
|
124
|
-
readonly '&::-ms-clear': {
|
|
125
|
-
readonly display: "none";
|
|
126
|
-
};
|
|
127
|
-
readonly '&::-webkit-search-cancel-button': {
|
|
128
|
-
readonly WebkitAppearance: "none";
|
|
129
|
-
};
|
|
130
|
-
readonly boxSizing: "border-box";
|
|
131
|
-
readonly margin: 0;
|
|
132
|
-
readonly minWidth: 0;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
export declare type NormalizedElement = keyof typeof normalize;
|
|
136
|
-
/**
|
|
137
|
-
* Type-safe helper to get normalization. If no normalization is found,
|
|
138
|
-
* returns the *base* normalization.
|
|
139
|
-
*/
|
|
140
|
-
export declare const getNormalizedStyles: (val?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined) => {
|
|
141
|
-
readonly boxSizing: "border-box";
|
|
142
|
-
readonly margin: 0;
|
|
143
|
-
readonly minWidth: 0;
|
|
144
|
-
};
|