@vodafone_de/brix-components 7.0.18 → 7.0.19

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 (43) hide show
  1. package/dist/components/Button/index.js +1 -1
  2. package/dist/components/ButtonAsLink/index.js +2 -1
  3. package/dist/components/DemoBox/index.js +1 -1
  4. package/dist/components/Dialog/index.js +3 -2
  5. package/dist/components/DiscoveryCard/index.js +1 -1
  6. package/dist/components/IconSnippet/index.js +1 -1
  7. package/dist/components/ImageHeader/index.js +2 -1
  8. package/dist/components/InfoBanner/index.d.ts +5 -0
  9. package/dist/components/InfoBanner/index.js +86 -0
  10. package/dist/components/InfoBanner/props.d.ts +32 -0
  11. package/dist/components/InfoBanner/styled.d.ts +2 -0
  12. package/dist/components/InlineLink/index.js +2 -1
  13. package/dist/components/Legend/index.js +1 -1
  14. package/dist/components/Link/index.js +2 -1
  15. package/dist/components/LinkListItem/index.js +2 -1
  16. package/dist/components/LocalStyle/index.d.ts +12 -0
  17. package/dist/components/LocalStyle/index.js +20 -0
  18. package/dist/components/LocalStyle/props.d.ts +5 -0
  19. package/dist/components/LocalStyle/styled.d.ts +2 -0
  20. package/dist/components/MediaText/index.js +2 -1
  21. package/dist/components/Notification/index.js +1 -1
  22. package/dist/components/OpenTextFootnoteAdapter/index.js +1 -1
  23. package/dist/components/QuickLinkList/components/QuickLink/styled.d.ts +1 -1
  24. package/dist/components/QuickLinkList/index.js +55 -48
  25. package/dist/components/RadioGroup/index.js +1 -0
  26. package/dist/components/RichText/index.js +1 -1
  27. package/dist/components/RichtTextContentful/index.js +1 -1
  28. package/dist/components/SuggestInput/index.js +5 -4
  29. package/dist/components/TabGroup/index.js +15 -15
  30. package/dist/components/TabGroup/props.d.ts +29 -34
  31. package/dist/components/TabGroup/styled.d.ts +2 -2
  32. package/dist/components/TextList/index.js +1 -1
  33. package/dist/cssVars-C3-c3zhv.js +726 -0
  34. package/dist/foundations/GlobalStyle/index.d.ts +1 -0
  35. package/dist/foundations/GlobalStyle/index.js +211 -217
  36. package/dist/foundations/cssVars.d.ts +1 -0
  37. package/dist/{index-Cy0Uf6Y5.js → index-CVHmFLr5.js} +2 -6
  38. package/dist/index-DR3e19BE.js +7 -0
  39. package/dist/{index-Dy21IAhD.js → index-DSTYuyEd.js} +2 -1
  40. package/dist/index.d.ts +4 -0
  41. package/dist/index.js +120 -112
  42. package/dist/sanitizeLinkProps-D2Kkovy1.js +12 -0
  43. package/package.json +1 -1
@@ -5,7 +5,6 @@ import { I as IconLoader } from "../../index-BdUFiKHr.js";
5
5
  import { b as iconSizeSm, d as iconSizeLg } from "../../props-7dcsjRUx.js";
6
6
  import "../../styled-RnVr222F.js";
7
7
  import styled from "styled-components";
8
- import Container from "../Container/index.js";
9
8
  import Flex from "../Flex/index.js";
10
9
  import forcedColors from "../../foundations/media-query/forcedColors/index.js";
11
10
  import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
@@ -22,11 +21,11 @@ import { d as borderRadiusSm } from "../../BorderRadius-ClUShVLu.js";
22
21
  import { a as borderWidthFocus } from "../../BorderWidth-eg_mz82k.js";
23
22
  import { a as fontWeightBold } from "../../FontWeight-C2pGs7aR.js";
24
23
  import { a as colorObjectBrand } from "../../ObjectColor-0RAzLGI5.js";
25
- import { a as spacingMd, c as spacingSm, b as spacingXs, e as spacing2Xs } from "../../Spacing-BMQelJYr.js";
24
+ import { a as spacingMd, c as spacingSm, b as spacingXs, e as spacing2Xs, d as spacingXl } from "../../Spacing-BMQelJYr.js";
26
25
  import { a as filterProps } from "../../filterProps-CTn92eZw.js";
27
26
  import { d as flexJustifyCenter } from "../../styled-CyZvsdJs.js";
28
- const tabOrientationHorizontal = "horizontal";
29
- const tabOrientationVertical = "vertical";
27
+ const iconPositionLeft = "left";
28
+ const iconPositionTop = "top";
30
29
  const tabGroupWidthFull = "full";
31
30
  const tabGroupWidthAuto = "auto";
32
31
  const TabGroupContainerStyled = styled.div.withConfig({
@@ -74,7 +73,7 @@ const TabGroupTabsStyled = styled(Flex).withConfig({
74
73
  })
75
74
  });
76
75
  const TabStyled = styled.button.withConfig({
77
- shouldForwardProp: filterProps(["tabOrientation", "width"]),
76
+ shouldForwardProp: filterProps(["iconPosition", "width"]),
78
77
  displayName: "TabStyled",
79
78
  componentId: "sc-qawwg-3"
80
79
  })({
@@ -105,10 +104,10 @@ const TabStyled = styled.button.withConfig({
105
104
  })
106
105
  }
107
106
  }, ({
108
- tabOrientation
107
+ iconPosition
109
108
  }) => ({
110
- flexDirection: tabOrientation === tabOrientationVertical ? "column" : "row",
111
- gap: tabOrientation === tabOrientationVertical ? getSpacing(spacingXs) : getSpacing(spacing2Xs)
109
+ flexDirection: iconPosition === iconPositionTop ? "column" : "row",
110
+ gap: iconPosition === iconPositionTop ? getSpacing(spacingXs) : getSpacing(spacing2Xs)
112
111
  }), ({
113
112
  width
114
113
  }) => ({
@@ -139,10 +138,11 @@ const TabGroupIndicatorStyled = styled.div.withConfig({
139
138
  background: "SelectedItem"
140
139
  })
141
140
  });
142
- const PanelStyled = styled(Container).withConfig({
141
+ const PanelStyled = styled.div.withConfig({
143
142
  displayName: "PanelStyled",
144
143
  componentId: "sc-qawwg-6"
145
144
  })({
145
+ marginTop: getSpacing(spacingXl),
146
146
  background: "transparent",
147
147
  "&:focus-visible": {
148
148
  outline: `4px solid ${getBorderColor(colorBorderFocus)}`,
@@ -154,7 +154,7 @@ const PanelStyled = styled(Container).withConfig({
154
154
  });
155
155
  const TabGroup = ({
156
156
  tabs,
157
- tabOrientation = tabOrientationHorizontal,
157
+ iconPosition = iconPositionLeft,
158
158
  value,
159
159
  width = tabGroupWidthFull,
160
160
  "aria-label": ariaLabel,
@@ -294,10 +294,10 @@ const TabGroup = ({
294
294
  const getTabs = tabs.map((tab, tabIndex) => {
295
295
  const tabValue = tab.value;
296
296
  const isActive = tabValue === activeTab;
297
- return /* @__PURE__ */ jsxs(TabStyled, { tabOrientation, width, type: "button", ref: (el) => {
297
+ return /* @__PURE__ */ jsxs(TabStyled, { iconPosition, width, type: "button", ref: (el) => {
298
298
  tabRefs.current[tabValue] = el;
299
299
  }, onClick: () => handleTabClick(tabValue), "aria-selected": isActive, tabIndex: isActive ? 0 : -1, role: "tab", id: `tab-${tabValue}`, "aria-controls": `tabpanel-${tabValue}`, onKeyDown: (e) => handleKeyDown(e, tabIndex), children: [
300
- tab.icon ? /* @__PURE__ */ jsx(IconLoader, { name: tab.icon, size: tabOrientation === tabOrientationHorizontal ? iconSizeSm : iconSizeLg }) : null,
300
+ tab.icon ? /* @__PURE__ */ jsx(IconLoader, { name: tab.icon, size: iconPosition === iconPositionLeft ? iconSizeSm : iconSizeLg }) : null,
301
301
  /* @__PURE__ */ jsx(TabLabelStyled, { children: tab.label })
302
302
  ] }, `tab-${tabIndex}`);
303
303
  });
@@ -323,8 +323,8 @@ export {
323
323
  TabLabelStyled,
324
324
  TabStyled,
325
325
  TabGroup as default,
326
+ iconPositionLeft,
327
+ iconPositionTop,
326
328
  tabGroupWidthAuto,
327
- tabGroupWidthFull,
328
- tabOrientationHorizontal,
329
- tabOrientationVertical
329
+ tabGroupWidthFull
330
330
  };
@@ -1,75 +1,70 @@
1
1
  import { IconName } from '@vfde-react/inline-icon-library/IconName';
2
2
  import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
3
3
  import { PatternProps } from '../../foundations/PatternProps';
4
- export declare const tabOrientationHorizontal = "horizontal";
5
- export declare const tabOrientationVertical = "vertical";
4
+ export declare const iconPositionLeft = "left";
5
+ export declare const iconPositionTop = "top";
6
6
  export declare const tabGroupWidthFull = "full";
7
7
  export declare const tabGroupWidthAuto = "auto";
8
- export type TabOrientation = typeof tabOrientationHorizontal | typeof tabOrientationVertical;
8
+ export type IconPosition = typeof iconPositionLeft | typeof iconPositionTop;
9
9
  export type TabGroupWidth = typeof tabGroupWidthFull | typeof tabGroupWidthAuto;
10
- interface TabBaseProps extends ButtonHTMLAttributes<HTMLInputElement> {
10
+ interface TabBaseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
11
  /**
12
- * Label for the tab
12
+ * Text label for the tab
13
13
  */
14
14
  label: string;
15
15
  /**
16
- * Unique tab value
16
+ * Unique value used to identify the tab
17
17
  */
18
18
  value?: string;
19
19
  /**
20
- * Content of the tab
20
+ * Content rendered in the associated tab panel
21
21
  */
22
22
  panelContent: ReactNode;
23
23
  }
24
- /** Horizontal Tab: icon is optional */
25
- export type TabPropsHorizontal = TabBaseProps & {
24
+ /** Tab with optional icon */
25
+ type TabWithOptionalIcon = TabBaseProps & {
26
26
  /**
27
- * Optional leading icon (horizontal TabGroup only)
27
+ * Optional icon (when `iconPosition` is omitted. Defaults to "left")
28
28
  */
29
29
  icon?: IconName;
30
30
  };
31
- /** Vertical Tab: icon is required */
32
- export type TabPropsVertical = TabBaseProps & {
31
+ /** Tab with required icon */
32
+ type TabWithRequiredIcon = TabBaseProps & {
33
33
  /**
34
- * Required leading icon (vertical TabGroup)
34
+ * Required icon (when `iconPosition` is "left" or "top")
35
35
  */
36
36
  icon: IconName;
37
37
  };
38
38
  interface TabGroupBaseProps extends PatternProps, HTMLAttributes<HTMLDivElement> {
39
39
  /**
40
- * Pin component's name from string to the concrete name
40
+ * Component name
41
41
  */
42
42
  component?: 'TabGroup';
43
43
  /**
44
- * TabGroup width, when it's Auto, the TabGroup is scrollable horizontally
44
+ * TabGroup width
45
+ * - `"auto"` makes the tab list horizontally scrollable
46
+ * - `"full"` stretches tabs to the container width
45
47
  */
46
48
  width?: TabGroupWidth;
47
49
  /**
48
- * Controlled value of the selected tab
50
+ * Controlled value of the currently selected tab
49
51
  */
50
52
  value: string;
51
53
  /**
52
- * Callback when a tab is selected
54
+ * Callback invoked when a tab is selected
53
55
  */
54
56
  onTabChange?: (value: string) => void;
55
57
  }
56
58
  /**
57
- * Horizontal variant:
58
- * - `tabOrientation` is optional (treat missing as horizontal)
59
- * - `icon` on each tab is optional
59
+ * TabGroup props:
60
+ * - If `iconPosition` is omitted, `icon` on each tab is optional.
61
+ * - If `iconPosition` is provided ("left" | "top"), `icon` on each tab is required.
60
62
  */
61
- export interface TabGroupHorizontalProps extends TabGroupBaseProps {
62
- tabs: TabPropsHorizontal[];
63
- tabOrientation?: typeof tabOrientationHorizontal;
64
- }
65
- /**
66
- * Vertical variant:
67
- * - `tabOrientation` must be "vertical"
68
- * - `icon` on each tab is required
69
- */
70
- export interface TabGroupVerticalProps extends TabGroupBaseProps {
71
- tabs: TabPropsVertical[];
72
- tabOrientation: typeof tabOrientationVertical;
73
- }
74
- export type TabGroupProps = TabGroupHorizontalProps | TabGroupVerticalProps;
63
+ export type TabGroupProps = (TabGroupBaseProps & {
64
+ tabs: TabWithOptionalIcon[];
65
+ iconPosition?: undefined;
66
+ }) | (TabGroupBaseProps & {
67
+ tabs: TabWithRequiredIcon[];
68
+ iconPosition: IconPosition;
69
+ });
75
70
  export {};
@@ -2,7 +2,7 @@ import { TabGroupProps } from './props';
2
2
  export declare const TabGroupContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<TabGroupProps, "bottomSpacing">>> & string;
3
3
  export declare const TabGroupTabsScrollableContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<TabGroupProps, "width">>> & string;
4
4
  export declare const TabGroupTabsStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Flex').FlexProps, never>> & string & Omit<import('react').FC<import('../Flex').FlexProps>, keyof import('react').Component<any, {}, any>>;
5
- export declare const TabStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<TabGroupProps, "width" | "tabOrientation">>> & string;
5
+ export declare const TabStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<TabGroupProps, "width" | "iconPosition">>> & string;
6
6
  export declare const TabLabelStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
7
  export declare const TabGroupIndicatorStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
- export declare const PanelStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Container').ContainerProps, never>> & string & Omit<import('react').FC<import('../Container').ContainerProps>, keyof import('react').Component<any, {}, any>>;
8
+ export declare const PanelStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "react/jsx-runtime";
3
- import { a, T } from "../../index-Cy0Uf6Y5.js";
3
+ import { a, T } from "../../index-CVHmFLr5.js";
4
4
  import "../../tags-38kBhOn6.js";
5
5
  import "../../Spacing-BMQelJYr.js";
6
6
  import "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";