@vitus-labs/unistyle 0.23.0-alpha.2 → 0.24.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/lib/analysis/vitus-labs-unistyle.browser.js.html +1 -1
- package/lib/analysis/vitus-labs-unistyle.js.html +1 -1
- package/lib/analysis/vitus-labs-unistyle.module.js.html +1 -1
- package/lib/analysis/vitus-labs-unistyle.native.js.html +1 -1
- package/lib/analysis/vitus-labs-unistyle.umd.js.html +1 -1
- package/lib/analysis/vitus-labs-unistyle.umd.min.js.html +1 -1
- package/lib/index.d.ts +17 -24
- package/lib/types/index.d.ts +2 -3
- package/lib/types/styles/extendCss.d.ts +1 -1
- package/lib/types/styles/shorthands/index.d.ts +3 -0
- package/lib/types/styles/shorthands/spacingShorthand.d.ts +12 -0
- package/lib/types/styles/styles/types.d.ts +9 -11
- package/lib/types/styles/styles/utils.d.ts +11 -0
- package/lib/types/types.d.ts +6 -0
- package/lib/types/units/value.d.ts +2 -1
- package/lib/vitus-labs-unistyle.browser.js +93 -36
- package/lib/vitus-labs-unistyle.browser.js.map +1 -1
- package/lib/vitus-labs-unistyle.js +90 -30
- package/lib/vitus-labs-unistyle.js.map +1 -1
- package/lib/vitus-labs-unistyle.module.js +93 -36
- package/lib/vitus-labs-unistyle.module.js.map +1 -1
- package/lib/vitus-labs-unistyle.native.js +93 -36
- package/lib/vitus-labs-unistyle.native.js.map +1 -1
- package/lib/vitus-labs-unistyle.umd.js +90 -30
- package/lib/vitus-labs-unistyle.umd.js.map +1 -1
- package/lib/vitus-labs-unistyle.umd.min.js +163 -171
- package/lib/vitus-labs-unistyle.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/lib/types/hooks/index.d.ts +0 -3
- package/lib/types/hooks/useWindowResize.d.ts +0 -9
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { config } from '@vitus-labs/core';
|
|
2
|
-
|
|
3
|
-
declare type
|
|
4
|
-
declare type Length = number | string;
|
|
5
|
-
declare type BorderColor = 'transparent' | string | Defaults;
|
|
2
|
+
import { Value, Defaults, Color } from "../../types";
|
|
3
|
+
declare type BorderColor = Color | Defaults;
|
|
6
4
|
declare type BorderImageRepeat = 'stretch' | 'repeat' | 'round' | 'space' | Defaults;
|
|
7
5
|
declare type TextDecoration = 'none' | 'underline' | 'overline' | 'line-through' | 'blink' | Defaults;
|
|
8
6
|
declare type BorderStyle = 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | Defaults;
|
|
@@ -10,8 +8,8 @@ declare type FontSize = 'medium' | 'xx-small' | 'x-small' | 'small' | 'large' |
|
|
|
10
8
|
declare type ListStyleType = 'disc' | 'armenian' | 'circle' | 'cjk-ideographic' | 'decimal' | 'decimal-leading-zero' | 'georgian' | 'hebrew' | 'hiragana' | 'hiragana-iroha' | 'katakana' | 'katakana-iroha' | 'lower-alpha' | 'lower-greek' | 'lower-latin' | 'lower-roman' | 'none' | 'square' | 'upper-alpha' | 'upper-greek' | 'upper-latin' | 'upper-roman' | Defaults;
|
|
11
9
|
declare type Overflow = 'visible' | 'hidden' | 'scroll' | 'auto' | Defaults;
|
|
12
10
|
declare type Cursor = 'alias' | 'all-scroll' | 'auto' | 'cell' | 'context-menu' | 'col-resize' | 'copy' | 'crosshair' | 'default' | 'e-resize' | 'ew-resize' | 'grab' | 'grabbing' | 'help' | 'move' | 'n-resize' | 'ne-resize' | 'nesw-resize' | 'ns-resize' | 'nw-resize' | 'nwse-resize' | 'no-drop' | 'none' | 'not-allowed' | 'pointer' | 'progress' | 'row-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'text' | 'URL' | 'vertical-text' | 'w-resize' | 'wait' | 'zoom-in' | 'zoom-out' | Defaults;
|
|
13
|
-
export declare type ITheme =
|
|
14
|
-
inset:
|
|
11
|
+
export declare type ITheme = {
|
|
12
|
+
inset: Value;
|
|
15
13
|
top: Value;
|
|
16
14
|
bottom: Value;
|
|
17
15
|
left: Value;
|
|
@@ -50,7 +48,7 @@ export declare type ITheme = Partial<{
|
|
|
50
48
|
background: string;
|
|
51
49
|
backgroundAttachment: 'scroll' | 'fixed' | Defaults;
|
|
52
50
|
backgroundClip: 'border-box' | 'padding-box' | 'content-box' | Defaults;
|
|
53
|
-
backgroundColor:
|
|
51
|
+
backgroundColor: Color;
|
|
54
52
|
backgroundImage: string | 'none' | Defaults;
|
|
55
53
|
backgroundOrigin: 'padding-box' | 'border-box' | 'content-box' | Defaults;
|
|
56
54
|
backgroundPosition: any;
|
|
@@ -105,7 +103,7 @@ export declare type ITheme = Partial<{
|
|
|
105
103
|
clear: 'left' | 'right' | 'auto' | 'both' | 'none' | Defaults;
|
|
106
104
|
clip: 'shape' | 'auto' | Defaults;
|
|
107
105
|
clipPath: string;
|
|
108
|
-
color:
|
|
106
|
+
color: Color;
|
|
109
107
|
content: 'normal' | 'none' | 'counter' | 'open-quote' | 'close-quote' | 'no-open-quote' | 'no-close-quote' | Defaults | string;
|
|
110
108
|
counterIncrement: string;
|
|
111
109
|
counterReset: string;
|
|
@@ -133,7 +131,7 @@ export declare type ITheme = Partial<{
|
|
|
133
131
|
justifyContent: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
|
|
134
132
|
keyframe: any;
|
|
135
133
|
letterSpacing: 'normal' | Value | Defaults;
|
|
136
|
-
lineHeight: 'normal' |
|
|
134
|
+
lineHeight: Value | 'normal' | 'revert' | 'unset' | Defaults;
|
|
137
135
|
listStyle: string;
|
|
138
136
|
listStyleImage: 'none' | string | Defaults;
|
|
139
137
|
listStylePosition: string;
|
|
@@ -190,8 +188,8 @@ export declare type ITheme = Partial<{
|
|
|
190
188
|
clearFix: boolean;
|
|
191
189
|
fullScreen: boolean;
|
|
192
190
|
extendCss: ReturnType<typeof config.css> | string;
|
|
193
|
-
}
|
|
191
|
+
};
|
|
194
192
|
export declare type Theme = {
|
|
195
|
-
[I in keyof ITheme]: ITheme[I] | null;
|
|
193
|
+
[I in keyof ITheme]: ITheme[I] | null | undefined;
|
|
196
194
|
};
|
|
197
195
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Value } from "../../types";
|
|
2
|
+
export declare type SpacingShorthand = (property: 'padding' | 'margin') => (props: {
|
|
3
|
+
top: Value | null | undefined;
|
|
4
|
+
left: Value | null | undefined;
|
|
5
|
+
right: Value | null | undefined;
|
|
6
|
+
bottom: Value | null | undefined;
|
|
7
|
+
x: Value | null | undefined;
|
|
8
|
+
y: Value | null | undefined;
|
|
9
|
+
full: Value | null | undefined;
|
|
10
|
+
}) => string;
|
|
11
|
+
export declare const spacingShorthand: SpacingShorthand;
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { config } from '@vitus-labs/core';
|
|
2
2
|
export declare type Css = typeof config.css;
|
|
3
|
+
export declare type Defaults = 'initial' | 'inherit';
|
|
4
|
+
export declare type Units = 'px' | 'rem' | 'em' | '%' | 'vh' | 'vw' | 'vmin' | 'vmax';
|
|
5
|
+
export declare type UnitValue = number | `${number}${Units}`;
|
|
6
|
+
export declare type Value = UnitValue | 'auto' | Defaults;
|
|
7
|
+
export declare type Color = `#${string | number}` | 'currentcolor' | 'transparent' | `rgb(${number}, ${number}, ${number})` | `rgba(${number}, ${number}, ${number}, ${number})` | `hsl(${number}, ${number}%, ${number}%)` | `hsla(${number}, ${number}%, ${number}%, ${number})` | Defaults;
|
|
8
|
+
export declare type BrowserColors = 'black' | 'silver' | 'gray' | 'white' | 'maroon' | 'red' | 'purple' | 'fuchsia' | 'green' | 'lime' | 'olive' | 'yellow' | 'navy' | 'blue' | 'teal' | 'aqua' | 'orange' | 'aliceblue' | 'antiquewhite' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'blanchedalmond' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'limegreen' | 'linen' | 'magenta' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'oldlace' | 'olivedrab' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'whitesmoke' | 'yellowgreen' | 'rebeccapurple';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Units } from "../types";
|
|
2
|
+
export declare type Value = (values: Array<unknown>, rootSize?: number, outputUnit?: Units) => string | number;
|
|
2
3
|
declare const value: Value;
|
|
3
4
|
export default value;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useMemo
|
|
2
|
-
import { memoize, isEmpty, set, config, Provider as Provider$1
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { memoize, isEmpty, set, config, Provider as Provider$1 } from '@vitus-labs/core';
|
|
3
3
|
export { context } from '@vitus-labs/core';
|
|
4
4
|
|
|
5
5
|
const breakpoints = {
|
|
@@ -64,7 +64,7 @@ const handleObjectCb = (obj) => (bp, i, bps, res) => {
|
|
|
64
64
|
};
|
|
65
65
|
const handleValueCb = (value) => () => value;
|
|
66
66
|
const shouldNormalize = (props) => Object.values(props).some((item) => typeof item === 'object' || Array.isArray(item));
|
|
67
|
-
const normalizeTheme =
|
|
67
|
+
const normalizeTheme = ({ theme, breakpoints }) => {
|
|
68
68
|
if (!shouldNormalize(theme))
|
|
69
69
|
return theme;
|
|
70
70
|
const getBpValues = assignToBreakbointKey(breakpoints);
|
|
@@ -86,7 +86,7 @@ const normalizeTheme = memoize(({ theme, breakpoints }) => {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
return result;
|
|
89
|
-
}
|
|
89
|
+
};
|
|
90
90
|
|
|
91
91
|
const removeUnexpectedKeys = (obj, keys) => {
|
|
92
92
|
const result = {};
|
|
@@ -208,22 +208,6 @@ const Provider = ({ theme, children, ...props }) => {
|
|
|
208
208
|
return (React.createElement(Provider$1, { theme: result, ...props }, children));
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
const useWindowResize = (throttleDelay = 200, { width = 0, height = 0 } = {}) => {
|
|
212
|
-
const getSize = () => ({
|
|
213
|
-
width: window.innerWidth ,
|
|
214
|
-
height: window.innerHeight ,
|
|
215
|
-
});
|
|
216
|
-
const [windowSize, setWindowSize] = useState(getSize);
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
const handleResize = throttle(() => {
|
|
219
|
-
setWindowSize(getSize());
|
|
220
|
-
}, throttleDelay);
|
|
221
|
-
window.addEventListener('resize', handleResize, false);
|
|
222
|
-
return () => window.removeEventListener('resize', handleResize, false);
|
|
223
|
-
}, []); // Empty array ensures that effect is only run on mount and unmount
|
|
224
|
-
return windowSize;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
211
|
const stripUnit = (value, unitReturn) => {
|
|
228
212
|
const cssRegex = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
|
|
229
213
|
if (typeof value !== 'string')
|
|
@@ -239,11 +223,12 @@ const stripUnit = (value, unitReturn) => {
|
|
|
239
223
|
return value;
|
|
240
224
|
};
|
|
241
225
|
|
|
242
|
-
const
|
|
243
|
-
|
|
226
|
+
const isNotValue = (value) => !value && value !== 0;
|
|
227
|
+
const normalizeUnit = ({ param, rootSize = 16, outputUnit = 'rem' , }) => {
|
|
228
|
+
if (isNotValue(param))
|
|
244
229
|
return null;
|
|
245
230
|
const [value, unit] = stripUnit(param, true);
|
|
246
|
-
if (
|
|
231
|
+
if (isNotValue(value))
|
|
247
232
|
return null;
|
|
248
233
|
if (value === 0 || typeof value === 'string')
|
|
249
234
|
return param; // zero should be unitless
|
|
@@ -258,7 +243,7 @@ const normalizeUnit = memoize(({ param, rootSize = 16, outputUnit = 'rem' }) =>
|
|
|
258
243
|
if (unit)
|
|
259
244
|
return param;
|
|
260
245
|
return `${value}${outputUnit}`;
|
|
261
|
-
}
|
|
246
|
+
};
|
|
262
247
|
|
|
263
248
|
const getValueOf = (...values) => values.find((value) => typeof value !== 'undefined' && value !== null);
|
|
264
249
|
const value = (values, rootSize, outputUnit) => {
|
|
@@ -279,6 +264,70 @@ const value = (values, rootSize, outputUnit) => {
|
|
|
279
264
|
});
|
|
280
265
|
};
|
|
281
266
|
|
|
267
|
+
const isValidValue = (value) => !!value || value === 0;
|
|
268
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
269
|
+
const spacingShorthand = (property, rootSize) => ({ top, left, right, bottom, x, y, full }) => {
|
|
270
|
+
if (!isValidValue(top) &&
|
|
271
|
+
!isValidValue(bottom) &&
|
|
272
|
+
!isValidValue(left) &&
|
|
273
|
+
!isValidValue(right) &&
|
|
274
|
+
!isValidValue(x) &&
|
|
275
|
+
!isValidValue(y) &&
|
|
276
|
+
!isValidValue(full)) {
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
const value = (param) => normalizeUnit({ param, rootSize });
|
|
280
|
+
// top - right - bottom - left
|
|
281
|
+
const spacing = [full, full, full, full];
|
|
282
|
+
if (isValidValue(x)) {
|
|
283
|
+
spacing[1] = x;
|
|
284
|
+
spacing[3] = x;
|
|
285
|
+
}
|
|
286
|
+
if (isValidValue(y)) {
|
|
287
|
+
spacing[0] = y;
|
|
288
|
+
spacing[2] = y;
|
|
289
|
+
}
|
|
290
|
+
if (isValidValue(top)) {
|
|
291
|
+
spacing[0] = top;
|
|
292
|
+
}
|
|
293
|
+
if (isValidValue(right)) {
|
|
294
|
+
spacing[1] = right;
|
|
295
|
+
}
|
|
296
|
+
if (isValidValue(bottom)) {
|
|
297
|
+
spacing[2] = bottom;
|
|
298
|
+
}
|
|
299
|
+
if (isValidValue(left)) {
|
|
300
|
+
spacing[3] = left;
|
|
301
|
+
}
|
|
302
|
+
const [t, r, b, l] = spacing;
|
|
303
|
+
if (spacing.every((val, _, arr) => isValidValue(val) && val === arr[0])) {
|
|
304
|
+
return `${property}: ${t};`;
|
|
305
|
+
}
|
|
306
|
+
if (t === b && r === l) {
|
|
307
|
+
return `${property}: ${value(t)} ${value(r)};`;
|
|
308
|
+
}
|
|
309
|
+
if (t && r === l && b) {
|
|
310
|
+
return `${property}: ${value(t)} ${value(r)} ${value(b)};`;
|
|
311
|
+
}
|
|
312
|
+
if (spacing.every((val) => !!val)) {
|
|
313
|
+
return `${property}: ${value(t)} ${value(r)} ${value(b)} ${value(l)};`;
|
|
314
|
+
}
|
|
315
|
+
let output = '';
|
|
316
|
+
if (isValidValue(t)) {
|
|
317
|
+
output += `${property}-top: ${value([t])};`;
|
|
318
|
+
}
|
|
319
|
+
if (isValidValue(b)) {
|
|
320
|
+
output += `${property}-bottom: ${value([b])};`;
|
|
321
|
+
}
|
|
322
|
+
if (isValidValue(l)) {
|
|
323
|
+
output += `${property}-left: ${value([l])};`;
|
|
324
|
+
}
|
|
325
|
+
if (isValidValue(r)) {
|
|
326
|
+
output += `${property}-right: ${value([r])};`;
|
|
327
|
+
}
|
|
328
|
+
return output;
|
|
329
|
+
};
|
|
330
|
+
|
|
282
331
|
const styles = ({ theme: t, css, rootSize }) => {
|
|
283
332
|
const value$1 = (...values) => value(values, rootSize);
|
|
284
333
|
const pxValue = (...values) => value(values, rootSize, 'px');
|
|
@@ -318,17 +367,25 @@ const styles = ({ theme: t, css, rootSize }) => {
|
|
|
318
367
|
/* ------------------------------------------------- */
|
|
319
368
|
/* SPACING attributes */
|
|
320
369
|
/* ------------------------------------------------- */
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
370
|
+
${spacingShorthand('margin', rootSize)({
|
|
371
|
+
top: t.marginTop,
|
|
372
|
+
left: t.marginLeft,
|
|
373
|
+
bottom: t.marginBottom,
|
|
374
|
+
right: t.marginRight,
|
|
375
|
+
x: t.marginX,
|
|
376
|
+
y: t.marginY,
|
|
377
|
+
full: t.margin,
|
|
378
|
+
})};
|
|
379
|
+
|
|
380
|
+
${spacingShorthand('padding', rootSize)({
|
|
381
|
+
top: t.paddingTop,
|
|
382
|
+
left: t.paddingLeft,
|
|
383
|
+
bottom: t.paddingBottom,
|
|
384
|
+
right: t.paddingRight,
|
|
385
|
+
x: t.paddingX,
|
|
386
|
+
y: t.paddingY,
|
|
387
|
+
full: t.padding,
|
|
388
|
+
})};
|
|
332
389
|
|
|
333
390
|
/* ------------------------------------------------- */
|
|
334
391
|
/* FLEX attributes */
|
|
@@ -576,5 +633,5 @@ const extendCss = (styles) => {
|
|
|
576
633
|
return styles;
|
|
577
634
|
};
|
|
578
635
|
|
|
579
|
-
export { ALIGN_CONTENT_DIRECTION, ALIGN_CONTENT_MAP_X, ALIGN_CONTENT_MAP_Y, Provider, alignContent, breakpoints, createMediaQueries, extendCss, makeItResponsive, normalizeTheme, normalizeUnit, sortBreakpoints, stripUnit, styles, transformTheme,
|
|
636
|
+
export { ALIGN_CONTENT_DIRECTION, ALIGN_CONTENT_MAP_X, ALIGN_CONTENT_MAP_Y, Provider, alignContent, breakpoints, createMediaQueries, extendCss, makeItResponsive, normalizeTheme, normalizeUnit, sortBreakpoints, stripUnit, styles, transformTheme, value };
|
|
580
637
|
//# sourceMappingURL=vitus-labs-unistyle.browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitus-labs-unistyle.browser.js","sources":["../src/responsive/breakpoints.ts","../src/responsive/createMediaQueries.ts","../src/responsive/normalizeTheme.ts","../src/responsive/transformTheme.ts","../src/responsive/optimizeTheme.ts","../src/responsive/makeItResponsive.ts","../src/responsive/sortBreakpoints.ts","../src/context.tsx","../src/hooks/useWindowResize.ts","../src/units/stripUnit.ts","../src/units/normalizeUnit.ts","../src/units/value.ts","../src/styles/styles/index.ts","../src/styles/alignContent.ts","../src/styles/extendCss.ts"],"sourcesContent":["const breakpoints = {\n rootSize: 16,\n breakpoints: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1440,\n },\n} as const\n\nexport type Breakpoints = typeof breakpoints\n\nexport default breakpoints\n","export type CreateMediaQueries = <\n B,\n R extends number,\n C extends (...args: any) => any\n>({\n breakpoints,\n rootSize,\n css,\n}: {\n breakpoints: B\n rootSize: R\n css: C\n}) => Record<keyof B, ReturnType<C>>\n\nconst createMediaQueries: CreateMediaQueries = ({\n breakpoints,\n rootSize,\n css,\n}) =>\n Object.keys(breakpoints).reduce((acc, key) => {\n // use em in breakpoints to work properly cross-browser and support users\n // changing their browsers font-size: https://zellwk.com/blog/media-query-units/\n const breakpointValue = breakpoints[key]\n const result = { ...acc }\n /* eslint-disable-next-line no-param-reassign */\n\n if (breakpointValue === 0) {\n result[key] = (...args: any[]) => css(...args)\n } else {\n const emSize = breakpoints[key] / rootSize\n\n result[key] = (...args: any[]) =>\n css`\n @media only screen and (min-width: ${emSize}em) {\n ${css(...args)};\n }\n `\n }\n\n return result\n }, {} as Record<keyof typeof breakpoints, ReturnType<typeof css>>)\n\nexport default createMediaQueries\n","import { memoize } from '@vitus-labs/core'\n\ntype AssignToBreakbointKey = (\n breakpoints: Array<string>\n) => (\n value: (\n breakpoint: string,\n i: number,\n breakpoints: Array<string>,\n result: Record<string, unknown>\n ) => void\n) => Record<string, unknown>\n\nconst assignToBreakbointKey: AssignToBreakbointKey =\n (breakpoints) => (value) => {\n const result = {}\n\n breakpoints.forEach((item, i) => {\n result[item] = value(item, i, breakpoints, result)\n })\n\n return result\n }\n\nconst handleArrayCb = (arr) => (value, i) => {\n const currentValue = arr[i]\n const lastValue = arr[arr.length - 1]\n\n return currentValue || lastValue\n}\n\n// type HandleObjectCb = (\n// obj: Record<string, unknown>\n// ) => (\n// bp: string,\n// i: number,\n// breakpoint: Array<string>,\n// result: Record<string, unknown>\n// ) => Record<string, unknown>\n\nconst handleObjectCb = (obj) => (bp, i, bps, res) => {\n const currentValue = obj[bp]\n const previousValue = res[bps[i - 1]]\n // check for non-nullable values\n if (currentValue != null) return currentValue\n return previousValue\n}\n\nconst handleValueCb = (value) => () => value\n\nconst shouldNormalize = (props) =>\n Object.values(props).some(\n (item) => typeof item === 'object' || Array.isArray(item)\n )\n\nexport type NormalizeTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, unknown>\n breakpoints: Array<string>\n}) => Record<string, unknown>\n\nconst normalizeTheme: NormalizeTheme = memoize(\n ({ theme, breakpoints }) => {\n if (!shouldNormalize(theme)) return theme\n\n const getBpValues = assignToBreakbointKey(breakpoints)\n const result = {}\n\n Object.entries(theme).forEach(([key, value]) => {\n if (value == null) return\n\n // if it's an array\n if (Array.isArray(value)) {\n result[key] = getBpValues(handleArrayCb(value))\n }\n // if it's an object\n else if (typeof value === 'object') {\n result[key] = getBpValues(handleObjectCb(value))\n }\n // if any other value\n else {\n result[key] = getBpValues(handleValueCb(value))\n }\n })\n\n return result\n },\n { isDeepEqual: true, maxSize: 4000 }\n)\n\nexport default normalizeTheme\n","import { isEmpty, memoize, set } from '@vitus-labs/core'\n\nconst removeUnexpectedKeys = (obj, keys) => {\n const result = {}\n keys.forEach((bp) => {\n const value = obj[bp]\n\n if (value) {\n result[bp] = value\n }\n })\n\n return result\n}\n\nexport type TransformTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, unknown>\n breakpoints: Array<string>\n}) => any\n\nconst transformTheme: TransformTheme = memoize(\n ({ theme, breakpoints }) => {\n const result = {}\n\n if (isEmpty(theme) || isEmpty(breakpoints)) return result\n\n // can be one of following types\n // { fontSize: 12 }\n // { fontSize: { xs: 12, md: 15 }}\n // { fontSize: [12, 15] }\n Object.entries(theme).forEach(([key, value]) => {\n // array\n if (Array.isArray(value) && value.length > 0) {\n value.forEach((child, i) => {\n const indexBreakpoint = breakpoints[i]\n set(result, [indexBreakpoint, key], child)\n })\n }\n // object\n else if (typeof value === 'object' && value !== null) {\n Object.entries(value).forEach(([childKey, childValue]) => {\n set(result, [childKey, key], childValue)\n })\n }\n // normal value\n else if (value != null) {\n const firstBreakpoint = breakpoints[0]\n set(result, [firstBreakpoint, key], value)\n }\n })\n\n return removeUnexpectedKeys(result, breakpoints)\n },\n { isDeepEqual: true, maxSize: 4000 }\n)\n\nexport default transformTheme\n","export type OptimizeTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, Record<string, unknown>>\n breakpoints: string[]\n}) => Record<string, Record<string, unknown>>\n\nconst optimizeTheme: OptimizeTheme = ({ theme, breakpoints }) =>\n breakpoints.reduce((acc, key, i) => {\n if (i === 0) return { ...acc, [key]: theme[key] }\n\n const previousBreakpoint = breakpoints[i - 1]\n const previousValue = theme[previousBreakpoint]\n const currentValue = theme[key]\n\n if (JSON.stringify(previousValue) !== JSON.stringify(currentValue)) {\n return { ...acc, [key]: theme[key] }\n }\n\n return acc\n }, {})\n\nexport default optimizeTheme\n","import { isEmpty } from '@vitus-labs/core'\nimport type { Css } from '~/types'\nimport createMediaQueries from './createMediaQueries'\nimport sortBreakpoints from './sortBreakpoints'\nimport normalizeTheme from './normalizeTheme'\nimport transformTheme from './transformTheme'\nimport optimizeTheme from './optimizeTheme'\n\ntype CustomTheme = Record<\n string,\n Record<string, unknown> | number | string | boolean\n>\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: {\n media?: ReturnType<typeof createMediaQueries>\n sortedBreakpoints?: ReturnType<typeof sortBreakpoints>\n }\n} & CustomTheme\n\nexport type MakeItResponsiveStyles<\n T extends Partial<Record<string, any>> = any\n> = ({\n theme,\n css,\n rootSize,\n globalTheme,\n}: {\n theme: T\n css: Css\n rootSize: number\n globalTheme?: Partial<Record<string, any>>\n}) => ReturnType<typeof css> | string | any\n\nexport type MakeItResponsive = ({\n theme,\n key,\n css,\n styles,\n normalize,\n}: {\n theme?: CustomTheme\n key?: string\n css: any\n styles: MakeItResponsiveStyles\n normalize?: boolean\n}) => ({ theme }: { theme?: Theme }) => any\n\nconst makeItResponsive: MakeItResponsive =\n ({ theme: customTheme, key = '', css, styles, normalize = false }) =>\n ({ theme = {}, ...props }) => {\n const internalTheme = customTheme || props[key]\n\n // if no theme is defined, return empty objct\n if (isEmpty(internalTheme)) return ''\n\n const { rootSize, breakpoints, __VITUS_LABS__, ...restTheme } =\n theme as Theme\n\n const renderStyles = (\n theme: Record<string, unknown>\n ): ReturnType<typeof styles> =>\n styles({ theme, css, rootSize, globalTheme: restTheme })\n\n // if there are no breakpoints, return just standard css\n if (isEmpty(breakpoints) || isEmpty(__VITUS_LABS__)) {\n return css`\n ${renderStyles(internalTheme)}\n `\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { media, sortedBreakpoints } = __VITUS_LABS__!\n\n let helperTheme = internalTheme\n\n if (normalize) {\n helperTheme = normalizeTheme({\n theme: internalTheme,\n breakpoints: sortedBreakpoints,\n })\n }\n\n const transformedTheme = transformTheme({\n theme: helperTheme,\n breakpoints: sortedBreakpoints,\n })\n\n const optimizedTheme = optimizeTheme({\n theme: transformedTheme,\n breakpoints: sortedBreakpoints,\n })\n\n return sortedBreakpoints.map((item) => {\n const breakpointTheme = optimizedTheme[item]\n\n if (!breakpointTheme || !media) return ''\n\n const result = renderStyles(breakpointTheme)\n\n return media[item]`\n ${result};\n `\n })\n }\n\nexport default makeItResponsive\n","export type SortBreakpoints = <T extends Record<string, number>>(\n breakpoints: T\n) => Array<keyof T>\n\nconst sortBreakpoints: SortBreakpoints = (breakpoints) => {\n const result = Object.keys(breakpoints).sort(\n (a, b) => breakpoints[a] - breakpoints[b]\n )\n\n return result\n}\n\nexport default sortBreakpoints\n","import React, { useMemo, ReactNode, FC } from 'react'\nimport {\n config,\n isEmpty,\n Provider as CoreProvider,\n context,\n} from '@vitus-labs/core'\nimport { sortBreakpoints, createMediaQueries } from '~/responsive'\n\ntype VitusLabsContext = {\n sortedBreakpoints?: ReturnType<typeof sortBreakpoints>\n media?: ReturnType<typeof createMediaQueries>\n}\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Partial<Record<string, unknown>>\n\nexport type TProvider = {\n theme: Theme\n children: ReactNode\n} & Partial<Record<string, unknown>>\n\nconst Provider: FC<TProvider> = ({ theme, children, ...props }) => {\n // eslint-disable-next-line no-underscore-dangle\n const __VITUS_LABS__: VitusLabsContext = {}\n\n const { breakpoints, rootSize } = theme\n\n if (!isEmpty(breakpoints)) {\n __VITUS_LABS__.sortedBreakpoints = useMemo(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n () => sortBreakpoints(breakpoints!),\n [breakpoints]\n )\n __VITUS_LABS__.media = useMemo(\n () =>\n createMediaQueries({\n breakpoints,\n css: config.css,\n rootSize,\n }),\n [breakpoints, rootSize]\n )\n }\n\n const result = {\n ...theme,\n __VITUS_LABS__,\n }\n\n return (\n <CoreProvider theme={result} {...props}>\n {children}\n </CoreProvider>\n )\n}\n\nexport { context }\n\n// eslint-disable-next-line import/prefer-default-export\nexport default Provider\n","import { useState, useEffect } from 'react'\nimport { throttle } from '@vitus-labs/core'\n\nexport type UseWindowResize = (\n throttleDelay?: number,\n defaultValues?: Partial<{\n width: number\n height: number\n }>\n) => {\n width: number\n height: number\n}\n\nconst useWindowResize: UseWindowResize = (\n throttleDelay = 200,\n { width = 0, height = 0 } = {}\n) => {\n const getSize = () => ({\n width: __CLIENT__ ? window.innerWidth : width,\n height: __CLIENT__ ? window.innerHeight : height,\n })\n\n const [windowSize, setWindowSize] = useState(getSize)\n\n useEffect(() => {\n if (__SERVER__) return undefined\n\n const handleResize = throttle(() => {\n setWindowSize(getSize())\n }, throttleDelay)\n\n window.addEventListener('resize', handleResize, false)\n\n return () => window.removeEventListener('resize', handleResize, false)\n }, []) // Empty array ensures that effect is only run on mount and unmount\n\n return windowSize\n}\n\nexport default useWindowResize\n","import { ReactText } from 'react'\n\ntype Value<V> = V extends string ? number : V\ntype Unit<V> = V extends string ? string : undefined\n\nexport type StripUnit = <V extends ReactText, UR extends boolean = false>(\n value: V,\n unitReturn?: UR\n) => UR extends true ? [Value<V>, Unit<V>] : Value<V>\n\nconst stripUnit: StripUnit = (value, unitReturn) => {\n const cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/\n\n if (typeof value !== 'string') return unitReturn ? [value, undefined] : value\n\n const matchedValue = value.match(cssRegex)\n\n if (unitReturn) {\n if (matchedValue) return [parseFloat(value), matchedValue[2]]\n return [value, undefined]\n }\n\n if (matchedValue) return parseFloat(value)\n return value as any\n}\n\nexport default stripUnit\n","import { memoize } from '@vitus-labs/core'\nimport stripUnit from './stripUnit'\n\nexport type NormalizeUnit = ({\n param,\n rootSize,\n outputUnit,\n}: {\n param: any\n rootSize?: number\n outputUnit?: 'px' | 'rem' | '%' | string\n}) => string | number\n\nconst normalizeUnit: NormalizeUnit = memoize(\n ({ param, rootSize = 16, outputUnit = __WEB__ ? 'rem' : 'px' }) => {\n if (!param && param !== 0) return null\n\n const [value, unit] = stripUnit(param, true)\n if (!value && value !== 0) return null\n if (value === 0 || typeof value === 'string') return param // zero should be unitless\n\n if (rootSize && !Number.isNaN(value)) {\n if (!unit && outputUnit === 'px') return `${value}${outputUnit}`\n if (!unit) return `${value / rootSize}rem`\n if (unit === 'px' && outputUnit === 'rem') return `${value / rootSize}rem`\n }\n\n if (unit) return param\n\n return `${value}${outputUnit}`\n },\n { isDeepEqual: true, maxSize: 1000 }\n)\n\nexport default normalizeUnit\n","import normalizeUnit from './normalizeUnit'\n\ntype GetValueOf = (...values: Array<unknown>) => number | string | unknown\nconst getValueOf: GetValueOf = (...values) =>\n values.find((value) => typeof value !== 'undefined' && value !== null)\n\nexport type Value = (\n values: Array<unknown>,\n rootSize?: number,\n outputUnit?: 'px' | 'rem' | '%' | string\n) => string | number\nconst value: Value = (values, rootSize, outputUnit) => {\n const param = getValueOf(...values)\n\n if (Array.isArray(param)) {\n return param\n .reduce(\n (acc, item) =>\n acc.push(\n normalizeUnit({\n param: item,\n rootSize,\n outputUnit,\n })\n ),\n []\n )\n .join(' ')\n }\n\n return normalizeUnit({\n param,\n rootSize,\n outputUnit,\n })\n}\n\nexport default value\n","import { value as unitValue } from '~/units'\nimport type { Css } from '~/types'\nimport type { Theme } from './types'\n\nexport type { Theme as StylesTheme }\n\nexport type Styles = ({\n theme,\n css,\n rootSize,\n}: {\n theme: Theme\n css: Css\n rootSize?: number\n}) => ReturnType<typeof css>\n\nconst styles: Styles = ({ theme: t, css, rootSize }) => {\n const value = (...values) => unitValue(values, rootSize)\n const pxValue = (...values) => unitValue(values, rootSize, 'px')\n\n return css`\n ${t.fullScreen &&\n css`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n `};\n\n /* ------------------------------------------------- */\n /* POSITION attributes */\n /* ------------------------------------------------- */\n all: ${t.all};\n display: ${t.display};\n position: ${t.position};\n box-sizing: ${t.boxSizing};\n float: ${t.float};\n\n inset: ${t.inset};\n top: ${value(t.top, t.positionY)};\n bottom: ${value(t.bottom, t.positionY)};\n left: ${value(t.left, t.positionX)};\n right: ${value(t.right, t.positionX)};\n\n width: ${value(t.width, t.size)};\n min-width: ${value(t.minWidth, t.minSize)};\n max-width: ${value(t.maxWidth, t.maxSize)};\n\n height: ${value(t.height, t.size)};\n min-height: ${value(t.minHeight, t.minSize)};\n max-height: ${value(t.maxHeight, t.maxSize)};\n\n /* ------------------------------------------------- */\n /* SPACING attributes */\n /* ------------------------------------------------- */\n margin: ${value(t.margin)};\n margin-top: ${value(t.marginTop, t.marginY)};\n margin-bottom: ${value(t.marginBottom, t.marginY)};\n margin-left: ${value(t.marginLeft, t.marginX)};\n margin-right: ${value(t.marginRight, t.marginX)};\n\n padding: ${value(t.padding)};\n padding-top: ${value(t.paddingTop, t.paddingY)};\n padding-bottom: ${value(t.paddingBottom, t.paddingY)};\n padding-left: ${value(t.paddingLeft, t.paddingX)};\n padding-right: ${value(t.paddingRight, t.paddingX)};\n\n /* ------------------------------------------------- */\n /* FLEX attributes */\n /* ------------------------------------------------- */\n align-content: ${t.alignContent};\n align-items: ${t.alignItems};\n align-self: ${t.alignSelf};\n flex: ${t.flex};\n flex-basis: ${t.flexBasis};\n flex-direction: ${t.flexDirection};\n flex-flow: ${t.flexFlow};\n flex-grow: ${t.flexGrow};\n flex-shrink: ${t.flexShrink};\n flex-wrap: ${t.flexWrap};\n justify-content: ${t.justifyContent};\n\n /* ------------------------------------------------- */\n /* POSITIONING attributes */\n /* ------------------------------------------------- */\n object-fit: ${t.objectFit};\n object-position: ${t.objectPosition};\n order: ${t.order};\n opacity: ${t.opacity};\n resize: ${t.resize};\n vertical-align: ${t.verticalAlign};\n\n /* ------------------------------------------------- */\n /* FONT attributes */\n /* ------------------------------------------------- */\n line-height: ${t.lineHeight};\n font: ${t.font};\n font-family: ${t.fontFamily};\n font-size: ${value(t.fontSize)};\n font-size-adjust: ${value(t.fontSizeAdjust)};\n font-stretch: ${value(t.fontStretch)};\n font-style: ${t.fontStyle};\n font-variant: ${t.fontVariant};\n font-weight: ${t.fontWeight};\n text-align: ${t.textAlign};\n text-align-last: ${t.textAlignLast};\n text-transform: ${t.textTransform};\n text-decoration: ${t.textDecoration};\n text-decoration-color: ${t.textDecorationColor};\n text-decoration-line: ${t.textDecorationLine};\n text-decoration-style: ${t.textDecorationStyle};\n letter-spacing: ${t.letterSpacing};\n text-indent: ${t.textIndent};\n text-justify: ${t.textJustify};\n text-overflow: ${t.textOverflow};\n text-shadow: ${t.textShadow};\n text-transform: ${t.textTransform};\n white-space: ${t.whiteSpace};\n word-break: ${t.wordBreak};\n word-wrap: ${t.wordWrap};\n writing-mode: ${t.writingMode};\n direction: ${t.direction};\n\n /* ------------------------------------------------- */\n /* LIST attributes */\n /* ------------------------------------------------- */\n list-style: ${t.listStyle};\n list-style-image: ${t.listStyleImage};\n list-style-position: ${t.listStylePosition};\n list-style-type: ${t.listStyleType};\n\n /* ------------------------------------------------- */\n /* BACKGROUND & COLORS attributes */\n /* ------------------------------------------------- */\n color: ${t.color};\n background: ${t.background};\n background-color: ${t.backgroundColor};\n ${t.backgroundImage &&\n css`\n background-image: url(${t.backgroundImage});\n `};\n background-attachment: ${t.backgroundAttachment};\n background-clip: ${t.backgroundClip};\n background-origin: ${t.backgroundOrigin};\n background-position: ${t.backgroundPosition};\n background-repeat: ${t.backgroundRepeat};\n background-size: ${t.backgroundSize};\n\n /* ------------------------------------------------- */\n /* BORDERS attributes */\n /* ------------------------------------------------- */\n border-radius: ${value(t.borderRadius)};\n border-top-left-radius: ${value(\n t.borderRadiusTopLeft,\n t.borderRadiusLeft,\n t.borderRadiusTop\n )};\n border-top-right-radius: ${value(\n t.borderRadiusTopRight,\n t.borderRadiusRight,\n t.borderRadiusTop\n )};\n border-bottom-left-radius: ${value(\n t.borderRadiusBottomLeft,\n t.borderRadiusLeft,\n t.borderRadiusBottom\n )};\n border-bottom-right-radius: ${value(\n t.borderRadiusBottomRight,\n t.borderRadiusRight,\n t.borderRadiusBottom\n )};\n\n border: ${t.border};\n border-top: ${t.borderTop};\n border-bottom: ${t.borderBottom};\n border-left: ${t.borderLeft};\n border-right: ${t.borderRight};\n\n border-width: ${pxValue(t.borderWidth)};\n border-style: ${t.borderStyle};\n border-color: ${t.borderColor};\n\n border-top-width: ${pxValue(t.borderWidthTop, t.borderWidthY)};\n border-top-style: ${t.borderStyleTop || t.borderStyleY};\n border-top-color: ${t.borderColorTop || t.borderColorY};\n\n border-bottom-width: ${pxValue(t.borderWidthBottom, t.borderWidthY)};\n border-bottom-style: ${t.borderStyleBottom || t.borderStyleY};\n border-bottom-color: ${t.borderColorBottom || t.borderColorY};\n\n border-left-width: ${pxValue(t.borderWidthLeft, t.borderWidthX)};\n border-left-style: ${t.borderStyleLeft || t.borderStyleX};\n border-left-color: ${t.borderColorLeft || t.borderColorX};\n\n border-right-width: ${pxValue(t.borderWidthRight, t.borderWidthX)};\n border-right-style: ${t.borderStyleRight || t.borderStyleX};\n border-right-color: ${t.borderColorRight || t.borderColorX};\n\n border-image: ${t.borderImage};\n border-image-outset: ${t.borderImageOutset};\n border-image-repeat: ${t.borderImageRepeat};\n border-image-slice: ${t.borderImageSlice};\n border-image-source: ${t.borderImageSource};\n border-image-width: ${t.borderImageWidth};\n border-spacing: ${t.borderSpacing};\n\n /* ------------------------------------------------- */\n /* VISUAL EFFECTS attributes */\n /* ------------------------------------------------- */\n backface-visibility: ${t.backfaceVisibility};\n box-shadow: ${t.boxShadow};\n filter: ${t.filter};\n outline: ${t.outline};\n outline-color: ${t.outlineColor};\n outline-offset: ${t.outlineOffset};\n outline-style: ${t.outlineStyle};\n outline-width: ${t.outlineWidth};\n\n /* ------------------------------------------------- */\n /* ANIMATIONS attributes */\n /* ------------------------------------------------- */\n animation: ${t.keyframe} ${t.animation};\n transition: ${t.transition};\n transition-delay: ${t.transitionDelay};\n transition-duration: ${t.transitionDuration};\n transition-property: ${t.transitionProperty};\n transition-timing-function: ${t.transitionTimingFunction};\n\n /* ------------------------------------------------- */\n /* OTHER attributes */\n /* ------------------------------------------------- */\n caption-side: ${t.captionSide};\n clear: ${t.clear};\n clip: ${t.clip};\n clip-path: ${t.clipPath};\n content: ${t.content};\n counter-increment: ${t.counterIncrement};\n counter-reset: ${t.counterReset};\n cursor: ${t.cursor};\n empty-cells: ${t.emptyCells};\n z-index: ${t.zIndex};\n transform: ${t.transform};\n transform-origin: ${t.transformOrigin};\n transform-style: ${t.transformStyle};\n overflow: ${t.overflow};\n overflow-wrap: ${t.overflowWrap};\n overflow-x: ${t.overflowX};\n overflow-y: ${t.overflowY};\n perspective: ${t.perspective};\n perspective-origin: ${t.perspectiveOrigin};\n pointer-events: ${t.pointerEvents};\n quotes: ${t.quotes};\n tab-size: ${t.tabSize};\n table-layout: ${t.tableLayout};\n user-select: ${t.userSelect};\n visibility: ${t.visibility};\n\n /* ------------------------------------------------- */\n /* CUSTOM attributes */\n /* ------------------------------------------------- */\n ${__WEB__ &&\n t.hideEmpty &&\n css`\n &:empty {\n display: none;\n }\n `};\n\n ${__WEB__ &&\n t.clearFix &&\n css`\n &::after: {\n clear: both;\n content: '';\n display: table;\n }\n `};\n\n ${t.extendCss};\n `\n}\n\nexport default styles\n","import { config, isEmpty } from '@vitus-labs/core'\n\nexport type AlignContentDirectionKeys = keyof typeof ALIGN_CONTENT_DIRECTION\nexport type AlignContentAlignXKeys = keyof typeof ALIGN_CONTENT_MAP_X\nexport type AlignContentAlignYKeys = keyof typeof ALIGN_CONTENT_MAP_Y\n\nconst ALIGN_CONTENT_MAP_SHARED = {\n center: 'center',\n spaceBetween: 'space-between',\n spaceAround: 'space-around',\n block: 'stretch',\n}\n\nexport const ALIGN_CONTENT_MAP_X = {\n left: 'flex-start',\n right: 'flex-end',\n ...ALIGN_CONTENT_MAP_SHARED,\n} as const\n\nexport const ALIGN_CONTENT_MAP_Y = {\n top: 'flex-start',\n bottom: 'flex-end',\n ...ALIGN_CONTENT_MAP_SHARED,\n} as const\n\nexport const ALIGN_CONTENT_DIRECTION = __WEB__\n ? {\n inline: 'row',\n reverseInline: 'reverse-row',\n rows: 'column',\n reverseRows: 'reverse-column',\n }\n : {\n inline: 'row',\n reverseInline: 'row-reverse',\n rows: 'column',\n reverseRows: 'column-reverse',\n }\n\nexport type AlignContent = ({\n direction,\n alignX,\n alignY,\n}: {\n direction: AlignContentDirectionKeys\n alignX: AlignContentAlignXKeys\n alignY: AlignContentAlignYKeys\n}) => ReturnType<typeof config.css> | null\n\nconst alignContent: AlignContent = (attrs) => {\n const { direction, alignX, alignY } = attrs\n\n if (isEmpty(attrs) || !direction || !alignX || !alignY) {\n return null\n }\n\n const isReverted = ['inline', 'reverseInline'].includes(direction)\n const dir = ALIGN_CONTENT_DIRECTION[direction]\n const x = ALIGN_CONTENT_MAP_X[alignX]\n const y = ALIGN_CONTENT_MAP_Y[alignY]\n\n return config.css`\n flex-direction: ${dir};\n align-items: ${isReverted ? y : x};\n justify-content: ${isReverted ? x : y};\n `\n}\n\nexport default alignContent\n","import { config } from '@vitus-labs/core'\n\nexport type ExtendCss = (\n styles:\n | string\n | ((css: typeof config.css) => ReturnType<typeof css>)\n | null\n | undefined\n) => string | ReturnType<typeof config.css>\n\nconst extendCss: ExtendCss = (styles) => {\n if (!styles) return ''\n if (typeof styles === 'function') {\n return styles(config.css)\n }\n\n return styles\n}\n\nexport default extendCss\n"],"names":["CoreProvider","value","unitValue"],"mappings":";;;;MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,EAAE;IACZ,WAAW,EAAE;QACX,EAAE,EAAE,CAAC;QACL,EAAE,E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,CAAC,CAAA;IACrC,MAAM,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAErC,OAAO,MAAM,CAAC,GAAG,CAAA;sBACG,GAAG;mBACN,UAAU,GAAG,CAAC,GAAG,CAAC;uBACd,UAAU,GAAG,CAAC,GAAG,CAAC;GACtC,CAAA;AACH;;MCxDM,SAAS,GAAc,CAAC,MAAM;IAClC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAA;IACtB,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;KAC1B;IAED,OAAO,MAAM,CAAA;AACf;;;;"}
|
|
1
|
+
{"version":3,"file":"vitus-labs-unistyle.browser.js","sources":["../src/responsive/breakpoints.ts","../src/responsive/createMediaQueries.ts","../src/responsive/normalizeTheme.ts","../src/responsive/transformTheme.ts","../src/responsive/optimizeTheme.ts","../src/responsive/makeItResponsive.ts","../src/responsive/sortBreakpoints.ts","../src/context.tsx","../src/units/stripUnit.ts","../src/units/normalizeUnit.ts","../src/units/value.ts","../src/styles/shorthands/spacingShorthand.ts","../src/styles/styles/index.ts","../src/styles/alignContent.ts","../src/styles/extendCss.ts"],"sourcesContent":["const breakpoints = {\n rootSize: 16,\n breakpoints: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1440,\n },\n} as const\n\nexport type Breakpoints = typeof breakpoints\n\nexport default breakpoints\n","export type CreateMediaQueries = <\n B,\n R extends number,\n C extends (...args: any) => any\n>({\n breakpoints,\n rootSize,\n css,\n}: {\n breakpoints: B\n rootSize: R\n css: C\n}) => Record<keyof B, ReturnType<C>>\n\nconst createMediaQueries: CreateMediaQueries = ({\n breakpoints,\n rootSize,\n css,\n}) =>\n Object.keys(breakpoints).reduce((acc, key) => {\n // use em in breakpoints to work properly cross-browser and support users\n // changing their browsers font-size: https://zellwk.com/blog/media-query-units/\n const breakpointValue = breakpoints[key]\n const result = { ...acc }\n /* eslint-disable-next-line no-param-reassign */\n\n if (breakpointValue === 0) {\n result[key] = (...args: any[]) => css(...args)\n } else {\n const emSize = breakpoints[key] / rootSize\n\n result[key] = (...args: any[]) =>\n css`\n @media only screen and (min-width: ${emSize}em) {\n ${css(...args)};\n }\n `\n }\n\n return result\n }, {} as Record<keyof typeof breakpoints, ReturnType<typeof css>>)\n\nexport default createMediaQueries\n","type AssignToBreakbointKey = (\n breakpoints: Array<string>\n) => (\n value: (\n breakpoint: string,\n i: number,\n breakpoints: Array<string>,\n result: Record<string, unknown>\n ) => void\n) => Record<string, unknown>\n\nconst assignToBreakbointKey: AssignToBreakbointKey =\n (breakpoints) => (value) => {\n const result = {}\n\n breakpoints.forEach((item, i) => {\n result[item] = value(item, i, breakpoints, result)\n })\n\n return result\n }\n\nconst handleArrayCb = (arr) => (value, i) => {\n const currentValue = arr[i]\n const lastValue = arr[arr.length - 1]\n\n return currentValue || lastValue\n}\n\n// type HandleObjectCb = (\n// obj: Record<string, unknown>\n// ) => (\n// bp: string,\n// i: number,\n// breakpoint: Array<string>,\n// result: Record<string, unknown>\n// ) => Record<string, unknown>\n\nconst handleObjectCb = (obj) => (bp, i, bps, res) => {\n const currentValue = obj[bp]\n const previousValue = res[bps[i - 1]]\n // check for non-nullable values\n if (currentValue != null) return currentValue\n return previousValue\n}\n\nconst handleValueCb = (value) => () => value\n\nconst shouldNormalize = (props) =>\n Object.values(props).some(\n (item) => typeof item === 'object' || Array.isArray(item)\n )\n\nexport type NormalizeTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, unknown>\n breakpoints: Array<string>\n}) => Record<string, unknown>\n\nconst normalizeTheme: NormalizeTheme = ({ theme, breakpoints }) => {\n if (!shouldNormalize(theme)) return theme\n\n const getBpValues = assignToBreakbointKey(breakpoints)\n const result = {}\n\n Object.entries(theme).forEach(([key, value]) => {\n if (value == null) return\n\n // if it's an array\n if (Array.isArray(value)) {\n result[key] = getBpValues(handleArrayCb(value))\n }\n // if it's an object\n else if (typeof value === 'object') {\n result[key] = getBpValues(handleObjectCb(value))\n }\n // if any other value\n else {\n result[key] = getBpValues(handleValueCb(value))\n }\n })\n\n return result\n}\n\nexport default normalizeTheme\n","import { isEmpty, memoize, set } from '@vitus-labs/core'\n\nconst removeUnexpectedKeys = (obj, keys) => {\n const result = {}\n keys.forEach((bp) => {\n const value = obj[bp]\n\n if (value) {\n result[bp] = value\n }\n })\n\n return result\n}\n\nexport type TransformTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, unknown>\n breakpoints: Array<string>\n}) => any\n\nconst transformTheme: TransformTheme = memoize(\n ({ theme, breakpoints }) => {\n const result = {}\n\n if (isEmpty(theme) || isEmpty(breakpoints)) return result\n\n // can be one of following types\n // { fontSize: 12 }\n // { fontSize: { xs: 12, md: 15 }}\n // { fontSize: [12, 15] }\n Object.entries(theme).forEach(([key, value]) => {\n // array\n if (Array.isArray(value) && value.length > 0) {\n value.forEach((child, i) => {\n const indexBreakpoint = breakpoints[i]\n set(result, [indexBreakpoint, key], child)\n })\n }\n // object\n else if (typeof value === 'object' && value !== null) {\n Object.entries(value).forEach(([childKey, childValue]) => {\n set(result, [childKey, key], childValue)\n })\n }\n // normal value\n else if (value != null) {\n const firstBreakpoint = breakpoints[0]\n set(result, [firstBreakpoint, key], value)\n }\n })\n\n return removeUnexpectedKeys(result, breakpoints)\n },\n { isDeepEqual: true, maxSize: 4000 }\n)\n\nexport default transformTheme\n","export type OptimizeTheme = ({\n theme,\n breakpoints,\n}: {\n theme: Record<string, Record<string, unknown>>\n breakpoints: string[]\n}) => Record<string, Record<string, unknown>>\n\nconst optimizeTheme: OptimizeTheme = ({ theme, breakpoints }) =>\n breakpoints.reduce((acc, key, i) => {\n if (i === 0) return { ...acc, [key]: theme[key] }\n\n const previousBreakpoint = breakpoints[i - 1]\n const previousValue = theme[previousBreakpoint]\n const currentValue = theme[key]\n\n if (JSON.stringify(previousValue) !== JSON.stringify(currentValue)) {\n return { ...acc, [key]: theme[key] }\n }\n\n return acc\n }, {})\n\nexport default optimizeTheme\n","import { isEmpty } from '@vitus-labs/core'\nimport type { Css } from '~/types'\nimport createMediaQueries from './createMediaQueries'\nimport sortBreakpoints from './sortBreakpoints'\nimport normalizeTheme from './normalizeTheme'\nimport transformTheme from './transformTheme'\nimport optimizeTheme from './optimizeTheme'\n\ntype CustomTheme = Record<\n string,\n Record<string, unknown> | number | string | boolean\n>\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: {\n media?: ReturnType<typeof createMediaQueries>\n sortedBreakpoints?: ReturnType<typeof sortBreakpoints>\n }\n} & CustomTheme\n\nexport type MakeItResponsiveStyles<\n T extends Partial<Record<string, any>> = any\n> = ({\n theme,\n css,\n rootSize,\n globalTheme,\n}: {\n theme: T\n css: Css\n rootSize: number\n globalTheme?: Partial<Record<string, any>>\n}) => ReturnType<typeof css> | string | any\n\nexport type MakeItResponsive = ({\n theme,\n key,\n css,\n styles,\n normalize,\n}: {\n theme?: CustomTheme\n key?: string\n css: any\n styles: MakeItResponsiveStyles\n normalize?: boolean\n}) => ({ theme }: { theme?: Theme }) => any\n\nconst makeItResponsive: MakeItResponsive =\n ({ theme: customTheme, key = '', css, styles, normalize = false }) =>\n ({ theme = {}, ...props }) => {\n const internalTheme = customTheme || props[key]\n\n // if no theme is defined, return empty objct\n if (isEmpty(internalTheme)) return ''\n\n const { rootSize, breakpoints, __VITUS_LABS__, ...restTheme } =\n theme as Theme\n\n const renderStyles = (\n theme: Record<string, unknown>\n ): ReturnType<typeof styles> =>\n styles({ theme, css, rootSize, globalTheme: restTheme })\n\n // if there are no breakpoints, return just standard css\n if (isEmpty(breakpoints) || isEmpty(__VITUS_LABS__)) {\n return css`\n ${renderStyles(internalTheme)}\n `\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { media, sortedBreakpoints } = __VITUS_LABS__!\n\n let helperTheme = internalTheme\n\n if (normalize) {\n helperTheme = normalizeTheme({\n theme: internalTheme,\n breakpoints: sortedBreakpoints,\n })\n }\n\n const transformedTheme = transformTheme({\n theme: helperTheme,\n breakpoints: sortedBreakpoints,\n })\n\n const optimizedTheme = optimizeTheme({\n theme: transformedTheme,\n breakpoints: sortedBreakpoints,\n })\n\n return sortedBreakpoints.map((item) => {\n const breakpointTheme = optimizedTheme[item]\n\n if (!breakpointTheme || !media) return ''\n\n const result = renderStyles(breakpointTheme)\n\n return media[item]`\n ${result};\n `\n })\n }\n\nexport default makeItResponsive\n","export type SortBreakpoints = <T extends Record<string, number>>(\n breakpoints: T\n) => Array<keyof T>\n\nconst sortBreakpoints: SortBreakpoints = (breakpoints) => {\n const result = Object.keys(breakpoints).sort(\n (a, b) => breakpoints[a] - breakpoints[b]\n )\n\n return result\n}\n\nexport default sortBreakpoints\n","import React, { useMemo, ReactNode, FC } from 'react'\nimport {\n config,\n isEmpty,\n Provider as CoreProvider,\n context,\n} from '@vitus-labs/core'\nimport { sortBreakpoints, createMediaQueries } from '~/responsive'\n\ntype VitusLabsContext = {\n sortedBreakpoints?: ReturnType<typeof sortBreakpoints>\n media?: ReturnType<typeof createMediaQueries>\n}\n\ntype Theme = {\n rootSize: number\n breakpoints?: Record<string, number>\n __VITUS_LABS__?: never\n} & Partial<Record<string, unknown>>\n\nexport type TProvider = {\n theme: Theme\n children: ReactNode\n} & Partial<Record<string, unknown>>\n\nconst Provider: FC<TProvider> = ({ theme, children, ...props }) => {\n // eslint-disable-next-line no-underscore-dangle\n const __VITUS_LABS__: VitusLabsContext = {}\n\n const { breakpoints, rootSize } = theme\n\n if (!isEmpty(breakpoints)) {\n __VITUS_LABS__.sortedBreakpoints = useMemo(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n () => sortBreakpoints(breakpoints!),\n [breakpoints]\n )\n __VITUS_LABS__.media = useMemo(\n () =>\n createMediaQueries({\n breakpoints,\n css: config.css,\n rootSize,\n }),\n [breakpoints, rootSize]\n )\n }\n\n const result = {\n ...theme,\n __VITUS_LABS__,\n }\n\n return (\n <CoreProvider theme={result} {...props}>\n {children}\n </CoreProvider>\n )\n}\n\nexport { context }\n\n// eslint-disable-next-line import/prefer-default-export\nexport default Provider\n","import { ReactText } from 'react'\n\ntype Value<V> = V extends string ? number : V\ntype Unit<V> = V extends string ? string : undefined\n\nexport type StripUnit = <V extends ReactText, UR extends boolean = false>(\n value: V,\n unitReturn?: UR\n) => UR extends true ? [Value<V>, Unit<V>] : Value<V>\n\nconst stripUnit: StripUnit = (value, unitReturn) => {\n const cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/\n\n if (typeof value !== 'string') return unitReturn ? [value, undefined] : value\n\n const matchedValue = value.match(cssRegex)\n\n if (unitReturn) {\n if (matchedValue) return [parseFloat(value), matchedValue[2]]\n return [value, undefined]\n }\n\n if (matchedValue) return parseFloat(value)\n return value as any\n}\n\nexport default stripUnit\n","import stripUnit from './stripUnit'\n\nconst isNotValue = (value) => !value && value !== 0\n\nexport type NormalizeUnit = ({\n param,\n rootSize,\n outputUnit,\n}: {\n param: any\n rootSize?: number\n outputUnit?: 'px' | 'rem' | '%' | string\n}) => string | number\n\nconst normalizeUnit: NormalizeUnit = ({\n param,\n rootSize = 16,\n outputUnit = __WEB__ ? 'rem' : 'px',\n}) => {\n if (isNotValue(param)) return null\n\n const [value, unit] = stripUnit(param, true)\n if (isNotValue(value)) return null\n if (value === 0 || typeof value === 'string') return param // zero should be unitless\n\n if (rootSize && !Number.isNaN(value)) {\n if (!unit && outputUnit === 'px') return `${value}${outputUnit}`\n if (!unit) return `${value / rootSize}rem`\n if (unit === 'px' && outputUnit === 'rem') return `${value / rootSize}rem`\n }\n\n if (unit) return param\n\n return `${value}${outputUnit}`\n}\n\nexport default normalizeUnit\n","import type { Units } from '~/types'\nimport normalizeUnit from './normalizeUnit'\n\ntype GetValueOf = (...values: Array<unknown>) => number | string | unknown\nconst getValueOf: GetValueOf = (...values) =>\n values.find((value) => typeof value !== 'undefined' && value !== null)\n\nexport type Value = (\n values: Array<unknown>,\n rootSize?: number,\n outputUnit?: Units\n) => string | number\nconst value: Value = (values, rootSize, outputUnit) => {\n const param = getValueOf(...values)\n\n if (Array.isArray(param)) {\n return param\n .reduce(\n (acc, item) =>\n acc.push(\n normalizeUnit({\n param: item,\n rootSize,\n outputUnit,\n })\n ),\n []\n )\n .join(' ')\n }\n\n return normalizeUnit({\n param,\n rootSize,\n outputUnit,\n })\n}\n\nexport default value\n","import { normalizeUnit } from '~/units'\nimport { Value } from '~/types'\n\nconst isValidValue = (value) => !!value || value === 0\n\nexport type SpacingShorthand = (\n property: 'padding' | 'margin',\n rootSize?: number\n) => (props: {\n top: Value | null | undefined\n left: Value | null | undefined\n right: Value | null | undefined\n bottom: Value | null | undefined\n x: Value | null | undefined\n y: Value | null | undefined\n full: Value | null | undefined\n}) => string | null\n\n// eslint-disable-next-line import/prefer-default-export\nconst spacingShorthand: SpacingShorthand =\n (property, rootSize) =>\n ({ top, left, right, bottom, x, y, full }) => {\n if (\n !isValidValue(top) &&\n !isValidValue(bottom) &&\n !isValidValue(left) &&\n !isValidValue(right) &&\n !isValidValue(x) &&\n !isValidValue(y) &&\n !isValidValue(full)\n ) {\n return null\n }\n\n const value = (param) => normalizeUnit({ param, rootSize })\n\n // top - right - bottom - left\n const spacing = [full, full, full, full]\n\n if (isValidValue(x)) {\n spacing[1] = x\n spacing[3] = x\n }\n\n if (isValidValue(y)) {\n spacing[0] = y\n spacing[2] = y\n }\n\n if (isValidValue(top)) {\n spacing[0] = top\n }\n\n if (isValidValue(right)) {\n spacing[1] = right\n }\n\n if (isValidValue(bottom)) {\n spacing[2] = bottom\n }\n\n if (isValidValue(left)) {\n spacing[3] = left\n }\n\n const [t, r, b, l] = spacing\n\n if (spacing.every((val, _, arr) => isValidValue(val) && val === arr[0])) {\n return `${property}: ${t};`\n }\n\n if (t === b && r === l) {\n return `${property}: ${value(t)} ${value(r)};`\n }\n\n if (t && r === l && b) {\n return `${property}: ${value(t)} ${value(r)} ${value(b)};`\n }\n\n if (spacing.every((val) => !!val)) {\n return `${property}: ${value(t)} ${value(r)} ${value(b)} ${value(l)};`\n }\n\n let output = ''\n\n if (isValidValue(t)) {\n output += `${property}-top: ${value([t])};`\n }\n\n if (isValidValue(b)) {\n output += `${property}-bottom: ${value([b])};`\n }\n\n if (isValidValue(l)) {\n output += `${property}-left: ${value([l])};`\n }\n\n if (isValidValue(r)) {\n output += `${property}-right: ${value([r])};`\n }\n\n return output\n }\n\nexport default spacingShorthand\n","import { value as unitValue } from '~/units'\nimport type { Css } from '~/types'\nimport type { Theme } from './types'\nimport { spacingShorthand } from '~/styles/shorthands'\n\nexport type { Theme as StylesTheme }\n\nexport type Styles = ({\n theme,\n css,\n rootSize,\n}: {\n theme: Theme\n css: Css\n rootSize?: number\n}) => ReturnType<typeof css>\n\nconst styles: Styles = ({ theme: t, css, rootSize }) => {\n const value = (...values) => unitValue(values, rootSize)\n const pxValue = (...values) => unitValue(values, rootSize, 'px')\n\n return css`\n ${t.fullScreen &&\n css`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n `};\n\n /* ------------------------------------------------- */\n /* POSITION attributes */\n /* ------------------------------------------------- */\n all: ${t.all};\n display: ${t.display};\n position: ${t.position};\n box-sizing: ${t.boxSizing};\n float: ${t.float};\n\n inset: ${t.inset};\n top: ${value(t.top, t.positionY)};\n bottom: ${value(t.bottom, t.positionY)};\n left: ${value(t.left, t.positionX)};\n right: ${value(t.right, t.positionX)};\n\n width: ${value(t.width, t.size)};\n min-width: ${value(t.minWidth, t.minSize)};\n max-width: ${value(t.maxWidth, t.maxSize)};\n\n height: ${value(t.height, t.size)};\n min-height: ${value(t.minHeight, t.minSize)};\n max-height: ${value(t.maxHeight, t.maxSize)};\n\n /* ------------------------------------------------- */\n /* SPACING attributes */\n /* ------------------------------------------------- */\n ${spacingShorthand(\n 'margin',\n rootSize\n )({\n top: t.marginTop,\n left: t.marginLeft,\n bottom: t.marginBottom,\n right: t.marginRight,\n x: t.marginX,\n y: t.marginY,\n full: t.margin,\n })};\n\n ${spacingShorthand(\n 'padding',\n rootSize\n )({\n top: t.paddingTop,\n left: t.paddingLeft,\n bottom: t.paddingBottom,\n right: t.paddingRight,\n x: t.paddingX,\n y: t.paddingY,\n full: t.padding,\n })};\n\n /* ------------------------------------------------- */\n /* FLEX attributes */\n /* ------------------------------------------------- */\n align-content: ${t.alignContent};\n align-items: ${t.alignItems};\n align-self: ${t.alignSelf};\n flex: ${t.flex};\n flex-basis: ${t.flexBasis};\n flex-direction: ${t.flexDirection};\n flex-flow: ${t.flexFlow};\n flex-grow: ${t.flexGrow};\n flex-shrink: ${t.flexShrink};\n flex-wrap: ${t.flexWrap};\n justify-content: ${t.justifyContent};\n\n /* ------------------------------------------------- */\n /* POSITIONING attributes */\n /* ------------------------------------------------- */\n object-fit: ${t.objectFit};\n object-position: ${t.objectPosition};\n order: ${t.order};\n opacity: ${t.opacity};\n resize: ${t.resize};\n vertical-align: ${t.verticalAlign};\n\n /* ------------------------------------------------- */\n /* FONT attributes */\n /* ------------------------------------------------- */\n line-height: ${t.lineHeight};\n font: ${t.font};\n font-family: ${t.fontFamily};\n font-size: ${value(t.fontSize)};\n font-size-adjust: ${value(t.fontSizeAdjust)};\n font-stretch: ${value(t.fontStretch)};\n font-style: ${t.fontStyle};\n font-variant: ${t.fontVariant};\n font-weight: ${t.fontWeight};\n text-align: ${t.textAlign};\n text-align-last: ${t.textAlignLast};\n text-transform: ${t.textTransform};\n text-decoration: ${t.textDecoration};\n text-decoration-color: ${t.textDecorationColor};\n text-decoration-line: ${t.textDecorationLine};\n text-decoration-style: ${t.textDecorationStyle};\n letter-spacing: ${t.letterSpacing};\n text-indent: ${t.textIndent};\n text-justify: ${t.textJustify};\n text-overflow: ${t.textOverflow};\n text-shadow: ${t.textShadow};\n text-transform: ${t.textTransform};\n white-space: ${t.whiteSpace};\n word-break: ${t.wordBreak};\n word-wrap: ${t.wordWrap};\n writing-mode: ${t.writingMode};\n direction: ${t.direction};\n\n /* ------------------------------------------------- */\n /* LIST attributes */\n /* ------------------------------------------------- */\n list-style: ${t.listStyle};\n list-style-image: ${t.listStyleImage};\n list-style-position: ${t.listStylePosition};\n list-style-type: ${t.listStyleType};\n\n /* ------------------------------------------------- */\n /* BACKGROUND & COLORS attributes */\n /* ------------------------------------------------- */\n color: ${t.color};\n background: ${t.background};\n background-color: ${t.backgroundColor};\n ${t.backgroundImage &&\n css`\n background-image: url(${t.backgroundImage});\n `};\n background-attachment: ${t.backgroundAttachment};\n background-clip: ${t.backgroundClip};\n background-origin: ${t.backgroundOrigin};\n background-position: ${t.backgroundPosition};\n background-repeat: ${t.backgroundRepeat};\n background-size: ${t.backgroundSize};\n\n /* ------------------------------------------------- */\n /* BORDERS attributes */\n /* ------------------------------------------------- */\n border-radius: ${value(t.borderRadius)};\n border-top-left-radius: ${value(\n t.borderRadiusTopLeft,\n t.borderRadiusLeft,\n t.borderRadiusTop\n )};\n border-top-right-radius: ${value(\n t.borderRadiusTopRight,\n t.borderRadiusRight,\n t.borderRadiusTop\n )};\n border-bottom-left-radius: ${value(\n t.borderRadiusBottomLeft,\n t.borderRadiusLeft,\n t.borderRadiusBottom\n )};\n border-bottom-right-radius: ${value(\n t.borderRadiusBottomRight,\n t.borderRadiusRight,\n t.borderRadiusBottom\n )};\n\n border: ${t.border};\n border-top: ${t.borderTop};\n border-bottom: ${t.borderBottom};\n border-left: ${t.borderLeft};\n border-right: ${t.borderRight};\n\n border-width: ${pxValue(t.borderWidth)};\n border-style: ${t.borderStyle};\n border-color: ${t.borderColor};\n\n border-top-width: ${pxValue(t.borderWidthTop, t.borderWidthY)};\n border-top-style: ${t.borderStyleTop || t.borderStyleY};\n border-top-color: ${t.borderColorTop || t.borderColorY};\n\n border-bottom-width: ${pxValue(t.borderWidthBottom, t.borderWidthY)};\n border-bottom-style: ${t.borderStyleBottom || t.borderStyleY};\n border-bottom-color: ${t.borderColorBottom || t.borderColorY};\n\n border-left-width: ${pxValue(t.borderWidthLeft, t.borderWidthX)};\n border-left-style: ${t.borderStyleLeft || t.borderStyleX};\n border-left-color: ${t.borderColorLeft || t.borderColorX};\n\n border-right-width: ${pxValue(t.borderWidthRight, t.borderWidthX)};\n border-right-style: ${t.borderStyleRight || t.borderStyleX};\n border-right-color: ${t.borderColorRight || t.borderColorX};\n\n border-image: ${t.borderImage};\n border-image-outset: ${t.borderImageOutset};\n border-image-repeat: ${t.borderImageRepeat};\n border-image-slice: ${t.borderImageSlice};\n border-image-source: ${t.borderImageSource};\n border-image-width: ${t.borderImageWidth};\n border-spacing: ${t.borderSpacing};\n\n /* ------------------------------------------------- */\n /* VISUAL EFFECTS attributes */\n /* ------------------------------------------------- */\n backface-visibility: ${t.backfaceVisibility};\n box-shadow: ${t.boxShadow};\n filter: ${t.filter};\n outline: ${t.outline};\n outline-color: ${t.outlineColor};\n outline-offset: ${t.outlineOffset};\n outline-style: ${t.outlineStyle};\n outline-width: ${t.outlineWidth};\n\n /* ------------------------------------------------- */\n /* ANIMATIONS attributes */\n /* ------------------------------------------------- */\n animation: ${t.keyframe} ${t.animation};\n transition: ${t.transition};\n transition-delay: ${t.transitionDelay};\n transition-duration: ${t.transitionDuration};\n transition-property: ${t.transitionProperty};\n transition-timing-function: ${t.transitionTimingFunction};\n\n /* ------------------------------------------------- */\n /* OTHER attributes */\n /* ------------------------------------------------- */\n caption-side: ${t.captionSide};\n clear: ${t.clear};\n clip: ${t.clip};\n clip-path: ${t.clipPath};\n content: ${t.content};\n counter-increment: ${t.counterIncrement};\n counter-reset: ${t.counterReset};\n cursor: ${t.cursor};\n empty-cells: ${t.emptyCells};\n z-index: ${t.zIndex};\n transform: ${t.transform};\n transform-origin: ${t.transformOrigin};\n transform-style: ${t.transformStyle};\n overflow: ${t.overflow};\n overflow-wrap: ${t.overflowWrap};\n overflow-x: ${t.overflowX};\n overflow-y: ${t.overflowY};\n perspective: ${t.perspective};\n perspective-origin: ${t.perspectiveOrigin};\n pointer-events: ${t.pointerEvents};\n quotes: ${t.quotes};\n tab-size: ${t.tabSize};\n table-layout: ${t.tableLayout};\n user-select: ${t.userSelect};\n visibility: ${t.visibility};\n\n /* ------------------------------------------------- */\n /* CUSTOM attributes */\n /* ------------------------------------------------- */\n ${__WEB__ &&\n t.hideEmpty &&\n css`\n &:empty {\n display: none;\n }\n `};\n\n ${__WEB__ &&\n t.clearFix &&\n css`\n &::after: {\n clear: both;\n content: '';\n display: table;\n }\n `};\n\n ${t.extendCss};\n `\n}\n\nexport default styles\n","import { config, isEmpty } from '@vitus-labs/core'\n\nexport type AlignContentDirectionKeys = keyof typeof ALIGN_CONTENT_DIRECTION\nexport type AlignContentAlignXKeys = keyof typeof ALIGN_CONTENT_MAP_X\nexport type AlignContentAlignYKeys = keyof typeof ALIGN_CONTENT_MAP_Y\n\nconst ALIGN_CONTENT_MAP_SHARED = {\n center: 'center',\n spaceBetween: 'space-between',\n spaceAround: 'space-around',\n block: 'stretch',\n}\n\nexport const ALIGN_CONTENT_MAP_X = {\n left: 'flex-start',\n right: 'flex-end',\n ...ALIGN_CONTENT_MAP_SHARED,\n} as const\n\nexport const ALIGN_CONTENT_MAP_Y = {\n top: 'flex-start',\n bottom: 'flex-end',\n ...ALIGN_CONTENT_MAP_SHARED,\n} as const\n\nexport const ALIGN_CONTENT_DIRECTION = __WEB__\n ? {\n inline: 'row',\n reverseInline: 'reverse-row',\n rows: 'column',\n reverseRows: 'reverse-column',\n }\n : {\n inline: 'row',\n reverseInline: 'row-reverse',\n rows: 'column',\n reverseRows: 'column-reverse',\n }\n\nexport type AlignContent = ({\n direction,\n alignX,\n alignY,\n}: {\n direction: AlignContentDirectionKeys\n alignX: AlignContentAlignXKeys\n alignY: AlignContentAlignYKeys\n}) => ReturnType<typeof config.css> | null\n\nconst alignContent: AlignContent = (attrs) => {\n const { direction, alignX, alignY } = attrs\n\n if (isEmpty(attrs) || !direction || !alignX || !alignY) {\n return null\n }\n\n const isReverted = ['inline', 'reverseInline'].includes(direction)\n const dir = ALIGN_CONTENT_DIRECTION[direction]\n const x = ALIGN_CONTENT_MAP_X[alignX]\n const y = ALIGN_CONTENT_MAP_Y[alignY]\n\n return config.css`\n flex-direction: ${dir};\n align-items: ${isReverted ? y : x};\n justify-content: ${isReverted ? x : y};\n `\n}\n\nexport default alignContent\n","import { config } from '@vitus-labs/core'\n\nexport type ExtendCss = (\n styles:\n | ((css: typeof config.css) => ReturnType<typeof css>)\n | string\n | null\n | undefined\n) => string | ReturnType<typeof config.css>\n\nconst extendCss: ExtendCss = (styles) => {\n if (!styles) return ''\n if (typeof styles === 'function') {\n return styles(config.css)\n }\n\n return styles\n}\n\nexport default extendCss\n"],"names":["CoreProvider","value","unitValue"],"mappings":";;;;MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,EAAE;IACZ,WAAW,EAAE;QACX,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,IAAI;QACR,GAAG,EAAE,IAAI;KACV;;;MCKG,kBAAkB,GAAuB,CAAC,EAC9C,WAAW,EACX,QAAQ,EACR,GAAG,GACJ,KACC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG;;;IAGvC,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IACxC,MAAM,MAAM,GAAG,EAAE,GAAG,GAAG,EAAE,CAAA;;IAGzB,IAAI,eAAe,KAAK,CAAC,EAAE;QACzB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAW,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;KAC/C;SAAM;QACL,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;QAE1C,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAW,KAC3B,GAAG,CAAA;+CACoC,MAAM;cACvC,GAAG,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