@odx/websites-react 0.0.3 → 0.0.5
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/components/actions/button/Button.d.ts +3 -3
- package/dist/components/actions/button/Button.d.ts.map +1 -1
- package/dist/components/actions/button/Button.js +4 -4
- package/dist/components/actions/button/Button.js.map +1 -1
- package/dist/components/actions/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/actions/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/actions/checkbox/Checkbox.js +4 -4
- package/dist/components/actions/checkbox/Checkbox.js.map +1 -1
- package/dist/components/actions/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/actions/combobox/Combobox.js +6 -6
- package/dist/components/actions/combobox/Combobox.js.map +1 -1
- package/dist/components/actions/dropdown/Dropdown.d.ts +1 -0
- package/dist/components/actions/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/actions/dropdown/Dropdown.js +2 -2
- package/dist/components/actions/dropdown/Dropdown.js.map +1 -1
- package/dist/components/actions/filterPanel/FilterPanel.d.ts +22 -0
- package/dist/components/actions/filterPanel/FilterPanel.d.ts.map +1 -0
- package/dist/components/actions/filterPanel/FilterPanel.js +14 -0
- package/dist/components/actions/filterPanel/FilterPanel.js.map +1 -0
- package/dist/components/actions/filterPanel/index.d.ts +2 -0
- package/dist/components/actions/filterPanel/index.d.ts.map +1 -0
- package/dist/components/actions/filterPanel/index.js +2 -0
- package/dist/components/actions/filterPanel/index.js.map +1 -0
- package/dist/components/actions/formField/FormField.d.ts +4 -1
- package/dist/components/actions/formField/FormField.d.ts.map +1 -1
- package/dist/components/actions/formField/FormField.js +12 -1
- package/dist/components/actions/formField/FormField.js.map +1 -1
- package/dist/components/actions/multiselect/Multiselect.d.ts +1 -0
- package/dist/components/actions/multiselect/Multiselect.d.ts.map +1 -1
- package/dist/components/actions/multiselect/Multiselect.js +3 -3
- package/dist/components/actions/multiselect/Multiselect.js.map +1 -1
- package/dist/components/actions/phoneInput/PhoneInput.d.ts +2 -1
- package/dist/components/actions/phoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/components/actions/phoneInput/PhoneInput.js +7 -5
- package/dist/components/actions/phoneInput/PhoneInput.js.map +1 -1
- package/dist/components/actions/radioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/actions/radioGroup/RadioGroup.js +6 -6
- package/dist/components/actions/radioGroup/RadioGroup.js.map +1 -1
- package/dist/components/actions/search/Search.d.ts +13 -0
- package/dist/components/actions/search/Search.d.ts.map +1 -0
- package/dist/components/actions/search/Search.js +33 -0
- package/dist/components/actions/search/Search.js.map +1 -0
- package/dist/components/actions/search/index.d.ts +2 -0
- package/dist/components/actions/search/index.d.ts.map +1 -0
- package/dist/components/actions/search/index.js +2 -0
- package/dist/components/actions/search/index.js.map +1 -0
- package/dist/components/actions/select/Select.d.ts +2 -2
- package/dist/components/actions/select/Select.d.ts.map +1 -1
- package/dist/components/actions/select/Select.js +3 -3
- package/dist/components/actions/select/Select.js.map +1 -1
- package/dist/components/actions/tag/Tag.js +2 -2
- package/dist/components/actions/tag/Tag.js.map +1 -1
- package/dist/components/actions/text-input/TextInput.d.ts +0 -4
- package/dist/components/actions/text-input/TextInput.d.ts.map +1 -1
- package/dist/components/actions/text-input/TextInput.js +2 -2
- package/dist/components/actions/text-input/TextInput.js.map +1 -1
- package/dist/components/actions/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/actions/textarea/Textarea.js +2 -2
- package/dist/components/actions/textarea/Textarea.js.map +1 -1
- package/dist/components/actions/toggle-button/ToggleButton.d.ts.map +1 -1
- package/dist/components/actions/toggle-button/ToggleButton.js +3 -2
- package/dist/components/actions/toggle-button/ToggleButton.js.map +1 -1
- package/dist/components/images-icons/svg-icon/SvgIcon.d.ts +1 -1
- package/dist/components/images-icons/svg-icon/SvgIcon.d.ts.map +1 -1
- package/dist/components/images-icons/svg-icon/SvgIcon.js +2 -0
- package/dist/components/images-icons/svg-icon/SvgIcon.js.map +1 -1
- package/dist/components/index.d.ts +10 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/accordion/Accordion.d.ts +4 -3
- package/dist/components/layout/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/layout/accordion/Accordion.js +17 -58
- package/dist/components/layout/accordion/Accordion.js.map +1 -1
- package/dist/components/layout/accordion/AccordionContext.d.ts +2 -2
- package/dist/components/layout/accordion/AccordionContext.d.ts.map +1 -1
- package/dist/components/layout/accordion/AccordionContext.js +3 -3
- package/dist/components/layout/accordion/AccordionContext.js.map +1 -1
- package/dist/components/layout/calloutMedia/CalloutMedia.d.ts +13 -0
- package/dist/components/layout/calloutMedia/CalloutMedia.d.ts.map +1 -0
- package/dist/components/layout/calloutMedia/CalloutMedia.js +10 -0
- package/dist/components/layout/calloutMedia/CalloutMedia.js.map +1 -0
- package/dist/components/layout/calloutMedia/index.d.ts +2 -0
- package/dist/components/layout/calloutMedia/index.d.ts.map +1 -0
- package/dist/components/layout/calloutMedia/index.js +2 -0
- package/dist/components/layout/calloutMedia/index.js.map +1 -0
- package/dist/components/layout/calloutQuote/CalloutQuote.d.ts +14 -0
- package/dist/components/layout/calloutQuote/CalloutQuote.d.ts.map +1 -0
- package/dist/components/layout/calloutQuote/CalloutQuote.js +29 -0
- package/dist/components/layout/calloutQuote/CalloutQuote.js.map +1 -0
- package/dist/components/layout/calloutQuote/index.d.ts +2 -0
- package/dist/components/layout/calloutQuote/index.d.ts.map +1 -0
- package/dist/components/layout/calloutQuote/index.js +2 -0
- package/dist/components/layout/calloutQuote/index.js.map +1 -0
- package/dist/components/layout/card/Card.d.ts +8 -6
- package/dist/components/layout/card/Card.d.ts.map +1 -1
- package/dist/components/layout/card/Card.js +11 -9
- package/dist/components/layout/card/Card.js.map +1 -1
- package/dist/components/layout/card/CardGroup.d.ts +9 -0
- package/dist/components/layout/card/CardGroup.d.ts.map +1 -0
- package/dist/components/layout/card/CardGroup.js +5 -0
- package/dist/components/layout/card/CardGroup.js.map +1 -0
- package/dist/components/layout/card/index.d.ts +1 -0
- package/dist/components/layout/card/index.d.ts.map +1 -1
- package/dist/components/layout/card/index.js +1 -0
- package/dist/components/layout/card/index.js.map +1 -1
- package/dist/components/layout/carousel/Carousel.d.ts +21 -0
- package/dist/components/layout/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/layout/carousel/Carousel.js +52 -0
- package/dist/components/layout/carousel/Carousel.js.map +1 -0
- package/dist/components/layout/carousel/index.d.ts +2 -0
- package/dist/components/layout/carousel/index.d.ts.map +1 -0
- package/dist/components/layout/carousel/index.js +2 -0
- package/dist/components/layout/carousel/index.js.map +1 -0
- package/dist/components/layout/contentItem/ContentItem.d.ts +21 -0
- package/dist/components/layout/contentItem/ContentItem.d.ts.map +1 -0
- package/dist/components/layout/contentItem/ContentItem.js +10 -0
- package/dist/components/layout/contentItem/ContentItem.js.map +1 -0
- package/dist/components/layout/contentItem/index.d.ts +2 -0
- package/dist/components/layout/contentItem/index.d.ts.map +1 -0
- package/dist/components/layout/contentItem/index.js +2 -0
- package/dist/components/layout/contentItem/index.js.map +1 -0
- package/dist/components/layout/modal/Modal.js +1 -1
- package/dist/components/layout/showMore/ShowMore.d.ts.map +1 -1
- package/dist/components/layout/showMore/ShowMore.js +4 -5
- package/dist/components/layout/showMore/ShowMore.js.map +1 -1
- package/dist/components/layout/slimRichText/SlimRichText.d.ts +13 -0
- package/dist/components/layout/slimRichText/SlimRichText.d.ts.map +1 -0
- package/dist/components/layout/slimRichText/SlimRichText.js +44 -0
- package/dist/components/layout/slimRichText/SlimRichText.js.map +1 -0
- package/dist/components/layout/slimRichText/index.d.ts +2 -0
- package/dist/components/layout/slimRichText/index.d.ts.map +1 -0
- package/dist/components/layout/slimRichText/index.js +2 -0
- package/dist/components/layout/slimRichText/index.js.map +1 -0
- package/dist/components/layout/structuredList/StructuredList.d.ts +10 -0
- package/dist/components/layout/structuredList/StructuredList.d.ts.map +1 -0
- package/dist/components/layout/structuredList/StructuredList.js +10 -0
- package/dist/components/layout/structuredList/StructuredList.js.map +1 -0
- package/dist/components/layout/structuredList/StructuredListItem.d.ts +23 -0
- package/dist/components/layout/structuredList/StructuredListItem.d.ts.map +1 -0
- package/dist/components/layout/structuredList/StructuredListItem.js +12 -0
- package/dist/components/layout/structuredList/StructuredListItem.js.map +1 -0
- package/dist/components/layout/structuredList/index.d.ts +3 -0
- package/dist/components/layout/structuredList/index.d.ts.map +1 -0
- package/dist/components/layout/structuredList/index.js +3 -0
- package/dist/components/layout/structuredList/index.js.map +1 -0
- package/dist/components/layout/tabBar/TabBar.d.ts +30 -0
- package/dist/components/layout/tabBar/TabBar.d.ts.map +1 -0
- package/dist/components/layout/tabBar/TabBar.js +118 -0
- package/dist/components/layout/tabBar/TabBar.js.map +1 -0
- package/dist/components/layout/tabBar/TabBarContext.d.ts +9 -0
- package/dist/components/layout/tabBar/TabBarContext.d.ts.map +1 -0
- package/dist/components/layout/tabBar/TabBarContext.js +8 -0
- package/dist/components/layout/tabBar/TabBarContext.js.map +1 -0
- package/dist/components/layout/tabBar/index.d.ts.map +1 -0
- package/dist/components/layout/tabBar/index.js.map +1 -0
- package/dist/components/navigation/{tabbar/TabBar.d.ts → anchorNav/AnchorNav.d.ts} +7 -7
- package/dist/components/navigation/anchorNav/AnchorNav.d.ts.map +1 -0
- package/dist/components/navigation/{tabbar/TabBar.js → anchorNav/AnchorNav.js} +11 -11
- package/dist/components/navigation/anchorNav/AnchorNav.js.map +1 -0
- package/dist/components/navigation/anchorNav/index.d.ts +2 -0
- package/dist/components/navigation/anchorNav/index.d.ts.map +1 -0
- package/dist/components/navigation/anchorNav/index.js +2 -0
- package/dist/components/navigation/anchorNav/index.js.map +1 -0
- package/dist/components/typography/headline/Headline.d.ts +1 -0
- package/dist/components/typography/headline/Headline.d.ts.map +1 -1
- package/dist/components/typography/headline/Headline.js +5 -5
- package/dist/components/typography/headline/Headline.js.map +1 -1
- package/dist/icons/uncolored/DraegerIconSetUncolored.d.ts.map +1 -1
- package/dist/icons/uncolored/DraegerIconSetUncolored.js +2 -0
- package/dist/icons/uncolored/DraegerIconSetUncolored.js.map +1 -1
- package/dist/icons/uncolored/IconReload.d.ts +4 -0
- package/dist/icons/uncolored/IconReload.d.ts.map +1 -0
- package/dist/icons/uncolored/IconReload.js +4 -0
- package/dist/icons/uncolored/IconReload.js.map +1 -0
- package/dist/icons/uncolored/index.d.ts +1 -0
- package/dist/icons/uncolored/index.d.ts.map +1 -1
- package/dist/icons/uncolored/index.js +1 -0
- package/dist/icons/uncolored/index.js.map +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/web/boxes/accordionBox/AccordionBox.d.ts +2 -4
- package/dist/web/boxes/accordionBox/AccordionBox.d.ts.map +1 -1
- package/dist/web/boxes/accordionBox/AccordionBox.js +3 -5
- package/dist/web/boxes/accordionBox/AccordionBox.js.map +1 -1
- package/dist/web/boxes/downloadBox/DownloadBox.d.ts +2 -2
- package/dist/web/boxes/downloadBox/DownloadBox.d.ts.map +1 -1
- package/dist/web/boxes/downloadBox/DownloadBox.js +2 -3
- package/dist/web/boxes/downloadBox/DownloadBox.js.map +1 -1
- package/dist/web/boxes/downloadBox/DownloadBoxItem.d.ts +2 -2
- package/dist/web/boxes/downloadBox/DownloadBoxItem.d.ts.map +1 -1
- package/dist/web/boxes/downloadBox/DownloadBoxItem.js +2 -2
- package/dist/web/boxes/downloadBox/DownloadBoxItem.js.map +1 -1
- package/dist/web/boxes/linkListBox/linkListBox.js +1 -1
- package/dist/web/boxes/mediaTeaserBox/MediaTeaserBox.js +2 -2
- package/dist/web/boxes/mediaTeaserBox/MediaTeaserBox.js.map +1 -1
- package/dist/web/boxes/multiColumnTableBox/MultiColumnTableBox.d.ts +2 -2
- package/dist/web/boxes/multiColumnTableBox/MultiColumnTableBox.d.ts.map +1 -1
- package/dist/web/boxes/multiColumnTableBox/MultiColumnTableBox.js +2 -2
- package/dist/web/boxes/multiColumnTableBox/MultiColumnTableBox.js.map +1 -1
- package/dist/web/boxes/textBox/TextBox.js +1 -1
- package/dist/web/boxes/textBox/TextBox.js.map +1 -1
- package/dist/web/index.d.ts +9 -3
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +9 -3
- package/dist/web/index.js.map +1 -1
- package/dist/web/layout/contentHeadings/ContentHeadings.d.ts +9 -0
- package/dist/web/layout/contentHeadings/ContentHeadings.d.ts.map +1 -0
- package/dist/web/layout/contentHeadings/ContentHeadings.js +9 -0
- package/dist/web/layout/contentHeadings/ContentHeadings.js.map +1 -0
- package/dist/web/layout/contentHeadings/index.d.ts +2 -0
- package/dist/web/layout/contentHeadings/index.d.ts.map +1 -0
- package/dist/web/layout/contentHeadings/index.js +2 -0
- package/dist/web/layout/contentHeadings/index.js.map +1 -0
- package/dist/web/pageTemplates/sitemap/Sitemap.d.ts +13 -0
- package/dist/web/pageTemplates/sitemap/Sitemap.d.ts.map +1 -0
- package/dist/web/pageTemplates/sitemap/Sitemap.js +11 -0
- package/dist/web/pageTemplates/sitemap/Sitemap.js.map +1 -0
- package/dist/web/pageTemplates/sitemap/index.d.ts +2 -0
- package/dist/web/pageTemplates/sitemap/index.d.ts.map +1 -0
- package/dist/web/pageTemplates/sitemap/index.js +2 -0
- package/dist/web/pageTemplates/sitemap/index.js.map +1 -0
- package/dist/web/sections/calloutContact/CalloutContact.d.ts +16 -0
- package/dist/web/sections/calloutContact/CalloutContact.d.ts.map +1 -0
- package/dist/web/sections/calloutContact/CalloutContact.js +15 -0
- package/dist/web/sections/calloutContact/CalloutContact.js.map +1 -0
- package/dist/web/sections/calloutContact/index.d.ts +2 -0
- package/dist/web/sections/calloutContact/index.d.ts.map +1 -0
- package/dist/web/sections/calloutContact/index.js +2 -0
- package/dist/web/sections/calloutContact/index.js.map +1 -0
- package/package.json +7 -5
- package/dist/components/layout/resultList/ResultList.d.ts +0 -13
- package/dist/components/layout/resultList/ResultList.d.ts.map +0 -1
- package/dist/components/layout/resultList/ResultList.js +0 -14
- package/dist/components/layout/resultList/ResultList.js.map +0 -1
- package/dist/components/layout/resultList/ResultListContext.d.ts +0 -13
- package/dist/components/layout/resultList/ResultListContext.d.ts.map +0 -1
- package/dist/components/layout/resultList/ResultListContext.js +0 -13
- package/dist/components/layout/resultList/ResultListContext.js.map +0 -1
- package/dist/components/layout/resultList/ResultListItem.d.ts +0 -33
- package/dist/components/layout/resultList/ResultListItem.d.ts.map +0 -1
- package/dist/components/layout/resultList/ResultListItem.js +0 -26
- package/dist/components/layout/resultList/ResultListItem.js.map +0 -1
- package/dist/components/layout/resultList/index.d.ts +0 -3
- package/dist/components/layout/resultList/index.d.ts.map +0 -1
- package/dist/components/layout/resultList/index.js +0 -3
- package/dist/components/layout/resultList/index.js.map +0 -1
- package/dist/components/navigation/tabbar/TabBar.d.ts.map +0 -1
- package/dist/components/navigation/tabbar/TabBar.js.map +0 -1
- package/dist/components/navigation/tabbar/index.d.ts.map +0 -1
- package/dist/components/navigation/tabbar/index.js.map +0 -1
- package/dist/components/typography/richText/RichText.d.ts +0 -9
- package/dist/components/typography/richText/RichText.d.ts.map +0 -1
- package/dist/components/typography/richText/RichText.js +0 -3
- package/dist/components/typography/richText/RichText.js.map +0 -1
- package/dist/components/typography/richText/index.d.ts +0 -2
- package/dist/components/typography/richText/index.d.ts.map +0 -1
- package/dist/components/typography/richText/index.js +0 -2
- package/dist/components/typography/richText/index.js.map +0 -1
- package/dist/web/sections/contactUsSection/ContactUsSection.d.ts +0 -19
- package/dist/web/sections/contactUsSection/ContactUsSection.d.ts.map +0 -1
- package/dist/web/sections/contactUsSection/ContactUsSection.js +0 -17
- package/dist/web/sections/contactUsSection/ContactUsSection.js.map +0 -1
- package/dist/web/sections/contactUsSection/index.d.ts +0 -2
- package/dist/web/sections/contactUsSection/index.d.ts.map +0 -1
- package/dist/web/sections/contactUsSection/index.js +0 -2
- package/dist/web/sections/contactUsSection/index.js.map +0 -1
- package/dist/web/sections/contentImageSection/ContentImageSection.d.ts +0 -13
- package/dist/web/sections/contentImageSection/ContentImageSection.d.ts.map +0 -1
- package/dist/web/sections/contentImageSection/ContentImageSection.js +0 -9
- package/dist/web/sections/contentImageSection/ContentImageSection.js.map +0 -1
- package/dist/web/sections/contentImageSection/index.d.ts +0 -2
- package/dist/web/sections/contentImageSection/index.d.ts.map +0 -1
- package/dist/web/sections/contentImageSection/index.js +0 -2
- package/dist/web/sections/contentImageSection/index.js.map +0 -1
- package/dist/web/sections/quoteSection/QuoteSection.d.ts +0 -15
- package/dist/web/sections/quoteSection/QuoteSection.d.ts.map +0 -1
- package/dist/web/sections/quoteSection/QuoteSection.js +0 -37
- package/dist/web/sections/quoteSection/QuoteSection.js.map +0 -1
- package/dist/web/sections/quoteSection/index.d.ts +0 -2
- package/dist/web/sections/quoteSection/index.d.ts.map +0 -1
- package/dist/web/sections/quoteSection/index.js +0 -2
- package/dist/web/sections/quoteSection/index.js.map +0 -1
- /package/dist/components/{navigation/tabbar → layout/tabBar}/index.d.ts +0 -0
- /package/dist/components/{navigation/tabbar → layout/tabBar}/index.js +0 -0
|
@@ -8,7 +8,8 @@ import { AccordionContext, AccordionItemContext, useAccordionItemContext, } from
|
|
|
8
8
|
import { SvgIcon } from '../../images-icons/svg-icon';
|
|
9
9
|
import { IconChevronDown } from '../../../icons';
|
|
10
10
|
import { ContentArea } from '../contentArea';
|
|
11
|
-
|
|
11
|
+
import { Headline } from '../../typography/headline';
|
|
12
|
+
const Accordion = ({ defaultValues = [], children, className, size = 'md', ...props }) => {
|
|
12
13
|
const [activeItems, setActiveItems] = React.useState(defaultValues);
|
|
13
14
|
const toggleItem = (item) => {
|
|
14
15
|
if (activeItems.includes(item)) {
|
|
@@ -16,80 +17,38 @@ const Accordion = ({ defaultValues = [], children, className, theme = 'light', s
|
|
|
16
17
|
setActiveItems(updatedItems);
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
|
-
setActiveItems(
|
|
20
|
+
setActiveItems([item]);
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
|
-
return (_jsx(AccordionContext.Provider, { value: { activeItems, toggleItem,
|
|
23
|
+
return (_jsx(AccordionContext.Provider, { value: { activeItems, toggleItem, size }, children: _jsx(ContentArea, { ...props, className: cn('font-text flex flex-col border-t border-t-draeger-cool-gray-250', className), children: children }) }));
|
|
23
24
|
};
|
|
24
|
-
const baseAccordionItemToggleClassName = 'w-full
|
|
25
|
-
|
|
26
|
-
const accordionItemToggleLightVariants = cva(baseAccordionItemToggleClassName, {
|
|
25
|
+
const baseAccordionItemToggleClassName = 'disabled:pointer-events-none px-6 w-full cursor-pointer flex justify-between align-middle font-text font-semibold text-2xl leading-7 focus:outline-none focus:ring-2 focus:ring-draeger-air-blue hover:bg-draeger-field-disabled';
|
|
26
|
+
const accordionToggleVariants = cva(baseAccordionItemToggleClassName, {
|
|
27
27
|
variants: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
size: {
|
|
29
|
+
sm: 'py-1.5',
|
|
30
|
+
md: 'py-2.5',
|
|
31
|
+
lg: 'py-4',
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
defaultVariants: {
|
|
34
|
-
|
|
35
|
+
size: 'md',
|
|
35
36
|
},
|
|
36
37
|
});
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
closed: 'text-draeger-white',
|
|
41
|
-
expanded: 'text-draeger-cool-gray-500',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
state: 'closed',
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
const AccordionItemToggle = ({ headline, className, ...props }) => {
|
|
49
|
-
const { isExpanded, value, theme, toggleItem } = useAccordionItemContext();
|
|
50
|
-
const state = isExpanded ? 'expanded' : 'closed';
|
|
51
|
-
const classNameVariants = theme === 'light'
|
|
52
|
-
? accordionItemToggleLightVariants({ state, className })
|
|
53
|
-
: accordionItemToggleDarkVariants({ state, className });
|
|
54
|
-
return (_jsxs("button", { ...props, "aria-expanded": isExpanded, id: `trigger_${value}`, "aria-controls": `panel_${value}`, onClick: toggleItem, className: cn(classNameVariants), children: [headline, _jsx(SvgIcon, { size: 'md', icon: IconChevronDown, className: cn('ml-4', isExpanded && 'rotate-180 transition-all') })] }));
|
|
38
|
+
const AccordionItemToggle = ({ headline, className, headingLevel, ...props }) => {
|
|
39
|
+
const { isExpanded, value, toggleItem, size } = useAccordionItemContext();
|
|
40
|
+
return (_jsxs("button", { ...props, "aria-expanded": isExpanded, id: `trigger_${value}`, "aria-controls": `panel_${value}`, onClick: toggleItem, className: cn(accordionToggleVariants({ size }), className), children: [_jsx(Headline, { className: cn('text-draeger-dark-gray', props.disabled && 'text-draeger-cool-gray-150'), headingLevel: headingLevel || 'h6', children: headline }), _jsx(SvgIcon, { size: 'md', icon: IconChevronDown, color: props.disabled ? 'draeger-cool-gray-150' : 'draeger-cool-gray-750', className: 'ml-4' })] }));
|
|
55
41
|
};
|
|
56
42
|
const AccordionItem = ({ children, value, ...props }) => (_jsx(AccordionItemContext.Provider, { value: value, children: _jsx(AccordionItemWrapper, { ...props, children: children }) }));
|
|
57
|
-
const baseAccordionItemWrapperClassName = 'text-draeger-dark-
|
|
58
|
-
const accordionItemWrapperLightVariants = cva(baseAccordionItemWrapperClassName, {
|
|
59
|
-
variants: {
|
|
60
|
-
state: {
|
|
61
|
-
closed: 'bg-draeger-warm-gray-150',
|
|
62
|
-
expanded: 'bg-draeger-pale-blue',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
defaultVariants: {
|
|
66
|
-
state: 'closed',
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
const accordionItemWrapperDarkVariants = cva(baseAccordionItemWrapperClassName, {
|
|
70
|
-
variants: {
|
|
71
|
-
state: {
|
|
72
|
-
closed: 'bg-draeger-cool-gray-250',
|
|
73
|
-
expanded: 'bg-draeger-white',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
state: 'closed',
|
|
78
|
-
},
|
|
79
|
-
});
|
|
43
|
+
const baseAccordionItemWrapperClassName = 'text-draeger-dark-gray transition-all';
|
|
80
44
|
const AccordionItemWrapper = ({ className, children, ...props }) => {
|
|
81
|
-
|
|
82
|
-
const state = isExpanded ? 'expanded' : 'closed';
|
|
83
|
-
const classNameVariants = theme === 'light'
|
|
84
|
-
? accordionItemWrapperLightVariants({ state, className })
|
|
85
|
-
: accordionItemWrapperDarkVariants({ state, className });
|
|
86
|
-
return (_jsx("div", { ...props, className: cn(classNameVariants, isExpanded && 'pt-2'), children: children }));
|
|
45
|
+
return (_jsx("div", { ...props, className: cn('border-b border-b-draeger-cool-gray-250', baseAccordionItemWrapperClassName, className), children: children }));
|
|
87
46
|
};
|
|
88
47
|
AccordionItem.displayName = 'AccordionItem';
|
|
89
48
|
const AccordionContent = ({ children }) => {
|
|
90
49
|
const { isExpanded, value } = useAccordionItemContext();
|
|
91
50
|
const [ref, contentHeight] = useElementHeight([isExpanded]);
|
|
92
|
-
return (_jsx("div", { className: cn('transition-all duration-300 ease-in-out', isExpanded ? 'opacity-100' : 'opacity-0'
|
|
51
|
+
return (_jsx("div", { className: cn('transition-all duration-300 ease-in-out px-6', isExpanded ? 'opacity-100 pt-2 pb-8' : 'opacity-0'), role: "region", id: `panel_${value}`, "aria-labelledby": `trigger_${value}`, children: _jsx("div", { className: cn('overflow-hidden transition-[height] duration-300 ease-in-out'), style: { height: isExpanded ? `${contentHeight}px` : '0' }, children: _jsx("div", { ref: ref, hidden: !isExpanded, "aria-hidden": !isExpanded, children: children }) }) }));
|
|
93
52
|
};
|
|
94
53
|
export { Accordion, AccordionItem, AccordionContent, AccordionItemToggle };
|
|
95
54
|
//# sourceMappingURL=Accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../../src/components/layout/accordion/Accordion.tsx"],"names":[],"mappings":"AAA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5D,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,8CAA8C,EAC9C,UAAU,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,WAAW,CACnD,EACD,IAAI,EAAC,QAAQ,EACb,EAAE,EAAE,SAAS,KAAK,EAAE,qBACH,WAAW,KAAK,EAAE,YAEnC,cACE,SAAS,EAAE,EAAE,CACX,8DAA8D,CAC/D,EACD,KAAK,EAAE,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,CAAC,CAAC,CAAC,GAAG,EAAC,YAExD,cAAK,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,UAAU,iBAAe,CAAC,UAAU,YACzD,QAAQ,GACL,GACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -2,12 +2,12 @@ import * as React from 'react';
|
|
|
2
2
|
interface AccordionContextType {
|
|
3
3
|
activeItems: string[];
|
|
4
4
|
toggleItem: (item: string) => void;
|
|
5
|
-
|
|
5
|
+
size: 'lg' | 'md' | 'sm';
|
|
6
6
|
}
|
|
7
7
|
export declare const AccordionContext: React.Context<AccordionContextType>;
|
|
8
8
|
export declare const AccordionItemContext: React.Context<string>;
|
|
9
9
|
export declare const useAccordionItemContext: () => {
|
|
10
|
-
|
|
10
|
+
size: "sm" | "md" | "lg";
|
|
11
11
|
value: string;
|
|
12
12
|
isExpanded: boolean;
|
|
13
13
|
toggleItem: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContext.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/accordion/AccordionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,
|
|
1
|
+
{"version":3,"file":"AccordionContext.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/accordion/AccordionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,qCAI3B,CAAC;AAEH,eAAO,MAAM,oBAAoB,uBAA0B,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;CAOnC,CAAC"}
|
|
@@ -2,13 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
export const AccordionContext = React.createContext({
|
|
3
3
|
activeItems: [],
|
|
4
4
|
toggleItem: () => { },
|
|
5
|
-
|
|
5
|
+
size: 'sm',
|
|
6
6
|
});
|
|
7
7
|
export const AccordionItemContext = React.createContext('');
|
|
8
8
|
export const useAccordionItemContext = () => {
|
|
9
9
|
const value = React.useContext(AccordionItemContext);
|
|
10
|
-
const {
|
|
10
|
+
const { size, activeItems, toggleItem } = React.useContext(AccordionContext);
|
|
11
11
|
const isExpanded = activeItems.includes(value);
|
|
12
|
-
return {
|
|
12
|
+
return { size, value, isExpanded, toggleItem: () => toggleItem(value) };
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=AccordionContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContext.js","sourceRoot":"","sources":["../../../../src/components/layout/accordion/AccordionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAuB;IACxE,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"AccordionContext.js","sourceRoot":"","sources":["../../../../src/components/layout/accordion/AccordionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAuB;IACxE,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACrD,MAAM,EAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAE3E,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAC,CAAC;AACxE,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Image, LinkButtonProps, type SectionWrapperProps, type RichTextType } from '../..';
|
|
3
|
+
import { LinkComponent } from '../../../utils';
|
|
4
|
+
export interface CalloutMediaProps extends LinkComponent, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
headline: string;
|
|
6
|
+
copytext: RichTextType;
|
|
7
|
+
linkButtonProps: LinkButtonProps;
|
|
8
|
+
imageProps: React.ComponentProps<typeof Image>;
|
|
9
|
+
sectionProps?: SectionWrapperProps;
|
|
10
|
+
}
|
|
11
|
+
declare const CalloutMedia: React.FC<CalloutMediaProps>;
|
|
12
|
+
export { CalloutMedia };
|
|
13
|
+
//# sourceMappingURL=CalloutMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutMedia.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/calloutMedia/CalloutMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,EAIL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAK,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAIjD,MAAM,WAAW,iBACf,SAAQ,aAAa,EACnB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;IAC/C,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsC7C,CAAC;AAEF,OAAO,EAAC,YAAY,EAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Image, SectionWrapper, LinkButton, FullWidth, } from '../..';
|
|
3
|
+
import { cn } from '../../../utils';
|
|
4
|
+
import { SectionHeaderWithSubtitle } from '../../typography/sectionHeaderWithSubtitle/SectionHeaderWithSubtitle';
|
|
5
|
+
import { IconChevronDown } from '../../../icons';
|
|
6
|
+
const CalloutMedia = ({ headline, copytext, linkButtonProps, imageProps, sectionProps, LinkComponent, }) => {
|
|
7
|
+
return (_jsx(FullWidth, { children: _jsx(SectionWrapper, { className: cn('py-0', sectionProps?.className), background: 'lightSand', ...sectionProps, children: _jsxs("div", { className: "flex flex-col xl:min-h-screen xl:flex-row", children: [_jsxs("div", { className: "flex flex-col mx-auto pt-9 pb-12 px-12 basis-1/2 grow xl:basis-1/3", children: [_jsx(SectionHeaderWithSubtitle, { header: headline, subtitle: copytext.value ?? '' }), _jsx(LinkButton, { LinkComponent: LinkComponent, icon: IconChevronDown, className: cn('self-start mt-16 xl:mt-auto', linkButtonProps.className), ...linkButtonProps })] }), _jsx("div", { className: "flex basis-1/2 grow xl:basis-2/3", children: _jsx(Image, { ...imageProps, className: "w-full h-full" }) })] }) }) }));
|
|
8
|
+
};
|
|
9
|
+
export { CalloutMedia };
|
|
10
|
+
//# sourceMappingURL=CalloutMedia.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutMedia.js","sourceRoot":"","sources":["../../../../src/components/layout/calloutMedia/CalloutMedia.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,KAAK,EACL,cAAc,EACd,UAAU,EACV,SAAS,GAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,EAAE,EAAgB,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAC,yBAAyB,EAAC,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAY/C,MAAM,YAAY,GAAgC,CAAC,EACjD,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,GACd,EAAE,EAAE;IACH,OAAO,CACL,KAAC,SAAS,cACR,KAAC,cAAc,IACb,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,EAC9C,UAAU,EAAE,WAAW,KACnB,YAAY,YAEhB,eAAK,SAAS,EAAC,2CAA2C,aACxD,eAAK,SAAS,EAAC,oEAAoE,aACjF,KAAC,yBAAyB,IACxB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,QAAQ,CAAC,KAAK,IAAI,EAAE,GAC9B,EACF,KAAC,UAAU,IACT,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,eAAe,EACrB,SAAS,EAAE,EAAE,CACX,6BAA6B,EAC7B,eAAe,CAAC,SAAS,CAC1B,KACG,eAAe,GACnB,IACE,EACN,cAAK,SAAS,EAAC,kCAAkC,YAC/C,KAAC,KAAK,OAAK,UAAU,EAAE,SAAS,EAAC,eAAe,GAAG,GAC/C,IACF,GACS,GACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,YAAY,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/calloutMedia/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/calloutMedia/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export interface CalloutQuoteProps extends VariantProps<typeof blockquoteVariants> {
|
|
4
|
+
headline: string;
|
|
5
|
+
signature?: string;
|
|
6
|
+
author?: string;
|
|
7
|
+
withQuotationMark?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const blockquoteVariants: (props?: ({
|
|
10
|
+
align?: "left" | "center" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const CalloutQuote: React.FC<CalloutQuoteProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=CalloutQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutQuote.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/calloutQuote/CalloutQuote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAIhE,MAAM,WAAW,iBACf,SAAQ,YAAY,CAAC,OAAO,kBAAkB,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAcD,QAAA,MAAM,kBAAkB;;mFAUtB,CAAC;AAQH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsBpD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { BodyText } from '../..';
|
|
4
|
+
import { cn } from '../../../utils';
|
|
5
|
+
const quoteWrapperClasses = `
|
|
6
|
+
box-content px-5 pt-12 pb-16 md:pt-14 md:px-6 lg:pb-20 lg:px-9 xl:px-11
|
|
7
|
+
w-full xl:max-w-[min(calc(77.25%),theme(maxWidth.content-2))]
|
|
8
|
+
text-draeger-dark-blue bg-draeger-pale-blue
|
|
9
|
+
`;
|
|
10
|
+
const blockquoteClasses = `
|
|
11
|
+
break-words relative
|
|
12
|
+
pb-14 px-5 md:px-4 lg:pb-20
|
|
13
|
+
text-[1.8125rem] leading-[2.2475rem] lg:text-[2.1875rem] lg:leading-[2.7125rem]
|
|
14
|
+
`;
|
|
15
|
+
const blockquoteVariants = cva(blockquoteClasses, {
|
|
16
|
+
variants: {
|
|
17
|
+
align: {
|
|
18
|
+
left: 'text-left before:absolute before:left-1.5 before:md:left-0',
|
|
19
|
+
center: 'text-center',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
align: 'left',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const CalloutQuoteWrapper = ({ children }) => (_jsx("section", { className: "flex justify-center w-full mx-auto font-text xl:px-9 pb-11 xl:pb-20 2xl:pb-32", children: _jsx("div", { className: cn(quoteWrapperClasses), children: children }) }));
|
|
27
|
+
export const CalloutQuote = ({ headline, author, signature, align, withQuotationMark = false, }) => (_jsxs(CalloutQuoteWrapper, { children: [_jsx("blockquote", { className: cn(blockquoteVariants({ align }), withQuotationMark &&
|
|
28
|
+
'before:content-[open-quote] after:content-[close-quote]'), children: headline }), _jsxs("div", { className: "px-4", children: [author && _jsx(BodyText, { weight: 'bold', children: author }), signature && _jsx(BodyText, { children: signature })] })] }));
|
|
29
|
+
//# sourceMappingURL=CalloutQuote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutQuote.js","sourceRoot":"","sources":["../../../../src/components/layout/calloutQuote/CalloutQuote.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAoB,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAUlC,MAAM,mBAAmB,GAAG;;;;CAI3B,CAAC;AAEF,MAAM,iBAAiB,GAAG;;;;CAIzB,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,CAAC,iBAAiB,EAAE;IAChD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,4DAA4D;YAClE,MAAM,EAAE,aAAa;SACtB;KACF;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAsC,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,CAC7E,kBAAS,SAAS,EAAC,+EAA+E,YAChG,cAAK,SAAS,EAAE,EAAE,CAAC,mBAAmB,CAAC,YAAG,QAAQ,GAAO,GACjD,CACX,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,iBAAiB,GAAG,KAAK,GAC1B,EAAE,EAAE,CAAC,CACJ,MAAC,mBAAmB,eAClB,qBACE,SAAS,EAAE,EAAE,CACX,kBAAkB,CAAC,EAAC,KAAK,EAAC,CAAC,EAC3B,iBAAiB;gBACf,yDAAyD,CAC5D,YAEA,QAAQ,GACE,EACb,eAAK,SAAS,EAAC,MAAM,aAClB,MAAM,IAAI,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,YAAG,MAAM,GAAY,EACvD,SAAS,IAAI,KAAC,QAAQ,cAAE,SAAS,GAAY,IAC1C,IACc,CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/calloutQuote/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/calloutQuote/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ButtonProps } from '../../actions/button';
|
|
4
|
-
import {
|
|
5
|
-
export interface
|
|
6
|
-
children: React.ReactNode;
|
|
4
|
+
import { SlimRichTextProps } from '../slimRichText';
|
|
5
|
+
export interface CardSubInfoProps extends SlimRichTextProps {
|
|
7
6
|
}
|
|
8
|
-
declare const
|
|
7
|
+
declare const CardSubInfo: React.FC<CardSubInfoProps>;
|
|
9
8
|
export interface CardHeadlineProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
10
9
|
children: React.ReactNode;
|
|
11
10
|
}
|
|
12
11
|
declare const CardHeadline: React.FC<CardHeadlineProps>;
|
|
13
|
-
export interface CardBodyTextProps extends
|
|
12
|
+
export interface CardBodyTextProps extends SlimRichTextProps {
|
|
14
13
|
}
|
|
15
14
|
declare const CardBodyText: React.FC<CardBodyTextProps>;
|
|
16
15
|
export interface CardButtonProps extends Omit<ButtonProps, 'size'> {
|
|
17
16
|
}
|
|
18
17
|
declare const CardButton: React.FC<CardButtonProps>;
|
|
18
|
+
export interface CardActionsWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
}
|
|
20
|
+
declare const CardActionsWrapper: React.FC<CardActionsWrapperProps>;
|
|
19
21
|
declare const cardVariants: (props?: ({
|
|
20
22
|
variant?: "white" | "paleBlue" | "darkBlue" | null | undefined;
|
|
21
23
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -24,5 +26,5 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, Variant
|
|
|
24
26
|
children?: React.ReactNode | React.ReactNode[];
|
|
25
27
|
}
|
|
26
28
|
declare const Card: React.FC<CardProps>;
|
|
27
|
-
export { Card,
|
|
29
|
+
export { Card, CardSubInfo, CardHeadline, CardBodyText, CardButton, CardActionsWrapper, };
|
|
28
30
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAM,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAS,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAM,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;A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W,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,kBAAkB,GACnB,CAAC"}
|
|
@@ -3,16 +3,18 @@ import { cva } from 'class-variance-authority';
|
|
|
3
3
|
import { cn } from '../../../utils';
|
|
4
4
|
import { Headline } from '../../typography/headline';
|
|
5
5
|
import { Button } from '../../actions/button';
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
const CardHeadline = ({ children, className, ...props }) => (_jsx(Headline, { textColor: "inherit", headingLevel: "h3", className: cn('mb-3
|
|
9
|
-
const CardBodyText = ({
|
|
10
|
-
const CardButton = ({ children, className, ...props }) => (_jsx(Button, { size: "card", className: cn('
|
|
11
|
-
const
|
|
6
|
+
import { SlimRichText } from '../slimRichText';
|
|
7
|
+
const CardSubInfo = ({ text, className, ...props }) => (_jsx(SlimRichText, { text: text, className: cn('text-inherit leading-normal mb-5 text-lg text-draeger-cool-gray-750', className), ...props }));
|
|
8
|
+
const CardHeadline = ({ children, className, ...props }) => (_jsx(Headline, { textColor: "inherit", headingLevel: "h3", className: cn('mb-3', className), ...props, children: children }));
|
|
9
|
+
const CardBodyText = ({ text, className, ...props }) => (_jsx(SlimRichText, { text: text, textColor: "inherit", className: cn('pb-7 ', className), ...props }));
|
|
10
|
+
const CardButton = ({ children, className, ...props }) => (_jsx(Button, { size: "card", className: cn('text-base group-focus:ring-draeger-air-blue group-focus:ring-1 group-hover:bg-draeger-surface-accent-hover group-active:bg-draeger-surface-accent-click', className), ...props, children: children }));
|
|
11
|
+
const CardActionsWrapper = ({ className, children, ...props }) => (_jsx("div", { className: cn('flex flex-col gap-7 pb-8 min-h-14 items-center', className), ...props, children: children }));
|
|
12
|
+
const cardBaseClasses = 'font-text group';
|
|
13
|
+
// TODO: Delete variants when sections using paleBlue and darkBlue cards will be updated
|
|
12
14
|
const cardVariants = cva(cardBaseClasses, {
|
|
13
15
|
variants: {
|
|
14
16
|
variant: {
|
|
15
|
-
white: 'bg-draeger-
|
|
17
|
+
white: 'bg-draeger-light-sand-50 text-draeger-dark-blue',
|
|
16
18
|
paleBlue: 'bg-draeger-pale-blue text-draeger-dark-blue',
|
|
17
19
|
darkBlue: 'bg-draeger-dark-blue text-draeger-white',
|
|
18
20
|
},
|
|
@@ -22,7 +24,7 @@ const cardVariants = cva(cardBaseClasses, {
|
|
|
22
24
|
},
|
|
23
25
|
});
|
|
24
26
|
const Card = ({ imageElement, children, variant, className, ...props }) => {
|
|
25
|
-
return (_jsxs("div", { className: cn(cardVariants({ variant }), className), ...props, children: [imageElement, _jsx("div", { className: "flex flex-col
|
|
27
|
+
return (_jsxs("div", { className: cn(cardVariants({ variant }), className), ...props, children: [imageElement, _jsx("div", { className: "flex flex-col px-6 pt-9", children: children })] }));
|
|
26
28
|
};
|
|
27
|
-
export { Card,
|
|
29
|
+
export { Card, CardSubInfo, CardHeadline, CardBodyText, CardButton, CardActionsWrapper, };
|
|
28
30
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,GAAG,EAAC,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,MAAM,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,GAAG,EAAC,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,MAAM,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAC,YAAY,EAAoB,MAA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AAY,GAAG,GAAG,CAAC,eAAe,EAAE;IACxC,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,KAAK,EAAE,iDAAiD;YACxD,QAAQ,EAAE,6CAA6C;YACvD,QAAQ,EAAE,yCAAyC;SACpD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,OAAO;KACjB;CACF,CAAC,CAAC;AASH,MAAM,IAAI,GAAwB,CAAC,EACjC,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,aAC9D,YAAY,EACb,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,IACrD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EACL,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GridProps } from '../grid';
|
|
3
|
+
export interface CardGroupProps extends Omit<GridProps, 'cols'> {
|
|
4
|
+
children: React.ReactNode[];
|
|
5
|
+
size: 3 | 4;
|
|
6
|
+
}
|
|
7
|
+
declare const CardGroup: React.FC<CardGroupProps>;
|
|
8
|
+
export { CardGroup };
|
|
9
|
+
//# sourceMappingURL=CardGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/CardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,SAAS,EAAC,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;CACb;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAWvC,CAAC;AAEF,OAAO,EAAC,SAAS,EAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid, GridItem } from '../grid';
|
|
3
|
+
const CardGroup = ({ children, className, size, ...props }) => (_jsx(Grid, { cols: size, className: className, ...props, children: children.map((child, index) => (_jsx(GridItem, { children: child }, index))) }));
|
|
4
|
+
export { CardGroup };
|
|
5
|
+
//# sourceMappingURL=CardGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardGroup.js","sourceRoot":"","sources":["../../../../src/components/layout/card/CardGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAOlD,MAAM,SAAS,GAA6B,CAAC,EAC3C,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,EAAE,CAAC,CACJ,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,KAAM,KAAK,YAC9C,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,KAAC,QAAQ,cAAc,KAAK,IAAb,KAAK,CAAoB,CACzC,CAAC,GACG,CACR,CAAC;AAEF,OAAO,EAAC,SAAS,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type ButtonProps } from '../../actions/button';
|
|
4
|
+
export interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
cols?: 3 | 4;
|
|
6
|
+
}
|
|
7
|
+
declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export interface CarouselControlProps {
|
|
9
|
+
counterText: string;
|
|
10
|
+
prevButtonProps: Omit<CarouselControlButtonProps, 'icon'>;
|
|
11
|
+
nextButtonProps: Omit<CarouselControlButtonProps, 'icon'>;
|
|
12
|
+
}
|
|
13
|
+
export interface CarouselControlButtonProps extends Pick<ButtonProps, 'disabled' | 'onClick' | 'icon'> {
|
|
14
|
+
}
|
|
15
|
+
declare const carouselItemVariants: (props?: ({
|
|
16
|
+
cols?: 3 | 4 | null | undefined;
|
|
17
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
18
|
+
export interface CarouselItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof carouselItemVariants> {
|
|
19
|
+
}
|
|
20
|
+
export { Carousel };
|
|
21
|
+
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/carousel/Carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,KAAK,YAAY,EAAM,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAS,KAAK,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAK9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACd;AAED,QAAA,MAAM,QAAQ,sFAwDb,CAAC;AAGF,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,IAAI,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;IAC1D,eAAe,EAAE,IAAI,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;CAC3D;AAkBD,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;CAAG;AAmB/D,QAAA,MAAM,oBAAoB;;mFAUxB,CAAC;AAEH,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAehD,OAAO,EAAC,QAAQ,EAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from '../../../utils';
|
|
7
|
+
import { Button } from '../../actions/button';
|
|
8
|
+
import { IconChevronLeft, IconChevronRight } from '../../../icons';
|
|
9
|
+
const Carousel = React.forwardRef(({ className, children, cols = 3, ...props }, ref) => {
|
|
10
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
11
|
+
slidesToScroll: cols,
|
|
12
|
+
align: 'start',
|
|
13
|
+
});
|
|
14
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
15
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
16
|
+
const [visibleSlidesCount, setVisibleSlidesCount] = React.useState(0);
|
|
17
|
+
const childNodesArray = React.Children.toArray(children);
|
|
18
|
+
const onSelect = React.useCallback((api) => {
|
|
19
|
+
if (!api)
|
|
20
|
+
return;
|
|
21
|
+
setVisibleSlidesCount(api.selectedScrollSnap());
|
|
22
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
23
|
+
setCanScrollNext(api.canScrollNext());
|
|
24
|
+
}, []);
|
|
25
|
+
const scrollPrev = React.useCallback(() => api?.scrollPrev(), [api]);
|
|
26
|
+
const scrollNext = React.useCallback(() => api?.scrollNext(), [api]);
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (!api)
|
|
29
|
+
return;
|
|
30
|
+
onSelect(api);
|
|
31
|
+
api.on('reInit', onSelect);
|
|
32
|
+
api.on('select', onSelect);
|
|
33
|
+
}, [api, onSelect]);
|
|
34
|
+
return (_jsxs("div", { ref: ref, role: "region", "aria-roledescription": "carousel", className: "font-text", ...props, children: [_jsx("div", { ref: carouselRef, className: cn('overflow-hidden', className), children: _jsx("div", { className: 'flex -ml-6', children: childNodesArray.map((child, index) => (_jsx(CarouselItem, { cols: cols, children: child }, index))) }) }), _jsx(CarouselControl, { counterText: `${visibleSlidesCount + 1}/${Math.ceil(childNodesArray.length / cols)}`, prevButtonProps: { disabled: !canScrollPrev, onClick: scrollPrev }, nextButtonProps: { disabled: !canScrollNext, onClick: scrollNext } })] }));
|
|
35
|
+
});
|
|
36
|
+
Carousel.displayName = 'Carousel';
|
|
37
|
+
const CarouselControl = ({ counterText, prevButtonProps, nextButtonProps, }) => (_jsx("div", { className: "flex justify-end mt-5 select-none", children: _jsxs("div", { className: "flex items-center justify-between gap-x-1.5 w-[9.375rem]", children: [_jsx(CarouselControlButton, { icon: IconChevronLeft, ...prevButtonProps }), _jsx("span", { className: "px-1 text-button-text-large text-draeger-dark-blue", children: counterText }), _jsx(CarouselControlButton, { icon: IconChevronRight, ...nextButtonProps })] }) }));
|
|
38
|
+
const CarouselControlButton = ({ disabled, onClick, icon, }) => (_jsx(Button, { size: 'sm', variant: 'secondary', disabled: disabled, onClick: onClick, className: "px-1.5", icon: icon, buttonIconProps: { size: 'md' }, "aria-hidden": true }));
|
|
39
|
+
const carouselItemVariants = cva('min-w-0 shrink-0 grow-0 pl-6 h-full', {
|
|
40
|
+
variants: {
|
|
41
|
+
cols: {
|
|
42
|
+
3: 'basis-[calc(100%/3)]',
|
|
43
|
+
4: 'basis-1/4',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
cols: 3,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
const CarouselItem = ({ cols, className, ...props }) => (_jsx("div", { role: "group", "aria-roledescription": "slide", className: cn(carouselItemVariants({ cols, className })), ...props }));
|
|
51
|
+
export { Carousel };
|
|
52
|
+
//# sourceMappingURL=Carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../../src/components/layout/carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAoB,GAAG,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAQjE,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAC,SAAS,EAAE,QAAQ,E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oD,YACjE,WAAW,GACP,EACP,KAAC,qBAAqB,IAAC,IAAI,EAAE,gBAAgB,KAAM,eAAe,GAAI,IAClE,GACF,CACP,CAAC;AAKF,MAAM,qBAAqB,GAAyC,CAAC,EACnE,QAAQ,EACR,OAAO,EACP,IAAI,GACL,EAAE,EAAE,CAAC,CACJ,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,wBAE7B,CACH,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,CAAC,qCAAqC,EAAE;IACtE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,CAAC,EAAE,sBAAsB;YACzB,CAAC,EAAE,WAAW;SACf;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAMH,MAAM,YAAY,GAAgC,CAAC,EACjD,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE,CAAC,CACJ,cACE,IAAI,EAAC,OAAO,0BACS,OAAO,EAC5B,SAAS,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC,CAAC,KAClD,KAAK,GACT,CACH,CAAC;AAEF,OAAO,EAAC,QAAQ,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/carousel/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/carousel/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ContentItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
}
|
|
4
|
+
export interface ContentItemMediaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
mediaAlignment?: 'left' | 'right';
|
|
6
|
+
}
|
|
7
|
+
declare const ContentItemMedia: React.FC<ContentItemMediaProps>;
|
|
8
|
+
export interface ContentItemBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
}
|
|
10
|
+
declare const ContentItemBody: React.FC<ContentItemBodyProps>;
|
|
11
|
+
export interface ContentItemBodyHeadingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
headline?: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const ContentItemBodyHeading: React.FC<ContentItemBodyHeadingProps>;
|
|
16
|
+
export interface ContentItemBodyActionWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
}
|
|
18
|
+
declare const ContentItemBodyActionWrapper: React.FC<ContentItemBodyActionWrapperProps>;
|
|
19
|
+
declare const ContentItem: React.FC<ContentItemProps>;
|
|
20
|
+
export { ContentItem, ContentItemMedia, ContentItemBody, ContentItemBodyHeading, ContentItemBodyActionWrapper, };
|
|
21
|
+
//# sourceMappingURL=ContentItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentItem.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/contentItem/ContentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjD,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgBrD,CAAC;AAEF,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAQnD,CAAC;AAEF,MAAM,WAAW,2BACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAUjE,CAAC;AAEF,MAAM,WAAW,iCACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjD,QAAA,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAC1C,iCAAiC,CAQlC,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAc3C,CAAC;AAEF,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,4BAA4B,GAC7B,CAAC"}
|