@dfds-ui/react-components 2.2.0-alpha.9bb1ab0f → 2.2.0-alpha.a78c2264
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 +70 -51
- package/accordion/AccordionContent.js +13 -6
- package/accordion/AccordionSmall.js +52 -38
- package/app-bar/AppBar.js +49 -35
- package/app-bar/AppBarContext.js +7 -6
- package/app-bar/AppBarDrawer.js +13 -6
- package/app-bar/AppBarIconButton.js +10 -5
- package/app-bar/AppBarItem.js +71 -56
- package/assertions/banner/Banner.js +65 -51
- package/assertions/banner/BannerAction.js +10 -5
- package/assertions/banner/BannerTypography.js +9 -4
- package/assertions/toast/Toast.js +28 -17
- package/assertions/toast/Toaster.js +52 -56
- package/badge/Badge.js +17 -9
- package/button/BadgeIcon.js +18 -16
- package/button/Button.js +27 -19
- package/button/IconButton.js +20 -13
- package/button/LinkButton.js +8 -3
- package/button-stack/ButtonStack.js +27 -19
- package/card/Card.js +49 -35
- package/card/CardActions.js +13 -6
- package/card/CardContent.js +19 -9
- package/card/CardMedia.js +15 -6
- package/card/CardPriceTag.js +22 -4
- package/card/CardTitle.js +25 -15
- package/chip/Chip.js +22 -13
- package/cjs/accordion/Accordion.js +63 -50
- package/cjs/accordion/AccordionContent.js +7 -6
- package/cjs/accordion/AccordionSmall.js +45 -37
- package/cjs/app-bar/AppBar.js +45 -35
- package/cjs/app-bar/AppBarContext.js +5 -4
- package/cjs/app-bar/AppBarDrawer.js +7 -7
- package/cjs/app-bar/AppBarIconButton.js +6 -6
- package/cjs/app-bar/AppBarItem.js +63 -54
- package/cjs/app-bar/AppBarListItem.js +1 -2
- package/cjs/assertions/banner/Banner.js +56 -49
- package/cjs/assertions/banner/BannerAction.js +5 -4
- package/cjs/assertions/banner/BannerTypography.js +9 -7
- package/cjs/assertions/toast/Toast.js +22 -17
- package/cjs/assertions/toast/Toaster.js +36 -28
- package/cjs/badge/Badge.js +11 -7
- package/cjs/button/BadgeIcon.js +19 -17
- package/cjs/button/BaseButton.js +2 -4
- package/cjs/button/Button.js +21 -19
- package/cjs/button/IconButton.js +15 -14
- package/cjs/button/LinkButton.js +6 -6
- package/cjs/button/button-style.js +8 -15
- package/cjs/button-stack/ButtonStack.js +19 -17
- package/cjs/card/Card.js +39 -29
- package/cjs/card/CardActions.js +7 -7
- package/cjs/card/CardContent.js +13 -9
- package/cjs/card/CardMedia.js +9 -6
- package/cjs/card/CardPriceTag.js +16 -4
- package/cjs/card/CardTitle.js +16 -12
- package/cjs/chip/Chip.js +18 -15
- package/cjs/common/LockBodyScroll.js +15 -11
- package/cjs/common/emotionCloneElement.js +1 -2
- package/cjs/common/polymorphic.js +9 -5
- package/cjs/counter/Counter.js +50 -43
- package/cjs/counter/PluralCounter.js +13 -11
- package/cjs/data-table/DataTable.js +45 -37
- package/cjs/date-range-picker/DateRangePicker.d.ts +4 -4
- package/cjs/date-range-picker/DateRangePicker.js +276 -207
- package/cjs/date-range-picker/DateRangePicker.styles.d.ts +6 -0
- package/cjs/date-range-picker/DateRangePicker.styles.js +14 -0
- package/cjs/divider/Divider.js +6 -6
- package/cjs/drawer/Drawer.js +10 -8
- package/cjs/dropdown-menu/Dropdown.js +34 -29
- package/cjs/dropdown-menu/DropdownContext.js +7 -8
- package/cjs/dropdown-menu/MenuCheckbox.js +24 -23
- package/cjs/dropdown-menu/MenuItem.js +30 -28
- package/cjs/dropdown-menu/MenuTitle.js +15 -12
- package/cjs/elevation/index.js +1 -2
- package/cjs/flexbox/FlexBox.js +2 -4
- package/cjs/footer/Footer.js +10 -6
- package/cjs/forms/assistive-text/AssistiveText.js +1 -2
- package/cjs/forms/asterisk/Asterisk.js +5 -4
- package/cjs/forms/checkbox/Checkbox.js +36 -31
- package/cjs/forms/checkbox/ExampleControlComponent.js +7 -7
- package/cjs/forms/email-field/EmailField.js +7 -7
- package/cjs/forms/error-text/ErrorText.js +1 -2
- package/cjs/forms/field/Field.js +10 -6
- package/cjs/forms/input/Input.js +23 -21
- package/cjs/forms/input/InputComposition.js +29 -23
- package/cjs/forms/label/Label.js +6 -3
- package/cjs/forms/number-field/NumberField.js +6 -6
- package/cjs/forms/password-field/PasswordField.js +10 -10
- package/cjs/forms/radio/Radio.js +20 -19
- package/cjs/forms/reactselect/ReactSelect.js +70 -61
- package/cjs/forms/searchable-select/AsyncSearchableSelect.js +47 -38
- package/cjs/forms/select/Select.js +25 -22
- package/cjs/forms/select-field/SelectField.js +33 -29
- package/cjs/forms/switch/Switch.js +28 -22
- package/cjs/forms/tel-field/TelField.js +7 -7
- package/cjs/forms/text-field/TextField.js +37 -34
- package/cjs/global-styles/GlobalStyles.js +3 -2
- package/cjs/global-styles/ResetStyles.js +2 -1
- package/cjs/global-styles/sanitize.js +2 -3
- package/cjs/grid/Column.js +7 -7
- package/cjs/grid/Container.js +34 -29
- package/cjs/hero/Hero.js +32 -12
- package/cjs/hero/stripes.js +177 -162
- package/cjs/ie-banner/IEBanner.js +13 -8
- package/cjs/layout/LayoutLegacy.js +2 -1
- package/cjs/lists/FeatureList.js +16 -13
- package/cjs/lists/ListAddon.js +10 -7
- package/cjs/lists/ListDivider.js +6 -6
- package/cjs/lists/ListIcon.js +6 -6
- package/cjs/lists/ListItem.js +7 -6
- package/cjs/lists/ListText.js +6 -6
- package/cjs/lists/ListTextGroup.js +6 -6
- package/cjs/lists/ListTitle.js +6 -6
- package/cjs/loader/DfdsLoader.js +27 -21
- package/cjs/loader/Loader.js +9 -3
- package/cjs/localization/LocaleFlag.js +5 -4
- package/cjs/localization/locales.js +3 -6
- package/cjs/logo/Logo.js +12 -9
- package/cjs/media/index.js +1 -2
- package/cjs/menu/Menu.js +22 -15
- package/cjs/mobile-stepper/MobileStepper.js +17 -15
- package/cjs/nav-bar/NavBar.js +34 -24
- package/cjs/nav-menu/NavMenuItem.js +13 -11
- package/cjs/pagination/Pagination.js +50 -38
- package/cjs/pagination/Pagination.styles.js +6 -12
- package/cjs/popper/Popper.js +21 -17
- package/cjs/progress-bar/ProgressBar.js +3 -3
- package/cjs/schedule/ScheduleItem.js +11 -8
- package/cjs/schedule/ScheduleList.js +10 -11
- package/cjs/side-sheet/SideSheet.js +41 -33
- package/cjs/side-sheet/SideSheetCloseButton.js +6 -6
- package/cjs/side-sheet/SideSheetContent.js +10 -7
- package/cjs/side-sheet/SideSheetFooter.js +10 -7
- package/cjs/side-sheet/SideSheetHeader.js +10 -7
- package/cjs/side-sheet/SideSheetHeadline.js +6 -5
- package/cjs/site-layout/SiteLayout.js +30 -19
- package/cjs/skeleton/Skeleton.js +6 -6
- package/cjs/social-media-link-list/SocialMediaLinkList.js +64 -58
- package/cjs/spinner/Spinner.js +13 -13
- package/cjs/step/Step.js +29 -20
- package/cjs/step/Step.styles.js +4 -8
- package/cjs/step/StepButton.js +26 -23
- package/cjs/step/StepContent.js +12 -10
- package/cjs/step/StepContext.js +1 -2
- package/cjs/step/StepLabel.js +9 -7
- package/cjs/stepper/Stepper.js +12 -10
- package/cjs/stepper/StepperContext.js +1 -2
- package/cjs/stepper-feedback-message/StepperFeedbackMessage.js +10 -7
- package/cjs/styles/media.js +2 -4
- package/cjs/styles/theme.js +2 -4
- package/cjs/surface/Surface.js +20 -14
- package/cjs/tab/Tab.js +7 -6
- package/cjs/tab/TabPanel.js +6 -6
- package/cjs/tab/Tabs.js +29 -28
- package/cjs/tab/TabsContext.js +7 -8
- package/cjs/table/Table.js +15 -15
- package/cjs/table/TableBody.js +8 -9
- package/cjs/table/TableDataCell.js +9 -10
- package/cjs/table/TableHead.js +10 -12
- package/cjs/table/TableHeaderCell.js +9 -10
- package/cjs/table/TableRow.js +9 -10
- package/cjs/test/Test.js +5 -4
- package/cjs/tooltip/Tooltip.js +28 -22
- package/cjs/typography/Headlines.js +14 -20
- package/cjs/typography/Text.js +2 -3
- package/common/LockBodyScroll.js +20 -10
- package/common/polymorphic.js +9 -3
- package/common/use-media.js +2 -2
- package/counter/Counter.js +50 -42
- package/counter/PluralCounter.js +20 -11
- package/data-table/DataTable.js +52 -38
- package/date-range-picker/DateRangePicker.d.ts +4 -4
- package/date-range-picker/DateRangePicker.js +319 -238
- package/date-range-picker/DateRangePicker.styles.d.ts +6 -0
- package/date-range-picker/DateRangePicker.styles.js +9 -0
- package/divider/Divider.js +10 -5
- package/drawer/Drawer.js +15 -6
- package/dropdown-menu/Dropdown.js +42 -31
- package/dropdown-menu/DropdownContext.js +5 -4
- package/dropdown-menu/MenuCheckbox.js +24 -17
- package/dropdown-menu/MenuItem.js +26 -18
- package/dropdown-menu/MenuTitle.js +14 -11
- package/flexbox/FlexBox.js +2 -2
- package/footer/Footer.js +9 -4
- package/forms/asterisk/Asterisk.js +4 -2
- package/forms/checkbox/Checkbox.js +42 -32
- package/forms/checkbox/ExampleControlComponent.js +15 -8
- package/forms/email-field/EmailField.js +8 -3
- package/forms/field/Field.js +9 -4
- package/forms/input/Input.js +29 -22
- package/forms/input/InputComposition.js +29 -17
- package/forms/label/Label.js +12 -4
- package/forms/number-field/NumberField.js +8 -3
- package/forms/password-field/PasswordField.js +15 -9
- package/forms/radio/Radio.js +25 -18
- package/forms/reactselect/ReactSelect.js +65 -57
- package/forms/searchable-select/AsyncSearchableSelect.js +50 -38
- package/forms/select/Select.js +31 -23
- package/forms/select-field/SelectField.js +38 -29
- package/forms/switch/Switch.js +35 -23
- package/forms/tel-field/TelField.js +8 -3
- package/forms/text-field/TextField.js +43 -34
- package/global-styles/GlobalStyles.js +3 -3
- package/global-styles/ResetStyles.js +2 -2
- package/grid/Column.js +14 -7
- package/grid/Container.js +41 -35
- package/hero/Hero.js +32 -10
- package/hero/stripes.js +176 -160
- package/ie-banner/IEBanner.js +14 -8
- package/layout/LayoutLegacy.js +2 -2
- package/lists/FeatureList.js +21 -11
- package/lists/ListAddon.js +13 -6
- package/lists/ListDivider.js +10 -5
- package/lists/ListIcon.js +10 -5
- package/lists/ListItem.js +13 -6
- package/lists/ListText.js +10 -5
- package/lists/ListTextGroup.js +10 -5
- package/lists/ListTitle.js +10 -5
- package/loader/DfdsLoader.js +25 -19
- package/loader/Loader.js +8 -2
- package/localization/LocaleFlag.js +10 -5
- package/logo/Logo.js +14 -7
- package/menu/Menu.js +25 -12
- package/mobile-stepper/MobileStepper.js +26 -18
- package/nav-bar/NavBar.js +41 -23
- package/nav-menu/NavMenuItem.js +12 -10
- package/package.json +14 -16
- package/pagination/Pagination.js +53 -35
- package/popper/Popper.js +27 -17
- package/progress-bar/ProgressBar.js +2 -2
- package/schedule/ScheduleItem.js +9 -4
- package/schedule/ScheduleList.js +16 -10
- package/side-sheet/SideSheet.js +47 -34
- package/side-sheet/SideSheetCloseButton.js +10 -5
- package/side-sheet/SideSheetContent.js +17 -8
- package/side-sheet/SideSheetFooter.js +17 -8
- package/side-sheet/SideSheetHeader.js +17 -8
- package/side-sheet/SideSheetHeadline.js +5 -4
- package/site-layout/SiteLayout.js +31 -12
- package/skeleton/Skeleton.js +10 -5
- package/social-media-link-list/SocialMediaLinkList.js +69 -55
- package/spinner/Spinner.js +17 -10
- package/step/Step.js +34 -20
- package/step/StepButton.js +23 -15
- package/step/StepContent.js +11 -9
- package/step/StepLabel.js +8 -6
- package/stepper/Stepper.js +13 -11
- package/stepper-feedback-message/StepperFeedbackMessage.js +9 -6
- package/surface/Surface.js +17 -14
- package/tab/Tab.js +13 -6
- package/tab/TabPanel.js +5 -4
- package/tab/Tabs.js +42 -35
- package/tab/TabsContext.js +5 -4
- package/table/Table.js +20 -13
- package/table/TableBody.js +13 -7
- package/table/TableDataCell.js +14 -8
- package/table/TableHead.js +10 -8
- package/table/TableHeaderCell.js +14 -8
- package/table/TableRow.js +11 -10
- package/test/Test.js +4 -2
- package/tooltip/Tooltip.js +31 -21
- package/typography/Headlines.js +13 -6
- package/cjs/date-range-picker/DatePickerDefaultStyles.d.ts +0 -2
- package/cjs/date-range-picker/DatePickerDefaultStyles.js +0 -19
- package/cjs/date-range-picker/DatePickerDfdsStyles.d.ts +0 -2
- package/cjs/date-range-picker/DatePickerDfdsStyles.js +0 -11
- package/date-range-picker/DatePickerDefaultStyles.d.ts +0 -2
- package/date-range-picker/DatePickerDefaultStyles.js +0 -12
- package/date-range-picker/DatePickerDfdsStyles.d.ts +0 -2
- package/date-range-picker/DatePickerDfdsStyles.js +0 -4
package/card/CardContent.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "color"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
import React from 'react';
|
|
6
12
|
import { theme } from '@dfds-ui/theme';
|
|
7
13
|
import { Text } from '@dfds-ui/typography';
|
|
8
|
-
import { jsx as
|
|
14
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
9
15
|
var ContentContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
10
16
|
target: "e13iposs1"
|
|
11
17
|
} : {
|
|
@@ -24,11 +30,15 @@ var CardContent = function CardContent(_ref) {
|
|
|
24
30
|
var children = _ref.children,
|
|
25
31
|
color = _ref.color,
|
|
26
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
return _jsx(ContentContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
34
|
+
children: _jsx(Content, {
|
|
35
|
+
color: color,
|
|
36
|
+
children: _jsx(Text, {
|
|
37
|
+
as: "div",
|
|
38
|
+
styledAs: 'body',
|
|
39
|
+
children: children
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
}));
|
|
33
43
|
};
|
|
34
44
|
export default CardContent;
|
package/card/CardMedia.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "media", "aspectRatio"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
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)."; }
|
|
6
12
|
import React from 'react';
|
|
7
|
-
import { jsx as
|
|
13
|
+
import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
8
14
|
function toPercent(_ref) {
|
|
9
15
|
var aspectRatio = _ref.aspectRatio;
|
|
10
16
|
return aspectRatio === '3:2' ? '66.6667%' : '50.00%';
|
|
@@ -34,8 +40,11 @@ var CardMedia = function CardMedia(_ref2) {
|
|
|
34
40
|
_ref2$aspectRatio = _ref2.aspectRatio,
|
|
35
41
|
aspectRatio = _ref2$aspectRatio === void 0 ? '2:1' : _ref2$aspectRatio,
|
|
36
42
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
return _jsx(MediaContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
44
|
+
children: _jsxs(AspectWrapper, {
|
|
45
|
+
aspectRatio: aspectRatio,
|
|
46
|
+
children: [media, children]
|
|
47
|
+
})
|
|
48
|
+
}));
|
|
40
49
|
};
|
|
41
50
|
export default CardMedia;
|
package/card/CardPriceTag.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["price", "topText", "bottomText", "currency"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
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)."; }
|
|
6
12
|
import React from 'react';
|
|
7
|
-
import { jsx as
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
8
14
|
var Wrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
9
15
|
target: "eci6nyw5"
|
|
10
16
|
} : {
|
|
@@ -89,6 +95,18 @@ var CardPriceTag = function CardPriceTag(_ref) {
|
|
|
89
95
|
bottomText = _ref.bottomText,
|
|
90
96
|
currency = _ref.currency,
|
|
91
97
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
92
|
-
return
|
|
98
|
+
return _jsx(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
|
|
99
|
+
children: _jsxs(Content, {
|
|
100
|
+
children: [_jsx(From, {
|
|
101
|
+
children: topText
|
|
102
|
+
}), _jsx(Currency, {
|
|
103
|
+
children: currency
|
|
104
|
+
}), _jsx(Price, {
|
|
105
|
+
children: price
|
|
106
|
+
}), _jsx(Info, {
|
|
107
|
+
children: bottomText
|
|
108
|
+
})]
|
|
109
|
+
})
|
|
110
|
+
}));
|
|
93
111
|
};
|
|
94
112
|
export default CardPriceTag;
|
package/card/CardTitle.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import { css as _css } from "@emotion/react";
|
|
2
3
|
var _excluded = ["children", "color", "largeTitle"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
11
|
import React from 'react';
|
|
7
12
|
import { Text } from '@dfds-ui/typography';
|
|
8
13
|
import { theme, useBreakpoint } from '@dfds-ui/theme';
|
|
9
14
|
import { CardContext } from './Card';
|
|
10
15
|
import { css } from '@emotion/react';
|
|
11
|
-
import { jsx as
|
|
16
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
12
17
|
var CardTitle = function CardTitle(_ref) {
|
|
13
|
-
var
|
|
18
|
+
var _children = _ref.children,
|
|
14
19
|
color = _ref.color,
|
|
15
20
|
_ref$largeTitle = _ref.largeTitle,
|
|
16
21
|
largeTitle = _ref$largeTitle === void 0 ? false : _ref$largeTitle,
|
|
@@ -23,16 +28,21 @@ var CardTitle = function CardTitle(_ref) {
|
|
|
23
28
|
}
|
|
24
29
|
return theme.spacing.s;
|
|
25
30
|
};
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
return _jsx(CardContext.Consumer, {
|
|
32
|
+
children: function children(context) {
|
|
33
|
+
return _jsx("div", _objectSpread(_objectSpread({
|
|
34
|
+
css: /*#__PURE__*/css("padding-top:", getPadding(context), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CardTitle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jYXJkL0NhcmRUaXRsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUNrQiIsImZpbGUiOiIuLi8uLi9zcmMvY2FyZC9DYXJkVGl0bGUudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IEZ1bmN0aW9uQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnQGRmZHMtdWkvdHlwb2dyYXBoeSdcbmltcG9ydCB7IHRoZW1lLCB1c2VCcmVha3BvaW50IH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyBDYXJkQ29udGV4dCB9IGZyb20gJy4vQ2FyZCdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgdHlwZSBDYXJkVGl0bGVQcm9wcyA9IHtcbiAgY2hpbGRyZW4/OiBSZWFjdC5SZWFjdE5vZGVcbiAgLyoqXG4gICAqIFRleHQgY29sb3JcbiAgICovXG4gIGNvbG9yPzogc3RyaW5nXG5cbiAgLyoqXG4gICAqIElmIHNldCB0byB0cnVlIHRoZSB0aXRsZSB3aWxsIGJlIGRpc3BsYXllZCB1c2luZyB0aGUgYHNlY3Rpb25IZWFkbGluZWAgaW5zdGVhZCBvZiBhIGBzbWFsbEhlYWRsaW5lYC5cbiAgICogQnV0IG9ubHkgZm9yIGxhcmdlIHNjcmVlbnMuXG4gICAqL1xuICBsYXJnZVRpdGxlPzogYm9vbGVhblxuXG4gIC8qKlxuICAgKiBjbGFzc05hbWUgdG8gYmUgYXNzaWduZWQgdG8gdGhlIGNvbXBvbmVudFxuICAgKi9cbiAgY2xhc3NOYW1lPzogc3RyaW5nXG59XG5cbmNvbnN0IENhcmRUaXRsZTogRnVuY3Rpb25Db21wb25lbnQ8Q2FyZFRpdGxlUHJvcHM+ID0gKHsgY2hpbGRyZW4sIGNvbG9yLCBsYXJnZVRpdGxlID0gZmFsc2UsIC4uLnJlc3QgfSkgPT4ge1xuICBjb25zdCB7IGdyZWF0ZXJUaGFuIH0gPSB1c2VCcmVha3BvaW50KClcblxuICBjb25zdCBnZXRQYWRkaW5nID0gKGNvbnRleHQ6IGFueSkgPT4ge1xuICAgIGlmIChjb250ZXh0LmNhcmRWYXJpYW50ID09PSAnc3VyZmFjZScgJiYgY29udGV4dC5jYXJkU2l6ZSA9PT0gJ3hsJyAmJiBncmVhdGVyVGhhbignbCcpKSB7XG4gICAgICByZXR1cm4gJzBweCdcbiAgICB9XG4gICAgcmV0dXJuIHRoZW1lLnNwYWNpbmcuc1xuICB9XG5cbiAgcmV0dXJuIChcbiAgICA8Q2FyZENvbnRleHQuQ29uc3VtZXI+XG4gICAgICB7KGNvbnRleHQpID0+IChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgcGFkZGluZy10b3A6ICR7Z2V0UGFkZGluZyhjb250ZXh0KX07XG4gICAgICAgICAgYH1cbiAgICAgICAgICB7Li4ucmVzdH1cbiAgICAgICAgPlxuICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICBjc3M9e3sgY29sb3I6IGNvbG9yID8gY29sb3IgOiB0aGVtZS5jb2xvcnMudGV4dC5wcmltYXJ5LnByaW1hcnkgfX1cbiAgICAgICAgICAgIGFzPXsnZGl2J31cbiAgICAgICAgICAgIHN0eWxlZEFzPXtsYXJnZVRpdGxlICYmIGdyZWF0ZXJUaGFuKCdsJykgPyAnc2VjdGlvbkhlYWRsaW5lJyA6ICdzbWFsbEhlYWRsaW5lJ31cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9UZXh0PlxuICAgICAgICA8L2Rpdj5cbiAgICAgICl9XG4gICAgPC9DYXJkQ29udGV4dC5Db25zdW1lcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBDYXJkVGl0bGVcbiJdfQ== */")
|
|
35
|
+
}, rest), {}, {
|
|
36
|
+
children: _jsx(Text, {
|
|
37
|
+
css: /*#__PURE__*/_css({
|
|
38
|
+
color: color ? color : theme.colors.text.primary.primary
|
|
39
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:CardTitle;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jYXJkL0NhcmRUaXRsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkNZIiwiZmlsZSI6Ii4uLy4uL3NyYy9jYXJkL0NhcmRUaXRsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IFRleHQgfSBmcm9tICdAZGZkcy11aS90eXBvZ3JhcGh5J1xuaW1wb3J0IHsgdGhlbWUsIHVzZUJyZWFrcG9pbnQgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IENhcmRDb250ZXh0IH0gZnJvbSAnLi9DYXJkJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmV4cG9ydCB0eXBlIENhcmRUaXRsZVByb3BzID0ge1xuICBjaGlsZHJlbj86IFJlYWN0LlJlYWN0Tm9kZVxuICAvKipcbiAgICogVGV4dCBjb2xvclxuICAgKi9cbiAgY29sb3I/OiBzdHJpbmdcblxuICAvKipcbiAgICogSWYgc2V0IHRvIHRydWUgdGhlIHRpdGxlIHdpbGwgYmUgZGlzcGxheWVkIHVzaW5nIHRoZSBgc2VjdGlvbkhlYWRsaW5lYCBpbnN0ZWFkIG9mIGEgYHNtYWxsSGVhZGxpbmVgLlxuICAgKiBCdXQgb25seSBmb3IgbGFyZ2Ugc2NyZWVucy5cbiAgICovXG4gIGxhcmdlVGl0bGU/OiBib29sZWFuXG5cbiAgLyoqXG4gICAqIGNsYXNzTmFtZSB0byBiZSBhc3NpZ25lZCB0byB0aGUgY29tcG9uZW50XG4gICAqL1xuICBjbGFzc05hbWU/OiBzdHJpbmdcbn1cblxuY29uc3QgQ2FyZFRpdGxlOiBGdW5jdGlvbkNvbXBvbmVudDxDYXJkVGl0bGVQcm9wcz4gPSAoeyBjaGlsZHJlbiwgY29sb3IsIGxhcmdlVGl0bGUgPSBmYWxzZSwgLi4ucmVzdCB9KSA9PiB7XG4gIGNvbnN0IHsgZ3JlYXRlclRoYW4gfSA9IHVzZUJyZWFrcG9pbnQoKVxuXG4gIGNvbnN0IGdldFBhZGRpbmcgPSAoY29udGV4dDogYW55KSA9PiB7XG4gICAgaWYgKGNvbnRleHQuY2FyZFZhcmlhbnQgPT09ICdzdXJmYWNlJyAmJiBjb250ZXh0LmNhcmRTaXplID09PSAneGwnICYmIGdyZWF0ZXJUaGFuKCdsJykpIHtcbiAgICAgIHJldHVybiAnMHB4J1xuICAgIH1cbiAgICByZXR1cm4gdGhlbWUuc3BhY2luZy5zXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxDYXJkQ29udGV4dC5Db25zdW1lcj5cbiAgICAgIHsoY29udGV4dCkgPT4gKFxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwYWRkaW5nLXRvcDogJHtnZXRQYWRkaW5nKGNvbnRleHQpfTtcbiAgICAgICAgICBgfVxuICAgICAgICAgIHsuLi5yZXN0fVxuICAgICAgICA+XG4gICAgICAgICAgPFRleHRcbiAgICAgICAgICAgIGNzcz17eyBjb2xvcjogY29sb3IgPyBjb2xvciA6IHRoZW1lLmNvbG9ycy50ZXh0LnByaW1hcnkucHJpbWFyeSB9fVxuICAgICAgICAgICAgYXM9eydkaXYnfVxuICAgICAgICAgICAgc3R5bGVkQXM9e2xhcmdlVGl0bGUgJiYgZ3JlYXRlclRoYW4oJ2wnKSA/ICdzZWN0aW9uSGVhZGxpbmUnIDogJ3NtYWxsSGVhZGxpbmUnfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICA8L1RleHQ+XG4gICAgICAgIDwvZGl2PlxuICAgICAgKX1cbiAgICA8L0NhcmRDb250ZXh0LkNvbnN1bWVyPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IENhcmRUaXRsZVxuIl19 */"),
|
|
40
|
+
as: 'div',
|
|
41
|
+
styledAs: largeTitle && greaterThan('l') ? 'sectionHeadline' : 'smallHeadline',
|
|
42
|
+
children: _children
|
|
43
|
+
})
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
36
46
|
});
|
|
37
47
|
};
|
|
38
48
|
export default CardTitle;
|
package/chip/Chip.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "dismissable", "disabled", "selectable", "selected", "onToggle", "onDismiss", "className"];
|
|
3
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
9
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
11
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++)
|
|
8
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0)
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
14
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++)
|
|
11
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r)
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
12
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)."; }
|
|
13
18
|
import React, { useState } from 'react';
|
|
14
19
|
import { css } from '@emotion/react';
|
|
15
20
|
import { theme } from '@dfds-ui/theme';
|
|
16
21
|
import { typography } from '@dfds-ui/typography';
|
|
17
22
|
import { Clear } from '@dfds-ui/icons/system';
|
|
18
|
-
import { jsx as
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
19
24
|
var Text = /*#__PURE__*/_styled("span", process.env.NODE_ENV === "production" ? {
|
|
20
25
|
target: "evt86lh3"
|
|
21
26
|
} : {
|
|
@@ -105,7 +110,7 @@ export default (function (_ref4) {
|
|
|
105
110
|
toggleSelected(event);
|
|
106
111
|
handleDismiss(event);
|
|
107
112
|
};
|
|
108
|
-
return
|
|
113
|
+
return _jsxs(Chip, _objectSpread(_objectSpread(_objectSpread({
|
|
109
114
|
className: className,
|
|
110
115
|
tabIndex: 0,
|
|
111
116
|
disabled: disabled,
|
|
@@ -117,11 +122,15 @@ export default (function (_ref4) {
|
|
|
117
122
|
onKeyPress: function onKeyPress(event) {
|
|
118
123
|
return event.key === 'Enter' && handleKeyPress(event);
|
|
119
124
|
}
|
|
120
|
-
}, {
|
|
125
|
+
}), {}, {
|
|
121
126
|
selected: selectable && isSelected
|
|
122
|
-
}, rest),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
}, rest), {}, {
|
|
128
|
+
children: [_jsx(Text, {
|
|
129
|
+
dismissable: dismissable,
|
|
130
|
+
children: children
|
|
131
|
+
}), dismissable && _jsx(DismissIcon, {
|
|
132
|
+
onClick: handleDismiss,
|
|
133
|
+
children: _jsx(Clear, {})
|
|
134
|
+
})]
|
|
135
|
+
}));
|
|
127
136
|
});
|