@ornikar/kitt-universal 3.3.0 → 3.7.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 (49) hide show
  1. package/dist/definitions/Avatar/Avatar.d.ts +9 -4
  2. package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +2 -2
  4. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts.map +1 -1
  5. package/dist/definitions/IconButton/PressableIconButton.d.ts.map +1 -1
  6. package/dist/definitions/Skeleton/Skeleton.d.ts +14 -0
  7. package/dist/definitions/Skeleton/Skeleton.d.ts.map +1 -0
  8. package/dist/definitions/Skeleton/SkeletonContent.d.ts +8 -0
  9. package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -0
  10. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts +7 -0
  11. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +1 -0
  12. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  13. package/dist/definitions/index.d.ts +5 -0
  14. package/dist/definitions/index.d.ts.map +1 -1
  15. package/dist/definitions/themes/default.d.ts +23 -31
  16. package/dist/definitions/themes/default.d.ts.map +1 -1
  17. package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts +9 -10
  18. package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts.map +1 -1
  19. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts +7 -0
  20. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts.map +1 -0
  21. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +2 -0
  22. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
  23. package/dist/definitions/typography/Typography.d.ts +2 -0
  24. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  25. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  26. package/dist/definitions/useKittTheme.d.ts +0 -2
  27. package/dist/definitions/useKittTheme.d.ts.map +1 -1
  28. package/dist/definitions/utils/hexToRgba.d.ts +2 -0
  29. package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
  30. package/dist/definitions/utils/withTheme.d.ts +2 -2
  31. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  32. package/dist/index-browser-all.es.android.js +337 -151
  33. package/dist/index-browser-all.es.android.js.map +1 -1
  34. package/dist/index-browser-all.es.css +2 -2
  35. package/dist/index-browser-all.es.ios.js +337 -151
  36. package/dist/index-browser-all.es.ios.js.map +1 -1
  37. package/dist/index-browser-all.es.js +296 -129
  38. package/dist/index-browser-all.es.js.map +1 -1
  39. package/dist/index-browser-all.es.web.js +294 -166
  40. package/dist/index-browser-all.es.web.js.map +1 -1
  41. package/dist/index-node-14.17.cjs.css +2 -2
  42. package/dist/index-node-14.17.cjs.js +247 -78
  43. package/dist/index-node-14.17.cjs.js.map +1 -1
  44. package/dist/index-node-14.17.cjs.web.css +4 -3
  45. package/dist/index-node-14.17.cjs.web.js +234 -103
  46. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  47. package/dist/styles.css +4 -3
  48. package/dist/tsbuildinfo +1 -1
  49. package/package.json +5 -4
@@ -7,13 +7,14 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
7
7
  import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
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
+ import Animated$1, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withRepeat, withTiming, Easing as Easing$1, interpolate } from 'react-native-reanimated';
11
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
12
12
  import { parse } from 'twemoji-parser';
13
13
  import { openBrowserAsync } from 'expo-web-browser';
14
14
  import _extends from '@babel/runtime/helpers/extends';
15
15
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
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';
@@ -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$d);
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
236
  children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
217
- $color: colorWithDefaultToBlack,
237
+ $color: colorOrDefaultToBlack,
218
238
  $isHeader: isHeader,
219
239
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
220
240
  $variant: nonNullableVariant,
221
241
  accessibilityRole: accessibilityRole || undefined
222
242
  }, otherProps))
223
243
  }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$h({
224
- $color: colorWithDefaultToBlack,
244
+ $color: colorOrDefaultToBlack,
225
245
  $isHeader: isHeader,
226
246
  $variant: nonNullableVariant,
227
247
  accessibilityRole: accessibilityRole || undefined
@@ -283,45 +303,44 @@ Typography.h4 = createHeading(4, 'header4');
283
303
 
284
304
  Typography.h5 = createHeading(5, 'header5');
285
305
 
286
- var _excluded$c = ["size"];
306
+ var _excluded$c = ["size", "base", "round", "light"];
287
307
 
288
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
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
- var getFirstCharacter = function (string) {
293
- return string ? string[0] : '';
294
- };
295
-
296
312
  var getInitials = function (firstname, lastname) {
297
- return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
313
+ return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
298
314
  };
299
315
 
300
316
  var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
301
317
  displayName: "Avatar__StyledAvatarView"
302
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
303
- var round = _ref.round,
304
- size = _ref.size;
305
- return round ? size / 2 : 10;
318
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
319
+ var theme = _ref.theme,
320
+ $isRound = _ref.$isRound,
321
+ $size = _ref.$size;
322
+ if ($isRound) return "".concat($size / 2, "px");
323
+ return theme.kitt.avatar.borderRadius;
306
324
  }, function (_ref2) {
307
325
  var theme = _ref2.theme,
308
- light = _ref2.light;
309
- return light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
326
+ $isLight = _ref2.$isLight;
327
+ return $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
310
328
  }, function (_ref3) {
311
- var size = _ref3.size;
312
- return size;
329
+ var $size = _ref3.$size;
330
+ return $size;
313
331
  }, function (_ref4) {
314
- var size = _ref4.size;
315
- return size;
332
+ var $size = _ref4.$size;
333
+ return $size;
316
334
  });
317
335
 
318
336
  function AvatarContent(_ref5) {
319
- var _ref5$size = _ref5.size,
320
- size = _ref5$size === void 0 ? 40 : _ref5$size,
337
+ var size = _ref5.size,
321
338
  src = _ref5.src,
322
339
  firstname = _ref5.firstname,
323
340
  lastname = _ref5.lastname,
324
- light = _ref5.light;
341
+ alt = _ref5.alt,
342
+ base = _ref5.base,
343
+ isLight = _ref5.isLight;
325
344
 
326
345
  if (src) {
327
346
  return /*#__PURE__*/jsx(Image, {
@@ -331,22 +350,23 @@ function AvatarContent(_ref5) {
331
350
  style: {
332
351
  width: size,
333
352
  height: size
334
- }
353
+ },
354
+ accessibilityLabel: alt
335
355
  });
336
356
  }
337
357
 
338
358
  if (firstname && lastname) {
339
359
  return /*#__PURE__*/jsx(Typography.Text, {
340
- base: "body-small",
360
+ base: base,
341
361
  variant: "bold",
342
- color: light ? 'black' : 'white',
362
+ color: isLight ? 'black' : 'white',
343
363
  children: getInitials(firstname, lastname)
344
364
  });
345
365
  }
346
366
 
347
367
  return /*#__PURE__*/jsx(Icon, {
348
368
  icon: /*#__PURE__*/jsx(UserIcon, {}),
349
- color: light ? 'black' : 'white',
369
+ color: isLight ? 'black' : 'white',
350
370
  size: size / 2
351
371
  });
352
372
  }
@@ -354,14 +374,22 @@ 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$c);
358
-
359
- return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$g(_objectSpread$g({}, rest), {}, {
360
- size: size,
361
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g(_objectSpread$g({}, rest), {}, {
362
- size: size
363
- }))
364
- }));
377
+ _ref6$base = _ref6.base,
378
+ base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
379
+ round = _ref6.round,
380
+ light = _ref6.light,
381
+ props = _objectWithoutProperties(_ref6, _excluded$c);
382
+
383
+ return /*#__PURE__*/jsx(StyledAvatarView, {
384
+ $size: size,
385
+ $isRound: round,
386
+ $isLight: light,
387
+ children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g({
388
+ size: size,
389
+ base: base,
390
+ isLight: light
391
+ }, props))
392
+ });
365
393
  }
366
394
 
367
395
  var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
@@ -762,7 +790,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
762
790
  });
763
791
  });
764
792
 
765
- var Container$6 = /*#__PURE__*/styled.View.withConfig({
793
+ var Container$7 = /*#__PURE__*/styled.View.withConfig({
766
794
  displayName: "Card__Container"
767
795
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
768
796
  var theme = _ref.theme,
@@ -785,7 +813,7 @@ var Container$6 = /*#__PURE__*/styled.View.withConfig({
785
813
  function Card(_ref6) {
786
814
  var children = _ref6.children,
787
815
  type = _ref6.type;
788
- return /*#__PURE__*/jsx(Container$6, {
816
+ return /*#__PURE__*/jsx(Container$7, {
789
817
  type: type,
790
818
  children: children
791
819
  });
@@ -1008,7 +1036,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
1008
1036
  var minHeight = _ref10.minHeight;
1009
1037
  return minHeight;
1010
1038
  });
1011
- var Container$5 = /*#__PURE__*/styled.View.withConfig({
1039
+ var Container$6 = /*#__PURE__*/styled.View.withConfig({
1012
1040
  displayName: "InputText__Container"
1013
1041
  })(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
1014
1042
  var theme = _ref11.theme;
@@ -1084,7 +1112,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
1084
1112
  isDisabled: disabled,
1085
1113
  formState: formState
1086
1114
  });
1087
- return /*#__PURE__*/jsxs(Container$5, {
1115
+ return /*#__PURE__*/jsxs(Container$6, {
1088
1116
  children: [/*#__PURE__*/jsx(Input, _objectSpread$c(_objectSpread$c({
1089
1117
  ref: ref,
1090
1118
  nativeID: id,
@@ -1184,7 +1212,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
1184
1212
  var theme = _ref14.theme;
1185
1213
  return theme.kitt.forms.radio.checked.innerSize / 2;
1186
1214
  });
1187
- var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
1215
+ var Container$5 = /*#__PURE__*/styled.Pressable.withConfig({
1188
1216
  displayName: "Radio__Container"
1189
1217
  })(["flex-direction:row;align-items:center;"]);
1190
1218
  var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
@@ -1201,7 +1229,7 @@ function Radio(_ref16) {
1201
1229
  _ref16$disabled = _ref16.disabled,
1202
1230
  disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
1203
1231
  children = _ref16.children;
1204
- return /*#__PURE__*/jsxs(Container$4, {
1232
+ return /*#__PURE__*/jsxs(Container$5, {
1205
1233
  nativeID: id,
1206
1234
  disabled: disabled,
1207
1235
  accessibilityRole: "radio",
@@ -1230,7 +1258,8 @@ function TextArea(_ref) {
1230
1258
 
1231
1259
  var theme = /*#__PURE__*/useTheme();
1232
1260
  return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({
1233
- multiline: true
1261
+ multiline: true,
1262
+ textAlignVertical: "top"
1234
1263
  }, props), {}, {
1235
1264
  type: "text",
1236
1265
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1380,7 +1409,7 @@ function FullScreenModalHeader(_ref6) {
1380
1409
  });
1381
1410
  }
1382
1411
 
1383
- var Container$3 = /*#__PURE__*/styled.View.withConfig({
1412
+ var Container$4 = /*#__PURE__*/styled.View.withConfig({
1384
1413
  displayName: "FullScreenModal__Container"
1385
1414
  })(["flex:1;background-color:", ";"], function (_ref) {
1386
1415
  var theme = _ref.theme;
@@ -1388,7 +1417,7 @@ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1388
1417
  });
1389
1418
  function FullScreenModal(_ref2) {
1390
1419
  var children = _ref2.children;
1391
- return /*#__PURE__*/jsx(Container$3, {
1420
+ return /*#__PURE__*/jsx(Container$4, {
1392
1421
  children: children
1393
1422
  });
1394
1423
  }
@@ -1426,12 +1455,14 @@ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) {
1426
1455
  // };
1427
1456
  // }
1428
1457
  function withTheme(WrappedComponent) {
1429
- return function (props) {
1458
+ // eslint-disable-next-line prefer-arrow-callback
1459
+ return /*#__PURE__*/forwardRef(function (props, ref) {
1430
1460
  var theme = /*#__PURE__*/useTheme();
1431
1461
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$9({
1462
+ ref: ref,
1432
1463
  theme: theme
1433
1464
  }, props));
1434
- };
1465
+ });
1435
1466
  }
1436
1467
 
1437
1468
  var _excluded$6 = ["color"];
@@ -1447,42 +1478,39 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
1447
1478
  var theme = _ref.theme;
1448
1479
  return theme.kitt.iconButton.scale.base.hover;
1449
1480
  }],
1450
- "p1nlccvg-1": [function (_ref2) {
1481
+ "p1nlccvg-2": [function (_ref2) {
1451
1482
  var theme = _ref2.theme;
1452
- return theme.breakpoints.min.mediumBreakpoint;
1453
- }],
1454
- "p1nlccvg-2": [function (_ref3) {
1455
- var theme = _ref3.theme;
1456
1483
  return theme.kitt.iconButton.scale.medium.hover;
1457
1484
  }],
1458
- "p1nlccvg-3": [function (_ref4) {
1459
- var theme = _ref4.theme;
1485
+ "p1nlccvg-3": [function (_ref3) {
1486
+ var theme = _ref3.theme;
1460
1487
  return theme.kitt.iconButton.scale.base.active;
1461
1488
  }],
1462
- "p1nlccvg-4": [function (_ref5) {
1463
- var theme = _ref5.theme;
1464
- return theme.kitt.iconButton["default"].pressedBackgroundColor;
1465
- }],
1466
- "p1nlccvg-5": [function (_ref6) {
1467
- var theme = _ref6.theme;
1468
- return theme.kitt.iconButton.white.pressedBackgroundColor;
1489
+ "p1nlccvg-4": [function (_ref4) {
1490
+ var theme = _ref4.theme,
1491
+ $isWhite = _ref4.$isWhite;
1492
+ var _theme$kitt$iconButto = theme.kitt.iconButton,
1493
+ white = _theme$kitt$iconButto.white,
1494
+ defaultIconButton = _theme$kitt$iconButto["default"];
1495
+ if ($isWhite) return white.pressedBackgroundColor;
1496
+ return defaultIconButton.pressedBackgroundColor;
1469
1497
  }]
1470
1498
  }
1471
1499
  }));
1472
1500
  var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1473
1501
  displayName: "PressableIconButton__StyledPressableIconButton"
1474
- })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref7) {
1475
- var theme = _ref7.theme;
1502
+ })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
1503
+ var theme = _ref5.theme;
1476
1504
  return theme.kitt.iconButton.borderRadius;
1477
- }, function (_ref8) {
1478
- var theme = _ref8.theme;
1505
+ }, function (_ref6) {
1506
+ var theme = _ref6.theme;
1479
1507
  return theme.kitt.iconButton.width;
1480
- }, function (_ref9) {
1481
- var theme = _ref9.theme;
1508
+ }, function (_ref7) {
1509
+ var theme = _ref7.theme;
1482
1510
  return theme.kitt.iconButton.height;
1483
- }, function (_ref10) {
1484
- var theme = _ref10.theme,
1485
- disabled = _ref10.disabled;
1511
+ }, function (_ref8) {
1512
+ var theme = _ref8.theme,
1513
+ disabled = _ref8.disabled;
1486
1514
  var iconButton = theme.kitt.iconButton;
1487
1515
 
1488
1516
  if (Platform.OS !== 'web') {
@@ -1497,13 +1525,13 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1497
1525
 
1498
1526
  return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
1499
1527
  });
1500
- function PressableIconButton(_ref11) {
1501
- var color = _ref11.color,
1502
- props = _objectWithoutProperties(_ref11, _excluded$6);
1528
+ function PressableIconButton(_ref9) {
1529
+ var color = _ref9.color,
1530
+ props = _objectWithoutProperties(_ref9, _excluded$6);
1503
1531
 
1504
1532
  return /*#__PURE__*/jsx(StyleWebWrapper, {
1505
1533
  as: PressableIconButtonWebWrapper,
1506
- "data-color-white": color === 'white' ? true : undefined,
1534
+ $isWhite: color === 'white',
1507
1535
  children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$8({}, props))
1508
1536
  });
1509
1537
  }
@@ -1839,7 +1867,7 @@ function LargeLoader(_ref) {
1839
1867
 
1840
1868
  var xIconSize = 14;
1841
1869
  var mainIconSize = 20;
1842
- var Container$2 = /*#__PURE__*/styled.View.withConfig({
1870
+ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1843
1871
  displayName: "Message__Container"
1844
1872
  })(["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) {
1845
1873
  var theme = _ref.theme,
@@ -1928,7 +1956,7 @@ function Message(_ref11) {
1928
1956
  onDismiss = _ref11.onDismiss,
1929
1957
  insets = _ref11.insets;
1930
1958
  var color = getColorByType(type);
1931
- return /*#__PURE__*/jsxs(Container$2, {
1959
+ return /*#__PURE__*/jsxs(Container$3, {
1932
1960
  type: type,
1933
1961
  noRadius: noRadius,
1934
1962
  insets: insets,
@@ -2132,6 +2160,127 @@ function Notification(_ref) {
2132
2160
  });
2133
2161
  }
2134
2162
 
2163
+ var Container$2 = /*#__PURE__*/styled.View.withConfig({
2164
+ displayName: "SkeletonContent__Container"
2165
+ })(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
2166
+ var theme = _ref.theme;
2167
+ return theme.kitt.skeleton.backgroundColor;
2168
+ }, function (_ref2) {
2169
+ var theme = _ref2.theme;
2170
+ return theme.kitt.skeleton.flareColor;
2171
+ });
2172
+ var AnimatedLinearGradient = Animated$1.createAnimatedComponent(LinearGradient);
2173
+ function SkeletonContent(_ref3) {
2174
+ var isLoading = _ref3.isLoading,
2175
+ width = _ref3.width;
2176
+ var theme = /*#__PURE__*/useTheme();
2177
+ var sharedX = useSharedValue(0);
2178
+ useEffect(function () {
2179
+ if (isLoading) {
2180
+ sharedX.value = withRepeat(withTiming(1, {
2181
+ duration: theme.kitt.skeleton.animationDuration,
2182
+ easing: Easing$1.inOut(Easing$1.ease)
2183
+ }), -1);
2184
+ }
2185
+ }, [sharedX, width, isLoading, theme]);
2186
+ var linearGradientStyle = useAnimatedStyle(function () {
2187
+ var _f = function () {
2188
+ return {
2189
+ transform: [{
2190
+ translateX: interpolate(sharedX.value, [0, 1], [-width, width])
2191
+ }]
2192
+ };
2193
+ };
2194
+
2195
+ _f._closure = {
2196
+ interpolate: interpolate,
2197
+ sharedX: sharedX,
2198
+ width: width
2199
+ };
2200
+ _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
2201
+ _f.__workletHash = 1670955855244;
2202
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (41:47)";
2203
+ _f.__optimalization = 3;
2204
+
2205
+ global.__reanimatedWorkletInit(_f);
2206
+
2207
+ return _f;
2208
+ }());
2209
+ return /*#__PURE__*/jsx(Container$2, {
2210
+ children: /*#__PURE__*/jsx(AnimatedLinearGradient, {
2211
+ colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
2212
+ locations: [0.1, 0.5, 0.9],
2213
+ start: {
2214
+ x: 0,
2215
+ y: 0
2216
+ },
2217
+ end: {
2218
+ x: 1,
2219
+ y: 0
2220
+ },
2221
+ style: [StyleSheet.absoluteFill, linearGradientStyle]
2222
+ })
2223
+ });
2224
+ }
2225
+
2226
+ function Skeleton(_ref) {
2227
+ var isLoading = _ref.isLoading,
2228
+ style = _ref.style;
2229
+
2230
+ var _useState = useState(0),
2231
+ _useState2 = _slicedToArray(_useState, 2),
2232
+ width = _useState2[0],
2233
+ setWidth = _useState2[1];
2234
+
2235
+ return /*#__PURE__*/jsx(View, {
2236
+ style: style,
2237
+ onLayout: function onLayout(_ref2) {
2238
+ var nativeEvent = _ref2.nativeEvent;
2239
+ return setWidth(nativeEvent.layout.width);
2240
+ },
2241
+ children: /*#__PURE__*/jsx(SkeletonContent, {
2242
+ isLoading: isLoading,
2243
+ width: width
2244
+ })
2245
+ });
2246
+ }
2247
+ var Bar = /*#__PURE__*/styled(Skeleton).withConfig({
2248
+ displayName: "Skeleton__Bar"
2249
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref3) {
2250
+ var theme = _ref3.theme;
2251
+ return theme.kitt.spacing * 2;
2252
+ }, function (_ref4) {
2253
+ var theme = _ref4.theme;
2254
+ return theme.kitt.spacing * 2;
2255
+ });
2256
+ var Circle = /*#__PURE__*/styled(Skeleton).withConfig({
2257
+ displayName: "Skeleton__Circle"
2258
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref5) {
2259
+ var theme = _ref5.theme;
2260
+ return theme.kitt.spacing * 12;
2261
+ }, function (_ref6) {
2262
+ var theme = _ref6.theme;
2263
+ return theme.kitt.spacing * 12;
2264
+ }, function (_ref7) {
2265
+ var theme = _ref7.theme;
2266
+ return theme.kitt.spacing * 6;
2267
+ });
2268
+ var Square = /*#__PURE__*/styled(Skeleton).withConfig({
2269
+ displayName: "Skeleton__Square"
2270
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref8) {
2271
+ var theme = _ref8.theme;
2272
+ return theme.kitt.spacing * 12;
2273
+ }, function (_ref9) {
2274
+ var theme = _ref9.theme;
2275
+ return theme.kitt.spacing * 12;
2276
+ }, function (_ref10) {
2277
+ var theme = _ref10.theme;
2278
+ return theme.kitt.spacing * 1.5;
2279
+ });
2280
+ Skeleton.Bar = Bar;
2281
+ Skeleton.Circle = Circle;
2282
+ Skeleton.Square = Square;
2283
+
2135
2284
  var Flex = /*#__PURE__*/styled.View.withConfig({
2136
2285
  shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
2137
2286
  return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
@@ -2565,17 +2714,6 @@ var lateOceanColorPalette = {
2565
2714
  moonPurpleLight1: '#EDEBFC'
2566
2715
  };
2567
2716
 
2568
- var avatarLateOceanTheme = {
2569
- "default": {
2570
- color: lateOceanColorPalette.white,
2571
- backgroundColor: lateOceanColorPalette.lateOcean
2572
- },
2573
- light: {
2574
- color: lateOceanColorPalette.black1000,
2575
- backgroundColor: lateOceanColorPalette.black100
2576
- }
2577
- };
2578
-
2579
2717
  var colorsLateOceanTheme = {
2580
2718
  primary: lateOceanColorPalette.lateOcean,
2581
2719
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2598,6 +2736,16 @@ var colorsLateOceanTheme = {
2598
2736
  }
2599
2737
  };
2600
2738
 
2739
+ var avatar = {
2740
+ borderRadius: '10px',
2741
+ "default": {
2742
+ backgroundColor: colorsLateOceanTheme.primary
2743
+ },
2744
+ light: {
2745
+ backgroundColor: lateOceanColorPalette.black100
2746
+ }
2747
+ };
2748
+
2601
2749
  var buttonLateOceanTheme = {
2602
2750
  borderRadius: '30px',
2603
2751
  borderWidth: {
@@ -2824,6 +2972,12 @@ var shadowsLateOceanTheme = {
2824
2972
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2825
2973
  };
2826
2974
 
2975
+ var skeletonTheme = {
2976
+ backgroundColor: lateOceanColorPalette.black100,
2977
+ flareColor: lateOceanColorPalette.black200,
2978
+ animationDuration: 1000
2979
+ };
2980
+
2827
2981
  var tagLateOceanTheme = {
2828
2982
  borderRadius: '10px',
2829
2983
  padding: '2px 12px',
@@ -2877,20 +3031,18 @@ var tooltip = {
2877
3031
  var calcLineHeight = function (fontSize, lineHeightMultiplier) {
2878
3032
  return Math.round(fontSize * lineHeightMultiplier);
2879
3033
  };
2880
-
2881
3034
  var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
2882
3035
  return {
2883
3036
  baseAndSmall: {
2884
3037
  fontSize: "".concat(baseAndSmallFontSize, "px"),
2885
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3038
+ lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
2886
3039
  },
2887
3040
  mediumAndWide: {
2888
3041
  fontSize: "".concat(mediumAndWideFontSize, "px"),
2889
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3042
+ lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
2890
3043
  }
2891
3044
  };
2892
3045
  };
2893
-
2894
3046
  var typographyLateOceanTheme = {
2895
3047
  colors: {
2896
3048
  black: lateOceanColorPalette.black1000,
@@ -2972,7 +3124,7 @@ var breakpoints = {
2972
3124
  wideBreakpoint: 'max-width: 1279px'
2973
3125
  }
2974
3126
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2975
- // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
3127
+ // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2976
3128
 
2977
3129
  var theme = {
2978
3130
  spacing: 4,
@@ -2980,7 +3132,7 @@ var theme = {
2980
3132
  palettes: {
2981
3133
  lateOcean: lateOceanColorPalette
2982
3134
  },
2983
- avatar: avatarLateOceanTheme,
3135
+ avatar: avatar,
2984
3136
  button: buttonLateOceanTheme,
2985
3137
  card: cardLateOceanTheme,
2986
3138
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2991,7 +3143,9 @@ var theme = {
2991
3143
  fullScreenModal: fullScreenModalLateOceanTheme,
2992
3144
  iconButton: iconButton,
2993
3145
  listItem: listItemLateOceanTheme,
2994
- tooltip: tooltip
3146
+ tooltip: tooltip,
3147
+ skeleton: skeletonTheme,
3148
+ breakpoints: breakpoints
2995
3149
  };
2996
3150
 
2997
3151
  function Title(_ref) {
@@ -3375,40 +3529,46 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
3375
3529
  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; }
3376
3530
  var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled$1("span")({
3377
3531
  name: "TypographyLinkWebWrapper",
3378
- "class": "tcwz3nt"
3532
+ "class": "tcwz3nt",
3533
+ vars: {
3534
+ "tcwz3nt-0": [function (_ref) {
3535
+ var $hasNoUnderline = _ref.$hasNoUnderline;
3536
+ return $hasNoUnderline ? 'underline' : 'none';
3537
+ }]
3538
+ }
3379
3539
  }));
3380
3540
  var StyledLink = /*#__PURE__*/styled.Text.withConfig({
3381
3541
  displayName: "TypographyLink__StyledLink"
3382
- })(["text-decoration:", ";", ";", ";"], function (_ref) {
3383
- var $noUnderline = _ref.$noUnderline;
3384
- return $noUnderline ? 'none' : 'underline';
3385
- }, function (_ref2) {
3386
- var $disabled = _ref2.$disabled;
3542
+ })(["text-decoration:", ";", ";", ";"], function (_ref2) {
3543
+ var $hasNoUnderline = _ref2.$hasNoUnderline;
3544
+ return $hasNoUnderline ? 'none' : 'underline';
3545
+ }, function (_ref3) {
3546
+ var $disabled = _ref3.$disabled;
3387
3547
  if (Platform.OS !== 'web') return undefined;
3388
3548
  return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
3389
- }, function (_ref3) {
3390
- var $disabled = _ref3.$disabled,
3391
- theme = _ref3.theme;
3549
+ }, function (_ref4) {
3550
+ var $disabled = _ref4.$disabled,
3551
+ theme = _ref4.theme;
3392
3552
  if (!$disabled) return undefined;
3393
3553
  return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
3394
3554
  });
3395
- function TypographyLink(_ref4) {
3396
- var children = _ref4.children,
3397
- disabled = _ref4.disabled,
3398
- noUnderline = _ref4.noUnderline,
3399
- href = _ref4.href,
3400
- hrefAttrs = _ref4.hrefAttrs,
3401
- onPress = _ref4.onPress,
3402
- otherProps = _objectWithoutProperties(_ref4, _excluded$1);
3555
+ function TypographyLink(_ref5) {
3556
+ var children = _ref5.children,
3557
+ disabled = _ref5.disabled,
3558
+ noUnderline = _ref5.noUnderline,
3559
+ href = _ref5.href,
3560
+ hrefAttrs = _ref5.hrefAttrs,
3561
+ onPress = _ref5.onPress,
3562
+ otherProps = _objectWithoutProperties(_ref5, _excluded$1);
3403
3563
 
3404
3564
  return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
3405
3565
  accessibilityRole: "none",
3406
3566
  children: /*#__PURE__*/jsx(StyleWebWrapper, {
3407
3567
  as: TypographyLinkWebWrapper,
3408
- "data-nounderline": noUnderline ? true : undefined,
3568
+ $hasNoUnderline: noUnderline,
3409
3569
  children: /*#__PURE__*/jsx(StyledLink, {
3410
3570
  $disabled: disabled,
3411
- $noUnderline: noUnderline,
3571
+ $hasNoUnderline: noUnderline,
3412
3572
  href: href,
3413
3573
  hrefAttrs: hrefAttrs,
3414
3574
  accessibilityRole: "link",
@@ -3491,12 +3651,19 @@ function useKittTheme() {
3491
3651
  return useMemo(function () {
3492
3652
  return {
3493
3653
  kitt: theme,
3494
- responsive: createWindowSizeHelper(dimensions),
3495
- breakpoints: breakpoints
3654
+ responsive: createWindowSizeHelper(dimensions)
3496
3655
  };
3497
3656
  }, [dimensions]);
3498
3657
  }
3499
3658
 
3659
+ var hex2rgba = function (hex) {
3660
+ var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
3661
+ var r = parseInt(hex.slice(1, 3), 16);
3662
+ var g = parseInt(hex.slice(3, 5), 16);
3663
+ var b = parseInt(hex.slice(5, 7), 16);
3664
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
3665
+ };
3666
+
3500
3667
  function KittThemeProvider(_ref) {
3501
3668
  var children = _ref.children;
3502
3669
  var theme = useKittTheme();
@@ -3529,5 +3696,5 @@ function MatchWindowSize(_ref) {
3529
3696
  });
3530
3697
  }
3531
3698
 
3532
- 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 };
3699
+ 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, withTheme };
3533
3700
  //# sourceMappingURL=index-browser-all.es.js.map