@ornikar/kitt-universal 29.4.1-canary.ee3a5de11ca14467578621a40a921148838ee329.0 → 29.4.2-canary.0e4f130cb45a177a7fdd9a15817918e986eb8cd4.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 +17 -2
- package/dist/definitions/BaseMessage/BaseMessage.d.ts +1 -1
- package/dist/definitions/BaseMessage/BaseMessage.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalRotationContainer.d.ts +2 -2
- package/dist/definitions/CardModal/CardModalAnimation/CardModalRotationContainer.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/Notification/Notification.d.ts +2 -2
- package/dist/definitions/Notification/Notification.d.ts.map +1 -1
- package/dist/definitions/Overlay/Overlay.d.ts +2 -2
- package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +2 -0
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +1 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +52 -29
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +52 -29
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +45 -23
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +77 -24
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +45 -23
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +77 -24
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +44 -21
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +76 -22
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/codemods/__testfixtures__/illustration-imports/illustration-imports.input.tsx +11 -0
- package/scripts/codemods/__testfixtures__/illustration-imports/illustration-imports.output.tsx +13 -0
- package/scripts/codemods/__tests__/illustration-imports.test.js +12 -0
- package/scripts/codemods/illustration-imports.js +184 -0
|
@@ -3080,6 +3080,7 @@ const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
|
3080
3080
|
|
|
3081
3081
|
const TypographyFamilyContext = /*#__PURE__*/react.createContext(null);
|
|
3082
3082
|
const TypographyTypeContext = /*#__PURE__*/react.createContext(null);
|
|
3083
|
+
const TypographyVariantContext = /*#__PURE__*/react.createContext(undefined);
|
|
3083
3084
|
const TypographyColorContext = /*#__PURE__*/react.createContext('black');
|
|
3084
3085
|
function useTypographyColor() {
|
|
3085
3086
|
return react.useContext(TypographyColorContext);
|
|
@@ -3178,7 +3179,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
|
|
|
3178
3179
|
ThrowErrorIfInvalidVariant(variant, value, 'regular');
|
|
3179
3180
|
resolvedVariant = 'regular';
|
|
3180
3181
|
}
|
|
3181
|
-
webFontWeight[typeName] = resolvedVariant
|
|
3182
|
+
webFontWeight[typeName] = `${typographyFamily}.${resolvedVariant}`;
|
|
3182
3183
|
nativeFontFamily[typeName] = `${typographyFamily}.${resolvedVariant}`;
|
|
3183
3184
|
});
|
|
3184
3185
|
return {
|
|
@@ -3205,24 +3206,36 @@ const TypographyBase = /*#__PURE__*/react.forwardRef(({
|
|
|
3205
3206
|
...otherProps
|
|
3206
3207
|
}, ref) => {
|
|
3207
3208
|
const sx = nativeBase.useSx();
|
|
3209
|
+
|
|
3210
|
+
// ancestors
|
|
3208
3211
|
const typographyFamilyInContext = react.useContext(TypographyFamilyContext);
|
|
3209
3212
|
const typographyTypeInContext = react.useContext(TypographyTypeContext);
|
|
3210
|
-
const
|
|
3213
|
+
const typographyVariantInContext = react.useContext(TypographyVariantContext);
|
|
3214
|
+
|
|
3215
|
+
// family
|
|
3211
3216
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3212
3217
|
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3213
3218
|
const baseOrDefaultToBody = typographyType.base ?? 'body-m';
|
|
3214
3219
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3220
|
+
|
|
3221
|
+
// size
|
|
3215
3222
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
3216
3223
|
...type,
|
|
3217
3224
|
base: baseOrDefaultToBody
|
|
3218
3225
|
});
|
|
3226
|
+
|
|
3227
|
+
// weight
|
|
3228
|
+
|
|
3219
3229
|
const {
|
|
3220
3230
|
webFontWeight,
|
|
3221
3231
|
nativeFontFamily
|
|
3222
3232
|
} = getUniversalFontWeight({
|
|
3223
3233
|
...type,
|
|
3224
3234
|
base: baseOrDefaultToBody
|
|
3225
|
-
}, variant, typographyFamily);
|
|
3235
|
+
}, !variant && typographyType === typographyTypeInContext ? typographyVariantInContext : variant, typographyFamily);
|
|
3236
|
+
|
|
3237
|
+
// color
|
|
3238
|
+
const defaultColor = useTypographyDefaultColor();
|
|
3226
3239
|
const currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
3227
3240
|
const currentColorValue = getTypographyColorValue(currentColor);
|
|
3228
3241
|
const colorStyles = sx({
|
|
@@ -3247,11 +3260,14 @@ const TypographyBase = /*#__PURE__*/react.forwardRef(({
|
|
|
3247
3260
|
...colorStyles,
|
|
3248
3261
|
...otherProps
|
|
3249
3262
|
});
|
|
3250
|
-
const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(
|
|
3251
|
-
value:
|
|
3252
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
3253
|
-
value:
|
|
3254
|
-
children:
|
|
3263
|
+
const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(TypographyVariantContext.Provider, {
|
|
3264
|
+
value: variant,
|
|
3265
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyFamilyContext.Provider, {
|
|
3266
|
+
value: typographyFamily,
|
|
3267
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyTypeContext.Provider, {
|
|
3268
|
+
value: typographyType,
|
|
3269
|
+
children: text
|
|
3270
|
+
})
|
|
3255
3271
|
})
|
|
3256
3272
|
}) : text;
|
|
3257
3273
|
return color ? /*#__PURE__*/jsxRuntime.jsx(TypographyColorContext.Provider, {
|
|
@@ -4105,10 +4121,11 @@ function ModalBehaviour({
|
|
|
4105
4121
|
}
|
|
4106
4122
|
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4107
4123
|
|
|
4108
|
-
|
|
4124
|
+
const Overlay = /*#__PURE__*/react.forwardRef(({
|
|
4109
4125
|
onPress
|
|
4110
|
-
}) {
|
|
4126
|
+
}, ref) => {
|
|
4111
4127
|
return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
|
|
4128
|
+
ref: ref,
|
|
4112
4129
|
accessibilityRole: "none",
|
|
4113
4130
|
position: "absolute",
|
|
4114
4131
|
top: "0",
|
|
@@ -4118,9 +4135,9 @@ function Overlay({
|
|
|
4118
4135
|
backgroundColor: "kitt.overlay.dark",
|
|
4119
4136
|
onPress: onPress
|
|
4120
4137
|
});
|
|
4121
|
-
}
|
|
4138
|
+
});
|
|
4122
4139
|
|
|
4123
|
-
|
|
4140
|
+
const CardModalRotationContainer = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
4124
4141
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4125
4142
|
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4126
4143
|
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
@@ -4130,9 +4147,10 @@ function CardModalRotationContainer(props) {
|
|
|
4130
4147
|
_web: {
|
|
4131
4148
|
maxHeight: '100svh'
|
|
4132
4149
|
},
|
|
4133
|
-
...props
|
|
4150
|
+
...props,
|
|
4151
|
+
ref: ref
|
|
4134
4152
|
});
|
|
4135
|
-
}
|
|
4153
|
+
});
|
|
4136
4154
|
|
|
4137
4155
|
const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4138
4156
|
const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
@@ -4171,6 +4189,10 @@ function CardModalAnimation({
|
|
|
4171
4189
|
onClose,
|
|
4172
4190
|
...props
|
|
4173
4191
|
}) {
|
|
4192
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
4193
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
4194
|
+
const overlayRef = react.useRef(null);
|
|
4195
|
+
const contentRef = react.useRef(null);
|
|
4174
4196
|
const theme = useTheme();
|
|
4175
4197
|
const {
|
|
4176
4198
|
animation
|
|
@@ -4186,13 +4208,16 @@ function CardModalAnimation({
|
|
|
4186
4208
|
justifyContent: "center",
|
|
4187
4209
|
children: [/*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
4188
4210
|
...sharedProps,
|
|
4211
|
+
nodeRef: overlayRef,
|
|
4189
4212
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4190
4213
|
classNames: opacityClassNames$2,
|
|
4191
4214
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4215
|
+
ref: overlayRef,
|
|
4192
4216
|
onPress: onClose
|
|
4193
4217
|
})
|
|
4194
4218
|
}), /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
4195
4219
|
...sharedProps,
|
|
4220
|
+
nodeRef: contentRef,
|
|
4196
4221
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4197
4222
|
classNames: contentAnimationClassNames$1,
|
|
4198
4223
|
onEnter: onEnter,
|
|
@@ -4200,6 +4225,7 @@ function CardModalAnimation({
|
|
|
4200
4225
|
onExit: onExit,
|
|
4201
4226
|
onExited: onExited,
|
|
4202
4227
|
children: /*#__PURE__*/jsxRuntime.jsx(CardModalRotationContainer, {
|
|
4228
|
+
ref: contentRef,
|
|
4203
4229
|
alignItems: "center",
|
|
4204
4230
|
margin: "auto",
|
|
4205
4231
|
children: children
|
|
@@ -4769,6 +4795,10 @@ function DialogModalAnimation({
|
|
|
4769
4795
|
onClose,
|
|
4770
4796
|
...props
|
|
4771
4797
|
}) {
|
|
4798
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
4799
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
4800
|
+
const overlayRef = react.useRef(null);
|
|
4801
|
+
const contentRef = react.useRef(null);
|
|
4772
4802
|
const theme = useTheme();
|
|
4773
4803
|
const {
|
|
4774
4804
|
animation
|
|
@@ -4784,13 +4814,16 @@ function DialogModalAnimation({
|
|
|
4784
4814
|
justifyContent: "center",
|
|
4785
4815
|
children: [/*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
4786
4816
|
...sharedProps,
|
|
4817
|
+
nodeRef: overlayRef,
|
|
4787
4818
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4788
4819
|
classNames: opacityClassNames$1,
|
|
4789
4820
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4821
|
+
ref: overlayRef,
|
|
4790
4822
|
onPress: onClose
|
|
4791
4823
|
})
|
|
4792
4824
|
}), /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
4793
4825
|
...sharedProps,
|
|
4826
|
+
nodeRef: contentRef,
|
|
4794
4827
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4795
4828
|
classNames: contentAnimationClassNames,
|
|
4796
4829
|
onEnter: onEnter,
|
|
@@ -4798,6 +4831,7 @@ function DialogModalAnimation({
|
|
|
4798
4831
|
onExit: onExit,
|
|
4799
4832
|
onExited: onExited,
|
|
4800
4833
|
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4834
|
+
ref: contentRef,
|
|
4801
4835
|
alignItems: "center",
|
|
4802
4836
|
paddingX: "kitt.dialogModal.overlayPadding.horizontal",
|
|
4803
4837
|
paddingY: "kitt.dialogModal.overlayPadding.vertical",
|
|
@@ -7396,6 +7430,10 @@ function FullscreenModalAnimation({
|
|
|
7396
7430
|
onClose,
|
|
7397
7431
|
...props
|
|
7398
7432
|
}) {
|
|
7433
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
7434
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
7435
|
+
const overlayRef = react.useRef(null);
|
|
7436
|
+
const contentRef = react.useRef(null);
|
|
7399
7437
|
const theme = useTheme();
|
|
7400
7438
|
const {
|
|
7401
7439
|
animation
|
|
@@ -7409,20 +7447,26 @@ function FullscreenModalAnimation({
|
|
|
7409
7447
|
...props,
|
|
7410
7448
|
children: [/*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
7411
7449
|
...sharedProps,
|
|
7450
|
+
nodeRef: overlayRef,
|
|
7412
7451
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
7413
7452
|
classNames: opacityClassNames,
|
|
7414
7453
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
7454
|
+
ref: overlayRef,
|
|
7415
7455
|
onPress: onClose
|
|
7416
7456
|
})
|
|
7417
7457
|
}), /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
7418
7458
|
...sharedProps,
|
|
7459
|
+
nodeRef: contentRef,
|
|
7419
7460
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
7420
7461
|
classNames: slideInClassNames,
|
|
7421
7462
|
onEnter: onEnter,
|
|
7422
7463
|
onEntered: onEntered,
|
|
7423
7464
|
onExit: onExit,
|
|
7424
7465
|
onExited: onExited,
|
|
7425
|
-
children:
|
|
7466
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7467
|
+
ref: contentRef,
|
|
7468
|
+
children: children
|
|
7469
|
+
})
|
|
7426
7470
|
})]
|
|
7427
7471
|
});
|
|
7428
7472
|
}
|
|
@@ -8173,16 +8217,17 @@ const getIconButtonColor = messageType => {
|
|
|
8173
8217
|
}
|
|
8174
8218
|
};
|
|
8175
8219
|
|
|
8176
|
-
|
|
8220
|
+
const BaseMessage = /*#__PURE__*/react.forwardRef(({
|
|
8177
8221
|
type = 'info',
|
|
8178
8222
|
children,
|
|
8179
8223
|
hasNoRadius,
|
|
8180
8224
|
centeredText,
|
|
8181
8225
|
insets,
|
|
8182
8226
|
onDismiss
|
|
8183
|
-
}) {
|
|
8227
|
+
}, ref) => {
|
|
8184
8228
|
const color = getColorByType(type);
|
|
8185
8229
|
return /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
8230
|
+
ref: ref,
|
|
8186
8231
|
alignItems: "flex-start",
|
|
8187
8232
|
justifyContent: "space-between",
|
|
8188
8233
|
minHeight: "kitt.feedbackMessage.minHeight",
|
|
@@ -8224,7 +8269,7 @@ function BaseMessage({
|
|
|
8224
8269
|
})
|
|
8225
8270
|
}) : null]
|
|
8226
8271
|
});
|
|
8227
|
-
}
|
|
8272
|
+
});
|
|
8228
8273
|
|
|
8229
8274
|
function Message({
|
|
8230
8275
|
type = 'info',
|
|
@@ -10202,17 +10247,19 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10202
10247
|
fontWeights: {
|
|
10203
10248
|
headings: {
|
|
10204
10249
|
regular: theme.typography.types.headings.fontWeight.regular,
|
|
10250
|
+
semibold: theme.typography.types.headings.fontWeight.semibold,
|
|
10205
10251
|
bold: theme.typography.types.headings.fontWeight.bold
|
|
10206
10252
|
},
|
|
10207
10253
|
bodies: {
|
|
10208
|
-
regular: theme.typography.types.bodies.fontWeight.regular
|
|
10209
|
-
// TODO [
|
|
10254
|
+
regular: theme.typography.types.bodies.fontWeight.regular,
|
|
10255
|
+
// TODO [expo@>=53]: Check if still needed with new expo-fonts version
|
|
10256
|
+
bold: theme.typography.types.bodies.fontWeight.bold
|
|
10210
10257
|
},
|
|
10211
10258
|
labels: {
|
|
10212
10259
|
semibold: theme.typography.types.labels.fontWeight.semibold
|
|
10213
10260
|
},
|
|
10214
10261
|
contentCaps: {
|
|
10215
|
-
// TODO [
|
|
10262
|
+
// TODO [expo@>=53]: Check if still needed with new expo-fonts version
|
|
10216
10263
|
bold: theme.typography.types.contentCaps.fontWeight.bold
|
|
10217
10264
|
}
|
|
10218
10265
|
},
|
|
@@ -10971,14 +11018,15 @@ NavigationBottomSheet.Header = NavigationBottomSheetHeader;
|
|
|
10971
11018
|
NavigationBottomSheet.Body = NavigationBottomSheetBody;
|
|
10972
11019
|
NavigationBottomSheet.Footer = NavigationBottomSheetFooter;
|
|
10973
11020
|
|
|
10974
|
-
|
|
11021
|
+
const Notification = /*#__PURE__*/react.forwardRef(({
|
|
10975
11022
|
type,
|
|
10976
11023
|
children,
|
|
10977
11024
|
centeredText,
|
|
10978
11025
|
insets,
|
|
10979
11026
|
onDismiss
|
|
10980
|
-
}) {
|
|
11027
|
+
}, ref) => {
|
|
10981
11028
|
return /*#__PURE__*/jsxRuntime.jsx(BaseMessage, {
|
|
11029
|
+
ref: ref,
|
|
10982
11030
|
hasNoRadius: true,
|
|
10983
11031
|
type: type,
|
|
10984
11032
|
centeredText: centeredText,
|
|
@@ -10986,7 +11034,7 @@ function Notification({
|
|
|
10986
11034
|
onDismiss: onDismiss,
|
|
10987
11035
|
children: children
|
|
10988
11036
|
});
|
|
10989
|
-
}
|
|
11037
|
+
});
|
|
10990
11038
|
|
|
10991
11039
|
const AnimatedCircle = Animated__default.createAnimatedComponent(Svg.Circle);
|
|
10992
11040
|
function AnimatedLoaderCircle({
|
|
@@ -11247,6 +11295,9 @@ function Picker({
|
|
|
11247
11295
|
onChange,
|
|
11248
11296
|
onClose
|
|
11249
11297
|
}) {
|
|
11298
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
11299
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
11300
|
+
const nodeRef = react.useRef(null);
|
|
11250
11301
|
if ((process.env.NODE_ENV !== "production") && sourceValue !== undefined && !syncStateWithSourceValue) {
|
|
11251
11302
|
throw new Error('Picker: sourceValue prop should only be used with syncStateWithSourceValue prop');
|
|
11252
11303
|
}
|
|
@@ -11358,6 +11409,7 @@ function Picker({
|
|
|
11358
11409
|
},
|
|
11359
11410
|
children: /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
11360
11411
|
unmountOnExit: true,
|
|
11412
|
+
nodeRef: nodeRef,
|
|
11361
11413
|
timeout: 300,
|
|
11362
11414
|
in: isOpen,
|
|
11363
11415
|
classNames: {
|
|
@@ -11367,6 +11419,7 @@ function Picker({
|
|
|
11367
11419
|
exitActive
|
|
11368
11420
|
},
|
|
11369
11421
|
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
11422
|
+
ref: nodeRef,
|
|
11370
11423
|
paddingY: "kitt.2",
|
|
11371
11424
|
children: childrenArray.map((child, index) => {
|
|
11372
11425
|
const currentValue = items[index];
|