@laerdal/life-react-components 6.0.0-dev.5.full.full → 6.0.0-dev.6.full
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/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.d.ts +1 -0
- package/dist/GlobalNavigationBar/__tests__/Logo.tests.d.ts +1 -0
- package/dist/List/__tests__/ListRow.tests.d.ts +1 -0
- package/dist/Tabs/__tests__/TabLink.tests.d.ts +1 -0
- package/dist/Tabs/__tests__/Tablist.tests.d.ts +2 -0
- package/dist/common/Link.cjs +45 -0
- package/dist/common/Link.cjs.map +1 -0
- package/dist/common/Link.d.ts +9 -0
- package/dist/common/Link.js +37 -0
- package/dist/common/Link.js.map +1 -0
- package/dist/common/NavigationHelper.cjs +30 -0
- package/dist/common/NavigationHelper.cjs.map +1 -0
- package/dist/common/NavigationHelper.d.ts +4 -0
- package/dist/common/NavigationHelper.js +23 -0
- package/dist/common/NavigationHelper.js.map +1 -0
- package/dist/styles/index.cjs +5 -5
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.d.ts +2 -2
- package/dist/styles/index.js +2 -2
- package/dist/styles/index.js.map +1 -1
- package/package.json +143 -147
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest-styled-components';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.Link = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
|
+
var _styles = require("../styles");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const _excluded = ["to", "active", "className", "children"];
|
|
17
|
+
var _templateObject;
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
const StyledLink = _styledComponents.default.a(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n text-decoration: none;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n\n ", "\n\n ", "\n"])), _styles.COLORS.BLUE_500, _styles.focusStyles, props => props.active && "\n color: ".concat(_styles.COLORS.BLUE_700, ";\n font-weight: bold;\n "));
|
|
21
|
+
const Link = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
to,
|
|
24
|
+
active,
|
|
25
|
+
className,
|
|
26
|
+
children
|
|
27
|
+
} = _ref,
|
|
28
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledLink, _objectSpread(_objectSpread({
|
|
30
|
+
href: to,
|
|
31
|
+
active: active,
|
|
32
|
+
className: className
|
|
33
|
+
}, props), {}, {
|
|
34
|
+
children: children
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
exports.Link = Link;
|
|
38
|
+
Link.propTypes = {
|
|
39
|
+
to: _propTypes.default.string,
|
|
40
|
+
active: _propTypes.default.bool,
|
|
41
|
+
className: _propTypes.default.string,
|
|
42
|
+
children: _propTypes.default.node
|
|
43
|
+
};
|
|
44
|
+
var _default = exports.default = Link;
|
|
45
|
+
//# sourceMappingURL=Link.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_jsxRuntime","_excluded","_templateObject","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","StyledLink","styled","a","_taggedTemplateLiteral2","COLORS","BLUE_500","focusStyles","props","active","concat","BLUE_700","Link","_ref","to","className","children","_objectWithoutProperties2","jsx","href","exports","propTypes","_propTypes","string","bool","node","_default"],"sources":["../../src/common/Link.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, focusStyles } from '../styles';\r\n\r\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\r\n to?: string;\r\n active?: boolean;\r\n className?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst StyledLink = styled.a<{ active?: boolean }>`\r\n color: ${COLORS.BLUE_500};\r\n text-decoration: none;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n\r\n ${focusStyles}\r\n\r\n ${props => props.active && `\r\n color: ${COLORS.BLUE_700};\r\n font-weight: bold;\r\n `}\r\n`;\r\n\r\nexport const Link: React.FC<LinkProps> = ({ to, active, className, children, ...props }) => {\r\n return (\r\n <StyledLink \r\n href={to} \r\n active={active}\r\n className={className}\r\n {...props}\r\n >\r\n {children}\r\n </StyledLink>\r\n );\r\n};\r\n\r\nexport default Link; "],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAAgD,IAAAG,WAAA,GAAAH,OAAA;AAAA,MAAAI,SAAA;AAAA,IAAAC,eAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAe,yBAAA,GAAAf,MAAA,CAAAgB,gBAAA,CAAAnB,CAAA,EAAAG,MAAA,CAAAe,yBAAA,CAAAhB,CAAA,KAAAH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
|
+
import React from 'react';
|
|
2
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
to?: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Link: React.FC<LinkProps>;
|
|
9
|
+
export default Link;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
4
|
+
import _pt from "prop-types";
|
|
5
|
+
const _excluded = ["to", "active", "className", "children"];
|
|
6
|
+
var _templateObject;
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
import { COLORS, focusStyles } from '../styles';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const StyledLink = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n text-decoration: none;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n\n ", "\n\n ", "\n"])), COLORS.BLUE_500, focusStyles, props => props.active && "\n color: ".concat(COLORS.BLUE_700, ";\n font-weight: bold;\n "));
|
|
14
|
+
export const Link = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
to,
|
|
17
|
+
active,
|
|
18
|
+
className,
|
|
19
|
+
children
|
|
20
|
+
} = _ref,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/_jsx(StyledLink, _objectSpread(_objectSpread({
|
|
23
|
+
href: to,
|
|
24
|
+
active: active,
|
|
25
|
+
className: className
|
|
26
|
+
}, props), {}, {
|
|
27
|
+
children: children
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
Link.propTypes = {
|
|
31
|
+
to: _pt.string,
|
|
32
|
+
active: _pt.bool,
|
|
33
|
+
className: _pt.string,
|
|
34
|
+
children: _pt.node
|
|
35
|
+
};
|
|
36
|
+
export default Link;
|
|
37
|
+
//# sourceMappingURL=Link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","names":["React","styled","COLORS","focusStyles","jsx","_jsx","StyledLink","a","_templateObject","_taggedTemplateLiteral","BLUE_500","props","active","concat","BLUE_700","Link","_ref","to","className","children","_objectWithoutProperties","_excluded","_objectSpread","href","propTypes","_pt","string","bool","node"],"sources":["../../src/common/Link.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { COLORS, focusStyles } from '../styles';\r\n\r\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\r\n to?: string;\r\n active?: boolean;\r\n className?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst StyledLink = styled.a<{ active?: boolean }>`\r\n color: ${COLORS.BLUE_500};\r\n text-decoration: none;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n\r\n ${focusStyles}\r\n\r\n ${props => props.active && `\r\n color: ${COLORS.BLUE_700};\r\n font-weight: bold;\r\n `}\r\n`;\r\n\r\nexport const Link: React.FC<LinkProps> = ({ to, active, className, children, ...props }) => {\r\n return (\r\n <StyledLink \r\n href={to} \r\n active={active}\r\n className={className}\r\n {...props}\r\n >\r\n {children}\r\n </StyledLink>\r\n );\r\n};\r\n\r\nexport default Link; "],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAShD,MAAMC,UAAU,GAAGL,MAAM,CAACM,CAAC,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,kJAChBP,MAAM,CAACQ,QAAQ,EAQtBP,WAAW,EAEXQ,KAAK,IAAIA,KAAK,CAACC,MAAM,oBAAAC,MAAA,CACZX,MAAM,CAACY,QAAQ,kCAEzB,CACF;AAED,OAAO,MAAMC,IAAyB,GAAGC,IAAA,IAAmD;EAAA,IAAlD;MAAEC,EAAE;MAAEL,MAAM;MAAEM,SAAS;MAAEC;IAAmB,CAAC,GAAAH,IAAA;IAAPL,KAAK,GAAAS,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACnF,oBACEhB,IAAA,CAACC,UAAU,EAAAgB,aAAA,CAAAA,aAAA;IACTC,IAAI,EAAEN,EAAG;IACTL,MAAM,EAAEA,MAAO;IACfM,SAAS,EAAEA;EAAU,GACjBP,KAAK;IAAAQ,QAAA,EAERA;EAAQ,EACC,CAAC;AAEjB,CAAC;AAACJ,IAAA,CAAAS,SAAA;EAlCAP,EAAE,EAAAQ,GAAA,CAAAC,MAAA;EACFd,MAAM,EAAAa,GAAA,CAAAE,IAAA;EACNT,SAAS,EAAAO,GAAA,CAAAC,MAAA;EACTP,QAAQ,EAAAM,GAAA,CAAAG;AAAA;AAiCV,eAAeb,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useNavigationHelper = void 0;
|
|
7
|
+
var _reactRouter = require("react-router");
|
|
8
|
+
const useNavigationHelper = () => {
|
|
9
|
+
const navigateHook = (0, _reactRouter.useNavigate)();
|
|
10
|
+
const location = (0, _reactRouter.useLocation)();
|
|
11
|
+
const navigate = (url, isExternal) => {
|
|
12
|
+
if (isExternal) {
|
|
13
|
+
window.location.href = url;
|
|
14
|
+
} else {
|
|
15
|
+
navigateHook(url);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const isActiveRoute = (url, exact) => {
|
|
19
|
+
return !!(0, _reactRouter.matchPath)({
|
|
20
|
+
path: url,
|
|
21
|
+
end: exact
|
|
22
|
+
}, location.pathname ?? '');
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
navigate,
|
|
26
|
+
isActiveRoute
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.useNavigationHelper = useNavigationHelper;
|
|
30
|
+
//# sourceMappingURL=NavigationHelper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationHelper.cjs","names":["_reactRouter","require","useNavigationHelper","navigateHook","useNavigate","location","useLocation","navigate","url","isExternal","window","href","isActiveRoute","exact","matchPath","path","end","pathname","exports"],"sources":["../../src/common/NavigationHelper.ts"],"sourcesContent":["import { useNavigate, matchPath, useLocation } from 'react-router';\r\n\r\nexport const useNavigationHelper = () => {\r\n const navigateHook = useNavigate();\r\n const location = useLocation();\r\n\r\n const navigate = (url: string, isExternal: boolean) => {\r\n if (isExternal) {\r\n window.location.href = url;\r\n } else {\r\n navigateHook(url);\r\n }\r\n };\r\n\r\n const isActiveRoute = (url: string, exact: boolean): boolean => {\r\n return !!matchPath({ path: url, end: exact }, location.pathname ?? '');\r\n };\r\n\r\n return { navigate, isActiveRoute };\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMC,YAAY,GAAG,IAAAC,wBAAW,EAAC,CAAC;EAClC,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAAC,CAAC;EAE9B,MAAMC,QAAQ,GAAGA,CAACC,GAAW,EAAEC,UAAmB,KAAK;IACrD,IAAIA,UAAU,EAAE;MACdC,MAAM,CAACL,QAAQ,CAACM,IAAI,GAAGH,GAAG;IAC5B,CAAC,MAAM;MACLL,YAAY,CAACK,GAAG,CAAC;IACnB;EACF,CAAC;EAED,MAAMI,aAAa,GAAGA,CAACJ,GAAW,EAAEK,KAAc,KAAc;IAC9D,OAAO,CAAC,CAAC,IAAAC,sBAAS,EAAC;MAAEC,IAAI,EAAEP,GAAG;MAAEQ,GAAG,EAAEH;IAAM,CAAC,EAAER,QAAQ,CAACY,QAAQ,IAAI,EAAE,CAAC;EACxE,CAAC;EAED,OAAO;IAAEV,QAAQ;IAAEK;EAAc,CAAC;AACpC,CAAC;AAACM,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useNavigate, matchPath, useLocation } from 'react-router';
|
|
2
|
+
export const useNavigationHelper = () => {
|
|
3
|
+
const navigateHook = useNavigate();
|
|
4
|
+
const location = useLocation();
|
|
5
|
+
const navigate = (url, isExternal) => {
|
|
6
|
+
if (isExternal) {
|
|
7
|
+
window.location.href = url;
|
|
8
|
+
} else {
|
|
9
|
+
navigateHook(url);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const isActiveRoute = (url, exact) => {
|
|
13
|
+
return !!matchPath({
|
|
14
|
+
path: url,
|
|
15
|
+
end: exact
|
|
16
|
+
}, location.pathname ?? '');
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
navigate,
|
|
20
|
+
isActiveRoute
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=NavigationHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationHelper.js","names":["useNavigate","matchPath","useLocation","useNavigationHelper","navigateHook","location","navigate","url","isExternal","window","href","isActiveRoute","exact","path","end","pathname"],"sources":["../../src/common/NavigationHelper.ts"],"sourcesContent":["import { useNavigate, matchPath, useLocation } from 'react-router';\r\n\r\nexport const useNavigationHelper = () => {\r\n const navigateHook = useNavigate();\r\n const location = useLocation();\r\n\r\n const navigate = (url: string, isExternal: boolean) => {\r\n if (isExternal) {\r\n window.location.href = url;\r\n } else {\r\n navigateHook(url);\r\n }\r\n };\r\n\r\n const isActiveRoute = (url: string, exact: boolean): boolean => {\r\n return !!matchPath({ path: url, end: exact }, location.pathname ?? '');\r\n };\r\n\r\n return { navigate, isActiveRoute };\r\n};\r\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,WAAW,QAAQ,cAAc;AAElE,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMC,YAAY,GAAGJ,WAAW,CAAC,CAAC;EAClC,MAAMK,QAAQ,GAAGH,WAAW,CAAC,CAAC;EAE9B,MAAMI,QAAQ,GAAGA,CAACC,GAAW,EAAEC,UAAmB,KAAK;IACrD,IAAIA,UAAU,EAAE;MACdC,MAAM,CAACJ,QAAQ,CAACK,IAAI,GAAGH,GAAG;IAC5B,CAAC,MAAM;MACLH,YAAY,CAACG,GAAG,CAAC;IACnB;EACF,CAAC;EAED,MAAMI,aAAa,GAAGA,CAACJ,GAAW,EAAEK,KAAc,KAAc;IAC9D,OAAO,CAAC,CAACX,SAAS,CAAC;MAAEY,IAAI,EAAEN,GAAG;MAAEO,GAAG,EAAEF;IAAM,CAAC,EAAEP,QAAQ,CAACU,QAAQ,IAAI,EAAE,CAAC;EACxE,CAAC;EAED,OAAO;IAAET,QAAQ;IAAEK;EAAc,CAAC;AACpC,CAAC","ignoreList":[]}
|
package/dist/styles/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _exportNames = {
|
|
|
9
9
|
COLORS: true,
|
|
10
10
|
BREAKPOINTS: true,
|
|
11
11
|
BOXSHADOWS: true,
|
|
12
|
-
|
|
12
|
+
LifeGlobalStyles: true,
|
|
13
13
|
Z_INDEXES: true
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "BOXSHADOWS", {
|
|
@@ -30,16 +30,16 @@ Object.defineProperty(exports, "COLORS", {
|
|
|
30
30
|
return _colors.default;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
Object.defineProperty(exports, "
|
|
33
|
+
Object.defineProperty(exports, "LifeGlobalStyles", {
|
|
34
34
|
enumerable: true,
|
|
35
35
|
get: function () {
|
|
36
|
-
return
|
|
36
|
+
return _global.default;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "Z_INDEXES", {
|
|
40
40
|
enumerable: true,
|
|
41
41
|
get: function () {
|
|
42
|
-
return
|
|
42
|
+
return _zIndexes.Z_INDEXES;
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
exports.scrollBarStyling = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_styledComponents","require","_colors","_interopRequireDefault","_breakpoints","_shadowstyles","_typography","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_global","_types","_zIndexes","_focusStyles","scrollBarStyling","size","arguments","length","undefined","Size","Small","css","Medium","props","COLORS","generateToken","componentType","defaultVariant","theme","state"],"sources":["../../src/styles/index.ts"],"sourcesContent":["import { css } from 'styled-components';\r\nimport COLORS from './colors';\r\nimport BREAKPOINTS from './breakpoints';\r\nimport { BOXSHADOWS } from './shadowstyles';\r\n\r\nexport * from './typography';\r\n\r\nimport
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_styledComponents","require","_colors","_interopRequireDefault","_breakpoints","_shadowstyles","_typography","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_global","_types","_zIndexes","_focusStyles","scrollBarStyling","size","arguments","length","undefined","Size","Small","css","Medium","props","COLORS","generateToken","componentType","defaultVariant","theme","state"],"sources":["../../src/styles/index.ts"],"sourcesContent":["import { css } from 'styled-components';\r\nimport COLORS from './colors';\r\nimport BREAKPOINTS from './breakpoints';\r\nimport { BOXSHADOWS } from './shadowstyles';\r\n\r\nexport * from './typography';\r\n\r\nimport LifeGlobalStyles from './global';\r\nimport { Size } from '../types';\r\n\r\nexport { COLORS, BREAKPOINTS, BOXSHADOWS, LifeGlobalStyles };\r\n\r\n\r\nexport const scrollBarStyling = (size: Size.Small | Size.Medium = Size.Small) => css`\r\n \r\n &::-webkit-scrollbar {\r\n width: ${size == Size.Medium ? '6px' : '4px'};\r\n height: ${size == Size.Medium ? '6px' : '4px'};\r\n cursor: pointer;\r\n }\r\n\r\n /* Track */\r\n &::-webkit-scrollbar-track {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-surface', defaultVariant:'subtle' }, props.theme)};\r\n border-radius: 6px;\r\n }\r\n\r\n /* Handle */\r\n &::-webkit-scrollbar-thumb {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', defaultVariant:'default' }, props.theme)};\r\n border-radius: 4px;\r\n }\r\n\r\n /* Handle on hover */\r\n &::-webkit-scrollbar-thumb:hover {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', state: 'hover' }, props.theme)};\r\n }\r\n\r\n /* Handle on hover */\r\n &::-webkit-scrollbar-thumb:active {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', state: 'active' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport {Z_INDEXES} from './z-indexes'\r\n\r\nexport * from './focus-styles';\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,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AAA,MAAGG,WAAI,CAACC,KAAK;EAAA,OAAK,IAAAC,qBAAG;AACpF;AACA;AACA,aAAaN,IAAI,IAAII,WAAI,CAACG,MAAM,GAAG,KAAK,GAAG,KAAK;AAChD,cAAcP,IAAI,IAAII,WAAI,CAACG,MAAM,GAAG,KAAK,GAAG,KAAK;AACjD;AACA;AACA;AACA;AACA;AACA,kBAAkBC,KAAK,IAAIC,eAAM,CAACC,aAAa,CAAC;IAAEC,aAAa,EAAC,YAAY;IAAEC,cAAc,EAAC;EAAS,CAAC,EAAEJ,KAAK,CAACK,KAAK,CAAC;AACrH;AACA;AACA;AACA;AACA;AACA,kBAAkBL,KAAK,IAAIC,eAAM,CAACC,aAAa,CAAC;IAAEC,aAAa,EAAC,SAAS;IAAEC,cAAc,EAAC;EAAU,CAAC,EAAEJ,KAAK,CAACK,KAAK,CAAC;AACnH;AACA;AACA;AACA;AACA;AACA,kBAAkBL,KAAK,IAAIC,eAAM,CAACC,aAAa,CAAC;IAAEC,aAAa,EAAC,SAAS;IAAEG,KAAK,EAAE;EAAQ,CAAC,EAAEN,KAAK,CAACK,KAAK,CAAC;AACzG;AACA;AACA;AACA;AACA,kBAAkBL,KAAK,IAAIC,eAAM,CAACC,aAAa,CAAC;IAAEC,aAAa,EAAC,SAAS;IAAEG,KAAK,EAAE;EAAS,CAAC,EAAEN,KAAK,CAACK,KAAK,CAAC;AAC1G;AACA,CAAC;AAAA;AAACtB,OAAA,CAAAQ,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
package/dist/styles/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import COLORS from './colors';
|
|
|
2
2
|
import BREAKPOINTS from './breakpoints';
|
|
3
3
|
import { BOXSHADOWS } from './shadowstyles';
|
|
4
4
|
export * from './typography';
|
|
5
|
-
import
|
|
5
|
+
import LifeGlobalStyles from './global';
|
|
6
6
|
import { Size } from '../types';
|
|
7
|
-
export { COLORS, BREAKPOINTS, BOXSHADOWS,
|
|
7
|
+
export { COLORS, BREAKPOINTS, BOXSHADOWS, LifeGlobalStyles };
|
|
8
8
|
export declare const scrollBarStyling: (size?: Size.Small | Size.Medium) => import("styled-components").RuleSet<object>;
|
|
9
9
|
export { Z_INDEXES } from './z-indexes';
|
|
10
10
|
export * from './focus-styles';
|
package/dist/styles/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import COLORS from './colors';
|
|
|
3
3
|
import BREAKPOINTS from './breakpoints';
|
|
4
4
|
import { BOXSHADOWS } from './shadowstyles';
|
|
5
5
|
export * from './typography';
|
|
6
|
-
import
|
|
6
|
+
import LifeGlobalStyles from './global';
|
|
7
7
|
import { Size } from '../types';
|
|
8
|
-
export { COLORS, BREAKPOINTS, BOXSHADOWS,
|
|
8
|
+
export { COLORS, BREAKPOINTS, BOXSHADOWS, LifeGlobalStyles };
|
|
9
9
|
export const scrollBarStyling = function () {
|
|
10
10
|
let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Size.Small;
|
|
11
11
|
return css`
|
package/dist/styles/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["css","COLORS","BREAKPOINTS","BOXSHADOWS","
|
|
1
|
+
{"version":3,"file":"index.js","names":["css","COLORS","BREAKPOINTS","BOXSHADOWS","LifeGlobalStyles","Size","scrollBarStyling","size","arguments","length","undefined","Small","Medium","props","generateToken","componentType","defaultVariant","theme","state","Z_INDEXES"],"sources":["../../src/styles/index.ts"],"sourcesContent":["import { css } from 'styled-components';\r\nimport COLORS from './colors';\r\nimport BREAKPOINTS from './breakpoints';\r\nimport { BOXSHADOWS } from './shadowstyles';\r\n\r\nexport * from './typography';\r\n\r\nimport LifeGlobalStyles from './global';\r\nimport { Size } from '../types';\r\n\r\nexport { COLORS, BREAKPOINTS, BOXSHADOWS, LifeGlobalStyles };\r\n\r\n\r\nexport const scrollBarStyling = (size: Size.Small | Size.Medium = Size.Small) => css`\r\n \r\n &::-webkit-scrollbar {\r\n width: ${size == Size.Medium ? '6px' : '4px'};\r\n height: ${size == Size.Medium ? '6px' : '4px'};\r\n cursor: pointer;\r\n }\r\n\r\n /* Track */\r\n &::-webkit-scrollbar-track {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-surface', defaultVariant:'subtle' }, props.theme)};\r\n border-radius: 6px;\r\n }\r\n\r\n /* Handle */\r\n &::-webkit-scrollbar-thumb {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', defaultVariant:'default' }, props.theme)};\r\n border-radius: 4px;\r\n }\r\n\r\n /* Handle on hover */\r\n &::-webkit-scrollbar-thumb:hover {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', state: 'hover' }, props.theme)};\r\n }\r\n\r\n /* Handle on hover */\r\n &::-webkit-scrollbar-thumb:active {\r\n background: ${props => COLORS.generateToken({ componentType:'bg-fill', state: 'active' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport {Z_INDEXES} from './z-indexes'\r\n\r\nexport * from './focus-styles';\r\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,cAAe,cAAc;AAE7B,OAAOC,gBAAgB,MAAM,UAAU;AACvC,SAASC,IAAI,QAAQ,UAAU;AAE/B,SAASJ,MAAM,EAAEC,WAAW,EAAEC,UAAU,EAAEC,gBAAgB;AAG1D,OAAO,MAAME,gBAAgB,GAAG,SAAAA,CAAA;EAAA,IAACC,IAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,IAAI,CAACM,KAAK;EAAA,OAAKX,GAAG;AACpF;AACA;AACA,aAAaO,IAAI,IAAIF,IAAI,CAACO,MAAM,GAAG,KAAK,GAAG,KAAK;AAChD,cAAcL,IAAI,IAAIF,IAAI,CAACO,MAAM,GAAG,KAAK,GAAG,KAAK;AACjD;AACA;AACA;A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|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"nwsapi": "2.2.9",
|
|
146
|
-
"date-fns": "2.24.0",
|
|
147
|
-
"@types/react": "19.1.2"
|
|
148
|
-
}
|
|
2
|
+
"name": "@laerdal/life-react-components",
|
|
3
|
+
"version": "6.0.0-dev.6.full",
|
|
4
|
+
"private": false,
|
|
5
|
+
"author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
|
|
6
|
+
"contributors": [],
|
|
7
|
+
"description": "Laerdal LIFE component library for React.",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"license": "UNLICENSED",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/Laerdal-Medical/dcs-life-react-js"
|
|
13
|
+
},
|
|
14
|
+
"main": "dist/index.cjs",
|
|
15
|
+
"module": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"require": "./dist/index.cjs",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"bump": "yarn version --patch",
|
|
30
|
+
"build": "yarn build:babel:esm && yarn build:babel:cjs && tsc --emitDeclarationOnly --declaration --declarationDir dist && node scripts/copyTS.cjs",
|
|
31
|
+
"build:babel:esm": "cross-env BABEL_ENV=esm babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .js",
|
|
32
|
+
"build:babel:cjs": "cross-env BABEL_ENV=cjs babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .cjs",
|
|
33
|
+
"clean": "rimraf dist",
|
|
34
|
+
"develop": "yarn build:babel:esm --skip-initial-build --watch --verbose",
|
|
35
|
+
"test": "jest src/",
|
|
36
|
+
"test:coverage": "jest --collectCoverage src/",
|
|
37
|
+
"test-watch": "jest --watch",
|
|
38
|
+
"storybook": "storybook dev -p 6006",
|
|
39
|
+
"build-storybook": "storybook build"
|
|
40
|
+
},
|
|
41
|
+
"eslintConfig": {
|
|
42
|
+
"extends": [
|
|
43
|
+
"react-app",
|
|
44
|
+
"plugin:storybook/recommended"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"browserslist": {
|
|
48
|
+
"production": [
|
|
49
|
+
">0.2%",
|
|
50
|
+
"not dead",
|
|
51
|
+
"not op_mini all"
|
|
52
|
+
],
|
|
53
|
+
"development": [
|
|
54
|
+
"last 1 chrome version",
|
|
55
|
+
"last 1 firefox version",
|
|
56
|
+
"last 1 safari version"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"omlet": {
|
|
60
|
+
"exports": {
|
|
61
|
+
".": "src/index.ts"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@laerdal-medical/life-design-tokens": "^1.2.0-beta",
|
|
66
|
+
"@laerdal/figma-svg": "^5.2.2",
|
|
67
|
+
"@types/node": "^18.0.6",
|
|
68
|
+
"animated-scroll-to": "^2.3.0",
|
|
69
|
+
"dayjs": "^1.11.5",
|
|
70
|
+
"nanoid": "3.3.11",
|
|
71
|
+
"react": "^19.0.0",
|
|
72
|
+
"react-datepicker": "^8.2.1",
|
|
73
|
+
"react-dom": "^19.0.0",
|
|
74
|
+
"react-inlinesvg": "^4.2.0",
|
|
75
|
+
"react-modal": "^3.16.0",
|
|
76
|
+
"react-quill": "^2.0.0",
|
|
77
|
+
"react-resize-detector": "^11.0.1",
|
|
78
|
+
"rooks": "^7.1.1",
|
|
79
|
+
"styled-components": "^6.1.13",
|
|
80
|
+
"typescript": "^5.1.2"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@babel/cli": "^7.22.0",
|
|
84
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
85
|
+
"@babel/plugin-proposal-export-default-from": "^7.22.0",
|
|
86
|
+
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
|
|
87
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.18.6",
|
|
88
|
+
"@babel/plugin-transform-runtime": "^7.22.0",
|
|
89
|
+
"@babel/preset-env": "^7.22.0",
|
|
90
|
+
"@babel/preset-react": "^7.22.0",
|
|
91
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
92
|
+
"@babel/runtime": "^7.22.0",
|
|
93
|
+
"@chromatic-com/storybook": "1.4.0",
|
|
94
|
+
"@laerdal/navigation": "^3.2.0",
|
|
95
|
+
"@storybook/addon-essentials": "^8.1.3",
|
|
96
|
+
"@storybook/addon-interactions": "^8.1.3",
|
|
97
|
+
"@storybook/addon-links": "^8.1.3",
|
|
98
|
+
"@storybook/addon-onboarding": "^8.1.3",
|
|
99
|
+
"@storybook/addon-webpack5-compiler-swc": "1.0.2",
|
|
100
|
+
"@storybook/addons": "^7.6.17",
|
|
101
|
+
"@storybook/blocks": "^8.1.3",
|
|
102
|
+
"@storybook/react": "^8.1.3",
|
|
103
|
+
"@storybook/react-webpack5": "^8.1.3",
|
|
104
|
+
"@storybook/test": "^8.1.3",
|
|
105
|
+
"@testing-library/dom": "^10.4.0",
|
|
106
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
107
|
+
"@testing-library/react": "^16.0.1",
|
|
108
|
+
"@testing-library/user-event": "^14.5.2",
|
|
109
|
+
"@types/jest": "^29.5.12",
|
|
110
|
+
"@types/react": "^19.1.2",
|
|
111
|
+
"@types/react-datepicker": "^4.4.2",
|
|
112
|
+
"@types/react-dom": "^18.3.0",
|
|
113
|
+
"@types/react-modal": "^3.13.1",
|
|
114
|
+
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
115
|
+
"babel-plugin-typescript-to-proptypes": "^2.0.0",
|
|
116
|
+
"concurrently": "^5.2.0",
|
|
117
|
+
"cross-env": "^7.0.3",
|
|
118
|
+
"css-loader": "^7.1.2",
|
|
119
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
120
|
+
"history": "^5.3.0",
|
|
121
|
+
"jest": "^29.7.0",
|
|
122
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
123
|
+
"jest-styled-components": "^7.2.0",
|
|
124
|
+
"jest-svg-transformer": "^1.0.0",
|
|
125
|
+
"react-router": "^6.0.0",
|
|
126
|
+
"react-share": "^5.1.0",
|
|
127
|
+
"regenerator-runtime": "^0.13.9",
|
|
128
|
+
"storybook": "^8.1.3",
|
|
129
|
+
"style-loader": "^4.0.0",
|
|
130
|
+
"ts-jest": "^29.2.5",
|
|
131
|
+
"webpack": "^5.99.9",
|
|
132
|
+
"webpack-cli": "^6.0.1",
|
|
133
|
+
"webpack-dev-server": "^5.2.1"
|
|
134
|
+
},
|
|
135
|
+
"peerDependencies": {
|
|
136
|
+
"@babel/core": "^7.0.0",
|
|
137
|
+
"react": "^19",
|
|
138
|
+
"react-dom": "^19"
|
|
139
|
+
},
|
|
140
|
+
"resolutions": {
|
|
141
|
+
"nwsapi": "2.2.9",
|
|
142
|
+
"date-fns": "2.24.0",
|
|
143
|
+
"@types/react": "19.1.2"
|
|
144
|
+
}
|
|
149
145
|
}
|