@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
|
@@ -1,84 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { fillProps, textColorProps, textSizeProps } from '@itcase/ui/constants'
|
|
1
|
+
import { fillProps, textColorProps, textSizeProps } from '../../../constants'
|
|
2
|
+
import { Checkbox, checkboxConfig } from '../Checkbox'
|
|
3
|
+
import checkboxState from '../state.json'
|
|
5
4
|
|
|
6
5
|
checkboxConfig.setState(checkboxState)
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
|
-
title: 'Atoms / Checkbox',
|
|
10
|
-
component: Checkbox,
|
|
11
8
|
argTypes: {
|
|
12
9
|
advancedProps: { control: 'boolean' },
|
|
13
|
-
className: {
|
|
14
|
-
if: { arg: 'advancedProps' },
|
|
15
|
-
},
|
|
16
10
|
checked: {
|
|
17
11
|
control: 'boolean',
|
|
18
12
|
},
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
className: {
|
|
14
|
+
if: { arg: 'advancedProps' },
|
|
21
15
|
},
|
|
22
16
|
descTextColor: {
|
|
23
|
-
options: textColorProps,
|
|
24
17
|
control: 'select',
|
|
18
|
+
options: textColorProps,
|
|
25
19
|
},
|
|
26
20
|
descTextSize: {
|
|
27
|
-
options: textSizeProps,
|
|
28
21
|
control: 'inline-radio',
|
|
22
|
+
options: textSizeProps,
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
control: 'boolean',
|
|
29
26
|
},
|
|
30
27
|
fill: {
|
|
31
|
-
options: fillProps,
|
|
32
28
|
control: 'select',
|
|
29
|
+
options: fillProps,
|
|
33
30
|
},
|
|
34
31
|
labelTextColor: {
|
|
35
|
-
options: textColorProps,
|
|
36
32
|
control: 'select',
|
|
33
|
+
options: textColorProps,
|
|
37
34
|
},
|
|
38
35
|
labelTextSize: {
|
|
39
|
-
options: textSizeProps,
|
|
40
36
|
control: 'inline-radio',
|
|
37
|
+
options: textSizeProps,
|
|
41
38
|
},
|
|
42
39
|
shape: {
|
|
43
|
-
options: [null, 'rounded'],
|
|
44
40
|
control: 'inline-radio',
|
|
45
|
-
},
|
|
46
|
-
stateShape: {
|
|
47
41
|
options: [null, 'rounded'],
|
|
48
|
-
control: 'inline-radio',
|
|
49
42
|
},
|
|
50
43
|
stateBorderWidth: {
|
|
44
|
+
control: 'inline-radio',
|
|
51
45
|
options: [1, 2, 3, 4, 5],
|
|
46
|
+
},
|
|
47
|
+
stateShape: {
|
|
52
48
|
control: 'inline-radio',
|
|
49
|
+
options: [null, 'rounded'],
|
|
53
50
|
},
|
|
54
51
|
},
|
|
52
|
+
component: Checkbox,
|
|
53
|
+
title: 'Atoms / Checkbox',
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
const Default = {
|
|
58
57
|
args: {
|
|
59
58
|
checked: false,
|
|
59
|
+
desc: 'Description',
|
|
60
|
+
descTextColor: 'surfaceTextTertiary',
|
|
61
|
+
descTextSize: 'xxs',
|
|
60
62
|
disabled: false,
|
|
61
63
|
label: 'Checkbox',
|
|
62
|
-
labelTextSize: 'm',
|
|
63
64
|
labelTextColor: 'surfaceTextPrimary',
|
|
64
|
-
|
|
65
|
-
descTextSize: 'xxs',
|
|
66
|
-
descTextColor: 'surfaceTextTertiary',
|
|
67
|
-
|
|
68
|
-
stateShape: 'rounded',
|
|
65
|
+
labelTextSize: 'm',
|
|
69
66
|
|
|
70
67
|
stateBorderColor: 'accentBorderSecondary',
|
|
68
|
+
|
|
71
69
|
stateBorderColorChecked: 'accentBorderSecondary',
|
|
72
70
|
stateBorderColorDisabled: 'accentBorderSecondary',
|
|
73
71
|
stateBorderColorDisabledChecked: 'accentBorderSecondary',
|
|
74
|
-
|
|
75
72
|
stateBorderWidth: 1,
|
|
76
73
|
|
|
74
|
+
stateCheckmarkFill: 'accentItemPrimary',
|
|
75
|
+
|
|
76
|
+
stateCheckmarkFillDisabled: 'accentItemDisabled',
|
|
77
77
|
stateFillChecked: 'accentPrimary',
|
|
78
78
|
stateFillDisabled: 'accentDisabled',
|
|
79
79
|
stateFillDisabledChecked: 'accentDisabled',
|
|
80
|
-
|
|
81
|
-
stateCheckmarkFillDisabled: 'accentItemDisabled',
|
|
80
|
+
stateShape: 'rounded',
|
|
82
81
|
},
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -86,31 +85,40 @@ export const CheckedActive = {
|
|
|
86
85
|
args: {
|
|
87
86
|
...Default.args,
|
|
88
87
|
checked: true,
|
|
89
|
-
disabled: false,
|
|
90
88
|
desc: 'Checked / Active',
|
|
89
|
+
disabled: false,
|
|
91
90
|
},
|
|
92
91
|
}
|
|
93
92
|
export const CheckedDisabled = {
|
|
94
93
|
args: {
|
|
95
94
|
...Default.args,
|
|
96
95
|
checked: true,
|
|
97
|
-
disabled: true,
|
|
98
96
|
desc: 'Checked / Disabled',
|
|
97
|
+
disabled: true,
|
|
99
98
|
},
|
|
100
99
|
}
|
|
101
100
|
export const NotCheckedActive = {
|
|
102
101
|
args: {
|
|
103
102
|
...Default.args,
|
|
104
103
|
checked: false,
|
|
105
|
-
disabled: false,
|
|
106
104
|
desc: 'Not Checked / Active',
|
|
105
|
+
disabled: false,
|
|
107
106
|
},
|
|
108
107
|
}
|
|
109
108
|
export const NotCheckedDisabled = {
|
|
110
109
|
args: {
|
|
111
110
|
...Default.args,
|
|
112
111
|
checked: false,
|
|
113
|
-
disabled: true,
|
|
114
112
|
desc: 'Not Checked / Disabled',
|
|
113
|
+
disabled: true,
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
export const Dev = {
|
|
117
|
+
args: {
|
|
118
|
+
...Default.args,
|
|
119
|
+
appearance: 'dev',
|
|
120
|
+
checked: true,
|
|
121
|
+
desc: 'Checked / Active',
|
|
122
|
+
disabled: false,
|
|
115
123
|
},
|
|
116
124
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as ChipsStories from './Chips.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={ChipsStories} />
|
|
6
|
+
|
|
7
|
+
# Chips
|
|
8
|
+
|
|
9
|
+
## Accent
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={ChipsStories.Accent} />
|
|
12
|
+
|
|
13
|
+
## Primary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={ChipsStories.Primary} />
|
|
16
|
+
|
|
17
|
+
## Secondary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={ChipsStories.Secondary} />
|
|
20
|
+
|
|
21
|
+
## SurfacePrimary
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={ChipsStories.SurfacePrimary} />
|
|
24
|
+
|
|
25
|
+
## SurfaceSecondary
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={ChipsStories.SurfaceSecondary} />
|
|
28
|
+
|
|
29
|
+
## SurfaceTertiary
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={ChipsStories.SurfaceTertiary} />
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import chipsAppearance from '
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
borderColorProps,
|
|
6
|
-
borderTypeProps,
|
|
7
|
-
textSizeProps,
|
|
8
|
-
fillProps,
|
|
9
|
-
sizeProps,
|
|
10
|
-
shapeProps,
|
|
11
|
-
} from '@itcase/ui/constants'
|
|
1
|
+
import { Icon } from '../../Icon'
|
|
2
|
+
import chipsAppearance from '../appearance.json'
|
|
3
|
+
import { Chips, chipsConfig } from '../Chips'
|
|
4
|
+
import { argTypes } from './args'
|
|
12
5
|
|
|
13
6
|
chipsConfig.setAppearance(chipsAppearance)
|
|
14
7
|
|
|
15
|
-
import { Icon } from '@itcase/ui/components/Icon'
|
|
16
|
-
|
|
17
|
-
import { icon16 } from 'src/icons'
|
|
18
|
-
|
|
19
8
|
export default {
|
|
20
|
-
|
|
9
|
+
argTypes: {
|
|
10
|
+
...argTypes,
|
|
11
|
+
},
|
|
21
12
|
component: Chips,
|
|
22
13
|
parameters: {
|
|
23
14
|
controls: {
|
|
@@ -44,48 +35,20 @@ export default {
|
|
|
44
35
|
],
|
|
45
36
|
},
|
|
46
37
|
},
|
|
47
|
-
|
|
48
|
-
advancedProps: { control: 'boolean' },
|
|
49
|
-
className: {
|
|
50
|
-
if: { arg: 'advancedProps' },
|
|
51
|
-
},
|
|
52
|
-
onClick: {
|
|
53
|
-
if: { arg: 'advancedProps' },
|
|
54
|
-
},
|
|
55
|
-
type: {
|
|
56
|
-
control: 'text',
|
|
57
|
-
if: { arg: 'advancedProps' },
|
|
58
|
-
},
|
|
59
|
-
border: {
|
|
60
|
-
options: borderColorProps,
|
|
61
|
-
control: 'select',
|
|
62
|
-
},
|
|
63
|
-
borderType: {
|
|
64
|
-
options: borderTypeProps,
|
|
65
|
-
control: 'inline-radio',
|
|
66
|
-
},
|
|
67
|
-
fill: {
|
|
68
|
-
options: fillProps,
|
|
69
|
-
control: 'select',
|
|
70
|
-
},
|
|
71
|
-
labelTextSize: {
|
|
72
|
-
options: textSizeProps,
|
|
73
|
-
control: 'inline-radio',
|
|
74
|
-
},
|
|
75
|
-
shape: {
|
|
76
|
-
options: shapeProps,
|
|
77
|
-
control: 'inline-radio',
|
|
78
|
-
},
|
|
79
|
-
size: {
|
|
80
|
-
options: sizeProps,
|
|
81
|
-
control: 'inline-radio',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
38
|
+
title: 'Atoms / Chips ',
|
|
84
39
|
}
|
|
85
40
|
|
|
86
41
|
export const Default = {
|
|
42
|
+
args: {
|
|
43
|
+
appearance: 'accent',
|
|
44
|
+
label: 'Chips',
|
|
45
|
+
labelTextSize: 'xxl',
|
|
46
|
+
shape: 'rounded',
|
|
47
|
+
size: 'xxl',
|
|
48
|
+
},
|
|
87
49
|
argTypes: {
|
|
88
50
|
appearance: {
|
|
51
|
+
control: 'inline-radio',
|
|
89
52
|
options: [
|
|
90
53
|
null,
|
|
91
54
|
'accent',
|
|
@@ -95,57 +58,49 @@ export const Default = {
|
|
|
95
58
|
'surfaceSecondary',
|
|
96
59
|
'surfaceTertiary',
|
|
97
60
|
],
|
|
98
|
-
control: 'inline-radio',
|
|
99
61
|
},
|
|
100
62
|
},
|
|
101
|
-
args: {
|
|
102
|
-
appearance: 'accent',
|
|
103
|
-
shape: 'rounded',
|
|
104
|
-
label: 'Chips',
|
|
105
|
-
size: 'xxl',
|
|
106
|
-
labelTextSize: 'xxl',
|
|
107
|
-
},
|
|
108
63
|
}
|
|
109
64
|
|
|
110
65
|
export const Accent = {
|
|
111
66
|
args: {
|
|
112
67
|
...Default.args,
|
|
68
|
+
children: <Icon iconFill="accentItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
113
69
|
appearance: 'accent',
|
|
114
|
-
children: <Icon iconFill="accentItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
115
70
|
},
|
|
116
71
|
}
|
|
117
72
|
export const Primary = {
|
|
118
73
|
args: {
|
|
119
74
|
...Default.args,
|
|
75
|
+
children: <Icon iconFill="primaryItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
120
76
|
appearance: 'primary',
|
|
121
|
-
children: <Icon iconFill="primaryItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
122
77
|
},
|
|
123
78
|
}
|
|
124
79
|
export const Secondary = {
|
|
125
80
|
args: {
|
|
126
81
|
...Default.args,
|
|
82
|
+
children: <Icon iconFill="secondaryItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
127
83
|
appearance: 'secondary',
|
|
128
|
-
children: <Icon iconFill="secondaryItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
129
84
|
},
|
|
130
85
|
}
|
|
131
86
|
export const SurfacePrimary = {
|
|
132
87
|
args: {
|
|
133
88
|
...Default.args,
|
|
89
|
+
children: <Icon iconFill="surfaceItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
134
90
|
appearance: 'surfacePrimary',
|
|
135
|
-
children: <Icon iconFill="surfaceItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
136
91
|
},
|
|
137
92
|
}
|
|
138
93
|
export const SurfaceSecondary = {
|
|
139
94
|
args: {
|
|
140
95
|
...Default.args,
|
|
96
|
+
children: <Icon iconFill="surfaceItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
141
97
|
appearance: 'surfaceSecondary',
|
|
142
|
-
children: <Icon iconFill="surfaceItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
143
98
|
},
|
|
144
99
|
}
|
|
145
100
|
export const SurfaceTertiary = {
|
|
146
101
|
args: {
|
|
147
102
|
...Default.args,
|
|
103
|
+
children: <Icon iconFill="surfaceItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
148
104
|
appearance: 'surfaceTertiary',
|
|
149
|
-
children: <Icon iconFill="surfaceItemPrimary" size="16" SvgImage={icon16.Close} />,
|
|
150
105
|
},
|
|
151
106
|
}
|
|
@@ -1,117 +1,115 @@
|
|
|
1
|
-
import { Choice } from '@itcase/ui/components/Choice'
|
|
2
1
|
import {
|
|
3
2
|
borderColorProps,
|
|
4
3
|
borderWidthProps,
|
|
5
|
-
textColorProps,
|
|
6
|
-
textSizeProps,
|
|
7
|
-
textWeightProps,
|
|
8
|
-
fillProps,
|
|
9
4
|
fillHoverProps,
|
|
10
|
-
|
|
5
|
+
fillProps,
|
|
11
6
|
shapeProps,
|
|
12
7
|
textColorActiveProps,
|
|
13
|
-
|
|
8
|
+
textColorProps,
|
|
9
|
+
textSizeProps,
|
|
10
|
+
} from '../../../constants'
|
|
11
|
+
import { Choice } from '../Choice'
|
|
14
12
|
|
|
15
13
|
export default {
|
|
16
|
-
title: 'Atoms / Choice',
|
|
17
|
-
component: Choice,
|
|
18
|
-
parameters: {
|
|
19
|
-
controls: {
|
|
20
|
-
exclude: [
|
|
21
|
-
'fill',
|
|
22
|
-
'icon',
|
|
23
|
-
'iconSize',
|
|
24
|
-
'iconItemFillHover',
|
|
25
|
-
'firstName',
|
|
26
|
-
'secondName',
|
|
27
|
-
'textColor',
|
|
28
|
-
'textSize',
|
|
29
|
-
'textWeight',
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
14
|
argTypes: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
name: {
|
|
39
|
-
if: { arg: 'advancedProps' },
|
|
40
|
-
},
|
|
41
|
-
setActiveSegment: {
|
|
42
|
-
if: { arg: 'advancedProps' },
|
|
43
|
-
},
|
|
44
|
-
type: {
|
|
45
|
-
if: { arg: 'advancedProps' },
|
|
15
|
+
borderWidth: {
|
|
16
|
+
control: 'inline-radio',
|
|
17
|
+
options: borderWidthProps,
|
|
46
18
|
},
|
|
47
19
|
borderColor: {
|
|
48
|
-
options: borderColorProps,
|
|
49
20
|
control: 'select',
|
|
21
|
+
options: borderColorProps,
|
|
50
22
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
advancedProps: { control: 'boolean' },
|
|
24
|
+
className: {
|
|
25
|
+
if: { arg: 'advancedProps' },
|
|
54
26
|
},
|
|
55
27
|
fill: {
|
|
56
|
-
options: fillProps,
|
|
57
28
|
control: 'select',
|
|
29
|
+
options: fillProps,
|
|
58
30
|
},
|
|
59
31
|
fillActive: {
|
|
60
|
-
options: fillProps,
|
|
61
32
|
control: 'select',
|
|
33
|
+
options: fillProps,
|
|
62
34
|
},
|
|
63
35
|
fillActiveHover: {
|
|
64
|
-
options: fillHoverProps,
|
|
65
36
|
control: 'select',
|
|
37
|
+
options: fillHoverProps,
|
|
66
38
|
},
|
|
67
39
|
fillHover: {
|
|
68
|
-
options: fillHoverProps,
|
|
69
40
|
control: 'select',
|
|
41
|
+
options: fillHoverProps,
|
|
70
42
|
},
|
|
71
43
|
labelTextActiveColor: {
|
|
72
|
-
options: textColorActiveProps,
|
|
73
44
|
control: 'select',
|
|
45
|
+
options: textColorActiveProps,
|
|
74
46
|
},
|
|
75
47
|
labelTextColor: {
|
|
76
|
-
options: textColorProps,
|
|
77
48
|
control: 'select',
|
|
49
|
+
options: textColorProps,
|
|
78
50
|
},
|
|
79
51
|
labelTextSize: {
|
|
80
|
-
options: textSizeProps,
|
|
81
52
|
control: 'inline-radio',
|
|
53
|
+
options: textSizeProps,
|
|
54
|
+
},
|
|
55
|
+
name: {
|
|
56
|
+
if: { arg: 'advancedProps' },
|
|
57
|
+
},
|
|
58
|
+
setActiveSegment: {
|
|
59
|
+
if: { arg: 'advancedProps' },
|
|
82
60
|
},
|
|
83
61
|
shape: {
|
|
84
|
-
options: shapeProps,
|
|
85
62
|
control: 'inline-radio',
|
|
63
|
+
options: shapeProps,
|
|
86
64
|
},
|
|
87
65
|
size: {
|
|
88
|
-
options: ['tiny', 'compact', 'normal'],
|
|
89
66
|
control: 'inline-radio',
|
|
67
|
+
options: ['tiny', 'compact', 'normal'],
|
|
68
|
+
},
|
|
69
|
+
type: {
|
|
70
|
+
if: { arg: 'advancedProps' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
component: Choice,
|
|
74
|
+
parameters: {
|
|
75
|
+
controls: {
|
|
76
|
+
exclude: [
|
|
77
|
+
'fill',
|
|
78
|
+
'icon',
|
|
79
|
+
'iconSize',
|
|
80
|
+
'iconItemFillHover',
|
|
81
|
+
'firstName',
|
|
82
|
+
'secondName',
|
|
83
|
+
'textColor',
|
|
84
|
+
'textSize',
|
|
85
|
+
'textWeight',
|
|
86
|
+
],
|
|
90
87
|
},
|
|
91
88
|
},
|
|
89
|
+
title: 'Atoms / Choice',
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
export const Default = {
|
|
95
93
|
args: {
|
|
94
|
+
borderColor: 'surfaceBorderTertiary',
|
|
95
|
+
active: {
|
|
96
|
+
value: 1,
|
|
97
|
+
},
|
|
96
98
|
fill: 'surfacePrimary',
|
|
97
|
-
fillHover: 'surfacePrimaryHover',
|
|
98
99
|
fillActive: 'surfacePrimaryActive',
|
|
99
100
|
fillActiveHover: 'surfacePrimaryActiveHover',
|
|
100
|
-
|
|
101
|
-
shape: 'rounded',
|
|
102
|
-
borderColor: 'surfaceBorderTertiary',
|
|
101
|
+
fillHover: 'surfacePrimaryHover',
|
|
103
102
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
104
103
|
labelTextColor: 'surfaceTextPrimary',
|
|
105
104
|
labelTextSize: 'm',
|
|
106
105
|
options: [
|
|
107
|
-
{
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
{
|
|
111
|
-
{
|
|
106
|
+
{ label: 'Label 1', value: 1 },
|
|
107
|
+
{ label: 'Label 2', value: 2 },
|
|
108
|
+
{ label: 'Label 3', value: 3 },
|
|
109
|
+
{ label: 'Label 4', value: 4 },
|
|
110
|
+
{ label: 'Label 5', value: 5 },
|
|
112
111
|
],
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
112
|
+
shape: 'rounded',
|
|
113
|
+
size: 'normal',
|
|
116
114
|
},
|
|
117
115
|
}
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
import { Code } from '@itcase/ui/components/Code'
|
|
2
1
|
import {
|
|
3
|
-
textColorHoverProps,
|
|
4
|
-
textWrapProps,
|
|
5
|
-
itemColorProps,
|
|
6
|
-
borderColorProps,
|
|
7
2
|
borderColorHoverProps,
|
|
3
|
+
borderColorProps,
|
|
8
4
|
borderWidthProps,
|
|
9
|
-
textColorProps,
|
|
10
5
|
fillProps,
|
|
6
|
+
textColorProps,
|
|
11
7
|
textSizeProps,
|
|
12
|
-
} from '
|
|
8
|
+
} from '../../../constants'
|
|
9
|
+
import { Code } from '../Code'
|
|
13
10
|
|
|
14
11
|
export default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
parameters: {
|
|
18
|
-
controls: {
|
|
19
|
-
exclude: [
|
|
20
|
-
'inputBorderColorHover',
|
|
21
|
-
'inputBorderFocusColor',
|
|
22
|
-
'inputCaretColor',
|
|
23
|
-
'inputPlaceholder',
|
|
24
|
-
'inputType',
|
|
25
|
-
'value',
|
|
26
|
-
],
|
|
27
|
-
},
|
|
12
|
+
args: {
|
|
13
|
+
inputCount: 3,
|
|
28
14
|
},
|
|
29
15
|
argTypes: {
|
|
16
|
+
gap: {
|
|
17
|
+
control: { max: 100, min: 1, step: 1, type: 'number' },
|
|
18
|
+
},
|
|
30
19
|
advancedProps: { control: 'boolean' },
|
|
31
20
|
after: {
|
|
32
21
|
if: { arg: 'advancedProps' },
|
|
@@ -37,63 +26,71 @@ export default {
|
|
|
37
26
|
className: {
|
|
38
27
|
if: { arg: 'advancedProps' },
|
|
39
28
|
},
|
|
40
|
-
gap: {
|
|
41
|
-
control: { type: 'number', min: 1, max: 100, step: 1 },
|
|
42
|
-
},
|
|
43
|
-
inputSize: {
|
|
44
|
-
options: ['normal', 'compact'],
|
|
45
|
-
control: 'inline-radio',
|
|
46
|
-
},
|
|
47
29
|
inputBorderColor: {
|
|
48
|
-
options: borderColorProps,
|
|
49
30
|
control: 'select',
|
|
31
|
+
options: borderColorProps,
|
|
50
32
|
},
|
|
51
33
|
inputBorderColorHover: {
|
|
52
|
-
options: borderColorHoverProps,
|
|
53
34
|
control: 'inline-radio',
|
|
35
|
+
options: borderColorHoverProps,
|
|
54
36
|
},
|
|
55
37
|
inputBorderFocusColor: {
|
|
56
|
-
options: borderColorProps,
|
|
57
38
|
control: 'select',
|
|
39
|
+
options: borderColorProps,
|
|
58
40
|
},
|
|
59
41
|
inputBorderWidth: {
|
|
60
|
-
options: borderWidthProps,
|
|
61
42
|
control: 'inline-radio',
|
|
43
|
+
options: borderWidthProps,
|
|
62
44
|
},
|
|
63
45
|
inputCaretColor: {
|
|
64
|
-
options: textColorProps,
|
|
65
46
|
control: 'select',
|
|
47
|
+
options: textColorProps,
|
|
66
48
|
},
|
|
67
49
|
inputCount: {
|
|
68
|
-
control: {
|
|
50
|
+
control: { max: 12, min: 4, step: 1, type: 'number' },
|
|
69
51
|
},
|
|
70
52
|
inputFill: {
|
|
71
|
-
options: fillProps,
|
|
72
53
|
control: 'select',
|
|
54
|
+
options: fillProps,
|
|
73
55
|
},
|
|
74
56
|
inputFillHover: {
|
|
75
|
-
options: fillProps,
|
|
76
57
|
control: 'select',
|
|
58
|
+
options: fillProps,
|
|
77
59
|
},
|
|
78
60
|
inputPlaceholder: {
|
|
79
|
-
control: {
|
|
61
|
+
control: { max: 9, min: 0, step: 1, type: 'number' },
|
|
80
62
|
},
|
|
81
63
|
inputShape: {
|
|
64
|
+
control: 'inline-radio',
|
|
82
65
|
options: ['rounded', 'underline'],
|
|
66
|
+
},
|
|
67
|
+
inputSize: {
|
|
83
68
|
control: 'inline-radio',
|
|
69
|
+
options: ['normal', 'compact'],
|
|
84
70
|
},
|
|
85
71
|
inputTextColor: {
|
|
86
|
-
options: textColorProps,
|
|
87
72
|
control: 'select',
|
|
73
|
+
options: textColorProps,
|
|
88
74
|
},
|
|
89
75
|
inputTextSize: {
|
|
90
|
-
options: textSizeProps,
|
|
91
76
|
control: 'inline-radio',
|
|
77
|
+
options: textSizeProps,
|
|
92
78
|
},
|
|
93
79
|
},
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
component: Code,
|
|
81
|
+
parameters: {
|
|
82
|
+
controls: {
|
|
83
|
+
exclude: [
|
|
84
|
+
'inputBorderColorHover',
|
|
85
|
+
'inputBorderFocusColor',
|
|
86
|
+
'inputCaretColor',
|
|
87
|
+
'inputPlaceholder',
|
|
88
|
+
'inputType',
|
|
89
|
+
'value',
|
|
90
|
+
],
|
|
91
|
+
},
|
|
96
92
|
},
|
|
93
|
+
title: 'Atoms / Code',
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
export const Default = {}
|