@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,5 +1,6 @@
1
1
  .ssn8o83{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}.ssn8o83 > svg{-webkit-animation:spin-ssn8o83 1.1s infinite linear;animation:spin-ssn8o83 1.1s infinite linear;}@-webkit-keyframes spin-ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes spin-ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}
2
- .a1vkj3mh{width:auto;display:var(--a1vkj3mh-0);-webkit-align-self:var(--a1vkj3mh-1);-ms-flex-item-align:var(--a1vkj3mh-1);align-self:var(--a1vkj3mh-1);outline:none;}@media (var(--a1vkj3mh-2)){.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{-webkit-transform:scale(var(--a1vkj3mh-3));-ms-transform:scale(var(--a1vkj3mh-3));transform:scale(var(--a1vkj3mh-3));}}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *{-webkit-transform:var(--a1vkj3mh-4);-ms-transform:var(--a1vkj3mh-4);transform:var(--a1vkj3mh-4);}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *,.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{background:var(--a1vkj3mh-5);}.a1vkj3mh > * > *{-webkit-transform:scale(1) translateZ(0);-ms-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:var(--a1vkj3mh-6);transition:var(--a1vkj3mh-6);}.a1vkj3mh > * > *::after,.a1vkj3mh > * > *::before{content:'';position:absolute;border-radius:var(--a1vkj3mh-7);-webkit-transition:var(--a1vkj3mh-8);transition:var(--a1vkj3mh-8);}.a1vkj3mh > * > *::after{opacity:var(--a1vkj3mh-9);top:var(--a1vkj3mh-10);left:var(--a1vkj3mh-10);width:var(--a1vkj3mh-12);height:var(--a1vkj3mh-12);border:var(--a1vkj3mh-14);}.a1vkj3mh > * > *::before{opacity:0;border:var(--a1vkj3mh-15);width:100%;height:100%;top:var(--a1vkj3mh-16);left:var(--a1vkj3mh-16);}.kitt-focus .a1vkj3mh > *,.a1vkj3mh:focus > *,.a1vkj3mh > [data-focusvisible-polyfill]{outline:none;}.kitt-focus .a1vkj3mh > * > *::before,.a1vkj3mh:focus > * > *::before,.a1vkj3mh > [data-focusvisible-polyfill] > *::before{opacity:1;}.kitt-hover .a1vkj3mh > * > *::before,.a1vkj3mh:hover > * > *::before,.kitt-active .a1vkj3mh > * > *::before,.a1vkj3mh:active > * > *::before{opacity:0;}.a1vkj3mh > *{color:var(--a1vkj3mh-18);}.kitt-hover .a1vkj3mh > *,.a1vkj3mh:hover > *{color:var(--a1vkj3mh-19);}.kitt-active .a1vkj3mh > *,.a1vkj3mh:active > *{color:var(--a1vkj3mh-20);}
3
- @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);}
2
+ .a1vkj3mh{width:auto;display:var(--a1vkj3mh-0);-webkit-align-self:var(--a1vkj3mh-1);-ms-flex-item-align:var(--a1vkj3mh-1);align-self:var(--a1vkj3mh-1);outline:none;}@media (min-width:768px){.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{-webkit-transform:scale(var(--a1vkj3mh-3));-ms-transform:scale(var(--a1vkj3mh-3));transform:scale(var(--a1vkj3mh-3));}}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *{-webkit-transform:var(--a1vkj3mh-4);-ms-transform:var(--a1vkj3mh-4);transform:var(--a1vkj3mh-4);}.kitt-active .a1vkj3mh > * > *,.a1vkj3mh:active > * > *,.kitt-hover .a1vkj3mh > * > *,.a1vkj3mh:hover > * > *{background:var(--a1vkj3mh-5);}.a1vkj3mh > * > *{-webkit-transform:scale(1) translateZ(0);-ms-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:var(--a1vkj3mh-6);transition:var(--a1vkj3mh-6);}.a1vkj3mh > * > *::after,.a1vkj3mh > * > *::before{content:'';position:absolute;border-radius:var(--a1vkj3mh-7);-webkit-transition:var(--a1vkj3mh-8);transition:var(--a1vkj3mh-8);}.a1vkj3mh > * > *::after{opacity:var(--a1vkj3mh-9);top:var(--a1vkj3mh-10);left:var(--a1vkj3mh-10);width:var(--a1vkj3mh-12);height:var(--a1vkj3mh-12);border:var(--a1vkj3mh-14);}.a1vkj3mh > * > *::before{opacity:0;border:var(--a1vkj3mh-15);width:100%;height:100%;top:var(--a1vkj3mh-16);left:var(--a1vkj3mh-16);}.kitt-focus .a1vkj3mh > *,.a1vkj3mh:focus > *,.a1vkj3mh > [data-focusvisible-polyfill]{outline:none;}.kitt-focus .a1vkj3mh > * > *::before,.a1vkj3mh:focus > * > *::before,.a1vkj3mh > [data-focusvisible-polyfill] > *::before{opacity:1;}.kitt-hover .a1vkj3mh > * > *::before,.a1vkj3mh:hover > * > *::before,.kitt-active .a1vkj3mh > * > *::before,.a1vkj3mh:active > * > *::before{opacity:0;}.a1vkj3mh > *{color:var(--a1vkj3mh-18);}.kitt-hover .a1vkj3mh > *,.a1vkj3mh:hover > *{color:var(--a1vkj3mh-19);}.kitt-active .a1vkj3mh > *,.a1vkj3mh:active > *{color:var(--a1vkj3mh-20);}
3
+ @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);}
4
4
  .l2im3sa{width:60px;height:60px;-webkit-transform:scale(-1) rotate(90deg);-ms-transform:scale(-1) rotate(90deg);transform:scale(-1) rotate(90deg);}@-webkit-keyframes LargeLoaderInit-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:0;}}@keyframes LargeLoaderInit-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:0;}}@-webkit-keyframes LargeLoaderOffset-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:34px;}}@keyframes LargeLoaderOffset-l2im3sa{0%{stroke-dashoffset:169.64px;}100%{stroke-dashoffset:34px;}}@-webkit-keyframes LargeLoaderRotation-l2im3sa{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes LargeLoaderRotation-l2im3sa{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}.l2im3sa circle,.l2im3sa g{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;}.l2im3sa circle{stroke-width:3px;stroke-dasharray:169.64px;stroke-dashoffset:169.64px;stroke-linecap:round;}.l2im3sa g[data-large-loader='base'] circle{stroke:var(--l2im3sa-0);-webkit-animation:LargeLoaderInit-l2im3sa 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;animation:LargeLoaderInit-l2im3sa 1s cubic-bezier(0.39,0.575,0.565,1) 0.5s forwards;}.l2im3sa g[data-large-loader='fill']{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-animation:LargeLoaderRotation-l2im3sa 1.8s linear 0.5s infinite;animation:LargeLoaderRotation-l2im3sa 1.8s linear 0.5s infinite;}.l2im3sa g[data-large-loader='fill'] circle{stroke:var(--l2im3sa-1);-webkit-animation:LargeLoaderOffset-l2im3sa 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,LargeLoaderRotation-l2im3sa 2.16s linear 0.5s infinite;animation:LargeLoaderOffset-l2im3sa 1.8s cubic-bezier(0.39,0.575,0.565,1) 0.5s infinite alternate,LargeLoaderRotation-l2im3sa 2.16s linear 0.5s infinite;}
5
+ .sc3upcl{background-color:var(--sc3upcl-0);position:relative;overflow:hidden;height:100%;width:100%;}@-webkit-keyframes flareTranslate-sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}@keyframes flareTranslate-sc3upcl{from{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);}to{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);}}.sc3upcl::after{content:'';position:absolute;width:100%;height:100%;top:0;left:0;background-image:var(--sc3upcl-1);-webkit-animation:var(--sc3upcl-2);animation:var(--sc3upcl-2);-webkit-animation-name:flareTranslate-sc3upcl;animation-name:flareTranslate-sc3upcl;}
5
6
  .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);}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const BabelPluginStyledComponentsReactNative = require('react-native');
6
6
  const kittIcons = require('@ornikar/kitt-icons');
7
7
  const styled = require('styled-components/native');
8
- const react$1 = require('react');
9
- const react = require('@linaria/react');
8
+ const react = require('react');
9
+ const react$1 = require('@linaria/react');
10
10
  const jsxRuntime = require('react/jsx-runtime');
11
11
  const twemojiParser = require('twemoji-parser');
12
12
  const reactNativeSafeAreaContext = require('react-native-safe-area-context');
@@ -28,16 +28,18 @@ const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
28
28
  // };
29
29
  // }
30
30
  function withTheme(WrappedComponent) {
31
- return function (props) {
31
+ // eslint-disable-next-line prefer-arrow-callback
32
+ return /*#__PURE__*/react.forwardRef(function (props, ref) {
32
33
  const theme = /*#__PURE__*/styled.useTheme();
33
34
  return /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, {
35
+ ref: ref,
34
36
  theme: theme,
35
37
  ...props
36
38
  });
37
- };
39
+ });
38
40
  }
39
41
 
40
- const StyledSpinningIconContainer = withTheme( /*#__PURE__*/react.styled("div")({
42
+ const StyledSpinningIconContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
41
43
  name: "StyledSpinningIconContainer",
42
44
  class: "ssn8o83"
43
45
  }));
@@ -68,7 +70,7 @@ function Icon({
68
70
  align,
69
71
  color
70
72
  }) {
71
- const clonedIcon = /*#__PURE__*/react$1.cloneElement(icon, {
73
+ const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
72
74
  color
73
75
  });
74
76
  return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
@@ -129,10 +131,10 @@ const KittBreakpointsMax = {
129
131
  LARGE: KittBreakpoints.WIDE - 1
130
132
  };
131
133
 
132
- const IsHeaderTypographyContext = /*#__PURE__*/react$1.createContext(undefined);
133
- const TypographyColorContext = /*#__PURE__*/react$1.createContext('black');
134
+ const IsHeaderTypographyContext = /*#__PURE__*/react.createContext(undefined);
135
+ const TypographyColorContext = /*#__PURE__*/react.createContext('black');
134
136
  function useTypographyColor() {
135
- return react$1.useContext(TypographyColorContext);
137
+ return react.useContext(TypographyColorContext);
136
138
  }
137
139
  const getTypographyTypeConfigKey = theme => {
138
140
  const isMediumOrAbove = theme.responsive.matchWindowSize({
@@ -221,7 +223,7 @@ function Typography({
221
223
  color,
222
224
  ...otherProps
223
225
  }) {
224
- const isHeaderTypographyInContext = react$1.useContext(IsHeaderTypographyContext);
226
+ const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
225
227
  const hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
226
228
  const {
227
229
  base: baseOrDefaultToBody,
@@ -309,31 +311,35 @@ Typography.h4 = createHeading(4, 'header4');
309
311
 
310
312
  Typography.h5 = createHeading(5, 'header5');
311
313
 
312
- const getFirstCharacter = string => string ? string[0] : '';
313
-
314
- const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
314
+ const getInitials = (firstname, lastname) => `${firstname[0]}${lastname[0]}`.toUpperCase();
315
315
 
316
316
  const StyledAvatarView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
317
317
  displayName: "Avatar__StyledAvatarView",
318
318
  componentId: "kitt-universal__sc-9miubv-0"
319
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
320
- round,
321
- size
322
- }) => round ? size / 2 : 10, ({
319
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
323
320
  theme,
324
- light
325
- }) => light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
326
- size
327
- }) => size, ({
328
- size
329
- }) => size);
321
+ $isRound,
322
+ $size
323
+ }) => {
324
+ if ($isRound) return `${$size / 2}px`;
325
+ return theme.kitt.avatar.borderRadius;
326
+ }, ({
327
+ theme,
328
+ $isLight
329
+ }) => $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
330
+ $size
331
+ }) => $size, ({
332
+ $size
333
+ }) => $size);
330
334
 
331
335
  function AvatarContent({
332
- size = 40,
336
+ size,
333
337
  src,
334
338
  firstname,
335
339
  lastname,
336
- light
340
+ alt,
341
+ base,
342
+ isLight
337
343
  }) {
338
344
  if (src) {
339
345
  return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Image, {
@@ -343,34 +349,43 @@ function AvatarContent({
343
349
  style: {
344
350
  width: size,
345
351
  height: size
346
- }
352
+ },
353
+ accessibilityLabel: alt
347
354
  });
348
355
  }
349
356
 
350
357
  if (firstname && lastname) {
351
358
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
352
- base: "body-small",
359
+ base: base,
353
360
  variant: "bold",
354
- color: light ? 'black' : 'white',
361
+ color: isLight ? 'black' : 'white',
355
362
  children: getInitials(firstname, lastname)
356
363
  });
357
364
  }
358
365
 
359
366
  return /*#__PURE__*/jsxRuntime.jsx(Icon, {
360
367
  icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.UserIcon, {}),
361
- color: light ? 'black' : 'white',
368
+ color: isLight ? 'black' : 'white',
362
369
  size: size / 2
363
370
  });
364
371
  }
365
372
 
366
373
  function Avatar({
367
374
  size = 40,
368
- ...rest
375
+ base = 'body-small',
376
+ round,
377
+ light,
378
+ ...props
369
379
  }) {
370
- return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, { ...rest,
371
- size: size,
372
- children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, { ...rest,
373
- size: size
380
+ return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
381
+ $size: size,
382
+ $isRound: round,
383
+ $isLight: light,
384
+ children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
385
+ size: size,
386
+ base: base,
387
+ isLight: light,
388
+ ...props
374
389
  })
375
390
  });
376
391
  }
@@ -379,7 +394,7 @@ function isSubtle(type) {
379
394
  return type.startsWith('subtle');
380
395
  }
381
396
 
382
- const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("div")({
397
+ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
383
398
  name: "AnimatedButtonPressableContainer",
384
399
  class: "a1vkj3mh",
385
400
  vars: {
@@ -389,9 +404,6 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("d
389
404
  "a1vkj3mh-1": [({
390
405
  $isStretch
391
406
  }) => $isStretch ? 'stretch' : 'baseline'],
392
- "a1vkj3mh-2": [({
393
- theme
394
- }) => theme.breakpoints.min.mediumBreakpoint],
395
407
  "a1vkj3mh-3": [({
396
408
  theme
397
409
  }) => theme.kitt.button.scale.medium.hover],
@@ -470,7 +482,7 @@ const AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/react.styled("d
470
482
  }]
471
483
  }
472
484
  }));
473
- const AnimatedButtonPressable = /*#__PURE__*/react$1.forwardRef(({
485
+ const AnimatedButtonPressable = /*#__PURE__*/react.forwardRef(({
474
486
  $type,
475
487
  $isStretch,
476
488
  disabled,
@@ -722,7 +734,7 @@ function ButtonContent({
722
734
  });
723
735
  }
724
736
 
725
- const Button = /*#__PURE__*/react$1.forwardRef(({
737
+ const Button = /*#__PURE__*/react.forwardRef(({
726
738
  children,
727
739
  type = 'default',
728
740
  disabled,
@@ -804,7 +816,7 @@ function Emoji({
804
816
  size,
805
817
  style
806
818
  }) {
807
- const [emojiData] = react$1.useMemo(() => twemojiParser.parse(emoji, {
819
+ const [emojiData] = react.useMemo(() => twemojiParser.parse(emoji, {
808
820
  // on native plaforms, you can't display svg as Image
809
821
  assetType: 'svg'
810
822
  }), [emoji]);
@@ -906,8 +918,8 @@ function InputField({
906
918
  }
907
919
 
908
920
  const useInputText = () => {
909
- const [isFocused, setIsFocused] = react$1.useState(false);
910
- const [isPasswordVisible, setIsPasswordVisible] = react$1.useState(false);
921
+ const [isFocused, setIsFocused] = react.useState(false);
922
+ const [isPasswordVisible, setIsPasswordVisible] = react.useState(false);
911
923
  return {
912
924
  isFocused,
913
925
  handleInputFocus: () => setIsFocused(true),
@@ -1004,7 +1016,7 @@ const textContentTypeByType = {
1004
1016
  password: 'password',
1005
1017
  username: 'username'
1006
1018
  };
1007
- const InputText = /*#__PURE__*/react$1.forwardRef(({
1019
+ const InputText = /*#__PURE__*/react.forwardRef(({
1008
1020
  id,
1009
1021
  minHeight = 0,
1010
1022
  type,
@@ -1162,6 +1174,7 @@ function TextArea({ ...props
1162
1174
  const theme = /*#__PURE__*/styled.useTheme();
1163
1175
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1164
1176
  multiline: true,
1177
+ textAlignVertical: "top",
1165
1178
  ...props,
1166
1179
  type: "text",
1167
1180
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1270,8 +1283,8 @@ function FullScreenModalHeader({
1270
1283
  top
1271
1284
  } = reactNativeSafeAreaContext.useSafeAreaInsets();
1272
1285
  const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
1273
- const [leftWidth, setLeftWidth] = react$1.useState(0);
1274
- const [rightWidth, setRightWidth] = react$1.useState(0);
1286
+ const [leftWidth, setLeftWidth] = react.useState(0);
1287
+ const [rightWidth, setRightWidth] = react.useState(0);
1275
1288
 
1276
1289
  const handleLayoutChange = (event, side) => {
1277
1290
  // Prevents react to nullify event on rerenders
@@ -1330,16 +1343,13 @@ function StyleWebWrapper({
1330
1343
  });
1331
1344
  }
1332
1345
 
1333
- const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react.styled("div")({
1346
+ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("div")({
1334
1347
  name: "PressableIconButtonWebWrapper",
1335
1348
  class: "p1nlccvg",
1336
1349
  vars: {
1337
1350
  "p1nlccvg-0": [({
1338
1351
  theme
1339
1352
  }) => theme.kitt.iconButton.scale.base.hover],
1340
- "p1nlccvg-1": [({
1341
- theme
1342
- }) => theme.breakpoints.min.mediumBreakpoint],
1343
1353
  "p1nlccvg-2": [({
1344
1354
  theme
1345
1355
  }) => theme.kitt.iconButton.scale.medium.hover],
@@ -1558,7 +1568,7 @@ function ListItem({
1558
1568
  onPress,
1559
1569
  ...rest
1560
1570
  }) {
1561
- const Wrapper = onPress ? BabelPluginStyledComponentsReactNative.Pressable : react$1.Fragment;
1571
+ const Wrapper = onPress ? BabelPluginStyledComponentsReactNative.Pressable : react.Fragment;
1562
1572
  const wrapperProps = onPress ? {
1563
1573
  accessibilityRole: 'button',
1564
1574
  onPress,
@@ -1586,7 +1596,7 @@ ListItem.Content = ListItemContent;
1586
1596
  ListItem.SideContent = ListItemSideContent;
1587
1597
  ListItem.SideContainer = ListItemSideContainer;
1588
1598
 
1589
- const LargeLoaderContainer = withTheme( /*#__PURE__*/react.styled("div")({
1599
+ const LargeLoaderContainer = withTheme( /*#__PURE__*/react$1.styled("div")({
1590
1600
  name: "LargeLoaderContainer",
1591
1601
  class: "l2im3sa",
1592
1602
  vars: {
@@ -1799,7 +1809,7 @@ function ModalFooter({
1799
1809
  });
1800
1810
  }
1801
1811
 
1802
- const OnCloseContext = /*#__PURE__*/react$1.createContext(() => {});
1812
+ const OnCloseContext = /*#__PURE__*/react.createContext(() => {});
1803
1813
 
1804
1814
  const HeaderView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1805
1815
  displayName: "Header__HeaderView",
@@ -1833,7 +1843,7 @@ function ModalHeader({
1833
1843
  right,
1834
1844
  children
1835
1845
  }) {
1836
- const onClose = react$1.useContext(OnCloseContext);
1846
+ const onClose = react.useContext(OnCloseContext);
1837
1847
  const isIconLeft = !!left;
1838
1848
  return /*#__PURE__*/jsxRuntime.jsxs(HeaderView, {
1839
1849
  children: [isIconLeft && /*#__PURE__*/jsxRuntime.jsx(LeftIconView, {
@@ -1918,6 +1928,83 @@ function Notification({
1918
1928
  });
1919
1929
  }
1920
1930
 
1931
+ const StyledSkeleton = withTheme( /*#__PURE__*/react$1.styled("div")({
1932
+ name: "StyledSkeleton",
1933
+ class: "sc3upcl",
1934
+ vars: {
1935
+ "sc3upcl-0": [({
1936
+ theme
1937
+ }) => theme.kitt.skeleton.backgroundColor],
1938
+ "sc3upcl-1": [({
1939
+ $isLoading,
1940
+ theme
1941
+ }) => $isLoading ? `linear-gradient(
1942
+ -90deg,
1943
+ ${theme.kitt.skeleton.backgroundColor},
1944
+ ${theme.kitt.skeleton.flareColor} 50%,
1945
+ ${theme.kitt.skeleton.backgroundColor} 100%
1946
+ )` : 'none'],
1947
+ "sc3upcl-2": [({
1948
+ $isLoading
1949
+ }) => $isLoading ? '1s ease-in-out infinite' : 'none']
1950
+ }
1951
+ }));
1952
+ function SkeletonContent({
1953
+ isLoading
1954
+ }) {
1955
+ return /*#__PURE__*/jsxRuntime.jsx(StyledSkeleton, {
1956
+ $isLoading: isLoading
1957
+ });
1958
+ }
1959
+
1960
+ function Skeleton({
1961
+ isLoading,
1962
+ style
1963
+ }) {
1964
+ const [width, setWidth] = react.useState(0);
1965
+ return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.View, {
1966
+ style: style,
1967
+ onLayout: ({
1968
+ nativeEvent
1969
+ }) => setWidth(nativeEvent.layout.width),
1970
+ children: /*#__PURE__*/jsxRuntime.jsx(SkeletonContent, {
1971
+ isLoading: isLoading,
1972
+ width: width
1973
+ })
1974
+ });
1975
+ }
1976
+ const Bar = /*#__PURE__*/styled__default(Skeleton).withConfig({
1977
+ displayName: "Skeleton__Bar",
1978
+ componentId: "kitt-universal__sc-1w5cm3i-0"
1979
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], ({
1980
+ theme
1981
+ }) => theme.kitt.spacing * 2, ({
1982
+ theme
1983
+ }) => theme.kitt.spacing * 2);
1984
+ const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
1985
+ displayName: "Skeleton__Circle",
1986
+ componentId: "kitt-universal__sc-1w5cm3i-1"
1987
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
1988
+ theme
1989
+ }) => theme.kitt.spacing * 12, ({
1990
+ theme
1991
+ }) => theme.kitt.spacing * 12, ({
1992
+ theme
1993
+ }) => theme.kitt.spacing * 6);
1994
+ const Square = /*#__PURE__*/styled__default(Skeleton).withConfig({
1995
+ displayName: "Skeleton__Square",
1996
+ componentId: "kitt-universal__sc-1w5cm3i-2"
1997
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
1998
+ theme
1999
+ }) => theme.kitt.spacing * 12, ({
2000
+ theme
2001
+ }) => theme.kitt.spacing * 12, ({
2002
+ theme
2003
+ }) => theme.kitt.spacing * 1.5);
2004
+ Skeleton.Bar = Bar;
2005
+ Skeleton.Circle = Circle;
2006
+ Skeleton.Square = Square;
2007
+
1921
2008
  const Flex = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1922
2009
  shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
1923
2010
  }).withConfig({
@@ -1960,10 +2047,10 @@ const getTypographyColorFromBlockColor = (color = 'transparent') => {
1960
2047
  }
1961
2048
  };
1962
2049
 
1963
- const StoryBlockBackgroundContext = /*#__PURE__*/react$1.createContext('transparent');
1964
- const StoryBlockColorContext = /*#__PURE__*/react$1.createContext('black');
2050
+ const StoryBlockBackgroundContext = /*#__PURE__*/react.createContext('transparent');
2051
+ const StoryBlockColorContext = /*#__PURE__*/react.createContext('black');
1965
2052
  const useStoryBlockColor = color => {
1966
- const storyBlockColor = react$1.useContext(StoryBlockColorContext);
2053
+ const storyBlockColor = react.useContext(StoryBlockColorContext);
1967
2054
  return color || storyBlockColor;
1968
2055
  };
1969
2056
  const StyledStoryBlockView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
@@ -2221,14 +2308,14 @@ function StoryGridRow({
2221
2308
 
2222
2309
  if (width < breakpointValue) {
2223
2310
  return /*#__PURE__*/jsxRuntime.jsx(SmallScreenRow, {
2224
- children: react$1.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
2311
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(SmallScreenCol, {
2225
2312
  children: child
2226
2313
  }))
2227
2314
  });
2228
2315
  }
2229
2316
 
2230
2317
  return /*#__PURE__*/jsxRuntime.jsx(FlexRow, {
2231
- children: react$1.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
2318
+ children: react.Children.map(children, child => /*#__PURE__*/jsxRuntime.jsx(FlexCol, {
2232
2319
  children: child
2233
2320
  }))
2234
2321
  });
@@ -2340,17 +2427,6 @@ const lateOceanColorPalette = {
2340
2427
  moonPurpleLight1: '#EDEBFC'
2341
2428
  };
2342
2429
 
2343
- const avatarLateOceanTheme = {
2344
- default: {
2345
- color: lateOceanColorPalette.white,
2346
- backgroundColor: lateOceanColorPalette.lateOcean
2347
- },
2348
- light: {
2349
- color: lateOceanColorPalette.black1000,
2350
- backgroundColor: lateOceanColorPalette.black100
2351
- }
2352
- };
2353
-
2354
2430
  const colorsLateOceanTheme = {
2355
2431
  primary: lateOceanColorPalette.lateOcean,
2356
2432
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2373,6 +2449,16 @@ const colorsLateOceanTheme = {
2373
2449
  }
2374
2450
  };
2375
2451
 
2452
+ const avatar = {
2453
+ borderRadius: '10px',
2454
+ default: {
2455
+ backgroundColor: colorsLateOceanTheme.primary
2456
+ },
2457
+ light: {
2458
+ backgroundColor: lateOceanColorPalette.black100
2459
+ }
2460
+ };
2461
+
2376
2462
  const buttonLateOceanTheme = {
2377
2463
  borderRadius: '30px',
2378
2464
  borderWidth: {
@@ -2599,6 +2685,12 @@ const shadowsLateOceanTheme = {
2599
2685
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2600
2686
  };
2601
2687
 
2688
+ const skeletonTheme = {
2689
+ backgroundColor: lateOceanColorPalette.black100,
2690
+ flareColor: lateOceanColorPalette.black200,
2691
+ animationDuration: 1000
2692
+ };
2693
+
2602
2694
  const tagLateOceanTheme = {
2603
2695
  borderRadius: '10px',
2604
2696
  padding: '2px 12px',
@@ -2650,18 +2742,16 @@ const tooltip = {
2650
2742
  };
2651
2743
 
2652
2744
  const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2653
-
2654
2745
  const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2655
2746
  baseAndSmall: {
2656
2747
  fontSize: `${baseAndSmallFontSize}px`,
2657
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2748
+ lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2658
2749
  },
2659
2750
  mediumAndWide: {
2660
2751
  fontSize: `${mediumAndWideFontSize}px`,
2661
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2752
+ lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2662
2753
  }
2663
2754
  });
2664
-
2665
2755
  const typographyLateOceanTheme = {
2666
2756
  colors: {
2667
2757
  black: lateOceanColorPalette.black1000,
@@ -2743,7 +2833,7 @@ const breakpoints = {
2743
2833
  wideBreakpoint: 'max-width: 1279px'
2744
2834
  }
2745
2835
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2746
- // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
2836
+ // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2747
2837
 
2748
2838
  const theme = {
2749
2839
  spacing: 4,
@@ -2751,7 +2841,7 @@ const theme = {
2751
2841
  palettes: {
2752
2842
  lateOcean: lateOceanColorPalette
2753
2843
  },
2754
- avatar: avatarLateOceanTheme,
2844
+ avatar,
2755
2845
  button: buttonLateOceanTheme,
2756
2846
  card: cardLateOceanTheme,
2757
2847
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2762,7 +2852,9 @@ const theme = {
2762
2852
  fullScreenModal: fullScreenModalLateOceanTheme,
2763
2853
  iconButton,
2764
2854
  listItem: listItemLateOceanTheme,
2765
- tooltip
2855
+ tooltip,
2856
+ skeleton: skeletonTheme,
2857
+ breakpoints
2766
2858
  };
2767
2859
 
2768
2860
  function TimePicker() {
@@ -2887,7 +2979,7 @@ function Tooltip({
2887
2979
  }) {
2888
2980
  const theme = /*#__PURE__*/styled.useTheme();
2889
2981
  const padding = floatingPadding || theme.kitt.tooltip.floatingPadding;
2890
- const [visible, setVisible] = react$1.useState(Boolean(defaultVisible));
2982
+ const [visible, setVisible] = react.useState(Boolean(defaultVisible));
2891
2983
  const {
2892
2984
  x,
2893
2985
  y,
@@ -2903,7 +2995,7 @@ function Tooltip({
2903
2995
  middleware: [reactDom.offset(padding), reactDom.shift(), reactDom.flip()]
2904
2996
  }); // Update on scroll and resize for all relevant nodes
2905
2997
 
2906
- react$1.useEffect(() => {
2998
+ react.useEffect(() => {
2907
2999
  if (!refs.reference.current || !refs.floating.current) {
2908
3000
  return () => undefined;
2909
3001
  }
@@ -2920,7 +3012,7 @@ function Tooltip({
2920
3012
  });
2921
3013
  };
2922
3014
  }, [refs.reference, refs.floating, update]);
2923
- react$1.useEffect(() => {
3015
+ react.useEffect(() => {
2924
3016
  if (!onUpdate) return;
2925
3017
  onUpdate({
2926
3018
  x,
@@ -3004,7 +3096,7 @@ function TypographyEmoji({
3004
3096
  });
3005
3097
  }
3006
3098
 
3007
- const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react.styled("span")({
3099
+ const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react$1.styled("span")({
3008
3100
  name: "TypographyLinkWebWrapper",
3009
3101
  class: "tcwz3nt",
3010
3102
  vars: {
@@ -3115,15 +3207,21 @@ function createWindowSizeHelper(dimensions) {
3115
3207
 
3116
3208
  function useKittTheme() {
3117
3209
  const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3118
- return react$1.useMemo(() => {
3210
+ return react.useMemo(() => {
3119
3211
  return {
3120
3212
  kitt: theme,
3121
- responsive: createWindowSizeHelper(dimensions),
3122
- breakpoints
3213
+ responsive: createWindowSizeHelper(dimensions)
3123
3214
  };
3124
3215
  }, [dimensions]);
3125
3216
  }
3126
3217
 
3218
+ const hex2rgba = (hex, alpha = 1) => {
3219
+ const r = parseInt(hex.slice(1, 3), 16);
3220
+ const g = parseInt(hex.slice(3, 5), 16);
3221
+ const b = parseInt(hex.slice(5, 7), 16);
3222
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
3223
+ };
3224
+
3127
3225
  function KittThemeProvider({
3128
3226
  children
3129
3227
  }) {
@@ -3184,6 +3282,7 @@ exports.Modal = Modal;
3184
3282
  exports.Notification = Notification;
3185
3283
  exports.Radio = Radio;
3186
3284
  exports.Section = DeprecatedSection;
3285
+ exports.Skeleton = Skeleton;
3187
3286
  exports.Story = Story;
3188
3287
  exports.StoryBlock = StoryBlock;
3189
3288
  exports.StoryContainer = StoryContainer;
@@ -3191,6 +3290,7 @@ exports.StoryDecorator = StoryDecorator;
3191
3290
  exports.StoryGrid = StoryGrid;
3192
3291
  exports.StorySection = StorySection;
3193
3292
  exports.StoryTitle = StoryTitle;
3293
+ exports.StyleWebWrapper = StyleWebWrapper;
3194
3294
  exports.Tag = Tag;
3195
3295
  exports.TextArea = TextArea;
3196
3296
  exports.TimePicker = TimePicker;
@@ -3200,12 +3300,14 @@ exports.TypographyEmoji = TypographyEmoji;
3200
3300
  exports.TypographyIcon = TypographyIcon;
3201
3301
  exports.TypographyLink = TypographyLink;
3202
3302
  exports.createWindowSizeHelper = createWindowSizeHelper;
3303
+ exports.hex2rgba = hex2rgba;
3203
3304
  exports.matchWindowSize = matchWindowSize;
3204
3305
  exports.styledTextInputMixin = styledTextInputMixin;
3205
3306
  exports.theme = theme;
3206
3307
  exports.useKittTheme = useKittTheme;
3207
3308
  exports.useMatchWindowSize = useMatchWindowSize;
3208
3309
  exports.useStoryBlockColor = useStoryBlockColor;
3310
+ exports.withTheme = withTheme;
3209
3311
  Object.keys(kittIcons).forEach(function (k) {
3210
3312
  if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
3211
3313
  });