@helsenorge/designsystem-react 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Button-0917df8e.js +2 -0
- package/Button-0917df8e.js.map +1 -0
- package/HorizontalScroll-a4634c75.js +2 -0
- package/HorizontalScroll-a4634c75.js.map +1 -0
- package/Modal-055c753d.js +2 -0
- package/Modal-055c753d.js.map +1 -0
- package/{Panel-1ce6fe37.js → Panel-f52d1b19.js} +2 -2
- package/Panel-f52d1b19.js.map +1 -0
- package/{TableExpandedRow-44b09912.js → TableExpandedRow-9c134fef.js} +2 -2
- package/TableExpandedRow-9c134fef.js.map +1 -0
- package/{TableExpanderCell-015d3db2.js → TableExpanderCell-c1819f4b.js} +2 -2
- package/TableExpanderCell-c1819f4b.js.map +1 -0
- package/{TableRow-692099ee.js → TableRow-f413aebe.js} +2 -2
- package/TableRow-f413aebe.js.map +1 -0
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button/styles.module.scss +7 -7
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Dropdown/index.js +1 -1
- package/components/Expander/index.js +1 -1
- package/components/FormExample/index.js +1 -1
- package/components/HighlightBox/HighlightBox.d.ts +2 -0
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
- package/components/HighlightBox/componentdata.json +19 -0
- package/components/HighlightBox/index.js +1 -1
- package/components/HighlightBox/styles.module.scss +0 -2
- package/components/HorizontalScroll/HorizontalScroll.d.ts +4 -0
- package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -0
- package/components/HorizontalScroll/componentdata.json +3 -0
- package/components/HorizontalScroll/index.d.ts +4 -0
- package/components/HorizontalScroll/index.d.ts.map +1 -0
- package/components/HorizontalScroll/index.js +2 -0
- package/components/HorizontalScroll/index.js.map +1 -0
- package/components/HorizontalScroll/styles.module.scss +33 -0
- package/components/HorizontalScroll/styles.module.scss.d.ts +14 -0
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/NotificationPanel.d.ts +0 -18
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +12 -216
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/utils.d.ts +16 -0
- package/components/NotificationPanel/utils.d.ts.map +1 -0
- package/components/Panel/Panel.d.ts.map +1 -1
- package/components/Panel/index.js +1 -1
- package/components/Panel/styles.module.scss +38 -39
- package/components/Panel/styles.module.scss.d.ts +2 -2321
- package/components/PanelList/index.js +1 -1
- package/components/PanelList/styles.module.scss +0 -1
- package/components/PanelList/styles.module.scss.d.ts +0 -2320
- package/components/Table/Table.d.ts +7 -1
- package/components/Table/Table.d.ts.map +1 -1
- package/components/Table/TableExpandedRow.js +1 -1
- package/components/Table/TableExpanderCell.js +1 -1
- package/components/Table/TableRow.js +1 -1
- package/components/Table/index.js +1 -1
- package/components/Table/styles.module.scss +0 -1
- package/components/Table/styles.module.scss.d.ts +35 -0
- package/hooks/useIsVisible.d.ts +3 -1
- package/hooks/useIsVisible.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/scss/_breakpoints.scss +2 -0
- package/scss/_grid.scss +5 -1
- package/scss/helsenorge.scss +1 -1
- package/{useIsVisible-bef05e5e.js → useFocusTrap-4a5fb65d.js} +2 -2
- package/useFocusTrap-4a5fb65d.js.map +1 -0
- package/useIsVisible-2ffbdea2.js +2 -0
- package/useIsVisible-2ffbdea2.js.map +1 -0
- package/Button-78f848e6.js +0 -2
- package/Button-78f848e6.js.map +0 -1
- package/Modal-3ed00fd4.js +0 -2
- package/Modal-3ed00fd4.js.map +0 -1
- package/Panel-1ce6fe37.js.map +0 -1
- package/TableExpandedRow-44b09912.js.map +0 -1
- package/TableExpanderCell-015d3db2.js.map +0 -1
- package/TableRow-692099ee.js.map +0 -1
- package/useIsVisible-bef05e5e.js.map +0 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare enum SmallViewportVariant {
|
|
3
|
+
/**
|
|
4
|
+
* Show horizontal scrollbar when table is too big for the screen
|
|
5
|
+
*/
|
|
3
6
|
horizontalscroll = "horizontalscroll",
|
|
7
|
+
/**
|
|
8
|
+
* Collapse to two columns on small screens
|
|
9
|
+
*/
|
|
4
10
|
block = "block"
|
|
5
11
|
}
|
|
6
12
|
export interface Props {
|
|
@@ -15,6 +21,6 @@ export interface Props {
|
|
|
15
21
|
/** Sets the content of the table. Use TableHead and TableBody */
|
|
16
22
|
children: React.ReactNode;
|
|
17
23
|
}
|
|
18
|
-
export declare const Table: ({ id, testId, className, children, smallViewportVariant }: Props) => JSX.Element;
|
|
24
|
+
export declare const Table: ({ id, testId, className, children, smallViewportVariant, }: Props) => JSX.Element;
|
|
19
25
|
export default Table;
|
|
20
26
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,gBAAgB,qBAAqB;IACrC;;OAEG;IACH,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,gBAAgB;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,+DAMf,KAAK,gBAcP,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{T as TableExpandedRow,T as default}from"../../TableExpandedRow-
|
|
1
|
+
export{T as TableExpandedRow,T as default}from"../../TableExpandedRow-9c134fef.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Icon-d69d65b3.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronUp-dfafe27b.js";
|
|
2
2
|
//# sourceMappingURL=TableExpandedRow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{T as TableExpanderCell,T as default}from"../../TableExpanderCell-
|
|
1
|
+
export{T as TableExpanderCell,T as default}from"../../TableExpanderCell-c1819f4b.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Icon-d69d65b3.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.js";import"../../useUuid-3b1e73f2.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../uuid-11037462.js";import"../../Button-0917df8e.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronDown-2b3daace.js";import"../../ChevronUp-dfafe27b.js";
|
|
2
2
|
//# sourceMappingURL=TableExpanderCell.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{T as TableRow,T as default}from"../../TableRow-
|
|
1
|
+
export{T as TableRow,T as default}from"../../TableRow-f413aebe.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Icon-d69d65b3.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";
|
|
2
2
|
//# sourceMappingURL=TableRow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import o from"react";import{c as r}from"../../index-d1c0552c.js";import s from"./styles.module.scss";import{A as
|
|
1
|
+
import{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import o from"react";import{c as r}from"../../index-d1c0552c.js";import s from"./styles.module.scss";import{A as l}from"../../constants-dbdea596.js";import{H as t}from"../../HorizontalScroll-a4634c75.js";export{T as TableBody}from"../../TableBody-eac2c23b.js";export{T as TableCell,a as TextAlign}from"../../TableCell-cc644eb5.js";export{T as TableExpandedRow}from"../../TableExpandedRow-9c134fef.js";export{T as TableExpanderCell}from"../../TableExpanderCell-c1819f4b.js";export{H as HeaderCategory,T as TableHead}from"../../TableHead-5ed58948.js";export{S as SortDirection,T as TableHeadCell}from"../../TableHeadCell-84651910.js";export{T as TableRow}from"../../TableRow-f413aebe.js";import"../../useIsVisible-2ffbdea2.js";import"../HorizontalScroll/styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Icon-d69d65b3.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";import"../../ArrowUp-e7787d9c.js";import"../../ArrowDown-88b2c27a.js";var i;!function(e){e.horizontalscroll="horizontalscroll",e.block="block"}(i||(i={}));var d=function(a){var d=a.id,m=a.testId,p=a.className,c=a.children,b=a.smallViewportVariant,n=void 0===b?i.horizontalscroll:b,f=r(s.table,e({},s["table--collapse2col"],n===i.block),p);return o.createElement(t,null,o.createElement("table",{className:f,id:d,"data-testid":m,"data-analyticsid":l.Table},c))};export{i as SmallViewportVariant,d as Table,d as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
'expandable-container': string;
|
|
3
|
+
table: string;
|
|
4
|
+
table__cell: string;
|
|
5
|
+
'table__cell--center': string;
|
|
6
|
+
'table__cell--nowrap': string;
|
|
7
|
+
'table__cell--right': string;
|
|
8
|
+
'table__cell-expander': string;
|
|
9
|
+
'table__expanded-row': string;
|
|
10
|
+
'table__expanded-row--expanded': string;
|
|
11
|
+
'table__expanded-row-button': string;
|
|
12
|
+
'table__expanded-row-container': string;
|
|
13
|
+
'table__expanded-row-container--open': string;
|
|
14
|
+
'table__expander-button-mobile': string;
|
|
15
|
+
'table__expander-button-mobile--expanded': string;
|
|
16
|
+
'table__expander-cell-mobile': string;
|
|
17
|
+
'table__expander-cell-mobile--expanded': string;
|
|
18
|
+
table__head: string;
|
|
19
|
+
'table__head--normal': string;
|
|
20
|
+
'table__head--sortable': string;
|
|
21
|
+
'table__head--transparent': string;
|
|
22
|
+
'table__head-cell': string;
|
|
23
|
+
'table__head-cell--sortable': string;
|
|
24
|
+
'table__head-cell--sorted': string;
|
|
25
|
+
'table__head-cell-sort-icon-wrapper': string;
|
|
26
|
+
'table__row--expandable': string;
|
|
27
|
+
'table__row--expandable--selected': string;
|
|
28
|
+
'table--collapse2col': string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type ClassNames = keyof Styles;
|
|
32
|
+
|
|
33
|
+
declare const styles: Styles;
|
|
34
|
+
|
|
35
|
+
export default styles;
|
package/hooks/useIsVisible.d.ts
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param ref Element som skal observeres
|
|
5
5
|
* @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)
|
|
6
|
+
* @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres
|
|
7
|
+
* @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig
|
|
6
8
|
* @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke
|
|
7
9
|
*/
|
|
8
|
-
export declare const useIsVisible: (ref: React.RefObject<HTMLElement>, threshold?: number) => boolean;
|
|
10
|
+
export declare const useIsVisible: (ref: React.RefObject<HTMLElement>, threshold?: number, options?: IntersectionObserverInit | undefined, initial?: boolean) => boolean;
|
|
9
11
|
//# sourceMappingURL=useIsVisible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,QAClB,MAAM,SAAS,CAAC,WAAW,CAAC,4FAIhC,OAUF,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-d1c9177a.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-a74f5af5.js";export{u as useFocusToggle,a as useFocusTrap
|
|
1
|
+
export{t as theme}from"./index-d1c9177a.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-a74f5af5.js";export{u as useFocusToggle,a as useFocusTrap}from"./useFocusTrap-4a5fb65d.js";export{u as useHover}from"./useHover-18479690.js";export{u as useIntersectionObserver,a as useIsVisible}from"./useIsVisible-2ffbdea2.js";import{d as e}from"./useSticky-432642c9.js";export{u as useLayoutEvent,a as useSticky}from"./useSticky-432642c9.js";export{u as usePrevious}from"./usePrevious-ae293b10.js";import{_ as s,a as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useState as o,useEffect as n}from"react";export{b as useKeyboardEvent,c as useOutsideEvent,u as useResizeObserver,a as useToggle}from"./useOutsideEvent-fb86686d.js";export{u as useUuid}from"./useUuid-3b1e73f2.js";export{u as uuid}from"./uuid-11037462.js";export{A as AnalyticsId,F as FormMode,a as FormVariant,I as IconSize,K as KeyboardEventKey,Z as ZIndex}from"./constants-dbdea596.js";import"./palette-f206f488.js";import"./grid-c105cad1.js";var i=function(t){var u=o(),a=s(u,2),i=a[0],f=a[1];return n((function(){if("undefined"!=typeof ResizeObserver){var o=new ResizeObserver((function(e){f(e[0].target.getBoundingClientRect())}));return(null==t?void 0:t.current)&&o.observe(null==t?void 0:t.current),o.disconnect}if("object"===("undefined"==typeof window?"undefined":r(window))){var u=["layoutchange","resize","orientationchange"],n=e((function(){(null==t?void 0:t.current)&&f(t.current.getBoundingClientRect())}),10),a=s(n,2),i=a[0],d=a[1];return u.forEach((function(e){return window.addEventListener(e,i)})),i(),function(){d(),u.forEach((function(e){return window.removeEventListener(e,i)}))}}}),[t]),i};export{i as useSize};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/scss/_breakpoints.scss
CHANGED
package/scss/_grid.scss
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
$enable-deprecation-messages: true;
|
|
2
|
+
@import '~bootstrap/scss/vendor/_rfs.scss';
|
|
3
|
+
@import '~bootstrap/scss/mixins/_deprecate.scss';
|
|
4
|
+
@import '~bootstrap/scss/mixins/_breakpoints.scss';
|
|
5
|
+
@import '~bootstrap/scss/mixins/_grid.scss';
|
package/scss/helsenorge.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as t,useEffect as e,useRef as n}from"react";import{_ as r}from"./_rollupPluginBabelHelpers-0f007973.js";var o=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),i=function(n,i){var a=t(),u=r(a,2),
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{useState as t,useEffect as e,useRef as n}from"react";import{_ as r}from"./_rollupPluginBabelHelpers-0f007973.js";var o=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),i=function(n,i){var a=t(),u=r(a,2),d=u[0],l=u[1];return e((function(){var t=function(){var t,e=null===(t=n.current)||void 0===t?void 0:t.querySelectorAll(o);l(e)},e=new MutationObserver(t);return(null==n?void 0:n.current)&&e.observe(n.current,{subtree:!0,childList:!0}),t(),function(){e.disconnect()}}),[n]),e((function(){var t="tabindex",e="data-tabindex";i?null==d||d.forEach((function(n){var r=n.getAttribute(e);r?n.setAttribute(t,r):n.removeAttribute(t)})):null==d||d.forEach((function(n){n.hasAttribute(t)&&n.setAttribute(e,"".concat(n.tabIndex)),n.tabIndex=-1}))}),[i,d]),d};function a(){var t=n(null);function r(e){var n=t.current,r="Tab"===e.key;if(n&&r){var i=function(t){try{return("string"==typeof t?document.querySelector(t):t).getRootNode().activeElement}catch(e){return console.error("Feil ved å ta tak i active element basert på angitt node: ",t,e),null}}(n),a=null==n?void 0:n.querySelectorAll(o),u=a[0],d=1===a.length?u:a[a.length-1];e.shiftKey?i===u&&(d.focus(),e.preventDefault()):i===d&&(u.focus(),e.preventDefault())}}function i(e){var n=t.current;if(n){var r=n.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),e.preventDefault())}}return e((function(){var e=t.current;return e.addEventListener("keydown",r),e.addEventListener("click",i),function(){e.removeEventListener("keydown",r),e.removeEventListener("click",i)}}),[]),t}export{a,i as u};
|
|
2
|
+
//# sourceMappingURL=useFocusTrap-4a5fb65d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap-4a5fb65d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useEffect as n,useState as e}from"react";var t=function(r,e,t){n((function(){var n=new IntersectionObserver(e,t);return(null==r?void 0:r.current)&&n.observe(r.current),function(){(null==r?void 0:r.current)&&n.unobserve(r.current)}}),[r,t])},o=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=e(u),l=r(c,2),s=l[0],a=l[1],v=function(r){a(r[0].intersectionRatio>=o)};return t(n,v,Object.assign({threshold:o},i)),s};export{o as a,t as u};
|
|
2
|
+
//# sourceMappingURL=useIsVisible-2ffbdea2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsVisible-2ffbdea2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Button-78f848e6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as t,d as e}from"./_rollupPluginBabelHelpers-0f007973.js";import{_ as n}from"./_tslib-b219470a.js";import o from"react";import{A as r,I as l}from"./constants-dbdea596.js";import{g as i}from"./color-e7d082c1.js";import"./Icon-d69d65b3.js";import{L as a}from"./Loader-06293a27.js";import{u as s}from"./useHover-18479690.js";import{u as d}from"./useBreakpoint-a74f5af5.js";import{b as u}from"./grid-c105cad1.js";import{c}from"./index-d1c0552c.js";import m from"./components/Button/styles.module.scss";var b={primary:"blueberry",warning:"banana",danger:"cherry"},f=function(t,e){return e<u.md&&t?l.Small:t?l.Medium:l.XSmall},p=o.forwardRef((function(u,p){var v,_,g,h=u.id,j=u.children,y=u.className,w=void 0===y?"":y,E=u.fluid,I=void 0!==E&&E,k=u.intent,N=void 0===k?"primary":k,x=u.inverted,B=void 0!==x&&x,C=u.htmlMarkup,H=void 0===C?"button":C,O=u.type,F=void 0===O?"button":O,M=u.onClick,S=u.large,z=void 0!==S&&S,A=u.loading,L=void 0!==A&&A,R=u.variant,X=void 0===R?"fill":R,P=u.disabled,q=void 0!==P&&P,D=u.ellipsis,G=void 0!==D&&D,J=u.tabIndex,K=u.testId,Q=u.href,T=u.target,U=n(u,["id","children","className","fluid","intent","inverted","htmlMarkup","type","onClick","large","loading","variant","disabled","ellipsis","tabIndex","testId","href","target"]),V=function(t){var e,n,o,r,l=null,i=null;void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(l=t.shift()),void 0!==(null===(r=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===r?void 0:r.svgIcon)&&(i=t.pop());var a=t.filter((function(t){return t}));return[l,i,a.length>0?a:null]}(o.Children.toArray(j)),W=t(V,3),Y=W[0],Z=W[1],$=W[2],tt=s(p),et=tt.hoverRef,nt=tt.isHovered,ot=function(t,e,n,o,r){return e?i("neutral",600):t&&!o||!t&&o?"white":i(b[n],r?700:600)}("fill"===X,q,N,B,nt),rt=d(),lt="fill"===X,it="outline"===X,at="borderless"===X,st="warning"===N,dt="danger"===N,ut=!(!Y&&!Z||L),ct=Object.assign({},U),mt=c(m.button,(e(v={},m["button--fluid"],I),e(v,m["button--large"],z),e(v,m["button--warning"],st),e(v,m["button--danger"],dt),e(v,m["button--inverted"],B),e(v,m["button--fill"],lt),e(v,m["button--outline"],it),e(v,m["button--borderless"],at),e(v,m["button--with-icon"],ut),e(v,m["button--ellipsis"],G),v),w),bt=c(m.button__content,(e(_={},m["button__content--warning"],st),e(_,m["button__content--danger"],dt),e(_,m["button__content--fill"],lt),e(_,m["button__content--borderless"],at),e(_,m["button__content--outline"],it),e(_,m["button__content--with-icon"],ut&&!at),e(_,m["button__content--large"],z),e(_,m["button__content--ellipsis"],G),e(_,m["button__content--inverted"],B),e(_,m["button__content--fluid"],I),_)),ft=c(m["button__left-fluid-content"],(e(g={},m["button__left-fluid-content--with-icon"],ut),e(g,m["button__left-fluid-content--large"],z),g));function pt(t,e,n,r){var l=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:l,isHovered:r}):null}var vt=function(){return $?o.createElement("span",{className:bt},$):null},_t=function(){return o.createElement("span",{className:m["content-wrapper"]},L?o.createElement("div",{className:m["button__left-fluid-content"]},o.createElement(a,{testId:"test-id-loader",color:"fill"!==X||B?b[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,I?o.createElement("div",{className:ft},pt(Y,f(z,rt),ot,nt),vt()):o.createElement(o.Fragment,null,pt(Y,f(z,rt),ot,nt),vt()),pt(Z,l.XSmall,ot,nt)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({id:h,onClick:M,disabled:q,"data-testid":K,"data-analyticsid":r.Button,className:mt,ref:et,tabIndex:J,type:F},ct),_t()),"a"===H&&o.createElement("a",Object.assign({id:h,onClick:M,"data-testid":K,"data-analyticsid":r.Button,className:mt,href:Q,target:T,rel:"_blank"===T?"noopener noreferrer":u.rel,ref:et,tabIndex:J},U),_t()))}));export{p as B,b as i};
|
|
2
|
-
//# sourceMappingURL=Button-78f848e6.js.map
|
package/Button-78f848e6.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-78f848e6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Modal-3ed00fd4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,d as a}from"./_rollupPluginBabelHelpers-0f007973.js";import t,{useEffect as r}from"react";import{c as l}from"./index-d1c0552c.js";import{p as o}from"./palette-f206f488.js";import{B as n}from"./Button-78f848e6.js";import{I as s}from"./Icon-d69d65b3.js";import{Z as i,A as c,I as m}from"./constants-dbdea596.js";import d from"./components/Modal/styles.module.scss";import{A as u}from"./AlertSignStroke-32f09751.js";import{A as p}from"./AlertSignFill-5df5b7c7.js";import{c as _,a as v}from"./useIsVisible-bef05e5e.js";import{T as f}from"./Title-01820508.js";import{u as E}from"./uuid-11037462.js";import{C as g}from"./Close-08d48540.js";import{C as b}from"./CheckOutline-86cddefd.js";import{P as y}from"./index-28ed5ede.js";var h,N;!function(e){e.normal="normal",e.warning="warning",e.error="error",e.success="success",e.image="image"}(h||(h={})),function(e){e.large="large",e.medium="medium"}(N||(N={}));var C={variant:h.normal,primaryButtonText:"OK",titleId:E(),className:"",size:N.large,zIndex:i.Modal},w=function(e,a){var r=function(e){return e===h.error?t.createElement(s,{size:m.Small,svgIcon:p,color:o.cherry500}):e===h.warning?t.createElement(s,{size:m.Small,svgIcon:u,color:o.black}):e===h.success?t.createElement(s,{size:m.Small,svgIcon:b,color:o.kiwi900}):null}(e);return r?t.createElement("div",{className:d.modal__iconWrapper},r):a?t.createElement("div",{className:d.modal__iconWrapper},t.cloneElement(a,{size:m.Small})):null},B=function(o){var s,i,m,u=t.useState(0),p=e(u,2),E=p[0],b=p[1],N=t.useRef(null),C=t.useRef(null),B=t.useRef(null),I=_(C),j=t.useRef(null),x=_(j),k=B.current&&B.current.scrollHeight>B.current.clientHeight;function T(e){"Escape"===e.key&&o.onClose&&(e.stopPropagation(),o.onClose())}function W(e){e.target&&L.current===e.target&&o.onClose&&(e.stopPropagation(),o.onClose())}var z=o.variant===h.image,L=t.useRef(null),S=o.secondaryButtonText&&(null===(i=o.secondaryButtonText)||void 0===i?void 0:i.length)>0||o.onSuccess,P=o.ariaLabelledBy?void 0:o.ariaLabel,A=o.ariaLabelledBy?o.ariaLabelledBy:o.ariaLabel?void 0:o.titleId;r((function(){var e,a=L.current;return null===(e=N.current)||void 0===e||e.focus(),document.body.style.overflow="hidden",o.disableCloseEvents||!a||S||(a.addEventListener("keydown",T),a.addEventListener("click",W)),function(){document.body.style.removeProperty("overflow"),o.disableCloseEvents||!a||S||(a.removeEventListener("keydown",T),a.removeEventListener("click",W))}}),[]);var M=l(o.className,d.modal,d["modal--".concat(o.variant)],d["modal--".concat(o.size)],k&&!S&&d["modal--no-actions"]),R=l((a(s={},d["modal__title--error"],o.variant===h.error),a(s,d["modal__title--success"],o.variant===h.success),s)),H=t.createElement("div",{"data-testid":"dialog-container"},t.createElement("div",{ref:L,className:d["modal-overlay"],"data-testid":o.testId,"data-analyticsid":c.Modal,style:{zIndex:o.zIndex}},t.createElement("div",{className:d.align,ref:v()},t.createElement("div",{className:M,role:"dialog","aria-label":P,"aria-labelledby":A},t.createElement("div",{tabIndex:E,ref:N,onBlur:function(){return b(-1)}}),t.createElement("div",{className:l(d.modal__shadow,d["modal__shadow--top"],a({},d["modal__shadow--show"],!I&&k))}),t.createElement("div",{className:l(d.modal__contentWrapper,a({},d["modal__contentWrapper--image"],z)),ref:B},!o.noCloseButton&&t.createElement("div",{className:d.modal__closeWrapper},t.createElement("div",{className:l(d.modal__closeWrapper__close)},t.createElement(g,{onClick:o.onClose,ariaLabel:o.ariaLabelCloseBtn}))),t.createElement("div",{className:l(d["modal__contentWrapper__scroll--".concat(o.size)],a({},d["modal__contentWrapper__scroll--image"],z))},t.createElement("div",{ref:C}),t.createElement("div",{className:d.modal__contentWrapper__title},w(o.variant,o.icon),t.createElement(f,{id:A,htmlMarkup:"h3",appearance:"title3",className:R},o.title),o.afterTitleChildren&&t.createElement("div",{className:d.modal__afterTitleChildren},o.afterTitleChildren)),z&&t.createElement("div",null,t.createElement("div",{className:d.modal__contentWrapper__imageWrapper},o.children),t.createElement("span",{className:d.modal__contentWrapper__imageDescription},o.description)),!z&&o.children&&t.createElement("div",null,o.children),!z&&!o.children&&t.createElement("p",{className:d.modal__description},o.description),t.createElement("div",{ref:j}))),t.createElement("div",{className:l(d.modal__shadow,d["modal__shadow--bottom"],a({},d["modal__shadow--show"],!x&&k))}),S&&t.createElement("div",{className:l(d["modal__call-to-action"],d["modal__call-to-action--".concat(o.size)])},o.onSuccess&&t.createElement(n,{onClick:o.onSuccess},o.primaryButtonText),o.secondaryButtonText&&(null===(m=o.secondaryButtonText)||void 0===m?void 0:m.length)>0&&t.createElement(n,{variant:"borderless",onClick:o.onClose},o.secondaryButtonText))))));if(o.printable){var O="print-modal";return t.createElement(y,{className:O,testId:"print-modal"},t.createElement("style",{media:"print"},"body > *:not(.".concat(O,") {display: none;}")),H)}return H};B.defaultProps=C;export{B as M,h as a,N as b};
|
|
2
|
-
//# sourceMappingURL=Modal-3ed00fd4.js.map
|
package/Modal-3ed00fd4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-3ed00fd4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Panel-1ce6fe37.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Panel-1ce6fe37.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableExpandedRow-44b09912.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableExpanderCell-015d3db2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/TableRow-692099ee.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow-692099ee.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsVisible-bef05e5e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|