bonprix-design-system 0.48.0 → 0.49.0-beta.2

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.d.ts CHANGED
@@ -42,21 +42,21 @@ export declare interface AlertProps {
42
42
  }
43
43
 
44
44
  declare interface Anchor {
45
- /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel">MDN, Attributes - rel</a>. Only usable when the property `link` is set to `true`. */
46
- rel?: ValidRel;
47
- /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#href">MDN, Anchor Element - href</a>. Only usable when the property `link` is set to `true`. */
45
+ /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel">MDN, Attributes - rel</a>. Only usable with the anchor element. */
46
+ rel?: string;
47
+ /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#href">MDN, Anchor Element - href</a>. Only usable with the anchor element. */
48
48
  href: string;
49
- /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target>MDN, Anchor Element - target</a>. Only usable when the property `link` is set to `true`. */
49
+ /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target>MDN, Anchor Element - target</a>. Only usable with the anchor element. */
50
50
  target?: "_blank" | "_self" | "_parent" | "_top";
51
51
  }
52
52
 
53
53
  declare interface AsButton extends BaseProps {
54
- link?: false;
54
+ link?: never;
55
55
  onClick: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
56
56
  }
57
57
 
58
58
  declare interface AsButton_2 extends BaseProps_2 {
59
- link?: false;
59
+ link?: never;
60
60
  /** If `true`, the button will be disabled and thus not interactable. Only usable when the property `link` is set to `false`. */
61
61
  disabled?: boolean;
62
62
  /** If `true`, a loading spinner will be shown instead of the content. Only usable when the property `link` is set to `false`. */
@@ -68,7 +68,7 @@ declare interface AsButton_2 extends BaseProps_2 {
68
68
  declare interface AsButton_3 extends BaseProps_4 {
69
69
  /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type">MDN, Button Element - type</a>. */
70
70
  type?: ButtonTypeAttribute;
71
- link?: false;
71
+ link?: never;
72
72
  /** If `true`, the button will be disabled and thus not interactable. Only usable when the property `link` is set to `false`. */
73
73
  disabled?: boolean;
74
74
  /** If `true`, a loading spinner will be shown instead of the content. Only usable when the property `link` is set to `false`. */
@@ -94,6 +94,9 @@ declare interface AsLink extends BaseProps, Anchor {
94
94
  declare interface AsLink_2 extends BaseProps_2, Anchor {
95
95
  /** If `true`, an anchor element will be rendered instead of a button. Also, link-specific properties `href`, `rel`and `target` will be available. Button-specific properties are not usable. */
96
96
  link: true;
97
+ /** Callback, which is triggered when the link is clicked. */
98
+ onClick?: (event: default_2.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
99
+ type?: never;
97
100
  }
98
101
 
99
102
  declare interface AsLink_3 extends BaseProps_4, Anchor {
@@ -356,11 +359,11 @@ export declare const breakpoints: Breakpoints;
356
359
 
357
360
  export declare const Button: FC<ButtonProps>;
358
361
 
359
- export declare type ButtonProps = SubmitResetVariantProps | ButtonVariantProps;
362
+ export declare type ButtonProps = AsLink_2 | SubmitResetVariantProps | ButtonVariantProps;
360
363
 
361
364
  declare type ButtonTypeAttribute = "button" | "submit" | "reset";
362
365
 
363
- declare type ButtonVariantProps = FinalBaseProps & {
366
+ declare type ButtonVariantProps = AsButton_2 & {
364
367
  /** Callback, which is triggered when the button is activated. */
365
368
  onClick: (event: default_2.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
366
369
  /** Standard HTML attribute. Read more on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type">MDN, Button Element - type</a>. */
@@ -407,6 +410,41 @@ export declare interface CarouselProps {
407
410
  disableDrag?: boolean;
408
411
  }
409
412
 
413
+ export declare const CarouselV2: FC<CarouselV2Props> & SubComponents;
414
+
415
+ export declare interface CarouselV2Props {
416
+ /** The content of the carousel. Here, all of the subcomponents should be placed. */
417
+ children: ReactNode;
418
+ /** Sets a visual header for the carousel. */
419
+ title: string;
420
+ /** Defines the level of the used header element. */
421
+ titleLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
422
+ /** Amount of slides that will be visible at the same time, thus building a page. */
423
+ perPage?: number | ResponsiveNumber;
424
+ /** Amount of slides to move per arrow icon button click. */
425
+ perMove?: number | ResponsiveNumber;
426
+ /** If true, the carousel will rewind to the beginning when reaching the end or going to end when going before the first slide. */
427
+ rewind?: boolean;
428
+ /** If set to `true`, the primary variant of icon buttons will be used to achieve a high contrast. */
429
+ buttonsContrast?: boolean;
430
+ /** The padding at the right side of the page in pixels. Can be used to implement the so-called "scroll hint" */
431
+ padding?: number;
432
+ /** Callback function that is called when the slide changes. */
433
+ onMove?: () => void;
434
+ /** Manages the behavior of the arrow icon buttons. */
435
+ showArrows?: "always" | "hover" | "never";
436
+ /** The gap between slides in pixels. */
437
+ gap?: number;
438
+ /** If set to `true`, the color of the arrow buttons will be inverted. */
439
+ invertButtons?: boolean;
440
+ /** If set to `true`, the horizontal padding for the arrow buttons will be removed. */
441
+ disableHorizontalPadding?: boolean;
442
+ /** Moves to a certain page imperatively. It's a one-time operation and is not supposed to fully control Carousel from the outside. */
443
+ moveToPage?: number;
444
+ /** Can be used if a title already exists on the page. Do not use both `title`and `aria-labelledby`. */
445
+ "aria-labelledby"?: string;
446
+ }
447
+
410
448
  export declare const Checkbox: FC<CheckboxProps>;
411
449
 
412
450
  export declare const CheckboxGroup: FC<CheckboxGroupProps> & Subcomponents_2;
@@ -588,8 +626,6 @@ export declare interface DialogProps {
588
626
  zIndex?: number;
589
627
  }
590
628
 
591
- declare type FinalBaseProps = AsLink_2 | AsButton_2;
592
-
593
629
  export declare const Grid: FC<GridProps> & {
594
630
  Item: typeof GridItem;
595
631
  };
@@ -620,7 +656,11 @@ declare interface GridItemProps {
620
656
  export declare interface GridProps {
621
657
  /** A place where Grid.Item components should be added. */
622
658
  children: ReactNode;
623
- /** If set to `true`, the grid will not have gutters between items. */
659
+ /** Classes for the Grid wrapper element. Intended mainly for customize gap size. */
660
+ className?: string;
661
+ /** If set to `true`, the grid will not have gutters between items.
662
+ * @deprecated Use `className="gap-x-0"` instead.
663
+ */
624
664
  disableGutters?: boolean;
625
665
  }
626
666
 
@@ -773,6 +813,8 @@ export declare const PasswordField: FC<PasswordFieldProps>;
773
813
 
774
814
  export declare type PasswordFieldProps = ControlledInputProps_4 | UncontrolledInputProps_4;
775
815
 
816
+ declare const PositionIndicator: FC;
817
+
776
818
  export declare const Price: FC<PriceProps>;
777
819
 
778
820
  export declare type PriceProps = RegularProps | SaleProps | BestProps | TopDealProps | NoPriceProps;
@@ -905,6 +947,8 @@ export declare interface RemovedItemPlaceholderProps {
905
947
  onClick: () => void;
906
948
  }
907
949
 
950
+ declare type ResponsiveNumber = Partial<Record<Breakpoint, number>>;
951
+
908
952
  declare interface SaleProps extends TwoPriceProps {
909
953
  variant: "sale";
910
954
  }
@@ -982,6 +1026,20 @@ export declare interface SideSheetProps {
982
1026
  zIndex?: number;
983
1027
  }
984
1028
 
1029
+ declare const Slide: FC<SlideProps>;
1030
+
1031
+ declare interface SlideProps {
1032
+ children: ReactNode;
1033
+ "aria-label"?: string;
1034
+ "aria-labelledby"?: string;
1035
+ }
1036
+
1037
+ declare const Slides: FC<SlidesProps>;
1038
+
1039
+ declare interface SlidesProps {
1040
+ children: ReactNode;
1041
+ }
1042
+
985
1043
  declare interface SourceSetMapper {
986
1044
  s?: string;
987
1045
  m?: string;
@@ -1015,6 +1073,12 @@ export declare interface StepNaviProps {
1015
1073
 
1016
1074
  declare const StepNaviStep: FC<Props_10>;
1017
1075
 
1076
+ declare interface SubComponents {
1077
+ Slide: typeof Slide;
1078
+ PositionIndicator: typeof PositionIndicator;
1079
+ Slides: typeof Slides;
1080
+ }
1081
+
1018
1082
  declare interface Subcomponents {
1019
1083
  Slide: typeof SplideSlide;
1020
1084
  }
@@ -1059,7 +1123,7 @@ declare interface Subcomponents_9 {
1059
1123
  List: typeof TabsList;
1060
1124
  }
1061
1125
 
1062
- declare type SubmitResetVariantProps = FinalBaseProps & {
1126
+ declare type SubmitResetVariantProps = AsButton_2 & {
1063
1127
  onClick?: (event: default_2.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
1064
1128
  type?: "submit" | "reset";
1065
1129
  };
@@ -1088,8 +1152,12 @@ export declare interface TabsProps {
1088
1152
  activeTab: string;
1089
1153
  /** Callback function that is called when the active tab changes. */
1090
1154
  onChange: (value: string) => void;
1155
+ /** Sets "TabBox" or "Tabs" variants. "Tabs" is the old regular Tabs while "TabBox" changes visuals, allow stacking tabs and removes max-width of each Tab.Item. */
1156
+ variant?: TabsVariantType;
1091
1157
  }
1092
1158
 
1159
+ declare type TabsVariantType = "TabBox" | "Tabs";
1160
+
1093
1161
  /** @type {import('tailwindcss').Config} */
1094
1162
  export declare const tailwindConfig: {
1095
1163
  corePlugins: {
@@ -1562,8 +1630,6 @@ export declare const useExperimentalBreakpointDown: (bp: Breakpoint) => boolean
1562
1630
 
1563
1631
  export declare const useExperimentalBreakpointUp: (bp: Breakpoint) => boolean;
1564
1632
 
1565
- declare type ValidRel = "alternate" | "author" | "bookmark" | "canonical" | "external" | "help" | "license" | "next" | "nofollow" | "noreferrer" | "noopener" | "prev" | "search" | "tag";
1566
-
1567
1633
  declare const values: readonly ["primary", "secondary"];
1568
1634
 
1569
1635
  declare type VariantValue = (typeof values)[number];