@ornikar/kitt-universal 3.1.0 → 3.5.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 (71) 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/Skeleton/Skeleton.d.ts +14 -0
  21. package/dist/definitions/Skeleton/Skeleton.d.ts.map +1 -0
  22. package/dist/definitions/Skeleton/SkeletonContent.d.ts +8 -0
  23. package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -0
  24. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts +7 -0
  25. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +1 -0
  26. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  27. package/dist/definitions/index.d.ts +4 -0
  28. package/dist/definitions/index.d.ts.map +1 -1
  29. package/dist/definitions/themes/default.d.ts +4 -43
  30. package/dist/definitions/themes/default.d.ts.map +1 -1
  31. package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts +42 -35
  32. package/dist/definitions/themes/late-ocean/buttonLateOceanTheme.d.ts.map +1 -1
  33. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +2 -0
  34. package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
  35. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts +7 -0
  36. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts.map +1 -0
  37. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +2 -0
  38. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
  39. package/dist/definitions/typography/Typography.d.ts +2 -0
  40. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  41. package/dist/definitions/typography/TypographyIcon.d.ts +2 -2
  42. package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
  43. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  44. package/dist/definitions/utils/hexToRgba.d.ts +2 -0
  45. package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
  46. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +7 -2
  47. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts.map +1 -1
  48. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts +5 -2
  49. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts.map +1 -1
  50. package/dist/definitions/utils/withTheme.d.ts +2 -2
  51. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  52. package/dist/index-browser-all.es.android.js +614 -272
  53. package/dist/index-browser-all.es.android.js.map +1 -1
  54. package/dist/index-browser-all.es.css +2 -2
  55. package/dist/index-browser-all.es.ios.js +614 -272
  56. package/dist/index-browser-all.es.ios.js.map +1 -1
  57. package/dist/index-browser-all.es.js +654 -306
  58. package/dist/index-browser-all.es.js.map +1 -1
  59. package/dist/index-browser-all.es.web.js +608 -288
  60. package/dist/index-browser-all.es.web.js.map +1 -1
  61. package/dist/index-node-14.17.cjs.css +2 -2
  62. package/dist/index-node-14.17.cjs.js +602 -226
  63. package/dist/index-node-14.17.cjs.js.map +1 -1
  64. package/dist/index-node-14.17.cjs.web.css +4 -2
  65. package/dist/index-node-14.17.cjs.web.js +546 -220
  66. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  67. package/dist/styles.css +4 -2
  68. package/dist/tsbuildinfo +1 -1
  69. package/package.json +4 -3
  70. package/dist/definitions/Button/ButtonPressable.d.ts +0 -13
  71. package/dist/definitions/Button/ButtonPressable.d.ts.map +0 -1
@@ -5,15 +5,16 @@ 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, withRepeat, withTiming, Easing as Easing$1, interpolate } 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
+ import { LinearGradient } from 'expo-linear-gradient';
17
18
  import DateTimePicker from '@react-native-community/datetimepicker';
18
19
  import { FormattedMessage } from 'react-intl';
19
20
  import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
@@ -51,7 +52,7 @@ function SpinningIcon(_ref) {
51
52
  });
52
53
  }
53
54
 
54
- var IconContainer$2 = /*#__PURE__*/styled.View.withConfig({
55
+ var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
55
56
  displayName: "Icon__IconContainer"
56
57
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
57
58
  var color = _ref.color;
@@ -77,7 +78,7 @@ function Icon(_ref5) {
77
78
  var clonedIcon = /*#__PURE__*/cloneElement(icon, {
78
79
  color: color
79
80
  });
80
- return /*#__PURE__*/jsx(IconContainer$2, {
81
+ return /*#__PURE__*/jsx(IconContainer$1, {
81
82
  align: align,
82
83
  size: size,
83
84
  color: color,
@@ -135,11 +136,11 @@ var KittBreakpointsMax = {
135
136
  LARGE: KittBreakpoints.WIDE - 1
136
137
  };
137
138
 
138
- var _excluded$c = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
139
+ var _excluded$d = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
139
140
 
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; }
141
+ 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
142
 
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; }
143
+ 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
144
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
144
145
  var TypographyColorContext = /*#__PURE__*/createContext('black');
145
146
  function useTypographyColor() {
@@ -194,34 +195,53 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
194
195
  if (small && width >= KittBreakpoints.SMALL) return small;
195
196
  return base;
196
197
  }
197
- function Typography(_ref3) {
198
- var accessibilityRole = _ref3.accessibilityRole,
199
- base = _ref3.base,
200
- small = _ref3.small,
201
- medium = _ref3.medium,
202
- large = _ref3.large,
203
- variant = _ref3.variant,
204
- color = _ref3.color,
205
- otherProps = _objectWithoutProperties(_ref3, _excluded$c);
198
+ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, _ref3) {
199
+ var base = _ref3.base,
200
+ color = _ref3.color;
201
+ // return the props set or undefined. In case of undefined, the value will be inherited from its parents.
202
+ if (hasTypographyAncestor) return {
203
+ base: base,
204
+ color: color
205
+ };
206
+ return {
207
+ base: base !== null && base !== void 0 ? base : 'body',
208
+ color: color !== null && color !== void 0 ? color : 'black'
209
+ };
210
+ }
211
+ function Typography(_ref4) {
212
+ var accessibilityRole = _ref4.accessibilityRole,
213
+ base = _ref4.base,
214
+ small = _ref4.small,
215
+ medium = _ref4.medium,
216
+ large = _ref4.large,
217
+ variant = _ref4.variant,
218
+ color = _ref4.color,
219
+ otherProps = _objectWithoutProperties(_ref4, _excluded$d);
206
220
 
207
221
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
208
- var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
209
- var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
210
- var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular'; // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
211
- // redefine the color, just inherit from it
222
+ var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
212
223
 
213
- var colorWithDefaultToBlack = color !== null && color !== void 0 ? color : isHeaderTypographyInContext !== undefined ? undefined : 'black';
214
- var content = base ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
224
+ var _getTypographyInherit = getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
225
+ base: base,
226
+ color: color
227
+ }),
228
+ baseOrDefaultToBody = _getTypographyInherit.base,
229
+ colorOrDefaultToBlack = _getTypographyInherit.color;
230
+
231
+ var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
232
+ var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
233
+ var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
234
+ var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
215
235
  value: isHeader,
216
- children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$i({
217
- $color: colorWithDefaultToBlack,
236
+ children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
237
+ $color: colorOrDefaultToBlack,
218
238
  $isHeader: isHeader,
219
239
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
220
240
  $variant: nonNullableVariant,
221
241
  accessibilityRole: accessibilityRole || undefined
222
242
  }, otherProps))
223
- }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$i({
224
- $color: colorWithDefaultToBlack,
243
+ }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
244
+ $color: colorOrDefaultToBlack,
225
245
  $isHeader: isHeader,
226
246
  $variant: nonNullableVariant,
227
247
  accessibilityRole: accessibilityRole || undefined
@@ -233,13 +253,13 @@ function Typography(_ref3) {
233
253
  }
234
254
 
235
255
  function TypographyText(props) {
236
- return /*#__PURE__*/jsx(Typography, _objectSpread$i({
256
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h({
237
257
  accessibilityRole: null
238
258
  }, props));
239
259
  }
240
260
 
241
261
  function TypographyParagraph(props) {
242
- return /*#__PURE__*/jsx(Typography, _objectSpread$i({
262
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h({
243
263
  accessibilityRole: "paragraph"
244
264
  }, props));
245
265
  }
@@ -247,7 +267,7 @@ function TypographyParagraph(props) {
247
267
  var createHeading = function (level, defaultBase) {
248
268
  // https://github.com/necolas/react-native-web/issues/401
249
269
  function TypographyHeading(props) {
250
- return /*#__PURE__*/jsx(Typography, _objectSpread$i(_objectSpread$i({
270
+ return /*#__PURE__*/jsx(Typography, _objectSpread$h(_objectSpread$h({
251
271
  accessibilityRole: "header",
252
272
  base: defaultBase
253
273
  }, props), {}, {
@@ -283,11 +303,11 @@ Typography.h4 = createHeading(4, 'header4');
283
303
 
284
304
  Typography.h5 = createHeading(5, 'header5');
285
305
 
286
- var _excluded$b = ["size"];
306
+ var _excluded$c = ["size"];
287
307
 
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; }
308
+ 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
309
 
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; }
310
+ 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
311
 
292
312
  var getFirstCharacter = function (string) {
293
313
  return string ? string[0] : '';
@@ -354,95 +374,242 @@ function AvatarContent(_ref5) {
354
374
  function Avatar(_ref6) {
355
375
  var _ref6$size = _ref6.size,
356
376
  size = _ref6$size === void 0 ? 40 : _ref6$size,
357
- rest = _objectWithoutProperties(_ref6, _excluded$b);
377
+ rest = _objectWithoutProperties(_ref6, _excluded$c);
358
378
 
359
- return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$h(_objectSpread$h({}, rest), {}, {
379
+ return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$g(_objectSpread$g({}, rest), {}, {
360
380
  size: size,
361
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$h(_objectSpread$h({}, rest), {}, {
381
+ children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g(_objectSpread$g({}, rest), {}, {
362
382
  size: size
363
383
  }))
364
384
  }));
365
385
  }
366
386
 
367
- var _excluded$a = ["color"],
368
- _excluded2$2 = ["color"];
387
+ var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
388
+ displayName: "AnimatedButtonPressable__StyledPressable"
389
+ })(["", ""], function (_ref) {
390
+ var $isStretch = _ref.$isStretch;
391
+ if ($isStretch) return undefined;
392
+ return 'align-self: flex-start;';
393
+ });
394
+ var StyledAnimatedView = /*#__PURE__*/styled(Animated$1.View).withConfig({
395
+ displayName: "AnimatedButtonPressable__StyledAnimatedView"
396
+ })(["border-radius:", ";"], function (_ref2) {
397
+ var theme = _ref2.theme;
398
+ return theme.kitt.button.borderRadius;
399
+ });
400
+ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref3, ref) {
401
+ var children = _ref3.children,
402
+ disabled = _ref3.disabled,
403
+ accessibilityRole = _ref3.accessibilityRole,
404
+ $type = _ref3.$type,
405
+ $isStretch = _ref3.$isStretch,
406
+ href = _ref3.href,
407
+ hrefAttrs = _ref3.hrefAttrs,
408
+ testID = _ref3.testID,
409
+ onPress = _ref3.onPress;
410
+ var theme = /*#__PURE__*/useTheme();
411
+ var pressed = useSharedValue(0);
412
+ var color = useSharedValue(0);
413
+ var _theme$kitt$button$$t = theme.kitt.button[$type],
414
+ backgroundColor = _theme$kitt$button$$t.backgroundColor,
415
+ pressedBackgroundColor = _theme$kitt$button$$t.pressedBackgroundColor;
416
+ var scale = theme.kitt.button.scale;
417
+ var scaleStyles = useAnimatedStyle(function () {
418
+ var _f = function () {
419
+ return {
420
+ backgroundColor: interpolateColor(color.value, [0, 1], [backgroundColor, pressedBackgroundColor]),
421
+ transform: [{
422
+ scale: withSpring(pressed.value ? scale.base.active : scale.base["default"])
423
+ }]
424
+ };
425
+ };
369
426
 
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; }
427
+ _f._closure = {
428
+ interpolateColor: interpolateColor,
429
+ color: color,
430
+ backgroundColor: backgroundColor,
431
+ pressedBackgroundColor: pressedBackgroundColor,
432
+ withSpring: withSpring,
433
+ pressed: pressed,
434
+ scale: {
435
+ base: {
436
+ active: scale.base.active,
437
+ "default": scale.base["default"]
438
+ }
439
+ }
440
+ };
441
+ _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)}]};}}";
442
+ _f.__workletHash = 5368461229978;
443
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Button/AnimatedButtonPressable.tsx (53:41)";
444
+ _f.__optimalization = 2;
371
445
 
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; }
446
+ global.__reanimatedWorkletInit(_f);
373
447
 
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
- }
448
+ return _f;
449
+ }());
450
+
451
+ var handlePressInOut = function (pressIn) {
452
+ color.value = withSpring(pressIn ? 1 : 0);
453
+ pressed.value = pressIn ? 1 : 0;
454
+ };
455
+
456
+ return /*#__PURE__*/jsx(StyledPressable, {
457
+ ref: ref,
458
+ disabled: disabled,
459
+ accessibilityRole: accessibilityRole,
460
+ testID: testID,
461
+ href: href,
462
+ hrefAttrs: hrefAttrs,
463
+ $isStretch: $isStretch,
464
+ $type: $type,
465
+ onPress: onPress,
466
+ onPressIn: function onPressIn() {
467
+ handlePressInOut(true);
468
+ },
469
+ onPressOut: function onPressOut() {
470
+ handlePressInOut(false);
471
+ },
472
+ children: /*#__PURE__*/jsx(StyledAnimatedView, {
473
+ style: disabled ? [{
474
+ transform: [{
475
+ scale: 1
476
+ }]
477
+ }] : [scaleStyles],
478
+ children: children
479
+ })
480
+ });
481
+ });
482
+
483
+ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
484
+ displayName: "BaseStyledButtonPressable"
485
+ })(["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) {
486
+ var theme = _ref.theme;
487
+ return theme.kitt.button.minWidth;
488
+ }, function (_ref2) {
489
+ var theme = _ref2.theme,
490
+ $isStretch = _ref2.$isStretch;
491
+ return $isStretch ? '100%' : theme.kitt.button.maxWidth;
492
+ }, function (_ref3) {
493
+ var $isStretch = _ref3.$isStretch;
494
+ return $isStretch ? '100%' : 'auto';
495
+ }, function (_ref4) {
496
+ var theme = _ref4.theme;
497
+ return theme.kitt.button.minHeight;
498
+ }, function (_ref5) {
499
+ var theme = _ref5.theme;
500
+ return theme.kitt.button.borderRadius;
501
+ }, function (_ref6) {
502
+ var theme = _ref6.theme,
503
+ $isDisabled = _ref6.$isDisabled,
504
+ $type = _ref6.$type;
505
+ if ($isDisabled) return theme.kitt.button.disabled.backgroundColor;
506
+ if (Platform.OS !== 'web') return 'transparent';
507
+ return theme.kitt.button[$type].backgroundColor;
508
+ }, function (_ref7) {
509
+ var theme = _ref7.theme,
510
+ $isLarge = _ref7.$isLarge,
511
+ $isDisabled = _ref7.$isDisabled;
512
+ var _theme$kitt$button$co = theme.kitt.button.contentPadding,
513
+ large = _theme$kitt$button$co.large,
514
+ defaultPadding = _theme$kitt$button$co["default"],
515
+ disabledPadding = _theme$kitt$button$co.disabled;
516
+ if ($isLarge) return large;
517
+ if ($isDisabled) return disabledPadding;
518
+ return defaultPadding;
519
+ });
520
+
521
+ var _excluded$b = ["color"],
522
+ _excluded2$2 = ["color"];
523
+
524
+ 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; }
525
+
526
+ 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
527
 
382
528
  function TypographyIconSpecifiedColor(_ref) {
383
529
  var color = _ref.color,
384
- otherProps = _objectWithoutProperties(_ref, _excluded$a);
530
+ props = _objectWithoutProperties(_ref, _excluded$b);
385
531
 
386
532
  var theme = /*#__PURE__*/useTheme();
387
- return /*#__PURE__*/jsx(Icon, _objectSpread$g(_objectSpread$g({}, otherProps), {}, {
388
- color: theme.kitt.typography.colors[color]
533
+ return /*#__PURE__*/jsx(Icon, _objectSpread$f(_objectSpread$f({}, props), {}, {
534
+ color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
389
535
  }));
390
536
  }
391
537
 
538
+ function TypographyIconInheritColor(props) {
539
+ var color = useTypographyColor();
540
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$f({
541
+ color: color
542
+ }, props));
543
+ }
544
+
392
545
  function TypographyIcon(_ref2) {
393
546
  var color = _ref2.color,
394
- otherProps = _objectWithoutProperties(_ref2, _excluded2$2);
547
+ props = _objectWithoutProperties(_ref2, _excluded2$2);
395
548
 
396
549
  if (color) {
397
- return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$g({
550
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$f({
398
551
  color: color
399
- }, otherProps));
552
+ }, props));
400
553
  }
401
554
 
402
- return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$g({}, otherProps));
555
+ return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$f({}, props));
403
556
  }
404
557
 
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; }
558
+ function isSubtle(type) {
559
+ return type.startsWith('subtle');
560
+ }
406
561
 
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; }
562
+ var _excluded$a = ["type", "isDisabled", "$isStretch", "icon", "children"];
408
563
 
409
- var getTextColorByType = function (type, isPressed, disabled) {
410
- if (disabled) return 'black-light';
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; }
411
567
 
568
+ var getTextColorByType = function (type) {
412
569
  switch (type) {
413
570
  case 'primary':
414
571
  return 'white';
415
572
 
573
+ case 'white':
574
+ return 'white';
575
+
416
576
  case 'subtle':
417
- return isPressed ? 'primary-light' : 'primary';
577
+ return 'primary';
418
578
 
419
579
  case 'subtle-dark':
420
- return isPressed ? 'black-light' : 'black';
580
+ return 'black';
421
581
 
422
- case 'secondary':
423
582
  default:
424
583
  return 'black';
425
584
  }
426
585
  };
427
586
 
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");
587
+ var StyledButtonText = /*#__PURE__*/styled(Typography.Text).withConfig({
588
+ displayName: "ButtonContent__StyledButtonText"
589
+ })(["text-align:center;", " ", ""], function () {
590
+ // Make the multilines case work properly on native
591
+ // Breaks the web implem
592
+ if (Platform.OS === 'web') return undefined;
593
+ return "\n flex-shrink: 1;\n ";
594
+ }, function (_ref) {
595
+ var $type = _ref.$type,
596
+ $isDisabled = _ref.$isDisabled;
597
+
598
+ /* For subltes button, color changes when hovered.
599
+ * We don't want to use a mouse event handler with a react state to handle it
600
+ * For this precise case, we've decided to work outside the typography logic
601
+ */
602
+ if (Platform.OS !== 'web' || $isDisabled || !isSubtle($type)) return undefined;
603
+ return 'color: inherit';
437
604
  });
438
- var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
439
- displayName: "ButtonContent__IconContainer"
605
+ var StyledIconContainer = /*#__PURE__*/styled.View.withConfig({
606
+ displayName: "ButtonContent__StyledIconContainer"
440
607
  })(["", ""], function (_ref2) {
441
608
  var theme = _ref2.theme,
442
- iconPosition = _ref2.iconPosition;
443
- var value = theme.kitt.spacing * 3;
609
+ $iconPosition = _ref2.$iconPosition;
610
+ var value = theme.kitt.spacing * 2;
444
611
 
445
- if (iconPosition === 'left') {
612
+ if ($iconPosition === 'left') {
446
613
  return "margin: 0 ".concat(value, "px 0 0;");
447
614
  }
448
615
 
@@ -451,39 +618,32 @@ var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
451
618
 
452
619
  function ButtonIcon(_ref3) {
453
620
  var icon = _ref3.icon,
454
- spin = _ref3.spin,
455
621
  color = _ref3.color,
456
- size = _ref3.size,
622
+ spin = _ref3.spin,
457
623
  iconPosition = _ref3.iconPosition,
458
624
  testID = _ref3.testID;
459
- return /*#__PURE__*/jsx(IconContainer$1, {
460
- iconPosition: iconPosition,
625
+ return /*#__PURE__*/jsx(StyledIconContainer, {
626
+ $iconPosition: iconPosition,
461
627
  children: /*#__PURE__*/jsx(TypographyIcon, {
462
628
  icon: icon,
463
629
  spin: spin,
464
- color: color,
465
- size: size,
466
- testID: testID
630
+ testID: testID,
631
+ color: color
467
632
  })
468
633
  });
469
634
  }
470
635
 
471
- function ButtonContent(_ref4) {
636
+ var StyledChildrenWithIcon = /*#__PURE__*/styled.View.withConfig({
637
+ displayName: "ButtonContent__StyledChildrenWithIcon"
638
+ })(["align-items:center;justify-content:center;flex-direction:row;"]);
639
+ function ButtonContentChildren(_ref4) {
472
640
  var type = _ref4.type,
473
- isPressed = _ref4.isPressed,
474
- stretch = _ref4.stretch,
475
641
  icon = _ref4.icon,
476
642
  iconPosition = _ref4.iconPosition,
477
643
  iconSpin = _ref4.iconSpin,
478
- disabled = _ref4.disabled,
644
+ isDisabled = _ref4.isDisabled,
645
+ color = _ref4.color,
479
646
  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
647
 
488
648
  if ((process.env.NODE_ENV !== "production")) {
489
649
  if (!(children || icon)) {
@@ -491,130 +651,138 @@ function ButtonContent(_ref4) {
491
651
  }
492
652
  }
493
653
 
654
+ var isWebSubtle = isSubtle(type) && Platform.OS === 'web' && !isDisabled;
655
+
494
656
  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
- }))
657
+ return /*#__PURE__*/jsx(TypographyIcon, {
658
+ spin: iconSpin // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
659
+ ,
660
+ icon: icon,
661
+ color: isWebSubtle ? 'inherit' : color
501
662
  });
502
663
  }
503
664
 
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, {
665
+ var buttonIconSharedProps = {
666
+ type: type,
667
+ spin: iconSpin,
668
+ iconPosition: iconPosition,
669
+ color: isWebSubtle ? 'inherit' : color
670
+ };
671
+ return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
672
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, buttonIconSharedProps), {}, {
673
+ testID: "button-left-icon",
674
+ icon: icon
675
+ })) : null, /*#__PURE__*/jsx(StyledButtonText, {
511
676
  base: "body",
512
- color: color,
513
677
  variant: "bold",
678
+ $type: type,
679
+ $isDisabled: isDisabled // set to color: inherit via styled components
680
+ ,
681
+ color: isWebSubtle ? undefined : color,
514
682
  children: children
515
- }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$f(_objectSpread$f({}, sharedIconProps), {}, {
516
- icon: icon,
517
- iconPosition: iconPosition
683
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$e(_objectSpread$e({}, buttonIconSharedProps), {}, {
684
+ icon: icon
518
685
  })) : null]
519
686
  });
520
687
  }
688
+ var ButtonContentContainer = /*#__PURE__*/styled.View.withConfig({
689
+ displayName: "ButtonContent__ButtonContentContainer"
690
+ })(["line-height:16px;", " ", ";"], function (_ref5) {
691
+ var $isStretch = _ref5.$isStretch,
692
+ $isIconOnly = _ref5.$isIconOnly;
693
+ // Make the multilines case work properly on web
694
+ // Breaks the native implem
695
+ if (Platform.OS !== 'web') return undefined;
696
+ return "\n flex: ".concat($isStretch || $isIconOnly ? 1 : 0, " 1 auto;\n ");
697
+ }, function (_ref6) {
698
+ var $isSubtle = _ref6.$isSubtle;
699
+ if (Platform.OS !== 'web' || !$isSubtle) return undefined; // Needed for subtle type
700
+
701
+ return 'color: inherit';
702
+ });
703
+ function ButtonContent(_ref7) {
704
+ var type = _ref7.type,
705
+ isDisabled = _ref7.isDisabled,
706
+ $isStretch = _ref7.$isStretch,
707
+ icon = _ref7.icon,
708
+ children = _ref7.children,
709
+ props = _objectWithoutProperties(_ref7, _excluded$a);
710
+
711
+ var color = isDisabled ? 'black-light' : getTextColorByType(type);
712
+ return /*#__PURE__*/jsx(ButtonContentContainer, {
713
+ $isSubtle: isSubtle(type),
714
+ $isStretch: $isStretch,
715
+ $isIconOnly: Boolean(!children && icon),
716
+ children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$e(_objectSpread$e({
717
+ icon: icon,
718
+ type: type,
719
+ isDisabled: isDisabled,
720
+ color: color
721
+ }, props), {}, {
722
+ children: children
723
+ }))
724
+ });
725
+ }
521
726
 
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) {
727
+ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
728
+ displayName: "StyledDisabled"
729
+ })(["position:absolute;top:0;left:0;right:0;bottom:0;border:", ";border-radius:", ";"], function (_ref) {
525
730
  var theme = _ref.theme;
526
- return theme.kitt.button.minWidth;
731
+ var _theme$kitt$button = theme.kitt.button,
732
+ borderWidth = _theme$kitt$button.borderWidth,
733
+ disabled = _theme$kitt$button.disabled;
734
+ return "".concat(borderWidth.disabled, " solid ").concat(disabled.borderColor);
527
735
  }, 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;
736
+ var theme = _ref2.theme;
553
737
  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
738
  });
563
739
 
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) {
740
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
568
741
  var children = _ref.children,
569
742
  _ref$type = _ref.type,
570
- type = _ref$type === void 0 ? 'secondary' : _ref$type,
743
+ type = _ref$type === void 0 ? 'default' : _ref$type,
744
+ disabled = _ref.disabled,
745
+ stretch = _ref.stretch,
746
+ large = _ref.large,
571
747
  icon = _ref.icon,
572
748
  _ref$iconPosition = _ref.iconPosition,
573
749
  iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
574
750
  iconSpin = _ref.iconSpin,
575
- stretch = _ref.stretch,
576
- disabled = _ref.disabled,
577
751
  testID = _ref.testID,
578
752
  href = _ref.href,
579
753
  hrefAttrs = _ref.hrefAttrs,
754
+ _ref$accessibilityRol = _ref.accessibilityRole,
755
+ accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
580
756
  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",
757
+ return /*#__PURE__*/jsx(AnimatedButtonPressable, {
758
+ ref: ref,
759
+ accessibilityRole: accessibilityRole,
598
760
  testID: testID,
599
761
  href: href,
600
762
  hrefAttrs: hrefAttrs,
763
+ disabled: disabled,
764
+ $isStretch: stretch,
765
+ $type: type,
601
766
  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
- }
767
+ children: /*#__PURE__*/jsxs(BaseStyledButtonPressable, {
768
+ $type: type,
769
+ $isStretch: stretch,
770
+ $isLarge: large,
771
+ $isDisabled: disabled,
772
+ children: [/*#__PURE__*/jsx(ButtonContent, {
773
+ type: type,
774
+ $isStretch: stretch,
775
+ isDisabled: disabled,
776
+ icon: icon,
777
+ iconPosition: iconPosition,
778
+ iconSpin: iconSpin,
779
+ children: children
780
+ }), Platform.OS !== 'web' && disabled ? /*#__PURE__*/jsx(StyledDisabled, {}) : null]
781
+ })
782
+ });
783
+ });
616
784
 
617
- var Container$6 = /*#__PURE__*/styled.View.withConfig({
785
+ var Container$7 = /*#__PURE__*/styled.View.withConfig({
618
786
  displayName: "Card__Container"
619
787
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
620
788
  var theme = _ref.theme,
@@ -637,7 +805,7 @@ var Container$6 = /*#__PURE__*/styled.View.withConfig({
637
805
  function Card(_ref6) {
638
806
  var children = _ref6.children,
639
807
  type = _ref6.type;
640
- return /*#__PURE__*/jsx(Container$6, {
808
+ return /*#__PURE__*/jsx(Container$7, {
641
809
  type: type,
642
810
  children: children
643
811
  });
@@ -860,7 +1028,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
860
1028
  var minHeight = _ref10.minHeight;
861
1029
  return minHeight;
862
1030
  });
863
- var Container$5 = /*#__PURE__*/styled.View.withConfig({
1031
+ var Container$6 = /*#__PURE__*/styled.View.withConfig({
864
1032
  displayName: "InputText__Container"
865
1033
  })(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
866
1034
  var theme = _ref11.theme;
@@ -936,7 +1104,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
936
1104
  isDisabled: disabled,
937
1105
  formState: formState
938
1106
  });
939
- return /*#__PURE__*/jsxs(Container$5, {
1107
+ return /*#__PURE__*/jsxs(Container$6, {
940
1108
  children: [/*#__PURE__*/jsx(Input, _objectSpread$c(_objectSpread$c({
941
1109
  ref: ref,
942
1110
  nativeID: id,
@@ -1036,7 +1204,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
1036
1204
  var theme = _ref14.theme;
1037
1205
  return theme.kitt.forms.radio.checked.innerSize / 2;
1038
1206
  });
1039
- var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
1207
+ var Container$5 = /*#__PURE__*/styled.Pressable.withConfig({
1040
1208
  displayName: "Radio__Container"
1041
1209
  })(["flex-direction:row;align-items:center;"]);
1042
1210
  var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
@@ -1053,7 +1221,7 @@ function Radio(_ref16) {
1053
1221
  _ref16$disabled = _ref16.disabled,
1054
1222
  disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
1055
1223
  children = _ref16.children;
1056
- return /*#__PURE__*/jsxs(Container$4, {
1224
+ return /*#__PURE__*/jsxs(Container$5, {
1057
1225
  nativeID: id,
1058
1226
  disabled: disabled,
1059
1227
  accessibilityRole: "radio",
@@ -1082,7 +1250,8 @@ function TextArea(_ref) {
1082
1250
 
1083
1251
  var theme = /*#__PURE__*/useTheme();
1084
1252
  return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({
1085
- multiline: true
1253
+ multiline: true,
1254
+ textAlignVertical: "top"
1086
1255
  }, props), {}, {
1087
1256
  type: "text",
1088
1257
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1232,7 +1401,7 @@ function FullScreenModalHeader(_ref6) {
1232
1401
  });
1233
1402
  }
1234
1403
 
1235
- var Container$3 = /*#__PURE__*/styled.View.withConfig({
1404
+ var Container$4 = /*#__PURE__*/styled.View.withConfig({
1236
1405
  displayName: "FullScreenModal__Container"
1237
1406
  })(["flex:1;background-color:", ";"], function (_ref) {
1238
1407
  var theme = _ref.theme;
@@ -1240,7 +1409,7 @@ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1240
1409
  });
1241
1410
  function FullScreenModal(_ref2) {
1242
1411
  var children = _ref2.children;
1243
- return /*#__PURE__*/jsx(Container$3, {
1412
+ return /*#__PURE__*/jsx(Container$4, {
1244
1413
  children: children
1245
1414
  });
1246
1415
  }
@@ -1277,8 +1446,7 @@ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) {
1277
1446
  // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
1278
1447
  // };
1279
1448
  // }
1280
- function withTheme( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1281
- WrappedComponent) {
1449
+ function withTheme(WrappedComponent) {
1282
1450
  return function (props) {
1283
1451
  var theme = /*#__PURE__*/useTheme();
1284
1452
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$9({
@@ -1313,29 +1481,30 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
1313
1481
  return theme.kitt.iconButton.scale.base.active;
1314
1482
  }],
1315
1483
  "p1nlccvg-4": [function (_ref5) {
1316
- var theme = _ref5.theme;
1317
- return theme.kitt.iconButton["default"].pressedBackgroundColor;
1318
- }],
1319
- "p1nlccvg-5": [function (_ref6) {
1320
- var theme = _ref6.theme;
1321
- return theme.kitt.iconButton.white.pressedBackgroundColor;
1484
+ var theme = _ref5.theme,
1485
+ $isWhite = _ref5.$isWhite;
1486
+ var _theme$kitt$iconButto = theme.kitt.iconButton,
1487
+ white = _theme$kitt$iconButto.white,
1488
+ defaultIconButton = _theme$kitt$iconButto["default"];
1489
+ if ($isWhite) return white.pressedBackgroundColor;
1490
+ return defaultIconButton.pressedBackgroundColor;
1322
1491
  }]
1323
1492
  }
1324
1493
  }));
1325
1494
  var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1326
1495
  displayName: "PressableIconButton__StyledPressableIconButton"
1327
- })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref7) {
1328
- var theme = _ref7.theme;
1496
+ })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref6) {
1497
+ var theme = _ref6.theme;
1329
1498
  return theme.kitt.iconButton.borderRadius;
1499
+ }, function (_ref7) {
1500
+ var theme = _ref7.theme;
1501
+ return theme.kitt.iconButton.width;
1330
1502
  }, function (_ref8) {
1331
1503
  var theme = _ref8.theme;
1332
- return theme.kitt.iconButton.width;
1333
- }, function (_ref9) {
1334
- var theme = _ref9.theme;
1335
1504
  return theme.kitt.iconButton.height;
1336
- }, function (_ref10) {
1337
- var theme = _ref10.theme,
1338
- disabled = _ref10.disabled;
1505
+ }, function (_ref9) {
1506
+ var theme = _ref9.theme,
1507
+ disabled = _ref9.disabled;
1339
1508
  var iconButton = theme.kitt.iconButton;
1340
1509
 
1341
1510
  if (Platform.OS !== 'web') {
@@ -1350,13 +1519,13 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1350
1519
 
1351
1520
  return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
1352
1521
  });
1353
- function PressableIconButton(_ref11) {
1354
- var color = _ref11.color,
1355
- props = _objectWithoutProperties(_ref11, _excluded$6);
1522
+ function PressableIconButton(_ref10) {
1523
+ var color = _ref10.color,
1524
+ props = _objectWithoutProperties(_ref10, _excluded$6);
1356
1525
 
1357
1526
  return /*#__PURE__*/jsx(StyleWebWrapper, {
1358
1527
  as: PressableIconButtonWebWrapper,
1359
- "data-color-white": color === 'white' ? true : undefined,
1528
+ $isWhite: color === 'white',
1360
1529
  children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$8({}, props))
1361
1530
  });
1362
1531
  }
@@ -1692,7 +1861,7 @@ function LargeLoader(_ref) {
1692
1861
 
1693
1862
  var xIconSize = 14;
1694
1863
  var mainIconSize = 20;
1695
- var Container$2 = /*#__PURE__*/styled.View.withConfig({
1864
+ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1696
1865
  displayName: "Message__Container"
1697
1866
  })(["border-radius:", "px;background-color:", ";padding-bottom:", "px;padding-left:", "px;padding-right:", "px;padding-top:", "px;flex-direction:row;align-items:flex-start;justify-content:space-between;"], function (_ref) {
1698
1867
  var theme = _ref.theme,
@@ -1781,7 +1950,7 @@ function Message(_ref11) {
1781
1950
  onDismiss = _ref11.onDismiss,
1782
1951
  insets = _ref11.insets;
1783
1952
  var color = getColorByType(type);
1784
- return /*#__PURE__*/jsxs(Container$2, {
1953
+ return /*#__PURE__*/jsxs(Container$3, {
1785
1954
  type: type,
1786
1955
  noRadius: noRadius,
1787
1956
  insets: insets,
@@ -1985,6 +2154,127 @@ function Notification(_ref) {
1985
2154
  });
1986
2155
  }
1987
2156
 
2157
+ var Container$2 = /*#__PURE__*/styled.View.withConfig({
2158
+ displayName: "SkeletonContent__Container"
2159
+ })(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
2160
+ var theme = _ref.theme;
2161
+ return theme.kitt.skeleton.backgroundColor;
2162
+ }, function (_ref2) {
2163
+ var theme = _ref2.theme;
2164
+ return theme.kitt.skeleton.flareColor;
2165
+ });
2166
+ var AnimatedLinearGradient = Animated$1.createAnimatedComponent(LinearGradient);
2167
+ function SkeletonContent(_ref3) {
2168
+ var isLoading = _ref3.isLoading,
2169
+ width = _ref3.width;
2170
+ var theme = /*#__PURE__*/useTheme();
2171
+ var sharedX = useSharedValue(0);
2172
+ useEffect(function () {
2173
+ if (isLoading) {
2174
+ sharedX.value = withRepeat(withTiming(1, {
2175
+ duration: theme.kitt.skeleton.animationDuration,
2176
+ easing: Easing$1.inOut(Easing$1.ease)
2177
+ }), -1);
2178
+ }
2179
+ }, [sharedX, width, isLoading, theme]);
2180
+ var linearGradientStyle = useAnimatedStyle(function () {
2181
+ var _f = function () {
2182
+ return {
2183
+ transform: [{
2184
+ translateX: interpolate(sharedX.value, [0, 1], [-width, width])
2185
+ }]
2186
+ };
2187
+ };
2188
+
2189
+ _f._closure = {
2190
+ interpolate: interpolate,
2191
+ sharedX: sharedX,
2192
+ width: width
2193
+ };
2194
+ _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
2195
+ _f.__workletHash = 1670955855244;
2196
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (41:47)";
2197
+ _f.__optimalization = 3;
2198
+
2199
+ global.__reanimatedWorkletInit(_f);
2200
+
2201
+ return _f;
2202
+ }());
2203
+ return /*#__PURE__*/jsx(Container$2, {
2204
+ children: /*#__PURE__*/jsx(AnimatedLinearGradient, {
2205
+ colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
2206
+ locations: [0.1, 0.5, 0.9],
2207
+ start: {
2208
+ x: 0,
2209
+ y: 0
2210
+ },
2211
+ end: {
2212
+ x: 1,
2213
+ y: 0
2214
+ },
2215
+ style: [StyleSheet.absoluteFill, linearGradientStyle]
2216
+ })
2217
+ });
2218
+ }
2219
+
2220
+ function Skeleton(_ref) {
2221
+ var isLoading = _ref.isLoading,
2222
+ style = _ref.style;
2223
+
2224
+ var _useState = useState(0),
2225
+ _useState2 = _slicedToArray(_useState, 2),
2226
+ width = _useState2[0],
2227
+ setWidth = _useState2[1];
2228
+
2229
+ return /*#__PURE__*/jsx(View, {
2230
+ style: style,
2231
+ onLayout: function onLayout(_ref2) {
2232
+ var nativeEvent = _ref2.nativeEvent;
2233
+ return setWidth(nativeEvent.layout.width);
2234
+ },
2235
+ children: /*#__PURE__*/jsx(SkeletonContent, {
2236
+ isLoading: isLoading,
2237
+ width: width
2238
+ })
2239
+ });
2240
+ }
2241
+ var Bar = /*#__PURE__*/styled(Skeleton).withConfig({
2242
+ displayName: "Skeleton__Bar"
2243
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref3) {
2244
+ var theme = _ref3.theme;
2245
+ return theme.kitt.spacing * 2;
2246
+ }, function (_ref4) {
2247
+ var theme = _ref4.theme;
2248
+ return theme.kitt.spacing * 2;
2249
+ });
2250
+ var Circle = /*#__PURE__*/styled(Skeleton).withConfig({
2251
+ displayName: "Skeleton__Circle"
2252
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref5) {
2253
+ var theme = _ref5.theme;
2254
+ return theme.kitt.spacing * 12;
2255
+ }, function (_ref6) {
2256
+ var theme = _ref6.theme;
2257
+ return theme.kitt.spacing * 12;
2258
+ }, function (_ref7) {
2259
+ var theme = _ref7.theme;
2260
+ return theme.kitt.spacing * 6;
2261
+ });
2262
+ var Square = /*#__PURE__*/styled(Skeleton).withConfig({
2263
+ displayName: "Skeleton__Square"
2264
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref8) {
2265
+ var theme = _ref8.theme;
2266
+ return theme.kitt.spacing * 12;
2267
+ }, function (_ref9) {
2268
+ var theme = _ref9.theme;
2269
+ return theme.kitt.spacing * 12;
2270
+ }, function (_ref10) {
2271
+ var theme = _ref10.theme;
2272
+ return theme.kitt.spacing * 1.5;
2273
+ });
2274
+ Skeleton.Bar = Bar;
2275
+ Skeleton.Circle = Circle;
2276
+ Skeleton.Square = Square;
2277
+
1988
2278
  var Flex = /*#__PURE__*/styled.View.withConfig({
1989
2279
  shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
1990
2280
  return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
@@ -2429,47 +2719,98 @@ var avatarLateOceanTheme = {
2429
2719
  }
2430
2720
  };
2431
2721
 
2722
+ var colorsLateOceanTheme = {
2723
+ primary: lateOceanColorPalette.lateOcean,
2724
+ primaryLight: lateOceanColorPalette.lateOceanLight1,
2725
+ accent: lateOceanColorPalette.warmEmbrace,
2726
+ accentLight: lateOceanColorPalette.warmEmbraceLight1,
2727
+ success: lateOceanColorPalette.viride,
2728
+ correct: lateOceanColorPalette.viride,
2729
+ danger: lateOceanColorPalette.englishVermillon,
2730
+ separator: lateOceanColorPalette.black100,
2731
+ hover: lateOceanColorPalette.black100,
2732
+ black: lateOceanColorPalette.black1000,
2733
+ uiBackground: lateOceanColorPalette.black25,
2734
+ uiBackgroundLight: lateOceanColorPalette.white,
2735
+ transparent: lateOceanColorPalette.transparent,
2736
+ disabled: lateOceanColorPalette.black50,
2737
+ overlay: {
2738
+ dark: 'rgba(41, 48, 51, 0.25)',
2739
+ light: 'rgba(255, 255, 255, 0.90)',
2740
+ fullscreenLoader: 'rgba(0, 0, 0, 0.25)'
2741
+ }
2742
+ };
2743
+
2432
2744
  var buttonLateOceanTheme = {
2433
2745
  borderRadius: '30px',
2434
- borderWidth: '2px',
2435
- minHeight: '42px',
2746
+ borderWidth: {
2747
+ disabled: '2px',
2748
+ focus: '3px'
2749
+ },
2750
+ minHeight: '40px',
2436
2751
  minWidth: '40px',
2437
2752
  maxWidth: '335px',
2438
- iconSize: 18,
2753
+ scale: {
2754
+ base: {
2755
+ "default": 1,
2756
+ hover: 0.95,
2757
+ active: 0.95
2758
+ },
2759
+ medium: {
2760
+ hover: 1.05
2761
+ }
2762
+ },
2439
2763
  contentPadding: {
2440
- "default": '8px 16px'
2764
+ "default": '8px 16px 7px',
2765
+ large: '12px 24px 11px',
2766
+ disabled: '6px 14px 5px'
2441
2767
  },
2442
- primary: {
2443
- backgroundColor: lateOceanColorPalette.lateOcean,
2444
- disabledBackgroundColor: lateOceanColorPalette.black50,
2445
- pressedBackgroundColor: lateOceanColorPalette.lateOceanLight1,
2446
- disabledBorderColor: lateOceanColorPalette.black100
2768
+ transition: {
2769
+ duration: '200ms',
2770
+ timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
2447
2771
  },
2448
- secondary: {
2772
+ "default": {
2449
2773
  backgroundColor: 'rgba(0, 0, 0, 0.05)',
2450
- disabledBackgroundColor: lateOceanColorPalette.black50,
2451
2774
  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
2775
+ hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
2776
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)'
2459
2777
  },
2460
- 'subtle-dark': {
2461
- backgroundColor: lateOceanColorPalette.transparent,
2462
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2463
- pressedBackgroundColor: lateOceanColorPalette.transparent,
2464
- disabledBorderColor: lateOceanColorPalette.transparent
2778
+ primary: {
2779
+ backgroundColor: colorsLateOceanTheme.primary,
2780
+ pressedBackgroundColor: colorsLateOceanTheme.primaryLight,
2781
+ hoverBackgroundColor: colorsLateOceanTheme.primaryLight,
2782
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)'
2465
2783
  },
2466
2784
  white: {
2467
2785
  backgroundColor: 'rgba(255, 255, 255, 0.05)',
2468
- disabledBackgroundColor: lateOceanColorPalette.transparent,
2469
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2470
2786
  pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2471
- focusBorderColor: 'rgba(255, 255, 255, 0.1)',
2472
- disabledBorderColor: lateOceanColorPalette.transparent
2787
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
2788
+ focusBorderColor: 'rgba(255, 255, 255, 0.1)'
2789
+ },
2790
+ subtle: {
2791
+ backgroundColor: colorsLateOceanTheme.transparent,
2792
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2793
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2794
+ focusBorderColor: 'rgba(76, 52, 224, 0.2)',
2795
+ color: colorsLateOceanTheme.primary,
2796
+ hoverColor: 'rgba(76, 52, 224, 0.8)',
2797
+ activeColor: 'rgba(76, 52, 224, 0.8)'
2798
+ },
2799
+ 'subtle-dark': {
2800
+ backgroundColor: colorsLateOceanTheme.transparent,
2801
+ pressedBackgroundColor: colorsLateOceanTheme.transparent,
2802
+ hoverBackgroundColor: colorsLateOceanTheme.transparent,
2803
+ focusBorderColor: 'rgba(0, 0, 0, 0.1)',
2804
+ color: colorsLateOceanTheme.black,
2805
+ hoverColor: 'rgba(0, 0, 0, 0.8)',
2806
+ activeColor: 'rgba(0, 0, 0, 0.8)'
2807
+ },
2808
+ disabled: {
2809
+ backgroundColor: colorsLateOceanTheme.disabled,
2810
+ pressedBackgroundColor: colorsLateOceanTheme.disabled,
2811
+ hoverBackgroundColor: colorsLateOceanTheme.disabled,
2812
+ focusBorderColor: lateOceanColorPalette.black100,
2813
+ borderColor: lateOceanColorPalette.black100
2473
2814
  }
2474
2815
  };
2475
2816
 
@@ -2491,26 +2832,6 @@ var cardLateOceanTheme = {
2491
2832
  }
2492
2833
  };
2493
2834
 
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
2835
  var feedbackMessageLateOceanTheme = {
2515
2836
  backgroundColors: {
2516
2837
  success: lateOceanColorPalette.viride,
@@ -2624,11 +2945,11 @@ var iconButton = {
2624
2945
  },
2625
2946
  disabled: {
2626
2947
  scale: 1,
2627
- backgroundColor: buttonLateOceanTheme.secondary.disabledBackgroundColor,
2628
- borderColor: buttonLateOceanTheme.secondary.disabledBorderColor
2948
+ backgroundColor: buttonLateOceanTheme.disabled.backgroundColor,
2949
+ borderColor: buttonLateOceanTheme.disabled.borderColor
2629
2950
  },
2630
2951
  "default": {
2631
- pressedBackgroundColor: buttonLateOceanTheme.secondary.pressedBackgroundColor
2952
+ pressedBackgroundColor: buttonLateOceanTheme["default"].pressedBackgroundColor
2632
2953
  },
2633
2954
  white: {
2634
2955
  pressedBackgroundColor: buttonLateOceanTheme.white.hoverBackgroundColor
@@ -2646,6 +2967,12 @@ var shadowsLateOceanTheme = {
2646
2967
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2647
2968
  };
2648
2969
 
2970
+ var skeletonTheme = {
2971
+ backgroundColor: lateOceanColorPalette.black100,
2972
+ flareColor: lateOceanColorPalette.black200,
2973
+ animationDuration: 1000
2974
+ };
2975
+
2649
2976
  var tagLateOceanTheme = {
2650
2977
  borderRadius: '10px',
2651
2978
  padding: '2px 12px',
@@ -2699,20 +3026,18 @@ var tooltip = {
2699
3026
  var calcLineHeight = function (fontSize, lineHeightMultiplier) {
2700
3027
  return Math.round(fontSize * lineHeightMultiplier);
2701
3028
  };
2702
-
2703
3029
  var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
2704
3030
  return {
2705
3031
  baseAndSmall: {
2706
3032
  fontSize: "".concat(baseAndSmallFontSize, "px"),
2707
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3033
+ lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
2708
3034
  },
2709
3035
  mediumAndWide: {
2710
3036
  fontSize: "".concat(mediumAndWideFontSize, "px"),
2711
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3037
+ lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
2712
3038
  }
2713
3039
  };
2714
3040
  };
2715
-
2716
3041
  var typographyLateOceanTheme = {
2717
3042
  colors: {
2718
3043
  black: lateOceanColorPalette.black1000,
@@ -2794,7 +3119,7 @@ var breakpoints = {
2794
3119
  wideBreakpoint: 'max-width: 1279px'
2795
3120
  }
2796
3121
  }; // 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
3122
+ // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
2798
3123
 
2799
3124
  var theme = {
2800
3125
  spacing: 4,
@@ -2813,7 +3138,8 @@ var theme = {
2813
3138
  fullScreenModal: fullScreenModalLateOceanTheme,
2814
3139
  iconButton: iconButton,
2815
3140
  listItem: listItemLateOceanTheme,
2816
- tooltip: tooltip
3141
+ tooltip: tooltip,
3142
+ skeleton: skeletonTheme
2817
3143
  };
2818
3144
 
2819
3145
  function Title(_ref) {
@@ -3197,40 +3523,46 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
3197
3523
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3198
3524
  var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
3199
3525
  name: "TypographyLinkWebWrapper",
3200
- "class": "tcwz3nt"
3526
+ "class": "tcwz3nt",
3527
+ vars: {
3528
+ "tcwz3nt-0": [function (_ref) {
3529
+ var $hasNoUnderline = _ref.$hasNoUnderline;
3530
+ return $hasNoUnderline ? 'underline' : 'none';
3531
+ }]
3532
+ }
3201
3533
  }));
3202
3534
  var StyledLink = /*#__PURE__*/styled.Text.withConfig({
3203
3535
  displayName: "TypographyLink__StyledLink"
3204
- })(["text-decoration:", ";", ";", ";"], function (_ref) {
3205
- var $noUnderline = _ref.$noUnderline;
3206
- return $noUnderline ? 'none' : 'underline';
3207
- }, function (_ref2) {
3208
- var $disabled = _ref2.$disabled;
3536
+ })(["text-decoration:", ";", ";", ";"], function (_ref2) {
3537
+ var $hasNoUnderline = _ref2.$hasNoUnderline;
3538
+ return $hasNoUnderline ? 'none' : 'underline';
3539
+ }, function (_ref3) {
3540
+ var $disabled = _ref3.$disabled;
3209
3541
  if (Platform.OS !== 'web') return undefined;
3210
3542
  return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
3211
- }, function (_ref3) {
3212
- var $disabled = _ref3.$disabled,
3213
- theme = _ref3.theme;
3543
+ }, function (_ref4) {
3544
+ var $disabled = _ref4.$disabled,
3545
+ theme = _ref4.theme;
3214
3546
  if (!$disabled) return undefined;
3215
3547
  return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
3216
3548
  });
3217
- function TypographyLink(_ref4) {
3218
- var children = _ref4.children,
3219
- disabled = _ref4.disabled,
3220
- noUnderline = _ref4.noUnderline,
3221
- href = _ref4.href,
3222
- hrefAttrs = _ref4.hrefAttrs,
3223
- onPress = _ref4.onPress,
3224
- otherProps = _objectWithoutProperties(_ref4, _excluded$1);
3549
+ function TypographyLink(_ref5) {
3550
+ var children = _ref5.children,
3551
+ disabled = _ref5.disabled,
3552
+ noUnderline = _ref5.noUnderline,
3553
+ href = _ref5.href,
3554
+ hrefAttrs = _ref5.hrefAttrs,
3555
+ onPress = _ref5.onPress,
3556
+ otherProps = _objectWithoutProperties(_ref5, _excluded$1);
3225
3557
 
3226
3558
  return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
3227
3559
  accessibilityRole: "none",
3228
3560
  children: /*#__PURE__*/jsx(StyleWebWrapper, {
3229
3561
  as: TypographyLinkWebWrapper,
3230
- "data-nounderline": noUnderline ? true : undefined,
3562
+ $hasNoUnderline: noUnderline,
3231
3563
  children: /*#__PURE__*/jsx(StyledLink, {
3232
3564
  $disabled: disabled,
3233
- $noUnderline: noUnderline,
3565
+ $hasNoUnderline: noUnderline,
3234
3566
  href: href,
3235
3567
  hrefAttrs: hrefAttrs,
3236
3568
  accessibilityRole: "link",
@@ -3245,25 +3577,35 @@ function TypographyLink(_ref4) {
3245
3577
  }));
3246
3578
  }
3247
3579
 
3248
- function matchWindowSize(currentWidth, _ref) {
3249
- var minWidth = _ref.minWidth,
3250
- maxWidth = _ref.maxWidth;
3251
- return currentWidth >= minWidth && (!maxWidth || currentWidth <= maxWidth);
3580
+ function matchWindowSize(_ref, _ref2) {
3581
+ var width = _ref.width,
3582
+ height = _ref.height;
3583
+ var minWidth = _ref2.minWidth,
3584
+ maxWidth = _ref2.maxWidth,
3585
+ minHeight = _ref2.minHeight,
3586
+ maxHeight = _ref2.maxHeight;
3587
+ var hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
3588
+ var hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
3589
+ return hasWidthMatched && hasHeightMatched;
3252
3590
  }
3253
3591
  function useMatchWindowSize(options) {
3254
3592
  var _useWindowDimensions = useWindowDimensions(),
3255
- width = _useWindowDimensions.width;
3593
+ width = _useWindowDimensions.width,
3594
+ height = _useWindowDimensions.height;
3256
3595
 
3257
- return matchWindowSize(width, options);
3596
+ return matchWindowSize({
3597
+ width: width,
3598
+ height: height
3599
+ }, options);
3258
3600
  }
3259
3601
 
3260
- function createWindowSizeHelper(currentWidth) {
3602
+ function createWindowSizeHelper(dimensions) {
3261
3603
  return {
3262
3604
  matchWindowSize: function matchWindowSize$1(options) {
3263
- return matchWindowSize(currentWidth, options);
3605
+ return matchWindowSize(dimensions, options);
3264
3606
  },
3265
3607
  ifWindowSizeMatches: function ifWindowSizeMatches(options, valueIfTrue, valueIfFalse) {
3266
- return matchWindowSize(currentWidth, options) ? valueIfTrue : valueIfFalse;
3608
+ return matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse;
3267
3609
  },
3268
3610
  mapWindowWidth: function mapWindowWidth() {
3269
3611
  for (var _len = arguments.length, widthList = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -3288,7 +3630,7 @@ function createWindowSizeHelper(currentWidth) {
3288
3630
  minWidth = _ref4[0];
3289
3631
  _ref4[1];
3290
3632
 
3291
- return matchWindowSize(currentWidth, {
3633
+ return matchWindowSize(dimensions, {
3292
3634
  minWidth: Number(minWidth)
3293
3635
  });
3294
3636
  });
@@ -3299,18 +3641,24 @@ function createWindowSizeHelper(currentWidth) {
3299
3641
  }
3300
3642
 
3301
3643
  function useKittTheme() {
3302
- var _useWindowSize = useWindowDimensions(),
3303
- width = _useWindowSize.width;
3304
-
3644
+ var dimensions = useWindowDimensions();
3305
3645
  return useMemo(function () {
3306
3646
  return {
3307
3647
  kitt: theme,
3308
- responsive: createWindowSizeHelper(width),
3648
+ responsive: createWindowSizeHelper(dimensions),
3309
3649
  breakpoints: breakpoints
3310
3650
  };
3311
- }, [width]);
3651
+ }, [dimensions]);
3312
3652
  }
3313
3653
 
3654
+ var hex2rgba = function (hex) {
3655
+ var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
3656
+ var r = parseInt(hex.slice(1, 3), 16);
3657
+ var g = parseInt(hex.slice(3, 5), 16);
3658
+ var b = parseInt(hex.slice(5, 7), 16);
3659
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
3660
+ };
3661
+
3314
3662
  function KittThemeProvider(_ref) {
3315
3663
  var children = _ref.children;
3316
3664
  var theme = useKittTheme();
@@ -3343,5 +3691,5 @@ function MatchWindowSize(_ref) {
3343
3691
  });
3344
3692
  }
3345
3693
 
3346
- export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
3694
+ export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
3347
3695
  //# sourceMappingURL=index-browser-all.es.js.map