@salutejs/plasma-new-hope 0.186.0-canary.1542.11716355955.0 → 0.186.0-canary.1542.11726237853.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/utils/getForm.js +86 -0
- package/cjs/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +55 -0
- package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/index.js +8 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +10 -5
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/emotion/cjs/components/Combobox/index.js +6 -0
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -5
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/emotion/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +10 -7
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -5
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/es/components/Combobox/ComboboxNew/utils/getForm.js +82 -0
- package/es/components/Combobox/ComboboxNew/utils/getForm.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +50 -0
- package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +1 -0
- 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/index.js +8 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +10 -5
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/styled-components/cjs/components/Combobox/index.js +6 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -5
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/styled-components/es/components/Combobox/ComboboxNew/index.js +2 -1
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +10 -7
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/styled-components/es/components/Combobox/index.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -5
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.js +6 -2
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +5 -5
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +2 -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 +2 -2
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/Combobox/index.d.ts +1 -1
- package/types/components/Combobox/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +459 -2
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +459 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getForm.js","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/getForm.tsx"],"sourcesContent":["import React, { ComponentType, useEffect, useRef, useState } from 'react';\n\nimport { ComboboxProps, ComboboxFormProps } from '../Combobox.types';\n\nimport { createEvent } from './syntheticEvent';\n\ntype ComboboxWithComponent = ComboboxFormProps & {\n component: ComponentType<ComboboxProps>;\n};\n\nconst SingleForm = (args: ComboboxWithComponent) => {\n const { onChange, name, defaultValue, component: Component, ...rest } = args;\n const [value, setValue] = useState<string | undefined>(String(defaultValue));\n const selectRef = useRef<HTMLSelectElement | null>(null);\n\n const handleChange = (value: string) => {\n setValue(value);\n };\n\n useEffect(() => {\n const event = createEvent(selectRef);\n onChange && onChange(event);\n }, [value]);\n\n return (\n <>\n <select ref={selectRef} value={value} name={name} hidden>\n <option value={value}>{value}</option>\n </select>\n <Component {...(rest as any)} value={value} onChange={handleChange} />\n </>\n );\n};\n\nconst MultipleForm = (args: ComboboxWithComponent) => {\n const { onChange, name, defaultValue, component: Component, ...rest } = args;\n const [values, setValues] = useState<string[]>(defaultValue && Array.isArray(defaultValue) ? defaultValue : []);\n const selectRef = useRef<HTMLSelectElement | null>(null);\n\n const handleChange = (value: string[]) => {\n setValues(value);\n };\n\n useEffect(() => {\n const event = createEvent(selectRef);\n onChange && onChange(event);\n }, [values]);\n\n return (\n <>\n <select ref={selectRef} value={values} name={name} multiple hidden>\n {values.map((value) => (\n <option key={value} value={value}>\n {value}\n </option>\n ))}\n </select>\n <Component {...(rest as any)} value={values} onChange={handleChange} />\n </>\n );\n};\n\nexport const getFormComponentGenerator = (Component: ComponentType<ComboboxProps>) => {\n return (args: ComboboxFormProps) => {\n return args.multiple ? (\n <MultipleForm {...args} component={Component} />\n ) : (\n <SingleForm {...args} component={Component} />\n );\n };\n};\n"],"names":["SingleForm","args","onChange","name","defaultValue","Component","component","rest","_objectWithoutProperties","_excluded","_useState","useState","String","_useState2","_slicedToArray","value","setValue","selectRef","useRef","handleChange","useEffect","event","createEvent","React","createElement","Fragment","ref","hidden","_extends","MultipleForm","_excluded2","_useState3","Array","isArray","_useState4","values","setValues","multiple","map","key","getFormComponentGenerator"],"mappings":";;;;;;AAUA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA2B,EAAK;AAChD,EAAA,IAAQC,QAAQ,GAAwDD,IAAI,CAApEC,QAAQ;IAAEC,IAAI,GAAkDF,IAAI,CAA1DE,IAAI;IAAEC,YAAY,GAAoCH,IAAI,CAApDG,YAAY;IAAaC,SAAS,GAAcJ,IAAI,CAAtCK,SAAS;AAAgBC,IAAAA,IAAI,GAAAC,wBAAA,CAAKP,IAAI,EAAAQ,SAAA,CAAA,CAAA;EAC5E,IAAAC,SAAA,GAA0BC,QAAQ,CAAqBC,MAAM,CAACR,YAAY,CAAC,CAAC;IAAAS,UAAA,GAAAC,cAAA,CAAAJ,SAAA,EAAA,CAAA,CAAA;AAArEK,IAAAA,KAAK,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,QAAQ,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AACtB,EAAA,IAAMI,SAAS,GAAGC,MAAM,CAA2B,IAAI,CAAC,CAAA;AAExD,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIJ,KAAa,EAAK;IACpCC,QAAQ,CAACD,KAAK,CAAC,CAAA;GAClB,CAAA;AAEDK,EAAAA,SAAS,CAAC,YAAM;AACZ,IAAA,IAAMC,KAAK,GAAGC,WAAW,CAACL,SAAS,CAAC,CAAA;AACpCf,IAAAA,QAAQ,IAAIA,QAAQ,CAACmB,KAAK,CAAC,CAAA;AAC/B,GAAC,EAAE,CAACN,KAAK,CAAC,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A,CAAAC,aAAA,CAACK,YAAY,EAAAD,QAAA,CAAA,EAAA,EAAK3B,IAAI,EAAA;AAAEK,MAAAA,SAAS,EAAED,SAAAA;KAAY,CAAA,CAAC,gBAEhDkB,KAAA,CAAAC,aAAA,CAACxB,UAAU,EAAA4B,QAAA,CAAA,EAAA,EAAK3B,IAAI,EAAA;AAAEK,MAAAA,SAAS,EAAED,SAAAA;AAAU,KAAA,CAAE,CAChD,CAAA;GACJ,CAAA;AACL;;;;"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
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
|
+
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
|
+
};
|
48
|
+
|
49
|
+
export { createEvent, createSyntheticEvent };
|
50
|
+
//# sourceMappingURL=syntheticEvent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"syntheticEvent.js","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/syntheticEvent.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const createEvent = (ref: RefObject<HTMLSelectElement>) => {\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 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","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","nativeEvent","currentTarget","target","cancelable","defaultPrevented","eventPhase","isTrusted","persist","timeStamp","type"],"mappings":"IAEaA,WAAW,GAAG,S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C5BC,SAAS,EAAEnB,KAAK,CAACmB,SAAS;AAC1BR,IAAAA,cAAc,EAAdA,cAAc;IACdF,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;AAAA,MAAA,OAAMA,mBAAkB,CAAA;AAAA,KAAA;AAC5CG,IAAAA,eAAe,EAAfA,eAAe;IACfF,oBAAoB,EAAE,SAAAA,oBAAA,GAAA;AAAA,MAAA,OAAMA,qBAAoB,CAAA;AAAA,KAAA;AAChDU,IAAAA,OAAO,EAAE,SAAAA,OAAA,GAAM,EAAE;IACjBC,SAAS,EAAErB,KAAK,CAACqB,SAAS;IAC1BC,IAAI,EAAEtB,KAAK,CAACsB,IAAAA;GACf,CAAA;AACL;;;;"}
|
package/es/index.js
CHANGED
@@ -160,6 +160,7 @@ export { classes as comboboxOldClasses, tokens as comboboxOldTokens } from './co
|
|
160
160
|
export { tokens as comboboxNewTokens } from './components/Combobox/ComboboxNew/Combobox.tokens.js';
|
161
161
|
export { comboboxConfig as comboboxNewConfig, comboboxRoot as comboboxNewRoot } from './components/Combobox/ComboboxNew/Combobox.js';
|
162
162
|
export { boundCombobox } from './components/Combobox/ComboboxNew/Combobox.boundler.js';
|
163
|
+
export { getFormComponentGenerator } from './components/Combobox/ComboboxNew/utils/getForm.js';
|
163
164
|
export { indicatorConfig, indicatorRoot } from './components/Indicator/Indicator.js';
|
164
165
|
export { tokens as indicatorTokens } from './components/Indicator/Indicator.tokens.js';
|
165
166
|
export { gridConfig, gridRoot } from './components/Grid/Grid.js';
|
package/es/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.186.0-canary.1542.
|
3
|
+
"version": "0.186.0-canary.1542.11726237853.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -128,5 +128,5 @@
|
|
128
128
|
"sideEffects": [
|
129
129
|
"*.css"
|
130
130
|
],
|
131
|
-
"gitHead": "
|
131
|
+
"gitHead": "49f8f690dcf9719d488c8b7c920c245fb77a9194"
|
132
132
|
}
|
@@ -27,6 +27,13 @@ Object.defineProperty(exports, "comboboxTokens", {
|
|
27
27
|
return _Combobox2.tokens;
|
28
28
|
}
|
29
29
|
});
|
30
|
+
Object.defineProperty(exports, "getFormComponentGenerator", {
|
31
|
+
enumerable: true,
|
32
|
+
get: function get() {
|
33
|
+
return _utils.getFormComponentGenerator;
|
34
|
+
}
|
35
|
+
});
|
30
36
|
var _Combobox = /*#__PURE__*/require("./Combobox");
|
31
37
|
var _Combobox2 = /*#__PURE__*/require("./Combobox.tokens");
|
32
|
-
var _Combobox3 = /*#__PURE__*/require("./Combobox.boundler");
|
38
|
+
var _Combobox3 = /*#__PURE__*/require("./Combobox.boundler");
|
39
|
+
var _utils = /*#__PURE__*/require("./utils");
|
@@ -7,9 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.getFormComponentGenerator = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
9
|
var _syntheticEvent = /*#__PURE__*/require("./syntheticEvent");
|
10
|
-
var _excluded = ["onChange", "component"],
|
11
|
-
_excluded2 = ["onChange", "component"];
|
12
|
-
// @ts-nocheck
|
10
|
+
var _excluded = ["onChange", "name", "defaultValue", "component"],
|
11
|
+
_excluded2 = ["onChange", "name", "defaultValue", "component"];
|
13
12
|
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); }
|
14
13
|
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; }
|
15
14
|
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); }
|
@@ -23,9 +22,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
23
22
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
24
23
|
var SingleForm = function SingleForm(args) {
|
25
24
|
var onChange = args.onChange,
|
25
|
+
name = args.name,
|
26
|
+
defaultValue = args.defaultValue,
|
26
27
|
Component = args.component,
|
27
28
|
rest = _objectWithoutProperties(args, _excluded);
|
28
|
-
var _useState = (0, _react.useState)(),
|
29
|
+
var _useState = (0, _react.useState)(String(defaultValue)),
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
30
31
|
value = _useState2[0],
|
31
32
|
setValue = _useState2[1];
|
@@ -40,6 +41,7 @@ var SingleForm = function SingleForm(args) {
|
|
40
41
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("select", {
|
41
42
|
ref: selectRef,
|
42
43
|
value: value,
|
44
|
+
name: name,
|
43
45
|
hidden: true
|
44
46
|
}, /*#__PURE__*/_react["default"].createElement("option", {
|
45
47
|
value: value
|
@@ -50,9 +52,11 @@ var SingleForm = function SingleForm(args) {
|
|
50
52
|
};
|
51
53
|
var MultipleForm = function MultipleForm(args) {
|
52
54
|
var onChange = args.onChange,
|
55
|
+
name = args.name,
|
56
|
+
defaultValue = args.defaultValue,
|
53
57
|
Component = args.component,
|
54
58
|
rest = _objectWithoutProperties(args, _excluded2);
|
55
|
-
var _useState3 = (0, _react.useState)([]),
|
59
|
+
var _useState3 = (0, _react.useState)(defaultValue && Array.isArray(defaultValue) ? defaultValue : []),
|
56
60
|
_useState4 = _slicedToArray(_useState3, 2),
|
57
61
|
values = _useState4[0],
|
58
62
|
setValues = _useState4[1];
|
@@ -67,6 +71,7 @@ var MultipleForm = function MultipleForm(args) {
|
|
67
71
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("select", {
|
68
72
|
ref: selectRef,
|
69
73
|
value: values,
|
74
|
+
name: name,
|
70
75
|
multiple: true,
|
71
76
|
hidden: true
|
72
77
|
}, values.map(function (value) {
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "filterItems", {
|
|
9
9
|
return _filterItems.filterItems;
|
10
10
|
}
|
11
11
|
});
|
12
|
+
Object.defineProperty(exports, "getFormComponentGenerator", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _getForm.getFormComponentGenerator;
|
16
|
+
}
|
17
|
+
});
|
12
18
|
Object.defineProperty(exports, "getInitialValue", {
|
13
19
|
enumerable: true,
|
14
20
|
get: function get() {
|
@@ -58,4 +64,5 @@ var _updateSingleAncestors = /*#__PURE__*/require("./updateSingleAncestors");
|
|
58
64
|
var _sizeToIconSize = /*#__PURE__*/require("./sizeToIconSize");
|
59
65
|
var _filterItems = /*#__PURE__*/require("./filterItems");
|
60
66
|
var _getItemId = /*#__PURE__*/require("./getItemId");
|
61
|
-
var _getInitialValue = /*#__PURE__*/require("./getInitialValue");
|
67
|
+
var _getInitialValue = /*#__PURE__*/require("./getInitialValue");
|
68
|
+
var _getForm = /*#__PURE__*/require("./getForm");
|
@@ -117,5 +117,11 @@ Object.defineProperty(exports, "comboboxOldTokens", {
|
|
117
117
|
return _ComboboxOld.comboboxTokens;
|
118
118
|
}
|
119
119
|
});
|
120
|
+
Object.defineProperty(exports, "getFormComponentGenerator", {
|
121
|
+
enumerable: true,
|
122
|
+
get: function get() {
|
123
|
+
return _ComboboxNew.getFormComponentGenerator;
|
124
|
+
}
|
125
|
+
});
|
120
126
|
var _ComboboxOld = /*#__PURE__*/require("./ComboboxOld");
|
121
127
|
var _ComboboxNew = /*#__PURE__*/require("./ComboboxNew");
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
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");
|
10
9
|
var _Combobox = /*#__PURE__*/require("./Combobox.config");
|
11
10
|
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_.comboboxNewConfig, _Combobox.config);
|
12
11
|
var ComboboxComponent = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
13
12
|
var Combobox = exports.Combobox = ComboboxComponent;
|
14
13
|
var ComboboxWithForm = exports.ComboboxWithForm = /*#__PURE__*/(0, _.boundCombobox)({
|
15
14
|
base: ComboboxComponent,
|
16
|
-
baseForm: /*#__PURE__*/(0,
|
15
|
+
baseForm: /*#__PURE__*/(0, _.getFormComponentGenerator)(ComboboxComponent)
|
17
16
|
});
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { 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';
|
8
7
|
|
9
|
-
import {
|
8
|
+
import { ComboboxWithForm } from './Combobox';
|
10
9
|
|
11
|
-
type StorySelectProps = ComponentProps<typeof
|
10
|
+
type StorySelectProps = ComponentProps<typeof ComboboxWithForm> & {
|
12
11
|
enableContentLeft?: boolean;
|
13
12
|
};
|
14
13
|
|
@@ -20,7 +19,7 @@ const variant = ['normal', 'tight'];
|
|
20
19
|
const meta: Meta<StorySelectProps> = {
|
21
20
|
title: 'plasma_b2c/Combobox',
|
22
21
|
decorators: [WithTheme],
|
23
|
-
component:
|
22
|
+
component: ComboboxWithForm,
|
24
23
|
argTypes: {
|
25
24
|
size: {
|
26
25
|
options: size,
|
@@ -3,10 +3,14 @@
|
|
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
9
|
var _Combobox = /*#__PURE__*/require("./Combobox.config");
|
10
10
|
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_.comboboxNewConfig, _Combobox.config);
|
11
11
|
var ComboboxComponent = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
12
|
-
var Combobox = exports.Combobox = ComboboxComponent;
|
12
|
+
var Combobox = exports.Combobox = ComboboxComponent;
|
13
|
+
var ComboboxWithForm = exports.ComboboxWithForm = /*#__PURE__*/(0, _.boundCombobox)({
|
14
|
+
base: ComboboxComponent,
|
15
|
+
baseForm: /*#__PURE__*/(0, _.getFormComponentGenerator)(ComboboxComponent)
|
16
|
+
});
|
@@ -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 {
|
8
|
+
import { ComboboxWithForm } from './Combobox';
|
9
9
|
|
10
|
-
type StorySelectProps = ComponentProps<typeof
|
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:
|
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
|
-
<
|
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
|
-
<
|
387
|
+
<ComboboxWithForm
|
388
388
|
{...args}
|
389
389
|
multiple
|
390
390
|
items={items}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export { comboboxConfig, comboboxRoot } from './Combobox';
|
2
2
|
export { tokens as comboboxTokens } from './Combobox.tokens';
|
3
|
-
export { boundCombobox } from './Combobox.boundler';
|
3
|
+
export { boundCombobox } from './Combobox.boundler';
|
4
|
+
export { getFormComponentGenerator } from './utils';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
var _excluded = ["onChange", "component"],
|
2
|
-
_excluded2 = ["onChange", "component"];
|
1
|
+
var _excluded = ["onChange", "name", "defaultValue", "component"],
|
2
|
+
_excluded2 = ["onChange", "name", "defaultValue", "component"];
|
3
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
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
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."); }
|
@@ -9,16 +9,15 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
9
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
10
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
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
12
|
import React, { useEffect, useRef, useState } from 'react';
|
16
13
|
import { createEvent } from './syntheticEvent';
|
17
14
|
var SingleForm = function SingleForm(args) {
|
18
15
|
var onChange = args.onChange,
|
16
|
+
name = args.name,
|
17
|
+
defaultValue = args.defaultValue,
|
19
18
|
Component = args.component,
|
20
19
|
rest = _objectWithoutProperties(args, _excluded);
|
21
|
-
var _useState = useState(),
|
20
|
+
var _useState = useState(String(defaultValue)),
|
22
21
|
_useState2 = _slicedToArray(_useState, 2),
|
23
22
|
value = _useState2[0],
|
24
23
|
setValue = _useState2[1];
|
@@ -33,6 +32,7 @@ var SingleForm = function SingleForm(args) {
|
|
33
32
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
|
34
33
|
ref: selectRef,
|
35
34
|
value: value,
|
35
|
+
name: name,
|
36
36
|
hidden: true
|
37
37
|
}, /*#__PURE__*/React.createElement("option", {
|
38
38
|
value: value
|
@@ -43,9 +43,11 @@ var SingleForm = function SingleForm(args) {
|
|
43
43
|
};
|
44
44
|
var MultipleForm = function MultipleForm(args) {
|
45
45
|
var onChange = args.onChange,
|
46
|
+
name = args.name,
|
47
|
+
defaultValue = args.defaultValue,
|
46
48
|
Component = args.component,
|
47
49
|
rest = _objectWithoutProperties(args, _excluded2);
|
48
|
-
var _useState3 = useState([]),
|
50
|
+
var _useState3 = useState(defaultValue && Array.isArray(defaultValue) ? defaultValue : []),
|
49
51
|
_useState4 = _slicedToArray(_useState3, 2),
|
50
52
|
values = _useState4[0],
|
51
53
|
setValues = _useState4[1];
|
@@ -60,6 +62,7 @@ var MultipleForm = function MultipleForm(args) {
|
|
60
62
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", {
|
61
63
|
ref: selectRef,
|
62
64
|
value: values,
|
65
|
+
name: name,
|
63
66
|
multiple: true,
|
64
67
|
hidden: true
|
65
68
|
}, values.map(function (value) {
|
@@ -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';
|
@@ -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, boundCombobox } from './ComboboxNew';
|
2
|
+
export { comboboxTokens as comboboxNewTokens, comboboxRoot as comboboxNewRoot, comboboxConfig as comboboxNewConfig, boundCombobox, getFormComponentGenerator } from './ComboboxNew';
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { component, mergeConfig } from '../../../../engines';
|
2
|
-
import { comboboxNewConfig, boundCombobox } from '../../../..';
|
3
|
-
import { getFormComponentGenerator } from '../../../../components/Combobox/ComboboxNew/utils/getForm';
|
2
|
+
import { comboboxNewConfig, boundCombobox, getFormComponentGenerator } from '../../../..';
|
4
3
|
import { config } from './Combobox.config';
|
5
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
|
6
5
|
var ComboboxComponent = /*#__PURE__*/component(mergedConfig);
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { 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';
|
8
7
|
|
9
|
-
import {
|
8
|
+
import { ComboboxWithForm } from './Combobox';
|
10
9
|
|
11
|
-
type StorySelectProps = ComponentProps<typeof
|
10
|
+
type StorySelectProps = ComponentProps<typeof ComboboxWithForm> & {
|
12
11
|
enableContentLeft?: boolean;
|
13
12
|
};
|
14
13
|
|
@@ -20,7 +19,7 @@ const variant = ['normal', 'tight'];
|
|
20
19
|
const meta: Meta<StorySelectProps> = {
|
21
20
|
title: 'plasma_b2c/Combobox',
|
22
21
|
decorators: [WithTheme],
|
23
|
-
component:
|
22
|
+
component: ComboboxWithForm,
|
24
23
|
argTypes: {
|
25
24
|
size: {
|
26
25
|
options: size,
|
@@ -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
|
-
|
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 {
|
8
|
+
import { ComboboxWithForm } from './Combobox';
|
9
9
|
|
10
|
-
type StorySelectProps = ComponentProps<typeof
|
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:
|
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
|
-
<
|
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
|
-
<
|
387
|
+
<ComboboxWithForm
|
388
388
|
{...args}
|
389
389
|
multiple
|
390
390
|
items={items}
|
@@ -180,10 +180,12 @@ export declare type ItemContext = {
|
|
180
180
|
declare type ComboboxFormBaseProps = {
|
181
181
|
onChange?: (event: React.ChangeEvent<HTMLSelectElement> | null) => void;
|
182
182
|
defaultValue?: string;
|
183
|
+
name?: string;
|
183
184
|
multiple?: false;
|
184
185
|
} | {
|
185
186
|
onChange?: (event: React.ChangeEvent<HTMLSelectElement> | null) => void;
|
186
187
|
defaultValue?: string[];
|
188
|
+
name?: string;
|
187
189
|
multiple?: true;
|
188
190
|
};
|
189
191
|
export declare type ComboboxFormProps = Omit<ComboboxProps, 'onChange' | 'defaultValue' | 'multiple'> & ComboboxFormBaseProps;
|
@@ -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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AC,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"}
|
@@ -3,4 +3,5 @@ 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
5
|
export { boundCombobox } from './Combobox.boundler';
|
6
|
+
export { getFormComponentGenerator } from './utils';
|
6
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;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,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"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ComponentType } from 'react';
|
2
|
-
import { ComboboxFormProps } from '../Combobox.types';
|
3
|
-
export declare const getFormComponentGenerator: (Component: ComponentType<
|
2
|
+
import { ComboboxProps, ComboboxFormProps } from '../Combobox.types';
|
3
|
+
export declare const getFormComponentGenerator: (Component: ComponentType<ComboboxProps>) => (args: ComboboxFormProps) => JSX.Element;
|
4
4
|
//# sourceMappingURL=getForm.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/ComboboxNew/utils/getForm.tsx"],"names":[],"mappings":"
|
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"}
|
@@ -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, boundCombobox, } 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,EACnC,aAAa,
|
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"}
|