@laerdal/life-react-components 5.0.0-dev.1 → 5.0.0-dev.2
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/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/package.json +1 -2
package/dist/Popover/Popover.cjs
CHANGED
|
@@ -21,69 +21,69 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
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; }
|
|
23
23
|
var PopoverContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n //height: ", ";\n min-width: ", ";\n border-radius: 4px;\n background: ", ";\n cursor: default;\n box-shadow: ", ";\n\n position: absolute; \n visibility: hidden;\n opacity: 0;\n z-index: ", ";\n\n ", "\n ", "\n\n ", "\n ", "\n\n &::after {\n ", "\n"])), function (props) {
|
|
24
|
-
return props
|
|
24
|
+
return props.$size === _types.Size.Small ? '240px' : props.$size === _types.Size.Large ? '480px' : '360px';
|
|
25
25
|
}, function (props) {
|
|
26
|
-
return props
|
|
26
|
+
return props.$size === _types.Size.Small ? '320px' : props.$size === _types.Size.Large ? '640px' : '480px';
|
|
27
27
|
}, function (props) {
|
|
28
28
|
return _.COLORS.getColor('white', props.theme);
|
|
29
29
|
}, _styles.BOXSHADOWS.BOXSHADOW_CENTERED, _styles.Z_INDEXES.popover, function (props) {
|
|
30
|
-
return props
|
|
30
|
+
return props.$position == _types.Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '';
|
|
31
31
|
}, function (props) {
|
|
32
|
-
return props
|
|
32
|
+
return props.$position == _types.Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '';
|
|
33
33
|
}, function (props) {
|
|
34
|
-
return props
|
|
34
|
+
return props.$position == _types.Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '';
|
|
35
35
|
}, function (props) {
|
|
36
|
-
return props
|
|
36
|
+
return props.$position == _types.Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '';
|
|
37
37
|
}, function (props) {
|
|
38
|
-
return props
|
|
38
|
+
return props.$showArrowPointer ? renderArrowStyles(props.$position) : '';
|
|
39
39
|
});
|
|
40
40
|
exports.PopoverContainer = PopoverContainer;
|
|
41
41
|
var PopoverTopSectionContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n display: flex;\n"])), function (props) {
|
|
42
|
-
return props
|
|
42
|
+
return props.$size === _types.Size.Small ? '56px' : props.$size === _types.Size.Large ? '72px' : '64px';
|
|
43
43
|
});
|
|
44
44
|
exports.PopoverTopSectionContainer = PopoverTopSectionContainer;
|
|
45
45
|
var PopoverMiddleSectionContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 8px;\n height: ", ";\n padding: ", ";\n overflow-y: auto;\n ", "\n"])), function (props) {
|
|
46
|
-
return props
|
|
46
|
+
return props.$size === _types.Size.Small ? '104px' : props.$size === _types.Size.Large ? '304px' : '208px';
|
|
47
47
|
}, function (props) {
|
|
48
|
-
return props
|
|
48
|
+
return props.$size === _types.Size.Small ? '0 8px' : props.$size === _types.Size.Large ? '0 16px' : '0 12px';
|
|
49
49
|
}, (0, _styles.scrollBarStyling)(_types.Size.Small));
|
|
50
50
|
exports.PopoverMiddleSectionContainer = PopoverMiddleSectionContainer;
|
|
51
51
|
var PopoverBottomSectionContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", "; \n display: flex;\n\n .bottom-flex {\n flex: 1;\n }\n"])), function (props) {
|
|
52
|
-
return props
|
|
52
|
+
return props.$size === _types.Size.Small ? '64px' : props.$size === _types.Size.Large ? '88px' : '72px';
|
|
53
53
|
});
|
|
54
54
|
exports.PopoverBottomSectionContainer = PopoverBottomSectionContainer;
|
|
55
55
|
var TextContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n flex-grow: 1;\n"])), function (props) {
|
|
56
|
-
return renderMargins(props
|
|
56
|
+
return renderMargins(props.$note, props.$size);
|
|
57
57
|
});
|
|
58
58
|
var NoteContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (props) {
|
|
59
|
-
return props
|
|
59
|
+
return props.$size === _types.Size.Small ? (0, _styles.ComponentXXSStyling)(_.ComponentTextStyle.Regular, _.COLORS.getColor('neutral_600', props.theme)) : props.$size === _types.Size.Large ? (0, _styles.ComponentSStyling)(_.ComponentTextStyle.Regular, _.COLORS.getColor('neutral_600', props.theme)) : (0, _.ComponentXSStyling)(_.ComponentTextStyle.Regular, _.COLORS.getColor('neutral_600', props.theme));
|
|
60
60
|
});
|
|
61
61
|
var LabelContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (props) {
|
|
62
|
-
return props
|
|
62
|
+
return props.$size === _types.Size.Small ? (0, _styles.ComponentSStyling)(_.ComponentTextStyle.Bold, null) : props.$size === _types.Size.Large ? (0, _styles.ComponentLStyling)(_.ComponentTextStyle.Bold, null) : (0, _styles.ComponentMStyling)(_.ComponentTextStyle.Bold, null);
|
|
63
63
|
});
|
|
64
64
|
var CloseButtonContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n"])), function (props) {
|
|
65
|
-
return props
|
|
65
|
+
return props.$size === _types.Size.Small ? '4px 16px 4px 0' : props.$size === _types.Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0';
|
|
66
66
|
});
|
|
67
67
|
var TextButtonContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n"])), function (props) {
|
|
68
|
-
return props
|
|
68
|
+
return props.$size === _types.Size.Small ? '8px 0 8px 16px' : props.$size === _types.Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px';
|
|
69
69
|
});
|
|
70
70
|
var IconButtonContainer = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n display: flex;\n"])), function (props) {
|
|
71
|
-
return props
|
|
71
|
+
return props.$size === _types.Size.Small ? '8px 16px 8px 0' : props.$size === _types.Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0';
|
|
72
72
|
});
|
|
73
73
|
var PopoverWrapper = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n\n .pointer-space {\n height: ", ";\n width: ", ";\n position: absolute;\n\n ", ";\n ", ";\n\n ", ";\n ", ";\n }\n\n ", "\n"])), function (props) {
|
|
74
|
-
return props
|
|
74
|
+
return props.$position === _types.Position.Top || props.$position === _types.Position.Bottom ? '16px' : '100%';
|
|
75
75
|
}, function (props) {
|
|
76
|
-
return props
|
|
76
|
+
return props.$position === _types.Position.Left || props.$position === _types.Position.Right ? '16px' : '100%';
|
|
77
77
|
}, function (props) {
|
|
78
|
-
return props
|
|
78
|
+
return props.$position === _types.Position.Left ? 'right:100%; bottom: 0%' : '';
|
|
79
79
|
}, function (props) {
|
|
80
|
-
return props
|
|
80
|
+
return props.$position === _types.Position.Right ? 'left:100%; bottom: 0%' : '';
|
|
81
81
|
}, function (props) {
|
|
82
|
-
return props
|
|
82
|
+
return props.$position === _types.Position.Top ? 'bottom: 100%' : '';
|
|
83
83
|
}, function (props) {
|
|
84
|
-
return props
|
|
84
|
+
return props.$position === _types.Position.Bottom ? 'top: 100%' : '';
|
|
85
85
|
}, function (props) {
|
|
86
|
-
return props
|
|
86
|
+
return props.$showOnClick ? "".concat(PopoverContainer, " {\n visibility: ").concat(props.$showPopover ? 'visible' : 'hidden', ";\n opacity: ").concat(props.$showPopover ? '1' : '0', ";\n }\n cursor: pointer;") : "&:hover {\n ".concat(PopoverContainer, " {\n visibility: visible;\n opacity: 1;\n }\n }");
|
|
87
87
|
});
|
|
88
88
|
exports.PopoverWrapper = PopoverWrapper;
|
|
89
89
|
var renderMargins = function renderMargins(isNotePresent, size) {
|
|
@@ -142,28 +142,28 @@ var Popover = function Popover(_ref) {
|
|
|
142
142
|
};
|
|
143
143
|
}, [showPopover]);
|
|
144
144
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(PopoverWrapper, {
|
|
145
|
-
position: position,
|
|
146
|
-
showOnClick: showOnClick,
|
|
147
|
-
showPopover: showPopover,
|
|
145
|
+
$position: position,
|
|
146
|
+
$showOnClick: showOnClick,
|
|
147
|
+
$showPopover: showPopover,
|
|
148
148
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(PopoverContainer, {
|
|
149
|
-
size: size,
|
|
150
|
-
position: position,
|
|
149
|
+
$size: size,
|
|
150
|
+
$position: position,
|
|
151
151
|
ref: popoverRef,
|
|
152
|
-
showArrowPointer: showArrowPointer,
|
|
152
|
+
$showArrowPointer: showArrowPointer,
|
|
153
153
|
children: [!!topSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsxs)(PopoverTopSectionContainer, {
|
|
154
|
-
size: size,
|
|
154
|
+
$size: size,
|
|
155
155
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TextContainer, {
|
|
156
|
-
note: !!(topSectionProps !== null && topSectionProps !== void 0 && topSectionProps.note),
|
|
157
|
-
size: size,
|
|
156
|
+
$note: !!(topSectionProps !== null && topSectionProps !== void 0 && topSectionProps.note),
|
|
157
|
+
$size: size,
|
|
158
158
|
children: [(topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.note) && /*#__PURE__*/(0, _jsxRuntime.jsx)(NoteContainer, {
|
|
159
|
-
size: size,
|
|
159
|
+
$size: size,
|
|
160
160
|
children: topSectionProps.note
|
|
161
161
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(LabelContainer, {
|
|
162
|
-
size: size,
|
|
162
|
+
$size: size,
|
|
163
163
|
children: topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.text
|
|
164
164
|
})]
|
|
165
165
|
}), showOnClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(CloseButtonContainer, {
|
|
166
|
-
size: size,
|
|
166
|
+
$size: size,
|
|
167
167
|
"data-testid": 'closeBtn',
|
|
168
168
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
|
|
169
169
|
action: function action() {
|
|
@@ -177,12 +177,12 @@ var Popover = function Popover(_ref) {
|
|
|
177
177
|
})
|
|
178
178
|
})]
|
|
179
179
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverMiddleSectionContainer, {
|
|
180
|
-
size: size,
|
|
180
|
+
$size: size,
|
|
181
181
|
children: mainContent
|
|
182
182
|
}), !!bottomSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsxs)(PopoverBottomSectionContainer, {
|
|
183
|
-
size: size,
|
|
183
|
+
$size: size,
|
|
184
184
|
children: [!!(bottomSectionProps !== null && bottomSectionProps !== void 0 && (_bottomSectionProps$t = bottomSectionProps.textButton) !== null && _bottomSectionProps$t !== void 0 && _bottomSectionProps$t.icon) && /*#__PURE__*/(0, _jsxRuntime.jsx)(TextButtonContainer, {
|
|
185
|
-
size: size,
|
|
185
|
+
$size: size,
|
|
186
186
|
"data-testid": 'textBtn',
|
|
187
187
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
188
188
|
size: size,
|
|
@@ -194,7 +194,7 @@ var Popover = function Popover(_ref) {
|
|
|
194
194
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
195
195
|
className: "bottom-flex"
|
|
196
196
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonContainer, {
|
|
197
|
-
size: size,
|
|
197
|
+
$size: size,
|
|
198
198
|
"data-testid": 'iconBtn',
|
|
199
199
|
children: bottomSectionProps === null || bottomSectionProps === void 0 ? void 0 : (_bottomSectionProps$i = bottomSectionProps.iconButtons) === null || _bottomSectionProps$i === void 0 ? void 0 : _bottomSectionProps$i.map(function (iconButton) {
|
|
200
200
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_","_Button","_icons","_styles","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PopoverContainer","styled","div","_taggedTemplateLiteral2","props","size","Size","Small","Large","COLORS","getColor","theme","BOXSHADOWS","BOXSHADOW_CENTERED","Z_INDEXES","popover","position","Position","Bottom","Top","Left","Right","showArrowPointer","renderArrowStyles","exports","PopoverTopSectionContainer","PopoverMiddleSectionContainer","scrollBarStyling","PopoverBottomSectionContainer","TextContainer","renderMargins","note","NoteContainer","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentSStyling","ComponentXSStyling","LabelContainer","Bold","ComponentLStyling","ComponentMStyling","CloseButtonContainer","TextButtonContainer","IconButtonContainer","PopoverWrapper","showOnClick","concat","showPopover","isNotePresent","Popover","_ref","_bottomSectionProps$t","_bottomSectionProps$i","_ref$size","Medium","topSectionProps","bottomSectionProps","mainContent","children","_ref$showOnClick","_ref$showArrowPointer","_React$useState","useState","_React$useState2","_slicedToArray2","setShowPopover","useTheme","popoverRef","useRef","useEffect","checkIfClickedOutside","current","contains","target","document","addEventListener","removeEventListener","jsxs","ref","jsx","text","IconButton","action","useTransparentBackground","iconColor","variant","shape","SystemIcons","Close","textButton","icon","Button","onClick","label","className","iconButtons","map","iconButton","propTypes","_propTypes","string","isRequired","arrayOf","node","func","bool","_default"],"sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\nimport { Button, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';\r\nimport { Position, Size } from '../types';\r\n\r\nexport const PopoverContainer = styled.div<{ size: Size; position: Position; showArrowPointer: boolean }>`\r\n //height: ${(props) => (props.size === Size.Small ? '240px' : props.size === Size.Large ? '480px' : '360px')};\r\n min-width: ${(props) => (props.size === Size.Small ? '320px' : props.size === Size.Large ? '640px' : '480px')};\r\n border-radius: 4px;\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n cursor: default;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n\r\n position: absolute; \r\n visibility: hidden;\r\n opacity: 0;\r\n z-index: ${Z_INDEXES.popover};\r\n\r\n ${(props) => (props.position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n ${(props) => (props.position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n\r\n ${(props) => (props.position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n ${(props) => (props.position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n\r\n &::after {\r\n ${(props) => (props.showArrowPointer ? renderArrowStyles(props.position) : '')}\r\n`;\r\n\r\nexport const PopoverTopSectionContainer = styled.div<{ size: Size }>`\r\n height: ${(props) => (props.size === Size.Small ? '56px' : props.size === Size.Large ? '72px' : '64px')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverMiddleSectionContainer = styled.div<{ size: Size }>`\r\n margin: 8px;\r\n height: ${(props) => (props.size === Size.Small ? '104px' : props.size === Size.Large ? '304px' : '208px')};\r\n padding: ${(props) => (props.size === Size.Small ? '0 8px' : props.size === Size.Large ? '0 16px' : '0 12px')};\r\n overflow-y: auto;\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nexport const PopoverBottomSectionContainer = styled.div<{ size: Size }>`\r\n height: ${(props) => (props.size === Size.Small ? '64px' : props.size === Size.Large ? '88px' : '72px')}; \r\n display: flex;\r\n\r\n .bottom-flex {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{ note: boolean; size: Size }>`\r\n display: flex;\r\n flex-direction: column;\r\n margin: ${(props) => renderMargins(props.note, props.size)};\r\n flex-grow: 1;\r\n`;\r\n\r\nconst NoteContainer = styled.div<{ size: Size }>`\r\n ${(props) =>\r\n props.size === Size.Small\r\n ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))\r\n : props.size === Size.Large\r\n ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))\r\n : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nconst LabelContainer = styled.div<{ size: Size }>`\r\n ${(props) =>\r\n props.size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, null)\r\n : props.size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, null)\r\n : ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\nconst CloseButtonContainer = styled.div<{ size: Size }>`\r\n margin: ${(props) => (props.size === Size.Small ? '4px 16px 4px 0' : props.size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0')};\r\n`;\r\n\r\nconst TextButtonContainer = styled.div<{ size: Size }>`\r\n margin: ${(props) => (props.size === Size.Small ? '8px 0 8px 16px' : props.size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px')};\r\n`;\r\n\r\nconst IconButtonContainer = styled.div<{ size: Size }>`\r\n margin: ${(props) => (props.size === Size.Small ? '8px 16px 8px 0' : props.size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverWrapper = styled.div<{ position: Position; showOnClick: boolean; showPopover: boolean }>`\r\n position: relative;\r\n\r\n .pointer-space {\r\n height: ${(props) => (props.position === Position.Top || props.position === Position.Bottom ? '16px' : '100%')};\r\n width: ${(props) => (props.position === Position.Left || props.position === Position.Right ? '16px' : '100%')};\r\n position: absolute;\r\n\r\n ${(props) => (props.position === Position.Left ? 'right:100%; bottom: 0%' : '')};\r\n ${(props) => (props.position === Position.Right ? 'left:100%; bottom: 0%' : '')};\r\n\r\n ${(props) => (props.position === Position.Top ? 'bottom: 100%' : '')};\r\n ${(props) => (props.position === Position.Bottom ? 'top: 100%' : '')};\r\n }\r\n\r\n ${(props) =>\r\n props.showOnClick\r\n ? `${PopoverContainer} {\r\n visibility: ${props.showPopover ? 'visible' : 'hidden'};\r\n opacity: ${props.showPopover ? '1' : '0'};\r\n }\r\n cursor: pointer;`\r\n : `&:hover {\r\n ${PopoverContainer} {\r\n visibility: visible;\r\n opacity: 1;\r\n }\r\n }`}\r\n`;\r\n\r\nconst renderMargins = (isNotePresent: boolean, size: Size): string => {\r\n if (isNotePresent) {\r\n return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';\r\n } else {\r\n return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';\r\n }\r\n};\r\n\r\nconst renderArrowStyles = (position: Position) => {\r\n if (position === Position.Bottom) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid rgb(255,255,255);\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n bottom: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Top) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid rgb(255,255,255);\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid transparent;\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n top: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Left) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid transparent;\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid rgb(255,255,255);\r\n content: \"\";\r\n position: absolute;\r\n left: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n\r\n if (position === Position.Right) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid rgb(255,255,255);\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n};\r\n\r\nexport interface PopoverTopSectionProps {\r\n /**\r\n * Required. The main text to be displayed in the top section of the popover.\r\n */\r\n text: string;\r\n\r\n /**\r\n * Optional. A note to be displayed below the main text in the top section of the popover.\r\n */\r\n note?: string;\r\n};\r\n\r\nexport interface PopoverActionButtonProps {\r\n /**\r\n * Required. The icon to be displayed on the button.\r\n */\r\n icon: React.ReactNode;\r\n\r\n /**\r\n * Required. The handler function to be called when the button is clicked.\r\n */\r\n action: () => void;\r\n\r\n /**\r\n * Optional. The label for the button. If provided, the button will display this text.\r\n */\r\n label?: string;\r\n};\r\n\r\nexport interface PopoverBottomSectionProps {\r\n /**\r\n * Optional. An array of PopoverActionButtonProps objects.\r\n * Each object represents an icon button to be displayed in the bottom section of the popover.\r\n */\r\n iconButtons?: PopoverActionButtonProps[];\r\n\r\n /**\r\n * Optional. A PopoverActionButtonProps object representing a text button to be displayed in the bottom section of the popover.\r\n */\r\n textButton?: PopoverActionButtonProps;\r\n};\r\n\r\nexport interface PopoverProps {\r\n /**\r\n * Optional. The size of the popover. It can be 'Small', 'Medium', or 'Large'.\r\n * Defaults to 'Medium' if not specified.\r\n */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n\r\n /**\r\n * Optional. Properties for the top section of the popover.\r\n */\r\n topSectionProps?: PopoverTopSectionProps;\r\n\r\n /**\r\n * Optional. Properties for the bottom section of the popover.\r\n */\r\n bottomSectionProps?: PopoverBottomSectionProps;\r\n\r\n /**\r\n * Required. The main content to be displayed in the popover.\r\n */\r\n mainContent: React.ReactNode;\r\n\r\n /**\r\n * Required. The children to be rendered inside the popover.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * Required. The position of the popover relative to the target element.\r\n * It can be 'Top', 'Bottom', 'Right', or 'Left'.\r\n */\r\n position: Position.Top | Position.Bottom | Position.Right | Position.Left;\r\n\r\n /**\r\n * Required. A boolean indicating whether the popover should be shown when the target element is clicked. Defaults to 'false', meaning that popover will be shown on mouse hover.\r\n */\r\n showOnClick: boolean;\r\n\r\n /**\r\n * Optional. A boolean indicating whether an arrow pointer should be shown on the popover.\r\n * Defaults to 'false' if not specified.\r\n */\r\n showArrowPointer?: boolean;\r\n};\r\n\r\nconst Popover: React.FunctionComponent<PopoverProps> = ({\r\n size = Size.Medium,\r\n topSectionProps,\r\n bottomSectionProps,\r\n mainContent,\r\n children,\r\n position,\r\n showOnClick = false,\r\n showArrowPointer = false,\r\n}) => {\r\n const [showPopover, setShowPopover] = React.useState(false);\r\n const theme = useTheme();\r\n const popoverRef = React.useRef<any>();\r\n\r\n React.useEffect(() => {\r\n const checkIfClickedOutside = (e: { target: any }) => {\r\n if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {\r\n setShowPopover(false);\r\n }\r\n };\r\n\r\n document.addEventListener('mousedown', checkIfClickedOutside);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', checkIfClickedOutside);\r\n };\r\n }, [showPopover]);\r\n\r\n return (\r\n <PopoverWrapper position={position} showOnClick={showOnClick} showPopover={showPopover}>\r\n <PopoverContainer size={size} position={position} ref={popoverRef} showArrowPointer={showArrowPointer}>\r\n {!!topSectionProps && (\r\n <PopoverTopSectionContainer size={size}>\r\n <TextContainer note={!!topSectionProps?.note} size={size}>\r\n {topSectionProps?.note && <NoteContainer size={size}>{topSectionProps.note}</NoteContainer>}\r\n <LabelContainer size={size}>{topSectionProps?.text}</LabelContainer>\r\n </TextContainer>\r\n\r\n {showOnClick && (\r\n <CloseButtonContainer size={size} data-testid={'closeBtn'}>\r\n <IconButton action={() => setShowPopover(false)} useTransparentBackground iconColor={COLORS.getColor('neutral_600', theme)} variant=\"secondary\" shape=\"circular\">\r\n <SystemIcons.Close />\r\n </IconButton>\r\n </CloseButtonContainer>\r\n )}\r\n </PopoverTopSectionContainer>\r\n )}\r\n\r\n <PopoverMiddleSectionContainer size={size}>{mainContent}</PopoverMiddleSectionContainer>\r\n\r\n {!!bottomSectionProps && (\r\n <PopoverBottomSectionContainer size={size}>\r\n {!!bottomSectionProps?.textButton?.icon && (\r\n <TextButtonContainer size={size} data-testid={'textBtn'}>\r\n <Button size={size} variant=\"secondary\" icon={bottomSectionProps.textButton.icon} onClick={bottomSectionProps.textButton.action}>\r\n {bottomSectionProps.textButton.label}\r\n </Button>\r\n </TextButtonContainer>\r\n )}\r\n\r\n <div className=\"bottom-flex\" />\r\n\r\n <IconButtonContainer size={size} data-testid={'iconBtn'}>\r\n {bottomSectionProps?.iconButtons?.map((iconButton) => (\r\n <IconButton action={iconButton.action} variant=\"secondary\" shape=\"circular\" useTransparentBackground>\r\n {iconButton.icon}\r\n </IconButton>\r\n ))}\r\n </IconButtonContainer>\r\n </PopoverBottomSectionContainer>\r\n )}\r\n </PopoverContainer>\r\n\r\n <div onClick={() => showOnClick && setShowPopover(!showPopover)}>\r\n {children}\r\n\r\n <div className=\"pointer-space\" />\r\n </div>\r\n </PopoverWrapper>\r\n );\r\n};\r\n\r\nexport default Popover;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,CAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA0C,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,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IAhDfN,IAAI,EAAAmB,UAAA,YAAAC,MAAA,CAAAC,UAAA;IAKJvE,IAAI,EAAAqE,UAAA,YAAAC;EAAA;EAgDJ5C,kBAAkB,EAAA2C,UAAA,YAAAb,KAAA;IAvBlBS,WAAW,EAAAI,UAAA,YAAAG,OAAA,CAAAH,UAAA,YAAAb,KAAA;MAlBXI,IAAI,EAAAS,UAAA,YAAAI,IAAA,CAAAF,UAAA;MAKJnB,MAAM,EAAAiB,UAAA,YAAAK,IAAA,CAAAH,UAAA;MAKNR,KAAK,EAAAM,UAAA,YAAAC;IAAA;IAaLX,UAAU,EAAAU,UAAA,YAAAb,KAAA;MAvBVI,IAAI,EAAAS,UAAA,YAAAI,IAAA,CAAAF,UAAA;MAKJnB,MAAM,EAAAiB,UAAA,YAAAK,IAAA,CAAAH,UAAA;MAKNR,KAAK,EAAAM,UAAA,YAAAC;IAAA;EAAA;EAoCL3C,WAAW,EAAA0C,UAAA,YAAAI,IAAA,CAAAF,UAAA;EAKX3C,QAAQ,EAAAyC,UAAA,YAAAI,IAAA,CAAAF,UAAA;EAWRxD,WAAW,EAAAsD,UAAA,YAAAM,IAAA,CAAAJ,UAAA;EAMXhF,gBAAgB,EAAA8E,UAAA,YAAAM;AAAA;AAAA,IAAAC,QAAA,GAqFHzD,OAAO;AAAA1B,OAAA,cAAAmF,QAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Popover.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_","_Button","_icons","_styles","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PopoverContainer","styled","div","_taggedTemplateLiteral2","props","$size","Size","Small","Large","COLORS","getColor","theme","BOXSHADOWS","BOXSHADOW_CENTERED","Z_INDEXES","popover","$position","Position","Bottom","Top","Left","Right","$showArrowPointer","renderArrowStyles","exports","PopoverTopSectionContainer","PopoverMiddleSectionContainer","scrollBarStyling","PopoverBottomSectionContainer","TextContainer","renderMargins","$note","NoteContainer","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentSStyling","ComponentXSStyling","LabelContainer","Bold","ComponentLStyling","ComponentMStyling","CloseButtonContainer","TextButtonContainer","IconButtonContainer","PopoverWrapper","$showOnClick","concat","$showPopover","isNotePresent","size","position","Popover","_ref","_bottomSectionProps$t","_bottomSectionProps$i","_ref$size","Medium","topSectionProps","bottomSectionProps","mainContent","children","_ref$showOnClick","showOnClick","_ref$showArrowPointer","showArrowPointer","_React$useState","useState","_React$useState2","_slicedToArray2","showPopover","setShowPopover","useTheme","popoverRef","useRef","useEffect","checkIfClickedOutside","current","contains","target","document","addEventListener","removeEventListener","jsxs","ref","note","jsx","text","IconButton","action","useTransparentBackground","iconColor","variant","shape","SystemIcons","Close","textButton","icon","Button","onClick","label","className","iconButtons","map","iconButton","propTypes","_propTypes","string","isRequired","arrayOf","node","func","bool","_default"],"sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\nimport { Button, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';\r\nimport { Position, Size } from '../types';\r\n\r\nexport const PopoverContainer = styled.div<{ $size: Size; $position: Position; $showArrowPointer: boolean }>`\r\n //height: ${(props) => (props.$size === Size.Small ? '240px' : props.$size === Size.Large ? '480px' : '360px')};\r\n min-width: ${(props) => (props.$size === Size.Small ? '320px' : props.$size === Size.Large ? '640px' : '480px')};\r\n border-radius: 4px;\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n cursor: default;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n\r\n position: absolute; \r\n visibility: hidden;\r\n opacity: 0;\r\n z-index: ${Z_INDEXES.popover};\r\n\r\n ${(props) => (props.$position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n ${(props) => (props.$position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n\r\n ${(props) => (props.$position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n ${(props) => (props.$position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n\r\n &::after {\r\n ${(props) => (props.$showArrowPointer ? renderArrowStyles(props.$position) : '')}\r\n`;\r\n\r\nexport const PopoverTopSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '56px' : props.$size === Size.Large ? '72px' : '64px')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverMiddleSectionContainer = styled.div<{ $size: Size }>`\r\n margin: 8px;\r\n height: ${(props) => (props.$size === Size.Small ? '104px' : props.$size === Size.Large ? '304px' : '208px')};\r\n padding: ${(props) => (props.$size === Size.Small ? '0 8px' : props.$size === Size.Large ? '0 16px' : '0 12px')};\r\n overflow-y: auto;\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nexport const PopoverBottomSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '64px' : props.$size === Size.Large ? '88px' : '72px')}; \r\n display: flex;\r\n\r\n .bottom-flex {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{ $note: boolean; $size: Size }>`\r\n display: flex;\r\n flex-direction: column;\r\n margin: ${(props) => renderMargins(props.$note, props.$size)};\r\n flex-grow: 1;\r\n`;\r\n\r\nconst NoteContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))\r\n : props.$size === Size.Large\r\n ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))\r\n : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nconst LabelContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, null)\r\n : props.$size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, null)\r\n : ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\nconst CloseButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '4px 16px 4px 0' : props.$size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0')};\r\n`;\r\n\r\nconst TextButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 0 8px 16px' : props.$size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px')};\r\n`;\r\n\r\nconst IconButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 16px 8px 0' : props.$size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverWrapper = styled.div<{ $position: Position; $showOnClick: boolean; $showPopover: boolean }>`\r\n position: relative;\r\n\r\n .pointer-space {\r\n height: ${(props) => (props.$position === Position.Top || props.$position === Position.Bottom ? '16px' : '100%')};\r\n width: ${(props) => (props.$position === Position.Left || props.$position === Position.Right ? '16px' : '100%')};\r\n position: absolute;\r\n\r\n ${(props) => (props.$position === Position.Left ? 'right:100%; bottom: 0%' : '')};\r\n ${(props) => (props.$position === Position.Right ? 'left:100%; bottom: 0%' : '')};\r\n\r\n ${(props) => (props.$position === Position.Top ? 'bottom: 100%' : '')};\r\n ${(props) => (props.$position === Position.Bottom ? 'top: 100%' : '')};\r\n }\r\n\r\n ${(props) =>\r\n props.$showOnClick\r\n ? `${PopoverContainer} {\r\n visibility: ${props.$showPopover ? 'visible' : 'hidden'};\r\n opacity: ${props.$showPopover ? '1' : '0'};\r\n }\r\n cursor: pointer;`\r\n : `&:hover {\r\n ${PopoverContainer} {\r\n visibility: visible;\r\n opacity: 1;\r\n }\r\n }`}\r\n`;\r\n\r\nconst renderMargins = (isNotePresent: boolean, size: Size): string => {\r\n if (isNotePresent) {\r\n return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';\r\n } else {\r\n return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';\r\n }\r\n};\r\n\r\nconst renderArrowStyles = (position: Position) => {\r\n if (position === Position.Bottom) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid rgb(255,255,255);\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n bottom: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Top) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid rgb(255,255,255);\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid transparent;\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n top: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Left) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid transparent;\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid rgb(255,255,255);\r\n content: \"\";\r\n position: absolute;\r\n left: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n\r\n if (position === Position.Right) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid rgb(255,255,255);\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n};\r\n\r\nexport interface PopoverTopSectionProps {\r\n /**\r\n * Required. The main text to be displayed in the top section of the popover.\r\n */\r\n text: string;\r\n\r\n /**\r\n * Optional. A note to be displayed below the main text in the top section of the popover.\r\n */\r\n note?: string;\r\n};\r\n\r\nexport interface PopoverActionButtonProps {\r\n /**\r\n * Required. The icon to be displayed on the button.\r\n */\r\n icon: React.ReactNode;\r\n\r\n /**\r\n * Required. The handler function to be called when the button is clicked.\r\n */\r\n action: () => void;\r\n\r\n /**\r\n * Optional. The label for the button. If provided, the button will display this text.\r\n */\r\n label?: string;\r\n};\r\n\r\nexport interface PopoverBottomSectionProps {\r\n /**\r\n * Optional. An array of PopoverActionButtonProps objects.\r\n * Each object represents an icon button to be displayed in the bottom section of the popover.\r\n */\r\n iconButtons?: PopoverActionButtonProps[];\r\n\r\n /**\r\n * Optional. A PopoverActionButtonProps object representing a text button to be displayed in the bottom section of the popover.\r\n */\r\n textButton?: PopoverActionButtonProps;\r\n};\r\n\r\nexport interface PopoverProps {\r\n /**\r\n * Optional. The size of the popover. It can be 'Small', 'Medium', or 'Large'.\r\n * Defaults to 'Medium' if not specified.\r\n */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n\r\n /**\r\n * Optional. Properties for the top section of the popover.\r\n */\r\n topSectionProps?: PopoverTopSectionProps;\r\n\r\n /**\r\n * Optional. Properties for the bottom section of the popover.\r\n */\r\n bottomSectionProps?: PopoverBottomSectionProps;\r\n\r\n /**\r\n * Required. The main content to be displayed in the popover.\r\n */\r\n mainContent: React.ReactNode;\r\n\r\n /**\r\n * Required. The children to be rendered inside the popover.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * Required. The position of the popover relative to the target element.\r\n * It can be 'Top', 'Bottom', 'Right', or 'Left'.\r\n */\r\n position: Position.Top | Position.Bottom | Position.Right | Position.Left;\r\n\r\n /**\r\n * Required. A boolean indicating whether the popover should be shown when the target element is clicked. Defaults to 'false', meaning that popover will be shown on mouse hover.\r\n */\r\n showOnClick: boolean;\r\n\r\n /**\r\n * Optional. A boolean indicating whether an arrow pointer should be shown on the popover.\r\n * Defaults to 'false' if not specified.\r\n */\r\n showArrowPointer?: boolean;\r\n};\r\n\r\nconst Popover: React.FunctionComponent<PopoverProps> = ({\r\n size = Size.Medium,\r\n topSectionProps,\r\n bottomSectionProps,\r\n mainContent,\r\n children,\r\n position,\r\n showOnClick = false,\r\n showArrowPointer = false,\r\n}) => {\r\n const [showPopover, setShowPopover] = React.useState(false);\r\n const theme = useTheme();\r\n const popoverRef = React.useRef<any>();\r\n\r\n React.useEffect(() => {\r\n const checkIfClickedOutside = (e: { target: any }) => {\r\n if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {\r\n setShowPopover(false);\r\n }\r\n };\r\n\r\n document.addEventListener('mousedown', checkIfClickedOutside);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', checkIfClickedOutside);\r\n };\r\n }, [showPopover]);\r\n\r\n return (\r\n <PopoverWrapper $position={position} $showOnClick={showOnClick} $showPopover={showPopover}>\r\n <PopoverContainer $size={size} $position={position} ref={popoverRef} $showArrowPointer={showArrowPointer}>\r\n {!!topSectionProps && (\r\n <PopoverTopSectionContainer $size={size}>\r\n <TextContainer $note={!!topSectionProps?.note} $size={size}>\r\n {topSectionProps?.note && <NoteContainer $size={size}>{topSectionProps.note}</NoteContainer>}\r\n <LabelContainer $size={size}>{topSectionProps?.text}</LabelContainer>\r\n </TextContainer>\r\n\r\n {showOnClick && (\r\n <CloseButtonContainer $size={size} data-testid={'closeBtn'}>\r\n <IconButton action={() => setShowPopover(false)} useTransparentBackground iconColor={COLORS.getColor('neutral_600', theme)} variant=\"secondary\" shape=\"circular\">\r\n <SystemIcons.Close />\r\n </IconButton>\r\n </CloseButtonContainer>\r\n )}\r\n </PopoverTopSectionContainer>\r\n )}\r\n\r\n <PopoverMiddleSectionContainer $size={size}>{mainContent}</PopoverMiddleSectionContainer>\r\n\r\n {!!bottomSectionProps && (\r\n <PopoverBottomSectionContainer $size={size}>\r\n {!!bottomSectionProps?.textButton?.icon && (\r\n <TextButtonContainer $size={size} data-testid={'textBtn'}>\r\n <Button size={size} variant=\"secondary\" icon={bottomSectionProps.textButton.icon} onClick={bottomSectionProps.textButton.action}>\r\n {bottomSectionProps.textButton.label}\r\n </Button>\r\n </TextButtonContainer>\r\n )}\r\n\r\n <div className=\"bottom-flex\" />\r\n\r\n <IconButtonContainer $size={size} data-testid={'iconBtn'}>\r\n {bottomSectionProps?.iconButtons?.map((iconButton) => (\r\n <IconButton action={iconButton.action} variant=\"secondary\" shape=\"circular\" useTransparentBackground>\r\n {iconButton.icon}\r\n </IconButton>\r\n ))}\r\n </IconButtonContainer>\r\n </PopoverBottomSectionContainer>\r\n )}\r\n </PopoverContainer>\r\n\r\n <div onClick={() => showOnClick && setShowPopover(!showPopover)}>\r\n {children}\r\n\r\n <div className=\"pointer-space\" />\r\n </div>\r\n </PopoverWrapper>\r\n );\r\n};\r\n\r\nexport default Popover;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,CAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA0C,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA,EAAAC,iBAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,O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lBS,WAAW,EAAAI,UAAA,YAAAG,OAAA,CAAAH,UAAA,YAAAb,KAAA;MAlBXI,IAAI,EAAAS,UAAA,YAAAI,IAAA,CAAAF,UAAA;MAKJnB,MAAM,EAAAiB,UAAA,YAAAK,IAAA,CAAAH,UAAA;MAKNR,KAAK,EAAAM,UAAA,YAAAC;IAAA;IAaLX,UAAU,EAAAU,UAAA,YAAAb,KAAA;MAvBVI,IAAI,EAAAS,UAAA,YAAAI,IAAA,CAAAF,UAAA;MAKJnB,MAAM,EAAAiB,UAAA,YAAAK,IAAA,CAAAH,UAAA;MAKNR,KAAK,EAAAM,UAAA,YAAAC;IAAA;EAAA;EAoCL/C,WAAW,EAAA8C,UAAA,YAAAI,IAAA,CAAAF,UAAA;EAKX/C,QAAQ,EAAA6C,UAAA,YAAAI,IAAA,CAAAF,UAAA;EAWR7C,WAAW,EAAA2C,UAAA,YAAAM,IAAA,CAAAJ,UAAA;EAMX3C,gBAAgB,EAAAyC,UAAA,YAAAM;AAAA;AAAA,IAAAC,QAAA,GAqFH7D,OAAO;AAAA5B,OAAA,cAAAyF,QAAA","ignoreList":[]}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Position, Size } from '../types';
|
|
3
3
|
export declare const PopoverContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
-
size: Size;
|
|
5
|
-
position: Position;
|
|
6
|
-
showArrowPointer: boolean;
|
|
4
|
+
$size: Size;
|
|
5
|
+
$position: Position;
|
|
6
|
+
$showArrowPointer: boolean;
|
|
7
7
|
}>> & string;
|
|
8
8
|
export declare const PopoverTopSectionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
|
-
size: Size;
|
|
9
|
+
$size: Size;
|
|
10
10
|
}>> & string;
|
|
11
11
|
export declare const PopoverMiddleSectionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
12
|
-
size: Size;
|
|
12
|
+
$size: Size;
|
|
13
13
|
}>> & string;
|
|
14
14
|
export declare const PopoverBottomSectionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
-
size: Size;
|
|
15
|
+
$size: Size;
|
|
16
16
|
}>> & string;
|
|
17
17
|
export declare const PopoverWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
18
|
-
position: Position;
|
|
19
|
-
showOnClick: boolean;
|
|
20
|
-
showPopover: boolean;
|
|
18
|
+
$position: Position;
|
|
19
|
+
$showOnClick: boolean;
|
|
20
|
+
$showPopover: boolean;
|
|
21
21
|
}>> & string;
|
|
22
22
|
export interface PopoverTopSectionProps {
|
|
23
23
|
/**
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -12,65 +12,65 @@ import { Position, Size } from '../types';
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
export var PopoverContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n //height: ", ";\n min-width: ", ";\n border-radius: 4px;\n background: ", ";\n cursor: default;\n box-shadow: ", ";\n\n position: absolute; \n visibility: hidden;\n opacity: 0;\n z-index: ", ";\n\n ", "\n ", "\n\n ", "\n ", "\n\n &::after {\n ", "\n"])), function (props) {
|
|
15
|
-
return props
|
|
15
|
+
return props.$size === Size.Small ? '240px' : props.$size === Size.Large ? '480px' : '360px';
|
|
16
16
|
}, function (props) {
|
|
17
|
-
return props
|
|
17
|
+
return props.$size === Size.Small ? '320px' : props.$size === Size.Large ? '640px' : '480px';
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return COLORS.getColor('white', props.theme);
|
|
20
20
|
}, BOXSHADOWS.BOXSHADOW_CENTERED, Z_INDEXES.popover, function (props) {
|
|
21
|
-
return props
|
|
21
|
+
return props.$position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '';
|
|
22
22
|
}, function (props) {
|
|
23
|
-
return props
|
|
23
|
+
return props.$position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '';
|
|
24
24
|
}, function (props) {
|
|
25
|
-
return props
|
|
25
|
+
return props.$position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '';
|
|
26
26
|
}, function (props) {
|
|
27
|
-
return props
|
|
27
|
+
return props.$position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '';
|
|
28
28
|
}, function (props) {
|
|
29
|
-
return props
|
|
29
|
+
return props.$showArrowPointer ? renderArrowStyles(props.$position) : '';
|
|
30
30
|
});
|
|
31
31
|
export var PopoverTopSectionContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: ", ";\n display: flex;\n"])), function (props) {
|
|
32
|
-
return props
|
|
32
|
+
return props.$size === Size.Small ? '56px' : props.$size === Size.Large ? '72px' : '64px';
|
|
33
33
|
});
|
|
34
34
|
export var PopoverMiddleSectionContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 8px;\n height: ", ";\n padding: ", ";\n overflow-y: auto;\n ", "\n"])), function (props) {
|
|
35
|
-
return props
|
|
35
|
+
return props.$size === Size.Small ? '104px' : props.$size === Size.Large ? '304px' : '208px';
|
|
36
36
|
}, function (props) {
|
|
37
|
-
return props
|
|
37
|
+
return props.$size === Size.Small ? '0 8px' : props.$size === Size.Large ? '0 16px' : '0 12px';
|
|
38
38
|
}, scrollBarStyling(Size.Small));
|
|
39
39
|
export var PopoverBottomSectionContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: ", "; \n display: flex;\n\n .bottom-flex {\n flex: 1;\n }\n"])), function (props) {
|
|
40
|
-
return props
|
|
40
|
+
return props.$size === Size.Small ? '64px' : props.$size === Size.Large ? '88px' : '72px';
|
|
41
41
|
});
|
|
42
42
|
var TextContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n flex-grow: 1;\n"])), function (props) {
|
|
43
|
-
return renderMargins(props
|
|
43
|
+
return renderMargins(props.$note, props.$size);
|
|
44
44
|
});
|
|
45
45
|
var NoteContainer = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
46
|
-
return props
|
|
46
|
+
return props.$size === Size.Small ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme)) : props.$size === Size.Large ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme)) : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_600', props.theme));
|
|
47
47
|
});
|
|
48
48
|
var LabelContainer = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
49
|
-
return props
|
|
49
|
+
return props.$size === Size.Small ? ComponentSStyling(ComponentTextStyle.Bold, null) : props.$size === Size.Large ? ComponentLStyling(ComponentTextStyle.Bold, null) : ComponentMStyling(ComponentTextStyle.Bold, null);
|
|
50
50
|
});
|
|
51
51
|
var CloseButtonContainer = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: ", ";\n"])), function (props) {
|
|
52
|
-
return props
|
|
52
|
+
return props.$size === Size.Small ? '4px 16px 4px 0' : props.$size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0';
|
|
53
53
|
});
|
|
54
54
|
var TextButtonContainer = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: ", ";\n"])), function (props) {
|
|
55
|
-
return props
|
|
55
|
+
return props.$size === Size.Small ? '8px 0 8px 16px' : props.$size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px';
|
|
56
56
|
});
|
|
57
57
|
var IconButtonContainer = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin: ", ";\n display: flex;\n"])), function (props) {
|
|
58
|
-
return props
|
|
58
|
+
return props.$size === Size.Small ? '8px 16px 8px 0' : props.$size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0';
|
|
59
59
|
});
|
|
60
60
|
export var PopoverWrapper = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n\n .pointer-space {\n height: ", ";\n width: ", ";\n position: absolute;\n\n ", ";\n ", ";\n\n ", ";\n ", ";\n }\n\n ", "\n"])), function (props) {
|
|
61
|
-
return props
|
|
61
|
+
return props.$position === Position.Top || props.$position === Position.Bottom ? '16px' : '100%';
|
|
62
62
|
}, function (props) {
|
|
63
|
-
return props
|
|
63
|
+
return props.$position === Position.Left || props.$position === Position.Right ? '16px' : '100%';
|
|
64
64
|
}, function (props) {
|
|
65
|
-
return props
|
|
65
|
+
return props.$position === Position.Left ? 'right:100%; bottom: 0%' : '';
|
|
66
66
|
}, function (props) {
|
|
67
|
-
return props
|
|
67
|
+
return props.$position === Position.Right ? 'left:100%; bottom: 0%' : '';
|
|
68
68
|
}, function (props) {
|
|
69
|
-
return props
|
|
69
|
+
return props.$position === Position.Top ? 'bottom: 100%' : '';
|
|
70
70
|
}, function (props) {
|
|
71
|
-
return props
|
|
71
|
+
return props.$position === Position.Bottom ? 'top: 100%' : '';
|
|
72
72
|
}, function (props) {
|
|
73
|
-
return props
|
|
73
|
+
return props.$showOnClick ? "".concat(PopoverContainer, " {\n visibility: ").concat(props.$showPopover ? 'visible' : 'hidden', ";\n opacity: ").concat(props.$showPopover ? '1' : '0', ";\n }\n cursor: pointer;") : "&:hover {\n ".concat(PopoverContainer, " {\n visibility: visible;\n opacity: 1;\n }\n }");
|
|
74
74
|
});
|
|
75
75
|
var renderMargins = function renderMargins(isNotePresent, size) {
|
|
76
76
|
if (isNotePresent) {
|
|
@@ -128,28 +128,28 @@ var Popover = function Popover(_ref) {
|
|
|
128
128
|
};
|
|
129
129
|
}, [showPopover]);
|
|
130
130
|
return /*#__PURE__*/_jsxs(PopoverWrapper, {
|
|
131
|
-
position: position,
|
|
132
|
-
showOnClick: showOnClick,
|
|
133
|
-
showPopover: showPopover,
|
|
131
|
+
$position: position,
|
|
132
|
+
$showOnClick: showOnClick,
|
|
133
|
+
$showPopover: showPopover,
|
|
134
134
|
children: [/*#__PURE__*/_jsxs(PopoverContainer, {
|
|
135
|
-
size: size,
|
|
136
|
-
position: position,
|
|
135
|
+
$size: size,
|
|
136
|
+
$position: position,
|
|
137
137
|
ref: popoverRef,
|
|
138
|
-
showArrowPointer: showArrowPointer,
|
|
138
|
+
$showArrowPointer: showArrowPointer,
|
|
139
139
|
children: [!!topSectionProps && /*#__PURE__*/_jsxs(PopoverTopSectionContainer, {
|
|
140
|
-
size: size,
|
|
140
|
+
$size: size,
|
|
141
141
|
children: [/*#__PURE__*/_jsxs(TextContainer, {
|
|
142
|
-
note: !!(topSectionProps !== null && topSectionProps !== void 0 && topSectionProps.note),
|
|
143
|
-
size: size,
|
|
142
|
+
$note: !!(topSectionProps !== null && topSectionProps !== void 0 && topSectionProps.note),
|
|
143
|
+
$size: size,
|
|
144
144
|
children: [(topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.note) && /*#__PURE__*/_jsx(NoteContainer, {
|
|
145
|
-
size: size,
|
|
145
|
+
$size: size,
|
|
146
146
|
children: topSectionProps.note
|
|
147
147
|
}), /*#__PURE__*/_jsx(LabelContainer, {
|
|
148
|
-
size: size,
|
|
148
|
+
$size: size,
|
|
149
149
|
children: topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.text
|
|
150
150
|
})]
|
|
151
151
|
}), showOnClick && /*#__PURE__*/_jsx(CloseButtonContainer, {
|
|
152
|
-
size: size,
|
|
152
|
+
$size: size,
|
|
153
153
|
"data-testid": 'closeBtn',
|
|
154
154
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
155
155
|
action: function action() {
|
|
@@ -163,12 +163,12 @@ var Popover = function Popover(_ref) {
|
|
|
163
163
|
})
|
|
164
164
|
})]
|
|
165
165
|
}), /*#__PURE__*/_jsx(PopoverMiddleSectionContainer, {
|
|
166
|
-
size: size,
|
|
166
|
+
$size: size,
|
|
167
167
|
children: mainContent
|
|
168
168
|
}), !!bottomSectionProps && /*#__PURE__*/_jsxs(PopoverBottomSectionContainer, {
|
|
169
|
-
size: size,
|
|
169
|
+
$size: size,
|
|
170
170
|
children: [!!(bottomSectionProps !== null && bottomSectionProps !== void 0 && (_bottomSectionProps$t = bottomSectionProps.textButton) !== null && _bottomSectionProps$t !== void 0 && _bottomSectionProps$t.icon) && /*#__PURE__*/_jsx(TextButtonContainer, {
|
|
171
|
-
size: size,
|
|
171
|
+
$size: size,
|
|
172
172
|
"data-testid": 'textBtn',
|
|
173
173
|
children: /*#__PURE__*/_jsx(Button, {
|
|
174
174
|
size: size,
|
|
@@ -180,7 +180,7 @@ var Popover = function Popover(_ref) {
|
|
|
180
180
|
}), /*#__PURE__*/_jsx("div", {
|
|
181
181
|
className: "bottom-flex"
|
|
182
182
|
}), /*#__PURE__*/_jsx(IconButtonContainer, {
|
|
183
|
-
size: size,
|
|
183
|
+
$size: size,
|
|
184
184
|
"data-testid": 'iconBtn',
|
|
185
185
|
children: bottomSectionProps === null || bottomSectionProps === void 0 ? void 0 : (_bottomSectionProps$i = bottomSectionProps.iconButtons) === null || _bottomSectionProps$i === void 0 ? void 0 : _bottomSectionProps$i.map(function (iconButton) {
|
|
186
186
|
return /*#__PURE__*/_jsx(IconButton, {
|