@yahoo/uds 3.16.0-beta.2 → 3.16.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/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-linux-arm64 +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/dist/{Box-D40ThLwg.d.cts → Box-CcXdv2Rw.d.cts} +1 -37
- package/dist/{Box-D40ThLwg.d.ts → Box-CcXdv2Rw.d.ts} +1 -37
- package/dist/{Input-CMSWyzqv.d.cts → Input-BL9lQCDu.d.cts} +1 -1
- package/dist/{Input-BMRGSU5y.d.ts → Input-BRzRLQxn.d.ts} +1 -1
- package/dist/{Input-Bodf4GHN.d.ts → Input-CpYGVQ-T.d.ts} +1 -1
- package/dist/{Input-Dy8st3t9.d.cts → Input-Cqqrcr9V.d.cts} +1 -1
- package/dist/{Pressable-Bu5pYD6Z.d.ts → Pressable-B4_x948C.d.ts} +1 -1
- package/dist/{Pressable-CIIFtTng.d.ts → Pressable-CoLUS3i4.d.ts} +1 -1
- package/dist/{Pressable-6OGAsf5K.d.cts → Pressable-DLz3zvLg.d.cts} +1 -1
- package/dist/{Pressable-BWXRpiJE.d.cts → Pressable-uR0PuwES.d.cts} +1 -1
- package/dist/{VStack-BeVwzpH2.d.cts → VStack-C-KFLkLJ.d.cts} +1 -1
- package/dist/{VStack-BD2tZc5A.d.ts → VStack-D9yWaJWV.d.ts} +1 -1
- package/dist/{VStack-QdWDAiK_.d.ts → VStack-DSWpLD2I.d.ts} +1 -1
- package/dist/{VStack-neVNcyVv.d.cts → VStack-DUhbtLPK.d.cts} +1 -1
- package/dist/chunk-2O4KDOWQ.js +2 -0
- package/dist/chunk-37LEXEW4.js +3 -0
- package/dist/chunk-5ZMNC32B.js +1 -0
- package/dist/chunk-6BNYCBB5.cjs +1 -0
- package/dist/chunk-CJQWF4E7.cjs +1 -0
- package/dist/chunk-GDB25UGP.js +2 -0
- package/dist/chunk-HT3GLDSF.js +2 -0
- package/dist/chunk-IA5PTKGD.cjs +1 -0
- package/dist/chunk-JFLE7LSO.cjs +3 -0
- package/dist/chunk-M5SXYW4O.js +1 -0
- package/dist/chunk-NHBTWN5R.js +3 -0
- package/dist/chunk-ODIO4O52.js +2 -0
- package/dist/chunk-OMJ3BDEX.cjs +1 -0
- package/dist/chunk-RDF2NPZV.cjs +1 -0
- package/dist/chunk-RQARSMJK.cjs +2 -0
- package/dist/chunk-RR45EHLK.js +3 -0
- package/dist/chunk-S5OCORC7.js +3 -0
- package/dist/chunk-T7G5JTDY.js +2 -0
- package/dist/chunk-TJZ4HVAG.cjs +3 -0
- package/dist/chunk-W4KK6R6C.js +1 -0
- package/dist/chunk-WGG66FKO.cjs +1 -0
- package/dist/chunk-X2JAO3BG.cjs +2 -0
- package/dist/chunk-YMQMU4E2.cjs +1 -0
- package/dist/chunk-YR633T75.cjs +1 -0
- package/dist/chunk-YVEYAMML.js +1 -0
- package/dist/chunk-ZO4QHULA.cjs +1 -0
- package/dist/client/Menu.cjs +1 -1
- package/dist/client/Menu.d.cts +3 -3
- package/dist/client/Menu.d.ts +3 -3
- package/dist/client/Menu.js +2 -2
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +38 -6
- package/dist/client/index.d.ts +38 -6
- package/dist/client/index.js +1 -1
- package/dist/experimental/client/index.cjs +2 -2
- package/dist/experimental/client/index.d.cts +2 -39
- package/dist/experimental/client/index.d.ts +2 -39
- package/dist/experimental/client/index.js +2 -2
- package/dist/experimental/index.cjs +1 -1
- package/dist/experimental/index.d.cts +2 -2
- package/dist/experimental/index.d.ts +2 -2
- package/dist/experimental/index.js +1 -1
- package/dist/{index-B3nKT69I.d.cts → index-BSMvOULh.d.cts} +1 -1
- package/dist/{index-B7kmT6BF.d.cts → index-BuZPwX-z.d.cts} +1 -1
- package/dist/{index-Dv3eaEEg.d.ts → index-CEYXA0Pi.d.ts} +1 -1
- package/dist/{index-Cp0yW36O.d.ts → index-DCMwb5yd.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tailwind/plugin.cjs +1 -1
- package/dist/tailwind/plugin.d.cts +1 -1
- package/dist/tailwind/plugin.d.ts +1 -1
- package/dist/tailwind/plugin.js +2 -2
- package/dist/tailwind/purger.cjs +1 -1
- package/dist/tailwind/purger.js +1 -1
- package/dist/tailwind/utils.cjs +1 -1
- package/dist/tailwind/utils.d.cts +6 -12
- package/dist/tailwind/utils.d.ts +6 -12
- package/dist/tailwind/utils.js +1 -1
- package/dist/tokens/automation/configs.cjs +1 -1
- package/dist/tokens/automation/configs.d.cts +2 -2
- package/dist/tokens/automation/configs.d.ts +2 -2
- package/dist/tokens/automation/configs.js +1 -1
- package/dist/tokens/automation/properties.cjs +1 -1
- package/dist/tokens/automation/properties.d.cts +2 -2
- package/dist/tokens/automation/properties.d.ts +2 -2
- package/dist/tokens/automation/properties.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +20 -20
- package/dist/tokens/index.d.ts +20 -20
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/parseTokens.d.cts +1 -1
- package/dist/tokens/parseTokens.d.ts +1 -1
- package/dist/{types-DYEQXQnF.d.ts → types-B_G_Ws4q.d.cts} +1945 -1945
- package/dist/{types-BPg1GqRW.d.ts → types-B_G_Ws4q.d.ts} +1 -1
- package/dist/{types-BPg1GqRW.d.cts → types-bUSRKyjU.d.cts} +1958 -1958
- package/dist/{types-DYEQXQnF.d.cts → types-bUSRKyjU.d.ts} +1 -1
- package/package.json +2 -12
- package/dist/SpringMotionConfig-CDjfwVEF.d.cts +0 -45
- package/dist/SpringMotionConfig-CGcal4P2.d.cts +0 -45
- package/dist/SpringMotionConfig-DVN_tZUq.d.ts +0 -45
- package/dist/SpringMotionConfig-G-5m8zYg.d.ts +0 -45
- package/dist/chunk-24HEQ4PT.js +0 -1
- package/dist/chunk-2ZZHX2EJ.cjs +0 -1
- package/dist/chunk-35PHZJZG.cjs +0 -1
- package/dist/chunk-3T5IX3JE.cjs +0 -1
- package/dist/chunk-4OQKZKM5.js +0 -1
- package/dist/chunk-6ZCIS462.cjs +0 -2
- package/dist/chunk-72JXN7EE.js +0 -1
- package/dist/chunk-A3B3VYP6.cjs +0 -1
- package/dist/chunk-A4MU7ARJ.cjs +0 -1
- package/dist/chunk-AIZ2OTKW.cjs +0 -2
- package/dist/chunk-BIT4ZYYL.cjs +0 -1
- package/dist/chunk-EF6FLPTH.cjs +0 -1
- package/dist/chunk-FOQRYH73.js +0 -1
- package/dist/chunk-GP7XCURZ.js +0 -1
- package/dist/chunk-HN3QQ5PU.js +0 -2
- package/dist/chunk-HUFHYJ5T.cjs +0 -1
- package/dist/chunk-HYCGETLK.js +0 -2
- package/dist/chunk-LUIZSLSJ.cjs +0 -1
- package/dist/chunk-MSCQUXK7.js +0 -2
- package/dist/chunk-MWF3T6YY.cjs +0 -3
- package/dist/chunk-OCQZCUT3.js +0 -2
- package/dist/chunk-OGIKGD5Z.js +0 -2
- package/dist/chunk-OJB3FVN6.js +0 -3
- package/dist/chunk-ON6FCSMM.js +0 -1
- package/dist/chunk-PN3UA6WB.cjs +0 -1
- package/dist/chunk-Q3GQNZOI.js +0 -1
- package/dist/chunk-Q6L5YDK4.cjs +0 -1
- package/dist/chunk-QFJTN7H3.js +0 -2
- package/dist/chunk-SQCEFYU5.cjs +0 -3
- package/dist/chunk-TPSHAL7U.js +0 -3
- package/dist/chunk-XMZZKQMQ.js +0 -1
- package/dist/chunk-XVD3PMQ7.cjs +0 -1
- package/dist/domMax-OBCHPQP3.js +0 -1
- package/dist/domMax-ZTC57OAI.cjs +0 -1
- package/dist/experimental/client/SwitchV2.cjs +0 -2
- package/dist/experimental/client/SwitchV2.d.cts +0 -44
- package/dist/experimental/client/SwitchV2.d.ts +0 -44
- package/dist/experimental/client/SwitchV2.js +0 -2
- /package/dist/{domAnimation-ESPUKI4G.cjs → motionFeatures-6LIGGXPL.cjs} +0 -0
- /package/dist/{domAnimation-MWKTMI4P.js → motionFeatures-SJISLQ4M.js} +0 -0
Binary file
|
package/cli/bin/uds-linux-arm64
CHANGED
Binary file
|
Binary file
|
@@ -211,42 +211,6 @@ interface UniversalIconProps {
|
|
211
211
|
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
212
212
|
interface IconPropsWithSVGProps extends UniversalIconProps, SVGElementProps {
|
213
213
|
}
|
214
|
-
type UniversalIconSlot = SvgIcon | ReactNode | ((iconProps: Omit<IconPropsWithSVGProps, 'name'>) => ReactNode);
|
215
|
-
type SwitchSize = 'sm' | 'md';
|
216
|
-
interface UniversalSwitchProps {
|
217
|
-
/**
|
218
|
-
* Size of the switch.
|
219
|
-
* @default 'md'
|
220
|
-
*/
|
221
|
-
size?: SwitchSize;
|
222
|
-
/**
|
223
|
-
* The label of the switch. Can be a ReactNode for rich html labels.
|
224
|
-
* Will not be labelled if omitted. User MUST then use `aria-label` attribute,
|
225
|
-
* wrap in a `<label>` tag or `htmlFor` to add an external label for a11y.
|
226
|
-
*/
|
227
|
-
label?: string | ReactNode | (() => ReactNode);
|
228
|
-
/**
|
229
|
-
* Controlled value of the switch. Will be an uncontrolled input if not present.
|
230
|
-
*/
|
231
|
-
isOn?: boolean;
|
232
|
-
/**
|
233
|
-
* Set the initial value to default when uncontrolled.
|
234
|
-
*/
|
235
|
-
defaultIsOn?: boolean;
|
236
|
-
/** An icon to be displayed on the on state of the input. */
|
237
|
-
onIcon?: UniversalIconSlot;
|
238
|
-
/** An icon to be displayed on the off state of the input. */
|
239
|
-
offIcon?: UniversalIconSlot;
|
240
|
-
/**
|
241
|
-
* Disables animations when true.
|
242
|
-
*/
|
243
|
-
reduceMotion?: boolean;
|
244
|
-
/**
|
245
|
-
* On which side of the input is the label displayed.
|
246
|
-
* @default 'start'
|
247
|
-
*/
|
248
|
-
labelPosition?: 'start' | 'end';
|
249
|
-
}
|
250
214
|
|
251
215
|
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
|
252
216
|
type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
|
@@ -264,4 +228,4 @@ type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
264
228
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
265
229
|
}
|
266
230
|
|
267
|
-
export type { BoxProps as B, DivProps as D, IconPropsWithSVGProps as I, TextProps as T, UniversalTextProps as U, UniversalStackProps as a
|
231
|
+
export type { BoxProps as B, DivProps as D, IconPropsWithSVGProps as I, TextProps as T, UniversalTextProps as U, UniversalStackProps as a };
|
@@ -211,42 +211,6 @@ interface UniversalIconProps {
|
|
211
211
|
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
212
212
|
interface IconPropsWithSVGProps extends UniversalIconProps, SVGElementProps {
|
213
213
|
}
|
214
|
-
type UniversalIconSlot = SvgIcon | ReactNode | ((iconProps: Omit<IconPropsWithSVGProps, 'name'>) => ReactNode);
|
215
|
-
type SwitchSize = 'sm' | 'md';
|
216
|
-
interface UniversalSwitchProps {
|
217
|
-
/**
|
218
|
-
* Size of the switch.
|
219
|
-
* @default 'md'
|
220
|
-
*/
|
221
|
-
size?: SwitchSize;
|
222
|
-
/**
|
223
|
-
* The label of the switch. Can be a ReactNode for rich html labels.
|
224
|
-
* Will not be labelled if omitted. User MUST then use `aria-label` attribute,
|
225
|
-
* wrap in a `<label>` tag or `htmlFor` to add an external label for a11y.
|
226
|
-
*/
|
227
|
-
label?: string | ReactNode | (() => ReactNode);
|
228
|
-
/**
|
229
|
-
* Controlled value of the switch. Will be an uncontrolled input if not present.
|
230
|
-
*/
|
231
|
-
isOn?: boolean;
|
232
|
-
/**
|
233
|
-
* Set the initial value to default when uncontrolled.
|
234
|
-
*/
|
235
|
-
defaultIsOn?: boolean;
|
236
|
-
/** An icon to be displayed on the on state of the input. */
|
237
|
-
onIcon?: UniversalIconSlot;
|
238
|
-
/** An icon to be displayed on the off state of the input. */
|
239
|
-
offIcon?: UniversalIconSlot;
|
240
|
-
/**
|
241
|
-
* Disables animations when true.
|
242
|
-
*/
|
243
|
-
reduceMotion?: boolean;
|
244
|
-
/**
|
245
|
-
* On which side of the input is the label displayed.
|
246
|
-
* @default 'start'
|
247
|
-
*/
|
248
|
-
labelPosition?: 'start' | 'end';
|
249
|
-
}
|
250
214
|
|
251
215
|
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
|
252
216
|
type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
|
@@ -264,4 +228,4 @@ type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
264
228
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
265
229
|
}
|
266
230
|
|
267
|
-
export type { BoxProps as B, DivProps as D, IconPropsWithSVGProps as I, TextProps as T, UniversalTextProps as U, UniversalStackProps as a
|
231
|
+
export type { BoxProps as B, DivProps as D, IconPropsWithSVGProps as I, TextProps as T, UniversalTextProps as U, UniversalStackProps as a };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { U as UniversalInputProps } from './types-
|
2
|
+
import { U as UniversalInputProps } from './types-B_G_Ws4q.cjs';
|
3
3
|
import { HTMLMotionProps } from 'motion/react';
|
4
4
|
|
5
5
|
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { U as UniversalInputProps } from './types-
|
2
|
+
import { U as UniversalInputProps } from './types-B_G_Ws4q.js';
|
3
3
|
import { HTMLMotionProps } from 'motion/react';
|
4
4
|
|
5
5
|
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { U as UniversalInputProps } from './types-
|
2
|
+
import { U as UniversalInputProps } from './types-bUSRKyjU.js';
|
3
3
|
import { HTMLMotionProps } from 'motion/react';
|
4
4
|
|
5
5
|
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { U as UniversalInputProps } from './types-
|
2
|
+
import { U as UniversalInputProps } from './types-bUSRKyjU.cjs';
|
3
3
|
import { HTMLMotionProps } from 'motion/react';
|
4
4
|
|
5
5
|
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { a as UniversalPressableProps } from './types-
|
2
|
+
import { a as UniversalPressableProps } from './types-bUSRKyjU.js';
|
3
3
|
|
4
4
|
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
5
5
|
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { a as UniversalPressableProps } from './types-
|
2
|
+
import { a as UniversalPressableProps } from './types-B_G_Ws4q.js';
|
3
3
|
|
4
4
|
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
5
5
|
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { a as UniversalPressableProps } from './types-
|
2
|
+
import { a as UniversalPressableProps } from './types-B_G_Ws4q.cjs';
|
3
3
|
|
4
4
|
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
5
5
|
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import { a as UniversalPressableProps } from './types-
|
2
|
+
import { a as UniversalPressableProps } from './types-bUSRKyjU.cjs';
|
3
3
|
|
4
4
|
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
5
5
|
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import {
|
2
|
+
import { g as UniversalBoxProps, h as UniversalStackProps, i as UniversalDividerProps } from './types-B_G_Ws4q.cjs';
|
3
3
|
|
4
4
|
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
5
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import {
|
2
|
+
import { g as UniversalBoxProps, h as UniversalStackProps, i as UniversalDividerProps } from './types-B_G_Ws4q.js';
|
3
3
|
|
4
4
|
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
5
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import {
|
2
|
+
import { g as UniversalBoxProps, h as UniversalStackProps, i as UniversalDividerProps } from './types-bUSRKyjU.js';
|
3
3
|
|
4
4
|
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
5
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react from 'react';
|
2
|
-
import {
|
2
|
+
import { g as UniversalBoxProps, h as UniversalStackProps, i as UniversalDividerProps } from './types-bUSRKyjU.cjs';
|
3
3
|
|
4
4
|
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
5
|
interface BoxProps extends UniversalBoxProps, DivProps {
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{getMotionVar as r}from"./chunk-T7G5JTDY.js";import{FONT_DECLARATIONS_MAP as t,fromEntries as a}from"./chunk-ODIO4O52.js";import{entries as o}from"./chunk-EWJ3J526.js";import{TEXT_TRANSFORM_PREFIX as e,LINE_HEIGHT_PREFIX as n,FONT_SIZE_PREFIX as s,FONT_WIDTH_PREFIX as i,FONT_SLANT_PREFIX as d,FONT_WEIGHT_PREFIX as c,FONT_FAMILY_PREFIX as f,TEXT_RESPONSIVE_CLASSNAME as l,UDS_PREFIX as u}from"./chunk-N4FHPR6Q.js";import{textVariants as m,motionSpringConfigOptions as p}from"@yahoo/uds/fixtures";import{isString as h}from"lodash-es";import $ from"tailwindcss/plugin.js";var g=r=>{throw new Error("Didn't expect to get here")},v=(r,t,a,o)=>{const e=r.typography[t]?.[a];if(!e)throw new Error(`Missing typography data for variant "${t}" and key "${a}"`);const n="base"===o?e.base:e.breakpoints?.[o];if(!n)throw new Error(`Missing value for variant "${t}", key "${a}", and breakpoint "${o}"`);if(h(n))return n;switch(n.type){case"px":return n.value/16+"rem";case"unitless":return String(n.value)}return g()},w=(r,t)=>t in r.font?`var(--${f}-${t})`:t,x=(r,t)=>Object.fromEntries(m.flatMap((a=>[[`--${f}-${a}`,w(r,v(r,a,"fontFamily",t))],[`--${s}-${a}`,v(r,a,"fontSize",t)],[`--${c}-${a}`,v(r,a,"fontWeight",t)],[`--${n}-${a}`,v(r,a,"lineHeight",t)],[`--${e}-${a}`,v(r,a,"textTransform",t)]]))),b=r=>Object.fromEntries(m.map((t=>[t,`var(--${r}-${t})`]))),k={fontFamily:b(f),fontWeight:b(c),fontSlant:b(d),fontWidth:b(i),fontSize:b(s),lineHeight:b(n),textTransform:b(e)},y=r=>({":root":x(r,"base")}),M=r=>{const t=(a=r.breakpoints,Object.entries(a)).sort((([,{value:r}],[,{value:t}])=>r-t));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
var a;return{[`.${l}`]:Object.fromEntries(t.map((([t,{value:a}])=>[`@media (min-width: ${a}px)`,x(r,t)]))),".uds-text-base":x(r,"base"),...Object.fromEntries(t.map((([t])=>[`.uds-text-${t}`,x(r,t)])))}};function j(r,t){const a=E(r);for(const r of a)t({"@font-face":r})}var S=$.withOptions((function({fontIds:r}){return function({addBase:t}){j(r,t)}}));function O(r){return{light:{colorScheme:"light","--uds-light-mode-icon":"inline","--uds-dark-mode-icon":"none",...r.colorMode.light._vars},dark:{colorScheme:"dark","--uds-light-mode-icon":"none","--uds-dark-mode-icon":"inline",...r.colorMode.dark._vars}}}function E(r){return r.flatMap((r=>{const{declarations:a,fontFamily:o}=t[r];return a.map((r=>({fontFamily:o,fontDisplay:"swap",...r})))}))}function F(r){return`"${r}"`}function L(r){return a(o(r).map((([r,a])=>{const o=`--${f}-${r}`,e=t[a];return[o,[e.fontFamily,...e.fallback].map(F).join(", ")]})))}function _(t){const e=o(t).flatMap((([t,a])=>o(a).flatMap((([a,o])=>p.map((e=>[r({variant:t,speed:a,control:e}),`${o[e]}`]))))));return a(e)}function T(r){return{...r.borderRadius._vars,...r.borderWidth._vars,...r.avatarSizes._vars,...r.iconSizes._vars}}function W(r){return{xSmall:T(r.scaleMode.xSmall),small:T(r.scaleMode.small),medium:T(r.scaleMode.medium),large:T(r.scaleMode.large),xLarge:T(r.scaleMode.xLarge),xxLarge:T(r.scaleMode.xxLarge),xxxLarge:T(r.scaleMode.xxxLarge)}}function z({config:r,shadowType:t}){const e=r.shadow[t],n=o(e).map((([r])=>[`.uds-${t}-shadow-${r}`,{[`--uds-${t}-shadow`]:`var(--${u}-${t}-shadow-${r})`,boxShadow:`var(--${u}-drop-shadow, 0 0 transparent), var(--${u}-inset-shadow, 0 0 transparent), var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow, 0 0 transparent)`}]));return a(n)}export{k as RESPONSIVE_TAILWIND_CONFIG_MAP,j as addFontFaceDeclarations,S as addFontsPlugin,g as assertUnreachable,y as getBaseTextStyles,O as getColorModeStyles,E as getFontFaceDeclarations,L as getFontStyles,_ as getMotionStyles,M as getResponsiveTextStyles,W as getScaleModeStyles,z as getShadowStyles};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{variants as o}from"./chunk-NYAQO47N.js";import{textVariants as r,backgroundColors as t,foregroundColors as e,spectrumColors as n,borderRadii as i,borderWidths as a,lineColors as l}from"@yahoo/uds/fixtures";import{getFeatureFlags as s}from"@yahoo/uds/flags";import d from"clsx";import f from"imurmurhash";import{extendTailwindMerge as c}from"tailwind-merge";import{forwardRef as p,memo as u,isValidElement as m,cloneElement as b,Children as h}from"react";import{jsx as g}from"react/jsx-runtime";import{isFunction as S}from"lodash-es";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
function x(o){return"boolean"==typeof o?`${o}`:0===o?"0":o}function y(o){const r=Object.create(null),t=Object.keys(o);for(let e=0,n=t.length;e<n;e++){const n=t[e];void 0!==o[n]&&(r[n]=o[n])}return r}var w=c({extend:{theme:{borderColor:l,borderWidth:a,borderRadius:i}},override:{classGroups:{"text-color":[{text:[...e,...n]}],"bg-color":[{bg:t}],"font-family":[{font:["icons",...r]}],leading:[{leading:r}]},conflictingClassGroups:{}}}),C=(...o)=>{const r=d(o);return w(r)},v=o=>r=>{if(!o?.variants)return C(o?.base,r?.className);const{variants:t,defaultVariants:e}=o,n=Object.keys(t).map((o=>{const n=r?.[o],i=e?.[o],a=x(n)||x(i);return t[o][a]})),i={...e,...r&&y(r)},a=o?.compoundVariants?.reduce(((o,{className:r,...t})=>Object.entries(t).every((([o,r])=>i[o]===r))?C(o,r):o),"");return C(o?.base,n,a,r?.className)},W=v({variants:o}),B=new Map,T=o=>{const{useGetStylesCache:r}=s();if(r){const r=function(o){const r=Object.create(null),t=Object.keys(o).sort();for(let e=0,n=t.length;e<n;e++){const n=t[e];r[n]=o[n]}return r}(y(o)),t=(new f).hash(JSON.stringify(r)).result();if(B.has(t))return B.get(t);const e=W(r);return B.set(t,e),e}return W(o)};function E(...o){return r=>o.forEach((o=>function(o,r){"function"==typeof o?o(r):null!=o&&(o.current=r)}(o,r)))}function N(){const o=p(((o,t)=>{const{children:n,...i}=o,a=h.toArray(n),l=a.find(e);if(l){const o=l.props.children,e=a.map((r=>r===l?h.count(o)>1?h.only(null):m(o)?o.props.children:null:r));return g(r,{...i,ref:t,children:m(o)?b(o,void 0,e):null})}return g(r,{...i,ref:t,children:n})}));o.displayName="Slot";const r=p(((o,r)=>{const{children:t,...e}=o;return m(t)?b(t,{...n(e,t.props),ref:r?E(r,t.ref):t.ref}):h.count(t)>1?h.only(null):null}));r.displayName="SlotClone";const t=({children:o})=>o;function e(o){return m(o)&&o.type===t}function n(o,r){const t={...r};for(const e in r){const n=o[e],i=r[e];/^on[A-Z]/.test(e)?n&&i?t[e]=(...o)=>{i(...o),n(...o)}:n&&(t[e]=n):"style"===e&&(t[e]={...n,...i})}return{...o,...t}}return o}var R=N(),G=p((function({asChild:o,className:r,backgroundColor:t,borderRadius:e,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:l,borderColor:s,borderStartColor:d,borderEndColor:f,borderTopColor:c,borderBottomColor:p,borderWidth:u,borderVerticalWidth:m,borderHorizontalWidth:b,borderStartWidth:h,borderEndWidth:S,borderTopWidth:x,borderBottomWidth:y,alignContent:w,alignItems:C,alignSelf:v,flex:W,flexDirection:B,flexGrow:E,flexShrink:N,flexWrap:G,justifyContent:k,flexBasis:z,display:H="flex",overflow:V,overflowX:j,overflowY:O,position:A,spacing:D,spacingHorizontal:I,spacingVertical:Y,spacingBottom:X,spacingEnd:$,spacingStart:F,spacingTop:M,offset:J,offsetVertical:P,offsetHorizontal:Q,offsetBottom:Z,offsetEnd:_,offsetStart:q,offsetTop:K,columnGap:L,rowGap:U,width:oo,height:ro,dropShadow:to,insetShadow:eo,...no},io){const ao=T({backgroundColor:t,borderRadius:e,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:l,borderColor:s,borderStartColor:d,borderEndColor:f,borderTopColor:c,borderBottomColor:p,borderWidth:u,borderVerticalWidth:m,borderHorizontalWidth:b,borderStartWidth:h,borderEndWidth:S,borderTopWidth:x,borderBottomWidth:y,alignContent:w,alignItems:C,alignSelf:v,flex:W,flexDirection:B,flexGrow:E,flexShrink:N,flexWrap:G,justifyContent:k,flexBasis:z,display:H,overflow:V,overflowX:j,overflowY:O,position:A,spacing:D,spacingHorizontal:I,spacingVertical:Y,spacingBottom:X,spacingEnd:$,spacingStart:F,spacingTop:M,offset:J,offsetVertical:P,offsetHorizontal:Q,offsetBottom:Z,offsetEnd:_,offsetStart:q,offsetTop:K,columnGap:L,rowGap:U,width:oo,height:ro,dropShadow:to,insetShadow:eo,className:r});return g(o?R:"div",{className:ao,ref:io,...no})}));G.displayName="Box";var k=(o,r)=>((o,r)=>{const t=S(r)?r:()=>r;return o.flatMap(((o,r)=>0!==r?[t(r),o]:[o]))})(h.toArray(o),(o=>{const t=S(r)?r(o):r;return m(t)?b(t,{...t.props,key:t.key??`interspersed-${o}`}):null})),z=p((function({gap:o,children:r,separator:t,...e},n){return g(G,{ref:n,flexDirection:"row",rowGap:o,columnGap:o,...e,children:t?k(r,t):r})}));z.displayName="HStack";var H=N(),V={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",label3:"p",label4:"p",caption1:"p",caption2:"p",legal1:"p",inherit:"p"},j=p((function({className:o,asChild:r,color:t="primary",variant:e="body1",as:n=V[e],fontFamily:i,fontSize:a,fontWeight:l,lineHeight:s,textTransform:d,textAlign:f,backgroundColor:c,borderRadius:p,borderTopStartRadius:u,borderTopEndRadius:m,borderBottomStartRadius:b,borderBottomEndRadius:h,borderColor:S,borderStartColor:x,borderEndColor:y,borderTopColor:w,borderBottomColor:C,borderWidth:v,borderVerticalWidth:W,borderHorizontalWidth:B,borderStartWidth:E,borderEndWidth:N,borderTopWidth:R,borderBottomWidth:G,alignContent:k,alignItems:z,alignSelf:j,flex:O,flexDirection:A,flexGrow:D,flexShrink:I,flexWrap:Y,justifyContent:X,flexBasis:$,display:F,overflow:M,overflowX:J,overflowY:P,position:Q,spacing:Z,spacingHorizontal:_,spacingVertical:q,spacingBottom:K,spacingEnd:L,spacingStart:U,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:fo,...co},po){const uo={...t&&"inherit"!==t?{color:t}:{},...e&&"inherit"!==e?{fontFamily:i??e,fontSize:a??e,fontWeight:l??e,lineHeight:s??e,textTransform:d??e}:{},textAlign:f},mo=T({className:o,...uo,backgroundColor:c,borderRadius:p,borderTopStartRadius:u,borderTopEndRadius:m,borderBottomStartRadius:b,borderBottomEndRadius:h,borderColor:S,borderStartColor:x,borderEndColor:y,borderTopColor:w,borderBottomColor:C,borderWidth:v,borderVerticalWidth:W,borderHorizontalWidth:B,borderStartWidth:E,borderEndWidth:N,borderTopWidth:R,borderBottomWidth:G,alignContent:k,alignItems:z,alignSelf:j,flex:O,flexDirection:A,flexGrow:D,flexShrink:I,flexWrap:Y,justifyContent:X,flexBasis:$,display:F,overflow:M,overflowX:J,overflowY:P,position:Q,spacing:Z,spacingHorizontal:_,spacingVertical:q,spacingBottom:K,spacingEnd:L,spacingStart:U,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:fo});return g(r?H:n,{className:mo,ref:po,...co})}));j.displayName="Text";var O=p((function({gap:o,children:r,separator:t,...e},n){return g(G,{ref:n,flexDirection:"column",columnGap:o,rowGap:o,...e,children:t?k(r,t):r})}));O.displayName="VStack";var A={xs:12,sm:16,md:24,lg:32},D=p((function({name:o,size:r="md",variant:t="outline",color:e="primary",className:n,...i},a){const l=o.metadata?.variants??[],s=l.includes(t)?t:l[0]??"fill",d="multicolor"===s,f=T({flex:"none",color:d?void 0:e,className:C(n,!d&&"[&_path]:fill-current")}),c=A[r];return g("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:c,height:c,viewBox:`0 0 ${c} ${c}`,"aria-hidden":"true",focusable:"false",className:f,...i,children:g(o,{size:r,variant:s})})}));D.displayName="Icon";var I=u((function({icon:o,iconProps:r,...t}){if(!o)return null;const e=r??{},n=o;if(n.metadata?.isSvgIcon)return g(D,{name:n,...e,...t});if(S(o)){const r=o(e);return m(r)&&b(r,t)}return m(o)&&b(o,{...e,...o.props,...t})}));
|
3
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */export{G as Box,z as HStack,D as Icon,I as IconSlot,j as Text,O as VStack,N as createSlot,v as cva,C as cx,T as getStyles};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{cx as e,VStack as r,HStack as t,Box as i,Text as o,getStyles as a}from"./chunk-RR45EHLK.js";import{forwardRef as l,useMemo as n}from"react";import{jsxs as d,jsx as s}from"react/jsx-runtime";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var c={horizontal:"w-full",vertical:""},h=l((function({vertical:a=!1,contentPosition:l="center",className:h,layerClassNames:m,children:f,...v},x){const N=a?"vertical":"horizontal",b=a?r:t,p=n((()=>({root:e(c[N],h,m?.root),label:e(m?.text),line:m?.line})),[h,N,m?.root,m?.text,m?.line]),y=n((()=>"vertical"===N?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0}:{borderLeftWidth:0,borderRightWidth:0,borderBottomWidth:0}),[N]),u=()=>s(i,{flex:"1",className:p.line,style:y});return f?d(b,{flex:"1",alignItems:"center",className:p.root,ref:x,...v,children:["start"!==l&&s(u,{}),s(i,{flex:"none",children:s(o,{color:"inherit",variant:"inherit",className:p.label,children:f})}),"end"!==l&&s(u,{})]}):s(i,{display:"flex",flex:"none",className:p.root,ref:x,...v,children:s(u,{})})}));h.displayName="DividerCore";var m=l((function({variant:r="primary",layerClassNames:t,...i},o){const l=n((()=>({root:e("inherit"!==r&&a({dividerVariantRoot:r}),t?.root),text:e("inherit"!==r?a({dividerVariantLabel:r}):void 0,t?.text),line:e("inherit"!==r&&a({dividerVariantLine:r}),t?.line)})),[t?.line,t?.root,t?.text,r]);return s(h,{ref:o,layerClassNames:l,...i})}));m.displayName="DividerInternal";export{m as DividerInternal};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var r=require("./chunk-TJZ4HVAG.cjs"),o=require("lodash-es"),e=require("react/jsx-runtime");/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var t=require("react").memo((function({startIcon:o,endIcon:t,iconProps:i,children:a,size:n,isFilled:l,...s}){const d={helperText:r.cx(r.getStyles({inputSizeHelperText:n,inputVariantHelperText:"default",inputVariantValueHelperText:l?"filled":"empty"})),helperIcon:r.getStyles({inputSizeHelperIcon:n,inputVariantHelperIcon:"default",inputVariantValueHelperIcon:l?"filled":"empty"})},c={variant:"outline",...i};return e.jsxs(r.HStack,{gap:"1",alignItems:"center",...s,children:[o&&e.jsx(r.IconSlot,{icon:o,...c,iconProps:i,className:d.helperIcon}),e.jsx("span",{className:d.helperText,children:a}),t&&e.jsx(r.IconSlot,{icon:t,...c,iconProps:i,className:d.helperIcon})]})}));exports.FormLabel=({htmlFor:t,required:i,label:a,children:n,color:l="muted",variant:s="label3",hasError:d=!1,showRequiredAsterisk:c=!1,as:p="label",className:f,...u})=>{const h=a?o.isFunction(a)?a():a:n;return h?e.jsxs(r.Text,{variant:s,color:l,as:p,htmlFor:t,className:r.cx("cursor-[inherit]",f),...u,children:[h,i&&c&&e.jsx(r.Text,{as:"sup",color:d?"alert":"inherit",variant:"inherit",spacingStart:"0.5","aria-hidden":!0,children:"*"})]}):null},exports.Image=function({width:o,height:t,src:i,alt:a,contentFit:n,backgroundColor:l,borderRadius:s,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:p,borderBottomEndRadius:f,borderColor:u,borderStartColor:h,borderEndColor:b,borderTopColor:m,borderBottomColor:x,borderWidth:g,borderVerticalWidth:S,borderHorizontalWidth:T,borderStartWidth:C,borderEndWidth:W,borderTopWidth:H,borderBottomWidth:I,alignContent:B,alignItems:w,alignSelf:E,flex:V,flexDirection:v,flexGrow:j,flexShrink:R,flexWrap:y,justifyContent:z,flexBasis:k,display:F,overflow:G,overflowX:q,overflowY:N,position:P,spacing:A,spacingHorizontal:D,spacingVertical:X,spacingBottom:Y,spacingEnd:J,spacingStart:L,spacingTop:M,offset:Z,offsetVertical:K,offsetHorizontal:O,offsetBottom:Q,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:or,...er}){const tr=r.getStyles({contentFit:n,backgroundColor:l,borderRadius:s,borderTopStartRadius:d,borderTopEndRadius:c,borderBottomStartRadius:p,borderBottomEndRadius:f,borderColor:u,borderStartColor:h,borderEndColor:b,borderTopColor:m,borderBottomColor:x,borderWidth:g,borderVerticalWidth:S,borderHorizontalWidth:T,borderStartWidth:C,borderEndWidth:W,borderTopWidth:H,borderBottomWidth:I,alignContent:B,alignItems:w,alignSelf:E,flex:V,flexDirection:v,flexGrow:j,flexShrink:R,flexWrap:y,justifyContent:z,flexBasis:k,display:F,overflow:G,overflowX:q,overflowY:N,position:P,spacing:A,spacingHorizontal:D,spacingVertical:X,spacingBottom:Y,spacingEnd:J,spacingStart:L,spacingTop:M,offset:Z,offsetVertical:K,offsetHorizontal:O,offsetBottom:Q,offsetEnd:U,offsetStart:$,offsetTop:_,columnGap:rr,rowGap:or});return e.jsx("img",{src:i,alt:a,className:tr,style:{width:o,height:t},...er})},exports.InputHelpTextMemo=t;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var e=require("./chunk-YMQMU4E2.cjs"),t=require("./chunk-WGG66FKO.cjs"),r=require("./chunk-J7PUOUXC.cjs"),n=require("./chunk-4NZKRK55.cjs"),a=require("@yahoo/uds/fixtures"),o=require("lodash-es");function s(e){return e&&e.__esModule?e:{default:e}}var i=s(require("tailwindcss/plugin.js"));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var l=e=>{throw new Error("Didn't expect to get here")},c=(e,t,r,n)=>{const a=e.typography[t]?.[r];if(!a)throw new Error(`Missing typography data for variant "${t}" and key "${r}"`);const s="base"===n?a.base:a.breakpoints?.[n];if(!s)throw new Error(`Missing value for variant "${t}", key "${r}", and breakpoint "${n}"`);if(o.isString(s))return s;switch(s.type){case"px":return s.value/16+"rem";case"unitless":return String(s.value)}return l()},d=(e,t)=>t in e.font?`var(--${n.FONT_FAMILY_PREFIX}-${t})`:t,u=(e,t)=>Object.fromEntries(a.textVariants.flatMap((r=>[[`--${n.FONT_FAMILY_PREFIX}-${r}`,d(e,c(e,r,"fontFamily",t))],[`--${n.FONT_SIZE_PREFIX}-${r}`,c(e,r,"fontSize",t)],[`--${n.FONT_WEIGHT_PREFIX}-${r}`,c(e,r,"fontWeight",t)],[`--${n.LINE_HEIGHT_PREFIX}-${r}`,c(e,r,"lineHeight",t)],[`--${n.TEXT_TRANSFORM_PREFIX}-${r}`,c(e,r,"textTransform",t)]]))),f=e=>Object.fromEntries(a.textVariants.map((t=>[t,`var(--${e}-${t})`]))),p={fontFamily:f(n.FONT_FAMILY_PREFIX),fontWeight:f(n.FONT_WEIGHT_PREFIX),fontSlant:f(n.FONT_SLANT_PREFIX),fontWidth:f(n.FONT_WIDTH_PREFIX),fontSize:f(n.FONT_SIZE_PREFIX),lineHeight:f(n.LINE_HEIGHT_PREFIX),textTransform:f(n.TEXT_TRANSFORM_PREFIX)};function F(e,t){const r=E(e);for(const e of r)t({"@font-face":e})}var _=i.default.withOptions((function({fontIds:e}){return function({addBase:t}){F(e,t)}}));function E(e){return e.flatMap((e=>{const{declarations:r,fontFamily:n}=t.FONT_DECLARATIONS_MAP[e];return r.map((e=>({fontFamily:n,fontDisplay:"swap",...e})))}))}function h(e){return`"${e}"`}function g(e){return{...e.borderRadius._vars,...e.borderWidth._vars,...e.avatarSizes._vars,...e.iconSizes._vars}}exports.RESPONSIVE_TAILWIND_CONFIG_MAP=p,exports.addFontFaceDeclarations=F,exports.addFontsPlugin=_,exports.assertUnreachable=l,exports.getBaseTextStyles=e=>({":root":u(e,"base")}),exports.getColorModeStyles=function(e){return{light:{colorScheme:"light","--uds-light-mode-icon":"inline","--uds-dark-mode-icon":"none",...e.colorMode.light._vars},dark:{colorScheme:"dark","--uds-light-mode-icon":"none","--uds-dark-mode-icon":"inline",...e.colorMode.dark._vars}}},exports.getFontFaceDeclarations=E,exports.getFontStyles=function(e){return t.fromEntries(r.entries(e).map((([e,r])=>{const a=`--${n.FONT_FAMILY_PREFIX}-${e}`,o=t.FONT_DECLARATIONS_MAP[r];return[a,[o.fontFamily,...o.fallback].map(h).join(", ")]})))},exports.getMotionStyles=function(n){const o=r.entries(n).flatMap((([t,n])=>r.entries(n).flatMap((([r,n])=>a.motionSpringConfigOptions.map((a=>[e.getMotionVar({variant:t,speed:r,control:a}),`${n[a]}`]))))));return t.fromEntries(o)},exports.getResponsiveTextStyles=e=>{const t=(r=e.breakpoints,Object.entries(r)).sort((([,{value:e}],[,{value:t}])=>e-t));var r;return{[`.${n.TEXT_RESPONSIVE_CLASSNAME}`]:Object.fromEntries(t.map((([t,{value:r}])=>[`@media (min-width: ${r}px)`,u(e,t)]))),".uds-text-base":u(e,"base"),...Object.fromEntries(t.map((([t])=>[`.uds-text-${t}`,u(e,t)])))}},exports.getScaleModeStyles=function(e){return{xSmall:g(e.scaleMode.xSmall),small:g(e.scaleMode.small),medium:g(e.scaleMode.medium),large:g(e.scaleMode.large),xLarge:g(e.scaleMode.xLarge),xxLarge:g(e.scaleMode.xxLarge),xxxLarge:g(e.scaleMode.xxxLarge)}},exports.getShadowStyles=function({config:e,shadowType:a}){const o=e.shadow[a],s=r.entries(o).map((([e])=>[`.uds-${a}-shadow-${e}`,{[`--uds-${a}-shadow`]:`var(--${n.UDS_PREFIX}-${a}-shadow-${e})`,boxShadow:`var(--${n.UDS_PREFIX}-drop-shadow, 0 0 transparent), var(--${n.UDS_PREFIX}-inset-shadow, 0 0 transparent), var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow, 0 0 transparent)`}]));return t.fromEntries(s)};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{getMotionVar as r}from"./chunk-T7G5JTDY.js";import{FONT_DECLARATIONS_MAP as t,fromEntries as a}from"./chunk-HT3GLDSF.js";import{entries as o}from"./chunk-EWJ3J526.js";import{TEXT_TRANSFORM_PREFIX as e,LINE_HEIGHT_PREFIX as n,FONT_SIZE_PREFIX as s,FONT_WIDTH_PREFIX as i,FONT_SLANT_PREFIX as d,FONT_WEIGHT_PREFIX as c,FONT_FAMILY_PREFIX as f,TEXT_RESPONSIVE_CLASSNAME as l,UDS_PREFIX as u}from"./chunk-N4FHPR6Q.js";import{textVariants as m,motionSpringConfigOptions as p}from"@yahoo/uds/fixtures";import{isString as h}from"lodash-es";import $ from"tailwindcss/plugin.js";var g=r=>{throw new Error("Didn't expect to get here")},v=(r,t,a,o)=>{const e=r.typography[t]?.[a];if(!e)throw new Error(`Missing typography data for variant "${t}" and key "${a}"`);const n="base"===o?e.base:e.breakpoints?.[o];if(!n)throw new Error(`Missing value for variant "${t}", key "${a}", and breakpoint "${o}"`);if(h(n))return n;switch(n.type){case"px":return n.value/16+"rem";case"unitless":return String(n.value)}return g()},w=(r,t)=>t in r.font?`var(--${f}-${t})`:t,x=(r,t)=>Object.fromEntries(m.flatMap((a=>[[`--${f}-${a}`,w(r,v(r,a,"fontFamily",t))],[`--${s}-${a}`,v(r,a,"fontSize",t)],[`--${c}-${a}`,v(r,a,"fontWeight",t)],[`--${n}-${a}`,v(r,a,"lineHeight",t)],[`--${e}-${a}`,v(r,a,"textTransform",t)]]))),b=r=>Object.fromEntries(m.map((t=>[t,`var(--${r}-${t})`]))),k={fontFamily:b(f),fontWeight:b(c),fontSlant:b(d),fontWidth:b(i),fontSize:b(s),lineHeight:b(n),textTransform:b(e)},y=r=>({":root":x(r,"base")}),M=r=>{const t=(a=r.breakpoints,Object.entries(a)).sort((([,{value:r}],[,{value:t}])=>r-t));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
var a;return{[`.${l}`]:Object.fromEntries(t.map((([t,{value:a}])=>[`@media (min-width: ${a}px)`,x(r,t)]))),".uds-text-base":x(r,"base"),...Object.fromEntries(t.map((([t])=>[`.uds-text-${t}`,x(r,t)])))}};function S(r,t){const a=F(r);for(const r of a)t({"@font-face":r})}var j=$.withOptions((function({fontIds:r}){return function({addBase:t}){S(r,t)}}));function E(r){return{light:{colorScheme:"light","--uds-light-mode-icon":"inline","--uds-dark-mode-icon":"none",...r.colorMode.light._vars},dark:{colorScheme:"dark","--uds-light-mode-icon":"none","--uds-dark-mode-icon":"inline",...r.colorMode.dark._vars}}}function F(r){return r.flatMap((r=>{const{declarations:a,fontFamily:o}=t[r];return a.map((r=>({fontFamily:o,fontDisplay:"swap",...r})))}))}function L(r){return`"${r}"`}function O(r){return a(o(r).map((([r,a])=>{const o=`--${f}-${r}`,e=t[a];return[o,[e.fontFamily,...e.fallback].map(L).join(", ")]})))}function T(t){const e=o(t).flatMap((([t,a])=>o(a).flatMap((([a,o])=>p.map((e=>[r({variant:t,speed:a,control:e}),`${o[e]}`]))))));return a(e)}function _(r){return{...r.borderRadius._vars,...r.borderWidth._vars,...r.avatarSizes._vars,...r.iconSizes._vars}}function W(r){return{xSmall:_(r.scaleMode.xSmall),small:_(r.scaleMode.small),medium:_(r.scaleMode.medium),large:_(r.scaleMode.large),xLarge:_(r.scaleMode.xLarge),xxLarge:_(r.scaleMode.xxLarge),xxxLarge:_(r.scaleMode.xxxLarge)}}function z({config:r,shadowType:t}){const e=r.shadow[t],n=o(e).map((([r])=>[`.uds-${t}-shadow-${r}`,{[`--uds-${t}-shadow`]:`var(--${u}-${t}-shadow-${r})`,boxShadow:`var(--${u}-drop-shadow, 0 0 transparent), var(--${u}-inset-shadow, 0 0 transparent), var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow, 0 0 transparent)`}]));return a(n)}export{k as RESPONSIVE_TAILWIND_CONFIG_MAP,S as addFontFaceDeclarations,j as addFontsPlugin,g as assertUnreachable,y as getBaseTextStyles,E as getColorModeStyles,F as getFontFaceDeclarations,O as getFontStyles,T as getMotionStyles,M as getResponsiveTextStyles,W as getScaleModeStyles,z as getShadowStyles};
|