@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,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 > *: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);}
2
- .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;}
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);}
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');
@@ -204,6 +205,20 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
204
205
  if (small && width >= KittBreakpoints.SMALL) return small;
205
206
  return base;
206
207
  }
208
+ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
209
+ base,
210
+ color
211
+ }) {
212
+ // return the props set or undefined. In case of undefined, the value will be inherited from its parents.
213
+ if (hasTypographyAncestor) return {
214
+ base,
215
+ color
216
+ };
217
+ return {
218
+ base: base ?? 'body',
219
+ color: color ?? 'black'
220
+ };
221
+ }
207
222
  function Typography({
208
223
  accessibilityRole,
209
224
  base,
@@ -215,16 +230,21 @@ function Typography({
215
230
  ...otherProps
216
231
  }) {
217
232
  const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
218
- const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
233
+ const hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
234
+ const {
235
+ base: baseOrDefaultToBody,
236
+ color: colorOrDefaultToBlack
237
+ } = getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
238
+ base,
239
+ color
240
+ });
241
+ const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
219
242
  const isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
220
- const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular'); // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
221
- // redefine the color, just inherit from it
222
-
223
- const colorWithDefaultToBlack = color ?? (isHeaderTypographyInContext !== undefined ? undefined : 'black');
224
- const content = base ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
243
+ const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular');
244
+ const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
225
245
  value: isHeader,
226
246
  children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
227
- $color: colorWithDefaultToBlack,
247
+ $color: colorOrDefaultToBlack,
228
248
  $isHeader: isHeader,
229
249
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
230
250
  $variant: nonNullableVariant,
@@ -232,7 +252,7 @@ function Typography({
232
252
  ...otherProps
233
253
  })
234
254
  }) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
235
- $color: colorWithDefaultToBlack,
255
+ $color: colorOrDefaultToBlack,
236
256
  $isHeader: isHeader,
237
257
  $variant: nonNullableVariant,
238
258
  accessibilityRole: accessibilityRole || undefined,
@@ -297,31 +317,35 @@ Typography.h4 = createHeading(4, 'header4');
297
317
 
298
318
  Typography.h5 = createHeading(5, 'header5');
299
319
 
300
- const getFirstCharacter = string => string ? string[0] : '';
301
-
302
- const getInitials = (firstname, lastname) => (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
320
+ const getInitials = (firstname, lastname) => `${firstname[0]}${lastname[0]}`.toUpperCase();
303
321
 
304
322
  const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
305
323
  displayName: "Avatar__StyledAvatarView",
306
324
  componentId: "kitt-universal__sc-9miubv-0"
307
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
308
- round,
309
- size
310
- }) => round ? size / 2 : 10, ({
325
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
311
326
  theme,
312
- light
313
- }) => light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar.default.backgroundColor, ({
314
- size
315
- }) => size, ({
316
- size
317
- }) => 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);
318
340
 
319
341
  function AvatarContent({
320
- size = 40,
342
+ size,
321
343
  src,
322
344
  firstname,
323
345
  lastname,
324
- light
346
+ alt,
347
+ base,
348
+ isLight
325
349
  }) {
326
350
  if (src) {
327
351
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
@@ -331,34 +355,43 @@ function AvatarContent({
331
355
  style: {
332
356
  width: size,
333
357
  height: size
334
- }
358
+ },
359
+ accessibilityLabel: alt
335
360
  });
336
361
  }
337
362
 
338
363
  if (firstname && lastname) {
339
364
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
340
- base: "body-small",
365
+ base: base,
341
366
  variant: "bold",
342
- color: light ? 'black' : 'white',
367
+ color: isLight ? 'black' : 'white',
343
368
  children: getInitials(firstname, lastname)
344
369
  });
345
370
  }
346
371
 
347
372
  return /*#__PURE__*/jsxRuntime.jsx(Icon, {
348
373
  icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.UserIcon, {}),
349
- color: light ? 'black' : 'white',
374
+ color: isLight ? 'black' : 'white',
350
375
  size: size / 2
351
376
  });
352
377
  }
353
378
 
354
379
  function Avatar({
355
380
  size = 40,
356
- ...rest
381
+ base = 'body-small',
382
+ round,
383
+ light,
384
+ ...props
357
385
  }) {
358
- return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, { ...rest,
359
- size: size,
360
- children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, { ...rest,
361
- 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
362
395
  })
363
396
  });
364
397
  }
@@ -768,7 +801,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
768
801
  });
769
802
  });
770
803
 
771
- const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
804
+ const Container$7 = /*#__PURE__*/styled__default.View.withConfig({
772
805
  displayName: "Card__Container",
773
806
  componentId: "kitt-universal__sc-1n9psug-0"
774
807
  })(["background-color:", ";padding:", ";border-radius:", ";border-width:", ";border-color:", ";"], ({
@@ -788,7 +821,7 @@ function Card({
788
821
  children,
789
822
  type
790
823
  }) {
791
- return /*#__PURE__*/jsxRuntime.jsx(Container$6, {
824
+ return /*#__PURE__*/jsxRuntime.jsx(Container$7, {
792
825
  type: type,
793
826
  children: children
794
827
  });
@@ -976,7 +1009,7 @@ const Input = /*#__PURE__*/styled__default(reactNative.TextInput).withConfig({
976
1009
  }, ({
977
1010
  minHeight
978
1011
  }) => minHeight);
979
- const Container$5 = /*#__PURE__*/styled__default.View.withConfig({
1012
+ const Container$6 = /*#__PURE__*/styled__default.View.withConfig({
980
1013
  displayName: "InputText__Container",
981
1014
  componentId: "kitt-universal__sc-uke279-1"
982
1015
  })(["margin-top:", ";margin-bottom:", ";"], ({
@@ -1050,7 +1083,7 @@ const InputText = /*#__PURE__*/react.forwardRef(({
1050
1083
  isDisabled: disabled,
1051
1084
  formState
1052
1085
  });
1053
- return /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
1086
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$6, {
1054
1087
  children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
1055
1088
  ref: ref,
1056
1089
  nativeID: id,
@@ -1140,7 +1173,7 @@ const SelectedInnerRadio = /*#__PURE__*/styled__default.View.withConfig({
1140
1173
  }) => theme.kitt.forms.radio.checked.innerSize, ({
1141
1174
  theme
1142
1175
  }) => theme.kitt.forms.radio.checked.innerSize / 2);
1143
- const Container$4 = /*#__PURE__*/styled__default.Pressable.withConfig({
1176
+ const Container$5 = /*#__PURE__*/styled__default.Pressable.withConfig({
1144
1177
  displayName: "Radio__Container",
1145
1178
  componentId: "kitt-universal__sc-1mdgr2o-3"
1146
1179
  })(["flex-direction:row;align-items:center;"]);
@@ -1158,7 +1191,7 @@ function Radio({
1158
1191
  disabled = false,
1159
1192
  children
1160
1193
  }) {
1161
- return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
1194
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$5, {
1162
1195
  nativeID: id,
1163
1196
  disabled: disabled,
1164
1197
  accessibilityRole: "radio",
@@ -1184,6 +1217,7 @@ function TextArea({ ...props
1184
1217
  const theme = /*#__PURE__*/styled.useTheme();
1185
1218
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
1186
1219
  multiline: true,
1220
+ textAlignVertical: "top",
1187
1221
  ...props,
1188
1222
  type: "text",
1189
1223
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1325,7 +1359,7 @@ function FullScreenModalHeader({
1325
1359
  });
1326
1360
  }
1327
1361
 
1328
- const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1362
+ const Container$4 = /*#__PURE__*/styled__default.View.withConfig({
1329
1363
  displayName: "FullScreenModal__Container",
1330
1364
  componentId: "kitt-universal__sc-11qpbe3-0"
1331
1365
  })(["flex:1;background-color:", ";"], ({
@@ -1334,7 +1368,7 @@ const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1334
1368
  function FullScreenModal({
1335
1369
  children
1336
1370
  }) {
1337
- return /*#__PURE__*/jsxRuntime.jsx(Container$3, {
1371
+ return /*#__PURE__*/jsxRuntime.jsx(Container$4, {
1338
1372
  children: children
1339
1373
  });
1340
1374
  }
@@ -1390,11 +1424,16 @@ const PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/react$1.styled("di
1390
1424
  theme
1391
1425
  }) => theme.kitt.iconButton.scale.base.active],
1392
1426
  "p1nlccvg-4": [({
1393
- theme
1394
- }) => theme.kitt.iconButton.default.pressedBackgroundColor],
1395
- "p1nlccvg-5": [({
1396
- theme
1397
- }) => theme.kitt.iconButton.white.pressedBackgroundColor]
1427
+ theme,
1428
+ $isWhite
1429
+ }) => {
1430
+ const {
1431
+ white,
1432
+ default: defaultIconButton
1433
+ } = theme.kitt.iconButton;
1434
+ if ($isWhite) return white.pressedBackgroundColor;
1435
+ return defaultIconButton.pressedBackgroundColor;
1436
+ }]
1398
1437
  }
1399
1438
  }));
1400
1439
  const StyledPressableIconButton = /*#__PURE__*/styled__default.Pressable.withConfig({
@@ -1438,7 +1477,7 @@ function PressableIconButton({
1438
1477
  }) {
1439
1478
  return /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
1440
1479
  as: PressableIconButtonWebWrapper,
1441
- "data-color-white": color === 'white' ? true : undefined,
1480
+ $isWhite: color === 'white',
1442
1481
  children: /*#__PURE__*/jsxRuntime.jsx(StyledPressableIconButton, { ...props
1443
1482
  })
1444
1483
  });
@@ -1758,7 +1797,7 @@ function LargeLoader({
1758
1797
 
1759
1798
  const xIconSize = 14;
1760
1799
  const mainIconSize = 20;
1761
- const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
1800
+ const Container$3 = /*#__PURE__*/styled__default.View.withConfig({
1762
1801
  displayName: "Message__Container",
1763
1802
  componentId: "kitt-universal__sc-c6400e-0"
1764
1803
  })(["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;"], ({
@@ -1837,7 +1876,7 @@ function Message({
1837
1876
  insets
1838
1877
  }) {
1839
1878
  const color = getColorByType(type);
1840
- return /*#__PURE__*/jsxRuntime.jsxs(Container$2, {
1879
+ return /*#__PURE__*/jsxRuntime.jsxs(Container$3, {
1841
1880
  type: type,
1842
1881
  noRadius: noRadius,
1843
1882
  insets: insets,
@@ -2038,6 +2077,117 @@ function Notification({
2038
2077
  });
2039
2078
  }
2040
2079
 
2080
+ const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
2081
+ displayName: "SkeletonContent__Container",
2082
+ componentId: "kitt-universal__sc-1u3chjb-0"
2083
+ })(["background-color:", ";border-color:", ";height:100%;width:100%;"], ({
2084
+ theme
2085
+ }) => theme.kitt.skeleton.backgroundColor, ({
2086
+ theme
2087
+ }) => theme.kitt.skeleton.flareColor);
2088
+ const AnimatedLinearGradient = Animated__default.createAnimatedComponent(expoLinearGradient.LinearGradient);
2089
+ function SkeletonContent({
2090
+ isLoading,
2091
+ width
2092
+ }) {
2093
+ const theme = /*#__PURE__*/styled.useTheme();
2094
+ const sharedX = Animated.useSharedValue(0);
2095
+ react.useEffect(() => {
2096
+ if (isLoading) {
2097
+ sharedX.value = Animated.withRepeat(Animated.withTiming(1, {
2098
+ duration: theme.kitt.skeleton.animationDuration,
2099
+ easing: Animated.Easing.inOut(Animated.Easing.ease)
2100
+ }), -1);
2101
+ }
2102
+ }, [sharedX, width, isLoading, theme]);
2103
+ const linearGradientStyle = Animated.useAnimatedStyle(function () {
2104
+ const _f = function () {
2105
+ return {
2106
+ transform: [{
2107
+ translateX: Animated.interpolate(sharedX.value, [0, 1], [-width, width])
2108
+ }]
2109
+ };
2110
+ };
2111
+
2112
+ _f._closure = {
2113
+ interpolate: Animated.interpolate,
2114
+ sharedX,
2115
+ width
2116
+ };
2117
+ _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
2118
+ _f.__workletHash = 1670955855244;
2119
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (41:47)";
2120
+ _f.__optimalization = 3;
2121
+
2122
+ global.__reanimatedWorkletInit(_f);
2123
+
2124
+ return _f;
2125
+ }());
2126
+ return /*#__PURE__*/jsxRuntime.jsx(Container$2, {
2127
+ children: /*#__PURE__*/jsxRuntime.jsx(AnimatedLinearGradient, {
2128
+ colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
2129
+ locations: [0.1, 0.5, 0.9],
2130
+ start: {
2131
+ x: 0,
2132
+ y: 0
2133
+ },
2134
+ end: {
2135
+ x: 1,
2136
+ y: 0
2137
+ },
2138
+ style: [reactNative.StyleSheet.absoluteFill, linearGradientStyle]
2139
+ })
2140
+ });
2141
+ }
2142
+
2143
+ function Skeleton({
2144
+ isLoading,
2145
+ style
2146
+ }) {
2147
+ const [width, setWidth] = react.useState(0);
2148
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
2149
+ style: style,
2150
+ onLayout: ({
2151
+ nativeEvent
2152
+ }) => setWidth(nativeEvent.layout.width),
2153
+ children: /*#__PURE__*/jsxRuntime.jsx(SkeletonContent, {
2154
+ isLoading: isLoading,
2155
+ width: width
2156
+ })
2157
+ });
2158
+ }
2159
+ const Bar = /*#__PURE__*/styled__default(Skeleton).withConfig({
2160
+ displayName: "Skeleton__Bar",
2161
+ componentId: "kitt-universal__sc-1w5cm3i-0"
2162
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2163
+ theme
2164
+ }) => theme.kitt.spacing * 2, ({
2165
+ theme
2166
+ }) => theme.kitt.spacing * 2);
2167
+ const Circle = /*#__PURE__*/styled__default(Skeleton).withConfig({
2168
+ displayName: "Skeleton__Circle",
2169
+ componentId: "kitt-universal__sc-1w5cm3i-1"
2170
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2171
+ theme
2172
+ }) => theme.kitt.spacing * 12, ({
2173
+ theme
2174
+ }) => theme.kitt.spacing * 12, ({
2175
+ theme
2176
+ }) => theme.kitt.spacing * 6);
2177
+ const Square = /*#__PURE__*/styled__default(Skeleton).withConfig({
2178
+ displayName: "Skeleton__Square",
2179
+ componentId: "kitt-universal__sc-1w5cm3i-2"
2180
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], ({
2181
+ theme
2182
+ }) => theme.kitt.spacing * 12, ({
2183
+ theme
2184
+ }) => theme.kitt.spacing * 12, ({
2185
+ theme
2186
+ }) => theme.kitt.spacing * 1.5);
2187
+ Skeleton.Bar = Bar;
2188
+ Skeleton.Circle = Circle;
2189
+ Skeleton.Square = Square;
2190
+
2041
2191
  const Flex = /*#__PURE__*/styled__default.View.withConfig({
2042
2192
  shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
2043
2193
  }).withConfig({
@@ -2463,17 +2613,6 @@ const lateOceanColorPalette = {
2463
2613
  moonPurpleLight1: '#EDEBFC'
2464
2614
  };
2465
2615
 
2466
- const avatarLateOceanTheme = {
2467
- default: {
2468
- color: lateOceanColorPalette.white,
2469
- backgroundColor: lateOceanColorPalette.lateOcean
2470
- },
2471
- light: {
2472
- color: lateOceanColorPalette.black1000,
2473
- backgroundColor: lateOceanColorPalette.black100
2474
- }
2475
- };
2476
-
2477
2616
  const colorsLateOceanTheme = {
2478
2617
  primary: lateOceanColorPalette.lateOcean,
2479
2618
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2496,6 +2635,16 @@ const colorsLateOceanTheme = {
2496
2635
  }
2497
2636
  };
2498
2637
 
2638
+ const avatar = {
2639
+ borderRadius: '10px',
2640
+ default: {
2641
+ backgroundColor: colorsLateOceanTheme.primary
2642
+ },
2643
+ light: {
2644
+ backgroundColor: lateOceanColorPalette.black100
2645
+ }
2646
+ };
2647
+
2499
2648
  const buttonLateOceanTheme = {
2500
2649
  borderRadius: '30px',
2501
2650
  borderWidth: {
@@ -2722,6 +2871,12 @@ const shadowsLateOceanTheme = {
2722
2871
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2723
2872
  };
2724
2873
 
2874
+ const skeletonTheme = {
2875
+ backgroundColor: lateOceanColorPalette.black100,
2876
+ flareColor: lateOceanColorPalette.black200,
2877
+ animationDuration: 1000
2878
+ };
2879
+
2725
2880
  const tagLateOceanTheme = {
2726
2881
  borderRadius: '10px',
2727
2882
  padding: '2px 12px',
@@ -2773,18 +2928,16 @@ const tooltip = {
2773
2928
  };
2774
2929
 
2775
2930
  const calcLineHeight = (fontSize, lineHeightMultiplier) => Math.round(fontSize * lineHeightMultiplier);
2776
-
2777
2931
  const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) => ({
2778
2932
  baseAndSmall: {
2779
2933
  fontSize: `${baseAndSmallFontSize}px`,
2780
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2934
+ lineHeight: `${calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier)}px`
2781
2935
  },
2782
2936
  mediumAndWide: {
2783
2937
  fontSize: `${mediumAndWideFontSize}px`,
2784
- lineHeight: `${calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize)}px`
2938
+ lineHeight: `${calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier)}px`
2785
2939
  }
2786
2940
  });
2787
-
2788
2941
  const typographyLateOceanTheme = {
2789
2942
  colors: {
2790
2943
  black: lateOceanColorPalette.black1000,
@@ -2874,7 +3027,7 @@ const theme = {
2874
3027
  palettes: {
2875
3028
  lateOcean: lateOceanColorPalette
2876
3029
  },
2877
- avatar: avatarLateOceanTheme,
3030
+ avatar,
2878
3031
  button: buttonLateOceanTheme,
2879
3032
  card: cardLateOceanTheme,
2880
3033
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2885,7 +3038,8 @@ const theme = {
2885
3038
  fullScreenModal: fullScreenModalLateOceanTheme,
2886
3039
  iconButton,
2887
3040
  listItem: listItemLateOceanTheme,
2888
- tooltip
3041
+ tooltip,
3042
+ skeleton: skeletonTheme
2889
3043
  };
2890
3044
 
2891
3045
  function Title({
@@ -3249,14 +3403,19 @@ function TypographyEmoji({
3249
3403
 
3250
3404
  const TypographyLinkWebWrapper = withTheme( /*#__PURE__*/react$1.styled("span")({
3251
3405
  name: "TypographyLinkWebWrapper",
3252
- class: "tcwz3nt"
3406
+ class: "tcwz3nt",
3407
+ vars: {
3408
+ "tcwz3nt-0": [({
3409
+ $hasNoUnderline
3410
+ }) => $hasNoUnderline ? 'underline' : 'none']
3411
+ }
3253
3412
  }));
3254
3413
  const StyledLink = /*#__PURE__*/styled__default.Text.withConfig({
3255
3414
  displayName: "TypographyLink__StyledLink",
3256
3415
  componentId: "kitt-universal__sc-1o1zy30-0"
3257
3416
  })(["text-decoration:", ";", ";", ";"], ({
3258
- $noUnderline
3259
- }) => $noUnderline ? 'none' : 'underline', ({
3417
+ $hasNoUnderline
3418
+ }) => $hasNoUnderline ? 'none' : 'underline', ({
3260
3419
  $disabled
3261
3420
  }) => {
3262
3421
  if (reactNative.Platform.OS !== 'web') return undefined;
@@ -3285,10 +3444,10 @@ function TypographyLink({
3285
3444
  accessibilityRole: "none",
3286
3445
  children: /*#__PURE__*/jsxRuntime.jsx(StyleWebWrapper, {
3287
3446
  as: TypographyLinkWebWrapper,
3288
- "data-nounderline": noUnderline ? true : undefined,
3447
+ $hasNoUnderline: noUnderline,
3289
3448
  children: /*#__PURE__*/jsxRuntime.jsx(StyledLink, {
3290
3449
  $disabled: disabled,
3291
- $noUnderline: noUnderline,
3450
+ $hasNoUnderline: noUnderline,
3292
3451
  href: href,
3293
3452
  hrefAttrs: hrefAttrs,
3294
3453
  accessibilityRole: "link",
@@ -3303,23 +3462,35 @@ function TypographyLink({
3303
3462
  });
3304
3463
  }
3305
3464
 
3306
- function matchWindowSize(currentWidth, {
3465
+ function matchWindowSize({
3466
+ width,
3467
+ height
3468
+ }, {
3307
3469
  minWidth,
3308
- maxWidth
3470
+ maxWidth,
3471
+ minHeight,
3472
+ maxHeight
3309
3473
  }) {
3310
- return currentWidth >= minWidth && (!maxWidth || currentWidth <= maxWidth);
3474
+ const hasWidthMatched = width ? (!minWidth || width >= minWidth) && (!maxWidth || width <= maxWidth) : true;
3475
+ const hasHeightMatched = height ? (!minHeight || height >= minHeight) && (!maxHeight || height <= maxHeight) : true;
3476
+ return hasWidthMatched && hasHeightMatched;
3311
3477
  }
3312
3478
  function useMatchWindowSize(options) {
3313
3479
  const {
3314
- width
3480
+ width,
3481
+ height
3315
3482
  } = reactNative.useWindowDimensions();
3316
- return matchWindowSize(width, options);
3483
+ return matchWindowSize({
3484
+ width,
3485
+ height
3486
+ }, options);
3317
3487
  }
3318
3488
 
3319
- function createWindowSizeHelper(currentWidth) {
3489
+ // eslint-disable-next-line no-restricted-imports
3490
+ function createWindowSizeHelper(dimensions) {
3320
3491
  return {
3321
- matchWindowSize: options => matchWindowSize(currentWidth, options),
3322
- ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(currentWidth, options) ? valueIfTrue : valueIfFalse,
3492
+ matchWindowSize: options => matchWindowSize(dimensions, options),
3493
+ ifWindowSizeMatches: (options, valueIfTrue, valueIfFalse) => matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse,
3323
3494
  mapWindowWidth: (...widthList) => {
3324
3495
  if ((process.env.NODE_ENV !== "production")) {
3325
3496
  widthList.slice(1).forEach(([minWidth], index) => {
@@ -3331,7 +3502,7 @@ function createWindowSizeHelper(currentWidth) {
3331
3502
  });
3332
3503
  }
3333
3504
 
3334
- const found = widthList.find(([minWidth, value]) => matchWindowSize(currentWidth, {
3505
+ const found = widthList.find(([minWidth, value]) => matchWindowSize(dimensions, {
3335
3506
  minWidth: Number(minWidth)
3336
3507
  }));
3337
3508
  if (!found) return null;
@@ -3341,18 +3512,23 @@ function createWindowSizeHelper(currentWidth) {
3341
3512
  }
3342
3513
 
3343
3514
  function useKittTheme() {
3344
- const {
3345
- width
3346
- } = reactNative.useWindowDimensions();
3515
+ const dimensions = reactNative.useWindowDimensions();
3347
3516
  return react.useMemo(() => {
3348
3517
  return {
3349
3518
  kitt: theme,
3350
- responsive: createWindowSizeHelper(width),
3519
+ responsive: createWindowSizeHelper(dimensions),
3351
3520
  breakpoints
3352
3521
  };
3353
- }, [width]);
3522
+ }, [dimensions]);
3354
3523
  }
3355
3524
 
3525
+ const hex2rgba = (hex, alpha = 1) => {
3526
+ const r = parseInt(hex.slice(1, 3), 16);
3527
+ const g = parseInt(hex.slice(3, 5), 16);
3528
+ const b = parseInt(hex.slice(5, 7), 16);
3529
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
3530
+ };
3531
+
3356
3532
  function KittThemeProvider({
3357
3533
  children
3358
3534
  }) {
@@ -3413,6 +3589,7 @@ exports.Modal = Modal;
3413
3589
  exports.Notification = Notification;
3414
3590
  exports.Radio = Radio;
3415
3591
  exports.Section = DeprecatedSection;
3592
+ exports.Skeleton = Skeleton;
3416
3593
  exports.Story = Story;
3417
3594
  exports.StoryBlock = StoryBlock;
3418
3595
  exports.StoryContainer = StoryContainer;
@@ -3420,6 +3597,7 @@ exports.StoryDecorator = StoryDecorator;
3420
3597
  exports.StoryGrid = StoryGrid;
3421
3598
  exports.StorySection = StorySection;
3422
3599
  exports.StoryTitle = StoryTitle;
3600
+ exports.StyleWebWrapper = StyleWebWrapper;
3423
3601
  exports.Tag = Tag;
3424
3602
  exports.TextArea = TextArea;
3425
3603
  exports.TimePicker = TimePicker;
@@ -3429,12 +3607,14 @@ exports.TypographyEmoji = TypographyEmoji;
3429
3607
  exports.TypographyIcon = TypographyIcon;
3430
3608
  exports.TypographyLink = TypographyLink;
3431
3609
  exports.createWindowSizeHelper = createWindowSizeHelper;
3610
+ exports.hex2rgba = hex2rgba;
3432
3611
  exports.matchWindowSize = matchWindowSize;
3433
3612
  exports.styledTextInputMixin = styledTextInputMixin;
3434
3613
  exports.theme = theme;
3435
3614
  exports.useKittTheme = useKittTheme;
3436
3615
  exports.useMatchWindowSize = useMatchWindowSize;
3437
3616
  exports.useStoryBlockColor = useStoryBlockColor;
3617
+ exports.withTheme = withTheme;
3438
3618
  Object.keys(kittIcons).forEach(function (k) {
3439
3619
  if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = kittIcons[k];
3440
3620
  });