@salutejs/plasma-new-hope 0.261.0-canary.1762.13182430055.0 → 0.261.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/cjs/components/Calendar/hooks/useCalendarDateChange.js.map +1 -1
- package/cjs/components/Calendar/store/reducer.js +4 -3
- package/cjs/components/Calendar/store/reducer.js.map +1 -1
- package/cjs/components/Calendar/store/types.js.map +1 -1
- package/emotion/cjs/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/emotion/cjs/components/Calendar/store/reducer.js +4 -3
- package/emotion/cjs/components/Checkbox/Checkbox.template-doc.mdx +0 -4
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +12 -19
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/emotion/cjs/examples/plasma_web/components/Checkbox/Checkbox.config.js +12 -19
- package/emotion/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/emotion/es/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/emotion/es/components/Calendar/store/reducer.js +4 -3
- package/emotion/es/components/Checkbox/Checkbox.template-doc.mdx +0 -4
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +12 -19
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/emotion/es/examples/plasma_web/components/Checkbox/Checkbox.config.js +12 -19
- package/emotion/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/es/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/es/components/Calendar/hooks/useCalendarDateChange.js.map +1 -1
- package/es/components/Calendar/store/reducer.js +4 -3
- package/es/components/Calendar/store/reducer.js.map +1 -1
- package/es/components/Calendar/store/types.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/styled-components/cjs/components/Calendar/store/reducer.js +4 -3
- package/styled-components/cjs/components/Checkbox/Checkbox.template-doc.mdx +0 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +1 -8
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.config.js +1 -8
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/styled-components/es/components/Calendar/hooks/useCalendarDateChange.js +1 -0
- package/styled-components/es/components/Calendar/store/reducer.js +4 -3
- package/styled-components/es/components/Checkbox/Checkbox.template-doc.mdx +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +1 -8
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.config.js +1 -8
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +5 -15
- package/types/components/Calendar/hooks/useCalendarDateChange.d.ts.map +1 -1
- package/types/components/Calendar/store/types.d.ts +1 -0
- package/types/components/Calendar/store/types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts +1 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts +1 -1
@@ -3,9 +3,12 @@ import type { ComponentProps } from 'react';
|
|
3
3
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
4
|
import { action } from '@storybook/addon-actions';
|
5
5
|
|
6
|
-
import {
|
6
|
+
import { checkboxConfig } from '../../../../components/Checkbox';
|
7
|
+
import { mergeConfig } from '../../../../engines';
|
8
|
+
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
7
9
|
import { Link } from '../Link/Link';
|
8
10
|
|
11
|
+
import { config } from './Checkbox.config';
|
9
12
|
import { Checkbox } from './Checkbox';
|
10
13
|
|
11
14
|
const onChange = action('onChange');
|
@@ -16,20 +19,7 @@ const meta: Meta<typeof Checkbox> = {
|
|
16
19
|
title: 'web/Data Entry/Checkbox',
|
17
20
|
decorators: [WithTheme],
|
18
21
|
component: Checkbox,
|
19
|
-
argTypes:
|
20
|
-
view: {
|
21
|
-
options: ['accent'],
|
22
|
-
control: {
|
23
|
-
type: 'radio',
|
24
|
-
},
|
25
|
-
},
|
26
|
-
size: {
|
27
|
-
options: ['m', 's'],
|
28
|
-
control: {
|
29
|
-
type: 'radio',
|
30
|
-
},
|
31
|
-
},
|
32
|
-
},
|
22
|
+
argTypes: argTypesFromConfig(mergeConfig(checkboxConfig, config)),
|
33
23
|
args: {
|
34
24
|
view: 'accent',
|
35
25
|
size: 'm',
|
@@ -134,6 +134,7 @@ export var reducer = function reducer(state, action) {
|
|
134
134
|
var _action$payload3 = action.payload,
|
135
135
|
calendarState = _action$payload3.calendarState,
|
136
136
|
_monthIndex2 = _action$payload3.monthIndex,
|
137
|
+
_year2 = _action$payload3.year,
|
137
138
|
size = _action$payload3.size;
|
138
139
|
return _objectSpread(_objectSpread({}, state), {}, {
|
139
140
|
size: size,
|
@@ -141,7 +142,7 @@ export var reducer = function reducer(state, action) {
|
|
141
142
|
date: {
|
142
143
|
day: state.date.day,
|
143
144
|
monthIndex: _monthIndex2,
|
144
|
-
year:
|
145
|
+
year: _year2
|
145
146
|
}
|
146
147
|
});
|
147
148
|
}
|
@@ -149,7 +150,7 @@ export var reducer = function reducer(state, action) {
|
|
149
150
|
{
|
150
151
|
var _action$payload4 = action.payload,
|
151
152
|
_calendarState = _action$payload4.calendarState,
|
152
|
-
|
153
|
+
_year3 = _action$payload4.year,
|
153
154
|
_size = _action$payload4.size;
|
154
155
|
return _objectSpread(_objectSpread({}, state), {}, {
|
155
156
|
size: _size,
|
@@ -157,7 +158,7 @@ export var reducer = function reducer(state, action) {
|
|
157
158
|
date: {
|
158
159
|
day: state.date.day,
|
159
160
|
monthIndex: state.date.monthIndex,
|
160
|
-
year:
|
161
|
+
year: _year3
|
161
162
|
}
|
162
163
|
});
|
163
164
|
}
|
@@ -9,10 +9,6 @@ import { PropsTable, Description } from '@site/src/components';
|
|
9
9
|
<Description name="Checkbox" />
|
10
10
|
<PropsTable name="Checkbox" exclude={['css', 'focused']} />
|
11
11
|
|
12
|
-
:::caution устаревшие view
|
13
|
-
Актуальное значение свойства `view` - это `accent`. Все остальные - depracated.
|
14
|
-
:::
|
15
|
-
|
16
12
|
## Использование
|
17
13
|
Компонент `Checkbox` может содержать лейбл и описание.
|
18
14
|
|