@salutejs/plasma-new-hope 0.188.0-canary.1552.11776095169.0 → 0.188.0-canary.1553.11776288397.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +0 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -31
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
- package/cjs/index.css +0 -2
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +2 -5
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +2 -5
- package/es/components/Combobox/ComboboxNew/Combobox.css +0 -2
- package/es/components/Combobox/ComboboxNew/Combobox.js +8 -33
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
- package/es/index.css +0 -2
- package/package.json +4 -4
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +2 -5
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +2 -5
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts +2 -2
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +2 -40
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +120 -1080
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +120 -1080
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -37
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -15
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
- package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -55
- package/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -13
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
- package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
- package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -6
- package/emotion/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -33
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -11
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
- package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
- package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -50
- package/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -12
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -5
- package/styled-components/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts +0 -6
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts +0 -3
- package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +0 -4
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +0 -1
@@ -352,17 +352,14 @@ const items = [
|
|
352
352
|
];
|
353
353
|
|
354
354
|
const SingleStory = (args: StorySelectProps) => {
|
355
|
-
|
356
|
-
const setValue = (event) => {
|
357
|
-
console.log(event);
|
358
|
-
};
|
355
|
+
const [value, setValue] = useState('');
|
359
356
|
|
360
357
|
return (
|
361
358
|
<div style={{ width: '400px' }}>
|
362
359
|
<Combobox
|
363
360
|
{...args}
|
364
|
-
name="mau"
|
365
361
|
items={items}
|
362
|
+
value={value}
|
366
363
|
onChange={setValue}
|
367
364
|
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
368
365
|
/>
|
@@ -5,11 +5,11 @@ export declare const Context: React.Context<ItemContext>;
|
|
5
5
|
/**
|
6
6
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
7
7
|
*/
|
8
|
-
export declare const comboboxRoot: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement
|
8
|
+
export declare const comboboxRoot: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement>>;
|
9
9
|
export declare const comboboxConfig: {
|
10
10
|
name: string;
|
11
11
|
tag: string;
|
12
|
-
layout: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement
|
12
|
+
layout: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement>>;
|
13
13
|
base: import("@linaria/core").LinariaClassName;
|
14
14
|
variations: {
|
15
15
|
view: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAIjH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,+IA4YtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBA9YQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CAma3F,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { CSSProperties, ButtonHTMLAttributes
|
1
|
+
import type { CSSProperties, ButtonHTMLAttributes } from 'react';
|
2
2
|
import React from 'react';
|
3
3
|
import { RequiredProps } from '../../TextField/TextField.types';
|
4
4
|
import { FocusedPathState } from './reducers';
|
@@ -6,10 +6,8 @@ import { ItemOption, ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types
|
|
6
6
|
import type { ValueToCheckedMapType, ValueToItemMapType } from './hooks/getPathMaps';
|
7
7
|
declare type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
8
8
|
declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
9
|
-
name?: never;
|
10
9
|
multiple?: false;
|
11
10
|
value?: string;
|
12
|
-
defaultValue?: never;
|
13
11
|
onChange?: (value: string) => void;
|
14
12
|
/**
|
15
13
|
* Если включено - будет выведено общее количество выбранных элементов вместо перечисления.
|
@@ -25,7 +23,6 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
|
25
23
|
} | {
|
26
24
|
multiple: true;
|
27
25
|
value?: Array<string>;
|
28
|
-
defaultValue?: never;
|
29
26
|
onChange?: (value: Array<string>) => void;
|
30
27
|
isTargetAmount?: true;
|
31
28
|
targetAmount?: number;
|
@@ -33,41 +30,6 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
|
33
30
|
* Callback для кастомной настройки значения в селекте.
|
34
31
|
*/
|
35
32
|
renderValue?: (item: T) => string;
|
36
|
-
name?: never;
|
37
|
-
} | {
|
38
|
-
multiple: true;
|
39
|
-
value?: string[];
|
40
|
-
defaultValue?: string[];
|
41
|
-
onChange?: ChangeEventHandler;
|
42
|
-
/**
|
43
|
-
* Если включено - будет выведено общее количество выбранных элементов вместо перечисления.
|
44
|
-
* @default false
|
45
|
-
*/
|
46
|
-
isTargetAmount?: never | false;
|
47
|
-
/**
|
48
|
-
* Ручная настройка количества выбранных элементов. Только при isTargetAmount === true.
|
49
|
-
* @default undefined
|
50
|
-
*/
|
51
|
-
targetAmount?: never;
|
52
|
-
renderValue?: never;
|
53
|
-
name: string;
|
54
|
-
} | {
|
55
|
-
multiple?: false;
|
56
|
-
value?: string;
|
57
|
-
defaultValue?: string;
|
58
|
-
onChange?: ChangeEventHandler;
|
59
|
-
/**
|
60
|
-
* Если включено - будет выведено общее количество выбранных элементов вместо перечисления.
|
61
|
-
* @default false
|
62
|
-
*/
|
63
|
-
isTargetAmount?: never | false;
|
64
|
-
/**
|
65
|
-
* Ручная настройка количества выбранных элементов. Только при isTargetAmount === true.
|
66
|
-
* @default undefined
|
67
|
-
*/
|
68
|
-
targetAmount?: never;
|
69
|
-
renderValue?: never;
|
70
|
-
name: string;
|
71
33
|
};
|
72
34
|
declare type ViewStateProps = {
|
73
35
|
/**
|
@@ -192,7 +154,7 @@ export declare type ComboboxProps<T extends ItemOption = ItemOption> = {
|
|
192
154
|
* @default outer
|
193
155
|
*/
|
194
156
|
labelPlacement?: 'outer' | 'inner';
|
195
|
-
} & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'
|
157
|
+
} & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'>;
|
196
158
|
export declare type FloatingPopoverProps = {
|
197
159
|
target: React.ReactNode | ((ref: React.MutableRefObject<HTMLElement | null>) => React.ReactNode);
|
198
160
|
children: React.ReactNode;
|
@@ -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,
|
1
|
+
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","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