@ornikar/kitt-universal 9.34.2 → 9.36.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 (76) hide show
  1. package/dist/definitions/forms/Checkbox/Checkbox.d.ts +6 -5
  2. package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -1
  3. package/dist/definitions/forms/Checkbox/utils/getBackgroundColor.d.ts +10 -0
  4. package/dist/definitions/forms/Checkbox/utils/getBackgroundColor.d.ts.map +1 -0
  5. package/dist/definitions/forms/Checkbox/utils/getBorderColor.d.ts +10 -0
  6. package/dist/definitions/forms/Checkbox/utils/getBorderColor.d.ts.map +1 -0
  7. package/dist/definitions/forms/DatePicker/DatePicker.d.ts +5 -2
  8. package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
  9. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts +1 -0
  10. package/dist/definitions/forms/DatePicker/components/InputPart.d.ts.map +1 -1
  11. package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts +5 -2
  12. package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts.map +1 -1
  13. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts +3 -2
  14. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts.map +1 -1
  15. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts +3 -2
  16. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts.map +1 -1
  17. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts +3 -2
  18. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts.map +1 -1
  19. package/dist/definitions/forms/DatePicker/components/PressableDateInputs.d.ts +3 -2
  20. package/dist/definitions/forms/DatePicker/components/PressableDateInputs.d.ts.map +1 -1
  21. package/dist/definitions/forms/InputEmail/InputEmail.d.ts +3 -2
  22. package/dist/definitions/forms/InputEmail/InputEmail.d.ts.map +1 -1
  23. package/dist/definitions/forms/InputPassword/InputPassword.d.ts +3 -2
  24. package/dist/definitions/forms/InputPassword/InputPassword.d.ts.map +1 -1
  25. package/dist/definitions/forms/InputPhone/InputPhone.d.ts +3 -2
  26. package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -1
  27. package/dist/definitions/forms/InputText/InputText.d.ts +1 -1
  28. package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
  29. package/dist/definitions/forms/Radio/InnerCircle.d.ts +7 -0
  30. package/dist/definitions/forms/Radio/InnerCircle.d.ts.map +1 -0
  31. package/dist/definitions/forms/Radio/OuterCircle.d.ts +12 -0
  32. package/dist/definitions/forms/Radio/OuterCircle.d.ts.map +1 -0
  33. package/dist/definitions/forms/Radio/Radio.d.ts +5 -4
  34. package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
  35. package/dist/definitions/forms/Radio/utils/getBackgroundColor.d.ts +10 -0
  36. package/dist/definitions/forms/Radio/utils/getBackgroundColor.d.ts.map +1 -0
  37. package/dist/definitions/forms/Radio/utils/getBorderColor.d.ts +10 -0
  38. package/dist/definitions/forms/Radio/utils/getBorderColor.d.ts.map +1 -0
  39. package/dist/definitions/forms/TextArea/TextArea.d.ts +3 -2
  40. package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
  41. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +284 -147
  42. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  43. package/dist/definitions/themes/default.d.ts +29 -4
  44. package/dist/definitions/themes/default.d.ts.map +1 -1
  45. package/dist/definitions/themes/late-ocean/checkbox.d.ts +29 -4
  46. package/dist/definitions/themes/late-ocean/checkbox.d.ts.map +1 -1
  47. package/dist/definitions/themes/late-ocean/forms.d.ts +29 -4
  48. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
  49. package/dist/definitions/themes/late-ocean/radio.d.ts +13 -0
  50. package/dist/definitions/themes/late-ocean/radio.d.ts.map +1 -1
  51. package/dist/index-browser-all.es.android.js +440 -190
  52. package/dist/index-browser-all.es.android.js.map +1 -1
  53. package/dist/index-browser-all.es.ios.js +440 -190
  54. package/dist/index-browser-all.es.ios.js.map +1 -1
  55. package/dist/index-browser-all.es.js +440 -190
  56. package/dist/index-browser-all.es.js.map +1 -1
  57. package/dist/index-browser-all.es.web.js +412 -180
  58. package/dist/index-browser-all.es.web.js.map +1 -1
  59. package/dist/index-node-14.17.cjs.js +433 -172
  60. package/dist/index-node-14.17.cjs.js.map +1 -1
  61. package/dist/index-node-14.17.cjs.web.js +408 -156
  62. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  63. package/dist/linaria-themes-browser-all.es.android.js +44 -6
  64. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  65. package/dist/linaria-themes-browser-all.es.ios.js +44 -6
  66. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  67. package/dist/linaria-themes-browser-all.es.js +44 -6
  68. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  69. package/dist/linaria-themes-browser-all.es.web.js +44 -6
  70. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  71. package/dist/linaria-themes-node-14.17.cjs.js +44 -6
  72. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  73. package/dist/linaria-themes-node-14.17.cjs.web.js +44 -6
  74. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  75. package/dist/tsbuildinfo +1 -1
  76. package/package.json +2 -2
@@ -2240,11 +2240,36 @@ const checkbox = {
2240
2240
  height: 20,
2241
2241
  width: 20,
2242
2242
  iconSize: 14,
2243
- borderColor: colors.separator,
2244
- backgroundColor: colors.uiBackgroundLight,
2245
- checkedBorderColor: colors.primary,
2246
- checkedBackgroundColor: colors.primary,
2247
- markColor: colors.uiBackgroundLight
2243
+ markColor: colors.uiBackgroundLight,
2244
+ textSpacing: 10,
2245
+ default: {
2246
+ borderColor: colors.separator,
2247
+ backgroundColor: colors.uiBackgroundLight
2248
+ },
2249
+ checked: {
2250
+ borderColor: colors.primary,
2251
+ backgroundColor: colors.primary
2252
+ },
2253
+ focus: {
2254
+ borderColor: colors.primary,
2255
+ backgroundColor: colors.uiBackgroundLight
2256
+ },
2257
+ hover: {
2258
+ borderColor: colors.primary,
2259
+ backgroundColor: colors.uiBackgroundLight
2260
+ },
2261
+ pressed: {
2262
+ borderColor: colors.primary,
2263
+ backgroundColor: colors.uiBackgroundLight
2264
+ },
2265
+ disabled: {
2266
+ borderColor: colors.separator,
2267
+ backgroundColor: colors.disabled
2268
+ },
2269
+ transition: {
2270
+ duration: '200ms',
2271
+ timingFunction: 'ease-out'
2272
+ }
2248
2273
  };
2249
2274
 
2250
2275
  const datePicker = {
@@ -2436,18 +2461,31 @@ const inputTag = {
2436
2461
  const radio = {
2437
2462
  size: 18,
2438
2463
  unchecked: {
2439
- backgroundColor: colors.uiBackgroundLight,
2440
2464
  borderWidth: 2,
2465
+ backgroundColor: colors.uiBackgroundLight,
2441
2466
  borderColor: lateOceanColorPalette.black200
2442
2467
  },
2443
2468
  checked: {
2444
2469
  backgroundColor: colors.primary,
2470
+ borderColor: colors.transparent,
2445
2471
  innerSize: 5,
2446
2472
  innerBackgroundColor: colors.uiBackgroundLight
2447
2473
  },
2474
+ hover: {
2475
+ backgroundColor: colors.uiBackgroundLight,
2476
+ borderColor: colors.primary
2477
+ },
2478
+ pressed: {
2479
+ backgroundColor: colors.uiBackgroundLight,
2480
+ borderColor: colors.primary
2481
+ },
2448
2482
  disabled: {
2449
2483
  backgroundColor: colors.disabled,
2450
2484
  borderColor: colors.separator
2485
+ },
2486
+ transition: {
2487
+ duration: '200ms',
2488
+ timingFunction: 'ease-out'
2451
2489
  }
2452
2490
  };
2453
2491
 
@@ -2875,75 +2913,121 @@ function useKittTheme() {
2875
2913
  }, [dimensions]);
2876
2914
  }
2877
2915
 
2878
- const CheckboxAndLabelPressableWrapper = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.Pressable).withConfig({
2879
- displayName: "Checkbox__CheckboxAndLabelPressableWrapper",
2880
- componentId: "kitt-universal__sc-1sav1n6-0"
2881
- })(["display:flex;flex-direction:row;"]);
2882
- const CheckboxContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
2883
- displayName: "Checkbox__CheckboxContainer",
2884
- componentId: "kitt-universal__sc-1sav1n6-1"
2885
- })(["display:flex;flex-direction:row;align-items:center;justify-content:center;height:", "px;width:", "px;position:relative;border-radius:", "px;", " margin-right:", ";"], ({
2886
- theme
2887
- }) => theme.kitt.forms.checkbox.height, ({
2888
- theme
2889
- }) => theme.kitt.forms.checkbox.width, ({
2890
- theme
2891
- }) => theme.kitt.forms.checkbox.borderRadius, ({
2892
- $isChecked,
2893
- theme
2894
- }) => {
2895
- const {
2896
- checkedBackgroundColor,
2897
- checkedBorderColor,
2898
- borderColor,
2899
- borderWidth,
2900
- backgroundColor
2901
- } = theme.kitt.forms.checkbox;
2902
- if ($isChecked) {
2903
- return styled.css(["background-color:", ";border:", ";"], checkedBackgroundColor, `${borderWidth}px solid ${checkedBorderColor}`);
2904
- }
2905
- return styled.css(["background-color:", ";border:", ";"], backgroundColor, `${borderWidth}px solid ${borderColor}`);
2906
- }, ({
2907
- theme,
2908
- $hasLabel
2909
- }) => {
2910
- if (!$hasLabel) return '0px';
2911
- return `${theme.kitt.spacing * 2.5}px;`;
2912
- });
2913
- function Checkbox({
2914
- onChange,
2915
- onBlur,
2916
- onFocus,
2916
+ function getBackgroundColor$1({
2917
+ isDisabled,
2918
+ isPressed,
2919
+ isHovered,
2920
+ isFocused,
2921
+ isChecked
2922
+ }) {
2923
+ if (isChecked) return 'kitt.forms.checkbox.checked.backgroundColor';
2924
+ if (isDisabled) return 'kitt.forms.checkbox.disabled.backgroundColor';
2925
+ if (isPressed) return 'kitt.forms.checkbox.pressed.backgroundColor';
2926
+ if (isHovered) return 'kitt.forms.checkbox.hover.backgroundColor';
2927
+ if (isFocused) return 'kitt.forms.checkbox.focus.backgroundColor';
2928
+ return 'kitt.forms.checkbox.default.backgroundColor';
2929
+ }
2930
+
2931
+ function getBorderColor$1({
2932
+ isDisabled,
2933
+ isPressed,
2934
+ isHovered,
2935
+ isFocused,
2936
+ isChecked
2937
+ }) {
2938
+ if (isChecked) return 'kitt.forms.checkbox.checked.borderColor';
2939
+ if (isDisabled) return 'kitt.forms.checkbox.disabled.borderColor';
2940
+ if (isPressed) return 'kitt.forms.checkbox.pressed.borderColor';
2941
+ if (isHovered) return 'kitt.forms.checkbox.hover.borderColor';
2942
+ if (isFocused) return 'kitt.forms.checkbox.focus.borderColor';
2943
+ return 'kitt.forms.checkbox.default.borderColor';
2944
+ }
2945
+
2946
+ const Checkbox = /*#__PURE__*/react.forwardRef(({
2917
2947
  checked,
2918
2948
  hitSlop = 40,
2919
2949
  id,
2920
- children
2921
- }) {
2950
+ children,
2951
+ disabled,
2952
+ onChange,
2953
+ onBlur,
2954
+ onFocus
2955
+ }, ref) => {
2922
2956
  const theme = useKittTheme();
2923
- return /*#__PURE__*/jsxRuntime.jsxs(CheckboxAndLabelPressableWrapper, {
2957
+ return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
2958
+ ref: ref,
2959
+ testID: id,
2924
2960
  accessibilityRole: "checkbox",
2925
2961
  accessibilityState: {
2926
2962
  checked
2927
2963
  },
2928
2964
  hitSlop: hitSlop,
2965
+ disabled: disabled,
2929
2966
  onPress: e => {
2930
2967
  if (onFocus) onFocus(e);
2931
2968
  if (onChange) onChange(!checked, e);
2932
2969
  if (onBlur) onBlur(e);
2933
2970
  },
2934
- children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxContainer, {
2935
- $isChecked: checked,
2936
- $hasLabel: !!children,
2937
- testID: id,
2938
- children: checked ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
2939
- align: "center",
2940
- color: theme.kitt.forms.checkbox.markColor,
2941
- size: theme.kitt.forms.checkbox.iconSize,
2942
- icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckboxMark, {})
2943
- }) : null
2944
- }), children]
2971
+ children: ({
2972
+ isHovered,
2973
+ isPressed,
2974
+ isFocused
2975
+ }) => /*#__PURE__*/jsxRuntime.jsxs(HStack, {
2976
+ space: children ? 'kitt.forms.checkbox.textSpacing' : undefined,
2977
+ children: [/*#__PURE__*/jsxRuntime.jsx(View, {
2978
+ display: "flex",
2979
+ flexDirection: "row",
2980
+ alignItems: "center",
2981
+ justifyContent: "center",
2982
+ marginTop: children ? 'kitt.1' : undefined,
2983
+ height: "kitt.forms.checkbox.height",
2984
+ width: "kitt.forms.checkbox.width",
2985
+ borderRadius: "kitt.forms.checkbox.borderRadius",
2986
+ borderWidth: "kitt.forms.checkbox.borderWidth",
2987
+ borderColor: getBorderColor$1({
2988
+ isDisabled: disabled,
2989
+ isFocused,
2990
+ isHovered,
2991
+ isPressed,
2992
+ isChecked: checked
2993
+ }),
2994
+ backgroundColor: getBackgroundColor$1({
2995
+ isDisabled: disabled,
2996
+ isFocused,
2997
+ isHovered,
2998
+ isPressed,
2999
+ isChecked: checked
3000
+ }),
3001
+ _web: {
3002
+ style: {
3003
+ transitionDuration: theme.kitt.forms.checkbox.transition.duration,
3004
+ transitionProperty: 'all',
3005
+ transitionTimingFunction: theme.kitt.forms.checkbox.transition.timingFunction
3006
+ }
3007
+ },
3008
+ children: /*#__PURE__*/jsxRuntime.jsx(View, {
3009
+ opacity: checked ? 1 : 0,
3010
+ _web: {
3011
+ style: {
3012
+ transitionDuration: theme.kitt.forms.checkbox.transition.duration,
3013
+ transitionProperty: 'opacity',
3014
+ transitionTimingFunction: theme.kitt.forms.checkbox.transition.timingFunction
3015
+ }
3016
+ },
3017
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
3018
+ align: "center",
3019
+ color: theme.kitt.forms.checkbox.markColor,
3020
+ size: theme.kitt.forms.checkbox.iconSize,
3021
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckboxMark, {})
3022
+ })
3023
+ })
3024
+ }), children ? /*#__PURE__*/jsxRuntime.jsx(View, {
3025
+ flexShrink: 1,
3026
+ children: children
3027
+ }) : null]
3028
+ })
2945
3029
  });
2946
- }
3030
+ });
2947
3031
 
2948
3032
  function prefixWithZero(value, maxLength = 2) {
2949
3033
  return `${value}`.padStart(maxLength, '0');
@@ -3267,7 +3351,8 @@ const InputPart = /*#__PURE__*/react.forwardRef(({
3267
3351
  isHoveredInternal,
3268
3352
  isPressedInternal,
3269
3353
  onChange,
3270
- onBlur
3354
+ onBlur,
3355
+ onSubmitEditing
3271
3356
  }, ref) => {
3272
3357
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
3273
3358
  ref: ref,
@@ -3283,7 +3368,8 @@ const InputPart = /*#__PURE__*/react.forwardRef(({
3283
3368
  keyboardType: "numeric",
3284
3369
  textAlign: "center",
3285
3370
  onChange: onChange,
3286
- onBlur: onBlur
3371
+ onBlur: onBlur,
3372
+ onSubmitEditing: onSubmitEditing
3287
3373
  });
3288
3374
  });
3289
3375
 
@@ -3300,7 +3386,7 @@ function PartContainer({
3300
3386
  });
3301
3387
  }
3302
3388
 
3303
- function KeyboardDatePicker({
3389
+ const KeyboardDatePicker = /*#__PURE__*/react.forwardRef(({
3304
3390
  value,
3305
3391
  testID,
3306
3392
  id,
@@ -3315,9 +3401,9 @@ function KeyboardDatePicker({
3315
3401
  onChange,
3316
3402
  onBlur,
3317
3403
  onFocus,
3404
+ onSubmitEditing,
3318
3405
  ...props
3319
- }) {
3320
- const dayRef = react.useRef(null);
3406
+ }, ref) => {
3321
3407
  const monthRef = react.useRef(null);
3322
3408
  const yearRef = react.useRef(null);
3323
3409
  const defaultValue = value;
@@ -3353,7 +3439,7 @@ function KeyboardDatePicker({
3353
3439
  isStretch: stretch,
3354
3440
  width: "kitt.forms.datePicker.day.minWidth",
3355
3441
  children: /*#__PURE__*/jsxRuntime.jsx(InputPart, {
3356
- ref: dayRef,
3442
+ ref: ref,
3357
3443
  ...sharedInputPartProps,
3358
3444
  placeholder: placeholder?.day,
3359
3445
  value: state.displayedDay,
@@ -3369,7 +3455,10 @@ function KeyboardDatePicker({
3369
3455
  },
3370
3456
  onBlur: () => dispatch({
3371
3457
  type: 'day-blur'
3372
- })
3458
+ }),
3459
+ onSubmitEditing: () => {
3460
+ if (monthRef.current) monthRef.current.focus();
3461
+ }
3373
3462
  })
3374
3463
  }), /*#__PURE__*/jsxRuntime.jsx(PartContainer, {
3375
3464
  isStretch: stretch,
@@ -3391,7 +3480,10 @@ function KeyboardDatePicker({
3391
3480
  },
3392
3481
  onBlur: () => dispatch({
3393
3482
  type: 'month-blur'
3394
- })
3483
+ }),
3484
+ onSubmitEditing: () => {
3485
+ if (yearRef.current) yearRef.current.focus();
3486
+ }
3395
3487
  })
3396
3488
  }), /*#__PURE__*/jsxRuntime.jsx(PartContainer, {
3397
3489
  isStretch: stretch,
@@ -3409,12 +3501,13 @@ function KeyboardDatePicker({
3409
3501
  },
3410
3502
  onBlur: () => dispatch({
3411
3503
  type: 'year-blur'
3412
- })
3504
+ }),
3505
+ onSubmitEditing: onSubmitEditing
3413
3506
  })
3414
3507
  })]
3415
3508
  })
3416
3509
  });
3417
- }
3510
+ });
3418
3511
 
3419
3512
  function DatePicker({
3420
3513
  value,
@@ -3428,15 +3521,16 @@ function DatePicker({
3428
3521
  });
3429
3522
  }
3430
3523
 
3431
- function InputEmail(props) {
3524
+ const InputEmail = /*#__PURE__*/react.forwardRef((props, ref) => {
3432
3525
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
3526
+ ref: ref,
3433
3527
  autoComplete: "email",
3434
3528
  keyboardType: "email-address",
3435
3529
  textContentType: "emailAddress",
3436
3530
  autoCapitalize: "none",
3437
3531
  ...props
3438
3532
  });
3439
- }
3533
+ });
3440
3534
 
3441
3535
  const getColorFromState = state => {
3442
3536
  switch (state) {
@@ -3518,13 +3612,14 @@ function InputPressable({
3518
3612
  });
3519
3613
  }
3520
3614
 
3521
- function InputPassword({
3615
+ const InputPassword = /*#__PURE__*/react.forwardRef(({
3522
3616
  isPasswordDefaultVisible,
3523
3617
  right,
3524
3618
  ...props
3525
- }) {
3619
+ }, ref) => {
3526
3620
  const [isVisible, setIsVisible] = react.useState(Boolean(isPasswordDefaultVisible));
3527
3621
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
3622
+ ref: ref,
3528
3623
  ...props,
3529
3624
  textContentType: "password",
3530
3625
  autoComplete: "password",
@@ -3539,16 +3634,17 @@ function InputPassword({
3539
3634
  })
3540
3635
  })
3541
3636
  });
3542
- }
3637
+ });
3543
3638
 
3544
- function InputPhone(props) {
3639
+ const InputPhone = /*#__PURE__*/react.forwardRef((props, ref) => {
3545
3640
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
3641
+ ref: ref,
3546
3642
  ...props,
3547
3643
  autoComplete: "tel",
3548
3644
  keyboardType: "number-pad",
3549
3645
  textContentType: "telephoneNumber"
3550
3646
  });
3551
- }
3647
+ });
3552
3648
 
3553
3649
  const getTypographyColor = type => type ? 'white' : 'black';
3554
3650
  const InputTagContainer = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.View).withConfig({
@@ -3612,86 +3708,154 @@ function Label({
3612
3708
  });
3613
3709
  }
3614
3710
 
3615
- const OuterRadio = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
3616
- displayName: "Radio__OuterRadio",
3617
- componentId: "kitt-universal__sc-1mdgr2o-0"
3618
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], ({
3619
- theme,
3620
- disabled
3621
- }) => theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor, ({
3622
- theme
3623
- }) => theme.kitt.forms.radio.size, ({
3624
- theme
3625
- }) => theme.kitt.forms.radio.size, ({
3626
- theme
3627
- }) => theme.kitt.forms.radio.size / 2, ({
3628
- theme
3629
- }) => theme.kitt.forms.radio.unchecked.borderWidth, ({
3630
- theme,
3631
- disabled
3632
- }) => theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor);
3633
- const SelectedOuterRadio = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
3634
- displayName: "Radio__SelectedOuterRadio",
3635
- componentId: "kitt-universal__sc-1mdgr2o-1"
3636
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], ({
3637
- theme
3638
- }) => theme.kitt.forms.radio.checked.backgroundColor, ({
3639
- theme
3640
- }) => theme.kitt.forms.radio.size, ({
3641
- theme
3642
- }) => theme.kitt.forms.radio.size, ({
3643
- theme
3644
- }) => theme.kitt.forms.radio.size / 2);
3645
- const SelectedInnerRadio = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.View).withConfig({
3646
- displayName: "Radio__SelectedInnerRadio",
3647
- componentId: "kitt-universal__sc-1mdgr2o-2"
3648
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], ({
3649
- theme
3650
- }) => theme.kitt.forms.radio.checked.innerBackgroundColor, ({
3651
- theme
3652
- }) => theme.kitt.forms.radio.checked.innerSize, ({
3653
- theme
3654
- }) => theme.kitt.forms.radio.checked.innerSize, ({
3655
- theme
3656
- }) => theme.kitt.forms.radio.checked.innerSize / 2);
3657
- const Container$1 = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative__namespace.Pressable).withConfig({
3658
- displayName: "Radio__Container",
3659
- componentId: "kitt-universal__sc-1mdgr2o-3"
3660
- })(["flex-direction:row;align-items:center;"]);
3661
- const Text = /*#__PURE__*/styled__default(Typography.Text).withConfig({
3662
- displayName: "Radio__Text",
3663
- componentId: "kitt-universal__sc-1mdgr2o-4"
3664
- })(["margin-left:", "px;"], ({
3665
- theme
3666
- }) => theme.kitt.spacing * 2);
3667
- function Radio({
3711
+ function InnerCircle({
3712
+ isChecked
3713
+ }) {
3714
+ const theme = /*#__PURE__*/styled.useTheme();
3715
+ const sharedTransform = [{
3716
+ scale: isChecked ? 1 : 0
3717
+ }];
3718
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
3719
+ width: "kitt.forms.radio.innerCircle.size",
3720
+ height: "kitt.forms.radio.innerCircle.size",
3721
+ borderRadius: "kitt.forms.radio.innerCircle.borderRadius",
3722
+ backgroundColor: "kitt.forms.radio.innerCircle.backgroundColor",
3723
+ _web: {
3724
+ style: {
3725
+ transform: sharedTransform,
3726
+ transitionProperty: 'all',
3727
+ transitionDuration: theme.kitt.forms.radio.transition.duration,
3728
+ transitionTimingFunction: theme.kitt.forms.radio.transition.timingFunction
3729
+ }
3730
+ },
3731
+ _ios: {
3732
+ style: {
3733
+ transform: sharedTransform
3734
+ }
3735
+ },
3736
+ _android: {
3737
+ style: {
3738
+ transform: sharedTransform
3739
+ }
3740
+ }
3741
+ });
3742
+ }
3743
+
3744
+ function getBackgroundColor({
3745
+ isDisabled,
3746
+ isPressed,
3747
+ isHovered,
3748
+ isFocused,
3749
+ isChecked
3750
+ }) {
3751
+ if (isChecked) return 'kitt.forms.radio.checked.backgroundColor';
3752
+ if (isDisabled) return 'kitt.forms.radio.disabled.backgroundColor';
3753
+ if (isPressed) return 'kitt.forms.radio.pressed.backgroundColor';
3754
+ if (isHovered) return 'kitt.forms.radio.hover.backgroundColor';
3755
+ if (isFocused) return 'kitt.forms.radio.focus.backgroundColor';
3756
+ return 'kitt.forms.radio.default.backgroundColor';
3757
+ }
3758
+
3759
+ function getBorderColor({
3760
+ isDisabled,
3761
+ isPressed,
3762
+ isHovered,
3763
+ isFocused,
3764
+ isChecked
3765
+ }) {
3766
+ if (isChecked) return 'kitt.forms.radio.checked.borderColor';
3767
+ if (isDisabled) return 'kitt.forms.radio.disabled.borderColor';
3768
+ if (isPressed) return 'kitt.forms.radio.pressed.borderColor';
3769
+ if (isHovered) return 'kitt.forms.radio.hover.borderColor';
3770
+ if (isFocused) return 'kitt.forms.radio.focus.borderColor';
3771
+ return 'kitt.forms.radio.default.borderColor';
3772
+ }
3773
+
3774
+ function OuterCircle({
3775
+ children,
3776
+ isChecked,
3777
+ isDisabled,
3778
+ isHovered,
3779
+ isFocused,
3780
+ isPressed
3781
+ }) {
3782
+ const theme = /*#__PURE__*/styled.useTheme();
3783
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
3784
+ alignItems: "center",
3785
+ justifyContent: "center",
3786
+ borderWidth: "kitt.forms.radio.borderWidth",
3787
+ width: "kitt.forms.radio.size",
3788
+ height: "kitt.forms.radio.size",
3789
+ borderRadius: "kitt.forms.radio.borderRadius",
3790
+ backgroundColor: getBackgroundColor({
3791
+ isChecked,
3792
+ isDisabled,
3793
+ isFocused,
3794
+ isHovered,
3795
+ isPressed
3796
+ }),
3797
+ borderColor: getBorderColor({
3798
+ isChecked,
3799
+ isDisabled,
3800
+ isFocused,
3801
+ isHovered,
3802
+ isPressed
3803
+ }),
3804
+ _web: {
3805
+ style: {
3806
+ transitionProperty: 'all',
3807
+ transitionDuration: theme.kitt.forms.radio.transition.duration,
3808
+ transitionTimingFunction: theme.kitt.forms.radio.transition.timingFunction
3809
+ }
3810
+ },
3811
+ children: children
3812
+ });
3813
+ }
3814
+
3815
+ const Radio = /*#__PURE__*/react.forwardRef(({
3668
3816
  id,
3669
3817
  checked,
3670
3818
  onChange,
3671
3819
  value,
3672
- disabled = false,
3820
+ disabled,
3673
3821
  children
3674
- }) {
3675
- return /*#__PURE__*/jsxRuntime.jsxs(Container$1, {
3822
+ }, ref) => {
3823
+ return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
3824
+ ref: ref,
3676
3825
  nativeID: id,
3677
3826
  disabled: disabled,
3678
3827
  accessibilityRole: "radio",
3679
3828
  "aria-checked": checked,
3680
3829
  focusable: checked && !disabled,
3830
+ flexDirection: "row",
3831
+ alignItems: "center",
3681
3832
  onPress: () => {
3682
3833
  onChange(value);
3683
3834
  },
3684
- children: [checked && !disabled ? /*#__PURE__*/jsxRuntime.jsx(SelectedOuterRadio, {
3685
- children: /*#__PURE__*/jsxRuntime.jsx(SelectedInnerRadio, {})
3686
- }) : /*#__PURE__*/jsxRuntime.jsx(OuterRadio, {
3687
- disabled: disabled
3688
- }), /*#__PURE__*/jsxRuntime.jsx(Text, {
3689
- base: "body",
3690
- color: disabled ? 'black-light' : 'black',
3691
- children: children
3692
- })]
3835
+ children: ({
3836
+ isHovered,
3837
+ isPressed,
3838
+ isFocused
3839
+ }) => /*#__PURE__*/jsxRuntime.jsxs(HStack, {
3840
+ space: children ? 'kitt.2' : undefined,
3841
+ alignItems: "center",
3842
+ children: [/*#__PURE__*/jsxRuntime.jsx(OuterCircle, {
3843
+ isChecked: checked,
3844
+ isDisabled: disabled,
3845
+ isHovered: isHovered,
3846
+ isFocused: isFocused,
3847
+ isPressed: isPressed,
3848
+ children: /*#__PURE__*/jsxRuntime.jsx(InnerCircle, {
3849
+ isChecked: checked
3850
+ })
3851
+ }), children ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
3852
+ base: "body",
3853
+ color: disabled ? 'black-light' : 'black',
3854
+ children: children
3855
+ }) : null]
3856
+ })
3693
3857
  });
3694
- }
3858
+ });
3695
3859
 
3696
3860
  function getCurrentBackgroundColor({
3697
3861
  isFocused,
@@ -3935,17 +4099,17 @@ function RadioButtonGroup({
3935
4099
  }
3936
4100
  RadioButtonGroup.RadioButton = RadioButtonGroupItem;
3937
4101
 
3938
- function TextArea({
4102
+ const TextArea = /*#__PURE__*/react.forwardRef(({
3939
4103
  ...props
3940
- }) {
3941
- const theme = /*#__PURE__*/styled.useTheme();
4104
+ }, ref) => {
3942
4105
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
4106
+ ref: ref,
3943
4107
  multiline: true,
3944
4108
  textAlignVertical: "top",
3945
- minHeight: theme.kitt.forms.textArea.minHeight,
4109
+ minHeight: "kitt.forms.textArea.minHeight",
3946
4110
  ...props
3947
4111
  });
3948
- }
4112
+ });
3949
4113
 
3950
4114
  function Highlight({
3951
4115
  variant = 'regular',
@@ -4780,9 +4944,13 @@ Modal.Body = ModalBody;
4780
4944
  Modal.Footer = ModalFooter;
4781
4945
 
4782
4946
  const createKittSpaces = spacing => {
4783
- const sizes = {};
4947
+ const sizes = {
4948
+ positive: {},
4949
+ negative: {}
4950
+ };
4784
4951
  for (let size = 1; size <= 64; size++) {
4785
- sizes[`kitt.${size}`] = size * spacing;
4952
+ sizes.positive[`kitt.${size}`] = size * spacing;
4953
+ sizes.negative[`-kitt.${size}`] = -size * spacing;
4786
4954
  }
4787
4955
  return sizes;
4788
4956
  };
@@ -4829,10 +4997,62 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4829
4997
  backgroundColor: theme.forms.radioButtonGroup.item.backgroundColor
4830
4998
  }
4831
4999
  },
4832
- skeleton: {
4833
- backgroundColor: theme.skeleton.backgroundColor,
4834
- flareColor: theme.skeleton.flareColor
5000
+ checkbox: {
5001
+ markColor: theme.forms.checkbox.markColor,
5002
+ checked: {
5003
+ backgroundColor: theme.forms.checkbox.checked.backgroundColor,
5004
+ borderColor: theme.forms.checkbox.checked.borderColor
5005
+ },
5006
+ hover: {
5007
+ backgroundColor: theme.forms.checkbox.hover.backgroundColor,
5008
+ borderColor: theme.forms.checkbox.hover.borderColor
5009
+ },
5010
+ pressed: {
5011
+ backgroundColor: theme.forms.checkbox.pressed.backgroundColor,
5012
+ borderColor: theme.forms.checkbox.pressed.borderColor
5013
+ },
5014
+ focus: {
5015
+ backgroundColor: theme.forms.checkbox.focus.backgroundColor,
5016
+ borderColor: theme.forms.checkbox.focus.borderColor
5017
+ },
5018
+ default: {
5019
+ backgroundColor: theme.forms.checkbox.default.backgroundColor,
5020
+ borderColor: theme.forms.checkbox.default.borderColor
5021
+ }
5022
+ },
5023
+ radio: {
5024
+ checked: {
5025
+ backgroundColor: theme.forms.radio.checked.backgroundColor,
5026
+ borderColor: theme.forms.radio.checked.borderColor
5027
+ },
5028
+ hover: {
5029
+ backgroundColor: theme.forms.radio.hover.backgroundColor,
5030
+ borderColor: theme.forms.radio.hover.borderColor
5031
+ },
5032
+ pressed: {
5033
+ backgroundColor: theme.forms.radio.pressed.backgroundColor,
5034
+ borderColor: theme.forms.radio.pressed.borderColor
5035
+ },
5036
+ focus: {
5037
+ backgroundColor: theme.forms.radio.pressed.backgroundColor,
5038
+ borderColor: theme.forms.radio.pressed.borderColor
5039
+ },
5040
+ disabled: {
5041
+ backgroundColor: theme.forms.radio.disabled.backgroundColor,
5042
+ borderColor: theme.forms.radio.disabled.borderColor
5043
+ },
5044
+ default: {
5045
+ backgroundColor: theme.forms.radio.unchecked.backgroundColor,
5046
+ borderColor: theme.forms.radio.unchecked.borderColor
5047
+ },
5048
+ innerCircle: {
5049
+ backgroundColor: theme.forms.radio.checked.innerBackgroundColor
5050
+ }
4835
5051
  }
5052
+ },
5053
+ skeleton: {
5054
+ backgroundColor: theme.skeleton.backgroundColor,
5055
+ flareColor: theme.skeleton.flareColor
4836
5056
  }
4837
5057
  },
4838
5058
  app: appTheme?.colors
@@ -4845,7 +5065,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4845
5065
  xl: Number.MAX_SAFE_INTEGER,
4846
5066
  xs: Number.MAX_SAFE_INTEGER,
4847
5067
  // Allow values like kitt.X
4848
- ...spaces,
5068
+ ...spaces.positive,
4849
5069
  kitt: {
4850
5070
  avatar: {
4851
5071
  borderRadius: theme.avatar.borderRadius,
@@ -4874,6 +5094,15 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4874
5094
  item: {
4875
5095
  borderRadius: theme.forms.radioButtonGroup.item.borderRadius
4876
5096
  }
5097
+ },
5098
+ checkbox: {
5099
+ borderRadius: theme.forms.checkbox.borderRadius
5100
+ },
5101
+ radio: {
5102
+ borderRadius: theme.forms.radio.size * 0.5,
5103
+ innerCircle: {
5104
+ borderRadius: theme.forms.radio.checked.innerSize * 0.5
5105
+ }
4877
5106
  }
4878
5107
  },
4879
5108
  tooltip: {
@@ -4908,6 +5137,12 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4908
5137
  item: {
4909
5138
  borderWidth: theme.forms.radioButtonGroup.item.borderWidth
4910
5139
  }
5140
+ },
5141
+ checkbox: {
5142
+ borderWidth: theme.forms.checkbox.borderWidth
5143
+ },
5144
+ radio: {
5145
+ borderWidth: theme.forms.radio.unchecked.borderWidth
4911
5146
  }
4912
5147
  },
4913
5148
  cardModal: {
@@ -4922,7 +5157,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4922
5157
  app: appTheme?.borderWidths
4923
5158
  },
4924
5159
  sizes: {
4925
- ...spaces,
5160
+ ...spaces.positive,
5161
+ ...spaces.negative,
4926
5162
  ...overridenNativeBaseSizeandSpaceScale,
4927
5163
  kitt: {
4928
5164
  avatar: {
@@ -4969,6 +5205,21 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4969
5205
  item: {
4970
5206
  minHeight: theme.forms.radioButtonGroup.item.minHeight
4971
5207
  }
5208
+ },
5209
+ checkbox: {
5210
+ height: theme.forms.checkbox.height,
5211
+ width: theme.forms.checkbox.width,
5212
+ iconSize: theme.forms.checkbox.iconSize,
5213
+ textSpacing: theme.forms.checkbox.textSpacing
5214
+ },
5215
+ radio: {
5216
+ size: theme.forms.radio.size,
5217
+ innerCircle: {
5218
+ size: theme.forms.radio.checked.innerSize
5219
+ }
5220
+ },
5221
+ textArea: {
5222
+ minHeight: theme.forms.textArea.minHeight
4972
5223
  }
4973
5224
  },
4974
5225
  iconButton: {
@@ -4998,7 +5249,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
4998
5249
  app: appTheme?.sizes
4999
5250
  },
5000
5251
  space: {
5001
- ...spaces,
5252
+ ...spaces.positive,
5253
+ ...spaces.negative,
5002
5254
  ...overridenNativeBaseSizeandSpaceScale,
5003
5255
  kitt: {
5004
5256
  button: {