@cleartrip/talos-button 11.0.0 → 11.1.1

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.
@@ -2140,55 +2140,26 @@
2140
2140
  ValueParser.stringify = stringify;
2141
2141
  var lib = ValueParser;
2142
2142
 
2143
- /******************************************************************************
2144
- Copyright (c) Microsoft Corporation.
2145
-
2146
- Permission to use, copy, modify, and/or distribute this software for any
2147
- purpose with or without fee is hereby granted.
2148
-
2149
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2150
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2151
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2152
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2153
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2154
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2155
- PERFORMANCE OF THIS SOFTWARE.
2156
- ***************************************************************************** */
2157
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
2158
-
2159
- function __rest(s, e) {
2160
- var t = {};
2161
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2162
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2163
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2164
- }
2165
- return t;
2166
- }
2167
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2168
- var e = new Error(message);
2169
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2170
- };
2171
-
2172
- const useStableMemo$1 = (callback, deps) => {
2143
+ const useStableMemo = (callback, deps) => {
2173
2144
  return React.useMemo(() => {
2174
2145
  return callback();
2175
2146
  }, deps);
2176
2147
  };
2177
- function normalizeColor$1(color) {
2148
+ function normalizeColor(color) {
2178
2149
  {
2179
2150
  return color;
2180
2151
  }
2181
2152
  }
2182
- const isWebColor$1 = color => {
2153
+ const isWebColor = color => {
2183
2154
  return color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;
2184
2155
  };
2185
- const normalizeColorWrapper$1 = (color, opacity = 1) => {
2156
+ const normalizeColorWrapper = (color, opacity = 1) => {
2186
2157
  if (color == null) return;
2187
- if (typeof color === 'string' && isWebColor$1(color)) {
2158
+ if (typeof color === 'string' && isWebColor(color)) {
2188
2159
  return color;
2189
2160
  }
2190
2161
  };
2191
- const colorProps$1 = {
2162
+ const colorProps = {
2192
2163
  backgroundColor: true,
2193
2164
  borderColor: true,
2194
2165
  borderTopColor: true,
@@ -2200,7 +2171,7 @@
2200
2171
  textDecorationColor: true,
2201
2172
  textShadowColor: true
2202
2173
  };
2203
- const unitlessNumbers$1 = {
2174
+ const unitlessNumbers = {
2204
2175
  animationIterationCount: true,
2205
2176
  aspectRatio: true,
2206
2177
  borderImageOutset: true,
@@ -2247,21 +2218,21 @@
2247
2218
  scaleZ: true,
2248
2219
  shadowOpacity: true
2249
2220
  };
2250
- function normalizeValueWithProperty$1(value, property) {
2221
+ function normalizeValueWithProperty(value, property) {
2251
2222
  let returnValue = value;
2252
- if ((property == null || !unitlessNumbers$1[property]) && typeof value === 'number') {
2223
+ if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {
2253
2224
  returnValue = `${value}px`;
2254
- } else if (property != null && colorProps$1[property]) {
2255
- returnValue = normalizeColor$1(value);
2225
+ } else if (property != null && colorProps[property]) {
2226
+ returnValue = normalizeColor(value);
2256
2227
  }
2257
2228
  return returnValue;
2258
2229
  }
2259
- const emptyObject$1 = {};
2260
- const defaultOffset$1 = {
2230
+ const emptyObject = {};
2231
+ const defaultOffset = {
2261
2232
  height: 0,
2262
2233
  width: 0
2263
2234
  };
2264
- const createBoxShadowValue$1 = style => {
2235
+ const createBoxShadowValue = style => {
2265
2236
  const {
2266
2237
  shadowColor,
2267
2238
  shadowOffset,
@@ -2271,16 +2242,16 @@
2271
2242
  const {
2272
2243
  height,
2273
2244
  width
2274
- } = shadowOffset || defaultOffset$1;
2275
- const offsetX = normalizeValueWithProperty$1(width);
2276
- const offsetY = normalizeValueWithProperty$1(height);
2277
- const blurRadius = normalizeValueWithProperty$1(shadowRadius || 0);
2278
- const color = normalizeColorWrapper$1(shadowColor || 'black', shadowOpacity);
2245
+ } = shadowOffset || defaultOffset;
2246
+ const offsetX = normalizeValueWithProperty(width);
2247
+ const offsetY = normalizeValueWithProperty(height);
2248
+ const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
2249
+ const color = normalizeColorWrapper(shadowColor || 'black', shadowOpacity);
2279
2250
  if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
2280
2251
  return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
2281
2252
  }
2282
2253
  };
2283
- const createTextShadowValue$1 = style => {
2254
+ const createTextShadowValue = style => {
2284
2255
  const {
2285
2256
  textShadowColor,
2286
2257
  textShadowOffset,
@@ -2289,30 +2260,30 @@
2289
2260
  const {
2290
2261
  height,
2291
2262
  width
2292
- } = textShadowOffset || defaultOffset$1;
2263
+ } = textShadowOffset || defaultOffset;
2293
2264
  const radius = textShadowRadius || 0;
2294
- const offsetX = normalizeValueWithProperty$1(width);
2295
- const offsetY = normalizeValueWithProperty$1(height);
2296
- const blurRadius = normalizeValueWithProperty$1(radius);
2297
- const color = normalizeValueWithProperty$1(textShadowColor, 'textShadowColor');
2265
+ const offsetX = normalizeValueWithProperty(width);
2266
+ const offsetY = normalizeValueWithProperty(height);
2267
+ const blurRadius = normalizeValueWithProperty(radius);
2268
+ const color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');
2298
2269
  if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
2299
2270
  return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
2300
2271
  }
2301
2272
  };
2302
- const mapTransform$1 = transform => {
2273
+ const mapTransform = transform => {
2303
2274
  const type = Object.keys(transform)[0];
2304
2275
  const value = transform[type];
2305
2276
  if (type === 'matrix' || type === 'matrix3d') {
2306
2277
  return `${type}(${value.join(',')})`;
2307
2278
  } else {
2308
- const normalizedValue = normalizeValueWithProperty$1(value, type);
2279
+ const normalizedValue = normalizeValueWithProperty(value, type);
2309
2280
  return `${type}(${normalizedValue})`;
2310
2281
  }
2311
2282
  };
2312
- const createTransformValue$1 = value => {
2313
- return value.map(mapTransform$1).join(' ');
2283
+ const createTransformValue = value => {
2284
+ return value.map(mapTransform).join(' ');
2314
2285
  };
2315
- const PROPERTIES_STANDARD$1 = {
2286
+ const PROPERTIES_STANDARD = {
2316
2287
  borderBottomEndRadius: 'borderEndEndRadius',
2317
2288
  borderBottomStartRadius: 'borderEndStartRadius',
2318
2289
  borderTopEndRadius: 'borderStartEndRadius',
@@ -2334,13 +2305,13 @@
2334
2305
  paddingVertical: 'paddingBlock',
2335
2306
  start: 'insetInlineStart'
2336
2307
  };
2337
- const ignoredProps$1 = {
2308
+ const ignoredProps = {
2338
2309
  elevation: true,
2339
2310
  overlayColor: true,
2340
2311
  resizeMode: true,
2341
2312
  tintColor: true
2342
2313
  };
2343
- function normalizePointerEventsStyle$1(value) {
2314
+ function normalizePointerEventsStyle(value) {
2344
2315
  if (value === 'auto' || value === 'none') {
2345
2316
  return value;
2346
2317
  }
@@ -2349,11 +2320,11 @@
2349
2320
  }
2350
2321
  return undefined;
2351
2322
  }
2352
- const preprocess$1 = (originalStyle, options = {}) => {
2353
- const style = originalStyle || emptyObject$1;
2323
+ const preprocess = (originalStyle, options = {}) => {
2324
+ const style = originalStyle || emptyObject;
2354
2325
  const nextStyle = {};
2355
2326
  if (options.shadow === true, style.shadowColor != null || style.shadowOffset != null || style.shadowOpacity != null || style.shadowRadius != null) {
2356
- const boxShadowValue = createBoxShadowValue$1(style);
2327
+ const boxShadowValue = createBoxShadowValue(style);
2357
2328
  if (boxShadowValue != null && nextStyle.boxShadow == null) {
2358
2329
  const {
2359
2330
  boxShadow
@@ -2363,7 +2334,7 @@
2363
2334
  }
2364
2335
  }
2365
2336
  if (options.textShadow === true && style.textShadowColor != null || style.textShadowOffset != null || style.textShadowRadius != null) {
2366
- const textShadowValue = createTextShadowValue$1(style);
2337
+ const textShadowValue = createTextShadowValue(style);
2367
2338
  if (textShadowValue != null && nextStyle.textShadow == null) {
2368
2339
  const {
2369
2340
  textShadow
@@ -2373,14 +2344,14 @@
2373
2344
  }
2374
2345
  }
2375
2346
  for (const originalProp in style) {
2376
- if (ignoredProps$1[originalProp] != null || originalProp === 'shadowColor' || originalProp === 'shadowOffset' || originalProp === 'shadowOpacity' || originalProp === 'shadowRadius' || originalProp === 'textShadowColor' || originalProp === 'textShadowOffset' || originalProp === 'textShadowRadius') {
2347
+ if (ignoredProps[originalProp] != null || originalProp === 'shadowColor' || originalProp === 'shadowOffset' || originalProp === 'shadowOpacity' || originalProp === 'shadowRadius' || originalProp === 'textShadowColor' || originalProp === 'textShadowOffset' || originalProp === 'textShadowRadius') {
2377
2348
  continue;
2378
2349
  }
2379
2350
  const originalValue = style[originalProp];
2380
- const prop = PROPERTIES_STANDARD$1[originalProp] || originalProp;
2351
+ const prop = PROPERTIES_STANDARD[originalProp] || originalProp;
2381
2352
  let value = originalValue;
2382
2353
  if (prop === 'pointerEvents') {
2383
- const normalized = normalizePointerEventsStyle$1(originalValue);
2354
+ const normalized = normalizePointerEventsStyle(originalValue);
2384
2355
  if (normalized != null) {
2385
2356
  nextStyle.pointerEvents = normalized;
2386
2357
  }
@@ -2402,16 +2373,16 @@
2402
2373
  }
2403
2374
  } else if (prop === 'transform') {
2404
2375
  if (Array.isArray(value)) {
2405
- value = createTransformValue$1(value);
2376
+ value = createTransformValue(value);
2406
2377
  }
2407
2378
  nextStyle.transform = value;
2408
2379
  } else {
2409
- nextStyle[prop] = normalizeValueWithProperty$1(value, prop);
2380
+ nextStyle[prop] = normalizeValueWithProperty(value, prop);
2410
2381
  }
2411
2382
  }
2412
2383
  return nextStyle;
2413
2384
  };
2414
- const invalidShortforms$1 = {
2385
+ const invalidShortforms = {
2415
2386
  background: true,
2416
2387
  borderBottom: true,
2417
2388
  borderLeft: true,
@@ -2422,7 +2393,7 @@
2422
2393
  outline: true,
2423
2394
  textDecoration: true
2424
2395
  };
2425
- const invalidMultiValueShortforms$1 = {
2396
+ const invalidMultiValueShortforms = {
2426
2397
  flex: true,
2427
2398
  margin: true,
2428
2399
  padding: true,
@@ -2445,10 +2416,10 @@
2445
2416
  overscrollBehavior: true,
2446
2417
  backgroundPosition: true
2447
2418
  };
2448
- function error$1(message) {
2419
+ function error(message) {
2449
2420
  console.error(message);
2450
2421
  }
2451
- function validate$1(obj) {
2422
+ function validate(obj) {
2452
2423
  for (const k in obj) {
2453
2424
  const prop = k.trim();
2454
2425
  const value = obj[prop];
@@ -2457,7 +2428,7 @@
2457
2428
  continue;
2458
2429
  }
2459
2430
  if (typeof value === 'string' && value.indexOf('!important') > -1) {
2460
- error$1(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
2431
+ error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
2461
2432
  isInvalid = true;
2462
2433
  } else {
2463
2434
  let suggestion = '';
@@ -2467,17 +2438,17 @@
2467
2438
  } else if (prop === 'direction') {
2468
2439
  suggestion = 'Did you mean "writingDirection"?';
2469
2440
  isInvalid = true;
2470
- } else if (invalidShortforms$1[prop]) {
2441
+ } else if (invalidShortforms[prop]) {
2471
2442
  suggestion = 'Please use long-form properties.';
2472
2443
  isInvalid = true;
2473
- } else if (invalidMultiValueShortforms$1[prop]) {
2444
+ } else if (invalidMultiValueShortforms[prop]) {
2474
2445
  if (typeof value === 'string' && lib(value).nodes.length > 1) {
2475
2446
  suggestion = `Value is "${value}" but only single values are supported.`;
2476
2447
  isInvalid = true;
2477
2448
  }
2478
2449
  }
2479
2450
  if (suggestion !== '') {
2480
- error$1(`Invalid style property of "${prop}". ${suggestion}`);
2451
+ error(`Invalid style property of "${prop}". ${suggestion}`);
2481
2452
  }
2482
2453
  }
2483
2454
  if (isInvalid) {
@@ -2485,7 +2456,7 @@
2485
2456
  }
2486
2457
  }
2487
2458
  }
2488
- function makeStyles$1(styleFactory, customTheme) {
2459
+ function makeStyles(styleFactory, customTheme) {
2489
2460
  const theme = customTheme || ctDesignTheme.ThemeManager.get();
2490
2461
  const styles = styleFactory(theme);
2491
2462
  for (const [key, value] of Object.entries(styles)) {
@@ -2498,23 +2469,23 @@
2498
2469
  shadow: true,
2499
2470
  textShadow: true
2500
2471
  };
2501
- validate$1(value);
2502
- const updatedStyle = preprocess$1(value, defaultPreprocessOptions);
2472
+ validate(value);
2473
+ const updatedStyle = preprocess(value, defaultPreprocessOptions);
2503
2474
  classes[key] = /*#__PURE__*/css(updatedStyle, "" , "" );
2504
2475
  }
2505
2476
  return classes;
2506
2477
  }
2507
- function useStyles$1(styleFactory, dep) {
2478
+ function useStyles(styleFactory, dep) {
2508
2479
  const theme = ctDesignTheme.useTheme();
2509
- return useStableMemo$1(() => {
2480
+ return useStableMemo(() => {
2510
2481
  const adaptedFactory = providedTheme => {
2511
2482
  return styleFactory(providedTheme);
2512
2483
  };
2513
- return makeStyles$1(adaptedFactory, theme);
2484
+ return makeStyles(adaptedFactory, theme);
2514
2485
  }, dep);
2515
2486
  }
2516
- const useWebMergeStyles$1 = (styles, deps) => {
2517
- return useStableMemo$1(() => {
2487
+ const useWebMergeStyles = (styles, deps) => {
2488
+ return useStableMemo(() => {
2518
2489
  const classes = [];
2519
2490
  styles.filter(Boolean).forEach(style => {
2520
2491
  if (typeof style === 'string') {
@@ -2525,7 +2496,7 @@
2525
2496
  shadow: true,
2526
2497
  textShadow: true
2527
2498
  };
2528
- const preprocessedStyle = preprocess$1(style, defaultPreprocessOptions);
2499
+ const preprocessedStyle = preprocess(style, defaultPreprocessOptions);
2529
2500
  const emotionClass = /*#__PURE__*/css(preprocessedStyle, "" , "" );
2530
2501
  classes.push(emotionClass);
2531
2502
  }
@@ -2534,7 +2505,7 @@
2534
2505
  return /*#__PURE__*/css(classes, "" , "" );
2535
2506
  }, deps);
2536
2507
  };
2537
- makeStyles$1(theme => {
2508
+ makeStyles(theme => {
2538
2509
  const {
2539
2510
  spacing
2540
2511
  } = theme;
@@ -3408,7 +3379,7 @@
3408
3379
  };
3409
3380
  });
3410
3381
 
3411
- const staticContainerStyles$1 = makeStyles$1(() => {
3382
+ const staticContainerStyles = makeStyles(() => {
3412
3383
  return {
3413
3384
  root: {
3414
3385
  display: 'flex',
@@ -3417,7 +3388,7 @@
3417
3388
  }
3418
3389
  };
3419
3390
  });
3420
- function getPointerEventsStyles$1(pointerEvents) {
3391
+ function getPointerEventsStyles(pointerEvents) {
3421
3392
  if (pointerEvents === 'box-none') {
3422
3393
  return {
3423
3394
  pointerEvents: 'none',
@@ -3443,7 +3414,7 @@
3443
3414
  pointerEvents: 'auto'
3444
3415
  };
3445
3416
  }
3446
- const Container$1 = React.forwardRef(({
3417
+ const Container = React.forwardRef(({
3447
3418
  id,
3448
3419
  as: ContainerAs = 'div',
3449
3420
  children,
@@ -3514,9 +3485,9 @@
3514
3485
  } = styleConfig || {};
3515
3486
  const pointerEventsStyle = React.useMemo(() => {
3516
3487
  if (pointerEvents == null) return null;
3517
- return getPointerEventsStyles$1(pointerEvents);
3488
+ return getPointerEventsStyles(pointerEvents);
3518
3489
  }, [pointerEvents]);
3519
- const mergedRootStyles = useWebMergeStyles$1([staticContainerStyles$1.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
3490
+ const mergedRootStyles = useWebMergeStyles([staticContainerStyles.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
3520
3491
  React.useLayoutEffect(() => {
3521
3492
  var _a, _b, _c, _d, _e, _f, _g, _h;
3522
3493
  onLayout === null || onLayout === void 0 ? void 0 : onLayout({
@@ -3550,7 +3521,36 @@
3550
3521
  children: children
3551
3522
  });
3552
3523
  });
3553
- Container$1.displayName = 'Container';
3524
+ Container.displayName = 'Container';
3525
+
3526
+ /******************************************************************************
3527
+ Copyright (c) Microsoft Corporation.
3528
+
3529
+ Permission to use, copy, modify, and/or distribute this software for any
3530
+ purpose with or without fee is hereby granted.
3531
+
3532
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3533
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3534
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
3535
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3536
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3537
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3538
+ PERFORMANCE OF THIS SOFTWARE.
3539
+ ***************************************************************************** */
3540
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
3541
+
3542
+ function __rest(s, e) {
3543
+ var t = {};
3544
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
3545
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3546
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
3547
+ }
3548
+ return t;
3549
+ }
3550
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
3551
+ var e = new Error(message);
3552
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3553
+ };
3554
3554
 
3555
3555
  var TypographyVariant;
3556
3556
  (function (TypographyVariant) {
@@ -4017,7 +4017,7 @@
4017
4017
  }) => {
4018
4018
  const theme = ctDesignTheme.useTheme();
4019
4019
  const parsedIsClickable = typeof isClickable === 'boolean' ? isClickable : !!onClick;
4020
- const typographyStyles = useStyles$1(theme => {
4020
+ const typographyStyles = useStyles(theme => {
4021
4021
  return {
4022
4022
  root: getTypographyStyles({
4023
4023
  theme,
@@ -4040,7 +4040,7 @@
4040
4040
  const clampClass = React.useMemo(() => {
4041
4041
  return /*#__PURE__*/css(getLineClampStyles(lineClamp), "" , "" );
4042
4042
  }, [lineClamp]);
4043
- const mergedRootStyles = useWebMergeStyles$1([typographyStyles.root, clampClass, ...customRootStyles], [typographyStyles.root, clampClass, customRootStyles]);
4043
+ const mergedRootStyles = useWebMergeStyles([typographyStyles.root, clampClass, ...customRootStyles], [typographyStyles.root, clampClass, customRootStyles]);
4044
4044
  const ComponentToRender = lineClamp ? 'div' : componentNode || getTextType(variant) || 'p';
4045
4045
  const isInlineNode = ComponentToRender === 'span';
4046
4046
  if (parsedIsClickable) {
@@ -4048,7 +4048,7 @@
4048
4048
  const clickableContainerStyles = isInlineNode ? [{
4049
4049
  display: 'inline'
4050
4050
  }, ...customContainerStyles] : customContainerStyles;
4051
- return jsxRuntimeExports.jsx(Container$1, {
4051
+ return jsxRuntimeExports.jsx(Container, {
4052
4052
  onClick: onClick,
4053
4053
  styleConfig: {
4054
4054
  root: clickableContainerStyles
@@ -4066,1423 +4066,40 @@
4066
4066
  });
4067
4067
  };
4068
4068
 
4069
- const useStableMemo = (callback, deps) => {
4070
- return React.useMemo(() => {
4071
- return callback();
4072
- }, deps);
4073
- };
4074
- function normalizeColor(color) {
4075
- {
4076
- return color;
4069
+ function getLoaderDimension(size, theme) {
4070
+ switch (size) {
4071
+ case 'large':
4072
+ return theme.size[3];
4073
+ case 'medium':
4074
+ return theme.size[2];
4075
+ default:
4076
+ return theme.size[1];
4077
4077
  }
4078
4078
  }
4079
- const isWebColor = color => {
4080
- return color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;
4081
- };
4082
- const normalizeColorWrapper = (color, opacity = 1) => {
4083
- if (color == null) return;
4084
- if (typeof color === 'string' && isWebColor(color)) {
4085
- return color;
4086
- }
4087
- };
4088
- const colorProps = {
4089
- backgroundColor: true,
4090
- borderColor: true,
4091
- borderTopColor: true,
4092
- borderRightColor: true,
4093
- borderBottomColor: true,
4094
- borderLeftColor: true,
4095
- color: true,
4096
- shadowColor: true,
4097
- textDecorationColor: true,
4098
- textShadowColor: true
4099
- };
4100
- const unitlessNumbers = {
4101
- animationIterationCount: true,
4102
- aspectRatio: true,
4103
- borderImageOutset: true,
4104
- borderImageSlice: true,
4105
- borderImageWidth: true,
4106
- boxFlex: true,
4107
- boxFlexGroup: true,
4108
- boxOrdinalGroup: true,
4109
- columnCount: true,
4110
- flex: true,
4111
- flexGrow: true,
4112
- flexOrder: true,
4113
- flexPositive: true,
4114
- flexShrink: true,
4115
- flexNegative: true,
4116
- fontWeight: true,
4117
- gridRow: true,
4118
- gridRowEnd: true,
4119
- gridRowGap: true,
4120
- gridRowStart: true,
4121
- gridColumn: true,
4122
- gridColumnEnd: true,
4123
- gridColumnGap: true,
4124
- gridColumnStart: true,
4125
- lineClamp: true,
4126
- opacity: true,
4127
- order: true,
4128
- orphans: true,
4129
- tabSize: true,
4130
- widows: true,
4131
- zIndex: true,
4132
- zoom: true,
4133
- fillOpacity: true,
4134
- floodOpacity: true,
4135
- stopOpacity: true,
4136
- strokeDasharray: true,
4137
- strokeDashoffset: true,
4138
- strokeMiterlimit: true,
4139
- strokeOpacity: true,
4140
- strokeWidth: true,
4141
- scale: true,
4142
- scaleX: true,
4143
- scaleY: true,
4144
- scaleZ: true,
4145
- shadowOpacity: true
4146
- };
4147
- function normalizeValueWithProperty(value, property) {
4148
- let returnValue = value;
4149
- if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {
4150
- returnValue = `${value}px`;
4151
- } else if (property != null && colorProps[property]) {
4152
- returnValue = normalizeColor(value);
4079
+ const dotAnimationKeyframe = ({
4080
+ restingColor,
4081
+ pulseColor
4082
+ }) => /*#__PURE__*/keyframes("0%{background-color:", restingColor, ";transform:scale(1);}50%{background-color:", pulseColor, ";transform:scale(1.2);}100%{background-color:", restingColor, ";transform:scale(1);}" + ("" ), "" );
4083
+ const staticLoaderStyles = makeStyles(theme => ({
4084
+ root: {
4085
+ alignItems: 'center',
4086
+ justifyContent: 'center',
4087
+ flexDirection: 'row',
4088
+ columnGap: 8
4089
+ },
4090
+ dot: {
4091
+ borderRadius: theme.border.radius[32],
4092
+ backgroundColor: theme.color.background.defaultDark
4153
4093
  }
4154
- return returnValue;
4155
- }
4156
- const emptyObject = {};
4157
- const defaultOffset = {
4158
- height: 0,
4159
- width: 0
4160
- };
4161
- const createBoxShadowValue = style => {
4162
- const {
4163
- shadowColor,
4164
- shadowOffset,
4165
- shadowOpacity,
4166
- shadowRadius
4167
- } = style;
4168
- const {
4169
- height,
4170
- width
4171
- } = shadowOffset || defaultOffset;
4172
- const offsetX = normalizeValueWithProperty(width);
4173
- const offsetY = normalizeValueWithProperty(height);
4174
- const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
4175
- const color = normalizeColorWrapper(shadowColor || 'black', shadowOpacity);
4176
- if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
4177
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
4178
- }
4179
- };
4180
- const createTextShadowValue = style => {
4181
- const {
4182
- textShadowColor,
4183
- textShadowOffset,
4184
- textShadowRadius
4185
- } = style;
4186
- const {
4187
- height,
4188
- width
4189
- } = textShadowOffset || defaultOffset;
4190
- const radius = textShadowRadius || 0;
4191
- const offsetX = normalizeValueWithProperty(width);
4192
- const offsetY = normalizeValueWithProperty(height);
4193
- const blurRadius = normalizeValueWithProperty(radius);
4194
- const color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');
4195
- if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
4196
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
4197
- }
4198
- };
4199
- const mapTransform = transform => {
4200
- const type = Object.keys(transform)[0];
4201
- const value = transform[type];
4202
- if (type === 'matrix' || type === 'matrix3d') {
4203
- return `${type}(${value.join(',')})`;
4204
- } else {
4205
- const normalizedValue = normalizeValueWithProperty(value, type);
4206
- return `${type}(${normalizedValue})`;
4207
- }
4208
- };
4209
- const createTransformValue = value => {
4210
- return value.map(mapTransform).join(' ');
4211
- };
4212
- const PROPERTIES_STANDARD = {
4213
- borderBottomEndRadius: 'borderEndEndRadius',
4214
- borderBottomStartRadius: 'borderEndStartRadius',
4215
- borderTopEndRadius: 'borderStartEndRadius',
4216
- borderTopStartRadius: 'borderStartStartRadius',
4217
- borderEndColor: 'borderInlineEndColor',
4218
- borderEndStyle: 'borderInlineEndStyle',
4219
- borderEndWidth: 'borderInlineEndWidth',
4220
- borderStartColor: 'borderInlineStartColor',
4221
- borderStartStyle: 'borderInlineStartStyle',
4222
- borderStartWidth: 'borderInlineStartWidth',
4223
- end: 'insetInlineEnd',
4224
- marginEnd: 'marginInlineEnd',
4225
- marginHorizontal: 'marginInline',
4226
- marginStart: 'marginInlineStart',
4227
- marginVertical: 'marginBlock',
4228
- paddingEnd: 'paddingInlineEnd',
4229
- paddingHorizontal: 'paddingInline',
4230
- paddingStart: 'paddingInlineStart',
4231
- paddingVertical: 'paddingBlock',
4232
- start: 'insetInlineStart'
4233
- };
4234
- const ignoredProps = {
4235
- elevation: true,
4236
- overlayColor: true,
4237
- resizeMode: true,
4238
- tintColor: true
4239
- };
4240
- function normalizePointerEventsStyle(value) {
4241
- if (value === 'auto' || value === 'none') {
4242
- return value;
4243
- }
4244
- if (value === 'box-none' || value === 'box-only') {
4245
- return value === 'box-none' ? 'none' : 'auto';
4246
- }
4247
- return undefined;
4248
- }
4249
- const preprocess = (originalStyle, options = {}) => {
4250
- const style = originalStyle || emptyObject;
4251
- const nextStyle = {};
4252
- if (options.shadow === true, style.shadowColor != null || style.shadowOffset != null || style.shadowOpacity != null || style.shadowRadius != null) {
4253
- const boxShadowValue = createBoxShadowValue(style);
4254
- if (boxShadowValue != null && nextStyle.boxShadow == null) {
4255
- const {
4256
- boxShadow
4257
- } = style;
4258
- const value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
4259
- nextStyle.boxShadow = value;
4260
- }
4261
- }
4262
- if (options.textShadow === true && style.textShadowColor != null || style.textShadowOffset != null || style.textShadowRadius != null) {
4263
- const textShadowValue = createTextShadowValue(style);
4264
- if (textShadowValue != null && nextStyle.textShadow == null) {
4265
- const {
4266
- textShadow
4267
- } = style;
4268
- const value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
4269
- nextStyle.textShadow = value;
4270
- }
4271
- }
4272
- for (const originalProp in style) {
4273
- if (ignoredProps[originalProp] != null || originalProp === 'shadowColor' || originalProp === 'shadowOffset' || originalProp === 'shadowOpacity' || originalProp === 'shadowRadius' || originalProp === 'textShadowColor' || originalProp === 'textShadowOffset' || originalProp === 'textShadowRadius') {
4274
- continue;
4275
- }
4276
- const originalValue = style[originalProp];
4277
- const prop = PROPERTIES_STANDARD[originalProp] || originalProp;
4278
- let value = originalValue;
4279
- if (prop === 'pointerEvents') {
4280
- const normalized = normalizePointerEventsStyle(originalValue);
4281
- if (normalized != null) {
4282
- nextStyle.pointerEvents = normalized;
4283
- }
4284
- continue;
4285
- }
4286
- if (!Object.prototype.hasOwnProperty.call(style, originalProp) || prop !== originalProp && style[prop] != null) {
4287
- continue;
4288
- }
4289
- if (prop === 'aspectRatio' && typeof value === 'number') {
4290
- nextStyle[prop] = value.toString();
4291
- } else if (prop === 'fontVariant') {
4292
- if (Array.isArray(value) && value.length > 0) {
4293
- value = value.join(' ');
4294
- }
4295
- nextStyle[prop] = value;
4296
- } else if (prop === 'textAlignVertical') {
4297
- if (style.verticalAlign == null) {
4298
- nextStyle.verticalAlign = value === 'center' ? 'middle' : value;
4299
- }
4300
- } else if (prop === 'transform') {
4301
- if (Array.isArray(value)) {
4302
- value = createTransformValue(value);
4303
- }
4304
- nextStyle.transform = value;
4305
- } else {
4306
- nextStyle[prop] = normalizeValueWithProperty(value, prop);
4307
- }
4308
- }
4309
- return nextStyle;
4310
- };
4311
- const invalidShortforms = {
4312
- background: true,
4313
- borderBottom: true,
4314
- borderLeft: true,
4315
- borderRight: true,
4316
- borderTop: true,
4317
- font: true,
4318
- grid: true,
4319
- outline: true,
4320
- textDecoration: true
4321
- };
4322
- const invalidMultiValueShortforms = {
4323
- flex: true,
4324
- margin: true,
4325
- padding: true,
4326
- borderColor: true,
4327
- borderRadius: true,
4328
- borderStyle: true,
4329
- borderWidth: true,
4330
- inset: true,
4331
- insetBlock: true,
4332
- insetInline: true,
4333
- marginBlock: true,
4334
- marginInline: true,
4335
- marginHorizontal: true,
4336
- marginVertical: true,
4337
- paddingBlock: true,
4338
- paddingInline: true,
4339
- paddingHorizontal: true,
4340
- paddingVertical: true,
4341
- overflow: true,
4342
- overscrollBehavior: true,
4343
- backgroundPosition: true
4344
- };
4345
- function error(message) {
4346
- console.error(message);
4347
- }
4348
- function validate(obj) {
4349
- for (const k in obj) {
4350
- const prop = k.trim();
4351
- const value = obj[prop];
4352
- let isInvalid = false;
4353
- if (value === null) {
4354
- continue;
4355
- }
4356
- if (typeof value === 'string' && value.indexOf('!important') > -1) {
4357
- error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
4358
- isInvalid = true;
4359
- } else {
4360
- let suggestion = '';
4361
- if (prop === 'animation' || prop === 'animationName') {
4362
- suggestion = 'Did you mean "animationKeyframes"?';
4363
- isInvalid = true;
4364
- } else if (prop === 'direction') {
4365
- suggestion = 'Did you mean "writingDirection"?';
4366
- isInvalid = true;
4367
- } else if (invalidShortforms[prop]) {
4368
- suggestion = 'Please use long-form properties.';
4369
- isInvalid = true;
4370
- } else if (invalidMultiValueShortforms[prop]) {
4371
- if (typeof value === 'string' && lib(value).nodes.length > 1) {
4372
- suggestion = `Value is "${value}" but only single values are supported.`;
4373
- isInvalid = true;
4374
- }
4375
- }
4376
- if (suggestion !== '') {
4377
- error(`Invalid style property of "${prop}". ${suggestion}`);
4378
- }
4379
- }
4380
- if (isInvalid) {
4381
- delete obj[k];
4382
- }
4383
- }
4384
- }
4385
- function makeStyles(styleFactory, customTheme) {
4386
- const theme = customTheme || ctDesignTheme.ThemeManager.get();
4387
- const styles = styleFactory(theme);
4388
- for (const [key, value] of Object.entries(styles)) {
4389
- const updatedValue = typeof value === 'function' ? value(theme) : value;
4390
- styles[key] = updatedValue;
4391
- }
4392
- const classes = {};
4393
- for (const [key, value] of Object.entries(styles)) {
4394
- const defaultPreprocessOptions = {
4395
- shadow: true,
4396
- textShadow: true
4397
- };
4398
- validate(value);
4399
- const updatedStyle = preprocess(value, defaultPreprocessOptions);
4400
- classes[key] = /*#__PURE__*/css(updatedStyle, "" , "" );
4401
- }
4402
- return classes;
4403
- }
4404
- function useStyles(styleFactory, dep) {
4405
- const theme = ctDesignTheme.useTheme();
4406
- return useStableMemo(() => {
4407
- const adaptedFactory = providedTheme => {
4408
- return styleFactory(providedTheme);
4409
- };
4410
- return makeStyles(adaptedFactory, theme);
4411
- }, dep);
4412
- }
4413
- const useWebMergeStyles = (styles, deps) => {
4414
- return useStableMemo(() => {
4415
- const classes = [];
4416
- styles.filter(Boolean).forEach(style => {
4417
- if (typeof style === 'string') {
4418
- classes.push(style);
4419
- } else {
4420
- if (style) {
4421
- const defaultPreprocessOptions = {
4422
- shadow: true,
4423
- textShadow: true
4424
- };
4425
- const preprocessedStyle = preprocess(style, defaultPreprocessOptions);
4426
- const emotionClass = /*#__PURE__*/css(preprocessedStyle, "" , "" );
4427
- classes.push(emotionClass);
4428
- }
4429
- }
4430
- });
4431
- return /*#__PURE__*/css(classes, "" , "" );
4432
- }, deps);
4433
- };
4434
- makeStyles(theme => {
4435
- const {
4436
- spacing
4437
- } = theme;
4438
- return {
4439
- flex: {
4440
- display: 'flex'
4441
- },
4442
- 'flex-1': {
4443
- flex: 1
4444
- },
4445
- 'flex-row': {
4446
- flexDirection: 'row'
4447
- },
4448
- 'flex-column': {
4449
- flexDirection: 'column'
4450
- },
4451
- 'flex-row-reverse': {
4452
- flexDirection: 'row-reverse'
4453
- },
4454
- 'flex-column-reverse': {
4455
- flexDirection: 'column-reverse'
4456
- },
4457
- 'fw-400': {
4458
- fontWeight: '400'
4459
- },
4460
- 'fw-500': {
4461
- fontWeight: '500'
4462
- },
4463
- 'fw-600': {
4464
- fontWeight: '600'
4465
- },
4466
- 'flex-nowrap': {
4467
- flexWrap: 'nowrap'
4468
- },
4469
- 'flex-wrap': {
4470
- flexWrap: 'wrap'
4471
- },
4472
- 'flex-wrap-reverse': {
4473
- flexWrap: 'wrap-reverse'
4474
- },
4475
- 'flex-no-shrink': {
4476
- flexShrink: spacing[0]
4477
- },
4478
- 'flex-stretch': {
4479
- alignItems: 'stretch'
4480
- },
4481
- 'flex-top': {
4482
- alignItems: 'flex-start'
4483
- },
4484
- 'flex-middle': {
4485
- alignItems: 'center'
4486
- },
4487
- 'flex-bottom': {
4488
- alignItems: 'flex-end'
4489
- },
4490
- 'flex-baseline': {
4491
- alignItems: 'baseline'
4492
- },
4493
- 'flex-wrap-stretch': {
4494
- alignContent: 'stretch'
4495
- },
4496
- 'flex-wrap-top': {
4497
- alignContent: 'flex-start'
4498
- },
4499
- 'flex-wrap-middle': {
4500
- alignContent: 'center'
4501
- },
4502
- 'flex-wrap-bottom': {
4503
- alignContent: 'flex-end'
4504
- },
4505
- 'flex-wrap-between': {
4506
- alignContent: 'space-between'
4507
- },
4508
- 'flex-wrap-around': {
4509
- alignContent: 'space-around'
4510
- },
4511
- 'flex-left': {
4512
- justifyContent: 'flex-start'
4513
- },
4514
- 'flex-start': {
4515
- justifyContent: 'flex-start'
4516
- },
4517
- 'flex-end': {
4518
- justifyContent: 'flex-end'
4519
- },
4520
- 'flex-right': {
4521
- justifyContent: 'flex-end'
4522
- },
4523
- 'flex-center': {
4524
- justifyContent: 'center'
4525
- },
4526
- 'flex-between': {
4527
- justifyContent: 'space-between'
4528
- },
4529
- 'flex-around': {
4530
- justifyContent: 'space-around'
4531
- },
4532
- 'flex-basis-auto': {
4533
- flexBasis: 'auto'
4534
- },
4535
- 'flex-rg-1': {
4536
- rowGap: spacing[1]
4537
- },
4538
- 'flex-rg-2': {
4539
- rowGap: spacing[2]
4540
- },
4541
- 'flex-rg-3': {
4542
- rowGap: spacing[3]
4543
- },
4544
- 'flex-rg-4': {
4545
- rowGap: spacing[4]
4546
- },
4547
- 'flex-rg-6': {
4548
- rowGap: spacing[6]
4549
- },
4550
- 'flex-rg-7': {
4551
- rowGap: spacing[7]
4552
- },
4553
- 'flex-rg-8': {
4554
- rowGap: spacing[8]
4555
- },
4556
- 'flex-rg-9': {
4557
- rowGap: spacing[9]
4558
- },
4559
- 'flex-rg-10': {
4560
- rowGap: spacing[10]
4561
- },
4562
- 'flex-cg-1': {
4563
- columnGap: spacing[1]
4564
- },
4565
- 'flex-cg-2': {
4566
- columnGap: spacing[2]
4567
- },
4568
- 'flex-cg-3': {
4569
- columnGap: spacing[3]
4570
- },
4571
- 'flex-cg-4': {
4572
- columnGap: spacing[4]
4573
- },
4574
- 'flex-cg-6': {
4575
- columnGap: spacing[6]
4576
- },
4577
- 'flex-gap-0.5': {
4578
- gap: spacing['0.5']
4579
- },
4580
- 'flex-gap-1': {
4581
- gap: spacing[1]
4582
- },
4583
- 'flex-gap-1.5': {
4584
- gap: spacing['1.5']
4585
- },
4586
- 'flex-gap-2': {
4587
- gap: spacing[2]
4588
- },
4589
- 'flex-gap-3': {
4590
- gap: spacing[3]
4591
- },
4592
- 'flex-gap-4': {
4593
- gap: spacing[4]
4594
- },
4595
- 'flex-gap-6': {
4596
- gap: spacing[6]
4597
- },
4598
- 'w-0p': {
4599
- width: '0%'
4600
- },
4601
- 'w-10p': {
4602
- width: '10%'
4603
- },
4604
- 'w-20p': {
4605
- width: '20%'
4606
- },
4607
- 'w-30p': {
4608
- width: '30%'
4609
- },
4610
- 'w-40p': {
4611
- width: '40%'
4612
- },
4613
- 'w-50p': {
4614
- width: '50%'
4615
- },
4616
- 'w-60p': {
4617
- width: '60%'
4618
- },
4619
- 'w-70p': {
4620
- width: '70%'
4621
- },
4622
- 'w-80p': {
4623
- width: '80%'
4624
- },
4625
- 'w-90p': {
4626
- width: '90%'
4627
- },
4628
- 'w-100p': {
4629
- width: '100%'
4630
- },
4631
- 'w-0': {
4632
- width: spacing[0]
4633
- },
4634
- 'w-1': {
4635
- width: spacing[1]
4636
- },
4637
- 'w-2': {
4638
- width: spacing[2]
4639
- },
4640
- 'w-3': {
4641
- width: spacing[3]
4642
- },
4643
- 'w-4': {
4644
- width: spacing[4]
4645
- },
4646
- 'w-5': {
4647
- width: spacing[5]
4648
- },
4649
- 'w-6': {
4650
- width: spacing[6]
4651
- },
4652
- 'w-7': {
4653
- width: spacing[7]
4654
- },
4655
- 'w-8': {
4656
- width: spacing[8]
4657
- },
4658
- 'w-9': {
4659
- width: spacing[9]
4660
- },
4661
- 'w-10': {
4662
- width: spacing[10]
4663
- },
4664
- 'w-14': {
4665
- width: spacing[14]
4666
- },
4667
- 'w-16': {
4668
- width: spacing[16]
4669
- },
4670
- 't-0': {
4671
- top: 0
4672
- },
4673
- 'b-0': {
4674
- bottom: 0
4675
- },
4676
- 'l-0': {
4677
- left: 0
4678
- },
4679
- 'h-0p': {
4680
- height: '0%'
4681
- },
4682
- 'h-10p': {
4683
- height: '10%'
4684
- },
4685
- 'h-20p': {
4686
- height: '20%'
4687
- },
4688
- 'h-30p': {
4689
- height: '30%'
4690
- },
4691
- 'h-40p': {
4692
- height: '40%'
4693
- },
4694
- 'h-50p': {
4695
- height: '50%'
4696
- },
4697
- 'h-60p': {
4698
- height: '60%'
4699
- },
4700
- 'h-70p': {
4701
- height: '70%'
4702
- },
4703
- 'h-80p': {
4704
- height: '80%'
4705
- },
4706
- 'h-90p': {
4707
- height: '90%'
4708
- },
4709
- 'h-100p': {
4710
- height: '100%'
4711
- },
4712
- 'h-0': {
4713
- height: spacing[0]
4714
- },
4715
- 'h-1': {
4716
- height: spacing[1]
4717
- },
4718
- 'h-2': {
4719
- height: spacing[2]
4720
- },
4721
- 'h-3': {
4722
- height: spacing[3]
4723
- },
4724
- 'h-4': {
4725
- height: spacing[4]
4726
- },
4727
- 'h-5': {
4728
- height: spacing[5]
4729
- },
4730
- 'h-6': {
4731
- height: spacing[6]
4732
- },
4733
- 'h-7': {
4734
- height: spacing[7]
4735
- },
4736
- 'h-8': {
4737
- height: spacing[8]
4738
- },
4739
- 'h-9': {
4740
- height: spacing[9]
4741
- },
4742
- 'h-10': {
4743
- height: spacing[10]
4744
- },
4745
- 'h-14': {
4746
- height: spacing[14]
4747
- },
4748
- 'h-16': {
4749
- height: spacing[16]
4750
- },
4751
- 'm-0': {
4752
- margin: spacing[0]
4753
- },
4754
- 'm-1': {
4755
- margin: spacing[1]
4756
- },
4757
- 'm-2': {
4758
- margin: spacing[2]
4759
- },
4760
- 'm-3': {
4761
- margin: spacing[3]
4762
- },
4763
- 'm-4': {
4764
- margin: spacing[4]
4765
- },
4766
- 'm-5': {
4767
- margin: spacing[5]
4768
- },
4769
- 'm-6': {
4770
- margin: spacing[6]
4771
- },
4772
- 'm-7': {
4773
- margin: spacing[7]
4774
- },
4775
- 'm-8': {
4776
- margin: spacing[8]
4777
- },
4778
- 'm-9': {
4779
- margin: spacing[9]
4780
- },
4781
- 'm-10': {
4782
- margin: spacing[10]
4783
- },
4784
- 'mt-0': {
4785
- marginTop: spacing[0]
4786
- },
4787
- 'mt-1': {
4788
- marginTop: spacing[1]
4789
- },
4790
- 'mt-2': {
4791
- marginTop: spacing[2]
4792
- },
4793
- 'mt-3': {
4794
- marginTop: spacing[3]
4795
- },
4796
- 'mt-4': {
4797
- marginTop: spacing[4]
4798
- },
4799
- 'mt-5': {
4800
- marginTop: spacing[5]
4801
- },
4802
- 'mt-6': {
4803
- marginTop: spacing[6]
4804
- },
4805
- 'mt-7': {
4806
- marginTop: spacing[7]
4807
- },
4808
- 'mt-8': {
4809
- marginTop: spacing[8]
4810
- },
4811
- 'mt-9': {
4812
- marginTop: spacing[9]
4813
- },
4814
- 'mt-10': {
4815
- marginTop: spacing[10]
4816
- },
4817
- 'mb-0': {
4818
- marginBottom: spacing[0]
4819
- },
4820
- 'mb-1': {
4821
- marginBottom: spacing[1]
4822
- },
4823
- 'mb-2': {
4824
- marginBottom: spacing[2]
4825
- },
4826
- 'mb-3': {
4827
- marginBottom: spacing[3]
4828
- },
4829
- 'mb-4': {
4830
- marginBottom: spacing[4]
4831
- },
4832
- 'mb-5': {
4833
- marginBottom: spacing[5]
4834
- },
4835
- 'mb-6': {
4836
- marginBottom: spacing[6]
4837
- },
4838
- 'mb-7': {
4839
- marginBottom: spacing[7]
4840
- },
4841
- 'mb-8': {
4842
- marginBottom: spacing[8]
4843
- },
4844
- 'mb-9': {
4845
- marginBottom: spacing[9]
4846
- },
4847
- 'mb-10': {
4848
- marginBottom: spacing[10]
4849
- },
4850
- 'ml-0': {
4851
- marginLeft: spacing[0]
4852
- },
4853
- 'ml-1': {
4854
- marginLeft: spacing[1]
4855
- },
4856
- 'ml-2': {
4857
- marginLeft: spacing[2]
4858
- },
4859
- 'ml-3': {
4860
- marginLeft: spacing[3]
4861
- },
4862
- 'ml-4': {
4863
- marginLeft: spacing[4]
4864
- },
4865
- 'ml-5': {
4866
- marginLeft: spacing[5]
4867
- },
4868
- 'ml-6': {
4869
- marginLeft: spacing[6]
4870
- },
4871
- 'ml-7': {
4872
- marginLeft: spacing[7]
4873
- },
4874
- 'ml-8': {
4875
- marginLeft: spacing[8]
4876
- },
4877
- 'ml-9': {
4878
- marginLeft: spacing[9]
4879
- },
4880
- 'ml-10': {
4881
- marginLeft: spacing[10]
4882
- },
4883
- 'mr-0': {
4884
- marginRight: spacing[0]
4885
- },
4886
- 'mr-1': {
4887
- marginRight: spacing[1]
4888
- },
4889
- 'mr-1.5': {
4890
- marginRight: spacing['1.5']
4891
- },
4892
- 'mr-2': {
4893
- marginRight: spacing[2]
4894
- },
4895
- 'mr-3': {
4896
- marginRight: spacing[3]
4897
- },
4898
- 'mr-4': {
4899
- marginRight: spacing[4]
4900
- },
4901
- 'mr-5': {
4902
- marginRight: spacing[5]
4903
- },
4904
- 'mr-6': {
4905
- marginRight: spacing[6]
4906
- },
4907
- 'mr-7': {
4908
- marginRight: spacing[7]
4909
- },
4910
- 'mr-8': {
4911
- marginRight: spacing[8]
4912
- },
4913
- 'mr-9': {
4914
- marginRight: spacing[9]
4915
- },
4916
- 'mr-10': {
4917
- marginRight: spacing[10]
4918
- },
4919
- 'mx-0': {
4920
- marginHorizontal: spacing[0]
4921
- },
4922
- 'mx-1': {
4923
- marginHorizontal: spacing[1]
4924
- },
4925
- 'mx-2': {
4926
- marginHorizontal: spacing[2]
4927
- },
4928
- 'mx-3': {
4929
- marginHorizontal: spacing[3]
4930
- },
4931
- 'mx-4': {
4932
- marginHorizontal: spacing[4]
4933
- },
4934
- 'mx-5': {
4935
- marginHorizontal: spacing[5]
4936
- },
4937
- 'mx-6': {
4938
- marginHorizontal: spacing[6]
4939
- },
4940
- 'mx-7': {
4941
- marginHorizontal: spacing[7]
4942
- },
4943
- 'mx-8': {
4944
- marginHorizontal: spacing[8]
4945
- },
4946
- 'mx-9': {
4947
- marginHorizontal: spacing[9]
4948
- },
4949
- 'mx-10': {
4950
- marginHorizontal: spacing[10]
4951
- },
4952
- 'my-0': {
4953
- marginVertical: spacing[0]
4954
- },
4955
- 'my-1': {
4956
- marginVertical: spacing[1]
4957
- },
4958
- 'my-2': {
4959
- marginVertical: spacing[2]
4960
- },
4961
- 'my-3': {
4962
- marginVertical: spacing[3]
4963
- },
4964
- 'my-4': {
4965
- marginVertical: spacing[4]
4966
- },
4967
- 'my-5': {
4968
- marginVertical: spacing[5]
4969
- },
4970
- 'my-6': {
4971
- marginVertical: spacing[6]
4972
- },
4973
- 'my-7': {
4974
- marginVertical: spacing[7]
4975
- },
4976
- 'my-8': {
4977
- marginVertical: spacing[8]
4978
- },
4979
- 'my-9': {
4980
- marginVertical: spacing[9]
4981
- },
4982
- 'my-10': {
4983
- marginVertical: spacing[10]
4984
- },
4985
- 'p-0': {
4986
- padding: spacing[0]
4987
- },
4988
- 'p-1': {
4989
- padding: spacing[1]
4990
- },
4991
- 'p-2': {
4992
- padding: spacing[2]
4993
- },
4994
- 'p-3': {
4995
- padding: spacing[3]
4996
- },
4997
- 'p-4': {
4998
- padding: spacing[4]
4999
- },
5000
- 'p-5': {
5001
- padding: spacing[5]
5002
- },
5003
- 'p-6': {
5004
- padding: spacing[6]
5005
- },
5006
- 'p-7': {
5007
- padding: spacing[7]
5008
- },
5009
- 'p-8': {
5010
- padding: spacing[8]
5011
- },
5012
- 'p-9': {
5013
- padding: spacing[9]
5014
- },
5015
- 'p-10': {
5016
- padding: spacing[10]
5017
- },
5018
- 'pt-0': {
5019
- paddingTop: spacing[0]
5020
- },
5021
- 'pt-1': {
5022
- paddingTop: spacing[1]
5023
- },
5024
- 'pt-2': {
5025
- paddingTop: spacing[2]
5026
- },
5027
- 'pt-3': {
5028
- paddingTop: spacing[3]
5029
- },
5030
- 'pt-4': {
5031
- paddingTop: spacing[4]
5032
- },
5033
- 'pt-5': {
5034
- paddingTop: spacing[5]
5035
- },
5036
- 'pt-6': {
5037
- paddingTop: spacing[6]
5038
- },
5039
- 'pt-7': {
5040
- paddingTop: spacing[7]
5041
- },
5042
- 'pt-8': {
5043
- paddingTop: spacing[8]
5044
- },
5045
- 'pt-9': {
5046
- paddingTop: spacing[9]
5047
- },
5048
- 'pt-10': {
5049
- paddingTop: spacing[10]
5050
- },
5051
- 'pt-16': {
5052
- paddingTop: spacing[16]
5053
- },
5054
- 'pt-12': {
5055
- paddingTop: spacing[12]
5056
- },
5057
- 'pb-0': {
5058
- paddingBottom: spacing[0]
5059
- },
5060
- 'pb-1': {
5061
- paddingBottom: spacing[1]
5062
- },
5063
- 'pb-2': {
5064
- paddingBottom: spacing[2]
5065
- },
5066
- 'pb-3': {
5067
- paddingBottom: spacing[3]
5068
- },
5069
- 'pb-4': {
5070
- paddingBottom: spacing[4]
5071
- },
5072
- 'pb-5': {
5073
- paddingBottom: spacing[5]
5074
- },
5075
- 'pb-6': {
5076
- paddingBottom: spacing[6]
5077
- },
5078
- 'pb-7': {
5079
- paddingBottom: spacing[7]
5080
- },
5081
- 'pb-8': {
5082
- paddingBottom: spacing[8]
5083
- },
5084
- 'pb-9': {
5085
- paddingBottom: spacing[9]
5086
- },
5087
- 'pb-10': {
5088
- paddingBottom: spacing[10]
5089
- },
5090
- 'pl-0': {
5091
- paddingLeft: spacing[0]
5092
- },
5093
- 'pl-1': {
5094
- paddingLeft: spacing[1]
5095
- },
5096
- 'pl-2': {
5097
- paddingLeft: spacing[2]
5098
- },
5099
- 'pl-3': {
5100
- paddingLeft: spacing[3]
5101
- },
5102
- 'pl-4': {
5103
- paddingLeft: spacing[4]
5104
- },
5105
- 'pl-5': {
5106
- paddingLeft: spacing[5]
5107
- },
5108
- 'pl-6': {
5109
- paddingLeft: spacing[6]
5110
- },
5111
- 'pl-7': {
5112
- paddingLeft: spacing[7]
5113
- },
5114
- 'pl-8': {
5115
- paddingLeft: spacing[8]
5116
- },
5117
- 'pl-9': {
5118
- paddingLeft: spacing[9]
5119
- },
5120
- 'pl-10': {
5121
- paddingLeft: spacing[10]
5122
- },
5123
- 'pr-0': {
5124
- paddingRight: spacing[0]
5125
- },
5126
- 'pr-1': {
5127
- paddingRight: spacing[1]
5128
- },
5129
- 'pr-2': {
5130
- paddingRight: spacing[2]
5131
- },
5132
- 'pr-3': {
5133
- paddingRight: spacing[3]
5134
- },
5135
- 'pr-4': {
5136
- paddingRight: spacing[4]
5137
- },
5138
- 'pr-5': {
5139
- paddingRight: spacing[5]
5140
- },
5141
- 'pr-6': {
5142
- paddingRight: spacing[6]
5143
- },
5144
- 'pr-7': {
5145
- paddingRight: spacing[7]
5146
- },
5147
- 'pr-8': {
5148
- paddingRight: spacing[8]
5149
- },
5150
- 'pr-9': {
5151
- paddingRight: spacing[9]
5152
- },
5153
- 'pr-10': {
5154
- paddingRight: spacing[10]
5155
- },
5156
- 'px-0': {
5157
- paddingHorizontal: spacing[0]
5158
- },
5159
- 'px-0.5': {
5160
- paddingHorizontal: spacing['0.5']
5161
- },
5162
- 'px-1': {
5163
- paddingHorizontal: spacing[1]
5164
- },
5165
- 'px-2': {
5166
- paddingHorizontal: spacing[2]
5167
- },
5168
- 'px-3': {
5169
- paddingHorizontal: spacing[3]
5170
- },
5171
- 'px-4': {
5172
- paddingHorizontal: spacing[4]
5173
- },
5174
- 'px-5': {
5175
- paddingHorizontal: spacing[5]
5176
- },
5177
- 'px-6': {
5178
- paddingHorizontal: spacing[6]
5179
- },
5180
- 'px-7': {
5181
- paddingHorizontal: spacing[7]
5182
- },
5183
- 'px-8': {
5184
- paddingHorizontal: spacing[8]
5185
- },
5186
- 'px-9': {
5187
- paddingHorizontal: spacing[9]
5188
- },
5189
- 'px-10': {
5190
- paddingHorizontal: spacing[10]
5191
- },
5192
- 'py-0': {
5193
- paddingVertical: spacing[0]
5194
- },
5195
- 'py-0.5': {
5196
- paddingVertical: spacing['0.5']
5197
- },
5198
- 'py-1': {
5199
- paddingVertical: spacing[1]
5200
- },
5201
- 'py-2': {
5202
- paddingVertical: spacing[2]
5203
- },
5204
- 'py-3': {
5205
- paddingVertical: spacing[3]
5206
- },
5207
- 'py-4': {
5208
- paddingVertical: spacing[4]
5209
- },
5210
- 'py-5': {
5211
- paddingVertical: spacing[5]
5212
- },
5213
- 'py-6': {
5214
- paddingVertical: spacing[6]
5215
- },
5216
- 'py-7': {
5217
- paddingVertical: spacing[7]
5218
- },
5219
- 'py-8': {
5220
- paddingVertical: spacing[8]
5221
- },
5222
- 'py-9': {
5223
- paddingVertical: spacing[9]
5224
- },
5225
- 'py-10': {
5226
- paddingVertical: spacing[10]
5227
- },
5228
- 'br-50p': {
5229
- borderRadius: 50
5230
- },
5231
- 'br-4': {
5232
- borderRadius: 4
5233
- },
5234
- 'br-8': {
5235
- borderRadius: 8
5236
- },
5237
- 'br-12': {
5238
- borderRadius: 12
5239
- },
5240
- 'br-16': {
5241
- borderRadius: 16
5242
- },
5243
- 'br-20': {
5244
- borderRadius: 20
5245
- },
5246
- 'z-0': {
5247
- zIndex: 0
5248
- },
5249
- 'z-1': {
5250
- zIndex: 1
5251
- },
5252
- 'z-2': {
5253
- zIndex: 2
5254
- },
5255
- 'z-5': {
5256
- zIndex: 5
5257
- },
5258
- 'z-10': {
5259
- zIndex: 10
5260
- },
5261
- 'z-100': {
5262
- zIndex: 100
5263
- },
5264
- 'bg-neutral-100': {
5265
- backgroundColor: '#ffffff'
5266
- },
5267
- 'p-relative': {
5268
- position: 'relative'
5269
- },
5270
- 'p-absolute': {
5271
- position: 'absolute'
5272
- },
5273
- 'bs-shadow-top-white': {
5274
- shadowColor: '#1a1a1a',
5275
- shadowOffset: {
5276
- width: 0,
5277
- height: -4
5278
- },
5279
- shadowOpacity: 0.08,
5280
- shadowRadius: 16,
5281
- elevation: 5
5282
- },
5283
- 'bs-shadow-bottom-white': {
5284
- shadowColor: '#1a1a1a',
5285
- shadowOffset: {
5286
- width: 0,
5287
- height: 2
5288
- },
5289
- shadowOpacity: 0.08,
5290
- shadowRadius: 16,
5291
- elevation: 5
5292
- },
5293
- 'o-hidden': {
5294
- overflow: 'hidden'
5295
- },
5296
- 'ta-c': {
5297
- textAlign: 'center'
5298
- },
5299
- 'ta-l': {
5300
- textAlign: 'left'
5301
- },
5302
- 'ta-r': {
5303
- textAlign: 'right'
5304
- }
5305
- };
5306
- });
5307
-
5308
- const staticContainerStyles = makeStyles(() => {
5309
- return {
5310
- root: {
5311
- display: 'flex',
5312
- flexDirection: 'column',
5313
- pointerEvents: 'auto'
5314
- }
5315
- };
5316
- });
5317
- function getPointerEventsStyles(pointerEvents) {
5318
- if (pointerEvents === 'box-none') {
5319
- return {
5320
- pointerEvents: 'none',
5321
- '& > *': {
5322
- pointerEvents: 'auto'
5323
- }
5324
- };
5325
- }
5326
- if (pointerEvents === 'box-only') {
5327
- return {
5328
- pointerEvents: 'auto',
5329
- '& > *': {
5330
- pointerEvents: 'none'
5331
- }
5332
- };
5333
- }
5334
- if (pointerEvents === 'none') {
5335
- return {
5336
- pointerEvents: 'none'
5337
- };
5338
- }
5339
- return {
5340
- pointerEvents: 'auto'
5341
- };
5342
- }
5343
- const Container = React.forwardRef(({
5344
- id,
5345
- as: ContainerAs = 'div',
5346
- children,
5347
- styleConfig,
5348
- onClick,
5349
- onLayout,
5350
- onMouseEnter,
5351
- onMouseLeave,
5352
- onTransitionEnd,
5353
- onTouchStart,
5354
- onTouchEnd,
5355
- onTouchCancel,
5356
- onTouchMove,
5357
- pointerEvents,
5358
- hitSlop: _hitSlop,
5359
- hapticEnabled: _hapticEnabled,
5360
- hapticVariant: _hapticVariant,
5361
- hapticRepeat: _hapticRepeat
5362
- }, forwardedRef) => {
5363
- const localRef = React.useRef(null);
5364
- const handleFocus = React.useCallback(() => {
5365
- var _a;
5366
- (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
5367
- }, []);
5368
- const handleGetBoundingRect = React.useCallback(callback => {
5369
- var _a;
5370
- const rect = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
5371
- if (rect) {
5372
- callback === null || callback === void 0 ? void 0 : callback({
5373
- x: rect.x,
5374
- y: rect.y,
5375
- width: rect.width,
5376
- height: rect.height
5377
- });
5378
- }
5379
- }, []);
5380
- const handleAddEventListener = React.useCallback((type, listener, options) => {
5381
- var _a;
5382
- (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener, options);
5383
- }, []);
5384
- const handleRemoveEventListener = React.useCallback((type, listener, options) => {
5385
- var _a;
5386
- (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener, options);
5387
- }, []);
5388
- React.useImperativeHandle(forwardedRef, () => {
5389
- var _a;
5390
- return {
5391
- focus: handleFocus,
5392
- getBoundingRectWithCallback: handleGetBoundingRect,
5393
- getElementRef: () => localRef,
5394
- style: ((_a = localRef.current) === null || _a === void 0 ? void 0 : _a.style) || {},
5395
- classList: {
5396
- add: className => {
5397
- var _a;
5398
- (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(className);
5399
- }
5400
- },
5401
- measure: _callback => {
5402
- var _a;
5403
- (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
5404
- },
5405
- addEventListener: handleAddEventListener,
5406
- removeEventListener: handleRemoveEventListener
5407
- };
5408
- }, [handleFocus, handleGetBoundingRect, handleAddEventListener, handleRemoveEventListener]);
5409
- const {
5410
- root: rootStyles = []
5411
- } = styleConfig || {};
5412
- const pointerEventsStyle = React.useMemo(() => {
5413
- if (pointerEvents == null) return null;
5414
- return getPointerEventsStyles(pointerEvents);
5415
- }, [pointerEvents]);
5416
- const mergedRootStyles = useWebMergeStyles([staticContainerStyles.root, ...rootStyles, ...(pointerEventsStyle ? [pointerEventsStyle] : [])], [rootStyles, pointerEventsStyle]);
5417
- React.useLayoutEffect(() => {
5418
- var _a, _b, _c, _d, _e, _f, _g, _h;
5419
- onLayout === null || onLayout === void 0 ? void 0 : onLayout({
5420
- layout: {
5421
- height: (_b = (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
5422
- width: (_d = (_c = localRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) !== null && _d !== void 0 ? _d : 0,
5423
- x: (_f = (_e = localRef.current) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect().x) !== null && _f !== void 0 ? _f : 0,
5424
- y: (_h = (_g = localRef.current) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect().y) !== null && _h !== void 0 ? _h : 0
5425
- }
5426
- });
5427
- }, [onLayout]);
5428
- return jsxRuntimeExports.jsx(ContainerAs, {
5429
- id: id,
5430
- ref: localRef,
5431
- className: mergedRootStyles,
5432
- onClick: event => onClick === null || onClick === void 0 ? void 0 : onClick({
5433
- stopPropagation: () => event.stopPropagation(),
5434
- preventDefault: () => event.preventDefault(),
5435
- nativeEvent: {
5436
- locationX: event.clientX,
5437
- locationY: event.clientY
5438
- }
5439
- }),
5440
- onMouseEnter: onMouseEnter,
5441
- onMouseLeave: onMouseLeave,
5442
- onTransitionEnd: onTransitionEnd,
5443
- onTouchStart: onTouchStart,
5444
- onTouchEnd: onTouchEnd,
5445
- onTouchCancel: onTouchCancel,
5446
- onTouchMove: onTouchMove,
5447
- children: children
5448
- });
5449
- });
5450
- Container.displayName = 'Container';
5451
-
5452
- function getLoaderDimension(size, theme) {
5453
- switch (size) {
5454
- case 'large':
5455
- return theme.size[3];
5456
- case 'medium':
5457
- return theme.size[2];
5458
- default:
5459
- return theme.size[1];
5460
- }
5461
- }
5462
- const dotAnimationKeyframe = ({
5463
- restingColor,
5464
- pulseColor
5465
- }) => /*#__PURE__*/keyframes("0%{background-color:", restingColor, ";transform:scale(1);}50%{background-color:", pulseColor, ";transform:scale(1.2);}100%{background-color:", restingColor, ";transform:scale(1);}" + ("" ), "" );
5466
- const staticLoaderStyles = makeStyles(theme => ({
5467
- root: {
5468
- alignItems: 'center',
5469
- justifyContent: 'center',
5470
- flexDirection: 'row',
5471
- columnGap: 8
5472
- },
5473
- dot: {
5474
- borderRadius: theme.border.radius[32],
5475
- backgroundColor: theme.color.background.defaultDark
5476
- }
5477
- }));
5478
- const DOT_COUNT = 3;
5479
- const LoaderDot = ({
5480
- dotId,
5481
- variant,
5482
- restingColor,
5483
- pulseColor,
5484
- styleConfig
5485
- }) => {
4094
+ }));
4095
+ const DOT_COUNT = 3;
4096
+ const LoaderDot = ({
4097
+ dotId,
4098
+ variant,
4099
+ restingColor,
4100
+ pulseColor,
4101
+ styleConfig
4102
+ }) => {
5486
4103
  const {
5487
4104
  root: dotStyles = []
5488
4105
  } = styleConfig || {};
@@ -5565,6 +4182,8 @@
5565
4182
  ButtonColor["SECONDARY"] = "secondary";
5566
4183
  ButtonColor["TERTIARY"] = "tertiary";
5567
4184
  ButtonColor["NEUTRAL"] = "neutral";
4185
+ ButtonColor["SUCCESS"] = "success";
4186
+ ButtonColor["DANGER"] = "danger";
5568
4187
  })(ButtonColor || (ButtonColor = {}));
5569
4188
  const getButtonSizeStyles = (theme, size) => {
5570
4189
  switch (size) {
@@ -5656,6 +4275,18 @@
5656
4275
  backgroundColor: theme.color.button.containedTertiaryBg
5657
4276
  };
5658
4277
  }
4278
+ case ButtonColor.SUCCESS:
4279
+ {
4280
+ return {
4281
+ backgroundColor: theme.color.button.containedSuccessBg
4282
+ };
4283
+ }
4284
+ case ButtonColor.DANGER:
4285
+ {
4286
+ return {
4287
+ backgroundColor: theme.color.button.containedDangerBg
4288
+ };
4289
+ }
5659
4290
  default:
5660
4291
  {
5661
4292
  return {
@@ -5699,6 +4330,20 @@
5699
4330
  borderColor: theme.color.button.outlinedNeutralBorder
5700
4331
  };
5701
4332
  }
4333
+ case ButtonColor.SUCCESS:
4334
+ {
4335
+ return {
4336
+ backgroundColor: theme.color.button.outlinedSuccessBg,
4337
+ borderColor: theme.color.button.outlinedSuccessBorder
4338
+ };
4339
+ }
4340
+ case ButtonColor.DANGER:
4341
+ {
4342
+ return {
4343
+ backgroundColor: theme.color.button.outlinedDangerBg,
4344
+ borderColor: theme.color.button.outlinedDangerBorder
4345
+ };
4346
+ }
5702
4347
  default:
5703
4348
  {
5704
4349
  return {
@@ -5742,6 +4387,14 @@
5742
4387
  {
5743
4388
  return theme.color.button.containedTertiaryLabel;
5744
4389
  }
4390
+ case ButtonColor.SUCCESS:
4391
+ {
4392
+ return theme.color.button.containedSuccessLabel;
4393
+ }
4394
+ case ButtonColor.DANGER:
4395
+ {
4396
+ return theme.color.button.containedDangerLabel;
4397
+ }
5745
4398
  default:
5746
4399
  {
5747
4400
  return theme.color.button.containedPrimaryLabel;
@@ -5769,6 +4422,14 @@
5769
4422
  {
5770
4423
  return theme.color.button.outlinedNeutralLabel;
5771
4424
  }
4425
+ case ButtonColor.SUCCESS:
4426
+ {
4427
+ return theme.color.button.outlinedSuccessLabel;
4428
+ }
4429
+ case ButtonColor.DANGER:
4430
+ {
4431
+ return theme.color.button.outlinedDangerLabel;
4432
+ }
5772
4433
  default:
5773
4434
  {
5774
4435
  return theme.color.button.outlinedPrimaryLabel;
@@ -5840,7 +4501,7 @@
5840
4501
  minWidth: isFullWidth ? '100%' : 'auto'
5841
4502
  });
5842
4503
  };
5843
- const staticButtonStyles = makeStyles$1(theme => {
4504
+ const staticButtonStyles = makeStyles(theme => {
5844
4505
  return {
5845
4506
  root: {
5846
4507
  display: 'flex',
@@ -5886,7 +4547,7 @@
5886
4547
  rest = __rest(_a, ["size", "variant", "color", "isFullWidth", "disabled", "onClick", "prefixIcon", "suffixIcon", "children", "loading", "styleConfig", "noHover"]);
5887
4548
  const theme = ctDesignTheme.useTheme();
5888
4549
  const [isHover, setHover] = React.useState(false);
5889
- const buttonStyles = useStyles$1(theme => {
4550
+ const buttonStyles = useStyles(theme => {
5890
4551
  return {
5891
4552
  root: getButtonStyles({
5892
4553
  theme: theme,
@@ -5910,7 +4571,7 @@
5910
4571
  const buttonLabelColor = React.useMemo(() => {
5911
4572
  return getButtonVariantLabelColor(variant, color, disabled, theme, loading);
5912
4573
  }, [variant, color, disabled, theme, loading]);
5913
- const mergedRootStyles = useWebMergeStyles$1([staticButtonStyles.root, buttonStyles.root, ...customRootStyles], [staticButtonStyles.root, buttonStyles.root, customRootStyles]);
4574
+ const mergedRootStyles = useWebMergeStyles([staticButtonStyles.root, buttonStyles.root, ...customRootStyles], [staticButtonStyles.root, buttonStyles.root, customRootStyles]);
5914
4575
  const handleClick = React.useCallback(event => {
5915
4576
  if (!disabled && onClick && !loading) onClick({
5916
4577
  stopPropagation: () => event.stopPropagation(),
@@ -5926,12 +4587,12 @@
5926
4587
  onMouseEnter: () => setHover(true),
5927
4588
  onMouseLeave: () => setHover(false),
5928
4589
  children: loading ? jsxRuntimeExports.jsx(DottedLoader, {}) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
5929
- children: [prefixIcon && jsxRuntimeExports.jsx(Container$1, {
4590
+ children: [prefixIcon && jsxRuntimeExports.jsx(Container, {
5930
4591
  styleConfig: {
5931
4592
  root: [staticButtonStyles.prefixIcon, ...customPrefixIconContainerStyles]
5932
4593
  },
5933
4594
  children: prefixIcon
5934
- }), jsxRuntimeExports.jsx(Container$1, {
4595
+ }), jsxRuntimeExports.jsx(Container, {
5935
4596
  styleConfig: {
5936
4597
  root: customContainerStyles
5937
4598
  },
@@ -5941,7 +4602,7 @@
5941
4602
  styleConfig: customTypographyStyles,
5942
4603
  children: children
5943
4604
  })
5944
- }), suffixIcon && jsxRuntimeExports.jsx(Container$1, {
4605
+ }), suffixIcon && jsxRuntimeExports.jsx(Container, {
5945
4606
  styleConfig: {
5946
4607
  root: [staticButtonStyles.suffixIcon, ...customSuffixIconContainerStyles]
5947
4608
  },