@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.
@@ -3107,6 +3107,7 @@ var getTypographyTypeWithAncestorValue = function (type, typographyTypeInContext
3107
3107
  var _excluded$P = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
3108
3108
  var TypographyFamilyContext = /*#__PURE__*/createContext(null);
3109
3109
  var TypographyTypeContext = /*#__PURE__*/createContext(null);
3110
+ var TypographyVariantContext = /*#__PURE__*/createContext(undefined);
3110
3111
  var TypographyColorContext = /*#__PURE__*/createContext('black');
3111
3112
  function useTypographyColor() {
3112
3113
  return useContext(TypographyColorContext);
@@ -3230,21 +3231,33 @@ var TypographyBase = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3230
3231
  color = _ref2.color,
3231
3232
  otherProps = _objectWithoutProperties(_ref2, _excluded$P);
3232
3233
  var sx = useSx();
3234
+
3235
+ // ancestors
3233
3236
  var typographyFamilyInContext = useContext(TypographyFamilyContext);
3234
3237
  var typographyTypeInContext = useContext(TypographyTypeContext);
3235
- var defaultColor = useTypographyDefaultColor();
3238
+ var typographyVariantInContext = useContext(TypographyVariantContext);
3239
+
3240
+ // family
3236
3241
  var hasTypographyAncestor = typographyFamilyInContext !== null;
3237
3242
  var typographyType = getTypographyTypeWithAncestorValue(type, typographyTypeInContext);
3238
3243
  var baseOrDefaultToBody = (_typographyType$base = typographyType.base) !== null && _typographyType$base !== void 0 ? _typographyType$base : 'body-m';
3239
3244
  var typographyFamily = getTypographyFamilyWithAncestorValue(baseOrDefaultToBody, typographyFamilyInContext);
3245
+
3246
+ // size
3240
3247
  var fontSizeForNativeBase = createNativeBaseFontSize(_objectSpread(_objectSpread({}, type), {}, {
3241
3248
  base: baseOrDefaultToBody
3242
3249
  }));
3250
+
3251
+ // weight
3252
+
3243
3253
  var _getUniversalFontWeig = getUniversalFontWeight(_objectSpread(_objectSpread({}, type), {}, {
3244
3254
  base: baseOrDefaultToBody
3245
- }), variant, typographyFamily),
3255
+ }), !variant && typographyType === typographyTypeInContext ? typographyVariantInContext : variant, typographyFamily),
3246
3256
  webFontWeight = _getUniversalFontWeig.webFontWeight,
3247
3257
  nativeFontFamily = _getUniversalFontWeig.nativeFontFamily;
3258
+
3259
+ // color
3260
+ var defaultColor = useTypographyDefaultColor();
3248
3261
  var currentColor = !color && !hasTypographyAncestor ? defaultColor : color;
3249
3262
  var currentColorValue = getTypographyColorValue(currentColor);
3250
3263
  var colorStyles = sx({
@@ -3270,11 +3283,14 @@ var TypographyBase = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3270
3283
  fontFamily: nativeFontFamily,
3271
3284
  textTransform: typographyFamily === 'contentCaps' ? 'uppercase' : undefined
3272
3285
  }, colorStyles), otherProps));
3273
- var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
3274
- value: typographyFamily,
3275
- children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
3276
- value: typographyType,
3277
- children: text
3286
+ var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyVariantContext.Provider, {
3287
+ value: variant,
3288
+ children: /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
3289
+ value: typographyFamily,
3290
+ children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
3291
+ value: typographyType,
3292
+ children: text
3293
+ })
3278
3294
  })
3279
3295
  }) : text;
3280
3296
  return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {