@salutejs/plasma-new-hope 0.186.0-canary.1541.11711445984.0 → 0.186.0-canary.1542.11725164051.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) 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/Combobox/ComboboxNew/utils/getForm.js +80 -0
  4. package/cjs/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
  5. package/cjs/{utils → components/Combobox/ComboboxNew/utils}/syntheticEvent.js +0 -1
  6. package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
  7. package/cjs/components/TextField/TextField.js +0 -11
  8. package/cjs/components/TextField/TextField.js.map +1 -1
  9. package/cjs/index.js +4 -0
  10. package/cjs/index.js.map +1 -1
  11. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
  12. package/emotion/cjs/components/Combobox/ComboboxNew/index.js +15 -1
  13. package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +89 -0
  14. package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
  15. package/{styled-components/cjs → emotion/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  16. package/emotion/cjs/components/Combobox/index.js +12 -0
  17. package/emotion/cjs/components/TextField/TextField.js +1 -12
  18. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
  19. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
  20. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  21. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
  22. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
  23. package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
  24. package/emotion/es/components/Combobox/ComboboxNew/index.js +3 -1
  25. package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +80 -0
  26. package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
  27. package/{styled-components/es → emotion/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  28. package/emotion/es/components/Combobox/index.js +1 -1
  29. package/emotion/es/components/TextField/TextField.js +1 -12
  30. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
  31. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
  32. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  33. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
  34. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
  35. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +18 -0
  36. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +1 -0
  37. package/es/components/Combobox/ComboboxNew/utils/getForm.js +76 -0
  38. package/es/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
  39. package/es/{utils → components/Combobox/ComboboxNew/utils}/syntheticEvent.js +0 -1
  40. package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
  41. package/es/components/TextField/TextField.js +0 -11
  42. package/es/components/TextField/TextField.js.map +1 -1
  43. package/es/index.js +2 -0
  44. package/es/index.js.map +1 -1
  45. package/package.json +2 -2
  46. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +21 -0
  47. package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +15 -1
  48. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +89 -0
  49. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
  50. package/{emotion/cjs → styled-components/cjs/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  51. package/styled-components/cjs/components/Combobox/index.js +12 -0
  52. package/styled-components/cjs/components/TextField/TextField.js +0 -11
  53. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
  54. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
  55. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  56. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
  57. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
  58. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +14 -0
  59. package/styled-components/es/components/Combobox/ComboboxNew/index.js +3 -1
  60. package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +80 -0
  61. package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
  62. package/{emotion/es → styled-components/es/components/Combobox/ComboboxNew}/utils/syntheticEvent.js +0 -1
  63. package/styled-components/es/components/Combobox/index.js +1 -1
  64. package/styled-components/es/components/TextField/TextField.js +0 -11
  65. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +6 -2
  66. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +62 -5
  67. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -1
  68. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
  69. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
  70. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +4 -0
  71. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +1 -0
  72. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +21 -0
  73. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  74. package/types/components/Combobox/ComboboxNew/index.d.ts +2 -0
  75. package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
  76. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +4 -0
  77. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -0
  78. package/types/components/Combobox/ComboboxNew/utils/index.d.ts +1 -0
  79. package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
  80. package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +4 -0
  81. package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +1 -0
  82. package/types/components/Combobox/index.d.ts +1 -1
  83. package/types/components/Combobox/index.d.ts.map +1 -1
  84. package/types/components/TextField/TextField.d.ts.map +1 -1
  85. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +459 -1
  86. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  87. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +459 -1
  88. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  89. package/cjs/utils/syntheticEvent.js.map +0 -1
  90. package/es/utils/syntheticEvent.js.map +0 -1
  91. package/types/utils/syntheticEvent.d.ts +0 -4
  92. package/types/utils/syntheticEvent.d.ts.map +0 -1
@@ -5,9 +5,9 @@ import type { Meta, StoryObj } from '@storybook/react';
5
5
  import { WithTheme } from '../../../_helpers';
6
6
  import { IconDone } from '../../../../components/_Icon';
7
7
 
8
- import { Combobox } from './Combobox';
8
+ import { ComboboxWithForm } from './Combobox';
9
9
 
10
- type StorySelectProps = ComponentProps<typeof Combobox> & {
10
+ type StorySelectProps = ComponentProps<typeof ComboboxWithForm> & {
11
11
  enableContentLeft?: boolean;
12
12
  };
13
13
 
@@ -19,7 +19,7 @@ const variant = ['normal', 'tight'];
19
19
  const meta: Meta<StorySelectProps> = {
20
20
  title: 'plasma_web/Combobox',
21
21
  decorators: [WithTheme],
22
- component: Combobox,
22
+ component: ComboboxWithForm,
23
23
  argTypes: {
24
24
  size: {
25
25
  options: size,
@@ -356,7 +356,7 @@ const SingleStory = (args: StorySelectProps) => {
356
356
 
357
357
  return (
358
358
  <div style={{ width: '400px' }}>
359
- <Combobox
359
+ <ComboboxWithForm
360
360
  {...args}
361
361
  items={items}
362
362
  value={value}
@@ -384,7 +384,7 @@ const MultipleStory = (args: StorySelectProps) => {
384
384
 
385
385
  return (
386
386
  <div style={{ width: '400px' }}>
387
- <Combobox
387
+ <ComboboxWithForm
388
388
  {...args}
389
389
  multiple
390
390
  items={items}
@@ -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,4 @@
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';
4
+ export { getFormComponentGenerator } from './utils';
@@ -0,0 +1,80 @@
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
+ import React, { useEffect, useRef, useState } from 'react';
13
+ import { createEvent } from './syntheticEvent';
14
+ var SingleForm = function SingleForm(args) {
15
+ var onChange = args.onChange,
16
+ Component = args.component,
17
+ rest = _objectWithoutProperties(args, _excluded);
18
+ var _useState = useState(),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ value = _useState2[0],
21
+ setValue = _useState2[1];
22
+ var selectRef = useRef(null);
23
+ var handleChange = function handleChange(value) {
24
+ setValue(value);
25
+ };
26
+ useEffect(function () {
27
+ var event = createEvent(selectRef);
28
+ onChange && onChange(event);
29
+ }, [value]);
30
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
31
+ ref: selectRef,
32
+ value: value,
33
+ hidden: true
34
+ }, /*#__PURE__*/React.createElement("option", {
35
+ value: value
36
+ }, value)), /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
37
+ value: value,
38
+ onChange: handleChange
39
+ })));
40
+ };
41
+ var MultipleForm = function MultipleForm(args) {
42
+ var onChange = args.onChange,
43
+ Component = args.component,
44
+ rest = _objectWithoutProperties(args, _excluded2);
45
+ var _useState3 = useState([]),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ values = _useState4[0],
48
+ setValues = _useState4[1];
49
+ var selectRef = useRef(null);
50
+ var handleChange = function handleChange(value) {
51
+ setValues(value);
52
+ };
53
+ useEffect(function () {
54
+ var event = createEvent(selectRef);
55
+ onChange && onChange(event);
56
+ }, [values]);
57
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
58
+ ref: selectRef,
59
+ value: values,
60
+ multiple: true,
61
+ hidden: true
62
+ }, values.map(function (value) {
63
+ return /*#__PURE__*/React.createElement("option", {
64
+ key: value,
65
+ value: value
66
+ }, value);
67
+ })), /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
68
+ value: values,
69
+ onChange: handleChange
70
+ })));
71
+ };
72
+ export var getFormComponentGenerator = function getFormComponentGenerator(Component) {
73
+ return function (args) {
74
+ return args.multiple ? /*#__PURE__*/React.createElement(MultipleForm, _extends({}, args, {
75
+ component: Component
76
+ })) : /*#__PURE__*/React.createElement(SingleForm, _extends({}, args, {
77
+ component: Component
78
+ }));
79
+ };
80
+ };
@@ -5,4 +5,5 @@ export { updateSingleAncestors } from './updateSingleAncestors';
5
5
  export { sizeToIconSize } from './sizeToIconSize';
6
6
  export { filterItems } from './filterItems';
7
7
  export { getItemId } from './getItemId';
8
- export { getInitialValue } from './getInitialValue';
8
+ export { getInitialValue } from './getInitialValue';
9
+ export { getFormComponentGenerator } from './getForm';
@@ -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, getFormComponentGenerator } 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,11 @@
1
1
  import { component, mergeConfig } from '../../../../engines';
2
- import { comboboxNewConfig } from '../../../..';
2
+ import { comboboxNewConfig, boundCombobox, getFormComponentGenerator } from '../../../..';
3
3
  import { config } from './Combobox.config';
4
4
  var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
5
5
  var ComboboxComponent = /*#__PURE__*/component(mergedConfig);
6
6
  var Combobox = ComboboxComponent;
7
- export { Combobox };
7
+ var ComboboxWithForm = /*#__PURE__*/boundCombobox({
8
+ base: ComboboxComponent,
9
+ baseForm: /*#__PURE__*/getFormComponentGenerator(ComboboxComponent)
10
+ });
11
+ export { Combobox, ComboboxWithForm };
@@ -5,9 +5,9 @@ import type { Meta, StoryObj } from '@storybook/react';
5
5
  import { WithTheme } from '../../../_helpers';
6
6
  import { IconDone } from '../../../../components/_Icon';
7
7
 
8
- import { Combobox } from './Combobox';
8
+ import { ComboboxWithForm } from './Combobox';
9
9
 
10
- type StorySelectProps = ComponentProps<typeof Combobox> & {
10
+ type StorySelectProps = ComponentProps<typeof ComboboxWithForm> & {
11
11
  enableContentLeft?: boolean;
12
12
  };
13
13
 
@@ -19,7 +19,7 @@ const variant = ['normal', 'tight'];
19
19
  const meta: Meta<StorySelectProps> = {
20
20
  title: 'plasma_b2c/Combobox',
21
21
  decorators: [WithTheme],
22
- component: Combobox,
22
+ component: ComboboxWithForm,
23
23
  argTypes: {
24
24
  size: {
25
25
  options: size,
@@ -356,7 +356,7 @@ const SingleStory = (args: StorySelectProps) => {
356
356
 
357
357
  return (
358
358
  <div style={{ width: '400px' }}>
359
- <Combobox
359
+ <ComboboxWithForm
360
360
  {...args}
361
361
  items={items}
362
362
  value={value}
@@ -367,6 +367,24 @@ const SingleStory = (args: StorySelectProps) => {
367
367
  );
368
368
  };
369
369
 
370
+ const SingleFormStory = (args: StorySelectProps) => {
371
+ const handleChange = (event) => {
372
+ console.log(event);
373
+ };
374
+
375
+ return (
376
+ <div style={{ width: '400px' }}>
377
+ <ComboboxWithForm
378
+ {...args}
379
+ items={items}
380
+ formType
381
+ onChange={handleChange}
382
+ contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
383
+ />
384
+ </div>
385
+ );
386
+ };
387
+
370
388
  export const Single: StoryObj<StorySelectProps> = {
371
389
  render: (args) => <SingleStory {...args} />,
372
390
  args: {
@@ -379,14 +397,27 @@ export const Single: StoryObj<StorySelectProps> = {
379
397
  },
380
398
  };
381
399
 
400
+ export const SingleForm: StoryObj<StorySelectProps> = {
401
+ render: (args) => <SingleFormStory {...args} />,
402
+ args: {
403
+ closeAfterSelect: true,
404
+ },
405
+ parameters: {
406
+ controls: {
407
+ exclude: ['isTargetAmount'],
408
+ },
409
+ },
410
+ };
411
+
382
412
  const MultipleStory = (args: StorySelectProps) => {
383
413
  const [value, setValue] = useState([]);
384
414
 
385
415
  return (
386
416
  <div style={{ width: '400px' }}>
387
- <Combobox
417
+ <ComboboxWithForm
388
418
  {...args}
389
419
  multiple
420
+ formType={false}
390
421
  items={items}
391
422
  value={value}
392
423
  onChange={setValue}
@@ -396,9 +427,35 @@ const MultipleStory = (args: StorySelectProps) => {
396
427
  );
397
428
  };
398
429
 
430
+ const MultipleStoryForm = (args: StorySelectProps) => {
431
+ const handleChange = (event) => {
432
+ console.log(event);
433
+ };
434
+
435
+ return (
436
+ <div style={{ width: '400px' }}>
437
+ <ComboboxWithForm
438
+ {...args}
439
+ multiple
440
+ formType
441
+ onChange={handleChange}
442
+ items={items}
443
+ contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
444
+ />
445
+ </div>
446
+ );
447
+ };
448
+
399
449
  export const Multiple: StoryObj<StorySelectProps> = {
400
450
  render: (args) => <MultipleStory {...args} />,
401
451
  args: {
402
452
  closeAfterSelect: false,
403
453
  },
404
454
  };
455
+
456
+ export const MultipleForm: StoryObj<StorySelectProps> = {
457
+ render: (args) => <MultipleStoryForm {...args} />,
458
+ args: {
459
+ closeAfterSelect: false,
460
+ },
461
+ };
@@ -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"
@@ -1,7 +1,11 @@
1
1
  import { component, mergeConfig } from '../../../../engines';
2
- import { comboboxNewConfig } from '../../../..';
2
+ import { comboboxNewConfig, boundCombobox, getFormComponentGenerator } from '../../../..';
3
3
  import { config } from './Combobox.config';
4
4
  var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
5
5
  var ComboboxComponent = /*#__PURE__*/component(mergedConfig);
6
6
  var Combobox = ComboboxComponent;
7
- export { Combobox };
7
+ var ComboboxWithForm = /*#__PURE__*/boundCombobox({
8
+ base: ComboboxComponent,
9
+ baseForm: /*#__PURE__*/getFormComponentGenerator(ComboboxComponent)
10
+ });
11
+ export { Combobox, ComboboxWithForm };
@@ -5,9 +5,9 @@ import type { Meta, StoryObj } from '@storybook/react';
5
5
  import { WithTheme } from '../../../_helpers';
6
6
  import { IconDone } from '../../../../components/_Icon';
7
7
 
8
- import { Combobox } from './Combobox';
8
+ import { ComboboxWithForm } from './Combobox';
9
9
 
10
- type StorySelectProps = ComponentProps<typeof Combobox> & {
10
+ type StorySelectProps = ComponentProps<typeof ComboboxWithForm> & {
11
11
  enableContentLeft?: boolean;
12
12
  };
13
13
 
@@ -19,7 +19,7 @@ const variant = ['normal', 'tight'];
19
19
  const meta: Meta<StorySelectProps> = {
20
20
  title: 'plasma_web/Combobox',
21
21
  decorators: [WithTheme],
22
- component: Combobox,
22
+ component: ComboboxWithForm,
23
23
  argTypes: {
24
24
  size: {
25
25
  options: size,
@@ -356,7 +356,7 @@ const SingleStory = (args: StorySelectProps) => {
356
356
 
357
357
  return (
358
358
  <div style={{ width: '400px' }}>
359
- <Combobox
359
+ <ComboboxWithForm
360
360
  {...args}
361
361
  items={items}
362
362
  value={value}
@@ -384,7 +384,7 @@ const MultipleStory = (args: StorySelectProps) => {
384
384
 
385
385
  return (
386
386
  <div style={{ width: '400px' }}>
387
- <Combobox
387
+ <ComboboxWithForm
388
388
  {...args}
389
389
  multiple
390
390
  items={items}
@@ -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,GAA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AAC;CACnB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,oBAAoB,GAAG,gBAAgB,CAAC"}
@@ -2,4 +2,6 @@ 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';
6
+ export { getFormComponentGenerator } from './utils';
5
7
  //# 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;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ComponentType } from 'react';
2
+ import { ComboboxProps, ComboboxFormProps } from '../Combobox.types';
3
+ export declare const getFormComponentGenerator: (Component: ComponentType<ComboboxProps>) => (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":"AAAA,OAAc,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA4DrE,eAAO,MAAM,yBAAyB,cAAe,cAAc,aAAa,CAAC,YAC/D,iBAAiB,gBAOlC,CAAC"}
@@ -6,4 +6,5 @@ export { sizeToIconSize } from './sizeToIconSize';
6
6
  export { filterItems } from './filterItems';
7
7
  export { getItemId } from './getItemId';
8
8
  export { getInitialValue } from './getInitialValue';
9
+ export { getFormComponentGenerator } from './getForm';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,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, getFormComponentGenerator, } 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,EACb,yBAAyB,GAC5B,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"}