@laerdal/life-react-components 2.1.1-dev.9.full → 2.2.1-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 +8 -17
- package/dist/Accordion/AccordionItem.cjs.map +1 -1
- package/dist/Accordion/AccordionItem.d.ts +2 -0
- package/dist/Accordion/AccordionItem.js +9 -18
- package/dist/Accordion/AccordionItem.js.map +1 -1
- package/dist/Accordion/AccordionMenu.cjs +6 -2
- package/dist/Accordion/AccordionMenu.cjs.map +1 -1
- package/dist/Accordion/AccordionMenu.d.ts +3 -0
- package/dist/Accordion/AccordionMenu.js +6 -2
- package/dist/Accordion/AccordionMenu.js.map +1 -1
- package/dist/Accordion/styles.cjs +7 -11
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.d.ts +1 -4
- package/dist/Accordion/styles.js +6 -9
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/AuthPage/AuthPage.js +1 -1
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Button/Button.js +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.cjs +16 -7
- package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.d.ts +2 -0
- package/dist/Card/HorizontalCard/HorizontalCard.js +13 -6
- package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +13 -9
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.d.ts +4 -0
- package/dist/Card/HorizontalCard/HorizontalCardBody.js +8 -8
- package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +7 -5
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +2 -0
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +5 -5
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
- package/dist/Card/HorizontalCard/index.cjs +33 -12
- package/dist/Card/HorizontalCard/index.cjs.map +1 -1
- package/dist/Card/HorizontalCard/index.d.ts +3 -1
- package/dist/Card/HorizontalCard/index.js +3 -1
- package/dist/Card/HorizontalCard/index.js.map +1 -1
- package/dist/Card/HorizontalCard/types.cjs.map +1 -1
- package/dist/Card/HorizontalCard/types.d.ts +2 -1
- package/dist/Card/HorizontalCard/types.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +1 -1
- package/dist/Dropdown/DropdownContent.cjs +1 -1
- package/dist/Dropdown/DropdownContent.js +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs +15 -10
- package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/DesktopActions.js +15 -10
- package/dist/GlobalNavigationBar/desktop/DesktopActions.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +16 -4
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js +16 -4
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +2 -2
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +2 -2
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/types.cjs.map +1 -1
- package/dist/GlobalNavigationBar/types.d.ts +4 -5
- package/dist/GlobalNavigationBar/types.js.map +1 -1
- package/dist/Image/ImageWithFallbacks.js +1 -1
- package/dist/InputFields/DatepickerField.js +1 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
- package/dist/InputFields/NumberField.js +1 -1
- package/dist/InputFields/PasswordField.js +1 -1
- package/dist/InputFields/SearchBar.js +1 -1
- package/dist/InputFields/TextField.js +1 -1
- package/dist/LinearProgress/LinearProgress.js +1 -1
- package/dist/Paginator/Paginator.cjs.map +1 -1
- package/dist/Paginator/Paginator.js.map +1 -1
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +1 -1
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +4 -2
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.d.ts +1 -0
- package/dist/Tooltips/TooltipStyles.js +4 -2
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/Tooltips/TooltipTypes.cjs +0 -5
- package/dist/Tooltips/TooltipTypes.cjs.map +1 -1
- package/dist/Tooltips/TooltipTypes.d.ts +2 -0
- package/dist/Tooltips/TooltipTypes.js +0 -5
- package/dist/Tooltips/TooltipTypes.js.map +1 -1
- package/dist/Tooltips/TooltipWrapper.cjs +48 -1
- package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
- package/dist/Tooltips/TooltipWrapper.d.ts +1 -1
- package/dist/Tooltips/TooltipWrapper.js +50 -2
- package/dist/Tooltips/TooltipWrapper.js.map +1 -1
- package/dist/assets/index.cjs.map +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/common/ActionWithin.cjs +1 -1
- package/dist/common/ActionWithin.js +1 -1
- package/dist/common/FocusVisible.cjs +1 -1
- package/dist/common/FocusVisible.js +1 -1
- package/dist/icons/systemicons/SystemIcons.cjs.map +1 -1
- package/dist/icons/systemicons/SystemIcons.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightSideNav.cjs","names":["NavContainer","styled","div","BREAKPOINTS","MEDIUM","LARGE","
|
|
1
|
+
{"version":3,"file":"RightSideNav.cjs","names":["NavContainer","styled","div","BREAKPOINTS","MEDIUM","LARGE","StyledButton","Button","ComponentMStyling","ComponentTextStyle","Bold","RightSideNav","items","action","getNavItem","item","disabled","label","NavLink","to","defaultOnMouseDownHandler","e","reverse","map","no","tooltip"],"sources":["../../../src/GlobalNavigationBar/desktop/RightSideNav.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\n\nimport {NavItem} from '../../NavItem';\nimport {BREAKPOINTS, ComponentTextStyle} from '../../styles';\nimport {Button} from '../../Button';\nimport {ComponentMStyling} from '../../styles';\nimport {defaultOnMouseDownHandler} from '../../common';\nimport {MenuButton, MenuNavigationItemTypeItem} from '../types';\nimport {Tooltip, TooltipWrapper} from \"../../Tooltips\";\n\nconst NavContainer = styled.div`\n display: none;\n margin: auto 0 auto auto;\n align-items: center;\n height: 56px;\n\n a {\n text-decoration: none;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n display: flex;\n }\n\n ${BREAKPOINTS.LARGE} {\n height: 64px;\n }\n\n button,\n div {\n &:hover {\n cursor: pointer;\n }\n }\n`;\n\nconst StyledButton = styled(Button)`\n height: 40px;\n margin: 0 8px;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, 'unset')}\n`;\n\ntype Props = {\n items?: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n};\n\nconst RightSideNav = ({items, action}: Props): React.ReactElement<Props> => {\n const getNavItem = (item: MenuNavigationItemTypeItem) => {\n if (item?.disabled) {\n return (\n <NavItem as={Button} className=\"disabled\" key={item?.label}>\n {item?.label}\n </NavItem>\n );\n } else {\n return (\n <NavItem\n as={NavLink}\n to={item?.to || ''}\n key={item?.label}\n onMouseDown={defaultOnMouseDownHandler}\n onClick={(e:React.MouseEvent) => item.action && item.action(e)}>\n {item?.label}\n </NavItem>\n );\n }\n };\n\n return (\n <NavContainer>\n {items?.reverse().map(no => getNavItem(no))}\n\n {\n action && !action.tooltip &&\n <StyledButton variant=\"secondary\" onClick={action?.action} {...action}>\n {action.label}\n </StyledButton>\n }\n {\n action && !!action.tooltip &&\n <TooltipWrapper {...action.tooltip}>\n <StyledButton variant=\"secondary\" onClick={action?.action} {...action}>\n {action.label}\n </StyledButton>\n </TooltipWrapper>\n }\n\n </NavContainer>\n );\n};\n\nexport default RightSideNav;\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AAAuD;AAAA;AAAA;AAAA;AAAA;AAAA;AAEvD,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,0WAU3BC,mBAAW,CAACC,MAAM,EAIlBD,mBAAW,CAACE,KAAK,CAUpB;AAED,IAAMC,YAAY,GAAG,IAAAL,yBAAM,EAACM,cAAM,CAAC,qIAI/B,IAAAC,yBAAiB,EAACC,0BAAkB,CAACC,IAAI,EAAE,OAAO,CAAC,CACtD;AAOD,IAAMC,YAAY,GAAG,SAAfA,YAAY,OAA0D;EAAA,IAArDC,KAAK,QAALA,KAAK;IAAEC,MAAM,QAANA,MAAM;EAClC,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAIC,IAAgC,EAAK;IACvD,IAAIA,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEC,QAAQ,EAAE;MAClB,oBACE,qBAAC,gBA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M,CAACI;MAAK;IACA,GACA;EAAA,EAGR;AAEnB,CAAC;AAAC;EA/CAL,KAAK;AAAA;AAAA,eAiDQD,YAAY;AAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
3
|
import _pt from "prop-types";
|
|
3
4
|
var _templateObject, _templateObject2;
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
7
|
import * as React from 'react';
|
|
5
8
|
import styled from 'styled-components';
|
|
6
9
|
import { NavLink } from 'react-router-dom';
|
|
@@ -9,10 +12,11 @@ import { BREAKPOINTS, ComponentTextStyle } from '../../styles';
|
|
|
9
12
|
import { Button } from '../../Button';
|
|
10
13
|
import { ComponentMStyling } from '../../styles';
|
|
11
14
|
import { defaultOnMouseDownHandler } from '../../common';
|
|
15
|
+
import { TooltipWrapper } from "../../Tooltips";
|
|
12
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
18
|
var NavContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n margin: auto 0 auto auto;\n align-items: center;\n height: 56px;\n\n a {\n text-decoration: none;\n }\n\n ", " {\n display: flex;\n }\n\n ", " {\n height: 64px;\n }\n\n button,\n div {\n &:hover {\n cursor: pointer;\n }\n }\n"])), BREAKPOINTS.MEDIUM, BREAKPOINTS.LARGE);
|
|
15
|
-
var
|
|
19
|
+
var StyledButton = styled(Button)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 40px;\n margin: 0 8px;\n\n ", "\n"])), ComponentMStyling(ComponentTextStyle.Bold, 'unset'));
|
|
16
20
|
var RightSideNav = function RightSideNav(_ref) {
|
|
17
21
|
var items = _ref.items,
|
|
18
22
|
action = _ref.action;
|
|
@@ -38,11 +42,19 @@ var RightSideNav = function RightSideNav(_ref) {
|
|
|
38
42
|
return /*#__PURE__*/_jsxs(NavContainer, {
|
|
39
43
|
children: [items === null || items === void 0 ? void 0 : items.reverse().map(function (no) {
|
|
40
44
|
return getNavItem(no);
|
|
41
|
-
}), action && /*#__PURE__*/_jsx(
|
|
45
|
+
}), action && !action.tooltip && /*#__PURE__*/_jsx(StyledButton, _objectSpread(_objectSpread({
|
|
42
46
|
variant: "secondary",
|
|
43
|
-
onClick: action === null || action === void 0 ? void 0 : action.action
|
|
47
|
+
onClick: action === null || action === void 0 ? void 0 : action.action
|
|
48
|
+
}, action), {}, {
|
|
44
49
|
children: action.label
|
|
45
|
-
})
|
|
50
|
+
})), action && !!action.tooltip && /*#__PURE__*/_jsx(TooltipWrapper, _objectSpread(_objectSpread({}, action.tooltip), {}, {
|
|
51
|
+
children: /*#__PURE__*/_jsx(StyledButton, _objectSpread(_objectSpread({
|
|
52
|
+
variant: "secondary",
|
|
53
|
+
onClick: action === null || action === void 0 ? void 0 : action.action
|
|
54
|
+
}, action), {}, {
|
|
55
|
+
children: action.label
|
|
56
|
+
}))
|
|
57
|
+
}))]
|
|
46
58
|
});
|
|
47
59
|
};
|
|
48
60
|
RightSideNav.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightSideNav.js","names":["React","styled","NavLink","NavItem","BREAKPOINTS","ComponentTextStyle","Button","ComponentMStyling","defaultOnMouseDownHandler","NavContainer","div","MEDIUM","LARGE","
|
|
1
|
+
{"version":3,"file":"RightSideNav.js","names":["React","styled","NavLink","NavItem","BREAKPOINTS","ComponentTextStyle","Button","ComponentMStyling","defaultOnMouseDownHandler","TooltipWrapper","NavContainer","div","MEDIUM","LARGE","StyledButton","Bold","RightSideNav","items","action","getNavItem","item","disabled","label","to","e","reverse","map","no","tooltip"],"sources":["../../../src/GlobalNavigationBar/desktop/RightSideNav.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\n\nimport {NavItem} from '../../NavItem';\nimport {BREAKPOINTS, ComponentTextStyle} from '../../styles';\nimport {Button} from '../../Button';\nimport {ComponentMStyling} from '../../styles';\nimport {defaultOnMouseDownHandler} from '../../common';\nimport {MenuButton, MenuNavigationItemTypeItem} from '../types';\nimport {Tooltip, TooltipWrapper} from \"../../Tooltips\";\n\nconst NavContainer = styled.div`\n display: none;\n margin: auto 0 auto auto;\n align-items: center;\n height: 56px;\n\n a {\n text-decoration: none;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n display: flex;\n }\n\n ${BREAKPOINTS.LARGE} {\n height: 64px;\n }\n\n button,\n div {\n &:hover {\n cursor: pointer;\n }\n }\n`;\n\nconst StyledButton = styled(Button)`\n height: 40px;\n margin: 0 8px;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, 'unset')}\n`;\n\ntype Props = {\n items?: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n};\n\nconst RightSideNav = ({items, action}: Props): React.ReactElement<Props> => {\n const getNavItem = (item: MenuNavigationItemTypeItem) => {\n if (item?.disabled) {\n return (\n <NavItem as={Button} className=\"disabled\" key={item?.label}>\n {item?.label}\n </NavItem>\n );\n } else {\n return (\n <NavItem\n as={NavLink}\n to={item?.to || ''}\n key={item?.label}\n onMouseDown={defaultOnMouseDownHandler}\n onClick={(e:React.MouseEvent) => item.action && item.action(e)}>\n {item?.label}\n </NavItem>\n );\n }\n };\n\n return (\n <NavContainer>\n {items?.reverse().map(no => getNavItem(no))}\n\n {\n action && !action.tooltip &&\n <StyledButton variant=\"secondary\" onClick={action?.action} {...action}>\n {action.label}\n </StyledButton>\n }\n {\n action && !!action.tooltip &&\n <TooltipWrapper {...action.tooltip}>\n <StyledButton variant=\"secondary\" onClick={action?.action} {...action}>\n {action.label}\n </StyledButton>\n </TooltipWrapper>\n }\n\n </NavContainer>\n );\n};\n\nexport default RightSideNav;\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,OAAO,QAAO,kBAAkB;AAExC,SAAQC,OAAO,QAAO,eAAe;AACrC,SAAQC,WAAW,EAAEC,kBAAkB,QAAO,cAAc;AAC5D,SAAQC,MAAM,QAAO,cAAc;AACnC,SAAQC,iBAAiB,QAAO,cAAc;AAC9C,SAAQC,yBAAyB,QAAO,cAAc;AAEtD,SAAiBC,cAAc,QAAO,gBAAgB;AAAC;AAAA;AAEvD,IAAMC,YAAY,GAAGT,MAAM,CAACU,GAAG,4VAU3BP,WAAW,CAACQ,MAAM,EAIlBR,WAAW,CAACS,KAAK,CAUpB;AAED,IAAMC,YAAY,GAAGb,MAAM,CAACK,MAAM,CAAC,uHAI/BC,iBAAiB,CAACF,kBAAkB,CAACU,IAAI,EAAE,OAAO,CAAC,CACtD;AAOD,IAAMC,YAAY,GAAG,SAAfA,YAAY,OAA0D;EAAA,IAArDC,KAAK,QAALA,KAAK;IAAEC,MAAM,QAANA,MAAM;EAClC,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAIC,IAAgC,EAAK;IACvD,IAAIA,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEC,QAAQ,EAAE;MAClB,oBACE,KAAC,OAAO;QAAC,EAAE,EAAEf,MAAO;QAAC,SAAS,E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;AAAC;EA/CAL,KAAK;AAAA;AAiDP,eAAeD,YAAY"}
|
|
@@ -21,7 +21,7 @@ var MobileActionContainer = function MobileActionContainer(_ref) {
|
|
|
21
21
|
variant = _ref$variant === void 0 ? 'secondary' : _ref$variant,
|
|
22
22
|
icon = _ref.icon,
|
|
23
23
|
label = _ref.label,
|
|
24
|
-
|
|
24
|
+
loading = _ref.loading,
|
|
25
25
|
action = _ref.action;
|
|
26
26
|
var isSmallScreen = (0, _rooks.useMediaMatch)(_styles.BREAKPOINTS.SMALL.replace('@media ', ''));
|
|
27
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionContainer, {
|
|
@@ -30,7 +30,7 @@ var MobileActionContainer = function MobileActionContainer(_ref) {
|
|
|
30
30
|
size: isSmallScreen ? _types.Size.Medium : _types.Size.Small,
|
|
31
31
|
disabled: disabled,
|
|
32
32
|
icon: icon,
|
|
33
|
-
loading:
|
|
33
|
+
loading: loading,
|
|
34
34
|
onClick: action,
|
|
35
35
|
children: label
|
|
36
36
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileActionContainer.cjs","names":["ActionContainer","styled","div","COLORS","neutral_200","BREAKPOINTS","SMALL","MobileActionContainer","disabled","variant","icon","label","
|
|
1
|
+
{"version":3,"file":"MobileActionContainer.cjs","names":["ActionContainer","styled","div","COLORS","neutral_200","BREAKPOINTS","SMALL","MobileActionContainer","disabled","variant","icon","label","loading","action","isSmallScreen","useMediaMatch","replace","Size","Medium","Small"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '../../Button';\nimport { BREAKPOINTS, COLORS } from '../../styles';\nimport { Size } from '../../types';\nimport { MenuButton } from '../types';\nimport {useMediaMatch} from \"rooks\";\n\nconst ActionContainer = styled.div`\n padding: 8px 16px;\n box-sizing: border-box;\n border-top: 1px solid ${COLORS.neutral_200};\n display: flex;\n flex-direction: column;\n\n ${BREAKPOINTS.SMALL} {\n padding: 16px;\n }\n`;\n\ninterface MobileActionContainerProps extends MenuButton {}\n\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\n\n return (\n <ActionContainer>\n <Button variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\n {label}\n </Button>\n </ActionContainer>\n );\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAoC;AAAA;AAEpC,IAAMA,eAAe,GAAGC,yBAAM,CAACC,GAAG,wPAGRC,cAAM,CAACC,WAAW,EAIxCC,mBAAW,CAACC,KAAK,CAGpB;AAIM,IAAMC,qBAA0E,GAAG,SAA7EA,qBAA0E,OAA0E;EAAA,IAApEC,QAAQ,QAARA,QAAQ;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,WAAW;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAEC,MAAM,QAANA,MAAM;EACxJ,IAAMC,aAAa,GAAG,IAAAC,oBAAa,EAACV,mBAAW,CAACC,KAAK,CAACU,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACE,qBAAC,eAAe;IAAA,uBACd,qBAAC,cAAM;MAAC,OAAO,EAAEP,OAAQ;MAAC,IAAI,EAAEK,aAAa,GAAGG,WAAI,CAACC,MAAM,GAAGD,WAAI,CAACE,KAAM;MAAC,QAAQ,EAAEX,QAAS;MAAC,IAAI,EAAEE,IAAK;MAAC,OAAO,EAAEE,OAAQ;MAAC,OAAO,EAAEC,MAAO;MAAA,UACzIF;IAAK;EACC,EACO;AAEtB,CAAC;AAAC"}
|
|
@@ -14,7 +14,7 @@ export var MobileActionContainer = function MobileActionContainer(_ref) {
|
|
|
14
14
|
variant = _ref$variant === void 0 ? 'secondary' : _ref$variant,
|
|
15
15
|
icon = _ref.icon,
|
|
16
16
|
label = _ref.label,
|
|
17
|
-
|
|
17
|
+
loading = _ref.loading,
|
|
18
18
|
action = _ref.action;
|
|
19
19
|
var isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));
|
|
20
20
|
return /*#__PURE__*/_jsx(ActionContainer, {
|
|
@@ -23,7 +23,7 @@ export var MobileActionContainer = function MobileActionContainer(_ref) {
|
|
|
23
23
|
size: isSmallScreen ? Size.Medium : Size.Small,
|
|
24
24
|
disabled: disabled,
|
|
25
25
|
icon: icon,
|
|
26
|
-
loading:
|
|
26
|
+
loading: loading,
|
|
27
27
|
onClick: action,
|
|
28
28
|
children: label
|
|
29
29
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileActionContainer.js","names":["React","styled","Button","BREAKPOINTS","COLORS","Size","useMediaMatch","ActionContainer","div","neutral_200","SMALL","MobileActionContainer","disabled","variant","icon","label","
|
|
1
|
+
{"version":3,"file":"MobileActionContainer.js","names":["React","styled","Button","BREAKPOINTS","COLORS","Size","useMediaMatch","ActionContainer","div","neutral_200","SMALL","MobileActionContainer","disabled","variant","icon","label","loading","action","isSmallScreen","replace","Medium","Small"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '../../Button';\nimport { BREAKPOINTS, COLORS } from '../../styles';\nimport { Size } from '../../types';\nimport { MenuButton } from '../types';\nimport {useMediaMatch} from \"rooks\";\n\nconst ActionContainer = styled.div`\n padding: 8px 16px;\n box-sizing: border-box;\n border-top: 1px solid ${COLORS.neutral_200};\n display: flex;\n flex-direction: column;\n\n ${BREAKPOINTS.SMALL} {\n padding: 16px;\n }\n`;\n\ninterface MobileActionContainerProps extends MenuButton {}\n\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\n\n return (\n <ActionContainer>\n <Button variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\n {label}\n </Button>\n </ActionContainer>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,WAAW,EAAEC,MAAM,QAAQ,cAAc;AAClD,SAASC,IAAI,QAAQ,aAAa;AAElC,SAAQC,aAAa,QAAO,OAAO;AAAC;AAEpC,IAAMC,eAAe,GAAGN,MAAM,CAACO,GAAG,0OAGRJ,MAAM,CAACK,WAAW,EAIxCN,WAAW,CAACO,KAAK,CAGpB;AAID,OAAO,IAAMC,qBAA0E,GAAG,SAA7EA,qBAA0E,OAA0E;EAAA,IAApEC,QAAQ,QAARA,QAAQ;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,WAAW;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAEC,MAAM,QAANA,MAAM;EACxJ,IAAMC,aAAa,GAAGZ,aAAa,CAACH,WAAW,CAACO,KAAK,CAACS,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACE,KAAC,eAAe;IAAA,uBACd,KAAC,MAAM;MAAC,OAAO,EAAEN,OAAQ;MAAC,IAAI,EAAEK,aAAa,GAAGb,IAAI,CAACe,MAAM,GAAGf,IAAI,CAACgB,KAAM;MAAC,QAAQ,EAAET,QAAS;MAAC,IAAI,EAAEE,IAAK;MAAC,OAAO,EAAEE,OAAQ;MAAC,OAAO,EAAEC,MAAO;MAAA,UACzIF;IAAK;EACC,EACO;AAEtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.cjs","names":["Wrapper","styled","div","Z_INDEXES","off_canvas","BREAKPOINTS","SMALL","SwitcherLabel","MobileFooter","COLORS","neutral_200","ComponentXSStyling","ComponentTextStyle","Bold","neutral_600","ComponentSStyling","CustomContent","MobileMenu","show","profile","buttons","label","header","items","footer","action","onClose","useStackState","reset","length","push","pop","peek","isMediumScreen","useMediaMatch","LARGE","replace","location","useLocation","onSubMenuOpen","menu","type","content","customContent","custom","React","useEffect","setTimeout","current","switcher","find","a","undefined"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, Z_INDEXES} from '../../styles';\nimport {SwitchApp} from '../../icons/systemicons/SystemIcons';\nimport {useLocation} from 'react-router-dom';\nimport {IconButton} from '../../Button';\nimport {LaerdalLogo} from '../../assets';\nimport {\n MenuAccountInfo,\n MenuButton,\n MenuNavigationItemTypeGroup,\n MenuGroupFooter,\n MenuGroupHeader,\n MenuIconButton,\n MenuNavigationItemTypeItem,\n MobileNavigationMenuProps,\n ProfileMenu,\n MenuNavigationItemTypeSection,\n MobileMenuButtonTypes,\n MenuSwitcherButton,\n MenuNavigationCustomSubMenu\n} from '../types';\nimport MobileMenuHeader from './MobileMenuHeader';\nimport MobileMenuContent from './MobileMenuContent';\nimport {useStackState} from '../../common/StackState';\nimport {useMediaMatch} from \"rooks\";\n\nconst Wrapper = styled.div`\n width: 320px;\n z-index: ${Z_INDEXES.off_canvas};\n height: 100%;\n box-sizing: border-box;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n ${BREAKPOINTS.SMALL} {\n width: 400px;\n }\n`;\n\nconst SwitcherLabel = styled.div`\n margin-left: auto;\n`;\n\nconst MobileFooter = styled.div`\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 48px;\n\n padding: 0 4px 0 16px;\n border-top: 1px solid ${COLORS.neutral_200};\n\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n padding: 4px 8px 4px 16px;\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n }\n`;\n\nconst CustomContent = styled.div`\n width: 100%;\n box-sizing: border-box;\n flex-flow: column;\n display: flex;\n flex: 1;\n overflow: hidden;\n`;\n\ntype Props = MobileNavigationMenuProps & {\n profile?: ProfileMenu;\n show?: boolean;\n onClose: () => void;\n};\n\ninterface MenuState {\n header: {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n }\n content?: {\n header?: MenuGroupHeader;\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection)[];\n footer?: MenuGroupFooter;\n action?: MenuButton;\n },\n customContent?: () => React.ReactNode;\n footer?: boolean;\n}\n\nconst MobileMenu = ({\n show,\n profile,\n buttons,\n label,\n header,\n items,\n footer,\n action,\n onClose,\n }: Props) => {\n\n const {reset, length, push, pop, peek} = useStackState<MenuState>();\n\n const isMediumScreen = useMediaMatch(BREAKPOINTS.LARGE.replace('@media ', ''));\n\n const location = useLocation();\n\n const onSubMenuOpen = (menu?: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu) => {\n\n switch (menu?.type) {\n case 'group':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n content: {\n header: menu.header,\n items: menu.items,\n footer: menu.footer,\n action: menu.action\n },\n footer: false\n });\n break;\n case 'custom':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n customContent: menu.custom,\n footer: false\n });\n break;\n default:\n break;\n }\n\n };\n\n React.useEffect(() => {\n onClose();\n }, [location]);\n\n React.useEffect(() => {\n isMediumScreen && onClose()\n }, [isMediumScreen]);\n\n React.useEffect(() => {\n setTimeout(() => {\n reset({\n footer: true,\n header: {\n label: label,\n buttons: buttons,\n },\n content: {\n header: header,\n items: items,\n footer: footer,\n action: action\n }\n })\n }, 300)\n }, [show])\n\n\n const current = peek();\n\n const switcher = current?.header?.buttons?.find(a => a.type === 'switcher') as MenuSwitcherButton;\n\n return (\n <Wrapper>\n <MobileMenuHeader buttons={current?.header.buttons}\n onGoBack={length > 1 ? pop : undefined}\n onSubMenuOpen={onSubMenuOpen}\n profile={profile}\n label={current?.header.label}\n onClose={onClose}/>\n {current?.customContent && <CustomContent>{current?.customContent()}</CustomContent>}\n {current?.content && <MobileMenuContent header={current?.content.header}\n items={current?.content.items}\n footer={current?.content.footer}\n action={current?.content.action}\n onSubMenuOpen={onSubMenuOpen}/>}\n\n {\n current?.footer &&\n <MobileFooter>\n <LaerdalLogo height={'36px'} width={'66px'}/>\n {switcher &&\n <>\n <SwitcherLabel className={'globalNav-toggler'} onClick={() => switcher.action && switcher.action() && onClose()}>Switch site</SwitcherLabel>\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n id=\"globalNavAppsButton\"\n action={() => switcher.action && switcher.action() && onClose()}>\n <SwitchApp size=\"24px\"/>\n </IconButton>\n </>\n }\n\n </MobileFooter>\n }\n </Wrapper>\n );\n};\n\nexport default MobileMenu;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AAAoC;AAAA;AAAA;AAAA;AAEpC,IAAMA,OAAO,GAAGC,yBAAM,CAACC,GAAG,qQAEbC,iBAAS,CAACC,UAAU,EAQ7BC,mBAAW,CAACC,KAAK,CAGpB;AAED,IAAMC,aAAa,GAAGN,yBAAM,CAACC,GAAG,6GAE/B;AAED,IAAMM,YAAY,GAAGP,yBAAM,CAACC,GAAG,+TAOLO,cAAM,CAACC,WAAW,EAExC,IAAAC,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAEJ,cAAM,CAACK,WAAW,CAAC,EAC/DT,mBAAW,CAACC,KAAK,EAGf,IAAAS,yBAAiB,EAACH,0BAAkB,CAACC,IAAI,EAAEJ,cAAM,CAACK,WAAW,CAAC,CAEnE;AAED,I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YAAA,OAAMuB,QAAQ,CAACxB,MAAM,IAAIwB,QAAQ,CAACxB,MAAM,EAAE,IAAIC,OAAO,EAAE;UAAA,CAAC;UAAA,uBAChE,qBAAC,sBAAS;YAAC,IAAI,EAAC;UAAM;QAAE,EACb;MAAA,EACZ;IAAA,EAGQ;EAAA,EAET;AAEd,CAAC;AAAC;EA1IAR,IAAI;EACJQ,OAAO;AAAA;AAAA,eA2IMT,UAAU;AAAA"}
|
|
1
|
+
{"version":3,"file":"MobileMenu.cjs","names":["Wrapper","styled","div","Z_INDEXES","off_canvas","BREAKPOINTS","SMALL","SwitcherLabel","MobileFooter","COLORS","neutral_200","ComponentXSStyling","ComponentTextStyle","Bold","neutral_600","ComponentSStyling","CustomContent","MobileMenu","show","profile","buttons","label","header","items","footer","action","onClose","useStackState","reset","length","push","pop","peek","isMediumScreen","useMediaMatch","LARGE","replace","location","useLocation","onSubMenuOpen","menu","type","content","customContent","custom","React","useEffect","setTimeout","current","switcher","find","a","undefined"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, Z_INDEXES} from '../../styles';\nimport {SwitchApp} from '../../icons/systemicons/SystemIcons';\nimport {useLocation} from 'react-router-dom';\nimport {IconButton} from '../../Button';\nimport {LaerdalLogo} from '../../assets';\nimport {\n MenuAccountInfo,\n MenuButton,\n MenuNavigationItemTypeGroup,\n MenuGroupFooter,\n MenuGroupHeader,\n MenuIconButton,\n MenuNavigationItemTypeItem,\n MobileNavigationMenuProps,\n ProfileMenu,\n MenuNavigationItemTypeSection,\n MobileMenuButtonTypes,\n MenuSwitcherButton,\n MenuNavigationCustomSubMenu\n} from '../types';\nimport MobileMenuHeader from './MobileMenuHeader';\nimport MobileMenuContent from './MobileMenuContent';\nimport {useStackState} from '../../common/StackState';\nimport {useMediaMatch} from \"rooks\";\n\nconst Wrapper = styled.div`\n width: 320px;\n z-index: ${Z_INDEXES.off_canvas};\n height: 100%;\n box-sizing: border-box;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n ${BREAKPOINTS.SMALL} {\n width: 400px;\n }\n`;\n\nconst SwitcherLabel = styled.div`\n margin-left: auto;\n`;\n\nconst MobileFooter = styled.div`\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 48px;\n\n padding: 0 4px 0 16px;\n border-top: 1px solid ${COLORS.neutral_200};\n\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n padding: 4px 8px 4px 16px;\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n }\n`;\n\nconst CustomContent = styled.div`\n width: 100%;\n box-sizing: border-box;\n flex-flow: column;\n display: flex;\n flex: 1;\n overflow: hidden;\n`;\n\ntype Props = MobileNavigationMenuProps & {\n profile?: ProfileMenu;\n show?: boolean;\n onClose: () => void;\n};\n\ninterface MenuState {\n header: {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n }\n content?: {\n header?: MenuGroupHeader;\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection)[];\n footer?: MenuGroupFooter;\n action?: MenuButton;\n },\n customContent?: () => React.ReactNode;\n footer?: boolean;\n}\n\nconst MobileMenu = ({\n show,\n profile,\n buttons,\n label,\n header,\n items,\n footer,\n action,\n onClose,\n }: Props) => {\n\n const {reset, length, push, pop, peek} = useStackState<MenuState>();\n\n const isMediumScreen = useMediaMatch(BREAKPOINTS.LARGE.replace('@media ', ''));\n\n const location = useLocation();\n\n const onSubMenuOpen = (menu?: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu) => {\n\n switch (menu?.type) {\n case 'group':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n content: {\n header: menu.header,\n items: menu.items,\n footer: menu.footer,\n action: menu.action\n },\n footer: false\n });\n break;\n case 'custom':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n customContent: menu.custom,\n footer: false\n });\n break;\n default:\n break;\n }\n\n };\n\n React.useEffect(() => {\n onClose();\n }, [location]);\n\n React.useEffect(() => {\n isMediumScreen && onClose()\n }, [isMediumScreen]);\n\n React.useEffect(() => {\n setTimeout(() => {\n reset({\n footer: true,\n header: {\n label: label,\n buttons: buttons,\n },\n content: {\n header: header,\n items: items,\n footer: footer,\n action: action\n }\n })\n }, 300)\n }, [show])\n\n\n const current = peek();\n\n const switcher = current?.header?.buttons?.find(a => a.type === 'switcher') as MenuSwitcherButton;\n\n return (\n <Wrapper>\n <MobileMenuHeader buttons={current?.header.buttons}\n onGoBack={length > 1 ? pop : undefined}\n onSubMenuOpen={onSubMenuOpen}\n profile={profile}\n label={current?.header.label}\n onClose={onClose}/>\n {current?.customContent && <CustomContent>{current?.customContent()}</CustomContent>}\n {current?.content && <MobileMenuContent header={current?.content.header}\n items={current?.content.items}\n footer={current?.content.footer}\n action={current?.content.action}\n onSubMenuOpen={onSubMenuOpen}/>}\n\n {\n current?.footer &&\n <MobileFooter>\n <LaerdalLogo height={'36px'} width={'66px'}/>\n {switcher &&\n <>\n <SwitcherLabel className={'globalNav-toggler'} onClick={() => switcher.action && switcher.action() && onClose()}>Switch site</SwitcherLabel>\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n id=\"globalNavAppsButton\"\n action={() => switcher.action && switcher.action() && onClose()}>\n <SwitchApp size=\"24px\"/>\n </IconButton>\n </>\n }\n\n </MobileFooter>\n }\n </Wrapper>\n );\n};\n\nexport default MobileMenu;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AAAoC;AAAA;AAAA;AAAA;AAEpC,IAAMA,OAAO,GAAGC,yBAAM,CAACC,GAAG,qQAEbC,iBAAS,CAACC,UAAU,EAQ7BC,mBAAW,CAACC,KAAK,CAGpB;AAED,IAAMC,aAA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,iBACP;QAAA,wBACE,qBAAC,aAAa;UAAC,SAAS,EAAE,mBAAoB;UAAC,OAAO,EAAE;YAAA,OAAMA,QAAQ,CAACxB,MAAM,IAAIwB,QAAQ,CAACxB,MAAM,EAAE,IAAIC,OAAO,EAAE;UAAA,CAAC;UAAA,UAAC;QAAW,EAAgB,eAC5I,qBAAC,kBAAU;UACT,OAAO,EAAE,WAAY;UACrB,KAAK,EAAE,UAAW;UAClB,EAAE,EAAC,qBAAqB;UACxB,MAAM,EAAE;YAAA,OAAMuB,QAAQ,CAACxB,MAAM,IAAIwB,QAAQ,CAACxB,MAAM,EAAE,IAAIC,OAAO,EAAE;UAAA,CAAC;UAAA,uBAChE,qBAAC,sBAAS;YAAC,IAAI,EAAC;UAAM;QAAE,EACb;MAAA,EACZ;IAAA,EAGQ;EAAA,EAET;AAEd,CAAC;AAAC;EA1IAR,IAAI;EACJQ,OAAO;AAAA;AAAA,eA2IMT,UAAU;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.js","names":["React","styled","BREAKPOINTS","COLORS","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","SwitchApp","useLocation","IconButton","LaerdalLogo","MobileMenuHeader","MobileMenuContent","useStackState","useMediaMatch","Wrapper","div","off_canvas","SMALL","SwitcherLabel","MobileFooter","neutral_200","Bold","neutral_600","CustomContent","MobileMenu","show","profile","buttons","label","header","items","footer","action","onClose","reset","length","push","pop","peek","isMediumScreen","LARGE","replace","location","onSubMenuOpen","menu","type","content","customContent","custom","useEffect","setTimeout","current","switcher","find","a","undefined"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, Z_INDEXES} from '../../styles';\nimport {SwitchApp} from '../../icons/systemicons/SystemIcons';\nimport {useLocation} from 'react-router-dom';\nimport {IconButton} from '../../Button';\nimport {LaerdalLogo} from '../../assets';\nimport {\n MenuAccountInfo,\n MenuButton,\n MenuNavigationItemTypeGroup,\n MenuGroupFooter,\n MenuGroupHeader,\n MenuIconButton,\n MenuNavigationItemTypeItem,\n MobileNavigationMenuProps,\n ProfileMenu,\n MenuNavigationItemTypeSection,\n MobileMenuButtonTypes,\n MenuSwitcherButton,\n MenuNavigationCustomSubMenu\n} from '../types';\nimport MobileMenuHeader from './MobileMenuHeader';\nimport MobileMenuContent from './MobileMenuContent';\nimport {useStackState} from '../../common/StackState';\nimport {useMediaMatch} from \"rooks\";\n\nconst Wrapper = styled.div`\n width: 320px;\n z-index: ${Z_INDEXES.off_canvas};\n height: 100%;\n box-sizing: border-box;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n ${BREAKPOINTS.SMALL} {\n width: 400px;\n }\n`;\n\nconst SwitcherLabel = styled.div`\n margin-left: auto;\n`;\n\nconst MobileFooter = styled.div`\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 48px;\n\n padding: 0 4px 0 16px;\n border-top: 1px solid ${COLORS.neutral_200};\n\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n padding: 4px 8px 4px 16px;\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n }\n`;\n\nconst CustomContent = styled.div`\n width: 100%;\n box-sizing: border-box;\n flex-flow: column;\n display: flex;\n flex: 1;\n overflow: hidden;\n`;\n\ntype Props = MobileNavigationMenuProps & {\n profile?: ProfileMenu;\n show?: boolean;\n onClose: () => void;\n};\n\ninterface MenuState {\n header: {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n }\n content?: {\n header?: MenuGroupHeader;\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection)[];\n footer?: MenuGroupFooter;\n action?: MenuButton;\n },\n customContent?: () => React.ReactNode;\n footer?: boolean;\n}\n\nconst MobileMenu = ({\n show,\n profile,\n buttons,\n label,\n header,\n items,\n footer,\n action,\n onClose,\n }: Props) => {\n\n const {reset, length, push, pop, peek} = useStackState<MenuState>();\n\n const isMediumScreen = useMediaMatch(BREAKPOINTS.LARGE.replace('@media ', ''));\n\n const location = useLocation();\n\n const onSubMenuOpen = (menu?: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu) => {\n\n switch (menu?.type) {\n case 'group':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n content: {\n header: menu.header,\n items: menu.items,\n footer: menu.footer,\n action: menu.action\n },\n footer: false\n });\n break;\n case 'custom':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n customContent: menu.custom,\n footer: false\n });\n break;\n default:\n break;\n }\n\n };\n\n React.useEffect(() => {\n onClose();\n }, [location]);\n\n React.useEffect(() => {\n isMediumScreen && onClose()\n }, [isMediumScreen]);\n\n React.useEffect(() => {\n setTimeout(() => {\n reset({\n footer: true,\n header: {\n label: label,\n buttons: buttons,\n },\n content: {\n header: header,\n items: items,\n footer: footer,\n action: action\n }\n })\n }, 300)\n }, [show])\n\n\n const current = peek();\n\n const switcher = current?.header?.buttons?.find(a => a.type === 'switcher') as MenuSwitcherButton;\n\n return (\n <Wrapper>\n <MobileMenuHeader buttons={current?.header.buttons}\n onGoBack={length > 1 ? pop : undefined}\n onSubMenuOpen={onSubMenuOpen}\n profile={profile}\n label={current?.header.label}\n onClose={onClose}/>\n {current?.customContent && <CustomContent>{current?.customContent()}</CustomContent>}\n {current?.content && <MobileMenuContent header={current?.content.header}\n items={current?.content.items}\n footer={current?.content.footer}\n action={current?.content.action}\n onSubMenuOpen={onSubMenuOpen}/>}\n\n {\n current?.footer &&\n <MobileFooter>\n <LaerdalLogo height={'36px'} width={'66px'}/>\n {switcher &&\n <>\n <SwitcherLabel className={'globalNav-toggler'} onClick={() => switcher.action && switcher.action() && onClose()}>Switch site</SwitcherLabel>\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n id=\"globalNavAppsButton\"\n action={() => switcher.action && switcher.action() && onClose()}>\n <SwitchApp size=\"24px\"/>\n </IconButton>\n </>\n }\n\n </MobileFooter>\n }\n </Wrapper>\n );\n};\n\nexport default MobileMenu;\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,WAAW,EAAEC,MAAM,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,SAAS,QAAO,cAAc;AACtH,SAAQC,SAAS,QAAO,qCAAqC;AAC7D,SAAQC,WAAW,QAAO,kBAAkB;AAC5C,SAAQC,UAAU,QAAO,cAAc;AACvC,SAAQC,WAAW,QAAO,cAAc;AAgBxC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAAQC,aAAa,QAAO,yBAAyB;AACrD,SAAQC,aAAa,QAAO,OAAO;AAAC;AAAA;AAAA;AAEpC,IAAMC,OAAO,GAAGf,MAAM,CAACgB,GAAG,uPAEbV,SAAS,CAACW,UAAU,EAQ7BhB,WAAW,CAACiB,KAAK,CAGpB;AAED,IAAMC,aAAa,GAAGnB,MAAM,CAACgB,GAAG,+FAE/B;AAED,IAAMI,YAAY,GAAGpB,MAAM,CAACgB,GAAG,iTAOLd,MAAM,CAACmB,WAAW,EAExChB,kBAAkB,CAACD,kBAAkB,CAACkB,IAAI,EAAEpB,MAAM,CAACqB,WAAW,CAAC,EAC/DtB,WAAW,CAACiB,KAAK,EAGff,iBAAiB,CAACC,kBAAkB,CAACkB,IAAI,EAAEpB,MAAM,CAACqB,WAAW,CAAC,CAEnE;AAED,IAAMC,aAAa,GAAGxB,MAAM,CAACgB,GAAG,6LAO/B;AAuBD,IAAMS,UAAU,GAAG,SAAbA,UAAU,OAUiB;EAAA;EAAA,IATXC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IACPC,O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AET;AAEd,CAAC;AAAC;EA1IAR,IAAI;EACJQ,OAAO;AAAA;AA2IT,eAAeT,UAAU"}
|
|
1
|
+
{"version":3,"file":"MobileMenu.js","names":["React","styled","BREAKPOINTS","COLORS","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","SwitchApp","useLocation","IconButton","LaerdalLogo","MobileMenuHeader","MobileMenuContent","useStackState","useMediaMatch","Wrapper","div","off_canvas","SMALL","SwitcherLabel","MobileFooter","neutral_200","Bold","neutral_600","CustomContent","MobileMenu","show","profile","buttons","label","header","items","footer","action","onClose","reset","length","push","pop","peek","isMediumScreen","LARGE","replace","location","onSubMenuOpen","menu","type","content","customContent","custom","useEffect","setTimeout","current","switcher","find","a","undefined"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, Z_INDEXES} from '../../styles';\nimport {SwitchApp} from '../../icons/systemicons/SystemIcons';\nimport {useLocation} from 'react-router-dom';\nimport {IconButton} from '../../Button';\nimport {LaerdalLogo} from '../../assets';\nimport {\n MenuAccountInfo,\n MenuButton,\n MenuNavigationItemTypeGroup,\n MenuGroupFooter,\n MenuGroupHeader,\n MenuIconButton,\n MenuNavigationItemTypeItem,\n MobileNavigationMenuProps,\n ProfileMenu,\n MenuNavigationItemTypeSection,\n MobileMenuButtonTypes,\n MenuSwitcherButton,\n MenuNavigationCustomSubMenu\n} from '../types';\nimport MobileMenuHeader from './MobileMenuHeader';\nimport MobileMenuContent from './MobileMenuContent';\nimport {useStackState} from '../../common/StackState';\nimport {useMediaMatch} from \"rooks\";\n\nconst Wrapper = styled.div`\n width: 320px;\n z-index: ${Z_INDEXES.off_canvas};\n height: 100%;\n box-sizing: border-box;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n ${BREAKPOINTS.SMALL} {\n width: 400px;\n }\n`;\n\nconst SwitcherLabel = styled.div`\n margin-left: auto;\n`;\n\nconst MobileFooter = styled.div`\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 48px;\n\n padding: 0 4px 0 16px;\n border-top: 1px solid ${COLORS.neutral_200};\n\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n padding: 4px 8px 4px 16px;\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n }\n`;\n\nconst CustomContent = styled.div`\n width: 100%;\n box-sizing: border-box;\n flex-flow: column;\n display: flex;\n flex: 1;\n overflow: hidden;\n`;\n\ntype Props = MobileNavigationMenuProps & {\n profile?: ProfileMenu;\n show?: boolean;\n onClose: () => void;\n};\n\ninterface MenuState {\n header: {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n }\n content?: {\n header?: MenuGroupHeader;\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection)[];\n footer?: MenuGroupFooter;\n action?: MenuButton;\n },\n customContent?: () => React.ReactNode;\n footer?: boolean;\n}\n\nconst MobileMenu = ({\n show,\n profile,\n buttons,\n label,\n header,\n items,\n footer,\n action,\n onClose,\n }: Props) => {\n\n const {reset, length, push, pop, peek} = useStackState<MenuState>();\n\n const isMediumScreen = useMediaMatch(BREAKPOINTS.LARGE.replace('@media ', ''));\n\n const location = useLocation();\n\n const onSubMenuOpen = (menu?: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu) => {\n\n switch (menu?.type) {\n case 'group':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n content: {\n header: menu.header,\n items: menu.items,\n footer: menu.footer,\n action: menu.action\n },\n footer: false\n });\n break;\n case 'custom':\n push({\n header: {\n label: menu.label,\n buttons: menu.buttons,\n },\n customContent: menu.custom,\n footer: false\n });\n break;\n default:\n break;\n }\n\n };\n\n React.useEffect(() => {\n onClose();\n }, [location]);\n\n React.useEffect(() => {\n isMediumScreen && onClose()\n }, [isMediumScreen]);\n\n React.useEffect(() => {\n setTimeout(() => {\n reset({\n footer: true,\n header: {\n label: label,\n buttons: buttons,\n },\n content: {\n header: header,\n items: items,\n footer: footer,\n action: action\n }\n })\n }, 300)\n }, [show])\n\n\n const current = peek();\n\n const switcher = current?.header?.buttons?.find(a => a.type === 'switcher') as MenuSwitcherButton;\n\n return (\n <Wrapper>\n <MobileMenuHeader buttons={current?.header.buttons}\n onGoBack={length > 1 ? pop : undefined}\n onSubMenuOpen={onSubMenuOpen}\n profile={profile}\n label={current?.header.label}\n onClose={onClose}/>\n {current?.customContent && <CustomContent>{current?.customContent()}</CustomContent>}\n {current?.content && <MobileMenuContent header={current?.content.header}\n items={current?.content.items}\n footer={current?.content.footer}\n action={current?.content.action}\n onSubMenuOpen={onSubMenuOpen}/>}\n\n {\n current?.footer &&\n <MobileFooter>\n <LaerdalLogo height={'36px'} width={'66px'}/>\n {switcher &&\n <>\n <SwitcherLabel className={'globalNav-toggler'} onClick={() => switcher.action && switcher.action() && onClose()}>Switch site</SwitcherLabel>\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n id=\"globalNavAppsButton\"\n action={() => switcher.action && switcher.action() && onClose()}>\n <SwitchApp size=\"24px\"/>\n </IconButton>\n </>\n }\n\n </MobileFooter>\n }\n </Wrapper>\n );\n};\n\nexport default MobileMenu;\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,WAAW,EAAEC,MAAM,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,SAAS,QAAO,cAAc;AACtH,SAAQC,SAAS,QAAO,qCAAqC;AAC7D,SAAQC,WAAW,QAAO,kBAAkB;AAC5C,SAAQC,UAAU,QAAO,cAAc;AACvC,SAAQC,WAAW,QAAO,cAAc;AAgBxC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,iBAAiB,MAA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AEW;IAAc,EAAE,EAGrE,CAAAQ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEpB,MAAM,kBACf,MAAC,YAAY;MAAA,wBACX,KAAC,WAAW;QAAC,MAAM,EAAE,MAAO;QAAC,KAAK,EAAE;MAAO,EAAE,EAC5CqB,QAAQ,iBACP;QAAA,wBACE,KAAC,aAAa;UAAC,SAAS,EAAE,mBAAoB;UAAC,OAAO,EAAE;YAAA,OAAMA,QAAQ,CAACpB,MAAM,IAAIoB,QAAQ,CAACpB,MAAM,EAAE,IAAIC,OAAO,EAAE;UAAA,CAAC;UAAA,UAAC;QAAW,EAAgB,eAC5I,KAAC,UAAU;UACT,OAAO,EAAE,WAAY;UACrB,KAAK,EAAE,UAAW;UAClB,EAAE,EAAC,qBAAqB;UACxB,MAAM,EAAE;YAAA,OAAMmB,QAAQ,CAACpB,MAAM,IAAIoB,QAAQ,CAACpB,MAAM,EAAE,IAAIC,OAAO,EAAE;UAAA,CAAC;UAAA,uBAChE,KAAC,SAAS;YAAC,IAAI,EAAC;UAAM;QAAE,EACb;MAAA,EACZ;IAAA,EAGQ;EAAA,EAET;AAEd,CAAC;AAAC;EA1IAR,IAAI;EACJQ,OAAO;AAAA;AA2IT,eAAeT,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton {\n label: string;\n
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}
|
|
@@ -3,17 +3,16 @@ import { HyperlinkProps } from '../HyperLink/HyperLink';
|
|
|
3
3
|
import { IconButtonProps } from '../Button/Iconbutton';
|
|
4
4
|
import { ProfileButtonProps } from '../ProfileButton/ProfileButton';
|
|
5
5
|
import { NavLinkProps } from 'react-router-dom';
|
|
6
|
+
import { ButtonProps } from "../Button/Button";
|
|
7
|
+
import { TooltipProps } from "../Tooltips/TooltipTypes";
|
|
6
8
|
export interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {
|
|
7
9
|
label: string;
|
|
8
10
|
icon?: React.ReactElement;
|
|
9
11
|
}
|
|
10
|
-
export interface MenuButton {
|
|
12
|
+
export interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {
|
|
11
13
|
label: string;
|
|
12
|
-
icon?: React.ReactNode;
|
|
13
14
|
action: () => void;
|
|
14
|
-
|
|
15
|
-
isLoading?: boolean;
|
|
16
|
-
variant?: 'primary' | 'secondary';
|
|
15
|
+
tooltip?: TooltipProps;
|
|
17
16
|
}
|
|
18
17
|
export interface MenuGroupFooter {
|
|
19
18
|
header: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton {\n label: string;\n
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}
|
|
@@ -13,8 +13,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
14
|
import { LoadingIndicator } from '..';
|
|
15
15
|
import React from 'react';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
var ImageWithFallbacks = /*#__PURE__*/function (_React$Component) {
|
|
20
20
|
_inherits(ImageWithFallbacks, _React$Component);
|
|
@@ -43,9 +43,9 @@ import { Size } from '../types';
|
|
|
43
43
|
/**
|
|
44
44
|
* Add custom types.
|
|
45
45
|
*/
|
|
46
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
46
47
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
47
48
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
48
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
49
49
|
/**
|
|
50
50
|
* Add custom styles.
|
|
51
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatepickerFieldHeader.cjs","names":["HeaderLabelContainer","styled","div","COLORS","neutral_600","CommonInteractionStyling","primary_600","DatepickerFieldHeader","date","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","setYearPickerMode","yearPickerMode","setActiveMonthPage","months","handleDecreaseMonth","previousMonth","getMonth","length","handleIncreaseMonth","nextMonth","React","useEffect","display","justifyContent","getFullYear","customHeaderCount","prevYearButtonDisabled","nextYearButtonDisabled"],"sources":["../../src/InputFields/DatepickerFieldHeader.tsx"],"sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\nimport { ArrowDropUp, ArrowDropDown } from '../icons/systemicons/SystemIcons';\nimport styled from 'styled-components';\nimport { CommonInteractionStyling } from '../common';\nimport { scrollBarStyling, COLORS } from '../styles';\n\nexport interface DatepickerFieldHeaderParams {\n date: Date;\n changeYear(year: number): void;\n changeMonth(month: number): void;\n customHeaderCount: number;\n decreaseMonth(): void;\n increaseMonth(): void;\n prevMonthButtonDisabled: boolean;\n nextMonthButtonDisabled: boolean;\n decreaseYear(): void;\n increaseYear(): void;\n prevYearButtonDisabled: boolean;\n nextYearButtonDisabled: boolean;\n yearPickerMode: boolean;\n setYearPickerMode(val: boolean): void;\n setActiveMonthPage(val: number): void;\n}\n\nconst HeaderLabelContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n\n ${CommonInteractionStyling}\n\n &:hover {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n\n &:active {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n`;\n\nexport const DatepickerFieldHeader = ({\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n setYearPickerMode,\n yearPickerMode,\n setActiveMonthPage,\n}: DatepickerFieldHeaderParams) => {\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const handleDecreaseMonth = () => {\n let previousMonth = date.getMonth() - 1;\n if (previousMonth < 0) previousMonth = months.length - 1;\n setActiveMonthPage(previousMonth);\n decreaseMonth();\n };\n\n const handleIncreaseMonth = () => {\n let nextMonth = date.getMonth() + 1;\n if (nextMonth >= months.length - 1) nextMonth = 0;\n setActiveMonthPage(nextMonth);\n increaseMonth();\n };\n\n React.useEffect(() => {\n setActiveMonthPage(date.getMonth());\n }, [date]);\n\n return (\n <>\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--previous\" onClick={handleDecreaseMonth} disabled={prevMonthButtonDisabled}>\n Prevoius month\n </button>\n )}\n <HeaderLabelContainer onClick={() => setYearPickerMode(!yearPickerMode)}>\n <div className=\"react-datepicker__current-month\">{`${months[date.getMonth()]} ${date.getFullYear()}`}</div>\n {yearPickerMode ? <ArrowDropUp size=\"24px\" /> : <ArrowDropDown size=\"24px\" />}\n </HeaderLabelContainer>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--next\" onClick={handleIncreaseMonth} disabled={nextMonthButtonDisabled}>\n Next month\n </button>\n )}\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAAA;AAoBrD,IAAMA,oBAAoB,GAAGC,yBAAM,CAACC,GAAG,giBAc1BC,cAAM,CAACC,WAAW,EAG3BC,gCAAwB,EAIbF,cAAM,CAACG,WAAW,EAGlBH,cAAM,CAACG,WAAW,EAMlBH,cAAM,CAACG,WAAW,EAGlBH,cAAM,CAACG,WAAW,CAGhC;AAEM,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqB,OASC;EAAA,IARjCC,IAAI,QAAJA,IAAI;IACJC,aAAa,QAAbA,aAAa;IACbC,aAAa,QAAbA,aAAa;IACbC,uBAAuB,QAAvBA,uBAAuB;IACvBC,uBAAuB,QAAvBA,uBAAuB;IACvBC,iBAAiB,QAAjBA,iBAAiB;IACjBC,cAAc,QAAdA,cAAc;IACdC,kBAAkB,QAAlBA,kBAAkB;EAElB,IAAMC,MAAM,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;EACzI,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,GAAS;IAChC,IAAIC,aAAa,GAAGV,IAAI,CAACW,QAAQ,EAAE,GAAG,CAAC;IACvC,IAAID,aAAa,GAAG,CAAC,EAAEA,aAAa,GAAGF,MAAM,CAACI,MAAM,GAAG,CAAC;IACxDL,kBAAkB,CAACG,aAAa,CAAC;IACjCT,aAAa,EAAE;EACjB,CAAC;EAED,IAAMY,mBAAmB,GAAG,SAAtBA,mBAAmB,GAAS;IAChC,IAAIC,SAAS,GAAGd,IAAI,CAACW,QAAQ,EAAE,GAAG,CAAC;IACnC,IAAIG,SAAS,IAAIN,MAAM,CAACI,MAAM,GAAG,CAAC,EAAEE,SAAS,GAAG,CAAC;IACjDP,kBAAkB,CAACO,SAAS,CAAC;IAC7BZ,aAAa,EAAE;EACjB,CAAC;EAEDa,KAAK,CAACC,SAAS,CAAC,YAAM;IACpBT,kBAAkB,CAACP,IAAI,CAACW,QAAQ,EAAE,CAAC;EACrC,CAAC,EAAE,CAACX,IAAI,CAAC,CAAC;EAEV,oBACE;IAAA,uBACE;MACE,KAAK,EAAE;QACLiB,OAAO,EAAE,MAAM;QACfC,cAAc,EAAE;MAClB,CAAE;MAAA,WACD,CAACZ,cAAc,iBACd;QAAQ,SAAS,EAAC,qEAAqE;QAAC,OAAO,EAAEG,mBAAoB;QAAC,QAAQ,EAAEN,uBAAwB;QAAA;
|
|
1
|
+
{"version":3,"file":"DatepickerFieldHeader.cjs","names":["HeaderLabelContainer","styled","div","COLORS","neutral_600","CommonInteractionStyling","primary_600","DatepickerFieldHeader","date","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","setYearPickerMode","yearPickerMode","setActiveMonthPage","months","handleDecreaseMonth","previousMonth","getMonth","length","handleIncreaseMonth","nextMonth","React","useEffect","display","justifyContent","getFullYear","customHeaderCount","prevYearButtonDisabled","nextYearButtonDisabled"],"sources":["../../src/InputFields/DatepickerFieldHeader.tsx"],"sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\nimport { ArrowDropUp, ArrowDropDown } from '../icons/systemicons/SystemIcons';\nimport styled from 'styled-components';\nimport { CommonInteractionStyling } from '../common';\nimport { scrollBarStyling, COLORS } from '../styles';\n\nexport interface DatepickerFieldHeaderParams {\n date: Date;\n changeYear(year: number): void;\n changeMonth(month: number): void;\n customHeaderCount: number;\n decreaseMonth(): void;\n increaseMonth(): void;\n prevMonthButtonDisabled: boolean;\n nextMonthButtonDisabled: boolean;\n decreaseYear(): void;\n increaseYear(): void;\n prevYearButtonDisabled: boolean;\n nextYearButtonDisabled: boolean;\n yearPickerMode: boolean;\n setYearPickerMode(val: boolean): void;\n setActiveMonthPage(val: number): void;\n}\n\nconst HeaderLabelContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n\n ${CommonInteractionStyling}\n\n &:hover {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n\n &:active {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n`;\n\nexport const DatepickerFieldHeader = ({\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n setYearPickerMode,\n yearPickerMode,\n setActiveMonthPage,\n}: DatepickerFieldHeaderParams) => {\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const handleDecreaseMonth = () => {\n let previousMonth = date.getMonth() - 1;\n if (previousMonth < 0) previousMonth = months.length - 1;\n setActiveMonthPage(previousMonth);\n decreaseMonth();\n };\n\n const handleIncreaseMonth = () => {\n let nextMonth = date.getMonth() + 1;\n if (nextMonth >= months.length - 1) nextMonth = 0;\n setActiveMonthPage(nextMonth);\n increaseMonth();\n };\n\n React.useEffect(() => {\n setActiveMonthPage(date.getMonth());\n }, [date]);\n\n return (\n <>\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--previous\" onClick={handleDecreaseMonth} disabled={prevMonthButtonDisabled}>\n Prevoius month\n </button>\n )}\n <HeaderLabelContainer onClick={() => setYearPickerMode(!yearPickerMode)}>\n <div className=\"react-datepicker__current-month\">{`${months[date.getMonth()]} ${date.getFullYear()}`}</div>\n {yearPickerMode ? <ArrowDropUp size=\"24px\" /> : <ArrowDropDown size=\"24px\" />}\n </HeaderLabelContainer>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--next\" onClick={handleIncreaseMonth} disabled={nextMonthButtonDisabled}>\n Next month\n </button>\n )}\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAAA;AAoBrD,IAAMA,oBAAoB,GAAGC,yBAAM,CAACC,GAAG,giBAc1BC,cAAM,CAACC,WAAW,EAG3BC,gCAAwB,EAIbF,cAAM,CAACG,WAAW,EAGlBH,cAAM,CAACG,WAAW,EAMlBH,cAAM,CAACG,WAAW,EAGlBH,cAAM,CAACG,WAAW,CAGhC;AAEM,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqB,OASC;EAAA,IARjCC,IAAI,QAAJA,IAAI;IACJC,aAAa,QAAbA,aAAa;IACbC,aAAa,QAAbA,aAAa;IACbC,uBAAuB,QAAvBA,uBAAuB;IACvBC,uBAAuB,QAAvBA,uBAAuB;IACvBC,iBAAiB,QAAjBA,iBAAiB;IACjBC,cAAc,QAAdA,cAAc;IACdC,kBAAkB,QAAlBA,kBAAkB;EAElB,IAAMC,MAAM,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;EACzI,IAAMC,mBAAm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,EACxD,EACtB,CAACA,cAAc,iBACd;QAAQ,SAAS,EAAC,iEAAiE;QAAC,OAAO,EAAEO,mBAAoB;QAAC,QAAQ,EAAET,uBAAwB;QAAA,UAAC;MAErJ,EACD;IAAA;EACG,EACL;AAEP,CAAC;AAAC;AAAA;EA5GAJ,IAAI;EAGJoB,iBAAiB;EAGjBjB,uBAAuB;EACvBC,uBAAuB;EAGvBiB,sBAAsB;EACtBC,sBAAsB;EACtBhB,cAAc;AAAA"}
|
|
@@ -9,9 +9,9 @@ import { ArrowDropUp, ArrowDropDown } from '../icons/systemicons/SystemIcons';
|
|
|
9
9
|
import styled from 'styled-components';
|
|
10
10
|
import { CommonInteractionStyling } from '../common';
|
|
11
11
|
import { COLORS } from '../styles';
|
|
12
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
15
|
var HeaderLabelContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ", ";\n }\n\n ", "\n\n &:hover {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n\n &:active {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n"])), COLORS.neutral_600, CommonInteractionStyling, COLORS.primary_600, COLORS.primary_600, COLORS.primary_600, COLORS.primary_600);
|
|
16
16
|
export var DatepickerFieldHeader = function DatepickerFieldHeader(_ref) {
|
|
17
17
|
var date = _ref.date,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatepickerFieldHeader.js","names":["React","ArrowDropUp","ArrowDropDown","styled","CommonInteractionStyling","COLORS","HeaderLabelContainer","div","neutral_600","primary_600","DatepickerFieldHeader","date","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","setYearPickerMode","yearPickerMode","setActiveMonthPage","months","handleDecreaseMonth","previousMonth","getMonth","length","handleIncreaseMonth","nextMonth","useEffect","display","justifyContent","getFullYear","customHeaderCount","prevYearButtonDisabled","nextYearButtonDisabled"],"sources":["../../src/InputFields/DatepickerFieldHeader.tsx"],"sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\nimport { ArrowDropUp, ArrowDropDown } from '../icons/systemicons/SystemIcons';\nimport styled from 'styled-components';\nimport { CommonInteractionStyling } from '../common';\nimport { scrollBarStyling, COLORS } from '../styles';\n\nexport interface DatepickerFieldHeaderParams {\n date: Date;\n changeYear(year: number): void;\n changeMonth(month: number): void;\n customHeaderCount: number;\n decreaseMonth(): void;\n increaseMonth(): void;\n prevMonthButtonDisabled: boolean;\n nextMonthButtonDisabled: boolean;\n decreaseYear(): void;\n increaseYear(): void;\n prevYearButtonDisabled: boolean;\n nextYearButtonDisabled: boolean;\n yearPickerMode: boolean;\n setYearPickerMode(val: boolean): void;\n setActiveMonthPage(val: number): void;\n}\n\nconst HeaderLabelContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n\n ${CommonInteractionStyling}\n\n &:hover {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n\n &:active {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n`;\n\nexport const DatepickerFieldHeader = ({\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n setYearPickerMode,\n yearPickerMode,\n setActiveMonthPage,\n}: DatepickerFieldHeaderParams) => {\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const handleDecreaseMonth = () => {\n let previousMonth = date.getMonth() - 1;\n if (previousMonth < 0) previousMonth = months.length - 1;\n setActiveMonthPage(previousMonth);\n decreaseMonth();\n };\n\n const handleIncreaseMonth = () => {\n let nextMonth = date.getMonth() + 1;\n if (nextMonth >= months.length - 1) nextMonth = 0;\n setActiveMonthPage(nextMonth);\n increaseMonth();\n };\n\n React.useEffect(() => {\n setActiveMonthPage(date.getMonth());\n }, [date]);\n\n return (\n <>\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--previous\" onClick={handleDecreaseMonth} disabled={prevMonthButtonDisabled}>\n Prevoius month\n </button>\n )}\n <HeaderLabelContainer onClick={() => setYearPickerMode(!yearPickerMode)}>\n <div className=\"react-datepicker__current-month\">{`${months[date.getMonth()]} ${date.getFullYear()}`}</div>\n {yearPickerMode ? <ArrowDropUp size=\"24px\" /> : <ArrowDropDown size=\"24px\" />}\n </HeaderLabelContainer>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--next\" onClick={handleIncreaseMonth} disabled={nextMonthButtonDisabled}>\n Next month\n </button>\n )}\n </div>\n </>\n );\n};\n"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,EAAEC,aAAa,QAAQ,kCAAkC;AAC7E,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,wBAAwB,QAAQ,WAAW;AACpD,SAA2BC,MAAM,QAAQ,WAAW;AAAC;AAAA;AAAA;AAoBrD,IAAMC,oBAAoB,GAAGH,MAAM,CAACI,GAAG,khBAc1BF,MAAM,CAACG,WAAW,EAG3BJ,wBAAwB,EAIbC,MAAM,CAACI,WAAW,EAGlBJ,MAAM,CAACI,WAAW,EAMlBJ,MAAM,CAACI,WAAW,EAGlBJ,MAAM,CAACI,WAAW,CAGhC;AAED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X,cAAc,iBACd;QAAQ,SAAS,EAAC,qEAAqE;QAAC,OAAO,EAAEG,mBAAoB;QAAC,QAAQ,EAAEN,uBAAwB;QAAA;
|
|
1
|
+
{"version":3,"file":"DatepickerFieldHeader.js","names":["React","ArrowDropUp","ArrowDropDown","styled","CommonInteractionStyling","COLORS","HeaderLabelContainer","div","neutral_600","primary_600","DatepickerFieldHeader","date","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","setYearPickerMode","yearPickerMode","setActiveMonthPage","months","handleDecreaseMonth","previousMonth","getMonth","length","handleIncreaseMonth","nextMonth","useEffect","display","justifyContent","getFullYear","customHeaderCount","prevYearButtonDisabled","nextYearButtonDisabled"],"sources":["../../src/InputFields/DatepickerFieldHeader.tsx"],"sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\nimport { ArrowDropUp, ArrowDropDown } from '../icons/systemicons/SystemIcons';\nimport styled from 'styled-components';\nimport { CommonInteractionStyling } from '../common';\nimport { scrollBarStyling, COLORS } from '../styles';\n\nexport interface DatepickerFieldHeaderParams {\n date: Date;\n changeYear(year: number): void;\n changeMonth(month: number): void;\n customHeaderCount: number;\n decreaseMonth(): void;\n increaseMonth(): void;\n prevMonthButtonDisabled: boolean;\n nextMonthButtonDisabled: boolean;\n decreaseYear(): void;\n increaseYear(): void;\n prevYearButtonDisabled: boolean;\n nextYearButtonDisabled: boolean;\n yearPickerMode: boolean;\n setYearPickerMode(val: boolean): void;\n setActiveMonthPage(val: number): void;\n}\n\nconst HeaderLabelContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n\n ${CommonInteractionStyling}\n\n &:hover {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n\n &:active {\n div {\n color: ${COLORS.primary_600} !important;\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n`;\n\nexport const DatepickerFieldHeader = ({\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n setYearPickerMode,\n yearPickerMode,\n setActiveMonthPage,\n}: DatepickerFieldHeaderParams) => {\n const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const handleDecreaseMonth = () => {\n let previousMonth = date.getMonth() - 1;\n if (previousMonth < 0) previousMonth = months.length - 1;\n setActiveMonthPage(previousMonth);\n decreaseMonth();\n };\n\n const handleIncreaseMonth = () => {\n let nextMonth = date.getMonth() + 1;\n if (nextMonth >= months.length - 1) nextMonth = 0;\n setActiveMonthPage(nextMonth);\n increaseMonth();\n };\n\n React.useEffect(() => {\n setActiveMonthPage(date.getMonth());\n }, [date]);\n\n return (\n <>\n <div\n style={{\n display: 'flex',\n justifyContent: 'center',\n }}>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--previous\" onClick={handleDecreaseMonth} disabled={prevMonthButtonDisabled}>\n Prevoius month\n </button>\n )}\n <HeaderLabelContainer onClick={() => setYearPickerMode(!yearPickerMode)}>\n <div className=\"react-datepicker__current-month\">{`${months[date.getMonth()]} ${date.getFullYear()}`}</div>\n {yearPickerMode ? <ArrowDropUp size=\"24px\" /> : <ArrowDropDown size=\"24px\" />}\n </HeaderLabelContainer>\n {!yearPickerMode && (\n <button className=\"react-datepicker__navigation react-datepicker__navigation--next\" onClick={handleIncreaseMonth} disabled={nextMonthButtonDisabled}>\n Next month\n </button>\n )}\n </div>\n </>\n );\n};\n"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,EAAEC,aAAa,QAAQ,kCAAkC;AAC7E,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,wBAAwB,QAAQ,WAAW;AACpD,SAA2BC,MAAM,QAAQ,WAAW;AAAC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0B,SAAS,CAAC,YAAM;IACpBR,kBAAkB,CAACP,IAAI,CAACW,QAAQ,EAAE,CAAC;EACrC,CAAC,EAAE,CAACX,IAAI,CAAC,CAAC;EAEV,oBACE;IAAA,uBACE;MACE,KAAK,EAAE;QACLgB,OAAO,EAAE,MAAM;QACfC,cAAc,EAAE;MAClB,CAAE;MAAA,WACD,CAACX,cAAc,iBACd;QAAQ,SAAS,EAAC,qEAAqE;QAAC,OAAO,EAAEG,mBAAoB;QAAC,QAAQ,EAAEN,uBAAwB;QAAA,UAAC;MAEzJ,EACD,eACD,MAAC,oBAAoB;QAAC,OAAO,EAAE;UAAA,OAAME,iBAAiB,CAAC,CAACC,cAAc,CAAC;QAAA,CAAC;QAAA,wBACtE;UAAK,SAAS,EAAC,iCAAiC;UAAA,oBAAKE,MAAM,CAACR,IAAI,CAACW,QAAQ,EAAE,CAAC,cAAIX,IAAI,CAACkB,WAAW,EAAE;QAAA,EAAS,EAC1GZ,cAAc,gBAAG,KAAC,WAAW;UAAC,IAAI,EAAC;QAAM,EAAG,gBAAG,KAAC,aAAa;UAAC,IAAI,EAAC;QAAM,EAAG;MAAA,EACxD,EACtB,CAACA,cAAc,iBACd;QAAQ,SAAS,EAAC,iEAAiE;QAAC,OAAO,EAAEO,mBAAoB;QAAC,QAAQ,EAAET,uBAAwB;QAAA,UAAC;MAErJ,EACD;IAAA;EACG,EACL;AAEP,CAAC;AAAC;EA5GAJ,IAAI;EAGJmB,iBAAiB;EAGjBhB,uBAAuB;EACvBC,uBAAuB;EAGvBgB,sBAAsB;EACtBC,sBAAsB;EACtBf,cAAc;AAAA"}
|
|
@@ -15,9 +15,9 @@ import { SystemIcons } from '../icons';
|
|
|
15
15
|
import { COLORS, focusStyles, Z_INDEXES } from '../styles';
|
|
16
16
|
import { ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXXSStyling, ComponentXSStyling } from '../styles/typography';
|
|
17
17
|
import { Size } from '../types';
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
21
|
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
22
22
|
var PrefixContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n color: ", ";\n ", "\n position: absolute;\n padding: ", ";\n"])), function (props) {
|
|
23
23
|
return props.size === Size.Small ? '10px' : '11px';
|
|
@@ -16,9 +16,9 @@ import { useFocusVisibleRef } from '../common';
|
|
|
16
16
|
import { IconButton } from '../Button';
|
|
17
17
|
import { SystemIcons } from '../icons';
|
|
18
18
|
import { TechnicalWarning } from '../icons/systemicons/SystemIcons';
|
|
19
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
22
|
var StyledPassSwitch = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n z-index: ", ";\n right: 0;\n position: absolute;\n"])), Z_INDEXES.badge);
|
|
23
23
|
var PasswordRow = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n"])));
|
|
24
24
|
var PasswordField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -12,9 +12,9 @@ import SearchField from './components/SearchField';
|
|
|
12
12
|
import styled from 'styled-components';
|
|
13
13
|
import { DropdownContent } from '../Dropdown';
|
|
14
14
|
import { useClickOutsideRef } from '../common';
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
18
|
var ClearIconWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n &.hidden {\n display: none !important;\n }\n"])));
|
|
19
19
|
var SearchBar = function SearchBar(_ref) {
|
|
20
20
|
var id = _ref.id,
|
|
@@ -10,9 +10,9 @@ import { COLORS } from '../styles';
|
|
|
10
10
|
import { States } from '../types';
|
|
11
11
|
import { InputFieldStyling, InputWrapper, NoteMessage, ValidationMessage } from './styling';
|
|
12
12
|
import { useFocusVisibleRef } from '../common';
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
16
|
var TextField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17
17
|
var id = _ref.id,
|
|
18
18
|
disabled = _ref.disabled,
|
|
@@ -10,8 +10,8 @@ import React from 'react';
|
|
|
10
10
|
import { Size } from '../types';
|
|
11
11
|
import styled from 'styled-components';
|
|
12
12
|
import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
export var Bar = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n height: 6px;\n\n &.small {\n height: 6px;\n }\n\n &.medium {\n height: 8px;\n }\n\n &.large {\n height: 12px;\n }\n\n background-color: ", ";\n\n &.active {\n background-color: ", ";\n }\n\n &.current {\n background-color: ", ";\n }\n\n &.inverted {\n background-color: ", ";\n }\n\n &.inverted.active {\n background-color: ", ";\n }\n\n &.inverted.current {\n background-color: ", ";\n }\n\n"])), COLORS.neutral_100, COLORS.accent1_400, COLORS.accent1_800, COLORS.neutral_600, COLORS.accent1_400, COLORS.white);
|
|
17
17
|
export var Dot = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n\n\n &:after {\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: ", ";\n }\n\n &.small {\n &:after {\n width: 6px;\n height: 6px;\n }\n\n &.current:after {\n width: 10px;\n height: 10px;\n }\n }\n\n &.medium {\n &:after {\n width: 8px;\n height: 8px;\n }\n\n &.current:after {\n width: 12px;\n height: 12px;\n }\n }\n\n &.large {\n &:after {\n width: 12px;\n height: 12px;\n }\n\n &.current:after {\n width: 16px;\n height: 16px;\n }\n }\n\n\n &.active:after {\n background-color: ", ";\n }\n\n &.current:after {\n background-color: ", ";\n }\n\n &.inverted:after {\n background-color: ", ";\n }\n\n &.inverted.active:after {\n background-color: ", ";\n }\n\n &.inverted.current:after {\n background-color: ", ";\n }\n"])), COLORS.neutral_400, COLORS.accent1_600, COLORS.accent1_800, COLORS.neutral_400, COLORS.accent1_400, COLORS.white);
|