@dfds-ui/react-components 3.0.2-alpha.44219a9f → 3.0.2-alpha.812bc5fd
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/accordion/Accordion.js +1 -1
- package/accordion/AccordionContent.js +1 -1
- package/accordion/AccordionSmall.js +1 -1
- package/app-bar/AppBar.js +1 -1
- package/app-bar/AppBarDrawer.js +1 -1
- package/app-bar/AppBarIconButton.js +1 -1
- package/app-bar/AppBarItem.js +1 -1
- package/assertions/banner/Banner.js +1 -1
- package/assertions/banner/BannerAction.js +1 -1
- package/assertions/banner/BannerTypography.js +1 -1
- package/assertions/toast/Toast.js +1 -1
- package/assertions/toast/Toaster.js +1 -1
- package/badge/Badge.js +1 -1
- package/button/Button.js +1 -1
- package/button/IconButton.js +1 -1
- package/button/LinkButton.js +1 -1
- package/button-stack/ButtonStack.js +1 -1
- package/card/Card.js +1 -1
- package/card/CardActions.js +1 -1
- package/card/CardContent.js +1 -1
- package/card/CardMedia.js +1 -1
- package/card/CardPriceTag.js +1 -1
- package/card/CardTitle.js +1 -1
- package/chip/Chip.js +1 -1
- package/cjs/accordion/Accordion.d.ts +101 -0
- package/cjs/accordion/AccordionContent.d.ts +14 -0
- package/cjs/accordion/AccordionSmall.d.ts +56 -0
- package/cjs/accordion/index.d.ts +3 -0
- package/cjs/app-bar/AppBar.d.ts +13 -0
- package/cjs/app-bar/AppBar.js +2 -1
- package/cjs/app-bar/AppBarContext.d.ts +12 -0
- package/cjs/app-bar/AppBarContext.js +2 -1
- package/cjs/app-bar/AppBarDrawer.d.ts +5 -0
- package/cjs/app-bar/AppBarDrawer.js +2 -1
- package/cjs/app-bar/AppBarIconButton.d.ts +10 -0
- package/cjs/app-bar/AppBarItem.d.ts +23 -0
- package/cjs/app-bar/AppBarListItem.d.ts +15 -0
- package/cjs/app-bar/index.d.ts +7 -0
- package/cjs/assertions/banner/Banner.d.ts +74 -0
- package/cjs/assertions/banner/Banner.js +2 -1
- package/cjs/assertions/banner/BannerAction.d.ts +19 -0
- package/cjs/assertions/banner/BannerTypography.d.ts +9 -0
- package/cjs/assertions/banner/index.d.ts +3 -0
- package/cjs/assertions/index.d.ts +2 -0
- package/cjs/assertions/toast/Toast.d.ts +13 -0
- package/cjs/assertions/toast/Toaster.d.ts +19 -0
- package/cjs/assertions/toast/Toaster.js +2 -1
- package/cjs/assertions/toast/index.d.ts +2 -0
- package/cjs/assertions/toast/index.js +2 -1
- package/cjs/badge/Badge.d.ts +26 -0
- package/cjs/badge/index.d.ts +2 -0
- package/cjs/badge/index.js +2 -1
- package/cjs/button/BadgeIcon.d.ts +7 -0
- package/cjs/button/BaseButton.d.ts +14 -0
- package/cjs/button/Button.d.ts +19 -0
- package/cjs/button/IconButton.d.ts +75 -0
- package/cjs/button/LinkButton.d.ts +8 -0
- package/cjs/button/LinkButton.js +2 -1
- package/cjs/button/button-style.d.ts +7 -0
- package/cjs/button/index.d.ts +7 -0
- package/cjs/button/index.js +2 -1
- package/cjs/button-stack/ButtonStack.d.ts +12 -0
- package/cjs/button-stack/index.d.ts +1 -0
- package/cjs/card/Card.d.ts +19 -0
- package/cjs/card/Card.js +2 -1
- package/cjs/card/CardActions.d.ts +4 -0
- package/cjs/card/CardContent.d.ts +14 -0
- package/cjs/card/CardMedia.d.ts +19 -0
- package/cjs/card/CardPriceTag.d.ts +25 -0
- package/cjs/card/CardTitle.d.ts +19 -0
- package/cjs/card/index.d.ts +6 -0
- package/cjs/chip/Chip.d.ts +19 -0
- package/cjs/chip/Chip.js +2 -1
- package/cjs/chip/index.d.ts +2 -0
- package/cjs/chip/index.js +2 -1
- package/cjs/common/LockBodyScroll.d.ts +26 -0
- package/cjs/common/arrow.d.ts +6 -0
- package/cjs/common/emotionCloneElement.d.ts +2 -0
- package/cjs/common/intent.d.ts +3 -0
- package/cjs/common/miniMoize.d.ts +1 -0
- package/cjs/common/polymorphic.d.ts +25 -0
- package/cjs/common/use-media.d.ts +1 -0
- package/cjs/common/useOnClickOutside.d.ts +3 -0
- package/cjs/common/utils.d.ts +3 -0
- package/cjs/counter/Counter.d.ts +27 -0
- package/cjs/counter/Counter.js +2 -1
- package/cjs/counter/PluralCounter.d.ts +14 -0
- package/cjs/counter/PluralCounter.js +2 -1
- package/cjs/counter/index.d.ts +2 -0
- package/cjs/data-table/DataTable.d.ts +11 -0
- package/cjs/data-table/DataTable.js +2 -1
- package/cjs/data-table/index.d.ts +1 -0
- package/cjs/divider/Divider.d.ts +26 -0
- package/cjs/divider/index.d.ts +1 -0
- package/cjs/drawer/Drawer.d.ts +32 -0
- package/cjs/drawer/index.d.ts +1 -0
- package/cjs/dropdown-menu/Dropdown.d.ts +46 -0
- package/cjs/dropdown-menu/DropdownContext.d.ts +13 -0
- package/cjs/dropdown-menu/DropdownContext.js +2 -1
- package/cjs/dropdown-menu/MenuCheckbox.d.ts +34 -0
- package/cjs/dropdown-menu/MenuItem.d.ts +45 -0
- package/cjs/dropdown-menu/MenuTitle.d.ts +14 -0
- package/cjs/dropdown-menu/index.d.ts +5 -0
- package/cjs/dropdown-menu/index.js +2 -1
- package/cjs/elevation/index.d.ts +3 -0
- package/cjs/flexbox/FlexBox.d.ts +100 -0
- package/cjs/flexbox/index.d.ts +1 -0
- package/cjs/footer/Footer.d.ts +7 -0
- package/cjs/footer/index.d.ts +1 -0
- package/cjs/forms/assistive-text/AssistiveText.d.ts +7 -0
- package/cjs/forms/asterisk/Asterisk.d.ts +3 -0
- package/cjs/forms/checkbox/Checkbox.d.ts +39 -0
- package/cjs/forms/checkbox/ExampleControlComponent.d.ts +11 -0
- package/cjs/forms/checkbox/index.d.ts +1 -0
- package/cjs/forms/email-field/EmailField.d.ts +22 -0
- package/cjs/forms/error-text/ErrorText.d.ts +7 -0
- package/cjs/forms/field/Field.d.ts +11 -0
- package/cjs/forms/index.d.ts +21 -0
- package/cjs/forms/input/Input.d.ts +19 -0
- package/cjs/forms/input/InputComposition.d.ts +43 -0
- package/cjs/forms/label/Label.d.ts +11 -0
- package/cjs/forms/number-field/NumberField.d.ts +22 -0
- package/cjs/forms/password-field/PasswordField.d.ts +4 -0
- package/cjs/forms/password-field/PasswordField.js +2 -1
- package/cjs/forms/radio/Radio.d.ts +35 -0
- package/cjs/forms/reactselect/ReactSelect.d.ts +25 -0
- package/cjs/forms/reactselect/ReactSelect.js +2 -1
- package/cjs/forms/searchable-select/AsyncSearchableSelect.d.ts +6 -0
- package/cjs/forms/select/Select.d.ts +16 -0
- package/cjs/forms/select-field/SelectField.d.ts +25 -0
- package/cjs/forms/switch/Switch.d.ts +13 -0
- package/cjs/forms/tel-field/TelField.d.ts +22 -0
- package/cjs/forms/text-field/TextField.d.ts +43 -0
- package/cjs/global-styles/GlobalStyles.d.ts +3 -0
- package/cjs/global-styles/ResetStyles.d.ts +9 -0
- package/cjs/global-styles/sanitize.d.ts +1 -0
- package/cjs/grid/Column.d.ts +10 -0
- package/cjs/grid/Container.d.ts +15 -0
- package/cjs/grid/index.d.ts +2 -0
- package/cjs/hero/Hero.d.ts +10 -0
- package/cjs/hero/index.d.ts +1 -0
- package/cjs/hero/stripes.d.ts +6 -0
- package/cjs/ie-banner/IEBanner.d.ts +12 -0
- package/cjs/ie-banner/IEBanner.js +2 -1
- package/cjs/ie-banner/index.d.ts +1 -0
- package/cjs/index.d.ts +43 -0
- package/cjs/layout/LayoutLegacy.d.ts +2 -0
- package/cjs/lists/FeatureList.d.ts +22 -0
- package/cjs/lists/ListAddon.d.ts +11 -0
- package/cjs/lists/ListDivider.d.ts +5 -0
- package/cjs/lists/ListIcon.d.ts +18 -0
- package/cjs/lists/ListItem.d.ts +46 -0
- package/cjs/lists/ListText.d.ts +39 -0
- package/cjs/lists/ListTextGroup.d.ts +15 -0
- package/cjs/lists/ListTitle.d.ts +4 -0
- package/cjs/lists/index.d.ts +8 -0
- package/cjs/loader/DfdsLoader.d.ts +9 -0
- package/cjs/loader/Loader.d.ts +6 -0
- package/cjs/loader/index.d.ts +2 -0
- package/cjs/localization/LocaleFlag.d.ts +13 -0
- package/cjs/localization/LocaleFlag.js +2 -1
- package/cjs/localization/index.d.ts +2 -0
- package/cjs/localization/locales.d.ts +35 -0
- package/cjs/logo/Logo.d.ts +11 -0
- package/cjs/logo/Logo.js +2 -1
- package/cjs/logo/index.d.ts +1 -0
- package/cjs/media/index.d.ts +2 -0
- package/cjs/menu/Menu.d.ts +7 -0
- package/cjs/menu/index.d.ts +2 -0
- package/cjs/menu/index.js +2 -1
- package/cjs/mobile-stepper/MobileStepper.d.ts +25 -0
- package/cjs/mobile-stepper/index.d.ts +1 -0
- package/cjs/nav-bar/NavBar.d.ts +37 -0
- package/cjs/nav-bar/NavBar.js +2 -1
- package/cjs/nav-bar/index.d.ts +2 -0
- package/cjs/nav-bar/index.js +2 -1
- package/cjs/nav-menu/NavMenuItem.d.ts +10 -0
- package/cjs/nav-menu/index.d.ts +1 -0
- package/cjs/pagination/Pagination.d.ts +44 -0
- package/cjs/pagination/Pagination.styles.d.ts +6 -0
- package/cjs/pagination/index.d.ts +1 -0
- package/cjs/popper/Popper.d.ts +29 -0
- package/cjs/popper/index.d.ts +1 -0
- package/cjs/progress-bar/ProgressBar.d.ts +8 -0
- package/cjs/progress-bar/index.d.ts +2 -0
- package/cjs/progress-bar/index.js +2 -1
- package/cjs/schedule/ScheduleItem.d.ts +19 -0
- package/cjs/schedule/ScheduleList.d.ts +11 -0
- package/cjs/schedule/index.d.ts +2 -0
- package/cjs/side-sheet/SideSheet.d.ts +57 -0
- package/cjs/side-sheet/SideSheet.js +2 -1
- package/cjs/side-sheet/SideSheetCloseButton.d.ts +13 -0
- package/cjs/side-sheet/SideSheetContent.d.ts +7 -0
- package/cjs/side-sheet/SideSheetContent.js +2 -1
- package/cjs/side-sheet/SideSheetFooter.d.ts +7 -0
- package/cjs/side-sheet/SideSheetFooter.js +2 -1
- package/cjs/side-sheet/SideSheetHeader.d.ts +9 -0
- package/cjs/side-sheet/SideSheetHeader.js +2 -1
- package/cjs/side-sheet/SideSheetHeadline.d.ts +7 -0
- package/cjs/side-sheet/index.d.ts +4 -0
- package/cjs/side-sheet/index.js +2 -1
- package/cjs/site-layout/SiteLayout.d.ts +40 -0
- package/cjs/site-layout/index.d.ts +2 -0
- package/cjs/site-layout/index.js +2 -1
- package/cjs/skeleton/Skeleton.d.ts +8 -0
- package/cjs/skeleton/index.d.ts +1 -0
- package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +24 -0
- package/cjs/social-media-link-list/index.d.ts +1 -0
- package/cjs/spinner/Spinner.d.ts +58 -0
- package/cjs/spinner/index.d.ts +1 -0
- package/cjs/step/Step.d.ts +45 -0
- package/cjs/step/Step.js +2 -1
- package/cjs/step/Step.styles.d.ts +4 -0
- package/cjs/step/StepButton.d.ts +4 -0
- package/cjs/step/StepContent.d.ts +6 -0
- package/cjs/step/StepContext.d.ts +12 -0
- package/cjs/step/StepLabel.d.ts +7 -0
- package/cjs/step/index.d.ts +1 -0
- package/cjs/stepper/Stepper.d.ts +25 -0
- package/cjs/stepper/Stepper.js +2 -1
- package/cjs/stepper/StepperContext.d.ts +9 -0
- package/cjs/stepper/index.d.ts +1 -0
- package/cjs/stepper-feedback-message/StepperFeedbackMessage.d.ts +5 -0
- package/cjs/stepper-feedback-message/index.d.ts +1 -0
- package/cjs/styles/index.d.ts +3 -0
- package/cjs/styles/index.js +2 -1
- package/cjs/styles/media.d.ts +21 -0
- package/cjs/styles/rem.d.ts +1 -0
- package/cjs/styles/style-helpers.d.ts +1 -0
- package/cjs/styles/theme.d.ts +39 -0
- package/cjs/surface/Surface.d.ts +33 -0
- package/cjs/surface/Surface.js +2 -1
- package/cjs/surface/index.d.ts +1 -0
- package/cjs/tab/Tab.d.ts +12 -0
- package/cjs/tab/TabPanel.d.ts +7 -0
- package/cjs/tab/Tabs.d.ts +11 -0
- package/cjs/tab/Tabs.js +2 -1
- package/cjs/tab/TabsContext.d.ts +16 -0
- package/cjs/tab/TabsContext.js +2 -1
- package/cjs/tab/index.d.ts +4 -0
- package/cjs/table/Table.d.ts +22 -0
- package/cjs/table/Table.js +2 -1
- package/cjs/table/TableBody.d.ts +9 -0
- package/cjs/table/TableDataCell.d.ts +14 -0
- package/cjs/table/TableHead.d.ts +14 -0
- package/cjs/table/TableHeaderCell.d.ts +15 -0
- package/cjs/table/TableRow.d.ts +17 -0
- package/cjs/table/index.d.ts +6 -0
- package/cjs/test/Test.d.ts +8 -0
- package/cjs/tooltip/Tooltip.d.ts +32 -0
- package/cjs/tooltip/Tooltip.js +2 -1
- package/cjs/tooltip/index.d.ts +2 -0
- package/cjs/tooltip/index.js +2 -1
- package/cjs/typography/Headlines.d.ts +71 -0
- package/cjs/typography/Text.d.ts +4 -0
- package/cjs/typography/index.d.ts +2 -0
- package/common/LockBodyScroll.js +1 -1
- package/common/emotionCloneElement.js +1 -1
- package/common/polymorphic.js +1 -1
- package/counter/PluralCounter.js +1 -1
- package/data-table/DataTable.js +1 -1
- package/divider/Divider.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown-menu/Dropdown.js +1 -1
- package/dropdown-menu/MenuCheckbox.js +1 -1
- package/dropdown-menu/MenuItem.js +1 -1
- package/forms/checkbox/Checkbox.js +1 -1
- package/forms/checkbox/ExampleControlComponent.js +1 -1
- package/forms/email-field/EmailField.js +1 -1
- package/forms/input/Input.js +1 -1
- package/forms/input/InputComposition.js +1 -1
- package/forms/label/Label.js +1 -1
- package/forms/number-field/NumberField.js +1 -1
- package/forms/password-field/PasswordField.js +1 -1
- package/forms/radio/Radio.js +1 -1
- package/forms/reactselect/ReactSelect.js +1 -1
- package/forms/searchable-select/AsyncSearchableSelect.js +1 -1
- package/forms/select/Select.js +1 -1
- package/forms/select-field/SelectField.js +1 -1
- package/forms/switch/Switch.js +1 -1
- package/forms/tel-field/TelField.js +1 -1
- package/forms/text-field/TextField.js +1 -1
- package/grid/Column.js +1 -1
- package/grid/Container.js +1 -1
- package/hero/Hero.js +1 -1
- package/lists/FeatureList.js +1 -1
- package/lists/ListAddon.js +1 -1
- package/lists/ListDivider.js +1 -1
- package/lists/ListIcon.js +1 -1
- package/lists/ListItem.js +1 -1
- package/lists/ListText.js +1 -1
- package/lists/ListTextGroup.js +1 -1
- package/lists/ListTitle.js +1 -1
- package/localization/LocaleFlag.js +1 -1
- package/logo/Logo.js +1 -1
- package/menu/Menu.js +1 -1
- package/mobile-stepper/MobileStepper.js +1 -1
- package/nav-bar/NavBar.js +1 -1
- package/package.json +12 -12
- package/pagination/Pagination.js +1 -1
- package/popper/Popper.js +1 -1
- package/schedule/ScheduleList.js +1 -1
- package/side-sheet/SideSheet.js +1 -1
- package/side-sheet/SideSheetCloseButton.js +1 -1
- package/side-sheet/SideSheetContent.js +1 -1
- package/side-sheet/SideSheetFooter.js +1 -1
- package/side-sheet/SideSheetHeader.js +1 -1
- package/site-layout/SiteLayout.js +1 -1
- package/skeleton/Skeleton.js +1 -1
- package/social-media-link-list/SocialMediaLinkList.js +1 -1
- package/spinner/Spinner.js +1 -1
- package/step/Step.js +1 -1
- package/step/StepButton.js +1 -1
- package/stepper/Stepper.js +1 -1
- package/surface/Surface.js +1 -1
- package/tab/Tab.js +1 -1
- package/tab/Tabs.js +1 -1
- package/table/Table.js +1 -1
- package/table/TableBody.js +1 -1
- package/table/TableDataCell.js +1 -1
- package/table/TableHead.js +1 -1
- package/table/TableHeaderCell.js +1 -1
- package/table/TableRow.js +1 -1
- package/tooltip/Tooltip.js +1 -1
- package/typography/Headlines.js +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopperProps } from '@mui/material';
|
|
3
|
+
export type AppBarItemProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
Icon?: React.ElementType;
|
|
6
|
+
LeadingIcon?: React.ElementType;
|
|
7
|
+
TrailingIcon?: React.ElementType;
|
|
8
|
+
title: string;
|
|
9
|
+
divider?: 'start' | 'end' | 'both';
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
placement?: 'bottom-start' | 'bottom-end';
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
AppBarPopperProps?: Omit<PopperProps, 'open'>;
|
|
16
|
+
};
|
|
17
|
+
export declare const MenuPopOverContext: React.Context<{
|
|
18
|
+
handlePopoverClose: () => void;
|
|
19
|
+
} | undefined>;
|
|
20
|
+
export declare const AppBarPopper: import("@emotion/styled").StyledComponent<PopperProps & React.RefAttributes<HTMLDivElement> & {
|
|
21
|
+
theme?: import("@emotion/react").Theme;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
export declare const AppBarItem: ({ id, Icon, LeadingIcon, TrailingIcon, title, divider, children, onClick, placement, isActive, as, AppBarPopperProps, ...rest }: AppBarItemProps & React.JSX.IntrinsicElements["a"]) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const AppBarListItem: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
multiline?: boolean;
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
condensed?: boolean;
|
|
5
|
+
tabIndex?: number;
|
|
6
|
+
clickable?: boolean;
|
|
7
|
+
divider?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
flexBoxProps?: import("../flexbox").FlexBoxProps;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
} & import("..").PolymorphicComponentProps & {
|
|
13
|
+
theme?: import("@emotion/react").Theme;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default AppBarListItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useAppBarContext, AppBarProvider } from './AppBarContext';
|
|
2
|
+
import { AppBarItem, MenuPopOverContext } from './AppBarItem';
|
|
3
|
+
export { default as AppBarDrawer } from './AppBarDrawer';
|
|
4
|
+
export { default as AppBar } from './AppBar';
|
|
5
|
+
export { default as AppBarIconButton } from './AppBarIconButton';
|
|
6
|
+
export { default as AppBarListItem } from './AppBarListItem';
|
|
7
|
+
export { useAppBarContext, AppBarProvider, AppBarItem, MenuPopOverContext };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { ElementType, FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { Intent } from '../../common/intent';
|
|
3
|
+
export type BannerVariant = 'lowEmphasis' | 'mediumEmphasis' | 'highEmphasis' | 'default' | 'inverted';
|
|
4
|
+
export type BannerStickyPosition = 'top' | 'bottom' | 'bottom-right';
|
|
5
|
+
export type BannerProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies the intent of the Banner (change the color of the banner icon to match intended status)
|
|
8
|
+
*/
|
|
9
|
+
intent?: Intent;
|
|
10
|
+
/**
|
|
11
|
+
* Actions to be displayed inside the banner
|
|
12
|
+
*/
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Class name to be added to the banner
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Add a close icon in the top-right corner which will invoke the provided callback
|
|
20
|
+
*/
|
|
21
|
+
onRequestClose?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the ariaLabel to be added to the close(x) button
|
|
24
|
+
*/
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the variation of the banner.
|
|
28
|
+
*
|
|
29
|
+
* `default` and `inverted` variants are deprecated
|
|
30
|
+
*/
|
|
31
|
+
variant?: BannerVariant;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies if the Banner should be displayed with `position: fixed;`
|
|
34
|
+
*
|
|
35
|
+
* When the value is `undefined` the Banner default to being sticky if `variant` is set to `inverted`
|
|
36
|
+
*/
|
|
37
|
+
sticky?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Specifies the position of the Sticky Banner.
|
|
40
|
+
*/
|
|
41
|
+
stickyPosition?: BannerStickyPosition;
|
|
42
|
+
/**
|
|
43
|
+
* Specifies if the Banner should have a border/divider at the bottom.
|
|
44
|
+
*/
|
|
45
|
+
divider?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Specify a custom icon to replace the one derived from `intent`
|
|
48
|
+
*
|
|
49
|
+
* @type {ElementType<{ className?: string }>}
|
|
50
|
+
*/
|
|
51
|
+
icon?: ElementType<{
|
|
52
|
+
className?: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Specifies if the actions should always appear below the content
|
|
56
|
+
*/
|
|
57
|
+
wrapActions?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Content of the Banner
|
|
60
|
+
*/
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies if the banner should be narrow
|
|
64
|
+
*/
|
|
65
|
+
isNarrow?: boolean;
|
|
66
|
+
};
|
|
67
|
+
interface BannerContextInterface {
|
|
68
|
+
intent: NonNullable<BannerProps['intent']>;
|
|
69
|
+
variant: NonNullable<BannerProps['variant']>;
|
|
70
|
+
}
|
|
71
|
+
export declare const BannerContext: React.Context<BannerContextInterface | undefined>;
|
|
72
|
+
export declare const useBannerContext: () => BannerContextInterface;
|
|
73
|
+
export declare const Banner: FunctionComponent<BannerProps>;
|
|
74
|
+
export default Banner;
|
|
@@ -14,7 +14,8 @@ var _divider = require("../../divider");
|
|
|
14
14
|
var _theme = require("@dfds-ui/theme");
|
|
15
15
|
var _typography = require("@dfds-ui/typography");
|
|
16
16
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
|
-
|
|
17
|
+
var cache;
|
|
18
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
18
19
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
19
20
|
function normalizeIntent(intent) {
|
|
20
21
|
// for intent none we will use info instead
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export type BannerActionVariation = 'primary' | 'secondary' | 'primary-thick' | 'secondary-thick';
|
|
3
|
+
export interface BannerActionProps {
|
|
4
|
+
variation?: BannerActionVariation;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* className to be assigned to the button
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* HTML tag or custom component being rendered
|
|
12
|
+
*/
|
|
13
|
+
as?: React.ElementType;
|
|
14
|
+
/**
|
|
15
|
+
* Updates component with children prop accordingly to the @types update
|
|
16
|
+
*/
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const BannerAction: React.FunctionComponent<BannerActionProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const BannerHeadline: React.FunctionComponent<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const BannerParagraph: React.FunctionComponent<{
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Intent } from '../../common/intent';
|
|
3
|
+
export type ToastProps = {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
intent?: Intent;
|
|
6
|
+
className?: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
onRequestClose?: () => void;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
onRequestAction?: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare const Toast: React.FunctionComponent<ToastProps>;
|
|
13
|
+
export default Toast;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { ToastProps } from './Toast';
|
|
3
|
+
type TimeoutType = {
|
|
4
|
+
timeout?: number;
|
|
5
|
+
};
|
|
6
|
+
type ToasterState = {
|
|
7
|
+
open: boolean;
|
|
8
|
+
hasActive: boolean;
|
|
9
|
+
toastProps: ToastProps | null;
|
|
10
|
+
} & TimeoutType;
|
|
11
|
+
export declare const useToaster: () => {
|
|
12
|
+
addToast: (props: ToastProps & TimeoutType) => Promise<void>;
|
|
13
|
+
state: ToasterState;
|
|
14
|
+
};
|
|
15
|
+
declare const Toaster: FunctionComponent<{
|
|
16
|
+
children: React.ReactNode | React.ReactNode[];
|
|
17
|
+
globalTimeout?: number;
|
|
18
|
+
}>;
|
|
19
|
+
export default Toaster;
|
|
@@ -9,7 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _ = require(".");
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
12
|
-
|
|
12
|
+
var cache;
|
|
13
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
15
16
|
const Container = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
|
|
@@ -23,5 +23,6 @@ Object.defineProperty(exports, "useToaster", {
|
|
|
23
23
|
});
|
|
24
24
|
var _Toast = _interopRequireDefault(require("./Toast"));
|
|
25
25
|
var _Toaster = _interopRequireWildcard(require("./Toaster"));
|
|
26
|
-
|
|
26
|
+
var cache;
|
|
27
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
27
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Intent } from '../common/intent';
|
|
3
|
+
import { FlexBoxProps } from '../flexbox/FlexBox';
|
|
4
|
+
export type BadgeProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the intent of the Badge
|
|
7
|
+
*/
|
|
8
|
+
intent?: Intent;
|
|
9
|
+
/**
|
|
10
|
+
* Text to be shown in the badge (usually just a string)
|
|
11
|
+
*/
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Class name to be added to the badge
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Props controlling the flexbox
|
|
19
|
+
*/
|
|
20
|
+
flexBoxProps?: FlexBoxProps;
|
|
21
|
+
/**
|
|
22
|
+
* HTML tag or custom component being rendered
|
|
23
|
+
*/
|
|
24
|
+
as?: React.ElementType;
|
|
25
|
+
};
|
|
26
|
+
export default function Badge({ as, children, intent, flexBoxProps, ...rest }: BadgeProps): React.JSX.Element;
|
package/cjs/badge/index.js
CHANGED
|
@@ -24,4 +24,5 @@ Object.keys(_Badge).forEach(function (key) {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
var cache;
|
|
28
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const variations: readonly ["primary", "secondary", "outlined", "text", "danger", "link"];
|
|
3
|
+
export type BaseButtonProps = React.PropsWithoutRef<React.JSX.IntrinsicElements['button']>;
|
|
4
|
+
export type ButtonVariation = (typeof variations)[number];
|
|
5
|
+
export type ButtonVariationProps = {
|
|
6
|
+
variation?: ButtonVariation;
|
|
7
|
+
};
|
|
8
|
+
export declare const BaseButton: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
} & {
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
}, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
14
|
+
export declare function getButtonVariationStyle(variation?: ButtonVariation): import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseButtonProps, ButtonVariationProps } from './BaseButton';
|
|
3
|
+
type ButtonSize = 'medium' | 'small';
|
|
4
|
+
type IconAlign = 'left' | 'right';
|
|
5
|
+
export type ButtonProps = BaseButtonProps & ButtonVariationProps & {
|
|
6
|
+
className?: string;
|
|
7
|
+
replace?: boolean;
|
|
8
|
+
submitting?: boolean;
|
|
9
|
+
fillWidth?: boolean;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
iconAlign?: IconAlign;
|
|
13
|
+
iconSpacing?: string;
|
|
14
|
+
iconColor?: string;
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
declare const Button: ({ variation, children, submitting, size, icon, iconSpacing, iconAlign, iconColor, title, disabled, ...rest }: ButtonProps) => React.JSX.Element;
|
|
19
|
+
export default Button;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { ElementType, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { OverlayOptions } from '@dfds-ui/theme/states';
|
|
3
|
+
import { PolymorphicComponentProps } from '../common/polymorphic';
|
|
4
|
+
export type IconButtonSize = 'small' | 'medium' | 'large' | 's' | 'm' | 'l';
|
|
5
|
+
export interface IconButtonProps extends PolymorphicComponentProps, ComponentPropsWithRef<'button'> {
|
|
6
|
+
/**
|
|
7
|
+
* Icon to be displayed on the button.
|
|
8
|
+
*/
|
|
9
|
+
icon: ElementType;
|
|
10
|
+
/**
|
|
11
|
+
* Text of the aria-label as well as the fallback value used for tooltip.
|
|
12
|
+
*/
|
|
13
|
+
ariaLabel: string;
|
|
14
|
+
/**
|
|
15
|
+
* Size of the button.
|
|
16
|
+
*/
|
|
17
|
+
size?: IconButtonSize;
|
|
18
|
+
/**
|
|
19
|
+
* className to be assigned to the button.
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Disable button.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Disable overlay states.
|
|
28
|
+
*/
|
|
29
|
+
disableOverlay?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Disable tooltip.
|
|
32
|
+
*/
|
|
33
|
+
disableTooltip?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Text of the tooltip, if none, aria-label will be used.
|
|
36
|
+
*/
|
|
37
|
+
tooltip?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Color of the button and the overlay state.
|
|
40
|
+
*/
|
|
41
|
+
color?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Override color to be used for the hover state.
|
|
44
|
+
*/
|
|
45
|
+
hoverColor?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Override color to be used for the active state.
|
|
48
|
+
*/
|
|
49
|
+
activeColor?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Override color to be used for the focus state.
|
|
52
|
+
*/
|
|
53
|
+
focusColor?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Override the overlay options to use.
|
|
56
|
+
*/
|
|
57
|
+
overlayOptions?: OverlayOptions;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Helper function returning the default icon size when rendering an IconButton in the specified size.
|
|
61
|
+
* @param size : IconButtonSize;
|
|
62
|
+
* @returns The default icon size
|
|
63
|
+
*/
|
|
64
|
+
export declare const getDefaultIconButtonIconSize: (size: IconButtonSize) => "1.5rem" | "1.25rem" | "2rem";
|
|
65
|
+
/**
|
|
66
|
+
* Helper function returning the default dimensions of an IconButton in the specified size.
|
|
67
|
+
* @param size : IconButtonSize;
|
|
68
|
+
* @returns The default size
|
|
69
|
+
*/
|
|
70
|
+
export declare const getDefaultIconButtonDimensions: (size: IconButtonSize) => {
|
|
71
|
+
height: string;
|
|
72
|
+
width: string;
|
|
73
|
+
};
|
|
74
|
+
declare const IconButton: ({ type, tooltip, title, size, icon: Icon, disableTooltip, disableOverlay, disabled, color, hoverColor, focusColor, activeColor, overlayOptions, as, ariaLabel, ...rest }: IconButtonProps) => React.JSX.Element;
|
|
75
|
+
export default IconButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from './Button';
|
|
3
|
+
export type LinkButtonProps = React.PropsWithoutRef<React.JSX.IntrinsicElements['a']> & ButtonProps & {
|
|
4
|
+
href?: string;
|
|
5
|
+
target?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const LinkButton: (props: LinkButtonProps) => React.JSX.Element;
|
|
8
|
+
export default LinkButton;
|
package/cjs/button/LinkButton.js
CHANGED
|
@@ -10,7 +10,8 @@ var _theme = require("@dfds-ui/theme");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
13
|
+
var cache;
|
|
14
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
14
15
|
const LinkButton = props => (0, _jsxRuntime.jsx)(_Button.default, {
|
|
15
16
|
as: "a",
|
|
16
17
|
variation: "link",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const baseButtonStyle: import("@emotion/utils").SerializedStyles;
|
|
2
|
+
export declare const primaryButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const secondaryButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const outlinedButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare const textButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
6
|
+
export declare const dangerButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare const linkButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Button } from './Button';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export * from './LinkButton';
|
|
4
|
+
export { default as IconButton } from './IconButton';
|
|
5
|
+
export * from './IconButton';
|
|
6
|
+
export * from './BadgeIcon';
|
|
7
|
+
export { default as Anchor } from './LinkButton';
|
package/cjs/button/index.js
CHANGED
|
@@ -74,4 +74,5 @@ Object.keys(_BadgeIcon).forEach(function (key) {
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
|
|
77
|
+
var cache;
|
|
78
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
3
|
+
type Alignment = 'left' | 'right' | 'center';
|
|
4
|
+
type ButtonStackProps = {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
align?: Alignment;
|
|
7
|
+
orientation?: Orientation;
|
|
8
|
+
className?: string;
|
|
9
|
+
reverse?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const ButtonStack: React.FunctionComponent<ButtonStackProps>;
|
|
12
|
+
export default ButtonStack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ButtonStack } from './ButtonStack';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { SurfaceType } from '../surface';
|
|
3
|
+
export declare const CardContext: React.Context<{}>;
|
|
4
|
+
export type CardContextType = {
|
|
5
|
+
cardSize: 's' | 'm' | 'l' | 'xl';
|
|
6
|
+
cardVariant: 'outline' | 'fill' | 'surface';
|
|
7
|
+
};
|
|
8
|
+
export type CardProps = {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
size: 's' | 'm' | 'l' | 'xl';
|
|
11
|
+
variant: 'outline' | 'fill' | 'surface';
|
|
12
|
+
surface?: SurfaceType;
|
|
13
|
+
reverse?: boolean;
|
|
14
|
+
media?: ReactNode;
|
|
15
|
+
ratio?: number[];
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const Card: FunctionComponent<CardProps>;
|
|
19
|
+
export default Card;
|
package/cjs/card/Card.js
CHANGED
|
@@ -12,7 +12,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _surface = require("../surface");
|
|
14
14
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
15
|
-
|
|
15
|
+
var cache;
|
|
16
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
18
19
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export type CardContentProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Text color
|
|
6
|
+
*/
|
|
7
|
+
color?: string;
|
|
8
|
+
/**
|
|
9
|
+
* className to be assigned to the component
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const CardContent: FunctionComponent<CardContentProps>;
|
|
14
|
+
export default CardContent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
export type CardMediaProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Media component to be displayed
|
|
6
|
+
*/
|
|
7
|
+
media: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Aspect ratio of media component
|
|
10
|
+
*/
|
|
11
|
+
aspectRatio?: AspectRatio;
|
|
12
|
+
/**
|
|
13
|
+
* className to be assigned to the component
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export type AspectRatio = '2:1' | '3:2';
|
|
18
|
+
declare const CardMedia: FunctionComponent<CardMediaProps>;
|
|
19
|
+
export default CardMedia;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CardPriceTagProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Price for the price tag
|
|
5
|
+
*/
|
|
6
|
+
price: number;
|
|
7
|
+
/**
|
|
8
|
+
* Currency symbol to be displayed
|
|
9
|
+
*/
|
|
10
|
+
currency?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Text to be displayed over the price
|
|
13
|
+
*/
|
|
14
|
+
topText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Text to be displayed under the price
|
|
17
|
+
*/
|
|
18
|
+
bottomText?: string;
|
|
19
|
+
/**
|
|
20
|
+
* className to be assigned to the component
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
declare const CardPriceTag: ({ price, topText, bottomText, currency, ...rest }: CardPriceTagProps) => React.JSX.Element;
|
|
25
|
+
export default CardPriceTag;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export type CardTitleProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Text color
|
|
6
|
+
*/
|
|
7
|
+
color?: string;
|
|
8
|
+
/**
|
|
9
|
+
* If set to true the title will be displayed using the `sectionHeadline` instead of a `smallHeadline`.
|
|
10
|
+
* But only for large screens.
|
|
11
|
+
*/
|
|
12
|
+
largeTitle?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* className to be assigned to the component
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const CardTitle: FunctionComponent<CardTitleProps>;
|
|
19
|
+
export default CardTitle;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Card } from './Card';
|
|
2
|
+
export { default as CardMedia } from './CardMedia';
|
|
3
|
+
export { default as CardTitle } from './CardTitle';
|
|
4
|
+
export { default as CardContent } from './CardContent';
|
|
5
|
+
export { default as CardActions } from './CardActions';
|
|
6
|
+
export { default as CardPriceTag } from './CardPriceTag';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
type InteractionEvent = React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>;
|
|
3
|
+
export type ChipProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
dismissable?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
onToggle?: (event: InteractionEvent) => void;
|
|
10
|
+
onDismiss?: (event: InteractionEvent) => void;
|
|
11
|
+
tabIndex?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const ChipContainer: import("@emotion/styled").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme;
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
declare const _default: ({ children, dismissable, disabled, selectable, selected, onToggle, onDismiss, className, ...rest }: ChipProps) => React.JSX.Element;
|
|
19
|
+
export default _default;
|
package/cjs/chip/Chip.js
CHANGED
|
@@ -11,7 +11,8 @@ var _theme = require("@dfds-ui/theme");
|
|
|
11
11
|
var _typography = require("@dfds-ui/typography");
|
|
12
12
|
var _system = require("@dfds-ui/icons/system");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
|
|
14
|
+
var cache;
|
|
15
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
17
18
|
const Text = /*#__PURE__*/(0, _base.default)("span", process.env.NODE_ENV === "production" ? {
|