@yahoo/uds 3.161.0 → 3.162.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/purge.cjs +8 -1
- package/dist/cli/commands/purge.helpers.cjs +7 -0
- package/dist/cli/commands/purge.helpers.d.cts +3 -0
- package/dist/cli/commands/purge.helpers.d.ts +3 -0
- package/dist/cli/commands/purge.helpers.js +7 -0
- package/dist/cli/commands/purge.js +8 -1
- package/dist/components/client/Checkbox/Checkbox.cjs +118 -0
- package/dist/components/client/{Checkbox.d.cts → Checkbox/Checkbox.d.cts} +5 -18
- package/dist/components/client/{Checkbox.d.ts → Checkbox/Checkbox.d.ts} +5 -18
- package/dist/components/client/Checkbox/Checkbox.js +113 -0
- package/dist/components/client/Checkbox/CheckboxBase.cjs +141 -0
- package/dist/components/client/Checkbox/CheckboxBase.d.cts +48 -0
- package/dist/components/client/Checkbox/CheckboxBase.d.ts +49 -0
- package/dist/components/client/Checkbox/CheckboxBase.js +138 -0
- package/dist/components/client/Checkbox/checkboxConstants.cjs +23 -0
- package/dist/components/client/Checkbox/checkboxConstants.d.cts +25 -0
- package/dist/components/client/Checkbox/checkboxConstants.d.ts +26 -0
- package/dist/components/client/Checkbox/checkboxConstants.js +17 -0
- package/dist/components/client/Checkbox/index.cjs +10 -0
- package/dist/components/client/Checkbox/index.d.cts +6 -0
- package/dist/components/client/Checkbox/index.d.ts +7 -0
- package/dist/components/client/Checkbox/index.js +6 -0
- package/dist/components/client/Checkbox/types.cjs +2 -0
- package/dist/components/client/Checkbox/types.d.cts +22 -0
- package/dist/components/client/Checkbox/types.d.ts +23 -0
- package/dist/components/client/Checkbox/types.js +2 -0
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/Radio/Radio.cjs +67 -164
- package/dist/components/client/Radio/Radio.d.cts +4 -17
- package/dist/components/client/Radio/Radio.d.ts +4 -17
- package/dist/components/client/Radio/Radio.js +66 -163
- package/dist/components/client/Radio/RadioBase.cjs +133 -0
- package/dist/components/client/Radio/RadioBase.d.cts +45 -0
- package/dist/components/client/Radio/RadioBase.d.ts +46 -0
- package/dist/components/client/Radio/RadioBase.js +130 -0
- package/dist/components/client/Radio/radioConstants.cjs +14 -0
- package/dist/components/client/Radio/radioConstants.d.cts +8 -0
- package/dist/components/client/Radio/radioConstants.d.ts +9 -0
- package/dist/components/client/Radio/radioConstants.js +11 -0
- package/dist/components/client/Radio/types.cjs +2 -0
- package/dist/components/client/Radio/types.d.cts +20 -0
- package/dist/components/client/Radio/types.d.ts +21 -0
- package/dist/components/client/Radio/types.js +2 -0
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
- package/dist/components/client/index.cjs +2 -2
- package/dist/components/client/index.d.cts +1 -1
- package/dist/components/client/index.d.ts +1 -1
- package/dist/components/client/index.js +1 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/css/dist/commands/css.cjs +2 -0
- package/dist/css/dist/commands/css.helpers.cjs +2 -0
- package/dist/css/dist/commands/css.helpers.js +2 -0
- package/dist/css/dist/commands/css.js +2 -0
- package/dist/css/dist/css/nodeUtils.cjs +28 -11
- package/dist/css/dist/css/nodeUtils.js +29 -12
- package/dist/css/dist/css/runner.cjs +8 -3
- package/dist/css/dist/css/runner.js +8 -3
- package/dist/css/dist/css/theme.d.cts +16 -0
- package/dist/css/dist/css/theme.d.ts +16 -0
- package/dist/css/dist/css/workerPool.cjs +2 -1
- package/dist/css/dist/css/workerPool.js +2 -1
- package/dist/css/dist/purger/optimized/ast/expressions.cjs +104 -11
- package/dist/css/dist/purger/optimized/ast/expressions.js +104 -11
- package/dist/css/dist/purger/optimized/ast/jsx.cjs +74 -0
- package/dist/css/dist/purger/optimized/ast/jsx.js +73 -0
- package/dist/css/dist/purger/optimized/ast/props.cjs +47 -0
- package/dist/css/dist/purger/optimized/ast/props.js +46 -0
- package/dist/css/dist/purger/optimized/ast/spread.cjs +87 -0
- package/dist/css/dist/purger/optimized/ast/spread.js +86 -0
- package/dist/css/dist/purger/optimized/purge.cjs +14 -8
- package/dist/css/dist/purger/optimized/purge.js +15 -9
- package/dist/css/dist/purger/optimized/purgeFromCode.cjs +176 -18
- package/dist/css/dist/purger/optimized/purgeFromCode.js +176 -19
- package/dist/css/dist/purger/optimized/utils/files.cjs +22 -2
- package/dist/css/dist/purger/optimized/utils/files.js +21 -3
- package/dist/css-animation/Checkbox/Checkbox.cjs +75 -0
- package/dist/css-animation/Checkbox/Checkbox.d.cts +22 -0
- package/dist/css-animation/Checkbox/Checkbox.d.ts +23 -0
- package/dist/css-animation/Checkbox/Checkbox.js +72 -0
- package/dist/css-animation/Checkbox/index.cjs +5 -0
- package/dist/css-animation/Checkbox/index.d.cts +3 -0
- package/dist/css-animation/Checkbox/index.d.ts +4 -0
- package/dist/css-animation/Checkbox/index.js +4 -0
- package/dist/css-animation/Radio/Radio.cjs +92 -0
- package/dist/css-animation/Radio/Radio.d.cts +22 -0
- package/dist/css-animation/Radio/Radio.d.ts +23 -0
- package/dist/css-animation/Radio/Radio.js +89 -0
- package/dist/css-animation/Radio/index.cjs +5 -0
- package/dist/css-animation/Radio/index.d.cts +3 -0
- package/dist/css-animation/Radio/index.d.ts +4 -0
- package/dist/css-animation/Radio/index.js +4 -0
- package/dist/css-animation/index.cjs +4 -0
- package/dist/css-animation/index.d.cts +3 -1
- package/dist/css-animation/index.d.ts +3 -1
- package/dist/css-animation/index.js +3 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/styler.d.cts +26 -26
- package/dist/styles/styler.d.ts +26 -26
- package/dist/uds/generated/componentData.cjs +343 -293
- package/dist/uds/generated/componentData.js +343 -293
- package/dist/uds/generated/tailwindPurge.cjs +12 -12
- package/dist/uds/generated/tailwindPurge.js +12 -12
- package/generated/componentData.json +471 -382
- package/generated/tailwindPurge.ts +2 -2
- package/package.json +1 -1
- package/dist/components/client/Checkbox.cjs +0 -224
- package/dist/components/client/Checkbox.js +0 -219
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
|
+
const require_components_FormLabel = require("../../FormLabel.cjs");
|
|
7
|
+
const require_components_client_Radio_radioConstants = require("./radioConstants.cjs");
|
|
8
|
+
const require_components_client_Radio_useRadioGroup = require("./useRadioGroup.cjs");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
react = require_runtime.__toESM(react);
|
|
11
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
+
//#region src/components/client/Radio/RadioBase.tsx
|
|
13
|
+
const RadioBase = (0, react.forwardRef)(function RadioBase({ id, name: nameProp, label, labelPosition = "start", variant: variantProp = "primary", size = "md", reduceMotion: _reduceMotion, value: valueProp = "", checked: checkedProp, defaultChecked, disabled, hasError, onChange, onFocus, onBlur, className, style, slotProps, cssAnimationDuration, enableInteractionTracking = false, renderRoot, renderIndicator, ...radioProps }, parentRef) {
|
|
14
|
+
const generatedId = (0, react.useId)();
|
|
15
|
+
const uid = id ?? `uds-radio-${generatedId}`;
|
|
16
|
+
const rootSlotProps = slotProps?.root ?? {};
|
|
17
|
+
const radioSlotProps = slotProps?.radio ?? {};
|
|
18
|
+
const radioIconSlotProps = slotProps?.radioIcon ?? {};
|
|
19
|
+
const labelSlotProps = slotProps?.label ?? {};
|
|
20
|
+
const innerRef = (0, react.useRef)(null);
|
|
21
|
+
/**
|
|
22
|
+
* State
|
|
23
|
+
*/
|
|
24
|
+
const { name, isControlled, checked, setGroupValue } = require_components_client_Radio_useRadioGroup.useRadioGroup({
|
|
25
|
+
name: nameProp,
|
|
26
|
+
value: valueProp,
|
|
27
|
+
checked: checkedProp,
|
|
28
|
+
defaultChecked
|
|
29
|
+
});
|
|
30
|
+
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
31
|
+
const [isPressed, setIsPressed] = (0, react.useState)(false);
|
|
32
|
+
/**
|
|
33
|
+
* Derived values
|
|
34
|
+
*/
|
|
35
|
+
const variant = (0, react.useMemo)(() => hasError ? require_components_client_Radio_radioConstants.VARIANT_ERROR_MAP[variantProp] : variantProp, [hasError, variantProp]);
|
|
36
|
+
const showHoverEffect = enableInteractionTracking && !disabled && isHovered;
|
|
37
|
+
const showPressedEffect = enableInteractionTracking && !disabled && !checked && isPressed;
|
|
38
|
+
/**
|
|
39
|
+
* Handlers
|
|
40
|
+
*/
|
|
41
|
+
const handleOnChange = (0, react.useCallback)((e) => {
|
|
42
|
+
setGroupValue(e.target.value);
|
|
43
|
+
onChange?.(e);
|
|
44
|
+
}, [onChange, setGroupValue]);
|
|
45
|
+
const handleFocus = (0, react.useCallback)((e) => {
|
|
46
|
+
onFocus?.(e);
|
|
47
|
+
}, [onFocus]);
|
|
48
|
+
const handleBlur = (0, react.useCallback)((e) => {
|
|
49
|
+
onBlur?.(e);
|
|
50
|
+
}, [onBlur]);
|
|
51
|
+
const handleHoverStart = (0, react.useCallback)(() => {
|
|
52
|
+
if (enableInteractionTracking) setIsHovered(true);
|
|
53
|
+
}, [enableInteractionTracking]);
|
|
54
|
+
const handleHoverEnd = (0, react.useCallback)(() => {
|
|
55
|
+
if (enableInteractionTracking) setIsHovered(false);
|
|
56
|
+
}, [enableInteractionTracking]);
|
|
57
|
+
const handleTapStart = (0, react.useCallback)(() => {
|
|
58
|
+
if (enableInteractionTracking) setIsPressed(true);
|
|
59
|
+
}, [enableInteractionTracking]);
|
|
60
|
+
const handleTapEnd = (0, react.useCallback)(() => {
|
|
61
|
+
if (enableInteractionTracking) setIsPressed(false);
|
|
62
|
+
}, [enableInteractionTracking]);
|
|
63
|
+
const classNames = {
|
|
64
|
+
root: require_styles_styler.getStyles({
|
|
65
|
+
radioSizeRoot: size,
|
|
66
|
+
radioVariantValueRoot: checked ? "checked" : "unchecked",
|
|
67
|
+
radioVariantRoot: variant,
|
|
68
|
+
display: "flex",
|
|
69
|
+
flexDirection: labelPosition === "start" ? "row" : "row-reverse",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
className: require_styles_styler.cx([{
|
|
72
|
+
"cursor-pointer": !disabled,
|
|
73
|
+
"cursor-default": disabled,
|
|
74
|
+
"opacity-50": disabled
|
|
75
|
+
}, className])
|
|
76
|
+
}),
|
|
77
|
+
htmlRadio: require_styles_styler.cx("cursor-[inherit]", "absolute", "opacity-0", "top-1/2", "left-1/2", "w-[calc(100%+2px)]", "h-[calc(100%+2px)]", "transform", "translate-x-[-50%]", "translate-y-[-50%]"),
|
|
78
|
+
label: require_styles_styler.cx(labelPosition === "start" ? "text-start" : "text-end")
|
|
79
|
+
};
|
|
80
|
+
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
81
|
+
type: "radio",
|
|
82
|
+
tabIndex: 0,
|
|
83
|
+
...radioProps,
|
|
84
|
+
ref: (ref) => {
|
|
85
|
+
innerRef.current = ref;
|
|
86
|
+
if (typeof parentRef === "function") parentRef(ref);
|
|
87
|
+
else if (parentRef !== null) parentRef.current = ref;
|
|
88
|
+
},
|
|
89
|
+
onFocus: handleFocus,
|
|
90
|
+
onBlur: handleBlur,
|
|
91
|
+
id: uid,
|
|
92
|
+
name,
|
|
93
|
+
value: valueProp,
|
|
94
|
+
disabled,
|
|
95
|
+
"aria-invalid": hasError,
|
|
96
|
+
onChange: handleOnChange,
|
|
97
|
+
...isControlled ? { checked } : { defaultChecked },
|
|
98
|
+
className: classNames.htmlRadio
|
|
99
|
+
});
|
|
100
|
+
return renderRoot({
|
|
101
|
+
className: classNames.root,
|
|
102
|
+
style,
|
|
103
|
+
rootSlotProps,
|
|
104
|
+
hasLabel: Boolean(label),
|
|
105
|
+
isPressed,
|
|
106
|
+
onHoverStart: handleHoverStart,
|
|
107
|
+
onHoverEnd: handleHoverEnd,
|
|
108
|
+
onTapStart: handleTapStart,
|
|
109
|
+
onTapEnd: handleTapEnd,
|
|
110
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderIndicator({
|
|
111
|
+
size,
|
|
112
|
+
variant,
|
|
113
|
+
checked: Boolean(checked),
|
|
114
|
+
disabled,
|
|
115
|
+
showHoverEffect,
|
|
116
|
+
showPressedEffect,
|
|
117
|
+
cssAnimationDuration,
|
|
118
|
+
radioSlotProps,
|
|
119
|
+
radioIconSlotProps,
|
|
120
|
+
children: input
|
|
121
|
+
}), label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_FormLabel.FormLabel, {
|
|
122
|
+
as: "div",
|
|
123
|
+
variant: "inherit",
|
|
124
|
+
color: "inherit",
|
|
125
|
+
label,
|
|
126
|
+
className: classNames.label,
|
|
127
|
+
...labelSlotProps
|
|
128
|
+
})] })
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
RadioBase.displayName = "RadioBase";
|
|
132
|
+
//#endregion
|
|
133
|
+
exports.RadioBase = RadioBase;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import { RadioVariant } from "../../../types/dist/index.cjs";
|
|
3
|
+
import { DataAttributes, RadioProps } from "./types.cjs";
|
|
4
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Radio/RadioBase.d.ts
|
|
7
|
+
type ResolvedRadioVariant = RadioVariant | 'alert' | 'alert-secondary';
|
|
8
|
+
type RenderRootArgs = {
|
|
9
|
+
className: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
rootSlotProps: DataAttributes;
|
|
12
|
+
hasLabel: boolean;
|
|
13
|
+
isPressed: boolean;
|
|
14
|
+
onHoverStart: () => void;
|
|
15
|
+
onHoverEnd: () => void;
|
|
16
|
+
onTapStart: () => void;
|
|
17
|
+
onTapEnd: () => void;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
type RenderIndicatorArgs = {
|
|
21
|
+
size: NonNullable<RadioProps['size']>;
|
|
22
|
+
variant: ResolvedRadioVariant;
|
|
23
|
+
checked: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
showHoverEffect: boolean;
|
|
26
|
+
showPressedEffect: boolean;
|
|
27
|
+
cssAnimationDuration: string;
|
|
28
|
+
radioSlotProps: DataAttributes;
|
|
29
|
+
radioIconSlotProps: DataAttributes;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
type RadioBaseProps = RadioProps & {
|
|
33
|
+
cssAnimationDuration: string;
|
|
34
|
+
enableInteractionTracking?: boolean;
|
|
35
|
+
renderRoot: (args: RenderRootArgs) => ReactNode;
|
|
36
|
+
renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
|
|
37
|
+
};
|
|
38
|
+
declare const RadioBase: React.ForwardRefExoticComponent<RadioProps & {
|
|
39
|
+
cssAnimationDuration: string;
|
|
40
|
+
enableInteractionTracking?: boolean;
|
|
41
|
+
renderRoot: (args: RenderRootArgs) => ReactNode;
|
|
42
|
+
renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
|
|
43
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { RadioBase, type RadioBaseProps, type RenderIndicatorArgs, type RenderRootArgs, type ResolvedRadioVariant };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { RadioVariant } from "../../../types/dist/index.js";
|
|
4
|
+
import { DataAttributes, RadioProps } from "./types.js";
|
|
5
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Radio/RadioBase.d.ts
|
|
8
|
+
type ResolvedRadioVariant = RadioVariant | 'alert' | 'alert-secondary';
|
|
9
|
+
type RenderRootArgs = {
|
|
10
|
+
className: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
rootSlotProps: DataAttributes;
|
|
13
|
+
hasLabel: boolean;
|
|
14
|
+
isPressed: boolean;
|
|
15
|
+
onHoverStart: () => void;
|
|
16
|
+
onHoverEnd: () => void;
|
|
17
|
+
onTapStart: () => void;
|
|
18
|
+
onTapEnd: () => void;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
type RenderIndicatorArgs = {
|
|
22
|
+
size: NonNullable<RadioProps['size']>;
|
|
23
|
+
variant: ResolvedRadioVariant;
|
|
24
|
+
checked: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
showHoverEffect: boolean;
|
|
27
|
+
showPressedEffect: boolean;
|
|
28
|
+
cssAnimationDuration: string;
|
|
29
|
+
radioSlotProps: DataAttributes;
|
|
30
|
+
radioIconSlotProps: DataAttributes;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
type RadioBaseProps = RadioProps & {
|
|
34
|
+
cssAnimationDuration: string;
|
|
35
|
+
enableInteractionTracking?: boolean;
|
|
36
|
+
renderRoot: (args: RenderRootArgs) => ReactNode;
|
|
37
|
+
renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
|
|
38
|
+
};
|
|
39
|
+
declare const RadioBase: React.ForwardRefExoticComponent<RadioProps & {
|
|
40
|
+
cssAnimationDuration: string;
|
|
41
|
+
enableInteractionTracking?: boolean;
|
|
42
|
+
renderRoot: (args: RenderRootArgs) => ReactNode;
|
|
43
|
+
renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
|
|
44
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { RadioBase, type RadioBaseProps, type RenderIndicatorArgs, type RenderRootArgs, type ResolvedRadioVariant };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
|
+
import { FormLabel } from "../../FormLabel.js";
|
|
5
|
+
import { VARIANT_ERROR_MAP } from "./radioConstants.js";
|
|
6
|
+
import { useRadioGroup } from "./useRadioGroup.js";
|
|
7
|
+
import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/client/Radio/RadioBase.tsx
|
|
10
|
+
const RadioBase = forwardRef(function RadioBase({ id, name: nameProp, label, labelPosition = "start", variant: variantProp = "primary", size = "md", reduceMotion: _reduceMotion, value: valueProp = "", checked: checkedProp, defaultChecked, disabled, hasError, onChange, onFocus, onBlur, className, style, slotProps, cssAnimationDuration, enableInteractionTracking = false, renderRoot, renderIndicator, ...radioProps }, parentRef) {
|
|
11
|
+
const generatedId = useId();
|
|
12
|
+
const uid = id ?? `uds-radio-${generatedId}`;
|
|
13
|
+
const rootSlotProps = slotProps?.root ?? {};
|
|
14
|
+
const radioSlotProps = slotProps?.radio ?? {};
|
|
15
|
+
const radioIconSlotProps = slotProps?.radioIcon ?? {};
|
|
16
|
+
const labelSlotProps = slotProps?.label ?? {};
|
|
17
|
+
const innerRef = useRef(null);
|
|
18
|
+
/**
|
|
19
|
+
* State
|
|
20
|
+
*/
|
|
21
|
+
const { name, isControlled, checked, setGroupValue } = useRadioGroup({
|
|
22
|
+
name: nameProp,
|
|
23
|
+
value: valueProp,
|
|
24
|
+
checked: checkedProp,
|
|
25
|
+
defaultChecked
|
|
26
|
+
});
|
|
27
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
28
|
+
const [isPressed, setIsPressed] = useState(false);
|
|
29
|
+
/**
|
|
30
|
+
* Derived values
|
|
31
|
+
*/
|
|
32
|
+
const variant = useMemo(() => hasError ? VARIANT_ERROR_MAP[variantProp] : variantProp, [hasError, variantProp]);
|
|
33
|
+
const showHoverEffect = enableInteractionTracking && !disabled && isHovered;
|
|
34
|
+
const showPressedEffect = enableInteractionTracking && !disabled && !checked && isPressed;
|
|
35
|
+
/**
|
|
36
|
+
* Handlers
|
|
37
|
+
*/
|
|
38
|
+
const handleOnChange = useCallback((e) => {
|
|
39
|
+
setGroupValue(e.target.value);
|
|
40
|
+
onChange?.(e);
|
|
41
|
+
}, [onChange, setGroupValue]);
|
|
42
|
+
const handleFocus = useCallback((e) => {
|
|
43
|
+
onFocus?.(e);
|
|
44
|
+
}, [onFocus]);
|
|
45
|
+
const handleBlur = useCallback((e) => {
|
|
46
|
+
onBlur?.(e);
|
|
47
|
+
}, [onBlur]);
|
|
48
|
+
const handleHoverStart = useCallback(() => {
|
|
49
|
+
if (enableInteractionTracking) setIsHovered(true);
|
|
50
|
+
}, [enableInteractionTracking]);
|
|
51
|
+
const handleHoverEnd = useCallback(() => {
|
|
52
|
+
if (enableInteractionTracking) setIsHovered(false);
|
|
53
|
+
}, [enableInteractionTracking]);
|
|
54
|
+
const handleTapStart = useCallback(() => {
|
|
55
|
+
if (enableInteractionTracking) setIsPressed(true);
|
|
56
|
+
}, [enableInteractionTracking]);
|
|
57
|
+
const handleTapEnd = useCallback(() => {
|
|
58
|
+
if (enableInteractionTracking) setIsPressed(false);
|
|
59
|
+
}, [enableInteractionTracking]);
|
|
60
|
+
const classNames = {
|
|
61
|
+
root: getStyles({
|
|
62
|
+
radioSizeRoot: size,
|
|
63
|
+
radioVariantValueRoot: checked ? "checked" : "unchecked",
|
|
64
|
+
radioVariantRoot: variant,
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexDirection: labelPosition === "start" ? "row" : "row-reverse",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
className: cx([{
|
|
69
|
+
"cursor-pointer": !disabled,
|
|
70
|
+
"cursor-default": disabled,
|
|
71
|
+
"opacity-50": disabled
|
|
72
|
+
}, className])
|
|
73
|
+
}),
|
|
74
|
+
htmlRadio: cx("cursor-[inherit]", "absolute", "opacity-0", "top-1/2", "left-1/2", "w-[calc(100%+2px)]", "h-[calc(100%+2px)]", "transform", "translate-x-[-50%]", "translate-y-[-50%]"),
|
|
75
|
+
label: cx(labelPosition === "start" ? "text-start" : "text-end")
|
|
76
|
+
};
|
|
77
|
+
const input = /* @__PURE__ */ jsx("input", {
|
|
78
|
+
type: "radio",
|
|
79
|
+
tabIndex: 0,
|
|
80
|
+
...radioProps,
|
|
81
|
+
ref: (ref) => {
|
|
82
|
+
innerRef.current = ref;
|
|
83
|
+
if (typeof parentRef === "function") parentRef(ref);
|
|
84
|
+
else if (parentRef !== null) parentRef.current = ref;
|
|
85
|
+
},
|
|
86
|
+
onFocus: handleFocus,
|
|
87
|
+
onBlur: handleBlur,
|
|
88
|
+
id: uid,
|
|
89
|
+
name,
|
|
90
|
+
value: valueProp,
|
|
91
|
+
disabled,
|
|
92
|
+
"aria-invalid": hasError,
|
|
93
|
+
onChange: handleOnChange,
|
|
94
|
+
...isControlled ? { checked } : { defaultChecked },
|
|
95
|
+
className: classNames.htmlRadio
|
|
96
|
+
});
|
|
97
|
+
return renderRoot({
|
|
98
|
+
className: classNames.root,
|
|
99
|
+
style,
|
|
100
|
+
rootSlotProps,
|
|
101
|
+
hasLabel: Boolean(label),
|
|
102
|
+
isPressed,
|
|
103
|
+
onHoverStart: handleHoverStart,
|
|
104
|
+
onHoverEnd: handleHoverEnd,
|
|
105
|
+
onTapStart: handleTapStart,
|
|
106
|
+
onTapEnd: handleTapEnd,
|
|
107
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [renderIndicator({
|
|
108
|
+
size,
|
|
109
|
+
variant,
|
|
110
|
+
checked: Boolean(checked),
|
|
111
|
+
disabled,
|
|
112
|
+
showHoverEffect,
|
|
113
|
+
showPressedEffect,
|
|
114
|
+
cssAnimationDuration,
|
|
115
|
+
radioSlotProps,
|
|
116
|
+
radioIconSlotProps,
|
|
117
|
+
children: input
|
|
118
|
+
}), label && /* @__PURE__ */ jsx(FormLabel, {
|
|
119
|
+
as: "div",
|
|
120
|
+
variant: "inherit",
|
|
121
|
+
color: "inherit",
|
|
122
|
+
label,
|
|
123
|
+
className: classNames.label,
|
|
124
|
+
...labelSlotProps
|
|
125
|
+
})] })
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
RadioBase.displayName = "RadioBase";
|
|
129
|
+
//#endregion
|
|
130
|
+
export { RadioBase };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
//#region src/components/client/Radio/radioConstants.ts
|
|
5
|
+
const RADIO_VARIANTS = ["primary", "secondary"];
|
|
6
|
+
const RADIO_SIZES = ["sm", "md"];
|
|
7
|
+
const VARIANT_ERROR_MAP = {
|
|
8
|
+
primary: "alert",
|
|
9
|
+
secondary: "alert-secondary"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.RADIO_SIZES = RADIO_SIZES;
|
|
13
|
+
exports.RADIO_VARIANTS = RADIO_VARIANTS;
|
|
14
|
+
exports.VARIANT_ERROR_MAP = VARIANT_ERROR_MAP;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
import { RadioSize, RadioVariant } from "../../../types/dist/index.cjs";
|
|
3
|
+
//#region src/components/client/Radio/radioConstants.d.ts
|
|
4
|
+
declare const RADIO_VARIANTS: RadioVariant[];
|
|
5
|
+
declare const RADIO_SIZES: RadioSize[];
|
|
6
|
+
declare const VARIANT_ERROR_MAP: Record<RadioVariant, 'alert' | 'alert-secondary'>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { RadioSize, RadioVariant } from "../../../types/dist/index.js";
|
|
4
|
+
//#region src/components/client/Radio/radioConstants.d.ts
|
|
5
|
+
declare const RADIO_VARIANTS: RadioVariant[];
|
|
6
|
+
declare const RADIO_SIZES: RadioSize[];
|
|
7
|
+
declare const VARIANT_ERROR_MAP: Record<RadioVariant, 'alert' | 'alert-secondary'>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
//#region src/components/client/Radio/radioConstants.ts
|
|
4
|
+
const RADIO_VARIANTS = ["primary", "secondary"];
|
|
5
|
+
const RADIO_SIZES = ["sm", "md"];
|
|
6
|
+
const VARIANT_ERROR_MAP = {
|
|
7
|
+
primary: "alert",
|
|
8
|
+
secondary: "alert-secondary"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalRadioProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Radio/types.d.ts
|
|
6
|
+
type DataAttributes = {
|
|
7
|
+
[name: `data-${string}`]: string;
|
|
8
|
+
};
|
|
9
|
+
type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
|
|
10
|
+
interface RadioProps extends NativeInputProps, UniversalRadioProps {
|
|
11
|
+
/** Props to be passed into various slots within the component. */
|
|
12
|
+
slotProps?: {
|
|
13
|
+
root?: DataAttributes;
|
|
14
|
+
radio?: DataAttributes;
|
|
15
|
+
radioIcon?: DataAttributes;
|
|
16
|
+
label?: DataAttributes;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { type DataAttributes, type NativeInputProps, type RadioProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalRadioProps } from "../../../types/dist/index.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Radio/types.d.ts
|
|
7
|
+
type DataAttributes = {
|
|
8
|
+
[name: `data-${string}`]: string;
|
|
9
|
+
};
|
|
10
|
+
type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
|
|
11
|
+
interface RadioProps extends NativeInputProps, UniversalRadioProps {
|
|
12
|
+
/** Props to be passed into various slots within the component. */
|
|
13
|
+
slotProps?: {
|
|
14
|
+
root?: DataAttributes;
|
|
15
|
+
radio?: DataAttributes;
|
|
16
|
+
radioIcon?: DataAttributes;
|
|
17
|
+
label?: DataAttributes;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { type DataAttributes, type NativeInputProps, type RadioProps };
|
|
@@ -30,9 +30,9 @@ declare const useToastConfig: (sizeProp?: ToastSize | undefined, variantProp?: T
|
|
|
30
30
|
autoClose: number | false;
|
|
31
31
|
position: ToastPosition;
|
|
32
32
|
backgroundColor: {
|
|
33
|
-
loading: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
34
33
|
warning: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
35
34
|
info: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
35
|
+
loading: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
36
36
|
success: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
37
37
|
error: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "gray-0" | "gray-1" | "gray-2" | "gray-3" | "gray-4" | "gray-5" | "gray-6" | "gray-7" | "gray-8" | "gray-9" | "gray-10" | "gray-11" | "gray-12" | "gray-13" | "gray-14" | "gray-15" | "purple-0" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "purple-11" | "purple-12" | "purple-13" | "purple-14" | "purple-15" | "indigo-0" | "indigo-1" | "indigo-2" | "indigo-3" | "indigo-4" | "indigo-5" | "indigo-6" | "indigo-7" | "indigo-8" | "indigo-9" | "indigo-10" | "indigo-11" | "indigo-12" | "indigo-13" | "indigo-14" | "indigo-15" | "blue-0" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "blue-11" | "blue-12" | "blue-13" | "blue-14" | "blue-15" | "cyan-0" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "cyan-11" | "cyan-12" | "cyan-13" | "cyan-14" | "cyan-15" | "teal-0" | "teal-1" | "teal-2" | "teal-3" | "teal-4" | "teal-5" | "teal-6" | "teal-7" | "teal-8" | "teal-9" | "teal-10" | "teal-11" | "teal-12" | "teal-13" | "teal-14" | "teal-15" | "mint-0" | "mint-1" | "mint-2" | "mint-3" | "mint-4" | "mint-5" | "mint-6" | "mint-7" | "mint-8" | "mint-9" | "mint-10" | "mint-11" | "mint-12" | "mint-13" | "mint-14" | "mint-15" | "green-0" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "green-11" | "green-12" | "green-13" | "green-14" | "green-15" | "lime-0" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "lime-11" | "lime-12" | "lime-13" | "lime-14" | "lime-15" | "citron-0" | "citron-1" | "citron-2" | "citron-3" | "citron-4" | "citron-5" | "citron-6" | "citron-7" | "citron-8" | "citron-9" | "citron-10" | "citron-11" | "citron-12" | "citron-13" | "citron-14" | "citron-15" | "yellow-0" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "yellow-11" | "yellow-12" | "yellow-13" | "yellow-14" | "yellow-15" | "brown-0" | "brown-1" | "brown-2" | "brown-3" | "brown-4" | "brown-5" | "brown-6" | "brown-7" | "brown-8" | "brown-9" | "brown-10" | "brown-11" | "brown-12" | "brown-13" | "brown-14" | "brown-15" | "nude-0" | "nude-1" | "nude-2" | "nude-3" | "nude-4" | "nude-5" | "nude-6" | "nude-7" | "nude-8" | "nude-9" | "nude-10" | "nude-11" | "nude-12" | "nude-13" | "nude-14" | "nude-15" | "orange-0" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "orange-11" | "orange-12" | "orange-13" | "orange-14" | "orange-15" | "sunset-0" | "sunset-1" | "sunset-2" | "sunset-3" | "sunset-4" | "sunset-5" | "sunset-6" | "sunset-7" | "sunset-8" | "sunset-9" | "sunset-10" | "sunset-11" | "sunset-12" | "sunset-13" | "sunset-14" | "sunset-15" | "red-0" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "red-11" | "red-12" | "red-13" | "red-14" | "red-15" | "rose-0" | "rose-1" | "rose-2" | "rose-3" | "rose-4" | "rose-5" | "rose-6" | "rose-7" | "rose-8" | "rose-9" | "rose-10" | "rose-11" | "rose-12" | "rose-13" | "rose-14" | "rose-15" | "pink-0" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "pink-11" | "pink-12" | "pink-13" | "pink-14" | "pink-15" | "magenta-0" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "magenta-11" | "magenta-12" | "magenta-13" | "magenta-14" | "magenta-15" | "carbon-0" | "carbon-1" | "carbon-2" | "carbon-3" | "carbon-4" | "carbon-5" | "carbon-6" | "carbon-7" | "carbon-8" | "carbon-9" | "carbon-10" | "carbon-11" | "carbon-12" | "carbon-13" | "carbon-14" | "carbon-15";
|
|
38
38
|
};
|