@stenajs-webui/modal 23.16.2 → 23.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -0
- package/dist/index.es.js +1 -2
- package/dist/index.js +1 -2
- package/package.json +8 -6
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._overlay_quvmp_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_quvmp_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1{background-color:#fff}}._overlay_quvmp_1 ._modal_quvmp_31{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_quvmp_1 ._modal_quvmp_31{width:100%}}._overlay_quvmp_1 ._content_quvmp_41{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);pointer-events:all;top:calc(var(--swui-metrics-space) * 2);width:var(--swui-modal-width);max-width:var(--swui-modal-max-width)}@media (max-width: 768px){._overlay_quvmp_1 ._content_quvmp_41{top:0;width:100%;max-width:100%}}._overlay_quvmp_1 ._content_quvmp_41{animation:_appear_quvmp_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1 ._content_quvmp_41{box-shadow:none;top:0}}._overlay_quvmp_1 ._content_quvmp_41:focus{outline:0}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle{cursor:move}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle .draggable-modal-cancel,._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_quvmp_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_quvmp_1{0%{opacity:0}to{opacity:1}}._footer_quvmp_101{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_quvmp_105{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_quvmp_105{position:static;box-shadow:none}}._portal_17ze5_1{--drawer-width: 370px}._portal_17ze5_1 ._overlay_17ze5_4{position:fixed;inset:0}._portal_17ze5_1 ._content_17ze5_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out}._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:0;border-radius:0}}._portal_17ze5_1 ._content_17ze5_9:focus-visible{outline:unset}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._afterOpen_17ze5_36{transform:translate(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._beforeClose_17ze5_40{transform:translate(var(--translate-x-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._afterOpen_17ze5_36{transform:translateY(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._beforeClose_17ze5_40{transform:translateY(var(--translate-y-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1gix5_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1gix5_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1{background-color:#fff}}._overlay_1gix5_1 ._modal_1gix5_31{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1gix5_1 ._content_1gix5_38{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);animation:_appear_1gix5_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1 ._content_1gix5_38{box-shadow:none;top:0}}._overlay_1gix5_1 ._content_1gix5_38:focus{outline:0}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle{cursor:move}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle .draggable-modal-cancel,._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1gix5_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1gix5_1{0%{opacity:0}to{opacity:1}}._footer_1gix5_92{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1gix5_96{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1gix5_96{position:static;box-shadow:none}}._overlay_nbrrn_1{--swui-modal-animation-time: var(--swui-animation-time-medium);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_nbrrn_1._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_fadeIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1._beforeClose_nbrrn_24{animation:_fadeOut_nbrrn_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_nbrrn_1{background-color:#fff}}._overlay_nbrrn_1 ._modal_nbrrn_36{max-width:100%;outline:none;pointer-events:none;padding:calc(var(--swui-metrics-space) * 2);box-sizing:border-box;max-height:100%;transform:translateY(-100%)}@media (max-width: 768px){._overlay_nbrrn_1 ._modal_nbrrn_36{padding:0;width:100%}}._overlay_nbrrn_1 ._modal_nbrrn_36._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_slideIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._modal_nbrrn_36._beforeClose_nbrrn_24{animation:_slideOut_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._content_nbrrn_59{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);height:100%;overflow:hidden;overflow-y:auto}@media (max-width: 768px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:var(--swui-border-radius-large)}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar{width:16px}}@media print{._overlay_nbrrn_1 ._content_nbrrn_59{box-shadow:none;top:0}}._overlay_nbrrn_1 ._content_nbrrn_59:focus{outline:0}@keyframes _fadeIn_nbrrn_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_nbrrn_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_nbrrn_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_nbrrn_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_nbrrn_149{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_nbrrn_153{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_nbrrn_153{position:static;box-shadow:none}}._modal_4fwgb_1{display:flex;justify-content:center;align-items:center;position:fixed;inset:0;background-color:transparent}._overlay_4fwgb_13{position:fixed;inset:0;background-color:var(--swui-overlay-bg-color)}._alertDialog_14t8t_1{border:0;outline:0;border-radius:var(--swui-border-radius-large);margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}._alertDialog_14t8t_1:not([open]){display:none}._alertDialog_14t8t_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22[open]{animation:_slideOut_14t8t_1 .25s forwards}._alertDialog_14t8t_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22::backdrop{animation:_fadeOut_14t8t_1 .25s forwards}@keyframes _fadeIn_14t8t_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_14t8t_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_14t8t_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_14t8t_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._drawerDialog_11g6r_1{max-height:100%;max-width:100%;border:0;outline:0;margin:0;padding:0;overflow-y:auto;overscroll-behavior:contain;box-shadow:#0003 0 0 10px 4px;position:fixed}._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{height:100%;top:0;bottom:0}._drawerDialog_11g6r_1._left_11g6r_13 ._contentWrapper_11g6r_19,._drawerDialog_11g6r_1._right_11g6r_14 ._contentWrapper_11g6r_19{height:100%}@media (max-width: 768px){._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{width:-webkit-fit-content;width:fit-content}}._drawerDialog_11g6r_1._left_11g6r_13{left:0;right:unset}._drawerDialog_11g6r_1._left_11g6r_13[open]{animation:_slideInLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._left_11g6r_13._closing_11g6r_36[open]{animation:_slideOutLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14{left:unset;right:0}._drawerDialog_11g6r_1._right_11g6r_14[open]{animation:_slideInRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14._closing_11g6r_36[open]{animation:_slideOutRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{width:100%;left:0;right:0}@media (max-width: 768px){._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{height:-webkit-fit-content;height:fit-content}}._drawerDialog_11g6r_1._top_11g6r_54{top:0;bottom:unset}._drawerDialog_11g6r_1._top_11g6r_54[open]{animation:_slideInTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54._closing_11g6r_36[open]{animation:_slideOutTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55{top:unset;bottom:0}._drawerDialog_11g6r_1._bottom_11g6r_55[open]{animation:_slideInBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55._closing_11g6r_36[open]{animation:_slideOutBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1[open]{opacity:1;pointer-events:auto}@keyframes _slideInLeft_11g6r_1{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutLeft_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(-100%);opacity:1}}@keyframes _slideInTop_11g6r_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutTop_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(-100%);opacity:1}}@keyframes _slideInRight_11g6r_1{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutRight_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(100%);opacity:1}}@keyframes _slideInBottom_11g6r_1{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutBottom_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(100%);opacity:1}}._modalDialog_iw29e_1{border:0;outline:0;margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}@media (min-width: 769px){._modalDialog_iw29e_1{border-radius:var(--swui-border-radius-large)}._modalDialog_iw29e_1::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._modalDialog_iw29e_1::-webkit-scrollbar{width:16px}}._modalDialog_iw29e_1:not([open]){display:none}._modalDialog_iw29e_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37[open]{animation:_slideOut_iw29e_1 .25s forwards}@media (max-width: 768px){._modalDialog_iw29e_1{margin:0;width:100%;max-width:100%;height:100%;max-height:100%}}._modalDialog_iw29e_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37::backdrop{animation:_fadeOut_iw29e_1 .25s forwards}@keyframes _fadeIn_iw29e_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_iw29e_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_iw29e_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_iw29e_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@media (max-width: 768px){._contentWrapper_iw29e_101{width:100%;height:100%}}._modalActionButtons_zeqa6_1{container-type:inline-size;display:flex;flex-wrap:wrap;flex-direction:row;gap:16px;justify-content:center}@container (max-width: 480px){._modalActionButtons_zeqa6_1:has(>:nth-child(2)){flex-direction:column;justify-content:stretch}._modalActionButtons_zeqa6_1:has(>:nth-child(2))>*{width:100%}}@media (max-width: 768px){._modalBody_ozynq_1._modalBody_ozynq_1{padding:calc(var(--swui-metrics-space) * 2)}}._modalFooter_1ypno_1._modalFooter_1ypno_1{align-items:center;overflow:hidden;background:var(--silver-lighter);border-radius:24px 24px 0 0;padding:calc((var(--swui-metrics-spacing) * 2)) calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1ypno_1._modalFooter_1ypno_1._sticky_1ypno_10{position:-webkit-sticky;position:sticky;bottom:0}._unreadDot_l8bni_1{position:relative}._unreadDot_l8bni_1 ._dot_l8bni_4{top:1px;right:1px;position:absolute;width:8px;height:8px;border-radius:var(--swui-max-border-radius);background:var(--lhds-color-blue-500)}._notificationHeader_1rl25_1 ._timestamp_1rl25_2{padding-bottom:8px}._notification_tpz0j_1{display:flex;flex-direction:column;width:100%;background:var(--lhds-color-ui-50);padding:calc(var(--swui-metrics-spacing) * 2) calc(var(--swui-metrics-indent) * 2);gap:calc(var(--swui-metrics-space) * 1)}._notification_tpz0j_1 ._body_tpz0j_10{padding-left:48px;padding-right:24px}._notification_tpz0j_1._standard_tpz0j_15._unread_tpz0j_16{background:var(--lhds-color-blue-50)}._notification_tpz0j_1._danger_tpz0j_21{background:var(--lhds-color-red-100)}._notificationList_1rkvu_1{display:flex;flex-direction:column;gap:2px;background:var(--lhds-color-ui-200)}._toast_1ifzt_1 ._body_1ifzt_2{display:flex;padding-left:48px;padding-bottom:8px}._toastBox_1lvsy_1._toastBox_1lvsy_1{display:inline-block;padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2);border-radius:var(--swui-border-radius);background:var(--lhds-color-ui-50);box-shadow:var(--swui-shadow-popover)}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8{border:1px solid transparent;cursor:pointer}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8:hover{border-color:var(--lhds-color-blue-300)}._toastContainer_1rek2_1 .Toastify__toast{align-items:flex-start}
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._overlay_quvmp_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_quvmp_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1{background-color:#fff}}._overlay_quvmp_1 ._modal_quvmp_31{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_quvmp_1 ._modal_quvmp_31{width:100%}}._overlay_quvmp_1 ._content_quvmp_41{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);pointer-events:all;top:calc(var(--swui-metrics-space) * 2);width:var(--swui-modal-width);max-width:var(--swui-modal-max-width)}@media (max-width: 768px){._overlay_quvmp_1 ._content_quvmp_41{top:0;width:100%;max-width:100%}}._overlay_quvmp_1 ._content_quvmp_41{animation:_appear_quvmp_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1 ._content_quvmp_41{box-shadow:none;top:0}}._overlay_quvmp_1 ._content_quvmp_41:focus{outline:0}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle{cursor:move}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle .draggable-modal-cancel,._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_quvmp_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_quvmp_1{0%{opacity:0}to{opacity:1}}._footer_quvmp_101{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_quvmp_105{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_quvmp_105{position:static;box-shadow:none}}._portal_17ze5_1{--drawer-width: 370px}._portal_17ze5_1 ._overlay_17ze5_4{position:fixed;inset:0}._portal_17ze5_1 ._content_17ze5_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out}._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:0;border-radius:0}}._portal_17ze5_1 ._content_17ze5_9:focus-visible{outline:unset}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._afterOpen_17ze5_36{transform:translate(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._beforeClose_17ze5_40{transform:translate(var(--translate-x-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._afterOpen_17ze5_36{transform:translateY(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._beforeClose_17ze5_40{transform:translateY(var(--translate-y-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1gix5_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1gix5_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1{background-color:#fff}}._overlay_1gix5_1 ._modal_1gix5_31{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1gix5_1 ._content_1gix5_38{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);animation:_appear_1gix5_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1 ._content_1gix5_38{box-shadow:none;top:0}}._overlay_1gix5_1 ._content_1gix5_38:focus{outline:0}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle{cursor:move}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle .draggable-modal-cancel,._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1gix5_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1gix5_1{0%{opacity:0}to{opacity:1}}._footer_1gix5_92{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1gix5_96{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1gix5_96{position:static;box-shadow:none}}._overlay_nbrrn_1{--swui-modal-animation-time: var(--swui-animation-time-medium);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_nbrrn_1._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_fadeIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1._beforeClose_nbrrn_24{animation:_fadeOut_nbrrn_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_nbrrn_1{background-color:#fff}}._overlay_nbrrn_1 ._modal_nbrrn_36{max-width:100%;outline:none;pointer-events:none;padding:calc(var(--swui-metrics-space) * 2);box-sizing:border-box;max-height:100%;transform:translateY(-100%)}@media (max-width: 768px){._overlay_nbrrn_1 ._modal_nbrrn_36{padding:0;width:100%}}._overlay_nbrrn_1 ._modal_nbrrn_36._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_slideIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._modal_nbrrn_36._beforeClose_nbrrn_24{animation:_slideOut_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._content_nbrrn_59{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);height:100%;overflow:hidden;overflow-y:auto}@media (max-width: 768px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:var(--swui-border-radius-large)}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar{width:16px}}@media print{._overlay_nbrrn_1 ._content_nbrrn_59{box-shadow:none;top:0}}._overlay_nbrrn_1 ._content_nbrrn_59:focus{outline:0}@keyframes _fadeIn_nbrrn_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_nbrrn_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_nbrrn_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_nbrrn_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_nbrrn_149{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_nbrrn_153{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_nbrrn_153{position:static;box-shadow:none}}._modal_4fwgb_1{display:flex;justify-content:center;align-items:center;position:fixed;inset:0;background-color:transparent}._overlay_4fwgb_13{position:fixed;inset:0;background-color:var(--swui-overlay-bg-color)}._alertDialog_14t8t_1{border:0;outline:0;border-radius:var(--swui-border-radius-large);margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}._alertDialog_14t8t_1:not([open]){display:none}._alertDialog_14t8t_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22[open]{animation:_slideOut_14t8t_1 .25s forwards}._alertDialog_14t8t_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22::backdrop{animation:_fadeOut_14t8t_1 .25s forwards}@keyframes _fadeIn_14t8t_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_14t8t_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_14t8t_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_14t8t_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._drawerDialog_11g6r_1{max-height:100%;max-width:100%;border:0;outline:0;margin:0;padding:0;overflow-y:auto;overscroll-behavior:contain;box-shadow:#0003 0 0 10px 4px;position:fixed}._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{height:100%;top:0;bottom:0}._drawerDialog_11g6r_1._left_11g6r_13 ._contentWrapper_11g6r_19,._drawerDialog_11g6r_1._right_11g6r_14 ._contentWrapper_11g6r_19{height:100%}@media (max-width: 768px){._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{width:-webkit-fit-content;width:fit-content}}._drawerDialog_11g6r_1._left_11g6r_13{left:0;right:unset}._drawerDialog_11g6r_1._left_11g6r_13[open]{animation:_slideInLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._left_11g6r_13._closing_11g6r_36[open]{animation:_slideOutLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14{left:unset;right:0}._drawerDialog_11g6r_1._right_11g6r_14[open]{animation:_slideInRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14._closing_11g6r_36[open]{animation:_slideOutRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{width:100%;left:0;right:0}@media (max-width: 768px){._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{height:-webkit-fit-content;height:fit-content}}._drawerDialog_11g6r_1._top_11g6r_54{top:0;bottom:unset}._drawerDialog_11g6r_1._top_11g6r_54[open]{animation:_slideInTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54._closing_11g6r_36[open]{animation:_slideOutTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55{top:unset;bottom:0}._drawerDialog_11g6r_1._bottom_11g6r_55[open]{animation:_slideInBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55._closing_11g6r_36[open]{animation:_slideOutBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1[open]{opacity:1;pointer-events:auto}@keyframes _slideInLeft_11g6r_1{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutLeft_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(-100%);opacity:1}}@keyframes _slideInTop_11g6r_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutTop_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(-100%);opacity:1}}@keyframes _slideInRight_11g6r_1{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutRight_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(100%);opacity:1}}@keyframes _slideInBottom_11g6r_1{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutBottom_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(100%);opacity:1}}._modalDialog_iw29e_1{border:0;outline:0;margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}@media (min-width: 769px){._modalDialog_iw29e_1{border-radius:var(--swui-border-radius-large)}._modalDialog_iw29e_1::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._modalDialog_iw29e_1::-webkit-scrollbar{width:16px}}._modalDialog_iw29e_1:not([open]){display:none}._modalDialog_iw29e_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37[open]{animation:_slideOut_iw29e_1 .25s forwards}@media (max-width: 768px){._modalDialog_iw29e_1{margin:0;width:100%;max-width:100%;height:100%;max-height:100%}}._modalDialog_iw29e_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37::backdrop{animation:_fadeOut_iw29e_1 .25s forwards}@keyframes _fadeIn_iw29e_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_iw29e_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_iw29e_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_iw29e_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@media (max-width: 768px){._contentWrapper_iw29e_101{width:100%;height:100%}}._modalActionButtons_zeqa6_1{container-type:inline-size;display:flex;flex-wrap:wrap;flex-direction:row;gap:16px;justify-content:center}@container (max-width: 480px){._modalActionButtons_zeqa6_1:has(>:nth-child(2)){flex-direction:column;justify-content:stretch}._modalActionButtons_zeqa6_1:has(>:nth-child(2))>*{width:100%}}@media (max-width: 768px){._modalBody_ozynq_1._modalBody_ozynq_1{padding:calc(var(--swui-metrics-space) * 2)}}._modalFooter_1ypno_1._modalFooter_1ypno_1{align-items:center;overflow:hidden;background:var(--silver-lighter);border-radius:24px 24px 0 0;padding:calc((var(--swui-metrics-spacing) * 2)) calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1ypno_1._modalFooter_1ypno_1._sticky_1ypno_10{position:-webkit-sticky;position:sticky;bottom:0}._unreadDot_l8bni_1{position:relative}._unreadDot_l8bni_1 ._dot_l8bni_4{top:1px;right:1px;position:absolute;width:8px;height:8px;border-radius:var(--swui-max-border-radius);background:var(--lhds-color-blue-500)}._notificationHeader_1rl25_1 ._timestamp_1rl25_2{padding-bottom:8px}._notification_tpz0j_1{display:flex;flex-direction:column;width:100%;background:var(--lhds-color-ui-50);padding:calc(var(--swui-metrics-spacing) * 2) calc(var(--swui-metrics-indent) * 2);gap:calc(var(--swui-metrics-space) * 1)}._notification_tpz0j_1 ._body_tpz0j_10{padding-left:48px;padding-right:24px}._notification_tpz0j_1._standard_tpz0j_15._unread_tpz0j_16{background:var(--lhds-color-blue-50)}._notification_tpz0j_1._danger_tpz0j_21{background:var(--lhds-color-red-100)}._notificationList_1rkvu_1{display:flex;flex-direction:column;gap:2px;background:var(--lhds-color-ui-200)}._toast_1ifzt_1 ._body_1ifzt_2{display:flex;padding-left:48px;padding-bottom:8px}._toastBox_1lvsy_1._toastBox_1lvsy_1{display:inline-block;padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2);border-radius:var(--swui-border-radius);background:var(--lhds-color-ui-50);box-shadow:var(--swui-shadow-popover)}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8{border:1px solid transparent;cursor:pointer}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8:hover{border-color:var(--lhds-color-blue-300)}._toastContainer_1rek2_1 .Toastify__toast{align-items:flex-start}")),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
1
|
import L from "react-modal";
|
|
3
2
|
import { jsx as t, jsxs as a, Fragment as K } from "react/jsx-runtime";
|
|
4
3
|
import { useRef as w, useState as R, useEffect as Oe, createContext as Ie, useReducer as Ae, useCallback as z, useMemo as me, createElement as ue, useContext as Te } from "react";
|
|
@@ -8,7 +7,7 @@ import { exhaustSwitchCase as Re, Spacing as F, Row as p, Space as Q, Heading as
|
|
|
8
7
|
import { Icon as be, FlatButton as Ne, stenaTimes as Se, Spinner as je, CloseButton as oe, stenaTimesThick as Pe, CircledIcon as we } from "@stenajs-webui/elements";
|
|
9
8
|
import { cssColor as Be } from "@stenajs-webui/theme";
|
|
10
9
|
import { ToastContainer as qe, toast as Ge } from "react-toastify";
|
|
11
|
-
const Lo = (e) => {
|
|
10
|
+
import './index.css';const Lo = (e) => {
|
|
12
11
|
L.setAppElement(e);
|
|
13
12
|
}, Ve = "_overlay_quvmp_1", Xe = "_modal_quvmp_31", Ye = "_content_quvmp_41", Ue = "_isDraggable_quvmp_70", Je = "_footer_quvmp_101", Ke = "_stickyFooter_quvmp_105", k = {
|
|
14
13
|
overlay: Ve,
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._overlay_quvmp_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_quvmp_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1{background-color:#fff}}._overlay_quvmp_1 ._modal_quvmp_31{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_quvmp_1 ._modal_quvmp_31{width:100%}}._overlay_quvmp_1 ._content_quvmp_41{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);pointer-events:all;top:calc(var(--swui-metrics-space) * 2);width:var(--swui-modal-width);max-width:var(--swui-modal-max-width)}@media (max-width: 768px){._overlay_quvmp_1 ._content_quvmp_41{top:0;width:100%;max-width:100%}}._overlay_quvmp_1 ._content_quvmp_41{animation:_appear_quvmp_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1 ._content_quvmp_41{box-shadow:none;top:0}}._overlay_quvmp_1 ._content_quvmp_41:focus{outline:0}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle{cursor:move}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle .draggable-modal-cancel,._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_quvmp_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_quvmp_1{0%{opacity:0}to{opacity:1}}._footer_quvmp_101{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_quvmp_105{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_quvmp_105{position:static;box-shadow:none}}._portal_17ze5_1{--drawer-width: 370px}._portal_17ze5_1 ._overlay_17ze5_4{position:fixed;inset:0}._portal_17ze5_1 ._content_17ze5_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out}._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:0;border-radius:0}}._portal_17ze5_1 ._content_17ze5_9:focus-visible{outline:unset}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._afterOpen_17ze5_36{transform:translate(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._beforeClose_17ze5_40{transform:translate(var(--translate-x-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._afterOpen_17ze5_36{transform:translateY(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._beforeClose_17ze5_40{transform:translateY(var(--translate-y-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1gix5_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1gix5_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1{background-color:#fff}}._overlay_1gix5_1 ._modal_1gix5_31{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1gix5_1 ._content_1gix5_38{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);animation:_appear_1gix5_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1 ._content_1gix5_38{box-shadow:none;top:0}}._overlay_1gix5_1 ._content_1gix5_38:focus{outline:0}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle{cursor:move}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle .draggable-modal-cancel,._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1gix5_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1gix5_1{0%{opacity:0}to{opacity:1}}._footer_1gix5_92{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1gix5_96{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1gix5_96{position:static;box-shadow:none}}._overlay_nbrrn_1{--swui-modal-animation-time: var(--swui-animation-time-medium);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;inset:0;background-color:var(--swui-modal-overlay-bg-color);display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_nbrrn_1._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_fadeIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1._beforeClose_nbrrn_24{animation:_fadeOut_nbrrn_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_nbrrn_1{background-color:#fff}}._overlay_nbrrn_1 ._modal_nbrrn_36{max-width:100%;outline:none;pointer-events:none;padding:calc(var(--swui-metrics-space) * 2);box-sizing:border-box;max-height:100%;transform:translateY(-100%)}@media (max-width: 768px){._overlay_nbrrn_1 ._modal_nbrrn_36{padding:0;width:100%}}._overlay_nbrrn_1 ._modal_nbrrn_36._afterOpen_nbrrn_24:not(._beforeClose_nbrrn_24){animation:_slideIn_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._modal_nbrrn_36._beforeClose_nbrrn_24{animation:_slideOut_nbrrn_1 var(--swui-modal-animation-time) forwards}._overlay_nbrrn_1 ._content_nbrrn_59{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);height:100%;overflow:hidden;overflow-y:auto}@media (max-width: 768px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_nbrrn_1 ._content_nbrrn_59{border-radius:var(--swui-border-radius-large)}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._overlay_nbrrn_1 ._content_nbrrn_59::-webkit-scrollbar{width:16px}}@media print{._overlay_nbrrn_1 ._content_nbrrn_59{box-shadow:none;top:0}}._overlay_nbrrn_1 ._content_nbrrn_59:focus{outline:0}@keyframes _fadeIn_nbrrn_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_nbrrn_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_nbrrn_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_nbrrn_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_nbrrn_149{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_nbrrn_153{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_nbrrn_153{position:static;box-shadow:none}}._modal_4fwgb_1{display:flex;justify-content:center;align-items:center;position:fixed;inset:0;background-color:transparent}._overlay_4fwgb_13{position:fixed;inset:0;background-color:var(--swui-overlay-bg-color)}._alertDialog_14t8t_1{border:0;outline:0;border-radius:var(--swui-border-radius-large);margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}._alertDialog_14t8t_1:not([open]){display:none}._alertDialog_14t8t_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22[open]{animation:_slideOut_14t8t_1 .25s forwards}._alertDialog_14t8t_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22::backdrop{animation:_fadeOut_14t8t_1 .25s forwards}@keyframes _fadeIn_14t8t_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_14t8t_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_14t8t_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_14t8t_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._drawerDialog_11g6r_1{max-height:100%;max-width:100%;border:0;outline:0;margin:0;padding:0;overflow-y:auto;overscroll-behavior:contain;box-shadow:#0003 0 0 10px 4px;position:fixed}._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{height:100%;top:0;bottom:0}._drawerDialog_11g6r_1._left_11g6r_13 ._contentWrapper_11g6r_19,._drawerDialog_11g6r_1._right_11g6r_14 ._contentWrapper_11g6r_19{height:100%}@media (max-width: 768px){._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{width:-webkit-fit-content;width:fit-content}}._drawerDialog_11g6r_1._left_11g6r_13{left:0;right:unset}._drawerDialog_11g6r_1._left_11g6r_13[open]{animation:_slideInLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._left_11g6r_13._closing_11g6r_36[open]{animation:_slideOutLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14{left:unset;right:0}._drawerDialog_11g6r_1._right_11g6r_14[open]{animation:_slideInRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14._closing_11g6r_36[open]{animation:_slideOutRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{width:100%;left:0;right:0}@media (max-width: 768px){._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{height:-webkit-fit-content;height:fit-content}}._drawerDialog_11g6r_1._top_11g6r_54{top:0;bottom:unset}._drawerDialog_11g6r_1._top_11g6r_54[open]{animation:_slideInTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54._closing_11g6r_36[open]{animation:_slideOutTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55{top:unset;bottom:0}._drawerDialog_11g6r_1._bottom_11g6r_55[open]{animation:_slideInBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55._closing_11g6r_36[open]{animation:_slideOutBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1[open]{opacity:1;pointer-events:auto}@keyframes _slideInLeft_11g6r_1{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutLeft_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(-100%);opacity:1}}@keyframes _slideInTop_11g6r_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutTop_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(-100%);opacity:1}}@keyframes _slideInRight_11g6r_1{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutRight_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(100%);opacity:1}}@keyframes _slideInBottom_11g6r_1{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutBottom_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(100%);opacity:1}}._modalDialog_iw29e_1{border:0;outline:0;margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}@media (min-width: 769px){._modalDialog_iw29e_1{border-radius:var(--swui-border-radius-large)}._modalDialog_iw29e_1::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box;min-height:40px}._modalDialog_iw29e_1::-webkit-scrollbar{width:16px}}._modalDialog_iw29e_1:not([open]){display:none}._modalDialog_iw29e_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37[open]{animation:_slideOut_iw29e_1 .25s forwards}@media (max-width: 768px){._modalDialog_iw29e_1{margin:0;width:100%;max-width:100%;height:100%;max-height:100%}}._modalDialog_iw29e_1::backdrop{position:fixed;inset:0;background-color:#0d0e1080;animation:_fadeIn_iw29e_1 .25s forwards}._modalDialog_iw29e_1._closing_iw29e_37::backdrop{animation:_fadeOut_iw29e_1 .25s forwards}@keyframes _fadeIn_iw29e_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_iw29e_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_iw29e_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_iw29e_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@media (max-width: 768px){._contentWrapper_iw29e_101{width:100%;height:100%}}._modalActionButtons_zeqa6_1{container-type:inline-size;display:flex;flex-wrap:wrap;flex-direction:row;gap:16px;justify-content:center}@container (max-width: 480px){._modalActionButtons_zeqa6_1:has(>:nth-child(2)){flex-direction:column;justify-content:stretch}._modalActionButtons_zeqa6_1:has(>:nth-child(2))>*{width:100%}}@media (max-width: 768px){._modalBody_ozynq_1._modalBody_ozynq_1{padding:calc(var(--swui-metrics-space) * 2)}}._modalFooter_1ypno_1._modalFooter_1ypno_1{align-items:center;overflow:hidden;background:var(--silver-lighter);border-radius:24px 24px 0 0;padding:calc((var(--swui-metrics-spacing) * 2)) calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1ypno_1._modalFooter_1ypno_1._sticky_1ypno_10{position:-webkit-sticky;position:sticky;bottom:0}._unreadDot_l8bni_1{position:relative}._unreadDot_l8bni_1 ._dot_l8bni_4{top:1px;right:1px;position:absolute;width:8px;height:8px;border-radius:var(--swui-max-border-radius);background:var(--lhds-color-blue-500)}._notificationHeader_1rl25_1 ._timestamp_1rl25_2{padding-bottom:8px}._notification_tpz0j_1{display:flex;flex-direction:column;width:100%;background:var(--lhds-color-ui-50);padding:calc(var(--swui-metrics-spacing) * 2) calc(var(--swui-metrics-indent) * 2);gap:calc(var(--swui-metrics-space) * 1)}._notification_tpz0j_1 ._body_tpz0j_10{padding-left:48px;padding-right:24px}._notification_tpz0j_1._standard_tpz0j_15._unread_tpz0j_16{background:var(--lhds-color-blue-50)}._notification_tpz0j_1._danger_tpz0j_21{background:var(--lhds-color-red-100)}._notificationList_1rkvu_1{display:flex;flex-direction:column;gap:2px;background:var(--lhds-color-ui-200)}._toast_1ifzt_1 ._body_1ifzt_2{display:flex;padding-left:48px;padding-bottom:8px}._toastBox_1lvsy_1._toastBox_1lvsy_1{display:inline-block;padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2);border-radius:var(--swui-border-radius);background:var(--lhds-color-ui-50);box-shadow:var(--swui-shadow-popover)}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8{border:1px solid transparent;cursor:pointer}._toastBox_1lvsy_1._toastBox_1lvsy_1._clickable_1lvsy_8:hover{border-color:var(--lhds-color-blue-300)}._toastContainer_1rek2_1 .Toastify__toast{align-items:flex-start}")),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react-modal"),e=require("react/jsx-runtime"),r=require("react"),Re=require("react-draggable"),i=require("classnames"),s=require("@stenajs-webui/core"),p=require("@stenajs-webui/elements"),_e=require("@stenajs-webui/theme"),ge=require("react-toastify"),Le=t=>{D.setAppElement(t)},Ae="_overlay_quvmp_1",Fe="_modal_quvmp_31",ke="_content_quvmp_41",Me="_isDraggable_quvmp_70",$e="_footer_quvmp_101",ze="_stickyFooter_quvmp_105",B={overlay:Ae,modal:Fe,content:ke,isDraggable:Me,footer:$e,stickyFooter:ze},X="draggable-modal-handle",Y="draggable-modal-cancel",fe=({width:t,maxWidth:o,draggable:n=!1,children:a,...l})=>{const d=r.useRef(null);return e.jsx(D,{overlayClassName:B.overlay,className:B.modal,...l,children:e.jsx(Re,{handle:`.${X}`,cancel:`.${Y}, button, [role="tooltip"]`,bounds:".ReactModal__Overlay",disabled:!n,nodeRef:d,children:e.jsx("div",{style:{"--swui-modal-width":t,"--swui-modal-max-width":o},className:i(B.content,{[B.isDraggable]:n}),ref:d,children:a})})})},Ie="_portal_17ze5_1",Oe="_overlay_17ze5_4",Se="_content_17ze5_9",Te="_floating_17ze5_15",Ee="_slideFromLeft_17ze5_29",He="_slideFromRight_17ze5_30",We="_afterOpen_17ze5_36",qe="_beforeClose_17ze5_40",Pe="_slideFromTop_17ze5_45",Ge="_slideFromBottom_17ze5_46",f={portal:Ie,overlay:Oe,content:Se,floating:Te,slideFromLeft:Ee,slideFromRight:He,afterOpen:We,beforeClose:qe,slideFromTop:Pe,slideFromBottom:Ge},Ve=({background:t,zIndex:o,children:n,slideFrom:a="left",portalTarget:l,floating:d,...m})=>{const{height:c,width:h}=m;return e.jsx(D,{closeTimeoutMS:250,portalClassName:f.portal,overlayClassName:{base:f.overlay,afterOpen:f.afterOpen,beforeClose:f.beforeClose},className:{base:i(f.content,Ue(a),d&&f.floating),afterOpen:f.afterOpen,beforeClose:f.beforeClose},style:{content:{width:h,height:c,background:t},overlay:{zIndex:o}},parentSelector:l?()=>l:void 0,...m,children:n})},Ue=t=>{switch(t){case"left":return f.slideFromLeft;case"right":return f.slideFromRight;case"top":return f.slideFromTop;case"bottom":return f.slideFromBottom;default:return s.exhaustSwitchCase(t,f.slideFromLeft)}},Xe=({header:t,contentRight:o,onRequestClose:n,icon:a})=>e.jsx(s.Spacing,{position:"sticky",top:0,zIndex:100,background:_e.cssColor("--lhds-color-ui-50"),children:e.jsxs(s.Row,{justifyContent:"space-between",alignItems:"center",height:"48px",children:[e.jsxs(s.Row,{alignItems:"center",gap:2,children:[e.jsx(s.Space,{num:1}),a&&e.jsx(p.Icon,{icon:a,size:24}),e.jsx(s.Heading,{variant:"h4",children:t})]}),e.jsxs(s.Row,{gap:1,children:[o,e.jsx(p.FlatButton,{leftIcon:p.stenaTimes,onClick:n,variant:"danger"}),e.jsx(s.Space,{num:.5})]})]})}),Ye="_overlay_1gix5_1",Je="_modal_1gix5_31",Ke="_content_1gix5_38",G={overlay:Ye,modal:Je,content:Ke},Qe={overlay:{justifyContent:"center"}},Ze=({children:t,...o})=>e.jsx(D,{overlayClassName:G.overlay,className:G.modal,style:Qe,...o,children:e.jsx("div",{className:G.content,style:{"--swui-modal-width":"fit-content"},children:t})}),et="_overlay_nbrrn_1",tt="_afterOpen_nbrrn_24",ot="_beforeClose_nbrrn_24",st="_modal_nbrrn_36",nt="_content_nbrrn_59",w={overlay:et,afterOpen:tt,beforeClose:ot,modal:st,content:nt},ae=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xe=({children:t,background:o,className:n,overlayClassName:a,...l})=>{const d=r.useRef(null),[m,c]=r.useState(ae?"auto":void 0),h={overlay:{justifyContent:"center"},content:{"--swui-modal-content-bg-color":o}},_=s.useEventCallback(()=>{if(!ae)return;const j=d.current;j&&c(j.scrollHeight>j.clientHeight?"stable":"auto")});return r.useEffect(()=>(window.addEventListener("resize",_),document.addEventListener("DOMContentLoaded",_),()=>{window.removeEventListener("resize",_),document.removeEventListener("DOMContentLoaded",_)}),[_]),e.jsx(D,{overlayClassName:{base:i(a,w.overlay),beforeClose:w.beforeClose,afterOpen:w.afterOpen},className:{base:i(n,w.modal),beforeClose:w.beforeClose,afterOpen:w.afterOpen},style:h,closeTimeoutMS:250,onAfterOpen:_,...l,children:e.jsx("div",{className:w.content,style:{"--swui-modal-width":"fit-content",scrollbarGutter:m},ref:d,children:t})})},at="_modal_4fwgb_1",rt="_overlay_4fwgb_13",re={modal:at,overlay:rt},lt=({headerIconLeft:t,headerText:o,shouldCloseOnOverlayClick:n=!1,shouldCloseOnEsc:a=!1,...l})=>e.jsx(D,{...l,isOpen:!0,shouldCloseOnOverlayClick:n,shouldCloseOnEsc:a,className:re.modal,overlayClassName:re.overlay,children:e.jsxs(s.Column,{spacing:2,alignItems:"center",children:[e.jsx(s.Box,{alignItems:"center",justifyContent:"center",width:"64px",height:"64px",borderRadius:"50%",background:"white",shadow:"modal",children:e.jsx(p.Spinner,{size:"small"})}),(t||o)&&e.jsxs(e.Fragment,{children:[e.jsx(s.Spacing,{}),e.jsxs(s.Row,{indent:2,children:[t&&e.jsxs(e.Fragment,{children:[e.jsx(p.Icon,{size:14,icon:t,color:"white"}),e.jsx(s.Indent,{})]}),o&&e.jsx(s.Heading,{variant:"h4",color:"white",children:o})]})]})]})}),pe=({onRequestClose:t,header:o,headerText:n,closeButtonClassName:a})=>e.jsxs(s.Row,{spacing:2,indent:2,borderBottom:"1px solid var(--lhds-color-ui-300)",className:X,children:[e.jsxs(s.Row,{flex:1,indent:!0,alignItems:"center",children:[n&&e.jsx(s.Txt,{className:Y,size:"large",children:n}),o]}),e.jsx(s.Box,{alignSelf:"flex-start",children:e.jsx(p.CloseButton,{className:a,onClick:t})})]}),ct=({header:t,headerText:o,children:n,spacing:a,indent:l,draggable:d=!1,onRequestClose:m,closeButtonClassName:c,footer:h,disableStickyFooter:_=!1,...j})=>{const C=typeof a=="number"?a:1,R=typeof l=="number"?l:1;return e.jsxs(fe,{...j,onRequestClose:m,draggable:d,children:[e.jsx(pe,{onRequestClose:m,header:t,headerText:o,closeButtonClassName:c}),e.jsx(s.Box,{spacing:C,indent:R,children:n}),h&&e.jsx(s.Box,{className:i(B.footer,{[B.stickyFooter]:!_}),children:h})]})},it=({children:t})=>e.jsx(s.Column,{indent:2,spacing:2,children:t}),$=r.createContext(void 0);function z(t,{ref:o,modal:n,contentWrapperClassName:a,closingClassName:l,contentWrapperStyle:d,dialogStyle:m,divInsteadOfDialog:c,disableCloseOnClickOutside:h,elementId:_,onResolve:j,onReject:C,className:R,background:I,label:O,labelledby:S,describedby:T}){const Ne=r.useRef(null),g=o??Ne,[E,Be]=r.useReducer(u=>u+1,0),Q=r.useRef(null),H=r.useRef(null),y=r.useRef(void 0),L=r.useRef(!1),A=r.useRef(null),[Z,F]=r.useState(!1),[W,N]=r.useState(!1),[ee,v]=r.useState(!1),q=t,De=r.useCallback(u=>(Q.current=new Promise((x,ne)=>{H.current=x,A.current=ne}),v(!1),F(!0),N(!0),Be(),L.current=!1,y.current=u,n?g.current?.showModal():g.current?.show(),Q.current),[g,n]),te=r.useCallback(u=>{L.current=!0,v(!0),F(!1),c?setTimeout(()=>{v(!1),N(!1),H.current?.(u),y.current=void 0,j?.()},300):g.current?.addEventListener("animationend",x=>{x.stopPropagation(),v(!1),N(!1),g.current?.close(),H.current?.(u),y.current=void 0,j?.()},{once:!0})},[g,j,c]),b=r.useCallback(u=>{L.current=!0,v(!0),F(!1),c?setTimeout(()=>{v(!1),N(!1),A.current?.(u),C?.(),y.current=void 0},300):g.current?.addEventListener("animationend",x=>{x.stopPropagation(),v(!1),N(!1),g.current?.close(),A.current?.(u),C?.(),y.current=void 0},{once:!0})},[g,c,C]),oe=r.useCallback(u=>{u.stopPropagation(),L.current||(v(!1),F(!1),N(!1),A.current?.(),C?.(),y.current=void 0)},[C]),se=r.useCallback(u=>{if(u.target!==g.current)return;const x=g.current.getBoundingClientRect();x.top<=u.clientY&&u.clientY<=x.top+x.height&&x.left<=u.clientX&&u.clientX<=x.left+x.width||b()},[g,b]),P=r.useMemo(()=>({resolve:te,reject:b}),[b,te]);return[r.useMemo(()=>c?e.jsx(xe,{isOpen:Z,onRequestClose:b,background:I,contentLabel:O,id:_,aria:{modal:!0,labelledby:S,describedby:T},children:e.jsx($.Provider,{value:P,children:W&&r.createElement(q,{...y.current,key:E})})}):e.jsx("dialog",{onClick:h?void 0:se,onClose:oe,ref:g,id:_,className:i(R,ee&&l),"aria-label":O,"aria-labelledby":S,"aria-describedby":T,style:{background:I,...m},children:e.jsx("div",{style:d,className:a,children:W&&e.jsx($.Provider,{value:P,children:r.createElement(q,{...y.current,key:E})})})}),[c,Z,b,I,O,_,S,T,P,W,q,E,h,se,oe,g,R,ee,l,m,d,a]),{show:De,reject:b}]}const dt=()=>{const t=r.useContext($);if(t==null)throw new Error("useDialogPromise is being used outside of dialog.");return t},ut="_alertDialog_14t8t_1",mt="_closing_14t8t_22",V={alertDialog:ut,closing:mt};function _t(t,o){return z(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,V.closing),contentWrapperClassName:i(o?.contentWrapperClassName,V.contentWrapper),className:i(o?.className,V.alertDialog)})}const gt="_drawerDialog_11g6r_1",ft="_left_11g6r_13",xt="_right_11g6r_14",pt="_contentWrapper_11g6r_19",ht="_slideInLeft_11g6r_1",jt="_closing_11g6r_36",Ct="_slideOutLeft_11g6r_1",yt="_slideInRight_11g6r_1",vt="_slideOutRight_11g6r_1",bt="_top_11g6r_54",wt="_bottom_11g6r_55",Nt="_slideInTop_11g6r_1",Bt="_slideOutTop_11g6r_1",Dt="_slideInBottom_11g6r_1",Rt="_slideOutBottom_11g6r_1",k={drawerDialog:gt,left:ft,right:xt,contentWrapper:pt,slideInLeft:ht,closing:jt,slideOutLeft:Ct,slideInRight:yt,slideOutRight:vt,top:bt,bottom:wt,slideInTop:Nt,slideOutTop:Bt,slideInBottom:Dt,slideOutBottom:Rt};function Lt(t,o="left",n){return z(t,{...n,disableCloseOnClickOutside:!0,modal:!1,closingClassName:i(n?.closingClassName,k.closing),contentWrapperClassName:i(n?.contentWrapperClassName,k.contentWrapper),className:i(n?.className,k.drawerDialog,k[o])})}const At="_modalDialog_iw29e_1",Ft="_closing_iw29e_37",kt="_contentWrapper_iw29e_101",U={modalDialog:At,closing:Ft,contentWrapper:kt};function Mt(t,o){return z(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,U.closing),contentWrapperClassName:i(o?.contentWrapperClassName,U.contentWrapper),className:i(o?.className,U.modalDialog)})}const J=({headingLevel:t="h2",size:o="medium",children:n})=>e.jsx(s.Heading,{variant:o==="medium"?"h3":"h1",as:t,children:n}),$t="_modalActionButtons_zeqa6_1",zt={modalActionButtons:$t},he=({children:t})=>e.jsxs(s.Box,{width:"100%",children:[e.jsx(s.Spacing,{}),e.jsx("div",{className:zt.modalActionButtons,children:t})]}),It="_modalBody_ozynq_1",le={modalBody:It},je=({gap:t=3,variant:o="normal",className:n,...a})=>e.jsx(s.Column,{className:i(le.modalBody,le[o],n),indent:o==="relaxed"?5:3,spacing:o==="relaxed"?5:3,gap:t,...a}),Ce=({children:t,maxWidth:o})=>e.jsx(s.Column,{flex:1,height:"100%",justifyContent:"space-between",maxWidth:o,children:t}),ye=t=>e.jsx(p.FlatButton,{size:"large",variant:"danger",leftIcon:p.stenaTimesThick,...t}),ve=({heading:t,headingLevel:o,headingSize:n,onClickClose:a,closeButtonAriaLabel:l})=>e.jsx(s.Column,{children:e.jsxs(s.Row,{justifyContent:"space-between",alignItems:"center",gap:2,children:[t?e.jsx(J,{headingLevel:o,size:n,children:t}):e.jsx("div",{}),a?e.jsx(ye,{onClick:a,size:n,"aria-label":l}):null]})}),Ot=({icon:t,buttons:o,heading:n,text:a,children:l,maxWidth:d,minWidth:m,...c})=>e.jsx(Ce,{children:e.jsxs(je,{gap:0,children:[c.onClickClose&&e.jsx(ve,{onClickClose:c.onClickClose,closeButtonAriaLabel:c.closeButtonAriaLabel}),e.jsxs(s.Column,{gap:2,flexDirection:"column",alignItems:"center",maxWidth:d,minWidth:m,children:[t&&e.jsxs(e.Fragment,{children:[!c.onClickClose&&e.jsx(s.Spacing,{}),e.jsx(p.CircledIcon,{icon:t,size:"large"}),e.jsx(s.Spacing,{})]}),e.jsx(J,{children:n}),a&&e.jsx(s.Text,{textAlign:"center",children:a}),l,o&&e.jsx(he,{children:o})]})]})}),St="_modalFooter_1ypno_1",Tt="_sticky_1ypno_10",ce={modalFooter:St,sticky:Tt},Et=({sticky:t,zIndex:o=4,gap:n=2,className:a,...l})=>e.jsx(s.Row,{className:i(ce.modalFooter,t&&ce.sticky,a),shadow:"var(--swui-sticky-footer-shadow)",zIndex:o,gap:n,...l}),Ht="_unreadDot_l8bni_1",Wt="_dot_l8bni_4",ie={unreadDot:Ht,dot:Wt},be=({children:t})=>e.jsxs("div",{className:ie.unreadDot,children:[t,e.jsx("div",{className:ie.dot})]}),qt="_notificationHeader_1rl25_1",Pt="_timestamp_1rl25_2",de={notificationHeader:qt,timestamp:Pt},K=({text:t,timestamp:o,icon:n,iconAriaLabel:a,contentLeft:l,contentRight:d,onClickClose:m,unread:c=!1,variant:h,iconBackgroundColor:_,forceCloseButtonAlignment:j})=>{const C=n?e.jsx(p.CircledIcon,{size:"small",icon:n,"aria-label":a,variant:"whiteBg",backgroundColor:_||we(c,h)}):void 0;return e.jsxs(s.Row,{alignItems:"flex-start",justifyContent:"space-between","data-comp":"NotificationHeader",className:de.notificationHeader,gap:2,children:[e.jsxs(s.Row,{gap:2,alignItems:"flex-start",children:[l&&e.jsx(s.Column,{justifyContent:"center",children:l}),!l&&C&&e.jsx(s.Row,{alignItems:"center",height:"40px",children:c?e.jsx(be,{children:C}):C}),e.jsxs(s.Box,{minHeight:20,justifyContent:"center",flex:1,gap:.5,children:[n||m||j?e.jsx(s.Space,{num:.5}):null,e.jsx(s.Text,{variant:"bold",children:t}),o&&e.jsx("div",{className:de.timestamp,children:e.jsx(s.Text,{size:"small",color:_e.cssColor(c?"--lhds-color-blue-600":"--lhds-color-ui-600"),children:o})})]})]}),d&&e.jsx(s.Column,{justifyContent:"center",children:d}),m&&e.jsx(s.Row,{alignItems:"center",height:"40px",width:"40px",children:e.jsx(p.CloseButton,{onClick:m})})]})},we=(t,o)=>{if(!(!t&&o==="standard"))return"--lhds-color-ui-50"},Gt="_notification_tpz0j_1",Vt="_body_tpz0j_10",Ut="_standard_tpz0j_15",Xt="_unread_tpz0j_16",Yt="_danger_tpz0j_21",M={notification:Gt,body:Vt,standard:Ut,unread:Xt,danger:Yt},Jt=({variant:t="standard",children:o,unread:n,...a})=>e.jsxs("div",{"data-comp":"Notification",className:i(M.notification,M[t],n&&M.unread),children:[e.jsx(K,{...a,unread:n,variant:t}),o&&e.jsx(s.Column,{className:M.body,children:o})]}),Kt="_notificationList_1rkvu_1",Qt={notificationList:Kt},Zt=({children:t})=>e.jsxs("div",{"data-comp":"NotificationList",className:Qt.notificationList,children:[t,e.jsx("div",{})]}),eo="_toast_1ifzt_1",to="_body_1ifzt_2",ue={toast:eo,body:to},oo=({children:t,width:o=364,maxWidth:n,...a})=>e.jsxs(s.Box,{className:ue.toast,"data-comp":"Toast",width:o,maxWidth:n,children:[e.jsx(K,{forceCloseButtonAlignment:!0,...a}),t&&e.jsx("div",{className:ue.body,children:t})]}),so="_toastBox_1lvsy_1",no="_clickable_1lvsy_8",me={toastBox:so,clickable:no},ao=({className:t,...o})=>e.jsx(s.Box,{as:o.onClick?"button":void 0,className:i(t,me.toastBox,o.onClick&&me.clickable),"data-comp":"Toast",role:"alert",...o}),ro="_toastContainer_1rek2_1",lo={toastContainer:ro},co=({...t})=>e.jsx(ge.ToastContainer,{className:lo.toastContainer,closeButton:({closeToast:o})=>e.jsx(p.CloseButton,{onClick:o}),hideProgressBar:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!1,...t}),io=(t,o)=>ge.toast(t,o);exports.Alert=Ze;exports.BaseWindow=fe;exports.DRAGGABLE_CANCEL_CLASSNAME=Y;exports.DRAGGABLE_HANDLE_CLASSNAME=X;exports.DialogContext=$;exports.Drawer=Ve;exports.DrawerHeader=Xe;exports.InfoAlert=Ot;exports.LoadingModal=lt;exports.Modal=xe;exports.ModalActionButtons=he;exports.ModalBody=je;exports.ModalCloseButton=ye;exports.ModalContainer=Ce;exports.ModalFooter=Et;exports.ModalHeader=ve;exports.ModalHeading=J;exports.Notification=Jt;exports.NotificationHeader=K;exports.NotificationList=Zt;exports.Toast=oo;exports.ToastBox=ao;exports.ToastContainer=co;exports.UnreadDot=be;exports.Window=ct;exports.WindowFooter=it;exports.WindowHeader=pe;exports.getIconBgColorFromVariant=we;exports.setupDeclarativeModals=Le;exports.showToast=io;exports.useAlertDialog=_t;exports.useDialog=z;exports.useDialogPromise=dt;exports.useDrawerDialog=Lt;exports.useModalDialog=Mt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const D=require("react-modal"),e=require("react/jsx-runtime"),r=require("react"),Re=require("react-draggable"),i=require("classnames"),s=require("@stenajs-webui/core"),p=require("@stenajs-webui/elements"),_e=require("@stenajs-webui/theme"),ge=require("react-toastify"),Le=t=>{D.setAppElement(t)},Ae="_overlay_quvmp_1",Fe="_modal_quvmp_31",ke="_content_quvmp_41",Me="_isDraggable_quvmp_70",$e="_footer_quvmp_101",ze="_stickyFooter_quvmp_105",B={overlay:Ae,modal:Fe,content:ke,isDraggable:Me,footer:$e,stickyFooter:ze},X="draggable-modal-handle",Y="draggable-modal-cancel",fe=({width:t,maxWidth:o,draggable:n=!1,children:a,...l})=>{const d=r.useRef(null);return e.jsx(D,{overlayClassName:B.overlay,className:B.modal,...l,children:e.jsx(Re,{handle:`.${X}`,cancel:`.${Y}, button, [role="tooltip"]`,bounds:".ReactModal__Overlay",disabled:!n,nodeRef:d,children:e.jsx("div",{style:{"--swui-modal-width":t,"--swui-modal-max-width":o},className:i(B.content,{[B.isDraggable]:n}),ref:d,children:a})})})},Ie="_portal_17ze5_1",Oe="_overlay_17ze5_4",Se="_content_17ze5_9",Te="_floating_17ze5_15",Ee="_slideFromLeft_17ze5_29",He="_slideFromRight_17ze5_30",We="_afterOpen_17ze5_36",qe="_beforeClose_17ze5_40",Pe="_slideFromTop_17ze5_45",Ge="_slideFromBottom_17ze5_46",f={portal:Ie,overlay:Oe,content:Se,floating:Te,slideFromLeft:Ee,slideFromRight:He,afterOpen:We,beforeClose:qe,slideFromTop:Pe,slideFromBottom:Ge},Ve=({background:t,zIndex:o,children:n,slideFrom:a="left",portalTarget:l,floating:d,...m})=>{const{height:c,width:h}=m;return e.jsx(D,{closeTimeoutMS:250,portalClassName:f.portal,overlayClassName:{base:f.overlay,afterOpen:f.afterOpen,beforeClose:f.beforeClose},className:{base:i(f.content,Ue(a),d&&f.floating),afterOpen:f.afterOpen,beforeClose:f.beforeClose},style:{content:{width:h,height:c,background:t},overlay:{zIndex:o}},parentSelector:l?()=>l:void 0,...m,children:n})},Ue=t=>{switch(t){case"left":return f.slideFromLeft;case"right":return f.slideFromRight;case"top":return f.slideFromTop;case"bottom":return f.slideFromBottom;default:return s.exhaustSwitchCase(t,f.slideFromLeft)}},Xe=({header:t,contentRight:o,onRequestClose:n,icon:a})=>e.jsx(s.Spacing,{position:"sticky",top:0,zIndex:100,background:_e.cssColor("--lhds-color-ui-50"),children:e.jsxs(s.Row,{justifyContent:"space-between",alignItems:"center",height:"48px",children:[e.jsxs(s.Row,{alignItems:"center",gap:2,children:[e.jsx(s.Space,{num:1}),a&&e.jsx(p.Icon,{icon:a,size:24}),e.jsx(s.Heading,{variant:"h4",children:t})]}),e.jsxs(s.Row,{gap:1,children:[o,e.jsx(p.FlatButton,{leftIcon:p.stenaTimes,onClick:n,variant:"danger"}),e.jsx(s.Space,{num:.5})]})]})}),Ye="_overlay_1gix5_1",Je="_modal_1gix5_31",Ke="_content_1gix5_38",G={overlay:Ye,modal:Je,content:Ke},Qe={overlay:{justifyContent:"center"}},Ze=({children:t,...o})=>e.jsx(D,{overlayClassName:G.overlay,className:G.modal,style:Qe,...o,children:e.jsx("div",{className:G.content,style:{"--swui-modal-width":"fit-content"},children:t})}),et="_overlay_nbrrn_1",tt="_afterOpen_nbrrn_24",ot="_beforeClose_nbrrn_24",st="_modal_nbrrn_36",nt="_content_nbrrn_59",w={overlay:et,afterOpen:tt,beforeClose:ot,modal:st,content:nt},ae=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xe=({children:t,background:o,className:n,overlayClassName:a,...l})=>{const d=r.useRef(null),[m,c]=r.useState(ae?"auto":void 0),h={overlay:{justifyContent:"center"},content:{"--swui-modal-content-bg-color":o}},_=s.useEventCallback(()=>{if(!ae)return;const j=d.current;j&&c(j.scrollHeight>j.clientHeight?"stable":"auto")});return r.useEffect(()=>(window.addEventListener("resize",_),document.addEventListener("DOMContentLoaded",_),()=>{window.removeEventListener("resize",_),document.removeEventListener("DOMContentLoaded",_)}),[_]),e.jsx(D,{overlayClassName:{base:i(a,w.overlay),beforeClose:w.beforeClose,afterOpen:w.afterOpen},className:{base:i(n,w.modal),beforeClose:w.beforeClose,afterOpen:w.afterOpen},style:h,closeTimeoutMS:250,onAfterOpen:_,...l,children:e.jsx("div",{className:w.content,style:{"--swui-modal-width":"fit-content",scrollbarGutter:m},ref:d,children:t})})},at="_modal_4fwgb_1",rt="_overlay_4fwgb_13",re={modal:at,overlay:rt},lt=({headerIconLeft:t,headerText:o,shouldCloseOnOverlayClick:n=!1,shouldCloseOnEsc:a=!1,...l})=>e.jsx(D,{...l,isOpen:!0,shouldCloseOnOverlayClick:n,shouldCloseOnEsc:a,className:re.modal,overlayClassName:re.overlay,children:e.jsxs(s.Column,{spacing:2,alignItems:"center",children:[e.jsx(s.Box,{alignItems:"center",justifyContent:"center",width:"64px",height:"64px",borderRadius:"50%",background:"white",shadow:"modal",children:e.jsx(p.Spinner,{size:"small"})}),(t||o)&&e.jsxs(e.Fragment,{children:[e.jsx(s.Spacing,{}),e.jsxs(s.Row,{indent:2,children:[t&&e.jsxs(e.Fragment,{children:[e.jsx(p.Icon,{size:14,icon:t,color:"white"}),e.jsx(s.Indent,{})]}),o&&e.jsx(s.Heading,{variant:"h4",color:"white",children:o})]})]})]})}),pe=({onRequestClose:t,header:o,headerText:n,closeButtonClassName:a})=>e.jsxs(s.Row,{spacing:2,indent:2,borderBottom:"1px solid var(--lhds-color-ui-300)",className:X,children:[e.jsxs(s.Row,{flex:1,indent:!0,alignItems:"center",children:[n&&e.jsx(s.Txt,{className:Y,size:"large",children:n}),o]}),e.jsx(s.Box,{alignSelf:"flex-start",children:e.jsx(p.CloseButton,{className:a,onClick:t})})]}),ct=({header:t,headerText:o,children:n,spacing:a,indent:l,draggable:d=!1,onRequestClose:m,closeButtonClassName:c,footer:h,disableStickyFooter:_=!1,...j})=>{const C=typeof a=="number"?a:1,R=typeof l=="number"?l:1;return e.jsxs(fe,{...j,onRequestClose:m,draggable:d,children:[e.jsx(pe,{onRequestClose:m,header:t,headerText:o,closeButtonClassName:c}),e.jsx(s.Box,{spacing:C,indent:R,children:n}),h&&e.jsx(s.Box,{className:i(B.footer,{[B.stickyFooter]:!_}),children:h})]})},it=({children:t})=>e.jsx(s.Column,{indent:2,spacing:2,children:t}),$=r.createContext(void 0);function z(t,{ref:o,modal:n,contentWrapperClassName:a,closingClassName:l,contentWrapperStyle:d,dialogStyle:m,divInsteadOfDialog:c,disableCloseOnClickOutside:h,elementId:_,onResolve:j,onReject:C,className:R,background:I,label:O,labelledby:S,describedby:T}){const Ne=r.useRef(null),g=o??Ne,[E,Be]=r.useReducer(u=>u+1,0),Q=r.useRef(null),H=r.useRef(null),y=r.useRef(void 0),L=r.useRef(!1),A=r.useRef(null),[Z,F]=r.useState(!1),[W,N]=r.useState(!1),[ee,v]=r.useState(!1),q=t,De=r.useCallback(u=>(Q.current=new Promise((x,ne)=>{H.current=x,A.current=ne}),v(!1),F(!0),N(!0),Be(),L.current=!1,y.current=u,n?g.current?.showModal():g.current?.show(),Q.current),[g,n]),te=r.useCallback(u=>{L.current=!0,v(!0),F(!1),c?setTimeout(()=>{v(!1),N(!1),H.current?.(u),y.current=void 0,j?.()},300):g.current?.addEventListener("animationend",x=>{x.stopPropagation(),v(!1),N(!1),g.current?.close(),H.current?.(u),y.current=void 0,j?.()},{once:!0})},[g,j,c]),b=r.useCallback(u=>{L.current=!0,v(!0),F(!1),c?setTimeout(()=>{v(!1),N(!1),A.current?.(u),C?.(),y.current=void 0},300):g.current?.addEventListener("animationend",x=>{x.stopPropagation(),v(!1),N(!1),g.current?.close(),A.current?.(u),C?.(),y.current=void 0},{once:!0})},[g,c,C]),oe=r.useCallback(u=>{u.stopPropagation(),L.current||(v(!1),F(!1),N(!1),A.current?.(),C?.(),y.current=void 0)},[C]),se=r.useCallback(u=>{if(u.target!==g.current)return;const x=g.current.getBoundingClientRect();x.top<=u.clientY&&u.clientY<=x.top+x.height&&x.left<=u.clientX&&u.clientX<=x.left+x.width||b()},[g,b]),P=r.useMemo(()=>({resolve:te,reject:b}),[b,te]);return[r.useMemo(()=>c?e.jsx(xe,{isOpen:Z,onRequestClose:b,background:I,contentLabel:O,id:_,aria:{modal:!0,labelledby:S,describedby:T},children:e.jsx($.Provider,{value:P,children:W&&r.createElement(q,{...y.current,key:E})})}):e.jsx("dialog",{onClick:h?void 0:se,onClose:oe,ref:g,id:_,className:i(R,ee&&l),"aria-label":O,"aria-labelledby":S,"aria-describedby":T,style:{background:I,...m},children:e.jsx("div",{style:d,className:a,children:W&&e.jsx($.Provider,{value:P,children:r.createElement(q,{...y.current,key:E})})})}),[c,Z,b,I,O,_,S,T,P,W,q,E,h,se,oe,g,R,ee,l,m,d,a]),{show:De,reject:b}]}const dt=()=>{const t=r.useContext($);if(t==null)throw new Error("useDialogPromise is being used outside of dialog.");return t},ut="_alertDialog_14t8t_1",mt="_closing_14t8t_22",V={alertDialog:ut,closing:mt};function _t(t,o){return z(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,V.closing),contentWrapperClassName:i(o?.contentWrapperClassName,V.contentWrapper),className:i(o?.className,V.alertDialog)})}const gt="_drawerDialog_11g6r_1",ft="_left_11g6r_13",xt="_right_11g6r_14",pt="_contentWrapper_11g6r_19",ht="_slideInLeft_11g6r_1",jt="_closing_11g6r_36",Ct="_slideOutLeft_11g6r_1",yt="_slideInRight_11g6r_1",vt="_slideOutRight_11g6r_1",bt="_top_11g6r_54",wt="_bottom_11g6r_55",Nt="_slideInTop_11g6r_1",Bt="_slideOutTop_11g6r_1",Dt="_slideInBottom_11g6r_1",Rt="_slideOutBottom_11g6r_1",k={drawerDialog:gt,left:ft,right:xt,contentWrapper:pt,slideInLeft:ht,closing:jt,slideOutLeft:Ct,slideInRight:yt,slideOutRight:vt,top:bt,bottom:wt,slideInTop:Nt,slideOutTop:Bt,slideInBottom:Dt,slideOutBottom:Rt};function Lt(t,o="left",n){return z(t,{...n,disableCloseOnClickOutside:!0,modal:!1,closingClassName:i(n?.closingClassName,k.closing),contentWrapperClassName:i(n?.contentWrapperClassName,k.contentWrapper),className:i(n?.className,k.drawerDialog,k[o])})}const At="_modalDialog_iw29e_1",Ft="_closing_iw29e_37",kt="_contentWrapper_iw29e_101",U={modalDialog:At,closing:Ft,contentWrapper:kt};function Mt(t,o){return z(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,U.closing),contentWrapperClassName:i(o?.contentWrapperClassName,U.contentWrapper),className:i(o?.className,U.modalDialog)})}const J=({headingLevel:t="h2",size:o="medium",children:n})=>e.jsx(s.Heading,{variant:o==="medium"?"h3":"h1",as:t,children:n}),$t="_modalActionButtons_zeqa6_1",zt={modalActionButtons:$t},he=({children:t})=>e.jsxs(s.Box,{width:"100%",children:[e.jsx(s.Spacing,{}),e.jsx("div",{className:zt.modalActionButtons,children:t})]}),It="_modalBody_ozynq_1",le={modalBody:It},je=({gap:t=3,variant:o="normal",className:n,...a})=>e.jsx(s.Column,{className:i(le.modalBody,le[o],n),indent:o==="relaxed"?5:3,spacing:o==="relaxed"?5:3,gap:t,...a}),Ce=({children:t,maxWidth:o})=>e.jsx(s.Column,{flex:1,height:"100%",justifyContent:"space-between",maxWidth:o,children:t}),ye=t=>e.jsx(p.FlatButton,{size:"large",variant:"danger",leftIcon:p.stenaTimesThick,...t}),ve=({heading:t,headingLevel:o,headingSize:n,onClickClose:a,closeButtonAriaLabel:l})=>e.jsx(s.Column,{children:e.jsxs(s.Row,{justifyContent:"space-between",alignItems:"center",gap:2,children:[t?e.jsx(J,{headingLevel:o,size:n,children:t}):e.jsx("div",{}),a?e.jsx(ye,{onClick:a,size:n,"aria-label":l}):null]})}),Ot=({icon:t,buttons:o,heading:n,text:a,children:l,maxWidth:d,minWidth:m,...c})=>e.jsx(Ce,{children:e.jsxs(je,{gap:0,children:[c.onClickClose&&e.jsx(ve,{onClickClose:c.onClickClose,closeButtonAriaLabel:c.closeButtonAriaLabel}),e.jsxs(s.Column,{gap:2,flexDirection:"column",alignItems:"center",maxWidth:d,minWidth:m,children:[t&&e.jsxs(e.Fragment,{children:[!c.onClickClose&&e.jsx(s.Spacing,{}),e.jsx(p.CircledIcon,{icon:t,size:"large"}),e.jsx(s.Spacing,{})]}),e.jsx(J,{children:n}),a&&e.jsx(s.Text,{textAlign:"center",children:a}),l,o&&e.jsx(he,{children:o})]})]})}),St="_modalFooter_1ypno_1",Tt="_sticky_1ypno_10",ce={modalFooter:St,sticky:Tt},Et=({sticky:t,zIndex:o=4,gap:n=2,className:a,...l})=>e.jsx(s.Row,{className:i(ce.modalFooter,t&&ce.sticky,a),shadow:"var(--swui-sticky-footer-shadow)",zIndex:o,gap:n,...l}),Ht="_unreadDot_l8bni_1",Wt="_dot_l8bni_4",ie={unreadDot:Ht,dot:Wt},be=({children:t})=>e.jsxs("div",{className:ie.unreadDot,children:[t,e.jsx("div",{className:ie.dot})]}),qt="_notificationHeader_1rl25_1",Pt="_timestamp_1rl25_2",de={notificationHeader:qt,timestamp:Pt},K=({text:t,timestamp:o,icon:n,iconAriaLabel:a,contentLeft:l,contentRight:d,onClickClose:m,unread:c=!1,variant:h,iconBackgroundColor:_,forceCloseButtonAlignment:j})=>{const C=n?e.jsx(p.CircledIcon,{size:"small",icon:n,"aria-label":a,variant:"whiteBg",backgroundColor:_||we(c,h)}):void 0;return e.jsxs(s.Row,{alignItems:"flex-start",justifyContent:"space-between","data-comp":"NotificationHeader",className:de.notificationHeader,gap:2,children:[e.jsxs(s.Row,{gap:2,alignItems:"flex-start",children:[l&&e.jsx(s.Column,{justifyContent:"center",children:l}),!l&&C&&e.jsx(s.Row,{alignItems:"center",height:"40px",children:c?e.jsx(be,{children:C}):C}),e.jsxs(s.Box,{minHeight:20,justifyContent:"center",flex:1,gap:.5,children:[n||m||j?e.jsx(s.Space,{num:.5}):null,e.jsx(s.Text,{variant:"bold",children:t}),o&&e.jsx("div",{className:de.timestamp,children:e.jsx(s.Text,{size:"small",color:_e.cssColor(c?"--lhds-color-blue-600":"--lhds-color-ui-600"),children:o})})]})]}),d&&e.jsx(s.Column,{justifyContent:"center",children:d}),m&&e.jsx(s.Row,{alignItems:"center",height:"40px",width:"40px",children:e.jsx(p.CloseButton,{onClick:m})})]})},we=(t,o)=>{if(!(!t&&o==="standard"))return"--lhds-color-ui-50"},Gt="_notification_tpz0j_1",Vt="_body_tpz0j_10",Ut="_standard_tpz0j_15",Xt="_unread_tpz0j_16",Yt="_danger_tpz0j_21",M={notification:Gt,body:Vt,standard:Ut,unread:Xt,danger:Yt},Jt=({variant:t="standard",children:o,unread:n,...a})=>e.jsxs("div",{"data-comp":"Notification",className:i(M.notification,M[t],n&&M.unread),children:[e.jsx(K,{...a,unread:n,variant:t}),o&&e.jsx(s.Column,{className:M.body,children:o})]}),Kt="_notificationList_1rkvu_1",Qt={notificationList:Kt},Zt=({children:t})=>e.jsxs("div",{"data-comp":"NotificationList",className:Qt.notificationList,children:[t,e.jsx("div",{})]}),eo="_toast_1ifzt_1",to="_body_1ifzt_2",ue={toast:eo,body:to},oo=({children:t,width:o=364,maxWidth:n,...a})=>e.jsxs(s.Box,{className:ue.toast,"data-comp":"Toast",width:o,maxWidth:n,children:[e.jsx(K,{forceCloseButtonAlignment:!0,...a}),t&&e.jsx("div",{className:ue.body,children:t})]}),so="_toastBox_1lvsy_1",no="_clickable_1lvsy_8",me={toastBox:so,clickable:no},ao=({className:t,...o})=>e.jsx(s.Box,{as:o.onClick?"button":void 0,className:i(t,me.toastBox,o.onClick&&me.clickable),"data-comp":"Toast",role:"alert",...o}),ro="_toastContainer_1rek2_1",lo={toastContainer:ro},co=({...t})=>e.jsx(ge.ToastContainer,{className:lo.toastContainer,closeButton:({closeToast:o})=>e.jsx(p.CloseButton,{onClick:o}),hideProgressBar:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!1,...t}),io=(t,o)=>ge.toast(t,o);exports.Alert=Ze;exports.BaseWindow=fe;exports.DRAGGABLE_CANCEL_CLASSNAME=Y;exports.DRAGGABLE_HANDLE_CLASSNAME=X;exports.DialogContext=$;exports.Drawer=Ve;exports.DrawerHeader=Xe;exports.InfoAlert=Ot;exports.LoadingModal=lt;exports.Modal=xe;exports.ModalActionButtons=he;exports.ModalBody=je;exports.ModalCloseButton=ye;exports.ModalContainer=Ce;exports.ModalFooter=Et;exports.ModalHeader=ve;exports.ModalHeading=J;exports.Notification=Jt;exports.NotificationHeader=K;exports.NotificationList=Zt;exports.Toast=oo;exports.ToastBox=ao;exports.ToastContainer=co;exports.UnreadDot=be;exports.Window=ct;exports.WindowFooter=it;exports.WindowHeader=pe;exports.getIconBgColorFromVariant=we;exports.setupDeclarativeModals=Le;exports.showToast=io;exports.useAlertDialog=_t;exports.useDialog=z;exports.useDialogPromise=dt;exports.useDrawerDialog=Lt;exports.useModalDialog=Mt;
|
|
3
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/modal",
|
|
3
|
-
"version": "23.16.
|
|
3
|
+
"version": "23.16.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "mattias800",
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
|
-
"sideEffects":
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"**/*.css"
|
|
25
|
+
],
|
|
24
26
|
"engines": {
|
|
25
27
|
"node": ">=8",
|
|
26
28
|
"npm": ">=5"
|
|
@@ -35,9 +37,9 @@
|
|
|
35
37
|
"deploy": "gh-pages -d example/build"
|
|
36
38
|
},
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"@stenajs-webui/core": "23.16.
|
|
39
|
-
"@stenajs-webui/elements": "23.16.
|
|
40
|
-
"@stenajs-webui/theme": "23.16.
|
|
40
|
+
"@stenajs-webui/core": "23.16.3",
|
|
41
|
+
"@stenajs-webui/elements": "23.16.3",
|
|
42
|
+
"@stenajs-webui/theme": "23.16.3",
|
|
41
43
|
"@types/react-modal": "^3.16.3",
|
|
42
44
|
"classnames": "^2.5.1",
|
|
43
45
|
"react-draggable": "4.4.6",
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
"files": [
|
|
66
68
|
"dist"
|
|
67
69
|
],
|
|
68
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "ed00286bddd313d67ef7e81bdec73f9e47cf7707",
|
|
69
71
|
"publishConfig": {
|
|
70
72
|
"access": "public"
|
|
71
73
|
}
|