@yahoo/uds-mobile 2.3.0 → 2.3.2
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/dist/components/Checkbox.cjs +4 -12
- package/dist/components/Checkbox.d.cts.map +1 -1
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +5 -13
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/Radio.cjs +7 -15
- package/dist/components/Radio.d.cts.map +1 -1
- package/dist/components/Radio.d.ts.map +1 -1
- package/dist/components/Radio.js +13 -21
- package/dist/components/Radio.js.map +1 -1
- package/dist/components/Switch.cjs +2 -2
- package/dist/components/Switch.js +2 -2
- package/dist/components/Switch.js.map +1 -1
- package/dist/types/dist/index.d.cts.map +1 -1
- package/dist/types/dist/index.d.ts.map +1 -1
- package/generated/styles.cjs +46 -0
- package/generated/styles.d.ts +17 -0
- package/generated/styles.mjs +46 -0
- package/generated/unistyles.d.ts +25 -0
- package/package.json +1 -1
|
@@ -66,12 +66,7 @@ const Checkbox = (0, react.memo)(function Checkbox({ label, labelPosition = "sta
|
|
|
66
66
|
const showIcon = valueState !== "unchecked";
|
|
67
67
|
const shouldAnimate = !reduceMotion;
|
|
68
68
|
const scaleProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(pressed ? require_index.SCALE_EFFECTS.down : require_index.SCALE_EFFECTS.none, require_motion.BUTTON_SPRING_CONFIG) : require_index.SCALE_EFFECTS.none, [pressed, shouldAnimate]);
|
|
69
|
-
const iconProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(showIcon ? 1 : 0, require_motion.BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0, [showIcon, shouldAnimate]);
|
|
70
69
|
const checkboxAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({ transform: [{ scale: scaleProgress.value }] }));
|
|
71
|
-
const iconAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({
|
|
72
|
-
opacity: (0, react_native_reanimated.interpolate)(iconProgress.value, [0, 1], [0, 1]),
|
|
73
|
-
transform: [{ scale: (0, react_native_reanimated.interpolate)(iconProgress.value, [0, 1], [.5, 1]) }]
|
|
74
|
-
}));
|
|
75
70
|
const handlePress = (0, react.useCallback)(() => {
|
|
76
71
|
if (disabled) return;
|
|
77
72
|
const newChecked = checked === "indeterminate" ? true : !checked;
|
|
@@ -149,13 +144,10 @@ const Checkbox = (0, react.memo)(function Checkbox({ label, labelPosition = "sta
|
|
|
149
144
|
style: rootStyle,
|
|
150
145
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
151
146
|
style: checkboxBoxStyle,
|
|
152
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
size: "sm",
|
|
157
|
-
style: generated_styles.checkboxStyles.checkboxIcon
|
|
158
|
-
})
|
|
147
|
+
children: showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
148
|
+
name: iconName,
|
|
149
|
+
size: "sm",
|
|
150
|
+
style: generated_styles.checkboxStyles.checkboxIcon
|
|
159
151
|
})
|
|
160
152
|
}), labelContent]
|
|
161
153
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.cts","names":[],"sources":["../../src/components/Checkbox.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.cts","names":[],"sources":["../../src/components/Checkbox.tsx"],"mappings":";;;;;;;UAoBU,aAAA,SAAsB,IAAA,CAAK,SAAA,YAAqB,sBAAA;;EAExD,GAAA,GAAM,GAAA,CAAI,IAAA;EAFF;EAIR,cAAA;;EAEA,QAAA;EAJU;EAMV,QAAA;EAR8B;EAU9B,QAAA,IAAY,OAAA;AAAA;;;;;;;;;;;;;;;AAAgB;;;;;;;;;;;;;;;;;;;;cAqDxB,QAAA,EAAQ,KAAA,CAAA,oBAAA,CAAA,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../src/components/Checkbox.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","names":[],"sources":["../../src/components/Checkbox.tsx"],"mappings":";;;;;;;UAoBU,aAAA,SAAsB,IAAA,CAAK,SAAA,YAAqB,sBAAA;;EAExD,GAAA,GAAM,GAAA,CAAI,IAAA;EAFF;EAIR,cAAA;;EAEA,QAAA;EAJU;EAMV,QAAA;EAR8B;EAU9B,QAAA,IAAY,OAAA;AAAA;;;;;;;;;;;;;;;AAAgB;;;;;;;;;;;;;;;;;;;;cAqDxB,QAAA,EAAQ,KAAA,CAAA,oBAAA,CAAA,aAAA"}
|
|
@@ -8,7 +8,7 @@ import { Pressable } from "./Pressable.js";
|
|
|
8
8
|
import { isValidElement, memo, useCallback, useId, useMemo, useState } from "react";
|
|
9
9
|
import { checkboxStyles } from "../../generated/styles";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import Animated, {
|
|
11
|
+
import Animated, { useAnimatedStyle, useDerivedValue, withSpring } from "react-native-reanimated";
|
|
12
12
|
|
|
13
13
|
//#region src/components/Checkbox.tsx
|
|
14
14
|
const VARIANT_ERROR_MAP = {
|
|
@@ -63,12 +63,7 @@ const Checkbox = memo(function Checkbox({ label, labelPosition = "start", varian
|
|
|
63
63
|
const showIcon = valueState !== "unchecked";
|
|
64
64
|
const shouldAnimate = !reduceMotion;
|
|
65
65
|
const scaleProgress = useDerivedValue(() => shouldAnimate ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG) : SCALE_EFFECTS.none, [pressed, shouldAnimate]);
|
|
66
|
-
const iconProgress = useDerivedValue(() => shouldAnimate ? withSpring(showIcon ? 1 : 0, BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0, [showIcon, shouldAnimate]);
|
|
67
66
|
const checkboxAnimatedStyle = useAnimatedStyle(() => ({ transform: [{ scale: scaleProgress.value }] }));
|
|
68
|
-
const iconAnimatedStyle = useAnimatedStyle(() => ({
|
|
69
|
-
opacity: interpolate(iconProgress.value, [0, 1], [0, 1]),
|
|
70
|
-
transform: [{ scale: interpolate(iconProgress.value, [0, 1], [.5, 1]) }]
|
|
71
|
-
}));
|
|
72
67
|
const handlePress = useCallback(() => {
|
|
73
68
|
if (disabled) return;
|
|
74
69
|
const newChecked = checked === "indeterminate" ? true : !checked;
|
|
@@ -146,13 +141,10 @@ const Checkbox = memo(function Checkbox({ label, labelPosition = "start", varian
|
|
|
146
141
|
style: rootStyle,
|
|
147
142
|
children: [/* @__PURE__ */ jsx(Animated.View, {
|
|
148
143
|
style: checkboxBoxStyle,
|
|
149
|
-
children: /* @__PURE__ */ jsx(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
size: "sm",
|
|
154
|
-
style: checkboxStyles.checkboxIcon
|
|
155
|
-
})
|
|
144
|
+
children: showIcon && /* @__PURE__ */ jsx(Icon, {
|
|
145
|
+
name: iconName,
|
|
146
|
+
size: "sm",
|
|
147
|
+
style: checkboxStyles.checkboxIcon
|
|
156
148
|
})
|
|
157
149
|
}), labelContent]
|
|
158
150
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":[],"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["import type { CheckboxValue, CheckboxVariant, UniversalCheckboxProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { View, ViewProps } from 'react-native';\nimport Animated, {\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { checkboxStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Icon } from './Icon';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from CheckboxValue - maps boolean to 'checked'/'unchecked' string literals */\ntype CheckboxValueState = Exclude<CheckboxValue, boolean> | 'checked' | 'unchecked';\n\ninterface CheckboxProps extends Omit<ViewProps, 'style'>, UniversalCheckboxProps {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the checkbox is disabled */\n disabled?: boolean;\n /** Whether the checkbox is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype CheckboxStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Checkbox Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A checkbox component**\n *\n * @description\n * A checkbox component allows users to select one or multiple options from a set.\n * It represents a binary state, typically as checked or unchecked, and optionally\n * includes a third \"indeterminate\" state to indicate partial selection.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@yahoo/uds-mobile';\n *\n * <Checkbox label=\"Agree to terms\" />\n * <Checkbox label=\"Subscribe\" checked={true} onChange={setChecked} />\n * <Checkbox label=\"Partial\" checked=\"indeterminate\" />\n * ```\n *\n * @usage\n * - Forms: For selecting options\n * - Settings: For toggling preferences\n * - Filters: For multi-select filtering\n *\n * @accessibility\n * - Sets `accessibilityRole=\"checkbox\"` automatically\n * - Announces checked/unchecked/mixed state\n * - Label is used as accessibility label\n * - Supports `reduceMotion` for users who prefer reduced motion\n *\n * @see {@link Radio} for single-select options\n * @see {@link Switch} for binary toggles\n */\nconst Checkbox = memo(function Checkbox({\n // Checkbox props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: CheckboxProps) {\n const generatedId = useId();\n const uid = `uds-checkbox-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<CheckboxValue>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: CheckboxValueState = useMemo(() => {\n if (checked === 'indeterminate') {\n return 'indeterminate';\n }\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n const iconName = valueState === 'indeterminate' ? 'Minus' : 'Check';\n const showIcon = valueState !== 'unchecked';\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n // Icon visibility animation\n // When reduceMotion is true, still show/hide the icon but without animation\n const iconProgress = useDerivedValue(\n () => (shouldAnimate ? withSpring(showIcon ? 1 : 0, BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0),\n [showIcon, shouldAnimate],\n );\n\n const checkboxAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n const iconAnimatedStyle = useAnimatedStyle(() => ({\n opacity: interpolate(iconProgress.value, [0, 1], [0, 1]),\n transform: [{ scale: interpolate(iconProgress.value, [0, 1], [0.5, 1]) }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = checked === 'indeterminate' ? true : !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: CheckboxStyleVariant = hasError\n ? VARIANT_ERROR_MAP[variantProp]\n : variantProp;\n\n checkboxStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked, indeterminate\n disabled,\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [checkboxStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [checkboxStyles.root, disabled],\n );\n\n const checkboxBoxStyle = useMemo(\n () => [\n checkboxStyles.checkbox,\n { alignItems: 'center' as const, justifyContent: 'center' as const, borderRadius: 4 },\n checkboxAnimatedStyle,\n ],\n [checkboxStyles.checkbox, checkboxAnimatedStyle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={checkboxStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={checkboxStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, checkboxStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked:\n valueState === 'checked'\n ? true\n : valueState === 'indeterminate'\n ? ('mixed' as const)\n : false,\n }),\n [disabled, valueState],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"checkbox\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={checkboxBoxStyle}>\n <Animated.View style={iconAnimatedStyle}>\n <Icon name={iconName} size=\"sm\" style={checkboxStyles.checkboxIcon} />\n </Animated.View>\n </Animated.View>\n\n {labelContent}\n </Pressable>\n );\n});\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;;;;;;;;AA6CA,MAAM,oBAAmE;CACvE,SAAS;CACT,WAAW;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCD,MAAM,WAAW,KAAK,SAAS,SAAS,EAEtC,OACA,gBAAgB,SAChB,SAAS,cAAc,WACvB,OAAO,MACP,SAAS,aACT,UACA,cAEA,gBACA,UACA,UACA,UACA,KACA,GAAG,aACa;CAEhB,MAAM,MAAM,gBADQ,OAAO;CAI3B,MAAM,eAAe,gBAAgB;CACrC,MAAM,CAAC,iBAAiB,sBAAsB,SAC5C,eAAe,cAAe,kBAAkB,MACjD;CACD,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAG7C,MAAM,UAAU,eAAe,cAAc;CAG7C,MAAM,aAAiC,cAAc;AACnD,MAAI,YAAY,gBACd,QAAO;AAET,SAAO,UAAU,YAAY;IAC5B,CAAC,QAAQ,CAAC;CAEb,MAAM,WAAW,eAAe,kBAAkB,UAAU;CAC5D,MAAM,WAAW,eAAe;CAGhC,MAAM,gBAAgB,CAAC;CAGvB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MAAM,eAAe,cAAc;AACjC,MAAI,CAAC,MACH,QAAO;EAGT,MAAM,UACJ,OAAO,UAAU,aAAa,OAAO,GAAG,eAAe,MAAM,GAAG,QAAQ,OAAO,MAAM;EAEvF,MAAM,cACJ,OAAO,YAAY,WAAW,oBAAC;GAAK,OAAO,eAAe;aAAO;IAAe,GAAG;AAErF,MAAI,SACF,QACE,qBAAC;GAAO,WAAU;GAAI,YAAW;cAC9B,aACD,oBAAC;IAAK,OAAO,eAAe;cAAM;KAAQ;IACnC;AAIb,SAAO;IACN;EAAC;EAAO;EAAU,eAAe;EAAK,CAAC;CAE1C,MAAM,YAAY,eACT;EACL;EACA,SACE,eAAe,YACX,OACA,eAAe,kBACZ,UACD;EACT,GACD,CAAC,UAAU,WAAW,CACvB;AAGD,QACE,qBAAC;EACM;EACL,UAAU;EACV,SAAS;EACT,WAAW;EACX,YAAY;EACF;EACV,eAAe,kBAAkB,UAAU,QAAQ;EACnD,YAAW;EACX,WAAU;EACV,mBAAkB;EAClB,oBAAoB;EACpB,oBAAoB,OAAO,UAAU,WAAW,QAAQ;EACxD,GAAI;EACJ,OAAO;aAEP,oBAAC,SAAS;GAAK,OAAO;aACpB,oBAAC,SAAS;IAAK,OAAO;cACpB,oBAAC;KAAK,MAAM;KAAU,MAAK;KAAK,OAAO,eAAe;MAAgB;KACxD;IACF,EAEf;GACS;EAEd;AAEF,SAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":[],"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["import type { CheckboxValue, CheckboxVariant, UniversalCheckboxProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useDerivedValue, withSpring } from 'react-native-reanimated';\n\nimport { checkboxStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Icon } from './Icon';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from CheckboxValue - maps boolean to 'checked'/'unchecked' string literals */\ntype CheckboxValueState = Exclude<CheckboxValue, boolean> | 'checked' | 'unchecked';\n\ninterface CheckboxProps extends Omit<ViewProps, 'style'>, UniversalCheckboxProps {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the checkbox is disabled */\n disabled?: boolean;\n /** Whether the checkbox is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype CheckboxStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Checkbox Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A checkbox component**\n *\n * @description\n * A checkbox component allows users to select one or multiple options from a set.\n * It represents a binary state, typically as checked or unchecked, and optionally\n * includes a third \"indeterminate\" state to indicate partial selection.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@yahoo/uds-mobile';\n *\n * <Checkbox label=\"Agree to terms\" />\n * <Checkbox label=\"Subscribe\" checked={true} onChange={setChecked} />\n * <Checkbox label=\"Partial\" checked=\"indeterminate\" />\n * ```\n *\n * @usage\n * - Forms: For selecting options\n * - Settings: For toggling preferences\n * - Filters: For multi-select filtering\n *\n * @accessibility\n * - Sets `accessibilityRole=\"checkbox\"` automatically\n * - Announces checked/unchecked/mixed state\n * - Label is used as accessibility label\n * - Supports `reduceMotion` for users who prefer reduced motion\n *\n * @see {@link Radio} for single-select options\n * @see {@link Switch} for binary toggles\n */\nconst Checkbox = memo(function Checkbox({\n // Checkbox props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: CheckboxProps) {\n const generatedId = useId();\n const uid = `uds-checkbox-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<CheckboxValue>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: CheckboxValueState = useMemo(() => {\n if (checked === 'indeterminate') {\n return 'indeterminate';\n }\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n const iconName = valueState === 'indeterminate' ? 'Minus' : 'Check';\n const showIcon = valueState !== 'unchecked';\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n const checkboxAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = checked === 'indeterminate' ? true : !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: CheckboxStyleVariant = hasError\n ? VARIANT_ERROR_MAP[variantProp]\n : variantProp;\n\n checkboxStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked, indeterminate\n disabled,\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [checkboxStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [checkboxStyles.root, disabled],\n );\n\n const checkboxBoxStyle = useMemo(\n () => [\n checkboxStyles.checkbox,\n { alignItems: 'center' as const, justifyContent: 'center' as const, borderRadius: 4 },\n checkboxAnimatedStyle,\n ],\n [checkboxStyles.checkbox, checkboxAnimatedStyle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={checkboxStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={checkboxStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, checkboxStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked:\n valueState === 'checked'\n ? true\n : valueState === 'indeterminate'\n ? ('mixed' as const)\n : false,\n }),\n [disabled, valueState],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"checkbox\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={checkboxBoxStyle}>\n {showIcon && <Icon name={iconName} size=\"sm\" style={checkboxStyles.checkboxIcon} />}\n </Animated.View>\n\n {labelContent}\n </Pressable>\n );\n});\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,oBAAmE;CACvE,SAAS;CACT,WAAW;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCD,MAAM,WAAW,KAAK,SAAS,SAAS,EAEtC,OACA,gBAAgB,SAChB,SAAS,cAAc,WACvB,OAAO,MACP,SAAS,aACT,UACA,cAEA,gBACA,UACA,UACA,UACA,KACA,GAAG,aACa;CAEhB,MAAM,MAAM,gBADQ,OAAO;CAI3B,MAAM,eAAe,gBAAgB;CACrC,MAAM,CAAC,iBAAiB,sBAAsB,SAC5C,eAAe,cAAe,kBAAkB,MACjD;CACD,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAG7C,MAAM,UAAU,eAAe,cAAc;CAG7C,MAAM,aAAiC,cAAc;AACnD,MAAI,YAAY,gBACd,QAAO;AAET,SAAO,UAAU,YAAY;IAC5B,CAAC,QAAQ,CAAC;CAEb,MAAM,WAAW,eAAe,kBAAkB,UAAU;CAC5D,MAAM,WAAW,eAAe;CAGhC,MAAM,gBAAgB,CAAC;CAGvB,MAAM,gBAAgB,sBAElB,gBACI,WAAW,UAAU,cAAc,OAAO,cAAc,MAAM,qBAAqB,GACnF,cAAc,MACpB,CAAC,SAAS,cAAc,CACzB;CAED,MAAM,wBAAwB,wBAAwB,EACpD,WAAW,CAAC,EAAE,OAAO,cAAc,OAAO,CAAC,EAC5C,EAAE;CAGH,MAAM,cAAc,kBAAkB;AACpC,MAAI,SACF;EAGF,MAAM,aAAa,YAAY,kBAAkB,OAAO,CAAC;AAEzD,MAAI,CAAC,aACH,oBAAmB,WAAW;AAGhC,aAAW,WAAW;IACrB;EAAC;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BAAC,SAAS;GAAK,OAAO;aACnB,YAAY,oBAAC;IAAK,MAAM;IAAU,MAAK;IAAK,OAAO,eAAe;KAAgB;IACrE,EAEf;GACS;EAEd;AAEF,SAAS,cAAc"}
|
|
@@ -7,6 +7,7 @@ const require_components_Text = require('./Text.cjs');
|
|
|
7
7
|
const require_components_HStack = require('./HStack.cjs');
|
|
8
8
|
const require_components_Pressable = require('./Pressable.cjs');
|
|
9
9
|
let react = require("react");
|
|
10
|
+
let react_native = require("react-native");
|
|
10
11
|
let generated_styles = require("../../generated/styles");
|
|
11
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
13
|
let react_native_reanimated = require("react-native-reanimated");
|
|
@@ -60,12 +61,7 @@ const Radio = (0, react.memo)(function Radio({ label, labelPosition = "start", v
|
|
|
60
61
|
}, [checked]);
|
|
61
62
|
const shouldAnimate = !reduceMotion;
|
|
62
63
|
const scaleProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(pressed ? require_index.SCALE_EFFECTS.down : require_index.SCALE_EFFECTS.none, require_motion.BUTTON_SPRING_CONFIG) : require_index.SCALE_EFFECTS.none, [pressed, shouldAnimate]);
|
|
63
|
-
const circleProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(checked ? 1 : 0, require_motion.BUTTON_SPRING_CONFIG) : checked ? 1 : 0, [checked, shouldAnimate]);
|
|
64
64
|
const radioAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({ transform: [{ scale: scaleProgress.value }] }));
|
|
65
|
-
const circleAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({
|
|
66
|
-
opacity: (0, react_native_reanimated.interpolate)(circleProgress.value, [0, 1], [0, 1]),
|
|
67
|
-
transform: [{ scale: (0, react_native_reanimated.interpolate)(circleProgress.value, [0, 1], [.5, 1]) }]
|
|
68
|
-
}));
|
|
69
65
|
const handlePress = (0, react.useCallback)(() => {
|
|
70
66
|
if (disabled) return;
|
|
71
67
|
const newChecked = !checked;
|
|
@@ -101,15 +97,11 @@ const Radio = (0, react.memo)(function Radio({ label, labelPosition = "start", v
|
|
|
101
97
|
radioAnimatedStyle
|
|
102
98
|
], [generated_styles.radioStyles.radio, radioAnimatedStyle]);
|
|
103
99
|
const INNER_CIRCLE_SIZE = 8;
|
|
104
|
-
const circleStyle = (0, react.useMemo)(() => [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
borderRadius: 9999
|
|
110
|
-
},
|
|
111
|
-
circleAnimatedStyle
|
|
112
|
-
], [generated_styles.radioStyles.radioCircle, circleAnimatedStyle]);
|
|
100
|
+
const circleStyle = (0, react.useMemo)(() => [generated_styles.radioStyles.radioCircle, {
|
|
101
|
+
width: INNER_CIRCLE_SIZE,
|
|
102
|
+
height: INNER_CIRCLE_SIZE,
|
|
103
|
+
borderRadius: 9999
|
|
104
|
+
}], [generated_styles.radioStyles.radioCircle]);
|
|
113
105
|
const labelContent = (0, react.useMemo)(() => {
|
|
114
106
|
if (!label) return null;
|
|
115
107
|
const content = typeof label === "function" ? label() : (0, react.isValidElement)(label) ? label : String(label);
|
|
@@ -152,7 +144,7 @@ const Radio = (0, react.memo)(function Radio({ label, labelPosition = "start", v
|
|
|
152
144
|
style: rootStyle,
|
|
153
145
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
154
146
|
style: radioBoxStyle,
|
|
155
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
147
|
+
children: checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: circleStyle })
|
|
156
148
|
}), labelContent]
|
|
157
149
|
});
|
|
158
150
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.cts","names":[],"sources":["../../src/components/Radio.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Radio.d.cts","names":[],"sources":["../../src/components/Radio.tsx"],"mappings":";;;;;;;UAoBU,UAAA,SAAmB,IAAA,CAAK,SAAA,YAAqB,mBAAA;;EAErD,GAAA,GAAM,GAAA,CAAI,IAAA;EAFS;EAInB,cAAA;EAJgC;EAMhC,QAAA;EAJM;EAMN,QAAA;EARqD;EAUrD,QAAA,IAAY,OAAA;AAAA;;;;;;;;;;;;;;AAAgB;;;;;;;;;;;;;;;;;;;cAmDxB,KAAA,EAAK,KAAA,CAAA,oBAAA,CAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","names":[],"sources":["../../src/components/Radio.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","names":[],"sources":["../../src/components/Radio.tsx"],"mappings":";;;;;;;UAoBU,UAAA,SAAmB,IAAA,CAAK,SAAA,YAAqB,mBAAA;;EAErD,GAAA,GAAM,GAAA,CAAI,IAAA;EAFS;EAInB,cAAA;EAJgC;EAMhC,QAAA;EAJM;EAMN,QAAA;EARqD;EAUrD,QAAA,IAAY,OAAA;AAAA;;;;;;;;;;;;;;AAAgB;;;;;;;;;;;;;;;;;;;cAmDxB,KAAA,EAAK,KAAA,CAAA,oBAAA,CAAA,UAAA"}
|
package/dist/components/Radio.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
import { SCALE_EFFECTS } from "../motion-tokens/dist/index.js";
|
|
3
3
|
import { BUTTON_SPRING_CONFIG } from "../motion.js";
|
|
4
|
-
import { Text } from "./Text.js";
|
|
4
|
+
import { Text as Text$1 } from "./Text.js";
|
|
5
5
|
import { HStack } from "./HStack.js";
|
|
6
|
-
import { Pressable } from "./Pressable.js";
|
|
6
|
+
import { Pressable as Pressable$1 } from "./Pressable.js";
|
|
7
7
|
import { isValidElement, memo, useCallback, useId, useMemo, useState } from "react";
|
|
8
|
+
import { View } from "react-native";
|
|
8
9
|
import { radioStyles } from "../../generated/styles";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import Animated, {
|
|
11
|
+
import Animated, { useAnimatedStyle, useDerivedValue, withSpring } from "react-native-reanimated";
|
|
11
12
|
|
|
12
13
|
//#region src/components/Radio.tsx
|
|
13
14
|
const VARIANT_ERROR_MAP = {
|
|
@@ -57,12 +58,7 @@ const Radio = memo(function Radio({ label, labelPosition = "start", variant: var
|
|
|
57
58
|
}, [checked]);
|
|
58
59
|
const shouldAnimate = !reduceMotion;
|
|
59
60
|
const scaleProgress = useDerivedValue(() => shouldAnimate ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG) : SCALE_EFFECTS.none, [pressed, shouldAnimate]);
|
|
60
|
-
const circleProgress = useDerivedValue(() => shouldAnimate ? withSpring(checked ? 1 : 0, BUTTON_SPRING_CONFIG) : checked ? 1 : 0, [checked, shouldAnimate]);
|
|
61
61
|
const radioAnimatedStyle = useAnimatedStyle(() => ({ transform: [{ scale: scaleProgress.value }] }));
|
|
62
|
-
const circleAnimatedStyle = useAnimatedStyle(() => ({
|
|
63
|
-
opacity: interpolate(circleProgress.value, [0, 1], [0, 1]),
|
|
64
|
-
transform: [{ scale: interpolate(circleProgress.value, [0, 1], [.5, 1]) }]
|
|
65
|
-
}));
|
|
66
62
|
const handlePress = useCallback(() => {
|
|
67
63
|
if (disabled) return;
|
|
68
64
|
const newChecked = !checked;
|
|
@@ -98,26 +94,22 @@ const Radio = memo(function Radio({ label, labelPosition = "start", variant: var
|
|
|
98
94
|
radioAnimatedStyle
|
|
99
95
|
], [radioStyles.radio, radioAnimatedStyle]);
|
|
100
96
|
const INNER_CIRCLE_SIZE = 8;
|
|
101
|
-
const circleStyle = useMemo(() => [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
borderRadius: 9999
|
|
107
|
-
},
|
|
108
|
-
circleAnimatedStyle
|
|
109
|
-
], [radioStyles.radioCircle, circleAnimatedStyle]);
|
|
97
|
+
const circleStyle = useMemo(() => [radioStyles.radioCircle, {
|
|
98
|
+
width: INNER_CIRCLE_SIZE,
|
|
99
|
+
height: INNER_CIRCLE_SIZE,
|
|
100
|
+
borderRadius: 9999
|
|
101
|
+
}], [radioStyles.radioCircle]);
|
|
110
102
|
const labelContent = useMemo(() => {
|
|
111
103
|
if (!label) return null;
|
|
112
104
|
const content = typeof label === "function" ? label() : isValidElement(label) ? label : String(label);
|
|
113
|
-
const textContent = typeof content === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
105
|
+
const textContent = typeof content === "string" ? /* @__PURE__ */ jsx(Text$1, {
|
|
114
106
|
style: radioStyles.text,
|
|
115
107
|
children: content
|
|
116
108
|
}) : content;
|
|
117
109
|
if (required) return /* @__PURE__ */ jsxs(HStack, {
|
|
118
110
|
columnGap: "1",
|
|
119
111
|
alignItems: "flex-start",
|
|
120
|
-
children: [textContent, /* @__PURE__ */ jsx(Text, {
|
|
112
|
+
children: [textContent, /* @__PURE__ */ jsx(Text$1, {
|
|
121
113
|
style: radioStyles.text,
|
|
122
114
|
children: "*"
|
|
123
115
|
})]
|
|
@@ -132,7 +124,7 @@ const Radio = memo(function Radio({ label, labelPosition = "start", variant: var
|
|
|
132
124
|
disabled,
|
|
133
125
|
checked
|
|
134
126
|
}), [disabled, checked]);
|
|
135
|
-
return /* @__PURE__ */ jsxs(Pressable, {
|
|
127
|
+
return /* @__PURE__ */ jsxs(Pressable$1, {
|
|
136
128
|
ref,
|
|
137
129
|
nativeID: uid,
|
|
138
130
|
onPress: handlePress,
|
|
@@ -149,7 +141,7 @@ const Radio = memo(function Radio({ label, labelPosition = "start", variant: var
|
|
|
149
141
|
style: rootStyle,
|
|
150
142
|
children: [/* @__PURE__ */ jsx(Animated.View, {
|
|
151
143
|
style: radioBoxStyle,
|
|
152
|
-
children: /* @__PURE__ */ jsx(
|
|
144
|
+
children: checked && /* @__PURE__ */ jsx(View, { style: circleStyle })
|
|
153
145
|
}), labelContent]
|
|
154
146
|
});
|
|
155
147
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":[],"sources":["../../src/components/Radio.tsx"],"sourcesContent":["import type { RadioVariant, UniversalRadioProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { View, ViewProps } from 'react-native';\nimport Animated, {\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { radioStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from RadioValue - maps boolean to 'checked'/'unchecked' string literals */\ntype RadioValueState = 'checked' | 'unchecked';\n\ninterface RadioProps extends Omit<ViewProps, 'style'>, UniversalRadioProps {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the radio is disabled */\n disabled?: boolean;\n /** Whether the radio is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype RadioStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<RadioVariant, RadioStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Radio Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A radio component**\n *\n * @description\n * A radio component allows users to select one option from a set.\n * Unlike checkbox, radio buttons cannot have multiple selected in a group,\n * allowing only one selection at a time.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Radio } from '@yahoo/uds-mobile';\n *\n * <Radio label=\"Option A\" />\n * <Radio label=\"Option B\" checked={true} onChange={setChecked} />\n * ```\n *\n * @usage\n * - Forms: For selecting a single option from multiple choices\n * - Settings: For toggling between mutually exclusive preferences\n *\n * @accessibility\n * - Sets `accessibilityRole=\"radio\"` automatically\n * - Announces checked/unchecked state\n * - Label is used as accessibility label\n * - Supports `reduceMotion` for users who prefer reduced motion\n *\n * @see {@link Checkbox} for multi-select options\n * @see {@link Switch} for binary toggles\n */\nconst Radio = memo(function Radio({\n // Radio props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: RadioProps) {\n const generatedId = useId();\n const uid = `uds-radio-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<boolean>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: RadioValueState = useMemo(() => {\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n // Circle visibility animation (for the inner dot)\n // When reduceMotion is true, still show/hide the circle but without animation\n const circleProgress = useDerivedValue(\n () => (shouldAnimate ? withSpring(checked ? 1 : 0, BUTTON_SPRING_CONFIG) : checked ? 1 : 0),\n [checked, shouldAnimate],\n );\n\n const radioAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n const circleAnimatedStyle = useAnimatedStyle(() => ({\n opacity: interpolate(circleProgress.value, [0, 1], [0, 1]),\n transform: [{ scale: interpolate(circleProgress.value, [0, 1], [0.5, 1]) }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: RadioStyleVariant = hasError ? VARIANT_ERROR_MAP[variantProp] : variantProp;\n\n radioStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [radioStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [radioStyles.root, disabled],\n );\n\n const radioBoxStyle = useMemo(\n () => [\n radioStyles.radio,\n {\n alignItems: 'center' as const,\n justifyContent: 'center' as const,\n borderRadius: 9999,\n },\n radioAnimatedStyle,\n ],\n [radioStyles.radio, radioAnimatedStyle],\n );\n\n // Inner circle size: fixed 8x8px to match web implementation\n const INNER_CIRCLE_SIZE = 8;\n\n const circleStyle = useMemo(\n () => [\n radioStyles.radioCircle,\n {\n width: INNER_CIRCLE_SIZE,\n height: INNER_CIRCLE_SIZE,\n borderRadius: 9999,\n },\n circleAnimatedStyle,\n ],\n [radioStyles.radioCircle, circleAnimatedStyle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={radioStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={radioStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, radioStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked,\n }),\n [disabled, checked],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"radio\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={radioBoxStyle}>\n <Animated.View style={circleStyle} />\n </Animated.View>\n\n {labelContent}\n </Pressable>\n );\n});\n\nRadio.displayName = 'Radio';\n\nexport { Radio, type RadioProps };\n"],"mappings":";;;;;;;;;;;;AA4CA,MAAM,oBAA6D;CACjE,SAAS;CACT,WAAW;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCD,MAAM,QAAQ,KAAK,SAAS,MAAM,EAEhC,OACA,gBAAgB,SAChB,SAAS,cAAc,WACvB,OAAO,MACP,SAAS,aACT,UACA,cAEA,gBACA,UACA,UACA,UACA,KACA,GAAG,aACU;CAEb,MAAM,MAAM,aADQ,OAAO;CAI3B,MAAM,eAAe,gBAAgB;CACrC,MAAM,CAAC,iBAAiB,sBAAsB,SAC5C,eAAe,cAAe,kBAAkB,MACjD;CACD,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAG7C,MAAM,UAAU,eAAe,cAAc;CAG7C,MAAM,aA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Ac;GACf;EACD;EACD,EACD,CAAC,YAAY,OAAO,mBAAmB,CACxC;CAGD,MAAM,oBAAoB;CAE1B,MAAM,cAAc,cACZ;EACJ,YAAY;EACZ;GACE,OAAO;GACP,QAAQ;GACR,cAAc;GACf;EACD;EACD,EACD,CAAC,YAAY,aAAa,oBAAoB,CAC/C;CAGD,MAAM,eAAe,cAAc;AACjC,MAAI,CAAC,MACH,QAAO;EAGT,MAAM,UACJ,OAAO,UAAU,aAAa,OAAO,GAAG,eAAe,MAAM,GAAG,QAAQ,OAAO,MAAM;EAEvF,MAAM,cACJ,OAAO,YAAY,WAAW,oBAAC;GAAK,OAAO,YAAY;aAAO;IAAe,GAAG;AAElF,MAAI,SACF,QACE,qBAAC;GAAO,WAAU;GAAI,YAAW;cAC9B,aACD,oBAAC;IAAK,OAAO,YAAY;cAAM;KAAQ;IAChC;AAIb,SAAO;IACN;EAAC;EAAO;EAAU,YAAY;EAAK,CAAC;CAEvC,MAAM,YAAY,eACT;EACL;EACA;EACD,GACD,CAAC,UAAU,QAAQ,CACpB;AAGD,QACE,qBAAC;EACM;EACL,UAAU;EACV,SAAS;EACT,WAAW;EACX,YAAY;EACF;EACV,eAAe,kBAAkB,UAAU,QAAQ;EACnD,YAAW;EACX,WAAU;EACV,mBAAkB;EAClB,oBAAoB;EACpB,oBAAoB,OAAO,UAAU,WAAW,QAAQ;EACxD,GAAI;EACJ,OAAO;aAEP,oBAAC,SAAS;GAAK,OAAO;aACpB,oBAAC,SAAS,QAAK,OAAO,cAAe;IACvB,EAEf;GACS;EAEd;AAEF,MAAM,cAAc"}
|
|
1
|
+
{"version":3,"file":"Radio.js","names":["Text","Pressable"],"sources":["../../src/components/Radio.tsx"],"sourcesContent":["import type { RadioVariant, UniversalRadioProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\nimport Animated, { useAnimatedStyle, useDerivedValue, withSpring } from 'react-native-reanimated';\n\nimport { radioStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from RadioValue - maps boolean to 'checked'/'unchecked' string literals */\ntype RadioValueState = 'checked' | 'unchecked';\n\ninterface RadioProps extends Omit<ViewProps, 'style'>, UniversalRadioProps {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the radio is disabled */\n disabled?: boolean;\n /** Whether the radio is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype RadioStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<RadioVariant, RadioStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Radio Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A radio component**\n *\n * @description\n * A radio component allows users to select one option from a set.\n * Unlike checkbox, radio buttons cannot have multiple selected in a group,\n * allowing only one selection at a time.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Radio } from '@yahoo/uds-mobile';\n *\n * <Radio label=\"Option A\" />\n * <Radio label=\"Option B\" checked={true} onChange={setChecked} />\n * ```\n *\n * @usage\n * - Forms: For selecting a single option from multiple choices\n * - Settings: For toggling between mutually exclusive preferences\n *\n * @accessibility\n * - Sets `accessibilityRole=\"radio\"` automatically\n * - Announces checked/unchecked state\n * - Label is used as accessibility label\n * - Supports `reduceMotion` for users who prefer reduced motion\n *\n * @see {@link Checkbox} for multi-select options\n * @see {@link Switch} for binary toggles\n */\nconst Radio = memo(function Radio({\n // Radio props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: RadioProps) {\n const generatedId = useId();\n const uid = `uds-radio-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<boolean>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: RadioValueState = useMemo(() => {\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n const radioAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: RadioStyleVariant = hasError ? VARIANT_ERROR_MAP[variantProp] : variantProp;\n\n radioStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [radioStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [radioStyles.root, disabled],\n );\n\n const radioBoxStyle = useMemo(\n () => [\n radioStyles.radio,\n {\n alignItems: 'center' as const,\n justifyContent: 'center' as const,\n borderRadius: 9999,\n },\n radioAnimatedStyle,\n ],\n [radioStyles.radio, radioAnimatedStyle],\n );\n\n // Inner circle size: fixed 8x8px to match web implementation\n const INNER_CIRCLE_SIZE = 8;\n\n const circleStyle = useMemo(\n () => [\n radioStyles.radioCircle,\n {\n width: INNER_CIRCLE_SIZE,\n height: INNER_CIRCLE_SIZE,\n borderRadius: 9999,\n },\n ],\n [radioStyles.radioCircle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={radioStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={radioStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, radioStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked,\n }),\n [disabled, checked],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"radio\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={radioBoxStyle}>{checked && <View style={circleStyle} />}</Animated.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ch({ isOn: isOnProp, defaultIsOn = f
|
|
|
134
134
|
...viewProps,
|
|
135
135
|
style: rootStyle,
|
|
136
136
|
children: [
|
|
137
|
-
labelPosition === "
|
|
137
|
+
labelPosition === "start" && labelContent,
|
|
138
138
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
139
139
|
style: trackStyle,
|
|
140
140
|
importantForAccessibility: "no-hide-descendants",
|
|
@@ -157,7 +157,7 @@ const Switch = (0, react.memo)(function Switch({ isOn: isOnProp, defaultIsOn = f
|
|
|
157
157
|
})]
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
labelPosition === "
|
|
160
|
+
labelPosition === "end" && labelContent
|
|
161
161
|
]
|
|
162
162
|
});
|
|
163
163
|
});
|
|
@@ -131,7 +131,7 @@ const Switch = memo(function Switch({ isOn: isOnProp, defaultIsOn = false, onCha
|
|
|
131
131
|
...viewProps,
|
|
132
132
|
style: rootStyle,
|
|
133
133
|
children: [
|
|
134
|
-
labelPosition === "
|
|
134
|
+
labelPosition === "start" && labelContent,
|
|
135
135
|
/* @__PURE__ */ jsx(Animated.View, {
|
|
136
136
|
style: trackStyle,
|
|
137
137
|
importantForAccessibility: "no-hide-descendants",
|
|
@@ -154,7 +154,7 @@ const Switch = memo(function Switch({ isOn: isOnProp, defaultIsOn = false, onCha
|
|
|
154
154
|
})]
|
|
155
155
|
})
|
|
156
156
|
}),
|
|
157
|
-
labelPosition === "
|
|
157
|
+
labelPosition === "end" && labelContent
|
|
158
158
|
]
|
|
159
159
|
});
|
|
160
160
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["Text","StyleSheet"],"sources":["../../src/components/Switch.tsx"],"sourcesContent":["import type { SwitchSize, UniversalSwitchProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport type { AccessibilityProps, StyleProp, View, ViewProps, ViewStyle } from 'react-native';\nimport { AccessibilityInfo, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';\nimport { StyleSheet } from 'react-native-unistyles';\nimport { useAnimatedVariantColor } from 'react-native-unistyles/reanimated';\n\nimport { switchStyles } from '../../generated/styles';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\n\ninterface SwitchProps extends Omit<ViewProps, 'style'>, UniversalSwitchProps<IconSlotType> {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Callback when the switch value changes */\n onChange?: (value: boolean) => void;\n /** Whether the switch is disabled */\n disabled?: boolean;\n /** Whether the switch is required (shows asterisk with label) */\n required?: boolean;\n /** Accessibility hint describing what happens when activated */\n accessibilityHint?: AccessibilityProps['accessibilityHint'];\n}\n\nconst HANDLE_TRAVEL: Record<SwitchSize, number> = {\n md: 20,\n sm: 12,\n};\n\nconst ANIMATION_DURATION = 120;\n\n/**\n * **Switch component for toggling options**\n *\n * @description\n * A switch (also called a toggle) is a binary on/off input control.\n * It allows users to pick between two clearly opposite choices.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Switch } from '@yahoo/uds-mobile';\n *\n * <Switch label=\"Notifications\" />\n * <Switch isOn={enabled} onChange={setEnabled} label=\"Dark mode\" />\n * <Switch onIcon=\"Check\" offIcon=\"Cross\" label=\"Sync\" />\n * ```\n *\n * @usage\n * - Settings: For toggling preferences on/off\n * - Feature flags: For enabling/disabling features\n * - Immediate effect toggles (no submit button needed)\n *\n * @accessibility\n * - Sets `accessibilityRole=\"switch\"` automatically\n * - Announces on/off state to screen readers\n * - Respects system reduce motion preference\n * - Supports `reduceMotion` prop to disable animations\n *\n * @see {@link Checkbox} for forms with submit actions\n * @see {@link Radio} for single-select options\n */\nconst Switch = memo(function Switch({\n isOn: isOnProp,\n defaultIsOn = false,\n onChange,\n label,\n labelPosition = 'start',\n size = 'md',\n onIcon,\n offIcon,\n disabled = false,\n required,\n accessibilityHint,\n reduceMotion = false,\n ref,\n ...viewProps\n}: SwitchProps) {\n const isControlled = isOnProp !== undefined;\n const [internalIsOn, setInternalIsOn] = useState(defaultIsOn);\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n const isOn = isControlled ? isOnProp : internalIsOn;\n\n // Check system reduced motion preference\n useEffect(() => {\n const checkReducedMotion = async () => {\n const isReduceMotionEnabled = await AccessibilityInfo.isReduceMotionEnabled();\n setPrefersReducedMotion(isReduceMotionEnabled);\n };\n checkReducedMotion();\n\n const subscription = AccessibilityInfo.addEventListener(\n 'reduceMotionChanged',\n setPrefersReducedMotion,\n );\n return () => subscription.remove();\n }, []);\n\n const shouldReduceMotion = reduceMotion || prefersReducedMotion;\n const animationDuration = shouldReduceMotion ? 0 : ANIMATION_DURATION;\n\n const progress = useDerivedValue(\n () => withTiming(isOn ? 1 : 0, { duration: animationDuration }),\n [isOn, animationDuration],\n );\n\n const travelDistance = HANDLE_TRAVEL[size];\n\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newValue = !isOn;\n\n if (!isControlled) {\n setInternalIsOn(newValue);\n }\n\n onChange?.(newValue);\n }, [disabled, isOn, isControlled, onChange]);\n\n switchStyles.useVariants({\n size,\n variant: isOn ? 'on' : 'off',\n });\n\n // Get animated track color from design tokens (changes when variant changes)\n const trackBackgroundColor = useAnimatedVariantColor(switchStyles.switch, 'backgroundColor');\n\n const animatedTrackStyle = useAnimatedStyle(() => {\n 'worklet';\n return {\n backgroundColor: withTiming(trackBackgroundColor.value, { duration: animationDuration }),\n };\n });\n\n const animatedHandleStyle = useAnimatedStyle(() => {\n 'worklet';\n return {\n transform: [{ translateX: progress.value * travelDistance }],\n };\n });\n\n const rootStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.root, switchStaticStyles.root({ disabled })],\n [switchStyles.root, disabled],\n );\n\n const trackStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.switch, switchStaticStyles.track, animatedTrackStyle],\n [switchStyles.switch, animatedTrackStyle],\n );\n\n const handleStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.handle, switchStaticStyles.handle, animatedHandleStyle],\n [switchStyles.handle, animatedHandleStyle],\n );\n\n const accessibilityLabel = typeof label === 'string' ? label : undefined;\n const resolvedAccessibilityHint = accessibilityHint ?? 'Double tap to toggle';\n\n const resolvedLabel = typeof label === 'function' ? label() : label;\n const labelContent = resolvedLabel && (\n <HStack gap=\"2\" alignItems=\"center\">\n <Text style={switchStyles.text}>{resolvedLabel}</Text>\n {required && <Text color=\"alert\">*</Text>}\n </HStack>\n );\n\n const a11yValue = useMemo(() => ({ text: isOn ? 'On' : 'Off' }), [isOn]);\n\n return (\n <Pressable\n ref={ref}\n onPress={handlePress}\n disabled={disabled}\n accessible\n accessibilityRole=\"switch\"\n accessibilityState={{ checked: isOn, disabled }}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={resolvedAccessibilityHint}\n accessibilityValue={a11yValue}\n {...viewProps}\n style={rootStyle}\n >\n {labelPosition === 'end' && labelContent}\n\n <Animated.View style={trackStyle} importantForAccessibility=\"no-hide-descendants\">\n <Animated.View style={handleStyle}>\n {onIcon && isOn && (\n <Animated.View style={switchStaticStyles.iconContainer}>\n <IconSlot icon={onIcon} variant=\"fill\" style={switchStyles.handleIcon} />\n </Animated.View>\n )}\n {offIcon && !isOn && (\n <Animated.View style={switchStaticStyles.iconContainer}>\n <IconSlot icon={offIcon} variant=\"fill\" style={switchStyles.handleIcon} />\n </Animated.View>\n )}\n </Animated.View>\n </Animated.View>\n\n {labelPosition === 'start' && labelContent}\n </Pressable>\n );\n});\n\nSwitch.displayName = 'Switch';\n\nconst switchStaticStyles = StyleSheet.create((theme) => ({\n handle: {\n borderRadius: theme.borderRadius.full,\n alignItems: 'center',\n justifyContent: 'center',\n },\n iconContainer: {\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'center',\n },\n track: {\n justifyContent: 'center',\n borderRadius: theme.borderRadius.full,\n },\n root: ({ disabled }: { disabled: boolean }) => ({\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'flex-start',\n opacity: disabled ? 0.5 : 1,\n }),\n}));\n\nexport { Switch, type SwitchProps };\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,gBAA4C;CAChD,IAAI;CACJ,IAAI;CACL;AAED,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmC3B,MAAM,SAAS,KAAK,SAAS,OAAO,EAClC,MAAM,UACN,cAAc,OACd,UACA,OACA,gBAAgB,SAChB,OAAO,MACP,QACA,SACA,WAAW,OACX,UACA,mBACA,eAAe,OACf,KACA,GAAG,aACW;CACd,MAAM,eAAe,aAAa;CAClC,MAAM,CAAC,cAAc,mBAAmB,SAAS,YAAY;CAC7D,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,MAAM;CACvE,MAAM,OAAO,eAAe,WAAW;AAGvC,iBAAgB;EACd,MAAM,qBAAqB,YAAY;AAErC,2BAD8B,MAAM,kBAAkB,uBAAuB,CAC/B;;AAEhD,sBAAoB;EAEpB,MAAM,eAAe,kBAAkB,iBACrC,uBACA,wBACD;AACD,eAAa,aAAa,QAAQ;IACjC,EAAE,CAAC;CAGN,MAAM,oBADqB,gBAAgB,uBACI,IAAI;CAEnD,MAAM,WAAW,sBACT,WAAW,OAAO,IAAI,GAAG,EAAE,UAAU,mBAAmB,CAAC,EAC/D,CAAC,MAAM,kBAAkB,CAC1B;CAED,MAAM,iBAAiB,cAAc;CAErC,MAAM,cAAc,kBAAkB;AACpC,MAAI,SACF;EAGF,MAAM,WAAW,CAAC;AAElB,MAAI,CAAC,aACH,iBAAgB,SAAS;AAG3B,aAAW,SAAS;IACnB;EAAC;EAAU;EAAM;EAAc;EAAS,CAAC;AAE5C,cAAa,YAAY;EACvB;EACA,SAAS,OAAO,OAAO;EACxB,CAAC;CAGF,MAAM,uBAAuB,wBAAwB,aAAa,QA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AAO,mBAAmB;gBACvC,oBAAC;OAAS,MAAM;OAAQ,SAAQ;OAAO,OAAO,aAAa;QAAc;OAC3D,EAEjB,WAAW,CAAC,QACX,oBAAC,SAAS;MAAK,OAAO,mBAAmB;gBACvC,oBAAC;OAAS,MAAM;OAAS,SAAQ;OAAO,OAAO,aAAa;QAAc;OAC5D;MAEJ;KACF;GAEf,kBAAkB,WAAW;;GACpB;EAEd;AAEF,OAAO,cAAc;AAErB,MAAM,qBAAqBC,aAAW,QAAQ,WAAW;CACvD,QAAQ;EACN,cAAc,MAAM,aAAa;EACjC,YAAY;EACZ,gBAAgB;EACjB;CACD,eAAe;EACb,UAAU;EACV,YAAY;EACZ,gBAAgB;EACjB;CACD,OAAO;EACL,gBAAgB;EAChB,cAAc,MAAM,aAAa;EAClC;CACD,OAAO,EAAE,gBAAuC;EAC9C,eAAe;EACf,YAAY;EACZ,WAAW;EACX,SAAS,WAAW,KAAM;EAC3B;CACF,EAAE"}
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["Text","StyleSheet"],"sources":["../../src/components/Switch.tsx"],"sourcesContent":["import type { SwitchSize, UniversalSwitchProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport type { AccessibilityProps, StyleProp, View, ViewProps, ViewStyle } from 'react-native';\nimport { AccessibilityInfo, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';\nimport { StyleSheet } from 'react-native-unistyles';\nimport { useAnimatedVariantColor } from 'react-native-unistyles/reanimated';\n\nimport { switchStyles } from '../../generated/styles';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\n\ninterface SwitchProps extends Omit<ViewProps, 'style'>, UniversalSwitchProps<IconSlotType> {\n /** Ref to the underlying View */\n ref?: Ref<View>;\n /** Callback when the switch value changes */\n onChange?: (value: boolean) => void;\n /** Whether the switch is disabled */\n disabled?: boolean;\n /** Whether the switch is required (shows asterisk with label) */\n required?: boolean;\n /** Accessibility hint describing what happens when activated */\n accessibilityHint?: AccessibilityProps['accessibilityHint'];\n}\n\nconst HANDLE_TRAVEL: Record<SwitchSize, number> = {\n md: 20,\n sm: 12,\n};\n\nconst ANIMATION_DURATION = 120;\n\n/**\n * **Switch component for toggling options**\n *\n * @description\n * A switch (also called a toggle) is a binary on/off input control.\n * It allows users to pick between two clearly opposite choices.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Switch } from '@yahoo/uds-mobile';\n *\n * <Switch label=\"Notifications\" />\n * <Switch isOn={enabled} onChange={setEnabled} label=\"Dark mode\" />\n * <Switch onIcon=\"Check\" offIcon=\"Cross\" label=\"Sync\" />\n * ```\n *\n * @usage\n * - Settings: For toggling preferences on/off\n * - Feature flags: For enabling/disabling features\n * - Immediate effect toggles (no submit button needed)\n *\n * @accessibility\n * - Sets `accessibilityRole=\"switch\"` automatically\n * - Announces on/off state to screen readers\n * - Respects system reduce motion preference\n * - Supports `reduceMotion` prop to disable animations\n *\n * @see {@link Checkbox} for forms with submit actions\n * @see {@link Radio} for single-select options\n */\nconst Switch = memo(function Switch({\n isOn: isOnProp,\n defaultIsOn = false,\n onChange,\n label,\n labelPosition = 'start',\n size = 'md',\n onIcon,\n offIcon,\n disabled = false,\n required,\n accessibilityHint,\n reduceMotion = false,\n ref,\n ...viewProps\n}: SwitchProps) {\n const isControlled = isOnProp !== undefined;\n const [internalIsOn, setInternalIsOn] = useState(defaultIsOn);\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n const isOn = isControlled ? isOnProp : internalIsOn;\n\n // Check system reduced motion preference\n useEffect(() => {\n const checkReducedMotion = async () => {\n const isReduceMotionEnabled = await AccessibilityInfo.isReduceMotionEnabled();\n setPrefersReducedMotion(isReduceMotionEnabled);\n };\n checkReducedMotion();\n\n const subscription = AccessibilityInfo.addEventListener(\n 'reduceMotionChanged',\n setPrefersReducedMotion,\n );\n return () => subscription.remove();\n }, []);\n\n const shouldReduceMotion = reduceMotion || prefersReducedMotion;\n const animationDuration = shouldReduceMotion ? 0 : ANIMATION_DURATION;\n\n const progress = useDerivedValue(\n () => withTiming(isOn ? 1 : 0, { duration: animationDuration }),\n [isOn, animationDuration],\n );\n\n const travelDistance = HANDLE_TRAVEL[size];\n\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newValue = !isOn;\n\n if (!isControlled) {\n setInternalIsOn(newValue);\n }\n\n onChange?.(newValue);\n }, [disabled, isOn, isControlled, onChange]);\n\n switchStyles.useVariants({\n size,\n variant: isOn ? 'on' : 'off',\n });\n\n // Get animated track color from design tokens (changes when variant changes)\n const trackBackgroundColor = useAnimatedVariantColor(switchStyles.switch, 'backgroundColor');\n\n const animatedTrackStyle = useAnimatedStyle(() => {\n 'worklet';\n return {\n backgroundColor: withTiming(trackBackgroundColor.value, { duration: animationDuration }),\n };\n });\n\n const animatedHandleStyle = useAnimatedStyle(() => {\n 'worklet';\n return {\n transform: [{ translateX: progress.value * travelDistance }],\n };\n });\n\n const rootStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.root, switchStaticStyles.root({ disabled })],\n [switchStyles.root, disabled],\n );\n\n const trackStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.switch, switchStaticStyles.track, animatedTrackStyle],\n [switchStyles.switch, animatedTrackStyle],\n );\n\n const handleStyle: StyleProp<ViewStyle> = useMemo(\n () => [switchStyles.handle, switchStaticStyles.handle, animatedHandleStyle],\n [switchStyles.handle, animatedHandleStyle],\n );\n\n const accessibilityLabel = typeof label === 'string' ? label : undefined;\n const resolvedAccessibilityHint = accessibilityHint ?? 'Double tap to toggle';\n\n const resolvedLabel = typeof label === 'function' ? label() : label;\n const labelContent = resolvedLabel && (\n <HStack gap=\"2\" alignItems=\"center\">\n <Text style={switchStyles.text}>{resolvedLabel}</Text>\n {required && <Text color=\"alert\">*</Text>}\n </HStack>\n );\n\n const a11yValue = useMemo(() => ({ text: isOn ? 'On' : 'Off' }), [isOn]);\n\n return (\n <Pressable\n ref={ref}\n onPress={handlePress}\n disabled={disabled}\n accessible\n accessibilityRole=\"switch\"\n accessibilityState={{ checked: isOn, disabled }}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={resolvedAccessibilityHint}\n accessibilityValue={a11yValue}\n {...viewProps}\n style={rootStyle}\n >\n {labelPosition === 'start' && labelContent}\n\n <Animated.View style={trackStyle} importantForAccessibility=\"no-hide-descendants\">\n <Animated.View style={handleStyle}>\n {onIcon && isOn && (\n <Animated.View style={switchStaticStyles.iconContainer}>\n <IconSlot icon={onIcon} variant=\"fill\" style={switchStyles.handleIcon} />\n </Animated.View>\n )}\n {offIcon && !isOn && (\n <Animated.View style={switchStaticStyles.iconContainer}>\n <IconSlot icon={offIcon} variant=\"fill\" style={switchStyles.handleIcon} />\n </Animated.View>\n )}\n </Animated.View>\n </Animated.View>\n\n {labelPosition === 'end' && labelContent}\n </Pressable>\n );\n});\n\nSwitch.displayName = 'Switch';\n\nconst switchStaticStyles = StyleSheet.create((theme) => ({\n handle: {\n borderRadius: theme.borderRadius.full,\n alignItems: 'center',\n justifyContent: 'center',\n },\n iconContainer: {\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'center',\n },\n track: {\n justifyContent: 'center',\n borderRadius: theme.borderRadius.full,\n },\n root: ({ disabled }: { disabled: boolean }) => ({\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'flex-start',\n opacity: disabled ? 0.5 : 1,\n }),\n}));\n\nexport { Switch, type SwitchProps };\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,gBAA4C;CAChD,IAAI;CACJ,IAAI;CACL;AAED,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmC3B,MAAM,SAAS,KAAK,SAAS,OAAO,EAClC,MAAM,UACN,cAAc,OACd,UACA,OACA,gBAAgB,SAChB,OAAO,MACP,QACA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,UAAU;EACV,YAAY;EACZ,gBAAgB;EACjB;CACD,OAAO;EACL,gBAAgB;EAChB,cAAc,MAAM,aAAa;EAClC;CACD,OAAO,EAAE,gBAAuC;EAC9C,eAAe;EACf,YAAY;EACZ,WAAW;EACX,SAAS,WAAW,KAAM;EAC3B;CACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["ElementType","HTMLAttributes","PropsWithChildren","ReactElement","ReactNode","Ref","IntRange","IconPixelSize","IconSize","IconVariant","GenericIconComponent","React","ComponentType","MaxLengthArray","T","N","A","ExtractUrlFromFontFaceRule","U","Percentage","PixelsUnit","value","type","RemsUnit","UnitlessUnit","PercentageUnit","Hue","HueStep","SpectrumColor","SharedPrimaryPaletteAlias","SharedSecondaryPaletteAlias","SharedPaletteAlias","DeprecatedAccentAlias","OpacityStep","BackgroundPaletteAlias","BackgroundPalette","PaletteValue","Record","ForegroundPaletteAlias","ForegroundPalette","LinePaletteAlias","LinePalette","ShadowPaletteAlias","ShadowPalette","AlwaysPaletteAliasWithPrefix","DeprecatedAlwaysPaletteAlias","AlwaysPaletteAlias","LinkableValue","$ref","PaletteType","PaletteConfig","hue","step","opacity","Palette","key","background","foreground","line","shadow","ForegroundColor","LineColor","ElevationAlias","BackgroundColor","ShadowColor","PropertyToPaletteAliasMap","backgroundColor","borderColor","color","ShadowSpectrumColor","ShadowPaletteColor","ShadowAlwaysColor","ShadowColorConfig","ShadowOffset","SpacingAlias","Exclude","ShadowOpacity","ShadowSpreadRadius","ShadowPreset","offsetX","offsetY","blur","spread","ShadowVariant","ShadowVariantWithElevation","ShadowVariantInvert","ShadowVariantWithInvert","ShadowVariantConfig","ShadowType","ShadowTypeConfig","ShadowConfig","drop","inset","BreakpointValue","BreakpointsConfig","sm","md","lg","xl","Breakpoint","BreakpointWithBase","TextVariantTypography","TextVariantUi","TextVariantWithoutEmphasized","TextVariant","FontAlias","FontType","FontWeightNumeric","FontWeightDescriptive","TextTransform","TextDecorationLine","LineClampAlias","LineHeight","FontSize","TextTransformConfig","FontSizeConfig","FontFamilyConfig","FontWeightConfig","FontSlantConfig","FontWidthConfig","LineHeightConfig","TextProperty","TypographyUnitValue","TypographyResponsiveProperty","base","breakpoints","TypographyStyleProperty","TypographyStyle","fontFamily","textTransform","fontSize","fontWeight","lineHeight","fontSlant","fontWidth","letterSpacing","TypographyConfig","FontConfig","TShirtSize","TShirtSizeCommon","Extract","AvatarSize","AvatarSizeConfig","AvatarShape","BorderRadius","IconSizeConfig","SpacingConfig","AlwaysPaletteColor","ElevationSurfaceColor","ElevationBackgroundFillColor","ElevationBorderColor","RGBColorValue","RGBAUnit","r","g","b","a","ElevationCustomShadows","RGBUnit","ElevationPreset","BorderWidth","surfaceColor","layerWithBackgroundFill","backgroundFill","backgroundBlurRadius","finalBackgroundOpacity","finalBackgroundValue","fallbackBlurredBackgroundValue","borderWidth","dropShadow","ElevationLevel","ElevationConfig","ColorMode","ElevationGlobalRampSettings","progression","ambientLight","shadowDistance","shadowOpacity","shadowColor","backgroundOpacity","ElevationGlobalRampConfig","isAdvancedModeEnabled","colorMode","FocusRingWidth","FocusRingOffset","FocusRingColor","FocusRingConfig","width","offset","FocusRingModeConfig","BorderRadiusConfig","BorderWidthWithElevation","BorderWidthConfig","ColorModeForApp","ColorModeConfig","ColorsConfig","SpectrumConfig","palette","spectrum","SpectrumRGB","SpectrumValueEntry","rgb","SpectrumValue","ScaleMode","ScaleModeForApp","ScaleConfig","avatarSizes","iconSizes","borderRadius","ScaleModeConfig","ButtonSize","ButtonPalette","ButtonVariant","ButtonContrastVariant","ScaleEffect","ButtonVariantFlat","ButtonSpectrumColor","ButtonPaletteColor","IconButtonSize","InputSize","PlatformMode","HighContrastMode","RegionMode","Modes","scaleMode","Animation","TransitionDelay","TransitionDuration","TransitionTiming","MotionVariant","MotionVariantSpeed","MotionSpringConfigOptions","MotionSpringConfig","damping","stiffness","MotionVariantValues","MotionConfig","FontCssVar","MotionCssVar","UdsCssVar","AriaAttribute","DataAttribute","Flex","FlexGrow","FlexShrink","FlexAlignContent","FlexAlignItems","FlexAlignSelf","FlexDirection","FlexWrap","FlexJustifyContent","FlexBasis","Display","Overflow","Position","ImageStyleProps","contentFit","BorderStyleProps","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderVerticalWidth","borderHorizontalWidth","borderStartWidth","borderEndWidth","borderTopWidth","borderBottomWidth","NestedBorderRadiusStyleProps","nestedBorderRadius","nestedBorderRadiusSize","nestedBorderRadiusSpacing","nestedBorderRadiusWidth","ShadowStyleProps","insetShadow","LayoutStyleProps","display","overflow","overflowX","overflowY","position","SpacingStyleProps","spacing","spacingHorizontal","spacingVertical","spacingBottom","spacingEnd","spacingStart","spacingTop","offsetVertical","offsetHorizontal","offsetBottom","offsetEnd","offsetStart","offsetTop","columnGap","rowGap","FlexStyleProps","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","flexBasis","StateStyleProps","interactable","focusable","TextStyleProps","placeholderColor","textAlign","BackgroundStyleProps","CustomSizingStyleProps","iconSize","avatarSize","SizeStyleProps","height","StyleProps","UniversalBoxProps","asChild","as","elevation","UniversalStackProps","Omit","gap","separator","index","UniversalTextProps","variant","UniversalIconProps","Icon","name","size","SVGElementProps","SVGSVGElement","IconPropsWithSVGProps","IconSlotRenderProps","BackwardsCompatibleReactElement","UniversalIconSlot","iconProps","UniversalPressableProps","onPress","UniversalIconButtonProps","iconVariant","htmlName","loading","disableEffects","UniversalButtonProps","IconSlotType","Pick","startIcon","endIcon","UniversalImageProps","src","alt","ImgElementProps","HTMLImageElement","ImgHTMLAttributes","ImagePropsWithImgProps","UniversalFormLabelProps","required","hasError","showRequiredAsterisk","label","UniversalInputProps","disabled","helpText","helperTextIcon","reduceMotion","readOnly","DividerVariant","UniversalDividerProps","vertical","contentPosition","LinkVariant","LinkTextVariant","UniversalLinkProps","textVariant","alwaysUnderline","CheckboxValue","CheckboxVariant","CheckboxSize","UniversalCheckboxProps","checked","labelPosition","RadioValue","RadioVariant","RadioSize","UniversalRadioProps","UniversalRadioGroupProps","defaultValue","onChange","SwitchSize","UniversalSwitchProps","isOn","defaultIsOn","onIcon","offIcon","ChipVariant","ChipSize","UniversalChipBaseProps","minWidth","maxWidth","UniversalChipDismissibleProps","onDismiss","dismissButtonAriaLabel","dismissIcon","UniversalChipToggleProps","isToggled","onToggle","UniversalChipButtonProps","UniversalChipLinkProps","href","UniversalChipProps","BadgeVariant","BadgeSize","UniversalBadgeProps","iconColor","AvatarVariant","AvatarAbbreviationStrategy","UniversalAvatarBaseProps","customSize","abbreviationStrategy","className","UniversalAvatarImageProps","srcSet","fallback","UniversalAvatarTextProps","initials","UniversalAvatarIconProps","icon","UniversalAvatarProps","UniversalMenuItemProps","active","slots","root","ref","props","ToastSize","ToastVariant","ToastPosition","UniversalToastProps","message","actionButton","onClickActionButton","closeIcon","onClickCloseButton","id","VerticalPlacement","HorizontalPlacement","TooltipPlacement","TooltipSize","TooltipVariant","UniversalTooltipProps","children","placement","open","portal","UniversalTooltipTriggerProps","UniversalTooltipContentProps","startTitleIcon","title","endContent","BottomSheetVariant","BottomSheetHeight","BottomSheetSnapPoints","UniversalBottomSheetProps","snapPoints","defaultSnapPointIndex","snapPointIndex","onSnapPointChange","dismissible","enableDrag","showHandleIndicator","fullWidthAtMaxSnap","UniversalBottomSheetHeaderProps","start","end","UniversalBottomSheetContentProps","ConfigurableComponentName","UniversalTokensConfigAutoBase","UniversalTokensConfigBase","GlobalDefaultsConfig","$defs","links","systems","version","font","motion","typography","elevationGlobalRamp","focusRing","globalDefaults","UniversalTokensConfigGeneric","ConfigAuto","breakpoint","enableResponsiveType"],"sources":["../../../../types/dist/index.d.ts"],"mappings":";;;;;;;KAYKQ,QAAAA;AAIW;;;AAAA,KAAXC,WAAAA;;AA6BiC;;;;KAvBjCC,oBAAAA,GAAuBC,KAAAA,CAAMC,a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OiD,YAAAA;EAnIc1D;EAqIrBwC,KAAAA,YAAiB9W,SAAAA,UAAmBA,SAAAA;EArIKiV;EAuIzCiD,OAAAA,GAAUJ,aAAAA;EAvI4C;EAyItDlB,QAAAA;EAxI6B;EA0I7BO,YAAAA;EA1IsCvC;EA4ItCuD,aAAAA;AAAAA;AAAAA,KAGGE,YAAAA;AAAAA,KACAC,SAAAA;AAAAA,UACKC,mBAAAA;EAhJ2C;EAkJnD5D,OAAAA,GAAU0D,YAAAA;;EAEVtD,IAAAA,GAAOuD,SAAAA;EAnJ6D;EAqJpExB,KAAAA,YAAiB9W,SAAAA,UAAmBA,SAAAA;EAhJhB;EAkJpBiB,KAAAA;EAlJ4BX;EAoJ5B4X,OAAAA;EApJ2D9C;EAsJ3DwB,QAAAA;EAtJkIxB;EAwJlI+B,YAAAA;EAxJiK;EA0JjKgB,aAAAA;AAAAA;AAAAA,KAcGQ,UAAAA;AAAAA,UACKC,oBAAAA,gBAAoCvD,iBAAAA;EAlIoD;EAoIhGN,IAAAA,GAAO4D,UAAAA;EApIkC1E;EAsIzC6C,KAAAA,YAAiB9W,SAAAA,UAAmBA,SAAAA;EApIpCoW;EAsIAyC,IAAAA;EAlIAtN;EAoIAuN,WAAAA;EAlIM;EAoINC,MAAAA,GAAShD,YAAAA;EAlHoC;EAoH7CiD,OAAAA,GAAUjD,YAAAA;EAlHiBA;EAoH3BoB,YAAAA;EAlHiBnX;EAoHjBmY,aAAAA;AAAAA;AAAAA,KAEGc,WAAAA;AAAAA,KACAC,QAAAA;AAAAA,KAyCAe,YAAAA;AAAAA,KACAC,SAAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["ElementType","HTMLAttributes","PropsWithChildren","ReactElement","ReactNode","Ref","IntRange","IconPixelSize","IconSize","IconVariant","GenericIconComponent","React","ComponentType","MaxLengthArray","T","N","A","ExtractUrlFromFontFaceRule","U","Percentage","PixelsUnit","value","type","RemsUnit","UnitlessUnit","PercentageUnit","Hue","HueStep","SpectrumColor","SharedPrimaryPaletteAlias","SharedSecondaryPaletteAlias","SharedPaletteAlias","DeprecatedAccentAlias","OpacityStep","BackgroundPaletteAlias","BackgroundPalette","PaletteValue","Record","ForegroundPaletteAlias","ForegroundPalette","LinePaletteAlias","LinePalette","ShadowPaletteAlias","ShadowPalette","AlwaysPaletteAliasWithPrefix","DeprecatedAlwaysPaletteAlias","AlwaysPaletteAlias","LinkableValue","$ref","PaletteType","PaletteConfig","hue","step","opacity","Palette","key","background","foreground","line","shadow","ForegroundColor","LineColor","ElevationAlias","BackgroundColor","ShadowColor","PropertyToPaletteAliasMap","backgroundColor","borderColor","color","ShadowSpectrumColor","ShadowPaletteColor","ShadowAlwaysColor","ShadowColorConfig","ShadowOffset","SpacingAlias","Exclude","ShadowOpacity","ShadowSpreadRadius","ShadowPreset","offsetX","offsetY","blur","spread","ShadowVariant","ShadowVariantWithElevation","ShadowVariantInvert","ShadowVariantWithInvert","ShadowVariantConfig","ShadowType","ShadowTypeConfig","ShadowConfig","drop","inset","BreakpointValue","BreakpointsConfig","sm","md","lg","xl","Breakpoint","BreakpointWithBase","TextVariantTypography","TextVariantUi","TextVariantWithoutEmphasized","TextVariant","FontAlias","FontType","FontWeightNumeric","FontWeightDescriptive","TextTransform","TextDecorationLine","LineClampAlias","LineHeight","FontSize","TextTransformConfig","FontSizeConfig","FontFamilyConfig","FontWeightConfig","FontSlantConfig","FontWidthConfig","LineHeightConfig","TextProperty","TypographyUnitValue","TypographyResponsiveProperty","base","breakpoints","TypographyStyleProperty","TypographyStyle","fontFamily","textTransform","fontSize","fontWeight","lineHeight","fontSlant","fontWidth","letterSpacing","TypographyConfig","FontConfig","TShirtSize","TShirtSizeCommon","Extract","AvatarSize","AvatarSizeConfig","AvatarShape","BorderRadius","IconSizeConfig","SpacingConfig","AlwaysPaletteColor","ElevationSurfaceColor","ElevationBackgroundFillColor","ElevationBorderColor","RGBColorValue","RGBAUnit","r","g","b","a","ElevationCustomShadows","RGBUnit","ElevationPreset","BorderWidth","surfaceColor","layerWithBackgroundFill","backgroundFill","backgroundBlurRadius","finalBackgroundOpacity","finalBackgroundValue","fallbackBlurredBackgroundValue","borderWidth","dropShadow","ElevationLevel","ElevationConfig","ColorMode","ElevationGlobalRampSettings","progression","ambientLight","shadowDistance","shadowOpacity","shadowColor","backgroundOpacity","ElevationGlobalRampConfig","isAdvancedModeEnabled","colorMode","FocusRingWidth","FocusRingOffset","FocusRingColor","FocusRingConfig","width","offset","FocusRingModeConfig","BorderRadiusConfig","BorderWidthWithElevation","BorderWidthConfig","ColorModeForApp","ColorModeConfig","ColorsConfig","SpectrumConfig","palette","spectrum","SpectrumRGB","SpectrumValueEntry","rgb","SpectrumValue","ScaleMode","ScaleModeForApp","ScaleConfig","avatarSizes","iconSizes","borderRadius","ScaleModeConfig","ButtonSize","ButtonPalette","ButtonVariant","ButtonContrastVariant","ScaleEffect","ButtonVariantFlat","ButtonSpectrumColor","ButtonPaletteColor","IconButtonSize","InputSize","PlatformMode","HighContrastMode","RegionMode","Modes","scaleMode","Animation","TransitionDelay","TransitionDuration","TransitionTiming","MotionVariant","MotionVariantSpeed","MotionSpringConfigOptions","MotionSpringConfig","damping","stiffness","MotionVariantValues","MotionConfig","FontCssVar","MotionCssVar","UdsCssVar","AriaAttribute","DataAttribute","Flex","FlexGrow","FlexShrink","FlexAlignContent","FlexAlignItems","FlexAlignSelf","FlexDirection","FlexWrap","FlexJustifyContent","FlexBasis","Display","Overflow","Position","ImageStyleProps","contentFit","BorderStyleProps","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderVerticalWidth","borderHorizontalWidth","borderStartWidth","borderEndWidth","borderTopWidth","borderBottomWidth","NestedBorderRadiusStyleProps","nestedBorderRadius","nestedBorderRadiusSize","nestedBorderRadiusSpacing","nestedBorderRadiusWidth","ShadowStyleProps","insetShadow","LayoutStyleProps","display","overflow","overflowX","overflowY","position","SpacingStyleProps","spacing","spacingHorizontal","spacingVertical","spacingBottom","spacingEnd","spacingStart","spacingTop","offsetVertical","offsetHorizontal","offsetBottom","offsetEnd","offsetStart","offsetTop","columnGap","rowGap","FlexStyleProps","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","flexBasis","StateStyleProps","interactable","focusable","TextStyleProps","placeholderColor","textAlign","BackgroundStyleProps","CustomSizingStyleProps","iconSize","avatarSize","SizeStyleProps","height","StyleProps","UniversalBoxProps","asChild","as","elevation","UniversalStackProps","Omit","gap","separator","index","UniversalTextProps","variant","UniversalIconProps","Icon","name","size","SVGElementProps","SVGSVGElement","IconPropsWithSVGProps","IconSlotRenderProps","BackwardsCompatibleReactElement","UniversalIconSlot","iconProps","UniversalPressableProps","onPress","UniversalIconButtonProps","iconVariant","htmlName","loading","disableEffects","UniversalButtonProps","IconSlotType","Pick","startIcon","endIcon","UniversalImageProps","src","alt","ImgElementProps","HTMLImageElement","ImgHTMLAttributes","ImagePropsWithImgProps","UniversalFormLabelProps","required","hasError","showRequiredAsterisk","label","UniversalInputProps","disabled","helpText","helperTextIcon","reduceMotion","readOnly","DividerVariant","UniversalDividerProps","vertical","contentPosition","LinkVariant","LinkTextVariant","UniversalLinkProps","textVariant","alwaysUnderline","CheckboxValue","CheckboxVariant","CheckboxSize","UniversalCheckboxProps","checked","labelPosition","RadioValue","RadioVariant","RadioSize","UniversalRadioProps","UniversalRadioGroupProps","defaultValue","onChange","SwitchSize","UniversalSwitchProps","isOn","defaultIsOn","onIcon","offIcon","ChipVariant","ChipSize","UniversalChipBaseProps","minWidth","maxWidth","UniversalChipDismissibleProps","onDismiss","dismissButtonAriaLabel","dismissIcon","UniversalChipToggleProps","isToggled","onToggle","UniversalChipButtonProps","UniversalChipLinkProps","href","UniversalChipProps","BadgeVariant","BadgeSize","UniversalBadgeProps","iconColor","AvatarVariant","AvatarAbbreviationStrategy","UniversalAvatarBaseProps","customSize","abbreviationStrategy","className","UniversalAvatarImageProps","srcSet","fallback","UniversalAvatarTextProps","initials","UniversalAvatarIconProps","icon","UniversalAvatarProps","UniversalMenuItemProps","active","slots","root","ref","props","ToastSize","ToastVariant","ToastPosition","UniversalToastProps","message","actionButton","onClickActionButton","closeIcon","onClickCloseButton","id","VerticalPlacement","HorizontalPlacement","TooltipPlacement","TooltipSize","TooltipVariant","UniversalTooltipProps","children","placement","open","portal","UniversalTooltipTriggerProps","UniversalTooltipContentProps","startTitleIcon","title","endContent","BottomSheetVariant","BottomSheetHeight","BottomSheetSnapPoints","UniversalBottomSheetProps","snapPoints","defaultSnapPointIndex","snapPointIndex","onSnapPointChange","dismissible","enableDrag","showHandleIndicator","fullWidthAtMaxSnap","UniversalBottomSheetHeaderProps","start","end","UniversalBottomSheetContentProps","PopoverPlacement","PopoverSize","UniversalPopoverProps","Event","hideArrow","hideDismissButton","defaultOpen","onClose","event","onOpen","disableAutoFocus","disableVerticalSpacing","disableHorizontalSpacing","sameWidth","gutter","UniversalPopoverTriggerProps","UniversalPopoverContentProps","maxHeight","ConfigurableComponentName","UniversalTokensConfigAutoBase","UniversalTokensConfigBase","GlobalDefaultsConfig","$defs","links","systems","version","font","motion","typography","elevationGlobalRamp","focusRing","globalDefaults","UniversalTokensConfigGeneric","ConfigAuto","breakpoint","enableResponsiveType"],"sources":["../../../../types/dist/index.d.ts"],"mappings":";;;;;;;KAYKQ,QAAAA;AAIW;;;AAAA,KAAXC,WAAAA;;AA6BiC;;;;KAvBjCC,oBAAAA,GAAuBC,KAAAA,CAAMC,aAAAA;AAwBJ;AAAA,KAAzBiB,yBAAAA;AAAAA,KACAC,2BAAAA,MAAiCD,yBAAAA;AAAAA,KACjCE,kBAAAA,GAAqBF,yBAAAA,GAA4BC,2BAAAA;AAAAA,KACjDE,qBAAAA;AAAAA,KAEAE,sBAAAA,6BAAmDF,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE3EO,sBAAAA,iEAAuFN,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE/GS,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AA,GAAU0D,YAAAA;;EAEVtD,IAAAA,GAAOuD,SAAAA;EAnJ6D;EAqJpExB,KAAAA,YAAiB9W,SAAAA,UAAmBA,SAAAA;EAhJhB;EAkJpBiB,KAAAA;EAlJ4BX;EAoJ5B4X,OAAAA;EApJ2D9C;EAsJ3DwB,QAAAA;EAtJkIxB;EAwJlI+B,YAAAA;EAxJiK;EA0JjKgB,aAAAA;AAAAA;AAAAA,KAcGQ,UAAAA;AAAAA,UACKC,oBAAAA,gBAAoCvD,iBAAAA;EAlIoD;EAoIhGN,IAAAA,GAAO4D,UAAAA;EApIkC1E;EAsIzC6C,KAAAA,YAAiB9W,SAAAA,UAAmBA,SAAAA;EApIpCoW;EAsIAyC,IAAAA;EAlIAtN;EAoIAuN,WAAAA;EAlIM;EAoINC,MAAAA,GAAShD,YAAAA;EAlHoC;EAoH7CiD,OAAAA,GAAUjD,YAAAA;EAlHiBA;EAoH3BoB,YAAAA;EAlHiBnX;EAoHjBmY,aAAAA;AAAAA;AAAAA,KAEGc,WAAAA;AAAAA,KACAC,QAAAA;AAAAA,KAyCAe,YAAAA;AAAAA,KACAC,SAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["ElementType","HTMLAttributes","PropsWithChildren","ReactElement","ReactNode","Ref","IntRange","IconPixelSize","IconSize","IconVariant","GenericIconComponent","React","ComponentType","MaxLengthArray","T","N","A","ExtractUrlFromFontFaceRule","U","Percentage","PixelsUnit","value","type","RemsUnit","UnitlessUnit","PercentageUnit","Hue","HueStep","SpectrumColor","SharedPrimaryPaletteAlias","SharedSecondaryPaletteAlias","SharedPaletteAlias","DeprecatedAccentAlias","OpacityStep","BackgroundPaletteAlias","BackgroundPalette","PaletteValue","Record","ForegroundPaletteAlias","ForegroundPalette","LinePaletteAlias","LinePalette","ShadowPaletteAlias","ShadowPalette","AlwaysPaletteAliasWithPrefix","DeprecatedAlwaysPaletteAlias","AlwaysPaletteAlias","LinkableValue","$ref","PaletteType","PaletteConfig","hue","step","opacity","Palette","key","background","foreground","line","shadow","ForegroundColor","LineColor","ElevationAlias","BackgroundColor","ShadowColor","PropertyToPaletteAliasMap","backgroundColor","borderColor","color","ShadowSpectrumColor","ShadowPaletteColor","ShadowAlwaysColor","ShadowColorConfig","ShadowOffset","SpacingAlias","Exclude","ShadowOpacity","ShadowSpreadRadius","ShadowPreset","offsetX","offsetY","blur","spread","ShadowVariant","ShadowVariantWithElevation","ShadowVariantInvert","ShadowVariantWithInvert","ShadowVariantConfig","ShadowType","ShadowTypeConfig","ShadowConfig","drop","inset","BreakpointValue","BreakpointsConfig","sm","md","lg","xl","Breakpoint","BreakpointWithBase","TextVariantTypography","TextVariantUi","TextVariantWithoutEmphasized","TextVariant","FontAlias","FontType","FontWeightNumeric","FontWeightDescriptive","TextTransform","TextDecorationLine","LineClampAlias","LineHeight","FontSize","TextTransformConfig","FontSizeConfig","FontFamilyConfig","FontWeightConfig","FontSlantConfig","FontWidthConfig","LineHeightConfig","TextProperty","TypographyUnitValue","TypographyResponsiveProperty","base","breakpoints","TypographyStyleProperty","TypographyStyle","fontFamily","textTransform","fontSize","fontWeight","lineHeight","fontSlant","fontWidth","letterSpacing","TypographyConfig","FontConfig","TShirtSize","TShirtSizeCommon","Extract","AvatarSize","AvatarSizeConfig","AvatarShape","BorderRadius","IconSizeConfig","SpacingConfig","AlwaysPaletteColor","ElevationSurfaceColor","ElevationBackgroundFillColor","ElevationBorderColor","RGBColorValue","RGBAUnit","r","g","b","a","ElevationCustomShadows","RGBUnit","ElevationPreset","BorderWidth","surfaceColor","layerWithBackgroundFill","backgroundFill","backgroundBlurRadius","finalBackgroundOpacity","finalBackgroundValue","fallbackBlurredBackgroundValue","borderWidth","dropShadow","ElevationLevel","ElevationConfig","ColorMode","ElevationGlobalRampSettings","progression","ambientLight","shadowDistance","shadowOpacity","shadowColor","backgroundOpacity","ElevationGlobalRampConfig","isAdvancedModeEnabled","colorMode","FocusRingWidth","FocusRingOffset","FocusRingColor","FocusRingConfig","width","offset","FocusRingModeConfig","BorderRadiusConfig","BorderWidthWithElevation","BorderWidthConfig","ColorModeForApp","ColorModeConfig","ColorsConfig","SpectrumConfig","palette","spectrum","SpectrumRGB","SpectrumValueEntry","rgb","SpectrumValue","ScaleMode","ScaleModeForApp","ScaleConfig","avatarSizes","iconSizes","borderRadius","ScaleModeConfig","ButtonSize","ButtonPalette","ButtonVariant","ButtonContrastVariant","ScaleEffect","ButtonVariantFlat","ButtonSpectrumColor","ButtonPaletteColor","IconButtonSize","InputSize","PlatformMode","HighContrastMode","RegionMode","Modes","scaleMode","Animation","TransitionDelay","TransitionDuration","TransitionTiming","MotionVariant","MotionVariantSpeed","MotionSpringConfigOptions","MotionSpringConfig","damping","stiffness","MotionVariantValues","MotionConfig","FontCssVar","MotionCssVar","UdsCssVar","AriaAttribute","DataAttribute","Flex","FlexGrow","FlexShrink","FlexAlignContent","FlexAlignItems","FlexAlignSelf","FlexDirection","FlexWrap","FlexJustifyContent","FlexBasis","Display","Overflow","Position","ImageStyleProps","contentFit","BorderStyleProps","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderVerticalWidth","borderHorizontalWidth","borderStartWidth","borderEndWidth","borderTopWidth","borderBottomWidth","NestedBorderRadiusStyleProps","nestedBorderRadius","nestedBorderRadiusSize","nestedBorderRadiusSpacing","nestedBorderRadiusWidth","ShadowStyleProps","insetShadow","LayoutStyleProps","display","overflow","overflowX","overflowY","position","SpacingStyleProps","spacing","spacingHorizontal","spacingVertical","spacingBottom","spacingEnd","spacingStart","spacingTop","offsetVertical","offsetHorizontal","offsetBottom","offsetEnd","offsetStart","offsetTop","columnGap","rowGap","FlexStyleProps","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","flexBasis","StateStyleProps","interactable","focusable","TextStyleProps","placeholderColor","textAlign","BackgroundStyleProps","CustomSizingStyleProps","iconSize","avatarSize","SizeStyleProps","height","StyleProps","UniversalBoxProps","asChild","as","elevation","UniversalStackProps","Omit","gap","separator","index","UniversalTextProps","variant","UniversalIconProps","Icon","name","size","SVGElementProps","SVGSVGElement","IconPropsWithSVGProps","IconSlotRenderProps","BackwardsCompatibleReactElement","UniversalIconSlot","iconProps","UniversalPressableProps","onPress","UniversalIconButtonProps","iconVariant","htmlName","loading","disableEffects","UniversalButtonProps","IconSlotType","Pick","startIcon","endIcon","UniversalImageProps","src","alt","ImgElementProps","HTMLImageElement","ImgHTMLAttributes","ImagePropsWithImgProps","UniversalFormLabelProps","required","hasError","showRequiredAsterisk","label","UniversalInputProps","disabled","helpText","helperTextIcon","reduceMotion","readOnly","DividerVariant","UniversalDividerProps","vertical","contentPosition","LinkVariant","LinkTextVariant","UniversalLinkProps","textVariant","alwaysUnderline","CheckboxValue","CheckboxVariant","CheckboxSize","UniversalCheckboxProps","checked","labelPosition","RadioValue","RadioVariant","RadioSize","UniversalRadioProps","UniversalRadioGroupProps","defaultValue","onChange","SwitchSize","UniversalSwitchProps","isOn","defaultIsOn","onIcon","offIcon","ChipVariant","ChipSize","UniversalChipBaseProps","minWidth","maxWidth","UniversalChipDismissibleProps","onDismiss","dismissButtonAriaLabel","dismissIcon","UniversalChipToggleProps","isToggled","onToggle","UniversalChipButtonProps","UniversalChipLinkProps","href","UniversalChipProps","BadgeVariant","BadgeSize","UniversalBadgeProps","iconColor","AvatarVariant","AvatarAbbreviationStrategy","UniversalAvatarBaseProps","customSize","abbreviationStrategy","className","UniversalAvatarImageProps","srcSet","fallback","UniversalAvatarTextProps","initials","UniversalAvatarIconProps","icon","UniversalAvatarProps","UniversalMenuItemProps","active","slots","root","ref","props","ToastSize","ToastVariant","ToastPosition","UniversalToastProps","message","actionButton","onClickActionButton","closeIcon","onClickCloseButton","id","VerticalPlacement","HorizontalPlacement","TooltipPlacement","TooltipSize","TooltipVariant","UniversalTooltipProps","children","placement","open","portal","UniversalTooltipTriggerProps","UniversalTooltipContentProps","startTitleIcon","title","endContent","BottomSheetVariant","BottomSheetHeight","BottomSheetSnapPoints","UniversalBottomSheetProps","snapPoints","defaultSnapPointIndex","snapPointIndex","onSnapPointChange","dismissible","enableDrag","showHandleIndicator","fullWidthAtMaxSnap","UniversalBottomSheetHeaderProps","start","end","UniversalBottomSheetContentProps","ConfigurableComponentName","UniversalTokensConfigAutoBase","UniversalTokensConfigBase","GlobalDefaultsConfig","$defs","links","systems","version","font","motion","typography","elevationGlobalRamp","focusRing","globalDefaults","UniversalTokensConfigGeneric","ConfigAuto","breakpoint","enableResponsiveType"],"sources":["../../../../types/dist/index.d.ts"],"mappings":";;;;;;;KAYKQ,QAAAA;AAIW;;;AAAA,KAAXC,WAAAA;;AA6BiC;;;;KAvBjCC,oBAAAA,GAAuBC,KAAAA,CAAMC,aAAAA;AAwBJ;AAAA,KAAzBiB,yBAAAA;AAAAA,KACAC,2BAAAA,MAAiCD,yBAAAA;AAAAA,KACjCE,kBAAAA,GAAqBF,yBAAAA,GAA4BC,2BAAAA;AAAAA,KACjDE,qBAAAA;AAAAA,KAEAE,sBAAAA,6BAAmDF,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE3EO,sBAAAA,iEAAuFN,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE/GS,gBAAAA,oDAAoER,qBAAAA,GAAwBD,kBAAAA;;KAK5Fa,4BAAAA;;KAEAC,4BAAAA;AAAAA,KACAC,kBAAAA,GAAqBD,4BAAAA,GAA+BD,4BAAAA;AAAAA,KAiBpDgB,eAAAA,GAAkBtB,sBAAAA,GAAyBQ,kBAAAA;AAAAA,KAC3Ce,SAAAA,GAAYrB,gBAAAA,GAAmBM,kBAAAA,GAAqBgB,cAAAA;AAAAA,KACpDC,eAAAA,GAAkB7B,sBAAAA,GAAyBY,kBAAAA,GAAqBgB,cAAAA;AAAAA,KA+BhEqB,aAAAA;AAAAA,KACAC,0BAAAA,GAA6BD,aAAAA,GAAgBrB,cAAAA;AAAAA,KAC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;EAsIAyC,IAAAA;EAlIAtN;EAoIAuN,WAAAA;EAlIM;EAoINC,MAAAA,GAAShD,YAAAA;EAlHoC;EAoH7CiD,OAAAA,GAAUjD,YAAAA;EAlHiBA;EAoH3BoB,YAAAA;EAlHiBnX;EAoHjBmY,aAAAA;AAAAA;AAAAA,KAEGc,WAAAA;AAAAA,KACAC,QAAAA;AAAAA,KAyCAe,YAAAA;AAAAA,KACAC,SAAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["ElementType","HTMLAttributes","PropsWithChildren","ReactElement","ReactNode","Ref","IntRange","IconPixelSize","IconSize","IconVariant","GenericIconComponent","React","ComponentType","MaxLengthArray","T","N","A","ExtractUrlFromFontFaceRule","U","Percentage","PixelsUnit","value","type","RemsUnit","UnitlessUnit","PercentageUnit","Hue","HueStep","SpectrumColor","SharedPrimaryPaletteAlias","SharedSecondaryPaletteAlias","SharedPaletteAlias","DeprecatedAccentAlias","OpacityStep","BackgroundPaletteAlias","BackgroundPalette","PaletteValue","Record","ForegroundPaletteAlias","ForegroundPalette","LinePaletteAlias","LinePalette","ShadowPaletteAlias","ShadowPalette","AlwaysPaletteAliasWithPrefix","DeprecatedAlwaysPaletteAlias","AlwaysPaletteAlias","LinkableValue","$ref","PaletteType","PaletteConfig","hue","step","opacity","Palette","key","background","foreground","line","shadow","ForegroundColor","LineColor","ElevationAlias","BackgroundColor","ShadowColor","PropertyToPaletteAliasMap","backgroundColor","borderColor","color","ShadowSpectrumColor","ShadowPaletteColor","ShadowAlwaysColor","ShadowColorConfig","ShadowOffset","SpacingAlias","Exclude","ShadowOpacity","ShadowSpreadRadius","ShadowPreset","offsetX","offsetY","blur","spread","ShadowVariant","ShadowVariantWithElevation","ShadowVariantInvert","ShadowVariantWithInvert","ShadowVariantConfig","ShadowType","ShadowTypeConfig","ShadowConfig","drop","inset","BreakpointValue","BreakpointsConfig","sm","md","lg","xl","Breakpoint","BreakpointWithBase","TextVariantTypography","TextVariantUi","TextVariantWithoutEmphasized","TextVariant","FontAlias","FontType","FontWeightNumeric","FontWeightDescriptive","TextTransform","TextDecorationLine","LineClampAlias","LineHeight","FontSize","TextTransformConfig","FontSizeConfig","FontFamilyConfig","FontWeightConfig","FontSlantConfig","FontWidthConfig","LineHeightConfig","TextProperty","TypographyUnitValue","TypographyResponsiveProperty","base","breakpoints","TypographyStyleProperty","TypographyStyle","fontFamily","textTransform","fontSize","fontWeight","lineHeight","fontSlant","fontWidth","letterSpacing","TypographyConfig","FontConfig","TShirtSize","TShirtSizeCommon","Extract","AvatarSize","AvatarSizeConfig","AvatarShape","BorderRadius","IconSizeConfig","SpacingConfig","AlwaysPaletteColor","ElevationSurfaceColor","ElevationBackgroundFillColor","ElevationBorderColor","RGBColorValue","RGBAUnit","r","g","b","a","ElevationCustomShadows","RGBUnit","ElevationPreset","BorderWidth","surfaceColor","layerWithBackgroundFill","backgroundFill","backgroundBlurRadius","finalBackgroundOpacity","finalBackgroundValue","fallbackBlurredBackgroundValue","borderWidth","dropShadow","ElevationLevel","ElevationConfig","ColorMode","ElevationGlobalRampSettings","progression","ambientLight","shadowDistance","shadowOpacity","shadowColor","backgroundOpacity","ElevationGlobalRampConfig","isAdvancedModeEnabled","colorMode","FocusRingWidth","FocusRingOffset","FocusRingColor","FocusRingConfig","width","offset","FocusRingModeConfig","BorderRadiusConfig","BorderWidthWithElevation","BorderWidthConfig","ColorModeForApp","ColorModeConfig","ColorsConfig","SpectrumConfig","palette","spectrum","SpectrumRGB","SpectrumValueEntry","rgb","SpectrumValue","ScaleMode","ScaleModeForApp","ScaleConfig","avatarSizes","iconSizes","borderRadius","ScaleModeConfig","ButtonSize","ButtonPalette","ButtonVariant","ButtonContrastVariant","ScaleEffect","ButtonVariantFlat","ButtonSpectrumColor","ButtonPaletteColor","IconButtonSize","InputSize","PlatformMode","HighContrastMode","RegionMode","Modes","scaleMode","Animation","TransitionDelay","TransitionDuration","TransitionTiming","MotionVariant","MotionVariantSpeed","MotionSpringConfigOptions","MotionSpringConfig","damping","stiffness","MotionVariantValues","MotionConfig","FontCssVar","MotionCssVar","UdsCssVar","AriaAttribute","DataAttribute","Flex","FlexGrow","FlexShrink","FlexAlignContent","FlexAlignItems","FlexAlignSelf","FlexDirection","FlexWrap","FlexJustifyContent","FlexBasis","Display","Overflow","Position","ImageStyleProps","contentFit","BorderStyleProps","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderVerticalWidth","borderHorizontalWidth","borderStartWidth","borderEndWidth","borderTopWidth","borderBottomWidth","NestedBorderRadiusStyleProps","nestedBorderRadius","nestedBorderRadiusSize","nestedBorderRadiusSpacing","nestedBorderRadiusWidth","ShadowStyleProps","insetShadow","LayoutStyleProps","display","overflow","overflowX","overflowY","position","SpacingStyleProps","spacing","spacingHorizontal","spacingVertical","spacingBottom","spacingEnd","spacingStart","spacingTop","offsetVertical","offsetHorizontal","offsetBottom","offsetEnd","offsetStart","offsetTop","columnGap","rowGap","FlexStyleProps","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","flexBasis","StateStyleProps","interactable","focusable","TextStyleProps","placeholderColor","textAlign","BackgroundStyleProps","CustomSizingStyleProps","iconSize","avatarSize","SizeStyleProps","height","StyleProps","UniversalBoxProps","asChild","as","elevation","UniversalStackProps","Omit","gap","separator","index","UniversalTextProps","variant","UniversalIconProps","Icon","name","size","SVGElementProps","SVGSVGElement","IconPropsWithSVGProps","IconSlotRenderProps","BackwardsCompatibleReactElement","UniversalIconSlot","iconProps","UniversalPressableProps","onPress","UniversalIconButtonProps","iconVariant","htmlName","loading","disableEffects","UniversalButtonProps","IconSlotType","Pick","startIcon","endIcon","UniversalImageProps","src","alt","ImgElementProps","HTMLImageElement","ImgHTMLAttributes","ImagePropsWithImgProps","UniversalFormLabelProps","required","hasError","showRequiredAsterisk","label","UniversalInputProps","disabled","helpText","helperTextIcon","reduceMotion","readOnly","DividerVariant","UniversalDividerProps","vertical","contentPosition","LinkVariant","LinkTextVariant","UniversalLinkProps","textVariant","alwaysUnderline","CheckboxValue","CheckboxVariant","CheckboxSize","UniversalCheckboxProps","checked","labelPosition","RadioValue","RadioVariant","RadioSize","UniversalRadioProps","UniversalRadioGroupProps","defaultValue","onChange","SwitchSize","UniversalSwitchProps","isOn","defaultIsOn","onIcon","offIcon","ChipVariant","ChipSize","UniversalChipBaseProps","minWidth","maxWidth","UniversalChipDismissibleProps","onDismiss","dismissButtonAriaLabel","dismissIcon","UniversalChipToggleProps","isToggled","onToggle","UniversalChipButtonProps","UniversalChipLinkProps","href","UniversalChipProps","BadgeVariant","BadgeSize","UniversalBadgeProps","iconColor","AvatarVariant","AvatarAbbreviationStrategy","UniversalAvatarBaseProps","customSize","abbreviationStrategy","className","UniversalAvatarImageProps","srcSet","fallback","UniversalAvatarTextProps","initials","UniversalAvatarIconProps","icon","UniversalAvatarProps","UniversalMenuItemProps","active","slots","root","ref","props","ToastSize","ToastVariant","ToastPosition","UniversalToastProps","message","actionButton","onClickActionButton","closeIcon","onClickCloseButton","id","VerticalPlacement","HorizontalPlacement","TooltipPlacement","TooltipSize","TooltipVariant","UniversalTooltipProps","children","placement","open","portal","UniversalTooltipTriggerProps","UniversalTooltipContentProps","startTitleIcon","title","endContent","BottomSheetVariant","BottomSheetHeight","BottomSheetSnapPoints","UniversalBottomSheetProps","snapPoints","defaultSnapPointIndex","snapPointIndex","onSnapPointChange","dismissible","enableDrag","showHandleIndicator","fullWidthAtMaxSnap","UniversalBottomSheetHeaderProps","start","end","UniversalBottomSheetContentProps","PopoverPlacement","PopoverSize","UniversalPopoverProps","Event","hideArrow","hideDismissButton","defaultOpen","onClose","event","onOpen","disableAutoFocus","disableVerticalSpacing","disableHorizontalSpacing","sameWidth","gutter","UniversalPopoverTriggerProps","UniversalPopoverContentProps","maxHeight","ConfigurableComponentName","UniversalTokensConfigAutoBase","UniversalTokensConfigBase","GlobalDefaultsConfig","$defs","links","systems","version","font","motion","typography","elevationGlobalRamp","focusRing","globalDefaults","UniversalTokensConfigGeneric","ConfigAuto","breakpoint","enableResponsiveType"],"sources":["../../../../types/dist/index.d.ts"],"mappings":";;;;;;;KAYKQ,QAAAA;AAIW;;;AAAA,KAAXC,WAAAA;;AA6BiC;;;;KAvBjCC,oBAAAA,GAAuBC,KAAAA,CAAMC,aAAAA;AAwBJ;AAAA,KAAzBiB,yBAAAA;AAAAA,KACAC,2BAAAA,MAAiCD,yBAAAA;AAAAA,KACjCE,kBAAAA,GAAqBF,yBAAAA,GAA4BC,2BAAAA;AAAAA,KACjDE,qBAAAA;AAAAA,KAEAE,sBAAAA,6BAAmDF,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE3EO,sBAAAA,iEAAuFN,qBAAAA,GAAwBD,kBAAAA;AAAAA,KAE/GS,gBAAAA,oDAAoER,qBAAAA,GAAwBD,kBAAAA;;KAK5Fa,4BAAAA;;KAEAC,4BAAAA;AAAAA,KACAC,kBAAAA,GAAqBD,4BAAAA,GAA+BD,4BAAAA;AAAAA,KAiBpDgB,eAAAA,GAAkBtB,sBAAAA,GAAyBQ,kBAAAA;AAAAA,KAC3Ce,SAAAA,GAAYrB,gBAAAA,GAAmBM,kBAAAA,GAAqBgB,cAAAA;AAAAA,KACpDC,eAAAA,GAAkB7B,sBAAAA,GAAyBY,kBAAAA,GAAqBgB,cAAAA;AAAAA,KA+BhEqB,aAAAA;AAAAA,KACAC,0BAAAA,GAA6BD,aAAAA,GAAgBrB,cAAAA;AAAAA,KAC7CuB,mBAAAA,MAAyBV,OAAAA,CAAQQ,aAAAA;AAAAA,KAmBjCkB,qBAAAA;AAAAA,KACAC,aAAAA;AAAAA,KACAC,4BAAAA,GAA+BF,qBAAAA,GAAwBC,aAAAA;AAAAA,KAqCvDoC,UAAAA;AAAAA,KACAC,gBAAAA,GAAmBC,OAAAA,CAAQF,UAAAA;AAAAA,KAK3BhE,YAAAA;AAAAA,KAkDAgG,cAAAA;AAAAA,KACA5G,cA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s
CHANGED
|
@@ -4267,6 +4267,51 @@ const menuItemStyles = StyleSheet.create((theme) => ({
|
|
|
4267
4267
|
},
|
|
4268
4268
|
}));
|
|
4269
4269
|
|
|
4270
|
+
/**
|
|
4271
|
+
* Layer-based styles for Popover.
|
|
4272
|
+
* Uses compound variants for state-specific (disabled/pressed) styles.
|
|
4273
|
+
*
|
|
4274
|
+
* Usage:
|
|
4275
|
+
* ```tsx
|
|
4276
|
+
* popoverStyles.useVariants({
|
|
4277
|
+
* size,
|
|
4278
|
+
* variant,
|
|
4279
|
+
* disabled: isDisabled, // boolean
|
|
4280
|
+
* pressed: isPressed, // boolean
|
|
4281
|
+
* });
|
|
4282
|
+
* // Access: popoverStyles.root, popoverStyles.icon, etc.
|
|
4283
|
+
* ```
|
|
4284
|
+
*/
|
|
4285
|
+
const popoverStyles = StyleSheet.create((theme) => ({
|
|
4286
|
+
root: {
|
|
4287
|
+
variants: {
|
|
4288
|
+
size: { default: theme.components['popover/size/default/root/rest'] },
|
|
4289
|
+
},
|
|
4290
|
+
},
|
|
4291
|
+
closeIcon: {
|
|
4292
|
+
variants: {
|
|
4293
|
+
size: { default: theme.components['popover/size/default/closeIcon/rest'] },
|
|
4294
|
+
variant: { default: theme.components['popover/variant/default/closeIcon/rest'] },
|
|
4295
|
+
},
|
|
4296
|
+
},
|
|
4297
|
+
closeIconContainer: {
|
|
4298
|
+
variants: {
|
|
4299
|
+
size: { default: theme.components['popover/size/default/closeIconContainer/rest'] },
|
|
4300
|
+
},
|
|
4301
|
+
},
|
|
4302
|
+
contentWrapper: {
|
|
4303
|
+
variants: {
|
|
4304
|
+
size: { default: theme.components['popover/size/default/contentWrapper/rest'] },
|
|
4305
|
+
},
|
|
4306
|
+
},
|
|
4307
|
+
svgBase: {
|
|
4308
|
+
variants: {
|
|
4309
|
+
size: { default: theme.components['popover/size/default/svgBase/rest'] },
|
|
4310
|
+
variant: { default: theme.components['popover/variant/default/svgBase/rest'] },
|
|
4311
|
+
},
|
|
4312
|
+
},
|
|
4313
|
+
}));
|
|
4314
|
+
|
|
4270
4315
|
/**
|
|
4271
4316
|
* Layer-based styles for Radio.
|
|
4272
4317
|
* Uses compound variants for state-specific (disabled/pressed) styles.
|
|
@@ -4843,6 +4888,7 @@ module.exports = {
|
|
|
4843
4888
|
linkStyles,
|
|
4844
4889
|
menuContentStyles,
|
|
4845
4890
|
menuItemStyles,
|
|
4891
|
+
popoverStyles,
|
|
4846
4892
|
radioStyles,
|
|
4847
4893
|
scrimStyles,
|
|
4848
4894
|
switchStyles,
|
package/generated/styles.d.ts
CHANGED
|
@@ -1848,6 +1848,23 @@ export declare const menuItemStyles: {
|
|
|
1848
1848
|
) => void;
|
|
1849
1849
|
};
|
|
1850
1850
|
|
|
1851
|
+
export declare const popoverStyles: {
|
|
1852
|
+
root: { boxShadow: string };
|
|
1853
|
+
closeIcon: { fontSize: number; iconSizeToken: 'sm'; lineHeight: number; color: string };
|
|
1854
|
+
closeIconContainer: { padding: number };
|
|
1855
|
+
contentWrapper: { gap: number; paddingHorizontal: number; paddingVertical: number };
|
|
1856
|
+
svgBase: { borderRadius: number; backgroundColor: string };
|
|
1857
|
+
} & {
|
|
1858
|
+
useVariants: (
|
|
1859
|
+
variants:
|
|
1860
|
+
| { size?: undefined }
|
|
1861
|
+
| { size?: undefined; variant?: undefined }
|
|
1862
|
+
| { size?: undefined }
|
|
1863
|
+
| { size?: undefined }
|
|
1864
|
+
| { size?: undefined; variant?: undefined },
|
|
1865
|
+
) => void;
|
|
1866
|
+
};
|
|
1867
|
+
|
|
1851
1868
|
export declare const radioStyles: {
|
|
1852
1869
|
root: { gap: number };
|
|
1853
1870
|
text: {
|
package/generated/styles.mjs
CHANGED
|
@@ -4267,6 +4267,51 @@ const menuItemStyles = StyleSheet.create((theme) => ({
|
|
|
4267
4267
|
},
|
|
4268
4268
|
}));
|
|
4269
4269
|
|
|
4270
|
+
/**
|
|
4271
|
+
* Layer-based styles for Popover.
|
|
4272
|
+
* Uses compound variants for state-specific (disabled/pressed) styles.
|
|
4273
|
+
*
|
|
4274
|
+
* Usage:
|
|
4275
|
+
* ```tsx
|
|
4276
|
+
* popoverStyles.useVariants({
|
|
4277
|
+
* size,
|
|
4278
|
+
* variant,
|
|
4279
|
+
* disabled: isDisabled, // boolean
|
|
4280
|
+
* pressed: isPressed, // boolean
|
|
4281
|
+
* });
|
|
4282
|
+
* // Access: popoverStyles.root, popoverStyles.icon, etc.
|
|
4283
|
+
* ```
|
|
4284
|
+
*/
|
|
4285
|
+
const popoverStyles = StyleSheet.create((theme) => ({
|
|
4286
|
+
root: {
|
|
4287
|
+
variants: {
|
|
4288
|
+
size: { default: theme.components['popover/size/default/root/rest'] },
|
|
4289
|
+
},
|
|
4290
|
+
},
|
|
4291
|
+
closeIcon: {
|
|
4292
|
+
variants: {
|
|
4293
|
+
size: { default: theme.components['popover/size/default/closeIcon/rest'] },
|
|
4294
|
+
variant: { default: theme.components['popover/variant/default/closeIcon/rest'] },
|
|
4295
|
+
},
|
|
4296
|
+
},
|
|
4297
|
+
closeIconContainer: {
|
|
4298
|
+
variants: {
|
|
4299
|
+
size: { default: theme.components['popover/size/default/closeIconContainer/rest'] },
|
|
4300
|
+
},
|
|
4301
|
+
},
|
|
4302
|
+
contentWrapper: {
|
|
4303
|
+
variants: {
|
|
4304
|
+
size: { default: theme.components['popover/size/default/contentWrapper/rest'] },
|
|
4305
|
+
},
|
|
4306
|
+
},
|
|
4307
|
+
svgBase: {
|
|
4308
|
+
variants: {
|
|
4309
|
+
size: { default: theme.components['popover/size/default/svgBase/rest'] },
|
|
4310
|
+
variant: { default: theme.components['popover/variant/default/svgBase/rest'] },
|
|
4311
|
+
},
|
|
4312
|
+
},
|
|
4313
|
+
}));
|
|
4314
|
+
|
|
4270
4315
|
/**
|
|
4271
4316
|
* Layer-based styles for Radio.
|
|
4272
4317
|
* Uses compound variants for state-specific (disabled/pressed) styles.
|
|
@@ -4843,6 +4888,7 @@ export {
|
|
|
4843
4888
|
linkStyles,
|
|
4844
4889
|
menuContentStyles,
|
|
4845
4890
|
menuItemStyles,
|
|
4891
|
+
popoverStyles,
|
|
4846
4892
|
radioStyles,
|
|
4847
4893
|
scrimStyles,
|
|
4848
4894
|
switchStyles,
|
package/generated/unistyles.d.ts
CHANGED
|
@@ -3696,6 +3696,31 @@ interface ComponentTheme {
|
|
|
3696
3696
|
iconSizeToken: string;
|
|
3697
3697
|
lineHeight: number;
|
|
3698
3698
|
};
|
|
3699
|
+
'popover/size/default/closeIcon/rest': {
|
|
3700
|
+
fontSize: number;
|
|
3701
|
+
iconSizeToken: string;
|
|
3702
|
+
lineHeight: number;
|
|
3703
|
+
};
|
|
3704
|
+
'popover/size/default/closeIconContainer/rest': {
|
|
3705
|
+
padding: number;
|
|
3706
|
+
};
|
|
3707
|
+
'popover/size/default/contentWrapper/rest': {
|
|
3708
|
+
gap: number;
|
|
3709
|
+
paddingHorizontal: number;
|
|
3710
|
+
paddingVertical: number;
|
|
3711
|
+
};
|
|
3712
|
+
'popover/size/default/root/rest': {
|
|
3713
|
+
boxShadow: string;
|
|
3714
|
+
};
|
|
3715
|
+
'popover/size/default/svgBase/rest': {
|
|
3716
|
+
borderRadius: number;
|
|
3717
|
+
};
|
|
3718
|
+
'popover/variant/default/closeIcon/rest': {
|
|
3719
|
+
color: string;
|
|
3720
|
+
};
|
|
3721
|
+
'popover/variant/default/svgBase/rest': {
|
|
3722
|
+
backgroundColor: string;
|
|
3723
|
+
};
|
|
3699
3724
|
'radio/size/md/radio/rest': {
|
|
3700
3725
|
borderWidth: number;
|
|
3701
3726
|
height: number;
|