@laerdal/life-react-components 5.0.0-dev.1 → 5.0.0-dev.3
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/dist/Accordion/AccordionItem.cjs +1 -1
- package/dist/Accordion/AccordionItem.cjs.map +1 -1
- package/dist/Accordion/AccordionItem.js +1 -1
- package/dist/Accordion/AccordionItem.js.map +1 -1
- package/dist/Accordion/styles.cjs +3 -3
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.d.ts +1 -1
- package/dist/Accordion/styles.js +3 -3
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/AuthPage/AuthPage.cjs +1 -1
- package/dist/AuthPage/AuthPage.cjs.map +1 -1
- package/dist/AuthPage/AuthPage.js +1 -1
- package/dist/AuthPage/AuthPage.js.map +1 -1
- package/dist/AuthPage/ScreenSetsContainer.cjs +1 -1
- package/dist/AuthPage/ScreenSetsContainer.cjs.map +1 -1
- package/dist/AuthPage/ScreenSetsContainer.d.ts +1 -1
- package/dist/AuthPage/ScreenSetsContainer.js +1 -1
- package/dist/AuthPage/ScreenSetsContainer.js.map +1 -1
- package/dist/Banners/Banner.cjs +8 -8
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +8 -2
- package/dist/Banners/Banner.js +8 -8
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/OverviewBanner.d.ts +4 -4
- package/dist/Breadcrumb/Breadcrumb.cjs +2 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +5 -5
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.d.ts +2 -2
- package/dist/Breadcrumb/styles.js +5 -5
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +2 -2
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +2 -2
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +1 -1
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.js +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/DualFunctionButton.cjs +5 -5
- package/dist/Button/DualFunctionButton.cjs.map +1 -1
- package/dist/Button/DualFunctionButton.js +5 -5
- package/dist/Button/DualFunctionButton.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +25 -23
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.d.ts +24 -3
- package/dist/Button/Iconbutton.js +25 -23
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +2 -2
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.d.ts +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +2 -2
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.d.ts +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.js +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +9 -9
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +9 -9
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +10 -10
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.d.ts +9 -9
- package/dist/Dropdown/CommonStyling.js +10 -10
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +41 -41
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.d.ts +12 -12
- package/dist/Dropdown/DropdownContent.js +41 -41
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +8 -8
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +8 -8
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.cjs +3 -3
- package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.js +3 -3
- package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
- package/dist/Footer/Components/FooterNavSection.cjs +2 -2
- package/dist/Footer/Components/FooterNavSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNavSection.js +2 -2
- package/dist/Footer/Components/FooterNavSection.js.map +1 -1
- package/dist/Footer/SiteFooter.cjs +3 -3
- package/dist/Footer/SiteFooter.cjs.map +1 -1
- package/dist/Footer/SiteFooter.js +3 -3
- package/dist/Footer/SiteFooter.js.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +5 -5
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js +5 -5
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs +4 -4
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js +4 -4
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +2 -13
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js +2 -13
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +5 -5
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +2 -2
- package/dist/GlobalNavigationBar/desktop/SubMenu.js +5 -5
- package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -1
- package/dist/HyperLink/HyperLink.cjs +3 -3
- package/dist/HyperLink/HyperLink.cjs.map +1 -1
- package/dist/HyperLink/HyperLink.d.ts +2 -2
- package/dist/HyperLink/HyperLink.js +3 -3
- package/dist/HyperLink/HyperLink.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +4 -4
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.d.ts +3 -3
- package/dist/InputFields/Checkbox.js +4 -4
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +9 -9
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.js +9 -9
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/Label.cjs +2 -2
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +2 -2
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +24 -24
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +24 -24
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +4 -4
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.js +4 -4
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +2 -2
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +2 -2
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +5 -5
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.js +5 -5
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +3 -3
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +3 -3
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.d.ts +1 -1
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +7 -7
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +9 -9
- package/dist/InputFields/styling.js +7 -7
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/Layouts/index.cjs +11 -11
- package/dist/Layouts/index.cjs.map +1 -1
- package/dist/Layouts/index.d.ts +6 -6
- package/dist/Layouts/index.js +11 -11
- package/dist/Layouts/index.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +8 -8
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.d.ts +2 -2
- package/dist/MenuItem/MenuItem.js +8 -8
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/Modals/ModalContainer.cjs +2 -2
- package/dist/Modals/ModalContainer.cjs.map +1 -1
- package/dist/Modals/ModalContainer.js +2 -2
- package/dist/Modals/ModalContainer.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +11 -11
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +11 -11
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +8 -8
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +8 -8
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +19 -19
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.d.ts +17 -17
- package/dist/Modals/ModalStyles.js +19 -19
- package/dist/Modals/ModalStyles.js.map +1 -1
- package/dist/NotificationDot/NotificationDot.cjs +11 -12
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +11 -12
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/Popover/Popover.cjs +40 -40
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.d.ts +9 -9
- package/dist/Popover/Popover.js +40 -40
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/QuizButton/QuizButton.cjs +14 -14
- package/dist/QuizButton/QuizButton.cjs.map +1 -1
- package/dist/QuizButton/QuizButton.js +14 -14
- package/dist/QuizButton/QuizButton.js.map +1 -1
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.cjs.map +1 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.cjs +2 -2
- package/dist/Table/TableBody.cjs.map +1 -1
- package/dist/Table/TableBody.js +2 -2
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/Table/TableStyles.cjs +4 -4
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.d.ts +3 -3
- package/dist/Table/TableStyles.js +4 -4
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +3 -3
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +3 -3
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tabs/Tabs.cjs.map +1 -1
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tag/Tag.cjs +6 -6
- package/dist/Tag/Tag.cjs.map +1 -1
- package/dist/Tag/Tag.js +6 -6
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Toasters/Toast.cjs +16 -16
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.d.ts +6 -7
- package/dist/Toasters/Toast.js +16 -16
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toggles/ToggleSwitch.cjs +1 -1
- package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
- package/dist/Toggles/ToggleSwitch.js +1 -1
- package/dist/Toggles/ToggleSwitch.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.d.ts +1 -1
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Tooltips/TooltipOverflow.cjs +7 -7
- package/dist/Tooltips/TooltipOverflow.cjs.map +1 -1
- package/dist/Tooltips/TooltipOverflow.js +7 -7
- package/dist/Tooltips/TooltipOverflow.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +29 -29
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.d.ts +9 -9
- package/dist/Tooltips/TooltipStyles.js +29 -29
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/Tooltips/TooltipWrapper.cjs +7 -7
- package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
- package/dist/Tooltips/TooltipWrapper.js +7 -7
- package/dist/Tooltips/TooltipWrapper.js.map +1 -1
- package/dist/styles/typography.cjs +11 -11
- package/dist/styles/typography.cjs.map +1 -1
- package/dist/styles/typography.d.ts +3 -3
- package/dist/styles/typography.js +11 -11
- package/dist/styles/typography.js.map +1 -1
- package/package.json +1 -2
|
@@ -9,64 +9,64 @@ var distanceToEdge = function distanceToEdge(size) {
|
|
|
9
9
|
return size == Size.XSmall ? '8px' : !size || size == Size.Small ? '12px' : '16px';
|
|
10
10
|
};
|
|
11
11
|
export var Tooltip = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n ", "\n ", "\n ", "\n ", "\n box-shadow: ", ";\n box-sizing: border-box;\n\n padding: ", ";\n border-radius: 2px;\n ", "\n height: ", ";\n max-width: ", ";\n background: ", ";\n position: absolute;\n opacity: 0;\n z-index: ", ";\n ", "\n\n ", "\n ", "\n \n ", "\n\n\n&::after {\n ", "\n content: \"\";\n position: absolute;\n ", "\n\n ", "\n ", "\n\n ", "\n\n ", "\n margin: -0.5px;\n border-width: 4px;\n border-style: solid;\n border-color: ", " ", "\n ", " ", ";\n }\n\n & > span {\n word-wrap: break-word;\n color: white;\n }\n"])), function (props) {
|
|
12
|
-
return props
|
|
12
|
+
return props.$size == Size.Small || props.$size != Size.Medium ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '';
|
|
13
13
|
}, function (props) {
|
|
14
|
-
return props
|
|
14
|
+
return props.$size == Size.XSmall ? ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '';
|
|
15
15
|
}, function (props) {
|
|
16
|
-
return props
|
|
16
|
+
return props.$size == Size.Medium ? ComponentMStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '';
|
|
17
17
|
}, function (props) {
|
|
18
|
-
return props
|
|
18
|
+
return props.$align == 'center' ? 'text-align: center;' : '';
|
|
19
19
|
}, BOXSHADOWS.BOXSHADOW_L2, function (props) {
|
|
20
|
-
return props
|
|
20
|
+
return props.$size == Size.XSmall ? '4px 8px' : props.$size == Size.Medium ? '8px 12px' : '6px 10px';
|
|
21
21
|
}, function (props) {
|
|
22
|
-
return props
|
|
22
|
+
return props.$width ? "width: ".concat(props.$width, ";") : 'width: max-content;';
|
|
23
23
|
}, function (props) {
|
|
24
|
-
return props
|
|
24
|
+
return props.$height;
|
|
25
25
|
}, function (props) {
|
|
26
|
-
var _props
|
|
27
|
-
return (_props
|
|
26
|
+
var _props$$maxWidth;
|
|
27
|
+
return (_props$$maxWidth = props.$maxWidth) !== null && _props$$maxWidth !== void 0 ? _props$$maxWidth : '34em';
|
|
28
28
|
}, function (props) {
|
|
29
29
|
return COLORS.getColor('primary_800', props.theme);
|
|
30
30
|
}, Z_INDEXES.tooltip, function (props) {
|
|
31
|
-
return props
|
|
31
|
+
return props.$position == 'top' ? 'bottom: 110%;' : props.$position == 'bottom' ? 'top: 110%;' : '';
|
|
32
32
|
}, function (props) {
|
|
33
|
-
return props
|
|
33
|
+
return props.$position == 'left' ? 'bottom: 50%; transform: translateX(-110%) translateY(50%);' : '';
|
|
34
34
|
}, function (props) {
|
|
35
|
-
return props
|
|
35
|
+
return props.$position == 'right' ? 'bottom: 50%;left: 110%; transform: translateY(50%);' : '';
|
|
36
36
|
}, function (props) {
|
|
37
|
-
return props
|
|
37
|
+
return props.$position == 'left' || props.$position == 'right' ? '' : props.$align == 'start' ? 'left: 0%;' : props.$align == 'end' ? 'right: 0%;' : 'left: 50%; transform: translateX(-50%);';
|
|
38
38
|
}, function (props) {
|
|
39
|
-
return !props
|
|
39
|
+
return !props.$withArrow ? 'display: none;' : '';
|
|
40
40
|
}, function (props) {
|
|
41
|
-
return props
|
|
41
|
+
return props.$position == 'top' ? 'top: 100%;' : props.$position == 'bottom' ? 'bottom: 100%;' : '';
|
|
42
42
|
}, function (props) {
|
|
43
|
-
return props
|
|
43
|
+
return props.$position == 'right' ? 'right: 100%; bottom: 50%; transform: translateY(50%);' : '';
|
|
44
44
|
}, function (props) {
|
|
45
|
-
return props
|
|
45
|
+
return props.$position == 'left' ? 'left: 100%; bottom: 50%; transform: translateY(50%);' : '';
|
|
46
46
|
}, function (props) {
|
|
47
|
-
return props
|
|
47
|
+
return props.$position == 'left' || props.$position == 'right' ? '' : props.$align == 'start' ? "left: ".concat(distanceToEdge(props.$size), ";") : props.$align == 'end' ? "right: ".concat(distanceToEdge(props.$size), ";") : 'left: 50%;';
|
|
48
48
|
}, function (props) {
|
|
49
|
-
return props
|
|
49
|
+
return props.$position == 'left' ? '' : 'margin-left: -5px;';
|
|
50
50
|
}, function (props) {
|
|
51
|
-
return props
|
|
51
|
+
return props.$position == 'top' ? COLORS.getColor('primary_800', props.theme) : 'transparent';
|
|
52
52
|
}, function (props) {
|
|
53
|
-
return props
|
|
53
|
+
return props.$position == 'right' ? COLORS.getColor('primary_800', props.theme) : 'transparent';
|
|
54
54
|
}, function (props) {
|
|
55
|
-
return props
|
|
55
|
+
return props.$position == 'bottom' ? COLORS.getColor('primary_800', props.theme) : 'transparent';
|
|
56
56
|
}, function (props) {
|
|
57
|
-
return props
|
|
57
|
+
return props.$position == 'left' ? COLORS.getColor('primary_800', props.theme) : 'transparent';
|
|
58
58
|
});
|
|
59
59
|
Tooltip.defaultProps = {
|
|
60
|
-
withArrow: false,
|
|
61
|
-
size: Size.Small,
|
|
62
|
-
height: 'auto',
|
|
63
|
-
align: 'center',
|
|
64
|
-
position: 'bottom'
|
|
60
|
+
$withArrow: false,
|
|
61
|
+
$size: Size.Small,
|
|
62
|
+
$height: 'auto',
|
|
63
|
+
$align: 'center',
|
|
64
|
+
$position: 'bottom'
|
|
65
65
|
};
|
|
66
66
|
export var TooltipTrigger = function TooltipTrigger(triggerType, delay) {
|
|
67
67
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), triggerType == 'hover' ? "&:hover ".concat(Tooltip, ", &:focus-within ").concat(Tooltip, ", &:focus ").concat(Tooltip, " {\n opacity: 1;\n transition: 0.5s;\n transition-delay: ").concat(delay !== null && delay !== void 0 ? delay : '0.7s', ";\n }") : "& ".concat(Tooltip, " {\n transition: 0.5s;\n transition-delay: ").concat(delay !== null && delay !== void 0 ? delay : '0s', ";\n }\n \n &.show ").concat(Tooltip, " {\n opacity: 1;\n }\n \n &.hide ").concat(Tooltip, " {\n opacity: 0;\n }"));
|
|
68
68
|
};
|
|
69
69
|
export var TooltipContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n position: relative;\n\n ", "\n\n &:focus {\n ", "\n }\n"])), function (props) {
|
|
70
|
-
return TooltipTrigger(props
|
|
70
|
+
return TooltipTrigger(props.$triggerType, props.$delay);
|
|
71
71
|
}, focusStyles);
|
|
72
72
|
//# sourceMappingURL=TooltipStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipStyles.js","names":["styled","css","Size","BOXSHADOWS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","Z_INDEXES","distanceToEdge","size","XSmall","Small","Tooltip","div","_templateObject","_taggedTemplateLiteral","props","Medium","Regular","getColor","theme","align","BOXSHADOW_L2","width","concat","height","_props
|
|
1
|
+
{"version":3,"file":"TooltipStyles.js","names":["styled","css","Size","BOXSHADOWS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","Z_INDEXES","distanceToEdge","size","XSmall","Small","Tooltip","div","_templateObject","_taggedTemplateLiteral","props","$size","Medium","Regular","getColor","theme","$align","BOXSHADOW_L2","$width","concat","$height","_props$$maxWidth","$maxWidth","tooltip","$position","$withArrow","defaultProps","TooltipTrigger","triggerType","delay","_templateObject2","TooltipContainer","_templateObject3","$triggerType","$delay"],"sources":["../../src/Tooltips/TooltipStyles.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\r\nimport { Size } from '../types';\r\nimport { BOXSHADOWS, COLORS, ComponentTextStyle, focusStyles } from '../styles';\r\nimport { ComponentMStyling, ComponentSStyling, ComponentXSStyling } from '../styles/typography';\r\nimport { Z_INDEXES } from '../styles/z-indexes';\r\n\r\nconst distanceToEdge = (size: Size | undefined) => {\r\n return size == Size.XSmall ? '8px' : !size || size == Size.Small ? '12px' : '16px';\r\n};\r\n\r\nexport const Tooltip = styled.div<{\r\n $withArrow?: boolean;\r\n $size?: Size;\r\n $height?: string;\r\n $maxWidth?: string;\r\n $align?: 'start' | 'end' | 'center' | undefined;\r\n $position?: 'top' | 'right' | 'bottom' | 'left' | undefined;\r\n $width?: string;\r\n}>`\r\n pointer-events: none;\r\n ${(props) => (props.$size == Size.Small || props.$size != Size.Medium ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '')}\r\n ${(props) => (props.$size == Size.XSmall ? ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '')}\r\n ${(props) => (props.$size == Size.Medium ? ComponentMStyling(ComponentTextStyle.Regular, COLORS.getColor('white', props.theme)) : '')}\r\n ${(props) => (props.$align == 'center' ? 'text-align: center;' : '')}\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n box-sizing: border-box;\r\n\r\n padding: ${(props) => (props.$size == Size.XSmall ? '4px 8px' : props.$size == Size.Medium ? '8px 12px' : '6px 10px')};\r\n border-radius: 2px;\r\n ${(props) => (props.$width ? `width: ${props.$width};` : 'width: max-content;')}\r\n height: ${(props) => props.$height};\r\n max-width: ${(props) => props.$maxWidth ?? '34em'};\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n position: absolute;\r\n opacity: 0;\r\n z-index: ${Z_INDEXES.tooltip};\r\n ${(props) => (props.$position == 'top' ? 'bottom: 110%;' : props.$position == 'bottom' ? 'top: 110%;' : '')}\r\n\r\n ${(props) => (props.$position == 'left' ? 'bottom: 50%; transform: translateX(-110%) translateY(50%);' : '')}\r\n ${(props) => (props.$position == 'right' ? 'bottom: 50%;left: 110%; transform: translateY(50%);' : '')}\r\n \r\n ${(props) =>\r\n props.$position == 'left' || props.$position == 'right'\r\n ? ''\r\n : props.$align == 'start'\r\n ? 'left: 0%;'\r\n : props.$align == 'end'\r\n ? 'right: 0%;'\r\n : 'left: 50%; transform: translateX(-50%);'}\r\n\r\n\r\n&::after {\r\n ${(props) => (!props.$withArrow ? 'display: none;' : '')}\r\n content: \"\";\r\n position: absolute;\r\n ${(props) => (props.$position == 'top' ? 'top: 100%;' : props.$position == 'bottom' ? 'bottom: 100%;' : '')}\r\n\r\n ${(props) => (props.$position == 'right' ? 'right: 100%; bottom: 50%; transform: translateY(50%);' : '')}\r\n ${(props) => (props.$position == 'left' ? 'left: 100%; bottom: 50%; transform: translateY(50%);' : '')}\r\n\r\n ${(props) =>\r\n props.$position == 'left' || props.$position == 'right'\r\n ? ''\r\n : props.$align == 'start'\r\n ? `left: ${distanceToEdge(props.$size)};`\r\n : props.$align == 'end'\r\n ? `right: ${distanceToEdge(props.$size)};`\r\n : 'left: 50%;'}\r\n\r\n ${(props) => (props.$position == 'left' ? '' : 'margin-left: -5px;')}\r\n margin: -0.5px;\r\n border-width: 4px;\r\n border-style: solid;\r\n border-color: ${(props) => (props.$position == 'top' ? COLORS.getColor('primary_800', props.theme) : 'transparent')} ${(props) => (props.$position == 'right' ? COLORS.getColor('primary_800', props.theme) : 'transparent')}\r\n ${(props) => (props.$position == 'bottom' ? COLORS.getColor('primary_800', props.theme) : 'transparent')} ${(props) => (props.$position == 'left' ? COLORS.getColor('primary_800', props.theme) : 'transparent')};\r\n }\r\n\r\n & > span {\r\n word-wrap: break-word;\r\n color: white;\r\n }\r\n`;\r\n\r\nTooltip.defaultProps = {\r\n $withArrow: false,\r\n $size: Size.Small,\r\n $height: 'auto',\r\n $align: 'center',\r\n $position: 'bottom',\r\n};\r\n\r\nexport const TooltipTrigger = (triggerType: 'hover' | 'click', delay?: string) => css`\r\n ${triggerType == 'hover'\r\n ? `&:hover ${Tooltip}, &:focus-within ${Tooltip}, &:focus ${Tooltip} {\r\n opacity: 1;\r\n transition: 0.5s;\r\n transition-delay: ${delay ?? '0.7s'};\r\n }`\r\n : `& ${Tooltip} {\r\n transition: 0.5s;\r\n transition-delay: ${delay ?? '0s'};\r\n }\r\n \r\n &.show ${Tooltip} {\r\n opacity: 1;\r\n }\r\n \r\n &.hide ${Tooltip} {\r\n opacity: 0;\r\n }`}\r\n`;\r\n\r\nexport const TooltipContainer = styled.div<{ $triggerType: 'hover' | 'click', $delay?: string }>`\r\n display: inline-block;\r\n position: relative;\r\n\r\n ${(props) => TooltipTrigger(props.$triggerType, props.$delay)}\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n`;\r\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,UAAU;AAC/B,SAASC,UAAU,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ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
81
81
|
var cls = "".concat(trigger === 'click' ? showTooltip ? 'show' : 'hide' : '');
|
|
82
82
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_TooltipStyles.TooltipContainer, {
|
|
83
83
|
ref: ref,
|
|
84
|
-
delay: delay,
|
|
84
|
+
$delay: delay,
|
|
85
85
|
tabIndex: tabIndex,
|
|
86
|
-
triggerType: trigger,
|
|
86
|
+
$triggerType: trigger,
|
|
87
87
|
className: cls,
|
|
88
88
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipStyles.Tooltip, _objectSpread(_objectSpread({
|
|
89
|
-
align: align,
|
|
90
|
-
height: height,
|
|
89
|
+
$align: align,
|
|
90
|
+
$height: height,
|
|
91
91
|
role: "tooltip",
|
|
92
|
-
size: size,
|
|
93
|
-
withArrow: withArrow,
|
|
94
|
-
position: position
|
|
92
|
+
$size: size,
|
|
93
|
+
$withArrow: withArrow,
|
|
94
|
+
$position: position
|
|
95
95
|
}, props), {}, {
|
|
96
96
|
children: label
|
|
97
97
|
})), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipWrapper.cjs","names":["React","_interopRequireWildcard","require","_TooltipStyles","_common","_types","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","TooltipWrapper","_ref","label","children","withArrow","tabIndex","_ref$size","size","Size","Small","_ref$height","height","_ref$delay","delay","undefined","_ref$align","align","_ref$position","position","_ref$trigger","trigger","_ref$hideAfter","hideAfter","props","_objectWithoutProperties2","_React$useState","useState","_React$useState2","_slicedToArray2","showTooltip","setShowTooltip","timeoutRef","useRef","ref","useClickOutsideRef","handleClick","_ref$current","current","contains","target","clearTimeout","setTimeout","handleButtonDown","key","useEffect","_ref$current2","document","addEventListener","_ref$current3","removeEventListener","cls","concat","jsxs","TooltipContainer","triggerType","className","jsx","Tooltip","role","_default","exports"],"sources":["../../src/Tooltips/TooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport {TooltipProps} from './TooltipTypes';\r\n\r\nimport {TooltipContainer, Tooltip} from './TooltipStyles';\r\nimport {useClickOutsideRef} from '../common';\r\nimport {useEffect, useRef} from \"react\";\r\nimport {Size} from \"../types\";\r\n\r\nconst TooltipWrapper = ({\r\n label, children,\r\n withArrow,\r\n tabIndex,\r\n size = Size.Small,\r\n height = 'auto',\r\n delay = undefined,\r\n align = 'center',\r\n position = 'bottom',\r\n trigger = 'hover',\r\n hideAfter = 5000,\r\n ...props\r\n }: TooltipProps) => {\r\n\r\n const [showTooltip, setShowTooltip] = React.useState(false);\r\n const timeoutRef = useRef<any>();\r\n\r\n const ref = useClickOutsideRef(() => setShowTooltip(false));\r\n\r\n const handleClick = (e?: MouseEvent) => {\r\n if (ref?.current?.contains(e?.target as Node)) {\r\n setShowTooltip(true)\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n const handleButtonDown = (e?: KeyboardEvent) => {\r\n if (e?.key === 'Enter' || e?.key === ' ') {\r\n setShowTooltip(true);\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (trigger == 'click') {\r\n document.addEventListener('mousedown', handleClick);\r\n ref?.current?.addEventListener('keydown', handleButtonDown);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', handleClick);\r\n ref?.current?.removeEventListener('keydown', handleButtonDown);\r\n };\r\n }\r\n }, [trigger])\r\n\r\n const cls = `${trigger === 'click' ? showTooltip ? 'show' : 'hide' : ''}`;\r\n return <TooltipContainer ref={ref}\r\n delay={delay}\r\n tabIndex={tabIndex}\r\n triggerType={trigger}\r\n className={cls}>\r\n <Tooltip align={align}\r\n height={height}\r\n role=\"tooltip\"\r\n size={size}\r\n withArrow={withArrow}\r\n position={position}\r\n {...props}>\r\n {label}\r\n </Tooltip>\r\n {children}\r\n </TooltipContainer>;\r\n};\r\n\r\nexport default TooltipWrapper;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAA8B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA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AEI,OAAO,cAAAQ,aAAA,uBAAZA,aAAA,CAAcE,gBAAgB,CAAC,SAAS,EAAEL,gBAAgB,CAAC;MAE3D,OAAO,YAAM;QAAA,IAAAM,aAAA;QACXF,QAAQ,CAACG,mBAAmB,CAAC,WAAW,EAAEd,WAAW,CAAC;QACtDF,GAAG,aAAHA,GAAG,wBAAAe,aAAA,GAAHf,GAAG,CAAEI,OAAO,cAAAW,aAAA,uBAAZA,aAAA,CAAcC,mBAAmB,CAAC,SAAS,EAAEP,gBAAgB,CAAC;MAChE,CAAC;IACH;EACF,CAAC,EAAE,CAACtB,OAAO,CAAC,CAAC;EAEb,IAAM8B,GAAG,MAAAC,MAAA,CAAM/B,OAAO,KAAK,OAAO,GAAGS,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,EAAE,CAAE;EACzE,oBAAO,IAAAlE,WAAA,CAAAyF,IAAA,EAAC5F,cAAA,CAAA6F,gBAAgB;IAACpB,GAAG,EAAEA,GAAI;
|
|
1
|
+
{"version":3,"file":"TooltipWrapper.cjs","names":["React","_interopRequireWildcard","require","_TooltipStyles","_common","_types","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","TooltipWrapper","_ref","label","children","withArrow","tabIndex","_ref$size","size","Size","Small","_ref$height","height","_ref$delay","delay","undefined","_ref$align","align","_ref$position","position","_ref$trigger","trigger","_ref$hideAfter","hideAfter","props","_objectWithoutProperties2","_React$useState","useState","_React$useState2","_slicedToArray2","showTooltip","setShowTooltip","timeoutRef","useRef","ref","useClickOutsideRef","handleClick","_ref$current","current","contains","target","clearTimeout","setTimeout","handleButtonDown","key","useEffect","_ref$current2","document","addEventListener","_ref$current3","removeEventListener","cls","concat","jsxs","TooltipContainer","$delay","$triggerType","className","jsx","Tooltip","$align","$height","role","$size","$withArrow","$position","_default","exports"],"sources":["../../src/Tooltips/TooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport {TooltipProps} from './TooltipTypes';\r\n\r\nimport {TooltipContainer, Tooltip} from './TooltipStyles';\r\nimport {useClickOutsideRef} from '../common';\r\nimport {useEffect, useRef} from \"react\";\r\nimport {Size} from \"../types\";\r\n\r\nconst TooltipWrapper = ({\r\n label, children,\r\n withArrow,\r\n tabIndex,\r\n size = Size.Small,\r\n height = 'auto',\r\n delay = undefined,\r\n align = 'center',\r\n position = 'bottom',\r\n trigger = 'hover',\r\n hideAfter = 5000,\r\n ...props\r\n }: TooltipProps) => {\r\n\r\n const [showTooltip, setShowTooltip] = React.useState(false);\r\n const timeoutRef = useRef<any>();\r\n\r\n const ref = useClickOutsideRef(() => setShowTooltip(false));\r\n\r\n const handleClick = (e?: MouseEvent) => {\r\n if (ref?.current?.contains(e?.target as Node)) {\r\n setShowTooltip(true)\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n const handleButtonDown = (e?: KeyboardEvent) => {\r\n if (e?.key === 'Enter' || e?.key === ' ') {\r\n setShowTooltip(true);\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (trigger == 'click') {\r\n document.addEventListener('mousedown', handleClick);\r\n ref?.current?.addEventListener('keydown', handleButtonDown);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', handleClick);\r\n ref?.current?.removeEventListener('keydown', handleButtonDown);\r\n };\r\n }\r\n }, [trigger])\r\n\r\n const cls = `${trigger === 'click' ? showTooltip ? 'show' : 'hide' : ''}`;\r\n return <TooltipContainer ref={ref}\r\n $delay={delay}\r\n tabIndex={tabIndex}\r\n $triggerType={trigger}\r\n className={cls}>\r\n <Tooltip $align={align}\r\n $height={height}\r\n role=\"tooltip\"\r\n $size={size}\r\n $withArrow={withArrow}\r\n $position={position}\r\n {...props}>\r\n {label}\r\n </Tooltip>\r\n {children}\r\n </TooltipContainer>;\r\n};\r\n\r\nexport default TooltipWrapper;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAA8B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,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 'hide' : '');
|
|
74
74
|
return /*#__PURE__*/_jsxs(TooltipContainer, {
|
|
75
75
|
ref: ref,
|
|
76
|
-
delay: delay,
|
|
76
|
+
$delay: delay,
|
|
77
77
|
tabIndex: tabIndex,
|
|
78
|
-
triggerType: trigger,
|
|
78
|
+
$triggerType: trigger,
|
|
79
79
|
className: cls,
|
|
80
80
|
children: [/*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
81
|
-
align: align,
|
|
82
|
-
height: height,
|
|
81
|
+
$align: align,
|
|
82
|
+
$height: height,
|
|
83
83
|
role: "tooltip",
|
|
84
|
-
size: size,
|
|
85
|
-
withArrow: withArrow,
|
|
86
|
-
position: position
|
|
84
|
+
$size: size,
|
|
85
|
+
$withArrow: withArrow,
|
|
86
|
+
$position: position
|
|
87
87
|
}, props), {}, {
|
|
88
88
|
children: label
|
|
89
89
|
})), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipWrapper.js","names":["React","TooltipContainer","Tooltip","useClickOutsideRef","useEffect","useRef","Size","jsx","_jsx","jsxs","_jsxs","TooltipWrapper","_ref","label","children","withArrow","tabIndex","_ref$size","size","Small","_ref$height","height","_ref$delay","delay","undefined","_ref$align","align","_ref$position","position","_ref$trigger","trigger","_ref$hideAfter","hideAfter","props","_objectWithoutProperties","_excluded","_React$useState","useState","_React$useState2","_slicedToArray","showTooltip","setShowTooltip","timeoutRef","ref","handleClick","e","_ref$current","current","contains","target","clearTimeout","setTimeout","handleButtonDown","key","_ref$current2","document","addEventListener","_ref$current3","removeEventListener","cls","concat","triggerType","className","_objectSpread","role"],"sources":["../../src/Tooltips/TooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport {TooltipProps} from './TooltipTypes';\r\n\r\nimport {TooltipContainer, Tooltip} from './TooltipStyles';\r\nimport {useClickOutsideRef} from '../common';\r\nimport {useEffect, useRef} from \"react\";\r\nimport {Size} from \"../types\";\r\n\r\nconst TooltipWrapper = ({\r\n label, children,\r\n withArrow,\r\n tabIndex,\r\n size = Size.Small,\r\n height = 'auto',\r\n delay = undefined,\r\n align = 'center',\r\n position = 'bottom',\r\n trigger = 'hover',\r\n hideAfter = 5000,\r\n ...props\r\n }: TooltipProps) => {\r\n\r\n const [showTooltip, setShowTooltip] = React.useState(false);\r\n const timeoutRef = useRef<any>();\r\n\r\n const ref = useClickOutsideRef(() => setShowTooltip(false));\r\n\r\n const handleClick = (e?: MouseEvent) => {\r\n if (ref?.current?.contains(e?.target as Node)) {\r\n setShowTooltip(true)\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n const handleButtonDown = (e?: KeyboardEvent) => {\r\n if (e?.key === 'Enter' || e?.key === ' ') {\r\n setShowTooltip(true);\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (trigger == 'click') {\r\n document.addEventListener('mousedown', handleClick);\r\n ref?.current?.addEventListener('keydown', handleButtonDown);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', handleClick);\r\n ref?.current?.removeEventListener('keydown', handleButtonDown);\r\n };\r\n }\r\n }, [trigger])\r\n\r\n const cls = `${trigger === 'click' ? showTooltip ? 'show' : 'hide' : ''}`;\r\n return <TooltipContainer ref={ref}\r\n delay={delay}\r\n tabIndex={tabIndex}\r\n triggerType={trigger}\r\n className={cls}>\r\n <Tooltip align={align}\r\n height={height}\r\n role=\"tooltip\"\r\n size={size}\r\n withArrow={withArrow}\r\n position={position}\r\n {...props}>\r\n {label}\r\n </Tooltip>\r\n {children}\r\n </TooltipContainer>;\r\n};\r\n\r\nexport default TooltipWrapper;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAAQC,gBAAgB,EAAEC,OAAO,QAAO,iBAAiB;AACz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W,EAAEZ,WAAW,CAAC;MACnDD,GAAG,aAAHA,GAAG,wBAAAW,aAAA,GAAHX,GAAG,CAAEI,OAAO,cAAAO,aAAA,uBAAZA,aAAA,CAAcE,gBAAgB,CAAC,SAAS,EAAEJ,gBAAgB,CAAC;MAE3D,OAAO,YAAM;QAAA,IAAAK,aAAA;QACXF,QAAQ,CAACG,mBAAmB,CAAC,WAAW,EAAEd,WAAW,CAAC;QACtDD,GAAG,aAAHA,GAAG,wBAAAc,aAAA,GAAHd,GAAG,CAAEI,OAAO,cAAAU,aAAA,uBAAZA,aAAA,CAAcC,mBAAmB,CAAC,SAAS,EAAEN,gBAAgB,CAAC;MAChE,CAAC;IACH;EACF,CAAC,EAAE,CAACtB,OAAO,CAAC,CAAC;EAEb,IAAM6B,GAAG,MAAAC,MAAA,CAAM9B,OAAO,KAAK,OAAO,GAAGU,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,EAAE,CAAE;EACzE,oBAAO9B,KAAA,CAACT,gBAAgB;IAAC0C,GAAG,EAAEA,GAAI;
|
|
1
|
+
{"version":3,"file":"TooltipWrapper.js","names":["React","TooltipContainer","Tooltip","useClickOutsideRef","useEffect","useRef","Size","jsx","_jsx","jsxs","_jsxs","TooltipWrapper","_ref","label","children","withArrow","tabIndex","_ref$size","size","Small","_ref$height","height","_ref$delay","delay","undefined","_ref$align","align","_ref$position","position","_ref$trigger","trigger","_ref$hideAfter","hideAfter","props","_objectWithoutProperties","_excluded","_React$useState","useState","_React$useState2","_slicedToArray","showTooltip","setShowTooltip","timeoutRef","ref","handleClick","e","_ref$current","current","contains","target","clearTimeout","setTimeout","handleButtonDown","key","_ref$current2","document","addEventListener","_ref$current3","removeEventListener","cls","concat","$delay","$triggerType","className","_objectSpread","$align","$height","role","$size","$withArrow","$position"],"sources":["../../src/Tooltips/TooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport {TooltipProps} from './TooltipTypes';\r\n\r\nimport {TooltipContainer, Tooltip} from './TooltipStyles';\r\nimport {useClickOutsideRef} from '../common';\r\nimport {useEffect, useRef} from \"react\";\r\nimport {Size} from \"../types\";\r\n\r\nconst TooltipWrapper = ({\r\n label, children,\r\n withArrow,\r\n tabIndex,\r\n size = Size.Small,\r\n height = 'auto',\r\n delay = undefined,\r\n align = 'center',\r\n position = 'bottom',\r\n trigger = 'hover',\r\n hideAfter = 5000,\r\n ...props\r\n }: TooltipProps) => {\r\n\r\n const [showTooltip, setShowTooltip] = React.useState(false);\r\n const timeoutRef = useRef<any>();\r\n\r\n const ref = useClickOutsideRef(() => setShowTooltip(false));\r\n\r\n const handleClick = (e?: MouseEvent) => {\r\n if (ref?.current?.contains(e?.target as Node)) {\r\n setShowTooltip(true)\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n const handleButtonDown = (e?: KeyboardEvent) => {\r\n if (e?.key === 'Enter' || e?.key === ' ') {\r\n setShowTooltip(true);\r\n timeoutRef.current && clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setShowTooltip(false), hideAfter);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (trigger == 'click') {\r\n document.addEventListener('mousedown', handleClick);\r\n ref?.current?.addEventListener('keydown', handleButtonDown);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', handleClick);\r\n ref?.current?.removeEventListener('keydown', handleButtonDown);\r\n };\r\n }\r\n }, [trigger])\r\n\r\n const cls = `${trigger === 'click' ? showTooltip ? 'show' : 'hide' : ''}`;\r\n return <TooltipContainer ref={ref}\r\n $delay={delay}\r\n tabIndex={tabIndex}\r\n $triggerType={trigger}\r\n className={cls}>\r\n <Tooltip $align={align}\r\n $height={height}\r\n role=\"tooltip\"\r\n $size={size}\r\n $withArrow={withArrow}\r\n $position={position}\r\n {...props}>\r\n {label}\r\n </Tooltip>\r\n {children}\r\n </TooltipContainer>;\r\n};\r\n\r\nexport default TooltipWrapper;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@@ -18,12 +18,12 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
19
19
|
var TypographyBase = (0, _styledComponents["default"])('div')(function (_ref) {
|
|
20
20
|
var $color = _ref.$color,
|
|
21
|
-
lineHeight = _ref
|
|
21
|
+
lineHeight = _ref.$lineHeight,
|
|
22
22
|
$fontSize = _ref.$fontSize,
|
|
23
23
|
$fontWeight = _ref.$fontWeight,
|
|
24
24
|
$fontStyle = _ref.$fontStyle,
|
|
25
|
-
textTransform = _ref
|
|
26
|
-
textDecorationLine = _ref
|
|
25
|
+
textTransform = _ref.$textTransform,
|
|
26
|
+
textDecorationLine = _ref.$textDecorationLine;
|
|
27
27
|
return {
|
|
28
28
|
fontSize: $fontSize,
|
|
29
29
|
fontWeight: $fontWeight,
|
|
@@ -77,7 +77,7 @@ var ComponentXL = function ComponentXL(_ref2) {
|
|
|
77
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
78
78
|
className: className,
|
|
79
79
|
$color: color,
|
|
80
|
-
lineHeight: 28,
|
|
80
|
+
$lineHeight: 28,
|
|
81
81
|
$fontSize: 24,
|
|
82
82
|
$fontWeight: fontWeight,
|
|
83
83
|
$fontStyle: fontStyle,
|
|
@@ -105,7 +105,7 @@ var ComponentL = function ComponentL(_ref3) {
|
|
|
105
105
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
106
106
|
className: className,
|
|
107
107
|
$color: color,
|
|
108
|
-
lineHeight: 24,
|
|
108
|
+
$lineHeight: 24,
|
|
109
109
|
$fontSize: 20,
|
|
110
110
|
$fontWeight: fontWeight,
|
|
111
111
|
$fontStyle: fontStyle,
|
|
@@ -133,7 +133,7 @@ var ComponentM = function ComponentM(_ref4) {
|
|
|
133
133
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
134
134
|
className: className,
|
|
135
135
|
$color: color,
|
|
136
|
-
lineHeight: 24,
|
|
136
|
+
$lineHeight: 24,
|
|
137
137
|
$fontSize: 18,
|
|
138
138
|
$fontWeight: fontWeight,
|
|
139
139
|
$fontStyle: fontStyle,
|
|
@@ -161,7 +161,7 @@ var ComponentS = function ComponentS(_ref5) {
|
|
|
161
161
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
162
162
|
className: className,
|
|
163
163
|
$color: color,
|
|
164
|
-
lineHeight: 20,
|
|
164
|
+
$lineHeight: 20,
|
|
165
165
|
$fontSize: 16,
|
|
166
166
|
$fontWeight: fontWeight,
|
|
167
167
|
$fontStyle: fontStyle,
|
|
@@ -190,11 +190,11 @@ var ComponentXS = function ComponentXS(_ref6) {
|
|
|
190
190
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
191
191
|
className: className,
|
|
192
192
|
$color: color,
|
|
193
|
-
lineHeight: 16,
|
|
193
|
+
$lineHeight: 16,
|
|
194
194
|
$fontSize: 14,
|
|
195
195
|
$fontWeight: fontWeight,
|
|
196
196
|
$fontStyle: fontStyle,
|
|
197
|
-
textTransform: textTransform,
|
|
197
|
+
$textTransform: textTransform,
|
|
198
198
|
children: children
|
|
199
199
|
});
|
|
200
200
|
};
|
|
@@ -220,11 +220,11 @@ var ComponentXXS = function ComponentXXS(_ref7) {
|
|
|
220
220
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
|
|
221
221
|
className: className,
|
|
222
222
|
$color: color,
|
|
223
|
-
lineHeight: 16,
|
|
223
|
+
$lineHeight: 16,
|
|
224
224
|
$fontSize: 12,
|
|
225
225
|
$fontWeight: fontWeight,
|
|
226
226
|
$fontStyle: fontStyle,
|
|
227
|
-
textTransform: textTransform,
|
|
227
|
+
$textTransform: textTransform,
|
|
228
228
|
children: children
|
|
229
229
|
});
|
|
230
230
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_interopRequireWildcard","_","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TypographyBase","styled","_ref","$color","lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","textDecorationLine","fontSize","fontWeight","fontStyle","color","COLORS","black","exports","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","css","_taggedTemplateLiteral2","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","jsx","propTypes","_propTypes","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","ComponentMStyling","ComponentM","_ref4","ComponentSStyling","ComponentS","_ref5","ComponentXSStyling","ComponentXS","_ref6","ComponentXXSStyling","ComponentXXS","_ref7","ComponentResponsive","_ref8","size","width","fontsize","Size","Medium","Small","Large","XXSmall","XSmall","Typography","QuoteTypography","NoteTypography","UpperCaseTypography","Note","p","Quote","UpperCase"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\ninterface ITypographyBase {\r\n $color?: string;\r\n lineHeight: number;\r\n $fontSize: number;\r\n $fontWeight: number;\r\n $fontStyle?: string;\r\n textTransform?: Property.TextTransform;\r\n textDecorationLine?: Property.TextDecorationLine;\r\n}\r\n\r\nexport const TypographyBase = styled('div')<ITypographyBase>(({\r\n $color,\r\n lineHeight,\r\n $fontSize,\r\n $fontWeight,\r\n $fontStyle,\r\n textTransform,\r\n textDecorationLine\r\n }) => ({\r\n fontSize: $fontSize,\r\n fontWeight: $fontWeight,\r\n lineHeight: lineHeight + 'px',\r\n textTransform: textTransform ? textTransform : 'none',\r\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\r\n fontStyle: $fontStyle ? $fontStyle : 'normal',\r\n color: $color ? $color : COLORS.black,\r\n}));\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,CAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA8B,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAA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5B;AAACX,OAAA,CAAAqD,UAAA,GAAAA,UAAA;AAEK,IAAMC,eAAe,OAAG5C,qBAAG,EAAApD,gBAAA,KAAAA,gBAAA,OAAAqD,uBAAA,6FAIjC;AAACX,OAAA,CAAAsD,eAAA,GAAAA,eAAA;AAEK,IAAMC,cAAc,OAAG7C,qBAAG,EAAAnD,gBAAA,KAAAA,gBAAA,OAAAoD,uBAAA,+FAIhC;AAACX,OAAA,CAAAuD,cAAA,GAAAA,cAAA;AAEK,IAAMC,mBAAmB,OAAG9C,qBAAG,EAAAlD,gBAAA,KAAAA,gBAAA,OAAAmD,uBAAA,sHAKrC;AAACX,OAAA,CAAAwD,mBAAA,GAAAA,mBAAA;AAEK,IAAMC,IAAI,GAAGxE,4BAAM,CAACyE,CAAC,CAAAjG,gBAAA,KAAAA,gBAAA,OAAAkD,uBAAA,+BACxB4C,cAAc,CACjB;AAACvD,OAAA,CAAAyD,IAAA,GAAAA,IAAA;AAEK,IAAME,KAAK,GAAG1E,4BAAM,CAACyE,CAAC,CAAAhG,gBAAA,KAAAA,gBAAA,OAAAiD,uBAAA,+BACzB2C,eAAe,CAClB;AAACtD,OAAA,CAAA2D,KAAA,GAAAA,KAAA;AAEK,IAAMC,SAAS,GAAG3E,4BAAM,CAACyE,CAAC,CAAA/F,gBAAA,KAAAA,gBAAA,OAAAgD,uBAAA,+BAC7B6C,mBAAmB,CACtB;AAACxD,OAAA,CAAA4D,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"typography.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_interopRequireWildcard","_","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TypographyBase","styled","_ref","$color","lineHeight","$lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","$textTransform","textDecorationLine","$textDecorationLine","fontSize","fontWeight","fontStyle","color","COLORS","black","exports","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","css","_taggedTemplateLiteral2","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","jsx","propTypes","_propTypes","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","ComponentMStyling","ComponentM","_ref4","ComponentSStyling","ComponentS","_ref5","ComponentXSStyling","ComponentXS","_ref6","ComponentXXSStyling","ComponentXXS","_ref7","ComponentResponsive","_ref8","size","width","fontsize","Size","Medium","Small","Large","XXSmall","XSmall","Typography","QuoteTypography","NoteTypography","UpperCaseTypography","Note","p","Quote","UpperCase"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\ninterface ITypographyBase {\r\n $color?: string;\r\n $lineHeight: number;\r\n $fontSize: number;\r\n $fontWeight: number;\r\n $fontStyle?: string;\r\n $textTransform?: Property.TextTransform;\r\n $textDecorationLine?: Property.TextDecorationLine;\r\n}\r\n\r\nexport const TypographyBase = styled('div')<ITypographyBase>(({\r\n $color,\r\n $lineHeight: lineHeight,\r\n $fontSize,\r\n $fontWeight,\r\n $fontStyle,\r\n $textTransform: textTransform,\r\n $textDecorationLine: textDecorationLine\r\n }) => ({\r\n fontSize: $fontSize,\r\n fontWeight: $fontWeight,\r\n lineHeight: lineHeight + 'px',\r\n textTransform: textTransform ? textTransform : 'none',\r\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\r\n fontStyle: $fontStyle ? $fontStyle : 'normal',\r\n color: $color ? $color : COLORS.black,\r\n}));\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAA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AA,OAAAqD,uBAAA,+BACxB4C,cAAc,CACjB;AAACvD,OAAA,CAAAyD,IAAA,GAAAA,IAAA;AAEK,IAAME,KAAK,GAAG7E,4BAAM,CAAC4E,CAAC,CAAAnG,gBAAA,KAAAA,gBAAA,OAAAoD,uBAAA,+BACzB2C,eAAe,CAClB;AAACtD,OAAA,CAAA2D,KAAA,GAAAA,KAAA;AAEK,IAAMC,SAAS,GAAG9E,4BAAM,CAAC4E,CAAC,CAAAlG,gBAAA,KAAAA,gBAAA,OAAAmD,uBAAA,+BAC7B6C,mBAAmB,CACtB;AAACxD,OAAA,CAAA4D,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -3,12 +3,12 @@ import { Property } from 'csstype';
|
|
|
3
3
|
import { Size } from '../types';
|
|
4
4
|
interface ITypographyBase {
|
|
5
5
|
$color?: string;
|
|
6
|
-
lineHeight: number;
|
|
6
|
+
$lineHeight: number;
|
|
7
7
|
$fontSize: number;
|
|
8
8
|
$fontWeight: number;
|
|
9
9
|
$fontStyle?: string;
|
|
10
|
-
textTransform?: Property.TextTransform;
|
|
11
|
-
textDecorationLine?: Property.TextDecorationLine;
|
|
10
|
+
$textTransform?: Property.TextTransform;
|
|
11
|
+
$textDecorationLine?: Property.TextDecorationLine;
|
|
12
12
|
}
|
|
13
13
|
export declare const TypographyBase: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
14
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
@@ -8,12 +8,12 @@ import { Size } from '../types';
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export var TypographyBase = styled('div')(function (_ref) {
|
|
10
10
|
var $color = _ref.$color,
|
|
11
|
-
lineHeight = _ref
|
|
11
|
+
lineHeight = _ref.$lineHeight,
|
|
12
12
|
$fontSize = _ref.$fontSize,
|
|
13
13
|
$fontWeight = _ref.$fontWeight,
|
|
14
14
|
$fontStyle = _ref.$fontStyle,
|
|
15
|
-
textTransform = _ref
|
|
16
|
-
textDecorationLine = _ref
|
|
15
|
+
textTransform = _ref.$textTransform,
|
|
16
|
+
textDecorationLine = _ref.$textDecorationLine;
|
|
17
17
|
return {
|
|
18
18
|
fontSize: $fontSize,
|
|
19
19
|
fontWeight: $fontWeight,
|
|
@@ -64,7 +64,7 @@ var ComponentXL = function ComponentXL(_ref2) {
|
|
|
64
64
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
65
65
|
className: className,
|
|
66
66
|
$color: color,
|
|
67
|
-
lineHeight: 28,
|
|
67
|
+
$lineHeight: 28,
|
|
68
68
|
$fontSize: 24,
|
|
69
69
|
$fontWeight: fontWeight,
|
|
70
70
|
$fontStyle: fontStyle,
|
|
@@ -90,7 +90,7 @@ var ComponentL = function ComponentL(_ref3) {
|
|
|
90
90
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
91
91
|
className: className,
|
|
92
92
|
$color: color,
|
|
93
|
-
lineHeight: 24,
|
|
93
|
+
$lineHeight: 24,
|
|
94
94
|
$fontSize: 20,
|
|
95
95
|
$fontWeight: fontWeight,
|
|
96
96
|
$fontStyle: fontStyle,
|
|
@@ -116,7 +116,7 @@ var ComponentM = function ComponentM(_ref4) {
|
|
|
116
116
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
117
117
|
className: className,
|
|
118
118
|
$color: color,
|
|
119
|
-
lineHeight: 24,
|
|
119
|
+
$lineHeight: 24,
|
|
120
120
|
$fontSize: 18,
|
|
121
121
|
$fontWeight: fontWeight,
|
|
122
122
|
$fontStyle: fontStyle,
|
|
@@ -142,7 +142,7 @@ var ComponentS = function ComponentS(_ref5) {
|
|
|
142
142
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
143
143
|
className: className,
|
|
144
144
|
$color: color,
|
|
145
|
-
lineHeight: 20,
|
|
145
|
+
$lineHeight: 20,
|
|
146
146
|
$fontSize: 16,
|
|
147
147
|
$fontWeight: fontWeight,
|
|
148
148
|
$fontStyle: fontStyle,
|
|
@@ -169,11 +169,11 @@ var ComponentXS = function ComponentXS(_ref6) {
|
|
|
169
169
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
170
170
|
className: className,
|
|
171
171
|
$color: color,
|
|
172
|
-
lineHeight: 16,
|
|
172
|
+
$lineHeight: 16,
|
|
173
173
|
$fontSize: 14,
|
|
174
174
|
$fontWeight: fontWeight,
|
|
175
175
|
$fontStyle: fontStyle,
|
|
176
|
-
textTransform: textTransform,
|
|
176
|
+
$textTransform: textTransform,
|
|
177
177
|
children: children
|
|
178
178
|
});
|
|
179
179
|
};
|
|
@@ -197,11 +197,11 @@ var ComponentXXS = function ComponentXXS(_ref7) {
|
|
|
197
197
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
198
198
|
className: className,
|
|
199
199
|
$color: color,
|
|
200
|
-
lineHeight: 16,
|
|
200
|
+
$lineHeight: 16,
|
|
201
201
|
$fontSize: 12,
|
|
202
202
|
$fontWeight: fontWeight,
|
|
203
203
|
$fontStyle: fontStyle,
|
|
204
|
-
textTransform: textTransform,
|
|
204
|
+
$textTransform: textTransform,
|
|
205
205
|
children: children
|
|
206
206
|
});
|
|
207
207
|
};
|