@qualtrics/ui-react 2.46.0 → 2.47.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 +20 -0
- package/dist/__shared/cjs/{index-235c4662.js → index-ab5a612e.js} +3 -3
- package/dist/__shared/cjs/{index-a294bba7.js → index-d7d42fea.js} +133 -133
- 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/Checkbox2.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/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/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/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.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.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/InputField.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/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +29 -11
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/Tooltip/Tooltip.js +6 -4
- package/dist/next/index.d.ts +91 -3
- package/dist/next/index.js +72 -55
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/next/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
1
2
|
import React__default, { forwardRef, useRef, useState } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import '../../components/Button/index.js';
|
|
@@ -25,7 +26,9 @@ const SplitButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
25
26
|
buttonAriaLabel,
|
|
26
27
|
buttonAriaLabelledBy,
|
|
27
28
|
dropdownAriaLabel,
|
|
28
|
-
dropdownAriaLabelledBy
|
|
29
|
+
dropdownAriaLabelledBy,
|
|
30
|
+
mainButtonProps,
|
|
31
|
+
dropdownAnchorProps
|
|
29
32
|
} = _ref;
|
|
30
33
|
const mainButtonRef = useRef(null);
|
|
31
34
|
const dropdownButtonRef = useRef(null);
|
|
@@ -45,7 +48,7 @@ const SplitButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
45
48
|
"data-testid": dataTestId,
|
|
46
49
|
className: classNames(styles.container, className),
|
|
47
50
|
ref: ref
|
|
48
|
-
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
51
|
+
}, /*#__PURE__*/React__default.createElement(Button, _extends({}, mainButtonProps, {
|
|
49
52
|
kind: kind,
|
|
50
53
|
"data-testid": getSubDataTestId(dataTestId, 'button'),
|
|
51
54
|
className: classNames(styles.mainButton, {
|
|
@@ -58,9 +61,17 @@ const SplitButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
58
61
|
tabIndex: dropdownButtonHasFocus ? -1 : 0,
|
|
59
62
|
"aria-label": buttonAriaLabel,
|
|
60
63
|
"aria-labelledby": buttonAriaLabelledBy,
|
|
61
|
-
onFocus:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
onFocus: e => {
|
|
65
|
+
var _mainButtonProps$onFo;
|
|
66
|
+
setMainButtonHasFocus(true);
|
|
67
|
+
mainButtonProps === null || mainButtonProps === void 0 || (_mainButtonProps$onFo = mainButtonProps.onFocus) === null || _mainButtonProps$onFo === void 0 || _mainButtonProps$onFo.call(mainButtonProps, e);
|
|
68
|
+
},
|
|
69
|
+
onBlur: e => {
|
|
70
|
+
var _mainButtonProps$onBl;
|
|
71
|
+
setMainButtonHasFocus(false);
|
|
72
|
+
mainButtonProps === null || mainButtonProps === void 0 || (_mainButtonProps$onBl = mainButtonProps.onBlur) === null || _mainButtonProps$onBl === void 0 || _mainButtonProps$onBl.call(mainButtonProps, e);
|
|
73
|
+
}
|
|
74
|
+
}), label), /*#__PURE__*/React__default.createElement("div", {
|
|
64
75
|
className: classNames(styles.divider, {
|
|
65
76
|
[styles.primary]: kind === 'primary',
|
|
66
77
|
[styles.secondary]: kind === 'secondary',
|
|
@@ -75,9 +86,8 @@ const SplitButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
75
86
|
"aria-labelledby": dropdownAriaLabelledBy,
|
|
76
87
|
value: 0,
|
|
77
88
|
disabled: isDropdownDisabled
|
|
78
|
-
}, /*#__PURE__*/React__default.createElement(DropdownButton
|
|
79
|
-
|
|
80
|
-
, {
|
|
89
|
+
}, /*#__PURE__*/React__default.createElement(DropdownButton, _extends({}, dropdownAnchorProps, {
|
|
90
|
+
// `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
81
91
|
label: /*#__PURE__*/React__default.createElement(React__default.Fragment, null),
|
|
82
92
|
className: classNames(styles.dropdownButton, {
|
|
83
93
|
[styles.disabled]: isDropdownDisabled,
|
|
@@ -86,9 +96,17 @@ const SplitButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
86
96
|
}),
|
|
87
97
|
ref: dropdownButtonRef,
|
|
88
98
|
tabIndex: -1,
|
|
89
|
-
onFocus:
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
onFocus: e => {
|
|
100
|
+
var _dropdownAnchorProps$;
|
|
101
|
+
setDropdownButtonHasFocus(true);
|
|
102
|
+
dropdownAnchorProps === null || dropdownAnchorProps === void 0 || (_dropdownAnchorProps$ = dropdownAnchorProps.onFocus) === null || _dropdownAnchorProps$ === void 0 || _dropdownAnchorProps$.call(dropdownAnchorProps, e);
|
|
103
|
+
},
|
|
104
|
+
onBlur: e => {
|
|
105
|
+
var _dropdownAnchorProps$2;
|
|
106
|
+
setDropdownButtonHasFocus(false);
|
|
107
|
+
dropdownAnchorProps === null || dropdownAnchorProps === void 0 || (_dropdownAnchorProps$2 = dropdownAnchorProps.onBlur) === null || _dropdownAnchorProps$2 === void 0 || _dropdownAnchorProps$2.call(dropdownAnchorProps, e);
|
|
108
|
+
}
|
|
109
|
+
})), /*#__PURE__*/React__default.createElement(DropdownList, {
|
|
92
110
|
placement: "bottom"
|
|
93
111
|
}, children)));
|
|
94
112
|
});
|
|
@@ -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 = {"container":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._5jVWP{display:flex}._lijB8{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._lijB8._UaaOI{background-color:#fff}._lijB8._2vLFx,._lijB8._UaaOI._Rdz-x.focus-visible:not(._4kI2M),._lijB8._UaaOI._Rdz-x:focus-visible:not(._4kI2M),._lijB8._UaaOI._UdgXi:not(._lijB8._UaaOI._Q6zXe){background-color:#0b6ed0}._lijB8._2vLFx._4kI2M._Q6zXe,._lijB8._2vLFx._4kI2M._Rdz-x,._lijB8._2vLFx._Q6zXe._UdgXi{opacity:.4}._x1-5j{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._x1-5j:focus{z-index:1}._lEuSQ{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._lEuSQ svg{margin-left:1px}._lEuSQ._UaaOI{background-color:#0b6ed0;border-color:transparent}._lEuSQ._UaaOI svg{fill:#fff!important}._lEuSQ._UaaOI:not(._SxB64):hover{background-color:#085caf!important}._lEuSQ._UaaOI:not(._SxB64):active{background-color:#0854a1!important}._lEuSQ._UaaOI._SxB64{opacity:.4}._lEuSQ._UaaOI._SxB64 svg{background-color:transparent}._lEuSQ._2vLFx{border-color:#0b6ed0;background-color:#fff}._lEuSQ._2vLFx svg{fill:#0b6ed0!important}._lEuSQ._2vLFx:not(._SxB64):hover{background-color:#eef5fc!important}._lEuSQ._2vLFx:not(._SxB64):active{background-color:#e1edf9!important}._lEuSQ._2vLFx._SxB64{opacity:.4}._lEuSQ._2vLFx._SxB64 svg{background-color:transparent}._QOTBn{width:260px}";
|
|
4
|
+
var styles = {"container":"_5jVWP","divider":"_lijB8","primary":"_UaaOI","mainButtonFocus":"_Rdz-x","mainButtonDisabled":"_4kI2M","dropdownButtonFocus":"_UdgXi","dropdownButtonDisabled":"_Q6zXe","secondary":"_2vLFx","mainButton":"_x1-5j","dropdownButton":"_lEuSQ","disabled":"_SxB64","dropdownOption":"_QOTBn"};
|
|
5
|
+
var stylesheet="._5jVWP{display:flex}._lijB8{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._lijB8._UaaOI{background-color:#fff}._lijB8._2vLFx,._lijB8._UaaOI._Rdz-x.focus-visible:not(._4kI2M),._lijB8._UaaOI._Rdz-x:focus-visible:not(._4kI2M),._lijB8._UaaOI._UdgXi:not(._lijB8._UaaOI._Q6zXe){background-color:#0b6ed0}._lijB8._2vLFx._4kI2M._Q6zXe,._lijB8._2vLFx._4kI2M._Rdz-x,._lijB8._2vLFx._Q6zXe._UdgXi{opacity:.4}._x1-5j{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._x1-5j:focus{z-index:1}._lEuSQ{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._lEuSQ svg{margin-left:1px}._lEuSQ._UaaOI{background-color:#0b6ed0;border-color:transparent}._lEuSQ._UaaOI svg{fill:#fff!important}._lEuSQ._UaaOI:not(._SxB64):hover{background-color:#085caf!important}._lEuSQ._UaaOI:not(._SxB64):active{background-color:#0854a1!important}._lEuSQ._UaaOI._SxB64{opacity:.4}._lEuSQ._UaaOI._SxB64 svg{background-color:transparent}._lEuSQ._2vLFx{border-color:#0b6ed0;background-color:#fff}._lEuSQ._2vLFx svg{fill:#0b6ed0!important}._lEuSQ._2vLFx:not(._SxB64):hover{background-color:#eef5fc!important}._lEuSQ._2vLFx:not(._SxB64):active{background-color:#e1edf9!important}._lEuSQ._2vLFx._SxB64{opacity:.4}._lEuSQ._2vLFx._SxB64 svg{background-color:transparent}._QOTBn{width:260px}";
|
|
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 = {"timePickerContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._eZQ0H{display:inline-block;position:relative}._eZQ0H ._YmrVh{width:120px}._eZQ0H ._YmrVh ._GT6NF._-YJ3J{transform:rotate(-180deg)}._eZQ0H ._YmrVh ._GT6NF._WNEgO{fill:#9d9fa1;opacity:.4}._eZQ0H ._tfox5>input:focus{box-shadow:none!important;border:1px solid #898989!important}._eZQ0H ._GT6NF{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._eZQ0H ._GT6NF._-YJ3J{transform:rotate(-180deg)}._kUfQT{width:120px}._kUfQT ._GIrxj._zGL40{background-color:#efefef;border-radius:6px}";
|
|
4
|
+
var styles = {"timePickerContainer":"_eZQ0H","input":"_YmrVh","icon":"_GT6NF","open":"_-YJ3J","disabled":"_WNEgO","ignoreFocusStyle":"_tfox5","timePickerFlyout":"_kUfQT","option":"_GIrxj","exactMatch":"_zGL40"};
|
|
5
|
+
var stylesheet="._eZQ0H{display:inline-block;position:relative}._eZQ0H ._YmrVh{width:120px}._eZQ0H ._YmrVh ._GT6NF._-YJ3J{transform:rotate(-180deg)}._eZQ0H ._YmrVh ._GT6NF._WNEgO{fill:#9d9fa1;opacity:.4}._eZQ0H ._tfox5>input:focus{box-shadow:none!important;border:1px solid #898989!important}._eZQ0H ._GT6NF{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._eZQ0H ._GT6NF._-YJ3J{transform:rotate(-180deg)}._kUfQT{width:120px}._kUfQT ._GIrxj._zGL40{background-color:#efefef;border-radius:6px}";
|
|
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 = {"default":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._7vjEj{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._UsdM3{background-color:rgba(50,54,58,.08)}._Es5I0{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._Hf-Ld{color:rgba(81,85,89,.4);cursor:not-allowed}._zTljd{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._x5aMe{color:#085caf;border-color:#085caf}._UAliL,._x5aMe{background:rgba(11,110,208,.11)}._UAliL{color:#0854a1;border-color:#0854a1}._y-4Za{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._J9256{position:relative;display:inline-grid}._J9256 svg{fill:currentColor}._J9256 ._PSHXx{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._J9256 ._PSHXx+._JPt6-{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._J9256 ._PSHXx+._JPt6-._5zGKN{padding:5px;max-width:36px;min-width:36px}._J9256 ._PSHXx+._JPt6-._Ja6CS{padding:0 16px}._J9256 ._PSHXx+._JPt6-._Zjuwx{padding:0 16px 0 12px}._J9256 ._PSHXx:hover+._JPt6-{background-color:rgba(50,54,58,.08)}._J9256 ._PSHXx:disabled+._JPt6-{color:rgba(81,85,89,.4);cursor:not-allowed}._J9256 ._PSHXx:active+._JPt6-,._J9256 ._PSHXx:focus:active+._JPt6-{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._J9256 ._PSHXx:checked+._JPt6-{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._J9256 ._PSHXx:checked:hover+._JPt6-{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._J9256 ._PSHXx:checked:disabled+._JPt6-{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._J9256 ._PSHXx:checked:active+._JPt6-,._J9256 ._PSHXx:checked:focus:active+._JPt6-{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._Ddg65{display:inline-flex;position:relative}._Ddg65:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._Ddg65>*{flex-shrink:0;flex-grow:0}._lVRta{border:none;margin:0;padding:0}._lVRta legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._J9256 ._PSHXx.focus-visible,._J9256 ._PSHXx:focus-visible{outline:none}._J9256 ._PSHXx.focus-visible+._JPt6-,._J9256 ._PSHXx:focus-visible+._JPt6-{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"default":"_7vjEj","hovered":"_UsdM3","pressed":"_Es5I0","disabled":"_Hf-Ld","selectedDefault":"_zTljd","selectedHovered":"_x5aMe","selectedPressed":"_UAliL","selectedDisabled":"_y-4Za","toggleContainer":"_J9256","toggleInput":"_PSHXx","toggleButton":"_JPt6-","iconOnly":"_5zGKN","text":"_Ja6CS","iconText":"_Zjuwx","toggleButtonGroup":"_Ddg65","toggleButtonGroupFieldset":"_lVRta"};
|
|
5
|
+
var stylesheet="._7vjEj{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._UsdM3{background-color:rgba(50,54,58,.08)}._Es5I0{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._Hf-Ld{color:rgba(81,85,89,.4);cursor:not-allowed}._zTljd{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._x5aMe{color:#085caf;border-color:#085caf}._UAliL,._x5aMe{background:rgba(11,110,208,.11)}._UAliL{color:#0854a1;border-color:#0854a1}._y-4Za{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._J9256{position:relative;display:inline-grid}._J9256 svg{fill:currentColor}._J9256 ._PSHXx{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._J9256 ._PSHXx+._JPt6-{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._J9256 ._PSHXx+._JPt6-._5zGKN{padding:5px;max-width:36px;min-width:36px}._J9256 ._PSHXx+._JPt6-._Ja6CS{padding:0 16px}._J9256 ._PSHXx+._JPt6-._Zjuwx{padding:0 16px 0 12px}._J9256 ._PSHXx:hover+._JPt6-{background-color:rgba(50,54,58,.08)}._J9256 ._PSHXx:disabled+._JPt6-{color:rgba(81,85,89,.4);cursor:not-allowed}._J9256 ._PSHXx:active+._JPt6-,._J9256 ._PSHXx:focus:active+._JPt6-{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._J9256 ._PSHXx:checked+._JPt6-{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._J9256 ._PSHXx:checked:hover+._JPt6-{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._J9256 ._PSHXx:checked:disabled+._JPt6-{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._J9256 ._PSHXx:checked:active+._JPt6-,._J9256 ._PSHXx:checked:focus:active+._JPt6-{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._Ddg65{display:inline-flex;position:relative}._Ddg65:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._Ddg65>*{flex-shrink:0;flex-grow:0}._lVRta{border:none;margin:0;padding:0}._lVRta legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._J9256 ._PSHXx.focus-visible,._J9256 ._PSHXx:focus-visible{outline:none}._J9256 ._PSHXx.focus-visible+._JPt6-,._J9256 ._PSHXx:focus-visible+._JPt6-{z-index:20;outline:none;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,10 +1,12 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
1
2
|
import React__default from 'react';
|
|
3
|
+
import Tooltip$1 from '../../components/Tooltip/Tooltip.js';
|
|
2
4
|
|
|
3
5
|
// This type is not working with api extractor, the api used in documentation is coming from old tooltip, with a new prop `ignore`
|
|
4
6
|
|
|
5
|
-
const Tooltip = props =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const Tooltip = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Tooltip$1, _extends({}, props, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
lightTheme: true
|
|
10
|
+
}), props.children));
|
|
9
11
|
|
|
10
12
|
export { Tooltip as default };
|
package/dist/next/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { CountryCode } from 'libphonenumber-js';
|
|
|
8
8
|
import { CSSProperties } from 'react';
|
|
9
9
|
import { DetailedHTMLProps } from 'react';
|
|
10
10
|
import { E164Number } from 'libphonenumber-js';
|
|
11
|
-
import { FC } from 'react';
|
|
12
11
|
import { FocusEventHandler } from 'react';
|
|
13
12
|
import { FormEvent } from 'react';
|
|
14
13
|
import { FormHTMLAttributes } from 'react';
|
|
@@ -207,6 +206,35 @@ export declare interface AdvancedTableSelectedSortOption {
|
|
|
207
206
|
|
|
208
207
|
declare type Alignment = AdvancedTableColumnConfig['alignment'];
|
|
209
208
|
|
|
209
|
+
declare interface ButtonProps extends React_2.AllHTMLAttributes<HTMLButtonElement> {
|
|
210
|
+
/** The contents of the button. */
|
|
211
|
+
children?: React_2.ReactNode;
|
|
212
|
+
/** Specifies the use of the button and customizes its color.
|
|
213
|
+
* @defaultValue 'default'*/
|
|
214
|
+
kind?: 'default' | 'primary' | 'secondary' | 'tertiary' | 'link' | 'danger';
|
|
215
|
+
/** Disables click events on the button and styles it to look as though it cannot be clicked.
|
|
216
|
+
* @defaultValue false */
|
|
217
|
+
disabled?: boolean;
|
|
218
|
+
/** Makes the button take up the full width of its container.
|
|
219
|
+
* @defaultValue false */
|
|
220
|
+
full?: boolean;
|
|
221
|
+
/** Makes the button smaller.
|
|
222
|
+
* @defaultValue false */
|
|
223
|
+
small?: boolean;
|
|
224
|
+
/** Appended to internal classes on the `button` element. */
|
|
225
|
+
className?: string;
|
|
226
|
+
/** Specifies the type of the button.
|
|
227
|
+
* @defaultValue 'button' */
|
|
228
|
+
type?: 'button' | 'submit' | 'reset';
|
|
229
|
+
/** Handler to be called when the button is clicked. Use to handle user interaction with the button. */
|
|
230
|
+
onClick?: (event: React_2.MouseEvent<HTMLButtonElement>) => void;
|
|
231
|
+
/** Handler to be called when a keyboard key is pressed down while button has focus. */
|
|
232
|
+
onKeyDown?: (event: React_2.KeyboardEvent<HTMLButtonElement>) => void;
|
|
233
|
+
/** Causes the button to be declared as disabled by screen readers. If not defined, `aria-disabled` defaults to the value of the `disabled` prop. */
|
|
234
|
+
'aria-disabled'?: boolean;
|
|
235
|
+
[prop: string]: any;
|
|
236
|
+
}
|
|
237
|
+
|
|
210
238
|
export declare const Chat: React_2.ForwardRefExoticComponent<ChatProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
211
239
|
|
|
212
240
|
export declare const ChatInput: React_2.ForwardRefExoticComponent<ChatInputProps & React_2.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -535,6 +563,53 @@ export declare interface DrawerProps {
|
|
|
535
563
|
'data-testid'?: string;
|
|
536
564
|
}
|
|
537
565
|
|
|
566
|
+
declare interface DropdownButtonProps extends Omit<React_2.AllHTMLAttributes<HTMLButtonElement>, 'label'> {
|
|
567
|
+
/** The component that should render as the dropdown button. */
|
|
568
|
+
children?: React_2.ReactElement & {
|
|
569
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* The text to display when no option is selected.
|
|
573
|
+
* @defaultValue ''
|
|
574
|
+
*/
|
|
575
|
+
defaultLabel?: string | React_2.ReactNode;
|
|
576
|
+
/** The label to display. */
|
|
577
|
+
label?: React_2.ReactNode;
|
|
578
|
+
/**
|
|
579
|
+
* The unique identifier for the button, used for linking accessible labels throughout the component.
|
|
580
|
+
* @defaultValue random
|
|
581
|
+
*/
|
|
582
|
+
id?: string;
|
|
583
|
+
/** @internal */
|
|
584
|
+
disabled?: boolean;
|
|
585
|
+
/** @internal */
|
|
586
|
+
isInvalid?: boolean;
|
|
587
|
+
/** @internal */
|
|
588
|
+
onLabelChange?: (string: any) => void;
|
|
589
|
+
/**
|
|
590
|
+
* The `id` of the element that acts as a label for the button.
|
|
591
|
+
* Overrides any `aria-labelledby` value received from the top-level
|
|
592
|
+
* `Dropdown` component.
|
|
593
|
+
*/
|
|
594
|
+
'aria-labelledby'?: string;
|
|
595
|
+
/**
|
|
596
|
+
* An accessible label for the dropdown that is used by screen readers.
|
|
597
|
+
* Overrides any `aria-label` value received from the top-level `Dropdown` component.
|
|
598
|
+
*/
|
|
599
|
+
'aria-label'?: string;
|
|
600
|
+
/**
|
|
601
|
+
* The `id` of the element that acts as a description for the button.
|
|
602
|
+
* Overrides any `aria-describedby` value received from the top-level
|
|
603
|
+
* `Dropdown` component.
|
|
604
|
+
*/
|
|
605
|
+
'aria-describedby'?: string;
|
|
606
|
+
/** Appended to internal classes on the `button` element. */
|
|
607
|
+
className?: string;
|
|
608
|
+
/** Appended to the internal `button` element. Overwrites `data-testid` from parent, if present. */
|
|
609
|
+
'data-testid'?: string;
|
|
610
|
+
[prop: string]: any;
|
|
611
|
+
}
|
|
612
|
+
|
|
538
613
|
declare interface DropdownListProps extends React_2.AllHTMLAttributes<HTMLDivElement> {
|
|
539
614
|
/** The displayed `DropdownOption` components. */
|
|
540
615
|
children?: React_2.ReactNode;
|
|
@@ -1095,6 +1170,15 @@ export declare interface SplitButtonProps {
|
|
|
1095
1170
|
dropdownAriaLabelledBy?: string;
|
|
1096
1171
|
/** The `SplitButtonOption`s. */
|
|
1097
1172
|
children?: React_2.ReactNode;
|
|
1173
|
+
/** Additional props passed to main button.
|
|
1174
|
+
*
|
|
1175
|
+
* \* It does not include properties such as `children, kind, disabled, full, small, className, type, onClick`. The usage of these properties may result in undefined behavior. */
|
|
1176
|
+
mainButtonProps?: Omit<ButtonProps, 'children' | 'kind' | 'disabled' | 'full' | 'small' | 'className' | 'type' | 'onClick'>;
|
|
1177
|
+
/** Additional props passed to dropdown's anchor button.
|
|
1178
|
+
*
|
|
1179
|
+
* \* It does not include properties such as `children, defaultLabel, label, disabled, isInvalid, onLabelChange, className, tabIndex`. The usage of these properties may result in undefined behavior.
|
|
1180
|
+
*/
|
|
1181
|
+
dropdownAnchorProps?: Omit<DropdownButtonProps, 'children' | 'defaultLabel' | 'label' | 'disabled' | 'isInvalid' | 'onLabelChange' | 'className' | 'tabIndex'>;
|
|
1098
1182
|
}
|
|
1099
1183
|
|
|
1100
1184
|
export declare const StackItem: React_2.ForwardRefExoticComponent<StackItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1271,9 +1355,13 @@ export declare interface ToggleButtonProps {
|
|
|
1271
1355
|
dataTestId?: string;
|
|
1272
1356
|
}
|
|
1273
1357
|
|
|
1274
|
-
export declare const Tooltip:
|
|
1358
|
+
export declare const Tooltip: React_2.ForwardRefExoticComponent<Omit<TooltipProps_2, "lightTheme"> & {
|
|
1359
|
+
children: TooltipProps_2['children'];
|
|
1360
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
1275
1361
|
|
|
1276
|
-
export declare type TooltipProps = Omit<TooltipProps_2, 'lightTheme'
|
|
1362
|
+
export declare type TooltipProps = Omit<TooltipProps_2, 'lightTheme'> & {
|
|
1363
|
+
children: TooltipProps_2['children'];
|
|
1364
|
+
};
|
|
1277
1365
|
|
|
1278
1366
|
declare interface TooltipProps_2 extends Omit<React_2.AllHTMLAttributes<HTMLDivElement>, 'content'> {
|
|
1279
1367
|
/** Element or component to which the tooltip should be anchored, which must accept a ref. */
|