@ornikar/kitt-universal 3.1.0 → 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 (48) 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/TypographyIcon.d.ts +2 -2
  27. package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
  28. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  29. package/dist/definitions/utils/withTheme.d.ts +2 -2
  30. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  31. package/dist/index-browser-all.es.android.js +398 -219
  32. package/dist/index-browser-all.es.android.js.map +1 -1
  33. package/dist/index-browser-all.es.ios.js +398 -219
  34. package/dist/index-browser-all.es.ios.js.map +1 -1
  35. package/dist/index-browser-all.es.js +399 -221
  36. package/dist/index-browser-all.es.js.map +1 -1
  37. package/dist/index-browser-all.es.web.js +398 -213
  38. package/dist/index-browser-all.es.web.js.map +1 -1
  39. package/dist/index-node-14.17.cjs.js +387 -178
  40. package/dist/index-node-14.17.cjs.js.map +1 -1
  41. package/dist/index-node-14.17.cjs.web.css +1 -0
  42. package/dist/index-node-14.17.cjs.web.js +376 -182
  43. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  44. package/dist/styles.css +1 -0
  45. package/dist/tsbuildinfo +1 -1
  46. package/package.json +2 -2
  47. package/dist/definitions/Button/ButtonPressable.d.ts +0 -13
  48. package/dist/definitions/Button/ButtonPressable.d.ts.map +0 -1
@@ -5,14 +5,14 @@ export * from '@ornikar/kitt-icons';
5
5
  import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, TextInput, Pressable, ActivityIndicator, TouchableOpacity, View, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1 } from 'react-native';
6
6
  export { useWindowDimensions as useWindowSize } from 'react-native';
7
7
  import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
- import { useRef, useEffect, cloneElement, useContext, createContext, useState, useMemo, forwardRef, Fragment, Children } from 'react';
8
+ import { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children } from 'react';
9
9
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
10
+ import Animated$1, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring } from 'react-native-reanimated';
10
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
11
12
  import { parse } from 'twemoji-parser';
12
13
  import { openBrowserAsync } from 'expo-web-browser';
13
14
  import _extends from '@babel/runtime/helpers/extends';
14
15
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
15
- import Animated$1, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
16
16
  import { styled as styled$1 } from '@linaria/react';
17
17
  import DateTimePicker from '@react-native-community/datetimepicker';
18
18
  import { FormattedMessage } from 'react-intl';
@@ -51,7 +51,7 @@ function SpinningIcon(_ref) {
51
51
  });
52
52
  }
53
53
 
54
- var IconContainer$2 = /*#__PURE__*/styled.View.withConfig({
54
+ var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
55
55
  displayName: "Icon__IconContainer"
56
56
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
57
57
  var color = _ref.color;
@@ -77,7 +77,7 @@ function Icon(_ref5) {
77
77
  var clonedIcon = /*#__PURE__*/cloneElement(icon, {
78
78
  color: color
79
79
  });
80
- return /*#__PURE__*/jsx(IconContainer$2, {
80
+ return /*#__PURE__*/jsx(IconContainer$1, {
81
81
  align: align,
82
82
  size: size,
83
83
  color: color,
@@ -135,11 +135,11 @@ var KittBreakpointsMax = {
135
135
  LARGE: KittBreakpoints.WIDE - 1
136
136
  };
137
137
 
138
- var _excluded$c = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
138
+ var _excluded$d = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
139
139
 
140
- function ownKeys$i(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; }
140
+ function ownKeys$h(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
141
 
142
- function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
142
+ function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
143
143
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
144
144
  var TypographyColorContext = /*#__PURE__*/createContext('black');
145
145
  function useTypographyColor() {
@@ -202,7 +202,7 @@ function Typography(_ref3) {
202
202
  large = _ref3.large,
203
203
  variant = _ref3.variant,
204
204
  color = _ref3.color,
205
- otherProps = _objectWithoutProperties(_ref3, _excluded$c);
205
+ otherProps = _objectWithoutProperties(_ref3, _excluded$d);
206
206
 
207
207
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
208
208
  var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
@@ -213,14 +213,14 @@ function Typography(_ref3) {
213
213
  var colorWithDefaultToBlack = color !== null && color !== void 0 ? color : isHeaderTypographyInContext !== undefined ? undefined : 'black';
214
214
  var content = base ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
215
215
  value: isHeader,
216
- children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$i({
216
+ children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
217
217
  $color: colorWithDefaultToBlack,
218
218
  $isHeader: isHeader,
219
219
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
220
220
  $variant: nonNullableVariant,
221
221
  accessibilityRole: accessibilityRole || undefined
222
222
  }, otherProps))
223
- }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$i({
223
+ }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
224
224
  $color: colorWithDefaultToBlack,
225
225
  $isHeader: isHeader,
226
226
  $variant: nonNullableVariant,
@@ -233,13 +233,13 @@ function Typography(_ref3) {
233
233
  }
234
234
 
235
235
  function TypographyText(props) {
236
- return /*#__PURE__*/jsx(Typography, _objectSpread$i({
236
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h({
237
237
  accessibilityRole: null
238
238
  }, props));
239
239
  }
240
240
 
241
241
  function TypographyParagraph(props) {
242
- return /*#__PURE__*/jsx(Typography, _objectSpread$i({
242
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h({
243
243
  accessibilityRole: "paragraph"
244
244
  }, props));
245
245
  }
@@ -247,7 +247,7 @@ function TypographyParagraph(props) {
247
247
  var createHeading = function (level, defaultBase) {
248
248
  // https://github.com/necolas/react-native-web/issues/401
249
249
  function TypographyHeading(props) {
250
- return /*#__PURE__*/jsx(Typography, _objectSpread$i(_objectSpread$i({
250
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h(_objectSpread$h({
251
251
  accessibilityRole: "header",
252
252
  base: defaultBase
253
253
  }, props), {}, {
@@ -283,11 +283,11 @@ Typography.h4 = createHeading(4, 'header4');
283
283
 
284
284
  Typography.h5 = createHeading(5, 'header5');
285
285
 
286
- var _excluded$b = ["size"];
286
+ var _excluded$c = ["size"];
287
287
 
288
- function ownKeys$h(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; }
288
+ 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; }
289
289
 
290
- function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
290
+ function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
291
291
 
292
292
  var getFirstCharacter = function (string) {
293
293
  return string ? string[0] : '';
@@ -354,95 +354,242 @@ function AvatarContent(_ref5) {
354
354
  function Avatar(_ref6) {
355
355
  var _ref6$size = _ref6.size,
356
356
  size = _ref6$size === void 0 ? 40 : _ref6$size,
357
- rest = _objectWithoutProperties(_ref6, _excluded$b);
357
+ rest = _objectWithoutProperties(_ref6, _excluded$c);
358
358
 
359
- return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$h(_objectSpread$h({}, rest), {}, {
359
+ return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$g(_objectSpread$g({}, rest), {}, {
360
360
  size: size,
361
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$h(_objectSpread$h({}, rest), {}, {
361
+ children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g(_objectSpread$g({}, rest), {}, {
362
362
  size: size
363
363
  }))
364
364
  }));
365
365
  }
366
366
 
367
- var _excluded$a = ["color"],
368
- _excluded2$2 = ["color"];
367
+ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
368
+ displayName: "AnimatedButtonPressable__StyledPressable"
369
+ })(["", ""], function (_ref) {
370
+ var $isStretch = _ref.$isStretch;
371
+ if ($isStretch) return undefined;
372
+ return 'align-self: flex-start;';
373
+ });
374
+ var StyledAnimatedView = /*#__PURE__*/styled(Animated$1.View).withConfig({
375
+ displayName: "AnimatedButtonPressable__StyledAnimatedView"
376
+ })(["border-radius:", ";"], function (_ref2) {
377
+ var theme = _ref2.theme;
378
+ return theme.kitt.button.borderRadius;
379
+ });
380
+ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
381
+ var children = _ref3.children,
382
+ disabled = _ref3.disabled,
383
+ accessibilityRole = _ref3.accessibilityRole,
384
+ $type = _ref3.$type,
385
+ $isStretch = _ref3.$isStretch,
386
+ href = _ref3.href,
387
+ hrefAttrs = _ref3.hrefAttrs,
388
+ testID = _ref3.testID,
389
+ onPress = _ref3.onPress;
390
+ var theme = /*#__PURE__*/useTheme();
391
+ var pressed = useSharedValue(0);
392
+ var color = useSharedValue(0);
393
+ var _theme$kitt$button$$t = theme.kitt.button[$type],
394
+ backgroundColor = _theme$kitt$button$$t.backgroundColor,
395
+ pressedBackgroundColor = _theme$kitt$button$$t.pressedBackgroundColor;
396
+ var scale = theme.kitt.button.scale;
397
+ var scaleStyles = useAnimatedStyle(function () {
398
+ var _f = function () {
399
+ return {
400
+ backgroundColor: interpolateColor(color.value, [0, 1], [backgroundColor, pressedBackgroundColor]),
401
+ transform: [{
402
+ scale: withSpring(pressed.value ? scale.base.active : scale.base["default"])
403
+ }]
404
+ };
405
+ };
369
406
 
370
- 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; }
407
+ _f._closure = {
408
+ interpolateColor: interpolateColor,
409
+ color: color,
410
+ backgroundColor: backgroundColor,
411
+ pressedBackgroundColor: pressedBackgroundColor,
412
+ withSpring: withSpring,
413
+ pressed: pressed,
414
+ scale: {
415
+ base: {
416
+ active: scale.base.active,
417
+ "default": scale.base["default"]
418
+ }
419
+ }
420
+ };
421
+ _f.asString = "function _f(){const{interpolateColor,color,backgroundColor,pressedBackgroundColor,withSpring,pressed,scale}=jsThis._closure;{return{backgroundColor:interpolateColor(color.value,[0,1],[backgroundColor,pressedBackgroundColor]),transform:[{scale:withSpring(pressed.value?scale.base.active:scale.base.default)}]};}}";
422
+ _f.__workletHash = 5368461229978;
423
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (53:41)";
424
+ _f.__optimalization = 2;
371
425
 
372
- function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
426
+ global.__reanimatedWorkletInit(_f);
373
427
 
374
- function TypographyIconInheritColor(props) {
375
- var color = useTypographyColor();
376
- var theme = /*#__PURE__*/useTheme();
377
- return /*#__PURE__*/jsx(Icon, _objectSpread$g(_objectSpread$g({}, props), {}, {
378
- color: theme.kitt.typography.colors[color]
379
- }));
380
- }
428
+ return _f;
429
+ }());
430
+
431
+ var handlePressInOut = function (pressIn) {
432
+ color.value = withSpring(pressIn ? 1 : 0);
433
+ pressed.value = pressIn ? 1 : 0;
434
+ };
435
+
436
+ return /*#__PURE__*/jsx(StyledPressable, {
437
+ ref: ref,
438
+ disabled: disabled,
439
+ accessibilityRole: accessibilityRole,
440
+ testID: testID,
441
+ href: href,
442
+ hrefAttrs: hrefAttrs,
443
+ $isStretch: $isStretch,
444
+ $type: $type,
445
+ onPress: onPress,
446
+ onPressIn: function onPressIn() {
447
+ handlePressInOut(true);
448
+ },
449
+ onPressOut: function onPressOut() {
450
+ handlePressInOut(false);
451
+ },
452
+ children: /*#__PURE__*/jsx(StyledAnimatedView, {
453
+ style: disabled ? [{
454
+ transform: [{
455
+ scale: 1
456
+ }]
457
+ }] : [scaleStyles],
458
+ children: children
459
+ })
460
+ });
461
+ });
462
+
463
+ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
464
+ displayName: "BaseStyledButtonPressable"
465
+ })(["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) {
466
+ var theme = _ref.theme;
467
+ return theme.kitt.button.minWidth;
468
+ }, function (_ref2) {
469
+ var theme = _ref2.theme,
470
+ $isStretch = _ref2.$isStretch;
471
+ return $isStretch ? '100%' : theme.kitt.button.maxWidth;
472
+ }, function (_ref3) {
473
+ var $isStretch = _ref3.$isStretch;
474
+ return $isStretch ? '100%' : 'auto';
475
+ }, function (_ref4) {
476
+ var theme = _ref4.theme;
477
+ return theme.kitt.button.minHeight;
478
+ }, function (_ref5) {
479
+ var theme = _ref5.theme;
480
+ return theme.kitt.button.borderRadius;
481
+ }, function (_ref6) {
482
+ var theme = _ref6.theme,
483
+ $isDisabled = _ref6.$isDisabled,
484
+ $type = _ref6.$type;
485
+ if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
486
+ if (Platform.OS !== 'web') return 'transparent';
487
+ return theme.kitt.button[$type].backgroundColor;
488
+ }, function (_ref7) {
489
+ var theme = _ref7.theme,
490
+ $isLarge = _ref7.$isLarge,
491
+ $isDisabled = _ref7.$isDisabled;
492
+ var _theme$kitt$button$co = theme.kitt.button.contentPadding,
493
+ large = _theme$kitt$button$co.large,
494
+ defaultPadding = _theme$kitt$button$co["default"],
495
+ disabledPadding = _theme$kitt$button$co.disabled;
496
+ if ($isLarge) return large;
497
+ if ($isDisabled) return disabledPadding;
498
+ return defaultPadding;
499
+ });
500
+
501
+ var _excluded$b = ["color"],
502
+ _excluded2$2 = ["color"];
503
+
504
+ 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; }
505
+
506
+ function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
381
507
 
382
508
  function TypographyIconSpecifiedColor(_ref) {
383
509
  var color = _ref.color,
384
- otherProps = _objectWithoutProperties(_ref, _excluded$a);
510
+ props = _objectWithoutProperties(_ref, _excluded$b);
385
511
 
386
512
  var theme = /*#__PURE__*/useTheme();
387
- return /*#__PURE__*/jsx(Icon, _objectSpread$g(_objectSpread$g({}, otherProps), {}, {
388
- color: theme.kitt.typography.colors[color]
513
+ return /*#__PURE__*/jsx(Icon, _objectSpread$f(_objectSpread$f({}, props), {}, {
514
+ color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
389
515
  }));
390
516
  }
391
517
 
518
+ function TypographyIconInheritColor(props) {
519
+ var color = useTypographyColor();
520
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$f({
521
+ color: color
522
+ }, props));
523
+ }
524
+
392
525
  function TypographyIcon(_ref2) {
393
526
  var color = _ref2.color,
394
- otherProps = _objectWithoutProperties(_ref2, _excluded2$2);
527
+ props = _objectWithoutProperties(_ref2, _excluded2$2);
395
528
 
396
529
  if (color) {
397
- return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$g({
530
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$f({
398
531
  color: color
399
- }, otherProps));
532
+ }, props));
400
533
  }
401
534
 
402
- return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$g({}, otherProps));
535
+ return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$f({}, props));
403
536
  }
404
537
 
405
- 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; }
538
+ function isSubtle(type) {
539
+ return type.startsWith('subtle');
540
+ }
406
541
 
407
- function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
542
+ var _excluded$a = ["type", "isDisabled", "$isStretch", "icon", "children"];
543
+
544
+ 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; }
408
545
 
409
- var getTextColorByType = function (type, isPressed, disabled) {
410
- if (disabled) return 'black-light';
546
+ 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; }
411
547
 
548
+ var getTextColorByType = function (type) {
412
549
  switch (type) {
413
550
  case 'primary':
414
551
  return 'white';
415
552
 
553
+ case 'white':
554
+ return 'white';
555
+
416
556
  case 'subtle':
417
- return isPressed ? 'primary-light' : 'primary';
557
+ return 'primary';
418
558
 
419
559
  case 'subtle-dark':
420
- return isPressed ? 'black-light' : 'black';
560
+ return 'black';
421
561
 
422
- case 'secondary':
423
562
  default:
424
563
  return 'black';
425
564
  }
426
565
  };
427
566
 
428
- var ButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
429
- displayName: "ButtonContent__ButtonText"
430
- })(["text-align:center;"]);
431
- var Content$1 = /*#__PURE__*/styled.View.withConfig({
432
- displayName: "ButtonContent__Content"
433
- })(["flex-direction:row;align-items:center;justify-content:center;flex:", ";"], function (_ref) {
434
- var stretch = _ref.stretch,
435
- iconOnly = _ref.iconOnly;
436
- return "".concat(stretch || iconOnly ? 1 : 0, " 1 auto");
567
+ var StyledButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
568
+ displayName: "ButtonContent__StyledButtonText"
569
+ })(["text-align:center;", " ", ""], function () {
570
+ // Make the multilines case work properly on native
571
+ // Breaks the web implem
572
+ if (Platform.OS === 'web') return undefined;
573
+ return "\n flex-shrink: 1;\n ";
574
+ }, function (_ref) {
575
+ var $type = _ref.$type,
576
+ $isDisabled = _ref.$isDisabled;
577
+
578
+ /* For subltes button, color changes when hovered.
579
+ * We don't want to use a mouse event handler with a react state to handle it
580
+ * For this precise case, we've decided to work outside the typography logic
581
+ */
582
+ if (Platform.OS !== 'web' || $isDisabled || !isSubtle($type)) return undefined;
583
+ return 'color: inherit';
437
584
  });
438
- var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
439
- displayName: "ButtonContent__IconContainer"
585
+ var StyledIconContainer = /*#__PURE__*/styled.View.withConfig({
586
+ displayName: "ButtonContent__StyledIconContainer"
440
587
  })(["", ""], function (_ref2) {
441
588
  var theme = _ref2.theme,
442
- iconPosition = _ref2.iconPosition;
443
- var value = theme.kitt.spacing * 3;
589
+ $iconPosition = _ref2.$iconPosition;
590
+ var value = theme.kitt.spacing * 2;
444
591
 
445
- if (iconPosition === 'left') {
592
+ if ($iconPosition === 'left') {
446
593
  return "margin: 0 ".concat(value, "px 0 0;");
447
594
  }
448
595
 
@@ -451,39 +598,32 @@ var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
451
598
 
452
599
  function ButtonIcon(_ref3) {
453
600
  var icon = _ref3.icon,
454
- spin = _ref3.spin,
455
601
  color = _ref3.color,
456
- size = _ref3.size,
602
+ spin = _ref3.spin,
457
603
  iconPosition = _ref3.iconPosition,
458
604
  testID = _ref3.testID;
459
- return /*#__PURE__*/jsx(IconContainer$1, {
460
- iconPosition: iconPosition,
605
+ return /*#__PURE__*/jsx(StyledIconContainer, {
606
+ $iconPosition: iconPosition,
461
607
  children: /*#__PURE__*/jsx(TypographyIcon, {
462
608
  icon: icon,
463
609
  spin: spin,
464
- color: color,
465
- size: size,
466
- testID: testID
610
+ testID: testID,
611
+ color: color
467
612
  })
468
613
  });
469
614
  }
470
615
 
471
- function ButtonContent(_ref4) {
616
+ var StyledChildrenWithIcon = /*#__PURE__*/styled.View.withConfig({
617
+ displayName: "ButtonContent__StyledChildrenWithIcon"
618
+ })(["align-items:center;justify-content:center;flex-direction:row;"]);
619
+ function ButtonContentChildren(_ref4) {
472
620
  var type = _ref4.type,
473
- isPressed = _ref4.isPressed,
474
- stretch = _ref4.stretch,
475
621
  icon = _ref4.icon,
476
622
  iconPosition = _ref4.iconPosition,
477
623
  iconSpin = _ref4.iconSpin,
478
- disabled = _ref4.disabled,
624
+ isDisabled = _ref4.isDisabled,
625
+ color = _ref4.color,
479
626
  children = _ref4.children;
480
- var color = getTextColorByType(type, Boolean(isPressed), Boolean(disabled));
481
- var theme = /*#__PURE__*/useTheme();
482
- var sharedIconProps = {
483
- spin: iconSpin,
484
- color: color,
485
- size: theme.kitt.button.iconSize
486
- };
487
627
 
488
628
  if ((process.env.NODE_ENV !== "production")) {
489
629
  if (!(children || icon)) {
@@ -491,128 +631,136 @@ function ButtonContent(_ref4) {
491
631
  }
492
632
  }
493
633
 
634
+ var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
635
+
494
636
  if (!children) {
495
- return /*#__PURE__*/jsx(Content$1, {
496
- iconOnly: true,
497
- stretch: stretch,
498
- children: /*#__PURE__*/jsx(TypographyIcon, _objectSpread$f(_objectSpread$f({}, sharedIconProps), {}, {
499
- icon: icon
500
- }))
637
+ return /*#__PURE__*/jsx(TypographyIcon, {
638
+ spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
639
+ ,
640
+ icon: icon,
641
+ color: isWebSubtle ? 'inherit' : color
501
642
  });
502
643
  }
503
644
 
504
- return /*#__PURE__*/jsxs(Content$1, {
505
- stretch: stretch,
506
- children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$f(_objectSpread$f({}, sharedIconProps), {}, {
507
- icon: icon,
508
- iconPosition: iconPosition,
509
- testID: "button-left-icon"
510
- })) : null, /*#__PURE__*/jsx(ButtonText, {
645
+ var buttonIconSharedProps = {
646
+ type: type,
647
+ spin: iconSpin,
648
+ iconPosition: iconPosition,
649
+ color: isWebSubtle ? 'inherit' : color
650
+ };
651
+ return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
652
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, buttonIconSharedProps), {}, {
653
+ testID: "button-left-icon",
654
+ icon: icon
655
+ })) : null, /*#__PURE__*/jsx(StyledButtonText, {
511
656
  base: "body",
512
- color: color,
513
657
  variant: "bold",
658
+ $type: type,
659
+ $isDisabled: isDisabled // set to color: inherit via styled components
660
+ ,
661
+ color: isWebSubtle ? undefined : color,
514
662
  children: children
515
- }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$f(_objectSpread$f({}, sharedIconProps), {}, {
516
- icon: icon,
517
- iconPosition: iconPosition
663
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, buttonIconSharedProps), {}, {
664
+ icon: icon
518
665
  })) : null]
519
666
  });
520
667
  }
668
+ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
669
+ displayName: "ButtonContent__ButtonContentContainer"
670
+ })(["line-height:16px;", " ", ";"], function (_ref5) {
671
+ var $isStretch = _ref5.$isStretch,
672
+ $isIconOnly = _ref5.$isIconOnly;
673
+ // Make the multilines case work properly on web
674
+ // Breaks the native implem
675
+ if (Platform.OS !== 'web') return undefined;
676
+ return "\n flex: ".concat($isStretch || $isIconOnly ? 1 : 0, " 1 auto;\n ");
677
+ }, function (_ref6) {
678
+ var $isSubtle = _ref6.$isSubtle;
679
+ if (Platform.OS !== 'web' || !$isSubtle) return undefined; // Needed for subtle type
521
680
 
522
- var ButtonPressable = /*#__PURE__*/styled.Pressable.withConfig({
523
- displayName: "ButtonPressable"
524
- })(["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) {
681
+ return 'color: inherit';
682
+ });
683
+ function ButtonContent(_ref7) {
684
+ var type = _ref7.type,
685
+ isDisabled = _ref7.isDisabled,
686
+ $isStretch = _ref7.$isStretch,
687
+ icon = _ref7.icon,
688
+ children = _ref7.children,
689
+ props = _objectWithoutProperties(_ref7, _excluded$a);
690
+
691
+ var color = isDisabled ? 'black-light' : getTextColorByType(type);
692
+ return /*#__PURE__*/jsx(ButtonContentContainer, {
693
+ $isSubtle: isSubtle(type),
694
+ $isStretch: $isStretch,
695
+ $isIconOnly: Boolean(!children && icon),
696
+ children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$e(_objectSpread$e({
697
+ icon: icon,
698
+ type: type,
699
+ isDisabled: isDisabled,
700
+ color: color
701
+ }, props), {}, {
702
+ children: children
703
+ }))
704
+ });
705
+ }
706
+
707
+ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
708
+ displayName: "StyledDisabled"
709
+ })(["position:absolute;top:0;left:0;right:0;bottom:0;border:", ";border-radius:", ";"], function (_ref) {
525
710
  var theme = _ref.theme;
526
- return theme.kitt.button.minWidth;
711
+ var _theme$kitt$button = theme.kitt.button,
712
+ borderWidth = _theme$kitt$button.borderWidth,
713
+ disabled = _theme$kitt$button.disabled;
714
+ return "".concat(borderWidth.disabled, " solid ").concat(disabled.borderColor);
527
715
  }, function (_ref2) {
528
- var theme = _ref2.theme,
529
- stretch = _ref2.stretch;
530
- return stretch ? 'auto' : theme.kitt.button.maxWidth;
531
- }, function (_ref3) {
532
- var stretch = _ref3.stretch;
533
- return stretch ? '100%' : 'auto';
534
- }, function (_ref4) {
535
- var theme = _ref4.theme;
536
- return theme.kitt.button.minHeight;
537
- }, function (_ref5) {
538
- var theme = _ref5.theme,
539
- isPressed = _ref5.isPressed,
540
- disabled = _ref5.disabled,
541
- type = _ref5.type;
542
-
543
- if (disabled) {
544
- return theme.kitt.button[type].disabledBackgroundColor;
545
- }
546
-
547
- return isPressed ? theme.kitt.button[type].pressedBackgroundColor : theme.kitt.button[type].backgroundColor;
548
- }, function (_ref6) {
549
- var theme = _ref6.theme;
550
- return theme.kitt.button.contentPadding["default"];
551
- }, function (_ref7) {
552
- var theme = _ref7.theme;
716
+ var theme = _ref2.theme;
553
717
  return theme.kitt.button.borderRadius;
554
- }, function (_ref8) {
555
- var theme = _ref8.theme,
556
- disabled = _ref8.disabled,
557
- type = _ref8.type;
558
- return disabled ? theme.kitt.button[type].disabledBorderColor : 'transparent';
559
- }, function (_ref9) {
560
- var theme = _ref9.theme;
561
- return theme.kitt.button.borderWidth;
562
718
  });
563
719
 
564
- 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; }
565
-
566
- 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; }
567
- function Button(_ref) {
720
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
568
721
  var children = _ref.children,
569
722
  _ref$type = _ref.type,
570
- type = _ref$type === void 0 ? 'secondary' : _ref$type,
723
+ type = _ref$type === void 0 ? 'default' : _ref$type,
724
+ disabled = _ref.disabled,
725
+ stretch = _ref.stretch,
726
+ large = _ref.large,
571
727
  icon = _ref.icon,
572
728
  _ref$iconPosition = _ref.iconPosition,
573
729
  iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
574
730
  iconSpin = _ref.iconSpin,
575
- stretch = _ref.stretch,
576
- disabled = _ref.disabled,
577
731
  testID = _ref.testID,
578
732
  href = _ref.href,
579
733
  hrefAttrs = _ref.hrefAttrs,
734
+ _ref$accessibilityRol = _ref.accessibilityRole,
735
+ accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
580
736
  onPress = _ref.onPress;
581
-
582
- var _useState = useState(false),
583
- _useState2 = _slicedToArray(_useState, 2),
584
- isPressed = _useState2[0],
585
- setIsPressed = _useState2[1];
586
-
587
- var sharedProps = {
588
- type: type,
589
- stretch: stretch,
590
- disabled: disabled
591
- };
592
- return /*#__PURE__*/jsx(ButtonPressable // eslint-disable-next-line unicorn/expiring-todo-comments
593
- // TODO: When designs are defined, update with the proper onPress styles to mimic TouchableHighlight
594
- // underlayColor={globalTheme.button[type].pressedBackgroundColor}
595
- , _objectSpread$e(_objectSpread$e({}, sharedProps), {}, {
596
- isPressed: isPressed,
597
- accessibilityRole: "button",
737
+ return /*#__PURE__*/jsx(AnimatedButtonPressable, {
738
+ ref: ref,
739
+ accessibilityRole: accessibilityRole,
598
740
  testID: testID,
599
741
  href: href,
600
742
  hrefAttrs: hrefAttrs,
743
+ disabled: disabled,
744
+ $isStretch: stretch,
745
+ $type: type,
601
746
  onPress: onPress,
602
- onPressIn: function handleButtonPressIn() {
603
- return setIsPressed(true);
604
- },
605
- onPressOut: function handleButtonPressOut() {
606
- return setIsPressed(false);
607
- },
608
- children: /*#__PURE__*/jsx(ButtonContent, _objectSpread$e(_objectSpread$e({}, sharedProps), {}, {
609
- icon: icon,
610
- iconPosition: iconPosition,
611
- iconSpin: iconSpin,
612
- children: children
613
- }))
614
- }));
615
- }
747
+ children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
748
+ $type: type,
749
+ $isStretch: stretch,
750
+ $isLarge: large,
751
+ $isDisabled: disabled,
752
+ children: [/*#__PURE__*/jsx(ButtonContent, {
753
+ type: type,
754
+ $isStretch: stretch,
755
+ isDisabled: disabled,
756
+ icon: icon,
757
+ iconPosition: iconPosition,
758
+ iconSpin: iconSpin,
759
+ children: children
760
+ }), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
761
+ })
762
+ });
763
+ });
616
764
 
617
765
  var Container$6 = /*#__PURE__*/styled.View.withConfig({
618
766
  displayName: "Card__Container"
@@ -1277,8 +1425,7 @@ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) {
1277
1425
  // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
1278
1426
  // };
1279
1427
  // }
1280
- function withTheme( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1281
- WrappedComponent) {
1428
+ function withTheme(WrappedComponent) {
1282
1429
  return function (props) {
1283
1430
  var theme = /*#__PURE__*/useTheme();
1284
1431
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$9({
@@ -2429,47 +2576,98 @@ var avatarLateOceanTheme = {
2429
2576
  }
2430
2577
  };
2431
2578
 
2579
+ var colorsLateOceanTheme = {
2580
+ primary: lateOceanColorPalette.lateOcean,
2581
+ primaryLight: lateOceanColorPalette.lateOceanLight1,
2582
+ accent: lateOceanColorPalette.warmEmbrace,
2583
+ accentLight: lateOceanColorPalette.warmEmbraceLight1,
2584
+ success: lateOceanColorPalette.viride,
2585
+ correct: lateOceanColorPalette.viride,
2586
+ danger: lateOceanColorPalette.englishVermillon,
2587
+ separator: lateOceanColorPalette.black100,
2588
+ hover: lateOceanColorPalette.black100,
2589
+ black: lateOceanColorPalette.black1000,
2590
+ uiBackground: lateOceanColorPalette.black25,
2591
+ uiBackgroundLight: lateOceanColorPalette.white,
2592
+ transparent: lateOceanColorPalette.transparent,
2593
+ disabled: lateOceanColorPalette.black50,
2594
+ overlay: {
2595
+ dark: 'rgba(41, 48, 51, 0.25)',
2596
+ light: 'rgba(255, 255, 255, 0.90)',
2597
+ fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2598
+ }
2599
+ };
2600
+
2432
2601
  var buttonLateOceanTheme = {
2433
2602
  borderRadius: '30px',
2434
- borderWidth: '2px',
2435
- minHeight: '42px',
2603
+ borderWidth: {
2604
+ disabled: '2px',
2605
+ focus: '3px'
2606
+ },
2607
+ minHeight: '40px',
2436
2608
  minWidth: '40px',
2437
2609
  maxWidth: '335px',
2438
- iconSize: 18,
2610
+ scale: {
2611
+ base: {
2612
+ "default": 1,
2613
+ hover: 0.95,
2614
+ active: 0.95
2615
+ },
2616
+ medium: {
2617
+ hover: 1.05
2618
+ }
2619
+ },
2439
2620
  contentPadding: {
2440
- "default": '8px 16px'
2621
+ "default": '8px 16px 7px',
2622
+ large: '12px 24px 11px',
2623
+ disabled: '6px 14px 5px'
2441
2624
  },
2442
- primary: {
2443
- backgroundColor: lateOceanColorPalette.lateOcean,
2444
- disabledBackgroundColor: lateOceanColorPalette.black50,
2445
- pressedBackgroundColor: lateOceanColorPalette.lateOceanLight1,
2446
- disabledBorderColor: lateOceanColorPalette.black100
2625
+ transition: {
2626
+ duration: '200ms',
2627
+ timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
2447
2628
  },
2448
- secondary: {
2629
+ "default": {
2449
2630
  backgroundColor: 'rgba(0, 0, 0, 0.05)',
2450
- disabledBackgroundColor: lateOceanColorPalette.black50,
2451
2631
  pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2452
- disabledBorderColor: lateOceanColorPalette.black100
2453
- },
2454
- subtle: {
2455
- backgroundColor: lateOceanColorPalette.transparent,
2456
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2457
- pressedBackgroundColor: lateOceanColorPalette.transparent,
2458
- disabledBorderColor: lateOceanColorPalette.transparent
2632
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2633
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
2459
2634
  },
2460
- 'subtle-dark': {
2461
- backgroundColor: lateOceanColorPalette.transparent,
2462
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2463
- pressedBackgroundColor: lateOceanColorPalette.transparent,
2464
- disabledBorderColor: lateOceanColorPalette.transparent
2635
+ primary: {
2636
+ backgroundColor: colorsLateOceanTheme.primary,
2637
+ pressedBackgroundColor: colorsLateOceanTheme.primaryLight,
2638
+ hoverBackgroundColor: colorsLateOceanTheme.primaryLight,
2639
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
2465
2640
  },
2466
2641
  white: {
2467
2642
  backgroundColor: 'rgba(255, 255, 255, 0.05)',
2468
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2469
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2470
2643
  pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2471
- focusBorderColor: 'rgba(255, 255, 255, 0.1)',
2472
- disabledBorderColor: lateOceanColorPalette.transparent
2644
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2645
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
2646
+ },
2647
+ subtle: {
2648
+ backgroundColor: colorsLateOceanTheme.transparent,
2649
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2650
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2651
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
2652
+ color: colorsLateOceanTheme.primary,
2653
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
2654
+ activeColor: 'rgba(76, 52, 224, 0.8)'
2655
+ },
2656
+ 'subtle-dark': {
2657
+ backgroundColor: colorsLateOceanTheme.transparent,
2658
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2659
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2660
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
2661
+ color: colorsLateOceanTheme.black,
2662
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
2663
+ activeColor: 'rgba(0, 0, 0, 0.8)'
2664
+ },
2665
+ disabled: {
2666
+ backgroundColor: colorsLateOceanTheme.disabled,
2667
+ pressedBackgroundColor: colorsLateOceanTheme.disabled,
2668
+ hoverBackgroundColor: colorsLateOceanTheme.disabled,
2669
+ focusBorderColor: lateOceanColorPalette.black100,
2670
+ borderColor: lateOceanColorPalette.black100
2473
2671
  }
2474
2672
  };
2475
2673
 
@@ -2491,26 +2689,6 @@ var cardLateOceanTheme = {
2491
2689
  }
2492
2690
  };
2493
2691
 
2494
- var colorsLateOceanTheme = {
2495
- primary: lateOceanColorPalette.lateOcean,
2496
- primaryLight: lateOceanColorPalette.lateOceanLight1,
2497
- accent: lateOceanColorPalette.warmEmbrace,
2498
- accentLight: lateOceanColorPalette.warmEmbraceLight1,
2499
- success: lateOceanColorPalette.viride,
2500
- correct: lateOceanColorPalette.viride,
2501
- danger: lateOceanColorPalette.englishVermillon,
2502
- separator: lateOceanColorPalette.black100,
2503
- hover: lateOceanColorPalette.black100,
2504
- black: lateOceanColorPalette.black1000,
2505
- uiBackground: lateOceanColorPalette.black25,
2506
- uiBackgroundLight: lateOceanColorPalette.white,
2507
- overlay: {
2508
- dark: 'rgba(41, 48, 51, 0.25)',
2509
- light: 'rgba(255, 255, 255, 0.90)',
2510
- fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2511
- }
2512
- };
2513
-
2514
2692
  var feedbackMessageLateOceanTheme = {
2515
2693
  backgroundColors: {
2516
2694
  success: lateOceanColorPalette.viride,
@@ -2624,11 +2802,11 @@ var iconButton = {
2624
2802
  },
2625
2803
  disabled: {
2626
2804
  scale: 1,
2627
- backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
2628
- borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
2805
+ backgroundColor: buttonLateOceanTheme.disabled.backgroundColor,
2806
+ borderColor: buttonLateOceanTheme.disabled.borderColor
2629
2807
  },
2630
2808
  "default": {
2631
- pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
2809
+ pressedBackgroundColor: buttonLateOceanTheme["default"].pressedBackgroundColor
2632
2810
  },
2633
2811
  white: {
2634
2812
  pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
@@ -2794,7 +2972,7 @@ var breakpoints = {
2794
2972
  wideBreakpoint: 'max-width: 1279px'
2795
2973
  }
2796
2974
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2797
- // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2975
+ // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
2798
2976
 
2799
2977
  var theme = {
2800
2978
  spacing: 4,