@cleartrip/ct-design-style-manager 4.0.0-TEST.1 → 5.0.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.
Files changed (46) hide show
  1. package/dist/ct-design-styleManager.browser.cjs.js +1 -1
  2. package/dist/ct-design-styleManager.browser.cjs.js.map +1 -1
  3. package/dist/ct-design-styleManager.browser.esm.js +1 -1
  4. package/dist/ct-design-styleManager.browser.esm.js.map +1 -1
  5. package/dist/ct-design-styleManager.cjs.js +409 -113
  6. package/dist/ct-design-styleManager.cjs.js.map +1 -1
  7. package/dist/ct-design-styleManager.esm.js +408 -114
  8. package/dist/ct-design-styleManager.esm.js.map +1 -1
  9. package/dist/ct-design-styleManager.umd.js +407 -112
  10. package/dist/ct-design-styleManager.umd.js.map +1 -1
  11. package/dist/globalLayoutStyles/gs.d.ts +869 -0
  12. package/dist/globalLayoutStyles/gs.d.ts.map +1 -0
  13. package/dist/index.d.ts +3 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/makeStyles/index.d.ts +1 -3
  16. package/dist/makeStyles/index.d.ts.map +1 -1
  17. package/dist/makeStyles/index.native.d.ts +6 -0
  18. package/dist/makeStyles/index.native.d.ts.map +1 -0
  19. package/dist/makeStyles/preprocess/index.d.ts +3 -3
  20. package/dist/makeStyles/preprocess/index.d.ts.map +1 -1
  21. package/dist/useNativeMergeStyles/index.d.ts +6 -0
  22. package/dist/useNativeMergeStyles/index.d.ts.map +1 -0
  23. package/dist/useNativeMergeStyles/index.native.d.ts +5 -0
  24. package/dist/useNativeMergeStyles/index.native.d.ts.map +1 -0
  25. package/dist/useStableMemo/index.d.ts.map +1 -1
  26. package/dist/useStyles/index.d.ts +2 -3
  27. package/dist/useStyles/index.d.ts.map +1 -1
  28. package/dist/useWebMergeStyles/index.d.ts +1 -1
  29. package/dist/useWebMergeStyles/index.d.ts.map +1 -1
  30. package/dist/useWebMergeStyles/index.native.d.ts +5 -0
  31. package/dist/useWebMergeStyles/index.native.d.ts.map +1 -0
  32. package/package.json +11 -5
  33. package/src/globalLayoutStyles/gs.ts +390 -0
  34. package/src/index.ts +7 -0
  35. package/src/makeStyles/index.native.ts +44 -0
  36. package/src/makeStyles/index.ts +70 -0
  37. package/src/makeStyles/preprocess/index.ts +372 -0
  38. package/src/makeStyles/validate/index.ts +82 -0
  39. package/src/useNativeMergeStyles/index.native.ts +23 -0
  40. package/src/useNativeMergeStyles/index.ts +23 -0
  41. package/src/useStableMemo/index.ts +10 -0
  42. package/src/useStyles/index.ts +24 -0
  43. package/src/useWebMergeStyles/index.native.ts +16 -0
  44. package/src/useWebMergeStyles/index.ts +36 -0
  45. package/dist/StylingCache/index.d.ts +0 -13
  46. package/dist/StylingCache/index.d.ts.map +0 -1
@@ -3,14 +3,15 @@
3
3
  var ctDesignTheme = require('@cleartrip/ct-design-theme');
4
4
  var react = require('react');
5
5
  var css = require('@emotion/css');
6
+ require('@react-native/normalize-colors');
6
7
  var valueParser = require('postcss-value-parser');
7
8
 
8
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
10
 
10
11
  var valueParser__default = /*#__PURE__*/_interopDefault(valueParser);
11
12
 
12
- var useStableMemo = function (callback, deps) {
13
- return react.useMemo(function () {
13
+ const useStableMemo = (callback, deps) => {
14
+ return react.useMemo(() => {
14
15
  return callback();
15
16
  }, deps);
16
17
  };
@@ -20,17 +21,17 @@ function normalizeColor(color) {
20
21
  return color;
21
22
  }
22
23
  }
23
- var isWebColor = function (color) {
24
+ const isWebColor = (color) => {
24
25
  return color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;
25
26
  };
26
- var normalizeColorWrapper = function (color, opacity) {
27
+ const normalizeColorWrapper = (color, opacity = 1) => {
27
28
  if (color == null)
28
29
  return;
29
30
  if (typeof color === 'string' && isWebColor(color)) {
30
31
  return color;
31
32
  }
32
33
  };
33
- var colorProps = {
34
+ const colorProps = {
34
35
  backgroundColor: true,
35
36
  borderColor: true,
36
37
  borderTopColor: true,
@@ -42,7 +43,7 @@ var colorProps = {
42
43
  textDecorationColor: true,
43
44
  textShadowColor: true,
44
45
  };
45
- var unitlessNumbers = {
46
+ const unitlessNumbers = {
46
47
  animationIterationCount: true,
47
48
  aspectRatio: true,
48
49
  borderImageOutset: true,
@@ -90,16 +91,16 @@ var unitlessNumbers = {
90
91
  shadowOpacity: true,
91
92
  };
92
93
  function normalizeValueWithProperty(value, property) {
93
- var returnValue = value;
94
+ let returnValue = value;
94
95
  if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {
95
- returnValue = "".concat(value, "px");
96
+ returnValue = `${value}px`;
96
97
  }
97
98
  else if (property != null && colorProps[property]) {
98
99
  returnValue = normalizeColor(value);
99
100
  }
100
101
  return returnValue;
101
102
  }
102
- var warnedKeys = {};
103
+ const warnedKeys = {};
103
104
  function warnOnce(key, message) {
104
105
  if (process.env.NODE_ENV !== 'production') {
105
106
  if (warnedKeys[key]) {
@@ -109,50 +110,50 @@ function warnOnce(key, message) {
109
110
  warnedKeys[key] = true;
110
111
  }
111
112
  }
112
- var emptyObject = {};
113
- var defaultOffset = { height: 0, width: 0 };
114
- var createBoxShadowValue = function (style) {
115
- var shadowColor = style.shadowColor, shadowOffset = style.shadowOffset; style.shadowOpacity; var shadowRadius = style.shadowRadius;
116
- var _a = shadowOffset || defaultOffset, height = _a.height, width = _a.width;
117
- var offsetX = normalizeValueWithProperty(width);
118
- var offsetY = normalizeValueWithProperty(height);
119
- var blurRadius = normalizeValueWithProperty(shadowRadius || 0);
120
- var color = normalizeColorWrapper(shadowColor || 'black');
113
+ const emptyObject = {};
114
+ const defaultOffset = { height: 0, width: 0 };
115
+ const createBoxShadowValue = (style) => {
116
+ const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
117
+ const { height, width } = shadowOffset || defaultOffset;
118
+ const offsetX = normalizeValueWithProperty(width);
119
+ const offsetY = normalizeValueWithProperty(height);
120
+ const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
121
+ const color = normalizeColorWrapper(shadowColor || 'black', shadowOpacity);
121
122
  if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
122
- return "".concat(offsetX, " ").concat(offsetY, " ").concat(blurRadius, " ").concat(color);
123
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
123
124
  }
124
125
  };
125
- var createTextShadowValue = function (style) {
126
- var textShadowColor = style.textShadowColor, textShadowOffset = style.textShadowOffset, textShadowRadius = style.textShadowRadius;
127
- var _a = textShadowOffset || defaultOffset, height = _a.height, width = _a.width;
128
- var radius = textShadowRadius || 0;
129
- var offsetX = normalizeValueWithProperty(width);
130
- var offsetY = normalizeValueWithProperty(height);
131
- var blurRadius = normalizeValueWithProperty(radius);
132
- var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');
126
+ const createTextShadowValue = (style) => {
127
+ const { textShadowColor, textShadowOffset, textShadowRadius } = style;
128
+ const { height, width } = textShadowOffset || defaultOffset;
129
+ const radius = textShadowRadius || 0;
130
+ const offsetX = normalizeValueWithProperty(width);
131
+ const offsetY = normalizeValueWithProperty(height);
132
+ const blurRadius = normalizeValueWithProperty(radius);
133
+ const color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');
133
134
  if (color &&
134
135
  (height !== 0 || width !== 0 || radius !== 0) &&
135
136
  offsetX != null &&
136
137
  offsetY != null &&
137
138
  blurRadius != null) {
138
- return "".concat(offsetX, " ").concat(offsetY, " ").concat(blurRadius, " ").concat(color);
139
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
139
140
  }
140
141
  };
141
- var mapTransform = function (transform) {
142
- var type = Object.keys(transform)[0];
143
- var value = transform[type];
142
+ const mapTransform = (transform) => {
143
+ const type = Object.keys(transform)[0];
144
+ const value = transform[type];
144
145
  if (type === 'matrix' || type === 'matrix3d') {
145
- return "".concat(type, "(").concat(value.join(','), ")");
146
+ return `${type}(${value.join(',')})`;
146
147
  }
147
148
  else {
148
- var normalizedValue = normalizeValueWithProperty(value, type);
149
- return "".concat(type, "(").concat(normalizedValue, ")");
149
+ const normalizedValue = normalizeValueWithProperty(value, type);
150
+ return `${type}(${normalizedValue})`;
150
151
  }
151
152
  };
152
- var createTransformValue = function (value) {
153
+ const createTransformValue = (value) => {
153
154
  return value.map(mapTransform).join(' ');
154
155
  };
155
- var PROPERTIES_STANDARD = {
156
+ const PROPERTIES_STANDARD = {
156
157
  borderBottomEndRadius: 'borderEndEndRadius',
157
158
  borderBottomStartRadius: 'borderEndStartRadius',
158
159
  borderTopEndRadius: 'borderStartEndRadius',
@@ -174,41 +175,40 @@ var PROPERTIES_STANDARD = {
174
175
  paddingVertical: 'paddingBlock',
175
176
  start: 'insetInlineStart',
176
177
  };
177
- var ignoredProps = {
178
+ const ignoredProps = {
178
179
  elevation: true,
179
180
  overlayColor: true,
180
181
  resizeMode: true,
181
182
  tintColor: true,
182
183
  };
183
- var preprocess = function (originalStyle, options) {
184
- if (options === void 0) { options = {}; }
185
- var style = originalStyle || emptyObject;
186
- var nextStyle = {};
184
+ const preprocess = (originalStyle, options = {}) => {
185
+ const style = originalStyle || emptyObject;
186
+ const nextStyle = {};
187
187
  if ((options.shadow === true,
188
188
  style.shadowColor != null ||
189
189
  style.shadowOffset != null ||
190
190
  style.shadowOpacity != null ||
191
191
  style.shadowRadius != null)) {
192
- warnOnce('shadowStyles', "\"shadow*\" style props are deprecated. Use \"boxShadow\".");
193
- var boxShadowValue = createBoxShadowValue(style);
192
+ warnOnce('shadowStyles', `"shadow*" style props are deprecated. Use "boxShadow".`);
193
+ const boxShadowValue = createBoxShadowValue(style);
194
194
  if (boxShadowValue != null && nextStyle.boxShadow == null) {
195
- var boxShadow = style.boxShadow;
196
- var value = boxShadow ? "".concat(boxShadow, ", ").concat(boxShadowValue) : boxShadowValue;
195
+ const { boxShadow } = style;
196
+ const value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
197
197
  nextStyle.boxShadow = value;
198
198
  }
199
199
  }
200
200
  if ((options.textShadow === true && style.textShadowColor != null) ||
201
201
  style.textShadowOffset != null ||
202
202
  style.textShadowRadius != null) {
203
- warnOnce('textShadowStyles', "\"textShadow*\" style props are deprecated. Use \"textShadow\".");
204
- var textShadowValue = createTextShadowValue(style);
203
+ warnOnce('textShadowStyles', `"textShadow*" style props are deprecated. Use "textShadow".`);
204
+ const textShadowValue = createTextShadowValue(style);
205
205
  if (textShadowValue != null && nextStyle.textShadow == null) {
206
- var textShadow = style.textShadow;
207
- var value = textShadow ? "".concat(textShadow, ", ").concat(textShadowValue) : textShadowValue;
206
+ const { textShadow } = style;
207
+ const value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
208
208
  nextStyle.textShadow = value;
209
209
  }
210
210
  }
211
- for (var originalProp in style) {
211
+ for (const originalProp in style) {
212
212
  if (ignoredProps[originalProp] != null ||
213
213
  originalProp === 'shadowColor' ||
214
214
  originalProp === 'shadowOffset' ||
@@ -219,9 +219,9 @@ var preprocess = function (originalStyle, options) {
219
219
  originalProp === 'textShadowRadius') {
220
220
  continue;
221
221
  }
222
- var originalValue = style[originalProp];
223
- var prop = PROPERTIES_STANDARD[originalProp] || originalProp;
224
- var value = originalValue;
222
+ const originalValue = style[originalProp];
223
+ const prop = PROPERTIES_STANDARD[originalProp] || originalProp;
224
+ let value = originalValue;
225
225
  if (!Object.prototype.hasOwnProperty.call(style, originalProp) || (prop !== originalProp && style[prop] != null)) {
226
226
  continue;
227
227
  }
@@ -252,7 +252,7 @@ var preprocess = function (originalStyle, options) {
252
252
  return nextStyle;
253
253
  };
254
254
 
255
- var invalidShortforms = {
255
+ const invalidShortforms = {
256
256
  background: true,
257
257
  borderBottom: true,
258
258
  borderLeft: true,
@@ -263,7 +263,7 @@ var invalidShortforms = {
263
263
  outline: true,
264
264
  textDecoration: true,
265
265
  };
266
- var invalidMultiValueShortforms = {
266
+ const invalidMultiValueShortforms = {
267
267
  flex: true,
268
268
  margin: true,
269
269
  padding: true,
@@ -290,19 +290,19 @@ function error(message) {
290
290
  console.error(message);
291
291
  }
292
292
  function validate(obj) {
293
- for (var k in obj) {
294
- var prop = k.trim();
295
- var value = obj[prop];
296
- var isInvalid = false;
293
+ for (const k in obj) {
294
+ const prop = k.trim();
295
+ const value = obj[prop];
296
+ let isInvalid = false;
297
297
  if (value === null) {
298
298
  continue;
299
299
  }
300
300
  if (typeof value === 'string' && value.indexOf('!important') > -1) {
301
- error("Invalid style declaration \"".concat(prop, ":").concat(value, "\". Values cannot include \"!important\""));
301
+ error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
302
302
  isInvalid = true;
303
303
  }
304
304
  else {
305
- var suggestion = '';
305
+ let suggestion = '';
306
306
  if (prop === 'animation' || prop === 'animationName') {
307
307
  suggestion = 'Did you mean "animationKeyframes"?';
308
308
  isInvalid = true;
@@ -317,12 +317,12 @@ function validate(obj) {
317
317
  }
318
318
  else if (invalidMultiValueShortforms[prop]) {
319
319
  if (typeof value === 'string' && valueParser__default.default(value).nodes.length > 1) {
320
- suggestion = "Value is \"".concat(value, "\" but only single values are supported.");
320
+ suggestion = `Value is "${value}" but only single values are supported.`;
321
321
  isInvalid = true;
322
322
  }
323
323
  }
324
324
  if (suggestion !== '') {
325
- error("Invalid style property of \"".concat(prop, "\". ").concat(suggestion));
325
+ error(`Invalid style property of "${prop}". ${suggestion}`);
326
326
  }
327
327
  }
328
328
  if (isInvalid) {
@@ -331,73 +331,46 @@ function validate(obj) {
331
331
  }
332
332
  }
333
333
 
334
- var makeStyles = function (styleFactory, customTheme) {
335
- var theme = customTheme || ctDesignTheme.ThemeManager.get();
336
- var styles = styleFactory(theme);
337
- for (var _i = 0, _a = Object.entries(styles); _i < _a.length; _i++) {
338
- var _b = _a[_i], key = _b[0], value = _b[1];
339
- var updatedValue = typeof value === 'function' ? value(theme) : value;
334
+ function makeStyles(styleFactory, customTheme) {
335
+ const theme = customTheme || ctDesignTheme.ThemeManager.get();
336
+ const styles = styleFactory(theme);
337
+ for (const [key, value] of Object.entries(styles)) {
338
+ const updatedValue = typeof value === 'function' ? value(theme) : value;
340
339
  styles[key] = updatedValue;
341
340
  }
342
- var classes = {};
343
- for (var _c = 0, _d = Object.entries(styles); _c < _d.length; _c++) {
344
- var _e = _d[_c], key = _e[0], value = _e[1];
345
- var defaultPreprocessOptions = { shadow: true, textShadow: true };
341
+ const classes = {};
342
+ for (const [key, value] of Object.entries(styles)) {
343
+ const defaultPreprocessOptions = { shadow: true, textShadow: true };
346
344
  validate(value);
347
- var updatedStyle = preprocess(value, defaultPreprocessOptions);
345
+ const updatedStyle = preprocess(value, defaultPreprocessOptions);
348
346
  classes[key] = css.css(updatedStyle);
349
347
  }
350
348
  return classes;
351
- };
349
+ }
352
350
 
353
- var useStyles = function (styleFactory, dep) {
354
- var theme = ctDesignTheme.useTheme();
355
- return useStableMemo(function () {
356
- var adaptedFactory = function (providedTheme) {
351
+ function useStyles(styleFactory, dep) {
352
+ const theme = ctDesignTheme.useTheme();
353
+ return useStableMemo(() => {
354
+ const adaptedFactory = (providedTheme) => {
357
355
  return styleFactory(providedTheme);
358
356
  };
359
357
  return makeStyles(adaptedFactory, theme);
360
358
  }, dep);
361
- };
362
-
363
- var StylingCacheManager = (function () {
364
- function StylingCacheManager() {
365
- if (StylingCacheManager.instance) {
366
- throw new Error('You can only create one instance!');
367
- }
368
- StylingCacheManager.instance = this;
369
- this.cache = new WeakMap();
370
- }
371
- StylingCacheManager.prototype.set = function (key, value) {
372
- this.cache.set(key, value);
373
- };
374
- StylingCacheManager.prototype.get = function (key) {
375
- return this.cache.get(key);
376
- };
377
- return StylingCacheManager;
378
- }());
379
- var StylingCache = Object.freeze(new StylingCacheManager());
359
+ }
380
360
 
381
- var useWebMergeStyles = function (styles, deps) {
382
- return useStableMemo(function () {
383
- var classes = [];
384
- styles.forEach(function (style) {
361
+ const useWebMergeStyles = (styles, deps) => {
362
+ return useStableMemo(() => {
363
+ const classes = [];
364
+ styles.filter(Boolean).forEach((style) => {
385
365
  if (typeof style === 'string') {
386
366
  classes.push(style);
387
367
  }
388
368
  else {
389
369
  if (style) {
390
- var _style = StylingCache.get(style);
391
- if (_style) {
392
- classes.push(_style);
393
- }
394
- else {
395
- var defaultPreprocessOptions = { shadow: true, textShadow: true };
396
- var preprocessedStyle = preprocess(style, defaultPreprocessOptions);
397
- var emotionClass = css.css(preprocessedStyle);
398
- StylingCache.set(style, emotionClass);
399
- classes.push(emotionClass);
400
- }
370
+ const defaultPreprocessOptions = { shadow: true, textShadow: true };
371
+ const preprocessedStyle = preprocess(style, defaultPreprocessOptions);
372
+ const emotionClass = css.css(preprocessedStyle);
373
+ classes.push(emotionClass);
401
374
  }
402
375
  }
403
376
  });
@@ -405,7 +378,330 @@ var useWebMergeStyles = function (styles, deps) {
405
378
  }, deps);
406
379
  };
407
380
 
381
+ const getStyles = (styles) => {
382
+ return Array.isArray(styles) && styles.every((style) => typeof style !== 'string');
383
+ };
384
+ function useNativeMergeStyles(styles, deps) {
385
+ return useStableMemo(() => {
386
+ if (getStyles(styles)) {
387
+ return null;
388
+ }
389
+ }, deps);
390
+ }
391
+
392
+ const gs = makeStyles((theme) => {
393
+ const { spacing } = theme;
394
+ return {
395
+ flex: { display: 'flex' },
396
+ 'flex-1': { flex: 1 },
397
+ 'flex-row': { flexDirection: 'row' },
398
+ 'flex-column': { flexDirection: 'column' },
399
+ 'flex-row-reverse': { flexDirection: 'row-reverse' },
400
+ 'flex-column-reverse': { flexDirection: 'column-reverse' },
401
+ 'fw-400': { fontWeight: '400' },
402
+ 'fw-500': { fontWeight: '500' },
403
+ 'fw-600': { fontWeight: '600' },
404
+ 'flex-nowrap': { flexWrap: 'nowrap' },
405
+ 'flex-wrap': { flexWrap: 'wrap' },
406
+ 'flex-wrap-reverse': { flexWrap: 'wrap-reverse' },
407
+ 'flex-no-shrink': { flexShrink: spacing[0] },
408
+ 'flex-stretch': { alignItems: 'stretch' },
409
+ 'flex-top': { alignItems: 'flex-start' },
410
+ 'flex-middle': { alignItems: 'center' },
411
+ 'flex-bottom': { alignItems: 'flex-end' },
412
+ 'flex-baseline': { alignItems: 'baseline' },
413
+ 'flex-wrap-stretch': { alignContent: 'stretch' },
414
+ 'flex-wrap-top': { alignContent: 'flex-start' },
415
+ 'flex-wrap-middle': { alignContent: 'center' },
416
+ 'flex-wrap-bottom': { alignContent: 'flex-end' },
417
+ 'flex-wrap-between': { alignContent: 'space-between' },
418
+ 'flex-wrap-around': { alignContent: 'space-around' },
419
+ 'flex-left': { justifyContent: 'flex-start' },
420
+ 'flex-start': { justifyContent: 'flex-start' },
421
+ 'flex-end': { justifyContent: 'flex-end' },
422
+ 'flex-right': { justifyContent: 'flex-end' },
423
+ 'flex-center': { justifyContent: 'center' },
424
+ 'flex-between': { justifyContent: 'space-between' },
425
+ 'flex-around': { justifyContent: 'space-around' },
426
+ 'flex-basis-auto': { flexBasis: 'auto' },
427
+ 'flex-rg-1': { rowGap: spacing[1] },
428
+ 'flex-rg-2': { rowGap: spacing[2] },
429
+ 'flex-rg-3': { rowGap: spacing[3] },
430
+ 'flex-rg-4': { rowGap: spacing[4] },
431
+ 'flex-rg-6': { rowGap: spacing[6] },
432
+ 'flex-rg-7': { rowGap: spacing[7] },
433
+ 'flex-rg-8': { rowGap: spacing[8] },
434
+ 'flex-rg-9': { rowGap: spacing[9] },
435
+ 'flex-rg-10': { rowGap: spacing[10] },
436
+ 'flex-cg-1': { columnGap: spacing[1] },
437
+ 'flex-cg-2': { columnGap: spacing[2] },
438
+ 'flex-cg-3': { columnGap: spacing[3] },
439
+ 'flex-cg-4': { columnGap: spacing[4] },
440
+ 'flex-cg-6': { columnGap: spacing[6] },
441
+ 'flex-gap-0.5': { gap: spacing['0.5'] },
442
+ 'flex-gap-1': { gap: spacing[1] },
443
+ 'flex-gap-1.5': { gap: spacing['1.5'] },
444
+ 'flex-gap-2': { gap: spacing[2] },
445
+ 'flex-gap-3': { gap: spacing[3] },
446
+ 'flex-gap-4': { gap: spacing[4] },
447
+ 'flex-gap-6': { gap: spacing[6] },
448
+ 'w-0p': { width: '0%' },
449
+ 'w-10p': { width: '10%' },
450
+ 'w-20p': { width: '20%' },
451
+ 'w-30p': { width: '30%' },
452
+ 'w-40p': { width: '40%' },
453
+ 'w-50p': { width: '50%' },
454
+ 'w-60p': { width: '60%' },
455
+ 'w-70p': { width: '70%' },
456
+ 'w-80p': { width: '80%' },
457
+ 'w-90p': { width: '90%' },
458
+ 'w-100p': { width: '100%' },
459
+ 'w-0': { width: spacing[0] },
460
+ 'w-1': { width: spacing[1] },
461
+ 'w-2': { width: spacing[2] },
462
+ 'w-3': { width: spacing[3] },
463
+ 'w-4': { width: spacing[4] },
464
+ 'w-5': { width: spacing[5] },
465
+ 'w-6': { width: spacing[6] },
466
+ 'w-7': { width: spacing[7] },
467
+ 'w-8': { width: spacing[8] },
468
+ 'w-9': { width: spacing[9] },
469
+ 'w-10': { width: spacing[10] },
470
+ 'w-14': { width: spacing[14] },
471
+ 'w-16': { width: spacing[16] },
472
+ 't-0': { top: 0 },
473
+ 'b-0': { bottom: 0 },
474
+ 'l-0': { left: 0 },
475
+ 'h-0p': { height: '0%' },
476
+ 'h-10p': { height: '10%' },
477
+ 'h-20p': { height: '20%' },
478
+ 'h-30p': { height: '30%' },
479
+ 'h-40p': { height: '40%' },
480
+ 'h-50p': { height: '50%' },
481
+ 'h-60p': { height: '60%' },
482
+ 'h-70p': { height: '70%' },
483
+ 'h-80p': { height: '80%' },
484
+ 'h-90p': { height: '90%' },
485
+ 'h-100p': { height: '100%' },
486
+ 'h-0': { height: spacing[0] },
487
+ 'h-1': { height: spacing[1] },
488
+ 'h-2': { height: spacing[2] },
489
+ 'h-3': { height: spacing[3] },
490
+ 'h-4': { height: spacing[4] },
491
+ 'h-5': { height: spacing[5] },
492
+ 'h-6': { height: spacing[6] },
493
+ 'h-7': { height: spacing[7] },
494
+ 'h-8': { height: spacing[8] },
495
+ 'h-9': { height: spacing[9] },
496
+ 'h-10': { height: spacing[10] },
497
+ 'h-14': { height: spacing[14] },
498
+ 'h-16': { height: spacing[16] },
499
+ 'm-0': { margin: spacing[0] },
500
+ 'm-1': { margin: spacing[1] },
501
+ 'm-2': { margin: spacing[2] },
502
+ 'm-3': { margin: spacing[3] },
503
+ 'm-4': { margin: spacing[4] },
504
+ 'm-5': { margin: spacing[5] },
505
+ 'm-6': { margin: spacing[6] },
506
+ 'm-7': { margin: spacing[7] },
507
+ 'm-8': { margin: spacing[8] },
508
+ 'm-9': { margin: spacing[9] },
509
+ 'm-10': { margin: spacing[10] },
510
+ 'mt-0': { marginTop: spacing[0] },
511
+ 'mt-1': { marginTop: spacing[1] },
512
+ 'mt-2': { marginTop: spacing[2] },
513
+ 'mt-3': { marginTop: spacing[3] },
514
+ 'mt-4': { marginTop: spacing[4] },
515
+ 'mt-5': { marginTop: spacing[5] },
516
+ 'mt-6': { marginTop: spacing[6] },
517
+ 'mt-7': { marginTop: spacing[7] },
518
+ 'mt-8': { marginTop: spacing[8] },
519
+ 'mt-9': { marginTop: spacing[9] },
520
+ 'mt-10': { marginTop: spacing[10] },
521
+ 'mb-0': { marginBottom: spacing[0] },
522
+ 'mb-1': { marginBottom: spacing[1] },
523
+ 'mb-2': { marginBottom: spacing[2] },
524
+ 'mb-3': { marginBottom: spacing[3] },
525
+ 'mb-4': { marginBottom: spacing[4] },
526
+ 'mb-5': { marginBottom: spacing[5] },
527
+ 'mb-6': { marginBottom: spacing[6] },
528
+ 'mb-7': { marginBottom: spacing[7] },
529
+ 'mb-8': { marginBottom: spacing[8] },
530
+ 'mb-9': { marginBottom: spacing[9] },
531
+ 'mb-10': { marginBottom: spacing[10] },
532
+ 'ml-0': { marginLeft: spacing[0] },
533
+ 'ml-1': { marginLeft: spacing[1] },
534
+ 'ml-2': { marginLeft: spacing[2] },
535
+ 'ml-3': { marginLeft: spacing[3] },
536
+ 'ml-4': { marginLeft: spacing[4] },
537
+ 'ml-5': { marginLeft: spacing[5] },
538
+ 'ml-6': { marginLeft: spacing[6] },
539
+ 'ml-7': { marginLeft: spacing[7] },
540
+ 'ml-8': { marginLeft: spacing[8] },
541
+ 'ml-9': { marginLeft: spacing[9] },
542
+ 'ml-10': { marginLeft: spacing[10] },
543
+ 'mr-0': { marginRight: spacing[0] },
544
+ 'mr-1': { marginRight: spacing[1] },
545
+ 'mr-1.5': { marginRight: spacing['1.5'] },
546
+ 'mr-2': { marginRight: spacing[2] },
547
+ 'mr-3': { marginRight: spacing[3] },
548
+ 'mr-4': { marginRight: spacing[4] },
549
+ 'mr-5': { marginRight: spacing[5] },
550
+ 'mr-6': { marginRight: spacing[6] },
551
+ 'mr-7': { marginRight: spacing[7] },
552
+ 'mr-8': { marginRight: spacing[8] },
553
+ 'mr-9': { marginRight: spacing[9] },
554
+ 'mr-10': { marginRight: spacing[10] },
555
+ 'mx-0': { marginHorizontal: spacing[0] },
556
+ 'mx-1': { marginHorizontal: spacing[1] },
557
+ 'mx-2': { marginHorizontal: spacing[2] },
558
+ 'mx-3': { marginHorizontal: spacing[3] },
559
+ 'mx-4': { marginHorizontal: spacing[4] },
560
+ 'mx-5': { marginHorizontal: spacing[5] },
561
+ 'mx-6': { marginHorizontal: spacing[6] },
562
+ 'mx-7': { marginHorizontal: spacing[7] },
563
+ 'mx-8': { marginHorizontal: spacing[8] },
564
+ 'mx-9': { marginHorizontal: spacing[9] },
565
+ 'mx-10': { marginHorizontal: spacing[10] },
566
+ 'my-0': { marginVertical: spacing[0] },
567
+ 'my-1': { marginVertical: spacing[1] },
568
+ 'my-2': { marginVertical: spacing[2] },
569
+ 'my-3': { marginVertical: spacing[3] },
570
+ 'my-4': { marginVertical: spacing[4] },
571
+ 'my-5': { marginVertical: spacing[5] },
572
+ 'my-6': { marginVertical: spacing[6] },
573
+ 'my-7': { marginVertical: spacing[7] },
574
+ 'my-8': { marginVertical: spacing[8] },
575
+ 'my-9': { marginVertical: spacing[9] },
576
+ 'my-10': { marginVertical: spacing[10] },
577
+ 'p-0': { padding: spacing[0] },
578
+ 'p-1': { padding: spacing[1] },
579
+ 'p-2': { padding: spacing[2] },
580
+ 'p-3': { padding: spacing[3] },
581
+ 'p-4': { padding: spacing[4] },
582
+ 'p-5': { padding: spacing[5] },
583
+ 'p-6': { padding: spacing[6] },
584
+ 'p-7': { padding: spacing[7] },
585
+ 'p-8': { padding: spacing[8] },
586
+ 'p-9': { padding: spacing[9] },
587
+ 'p-10': { padding: spacing[10] },
588
+ 'pt-0': { paddingTop: spacing[0] },
589
+ 'pt-1': { paddingTop: spacing[1] },
590
+ 'pt-2': { paddingTop: spacing[2] },
591
+ 'pt-3': { paddingTop: spacing[3] },
592
+ 'pt-4': { paddingTop: spacing[4] },
593
+ 'pt-5': { paddingTop: spacing[5] },
594
+ 'pt-6': { paddingTop: spacing[6] },
595
+ 'pt-7': { paddingTop: spacing[7] },
596
+ 'pt-8': { paddingTop: spacing[8] },
597
+ 'pt-9': { paddingTop: spacing[9] },
598
+ 'pt-10': { paddingTop: spacing[10] },
599
+ 'pt-16': { paddingTop: spacing[16] },
600
+ 'pt-12': { paddingTop: spacing[12] },
601
+ 'pb-0': { paddingBottom: spacing[0] },
602
+ 'pb-1': { paddingBottom: spacing[1] },
603
+ 'pb-2': { paddingBottom: spacing[2] },
604
+ 'pb-3': { paddingBottom: spacing[3] },
605
+ 'pb-4': { paddingBottom: spacing[4] },
606
+ 'pb-5': { paddingBottom: spacing[5] },
607
+ 'pb-6': { paddingBottom: spacing[6] },
608
+ 'pb-7': { paddingBottom: spacing[7] },
609
+ 'pb-8': { paddingBottom: spacing[8] },
610
+ 'pb-9': { paddingBottom: spacing[9] },
611
+ 'pb-10': { paddingBottom: spacing[10] },
612
+ 'pl-0': { paddingLeft: spacing[0] },
613
+ 'pl-1': { paddingLeft: spacing[1] },
614
+ 'pl-2': { paddingLeft: spacing[2] },
615
+ 'pl-3': { paddingLeft: spacing[3] },
616
+ 'pl-4': { paddingLeft: spacing[4] },
617
+ 'pl-5': { paddingLeft: spacing[5] },
618
+ 'pl-6': { paddingLeft: spacing[6] },
619
+ 'pl-7': { paddingLeft: spacing[7] },
620
+ 'pl-8': { paddingLeft: spacing[8] },
621
+ 'pl-9': { paddingLeft: spacing[9] },
622
+ 'pl-10': { paddingLeft: spacing[10] },
623
+ 'pr-0': { paddingRight: spacing[0] },
624
+ 'pr-1': { paddingRight: spacing[1] },
625
+ 'pr-2': { paddingRight: spacing[2] },
626
+ 'pr-3': { paddingRight: spacing[3] },
627
+ 'pr-4': { paddingRight: spacing[4] },
628
+ 'pr-5': { paddingRight: spacing[5] },
629
+ 'pr-6': { paddingRight: spacing[6] },
630
+ 'pr-7': { paddingRight: spacing[7] },
631
+ 'pr-8': { paddingRight: spacing[8] },
632
+ 'pr-9': { paddingRight: spacing[9] },
633
+ 'pr-10': { paddingRight: spacing[10] },
634
+ 'px-0': { paddingHorizontal: spacing[0] },
635
+ 'px-0.5': { paddingHorizontal: spacing['0.5'] },
636
+ 'px-1': { paddingHorizontal: spacing[1] },
637
+ 'px-2': { paddingHorizontal: spacing[2] },
638
+ 'px-3': { paddingHorizontal: spacing[3] },
639
+ 'px-4': { paddingHorizontal: spacing[4] },
640
+ 'px-5': { paddingHorizontal: spacing[5] },
641
+ 'px-6': { paddingHorizontal: spacing[6] },
642
+ 'px-7': { paddingHorizontal: spacing[7] },
643
+ 'px-8': { paddingHorizontal: spacing[8] },
644
+ 'px-9': { paddingHorizontal: spacing[9] },
645
+ 'px-10': { paddingHorizontal: spacing[10] },
646
+ 'py-0': { paddingVertical: spacing[0] },
647
+ 'py-0.5': { paddingVertical: spacing['0.5'] },
648
+ 'py-1': { paddingVertical: spacing[1] },
649
+ 'py-2': { paddingVertical: spacing[2] },
650
+ 'py-3': { paddingVertical: spacing[3] },
651
+ 'py-4': { paddingVertical: spacing[4] },
652
+ 'py-5': { paddingVertical: spacing[5] },
653
+ 'py-6': { paddingVertical: spacing[6] },
654
+ 'py-7': { paddingVertical: spacing[7] },
655
+ 'py-8': { paddingVertical: spacing[8] },
656
+ 'py-9': { paddingVertical: spacing[9] },
657
+ 'py-10': { paddingVertical: spacing[10] },
658
+ 'br-50p': { borderRadius: 50 },
659
+ 'br-4': { borderRadius: 4 },
660
+ 'br-8': { borderRadius: 8 },
661
+ 'br-12': { borderRadius: 12 },
662
+ 'br-16': { borderRadius: 16 },
663
+ 'br-20': { borderRadius: 20 },
664
+ 'z-0': { zIndex: 0 },
665
+ 'z-1': { zIndex: 1 },
666
+ 'z-2': { zIndex: 2 },
667
+ 'z-5': { zIndex: 5 },
668
+ 'z-10': { zIndex: 10 },
669
+ 'z-100': { zIndex: 100 },
670
+ 'bg-neutral-100': { backgroundColor: '#ffffff' },
671
+ 'p-relative': { position: 'relative' },
672
+ 'p-absolute': { position: 'absolute' },
673
+ 'bs-shadow-top-white': {
674
+ shadowColor: '#1a1a1a',
675
+ shadowOffset: { width: 0, height: -4 },
676
+ shadowOpacity: 0.08,
677
+ shadowRadius: 16,
678
+ elevation: 5,
679
+ },
680
+ 'bs-shadow-bottom-white': {
681
+ shadowColor: '#1a1a1a',
682
+ shadowOffset: { width: 0, height: 2 },
683
+ shadowOpacity: 0.08,
684
+ shadowRadius: 16,
685
+ elevation: 5,
686
+ },
687
+ 'o-hidden': {
688
+ overflow: 'hidden',
689
+ },
690
+ 'ta-c': {
691
+ textAlign: 'center',
692
+ },
693
+ 'ta-l': {
694
+ textAlign: 'left',
695
+ },
696
+ 'ta-r': {
697
+ textAlign: 'right',
698
+ },
699
+ };
700
+ });
701
+
702
+ exports.gs = gs;
408
703
  exports.makeStyles = makeStyles;
704
+ exports.useNativeMergeStyles = useNativeMergeStyles;
409
705
  exports.useStyles = useStyles;
410
706
  exports.useWebMergeStyles = useWebMergeStyles;
411
707
  //# sourceMappingURL=ct-design-styleManager.cjs.js.map