@ornikar/kitt-universal 7.2.0 → 7.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 (51) hide show
  1. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +1 -0
  2. package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
  3. package/dist/definitions/Button/Button.d.ts +1 -0
  4. package/dist/definitions/Button/Button.d.ts.map +1 -1
  5. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  6. package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts +3 -0
  7. package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts.map +1 -0
  8. package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts +3 -0
  9. package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts.map +1 -0
  10. package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts +8 -0
  11. package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts.map +1 -0
  12. package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts +10 -0
  13. package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts.map +1 -0
  14. package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
  15. package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -1
  16. package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +1 -1
  17. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  18. package/dist/definitions/themes/late-ocean/button.d.ts +2 -1
  19. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  20. package/dist/definitions/themes/late-ocean/input.d.ts +2 -2
  21. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
  22. package/dist/definitions/themes/late-ocean/pageLoader.d.ts +13 -0
  23. package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -1
  24. package/dist/index-browser-all.es.android.js +218 -29
  25. package/dist/index-browser-all.es.android.js.map +1 -1
  26. package/dist/index-browser-all.es.ios.js +218 -29
  27. package/dist/index-browser-all.es.ios.js.map +1 -1
  28. package/dist/index-browser-all.es.js +218 -29
  29. package/dist/index-browser-all.es.js.map +1 -1
  30. package/dist/index-browser-all.es.web.js +113 -35
  31. package/dist/index-browser-all.es.web.js.map +1 -1
  32. package/dist/index-node-14.17.cjs.js +213 -24
  33. package/dist/index-node-14.17.cjs.js.map +1 -1
  34. package/dist/index-node-14.17.cjs.web.css +1 -1
  35. package/dist/index-node-14.17.cjs.web.js +102 -29
  36. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  37. package/dist/linaria-themes-browser-all.es.android.js +26 -3
  38. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  39. package/dist/linaria-themes-browser-all.es.ios.js +26 -3
  40. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  41. package/dist/linaria-themes-browser-all.es.js +26 -3
  42. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  43. package/dist/linaria-themes-browser-all.es.web.js +26 -3
  44. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  45. package/dist/linaria-themes-node-14.17.cjs.js +26 -3
  46. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  47. package/dist/linaria-themes-node-14.17.cjs.web.js +26 -3
  48. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  49. package/dist/styles.css +1 -1
  50. package/dist/tsbuildinfo +1 -1
  51. package/package.json +9 -4
@@ -548,11 +548,14 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled(View).withConfig({
548
548
  }, function (_ref7) {
549
549
  var theme = _ref7.theme,
550
550
  $isLarge = _ref7.$isLarge,
551
+ $isXLarge = _ref7.$isXLarge,
551
552
  $isDisabled = _ref7.$isDisabled;
552
553
  var _theme$kitt$button$co = theme.kitt.button.contentPadding,
553
554
  large = _theme$kitt$button$co.large,
554
555
  defaultPadding = _theme$kitt$button$co["default"],
555
- disabledPadding = _theme$kitt$button$co.disabled;
556
+ disabledPadding = _theme$kitt$button$co.disabled,
557
+ xLarge = _theme$kitt$button$co.xLarge;
558
+ if ($isXLarge) return xLarge;
556
559
  if ($isLarge) return large;
557
560
  if ($isDisabled) return disabledPadding;
558
561
  return defaultPadding;
@@ -607,6 +610,9 @@ var getTextColorByType = function (type, variant) {
607
610
  case 'subtle-dark':
608
611
  return 'black';
609
612
 
613
+ case 'default':
614
+ return variant === 'ghost' ? 'white' : 'black';
615
+
610
616
  default:
611
617
  return 'black';
612
618
  }
@@ -748,6 +754,7 @@ function ButtonContent(_ref7) {
748
754
  });
749
755
  }
750
756
 
757
+ var allowedGhostTypes = ['primary', 'default'];
751
758
  var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
752
759
  var children = _ref.children,
753
760
  _ref$type = _ref.type,
@@ -757,6 +764,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
757
764
  disabled = _ref.disabled,
758
765
  stretch = _ref.stretch,
759
766
  large = _ref.large,
767
+ xLarge = _ref.xLarge,
760
768
  icon = _ref.icon,
761
769
  _ref$iconPosition = _ref.iconPosition,
762
770
  iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
@@ -767,8 +775,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
767
775
  accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
768
776
  onPress = _ref.onPress;
769
777
 
770
- if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type !== 'primary') {
771
- throw new Error('variant=ghost is only allowed with type=primary');
778
+ if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
779
+ throw new Error('variant=ghost is only allowed with type=primary or default');
772
780
  }
773
781
 
774
782
  return /*#__PURE__*/jsx(AnimatedButtonPressable, {
@@ -787,6 +795,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
787
795
  $variant: variant,
788
796
  $isStretch: stretch,
789
797
  $isLarge: large,
798
+ $isXLarge: xLarge,
790
799
  $isDisabled: disabled,
791
800
  children: [/*#__PURE__*/jsx(ButtonContent, {
792
801
  type: type,
@@ -975,6 +984,7 @@ var button = {
975
984
  contentPadding: {
976
985
  "default": '7px 16px 7px',
977
986
  large: '11px 24px 11px',
987
+ xLarge: '15px 24px 15px',
978
988
  disabled: '5px 14px 5px'
979
989
  },
980
990
  transition: {
@@ -987,6 +997,15 @@ var button = {
987
997
  pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
988
998
  hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
989
999
  focusBorderColor: 'rgba(0, 0, 0, 0.1)'
1000
+ },
1001
+ ghost: {
1002
+ backgroundColor: 'rgba(255, 255, 255, 0.1)',
1003
+ pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
1004
+ hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
1005
+ focusBorderColor: 'rgba(255, 255, 255, 0.4)',
1006
+ color: lateOceanColorPalette.white,
1007
+ hoverColor: lateOceanColorPalette.white,
1008
+ activeColor: lateOceanColorPalette.white
990
1009
  }
991
1010
  },
992
1011
  primary: {
@@ -1226,8 +1245,8 @@ var input = {
1226
1245
  size: 20
1227
1246
  },
1228
1247
  padding: {
1229
- "default": '5px 16px',
1230
- iOSSingleLine: '7px 16px'
1248
+ horizontal: 16,
1249
+ vertical: 5
1231
1250
  },
1232
1251
  transition: {
1233
1252
  property: 'border-color',
@@ -1342,7 +1361,20 @@ var listItem = {
1342
1361
  };
1343
1362
 
1344
1363
  var pageLoader = {
1345
- size: 60
1364
+ size: 60,
1365
+ strokeWidth: 3,
1366
+ colors: {
1367
+ base: colors.separator,
1368
+ fill: colors.primary
1369
+ },
1370
+ animation: {
1371
+ delay: 500,
1372
+ circleBackgroundFillDuration: 1000,
1373
+ filledCircleFillDuration: 1800,
1374
+ groupFilledCircleRotationDuration: 1800,
1375
+ filledCircleRotationDuration: 2160,
1376
+ fillEasingFunction: [0.39, 0.575, 0.565, 1]
1377
+ }
1346
1378
  };
1347
1379
 
1348
1380
  var shadows = {
@@ -1642,7 +1674,7 @@ var ViewInput = /*#__PURE__*/styled(View).withConfig({
1642
1674
  componentId: "kitt-universal__sc-11fmlmi-1"
1643
1675
  })(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
1644
1676
  var theme = _ref.theme;
1645
- return theme.kitt.forms.input.padding["default"];
1677
+ return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
1646
1678
  }, function (_ref2) {
1647
1679
  var theme = _ref2.theme;
1648
1680
  return theme.kitt.forms.input.minHeight;
@@ -1803,20 +1835,18 @@ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
1803
1835
  })(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
1804
1836
  var theme = _ref.theme,
1805
1837
  multiline = _ref.multiline;
1806
-
1807
- if (!multiline && "web" === 'ios') {
1808
- return theme.kitt.forms.input.padding.iOSSingleLine;
1809
- }
1810
-
1811
- return theme.kitt.forms.input.padding["default"];
1838
+ if (!multiline && "web" !== 'web') return "0 ".concat(theme.kitt.forms.input.padding.horizontal, "px");
1839
+ return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
1812
1840
  }, function (_ref2) {
1813
1841
  var theme = _ref2.theme,
1814
1842
  multiline = _ref2.multiline;
1815
- if (!multiline && "web" === 'ios') return 0;
1843
+ if (!multiline && "web" !== 'web') return 0;
1816
1844
  var typeConfigKey = getTypographyTypeConfigKey(theme);
1817
1845
  return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
1818
1846
  }, function (_ref3) {
1819
- var $minHeight = _ref3.$minHeight;
1847
+ var theme = _ref3.theme,
1848
+ _ref3$$minHeight = _ref3.$minHeight,
1849
+ $minHeight = _ref3$$minHeight === void 0 ? theme.kitt.forms.input.minHeight : _ref3$$minHeight;
1820
1850
  return $minHeight;
1821
1851
  });
1822
1852
  var RightInputContainer = /*#__PURE__*/styled(View).withConfig({
@@ -1826,8 +1856,7 @@ var RightInputContainer = /*#__PURE__*/styled(View).withConfig({
1826
1856
  var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
1827
1857
  var id = _ref4.id,
1828
1858
  right = _ref4.right,
1829
- _ref4$minHeight = _ref4.minHeight,
1830
- minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
1859
+ minHeight = _ref4.minHeight,
1831
1860
  formState = _ref4.state,
1832
1861
  internalForceState = _ref4.internalForceState,
1833
1862
  _ref4$disabled = _ref4.disabled,
@@ -3027,38 +3056,87 @@ var PageLoaderContainer = withTheme( /*#__PURE__*/styled$1("div")({
3027
3056
  "class": "kitt-u_PageLoaderContainer_ptkwz2j",
3028
3057
  vars: {
3029
3058
  "ptkwz2j-0": [function (_ref) {
3030
- var theme = _ref.theme;
3031
- return theme.kitt.colors.separator;
3059
+ var $circlePerimeter = _ref.$circlePerimeter;
3060
+ return $circlePerimeter;
3061
+ }, "px"],
3062
+ "ptkwz2j-2": [function (_ref2) {
3063
+ var $circlePerimeter = _ref2.$circlePerimeter;
3064
+ return $circlePerimeter * 0.2;
3065
+ }, "px"],
3066
+ "ptkwz2j-3": [function (_ref3) {
3067
+ var theme = _ref3.theme;
3068
+ return theme.kitt.pageLoader.size;
3069
+ }, "px"],
3070
+ "ptkwz2j-5": [function (_ref4) {
3071
+ var theme = _ref4.theme;
3072
+ return theme.kitt.pageLoader.strokeWidth;
3073
+ }, "px"],
3074
+ "ptkwz2j-8": [function (_ref5) {
3075
+ var theme = _ref5.theme;
3076
+ return theme.kitt.pageLoader.colors.base;
3032
3077
  }],
3033
- "ptkwz2j-1": [function (_ref2) {
3034
- var theme = _ref2.theme;
3035
- return theme.kitt.colors.primary;
3078
+ "ptkwz2j-9": [function (_ref6) {
3079
+ var theme = _ref6.theme;
3080
+ var animation = theme.kitt.pageLoader.animation;
3081
+
3082
+ var _animation$fillEasing = _slicedToArray(animation.fillEasingFunction, 4),
3083
+ x1 = _animation$fillEasing[0],
3084
+ y1 = _animation$fillEasing[1],
3085
+ x2 = _animation$fillEasing[2],
3086
+ y2 = _animation$fillEasing[3];
3087
+
3088
+ return "".concat(animation.circleBackgroundFillDuration, "ms cubic-bezier(").concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ") ").concat(animation.delay, "ms forwards");
3089
+ }],
3090
+ "ptkwz2j-10": [function (_ref7) {
3091
+ var theme = _ref7.theme;
3092
+ var animation = theme.kitt.pageLoader.animation;
3093
+ return "".concat(animation.filledCircleFillDuration, "ms linear ").concat(animation.delay, "ms infinite");
3094
+ }],
3095
+ "ptkwz2j-11": [function (_ref8) {
3096
+ var theme = _ref8.theme;
3097
+ return theme.kitt.pageLoader.colors.fill;
3098
+ }],
3099
+ "ptkwz2j-12": [function (_ref9) {
3100
+ var theme = _ref9.theme;
3101
+ var animation = theme.kitt.pageLoader.animation;
3102
+
3103
+ var _animation$fillEasing2 = _slicedToArray(animation.fillEasingFunction, 4),
3104
+ x1 = _animation$fillEasing2[0],
3105
+ y1 = _animation$fillEasing2[1],
3106
+ x2 = _animation$fillEasing2[2],
3107
+ y2 = _animation$fillEasing2[3];
3108
+
3109
+ var fillAnimation = "".concat(animation.filledCircleFillDuration, "ms cubic-bezier(").concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ") ").concat(animation.delay, "ms infinite alternate");
3110
+ var rotationAnimation = "".concat(animation.filledCircleRotationDuration, "ms linear ").concat(animation.delay, "ms infinite");
3111
+ return [fillAnimation, rotationAnimation].join(',');
3036
3112
  }]
3037
3113
  }
3038
3114
  }));
3039
3115
  function PageLoader() {
3040
3116
  var theme = /*#__PURE__*/useTheme();
3041
- var size = theme.kitt.pageLoader.size;
3117
+ var _theme$kitt$pageLoade = theme.kitt.pageLoader,
3118
+ size = _theme$kitt$pageLoade.size,
3119
+ strokeWidth = _theme$kitt$pageLoade.strokeWidth;
3120
+ var center = size * 0.5;
3121
+ var radius = center - strokeWidth;
3122
+ var circlePerimeter = 2 * Math.PI * radius;
3123
+ var sharedProps = {
3124
+ cx: center,
3125
+ cy: center,
3126
+ r: radius,
3127
+ fill: 'none'
3128
+ };
3042
3129
  return /*#__PURE__*/jsx(PageLoaderContainer, {
3130
+ $circlePerimeter: circlePerimeter,
3043
3131
  children: /*#__PURE__*/jsxs("svg", {
3044
3132
  width: size,
3045
3133
  height: size,
3046
3134
  children: [/*#__PURE__*/jsx("g", {
3047
3135
  "data-large-loader": "base",
3048
- children: /*#__PURE__*/jsx("circle", {
3049
- cx: "30",
3050
- cy: "30",
3051
- r: "27",
3052
- fill: "none"
3053
- })
3136
+ children: /*#__PURE__*/jsx("circle", _objectSpread({}, sharedProps))
3054
3137
  }), /*#__PURE__*/jsx("g", {
3055
3138
  "data-large-loader": "fill",
3056
- children: /*#__PURE__*/jsx("circle", {
3057
- cx: "30",
3058
- cy: "30",
3059
- r: "27",
3060
- fill: "none"
3061
- })
3139
+ children: /*#__PURE__*/jsx("circle", _objectSpread({}, sharedProps))
3062
3140
  })]
3063
3141
  })
3064
3142
  });