@yahoo/uds 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/cli/preload.ts +1 -1
  2. package/cli/utils/purgeCSS.ts +2 -2
  3. package/dist/{Image.native-CddvOupj.d.cts → Image.native-CyJCMvgr.d.cts} +1 -1
  4. package/dist/{Image.native-BJfkUDnq.d.ts → Image.native-M50LC-q7.d.ts} +1 -1
  5. package/dist/{VStack-CjOrFgxd.d.ts → VStack-R8SACz7K.d.cts} +1 -1
  6. package/dist/{VStack-CMGd5AX1.d.cts → VStack-fSE_ityd.d.ts} +1 -1
  7. package/dist/experimental/index.cjs +1 -1
  8. package/dist/experimental/index.d.cts +2 -2
  9. package/dist/experimental/index.d.ts +2 -2
  10. package/dist/experimental/index.js +1 -1
  11. package/dist/experimental/index.native.d.cts +3 -3
  12. package/dist/experimental/index.native.d.ts +3 -3
  13. package/dist/index.d.cts +42 -9
  14. package/dist/index.d.ts +42 -9
  15. package/dist/{index.native-DG8RsS88.d.cts → index.native-BstClKbg.d.cts} +1 -1
  16. package/dist/{index.native-LymI5azd.d.ts → index.native-DtdUtCNu.d.ts} +1 -1
  17. package/dist/index.native.d.cts +73 -7
  18. package/dist/index.native.d.ts +73 -7
  19. package/dist/styles/globals.css +1 -0
  20. package/dist/{tailwindPlugin.d.ts → tailwind/plugin.d.cts} +1 -1
  21. package/dist/{tailwindPlugin.d.cts → tailwind/plugin.d.ts} +1 -1
  22. package/dist/tokens/index.d.cts +15 -3
  23. package/dist/tokens/index.d.ts +15 -3
  24. package/dist/tokens/index.native.d.cts +2 -2
  25. package/dist/tokens/index.native.d.ts +2 -2
  26. package/dist/tokens/parseTokens.d.cts +1 -1
  27. package/dist/tokens/parseTokens.d.ts +1 -1
  28. package/dist/{types-D-ttCAsE.d.cts → types-BN1X8QcB.d.cts} +1 -1
  29. package/dist/{types-D-ttCAsE.d.ts → types-BN1X8QcB.d.ts} +1 -1
  30. package/dist/types-DRP5tWZG.d.cts +375 -0
  31. package/dist/types-DRP5tWZG.d.ts +375 -0
  32. package/package.json +19 -39
  33. package/dist/styles/fonts.css +0 -1
  34. package/dist/styles/fonts.d.cts +0 -2
  35. package/dist/styles/fonts.d.ts +0 -2
  36. package/dist/styles/globals.d.cts +0 -2
  37. package/dist/styles/globals.d.ts +0 -2
  38. package/dist/styles/toast.d.cts +0 -2
  39. package/dist/styles/toast.d.ts +0 -2
  40. package/dist/tailwindPurge/utils.cjs +0 -1
  41. package/dist/tailwindPurge/utils.d.cts +0 -25
  42. package/dist/tailwindPurge/utils.d.ts +0 -25
  43. package/dist/tailwindPurge/utils.js +0 -1
  44. package/dist/tailwindPurge.cjs +0 -4
  45. package/dist/tailwindPurge.d.cts +0 -20
  46. package/dist/tailwindPurge.d.ts +0 -20
  47. package/dist/tailwindPurge.js +0 -4
  48. package/dist/tokens/parseTokens.native.cjs +0 -1
  49. package/dist/tokens/parseTokens.native.d.cts +0 -399
  50. package/dist/tokens/parseTokens.native.d.ts +0 -399
  51. package/dist/tokens/parseTokens.native.js +0 -1
  52. package/dist/types-FO65RM-W.d.cts +0 -38
  53. package/dist/types-FO65RM-W.d.ts +0 -38
  54. /package/dist/{tailwindPlugin.cjs → tailwind/plugin.cjs} +0 -0
  55. /package/dist/{tailwindPlugin.js → tailwind/plugin.js} +0 -0
@@ -0,0 +1,375 @@
1
+ import { PropsWithChildren } from 'react';
2
+
3
+ declare const alwaysPalette: {
4
+ white: string;
5
+ black: string;
6
+ transparent: string;
7
+ };
8
+
9
+ type IconName$1 = 'academicCap' | 'academicCap_fill' | 'accept' | 'accept_fill' | 'accessibility' | 'accountKey' | 'accountKey_fill' | 'accountKeyAndroid' | 'accountKeyAndroid_fill' | 'addAttachments' | 'addAttachments_fill' | 'addDocument' | 'addDocument_fill' | 'addFolder' | 'addFolder_fill' | 'addLink' | 'addPerson' | 'addPerson_fill' | 'addToCalendar' | 'addToCalendar_fill' | 'ads' | 'adsEuro' | 'adsPound' | 'alarmClock' | 'alarmClock_fill' | 'analytics' | 'announcement' | 'announcement_fill' | 'appPublishing' | 'appPublishing_fill' | 'apparel' | 'apparel_fill' | 'appleWatch_fill' | 'ar3d' | 'archive' | 'archive_fill' | 'arrowCurveLeft' | 'arrowCurveRight' | 'arrowCurveUp' | 'arrowDown' | 'arrowDownAboveLine' | 'arrowDownAndIn' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowUpAndOut' | 'arrowUpUnderLine' | 'ascender' | 'astroAquarius' | 'astroAries' | 'astroCancer' | 'astroCapricorn' | 'astroGemini' | 'astroLeo' | 'astroLibra' | 'astroPisces' | 'astroSagittarius' | 'astroScorpio' | 'astroTaurus' | 'astroVirgo' | 'atSymbol' | 'attachment' | 'badge' | 'badge_fill' | 'barGraph' | 'barGraph_fill' | 'baseball' | 'baseball_fill' | 'baseballBat_fill' | 'basket' | 'basket_fill' | 'basketball' | 'basketball_fill' | 'beachUmbrella' | 'beachUmbrella_fill' | 'bed' | 'bed_fill' | 'beer' | 'beer_fill' | 'bell' | 'bell_fill' | 'bellOff' | 'bellOff_fill' | 'bellPlus' | 'bill' | 'bill_fill' | 'billing' | 'billing_fill' | 'binoculars' | 'binoculars_fill' | 'biometrics' | 'birthdayCake' | 'birthdayCake_fill' | 'blockPerson' | 'blockPerson_fill' | 'bold' | 'bookmark' | 'bookmark_fill' | 'box' | 'box_fill' | 'briefcase' | 'briefcase_fill' | 'bubbleGraph' | 'bubbleGraph_fill' | 'bulletList' | 'bulletListRectangle' | 'bulletListRectangle_fill' | 'bus' | 'bus_fill' | 'cal01' | 'cal01_fill' | 'cal02' | 'cal02_fill' | 'cal03' | 'cal03_fill' | 'cal04' | 'cal04_fill' | 'cal05' | 'cal05_fill' | 'cal06' | 'cal06_fill' | 'cal07' | 'cal07_fill' | 'cal08' | 'cal08_fill' | 'cal09' | 'cal09_fill' | 'cal10' | 'cal10_fill' | 'cal11' | 'cal11_fill' | 'cal12' | 'cal12_fill' | 'cal13' | 'cal13_fill' | 'cal14' | 'cal14_fill' | 'cal15' | 'cal15_fill' | 'cal16' | 'cal16_fill' | 'cal17' | 'cal17_fill' | 'cal18' | 'cal18_fill' | 'cal19' | 'cal19_fill' | 'cal20' | 'cal20_fill' | 'cal21' | 'cal21_fill' | 'cal22' | 'cal22_fill' | 'cal23' | 'cal23_fill' | 'cal24' | 'cal24_fill' | 'cal25' | 'cal25_fill' | 'cal26' | 'cal26_fill' | 'cal27' | 'cal27_fill' | 'cal28' | 'cal28_fill' | 'cal29' | 'cal29_fill' | 'cal30' | 'cal30_fill' | 'cal31' | 'cal31_fill' | 'calendar' | 'calendar_fill' | 'camera' | 'camera_fill' | 'candy' | 'canvas' | 'canvas_fill' | 'capitolBuilding' | 'capitolBuilding_fill' | 'capsule' | 'capsule_fill' | 'car' | 'car_fill' | 'card' | 'card_fill' | 'cart' | 'castAnimationFrame1' | 'castAnimationFrame2' | 'castUnavailable' | 'centerAligned' | 'cfl_fill' | 'changeFont' | 'checkboxMixed' | 'checkboxMixed_fill' | 'checkboxSelected' | 'checkboxSelected_fill' | 'checkboxUnselected' | 'checkmarkSelected' | 'chevronBack' | 'chevronDown' | 'chevronNext' | 'chevronUp' | 'chromeCast' | 'chromeCast_fill' | 'cleats' | 'cleats_fill' | 'clientAssist' | 'clientAssist_fill' | 'clock' | 'clock_fill' | 'close' | 'closedCaptioning' | 'closedCaptioning_fill' | 'cloud' | 'cloud_fill' | 'cloudDay' | 'cloudDrive' | 'cloudDrive_fill' | 'cloudNight' | 'code' | 'coffeeCup' | 'coffeeCup_fill' | 'coffeeMug' | 'coffeeMug_fill' | 'collapseList' | 'collegeFootball' | 'collegeFootball_fill' | 'colorPalette' | 'colorPalette_fill' | 'comedyTragedyMasks' | 'comedyTragedyMasks_fill' | 'comment' | 'comment_fill' | 'compass' | 'compass_fill' | 'compose' | 'compose_fill' | 'contactBook' | 'contactBook_fill' | 'contactCard' | 'contactCard_fill' | 'convenienceStore' | 'convenienceStore_fill' | 'conversations' | 'conversations_fill' | 'copy' | 'copy_fill' | 'copyright' | 'copyright_fill' | 'creativeCommons' | 'creativeCommons_fill' | 'creditCard' | 'creditCard_fill' | 'crescentMoon' | 'crescentMoonAlt' | 'cryptocurrency' | 'cryptocurrency_fill' | 'cursor' | 'cut' | 'dashboard' | 'dashboard_fill' | 'dating' | 'dating_fill' | 'decline' | 'decline_fill' | 'descender' | 'desktop' | 'desktop_fill' | 'diamond' | 'diamond_fill' | 'direction' | 'direction_fill' | 'discoBall' | 'document' | 'document_fill' | 'dollar' | 'doubleLeft' | 'doubleRight' | 'draft' | 'draft_fill' | 'dragBars' | 'dragBarsAlt' | 'dressForm_fill' | 'dressFrom' | 'dusk' | 'dusk_fill' | 'eclipse' | 'eclipse_fill' | 'edit' | 'edit_fill' | 'emoticon' | 'emoticon_fill' | 'euro' | 'exchange' | 'exclamation' | 'exclamation_fill' | 'exclamationAlt' | 'exclamationAlt_fill' | 'exitFullscreen' | 'expand' | 'expandAlt' | 'expandList' | 'eye' | 'eyeSlash' | 'eyelash' | 'fantasyBaseball' | 'fantasyBaseball_fill' | 'fantasyFootball' | 'fantasyFootball_fill' | 'files' | 'files_fill' | 'filter' | 'finance' | 'firstQuarter' | 'flag' | 'flag_fill' | 'flower' | 'fog' | 'fogDay' | 'fogNight' | 'folder' | 'folder_fill' | 'foodAndDrink' | 'foodAndDrink_fill' | 'football' | 'football_fill' | 'forkKnife' | 'forward' | 'forward_fill' | 'fourColumn' | 'fourColumn_fill' | 'fullMoon' | 'fullscreen' | 'fullscreenAudio' | 'gallery' | 'gallery_fill' | 'gasStation' | 'gear' | 'gear_fill' | 'gif' | 'gif_fill' | 'globe' | 'golf' | 'grid' | 'groups' | 'groups_fill' | 'guitar' | 'halfSun' | 'halfSun_fill' | 'hand' | 'hashtag' | 'haze' | 'hazeDay' | 'hazeNight' | 'heart' | 'heart_fill' | 'heavyRain' | 'heavyRainDay' | 'heavyRainLightning' | 'heavyRainLightningDay' | 'heavyRainLightningNight' | 'heavyRainNight' | 'history' | 'hockey' | 'home' | 'home_fill' | 'hurricane' | 'inbox' | 'inbox_fill' | 'indent' | 'information' | 'information_fill' | 'invitation' | 'invitation_fill' | 'italic' | 'key' | 'keyAlt' | 'keypad' | 'lastQuarter' | 'layout' | 'layout_fill' | 'layoutGrid' | 'layoutList' | 'leftAligned' | 'leftToRight' | 'lifePreserver' | 'lightning' | 'lightningBolt' | 'lightningBolt_fill' | 'lightningDay' | 'lightningNight' | 'lineGraph' | 'lineTypeBar' | 'lineTypeCandlestick' | 'link' | 'lipstick' | 'lipstick_fill' | 'list' | 'live' | 'locationArrow' | 'locationArrow_fill' | 'lock' | 'lock_fill' | 'logout' | 'magnifyingGlass' | 'magnifyingGlass_fill' | 'mail' | 'mail_fill' | 'manageAccount' | 'manageAccount_fill' | 'map' | 'mapPin' | 'mapPin_fill' | 'martini' | 'martini_fill' | 'meMail' | 'medal' | 'medal_fill' | 'medicalKit' | 'medicalKit_fill' | 'metrics' | 'mic' | 'mic_fill' | 'micOff' | 'micOff_fill' | 'microscope' | 'microscope_fill' | 'minus' | 'mlb' | 'moveToFolder' | 'moveToFolder_fill' | 'movies' | 'movies_fill' | 'music' | 'music_fill' | 'ncaab' | 'newComment' | 'newComment_fill' | 'newMoon' | 'news' | 'news_fill' | 'nextTrack' | 'nfc' | 'nfl' | 'notes' | 'notes_fill' | 'null' | 'numberedList' | 'oneColumn' | 'oneColumn_fill' | 'outbox' | 'outbox_fill' | 'outdent' | 'overflow' | 'overflowMail' | 'overflowVertical' | 'paperclip' | 'parenting' | 'parenting_fill' | 'parking' | 'parks' | 'parks_fill' | 'pause' | 'paw' | 'pawn' | 'pawn_fill' | 'person' | 'person_fill' | 'personArrowUturnLeft' | 'personArrowUturnLeft_fill' | 'phone' | 'phone_fill' | 'picture' | 'picture_fill' | 'pieChart' | 'pieChart_fill' | 'play' | 'play_fill' | 'playInCircle' | 'playInCircle_fill' | 'playMini' | 'plus' | 'poll' | 'poll_fill' | 'popular' | 'power' | 'print' | 'print_fill' | 'pro' | 'profile' | 'profile_fill' | 'prohibitionSign' | 'pulse' | 'question' | 'question_fill' | 'racingFlag' | 'radioSelected' | 'radioSelected_fill' | 'radioUnselected' | 'rain' | 'rainDay' | 'rainNight' | 'raindrop' | 'raindropDay' | 'raindropNight' | 'reblog' | 'reblogAlt' | 'recreation' | 'refresh' | 'refreshAlt' | 'removePerson' | 'removePerson_fill' | 'replay' | 'reply' | 'reply_fill' | 'replyAll' | 'replyAll_fill' | 'reverse' | 'revisions' | 'revisions_fill' | 'riceBowl' | 'rightAligned' | 'rightToLeft' | 'rugby' | 'scissors' | 'searchMail' | 'searchMail_fill' | 'searchWeb' | 'seekBackward10' | 'seekForward10' | 'segments' | 'segments_fill' | 'selector' | 'sendScheduled' | 'sendScheduled_fill' | 'sent' | 'sent_fill' | 'shield' | 'shieldWithCheckMark' | 'shieldWithCheckMark_fill' | 'shieldWithProhibitionSign' | 'shieldWithProhibitionSign_fill' | 'shieldWithX' | 'shieldWithX_fill' | 'shoppingBag' | 'shoppingBag_fill' | 'shrink' | 'sidebar' | 'sidebarError' | 'skull' | 'skull_fill' | 'slideRule' | 'smartPhone' | 'smartPhone_fill' | 'smiley' | 'smiley_fill' | 'snow' | 'snowDay' | 'snowNight' | 'snowflake' | 'soccer' | 'spellCheck' | 'sprinkle' | 'sprinkleDay' | 'sprinkleNight' | 'squareArrowDiagonalUpRight' | 'stadium' | 'star' | 'star_fill' | 'stardust' | 'stardust_fill' | 'stationery' | 'stationery_fill' | 'stationeryFall' | 'stationeryFall_fill' | 'stationerySpring' | 'stationerySpring_fill' | 'stationeryWinter' | 'stationeryWinter_fill' | 'statistics' | 'stop' | 'stopwatch' | 'stopwatch_fill' | 'stream' | 'sun' | 'sun_fill' | 'sunrise' | 'sunset' | 'supply' | 'supply_fill' | 'suspicious' | 'suspicious_fill' | 'swipeleft' | 'swipeleft_fill' | 'swiperight' | 'swiperight_fill' | 'tablet' | 'tablet_fill' | 'tag' | 'tag_fill' | 'target' | 'targetArrow' | 'tech' | 'tech_fill' | 'techAlt' | 'textColor' | 'textHighlight' | 'textHighlight_fill' | 'theme' | 'theme_fill' | 'threeColumn' | 'threeColumn_fill' | 'thumbDown' | 'thumbDown_fill' | 'thumbUp' | 'thumbUp_fill' | 'tornado' | 'train' | 'train_fill' | 'trashCan' | 'trashCan_fill' | 'travel' | 'travel_fill' | 'trending' | 'truck' | 'truck_fill' | 'tsunami' | 'tv' | 'tv_fill' | 'twoColumn' | 'twoColumn_fill' | 'underline' | 'unsub' | 'unsub_fill' | 'videoCamera' | 'videoCamera_fill' | 'videoCameraOff' | 'videoCameraOff_fill' | 'volume' | 'volumeLow' | 'volumeMute' | 'waningCrescent' | 'waningGibbous' | 'waxingCrescent' | 'waxingGibbous' | 'wellness' | 'wifi' | 'wifiOffline' | 'wind' | 'windCloud' | 'windDay' | 'windNight' | 'wine' | 'wine_fill' | 'wrench' | 'wrench_fill' | 'yahooPlus' | 'zoomIn' | 'zoomOut';
10
+
11
+ type PaletteType = keyof PaletteConfig;
12
+ type PaletteValue = {
13
+ hue: Hue;
14
+ step: HueStep;
15
+ opacity?: string;
16
+ };
17
+ type Palette = {
18
+ [key in PaletteType]: keyof PaletteConfig[key];
19
+ };
20
+ type Hue = 'gray' | 'purple' | 'indigo' | 'blue' | 'cyan' | 'teal' | 'mint' | 'green' | 'lime' | 'citron' | 'yellow' | 'brown' | 'nude' | 'orange' | 'sunset' | 'red' | 'rose' | 'pink' | 'magenta' | 'carbon';
21
+ type HueStep = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15';
22
+ type SpectrumColor = `${Hue}-${HueStep}`;
23
+ type CorePalette = Record<CorePaletteAlias, PaletteValue>;
24
+ type CorePaletteAlias = 'accent' | 'alert' | 'brand' | 'positive' | 'warning';
25
+ type BackgroundPaletteAlias = 'primary' | 'secondary';
26
+ type BackgroundPalette = Record<BackgroundPaletteAlias, PaletteValue>;
27
+ type ForegroundPalette = Record<ForegroundPaletteAlias, PaletteValue>;
28
+ type ForegroundPaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'on-color';
29
+ type LinePalette = Record<LinePaletteAlias, PaletteValue>;
30
+ type LinePaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted';
31
+ type AlwaysPalette = typeof alwaysPalette;
32
+ type AlwaysPaletteAlias = keyof AlwaysPalette;
33
+ type ForegroundColor = CorePaletteAlias | ForegroundPaletteAlias | AlwaysPaletteAlias;
34
+ type LineColor = CorePaletteAlias | LinePaletteAlias | AlwaysPaletteAlias;
35
+ type BackgroundColor = CorePaletteAlias | BackgroundPaletteAlias | AlwaysPaletteAlias;
36
+ type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
37
+ type FontFamilyGlobalAlias = 'icons' | 'sans' | 'sans-beta' | 'sans-condensed' | 'serif-text' | 'serif-display';
38
+ type FontFamilyGlobalConfig = Record<FontFamilyGlobalAlias, {
39
+ fallbacks: string[];
40
+ name: string;
41
+ }>;
42
+ type FontWeightNumeric = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
43
+ type FontWeightDescriptive = 'thin' | 'extralight' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
44
+ type TextTransform = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
45
+ type LetterSpacing = 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
46
+ type LineClampAlias = '1' | '2' | '3' | '4' | '5' | '6';
47
+ type LineHeight = number;
48
+ type FontSize = number;
49
+ type TextTransformConfig = Record<TextVariant, TextTransform>;
50
+ type FontSizeConfig = Record<TextVariant, FontSize>;
51
+ type FontFamilyConfig = Record<TextVariant, FontFamilyGlobalAlias>;
52
+ type FontWeightConfig = Record<TextVariant, FontWeightDescriptive>;
53
+ type LineHeightConfig = Record<TextVariant, LineHeight>;
54
+ type ConfigurableTextProperty = 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'textTransform';
55
+ type AvatarSize = 's' | 'm' | 'l';
56
+ type AvatarSizeConfig = Record<AvatarSize, number>;
57
+ type AvatarShape = BorderRadius;
58
+ type IconSize = 'sm' | 'md' | 'lg';
59
+ type IconSizeConfig = Record<IconSize, number>;
60
+ type SpacingAlias = 'none' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14';
61
+ type SpacingConfig = Record<SpacingAlias, number>;
62
+ type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
63
+ type BorderRadiusConfig = Record<BorderRadius, number>;
64
+ type BorderWidth = 'none' | 'thin' | 'medium' | 'thick';
65
+ type BorderWidthConfig = Record<BorderWidth, number>;
66
+ type BoxShadowConfig = {
67
+ color: string;
68
+ offsetX: number;
69
+ offsetY: number;
70
+ blurRadius: number;
71
+ spreadRadius: number;
72
+ }[];
73
+ type ColorModeConfig = Record<ColorMode, ColorsConfig>;
74
+ type ColorsConfig = {
75
+ palette: PaletteConfig;
76
+ spectrum: SpectrumConfig;
77
+ };
78
+ type SpectrumValue = Record<HueStep, string>;
79
+ type SpectrumConfig = Record<Hue, SpectrumValue>;
80
+ type PaletteConfig = {
81
+ core: CorePalette;
82
+ background: BackgroundPalette;
83
+ foreground: ForegroundPalette;
84
+ line: LinePalette;
85
+ };
86
+ type ScaleConfig = {
87
+ avatarSizes: AvatarSizeConfig;
88
+ iconSizes: IconSizeConfig;
89
+ spacing: SpacingConfig;
90
+ borderRadius: BorderRadiusConfig;
91
+ borderWidth: BorderWidthConfig;
92
+ fontFamily: FontFamilyConfig;
93
+ fontSize: FontSizeConfig;
94
+ fontWeight: FontWeightConfig;
95
+ lineHeight: LineHeightConfig;
96
+ textTransform: TextTransformConfig;
97
+ };
98
+ type ScaleModeConfig = Record<ScaleMode, ScaleConfig>;
99
+ type UniversalTokensConfig = {
100
+ colorMode: ColorModeConfig;
101
+ scaleMode: ScaleModeConfig;
102
+ fontFamily: FontFamilyGlobalConfig;
103
+ };
104
+ type PlatformMode = 'web' | 'ios' | 'android';
105
+ type ColorMode = 'light' | 'dark';
106
+ type ColorModeForApp = ColorMode | 'system';
107
+ type ScaleMode = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge';
108
+ type ScaleModeForApp = ScaleMode | 'system';
109
+ type HighContrastMode = boolean;
110
+ type RegionMode = '🇺🇸 US' | '🇩🇪 DE' | '🇫🇷 FR' | '🇨🇳 CN';
111
+ interface Modes {
112
+ colorMode: ColorMode;
113
+ scaleMode: ScaleMode;
114
+ }
115
+ type Animation = 'none' | 'spin' | 'ping' | 'pulse' | 'bounce' | 'accordion-down' | 'accordion-up';
116
+ type TransitionDelay = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
117
+ type TransitionDuration = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
118
+ type TransitionTiming = 'linear' | 'in' | 'out' | 'in-out';
119
+ type AriaAttribute = 'busy' | 'checked' | 'disabled' | 'expanded' | 'hidden' | 'pressed' | 'readonly' | 'required' | 'selected' | 'invalid';
120
+ type DataAttribute = 'active' | 'active-item' | 'autofill' | 'backdrop' | 'enter' | 'leave' | 'focus-visible';
121
+ type Flex = '1' | 'auto' | 'initial' | 'none';
122
+ type FlexGrow = '0' | '1' | '2' | '3';
123
+ type FlexShrink = '0' | '1';
124
+ type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around';
125
+ type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
126
+ type FlexAlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
127
+ type FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
128
+ type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
129
+ type FlexJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
130
+ type FlexBasis = 'min-content';
131
+ type Display = 'block' | 'inline-block' | 'inline' | 'flex' | 'inline-flex' | 'table' | 'inline-table' | 'table-caption' | 'table-cell' | 'table-column' | 'table-column-group' | 'table-footer-group' | 'table-header-group' | 'table-row-group' | 'table-row' | 'flow-root' | 'grid' | 'contents';
132
+ type Overflow = 'auto' | 'hidden' | 'clip' | 'visible' | 'scroll';
133
+ type Position = 'static' | 'fixed' | 'absolute' | 'relative' | 'sticky';
134
+ type ImageStyleProps = {
135
+ /**
136
+ * Determines how the image should be resized to fit its container.
137
+ */
138
+ contentFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
139
+ };
140
+ interface BorderStyleProps {
141
+ /** Add a border radius to all corners of the box. */
142
+ borderRadius?: BorderRadius;
143
+ /** Add a border radius to top left corner of the box. */
144
+ borderTopStartRadius?: BorderRadius;
145
+ /** Add a border radius to top right corner of the box. */
146
+ borderTopEndRadius?: BorderRadius;
147
+ /** Add a border radius to bottom left corner of the box. */
148
+ borderBottomStartRadius?: BorderRadius;
149
+ /** Add a border radius to bottom right corner of the box. */
150
+ borderBottomEndRadius?: BorderRadius;
151
+ /** Adds a custom border color from the palette */
152
+ borderColor?: LineColor;
153
+ /** Border color on active. */
154
+ borderColorOnActive?: LineColor;
155
+ /** Border color on focus. */
156
+ borderColorOnFocus?: LineColor;
157
+ /** Border color on checked. */
158
+ borderColorOnChecked?: LineColor;
159
+ /** Border color on hover. */
160
+ borderColorOnHover?: LineColor;
161
+ /** Start border color */
162
+ borderStartColor?: LineColor;
163
+ /** End border color */
164
+ borderEndColor?: LineColor;
165
+ /** Top border color */
166
+ borderTopColor?: LineColor;
167
+ /** Bottom border color */
168
+ borderBottomColor?: LineColor;
169
+ /** Shorthand property to the width of an element's border. */
170
+ borderWidth?: BorderWidth;
171
+ /** Sets the width of the top and bottom border of an element. */
172
+ borderVerticalWidth?: BorderWidth;
173
+ /** Sets the width of the start (left) and end (right) border of an element. */
174
+ borderHorizontalWidth?: BorderWidth;
175
+ /** Sets the width of the start (left) border of an element. */
176
+ borderStartWidth?: BorderWidth;
177
+ /** Sets the width of the end (right) border of an element. */
178
+ borderEndWidth?: BorderWidth;
179
+ /** Sets the width of the top border of an element. */
180
+ borderTopWidth?: BorderWidth;
181
+ /** Sets the width of the bottom border of an element. */
182
+ borderBottomWidth?: BorderWidth;
183
+ }
184
+ interface LayoutStyleProps {
185
+ /** Sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
186
+ display?: Display;
187
+ /** Shorthand property which sets the desired behavior when content does not fit in the parent element box (overflows) in the horizontal and/or vertical direction. */
188
+ overflow?: Overflow;
189
+ /** Sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
190
+ overflowX?: Overflow;
191
+ /** sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
192
+ overflowY?: Overflow;
193
+ /** Sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
194
+ position?: Position;
195
+ }
196
+ interface SpacingStyleProps {
197
+ /** Apply inner spacing on all sides. */
198
+ spacing?: SpacingAlias;
199
+ /** Apply inner spacing on the leading and trailing sides. */
200
+ spacingHorizontal?: SpacingAlias;
201
+ /** Apply inner spacing on the top and bottom sides. */
202
+ spacingVertical?: SpacingAlias;
203
+ /** Apply inner spacing on the bottom side. */
204
+ spacingBottom?: SpacingAlias;
205
+ /** Apply inner spacing on the trailing side. */
206
+ spacingEnd?: SpacingAlias;
207
+ /** Apply inner spacing on the leading side. */
208
+ spacingStart?: SpacingAlias;
209
+ /** Apply inner spacing on the top side. */
210
+ spacingTop?: SpacingAlias;
211
+ /** Apply negative outer spacing on all sides. */
212
+ offset?: SpacingAlias;
213
+ /** Apply negative outer spacing on the top and bottom sides. */
214
+ offsetVertical?: SpacingAlias;
215
+ /** Apply negative outer spacing on the leading and trailing sides. */
216
+ offsetHorizontal?: SpacingAlias;
217
+ /** Apply negative outer spacing on the bottom side. */
218
+ offsetBottom?: SpacingAlias;
219
+ /** Apply negative outer spacing on the trailing side. */
220
+ offsetEnd?: SpacingAlias;
221
+ /** Apply negative outer spacing on the leading side. */
222
+ offsetStart?: SpacingAlias;
223
+ /** Apply negative outer spacing on the top side. */
224
+ offsetTop?: SpacingAlias;
225
+ /** Control the horizontal gutters between grid and flexbox items. */
226
+ columnGap?: SpacingAlias;
227
+ /** Control the vertical gutters between grid and flexbox items. */
228
+ rowGap?: SpacingAlias;
229
+ }
230
+ interface FlexStyleProps {
231
+ /** Sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. */
232
+ alignContent?: FlexAlignContent;
233
+ /** Sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. */
234
+ alignItems?: FlexAlignItems;
235
+ /** Overrides a grid or flex item's align-items value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. */
236
+ alignSelf?: FlexAlignSelf;
237
+ /** Sets how a flex item will grow or shrink to fit the space available in its flex container. */
238
+ flex?: Flex;
239
+ /** Sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). */
240
+ flexDirection?: FlexDirection;
241
+ /** Sets the flex grow factor, which specifies how much of the flex container's remaining space should be assigned to the flex item's main size. */
242
+ flexGrow?: FlexGrow;
243
+ /** Sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to flex-shrink. */
244
+ flexShrink?: FlexShrink;
245
+ /** Sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. */
246
+ flexWrap?: FlexWrap;
247
+ /** Defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. */
248
+ justifyContent?: FlexJustifyContent;
249
+ /** Sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with box-sizing. https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis */
250
+ flexBasis?: FlexBasis;
251
+ }
252
+ interface StateStyleProps {
253
+ interactable?: boolean;
254
+ focusable?: boolean;
255
+ }
256
+ interface TextStyleProps {
257
+ /** Color of a Text or Icon element */
258
+ color?: ForegroundColor;
259
+ /** Color of placeholder text */
260
+ placeholderColor?: ForegroundColor;
261
+ /** Font family for the text */
262
+ fontFamily?: TextVariant | FontFamilyGlobalAlias;
263
+ /** Font size of the text */
264
+ fontSize?: TextVariant;
265
+ /** Font weight of the text */
266
+ fontWeight?: TextVariant | FontWeightDescriptive;
267
+ /** Line height of the text */
268
+ lineHeight?: TextVariant;
269
+ /** Text alignment of the text */
270
+ textAlign?: 'center' | 'justify' | 'start' | 'end';
271
+ /** Sets the text transform for the text */
272
+ textTransform?: TextVariant | TextTransform;
273
+ }
274
+ interface BackgroundStyleProps {
275
+ /** Sets the background color. */
276
+ backgroundColor?: BackgroundColor;
277
+ }
278
+ type CustomSizingStyleProps = {
279
+ iconSize?: IconSize;
280
+ avatarSize?: AvatarSize;
281
+ };
282
+ type StyleProps = BackgroundStyleProps & BorderStyleProps & LayoutStyleProps & FlexStyleProps & SpacingStyleProps & TextStyleProps & ImageStyleProps & CustomSizingStyleProps;
283
+ interface UniversalBoxProps extends PropsWithChildren, BackgroundStyleProps, BorderStyleProps, FlexStyleProps, LayoutStyleProps, SpacingStyleProps {
284
+ /**
285
+ * When asChild is set to true, the component's child will be cloned and passed
286
+ * the props and behavior required to make it functional.
287
+ */
288
+ asChild?: boolean;
289
+ }
290
+ interface UniversalStackProps extends Omit<UniversalBoxProps, 'flexDirection'> {
291
+ gap?: SpacingAlias;
292
+ }
293
+ interface UniversalTextProps extends PropsWithChildren, TextStyleProps, UniversalBoxProps {
294
+ /** Style of text. */
295
+ variant?: TextVariant;
296
+ /** Color of the text. */
297
+ color?: ForegroundColor;
298
+ }
299
+ type IconName = IconName$1;
300
+ interface UniversalIconProps extends Omit<TextStyleProps, 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight'>, UniversalBoxProps {
301
+ /** Size of the icon. */
302
+ size: IconSize;
303
+ /** Name of the icon. */
304
+ name: IconName;
305
+ /** Color of the icon. */
306
+ color?: ForegroundColor;
307
+ }
308
+ interface UniversalPressableProps extends UniversalBoxProps {
309
+ onPress?: () => void;
310
+ }
311
+ type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
312
+ type ButtonSize = 's' | 'm' | 'l';
313
+ interface UniversalIconButtonProps {
314
+ /**
315
+ * The variant of the button
316
+ * @default 'accent'
317
+ */
318
+ variant?: ButtonVariant;
319
+ /**
320
+ * The size of the button
321
+ * @default 'm'
322
+ */
323
+ size?: ButtonSize;
324
+ /** The name of the icon to be displayed at the start of the button. */
325
+ name: IconName;
326
+ /** Color for the icon. */
327
+ color: ForegroundColor;
328
+ }
329
+ interface UniversalButtonProps {
330
+ /**
331
+ * The variant of the button
332
+ * @default 'accent'
333
+ */
334
+ variant?: ButtonVariant;
335
+ /**
336
+ * The size of the button
337
+ * @default 'm'
338
+ */
339
+ size?: ButtonSize;
340
+ /** The name of the icon to be displayed at the start of the button. */
341
+ startIcon?: IconName;
342
+ /** The name of the icon to be displayed at the end of the button. */
343
+ endIcon?: IconName;
344
+ /** Indicates whether the button should span the full width of its container. */
345
+ fullWidth?: boolean;
346
+ }
347
+ interface UniversalImageProps extends Omit<UniversalBoxProps, 'width' | 'height'>, ImageStyleProps {
348
+ /** The source URL of the image. */
349
+ src: string;
350
+ /** Provides fallback (alternate) text to display when the image specified by the Image element is not loaded. */
351
+ alt?: string;
352
+ width?: number;
353
+ height?: number;
354
+ }
355
+ interface UniversalAvatarProps extends UniversalImageProps {
356
+ /** The size of the Avatar. */
357
+ size?: AvatarSize;
358
+ /** The shape of the Avatar. */
359
+ shape?: BorderRadius;
360
+ }
361
+ interface UniversalTextInputProps {
362
+ disabled?: boolean;
363
+ required?: boolean;
364
+ backgroundColor?: BackgroundColor;
365
+ borderColor?: LineColor;
366
+ borderWidth?: BorderWidth;
367
+ borderRadius?: BorderRadius;
368
+ color?: ForegroundColor;
369
+ fontSize?: TextVariant;
370
+ placeholderColor?: ForegroundColor;
371
+ spacingVertical?: SpacingAlias;
372
+ spacingHorizontal?: SpacingAlias;
373
+ }
374
+
375
+ export { type CorePalette as $, type AvatarSizeConfig as A, type BackgroundStyleProps as B, type ColorModeForApp as C, type AlwaysPalette as D, type AlwaysPaletteAlias as E, type FlexStyleProps as F, type Animation as G, type AriaAttribute as H, type ImageStyleProps as I, type AvatarShape as J, type AvatarSize as K, type LayoutStyleProps as L, type Modes as M, type BackgroundColor as N, type BackgroundPalette as O, type BackgroundPaletteAlias as P, type BorderRadius as Q, type BorderWidth as R, type ScaleModeForApp as S, type TextStyleProps as T, type UniversalAvatarProps as U, type BoxShadowConfig as V, type ButtonSize as W, type ButtonVariant as X, type ColorModeConfig as Y, type ColorsConfig as Z, type ConfigurableTextProperty as _, type UniversalButtonProps as a, type CorePaletteAlias as a0, type DataAttribute as a1, type Display as a2, type Flex as a3, type FlexAlignContent as a4, type FlexAlignItems as a5, type FlexAlignSelf as a6, type FlexBasis as a7, type FlexDirection as a8, type FlexGrow as a9, type PlatformMode as aA, type Position as aB, type RegionMode as aC, type ScaleConfig as aD, type ScaleModeConfig as aE, type SpacingAlias as aF, type SpectrumColor as aG, type SpectrumConfig as aH, type StateStyleProps as aI, type TextTransform as aJ, type TextVariant as aK, type TransitionDelay as aL, type TransitionDuration as aM, type TransitionTiming as aN, type UniversalTextInputProps as aO, type FlexJustifyContent as aa, type FlexShrink as ab, type FlexWrap as ac, type FontFamilyGlobalAlias as ad, type FontSize as ae, type FontWeightDescriptive as af, type FontWeightNumeric as ag, type ForegroundColor as ah, type ForegroundPalette as ai, type ForegroundPaletteAlias as aj, type HighContrastMode as ak, type Hue as al, type HueStep as am, type IconName as an, type IconSize as ao, type LetterSpacing as ap, type LineClampAlias as aq, type LineColor as ar, type LineHeight as as, type LinePalette as at, type LinePaletteAlias as au, type Overflow as av, type Palette as aw, type PaletteConfig as ax, type PaletteType as ay, type PaletteValue as az, type UniversalPressableProps as b, type UniversalIconButtonProps as c, type UniversalImageProps as d, type UniversalBoxProps as e, type UniversalStackProps as f, type UniversalTextProps as g, type UniversalIconProps as h, type ColorMode as i, type ScaleMode as j, type UniversalTokensConfig as k, type BorderStyleProps as l, type SpacingStyleProps as m, type CustomSizingStyleProps as n, type IconSizeConfig as o, type SpacingConfig as p, type BorderRadiusConfig as q, type BorderWidthConfig as r, type FontFamilyConfig as s, type FontSizeConfig as t, type FontWeightConfig as u, type LineHeightConfig as v, type TextTransformConfig as w, type FontFamilyGlobalConfig as x, type StyleProps as y, alwaysPalette as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"
@@ -44,36 +44,6 @@
44
44
  "default": "./dist/experimental/index.cjs"
45
45
  }
46
46
  },
47
- "./tailwindPlugin": {
48
- "import": {
49
- "types": "./dist/tailwindPlugin.d.ts",
50
- "default": "./dist/tailwindPlugin.js"
51
- },
52
- "require": {
53
- "types": "./dist/tailwindPlugin.d.cts",
54
- "default": "./dist/tailwindPlugin.cjs"
55
- }
56
- },
57
- "./tailwindPurge": {
58
- "import": {
59
- "types": "./dist/tailwindPurge.d.ts",
60
- "default": "./dist/tailwindPurge.js"
61
- },
62
- "require": {
63
- "types": "./dist/tailwindPurge.cjs",
64
- "default": "./dist/tailwindPurge.cjs"
65
- }
66
- },
67
- "./tailwindPurge/utils": {
68
- "import": {
69
- "types": "./dist/tailwindPurge/utils.d.ts",
70
- "default": "./dist/tailwindPurge/utils.js"
71
- },
72
- "require": {
73
- "types": "./dist/tailwindPurge/utils.cjs",
74
- "default": "./dist/tailwindPurge/utils.cjs"
75
- }
76
- },
77
47
  "./fixtures": {
78
48
  "import": {
79
49
  "types": "./dist/fixtures.d.ts",
@@ -91,7 +61,24 @@
91
61
  "types": "./fonts/*.d.ts",
92
62
  "require": "./fonts/*.cjs"
93
63
  },
64
+ "./package.json": "./package.json",
65
+ "./styles/*": "./dist/styles/*",
66
+ "./tailwind/*": {
67
+ "import": {
68
+ "types": "./dist/tailwind/*.d.ts",
69
+ "default": "./dist/tailwind/*.js"
70
+ },
71
+ "require": {
72
+ "types": "./dist/tailwind/*.d.cts",
73
+ "default": "./dist/tailwind/*.cjs"
74
+ }
75
+ },
94
76
  "./tokens": {
77
+ "react-native": {
78
+ "types": "./dist/tokens/index.native.d.ts",
79
+ "require": "./dist/tokens/index.native.cjs",
80
+ "default": "./dist/tokens/index.native.js"
81
+ },
95
82
  "import": {
96
83
  "types": "./dist/tokens/index.d.ts",
97
84
  "default": "./dist/tokens/index.js"
@@ -102,11 +89,6 @@
102
89
  }
103
90
  },
104
91
  "./tokens/parseTokens": {
105
- "react-native": {
106
- "types": "./dist/tokens/parseTokens.native.d.ts",
107
- "require": "./dist/tokens/parseTokens.native.cjs",
108
- "default": "./dist/tokens/parseTokens.native.js"
109
- },
110
92
  "import": {
111
93
  "types": "./dist/tokens/parseTokens.d.ts",
112
94
  "default": "./dist/tokens/parseTokens.js"
@@ -115,9 +97,7 @@
115
97
  "types": "./dist/tokens/parseTokens.d.cts",
116
98
  "default": "./dist/tokens/parseTokens.cjs"
117
99
  }
118
- },
119
- "./styles/*": "./dist/styles/*",
120
- "./package.json": "./package.json"
100
+ }
121
101
  },
122
102
  "scripts": {
123
103
  "build": "bun run ./scripts/prebuild.ts && tsup && bun run ./scripts/postbuild.ts",
@@ -1 +0,0 @@
1
- @font-face{font-family:Yahoo Icons;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-icons.woff2) format("woff2")}@font-face{font-family:Yahoo Sans;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-sans-vf.woff2) format("woff2")}@font-face{font-family:Yahoo Sans Cond;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-sans-condensed-vf.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Display";font-weight:300;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-display-light.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Display";font-weight:400;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-display-regular.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Display";font-weight:700;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-display-bold.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Display";font-weight:800;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-display-extrabold.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Display";font-weight:900;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-display-black.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Text";font-weight:400;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-text-regular.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Text";font-weight:400;font-style:italic;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-text-italic.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Text";font-weight:700;font-style:normal;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-text-bold.woff2) format("woff2")}@font-face{font-family:"Yahoo Serif Text";font-weight:800;font-style:italic;font-display:swap;src:url(https://s.yimg.com/bw/fonts/yahoo-serif-text-bold-italic.woff2) format("woff2")}:root{--uds-font-icons: "Yahoo Icons", "Helvetica Neue", "Helvetica", "Arial", "sans-serif";--uds-font-sans: "Yahoo Sans", "Helvetica Neue", "Helvetica", "Arial", "sans-serif";--uds-font-sans-condensed: "Yahoo Sans Cond", "Helvetica Neue", "Helvetica", "Arial", "sans-serif";--uds-font-serif-display: "Yahoo Serif Display", "Georgia", "Times", "Times New Roman", "serif";--uds-serif-text: "Yahoo Serif Text", "Georgia", "Times", "Times New Roman", "serif";line-height:1.5;font-family:var(--uds-font-sans);font-feature-settings:normal;font-variation-settings:normal}
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1 +0,0 @@
1
- "use strict";var l=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(n,e)=>{for(var i in e)l(n,i,{get:e[i],enumerable:!0})},E=(n,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of x(e))!g.call(n,r)&&r!==i&&l(n,r,{get:()=>e[r],enumerable:!(s=u(e,r))||s.enumerable});return n};var F=n=>E(l({},"__esModule",{value:!0}),n);var C={};m(C,{findReferencesAsJsxElements:()=>J,getJsxElement:()=>D,getJsxElements:()=>f,getReactFunctionDeclaration:()=>d,getUsedPropsInReference:()=>A,isForwardRefExpression:()=>a,isJsxComponent:()=>c});module.exports=F(C);var t=require("ts-morph");function a(n){if(t.Node.isCallExpression(n)){let e=n.getExpression();if(t.Node.isIdentifier(e)&&e.getText()==="forwardRef"||t.Node.isPropertyAccessExpression(e)&&e.getText()==="React.forwardRef")return!0}return!1}function c(n){let e;return t.Node.isVariableDeclaration(n)||t.Node.isFunctionDeclaration(n)||t.Node.isClassDeclaration(n)?e=n.getName():(t.Node.isFunctionExpression(n)||t.Node.isArrowFunction(n))&&(e=n.getFirstAncestorByKind(t.SyntaxKind.VariableDeclaration)?.getName()),e?/[A-Z]/.test(e.charAt(0)):!1}function d(n){if(c(n)){if(t.Node.isFunctionDeclaration(n))return n;if(t.Node.isVariableDeclaration(n)){let e=n.getInitializer();if(e){if(a(e)){let[i]=e.getArguments();if(t.Node.isFunctionDeclaration(i)||t.Node.isFunctionExpression(i)||t.Node.isArrowFunction(i))return i}else if(t.Node.isFunctionDeclaration(e)||t.Node.isFunctionExpression(e)||t.Node.isArrowFunction(e))return e}}}return null}function D(n,e){return f(n).find(i=>i.getFirstDescendantByKindOrThrow(t.SyntaxKind.Identifier).getText()===e)}function f(n){return n.getDescendants().filter(e=>t.Node.isJsxElement(e)||t.Node.isJsxSelfClosingElement(e))}function J(n){let e=[];for(let i of n.findReferencesAsNodes()){let s=i.getFirstAncestor(r=>t.Node.isJsxOpeningElement(r)||t.Node.isJsxSelfClosingElement(r));s&&e.push(s)}return e}var A=n=>n.getAttributes().map(s=>{if(t.Node.isJsxAttribute(s))return[s.getNameNode().getText()];if(t.Node.isJsxSpreadAttribute(s)){let r=s.getExpression().getChildren(),o=r.length===0?s.getExpression():r.pop();return!o||o?.getText()==="props"?[]:o.getType().getProperties().map(p=>p.getName()).flat()}return[]}).flat();0&&(module.exports={findReferencesAsJsxElements,getJsxElement,getJsxElements,getReactFunctionDeclaration,getUsedPropsInReference,isForwardRefExpression,isJsxComponent});
@@ -1,25 +0,0 @@
1
- import { Node, CallExpression, VariableDeclaration, FunctionDeclaration, FunctionExpression, ArrowFunction, ClassDeclaration, JsxElement, JsxSelfClosingElement, Identifier, JsxOpeningElement } from 'ts-morph';
2
-
3
- /** Determines if an expression is using React.forwardRef. */
4
- declare function isForwardRefExpression(node: Node): node is CallExpression;
5
- /** Determines if a node is a JSX component. */
6
- declare function isJsxComponent(node: Node): node is VariableDeclaration | FunctionDeclaration | FunctionExpression | ArrowFunction | ClassDeclaration;
7
- /** Returns a functional component declaration, unwrapping forwardRef if needed. */
8
- declare function getReactFunctionDeclaration(declaration: Node): ArrowFunction | FunctionDeclaration | FunctionExpression | null;
9
- /** Get the first descendant JsxElement based on the identifier. */
10
- declare function getJsxElement(node: Node, name: string): JsxElement | JsxSelfClosingElement | undefined;
11
- /** Get all descendant JsxElement nodes. */
12
- declare function getJsxElements(node: Node): (JsxElement | JsxSelfClosingElement)[];
13
- /**
14
- * Traces component references.
15
- *
16
- * This is similar to `findReferencesAsNodes` but returns JsxSelfClosingElement and JsxElement nodes.
17
- * Note, this currently does not account for cases where the component is used as a prop or is renamed.
18
- */
19
- declare function findReferencesAsJsxElements(identifer: Identifier): (JsxOpeningElement | JsxSelfClosingElement)[];
20
- /**
21
- * Get used props on a reference.
22
- */
23
- declare const getUsedPropsInReference: (reference: JsxOpeningElement | JsxSelfClosingElement) => string[];
24
-
25
- export { findReferencesAsJsxElements, getJsxElement, getJsxElements, getReactFunctionDeclaration, getUsedPropsInReference, isForwardRefExpression, isJsxComponent };
@@ -1,25 +0,0 @@
1
- import { Node, CallExpression, VariableDeclaration, FunctionDeclaration, FunctionExpression, ArrowFunction, ClassDeclaration, JsxElement, JsxSelfClosingElement, Identifier, JsxOpeningElement } from 'ts-morph';
2
-
3
- /** Determines if an expression is using React.forwardRef. */
4
- declare function isForwardRefExpression(node: Node): node is CallExpression;
5
- /** Determines if a node is a JSX component. */
6
- declare function isJsxComponent(node: Node): node is VariableDeclaration | FunctionDeclaration | FunctionExpression | ArrowFunction | ClassDeclaration;
7
- /** Returns a functional component declaration, unwrapping forwardRef if needed. */
8
- declare function getReactFunctionDeclaration(declaration: Node): ArrowFunction | FunctionDeclaration | FunctionExpression | null;
9
- /** Get the first descendant JsxElement based on the identifier. */
10
- declare function getJsxElement(node: Node, name: string): JsxElement | JsxSelfClosingElement | undefined;
11
- /** Get all descendant JsxElement nodes. */
12
- declare function getJsxElements(node: Node): (JsxElement | JsxSelfClosingElement)[];
13
- /**
14
- * Traces component references.
15
- *
16
- * This is similar to `findReferencesAsNodes` but returns JsxSelfClosingElement and JsxElement nodes.
17
- * Note, this currently does not account for cases where the component is used as a prop or is renamed.
18
- */
19
- declare function findReferencesAsJsxElements(identifer: Identifier): (JsxOpeningElement | JsxSelfClosingElement)[];
20
- /**
21
- * Get used props on a reference.
22
- */
23
- declare const getUsedPropsInReference: (reference: JsxOpeningElement | JsxSelfClosingElement) => string[];
24
-
25
- export { findReferencesAsJsxElements, getJsxElement, getJsxElements, getReactFunctionDeclaration, getUsedPropsInReference, isForwardRefExpression, isJsxComponent };
@@ -1 +0,0 @@
1
- import{Node as t,SyntaxKind as l}from"ts-morph";function c(n){if(t.isCallExpression(n)){let e=n.getExpression();if(t.isIdentifier(e)&&e.getText()==="forwardRef"||t.isPropertyAccessExpression(e)&&e.getText()==="React.forwardRef")return!0}return!1}function f(n){let e;return t.isVariableDeclaration(n)||t.isFunctionDeclaration(n)||t.isClassDeclaration(n)?e=n.getName():(t.isFunctionExpression(n)||t.isArrowFunction(n))&&(e=n.getFirstAncestorByKind(l.VariableDeclaration)?.getName()),e?/[A-Z]/.test(e.charAt(0)):!1}function g(n){if(f(n)){if(t.isFunctionDeclaration(n))return n;if(t.isVariableDeclaration(n)){let e=n.getInitializer();if(e){if(c(e)){let[i]=e.getArguments();if(t.isFunctionDeclaration(i)||t.isFunctionExpression(i)||t.isArrowFunction(i))return i}else if(t.isFunctionDeclaration(e)||t.isFunctionExpression(e)||t.isArrowFunction(e))return e}}}return null}function m(n,e){return p(n).find(i=>i.getFirstDescendantByKindOrThrow(l.Identifier).getText()===e)}function p(n){return n.getDescendants().filter(e=>t.isJsxElement(e)||t.isJsxSelfClosingElement(e))}function E(n){let e=[];for(let i of n.findReferencesAsNodes()){let s=i.getFirstAncestor(r=>t.isJsxOpeningElement(r)||t.isJsxSelfClosingElement(r));s&&e.push(s)}return e}var F=n=>n.getAttributes().map(s=>{if(t.isJsxAttribute(s))return[s.getNameNode().getText()];if(t.isJsxSpreadAttribute(s)){let r=s.getExpression().getChildren(),o=r.length===0?s.getExpression():r.pop();return!o||o?.getText()==="props"?[]:o.getType().getProperties().map(a=>a.getName()).flat()}return[]}).flat();export{E as findReferencesAsJsxElements,m as getJsxElement,p as getJsxElements,g as getReactFunctionDeclaration,F as getUsedPropsInReference,c as isForwardRefExpression,f as isJsxComponent};