@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
@@ -1,2 +1,2 @@
1
- @media (hover:none) and (pointer:coarse){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-0));-ms-transform:scale(var(--p1nlccvg-0));transform:scale(var(--p1nlccvg-0));}}@media (var(--p1nlccvg-1)){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-2));-ms-transform:scale(var(--p1nlccvg-2));transform:scale(var(--p1nlccvg-2));}}.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-3));-ms-transform:scale(var(--p1nlccvg-3));transform:scale(var(--p1nlccvg-3));}.p1nlccvg,.p1nlccvg > [data-focusvisible-polyfill]{outline:none;}.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *,.p1nlccvg > *:focus,.kitt-focus .p1nlccvg > *,.p1nlccvg > [data-focusvisible-polyfill],.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{background-color:var(--p1nlccvg-4);}
1
+ @media (hover:none) and (pointer:coarse){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-0));-ms-transform:scale(var(--p1nlccvg-0));transform:scale(var(--p1nlccvg-0));}}@media (min-width:768px){.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-2));-ms-transform:scale(var(--p1nlccvg-2));transform:scale(var(--p1nlccvg-2));}}.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{-webkit-transform:scale(var(--p1nlccvg-3));-ms-transform:scale(var(--p1nlccvg-3));transform:scale(var(--p1nlccvg-3));}.p1nlccvg,.p1nlccvg > [data-focusvisible-polyfill]{outline:none;}.p1nlccvg > *:hover,.kitt-hover .p1nlccvg > *,.p1nlccvg > *:focus,.kitt-focus .p1nlccvg > *,.p1nlccvg > [data-focusvisible-polyfill],.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{background-color:var(--p1nlccvg-4);}
2
2
  .tcwz3nt > *:hover,.tcwz3nt > *:active,.kitt-hover .tcwz3nt > *{-webkit-text-decoration:none;text-decoration:none;}.tcwz3nt > *:hover,.tcwz3nt > *:active,.kitt-hover .tcwz3nt > *{-webkit-text-decoration:var(--tcwz3nt-0);text-decoration:var(--tcwz3nt-0);}
@@ -12,6 +12,7 @@ const twemojiParser = require('twemoji-parser');
12
12
  const WebBrowser = require('expo-web-browser');
13
13
  const reactNativeSafeAreaContext = require('react-native-safe-area-context');
14
14
  const react$1 = require('@linaria/react');
15
+ const expoLinearGradient = require('expo-linear-gradient');
15
16
  const DateTimePicker = require('@react-native-community/datetimepicker');
16
17
  const reactIntl = require('react-intl');
17
18
  const reactNative$1 = require('@floating-ui/react-native');
@@ -316,31 +317,35 @@ Typography.h4 = createHeading(4, 'header4');
316
317
 
317
318
  Typography.h5 = createHeading(5, 'header5');
318
319
 
319
- const getFirstCharacter = string => string ? string[0] : '';
320
-
321
- const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
320
+ const getInitials = (firstname, lastname) => `${firstname[0]}${lastname[0]}`.toUpperCase();
322
321
 
323
322
  const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
324
323
  displayName: "Avatar__StyledAvatarView",
325
324
  componentId: "kitt-universal__sc-9miubv-0"
326
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
327
- round,
328
- size
329
- }) => round ? size / 2 : 10, ({
325
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
330
326
  theme,
331
- light
332
- }) => light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
333
- size
334
- }) => size, ({
335
- size
336
- }) => size);
327
+ $isRound,
328
+ $size
329
+ }) => {
330
+ if ($isRound) return `${$size / 2}px`;
331
+ return theme.kitt.avatar.borderRadius;
332
+ }, ({
333
+ theme,
334
+ $isLight
335
+ }) => $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
336
+ $size
337
+ }) => $size, ({
338
+ $size
339
+ }) => $size);
337
340
 
338
341
  function AvatarContent({
339
- size = 40,
342
+ size,
340
343
  src,
341
344
  firstname,
342
345
  lastname,
343
- light
346
+ alt,
347
+ base,
348
+ isLight
344
349
  }) {
345
350
  if (src) {
346
351
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
@@ -350,34 +355,43 @@ function AvatarContent({
350
355
  style: {
351
356
  width: size,
352
357
  height: size
353
- }
358
+ },
359
+ accessibilityLabel: alt
354
360
  });
355
361
  }
356
362
 
357
363
  if (firstname && lastname) {
358
364
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
359
- base: "body-small",
365
+ base: base,
360
366
  variant: "bold",
361
- color: light ? 'black' : 'white',
367
+ color: isLight ? 'black' : 'white',
362
368
  children: getInitials(firstname, lastname)
363
369
  });
364
370
  }
365
371
 
366
372
  return /*#__PURE__*/jsxRuntime.jsx(Icon, {
367
373
  icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.UserIcon, {}),
368
- color: light ? 'black' : 'white',
374
+ color: isLight ? 'black' : 'white',
369
375
  size: size / 2
370
376
  });
371
377
  }
372
378
 
373
379
  function Avatar({
374
380
  size = 40,
375
- ...rest
381
+ base = 'body-small',
382
+ round,
383
+ light,
384
+ ...props
376
385
  }) {
377
- return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, { ...rest,
378
- size: size,
379
- children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, { ...rest,
380
- size: size
386
+ return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
387
+ $size: size,
388
+ $isRound: round,
389
+ $isLight: light,
390
+ children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
391
+ size: size,
392
+ base: base,
393
+ isLight: light,
394
+ ...props
381
395
  })
382
396
  });
383
397
  }
@@ -787,7 +801,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
787
801
  });
788
802
  });
789
803
 
790
- const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
804
+ const Container$7 = /*#__PURE__*/styled__default.View.withConfig({
791
805
  displayName: "Card__Container",
792
806
  componentId: "kitt-universal__sc-1n9psug-0"
793
807
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
@@ -807,7 +821,7 @@ function Card({
807
821
  children,
808
822
  type
809
823
  }) {
810
- return /*#__PURE__*/jsxRuntime.jsx(Container$6, {
824
+ return /*#__PURE__*/jsxRuntime.jsx(Container$7, {
811
825
  type: type,
812
826
  children: children
813
827
  });
@@ -995,7 +1009,7 @@ const Input = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
995
1009
  }, ({
996
1010
  minHeight
997
1011
  }) => minHeight);
998
- const Container$5 = /*#__PURE__*/styled__default.View.withConfig({
1012
+ const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
999
1013
  displayName: "InputText__Container",
1000
1014
  componentId: "kitt-universal__sc-uke279-1"
1001
1015
  })(["margin-top:", ";margin-bottom:", ";"], ({
@@ -1069,7 +1083,7 @@ const InputText = /*#__PURE__*/react.forwardRef(({
1069
1083
  isDisabled: disabled,
1070
1084
  formState
1071
1085
  });
1072
- return /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
1086
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$6, {
1073
1087
  children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
1074
1088
  ref: ref,
1075
1089
  nativeID: id,
@@ -1159,7 +1173,7 @@ const SelectedInnerRadio = /*#__PURE__*/styled__default.View.withConfig({
1159
1173
  }) => theme.kitt.forms.radio.checked.innerSize, ({
1160
1174
  theme
1161
1175
  }) => theme.kitt.forms.radio.checked.innerSize / 2);
1162
- const Container$4 = /*#__PURE__*/styled__default.Pressable.withConfig({
1176
+ const Container$5 = /*#__PURE__*/styled__default.Pressable.withConfig({
1163
1177
  displayName: "Radio__Container",
1164
1178
  componentId: "kitt-universal__sc-1mdgr2o-3"
1165
1179
  })(["flex-direction:row;align-items:center;"]);
@@ -1177,7 +1191,7 @@ function Radio({
1177
1191
  disabled = false,
1178
1192
  children
1179
1193
  }) {
1180
- return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
1194
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
1181
1195
  nativeID: id,
1182
1196
  disabled: disabled,
1183
1197
  accessibilityRole: "radio",
@@ -1203,6 +1217,7 @@ function TextArea({ ...props
1203
1217
  const theme = /*#__PURE__*/styled.useTheme();
1204
1218
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1205
1219
  multiline: true,
1220
+ textAlignVertical: "top",
1206
1221
  ...props,
1207
1222
  type: "text",
1208
1223
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1344,7 +1359,7 @@ function FullScreenModalHeader({
1344
1359
  });
1345
1360
  }
1346
1361
 
1347
- const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1362
+ const Container$4 = /*#__PURE__*/styled__default.View.withConfig({
1348
1363
  displayName: "FullScreenModal__Container",
1349
1364
  componentId: "kitt-universal__sc-11qpbe3-0"
1350
1365
  })(["flex:1;background-color:", ";"], ({
@@ -1353,7 +1368,7 @@ const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1353
1368
  function FullScreenModal({
1354
1369
  children
1355
1370
  }) {
1356
- return /*#__PURE__*/jsxRuntime.jsx(Container$3, {
1371
+ return /*#__PURE__*/jsxRuntime.jsx(Container$4, {
1357
1372
  children: children
1358
1373
  });
1359
1374
  }
@@ -1383,13 +1398,15 @@ function StyleWebWrapper({
1383
1398
  // };
1384
1399
  // }
1385
1400
  function withTheme(WrappedComponent) {
1386
- return function (props) {
1401
+ // eslint-disable-next-line prefer-arrow-callback
1402
+ return /*#__PURE__*/react.forwardRef(function (props, ref) {
1387
1403
  const theme = /*#__PURE__*/styled.useTheme();
1388
1404
  return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
1405
+ ref: ref,
1389
1406
  theme: theme,
1390
1407
  ...props
1391
1408
  });
1392
- };
1409
+ });
1393
1410
  }
1394
1411
 
1395
1412
  const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("div")({
@@ -1399,9 +1416,6 @@ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("di
1399
1416
  "p1nlccvg-0": [({
1400
1417
  theme
1401
1418
  }) => theme.kitt.iconButton.scale.base.hover],
1402
- "p1nlccvg-1": [({
1403
- theme
1404
- }) => theme.breakpoints.min.mediumBreakpoint],
1405
1419
  "p1nlccvg-2": [({
1406
1420
  theme
1407
1421
  }) => theme.kitt.iconButton.scale.medium.hover],
@@ -1782,7 +1796,7 @@ function LargeLoader({
1782
1796
 
1783
1797
  const xIconSize = 14;
1784
1798
  const mainIconSize = 20;
1785
- const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
1799
+ const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1786
1800
  displayName: "Message__Container",
1787
1801
  componentId: "kitt-universal__sc-c6400e-0"
1788
1802
  })(["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;"], ({
@@ -1861,7 +1875,7 @@ function Message({
1861
1875
  insets
1862
1876
  }) {
1863
1877
  const color = getColorByType(type);
1864
- return /*#__PURE__*/jsxRuntime.jsxs(Container$2, {
1878
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$3, {
1865
1879
  type: type,
1866
1880
  noRadius: noRadius,
1867
1881
  insets: insets,
@@ -2062,6 +2076,117 @@ function Notification({
2062
2076
  });
2063
2077
  }
2064
2078
 
2079
+ const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
2080
+ displayName: "SkeletonContent__Container",
2081
+ componentId: "kitt-universal__sc-1u3chjb-0"
2082
+ })(["background-color:", ";border-color:", ";height:100%;width:100%;"], ({
2083
+ theme
2084
+ }) => theme.kitt.skeleton.backgroundColor, ({
2085
+ theme
2086
+ }) => theme.kitt.skeleton.flareColor);
2087
+ const AnimatedLinearGradient = Animated__default.createAnimatedComponent(expoLinearGradient.LinearGradient);
2088
+ function SkeletonContent({
2089
+ isLoading,
2090
+ width
2091
+ }) {
2092
+ const theme = /*#__PURE__*/styled.useTheme();
2093
+ const sharedX = Animated.useSharedValue(0);
2094
+ react.useEffect(() => {
2095
+ if (isLoading) {
2096
+ sharedX.value = Animated.withRepeat(Animated.withTiming(1, {
2097
+ duration: theme.kitt.skeleton.animationDuration,
2098
+ easing: Animated.Easing.inOut(Animated.Easing.ease)
2099
+ }), -1);
2100
+ }
2101
+ }, [sharedX, width, isLoading, theme]);
2102
+ const linearGradientStyle = Animated.useAnimatedStyle(function () {
2103
+ const _f = function () {
2104
+ return {
2105
+ transform: [{
2106
+ translateX: Animated.interpolate(sharedX.value, [0, 1], [-width, width])
2107
+ }]
2108
+ };
2109
+ };
2110
+
2111
+ _f._closure = {
2112
+ interpolate: Animated.interpolate,
2113
+ sharedX,
2114
+ width
2115
+ };
2116
+ _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
2117
+ _f.__workletHash = 1670955855244;
2118
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (41:47)";
2119
+ _f.__optimalization = 3;
2120
+
2121
+ global.__reanimatedWorkletInit(_f);
2122
+
2123
+ return _f;
2124
+ }());
2125
+ return /*#__PURE__*/jsxRuntime.jsx(Container$2, {
2126
+ children: /*#__PURE__*/jsxRuntime.jsx(AnimatedLinearGradient, {
2127
+ colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
2128
+ locations: [0.1, 0.5, 0.9],
2129
+ start: {
2130
+ x: 0,
2131
+ y: 0
2132
+ },
2133
+ end: {
2134
+ x: 1,
2135
+ y: 0
2136
+ },
2137
+ style: [reactNative.StyleSheet.absoluteFill, linearGradientStyle]
2138
+ })
2139
+ });
2140
+ }
2141
+
2142
+ function Skeleton({
2143
+ isLoading,
2144
+ style
2145
+ }) {
2146
+ const [width, setWidth] = react.useState(0);
2147
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
2148
+ style: style,
2149
+ onLayout: ({
2150
+ nativeEvent
2151
+ }) => setWidth(nativeEvent.layout.width),
2152
+ children: /*#__PURE__*/jsxRuntime.jsx(SkeletonContent, {
2153
+ isLoading: isLoading,
2154
+ width: width
2155
+ })
2156
+ });
2157
+ }
2158
+ const Bar = /*#__PURE__*/styled__default(Skeleton).withConfig({
2159
+ displayName: "Skeleton__Bar",
2160
+ componentId: "kitt-universal__sc-1w5cm3i-0"
2161
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2162
+ theme
2163
+ }) => theme.kitt.spacing * 2, ({
2164
+ theme
2165
+ }) => theme.kitt.spacing * 2);
2166
+ const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
2167
+ displayName: "Skeleton__Circle",
2168
+ componentId: "kitt-universal__sc-1w5cm3i-1"
2169
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2170
+ theme
2171
+ }) => theme.kitt.spacing * 12, ({
2172
+ theme
2173
+ }) => theme.kitt.spacing * 12, ({
2174
+ theme
2175
+ }) => theme.kitt.spacing * 6);
2176
+ const Square = /*#__PURE__*/styled__default(Skeleton).withConfig({
2177
+ displayName: "Skeleton__Square",
2178
+ componentId: "kitt-universal__sc-1w5cm3i-2"
2179
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2180
+ theme
2181
+ }) => theme.kitt.spacing * 12, ({
2182
+ theme
2183
+ }) => theme.kitt.spacing * 12, ({
2184
+ theme
2185
+ }) => theme.kitt.spacing * 1.5);
2186
+ Skeleton.Bar = Bar;
2187
+ Skeleton.Circle = Circle;
2188
+ Skeleton.Square = Square;
2189
+
2065
2190
  const Flex = /*#__PURE__*/styled__default.View.withConfig({
2066
2191
  shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
2067
2192
  }).withConfig({
@@ -2487,17 +2612,6 @@ const lateOceanColorPalette = {
2487
2612
  moonPurpleLight1: '#EDEBFC'
2488
2613
  };
2489
2614
 
2490
- const avatarLateOceanTheme = {
2491
- default: {
2492
- color: lateOceanColorPalette.white,
2493
- backgroundColor: lateOceanColorPalette.lateOcean
2494
- },
2495
- light: {
2496
- color: lateOceanColorPalette.black1000,
2497
- backgroundColor: lateOceanColorPalette.black100
2498
- }
2499
- };
2500
-
2501
2615
  const colorsLateOceanTheme = {
2502
2616
  primary: lateOceanColorPalette.lateOcean,
2503
2617
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2520,6 +2634,16 @@ const colorsLateOceanTheme = {
2520
2634
  }
2521
2635
  };
2522
2636
 
2637
+ const avatar = {
2638
+ borderRadius: '10px',
2639
+ default: {
2640
+ backgroundColor: colorsLateOceanTheme.primary
2641
+ },
2642
+ light: {
2643
+ backgroundColor: lateOceanColorPalette.black100
2644
+ }
2645
+ };
2646
+
2523
2647
  const buttonLateOceanTheme = {
2524
2648
  borderRadius: '30px',
2525
2649
  borderWidth: {
@@ -2746,6 +2870,12 @@ const shadowsLateOceanTheme = {
2746
2870
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2747
2871
  };
2748
2872
 
2873
+ const skeletonTheme = {
2874
+ backgroundColor: lateOceanColorPalette.black100,
2875
+ flareColor: lateOceanColorPalette.black200,
2876
+ animationDuration: 1000
2877
+ };
2878
+
2749
2879
  const tagLateOceanTheme = {
2750
2880
  borderRadius: '10px',
2751
2881
  padding: '2px 12px',
@@ -2797,18 +2927,16 @@ const tooltip = {
2797
2927
  };
2798
2928
 
2799
2929
  const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2800
-
2801
2930
  const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2802
2931
  baseAndSmall: {
2803
2932
  fontSize: `${baseAndSmallFontSize}px`,
2804
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2933
+ lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2805
2934
  },
2806
2935
  mediumAndWide: {
2807
2936
  fontSize: `${mediumAndWideFontSize}px`,
2808
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2937
+ lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2809
2938
  }
2810
2939
  });
2811
-
2812
2940
  const typographyLateOceanTheme = {
2813
2941
  colors: {
2814
2942
  black: lateOceanColorPalette.black1000,
@@ -2890,7 +3018,7 @@ const breakpoints = {
2890
3018
  wideBreakpoint: 'max-width: 1279px'
2891
3019
  }
2892
3020
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2893
- // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
3021
+ // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2894
3022
 
2895
3023
  const theme = {
2896
3024
  spacing: 4,
@@ -2898,7 +3026,7 @@ const theme = {
2898
3026
  palettes: {
2899
3027
  lateOcean: lateOceanColorPalette
2900
3028
  },
2901
- avatar: avatarLateOceanTheme,
3029
+ avatar,
2902
3030
  button: buttonLateOceanTheme,
2903
3031
  card: cardLateOceanTheme,
2904
3032
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2909,7 +3037,9 @@ const theme = {
2909
3037
  fullScreenModal: fullScreenModalLateOceanTheme,
2910
3038
  iconButton,
2911
3039
  listItem: listItemLateOceanTheme,
2912
- tooltip
3040
+ tooltip,
3041
+ skeleton: skeletonTheme,
3042
+ breakpoints
2913
3043
  };
2914
3044
 
2915
3045
  function Title({
@@ -3386,12 +3516,18 @@ function useKittTheme() {
3386
3516
  return react.useMemo(() => {
3387
3517
  return {
3388
3518
  kitt: theme,
3389
- responsive: createWindowSizeHelper(dimensions),
3390
- breakpoints
3519
+ responsive: createWindowSizeHelper(dimensions)
3391
3520
  };
3392
3521
  }, [dimensions]);
3393
3522
  }
3394
3523
 
3524
+ const hex2rgba = (hex, alpha = 1) => {
3525
+ const r = parseInt(hex.slice(1, 3), 16);
3526
+ const g = parseInt(hex.slice(3, 5), 16);
3527
+ const b = parseInt(hex.slice(5, 7), 16);
3528
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
3529
+ };
3530
+
3395
3531
  function KittThemeProvider({
3396
3532
  children
3397
3533
  }) {
@@ -3452,6 +3588,7 @@ exports.Modal = Modal;
3452
3588
  exports.Notification = Notification;
3453
3589
  exports.Radio = Radio;
3454
3590
  exports.Section = DeprecatedSection;
3591
+ exports.Skeleton = Skeleton;
3455
3592
  exports.Story = Story;
3456
3593
  exports.StoryBlock = StoryBlock;
3457
3594
  exports.StoryContainer = StoryContainer;
@@ -3459,6 +3596,7 @@ exports.StoryDecorator = StoryDecorator;
3459
3596
  exports.StoryGrid = StoryGrid;
3460
3597
  exports.StorySection = StorySection;
3461
3598
  exports.StoryTitle = StoryTitle;
3599
+ exports.StyleWebWrapper = StyleWebWrapper;
3462
3600
  exports.Tag = Tag;
3463
3601
  exports.TextArea = TextArea;
3464
3602
  exports.TimePicker = TimePicker;
@@ -3468,12 +3606,14 @@ exports.TypographyEmoji = TypographyEmoji;
3468
3606
  exports.TypographyIcon = TypographyIcon;
3469
3607
  exports.TypographyLink = TypographyLink;
3470
3608
  exports.createWindowSizeHelper = createWindowSizeHelper;
3609
+ exports.hex2rgba = hex2rgba;
3471
3610
  exports.matchWindowSize = matchWindowSize;
3472
3611
  exports.styledTextInputMixin = styledTextInputMixin;
3473
3612
  exports.theme = theme;
3474
3613
  exports.useKittTheme = useKittTheme;
3475
3614
  exports.useMatchWindowSize = useMatchWindowSize;
3476
3615
  exports.useStoryBlockColor = useStoryBlockColor;
3616
+ exports.withTheme = withTheme;
3477
3617
  Object.keys(kittIcons).forEach(function (k) {
3478
3618
  if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
3479
3619
  });