@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,101 @@
|
|
|
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
|
+
padding={args.padding}
|
|
16
|
+
borderColor={args.borderColor}
|
|
17
|
+
direction={args.direction}
|
|
18
|
+
>
|
|
19
|
+
<Group height="60" minWidth="25%" fill="accentPrimary" padding="20" textAlign="center">
|
|
20
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
21
|
+
1
|
|
22
|
+
</Text>
|
|
23
|
+
</Group>
|
|
24
|
+
<Group
|
|
25
|
+
height="60"
|
|
26
|
+
minWidth="25%"
|
|
27
|
+
fill="primaryPrimary"
|
|
28
|
+
padding="20"
|
|
29
|
+
alignSelf={args.alignSelf}
|
|
30
|
+
textAlign="center"
|
|
31
|
+
>
|
|
32
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
33
|
+
2
|
|
34
|
+
</Text>
|
|
35
|
+
</Group>
|
|
36
|
+
<Group height="60" minWidth="25%" fill="secondaryPrimary" padding="20" textAlign="center">
|
|
37
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
38
|
+
3
|
|
39
|
+
</Text>
|
|
40
|
+
</Group>
|
|
41
|
+
<Group height="60" minWidth="25%" fill="infoPrimary" padding="20" textAlign="center">
|
|
42
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
43
|
+
4
|
|
44
|
+
</Text>
|
|
45
|
+
</Group>
|
|
46
|
+
</Group>
|
|
47
|
+
),
|
|
48
|
+
title: 'Layout / Group / Variants / AlignSelf',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const Default = {
|
|
52
|
+
args: {
|
|
53
|
+
width: '500',
|
|
54
|
+
padding: '20',
|
|
55
|
+
borderColor: 'surfaceBorderPrimary',
|
|
56
|
+
direction: 'vertical',
|
|
57
|
+
fill: 'surfacePrimary',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Stretch = {
|
|
62
|
+
args: {
|
|
63
|
+
...Default.args,
|
|
64
|
+
alignSelf: 'stretch',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const FlexStart = {
|
|
69
|
+
args: {
|
|
70
|
+
...Default.args,
|
|
71
|
+
alignSelf: 'flex-start',
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const FlexEnd = {
|
|
76
|
+
args: {
|
|
77
|
+
...Default.args,
|
|
78
|
+
alignSelf: 'flex-end',
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Center = {
|
|
83
|
+
args: {
|
|
84
|
+
...Default.args,
|
|
85
|
+
alignSelf: 'center',
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const Baseline = {
|
|
90
|
+
args: {
|
|
91
|
+
...Default.args,
|
|
92
|
+
alignSelf: 'baseline',
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const Auto = {
|
|
97
|
+
args: {
|
|
98
|
+
...Default.args,
|
|
99
|
+
alignSelf: 'auto',
|
|
100
|
+
},
|
|
101
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as AppearanceStories from './Appearance.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Atoms / Tab / Appearance" />
|
|
6
|
+
|
|
7
|
+
# Appearance
|
|
8
|
+
|
|
9
|
+
## SurfacePrimary
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={AppearanceStories.SurfacePrimary} />
|
|
12
|
+
|
|
13
|
+
## SurfaceSecondary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={AppearanceStories.SurfaceSecondary} />
|
|
16
|
+
|
|
17
|
+
## SurfaceTertiary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={AppearanceStories.SurfaceTertiary} />
|
|
20
|
+
|
|
21
|
+
## SurfaceQuaternary
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={AppearanceStories.SurfaceQuaternary} />
|
|
24
|
+
|
|
25
|
+
## Accent
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={AppearanceStories.Accent} />
|
|
28
|
+
|
|
29
|
+
## Primary
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={AppearanceStories.Primary} />
|
|
32
|
+
|
|
33
|
+
## Secondary
|
|
34
|
+
|
|
35
|
+
<Canvas sourceState="shown" of={AppearanceStories.Secondary} />
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { badgeConfig } from '../../Badge'
|
|
2
|
+
import badgeAppearance from '../../Badge/appearance.json'
|
|
3
|
+
import tabAppearance from '../appearance.json'
|
|
4
|
+
import { Tab, tabConfig } from '../Tab'
|
|
5
|
+
import { argTypes } from './args'
|
|
6
|
+
|
|
7
|
+
tabConfig.setAppearance(tabAppearance)
|
|
8
|
+
badgeConfig.setAppearance(badgeAppearance)
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
argTypes: {
|
|
12
|
+
...argTypes,
|
|
13
|
+
},
|
|
14
|
+
component: Tab,
|
|
15
|
+
parameters: {
|
|
16
|
+
controls: {
|
|
17
|
+
exclude: [
|
|
18
|
+
'fillDesktop',
|
|
19
|
+
'fillMobile',
|
|
20
|
+
'fillTablet',
|
|
21
|
+
'linkFillDesktop',
|
|
22
|
+
'linkFillMobile',
|
|
23
|
+
'linkFillTablet',
|
|
24
|
+
'shapeDesktop',
|
|
25
|
+
'shapeMobile',
|
|
26
|
+
'shapeTablet',
|
|
27
|
+
'sizeDesktop',
|
|
28
|
+
'sizeMobile',
|
|
29
|
+
'sizeTablet',
|
|
30
|
+
'typeDesktop',
|
|
31
|
+
'typeMobile',
|
|
32
|
+
'typeTablet',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
title: 'Atoms / Tab / Appearance',
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Default = {
|
|
40
|
+
args: {
|
|
41
|
+
appearance: 'any',
|
|
42
|
+
badge: true,
|
|
43
|
+
badgeAppearance: 'accent',
|
|
44
|
+
badgeSize: 'xs',
|
|
45
|
+
badgeTextSize: 'xs',
|
|
46
|
+
badgeValue: '3',
|
|
47
|
+
label: 'Label',
|
|
48
|
+
labelTextSize: 'm',
|
|
49
|
+
size: 'normal',
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const SurfacePrimary = {
|
|
54
|
+
args: {
|
|
55
|
+
...Default.args,
|
|
56
|
+
appearance: 'surfacePrimary',
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const SurfaceSecondary = {
|
|
61
|
+
args: {
|
|
62
|
+
...Default.args,
|
|
63
|
+
appearance: 'surfaceSecondary',
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const SurfaceTertiary = {
|
|
68
|
+
args: {
|
|
69
|
+
...Default.args,
|
|
70
|
+
appearance: 'surfaceTertiary',
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const SurfaceQuaternary = {
|
|
75
|
+
args: {
|
|
76
|
+
...Default.args,
|
|
77
|
+
appearance: 'surfaceQuaternary',
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const Accent = {
|
|
82
|
+
args: {
|
|
83
|
+
...Default.args,
|
|
84
|
+
appearance: 'accent',
|
|
85
|
+
badgeAppearance: 'surfacePrimary',
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const Primary = {
|
|
90
|
+
args: {
|
|
91
|
+
...Default.args,
|
|
92
|
+
appearance: 'primary',
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const Secondary = {
|
|
97
|
+
args: {
|
|
98
|
+
...Default.args,
|
|
99
|
+
appearance: 'secondary',
|
|
100
|
+
},
|
|
101
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as AvatarStories from './Avatar.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={AvatarStories} />
|
|
6
|
+
|
|
7
|
+
# Avatar
|
|
8
|
+
|
|
9
|
+
## Image
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={AvatarStories.Image} />
|
|
12
|
+
|
|
13
|
+
## ImageWithIcon
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={AvatarStories.ImageWithIcon} />
|
|
16
|
+
|
|
17
|
+
## Text
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={AvatarStories.Text} />
|
|
20
|
+
|
|
21
|
+
## TextWithIcon
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={AvatarStories.TextWithIcon} />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Avatar } from '@itcase/ui/components/Avatar'
|
|
2
1
|
import {
|
|
3
2
|
fillHoverProps,
|
|
4
3
|
fillProps,
|
|
@@ -9,114 +8,120 @@ import {
|
|
|
9
8
|
textColorProps,
|
|
10
9
|
textSizeProps,
|
|
11
10
|
textWeightProps,
|
|
12
|
-
} from '
|
|
11
|
+
} from '../../../constants'
|
|
12
|
+
import { Avatar } from '../Avatar'
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
args: {
|
|
16
|
+
children: [],
|
|
17
|
+
advancedProps: false,
|
|
18
|
+
className: '',
|
|
19
|
+
fill: 'surfaceTertiary',
|
|
20
|
+
shape: 'circular',
|
|
21
|
+
size: 96,
|
|
22
|
+
onClick: '',
|
|
23
|
+
},
|
|
17
24
|
argTypes: {
|
|
18
|
-
advancedProps: { control: 'boolean' },
|
|
19
|
-
className: {
|
|
20
|
-
if: { arg: 'advancedProps' },
|
|
21
|
-
},
|
|
22
25
|
children: {
|
|
23
26
|
if: { arg: 'advancedProps' },
|
|
24
27
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
options: ['assets/avatar/woman.png', 'assets/avatar/man.png'],
|
|
28
|
-
if: { arg: 'type', eq: 'image' },
|
|
29
|
-
},
|
|
30
|
-
onClick: {
|
|
28
|
+
advancedProps: { control: 'boolean' },
|
|
29
|
+
className: {
|
|
31
30
|
if: { arg: 'advancedProps' },
|
|
32
31
|
},
|
|
33
|
-
|
|
34
|
-
control: 'inline-radio',
|
|
35
|
-
options: shapeProps,
|
|
36
|
-
},
|
|
37
|
-
iconSrc: {
|
|
38
|
-
control: 'select',
|
|
39
|
-
options: [null, 'assets/40/close.svg'],
|
|
40
|
-
},
|
|
41
|
-
textSize: {
|
|
42
|
-
control: 'select',
|
|
43
|
-
options: textSizeProps,
|
|
44
|
-
if: { arg: 'type', eq: 'text' },
|
|
45
|
-
},
|
|
46
|
-
textColor: {
|
|
32
|
+
fill: {
|
|
47
33
|
control: 'select',
|
|
48
|
-
options: textColorProps,
|
|
49
34
|
if: { arg: 'type', eq: 'text' },
|
|
35
|
+
options: fillProps,
|
|
50
36
|
},
|
|
51
|
-
|
|
52
|
-
control: 'select',
|
|
53
|
-
options: textWeightProps,
|
|
37
|
+
firstName: {
|
|
54
38
|
if: { arg: 'type', eq: 'text' },
|
|
55
39
|
},
|
|
56
|
-
|
|
57
40
|
iconFill: {
|
|
58
41
|
control: 'select',
|
|
59
|
-
options: fillProps,
|
|
60
42
|
if: { arg: 'iconSrc', neq: null },
|
|
43
|
+
options: fillProps,
|
|
61
44
|
},
|
|
62
45
|
iconFillHover: {
|
|
63
|
-
options: fillHoverProps,
|
|
64
46
|
control: 'select',
|
|
65
47
|
if: { arg: 'iconSrc', neq: null },
|
|
48
|
+
options: fillHoverProps,
|
|
66
49
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
control: 'select',
|
|
50
|
+
iconFillSize: {
|
|
51
|
+
control: 'inline-radio',
|
|
70
52
|
if: { arg: 'iconSrc', neq: null },
|
|
53
|
+
options: iconFillSizeProps,
|
|
71
54
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
control: 'inline-radio',
|
|
55
|
+
iconItemFill: {
|
|
56
|
+
control: 'select',
|
|
75
57
|
if: { arg: 'iconSrc', neq: null },
|
|
58
|
+
options: fillProps,
|
|
76
59
|
},
|
|
77
60
|
iconShape: {
|
|
78
|
-
options: shapeProps,
|
|
79
61
|
control: 'inline-radio',
|
|
80
62
|
if: { arg: 'iconSrc', neq: null },
|
|
63
|
+
options: shapeProps,
|
|
81
64
|
},
|
|
82
|
-
|
|
83
|
-
|
|
65
|
+
|
|
66
|
+
iconSize: {
|
|
84
67
|
control: 'inline-radio',
|
|
85
68
|
if: { arg: 'iconSrc', neq: null },
|
|
69
|
+
options: iconSizeProps,
|
|
86
70
|
},
|
|
87
|
-
|
|
88
|
-
options: fillProps,
|
|
71
|
+
iconSrc: {
|
|
89
72
|
control: 'select',
|
|
73
|
+
options: [null, 'assets/40/close.svg'],
|
|
74
|
+
},
|
|
75
|
+
mode: {
|
|
76
|
+
control: 'inline-radio',
|
|
77
|
+
options: [null, 'skeleton'],
|
|
78
|
+
},
|
|
79
|
+
secondName: {
|
|
90
80
|
if: { arg: 'type', eq: 'text' },
|
|
91
81
|
},
|
|
92
|
-
|
|
93
|
-
options: sizePXProps,
|
|
82
|
+
shape: {
|
|
94
83
|
control: 'inline-radio',
|
|
84
|
+
options: shapeProps,
|
|
95
85
|
},
|
|
96
|
-
|
|
97
|
-
options: ['image', 'text'],
|
|
86
|
+
size: {
|
|
98
87
|
control: 'inline-radio',
|
|
88
|
+
options: sizePXProps,
|
|
99
89
|
},
|
|
100
|
-
|
|
90
|
+
src: {
|
|
91
|
+
if: { arg: 'type', eq: 'image' },
|
|
92
|
+
options: ['assets/avatar/woman.png', 'assets/avatar/man.png'],
|
|
93
|
+
type: 'select',
|
|
94
|
+
},
|
|
95
|
+
textColor: {
|
|
96
|
+
control: 'select',
|
|
101
97
|
if: { arg: 'type', eq: 'text' },
|
|
98
|
+
options: textColorProps,
|
|
102
99
|
},
|
|
103
|
-
|
|
100
|
+
textSize: {
|
|
101
|
+
control: 'select',
|
|
104
102
|
if: { arg: 'type', eq: 'text' },
|
|
103
|
+
options: textSizeProps,
|
|
105
104
|
},
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
textWeight: {
|
|
106
|
+
control: 'select',
|
|
107
|
+
if: { arg: 'type', eq: 'text' },
|
|
108
|
+
options: textWeightProps,
|
|
109
|
+
},
|
|
110
|
+
type: {
|
|
108
111
|
control: 'inline-radio',
|
|
112
|
+
options: ['image', 'text'],
|
|
113
|
+
},
|
|
114
|
+
onClick: {
|
|
115
|
+
if: { arg: 'advancedProps' },
|
|
109
116
|
},
|
|
110
117
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
shape: 'circular',
|
|
117
|
-
fill: 'surfaceTertiary',
|
|
118
|
-
size: 96,
|
|
118
|
+
component: Avatar,
|
|
119
|
+
parameters: {
|
|
120
|
+
controls: {
|
|
121
|
+
exclude: [],
|
|
122
|
+
},
|
|
119
123
|
},
|
|
124
|
+
title: 'Molecules / Avatar',
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
const ImageProps = {
|
|
@@ -125,14 +130,14 @@ const ImageProps = {
|
|
|
125
130
|
}
|
|
126
131
|
|
|
127
132
|
const IconProps = {
|
|
128
|
-
iconSrc: 'assets/40/close.svg',
|
|
129
|
-
iconSize: 40,
|
|
130
133
|
iconFill: 'accentPrimary',
|
|
131
134
|
iconFillHover: 'accentPrimaryHover',
|
|
132
135
|
iconFillSize: 40,
|
|
133
136
|
iconItemFill: 'accentItemPrimary',
|
|
134
137
|
iconItemFillHover: 'accentItemPrimaryHover',
|
|
135
138
|
iconShape: 'circular',
|
|
139
|
+
iconSize: 40,
|
|
140
|
+
iconSrc: 'assets/40/close.svg',
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
export const Default = {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as IconStories from '../../Icon/stories/Icon.stories.js'
|
|
4
|
+
import * as BadgeStories from './Badge.stories.js'
|
|
5
|
+
|
|
6
|
+
<Meta of={BadgeStories} />
|
|
7
|
+
|
|
8
|
+
# Badge
|
|
9
|
+
|
|
10
|
+
## Accent
|
|
11
|
+
|
|
12
|
+
<Canvas sourceState="shown" of={BadgeStories.Accent} />
|
|
13
|
+
|
|
14
|
+
## Secondary
|
|
15
|
+
|
|
16
|
+
<Canvas sourceState="shown" of={BadgeStories.Secondary} />
|
|
17
|
+
|
|
18
|
+
## Primary
|
|
19
|
+
|
|
20
|
+
<Canvas sourceState="shown" of={BadgeStories.Primary} />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Badge, badgeConfig } from '@itcase/ui/components/Badge'
|
|
2
1
|
import {
|
|
3
2
|
borderColorHoverProps,
|
|
4
3
|
borderColorProps,
|
|
@@ -8,77 +7,77 @@ import {
|
|
|
8
7
|
shapeProps,
|
|
9
8
|
sizeProps,
|
|
10
9
|
textColorProps,
|
|
11
|
-
} from '
|
|
12
|
-
|
|
13
|
-
import
|
|
10
|
+
} from '../../../constants'
|
|
11
|
+
import badgeAppearance from '../../Badge/appearance.json'
|
|
12
|
+
import { Badge, badgeConfig } from '../Badge'
|
|
14
13
|
|
|
15
14
|
badgeConfig.setAppearance(badgeAppearance)
|
|
16
15
|
|
|
17
16
|
export default {
|
|
18
|
-
title: 'Atoms / Badge',
|
|
19
|
-
component: Badge,
|
|
20
17
|
argTypes: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
control: 'inline-radio',
|
|
24
|
-
},
|
|
25
|
-
shape: {
|
|
26
|
-
options: shapeProps,
|
|
27
|
-
control: 'inline-radio',
|
|
28
|
-
},
|
|
29
|
-
size: {
|
|
30
|
-
options: sizeProps,
|
|
31
|
-
control: 'inline-radio',
|
|
32
|
-
},
|
|
33
|
-
textSize: {
|
|
34
|
-
options: sizeProps,
|
|
35
|
-
control: 'inline-radio',
|
|
36
|
-
},
|
|
37
|
-
fill: {
|
|
38
|
-
options: fillProps,
|
|
39
|
-
control: 'select',
|
|
18
|
+
children: {
|
|
19
|
+
if: { arg: 'advancedProps' },
|
|
40
20
|
},
|
|
41
|
-
|
|
42
|
-
options: textColorProps,
|
|
21
|
+
borderWidth: {
|
|
43
22
|
control: 'select',
|
|
23
|
+
options: borderWidthProps,
|
|
44
24
|
},
|
|
45
25
|
borderColor: {
|
|
46
|
-
options: borderColorProps,
|
|
47
26
|
control: 'select',
|
|
27
|
+
options: borderColorProps,
|
|
48
28
|
},
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
advancedProps: { control: 'boolean' },
|
|
30
|
+
after: {
|
|
31
|
+
if: { arg: 'advancedProps' },
|
|
32
|
+
},
|
|
33
|
+
appearance: {
|
|
51
34
|
control: 'inline-radio',
|
|
35
|
+
options: [null, 'accent', 'secondary', 'primary'],
|
|
52
36
|
},
|
|
53
37
|
borderColorHover: {
|
|
54
|
-
options: borderColorHoverProps,
|
|
55
38
|
control: 'select',
|
|
39
|
+
options: borderColorHoverProps,
|
|
56
40
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
advancedProps: { control: 'boolean' },
|
|
62
|
-
after: {
|
|
63
|
-
if: { arg: 'advancedProps' },
|
|
64
|
-
},
|
|
65
|
-
children: {
|
|
66
|
-
if: { arg: 'advancedProps' },
|
|
41
|
+
borderType: {
|
|
42
|
+
control: 'inline-radio',
|
|
43
|
+
options: borderTypeProps,
|
|
67
44
|
},
|
|
68
45
|
className: {
|
|
69
46
|
if: { arg: 'advancedProps' },
|
|
70
47
|
},
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
fill: {
|
|
49
|
+
control: 'select',
|
|
50
|
+
options: fillProps,
|
|
73
51
|
},
|
|
74
52
|
mode: {
|
|
53
|
+
control: 'inline-radio',
|
|
75
54
|
options: [null, 'skeleton'],
|
|
55
|
+
},
|
|
56
|
+
shape: {
|
|
57
|
+
control: 'inline-radio',
|
|
58
|
+
options: shapeProps,
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
76
61
|
control: 'inline-radio',
|
|
62
|
+
options: sizeProps,
|
|
63
|
+
},
|
|
64
|
+
textColor: {
|
|
65
|
+
control: 'select',
|
|
66
|
+
options: textColorProps,
|
|
67
|
+
},
|
|
68
|
+
textSize: {
|
|
69
|
+
control: 'inline-radio',
|
|
70
|
+
options: sizeProps,
|
|
71
|
+
},
|
|
72
|
+
type: {
|
|
73
|
+
if: { arg: 'advancedProps' },
|
|
77
74
|
},
|
|
78
75
|
},
|
|
76
|
+
component: Badge,
|
|
77
|
+
title: 'Atoms / Badge',
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
const Default = {
|
|
82
81
|
args: {
|
|
83
82
|
shape: 'circular',
|
|
84
83
|
size: 's',
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Canvas, Meta, Story } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import * as ButtonStories from './Button.stories.js'
|
|
5
|
+
|
|
6
|
+
<Meta of={ButtonStories} />
|
|
7
|
+
|
|
8
|
+
# Button
|
|
9
|
+
|
|
10
|
+
## Accent
|
|
11
|
+
|
|
12
|
+
<Canvas sourceState="shown" of={ButtonStories.Accent} />
|
|
13
|
+
|
|
14
|
+
## Primary
|
|
15
|
+
|
|
16
|
+
<Canvas sourceState="shown" of={ButtonStories.Primary} />
|
|
17
|
+
|
|
18
|
+
## Secondary
|
|
19
|
+
|
|
20
|
+
<Canvas sourceState="shown" of={ButtonStories.Secondary} />
|
|
21
|
+
|
|
22
|
+
## SurfacePrimary
|
|
23
|
+
|
|
24
|
+
<Canvas sourceState="shown" of={ButtonStories.SurfacePrimary} />
|
|
25
|
+
|
|
26
|
+
## SurfaceSecondary
|
|
27
|
+
|
|
28
|
+
<Canvas sourceState="shown" of={ButtonStories.SurfaceSecondary} />
|
|
29
|
+
|
|
30
|
+
## SurfaceTertiary
|
|
31
|
+
|
|
32
|
+
<Canvas sourceState="shown" of={ButtonStories.SurfaceTertiary} />
|
|
33
|
+
|
|
34
|
+
## SurfaceDisabled
|
|
35
|
+
|
|
36
|
+
<Canvas sourceState="shown" of={ButtonStories.SurfaceDisabled} />
|
|
37
|
+
|
|
38
|
+
## IconBefore
|
|
39
|
+
|
|
40
|
+
<Canvas sourceState="shown" of={ButtonStories.IconBefore} />
|
|
41
|
+
|
|
42
|
+
## IconAfter
|
|
43
|
+
|
|
44
|
+
<Canvas sourceState="shown" of={ButtonStories.IconAfter} />
|
|
45
|
+
|
|
46
|
+
## WithBadge
|
|
47
|
+
|
|
48
|
+
<Canvas sourceState="shown" of={ButtonStories.WithBadge} />
|