@itcase/ui 1.2.18 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Group-BDuYmoBK.js → Group-B2oTJg0t.js} +1 -1
- package/dist/{Group-12uup5mu.js → Group-CVUfaHaS.js} +1 -1
- package/dist/cjs/components/Accordion.js +3 -2
- package/dist/cjs/components/Choice.js +11 -3
- package/dist/cjs/components/CookiesWarning.js +1 -1
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/InputPassword.js +6 -6
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Radio.js +85 -8
- package/dist/cjs/components/Response.js +1 -1
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/components/Switch.js +12 -8
- package/dist/cjs/components/Tile.js +3 -3
- package/dist/cjs/constants/componentProps/textColor.js +1 -1
- package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
- package/dist/cjs/hooks/useViewportFix.js +43 -0
- package/dist/components/Accordion.js +3 -2
- package/dist/components/Choice.js +11 -3
- package/dist/components/CookiesWarning.js +1 -1
- package/dist/components/Group.js +1 -1
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Panel.js +1 -1
- package/dist/components/Radio.js +86 -5
- package/dist/components/Response.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Switch.js +12 -4
- package/dist/components/Tile.js +3 -3
- package/dist/constants/componentProps/textColor.js +1 -1
- package/dist/constants/componentProps/textColorHover.js +1 -1
- package/dist/css/components/Accordion/Accordion.css +1 -0
- package/dist/css/components/Choice/Choice.css +14 -0
- package/dist/css/components/DatePicker/DatePicker.css +12 -12
- package/dist/css/components/Icon/Icon.css +14 -8
- package/dist/css/components/Select/Select.css +1 -1
- package/dist/css/components/Select/css/__input-container/select__input-container.css +1 -1
- package/dist/css/mixins/mixin_animation.css +1 -1
- package/dist/css/mixins/mixin_elevation.css +0 -2
- package/dist/css/mixins/mixin_typography.css +105 -84
- package/dist/css/mixins/mixin_utils.css +1 -1
- package/dist/css/styles/border-color/border-color.css +4 -2
- package/dist/css/styles/text-gradient/text-gradient.css +9 -4
- package/dist/css/styles/width/width.css +1 -1
- package/dist/css/tokens/colors.css +105 -0
- package/dist/css/tokens/elevation.css +10 -0
- package/dist/css/tokens/settings.css +31 -0
- package/dist/css/tokens/typography.css +127 -0
- package/dist/hooks/useViewportFix.js +41 -0
- package/dist/stories/Accordion.mdx +11 -0
- package/dist/stories/Accordion.stories.js +49 -32
- package/dist/stories/AccordionItem.mdx +15 -0
- package/dist/stories/AccordionItem.stories.js +69 -69
- package/dist/stories/AlignContent.mdx +85 -0
- package/dist/stories/AlignItems.mdx +74 -0
- package/dist/stories/AlignItems.stories.js +88 -0
- package/dist/stories/AlignSelf.mdx +85 -0
- package/dist/stories/AlignSelf.stories.js +101 -0
- package/dist/stories/Appearance.mdx +35 -0
- package/dist/stories/Appearance.stories.js +101 -0
- package/dist/stories/Avatar.mdx +23 -0
- package/dist/stories/Avatar.stories.js +69 -64
- package/dist/stories/Badge.mdx +20 -0
- package/dist/stories/Badge.stories.js +43 -44
- package/dist/stories/Button.mdx +48 -0
- package/dist/stories/Button.stories.js +26 -186
- package/dist/stories/Cell.mdx +23 -0
- package/dist/stories/Cell.stories.js +119 -119
- package/dist/stories/Checkbox.mdx +24 -0
- package/dist/stories/Checkbox.stories.js +42 -34
- package/dist/stories/Chips.mdx +31 -0
- package/dist/stories/Chips.stories.js +22 -67
- package/dist/stories/Choice.mdx +11 -0
- package/dist/stories/Choice.stories.js +59 -61
- package/dist/stories/Code.mdx +11 -0
- package/dist/stories/Code.stories.js +37 -40
- package/dist/stories/Columns.mdx +51 -0
- package/dist/stories/Columns.stories.js +80 -0
- package/dist/stories/Configure.mdx +364 -0
- package/dist/stories/DatePicker.mdx +31 -0
- package/dist/stories/DatePicker.stories.js +58 -59
- package/dist/stories/Dev.mdx +9 -0
- package/dist/stories/DevMode.mdx +8 -0
- package/dist/stories/Direction.mdx +84 -0
- package/dist/stories/Direction.stories.js +93 -0
- package/dist/stories/Divider.mdx +35 -0
- package/dist/stories/Divider.stories.js +28 -29
- package/dist/stories/Dot.mdx +19 -0
- package/dist/stories/Dot.stories.js +38 -39
- package/dist/stories/Drawer.mdx +11 -0
- package/dist/stories/Drawer.stories.js +75 -0
- package/dist/stories/Dropdown.mdx +12 -0
- package/dist/stories/Dropdown.stories.js +30 -29
- package/dist/stories/DropdownItem.mdx +19 -0
- package/dist/stories/DropdownItem.stories.js +76 -78
- package/dist/stories/Flex.stories.js +47 -0
- package/dist/stories/FlexAlignContent.stories.js +102 -0
- package/dist/stories/FlexAlignItems.stories.js +91 -0
- package/dist/stories/FlexAlignSelf.stories.js +97 -0
- package/dist/stories/FlexDirection.stories.js +112 -0
- package/dist/stories/FlexGrow.stories.js +69 -0
- package/dist/stories/FlexJustifyContent.stories.js +98 -0
- package/dist/stories/FlexOrder.stories.js +76 -0
- package/dist/stories/FlexWrap.stories.js +89 -0
- package/dist/stories/Grid.stories.js +202 -0
- package/dist/stories/Group.mdx +9 -0
- package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
- package/dist/stories/Grow.mdx +40 -0
- package/dist/stories/Header.stories.js +29 -0
- package/dist/stories/Icon.mdx +15 -0
- package/dist/stories/Icon.stories.js +84 -82
- package/dist/stories/Image.mdx +15 -0
- package/dist/stories/Image.stories.js +134 -0
- package/dist/stories/Input.mdx +31 -0
- package/dist/stories/Input.stories.js +26 -26
- package/dist/stories/InputPassword.mdx +15 -0
- package/dist/stories/InputPassword.stories.js +32 -34
- package/dist/stories/JustifyContent.mdx +89 -0
- package/dist/stories/JustifyContent.stories.js +96 -0
- package/dist/stories/Label.mdx +31 -0
- package/dist/stories/Label.stories.js +63 -53
- package/dist/stories/Loader.mdx +31 -0
- package/dist/stories/Loader.stories.js +26 -28
- package/dist/stories/Logo.mdx +19 -0
- package/dist/stories/Logo.stories.js +28 -28
- package/dist/stories/MenuItem.mdx +15 -0
- package/dist/stories/MenuItem.stories.js +156 -91
- package/dist/stories/Message.mdx +12 -0
- package/dist/stories/Message.stories.js +34 -0
- package/dist/stories/ModalConfirm.stories.js +48 -47
- package/dist/stories/ModalDefault.stories.js +21 -20
- package/dist/stories/Notification.mdx +23 -0
- package/dist/stories/Notification.stories.js +24 -47
- package/dist/stories/Order.mdx +52 -0
- package/dist/stories/Overview.mdx +11 -0
- package/dist/stories/Page.stories.js +28 -0
- package/dist/stories/Pagination.mdx +11 -0
- package/dist/stories/Pagination.stories.js +24 -27
- package/dist/stories/Playground.mdx +10 -0
- package/dist/stories/Radio.mdx +29 -0
- package/dist/stories/Radio.stories.js +32 -33
- package/dist/stories/Response.mdx +18 -0
- package/dist/stories/Response.stories.js +66 -0
- package/dist/stories/SearchInput.mdx +19 -0
- package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
- package/dist/stories/Segmented.mdx +11 -0
- package/dist/stories/Segmented.stories.js +49 -50
- package/dist/stories/Select.stories.js +155 -155
- package/dist/stories/Size.mdx +35 -0
- package/dist/stories/Size.stories.js +101 -0
- package/dist/stories/Skeleton.mdx +9 -0
- package/dist/stories/State.mdx +19 -0
- package/dist/stories/State.stories.js +70 -0
- package/dist/stories/Switch.mdx +23 -0
- package/dist/stories/Switch.stories.js +23 -23
- package/dist/stories/Text.mdx +35 -0
- package/dist/stories/Text.stories.js +172 -0
- package/dist/stories/Textarea.mdx +15 -0
- package/dist/stories/Textarea.stories.js +27 -27
- package/dist/stories/Tile.mdx +19 -0
- package/dist/stories/Tile.stories.js +112 -97
- package/dist/stories/Title.mdx +31 -0
- package/dist/stories/Title.stories.js +168 -0
- package/dist/stories/Tooltip.mdx +19 -0
- package/dist/stories/Tooltip.stories.js +164 -0
- package/dist/stories/WithTooltip.mdx +9 -0
- package/dist/stories/Wrap.mdx +52 -0
- package/dist/stories/Wrap.stories.js +74 -0
- package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
- package/dist/types/components/Choice/Choice.interface.d.ts +2 -2
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
- package/dist/types/components/Tile/Tile.d.ts +1 -1
- package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
- package/dist/types/config/forms/datepicker.d.ts +18 -0
- package/dist/types/config/forms/index.d.ts +4 -0
- package/dist/types/config/forms/input.d.ts +14 -0
- package/dist/types/config/forms/select.d.ts +50 -0
- package/dist/types/hooks/useViewportFix.d.ts +2 -0
- package/dist/types/types/componentProps/flexWrap.d.ts +1 -1
- package/dist/types/types/componentProps/wrap.d.ts +1 -1
- package/package.json +38 -22
- package/dist/Radio-BQo97TZL.js +0 -89
- package/dist/Radio-oMf0vN7T.js +0 -86
- package/dist/Switch-B5yVEqxz.js +0 -14
- package/dist/Switch-DEXsrPCo.js +0 -12
- package/dist/cjs/components/FormField.js +0 -122
- package/dist/components/FormField.js +0 -116
- package/dist/css/mixins/mixin.css +0 -73
- package/dist/stories/FormFieldCheckbox.stories.js +0 -77
- package/dist/stories/FormFieldChoice.stories.js +0 -75
- package/dist/stories/FormFieldDatepicker.stories.js +0 -51
- package/dist/stories/FormFieldFileInput.stories.js +0 -58
- package/dist/stories/FormFieldInput.stories.js +0 -66
- package/dist/stories/FormFieldInputPassword.stories.js +0 -66
- package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
- package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
- package/dist/stories/FormFieldSelect.stories.js +0 -99
- package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
- package/dist/stories/NotFound.stories.js +0 -93
- package/dist/stories/Tab.appearance.stories.js +0 -260
- package/dist/stories/Tab.size.stories.js +0 -259
- package/dist/stories/Tab.state.stories.js +0 -227
- package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
- package/dist/types/components/FormField/FormField.d.ts +0 -9
- package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
- package/dist/types/components/FormField/PasswordField.d.ts +0 -9
- package/dist/types/components/FormField/SelectField.d.ts +0 -9
- package/dist/types/components/FormField/SwitchField.d.ts +0 -8
- package/dist/types/components/FormField/index.d.ts +0 -6
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as JustifyStories from './JustifyContent.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Layout / Group / JustifyContent" />
|
|
6
|
+
|
|
7
|
+
# JustifyContent
|
|
8
|
+
|
|
9
|
+
Свойство `justifyContent` определяет расположение элементов в контейнере
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
<Group justifyContent="...">...</Group>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Значения
|
|
16
|
+
|
|
17
|
+
#### Позиционное выравнивание
|
|
18
|
+
|
|
19
|
+
- `flexStart` — Выравнивание с начала
|
|
20
|
+
- `flexEnd` — Выравнивание с конца
|
|
21
|
+
- `center` — Выравнивание элементов по центру
|
|
22
|
+
|
|
23
|
+
### Распределённое выравнивание
|
|
24
|
+
|
|
25
|
+
- `spaceBetween` — Первый элемент вначале, последний в конце
|
|
26
|
+
- `spaceAround` — Все элементы имеют полноразмерное пространство с обоих концов
|
|
27
|
+
- `spaceEvenly` — Все элементы имеют равное пространство вокруг
|
|
28
|
+
|
|
29
|
+
# Примеры использования
|
|
30
|
+
|
|
31
|
+
### flexStart
|
|
32
|
+
|
|
33
|
+
Выравнивание с начала
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
<Group justifyContent="flexStart">...</Group>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
<Canvas of={JustifyStories.FlexStart} />
|
|
40
|
+
|
|
41
|
+
### flexEnd
|
|
42
|
+
|
|
43
|
+
Выравнивание с конца
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
<Group justifyContent="flexEnd">...</Group>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<Canvas of={JustifyStories.FlexEnd} />
|
|
50
|
+
|
|
51
|
+
### center
|
|
52
|
+
|
|
53
|
+
Выравнивание элементов по центру
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
<Group justifyContent="center">...</Group>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
<Canvas of={JustifyStories.Center} />
|
|
60
|
+
|
|
61
|
+
### spaceBetween
|
|
62
|
+
|
|
63
|
+
Первый элемент в начале, последний в конце
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
<Group justifyContent="spaceBetween">...</Group>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
<Canvas of={JustifyStories.SpaceBetween} />
|
|
70
|
+
|
|
71
|
+
### spaceAround
|
|
72
|
+
|
|
73
|
+
Все элементы имеют полноразмерное пространство с обоих концов
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
<Group justifyContent="spaceAround">...</Group>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
<Canvas of={JustifyStories.SpaceAround} />
|
|
80
|
+
|
|
81
|
+
### spaceEvenly
|
|
82
|
+
|
|
83
|
+
Все элементы имеют равное пространство вокруг
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
<Group justifyContent="spaceEvenly">...</Group>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
<Canvas of={JustifyStories.SpaceEvenly} />
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Group } from '../../Group'
|
|
2
|
+
import { Text } from '../../Text'
|
|
3
|
+
import { argTypes } from './args'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
argTypes: {
|
|
7
|
+
...argTypes,
|
|
8
|
+
},
|
|
9
|
+
component: Group,
|
|
10
|
+
render: ({ ...args }) => (
|
|
11
|
+
<Group
|
|
12
|
+
width={args.width}
|
|
13
|
+
height={args.height}
|
|
14
|
+
fill={args.fill}
|
|
15
|
+
fill={args.fill}
|
|
16
|
+
padding={args.padding}
|
|
17
|
+
borderColor={args.borderColor}
|
|
18
|
+
direction={args.direction}
|
|
19
|
+
justifyContent={args.justifyContent}
|
|
20
|
+
>
|
|
21
|
+
<Group height="60" fill="accentPrimary" padding="20" textAlign="center">
|
|
22
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
23
|
+
1
|
|
24
|
+
</Text>
|
|
25
|
+
</Group>
|
|
26
|
+
<Group height="60" fill="primaryPrimary" padding="20" textAlign="center">
|
|
27
|
+
<Text size="xl" textColor="primaryTextPrimary">
|
|
28
|
+
2
|
|
29
|
+
</Text>
|
|
30
|
+
</Group>
|
|
31
|
+
<Group height="60" fill="secondaryPrimary" padding="20" textAlign="center">
|
|
32
|
+
<Text size="xl" textColor="secondaryTextPrimary">
|
|
33
|
+
3
|
|
34
|
+
</Text>
|
|
35
|
+
</Group>
|
|
36
|
+
<Group height="60" fill="infoPrimary" padding="20" textAlign="center">
|
|
37
|
+
<Text size="xl" textColor="infoTextPrimary">
|
|
38
|
+
4
|
|
39
|
+
</Text>
|
|
40
|
+
</Group>
|
|
41
|
+
</Group>
|
|
42
|
+
),
|
|
43
|
+
title: 'Layout / Group / Variants / JustifyContent',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const Default = {
|
|
47
|
+
args: {
|
|
48
|
+
width: '500',
|
|
49
|
+
padding: '20',
|
|
50
|
+
borderColor: 'surfaceBorderPrimary',
|
|
51
|
+
direction: 'horizontal',
|
|
52
|
+
fill: 'surfacePrimary',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const FlexStart = {
|
|
57
|
+
args: {
|
|
58
|
+
...Default.args,
|
|
59
|
+
justifyContent: 'flex-start',
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const FlexEnd = {
|
|
64
|
+
args: {
|
|
65
|
+
...Default.args,
|
|
66
|
+
justifyContent: 'flex-end',
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Center = {
|
|
71
|
+
args: {
|
|
72
|
+
...Default.args,
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const SpaceBetween = {
|
|
78
|
+
args: {
|
|
79
|
+
...Default.args,
|
|
80
|
+
justifyContent: 'space-between',
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const SpaceAround = {
|
|
85
|
+
args: {
|
|
86
|
+
...Default.args,
|
|
87
|
+
justifyContent: 'space-around',
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const SpaceEvenly = {
|
|
92
|
+
args: {
|
|
93
|
+
...Default.args,
|
|
94
|
+
justifyContent: 'space-evenly',
|
|
95
|
+
},
|
|
96
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as LabelStories from './Label.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={LabelStories} />
|
|
6
|
+
|
|
7
|
+
# Label
|
|
8
|
+
|
|
9
|
+
## Accent
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={LabelStories.Accent} />
|
|
12
|
+
|
|
13
|
+
## Primary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={LabelStories.Primary} />
|
|
16
|
+
|
|
17
|
+
## Secondary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={LabelStories.Secondary} />
|
|
20
|
+
|
|
21
|
+
## SurfacePrimary
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={LabelStories.SurfacePrimary} />
|
|
24
|
+
|
|
25
|
+
## SurfaceSecondary
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={LabelStories.SurfaceSecondary} />
|
|
28
|
+
|
|
29
|
+
## SurfaceTertiary
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={LabelStories.SurfaceTertiary} />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Label, labelConfig } from '@itcase/ui/components/Label'
|
|
2
1
|
import {
|
|
3
2
|
borderColorProps,
|
|
4
3
|
borderTypeProps,
|
|
@@ -8,48 +7,28 @@ import {
|
|
|
8
7
|
textColorProps,
|
|
9
8
|
textSizeProps,
|
|
10
9
|
widthProps,
|
|
11
|
-
} from '
|
|
12
|
-
|
|
13
|
-
import
|
|
10
|
+
} from '../../../constants'
|
|
11
|
+
import labelAppearance from '../appearance.json'
|
|
12
|
+
import { Label, labelConfig } from '../Label'
|
|
14
13
|
|
|
15
14
|
labelConfig.setAppearance(labelAppearance)
|
|
16
15
|
|
|
17
16
|
export default {
|
|
18
|
-
title: 'Atoms / Label ',
|
|
19
|
-
component: Label,
|
|
20
|
-
parameters: {
|
|
21
|
-
controls: {
|
|
22
|
-
exclude: [
|
|
23
|
-
'borderDesktop',
|
|
24
|
-
'borderMobile',
|
|
25
|
-
'borderTablet',
|
|
26
|
-
'borderTypeDesktop',
|
|
27
|
-
'borderTypeMobile',
|
|
28
|
-
'borderTypeTablet',
|
|
29
|
-
'fillDesktop',
|
|
30
|
-
'fillMobile',
|
|
31
|
-
'fillTablet',
|
|
32
|
-
'labelTextSizeDesktop',
|
|
33
|
-
'labelTextSizeMobile',
|
|
34
|
-
'labelTextSizeTablet',
|
|
35
|
-
'shapeDesktop',
|
|
36
|
-
'shapeMobile',
|
|
37
|
-
'shapeTablet',
|
|
38
|
-
'sizeDesktop',
|
|
39
|
-
'sizeMobile',
|
|
40
|
-
'sizeTablet',
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
17
|
argTypes: {
|
|
45
|
-
advancedProps: { control: 'boolean' },
|
|
46
18
|
children: {
|
|
47
19
|
if: { arg: 'advancedProps' },
|
|
48
20
|
},
|
|
49
|
-
|
|
50
|
-
|
|
21
|
+
width: {
|
|
22
|
+
control: 'inline-radio',
|
|
23
|
+
options: widthProps,
|
|
51
24
|
},
|
|
25
|
+
textAlign: {
|
|
26
|
+
control: 'inline-radio',
|
|
27
|
+
options: ['left', 'center', 'right'],
|
|
28
|
+
},
|
|
29
|
+
advancedProps: { control: 'boolean' },
|
|
52
30
|
appearance: {
|
|
31
|
+
control: 'inline-radio',
|
|
53
32
|
options: [
|
|
54
33
|
null,
|
|
55
34
|
'accent',
|
|
@@ -59,58 +38,78 @@ export default {
|
|
|
59
38
|
'surfaceSecondary',
|
|
60
39
|
'surfaceTertiary',
|
|
61
40
|
],
|
|
62
|
-
control: 'inline-radio',
|
|
63
41
|
},
|
|
64
42
|
border: {
|
|
65
|
-
options: borderColorProps,
|
|
66
43
|
control: 'select',
|
|
44
|
+
options: borderColorProps,
|
|
67
45
|
},
|
|
68
46
|
borderType: {
|
|
69
|
-
options: borderTypeProps,
|
|
70
47
|
control: 'inline-radio',
|
|
48
|
+
options: borderTypeProps,
|
|
49
|
+
},
|
|
50
|
+
className: {
|
|
51
|
+
if: { arg: 'advancedProps' },
|
|
71
52
|
},
|
|
72
53
|
fill: {
|
|
73
|
-
options: fillProps,
|
|
74
54
|
control: 'select',
|
|
55
|
+
options: fillProps,
|
|
75
56
|
},
|
|
76
57
|
labelTextColor: {
|
|
77
|
-
options: textColorProps,
|
|
78
58
|
control: 'select',
|
|
59
|
+
options: textColorProps,
|
|
79
60
|
},
|
|
80
61
|
labelTextSize: {
|
|
62
|
+
control: 'inline-radio',
|
|
81
63
|
options: textSizeProps,
|
|
64
|
+
},
|
|
65
|
+
mode: {
|
|
82
66
|
control: 'inline-radio',
|
|
67
|
+
options: [null, 'skeleton'],
|
|
83
68
|
},
|
|
84
69
|
shape: {
|
|
85
|
-
options: shapeProps,
|
|
86
70
|
control: 'inline-radio',
|
|
71
|
+
options: shapeProps,
|
|
87
72
|
},
|
|
88
73
|
size: {
|
|
89
|
-
options: sizeProps,
|
|
90
|
-
control: 'inline-radio',
|
|
91
|
-
},
|
|
92
|
-
textAlign: {
|
|
93
|
-
options: ['left', 'center', 'right'],
|
|
94
|
-
control: 'inline-radio',
|
|
95
|
-
},
|
|
96
|
-
width: {
|
|
97
|
-
options: widthProps,
|
|
98
74
|
control: 'inline-radio',
|
|
75
|
+
options: sizeProps,
|
|
99
76
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
77
|
+
},
|
|
78
|
+
component: Label,
|
|
79
|
+
parameters: {
|
|
80
|
+
controls: {
|
|
81
|
+
exclude: [
|
|
82
|
+
'borderDesktop',
|
|
83
|
+
'borderMobile',
|
|
84
|
+
'borderTablet',
|
|
85
|
+
'borderTypeDesktop',
|
|
86
|
+
'borderTypeMobile',
|
|
87
|
+
'borderTypeTablet',
|
|
88
|
+
'fillDesktop',
|
|
89
|
+
'fillMobile',
|
|
90
|
+
'fillTablet',
|
|
91
|
+
'labelTextSizeDesktop',
|
|
92
|
+
'labelTextSizeMobile',
|
|
93
|
+
'labelTextSizeTablet',
|
|
94
|
+
'shapeDesktop',
|
|
95
|
+
'shapeMobile',
|
|
96
|
+
'shapeTablet',
|
|
97
|
+
'sizeDesktop',
|
|
98
|
+
'sizeMobile',
|
|
99
|
+
'sizeTablet',
|
|
100
|
+
],
|
|
103
101
|
},
|
|
104
102
|
},
|
|
103
|
+
title: 'Atoms / Label',
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
export const Default = {
|
|
108
107
|
args: {
|
|
109
108
|
appearance: 'accent',
|
|
110
|
-
shape: 'rounded',
|
|
111
109
|
label: 'Label',
|
|
112
|
-
size: 'xxl',
|
|
113
110
|
labelTextSize: 'l',
|
|
111
|
+
shape: 'rounded',
|
|
112
|
+
size: 'xxl',
|
|
114
113
|
},
|
|
115
114
|
}
|
|
116
115
|
export const Accent = {
|
|
@@ -161,3 +160,14 @@ export const SkeletonMode = {
|
|
|
161
160
|
mode: 'skeleton',
|
|
162
161
|
},
|
|
163
162
|
}
|
|
163
|
+
|
|
164
|
+
export const WithTooltip = {
|
|
165
|
+
args: {
|
|
166
|
+
...Default.args,
|
|
167
|
+
appearance: 'accent',
|
|
168
|
+
showTooltip: true,
|
|
169
|
+
tooltip: '123',
|
|
170
|
+
tooltipText: '123',
|
|
171
|
+
tooltipTextSize: 'm',
|
|
172
|
+
},
|
|
173
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as LoaderStories from './Loader.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={LoaderStories} />
|
|
6
|
+
|
|
7
|
+
# Loader
|
|
8
|
+
|
|
9
|
+
## Accent
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={LoaderStories.Accent} />
|
|
12
|
+
|
|
13
|
+
## Primary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={LoaderStories.Primary} />
|
|
16
|
+
|
|
17
|
+
## Secondary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={LoaderStories.Secondary} />
|
|
20
|
+
|
|
21
|
+
## SurfacePrimary
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={LoaderStories.SurfacePrimary} />
|
|
24
|
+
|
|
25
|
+
## SurfaceSecondary
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={LoaderStories.SurfaceSecondary} />
|
|
28
|
+
|
|
29
|
+
## SurfaceTertiary
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={LoaderStories.SurfaceTertiary} />
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import { Loader, loaderConfig } from '@itcase/ui/components/Loader'
|
|
2
|
-
import loaderAppearance from 'src/components/Loader/appearance.json'
|
|
3
|
-
|
|
4
1
|
import {
|
|
5
|
-
fillProps,
|
|
6
2
|
heightProps,
|
|
7
3
|
positionProps,
|
|
8
4
|
textColorProps,
|
|
9
5
|
textSizeProps,
|
|
10
6
|
widthProps,
|
|
11
|
-
} from '
|
|
7
|
+
} from '../../../constants'
|
|
8
|
+
import loaderAppearance from '../appearance.json'
|
|
9
|
+
import { Loader, loaderConfig } from '../Loader'
|
|
12
10
|
|
|
13
11
|
loaderConfig.setAppearance(loaderAppearance)
|
|
14
12
|
|
|
15
13
|
export default {
|
|
16
|
-
title: 'Atoms / Loader',
|
|
17
|
-
component: Loader,
|
|
18
14
|
argTypes: {
|
|
19
|
-
|
|
20
|
-
left: {
|
|
15
|
+
children: {
|
|
21
16
|
if: { arg: 'advancedProps' },
|
|
22
17
|
},
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
width: {
|
|
19
|
+
control: 'inline-radio',
|
|
20
|
+
options: widthProps,
|
|
25
21
|
},
|
|
26
|
-
|
|
22
|
+
height: {
|
|
23
|
+
control: 'inline-radio',
|
|
24
|
+
options: heightProps,
|
|
25
|
+
},
|
|
26
|
+
position: {
|
|
27
|
+
control: 'inline-radio',
|
|
27
28
|
if: { arg: 'advancedProps' },
|
|
29
|
+
options: positionProps,
|
|
28
30
|
},
|
|
29
|
-
|
|
31
|
+
right: {
|
|
30
32
|
if: { arg: 'advancedProps' },
|
|
31
33
|
},
|
|
32
|
-
|
|
33
|
-
options: positionProps,
|
|
34
|
-
control: 'inline-radio',
|
|
34
|
+
left: {
|
|
35
35
|
if: { arg: 'advancedProps' },
|
|
36
36
|
},
|
|
37
|
+
advancedProps: { control: 'boolean' },
|
|
37
38
|
appearance: {
|
|
39
|
+
control: 'inline-radio',
|
|
38
40
|
options: [
|
|
39
41
|
null,
|
|
40
42
|
'accent',
|
|
@@ -44,29 +46,25 @@ export default {
|
|
|
44
46
|
'surfaceSecondary',
|
|
45
47
|
'surfaceTertiary',
|
|
46
48
|
],
|
|
47
|
-
control: 'inline-radio',
|
|
48
49
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
control: 'inline-radio',
|
|
50
|
+
className: {
|
|
51
|
+
if: { arg: 'advancedProps' },
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
options: heightProps,
|
|
53
|
+
set: {
|
|
55
54
|
control: 'inline-radio',
|
|
55
|
+
options: [null, 'simple'],
|
|
56
56
|
},
|
|
57
57
|
textColor: {
|
|
58
|
-
options: textColorProps,
|
|
59
58
|
control: 'select',
|
|
59
|
+
options: textColorProps,
|
|
60
60
|
},
|
|
61
61
|
textSize: {
|
|
62
|
-
options: textSizeProps,
|
|
63
|
-
control: 'inline-radio',
|
|
64
|
-
},
|
|
65
|
-
set: {
|
|
66
|
-
options: [null, 'simple'],
|
|
67
62
|
control: 'inline-radio',
|
|
63
|
+
options: textSizeProps,
|
|
68
64
|
},
|
|
69
65
|
},
|
|
66
|
+
component: Loader,
|
|
67
|
+
title: 'Atoms / Loader',
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
export const Default = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as LogoStories from './Logo.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={LogoStories} />
|
|
6
|
+
|
|
7
|
+
# Logo
|
|
8
|
+
|
|
9
|
+
## SizeS
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={LogoStories.SizeS} />
|
|
12
|
+
|
|
13
|
+
## SizeM
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={LogoStories.SizeM} />
|
|
16
|
+
|
|
17
|
+
## SizeL
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={LogoStories.SizeL} />
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { alignDirectionProps, alignProps, widthProps } from '../../../constants'
|
|
2
|
+
import { Logo } from '../Logo'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: 'Atoms / Logo',
|
|
6
|
-
component: Logo,
|
|
7
5
|
argTypes: {
|
|
8
|
-
advancedProps: { control: 'boolean' },
|
|
9
6
|
children: {
|
|
10
7
|
if: { arg: 'advancedProps' },
|
|
11
8
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
isLink: {
|
|
16
|
-
if: { arg: 'advancedProps' },
|
|
9
|
+
width: {
|
|
10
|
+
control: 'inline-radio',
|
|
11
|
+
options: widthProps,
|
|
17
12
|
},
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
alignItems: {
|
|
14
|
+
control: 'inline-radio',
|
|
15
|
+
options: alignProps,
|
|
20
16
|
},
|
|
21
|
-
|
|
17
|
+
isLink: {
|
|
22
18
|
if: { arg: 'advancedProps' },
|
|
23
19
|
},
|
|
20
|
+
advancedProps: { control: 'boolean' },
|
|
24
21
|
align: {
|
|
25
|
-
options: alignProps,
|
|
26
22
|
control: 'inline-radio',
|
|
27
|
-
},
|
|
28
|
-
alignItems: {
|
|
29
23
|
options: alignProps,
|
|
30
|
-
control: 'inline-radio',
|
|
31
24
|
},
|
|
32
25
|
alignDirection: {
|
|
33
|
-
options: alignDirectionProps,
|
|
34
26
|
control: 'inline-radio',
|
|
27
|
+
options: alignDirectionProps,
|
|
35
28
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
className: {
|
|
30
|
+
if: { arg: 'advancedProps' },
|
|
31
|
+
},
|
|
32
|
+
href: {
|
|
33
|
+
if: { arg: 'advancedProps' },
|
|
39
34
|
},
|
|
40
35
|
link: {
|
|
41
36
|
if: { arg: 'advancedProps' },
|
|
42
37
|
},
|
|
43
|
-
|
|
38
|
+
logoSrc: {
|
|
44
39
|
if: { arg: 'advancedProps' },
|
|
45
40
|
},
|
|
41
|
+
mode: {
|
|
42
|
+
control: 'inline-radio',
|
|
43
|
+
options: [null, 'skeleton'],
|
|
44
|
+
},
|
|
46
45
|
size: {
|
|
47
|
-
options: ['s', 'm', 'l'],
|
|
48
46
|
control: 'inline-radio',
|
|
47
|
+
options: ['s', 'm', 'l'],
|
|
49
48
|
},
|
|
50
49
|
sizeMobile: {
|
|
50
|
+
control: 'inline-radio',
|
|
51
51
|
if: { arg: 'advancedProps' },
|
|
52
52
|
options: ['s', 'm', 'l'],
|
|
53
|
-
control: 'inline-radio',
|
|
54
53
|
},
|
|
55
54
|
source: {
|
|
56
55
|
if: { arg: 'advancedProps' },
|
|
57
56
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
control: 'inline-radio',
|
|
57
|
+
target: {
|
|
58
|
+
if: { arg: 'advancedProps' },
|
|
61
59
|
},
|
|
62
60
|
},
|
|
61
|
+
component: Logo,
|
|
62
|
+
title: 'Atoms / Logo',
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export const Default = {
|
|
@@ -93,7 +93,7 @@ export const SizeL = {
|
|
|
93
93
|
export const SkeletonMode = {
|
|
94
94
|
args: {
|
|
95
95
|
...Default.args,
|
|
96
|
-
size: 'l',
|
|
97
96
|
mode: 'skeleton',
|
|
97
|
+
size: 'l',
|
|
98
98
|
},
|
|
99
99
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as MenuItemStories from './MenuItem.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={MenuItemStories} />
|
|
6
|
+
|
|
7
|
+
# MenuItem
|
|
8
|
+
|
|
9
|
+
## Active
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={MenuItemStories.Active} />
|
|
12
|
+
|
|
13
|
+
## Subitem
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={MenuItemStories.SetSubitem} />
|