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