@ornikar/kitt-universal 3.0.0-beta.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/definitions/Button/AnimatedButtonPressable.d.ts +14 -0
  2. package/dist/definitions/Button/AnimatedButtonPressable.d.ts.map +1 -0
  3. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +17 -0
  4. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -0
  5. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +11 -0
  6. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -0
  7. package/dist/definitions/Button/Button.d.ts +9 -4
  8. package/dist/definitions/Button/Button.d.ts.map +1 -1
  9. package/dist/definitions/Button/ButtonContent.d.ts +11 -3
  10. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  11. package/dist/definitions/Button/StyledDisabled.d.ts +3 -0
  12. package/dist/definitions/Button/StyledDisabled.d.ts.map +1 -0
  13. package/dist/definitions/Button/isSubtle.d.ts +3 -0
  14. package/dist/definitions/Button/isSubtle.d.ts.map +1 -0
  15. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  16. package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
  17. package/dist/definitions/Loader/LargeLoader.web.d.ts.map +1 -1
  18. package/dist/definitions/Loader/Loader.d.ts +1 -1
  19. package/dist/definitions/Loader/Loader.d.ts.map +1 -1
  20. package/dist/definitions/themes/default.d.ts +3 -43
  21. package/dist/definitions/themes/default.d.ts.map +1 -1
  22. package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +42 -35
  23. package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts.map +1 -1
  24. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +2 -0
  25. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
  26. package/dist/definitions/typography/Typography.d.ts +11 -11
  27. package/dist/definitions/typography/TypographyIcon.d.ts +2 -2
  28. package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
  29. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  30. package/dist/definitions/utils/withTheme.d.ts +2 -2
  31. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  32. package/dist/index-browser-all.es.android.js +402 -223
  33. package/dist/index-browser-all.es.android.js.map +1 -1
  34. package/dist/index-browser-all.es.css +1 -1
  35. package/dist/index-browser-all.es.ios.js +402 -223
  36. package/dist/index-browser-all.es.ios.js.map +1 -1
  37. package/dist/index-browser-all.es.js +406 -227
  38. package/dist/index-browser-all.es.js.map +1 -1
  39. package/dist/index-browser-all.es.web.js +399 -214
  40. package/dist/index-browser-all.es.web.js.map +1 -1
  41. package/dist/index-node-14.17.cjs.css +1 -1
  42. package/dist/index-node-14.17.cjs.js +428 -196
  43. package/dist/index-node-14.17.cjs.js.map +1 -1
  44. package/dist/index-node-14.17.cjs.web.css +5 -0
  45. package/dist/index-node-14.17.cjs.web.js +3173 -0
  46. package/dist/index-node-14.17.cjs.web.js.map +1 -0
  47. package/dist/styles.css +2 -1
  48. package/dist/tsbuildinfo +1 -1
  49. package/package.json +9 -8
  50. package/CHANGELOG.md +0 -131
  51. package/dist/definitions/Button/ButtonPressable.d.ts +0 -13
  52. package/dist/definitions/Button/ButtonPressable.d.ts.map +0 -1
@@ -5,7 +5,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
5
5
  import { UserIcon, EyeIcon, EyeOffIcon, LoaderIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
6
6
  export * from '@ornikar/kitt-icons';
7
7
  import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
- import { cloneElement, useContext, createContext, useState, useMemo, forwardRef, Fragment, Children, useEffect } from 'react';
8
+ import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children, useEffect } from 'react';
9
9
  import { styled } from '@linaria/react';
10
10
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
11
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -29,8 +29,7 @@ function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) {
29
29
  // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
30
30
  // };
31
31
  // }
32
- function withTheme( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
33
- WrappedComponent) {
32
+ function withTheme(WrappedComponent) {
34
33
  return function (props) {
35
34
  var theme = /*#__PURE__*/useTheme();
36
35
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$h({
@@ -50,7 +49,7 @@ function SpinningIcon(_ref) {
50
49
  });
51
50
  }
52
51
 
53
- var IconContainer$2 = /*#__PURE__*/styled$1(View).withConfig({
52
+ var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
54
53
  displayName: "Icon__IconContainer",
55
54
  componentId: "kitt-universal__sc-usm0ol-0"
56
55
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
@@ -77,7 +76,7 @@ function Icon(_ref5) {
77
76
  var clonedIcon = /*#__PURE__*/cloneElement(icon, {
78
77
  color: color
79
78
  });
80
- return /*#__PURE__*/jsx(IconContainer$2, {
79
+ return /*#__PURE__*/jsx(IconContainer$1, {
81
80
  align: align,
82
81
  size: size,
83
82
  color: color,
@@ -135,7 +134,7 @@ var KittBreakpointsMax = {
135
134
  LARGE: KittBreakpoints.WIDE - 1
136
135
  };
137
136
 
138
- var _excluded$c = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
137
+ var _excluded$e = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
139
138
 
140
139
  function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
141
140
 
@@ -203,7 +202,7 @@ function Typography(_ref3) {
203
202
  large = _ref3.large,
204
203
  variant = _ref3.variant,
205
204
  color = _ref3.color,
206
- otherProps = _objectWithoutProperties(_ref3, _excluded$c);
205
+ otherProps = _objectWithoutProperties(_ref3, _excluded$e);
207
206
 
208
207
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
209
208
  var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
@@ -284,7 +283,7 @@ Typography.h4 = createHeading(4, 'header4');
284
283
 
285
284
  Typography.h5 = createHeading(5, 'header5');
286
285
 
287
- var _excluded$b = ["size"];
286
+ var _excluded$d = ["size"];
288
287
 
289
288
  function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
290
289
 
@@ -356,7 +355,7 @@ function AvatarContent(_ref5) {
356
355
  function Avatar(_ref6) {
357
356
  var _ref6$size = _ref6.size,
358
357
  size = _ref6$size === void 0 ? 40 : _ref6$size,
359
- rest = _objectWithoutProperties(_ref6, _excluded$b);
358
+ rest = _objectWithoutProperties(_ref6, _excluded$d);
360
359
 
361
360
  return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$f(_objectSpread$f({}, rest), {}, {
362
361
  size: size,
@@ -366,88 +365,257 @@ function Avatar(_ref6) {
366
365
  }));
367
366
  }
368
367
 
369
- var _excluded$a = ["color"],
370
- _excluded2$2 = ["color"];
368
+ function isSubtle(type) {
369
+ return type.startsWith('subtle');
370
+ }
371
+
372
+ var _excluded$c = ["$type", "$isStretch", "disabled"];
371
373
 
372
374
  function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
373
375
 
374
376
  function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
377
+ var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
378
+ name: "AnimatedButtonPressableContainer",
379
+ "class": "a1vkj3mh",
380
+ vars: {
381
+ "a1vkj3mh-0": [function (_ref) {
382
+ var $isStretch = _ref.$isStretch;
383
+ return $isStretch ? 'inherit' : 'inline-flex';
384
+ }],
385
+ "a1vkj3mh-1": [function (_ref2) {
386
+ var $isStretch = _ref2.$isStretch;
387
+ return $isStretch ? 'stretch' : 'baseline';
388
+ }],
389
+ "a1vkj3mh-2": [function (_ref3) {
390
+ var theme = _ref3.theme;
391
+ return theme.breakpoints.min.mediumBreakpoint;
392
+ }],
393
+ "a1vkj3mh-3": [function (_ref4) {
394
+ var theme = _ref4.theme;
395
+ return theme.kitt.button.scale.medium.hover;
396
+ }],
397
+ "a1vkj3mh-4": [function (_ref5) {
398
+ var theme = _ref5.theme,
399
+ $isDisabled = _ref5.$isDisabled;
400
+ return "scale(".concat($isDisabled ? 1 : theme.kitt.button.scale.base.active, ")");
401
+ }],
402
+ "a1vkj3mh-5": [function (_ref6) {
403
+ var theme = _ref6.theme,
404
+ $type = _ref6.$type,
405
+ $isDisabled = _ref6.$isDisabled;
406
+ if ($isDisabled) return theme.kitt.button.disabled.hoverBackgroundColor;
407
+ return theme.kitt.button[$type].hoverBackgroundColor;
408
+ }],
409
+ "a1vkj3mh-6": [function (_ref7) {
410
+ var theme = _ref7.theme;
411
+ var _theme$kitt$button$tr = theme.kitt.button.transition,
412
+ duration = _theme$kitt$button$tr.duration,
413
+ timingFunction = _theme$kitt$button$tr.timingFunction;
414
+ return "color, background, border-color, ".concat(duration, " ").concat(timingFunction);
415
+ }],
416
+ "a1vkj3mh-7": [function (_ref8) {
417
+ var theme = _ref8.theme;
418
+ return theme.kitt.button.borderRadius;
419
+ }],
420
+ "a1vkj3mh-8": [function (_ref9) {
421
+ var theme = _ref9.theme;
422
+ return "opacity ".concat(theme.kitt.button.transition.duration, " ").concat(theme.kitt.button.transition.timingFunction);
423
+ }],
424
+ "a1vkj3mh-9": [function (_ref10) {
425
+ var $isDisabled = _ref10.$isDisabled;
426
+ return $isDisabled ? 1 : 0;
427
+ }],
428
+ "a1vkj3mh-10": [function (_ref11) {
429
+ var theme = _ref11.theme;
430
+ return "-".concat(theme.kitt.button.borderWidth.disabled);
431
+ }],
432
+ "a1vkj3mh-12": [function (_ref12) {
433
+ var theme = _ref12.theme;
434
+ return "calc(100% - ".concat(parseInt(theme.kitt.button.borderWidth.disabled, 10) * 0.5, "px)");
435
+ }],
436
+ "a1vkj3mh-14": [function (_ref13) {
437
+ var theme = _ref13.theme;
438
+ return "".concat(theme.kitt.button.disabled.borderColor, " solid ").concat(theme.kitt.button.borderWidth.disabled);
439
+ }],
440
+ "a1vkj3mh-15": [function (_ref14) {
441
+ var theme = _ref14.theme,
442
+ $type = _ref14.$type;
443
+ return "".concat(theme.kitt.button.borderWidth.focus, " solid ").concat(theme.kitt.button[$type].focusBorderColor);
444
+ }],
445
+ "a1vkj3mh-16": [function (_ref15) {
446
+ var theme = _ref15.theme;
447
+ return "-".concat(theme.kitt.button.borderWidth.focus);
448
+ }],
449
+ "a1vkj3mh-18": [function (_ref16) {
450
+ var theme = _ref16.theme,
451
+ $type = _ref16.$type,
452
+ $isDisabled = _ref16.$isDisabled;
453
+ if ($isDisabled) return theme.kitt.typography.colors['black-light'];
454
+ if (!isSubtle($type)) return 'inherit';
455
+ return theme.kitt.button[$type].color;
456
+ }],
457
+ "a1vkj3mh-19": [function (_ref17) {
458
+ var theme = _ref17.theme,
459
+ $type = _ref17.$type,
460
+ $isDisabled = _ref17.$isDisabled;
461
+ if ($isDisabled) return theme.kitt.typography.colors['black-light'];
462
+ if (!isSubtle($type)) return 'inherit';
463
+ return theme.kitt.button[$type].hoverColor;
464
+ }],
465
+ "a1vkj3mh-20": [function (_ref18) {
466
+ var theme = _ref18.theme,
467
+ $type = _ref18.$type,
468
+ $isDisabled = _ref18.$isDisabled;
469
+ if ($isDisabled) return theme.kitt.typography.colors['black-light'];
470
+ if (!isSubtle($type)) return 'inherit';
471
+ return theme.kitt.button[$type].activeColor;
472
+ }]
473
+ }
474
+ }));
475
+ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref19, ref) {
476
+ var $type = _ref19.$type,
477
+ $isStretch = _ref19.$isStretch,
478
+ disabled = _ref19.disabled,
479
+ props = _objectWithoutProperties(_ref19, _excluded$c);
480
+
481
+ return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
482
+ ref: ref,
483
+ $type: $type,
484
+ $isDisabled: !!disabled,
485
+ $isStretch: $isStretch,
486
+ children: /*#__PURE__*/jsx(Pressable, _objectSpread$e({
487
+ disabled: disabled
488
+ }, props))
489
+ });
490
+ });
375
491
 
376
- function TypographyIconInheritColor(props) {
377
- var color = useTypographyColor();
378
- var theme = /*#__PURE__*/useTheme();
379
- return /*#__PURE__*/jsx(Icon, _objectSpread$e(_objectSpread$e({}, props), {}, {
380
- color: theme.kitt.typography.colors[color]
381
- }));
382
- }
492
+ var BaseStyledButtonPressable = /*#__PURE__*/styled$1(View).withConfig({
493
+ displayName: "BaseStyledButtonPressable",
494
+ componentId: "kitt-universal__sc-4k8lse-0"
495
+ })(["position:relative;min-width:", ";max-width:", ";width:", ";min-height:", ";border-radius:", ";flex-direction:row;align-items:center;justify-content:center;align-self:flex-start;background-color:", ";padding:", ";"], function (_ref) {
496
+ var theme = _ref.theme;
497
+ return theme.kitt.button.minWidth;
498
+ }, function (_ref2) {
499
+ var theme = _ref2.theme,
500
+ $isStretch = _ref2.$isStretch;
501
+ return $isStretch ? '100%' : theme.kitt.button.maxWidth;
502
+ }, function (_ref3) {
503
+ var $isStretch = _ref3.$isStretch;
504
+ return $isStretch ? '100%' : 'auto';
505
+ }, function (_ref4) {
506
+ var theme = _ref4.theme;
507
+ return theme.kitt.button.minHeight;
508
+ }, function (_ref5) {
509
+ var theme = _ref5.theme;
510
+ return theme.kitt.button.borderRadius;
511
+ }, function (_ref6) {
512
+ var theme = _ref6.theme,
513
+ $isDisabled = _ref6.$isDisabled,
514
+ $type = _ref6.$type;
515
+ if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
516
+ return theme.kitt.button[$type].backgroundColor;
517
+ }, function (_ref7) {
518
+ var theme = _ref7.theme,
519
+ $isLarge = _ref7.$isLarge,
520
+ $isDisabled = _ref7.$isDisabled;
521
+ var _theme$kitt$button$co = theme.kitt.button.contentPadding,
522
+ large = _theme$kitt$button$co.large,
523
+ defaultPadding = _theme$kitt$button$co["default"],
524
+ disabledPadding = _theme$kitt$button$co.disabled;
525
+ if ($isLarge) return large;
526
+ if ($isDisabled) return disabledPadding;
527
+ return defaultPadding;
528
+ });
529
+
530
+ var _excluded$b = ["color"],
531
+ _excluded2$2 = ["color"];
532
+
533
+ function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
534
+
535
+ function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
383
536
 
384
537
  function TypographyIconSpecifiedColor(_ref) {
385
538
  var color = _ref.color,
386
- otherProps = _objectWithoutProperties(_ref, _excluded$a);
539
+ props = _objectWithoutProperties(_ref, _excluded$b);
387
540
 
388
541
  var theme = /*#__PURE__*/useTheme();
389
- return /*#__PURE__*/jsx(Icon, _objectSpread$e(_objectSpread$e({}, otherProps), {}, {
390
- color: theme.kitt.typography.colors[color]
542
+ return /*#__PURE__*/jsx(Icon, _objectSpread$d(_objectSpread$d({}, props), {}, {
543
+ color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
391
544
  }));
392
545
  }
393
546
 
547
+ function TypographyIconInheritColor(props) {
548
+ var color = useTypographyColor();
549
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$d({
550
+ color: color
551
+ }, props));
552
+ }
553
+
394
554
  function TypographyIcon(_ref2) {
395
555
  var color = _ref2.color,
396
- otherProps = _objectWithoutProperties(_ref2, _excluded2$2);
556
+ props = _objectWithoutProperties(_ref2, _excluded2$2);
397
557
 
398
558
  if (color) {
399
- return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$e({
559
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$d({
400
560
  color: color
401
- }, otherProps));
561
+ }, props));
402
562
  }
403
563
 
404
- return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$e({}, otherProps));
564
+ return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$d({}, props));
405
565
  }
406
566
 
407
- function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
567
+ var _excluded$a = ["type", "isDisabled", "$isStretch", "icon", "children"];
408
568
 
409
- function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
569
+ function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
410
570
 
411
- var getTextColorByType = function (type, isPressed, disabled) {
412
- if (disabled) return 'black-light';
571
+ function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
413
572
 
573
+ var getTextColorByType = function (type) {
414
574
  switch (type) {
415
575
  case 'primary':
416
576
  return 'white';
417
577
 
578
+ case 'white':
579
+ return 'white';
580
+
418
581
  case 'subtle':
419
- return isPressed ? 'primary-light' : 'primary';
582
+ return 'primary';
420
583
 
421
584
  case 'subtle-dark':
422
- return isPressed ? 'black-light' : 'black';
585
+ return 'black';
423
586
 
424
- case 'secondary':
425
587
  default:
426
588
  return 'black';
427
589
  }
428
590
  };
429
591
 
430
- var ButtonText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
431
- displayName: "ButtonContent__ButtonText",
592
+ var StyledButtonText = /*#__PURE__*/styled$1(Typography.Text).withConfig({
593
+ displayName: "ButtonContent__StyledButtonText",
432
594
  componentId: "kitt-universal__sc-dnyw3n-0"
433
- })(["text-align:center;"]);
434
- var Content$1 = /*#__PURE__*/styled$1(View).withConfig({
435
- displayName: "ButtonContent__Content",
436
- componentId: "kitt-universal__sc-dnyw3n-1"
437
- })(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
438
- var stretch = _ref.stretch,
439
- iconOnly = _ref.iconOnly;
440
- return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
595
+ })(["text-align:center;", " ", ""], function () {
596
+ // Make the multilines case work properly on native
597
+ // Breaks the web implem
598
+ return undefined;
599
+ }, function (_ref) {
600
+ var $type = _ref.$type,
601
+ $isDisabled = _ref.$isDisabled;
602
+
603
+ /* For subltes button, color changes when hovered.
604
+ * We don't want to use a mouse event handler with a react state to handle it
605
+ * For this precise case, we've decided to work outside the typography logic
606
+ */
607
+ if ($isDisabled || !isSubtle($type)) return undefined;
608
+ return 'color: inherit';
441
609
  });
442
- var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
443
- displayName: "ButtonContent__IconContainer",
444
- componentId: "kitt-universal__sc-dnyw3n-2"
610
+ var StyledIconContainer = /*#__PURE__*/styled$1(View).withConfig({
611
+ displayName: "ButtonContent__StyledIconContainer",
612
+ componentId: "kitt-universal__sc-dnyw3n-1"
445
613
  })(["", ""], function (_ref2) {
446
614
  var theme = _ref2.theme,
447
- iconPosition = _ref2.iconPosition;
448
- var value = theme.kitt.spacing * 3;
615
+ $iconPosition = _ref2.$iconPosition;
616
+ var value = theme.kitt.spacing * 2;
449
617
 
450
- if (iconPosition === 'left') {
618
+ if ($iconPosition === 'left') {
451
619
  return "margin: 0 ".concat(value, "px 0 0;");
452
620
  }
453
621
 
@@ -456,39 +624,33 @@ var IconContainer$1 = /*#__PURE__*/styled$1(View).withConfig({
456
624
 
457
625
  function ButtonIcon(_ref3) {
458
626
  var icon = _ref3.icon,
459
- spin = _ref3.spin,
460
627
  color = _ref3.color,
461
- size = _ref3.size,
628
+ spin = _ref3.spin,
462
629
  iconPosition = _ref3.iconPosition,
463
630
  testID = _ref3.testID;
464
- return /*#__PURE__*/jsx(IconContainer$1, {
465
- iconPosition: iconPosition,
631
+ return /*#__PURE__*/jsx(StyledIconContainer, {
632
+ $iconPosition: iconPosition,
466
633
  children: /*#__PURE__*/jsx(TypographyIcon, {
467
634
  icon: icon,
468
635
  spin: spin,
469
- color: color,
470
- size: size,
471
- testID: testID
636
+ testID: testID,
637
+ color: color
472
638
  })
473
639
  });
474
640
  }
475
641
 
476
- function ButtonContent(_ref4) {
642
+ var StyledChildrenWithIcon = /*#__PURE__*/styled$1(View).withConfig({
643
+ displayName: "ButtonContent__StyledChildrenWithIcon",
644
+ componentId: "kitt-universal__sc-dnyw3n-2"
645
+ })(["align-items:center;justify-content:center;flex-direction:row;"]);
646
+ function ButtonContentChildren(_ref4) {
477
647
  var type = _ref4.type,
478
- isPressed = _ref4.isPressed,
479
- stretch = _ref4.stretch,
480
648
  icon = _ref4.icon,
481
649
  iconPosition = _ref4.iconPosition,
482
650
  iconSpin = _ref4.iconSpin,
483
- disabled = _ref4.disabled,
651
+ isDisabled = _ref4.isDisabled,
652
+ color = _ref4.color,
484
653
  children = _ref4.children;
485
- var color = getTextColorByType(type, Boolean(isPressed), Boolean(disabled));
486
- var theme = /*#__PURE__*/useTheme();
487
- var sharedIconProps = {
488
- spin: iconSpin,
489
- color: color,
490
- size: theme.kitt.button.iconSize
491
- };
492
654
 
493
655
  if ((process.env.NODE_ENV !== "production")) {
494
656
  if (!(children || icon)) {
@@ -496,129 +658,121 @@ function ButtonContent(_ref4) {
496
658
  }
497
659
  }
498
660
 
661
+ var isWebSubtle = isSubtle(type) && "web" === 'web' && !isDisabled;
662
+
499
663
  if (!children) {
500
- return /*#__PURE__*/jsx(Content$1, {
501
- iconOnly: true,
502
- stretch: stretch,
503
- children: /*#__PURE__*/jsx(TypographyIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
504
- icon: icon
505
- }))
664
+ return /*#__PURE__*/jsx(TypographyIcon, {
665
+ spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
666
+ ,
667
+ icon: icon,
668
+ color: isWebSubtle ? 'inherit' : color
506
669
  });
507
670
  }
508
671
 
509
- return /*#__PURE__*/jsxs(Content$1, {
510
- stretch: stretch,
511
- children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
512
- icon: icon,
513
- iconPosition: iconPosition,
514
- testID: "button-left-icon"
515
- })) : null, /*#__PURE__*/jsx(ButtonText, {
672
+ var buttonIconSharedProps = {
673
+ type: type,
674
+ spin: iconSpin,
675
+ iconPosition: iconPosition,
676
+ color: isWebSubtle ? 'inherit' : color
677
+ };
678
+ return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
679
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$c(_objectSpread$c({}, buttonIconSharedProps), {}, {
680
+ testID: "button-left-icon",
681
+ icon: icon
682
+ })) : null, /*#__PURE__*/jsx(StyledButtonText, {
516
683
  base: "body",
517
- color: color,
518
684
  variant: "bold",
685
+ $type: type,
686
+ $isDisabled: isDisabled // set to color: inherit via styled components
687
+ ,
688
+ color: isWebSubtle ? undefined : color,
519
689
  children: children
520
- }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$d(_objectSpread$d({}, sharedIconProps), {}, {
521
- icon: icon,
522
- iconPosition: iconPosition
690
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$c(_objectSpread$c({}, buttonIconSharedProps), {}, {
691
+ icon: icon
523
692
  })) : null]
524
693
  });
525
694
  }
526
-
527
- var ButtonPressable = /*#__PURE__*/styled$1(Pressable).withConfig({
528
- displayName: "ButtonPressable",
529
- componentId: "kitt-universal__sc-7ckel6-0"
530
- })(["min-width:", ";max-width:", ";width:", ";min-height:", ";background-color:", ";padding:", ";flex-direction:row;align-self:flex-start;border-radius:", ";border-color:", ";border-width:", ";"], function (_ref) {
531
- var theme = _ref.theme;
532
- return theme.kitt.button.minWidth;
533
- }, function (_ref2) {
534
- var theme = _ref2.theme,
535
- stretch = _ref2.stretch;
536
- return stretch ? 'auto' : theme.kitt.button.maxWidth;
537
- }, function (_ref3) {
538
- var stretch = _ref3.stretch;
539
- return stretch ? '100%' : 'auto';
540
- }, function (_ref4) {
541
- var theme = _ref4.theme;
542
- return theme.kitt.button.minHeight;
543
- }, function (_ref5) {
544
- var theme = _ref5.theme,
545
- isPressed = _ref5.isPressed,
546
- disabled = _ref5.disabled,
547
- type = _ref5.type;
548
-
549
- if (disabled) {
550
- return theme.kitt.button[type].disabledBackgroundColor;
551
- }
552
-
553
- return isPressed ? theme.kitt.button[type].pressedBackgroundColor : theme.kitt.button[type].backgroundColor;
695
+ var ButtonContentContainer = /*#__PURE__*/styled$1(View).withConfig({
696
+ displayName: "ButtonContent__ButtonContentContainer",
697
+ componentId: "kitt-universal__sc-dnyw3n-3"
698
+ })(["line-height:16px;", " ", ";"], function (_ref5) {
699
+ var $isStretch = _ref5.$isStretch,
700
+ $isIconOnly = _ref5.$isIconOnly;
701
+ return "\n flex: ".concat($isStretch || $isIconOnly ? 1 : 0, " 1 auto;\n ");
554
702
  }, function (_ref6) {
555
- var theme = _ref6.theme;
556
- return theme.kitt.button.contentPadding["default"];
557
- }, function (_ref7) {
558
- var theme = _ref7.theme;
559
- return theme.kitt.button.borderRadius;
560
- }, function (_ref8) {
561
- var theme = _ref8.theme,
562
- disabled = _ref8.disabled,
563
- type = _ref8.type;
564
- return disabled ? theme.kitt.button[type].disabledBorderColor : 'transparent';
565
- }, function (_ref9) {
566
- var theme = _ref9.theme;
567
- return theme.kitt.button.borderWidth;
568
- });
703
+ var $isSubtle = _ref6.$isSubtle;
704
+ if (!$isSubtle) return undefined; // Needed for subtle type
569
705
 
570
- function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
706
+ return 'color: inherit';
707
+ });
708
+ function ButtonContent(_ref7) {
709
+ var type = _ref7.type,
710
+ isDisabled = _ref7.isDisabled,
711
+ $isStretch = _ref7.$isStretch,
712
+ icon = _ref7.icon,
713
+ children = _ref7.children,
714
+ props = _objectWithoutProperties(_ref7, _excluded$a);
715
+
716
+ var color = isDisabled ? 'black-light' : getTextColorByType(type);
717
+ return /*#__PURE__*/jsx(ButtonContentContainer, {
718
+ $isSubtle: isSubtle(type),
719
+ $isStretch: $isStretch,
720
+ $isIconOnly: Boolean(!children && icon),
721
+ children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$c(_objectSpread$c({
722
+ icon: icon,
723
+ type: type,
724
+ isDisabled: isDisabled,
725
+ color: color
726
+ }, props), {}, {
727
+ children: children
728
+ }))
729
+ });
730
+ }
571
731
 
572
- function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
573
- function Button(_ref) {
732
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
574
733
  var children = _ref.children,
575
734
  _ref$type = _ref.type,
576
- type = _ref$type === void 0 ? 'secondary' : _ref$type,
735
+ type = _ref$type === void 0 ? 'default' : _ref$type,
736
+ disabled = _ref.disabled,
737
+ stretch = _ref.stretch,
738
+ large = _ref.large,
577
739
  icon = _ref.icon,
578
740
  _ref$iconPosition = _ref.iconPosition,
579
741
  iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
580
742
  iconSpin = _ref.iconSpin,
581
- stretch = _ref.stretch,
582
- disabled = _ref.disabled,
583
743
  testID = _ref.testID,
584
744
  href = _ref.href,
585
745
  hrefAttrs = _ref.hrefAttrs,
746
+ _ref$accessibilityRol = _ref.accessibilityRole,
747
+ accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
586
748
  onPress = _ref.onPress;
587
-
588
- var _useState = useState(false),
589
- _useState2 = _slicedToArray(_useState, 2),
590
- isPressed = _useState2[0],
591
- setIsPressed = _useState2[1];
592
-
593
- var sharedProps = {
594
- type: type,
595
- stretch: stretch,
596
- disabled: disabled
597
- };
598
- return /*#__PURE__*/jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
599
- // TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
600
- // underlayColor={globalTheme.button[type].pressedBackgroundColor}
601
- , _objectSpread$c(_objectSpread$c({}, sharedProps), {}, {
602
- isPressed: isPressed,
603
- accessibilityRole: "button",
749
+ return /*#__PURE__*/jsx(AnimatedButtonPressable, {
750
+ ref: ref,
751
+ accessibilityRole: accessibilityRole,
604
752
  testID: testID,
605
753
  href: href,
606
754
  hrefAttrs: hrefAttrs,
755
+ disabled: disabled,
756
+ $isStretch: stretch,
757
+ $type: type,
607
758
  onPress: onPress,
608
- onPressIn: function handleButtonPressIn() {
609
- return setIsPressed(true);
610
- },
611
- onPressOut: function handleButtonPressOut() {
612
- return setIsPressed(false);
613
- },
614
- children: /*#__PURE__*/jsx(ButtonContent, _objectSpread$c(_objectSpread$c({}, sharedProps), {}, {
615
- icon: icon,
616
- iconPosition: iconPosition,
617
- iconSpin: iconSpin,
618
- children: children
619
- }))
620
- }));
621
- }
759
+ children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
760
+ $type: type,
761
+ $isStretch: stretch,
762
+ $isLarge: large,
763
+ $isDisabled: disabled,
764
+ children: [/*#__PURE__*/jsx(ButtonContent, {
765
+ type: type,
766
+ $isStretch: stretch,
767
+ isDisabled: disabled,
768
+ icon: icon,
769
+ iconPosition: iconPosition,
770
+ iconSpin: iconSpin,
771
+ children: children
772
+ }), null]
773
+ })
774
+ });
775
+ });
622
776
 
623
777
  var Container$5 = /*#__PURE__*/styled$1(View).withConfig({
624
778
  displayName: "Card__Container",
@@ -2361,47 +2515,98 @@ var avatarLateOceanTheme = {
2361
2515
  }
2362
2516
  };
2363
2517
 
2518
+ var colorsLateOceanTheme = {
2519
+ primary: lateOceanColorPalette.lateOcean,
2520
+ primaryLight: lateOceanColorPalette.lateOceanLight1,
2521
+ accent: lateOceanColorPalette.warmEmbrace,
2522
+ accentLight: lateOceanColorPalette.warmEmbraceLight1,
2523
+ success: lateOceanColorPalette.viride,
2524
+ correct: lateOceanColorPalette.viride,
2525
+ danger: lateOceanColorPalette.englishVermillon,
2526
+ separator: lateOceanColorPalette.black100,
2527
+ hover: lateOceanColorPalette.black100,
2528
+ black: lateOceanColorPalette.black1000,
2529
+ uiBackground: lateOceanColorPalette.black25,
2530
+ uiBackgroundLight: lateOceanColorPalette.white,
2531
+ transparent: lateOceanColorPalette.transparent,
2532
+ disabled: lateOceanColorPalette.black50,
2533
+ overlay: {
2534
+ dark: 'rgba(41, 48, 51, 0.25)',
2535
+ light: 'rgba(255, 255, 255, 0.90)',
2536
+ fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2537
+ }
2538
+ };
2539
+
2364
2540
  var buttonLateOceanTheme = {
2365
2541
  borderRadius: '30px',
2366
- borderWidth: '2px',
2367
- minHeight: '42px',
2542
+ borderWidth: {
2543
+ disabled: '2px',
2544
+ focus: '3px'
2545
+ },
2546
+ minHeight: '40px',
2368
2547
  minWidth: '40px',
2369
2548
  maxWidth: '335px',
2370
- iconSize: 18,
2549
+ scale: {
2550
+ base: {
2551
+ "default": 1,
2552
+ hover: 0.95,
2553
+ active: 0.95
2554
+ },
2555
+ medium: {
2556
+ hover: 1.05
2557
+ }
2558
+ },
2371
2559
  contentPadding: {
2372
- "default": '8px 16px'
2560
+ "default": '8px 16px 7px',
2561
+ large: '12px 24px 11px',
2562
+ disabled: '6px 14px 5px'
2373
2563
  },
2374
- primary: {
2375
- backgroundColor: lateOceanColorPalette.lateOcean,
2376
- disabledBackgroundColor: lateOceanColorPalette.black50,
2377
- pressedBackgroundColor: lateOceanColorPalette.lateOceanLight1,
2378
- disabledBorderColor: lateOceanColorPalette.black100
2564
+ transition: {
2565
+ duration: '200ms',
2566
+ timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
2379
2567
  },
2380
- secondary: {
2568
+ "default": {
2381
2569
  backgroundColor: 'rgba(0, 0, 0, 0.05)',
2382
- disabledBackgroundColor: lateOceanColorPalette.black50,
2383
2570
  pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2384
- disabledBorderColor: lateOceanColorPalette.black100
2385
- },
2386
- subtle: {
2387
- backgroundColor: lateOceanColorPalette.transparent,
2388
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2389
- pressedBackgroundColor: lateOceanColorPalette.transparent,
2390
- disabledBorderColor: lateOceanColorPalette.transparent
2571
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2572
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
2391
2573
  },
2392
- 'subtle-dark': {
2393
- backgroundColor: lateOceanColorPalette.transparent,
2394
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2395
- pressedBackgroundColor: lateOceanColorPalette.transparent,
2396
- disabledBorderColor: lateOceanColorPalette.transparent
2574
+ primary: {
2575
+ backgroundColor: colorsLateOceanTheme.primary,
2576
+ pressedBackgroundColor: colorsLateOceanTheme.primaryLight,
2577
+ hoverBackgroundColor: colorsLateOceanTheme.primaryLight,
2578
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
2397
2579
  },
2398
2580
  white: {
2399
2581
  backgroundColor: 'rgba(255, 255, 255, 0.05)',
2400
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2401
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2402
2582
  pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2403
- focusBorderColor: 'rgba(255, 255, 255, 0.1)',
2404
- disabledBorderColor: lateOceanColorPalette.transparent
2583
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2584
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
2585
+ },
2586
+ subtle: {
2587
+ backgroundColor: colorsLateOceanTheme.transparent,
2588
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2589
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2590
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
2591
+ color: colorsLateOceanTheme.primary,
2592
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
2593
+ activeColor: 'rgba(76, 52, 224, 0.8)'
2594
+ },
2595
+ 'subtle-dark': {
2596
+ backgroundColor: colorsLateOceanTheme.transparent,
2597
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2598
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2599
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
2600
+ color: colorsLateOceanTheme.black,
2601
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
2602
+ activeColor: 'rgba(0, 0, 0, 0.8)'
2603
+ },
2604
+ disabled: {
2605
+ backgroundColor: colorsLateOceanTheme.disabled,
2606
+ pressedBackgroundColor: colorsLateOceanTheme.disabled,
2607
+ hoverBackgroundColor: colorsLateOceanTheme.disabled,
2608
+ focusBorderColor: lateOceanColorPalette.black100,
2609
+ borderColor: lateOceanColorPalette.black100
2405
2610
  }
2406
2611
  };
2407
2612
 
@@ -2423,26 +2628,6 @@ var cardLateOceanTheme = {
2423
2628
  }
2424
2629
  };
2425
2630
 
2426
- var colorsLateOceanTheme = {
2427
- primary: lateOceanColorPalette.lateOcean,
2428
- primaryLight: lateOceanColorPalette.lateOceanLight1,
2429
- accent: lateOceanColorPalette.warmEmbrace,
2430
- accentLight: lateOceanColorPalette.warmEmbraceLight1,
2431
- success: lateOceanColorPalette.viride,
2432
- correct: lateOceanColorPalette.viride,
2433
- danger: lateOceanColorPalette.englishVermillon,
2434
- separator: lateOceanColorPalette.black100,
2435
- hover: lateOceanColorPalette.black100,
2436
- black: lateOceanColorPalette.black1000,
2437
- uiBackground: lateOceanColorPalette.black25,
2438
- uiBackgroundLight: lateOceanColorPalette.white,
2439
- overlay: {
2440
- dark: 'rgba(41, 48, 51, 0.25)',
2441
- light: 'rgba(255, 255, 255, 0.90)',
2442
- fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2443
- }
2444
- };
2445
-
2446
2631
  var feedbackMessageLateOceanTheme = {
2447
2632
  backgroundColors: {
2448
2633
  success: lateOceanColorPalette.viride,
@@ -2556,11 +2741,11 @@ var iconButton = {
2556
2741
  },
2557
2742
  disabled: {
2558
2743
  scale: 1,
2559
- backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
2560
- borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
2744
+ backgroundColor: buttonLateOceanTheme.disabled.backgroundColor,
2745
+ borderColor: buttonLateOceanTheme.disabled.borderColor
2561
2746
  },
2562
2747
  "default": {
2563
- pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
2748
+ pressedBackgroundColor: buttonLateOceanTheme["default"].pressedBackgroundColor
2564
2749
  },
2565
2750
  white: {
2566
2751
  pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
@@ -2726,7 +2911,7 @@ var breakpoints = {
2726
2911
  wideBreakpoint: 'max-width: 1279px'
2727
2912
  }
2728
2913
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2729
- // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2914
+ // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
2730
2915
 
2731
2916
  var theme = {
2732
2917
  spacing: 4,
@@ -3041,7 +3226,7 @@ function TypographyLink(_ref4) {
3041
3226
  accessibilityRole: "none",
3042
3227
  children: /*#__PURE__*/jsx(StyleWebWrapper, {
3043
3228
  as: TypographyLinkWebWrapper,
3044
- "data-nounderline": noUnderline,
3229
+ "data-nounderline": noUnderline ? true : undefined,
3045
3230
  children: /*#__PURE__*/jsx(StyledLink, {
3046
3231
  $disabled: disabled,
3047
3232
  $noUnderline: noUnderline,