@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { Open, ChevronRight } from '@dnanpm/icons';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
5
|
import theme from '../../themes/theme.js';
|
|
6
6
|
import Box from '../Box/Box.js';
|
|
7
7
|
import Icon from '../Icon/Icon.js';
|
|
8
8
|
|
|
9
|
-
const ButtonCardWrapper =
|
|
9
|
+
const ButtonCardWrapper = styled.button `
|
|
10
10
|
display: block;
|
|
11
11
|
padding: 0;
|
|
12
12
|
border: 0 none;
|
|
@@ -34,7 +34,7 @@ const ButtonCardWrapper = styled__default.button `
|
|
|
34
34
|
text-decoration: none;
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
const StyledBox =
|
|
37
|
+
const StyledBox = styled(Box) `
|
|
38
38
|
display: flex;
|
|
39
39
|
gap: ${({ size }) => (size === 'small' ? '0.313rem' : '1rem')};
|
|
40
40
|
border: 1px solid ${theme.color.line.L03};
|
|
@@ -42,13 +42,13 @@ const StyledBox = styled__default(Box) `
|
|
|
42
42
|
${({ size }) => size === 'small' && 'flex-direction: column'};
|
|
43
43
|
${({ size }) => size !== 'small' && 'align-items: center'};
|
|
44
44
|
`;
|
|
45
|
-
const VisualContent =
|
|
45
|
+
const VisualContent = styled.div `
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
48
|
width: ${({ size }) => (size === 'small' ? '2.5rem' : '3.75rem')};
|
|
49
49
|
height: ${({ size }) => (size === 'small' ? '2.5rem' : '3.75rem')};
|
|
50
50
|
`;
|
|
51
|
-
const TextContentWrapper =
|
|
51
|
+
const TextContentWrapper = styled.div `
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-grow: 1;
|
|
54
54
|
align-items: center;
|
|
@@ -56,13 +56,13 @@ const TextContentWrapper = styled__default.div `
|
|
|
56
56
|
gap: ${({ size }) => (size === 'small' ? '0.625rem' : '1rem')};
|
|
57
57
|
min-width: 0;
|
|
58
58
|
`;
|
|
59
|
-
const TextContent =
|
|
59
|
+
const TextContent = styled.div `
|
|
60
60
|
display: flex;
|
|
61
61
|
align-items: flex-start;
|
|
62
62
|
flex-direction: column;
|
|
63
63
|
min-width: 0;
|
|
64
64
|
`;
|
|
65
|
-
const Title =
|
|
65
|
+
const Title = styled.div `
|
|
66
66
|
font-size: ${theme.fontSize.default};
|
|
67
67
|
line-height: ${theme.lineHeight.default};
|
|
68
68
|
font-weight: ${theme.fontWeight.bold};
|
|
@@ -84,7 +84,7 @@ const Title = styled__default.div `
|
|
|
84
84
|
font-size: ${theme.fontSize.xl};
|
|
85
85
|
`};
|
|
86
86
|
`;
|
|
87
|
-
const Subtitle =
|
|
87
|
+
const Subtitle = styled.div `
|
|
88
88
|
color: ${theme.color.text.gray};
|
|
89
89
|
font-size: ${theme.fontSize.s};
|
|
90
90
|
line-height: ${theme.lineHeight.s};
|
|
@@ -106,7 +106,7 @@ const Subtitle = styled__default.div `
|
|
|
106
106
|
font-size: ${theme.fontSize.default};
|
|
107
107
|
`};
|
|
108
108
|
`;
|
|
109
|
-
const CtaIcon =
|
|
109
|
+
const CtaIcon = styled(Icon) `
|
|
110
110
|
color: ${theme.color.text.pink};
|
|
111
111
|
|
|
112
112
|
${ButtonCardWrapper}:hover & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { EditUnderline } from '@dnanpm/icons';
|
|
3
3
|
import React__default, { forwardRef } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import { styled, css } from 'styled-components';
|
|
5
5
|
import theme from '../../themes/theme.js';
|
|
6
6
|
import { getDividedSize, media } from '../../utils/styledUtils.js';
|
|
7
7
|
import Icon from '../Icon/Icon.js';
|
|
@@ -48,13 +48,13 @@ const getDarkBgStyle = () => {
|
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
50
|
};
|
|
51
|
-
const ButtonElement =
|
|
51
|
+
const ButtonElement = styled.button `
|
|
52
52
|
display: inline-flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
font-family: ${theme.fontFamily.default};
|
|
55
55
|
font-weight: ${theme.fontWeight.bold};
|
|
56
|
-
font-size: ${({ small }) => (small ? theme.fontSize.s : theme.fontSize.default)};
|
|
57
|
-
line-height: ${({ small }) => (small ? theme.lineHeight.xs : theme.lineHeight.default)};
|
|
56
|
+
font-size: ${({ $small }) => ($small ? theme.fontSize.s : theme.fontSize.default)};
|
|
57
|
+
line-height: ${({ $small }) => ($small ? theme.lineHeight.xs : theme.lineHeight.default)};
|
|
58
58
|
cursor: pointer;
|
|
59
59
|
background-color: transparent;
|
|
60
60
|
border: 2px solid transparent;
|
|
@@ -66,9 +66,9 @@ const ButtonElement = styled__default.button `
|
|
|
66
66
|
pointer-events: none;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
${({ isReversed }) => isReversed && `flex-direction: row-reverse;`}
|
|
69
|
+
${({ $isReversed }) => $isReversed && `flex-direction: row-reverse;`}
|
|
70
70
|
|
|
71
|
-
${({ darkBg, isLinkStyle }) =>
|
|
71
|
+
${({ $darkBg, $isLinkStyle }) => $darkBg ? getDarkBgStyle() : getStandardStyle({ isLinkStyle: $isLinkStyle })}
|
|
72
72
|
|
|
73
73
|
&:focus-visible {
|
|
74
74
|
border-radius: ${theme.radius.s};
|
|
@@ -102,7 +102,7 @@ const ButtonElement = styled__default.button `
|
|
|
102
102
|
}
|
|
103
103
|
`}
|
|
104
104
|
|
|
105
|
-
${({ hideChildrenMobile }) => hideChildrenMobile &&
|
|
105
|
+
${({ $hideChildrenMobile }) => $hideChildrenMobile &&
|
|
106
106
|
css `
|
|
107
107
|
span.dnasg-icon + span {
|
|
108
108
|
display: none;
|
|
@@ -119,7 +119,7 @@ const ButtonElement = styled__default.button `
|
|
|
119
119
|
const ButtonIcon = forwardRef((_a, ref) => {
|
|
120
120
|
var { icon = EditUnderline, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue } = _a, props = __rest(_a, ["icon", 'data-testid', 'data-no-close', 'data-track-value']);
|
|
121
121
|
const position = props.isReversed ? 'right' : 'left';
|
|
122
|
-
return (React__default.createElement(ButtonElement, Object.assign({ ref: ref, id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, small: props.small, darkBg: props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, hideChildrenMobile: props.hideChildrenMobile, isReversed: props.isReversed, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, "aria-expanded": props.ariaExpanded, "aria-label": props.ariaLabel, isLinkStyle: props.isLinkStyle }, props.dataAttributes), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.black, label: props.loadingLabel })) : (React__default.createElement(React__default.Fragment, null,
|
|
122
|
+
return (React__default.createElement(ButtonElement, Object.assign({ ref: ref, id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, "$small": props.small, "$darkBg": props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, "$hideChildrenMobile": props.hideChildrenMobile, "$isReversed": props.isReversed, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, "aria-expanded": props.ariaExpanded, "aria-label": props.ariaLabel, "$isLinkStyle": props.isLinkStyle }, props.dataAttributes), props.loading ? (React__default.createElement(PixelLoader, { color: props.darkBg ? theme.color.default.white : theme.color.default.black, label: props.loadingLabel })) : (React__default.createElement(React__default.Fragment, null,
|
|
123
123
|
React__default.createElement(Icon, { icon: icon, color: props.darkBg ? theme.color.default.white : theme.color.default.pink, size: props.small ? '1.25rem' : '1.5rem', position: props.children ? position : undefined, "aria-hidden": true }),
|
|
124
124
|
props.children && (React__default.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))))));
|
|
125
125
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { styled } from 'styled-components';
|
|
2
2
|
import theme from '../../themes/theme.js';
|
|
3
3
|
import Button, { shade } from '../Button/Button.js';
|
|
4
4
|
|
|
5
5
|
/** @visibleName Button Primary */
|
|
6
|
-
const ButtonPrimary =
|
|
6
|
+
const ButtonPrimary = styled(Button) `
|
|
7
7
|
color: ${theme.color.text.white};
|
|
8
8
|
background-color: ${theme.color.default.pink};
|
|
9
9
|
border: 2px solid ${theme.color.default.pink};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
import ButtonPrimary from '../ButtonPrimary/ButtonPrimary.js';
|
|
7
7
|
|
|
8
|
-
const ButtonElement =
|
|
8
|
+
const ButtonElement = styled(ButtonPrimary) `
|
|
9
9
|
display: flex;
|
|
10
10
|
min-width: initial;
|
|
11
11
|
width: ${getMultipliedSize(theme.base.baseWidth, 3.2)};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { styled } from 'styled-components';
|
|
2
2
|
import theme from '../../themes/theme.js';
|
|
3
3
|
import Button, { shade } from '../Button/Button.js';
|
|
4
4
|
|
|
5
5
|
/** @visibleName Button Secondary */
|
|
6
|
-
const ButtonSecondary =
|
|
6
|
+
const ButtonSecondary = styled(Button) `
|
|
7
7
|
color: ${theme.color.text.plum};
|
|
8
8
|
background-color: ${theme.color.background.sand.E02};
|
|
9
9
|
border: 2px solid ${theme.color.line.L02};
|
|
@@ -73,175 +73,12 @@ interface Props {
|
|
|
73
73
|
*/
|
|
74
74
|
swipeStep?: number;
|
|
75
75
|
}
|
|
76
|
-
declare const SlideItem: import("styled-components").
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
baseWidth: {
|
|
83
|
-
value: number;
|
|
84
|
-
unit: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
88
|
-
color: {
|
|
89
|
-
default: {
|
|
90
|
-
pink: string;
|
|
91
|
-
plum: string;
|
|
92
|
-
white: string;
|
|
93
|
-
black: string;
|
|
94
|
-
};
|
|
95
|
-
accent: {
|
|
96
|
-
lemon: string;
|
|
97
|
-
sky: string;
|
|
98
|
-
orange: string;
|
|
99
|
-
};
|
|
100
|
-
active: {
|
|
101
|
-
pink: string;
|
|
102
|
-
};
|
|
103
|
-
hover: {
|
|
104
|
-
pink: string;
|
|
105
|
-
};
|
|
106
|
-
text: {
|
|
107
|
-
gray: string;
|
|
108
|
-
pink: string;
|
|
109
|
-
plum: string;
|
|
110
|
-
white: string;
|
|
111
|
-
black: string;
|
|
112
|
-
};
|
|
113
|
-
line: {
|
|
114
|
-
L01: string;
|
|
115
|
-
L02: string;
|
|
116
|
-
L03: string;
|
|
117
|
-
L04: string;
|
|
118
|
-
};
|
|
119
|
-
notification: {
|
|
120
|
-
info: string;
|
|
121
|
-
success: string;
|
|
122
|
-
warning: string;
|
|
123
|
-
error: string;
|
|
124
|
-
};
|
|
125
|
-
background: {
|
|
126
|
-
sand: {
|
|
127
|
-
default: string;
|
|
128
|
-
E01: string;
|
|
129
|
-
E02: string;
|
|
130
|
-
};
|
|
131
|
-
pink: {
|
|
132
|
-
default: string;
|
|
133
|
-
E01: string;
|
|
134
|
-
E02: string;
|
|
135
|
-
};
|
|
136
|
-
plum: {
|
|
137
|
-
default: string;
|
|
138
|
-
E01: string;
|
|
139
|
-
E02: string;
|
|
140
|
-
};
|
|
141
|
-
lemon: {
|
|
142
|
-
default: string;
|
|
143
|
-
E01: string;
|
|
144
|
-
E02: string;
|
|
145
|
-
};
|
|
146
|
-
sky: {
|
|
147
|
-
default: string;
|
|
148
|
-
E01: string;
|
|
149
|
-
E02: string;
|
|
150
|
-
};
|
|
151
|
-
orange: {
|
|
152
|
-
default: string;
|
|
153
|
-
E01: string;
|
|
154
|
-
E02: string;
|
|
155
|
-
};
|
|
156
|
-
white: {
|
|
157
|
-
default: string;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
focus: {
|
|
161
|
-
dark: string;
|
|
162
|
-
light: string;
|
|
163
|
-
};
|
|
164
|
-
transparency: {
|
|
165
|
-
T0: string;
|
|
166
|
-
T10: string;
|
|
167
|
-
T20: string;
|
|
168
|
-
T30: string;
|
|
169
|
-
T40: string;
|
|
170
|
-
T50: string;
|
|
171
|
-
T60: string;
|
|
172
|
-
T70: string;
|
|
173
|
-
T80: string;
|
|
174
|
-
T90: string;
|
|
175
|
-
T100: string;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
fontFamily: {
|
|
179
|
-
default: string;
|
|
180
|
-
heading: string;
|
|
181
|
-
numerals: string;
|
|
182
|
-
};
|
|
183
|
-
fontSize: {
|
|
184
|
-
default: string;
|
|
185
|
-
xl: string;
|
|
186
|
-
l: string;
|
|
187
|
-
s: string;
|
|
188
|
-
xs: string;
|
|
189
|
-
h1XL: string;
|
|
190
|
-
h1L: string;
|
|
191
|
-
h1M: string;
|
|
192
|
-
h1S: string;
|
|
193
|
-
h2M: string;
|
|
194
|
-
h2S: string;
|
|
195
|
-
h3: string;
|
|
196
|
-
h4: string;
|
|
197
|
-
h5: string;
|
|
198
|
-
h1: string;
|
|
199
|
-
h2: string;
|
|
200
|
-
};
|
|
201
|
-
fontWeight: {
|
|
202
|
-
book: number;
|
|
203
|
-
medium: number;
|
|
204
|
-
bold: number;
|
|
205
|
-
black: number;
|
|
206
|
-
};
|
|
207
|
-
form: {
|
|
208
|
-
smallSelectWidth: string;
|
|
209
|
-
smallSelectHeight: string;
|
|
210
|
-
};
|
|
211
|
-
grid: {
|
|
212
|
-
gutter: string;
|
|
213
|
-
};
|
|
214
|
-
lineHeight: {
|
|
215
|
-
default: string;
|
|
216
|
-
xl: string;
|
|
217
|
-
s: string;
|
|
218
|
-
xs: string;
|
|
219
|
-
xxs: string;
|
|
220
|
-
auto: string;
|
|
221
|
-
h1XL: string;
|
|
222
|
-
h1L: string;
|
|
223
|
-
h1M: string;
|
|
224
|
-
h1S: string;
|
|
225
|
-
h2M: string;
|
|
226
|
-
h2S: string;
|
|
227
|
-
h3: string;
|
|
228
|
-
h4: string;
|
|
229
|
-
h5: string;
|
|
230
|
-
h1: string;
|
|
231
|
-
h2: string;
|
|
232
|
-
};
|
|
233
|
-
media: Record<string | number, (l: TemplateStringsArray, ...p: (string | number)[]) => string>;
|
|
234
|
-
radius: {
|
|
235
|
-
default: string;
|
|
236
|
-
s: string;
|
|
237
|
-
xs: string;
|
|
238
|
-
circle: string;
|
|
239
|
-
pill: string;
|
|
240
|
-
};
|
|
241
|
-
}, Required<Pick<Props, "visibleItems">> & {
|
|
242
|
-
itemWidthCorrection: number;
|
|
243
|
-
isSwiping: boolean;
|
|
244
|
-
}, never>;
|
|
76
|
+
declare const SlideItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Required<{
|
|
77
|
+
$visibleItems?: Props["visibleItems"];
|
|
78
|
+
}> & {
|
|
79
|
+
$itemWidthCorrection: number;
|
|
80
|
+
$isSwiping: boolean;
|
|
81
|
+
}>> & string;
|
|
245
82
|
/** @visibleName Carousel */
|
|
246
83
|
declare const Carousel: ({ "data-testid": dataTestId, ...props }: Props) => React.JSX.Element;
|
|
247
84
|
/** @component */
|
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { ArrowRight } from '@dnanpm/icons';
|
|
3
3
|
import React__default, { useRef, useState, useEffect, Children, useMemo } from 'react';
|
|
4
4
|
import useWindowSize from '../../hooks/useWindowSize.js';
|
|
5
|
-
import styled from '
|
|
5
|
+
import { styled } from 'styled-components';
|
|
6
6
|
import theme from '../../themes/theme.js';
|
|
7
7
|
import { media, getMultipliedSize } from '../../utils/styledUtils.js';
|
|
8
8
|
import ButtonArrow from '../ButtonArrow/ButtonArrow.js';
|
|
@@ -33,7 +33,7 @@ const SlidesWrapper = styled.div `
|
|
|
33
33
|
display: flex;
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 100%;
|
|
36
|
-
gap: ${({ gap }) => gap}rem;
|
|
36
|
+
gap: ${({ $gap }) => $gap}rem;
|
|
37
37
|
transition-property: transform;
|
|
38
38
|
transform: translate3d(0px, 0, 0);
|
|
39
39
|
transition-duration: 0ms;
|
|
@@ -45,11 +45,11 @@ const SlideItem = styled.div `
|
|
|
45
45
|
position: relative;
|
|
46
46
|
flex-shrink: 0;
|
|
47
47
|
flex-basis: calc(
|
|
48
|
-
${({ visibleItems, itemWidthCorrection }) => `(100% / ${visibleItems}) - ${itemWidthCorrection}px`}
|
|
48
|
+
${({ $visibleItems, $itemWidthCorrection }) => `(100% / ${$visibleItems}) - ${$itemWidthCorrection}px`}
|
|
49
49
|
);
|
|
50
50
|
|
|
51
51
|
a {
|
|
52
|
-
pointer-events: ${({ isSwiping }) => (isSwiping ? 'none' : 'auto')};
|
|
52
|
+
pointer-events: ${({ $isSwiping }) => ($isSwiping ? 'none' : 'auto')};
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
55
|
const Footer = styled.div `
|
|
@@ -83,7 +83,7 @@ const PaginationItem = styled.button `
|
|
|
83
83
|
background-color: ${theme.color.background.white.default};
|
|
84
84
|
transition: all 0.2s ease-in-out;
|
|
85
85
|
|
|
86
|
-
${({ isActive }) => isActive &&
|
|
86
|
+
${({ $isActive }) => $isActive &&
|
|
87
87
|
`
|
|
88
88
|
width: 3rem;
|
|
89
89
|
border-color: ${theme.color.default.pink};
|
|
@@ -117,7 +117,7 @@ const Knob = styled.div `
|
|
|
117
117
|
position: relative;
|
|
118
118
|
top: 0;
|
|
119
119
|
left: 0;
|
|
120
|
-
width: calc(100% / ${({ knobSize }) => knobSize});
|
|
120
|
+
width: calc(100% / ${({ $knobSize }) => $knobSize});
|
|
121
121
|
height: 100%;
|
|
122
122
|
border-radius: ${theme.radius.pill};
|
|
123
123
|
background-color: ${theme.color.background.pink.default};
|
|
@@ -353,12 +353,12 @@ const Carousel = (_a) => {
|
|
|
353
353
|
React__default.createElement(ButtonArrow, { direction: "left", "aria-label": props.previousAriaLabel, onClick: handleNavigationButtonPreviousClick, disabled: currentIndex <= 0, type: "button" }),
|
|
354
354
|
React__default.createElement(ButtonArrow, { direction: "right", "aria-label": props.nextAriaLabel, onClick: handleNavigationButtonNextClick, disabled: currentIndex + visibleItems >= Children.count(props.children), type: "button" }))),
|
|
355
355
|
React__default.createElement(Content, { "data-testid": dataTestId && `${dataTestId}-content` },
|
|
356
|
-
React__default.createElement(SlidesWrapper, { ref: slidesWrapperRef, onPointerDown: handleSlidesPointerDown, gap: slidesWrapperGapSizePx / 16 }, Children.map(props.children, child => (React__default.createElement(SlideItem, { visibleItems: visibleItems, itemWidthCorrection: itemWidthCorrection, isSwiping: isSwiping, onPointerDown: handlePointerDown }, child))))),
|
|
356
|
+
React__default.createElement(SlidesWrapper, { ref: slidesWrapperRef, onPointerDown: handleSlidesPointerDown, "$gap": slidesWrapperGapSizePx / 16 }, Children.map(props.children, child => (React__default.createElement(SlideItem, { "$visibleItems": visibleItems, "$itemWidthCorrection": itemWidthCorrection, "$isSwiping": isSwiping, onPointerDown: handlePointerDown }, child))))),
|
|
357
357
|
React__default.createElement(Footer, { "data-testid": dataTestId && `${dataTestId}-footer` },
|
|
358
358
|
React__default.createElement(Pagination, null, [...Array(totalSwipeSteps).keys()].map((value, index) => (React__default.createElement(PaginationItem, { key: value, "aria-label": props.paginationAriaLabel &&
|
|
359
|
-
`${props.paginationAriaLabel} ${index + 1}`, "aria-current": Math.ceil(currentIndex / step) === index, isActive: Math.ceil(currentIndex / step) === index, onClick: handlePaginationItemClick, type: "button" })))),
|
|
359
|
+
`${props.paginationAriaLabel} ${index + 1}`, "aria-current": Math.ceil(currentIndex / step) === index, "$isActive": Math.ceil(currentIndex / step) === index, onClick: handlePaginationItemClick, type: "button" })))),
|
|
360
360
|
React__default.createElement(Scrollbar, { ref: scrollbarRef, onPointerDown: handleScrollbarPointerDown },
|
|
361
|
-
React__default.createElement(Knob, { ref: knobRef, knobSize: slideScreensCount })),
|
|
361
|
+
React__default.createElement(Knob, { ref: knobRef, "$knobSize": slideScreensCount })),
|
|
362
362
|
props.footerButton && (React__default.createElement(FooterButton, null,
|
|
363
363
|
React__default.createElement(ButtonIcon, { icon: ArrowRight, onClick: props.onFooterButtonClick }, props.footerButton))))));
|
|
364
364
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize, getDividedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ const getStyling = ({ $type }) => {
|
|
|
27
27
|
`;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
const Element =
|
|
30
|
+
const Element = styled.div `
|
|
31
31
|
all: unset;
|
|
32
32
|
display: inline-block;
|
|
33
33
|
border-radius: ${theme.radius.pill};
|
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { ChevronLeft, ChevronRight } from '@dnanpm/icons';
|
|
3
3
|
import React__default, { useState } from 'react';
|
|
4
4
|
import ReactDatePicker from 'react-datepicker';
|
|
5
|
-
import
|
|
5
|
+
import { styled } from 'styled-components';
|
|
6
6
|
import theme from '../../themes/theme.js';
|
|
7
7
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
8
8
|
import ButtonIcon from '../ButtonIcon/ButtonIcon.js';
|
|
@@ -48,7 +48,7 @@ const localeData = {
|
|
|
48
48
|
};
|
|
49
49
|
const sentenceCase = (string) => `${string[0].toUpperCase()}${string.slice(1)}`;
|
|
50
50
|
// TODO: change `& .react-datepicker` value back to `1` after z-index of Footer removed
|
|
51
|
-
const Wrapper =
|
|
51
|
+
const Wrapper = styled.div `
|
|
52
52
|
position: relative;
|
|
53
53
|
|
|
54
54
|
& .react-datepicker {
|
|
@@ -211,7 +211,7 @@ const Wrapper = styled__default.div `
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
`;
|
|
214
|
-
const MonthSelector =
|
|
214
|
+
const MonthSelector = styled.div `
|
|
215
215
|
display: flex;
|
|
216
216
|
align-items: center;
|
|
217
217
|
justify-content: space-between;
|
|
@@ -220,11 +220,23 @@ const MonthSelector = styled__default.div `
|
|
|
220
220
|
fill: ${theme.color.text.gray};
|
|
221
221
|
}
|
|
222
222
|
`;
|
|
223
|
-
const CurrentMonth =
|
|
223
|
+
const CurrentMonth = styled.div `
|
|
224
224
|
font-size: ${theme.fontSize.default};
|
|
225
225
|
line-height: ${theme.lineHeight.default};
|
|
226
226
|
font-weight: ${theme.fontWeight.bold};
|
|
227
227
|
`;
|
|
228
|
+
const StyledInput = styled(Input) `
|
|
229
|
+
${({ disabled }) => !disabled &&
|
|
230
|
+
`
|
|
231
|
+
div {
|
|
232
|
+
background-color: ${theme.color.background.white.default};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.react-datepicker-ignore-onclickoutside-lock-icon {
|
|
236
|
+
display: none;
|
|
237
|
+
}
|
|
238
|
+
`}
|
|
239
|
+
`;
|
|
228
240
|
const DateTimePickerCustomHeader = ({ date, decreaseMonth, increaseMonth, locale, }) => (React__default.createElement(MonthSelector, null,
|
|
229
241
|
React__default.createElement(ButtonIcon, { icon: ChevronLeft, onClick: decreaseMonth }),
|
|
230
242
|
React__default.createElement(CurrentMonth, null, sentenceCase(date.toLocaleString(locale, {
|
|
@@ -272,7 +284,7 @@ const DateTimePicker = (_a) => {
|
|
|
272
284
|
.join(' - ');
|
|
273
285
|
const getDateTimePickerCustomHeader = (args) => DateTimePickerCustomHeader(Object.assign(Object.assign({}, args), { locale }));
|
|
274
286
|
return (React__default.createElement(Wrapper, { id: props.id, className: props.className, "data-testid": dataTestId },
|
|
275
|
-
React__default.createElement(
|
|
287
|
+
React__default.createElement(StyledInput, { id: `datetimepicker-input-${props.id}`, name: `datetimepicker-input-${props.id}`, label: props.label, placeholder: props.placeholder, value: formatInputValue, onFocus: handleOnInputFocus, onChange: handleOnInputChange, onKeyDown: handleOnKeyDown, onClearableButtonClick: props.isClearable ? handleClearable : undefined, className: "react-datepicker-ignore-onclickoutside", "data-testid": dataTestId && `${dataTestId}-datetimepicker-input`, disabled: props.isDisabled, required: props.isRequired, readonly: !props.isEditable, status: props.isInError ? 'error' : undefined, errorMessage: props.errorMessage }),
|
|
276
288
|
showReactDatePicker && (React__default.createElement(ReactDatePicker, { inline: true, selected: startDate, startDate: startDate, maxDate: props.maxDate, minDate: props.minDate, endDate: props.endDate, onChange: handleOnReactDatePickerChange, selectsRange: props.endDate !== undefined, showTimeSelect: props.endDate === undefined && isTimePicker, showTimeSelectOnly: props.endDate === undefined && !isDatePicker && isTimePicker, timeCaption: (_b = localeData[locale]) === null || _b === void 0 ? void 0 : _b.localize.timeCaption, timeIntervals: timeInterval, onClickOutside: handleOnReactDatePickerClickOutside, locale: localeData[locale],
|
|
277
289
|
// Used to format the date/time in internal ReactDatePicker input
|
|
278
290
|
// Currently ignored as date/time is shown in Styleguide Input instead, and formatted by using Intl.DateTimeFormat
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
7
|
-
const DividerWrapper =
|
|
7
|
+
const DividerWrapper = styled.div `
|
|
8
8
|
display: flex;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
|
11
11
|
width: 100%;
|
|
12
|
-
margin: ${({ margin }) => margin || `${getMultipliedSize(theme.base.baseHeight, 1)} 0`};
|
|
13
|
-
${({ padding }) => padding && `padding: ${padding}`};
|
|
12
|
+
margin: ${({ $margin }) => $margin || `${getMultipliedSize(theme.base.baseHeight, 1)} 0`};
|
|
13
|
+
${({ $padding }) => $padding && `padding: ${$padding}`};
|
|
14
14
|
border-style: solid;
|
|
15
15
|
border-color: ${theme.color.line.L03};
|
|
16
16
|
border-width: 1px ${({ children }) => !children && '0 0 0'};
|
|
@@ -18,7 +18,7 @@ const DividerWrapper = styled__default.div `
|
|
|
18
18
|
const Divider = (_a) => {
|
|
19
19
|
var { 'data-testid': dataTestId } = _a, props = __rest(_a, ['data-testid']);
|
|
20
20
|
const isFocusableSeparator = Boolean(props.children);
|
|
21
|
-
return (React__default.createElement(DividerWrapper, { id: props.id, margin: props.margin, padding: props.padding, className: props.className, "data-testid": dataTestId, as: isFocusableSeparator ? 'div' : 'hr', role: isFocusableSeparator ? 'separator' : undefined, "aria-orientation": "horizontal", "aria-label": props.ariaLabelFocusableSeparator, "aria-hidden": !isFocusableSeparator, tabIndex: isFocusableSeparator ? 0 : -1 }, props.children));
|
|
21
|
+
return (React__default.createElement(DividerWrapper, { id: props.id, "$margin": props.margin, "$padding": props.padding, className: props.className, "data-testid": dataTestId, as: isFocusableSeparator ? 'div' : 'hr', role: isFocusableSeparator ? 'separator' : undefined, "aria-orientation": "horizontal", "aria-label": props.ariaLabelFocusableSeparator, "aria-hidden": !isFocusableSeparator, tabIndex: isFocusableSeparator ? 0 : -1 }, props.children));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { Divider as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
|
|
5
5
|
const colorVariationsMap = {
|
|
6
6
|
default: {
|
|
@@ -25,7 +25,7 @@ const Container = styled.span `
|
|
|
25
25
|
display: inline-flex;
|
|
26
26
|
width: ${({ size }) => size};
|
|
27
27
|
height: ${({ size }) => size};
|
|
28
|
-
${({ margin }) => margin && `margin: ${margin}`};
|
|
28
|
+
${({ $margin }) => $margin && `margin: ${$margin}`};
|
|
29
29
|
|
|
30
30
|
svg {
|
|
31
31
|
width: ${({ size }) => size};
|
|
@@ -57,7 +57,7 @@ const DnaLogo = (_a) => {
|
|
|
57
57
|
const matches = /(\d+)(.+)/.exec(size);
|
|
58
58
|
margin = matches && `${Number(matches[1]) * 0.25}${matches[2]}`;
|
|
59
59
|
}
|
|
60
|
-
return (React__default.createElement(Container, { size: size, margin: margin, className: props.className, onClick: props.onClick }, type.indexOf('logotype') === -1 ? React__default.createElement(Emblem, { type: type }) : React__default.createElement(Logotype, { type: type })));
|
|
60
|
+
return (React__default.createElement(Container, { size: size, "$margin": margin, className: props.className, onClick: props.onClick }, type.indexOf('logotype') === -1 ? React__default.createElement(Emblem, { type: type }) : React__default.createElement(Logotype, { type: type })));
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export { DnaLogo as default };
|
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { Close } from '@dnanpm/icons';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import ReactModal from 'react-modal';
|
|
5
|
-
import
|
|
5
|
+
import { createGlobalStyle, keyframes, styled } from 'styled-components';
|
|
6
6
|
import theme from '../../themes/theme.js';
|
|
7
7
|
import getElevationShadow from '../../utils/common.js';
|
|
8
8
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
@@ -120,7 +120,7 @@ const Header = styled.div `
|
|
|
120
120
|
gap: 0.25rem;
|
|
121
121
|
border-bottom: 1px solid ${theme.color.line.L03};
|
|
122
122
|
padding: 1.25rem;
|
|
123
|
-
background-color: ${({ variant }) => variant === 'light'
|
|
123
|
+
background-color: ${({ $variant }) => $variant === 'light'
|
|
124
124
|
? theme.color.background.white.default
|
|
125
125
|
: theme.color.background.plum.E02};
|
|
126
126
|
width: 100%;
|
|
@@ -131,13 +131,13 @@ const Header = styled.div `
|
|
|
131
131
|
}
|
|
132
132
|
`;
|
|
133
133
|
const Title = styled.h2 `
|
|
134
|
-
font-size: ${({ size }) => (size === 'small' ? theme.fontSize.h2S : theme.fontSize.h2M)};
|
|
135
|
-
line-height: ${({ size }) =>
|
|
136
|
-
color: ${({ variant }) => variant === 'light' ? theme.color.default.black : theme.color.default.white};
|
|
134
|
+
font-size: ${({ $size }) => ($size === 'small' ? theme.fontSize.h2S : theme.fontSize.h2M)};
|
|
135
|
+
line-height: ${({ $size }) => $size === 'small' ? theme.lineHeight.h2S : theme.lineHeight.h2M};
|
|
136
|
+
color: ${({ $variant }) => $variant === 'light' ? theme.color.default.black : theme.color.default.white};
|
|
137
137
|
`;
|
|
138
138
|
const Subtitle = styled.p `
|
|
139
|
-
font-size: ${({ size }) => (size === 'small' ? theme.fontSize.l : theme.fontSize.xl)};
|
|
140
|
-
color: ${({ variant }) => variant === 'light' ? theme.color.default.black : theme.color.default.white};
|
|
139
|
+
font-size: ${({ $size }) => ($size === 'small' ? theme.fontSize.l : theme.fontSize.xl)};
|
|
140
|
+
color: ${({ $variant }) => $variant === 'light' ? theme.color.default.black : theme.color.default.white};
|
|
141
141
|
`;
|
|
142
142
|
const CloseButton = styled(ButtonClose) `
|
|
143
143
|
margin: 0;
|
|
@@ -148,7 +148,7 @@ const CloseButton = styled(ButtonClose) `
|
|
|
148
148
|
: theme.color.background.plum.default};
|
|
149
149
|
`;
|
|
150
150
|
const Content = styled.div `
|
|
151
|
-
padding: ${({ padding }) => padding};
|
|
151
|
+
padding: ${({ $padding }) => $padding};
|
|
152
152
|
margin: 0;
|
|
153
153
|
`;
|
|
154
154
|
const Footer = styled.div `
|
|
@@ -171,14 +171,14 @@ const Drawer = (_a) => {
|
|
|
171
171
|
React__default.createElement(StyledReactModal, { id: props.id, isOpen: props.isOpen, overlayElement: ModalOverlay, contentElement: ModalContent, onRequestClose: props.onRequestClose, portalClassName: props.className, contentLabel: props.contentLabel, shouldCloseOnEsc: isClosable, shouldCloseOnOverlayClick: isClosable, closeTimeoutMS: 300, size: size, side: side },
|
|
172
172
|
React__default.createElement(StyledBox, { "data-testid": dataTestId, elevation: "extraHigh", margin: props.margin, padding: "0" },
|
|
173
173
|
React__default.createElement(ContentContainer, null,
|
|
174
|
-
React__default.createElement(Header, { variant: variant, "data-testid": dataTestId && `${dataTestId}-header` },
|
|
175
|
-
React__default.createElement(Title, { size: size, variant: variant }, props.title),
|
|
176
|
-
props.subtitle && (React__default.createElement(Subtitle, { size: size, variant: variant }, props.subtitle))),
|
|
174
|
+
React__default.createElement(Header, { "$variant": variant, "data-testid": dataTestId && `${dataTestId}-header` },
|
|
175
|
+
React__default.createElement(Title, { "$size": size, "$variant": variant }, props.title),
|
|
176
|
+
props.subtitle && (React__default.createElement(Subtitle, { "$size": size, "$variant": variant }, props.subtitle))),
|
|
177
177
|
closeButton && isClosable && (React__default.createElement(CloseButton, { onClick: props.onRequestClose, "aria-label": props.closeLabel, "data-testid": dataTestId && `${dataTestId}-close-button`, variant: variant },
|
|
178
178
|
React__default.createElement(Close, { color: variant === 'light'
|
|
179
179
|
? theme.color.default.plum
|
|
180
180
|
: theme.color.default.white }))),
|
|
181
|
-
React__default.createElement(Content, { "data-testid": dataTestId && `${dataTestId}-content`, padding: padding }, props.children)),
|
|
181
|
+
React__default.createElement(Content, { "data-testid": dataTestId && `${dataTestId}-content`, "$padding": padding }, props.children)),
|
|
182
182
|
props.footer && (React__default.createElement(Footer, { "data-testid": dataTestId && `${dataTestId}-footer` }, props.footer)))),
|
|
183
183
|
React__default.createElement(GlobalStyle, null)));
|
|
184
184
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { Info } from '@dnanpm/icons';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import styled from '
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
5
|
import theme from '../../themes/theme.js';
|
|
6
6
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
7
7
|
import Box from '../Box/Box.js';
|