@deriv-web-design/ui 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +586 -11
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +97 -3
- package/dist/index.d.ts +97 -3
- package/dist/index.js +886 -540
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +884 -540
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens.css +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -55,7 +55,7 @@ interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
55
55
|
declare const Chip: ({ size, label, icon, tag, selected, showFocusRing, disabled, children, className, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
|
|
56
56
|
|
|
57
57
|
type TagSize = "xs" | "sm" | "md" | "lg";
|
|
58
|
-
type TagVariant = "fill" | "outline";
|
|
58
|
+
type TagVariant = "fill" | "outline" | "custom";
|
|
59
59
|
type TagFontWeight = "regular" | "bold";
|
|
60
60
|
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
61
61
|
size?: TagSize;
|
|
@@ -202,13 +202,18 @@ interface CardPrimaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
202
202
|
onLinkClick?: () => void;
|
|
203
203
|
}
|
|
204
204
|
type CardThumbnailType = "video" | "article";
|
|
205
|
+
type CardThumbnailLayout = "vertical" | "horizontal" | "horizontal-reverse";
|
|
205
206
|
interface CardThumbnailProps extends HTMLAttributes<HTMLDivElement> {
|
|
206
207
|
variant: "thumbnail";
|
|
207
208
|
/** Thumbnail variant — "video" shows a play button, "article" shows an optional avatar */
|
|
208
209
|
type?: CardThumbnailType;
|
|
210
|
+
/** Layout direction — "vertical" stacks thumbnail above content, "horizontal" places them side by side */
|
|
211
|
+
layout?: CardThumbnailLayout;
|
|
209
212
|
/** Thumbnail image source */
|
|
210
213
|
thumbnail: string;
|
|
211
214
|
thumbnailAlt?: string;
|
|
215
|
+
/** Hide the thumbnail image */
|
|
216
|
+
hideThumbnail?: boolean;
|
|
212
217
|
/** Card headline */
|
|
213
218
|
title: string;
|
|
214
219
|
/** Card body text */
|
|
@@ -223,6 +228,8 @@ interface CardThumbnailProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
223
228
|
/** Author avatar (article type only) */
|
|
224
229
|
avatar?: string;
|
|
225
230
|
avatarAlt?: string;
|
|
231
|
+
/** Hide the author avatar (default: false) */
|
|
232
|
+
hideAvatar?: boolean;
|
|
226
233
|
}
|
|
227
234
|
interface CardSecondaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
228
235
|
variant: "secondary";
|
|
@@ -240,7 +247,27 @@ interface CardSecondaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
240
247
|
linkText?: string;
|
|
241
248
|
onLinkClick?: () => void;
|
|
242
249
|
}
|
|
243
|
-
|
|
250
|
+
interface CardCategoryArticle {
|
|
251
|
+
/** Article title */
|
|
252
|
+
title: string;
|
|
253
|
+
/** Date or tag label */
|
|
254
|
+
date?: string;
|
|
255
|
+
/** Click handler */
|
|
256
|
+
onClick?: () => void;
|
|
257
|
+
}
|
|
258
|
+
interface CardCategoryProps extends HTMLAttributes<HTMLDivElement> {
|
|
259
|
+
variant: "category";
|
|
260
|
+
/** Category heading */
|
|
261
|
+
title: string;
|
|
262
|
+
/** Hero image for the category */
|
|
263
|
+
thumbnail?: string;
|
|
264
|
+
thumbnailAlt?: string;
|
|
265
|
+
/** Click handler for the title + thumbnail area */
|
|
266
|
+
onHeaderClick?: () => void;
|
|
267
|
+
/** List of articles under this category */
|
|
268
|
+
articles: CardCategoryArticle[];
|
|
269
|
+
}
|
|
270
|
+
type CardProps = CardPrimaryProps | CardThumbnailProps | CardSecondaryProps | CardCategoryProps;
|
|
244
271
|
|
|
245
272
|
declare const Card: (props: CardProps) => react_jsx_runtime.JSX.Element;
|
|
246
273
|
|
|
@@ -1202,4 +1229,71 @@ interface TestimonialProps {
|
|
|
1202
1229
|
|
|
1203
1230
|
declare const Testimonial: ({ title, items, className, ...props }: TestimonialProps) => react_jsx_runtime.JSX.Element | null;
|
|
1204
1231
|
|
|
1205
|
-
|
|
1232
|
+
interface ArticleHeroArticle {
|
|
1233
|
+
/** Article title */
|
|
1234
|
+
title: string;
|
|
1235
|
+
/** Article summary/description */
|
|
1236
|
+
summary?: string;
|
|
1237
|
+
/** Thumbnail image URL */
|
|
1238
|
+
thumbnail?: string;
|
|
1239
|
+
thumbnailAlt?: string;
|
|
1240
|
+
/** Tags displayed below the content (e.g. date, category) */
|
|
1241
|
+
tags?: string[];
|
|
1242
|
+
/** Click handler for the article */
|
|
1243
|
+
onClick?: () => void;
|
|
1244
|
+
}
|
|
1245
|
+
interface ArticleHeroColumn {
|
|
1246
|
+
/** Section label displayed with a horizontal line (e.g. "Today's pick", "Trending stories") */
|
|
1247
|
+
label?: string;
|
|
1248
|
+
/** List of articles in this column */
|
|
1249
|
+
articles: ArticleHeroArticle[];
|
|
1250
|
+
}
|
|
1251
|
+
interface ArticleHeroProps {
|
|
1252
|
+
/** The featured/hero article displayed prominently in the center */
|
|
1253
|
+
featured: ArticleHeroArticle;
|
|
1254
|
+
/** Small cards displayed below the featured article (max 2) */
|
|
1255
|
+
featuredFooter?: ArticleHeroArticle[];
|
|
1256
|
+
/** Left sidebar column */
|
|
1257
|
+
leftColumn: ArticleHeroColumn;
|
|
1258
|
+
/** Right sidebar column */
|
|
1259
|
+
rightColumn: ArticleHeroColumn;
|
|
1260
|
+
/** Additional CSS class */
|
|
1261
|
+
className?: string;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
declare const ArticleHero: ({ featured, featuredFooter, leftColumn, rightColumn, className, }: ArticleHeroProps) => react_jsx_runtime.JSX.Element;
|
|
1265
|
+
|
|
1266
|
+
type ArticleSectionVariant = "featured" | "showcase" | "grid";
|
|
1267
|
+
interface ArticleSectionItem {
|
|
1268
|
+
/** Article title */
|
|
1269
|
+
title: string;
|
|
1270
|
+
/** Article summary/description */
|
|
1271
|
+
summary?: string;
|
|
1272
|
+
/** Thumbnail image URL */
|
|
1273
|
+
thumbnail?: string;
|
|
1274
|
+
thumbnailAlt?: string;
|
|
1275
|
+
/** Tags displayed below the content (e.g. category, date) */
|
|
1276
|
+
tags?: string[];
|
|
1277
|
+
/** Click handler */
|
|
1278
|
+
onClick?: () => void;
|
|
1279
|
+
}
|
|
1280
|
+
interface ArticleSectionProps {
|
|
1281
|
+
/** Layout variant — "featured" shows a large horizontal hero card + text-only grid; "showcase" shows a vertical featured card + horizontal-reverse card columns; "grid" shows a 4-column card grid (horizontal scroll on mobile) */
|
|
1282
|
+
variant?: ArticleSectionVariant;
|
|
1283
|
+
/** Section heading */
|
|
1284
|
+
sectionTitle: string;
|
|
1285
|
+
/** "View all" link text */
|
|
1286
|
+
linkText?: string;
|
|
1287
|
+
/** "View all" link click handler */
|
|
1288
|
+
onLinkClick?: () => void;
|
|
1289
|
+
/** The featured article (large card) — not used in "grid" variant */
|
|
1290
|
+
featured?: ArticleSectionItem;
|
|
1291
|
+
/** List of smaller articles */
|
|
1292
|
+
articles: ArticleSectionItem[];
|
|
1293
|
+
/** Additional CSS class */
|
|
1294
|
+
className?: string;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
declare const ArticleSection: ({ variant, sectionTitle, linkText, onLinkClick, featured, articles, className, }: ArticleSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1298
|
+
|
|
1299
|
+
export { AVATAR_DATA, Accordion, type AccordionProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, ImageBanner, type ImageBannerProps, type LanguageItem, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PeopleGrid, type PeopleGridProps, type PersonItem, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, dayNightTransitionV2Preset };
|
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
55
55
|
declare const Chip: ({ size, label, icon, tag, selected, showFocusRing, disabled, children, className, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
|
|
56
56
|
|
|
57
57
|
type TagSize = "xs" | "sm" | "md" | "lg";
|
|
58
|
-
type TagVariant = "fill" | "outline";
|
|
58
|
+
type TagVariant = "fill" | "outline" | "custom";
|
|
59
59
|
type TagFontWeight = "regular" | "bold";
|
|
60
60
|
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
61
61
|
size?: TagSize;
|
|
@@ -202,13 +202,18 @@ interface CardPrimaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
202
202
|
onLinkClick?: () => void;
|
|
203
203
|
}
|
|
204
204
|
type CardThumbnailType = "video" | "article";
|
|
205
|
+
type CardThumbnailLayout = "vertical" | "horizontal" | "horizontal-reverse";
|
|
205
206
|
interface CardThumbnailProps extends HTMLAttributes<HTMLDivElement> {
|
|
206
207
|
variant: "thumbnail";
|
|
207
208
|
/** Thumbnail variant — "video" shows a play button, "article" shows an optional avatar */
|
|
208
209
|
type?: CardThumbnailType;
|
|
210
|
+
/** Layout direction — "vertical" stacks thumbnail above content, "horizontal" places them side by side */
|
|
211
|
+
layout?: CardThumbnailLayout;
|
|
209
212
|
/** Thumbnail image source */
|
|
210
213
|
thumbnail: string;
|
|
211
214
|
thumbnailAlt?: string;
|
|
215
|
+
/** Hide the thumbnail image */
|
|
216
|
+
hideThumbnail?: boolean;
|
|
212
217
|
/** Card headline */
|
|
213
218
|
title: string;
|
|
214
219
|
/** Card body text */
|
|
@@ -223,6 +228,8 @@ interface CardThumbnailProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
223
228
|
/** Author avatar (article type only) */
|
|
224
229
|
avatar?: string;
|
|
225
230
|
avatarAlt?: string;
|
|
231
|
+
/** Hide the author avatar (default: false) */
|
|
232
|
+
hideAvatar?: boolean;
|
|
226
233
|
}
|
|
227
234
|
interface CardSecondaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
228
235
|
variant: "secondary";
|
|
@@ -240,7 +247,27 @@ interface CardSecondaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
240
247
|
linkText?: string;
|
|
241
248
|
onLinkClick?: () => void;
|
|
242
249
|
}
|
|
243
|
-
|
|
250
|
+
interface CardCategoryArticle {
|
|
251
|
+
/** Article title */
|
|
252
|
+
title: string;
|
|
253
|
+
/** Date or tag label */
|
|
254
|
+
date?: string;
|
|
255
|
+
/** Click handler */
|
|
256
|
+
onClick?: () => void;
|
|
257
|
+
}
|
|
258
|
+
interface CardCategoryProps extends HTMLAttributes<HTMLDivElement> {
|
|
259
|
+
variant: "category";
|
|
260
|
+
/** Category heading */
|
|
261
|
+
title: string;
|
|
262
|
+
/** Hero image for the category */
|
|
263
|
+
thumbnail?: string;
|
|
264
|
+
thumbnailAlt?: string;
|
|
265
|
+
/** Click handler for the title + thumbnail area */
|
|
266
|
+
onHeaderClick?: () => void;
|
|
267
|
+
/** List of articles under this category */
|
|
268
|
+
articles: CardCategoryArticle[];
|
|
269
|
+
}
|
|
270
|
+
type CardProps = CardPrimaryProps | CardThumbnailProps | CardSecondaryProps | CardCategoryProps;
|
|
244
271
|
|
|
245
272
|
declare const Card: (props: CardProps) => react_jsx_runtime.JSX.Element;
|
|
246
273
|
|
|
@@ -1202,4 +1229,71 @@ interface TestimonialProps {
|
|
|
1202
1229
|
|
|
1203
1230
|
declare const Testimonial: ({ title, items, className, ...props }: TestimonialProps) => react_jsx_runtime.JSX.Element | null;
|
|
1204
1231
|
|
|
1205
|
-
|
|
1232
|
+
interface ArticleHeroArticle {
|
|
1233
|
+
/** Article title */
|
|
1234
|
+
title: string;
|
|
1235
|
+
/** Article summary/description */
|
|
1236
|
+
summary?: string;
|
|
1237
|
+
/** Thumbnail image URL */
|
|
1238
|
+
thumbnail?: string;
|
|
1239
|
+
thumbnailAlt?: string;
|
|
1240
|
+
/** Tags displayed below the content (e.g. date, category) */
|
|
1241
|
+
tags?: string[];
|
|
1242
|
+
/** Click handler for the article */
|
|
1243
|
+
onClick?: () => void;
|
|
1244
|
+
}
|
|
1245
|
+
interface ArticleHeroColumn {
|
|
1246
|
+
/** Section label displayed with a horizontal line (e.g. "Today's pick", "Trending stories") */
|
|
1247
|
+
label?: string;
|
|
1248
|
+
/** List of articles in this column */
|
|
1249
|
+
articles: ArticleHeroArticle[];
|
|
1250
|
+
}
|
|
1251
|
+
interface ArticleHeroProps {
|
|
1252
|
+
/** The featured/hero article displayed prominently in the center */
|
|
1253
|
+
featured: ArticleHeroArticle;
|
|
1254
|
+
/** Small cards displayed below the featured article (max 2) */
|
|
1255
|
+
featuredFooter?: ArticleHeroArticle[];
|
|
1256
|
+
/** Left sidebar column */
|
|
1257
|
+
leftColumn: ArticleHeroColumn;
|
|
1258
|
+
/** Right sidebar column */
|
|
1259
|
+
rightColumn: ArticleHeroColumn;
|
|
1260
|
+
/** Additional CSS class */
|
|
1261
|
+
className?: string;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
declare const ArticleHero: ({ featured, featuredFooter, leftColumn, rightColumn, className, }: ArticleHeroProps) => react_jsx_runtime.JSX.Element;
|
|
1265
|
+
|
|
1266
|
+
type ArticleSectionVariant = "featured" | "showcase" | "grid";
|
|
1267
|
+
interface ArticleSectionItem {
|
|
1268
|
+
/** Article title */
|
|
1269
|
+
title: string;
|
|
1270
|
+
/** Article summary/description */
|
|
1271
|
+
summary?: string;
|
|
1272
|
+
/** Thumbnail image URL */
|
|
1273
|
+
thumbnail?: string;
|
|
1274
|
+
thumbnailAlt?: string;
|
|
1275
|
+
/** Tags displayed below the content (e.g. category, date) */
|
|
1276
|
+
tags?: string[];
|
|
1277
|
+
/** Click handler */
|
|
1278
|
+
onClick?: () => void;
|
|
1279
|
+
}
|
|
1280
|
+
interface ArticleSectionProps {
|
|
1281
|
+
/** Layout variant — "featured" shows a large horizontal hero card + text-only grid; "showcase" shows a vertical featured card + horizontal-reverse card columns; "grid" shows a 4-column card grid (horizontal scroll on mobile) */
|
|
1282
|
+
variant?: ArticleSectionVariant;
|
|
1283
|
+
/** Section heading */
|
|
1284
|
+
sectionTitle: string;
|
|
1285
|
+
/** "View all" link text */
|
|
1286
|
+
linkText?: string;
|
|
1287
|
+
/** "View all" link click handler */
|
|
1288
|
+
onLinkClick?: () => void;
|
|
1289
|
+
/** The featured article (large card) — not used in "grid" variant */
|
|
1290
|
+
featured?: ArticleSectionItem;
|
|
1291
|
+
/** List of smaller articles */
|
|
1292
|
+
articles: ArticleSectionItem[];
|
|
1293
|
+
/** Additional CSS class */
|
|
1294
|
+
className?: string;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
declare const ArticleSection: ({ variant, sectionTitle, linkText, onLinkClick, featured, articles, className, }: ArticleSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1298
|
+
|
|
1299
|
+
export { AVATAR_DATA, Accordion, type AccordionProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, ImageBanner, type ImageBannerProps, type LanguageItem, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PeopleGrid, type PeopleGridProps, type PersonItem, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, dayNightTransitionV2Preset };
|