@qualtrics/ui-react 2.24.2 → 2.25.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 +10 -0
- package/dist/__shared/cjs/{index-8f52588d.js → index-5b3b3406.js} +3 -3
- package/dist/__shared/cjs/{index-b7a35c2e.js → index-610a1e02.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/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/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/useOverlay.js +1 -1
- 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 +9 -7
- package/dist/index.es.js +2 -1
- package/dist/index.js +4 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +6 -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/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +4 -1
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +5 -2
- package/dist/next/Menu/MenuItem.js +19 -4
- package/dist/next/Menu/MenuPane.js +48 -32
- package/dist/next/Menu/SubMenu.js +49 -21
- package/dist/next/Menu/useCSSVariable.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +20 -15
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +114 -0
- package/dist/next/Select/Select2.js +8 -0
- package/dist/next/Select/SelectButton.js +46 -0
- package/dist/next/Select/SelectContext.js +16 -0
- package/dist/next/Select/SelectItem.js +46 -0
- package/dist/next/Select/SelectPane.js +43 -0
- package/dist/next/Select/SelectedItems.js +45 -0
- package/dist/next/Select/SubSelect.js +90 -0
- package/dist/next/Select/constants.js +13 -0
- package/dist/next/Select/index.js +5 -0
- 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/index.d.ts +54 -6
- package/dist/next/index.es.js +6 -0
- package/dist/next/index.js +680 -255
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/next/package.json +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import React__default, { useMemo } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import '../Menu/index.js';
|
|
5
|
+
import useSelectContext from './SelectContext.js';
|
|
6
|
+
import styles from './Select2.js';
|
|
7
|
+
import '../../utils/index.js';
|
|
8
|
+
import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
9
|
+
import MenuButton from '../Menu/MenuButton.js';
|
|
10
|
+
|
|
11
|
+
const SelectButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
asChild,
|
|
15
|
+
placeholder: externalPlaceholder,
|
|
16
|
+
...rest
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selectedSelectItems,
|
|
20
|
+
isInvalid,
|
|
21
|
+
multiselect
|
|
22
|
+
} = useSelectContext();
|
|
23
|
+
const {
|
|
24
|
+
translate
|
|
25
|
+
} = useTranslation();
|
|
26
|
+
const placeholder = externalPlaceholder !== null && externalPlaceholder !== void 0 ? externalPlaceholder : multiselect ? translate('selectOneOrMore') : translate('selectOne');
|
|
27
|
+
const selectedItemsString = useMemo(() => Array.from(selectedSelectItems)
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
+
.map(_ref2 => {
|
|
30
|
+
let [value, label] = _ref2;
|
|
31
|
+
return label;
|
|
32
|
+
}).join(', '), [selectedSelectItems]);
|
|
33
|
+
const sharedMenuButtonProps = {
|
|
34
|
+
ref,
|
|
35
|
+
asChild
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/React__default.createElement(MenuButton, _extends({}, rest, sharedMenuButtonProps, {
|
|
38
|
+
"aria-haspopup": "tree",
|
|
39
|
+
role: "combobox",
|
|
40
|
+
className: classNames({
|
|
41
|
+
[styles.isInvalid]: isInvalid
|
|
42
|
+
})
|
|
43
|
+
}), children !== null && children !== void 0 ? children : selectedSelectItems !== null && selectedSelectItems !== void 0 && selectedSelectItems.size ? selectedItemsString : placeholder);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { SelectButton as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../../utils/index.js';
|
|
2
|
+
import createContextUtilities from '../../utils/createContextUtilities/createContextUtilities.js';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
Provider: SelectContextProvider,
|
|
6
|
+
useContext
|
|
7
|
+
} = createContextUtilities(null);
|
|
8
|
+
function useSelectContext(isOptional) {
|
|
9
|
+
const context = useContext();
|
|
10
|
+
if (!isOptional && !context) {
|
|
11
|
+
throw Error('useContext must be called inside a provider or be initialized with a default value');
|
|
12
|
+
}
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SelectContextProvider, useSelectContext as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import '../Menu/index.js';
|
|
5
|
+
import useSelectContext from './SelectContext.js';
|
|
6
|
+
import AdvancedTableCheckbox from '../AdvancedTable/AdvancedTableCheckbox.js';
|
|
7
|
+
import styles from './Select2.js';
|
|
8
|
+
import MenuItem from '../Menu/MenuItem.js';
|
|
9
|
+
|
|
10
|
+
const SelectItem = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
11
|
+
let {
|
|
12
|
+
isDisabled,
|
|
13
|
+
label,
|
|
14
|
+
value,
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
19
|
+
const {
|
|
20
|
+
multiselect,
|
|
21
|
+
selectedSelectItems,
|
|
22
|
+
onItemSelect
|
|
23
|
+
} = useSelectContext();
|
|
24
|
+
const isSelected = selectedSelectItems.has(value);
|
|
25
|
+
const sharedMenuItemProps = {
|
|
26
|
+
ref,
|
|
27
|
+
label,
|
|
28
|
+
isDisabled
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/React__default.createElement(MenuItem, _extends({}, rest, sharedMenuItemProps, {
|
|
31
|
+
className: classNames(className, {
|
|
32
|
+
[styles.selectedItem]: isSelected
|
|
33
|
+
}),
|
|
34
|
+
asChild: true,
|
|
35
|
+
onSelect: () => onItemSelect === null || onItemSelect === void 0 ? void 0 : onItemSelect(value, !isSelected)
|
|
36
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
37
|
+
"aria-selected": isSelected,
|
|
38
|
+
role: "treeitem"
|
|
39
|
+
}, multiselect ? /*#__PURE__*/React__default.createElement(AdvancedTableCheckbox, {
|
|
40
|
+
state: isSelected ? 'true' : 'false',
|
|
41
|
+
className: styles.checkbox,
|
|
42
|
+
isDisabled: isDisabled
|
|
43
|
+
}) : null, children !== null && children !== void 0 ? children : label));
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { SelectItem as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import '../Menu/index.js';
|
|
4
|
+
import useSelectContext, { SelectContextProvider } from './SelectContext.js';
|
|
5
|
+
import MenuPane from '../Menu/MenuPane.js';
|
|
6
|
+
|
|
7
|
+
const SelectPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
8
|
+
let {
|
|
9
|
+
children,
|
|
10
|
+
isSearchable,
|
|
11
|
+
placement,
|
|
12
|
+
showSelectedItemsPane = false,
|
|
13
|
+
searchValue,
|
|
14
|
+
onSearchValueChange,
|
|
15
|
+
isSearchFilteringDisabled,
|
|
16
|
+
zIndex,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
19
|
+
const selectContext = useSelectContext();
|
|
20
|
+
const {
|
|
21
|
+
multiselect
|
|
22
|
+
} = selectContext;
|
|
23
|
+
const sharedMenuProps = {
|
|
24
|
+
placement,
|
|
25
|
+
isSearchable,
|
|
26
|
+
searchValue,
|
|
27
|
+
onSearchValueChange,
|
|
28
|
+
isSearchFilteringDisabled,
|
|
29
|
+
zIndex,
|
|
30
|
+
ref
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/React__default.createElement(SelectContextProvider, {
|
|
33
|
+
value: {
|
|
34
|
+
...selectContext,
|
|
35
|
+
showSelectedItemsPane
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/React__default.createElement(MenuPane, _extends({}, rest, sharedMenuProps, {
|
|
38
|
+
"aria-multiselectable": Boolean(multiselect),
|
|
39
|
+
role: "tree"
|
|
40
|
+
}), children));
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { SelectPane as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
|
+
import SubSelect from './SubSelect.js';
|
|
3
|
+
import SelectItem from './SelectItem.js';
|
|
4
|
+
import useSelectContext, { SelectContextProvider } from './SelectContext.js';
|
|
5
|
+
import '../../utils/index.js';
|
|
6
|
+
import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
7
|
+
|
|
8
|
+
const SelectedItems = () => {
|
|
9
|
+
const selectContext = useSelectContext();
|
|
10
|
+
const {
|
|
11
|
+
selectedSelectItems,
|
|
12
|
+
enabledSelectItems
|
|
13
|
+
} = selectContext;
|
|
14
|
+
const [displayedItems, setDisplayedItems] = useState(selectedSelectItems);
|
|
15
|
+
const [open, setOpen] = useState(false);
|
|
16
|
+
const {
|
|
17
|
+
translate
|
|
18
|
+
} = useTranslation();
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (open) {
|
|
21
|
+
setDisplayedItems(selectedSelectItems);
|
|
22
|
+
}
|
|
23
|
+
// Display items should only update on open
|
|
24
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
|
+
}, [open]);
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(SelectContextProvider, {
|
|
27
|
+
value: {
|
|
28
|
+
...selectContext,
|
|
29
|
+
isSelectedItems: true
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/React__default.createElement(SubSelect, {
|
|
32
|
+
onIsOpenChange: setOpen,
|
|
33
|
+
label: translate('selectedItems')
|
|
34
|
+
}, Array.from(displayedItems, _ref => {
|
|
35
|
+
let [value, label] = _ref;
|
|
36
|
+
return /*#__PURE__*/React__default.createElement(SelectItem, {
|
|
37
|
+
label: label,
|
|
38
|
+
key: value,
|
|
39
|
+
value: value,
|
|
40
|
+
isDisabled: !enabledSelectItems.has(value)
|
|
41
|
+
});
|
|
42
|
+
})));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { SelectedItems as default };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React__default, { useMemo } from 'react';
|
|
2
|
+
import '../../hooks/index.js';
|
|
3
|
+
import '../Menu/index.js';
|
|
4
|
+
import useSelectContext, { SelectContextProvider } from './SelectContext.js';
|
|
5
|
+
import useId from '../../hooks/useId/useId.js';
|
|
6
|
+
import SubMenu from '../Menu/SubMenu.js';
|
|
7
|
+
|
|
8
|
+
const SubSelect = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
9
|
+
let {
|
|
10
|
+
label,
|
|
11
|
+
onIsOpenChange,
|
|
12
|
+
children,
|
|
13
|
+
isDisabled,
|
|
14
|
+
...rest
|
|
15
|
+
} = _ref;
|
|
16
|
+
const paneId = useId();
|
|
17
|
+
const selectContext = useSelectContext();
|
|
18
|
+
const {
|
|
19
|
+
selectedValues,
|
|
20
|
+
GetSelectItemsFrom,
|
|
21
|
+
setSelectedValues
|
|
22
|
+
} = selectContext;
|
|
23
|
+
const allSelectItemChildren = useMemo(() => {
|
|
24
|
+
var _GetSelectItemsFrom;
|
|
25
|
+
return (_GetSelectItemsFrom = GetSelectItemsFrom === null || GetSelectItemsFrom === void 0 ? void 0 : GetSelectItemsFrom(children)) !== null && _GetSelectItemsFrom !== void 0 ? _GetSelectItemsFrom : [];
|
|
26
|
+
}, [children, GetSelectItemsFrom]);
|
|
27
|
+
const checkedState = useMemo(() => {
|
|
28
|
+
const selectedChildCount = allSelectItemChildren.filter(_ref2 => {
|
|
29
|
+
let [value] = _ref2;
|
|
30
|
+
return Array.isArray(selectedValues) ? selectedValues.includes(value) : selectedValues === value;
|
|
31
|
+
}).length;
|
|
32
|
+
const childCount = allSelectItemChildren.length;
|
|
33
|
+
let result = 'mixed';
|
|
34
|
+
if (selectedChildCount === childCount) {
|
|
35
|
+
result = 'true';
|
|
36
|
+
} else if (selectedChildCount === 0) {
|
|
37
|
+
result = 'false';
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}, [allSelectItemChildren, selectedValues]);
|
|
41
|
+
const onTriggerCheckboxSelect = e => {
|
|
42
|
+
if (isDisabled) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
46
|
+
setSelectedValues === null || setSelectedValues === void 0 ? void 0 : setSelectedValues(previouslySelectedValues => {
|
|
47
|
+
// exclude duplicates
|
|
48
|
+
const prevSet = new Set(previouslySelectedValues);
|
|
49
|
+
if (checkedState === 'true') {
|
|
50
|
+
allSelectItemChildren.forEach(_ref3 => {
|
|
51
|
+
let [value] = _ref3;
|
|
52
|
+
return prevSet.delete(value);
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
allSelectItemChildren.forEach(_ref4 => {
|
|
56
|
+
let [value] = _ref4;
|
|
57
|
+
return prevSet.add(value);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return Array.from(prevSet);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const subSelectPaneProps = {
|
|
64
|
+
role: 'group',
|
|
65
|
+
id: paneId
|
|
66
|
+
};
|
|
67
|
+
const subSelectTriggerProps = {
|
|
68
|
+
role: 'treeitem',
|
|
69
|
+
'aria-haspopup': undefined,
|
|
70
|
+
'aria-owns': paneId
|
|
71
|
+
};
|
|
72
|
+
const sharedSubMenuProps = {
|
|
73
|
+
...rest,
|
|
74
|
+
isDisabled,
|
|
75
|
+
onIsOpenChange,
|
|
76
|
+
label,
|
|
77
|
+
ref
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/React__default.createElement(SelectContextProvider, {
|
|
80
|
+
value: {
|
|
81
|
+
...selectContext,
|
|
82
|
+
subSelectTriggerProps,
|
|
83
|
+
subSelectPaneProps,
|
|
84
|
+
triggerCheckedState: checkedState,
|
|
85
|
+
onTriggerCheckboxSelect
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/React__default.createElement(SubMenu, sharedSubMenuProps, children));
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export { SubSelect as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
const DATA_TESTID_SUFFIXES = {
|
|
3
|
+
SELECT_PANE: 'selectpane',
|
|
4
|
+
SELECT_ITEM: 'selectitem',
|
|
5
|
+
SELECT_BUTTON: 'selectbutton',
|
|
6
|
+
SELECT_SEARCH: 'selectsearch',
|
|
7
|
+
SELECT_BACK: 'selectback'
|
|
8
|
+
};
|
|
9
|
+
const KEYS = {
|
|
10
|
+
CHECK_PARENT: [' ']
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { DATA_TESTID_SUFFIXES, KEYS };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Select } from './Select.js';
|
|
2
|
+
export { default as SelectButton } from './SelectButton.js';
|
|
3
|
+
export { default as SelectItem } from './SelectItem.js';
|
|
4
|
+
export { default as SelectPane } from './SelectPane.js';
|
|
5
|
+
export { default as SubSelect } from './SubSelect.js';
|
|
@@ -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 = "._Rx-nX{display:flex}._Lj2Kf{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Lj2Kf._wfCKt{background-color:#fff}._Lj2Kf._t6cU0,._Lj2Kf._wfCKt._fIYt0.focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._fIYt0:focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._l-E8K:not(._Lj2Kf._wfCKt._WnhfG){background-color:#0b6ed0}._Lj2Kf._t6cU0._aqQ3G._fIYt0,._Lj2Kf._t6cU0._aqQ3G._WnhfG,._Lj2Kf._t6cU0._WnhfG._l-E8K{opacity:.4}._fH7iP{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._fH7iP:focus{z-index:1}._akwM4{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}._akwM4 svg{margin-left:1px}._akwM4._wfCKt{background-color:#0b6ed0;border-color:transparent}._akwM4._wfCKt svg{fill:#fff!important}._akwM4._wfCKt:not(._IFhBg):hover{background-color:#085caf!important}._akwM4._wfCKt:not(._IFhBg):active{background-color:#0854a1!important}._akwM4._wfCKt._IFhBg{opacity:.4}._akwM4._wfCKt._IFhBg svg{background-color:transparent}._akwM4._t6cU0{border-color:#0b6ed0;background-color:#fff}._akwM4._t6cU0 svg{fill:#0b6ed0!important}._akwM4._t6cU0:not(._IFhBg):hover{background-color:#eef5fc!important}._akwM4._t6cU0:not(._IFhBg):active{background-color:#e1edf9!important}._akwM4._t6cU0._IFhBg{opacity:.4}._akwM4._t6cU0._IFhBg svg{background-color:transparent}._xmOTE{width:260px}";
|
|
4
|
+
var styles = {"container":"_Rx-nX","divider":"_Lj2Kf","primary":"_wfCKt","mainButtonFocus":"_fIYt0","mainButtonDisabled":"_aqQ3G","dropdownButtonFocus":"_l-E8K","dropdownButtonDisabled":"_WnhfG","secondary":"_t6cU0","mainButton":"_fH7iP","dropdownButton":"_akwM4","disabled":"_IFhBg","dropdownOption":"_xmOTE"};
|
|
5
|
+
var stylesheet="._Rx-nX{display:flex}._Lj2Kf{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Lj2Kf._wfCKt{background-color:#fff}._Lj2Kf._t6cU0,._Lj2Kf._wfCKt._fIYt0.focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._fIYt0:focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._l-E8K:not(._Lj2Kf._wfCKt._WnhfG){background-color:#0b6ed0}._Lj2Kf._t6cU0._aqQ3G._fIYt0,._Lj2Kf._t6cU0._aqQ3G._WnhfG,._Lj2Kf._t6cU0._WnhfG._l-E8K{opacity:.4}._fH7iP{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._fH7iP:focus{z-index:1}._akwM4{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}._akwM4 svg{margin-left:1px}._akwM4._wfCKt{background-color:#0b6ed0;border-color:transparent}._akwM4._wfCKt svg{fill:#fff!important}._akwM4._wfCKt:not(._IFhBg):hover{background-color:#085caf!important}._akwM4._wfCKt:not(._IFhBg):active{background-color:#0854a1!important}._akwM4._wfCKt._IFhBg{opacity:.4}._akwM4._wfCKt._IFhBg svg{background-color:transparent}._akwM4._t6cU0{border-color:#0b6ed0;background-color:#fff}._akwM4._t6cU0 svg{fill:#0b6ed0!important}._akwM4._t6cU0:not(._IFhBg):hover{background-color:#eef5fc!important}._akwM4._t6cU0:not(._IFhBg):active{background-color:#e1edf9!important}._akwM4._t6cU0._IFhBg{opacity:.4}._akwM4._t6cU0._IFhBg svg{background-color:transparent}._xmOTE{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 = {"container":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._tj3Tz{display:inline-block;position:relative}._P0pTZ{width:120px}._P0pTZ ._XPm26._yLNq9{transform:rotate(-180deg)}._P0pTZ ._XPm26._Idv3I{fill:#9d9fa1;opacity:.4}._jULQ9>input:focus{box-shadow:none!important;border:1px solid #898989!important}._LsyFE{width:120px}._LsyFE ._mQutK._iZ18k{background-color:#efefef;border-radius:6px}._XPm26{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._XPm26._yLNq9{transform:rotate(-180deg)}";
|
|
4
|
+
var styles = {"container":"_tj3Tz","input":"_P0pTZ","icon":"_XPm26","open":"_yLNq9","disabled":"_Idv3I","ignoreFocusStyle":"_jULQ9","flyout":"_LsyFE","option":"_mQutK","exactMatch":"_iZ18k"};
|
|
5
|
+
var stylesheet="._tj3Tz{display:inline-block;position:relative}._P0pTZ{width:120px}._P0pTZ ._XPm26._yLNq9{transform:rotate(-180deg)}._P0pTZ ._XPm26._Idv3I{fill:#9d9fa1;opacity:.4}._jULQ9>input:focus{box-shadow:none!important;border:1px solid #898989!important}._LsyFE{width:120px}._LsyFE ._mQutK._iZ18k{background-color:#efefef;border-radius:6px}._XPm26{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._XPm26._yLNq9{transform:rotate(-180deg)}";
|
|
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 = "._SnG6G{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._rs9TA{background-color:rgba(50,54,58,.08)}._mBMUt{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._GZn0Z{color:rgba(81,85,89,.4);cursor:not-allowed}._ARYwQ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5If1u{color:#085caf;border-color:#085caf}._5If1u,._VuxSy{background:rgba(11,110,208,.11)}._VuxSy{color:#0854a1;border-color:#0854a1}._-SYON{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8{position:relative;display:inline-grid}._74zS8 svg{fill:currentColor}._74zS8 ._8FfBe{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._74zS8 ._8FfBe+._5Y8EE{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}._74zS8 ._8FfBe+._5Y8EE._D-3ES{padding:5px;max-width:36px;min-width:36px}._74zS8 ._8FfBe+._5Y8EE._xfWAi{padding:0 16px}._74zS8 ._8FfBe+._5Y8EE._H1iXr{padding:0 16px 0 12px}._74zS8 ._8FfBe:hover+._5Y8EE{background-color:rgba(50,54,58,.08)}._74zS8 ._8FfBe:disabled+._5Y8EE{color:rgba(81,85,89,.4);cursor:not-allowed}._74zS8 ._8FfBe:active+._5Y8EE,._74zS8 ._8FfBe:focus:active+._5Y8EE{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._74zS8 ._8FfBe:checked+._5Y8EE{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._74zS8 ._8FfBe:checked:hover+._5Y8EE{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._74zS8 ._8FfBe:checked:disabled+._5Y8EE{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8 ._8FfBe:checked:active+._5Y8EE,._74zS8 ._8FfBe:checked:focus:active+._5Y8EE{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._4jKRF{display:inline-flex;position:relative}._4jKRF:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._4jKRF>*{flex-shrink:0;flex-grow:0}._XowPj{border:none;margin:0;padding:0}._XowPj legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._74zS8 ._8FfBe.focus-visible+._5Y8EE,._74zS8 ._8FfBe:focus-visible+._5Y8EE{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"default":"_SnG6G","hovered":"_rs9TA","pressed":"_mBMUt","disabled":"_GZn0Z","selectedDefault":"_ARYwQ","selectedHovered":"_5If1u","selectedPressed":"_VuxSy","selectedDisabled":"_-SYON","toggleContainer":"_74zS8","toggleInput":"_8FfBe","toggleButton":"_5Y8EE","iconOnly":"_D-3ES","text":"_xfWAi","iconText":"_H1iXr","toggleButtonGroup":"_4jKRF","toggleButtonGroupFieldset":"_XowPj"};
|
|
5
|
+
var stylesheet="._SnG6G{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._rs9TA{background-color:rgba(50,54,58,.08)}._mBMUt{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._GZn0Z{color:rgba(81,85,89,.4);cursor:not-allowed}._ARYwQ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5If1u{color:#085caf;border-color:#085caf}._5If1u,._VuxSy{background:rgba(11,110,208,.11)}._VuxSy{color:#0854a1;border-color:#0854a1}._-SYON{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8{position:relative;display:inline-grid}._74zS8 svg{fill:currentColor}._74zS8 ._8FfBe{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._74zS8 ._8FfBe+._5Y8EE{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}._74zS8 ._8FfBe+._5Y8EE._D-3ES{padding:5px;max-width:36px;min-width:36px}._74zS8 ._8FfBe+._5Y8EE._xfWAi{padding:0 16px}._74zS8 ._8FfBe+._5Y8EE._H1iXr{padding:0 16px 0 12px}._74zS8 ._8FfBe:hover+._5Y8EE{background-color:rgba(50,54,58,.08)}._74zS8 ._8FfBe:disabled+._5Y8EE{color:rgba(81,85,89,.4);cursor:not-allowed}._74zS8 ._8FfBe:active+._5Y8EE,._74zS8 ._8FfBe:focus:active+._5Y8EE{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._74zS8 ._8FfBe:checked+._5Y8EE{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._74zS8 ._8FfBe:checked:hover+._5Y8EE{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._74zS8 ._8FfBe:checked:disabled+._5Y8EE{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8 ._8FfBe:checked:active+._5Y8EE,._74zS8 ._8FfBe:checked:focus:active+._5Y8EE{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._4jKRF{display:inline-flex;position:relative}._4jKRF:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._4jKRF>*{flex-shrink:0;flex-grow:0}._XowPj{border:none;margin:0;padding:0}._XowPj legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._74zS8 ._8FfBe.focus-visible+._5Y8EE,._74zS8 ._8FfBe:focus-visible+._5Y8EE{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 };
|
package/dist/next/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { AllHTMLAttributes } from 'react';
|
|
4
4
|
import type { ChangeEvent } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import { ComputedPlacement } from '@popperjs/core';
|
|
6
6
|
import { CountryCode } from 'libphonenumber-js';
|
|
7
7
|
import { CSSProperties } from 'react';
|
|
8
8
|
import { E164Number } from 'libphonenumber-js';
|
|
@@ -13,7 +13,6 @@ import { MouseEvent as MouseEvent_2 } from 'react';
|
|
|
13
13
|
import { MouseEventHandler } from 'react';
|
|
14
14
|
import { MutableRefObject } from 'react';
|
|
15
15
|
import { default as React_2 } from 'react';
|
|
16
|
-
import { ReactElement } from 'react';
|
|
17
16
|
import { ReactNode } from 'react';
|
|
18
17
|
|
|
19
18
|
export declare const AdvancedTable: React_2.FunctionComponent<AdvancedTableProps>;
|
|
@@ -171,7 +170,7 @@ export declare interface CollapsibleSearchInputProps {
|
|
|
171
170
|
'data-testid'?: string;
|
|
172
171
|
}
|
|
173
172
|
|
|
174
|
-
export declare function Combobox({ initialValue, value, onChange, isDisabled, isInvalid, isRequired, isLoading, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps):
|
|
173
|
+
export declare function Combobox({ initialValue, value, onChange, isDisabled, isInvalid, isRequired, isLoading, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps): JSX.Element;
|
|
175
174
|
|
|
176
175
|
export declare const ComboboxFlyout: FunctionComponent<ComboboxFlyoutProps>;
|
|
177
176
|
|
|
@@ -182,7 +181,7 @@ export declare interface ComboboxFlyoutProps {
|
|
|
182
181
|
children?: ReactNode;
|
|
183
182
|
}
|
|
184
183
|
|
|
185
|
-
export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps):
|
|
184
|
+
export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps): JSX.Element;
|
|
186
185
|
|
|
187
186
|
export declare interface ComboboxGroupProps {
|
|
188
187
|
label: string;
|
|
@@ -203,7 +202,7 @@ export declare interface ComboboxInputProps {
|
|
|
203
202
|
'aria-describedby'?: string;
|
|
204
203
|
}
|
|
205
204
|
|
|
206
|
-
export declare function ComboboxOption({ label
|
|
205
|
+
export declare function ComboboxOption({ label }: ComboboxOptionProps): JSX.Element | null;
|
|
207
206
|
|
|
208
207
|
export declare interface ComboboxOptionProps {
|
|
209
208
|
label: string;
|
|
@@ -295,7 +294,7 @@ export declare interface InputProps extends InputHTMLAttributes<HTMLInputElement
|
|
|
295
294
|
style?: CSSProperties;
|
|
296
295
|
}
|
|
297
296
|
|
|
298
|
-
export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) =>
|
|
297
|
+
export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) => JSX.Element;
|
|
299
298
|
|
|
300
299
|
export declare const MenuButton: React_2.ForwardRefExoticComponent<MenuButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
301
300
|
|
|
@@ -354,6 +353,47 @@ export declare interface PhoneNumberInputProps {
|
|
|
354
353
|
|
|
355
354
|
declare type RenderCellContent = AdvancedTableColumnConfig['renderCellContent'];
|
|
356
355
|
|
|
356
|
+
export declare const Select: ({ multiselect, children, isDisabled, onChange, isOpen, onIsOpenChange, value, isInvalid, "data-testid": dataTestId, }: SelectProps) => JSX.Element;
|
|
357
|
+
|
|
358
|
+
export declare const SelectButton: React_2.ForwardRefExoticComponent<SelectButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
359
|
+
|
|
360
|
+
export declare interface SelectButtonProps extends AllHTMLAttributes<HTMLButtonElement> {
|
|
361
|
+
asChild?: boolean;
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export declare const SelectItem: React_2.ForwardRefExoticComponent<SelectItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
366
|
+
|
|
367
|
+
export declare interface SelectItemProps extends AllHTMLAttributes<HTMLDivElement> {
|
|
368
|
+
isDisabled?: boolean;
|
|
369
|
+
label: string;
|
|
370
|
+
value: string | number;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export declare const SelectPane: React_2.ForwardRefExoticComponent<SelectPaneProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
374
|
+
|
|
375
|
+
export declare interface SelectPaneProps extends AllHTMLAttributes<HTMLDivElement> {
|
|
376
|
+
placement?: ComputedPlacement;
|
|
377
|
+
isSearchable?: boolean;
|
|
378
|
+
searchValue?: string;
|
|
379
|
+
onSearchValueChange?: (newValue: string) => void;
|
|
380
|
+
isSearchFilteringDisabled?: boolean;
|
|
381
|
+
showSelectedItemsPane?: boolean;
|
|
382
|
+
zIndex?: number;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export declare interface SelectProps {
|
|
386
|
+
multiselect?: boolean;
|
|
387
|
+
'data-testid'?: string;
|
|
388
|
+
isOpen?: boolean;
|
|
389
|
+
onIsOpenChange?: (shouldOpen: boolean) => void;
|
|
390
|
+
isDisabled?: boolean;
|
|
391
|
+
onChange?: (value: string | number | (string | number)[]) => void;
|
|
392
|
+
value?: string | number | (string | number)[];
|
|
393
|
+
isInvalid?: boolean;
|
|
394
|
+
children: React_2.ReactNode;
|
|
395
|
+
}
|
|
396
|
+
|
|
357
397
|
export declare const SplitButton: React_2.ForwardRefExoticComponent<SplitButtonProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
358
398
|
|
|
359
399
|
export declare const SplitButtonOption: React_2.ForwardRefExoticComponent<SplitButtonOptionProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -409,6 +449,14 @@ export declare interface SubMenuProps extends Omit<AllHTMLAttributes<HTMLDivElem
|
|
|
409
449
|
onIsOpenChange?: (isOpen: boolean) => void;
|
|
410
450
|
}
|
|
411
451
|
|
|
452
|
+
export declare const SubSelect: React_2.ForwardRefExoticComponent<SubSelectProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
453
|
+
|
|
454
|
+
export declare interface SubSelectProps extends Omit<SelectPaneProps, 'label' | 'placement' | 'showSelectedItemsPane'> {
|
|
455
|
+
label?: string | React_2.ReactNode;
|
|
456
|
+
isDisabled?: boolean;
|
|
457
|
+
onIsOpenChange?: (isOpen: boolean) => void;
|
|
458
|
+
}
|
|
459
|
+
|
|
412
460
|
declare interface Time {
|
|
413
461
|
hour: number;
|
|
414
462
|
minute: number;
|
package/dist/next/index.es.js
CHANGED
|
@@ -10,6 +10,7 @@ import './Drawer/index.js';
|
|
|
10
10
|
import './TimePicker/index.js';
|
|
11
11
|
import './ToggleButton/index.js';
|
|
12
12
|
import './Stack/index.js';
|
|
13
|
+
import './Select/index.js';
|
|
13
14
|
export { AdvancedTable } from './AdvancedTable/AdvancedTable.js';
|
|
14
15
|
export { default as CollapsibleSearchInput } from './CollapsibleSearchInput/CollapsibleSearchInput.js';
|
|
15
16
|
export { default as Input } from './Input/Input.js';
|
|
@@ -34,5 +35,10 @@ export { default as ToggleButton } from './ToggleButton/ToggleButton.js';
|
|
|
34
35
|
export { VStack } from './Stack/VStack.js';
|
|
35
36
|
export { HStack } from './Stack/HStack.js';
|
|
36
37
|
export { StackItem } from './Stack/StackItem.js';
|
|
38
|
+
export { default as Select } from './Select/Select.js';
|
|
39
|
+
export { default as SelectButton } from './Select/SelectButton.js';
|
|
40
|
+
export { default as SelectItem } from './Select/SelectItem.js';
|
|
41
|
+
export { default as SelectPane } from './Select/SelectPane.js';
|
|
42
|
+
export { default as SubSelect } from './Select/SubSelect.js';
|
|
37
43
|
|
|
38
44
|
/* eslint-disable camelcase */
|