@stenajs-webui/modal 23.21.13 → 23.21.14

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 CHANGED
@@ -1 +1 @@
1
- html{scrollbar-gutter:stable}body.ReactModal__Body--open,body:has(dialog.swui-block-scroll[open]){overflow:hidden}._overlay_zoch3_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;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_zoch3_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_zoch3_1{background-color:#fff}}._overlay_zoch3_1 ._modal_zoch3_33{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_zoch3_1 ._modal_zoch3_33{width:100%}}._overlay_zoch3_1 ._content_zoch3_43{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_zoch3_1 ._content_zoch3_43{top:0;width:100%;max-width:100%}}._overlay_zoch3_1 ._content_zoch3_43{animation:_appear_zoch3_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_zoch3_1 ._content_zoch3_43{box-shadow:none;top:0}}._overlay_zoch3_1 ._content_zoch3_43:focus{outline:0}._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle{cursor:move}._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle .draggable-modal-cancel,._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_zoch3_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_zoch3_1{0%{opacity:0}to{opacity:1}}._footer_zoch3_103{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_zoch3_107{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_zoch3_107{position:static;box-shadow:none}}._portal_194oy_1{--drawer-width: 370px}._portal_194oy_1 ._overlay_194oy_4{position:fixed;inset:0}._portal_194oy_1 ._content_194oy_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out;overscroll-behavior:contain}._portal_194oy_1 ._content_194oy_9._floating_194oy_18{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_194oy_1 ._content_194oy_9._floating_194oy_18{margin:0;border-radius:0}}._portal_194oy_1 ._content_194oy_9:focus-visible{outline:unset}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32._afterOpen_194oy_39,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33._afterOpen_194oy_39{transform:translate(0)}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32._beforeClose_194oy_43,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33._beforeClose_194oy_43{transform:translate(var(--translate-x-outside-screen))}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48._afterOpen_194oy_39,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49._afterOpen_194oy_39{transform:translateY(0)}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48._beforeClose_194oy_43,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49._beforeClose_194oy_43{transform:translateY(var(--translate-y-outside-screen))}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1xtk3_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;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1xtk3_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1xtk3_1{background-color:#fff}}._overlay_1xtk3_1 ._modal_1xtk3_33{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1xtk3_1 ._content_1xtk3_40{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_1xtk3_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1xtk3_1 ._content_1xtk3_40{box-shadow:none;top:0}}._overlay_1xtk3_1 ._content_1xtk3_40:focus{outline:0}._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle{cursor:move}._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle .draggable-modal-cancel,._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1xtk3_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1xtk3_1{0%{opacity:0}to{opacity:1}}._footer_1xtk3_94{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1xtk3_98{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1xtk3_98{position:static;box-shadow:none}}._overlay_qz2d4_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);overflow:hidden;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_qz2d4_1._afterOpen_qz2d4_29:not(._beforeClose_qz2d4_29){animation:_fadeIn_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1._beforeClose_qz2d4_29{animation:_fadeOut_qz2d4_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_qz2d4_1{background-color:#fff}}._overlay_qz2d4_1 ._modal_qz2d4_41{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_qz2d4_1 ._modal_qz2d4_41{padding:0;width:100%}}._overlay_qz2d4_1 ._modal_qz2d4_41._afterOpen_qz2d4_29:not(._beforeClose_qz2d4_29){animation:_slideIn_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1 ._modal_qz2d4_41._beforeClose_qz2d4_29{animation:_slideOut_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1 ._content_qz2d4_64{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;overscroll-behavior:contain}@media (min-width: 769px){._overlay_qz2d4_1 ._content_qz2d4_64._contentOverflowVisible_qz2d4_95{overflow:visible}}@media (max-width: 768px){._overlay_qz2d4_1 ._content_qz2d4_64{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_qz2d4_1 ._content_qz2d4_64{border-radius:var(--swui-border-radius-large)}._overlay_qz2d4_1 ._content_qz2d4_64::-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_qz2d4_1 ._content_qz2d4_64::-webkit-scrollbar{width:16px}}@media print{._overlay_qz2d4_1 ._content_qz2d4_64{box-shadow:none;top:0}}._overlay_qz2d4_1 ._content_qz2d4_64:focus{outline:0}@keyframes _fadeIn_qz2d4_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_qz2d4_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_qz2d4_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_qz2d4_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_qz2d4_175{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_qz2d4_179{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_qz2d4_179{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_1uwtk_1._modalFooter_1uwtk_1{align-items:center;overflow:hidden;background:var(--silver-lighter);border-radius:24px 24px var(--swui-border-radius-large) var(--swui-border-radius-large)}@media (max-width: 768px){._modalFooter_1uwtk_1._modalFooter_1uwtk_1{border-bottom-left-radius:0;border-bottom-right-radius:0}}._modalFooter_1uwtk_1._modalFooter_1uwtk_1{padding:calc((var(--swui-metrics-spacing) * 2)) calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1uwtk_1._modalFooter_1uwtk_1._sticky_1uwtk_20{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}
1
+ html{scrollbar-gutter:stable}body.ReactModal__Body--open,body:has(dialog.swui-block-scroll[open]){overflow:hidden}._overlay_zoch3_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;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_zoch3_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_zoch3_1{background-color:#fff}}._overlay_zoch3_1 ._modal_zoch3_33{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_zoch3_1 ._modal_zoch3_33{width:100%}}._overlay_zoch3_1 ._content_zoch3_43{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_zoch3_1 ._content_zoch3_43{top:0;width:100%;max-width:100%}}._overlay_zoch3_1 ._content_zoch3_43{animation:_appear_zoch3_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_zoch3_1 ._content_zoch3_43{box-shadow:none;top:0}}._overlay_zoch3_1 ._content_zoch3_43:focus{outline:0}._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle{cursor:move}._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle .draggable-modal-cancel,._overlay_zoch3_1 ._content_zoch3_43._isDraggable_zoch3_72 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_zoch3_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_zoch3_1{0%{opacity:0}to{opacity:1}}._footer_zoch3_103{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_zoch3_107{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_zoch3_107{position:static;box-shadow:none}}._portal_194oy_1{--drawer-width: 370px}._portal_194oy_1 ._overlay_194oy_4{position:fixed;inset:0}._portal_194oy_1 ._content_194oy_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out;overscroll-behavior:contain}._portal_194oy_1 ._content_194oy_9._floating_194oy_18{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_194oy_1 ._content_194oy_9._floating_194oy_18{margin:0;border-radius:0}}._portal_194oy_1 ._content_194oy_9:focus-visible{outline:unset}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32._afterOpen_194oy_39,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33._afterOpen_194oy_39{transform:translate(0)}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32._beforeClose_194oy_43,._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33._beforeClose_194oy_43{transform:translate(var(--translate-x-outside-screen))}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48._afterOpen_194oy_39,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49._afterOpen_194oy_39{transform:translateY(0)}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48._beforeClose_194oy_43,._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49._beforeClose_194oy_43{transform:translateY(var(--translate-y-outside-screen))}._portal_194oy_1 ._content_194oy_9._slideFromLeft_194oy_32{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_194oy_1 ._content_194oy_9._slideFromRight_194oy_33{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_194oy_1 ._content_194oy_9._slideFromTop_194oy_48{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_194oy_1 ._content_194oy_9._slideFromBottom_194oy_49{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1xtk3_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;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1xtk3_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1xtk3_1{background-color:#fff}}._overlay_1xtk3_1 ._modal_1xtk3_33{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1xtk3_1 ._content_1xtk3_40{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_1xtk3_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1xtk3_1 ._content_1xtk3_40{box-shadow:none;top:0}}._overlay_1xtk3_1 ._content_1xtk3_40:focus{outline:0}._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle{cursor:move}._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle .draggable-modal-cancel,._overlay_1xtk3_1 ._content_1xtk3_40._isDraggable_1xtk3_63 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1xtk3_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1xtk3_1{0%{opacity:0}to{opacity:1}}._footer_1xtk3_94{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1xtk3_98{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1xtk3_98{position:static;box-shadow:none}}._overlay_qz2d4_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);overflow:hidden;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_qz2d4_1._afterOpen_qz2d4_29:not(._beforeClose_qz2d4_29){animation:_fadeIn_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1._beforeClose_qz2d4_29{animation:_fadeOut_qz2d4_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_qz2d4_1{background-color:#fff}}._overlay_qz2d4_1 ._modal_qz2d4_41{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_qz2d4_1 ._modal_qz2d4_41{padding:0;width:100%}}._overlay_qz2d4_1 ._modal_qz2d4_41._afterOpen_qz2d4_29:not(._beforeClose_qz2d4_29){animation:_slideIn_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1 ._modal_qz2d4_41._beforeClose_qz2d4_29{animation:_slideOut_qz2d4_1 var(--swui-modal-animation-time) forwards}._overlay_qz2d4_1 ._content_qz2d4_64{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;overscroll-behavior:contain}@media (min-width: 769px){._overlay_qz2d4_1 ._content_qz2d4_64._contentOverflowVisible_qz2d4_95{overflow:visible}}@media (max-width: 768px){._overlay_qz2d4_1 ._content_qz2d4_64{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_qz2d4_1 ._content_qz2d4_64{border-radius:var(--swui-border-radius-large)}._overlay_qz2d4_1 ._content_qz2d4_64::-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_qz2d4_1 ._content_qz2d4_64::-webkit-scrollbar{width:16px}}@media print{._overlay_qz2d4_1 ._content_qz2d4_64{box-shadow:none;top:0}}._overlay_qz2d4_1 ._content_qz2d4_64:focus{outline:0}@keyframes _fadeIn_qz2d4_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_qz2d4_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_qz2d4_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_qz2d4_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_qz2d4_175{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_qz2d4_179{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_qz2d4_179{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_1p0nf_1._modalFooter_1p0nf_1{align-items:center;overflow:hidden;background:var(--moln);border-radius:24px 24px var(--swui-border-radius-large) var(--swui-border-radius-large)}@media (max-width: 768px){._modalFooter_1p0nf_1._modalFooter_1p0nf_1{border-bottom-left-radius:0;border-bottom-right-radius:0}}._modalFooter_1p0nf_1._modalFooter_1p0nf_1{padding:calc((var(--swui-metrics-spacing) * 2)) calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1p0nf_1._modalFooter_1p0nf_1._sticky_1p0nf_20{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,11 +1,11 @@
1
1
  import O from "react-modal";
2
2
  import { jsx as t, jsxs as a, Fragment as K } from "react/jsx-runtime";
3
- import { useRef as B, useState as E, useEffect as Ae, createContext as Te, useReducer as Me, useCallback as L, useMemo as _e, createElement as fe, useContext as Re } from "react";
3
+ import { useRef as B, useState as E, useEffect as Ae, createContext as Te, useReducer as Me, useCallback as L, useMemo as ue, createElement as fe, useContext as Re } from "react";
4
4
  import Ee from "react-draggable";
5
5
  import c from "classnames";
6
- import { exhaustSwitchCase as We, Spacing as F, getDataProps as He, Row as p, Space as Q, Heading as te, useEventCallback as Se, Column as v, Box as k, Indent as je, Txt as Pe, Text as Z } from "@stenajs-webui/core";
7
- import { Icon as Ne, FlatButton as Be, stenaTimes as qe, Spinner as Ve, CloseButton as oe, stenaTimesThick as Ge, CircledIcon as ke } from "@stenajs-webui/elements";
8
- import { cssColor as De } from "@stenajs-webui/theme";
6
+ import { exhaustSwitchCase as We, Spacing as F, getDataProps as He, Row as h, Space as Q, Heading as te, useEventCallback as Se, Column as v, Box as D, Indent as je, Txt as Pe, Text as Z } from "@stenajs-webui/core";
7
+ import { Icon as we, FlatButton as Be, stenaTimes as qe, Spinner as Ve, CloseButton as oe, stenaTimesThick as Ge, CircledIcon as De } from "@stenajs-webui/elements";
8
+ import { cssColor as $e } from "@stenajs-webui/theme";
9
9
  import { ToastContainer as Xe, toast as Ye } from "react-toastify";
10
10
  import './index.css';const Io = (e) => {
11
11
  O.setAppElement(e);
@@ -16,7 +16,7 @@ import './index.css';const Io = (e) => {
16
16
  isDraggable: Qe,
17
17
  footer: Ze,
18
18
  stickyFooter: et
19
- }, $e = "draggable-modal-handle", xe = "draggable-modal-cancel", tt = ({
19
+ }, ke = "draggable-modal-handle", xe = "draggable-modal-cancel", tt = ({
20
20
  width: e,
21
21
  maxWidth: o,
22
22
  draggable: n = !1,
@@ -33,7 +33,7 @@ import './index.css';const Io = (e) => {
33
33
  children: /* @__PURE__ */ t(
34
34
  Ee,
35
35
  {
36
- handle: `.${$e}`,
36
+ handle: `.${ke}`,
37
37
  cancel: `.${xe}, button, [role="tooltip"]`,
38
38
  bounds: ".ReactModal__Overlay",
39
39
  disabled: !n,
@@ -90,7 +90,7 @@ import './index.css';const Io = (e) => {
90
90
  className: {
91
91
  base: c(
92
92
  f.content,
93
- ut(s),
93
+ _t(s),
94
94
  i && f.floating
95
95
  ),
96
96
  afterOpen: f.afterOpen,
@@ -103,7 +103,7 @@ import './index.css';const Io = (e) => {
103
103
  children: n
104
104
  }
105
105
  );
106
- }, ut = (e) => {
106
+ }, _t = (e) => {
107
107
  switch (e) {
108
108
  case "left":
109
109
  return f.slideFromLeft;
@@ -129,21 +129,21 @@ import './index.css';const Io = (e) => {
129
129
  position: "sticky",
130
130
  top: 0,
131
131
  zIndex: 100,
132
- background: De("--lhds-color-ui-50"),
132
+ background: $e("--lhds-color-ui-50"),
133
133
  ...He(i),
134
134
  children: /* @__PURE__ */ a(
135
- p,
135
+ h,
136
136
  {
137
137
  justifyContent: "space-between",
138
138
  alignItems: "center",
139
139
  height: "48px",
140
140
  children: [
141
- /* @__PURE__ */ a(p, { alignItems: "center", gap: 2, children: [
141
+ /* @__PURE__ */ a(h, { alignItems: "center", gap: 2, children: [
142
142
  /* @__PURE__ */ t(Q, { num: 1 }),
143
- s && /* @__PURE__ */ t(Ne, { icon: s, size: 24 }),
143
+ s && /* @__PURE__ */ t(we, { icon: s, size: 24 }),
144
144
  /* @__PURE__ */ t(te, { variant: "h4", as: r, children: e })
145
145
  ] }),
146
- /* @__PURE__ */ a(p, { gap: 1, children: [
146
+ /* @__PURE__ */ a(h, { gap: 1, children: [
147
147
  o,
148
148
  /* @__PURE__ */ t(
149
149
  Be,
@@ -159,11 +159,11 @@ import './index.css';const Io = (e) => {
159
159
  }
160
160
  )
161
161
  }
162
- ), _t = "_overlay_1xtk3_1", ft = "_modal_1xtk3_33", gt = "_content_1xtk3_40", Y = {
163
- overlay: _t,
162
+ ), ut = "_overlay_1xtk3_1", ft = "_modal_1xtk3_33", gt = "_content_1xtk3_40", Y = {
163
+ overlay: ut,
164
164
  modal: ft,
165
165
  content: gt
166
- }, ht = { overlay: { justifyContent: "center" } }, Mo = ({
166
+ }, pt = { overlay: { justifyContent: "center" } }, Mo = ({
167
167
  children: e,
168
168
  ...o
169
169
  }) => /* @__PURE__ */ t(
@@ -171,7 +171,7 @@ import './index.css';const Io = (e) => {
171
171
  {
172
172
  overlayClassName: Y.overlay,
173
173
  className: Y.modal,
174
- style: ht,
174
+ style: pt,
175
175
  ...o,
176
176
  children: /* @__PURE__ */ t(
177
177
  "div",
@@ -182,14 +182,14 @@ import './index.css';const Io = (e) => {
182
182
  }
183
183
  )
184
184
  }
185
- ), pt = "_overlay_qz2d4_1", yt = "_afterOpen_qz2d4_29", Ct = "_beforeClose_qz2d4_29", vt = "_modal_qz2d4_41", bt = "_content_qz2d4_64", wt = "_contentOverflowVisible_qz2d4_95", N = {
186
- overlay: pt,
185
+ ), ht = "_overlay_qz2d4_1", yt = "_afterOpen_qz2d4_29", Ct = "_beforeClose_qz2d4_29", vt = "_modal_qz2d4_41", bt = "_content_qz2d4_64", Nt = "_contentOverflowVisible_qz2d4_95", w = {
186
+ overlay: ht,
187
187
  afterOpen: yt,
188
188
  beforeClose: Ct,
189
189
  modal: vt,
190
190
  content: bt,
191
- contentOverflowVisible: wt
192
- }, ge = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), Nt = ({
191
+ contentOverflowVisible: Nt
192
+ }, ge = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), wt = ({
193
193
  children: e,
194
194
  background: o,
195
195
  className: n,
@@ -207,7 +207,7 @@ import './index.css';const Io = (e) => {
207
207
  content: {
208
208
  "--swui-modal-content-bg-color": o
209
209
  }
210
- }, u = Se(() => {
210
+ }, _ = Se(() => {
211
211
  if (!ge)
212
212
  return;
213
213
  const g = d.current;
@@ -215,31 +215,31 @@ import './index.css';const Io = (e) => {
215
215
  g.scrollHeight > g.clientHeight ? "stable" : "auto"
216
216
  );
217
217
  });
218
- return Ae(() => (window.addEventListener("resize", u), document.addEventListener("DOMContentLoaded", u), () => {
219
- window.removeEventListener("resize", u), document.removeEventListener("DOMContentLoaded", u);
220
- }), [u]), /* @__PURE__ */ t(
218
+ return Ae(() => (window.addEventListener("resize", _), document.addEventListener("DOMContentLoaded", _), () => {
219
+ window.removeEventListener("resize", _), document.removeEventListener("DOMContentLoaded", _);
220
+ }), [_]), /* @__PURE__ */ t(
221
221
  O,
222
222
  {
223
223
  overlayClassName: {
224
- base: c(s, N.overlay),
225
- beforeClose: N.beforeClose,
226
- afterOpen: N.afterOpen
224
+ base: c(s, w.overlay),
225
+ beforeClose: w.beforeClose,
226
+ afterOpen: w.afterOpen
227
227
  },
228
228
  className: {
229
- base: c(n, N.modal),
230
- beforeClose: N.beforeClose,
231
- afterOpen: N.afterOpen
229
+ base: c(n, w.modal),
230
+ beforeClose: w.beforeClose,
231
+ afterOpen: w.afterOpen
232
232
  },
233
233
  style: C,
234
234
  closeTimeoutMS: 250,
235
- onAfterOpen: u,
235
+ onAfterOpen: _,
236
236
  ...i,
237
237
  children: /* @__PURE__ */ t(
238
238
  "div",
239
239
  {
240
240
  className: c(
241
- N.content,
242
- r && N.contentOverflowVisible
241
+ w.content,
242
+ r && w.contentOverflowVisible
243
243
  ),
244
244
  style: {
245
245
  "--swui-modal-width": "fit-content",
@@ -251,9 +251,9 @@ import './index.css';const Io = (e) => {
251
251
  )
252
252
  }
253
253
  );
254
- }, Bt = "_modal_4fwgb_1", kt = "_overlay_4fwgb_13", he = {
254
+ }, Bt = "_modal_4fwgb_1", Dt = "_overlay_4fwgb_13", pe = {
255
255
  modal: Bt,
256
- overlay: kt
256
+ overlay: Dt
257
257
  }, Ro = ({
258
258
  headerIconLeft: e,
259
259
  headerText: o,
@@ -267,11 +267,11 @@ import './index.css';const Io = (e) => {
267
267
  isOpen: !0,
268
268
  shouldCloseOnOverlayClick: n,
269
269
  shouldCloseOnEsc: s,
270
- className: he.modal,
271
- overlayClassName: he.overlay,
270
+ className: pe.modal,
271
+ overlayClassName: pe.overlay,
272
272
  children: /* @__PURE__ */ a(v, { spacing: 2, alignItems: "center", children: [
273
273
  /* @__PURE__ */ t(
274
- k,
274
+ D,
275
275
  {
276
276
  alignItems: "center",
277
277
  justifyContent: "center",
@@ -285,9 +285,9 @@ import './index.css';const Io = (e) => {
285
285
  ),
286
286
  (e || o) && /* @__PURE__ */ a(K, { children: [
287
287
  /* @__PURE__ */ t(F, {}),
288
- /* @__PURE__ */ a(p, { indent: 2, children: [
288
+ /* @__PURE__ */ a(h, { indent: 2, children: [
289
289
  e && /* @__PURE__ */ a(K, { children: [
290
- /* @__PURE__ */ t(Ne, { size: 14, icon: e, color: "white" }),
290
+ /* @__PURE__ */ t(we, { size: 14, icon: e, color: "white" }),
291
291
  /* @__PURE__ */ t(je, {})
292
292
  ] }),
293
293
  o && /* @__PURE__ */ t(te, { variant: "h4", color: "white", children: o })
@@ -295,24 +295,24 @@ import './index.css';const Io = (e) => {
295
295
  ] })
296
296
  ] })
297
297
  }
298
- ), Dt = ({
298
+ ), $t = ({
299
299
  onRequestClose: e,
300
300
  header: o,
301
301
  headerText: n,
302
302
  closeButtonClassName: s
303
303
  }) => /* @__PURE__ */ a(
304
- p,
304
+ h,
305
305
  {
306
306
  spacing: 2,
307
307
  indent: 2,
308
308
  borderBottom: "1px solid var(--lhds-color-ui-300)",
309
- className: $e,
309
+ className: ke,
310
310
  children: [
311
- /* @__PURE__ */ a(p, { flex: 1, indent: !0, alignItems: "center", children: [
311
+ /* @__PURE__ */ a(h, { flex: 1, indent: !0, alignItems: "center", children: [
312
312
  n && /* @__PURE__ */ t(Pe, { className: xe, size: "large", children: n }),
313
313
  o
314
314
  ] }),
315
- /* @__PURE__ */ t(k, { alignSelf: "flex-start", children: /* @__PURE__ */ t(
315
+ /* @__PURE__ */ t(D, { alignSelf: "flex-start", children: /* @__PURE__ */ t(
316
316
  oe,
317
317
  {
318
318
  className: s,
@@ -332,16 +332,16 @@ import './index.css';const Io = (e) => {
332
332
  closeButtonClassName: l,
333
333
  footer: y,
334
334
  disableStickyFooter: C = !1,
335
- ...u
335
+ ..._
336
336
  }) => /* @__PURE__ */ a(
337
337
  tt,
338
338
  {
339
- ...u,
339
+ ..._,
340
340
  onRequestClose: d,
341
341
  draggable: i,
342
342
  children: [
343
343
  /* @__PURE__ */ t(
344
- Dt,
344
+ $t,
345
345
  {
346
346
  onRequestClose: d,
347
347
  header: e,
@@ -349,9 +349,9 @@ import './index.css';const Io = (e) => {
349
349
  closeButtonClassName: l
350
350
  }
351
351
  ),
352
- /* @__PURE__ */ t(k, { spacing: typeof s == "number" ? s : 1, indent: typeof r == "number" ? r : 1, children: n }),
352
+ /* @__PURE__ */ t(D, { spacing: typeof s == "number" ? s : 1, indent: typeof r == "number" ? r : 1, children: n }),
353
353
  y && /* @__PURE__ */ t(
354
- k,
354
+ D,
355
355
  {
356
356
  className: c(z.footer, {
357
357
  [z.stickyFooter]: !C
@@ -374,9 +374,9 @@ function ne(e, {
374
374
  divInsteadOfDialog: l,
375
375
  disableCloseOnClickOutside: y,
376
376
  blockScroll: C = !0,
377
- elementId: u,
377
+ elementId: _,
378
378
  onResolve: g,
379
- onReject: $,
379
+ onReject: k,
380
380
  className: se,
381
381
  background: W,
382
382
  allowContentOverflow: re,
@@ -384,66 +384,66 @@ function ne(e, {
384
384
  labelledby: S,
385
385
  describedby: j
386
386
  }) {
387
- const Le = B(null), _ = o ?? Le, [P, Fe] = Me((m) => m + 1, 0), ae = B(null), q = B(null), b = B(void 0), I = B(!1), A = B(null), [le, T] = E(!1), [V, x] = E(!1), [ce, w] = E(!1), G = e, Ie = L(
387
+ const Le = B(null), u = o ?? Le, [P, Fe] = Me((m) => m + 1, 0), ae = B(null), q = B(null), b = B(void 0), I = B(!1), A = B(null), [le, T] = E(!1), [V, x] = E(!1), [ce, N] = E(!1), G = e, Ie = L(
388
388
  (m) => (ae.current = new Promise(
389
- (h, ue) => {
390
- q.current = h, A.current = ue;
389
+ (p, _e) => {
390
+ q.current = p, A.current = _e;
391
391
  }
392
- ), w(!1), T(!0), x(!0), Fe(), I.current = !1, b.current = m, n ? _.current?.showModal() : _.current?.show(), ae.current),
393
- [_, n]
392
+ ), N(!1), T(!0), x(!0), Fe(), I.current = !1, b.current = m, n ? u.current?.showModal() : u.current?.show(), ae.current),
393
+ [u, n]
394
394
  ), ie = L(
395
395
  (m) => {
396
- I.current = !0, w(!0), T(!1), l ? setTimeout(() => {
397
- w(!1), x(!1), q.current?.(m), b.current = void 0, g?.();
398
- }, 300) : _.current?.addEventListener(
396
+ I.current = !0, N(!0), T(!1), l ? setTimeout(() => {
397
+ N(!1), x(!1), q.current?.(m), b.current = void 0, g?.();
398
+ }, 300) : u.current?.addEventListener(
399
399
  "animationend",
400
- (h) => {
401
- h.stopPropagation(), w(!1), x(!1), _.current?.close(), q.current?.(m), b.current = void 0, g?.();
400
+ (p) => {
401
+ p.stopPropagation(), N(!1), x(!1), u.current?.close(), q.current?.(m), b.current = void 0, g?.();
402
402
  },
403
403
  { once: !0 }
404
404
  );
405
405
  },
406
- [_, g, l]
407
- ), D = L(
406
+ [u, g, l]
407
+ ), $ = L(
408
408
  (m) => {
409
- I.current = !0, w(!0), T(!1), l ? setTimeout(() => {
410
- w(!1), x(!1), A.current?.(m), $?.(), b.current = void 0;
411
- }, 300) : _.current?.addEventListener(
409
+ I.current = !0, N(!0), T(!1), l ? setTimeout(() => {
410
+ N(!1), x(!1), A.current?.(m), k?.(), b.current = void 0;
411
+ }, 300) : u.current?.addEventListener(
412
412
  "animationend",
413
- (h) => {
414
- h.stopPropagation(), w(!1), x(!1), _.current?.close(), A.current?.(m), $?.(), b.current = void 0;
413
+ (p) => {
414
+ p.stopPropagation(), N(!1), x(!1), u.current?.close(), A.current?.(m), k?.(), b.current = void 0;
415
415
  },
416
416
  { once: !0 }
417
417
  );
418
418
  },
419
- [_, l, $]
419
+ [u, l, k]
420
420
  ), de = L(
421
421
  (m) => {
422
- m.stopPropagation(), I.current || (w(!1), T(!1), x(!1), A.current?.(), $?.(), b.current = void 0);
422
+ m.stopPropagation(), I.current || (N(!1), T(!1), x(!1), A.current?.(), k?.(), b.current = void 0);
423
423
  },
424
- [$]
424
+ [k]
425
425
  ), me = L(
426
426
  (m) => {
427
- if (m.target !== _.current)
427
+ if (m.target !== u.current)
428
428
  return;
429
- const h = _.current.getBoundingClientRect();
430
- h.top <= m.clientY && m.clientY <= h.top + h.height && h.left <= m.clientX && m.clientX <= h.left + h.width || D();
429
+ const p = u.current.getBoundingClientRect();
430
+ p.top <= m.clientY && m.clientY <= p.top + p.height && p.left <= m.clientX && m.clientX <= p.left + p.width || $();
431
431
  },
432
- [_, D]
433
- ), X = _e(
434
- () => ({ resolve: ie, reject: D }),
435
- [D, ie]
432
+ [u, $]
433
+ ), X = ue(
434
+ () => ({ resolve: ie, reject: $ }),
435
+ [$, ie]
436
436
  );
437
- return [_e(
437
+ return [ue(
438
438
  () => l ? /* @__PURE__ */ t(
439
- Nt,
439
+ wt,
440
440
  {
441
441
  isOpen: le,
442
- onRequestClose: D,
442
+ onRequestClose: $,
443
443
  background: W,
444
444
  allowContentOverflow: re,
445
445
  contentLabel: H,
446
- id: u,
446
+ id: _,
447
447
  aria: { modal: !0, labelledby: S, describedby: j },
448
448
  children: /* @__PURE__ */ t(ee.Provider, { value: X, children: V && /* @__PURE__ */ fe(G, { ...b.current, key: P }) })
449
449
  }
@@ -452,8 +452,8 @@ function ne(e, {
452
452
  {
453
453
  onClick: y ? void 0 : me,
454
454
  onClose: de,
455
- ref: _,
456
- id: u,
455
+ ref: u,
456
+ id: _,
457
457
  className: c(
458
458
  C && "swui-block-scroll",
459
459
  se,
@@ -469,11 +469,11 @@ function ne(e, {
469
469
  [
470
470
  l,
471
471
  le,
472
- D,
472
+ $,
473
473
  W,
474
474
  re,
475
475
  H,
476
- u,
476
+ _,
477
477
  S,
478
478
  j,
479
479
  X,
@@ -484,7 +484,7 @@ function ne(e, {
484
484
  C,
485
485
  me,
486
486
  de,
487
- _,
487
+ u,
488
488
  se,
489
489
  ce,
490
490
  r,
@@ -492,15 +492,15 @@ function ne(e, {
492
492
  i,
493
493
  s
494
494
  ]
495
- ), { show: Ie, reject: D }];
495
+ ), { show: Ie, reject: $ }];
496
496
  }
497
497
  const Ho = () => {
498
498
  const e = Re(ee);
499
499
  if (e == null)
500
500
  throw new Error("useDialogPromise is being used outside of dialog.");
501
501
  return e;
502
- }, $t = "_alertDialog_14t8t_1", xt = "_closing_14t8t_22", U = {
503
- alertDialog: $t,
502
+ }, kt = "_alertDialog_14t8t_1", xt = "_closing_14t8t_22", U = {
503
+ alertDialog: kt,
504
504
  closing: xt
505
505
  };
506
506
  function So(e, o) {
@@ -573,10 +573,10 @@ const ze = ({
573
573
  modalActionButtons: Xt
574
574
  }, Ut = ({
575
575
  children: e
576
- }) => /* @__PURE__ */ a(k, { width: "100%", children: [
576
+ }) => /* @__PURE__ */ a(D, { width: "100%", children: [
577
577
  /* @__PURE__ */ t(F, {}),
578
578
  /* @__PURE__ */ t("div", { className: Yt.modalActionButtons, children: e })
579
- ] }), Jt = "_modalBody_ozynq_1", pe = {
579
+ ] }), Jt = "_modalBody_ozynq_1", he = {
580
580
  modalBody: Jt
581
581
  }, Kt = ({
582
582
  gap: e = 3,
@@ -586,7 +586,7 @@ const ze = ({
586
586
  }) => /* @__PURE__ */ t(
587
587
  v,
588
588
  {
589
- className: c(pe.modalBody, pe[o], n),
589
+ className: c(he.modalBody, he[o], n),
590
590
  indent: o === "relaxed" ? 5 : 3,
591
591
  spacing: o === "relaxed" ? 5 : 3,
592
592
  gap: e,
@@ -618,7 +618,7 @@ const ze = ({
618
618
  headingSize: n,
619
619
  onClickClose: s,
620
620
  closeButtonAriaLabel: r
621
- }) => /* @__PURE__ */ t(v, { children: /* @__PURE__ */ a(p, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
621
+ }) => /* @__PURE__ */ t(v, { children: /* @__PURE__ */ a(h, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
622
622
  e ? /* @__PURE__ */ t(ze, { headingLevel: o, size: n, children: e }) : /* @__PURE__ */ t("div", {}),
623
623
  s ? /* @__PURE__ */ t(
624
624
  Zt,
@@ -656,7 +656,7 @@ const ze = ({
656
656
  children: [
657
657
  e && /* @__PURE__ */ a(K, { children: [
658
658
  !l.onClickClose && /* @__PURE__ */ t(F, {}),
659
- /* @__PURE__ */ t(ke, { icon: e, size: "large" }),
659
+ /* @__PURE__ */ t(De, { icon: e, size: "large" }),
660
660
  /* @__PURE__ */ t(F, {})
661
661
  ] }),
662
662
  /* @__PURE__ */ t(ze, { children: n }),
@@ -666,7 +666,7 @@ const ze = ({
666
666
  ]
667
667
  }
668
668
  )
669
- ] }) }), to = "_modalFooter_1uwtk_1", oo = "_sticky_1uwtk_20", ye = {
669
+ ] }) }), to = "_modalFooter_1p0nf_1", oo = "_sticky_1p0nf_20", ye = {
670
670
  modalFooter: to,
671
671
  sticky: oo
672
672
  }, Vo = ({
@@ -676,7 +676,7 @@ const ze = ({
676
676
  className: s,
677
677
  ...r
678
678
  }) => /* @__PURE__ */ t(
679
- p,
679
+ h,
680
680
  {
681
681
  className: c(ye.modalFooter, e && ye.sticky, s),
682
682
  shadow: "var(--swui-sticky-footer-shadow)",
@@ -704,10 +704,10 @@ const ze = ({
704
704
  unread: l = !1,
705
705
  variant: y,
706
706
  iconBackgroundColor: C,
707
- forceCloseButtonAlignment: u
707
+ forceCloseButtonAlignment: _
708
708
  }) => {
709
709
  const g = n ? /* @__PURE__ */ t(
710
- ke,
710
+ De,
711
711
  {
712
712
  size: "small",
713
713
  icon: n,
@@ -717,7 +717,7 @@ const ze = ({
717
717
  }
718
718
  ) : void 0;
719
719
  return /* @__PURE__ */ a(
720
- p,
720
+ h,
721
721
  {
722
722
  alignItems: "flex-start",
723
723
  justifyContent: "space-between",
@@ -725,17 +725,17 @@ const ze = ({
725
725
  className: ve.notificationHeader,
726
726
  gap: 2,
727
727
  children: [
728
- /* @__PURE__ */ a(p, { gap: 2, alignItems: "flex-start", children: [
728
+ /* @__PURE__ */ a(h, { gap: 2, alignItems: "flex-start", children: [
729
729
  r && /* @__PURE__ */ t(v, { justifyContent: "center", children: r }),
730
- !r && g && /* @__PURE__ */ t(p, { alignItems: "center", height: "40px", children: l ? /* @__PURE__ */ t(ro, { children: g }) : g }),
731
- /* @__PURE__ */ a(k, { minHeight: 20, justifyContent: "center", flex: 1, gap: 0.5, children: [
732
- n || d || u ? /* @__PURE__ */ t(Q, { num: 0.5 }) : null,
730
+ !r && g && /* @__PURE__ */ t(h, { alignItems: "center", height: "40px", children: l ? /* @__PURE__ */ t(ro, { children: g }) : g }),
731
+ /* @__PURE__ */ a(D, { minHeight: 20, justifyContent: "center", flex: 1, gap: 0.5, children: [
732
+ n || d || _ ? /* @__PURE__ */ t(Q, { num: 0.5 }) : null,
733
733
  /* @__PURE__ */ t(Z, { variant: "bold", children: e }),
734
734
  o && /* @__PURE__ */ t("div", { className: ve.timestamp, children: /* @__PURE__ */ t(
735
735
  Z,
736
736
  {
737
737
  size: "small",
738
- color: De(
738
+ color: $e(
739
739
  l ? "--lhds-color-blue-600" : "--lhds-color-ui-600"
740
740
  ),
741
741
  children: o
@@ -744,18 +744,18 @@ const ze = ({
744
744
  ] })
745
745
  ] }),
746
746
  i && /* @__PURE__ */ t(v, { justifyContent: "center", children: i }),
747
- d && /* @__PURE__ */ t(p, { alignItems: "center", height: "40px", width: "40px", children: /* @__PURE__ */ t(oe, { onClick: d }) })
747
+ d && /* @__PURE__ */ t(h, { alignItems: "center", height: "40px", width: "40px", children: /* @__PURE__ */ t(oe, { onClick: d }) })
748
748
  ]
749
749
  }
750
750
  );
751
751
  }, co = (e, o) => {
752
752
  if (!(!e && o === "standard"))
753
753
  return "--lhds-color-ui-50";
754
- }, io = "_notification_tpz0j_1", mo = "_body_tpz0j_10", uo = "_standard_tpz0j_15", _o = "_unread_tpz0j_16", fo = "_danger_tpz0j_21", R = {
754
+ }, io = "_notification_tpz0j_1", mo = "_body_tpz0j_10", _o = "_standard_tpz0j_15", uo = "_unread_tpz0j_16", fo = "_danger_tpz0j_21", R = {
755
755
  notification: io,
756
756
  body: mo,
757
- standard: uo,
758
- unread: _o,
757
+ standard: _o,
758
+ unread: uo,
759
759
  danger: fo
760
760
  }, Go = ({
761
761
  variant: e = "standard",
@@ -776,15 +776,15 @@ const ze = ({
776
776
  o && /* @__PURE__ */ t(v, { className: R.body, children: o })
777
777
  ]
778
778
  }
779
- ), go = "_notificationList_1rkvu_1", ho = {
779
+ ), go = "_notificationList_1rkvu_1", po = {
780
780
  notificationList: go
781
781
  }, Xo = ({
782
782
  children: e
783
- }) => /* @__PURE__ */ a("div", { "data-comp": "NotificationList", className: ho.notificationList, children: [
783
+ }) => /* @__PURE__ */ a("div", { "data-comp": "NotificationList", className: po.notificationList, children: [
784
784
  e,
785
785
  /* @__PURE__ */ t("div", {})
786
- ] }), po = "_toast_1ifzt_1", yo = "_body_1ifzt_2", be = {
787
- toast: po,
786
+ ] }), ho = "_toast_1ifzt_1", yo = "_body_1ifzt_2", be = {
787
+ toast: ho,
788
788
  body: yo
789
789
  }, Yo = ({
790
790
  children: e,
@@ -792,7 +792,7 @@ const ze = ({
792
792
  maxWidth: n,
793
793
  ...s
794
794
  }) => /* @__PURE__ */ a(
795
- k,
795
+ D,
796
796
  {
797
797
  className: be.toast,
798
798
  "data-comp": "Toast",
@@ -803,28 +803,28 @@ const ze = ({
803
803
  e && /* @__PURE__ */ t("div", { className: be.body, children: e })
804
804
  ]
805
805
  }
806
- ), Co = "_toastBox_1lvsy_1", vo = "_clickable_1lvsy_8", we = {
806
+ ), Co = "_toastBox_1lvsy_1", vo = "_clickable_1lvsy_8", Ne = {
807
807
  toastBox: Co,
808
808
  clickable: vo
809
809
  }, Uo = ({ className: e, ...o }) => /* @__PURE__ */ t(
810
- k,
810
+ D,
811
811
  {
812
812
  as: o.onClick ? "button" : void 0,
813
813
  className: c(
814
814
  e,
815
- we.toastBox,
816
- o.onClick && we.clickable
815
+ Ne.toastBox,
816
+ o.onClick && Ne.clickable
817
817
  ),
818
818
  "data-comp": "Toast",
819
819
  role: "alert",
820
820
  ...o
821
821
  }
822
- ), bo = "_toastContainer_1rek2_1", wo = {
822
+ ), bo = "_toastContainer_1rek2_1", No = {
823
823
  toastContainer: bo
824
824
  }, Jo = ({ ...e }) => /* @__PURE__ */ t(
825
825
  Xe,
826
826
  {
827
- className: wo.toastContainer,
827
+ className: No.toastContainer,
828
828
  closeButton: ({ closeToast: o }) => /* @__PURE__ */ t(oe, { onClick: o }),
829
829
  hideProgressBar: !0,
830
830
  pauseOnFocusLoss: !1,
@@ -837,13 +837,13 @@ export {
837
837
  Mo as Alert,
838
838
  tt as BaseWindow,
839
839
  xe as DRAGGABLE_CANCEL_CLASSNAME,
840
- $e as DRAGGABLE_HANDLE_CLASSNAME,
840
+ ke as DRAGGABLE_HANDLE_CLASSNAME,
841
841
  ee as DialogContext,
842
842
  Ao as Drawer,
843
843
  To as DrawerHeader,
844
844
  qo as InfoAlert,
845
845
  Ro as LoadingModal,
846
- Nt as Modal,
846
+ wt as Modal,
847
847
  Ut as ModalActionButtons,
848
848
  Kt as ModalBody,
849
849
  Zt as ModalCloseButton,
@@ -860,7 +860,7 @@ export {
860
860
  ro as UnreadDot,
861
861
  Eo as Window,
862
862
  Wo as WindowFooter,
863
- Dt as WindowHeader,
863
+ $t as WindowHeader,
864
864
  co as getIconBgColorFromVariant,
865
865
  Io as setupDeclarativeModals,
866
866
  Ko as showToast,
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const k=require("react-modal"),e=require("react/jsx-runtime"),l=require("react"),Le=require("react-draggable"),i=require("classnames"),s=require("@stenajs-webui/core"),p=require("@stenajs-webui/elements"),ge=require("@stenajs-webui/theme"),xe=require("react-toastify"),Ae=t=>{k.setAppElement(t)},Fe="_overlay_zoch3_1",Me="_modal_zoch3_33",$e="_content_zoch3_43",Oe="_isDraggable_zoch3_72",ze="_footer_zoch3_103",Ie="_stickyFooter_zoch3_107",D={overlay:Fe,modal:Me,content:$e,isDraggable:Oe,footer:ze,stickyFooter:Ie},X="draggable-modal-handle",Y="draggable-modal-cancel",he=({width:t,maxWidth:o,draggable:n=!1,children:a,...r})=>{const d=l.useRef(null);return e.jsx(k,{overlayClassName:D.overlay,className:D.modal,...r,children:e.jsx(Le,{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(D.content,{[D.isDraggable]:n}),ref:d,children:a})})})},Se="_portal_194oy_1",Te="_overlay_194oy_4",Ee="_content_194oy_9",He="_floating_194oy_18",We="_slideFromLeft_194oy_32",qe="_slideFromRight_194oy_33",Pe="_afterOpen_194oy_39",Ge="_beforeClose_194oy_43",Ve="_slideFromTop_194oy_48",Ue="_slideFromBottom_194oy_49",x={portal:Se,overlay:Te,content:Ee,floating:He,slideFromLeft:We,slideFromRight:qe,afterOpen:Pe,beforeClose:Ge,slideFromTop:Ve,slideFromBottom:Ue},Xe=({background:t,zIndex:o,children:n,slideFrom:a="left",portalTarget:r,floating:d,...u})=>{const{height:c,width:j}=u;return e.jsx(k,{closeTimeoutMS:250,portalClassName:x.portal,overlayClassName:{base:x.overlay,afterOpen:x.afterOpen,beforeClose:x.beforeClose},className:{base:i(x.content,Ye(a),d&&x.floating),afterOpen:x.afterOpen,beforeClose:x.beforeClose},style:{content:{width:j,height:c,background:t},overlay:{zIndex:o}},parentSelector:r?()=>r:void 0,...u,bodyOpenClassName:"swui-drawer-body-open",children:n})},Ye=t=>{switch(t){case"left":return x.slideFromLeft;case"right":return x.slideFromRight;case"top":return x.slideFromTop;case"bottom":return x.slideFromBottom;default:return s.exhaustSwitchCase(t,x.slideFromLeft)}},Je=({header:t,contentRight:o,onRequestClose:n,icon:a,headingLevel:r="h1",...d})=>e.jsx(s.Spacing,{position:"sticky",top:0,zIndex:100,background:ge.cssColor("--lhds-color-ui-50"),...s.getDataProps(d),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",as:r,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})]})]})}),Ke="_overlay_1xtk3_1",Qe="_modal_1xtk3_33",Ze="_content_1xtk3_40",G={overlay:Ke,modal:Qe,content:Ze},et={overlay:{justifyContent:"center"}},tt=({children:t,...o})=>e.jsx(k,{overlayClassName:G.overlay,className:G.modal,style:et,...o,children:e.jsx("div",{className:G.content,style:{"--swui-modal-width":"fit-content"},children:t})}),ot="_overlay_qz2d4_1",st="_afterOpen_qz2d4_29",nt="_beforeClose_qz2d4_29",at="_modal_qz2d4_41",rt="_content_qz2d4_64",lt="_contentOverflowVisible_qz2d4_95",v={overlay:ot,afterOpen:st,beforeClose:nt,modal:at,content:rt,contentOverflowVisible:lt},le=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),pe=({children:t,background:o,className:n,overlayClassName:a,allowContentOverflow:r=!1,...d})=>{const u=l.useRef(null),[c,j]=l.useState(le?"auto":void 0),C={overlay:r?{}:{justifyContent:"center"},content:{"--swui-modal-content-bg-color":o}},_=s.useEventCallback(()=>{if(!le)return;const g=u.current;g&&j(g.scrollHeight>g.clientHeight?"stable":"auto")});return l.useEffect(()=>(window.addEventListener("resize",_),document.addEventListener("DOMContentLoaded",_),()=>{window.removeEventListener("resize",_),document.removeEventListener("DOMContentLoaded",_)}),[_]),e.jsx(k,{overlayClassName:{base:i(a,v.overlay),beforeClose:v.beforeClose,afterOpen:v.afterOpen},className:{base:i(n,v.modal),beforeClose:v.beforeClose,afterOpen:v.afterOpen},style:C,closeTimeoutMS:250,onAfterOpen:_,...d,children:e.jsx("div",{className:i(v.content,r&&v.contentOverflowVisible),style:{"--swui-modal-width":"fit-content",scrollbarGutter:c},ref:u,children:t})})},ct="_modal_4fwgb_1",it="_overlay_4fwgb_13",ce={modal:ct,overlay:it},dt=({headerIconLeft:t,headerText:o,shouldCloseOnOverlayClick:n=!1,shouldCloseOnEsc:a=!1,...r})=>e.jsx(k,{...r,isOpen:!0,shouldCloseOnOverlayClick:n,shouldCloseOnEsc:a,className:ce.modal,overlayClassName:ce.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})]})]})]})}),je=({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})})]}),ut=({header:t,headerText:o,children:n,spacing:a,indent:r,draggable:d=!1,onRequestClose:u,closeButtonClassName:c,footer:j,disableStickyFooter:C=!1,..._})=>{const g=typeof a=="number"?a:1,w=typeof r=="number"?r:1;return e.jsxs(he,{..._,onRequestClose:u,draggable:d,children:[e.jsx(je,{onRequestClose:u,header:t,headerText:o,closeButtonClassName:c}),e.jsx(s.Box,{spacing:g,indent:w,children:n}),j&&e.jsx(s.Box,{className:i(D.footer,{[D.stickyFooter]:!C}),children:j})]})},mt=({children:t})=>e.jsx(s.Column,{indent:2,spacing:2,children:t}),$=l.createContext(void 0);function O(t,{ref:o,modal:n,contentWrapperClassName:a,closingClassName:r,contentWrapperStyle:d,dialogStyle:u,divInsteadOfDialog:c,disableCloseOnClickOutside:j,blockScroll:C=!0,elementId:_,onResolve:g,onReject:w,className:Q,background:z,allowContentOverflow:Z,label:I,labelledby:S,describedby:T}){const De=l.useRef(null),f=o??De,[E,ke]=l.useReducer(m=>m+1,0),ee=l.useRef(null),H=l.useRef(null),y=l.useRef(void 0),R=l.useRef(!1),L=l.useRef(null),[te,A]=l.useState(!1),[W,B]=l.useState(!1),[oe,b]=l.useState(!1),q=t,Re=l.useCallback(m=>(ee.current=new Promise((h,re)=>{H.current=h,L.current=re}),b(!1),A(!0),B(!0),ke(),R.current=!1,y.current=m,n?f.current?.showModal():f.current?.show(),ee.current),[f,n]),se=l.useCallback(m=>{R.current=!0,b(!0),A(!1),c?setTimeout(()=>{b(!1),B(!1),H.current?.(m),y.current=void 0,g?.()},300):f.current?.addEventListener("animationend",h=>{h.stopPropagation(),b(!1),B(!1),f.current?.close(),H.current?.(m),y.current=void 0,g?.()},{once:!0})},[f,g,c]),N=l.useCallback(m=>{R.current=!0,b(!0),A(!1),c?setTimeout(()=>{b(!1),B(!1),L.current?.(m),w?.(),y.current=void 0},300):f.current?.addEventListener("animationend",h=>{h.stopPropagation(),b(!1),B(!1),f.current?.close(),L.current?.(m),w?.(),y.current=void 0},{once:!0})},[f,c,w]),ne=l.useCallback(m=>{m.stopPropagation(),R.current||(b(!1),A(!1),B(!1),L.current?.(),w?.(),y.current=void 0)},[w]),ae=l.useCallback(m=>{if(m.target!==f.current)return;const h=f.current.getBoundingClientRect();h.top<=m.clientY&&m.clientY<=h.top+h.height&&h.left<=m.clientX&&m.clientX<=h.left+h.width||N()},[f,N]),P=l.useMemo(()=>({resolve:se,reject:N}),[N,se]);return[l.useMemo(()=>c?e.jsx(pe,{isOpen:te,onRequestClose:N,background:z,allowContentOverflow:Z,contentLabel:I,id:_,aria:{modal:!0,labelledby:S,describedby:T},children:e.jsx($.Provider,{value:P,children:W&&l.createElement(q,{...y.current,key:E})})}):e.jsx("dialog",{onClick:j?void 0:ae,onClose:ne,ref:f,id:_,className:i(C&&"swui-block-scroll",Q,oe&&r),"aria-label":I,"aria-labelledby":S,"aria-describedby":T,style:{background:z,...u},children:e.jsx("div",{style:d,className:a,children:W&&e.jsx($.Provider,{value:P,children:l.createElement(q,{...y.current,key:E})})})}),[c,te,N,z,Z,I,_,S,T,P,W,q,E,j,C,ae,ne,f,Q,oe,r,u,d,a]),{show:Re,reject:N}]}const _t=()=>{const t=l.useContext($);if(t==null)throw new Error("useDialogPromise is being used outside of dialog.");return t},ft="_alertDialog_14t8t_1",gt="_closing_14t8t_22",V={alertDialog:ft,closing:gt};function xt(t,o){return O(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,V.closing),contentWrapperClassName:i(o?.contentWrapperClassName,V.contentWrapper),className:i(o?.className,V.alertDialog)})}const ht="_drawerDialog_11g6r_1",pt="_left_11g6r_13",jt="_right_11g6r_14",Ct="_contentWrapper_11g6r_19",yt="_slideInLeft_11g6r_1",bt="_closing_11g6r_36",vt="_slideOutLeft_11g6r_1",wt="_slideInRight_11g6r_1",Nt="_slideOutRight_11g6r_1",Bt="_top_11g6r_54",Dt="_bottom_11g6r_55",kt="_slideInTop_11g6r_1",Rt="_slideOutTop_11g6r_1",Lt="_slideInBottom_11g6r_1",At="_slideOutBottom_11g6r_1",F={drawerDialog:ht,left:pt,right:jt,contentWrapper:Ct,slideInLeft:yt,closing:bt,slideOutLeft:vt,slideInRight:wt,slideOutRight:Nt,top:Bt,bottom:Dt,slideInTop:kt,slideOutTop:Rt,slideInBottom:Lt,slideOutBottom:At};function Ft(t,o="left",n){return O(t,{...n,disableCloseOnClickOutside:!0,modal:!1,blockScroll:!1,closingClassName:i(n?.closingClassName,F.closing),contentWrapperClassName:i(n?.contentWrapperClassName,F.contentWrapper),className:i(n?.className,F.drawerDialog,F[o])})}const Mt="_modalDialog_iw29e_1",$t="_closing_iw29e_37",Ot="_contentWrapper_iw29e_101",U={modalDialog:Mt,closing:$t,contentWrapper:Ot};function zt(t,o){return O(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}),It="_modalActionButtons_zeqa6_1",St={modalActionButtons:It},Ce=({children:t})=>e.jsxs(s.Box,{width:"100%",children:[e.jsx(s.Spacing,{}),e.jsx("div",{className:St.modalActionButtons,children:t})]}),Tt="_modalBody_ozynq_1",ie={modalBody:Tt},ye=({gap:t=3,variant:o="normal",className:n,...a})=>e.jsx(s.Column,{className:i(ie.modalBody,ie[o],n),indent:o==="relaxed"?5:3,spacing:o==="relaxed"?5:3,gap:t,...a}),be=({children:t,maxWidth:o})=>e.jsx(s.Column,{flex:1,height:"100%",justifyContent:"space-between",maxWidth:o,children:t}),ve=t=>e.jsx(p.FlatButton,{size:"large",variant:"danger",leftIcon:p.stenaTimesThick,...t}),we=({heading:t,headingLevel:o,headingSize:n,onClickClose:a,closeButtonAriaLabel:r})=>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(ve,{onClick:a,size:n,"aria-label":r}):null]})}),Et=({icon:t,buttons:o,heading:n,text:a,children:r,maxWidth:d,minWidth:u,...c})=>e.jsx(be,{children:e.jsxs(ye,{gap:0,children:[c.onClickClose&&e.jsx(we,{onClickClose:c.onClickClose,closeButtonAriaLabel:c.closeButtonAriaLabel}),e.jsxs(s.Column,{gap:2,flexDirection:"column",alignItems:"center",maxWidth:d,minWidth:u,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}),r,o&&e.jsx(Ce,{children:o})]})]})}),Ht="_modalFooter_1uwtk_1",Wt="_sticky_1uwtk_20",de={modalFooter:Ht,sticky:Wt},qt=({sticky:t,zIndex:o=4,gap:n=2,className:a,...r})=>e.jsx(s.Row,{className:i(de.modalFooter,t&&de.sticky,a),shadow:"var(--swui-sticky-footer-shadow)",zIndex:o,gap:n,...r}),Pt="_unreadDot_l8bni_1",Gt="_dot_l8bni_4",ue={unreadDot:Pt,dot:Gt},Ne=({children:t})=>e.jsxs("div",{className:ue.unreadDot,children:[t,e.jsx("div",{className:ue.dot})]}),Vt="_notificationHeader_1rl25_1",Ut="_timestamp_1rl25_2",me={notificationHeader:Vt,timestamp:Ut},K=({text:t,timestamp:o,icon:n,iconAriaLabel:a,contentLeft:r,contentRight:d,onClickClose:u,unread:c=!1,variant:j,iconBackgroundColor:C,forceCloseButtonAlignment:_})=>{const g=n?e.jsx(p.CircledIcon,{size:"small",icon:n,"aria-label":a,variant:"whiteBg",backgroundColor:C||Be(c,j)}):void 0;return e.jsxs(s.Row,{alignItems:"flex-start",justifyContent:"space-between","data-comp":"NotificationHeader",className:me.notificationHeader,gap:2,children:[e.jsxs(s.Row,{gap:2,alignItems:"flex-start",children:[r&&e.jsx(s.Column,{justifyContent:"center",children:r}),!r&&g&&e.jsx(s.Row,{alignItems:"center",height:"40px",children:c?e.jsx(Ne,{children:g}):g}),e.jsxs(s.Box,{minHeight:20,justifyContent:"center",flex:1,gap:.5,children:[n||u||_?e.jsx(s.Space,{num:.5}):null,e.jsx(s.Text,{variant:"bold",children:t}),o&&e.jsx("div",{className:me.timestamp,children:e.jsx(s.Text,{size:"small",color:ge.cssColor(c?"--lhds-color-blue-600":"--lhds-color-ui-600"),children:o})})]})]}),d&&e.jsx(s.Column,{justifyContent:"center",children:d}),u&&e.jsx(s.Row,{alignItems:"center",height:"40px",width:"40px",children:e.jsx(p.CloseButton,{onClick:u})})]})},Be=(t,o)=>{if(!(!t&&o==="standard"))return"--lhds-color-ui-50"},Xt="_notification_tpz0j_1",Yt="_body_tpz0j_10",Jt="_standard_tpz0j_15",Kt="_unread_tpz0j_16",Qt="_danger_tpz0j_21",M={notification:Xt,body:Yt,standard:Jt,unread:Kt,danger:Qt},Zt=({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})]}),eo="_notificationList_1rkvu_1",to={notificationList:eo},oo=({children:t})=>e.jsxs("div",{"data-comp":"NotificationList",className:to.notificationList,children:[t,e.jsx("div",{})]}),so="_toast_1ifzt_1",no="_body_1ifzt_2",_e={toast:so,body:no},ao=({children:t,width:o=364,maxWidth:n,...a})=>e.jsxs(s.Box,{className:_e.toast,"data-comp":"Toast",width:o,maxWidth:n,children:[e.jsx(K,{forceCloseButtonAlignment:!0,...a}),t&&e.jsx("div",{className:_e.body,children:t})]}),ro="_toastBox_1lvsy_1",lo="_clickable_1lvsy_8",fe={toastBox:ro,clickable:lo},co=({className:t,...o})=>e.jsx(s.Box,{as:o.onClick?"button":void 0,className:i(t,fe.toastBox,o.onClick&&fe.clickable),"data-comp":"Toast",role:"alert",...o}),io="_toastContainer_1rek2_1",uo={toastContainer:io},mo=({...t})=>e.jsx(xe.ToastContainer,{className:uo.toastContainer,closeButton:({closeToast:o})=>e.jsx(p.CloseButton,{onClick:o}),hideProgressBar:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!1,...t}),_o=(t,o)=>xe.toast(t,o);exports.Alert=tt;exports.BaseWindow=he;exports.DRAGGABLE_CANCEL_CLASSNAME=Y;exports.DRAGGABLE_HANDLE_CLASSNAME=X;exports.DialogContext=$;exports.Drawer=Xe;exports.DrawerHeader=Je;exports.InfoAlert=Et;exports.LoadingModal=dt;exports.Modal=pe;exports.ModalActionButtons=Ce;exports.ModalBody=ye;exports.ModalCloseButton=ve;exports.ModalContainer=be;exports.ModalFooter=qt;exports.ModalHeader=we;exports.ModalHeading=J;exports.Notification=Zt;exports.NotificationHeader=K;exports.NotificationList=oo;exports.Toast=ao;exports.ToastBox=co;exports.ToastContainer=mo;exports.UnreadDot=Ne;exports.Window=ut;exports.WindowFooter=mt;exports.WindowHeader=je;exports.getIconBgColorFromVariant=Be;exports.setupDeclarativeModals=Ae;exports.showToast=_o;exports.useAlertDialog=xt;exports.useDialog=O;exports.useDialogPromise=_t;exports.useDrawerDialog=Ft;exports.useModalDialog=zt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const R=require("react-modal"),e=require("react/jsx-runtime"),l=require("react"),Le=require("react-draggable"),i=require("classnames"),s=require("@stenajs-webui/core"),p=require("@stenajs-webui/elements"),ge=require("@stenajs-webui/theme"),xe=require("react-toastify"),Ae=t=>{R.setAppElement(t)},Fe="_overlay_zoch3_1",Me="_modal_zoch3_33",$e="_content_zoch3_43",Oe="_isDraggable_zoch3_72",ze="_footer_zoch3_103",Ie="_stickyFooter_zoch3_107",D={overlay:Fe,modal:Me,content:$e,isDraggable:Oe,footer:ze,stickyFooter:Ie},X="draggable-modal-handle",Y="draggable-modal-cancel",he=({width:t,maxWidth:o,draggable:n=!1,children:a,...r})=>{const d=l.useRef(null);return e.jsx(R,{overlayClassName:D.overlay,className:D.modal,...r,children:e.jsx(Le,{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(D.content,{[D.isDraggable]:n}),ref:d,children:a})})})},Se="_portal_194oy_1",Te="_overlay_194oy_4",Ee="_content_194oy_9",He="_floating_194oy_18",We="_slideFromLeft_194oy_32",qe="_slideFromRight_194oy_33",Pe="_afterOpen_194oy_39",Ge="_beforeClose_194oy_43",Ve="_slideFromTop_194oy_48",Ue="_slideFromBottom_194oy_49",x={portal:Se,overlay:Te,content:Ee,floating:He,slideFromLeft:We,slideFromRight:qe,afterOpen:Pe,beforeClose:Ge,slideFromTop:Ve,slideFromBottom:Ue},Xe=({background:t,zIndex:o,children:n,slideFrom:a="left",portalTarget:r,floating:d,...u})=>{const{height:c,width:j}=u;return e.jsx(R,{closeTimeoutMS:250,portalClassName:x.portal,overlayClassName:{base:x.overlay,afterOpen:x.afterOpen,beforeClose:x.beforeClose},className:{base:i(x.content,Ye(a),d&&x.floating),afterOpen:x.afterOpen,beforeClose:x.beforeClose},style:{content:{width:j,height:c,background:t},overlay:{zIndex:o}},parentSelector:r?()=>r:void 0,...u,bodyOpenClassName:"swui-drawer-body-open",children:n})},Ye=t=>{switch(t){case"left":return x.slideFromLeft;case"right":return x.slideFromRight;case"top":return x.slideFromTop;case"bottom":return x.slideFromBottom;default:return s.exhaustSwitchCase(t,x.slideFromLeft)}},Je=({header:t,contentRight:o,onRequestClose:n,icon:a,headingLevel:r="h1",...d})=>e.jsx(s.Spacing,{position:"sticky",top:0,zIndex:100,background:ge.cssColor("--lhds-color-ui-50"),...s.getDataProps(d),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",as:r,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})]})]})}),Ke="_overlay_1xtk3_1",Qe="_modal_1xtk3_33",Ze="_content_1xtk3_40",G={overlay:Ke,modal:Qe,content:Ze},et={overlay:{justifyContent:"center"}},tt=({children:t,...o})=>e.jsx(R,{overlayClassName:G.overlay,className:G.modal,style:et,...o,children:e.jsx("div",{className:G.content,style:{"--swui-modal-width":"fit-content"},children:t})}),ot="_overlay_qz2d4_1",st="_afterOpen_qz2d4_29",nt="_beforeClose_qz2d4_29",at="_modal_qz2d4_41",rt="_content_qz2d4_64",lt="_contentOverflowVisible_qz2d4_95",v={overlay:ot,afterOpen:st,beforeClose:nt,modal:at,content:rt,contentOverflowVisible:lt},le=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),pe=({children:t,background:o,className:n,overlayClassName:a,allowContentOverflow:r=!1,...d})=>{const u=l.useRef(null),[c,j]=l.useState(le?"auto":void 0),C={overlay:r?{}:{justifyContent:"center"},content:{"--swui-modal-content-bg-color":o}},_=s.useEventCallback(()=>{if(!le)return;const g=u.current;g&&j(g.scrollHeight>g.clientHeight?"stable":"auto")});return l.useEffect(()=>(window.addEventListener("resize",_),document.addEventListener("DOMContentLoaded",_),()=>{window.removeEventListener("resize",_),document.removeEventListener("DOMContentLoaded",_)}),[_]),e.jsx(R,{overlayClassName:{base:i(a,v.overlay),beforeClose:v.beforeClose,afterOpen:v.afterOpen},className:{base:i(n,v.modal),beforeClose:v.beforeClose,afterOpen:v.afterOpen},style:C,closeTimeoutMS:250,onAfterOpen:_,...d,children:e.jsx("div",{className:i(v.content,r&&v.contentOverflowVisible),style:{"--swui-modal-width":"fit-content",scrollbarGutter:c},ref:u,children:t})})},ct="_modal_4fwgb_1",it="_overlay_4fwgb_13",ce={modal:ct,overlay:it},dt=({headerIconLeft:t,headerText:o,shouldCloseOnOverlayClick:n=!1,shouldCloseOnEsc:a=!1,...r})=>e.jsx(R,{...r,isOpen:!0,shouldCloseOnOverlayClick:n,shouldCloseOnEsc:a,className:ce.modal,overlayClassName:ce.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})]})]})]})}),je=({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})})]}),ut=({header:t,headerText:o,children:n,spacing:a,indent:r,draggable:d=!1,onRequestClose:u,closeButtonClassName:c,footer:j,disableStickyFooter:C=!1,..._})=>{const g=typeof a=="number"?a:1,w=typeof r=="number"?r:1;return e.jsxs(he,{..._,onRequestClose:u,draggable:d,children:[e.jsx(je,{onRequestClose:u,header:t,headerText:o,closeButtonClassName:c}),e.jsx(s.Box,{spacing:g,indent:w,children:n}),j&&e.jsx(s.Box,{className:i(D.footer,{[D.stickyFooter]:!C}),children:j})]})},mt=({children:t})=>e.jsx(s.Column,{indent:2,spacing:2,children:t}),$=l.createContext(void 0);function O(t,{ref:o,modal:n,contentWrapperClassName:a,closingClassName:r,contentWrapperStyle:d,dialogStyle:u,divInsteadOfDialog:c,disableCloseOnClickOutside:j,blockScroll:C=!0,elementId:_,onResolve:g,onReject:w,className:Q,background:z,allowContentOverflow:Z,label:I,labelledby:S,describedby:T}){const De=l.useRef(null),f=o??De,[E,Re]=l.useReducer(m=>m+1,0),ee=l.useRef(null),H=l.useRef(null),y=l.useRef(void 0),k=l.useRef(!1),L=l.useRef(null),[te,A]=l.useState(!1),[W,B]=l.useState(!1),[oe,b]=l.useState(!1),q=t,ke=l.useCallback(m=>(ee.current=new Promise((h,re)=>{H.current=h,L.current=re}),b(!1),A(!0),B(!0),Re(),k.current=!1,y.current=m,n?f.current?.showModal():f.current?.show(),ee.current),[f,n]),se=l.useCallback(m=>{k.current=!0,b(!0),A(!1),c?setTimeout(()=>{b(!1),B(!1),H.current?.(m),y.current=void 0,g?.()},300):f.current?.addEventListener("animationend",h=>{h.stopPropagation(),b(!1),B(!1),f.current?.close(),H.current?.(m),y.current=void 0,g?.()},{once:!0})},[f,g,c]),N=l.useCallback(m=>{k.current=!0,b(!0),A(!1),c?setTimeout(()=>{b(!1),B(!1),L.current?.(m),w?.(),y.current=void 0},300):f.current?.addEventListener("animationend",h=>{h.stopPropagation(),b(!1),B(!1),f.current?.close(),L.current?.(m),w?.(),y.current=void 0},{once:!0})},[f,c,w]),ne=l.useCallback(m=>{m.stopPropagation(),k.current||(b(!1),A(!1),B(!1),L.current?.(),w?.(),y.current=void 0)},[w]),ae=l.useCallback(m=>{if(m.target!==f.current)return;const h=f.current.getBoundingClientRect();h.top<=m.clientY&&m.clientY<=h.top+h.height&&h.left<=m.clientX&&m.clientX<=h.left+h.width||N()},[f,N]),P=l.useMemo(()=>({resolve:se,reject:N}),[N,se]);return[l.useMemo(()=>c?e.jsx(pe,{isOpen:te,onRequestClose:N,background:z,allowContentOverflow:Z,contentLabel:I,id:_,aria:{modal:!0,labelledby:S,describedby:T},children:e.jsx($.Provider,{value:P,children:W&&l.createElement(q,{...y.current,key:E})})}):e.jsx("dialog",{onClick:j?void 0:ae,onClose:ne,ref:f,id:_,className:i(C&&"swui-block-scroll",Q,oe&&r),"aria-label":I,"aria-labelledby":S,"aria-describedby":T,style:{background:z,...u},children:e.jsx("div",{style:d,className:a,children:W&&e.jsx($.Provider,{value:P,children:l.createElement(q,{...y.current,key:E})})})}),[c,te,N,z,Z,I,_,S,T,P,W,q,E,j,C,ae,ne,f,Q,oe,r,u,d,a]),{show:ke,reject:N}]}const _t=()=>{const t=l.useContext($);if(t==null)throw new Error("useDialogPromise is being used outside of dialog.");return t},ft="_alertDialog_14t8t_1",gt="_closing_14t8t_22",V={alertDialog:ft,closing:gt};function xt(t,o){return O(t,{...o,modal:!0,closingClassName:i(o?.closingClassName,V.closing),contentWrapperClassName:i(o?.contentWrapperClassName,V.contentWrapper),className:i(o?.className,V.alertDialog)})}const ht="_drawerDialog_11g6r_1",pt="_left_11g6r_13",jt="_right_11g6r_14",Ct="_contentWrapper_11g6r_19",yt="_slideInLeft_11g6r_1",bt="_closing_11g6r_36",vt="_slideOutLeft_11g6r_1",wt="_slideInRight_11g6r_1",Nt="_slideOutRight_11g6r_1",Bt="_top_11g6r_54",Dt="_bottom_11g6r_55",Rt="_slideInTop_11g6r_1",kt="_slideOutTop_11g6r_1",Lt="_slideInBottom_11g6r_1",At="_slideOutBottom_11g6r_1",F={drawerDialog:ht,left:pt,right:jt,contentWrapper:Ct,slideInLeft:yt,closing:bt,slideOutLeft:vt,slideInRight:wt,slideOutRight:Nt,top:Bt,bottom:Dt,slideInTop:Rt,slideOutTop:kt,slideInBottom:Lt,slideOutBottom:At};function Ft(t,o="left",n){return O(t,{...n,disableCloseOnClickOutside:!0,modal:!1,blockScroll:!1,closingClassName:i(n?.closingClassName,F.closing),contentWrapperClassName:i(n?.contentWrapperClassName,F.contentWrapper),className:i(n?.className,F.drawerDialog,F[o])})}const Mt="_modalDialog_iw29e_1",$t="_closing_iw29e_37",Ot="_contentWrapper_iw29e_101",U={modalDialog:Mt,closing:$t,contentWrapper:Ot};function zt(t,o){return O(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}),It="_modalActionButtons_zeqa6_1",St={modalActionButtons:It},Ce=({children:t})=>e.jsxs(s.Box,{width:"100%",children:[e.jsx(s.Spacing,{}),e.jsx("div",{className:St.modalActionButtons,children:t})]}),Tt="_modalBody_ozynq_1",ie={modalBody:Tt},ye=({gap:t=3,variant:o="normal",className:n,...a})=>e.jsx(s.Column,{className:i(ie.modalBody,ie[o],n),indent:o==="relaxed"?5:3,spacing:o==="relaxed"?5:3,gap:t,...a}),be=({children:t,maxWidth:o})=>e.jsx(s.Column,{flex:1,height:"100%",justifyContent:"space-between",maxWidth:o,children:t}),ve=t=>e.jsx(p.FlatButton,{size:"large",variant:"danger",leftIcon:p.stenaTimesThick,...t}),we=({heading:t,headingLevel:o,headingSize:n,onClickClose:a,closeButtonAriaLabel:r})=>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(ve,{onClick:a,size:n,"aria-label":r}):null]})}),Et=({icon:t,buttons:o,heading:n,text:a,children:r,maxWidth:d,minWidth:u,...c})=>e.jsx(be,{children:e.jsxs(ye,{gap:0,children:[c.onClickClose&&e.jsx(we,{onClickClose:c.onClickClose,closeButtonAriaLabel:c.closeButtonAriaLabel}),e.jsxs(s.Column,{gap:2,flexDirection:"column",alignItems:"center",maxWidth:d,minWidth:u,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}),r,o&&e.jsx(Ce,{children:o})]})]})}),Ht="_modalFooter_1p0nf_1",Wt="_sticky_1p0nf_20",de={modalFooter:Ht,sticky:Wt},qt=({sticky:t,zIndex:o=4,gap:n=2,className:a,...r})=>e.jsx(s.Row,{className:i(de.modalFooter,t&&de.sticky,a),shadow:"var(--swui-sticky-footer-shadow)",zIndex:o,gap:n,...r}),Pt="_unreadDot_l8bni_1",Gt="_dot_l8bni_4",ue={unreadDot:Pt,dot:Gt},Ne=({children:t})=>e.jsxs("div",{className:ue.unreadDot,children:[t,e.jsx("div",{className:ue.dot})]}),Vt="_notificationHeader_1rl25_1",Ut="_timestamp_1rl25_2",me={notificationHeader:Vt,timestamp:Ut},K=({text:t,timestamp:o,icon:n,iconAriaLabel:a,contentLeft:r,contentRight:d,onClickClose:u,unread:c=!1,variant:j,iconBackgroundColor:C,forceCloseButtonAlignment:_})=>{const g=n?e.jsx(p.CircledIcon,{size:"small",icon:n,"aria-label":a,variant:"whiteBg",backgroundColor:C||Be(c,j)}):void 0;return e.jsxs(s.Row,{alignItems:"flex-start",justifyContent:"space-between","data-comp":"NotificationHeader",className:me.notificationHeader,gap:2,children:[e.jsxs(s.Row,{gap:2,alignItems:"flex-start",children:[r&&e.jsx(s.Column,{justifyContent:"center",children:r}),!r&&g&&e.jsx(s.Row,{alignItems:"center",height:"40px",children:c?e.jsx(Ne,{children:g}):g}),e.jsxs(s.Box,{minHeight:20,justifyContent:"center",flex:1,gap:.5,children:[n||u||_?e.jsx(s.Space,{num:.5}):null,e.jsx(s.Text,{variant:"bold",children:t}),o&&e.jsx("div",{className:me.timestamp,children:e.jsx(s.Text,{size:"small",color:ge.cssColor(c?"--lhds-color-blue-600":"--lhds-color-ui-600"),children:o})})]})]}),d&&e.jsx(s.Column,{justifyContent:"center",children:d}),u&&e.jsx(s.Row,{alignItems:"center",height:"40px",width:"40px",children:e.jsx(p.CloseButton,{onClick:u})})]})},Be=(t,o)=>{if(!(!t&&o==="standard"))return"--lhds-color-ui-50"},Xt="_notification_tpz0j_1",Yt="_body_tpz0j_10",Jt="_standard_tpz0j_15",Kt="_unread_tpz0j_16",Qt="_danger_tpz0j_21",M={notification:Xt,body:Yt,standard:Jt,unread:Kt,danger:Qt},Zt=({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})]}),eo="_notificationList_1rkvu_1",to={notificationList:eo},oo=({children:t})=>e.jsxs("div",{"data-comp":"NotificationList",className:to.notificationList,children:[t,e.jsx("div",{})]}),so="_toast_1ifzt_1",no="_body_1ifzt_2",_e={toast:so,body:no},ao=({children:t,width:o=364,maxWidth:n,...a})=>e.jsxs(s.Box,{className:_e.toast,"data-comp":"Toast",width:o,maxWidth:n,children:[e.jsx(K,{forceCloseButtonAlignment:!0,...a}),t&&e.jsx("div",{className:_e.body,children:t})]}),ro="_toastBox_1lvsy_1",lo="_clickable_1lvsy_8",fe={toastBox:ro,clickable:lo},co=({className:t,...o})=>e.jsx(s.Box,{as:o.onClick?"button":void 0,className:i(t,fe.toastBox,o.onClick&&fe.clickable),"data-comp":"Toast",role:"alert",...o}),io="_toastContainer_1rek2_1",uo={toastContainer:io},mo=({...t})=>e.jsx(xe.ToastContainer,{className:uo.toastContainer,closeButton:({closeToast:o})=>e.jsx(p.CloseButton,{onClick:o}),hideProgressBar:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!1,...t}),_o=(t,o)=>xe.toast(t,o);exports.Alert=tt;exports.BaseWindow=he;exports.DRAGGABLE_CANCEL_CLASSNAME=Y;exports.DRAGGABLE_HANDLE_CLASSNAME=X;exports.DialogContext=$;exports.Drawer=Xe;exports.DrawerHeader=Je;exports.InfoAlert=Et;exports.LoadingModal=dt;exports.Modal=pe;exports.ModalActionButtons=Ce;exports.ModalBody=ye;exports.ModalCloseButton=ve;exports.ModalContainer=be;exports.ModalFooter=qt;exports.ModalHeader=we;exports.ModalHeading=J;exports.Notification=Zt;exports.NotificationHeader=K;exports.NotificationList=oo;exports.Toast=ao;exports.ToastBox=co;exports.ToastContainer=mo;exports.UnreadDot=Ne;exports.Window=ut;exports.WindowFooter=mt;exports.WindowHeader=je;exports.getIconBgColorFromVariant=Be;exports.setupDeclarativeModals=Ae;exports.showToast=_o;exports.useAlertDialog=xt;exports.useDialog=O;exports.useDialogPromise=_t;exports.useDrawerDialog=Ft;exports.useModalDialog=zt;
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/modal",
3
- "version": "23.21.13",
3
+ "version": "23.21.14",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "mattias800",
@@ -37,9 +37,9 @@
37
37
  "deploy": "gh-pages -d example/build"
38
38
  },
39
39
  "dependencies": {
40
- "@stenajs-webui/core": "23.21.13",
41
- "@stenajs-webui/elements": "23.21.13",
42
- "@stenajs-webui/theme": "23.21.13",
40
+ "@stenajs-webui/core": "23.21.14",
41
+ "@stenajs-webui/elements": "23.21.14",
42
+ "@stenajs-webui/theme": "23.21.14",
43
43
  "@types/react-modal": "^3.16.3",
44
44
  "classnames": "^2.5.1",
45
45
  "react-draggable": "4.4.6",
@@ -67,7 +67,7 @@
67
67
  "files": [
68
68
  "dist"
69
69
  ],
70
- "gitHead": "1110351df3c4ee6173e3c86b1d42260df93cfbf7",
70
+ "gitHead": "12f0c4f3ef14d5f822e470fdbd8b4d5ea41ed22f",
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  }