@ornikar/kitt-universal 29.4.1-canary.cbb5dfd9b37cae9e4b2943cbcdd994e53c1d96d8.0 → 29.4.1
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 +2 -2
- 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 +23 -7
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +23 -7
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +23 -7
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +23 -7
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +23 -7
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +23 -7
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +23 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +23 -7
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [29.4.1
|
|
6
|
+
## [29.4.1](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@29.4.0...@ornikar/kitt-universal@29.4.1) (2025-10-29)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
*
|
|
11
|
+
* **kitt-u/typography:** variants resolver [no-issue] ([#2738](https://github.com/ornikar/kitt/issues/2738)) ([dd3e67a](https://github.com/ornikar/kitt/commit/dd3e67a883f16e740710d34186a72d1e413cc9b7))
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -18,6 +18,7 @@ export type TypographyType = TypographyHeadingType | TypographyBodyType | Typogr
|
|
|
18
18
|
type TypographyVariant = 'regular' | 'semibold' | 'bold';
|
|
19
19
|
export declare function useTypographyColor(): ExtendedTypographyColor;
|
|
20
20
|
export declare function useTypographyAncestorType(): TypographyBreakpointType | null;
|
|
21
|
+
export declare function useTypographyAncestorVariant(): TypographyVariant | undefined;
|
|
21
22
|
declare const TypographyDefaultColorContext: React.Context<ExtendedTypographyColor | undefined>;
|
|
22
23
|
export type TypographyBreakpointType = Partial<KittResponsiveProp<TypographyType>>;
|
|
23
24
|
type NativeBaseTextPropsAcceptedProps = Pick<ITextProps, keyof Except<TextProps, 'accessibilityRole'> | 'textAlign' | 'textTransform' | 'underline' | 'strikeThrough' | NativeBaseAcceptedFlexboxProps> & Pick<TextStyle, 'cursor' | 'transitionProperty' | 'transitionDuration' | 'transitionTimingFunction'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,IAAI,IAAI,MAAM,EAAS,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,M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,CAAC"}
|
|
@@ -3069,6 +3069,7 @@ const getTypographyTypeWithAncestorValue = (type, typographyTypeInContext) => {
|
|
|
3069
3069
|
const _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
3070
3070
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
3071
3071
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
3072
|
+
const TypographyVariantContext = /*#__PURE__*/createContext(undefined);
|
|
3072
3073
|
const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
3073
3074
|
function useTypographyColor() {
|
|
3074
3075
|
return useContext(TypographyColorContext);
|
|
@@ -3195,22 +3196,34 @@ const TypographyBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3195
3196
|
} = _ref,
|
|
3196
3197
|
otherProps = _objectWithoutProperties(_ref, _excluded$R);
|
|
3197
3198
|
const sx = useSx();
|
|
3199
|
+
|
|
3200
|
+
// ancestors
|
|
3198
3201
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3199
3202
|
const typographyTypeInContext = useContext(TypographyTypeContext);
|
|
3200
|
-
const
|
|
3203
|
+
const typographyVariantInContext = useContext(TypographyVariantContext);
|
|
3204
|
+
|
|
3205
|
+
// family
|
|
3201
3206
|
const hasTypographyAncestor = typographyFamilyInContext !== null;
|
|
3202
3207
|
const typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
|
|
3203
3208
|
const baseOrDefaultToBody = (_typographyType$base = typographyType.base) !== null && _typographyType$base !== void 0 ? _typographyType$base : 'body-m';
|
|
3204
3209
|
const typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
|
|
3210
|
+
|
|
3211
|
+
// size
|
|
3205
3212
|
const fontSizeForNativeBase = createNativeBaseFontSize(_objectSpread(_objectSpread({}, type), {}, {
|
|
3206
3213
|
base: baseOrDefaultToBody
|
|
3207
3214
|
}));
|
|
3215
|
+
|
|
3216
|
+
// weight
|
|
3217
|
+
|
|
3208
3218
|
const {
|
|
3209
3219
|
webFontWeight,
|
|
3210
3220
|
nativeFontFamily
|
|
3211
3221
|
} = getUniversalFontWeight(_objectSpread(_objectSpread({}, type), {}, {
|
|
3212
3222
|
base: baseOrDefaultToBody
|
|
3213
|
-
}), variant, typographyFamily);
|
|
3223
|
+
}), !variant && typographyType === typographyTypeInContext ? typographyVariantInContext : variant, typographyFamily);
|
|
3224
|
+
|
|
3225
|
+
// color
|
|
3226
|
+
const defaultColor = useTypographyDefaultColor();
|
|
3214
3227
|
const currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
|
|
3215
3228
|
const currentColorValue = getTypographyColorValue(currentColor);
|
|
3216
3229
|
const colorStyles = sx({
|
|
@@ -3233,11 +3246,14 @@ const TypographyBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3233
3246
|
fontFamily: nativeFontFamily,
|
|
3234
3247
|
textTransform: typographyFamily === 'contentCaps' ? 'uppercase' : undefined
|
|
3235
3248
|
}, colorStyles), otherProps));
|
|
3236
|
-
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(
|
|
3237
|
-
value:
|
|
3238
|
-
children: /*#__PURE__*/jsx(
|
|
3239
|
-
value:
|
|
3240
|
-
children:
|
|
3249
|
+
const content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyVariantContext.Provider, {
|
|
3250
|
+
value: variant,
|
|
3251
|
+
children: /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3252
|
+
value: typographyFamily,
|
|
3253
|
+
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
3254
|
+
value: typographyType,
|
|
3255
|
+
children: text
|
|
3256
|
+
})
|
|
3241
3257
|
})
|
|
3242
3258
|
}) : text;
|
|
3243
3259
|
return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {
|