@vodafone_de/brix-components 9.0.4 → 10.0.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 (160) hide show
  1. package/dist/{BorderRadius-ClUShVLu.js → BorderRadius-2LdggXbQ.js} +2 -2
  2. package/dist/components/Accordion/index.js +1 -1
  3. package/dist/components/AccordionGroup/index.js +1 -1
  4. package/dist/components/ArtDirectedImage/index.d.ts +5 -0
  5. package/dist/components/ArtDirectedImage/index.js +75 -0
  6. package/dist/components/ArtDirectedImage/props.d.ts +24 -0
  7. package/dist/components/ArtDirectedImage/styled.d.ts +2 -0
  8. package/dist/components/ArtDirectedImage/validate.d.ts +3 -0
  9. package/dist/components/Badge/index.js +2 -3
  10. package/dist/components/Body/index.js +4 -5
  11. package/dist/components/BottomBar/index.js +4 -4
  12. package/dist/components/BottomBar/props.d.ts +1 -1
  13. package/dist/components/Button/index.js +4 -5
  14. package/dist/components/ButtonAsLink/index.js +2 -3
  15. package/dist/components/ButtonGroup/index.js +6 -6
  16. package/dist/components/ButtonGroup/props.d.ts +2 -2
  17. package/dist/components/ButtonGroup/validate.d.ts +2 -2
  18. package/dist/components/Calendar/index.js +305 -72
  19. package/dist/components/Card/index.js +3 -3
  20. package/dist/components/Carousel/index.js +6 -7
  21. package/dist/components/Checkbox/index.js +2 -2
  22. package/dist/components/CheckboxGroup/index.js +2 -2
  23. package/dist/components/Collapsible/index.js +19 -5
  24. package/dist/components/Collapsible/props.d.ts +5 -0
  25. package/dist/components/Collapsible/styled.d.ts +1 -1
  26. package/dist/components/ColorSwatch/index.js +1 -1
  27. package/dist/components/ColorSwatchGroup/index.js +2 -2
  28. package/dist/components/ConsentMessage/index.js +2 -2
  29. package/dist/components/Container/index.d.ts +1 -0
  30. package/dist/components/Container/index.js +10 -105
  31. package/dist/components/Container/styled.d.ts +2 -0
  32. package/dist/components/DateInput/index.js +1 -1
  33. package/dist/components/DemoBox/index.js +1 -1
  34. package/dist/components/Dialog/index.js +1 -1
  35. package/dist/components/DiscoveryCard/index.js +14 -11
  36. package/dist/components/DiscoveryCard/styled.d.ts +1 -1
  37. package/dist/components/DiscoveryCardGroup/index.js +12 -10
  38. package/dist/components/Divider/index.js +1 -1
  39. package/dist/components/EnergySnippet/index.js +2 -2
  40. package/dist/components/Fieldset/index.js +1 -1
  41. package/dist/components/FilterGroup/index.js +3 -3
  42. package/dist/components/Flex/index.js +5 -2
  43. package/dist/components/Flex/props.d.ts +11 -3
  44. package/dist/components/Flex/stories/alignCenterArgs.d.ts +2 -0
  45. package/dist/components/Flex/stories/alignEndArgs.d.ts +2 -0
  46. package/dist/components/Flex/stories/alignStartArgs.d.ts +2 -0
  47. package/dist/components/Flex/styled.d.ts +3 -2
  48. package/dist/components/FlexItem/index.js +1 -1
  49. package/dist/components/FootnoteContent/index.js +1 -1
  50. package/dist/components/FootnoteLink/index.js +2 -2
  51. package/dist/components/Form/index.js +2 -2
  52. package/dist/components/FormElement/index.js +1 -1
  53. package/dist/components/GoogleMap/index.js +2 -2
  54. package/dist/components/Grid/index.d.ts +3 -1
  55. package/dist/components/Grid/index.js +16 -91
  56. package/dist/components/GridItem/index.d.ts +7 -0
  57. package/dist/components/GridItem/index.js +11 -54
  58. package/dist/components/Heading/index.js +4 -5
  59. package/dist/components/HifiIcon/index.js +1 -1
  60. package/dist/components/IconButton/index.js +3 -3
  61. package/dist/components/IconSnippet/index.js +3 -3
  62. package/dist/components/IconSnippetList/index.js +2 -3
  63. package/dist/components/Image/index.js +111 -52
  64. package/dist/components/Image/props.d.ts +21 -35
  65. package/dist/components/Image/styled.d.ts +1 -1
  66. package/dist/components/Image/validate.d.ts +1 -4
  67. package/dist/components/ImageHeader/index.js +18 -25
  68. package/dist/components/ImageHeader/props.d.ts +2 -2
  69. package/dist/components/ImageHeader/styled.d.ts +1 -1
  70. package/dist/components/InfoBanner/index.js +1 -1
  71. package/dist/components/InlineIcon/index.js +1 -1
  72. package/dist/components/InlineLink/index.js +1 -1
  73. package/dist/components/Input/index.js +2 -3
  74. package/dist/components/Label/index.js +2 -3
  75. package/dist/components/Legend/index.js +1 -1
  76. package/dist/components/Link/index.js +4 -5
  77. package/dist/components/LinkAsButton/index.js +1 -2
  78. package/dist/components/LinkList/index.js +2 -3
  79. package/dist/components/LinkListItem/index.js +5 -5
  80. package/dist/components/LoadingSpinner/index.js +2 -2
  81. package/dist/components/LocalStyle/index.js +2 -2
  82. package/dist/components/MediaText/index.js +5 -6
  83. package/dist/components/Notification/index.js +3 -3
  84. package/dist/components/OpenTextFootnoteAdapter/index.js +3 -3
  85. package/dist/components/Overlay/index.js +1 -1
  86. package/dist/components/PickerGroup/index.js +8 -11
  87. package/dist/components/Price/index.d.ts +1 -1
  88. package/dist/components/Price/index.js +2 -3
  89. package/dist/components/ProductCard/index.js +29 -22
  90. package/dist/components/ProductCard/props.d.ts +11 -14
  91. package/dist/components/ProductCard/styled.d.ts +1 -0
  92. package/dist/components/QuickLinkList/index.js +3 -5
  93. package/dist/components/RadioGroup/index.js +2 -2
  94. package/dist/components/Rating/index.js +2 -2
  95. package/dist/components/RichText/index.js +1 -1
  96. package/dist/components/RichtTextContentful/index.js +2 -2
  97. package/dist/components/ScreenreaderOnly/index.js +1 -1
  98. package/dist/components/SearchInput/index.js +4 -5
  99. package/dist/components/SelectInput/index.js +3 -4
  100. package/dist/components/Stepper/index.js +3 -4
  101. package/dist/components/SuggestInput/index.js +4 -5
  102. package/dist/components/Switch/index.js +2 -2
  103. package/dist/components/TabGroup/index.js +2 -2
  104. package/dist/components/TabularPrice/index.js +2 -3
  105. package/dist/components/TextList/index.js +2 -3
  106. package/dist/components/Textarea/index.js +3 -4
  107. package/dist/components/TimeInput/index.js +1 -1
  108. package/dist/components/Tray/index.js +1 -1
  109. package/dist/components/UtilityLink/index.js +20 -2
  110. package/dist/components/UtilityLink/styled.d.ts +1 -0
  111. package/dist/components/YoutubeVideo/index.js +2 -2
  112. package/dist/contentful/components.d.ts +1 -1
  113. package/dist/contentful/live-preview-inspector/index.js +1 -1
  114. package/dist/contentful/live-preview-renderer/index.js +1 -1
  115. package/dist/contentful/map/artDirectedImage.d.ts +4 -0
  116. package/dist/contentful/renderer/index.js +1 -1
  117. package/dist/{cssVars-ZsZIfkeD.js → cssVars-TmhA1NpG.js} +1 -1
  118. package/dist/filterProps-CxkibNnG.js +18 -0
  119. package/dist/foundations/GlobalStyle/index.js +1 -1
  120. package/dist/getSizesFromGridConfig-DKOLupyb.js +48 -0
  121. package/dist/hooks/useImageComponent/index.d.ts +37 -0
  122. package/dist/hooks/useImageComponent/index.js +23 -0
  123. package/dist/hooks/usePictureComponent/index.d.ts +49 -0
  124. package/dist/hooks/usePictureComponent/index.js +38 -0
  125. package/dist/hooks/useViewport/index.js +5 -20
  126. package/dist/{index-ClAH0TNC.js → index-72IFVw5W.js} +14 -12
  127. package/dist/{index-BJHhIBYl.js → index-BsykXBqC.js} +1 -1
  128. package/dist/index-Bu-7sSif.js +201 -0
  129. package/dist/{index-DCE5HNIR.js → index-C2E3JrhF.js} +1 -1
  130. package/dist/{index-TL0X3rXH.js → index-DCXRnuHz.js} +7 -8
  131. package/dist/index-DKCzYjXw.js +25 -0
  132. package/dist/{index-C4eCcl02.js → index-DP6Nlg-a.js} +4 -5
  133. package/dist/index-DbG0QL9D.js +113 -0
  134. package/dist/{index-CEotMXpL.js → index-Dd-A7i9Y.js} +3 -4
  135. package/dist/{index-j22agtAk.js → index-DwGcrvTh.js} +4 -5
  136. package/dist/index.d.ts +4 -2
  137. package/dist/index.js +213 -212
  138. package/dist/{mapContentToComponents-C_O2rRrX.js → mapContentToComponents-DcPjYAXH.js} +155 -140
  139. package/dist/{styled-Dw5c-xwf.js → styled-BIcsESkS.js} +1 -1
  140. package/dist/{styled-7vJ7mrAA.js → styled-BKH3egch.js} +2 -2
  141. package/dist/{styled-BxkvYuWW.js → styled-CUp4EbPh.js} +23 -2
  142. package/dist/{styled-BBXC0aka.js → styled-D-fzMZNS.js} +1 -1
  143. package/dist/{styled-0KSRG-Fv.js → styled-DdeOXNN9.js} +26 -4
  144. package/dist/{styled-xKyZg4q9.js → styled-DmMk0W0J.js} +2 -2
  145. package/dist/{styled-Dq0NuP5r.js → styled-rsUoUFyl.js} +2 -2
  146. package/dist/{tags-D7CRQqc1.js → tags-Cwgg3Gx2.js} +7 -7
  147. package/dist/{validate-Dlzxlfzp.js → validate-CLBUbscx.js} +4 -6
  148. package/package.json +1 -1
  149. package/dist/Viewport-C35jx6QE.js +0 -8
  150. package/dist/components/ResponsiveImage/index.d.ts +0 -6
  151. package/dist/components/ResponsiveImage/index.js +0 -124
  152. package/dist/components/ResponsiveImage/props.d.ts +0 -16
  153. package/dist/components/ResponsiveImage/styled.d.ts +0 -4
  154. package/dist/components/ResponsiveImage/validate.d.ts +0 -3
  155. package/dist/components/ResponsiveImage/validate.test.d.ts +0 -1
  156. package/dist/contentful/map/responsiveImage.d.ts +0 -4
  157. package/dist/filterProps-BJ5SpbnA.js +0 -17
  158. package/dist/renderInlineRichTextFromOpenText-RvOG3QbI.js +0 -13
  159. package/dist/styled-BiCOjvNq.js +0 -29
  160. package/dist/validate-DYmFz2FF.js +0 -85
@@ -1,124 +0,0 @@
1
- "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
3
- import { a as breakpoint_large, b as breakpoint_medium } from "../../breakpoint-CzBSbbY7.js";
4
- import { s as spacingMd } from "../../Spacing-8v6hcO2x.js";
5
- import styled from "styled-components";
6
- import viewport from "../../foundations/media-query/viewport/index.js";
7
- import { getBorderRadius } from "../../foundations/token/getBorderRadius/index.js";
8
- import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
9
- import { b as borderRadiusMd, a as borderRadiusNone } from "../../BorderRadius-ClUShVLu.js";
10
- import { a as filterProps } from "../../filterProps-BJ5SpbnA.js";
11
- import { z as isImageProps } from "../../validate-DYmFz2FF.js";
12
- import { v as viewportSm, b as viewportMd, a as viewportLg } from "../../Viewport-C35jx6QE.js";
13
- import { i as isObject, h as hasMatchingComponentName } from "../../isObject-BYBrvoVW.js";
14
- import { i as isBottomSpacing } from "../../isBottomSpacing-BxfreCZU.js";
15
- const ResponsiveImagePictureStyled = styled.picture.withConfig({
16
- shouldForwardProp: filterProps(),
17
- displayName: "ResponsiveImagePictureStyled",
18
- componentId: "sc-1itvcas-0"
19
- })({});
20
- const ResponsiveImageStyled = styled.img.withConfig({
21
- shouldForwardProp: filterProps(),
22
- displayName: "ResponsiveImageStyled",
23
- componentId: "sc-1itvcas-1"
24
- })({
25
- display: "block",
26
- width: "100%"
27
- }, ({
28
- images
29
- }) => {
30
- var _a, _b;
31
- return {
32
- ...images.sm.objectFit && {
33
- objectFit: images.sm.objectFit
34
- },
35
- ...((_a = images.md) == null ? void 0 : _a.objectFit) && viewport.md({
36
- objectFit: images.md.objectFit
37
- }),
38
- ...((_b = images.lg) == null ? void 0 : _b.objectFit) && viewport.lg({
39
- objectFit: images.lg.objectFit
40
- })
41
- };
42
- }, ({
43
- images
44
- }) => {
45
- var _a, _b;
46
- return {
47
- ...images.sm.objectPosition && {
48
- objectPosition: images.sm.objectPosition
49
- },
50
- ...((_a = images.md) == null ? void 0 : _a.objectPosition) && viewport.md({
51
- objectPosition: images.md.objectPosition
52
- }),
53
- ...((_b = images.lg) == null ? void 0 : _b.objectPosition) && viewport.lg({
54
- objectPosition: images.lg.objectPosition
55
- })
56
- };
57
- }, ({
58
- images = {}
59
- }) => {
60
- var _a, _b, _c;
61
- return {
62
- ...((_a = images.sm) == null ? void 0 : _a.aspectRatio) && {
63
- aspectRatio: images.sm.aspectRatio
64
- },
65
- ...((_b = images.md) == null ? void 0 : _b.aspectRatio) && viewport.md({
66
- aspectRatio: images.md.aspectRatio
67
- }),
68
- ...((_c = images.lg) == null ? void 0 : _c.aspectRatio) && viewport.lg({
69
- aspectRatio: images.lg.aspectRatio
70
- })
71
- };
72
- }, ({
73
- images: {
74
- sm: {
75
- corners
76
- }
77
- }
78
- }) => ({
79
- borderRadius: corners === "rounded" ? getBorderRadius(borderRadiusMd) : getBorderRadius(borderRadiusNone)
80
- }), getBottomSpacing);
81
- const validateResponsiveImageProps = (props) => {
82
- if (!isObject(props)) {
83
- return false;
84
- }
85
- const responsiveImageProps = props;
86
- if (!hasMatchingComponentName(responsiveImageProps.component, "ResponsiveImage")) {
87
- return false;
88
- }
89
- if (!responsiveImageProps.images || !isObject(responsiveImageProps.images)) {
90
- return false;
91
- }
92
- if (!responsiveImageProps.images[viewportSm] || !isImageProps(responsiveImageProps.images[viewportSm])) {
93
- return false;
94
- }
95
- if (responsiveImageProps.images[viewportMd] !== void 0 && !isImageProps(responsiveImageProps.images[viewportMd])) {
96
- return false;
97
- }
98
- if (responsiveImageProps.images[viewportLg] !== void 0 && !isImageProps(responsiveImageProps.images[viewportLg])) {
99
- return false;
100
- }
101
- if (responsiveImageProps.bottomSpacing && !isBottomSpacing(responsiveImageProps.bottomSpacing)) {
102
- return false;
103
- }
104
- return true;
105
- };
106
- const isResponsiveImageProps = (props) => {
107
- return validateResponsiveImageProps(props);
108
- };
109
- const ResponsiveImage = ({
110
- images,
111
- bottomSpacing = spacingMd,
112
- ...props
113
- }) => /* @__PURE__ */ jsxs(ResponsiveImagePictureStyled, { ...props, children: [
114
- images.lg && /* @__PURE__ */ jsx("source", { media: `(min-width: ${breakpoint_large})`, srcSet: images.lg.src }),
115
- images.md && /* @__PURE__ */ jsx("source", { media: `(min-width: ${breakpoint_medium})`, srcSet: images.md.src }),
116
- /* @__PURE__ */ jsx(ResponsiveImageStyled, { ..."" === images.sm.alt ? {
117
- "aria-hidden": true
118
- } : {}, images, ...images.sm, bottomSpacing })
119
- ] });
120
- export {
121
- ResponsiveImage as default,
122
- isResponsiveImageProps,
123
- validateResponsiveImageProps
124
- };
@@ -1,16 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { ImageProps } from '../Image/props';
3
- import { PatternProps } from '../../foundations/PatternProps';
4
- import { ViewportName } from '../../foundations/types/Viewport';
5
- export type ResponsiveImageType = {
6
- sm: ImageProps;
7
- } & {
8
- [key in Exclude<ViewportName, 'sm'>]?: ImageProps;
9
- };
10
- export interface ResponsiveImageProps extends PatternProps, HTMLAttributes<HTMLElement> {
11
- /**
12
- * Pin component's name from string to the concrete name
13
- */
14
- component?: 'ResponsiveImage';
15
- images: ResponsiveImageType;
16
- }
@@ -1,4 +0,0 @@
1
- import { ImageProps } from '../Image/props';
2
- import { ResponsiveImageProps } from './props';
3
- export declare const ResponsiveImagePictureStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, Omit<ResponsiveImageProps, "bottomSpacing" | "images">>> & string;
4
- export declare const ResponsiveImageStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, ImageProps & Pick<ResponsiveImageProps, "images">>> & string;
@@ -1,3 +0,0 @@
1
- import { ResponsiveImageProps } from './props';
2
- export declare const validateResponsiveImageProps: (props: unknown) => props is ResponsiveImageProps;
3
- export declare const isResponsiveImageProps: (props: unknown) => props is ResponsiveImageProps;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { ResponsiveImageProps } from '../../components/ResponsiveImage';
2
- import { MapFunction } from './MapFunction';
3
- export declare const mapResponsiveImageProps: (content: unknown) => ResponsiveImageProps | false;
4
- export declare const mapResponsiveImage: MapFunction;
@@ -1,17 +0,0 @@
1
- const propsNotPassToDomDefault = ["accordionType", "activeId", "activeIndex", "setActiveId", "align", "animated", "appearance", "aspectRatio", "autoLayout", "apiKey", "backgroundImage", "badge", "border", "borderBottom", "bottomSpacing", "buttonLink", "buttons", "coloringMode", "colorSwatch", "component", "contentGridDesktopColumns", "corners", "coversFullPage", "description", "elevation", "energyClass", "expanded", "filterItems", "footnote", "gapSpacing", "grow", "handleOnClick", "handleOnToogle", "hasOverlay", "heading", "heightSm", "heightMd", "heightLg", "horizontalAlignment", "icon", "iconAlign", "iconName", "iconPosition", "imageLink", "images", "internal", "isActive", "isChecked", "isDisabled", "isFullscreen", "isInHoverRange", "isLastItemInList", "isOpen", "isOrdered", "isSelected", "isTransparentBackground", "items", "jumpToClickedItem", "justify", "justifyHorizontal", "label", "lg", "link", "loadingSpinnerChild", "mapId", "md", "message", "more", "needsBorder", "nextAriaLabel", "notificationType", "objectFit", "objectPosition", "offset", "onUpdate", "openMultiple", "orientation", "padding", "prefix", "prefixWeight", "prevAriaLabel", "price", "productId", "promoPrice", "roundedCorner", "screenReaderInstruction", "showList", "size", "sm", "spacing", "spinnerType", "status", "stretch", "strikePrice", "suffix", "tag", "textContent", "uid", "variant", "verticalPadding", "viewportHeight", "visible", "weight", "width"];
2
- const filterProps = (propsNotPassToDom = []) => {
3
- const shouldForwardProp = (prop) => {
4
- if ("string" !== typeof prop) {
5
- return false;
6
- }
7
- return ![...propsNotPassToDom, ...propsNotPassToDomDefault].includes(prop);
8
- };
9
- return shouldForwardProp;
10
- };
11
- const filterPropsForUnstyledComponent = (props) => {
12
- return Object.fromEntries(Object.entries(props).filter(([key]) => !propsNotPassToDomDefault.includes(key)));
13
- };
14
- export {
15
- filterProps as a,
16
- filterPropsForUnstyledComponent as f
17
- };
@@ -1,13 +0,0 @@
1
- import parse from "html-react-parser";
2
- const renderInlineRichTextFromOpenText = (fromCms) => {
3
- if (typeof fromCms === "string") {
4
- return parse(fromCms);
5
- }
6
- if (Array.isArray(fromCms)) {
7
- return fromCms.map(renderInlineRichTextFromOpenText);
8
- }
9
- return fromCms;
10
- };
11
- export {
12
- renderInlineRichTextFromOpenText as r
13
- };
@@ -1,29 +0,0 @@
1
- import styled from "styled-components";
2
- import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
3
- import { getSpacing } from "./foundations/token/getSpacing/index.js";
4
- import { s as spacingMd } from "./Spacing-8v6hcO2x.js";
5
- import { a as filterProps } from "./filterProps-BJ5SpbnA.js";
6
- const GridStyled = styled.div.withConfig({
7
- shouldForwardProp: filterProps(),
8
- displayName: "GridStyled",
9
- componentId: "sc-1ydkxh9-0"
10
- })({
11
- boxSizing: "border-box",
12
- display: "flex",
13
- flexWrap: "wrap"
14
- }, ({
15
- align = "left"
16
- }) => ({
17
- justifyContent: align
18
- }), ({
19
- stretch = false
20
- }) => ({
21
- alignItems: stretch ? "stretch" : "flex-start"
22
- }), ({
23
- spacing = spacingMd
24
- }) => ({
25
- gap: getSpacing(spacing)
26
- }), getBottomSpacing);
27
- export {
28
- GridStyled as G
29
- };
@@ -1,85 +0,0 @@
1
- import { c as cornerStraight, a as cornerRounded } from "./CornerStyle-JEbGNArR.js";
2
- import { i as isObject, h as hasMatchingComponentName } from "./isObject-BYBrvoVW.js";
3
- const objectFitContain = "contain";
4
- const objectFitCover = "cover";
5
- const objectFitNone = "none";
6
- const horizontalAlignmentLeft = "left";
7
- const horizontalAlignmentRight = "right";
8
- const horizontalAlignmentCenter = "center";
9
- const objectPositionCenter = "center";
10
- const objectPositionLeftTop = "top left";
11
- const objectPositionLeftCenter = "center left";
12
- const objectPositionLeftBottom = "bottom left";
13
- const objectPositionRightTop = "top right";
14
- const objectPositionRightCenter = "center right";
15
- const objectPositionRightBottom = "bottom right";
16
- const aspectRatio1_1 = "1/1";
17
- const aspectRatio4_3 = "4/3";
18
- const aspectRatio16_9 = "16/9";
19
- const aspectRatio21_9 = "21/9";
20
- const aspectRatio32_9 = "32/9";
21
- const aspectRatio48_9 = "48/9";
22
- const aspectRatios = [aspectRatio1_1, aspectRatio4_3, aspectRatio16_9, aspectRatio21_9, aspectRatio32_9, aspectRatio48_9];
23
- const objectFits = [objectFitContain, objectFitCover, objectFitNone];
24
- const objectPositions = [objectPositionCenter, objectPositionLeftTop, objectPositionLeftCenter, objectPositionLeftBottom, objectPositionRightTop, objectPositionRightCenter, objectPositionRightBottom];
25
- const horizontalAlignments = [horizontalAlignmentLeft, horizontalAlignmentRight, horizontalAlignmentCenter];
26
- const cornerStyles = [cornerStraight, cornerRounded];
27
- const validateImageProps = (props) => {
28
- if (!isObject(props)) {
29
- return false;
30
- }
31
- const p = props;
32
- if (!hasMatchingComponentName(p.component, "Image")) {
33
- return false;
34
- }
35
- if (!p.src || typeof p.src !== "string") {
36
- return false;
37
- }
38
- if (!p.aspectRatio || !aspectRatios.includes(p.aspectRatio)) {
39
- return false;
40
- }
41
- if (p.objectFit !== void 0 && !objectFits.includes(p.objectFit)) {
42
- return false;
43
- }
44
- if (p.objectPosition !== void 0 && !objectPositions.includes(p.objectPosition)) {
45
- return false;
46
- }
47
- if (p.horizontalAlignment !== void 0 && !horizontalAlignments.includes(p.horizontalAlignment)) {
48
- return false;
49
- }
50
- if (p.corners !== void 0 && !cornerStyles.includes(p.corners)) {
51
- return false;
52
- }
53
- return true;
54
- };
55
- const isImageProps = (props) => {
56
- return validateImageProps(props);
57
- };
58
- export {
59
- objectFitCover as a,
60
- objectFitNone as b,
61
- horizontalAlignmentRight as c,
62
- horizontalAlignmentCenter as d,
63
- objectPositionCenter as e,
64
- objectPositionLeftTop as f,
65
- objectPositionLeftCenter as g,
66
- horizontalAlignmentLeft as h,
67
- objectPositionLeftBottom as i,
68
- objectPositionRightTop as j,
69
- objectPositionRightCenter as k,
70
- objectPositionRightBottom as l,
71
- aspectRatio1_1 as m,
72
- aspectRatio4_3 as n,
73
- objectFitContain as o,
74
- aspectRatio16_9 as p,
75
- aspectRatio21_9 as q,
76
- aspectRatio32_9 as r,
77
- aspectRatio48_9 as s,
78
- aspectRatios as t,
79
- objectFits as u,
80
- objectPositions as v,
81
- horizontalAlignments as w,
82
- cornerStyles as x,
83
- validateImageProps as y,
84
- isImageProps as z
85
- };