@ornikar/kitt-universal 22.1.0 → 22.2.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/CHANGELOG.md +23 -0
- package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalRotationContainer.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalBehaviour.d.ts +0 -5
- package/dist/definitions/CardModal/CardModalBehaviour.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts +2 -2
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/NavigationModal/NavigationModalBehaviour.d.ts.map +1 -1
- package/dist/definitions/forms/InputEmail/InputEmail.d.ts +1 -1
- package/dist/definitions/forms/InputEmail/InputEmail.d.ts.map +1 -1
- package/dist/definitions/forms/InputNumber/InputNumber.d.ts +2 -1
- package/dist/definitions/forms/InputNumber/InputNumber.d.ts.map +1 -1
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts +1 -1
- package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +5 -17
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/cardModal.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +53 -82
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +53 -82
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-18.18.cjs.js +43 -71
- package/dist/index-node-18.18.cjs.js.map +1 -1
- package/dist/index-node-18.18.cjs.web.js +43 -66
- package/dist/index-node-18.18.cjs.web.js.map +1 -1
- package/dist/index-node-18.18.es.mjs +44 -72
- package/dist/index-node-18.18.es.mjs.map +1 -1
- package/dist/index-node-18.18.es.web.mjs +44 -67
- package/dist/index-node-18.18.es.web.mjs.map +1 -1
- package/dist/index.es.js +63 -90
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +63 -85
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +2 -1
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +2 -1
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-18.18.cjs.js +2 -1
- package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
- package/dist/linaria-themes-node-18.18.cjs.web.js +2 -1
- package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-18.18.es.mjs +2 -1
- package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
- package/dist/linaria-themes-node-18.18.es.web.mjs +2 -1
- package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +2 -1
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +2 -1
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ import { CSSTransition } from 'react-transition-group';
|
|
|
9
9
|
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
10
10
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
11
11
|
import { parse } from 'twemoji-parser';
|
|
12
|
-
import { CaretUpFillIcon, CaretDownFillIcon,
|
|
12
|
+
import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
|
|
13
13
|
import Downshift, { useSelect } from 'downshift';
|
|
14
14
|
import { useDebouncedCallback } from 'use-debounce';
|
|
15
15
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
@@ -764,6 +764,7 @@ const cardModal = {
|
|
|
764
764
|
borderRadius: 20,
|
|
765
765
|
maxWidth,
|
|
766
766
|
maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
|
|
767
|
+
minHeight: 280,
|
|
767
768
|
shadow: {
|
|
768
769
|
color: colors.black,
|
|
769
770
|
offsetX: 0,
|
|
@@ -782,7 +783,7 @@ const cardModal = {
|
|
|
782
783
|
},
|
|
783
784
|
overlayPadding: {
|
|
784
785
|
horizontal: 24,
|
|
785
|
-
vertical:
|
|
786
|
+
vertical: 80
|
|
786
787
|
},
|
|
787
788
|
animation: {
|
|
788
789
|
overlay: {
|
|
@@ -3005,6 +3006,10 @@ function CardModalRotationContainer(props) {
|
|
|
3005
3006
|
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
3006
3007
|
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
3007
3008
|
width: "100%",
|
|
3009
|
+
maxHeight: "100%",
|
|
3010
|
+
_web: {
|
|
3011
|
+
maxHeight: '100svh'
|
|
3012
|
+
},
|
|
3008
3013
|
...props
|
|
3009
3014
|
});
|
|
3010
3015
|
}
|
|
@@ -3083,15 +3088,6 @@ function CardModalAnimation({
|
|
|
3083
3088
|
});
|
|
3084
3089
|
}
|
|
3085
3090
|
|
|
3086
|
-
function CardModalScrollContainer({
|
|
3087
|
-
children,
|
|
3088
|
-
...props
|
|
3089
|
-
}) {
|
|
3090
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
3091
|
-
...props,
|
|
3092
|
-
children: children
|
|
3093
|
-
});
|
|
3094
|
-
}
|
|
3095
3091
|
function CardModalBehaviour({
|
|
3096
3092
|
children,
|
|
3097
3093
|
visible,
|
|
@@ -3108,21 +3104,15 @@ function CardModalBehaviour({
|
|
|
3108
3104
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
3109
3105
|
visible: isModalBehaviourVisible,
|
|
3110
3106
|
onClose: onClose,
|
|
3111
|
-
children: /*#__PURE__*/jsx(
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3107
|
+
children: /*#__PURE__*/jsx(CardModalAnimation, {
|
|
3108
|
+
...props,
|
|
3109
|
+
visible: visible,
|
|
3110
|
+
onExited: () => {
|
|
3111
|
+
if (onExited) onExited();
|
|
3112
|
+
setIsModalBehaviourVisible(false);
|
|
3115
3113
|
},
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
visible: visible,
|
|
3119
|
-
onExited: () => {
|
|
3120
|
-
if (onExited) onExited();
|
|
3121
|
-
setIsModalBehaviourVisible(false);
|
|
3122
|
-
},
|
|
3123
|
-
onClose: onClose,
|
|
3124
|
-
children: children
|
|
3125
|
-
})
|
|
3114
|
+
onClose: onClose,
|
|
3115
|
+
children: children
|
|
3126
3116
|
})
|
|
3127
3117
|
});
|
|
3128
3118
|
}
|
|
@@ -3136,7 +3126,8 @@ function CardModalBody({
|
|
|
3136
3126
|
paddingY = 'kitt.4',
|
|
3137
3127
|
...props
|
|
3138
3128
|
}) {
|
|
3139
|
-
return /*#__PURE__*/jsx(
|
|
3129
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
3130
|
+
showsVerticalScrollIndicator: false,
|
|
3140
3131
|
paddingX: paddingX,
|
|
3141
3132
|
paddingY: paddingY,
|
|
3142
3133
|
...props,
|
|
@@ -3236,6 +3227,7 @@ function CardModal({
|
|
|
3236
3227
|
width: "100%",
|
|
3237
3228
|
maxHeight: "100%",
|
|
3238
3229
|
maxWidth: maxWidth,
|
|
3230
|
+
minHeight: "kitt.cardModal.minHeight",
|
|
3239
3231
|
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
3240
3232
|
children: [header || null, body || null, footer || null]
|
|
3241
3233
|
})
|
|
@@ -3839,7 +3831,7 @@ const InputText = /*#__PURE__*/forwardRef(({
|
|
|
3839
3831
|
autoCorrect = true,
|
|
3840
3832
|
textContentType = 'none',
|
|
3841
3833
|
autoComplete = 'off',
|
|
3842
|
-
inputMode = '
|
|
3834
|
+
inputMode = 'text',
|
|
3843
3835
|
multiline,
|
|
3844
3836
|
onSubmitEditing,
|
|
3845
3837
|
...props
|
|
@@ -5175,13 +5167,12 @@ function InputField({
|
|
|
5175
5167
|
|
|
5176
5168
|
const InputNumber = /*#__PURE__*/forwardRef(({
|
|
5177
5169
|
onChange,
|
|
5178
|
-
keyboardType = 'numeric',
|
|
5179
5170
|
...props
|
|
5180
5171
|
}, ref) => {
|
|
5181
5172
|
return /*#__PURE__*/jsx(InputText, {
|
|
5182
5173
|
ref: ref,
|
|
5183
5174
|
...props,
|
|
5184
|
-
|
|
5175
|
+
inputMode: "numeric",
|
|
5185
5176
|
onChange: event => {
|
|
5186
5177
|
if (!onChange) return;
|
|
5187
5178
|
const value = parseFloat(event.nativeEvent.text);
|
|
@@ -5213,7 +5204,7 @@ const InputPassword = /*#__PURE__*/forwardRef(({
|
|
|
5213
5204
|
accessibilityRole: "button",
|
|
5214
5205
|
onPress: () => setIsVisible(prev => !prev),
|
|
5215
5206
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5216
|
-
icon: isVisible ? /*#__PURE__*/jsx(
|
|
5207
|
+
icon: isVisible ? /*#__PURE__*/jsx(EyeClosedRegularIcon, {}) : /*#__PURE__*/jsx(EyeRegularIcon, {})
|
|
5217
5208
|
})
|
|
5218
5209
|
})
|
|
5219
5210
|
});
|
|
@@ -7410,7 +7401,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7410
7401
|
height: theme.cardModal.header.height
|
|
7411
7402
|
},
|
|
7412
7403
|
maxWidth: theme.cardModal.maxWidth,
|
|
7413
|
-
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
|
|
7404
|
+
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
7405
|
+
minHeight: theme.cardModal.minHeight
|
|
7414
7406
|
},
|
|
7415
7407
|
dialogModal: {
|
|
7416
7408
|
maxWidth: theme.dialogModal.maxWidth,
|
|
@@ -7524,7 +7516,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7524
7516
|
padding: theme.button.padding
|
|
7525
7517
|
},
|
|
7526
7518
|
cardModal: {
|
|
7527
|
-
overlayPadding: theme.
|
|
7519
|
+
overlayPadding: theme.cardModal.overlayPadding
|
|
7528
7520
|
},
|
|
7529
7521
|
dialogModal: {
|
|
7530
7522
|
overlayPadding: theme.dialogModal.overlayPadding
|
|
@@ -8349,11 +8341,6 @@ function NativeOnlyFlatList({
|
|
|
8349
8341
|
});
|
|
8350
8342
|
}
|
|
8351
8343
|
|
|
8352
|
-
function SimpleContainer({
|
|
8353
|
-
children
|
|
8354
|
-
}) {
|
|
8355
|
-
return children;
|
|
8356
|
-
}
|
|
8357
8344
|
function NavigationModalBehaviour({
|
|
8358
8345
|
children,
|
|
8359
8346
|
visible,
|
|
@@ -8368,10 +8355,6 @@ function NavigationModalBehaviour({
|
|
|
8368
8355
|
base: FullscreenModalAnimation,
|
|
8369
8356
|
small: CardModalAnimation
|
|
8370
8357
|
});
|
|
8371
|
-
const CurrentContainerComponent = useBreakpointValue({
|
|
8372
|
-
base: SimpleContainer,
|
|
8373
|
-
small: CardModalScrollContainer
|
|
8374
|
-
});
|
|
8375
8358
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
8376
8359
|
const [shouldAppear, setShouldAppear] = useState(appear);
|
|
8377
8360
|
useEffect(() => {
|
|
@@ -8382,34 +8365,28 @@ function NavigationModalBehaviour({
|
|
|
8382
8365
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
8383
8366
|
visible: isModalBehaviourVisible,
|
|
8384
8367
|
onClose: onClose,
|
|
8385
|
-
children: /*#__PURE__*/jsx(
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
...props,
|
|
8392
|
-
appear: shouldAppear,
|
|
8393
|
-
visible: visible,
|
|
8394
|
-
onEnter: () => {
|
|
8395
|
-
if (onEnter) onEnter();
|
|
8368
|
+
children: /*#__PURE__*/jsx(AnimationComponent, {
|
|
8369
|
+
...props,
|
|
8370
|
+
appear: shouldAppear,
|
|
8371
|
+
visible: visible,
|
|
8372
|
+
onEnter: () => {
|
|
8373
|
+
if (onEnter) onEnter();
|
|
8396
8374
|
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8375
|
+
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
8376
|
+
setShouldAppear(false);
|
|
8377
|
+
},
|
|
8378
|
+
onExit: () => {
|
|
8379
|
+
if (onExit) onExit();
|
|
8402
8380
|
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
})
|
|
8381
|
+
// Reset appear value to its original value for future modal display
|
|
8382
|
+
setShouldAppear(appear);
|
|
8383
|
+
},
|
|
8384
|
+
onExited: () => {
|
|
8385
|
+
if (onExited) onExited();
|
|
8386
|
+
setIsModalBehaviourVisible(false);
|
|
8387
|
+
},
|
|
8388
|
+
onClose: onClose,
|
|
8389
|
+
children: children
|
|
8413
8390
|
})
|
|
8414
8391
|
});
|
|
8415
8392
|
}
|