@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.
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts +6 -5
- package/dist/definitions/forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/definitions/forms/Checkbox/utils/getBackgroundColor.d.ts +10 -0
- package/dist/definitions/forms/Checkbox/utils/getBackgroundColor.d.ts.map +1 -0
- package/dist/definitions/forms/Checkbox/utils/getBorderColor.d.ts +10 -0
- package/dist/definitions/forms/Checkbox/utils/getBorderColor.d.ts.map +1 -0
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts +5 -2
- package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/InputPart.d.ts +1 -0
- package/dist/definitions/forms/DatePicker/components/InputPart.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts +5 -2
- package/dist/definitions/forms/DatePicker/components/KeyboardDatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts +3 -2
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DatePickerAndroid.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts +3 -2
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/DefaultNativeUIDatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts +3 -2
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/NativeUIDatePicker.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/PressableDateInputs.d.ts +3 -2
- package/dist/definitions/forms/DatePicker/components/PressableDateInputs.d.ts.map +1 -1
- package/dist/definitions/forms/InputEmail/InputEmail.d.ts +3 -2
- package/dist/definitions/forms/InputEmail/InputEmail.d.ts.map +1 -1
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts +3 -2
- package/dist/definitions/forms/InputPassword/InputPassword.d.ts.map +1 -1
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts +3 -2
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/Radio/InnerCircle.d.ts +7 -0
- package/dist/definitions/forms/Radio/InnerCircle.d.ts.map +1 -0
- package/dist/definitions/forms/Radio/OuterCircle.d.ts +12 -0
- package/dist/definitions/forms/Radio/OuterCircle.d.ts.map +1 -0
- package/dist/definitions/forms/Radio/Radio.d.ts +5 -4
- package/dist/definitions/forms/Radio/Radio.d.ts.map +1 -1
- package/dist/definitions/forms/Radio/utils/getBackgroundColor.d.ts +10 -0
- package/dist/definitions/forms/Radio/utils/getBackgroundColor.d.ts.map +1 -0
- package/dist/definitions/forms/Radio/utils/getBorderColor.d.ts +10 -0
- package/dist/definitions/forms/Radio/utils/getBorderColor.d.ts.map +1 -0
- package/dist/definitions/forms/TextArea/TextArea.d.ts +3 -2
- package/dist/definitions/forms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +284 -147
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +29 -4
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/checkbox.d.ts +29 -4
- package/dist/definitions/themes/late-ocean/checkbox.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/forms.d.ts +29 -4
- package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/radio.d.ts +13 -0
- package/dist/definitions/themes/late-ocean/radio.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +440 -190
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +440 -190
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +440 -190
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +412 -180
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +433 -172
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +408 -156
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +44 -6
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +44 -6
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +44 -6
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +44 -6
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +44 -6
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +44 -6
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -2240,11 +2240,36 @@ const checkbox = {
|
|
|
2240
2240
|
height: 20,
|
|
2241
2241
|
width: 20,
|
|
2242
2242
|
iconSize: 14,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
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
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
if (
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
return
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
|
|
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.
|
|
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:
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
}
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
})
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
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
|
|
3820
|
+
disabled,
|
|
3673
3821
|
children
|
|
3674
|
-
}) {
|
|
3675
|
-
return /*#__PURE__*/jsxRuntime.
|
|
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:
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
})
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
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
|
-
|
|
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:
|
|
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
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
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: {
|