@dfds-ui/react-components 0.9.7-alpha.3a2ef8a2 → 0.9.7-alpha.3c63be7b
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 +8 -7
- package/accordion/AccordionContent.js +2 -1
- package/cjs/accordion/Accordion.d.ts +97 -0
- package/cjs/accordion/Accordion.js +8 -7
- package/cjs/accordion/AccordionContent.d.ts +13 -0
- package/cjs/accordion/AccordionContent.js +3 -1
- package/cjs/accordion/AccordionSmall.d.ts +55 -0
- package/cjs/accordion/index.d.ts +3 -0
- package/cjs/app-bar/AppBar.d.ts +12 -0
- package/cjs/app-bar/AppBarContext.d.ts +10 -0
- package/cjs/app-bar/AppBarDrawer.d.ts +3 -0
- package/cjs/app-bar/AppBarIconButton.d.ts +10 -0
- package/cjs/app-bar/AppBarItem.d.ts +21 -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 +52 -0
- package/cjs/assertions/banner/BannerAction.d.ts +18 -0
- package/cjs/assertions/banner/BannerActionContext.d.ts +12 -0
- package/cjs/assertions/banner/BannerTypography.d.ts +7 -0
- package/cjs/assertions/banner/index.d.ts +4 -0
- package/cjs/assertions/index.d.ts +2 -0
- package/cjs/assertions/toast/Toast.d.ts +11 -0
- package/cjs/assertions/toast/Toaster.d.ts +18 -0
- package/cjs/assertions/toast/index.d.ts +2 -0
- package/cjs/badge/Badge.d.ts +26 -0
- package/cjs/badge/index.d.ts +2 -0
- package/cjs/button/BadgeIcon.d.ts +6 -0
- package/cjs/button/BaseButton.d.ts +14 -0
- package/cjs/button/Button.d.ts +18 -0
- package/cjs/button/IconButton.d.ts +58 -0
- package/cjs/button/LinkButton.d.ts +8 -0
- package/cjs/button/button-style.d.ts +7 -0
- package/cjs/button/index.d.ts +7 -0
- package/cjs/button-stack/ButtonStack.d.ts +11 -0
- package/cjs/button-stack/index.d.ts +1 -0
- package/cjs/card/Card.d.ts +18 -0
- package/cjs/card/CardActions.d.ts +4 -0
- package/cjs/card/CardContent.d.ts +13 -0
- package/cjs/card/CardMedia.d.ts +18 -0
- package/cjs/card/CardPriceTag.d.ts +24 -0
- package/cjs/card/CardTitle.d.ts +18 -0
- package/cjs/card/index.d.ts +6 -0
- package/cjs/chip/Chip.d.ts +19 -0
- package/cjs/chip/index.d.ts +2 -0
- package/cjs/common/LockBodyScroll.d.ts +25 -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 +26 -0
- package/cjs/counter/PluralCounter.d.ts +13 -0
- package/cjs/counter/index.d.ts +2 -0
- package/cjs/data-table/DataTable.d.ts +10 -0
- package/cjs/data-table/index.d.ts +1 -0
- package/cjs/date-range-picker/DatePickerDefaultStyles.d.ts +2 -0
- package/cjs/date-range-picker/DatePickerDfdsStyles.d.ts +2 -0
- package/cjs/date-range-picker/DateRangePicker.d.ts +33 -0
- package/cjs/date-range-picker/index.d.ts +1 -0
- package/cjs/divider/Divider.d.ts +22 -0
- package/cjs/divider/index.d.ts +1 -0
- package/cjs/drawer/Drawer.d.ts +31 -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 +12 -0
- 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/elevation/index.d.ts +3 -0
- package/cjs/flexbox/FlexBox.d.ts +98 -0
- package/cjs/flexbox/index.d.ts +1 -0
- package/cjs/footer/Footer.d.ts +6 -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 +2 -0
- package/cjs/forms/checkbox/Checkbox.d.ts +39 -0
- package/cjs/forms/checkbox/ExampleControlComponent.d.ts +10 -0
- package/cjs/forms/checkbox/index.d.ts +1 -0
- package/cjs/forms/email-field/EmailField.d.ts +6 -0
- package/cjs/forms/error-text/ErrorText.d.ts +7 -0
- package/cjs/forms/field/Field.d.ts +10 -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 +10 -0
- package/cjs/forms/number-field/NumberField.d.ts +6 -0
- package/cjs/forms/password-field/PasswordField.d.ts +4 -0
- package/cjs/forms/radio/Radio.d.ts +35 -0
- package/cjs/forms/reactselect/ReactSelect.d.ts +25 -0
- 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 +17 -0
- package/cjs/forms/switch/Switch.d.ts +13 -0
- package/cjs/forms/tel-field/TelField.d.ts +6 -0
- package/cjs/forms/text-field/TextField.d.ts +26 -0
- package/cjs/global-styles/GlobalStyles.d.ts +2 -0
- package/cjs/global-styles/GlobalStyles.js +2 -2
- package/cjs/global-styles/sanitize.d.ts +1 -0
- package/cjs/grid/Column.d.ts +9 -0
- package/cjs/grid/Container.d.ts +14 -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 +11 -0
- package/cjs/ie-banner/index.d.ts +1 -0
- package/cjs/index.d.ts +42 -0
- package/cjs/layout/LayoutLegacy.d.ts +1 -0
- package/cjs/lists/FeatureList.d.ts +24 -0
- package/cjs/lists/ListAddon.d.ts +11 -0
- package/cjs/lists/ListDivider.d.ts +4 -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 +3 -0
- package/cjs/lists/index.d.ts +8 -0
- package/cjs/loader/Loader.d.ts +5 -0
- package/cjs/loader/index.d.ts +1 -0
- package/cjs/localization/LocaleFlag.d.ts +13 -0
- package/cjs/localization/index.d.ts +2 -0
- package/cjs/localization/locales.d.ts +34 -0
- package/cjs/logo/Logo.d.ts +10 -0
- 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/nav-bar/NavBar.d.ts +35 -0
- package/cjs/nav-bar/index.d.ts +2 -0
- 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 +2 -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 +7 -0
- package/cjs/progress-bar/index.d.ts +2 -0
- package/cjs/schedule/ScheduleItem.d.ts +21 -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/SideSheetCloseButton.d.ts +13 -0
- package/cjs/side-sheet/SideSheetContent.d.ts +7 -0
- package/cjs/side-sheet/SideSheetFooter.d.ts +7 -0
- package/cjs/side-sheet/SideSheetHeader.d.ts +9 -0
- package/cjs/side-sheet/SideSheetHeadline.d.ts +7 -0
- package/cjs/side-sheet/index.d.ts +4 -0
- package/cjs/site-layout/SiteLayout.d.ts +36 -0
- package/cjs/site-layout/index.d.ts +2 -0
- package/cjs/skeleton/Skeleton.d.ts +6 -0
- package/cjs/skeleton/index.d.ts +1 -0
- package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +26 -0
- package/cjs/social-media-link-list/index.d.ts +1 -0
- package/cjs/spinner/Spinner.d.ts +15 -0
- package/cjs/spinner/index.d.ts +2 -0
- package/cjs/stepper/Step.d.ts +9 -0
- package/cjs/stepper/Stepper.d.ts +15 -0
- package/cjs/stepper/index.d.ts +2 -0
- package/cjs/styles/index.d.ts +3 -0
- 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 +30 -0
- package/cjs/surface/index.d.ts +1 -0
- package/cjs/tab/Tab.d.ts +11 -0
- package/cjs/tab/TabPanel.d.ts +7 -0
- package/cjs/tab/Tabs.d.ts +11 -0
- package/cjs/tab/TabsContext.d.ts +14 -0
- package/cjs/tab/index.d.ts +4 -0
- package/cjs/table/Table.d.ts +22 -0
- package/cjs/table/Table.js +3 -3
- package/cjs/table/TableBody.d.ts +9 -0
- package/cjs/table/TableDataCell.d.ts +14 -0
- package/cjs/table/TableDataCell.js +1 -1
- package/cjs/table/TableHead.d.ts +14 -0
- package/cjs/table/TableHead.js +1 -1
- package/cjs/table/TableHeaderCell.d.ts +15 -0
- package/cjs/table/TableHeaderCell.js +2 -2
- package/cjs/table/TableRow.d.ts +17 -0
- package/cjs/table/TableRow.js +1 -1
- package/cjs/table/index.d.ts +6 -0
- package/cjs/test/Test.d.ts +8 -0
- package/cjs/tooltip/Tooltip.d.ts +12 -0
- package/cjs/tooltip/index.d.ts +1 -0
- package/cjs/typography/Headlines.d.ts +70 -0
- package/cjs/typography/Text.d.ts +4 -0
- package/cjs/typography/index.d.ts +2 -0
- package/global-styles/GlobalStyles.js +2 -2
- package/package.json +9 -9
- package/table/Table.d.ts +4 -4
- package/table/Table.js +4 -4
- package/table/TableBody.d.ts +4 -4
- package/table/TableDataCell.d.ts +4 -4
- package/table/TableDataCell.js +1 -1
- package/table/TableHead.d.ts +4 -4
- package/table/TableHead.js +1 -1
- package/table/TableHeaderCell.d.ts +4 -4
- package/table/TableHeaderCell.js +2 -2
- package/table/TableRow.d.ts +17 -0
- package/table/TableRow.js +1 -1
- package/cjs/table/data.js +0 -36
- package/table/data.d.ts +0 -9
- package/table/data.js +0 -29
|
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { theme } from '@dfds-ui/theme';
|
|
12
|
+
import { typography } from '@dfds-ui/typography';
|
|
12
13
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
14
|
export var AccordionContent = function AccordionContent(_ref) {
|
|
14
15
|
var variant = _ref.variant,
|
|
@@ -18,7 +19,7 @@ export var AccordionContent = function AccordionContent(_ref) {
|
|
|
18
19
|
|
|
19
20
|
return ___EmotionJSX("div", _extends({
|
|
20
21
|
className: "accordion__content",
|
|
21
|
-
css: /*#__PURE__*/css("margin-bottom:", variant === 'default' ? theme.spacing.xs : '0', ";padding:0 ", theme.spacing.s, " ", theme.spacing.s, ";background-color:white;color:", theme.colors.text.dark.primary, ";
|
|
22
|
+
css: /*#__PURE__*/css(typography.body, ";margin-bottom:", variant === 'default' ? theme.spacing.xs : '0', ";padding:0 ", theme.spacing.s, " ", theme.spacing.s, ";background-color:white;color:", theme.colors.text.dark.primary, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:AccordionContent;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY2NvcmR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206ICR7dmFyaWFudCA9PT0gJ2RlZmF1bHQnID8gdGhlbWUuc3BhY2luZy54cyA6ICcwJ307XG4gICAgICAgIHBhZGRpbmc6IDAgJHt0aGVtZS5zcGFjaW5nLnN9ICR7dGhlbWUuc3BhY2luZy5zfTtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gICAgICAgIGNvbG9yOiAke3RoZW1lLmNvbG9ycy50ZXh0LmRhcmsucHJpbWFyeX07XG4gICAgICBgfVxuICAgICAgey4uLnJlc3R9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IEFjY29yZGlvbkNvbnRlbnRcbiJdfQ== */")
|
|
22
23
|
}, rest), children);
|
|
23
24
|
};
|
|
24
25
|
export default AccordionContent;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { CollapseProps } from '@kunukn/react-collapse';
|
|
3
|
+
export declare type AccordionHeaderProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Add heading to the Accordion.
|
|
6
|
+
*/
|
|
7
|
+
heading?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Add secondary heading to the Accordion.
|
|
10
|
+
*/
|
|
11
|
+
secondaryHeading?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Specify the duration of the transition between open and closed.
|
|
14
|
+
*/
|
|
15
|
+
transitionDuration?: string;
|
|
16
|
+
/**
|
|
17
|
+
* If set to `true` the Accordion is open.
|
|
18
|
+
*/
|
|
19
|
+
isOpen?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Disable the Accordion.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Use the Accordion without animation.
|
|
26
|
+
*/
|
|
27
|
+
noAnimation?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Hide the secondary heading when the Accordion is opened.
|
|
30
|
+
*/
|
|
31
|
+
noSecondaryHeadingWhenOpen?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Callback when toggling the accordion
|
|
34
|
+
*/
|
|
35
|
+
onToggle?: () => void;
|
|
36
|
+
};
|
|
37
|
+
export declare const AccordionHeader: React.FunctionComponent<AccordionHeaderProps>;
|
|
38
|
+
export declare type AccordionProps = {
|
|
39
|
+
/**
|
|
40
|
+
* Add heading to the Accordion.
|
|
41
|
+
*/
|
|
42
|
+
heading?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Add a custom header to the Accordion.
|
|
45
|
+
*/
|
|
46
|
+
header?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Add secondary heading to the Accordion.
|
|
49
|
+
*/
|
|
50
|
+
secondaryHeading?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Specify the duration of the transition between open and closed.
|
|
53
|
+
*/
|
|
54
|
+
transitionDuration?: string;
|
|
55
|
+
/**
|
|
56
|
+
* If set to `true` the Accordion is open.
|
|
57
|
+
*/
|
|
58
|
+
isOpen?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Disable the Accordion.
|
|
61
|
+
*/
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Callback when toggling the accordion
|
|
65
|
+
*/
|
|
66
|
+
onToggle?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Props passed on to the Collapse component
|
|
69
|
+
*/
|
|
70
|
+
collapseProps?: CollapseProps;
|
|
71
|
+
/**
|
|
72
|
+
* Use the Accordion without animation.
|
|
73
|
+
*/
|
|
74
|
+
noAnimation?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The compressed variant removes the `margin-bottom` of the Accordion.
|
|
77
|
+
*/
|
|
78
|
+
variant?: 'default' | 'compressed';
|
|
79
|
+
/**
|
|
80
|
+
* Specify the content padding of the Accordion.
|
|
81
|
+
*/
|
|
82
|
+
type?: 'small' | 'medium';
|
|
83
|
+
/**
|
|
84
|
+
* Add a className to the Accordion.
|
|
85
|
+
*/
|
|
86
|
+
className?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Hide the secondary heading when the Accordion is opened.
|
|
89
|
+
*/
|
|
90
|
+
noSecondaryHeadingWhenOpen?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Hide the Divider (the grey line under the header)
|
|
93
|
+
*/
|
|
94
|
+
hideDivider?: boolean;
|
|
95
|
+
};
|
|
96
|
+
export declare const Accordion: React.FunctionComponent<AccordionProps>;
|
|
97
|
+
export default Accordion;
|