@salutejs/plasma-hope 1.372.1-next-sbcom.0 → 1.373.0-dev.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/collectPackageInfo.js +2 -2
- package/components/AudioPlayer/AudioPlayer.component-test.js +5 -5
- package/components/AudioPlayer/AudioPlayer.js +9 -10
- package/components/AudioPlayer/utils.js +4 -4
- package/components/Badge/Badge.js +2 -3
- package/components/Button/Button.js +3 -4
- package/components/Button/views/b2c/ButtonB2C.js +4 -4
- package/components/Button/views/web/ButtonWeb.js +7 -7
- package/components/Card/Card.js +2 -3
- package/components/Card/CardBadge.js +2 -2
- package/components/Card/CardBody.js +2 -2
- package/components/Card/CardContent.js +2 -3
- package/components/Cell/Cell.js +5 -5
- package/components/Dropdown/Dropdown.component-test.js +11 -11
- package/components/Dropdown/Dropdown.js +11 -12
- package/components/Dropdown/DropdownItem.js +6 -7
- package/components/Dropdown/DropdownList.js +2 -3
- package/components/Dropdown/DropdownMenu.js +5 -5
- package/components/Dropdown/DropdownPopup.js +9 -10
- package/components/Dropdown/DropdownUncontrolled.js +5 -6
- package/components/Dropdown/keyboardNavigation/useSearchString.js +4 -4
- package/components/Dropdown/keyboardNavigation/utils.js +5 -5
- package/components/Dropdown/withAssistiveDropdown.js +9 -10
- package/components/Editable/Editable.component-test.js +2 -2
- package/components/Editable/Editable.js +10 -11
- package/components/ElasticGrid/ElasticGrid.component-test.js +4 -4
- package/components/ElasticGrid/ElasticGrid.js +11 -12
- package/components/List/List.js +2 -2
- package/components/List/ListItem.js +2 -2
- package/components/Modal/Modal.js +13 -14
- package/components/Modal/ModalView.js +6 -6
- package/components/Modal/ModalsContext.js +6 -7
- package/components/PaginationDots/PaginationDot.js +2 -3
- package/components/PaginationDots/PaginationDots.js +2 -2
- package/components/PaginationDots/SmartPaginationDots.js +4 -4
- package/components/PreviewGallery/PreviewGallery.component-test.js +13 -13
- package/components/PreviewGallery/PreviewGallery.js +9 -10
- package/components/PreviewGallery/PreviewGalleryItemBase.js +3 -4
- package/components/PreviewGallery/PreviewGalleryItemError.js +4 -5
- package/components/PreviewGallery/PreviewGalleryItemWithTooltip.js +9 -10
- package/components/PreviewGallery/PreviewGalleryItems.js +7 -8
- package/components/PreviewGallery/utils.js +6 -6
- package/components/Price/Price.js +2 -2
- package/components/Select/Select.js +5 -6
- package/components/Select/Select.utils.js +8 -8
- package/components/Select/SelectButton.js +6 -7
- package/components/Select/SelectDropdown.js +2 -2
- package/components/Select/SelectGroup.js +2 -2
- package/components/Select/SelectView.js +3 -4
- package/components/Select/views/b2c/SelectView.js +7 -8
- package/components/Select/views/web/SelectView.js +7 -8
- package/components/Select/withMultiSelect.js +5 -6
- package/components/Select/withSingleSelect.js +5 -6
- package/components/Slider/Slider.js +2 -2
- package/components/Switch/Switch.js +2 -2
- package/components/TextField/TextField.js +5 -6
- package/components/TextField/views/b2c/Caption.js +3 -3
- package/components/TextField/views/b2c/Content.js +2 -2
- package/components/TextField/views/b2c/Field.js +2 -3
- package/components/TextField/views/b2c/Input.js +2 -2
- package/components/TextField/views/b2c/Placeholder.js +2 -2
- package/components/TextField/views/b2c/TextFieldB2C.js +5 -6
- package/components/TextField/views/web/Field.js +6 -6
- package/components/TextField/views/web/Input.js +6 -7
- package/components/TextField/views/web/TextFieldWeb.js +5 -6
- package/components/Tooltip/Tooltip.js +10 -11
- package/components/Typography/Headline/index.js +5 -5
- package/components/Typography/Subtitle/index.js +4 -4
- package/components/Upload/Upload.component-test.js +4 -4
- package/components/Upload/Upload.js +4 -4
- package/components/Upload/UploadButton.js +10 -11
- package/components/Upload/UploadMessage.js +2 -2
- package/components/Upload/UploadProgress.js +3 -3
- package/components/Upload/UploadRoot.js +2 -2
- package/components/UploadAudio/UploadAudio.component-test.js +2 -2
- package/components/UploadAudio/UploadAudio.js +5 -5
- package/components/UploadVisual/UploadVisual.component-test.js +2 -2
- package/components/UploadVisual/UploadVisual.js +7 -8
- package/es/components/AudioPlayer/AudioPlayer.component-test.js +3 -3
- package/es/components/AudioPlayer/AudioPlayer.js +6 -6
- package/es/components/AudioPlayer/utils.js +4 -4
- package/es/components/Button/Button.js +1 -1
- package/es/components/Button/views/b2c/ButtonB2C.js +2 -2
- package/es/components/Button/views/web/ButtonWeb.js +5 -5
- package/es/components/Cell/Cell.js +2 -2
- package/es/components/Dropdown/Dropdown.component-test.js +9 -9
- package/es/components/Dropdown/Dropdown.js +7 -7
- package/es/components/Dropdown/DropdownItem.js +3 -3
- package/es/components/Dropdown/DropdownMenu.js +3 -3
- package/es/components/Dropdown/DropdownPopup.js +6 -6
- package/es/components/Dropdown/DropdownUncontrolled.js +3 -3
- package/es/components/Dropdown/keyboardNavigation/useSearchString.js +4 -4
- package/es/components/Dropdown/keyboardNavigation/utils.js +5 -5
- package/es/components/Dropdown/withAssistiveDropdown.js +7 -7
- package/es/components/Editable/Editable.js +6 -6
- package/es/components/ElasticGrid/ElasticGrid.component-test.js +1 -1
- package/es/components/ElasticGrid/ElasticGrid.js +7 -7
- package/es/components/Modal/Modal.js +8 -8
- package/es/components/Modal/ModalView.js +3 -3
- package/es/components/Modal/ModalsContext.js +4 -4
- package/es/components/PaginationDots/SmartPaginationDots.js +2 -2
- package/es/components/PreviewGallery/PreviewGallery.component-test.js +11 -11
- package/es/components/PreviewGallery/PreviewGallery.js +7 -7
- package/es/components/PreviewGallery/PreviewGalleryItemWithTooltip.js +5 -5
- package/es/components/PreviewGallery/PreviewGalleryItems.js +4 -4
- package/es/components/PreviewGallery/utils.js +6 -6
- package/es/components/Select/Select.js +1 -1
- package/es/components/Select/Select.utils.js +8 -8
- package/es/components/Select/SelectButton.js +3 -3
- package/es/components/Select/SelectView.js +1 -1
- package/es/components/Select/views/b2c/SelectView.js +3 -3
- package/es/components/Select/views/web/SelectView.js +3 -3
- package/es/components/Select/withMultiSelect.js +3 -3
- package/es/components/Select/withSingleSelect.js +3 -3
- package/es/components/TextField/TextField.js +3 -3
- package/es/components/TextField/views/b2c/TextFieldB2C.js +3 -3
- package/es/components/TextField/views/web/Field.js +3 -3
- package/es/components/TextField/views/web/Input.js +3 -3
- package/es/components/TextField/views/web/TextFieldWeb.js +3 -3
- package/es/components/Tooltip/Tooltip.js +7 -7
- package/es/components/Typography/Headline/index.js +3 -3
- package/es/components/Typography/Subtitle/index.js +2 -2
- package/es/components/Upload/Upload.component-test.js +2 -2
- package/es/components/Upload/Upload.js +2 -2
- package/es/components/Upload/UploadButton.js +7 -7
- package/es/components/UploadAudio/UploadAudio.js +2 -2
- package/es/components/UploadVisual/UploadVisual.js +3 -3
- package/package.json +29 -32
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UploadMessage = void 0;
|
|
7
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault(
|
|
7
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("styled-components"));
|
|
8
8
|
var _Typography = /*#__PURE__*/require("../Typography");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var statuses = {
|
|
11
11
|
error: {
|
|
12
12
|
color: 'var(--text-negative)'
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.UploadProgress = void 0;
|
|
7
7
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
|
8
|
-
var _react = /*#__PURE__*/_interopRequireDefault(
|
|
9
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault(
|
|
8
|
+
var _react = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("react"));
|
|
9
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("styled-components"));
|
|
10
10
|
var _collectPackageInfo = /*#__PURE__*/require("../../collectPackageInfo");
|
|
11
11
|
var _StyledSpinner;
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
13
|
(0, _collectPackageInfo.collectPackageInfo)('Upload/UploadProgress');
|
|
14
14
|
var StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
15
15
|
componentId: "plasma-web-core__sc-usww62-0"
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UploadRoot = void 0;
|
|
7
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault(
|
|
8
|
-
function _interopRequireDefault(
|
|
7
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
var UploadRoot = exports.UploadRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
10
10
|
componentId: "plasma-web-core__sc-1nmhn0k-0"
|
|
11
11
|
})(["position:relative;width:100%;"]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _react = /*#__PURE__*/_interopRequireDefault(
|
|
3
|
+
var _react = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("react"));
|
|
4
4
|
var _plasmaCyUtils = /*#__PURE__*/require("@salutejs/plasma-cy-utils");
|
|
5
|
-
function _interopRequireDefault(
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
6
6
|
describe('plasma-hope: UploadAudio', function () {
|
|
7
7
|
var _CypressTestDecorator;
|
|
8
8
|
var UploadAudio = (0, _plasmaCyUtils.getComponent)('UploadAudio');
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UploadAudio = exports.StyledText = exports.StyledIconMusic = exports.StyledContent = void 0;
|
|
7
|
-
var _react = /*#__PURE__*/_interopRequireDefault(
|
|
8
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault(
|
|
7
|
+
var _react = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("react"));
|
|
8
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("styled-components"));
|
|
9
9
|
var _plasmaIcons = /*#__PURE__*/require("@salutejs/plasma-icons");
|
|
10
10
|
var _Upload = /*#__PURE__*/require("../Upload");
|
|
11
11
|
var _collectPackageInfo = /*#__PURE__*/require("../../collectPackageInfo");
|
|
12
12
|
var _StyledIconMusic;
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _objectDestructuringEmpty(
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
16
|
(0, _collectPackageInfo.collectPackageInfo)('UploadAudio/UploadAudio');
|
|
17
17
|
var StyledContent = exports.StyledContent = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
18
18
|
componentId: "plasma-web-core__sc-va5v03-0"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _react = /*#__PURE__*/_interopRequireDefault(
|
|
3
|
+
var _react = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("react"));
|
|
4
4
|
var _plasmaCyUtils = /*#__PURE__*/require("@salutejs/plasma-cy-utils");
|
|
5
5
|
var _PadMe;
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
7
|
describe('plasma-hope: UploadVisual', function () {
|
|
8
8
|
var _CypressTestDecorator, _CypressTestDecorator2;
|
|
9
9
|
var UploadVisual = (0, _plasmaCyUtils.getComponent)('UploadVisual');
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.UploadVisual = exports.StyledRoot = void 0;
|
|
8
|
-
var _react = /*#__PURE__*/_interopRequireWildcard(
|
|
9
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault(
|
|
8
|
+
var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"));
|
|
9
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault(/*#__PURE__*/require("styled-components"));
|
|
10
10
|
var _plasmaIcons = /*#__PURE__*/require("@salutejs/plasma-icons");
|
|
11
11
|
var _Upload = /*#__PURE__*/require("../Upload");
|
|
12
12
|
var _PreviewGallery = /*#__PURE__*/require("../PreviewGallery");
|
|
@@ -14,12 +14,11 @@ var _PreviewGalleryItems = /*#__PURE__*/require("../PreviewGallery/PreviewGaller
|
|
|
14
14
|
var _collectPackageInfo = /*#__PURE__*/require("../../collectPackageInfo");
|
|
15
15
|
var _IconTrashFilled;
|
|
16
16
|
var _excluded = ["items", "maxHeight", "status", "message", "interactionType", "actionIcon", "itemSize", "maxCount", "disabled", "onItemsSortEnd", "onItemAction", "onItemClick", "onValidation"];
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
23
22
|
(0, _collectPackageInfo.collectPackageInfo)('UploadVisual/UploadVisual');
|
|
24
23
|
var StyledRoot = exports.StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
25
24
|
componentId: "plasma-web-core__sc-1lmzejj-0"
|
|
@@ -10,7 +10,7 @@ describe('plasma-hope: AudioPlayer', function () {
|
|
|
10
10
|
isSelected: false
|
|
11
11
|
};
|
|
12
12
|
it('simple', function () {
|
|
13
|
-
mount(
|
|
13
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecorator, null, /*#__PURE__*/React.createElement(AudioPlayer, {
|
|
14
14
|
title: item.name,
|
|
15
15
|
duration: item.duration,
|
|
16
16
|
isPlaying: item.isPlaying,
|
|
@@ -19,7 +19,7 @@ describe('plasma-hope: AudioPlayer', function () {
|
|
|
19
19
|
cy.matchImageSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('_isPlaying', function () {
|
|
22
|
-
mount(
|
|
22
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecorator, null, /*#__PURE__*/React.createElement(AudioPlayer, {
|
|
23
23
|
title: item.name,
|
|
24
24
|
duration: item.duration,
|
|
25
25
|
isSelected: item.isSelected
|
|
@@ -32,7 +32,7 @@ describe('plasma-hope: AudioPlayer', function () {
|
|
|
32
32
|
cy.matchImageSnapshot();
|
|
33
33
|
});
|
|
34
34
|
it('_isSelected', function () {
|
|
35
|
-
mount(
|
|
35
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecorator, null, /*#__PURE__*/React.createElement(AudioPlayer, {
|
|
36
36
|
title: item.name,
|
|
37
37
|
duration: item.duration,
|
|
38
38
|
isPlaying: item.isPlaying
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _IconPause, _IconPlay, _IconTrashFilled;
|
|
2
2
|
var _excluded = ["title", "duration", "url", "isPlaying", "isSelected", "canDelete", "onClick", "onDelete", "onPlay"];
|
|
3
|
-
function _slicedToArray(
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(
|
|
6
|
-
function _arrayLikeToArray(
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(
|
|
9
|
-
function _objectWithoutProperties(
|
|
10
|
-
function _objectWithoutPropertiesLoose(
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
11
|
import React, { useRef } from 'react';
|
|
12
12
|
import styled, { css } from 'styled-components';
|
|
13
13
|
import { footnote1 } from '@salutejs/plasma-core';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { useEffect, useState, useCallback } from 'react';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { createButton } from '@salutejs/plasma-core';
|
|
4
4
|
import { ButtonWeb } from './views/web/ButtonWeb';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import styled from 'styled-components';
|
|
@@ -15,7 +15,7 @@ var buttonTypography = {
|
|
|
15
15
|
xs: bodyXSBold,
|
|
16
16
|
xxs: bodyXS
|
|
17
17
|
};
|
|
18
|
-
var buttonSizesB2C = /*#__PURE__*/_objectSpread(
|
|
18
|
+
var buttonSizesB2C = /*#__PURE__*/_objectSpread(/*#__PURE__*/_objectSpread({}, buttonSizes), {}, {
|
|
19
19
|
xs: {
|
|
20
20
|
height: '2rem',
|
|
21
21
|
paddingY: '0.5625rem',
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { ButtonRoot, getButtonSizesMixin, buttonSizes, buttonTypography } from '@salutejs/plasma-core';
|
|
9
9
|
import { buttonViews } from '../../Button.props';
|
|
10
|
-
var buttonTypographyWEB = /*#__PURE__*/_objectSpread(
|
|
11
|
-
xs: /*#__PURE__*/_objectSpread(
|
|
10
|
+
var buttonTypographyWEB = /*#__PURE__*/_objectSpread(/*#__PURE__*/_objectSpread({}, buttonTypography), {}, {
|
|
11
|
+
xs: /*#__PURE__*/_objectSpread(/*#__PURE__*/_objectSpread({}, buttonTypography.s), {}, {
|
|
12
12
|
lineHeight: '0.875rem',
|
|
13
13
|
fontSize: '0.75rem'
|
|
14
14
|
}),
|
|
15
|
-
xxs: /*#__PURE__*/_objectSpread(
|
|
15
|
+
xxs: /*#__PURE__*/_objectSpread(/*#__PURE__*/_objectSpread({}, buttonTypography.s), {}, {
|
|
16
16
|
lineHeight: '0.875rem',
|
|
17
17
|
fontSize: '0.75rem',
|
|
18
18
|
fontWeight: 400
|
|
19
19
|
})
|
|
20
20
|
});
|
|
21
|
-
var buttonSizesWEB = /*#__PURE__*/_objectSpread(
|
|
21
|
+
var buttonSizesWEB = /*#__PURE__*/_objectSpread(/*#__PURE__*/_objectSpread({}, buttonSizes), {}, {
|
|
22
22
|
xs: {
|
|
23
23
|
height: '2rem',
|
|
24
24
|
paddingY: '0.5625rem',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["content", "description"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { BodyM } from '@salutejs/plasma-typo';
|
|
@@ -183,7 +183,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
183
183
|
});
|
|
184
184
|
it('prop: size', function () {
|
|
185
185
|
cy.viewport(1500, 500);
|
|
186
|
-
mount(
|
|
186
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement("div", {
|
|
187
187
|
style: {
|
|
188
188
|
display: 'flex',
|
|
189
189
|
gap: '200px'
|
|
@@ -225,7 +225,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
225
225
|
});
|
|
226
226
|
it('prop: size, variant', function () {
|
|
227
227
|
cy.viewport(1500, 500);
|
|
228
|
-
mount(
|
|
228
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement("div", {
|
|
229
229
|
style: {
|
|
230
230
|
display: 'flex',
|
|
231
231
|
gap: '200px'
|
|
@@ -270,7 +270,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
270
270
|
cy.matchImageSnapshot();
|
|
271
271
|
});
|
|
272
272
|
it('prop: onHover', function () {
|
|
273
|
-
mount(
|
|
273
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
274
274
|
items: items,
|
|
275
275
|
onHover: function onHover(index) {
|
|
276
276
|
expect(index).to.eq(0);
|
|
@@ -282,7 +282,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
282
282
|
cy.get('#north_america').trigger('mouseover');
|
|
283
283
|
});
|
|
284
284
|
it('prop: onItemSelect', function () {
|
|
285
|
-
mount(
|
|
285
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
286
286
|
items: items,
|
|
287
287
|
onItemSelect: function onItemSelect(item, event) {
|
|
288
288
|
expect(item).to.eq(items[0]);
|
|
@@ -310,7 +310,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
310
310
|
});
|
|
311
311
|
it('prop: placement', function () {
|
|
312
312
|
cy.viewport(500, 800);
|
|
313
|
-
mount(
|
|
313
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
314
314
|
placement: ['top', 'bottom'],
|
|
315
315
|
items: items,
|
|
316
316
|
closeOnOverlayClick: false
|
|
@@ -335,7 +335,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
335
335
|
});
|
|
336
336
|
it('prop: offset', function () {
|
|
337
337
|
cy.viewport(1000, 500);
|
|
338
|
-
mount(
|
|
338
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
339
339
|
items: items,
|
|
340
340
|
offset: [20, 20]
|
|
341
341
|
}, _Button5 || (_Button5 = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -397,7 +397,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
397
397
|
cy.get('#north_america').should('be.visible');
|
|
398
398
|
});
|
|
399
399
|
it('prop: onToggle', function () {
|
|
400
|
-
mount(
|
|
400
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
401
401
|
items: items,
|
|
402
402
|
onToggle: function onToggle(isOpen, event) {
|
|
403
403
|
expect(isOpen).to.be.oneOf([true, false]);
|
|
@@ -410,7 +410,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
410
410
|
cy.get('button').click();
|
|
411
411
|
});
|
|
412
412
|
it('prop: onItemClick', function () {
|
|
413
|
-
mount(
|
|
413
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
414
414
|
items: items,
|
|
415
415
|
onItemClick: function onItemClick(item, event) {
|
|
416
416
|
expect(item).to.eq(items[0]);
|
|
@@ -435,7 +435,7 @@ describe('plasma-b2c: Dropdown', function () {
|
|
|
435
435
|
});
|
|
436
436
|
it('keyboard interactions', function () {
|
|
437
437
|
cy.viewport(1000, 500);
|
|
438
|
-
mount(
|
|
438
|
+
mount(/*#__PURE__*/React.createElement(CypressTestDecoratorWithTypo, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
439
439
|
items: items,
|
|
440
440
|
onItemSelect: function onItemSelect(item, event) {
|
|
441
441
|
expect(item).to.eq(items[0]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["disabled", "closeOnSelect", "onItemClick", "onToggle", "onItemSelect"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _slicedToArray(
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(
|
|
6
|
-
function _arrayLikeToArray(
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(
|
|
9
|
-
function _objectWithoutProperties(
|
|
10
|
-
function _objectWithoutPropertiesLoose(
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
11
|
import React, { useState, useCallback } from 'react';
|
|
12
12
|
import styled from 'styled-components';
|
|
13
13
|
import { DropdownUncontrolled } from './DropdownUncontrolled';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _StyledDot, _StyledChevron, _StyledCheck;
|
|
2
2
|
var _excluded = ["value", "label", "isActive", "isDisabled", "isHovered", "color", "contentLeft", "items", "role", "index", "onClick", "onHover", "onFocus"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
4
|
-
function _objectWithoutProperties(
|
|
5
|
-
function _objectWithoutPropertiesLoose(
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
6
|
import React, { useRef, useCallback, useMemo, forwardRef } from 'react';
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { body1, applyDisabled, applyEllipsis, useForkRef } from '@salutejs/plasma-core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["id", "items", "hoverIndex", "itemRole", "onItemSelect", "onHover", "role"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { DropdownSelfControlledPopup } from './DropdownPopup';
|
|
7
7
|
import { DropdownList } from './DropdownList';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(
|
|
7
|
-
function _objectDestructuringEmpty(
|
|
8
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
8
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
9
|
import React, { useState } from 'react';
|
|
10
10
|
import styled, { css } from 'styled-components';
|
|
11
11
|
import { Popup } from '../Popup';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["id", "isOpen", "opened", "items", "children", "offsetTop", "disabled", "style", "className", "hoverIndex", "placement", "trigger", "onBlur", "onKeyDown", "onToggle", "onItemSelect", "onHover"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import { DropdownMenu } from './DropdownMenu';
|
|
7
7
|
import { DropdownPopup } from './DropdownPopup';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { useCallback, useRef, useState } from 'react';
|
|
8
8
|
export var useSearchString = function useSearchString() {
|
|
9
9
|
var _useState = useState(''),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _toConsumableArray(
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _iterableToArray(
|
|
5
|
-
function _arrayWithoutHoles(
|
|
6
|
-
function _arrayLikeToArray(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
export var Actions = /*#__PURE__*/function (Actions) {
|
|
8
8
|
Actions[Actions["Close"] = 0] = "Close";
|
|
9
9
|
Actions[Actions["CloseSelect"] = 1] = "CloseSelect";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["id", "items", "placement", "trigger", "disabled", "menuRole", "menuItemRole", "closeOnSelect", "onToggle", "onItemSelect", "onIndexChange"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
function _slicedToArray(
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(
|
|
6
|
-
function _arrayLikeToArray(
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(
|
|
9
|
-
function _objectWithoutProperties(
|
|
10
|
-
function _objectWithoutPropertiesLoose(
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
11
|
import React, { useState, useRef, useCallback, useEffect, useMemo, forwardRef } from 'react';
|
|
12
12
|
import { DropdownUncontrolled } from './DropdownUncontrolled';
|
|
13
13
|
import { useKeyboardNavigation, INITIAL_INDEX } from './keyboardNavigation';
|