@qualtrics/ui-react 2.10.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/__shared/cjs/index-7ead0dbd.js +13058 -0
- package/dist/__shared/cjs/{index-0ef0b03a.js → index-f6bbacab.js} +3 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button2.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +0 -1
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +5 -9
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/hooks/useOverlay/index.js +1 -0
- package/dist/hooks/useOverlay/useOverlay.js +70 -0
- package/dist/hooks/useOverlay/useOverlay2.js +8 -0
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +84 -8456
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Drawer/Drawer.js +138 -0
- package/dist/next/Drawer/Drawer2.js +8 -0
- package/dist/next/Drawer/index.js +1 -0
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +78 -0
- package/dist/next/TimePicker/TimeInput.js +87 -0
- package/dist/next/TimePicker/TimePicker.js +247 -0
- package/dist/next/TimePicker/TimePicker2.js +8 -0
- package/dist/next/TimePicker/TimePickerIcon.js +36 -0
- package/dist/next/TimePicker/index.js +1 -0
- package/dist/next/TimePicker/utils.js +229 -0
- package/dist/next/index.d.ts +39 -0
- package/dist/next/index.es.js +4 -0
- package/dist/next/index.js +976 -145
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/package.json +11 -10
- package/dist/__shared/cjs/index-74ef768b.js +0 -4643
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"numberStepperContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._3l-Tu{display:inline-flex}._2Xgzb{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._2Xgzb:hover:not(._10St7){cursor:pointer;background:#f5f5f5}._2Xgzb._azulN{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2Xgzb._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2Xgzb._10St7>svg{opacity:.4}._2Xgzb::-webkit-inner-spin-button,._2Xgzb::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._2Xgzb:focus{z-index:0;border:none;border-radius:4px}._2Xgzb:focus:not(._azulN){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1cwsT,._2Xgzb:focus:not(._10St7){background:#fafafa}._1cwsT{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._1cwsT:hover:not(._10St7){cursor:pointer;background:#f5f5f5}._1cwsT:active:not(._10St7){background:#e5e5e5}._1cwsT._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._1cwsT._10St7>svg{opacity:.4}.__ymfO{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}.__ymfO:hover:not(._10St7){cursor:pointer;background:#f5f5f5}.__ymfO:active:not(._10St7){background:#e5e5e5}.__ymfO._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}.__ymfO._10St7>svg{opacity:.4}._2uWF2{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_3l-Tu","numberStepperInput":"_2Xgzb","disabled":"_10St7","invalid":"_azulN","decrementBtn":"_1cwsT","incrementBtn":"__ymfO","inputValueAlert":"_2uWF2"};
|
|
5
|
+
var stylesheet="._3l-Tu{display:inline-flex}._2Xgzb{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._2Xgzb:hover:not(._10St7){cursor:pointer;background:#f5f5f5}._2Xgzb._azulN{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2Xgzb._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2Xgzb._10St7>svg{opacity:.4}._2Xgzb::-webkit-inner-spin-button,._2Xgzb::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._2Xgzb:focus{z-index:0;border:none;border-radius:4px}._2Xgzb:focus:not(._azulN){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1cwsT,._2Xgzb:focus:not(._10St7){background:#fafafa}._1cwsT{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._1cwsT:hover:not(._10St7){cursor:pointer;background:#f5f5f5}._1cwsT:active:not(._10St7){background:#e5e5e5}._1cwsT._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._1cwsT._10St7>svg{opacity:.4}.__ymfO{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}.__ymfO:hover:not(._10St7){cursor:pointer;background:#f5f5f5}.__ymfO:active:not(._10St7){background:#e5e5e5}.__ymfO._10St7{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}.__ymfO._10St7>svg{opacity:.4}._2uWF2{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"tabs":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._19Q-D{display:block}._1K7Yu{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._1k_wP{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._1k_wP:hover{color:#32363a}._1k_wP:focus{outline:none}._1k_wP._3fGfn{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a}._2Zadj{padding-top:32px}._2Zadj._1AGvZ{display:none}body.keyboard-user ._1k_wP:active:focus,body.keyboard-user ._1k_wP:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_19Q-D","bar":"_1K7Yu","tab":"_1k_wP","active":"_3fGfn","panel":"_2Zadj","inactive":"_1AGvZ"};
|
|
5
|
+
var stylesheet="._19Q-D{display:block}._1K7Yu{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._1k_wP{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._1k_wP:hover{color:#32363a}._1k_wP:focus{outline:none}._1k_wP._3fGfn{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a}._2Zadj{padding-top:32px}._2Zadj._1AGvZ{display:none}body.keyboard-user ._1k_wP:active:focus,body.keyboard-user ._1k_wP:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"toolbar":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._1nUr3,._3B46J{display:flex}._1nUr3{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._2sKf-{width:69px;min-width:auto;max-width:none}._2jddO{width:100%}._2WTyp{margin-bottom:12px;background-color:transparent!important}._2WTyp:hover{background-color:rgba(11,110,208,.08)!important}._2WTyp:hover>svg{fill:#085caf}._2WTyp:hover>span{color:#085caf}._2WTyp:active{background-color:rgba(11,110,208,.12)!important}._2WTyp:active>svg{fill:#0854a1}._2WTyp:active>span{color:#0854a1}._2WTyp._1lpJt{background-color:rgba(11,110,208,.08)!important}._2WTyp._1lpJt>svg{fill:#0b6ed0}._2WTyp._1lpJt>span{color:#0b6ed0}._2WTyp._1lpJt:hover{background-color:rgba(11,110,208,.08)!important}._2WTyp._1lpJt:hover>svg{fill:#085caf}._2WTyp._1lpJt:hover>span{color:#085caf}._2WTyp._1lpJt:active{background-color:rgba(11,110,208,.12)!important}._2WTyp._1lpJt:active>svg{fill:#0854a1}._2WTyp._1lpJt:active>span{color:#0854a1}._3CEER{border-radius:6px}._3CEER>._2Q8Ku{display:block;fill:#515559}._3c5k3{margin-top:auto;margin-bottom:0}._2uBPy{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._2uBPy:hover>._2qq6O{opacity:1}._10Pud{width:0;border-width:0;padding:0}._1Yg0V{border-radius:4px;min-width:100%;min-height:100%;outline:none}._3EGX3{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._2qq6O{opacity:0}._1UPvS,._2qq6O:hover,._3EGX3._etPxn._etPxn{opacity:1}._3EGX3._1Qop7._1Qop7{opacity:0}._3EGX3>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._3EGX3>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._3EGX3>span:hover>svg{fill:#fff}._3EGX3>span:active{background-color:#0854a1;border-color:#0854a1}._3EGX3>span:active>svg{fill:#fff}._3EGX3>span>svg{fill:#515559;border-radius:50%}._1Yg0V._wmOER{display:none!important}._mNUJ6{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._5-N8q{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._3uN_b{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._T23BP{fill:#515559}._4IvgK{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1Yg0V:active:focus,body.keyboard-user ._1Yg0V:focus,body.keyboard-user ._3uN_b:active:focus,body.keyboard-user ._3uN_b:focus,body.keyboard-user ._mNUJ6:active:focus,body.keyboard-user ._mNUJ6:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._3EGX3:focus{border-color:#0a3f88}body.keyboard-user ._3EGX3:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._3EGX3:active>span>svg{fill:#fff}body.keyboard-user ._2qq6O:focus{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_3B46J","toolbarNav":"_1nUr3","toolbarNavCollapsed":"_2sKf-","toolbarTabs":"_2jddO","toolbarTab":"_2WTyp","selected":"_1lpJt","toolbarTabIconButton":"_3CEER","icon":"_2Q8Ku","tabsExpandCollapseButton":"_3c5k3","toolbarPanels":"_2uBPy","toolbarPanelExpandCollapseButtonDefaultHidden":"_2qq6O","toolbarPanelsCollapsed":"_10Pud","toolbarPanel":"_1Yg0V","toolbarPanelExpandCollapseButton":"_3EGX3","toolbarPanelExpandCollapseButtonDefaultShown":"_1UPvS","overrideShow":"_etPxn","overrideHide":"_1Qop7","notSelected":"_wmOER","buttonWithLabel":"_mNUJ6","buttonWithLabelLabel":"_5-N8q","iconButtonWithLabel":"_3uN_b","iconButtonWithLabelIcon":"_T23BP","iconButtonWithLabelLabel":"_4IvgK"};
|
|
5
|
+
var stylesheet="._1nUr3,._3B46J{display:flex}._1nUr3{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._2sKf-{width:69px;min-width:auto;max-width:none}._2jddO{width:100%}._2WTyp{margin-bottom:12px;background-color:transparent!important}._2WTyp:hover{background-color:rgba(11,110,208,.08)!important}._2WTyp:hover>svg{fill:#085caf}._2WTyp:hover>span{color:#085caf}._2WTyp:active{background-color:rgba(11,110,208,.12)!important}._2WTyp:active>svg{fill:#0854a1}._2WTyp:active>span{color:#0854a1}._2WTyp._1lpJt{background-color:rgba(11,110,208,.08)!important}._2WTyp._1lpJt>svg{fill:#0b6ed0}._2WTyp._1lpJt>span{color:#0b6ed0}._2WTyp._1lpJt:hover{background-color:rgba(11,110,208,.08)!important}._2WTyp._1lpJt:hover>svg{fill:#085caf}._2WTyp._1lpJt:hover>span{color:#085caf}._2WTyp._1lpJt:active{background-color:rgba(11,110,208,.12)!important}._2WTyp._1lpJt:active>svg{fill:#0854a1}._2WTyp._1lpJt:active>span{color:#0854a1}._3CEER{border-radius:6px}._3CEER>._2Q8Ku{display:block;fill:#515559}._3c5k3{margin-top:auto;margin-bottom:0}._2uBPy{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._2uBPy:hover>._2qq6O{opacity:1}._10Pud{width:0;border-width:0;padding:0}._1Yg0V{border-radius:4px;min-width:100%;min-height:100%;outline:none}._3EGX3{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._2qq6O{opacity:0}._1UPvS,._2qq6O:hover,._3EGX3._etPxn._etPxn{opacity:1}._3EGX3._1Qop7._1Qop7{opacity:0}._3EGX3>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._3EGX3>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._3EGX3>span:hover>svg{fill:#fff}._3EGX3>span:active{background-color:#0854a1;border-color:#0854a1}._3EGX3>span:active>svg{fill:#fff}._3EGX3>span>svg{fill:#515559;border-radius:50%}._1Yg0V._wmOER{display:none!important}._mNUJ6{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._5-N8q{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._3uN_b{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._T23BP{fill:#515559}._4IvgK{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1Yg0V:active:focus,body.keyboard-user ._1Yg0V:focus,body.keyboard-user ._3uN_b:active:focus,body.keyboard-user ._3uN_b:focus,body.keyboard-user ._mNUJ6:active:focus,body.keyboard-user ._mNUJ6:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._3EGX3:focus{border-color:#0a3f88}body.keyboard-user ._3EGX3:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._3EGX3:active>span>svg{fill:#fff}body.keyboard-user ._2qq6O:focus{opacity:1}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useOverlay.js';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import '../useId/index.js';
|
|
4
|
+
import styles from './useOverlay2.js';
|
|
5
|
+
import useId from '../useId/useId.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Adds an overlay to an area that obscures visibility and disables background elements.
|
|
9
|
+
* @param {MutableRefObject} containerRef - A ref pointing to the DOM element to be filled by the overlay.
|
|
10
|
+
* @param {boolean} isVisible - When true, displays overlay and disables all element behind it.
|
|
11
|
+
* @param {React.MouseEventHandler} onClick - A function to be called when the overlay recieves a click event.
|
|
12
|
+
* @param {string[]} ignoreIds - An array of ids belonging to elements that should not become inert when isInert is true.
|
|
13
|
+
* @param {CSSProperties['zIndex']} zIndex - The zIndex of the overlay.
|
|
14
|
+
* @param {string} dataTestId - A string to be added to the overlay element as a data-testid.
|
|
15
|
+
*/
|
|
16
|
+
const useOverlay = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
containerRef,
|
|
19
|
+
isVisible,
|
|
20
|
+
onClick,
|
|
21
|
+
ignoreIds = [],
|
|
22
|
+
zIndex,
|
|
23
|
+
dataTestId
|
|
24
|
+
} = _ref;
|
|
25
|
+
const overlayId = useId();
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
var _containerRef$current;
|
|
28
|
+
|
|
29
|
+
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
30
|
+
const overlay = document.createElement('div');
|
|
31
|
+
overlay.id = overlayId;
|
|
32
|
+
overlay.classList.add(styles.overlay);
|
|
33
|
+
if (onClick) overlay.addEventListener('click', onClick);
|
|
34
|
+
if (dataTestId) overlay.dataset.testid = dataTestId;
|
|
35
|
+
if (!isVisible) overlay.classList.add(styles.hidden);
|
|
36
|
+
if (zIndex) overlay.style.zIndex = zIndex.toString();
|
|
37
|
+
containerNode.appendChild(overlay);
|
|
38
|
+
containerNode.style.position = 'relative';
|
|
39
|
+
return () => {
|
|
40
|
+
containerNode.style.position = 'static';
|
|
41
|
+
containerNode.removeChild(overlay);
|
|
42
|
+
};
|
|
43
|
+
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
var _containerRef$current2;
|
|
46
|
+
|
|
47
|
+
const containerNode = (_containerRef$current2 = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : document.body;
|
|
48
|
+
const overlayNode = document.getElementById(overlayId);
|
|
49
|
+
|
|
50
|
+
if (isVisible) {
|
|
51
|
+
Array.from(containerNode.children).forEach(child => {
|
|
52
|
+
if (!_includesInstanceProperty(ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
53
|
+
});
|
|
54
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles.hidden);
|
|
55
|
+
} else {
|
|
56
|
+
Array.from(containerNode.children).forEach(child => {
|
|
57
|
+
child.removeAttribute('inert');
|
|
58
|
+
});
|
|
59
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles.hidden);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return () => {
|
|
63
|
+
Array.from(containerNode.children).forEach(child => {
|
|
64
|
+
child.removeAttribute('inert');
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}, [containerRef, isVisible, ignoreIds, overlayId]);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { useOverlay as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "._2RGPK{background-color:rgba(0,0,0,.5);width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._Ii2Ia{visibility:hidden}";
|
|
4
|
+
var styles = {"overlay":"_2RGPK","hidden":"_Ii2Ia"};
|
|
5
|
+
var stylesheet="._2RGPK{background-color:rgba(0,0,0,.5);width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._Ii2Ia{visibility:hidden}";
|
|
6
|
+
styleInject(css_248z);
|
|
7
|
+
|
|
8
|
+
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var classes = {"ariaLiveElement":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._2_6MI{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_2_6MI"};
|
|
5
|
+
var stylesheet="._2_6MI{position:absolute;top:-10000px;left:-10000px}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { classes as default, stylesheet };
|
package/dist/icons/Icon.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"icon":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._g_t1a{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_g_t1a"};
|
|
5
|
+
var stylesheet="._g_t1a{flex-shrink:0}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
package/dist/icons/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icons_index = require('../__shared/cjs/index-
|
|
5
|
+
var icons_index = require('../__shared/cjs/index-f6bbacab.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|