@salutejs/plasma-new-hope 0.186.0-canary.1538.11705586782.0 → 0.186.0-canary.1542.11716355955.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +22 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/cjs/components/Dropdown/Dropdown.js +4 -6
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/index.js +8 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +53 -0
- package/emotion/cjs/components/Combobox/index.js +6 -0
- package/emotion/cjs/components/Dropdown/Dropdown.js +4 -6
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/emotion/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
- package/emotion/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +47 -0
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/components/Dropdown/Dropdown.js +4 -6
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +18 -0
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
- package/es/components/Dropdown/Dropdown.js +4 -6
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +8 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +53 -0
- package/styled-components/cjs/components/Combobox/index.js +6 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
- package/styled-components/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
- package/styled-components/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +47 -0
- package/styled-components/es/components/Combobox/index.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +4 -6
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +21 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/index.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +1 -0
- package/types/components/Combobox/index.d.ts +1 -1
- package/types/components/Combobox/index.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +0 -4
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +3 -2
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createSyntheticEvent = exports.createEvent = void 0;
|
7
|
+
var createEvent = exports.createEvent = function createEvent(ref) {
|
8
|
+
if (ref.current) {
|
9
|
+
var event = new Event('change', {
|
10
|
+
bubbles: true
|
11
|
+
});
|
12
|
+
Object.defineProperty(event, 'target', {
|
13
|
+
writable: false,
|
14
|
+
value: ref.current
|
15
|
+
});
|
16
|
+
var syntheticEvent = createSyntheticEvent(event);
|
17
|
+
return syntheticEvent;
|
18
|
+
}
|
19
|
+
return null;
|
20
|
+
};
|
21
|
+
var createSyntheticEvent = exports.createSyntheticEvent = function createSyntheticEvent(event) {
|
22
|
+
var _isDefaultPrevented = false;
|
23
|
+
var _isPropagationStopped = false;
|
24
|
+
var preventDefault = function preventDefault() {
|
25
|
+
_isDefaultPrevented = true;
|
26
|
+
event.preventDefault();
|
27
|
+
};
|
28
|
+
var stopPropagation = function stopPropagation() {
|
29
|
+
_isPropagationStopped = true;
|
30
|
+
event.stopPropagation();
|
31
|
+
};
|
32
|
+
return {
|
33
|
+
nativeEvent: event,
|
34
|
+
currentTarget: event.currentTarget,
|
35
|
+
target: event.target,
|
36
|
+
bubbles: event.bubbles,
|
37
|
+
cancelable: event.cancelable,
|
38
|
+
defaultPrevented: event.defaultPrevented,
|
39
|
+
eventPhase: event.eventPhase,
|
40
|
+
isTrusted: event.isTrusted,
|
41
|
+
preventDefault: preventDefault,
|
42
|
+
isDefaultPrevented: function isDefaultPrevented() {
|
43
|
+
return _isDefaultPrevented;
|
44
|
+
},
|
45
|
+
stopPropagation: stopPropagation,
|
46
|
+
isPropagationStopped: function isPropagationStopped() {
|
47
|
+
return _isPropagationStopped;
|
48
|
+
},
|
49
|
+
persist: function persist() {},
|
50
|
+
timeStamp: event.timeStamp,
|
51
|
+
type: event.type
|
52
|
+
};
|
53
|
+
};
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "ComboboxTarget", {
|
|
9
9
|
return _ComboboxOld.ComboboxTarget;
|
10
10
|
}
|
11
11
|
});
|
12
|
+
Object.defineProperty(exports, "boundCombobox", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _ComboboxNew.boundCombobox;
|
16
|
+
}
|
17
|
+
});
|
12
18
|
Object.defineProperty(exports, "comboboxDividerConfig", {
|
13
19
|
enumerable: true,
|
14
20
|
get: function get() {
|
@@ -20,7 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
|
20
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
21
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
22
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
23
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "
|
23
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
26
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -66,8 +66,6 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
66
66
|
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
67
67
|
_ref$hasArrow = _ref.hasArrow,
|
68
68
|
hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
|
69
|
-
_ref$alwaysOpened = _ref.alwaysOpened,
|
70
|
-
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
71
69
|
portal = _ref.portal,
|
72
70
|
rest = _objectWithoutProperties(_ref, _excluded);
|
73
71
|
var _useReducer = (0, _react.useReducer)(_pathReducer.pathReducer, []),
|
@@ -88,7 +86,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
88
86
|
|
89
87
|
// Логика работы при клике за пределами выпадающего списка
|
90
88
|
var targetRef = (0, _hooks.useOutsideClick)(function (event) {
|
91
|
-
if (!isCurrentListOpen || !closeOnOverlayClick
|
89
|
+
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
92
90
|
return;
|
93
91
|
}
|
94
92
|
dispatchPath({
|
@@ -102,7 +100,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
102
100
|
}
|
103
101
|
}, floatingPopoverRef);
|
104
102
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
105
|
-
if (
|
103
|
+
if (opened) {
|
106
104
|
dispatchPath({
|
107
105
|
type: 'opened_first_level'
|
108
106
|
});
|
@@ -131,7 +129,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
131
129
|
onItemClick: onItemClick
|
132
130
|
}),
|
133
131
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
134
|
-
var isCurrentListOpen =
|
132
|
+
var isCurrentListOpen = Boolean(path[0]);
|
135
133
|
return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
136
134
|
value: {
|
137
135
|
focusedPath: focusedPath,
|
@@ -3,10 +3,15 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.Combobox = void 0;
|
6
|
+
exports.ComboboxWithForm = exports.Combobox = void 0;
|
7
7
|
var _engines = /*#__PURE__*/require("../../../../engines");
|
8
8
|
var _ = /*#__PURE__*/require("../../../..");
|
9
|
+
var _getForm = /*#__PURE__*/require("../../../../components/Combobox/ComboboxNew/utils/getForm");
|
9
10
|
var _Combobox = /*#__PURE__*/require("./Combobox.config");
|
10
11
|
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_.comboboxNewConfig, _Combobox.config);
|
11
12
|
var ComboboxComponent = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
12
|
-
var Combobox = exports.Combobox = ComboboxComponent;
|
13
|
+
var Combobox = exports.Combobox = ComboboxComponent;
|
14
|
+
var ComboboxWithForm = exports.ComboboxWithForm = /*#__PURE__*/(0, _.boundCombobox)({
|
15
|
+
base: ComboboxComponent,
|
16
|
+
baseForm: /*#__PURE__*/(0, _getForm.getFormComponentGenerator)(ComboboxComponent)
|
17
|
+
});
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import React, { useState } from 'react';
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
2
2
|
import type { ComponentProps } from 'react';
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
4
4
|
|
5
5
|
import { WithTheme } from '../../../_helpers';
|
6
6
|
import { IconDone } from '../../../../components/_Icon';
|
7
|
+
import { createEvent } from '../../../../components/Combobox/ComboboxNew/utils/syntheticEvent';
|
7
8
|
|
8
|
-
import { Combobox } from './Combobox';
|
9
|
+
import { Combobox, ComboboxWithForm } from './Combobox';
|
9
10
|
|
10
11
|
type StorySelectProps = ComponentProps<typeof Combobox> & {
|
11
12
|
enableContentLeft?: boolean;
|
@@ -356,7 +357,7 @@ const SingleStory = (args: StorySelectProps) => {
|
|
356
357
|
|
357
358
|
return (
|
358
359
|
<div style={{ width: '400px' }}>
|
359
|
-
<
|
360
|
+
<ComboboxWithForm
|
360
361
|
{...args}
|
361
362
|
items={items}
|
362
363
|
value={value}
|
@@ -367,6 +368,24 @@ const SingleStory = (args: StorySelectProps) => {
|
|
367
368
|
);
|
368
369
|
};
|
369
370
|
|
371
|
+
const SingleFormStory = (args: StorySelectProps) => {
|
372
|
+
const handleChange = (event) => {
|
373
|
+
console.log(event);
|
374
|
+
};
|
375
|
+
|
376
|
+
return (
|
377
|
+
<div style={{ width: '400px' }}>
|
378
|
+
<ComboboxWithForm
|
379
|
+
{...args}
|
380
|
+
items={items}
|
381
|
+
formType
|
382
|
+
onChange={handleChange}
|
383
|
+
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
384
|
+
/>
|
385
|
+
</div>
|
386
|
+
);
|
387
|
+
};
|
388
|
+
|
370
389
|
export const Single: StoryObj<StorySelectProps> = {
|
371
390
|
render: (args) => <SingleStory {...args} />,
|
372
391
|
args: {
|
@@ -379,14 +398,27 @@ export const Single: StoryObj<StorySelectProps> = {
|
|
379
398
|
},
|
380
399
|
};
|
381
400
|
|
401
|
+
export const SingleForm: StoryObj<StorySelectProps> = {
|
402
|
+
render: (args) => <SingleFormStory {...args} />,
|
403
|
+
args: {
|
404
|
+
closeAfterSelect: true,
|
405
|
+
},
|
406
|
+
parameters: {
|
407
|
+
controls: {
|
408
|
+
exclude: ['isTargetAmount'],
|
409
|
+
},
|
410
|
+
},
|
411
|
+
};
|
412
|
+
|
382
413
|
const MultipleStory = (args: StorySelectProps) => {
|
383
414
|
const [value, setValue] = useState([]);
|
384
415
|
|
385
416
|
return (
|
386
417
|
<div style={{ width: '400px' }}>
|
387
|
-
<
|
418
|
+
<ComboboxWithForm
|
388
419
|
{...args}
|
389
420
|
multiple
|
421
|
+
formType={false}
|
390
422
|
items={items}
|
391
423
|
value={value}
|
392
424
|
onChange={setValue}
|
@@ -396,9 +428,35 @@ const MultipleStory = (args: StorySelectProps) => {
|
|
396
428
|
);
|
397
429
|
};
|
398
430
|
|
431
|
+
const MultipleStoryForm = (args: StorySelectProps) => {
|
432
|
+
const handleChange = (event) => {
|
433
|
+
console.log(event);
|
434
|
+
};
|
435
|
+
|
436
|
+
return (
|
437
|
+
<div style={{ width: '400px' }}>
|
438
|
+
<ComboboxWithForm
|
439
|
+
{...args}
|
440
|
+
multiple
|
441
|
+
formType
|
442
|
+
onChange={handleChange}
|
443
|
+
items={items}
|
444
|
+
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
445
|
+
/>
|
446
|
+
</div>
|
447
|
+
);
|
448
|
+
};
|
449
|
+
|
399
450
|
export const Multiple: StoryObj<StorySelectProps> = {
|
400
451
|
render: (args) => <MultipleStory {...args} />,
|
401
452
|
args: {
|
402
453
|
closeAfterSelect: false,
|
403
454
|
},
|
404
455
|
};
|
456
|
+
|
457
|
+
export const MultipleForm: StoryObj<StorySelectProps> = {
|
458
|
+
render: (args) => <MultipleStoryForm {...args} />,
|
459
|
+
args: {
|
460
|
+
closeAfterSelect: false,
|
461
|
+
},
|
462
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export var boundCombobox = function boundCombobox(_ref) {
|
3
|
+
var ComboboxBase = _ref.base,
|
4
|
+
ComboboxBaseForm = _ref.baseForm;
|
5
|
+
return function (rest) {
|
6
|
+
if (rest.formType) {
|
7
|
+
return /*#__PURE__*/React.createElement(ComboboxBaseForm, rest);
|
8
|
+
}
|
9
|
+
if (!rest.formType) {
|
10
|
+
return /*#__PURE__*/React.createElement(ComboboxBase, rest);
|
11
|
+
}
|
12
|
+
return null;
|
13
|
+
};
|
14
|
+
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
var _excluded = ["onChange", "component"],
|
2
|
+
_excluded2 = ["onChange", "component"];
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
|
+
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."); }
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
8
|
+
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; } }
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
11
|
+
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; }
|
12
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
13
|
+
// @ts-nocheck
|
14
|
+
|
15
|
+
import React, { useEffect, useRef, useState } from 'react';
|
16
|
+
import { createEvent } from './syntheticEvent';
|
17
|
+
var SingleForm = function SingleForm(args) {
|
18
|
+
var onChange = args.onChange,
|
19
|
+
Component = args.component,
|
20
|
+
rest = _objectWithoutProperties(args, _excluded);
|
21
|
+
var _useState = useState(),
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
23
|
+
value = _useState2[0],
|
24
|
+
setValue = _useState2[1];
|
25
|
+
var selectRef = useRef(null);
|
26
|
+
var handleChange = function handleChange(value) {
|
27
|
+
setValue(value);
|
28
|
+
};
|
29
|
+
useEffect(function () {
|
30
|
+
var event = createEvent(selectRef);
|
31
|
+
onChange && onChange(event);
|
32
|
+
}, [value]);
|
33
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
|
34
|
+
ref: selectRef,
|
35
|
+
value: value,
|
36
|
+
hidden: true
|
37
|
+
}, /*#__PURE__*/React.createElement("option", {
|
38
|
+
value: value
|
39
|
+
}, value)), /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
40
|
+
value: value,
|
41
|
+
onChange: handleChange
|
42
|
+
})));
|
43
|
+
};
|
44
|
+
var MultipleForm = function MultipleForm(args) {
|
45
|
+
var onChange = args.onChange,
|
46
|
+
Component = args.component,
|
47
|
+
rest = _objectWithoutProperties(args, _excluded2);
|
48
|
+
var _useState3 = useState([]),
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
50
|
+
values = _useState4[0],
|
51
|
+
setValues = _useState4[1];
|
52
|
+
var selectRef = useRef(null);
|
53
|
+
var handleChange = function handleChange(value) {
|
54
|
+
setValues(value);
|
55
|
+
};
|
56
|
+
useEffect(function () {
|
57
|
+
var event = createEvent(selectRef);
|
58
|
+
onChange && onChange(event);
|
59
|
+
}, [values]);
|
60
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
|
61
|
+
ref: selectRef,
|
62
|
+
value: values,
|
63
|
+
multiple: true,
|
64
|
+
hidden: true
|
65
|
+
}, values.map(function (value) {
|
66
|
+
return /*#__PURE__*/React.createElement("option", {
|
67
|
+
key: value,
|
68
|
+
value: value
|
69
|
+
}, value);
|
70
|
+
})), /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
71
|
+
value: values,
|
72
|
+
onChange: handleChange
|
73
|
+
})));
|
74
|
+
};
|
75
|
+
export var getFormComponentGenerator = function getFormComponentGenerator(Component) {
|
76
|
+
return function (args) {
|
77
|
+
return args.multiple ? /*#__PURE__*/React.createElement(MultipleForm, _extends({}, args, {
|
78
|
+
component: Component
|
79
|
+
})) : /*#__PURE__*/React.createElement(SingleForm, _extends({}, args, {
|
80
|
+
component: Component
|
81
|
+
}));
|
82
|
+
};
|
83
|
+
};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
export var createEvent = function createEvent(ref) {
|
2
|
+
if (ref.current) {
|
3
|
+
var event = new Event('change', {
|
4
|
+
bubbles: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(event, 'target', {
|
7
|
+
writable: false,
|
8
|
+
value: ref.current
|
9
|
+
});
|
10
|
+
var syntheticEvent = createSyntheticEvent(event);
|
11
|
+
return syntheticEvent;
|
12
|
+
}
|
13
|
+
return null;
|
14
|
+
};
|
15
|
+
export var createSyntheticEvent = function createSyntheticEvent(event) {
|
16
|
+
var _isDefaultPrevented = false;
|
17
|
+
var _isPropagationStopped = false;
|
18
|
+
var preventDefault = function preventDefault() {
|
19
|
+
_isDefaultPrevented = true;
|
20
|
+
event.preventDefault();
|
21
|
+
};
|
22
|
+
var stopPropagation = function stopPropagation() {
|
23
|
+
_isPropagationStopped = true;
|
24
|
+
event.stopPropagation();
|
25
|
+
};
|
26
|
+
return {
|
27
|
+
nativeEvent: event,
|
28
|
+
currentTarget: event.currentTarget,
|
29
|
+
target: event.target,
|
30
|
+
bubbles: event.bubbles,
|
31
|
+
cancelable: event.cancelable,
|
32
|
+
defaultPrevented: event.defaultPrevented,
|
33
|
+
eventPhase: event.eventPhase,
|
34
|
+
isTrusted: event.isTrusted,
|
35
|
+
preventDefault: preventDefault,
|
36
|
+
isDefaultPrevented: function isDefaultPrevented() {
|
37
|
+
return _isDefaultPrevented;
|
38
|
+
},
|
39
|
+
stopPropagation: stopPropagation,
|
40
|
+
isPropagationStopped: function isPropagationStopped() {
|
41
|
+
return _isPropagationStopped;
|
42
|
+
},
|
43
|
+
persist: function persist() {},
|
44
|
+
timeStamp: event.timeStamp,
|
45
|
+
type: event.type
|
46
|
+
};
|
47
|
+
};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { comboboxRoot as comboboxOldRoot, comboboxConfig as comboboxOldConfig, comboboxDividerRoot, comboboxDividerConfig, comboboxFooterRoot, comboboxFooterConfig, comboboxGroupRoot, comboboxGroupConfig, comboboxHeaderRoot, comboboxHeaderConfig, comboboxItemRoot, comboboxItemConfig, ComboboxTarget, comboboxClasses as comboboxOldClasses, comboboxTokens as comboboxOldTokens } from './ComboboxOld';
|
2
|
-
export { comboboxTokens as comboboxNewTokens, comboboxRoot as comboboxNewRoot, comboboxConfig as comboboxNewConfig } from './ComboboxNew';
|
2
|
+
export { comboboxTokens as comboboxNewTokens, comboboxRoot as comboboxNewRoot, comboboxConfig as comboboxNewConfig, boundCombobox } from './ComboboxNew';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "
|
1
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _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."); }
|
@@ -57,8 +57,6 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
57
57
|
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
58
58
|
_ref$hasArrow = _ref.hasArrow,
|
59
59
|
hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
|
60
|
-
_ref$alwaysOpened = _ref.alwaysOpened,
|
61
|
-
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
62
60
|
portal = _ref.portal,
|
63
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
64
62
|
var _useReducer = useReducer(pathReducer, []),
|
@@ -79,7 +77,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
79
77
|
|
80
78
|
// Логика работы при клике за пределами выпадающего списка
|
81
79
|
var targetRef = useOutsideClick(function (event) {
|
82
|
-
if (!isCurrentListOpen || !closeOnOverlayClick
|
80
|
+
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
83
81
|
return;
|
84
82
|
}
|
85
83
|
dispatchPath({
|
@@ -93,7 +91,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
93
91
|
}
|
94
92
|
}, floatingPopoverRef);
|
95
93
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
96
|
-
if (
|
94
|
+
if (opened) {
|
97
95
|
dispatchPath({
|
98
96
|
type: 'opened_first_level'
|
99
97
|
});
|
@@ -122,7 +120,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
122
120
|
onItemClick: onItemClick
|
123
121
|
}),
|
124
122
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
125
|
-
var isCurrentListOpen =
|
123
|
+
var isCurrentListOpen = Boolean(path[0]);
|
126
124
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
127
125
|
value: {
|
128
126
|
focusedPath: focusedPath,
|
@@ -1,7 +1,12 @@
|
|
1
1
|
import { component, mergeConfig } from '../../../../engines';
|
2
|
-
import { comboboxNewConfig } from '../../../..';
|
2
|
+
import { comboboxNewConfig, boundCombobox } from '../../../..';
|
3
|
+
import { getFormComponentGenerator } from '../../../../components/Combobox/ComboboxNew/utils/getForm';
|
3
4
|
import { config } from './Combobox.config';
|
4
5
|
var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
|
5
6
|
var ComboboxComponent = /*#__PURE__*/component(mergedConfig);
|
6
7
|
var Combobox = ComboboxComponent;
|
7
|
-
|
8
|
+
var ComboboxWithForm = /*#__PURE__*/boundCombobox({
|
9
|
+
base: ComboboxComponent,
|
10
|
+
baseForm: /*#__PURE__*/getFormComponentGenerator(ComboboxComponent)
|
11
|
+
});
|
12
|
+
export { Combobox, ComboboxWithForm };
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import React, { useState } from 'react';
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
2
2
|
import type { ComponentProps } from 'react';
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
4
4
|
|
5
5
|
import { WithTheme } from '../../../_helpers';
|
6
6
|
import { IconDone } from '../../../../components/_Icon';
|
7
|
+
import { createEvent } from '../../../../components/Combobox/ComboboxNew/utils/syntheticEvent';
|
7
8
|
|
8
|
-
import { Combobox } from './Combobox';
|
9
|
+
import { Combobox, ComboboxWithForm } from './Combobox';
|
9
10
|
|
10
11
|
type StorySelectProps = ComponentProps<typeof Combobox> & {
|
11
12
|
enableContentLeft?: boolean;
|
@@ -356,7 +357,7 @@ const SingleStory = (args: StorySelectProps) => {
|
|
356
357
|
|
357
358
|
return (
|
358
359
|
<div style={{ width: '400px' }}>
|
359
|
-
<
|
360
|
+
<ComboboxWithForm
|
360
361
|
{...args}
|
361
362
|
items={items}
|
362
363
|
value={value}
|
@@ -367,6 +368,24 @@ const SingleStory = (args: StorySelectProps) => {
|
|
367
368
|
);
|
368
369
|
};
|
369
370
|
|
371
|
+
const SingleFormStory = (args: StorySelectProps) => {
|
372
|
+
const handleChange = (event) => {
|
373
|
+
console.log(event);
|
374
|
+
};
|
375
|
+
|
376
|
+
return (
|
377
|
+
<div style={{ width: '400px' }}>
|
378
|
+
<ComboboxWithForm
|
379
|
+
{...args}
|
380
|
+
items={items}
|
381
|
+
formType
|
382
|
+
onChange={handleChange}
|
383
|
+
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
384
|
+
/>
|
385
|
+
</div>
|
386
|
+
);
|
387
|
+
};
|
388
|
+
|
370
389
|
export const Single: StoryObj<StorySelectProps> = {
|
371
390
|
render: (args) => <SingleStory {...args} />,
|
372
391
|
args: {
|
@@ -379,14 +398,27 @@ export const Single: StoryObj<StorySelectProps> = {
|
|
379
398
|
},
|
380
399
|
};
|
381
400
|
|
401
|
+
export const SingleForm: StoryObj<StorySelectProps> = {
|
402
|
+
render: (args) => <SingleFormStory {...args} />,
|
403
|
+
args: {
|
404
|
+
closeAfterSelect: true,
|
405
|
+
},
|
406
|
+
parameters: {
|
407
|
+
controls: {
|
408
|
+
exclude: ['isTargetAmount'],
|
409
|
+
},
|
410
|
+
},
|
411
|
+
};
|
412
|
+
|
382
413
|
const MultipleStory = (args: StorySelectProps) => {
|
383
414
|
const [value, setValue] = useState([]);
|
384
415
|
|
385
416
|
return (
|
386
417
|
<div style={{ width: '400px' }}>
|
387
|
-
<
|
418
|
+
<ComboboxWithForm
|
388
419
|
{...args}
|
389
420
|
multiple
|
421
|
+
formType={false}
|
390
422
|
items={items}
|
391
423
|
value={value}
|
392
424
|
onChange={setValue}
|
@@ -396,9 +428,35 @@ const MultipleStory = (args: StorySelectProps) => {
|
|
396
428
|
);
|
397
429
|
};
|
398
430
|
|
431
|
+
const MultipleStoryForm = (args: StorySelectProps) => {
|
432
|
+
const handleChange = (event) => {
|
433
|
+
console.log(event);
|
434
|
+
};
|
435
|
+
|
436
|
+
return (
|
437
|
+
<div style={{ width: '400px' }}>
|
438
|
+
<ComboboxWithForm
|
439
|
+
{...args}
|
440
|
+
multiple
|
441
|
+
formType
|
442
|
+
onChange={handleChange}
|
443
|
+
items={items}
|
444
|
+
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
445
|
+
/>
|
446
|
+
</div>
|
447
|
+
);
|
448
|
+
};
|
449
|
+
|
399
450
|
export const Multiple: StoryObj<StorySelectProps> = {
|
400
451
|
render: (args) => <MultipleStory {...args} />,
|
401
452
|
args: {
|
402
453
|
closeAfterSelect: false,
|
403
454
|
},
|
404
455
|
};
|
456
|
+
|
457
|
+
export const MultipleForm: StoryObj<StorySelectProps> = {
|
458
|
+
render: (args) => <MultipleStoryForm {...args} />,
|
459
|
+
args: {
|
460
|
+
closeAfterSelect: false,
|
461
|
+
},
|
462
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ComboboxBoundlerProps, ComboboxBoundlerPropsComponent } from './Combobox.types';
|
3
|
+
export declare const boundCombobox: (args: ComboboxBoundlerProps) => React.FC<ComboboxBoundlerPropsComponent>;
|
4
|
+
//# sourceMappingURL=Combobox.boundler.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Combobox.boundler.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.boundler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAEzF,eAAO,MAAM,aAAa,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAanG,CAAC"}
|
@@ -177,5 +177,26 @@ export declare type ItemContext = {
|
|
177
177
|
valueToItemMap: ValueToItemMapType;
|
178
178
|
treeId: string;
|
179
179
|
};
|
180
|
+
declare type ComboboxFormBaseProps = {
|
181
|
+
onChange?: (event: React.ChangeEvent<HTMLSelectElement> | null) => void;
|
182
|
+
defaultValue?: string;
|
183
|
+
multiple?: false;
|
184
|
+
} | {
|
185
|
+
onChange?: (event: React.ChangeEvent<HTMLSelectElement> | null) => void;
|
186
|
+
defaultValue?: string[];
|
187
|
+
multiple?: true;
|
188
|
+
};
|
189
|
+
export declare type ComboboxFormProps = Omit<ComboboxProps, 'onChange' | 'defaultValue' | 'multiple'> & ComboboxFormBaseProps;
|
190
|
+
export declare type ComboboxBoundlerProps = {
|
191
|
+
base: React.FC<ComboboxProps>;
|
192
|
+
baseForm: React.FC<ComboboxFormPropsAll>;
|
193
|
+
};
|
194
|
+
export declare type ComboboxFormPropsAll = ComboboxFormProps & {
|
195
|
+
formType: true;
|
196
|
+
};
|
197
|
+
export declare type ComboboxPropsAll = ComboboxProps & {
|
198
|
+
formType: false;
|
199
|
+
};
|
200
|
+
export declare type ComboboxBoundlerPropsComponent = ComboboxFormPropsAll | ComboboxPropsAll;
|
180
201
|
export {};
|
181
202
|
//# sourceMappingURL=Combobox.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAErF,aAAK,SAAS,GACR,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEjB,aAAK,aAAa,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAC9C;IACI,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B;;;OAGG;IACH,YAAY,C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C,SAAS,CAAC,CAAC;IAClC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACxC,cAAc,EAAE,kBAAkB,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,aAAK,qBAAqB,GACpB;IACI,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACI,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,CAAC;CACnB,CAAC;AAER,oBAAY,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC,GAAG,qBAAqB,CAAC;AAEtH,oBAAY,qBAAqB,GAAG;IAChC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;CAC5C,CAAC;AAEF,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG;IACnD,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,oBAAY,gBAAgB,GAAG,aAAa,GAAG;IAC3C,QAAQ,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,oBAAoB,GAAG,gBAAgB,CAAC"}
|
@@ -2,4 +2,5 @@ export { comboboxConfig, comboboxRoot } from './Combobox';
|
|
2
2
|
export { tokens as comboboxTokens } from './Combobox.tokens';
|
3
3
|
export type { ComboboxProps } from './Combobox.types';
|
4
4
|
export type { ItemOption } from './ui/Inner/ui/Item/Item.types';
|
5
|
+
export { boundCombobox } from './Combobox.boundler';
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7D,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7D,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { ComponentType } from 'react';
|
2
|
+
import { ComboboxFormProps } from '../Combobox.types';
|
3
|
+
export declare const getFormComponentGenerator: (Component: ComponentType<ModifiedComboboxProps>) => (args: ComboboxFormProps) => JSX.Element;
|
4
|
+
//# sourceMappingURL=getForm.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/getForm.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA4DrE,eAAO,MAAM,yBAAyB,cAAe,cAAc,qBAAqB,CAAC,YACvE,iBAAiB,gBAOlC,CAAC"}
|