@ornikar/kitt-universal 23.2.5 → 23.3.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 (44) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/definitions/Tag/Tag.d.ts +10 -6
  3. package/dist/definitions/Tag/Tag.d.ts.map +1 -1
  4. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +46 -81
  5. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  6. package/dist/definitions/themes/late-ocean/input.d.ts +1 -1
  7. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
  8. package/dist/definitions/themes/late-ocean/tag.d.ts +22 -14
  9. package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
  10. package/dist/definitions/typography/Typography.d.ts +11 -11
  11. package/dist/index-metro.es.android.js +157 -160
  12. package/dist/index-metro.es.android.js.map +1 -1
  13. package/dist/index-metro.es.ios.js +157 -160
  14. package/dist/index-metro.es.ios.js.map +1 -1
  15. package/dist/index-node-20.10.cjs.js +157 -160
  16. package/dist/index-node-20.10.cjs.js.map +1 -1
  17. package/dist/index-node-20.10.cjs.web.js +157 -160
  18. package/dist/index-node-20.10.cjs.web.js.map +1 -1
  19. package/dist/index-node-20.10.es.mjs +157 -160
  20. package/dist/index-node-20.10.es.mjs.map +1 -1
  21. package/dist/index-node-20.10.es.web.mjs +157 -160
  22. package/dist/index-node-20.10.es.web.mjs.map +1 -1
  23. package/dist/index.es.js +158 -161
  24. package/dist/index.es.js.map +1 -1
  25. package/dist/index.es.web.js +158 -161
  26. package/dist/index.es.web.js.map +1 -1
  27. package/dist/linaria-themes-metro.es.android.js +40 -46
  28. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  29. package/dist/linaria-themes-metro.es.ios.js +40 -46
  30. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  31. package/dist/linaria-themes-node-20.10.cjs.js +40 -46
  32. package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
  33. package/dist/linaria-themes-node-20.10.cjs.web.js +40 -46
  34. package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
  35. package/dist/linaria-themes-node-20.10.es.mjs +40 -46
  36. package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
  37. package/dist/linaria-themes-node-20.10.es.web.mjs +40 -46
  38. package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
  39. package/dist/linaria-themes.es.js +40 -46
  40. package/dist/linaria-themes.es.js.map +1 -1
  41. package/dist/linaria-themes.es.web.js +40 -46
  42. package/dist/linaria-themes.es.web.js.map +1 -1
  43. package/dist/tsbuildinfo +1 -1
  44. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -1023,7 +1023,7 @@ var webAnimationDuration = '200ms';
1023
1023
  var webAnimationTimingFunction = 'ease-in-out';
1024
1024
  var webAnimationProperties = ['border-color', 'background-color'];
1025
1025
  var input = {
1026
- minHeight: 40,
1026
+ height: 40,
1027
1027
  color: {
1028
1028
  selection: lateOceanColorPalette['violine.9'],
1029
1029
  placeholder: lateOceanColorPalette['eggshell.9']
@@ -1038,7 +1038,7 @@ var input = {
1038
1038
  },
1039
1039
  padding: {
1040
1040
  horizontal: 16,
1041
- vertical: 0
1041
+ vertical: 6
1042
1042
  },
1043
1043
  transition: {
1044
1044
  properties: webAnimationProperties,
@@ -1659,57 +1659,51 @@ var skeleton = {
1659
1659
  };
1660
1660
 
1661
1661
  var tag = {
1662
- borderRadius: 10,
1663
- padding: '2px 12px',
1664
- verticalPadding: 2,
1665
- horizontalPadding: 12,
1666
- primary: {
1667
- fill: {
1668
- backgroundColor: lateOceanColorPalette.moonPurpleLight1,
1669
- borderWidth: 0,
1670
- borderColor: colors.transparent
1671
- },
1672
- outline: {
1673
- backgroundColor: colors.transparent,
1674
- borderWidth: 1,
1675
- borderColor: colors.primary
1676
- }
1662
+ borderRadius: 16,
1663
+ icon: {
1664
+ small: 16,
1665
+ medium: 16,
1666
+ large: 20
1677
1667
  },
1678
- "default": {
1679
- fill: {
1680
- backgroundColor: lateOceanColorPalette.black50,
1681
- borderWidth: 0,
1682
- borderColor: colors.transparent
1668
+ withIcon: {
1669
+ small: {
1670
+ paddingLeft: 2,
1671
+ paddingRight: 8,
1672
+ height: 20
1683
1673
  },
1684
- outline: {
1685
- backgroundColor: colors.transparent,
1686
- borderWidth: 1,
1687
- borderColor: colors.black
1688
- }
1689
- },
1690
- danger: {
1691
- fill: {
1692
- backgroundColor: colors.danger,
1693
- borderWidth: 0,
1694
- borderColor: colors.transparent
1674
+ medium: {
1675
+ paddingLeft: 4,
1676
+ paddingRight: 8,
1677
+ height: 24
1695
1678
  },
1696
- outline: {
1697
- backgroundColor: colors.transparent,
1698
- borderWidth: 1,
1699
- borderColor: colors.danger
1679
+ large: {
1680
+ paddingLeft: 6,
1681
+ paddingRight: 8,
1682
+ height: 32
1700
1683
  }
1701
1684
  },
1702
- warn: {
1703
- fill: {
1704
- backgroundColor: colors.warning,
1705
- borderWidth: 0,
1706
- borderColor: colors.transparent
1685
+ withoutIcon: {
1686
+ small: {
1687
+ paddingLeft: 8,
1688
+ paddingRight: 8,
1689
+ height: 20
1707
1690
  },
1708
- outline: {
1709
- backgroundColor: colors.transparent,
1710
- borderWidth: 1,
1711
- borderColor: colors.warning
1691
+ medium: {
1692
+ paddingLeft: 8,
1693
+ paddingRight: 8,
1694
+ height: 22
1695
+ },
1696
+ large: {
1697
+ paddingLeft: 8,
1698
+ paddingRight: 8,
1699
+ height: 28
1712
1700
  }
1701
+ },
1702
+ fill: {
1703
+ borderWidth: 0
1704
+ },
1705
+ outline: {
1706
+ borderWidth: 1
1713
1707
  }
1714
1708
  };
1715
1709
 
@@ -7927,48 +7921,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7927
7921
  }
7928
7922
  }
7929
7923
  },
7930
- tag: {
7931
- primary: {
7932
- fill: {
7933
- backgroundColor: theme.tag.primary.fill.backgroundColor,
7934
- borderColor: theme.tag.primary.fill.borderColor
7935
- },
7936
- outline: {
7937
- backgroundColor: theme.tag.primary.outline.backgroundColor,
7938
- borderColor: theme.tag.primary.outline.borderColor
7939
- }
7940
- },
7941
- "default": {
7942
- fill: {
7943
- backgroundColor: theme.tag["default"].fill.backgroundColor,
7944
- borderColor: theme.tag["default"].fill.borderColor
7945
- },
7946
- outline: {
7947
- backgroundColor: theme.tag["default"].outline.backgroundColor,
7948
- borderColor: theme.tag["default"].outline.borderColor
7949
- }
7950
- },
7951
- danger: {
7952
- fill: {
7953
- backgroundColor: theme.tag.danger.fill.backgroundColor,
7954
- borderColor: theme.tag.danger.fill.borderColor
7955
- },
7956
- outline: {
7957
- backgroundColor: theme.tag.danger.outline.backgroundColor,
7958
- borderColor: theme.tag.danger.outline.borderColor
7959
- }
7960
- },
7961
- warn: {
7962
- fill: {
7963
- backgroundColor: theme.tag.warn.fill.backgroundColor,
7964
- borderColor: theme.tag.warn.fill.borderColor
7965
- },
7966
- outline: {
7967
- backgroundColor: theme.tag.warn.outline.backgroundColor,
7968
- borderColor: theme.tag.warn.outline.borderColor
7969
- }
7970
- }
7971
- },
7972
7924
  tooltip: {
7973
7925
  backgroundColor: theme.tooltip.backgroundColor
7974
7926
  },
@@ -8456,37 +8408,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8456
8408
  borderWidth: theme.listItem.borderWidth
8457
8409
  },
8458
8410
  tag: {
8459
- primary: {
8460
- fill: {
8461
- borderWidth: theme.tag.primary.fill.borderWidth
8462
- },
8463
- outline: {
8464
- borderWidth: theme.tag.primary.outline.borderWidth
8465
- }
8411
+ fill: {
8412
+ borderWidth: theme.tag.fill.borderWidth
8466
8413
  },
8467
- "default": {
8468
- fill: {
8469
- borderWidth: theme.tag["default"].fill.borderWidth
8470
- },
8471
- outline: {
8472
- borderWidth: theme.tag["default"].outline.borderWidth
8473
- }
8474
- },
8475
- danger: {
8476
- fill: {
8477
- borderWidth: theme.tag.danger.fill.borderWidth
8478
- },
8479
- outline: {
8480
- borderWidth: theme.tag.danger.outline.borderWidth
8481
- }
8482
- },
8483
- warn: {
8484
- fill: {
8485
- borderWidth: theme.tag.warn.fill.borderWidth
8486
- },
8487
- outline: {
8488
- borderWidth: theme.tag.warn.outline.borderWidth
8489
- }
8414
+ outline: {
8415
+ borderWidth: theme.tag.outline.borderWidth
8490
8416
  }
8491
8417
  }
8492
8418
  },
@@ -8530,7 +8456,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8530
8456
  }
8531
8457
  },
8532
8458
  datePicker: {
8533
- minHeight: theme.forms.input.minHeight,
8459
+ height: theme.forms.input.height,
8534
8460
  day: {
8535
8461
  minWidth: theme.forms.datePicker.day.minWidth
8536
8462
  },
@@ -8542,7 +8468,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8542
8468
  }
8543
8469
  },
8544
8470
  input: {
8545
- minHeight: theme.forms.input.minHeight
8471
+ height: theme.forms.input.height
8546
8472
  },
8547
8473
  radioButtonGroup: {
8548
8474
  item: {
@@ -8581,6 +8507,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8581
8507
  pageLoader: {
8582
8508
  size: theme.pageLoader.size
8583
8509
  },
8510
+ tag: {
8511
+ small: {
8512
+ iconSize: theme.tag.icon.small
8513
+ },
8514
+ medium: {
8515
+ iconSize: theme.tag.icon.medium
8516
+ },
8517
+ large: {
8518
+ iconSize: theme.tag.icon.large
8519
+ },
8520
+ withIcon: {
8521
+ small: {
8522
+ height: theme.tag.withIcon.small.height
8523
+ },
8524
+ medium: {
8525
+ height: theme.tag.withIcon.medium.height
8526
+ },
8527
+ large: {
8528
+ height: theme.tag.withIcon.large.height
8529
+ }
8530
+ },
8531
+ withoutIcon: {
8532
+ small: {
8533
+ height: theme.tag.withoutIcon.small.height
8534
+ },
8535
+ medium: {
8536
+ height: theme.tag.withoutIcon.medium.height
8537
+ },
8538
+ large: {
8539
+ height: theme.tag.withoutIcon.large.height
8540
+ }
8541
+ }
8542
+ },
8584
8543
  tooltip: {
8585
8544
  maxWidth: theme.tooltip.maxWidth,
8586
8545
  arrow: {
@@ -8670,8 +8629,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8670
8629
  horizontalPadding: theme.listItem.horizontalPadding
8671
8630
  },
8672
8631
  tag: {
8673
- verticalPadding: theme.tag.verticalPadding,
8674
- horizontalPadding: theme.tag.horizontalPadding
8632
+ withoutIcon: {
8633
+ small: {
8634
+ paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
8635
+ paddingRight: theme.tag.withoutIcon.small.paddingRight
8636
+ },
8637
+ medium: {
8638
+ paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
8639
+ paddingRight: theme.tag.withoutIcon.medium.paddingRight
8640
+ },
8641
+ large: {
8642
+ paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
8643
+ paddingRight: theme.tag.withoutIcon.large.paddingRight
8644
+ }
8645
+ },
8646
+ withIcon: {
8647
+ small: {
8648
+ paddingLeft: theme.tag.withIcon.small.paddingLeft,
8649
+ paddingRight: theme.tag.withIcon.small.paddingRight
8650
+ },
8651
+ medium: {
8652
+ paddingLeft: theme.tag.withIcon.medium.paddingLeft,
8653
+ paddingRight: theme.tag.withIcon.medium.paddingRight
8654
+ },
8655
+ large: {
8656
+ paddingLeft: theme.tag.withIcon.large.paddingLeft,
8657
+ paddingRight: theme.tag.withIcon.large.paddingRight
8658
+ }
8659
+ }
8675
8660
  },
8676
8661
  tooltip: {
8677
8662
  horizontalPadding: theme.tooltip.horizontalPadding,
@@ -9335,7 +9320,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
9335
9320
  Input: {
9336
9321
  baseStyle: {
9337
9322
  width: '100%',
9338
- minHeight: theme.forms.input.minHeight,
9323
+ height: theme.forms.input.height,
9339
9324
  py: theme.forms.input.padding.vertical,
9340
9325
  px: theme.forms.input.padding.horizontal,
9341
9326
  borderRadius: theme.forms.input.borderRadius,
@@ -10647,49 +10632,69 @@ var StoryGrid = {
10647
10632
  Col: StoryGridCol
10648
10633
  };
10649
10634
 
10650
- var getLabelColor = function (type, variant) {
10635
+ function useKittTheme() {
10636
+ return useMemo(function () {
10637
+ return {
10638
+ kitt: theme
10639
+ };
10640
+ }, []);
10641
+ }
10642
+
10643
+ var getTypography = function (size) {
10644
+ switch (size) {
10645
+ case 'small':
10646
+ return 'body-xs';
10647
+ case 'medium':
10648
+ return 'body-s';
10649
+ case 'large':
10650
+ default:
10651
+ return 'body-m';
10652
+ }
10653
+ };
10654
+ var typeToColor = function (color, type) {
10655
+ if (color) return color;
10651
10656
  switch (type) {
10652
- case 'danger':
10653
- {
10654
- return variant === 'outline' ? 'danger' : 'black';
10655
- }
10656
- case 'warn':
10657
- {
10658
- return variant === 'outline' ? 'warning' : 'black';
10659
- }
10660
10657
  case 'primary':
10661
- {
10662
- return 'primary';
10663
- }
10658
+ return 'violine';
10659
+ case 'warn':
10660
+ return 'sun';
10661
+ case 'danger':
10662
+ return 'coral';
10664
10663
  case 'default':
10665
- {
10666
- return 'black';
10667
- }
10668
10664
  default:
10669
- {
10670
- return 'black';
10671
- }
10665
+ return 'eggshell';
10672
10666
  }
10673
10667
  };
10674
10668
  function Tag(_ref) {
10675
10669
  var label = _ref.label,
10676
- _ref$type = _ref.type,
10677
- type = _ref$type === void 0 ? 'default' : _ref$type,
10670
+ icon = _ref.icon,
10671
+ color = _ref.color,
10672
+ type = _ref.type,
10673
+ _ref$size = _ref.size,
10674
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
10678
10675
  _ref$variant = _ref.variant,
10679
10676
  variant = _ref$variant === void 0 ? 'fill' : _ref$variant;
10680
- return /*#__PURE__*/jsx(View, {
10677
+ var kittTheme = useKittTheme();
10678
+ var tagColor = typeToColor(color, type);
10679
+ return /*#__PURE__*/jsxs(HStack, {
10681
10680
  alignSelf: "flex-start",
10682
10681
  borderRadius: "kitt.tag.borderRadius",
10683
- paddingX: "kitt.tag.horizontalPadding",
10684
- paddingY: "kitt.tag.verticalPadding",
10685
- backgroundColor: "kitt.tag.".concat(type, ".").concat(variant, ".backgroundColor"),
10686
- borderColor: "kitt.tag.".concat(type, ".").concat(variant, ".borderColor"),
10687
- borderWidth: "kitt.tag.".concat(type, ".").concat(variant, ".borderWidth"),
10688
- children: /*#__PURE__*/jsx(Typography.Text, {
10689
- base: "body-xsmall",
10690
- color: getLabelColor(type, variant),
10682
+ height: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".height"),
10683
+ paddingLeft: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingLeft"),
10684
+ paddingRight: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingRight"),
10685
+ backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".4")] : 'kitt.transparent',
10686
+ borderColor: kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".6")],
10687
+ borderWidth: "kitt.tag.".concat(variant, ".borderWidth"),
10688
+ space: "kitt.1",
10689
+ alignItems: "center",
10690
+ children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
10691
+ icon: icon,
10692
+ size: "kitt.tag.".concat(size, ".iconSize")
10693
+ }) : null, /*#__PURE__*/jsx(Typography.Text, {
10694
+ base: getTypography(size),
10695
+ color: "black",
10691
10696
  children: label
10692
- })
10697
+ })]
10693
10698
  });
10694
10699
  }
10695
10700
 
@@ -11276,14 +11281,6 @@ function TypographyLink(_ref) {
11276
11281
  });
11277
11282
  }
11278
11283
 
11279
- function useKittTheme() {
11280
- return useMemo(function () {
11281
- return {
11282
- kitt: theme
11283
- };
11284
- }, []);
11285
- }
11286
-
11287
11284
  function KittThemeProvider(_ref) {
11288
11285
  var isSSR = _ref.isSSR,
11289
11286
  children = _ref.children,