@ornikar/kitt-universal 6.1.0 → 7.0.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 (62) hide show
  1. package/dist/definitions/Avatar/Avatar.d.ts +5 -4
  2. package/dist/definitions/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/definitions/Icon/Icon.d.ts +1 -1
  4. package/dist/definitions/Icon/Icon.d.ts.map +1 -1
  5. package/dist/definitions/Icon/SpinningIcon.d.ts +4 -3
  6. package/dist/definitions/Icon/SpinningIcon.d.ts.map +1 -1
  7. package/dist/definitions/Icon/SpinningIcon.web.d.ts +1 -1
  8. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  9. package/dist/definitions/LoaderIcon/LoaderIcon.d.ts +7 -0
  10. package/dist/definitions/LoaderIcon/LoaderIcon.d.ts.map +1 -0
  11. package/dist/definitions/Overlay/Overlay.d.ts +4 -3
  12. package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
  13. package/dist/definitions/PageLoader/PageLoader.d.ts +4 -0
  14. package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -0
  15. package/dist/definitions/PageLoader/PageLoader.web.d.ts +3 -0
  16. package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -0
  17. package/dist/definitions/index.d.ts +5 -6
  18. package/dist/definitions/index.d.ts.map +1 -1
  19. package/dist/definitions/themes/default.d.ts +37 -36
  20. package/dist/definitions/themes/default.d.ts.map +1 -1
  21. package/dist/definitions/themes/late-ocean/avatar.d.ts +7 -3
  22. package/dist/definitions/themes/late-ocean/avatar.d.ts.map +1 -1
  23. package/dist/definitions/themes/late-ocean/pageLoader.d.ts +5 -0
  24. package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -0
  25. package/dist/index-browser-all.es.android.js +102 -133
  26. package/dist/index-browser-all.es.android.js.map +1 -1
  27. package/dist/index-browser-all.es.ios.js +102 -133
  28. package/dist/index-browser-all.es.ios.js.map +1 -1
  29. package/dist/index-browser-all.es.js +102 -133
  30. package/dist/index-browser-all.es.js.map +1 -1
  31. package/dist/index-browser-all.es.web.js +109 -142
  32. package/dist/index-browser-all.es.web.js.map +1 -1
  33. package/dist/index-node-14.17.cjs.js +62 -88
  34. package/dist/index-node-14.17.cjs.js.map +1 -1
  35. package/dist/index-node-14.17.cjs.web.css +1 -1
  36. package/dist/index-node-14.17.cjs.web.js +77 -104
  37. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  38. package/dist/linaria-themes-browser-all.es.android.js +13 -5
  39. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  40. package/dist/linaria-themes-browser-all.es.ios.js +13 -5
  41. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  42. package/dist/linaria-themes-browser-all.es.js +13 -5
  43. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  44. package/dist/linaria-themes-browser-all.es.web.js +13 -5
  45. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  46. package/dist/linaria-themes-node-14.17.cjs.js +13 -5
  47. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  48. package/dist/linaria-themes-node-14.17.cjs.web.js +13 -5
  49. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  50. package/dist/styles.css +1 -1
  51. package/dist/tsbuildinfo +1 -1
  52. package/package.json +4 -4
  53. package/dist/definitions/Loader/LargeLoader.d.ts +0 -7
  54. package/dist/definitions/Loader/LargeLoader.d.ts.map +0 -1
  55. package/dist/definitions/Loader/LargeLoader.web.d.ts +0 -3
  56. package/dist/definitions/Loader/LargeLoader.web.d.ts.map +0 -1
  57. package/dist/definitions/Loader/Loader.d.ts +0 -8
  58. package/dist/definitions/Loader/Loader.d.ts.map +0 -1
  59. package/dist/definitions/Loader/Loader.web.d.ts +0 -8
  60. package/dist/definitions/Loader/Loader.web.d.ts.map +0 -1
  61. package/dist/definitions/typography/TypographySpinningIcon.d.ts +0 -9
  62. package/dist/definitions/typography/TypographySpinningIcon.d.ts.map +0 -1
@@ -290,10 +290,11 @@ const StyledAvatarView = /*#__PURE__*/styled__default.View.withConfig({
290
290
  })(["border-radius:", ";background-color:", ";height:", "px;width:", "px;overflow:hidden;align-items:center;justify-content:center;"], ({
291
291
  theme,
292
292
  $isRound,
293
- $size
293
+ $size,
294
+ $sizeVariant
294
295
  }) => {
295
296
  if ($isRound) return `${$size / 2}px`;
296
- return `${theme.kitt.avatar.borderRadius}px`;
297
+ return `${$sizeVariant === 'large' ? theme.kitt.avatar.large.borderRadius : theme.kitt.avatar.borderRadius}px`;
297
298
  }, ({
298
299
  theme,
299
300
  $isLight
@@ -309,8 +310,8 @@ function AvatarContent({
309
310
  firstname,
310
311
  lastname,
311
312
  alt,
312
- base,
313
- isLight
313
+ isLight,
314
+ sizeVariant
314
315
  }) {
315
316
  if (src) {
316
317
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
@@ -327,8 +328,8 @@ function AvatarContent({
327
328
 
328
329
  if (firstname && lastname) {
329
330
  return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
330
- base: base,
331
- variant: "bold",
331
+ base: sizeVariant === 'large' ? 'body-large' : 'body',
332
+ variant: sizeVariant === 'large' ? 'bold' : 'regular',
332
333
  color: isLight ? 'black' : 'white',
333
334
  children: getInitials(firstname, lastname)
334
335
  });
@@ -343,19 +344,20 @@ function AvatarContent({
343
344
 
344
345
  function Avatar({
345
346
  size = 40,
346
- base = 'body-small',
347
347
  round,
348
348
  light,
349
+ sizeVariant,
349
350
  ...props
350
351
  }) {
351
352
  return /*#__PURE__*/jsxRuntime.jsx(StyledAvatarView, {
352
353
  $size: size,
353
354
  $isRound: round,
354
355
  $isLight: light,
356
+ $sizeVariant: sizeVariant,
355
357
  children: /*#__PURE__*/jsxRuntime.jsx(AvatarContent, {
356
358
  size: size,
357
- base: base,
358
359
  isLight: light,
360
+ sizeVariant: sizeVariant,
359
361
  ...props
360
362
  })
361
363
  });
@@ -938,6 +940,9 @@ const avatar = {
938
940
  },
939
941
  light: {
940
942
  backgroundColor: lateOceanColorPalette.black100
943
+ },
944
+ large: {
945
+ borderRadius: 30
941
946
  }
942
947
  };
943
948
 
@@ -1325,6 +1330,10 @@ const listItem = {
1325
1330
  innerMargin: 8
1326
1331
  };
1327
1332
 
1333
+ const pageLoader = {
1334
+ size: 60
1335
+ };
1336
+
1328
1337
  const shadows = {
1329
1338
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
1330
1339
  };
@@ -1415,19 +1424,20 @@ const theme = {
1415
1424
  lateOcean: lateOceanColorPalette
1416
1425
  },
1417
1426
  avatar,
1427
+ breakpoints,
1418
1428
  button,
1419
1429
  card,
1420
1430
  feedbackMessage,
1421
1431
  forms,
1422
- typography,
1423
- tag,
1424
- shadows,
1425
1432
  fullScreenModal,
1426
1433
  iconButton,
1427
1434
  listItem,
1428
- tooltip,
1435
+ pageLoader,
1436
+ shadows,
1429
1437
  skeleton,
1430
- breakpoints
1438
+ tag,
1439
+ tooltip,
1440
+ typography
1431
1441
  };
1432
1442
 
1433
1443
  function matchWindowSize({
@@ -1765,12 +1775,13 @@ const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).wit
1765
1775
  backgroundColor: theme.kitt.colors.overlay.dark
1766
1776
  }));
1767
1777
  function Overlay({
1768
- onPress
1778
+ onPress,
1779
+ children
1769
1780
  }) {
1770
1781
  return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
1771
1782
  accessibilityRole: "none",
1772
1783
  onPress: onPress,
1773
- children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {})
1784
+ children: children
1774
1785
  });
1775
1786
  }
1776
1787
 
@@ -2878,10 +2889,12 @@ FullScreenModal.Body = FullScreenModalBody;
2878
2889
 
2879
2890
  function SpinningIcon({
2880
2891
  icon,
2881
- size = defaultIconSize,
2882
- align,
2883
2892
  color
2884
2893
  }) {
2894
+ if (process.env.NODE_ENV !== 'production' && !color) {
2895
+ throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
2896
+ }
2897
+
2885
2898
  const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
2886
2899
  color
2887
2900
  });
@@ -2905,18 +2918,13 @@ function SpinningIcon({
2905
2918
  return undefined;
2906
2919
  };
2907
2920
  }, []);
2908
- return /*#__PURE__*/jsxRuntime.jsx(IconContainer$1, {
2909
- $align: align,
2910
- $size: size,
2911
- $color: color,
2912
- children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
2913
- style: {
2914
- transform: [{
2915
- rotate: rotation
2916
- }]
2917
- },
2918
- children: clonedIcon
2919
- })
2921
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
2922
+ style: {
2923
+ transform: [{
2924
+ rotate: rotation
2925
+ }]
2926
+ },
2927
+ children: clonedIcon
2920
2928
  });
2921
2929
  }
2922
2930
 
@@ -3042,31 +3050,12 @@ ListItem.Content = ListItemContent;
3042
3050
  ListItem.SideContent = ListItemSideContent;
3043
3051
  ListItem.SideContainer = ListItemSideContainer;
3044
3052
 
3045
- function getActivityIndicatorSize(size) {
3046
- if (reactNative.Platform.OS === 'android') return size;
3047
- return size < 36 ? 'small' : 'large';
3048
- }
3049
-
3050
- const defaultLoaderSize = defaultIconSize;
3051
- function Loader({
3052
- color = 'primary',
3053
- size = defaultLoaderSize
3054
- }) {
3055
- const theme = /*#__PURE__*/styled.useTheme();
3056
- const colorHex = theme.kitt.typography.colors[color];
3057
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
3058
- testID: "ActivityIndicator",
3059
- color: colorHex,
3060
- size: getActivityIndicatorSize(size)
3061
- });
3062
- }
3063
-
3064
- function LargeLoader({
3065
- color = 'primary'
3053
+ function LoaderIcon({
3054
+ color
3066
3055
  }) {
3067
- return /*#__PURE__*/jsxRuntime.jsx(Loader, {
3056
+ return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, {
3068
3057
  color: color,
3069
- size: 60
3058
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.ArcIcon, {})
3070
3059
  });
3071
3060
  }
3072
3061
 
@@ -3253,6 +3242,24 @@ function Notification({
3253
3242
  });
3254
3243
  }
3255
3244
 
3245
+ function getActivityIndicatorSize(size) {
3246
+ if (reactNative.Platform.OS === 'android') return size;
3247
+ return size < 36 ? 'small' : 'large';
3248
+ }
3249
+
3250
+ function PageLoader() {
3251
+ const theme = /*#__PURE__*/styled.useTheme();
3252
+ const {
3253
+ size
3254
+ } = theme.kitt.pageLoader;
3255
+ const colorHex = theme.kitt.typography.colors.primary;
3256
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.ActivityIndicator, {
3257
+ testID: "ActivityIndicator",
3258
+ color: colorHex,
3259
+ size: getActivityIndicatorSize(size)
3260
+ });
3261
+ }
3262
+
3256
3263
  const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
3257
3264
  displayName: "SkeletonContent__Container",
3258
3265
  componentId: "kitt-universal__sc-1u3chjb-0"
@@ -4167,39 +4174,6 @@ function TypographyLink({
4167
4174
  });
4168
4175
  }
4169
4176
 
4170
- function TypographySpinningIconSpecifiedColor({
4171
- color,
4172
- ...props
4173
- }) {
4174
- const theme = /*#__PURE__*/styled.useTheme();
4175
- return /*#__PURE__*/jsxRuntime.jsx(SpinningIcon, { ...props,
4176
- color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
4177
- });
4178
- }
4179
-
4180
- function TypographySpinningIconInheritColor(props) {
4181
- const color = useTypographyColor();
4182
- return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
4183
- color: color,
4184
- ...props
4185
- });
4186
- }
4187
-
4188
- function TypographySpinningIcon({
4189
- color,
4190
- ...props
4191
- }) {
4192
- if (color) {
4193
- return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconSpecifiedColor, {
4194
- color: color,
4195
- ...props
4196
- });
4197
- }
4198
-
4199
- return /*#__PURE__*/jsxRuntime.jsx(TypographySpinningIconInheritColor, { ...props
4200
- });
4201
- }
4202
-
4203
4177
  const hex2rgba = (hex, alpha = 1) => {
4204
4178
  const r = parseInt(hex.slice(1, 3), 16);
4205
4179
  const g = parseInt(hex.slice(3, 5), 16);
@@ -4264,13 +4238,14 @@ exports.KittBreakpointsMax = KittBreakpointsMax;
4264
4238
  exports.KittThemeDecorator = KittThemeDecorator;
4265
4239
  exports.KittThemeProvider = KittThemeProvider;
4266
4240
  exports.Label = Label;
4267
- exports.LargeLoader = LargeLoader;
4268
4241
  exports.ListItem = ListItem;
4269
- exports.Loader = Loader;
4242
+ exports.LoaderIcon = LoaderIcon;
4270
4243
  exports.MatchWindowSize = MatchWindowSize;
4271
4244
  exports.Message = Message;
4272
4245
  exports.Modal = Modal;
4273
4246
  exports.Notification = Notification;
4247
+ exports.Overlay = Overlay;
4248
+ exports.PageLoader = PageLoader;
4274
4249
  exports.Radio = Radio;
4275
4250
  exports.Section = DeprecatedSection;
4276
4251
  exports.Skeleton = Skeleton;
@@ -4291,7 +4266,6 @@ exports.Typography = Typography;
4291
4266
  exports.TypographyEmoji = TypographyEmoji;
4292
4267
  exports.TypographyIcon = TypographyIcon;
4293
4268
  exports.TypographyLink = TypographyLink;
4294
- exports.TypographySpinningIcon = TypographySpinningIcon;
4295
4269
  exports.createWindowSizeHelper = createWindowSizeHelper;
4296
4270
  exports.hex2rgba = hex2rgba;
4297
4271
  exports.matchWindowSize = matchWindowSize;