@yahoo/uds-mobile 2.24.0-beta.1 → 2.24.0-beta.3
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/README.md +29 -0
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Chip/ChipBase.cjs +1 -1
- package/dist/components/Chip/ChipBase.js +1 -1
- package/dist/components/Icon.cjs +17 -4
- package/dist/components/Icon.d.cts +4 -5
- package/dist/components/Icon.d.cts.map +1 -1
- package/dist/components/Icon.d.ts +4 -5
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +17 -4
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Switch.cjs +8 -8
- package/dist/components/Switch.d.cts.map +1 -1
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +8 -8
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Tabs/Tab.cjs +1 -1
- package/dist/components/Tabs/Tab.js +1 -1
- package/dist/components/Text.d.cts +6 -5
- package/dist/components/Text.d.cts.map +1 -1
- package/dist/components/Text.d.ts +6 -5
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js.map +1 -1
- package/dist/components/UDSProvider.d.cts +4 -3
- package/dist/components/UDSProvider.d.cts.map +1 -1
- package/dist/components/UDSProvider.d.ts +4 -3
- package/dist/components/UDSProvider.d.ts.map +1 -1
- package/dist/components/UDSProvider.js.map +1 -1
- package/dist/fontScaling/FontScalingContext.cjs +4 -3
- package/dist/fontScaling/FontScalingContext.d.cts +4 -3
- package/dist/fontScaling/FontScalingContext.d.cts.map +1 -1
- package/dist/fontScaling/FontScalingContext.d.ts +4 -3
- package/dist/fontScaling/FontScalingContext.d.ts.map +1 -1
- package/dist/fontScaling/FontScalingContext.js +4 -3
- package/dist/fontScaling/FontScalingContext.js.map +1 -1
- package/dist/fontScaling/index.cjs +1 -1
- package/dist/fontScaling/index.js +1 -1
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.cjs +1 -2
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.d.cts +1 -2
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.d.cts.map +1 -1
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.d.ts +1 -2
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.d.ts.map +1 -1
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.js +1 -2
- package/dist/fontScaling/resolveMaxFontSizeMultiplier.js.map +1 -1
- package/dist/fontScaling/types.d.cts +6 -5
- package/dist/fontScaling/types.d.cts.map +1 -1
- package/dist/fontScaling/types.d.ts +6 -5
- package/dist/fontScaling/types.d.ts.map +1 -1
- package/dist/jest/mocks/styles.cjs +1 -0
- package/dist/jest/mocks/styles.d.cts.map +1 -1
- package/dist/jest/mocks/styles.d.ts.map +1 -1
- package/dist/jest/mocks/styles.js +1 -0
- package/dist/jest/mocks/styles.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,11 +16,12 @@ interface TextProps extends TextProps$1 {
|
|
|
16
16
|
/** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */
|
|
17
17
|
variant?: TextVariantProp;
|
|
18
18
|
/**
|
|
19
|
-
* Caps how far this text grows with the OS text-size setting.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* Native's 0, which also overrides
|
|
23
|
-
* inherits its parent's cap.
|
|
19
|
+
* Caps how far this text grows with the OS text-size setting. Every text
|
|
20
|
+
* variant is capped at 2x or below by default, with the largest display and
|
|
21
|
+
* title variants tapering further (see DEFAULT_MAX_FONT_SIZE_MULTIPLIERS).
|
|
22
|
+
* Set null to remove the cap (maps to React Native's 0, which also overrides
|
|
23
|
+
* an inherited cap); inherit-variant text inherits its parent's cap.
|
|
24
|
+
* Override app-wide via UDSFontScalingProvider.
|
|
24
25
|
*/
|
|
25
26
|
maxFontSizeMultiplier?: number | null;
|
|
26
27
|
/** Override the fontFamily independently */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.cts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KAUK,WAAA,GAAc,OAAA,CACjB,WAAA,CAAY,UAAA;AAAA,KAGT,eAAA,GAAkB,WAAA;AAAA,KAIlB,kBAAA;AAAA,UAuBK,SAAA,SAAkB,WAAA;;EAE1B,GAAA,GAAM,GAAA,CAAI,MAAA;EAhCV;EAkCA,KAAA,GAAQ,UAAA;EAnCgB;EAqCxB,OAAA,GAAU,eAAA;EArCO;;;;;AACK
|
|
1
|
+
{"version":3,"file":"Text.d.cts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KAUK,WAAA,GAAc,OAAA,CACjB,WAAA,CAAY,UAAA;AAAA,KAGT,eAAA,GAAkB,WAAA;AAAA,KAIlB,kBAAA;AAAA,UAuBK,SAAA,SAAkB,WAAA;;EAE1B,GAAA,GAAM,GAAA,CAAI,MAAA;EAhCV;EAkCA,KAAA,GAAQ,UAAA;EAnCgB;EAqCxB,OAAA,GAAU,eAAA;EArCO;;;;;AACK;;;EA6CtB,qBAAA;EA1CgC;EA4ChC,UAAA,GAAa,UAAA;EAxCQ;EA0CrB,QAAA,GAAW,UAAA;EA1CU;EA4CrB,UAAA,GAAa,UAAA;EArBL;EAuBR,UAAA,GAAa,UAAA;;EAEb,aAAA,GAAgB,UAAA;EAvBV;EAyBN,SAAA,GAAY,UAAA;EArBF;EAuBV,aAAA,GAAgB,UAAA;EAVL;EAYX,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EAEb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,OAAA,CAAA,oBAAA,CAAA,SAAA"}
|
|
@@ -16,11 +16,12 @@ interface TextProps extends TextProps$1 {
|
|
|
16
16
|
/** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */
|
|
17
17
|
variant?: TextVariantProp;
|
|
18
18
|
/**
|
|
19
|
-
* Caps how far this text grows with the OS text-size setting.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* Native's 0, which also overrides
|
|
23
|
-
* inherits its parent's cap.
|
|
19
|
+
* Caps how far this text grows with the OS text-size setting. Every text
|
|
20
|
+
* variant is capped at 2x or below by default, with the largest display and
|
|
21
|
+
* title variants tapering further (see DEFAULT_MAX_FONT_SIZE_MULTIPLIERS).
|
|
22
|
+
* Set null to remove the cap (maps to React Native's 0, which also overrides
|
|
23
|
+
* an inherited cap); inherit-variant text inherits its parent's cap.
|
|
24
|
+
* Override app-wide via UDSFontScalingProvider.
|
|
24
25
|
*/
|
|
25
26
|
maxFontSizeMultiplier?: number | null;
|
|
26
27
|
/** Override the fontFamily independently */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KAUK,WAAA,GAAc,OAAA,CACjB,WAAA,CAAY,UAAA;AAAA,KAGT,eAAA,GAAkB,WAAA;AAAA,KAIlB,kBAAA;AAAA,UAuBK,SAAA,SAAkB,WAAA;;EAE1B,GAAA,GAAM,GAAA,CAAI,MAAA;EAhCV;EAkCA,KAAA,GAAQ,UAAA;EAnCgB;EAqCxB,OAAA,GAAU,eAAA;EArCO;;;;;AACK
|
|
1
|
+
{"version":3,"file":"Text.d.ts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KAUK,WAAA,GAAc,OAAA,CACjB,WAAA,CAAY,UAAA;AAAA,KAGT,eAAA,GAAkB,WAAA;AAAA,KAIlB,kBAAA;AAAA,UAuBK,SAAA,SAAkB,WAAA;;EAE1B,GAAA,GAAM,GAAA,CAAI,MAAA;EAhCV;EAkCA,KAAA,GAAQ,UAAA;EAnCgB;EAqCxB,OAAA,GAAU,eAAA;EArCO;;;;;AACK;;;EA6CtB,qBAAA;EA1CgC;EA4ChC,UAAA,GAAa,UAAA;EAxCQ;EA0CrB,QAAA,GAAW,UAAA;EA1CU;EA4CrB,UAAA,GAAa,UAAA;EArBL;EAuBR,UAAA,GAAa,UAAA;;EAEb,aAAA,GAAgB,UAAA;EAvBV;EAyBN,SAAA,GAAY,UAAA;EArBF;EAuBV,aAAA,GAAgB,UAAA;EAVL;EAYX,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EAEb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,OAAA,CAAA,oBAAA,CAAA,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["RNText"],"sources":["../../src/components/Text.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';\nimport { Text as RNText } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport { useMaxFontSizeMultiplier } from '../fontScaling/useMaxFontSizeMultiplier';\n\n// TextVariant is a subset of fontFamily that represents typography variants\ntype TextVariant = Exclude<\n NonNullable<StyleProps['fontFamily']>,\n 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono' | 'icons'\n>;\ntype TextVariantProp = TextVariant | 'inherit';\n\n// React Native text decoration line values\n// See: https://reactnative.dev/docs/text-style-props#textdecorationline\ntype TextDecorationLine = 'none' | 'underline' | 'line-through' | 'underline line-through';\n\n// Chinese/Japanese/Korean scripts: Hangul Jamo, CJK radicals + punctuation,\n// Kana, Han ideographs, Hangul syllables, compatibility ideographs, and\n// full/half-width forms.\nconst CJK_RE =\n /[\\u1100-\\u11FF\\u2E80-\\u303F\\u3040-\\u30FF\\u31C0-\\u9FFF\\uAC00-\\uD7AF\\uF900-\\uFAFF\\uFF00-\\uFFEF]/;\n\n/**\n * Detects CJK characters in string children (including strings inside a\n * children array, e.g. from `{city}` interpolation). Nested elements are not\n * inspected - a nested <Text> runs its own detection.\n */\nfunction hasCJKContent(children: ReactNode): boolean {\n if (typeof children === 'string') {\n return CJK_RE.test(children);\n }\n if (Array.isArray(children)) {\n return children.some((child) => typeof child === 'string' && CJK_RE.test(child));\n }\n return false;\n}\n\ninterface TextProps extends RNTextProps {\n /** Ref to the underlying Text element */\n ref?: Ref<RNText>;\n /** Text color from the theme palette */\n color?: StyleProps['color'] | 'inherit';\n /** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */\n variant?: TextVariantProp;\n /**\n * Caps how far this text grows with the OS text-size setting. Display and\n * title variants are capped by default (see DEFAULT_MAX_FONT_SIZE_MULTIPLIERS);\n * reading sizes are uncapped. Set null to remove the cap (maps to React\n * Native's 0, which also overrides an inherited cap); inherit-variant text\n * inherits its parent's cap. Override app-wide via UDSFontScalingProvider.\n */\n maxFontSizeMultiplier?: number | null;\n /** Override the fontFamily independently */\n fontFamily?: StyleProps['fontFamily'];\n /** Override the fontSize independently */\n fontSize?: StyleProps['fontSize'];\n /** Set font weight (not derived from variant) */\n fontWeight?: StyleProps['fontWeight'];\n /** Override the lineHeight independently. Use 'none' to remove the variant lineHeight and let the font's natural line height apply */\n lineHeight?: StyleProps['lineHeight'] | 'none';\n /** Override the letterSpacing independently */\n letterSpacing?: StyleProps['letterSpacing'];\n /** Text alignment (left, center, right) */\n textAlign?: StyleProps['textAlign'];\n /** Set text transform (not derived from variant) */\n textTransform?: StyleProps['textTransform'];\n /** Text decoration (underline, line-through, etc.) */\n textDecorationLine?: TextDecorationLine;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Border\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n // Spacing\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n // Offset\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n // Flex\n flexShrink?: StyleProps['flexShrink'];\n // Vertical Alignment\n verticalAlign?: TextStyle['textAlignVertical'];\n // Size\n height?: number | `${number}%`;\n width?: number | `${number}%`;\n minHeight?: number | `${number}%`;\n maxHeight?: number | `${number}%`;\n minWidth?: number | `${number}%`;\n maxWidth?: number | `${number}%`;\n // Dangerously set props\n dangerouslySetColor?: string;\n}\n\n/**\n * **📝 A text component with UDS styling**\n *\n * @description\n * A styled text component that supports UDS typography variants and colors.\n *\n * @category Display\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Text } from '@yahoo/uds-mobile/Text';\n *\n * <Text variant=\"body1\" color=\"primary\">Hello, World!</Text>\n * <Text variant=\"display1\" fontWeight=\"bold\">Heading</Text>\n * <Text variant=\"label1\" color=\"secondary\">Caption text</Text>\n * ```\n *\n * @usage\n * - Use variant prop to set typography (display1, body1, label1, etc.)\n * - Use color prop to set text color from the palette\n * - Use fontWeight to override the variant's default weight\n *\n * @accessibility\n * - Text is readable by screen readers by default\n * - Use appropriate variant sizes for readability\n * - Ensure sufficient color contrast with background\n *\n * @see {@link Link} for interactive text links\n */\nconst Text = memo(function Text({\n // Text-specific\n color = 'primary',\n variant = 'body1',\n fontFamily,\n fontSize,\n fontWeight,\n lineHeight,\n letterSpacing,\n maxFontSizeMultiplier,\n textAlign,\n textTransform,\n textDecorationLine,\n style,\n // Background\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n // Vertical Alignment\n verticalAlign,\n // Size\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n // Dangerously set props\n dangerouslySetColor,\n ref,\n children,\n // Rest\n ...props\n}: TextProps) {\n const resolvedColor = color === 'inherit' ? undefined : color;\n const resolvedVariant = variant === 'inherit' ? undefined : variant;\n const resolvedFontFamily = fontFamily ?? resolvedVariant;\n const resolvedFontSize = fontSize ?? resolvedVariant;\n // React Native clips glyphs when lineHeight is smaller than the font's\n // natural line box. CJK fallback fonts are ~1.4x taller than Latin ones, so\n // Latin-tuned variant lineHeights clip CJK text - drop the variant lineHeight\n // for CJK content so the line grows to fit.\n const resolvedLineHeight =\n lineHeight === 'none'\n ? undefined\n : (lineHeight ?? (hasCJKContent(children) ? undefined : resolvedVariant));\n const resolvedLetterSpacing = letterSpacing ?? resolvedVariant;\n // Explicit prop wins, including explicit null (?? would swallow it).\n const resolvedMaxFontSizeMultiplier = useMaxFontSizeMultiplier(\n resolvedVariant,\n maxFontSizeMultiplier,\n );\n\n styles.useVariants({\n // Text styles\n color: resolvedColor,\n fontFamily: resolvedFontFamily,\n fontSize: resolvedFontSize,\n fontWeight,\n lineHeight: resolvedLineHeight,\n letterSpacing: resolvedLetterSpacing,\n textAlign,\n textTransform,\n // Background\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change.\n const computedStyle: StyleProp<TextStyle> = useMemo(\n () => [\n textDecorationLine ? { textDecorationLine } : undefined,\n dangerouslySetColor ? { color: dangerouslySetColor } : undefined,\n verticalAlign ? { textAlignVertical: verticalAlign } : undefined,\n height ? { height } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n width ? { width } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n styles.foundation,\n style,\n ],\n [\n textDecorationLine,\n dangerouslySetColor,\n verticalAlign,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n style,\n styles.foundation,\n ],\n );\n\n return (\n <RNText\n ref={ref}\n style={computedStyle}\n maxFontSizeMultiplier={resolvedMaxFontSizeMultiplier}\n {...props}\n >\n {children}\n </RNText>\n );\n});\n\nText.displayName = 'Text';\n\nexport { Text, type TextProps, type TextVariant };\n"],"mappings":";;;;;;;AAuBA,MAAM,SACJ;;;;;;AAOF,SAAS,cAAc,UAA8B;CACnD,IAAI,OAAO,aAAa,UACtB,OAAO,OAAO,KAAK,SAAS;CAE9B,IAAI,MAAM,QAAQ,SAAS,EACzB,OAAO,SAAS,MAAM,UAAU,OAAO,UAAU,YAAY,OAAO,KAAK,MAAM,CAAC;CAElF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHT,MAAM,OAAO,KAAK,SAAS,KAAK,EAE9B,QAAQ,WACR,UAAU,SACV,YACA,UACA,YACA,YACA,eACA,uBACA,WACA,eACA,oBACA,OAEA,iBAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,SACA,mBACA,iBACA,eACA,YACA,cACA,YAEA,QACA,gB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}
|
|
1
|
+
{"version":3,"file":"Text.js","names":["RNText"],"sources":["../../src/components/Text.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';\nimport { Text as RNText } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport { useMaxFontSizeMultiplier } from '../fontScaling/useMaxFontSizeMultiplier';\n\n// TextVariant is a subset of fontFamily that represents typography variants\ntype TextVariant = Exclude<\n NonNullable<StyleProps['fontFamily']>,\n 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono' | 'icons'\n>;\ntype TextVariantProp = TextVariant | 'inherit';\n\n// React Native text decoration line values\n// See: https://reactnative.dev/docs/text-style-props#textdecorationline\ntype TextDecorationLine = 'none' | 'underline' | 'line-through' | 'underline line-through';\n\n// Chinese/Japanese/Korean scripts: Hangul Jamo, CJK radicals + punctuation,\n// Kana, Han ideographs, Hangul syllables, compatibility ideographs, and\n// full/half-width forms.\nconst CJK_RE =\n /[\\u1100-\\u11FF\\u2E80-\\u303F\\u3040-\\u30FF\\u31C0-\\u9FFF\\uAC00-\\uD7AF\\uF900-\\uFAFF\\uFF00-\\uFFEF]/;\n\n/**\n * Detects CJK characters in string children (including strings inside a\n * children array, e.g. from `{city}` interpolation). Nested elements are not\n * inspected - a nested <Text> runs its own detection.\n */\nfunction hasCJKContent(children: ReactNode): boolean {\n if (typeof children === 'string') {\n return CJK_RE.test(children);\n }\n if (Array.isArray(children)) {\n return children.some((child) => typeof child === 'string' && CJK_RE.test(child));\n }\n return false;\n}\n\ninterface TextProps extends RNTextProps {\n /** Ref to the underlying Text element */\n ref?: Ref<RNText>;\n /** Text color from the theme palette */\n color?: StyleProps['color'] | 'inherit';\n /** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */\n variant?: TextVariantProp;\n /**\n * Caps how far this text grows with the OS text-size setting. Every text\n * variant is capped at 2x or below by default, with the largest display and\n * title variants tapering further (see DEFAULT_MAX_FONT_SIZE_MULTIPLIERS).\n * Set null to remove the cap (maps to React Native's 0, which also overrides\n * an inherited cap); inherit-variant text inherits its parent's cap.\n * Override app-wide via UDSFontScalingProvider.\n */\n maxFontSizeMultiplier?: number | null;\n /** Override the fontFamily independently */\n fontFamily?: StyleProps['fontFamily'];\n /** Override the fontSize independently */\n fontSize?: StyleProps['fontSize'];\n /** Set font weight (not derived from variant) */\n fontWeight?: StyleProps['fontWeight'];\n /** Override the lineHeight independently. Use 'none' to remove the variant lineHeight and let the font's natural line height apply */\n lineHeight?: StyleProps['lineHeight'] | 'none';\n /** Override the letterSpacing independently */\n letterSpacing?: StyleProps['letterSpacing'];\n /** Text alignment (left, center, right) */\n textAlign?: StyleProps['textAlign'];\n /** Set text transform (not derived from variant) */\n textTransform?: StyleProps['textTransform'];\n /** Text decoration (underline, line-through, etc.) */\n textDecorationLine?: TextDecorationLine;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Border\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n // Spacing\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n // Offset\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n // Flex\n flexShrink?: StyleProps['flexShrink'];\n // Vertical Alignment\n verticalAlign?: TextStyle['textAlignVertical'];\n // Size\n height?: number | `${number}%`;\n width?: number | `${number}%`;\n minHeight?: number | `${number}%`;\n maxHeight?: number | `${number}%`;\n minWidth?: number | `${number}%`;\n maxWidth?: number | `${number}%`;\n // Dangerously set props\n dangerouslySetColor?: string;\n}\n\n/**\n * **📝 A text component with UDS styling**\n *\n * @description\n * A styled text component that supports UDS typography variants and colors.\n *\n * @category Display\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Text } from '@yahoo/uds-mobile/Text';\n *\n * <Text variant=\"body1\" color=\"primary\">Hello, World!</Text>\n * <Text variant=\"display1\" fontWeight=\"bold\">Heading</Text>\n * <Text variant=\"label1\" color=\"secondary\">Caption text</Text>\n * ```\n *\n * @usage\n * - Use variant prop to set typography (display1, body1, label1, etc.)\n * - Use color prop to set text color from the palette\n * - Use fontWeight to override the variant's default weight\n *\n * @accessibility\n * - Text is readable by screen readers by default\n * - Use appropriate variant sizes for readability\n * - Ensure sufficient color contrast with background\n *\n * @see {@link Link} for interactive text links\n */\nconst Text = memo(function Text({\n // Text-specific\n color = 'primary',\n variant = 'body1',\n fontFamily,\n fontSize,\n fontWeight,\n lineHeight,\n letterSpacing,\n maxFontSizeMultiplier,\n textAlign,\n textTransform,\n textDecorationLine,\n style,\n // Background\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n // Vertical Alignment\n verticalAlign,\n // Size\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n // Dangerously set props\n dangerouslySetColor,\n ref,\n children,\n // Rest\n ...props\n}: TextProps) {\n const resolvedColor = color === 'inherit' ? undefined : color;\n const resolvedVariant = variant === 'inherit' ? undefined : variant;\n const resolvedFontFamily = fontFamily ?? resolvedVariant;\n const resolvedFontSize = fontSize ?? resolvedVariant;\n // React Native clips glyphs when lineHeight is smaller than the font's\n // natural line box. CJK fallback fonts are ~1.4x taller than Latin ones, so\n // Latin-tuned variant lineHeights clip CJK text - drop the variant lineHeight\n // for CJK content so the line grows to fit.\n const resolvedLineHeight =\n lineHeight === 'none'\n ? undefined\n : (lineHeight ?? (hasCJKContent(children) ? undefined : resolvedVariant));\n const resolvedLetterSpacing = letterSpacing ?? resolvedVariant;\n // Explicit prop wins, including explicit null (?? would swallow it).\n const resolvedMaxFontSizeMultiplier = useMaxFontSizeMultiplier(\n resolvedVariant,\n maxFontSizeMultiplier,\n );\n\n styles.useVariants({\n // Text styles\n color: resolvedColor,\n fontFamily: resolvedFontFamily,\n fontSize: resolvedFontSize,\n fontWeight,\n lineHeight: resolvedLineHeight,\n letterSpacing: resolvedLetterSpacing,\n textAlign,\n textTransform,\n // Background\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change.\n const computedStyle: StyleProp<TextStyle> = useMemo(\n () => [\n textDecorationLine ? { textDecorationLine } : undefined,\n dangerouslySetColor ? { color: dangerouslySetColor } : undefined,\n verticalAlign ? { textAlignVertical: verticalAlign } : undefined,\n height ? { height } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n width ? { width } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n styles.foundation,\n style,\n ],\n [\n textDecorationLine,\n dangerouslySetColor,\n verticalAlign,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n style,\n styles.foundation,\n ],\n );\n\n return (\n <RNText\n ref={ref}\n style={computedStyle}\n maxFontSizeMultiplier={resolvedMaxFontSizeMultiplier}\n {...props}\n >\n {children}\n </RNText>\n );\n});\n\nText.displayName = 'Text';\n\nexport { Text, type TextProps, type TextVariant };\n"],"mappings":";;;;;;;AAuBA,MAAM,SACJ;;;;;;AAOF,SAAS,cAAc,UAA8B;CACnD,IAAI,OAAO,aAAa,UACtB,OAAO,OAAO,KAAK,SAAS;CAE9B,IAAI,MAAM,QAAQ,SAAS,EACzB,OAAO,SAAS,MAAM,UAAU,OAAO,UAAU,YAAY,OAAO,KAAK,MAAM,CAAC;CAElF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoHT,MAAM,OAAO,KAAK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,KAAA;GACpB,WAAW,EAAE,UAAU,GAAG,KAAA;GAC1B,WAAW,EAAE,UAAU,GAAG,KAAA;GAC1B,OAAO;GACP;GACD,EACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACR,CAMqB;EACpB,uBAAuB;EACvB,GAAI;EAEH;EACM,CAAA;EAEX;AAEF,KAAK,cAAc"}
|
|
@@ -8,9 +8,10 @@ interface UDSGestureProviderProps {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* App-wide font-scaling caps, overriding the built-in defaults. Omit to use
|
|
11
|
-
* the defaults (
|
|
12
|
-
* internals capped at 2x).
|
|
13
|
-
* memoized) — every UDS text
|
|
11
|
+
* the defaults (every text style capped at 2x or below, with the largest
|
|
12
|
+
* display/title tiers tapered further, and control internals capped at 2x).
|
|
13
|
+
* Should be identity-stable (a module constant or memoized) — every UDS text
|
|
14
|
+
* element reads it from context.
|
|
14
15
|
*/
|
|
15
16
|
fontScaling?: FontScalingConfig;
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.d.cts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;;UASU,uBAAA;EACR,QAAA,EAAU,SAAA;;AAJkD
|
|
1
|
+
{"version":3,"file":"UDSProvider.d.cts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;;UASU,uBAAA;EACR,QAAA,EAAU,SAAA;;AAJkD;;;;;;EAY5D,WAAA,GAAc,iBAAA;AAAA;;;AAAiB;;;;;AAqBT;;;;;AAiCxB;;;;;;cAjCM,kBAAA,EAAkB,OAAA,CAAA,oBAAA,CAAA,uBAAA;;;;cAoBlB,WAAA,EAAW,OAAA,CAAA,oBAAA,CAAA,uBAAA;;;;KAaL,gBAAA,GAAmB,uBAAA"}
|
|
@@ -8,9 +8,10 @@ interface UDSGestureProviderProps {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* App-wide font-scaling caps, overriding the built-in defaults. Omit to use
|
|
11
|
-
* the defaults (
|
|
12
|
-
* internals capped at 2x).
|
|
13
|
-
* memoized) — every UDS text
|
|
11
|
+
* the defaults (every text style capped at 2x or below, with the largest
|
|
12
|
+
* display/title tiers tapered further, and control internals capped at 2x).
|
|
13
|
+
* Should be identity-stable (a module constant or memoized) — every UDS text
|
|
14
|
+
* element reads it from context.
|
|
14
15
|
*/
|
|
15
16
|
fontScaling?: FontScalingConfig;
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.d.ts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;;UASU,uBAAA;EACR,QAAA,EAAU,SAAA;;AAJkD
|
|
1
|
+
{"version":3,"file":"UDSProvider.d.ts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;;UASU,uBAAA;EACR,QAAA,EAAU,SAAA;;AAJkD;;;;;;EAY5D,WAAA,GAAc,iBAAA;AAAA;;;AAAiB;;;;;AAqBT;;;;;AAiCxB;;;;;;cAjCM,kBAAA,EAAkB,OAAA,CAAA,oBAAA,CAAA,uBAAA;;;;cAoBlB,WAAA,EAAW,OAAA,CAAA,oBAAA,CAAA,uBAAA;;;;KAaL,gBAAA,GAAmB,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.js","names":[],"sources":["../../src/components/UDSProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\nimport { UDSFontScalingProvider } from '../fontScaling/FontScalingContext';\nimport type { FontScalingConfig } from '../fontScaling/types';\nimport { PortalProvider } from '../portal';\n\ninterface UDSGestureProviderProps {\n children: ReactNode;\n /**\n * App-wide font-scaling caps, overriding the built-in defaults. Omit to use\n * the defaults (
|
|
1
|
+
{"version":3,"file":"UDSProvider.js","names":[],"sources":["../../src/components/UDSProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\nimport { UDSFontScalingProvider } from '../fontScaling/FontScalingContext';\nimport type { FontScalingConfig } from '../fontScaling/types';\nimport { PortalProvider } from '../portal';\n\ninterface UDSGestureProviderProps {\n children: ReactNode;\n /**\n * App-wide font-scaling caps, overriding the built-in defaults. Omit to use\n * the defaults (every text style capped at 2x or below, with the largest\n * display/title tiers tapered further, and control internals capped at 2x).\n * Should be identity-stable (a module constant or memoized) — every UDS text\n * element reads it from context.\n */\n fontScaling?: FontScalingConfig;\n}\n\n/**\n * Root gesture and portal provider for UDS Mobile overlays.\n *\n * Place this at the top of your app layout:\n *\n * @example\n * ```tsx\n * import { UDSGestureProvider } from '@yahoo/uds-mobile/UDSGestureProvider';\n *\n * export default function RootLayout() {\n * return (\n * <UDSGestureProvider>\n * <Stack />\n * </UDSGestureProvider>\n * );\n * }\n * ```\n */\nconst UDSGestureProvider = memo(function UDSGestureProvider({\n children,\n fontScaling,\n}: UDSGestureProviderProps) {\n return (\n <GestureHandlerRootView style={styles.root}>\n <PortalProvider>\n {fontScaling ? (\n <UDSFontScalingProvider config={fontScaling}>{children}</UDSFontScalingProvider>\n ) : (\n children\n )}\n </PortalProvider>\n </GestureHandlerRootView>\n );\n});\n\n/**\n * @deprecated Use {@link UDSGestureProvider} from `@yahoo/uds-mobile/UDSGestureProvider`.\n */\nconst UDSProvider = UDSGestureProvider;\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n },\n});\n\nexport { UDSGestureProvider, UDSProvider };\nexport type { UDSGestureProviderProps };\n/**\n * @deprecated Use {@link UDSGestureProviderProps}.\n */\nexport type UDSProviderProps = UDSGestureProviderProps;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,qBAAqB,KAAK,SAAS,mBAAmB,EAC1D,UACA,eAC0B;CAC1B,OACE,oBAAC,wBAAD;EAAwB,OAAO,OAAO;YACpC,oBAAC,gBAAD,EAAA,UACG,cACC,oBAAC,wBAAD;GAAwB,QAAQ;GAAc;GAAkC,CAAA,GAEhF,UAEa,CAAA;EACM,CAAA;EAE3B;;;;AAKF,MAAM,cAAc;AAEpB,MAAM,SAAS,WAAW,OAAO,EAC/B,MAAM,EACJ,MAAM,GACP,EACF,CAAC"}
|
|
@@ -10,9 +10,10 @@ const FontScalingContext = (0, react.createContext)(void 0);
|
|
|
10
10
|
*
|
|
11
11
|
* @description
|
|
12
12
|
* Configures how UDS text and controls respond to the OS text-size setting.
|
|
13
|
-
* Without a provider, built-in defaults apply (
|
|
14
|
-
*
|
|
15
|
-
* once at the root via the
|
|
13
|
+
* Without a provider, built-in defaults apply (every text style is capped at
|
|
14
|
+
* 2x or below, with the largest display/title tiers tapered further, and
|
|
15
|
+
* control internals capped at 2x). Most apps set this once at the root via the
|
|
16
|
+
* `fontScaling` prop on `UDSGestureProvider`.
|
|
16
17
|
*
|
|
17
18
|
* @example
|
|
18
19
|
* ```tsx
|
|
@@ -19,9 +19,10 @@ interface UDSFontScalingProviderProps {
|
|
|
19
19
|
*
|
|
20
20
|
* @description
|
|
21
21
|
* Configures how UDS text and controls respond to the OS text-size setting.
|
|
22
|
-
* Without a provider, built-in defaults apply (
|
|
23
|
-
*
|
|
24
|
-
* once at the root via the
|
|
22
|
+
* Without a provider, built-in defaults apply (every text style is capped at
|
|
23
|
+
* 2x or below, with the largest display/title tiers tapered further, and
|
|
24
|
+
* control internals capped at 2x). Most apps set this once at the root via the
|
|
25
|
+
* `fontScaling` prop on `UDSGestureProvider`.
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
27
28
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontScalingContext.d.cts","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"mappings":";;;;;;cAMM,kBAAA,EAAkB,OAAA,CAAA,OAAA,CAAA,iBAAA;AAAA,UAEd,2BAAA;;AALuC;;;;EAW/C,MAAA,EAAQ,iBAAA;EACR,QAAA,EAAU,SAAA;AAAA;;;;;;;;;AAAS
|
|
1
|
+
{"version":3,"file":"FontScalingContext.d.cts","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"mappings":";;;;;;cAMM,kBAAA,EAAkB,OAAA,CAAA,OAAA,CAAA,iBAAA;AAAA,UAEd,2BAAA;;AALuC;;;;EAW/C,MAAA,EAAQ,iBAAA;EACR,QAAA,EAAU,SAAA;AAAA;;;;;;;;;AAAS;;;;;;;;;;;cAsBf,sBAAA,EAAsB,OAAA,CAAA,oBAAA,CAAA,2BAAA"}
|
|
@@ -19,9 +19,10 @@ interface UDSFontScalingProviderProps {
|
|
|
19
19
|
*
|
|
20
20
|
* @description
|
|
21
21
|
* Configures how UDS text and controls respond to the OS text-size setting.
|
|
22
|
-
* Without a provider, built-in defaults apply (
|
|
23
|
-
*
|
|
24
|
-
* once at the root via the
|
|
22
|
+
* Without a provider, built-in defaults apply (every text style is capped at
|
|
23
|
+
* 2x or below, with the largest display/title tiers tapered further, and
|
|
24
|
+
* control internals capped at 2x). Most apps set this once at the root via the
|
|
25
|
+
* `fontScaling` prop on `UDSGestureProvider`.
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
27
28
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontScalingContext.d.ts","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"mappings":";;;;;;cAMM,kBAAA,EAAkB,OAAA,CAAA,OAAA,CAAA,iBAAA;AAAA,UAEd,2BAAA;;AALuC;;;;EAW/C,MAAA,EAAQ,iBAAA;EACR,QAAA,EAAU,SAAA;AAAA;;;;;;;;;AAAS
|
|
1
|
+
{"version":3,"file":"FontScalingContext.d.ts","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"mappings":";;;;;;cAMM,kBAAA,EAAkB,OAAA,CAAA,OAAA,CAAA,iBAAA;AAAA,UAEd,2BAAA;;AALuC;;;;EAW/C,MAAA,EAAQ,iBAAA;EACR,QAAA,EAAU,SAAA;AAAA;;;;;;;;;AAAS;;;;;;;;;;;cAsBf,sBAAA,EAAsB,OAAA,CAAA,oBAAA,CAAA,2BAAA"}
|
|
@@ -8,9 +8,10 @@ const FontScalingContext = createContext(void 0);
|
|
|
8
8
|
*
|
|
9
9
|
* @description
|
|
10
10
|
* Configures how UDS text and controls respond to the OS text-size setting.
|
|
11
|
-
* Without a provider, built-in defaults apply (
|
|
12
|
-
*
|
|
13
|
-
* once at the root via the
|
|
11
|
+
* Without a provider, built-in defaults apply (every text style is capped at
|
|
12
|
+
* 2x or below, with the largest display/title tiers tapered further, and
|
|
13
|
+
* control internals capped at 2x). Most apps set this once at the root via the
|
|
14
|
+
* `fontScaling` prop on `UDSGestureProvider`.
|
|
14
15
|
*
|
|
15
16
|
* @example
|
|
16
17
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontScalingContext.js","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { createContext, memo } from 'react';\n\nimport type { FontScalingConfig } from './types';\n\n// undefined = no provider mounted; built-in defaults apply.\nconst FontScalingContext = createContext<FontScalingConfig | undefined>(undefined);\n\ninterface UDSFontScalingProviderProps {\n /**\n * Font-scaling caps for the subtree. Should be identity-stable (a module\n * constant or memoized) — every UDS text element reads it from context.\n * The nearest provider wins wholesale; configs are not merged.\n */\n config: FontScalingConfig;\n children: ReactNode;\n}\n\n/**\n * **🔠 Overrides UDS font-scaling caps for a subtree**\n *\n * @description\n * Configures how UDS text and controls respond to the OS text-size setting.\n * Without a provider, built-in defaults apply (
|
|
1
|
+
{"version":3,"file":"FontScalingContext.js","names":[],"sources":["../../src/fontScaling/FontScalingContext.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { createContext, memo } from 'react';\n\nimport type { FontScalingConfig } from './types';\n\n// undefined = no provider mounted; built-in defaults apply.\nconst FontScalingContext = createContext<FontScalingConfig | undefined>(undefined);\n\ninterface UDSFontScalingProviderProps {\n /**\n * Font-scaling caps for the subtree. Should be identity-stable (a module\n * constant or memoized) — every UDS text element reads it from context.\n * The nearest provider wins wholesale; configs are not merged.\n */\n config: FontScalingConfig;\n children: ReactNode;\n}\n\n/**\n * **🔠 Overrides UDS font-scaling caps for a subtree**\n *\n * @description\n * Configures how UDS text and controls respond to the OS text-size setting.\n * Without a provider, built-in defaults apply (every text style is capped at\n * 2x or below, with the largest display/title tiers tapered further, and\n * control internals capped at 2x). Most apps set this once at the root via the\n * `fontScaling` prop on `UDSGestureProvider`.\n *\n * @example\n * ```tsx\n * const FONT_SCALING = { default: 2, variants: { display1: 1.75 } };\n *\n * <UDSFontScalingProvider config={FONT_SCALING}>\n * <App />\n * </UDSFontScalingProvider>\n * ```\n */\nconst UDSFontScalingProvider = memo(function UDSFontScalingProvider({\n config,\n children,\n}: UDSFontScalingProviderProps) {\n return <FontScalingContext.Provider value={config}>{children}</FontScalingContext.Provider>;\n});\n\nUDSFontScalingProvider.displayName = 'UDSFontScalingProvider';\n\nexport { FontScalingContext, UDSFontScalingProvider, type UDSFontScalingProviderProps };\n"],"mappings":";;;;AAMA,MAAM,qBAAqB,cAA6C,KAAA,EAAU;;;;;;;;;;;;;;;;;;;;AA+BlF,MAAM,yBAAyB,KAAK,SAAS,uBAAuB,EAClE,QACA,YAC8B;CAC9B,OAAO,oBAAC,mBAAmB,UAApB;EAA6B,OAAO;EAAS;EAAuC,CAAA;EAC3F;AAEF,uBAAuB,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_fontScaling_useFontScale = require("./useFontScale.cjs");
|
|
3
4
|
const require_fontScaling_FontScalingContext = require("./FontScalingContext.cjs");
|
|
4
5
|
const require_fontScaling_constants = require("./constants.cjs");
|
|
5
6
|
const require_fontScaling_useMaxFontSizeMultiplier = require("./useMaxFontSizeMultiplier.cjs");
|
|
6
|
-
const require_fontScaling_useFontScale = require("./useFontScale.cjs");
|
|
7
7
|
exports.DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = require_fontScaling_constants.DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER;
|
|
8
8
|
exports.DEFAULT_MAX_FONT_SIZE_MULTIPLIERS = require_fontScaling_constants.DEFAULT_MAX_FONT_SIZE_MULTIPLIERS;
|
|
9
9
|
exports.MAX_SUPPORTED_FONT_SCALE = require_fontScaling_constants.MAX_SUPPORTED_FONT_SCALE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { useFontScale } from "./useFontScale.js";
|
|
2
3
|
import { UDSFontScalingProvider } from "./FontScalingContext.js";
|
|
3
4
|
import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.js";
|
|
4
5
|
import { useMaxFontSizeMultiplier } from "./useMaxFontSizeMultiplier.js";
|
|
5
|
-
import { useFontScale } from "./useFontScale.js";
|
|
6
6
|
export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, UDSFontScalingProvider, useFontScale, useMaxFontSizeMultiplier };
|
|
@@ -13,8 +13,7 @@ function toResolved(cap) {
|
|
|
13
13
|
* entry, then `default`) > built-in default table.
|
|
14
14
|
*
|
|
15
15
|
* Returns `undefined` (native behavior: inherit from parent text or app
|
|
16
|
-
* global) when nothing applies
|
|
17
|
-
* body text nested inside capped text still inherits the parent's cap. Only an
|
|
16
|
+
* global) when nothing applies, including for `variant="inherit"`. Only an
|
|
18
17
|
* explicit `null` (prop or provider) maps to `0`, RN's force-uncap value.
|
|
19
18
|
*/
|
|
20
19
|
function resolveMaxFontSizeMultiplier({ explicit, config, variant }) {
|
|
@@ -22,8 +22,7 @@ interface ResolveMaxFontSizeMultiplierOptions {
|
|
|
22
22
|
* entry, then `default`) > built-in default table.
|
|
23
23
|
*
|
|
24
24
|
* Returns `undefined` (native behavior: inherit from parent text or app
|
|
25
|
-
* global) when nothing applies
|
|
26
|
-
* body text nested inside capped text still inherits the parent's cap. Only an
|
|
25
|
+
* global) when nothing applies, including for `variant="inherit"`. Only an
|
|
27
26
|
* explicit `null` (prop or provider) maps to `0`, RN's force-uncap value.
|
|
28
27
|
*/
|
|
29
28
|
declare function resolveMaxFontSizeMultiplier({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMaxFontSizeMultiplier.d.cts","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"mappings":";;;;;UAWU,mCAAA;;EAER,QAAA;EAF2C;EAI3C,MAAA,GAAS,iBAAA;EAMY;;;;;EAArB,OAAA,GAAU,WAAA;AAAA;;AAAW
|
|
1
|
+
{"version":3,"file":"resolveMaxFontSizeMultiplier.d.cts","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"mappings":";;;;;UAWU,mCAAA;;EAER,QAAA;EAF2C;EAI3C,MAAA,GAAS,iBAAA;EAMY;;;;;EAArB,OAAA,GAAU,WAAA;AAAA;;AAAW;;;;;;;;;iBAiBd,4BAAA,CAAA;EACP,QAAA;EACA,MAAA;EACA;AAAA,GACC,mCAAA"}
|
|
@@ -22,8 +22,7 @@ interface ResolveMaxFontSizeMultiplierOptions {
|
|
|
22
22
|
* entry, then `default`) > built-in default table.
|
|
23
23
|
*
|
|
24
24
|
* Returns `undefined` (native behavior: inherit from parent text or app
|
|
25
|
-
* global) when nothing applies
|
|
26
|
-
* body text nested inside capped text still inherits the parent's cap. Only an
|
|
25
|
+
* global) when nothing applies, including for `variant="inherit"`. Only an
|
|
27
26
|
* explicit `null` (prop or provider) maps to `0`, RN's force-uncap value.
|
|
28
27
|
*/
|
|
29
28
|
declare function resolveMaxFontSizeMultiplier({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMaxFontSizeMultiplier.d.ts","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"mappings":";;;;;UAWU,mCAAA;;EAER,QAAA;EAF2C;EAI3C,MAAA,GAAS,iBAAA;EAMY;;;;;EAArB,OAAA,GAAU,WAAA;AAAA;;AAAW
|
|
1
|
+
{"version":3,"file":"resolveMaxFontSizeMultiplier.d.ts","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"mappings":";;;;;UAWU,mCAAA;;EAER,QAAA;EAF2C;EAI3C,MAAA,GAAS,iBAAA;EAMY;;;;;EAArB,OAAA,GAAU,WAAA;AAAA;;AAAW;;;;;;;;;iBAiBd,4BAAA,CAAA;EACP,QAAA;EACA,MAAA;EACA;AAAA,GACC,mCAAA"}
|
|
@@ -12,8 +12,7 @@ function toResolved(cap) {
|
|
|
12
12
|
* entry, then `default`) > built-in default table.
|
|
13
13
|
*
|
|
14
14
|
* Returns `undefined` (native behavior: inherit from parent text or app
|
|
15
|
-
* global) when nothing applies
|
|
16
|
-
* body text nested inside capped text still inherits the parent's cap. Only an
|
|
15
|
+
* global) when nothing applies, including for `variant="inherit"`. Only an
|
|
17
16
|
* explicit `null` (prop or provider) maps to `0`, RN's force-uncap value.
|
|
18
17
|
*/
|
|
19
18
|
function resolveMaxFontSizeMultiplier({ explicit, config, variant }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMaxFontSizeMultiplier.js","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"sourcesContent":["import type { TextVariant } from '../components/Text';\nimport {\n DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER,\n DEFAULT_MAX_FONT_SIZE_MULTIPLIERS,\n} from './constants';\nimport type { FontScalingCapValue, FontScalingConfig } from './types';\n\n// React Native: maxFontSizeMultiplier of 0 means \"no max, ignore parent/global\n// default\" — the only way to force-uncap text nested inside capped text.\nconst UNCAPPED = 0;\n\ninterface ResolveMaxFontSizeMultiplierOptions {\n /** Explicit component prop. `null` = force-uncap. Wins over everything. */\n explicit?: number | null;\n /** Provider config, if any provider is mounted. */\n config?: FontScalingConfig;\n /**\n * The text's resolved variant, `'control'` for control-internal text/icons,\n * or `undefined` for `variant=\"inherit\"` text (no variant opinion — nested\n * text inherits its parent's cap natively).\n */\n variant?: TextVariant | 'control';\n}\n\nfunction toResolved(cap: FontScalingCapValue): number {\n return cap === null ? UNCAPPED : cap;\n}\n\n/**\n * Resolves the `maxFontSizeMultiplier` to hand to React Native.\n *\n * Precedence: explicit prop > provider config (variant entry, then base-variant\n * entry, then `default`) > built-in default table.\n *\n * Returns `undefined` (native behavior: inherit from parent text or app\n * global) when nothing applies
|
|
1
|
+
{"version":3,"file":"resolveMaxFontSizeMultiplier.js","names":[],"sources":["../../src/fontScaling/resolveMaxFontSizeMultiplier.ts"],"sourcesContent":["import type { TextVariant } from '../components/Text';\nimport {\n DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER,\n DEFAULT_MAX_FONT_SIZE_MULTIPLIERS,\n} from './constants';\nimport type { FontScalingCapValue, FontScalingConfig } from './types';\n\n// React Native: maxFontSizeMultiplier of 0 means \"no max, ignore parent/global\n// default\" — the only way to force-uncap text nested inside capped text.\nconst UNCAPPED = 0;\n\ninterface ResolveMaxFontSizeMultiplierOptions {\n /** Explicit component prop. `null` = force-uncap. Wins over everything. */\n explicit?: number | null;\n /** Provider config, if any provider is mounted. */\n config?: FontScalingConfig;\n /**\n * The text's resolved variant, `'control'` for control-internal text/icons,\n * or `undefined` for `variant=\"inherit\"` text (no variant opinion — nested\n * text inherits its parent's cap natively).\n */\n variant?: TextVariant | 'control';\n}\n\nfunction toResolved(cap: FontScalingCapValue): number {\n return cap === null ? UNCAPPED : cap;\n}\n\n/**\n * Resolves the `maxFontSizeMultiplier` to hand to React Native.\n *\n * Precedence: explicit prop > provider config (variant entry, then base-variant\n * entry, then `default`) > built-in default table.\n *\n * Returns `undefined` (native behavior: inherit from parent text or app\n * global) when nothing applies, including for `variant=\"inherit\"`. Only an\n * explicit `null` (prop or provider) maps to `0`, RN's force-uncap value.\n */\nfunction resolveMaxFontSizeMultiplier({\n explicit,\n config,\n variant,\n}: ResolveMaxFontSizeMultiplierOptions): number | undefined {\n if (explicit !== undefined) {\n return toResolved(explicit);\n }\n\n if (config?.enabled === false) {\n return undefined;\n }\n\n if (variant === undefined) {\n return config?.default !== undefined ? toResolved(config.default) : undefined;\n }\n\n if (variant === 'control') {\n if (config?.control !== undefined) {\n return toResolved(config.control);\n }\n return DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER;\n }\n\n const baseVariant = variant.split('/')[0] as TextVariant;\n\n const variantCap = config?.variants?.[variant];\n if (variantCap !== undefined) {\n return toResolved(variantCap);\n }\n const baseVariantCap = config?.variants?.[baseVariant];\n if (baseVariantCap !== undefined) {\n return toResolved(baseVariantCap);\n }\n if (config?.default !== undefined) {\n return toResolved(config.default);\n }\n\n // Future: a theme-level typography[variant].maxFontSizeMultiplier slots here.\n\n const builtIn =\n DEFAULT_MAX_FONT_SIZE_MULTIPLIERS[variant] ?? DEFAULT_MAX_FONT_SIZE_MULTIPLIERS[baseVariant];\n return typeof builtIn === 'number' ? builtIn : undefined;\n}\n\nexport { resolveMaxFontSizeMultiplier, type ResolveMaxFontSizeMultiplierOptions };\n"],"mappings":";;;AASA,MAAM,WAAW;AAejB,SAAS,WAAW,KAAkC;CACpD,OAAO,QAAQ,OAAO,WAAW;;;;;;;;;;;;AAanC,SAAS,6BAA6B,EACpC,UACA,QACA,WAC0D;CAC1D,IAAI,aAAa,KAAA,GACf,OAAO,WAAW,SAAS;CAG7B,IAAI,QAAQ,YAAY,OACtB;CAGF,IAAI,YAAY,KAAA,GACd,OAAO,QAAQ,YAAY,KAAA,IAAY,WAAW,OAAO,QAAQ,GAAG,KAAA;CAGtE,IAAI,YAAY,WAAW;EACzB,IAAI,QAAQ,YAAY,KAAA,GACtB,OAAO,WAAW,OAAO,QAAQ;EAEnC,OAAA;;CAGF,MAAM,cAAc,QAAQ,MAAM,IAAI,CAAC;CAEvC,MAAM,aAAa,QAAQ,WAAW;CACtC,IAAI,eAAe,KAAA,GACjB,OAAO,WAAW,WAAW;CAE/B,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,IAAI,mBAAmB,KAAA,GACrB,OAAO,WAAW,eAAe;CAEnC,IAAI,QAAQ,YAAY,KAAA,GACtB,OAAO,WAAW,OAAO,QAAQ;CAKnC,MAAM,UACJ,kCAAkC,YAAY,kCAAkC;CAClF,OAAO,OAAO,YAAY,WAAW,UAAU,KAAA"}
|
|
@@ -29,14 +29,15 @@ interface FontScalingConfig {
|
|
|
29
29
|
enabled?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Fallback cap for any variant not listed in `variants`. Takes precedence
|
|
32
|
-
* over the built-in default table
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* over the built-in default table. For example, `default: 1.75` replaces the
|
|
33
|
+
* built-in 2x cap for body, label, and caption text unless a variant-specific
|
|
34
|
+
* override applies.
|
|
35
35
|
*/
|
|
36
36
|
default?: FontScalingCapValue;
|
|
37
37
|
/**
|
|
38
|
-
* Cap for control-internal text
|
|
39
|
-
*
|
|
38
|
+
* Cap for control-internal text, icons, and geometry in Button, Checkbox,
|
|
39
|
+
* Radio, Switch, Chip, and Tabs, plus standalone `Icon` glyphs and
|
|
40
|
+
* multicolor SVGs.
|
|
40
41
|
* @default 2
|
|
41
42
|
*/
|
|
42
43
|
control?: FontScalingCapValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/fontScaling/types.ts"],"mappings":";;;;;;AAAsD;;;;KAQjD,mBAAA;AAAmB;;;;;;;;;;AAAA,UAYd,iBAAA;EAOR;;;;;;EAAA,OAAA;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/fontScaling/types.ts"],"mappings":";;;;;;AAAsD;;;;KAQjD,mBAAA;AAAmB;;;;;;;;;;AAAA,UAYd,iBAAA;EAOR;;;;;;EAAA,OAAA;EAmBmB;;;;;;EAZnB,OAAA,GAAU,mBAAA;;;;;;;EAOV,OAAA,GAAU,mBAAA;;;;;EAKV,QAAA,GAAW,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;AAAA"}
|
|
@@ -29,14 +29,15 @@ interface FontScalingConfig {
|
|
|
29
29
|
enabled?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Fallback cap for any variant not listed in `variants`. Takes precedence
|
|
32
|
-
* over the built-in default table
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* over the built-in default table. For example, `default: 1.75` replaces the
|
|
33
|
+
* built-in 2x cap for body, label, and caption text unless a variant-specific
|
|
34
|
+
* override applies.
|
|
35
35
|
*/
|
|
36
36
|
default?: FontScalingCapValue;
|
|
37
37
|
/**
|
|
38
|
-
* Cap for control-internal text
|
|
39
|
-
*
|
|
38
|
+
* Cap for control-internal text, icons, and geometry in Button, Checkbox,
|
|
39
|
+
* Radio, Switch, Chip, and Tabs, plus standalone `Icon` glyphs and
|
|
40
|
+
* multicolor SVGs.
|
|
40
41
|
* @default 2
|
|
41
42
|
*/
|
|
42
43
|
control?: FontScalingCapValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/fontScaling/types.ts"],"mappings":";;;;;;AAAsD;;;;KAQjD,mBAAA;AAAmB;;;;;;;;;;AAAA,UAYd,iBAAA;EAOR;;;;;;EAAA,OAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/fontScaling/types.ts"],"mappings":";;;;;;AAAsD;;;;KAQjD,mBAAA;AAAmB;;;;;;;;;;AAAA,UAYd,iBAAA;EAOR;;;;;;EAAA,OAAA;EAmBmB;;;;;;EAZnB,OAAA,GAAU,mBAAA;;;;;;;EAOV,OAAA,GAAU,mBAAA;;;;;EAKV,QAAA,GAAW,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.cts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAkEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"styles.d.cts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAkEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,cAmCZ,YAAA,EAAY,MAAA;AAAA,cAqBZ,WAAA,EAAW,MAAA;AAAA,cAmBX,UAAA,EAAU,MAAA;AAAA,cAsBV,aAAA,EAAa,MAAA;AAAA,cAiBb,UAAA,EAAU,MAAA;AAAA,cAgBV,WAAA,EAAW,MAAA;AAAA,cA+CX,gBAAA,EAAgB,MAAA;AAAA,cAehB,iBAAA,EAAiB,MAAA;AAAA,cA0BjB,WAAA,EAAW,MAAA;AAAA,cASX,aAAA,EAAa,MAAA;AAAA,cAmCb,UAAA,EAAU,MAAA;AAAA,cASV,gBAAA,EAAgB,MAAA;AAAA,cAuBhB,WAAA,EAAW,MAAA;AAAA,cAuCX,WAAA,EAAW,MAAA;AAAA,cAiDX,YAAA,EAAY,MAAA;AAAA,cASZ,mBAAA,EAAmB,MAAA;AAAA,cAanB,gBAAA,EAAgB,MAAA;AAAA,UAeZ,UAAA;EACf,KAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EAAA,CACC,GAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAkEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAkEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,cAmCZ,YAAA,EAAY,MAAA;AAAA,cAqBZ,WAAA,EAAW,MAAA;AAAA,cAmBX,UAAA,EAAU,MAAA;AAAA,cAsBV,aAAA,EAAa,MAAA;AAAA,cAiBb,UAAA,EAAU,MAAA;AAAA,cAgBV,WAAA,EAAW,MAAA;AAAA,cA+CX,gBAAA,EAAgB,MAAA;AAAA,cAehB,iBAAA,EAAiB,MAAA;AAAA,cA0BjB,WAAA,EAAW,MAAA;AAAA,cASX,aAAA,EAAa,MAAA;AAAA,cAmCb,UAAA,EAAU,MAAA;AAAA,cASV,gBAAA,EAAgB,MAAA;AAAA,cAuBhB,WAAA,EAAW,MAAA;AAAA,cAuCX,WAAA,EAAW,MAAA;AAAA,cAiDX,YAAA,EAAY,MAAA;AAAA,cASZ,mBAAA,EAAmB,MAAA;AAAA,cAanB,gBAAA,EAAgB,MAAA;AAAA,UAeZ,UAAA;EACf,KAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EAAA,CACC,GAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"sourcesContent":["/**\n * Jest mock for generated/styles.\n *\n * Provides proxy-based mocks for the generated style objects\n * (styles, buttonStyles, etc.) with useVariants as a no-op.\n */\n\n/// <reference types=\"jest\" />\n\n// Default style values for foundation\nconst defaultFoundation = {\n // Layout\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n justifyContent: 'flex-start',\n // Spacing\n padding: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n margin: 0,\n gap: 0,\n // Colors\n backgroundColor: 'transparent',\n color: '#000000',\n borderColor: 'transparent',\n // Border\n borderWidth: 0,\n borderRadius: 0,\n // Typography\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 'regular',\n // Effects\n opacity: 1,\n boxShadow: '',\n};\n\n// Create a style object with useVariants attached\nfunction createStyleObject(baseStyles: Record<string, unknown> = {}) {\n const useVariants = jest.fn();\n const proxy = new Proxy(\n { ...defaultFoundation, ...baseStyles, useVariants },\n {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return sensible defaults for unknown properties\n if (typeof prop === 'string') {\n if (prop.includes('color') || prop.includes('Color')) {\n return '#000000';\n }\n if (prop.includes('width') || prop.includes('Width')) {\n return 0;\n }\n if (prop.includes('radius') || prop.includes('Radius')) {\n return 0;\n }\n if (prop.includes('size') || prop.includes('Size')) {\n return 16;\n }\n if (prop.includes('spacing') || prop.includes('Spacing')) {\n return 0;\n }\n if (prop.includes('gap') || prop.includes('Gap')) {\n return 0;\n }\n }\n return undefined;\n },\n },\n );\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Create a component style object (like buttonStyles) with multiple style keys\nfunction createComponentStyles(styleKeys: Record<string, Record<string, unknown>>) {\n const useVariants = jest.fn();\n const result: Record<string, unknown> = { useVariants };\n\n for (const [key, baseStyles] of Object.entries(styleKeys)) {\n result[key] = createStyleObject(baseStyles);\n }\n\n const proxy = new Proxy(result, {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return a default style object for any unknown key\n if (typeof prop === 'string') {\n return createStyleObject();\n }\n return undefined;\n },\n });\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Main styles export\nexport const styles = createComponentStyles({\n foundation: defaultFoundation,\n});\n\n// Button styles\nexport const buttonStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 10,\n backgroundColor: '#6001D2',\n borderRadius: 8,\n borderWidth: 0,\n borderColor: 'transparent',\n opacity: 1,\n boxShadow: '',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#FFFFFF',\n },\n icon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#FFFFFF',\n },\n});\n\n// Text styles\nexport const textStyles = createComponentStyles({\n root: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Input styles\nexport const inputStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n inputContainer: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 12,\n paddingVertical: 10,\n backgroundColor: '#FFFFFF',\n borderRadius: 8,\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n input: {\n flex: 1,\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 16,\n lineHeight: 24,\n color: '#000000',\n },\n helperText: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n color: '#666666',\n },\n labelRequired: {\n color: '#6001D2',\n },\n inputWrapper: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n },\n inputWrapperStatic: {\n paddingHorizontal: 12,\n gap: 8,\n },\n inputWrapperDynamic: {\n borderWidth: 1,\n borderRadius: 8,\n },\n inputPlaceholder: {\n color: '#666666',\n },\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n helperIcon: {\n color: '#666666',\n },\n});\n\n// Checkbox styles\nexport const checkboxStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n checkbox: {\n width: 20,\n height: 20,\n borderRadius: 4,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n checkboxIcon: {\n color: '#6001D2',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Switch styles\nexport const switchStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n switch: {\n width: 48,\n height: 28,\n borderRadius: 14,\n backgroundColor: '#E0E0E0',\n },\n handle: {\n width: 24,\n height: 24,\n borderRadius: 12,\n backgroundColor: '#FFFFFF',\n },\n handleIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Avatar styles\nexport const avatarStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 9999,\n backgroundColor: '#E0E0E0',\n overflow: 'hidden',\n },\n image: {\n width: '100%',\n height: '100%',\n },\n initials: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n color: '#000000',\n },\n});\n\n// Badge styles\nexport const badgeStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 8,\n paddingVertical: 2,\n borderRadius: 4,\n backgroundColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n});\n\n// Chip styles\nexport const chipStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n paddingHorizontal: 12,\n paddingVertical: 6,\n borderRadius: 16,\n backgroundColor: '#F5F5F5',\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Divider styles\nexport const dividerStyles = createComponentStyles({\n root: {\n gap: 8,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n line: {\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n});\n\n// Link styles\nexport const linkStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#6001D2',\n textDecorationLine: 'underline',\n },\n});\n\n// Radio styles\nexport const radioStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n // Keys used by Radio.tsx (mirror the generated styles)\n radio: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n radioCircle: {\n backgroundColor: '#6001D2',\n },\n circle: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n dot: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: '#6001D2',\n },\n label: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// IconButton styles\nexport const iconButtonStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 8,\n backgroundColor: 'transparent',\n },\n icon: {\n fontSize: 24,\n color: '#000000',\n },\n});\n\n// BottomSheet styles\nexport const bottomSheetStyles = createComponentStyles({\n root: {\n backgroundColor: '#ffffff',\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n borderColor: '#e0e0e0',\n borderWidth: 1,\n borderRadius: 16,\n paddingHorizontal: 16,\n paddingVertical: 8,\n marginHorizontal: 8,\n marginBottom: 8,\n },\n header: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 16,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#000000',\n },\n handleIndicator: {\n backgroundColor: '#999999',\n },\n});\n\n// Scrim styles\nexport const scrimStyles = createComponentStyles({\n root: {\n backgroundColor: '#000000',\n opacity: 0.2,\n backgroundBlurRadius: 0,\n },\n});\n\n// Popover styles\nexport const popoverStyles = createComponentStyles({\n root: {\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.12)',\n },\n blur: {\n backgroundBlurRadius: 0,\n },\n closeIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n closeIconContainer: {\n padding: 8,\n },\n contentWrapper: {\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 16,\n },\n svgBase: {\n borderRadius: 16,\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n backgroundColor: '#ffffff',\n backgroundOpacity: 1,\n },\n svgBorder: {\n borderColor: '#e0e0e0',\n borderWidth: 1,\n },\n});\n\n// Tabs (tab list chrome)\nexport const tabsStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n});\n\n// Pagination styles\nexport const paginationStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n item: {\n alignItems: 'center',\n justifyContent: 'center',\n padding: 8,\n borderRadius: 999,\n },\n text: {\n fontSize: 14,\n lineHeight: 16,\n },\n icon: {\n fontSize: 16,\n lineHeight: 16,\n },\n});\n\n// Toast styles\nexport const toastStyles = createComponentStyles({\n root: {\n alignItems: 'center',\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 12,\n borderWidth: 1,\n boxShadow: '',\n flexDirection: 'row',\n gap: 8,\n paddingHorizontal: 12,\n paddingVertical: 10,\n },\n text: {\n color: '#000000',\n },\n icon: {\n color: '#000000',\n fontSize: 16,\n iconSizeToken: 'md',\n lineHeight: 16,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 12,\n iconSizeToken: 'sm',\n lineHeight: 12,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n },\n});\n\n// Modal styles\nexport const modalStyles = createComponentStyles({\n root: {\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 16,\n borderWidth: 1,\n boxShadow: '',\n paddingVertical: 32,\n },\n actions: {\n gap: 12,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 24,\n iconSizeToken: 'md',\n lineHeight: 24,\n },\n closeIconContainer: {\n padding: 8,\n },\n description: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 18,\n letterSpacing: 0,\n lineHeight: 28,\n },\n scrim: {\n padding: 32,\n },\n spacingHorizontal: {\n paddingHorizontal: 32,\n },\n title: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 28,\n letterSpacing: 0,\n lineHeight: 36,\n },\n titleDescriptionWrapper: {\n gap: 8,\n },\n});\n\n// Select styles\nexport const selectStyles = createComponentStyles({\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n});\n\nexport const selectContentStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderWidth: 1,\n borderRadius: 8,\n boxShadow: '',\n gap: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n },\n});\n\nexport const selectItemStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n paddingHorizontal: 16,\n paddingVertical: 8,\n },\n text: {\n color: '#000000',\n },\n endIcon: {\n color: '#6001D2',\n },\n});\n\n// Type for StyleProps\nexport interface StyleProps {\n color?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n [key: string]: unknown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,oBAAoB;CAExB,SAAS;CACT,eAAe;CACf,YAAY;CACZ,gBAAgB;CAEhB,SAAS;CACT,mBAAmB;CACnB,iBAAiB;CACjB,QAAQ;CACR,KAAK;CAEL,iBAAiB;CACjB,OAAO;CACP,aAAa;CAEb,aAAa;CACb,cAAc;CAEd,YAAY;CACZ,UAAU;CACV,YAAY;CACZ,YAAY;CAEZ,SAAS;CACT,WAAW;CACZ;AAGD,SAAS,kBAAkB,aAAsC,EAAE,EAAE;CACnE,MAAM,cAAc,KAAK,IAAI;CAC7B,MAAM,QAAQ,IAAI,MAChB;EAAE,GAAG;EAA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AAe;EACf,YAAY;EACb;CACD,oBAAoB,EAClB,SAAS,GACV;CACD,aAAa;EACX,OAAO;EACP,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACD,OAAO,EACL,SAAS,IACV;CACD,mBAAmB,EACjB,mBAAmB,IACpB;CACD,OAAO;EACL,OAAO;EACP,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACD,yBAAyB,EACvB,KAAK,GACN;CACF,CAAC;AAGF,MAAa,eAAe,sBAAsB;CAChD,WAAW,EACT,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACF,CAAC;AAEF,MAAa,sBAAsB,sBAAsB,EACvD,MAAM;CACJ,iBAAiB;CACjB,aAAa;CACb,aAAa;CACb,cAAc;CACd,WAAW;CACX,KAAK;CACL,mBAAmB;CACnB,iBAAiB;CAClB,EACF,CAAC;AAEF,MAAa,mBAAmB,sBAAsB;CACpD,MAAM;EACJ,iBAAiB;EACjB,mBAAmB;EACnB,iBAAiB;EAClB;CACD,MAAM,EACJ,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"sourcesContent":["/**\n * Jest mock for generated/styles.\n *\n * Provides proxy-based mocks for the generated style objects\n * (styles, buttonStyles, etc.) with useVariants as a no-op.\n */\n\n/// <reference types=\"jest\" />\n\n// Default style values for foundation\nconst defaultFoundation = {\n // Layout\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n justifyContent: 'flex-start',\n // Spacing\n padding: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n margin: 0,\n gap: 0,\n // Colors\n backgroundColor: 'transparent',\n color: '#000000',\n borderColor: 'transparent',\n // Border\n borderWidth: 0,\n borderRadius: 0,\n // Typography\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 'regular',\n // Effects\n opacity: 1,\n boxShadow: '',\n};\n\n// Create a style object with useVariants attached\nfunction createStyleObject(baseStyles: Record<string, unknown> = {}) {\n const useVariants = jest.fn();\n const proxy = new Proxy(\n { ...defaultFoundation, ...baseStyles, useVariants },\n {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return sensible defaults for unknown properties\n if (typeof prop === 'string') {\n if (prop.includes('color') || prop.includes('Color')) {\n return '#000000';\n }\n if (prop.includes('width') || prop.includes('Width')) {\n return 0;\n }\n if (prop.includes('radius') || prop.includes('Radius')) {\n return 0;\n }\n if (prop.includes('size') || prop.includes('Size')) {\n return 16;\n }\n if (prop.includes('spacing') || prop.includes('Spacing')) {\n return 0;\n }\n if (prop.includes('gap') || prop.includes('Gap')) {\n return 0;\n }\n }\n return undefined;\n },\n },\n );\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Create a component style object (like buttonStyles) with multiple style keys\nfunction createComponentStyles(styleKeys: Record<string, Record<string, unknown>>) {\n const useVariants = jest.fn();\n const result: Record<string, unknown> = { useVariants };\n\n for (const [key, baseStyles] of Object.entries(styleKeys)) {\n result[key] = createStyleObject(baseStyles);\n }\n\n const proxy = new Proxy(result, {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return a default style object for any unknown key\n if (typeof prop === 'string') {\n return createStyleObject();\n }\n return undefined;\n },\n });\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Main styles export\nexport const styles = createComponentStyles({\n foundation: defaultFoundation,\n});\n\n// Button styles\nexport const buttonStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 10,\n backgroundColor: '#6001D2',\n borderRadius: 8,\n borderWidth: 0,\n borderColor: 'transparent',\n opacity: 1,\n boxShadow: '',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#FFFFFF',\n },\n icon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#FFFFFF',\n },\n});\n\n// Text styles\nexport const textStyles = createComponentStyles({\n root: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Input styles\nexport const inputStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n inputContainer: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 12,\n paddingVertical: 10,\n backgroundColor: '#FFFFFF',\n borderRadius: 8,\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n input: {\n flex: 1,\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 16,\n lineHeight: 24,\n color: '#000000',\n },\n helperText: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n color: '#666666',\n },\n labelRequired: {\n color: '#6001D2',\n },\n inputWrapper: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n },\n inputWrapperStatic: {\n paddingHorizontal: 12,\n gap: 8,\n },\n inputWrapperDynamic: {\n borderWidth: 1,\n borderRadius: 8,\n },\n inputPlaceholder: {\n color: '#666666',\n },\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n helperIcon: {\n color: '#666666',\n },\n});\n\n// Checkbox styles\nexport const checkboxStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n checkbox: {\n width: 20,\n height: 20,\n borderRadius: 4,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n checkboxIcon: {\n color: '#6001D2',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Switch styles\nexport const switchStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n switch: {\n width: 48,\n height: 28,\n padding: 2,\n borderRadius: 14,\n backgroundColor: '#E0E0E0',\n },\n handle: {\n width: 24,\n height: 24,\n borderRadius: 12,\n backgroundColor: '#FFFFFF',\n },\n handleIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Avatar styles\nexport const avatarStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 9999,\n backgroundColor: '#E0E0E0',\n overflow: 'hidden',\n },\n image: {\n width: '100%',\n height: '100%',\n },\n initials: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n color: '#000000',\n },\n});\n\n// Badge styles\nexport const badgeStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 8,\n paddingVertical: 2,\n borderRadius: 4,\n backgroundColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n});\n\n// Chip styles\nexport const chipStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n paddingHorizontal: 12,\n paddingVertical: 6,\n borderRadius: 16,\n backgroundColor: '#F5F5F5',\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Divider styles\nexport const dividerStyles = createComponentStyles({\n root: {\n gap: 8,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n line: {\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n});\n\n// Link styles\nexport const linkStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#6001D2',\n textDecorationLine: 'underline',\n },\n});\n\n// Radio styles\nexport const radioStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n // Keys used by Radio.tsx (mirror the generated styles)\n radio: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n radioCircle: {\n backgroundColor: '#6001D2',\n },\n circle: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n dot: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: '#6001D2',\n },\n label: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// IconButton styles\nexport const iconButtonStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 8,\n backgroundColor: 'transparent',\n },\n icon: {\n fontSize: 24,\n color: '#000000',\n },\n});\n\n// BottomSheet styles\nexport const bottomSheetStyles = createComponentStyles({\n root: {\n backgroundColor: '#ffffff',\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n borderColor: '#e0e0e0',\n borderWidth: 1,\n borderRadius: 16,\n paddingHorizontal: 16,\n paddingVertical: 8,\n marginHorizontal: 8,\n marginBottom: 8,\n },\n header: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 16,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#000000',\n },\n handleIndicator: {\n backgroundColor: '#999999',\n },\n});\n\n// Scrim styles\nexport const scrimStyles = createComponentStyles({\n root: {\n backgroundColor: '#000000',\n opacity: 0.2,\n backgroundBlurRadius: 0,\n },\n});\n\n// Popover styles\nexport const popoverStyles = createComponentStyles({\n root: {\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.12)',\n },\n blur: {\n backgroundBlurRadius: 0,\n },\n closeIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n closeIconContainer: {\n padding: 8,\n },\n contentWrapper: {\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 16,\n },\n svgBase: {\n borderRadius: 16,\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n backgroundColor: '#ffffff',\n backgroundOpacity: 1,\n },\n svgBorder: {\n borderColor: '#e0e0e0',\n borderWidth: 1,\n },\n});\n\n// Tabs (tab list chrome)\nexport const tabsStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n});\n\n// Pagination styles\nexport const paginationStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n item: {\n alignItems: 'center',\n justifyContent: 'center',\n padding: 8,\n borderRadius: 999,\n },\n text: {\n fontSize: 14,\n lineHeight: 16,\n },\n icon: {\n fontSize: 16,\n lineHeight: 16,\n },\n});\n\n// Toast styles\nexport const toastStyles = createComponentStyles({\n root: {\n alignItems: 'center',\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 12,\n borderWidth: 1,\n boxShadow: '',\n flexDirection: 'row',\n gap: 8,\n paddingHorizontal: 12,\n paddingVertical: 10,\n },\n text: {\n color: '#000000',\n },\n icon: {\n color: '#000000',\n fontSize: 16,\n iconSizeToken: 'md',\n lineHeight: 16,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 12,\n iconSizeToken: 'sm',\n lineHeight: 12,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n },\n});\n\n// Modal styles\nexport const modalStyles = createComponentStyles({\n root: {\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 16,\n borderWidth: 1,\n boxShadow: '',\n paddingVertical: 32,\n },\n actions: {\n gap: 12,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 24,\n iconSizeToken: 'md',\n lineHeight: 24,\n },\n closeIconContainer: {\n padding: 8,\n },\n description: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 18,\n letterSpacing: 0,\n lineHeight: 28,\n },\n scrim: {\n padding: 32,\n },\n spacingHorizontal: {\n paddingHorizontal: 32,\n },\n title: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 28,\n letterSpacing: 0,\n lineHeight: 36,\n },\n titleDescriptionWrapper: {\n gap: 8,\n },\n});\n\n// Select styles\nexport const selectStyles = createComponentStyles({\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n});\n\nexport const selectContentStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderWidth: 1,\n borderRadius: 8,\n boxShadow: '',\n gap: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n },\n});\n\nexport const selectItemStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n paddingHorizontal: 16,\n paddingVertical: 8,\n },\n text: {\n color: '#000000',\n },\n endIcon: {\n color: '#6001D2',\n },\n});\n\n// Type for StyleProps\nexport interface StyleProps {\n color?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n [key: string]: unknown;\n}\n"],"mappings":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