@salutejs/plasma-new-hope 0.141.0-canary.1421.10719019658.0 → 0.141.0-canary.1422.10721189833.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -4
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  3. package/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  4. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  5. package/cjs/components/TextArea/TextArea.js +1 -2
  6. package/cjs/components/TextArea/TextArea.js.map +1 -1
  7. package/cjs/components/TextField/TextField.js +12 -7
  8. package/cjs/components/TextField/TextField.js.map +1 -1
  9. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -4
  10. package/emotion/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  11. package/emotion/cjs/components/TextArea/TextArea.js +2 -3
  12. package/emotion/cjs/components/TextField/TextField.js +13 -8
  13. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  14. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  15. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  16. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  17. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +6 -4
  18. package/emotion/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  19. package/emotion/es/components/TextArea/TextArea.js +2 -3
  20. package/emotion/es/components/TextField/TextField.js +13 -8
  21. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  22. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  23. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  24. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  25. package/es/components/Combobox/ComboboxNew/Combobox.js +6 -4
  26. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  27. package/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  28. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  29. package/es/components/TextArea/TextArea.js +1 -2
  30. package/es/components/TextArea/TextArea.js.map +1 -1
  31. package/es/components/TextField/TextField.js +12 -7
  32. package/es/components/TextField/TextField.js.map +1 -1
  33. package/package.json +4 -5
  34. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -4
  35. package/styled-components/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  36. package/styled-components/cjs/components/TextArea/TextArea.js +1 -2
  37. package/styled-components/cjs/components/TextField/TextField.js +12 -7
  38. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  39. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  40. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  41. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  42. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +6 -4
  43. package/styled-components/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  44. package/styled-components/es/components/TextArea/TextArea.js +1 -2
  45. package/styled-components/es/components/TextField/TextField.js +12 -7
  46. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  47. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  48. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +2 -0
  49. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +18 -3
  50. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  51. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +7 -1
  52. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  53. package/types/components/Combobox/ComboboxOld/Combobox.d.ts.map +1 -1
  54. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +6 -0
  55. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  56. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  57. package/types/components/TextField/TextField.d.ts.map +1 -1
  58. package/emotion/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -106
  59. package/emotion/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -106
  60. package/styled-components/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -106
  61. package/styled-components/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -106
@@ -1,106 +0,0 @@
1
- import { useForm } from 'react-hook-form';
2
- import React, { useState } from 'react';
3
- import type { Meta, StoryObj } from '@storybook/react';
4
-
5
- import { WithTheme } from '../../../_helpers';
6
- import { Button } from '../Button/Button';
7
- import { TextField } from '../TextField/TextField';
8
- import { TextArea } from '../TextArea/TextArea'; // TextArea.tsx 120 строка, не работает из-за некорректного ref
9
- import { Checkbox } from '../Checkbox/Checkbox';
10
- import { Switch } from '../Switch/Switch';
11
- import { Radiobox } from '../Radiobox/Radiobox';
12
- import { Select } from '../Select/Select';
13
- import { RadioGroup } from '../../../../components/Radiobox';
14
-
15
- type StoryDropdownProps = {};
16
-
17
- const langName = 'language';
18
- const itemsRadiobox = [
19
- { langName, value: 'c', label: 'C', disabled: false },
20
- { langName, value: 'cpp', label: 'C++', disabled: false },
21
- { langName, value: 'assembly', label: 'Assembly', disabled: false },
22
- ];
23
-
24
- const itemsSelect = [
25
- {
26
- value: 'north_america',
27
- label: 'Северная Америка',
28
- },
29
- {
30
- value: 'europe',
31
- label: 'Европа',
32
- },
33
- {
34
- value: 'asia',
35
- label: 'Азия',
36
- },
37
- ];
38
-
39
- const FormSelect = (props) => {
40
- const { onChange, onBlur, name, ref } = props;
41
- const [value, setValue] = useState();
42
-
43
- const onChangeValue = (e) => {
44
- setValue(e);
45
- onChange({
46
- target: {
47
- value: e,
48
- name,
49
- },
50
- });
51
- };
52
-
53
- const onBlurValue = (e) => {
54
- onBlur(e);
55
- };
56
-
57
- return <Select {...props} value={value} onChange={onChangeValue} onBlur={onBlurValue} name={name} ref={ref} />;
58
- };
59
-
60
- const DefaultForm = () => {
61
- const { register, handleSubmit } = useForm();
62
- const onSubmit = (data) => {
63
- console.log(data);
64
- };
65
-
66
- return (
67
- <form onSubmit={handleSubmit(onSubmit)} style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
68
- <TextField {...register('textfield')} placeholder="Textfield" />
69
- <TextArea {...register('textarea')} placeholder="Textarea" />
70
- <Checkbox {...register('checkbox')} label="Checkbox" />
71
- <Switch {...register('switch')} label="Switch" labelPosition="after" />
72
- <RadioGroup aria-labelledby="radiogroup-title-id">
73
- <div id="radiogroup-title-id" style={{ margin: '1rem 0', fontWeight: '600' }}>
74
- Выберите язык программирования для изучения.
75
- </div>
76
- {itemsRadiobox.map((item) => (
77
- <Radiobox
78
- key={item.value}
79
- value={item.value}
80
- label={item.label}
81
- disabled={item.disabled}
82
- {...register('radiobox')}
83
- />
84
- ))}
85
- </RadioGroup>
86
- <FormSelect {...register('select')} items={itemsSelect} />
87
- <Button type="submit">Отправить</Button>
88
- </form>
89
- );
90
- };
91
-
92
- const meta: Meta<StoryDropdownProps> = {
93
- title: 'plasma_b2c/Form',
94
- decorators: [WithTheme],
95
- component: DefaultForm,
96
- };
97
-
98
- export default meta;
99
-
100
- const StoryNormal = () => {
101
- return <DefaultForm />;
102
- };
103
-
104
- export const Default: StoryObj<StoryDropdownProps> = {
105
- render: () => <StoryNormal />,
106
- };
@@ -1,106 +0,0 @@
1
- import { useForm } from 'react-hook-form';
2
- import React, { useState } from 'react';
3
- import type { Meta, StoryObj } from '@storybook/react';
4
-
5
- import { WithTheme } from '../../../_helpers';
6
- import { Button } from '../Button/Button';
7
- import { TextField } from '../TextField/TextField';
8
- import { TextArea } from '../TextArea/TextArea'; // TextArea.tsx 120 строка, не работает из-за некорректного ref
9
- import { Checkbox } from '../Checkbox/Checkbox';
10
- import { Switch } from '../Switch/Switch';
11
- import { Radiobox } from '../Radiobox/Radiobox';
12
- import { Select } from '../Select/Select';
13
- import { RadioGroup } from '../../../../components/Radiobox';
14
-
15
- type StoryDropdownProps = {};
16
-
17
- const langName = 'language';
18
- const itemsRadiobox = [
19
- { langName, value: 'c', label: 'C', disabled: false },
20
- { langName, value: 'cpp', label: 'C++', disabled: false },
21
- { langName, value: 'assembly', label: 'Assembly', disabled: false },
22
- ];
23
-
24
- const itemsSelect = [
25
- {
26
- value: 'north_america',
27
- label: 'Северная Америка',
28
- },
29
- {
30
- value: 'europe',
31
- label: 'Европа',
32
- },
33
- {
34
- value: 'asia',
35
- label: 'Азия',
36
- },
37
- ];
38
-
39
- const FormSelect = (props) => {
40
- const { onChange, onBlur, name, ref } = props;
41
- const [value, setValue] = useState();
42
-
43
- const onChangeValue = (e) => {
44
- setValue(e);
45
- onChange({
46
- target: {
47
- value: e,
48
- name,
49
- },
50
- });
51
- };
52
-
53
- const onBlurValue = (e) => {
54
- onBlur(e);
55
- };
56
-
57
- return <Select {...props} value={value} onChange={onChangeValue} onBlur={onBlurValue} name={name} ref={ref} />;
58
- };
59
-
60
- const DefaultForm = () => {
61
- const { register, handleSubmit } = useForm();
62
- const onSubmit = (data) => {
63
- console.log(data);
64
- };
65
-
66
- return (
67
- <form onSubmit={handleSubmit(onSubmit)} style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
68
- <TextField {...register('textfield')} placeholder="Textfield" />
69
- <TextArea {...register('textarea')} placeholder="Textarea" />
70
- <Checkbox {...register('checkbox')} label="Checkbox" />
71
- <Switch {...register('switch')} label="Switch" labelPosition="after" />
72
- <RadioGroup aria-labelledby="radiogroup-title-id">
73
- <div id="radiogroup-title-id" style={{ margin: '1rem 0', fontWeight: '600' }}>
74
- Выберите язык программирования для изучения.
75
- </div>
76
- {itemsRadiobox.map((item) => (
77
- <Radiobox
78
- key={item.value}
79
- value={item.value}
80
- label={item.label}
81
- disabled={item.disabled}
82
- {...register('radiobox')}
83
- />
84
- ))}
85
- </RadioGroup>
86
- <FormSelect {...register('select')} items={itemsSelect} />
87
- <Button type="submit">Отправить</Button>
88
- </form>
89
- );
90
- };
91
-
92
- const meta: Meta<StoryDropdownProps> = {
93
- title: 'plasma_b2c/Form',
94
- decorators: [WithTheme],
95
- component: DefaultForm,
96
- };
97
-
98
- export default meta;
99
-
100
- const StoryNormal = () => {
101
- return <DefaultForm />;
102
- };
103
-
104
- export const Default: StoryObj<StoryDropdownProps> = {
105
- render: () => <StoryNormal />,
106
- };
@@ -1,106 +0,0 @@
1
- import { useForm } from 'react-hook-form';
2
- import React, { useState } from 'react';
3
- import type { Meta, StoryObj } from '@storybook/react';
4
-
5
- import { WithTheme } from '../../../_helpers';
6
- import { Button } from '../Button/Button';
7
- import { TextField } from '../TextField/TextField';
8
- import { TextArea } from '../TextArea/TextArea'; // TextArea.tsx 120 строка, не работает из-за некорректного ref
9
- import { Checkbox } from '../Checkbox/Checkbox';
10
- import { Switch } from '../Switch/Switch';
11
- import { Radiobox } from '../Radiobox/Radiobox';
12
- import { Select } from '../Select/Select';
13
- import { RadioGroup } from '../../../../components/Radiobox';
14
-
15
- type StoryDropdownProps = {};
16
-
17
- const langName = 'language';
18
- const itemsRadiobox = [
19
- { langName, value: 'c', label: 'C', disabled: false },
20
- { langName, value: 'cpp', label: 'C++', disabled: false },
21
- { langName, value: 'assembly', label: 'Assembly', disabled: false },
22
- ];
23
-
24
- const itemsSelect = [
25
- {
26
- value: 'north_america',
27
- label: 'Северная Америка',
28
- },
29
- {
30
- value: 'europe',
31
- label: 'Европа',
32
- },
33
- {
34
- value: 'asia',
35
- label: 'Азия',
36
- },
37
- ];
38
-
39
- const FormSelect = (props) => {
40
- const { onChange, onBlur, name, ref } = props;
41
- const [value, setValue] = useState();
42
-
43
- const onChangeValue = (e) => {
44
- setValue(e);
45
- onChange({
46
- target: {
47
- value: e,
48
- name,
49
- },
50
- });
51
- };
52
-
53
- const onBlurValue = (e) => {
54
- onBlur(e);
55
- };
56
-
57
- return <Select {...props} value={value} onChange={onChangeValue} onBlur={onBlurValue} name={name} ref={ref} />;
58
- };
59
-
60
- const DefaultForm = () => {
61
- const { register, handleSubmit } = useForm();
62
- const onSubmit = (data) => {
63
- console.log(data);
64
- };
65
-
66
- return (
67
- <form onSubmit={handleSubmit(onSubmit)} style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
68
- <TextField {...register('textfield')} placeholder="Textfield" />
69
- <TextArea {...register('textarea')} placeholder="Textarea" />
70
- <Checkbox {...register('checkbox')} label="Checkbox" />
71
- <Switch {...register('switch')} label="Switch" labelPosition="after" />
72
- <RadioGroup aria-labelledby="radiogroup-title-id">
73
- <div id="radiogroup-title-id" style={{ margin: '1rem 0', fontWeight: '600' }}>
74
- Выберите язык программирования для изучения.
75
- </div>
76
- {itemsRadiobox.map((item) => (
77
- <Radiobox
78
- key={item.value}
79
- value={item.value}
80
- label={item.label}
81
- disabled={item.disabled}
82
- {...register('radiobox')}
83
- />
84
- ))}
85
- </RadioGroup>
86
- <FormSelect {...register('select')} items={itemsSelect} />
87
- <Button type="submit">Отправить</Button>
88
- </form>
89
- );
90
- };
91
-
92
- const meta: Meta<StoryDropdownProps> = {
93
- title: 'plasma_b2c/Form',
94
- decorators: [WithTheme],
95
- component: DefaultForm,
96
- };
97
-
98
- export default meta;
99
-
100
- const StoryNormal = () => {
101
- return <DefaultForm />;
102
- };
103
-
104
- export const Default: StoryObj<StoryDropdownProps> = {
105
- render: () => <StoryNormal />,
106
- };
@@ -1,106 +0,0 @@
1
- import { useForm } from 'react-hook-form';
2
- import React, { useState } from 'react';
3
- import type { Meta, StoryObj } from '@storybook/react';
4
-
5
- import { WithTheme } from '../../../_helpers';
6
- import { Button } from '../Button/Button';
7
- import { TextField } from '../TextField/TextField';
8
- import { TextArea } from '../TextArea/TextArea'; // TextArea.tsx 120 строка, не работает из-за некорректного ref
9
- import { Checkbox } from '../Checkbox/Checkbox';
10
- import { Switch } from '../Switch/Switch';
11
- import { Radiobox } from '../Radiobox/Radiobox';
12
- import { Select } from '../Select/Select';
13
- import { RadioGroup } from '../../../../components/Radiobox';
14
-
15
- type StoryDropdownProps = {};
16
-
17
- const langName = 'language';
18
- const itemsRadiobox = [
19
- { langName, value: 'c', label: 'C', disabled: false },
20
- { langName, value: 'cpp', label: 'C++', disabled: false },
21
- { langName, value: 'assembly', label: 'Assembly', disabled: false },
22
- ];
23
-
24
- const itemsSelect = [
25
- {
26
- value: 'north_america',
27
- label: 'Северная Америка',
28
- },
29
- {
30
- value: 'europe',
31
- label: 'Европа',
32
- },
33
- {
34
- value: 'asia',
35
- label: 'Азия',
36
- },
37
- ];
38
-
39
- const FormSelect = (props) => {
40
- const { onChange, onBlur, name, ref } = props;
41
- const [value, setValue] = useState();
42
-
43
- const onChangeValue = (e) => {
44
- setValue(e);
45
- onChange({
46
- target: {
47
- value: e,
48
- name,
49
- },
50
- });
51
- };
52
-
53
- const onBlurValue = (e) => {
54
- onBlur(e);
55
- };
56
-
57
- return <Select {...props} value={value} onChange={onChangeValue} onBlur={onBlurValue} name={name} ref={ref} />;
58
- };
59
-
60
- const DefaultForm = () => {
61
- const { register, handleSubmit } = useForm();
62
- const onSubmit = (data) => {
63
- console.log(data);
64
- };
65
-
66
- return (
67
- <form onSubmit={handleSubmit(onSubmit)} style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
68
- <TextField {...register('textfield')} placeholder="Textfield" />
69
- <TextArea {...register('textarea')} placeholder="Textarea" />
70
- <Checkbox {...register('checkbox')} label="Checkbox" />
71
- <Switch {...register('switch')} label="Switch" labelPosition="after" />
72
- <RadioGroup aria-labelledby="radiogroup-title-id">
73
- <div id="radiogroup-title-id" style={{ margin: '1rem 0', fontWeight: '600' }}>
74
- Выберите язык программирования для изучения.
75
- </div>
76
- {itemsRadiobox.map((item) => (
77
- <Radiobox
78
- key={item.value}
79
- value={item.value}
80
- label={item.label}
81
- disabled={item.disabled}
82
- {...register('radiobox')}
83
- />
84
- ))}
85
- </RadioGroup>
86
- <FormSelect {...register('select')} items={itemsSelect} />
87
- <Button type="submit">Отправить</Button>
88
- </form>
89
- );
90
- };
91
-
92
- const meta: Meta<StoryDropdownProps> = {
93
- title: 'plasma_b2c/Form',
94
- decorators: [WithTheme],
95
- component: DefaultForm,
96
- };
97
-
98
- export default meta;
99
-
100
- const StoryNormal = () => {
101
- return <DefaultForm />;
102
- };
103
-
104
- export const Default: StoryObj<StoryDropdownProps> = {
105
- render: () => <StoryNormal />,
106
- };