@yahoo/uds 0.4.2 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/preload.ts +1 -1
- package/cli/utils/purgeCSS.ts +2 -5
- package/dist/{Image.native-CddvOupj.d.cts → Image.native-CfDCpWe_.d.cts} +1 -1
- package/dist/{Image.native-BJfkUDnq.d.ts → Image.native-nwk5tr_f.d.ts} +1 -1
- package/dist/{VStack-CjOrFgxd.d.ts → VStack-Bj6PfbK5.d.ts} +1 -1
- package/dist/{VStack-CMGd5AX1.d.cts → VStack-D-py89Ge.d.cts} +1 -1
- 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/experimental/index.native.cjs +1 -1
- package/dist/experimental/index.native.d.cts +3 -3
- package/dist/experimental/index.native.d.ts +3 -3
- package/dist/experimental/index.native.js +1 -1
- package/dist/fixtures.cjs +60 -124
- package/dist/fixtures.d.ts +3 -10
- package/dist/fixtures.js +59 -123
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +58 -25
- package/dist/index.d.ts +58 -25
- package/dist/index.js +1 -1
- package/dist/{index.native-DG8RsS88.d.cts → index.native-A2gCijBH.d.cts} +1 -1
- package/dist/{index.native-LymI5azd.d.ts → index.native-BLJdXZHY.d.ts} +1 -1
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.d.cts +72 -10
- package/dist/index.native.d.ts +72 -10
- package/dist/index.native.js +1 -1
- package/dist/styles/globals.css +1 -0
- package/dist/tailwind/plugin.cjs +1 -0
- package/dist/{tailwindPlugin.d.ts → tailwind/plugin.d.cts} +1 -1
- package/dist/{tailwindPlugin.d.cts → tailwind/plugin.d.ts} +1 -1
- package/dist/tailwind/plugin.js +1 -0
- package/dist/tailwind/purger.cjs +4 -0
- package/dist/tailwind/purger.js +4 -0
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +15 -4
- package/dist/tokens/index.d.ts +15 -4
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/index.native.cjs +1 -1
- package/dist/tokens/index.native.d.cts +2 -2
- package/dist/tokens/index.native.d.ts +2 -2
- package/dist/tokens/index.native.js +1 -1
- package/dist/tokens/parseTokens.cjs +1 -1
- package/dist/tokens/parseTokens.d.cts +1 -2
- package/dist/tokens/parseTokens.d.ts +1 -2
- package/dist/tokens/parseTokens.js +1 -1
- package/dist/{types-D-ttCAsE.d.cts → types-Diou6f1Q.d.cts} +2 -3
- package/dist/{types-D-ttCAsE.d.ts → types-Diou6f1Q.d.ts} +2 -3
- package/dist/types-Dk8fLx7L.d.cts +374 -0
- package/dist/types-Dk8fLx7L.d.ts +374 -0
- package/package.json +19 -39
- package/dist/styles/fonts.css +0 -1
- package/dist/styles/fonts.d.cts +0 -2
- package/dist/styles/fonts.d.ts +0 -2
- package/dist/styles/globals.d.cts +0 -2
- package/dist/styles/globals.d.ts +0 -2
- package/dist/styles/toast.d.cts +0 -2
- package/dist/styles/toast.d.ts +0 -2
- package/dist/tailwindPlugin.cjs +0 -1
- package/dist/tailwindPlugin.js +0 -1
- package/dist/tailwindPurge.cjs +0 -4
- package/dist/tailwindPurge.js +0 -4
- package/dist/tokens/parseTokens.native.cjs +0 -1
- package/dist/tokens/parseTokens.native.d.cts +0 -399
- package/dist/tokens/parseTokens.native.d.ts +0 -399
- package/dist/tokens/parseTokens.native.js +0 -1
- package/dist/types-FO65RM-W.d.cts +0 -38
- package/dist/types-FO65RM-W.d.ts +0 -38
- /package/dist/{tailwindPurge.d.cts → tailwind/purger.d.cts} +0 -0
- /package/dist/{tailwindPurge.d.ts → tailwind/purger.d.ts} +0 -0
- /package/dist/{tailwindPurge/utils.cjs → tailwind/tsMorph.cjs} +0 -0
- /package/dist/{tailwindPurge/utils.d.cts → tailwind/tsMorph.d.cts} +0 -0
- /package/dist/{tailwindPurge/utils.d.ts → tailwind/tsMorph.d.ts} +0 -0
- /package/dist/{tailwindPurge/utils.js → tailwind/tsMorph.js} +0 -0
@@ -0,0 +1,374 @@
|
|
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 = '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16' | '20' | '24' | '28' | '32' | '36' | '40' | '44' | '48' | '52' | '56' | '60' | '64' | '72' | '80' | '96';
|
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
|
+
borderRadius: BorderRadiusConfig;
|
90
|
+
borderWidth: BorderWidthConfig;
|
91
|
+
fontFamily: FontFamilyConfig;
|
92
|
+
fontSize: FontSizeConfig;
|
93
|
+
fontWeight: FontWeightConfig;
|
94
|
+
lineHeight: LineHeightConfig;
|
95
|
+
textTransform: TextTransformConfig;
|
96
|
+
};
|
97
|
+
type ScaleModeConfig = Record<ScaleMode, ScaleConfig>;
|
98
|
+
type UniversalTokensConfig = {
|
99
|
+
colorMode: ColorModeConfig;
|
100
|
+
scaleMode: ScaleModeConfig;
|
101
|
+
fontFamily: FontFamilyGlobalConfig;
|
102
|
+
};
|
103
|
+
type PlatformMode = 'web' | 'ios' | 'android';
|
104
|
+
type ColorMode = 'light' | 'dark';
|
105
|
+
type ColorModeForApp = ColorMode | 'system';
|
106
|
+
type ScaleMode = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge';
|
107
|
+
type ScaleModeForApp = ScaleMode | 'system';
|
108
|
+
type HighContrastMode = boolean;
|
109
|
+
type RegionMode = '🇺🇸 US' | '🇩🇪 DE' | '🇫🇷 FR' | '🇨🇳 CN';
|
110
|
+
interface Modes {
|
111
|
+
colorMode: ColorMode;
|
112
|
+
scaleMode: ScaleMode;
|
113
|
+
}
|
114
|
+
type Animation = 'none' | 'spin' | 'ping' | 'pulse' | 'bounce' | 'accordion-down' | 'accordion-up';
|
115
|
+
type TransitionDelay = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
|
116
|
+
type TransitionDuration = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
|
117
|
+
type TransitionTiming = 'linear' | 'in' | 'out' | 'in-out';
|
118
|
+
type AriaAttribute = 'busy' | 'checked' | 'disabled' | 'expanded' | 'hidden' | 'pressed' | 'readonly' | 'required' | 'selected' | 'invalid';
|
119
|
+
type DataAttribute = 'active' | 'active-item' | 'autofill' | 'backdrop' | 'enter' | 'leave' | 'focus-visible';
|
120
|
+
type Flex = '1' | 'auto' | 'initial' | 'none';
|
121
|
+
type FlexGrow = '0' | '1' | '2' | '3';
|
122
|
+
type FlexShrink = '0' | '1';
|
123
|
+
type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around';
|
124
|
+
type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
125
|
+
type FlexAlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
126
|
+
type FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
127
|
+
type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
|
128
|
+
type FlexJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
129
|
+
type FlexBasis = 'min-content';
|
130
|
+
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';
|
131
|
+
type Overflow = 'auto' | 'hidden' | 'clip' | 'visible' | 'scroll';
|
132
|
+
type Position = 'static' | 'fixed' | 'absolute' | 'relative' | 'sticky';
|
133
|
+
type ImageStyleProps = {
|
134
|
+
/**
|
135
|
+
* Determines how the image should be resized to fit its container.
|
136
|
+
*/
|
137
|
+
contentFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
138
|
+
};
|
139
|
+
interface BorderStyleProps {
|
140
|
+
/** Add a border radius to all corners of the box. */
|
141
|
+
borderRadius?: BorderRadius;
|
142
|
+
/** Add a border radius to top left corner of the box. */
|
143
|
+
borderTopStartRadius?: BorderRadius;
|
144
|
+
/** Add a border radius to top right corner of the box. */
|
145
|
+
borderTopEndRadius?: BorderRadius;
|
146
|
+
/** Add a border radius to bottom left corner of the box. */
|
147
|
+
borderBottomStartRadius?: BorderRadius;
|
148
|
+
/** Add a border radius to bottom right corner of the box. */
|
149
|
+
borderBottomEndRadius?: BorderRadius;
|
150
|
+
/** Adds a custom border color from the palette */
|
151
|
+
borderColor?: LineColor;
|
152
|
+
/** Border color on active. */
|
153
|
+
borderColorOnActive?: LineColor;
|
154
|
+
/** Border color on focus. */
|
155
|
+
borderColorOnFocus?: LineColor;
|
156
|
+
/** Border color on checked. */
|
157
|
+
borderColorOnChecked?: LineColor;
|
158
|
+
/** Border color on hover. */
|
159
|
+
borderColorOnHover?: LineColor;
|
160
|
+
/** Start border color */
|
161
|
+
borderStartColor?: LineColor;
|
162
|
+
/** End border color */
|
163
|
+
borderEndColor?: LineColor;
|
164
|
+
/** Top border color */
|
165
|
+
borderTopColor?: LineColor;
|
166
|
+
/** Bottom border color */
|
167
|
+
borderBottomColor?: LineColor;
|
168
|
+
/** Shorthand property to the width of an element's border. */
|
169
|
+
borderWidth?: BorderWidth;
|
170
|
+
/** Sets the width of the top and bottom border of an element. */
|
171
|
+
borderVerticalWidth?: BorderWidth;
|
172
|
+
/** Sets the width of the start (left) and end (right) border of an element. */
|
173
|
+
borderHorizontalWidth?: BorderWidth;
|
174
|
+
/** Sets the width of the start (left) border of an element. */
|
175
|
+
borderStartWidth?: BorderWidth;
|
176
|
+
/** Sets the width of the end (right) border of an element. */
|
177
|
+
borderEndWidth?: BorderWidth;
|
178
|
+
/** Sets the width of the top border of an element. */
|
179
|
+
borderTopWidth?: BorderWidth;
|
180
|
+
/** Sets the width of the bottom border of an element. */
|
181
|
+
borderBottomWidth?: BorderWidth;
|
182
|
+
}
|
183
|
+
interface LayoutStyleProps {
|
184
|
+
/** 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. */
|
185
|
+
display?: Display;
|
186
|
+
/** 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. */
|
187
|
+
overflow?: Overflow;
|
188
|
+
/** 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. */
|
189
|
+
overflowX?: Overflow;
|
190
|
+
/** 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. */
|
191
|
+
overflowY?: Overflow;
|
192
|
+
/** Sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
|
193
|
+
position?: Position;
|
194
|
+
}
|
195
|
+
interface SpacingStyleProps {
|
196
|
+
/** Apply inner spacing on all sides. */
|
197
|
+
spacing?: SpacingAlias;
|
198
|
+
/** Apply inner spacing on the leading and trailing sides. */
|
199
|
+
spacingHorizontal?: SpacingAlias;
|
200
|
+
/** Apply inner spacing on the top and bottom sides. */
|
201
|
+
spacingVertical?: SpacingAlias;
|
202
|
+
/** Apply inner spacing on the bottom side. */
|
203
|
+
spacingBottom?: SpacingAlias;
|
204
|
+
/** Apply inner spacing on the trailing side. */
|
205
|
+
spacingEnd?: SpacingAlias;
|
206
|
+
/** Apply inner spacing on the leading side. */
|
207
|
+
spacingStart?: SpacingAlias;
|
208
|
+
/** Apply inner spacing on the top side. */
|
209
|
+
spacingTop?: SpacingAlias;
|
210
|
+
/** Apply negative outer spacing on all sides. */
|
211
|
+
offset?: SpacingAlias;
|
212
|
+
/** Apply negative outer spacing on the top and bottom sides. */
|
213
|
+
offsetVertical?: SpacingAlias;
|
214
|
+
/** Apply negative outer spacing on the leading and trailing sides. */
|
215
|
+
offsetHorizontal?: SpacingAlias;
|
216
|
+
/** Apply negative outer spacing on the bottom side. */
|
217
|
+
offsetBottom?: SpacingAlias;
|
218
|
+
/** Apply negative outer spacing on the trailing side. */
|
219
|
+
offsetEnd?: SpacingAlias;
|
220
|
+
/** Apply negative outer spacing on the leading side. */
|
221
|
+
offsetStart?: SpacingAlias;
|
222
|
+
/** Apply negative outer spacing on the top side. */
|
223
|
+
offsetTop?: SpacingAlias;
|
224
|
+
/** Control the horizontal gutters between grid and flexbox items. */
|
225
|
+
columnGap?: SpacingAlias;
|
226
|
+
/** Control the vertical gutters between grid and flexbox items. */
|
227
|
+
rowGap?: SpacingAlias;
|
228
|
+
}
|
229
|
+
interface FlexStyleProps {
|
230
|
+
/** Sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. */
|
231
|
+
alignContent?: FlexAlignContent;
|
232
|
+
/** 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. */
|
233
|
+
alignItems?: FlexAlignItems;
|
234
|
+
/** 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. */
|
235
|
+
alignSelf?: FlexAlignSelf;
|
236
|
+
/** Sets how a flex item will grow or shrink to fit the space available in its flex container. */
|
237
|
+
flex?: Flex;
|
238
|
+
/** Sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). */
|
239
|
+
flexDirection?: FlexDirection;
|
240
|
+
/** 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. */
|
241
|
+
flexGrow?: FlexGrow;
|
242
|
+
/** 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. */
|
243
|
+
flexShrink?: FlexShrink;
|
244
|
+
/** 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. */
|
245
|
+
flexWrap?: FlexWrap;
|
246
|
+
/** 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. */
|
247
|
+
justifyContent?: FlexJustifyContent;
|
248
|
+
/** 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 */
|
249
|
+
flexBasis?: FlexBasis;
|
250
|
+
}
|
251
|
+
interface StateStyleProps {
|
252
|
+
interactable?: boolean;
|
253
|
+
focusable?: boolean;
|
254
|
+
}
|
255
|
+
interface TextStyleProps {
|
256
|
+
/** Color of a Text or Icon element */
|
257
|
+
color?: ForegroundColor;
|
258
|
+
/** Color of placeholder text */
|
259
|
+
placeholderColor?: ForegroundColor;
|
260
|
+
/** Font family for the text */
|
261
|
+
fontFamily?: TextVariant | FontFamilyGlobalAlias;
|
262
|
+
/** Font size of the text */
|
263
|
+
fontSize?: TextVariant;
|
264
|
+
/** Font weight of the text */
|
265
|
+
fontWeight?: TextVariant | FontWeightDescriptive;
|
266
|
+
/** Line height of the text */
|
267
|
+
lineHeight?: TextVariant;
|
268
|
+
/** Text alignment of the text */
|
269
|
+
textAlign?: 'center' | 'justify' | 'start' | 'end';
|
270
|
+
/** Sets the text transform for the text */
|
271
|
+
textTransform?: TextVariant | TextTransform;
|
272
|
+
}
|
273
|
+
interface BackgroundStyleProps {
|
274
|
+
/** Sets the background color. */
|
275
|
+
backgroundColor?: BackgroundColor;
|
276
|
+
}
|
277
|
+
type CustomSizingStyleProps = {
|
278
|
+
iconSize?: IconSize;
|
279
|
+
avatarSize?: AvatarSize;
|
280
|
+
};
|
281
|
+
type StyleProps = BackgroundStyleProps & BorderStyleProps & LayoutStyleProps & FlexStyleProps & SpacingStyleProps & TextStyleProps & ImageStyleProps & CustomSizingStyleProps;
|
282
|
+
interface UniversalBoxProps extends PropsWithChildren, BackgroundStyleProps, BorderStyleProps, FlexStyleProps, LayoutStyleProps, SpacingStyleProps {
|
283
|
+
/**
|
284
|
+
* When asChild is set to true, the component's child will be cloned and passed
|
285
|
+
* the props and behavior required to make it functional.
|
286
|
+
*/
|
287
|
+
asChild?: boolean;
|
288
|
+
}
|
289
|
+
interface UniversalStackProps extends Omit<UniversalBoxProps, 'flexDirection'> {
|
290
|
+
gap?: SpacingAlias;
|
291
|
+
}
|
292
|
+
interface UniversalTextProps extends PropsWithChildren, TextStyleProps, UniversalBoxProps {
|
293
|
+
/** Style of text. */
|
294
|
+
variant?: TextVariant;
|
295
|
+
/** Color of the text. */
|
296
|
+
color?: ForegroundColor;
|
297
|
+
}
|
298
|
+
type IconName = IconName$1;
|
299
|
+
interface UniversalIconProps extends Omit<TextStyleProps, 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight'>, UniversalBoxProps {
|
300
|
+
/** Size of the icon. */
|
301
|
+
size: IconSize;
|
302
|
+
/** Name of the icon. */
|
303
|
+
name: IconName;
|
304
|
+
/** Color of the icon. */
|
305
|
+
color?: ForegroundColor;
|
306
|
+
}
|
307
|
+
interface UniversalPressableProps extends UniversalBoxProps {
|
308
|
+
onPress?: () => void;
|
309
|
+
}
|
310
|
+
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
311
|
+
type ButtonSize = 's' | 'm' | 'l';
|
312
|
+
interface UniversalIconButtonProps {
|
313
|
+
/**
|
314
|
+
* The variant of the button
|
315
|
+
* @default 'accent'
|
316
|
+
*/
|
317
|
+
variant?: ButtonVariant;
|
318
|
+
/**
|
319
|
+
* The size of the button
|
320
|
+
* @default 'm'
|
321
|
+
*/
|
322
|
+
size?: ButtonSize;
|
323
|
+
/** The name of the icon to be displayed at the start of the button. */
|
324
|
+
name: IconName;
|
325
|
+
/** Color for the icon. */
|
326
|
+
color: ForegroundColor;
|
327
|
+
}
|
328
|
+
interface UniversalButtonProps {
|
329
|
+
/**
|
330
|
+
* The variant of the button
|
331
|
+
* @default 'accent'
|
332
|
+
*/
|
333
|
+
variant?: ButtonVariant;
|
334
|
+
/**
|
335
|
+
* The size of the button
|
336
|
+
* @default 'm'
|
337
|
+
*/
|
338
|
+
size?: ButtonSize;
|
339
|
+
/** The name of the icon to be displayed at the start of the button. */
|
340
|
+
startIcon?: IconName;
|
341
|
+
/** The name of the icon to be displayed at the end of the button. */
|
342
|
+
endIcon?: IconName;
|
343
|
+
/** Indicates whether the button should span the full width of its container. */
|
344
|
+
fullWidth?: boolean;
|
345
|
+
}
|
346
|
+
interface UniversalImageProps extends Omit<UniversalBoxProps, 'width' | 'height'>, ImageStyleProps {
|
347
|
+
/** The source URL of the image. */
|
348
|
+
src: string;
|
349
|
+
/** Provides fallback (alternate) text to display when the image specified by the Image element is not loaded. */
|
350
|
+
alt?: string;
|
351
|
+
width?: number;
|
352
|
+
height?: number;
|
353
|
+
}
|
354
|
+
interface UniversalAvatarProps extends UniversalImageProps {
|
355
|
+
/** The size of the Avatar. */
|
356
|
+
size?: AvatarSize;
|
357
|
+
/** The shape of the Avatar. */
|
358
|
+
shape?: BorderRadius;
|
359
|
+
}
|
360
|
+
interface UniversalTextInputProps {
|
361
|
+
disabled?: boolean;
|
362
|
+
required?: boolean;
|
363
|
+
backgroundColor?: BackgroundColor;
|
364
|
+
borderColor?: LineColor;
|
365
|
+
borderWidth?: BorderWidth;
|
366
|
+
borderRadius?: BorderRadius;
|
367
|
+
color?: ForegroundColor;
|
368
|
+
fontSize?: TextVariant;
|
369
|
+
placeholderColor?: ForegroundColor;
|
370
|
+
spacingVertical?: SpacingAlias;
|
371
|
+
spacingHorizontal?: SpacingAlias;
|
372
|
+
}
|
373
|
+
|
374
|
+
export { type CorePaletteAlias as $, type AvatarSizeConfig as A, type BackgroundStyleProps as B, type ColorModeForApp as C, type AlwaysPaletteAlias as D, type Animation as E, type FlexStyleProps as F, type AriaAttribute as G, type AvatarShape as H, type ImageStyleProps as I, type AvatarSize as J, type BackgroundColor as K, type LayoutStyleProps as L, type Modes as M, type BackgroundPalette as N, type BackgroundPaletteAlias as O, type BorderRadius as P, type BorderWidth as Q, type BoxShadowConfig as R, type ScaleModeForApp as S, type TextStyleProps as T, type UniversalAvatarProps as U, type ButtonSize as V, type ButtonVariant as W, type ColorModeConfig as X, type ColorsConfig as Y, type ConfigurableTextProperty as Z, type CorePalette as _, type UniversalButtonProps as a, type DataAttribute as a0, type Display as a1, type Flex as a2, type FlexAlignContent as a3, type FlexAlignItems as a4, type FlexAlignSelf as a5, type FlexBasis as a6, type FlexDirection as a7, type FlexGrow as a8, type FlexJustifyContent as a9, type Position as aA, type RegionMode as aB, type ScaleConfig as aC, type ScaleModeConfig as aD, type SpacingAlias as aE, type SpacingConfig 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 FlexShrink as aa, type FlexWrap as ab, type FontFamilyGlobalAlias as ac, type FontSize as ad, type FontWeightDescriptive as ae, type FontWeightNumeric as af, type ForegroundColor as ag, type ForegroundPalette as ah, type ForegroundPaletteAlias as ai, type HighContrastMode as aj, type Hue as ak, type HueStep as al, type IconName as am, type IconSize as an, type LetterSpacing as ao, type LineClampAlias as ap, type LineColor as aq, type LineHeight as ar, type LinePalette as as, type LinePaletteAlias as at, type Overflow as au, type Palette as av, type PaletteConfig as aw, type PaletteType as ax, type PaletteValue as ay, type PlatformMode 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 BorderRadiusConfig as p, type BorderWidthConfig as q, type FontFamilyConfig as r, type FontSizeConfig as s, type FontWeightConfig as t, type LineHeightConfig as u, type TextTransformConfig as v, type FontFamilyGlobalConfig as w, type StyleProps as x, alwaysPalette as y, type AlwaysPalette as z };
|