@ornikar/kitt-universal 3.3.0 → 3.7.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 (49) 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/typography/Typography.d.ts +2 -0
  24. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  25. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  26. package/dist/definitions/useKittTheme.d.ts +0 -2
  27. package/dist/definitions/useKittTheme.d.ts.map +1 -1
  28. package/dist/definitions/utils/hexToRgba.d.ts +2 -0
  29. package/dist/definitions/utils/hexToRgba.d.ts.map +1 -0
  30. package/dist/definitions/utils/withTheme.d.ts +2 -2
  31. package/dist/definitions/utils/withTheme.d.ts.map +1 -1
  32. package/dist/index-browser-all.es.android.js +337 -151
  33. package/dist/index-browser-all.es.android.js.map +1 -1
  34. package/dist/index-browser-all.es.css +2 -2
  35. package/dist/index-browser-all.es.ios.js +337 -151
  36. package/dist/index-browser-all.es.ios.js.map +1 -1
  37. package/dist/index-browser-all.es.js +296 -129
  38. package/dist/index-browser-all.es.js.map +1 -1
  39. package/dist/index-browser-all.es.web.js +294 -166
  40. package/dist/index-browser-all.es.web.js.map +1 -1
  41. package/dist/index-node-14.17.cjs.css +2 -2
  42. package/dist/index-node-14.17.cjs.js +247 -78
  43. package/dist/index-node-14.17.cjs.js.map +1 -1
  44. package/dist/index-node-14.17.cjs.web.css +4 -3
  45. package/dist/index-node-14.17.cjs.web.js +234 -103
  46. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  47. package/dist/styles.css +4 -3
  48. package/dist/tsbuildinfo +1 -1
  49. package/package.json +5 -4
@@ -5,7 +5,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
5
5
  import { UserIcon, EyeIcon, EyeOffIcon, LoaderIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
6
6
  export * from '@ornikar/kitt-icons';
7
7
  import styled$1, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
- import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children, useEffect } from 'react';
8
+ import { forwardRef, cloneElement, useContext, createContext, useMemo, useState, Fragment, Children, useEffect } from 'react';
9
9
  import { styled } from '@linaria/react';
10
10
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
11
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -30,12 +30,14 @@ function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) {
30
30
  // };
31
31
  // }
32
32
  function withTheme(WrappedComponent) {
33
- return function (props) {
33
+ // eslint-disable-next-line prefer-arrow-callback
34
+ return /*#__PURE__*/forwardRef(function (props, ref) {
34
35
  var theme = /*#__PURE__*/useTheme();
35
36
  return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$h({
37
+ ref: ref,
36
38
  theme: theme
37
39
  }, props));
38
- };
40
+ });
39
41
  }
40
42
 
41
43
  var StyledSpinningIconContainer = withTheme( /*#__PURE__*/styled("div")({
@@ -194,34 +196,53 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
194
196
  if (small && width >= KittBreakpoints.SMALL) return small;
195
197
  return base;
196
198
  }
197
- function Typography(_ref3) {
198
- var accessibilityRole = _ref3.accessibilityRole,
199
- base = _ref3.base,
200
- small = _ref3.small,
201
- medium = _ref3.medium,
202
- large = _ref3.large,
203
- variant = _ref3.variant,
204
- color = _ref3.color,
205
- otherProps = _objectWithoutProperties(_ref3, _excluded$e);
199
+ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, _ref3) {
200
+ var base = _ref3.base,
201
+ color = _ref3.color;
202
+ // return the props set or undefined. In case of undefined, the value will be inherited from its parents.
203
+ if (hasTypographyAncestor) return {
204
+ base: base,
205
+ color: color
206
+ };
207
+ return {
208
+ base: base !== null && base !== void 0 ? base : 'body',
209
+ color: color !== null && color !== void 0 ? color : 'black'
210
+ };
211
+ }
212
+ function Typography(_ref4) {
213
+ var accessibilityRole = _ref4.accessibilityRole,
214
+ base = _ref4.base,
215
+ small = _ref4.small,
216
+ medium = _ref4.medium,
217
+ large = _ref4.large,
218
+ variant = _ref4.variant,
219
+ color = _ref4.color,
220
+ otherProps = _objectWithoutProperties(_ref4, _excluded$e);
206
221
 
207
222
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
208
- var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(base, small, medium, large);
209
- var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
210
- var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular'; // if isHeaderTypographyInContext exists, it means we are inside another typography so we don't want to
211
- // redefine the color, just inherit from it
223
+ var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
212
224
 
213
- var colorWithDefaultToBlack = color !== null && color !== void 0 ? color : isHeaderTypographyInContext !== undefined ? undefined : 'black';
214
- var content = base ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
225
+ var _getTypographyInherit = getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, {
226
+ base: base,
227
+ color: color
228
+ }),
229
+ baseOrDefaultToBody = _getTypographyInherit.base,
230
+ colorOrDefaultToBlack = _getTypographyInherit.color;
231
+
232
+ var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
233
+ var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
234
+ var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
235
+ var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
215
236
  value: isHeader,
216
237
  children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$g({
217
- $color: colorWithDefaultToBlack,
238
+ $color: colorOrDefaultToBlack,
218
239
  $isHeader: isHeader,
219
240
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
220
241
  $variant: nonNullableVariant,
221
242
  accessibilityRole: accessibilityRole || undefined
222
243
  }, otherProps))
223
244
  }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$g({
224
- $color: colorWithDefaultToBlack,
245
+ $color: colorOrDefaultToBlack,
225
246
  $isHeader: isHeader,
226
247
  $variant: nonNullableVariant,
227
248
  accessibilityRole: accessibilityRole || undefined
@@ -283,46 +304,45 @@ Typography.h4 = createHeading(4, 'header4');
283
304
 
284
305
  Typography.h5 = createHeading(5, 'header5');
285
306
 
286
- var _excluded$d = ["size"];
307
+ var _excluded$d = ["size", "base", "round", "light"];
287
308
 
288
309
  function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
289
310
 
290
311
  function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
291
312
 
292
- var getFirstCharacter = function (string) {
293
- return string ? string[0] : '';
294
- };
295
-
296
313
  var getInitials = function (firstname, lastname) {
297
- return (getFirstCharacter(firstname) + getFirstCharacter(lastname)).toUpperCase();
314
+ return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
298
315
  };
299
316
 
300
317
  var StyledAvatarView = /*#__PURE__*/styled$1(View).withConfig({
301
318
  displayName: "Avatar__StyledAvatarView",
302
319
  componentId: "kitt-universal__sc-9miubv-0"
303
- })(["border-radius:", "px;background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
304
- var round = _ref.round,
305
- size = _ref.size;
306
- return round ? size / 2 : 10;
320
+ })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], function (_ref) {
321
+ var theme = _ref.theme,
322
+ $isRound = _ref.$isRound,
323
+ $size = _ref.$size;
324
+ if ($isRound) return "".concat($size / 2, "px");
325
+ return theme.kitt.avatar.borderRadius;
307
326
  }, function (_ref2) {
308
327
  var theme = _ref2.theme,
309
- light = _ref2.light;
310
- return light ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
328
+ $isLight = _ref2.$isLight;
329
+ return $isLight ? theme.kitt.avatar.light.backgroundColor : theme.kitt.avatar["default"].backgroundColor;
311
330
  }, function (_ref3) {
312
- var size = _ref3.size;
313
- return size;
331
+ var $size = _ref3.$size;
332
+ return $size;
314
333
  }, function (_ref4) {
315
- var size = _ref4.size;
316
- return size;
334
+ var $size = _ref4.$size;
335
+ return $size;
317
336
  });
318
337
 
319
338
  function AvatarContent(_ref5) {
320
- var _ref5$size = _ref5.size,
321
- size = _ref5$size === void 0 ? 40 : _ref5$size,
339
+ var size = _ref5.size,
322
340
  src = _ref5.src,
323
341
  firstname = _ref5.firstname,
324
342
  lastname = _ref5.lastname,
325
- light = _ref5.light;
343
+ alt = _ref5.alt,
344
+ base = _ref5.base,
345
+ isLight = _ref5.isLight;
326
346
 
327
347
  if (src) {
328
348
  return /*#__PURE__*/jsx(Image, {
@@ -332,22 +352,23 @@ function AvatarContent(_ref5) {
332
352
  style: {
333
353
  width: size,
334
354
  height: size
335
- }
355
+ },
356
+ accessibilityLabel: alt
336
357
  });
337
358
  }
338
359
 
339
360
  if (firstname && lastname) {
340
361
  return /*#__PURE__*/jsx(Typography.Text, {
341
- base: "body-small",
362
+ base: base,
342
363
  variant: "bold",
343
- color: light ? 'black' : 'white',
364
+ color: isLight ? 'black' : 'white',
344
365
  children: getInitials(firstname, lastname)
345
366
  });
346
367
  }
347
368
 
348
369
  return /*#__PURE__*/jsx(Icon, {
349
370
  icon: /*#__PURE__*/jsx(UserIcon, {}),
350
- color: light ? 'black' : 'white',
371
+ color: isLight ? 'black' : 'white',
351
372
  size: size / 2
352
373
  });
353
374
  }
@@ -355,14 +376,22 @@ function AvatarContent(_ref5) {
355
376
  function Avatar(_ref6) {
356
377
  var _ref6$size = _ref6.size,
357
378
  size = _ref6$size === void 0 ? 40 : _ref6$size,
358
- rest = _objectWithoutProperties(_ref6, _excluded$d);
359
-
360
- return /*#__PURE__*/jsx(StyledAvatarView, _objectSpread$f(_objectSpread$f({}, rest), {}, {
361
- size: size,
362
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$f(_objectSpread$f({}, rest), {}, {
363
- size: size
364
- }))
365
- }));
379
+ _ref6$base = _ref6.base,
380
+ base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
381
+ round = _ref6.round,
382
+ light = _ref6.light,
383
+ props = _objectWithoutProperties(_ref6, _excluded$d);
384
+
385
+ return /*#__PURE__*/jsx(StyledAvatarView, {
386
+ $size: size,
387
+ $isRound: round,
388
+ $isLight: light,
389
+ children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$f({
390
+ size: size,
391
+ base: base,
392
+ isLight: light
393
+ }, props))
394
+ });
366
395
  }
367
396
 
368
397
  function isSubtle(type) {
@@ -386,97 +415,93 @@ var AnimatedButtonPressableContainer = withTheme( /*#__PURE__*/styled("div")({
386
415
  var $isStretch = _ref2.$isStretch;
387
416
  return $isStretch ? 'stretch' : 'baseline';
388
417
  }],
389
- "a1vkj3mh-2": [function (_ref3) {
418
+ "a1vkj3mh-3": [function (_ref3) {
390
419
  var theme = _ref3.theme;
391
- return theme.breakpoints.min.mediumBreakpoint;
392
- }],
393
- "a1vkj3mh-3": [function (_ref4) {
394
- var theme = _ref4.theme;
395
420
  return theme.kitt.button.scale.medium.hover;
396
421
  }],
397
- "a1vkj3mh-4": [function (_ref5) {
398
- var theme = _ref5.theme,
399
- $isDisabled = _ref5.$isDisabled;
422
+ "a1vkj3mh-4": [function (_ref4) {
423
+ var theme = _ref4.theme,
424
+ $isDisabled = _ref4.$isDisabled;
400
425
  return "scale(".concat($isDisabled ? 1 : theme.kitt.button.scale.base.active, ")");
401
426
  }],
402
- "a1vkj3mh-5": [function (_ref6) {
403
- var theme = _ref6.theme,
404
- $type = _ref6.$type,
405
- $isDisabled = _ref6.$isDisabled;
427
+ "a1vkj3mh-5": [function (_ref5) {
428
+ var theme = _ref5.theme,
429
+ $type = _ref5.$type,
430
+ $isDisabled = _ref5.$isDisabled;
406
431
  if ($isDisabled) return theme.kitt.button.disabled.hoverBackgroundColor;
407
432
  return theme.kitt.button[$type].hoverBackgroundColor;
408
433
  }],
409
- "a1vkj3mh-6": [function (_ref7) {
410
- var theme = _ref7.theme;
434
+ "a1vkj3mh-6": [function (_ref6) {
435
+ var theme = _ref6.theme;
411
436
  var _theme$kitt$button$tr = theme.kitt.button.transition,
412
437
  duration = _theme$kitt$button$tr.duration,
413
438
  timingFunction = _theme$kitt$button$tr.timingFunction;
414
439
  return "color, background, border-color, ".concat(duration, " ").concat(timingFunction);
415
440
  }],
416
- "a1vkj3mh-7": [function (_ref8) {
417
- var theme = _ref8.theme;
441
+ "a1vkj3mh-7": [function (_ref7) {
442
+ var theme = _ref7.theme;
418
443
  return theme.kitt.button.borderRadius;
419
444
  }],
420
- "a1vkj3mh-8": [function (_ref9) {
421
- var theme = _ref9.theme;
445
+ "a1vkj3mh-8": [function (_ref8) {
446
+ var theme = _ref8.theme;
422
447
  return "opacity ".concat(theme.kitt.button.transition.duration, " ").concat(theme.kitt.button.transition.timingFunction);
423
448
  }],
424
- "a1vkj3mh-9": [function (_ref10) {
425
- var $isDisabled = _ref10.$isDisabled;
449
+ "a1vkj3mh-9": [function (_ref9) {
450
+ var $isDisabled = _ref9.$isDisabled;
426
451
  return $isDisabled ? 1 : 0;
427
452
  }],
428
- "a1vkj3mh-10": [function (_ref11) {
429
- var theme = _ref11.theme;
453
+ "a1vkj3mh-10": [function (_ref10) {
454
+ var theme = _ref10.theme;
430
455
  return "-".concat(theme.kitt.button.borderWidth.disabled);
431
456
  }],
432
- "a1vkj3mh-12": [function (_ref12) {
433
- var theme = _ref12.theme;
457
+ "a1vkj3mh-12": [function (_ref11) {
458
+ var theme = _ref11.theme;
434
459
  return "calc(100% - ".concat(parseInt(theme.kitt.button.borderWidth.disabled, 10) * 0.5, "px)");
435
460
  }],
436
- "a1vkj3mh-14": [function (_ref13) {
437
- var theme = _ref13.theme;
461
+ "a1vkj3mh-14": [function (_ref12) {
462
+ var theme = _ref12.theme;
438
463
  return "".concat(theme.kitt.button.disabled.borderColor, " solid ").concat(theme.kitt.button.borderWidth.disabled);
439
464
  }],
440
- "a1vkj3mh-15": [function (_ref14) {
441
- var theme = _ref14.theme,
442
- $type = _ref14.$type;
465
+ "a1vkj3mh-15": [function (_ref13) {
466
+ var theme = _ref13.theme,
467
+ $type = _ref13.$type;
443
468
  return "".concat(theme.kitt.button.borderWidth.focus, " solid ").concat(theme.kitt.button[$type].focusBorderColor);
444
469
  }],
445
- "a1vkj3mh-16": [function (_ref15) {
446
- var theme = _ref15.theme;
470
+ "a1vkj3mh-16": [function (_ref14) {
471
+ var theme = _ref14.theme;
447
472
  return "-".concat(theme.kitt.button.borderWidth.focus);
448
473
  }],
449
- "a1vkj3mh-18": [function (_ref16) {
474
+ "a1vkj3mh-18": [function (_ref15) {
475
+ var theme = _ref15.theme,
476
+ $type = _ref15.$type,
477
+ $isDisabled = _ref15.$isDisabled;
478
+ if ($isDisabled) return theme.kitt.typography.colors['black-light'];
479
+ if (!isSubtle($type)) return 'inherit';
480
+ return theme.kitt.button[$type].color;
481
+ }],
482
+ "a1vkj3mh-19": [function (_ref16) {
450
483
  var theme = _ref16.theme,
451
484
  $type = _ref16.$type,
452
485
  $isDisabled = _ref16.$isDisabled;
453
486
  if ($isDisabled) return theme.kitt.typography.colors['black-light'];
454
487
  if (!isSubtle($type)) return 'inherit';
455
- return theme.kitt.button[$type].color;
488
+ return theme.kitt.button[$type].hoverColor;
456
489
  }],
457
- "a1vkj3mh-19": [function (_ref17) {
490
+ "a1vkj3mh-20": [function (_ref17) {
458
491
  var theme = _ref17.theme,
459
492
  $type = _ref17.$type,
460
493
  $isDisabled = _ref17.$isDisabled;
461
494
  if ($isDisabled) return theme.kitt.typography.colors['black-light'];
462
495
  if (!isSubtle($type)) return 'inherit';
463
- return theme.kitt.button[$type].hoverColor;
464
- }],
465
- "a1vkj3mh-20": [function (_ref18) {
466
- var theme = _ref18.theme,
467
- $type = _ref18.$type,
468
- $isDisabled = _ref18.$isDisabled;
469
- if ($isDisabled) return theme.kitt.typography.colors['black-light'];
470
- if (!isSubtle($type)) return 'inherit';
471
496
  return theme.kitt.button[$type].activeColor;
472
497
  }]
473
498
  }
474
499
  }));
475
- var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref19, ref) {
476
- var $type = _ref19.$type,
477
- $isStretch = _ref19.$isStretch,
478
- disabled = _ref19.disabled,
479
- props = _objectWithoutProperties(_ref19, _excluded$c);
500
+ var AnimatedButtonPressable = /*#__PURE__*/forwardRef(function (_ref18, ref) {
501
+ var $type = _ref18.$type,
502
+ $isStretch = _ref18.$isStretch,
503
+ disabled = _ref18.disabled,
504
+ props = _objectWithoutProperties(_ref18, _excluded$c);
480
505
 
481
506
  return /*#__PURE__*/jsx(AnimatedButtonPressableContainer, {
482
507
  ref: ref,
@@ -1237,7 +1262,8 @@ function TextArea(_ref) {
1237
1262
 
1238
1263
  var theme = /*#__PURE__*/useTheme();
1239
1264
  return /*#__PURE__*/jsx(InputText, _objectSpread$9(_objectSpread$9({
1240
- multiline: true
1265
+ multiline: true,
1266
+ textAlignVertical: "top"
1241
1267
  }, props), {}, {
1242
1268
  type: "text",
1243
1269
  minHeight: theme.kitt.forms.input.textAreaMinHeight
@@ -1436,43 +1462,40 @@ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled("div")({
1436
1462
  var theme = _ref.theme;
1437
1463
  return theme.kitt.iconButton.scale.base.hover;
1438
1464
  }],
1439
- "p1nlccvg-1": [function (_ref2) {
1465
+ "p1nlccvg-2": [function (_ref2) {
1440
1466
  var theme = _ref2.theme;
1441
- return theme.breakpoints.min.mediumBreakpoint;
1442
- }],
1443
- "p1nlccvg-2": [function (_ref3) {
1444
- var theme = _ref3.theme;
1445
1467
  return theme.kitt.iconButton.scale.medium.hover;
1446
1468
  }],
1447
- "p1nlccvg-3": [function (_ref4) {
1448
- var theme = _ref4.theme;
1469
+ "p1nlccvg-3": [function (_ref3) {
1470
+ var theme = _ref3.theme;
1449
1471
  return theme.kitt.iconButton.scale.base.active;
1450
1472
  }],
1451
- "p1nlccvg-4": [function (_ref5) {
1452
- var theme = _ref5.theme;
1453
- return theme.kitt.iconButton["default"].pressedBackgroundColor;
1454
- }],
1455
- "p1nlccvg-5": [function (_ref6) {
1456
- var theme = _ref6.theme;
1457
- return theme.kitt.iconButton.white.pressedBackgroundColor;
1473
+ "p1nlccvg-4": [function (_ref4) {
1474
+ var theme = _ref4.theme,
1475
+ $isWhite = _ref4.$isWhite;
1476
+ var _theme$kitt$iconButto = theme.kitt.iconButton,
1477
+ white = _theme$kitt$iconButto.white,
1478
+ defaultIconButton = _theme$kitt$iconButto["default"];
1479
+ if ($isWhite) return white.pressedBackgroundColor;
1480
+ return defaultIconButton.pressedBackgroundColor;
1458
1481
  }]
1459
1482
  }
1460
1483
  }));
1461
1484
  var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
1462
1485
  displayName: "PressableIconButton__StyledPressableIconButton",
1463
1486
  componentId: "kitt-universal__sc-1m6jo3s-0"
1464
- })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref7) {
1465
- var theme = _ref7.theme;
1487
+ })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
1488
+ var theme = _ref5.theme;
1466
1489
  return theme.kitt.iconButton.borderRadius;
1467
- }, function (_ref8) {
1468
- var theme = _ref8.theme;
1490
+ }, function (_ref6) {
1491
+ var theme = _ref6.theme;
1469
1492
  return theme.kitt.iconButton.width;
1470
- }, function (_ref9) {
1471
- var theme = _ref9.theme;
1493
+ }, function (_ref7) {
1494
+ var theme = _ref7.theme;
1472
1495
  return theme.kitt.iconButton.height;
1473
- }, function (_ref10) {
1474
- var theme = _ref10.theme,
1475
- disabled = _ref10.disabled;
1496
+ }, function (_ref8) {
1497
+ var theme = _ref8.theme,
1498
+ disabled = _ref8.disabled;
1476
1499
  var iconButton = theme.kitt.iconButton;
1477
1500
  var transition = iconButton.transition;
1478
1501
 
@@ -1482,13 +1505,13 @@ var StyledPressableIconButton = /*#__PURE__*/styled$1(Pressable).withConfig({
1482
1505
 
1483
1506
  return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
1484
1507
  });
1485
- function PressableIconButton(_ref11) {
1486
- var color = _ref11.color,
1487
- props = _objectWithoutProperties(_ref11, _excluded$6);
1508
+ function PressableIconButton(_ref9) {
1509
+ var color = _ref9.color,
1510
+ props = _objectWithoutProperties(_ref9, _excluded$6);
1488
1511
 
1489
1512
  return /*#__PURE__*/jsx(StyleWebWrapper, {
1490
1513
  as: PressableIconButtonWebWrapper,
1491
- "data-color-white": color === 'white' ? true : undefined,
1514
+ $isWhite: color === 'white',
1492
1515
  children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$7({}, props))
1493
1516
  });
1494
1517
  }
@@ -2061,6 +2084,93 @@ function Notification(_ref) {
2061
2084
  });
2062
2085
  }
2063
2086
 
2087
+ var StyledSkeleton = withTheme( /*#__PURE__*/styled("div")({
2088
+ name: "StyledSkeleton",
2089
+ "class": "sc3upcl",
2090
+ vars: {
2091
+ "sc3upcl-0": [function (_ref) {
2092
+ var theme = _ref.theme;
2093
+ return theme.kitt.skeleton.backgroundColor;
2094
+ }],
2095
+ "sc3upcl-1": [function (_ref2) {
2096
+ var $isLoading = _ref2.$isLoading,
2097
+ theme = _ref2.theme;
2098
+ return $isLoading ? "linear-gradient(\n -90deg,\n ".concat(theme.kitt.skeleton.backgroundColor, ",\n ").concat(theme.kitt.skeleton.flareColor, " 50%,\n ").concat(theme.kitt.skeleton.backgroundColor, " 100%\n )") : 'none';
2099
+ }],
2100
+ "sc3upcl-2": [function (_ref3) {
2101
+ var $isLoading = _ref3.$isLoading;
2102
+ return $isLoading ? '1s ease-in-out infinite' : 'none';
2103
+ }]
2104
+ }
2105
+ }));
2106
+ function SkeletonContent(_ref4) {
2107
+ var isLoading = _ref4.isLoading;
2108
+ return /*#__PURE__*/jsx(StyledSkeleton, {
2109
+ $isLoading: isLoading
2110
+ });
2111
+ }
2112
+
2113
+ function Skeleton(_ref) {
2114
+ var isLoading = _ref.isLoading,
2115
+ style = _ref.style;
2116
+
2117
+ var _useState = useState(0),
2118
+ _useState2 = _slicedToArray(_useState, 2),
2119
+ width = _useState2[0],
2120
+ setWidth = _useState2[1];
2121
+
2122
+ return /*#__PURE__*/jsx(View, {
2123
+ style: style,
2124
+ onLayout: function onLayout(_ref2) {
2125
+ var nativeEvent = _ref2.nativeEvent;
2126
+ return setWidth(nativeEvent.layout.width);
2127
+ },
2128
+ children: /*#__PURE__*/jsx(SkeletonContent, {
2129
+ isLoading: isLoading,
2130
+ width: width
2131
+ })
2132
+ });
2133
+ }
2134
+ var Bar = /*#__PURE__*/styled$1(Skeleton).withConfig({
2135
+ displayName: "Skeleton__Bar",
2136
+ componentId: "kitt-universal__sc-1w5cm3i-0"
2137
+ })(["width:100%;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref3) {
2138
+ var theme = _ref3.theme;
2139
+ return theme.kitt.spacing * 2;
2140
+ }, function (_ref4) {
2141
+ var theme = _ref4.theme;
2142
+ return theme.kitt.spacing * 2;
2143
+ });
2144
+ var Circle = /*#__PURE__*/styled$1(Skeleton).withConfig({
2145
+ displayName: "Skeleton__Circle",
2146
+ componentId: "kitt-universal__sc-1w5cm3i-1"
2147
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref5) {
2148
+ var theme = _ref5.theme;
2149
+ return theme.kitt.spacing * 12;
2150
+ }, function (_ref6) {
2151
+ var theme = _ref6.theme;
2152
+ return theme.kitt.spacing * 12;
2153
+ }, function (_ref7) {
2154
+ var theme = _ref7.theme;
2155
+ return theme.kitt.spacing * 6;
2156
+ });
2157
+ var Square = /*#__PURE__*/styled$1(Skeleton).withConfig({
2158
+ displayName: "Skeleton__Square",
2159
+ componentId: "kitt-universal__sc-1w5cm3i-2"
2160
+ })(["width:", "px;height:", "px;border-radius:", "px;overflow:hidden;"], function (_ref8) {
2161
+ var theme = _ref8.theme;
2162
+ return theme.kitt.spacing * 12;
2163
+ }, function (_ref9) {
2164
+ var theme = _ref9.theme;
2165
+ return theme.kitt.spacing * 12;
2166
+ }, function (_ref10) {
2167
+ var theme = _ref10.theme;
2168
+ return theme.kitt.spacing * 1.5;
2169
+ });
2170
+ Skeleton.Bar = Bar;
2171
+ Skeleton.Circle = Circle;
2172
+ Skeleton.Square = Square;
2173
+
2064
2174
  var Flex = /*#__PURE__*/styled$1(View).withConfig({
2065
2175
  shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
2066
2176
  return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
@@ -2504,17 +2614,6 @@ var lateOceanColorPalette = {
2504
2614
  moonPurpleLight1: '#EDEBFC'
2505
2615
  };
2506
2616
 
2507
- var avatarLateOceanTheme = {
2508
- "default": {
2509
- color: lateOceanColorPalette.white,
2510
- backgroundColor: lateOceanColorPalette.lateOcean
2511
- },
2512
- light: {
2513
- color: lateOceanColorPalette.black1000,
2514
- backgroundColor: lateOceanColorPalette.black100
2515
- }
2516
- };
2517
-
2518
2617
  var colorsLateOceanTheme = {
2519
2618
  primary: lateOceanColorPalette.lateOcean,
2520
2619
  primaryLight: lateOceanColorPalette.lateOceanLight1,
@@ -2537,6 +2636,16 @@ var colorsLateOceanTheme = {
2537
2636
  }
2538
2637
  };
2539
2638
 
2639
+ var avatar = {
2640
+ borderRadius: '10px',
2641
+ "default": {
2642
+ backgroundColor: colorsLateOceanTheme.primary
2643
+ },
2644
+ light: {
2645
+ backgroundColor: lateOceanColorPalette.black100
2646
+ }
2647
+ };
2648
+
2540
2649
  var buttonLateOceanTheme = {
2541
2650
  borderRadius: '30px',
2542
2651
  borderWidth: {
@@ -2763,6 +2872,12 @@ var shadowsLateOceanTheme = {
2763
2872
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
2764
2873
  };
2765
2874
 
2875
+ var skeletonTheme = {
2876
+ backgroundColor: lateOceanColorPalette.black100,
2877
+ flareColor: lateOceanColorPalette.black200,
2878
+ animationDuration: 1000
2879
+ };
2880
+
2766
2881
  var tagLateOceanTheme = {
2767
2882
  borderRadius: '10px',
2768
2883
  padding: '2px 12px',
@@ -2816,20 +2931,18 @@ var tooltip = {
2816
2931
  var calcLineHeight = function (fontSize, lineHeightMultiplier) {
2817
2932
  return Math.round(fontSize * lineHeightMultiplier);
2818
2933
  };
2819
-
2820
2934
  var createTypographyTypeConfig = function (lineHeightMultiplier, baseAndSmallFontSize, mediumAndWideFontSize) {
2821
2935
  return {
2822
2936
  baseAndSmall: {
2823
2937
  fontSize: "".concat(baseAndSmallFontSize, "px"),
2824
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
2938
+ lineHeight: "".concat(calcLineHeight(baseAndSmallFontSize, lineHeightMultiplier), "px")
2825
2939
  },
2826
2940
  mediumAndWide: {
2827
2941
  fontSize: "".concat(mediumAndWideFontSize, "px"),
2828
- lineHeight: "".concat(calcLineHeight(lineHeightMultiplier, baseAndSmallFontSize), "px")
2942
+ lineHeight: "".concat(calcLineHeight(mediumAndWideFontSize, lineHeightMultiplier), "px")
2829
2943
  }
2830
2944
  };
2831
2945
  };
2832
-
2833
2946
  var typographyLateOceanTheme = {
2834
2947
  colors: {
2835
2948
  black: lateOceanColorPalette.black1000,
@@ -2911,7 +3024,7 @@ var breakpoints = {
2911
3024
  wideBreakpoint: 'max-width: 1279px'
2912
3025
  }
2913
3026
  }; // eslint-disable-next-line unicorn/expiring-todo-comments
2914
- // TODO : seperate brand co lor usage definition from proper theme definition and add t ypings - https://ornikar.atlassian.net/browse/CME-156
3027
+ // TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
2915
3028
 
2916
3029
  var theme = {
2917
3030
  spacing: 4,
@@ -2919,7 +3032,7 @@ var theme = {
2919
3032
  palettes: {
2920
3033
  lateOcean: lateOceanColorPalette
2921
3034
  },
2922
- avatar: avatarLateOceanTheme,
3035
+ avatar: avatar,
2923
3036
  button: buttonLateOceanTheme,
2924
3037
  card: cardLateOceanTheme,
2925
3038
  feedbackMessage: feedbackMessageLateOceanTheme,
@@ -2930,7 +3043,9 @@ var theme = {
2930
3043
  fullScreenModal: fullScreenModalLateOceanTheme,
2931
3044
  iconButton: iconButton,
2932
3045
  listItem: listItemLateOceanTheme,
2933
- tooltip: tooltip
3046
+ tooltip: tooltip,
3047
+ skeleton: skeletonTheme,
3048
+ breakpoints: breakpoints
2934
3049
  };
2935
3050
 
2936
3051
  function TimePicker() {
@@ -3196,40 +3311,46 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
3196
3311
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3197
3312
  var TypographyLinkWebWrapper = withTheme( /*#__PURE__*/styled("span")({
3198
3313
  name: "TypographyLinkWebWrapper",
3199
- "class": "tcwz3nt"
3314
+ "class": "tcwz3nt",
3315
+ vars: {
3316
+ "tcwz3nt-0": [function (_ref) {
3317
+ var $hasNoUnderline = _ref.$hasNoUnderline;
3318
+ return $hasNoUnderline ? 'underline' : 'none';
3319
+ }]
3320
+ }
3200
3321
  }));
3201
3322
  var StyledLink = /*#__PURE__*/styled$1(Text$1).withConfig({
3202
3323
  displayName: "TypographyLink__StyledLink",
3203
3324
  componentId: "kitt-universal__sc-1o1zy30-0"
3204
- })(["text-decoration:", ";", ";", ";"], function (_ref) {
3205
- var $noUnderline = _ref.$noUnderline;
3206
- return $noUnderline ? 'none' : 'underline';
3207
- }, function (_ref2) {
3208
- var $disabled = _ref2.$disabled;
3209
- return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
3325
+ })(["text-decoration:", ";", ";", ";"], function (_ref2) {
3326
+ var $hasNoUnderline = _ref2.$hasNoUnderline;
3327
+ return $hasNoUnderline ? 'none' : 'underline';
3210
3328
  }, function (_ref3) {
3211
- var $disabled = _ref3.$disabled,
3212
- theme = _ref3.theme;
3329
+ var $disabled = _ref3.$disabled;
3330
+ return "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat($disabled ? 'not-allowed' : 'pointer', ";\n ");
3331
+ }, function (_ref4) {
3332
+ var $disabled = _ref4.$disabled,
3333
+ theme = _ref4.theme;
3213
3334
  if (!$disabled) return undefined;
3214
3335
  return "color: ".concat(theme.kitt.typography.link.disabledColor, ";");
3215
3336
  });
3216
- function TypographyLink(_ref4) {
3217
- var children = _ref4.children,
3218
- disabled = _ref4.disabled,
3219
- noUnderline = _ref4.noUnderline,
3220
- href = _ref4.href,
3221
- hrefAttrs = _ref4.hrefAttrs,
3222
- onPress = _ref4.onPress,
3223
- otherProps = _objectWithoutProperties(_ref4, _excluded$1);
3337
+ function TypographyLink(_ref5) {
3338
+ var children = _ref5.children,
3339
+ disabled = _ref5.disabled,
3340
+ noUnderline = _ref5.noUnderline,
3341
+ href = _ref5.href,
3342
+ hrefAttrs = _ref5.hrefAttrs,
3343
+ onPress = _ref5.onPress,
3344
+ otherProps = _objectWithoutProperties(_ref5, _excluded$1);
3224
3345
 
3225
3346
  return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, otherProps), {}, {
3226
3347
  accessibilityRole: "none",
3227
3348
  children: /*#__PURE__*/jsx(StyleWebWrapper, {
3228
3349
  as: TypographyLinkWebWrapper,
3229
- "data-nounderline": noUnderline ? true : undefined,
3350
+ $hasNoUnderline: noUnderline,
3230
3351
  children: /*#__PURE__*/jsx(StyledLink, {
3231
3352
  $disabled: disabled,
3232
- $noUnderline: noUnderline,
3353
+ $hasNoUnderline: noUnderline,
3233
3354
  href: href,
3234
3355
  hrefAttrs: hrefAttrs,
3235
3356
  accessibilityRole: "link",
@@ -3312,12 +3433,19 @@ function useKittTheme() {
3312
3433
  return useMemo(function () {
3313
3434
  return {
3314
3435
  kitt: theme,
3315
- responsive: createWindowSizeHelper(dimensions),
3316
- breakpoints: breakpoints
3436
+ responsive: createWindowSizeHelper(dimensions)
3317
3437
  };
3318
3438
  }, [dimensions]);
3319
3439
  }
3320
3440
 
3441
+ var hex2rgba = function (hex) {
3442
+ var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
3443
+ var r = parseInt(hex.slice(1, 3), 16);
3444
+ var g = parseInt(hex.slice(3, 5), 16);
3445
+ var b = parseInt(hex.slice(5, 7), 16);
3446
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
3447
+ };
3448
+
3321
3449
  function KittThemeProvider(_ref) {
3322
3450
  var children = _ref.children;
3323
3451
  var theme = useKittTheme();
@@ -3350,5 +3478,5 @@ function MatchWindowSize(_ref) {
3350
3478
  });
3351
3479
  }
3352
3480
 
3353
- export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor };
3481
+ export { Avatar, Button, Card, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputFeedback, InputField, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
3354
3482
  //# sourceMappingURL=index-browser-all.es.web.js.map