@ornikar/kitt-universal 3.4.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) 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/useKittTheme.d.ts +0 -2
  24. package/dist/definitions/useKittTheme.d.ts.map +1 -1
  25. package/dist/definitions/utils/hexToRgba.d.ts +2 -0
  26. package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
  27. package/dist/definitions/utils/withTheme.d.ts +2 -2
  28. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  29. package/dist/index-browser-all.es.android.js +296 -129
  30. package/dist/index-browser-all.es.android.js.map +1 -1
  31. package/dist/index-browser-all.es.css +1 -1
  32. package/dist/index-browser-all.es.ios.js +296 -129
  33. package/dist/index-browser-all.es.ios.js.map +1 -1
  34. package/dist/index-browser-all.es.js +228 -87
  35. package/dist/index-browser-all.es.js.map +1 -1
  36. package/dist/index-browser-all.es.web.js +226 -124
  37. package/dist/index-browser-all.es.web.js.map +1 -1
  38. package/dist/index-node-14.17.cjs.css +1 -1
  39. package/dist/index-node-14.17.cjs.js +199 -59
  40. package/dist/index-node-14.17.cjs.js.map +1 -1
  41. package/dist/index-node-14.17.cjs.web.css +3 -2
  42. package/dist/index-node-14.17.cjs.web.js +186 -84
  43. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  44. package/dist/styles.css +3 -2
  45. package/dist/tsbuildinfo +1 -1
  46. package/package.json +6 -5
  47. package/tsconfig.eslint.json +6 -0
@@ -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';
@@ -302,45 +303,44 @@ Typography.h4 = createHeading(4, 'header4');
302
303
 
303
304
  Typography.h5 = createHeading(5, 'header5');
304
305
 
305
- var _excluded$c = ["size"];
306
+ var _excluded$c = ["size", "base", "round", "light"];
306
307
 
307
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; }
308
309
 
309
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; }
310
311
 
311
- var getFirstCharacter = function (string) {
312
- return string ? string[0] : '';
313
- };
314
-
315
312
  var getInitials = function (firstname, lastname) {
316
- return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
313
+ return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
317
314
  };
318
315
 
319
316
  var StyledAvatarView = /*#__PURE__*/styled.View.withConfig({
320
317
  displayName: "Avatar__StyledAvatarView"
321
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
322
- var round = _ref.round,
323
- size = _ref.size;
324
- 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;
325
324
  }, function (_ref2) {
326
325
  var theme = _ref2.theme,
327
- light = _ref2.light;
328
- 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;
329
328
  }, function (_ref3) {
330
- var size = _ref3.size;
331
- return size;
329
+ var $size = _ref3.$size;
330
+ return $size;
332
331
  }, function (_ref4) {
333
- var size = _ref4.size;
334
- return size;
332
+ var $size = _ref4.$size;
333
+ return $size;
335
334
  });
336
335
 
337
336
  function AvatarContent(_ref5) {
338
- var _ref5$size = _ref5.size,
339
- size = _ref5$size === void 0 ? 40 : _ref5$size,
337
+ var size = _ref5.size,
340
338
  src = _ref5.src,
341
339
  firstname = _ref5.firstname,
342
340
  lastname = _ref5.lastname,
343
- light = _ref5.light;
341
+ alt = _ref5.alt,
342
+ base = _ref5.base,
343
+ isLight = _ref5.isLight;
344
344
 
345
345
  if (src) {
346
346
  return /*#__PURE__*/jsx(Image, {
@@ -350,22 +350,23 @@ function AvatarContent(_ref5) {
350
350
  style: {
351
351
  width: size,
352
352
  height: size
353
- }
353
+ },
354
+ accessibilityLabel: alt
354
355
  });
355
356
  }
356
357
 
357
358
  if (firstname && lastname) {
358
359
  return /*#__PURE__*/jsx(Typography.Text, {
359
- base: "body-small",
360
+ base: base,
360
361
  variant: "bold",
361
- color: light ? 'black' : 'white',
362
+ color: isLight ? 'black' : 'white',
362
363
  children: getInitials(firstname, lastname)
363
364
  });
364
365
  }
365
366
 
366
367
  return /*#__PURE__*/jsx(Icon, {
367
368
  icon: /*#__PURE__*/jsx(UserIcon, {}),
368
- color: light ? 'black' : 'white',
369
+ color: isLight ? 'black' : 'white',
369
370
  size: size / 2
370
371
  });
371
372
  }
@@ -373,14 +374,22 @@ function AvatarContent(_ref5) {
373
374
  function Avatar(_ref6) {
374
375
  var _ref6$size = _ref6.size,
375
376
  size = _ref6$size === void 0 ? 40 : _ref6$size,
376
- rest = _objectWithoutProperties(_ref6, _excluded$c);
377
-
378
- return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$g(_objectSpread$g({}, rest), {}, {
379
- size: size,
380
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$g(_objectSpread$g({}, rest), {}, {
381
- size: size
382
- }))
383
- }));
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
+ });
384
393
  }
385
394
 
386
395
  var StyledPressable = /*#__PURE__*/styled.Pressable.withConfig({
@@ -781,7 +790,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
781
790
  });
782
791
  });
783
792
 
784
- var Container$6 = /*#__PURE__*/styled.View.withConfig({
793
+ var Container$7 = /*#__PURE__*/styled.View.withConfig({
785
794
  displayName: "Card__Container"
786
795
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], function (_ref) {
787
796
  var theme = _ref.theme,
@@ -804,7 +813,7 @@ var Container$6 = /*#__PURE__*/styled.View.withConfig({
804
813
  function Card(_ref6) {
805
814
  var children = _ref6.children,
806
815
  type = _ref6.type;
807
- return /*#__PURE__*/jsx(Container$6, {
816
+ return /*#__PURE__*/jsx(Container$7, {
808
817
  type: type,
809
818
  children: children
810
819
  });
@@ -1027,7 +1036,7 @@ var Input = /*#__PURE__*/styled(TextInput).withConfig({
1027
1036
  var minHeight = _ref10.minHeight;
1028
1037
  return minHeight;
1029
1038
  });
1030
- var Container$5 = /*#__PURE__*/styled.View.withConfig({
1039
+ var Container$6 = /*#__PURE__*/styled.View.withConfig({
1031
1040
  displayName: "InputText__Container"
1032
1041
  })(["margin-top:", ";margin-bottom:", ";"], function (_ref11) {
1033
1042
  var theme = _ref11.theme;
@@ -1103,7 +1112,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
1103
1112
  isDisabled: disabled,
1104
1113
  formState: formState
1105
1114
  });
1106
- return /*#__PURE__*/jsxs(Container$5, {
1115
+ return /*#__PURE__*/jsxs(Container$6, {
1107
1116
  children: [/*#__PURE__*/jsx(Input, _objectSpread$c(_objectSpread$c({
1108
1117
  ref: ref,
1109
1118
  nativeID: id,
@@ -1203,7 +1212,7 @@ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
1203
1212
  var theme = _ref14.theme;
1204
1213
  return theme.kitt.forms.radio.checked.innerSize / 2;
1205
1214
  });
1206
- var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
1215
+ var Container$5 = /*#__PURE__*/styled.Pressable.withConfig({
1207
1216
  displayName: "Radio__Container"
1208
1217
  })(["flex-direction:row;align-items:center;"]);
1209
1218
  var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
@@ -1220,7 +1229,7 @@ function Radio(_ref16) {
1220
1229
  _ref16$disabled = _ref16.disabled,
1221
1230
  disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
1222
1231
  children = _ref16.children;
1223
- return /*#__PURE__*/jsxs(Container$4, {
1232
+ return /*#__PURE__*/jsxs(Container$5, {
1224
1233
  nativeID: id,
1225
1234
  disabled: disabled,
1226
1235
  accessibilityRole: "radio",
@@ -1249,7 +1258,8 @@ function TextArea(_ref) {
1249
1258
 
1250
1259
  var theme = /*#__PURE__*/useTheme();
1251
1260
  return /*#__PURE__*/jsx(InputText, _objectSpread$b(_objectSpread$b({
1252
- multiline: true
1261
+ multiline: true,
1262
+ textAlignVertical: "top"
1253
1263
  }, props), {}, {
1254
1264
  type: "text",
1255
1265
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1399,7 +1409,7 @@ function FullScreenModalHeader(_ref6) {
1399
1409
  });
1400
1410
  }
1401
1411
 
1402
- var Container$3 = /*#__PURE__*/styled.View.withConfig({
1412
+ var Container$4 = /*#__PURE__*/styled.View.withConfig({
1403
1413
  displayName: "FullScreenModal__Container"
1404
1414
  })(["flex:1;background-color:", ";"], function (_ref) {
1405
1415
  var theme = _ref.theme;
@@ -1407,7 +1417,7 @@ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1407
1417
  });
1408
1418
  function FullScreenModal(_ref2) {
1409
1419
  var children = _ref2.children;
1410
- return /*#__PURE__*/jsx(Container$3, {
1420
+ return /*#__PURE__*/jsx(Container$4, {
1411
1421
  children: children
1412
1422
  });
1413
1423
  }
@@ -1445,12 +1455,14 @@ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) {
1445
1455
  // };
1446
1456
  // }
1447
1457
  function withTheme(WrappedComponent) {
1448
- return function (props) {
1458
+ // eslint-disable-next-line prefer-arrow-callback
1459
+ return /*#__PURE__*/forwardRef(function (props, ref) {
1449
1460
  var theme = /*#__PURE__*/useTheme();
1450
1461
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$9({
1462
+ ref: ref,
1451
1463
  theme: theme
1452
1464
  }, props));
1453
- };
1465
+ });
1454
1466
  }
1455
1467
 
1456
1468
  var _excluded$6 = ["color"];
@@ -1466,21 +1478,17 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
1466
1478
  var theme = _ref.theme;
1467
1479
  return theme.kitt.iconButton.scale.base.hover;
1468
1480
  }],
1469
- "p1nlccvg-1": [function (_ref2) {
1481
+ "p1nlccvg-2": [function (_ref2) {
1470
1482
  var theme = _ref2.theme;
1471
- return theme.breakpoints.min.mediumBreakpoint;
1472
- }],
1473
- "p1nlccvg-2": [function (_ref3) {
1474
- var theme = _ref3.theme;
1475
1483
  return theme.kitt.iconButton.scale.medium.hover;
1476
1484
  }],
1477
- "p1nlccvg-3": [function (_ref4) {
1478
- var theme = _ref4.theme;
1485
+ "p1nlccvg-3": [function (_ref3) {
1486
+ var theme = _ref3.theme;
1479
1487
  return theme.kitt.iconButton.scale.base.active;
1480
1488
  }],
1481
- "p1nlccvg-4": [function (_ref5) {
1482
- var theme = _ref5.theme,
1483
- $isWhite = _ref5.$isWhite;
1489
+ "p1nlccvg-4": [function (_ref4) {
1490
+ var theme = _ref4.theme,
1491
+ $isWhite = _ref4.$isWhite;
1484
1492
  var _theme$kitt$iconButto = theme.kitt.iconButton,
1485
1493
  white = _theme$kitt$iconButto.white,
1486
1494
  defaultIconButton = _theme$kitt$iconButto["default"];
@@ -1491,18 +1499,18 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
1491
1499
  }));
1492
1500
  var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1493
1501
  displayName: "PressableIconButton__StyledPressableIconButton"
1494
- })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref6) {
1495
- var theme = _ref6.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;
1496
1504
  return theme.kitt.iconButton.borderRadius;
1505
+ }, function (_ref6) {
1506
+ var theme = _ref6.theme;
1507
+ return theme.kitt.iconButton.width;
1497
1508
  }, function (_ref7) {
1498
1509
  var theme = _ref7.theme;
1499
- return theme.kitt.iconButton.width;
1500
- }, function (_ref8) {
1501
- var theme = _ref8.theme;
1502
1510
  return theme.kitt.iconButton.height;
1503
- }, function (_ref9) {
1504
- var theme = _ref9.theme,
1505
- disabled = _ref9.disabled;
1511
+ }, function (_ref8) {
1512
+ var theme = _ref8.theme,
1513
+ disabled = _ref8.disabled;
1506
1514
  var iconButton = theme.kitt.iconButton;
1507
1515
 
1508
1516
  if (Platform.OS !== 'web') {
@@ -1517,9 +1525,9 @@ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1517
1525
 
1518
1526
  return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
1519
1527
  });
1520
- function PressableIconButton(_ref10) {
1521
- var color = _ref10.color,
1522
- props = _objectWithoutProperties(_ref10, _excluded$6);
1528
+ function PressableIconButton(_ref9) {
1529
+ var color = _ref9.color,
1530
+ props = _objectWithoutProperties(_ref9, _excluded$6);
1523
1531
 
1524
1532
  return /*#__PURE__*/jsx(StyleWebWrapper, {
1525
1533
  as: PressableIconButtonWebWrapper,
@@ -1859,7 +1867,7 @@ function LargeLoader(_ref) {
1859
1867
 
1860
1868
  var xIconSize = 14;
1861
1869
  var mainIconSize = 20;
1862
- var Container$2 = /*#__PURE__*/styled.View.withConfig({
1870
+ var Container$3 = /*#__PURE__*/styled.View.withConfig({
1863
1871
  displayName: "Message__Container"
1864
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) {
1865
1873
  var theme = _ref.theme,
@@ -1948,7 +1956,7 @@ function Message(_ref11) {
1948
1956
  onDismiss = _ref11.onDismiss,
1949
1957
  insets = _ref11.insets;
1950
1958
  var color = getColorByType(type);
1951
- return /*#__PURE__*/jsxs(Container$2, {
1959
+ return /*#__PURE__*/jsxs(Container$3, {
1952
1960
  type: type,
1953
1961
  noRadius: noRadius,
1954
1962
  insets: insets,
@@ -2152,6 +2160,127 @@ function Notification(_ref) {
2152
2160
  });
2153
2161
  }
2154
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
+
2155
2284
  var Flex = /*#__PURE__*/styled.View.withConfig({
2156
2285
  shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
2157
2286
  return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
@@ -2585,17 +2714,6 @@ var lateOceanColorPalette = {
2585
2714
  moonPurpleLight1: '#EDEBFC'
2586
2715
  };
2587
2716
 
2588
- var avatarLateOceanTheme = {
2589
- "default": {
2590
- color: lateOceanColorPalette.white,
2591
- backgroundColor: lateOceanColorPalette.lateOcean
2592
- },
2593
- light: {
2594
- color: lateOceanColorPalette.black1000,
2595
- backgroundColor: lateOceanColorPalette.black100
2596
- }
2597
- };
2598
-
2599
2717
  var colorsLateOceanTheme = {
2600
2718
  primary: lateOceanColorPalette.lateOcean,
2601
2719
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2618,6 +2736,16 @@ var colorsLateOceanTheme = {
2618
2736
  }
2619
2737
  };
2620
2738
 
2739
+ var avatar = {
2740
+ borderRadius: '10px',
2741
+ "default": {
2742
+ backgroundColor: colorsLateOceanTheme.primary
2743
+ },
2744
+ light: {
2745
+ backgroundColor: lateOceanColorPalette.black100
2746
+ }
2747
+ };
2748
+
2621
2749
  var buttonLateOceanTheme = {
2622
2750
  borderRadius: '30px',
2623
2751
  borderWidth: {
@@ -2844,6 +2972,12 @@ var shadowsLateOceanTheme = {
2844
2972
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2845
2973
  };
2846
2974
 
2975
+ var skeletonTheme = {
2976
+ backgroundColor: lateOceanColorPalette.black100,
2977
+ flareColor: lateOceanColorPalette.black200,
2978
+ animationDuration: 1000
2979
+ };
2980
+
2847
2981
  var tagLateOceanTheme = {
2848
2982
  borderRadius: '10px',
2849
2983
  padding: '2px 12px',
@@ -2897,20 +3031,18 @@ var tooltip = {
2897
3031
  var calcLineHeight = function (fontSize, lineHeightMultiplier) {
2898
3032
  return Math.round(fontSize * lineHeightMultiplier);
2899
3033
  };
2900
-
2901
3034
  var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
2902
3035
  return {
2903
3036
  baseAndSmall: {
2904
3037
  fontSize: "".concat(baseAndSmallFontSize, "px"),
2905
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3038
+ lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
2906
3039
  },
2907
3040
  mediumAndWide: {
2908
3041
  fontSize: "".concat(mediumAndWideFontSize, "px"),
2909
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
3042
+ lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
2910
3043
  }
2911
3044
  };
2912
3045
  };
2913
-
2914
3046
  var typographyLateOceanTheme = {
2915
3047
  colors: {
2916
3048
  black: lateOceanColorPalette.black1000,
@@ -2992,7 +3124,7 @@ var breakpoints = {
2992
3124
  wideBreakpoint: 'max-width: 1279px'
2993
3125
  }
2994
3126
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2995
- // 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
2996
3128
 
2997
3129
  var theme = {
2998
3130
  spacing: 4,
@@ -3000,7 +3132,7 @@ var theme = {
3000
3132
  palettes: {
3001
3133
  lateOcean: lateOceanColorPalette
3002
3134
  },
3003
- avatar: avatarLateOceanTheme,
3135
+ avatar: avatar,
3004
3136
  button: buttonLateOceanTheme,
3005
3137
  card: cardLateOceanTheme,
3006
3138
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -3011,7 +3143,9 @@ var theme = {
3011
3143
  fullScreenModal: fullScreenModalLateOceanTheme,
3012
3144
  iconButton: iconButton,
3013
3145
  listItem: listItemLateOceanTheme,
3014
- tooltip: tooltip
3146
+ tooltip: tooltip,
3147
+ skeleton: skeletonTheme,
3148
+ breakpoints: breakpoints
3015
3149
  };
3016
3150
 
3017
3151
  function Title(_ref) {
@@ -3517,12 +3651,19 @@ function useKittTheme() {
3517
3651
  return useMemo(function () {
3518
3652
  return {
3519
3653
  kitt: theme,
3520
- responsive: createWindowSizeHelper(dimensions),
3521
- breakpoints: breakpoints
3654
+ responsive: createWindowSizeHelper(dimensions)
3522
3655
  };
3523
3656
  }, [dimensions]);
3524
3657
  }
3525
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
+
3526
3667
  function KittThemeProvider(_ref) {
3527
3668
  var children = _ref.children;
3528
3669
  var theme = useKittTheme();
@@ -3555,5 +3696,5 @@ function MatchWindowSize(_ref) {
3555
3696
  });
3556
3697
  }
3557
3698
 
3558
- 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 };
3559
3700
  //# sourceMappingURL=index-browser-all.es.js.map