@salutejs/plasma-b2c 1.413.0-canary.1470.11192852883.0 → 1.413.0-canary.1470.11195366738.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1234,7 +1234,7 @@ export const Combobox: CommonProps;
1234
1234
  // Warning: (ae-forgotten-export) The symbol "CommonProps2" needs to be exported by the entry point index.d.ts
1235
1235
  //
1236
1236
  // @public (undocumented)
1237
- export const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React_2.RefAttributes<HTMLInputElement>) => React_2.ReactNode;
1237
+ export const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React_2.RefAttributes<HTMLInputElement>) => React_2.ReactElement | null;
1238
1238
 
1239
1239
  // @public (undocumented)
1240
1240
  export const ComboboxDivider: FunctionComponent<PropsType<Variants> & HTMLAttributes<HTMLDivElement> & {
@@ -6,42 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Combobox = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
8
8
  var _Combobox = /*#__PURE__*/require("./Combobox.config");
9
- // import React from 'react';
10
-
11
9
  var mergedConfig = /*#__PURE__*/(0, _styledComponents.mergeConfig)(_styledComponents.comboboxNewConfig, _Combobox.config);
12
- var Combobox = exports.Combobox = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
13
-
14
- // type PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';
15
- //
16
- // type ComboboxType = <T extends ItemOption>(
17
- // props: Omit<ComboboxProps<T>, PropsFromConfig> &
18
- // Pick<ComponentProps<typeof ComboboxComponent>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> },
19
- // ) => ReactElement;
20
- //
21
- // const Combobox = ComboboxComponent as ComboboxType;
22
-
23
- // const items = [
24
- // {
25
- // value: 'north_america',
26
- // label: 'Северная Америка',
27
- // name: 'dima',
28
- // },
29
- // {
30
- // value: 'north_america',
31
- // label: 'Северная Америка',
32
- // name: 'dima',
33
- // },
34
- // ];
35
- //
36
- // const Func = () => {
37
- // return (
38
- // <Combobox
39
- // items={items}
40
- // renderItem={(item) => {
41
- // console.log(item);
42
- //
43
- // return <div>123</div>;
44
- // }}
45
- // />
46
- // );
47
- // };
10
+ var Combobox = exports.Combobox = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
@@ -14,4 +14,4 @@ declare type CommonProps = <T extends ItemOption>(props: PropsOld | (Omit<Combob
14
14
  export declare const Combobox: CommonProps;
15
15
  declare type PropsNew<T extends ItemOption> = Omit<ComboboxProps<T>, PropsFromConfig> & Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig>;
16
16
  declare type CommonProps2<T extends ItemOption> = PropsOld | PropsNew<T>;
17
- export declare const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React.RefAttributes<HTMLInputElement>) => React.ReactNode;
17
+ export declare const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
@@ -8,31 +8,5 @@ var Combobox_config = require('./Combobox.config.js');
8
8
  var mergedConfig = /*#__PURE__*/plasmaNewHope.mergeConfig(plasmaNewHope.comboboxNewConfig, Combobox_config.config);
9
9
  var Combobox = /*#__PURE__*/plasmaNewHope.component(mergedConfig);
10
10
 
11
- // const items = [
12
- // {
13
- // value: 'north_america',
14
- // label: 'Северная Америка',
15
- // name: 'dima',
16
- // },
17
- // {
18
- // value: 'north_america',
19
- // label: 'Северная Америка',
20
- // name: 'dima',
21
- // },
22
- // ];
23
- //
24
- // const Func = () => {
25
- // return (
26
- // <Combobox
27
- // items={items}
28
- // renderItem={(item) => {
29
- // console.log(item);
30
- //
31
- // return <div>123</div>;
32
- // }}
33
- // />
34
- // );
35
- // };
36
-
37
11
  exports.Combobox = Combobox;
38
12
  //# sourceMappingURL=Combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../../src-css/components/Combobox/Combobox.tsx"],"sourcesContent":["import { comboboxNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\n// import React from 'react';\nimport { config } from './Combobox.config';\n\nconst mergedConfig = mergeConfig(comboboxNewConfig, config);\nconst Combobox = component(mergedConfig);\n\n// type PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n//\n// type ComboboxType = <T extends ItemOption>(\n// props: Omit<ComboboxProps<T>, PropsFromConfig> &\n// Pick<ComponentProps<typeof ComboboxComponent>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> },\n// ) => ReactElement;\n//\n// const Combobox = ComboboxComponent as ComboboxType;\n\nexport { Combobox };\n\n// const items = [\n// {\n// value: 'north_america',\n// label: 'Северная Америка',\n// name: 'dima',\n// },\n// {\n// value: 'north_america',\n// label: 'Северная Америка',\n// name: 'dima',\n// },\n// ];\n//\n// const Func = () => {\n// return (\n// <Combobox\n// items={items}\n// renderItem={(item) => {\n// console.log(item);\n//\n// return <div>123</div>;\n// }}\n// />\n// );\n// };\n"],"names":["mergedConfig","mergeConfig","comboboxNewConfig","config","Combobox","component"],"mappings":";;;;;;;AAKA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,+BAAiB,EAAEC,sBAAM,CAAC,CAAA;AAC3D,IAAMC,QAAQ,gBAAGC,uBAAS,CAACL,YAAY,EAAC;;AAaxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"Combobox.js","sources":["../../../../src-css/components/Combobox/Combobox.ts"],"sourcesContent":["import { comboboxNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './Combobox.config';\n\nconst mergedConfig = mergeConfig(comboboxNewConfig, config);\nconst Combobox = component(mergedConfig);\n\nexport { Combobox };\n"],"names":["mergedConfig","mergeConfig","comboboxNewConfig","config","Combobox","component"],"mappings":";;;;;;;AAIA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,+BAAiB,EAAEC,sBAAM,CAAC,CAAA;AAC3D,IAAMC,QAAQ,gBAAGC,uBAAS,CAACL,YAAY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src-css/components/Combobox/index.tsx"],"sourcesContent":["import React, { forwardRef, ComponentProps, ForwardedRef, ReactElement } from 'react';\nimport type { ItemOption, ComboboxProps } from '@salutejs/plasma-new-hope';\n\nimport { Combobox as ComboboxOld } from './Legacy';\nimport { Combobox as ComboboxNew } from './Combobox';\n\nexport { ComboboxDivider, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxItem } from './Legacy';\n\nexport type { ComboboxOldProps as ComboboxProps } from '@salutejs/plasma-new-hope';\n\nfunction fixedForwardRef<T, P = {}>(\n render: (props: P, ref: React.Ref<T>) => React.ReactNode,\n): (props: P & React.RefAttributes<T>) => React.ReactNode {\n return forwardRef(render as any) as any;\n}\n\ntype PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n\ntype PropsOld = ComponentProps<typeof ComboboxOld> & { items?: never };\n\ntype CommonProps = <T extends ItemOption>(\n props:\n | PropsOld\n | (Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> }),\n) => ReactElement;\n\nconst ComboboxComponent = forwardRef<any, any>((props, ref) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...props} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n});\n\nexport const Combobox = ComboboxComponent as CommonProps;\n\n// Alternative approach\n\ntype PropsNew<T extends ItemOption> = Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig>;\n\ntype CommonProps2<T extends ItemOption> = PropsOld | PropsNew<T>;\n\nconst ComboboxComponent2 = <T extends ItemOption>(\n props: CommonProps2<T>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...(props as any)} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n};\n\nexport const Combobox2 = fixedForwardRef(ComboboxComponent2);\n"],"names":["fixedForwardRef","render","forwardRef","ComboboxComponent","props","ref","items","React","createElement","ComboboxNew","_extends","ComboboxOld","Combobox","ComboboxComponent2","Combobox2"],"mappings":";;;;;;;;;AAUA,SAASA,eAAeA,CACpBC,MAAwD,EACF;EACtD,oBAAOC,gBAAU,CAACD,MAAa,CAAC,CAAA;AACpC,CAAA;AAaA,IAAME,iBAAiB,gBAAGD,gBAAU,CAAW,UAACE,KAAK,EAAEC,GAAG,EAAK;EAC3D,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,mBAAW,EAAAC,iCAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,mBAAW,EAAAD,iCAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAC,CAAA;AAEK,IAAMQ,QAAQ,GAAGT,kBAAgC;;AAExD;;AAOA,IAAMU,kBAAkB,GAAG,SAArBA,kBAAkBA,CACpBT,KAAsB,EACtBC,GAAyC,EACxC;EACD,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,mBAAW,EAAAC,iCAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAAUD,EAAAA,KAAK,CAAW,CAAC,CAAA;AACxD,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,mBAAW,EAAAD,iCAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAA;IAEYU,SAAS,gBAAGd,eAAe,CAACa,kBAAkB;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src-css/components/Combobox/index.tsx"],"sourcesContent":["import React, { forwardRef, ComponentProps, ForwardedRef, ReactElement } from 'react';\nimport type { ItemOption, ComboboxProps } from '@salutejs/plasma-new-hope';\n\nimport { Combobox as ComboboxOld } from './Legacy';\nimport { Combobox as ComboboxNew } from './Combobox';\n\nexport { ComboboxDivider, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxItem } from './Legacy';\n\nexport type { ComboboxOldProps as ComboboxProps } from '@salutejs/plasma-new-hope';\n\nfunction fixedForwardRef<T, P = {}>(\n render: (props: P, ref: React.Ref<T>) => React.ReactElement | null,\n): (props: P & React.RefAttributes<T>) => React.ReactElement | null {\n return forwardRef(render as any) as any;\n}\n\ntype PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n\ntype PropsOld = ComponentProps<typeof ComboboxOld> & { items?: never };\n\ntype CommonProps = <T extends ItemOption>(\n props:\n | PropsOld\n | (Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> }),\n) => ReactElement;\n\nconst ComboboxComponent = forwardRef<any, any>((props, ref) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...props} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n});\n\nexport const Combobox = ComboboxComponent as CommonProps;\n\n// Alternative approach\n\ntype PropsNew<T extends ItemOption> = Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig>;\n\ntype CommonProps2<T extends ItemOption> = PropsOld | PropsNew<T>;\n\nconst ComboboxComponent2 = <T extends ItemOption>(\n props: CommonProps2<T>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...(props as any)} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n};\n\nexport const Combobox2 = fixedForwardRef(ComboboxComponent2);\n"],"names":["fixedForwardRef","render","forwardRef","ComboboxComponent","props","ref","items","React","createElement","ComboboxNew","_extends","ComboboxOld","Combobox","ComboboxComponent2","Combobox2"],"mappings":";;;;;;;;;AAUA,SAASA,eAAeA,CACpBC,MAAkE,EACF;EAChE,oBAAOC,gBAAU,CAACD,MAAa,CAAC,CAAA;AACpC,CAAA;AAaA,IAAME,iBAAiB,gBAAGD,gBAAU,CAAW,UAACE,KAAK,EAAEC,GAAG,EAAK;EAC3D,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,mBAAW,EAAAC,iCAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,mBAAW,EAAAD,iCAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAC,CAAA;AAEK,IAAMQ,QAAQ,GAAGT,kBAAgC;;AAExD;;AAOA,IAAMU,kBAAkB,GAAG,SAArBA,kBAAkBA,CACpBT,KAAsB,EACtBC,GAAyC,EACxC;EACD,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,mBAAW,EAAAC,iCAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAAUD,EAAAA,KAAK,CAAW,CAAC,CAAA;AACxD,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,mBAAW,EAAAD,iCAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAA;IAEYU,SAAS,gBAAGd,eAAe,CAACa,kBAAkB;;;;;;;;;;"}
@@ -4,31 +4,5 @@ import { config } from './Combobox.config.js';
4
4
  var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
5
5
  var Combobox = /*#__PURE__*/component(mergedConfig);
6
6
 
7
- // const items = [
8
- // {
9
- // value: 'north_america',
10
- // label: 'Северная Америка',
11
- // name: 'dima',
12
- // },
13
- // {
14
- // value: 'north_america',
15
- // label: 'Северная Америка',
16
- // name: 'dima',
17
- // },
18
- // ];
19
- //
20
- // const Func = () => {
21
- // return (
22
- // <Combobox
23
- // items={items}
24
- // renderItem={(item) => {
25
- // console.log(item);
26
- //
27
- // return <div>123</div>;
28
- // }}
29
- // />
30
- // );
31
- // };
32
-
33
7
  export { Combobox };
34
8
  //# sourceMappingURL=Combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../../src-css/components/Combobox/Combobox.tsx"],"sourcesContent":["import { comboboxNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\n// import React from 'react';\nimport { config } from './Combobox.config';\n\nconst mergedConfig = mergeConfig(comboboxNewConfig, config);\nconst Combobox = component(mergedConfig);\n\n// type PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n//\n// type ComboboxType = <T extends ItemOption>(\n// props: Omit<ComboboxProps<T>, PropsFromConfig> &\n// Pick<ComponentProps<typeof ComboboxComponent>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> },\n// ) => ReactElement;\n//\n// const Combobox = ComboboxComponent as ComboboxType;\n\nexport { Combobox };\n\n// const items = [\n// {\n// value: 'north_america',\n// label: 'Северная Америка',\n// name: 'dima',\n// },\n// {\n// value: 'north_america',\n// label: 'Северная Америка',\n// name: 'dima',\n// },\n// ];\n//\n// const Func = () => {\n// return (\n// <Combobox\n// items={items}\n// renderItem={(item) => {\n// console.log(item);\n//\n// return <div>123</div>;\n// }}\n// />\n// );\n// };\n"],"names":["mergedConfig","mergeConfig","comboboxNewConfig","config","Combobox","component"],"mappings":";;;AAKA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,iBAAiB,EAAEC,MAAM,CAAC,CAAA;AAC3D,IAAMC,QAAQ,gBAAGC,SAAS,CAACL,YAAY,EAAC;;AAaxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"Combobox.js","sources":["../../../../src-css/components/Combobox/Combobox.ts"],"sourcesContent":["import { comboboxNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './Combobox.config';\n\nconst mergedConfig = mergeConfig(comboboxNewConfig, config);\nconst Combobox = component(mergedConfig);\n\nexport { Combobox };\n"],"names":["mergedConfig","mergeConfig","comboboxNewConfig","config","Combobox","component"],"mappings":";;;AAIA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,iBAAiB,EAAEC,MAAM,CAAC,CAAA;AAC3D,IAAMC,QAAQ,gBAAGC,SAAS,CAACL,YAAY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src-css/components/Combobox/index.tsx"],"sourcesContent":["import React, { forwardRef, ComponentProps, ForwardedRef, ReactElement } from 'react';\nimport type { ItemOption, ComboboxProps } from '@salutejs/plasma-new-hope';\n\nimport { Combobox as ComboboxOld } from './Legacy';\nimport { Combobox as ComboboxNew } from './Combobox';\n\nexport { ComboboxDivider, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxItem } from './Legacy';\n\nexport type { ComboboxOldProps as ComboboxProps } from '@salutejs/plasma-new-hope';\n\nfunction fixedForwardRef<T, P = {}>(\n render: (props: P, ref: React.Ref<T>) => React.ReactNode,\n): (props: P & React.RefAttributes<T>) => React.ReactNode {\n return forwardRef(render as any) as any;\n}\n\ntype PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n\ntype PropsOld = ComponentProps<typeof ComboboxOld> & { items?: never };\n\ntype CommonProps = <T extends ItemOption>(\n props:\n | PropsOld\n | (Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> }),\n) => ReactElement;\n\nconst ComboboxComponent = forwardRef<any, any>((props, ref) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...props} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n});\n\nexport const Combobox = ComboboxComponent as CommonProps;\n\n// Alternative approach\n\ntype PropsNew<T extends ItemOption> = Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig>;\n\ntype CommonProps2<T extends ItemOption> = PropsOld | PropsNew<T>;\n\nconst ComboboxComponent2 = <T extends ItemOption>(\n props: CommonProps2<T>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...(props as any)} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n};\n\nexport const Combobox2 = fixedForwardRef(ComboboxComponent2);\n"],"names":["fixedForwardRef","render","forwardRef","ComboboxComponent","props","ref","items","React","createElement","ComboboxNew","_extends","ComboboxOld","Combobox","ComboboxComponent2","Combobox2"],"mappings":";;;;;;AAUA,SAASA,eAAeA,CACpBC,MAAwD,EACF;EACtD,oBAAOC,UAAU,CAACD,MAAa,CAAC,CAAA;AACpC,CAAA;AAaA,IAAME,iBAAiB,gBAAGD,UAAU,CAAW,UAACE,KAAK,EAAEC,GAAG,EAAK;EAC3D,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,UAAW,EAAAC,QAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,UAAW,EAAAD,QAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAC,CAAA;AAEK,IAAMQ,QAAQ,GAAGT,kBAAgC;;AAExD;;AAOA,IAAMU,kBAAkB,GAAG,SAArBA,kBAAkBA,CACpBT,KAAsB,EACtBC,GAAyC,EACxC;EACD,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,UAAW,EAAAC,QAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAAUD,EAAAA,KAAK,CAAW,CAAC,CAAA;AACxD,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,UAAW,EAAAD,QAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAA;IAEYU,SAAS,gBAAGd,eAAe,CAACa,kBAAkB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src-css/components/Combobox/index.tsx"],"sourcesContent":["import React, { forwardRef, ComponentProps, ForwardedRef, ReactElement } from 'react';\nimport type { ItemOption, ComboboxProps } from '@salutejs/plasma-new-hope';\n\nimport { Combobox as ComboboxOld } from './Legacy';\nimport { Combobox as ComboboxNew } from './Combobox';\n\nexport { ComboboxDivider, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxItem } from './Legacy';\n\nexport type { ComboboxOldProps as ComboboxProps } from '@salutejs/plasma-new-hope';\n\nfunction fixedForwardRef<T, P = {}>(\n render: (props: P, ref: React.Ref<T>) => React.ReactElement | null,\n): (props: P & React.RefAttributes<T>) => React.ReactElement | null {\n return forwardRef(render as any) as any;\n}\n\ntype PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';\n\ntype PropsOld = ComponentProps<typeof ComboboxOld> & { items?: never };\n\ntype CommonProps = <T extends ItemOption>(\n props:\n | PropsOld\n | (Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> }),\n) => ReactElement;\n\nconst ComboboxComponent = forwardRef<any, any>((props, ref) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...props} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n});\n\nexport const Combobox = ComboboxComponent as CommonProps;\n\n// Alternative approach\n\ntype PropsNew<T extends ItemOption> = Omit<ComboboxProps<T>, PropsFromConfig> &\n Pick<ComponentProps<typeof ComboboxNew>, PropsFromConfig>;\n\ntype CommonProps2<T extends ItemOption> = PropsOld | PropsNew<T>;\n\nconst ComboboxComponent2 = <T extends ItemOption>(\n props: CommonProps2<T>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) => {\n if (props.items) {\n return <ComboboxNew ref={ref} {...(props as any)} />;\n }\n\n return <ComboboxOld ref={ref} {...props} />;\n};\n\nexport const Combobox2 = fixedForwardRef(ComboboxComponent2);\n"],"names":["fixedForwardRef","render","forwardRef","ComboboxComponent","props","ref","items","React","createElement","ComboboxNew","_extends","ComboboxOld","Combobox","ComboboxComponent2","Combobox2"],"mappings":";;;;;;AAUA,SAASA,eAAeA,CACpBC,MAAkE,EACF;EAChE,oBAAOC,UAAU,CAACD,MAAa,CAAC,CAAA;AACpC,CAAA;AAaA,IAAME,iBAAiB,gBAAGD,UAAU,CAAW,UAACE,KAAK,EAAEC,GAAG,EAAK;EAC3D,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,UAAW,EAAAC,QAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,UAAW,EAAAD,QAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAC,CAAA;AAEK,IAAMQ,QAAQ,GAAGT,kBAAgC;;AAExD;;AAOA,IAAMU,kBAAkB,GAAG,SAArBA,kBAAkBA,CACpBT,KAAsB,EACtBC,GAAyC,EACxC;EACD,IAAID,KAAK,CAACE,KAAK,EAAE;AACb,IAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,UAAW,EAAAC,QAAA,CAAA;AAACL,MAAAA,GAAG,EAAEA,GAAAA;KAAUD,EAAAA,KAAK,CAAW,CAAC,CAAA;AACxD,GAAA;AAEA,EAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACG,UAAW,EAAAD,QAAA,CAAA;AAACL,IAAAA,GAAG,EAAEA,GAAAA;GAASD,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC/C,CAAC,CAAA;IAEYU,SAAS,gBAAGd,eAAe,CAACa,kBAAkB;;;;"}
@@ -1,43 +1,5 @@
1
1
  import { comboboxNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
2
-
3
- // import React from 'react';
4
2
  import { config } from './Combobox.config';
5
3
  var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
6
4
  var Combobox = /*#__PURE__*/component(mergedConfig);
7
-
8
- // type PropsFromConfig = 'view' | 'size' | 'labelPlacement' | 'disabled' | 'readOnly';
9
- //
10
- // type ComboboxType = <T extends ItemOption>(
11
- // props: Omit<ComboboxProps<T>, PropsFromConfig> &
12
- // Pick<ComponentProps<typeof ComboboxComponent>, PropsFromConfig> & { ref?: ForwardedRef<HTMLInputElement> },
13
- // ) => ReactElement;
14
- //
15
- // const Combobox = ComboboxComponent as ComboboxType;
16
-
17
- export { Combobox };
18
-
19
- // const items = [
20
- // {
21
- // value: 'north_america',
22
- // label: 'Северная Америка',
23
- // name: 'dima',
24
- // },
25
- // {
26
- // value: 'north_america',
27
- // label: 'Северная Америка',
28
- // name: 'dima',
29
- // },
30
- // ];
31
- //
32
- // const Func = () => {
33
- // return (
34
- // <Combobox
35
- // items={items}
36
- // renderItem={(item) => {
37
- // console.log(item);
38
- //
39
- // return <div>123</div>;
40
- // }}
41
- // />
42
- // );
43
- // };
5
+ export { Combobox };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-b2c",
3
- "version": "1.413.0-canary.1470.11192852883.0",
3
+ "version": "1.413.0-canary.1470.11195366738.0",
4
4
  "description": "Salute Design System / React UI kit for business-related web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@salutejs/plasma-core": "1.180.0",
46
46
  "@salutejs/plasma-hope": "1.313.0",
47
- "@salutejs/plasma-new-hope": "0.162.0-canary.1470.11192852883.0",
47
+ "@salutejs/plasma-new-hope": "0.162.0-canary.1470.11195366738.0",
48
48
  "@salutejs/plasma-themes": "0.18.0",
49
49
  "@salutejs/plasma-tokens-b2c": "0.52.0",
50
50
  "@salutejs/plasma-tokens-web": "1.57.0",
@@ -109,5 +109,5 @@
109
109
  "react"
110
110
  ],
111
111
  "sideEffects": false,
112
- "gitHead": "31708cca2dab9da6e091c77255d9b52e5761cd92"
112
+ "gitHead": "033115794830920995f8d67065ecd19535d44f77"
113
113
  }
@@ -1234,7 +1234,7 @@ export const Combobox: CommonProps;
1234
1234
  // Warning: (ae-forgotten-export) The symbol "CommonProps2" needs to be exported by the entry point index.d.ts
1235
1235
  //
1236
1236
  // @public (undocumented)
1237
- export const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React_2.RefAttributes<HTMLInputElement>) => React_2.ReactNode;
1237
+ export const Combobox2: <T extends ItemOption>(props: CommonProps2<T> & React_2.RefAttributes<HTMLInputElement>) => React_2.ReactElement | null;
1238
1238
 
1239
1239
  // @public (undocumented)
1240
1240
  export const ComboboxDivider: FunctionComponent<PropsType<Variants> & HTMLAttributes<HTMLDivElement> & {