@qualtrics/ui-react 2.27.0 → 2.29.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 +23 -0
- package/dist/__shared/cjs/{index-88aa3bce.js → index-c2d2f188.js} +707 -451
- package/dist/__shared/cjs/{index-e6893573.js → index-c9e48360.js} +3 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +54 -10
- 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/Dropdown.js +59 -7
- 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/ConditionSet.js +3 -4
- package/dist/components/LogicEditor/Controls.js +66 -48
- package/dist/components/LogicEditor/LogicEditor.js +34 -8
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +4 -1
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- 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/Radio.js +25 -5
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/Radio/RadioGroup.js +16 -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/useOverlay2.js +3 -3
- 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.d.ts +12 -2
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +54 -78
- 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/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/FormFieldWrapper.js +36 -0
- package/dist/next/Form/FormFields/InputField.js +8 -0
- package/dist/next/Form/index.js +2 -0
- package/dist/next/Form/useForm.js +298 -0
- package/dist/next/Form/useFormField.js +25 -0
- package/dist/next/Form/utils/createFormInstance.js +32 -0
- package/dist/next/Form/utils/useFormContext.js +9 -0
- package/dist/next/Input/Input.js +47 -7
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuPane.js +2 -2
- package/dist/next/Pagination/Pagination.css.js +9 -0
- package/dist/next/Pagination/Pagination.css.ts.vanilla.js +8 -0
- package/dist/next/Pagination/Pagination.js +166 -0
- package/dist/next/Pagination/RowDisplayCount.js +46 -0
- package/dist/next/Pagination/index.js +2 -0
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +9 -3
- package/dist/next/TimePicker/TimePicker.js +1 -1
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/ToggleButton.js +2 -2
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +170 -4
- package/dist/next/index.es.js +29 -23
- package/dist/next/index.js +1968 -1474
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/icons/package.json +1 -1
- package/next/package.json +2 -2
- package/package.json +3 -3
|
@@ -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 = "._6VpSa{display:inline-flex}._025mi{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}._025mi:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._025mi._zdmHB{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._025mi._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._025mi._t2e0A>svg{opacity:.4}._025mi::-webkit-inner-spin-button,._025mi::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._025mi:focus{z-index:0;border:none;border-radius:4px}._025mi:focus:not(._zdmHB){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._025mi:focus:not(._t2e0A),._IRNfS{background:#fafafa}._IRNfS{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}._IRNfS:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._IRNfS:active:not(._t2e0A){background:#e5e5e5}._IRNfS._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._IRNfS._t2e0A>svg{opacity:.4}._RwWIK{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}._RwWIK:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._RwWIK:active:not(._t2e0A){background:#e5e5e5}._RwWIK._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._RwWIK._t2e0A>svg{opacity:.4}._u0jgx{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_6VpSa","numberStepperInput":"_025mi","disabled":"_t2e0A","invalid":"_zdmHB","decrementBtn":"_IRNfS","incrementBtn":"_RwWIK","inputValueAlert":"_u0jgx"};
|
|
5
|
+
var stylesheet="._6VpSa{display:inline-flex}._025mi{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}._025mi:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._025mi._zdmHB{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._025mi._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._025mi._t2e0A>svg{opacity:.4}._025mi::-webkit-inner-spin-button,._025mi::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._025mi:focus{z-index:0;border:none;border-radius:4px}._025mi:focus:not(._zdmHB){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._025mi:focus:not(._t2e0A),._IRNfS{background:#fafafa}._IRNfS{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}._IRNfS:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._IRNfS:active:not(._t2e0A){background:#e5e5e5}._IRNfS._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._IRNfS._t2e0A>svg{opacity:.4}._RwWIK{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}._RwWIK:hover:not(._t2e0A){cursor:pointer;background:#f5f5f5}._RwWIK:active:not(._t2e0A){background:#e5e5e5}._RwWIK._t2e0A{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._RwWIK._t2e0A>svg{opacity:.4}._u0jgx{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = "._-MbD2{display:block}._tUH7F{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._IVkXT{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}._IVkXT:hover{color:#32363a}._IVkXT:focus{outline:none}._IVkXT._VWiau{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._8L04y{padding-top:32px}._8L04y._d6ZkF{display:none}._IVkXT.focus-visible,._IVkXT:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_-MbD2","bar":"_tUH7F","tab":"_IVkXT","active":"_VWiau","panel":"_8L04y","inactive":"_d6ZkF"};
|
|
5
|
+
var stylesheet="._-MbD2{display:block}._tUH7F{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._IVkXT{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}._IVkXT:hover{color:#32363a}._IVkXT:focus{outline:none}._IVkXT._VWiau{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._8L04y{padding-top:32px}._8L04y._d6ZkF{display:none}._IVkXT.focus-visible,._IVkXT:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = "._f0hTa,._w0HY-{display:flex}._f0hTa{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._nrI9Q{width:69px;min-width:auto;max-width:none}._xBBcd{width:100%}._rOxGS{margin-bottom:12px;background-color:transparent!important}._rOxGS:hover{background-color:rgba(11,110,208,.08)!important}._rOxGS:hover>svg{fill:#085caf}._rOxGS:hover>span{color:#085caf}._rOxGS:active{background-color:rgba(11,110,208,.12)!important}._rOxGS:active>svg{fill:#0854a1}._rOxGS:active>span{color:#0854a1}._rOxGS._PYBb-{background-color:rgba(11,110,208,.08)!important}._rOxGS._PYBb->svg{fill:#0b6ed0}._rOxGS._PYBb->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._rOxGS._PYBb-:hover{background-color:rgba(11,110,208,.08)!important}._rOxGS._PYBb-:hover>svg{fill:#085caf}._rOxGS._PYBb-:hover>span{color:#085caf}._rOxGS._PYBb-:active{background-color:rgba(11,110,208,.12)!important}._rOxGS._PYBb-:active>svg{fill:#0854a1}._rOxGS._PYBb-:active>span{color:#0854a1}._y6z5r{border-radius:6px}._y6z5r>._q90kr{display:block;fill:#515559}._u3OAv{margin-top:auto;margin-bottom:0}._YPPss{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._YPPss:hover>._xoA0B{opacity:1}._-qw8Q{width:0;border-width:0;padding:0}._J1Pc3{border-radius:4px;min-width:100%;min-height:100%;outline:none}._2FVvn{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}._xoA0B{opacity:0}._2FVvn._01UGW._01UGW,._i9vG-,._xoA0B:hover{opacity:1}._2FVvn._NwpQR._NwpQR{opacity:0}._2FVvn>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._2FVvn>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._2FVvn>span:hover>svg{fill:#fff}._2FVvn>span:active{background-color:#0854a1;border-color:#0854a1}._2FVvn>span:active>svg{fill:#fff}._2FVvn>span>svg{fill:#515559;border-radius:50%}._J1Pc3._9ANnM{display:none!important}._rb3Da{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._Q5dX6{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._maRh7{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._N13GI{fill:#515559}._1kmlM{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._J1Pc3.focus-visible,._J1Pc3:focus-visible,._maRh7.focus-visible,._maRh7:focus-visible,._rb3Da.focus-visible,._rb3Da:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2FVvn.focus-visible,._2FVvn:focus-visible{border-color:#0a3f88}._2FVvn:active>span{background-color:#0854a1;border-color:#0854a1}._2FVvn:active>span>svg{fill:#fff}._xoA0B.focus-visible,._xoA0B:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_w0HY-","toolbarNav":"_f0hTa","toolbarNavCollapsed":"_nrI9Q","toolbarTabs":"_xBBcd","toolbarTab":"_rOxGS","selected":"_PYBb-","toolbarTabIconButton":"_y6z5r","icon":"_q90kr","tabsExpandCollapseButton":"_u3OAv","toolbarPanels":"_YPPss","toolbarPanelExpandCollapseButtonDefaultHidden":"_xoA0B","toolbarPanelsCollapsed":"_-qw8Q","toolbarPanel":"_J1Pc3","toolbarPanelExpandCollapseButton":"_2FVvn","toolbarPanelExpandCollapseButtonDefaultShown":"_i9vG-","overrideShow":"_01UGW","overrideHide":"_NwpQR","notSelected":"_9ANnM","buttonWithLabel":"_rb3Da","buttonWithLabelLabel":"_Q5dX6","iconButtonWithLabel":"_maRh7","iconButtonWithLabelIcon":"_N13GI","iconButtonWithLabelLabel":"_1kmlM"};
|
|
5
|
+
var stylesheet="._f0hTa,._w0HY-{display:flex}._f0hTa{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._nrI9Q{width:69px;min-width:auto;max-width:none}._xBBcd{width:100%}._rOxGS{margin-bottom:12px;background-color:transparent!important}._rOxGS:hover{background-color:rgba(11,110,208,.08)!important}._rOxGS:hover>svg{fill:#085caf}._rOxGS:hover>span{color:#085caf}._rOxGS:active{background-color:rgba(11,110,208,.12)!important}._rOxGS:active>svg{fill:#0854a1}._rOxGS:active>span{color:#0854a1}._rOxGS._PYBb-{background-color:rgba(11,110,208,.08)!important}._rOxGS._PYBb->svg{fill:#0b6ed0}._rOxGS._PYBb->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._rOxGS._PYBb-:hover{background-color:rgba(11,110,208,.08)!important}._rOxGS._PYBb-:hover>svg{fill:#085caf}._rOxGS._PYBb-:hover>span{color:#085caf}._rOxGS._PYBb-:active{background-color:rgba(11,110,208,.12)!important}._rOxGS._PYBb-:active>svg{fill:#0854a1}._rOxGS._PYBb-:active>span{color:#0854a1}._y6z5r{border-radius:6px}._y6z5r>._q90kr{display:block;fill:#515559}._u3OAv{margin-top:auto;margin-bottom:0}._YPPss{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._YPPss:hover>._xoA0B{opacity:1}._-qw8Q{width:0;border-width:0;padding:0}._J1Pc3{border-radius:4px;min-width:100%;min-height:100%;outline:none}._2FVvn{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}._xoA0B{opacity:0}._2FVvn._01UGW._01UGW,._i9vG-,._xoA0B:hover{opacity:1}._2FVvn._NwpQR._NwpQR{opacity:0}._2FVvn>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._2FVvn>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._2FVvn>span:hover>svg{fill:#fff}._2FVvn>span:active{background-color:#0854a1;border-color:#0854a1}._2FVvn>span:active>svg{fill:#fff}._2FVvn>span>svg{fill:#515559;border-radius:50%}._J1Pc3._9ANnM{display:none!important}._rb3Da{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._Q5dX6{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._maRh7{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._N13GI{fill:#515559}._1kmlM{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._J1Pc3.focus-visible,._J1Pc3:focus-visible,._maRh7.focus-visible,._maRh7:focus-visible,._rb3Da.focus-visible,._rb3Da:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2FVvn.focus-visible,._2FVvn:focus-visible{border-color:#0a3f88}._2FVvn:active>span{background-color:#0854a1;border-color:#0854a1}._2FVvn:active>span>svg{fill:#fff}._xoA0B.focus-visible,._xoA0B:focus-visible{opacity:1}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = {"overlay":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._gkhZy{background-color:#000;opacity:.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}._T7amd{visibility:hidden}";
|
|
4
|
+
var styles = {"overlay":"_gkhZy","hidden":"_T7amd"};
|
|
5
|
+
var stylesheet="._gkhZy{background-color:#000;opacity:.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}._T7amd{visibility:hidden}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 classes = {"ariaLiveElement":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._rAnU7{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_rAnU7"};
|
|
5
|
+
var stylesheet="._rAnU7{position:absolute;top:-10000px;left:-10000px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = "._H2Y6u{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_H2Y6u"};
|
|
5
|
+
var stylesheet="._H2Y6u{flex-shrink:0}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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-c9e48360.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
4
4
|
import type { ChangeEvent } from 'react';
|
|
5
5
|
import type { ClipboardEvent as ClipboardEvent_2 } from 'react';
|
|
6
|
+
import { ComponentPropsWithRef } from 'react';
|
|
6
7
|
import { ComputedPlacement } from '@popperjs/core';
|
|
7
8
|
import { CountryCode } from 'libphonenumber-js';
|
|
9
|
+
import { FocusEventHandler } from 'react';
|
|
8
10
|
import type { FormEvent } from 'react';
|
|
9
11
|
import type { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
10
12
|
import type { MouseEvent as MouseEvent_2 } from 'react';
|
|
@@ -188,7 +190,7 @@ export declare interface CheckboxProps extends React_2.AllHTMLAttributes<HTMLSpa
|
|
|
188
190
|
onChange?: (event: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
189
191
|
value?: string;
|
|
190
192
|
name?: string;
|
|
191
|
-
inputProps?: Omit<
|
|
193
|
+
inputProps?: Omit<ComponentPropsWithRef<'input'>, 'type'>;
|
|
192
194
|
'aria-label'?: string;
|
|
193
195
|
'aria-labelledby'?: string;
|
|
194
196
|
'aria-describedby'?: string;
|
|
@@ -712,6 +714,8 @@ export declare interface DropdownOptionProps extends React_2.AllHTMLAttributes<H
|
|
|
712
714
|
export declare interface DropdownProps extends Omit<React_2.AllHTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue'> {
|
|
713
715
|
className?: string;
|
|
714
716
|
children: React_2.ReactNode;
|
|
717
|
+
label?: string;
|
|
718
|
+
name?: string;
|
|
715
719
|
disabled?: boolean;
|
|
716
720
|
isInvalid?: boolean;
|
|
717
721
|
isOpen?: boolean;
|
|
@@ -720,7 +724,10 @@ export declare interface DropdownProps extends Omit<React_2.AllHTMLAttributes<HT
|
|
|
720
724
|
defaultValue?: string | number | Array<string | number>;
|
|
721
725
|
value?: string | number | Array<string | number>;
|
|
722
726
|
onChange?: (value: any) => void;
|
|
727
|
+
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
723
728
|
id?: string;
|
|
729
|
+
errorText?: ReactNode;
|
|
730
|
+
helperText?: ReactNode;
|
|
724
731
|
'aria-labelledby'?: string;
|
|
725
732
|
'aria-label'?: string;
|
|
726
733
|
'aria-describedby'?: string;
|
|
@@ -1814,7 +1821,10 @@ export declare interface RadioGroupProps extends Omit<React_2.AllHTMLAttributes<
|
|
|
1814
1821
|
defaultValue?: string;
|
|
1815
1822
|
value?: string;
|
|
1816
1823
|
onChange?: (event: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
1817
|
-
children:
|
|
1824
|
+
children: ReactNode;
|
|
1825
|
+
helperText?: ReactNode;
|
|
1826
|
+
errorText?: ReactNode;
|
|
1827
|
+
'data-testid'?: string;
|
|
1818
1828
|
[prop: string]: any;
|
|
1819
1829
|
}
|
|
1820
1830
|
|
package/dist/index.es.js
CHANGED
|
@@ -102,6 +102,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
102
102
|
|
|
103
103
|
/* eslint-disable camelcase */
|
|
104
104
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
105
|
-
const version = '2.
|
|
105
|
+
const version = '2.29.0';
|
|
106
106
|
|
|
107
107
|
export { version };
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./__shared/cjs/index-
|
|
5
|
+
var index = require('./__shared/cjs/index-c2d2f188.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
-
require('./__shared/cjs/index-
|
|
8
|
+
require('./__shared/cjs/index-c9e48360.js');
|
|
9
9
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
10
10
|
require('react-popper');
|
|
11
11
|
require('@popperjs/core');
|
|
@@ -19,7 +19,7 @@ require('throttle-debounce');
|
|
|
19
19
|
|
|
20
20
|
/* eslint-disable camelcase */
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
22
|
-
const version = '2.
|
|
22
|
+
const version = '2.29.0';
|
|
23
23
|
|
|
24
24
|
exports.Accordion = index.Accordion;
|
|
25
25
|
exports.AccordionHeader = index.AccordionHeader;
|
|
@@ -37,7 +37,7 @@ import useLatest from '../../hooks/useLatest/useLatest.js';
|
|
|
37
37
|
import wrapAround from '../../utils/wrapAround/wrapAround.js';
|
|
38
38
|
|
|
39
39
|
const AdvancedTable = _ref => {
|
|
40
|
-
var
|
|
40
|
+
var _ref7;
|
|
41
41
|
let {
|
|
42
42
|
columnConfigs: externalColumnConfigs,
|
|
43
43
|
rows: rowsPropExternal,
|
|
@@ -108,7 +108,6 @@ const AdvancedTable = _ref => {
|
|
|
108
108
|
const endingRowIndex = startingRowIndex + rowsPerPage;
|
|
109
109
|
return rows.slice(startingRowIndex, endingRowIndex);
|
|
110
110
|
}, [rows, rowsPerPage, currentPage]);
|
|
111
|
-
const paginatedRowIds = useMemo(() => paginatedRows === null || paginatedRows === void 0 ? void 0 : paginatedRows.map(row => row.id), [paginatedRows]);
|
|
112
111
|
useEffect(() => {
|
|
113
112
|
if (rows && rowsPerPage) {
|
|
114
113
|
const pageCount = Math.ceil(rows.length / rowsPerPage);
|
|
@@ -241,16 +240,13 @@ const AdvancedTable = _ref => {
|
|
|
241
240
|
const [lastToggledRowId, setLastToggledRowId] = useState('');
|
|
242
241
|
|
|
243
242
|
// Enables using Set.prototype.has() vs Array.prototype.includes() for better performance at scale
|
|
244
|
-
const
|
|
243
|
+
const checkedRowIdsSet = useMemo(() => new Set(checkedRowIds), [checkedRowIds]);
|
|
245
244
|
useSortedRows({
|
|
246
245
|
columnConfigs,
|
|
247
246
|
onRowsChange,
|
|
248
247
|
selectedSortOption,
|
|
249
248
|
setCurrentPage
|
|
250
249
|
});
|
|
251
|
-
useEffect(() => {
|
|
252
|
-
setCheckedRowIdsSet(new Set(checkedRowIds));
|
|
253
|
-
}, [checkedRowIds]);
|
|
254
250
|
const {
|
|
255
251
|
focusedRowIndex,
|
|
256
252
|
focusedColumnIndex,
|
|
@@ -281,7 +277,6 @@ const AdvancedTable = _ref => {
|
|
|
281
277
|
});
|
|
282
278
|
return ids;
|
|
283
279
|
}, [rowsProp]);
|
|
284
|
-
const totalRowsCountWithExpansion = useMemo(() => getAllRowIds().length, [getAllRowIds]);
|
|
285
280
|
const hasExpandableRows = useMemo(() => rows === null || rows === void 0 ? void 0 : rows.some(_ref3 => {
|
|
286
281
|
let {
|
|
287
282
|
hasChildRows
|
|
@@ -312,104 +307,85 @@ const AdvancedTable = _ref => {
|
|
|
312
307
|
});
|
|
313
308
|
return index === -1 ? 0 : index;
|
|
314
309
|
};
|
|
310
|
+
const getAllLeafIds = row => {
|
|
311
|
+
if (!row.childRows) return [row.id];
|
|
312
|
+
return row.childRows.reduce((arr, child) => {
|
|
313
|
+
arr.push(...getAllLeafIds(child));
|
|
314
|
+
return arr;
|
|
315
|
+
}, []);
|
|
316
|
+
};
|
|
315
317
|
const getCheckboxStateForRow = row => {
|
|
316
|
-
|
|
318
|
+
const ids = getAllLeafIds(row.rowPropReference);
|
|
319
|
+
const checkedIds = ids.filter(id => checkedRowIdsSet.has(id));
|
|
320
|
+
if (checkedIds.length === ids.length) {
|
|
317
321
|
return 'true';
|
|
318
322
|
}
|
|
319
|
-
if (
|
|
323
|
+
if (checkedIds.length) {
|
|
320
324
|
return 'mixed';
|
|
321
325
|
}
|
|
322
326
|
return 'false';
|
|
323
327
|
};
|
|
324
328
|
const columnHeaderCheckboxState = useMemo(() => {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return 'true';
|
|
329
|
-
}
|
|
330
|
-
if (checkedPaginatedRowIds.length) {
|
|
331
|
-
return 'mixed';
|
|
332
|
-
}
|
|
333
|
-
return 'false';
|
|
334
|
-
}
|
|
335
|
-
if (checkedRowIds.length === totalRowsCountWithExpansion) {
|
|
329
|
+
const visibleRows = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows;
|
|
330
|
+
const checkedRows = visibleRows.filter(row => getCheckboxStateForRow(row) === 'true');
|
|
331
|
+
if (checkedRows.length === visibleRows.length) {
|
|
336
332
|
return 'true';
|
|
337
333
|
}
|
|
338
|
-
if (
|
|
334
|
+
if (checkedRows.length) {
|
|
339
335
|
return 'mixed';
|
|
340
336
|
}
|
|
341
337
|
return 'false';
|
|
342
|
-
}, [
|
|
338
|
+
}, [checkedRowIdsSet, paginatedRows, rows]);
|
|
343
339
|
const handleColumnHeaderCheckboxToggle = () => {
|
|
344
340
|
setLastToggledRowId('');
|
|
345
|
-
if (
|
|
346
|
-
if (paginatedRowIds !== null && paginatedRowIds !== void 0 && paginatedRowIds.every(rowId => checkedRowIds.includes(rowId))) {
|
|
347
|
-
setCheckedRowIds(checkedRowIds.filter(checkedRowId => !paginatedRowIds.includes(checkedRowId)));
|
|
348
|
-
} else {
|
|
349
|
-
setCheckedRowIds([...checkedRowIds, ...paginatedRowIds]);
|
|
350
|
-
}
|
|
351
|
-
} else if (checkedRowIds.length === totalRowsCountWithExpansion) {
|
|
341
|
+
if (columnHeaderCheckboxState === 'true') {
|
|
352
342
|
setCheckedRowIds([]);
|
|
353
343
|
} else {
|
|
354
|
-
|
|
344
|
+
const visibleLeafIds = Array.from((paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows).reduce((set, _ref5) => {
|
|
345
|
+
let {
|
|
346
|
+
rowPropReference
|
|
347
|
+
} = _ref5;
|
|
348
|
+
getAllLeafIds(rowPropReference).forEach(id => set.add(id));
|
|
349
|
+
return set;
|
|
350
|
+
}, new Set()));
|
|
351
|
+
setCheckedRowIds(visibleLeafIds);
|
|
355
352
|
}
|
|
356
353
|
};
|
|
357
354
|
const multiUpdateCheckedRowIds = (startIndex, endIndex) => {
|
|
358
|
-
var _rows$endIndex;
|
|
359
355
|
if (!rows || startIndex === headerRowIndex || endIndex === headerRowIndex) {
|
|
360
356
|
return;
|
|
361
357
|
}
|
|
362
|
-
const
|
|
363
|
-
const isEndIndexChecked =
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
const {
|
|
368
|
-
id: rowId,
|
|
369
|
-
hasChildRows,
|
|
358
|
+
const endRow = rows[endIndex];
|
|
359
|
+
const isEndIndexChecked = getCheckboxStateForRow(endRow) === 'true';
|
|
360
|
+
setLastToggledRowId(endRow.id);
|
|
361
|
+
const newIds = rows.slice(Math.min(startIndex, endIndex), Math.max(startIndex, endIndex) + 1).reduce((set, _ref6) => {
|
|
362
|
+
let {
|
|
370
363
|
rowPropReference
|
|
371
|
-
} =
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
newCheckedRowIds = newCheckedRowIds.filter(id => !idsToUncheck.includes(id));
|
|
381
|
-
} else if (!checkedRowIdsSet.has(rowId)) {
|
|
382
|
-
let idsToCheck = [rowId];
|
|
383
|
-
if (hasChildRows) {
|
|
384
|
-
idsToCheck = idsToCheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
385
|
-
}
|
|
386
|
-
newCheckedRowIds = newCheckedRowIds.concat(idsToCheck);
|
|
387
|
-
}
|
|
364
|
+
} = _ref6;
|
|
365
|
+
getAllLeafIds(rowPropReference).forEach(id => set.add(id));
|
|
366
|
+
return set;
|
|
367
|
+
}, new Set());
|
|
368
|
+
if (isEndIndexChecked) {
|
|
369
|
+
setCheckedRowIds(checkedRowIds.filter(id => !newIds.has(id)));
|
|
370
|
+
} else {
|
|
371
|
+
setCheckedRowIds([...checkedRowIds, ...Array.from(newIds).filter(id => !checkedRowIdsSet.has(id))]);
|
|
388
372
|
}
|
|
389
|
-
setLastToggledRowId(endRowId);
|
|
390
|
-
setCheckedRowIds(newCheckedRowIds);
|
|
391
373
|
};
|
|
392
374
|
const singleUpdateCheckedRowIds = index => {
|
|
393
375
|
if (!rows) {
|
|
394
376
|
return;
|
|
395
377
|
}
|
|
378
|
+
const row = rows[index];
|
|
396
379
|
const {
|
|
397
380
|
id: rowId,
|
|
398
|
-
rowPropReference
|
|
399
|
-
|
|
400
|
-
} = rows[index];
|
|
381
|
+
rowPropReference
|
|
382
|
+
} = row;
|
|
401
383
|
setLastToggledRowId(rowId);
|
|
402
|
-
if (
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
406
|
-
}
|
|
407
|
-
setCheckedRowIds(checkedRowIds.filter(id => !idsToUncheck.includes(id)));
|
|
384
|
+
if (getCheckboxStateForRow(row) === 'true') {
|
|
385
|
+
const idsToUncheck = new Set(getAllLeafIds(rowPropReference));
|
|
386
|
+
setCheckedRowIds(checkedRowIds.filter(id => !idsToUncheck.has(id)));
|
|
408
387
|
} else {
|
|
409
|
-
|
|
410
|
-
if (hasChildRows) {
|
|
411
|
-
idsToCheck = idsToCheck.concat(getAllRowIds(rowPropReference.childRows).filter(r => !checkedRowIdsSet.has(r)));
|
|
412
|
-
}
|
|
388
|
+
const idsToCheck = getAllLeafIds(rowPropReference).filter(id => !checkedRowIdsSet.has(id));
|
|
413
389
|
setCheckedRowIds([...checkedRowIds, ...idsToCheck]);
|
|
414
390
|
}
|
|
415
391
|
};
|
|
@@ -678,7 +654,7 @@ const AdvancedTable = _ref => {
|
|
|
678
654
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
679
655
|
role: "rowgroup",
|
|
680
656
|
className: styles.advancedTableRowGroup
|
|
681
|
-
}, ((
|
|
657
|
+
}, ((_ref7 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref7 !== void 0 ? _ref7 : []).map((row, rowIndex) => {
|
|
682
658
|
const {
|
|
683
659
|
id: rowId,
|
|
684
660
|
data,
|
|
@@ -768,13 +744,13 @@ const AdvancedTable = _ref => {
|
|
|
768
744
|
};
|
|
769
745
|
|
|
770
746
|
// TODO: move hook to separate file
|
|
771
|
-
function useSortedRows(
|
|
747
|
+
function useSortedRows(_ref8) {
|
|
772
748
|
let {
|
|
773
749
|
columnConfigs,
|
|
774
750
|
onRowsChange,
|
|
775
751
|
selectedSortOption,
|
|
776
752
|
setCurrentPage
|
|
777
|
-
} =
|
|
753
|
+
} = _ref8;
|
|
778
754
|
const columnConfigsRef = useLatest(columnConfigs);
|
|
779
755
|
const onRowsChangeRef = useLatest(onRowsChange);
|
|
780
756
|
useDidUpdate(() => {
|
|
@@ -783,10 +759,10 @@ function useSortedRows(_ref6) {
|
|
|
783
759
|
columnId,
|
|
784
760
|
index
|
|
785
761
|
} = selectedSortOption;
|
|
786
|
-
const sort = (_columnConfigsRef$cur = columnConfigsRef.current.find(
|
|
762
|
+
const sort = (_columnConfigsRef$cur = columnConfigsRef.current.find(_ref9 => {
|
|
787
763
|
let {
|
|
788
764
|
id
|
|
789
|
-
} =
|
|
765
|
+
} = _ref9;
|
|
790
766
|
return id === columnId;
|
|
791
767
|
})) === null || _columnConfigsRef$cur === void 0 || (_columnConfigsRef$cur = _columnConfigsRef$cur.sortOptions) === null || _columnConfigsRef$cur === void 0 || (_columnConfigsRef$cur = _columnConfigsRef$cur[index]) === null || _columnConfigsRef$cur === void 0 ? void 0 : _columnConfigsRef$cur.sort;
|
|
792
768
|
if (typeof sort === 'function' && onRowsChangeRef.current) {
|
|
@@ -797,7 +773,7 @@ function useSortedRows(_ref6) {
|
|
|
797
773
|
}
|
|
798
774
|
|
|
799
775
|
// TODO: move hook to separate file
|
|
800
|
-
function useFocusState(
|
|
776
|
+
function useFocusState(_ref10) {
|
|
801
777
|
let {
|
|
802
778
|
headerRowIndex,
|
|
803
779
|
maxRowIndex,
|
|
@@ -807,7 +783,7 @@ function useFocusState(_ref8) {
|
|
|
807
783
|
pinnedUnpinnedColumnOrder,
|
|
808
784
|
tableRef,
|
|
809
785
|
currentPage
|
|
810
|
-
} =
|
|
786
|
+
} = _ref10;
|
|
811
787
|
const cellRefs = useRef({});
|
|
812
788
|
const pinnedContainersRef = useRef({});
|
|
813
789
|
const [focusedRowIndex, setFocusedRowIndex] = useState(headerRowIndex);
|