@dnanpm/styleguide 3.10.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/Accordion/Accordion.js +3 -4
- package/build/cjs/components/AccordionItem/AccordionItem.js +17 -16
- package/build/cjs/components/AmountSelector/AmountSelector.d.ts +17 -1
- package/build/cjs/components/AmountSelector/AmountSelector.js +53 -10
- package/build/cjs/components/Box/Box.js +6 -7
- package/build/cjs/components/Button/Button.js +26 -23
- package/build/cjs/components/ButtonArrow/ButtonArrow.js +3 -4
- package/build/cjs/components/ButtonCard/ButtonCard.js +9 -10
- package/build/cjs/components/ButtonClose/ButtonClose.js +2 -2
- package/build/cjs/components/ButtonIcon/ButtonIcon.js +9 -10
- package/build/cjs/components/ButtonPrimary/ButtonPrimary.js +2 -6
- package/build/cjs/components/ButtonRound/ButtonRound.js +2 -3
- package/build/cjs/components/ButtonSecondary/ButtonSecondary.js +2 -6
- package/build/cjs/components/Carousel/Carousel.d.ts +6 -169
- package/build/cjs/components/Carousel/Carousel.js +23 -23
- package/build/cjs/components/Checkbox/Checkbox.js +5 -5
- package/build/cjs/components/Chip/Chip.js +2 -3
- package/build/cjs/components/DateTimePicker/DateTimePicker.js +17 -6
- package/build/cjs/components/Divider/Divider.js +5 -6
- package/build/cjs/components/DnaLogo/DnaLogo.js +4 -4
- package/build/cjs/components/Drawer/Drawer.js +26 -26
- package/build/cjs/components/EmptyState/EmptyState.js +2 -2
- package/build/cjs/components/EnergyLabel/EnergyLabel.js +11 -11
- package/build/cjs/components/Expander/Expander.js +5 -5
- package/build/cjs/components/Floater/Floater.js +5 -6
- package/build/cjs/components/Footer/Components/FooterComponents.d.ts +3 -168
- package/build/cjs/components/Footer/Components/FooterComponents.js +33 -32
- package/build/cjs/components/Footer/Footer.js +5 -5
- package/build/cjs/components/Icon/Icon.js +6 -6
- package/build/cjs/components/InfoDialog/InfoDialog.js +4 -4
- package/build/cjs/components/Input/Input.js +24 -16
- package/build/cjs/components/Label/Label.js +2 -2
- package/build/cjs/components/LabelText/LabelText.js +5 -5
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +8 -8
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +11 -11
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -167
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +5 -5
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +4 -4
- package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +6 -6
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.d.ts +16 -1501
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.js +10 -10
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -4
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +11 -11
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +2 -167
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +9 -9
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +5 -5
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +5 -5
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +4 -4
- package/build/cjs/components/MainNavigation/MainNavigation.js +6 -6
- package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +8 -668
- package/build/cjs/components/MainNavigation/globalNavStyles.js +5 -5
- package/build/cjs/components/Modal/Modal.js +16 -16
- package/build/cjs/components/Notification/Notification.js +7 -8
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +7 -7
- package/build/cjs/components/Overlay/Overlay.js +2 -2
- package/build/cjs/components/Pill/Pill.js +11 -12
- package/build/cjs/components/PixelLoader/PixelLoader.js +9 -9
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +13 -13
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.js +7 -7
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +6 -6
- package/build/cjs/components/RadioButton/RadioButton.js +4 -4
- package/build/cjs/components/ReadMore/ReadMore.js +10 -10
- package/build/cjs/components/Search/Search.js +4 -4
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +9 -9
- package/build/cjs/components/Selectbox/Selectbox.js +3 -3
- package/build/cjs/components/Switch/Switch.js +19 -19
- package/build/cjs/components/Tab/Tab.js +10 -10
- package/build/cjs/components/Tabs/Tabs.js +10 -10
- package/build/cjs/components/Textarea/Textarea.d.ts +5 -1
- package/build/cjs/components/Textarea/Textarea.js +12 -9
- package/build/cjs/components/Toaster/Toaster.js +6 -7
- package/build/cjs/components/Tooltip/Tooltip.js +6 -6
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +4 -334
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +5 -4
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +5 -5
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +5 -2
- package/build/cjs/themes/globalStyles.d.ts +2 -332
- package/build/cjs/themes/globalStyles.js +3 -3
- package/build/cjs/themes/styled.d.ts +1 -1158
- package/build/cjs/utils/createStyled.d.ts +140 -7
- package/build/cjs/utils/createStyled.js +3 -3
- package/build/cjs/utils/styledUtils.js +3 -3
- package/build/es/components/Accordion/Accordion.js +2 -2
- package/build/es/components/AccordionItem/AccordionItem.js +15 -13
- package/build/es/components/AmountSelector/AmountSelector.d.ts +17 -1
- package/build/es/components/AmountSelector/AmountSelector.js +50 -7
- package/build/es/components/Box/Box.js +6 -6
- package/build/es/components/Button/Button.js +26 -22
- package/build/es/components/ButtonArrow/ButtonArrow.js +3 -3
- package/build/es/components/ButtonCard/ButtonCard.js +9 -9
- package/build/es/components/ButtonClose/ButtonClose.js +1 -1
- package/build/es/components/ButtonIcon/ButtonIcon.js +8 -8
- package/build/es/components/ButtonPrimary/ButtonPrimary.js +2 -2
- package/build/es/components/ButtonRound/ButtonRound.js +2 -2
- package/build/es/components/ButtonSecondary/ButtonSecondary.js +2 -2
- package/build/es/components/Carousel/Carousel.d.ts +6 -169
- package/build/es/components/Carousel/Carousel.js +9 -9
- package/build/es/components/Checkbox/Checkbox.js +1 -1
- package/build/es/components/Chip/Chip.js +2 -2
- package/build/es/components/DateTimePicker/DateTimePicker.js +17 -5
- package/build/es/components/Divider/Divider.js +5 -5
- package/build/es/components/DnaLogo/DnaLogo.js +3 -3
- package/build/es/components/Drawer/Drawer.js +12 -12
- package/build/es/components/EmptyState/EmptyState.js +1 -1
- package/build/es/components/EnergyLabel/EnergyLabel.js +5 -5
- package/build/es/components/Expander/Expander.js +1 -1
- package/build/es/components/Floater/Floater.js +5 -5
- package/build/es/components/Footer/Components/FooterComponents.d.ts +3 -168
- package/build/es/components/Footer/Components/FooterComponents.js +16 -15
- package/build/es/components/Footer/Footer.js +3 -3
- package/build/es/components/Icon/Icon.js +5 -5
- package/build/es/components/InfoDialog/InfoDialog.js +3 -3
- package/build/es/components/Input/Input.js +17 -9
- package/build/es/components/Label/Label.js +1 -1
- package/build/es/components/LabelText/LabelText.js +3 -3
- package/build/es/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +6 -6
- package/build/es/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -167
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +2 -2
- package/build/es/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.js +1 -1
- package/build/es/components/MainHeaderNavigation/globalNavStyles.d.ts +16 -1501
- package/build/es/components/MainHeaderNavigation/globalNavStyles.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +2 -167
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +1 -1
- package/build/es/components/MainNavigation/MainNavigation.js +1 -1
- package/build/es/components/MainNavigation/globalNavStyles.d.ts +8 -668
- package/build/es/components/MainNavigation/globalNavStyles.js +1 -1
- package/build/es/components/Modal/Modal.js +6 -6
- package/build/es/components/Notification/Notification.js +6 -6
- package/build/es/components/NotificationBadge/NotificationBadge.js +5 -5
- package/build/es/components/Overlay/Overlay.js +1 -1
- package/build/es/components/Pill/Pill.js +11 -11
- package/build/es/components/PixelLoader/PixelLoader.js +6 -6
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +4 -4
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +6 -6
- package/build/es/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/build/es/components/RadioButton/RadioButton.js +1 -1
- package/build/es/components/ReadMore/ReadMore.js +6 -6
- package/build/es/components/Search/Search.js +1 -1
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +1 -1
- package/build/es/components/Selectbox/Selectbox.js +1 -1
- package/build/es/components/Switch/Switch.js +14 -14
- package/build/es/components/Tab/Tab.js +7 -7
- package/build/es/components/Tabs/Tabs.js +8 -8
- package/build/es/components/Textarea/Textarea.d.ts +5 -1
- package/build/es/components/Textarea/Textarea.js +8 -5
- package/build/es/components/Toaster/Toaster.js +6 -6
- package/build/es/components/Tooltip/Tooltip.js +4 -4
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +4 -334
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +3 -2
- package/build/es/components/TooltipMenu/TooltipMenu.js +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/themes/globalStyles.d.ts +2 -332
- package/build/es/themes/globalStyles.js +1 -1
- package/build/es/themes/styled.d.ts +1 -1158
- package/build/es/utils/createStyled.d.ts +140 -7
- package/build/es/utils/createStyled.js +3 -3
- package/build/es/utils/styledUtils.js +1 -1
- package/package.json +4 -5
- package/build/cjs/themes/styled.js +0 -14
- package/build/es/themes/styled.js +0 -5
|
@@ -6,7 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var ReactModal = require('react-modal');
|
|
8
8
|
var icons = require('@dnanpm/icons');
|
|
9
|
-
var
|
|
9
|
+
var styledComponents = require('styled-components');
|
|
10
10
|
var theme = require('../../themes/theme.js');
|
|
11
11
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
12
12
|
var Box = require('../Box/Box.js');
|
|
@@ -24,12 +24,12 @@ const sizeMap = {
|
|
|
24
24
|
large: '960px',
|
|
25
25
|
wide: '1535px',
|
|
26
26
|
};
|
|
27
|
-
const GlobalStyle =
|
|
27
|
+
const GlobalStyle = styledComponents.createGlobalStyle `
|
|
28
28
|
body.ReactModal__Body--open {
|
|
29
29
|
overflow: hidden;
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
|
-
const StyledReactModal = styled
|
|
32
|
+
const StyledReactModal = styledComponents.styled(ReactModal__default.default) `
|
|
33
33
|
position: relative;
|
|
34
34
|
max-width: 100vw;
|
|
35
35
|
width: 100vw;
|
|
@@ -53,7 +53,7 @@ const StyledReactModal = styled.default(ReactModal__default.default) `
|
|
|
53
53
|
width: 960px;
|
|
54
54
|
}
|
|
55
55
|
`;
|
|
56
|
-
const StyledOverlay = styled.
|
|
56
|
+
const StyledOverlay = styledComponents.styled.div `
|
|
57
57
|
display: flex;
|
|
58
58
|
justify-content: center;
|
|
59
59
|
align-items: center;
|
|
@@ -76,7 +76,7 @@ const StyledOverlay = styled.default.div `
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
`;
|
|
79
|
-
const StyledBox = styled
|
|
79
|
+
const StyledBox = styledComponents.styled(Box.default) `
|
|
80
80
|
display: flex;
|
|
81
81
|
flex-direction: column;
|
|
82
82
|
height: 100%;
|
|
@@ -88,7 +88,7 @@ const StyledBox = styled.default(Box.default) `
|
|
|
88
88
|
border-radius: 0;
|
|
89
89
|
}
|
|
90
90
|
`;
|
|
91
|
-
const StyledContent = styled.
|
|
91
|
+
const StyledContent = styledComponents.styled.div `
|
|
92
92
|
&:focus {
|
|
93
93
|
outline: none;
|
|
94
94
|
}
|
|
@@ -97,15 +97,15 @@ const StyledContent = styled.default.div `
|
|
|
97
97
|
border-radius: ${theme.default.radius.default};
|
|
98
98
|
}
|
|
99
99
|
`;
|
|
100
|
-
const ContentWrapper = styled.
|
|
100
|
+
const ContentWrapper = styledComponents.styled.div `
|
|
101
101
|
padding-top: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
102
102
|
padding-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
103
103
|
padding-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
104
104
|
padding-right: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
105
105
|
`;
|
|
106
|
-
const Header = styled.
|
|
106
|
+
const Header = styledComponents.styled.div `
|
|
107
107
|
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
108
|
-
background-color: ${({ variant }) => variant === 'dark'
|
|
108
|
+
background-color: ${({ $variant }) => $variant === 'dark'
|
|
109
109
|
? theme.default.color.background.plum.E02
|
|
110
110
|
: theme.default.color.background.white.default};
|
|
111
111
|
width: 100%;
|
|
@@ -115,28 +115,28 @@ const Header = styled.default.div `
|
|
|
115
115
|
margin: 0;
|
|
116
116
|
}
|
|
117
117
|
`;
|
|
118
|
-
const Title = styled.
|
|
118
|
+
const Title = styledComponents.styled.h2 `
|
|
119
119
|
font-size: ${theme.default.fontSize.h2M};
|
|
120
120
|
line-height: ${theme.default.lineHeight.h2M};
|
|
121
|
-
color: ${({ variant }) => variant === 'light' ? theme.default.color.default.black : theme.default.color.default.white};
|
|
121
|
+
color: ${({ $variant }) => $variant === 'light' ? theme.default.color.default.black : theme.default.color.default.white};
|
|
122
122
|
|
|
123
123
|
@media (max-width: ${sizeMap.small}) {
|
|
124
124
|
font-size: ${theme.default.fontSize.h2S};
|
|
125
125
|
line-height: ${theme.default.lineHeight.h2S};
|
|
126
126
|
}
|
|
127
127
|
`;
|
|
128
|
-
const CloseButton = styled
|
|
128
|
+
const CloseButton = styledComponents.styled(ButtonClose.default) `
|
|
129
129
|
margin: 0;
|
|
130
130
|
padding: 0.5rem;
|
|
131
131
|
border-radius: 0 ${theme.default.radius.default} 0 ${theme.default.radius.default};
|
|
132
|
-
background-color: ${({ variant }) => variant === 'light'
|
|
132
|
+
background-color: ${({ $variant }) => $variant === 'light'
|
|
133
133
|
? theme.default.color.background.sand.E01
|
|
134
134
|
: theme.default.color.background.plum.default};
|
|
135
135
|
@media (max-width: ${sizeMap.mobile}) {
|
|
136
136
|
border-radius: 0 0 0 ${theme.default.radius.default};
|
|
137
137
|
}
|
|
138
138
|
`;
|
|
139
|
-
const Footer = styled.
|
|
139
|
+
const Footer = styledComponents.styled.div `
|
|
140
140
|
position: sticky;
|
|
141
141
|
bottom: 0;
|
|
142
142
|
width: 100%;
|
|
@@ -155,11 +155,11 @@ const Modal = (_a) => {
|
|
|
155
155
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
156
156
|
React__default.default.createElement(StyledReactModal, { id: props.id, size: size, isOpen: props.isOpen, overlayElement: ModalOverlay, contentElement: ModalContent, onRequestClose: props.onRequestClose, portalClassName: props.className, contentLabel: props.contentLabel, shouldCloseOnEsc: isClosable, shouldCloseOnOverlayClick: isClosable },
|
|
157
157
|
React__default.default.createElement(StyledBox, { elevation: "extraHigh", "data-testid": dataTestId },
|
|
158
|
-
closeButton && isClosable && (React__default.default.createElement(CloseButton, { onClick: props.onRequestClose, "aria-label": props.closeLabel, "data-testid": dataTestId && `${dataTestId}-close-button`, variant: variant },
|
|
158
|
+
closeButton && isClosable && (React__default.default.createElement(CloseButton, { onClick: props.onRequestClose, "aria-label": props.closeLabel, "data-testid": dataTestId && `${dataTestId}-close-button`, "$variant": variant },
|
|
159
159
|
React__default.default.createElement(icons.Close, { color: variant === 'light'
|
|
160
160
|
? theme.default.color.default.plum
|
|
161
161
|
: theme.default.color.default.white }))),
|
|
162
|
-
React__default.default.createElement(Header, { variant: variant, "data-testid": dataTestId && `${dataTestId}-header` }, props.title && (React__default.default.createElement(Title, { size: size, variant: variant }, props.title))),
|
|
162
|
+
React__default.default.createElement(Header, { "$variant": variant, "data-testid": dataTestId && `${dataTestId}-header` }, props.title && (React__default.default.createElement(Title, { "$size": size, "$variant": variant }, props.title))),
|
|
163
163
|
React__default.default.createElement(ContentWrapper, null, props.children),
|
|
164
164
|
props.footer && (React__default.default.createElement(Footer, { "data-testid": dataTestId && `${dataTestId}-footer` }, props.footer)))),
|
|
165
165
|
React__default.default.createElement(GlobalStyle, null)));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var icons = require('@dnanpm/icons');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var ButtonClose = require('../ButtonClose/ButtonClose.js');
|
|
10
10
|
var Icon = require('../Icon/Icon.js');
|
|
@@ -12,7 +12,6 @@ var Icon = require('../Icon/Icon.js');
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
13
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
16
15
|
|
|
17
16
|
const iconsMap = {
|
|
18
17
|
info: icons.Info,
|
|
@@ -20,7 +19,7 @@ const iconsMap = {
|
|
|
20
19
|
warning: icons.Warning,
|
|
21
20
|
error: icons.Error,
|
|
22
21
|
};
|
|
23
|
-
const sharedStyles =
|
|
22
|
+
const sharedStyles = styledComponents.css `
|
|
24
23
|
display: flex;
|
|
25
24
|
gap: 1rem;
|
|
26
25
|
line-height: ${theme.default.lineHeight.default};
|
|
@@ -29,26 +28,26 @@ const sharedStyles = styled.css `
|
|
|
29
28
|
border-radius: ${theme.default.radius.s};
|
|
30
29
|
border: 2px solid ${({ $type }) => theme.default.color.notification[$type]};
|
|
31
30
|
`;
|
|
32
|
-
const NotificationWrapper =
|
|
31
|
+
const NotificationWrapper = styledComponents.styled.div `
|
|
33
32
|
${sharedStyles}
|
|
34
33
|
border-color: ${({ $type }) => theme.default.color.notification[$type]};
|
|
35
34
|
`;
|
|
36
|
-
const StaticWrapper =
|
|
35
|
+
const StaticWrapper = styledComponents.styled.div `
|
|
37
36
|
${sharedStyles}
|
|
38
37
|
border-color: ${({ $type }) => theme.default.color.notification[$type]};
|
|
39
38
|
`;
|
|
40
|
-
const IconWrapper =
|
|
39
|
+
const IconWrapper = styledComponents.styled.div `
|
|
41
40
|
display: flex;
|
|
42
41
|
align-items: center;
|
|
43
42
|
padding: 0.5rem;
|
|
44
43
|
background-color: ${({ $type }) => theme.default.color.notification[$type]};
|
|
45
44
|
`;
|
|
46
|
-
const ContentWrapper =
|
|
45
|
+
const ContentWrapper = styledComponents.styled.div `
|
|
47
46
|
margin: auto 0;
|
|
48
47
|
padding: 0.5rem 0;
|
|
49
48
|
width: 100%;
|
|
50
49
|
`;
|
|
51
|
-
const ButtonCloseStyled =
|
|
50
|
+
const ButtonCloseStyled = styledComponents.styled(ButtonClose.default) `
|
|
52
51
|
position: static;
|
|
53
52
|
margin: auto 0.5rem;
|
|
54
53
|
|
|
@@ -4,29 +4,29 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
|
|
14
|
-
const NotificationBadgeElement = styled.
|
|
14
|
+
const NotificationBadgeElement = styledComponents.styled.div `
|
|
15
15
|
display: flex;
|
|
16
16
|
justify-content: center;
|
|
17
17
|
align-items: center;
|
|
18
18
|
font-size: ${theme.default.fontSize.xs};
|
|
19
19
|
font-weight: ${theme.default.fontWeight.bold};
|
|
20
|
-
position: ${({ position }) => position || 'absolute'};
|
|
21
|
-
top: ${({ top }) => top || '0'};
|
|
22
|
-
right: ${({ right }) => right || '0'};
|
|
20
|
+
position: ${({ $position }) => $position || 'absolute'};
|
|
21
|
+
top: ${({ $top }) => $top || '0'};
|
|
22
|
+
right: ${({ $right }) => $right || '0'};
|
|
23
23
|
width: 1rem;
|
|
24
24
|
height: 1rem;
|
|
25
25
|
color: ${theme.default.color.text.white};
|
|
26
26
|
background-color: ${theme.default.color.notification.error};
|
|
27
27
|
border-radius: ${theme.default.radius.circle};
|
|
28
28
|
`;
|
|
29
|
-
const VisuallyHidden = styled.
|
|
29
|
+
const VisuallyHidden = styledComponents.styled.span `
|
|
30
30
|
position: absolute;
|
|
31
31
|
width: 1px;
|
|
32
32
|
height: 1px;
|
|
@@ -43,7 +43,7 @@ const NotificationBadge = (_a) => {
|
|
|
43
43
|
var { 'data-testid': dataTestId, visuallyHiddenText } = _a, props = tslib.__rest(_a, ['data-testid', "visuallyHiddenText"]);
|
|
44
44
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
45
45
|
visuallyHiddenText && React__default.default.createElement(VisuallyHidden, null, visuallyHiddenText),
|
|
46
|
-
React__default.default.createElement(NotificationBadgeElement, { id: props.id, position: props.position, top: props.top, right: props.right, className: props.className, "data-testid": dataTestId, "aria-hidden": "true" }, props.children)));
|
|
46
|
+
React__default.default.createElement(NotificationBadgeElement, { id: props.id, "$position": props.position, "$top": props.top, "$right": props.right, className: props.className, "data-testid": dataTestId, "aria-hidden": "true" }, props.children)));
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
exports.default = NotificationBadge;
|
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
|
-
var
|
|
8
|
+
var styledComponents = require('styled-components');
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const Element = styled.
|
|
15
|
+
const Element = styledComponents.styled.div `
|
|
16
16
|
position: fixed;
|
|
17
17
|
top: 0;
|
|
18
18
|
bottom: 0;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
var Button = require('../Button/Button.js');
|
|
@@ -12,7 +12,6 @@ var Button = require('../Button/Button.js');
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
13
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
16
15
|
|
|
17
16
|
const getStandardPillStyles = ({ isChecked, isDisabled, }) => {
|
|
18
17
|
const alphaValue = isDisabled ? theme.default.color.transparency.T30 : theme.default.color.transparency.T100;
|
|
@@ -60,7 +59,7 @@ const getDefaultButtonStyles = ({ isChecked, isDisabled, }) => {
|
|
|
60
59
|
: ''}
|
|
61
60
|
`;
|
|
62
61
|
};
|
|
63
|
-
const Label =
|
|
62
|
+
const Label = styledComponents.styled.label `
|
|
64
63
|
all: unset;
|
|
65
64
|
position: relative;
|
|
66
65
|
display: inline-block;
|
|
@@ -69,11 +68,11 @@ const Label = styled__default.default.label `
|
|
|
69
68
|
text-align: center;
|
|
70
69
|
transition: all 0.2s ease-in-out;
|
|
71
70
|
|
|
72
|
-
${({ isChecked, isDisabled, isDefaultButtonStyle }) => isDefaultButtonStyle
|
|
73
|
-
? getDefaultButtonStyles({ isChecked, isDisabled })
|
|
74
|
-
: getStandardPillStyles({ isChecked, isDisabled })}
|
|
71
|
+
${({ $isChecked, $isDisabled, $isDefaultButtonStyle }) => $isDefaultButtonStyle
|
|
72
|
+
? getDefaultButtonStyles({ isChecked: $isChecked, isDisabled: $isDisabled })
|
|
73
|
+
: getStandardPillStyles({ isChecked: $isChecked, isDisabled: $isDisabled })}
|
|
75
74
|
|
|
76
|
-
${({ isDisabled }) => `cursor: ${isDisabled ? 'not-allowed' : 'pointer'};`}
|
|
75
|
+
${({ $isDisabled }) => `cursor: ${$isDisabled ? 'not-allowed' : 'pointer'};`}
|
|
77
76
|
|
|
78
77
|
&:focus-within, *:focus > & {
|
|
79
78
|
outline: none;
|
|
@@ -81,17 +80,17 @@ const Label = styled__default.default.label `
|
|
|
81
80
|
0px 0px 0px 4px ${theme.default.color.focus.dark};
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
${({ position }) => (position === 'right' || position === 'middle') &&
|
|
83
|
+
${({ $position }) => ($position === 'right' || $position === 'middle') &&
|
|
85
84
|
`
|
|
86
85
|
margin-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
87
86
|
`}
|
|
88
87
|
|
|
89
|
-
${({ position }) => (position === 'left' || position === 'middle') &&
|
|
88
|
+
${({ $position }) => ($position === 'left' || $position === 'middle') &&
|
|
90
89
|
`
|
|
91
90
|
margin-right: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
92
91
|
`}
|
|
93
92
|
|
|
94
|
-
${({ position }) => position === 'auto' &&
|
|
93
|
+
${({ $position }) => $position === 'auto' &&
|
|
95
94
|
`
|
|
96
95
|
margin: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 0.5)};
|
|
97
96
|
|
|
@@ -104,7 +103,7 @@ const Label = styled__default.default.label `
|
|
|
104
103
|
}
|
|
105
104
|
`}
|
|
106
105
|
`;
|
|
107
|
-
const Input =
|
|
106
|
+
const Input = styledComponents.styled.input `
|
|
108
107
|
appearance: none;
|
|
109
108
|
display: block;
|
|
110
109
|
border: 0 none;
|
|
@@ -122,7 +121,7 @@ const Input = styled__default.default.input `
|
|
|
122
121
|
const Pill = (_a) => {
|
|
123
122
|
var { type = 'none', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["type", 'data-testid']);
|
|
124
123
|
const isDefaultType = type === 'none';
|
|
125
|
-
return (React__default.default.createElement(Label, { as: isDefaultType ? 'button' : 'label', id: isDefaultType ? props.id : undefined, htmlFor: !isDefaultType ? props.id : undefined, type: isDefaultType ? 'button' : undefined, position: props.position, isChecked: props.isChecked || props.isDefaultChecked, isDisabled: props.isDisabled, className: props.className, "data-testid": dataTestId, isDefaultButtonStyle: props.isDefaultButtonStyle, "aria-label": props.ariaLabel, disabled: isDefaultType ? props.isDisabled : undefined, onClick: isDefaultType && !props.isDisabled ? props.onClick : undefined },
|
|
124
|
+
return (React__default.default.createElement(Label, { as: isDefaultType ? 'button' : 'label', id: isDefaultType ? props.id : undefined, htmlFor: !isDefaultType ? props.id : undefined, type: isDefaultType ? 'button' : undefined, "$position": props.position, "$isChecked": props.isChecked || props.isDefaultChecked, "$isDisabled": props.isDisabled, className: props.className, "data-testid": dataTestId, "$isDefaultButtonStyle": props.isDefaultButtonStyle, "aria-label": props.ariaLabel, disabled: isDefaultType ? props.isDisabled : undefined, onClick: isDefaultType && !props.isDisabled ? props.onClick : undefined },
|
|
126
125
|
props.children,
|
|
127
126
|
!isDefaultType && (React__default.default.createElement(Input, { id: props.id, name: props.name, type: type, defaultChecked: props.isDefaultChecked, checked: props.isChecked, value: props.value, onChange: props.onChange, disabled: props.isDisabled, readOnly: !props.onChange, "data-testid": dataTestId && `${dataTestId}-input`, "data-checked": props.isChecked }))));
|
|
128
127
|
};
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
|
|
14
|
-
const loading =
|
|
14
|
+
const loading = styledComponents.keyframes `
|
|
15
15
|
0% {
|
|
16
16
|
transform: scale(1);
|
|
17
17
|
}
|
|
@@ -22,30 +22,30 @@ const loading = styled.keyframes `
|
|
|
22
22
|
transform: scale(1);
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
-
const PixelLoaderWrapper = styled.
|
|
25
|
+
const PixelLoaderWrapper = styledComponents.styled.div `
|
|
26
26
|
display: flex;
|
|
27
27
|
justify-content: center;
|
|
28
28
|
align-items: center;
|
|
29
29
|
padding: 0.125rem;
|
|
30
30
|
`;
|
|
31
|
-
const Pixel = styled.
|
|
31
|
+
const Pixel = styledComponents.styled.div `
|
|
32
32
|
background-color: ${({ color }) => color || theme.default.color.default.pink};
|
|
33
33
|
display: inline-block;
|
|
34
34
|
width: 0.625rem;
|
|
35
35
|
height: 0.625rem;
|
|
36
36
|
margin: 0.125rem;
|
|
37
37
|
animation: ${loading} 1s ease-in-out infinite;
|
|
38
|
-
animation-delay: ${({ delay }) => delay}s;
|
|
38
|
+
animation-delay: ${({ $delay }) => $delay}s;
|
|
39
39
|
`;
|
|
40
40
|
/** @visibleName Pixel Loader */
|
|
41
41
|
const PixelLoader = (_a) => {
|
|
42
42
|
var { className, 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["className", 'data-testid']);
|
|
43
43
|
return (React__default.default.createElement(PixelLoaderWrapper, { className: className, "data-testid": dataTestId },
|
|
44
44
|
props.label && React__default.default.createElement("span", { className: "visually-hidden" }, props.label),
|
|
45
|
-
React__default.default.createElement(Pixel, { color: props.color, delay: "-0.27" }),
|
|
46
|
-
React__default.default.createElement(Pixel, { color: props.color, delay: "-0.18" }),
|
|
47
|
-
React__default.default.createElement(Pixel, { color: props.color, delay: "-0.09" }),
|
|
48
|
-
React__default.default.createElement(Pixel, { color: props.color, delay: "0" })));
|
|
45
|
+
React__default.default.createElement(Pixel, { color: props.color, "$delay": "-0.27" }),
|
|
46
|
+
React__default.default.createElement(Pixel, { color: props.color, "$delay": "-0.18" }),
|
|
47
|
+
React__default.default.createElement(Pixel, { color: props.color, "$delay": "-0.09" }),
|
|
48
|
+
React__default.default.createElement(Pixel, { color: props.color, "$delay": "0" })));
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.default = PixelLoader;
|
|
@@ -9,7 +9,7 @@ var useDebounce = require('../../hooks/useDebounce.js');
|
|
|
9
9
|
var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
|
10
10
|
var useResizeObserver = require('../../hooks/useResizeObserver.js');
|
|
11
11
|
var useWindowSize = require('../../hooks/useWindowSize.js');
|
|
12
|
-
var
|
|
12
|
+
var styledComponents = require('styled-components');
|
|
13
13
|
var theme = require('../../themes/theme.js');
|
|
14
14
|
var common = require('../../utils/common.js');
|
|
15
15
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
@@ -21,12 +21,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
23
23
|
|
|
24
|
-
const Container = styled.
|
|
24
|
+
const Container = styledComponents.styled.div `
|
|
25
25
|
width: 100%;
|
|
26
26
|
|
|
27
27
|
${styledUtils.media.md ` border-bottom: 1px solid ${theme.default.color.line.L03}; `}
|
|
28
28
|
`;
|
|
29
|
-
const Category = styled.
|
|
29
|
+
const Category = styledComponents.styled.span `
|
|
30
30
|
margin: 0;
|
|
31
31
|
color: ${theme.default.color.text.black};
|
|
32
32
|
font-size: ${theme.default.fontSize.h4};
|
|
@@ -43,7 +43,7 @@ const Category = styled.default.span `
|
|
|
43
43
|
${theme.default.color.background.white.default};
|
|
44
44
|
`}
|
|
45
45
|
`;
|
|
46
|
-
const ListsContainer = styled.
|
|
46
|
+
const ListsContainer = styledComponents.styled.div `
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
position: relative;
|
|
@@ -57,7 +57,7 @@ const ListsContainer = styled.default.div `
|
|
|
57
57
|
margin: 0 auto;
|
|
58
58
|
`}
|
|
59
59
|
`;
|
|
60
|
-
const MobileDropdown = styled.
|
|
60
|
+
const MobileDropdown = styledComponents.styled.button `
|
|
61
61
|
display: flex;
|
|
62
62
|
align-items: center;
|
|
63
63
|
justify-content: space-between;
|
|
@@ -75,19 +75,19 @@ const MobileDropdown = styled.default.button `
|
|
|
75
75
|
pointer-events: none;
|
|
76
76
|
}
|
|
77
77
|
`;
|
|
78
|
-
const MobileDropdownContent = styled.
|
|
78
|
+
const MobileDropdownContent = styledComponents.styled.div `
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: column;
|
|
81
81
|
align-items: baseline;
|
|
82
82
|
text-align: left;
|
|
83
83
|
`;
|
|
84
|
-
const CoreULStyles = styled.
|
|
84
|
+
const CoreULStyles = styledComponents.styled.ul `
|
|
85
85
|
list-style: none;
|
|
86
86
|
margin: 0;
|
|
87
87
|
padding: 0;
|
|
88
88
|
overflow: hidden;
|
|
89
89
|
`;
|
|
90
|
-
const NavigationList = styled
|
|
90
|
+
const NavigationList = styledComponents.styled(CoreULStyles) `
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
93
|
justify-content: flex-start;
|
|
@@ -96,9 +96,9 @@ const NavigationList = styled.default(CoreULStyles) `
|
|
|
96
96
|
background-color: ${theme.default.color.background.white.default};
|
|
97
97
|
position: absolute;
|
|
98
98
|
top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 5.6)};
|
|
99
|
-
visibility: ${({ isMobileNavigationOpen }) =>
|
|
99
|
+
visibility: ${({ $isMobileNavigationOpen }) => $isMobileNavigationOpen ? 'visible' : 'hidden'};
|
|
100
100
|
clip-path: inset(
|
|
101
|
-
0% 0% ${({ isMobileNavigationOpen }) => (isMobileNavigationOpen ? '0%' : '100%')} 0%
|
|
101
|
+
0% 0% ${({ $isMobileNavigationOpen }) => ($isMobileNavigationOpen ? '0%' : '100%')} 0%
|
|
102
102
|
);
|
|
103
103
|
transition: all 0.2s ease-in-out;
|
|
104
104
|
|
|
@@ -116,7 +116,7 @@ const NavigationList = styled.default(CoreULStyles) `
|
|
|
116
116
|
}
|
|
117
117
|
`}
|
|
118
118
|
`;
|
|
119
|
-
const DropdownList = styled
|
|
119
|
+
const DropdownList = styledComponents.styled(CoreULStyles) `
|
|
120
120
|
position: absolute;
|
|
121
121
|
top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 6)};
|
|
122
122
|
right: 0;
|
|
@@ -137,7 +137,7 @@ const DropdownList = styled.default(CoreULStyles) `
|
|
|
137
137
|
|
|
138
138
|
${common.default({ elevation: 'low' })}
|
|
139
139
|
`;
|
|
140
|
-
const VisuallyHidden = styled.
|
|
140
|
+
const VisuallyHidden = styledComponents.styled.span `
|
|
141
141
|
position: absolute;
|
|
142
142
|
width: 1px;
|
|
143
143
|
height: 1px;
|
|
@@ -332,7 +332,7 @@ const PriorityNavigation = (_a) => {
|
|
|
332
332
|
props.categoryLabel && React__default.default.createElement(Category, null, props.categoryLabel),
|
|
333
333
|
selectedItem),
|
|
334
334
|
React__default.default.createElement(Icon.default, { icon: isMobileNavigationOpen ? icons.OvalChevronUp : icons.OvalChevronDown, size: "2.5rem" }))),
|
|
335
|
-
React__default.default.createElement(NavigationList, { ref: navigationListRef, isMobileNavigationOpen: isMobileNavigationOpen, onKeyDown: handleNavigationListKeyDown }, React.Children.map([...state.navigationItems, ...(isMobile ? state.dropdownItems : [])], (navigationItem, index) => {
|
|
335
|
+
React__default.default.createElement(NavigationList, { ref: navigationListRef, "$isMobileNavigationOpen": isMobileNavigationOpen, onKeyDown: handleNavigationListKeyDown }, React.Children.map([...state.navigationItems, ...(isMobile ? state.dropdownItems : [])], (navigationItem, index) => {
|
|
336
336
|
if (React.isValidElement(navigationItem) &&
|
|
337
337
|
navigationItem.type === PriorityNavigationItem.default) {
|
|
338
338
|
return (React__default.default.createElement(PriorityNavigationItem.default, { id: navigationItem.props.id, key: navigationItem.key, onClick: handleItemClick, onKeyDown: navigationItem.props.onKeyDown || props.onKeyDown, isActive: navigationItem.props.isActive, className: navigationItem.props.className, "data-testid": navigationItem.props['data-testid'], ref: instance => {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const Element = styled.
|
|
15
|
+
const Element = styledComponents.styled.li `
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
justify-content: space-between;
|
|
@@ -32,12 +32,12 @@ const Element = styled.default.li `
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
${({ isActive }) => styledUtils.media.md `
|
|
35
|
+
${({ $isActive }) => styledUtils.media.md `
|
|
36
36
|
justify-content: left;
|
|
37
37
|
padding: 1rem 0;
|
|
38
38
|
margin: auto 1rem;
|
|
39
39
|
border-top: 3px solid transparent;
|
|
40
|
-
border-bottom: 3px solid ${isActive ? theme.default.color.text.pink : 'transparent'};
|
|
40
|
+
border-bottom: 3px solid ${$isActive ? theme.default.color.text.pink : 'transparent'};
|
|
41
41
|
`}
|
|
42
42
|
|
|
43
43
|
& > a {
|
|
@@ -53,8 +53,8 @@ const Element = styled.default.li `
|
|
|
53
53
|
|
|
54
54
|
& > * {
|
|
55
55
|
display: block;
|
|
56
|
-
color: ${({ isActive }) => (isActive ? theme.default.color.text.pink : theme.default.color.text.black)};
|
|
57
|
-
${({ isActive }) => isActive && `font-weight: ${theme.default.fontWeight.bold};`}
|
|
56
|
+
color: ${({ $isActive }) => ($isActive ? theme.default.color.text.pink : theme.default.color.text.black)};
|
|
57
|
+
${({ $isActive }) => $isActive && `font-weight: ${theme.default.fontWeight.bold};`}
|
|
58
58
|
border: 2px solid transparent;
|
|
59
59
|
|
|
60
60
|
&:hover {
|
|
@@ -68,7 +68,7 @@ const Element = styled.default.li `
|
|
|
68
68
|
*/
|
|
69
69
|
const PriorityNavigationItem = React__default.default.forwardRef((_a, ref) => {
|
|
70
70
|
var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
|
|
71
|
-
return (React__default.default.createElement(Element, { id: props.id, ref: ref, onClick: props.onClick, onKeyDown: props.onKeyDown, isActive: props.isActive, className: props.className, "data-testid": dataTestId }, props.children));
|
|
71
|
+
return (React__default.default.createElement(Element, { id: props.id, ref: ref, onClick: props.onClick, onKeyDown: props.onKeyDown, "$isActive": props.isActive, className: props.className, "data-testid": dataTestId }, props.children));
|
|
72
72
|
});
|
|
73
73
|
PriorityNavigationItem.displayName = 'PriorityNavigationItem';
|
|
74
74
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var icons = require('@dnanpm/icons');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var
|
|
8
|
+
var styledComponents = require('styled-components');
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
10
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
11
11
|
var Icon = require('../Icon/Icon.js');
|
|
@@ -28,13 +28,13 @@ const getBorderColor = ({ isActive, isCompleted, isError }) => {
|
|
|
28
28
|
: theme.default.color.background.pink.default;
|
|
29
29
|
return isActive || isCompleted ? currentColor : defaultColor;
|
|
30
30
|
};
|
|
31
|
-
const ProgressIndicatorWrapper = styled.
|
|
31
|
+
const ProgressIndicatorWrapper = styledComponents.styled.ul `
|
|
32
32
|
display: flex;
|
|
33
33
|
justify-content: space-between;
|
|
34
34
|
margin: 0;
|
|
35
35
|
padding: 0;
|
|
36
36
|
`;
|
|
37
|
-
const ProgressIndicatorItem = styled.
|
|
37
|
+
const ProgressIndicatorItem = styledComponents.styled.li `
|
|
38
38
|
position: relative;
|
|
39
39
|
display: inline-flex;
|
|
40
40
|
flex-direction: column;
|
|
@@ -68,7 +68,7 @@ const ProgressIndicatorItem = styled.default.li `
|
|
|
68
68
|
}
|
|
69
69
|
`}
|
|
70
70
|
`;
|
|
71
|
-
const ProgressIndicatorItemConnector = styled.
|
|
71
|
+
const ProgressIndicatorItemConnector = styledComponents.styled.div `
|
|
72
72
|
position: absolute;
|
|
73
73
|
top: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseHeight, small ? 1.5 : 2)};
|
|
74
74
|
left: -50%;
|
|
@@ -77,7 +77,7 @@ const ProgressIndicatorItemConnector = styled.default.div `
|
|
|
77
77
|
height: ${({ small }) => (small ? '2px' : '4px')};
|
|
78
78
|
background-color: ${({ isActive, isCompleted }) => isActive || isCompleted ? theme.default.color.default.pink : theme.default.color.line.L02};
|
|
79
79
|
`;
|
|
80
|
-
const ProgressIndicatorItemNumber = styled.
|
|
80
|
+
const ProgressIndicatorItemNumber = styledComponents.styled.div `
|
|
81
81
|
display: flex;
|
|
82
82
|
justify-content: center;
|
|
83
83
|
align-items: center;
|
|
@@ -93,7 +93,7 @@ const ProgressIndicatorItemNumber = styled.default.div `
|
|
|
93
93
|
|
|
94
94
|
${({ isActive, isError }) => getBackgroundColor({ isActive, isError })}
|
|
95
95
|
`;
|
|
96
|
-
const ProgressIndicatorItemLabel = styled.
|
|
96
|
+
const ProgressIndicatorItemLabel = styledComponents.styled.div `
|
|
97
97
|
font-size: ${({ small }) => (small ? theme.default.fontSize.xs : theme.default.fontSize.s)};
|
|
98
98
|
line-height: ${({ small }) => (small ? theme.default.lineHeight.xs : theme.default.lineHeight.s)};
|
|
99
99
|
font-weight: ${theme.default.fontWeight.bold};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
@@ -12,11 +12,11 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const Container = styled.
|
|
15
|
+
const Container = styledComponents.styled.div `
|
|
16
16
|
display: flex;
|
|
17
17
|
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
|
|
18
18
|
`;
|
|
19
|
-
const Input = styled.
|
|
19
|
+
const Input = styledComponents.styled.input `
|
|
20
20
|
display: inline-grid;
|
|
21
21
|
appearance: none;
|
|
22
22
|
place-content: center;
|
|
@@ -90,7 +90,7 @@ const RadioButtonComponent = (_a) => {
|
|
|
90
90
|
React__default.default.createElement(Input, { id: props.id, name: props.name, type: "radio", checked: props.checked, value: props.value, disabled: props.disabled, onChange: props.onChange, "data-testid": dataTestId && `${dataTestId}-input` }),
|
|
91
91
|
props.label && (React__default.default.createElement("label", { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` }, props.label))));
|
|
92
92
|
};
|
|
93
|
-
const StyledFieldset = styled.
|
|
93
|
+
const StyledFieldset = styledComponents.styled.fieldset `
|
|
94
94
|
border: 0;
|
|
95
95
|
margin: 0;
|
|
96
96
|
padding: 0;
|