@salutejs/plasma-new-hope 0.186.0-canary.1541.11711445984.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.
Files changed (70) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +22 -0
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
  3. package/cjs/components/TextField/TextField.js +0 -11
  4. package/cjs/components/TextField/TextField.js.map +1 -1
  5. package/cjs/index.js +2 -0
  6. package/cjs/index.js.map +1 -1
  7. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
  8. package/emotion/cjs/components/Combobox/ComboboxNew/index.js +8 -1
  9. package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
  10. package/{styled-components/cjs → emotion/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  11. package/emotion/cjs/components/Combobox/index.js +6 -0
  12. package/emotion/cjs/components/TextField/TextField.js +1 -12
  13. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
  14. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
  15. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  16. package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
  17. package/emotion/es/components/Combobox/ComboboxNew/index.js +2 -1
  18. package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
  19. package/{styled-components/es → emotion/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  20. package/emotion/es/components/Combobox/index.js +1 -1
  21. package/emotion/es/components/TextField/TextField.js +1 -12
  22. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
  23. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
  24. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  25. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +18 -0
  26. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
  27. package/es/components/TextField/TextField.js +0 -11
  28. package/es/components/TextField/TextField.js.map +1 -1
  29. package/es/index.js +1 -0
  30. package/es/index.js.map +1 -1
  31. package/package.json +2 -2
  32. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
  33. package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +8 -1
  34. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +90 -0
  35. package/{emotion/cjs → styled-components/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  36. package/styled-components/cjs/components/Combobox/index.js +6 -0
  37. package/styled-components/cjs/components/TextField/TextField.js +0 -11
  38. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
  39. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
  40. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  41. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
  42. package/styled-components/es/components/Combobox/ComboboxNew/index.js +2 -1
  43. package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +83 -0
  44. package/{emotion/es → styled-components/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  45. package/styled-components/es/components/Combobox/index.js +1 -1
  46. package/styled-components/es/components/TextField/TextField.js +0 -11
  47. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +7 -2
  48. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -4
  49. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  50. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +4 -0
  51. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +1 -0
  52. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +21 -0
  53. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  54. package/types/components/Combobox/ComboboxNew/index.d.ts +1 -0
  55. package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
  56. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +4 -0
  57. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -0
  58. package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +4 -0
  59. package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +1 -0
  60. package/types/components/Combobox/index.d.ts +1 -1
  61. package/types/components/Combobox/index.d.ts.map +1 -1
  62. package/types/components/TextField/TextField.d.ts.map +1 -1
  63. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +3 -2
  64. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  65. package/cjs/utils/syntheticEvent.js +0 -56
  66. package/cjs/utils/syntheticEvent.js.map +0 -1
  67. package/es/utils/syntheticEvent.js +0 -51
  68. package/es/utils/syntheticEvent.js.map +0 -1
  69. package/types/utils/syntheticEvent.d.ts +0 -4
  70. package/types/utils/syntheticEvent.d.ts.map +0 -1
@@ -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
- <Combobox
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
- <Combobox
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
+ };
@@ -171,7 +171,6 @@ const StoryDemo = ({ enableContentLeft, enableContentRight, view, ...rest }: Sto
171
171
 
172
172
  return (
173
173
  <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem', width: '70%', margin: '0 auto' }}>
174
- <div>{text}</div>
175
174
  <TextField
176
175
  {...rest}
177
176
  enumerationType="plain"
@@ -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
+ };
@@ -1,2 +1,3 @@
1
1
  export { comboboxConfig, comboboxRoot } from './Combobox';
2
- export { tokens as comboboxTokens } from './Combobox.tokens';
2
+ export { tokens as comboboxTokens } from './Combobox.tokens';
3
+ export { boundCombobox } from './Combobox.boundler';
@@ -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
+ };
@@ -8,7 +8,6 @@ export var createEvent = function createEvent(ref) {
8
8
  value: ref.current
9
9
  });
10
10
  var syntheticEvent = createSyntheticEvent(event);
11
- console.log(syntheticEvent);
12
11
  return syntheticEvent;
13
12
  }
14
13
  return null;
@@ -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';
@@ -13,7 +13,6 @@ import { safeUseId, useForkRef } from '@salutejs/plasma-core';
13
13
  import { css } from 'styled-components';
14
14
  import { cx } from '../../utils';
15
15
  import { useOutsideClick } from '../../hooks';
16
- import { createEvent } from '../../utils/syntheticEvent';
17
16
  import { base as sizeCSS } from './variations/_size/base';
18
17
  import { base as viewCSS } from './variations/_view/base';
19
18
  import { base as clearCSS } from './variations/_clear/base';
@@ -223,21 +222,11 @@ export var textFieldRoot = function textFieldRoot(Root) {
223
222
  setChips(newChips);
224
223
  }, [isChipEnumeration, values]);
225
224
  useEffect(function () {
226
- console.log('Init Value');
227
225
  setHasValue(Boolean(rest === null || rest === void 0 ? void 0 : rest.defaultValue));
228
- var event = createEvent(inputRef);
229
- if (event) {
230
- handleChange(event);
231
- }
232
226
  }, [rest.defaultValue]);
233
227
  useEffect(function () {
234
228
  var _inputRef$current2;
235
- console.log('Set Value');
236
229
  setHasValue(Boolean(outerValue) || Boolean(inputRef === null || inputRef === void 0 || (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.value));
237
- var event = createEvent(inputRef);
238
- if (event) {
239
- handleChange(event);
240
- }
241
230
  }, [outerValue, inputRef === null || inputRef === void 0 || (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.value]);
242
231
  var innerOptional = Boolean(required ? false : optional);
243
232
  var hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;
@@ -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
- export { Combobox };
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
- <Combobox
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
- <Combobox
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
+ };
@@ -171,7 +171,6 @@ const StoryDemo = ({ enableContentLeft, enableContentRight, view, ...rest }: Sto
171
171
 
172
172
  return (
173
173
  <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem', width: '70%', margin: '0 auto' }}>
174
- <div>{text}</div>
175
174
  <TextField
176
175
  {...rest}
177
176
  enumerationType="plain"
@@ -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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,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"}
@@ -0,0 +1,4 @@
1
+ import { RefObject } from 'react';
2
+ export declare const createEvent: (ref: RefObject<HTMLSelectElement>) => import("react").ChangeEvent<HTMLSelectElement> | null;
3
+ export declare const createSyntheticEvent: <T extends Element, E extends Event>(event: E) => import("react").SyntheticEvent<T, E>;
4
+ //# sourceMappingURL=syntheticEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntheticEvent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/syntheticEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,WAAW,QAAS,UAAU,iBAAiB,CAAC,0DAS5D,CAAC;AAEF,eAAO,MAAM,oBAAoB,wFA4BhC,CAAC"}
@@ -1,5 +1,5 @@
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
2
  export type { ComboboxProps as ComboboxOldProps } from './ComboboxOld';
3
- export { comboboxTokens as comboboxNewTokens, comboboxRoot as comboboxNewRoot, comboboxConfig as comboboxNewConfig, } from './ComboboxNew';
3
+ export { comboboxTokens as comboboxNewTokens, comboboxRoot as comboboxNewRoot, comboboxConfig as comboboxNewConfig, boundCombobox, } from './ComboboxNew';
4
4
  export type { ItemOption, ComboboxProps } from './ComboboxNew';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,EACnC,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,eAAe,IAAI,kBAAkB,EACrC,cAAc,IAAI,iBAAiB,GACtC,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EACH,cAAc,IAAI,iBAAiB,EACnC,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,GACtC,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,EACnC,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,eAAe,IAAI,kBAAkB,EACrC,cAAc,IAAI,iBAAiB,GACtC,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EACH,cAAc,IAAI,iBAAiB,EACnC,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,EACnC,aAAa,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,KAAK,EAAuC,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAoCjH,eAAO,MAAM,IAAI,0CAGhB,CAAC;AAIF,eAAO,MAAM,aAAa,SAAU,UAAU,cAAc,EAAE,kBAAkB,CAAC,4FA6Y5E,CAAC;AAEN,eAAO,MAAM,eAAe;;;mBA/YQ,UAAU,cAAc,EAAE,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqbhF,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,KAAK,EAAuC,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAoCjH,eAAO,MAAM,IAAI,0CAGhB,CAAC;AAIF,eAAO,MAAM,aAAa,SAAU,UAAU,cAAc,EAAE,kBAAkB,CAAC,4FAmY5E,CAAC;AAEN,eAAO,MAAM,eAAe;;;mBArYQ,UAAU,cAAc,EAAE,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ahF,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ForwardedRef, ComponentProps, ReactElement } from 'react';
1
+ import type { ForwardedRef, ComponentProps, ReactElement, FC } from 'react';
2
2
  import type { ComboboxProps, ItemOption } from '../../../../components/Combobox';
3
3
  import { config } from './Combobox.config';
4
4
  declare const ComboboxComponent: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
@@ -917,5 +917,6 @@ declare const Combobox: <T extends ItemOption>(props: Omit<ComboboxProps<T>, "vi
917
917
  } & Omit<import("react").ButtonHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & import("react").RefAttributes<HTMLInputElement>)), "view" | "disabled" | "readOnly" | "size" | "labelPlacement"> & {
918
918
  ref?: ForwardedRef<HTMLInputElement> | undefined;
919
919
  }) => ReactElement | null;
920
- export { Combobox };
920
+ declare const ComboboxWithForm: FC<import("../../../../components/Combobox/ComboboxNew/Combobox.types").ComboboxBoundlerPropsComponent>;
921
+ export { Combobox, ComboboxWithForm };
921
922
  //# sourceMappingURL=Combobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Combobox/Combobox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIxE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAET,YAAY,GAAG,IAAI,CAAC;AAEzB,QAAA,MAAM,gBAAgB,yGAGpB,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,56 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var createEvent = function createEvent(ref) {
6
- if (ref.current) {
7
- var event = new Event('change', {
8
- bubbles: true
9
- });
10
- Object.defineProperty(event, 'target', {
11
- writable: false,
12
- value: ref.current
13
- });
14
- var syntheticEvent = createSyntheticEvent(event);
15
- console.log(syntheticEvent);
16
- return syntheticEvent;
17
- }
18
- return null;
19
- };
20
- var createSyntheticEvent = function createSyntheticEvent(event) {
21
- var _isDefaultPrevented = false;
22
- var _isPropagationStopped = false;
23
- var preventDefault = function preventDefault() {
24
- _isDefaultPrevented = true;
25
- event.preventDefault();
26
- };
27
- var stopPropagation = function stopPropagation() {
28
- _isPropagationStopped = true;
29
- event.stopPropagation();
30
- };
31
- return {
32
- nativeEvent: event,
33
- currentTarget: event.currentTarget,
34
- target: event.target,
35
- bubbles: event.bubbles,
36
- cancelable: event.cancelable,
37
- defaultPrevented: event.defaultPrevented,
38
- eventPhase: event.eventPhase,
39
- isTrusted: event.isTrusted,
40
- preventDefault: preventDefault,
41
- isDefaultPrevented: function isDefaultPrevented() {
42
- return _isDefaultPrevented;
43
- },
44
- stopPropagation: stopPropagation,
45
- isPropagationStopped: function isPropagationStopped() {
46
- return _isPropagationStopped;
47
- },
48
- persist: function persist() {},
49
- timeStamp: event.timeStamp,
50
- type: event.type
51
- };
52
- };
53
-
54
- exports.createEvent = createEvent;
55
- exports.createSyntheticEvent = createSyntheticEvent;
56
- //# sourceMappingURL=syntheticEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"syntheticEvent.js","sources":["../../src/utils/syntheticEvent.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const createEvent = (ref: RefObject<HTMLInputElement>) => {\n if (ref.current) {\n const event = new Event('change', { bubbles: true });\n Object.defineProperty(event, 'target', { writable: false, value: ref.current });\n const syntheticEvent = createSyntheticEvent(event) as React.ChangeEvent<typeof ref.current>;\n console.log(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n};\n\nexport const createSyntheticEvent = <T extends Element, E extends Event>(event: E): React.SyntheticEvent<T, E> => {\n let isDefaultPrevented = false;\n let isPropagationStopped = false;\n const preventDefault = () => {\n isDefaultPrevented = true;\n event.preventDefault();\n };\n const stopPropagation = () => {\n isPropagationStopped = true;\n event.stopPropagation();\n };\n return {\n nativeEvent: event,\n currentTarget: event.currentTarget as EventTarget & T,\n target: event.target as EventTarget & T,\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n defaultPrevented: event.defaultPrevented,\n eventPhase: event.eventPhase,\n isTrusted: event.isTrusted,\n preventDefault,\n isDefaultPrevented: () => isDefaultPrevented,\n stopPropagation,\n isPropagationStopped: () => isPropagationStopped,\n persist: () => {},\n timeStamp: event.timeStamp,\n type: event.type,\n };\n};\n"],"names":["createEvent","ref","current","event","Event","bubbles","Object","defineProperty","writable","value","syntheticEvent","createSyntheticEvent","console","log","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","nativeEvent","currentTarget","target","cancelable","defaultPrevented","eventPhase","isTrusted","persist","timeStamp","type"],"mappings":";;;;IAEaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAgC,EAAK;EAC7D,IAAIA,GA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