@orangesk/orange-design-system 3.1.0 → 3.3.0

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.
Files changed (135) hide show
  1. package/build/components/Avatar/style.css +2 -0
  2. package/build/components/Avatar/style.css.map +1 -0
  3. package/build/components/BodyBanner/style.css +1 -1
  4. package/build/components/BodyBanner/style.css.map +1 -1
  5. package/build/components/Carousel/style.css +1 -1
  6. package/build/components/Carousel/style.css.map +1 -1
  7. package/build/components/Countdown/style.css +2 -0
  8. package/build/components/Countdown/style.css.map +1 -0
  9. package/build/components/DocumentationSidebar/style.css +1 -1
  10. package/build/components/DocumentationSidebar/style.css.map +1 -1
  11. package/build/components/Footer/style.css +1 -1
  12. package/build/components/Footer/style.css.map +1 -1
  13. package/build/components/List/style.css +1 -1
  14. package/build/components/List/style.css.map +1 -1
  15. package/build/components/Megamenu/style.css +1 -1
  16. package/build/components/Megamenu/style.css.map +1 -1
  17. package/build/components/Pill/style.css +1 -1
  18. package/build/components/Pill/style.css.map +1 -1
  19. package/build/components/Preview/style.css +1 -1
  20. package/build/components/Preview/style.css.map +1 -1
  21. package/build/components/StarRating/style.css +2 -0
  22. package/build/components/StarRating/style.css.map +1 -0
  23. package/build/components/index.js +1 -1
  24. package/build/components/index.js.map +1 -1
  25. package/build/components/tsconfig.tsbuildinfo +1 -1
  26. package/build/components/types/index.d.ts +65 -15
  27. package/build/components/types/src/components/Avatar/Avatar.d.ts +7 -0
  28. package/build/components/types/src/components/Avatar/index.d.ts +2 -0
  29. package/build/components/types/src/components/Carousel/Carousel.d.ts +10 -3
  30. package/build/components/types/src/components/Carousel/constants.d.ts +2 -0
  31. package/build/components/types/src/components/Countdown/Countdown.d.ts +10 -0
  32. package/build/components/types/src/components/Countdown/Countdown.react.d.ts +8 -0
  33. package/build/components/types/src/components/Countdown/Countdown.shared.d.ts +54 -0
  34. package/build/components/types/src/components/Countdown/Countdown.static.d.ts +21 -0
  35. package/build/components/types/src/components/Countdown/CountdownTag.d.ts +9 -0
  36. package/build/components/types/src/components/Countdown/CountdownTag.static.d.ts +16 -0
  37. package/build/components/types/src/components/Countdown/constants.d.ts +28 -0
  38. package/build/components/types/src/components/Countdown/index.d.ts +3 -0
  39. package/build/components/types/src/components/DocumentationSidebar/DocumentationSidebar.d.ts +1 -0
  40. package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +1 -0
  41. package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +5 -1
  42. package/build/components/types/src/components/StarRating/StarRating.d.ts +9 -0
  43. package/build/components/types/src/components/StarRating/index.d.ts +1 -0
  44. package/build/components/types/src/components/index.d.ts +5 -3
  45. package/build/components/types/src/scripts/index.d.ts +10 -0
  46. package/build/components/types/src/styles/export/color.d.ts +2 -0
  47. package/build/lib/base.css +1 -1
  48. package/build/lib/base.css.map +1 -1
  49. package/build/lib/components.css +1 -1
  50. package/build/lib/components.css.map +1 -1
  51. package/build/lib/footer.css +1 -1
  52. package/build/lib/footer.css.map +1 -1
  53. package/build/lib/megamenu.css +1 -1
  54. package/build/lib/megamenu.css.map +1 -1
  55. package/build/lib/scripts.js +1 -1
  56. package/build/lib/scripts.js.map +1 -1
  57. package/build/lib/style.css +1 -1
  58. package/build/lib/style.css.map +1 -1
  59. package/build/lib/tsconfig.tsbuildinfo +1 -1
  60. package/build/lib/utilities.css +1 -1
  61. package/build/lib/utilities.css.map +1 -1
  62. package/build/sprite.svg +1 -1
  63. package/package.json +30 -29
  64. package/src/assets/icons/add.svg +4 -1
  65. package/src/assets/icons/close.svg +3 -3
  66. package/src/assets/icons/menu.svg +4 -1
  67. package/src/assets/icons/pause.svg +3 -3
  68. package/src/assets/icons/play.svg +2 -2
  69. package/src/assets/icons/quote.svg +1 -1
  70. package/src/assets/icons/remove.svg +4 -1
  71. package/src/assets/icons/search.svg +4 -1
  72. package/src/assets/icons/star-empty-thin.svg +4 -0
  73. package/src/components/Avatar/Avatar.tsx +36 -0
  74. package/src/components/Avatar/index.ts +2 -0
  75. package/src/components/Avatar/styles/config.scss +11 -0
  76. package/src/components/Avatar/styles/mixins.scss +53 -0
  77. package/src/components/Avatar/styles/style.scss +20 -0
  78. package/src/components/Avatar/tests/Avatar.conformance.test.jsx +23 -0
  79. package/src/components/Avatar/tests/Avatar.unit.test.jsx +45 -0
  80. package/src/components/BodyBanner/styles/mixins.scss +5 -1
  81. package/src/components/Carousel/Carousel.static.ts +17 -3
  82. package/src/components/Carousel/Carousel.tsx +55 -32
  83. package/src/components/Carousel/constants.ts +2 -0
  84. package/src/components/Carousel/styles/config.scss +5 -8
  85. package/src/components/Carousel/styles/mixins.scss +48 -78
  86. package/src/components/Carousel/styles/style.scss +8 -21
  87. package/src/components/Carousel/tests/Carousel.unit.test.jsx +77 -5
  88. package/src/components/Countdown/Countdown.react.ts +67 -0
  89. package/src/components/Countdown/Countdown.shared.ts +228 -0
  90. package/src/components/Countdown/Countdown.static.ts +201 -0
  91. package/src/components/Countdown/Countdown.tsx +105 -0
  92. package/src/components/Countdown/CountdownTag.static.ts +140 -0
  93. package/src/components/Countdown/CountdownTag.tsx +99 -0
  94. package/src/components/Countdown/constants.ts +36 -0
  95. package/src/components/Countdown/index.ts +3 -0
  96. package/src/components/Countdown/styles/config.scss +17 -0
  97. package/src/components/Countdown/styles/mixins.scss +193 -0
  98. package/src/components/Countdown/styles/style.scss +82 -0
  99. package/src/components/{Testimonial/tests/Testimonial.conformance.test.jsx → Countdown/tests/Countdown.conformance.test.jsx} +7 -2
  100. package/src/components/Countdown/tests/Countdown.static.test.jsx +117 -0
  101. package/src/components/Countdown/tests/Countdown.unit.test.jsx +101 -0
  102. package/src/components/Countdown/tests/CountdownTag.conformance.test.jsx +21 -0
  103. package/src/components/Countdown/tests/CountdownTag.static.test.jsx +30 -0
  104. package/src/components/Countdown/tests/CountdownTag.unit.test.jsx +67 -0
  105. package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +14 -1
  106. package/src/components/DocumentationSidebar/styles/style.scss +11 -0
  107. package/src/components/Forms/Autocomplete/Autocomplete.static.ts +14 -1
  108. package/src/components/Forms/Autocomplete/styles/mixins.scss +3 -2
  109. package/src/components/Forms/Autocomplete/tests/Autocomplete.styles.unit.test.jsx +20 -0
  110. package/src/components/List/styles/config.scss +1 -1
  111. package/src/components/Pill/styles/style.scss +2 -1
  112. package/src/components/Preview/PreviewGenerator.tsx +137 -103
  113. package/src/components/Preview/styles/style.scss +15 -9
  114. package/src/components/PromoBanner/PromoBanner.tsx +24 -7
  115. package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +31 -0
  116. package/src/components/StarRating/StarRating.tsx +52 -0
  117. package/src/components/StarRating/index.ts +1 -0
  118. package/src/components/StarRating/styles/style.scss +28 -0
  119. package/src/components/StarRating/tests/StarRating.unit.test.jsx +62 -0
  120. package/src/components/index.ts +9 -3
  121. package/src/styles/export/color.js +2 -0
  122. package/src/styles/tokens/color.scss +2 -0
  123. package/src/styles/typography/mixins.scss +4 -0
  124. package/src/styles/utilities/text.scss +9 -0
  125. package/build/components/Testimonial/style.css +0 -2
  126. package/build/components/Testimonial/style.css.map +0 -1
  127. package/build/components/types/src/components/Testimonial/Testimonial.d.ts +0 -10
  128. package/build/components/types/src/components/Testimonial/index.d.ts +0 -1
  129. package/build/search-index.json +0 -430
  130. package/src/components/Testimonial/Testimonial.tsx +0 -38
  131. package/src/components/Testimonial/index.ts +0 -1
  132. package/src/components/Testimonial/styles/config.scss +0 -42
  133. package/src/components/Testimonial/styles/mixins.scss +0 -44
  134. package/src/components/Testimonial/styles/style.scss +0 -16
  135. package/src/components/Testimonial/tests/Testimonial.unit.test.jsx +0 -43
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, ReactElement, HTMLAttributes, AnchorHTMLAttributes, FC } from 'react';
2
+ import React__default, { ReactNode, HTMLAttributes, ReactElement, AnchorHTMLAttributes, FC } from 'react';
3
3
 
4
4
  interface AccordionProps$1 {
5
5
  /** Heading level from 1 to 6 */
@@ -90,6 +90,13 @@ declare const AnchorNavigation: {
90
90
  displayName: string;
91
91
  };
92
92
 
93
+ interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
94
+ alt?: string;
95
+ iconName?: string;
96
+ src: string;
97
+ }
98
+ declare const Avatar: React__default.FC<AvatarProps>;
99
+
93
100
  type BarAlign = "start" | "end" | "center";
94
101
  type BarSpace = "small" | "large";
95
102
  interface BarProps extends React__default.HTMLAttributes<HTMLElement> {
@@ -294,18 +301,30 @@ interface CardSectionProps extends React__default.HTMLAttributes<HTMLDivElement>
294
301
  }
295
302
  declare const CardSection: React__default.ForwardRefExoticComponent<CardSectionProps & React__default.RefAttributes<HTMLDivElement>>;
296
303
 
297
- interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
304
+ type CarouselRenderItem<T> = (item: T, index: number) => ReactNode;
305
+ interface CarouselProps<T = ReactNode> extends HTMLAttributes<HTMLDivElement> {
298
306
  /** Swiper.js (https://swiperjs.com/) options object */
299
307
  swiperOptions?: Record<string, any>;
300
308
  /** Carousel items */
301
- items: ReactNode[];
309
+ items: T[];
310
+ /** Render carousel item content */
311
+ renderItems?: CarouselRenderItem<T>;
302
312
  /** Always show scrollbar and hide dots */
303
313
  showScrollbar?: boolean;
304
314
  /** Make carousel bleed to the right edge of screen while keeping left aligned with container */
305
315
  bleedRight?: boolean;
306
316
  className?: string;
307
317
  }
308
- declare const Carousel: React__default.FC<CarouselProps>;
318
+ declare const Carousel: {
319
+ <T>({ className, swiperOptions, items, renderItems, showScrollbar, bleedRight, ...other }: CarouselProps<T>): React__default.JSX.Element;
320
+ displayName: string;
321
+ };
322
+
323
+ interface CarouselItemProps extends HTMLAttributes<HTMLDivElement> {
324
+ className?: string;
325
+ children?: ReactNode;
326
+ }
327
+ declare const CarouselItem: React__default.FC<CarouselItemProps>;
309
328
 
310
329
  interface CarouselHeroItemProps extends HTMLAttributes<HTMLDivElement> {
311
330
  className?: string;
@@ -398,6 +417,34 @@ declare const Controls: React__default.ForwardRefExoticComponent<IControlsProps
398
417
  href?: undefined;
399
418
  } & React__default.RefAttributes<any>>;
400
419
 
420
+ declare const countdownUnits: readonly ["days", "hours", "minutes", "seconds"];
421
+ type CountdownUnit = (typeof countdownUnits)[number];
422
+ type DayLabels = {
423
+ many: string;
424
+ few: string;
425
+ one: string;
426
+ };
427
+ interface CountdownLabels {
428
+ days?: string | DayLabels;
429
+ hours?: string;
430
+ minutes?: string;
431
+ seconds?: string;
432
+ }
433
+
434
+ interface CountdownProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "children"> {
435
+ labels?: CountdownLabels;
436
+ targetDate: string;
437
+ units?: CountdownUnit[];
438
+ }
439
+ declare const Countdown: React__default.FC<CountdownProps>;
440
+
441
+ interface CountdownTagProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "children"> {
442
+ labels?: CountdownLabels;
443
+ targetDate: string;
444
+ units?: CountdownUnit[];
445
+ }
446
+ declare const CountdownTag: React__default.FC<CountdownTagProps>;
447
+
401
448
  interface CoverProps {
402
449
  /** Background image source. URL string or an object of breakpoint: url pairs
403
450
  *
@@ -1237,9 +1284,13 @@ interface ProgressProps {
1237
1284
  }
1238
1285
  declare const Progress: React__default.FC<ProgressProps>;
1239
1286
 
1287
+ interface PromoBannerImageSrc {
1288
+ src: string;
1289
+ srcSet?: string;
1290
+ }
1240
1291
  interface PromoBannerProps {
1241
1292
  className?: string;
1242
- image?: string;
1293
+ image?: string | PromoBannerImageSrc;
1243
1294
  alignImage?: "bottom" | "top";
1244
1295
  /** Remove top padding from item on sm and smaller breakpoints */
1245
1296
  flushTopSmDown?: boolean;
@@ -1338,6 +1389,14 @@ type LinkProps = CommonProps$1 & Omit<React__default.AnchorHTMLAttributes<HTMLAn
1338
1389
  type SocialButtonProps = ButtonProps$1 | LinkProps;
1339
1390
  declare const SocialButton: React__default.ForwardRefExoticComponent<SocialButtonProps & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
1340
1391
 
1392
+ interface StarRatingProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children"> {
1393
+ /** Extra class name for root element. */
1394
+ className?: string;
1395
+ /** Rating value. Rounded to nearest whole star. */
1396
+ rating: number;
1397
+ }
1398
+ declare const StarRating: React__default.FC<StarRatingProps>;
1399
+
1341
1400
  declare const showTitlesFromOptions: readonly ["md", "lg", "xl"];
1342
1401
  type ShowTitlesFrom = (typeof showTitlesFromOptions)[number];
1343
1402
  interface StepbarStep {
@@ -1496,15 +1555,6 @@ type AnchorProps = CommonProps & Omit<React__default.AnchorHTMLAttributes<HTMLAn
1496
1555
  type TagProps = SpanProps | ButtonProps | AnchorProps;
1497
1556
  declare const Tag: React__default.ForwardRefExoticComponent<TagProps & React__default.RefAttributes<HTMLElement>>;
1498
1557
 
1499
- interface TestimonialProps {
1500
- className?: string;
1501
- children?: React__default.ReactNode;
1502
- color?: "default" | "orange";
1503
- isDiv?: boolean;
1504
- [key: string]: any;
1505
- }
1506
- declare const Testimonial: React__default.FC<TestimonialProps>;
1507
-
1508
1558
  type TileHAlign = "center";
1509
1559
  type TileVAlign = "center" | "end" | "space-between";
1510
1560
  type TileVariant = "compact" | "action";
@@ -1561,4 +1611,4 @@ type InfoTooltipProps = Omit<TooltipProps, "onAbort"> & Omit<React__default.HTML
1561
1611
  };
1562
1612
  declare const InfoTooltip: React__default.FC<InfoTooltipProps>;
1563
1613
 
1564
- export { Accordion, AccordionItem, Alert, AnchorNavigation, Autocomplete, Bar, BarBreak, BarItem, BlockAction, BlockActionControl, BlockActionIndicator, BlockActionOverride, BodyBanner, Breadcrumbs, Button, ButtonFill, ButtonGhost, ButtonPrimary, Buttons, Card, CardProductHeader, CardSection, Carousel, CarouselHero, CarouselHeroItem, CarouselPromotions, CartTable, Checkbox, Container, Controls, Cover, Divider, Dropdown, DropdownDivider, DropdownItem, DropdownToggleButton, Expander, FeatureAccordion, FeatureAccordionItem, Field, Fieldset, File, Gauge, Grid, GridCol, Group, Hero, Hint, Icon, IconButton, IconList, Image, InfoTooltip, InputStepper, Item, Label, Link, List, ListItem, Loader, LoaderFullscreen, Megamenu, MegamenuBlog, Message, Modal, ModalBody, ModalCloseButton, ModalProductFooter, ModalProductHeader, ModalTitle, Pagination, Pictogram, Pill, Progress, PromoBanner, PromotionCard, PromotionCardContent, PromotionCardImageWrapper, PromotionCardSection, PromotionCardTitle, Radio, RangeSlider, Section, Select, Skeleton, SkipLink, SocialButton, SpritePathContext, SpritePathProvider, Stepbar, Sticker, Tab, TabPanel, Table, Tabs, Tag, TagButton, Testimonial, TextArea, TextInput, Tile, Timeline, Tooltip };
1614
+ export { Accordion, AccordionItem, Alert, AnchorNavigation, Autocomplete, Avatar, Bar, BarBreak, BarItem, BlockAction, BlockActionControl, BlockActionIndicator, BlockActionOverride, BodyBanner, Breadcrumbs, Button, ButtonFill, ButtonGhost, ButtonPrimary, Buttons, Card, CardProductHeader, CardSection, Carousel, CarouselHero, CarouselHeroItem, CarouselItem, CarouselPromotions, CartTable, Checkbox, Container, Controls, Countdown, CountdownTag, Cover, Divider, Dropdown, DropdownDivider, DropdownItem, DropdownToggleButton, Expander, FeatureAccordion, FeatureAccordionItem, Field, Fieldset, File, Gauge, Grid, GridCol, Group, Hero, Hint, Icon, IconButton, IconList, Image, InfoTooltip, InputStepper, Item, Label, Link, List, ListItem, Loader, LoaderFullscreen, Megamenu, MegamenuBlog, Message, Modal, ModalBody, ModalCloseButton, ModalProductFooter, ModalProductHeader, ModalTitle, Pagination, Pictogram, Pill, Progress, PromoBanner, PromotionCard, PromotionCardContent, PromotionCardImageWrapper, PromotionCardSection, PromotionCardTitle, Radio, RangeSlider, Section, Select, Skeleton, SkipLink, SocialButton, SpritePathContext, SpritePathProvider, StarRating, Stepbar, Sticker, Tab, TabPanel, Table, Tabs, Tag, TagButton, TextArea, TextInput, Tile, Timeline, Tooltip };
@@ -0,0 +1,7 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
3
+ alt?: string;
4
+ iconName?: string;
5
+ src: string;
6
+ }
7
+ export declare const Avatar: React.FC<AvatarProps>;
@@ -0,0 +1,2 @@
1
+ export type { AvatarProps } from "./Avatar";
2
+ export { Avatar } from "./Avatar";
@@ -1,14 +1,21 @@
1
1
  import React, { HTMLAttributes, ReactNode } from "react";
2
- interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
2
+ type CarouselRenderItem<T> = (item: T, index: number) => ReactNode;
3
+ interface CarouselProps<T = ReactNode> extends HTMLAttributes<HTMLDivElement> {
3
4
  /** Swiper.js (https://swiperjs.com/) options object */
4
5
  swiperOptions?: Record<string, any>;
5
6
  /** Carousel items */
6
- items: ReactNode[];
7
+ items: T[];
8
+ /** Render carousel item content */
9
+ renderItems?: CarouselRenderItem<T>;
7
10
  /** Always show scrollbar and hide dots */
8
11
  showScrollbar?: boolean;
9
12
  /** Make carousel bleed to the right edge of screen while keeping left aligned with container */
10
13
  bleedRight?: boolean;
11
14
  className?: string;
12
15
  }
13
- declare const Carousel: React.FC<CarouselProps>;
16
+ declare const Carousel: {
17
+ <T>({ className, swiperOptions, items, renderItems, showScrollbar, bleedRight, ...other }: CarouselProps<T>): React.JSX.Element;
18
+ displayName: string;
19
+ };
20
+ export type { CarouselProps };
14
21
  export { Carousel };
@@ -8,6 +8,8 @@ export declare const CLASS_SLIDE_PREV = "carousel__slide-prev";
8
8
  export declare const CLASS_PREV = "carousel__prev";
9
9
  export declare const CLASS_NEXT = "carousel__next";
10
10
  export declare const CLASS_DOTS = "carousel__pagination";
11
+ export declare const CLASS_NAVIGATION = "carousel__navigation";
12
+ export declare const CLASS_CONTROLS = "carousel__controls";
11
13
  export declare const CLASS_DOT = "carousel__pagination-item";
12
14
  export declare const CLASS_SCROLLBAR = "carousel__scrollbar";
13
15
  export declare const CLASS_SCROLLBAR_HORIZONTAL = "carousel__scrollbar-horizontal";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { CountdownLabels, CountdownUnit, countdownUnits } from "./Countdown.static";
3
+ export interface CountdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
4
+ labels?: CountdownLabels;
5
+ targetDate: string;
6
+ units?: CountdownUnit[];
7
+ }
8
+ declare const Countdown: React.FC<CountdownProps>;
9
+ export type { CountdownLabels, CountdownUnit };
10
+ export { Countdown, countdownUnits };
@@ -0,0 +1,8 @@
1
+ import { CountdownConfig, CountdownLabels, CountdownUnit } from "./Countdown.static";
2
+ declare const defaultCountdownLabels: Required<CountdownLabels>;
3
+ declare const defaultCountdownTagLabels: Required<CountdownLabels>;
4
+ declare const normalizeUnits: (units?: CountdownUnit[]) => CountdownUnit[];
5
+ declare const getLabelText: (unit: CountdownUnit, labels: CountdownLabels | undefined, fallback: Required<CountdownLabels>) => string;
6
+ declare const buildCountdownConfig: (targetDate: string, units: CountdownUnit[], labels?: CountdownLabels) => CountdownConfig;
7
+ declare const getAriaLive: (units: CountdownUnit[]) => "off" | "polite";
8
+ export { buildCountdownConfig, defaultCountdownLabels, defaultCountdownTagLabels, getAriaLive, getLabelText, normalizeUnits, };
@@ -0,0 +1,54 @@
1
+ export declare const countdownUnits: readonly ["days", "hours", "minutes", "seconds"];
2
+ export type CountdownUnit = (typeof countdownUnits)[number];
3
+ export type DayLabels = {
4
+ many: string;
5
+ few: string;
6
+ one: string;
7
+ };
8
+ export interface CountdownLabels {
9
+ days?: string | DayLabels;
10
+ hours?: string;
11
+ minutes?: string;
12
+ seconds?: string;
13
+ }
14
+ export interface CountdownConfig {
15
+ targetDate: string;
16
+ units?: CountdownUnit[];
17
+ labels?: CountdownLabels;
18
+ }
19
+ export interface CountdownState {
20
+ days: number;
21
+ hours: number;
22
+ minutes: number;
23
+ seconds: number;
24
+ }
25
+ export declare const getVisibleUnits: (units?: CountdownUnit[]) => CountdownUnit[];
26
+ export declare const normalizeDayLabels: (value: string | DayLabels | undefined, fallback: DayLabels) => DayLabels;
27
+ export declare const getTargetDate: (value: string) => number;
28
+ export declare const calculateState: (targetDate: string, units: CountdownUnit[]) => CountdownState;
29
+ export declare abstract class BaseCountdownStatic {
30
+ element: HTMLElement;
31
+ config: CountdownConfig;
32
+ liveRegion: HTMLElement | null;
33
+ timerId?: number;
34
+ observer?: IntersectionObserver;
35
+ private instanceKey;
36
+ private defaultConfig;
37
+ constructor(element: HTMLElement, config: Partial<CountdownConfig> | undefined, options: {
38
+ defaultConfig: CountdownConfig;
39
+ instanceKey: string;
40
+ });
41
+ protected readDataConfig(): Partial<CountdownConfig>;
42
+ protected getLiveRegion(): HTMLElement | null;
43
+ protected scheduleNextTick(): void;
44
+ private tick;
45
+ private setupObserver;
46
+ init(): void;
47
+ start(): void;
48
+ stop(): void;
49
+ update(config?: Partial<CountdownConfig>): void;
50
+ destroy(): void;
51
+ protected abstract collectElements(): void;
52
+ protected abstract render(): void;
53
+ protected abstract destroyElements(): void;
54
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseCountdownStatic, CountdownConfig, CountdownLabels, CountdownUnit, countdownUnits } from "./Countdown.shared";
2
+ interface CountdownLeaf {
3
+ element: HTMLElement;
4
+ unit: CountdownUnit;
5
+ labels: HTMLElement[];
6
+ isFlipping: boolean;
7
+ flipTimeoutId?: number;
8
+ }
9
+ export default class CountdownStatic extends BaseCountdownStatic {
10
+ leaves: Map<CountdownUnit, CountdownLeaf>;
11
+ constructor(element: HTMLElement, config?: Partial<CountdownConfig>);
12
+ private getLabels;
13
+ protected collectElements(): void;
14
+ private setLeafValue;
15
+ private flipLeaf;
16
+ protected render(): void;
17
+ protected destroyElements(): void;
18
+ static getInstance(el: HTMLElement): CountdownStatic | null;
19
+ }
20
+ export type { CountdownConfig, CountdownLabels, CountdownUnit };
21
+ export { countdownUnits };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { CountdownLabels, CountdownUnit } from "./Countdown.static";
3
+ export interface CountdownTagProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
4
+ labels?: CountdownLabels;
5
+ targetDate: string;
6
+ units?: CountdownUnit[];
7
+ }
8
+ declare const CountdownTag: React.FC<CountdownTagProps>;
9
+ export { CountdownTag };
@@ -0,0 +1,16 @@
1
+ import { BaseCountdownStatic, CountdownConfig, CountdownUnit } from "./Countdown.shared";
2
+ interface CountdownTagUnit {
3
+ element: HTMLElement;
4
+ unit: CountdownUnit;
5
+ valueElement: HTMLElement | null;
6
+ }
7
+ export default class CountdownTagStatic extends BaseCountdownStatic {
8
+ units: Map<CountdownUnit, CountdownTagUnit>;
9
+ constructor(element: HTMLElement, config?: Partial<CountdownConfig>);
10
+ private getLabels;
11
+ protected collectElements(): void;
12
+ protected render(): void;
13
+ protected destroyElements(): void;
14
+ static getInstance(el: HTMLElement): CountdownTagStatic | null;
15
+ }
16
+ export {};
@@ -0,0 +1,28 @@
1
+ export declare const CLASS_ROOT = "countdown";
2
+ export declare const CLASS_ANNOUNCEMENT = "countdown__announcement";
3
+ export declare const CLASS_UNIT = "countdown__unit";
4
+ export declare const CLASS_CARD = "countdown__card";
5
+ export declare const CLASS_TOP = "countdown__top";
6
+ export declare const CLASS_LEAF_FRONT = "countdown__leaf-front";
7
+ export declare const CLASS_LEAF_BACK = "countdown__leaf-back";
8
+ export declare const CLASS_BOTTOM = "countdown__bottom";
9
+ export declare const CLASS_VALUE = "countdown__value";
10
+ export declare const CLASS_LABEL = "countdown__label";
11
+ export declare const CLASS_FLIP = "is-flipping";
12
+ export declare const CLASS_TAG_ROOT = "countdown-tag";
13
+ export declare const CLASS_TAG_PART = "countdown-tag__part";
14
+ export declare const CLASS_TAG_VALUE = "countdown-tag__value";
15
+ export declare const CLASS_TAG_LABEL = "countdown-tag__label";
16
+ export declare const CLASS_TAG_SEPARATOR = "countdown-tag__separator";
17
+ export declare const ATTR_COUNTDOWN = "data-countdown";
18
+ export declare const ATTR_COUNTDOWN_CONFIG = "data-countdown-config";
19
+ export declare const ATTR_COUNTDOWN_UNIT = "data-countdown-unit";
20
+ export declare const ATTR_COUNTDOWN_TAG = "data-countdown-tag";
21
+ export declare const ATTR_COUNTDOWN_TAG_VALUE = "data-countdown-tag-value";
22
+ export declare const SELECTOR_ANNOUNCEMENT = ".countdown__announcement";
23
+ export declare const SELECTOR_UNIT = ".countdown__unit";
24
+ export declare const SELECTOR_LABEL = ".countdown__label";
25
+ export declare const SELECTOR_TAG_UNIT = "[data-countdown-unit]";
26
+ export declare const SELECTOR_TAG_LABEL = ".countdown-tag__label";
27
+ export declare const SELECTOR_TAG_VALUE = "[data-countdown-tag-value]";
28
+ export declare const SELECTOR_VALUE_LAYERS: string;
@@ -0,0 +1,3 @@
1
+ export type { CountdownLabels, CountdownUnit } from "./Countdown";
2
+ export { Countdown, countdownUnits } from "./Countdown";
3
+ export { CountdownTag } from "./CountdownTag";
@@ -3,6 +3,7 @@ export interface DocumentationSidebarItem {
3
3
  label: string;
4
4
  href?: string;
5
5
  target?: React.HTMLAttributeAnchorTarget;
6
+ tag?: string;
6
7
  items?: DocumentationSidebarItem[];
7
8
  content?: string;
8
9
  }
@@ -13,6 +13,7 @@ interface PreviewProps {
13
13
  bgThemeExcludedColors?: string[];
14
14
  children?: ReactNode | ((context: PreviewRenderContext) => ReactNode);
15
15
  className?: string;
16
+ preserveDividerSpacing?: boolean;
16
17
  code?: ReactNode | string | ((context: PreviewRenderContext) => ReactNode);
17
18
  codeJSXOptions?: Record<string, any>;
18
19
  codeTypes?: string[];
@@ -1,7 +1,11 @@
1
1
  import React from "react";
2
+ interface PromoBannerImageSrc {
3
+ src: string;
4
+ srcSet?: string;
5
+ }
2
6
  interface PromoBannerProps {
3
7
  className?: string;
4
- image?: string;
8
+ image?: string | PromoBannerImageSrc;
5
9
  alignImage?: "bottom" | "top";
6
10
  /** Remove top padding from item on sm and smaller breakpoints */
7
11
  flushTopSmDown?: boolean;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface StarRatingProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
3
+ /** Extra class name for root element. */
4
+ className?: string;
5
+ /** Rating value. Rounded to nearest whole star. */
6
+ rating: number;
7
+ }
8
+ declare const StarRating: React.FC<StarRatingProps>;
9
+ export { StarRating };
@@ -0,0 +1 @@
1
+ export { StarRating } from "./StarRating";
@@ -1,6 +1,7 @@
1
1
  import { Accordion, AccordionItem } from "./Accordion";
2
2
  import { Alert } from "./Alert";
3
3
  import { AnchorNavigation } from "./AnchorNavigation";
4
+ import { Avatar } from "./Avatar";
4
5
  import { Bar, BarBreak, BarItem } from "./Bar";
5
6
  import { BlockAction, BlockActionControl, BlockActionIndicator, BlockActionOverride } from "./BlockAction";
6
7
  import { BodyBanner } from "./BodyBanner";
@@ -8,12 +9,13 @@ import { Breadcrumbs } from "./Breadcrumbs";
8
9
  import { Button, ButtonFill, ButtonGhost, ButtonPrimary, IconButton } from "./Button";
9
10
  import { Buttons } from "./Buttons";
10
11
  import { Card, CardProductHeader, CardSection } from "./Card";
11
- import { Carousel } from "./Carousel";
12
+ import { Carousel, CarouselItem } from "./Carousel";
12
13
  import { CarouselHero, CarouselHeroItem } from "./CarouselHero";
13
14
  import { CarouselPromotions } from "./CarouselPromotions";
14
15
  import { CartTable } from "./CartTable";
15
16
  import { Container } from "./Container";
16
17
  import { Controls } from "./Controls";
18
+ import { Countdown, CountdownTag } from "./Countdown";
17
19
  import { Cover } from "./Cover";
18
20
  import { Divider } from "./Divider";
19
21
  import { Dropdown, DropdownDivider, DropdownItem, DropdownToggleButton } from "./Dropdown";
@@ -40,13 +42,13 @@ import { Section } from "./Section";
40
42
  import { Skeleton } from "./Skeleton";
41
43
  import { SkipLink } from "./SkipLink";
42
44
  import { SocialButton } from "./SocialButton";
45
+ import { StarRating } from "./StarRating";
43
46
  import { Stepbar } from "./Stepbar";
44
47
  import { Sticker } from "./Sticker";
45
48
  import { Table } from "./Table";
46
49
  import { Tab, TabPanel, Tabs } from "./Tabs";
47
50
  import { Tag, TagButton } from "./Tag";
48
- import { Testimonial } from "./Testimonial";
49
51
  import { Tile } from "./Tile";
50
52
  import { Timeline } from "./Timeline";
51
53
  import { InfoTooltip, Tooltip } from "./Tooltip";
52
- export { Accordion, AccordionItem, Alert, AnchorNavigation, Autocomplete, Bar, BarBreak, BarItem, BlockAction, BlockActionControl, BlockActionIndicator, BlockActionOverride, BodyBanner, Breadcrumbs, Button, ButtonFill, ButtonGhost, ButtonPrimary, Buttons, Card, CardProductHeader, CardSection, Carousel, CarouselHero, CarouselHeroItem, CarouselPromotions, CartTable, Checkbox, Container, Controls, Cover, Divider, Dropdown, DropdownDivider, DropdownItem, DropdownToggleButton, Expander, FeatureAccordion, FeatureAccordionItem, Field, Fieldset, File, Gauge, Grid, GridCol, Group, Hero, Hint, Icon, IconButton, IconList, Image, InfoTooltip, InputStepper, Item, Label, Link, List, ListItem, Loader, LoaderFullscreen, Megamenu, MegamenuBlog, Message, Modal, ModalBody, ModalCloseButton, ModalProductFooter, ModalProductHeader, ModalTitle, Pagination, Pictogram, Pill, Progress, PromoBanner, PromotionCard, PromotionCardContent, PromotionCardImageWrapper, PromotionCardSection, PromotionCardTitle, Radio, RangeSlider, Section, Select, Skeleton, SkipLink, SocialButton, SpritePathContext, SpritePathProvider, Stepbar, Sticker, Tab, Table, TabPanel, Tabs, Tag, TagButton, Testimonial, TextArea, TextInput, Tile, Timeline, Tooltip, };
54
+ export { Accordion, AccordionItem, Alert, AnchorNavigation, Autocomplete, Avatar, Bar, BarBreak, BarItem, BlockAction, BlockActionControl, BlockActionIndicator, BlockActionOverride, BodyBanner, Breadcrumbs, Button, ButtonFill, ButtonGhost, ButtonPrimary, Buttons, Card, CardProductHeader, CardSection, Carousel, CarouselHero, CarouselHeroItem, CarouselItem, CarouselPromotions, CartTable, Checkbox, Container, Controls, Countdown, CountdownTag, Cover, Divider, Dropdown, DropdownDivider, DropdownItem, DropdownToggleButton, Expander, FeatureAccordion, FeatureAccordionItem, Field, Fieldset, File, Gauge, Grid, GridCol, Group, Hero, Hint, Icon, IconButton, IconList, Image, InfoTooltip, InputStepper, Item, Label, Link, List, ListItem, Loader, LoaderFullscreen, Megamenu, MegamenuBlog, Message, Modal, ModalBody, ModalCloseButton, ModalProductFooter, ModalProductHeader, ModalTitle, Pagination, Pictogram, Pill, Progress, PromoBanner, PromotionCard, PromotionCardContent, PromotionCardImageWrapper, PromotionCardSection, PromotionCardTitle, Radio, RangeSlider, Section, Select, Skeleton, SkipLink, SocialButton, SpritePathContext, SpritePathProvider, StarRating, Stepbar, Sticker, Tab, Table, TabPanel, Tabs, Tag, TagButton, TextArea, TextInput, Tile, Timeline, Tooltip, };
@@ -1,9 +1,11 @@
1
+ import CountdownTag from "@/components/Countdown/CountdownTag.static";
1
2
  import Accordion from "../components/Accordion/Accordion.static";
2
3
  import AnchorNavigation from "../components/AnchorNavigation/AnchorNavigation.static";
3
4
  import BlockAction from "../components/BlockAction/BlockAction.static";
4
5
  import Carousel from "../components/Carousel/Carousel.static";
5
6
  import CarouselHero from "../components/CarouselHero/CarouselHero.static";
6
7
  import CarouselPromotions from "../components/CarouselPromotions/CarouselPromotions.static";
8
+ import Countdown from "../components/Countdown/Countdown.static";
7
9
  import Dropdown from "../components/Dropdown/Dropdown.static";
8
10
  import Expander from "../components/Expander/Expander.static";
9
11
  import FeatureAccordion from "../components/FeatureAccordion/FeatureAccordion.static";
@@ -59,6 +61,14 @@ export declare const moduleSelectorPairs: ({
59
61
  Module: typeof CarouselPromotions;
60
62
  name: string;
61
63
  selector: string;
64
+ } | {
65
+ Module: typeof Countdown;
66
+ name: string;
67
+ selector: string;
68
+ } | {
69
+ Module: typeof CountdownTag;
70
+ name: string;
71
+ selector: string;
62
72
  } | {
63
73
  Module: typeof FeatureAccordion;
64
74
  name: string;
@@ -24,6 +24,7 @@ export const exports: {
24
24
  "light-fill-accent3": string;
25
25
  "light-fill-accent4": string;
26
26
  "light-fill-accent5": string;
27
+ "light-fill-accent6": string;
27
28
  "light-fill-information": string;
28
29
  "light-fill-positive": string;
29
30
  "light-fill-warning": string;
@@ -75,6 +76,7 @@ export const exports: {
75
76
  "dark-fill-accent3": string;
76
77
  "dark-fill-accent4": string;
77
78
  "dark-fill-accent5": string;
79
+ "dark-icon-accent6": string;
78
80
  "dark-fill-information": string;
79
81
  "dark-fill-positive": string;
80
82
  "dark-fill-warning": string;