@ornikar/kitt-universal 21.0.2 → 22.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 (69) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/definitions/ActionCard/ActionCardContentWrapper.d.ts.map +1 -1
  3. package/dist/definitions/Button/AnimatedContainer.web.d.ts.map +1 -1
  4. package/dist/definitions/Button/FocusBorder.d.ts.map +1 -1
  5. package/dist/definitions/IconButton/IconButton.d.ts +2 -2
  6. package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
  7. package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
  8. package/dist/definitions/Tooltip/Arrow.d.ts.map +1 -1
  9. package/dist/definitions/forms/DatePicker/DatePicker.d.ts +1 -1
  10. package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
  11. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts +1 -1
  12. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts.map +1 -1
  13. package/dist/definitions/forms/DatePicker/components/PressableDateInputs.d.ts.map +1 -1
  14. package/dist/definitions/forms/InputText/InputText.d.ts +1 -1
  15. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  16. package/dist/definitions/forms/RadioButtonGroup/HoverBorder.d.ts.map +1 -1
  17. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +2 -2
  18. package/dist/definitions/themes/default.d.ts +0 -2
  19. package/dist/definitions/themes/default.d.ts.map +1 -1
  20. package/dist/definitions/themes/late-ocean/typography.d.ts +0 -2
  21. package/dist/definitions/themes/late-ocean/typography.d.ts.map +1 -1
  22. package/dist/definitions/typography/Typography.d.ts +376 -46
  23. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  24. package/dist/definitions/typography/TypographyEmoji.d.ts.map +1 -1
  25. package/dist/definitions/typography/TypographyLink.d.ts +3 -3
  26. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  27. package/dist/definitions/utils/getEnterKeyHintForNumericInput/getEnterKeyHintForNumericInput.d.ts +3 -0
  28. package/dist/definitions/utils/getEnterKeyHintForNumericInput/getEnterKeyHintForNumericInput.d.ts.map +1 -0
  29. package/dist/{index.es.ios.js → index-metro.es.android.js} +3576 -4152
  30. package/dist/index-metro.es.android.js.map +1 -0
  31. package/dist/{index.es.android.js → index-metro.es.ios.js} +3576 -4152
  32. package/dist/index-metro.es.ios.js.map +1 -0
  33. package/dist/index-node-18.18.cjs.js +217 -602
  34. package/dist/index-node-18.18.cjs.js.map +1 -1
  35. package/dist/index-node-18.18.cjs.web.js +45 -66
  36. package/dist/index-node-18.18.cjs.web.js.map +1 -1
  37. package/dist/index-node-18.18.es.mjs +217 -602
  38. package/dist/index-node-18.18.es.mjs.map +1 -1
  39. package/dist/index-node-18.18.es.web.mjs +45 -66
  40. package/dist/index-node-18.18.es.web.mjs.map +1 -1
  41. package/dist/index.es.js +227 -612
  42. package/dist/index.es.js.map +1 -1
  43. package/dist/index.es.web.js +49 -70
  44. package/dist/index.es.web.js.map +1 -1
  45. package/dist/{linaria-themes.es.ios.js → linaria-themes-metro.es.android.js} +172 -187
  46. package/dist/linaria-themes-metro.es.android.js.map +1 -0
  47. package/dist/{linaria-themes.es.android.js → linaria-themes-metro.es.ios.js} +172 -187
  48. package/dist/linaria-themes-metro.es.ios.js.map +1 -0
  49. package/dist/linaria-themes-node-18.18.cjs.js +0 -6
  50. package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
  51. package/dist/linaria-themes-node-18.18.cjs.web.js +0 -6
  52. package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
  53. package/dist/linaria-themes-node-18.18.es.mjs +0 -6
  54. package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
  55. package/dist/linaria-themes-node-18.18.es.web.mjs +0 -6
  56. package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
  57. package/dist/linaria-themes.es.js +0 -6
  58. package/dist/linaria-themes.es.js.map +1 -1
  59. package/dist/linaria-themes.es.web.js +0 -6
  60. package/dist/linaria-themes.es.web.js.map +1 -1
  61. package/dist/tsbuildinfo +1 -1
  62. package/package.json +17 -16
  63. package/typings/react-native-web.d.ts +48 -5
  64. package/dist/definitions/utils/getReturnKeyTypeForNumericInput/getReturnKeyTypeForNumericInput.d.ts +0 -3
  65. package/dist/definitions/utils/getReturnKeyTypeForNumericInput/getReturnKeyTypeForNumericInput.d.ts.map +0 -1
  66. package/dist/index.es.android.js.map +0 -1
  67. package/dist/index.es.ios.js.map +0 -1
  68. package/dist/linaria-themes.es.android.js.map +0 -1
  69. package/dist/linaria-themes.es.ios.js.map +0 -1
@@ -853,9 +853,6 @@ const typography = {
853
853
  warning: colors.warning
854
854
  },
855
855
  types: {
856
- get header() {
857
- throw new Error('typography.types.header is deprecated, use typography.type.headings instead');
858
- },
859
856
  headings: {
860
857
  fontFamily: {
861
858
  native: {
@@ -889,9 +886,6 @@ const typography = {
889
886
  'heading-xxs': createTypographyConfig(16, 1.3)
890
887
  }
891
888
  },
892
- get 'headers-impact'() {
893
- throw new Error('typography.types.headers-impact is deprecated, use typography.type.headings-impact instead');
894
- },
895
889
  'headings-impact': {
896
890
  fontFamily: {
897
891
  native: {
@@ -1677,7 +1671,9 @@ function ActionCardContentWrapper({
1677
1671
  style: sharedTransform
1678
1672
  },
1679
1673
  _web: {
1680
- style: sharedTransform
1674
+ style: {
1675
+ transform: `translateY(${translateY}px)`
1676
+ }
1681
1677
  },
1682
1678
  width: "100%",
1683
1679
  backgroundColor: `kitt.actionCard.${themeName}.${state}.backgroundColor`,
@@ -1881,9 +1877,7 @@ function AnimatedContainer$1({
1881
1877
  transitionTimingFunction: timingFunction,
1882
1878
  /* Simplifies the animation to just the front of the object – avoid blurry scale */
1883
1879
  backfaceVisibility: 'hidden',
1884
- transform: [{
1885
- scale: currentScale
1886
- }]
1880
+ transform: `scale(${currentScale})`
1887
1881
  }
1888
1882
  },
1889
1883
  width: createResponsiveStyleFromProp(isStretch, '100%', 'auto'),
@@ -2099,7 +2093,7 @@ const createHeading = (level, defaultBase) => {
2099
2093
  accessibilityRole: "header",
2100
2094
  base: defaultBase,
2101
2095
  ...props,
2102
- accessibilityLevel: level
2096
+ "aria-level": level
2103
2097
  });
2104
2098
  }
2105
2099
  TypographyHeading.displayName = `TypographyHeading${level}`;
@@ -2689,7 +2683,7 @@ function AvatarContent({
2689
2683
  width: size,
2690
2684
  height: size,
2691
2685
  alt: alt,
2692
- accessibilityLabel: alt
2686
+ "aria-label": alt
2693
2687
  });
2694
2688
  }
2695
2689
  if (firstname && lastname) {
@@ -3327,7 +3321,7 @@ function Choices({
3327
3321
  return /*#__PURE__*/jsx(ChoicesContainer, {
3328
3322
  direction: direction,
3329
3323
  testID: testID,
3330
- nativeID: id,
3324
+ id: id,
3331
3325
  children: childrenArray.map((child, index) => {
3332
3326
  const element = /*#__PURE__*/cloneElement(child, {
3333
3327
  selected: isForm ? child.props.value === currentValue : undefined,
@@ -3528,7 +3522,7 @@ function Emoji({
3528
3522
  testID: testID,
3529
3523
  size: size,
3530
3524
  alt: emojiData.text,
3531
- accessibilityLabel: emojiData.text,
3525
+ "aria-label": emojiData.text,
3532
3526
  source: {
3533
3527
  uri: emojiData.url
3534
3528
  },
@@ -3699,7 +3693,7 @@ const InputText = /*#__PURE__*/forwardRef(({
3699
3693
  autoCorrect = true,
3700
3694
  textContentType = 'none',
3701
3695
  autoComplete = 'off',
3702
- keyboardType = 'default',
3696
+ inputMode = 'none',
3703
3697
  multiline,
3704
3698
  onSubmitEditing,
3705
3699
  ...props
@@ -3712,11 +3706,11 @@ const InputText = /*#__PURE__*/forwardRef(({
3712
3706
  children: [/*#__PURE__*/jsx(Input, {
3713
3707
  ref: ref,
3714
3708
  multiline: multiline,
3715
- nativeID: id,
3709
+ id: id,
3716
3710
  isDisabled: internalForceState ? internalForceState === 'disabled' : disabled,
3717
3711
  isHovered: internalForceState ? internalForceState === 'hover' : undefined,
3718
3712
  isFocused: internalForceState ? internalForceState === 'focus' : undefined,
3719
- keyboardType: keyboardType,
3713
+ inputMode: inputMode,
3720
3714
  autoComplete: autoComplete,
3721
3715
  autoCorrect: autoCorrect,
3722
3716
  textContentType: textContentType,
@@ -4091,7 +4085,7 @@ const Checkbox = /*#__PURE__*/forwardRef(({
4091
4085
  const theme = useTheme();
4092
4086
  return /*#__PURE__*/jsx(Pressable, {
4093
4087
  ref: ref,
4094
- nativeID: id,
4088
+ id: id,
4095
4089
  testID: testID,
4096
4090
  accessibilityRole: "checkbox",
4097
4091
  accessibilityState: {
@@ -4166,8 +4160,8 @@ const Checkbox = /*#__PURE__*/forwardRef(({
4166
4160
  });
4167
4161
  });
4168
4162
 
4169
- function getReturnKeyTypeForNumericInput(returnKeyType) {
4170
- return returnKeyType;
4163
+ function getEnterKeyHintForNumericInput(enterKeyHint) {
4164
+ return enterKeyHint;
4171
4165
  }
4172
4166
 
4173
4167
  function prefixWithZero$1(value, maxLength = 2) {
@@ -4377,7 +4371,7 @@ const InputPart = /*#__PURE__*/forwardRef(({
4377
4371
  isFocusedInternal,
4378
4372
  isHoveredInternal,
4379
4373
  isPressedInternal,
4380
- returnKeyType,
4374
+ enterKeyHint,
4381
4375
  onChange,
4382
4376
  onBlur,
4383
4377
  onSubmitEditing
@@ -4394,8 +4388,8 @@ const InputPart = /*#__PURE__*/forwardRef(({
4394
4388
  value: value,
4395
4389
  placeholder: placeholder,
4396
4390
  disabled: disabled,
4397
- keyboardType: "numeric",
4398
- returnKeyType: returnKeyType,
4391
+ inputMode: "numeric",
4392
+ enterKeyHint: enterKeyHint,
4399
4393
  textAlign: "center",
4400
4394
  onChange: onChange,
4401
4395
  onBlur: onBlur,
@@ -4429,7 +4423,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef(({
4429
4423
  isFocusedInternal,
4430
4424
  isHoveredInternal,
4431
4425
  isPressedInternal,
4432
- returnKeyType,
4426
+ enterKeyHint,
4433
4427
  onChange,
4434
4428
  onBlur,
4435
4429
  onFocus,
@@ -4478,7 +4472,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef(({
4478
4472
  };
4479
4473
  return /*#__PURE__*/jsx(View, {
4480
4474
  testID: testID,
4481
- nativeID: id,
4475
+ id: id,
4482
4476
  children: /*#__PURE__*/jsxs(HStack, {
4483
4477
  space: "kitt.2",
4484
4478
  children: [/*#__PURE__*/jsx(PartContainer, {
@@ -4490,7 +4484,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef(({
4490
4484
  ...sharedInputPartProps,
4491
4485
  placeholder: placeholder?.day,
4492
4486
  value: state.displayedDay,
4493
- returnKeyType: getReturnKeyTypeForNumericInput('next'),
4487
+ enterKeyHint: getEnterKeyHintForNumericInput('next'),
4494
4488
  onChange: e => {
4495
4489
  const nextDay = stringToNumber(e.nativeEvent.text);
4496
4490
  dispatch({
@@ -4518,7 +4512,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef(({
4518
4512
  ...sharedInputPartProps,
4519
4513
  placeholder: placeholder?.month,
4520
4514
  value: state.displayedMonth,
4521
- returnKeyType: getReturnKeyTypeForNumericInput('next'),
4515
+ enterKeyHint: getEnterKeyHintForNumericInput('next'),
4522
4516
  onChange: e => {
4523
4517
  const nextMonth = stringToNumber(e.nativeEvent.text);
4524
4518
  dispatch({
@@ -4546,7 +4540,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef(({
4546
4540
  ...sharedInputPartProps,
4547
4541
  placeholder: placeholder?.year,
4548
4542
  value: state.displayedYear,
4549
- returnKeyType: returnKeyType ? getReturnKeyTypeForNumericInput(returnKeyType) : undefined,
4543
+ enterKeyHint: enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined,
4550
4544
  onChange: e => {
4551
4545
  const nextYear = stringToNumber(e.nativeEvent.text);
4552
4546
  dispatch({
@@ -4881,9 +4875,7 @@ function InputAddressOption({
4881
4875
  }) {
4882
4876
  const sharedTransform = {
4883
4877
  style: {
4884
- transform: [{
4885
- translateY: 4
4886
- }]
4878
+ transform: 'translateY(4)'
4887
4879
  }
4888
4880
  };
4889
4881
  return /*#__PURE__*/jsx(Autocomplete.Option, {
@@ -4981,7 +4973,7 @@ const InputEmail = /*#__PURE__*/forwardRef((props, ref) => {
4981
4973
  return /*#__PURE__*/jsx(InputText, {
4982
4974
  ref: ref,
4983
4975
  autoComplete: "email",
4984
- keyboardType: "email-address",
4976
+ inputMode: "email",
4985
4977
  textContentType: "emailAddress",
4986
4978
  autoCapitalize: "none",
4987
4979
  ...props
@@ -5088,7 +5080,7 @@ function prefixWithZero(value, phoneNumberLength) {
5088
5080
  return value.padStart(phoneNumberLength, '0');
5089
5081
  }
5090
5082
  const InputPhone = /*#__PURE__*/forwardRef(({
5091
- returnKeyType,
5083
+ enterKeyHint,
5092
5084
  autoComplete = 'tel',
5093
5085
  phoneNumberLength = 10,
5094
5086
  value,
@@ -5096,13 +5088,13 @@ const InputPhone = /*#__PURE__*/forwardRef(({
5096
5088
  ...props
5097
5089
  }, ref) => {
5098
5090
  const [currentValue, setCurrentValue] = useState(value);
5099
- const currentReturnKeyType = returnKeyType ? getReturnKeyTypeForNumericInput(returnKeyType) : undefined;
5091
+ const currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
5100
5092
  return /*#__PURE__*/jsx(InputText, {
5101
5093
  ref: ref,
5102
5094
  ...props,
5103
5095
  value: currentValue,
5104
- keyboardType: "phone-pad",
5105
- returnKeyType: currentReturnKeyType,
5096
+ inputMode: "tel",
5097
+ enterKeyHint: currentEnterKeyHint,
5106
5098
  autoComplete: autoComplete,
5107
5099
  textContentType: "telephoneNumber",
5108
5100
  onChange: event => {
@@ -5180,7 +5172,7 @@ function Label({
5180
5172
  }) {
5181
5173
  return /*#__PURE__*/jsx(Typography.Text, {
5182
5174
  base: "body",
5183
- nativeID: undefined,
5175
+ id: undefined,
5184
5176
  children: /*#__PURE__*/jsx("label", {
5185
5177
  id: id,
5186
5178
  htmlFor: htmlFor,
@@ -5203,7 +5195,7 @@ function InnerCircle({
5203
5195
  backgroundColor: "kitt.forms.radio.innerCircle.backgroundColor",
5204
5196
  _web: {
5205
5197
  style: {
5206
- transform: sharedTransform,
5198
+ transform: `scale(${isChecked ? 1 : 0}))`,
5207
5199
  transitionProperty: 'all',
5208
5200
  transitionDuration: theme.kitt.forms.radio.transition.duration,
5209
5201
  transitionTimingFunction: theme.kitt.forms.radio.transition.timingFunction
@@ -5307,7 +5299,7 @@ const Radio = /*#__PURE__*/forwardRef(({
5307
5299
  return /*#__PURE__*/jsx(Pressable, {
5308
5300
  ref: ref,
5309
5301
  testID: testID,
5310
- nativeID: id,
5302
+ id: id,
5311
5303
  disabled: disabled,
5312
5304
  accessibilityRole: "radio",
5313
5305
  "aria-checked": checked,
@@ -5983,9 +5975,7 @@ function AnimatedScale({
5983
5975
  transitionTimingFunction: timingFunction,
5984
5976
  /* Simplifies the animation to just the front of the object – avoid blurry scale */
5985
5977
  backfaceVisibility: 'hidden',
5986
- transform: [{
5987
- scale: isDisabled ? 1 : currentScale
5988
- }]
5978
+ transform: `scale(${isDisabled ? 1 : currentScale})`
5989
5979
  }
5990
5980
  },
5991
5981
  children: children
@@ -6018,7 +6008,7 @@ function IconButton({
6018
6008
  color = 'black',
6019
6009
  disabled,
6020
6010
  testID,
6021
- accessibilityLabel,
6011
+ ariaLabel,
6022
6012
  accessibilityRole = 'button',
6023
6013
  isHoveredInternal,
6024
6014
  isPressedInternal,
@@ -6036,14 +6026,12 @@ function IconButton({
6036
6026
  disabled: disabled,
6037
6027
  width: "kitt.iconButton.width",
6038
6028
  height: "kitt.iconButton.height",
6039
- accessibilityLabel: accessibilityLabel,
6029
+ "aria-label": ariaLabel,
6040
6030
  accessibilityRole: accessibilityRole,
6041
6031
  _web: {
6042
6032
  style: {
6043
6033
  backfaceVisibility: 'hidden',
6044
- transform: [{
6045
- translate3d: '0'
6046
- }]
6034
+ transform: 'translate3d(0px)'
6047
6035
  }
6048
6036
  },
6049
6037
  borderRadius: "kitt.iconButton.borderRadius",
@@ -8577,9 +8565,8 @@ function Picker({
8577
8565
  paddingY: isOpen ? 'kitt.2' : undefined,
8578
8566
  _web: {
8579
8567
  style: {
8580
- transform: [{
8581
- translate3d: `${tooltipX}px, ${tooltipY}px, 0`
8582
- }],
8568
+ transform: `translate3d(${tooltipX}px, ${tooltipY}px, 0)`,
8569
+ visibility: isOpen ? 'visible' : 'hidden',
8583
8570
  transitionDuration: '300ms',
8584
8571
  transitionProperty: 'opacity, padding',
8585
8572
  transitionTimingFunction: 'ease-in-out'
@@ -8592,9 +8579,7 @@ function Picker({
8592
8579
  shadow: "kitt.picker.web.optionsContainer.shadow",
8593
8580
  _web: {
8594
8581
  style: {
8595
- transform: [{
8596
- translateY: isOpen ? 0 : 8
8597
- }],
8582
+ transform: `translateY(${isOpen ? 0 : 8})`,
8598
8583
  visibility: isOpen ? 'visible' : 'hidden',
8599
8584
  transitionDuration: '300ms',
8600
8585
  transitionTimingFunction: 'ease-in-out'
@@ -9526,9 +9511,6 @@ const Arrow = /*#__PURE__*/forwardRef(({
9526
9511
  display
9527
9512
  }, ref) => {
9528
9513
  const theme = useTheme();
9529
- const transformStyle = [{
9530
- rotate: position === 'bottom' ? '180deg' : '0deg'
9531
- }];
9532
9514
  return /*#__PURE__*/jsx(View, {
9533
9515
  ref: ref,
9534
9516
  display: display || {
@@ -9540,7 +9522,7 @@ const Arrow = /*#__PURE__*/forwardRef(({
9540
9522
  left: left,
9541
9523
  top: top,
9542
9524
  style: {
9543
- transform: transformStyle
9525
+ transform: `rotate(${position === 'bottom' ? '180deg' : '0deg'})`
9544
9526
  },
9545
9527
  children: /*#__PURE__*/jsx(SvgArrowinline, {
9546
9528
  color: theme.kitt.tooltip.backgroundColor,
@@ -9704,7 +9686,7 @@ function Tooltip({
9704
9686
  }), /*#__PURE__*/jsx(Portal, {
9705
9687
  children: /*#__PURE__*/jsx(View, {
9706
9688
  ref: floating,
9707
- accessibilityHidden: !isVisible,
9689
+ "aria-hidden": !isVisible,
9708
9690
  paddingX: {
9709
9691
  base: 'kitt.4',
9710
9692
  small: 0
@@ -9718,16 +9700,16 @@ function Tooltip({
9718
9700
  small: 'kitt.tooltip.maxWidth'
9719
9701
  },
9720
9702
  opacity: isVisible ? 'kitt.tooltip.opacity' : 0,
9721
- pointerEvents: isVisible || isCursorOnTooltip ? 'auto' : 'none',
9703
+ style: {
9704
+ pointerEvents: isVisible || isCursorOnTooltip ? 'auto' : 'none'
9705
+ },
9722
9706
  position: strategy,
9723
9707
  zIndex: zIndex,
9724
9708
  top: 0,
9725
9709
  left: 0,
9726
9710
  _web: {
9727
9711
  style: {
9728
- transform: [{
9729
- translate3d: isBase && !fullWidth ? `0, ${tooltipY}px, 0` : `${tooltipX}px, ${tooltipY}px, 0`
9730
- }],
9712
+ transform: `translate3d(${isBase && !fullWidth ? `0, ${tooltipY}px, 0` : `${tooltipX}px, ${tooltipY}px, 0`})`,
9731
9713
  visibility: isVisible ? 'visible' : 'hidden',
9732
9714
  transitionDuration,
9733
9715
  transitionProperty: theme.kitt.tooltip.transition[themePart].property,
@@ -9741,9 +9723,7 @@ function Tooltip({
9741
9723
  children: /*#__PURE__*/jsxs(View, {
9742
9724
  _web: {
9743
9725
  style: {
9744
- transform: [{
9745
- scale: isVisible ? 1 : 0.8
9746
- }],
9726
+ transform: `scale(${isVisible ? 1 : 0.8})`,
9747
9727
  transitionDuration: isVisible ? '0' : transitionDuration,
9748
9728
  transitionProperty: 'all',
9749
9729
  transitionTimingFunction,
@@ -9841,7 +9821,6 @@ function TypographyEmoji({
9841
9821
  emoji: emoji,
9842
9822
  alignSelf: "center",
9843
9823
  _web: {
9844
- // @ts-expect-error -- transform expects number, but string works on web
9845
9824
  style: {
9846
9825
  transform: 'translateY(20%)'
9847
9826
  },