@ornikar/kitt-universal 3.2.0 → 3.6.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 (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/IconButton/PressableIconButton.d.ts.map +1 -1
  4. package/dist/definitions/Skeleton/Skeleton.d.ts +14 -0
  5. package/dist/definitions/Skeleton/Skeleton.d.ts.map +1 -0
  6. package/dist/definitions/Skeleton/SkeletonContent.d.ts +8 -0
  7. package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -0
  8. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts +7 -0
  9. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +1 -0
  10. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  11. package/dist/definitions/index.d.ts +5 -0
  12. package/dist/definitions/index.d.ts.map +1 -1
  13. package/dist/definitions/themes/default.d.ts +2 -10
  14. package/dist/definitions/themes/default.d.ts.map +1 -1
  15. package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts +9 -10
  16. package/dist/definitions/themes/late-ocean/avatarLateOceanTheme.d.ts.map +1 -1
  17. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts +7 -0
  18. package/dist/definitions/themes/late-ocean/skeletonTheme.d.ts.map +1 -0
  19. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +2 -0
  20. package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
  21. package/dist/definitions/typography/Typography.d.ts +2 -0
  22. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  23. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  24. package/dist/definitions/utils/hexToRgba.d.ts +2 -0
  25. package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
  26. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +7 -2
  27. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts.map +1 -1
  28. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts +5 -2
  29. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts.map +1 -1
  30. package/dist/index-browser-all.es.android.js +355 -163
  31. package/dist/index-browser-all.es.android.js.map +1 -1
  32. package/dist/index-browser-all.es.css +2 -2
  33. package/dist/index-browser-all.es.ios.js +355 -163
  34. package/dist/index-browser-all.es.ios.js.map +1 -1
  35. package/dist/index-browser-all.es.js +307 -130
  36. package/dist/index-browser-all.es.js.map +1 -1
  37. package/dist/index-browser-all.es.web.js +261 -119
  38. package/dist/index-browser-all.es.web.js.map +1 -1
  39. package/dist/index-node-14.17.cjs.css +2 -2
  40. package/dist/index-node-14.17.cjs.js +264 -84
  41. package/dist/index-node-14.17.cjs.js.map +1 -1
  42. package/dist/index-node-14.17.cjs.web.css +3 -2
  43. package/dist/index-node-14.17.cjs.web.js +219 -74
  44. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  45. package/dist/styles.css +3 -2
  46. package/dist/tsbuildinfo +1 -1
  47. package/package.json +5 -4
@@ -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
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 > *:hover,.kitt-hover .p1nlccvg > *,.p1nlccvg > *:focus,.kitt-focus .p1nlccvg > *,.p1nlccvg > *:active,.kitt-active .p1nlccvg > *{background-color:var(--p1nlccvg-4);}.p1nlccvg[data-color-white=true] > *:hover,.kitt-hover .p1nlccvg[data-color-white] > *,.p1nlccvg[data-color-white=true] > *:focus,.kitt-focus .p1nlccvg[data-color-white=true] > *,.p1nlccvg[data-color-white=true] > *:active,.kitt-active .p1nlccvg[data-color-white=true] > *{background-color:var(--p1nlccvg-5);}
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);}
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
- .tcwz3nt > *:hover,.tcwz3nt > *:active,.kitt-hover .tcwz3nt > *{-webkit-text-decoration:none;text-decoration:none;}.tcwz3nt[data-nounderline] > *:hover,.tcwz3nt[data-nounderline] > *:active,.kitt-hover .tcwz3nt[data-nounderline] > *{-webkit-text-decoration:underline;text-decoration:underline;}
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;}
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);}
@@ -197,6 +197,20 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
197
197
  if (small && width >= KittBreakpoints.SMALL) return small;
198
198
  return base;
199
199
  }
200
+ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
201
+ base,
202
+ color
203
+ }) {
204
+ // return the props set or undefined. In case of undefined, the value will be inherited from its parents.
205
+ if (hasTypographyAncestor) return {
206
+ base,
207
+ color
208
+ };
209
+ return {
210
+ base: base ?? 'body',
211
+ color: color ?? 'black'
212
+ };
213
+ }
200
214
  function Typography({
201
215
  accessibilityRole,
202
216
  base,
@@ -208,16 +222,21 @@ function Typography({
208
222
  ...otherProps
209
223
  }) {
210
224
  const isHeaderTypographyInContext = react$1.useContext(IsHeaderTypographyContext);
211
- const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
225
+ const hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
226
+ const {
227
+ base: baseOrDefaultToBody,
228
+ color: colorOrDefaultToBlack
229
+ } = getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
230
+ base,
231
+ color
232
+ });
233
+ const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
212
234
  const isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
213
- const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular'); // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
214
- // redefine the color, just inherit from it
215
-
216
- const colorWithDefaultToBlack = color ?? (isHeaderTypographyInContext !== undefined ? undefined : 'black');
217
- const content = base ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
235
+ const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular');
236
+ const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
218
237
  value: isHeader,
219
238
  children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
220
- $color: colorWithDefaultToBlack,
239
+ $color: colorOrDefaultToBlack,
221
240
  $isHeader: isHeader,
222
241
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
223
242
  $variant: nonNullableVariant,
@@ -225,7 +244,7 @@ function Typography({
225
244
  ...otherProps
226
245
  })
227
246
  }) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
228
- $color: colorWithDefaultToBlack,
247
+ $color: colorOrDefaultToBlack,
229
248
  $isHeader: isHeader,
230
249
  $variant: nonNullableVariant,
231
250
  accessibilityRole: accessibilityRole || undefined,
@@ -290,31 +309,35 @@ Typography.h4 = createHeading(4, 'header4');
290
309
 
291
310
  Typography.h5 = createHeading(5, 'header5');
292
311
 
293
- const getFirstCharacter = string => string ? string[0] : '';
294
-
295
- const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
312
+ const getInitials = (firstname, lastname) => `${firstname[0]}${lastname[0]}`.toUpperCase();
296
313
 
297
314
  const StyledAvatarView = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
298
315
  displayName: "Avatar__StyledAvatarView",
299
316
  componentId: "kitt-universal__sc-9miubv-0"
300
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
301
- round,
302
- size
303
- }) => round ? size / 2 : 10, ({
317
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
304
318
  theme,
305
- light
306
- }) => light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
307
- size
308
- }) => size, ({
309
- size
310
- }) => size);
319
+ $isRound,
320
+ $size
321
+ }) => {
322
+ if ($isRound) return `${$size / 2}px`;
323
+ return theme.kitt.avatar.borderRadius;
324
+ }, ({
325
+ theme,
326
+ $isLight
327
+ }) => $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
328
+ $size
329
+ }) => $size, ({
330
+ $size
331
+ }) => $size);
311
332
 
312
333
  function AvatarContent({
313
- size = 40,
334
+ size,
314
335
  src,
315
336
  firstname,
316
337
  lastname,
317
- light
338
+ alt,
339
+ base,
340
+ isLight
318
341
  }) {
319
342
  if (src) {
320
343
  return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.Image, {
@@ -324,34 +347,43 @@ function AvatarContent({
324
347
  style: {
325
348
  width: size,
326
349
  height: size
327
- }
350
+ },
351
+ accessibilityLabel: alt
328
352
  });
329
353
  }
330
354
 
331
355
  if (firstname && lastname) {
332
356
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
333
- base: "body-small",
357
+ base: base,
334
358
  variant: "bold",
335
- color: light ? 'black' : 'white',
359
+ color: isLight ? 'black' : 'white',
336
360
  children: getInitials(firstname, lastname)
337
361
  });
338
362
  }
339
363
 
340
364
  return /*#__PURE__*/jsxRuntime.jsx(Icon, {
341
365
  icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.UserIcon, {}),
342
- color: light ? 'black' : 'white',
366
+ color: isLight ? 'black' : 'white',
343
367
  size: size / 2
344
368
  });
345
369
  }
346
370
 
347
371
  function Avatar({
348
372
  size = 40,
349
- ...rest
373
+ base = 'body-small',
374
+ round,
375
+ light,
376
+ ...props
350
377
  }) {
351
- return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, { ...rest,
352
- size: size,
353
- children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, { ...rest,
354
- size: size
378
+ return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
379
+ $size: size,
380
+ $isRound: round,
381
+ $isLight: light,
382
+ children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
383
+ size: size,
384
+ base: base,
385
+ isLight: light,
386
+ ...props
355
387
  })
356
388
  });
357
389
  }
@@ -1143,6 +1175,7 @@ function TextArea({ ...props
1143
1175
  const theme = /*#__PURE__*/styled.useTheme();
1144
1176
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1145
1177
  multiline: true,
1178
+ textAlignVertical: "top",
1146
1179
  ...props,
1147
1180
  type: "text",
1148
1181
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1328,11 +1361,16 @@ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react.styled("div"
1328
1361
  theme
1329
1362
  }) => theme.kitt.iconButton.scale.base.active],
1330
1363
  "p1nlccvg-4": [({
1331
- theme
1332
- }) => theme.kitt.iconButton.default.pressedBackgroundColor],
1333
- "p1nlccvg-5": [({
1334
- theme
1335
- }) => theme.kitt.iconButton.white.pressedBackgroundColor]
1364
+ theme,
1365
+ $isWhite
1366
+ }) => {
1367
+ const {
1368
+ white,
1369
+ default: defaultIconButton
1370
+ } = theme.kitt.iconButton;
1371
+ if ($isWhite) return white.pressedBackgroundColor;
1372
+ return defaultIconButton.pressedBackgroundColor;
1373
+ }]
1336
1374
  }
1337
1375
  }));
1338
1376
  const StyledPressableIconButton = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Pressable).withConfig({
@@ -1371,7 +1409,7 @@ function PressableIconButton({
1371
1409
  }) {
1372
1410
  return /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
1373
1411
  as: PressableIconButtonWebWrapper,
1374
- "data-color-white": color === 'white' ? true : undefined,
1412
+ $isWhite: color === 'white',
1375
1413
  children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props
1376
1414
  })
1377
1415
  });
@@ -1894,6 +1932,83 @@ function Notification({
1894
1932
  });
1895
1933
  }
1896
1934
 
1935
+ const StyledSkeleton = withTheme( /*#__PURE__*/react.styled("div")({
1936
+ name: "StyledSkeleton",
1937
+ class: "sc3upcl",
1938
+ vars: {
1939
+ "sc3upcl-0": [({
1940
+ theme
1941
+ }) => theme.kitt.skeleton.backgroundColor],
1942
+ "sc3upcl-1": [({
1943
+ $isLoading,
1944
+ theme
1945
+ }) => $isLoading ? `linear-gradient(
1946
+ -90deg,
1947
+ ${theme.kitt.skeleton.backgroundColor},
1948
+ ${theme.kitt.skeleton.flareColor} 50%,
1949
+ ${theme.kitt.skeleton.backgroundColor} 100%
1950
+ )` : 'none'],
1951
+ "sc3upcl-2": [({
1952
+ $isLoading
1953
+ }) => $isLoading ? '1s ease-in-out infinite' : 'none']
1954
+ }
1955
+ }));
1956
+ function SkeletonContent({
1957
+ isLoading
1958
+ }) {
1959
+ return /*#__PURE__*/jsxRuntime.jsx(StyledSkeleton, {
1960
+ $isLoading: isLoading
1961
+ });
1962
+ }
1963
+
1964
+ function Skeleton({
1965
+ isLoading,
1966
+ style
1967
+ }) {
1968
+ const [width, setWidth] = react$1.useState(0);
1969
+ return /*#__PURE__*/jsxRuntime.jsx(BabelPluginStyledComponentsReactNative.View, {
1970
+ style: style,
1971
+ onLayout: ({
1972
+ nativeEvent
1973
+ }) => setWidth(nativeEvent.layout.width),
1974
+ children: /*#__PURE__*/jsxRuntime.jsx(SkeletonContent, {
1975
+ isLoading: isLoading,
1976
+ width: width
1977
+ })
1978
+ });
1979
+ }
1980
+ const Bar = /*#__PURE__*/styled__default(Skeleton).withConfig({
1981
+ displayName: "Skeleton__Bar",
1982
+ componentId: "kitt-universal__sc-1w5cm3i-0"
1983
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], ({
1984
+ theme
1985
+ }) => theme.kitt.spacing * 2, ({
1986
+ theme
1987
+ }) => theme.kitt.spacing * 2);
1988
+ const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
1989
+ displayName: "Skeleton__Circle",
1990
+ componentId: "kitt-universal__sc-1w5cm3i-1"
1991
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
1992
+ theme
1993
+ }) => theme.kitt.spacing * 12, ({
1994
+ theme
1995
+ }) => theme.kitt.spacing * 12, ({
1996
+ theme
1997
+ }) => theme.kitt.spacing * 6);
1998
+ const Square = /*#__PURE__*/styled__default(Skeleton).withConfig({
1999
+ displayName: "Skeleton__Square",
2000
+ componentId: "kitt-universal__sc-1w5cm3i-2"
2001
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2002
+ theme
2003
+ }) => theme.kitt.spacing * 12, ({
2004
+ theme
2005
+ }) => theme.kitt.spacing * 12, ({
2006
+ theme
2007
+ }) => theme.kitt.spacing * 1.5);
2008
+ Skeleton.Bar = Bar;
2009
+ Skeleton.Circle = Circle;
2010
+ Skeleton.Square = Square;
2011
+
1897
2012
  const Flex = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
1898
2013
  shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
1899
2014
  }).withConfig({
@@ -2316,17 +2431,6 @@ const lateOceanColorPalette = {
2316
2431
  moonPurpleLight1: '#EDEBFC'
2317
2432
  };
2318
2433
 
2319
- const avatarLateOceanTheme = {
2320
- default: {
2321
- color: lateOceanColorPalette.white,
2322
- backgroundColor: lateOceanColorPalette.lateOcean
2323
- },
2324
- light: {
2325
- color: lateOceanColorPalette.black1000,
2326
- backgroundColor: lateOceanColorPalette.black100
2327
- }
2328
- };
2329
-
2330
2434
  const colorsLateOceanTheme = {
2331
2435
  primary: lateOceanColorPalette.lateOcean,
2332
2436
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2349,6 +2453,16 @@ const colorsLateOceanTheme = {
2349
2453
  }
2350
2454
  };
2351
2455
 
2456
+ const avatar = {
2457
+ borderRadius: '10px',
2458
+ default: {
2459
+ backgroundColor: colorsLateOceanTheme.primary
2460
+ },
2461
+ light: {
2462
+ backgroundColor: lateOceanColorPalette.black100
2463
+ }
2464
+ };
2465
+
2352
2466
  const buttonLateOceanTheme = {
2353
2467
  borderRadius: '30px',
2354
2468
  borderWidth: {
@@ -2575,6 +2689,12 @@ const shadowsLateOceanTheme = {
2575
2689
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2576
2690
  };
2577
2691
 
2692
+ const skeletonTheme = {
2693
+ backgroundColor: lateOceanColorPalette.black100,
2694
+ flareColor: lateOceanColorPalette.black200,
2695
+ animationDuration: 1000
2696
+ };
2697
+
2578
2698
  const tagLateOceanTheme = {
2579
2699
  borderRadius: '10px',
2580
2700
  padding: '2px 12px',
@@ -2626,18 +2746,16 @@ const tooltip = {
2626
2746
  };
2627
2747
 
2628
2748
  const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2629
-
2630
2749
  const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2631
2750
  baseAndSmall: {
2632
2751
  fontSize: `${baseAndSmallFontSize}px`,
2633
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2752
+ lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2634
2753
  },
2635
2754
  mediumAndWide: {
2636
2755
  fontSize: `${mediumAndWideFontSize}px`,
2637
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2756
+ lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2638
2757
  }
2639
2758
  });
2640
-
2641
2759
  const typographyLateOceanTheme = {
2642
2760
  colors: {
2643
2761
  black: lateOceanColorPalette.black1000,
@@ -2727,7 +2845,7 @@ const theme = {
2727
2845
  palettes: {
2728
2846
  lateOcean: lateOceanColorPalette
2729
2847
  },
2730
- avatar: avatarLateOceanTheme,
2848
+ avatar,
2731
2849
  button: buttonLateOceanTheme,
2732
2850
  card: cardLateOceanTheme,
2733
2851
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2738,7 +2856,8 @@ const theme = {
2738
2856
  fullScreenModal: fullScreenModalLateOceanTheme,
2739
2857
  iconButton,
2740
2858
  listItem: listItemLateOceanTheme,
2741
- tooltip
2859
+ tooltip,
2860
+ skeleton: skeletonTheme
2742
2861
  };
2743
2862
 
2744
2863
  function TimePicker() {
@@ -2982,14 +3101,19 @@ function TypographyEmoji({
2982
3101
 
2983
3102
  const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react.styled("span")({
2984
3103
  name: "TypographyLinkWebWrapper",
2985
- class: "tcwz3nt"
3104
+ class: "tcwz3nt",
3105
+ vars: {
3106
+ "tcwz3nt-0": [({
3107
+ $hasNoUnderline
3108
+ }) => $hasNoUnderline ? 'underline' : 'none']
3109
+ }
2986
3110
  }));
2987
3111
  const StyledLink = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Text).withConfig({
2988
3112
  displayName: "TypographyLink__StyledLink",
2989
3113
  componentId: "kitt-universal__sc-1o1zy30-0"
2990
3114
  })(["text-decoration:", ";", ";", ";"], ({
2991
- $noUnderline
2992
- }) => $noUnderline ? 'none' : 'underline', ({
3115
+ $hasNoUnderline
3116
+ }) => $hasNoUnderline ? 'none' : 'underline', ({
2993
3117
  $disabled
2994
3118
  }) => {
2995
3119
  return `
@@ -3017,10 +3141,10 @@ function TypographyLink({
3017
3141
  accessibilityRole: "none",
3018
3142
  children: /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
3019
3143
  as: TypographyLinkWebWrapper,
3020
- "data-nounderline": noUnderline ? true : undefined,
3144
+ $hasNoUnderline: noUnderline,
3021
3145
  children: /*#__PURE__*/jsxRuntime.jsx(StyledLink, {
3022
3146
  $disabled: disabled,
3023
- $noUnderline: noUnderline,
3147
+ $hasNoUnderline: noUnderline,
3024
3148
  href: href,
3025
3149
  hrefAttrs: hrefAttrs,
3026
3150
  accessibilityRole: "link",
@@ -3035,23 +3159,35 @@ function TypographyLink({
3035
3159
  });
3036
3160
  }
3037
3161
 
3038
- function matchWindowSize(currentWidth, {
3162
+ function matchWindowSize({
3163
+ width,
3164
+ height
3165
+ }, {
3039
3166
  minWidth,
3040
- maxWidth
3167
+ maxWidth,
3168
+ minHeight,
3169
+ maxHeight
3041
3170
  }) {
3042
- return currentWidth >= minWidth && (!maxWidth || currentWidth <= maxWidth);
3171
+ const hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
3172
+ const hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
3173
+ return hasWidthMatched && hasHeightMatched;
3043
3174
  }
3044
3175
  function useMatchWindowSize(options) {
3045
3176
  const {
3046
- width
3177
+ width,
3178
+ height
3047
3179
  } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3048
- return matchWindowSize(width, options);
3180
+ return matchWindowSize({
3181
+ width,
3182
+ height
3183
+ }, options);
3049
3184
  }
3050
3185
 
3051
- function createWindowSizeHelper(currentWidth) {
3186
+ // eslint-disable-next-line no-restricted-imports
3187
+ function createWindowSizeHelper(dimensions) {
3052
3188
  return {
3053
- matchWindowSize: options => matchWindowSize(currentWidth, options),
3054
- ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(currentWidth, options) ? valueIfTrue : valueIfFalse,
3189
+ matchWindowSize: options => matchWindowSize(dimensions, options),
3190
+ ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse,
3055
3191
  mapWindowWidth: (...widthList) => {
3056
3192
  if ((process.env.NODE_ENV !== "production")) {
3057
3193
  widthList.slice(1).forEach(([minWidth], index) => {
@@ -3063,7 +3199,7 @@ function createWindowSizeHelper(currentWidth) {
3063
3199
  });
3064
3200
  }
3065
3201
 
3066
- const found = widthList.find(([minWidth, value]) => matchWindowSize(currentWidth, {
3202
+ const found = widthList.find(([minWidth, value]) => matchWindowSize(dimensions, {
3067
3203
  minWidth: Number(minWidth)
3068
3204
  }));
3069
3205
  if (!found) return null;
@@ -3073,18 +3209,23 @@ function createWindowSizeHelper(currentWidth) {
3073
3209
  }
3074
3210
 
3075
3211
  function useKittTheme() {
3076
- const {
3077
- width
3078
- } = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3212
+ const dimensions = BabelPluginStyledComponentsReactNative.useWindowDimensions();
3079
3213
  return react$1.useMemo(() => {
3080
3214
  return {
3081
3215
  kitt: theme,
3082
- responsive: createWindowSizeHelper(width),
3216
+ responsive: createWindowSizeHelper(dimensions),
3083
3217
  breakpoints
3084
3218
  };
3085
- }, [width]);
3219
+ }, [dimensions]);
3086
3220
  }
3087
3221
 
3222
+ const hex2rgba = (hex, alpha = 1) => {
3223
+ const r = parseInt(hex.slice(1, 3), 16);
3224
+ const g = parseInt(hex.slice(3, 5), 16);
3225
+ const b = parseInt(hex.slice(5, 7), 16);
3226
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
3227
+ };
3228
+
3088
3229
  function KittThemeProvider({
3089
3230
  children
3090
3231
  }) {
@@ -3145,6 +3286,7 @@ exports.Modal = Modal;
3145
3286
  exports.Notification = Notification;
3146
3287
  exports.Radio = Radio;
3147
3288
  exports.Section = DeprecatedSection;
3289
+ exports.Skeleton = Skeleton;
3148
3290
  exports.Story = Story;
3149
3291
  exports.StoryBlock = StoryBlock;
3150
3292
  exports.StoryContainer = StoryContainer;
@@ -3152,6 +3294,7 @@ exports.StoryDecorator = StoryDecorator;
3152
3294
  exports.StoryGrid = StoryGrid;
3153
3295
  exports.StorySection = StorySection;
3154
3296
  exports.StoryTitle = StoryTitle;
3297
+ exports.StyleWebWrapper = StyleWebWrapper;
3155
3298
  exports.Tag = Tag;
3156
3299
  exports.TextArea = TextArea;
3157
3300
  exports.TimePicker = TimePicker;
@@ -3161,12 +3304,14 @@ exports.TypographyEmoji = TypographyEmoji;
3161
3304
  exports.TypographyIcon = TypographyIcon;
3162
3305
  exports.TypographyLink = TypographyLink;
3163
3306
  exports.createWindowSizeHelper = createWindowSizeHelper;
3307
+ exports.hex2rgba = hex2rgba;
3164
3308
  exports.matchWindowSize = matchWindowSize;
3165
3309
  exports.styledTextInputMixin = styledTextInputMixin;
3166
3310
  exports.theme = theme;
3167
3311
  exports.useKittTheme = useKittTheme;
3168
3312
  exports.useMatchWindowSize = useMatchWindowSize;
3169
3313
  exports.useStoryBlockColor = useStoryBlockColor;
3314
+ exports.withTheme = withTheme;
3170
3315
  Object.keys(kittIcons).forEach(function (k) {
3171
3316
  if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
3172
3317
  });