@class101/cdn-ui-system 0.0.3 → 0.0.7

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.
Files changed (66) hide show
  1. package/@types/theme.d.js +1 -9
  2. package/contexts/UiSystemProvider.js +1 -1796
  3. package/core/props/action.js +1 -1045
  4. package/core/props/animator.js +1 -1045
  5. package/core/props/background.js +1 -1043
  6. package/core/props/border.js +3 -1047
  7. package/core/props/color.js +1 -1043
  8. package/core/props/flexbox.js +1 -1043
  9. package/core/props/icon.js +1 -1045
  10. package/core/props/image.js +1 -1045
  11. package/core/props/index.js +21 -2063
  12. package/core/props/layout.js +3 -1047
  13. package/core/props/position.js +1 -1043
  14. package/core/props/shadow.js +1 -1043
  15. package/core/props/space.js +1 -1043
  16. package/core/props/transform.js +1 -1045
  17. package/core/props/transition.js +1 -1045
  18. package/core/props/typography.js +3 -1047
  19. package/core/props/utils/getResponsiveValue.js +4 -5454
  20. package/core/props/utils/skipForwardProps.js +2 -12
  21. package/core/props/video.js +1 -1045
  22. package/core/variants/styleVariant/styleVariant.js +6 -214
  23. package/core/variants/system/system.js +6 -2080
  24. package/hooks/useResponsiveValue/useResponsiveValue.js +1 -1746
  25. package/lib/Animation/Animator/Animator.stories.js +1 -1761
  26. package/lib/Animation/FadeAnimation/FadeAnimation.js +1 -1761
  27. package/lib/Animation/RotateAnimation/RotateAnimation.js +1 -1761
  28. package/lib/Animation/SlideAnimation/SlideAnimation.js +5 -1765
  29. package/lib/Animation/Transition/Transition.stories.js +2 -2074
  30. package/lib/Avatar/Avatar.js +8 -3092
  31. package/lib/BreadCrumb/BreadCrumb.js +3 -2076
  32. package/lib/Button/ButtonIcon/ButtonIcon.js +6 -2287
  33. package/lib/Button/TextButton/TextButton.js +7 -3091
  34. package/lib/Elevation/Elevation.js +3 -3087
  35. package/lib/Form/CheckBox/CheckBox.js +4 -2076
  36. package/lib/Form/CheckBoxField/CheckBoxField.js +2 -206
  37. package/lib/Form/Description/Description.js +3 -3087
  38. package/lib/Form/HiddenInput/HiddenInput.js +2 -2074
  39. package/lib/Form/InlineTextLabel/InlineTextLabel.stories.js +2 -206
  40. package/lib/Form/Input/Input.js +4 -3088
  41. package/lib/Form/Label/Label.stories.js +4 -2250
  42. package/lib/Form/Select/Select.js +5 -3089
  43. package/lib/GlobalStyle/GlobalStyle.js +1 -1749
  44. package/lib/GridList/GridList.js +6 -7178
  45. package/lib/HtmlContentStyle/HtmlContentStyle.js +2 -2074
  46. package/lib/Layout/Center/Center.js +2 -2081
  47. package/lib/Media/Image/useActualSizes.js +14 -1727
  48. package/lib/Menu/MenuText/MenuText.js +3 -3087
  49. package/lib/Pagination/Pagination.js +5 -2440
  50. package/lib/Portal/Portal.js +1 -1740
  51. package/lib/ProfileLabel/ProfileLabel.js +11 -3096
  52. package/lib/Progress/ProgressStep/ProgressStep.js +3 -3087
  53. package/lib/Ratio/Ratio.js +4 -3088
  54. package/lib/Section/Section.js +2 -2074
  55. package/lib/SlideList/SlideList.js +2 -5452
  56. package/lib/Slider/Slider.js +7 -2537
  57. package/lib/SliderSection/SliderSection.js +2 -2074
  58. package/lib/Tag/Chip/Chip.js +3 -3087
  59. package/lib/Underline/Underline.js +3 -2179
  60. package/lib/deprecated/Swiper/Swiper.js +2 -2074
  61. package/lib/deprecated/Swiper/Swiper.stories.js +3 -2075
  62. package/lib/deprecated/Swiper/hooks/useSwiper.js +2 -455
  63. package/package.json +1 -1
  64. package/private/Box/Box.js +2 -2074
  65. package/private/ForwardStyle/ForwardStyle.js +7 -3141
  66. package/private/Stack/Stack.js +3 -1748
@@ -1,1047 +1,8 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res;
10
- };
11
- var __commonJS = (cb, mod) => function __require() {
12
- return mod || (0, cb[Object.keys(cb)[0]])((mod = {exports: {}}).exports, mod), mod.exports;
13
- };
14
- var __reExport = (target, module, desc) => {
15
- if (module && typeof module === "object" || typeof module === "function") {
16
- for (let key of __getOwnPropNames(module))
17
- if (!__hasOwnProp.call(target, key) && key !== "default")
18
- __defProp(target, key, {get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable});
19
- }
20
- return target;
21
- };
22
- var __toModule = (module) => {
23
- return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? {get: () => module.default, enumerable: true} : {value: module, enumerable: true})), module);
24
- };
25
-
26
1
  // tools/builders/framer-esm/build/react-shim.js
27
2
  import * as React from "react";
28
- var init_react_shim = __esm({
29
- "tools/builders/framer-esm/build/react-shim.js"() {
30
- }
31
- });
32
-
33
- // node_modules/object-assign/index.js
34
- var require_object_assign = __commonJS({
35
- "node_modules/object-assign/index.js"(exports, module) {
36
- init_react_shim();
37
- "use strict";
38
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
39
- var hasOwnProperty = Object.prototype.hasOwnProperty;
40
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
41
- function toObject(val) {
42
- if (val === null || val === void 0) {
43
- throw new TypeError("Object.assign cannot be called with null or undefined");
44
- }
45
- return Object(val);
46
- }
47
- function shouldUseNative() {
48
- try {
49
- if (!Object.assign) {
50
- return false;
51
- }
52
- var test1 = new String("abc");
53
- test1[5] = "de";
54
- if (Object.getOwnPropertyNames(test1)[0] === "5") {
55
- return false;
56
- }
57
- var test2 = {};
58
- for (var i = 0; i < 10; i++) {
59
- test2["_" + String.fromCharCode(i)] = i;
60
- }
61
- var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
62
- return test2[n];
63
- });
64
- if (order2.join("") !== "0123456789") {
65
- return false;
66
- }
67
- var test3 = {};
68
- "abcdefghijklmnopqrst".split("").forEach(function(letter) {
69
- test3[letter] = letter;
70
- });
71
- if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
72
- return false;
73
- }
74
- return true;
75
- } catch (err) {
76
- return false;
77
- }
78
- }
79
- module.exports = shouldUseNative() ? Object.assign : function(target, source) {
80
- var from;
81
- var to = toObject(target);
82
- var symbols;
83
- for (var s = 1; s < arguments.length; s++) {
84
- from = Object(arguments[s]);
85
- for (var key in from) {
86
- if (hasOwnProperty.call(from, key)) {
87
- to[key] = from[key];
88
- }
89
- }
90
- if (getOwnPropertySymbols) {
91
- symbols = getOwnPropertySymbols(from);
92
- for (var i = 0; i < symbols.length; i++) {
93
- if (propIsEnumerable.call(from, symbols[i])) {
94
- to[symbols[i]] = from[symbols[i]];
95
- }
96
- }
97
- }
98
- }
99
- return to;
100
- };
101
- }
102
- });
103
-
104
- // libs/shared/ui-system/src/core/props/image.ts
105
- init_react_shim();
106
-
107
- // node_modules/@class101/styled-system/dist/index.esm.js
108
- init_react_shim();
109
-
110
- // node_modules/@class101/styled-system__core/dist/index.esm.js
111
- init_react_shim();
112
- var import_object_assign = __toModule(require_object_assign());
113
- var merge = function merge2(a, b) {
114
- var result = (0, import_object_assign.default)({}, a, b);
115
- for (var key in a) {
116
- var _assign;
117
- if (!a[key] || typeof b[key] !== "object")
118
- continue;
119
- (0, import_object_assign.default)(result, (_assign = {}, _assign[key] = (0, import_object_assign.default)(a[key], b[key]), _assign));
120
- }
121
- return result;
122
- };
123
- var sort = function sort2(obj) {
124
- var next = {};
125
- Object.keys(obj).sort(function(a, b) {
126
- return a.localeCompare(b, void 0, {
127
- numeric: true,
128
- sensitivity: "base"
129
- });
130
- }).forEach(function(key) {
131
- next[key] = obj[key];
132
- });
133
- return next;
134
- };
135
- var defaults = {
136
- breakpoints: [40, 52, 64].map(function(n) {
137
- return n + "em";
138
- })
139
- };
140
- var createMediaQuery = function createMediaQuery2(n) {
141
- return "@media screen and (min-width: " + n + ")";
142
- };
143
- var getValue = function getValue2(n, scale) {
144
- return get(scale, n, n);
145
- };
146
- var get = function get2(obj, key, def, p, undef) {
147
- key = key && key.split ? key.split(".") : [key];
148
- for (p = 0; p < key.length; p++) {
149
- obj = obj ? obj[key[p]] : undef;
150
- }
151
- return obj === undef ? def : obj;
152
- };
153
- var createParser = function createParser2(config9) {
154
- var cache = {};
155
- var parse = function parse2(props) {
156
- var styles = {};
157
- var shouldSort = false;
158
- var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
159
- for (var _key in props) {
160
- if (!config9[_key])
161
- continue;
162
- var sx = config9[_key];
163
- var raw = props[_key];
164
- var scale = get(props.theme, sx.scale, sx.defaults);
165
- if (typeof raw === "object" && Array.isArray(raw)) {
166
- cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
167
- cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
168
- styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
169
- continue;
170
- }
171
- (0, import_object_assign.default)(styles, sx(raw, scale, props));
172
- }
173
- if (shouldSort) {
174
- styles = sort(styles);
175
- }
176
- var sortedStyles = {};
177
- var mediaQueryStyles = {};
178
- for (var key in styles) {
179
- if (key.startsWith("@media")) {
180
- mediaQueryStyles[key] = styles[key];
181
- continue;
182
- }
183
- sortedStyles[key] = styles[key];
184
- }
185
- return merge(sortedStyles, mediaQueryStyles);
186
- };
187
- parse.config = config9;
188
- parse.propNames = Object.keys(config9);
189
- parse.cache = cache;
190
- var keys = Object.keys(config9).filter(function(k) {
191
- return k !== "config";
192
- });
193
- if (keys.length > 1) {
194
- keys.forEach(function(key) {
195
- var _createParser;
196
- parse[key] = createParser2((_createParser = {}, _createParser[key] = config9[key], _createParser));
197
- });
198
- }
199
- return parse;
200
- };
201
- var parseResponsiveStyle = function parseResponsiveStyle2(mediaQueries, sx, scale, raw, _props) {
202
- var styles = {};
203
- raw.slice(0, mediaQueries.length).forEach(function(value, i) {
204
- var media = mediaQueries[i];
205
- var style = sx(value, scale, _props);
206
- if (!media) {
207
- (0, import_object_assign.default)(styles, style);
208
- } else {
209
- var _assign2;
210
- (0, import_object_assign.default)(styles, (_assign2 = {}, _assign2[media] = (0, import_object_assign.default)({}, styles[media], style), _assign2));
211
- }
212
- });
213
- return styles;
214
- };
215
- var createStyleFunction = function createStyleFunction2(_ref) {
216
- var properties = _ref.properties, property = _ref.property, scale = _ref.scale, _ref$transform = _ref.transform, transform = _ref$transform === void 0 ? getValue : _ref$transform, defaultScale = _ref.defaultScale;
217
- properties = properties || [property];
218
- var sx = function sx2(value, scale2, _props) {
219
- var result = {};
220
- var n = transform(value, scale2, _props);
221
- if (n === null)
222
- return;
223
- properties.forEach(function(prop) {
224
- result[prop] = n;
225
- });
226
- return result;
227
- };
228
- sx.scale = scale;
229
- sx.defaults = defaultScale;
230
- return sx;
231
- };
232
- var system = function system2(args) {
233
- if (args === void 0) {
234
- args = {};
235
- }
236
- var config9 = {};
237
- Object.keys(args).forEach(function(key) {
238
- var conf = args[key];
239
- if (conf === true) {
240
- config9[key] = createStyleFunction({
241
- property: key,
242
- scale: key
243
- });
244
- return;
245
- }
246
- if (typeof conf === "function") {
247
- config9[key] = conf;
248
- return;
249
- }
250
- config9[key] = createStyleFunction(conf);
251
- });
252
- var parser = createParser(config9);
253
- return parser;
254
- };
255
- var compose = function compose2() {
256
- var config9 = {};
257
- for (var _len = arguments.length, parsers = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
258
- parsers[_key2] = arguments[_key2];
259
- }
260
- parsers.forEach(function(parser2) {
261
- if (!parser2 || !parser2.config)
262
- return;
263
- (0, import_object_assign.default)(config9, parser2.config);
264
- });
265
- var parser = createParser(config9);
266
- return parser;
267
- };
268
-
269
- // node_modules/@class101/styled-system__layout/dist/index.esm.js
270
- init_react_shim();
271
- var isNumber = function isNumber2(n) {
272
- return typeof n === "number" && !isNaN(n);
273
- };
274
- var getWidth = function getWidth2(n, scale) {
275
- return get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
276
- };
277
- var config = {
278
- width: {
279
- property: "width",
280
- scale: "sizes",
281
- transform: getWidth
282
- },
283
- height: {
284
- property: "height",
285
- scale: "sizes"
286
- },
287
- minWidth: {
288
- property: "minWidth",
289
- scale: "sizes"
290
- },
291
- minHeight: {
292
- property: "minHeight",
293
- scale: "sizes"
294
- },
295
- maxWidth: {
296
- property: "maxWidth",
297
- scale: "sizes"
298
- },
299
- maxHeight: {
300
- property: "maxHeight",
301
- scale: "sizes"
302
- },
303
- size: {
304
- properties: ["width", "height"],
305
- scale: "sizes"
306
- },
307
- overflow: true,
308
- overflowX: true,
309
- overflowY: true,
310
- display: true,
311
- verticalAlign: true
312
- };
313
- var layout = system(config);
314
- var index_esm_default = layout;
315
-
316
- // node_modules/@class101/styled-system__color/dist/index.esm.js
317
- init_react_shim();
318
- var config2 = {
319
- color: {
320
- property: "color",
321
- scale: "colors"
322
- },
323
- backgroundColor: {
324
- property: "backgroundColor",
325
- scale: "colors"
326
- },
327
- opacity: true
328
- };
329
- config2.bg = config2.backgroundColor;
330
- var color = system(config2);
331
- var index_esm_default2 = color;
332
-
333
- // node_modules/@class101/styled-system__typography/dist/index.esm.js
334
- init_react_shim();
335
- var defaults2 = {
336
- fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
337
- };
338
- var config3 = {
339
- fontFamily: {
340
- property: "fontFamily",
341
- scale: "fonts"
342
- },
343
- fontSize: {
344
- property: "fontSize",
345
- scale: "fontSizes",
346
- defaultScale: defaults2.fontSizes
347
- },
348
- fontWeight: {
349
- property: "fontWeight",
350
- scale: "fontWeights"
351
- },
352
- lineHeight: {
353
- property: "lineHeight",
354
- scale: "lineHeights"
355
- },
356
- letterSpacing: {
357
- property: "letterSpacing",
358
- scale: "letterSpacings"
359
- },
360
- textAlign: true,
361
- fontStyle: true
362
- };
363
- var typography = system(config3);
364
- var index_esm_default3 = typography;
365
-
366
- // node_modules/@class101/styled-system__flexbox/dist/index.esm.js
367
- init_react_shim();
368
- var config4 = {
369
- alignItems: true,
370
- alignContent: true,
371
- justifyItems: true,
372
- justifyContent: true,
373
- flexWrap: true,
374
- flexDirection: true,
375
- flex: true,
376
- flexGrow: true,
377
- flexShrink: true,
378
- flexBasis: true,
379
- justifySelf: true,
380
- alignSelf: true,
381
- order: true
382
- };
383
- var flexbox = system(config4);
384
- var index_esm_default4 = flexbox;
385
-
386
- // node_modules/@class101/styled-system__grid/dist/index.esm.js
387
- init_react_shim();
388
- var defaults3 = {
389
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
390
- };
391
- var config5 = {
392
- gridGap: {
393
- property: "gridGap",
394
- scale: "space",
395
- defaultScale: defaults3.space
396
- },
397
- gridColumnGap: {
398
- property: "gridColumnGap",
399
- scale: "space",
400
- defaultScale: defaults3.space
401
- },
402
- gridRowGap: {
403
- property: "gridRowGap",
404
- scale: "space",
405
- defaultScale: defaults3.space
406
- },
407
- gridColumn: true,
408
- gridRow: true,
409
- gridAutoFlow: true,
410
- gridAutoColumns: true,
411
- gridAutoRows: true,
412
- gridTemplateColumns: true,
413
- gridTemplateRows: true,
414
- gridTemplateAreas: true,
415
- gridArea: true
416
- };
417
- var grid = system(config5);
418
- var index_esm_default5 = grid;
419
-
420
- // node_modules/@class101/styled-system__border/dist/index.esm.js
421
- init_react_shim();
422
- var config6 = {
423
- border: {
424
- property: "border",
425
- scale: "borders"
426
- },
427
- borderWidth: {
428
- property: "borderWidth",
429
- scale: "borderWidths"
430
- },
431
- borderStyle: {
432
- property: "borderStyle",
433
- scale: "borderStyles"
434
- },
435
- borderColor: {
436
- property: "borderColor",
437
- scale: "colors"
438
- },
439
- borderRadius: {
440
- property: "borderRadius",
441
- scale: "radii"
442
- },
443
- borderTop: {
444
- property: "borderTop",
445
- scale: "borders"
446
- },
447
- borderTopLeftRadius: {
448
- property: "borderTopLeftRadius",
449
- scale: "radii"
450
- },
451
- borderTopRightRadius: {
452
- property: "borderTopRightRadius",
453
- scale: "radii"
454
- },
455
- borderRight: {
456
- property: "borderRight",
457
- scale: "borders"
458
- },
459
- borderBottom: {
460
- property: "borderBottom",
461
- scale: "borders"
462
- },
463
- borderBottomLeftRadius: {
464
- property: "borderBottomLeftRadius",
465
- scale: "radii"
466
- },
467
- borderBottomRightRadius: {
468
- property: "borderBottomRightRadius",
469
- scale: "radii"
470
- },
471
- borderLeft: {
472
- property: "borderLeft",
473
- scale: "borders"
474
- },
475
- borderX: {
476
- properties: ["borderLeft", "borderRight"],
477
- scale: "borders"
478
- },
479
- borderY: {
480
- properties: ["borderTop", "borderBottom"],
481
- scale: "borders"
482
- }
483
- };
484
- config6.borderTopWidth = {
485
- property: "borderTopWidth",
486
- scale: "borderWidths"
487
- };
488
- config6.borderTopColor = {
489
- property: "borderTopColor",
490
- scale: "colors"
491
- };
492
- config6.borderTopStyle = {
493
- property: "borderTopStyle",
494
- scale: "borderStyles"
495
- };
496
- config6.borderTopLeftRadius = {
497
- property: "borderTopLeftRadius",
498
- scale: "radii"
499
- };
500
- config6.borderTopRightRadius = {
501
- property: "borderTopRightRadius",
502
- scale: "radii"
503
- };
504
- config6.borderBottomWidth = {
505
- property: "borderBottomWidth",
506
- scale: "borderWidths"
507
- };
508
- config6.borderBottomColor = {
509
- property: "borderBottomColor",
510
- scale: "colors"
511
- };
512
- config6.borderBottomStyle = {
513
- property: "borderBottomStyle",
514
- scale: "borderStyles"
515
- };
516
- config6.borderBottomLeftRadius = {
517
- property: "borderBottomLeftRadius",
518
- scale: "radii"
519
- };
520
- config6.borderBottomRightRadius = {
521
- property: "borderBottomRightRadius",
522
- scale: "radii"
523
- };
524
- config6.borderLeftWidth = {
525
- property: "borderLeftWidth",
526
- scale: "borderWidths"
527
- };
528
- config6.borderLeftColor = {
529
- property: "borderLeftColor",
530
- scale: "colors"
531
- };
532
- config6.borderLeftStyle = {
533
- property: "borderLeftStyle",
534
- scale: "borderStyles"
535
- };
536
- config6.borderRightWidth = {
537
- property: "borderRightWidth",
538
- scale: "borderWidths"
539
- };
540
- config6.borderRightColor = {
541
- property: "borderRightColor",
542
- scale: "colors"
543
- };
544
- config6.borderRightStyle = {
545
- property: "borderRightStyle",
546
- scale: "borderStyles"
547
- };
548
- var border = system(config6);
549
- var index_esm_default6 = border;
550
-
551
- // node_modules/@class101/styled-system__background/dist/index.esm.js
552
- init_react_shim();
553
- var config7 = {
554
- background: true,
555
- backgroundImage: true,
556
- backgroundSize: true,
557
- backgroundPosition: true,
558
- backgroundRepeat: true
559
- };
560
- config7.bgImage = config7.backgroundImage;
561
- config7.bgSize = config7.backgroundSize;
562
- config7.bgPosition = config7.backgroundPosition;
563
- config7.bgRepeat = config7.backgroundRepeat;
564
- var background = system(config7);
565
- var index_esm_default7 = background;
566
-
567
- // node_modules/@class101/styled-system__position/dist/index.esm.js
568
- init_react_shim();
569
- var defaults4 = {
570
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
571
- };
572
- var config8 = {
573
- position: true,
574
- zIndex: {
575
- property: "zIndex",
576
- scale: "zIndices"
577
- },
578
- top: {
579
- property: "top",
580
- scale: "space",
581
- defaultScale: defaults4.space
582
- },
583
- right: {
584
- property: "right",
585
- scale: "space",
586
- defaultScale: defaults4.space
587
- },
588
- bottom: {
589
- property: "bottom",
590
- scale: "space",
591
- defaultScale: defaults4.space
592
- },
593
- left: {
594
- property: "left",
595
- scale: "space",
596
- defaultScale: defaults4.space
597
- }
598
- };
599
- var position = system(config8);
600
- var index_esm_default8 = position;
601
-
602
- // node_modules/@class101/styled-system__space/dist/index.esm.js
603
- init_react_shim();
604
- var defaults5 = {
605
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
606
- };
607
- var isNumber3 = function isNumber4(n) {
608
- return typeof n === "number" && !isNaN(n);
609
- };
610
- var getMargin = function getMargin2(n, scale) {
611
- if (!isNumber3(n)) {
612
- return get(scale, n, n);
613
- }
614
- var isNegative = n < 0;
615
- var absolute = Math.abs(n);
616
- var value = get(scale, absolute, absolute);
617
- if (!isNumber3(value)) {
618
- return isNegative ? "-" + value : value;
619
- }
620
- return value * (isNegative ? -1 : 1);
621
- };
622
- var configs = {};
623
- configs.margin = {
624
- margin: {
625
- property: "margin",
626
- scale: "space",
627
- transform: getMargin,
628
- defaultScale: defaults5.space
629
- },
630
- marginTop: {
631
- property: "marginTop",
632
- scale: "space",
633
- transform: getMargin,
634
- defaultScale: defaults5.space
635
- },
636
- marginRight: {
637
- property: "marginRight",
638
- scale: "space",
639
- transform: getMargin,
640
- defaultScale: defaults5.space
641
- },
642
- marginBottom: {
643
- property: "marginBottom",
644
- scale: "space",
645
- transform: getMargin,
646
- defaultScale: defaults5.space
647
- },
648
- marginLeft: {
649
- property: "marginLeft",
650
- scale: "space",
651
- transform: getMargin,
652
- defaultScale: defaults5.space
653
- },
654
- marginX: {
655
- properties: ["marginLeft", "marginRight"],
656
- scale: "space",
657
- transform: getMargin,
658
- defaultScale: defaults5.space
659
- },
660
- marginY: {
661
- properties: ["marginTop", "marginBottom"],
662
- scale: "space",
663
- transform: getMargin,
664
- defaultScale: defaults5.space
665
- }
666
- };
667
- configs.margin.m = configs.margin.margin;
668
- configs.margin.mt = configs.margin.marginTop;
669
- configs.margin.mr = configs.margin.marginRight;
670
- configs.margin.mb = configs.margin.marginBottom;
671
- configs.margin.ml = configs.margin.marginLeft;
672
- configs.margin.mx = configs.margin.marginX;
673
- configs.margin.my = configs.margin.marginY;
674
- configs.padding = {
675
- padding: {
676
- property: "padding",
677
- scale: "space",
678
- defaultScale: defaults5.space
679
- },
680
- paddingTop: {
681
- property: "paddingTop",
682
- scale: "space",
683
- defaultScale: defaults5.space
684
- },
685
- paddingRight: {
686
- property: "paddingRight",
687
- scale: "space",
688
- defaultScale: defaults5.space
689
- },
690
- paddingBottom: {
691
- property: "paddingBottom",
692
- scale: "space",
693
- defaultScale: defaults5.space
694
- },
695
- paddingLeft: {
696
- property: "paddingLeft",
697
- scale: "space",
698
- defaultScale: defaults5.space
699
- },
700
- paddingX: {
701
- properties: ["paddingLeft", "paddingRight"],
702
- scale: "space",
703
- defaultScale: defaults5.space
704
- },
705
- paddingY: {
706
- properties: ["paddingTop", "paddingBottom"],
707
- scale: "space",
708
- defaultScale: defaults5.space
709
- }
710
- };
711
- configs.padding.p = configs.padding.padding;
712
- configs.padding.pt = configs.padding.paddingTop;
713
- configs.padding.pr = configs.padding.paddingRight;
714
- configs.padding.pb = configs.padding.paddingBottom;
715
- configs.padding.pl = configs.padding.paddingLeft;
716
- configs.padding.px = configs.padding.paddingX;
717
- configs.padding.py = configs.padding.paddingY;
718
- var margin = system(configs.margin);
719
- var padding = system(configs.padding);
720
- var space = compose(margin, padding);
721
-
722
- // node_modules/@class101/styled-system__shadow/dist/index.esm.js
723
- init_react_shim();
724
- var shadow = system({
725
- boxShadow: {
726
- property: "boxShadow",
727
- scale: "shadows"
728
- },
729
- textShadow: {
730
- property: "textShadow",
731
- scale: "shadows"
732
- }
733
- });
734
-
735
- // node_modules/@class101/styled-system__variant/dist/index.esm.js
736
- init_react_shim();
737
-
738
- // node_modules/@class101/styled-system__css/dist/index.esm.js
739
- init_react_shim();
740
- function _extends() {
741
- _extends = Object.assign || function(target) {
742
- for (var i = 1; i < arguments.length; i++) {
743
- var source = arguments[i];
744
- for (var key in source) {
745
- if (Object.prototype.hasOwnProperty.call(source, key)) {
746
- target[key] = source[key];
747
- }
748
- }
749
- }
750
- return target;
751
- };
752
- return _extends.apply(this, arguments);
753
- }
754
- var get3 = function get4(obj, key, def, p, undef) {
755
- key = key && key.split ? key.split(".") : [key];
756
- for (p = 0; p < key.length; p++) {
757
- obj = obj ? obj[key[p]] : undef;
758
- }
759
- return obj === undef ? def : obj;
760
- };
761
- var defaultBreakpoints = [40, 52, 64].map(function(n) {
762
- return n + "em";
763
- });
764
- var defaultTheme = {
765
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
766
- fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
767
- };
768
- var aliases = {
769
- bg: "backgroundColor",
770
- m: "margin",
771
- mt: "marginTop",
772
- mr: "marginRight",
773
- mb: "marginBottom",
774
- ml: "marginLeft",
775
- mx: "marginX",
776
- my: "marginY",
777
- p: "padding",
778
- pt: "paddingTop",
779
- pr: "paddingRight",
780
- pb: "paddingBottom",
781
- pl: "paddingLeft",
782
- px: "paddingX",
783
- py: "paddingY"
784
- };
785
- var multiples = {
786
- marginX: ["marginLeft", "marginRight"],
787
- marginY: ["marginTop", "marginBottom"],
788
- paddingX: ["paddingLeft", "paddingRight"],
789
- paddingY: ["paddingTop", "paddingBottom"],
790
- size: ["width", "height"]
791
- };
792
- var scales = {
793
- color: "colors",
794
- backgroundColor: "colors",
795
- borderColor: "colors",
796
- margin: "space",
797
- marginTop: "space",
798
- marginRight: "space",
799
- marginBottom: "space",
800
- marginLeft: "space",
801
- marginX: "space",
802
- marginY: "space",
803
- padding: "space",
804
- paddingTop: "space",
805
- paddingRight: "space",
806
- paddingBottom: "space",
807
- paddingLeft: "space",
808
- paddingX: "space",
809
- paddingY: "space",
810
- top: "space",
811
- right: "space",
812
- bottom: "space",
813
- left: "space",
814
- gridGap: "space",
815
- gridColumnGap: "space",
816
- gridRowGap: "space",
817
- gap: "space",
818
- columnGap: "space",
819
- rowGap: "space",
820
- fontFamily: "fonts",
821
- fontSize: "fontSizes",
822
- fontWeight: "fontWeights",
823
- lineHeight: "lineHeights",
824
- letterSpacing: "letterSpacings",
825
- border: "borders",
826
- borderTop: "borders",
827
- borderRight: "borders",
828
- borderBottom: "borders",
829
- borderLeft: "borders",
830
- borderWidth: "borderWidths",
831
- borderStyle: "borderStyles",
832
- borderRadius: "radii",
833
- borderTopRightRadius: "radii",
834
- borderTopLeftRadius: "radii",
835
- borderBottomRightRadius: "radii",
836
- borderBottomLeftRadius: "radii",
837
- borderTopWidth: "borderWidths",
838
- borderTopColor: "colors",
839
- borderTopStyle: "borderStyles",
840
- borderBottomWidth: "borderWidths",
841
- borderBottomColor: "colors",
842
- borderBottomStyle: "borderStyles",
843
- borderLeftWidth: "borderWidths",
844
- borderLeftColor: "colors",
845
- borderLeftStyle: "borderStyles",
846
- borderRightWidth: "borderWidths",
847
- borderRightColor: "colors",
848
- borderRightStyle: "borderStyles",
849
- outlineColor: "colors",
850
- boxShadow: "shadows",
851
- textShadow: "shadows",
852
- zIndex: "zIndices",
853
- width: "sizes",
854
- minWidth: "sizes",
855
- maxWidth: "sizes",
856
- height: "sizes",
857
- minHeight: "sizes",
858
- maxHeight: "sizes",
859
- flexBasis: "sizes",
860
- size: "sizes",
861
- fill: "colors",
862
- stroke: "colors"
863
- };
864
- var positiveOrNegative = function positiveOrNegative2(scale, value) {
865
- if (typeof value !== "number" || value >= 0) {
866
- return get3(scale, value, value);
867
- }
868
- var absolute = Math.abs(value);
869
- var n = get3(scale, absolute, absolute);
870
- if (typeof n === "string")
871
- return "-" + n;
872
- return n * -1;
873
- };
874
- var transforms = ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "top", "bottom", "left", "right"].reduce(function(acc, curr) {
875
- var _extends2;
876
- return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
877
- }, {});
878
- var responsive = function responsive2(styles) {
879
- return function(theme) {
880
- var next = {};
881
- var breakpoints = get3(theme, "breakpoints", defaultBreakpoints);
882
- var mediaQueries = [null].concat(breakpoints.map(function(n) {
883
- return "@media screen and (min-width: " + n + ")";
884
- }));
885
- for (var key in styles) {
886
- var value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
887
- if (value == null)
888
- continue;
889
- if (!Array.isArray(value)) {
890
- next[key] = value;
891
- continue;
892
- }
893
- for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
894
- var media = mediaQueries[i];
895
- if (!media) {
896
- next[key] = value[i];
897
- continue;
898
- }
899
- next[media] = next[media] || {};
900
- if (value[i] == null)
901
- continue;
902
- next[media][key] = value[i];
903
- }
904
- }
905
- return next;
906
- };
907
- };
908
- var css = function css2(args) {
909
- return function(props) {
910
- if (props === void 0) {
911
- props = {};
912
- }
913
- var theme = _extends({}, defaultTheme, props.theme || props);
914
- var result = {};
915
- var obj = typeof args === "function" ? args(theme) : args;
916
- var styles = responsive(obj)(theme);
917
- for (var key in styles) {
918
- var x = styles[key];
919
- var val = typeof x === "function" ? x(theme) : x;
920
- if (key === "variant") {
921
- var variant3 = css2(get3(theme, val))(theme);
922
- result = _extends({}, result, variant3);
923
- continue;
924
- }
925
- if (val && typeof val === "object") {
926
- result[key] = css2(val)(theme);
927
- continue;
928
- }
929
- var prop = get3(aliases, key, key);
930
- var scaleName = get3(scales, prop);
931
- var scale = get3(theme, scaleName, get3(theme, prop, {}));
932
- var transform = get3(transforms, prop, get3);
933
- var value = transform(scale, val, val);
934
- if (multiples[prop]) {
935
- var dirs = multiples[prop];
936
- for (var i = 0; i < dirs.length; i++) {
937
- result[dirs[i]] = value;
938
- }
939
- } else {
940
- result[prop] = value;
941
- }
942
- }
943
- return result;
944
- };
945
- };
946
- var index_esm_default9 = css;
947
-
948
- // node_modules/@class101/styled-system__variant/dist/index.esm.js
949
- var variant = function variant2(_ref) {
950
- var _config;
951
- var scale = _ref.scale, _ref$prop = _ref.prop, prop = _ref$prop === void 0 ? "variant" : _ref$prop, _ref$variants = _ref.variants, variants = _ref$variants === void 0 ? {} : _ref$variants, key = _ref.key;
952
- var sx;
953
- if (Object.keys(variants).length) {
954
- sx = function sx2(value, scale2, props) {
955
- return index_esm_default9(get(scale2, value, null))(props.theme);
956
- };
957
- } else {
958
- sx = function sx2(value, scale2) {
959
- return get(scale2, value, null);
960
- };
961
- }
962
- sx.scale = scale || key;
963
- sx.defaults = variants;
964
- var config9 = (_config = {}, _config[prop] = sx, _config);
965
- var parser = createParser(config9);
966
- return parser;
967
- };
968
- var buttonStyle = variant({
969
- key: "buttons"
970
- });
971
- var textStyle = variant({
972
- key: "textStyles",
973
- prop: "textStyle"
974
- });
975
- var colorStyle = variant({
976
- key: "colorStyles",
977
- prop: "colors"
978
- });
979
-
980
- // node_modules/@class101/styled-system/dist/index.esm.js
981
- var width = index_esm_default.width;
982
- var height = index_esm_default.height;
983
- var minWidth = index_esm_default.minWidth;
984
- var minHeight = index_esm_default.minHeight;
985
- var maxWidth = index_esm_default.maxWidth;
986
- var maxHeight = index_esm_default.maxHeight;
987
- var size = index_esm_default.size;
988
- var verticalAlign = index_esm_default.verticalAlign;
989
- var display = index_esm_default.display;
990
- var overflow = index_esm_default.overflow;
991
- var overflowX = index_esm_default.overflowX;
992
- var overflowY = index_esm_default.overflowY;
993
- var opacity = index_esm_default2.opacity;
994
- var fontSize = index_esm_default3.fontSize;
995
- var fontFamily = index_esm_default3.fontFamily;
996
- var fontWeight = index_esm_default3.fontWeight;
997
- var lineHeight = index_esm_default3.lineHeight;
998
- var textAlign = index_esm_default3.textAlign;
999
- var fontStyle = index_esm_default3.fontStyle;
1000
- var letterSpacing = index_esm_default3.letterSpacing;
1001
- var alignItems = index_esm_default4.alignItems;
1002
- var alignContent = index_esm_default4.alignContent;
1003
- var justifyItems = index_esm_default4.justifyItems;
1004
- var justifyContent = index_esm_default4.justifyContent;
1005
- var flexWrap = index_esm_default4.flexWrap;
1006
- var flexDirection = index_esm_default4.flexDirection;
1007
- var flex = index_esm_default4.flex;
1008
- var flexGrow = index_esm_default4.flexGrow;
1009
- var flexShrink = index_esm_default4.flexShrink;
1010
- var flexBasis = index_esm_default4.flexBasis;
1011
- var justifySelf = index_esm_default4.justifySelf;
1012
- var alignSelf = index_esm_default4.alignSelf;
1013
- var order = index_esm_default4.order;
1014
- var gridGap = index_esm_default5.gridGap;
1015
- var gridColumnGap = index_esm_default5.gridColumnGap;
1016
- var gridRowGap = index_esm_default5.gridRowGap;
1017
- var gridColumn = index_esm_default5.gridColumn;
1018
- var gridRow = index_esm_default5.gridRow;
1019
- var gridAutoFlow = index_esm_default5.gridAutoFlow;
1020
- var gridAutoColumns = index_esm_default5.gridAutoColumns;
1021
- var gridAutoRows = index_esm_default5.gridAutoRows;
1022
- var gridTemplateColumns = index_esm_default5.gridTemplateColumns;
1023
- var gridTemplateRows = index_esm_default5.gridTemplateRows;
1024
- var gridTemplateAreas = index_esm_default5.gridTemplateAreas;
1025
- var gridArea = index_esm_default5.gridArea;
1026
- var borderWidth = index_esm_default6.borderWidth;
1027
- var borderStyle = index_esm_default6.borderStyle;
1028
- var borderColor = index_esm_default6.borderColor;
1029
- var borderTop = index_esm_default6.borderTop;
1030
- var borderRight = index_esm_default6.borderRight;
1031
- var borderBottom = index_esm_default6.borderBottom;
1032
- var borderLeft = index_esm_default6.borderLeft;
1033
- var borderRadius = index_esm_default6.borderRadius;
1034
- var backgroundImage = index_esm_default7.backgroundImage;
1035
- var backgroundSize = index_esm_default7.backgroundSize;
1036
- var backgroundPosition = index_esm_default7.backgroundPosition;
1037
- var backgroundRepeat = index_esm_default7.backgroundRepeat;
1038
- var zIndex = index_esm_default8.zIndex;
1039
- var top = index_esm_default8.top;
1040
- var right = index_esm_default8.right;
1041
- var bottom = index_esm_default8.bottom;
1042
- var left = index_esm_default8.left;
1043
3
 
1044
4
  // libs/shared/ui-system/src/core/props/image.ts
5
+ import {compose, system} from "https://jspm.dev/@class101/styled-system@5.3.1";
1045
6
  var objectFit = system({
1046
7
  objectFit: true
1047
8
  });
@@ -1049,8 +10,3 @@ var image = compose(objectFit);
1049
10
  export {
1050
11
  image
1051
12
  };
1052
- /*
1053
- object-assign
1054
- (c) Sindre Sorhus
1055
- @license MIT
1056
- */