@ornikar/kitt-universal 29.4.1-canary.ee3a5de11ca14467578621a40a921148838ee329.0 → 29.4.2-canary.5279d6411761af875ca17c9a8eefbb621d15180d.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 +16 -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
|
@@ -3072,6 +3072,7 @@ const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
|
3072
3072
|
|
|
3073
3073
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
3074
3074
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
3075
|
+
const TypographyVariantContext = /*#__PURE__*/createContext(undefined);
|
|
3075
3076
|
const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
3076
3077
|
function useTypographyColor() {
|
|
3077
3078
|
return useContext(TypographyColorContext);
|
|
@@ -3170,7 +3171,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
|
|
|
3170
3171
|
ThrowErrorIfInvalidVariant(variant, value, 'regular');
|
|
3171
3172
|
resolvedVariant = 'regular';
|
|
3172
3173
|
}
|
|
3173
|
-
webFontWeight[typeName] = resolvedVariant
|
|
3174
|
+
webFontWeight[typeName] = `${typographyFamily}.${resolvedVariant}`;
|
|
3174
3175
|
nativeFontFamily[typeName] = `${typographyFamily}.${resolvedVariant}`;
|
|
3175
3176
|
});
|
|
3176
3177
|
return {
|
|
@@ -3197,24 +3198,36 @@ const TypographyBase = /*#__PURE__*/forwardRef(({
|
|
|
3197
3198
|
...otherProps
|
|
3198
3199
|
}, ref) => {
|
|
3199
3200
|
const sx = useSx();
|
|
3201
|
+
|
|
3202
|
+
// ancestors
|
|
3200
3203
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3201
3204
|
const typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3202
|
-
const
|
|
3205
|
+
const typographyVariantInContext = useContext(TypographyVariantContext);
|
|
3206
|
+
|
|
3207
|
+
// family
|
|
3203
3208
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3204
3209
|
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3205
3210
|
const baseOrDefaultToBody = typographyType.base ?? 'body-m';
|
|
3206
3211
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3212
|
+
|
|
3213
|
+
// size
|
|
3207
3214
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
3208
3215
|
...type,
|
|
3209
3216
|
base: baseOrDefaultToBody
|
|
3210
3217
|
});
|
|
3218
|
+
|
|
3219
|
+
// weight
|
|
3220
|
+
|
|
3211
3221
|
const {
|
|
3212
3222
|
webFontWeight,
|
|
3213
3223
|
nativeFontFamily
|
|
3214
3224
|
} = getUniversalFontWeight({
|
|
3215
3225
|
...type,
|
|
3216
3226
|
base: baseOrDefaultToBody
|
|
3217
|
-
}, variant, typographyFamily);
|
|
3227
|
+
}, !variant && typographyType === typographyTypeInContext ? typographyVariantInContext : variant, typographyFamily);
|
|
3228
|
+
|
|
3229
|
+
// color
|
|
3230
|
+
const defaultColor = useTypographyDefaultColor();
|
|
3218
3231
|
const currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
3219
3232
|
const currentColorValue = getTypographyColorValue(currentColor);
|
|
3220
3233
|
const colorStyles = sx({
|
|
@@ -3239,11 +3252,14 @@ const TypographyBase = /*#__PURE__*/forwardRef(({
|
|
|
3239
3252
|
...colorStyles,
|
|
3240
3253
|
...otherProps
|
|
3241
3254
|
});
|
|
3242
|
-
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(
|
|
3243
|
-
value:
|
|
3244
|
-
children: /*#__PURE__*/jsx(
|
|
3245
|
-
value:
|
|
3246
|
-
children:
|
|
3255
|
+
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyVariantContext.Provider, {
|
|
3256
|
+
value: variant,
|
|
3257
|
+
children: /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3258
|
+
value: typographyFamily,
|
|
3259
|
+
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3260
|
+
value: typographyType,
|
|
3261
|
+
children: text
|
|
3262
|
+
})
|
|
3247
3263
|
})
|
|
3248
3264
|
}) : text;
|
|
3249
3265
|
return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {
|
|
@@ -4097,10 +4113,11 @@ function ModalBehaviour({
|
|
|
4097
4113
|
}
|
|
4098
4114
|
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4099
4115
|
|
|
4100
|
-
|
|
4116
|
+
const Overlay = /*#__PURE__*/forwardRef(({
|
|
4101
4117
|
onPress
|
|
4102
|
-
}) {
|
|
4118
|
+
}, ref) => {
|
|
4103
4119
|
return /*#__PURE__*/jsx(Pressable, {
|
|
4120
|
+
ref: ref,
|
|
4104
4121
|
accessibilityRole: "none",
|
|
4105
4122
|
position: "absolute",
|
|
4106
4123
|
top: "0",
|
|
@@ -4110,9 +4127,9 @@ function Overlay({
|
|
|
4110
4127
|
backgroundColor: "kitt.overlay.dark",
|
|
4111
4128
|
onPress: onPress
|
|
4112
4129
|
});
|
|
4113
|
-
}
|
|
4130
|
+
});
|
|
4114
4131
|
|
|
4115
|
-
|
|
4132
|
+
const CardModalRotationContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
4116
4133
|
return /*#__PURE__*/jsx(View, {
|
|
4117
4134
|
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4118
4135
|
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
@@ -4122,9 +4139,10 @@ function CardModalRotationContainer(props) {
|
|
|
4122
4139
|
_web: {
|
|
4123
4140
|
maxHeight: '100svh'
|
|
4124
4141
|
},
|
|
4125
|
-
...props
|
|
4142
|
+
...props,
|
|
4143
|
+
ref: ref
|
|
4126
4144
|
});
|
|
4127
|
-
}
|
|
4145
|
+
});
|
|
4128
4146
|
|
|
4129
4147
|
const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4130
4148
|
const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
@@ -4163,6 +4181,10 @@ function CardModalAnimation({
|
|
|
4163
4181
|
onClose,
|
|
4164
4182
|
...props
|
|
4165
4183
|
}) {
|
|
4184
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
4185
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
4186
|
+
const overlayRef = useRef(null);
|
|
4187
|
+
const contentRef = useRef(null);
|
|
4166
4188
|
const theme = useTheme();
|
|
4167
4189
|
const {
|
|
4168
4190
|
animation
|
|
@@ -4178,13 +4200,16 @@ function CardModalAnimation({
|
|
|
4178
4200
|
justifyContent: "center",
|
|
4179
4201
|
children: [/*#__PURE__*/jsx(CSSTransition, {
|
|
4180
4202
|
...sharedProps,
|
|
4203
|
+
nodeRef: overlayRef,
|
|
4181
4204
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4182
4205
|
classNames: opacityClassNames$2,
|
|
4183
4206
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
4207
|
+
ref: overlayRef,
|
|
4184
4208
|
onPress: onClose
|
|
4185
4209
|
})
|
|
4186
4210
|
}), /*#__PURE__*/jsx(CSSTransition, {
|
|
4187
4211
|
...sharedProps,
|
|
4212
|
+
nodeRef: contentRef,
|
|
4188
4213
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4189
4214
|
classNames: contentAnimationClassNames$1,
|
|
4190
4215
|
onEnter: onEnter,
|
|
@@ -4192,6 +4217,7 @@ function CardModalAnimation({
|
|
|
4192
4217
|
onExit: onExit,
|
|
4193
4218
|
onExited: onExited,
|
|
4194
4219
|
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4220
|
+
ref: contentRef,
|
|
4195
4221
|
alignItems: "center",
|
|
4196
4222
|
margin: "auto",
|
|
4197
4223
|
children: children
|
|
@@ -4761,6 +4787,10 @@ function DialogModalAnimation({
|
|
|
4761
4787
|
onClose,
|
|
4762
4788
|
...props
|
|
4763
4789
|
}) {
|
|
4790
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
4791
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
4792
|
+
const overlayRef = useRef(null);
|
|
4793
|
+
const contentRef = useRef(null);
|
|
4764
4794
|
const theme = useTheme();
|
|
4765
4795
|
const {
|
|
4766
4796
|
animation
|
|
@@ -4776,13 +4806,16 @@ function DialogModalAnimation({
|
|
|
4776
4806
|
justifyContent: "center",
|
|
4777
4807
|
children: [/*#__PURE__*/jsx(CSSTransition, {
|
|
4778
4808
|
...sharedProps,
|
|
4809
|
+
nodeRef: overlayRef,
|
|
4779
4810
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4780
4811
|
classNames: opacityClassNames$1,
|
|
4781
4812
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
4813
|
+
ref: overlayRef,
|
|
4782
4814
|
onPress: onClose
|
|
4783
4815
|
})
|
|
4784
4816
|
}), /*#__PURE__*/jsx(CSSTransition, {
|
|
4785
4817
|
...sharedProps,
|
|
4818
|
+
nodeRef: contentRef,
|
|
4786
4819
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4787
4820
|
classNames: contentAnimationClassNames,
|
|
4788
4821
|
onEnter: onEnter,
|
|
@@ -4790,6 +4823,7 @@ function DialogModalAnimation({
|
|
|
4790
4823
|
onExit: onExit,
|
|
4791
4824
|
onExited: onExited,
|
|
4792
4825
|
children: /*#__PURE__*/jsx(View, {
|
|
4826
|
+
ref: contentRef,
|
|
4793
4827
|
alignItems: "center",
|
|
4794
4828
|
paddingX: "kitt.dialogModal.overlayPadding.horizontal",
|
|
4795
4829
|
paddingY: "kitt.dialogModal.overlayPadding.vertical",
|
|
@@ -7388,6 +7422,10 @@ function FullscreenModalAnimation({
|
|
|
7388
7422
|
onClose,
|
|
7389
7423
|
...props
|
|
7390
7424
|
}) {
|
|
7425
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
7426
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
7427
|
+
const overlayRef = useRef(null);
|
|
7428
|
+
const contentRef = useRef(null);
|
|
7391
7429
|
const theme = useTheme();
|
|
7392
7430
|
const {
|
|
7393
7431
|
animation
|
|
@@ -7401,20 +7439,26 @@ function FullscreenModalAnimation({
|
|
|
7401
7439
|
...props,
|
|
7402
7440
|
children: [/*#__PURE__*/jsx(CSSTransition, {
|
|
7403
7441
|
...sharedProps,
|
|
7442
|
+
nodeRef: overlayRef,
|
|
7404
7443
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
7405
7444
|
classNames: opacityClassNames,
|
|
7406
7445
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
7446
|
+
ref: overlayRef,
|
|
7407
7447
|
onPress: onClose
|
|
7408
7448
|
})
|
|
7409
7449
|
}), /*#__PURE__*/jsx(CSSTransition, {
|
|
7410
7450
|
...sharedProps,
|
|
7451
|
+
nodeRef: contentRef,
|
|
7411
7452
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
7412
7453
|
classNames: slideInClassNames,
|
|
7413
7454
|
onEnter: onEnter,
|
|
7414
7455
|
onEntered: onEntered,
|
|
7415
7456
|
onExit: onExit,
|
|
7416
7457
|
onExited: onExited,
|
|
7417
|
-
children:
|
|
7458
|
+
children: /*#__PURE__*/jsx(View, {
|
|
7459
|
+
ref: contentRef,
|
|
7460
|
+
children: children
|
|
7461
|
+
})
|
|
7418
7462
|
})]
|
|
7419
7463
|
});
|
|
7420
7464
|
}
|
|
@@ -8165,16 +8209,17 @@ const getIconButtonColor = messageType => {
|
|
|
8165
8209
|
}
|
|
8166
8210
|
};
|
|
8167
8211
|
|
|
8168
|
-
|
|
8212
|
+
const BaseMessage = /*#__PURE__*/forwardRef(({
|
|
8169
8213
|
type = 'info',
|
|
8170
8214
|
children,
|
|
8171
8215
|
hasNoRadius,
|
|
8172
8216
|
centeredText,
|
|
8173
8217
|
insets,
|
|
8174
8218
|
onDismiss
|
|
8175
|
-
}) {
|
|
8219
|
+
}, ref) => {
|
|
8176
8220
|
const color = getColorByType(type);
|
|
8177
8221
|
return /*#__PURE__*/jsxs(HStack, {
|
|
8222
|
+
ref: ref,
|
|
8178
8223
|
alignItems: "flex-start",
|
|
8179
8224
|
justifyContent: "space-between",
|
|
8180
8225
|
minHeight: "kitt.feedbackMessage.minHeight",
|
|
@@ -8216,7 +8261,7 @@ function BaseMessage({
|
|
|
8216
8261
|
})
|
|
8217
8262
|
}) : null]
|
|
8218
8263
|
});
|
|
8219
|
-
}
|
|
8264
|
+
});
|
|
8220
8265
|
|
|
8221
8266
|
function Message({
|
|
8222
8267
|
type = 'info',
|
|
@@ -10194,17 +10239,19 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10194
10239
|
fontWeights: {
|
|
10195
10240
|
headings: {
|
|
10196
10241
|
regular: theme.typography.types.headings.fontWeight.regular,
|
|
10242
|
+
semibold: theme.typography.types.headings.fontWeight.semibold,
|
|
10197
10243
|
bold: theme.typography.types.headings.fontWeight.bold
|
|
10198
10244
|
},
|
|
10199
10245
|
bodies: {
|
|
10200
|
-
regular: theme.typography.types.bodies.fontWeight.regular
|
|
10201
|
-
// TODO [
|
|
10246
|
+
regular: theme.typography.types.bodies.fontWeight.regular,
|
|
10247
|
+
// TODO [expo@>=53]: Check if still needed with new expo-fonts version
|
|
10248
|
+
bold: theme.typography.types.bodies.fontWeight.bold
|
|
10202
10249
|
},
|
|
10203
10250
|
labels: {
|
|
10204
10251
|
semibold: theme.typography.types.labels.fontWeight.semibold
|
|
10205
10252
|
},
|
|
10206
10253
|
contentCaps: {
|
|
10207
|
-
// TODO [
|
|
10254
|
+
// TODO [expo@>=53]: Check if still needed with new expo-fonts version
|
|
10208
10255
|
bold: theme.typography.types.contentCaps.fontWeight.bold
|
|
10209
10256
|
}
|
|
10210
10257
|
},
|
|
@@ -10963,14 +11010,15 @@ NavigationBottomSheet.Header = NavigationBottomSheetHeader;
|
|
|
10963
11010
|
NavigationBottomSheet.Body = NavigationBottomSheetBody;
|
|
10964
11011
|
NavigationBottomSheet.Footer = NavigationBottomSheetFooter;
|
|
10965
11012
|
|
|
10966
|
-
|
|
11013
|
+
const Notification = /*#__PURE__*/forwardRef(({
|
|
10967
11014
|
type,
|
|
10968
11015
|
children,
|
|
10969
11016
|
centeredText,
|
|
10970
11017
|
insets,
|
|
10971
11018
|
onDismiss
|
|
10972
|
-
}) {
|
|
11019
|
+
}, ref) => {
|
|
10973
11020
|
return /*#__PURE__*/jsx(BaseMessage, {
|
|
11021
|
+
ref: ref,
|
|
10974
11022
|
hasNoRadius: true,
|
|
10975
11023
|
type: type,
|
|
10976
11024
|
centeredText: centeredText,
|
|
@@ -10978,7 +11026,7 @@ function Notification({
|
|
|
10978
11026
|
onDismiss: onDismiss,
|
|
10979
11027
|
children: children
|
|
10980
11028
|
});
|
|
10981
|
-
}
|
|
11029
|
+
});
|
|
10982
11030
|
|
|
10983
11031
|
const AnimatedCircle = Animated$1.createAnimatedComponent(Circle$1);
|
|
10984
11032
|
function AnimatedLoaderCircle({
|
|
@@ -11239,6 +11287,9 @@ function Picker({
|
|
|
11239
11287
|
onChange,
|
|
11240
11288
|
onClose
|
|
11241
11289
|
}) {
|
|
11290
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
11291
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
11292
|
+
const nodeRef = useRef(null);
|
|
11242
11293
|
if ((process.env.NODE_ENV !== "production") && sourceValue !== undefined && !syncStateWithSourceValue) {
|
|
11243
11294
|
throw new Error('Picker: sourceValue prop should only be used with syncStateWithSourceValue prop');
|
|
11244
11295
|
}
|
|
@@ -11350,6 +11401,7 @@ function Picker({
|
|
|
11350
11401
|
},
|
|
11351
11402
|
children: /*#__PURE__*/jsx(CSSTransition, {
|
|
11352
11403
|
unmountOnExit: true,
|
|
11404
|
+
nodeRef: nodeRef,
|
|
11353
11405
|
timeout: 300,
|
|
11354
11406
|
in: isOpen,
|
|
11355
11407
|
classNames: {
|
|
@@ -11359,6 +11411,7 @@ function Picker({
|
|
|
11359
11411
|
exitActive
|
|
11360
11412
|
},
|
|
11361
11413
|
children: /*#__PURE__*/jsx(View, {
|
|
11414
|
+
ref: nodeRef,
|
|
11362
11415
|
paddingY: "kitt.2",
|
|
11363
11416
|
children: childrenArray.map((child, index) => {
|
|
11364
11417
|
const currentValue = items[index];
|