@qualtrics/ui-react 2.5.0 → 2.6.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-6a9c8483.js → index-0b32024d.js} +3 -3
- package/dist/__shared/cjs/{index-0e2c0191.js → index-9ce19e39.js} +186 -53
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/BreakpointSwitch/Breakpoint.js +18 -0
- package/dist/components/BreakpointSwitch/BreakpointContext.js +9 -0
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +37 -0
- package/dist/components/BreakpointSwitch/index.js +2 -0
- 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/ColorPicker/ColorPickerFlyoutInputs.js +6 -6
- 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/InlineInput.js +8 -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/NewMenu.js +3 -3
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperInput.js +1 -1
- 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_NumberStepper/NumberStepperInput.js +1 -1
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/index.js +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useBreakpoints/index.js +1 -0
- package/dist/hooks/useBreakpoints/useBreakpoints.js +47 -0
- package/dist/hooks/useResponsiveValue/index.js +1 -0
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +21 -0
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +8 -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 +27 -0
- package/dist/index.es.js +7 -1
- package/dist/index.js +158 -98
- package/dist/next/AdvancedTable/AdvancedTable.js +0 -1
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +2 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +1 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/index.es.js +1 -0
- package/dist/next/index.js +24 -25
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/constants.js +14 -2
- package/dist/utils/index.js +1 -1
- package/dist/utils/mediaQueryManager/index.js +1 -0
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +59 -0
- package/icons/package.json +1 -0
- package/next/package.json +1 -0
- package/package.json +3 -1
|
@@ -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 = {"colorPickerBtnColor":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._2O8Fn{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._3ONig{margin-right:-12px;margin-left:4px}._suWHM{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._1hBMu{margin:8px 8px 0;display:flex}._2lFer,._F6K0c{margin-left:4px}._1c8Xk{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._375oo{margin:0 4px 4px 0}._375oo:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._K4lQ1{margin:4px 8px 8px}._2LDIO{position:relative;width:96px;height:96px;outline:0}body.keyboard-user ._2LDIO:active:focus ._FZqh6,body.keyboard-user ._2LDIO:focus ._FZqh6{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._wc6FX{background:linear-gradient(90deg,#fff,transparent)}._3Vmu_,._wc6FX{position:absolute;top:0;right:0;bottom:0;left:0}._3Vmu_{background:linear-gradient(0deg,#000,transparent)}._FZqh6{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._1yNT7{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}body.keyboard-user ._1yNT7:active:focus ._2Ync8,body.keyboard-user ._1yNT7:focus ._2Ync8{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2Ync8{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._ky45d{position:relative;width:16px;height:96px}._1miHc{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._1miHc,._2oQG8{position:absolute}._2oQG8{top:0;right:0;bottom:0;left:0;outline:0}body.keyboard-user ._2oQG8:active:focus ._1miHc,body.keyboard-user ._2oQG8:focus ._1miHc{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1tr9P{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._2i5Ch{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._2i5Ch:active:focus,._2i5Ch:focus{outline:none}body.keyboard-user ._2i5Ch:active:focus,body.keyboard-user ._2i5Ch:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._CQweE{display:flex}._CQweE ._1sJQt{position:relative;flex-shrink:0;width:26px;height:26px}._CQweE ._1lHKK{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._CQweE ._W7Mnr{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
4
|
+
var styles = {"colorPickerBtnColor":"_2O8Fn","colorPickerBtnIcon":"_3ONig","colorPicker":"_suWHM","colorPickerSliderContainer":"_1hBMu","colorPickerHue":"_2lFer","colorPickerAlpha":"_F6K0c","colorPickerSwatches":"_1c8Xk","colorPickerSwatch":"_375oo","colorPickerHex":"_K4lQ1","saturation":"_2LDIO","saturationCircle":"_FZqh6","saturationWhite":"_wc6FX","saturationBlack":"_3Vmu_","hue":"_1yNT7","hueSlider":"_2Ync8","alpha":"_ky45d","alphaSlider":"_1miHc","alphaGradient":"_2oQG8","alphaCheckerboard":"_1tr9P","swatch":"_2i5Ch","hex":"_CQweE","hexSwatch":"_1sJQt","hexSwatchColor":"_1lHKK","hexInput":"_W7Mnr"};
|
|
5
|
+
var stylesheet="._2O8Fn{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._3ONig{margin-right:-12px;margin-left:4px}._suWHM{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._1hBMu{margin:8px 8px 0;display:flex}._2lFer,._F6K0c{margin-left:4px}._1c8Xk{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._375oo{margin:0 4px 4px 0}._375oo:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._K4lQ1{margin:4px 8px 8px}._2LDIO{position:relative;width:96px;height:96px;outline:0}body.keyboard-user ._2LDIO:active:focus ._FZqh6,body.keyboard-user ._2LDIO:focus ._FZqh6{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._wc6FX{background:linear-gradient(90deg,#fff,transparent)}._3Vmu_,._wc6FX{position:absolute;top:0;right:0;bottom:0;left:0}._3Vmu_{background:linear-gradient(0deg,#000,transparent)}._FZqh6{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._1yNT7{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}body.keyboard-user ._1yNT7:active:focus ._2Ync8,body.keyboard-user ._1yNT7:focus ._2Ync8{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2Ync8{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._ky45d{position:relative;width:16px;height:96px}._1miHc{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._1miHc,._2oQG8{position:absolute}._2oQG8{top:0;right:0;bottom:0;left:0;outline:0}body.keyboard-user ._2oQG8:active:focus ._1miHc,body.keyboard-user ._2oQG8:focus ._1miHc{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1tr9P{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._2i5Ch{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._2i5Ch:active:focus,._2i5Ch:focus{outline:none}body.keyboard-user ._2i5Ch:active:focus,body.keyboard-user ._2i5Ch:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._CQweE{display:flex}._CQweE ._1sJQt{position:relative;flex-shrink:0;width:26px;height:26px}._CQweE ._1lHKK{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._CQweE ._W7Mnr{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
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 = {"numberStepperContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._1kPJL{display:inline-flex}._2yL1b{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}._2yL1b:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._2yL1b._6fCOz{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2yL1b._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2yL1b._3kgRV>svg{opacity:.4}._2yL1b::-webkit-inner-spin-button,._2yL1b::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._2yL1b:focus{z-index:0;border:none;border-radius:4px}._2yL1b:focus:not(._6fCOz){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2yL1b:focus:not(._3kgRV),._ArJ91{background:#fafafa}._ArJ91{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}._ArJ91:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._ArJ91:active:not(._3kgRV){background:#e5e5e5}._ArJ91._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ArJ91._3kgRV>svg{opacity:.4}._2L3Ny{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}._2L3Ny:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._2L3Ny:active:not(._3kgRV){background:#e5e5e5}._2L3Ny._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2L3Ny._3kgRV>svg{opacity:.4}._1pjFo{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_1kPJL","numberStepperInput":"_2yL1b","disabled":"_3kgRV","invalid":"_6fCOz","decrementBtn":"_ArJ91","incrementBtn":"_2L3Ny","inputValueAlert":"_1pjFo"};
|
|
5
|
+
var stylesheet="._1kPJL{display:inline-flex}._2yL1b{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}._2yL1b:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._2yL1b._6fCOz{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2yL1b._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2yL1b._3kgRV>svg{opacity:.4}._2yL1b::-webkit-inner-spin-button,._2yL1b::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._2yL1b:focus{z-index:0;border:none;border-radius:4px}._2yL1b:focus:not(._6fCOz){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2yL1b:focus:not(._3kgRV),._ArJ91{background:#fafafa}._ArJ91{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}._ArJ91:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._ArJ91:active:not(._3kgRV){background:#e5e5e5}._ArJ91._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ArJ91._3kgRV>svg{opacity:.4}._2L3Ny{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}._2L3Ny:hover:not(._3kgRV){cursor:pointer;background:#f5f5f5}._2L3Ny:active:not(._3kgRV){background:#e5e5e5}._2L3Ny._3kgRV{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._2L3Ny._3kgRV>svg{opacity:.4}._1pjFo{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 };
|
|
@@ -138,7 +138,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
138
138
|
"aria-describedby": internalAriaDescribedby,
|
|
139
139
|
"aria-invalid": isInputValueInvalid,
|
|
140
140
|
"aria-disabled": isExternallyDisabled,
|
|
141
|
-
onChange: isExternallyDisabled ?
|
|
141
|
+
onChange: isExternallyDisabled ? () => {} : handleInputChange,
|
|
142
142
|
onKeyDown: handleKeyDown,
|
|
143
143
|
onFocus: handleFocus,
|
|
144
144
|
onBlur: handleBlur
|
|
@@ -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 = "._3ysPj{display:block}._2Zf3u{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._2CXck{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}._2CXck:hover{color:#32363a}._2CXck:focus{outline:none}._2CXck._1gv4e{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a}._28nND{padding-top:32px}._28nND._1yeN-{display:none}body.keyboard-user ._2CXck:active:focus,body.keyboard-user ._2CXck:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_3ysPj","bar":"_2Zf3u","tab":"_2CXck","active":"_1gv4e","panel":"_28nND","inactive":"_1yeN-"};
|
|
5
|
+
var stylesheet="._3ysPj{display:block}._2Zf3u{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._2CXck{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}._2CXck:hover{color:#32363a}._2CXck:focus{outline:none}._2CXck._1gv4e{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a}._28nND{padding-top:32px}._28nND._1yeN-{display:none}body.keyboard-user ._2CXck:active:focus,body.keyboard-user ._2CXck: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 = "._2Ccdi,._3rQ9u{display:flex}._2Ccdi{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._1O9pw{width:69px;min-width:auto;max-width:none}._5mz55{width:100%}._1vZyA{margin-bottom:12px;background-color:transparent!important}._1vZyA:hover{background-color:rgba(11,110,208,.08)!important}._1vZyA:hover>svg{fill:#085caf}._1vZyA:hover>span{color:#085caf}._1vZyA:active{background-color:rgba(11,110,208,.12)!important}._1vZyA:active>svg{fill:#0854a1}._1vZyA:active>span{color:#0854a1}._1vZyA._3cskg{background-color:rgba(11,110,208,.08)!important}._1vZyA._3cskg>svg{fill:#0b6ed0}._1vZyA._3cskg>span{color:#0b6ed0}._1vZyA._3cskg:hover{background-color:rgba(11,110,208,.08)!important}._1vZyA._3cskg:hover>svg{fill:#085caf}._1vZyA._3cskg:hover>span{color:#085caf}._1vZyA._3cskg:active{background-color:rgba(11,110,208,.12)!important}._1vZyA._3cskg:active>svg{fill:#0854a1}._1vZyA._3cskg:active>span{color:#0854a1}._X-NWO{border-radius:6px}._X-NWO>._X750m{display:block;fill:#515559}._1IXuq{margin-top:auto;margin-bottom:0}._yJXyn{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._yJXyn:hover>._zZ070{opacity:1}._2yBlX{width:0;border-width:0;padding:0}._2137n{border-radius:4px;min-width:100%;min-height:100%;outline:none}._IRb3J{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}._zZ070{opacity:0}._1AfxQ,._IRb3J._2Lgq8._2Lgq8,._zZ070:hover{opacity:1}._IRb3J._wlh2M._wlh2M{opacity:0}._IRb3J>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._IRb3J>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._IRb3J>span:hover>svg{fill:#fff}._IRb3J>span:active{background-color:#0854a1;border-color:#0854a1}._IRb3J>span:active>svg{fill:#fff}._IRb3J>span>svg{fill:#515559;border-radius:50%}._2137n._279o-{display:none!important}._3ju-q{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._3xqtM{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._1wKMG{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._1XfVp{fill:#515559}._1_Dc6{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1wKMG:active:focus,body.keyboard-user ._1wKMG:focus,body.keyboard-user ._3ju-q:active:focus,body.keyboard-user ._3ju-q:focus,body.keyboard-user ._2137n:active:focus,body.keyboard-user ._2137n:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._IRb3J:focus{border-color:#0a3f88}body.keyboard-user ._IRb3J:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._IRb3J:active>span>svg{fill:#fff}body.keyboard-user ._zZ070:focus{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_3rQ9u","toolbarNav":"_2Ccdi","toolbarNavCollapsed":"_1O9pw","toolbarTabs":"_5mz55","toolbarTab":"_1vZyA","selected":"_3cskg","toolbarTabIconButton":"_X-NWO","icon":"_X750m","tabsExpandCollapseButton":"_1IXuq","toolbarPanels":"_yJXyn","toolbarPanelExpandCollapseButtonDefaultHidden":"_zZ070","toolbarPanelsCollapsed":"_2yBlX","toolbarPanel":"_2137n","toolbarPanelExpandCollapseButton":"_IRb3J","toolbarPanelExpandCollapseButtonDefaultShown":"_1AfxQ","overrideShow":"_2Lgq8","overrideHide":"_wlh2M","notSelected":"_279o-","buttonWithLabel":"_3ju-q","buttonWithLabelLabel":"_3xqtM","iconButtonWithLabel":"_1wKMG","iconButtonWithLabelIcon":"_1XfVp","iconButtonWithLabelLabel":"_1_Dc6"};
|
|
5
|
+
var stylesheet="._2Ccdi,._3rQ9u{display:flex}._2Ccdi{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._1O9pw{width:69px;min-width:auto;max-width:none}._5mz55{width:100%}._1vZyA{margin-bottom:12px;background-color:transparent!important}._1vZyA:hover{background-color:rgba(11,110,208,.08)!important}._1vZyA:hover>svg{fill:#085caf}._1vZyA:hover>span{color:#085caf}._1vZyA:active{background-color:rgba(11,110,208,.12)!important}._1vZyA:active>svg{fill:#0854a1}._1vZyA:active>span{color:#0854a1}._1vZyA._3cskg{background-color:rgba(11,110,208,.08)!important}._1vZyA._3cskg>svg{fill:#0b6ed0}._1vZyA._3cskg>span{color:#0b6ed0}._1vZyA._3cskg:hover{background-color:rgba(11,110,208,.08)!important}._1vZyA._3cskg:hover>svg{fill:#085caf}._1vZyA._3cskg:hover>span{color:#085caf}._1vZyA._3cskg:active{background-color:rgba(11,110,208,.12)!important}._1vZyA._3cskg:active>svg{fill:#0854a1}._1vZyA._3cskg:active>span{color:#0854a1}._X-NWO{border-radius:6px}._X-NWO>._X750m{display:block;fill:#515559}._1IXuq{margin-top:auto;margin-bottom:0}._yJXyn{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._yJXyn:hover>._zZ070{opacity:1}._2yBlX{width:0;border-width:0;padding:0}._2137n{border-radius:4px;min-width:100%;min-height:100%;outline:none}._IRb3J{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}._zZ070{opacity:0}._1AfxQ,._IRb3J._2Lgq8._2Lgq8,._zZ070:hover{opacity:1}._IRb3J._wlh2M._wlh2M{opacity:0}._IRb3J>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._IRb3J>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._IRb3J>span:hover>svg{fill:#fff}._IRb3J>span:active{background-color:#0854a1;border-color:#0854a1}._IRb3J>span:active>svg{fill:#fff}._IRb3J>span>svg{fill:#515559;border-radius:50%}._2137n._279o-{display:none!important}._3ju-q{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._3xqtM{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._1wKMG{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._1XfVp{fill:#515559}._1_Dc6{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1wKMG:active:focus,body.keyboard-user ._1wKMG:focus,body.keyboard-user ._3ju-q:active:focus,body.keyboard-user ._3ju-q:focus,body.keyboard-user ._2137n:active:focus,body.keyboard-user ._2137n:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._IRb3J:focus{border-color:#0a3f88}body.keyboard-user ._IRb3J:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._IRb3J:active>span>svg{fill:#fff}body.keyboard-user ._zZ070:focus{opacity:1}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
package/dist/components/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useBreakpoints.js';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import '../../utils/mediaQueryManager/index.js';
|
|
3
|
+
import { DEFAULT_BREAKPOINTS } from '../../utils/constants.js';
|
|
4
|
+
import '../useLatest/index.js';
|
|
5
|
+
import { getMediaQueryValue, subscribe } from '../../utils/mediaQueryManager/mediaQueryManager.js';
|
|
6
|
+
import useLatest from '../useLatest/useLatest.js';
|
|
7
|
+
|
|
8
|
+
function getMinWidthQuery(length, unit) {
|
|
9
|
+
return "(min-width: ".concat(length).concat(unit, ")");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function getInitialValues(breakpointsConfig, unit) {
|
|
13
|
+
const initialValues = {};
|
|
14
|
+
Object.entries(breakpointsConfig).forEach(_ref => {
|
|
15
|
+
let [breakpointName, breakpointValue] = _ref;
|
|
16
|
+
const query = getMinWidthQuery(breakpointValue, unit);
|
|
17
|
+
initialValues[breakpointName] = getMediaQueryValue(query);
|
|
18
|
+
});
|
|
19
|
+
return initialValues;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function useBreakpoints() {
|
|
23
|
+
let breakpoints = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_BREAKPOINTS;
|
|
24
|
+
let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'em';
|
|
25
|
+
const [matches, setMatches] = useState(() => getInitialValues(breakpoints, unit));
|
|
26
|
+
const breakpointsRef = useLatest(breakpoints);
|
|
27
|
+
const unitRef = useLatest(unit);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const unsubscribeFns = [];
|
|
30
|
+
Object.entries(breakpointsRef.current).forEach(_ref2 => {
|
|
31
|
+
let [breakpointName, breakpointValue] = _ref2;
|
|
32
|
+
const query = getMinWidthQuery(breakpointValue, unitRef.current);
|
|
33
|
+
const unsubscribe = subscribe(query, event => {
|
|
34
|
+
setMatches(prevValue => ({ ...prevValue,
|
|
35
|
+
[breakpointName]: event.matches
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
38
|
+
unsubscribeFns.push(unsubscribe);
|
|
39
|
+
});
|
|
40
|
+
return () => {
|
|
41
|
+
unsubscribeFns.forEach(fn => fn());
|
|
42
|
+
};
|
|
43
|
+
}, [breakpointsRef, unitRef]);
|
|
44
|
+
return matches;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { useBreakpoints as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useResponsiveValue.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import '../useBreakpoints/index.js';
|
|
2
|
+
import { DEFAULT_BREAKPOINTS } from '../../utils/constants.js';
|
|
3
|
+
import useBreakpoints from '../useBreakpoints/useBreakpoints.js';
|
|
4
|
+
|
|
5
|
+
function useResponsiveValue(values) {
|
|
6
|
+
var _values$returnKey;
|
|
7
|
+
|
|
8
|
+
let breakpoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_BREAKPOINTS;
|
|
9
|
+
let unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'em';
|
|
10
|
+
const matches = useBreakpoints(breakpoints, unit);
|
|
11
|
+
const returnKey = Object.keys(values).reduce((acc, k) => {
|
|
12
|
+
if (matches[k] && (typeof acc === 'undefined' || breakpoints[acc] < breakpoints[k])) {
|
|
13
|
+
return k;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return acc;
|
|
17
|
+
}, undefined);
|
|
18
|
+
return (_values$returnKey = values[returnKey]) !== null && _values$returnKey !== void 0 ? _values$returnKey : null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { useResponsiveValue as default };
|
|
@@ -11,7 +11,8 @@ function useScreenReaderAnnouncement(politeness) {
|
|
|
11
11
|
const ariaLiveElementRef = useRef();
|
|
12
12
|
const [messageQueue, setMessageQueue] = useState([]); // An array of messages where the first item in the array is the oldest message
|
|
13
13
|
|
|
14
|
-
const [isAnnouncingMessage, setIsAnnouncingMessage] = useState(false);
|
|
14
|
+
const [isAnnouncingMessage, setIsAnnouncingMessage] = useState(false);
|
|
15
|
+
const delayTimer = useRef(); // Creates the live region element
|
|
15
16
|
|
|
16
17
|
useEffect(() => {
|
|
17
18
|
ariaLiveElementRef.current = document.createElement('span');
|
|
@@ -48,14 +49,18 @@ function useScreenReaderAnnouncement(politeness) {
|
|
|
48
49
|
delay = 0;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
setTimeout(() => {
|
|
52
|
+
delayTimer.current = setTimeout(() => {
|
|
52
53
|
if (ariaLiveElementRef.current !== undefined) ariaLiveElementRef.current.textContent = oldestMessage;
|
|
53
54
|
setMessageQueue(currentMessageQueue => currentMessageQueue.slice(1)); // Removes the oldest message (i.e. first item) from the message queue since it was just announced
|
|
54
55
|
|
|
55
56
|
setIsAnnouncingMessage(false);
|
|
56
57
|
}, delay);
|
|
57
58
|
}
|
|
58
|
-
}, [isAnnouncingMessage, messageQueue]);
|
|
59
|
+
}, [isAnnouncingMessage, messageQueue]); // Cleanup timeout to avoid memory leaks
|
|
60
|
+
|
|
61
|
+
useEffect(() => () => {
|
|
62
|
+
if (delayTimer.current) clearTimeout(delayTimer.current);
|
|
63
|
+
}, []);
|
|
59
64
|
/**
|
|
60
65
|
* Sends a message for the screen reader to read.
|
|
61
66
|
* @param message - The message that the screen reader will read.
|
|
@@ -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 = "._7rpQt{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_7rpQt"};
|
|
5
|
+
var stylesheet="._7rpQt{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 = "._7coOi{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_7coOi"};
|
|
5
|
+
var stylesheet="._7coOi{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-0b32024d.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
1
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
4
|
import type { ChangeEvent } from 'react';
|
|
3
5
|
import type { ClipboardEvent as ClipboardEvent_2 } from 'react';
|
|
@@ -57,6 +59,15 @@ declare interface BaseNavLinkProps {
|
|
|
57
59
|
'data-testid'?: string;
|
|
58
60
|
}
|
|
59
61
|
|
|
62
|
+
export declare function Breakpoint({ size, children, }: {
|
|
63
|
+
size: DefaultBreakpointKeys;
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
}): null;
|
|
66
|
+
|
|
67
|
+
export declare function BreakpointSwitch({ children, }: {
|
|
68
|
+
children: React_2.ReactNode;
|
|
69
|
+
}): JSX.Element;
|
|
70
|
+
|
|
60
71
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
61
72
|
|
|
62
73
|
export declare const ButtonGroup: React_2.ForwardRefExoticComponent<ButtonGroupProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -293,6 +304,16 @@ declare const _default: {
|
|
|
293
304
|
locked: string;
|
|
294
305
|
};
|
|
295
306
|
|
|
307
|
+
export declare const DEFAULT_BREAKPOINTS: {
|
|
308
|
+
xs: number;
|
|
309
|
+
sm: number;
|
|
310
|
+
md: number;
|
|
311
|
+
lg: number;
|
|
312
|
+
xl: number;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
declare type DefaultBreakpointKeys = keyof typeof DEFAULT_BREAKPOINTS;
|
|
316
|
+
|
|
296
317
|
export declare interface deprecated_ColorHsb {
|
|
297
318
|
h: number;
|
|
298
319
|
s: number;
|
|
@@ -1967,6 +1988,12 @@ export declare interface UIProviderProps {
|
|
|
1967
1988
|
children?: ReactNode;
|
|
1968
1989
|
}
|
|
1969
1990
|
|
|
1991
|
+
export declare function useBreakpoints<T extends Record<string, number> | undefined = undefined>(breakpoints?: T, unit?: 'em' | 'px'): T extends Record<string, number> ? Record<keyof T, boolean> : Record<DefaultBreakpointKeys, boolean>;
|
|
1992
|
+
|
|
1993
|
+
export declare function useResponsiveValue<V, C = typeof DEFAULT_BREAKPOINTS>(values: {
|
|
1994
|
+
[K in keyof V]: K extends keyof C ? V[K] : never;
|
|
1995
|
+
}, breakpoints?: C, unit?: 'em' | 'px'): V[keyof V];
|
|
1996
|
+
|
|
1970
1997
|
declare type ValuesOf<T> = T extends {
|
|
1971
1998
|
[K in keyof T]: infer U;
|
|
1972
1999
|
} ? U : never;
|
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import './utils/index.js';
|
|
2
2
|
import './components/index.js';
|
|
3
|
+
import './hooks/index.js';
|
|
4
|
+
export { DEFAULT_BREAKPOINTS } from './utils/constants.js';
|
|
3
5
|
import { enableKeyboardUserClass } from './utils/keyboardUser/keyboardUser.js';
|
|
6
|
+
export { default as useBreakpoints } from './hooks/useBreakpoints/useBreakpoints.js';
|
|
7
|
+
export { default as useResponsiveValue } from './hooks/useResponsiveValue/useResponsiveValue.js';
|
|
4
8
|
export { Accordion } from './components/Accordion/Accordion.js';
|
|
5
9
|
export { AccordionSection } from './components/Accordion/AccordionSection.js';
|
|
6
10
|
export { AccordionHeader } from './components/Accordion/AccordionHeader.js';
|
|
7
11
|
export { AccordionPanel } from './components/Accordion/AccordionPanel.js';
|
|
12
|
+
export { default as BreakpointSwitch } from './components/BreakpointSwitch/BreakpointSwitch.js';
|
|
13
|
+
export { default as Breakpoint } from './components/BreakpointSwitch/Breakpoint.js';
|
|
8
14
|
export { Button } from './components/Button/Button.js';
|
|
9
15
|
export { default as ButtonGroup } from './components/ButtonGroup/ButtonGroup.js';
|
|
10
16
|
export { default as Checkbox } from './components/Checkbox/Checkbox.js';
|
|
@@ -99,6 +105,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
99
105
|
|
|
100
106
|
enableKeyboardUserClass();
|
|
101
107
|
|
|
102
|
-
const version = '2.
|
|
108
|
+
const version = '2.6.0';
|
|
103
109
|
|
|
104
110
|
export { version };
|