@qoretechnologies/reqore 0.30.4 → 0.30.6
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/CODE_OF_CONDUCT.md +105 -0
- package/CONTRIBUTING.MD +78 -0
- package/LICENSE +1 -1
- package/README.md +44 -2
- package/SECURITY.md +5 -0
- package/__tests__/collection.test.tsx +1 -1
- package/__tests__/{control_group.test.tsx → control_group.text.tsx} +2 -4
- package/__tests__/modal.test.tsx +2 -74
- package/__tests__/panel.test.tsx +24 -96
- package/__tests__/popover.test.tsx +2 -24
- package/__tests__/tabs.test.tsx +0 -75
- package/dist/components/Button/index.d.ts +1 -4
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +7 -10
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Collection/index.d.ts +2 -7
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +53 -57
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +5 -5
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js +4 -15
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Columns/column.d.ts.map +1 -1
- package/dist/components/Columns/column.js +1 -1
- package/dist/components/Columns/column.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +4 -20
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +55 -241
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Drawer/index.d.ts +3 -3
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +16 -27
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +0 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +3 -3
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Effect/index.d.ts +9 -9
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +1 -1
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +6 -5
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +7 -14
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +6 -9
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +10 -12
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Message/index.d.ts +0 -2
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +2 -2
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +2 -2
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +10 -10
- package/dist/components/MultiSelect/index.js.map +1 -1
- package/dist/components/Notifications/index.d.ts +1 -1
- package/dist/components/Notifications/index.d.ts.map +1 -1
- package/dist/components/Notifications/notification.d.ts +1 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Panel/index.d.ts +6 -13
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +44 -78
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +2 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Spacer/index.d.ts +0 -2
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spacer/index.js +7 -29
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Table/helpers.d.ts +2 -3
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +3 -6
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +3 -4
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/content.d.ts +1 -3
- package/dist/components/Tabs/content.d.ts.map +1 -1
- package/dist/components/Tabs/content.js +3 -8
- package/dist/components/Tabs/content.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +1 -4
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +4 -12
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts +0 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +7 -7
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.d.ts +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +3 -4
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts +2 -2
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tag/group.js +8 -7
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -6
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +12 -20
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Tree/index.js +1 -1
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/constants/animations.js +1 -1
- package/dist/constants/sizes.d.ts +2 -2
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +10 -10
- package/dist/constants/sizes.js.map +1 -1
- package/dist/constants/theme.d.ts +1 -1
- package/dist/constants/theme.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.js +8 -10
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +2 -4
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +0 -7
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +0 -2
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/utils.d.ts +0 -2
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +2 -4
- package/dist/helpers/utils.js.map +1 -1
- package/dist/hooks/useLatestZIndex.js +2 -2
- package/dist/hooks/useLatestZIndex.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +0 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +6 -8
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/styles.d.ts +0 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +5 -6
- package/dist/styles.js.map +1 -1
- package/dist/types/global.d.ts +1 -27
- package/dist/types/global.d.ts.map +1 -1
- package/dist/types/icons.d.ts +1 -1
- package/dist/types/icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/logo-dark.png +0 -0
- package/public/logo.png +0 -0
- package/public/q-symbol.png +0 -0
- package/public/qoreLogo-dark.png +0 -0
- package/public/qoreLogo.png +0 -0
- package/src/components/Button/index.tsx +5 -17
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/Collection/index.tsx +60 -93
- package/src/components/Collection/item.tsx +9 -29
- package/src/components/Columns/column.tsx +0 -1
- package/src/components/ControlGroup/index.tsx +103 -426
- package/src/components/Drawer/index.tsx +27 -28
- package/src/components/Dropdown/index.tsx +1 -3
- package/src/components/Effect/index.tsx +0 -1
- package/src/components/Icon/index.tsx +62 -81
- package/src/components/Input/index.tsx +4 -8
- package/src/components/InternalPopover/index.tsx +126 -131
- package/src/components/Menu/index.tsx +1 -7
- package/src/components/Message/index.tsx +1 -9
- package/src/components/MultiSelect/index.tsx +188 -180
- package/src/components/Panel/index.tsx +100 -227
- package/src/components/Popover/index.tsx +3 -1
- package/src/components/Spacer/index.tsx +14 -63
- package/src/components/Table/helpers.ts +6 -12
- package/src/components/Table/index.tsx +0 -1
- package/src/components/Tabs/content.tsx +3 -11
- package/src/components/Tabs/index.tsx +3 -14
- package/src/components/Tabs/item.tsx +5 -28
- package/src/components/Tabs/list.tsx +0 -4
- package/src/components/Tag/group.tsx +12 -6
- package/src/components/Tag/index.tsx +35 -67
- package/src/components/Tree/index.tsx +1 -1
- package/src/constants/animations.ts +1 -1
- package/src/constants/sizes.ts +10 -10
- package/src/containers/PopoverProvider.tsx +8 -11
- package/src/containers/ReqoreProvider.tsx +35 -40
- package/src/containers/UIProvider.tsx +0 -7
- package/src/context/ReqoreContext.tsx +0 -2
- package/src/helpers/utils.ts +0 -3
- package/src/hooks/useLatestZIndex.ts +2 -2
- package/src/hooks/usePopover.tsx +6 -9
- package/src/mock/collectionData.tsx +2 -33
- package/src/stories/Button/Button.stories.tsx +6 -14
- package/src/stories/Checkbox/Checkbox.stories.tsx +3 -6
- package/src/stories/Collection/Collection.stories.tsx +2 -18
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +34 -220
- package/src/stories/Drawer/Drawer.stories.tsx +3 -70
- package/src/stories/Dropdown/Dropdown.stories.tsx +3 -13
- package/src/stories/Icon/Icon.stories.tsx +0 -1
- package/src/stories/Input/Input.stories.tsx +3 -5
- package/src/stories/Menu/Menu.stories.tsx +0 -2
- package/src/stories/Message/Message.stories.tsx +0 -7
- package/src/stories/Panel/Panel.stories.tsx +13 -147
- package/src/stories/Popover/Popover.stories.tsx +82 -88
- package/src/stories/Tabs/Tabs.stories.tsx +15 -32
- package/src/stories/Tag/Tag.stories.tsx +3 -23
- package/src/stories/TextArea/TextArea.stories.tsx +3 -3
- package/src/styles.ts +0 -6
- package/src/types/global.ts +0 -28
- package/tests.json +1 -1
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { IReqoreControlGroupProps } from '../../components/ControlGroup';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ReqoreControlGroup,
|
|
7
|
-
ReqoreDropdown,
|
|
8
|
-
ReqoreInput,
|
|
9
|
-
ReqoreTag,
|
|
10
|
-
ReqoreVerticalSpacer,
|
|
11
|
-
} from '../../index';
|
|
12
|
-
import { argManager, GapSizeArg, MinimalArg, SizeArg } from '../utils/args';
|
|
3
|
+
import ReqoreInput from '../../components/Input';
|
|
4
|
+
import { ReqoreButton, ReqoreCheckbox, ReqoreControlGroup, ReqoreTag } from '../../index';
|
|
5
|
+
import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
|
|
13
6
|
|
|
14
7
|
const { createArg } = argManager<IReqoreControlGroupProps>();
|
|
15
8
|
|
|
@@ -37,182 +30,42 @@ export default {
|
|
|
37
30
|
description: 'Whether the control group should be fluid',
|
|
38
31
|
control: 'boolean',
|
|
39
32
|
}),
|
|
40
|
-
...createArg('wrap', {
|
|
41
|
-
name: 'wrap',
|
|
42
|
-
defaultValue: true,
|
|
43
|
-
description: 'Whether the control group should wrap',
|
|
44
|
-
control: 'boolean',
|
|
45
|
-
}),
|
|
46
33
|
},
|
|
47
34
|
} as Meta<IReqoreControlGroupProps>;
|
|
48
35
|
|
|
49
36
|
const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProps) => {
|
|
50
|
-
if (args.responsive) {
|
|
51
|
-
return (
|
|
52
|
-
<div style={{ width: 600 }}>
|
|
53
|
-
<ReqoreControlGroup {...args} wrap={false}>
|
|
54
|
-
<ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
|
|
55
|
-
<ReqoreControlGroup stack>
|
|
56
|
-
<ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
|
|
57
|
-
</ReqoreControlGroup>
|
|
58
|
-
<ReqoreControlGroup stack>
|
|
59
|
-
<ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
|
|
60
|
-
<ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
|
|
61
|
-
</ReqoreControlGroup>
|
|
62
|
-
<ReqoreControlGroup stack>
|
|
63
|
-
<ReqoreControlGroup>
|
|
64
|
-
<ReqoreButton customTheme={{ main: '#00e3e8' }}>Level 2 deep</ReqoreButton>
|
|
65
|
-
<ReqoreControlGroup fixed>
|
|
66
|
-
<ReqoreButton disabled fixed id='test'>
|
|
67
|
-
Level 3 deep and fixed
|
|
68
|
-
</ReqoreButton>
|
|
69
|
-
</ReqoreControlGroup>
|
|
70
|
-
</ReqoreControlGroup>
|
|
71
|
-
<ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
|
|
72
|
-
<ReqoreCheckbox checked margin='both' label='Level 1 deep' />
|
|
73
|
-
</ReqoreControlGroup>
|
|
74
|
-
<ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
|
|
75
|
-
<ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
|
|
76
|
-
</ReqoreControlGroup>
|
|
77
|
-
</div>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
37
|
return (
|
|
82
|
-
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<ReqoreControlGroup fixed>
|
|
114
|
-
<ReqoreButton disabled fixed id='test'>
|
|
115
|
-
Level 3 deep and fixed
|
|
116
|
-
</ReqoreButton>
|
|
117
|
-
</ReqoreControlGroup>
|
|
118
|
-
</ReqoreControlGroup>
|
|
119
|
-
<ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
|
|
120
|
-
<ReqoreCheckbox checked margin='both' label='Level 1 deep' />
|
|
121
|
-
</ReqoreControlGroup>
|
|
122
|
-
|
|
123
|
-
<ReqoreButton minimal>Minimal</ReqoreButton>
|
|
124
|
-
<ReqoreTag label='smol tag' size='small' />
|
|
125
|
-
</ReqoreControlGroup>
|
|
126
|
-
<ReqoreVerticalSpacer height={15} />
|
|
127
|
-
<ReqoreControlGroup {...args} className='root-group' id='root-group'>
|
|
128
|
-
<ReqoreControlGroup intent='info' className='group-1' id='group-1-wrapper'>
|
|
129
|
-
<ReqoreControlGroup intent='info' className='group-1' id='group-1'>
|
|
130
|
-
<>
|
|
131
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-1-button'>
|
|
132
|
-
Group 1
|
|
133
|
-
</ReqoreButton>
|
|
134
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 1' id='group-1-tag' />
|
|
135
|
-
</>
|
|
136
|
-
</ReqoreControlGroup>
|
|
137
|
-
<ReqoreControlGroup intent='pending' className='group-1-1' id='group-1-1'>
|
|
138
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-1-1-button'>
|
|
139
|
-
Group 1-1
|
|
140
|
-
</ReqoreButton>
|
|
141
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 1-1' id='group-1-1-tag' />
|
|
142
|
-
<ReqoreDropdown
|
|
143
|
-
items={[
|
|
144
|
-
{
|
|
145
|
-
selected: true,
|
|
146
|
-
label: 'Hello',
|
|
147
|
-
value: 'hello',
|
|
148
|
-
icon: 'SunCloudyLine',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
label: 'How are ya',
|
|
152
|
-
value: 'howareya',
|
|
153
|
-
icon: 'BatteryChargeFill',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
disabled: true,
|
|
157
|
-
label: 'i aM diSAblEd',
|
|
158
|
-
value: 'disabled',
|
|
159
|
-
icon: 'StopCircleLine',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
label: 'With right button',
|
|
163
|
-
value: 'kek',
|
|
164
|
-
icon: 'CheckDoubleLine',
|
|
165
|
-
},
|
|
166
|
-
]}
|
|
167
|
-
>
|
|
168
|
-
Dropdown
|
|
169
|
-
</ReqoreDropdown>
|
|
170
|
-
</ReqoreControlGroup>
|
|
171
|
-
</ReqoreControlGroup>
|
|
172
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-root-button'>
|
|
173
|
-
Root group
|
|
174
|
-
</ReqoreButton>
|
|
175
|
-
<ReqoreControlGroup intent='success' className='group-2' id='group-2'>
|
|
176
|
-
<>
|
|
177
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-2-button' fixed>
|
|
178
|
-
Group 2
|
|
179
|
-
</ReqoreButton>
|
|
180
|
-
<ReqoreControlGroup intent='danger' className='group-3' id='group-3'>
|
|
181
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-3-button-1'>
|
|
182
|
-
Group 3
|
|
183
|
-
</ReqoreButton>
|
|
184
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-3-button-2'>
|
|
185
|
-
Group 3
|
|
186
|
-
</ReqoreButton>
|
|
187
|
-
</ReqoreControlGroup>
|
|
188
|
-
</>
|
|
189
|
-
<ReqoreCheckbox label='Group 2' margin='both' id='group-2-checkbox' />
|
|
190
|
-
</ReqoreControlGroup>
|
|
191
|
-
<ReqoreButton icon='PictureInPictureLine' id='group-root-button-2'>
|
|
192
|
-
Root group
|
|
193
|
-
</ReqoreButton>
|
|
194
|
-
<ReqoreControlGroup intent='warning' className='group-4' id='group-4'>
|
|
195
|
-
<ReqoreControlGroup id='group-4-1' fluid={false}>
|
|
196
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-1-tag' />
|
|
197
|
-
<ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-1-input' />
|
|
198
|
-
</ReqoreControlGroup>
|
|
199
|
-
<ReqoreControlGroup id='group-4-3'>
|
|
200
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-3-tag' />
|
|
201
|
-
<>
|
|
202
|
-
<ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-3-input' />
|
|
203
|
-
<ReqoreControlGroup id='group-5' intent='muted' fluid={false}>
|
|
204
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-1-tag' />
|
|
205
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-2-tag' />
|
|
206
|
-
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-3-tag' />
|
|
207
|
-
<ReqoreControlGroup id='group 6' intent='success'>
|
|
208
|
-
<ReqoreButton fixed>Group 6</ReqoreButton>
|
|
209
|
-
</ReqoreControlGroup>
|
|
210
|
-
</ReqoreControlGroup>
|
|
211
|
-
</>
|
|
212
|
-
</ReqoreControlGroup>
|
|
213
|
-
</ReqoreControlGroup>
|
|
214
|
-
</ReqoreControlGroup>
|
|
215
|
-
</>
|
|
38
|
+
<ReqoreControlGroup {...args}>
|
|
39
|
+
<ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
|
|
40
|
+
<ReqoreButton
|
|
41
|
+
icon='PictureInPictureLine'
|
|
42
|
+
flat={false}
|
|
43
|
+
effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
|
|
44
|
+
>
|
|
45
|
+
Non flat Button
|
|
46
|
+
</ReqoreButton>
|
|
47
|
+
<ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
|
|
48
|
+
<ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
|
|
49
|
+
<ReqoreCheckbox
|
|
50
|
+
asSwitch
|
|
51
|
+
label='Switchy switch'
|
|
52
|
+
margin='both'
|
|
53
|
+
intent='warning'
|
|
54
|
+
checkedIcon='CheckFill'
|
|
55
|
+
checked
|
|
56
|
+
uncheckedIcon='CheckboxBlankLine'
|
|
57
|
+
/>
|
|
58
|
+
<ReqoreInput icon='4KFill' value='Hello' />
|
|
59
|
+
<ReqoreButton disabled fixed>
|
|
60
|
+
Disabled & Fixed
|
|
61
|
+
</ReqoreButton>
|
|
62
|
+
<ReqoreCheckbox checked margin='both'>
|
|
63
|
+
Checkbox
|
|
64
|
+
</ReqoreCheckbox>
|
|
65
|
+
|
|
66
|
+
<ReqoreButton minimal>Minimal</ReqoreButton>
|
|
67
|
+
<ReqoreTag label='smol tag' size='small' />
|
|
68
|
+
</ReqoreControlGroup>
|
|
216
69
|
);
|
|
217
70
|
};
|
|
218
71
|
|
|
@@ -222,11 +75,6 @@ Minimal.args = {
|
|
|
222
75
|
minimal: true,
|
|
223
76
|
};
|
|
224
77
|
|
|
225
|
-
export const Fluid = Template.bind({});
|
|
226
|
-
Fluid.args = {
|
|
227
|
-
fluid: true,
|
|
228
|
-
};
|
|
229
|
-
|
|
230
78
|
export const NotFlat = Template.bind({});
|
|
231
79
|
NotFlat.args = {
|
|
232
80
|
flat: false,
|
|
@@ -237,19 +85,6 @@ Vertical.args = {
|
|
|
237
85
|
vertical: true,
|
|
238
86
|
};
|
|
239
87
|
|
|
240
|
-
export const VerticalFluid = Template.bind({});
|
|
241
|
-
VerticalFluid.args = {
|
|
242
|
-
vertical: true,
|
|
243
|
-
fluid: true,
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
export const VerticalStackedFluid = Template.bind({});
|
|
247
|
-
VerticalStackedFluid.args = {
|
|
248
|
-
vertical: true,
|
|
249
|
-
stack: true,
|
|
250
|
-
fluid: true,
|
|
251
|
-
};
|
|
252
|
-
|
|
253
88
|
export const Stacked = Template.bind({});
|
|
254
89
|
Stacked.args = {
|
|
255
90
|
stack: true,
|
|
@@ -259,24 +94,3 @@ export const BigGapSize = Template.bind({});
|
|
|
259
94
|
BigGapSize.args = {
|
|
260
95
|
gapSize: 'big',
|
|
261
96
|
};
|
|
262
|
-
|
|
263
|
-
export const NoWrap = Template.bind({});
|
|
264
|
-
NoWrap.args = {
|
|
265
|
-
wrap: false,
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
export const HorizontalAlign = Template.bind({});
|
|
269
|
-
HorizontalAlign.args = {
|
|
270
|
-
vertical: true,
|
|
271
|
-
horizontalAlign: 'center',
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export const VerticalAlign = Template.bind({});
|
|
275
|
-
VerticalAlign.args = {
|
|
276
|
-
verticalAlign: 'flex-end',
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
export const Responsive = Template.bind({});
|
|
280
|
-
Responsive.args = {
|
|
281
|
-
responsive: true,
|
|
282
|
-
};
|
|
@@ -2,16 +2,14 @@ import { Meta, Story } from '@storybook/react/types-6-0';
|
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
import { useContext } from 'react';
|
|
4
4
|
import { IReqoreDrawerProps, ReqoreDrawer } from '../../components/Drawer';
|
|
5
|
-
import { IReqoreInputProps } from '../../components/Input';
|
|
6
5
|
import {
|
|
7
6
|
ReqoreButton,
|
|
8
7
|
ReqoreContext,
|
|
9
|
-
ReqoreInput,
|
|
10
8
|
ReqorePanel,
|
|
11
9
|
ReqoreTabs,
|
|
12
10
|
ReqoreTabsContent,
|
|
13
11
|
} from '../../index';
|
|
14
|
-
import { FlatArg, IntentArg
|
|
12
|
+
import { argManager, FlatArg, IntentArg } from '../utils/args';
|
|
15
13
|
|
|
16
14
|
const { createArg } = argManager<IReqoreDrawerProps>();
|
|
17
15
|
|
|
@@ -48,7 +46,7 @@ export default {
|
|
|
48
46
|
options: ['left', 'right', 'top', 'bottom'],
|
|
49
47
|
}),
|
|
50
48
|
...createArg('size', {
|
|
51
|
-
defaultValue: '
|
|
49
|
+
defaultValue: '450px',
|
|
52
50
|
name: 'Size',
|
|
53
51
|
type: 'string',
|
|
54
52
|
}),
|
|
@@ -126,68 +124,7 @@ const Template: Story<IReqoreDrawerProps> = (args: IReqoreDrawerProps) => {
|
|
|
126
124
|
attacks inhabit pursuit our but. Lasted hunted enough an up seeing in lively letter. Had
|
|
127
125
|
judgment out opinions property the supplied.
|
|
128
126
|
</ReqorePanel>
|
|
129
|
-
<ReqoreDrawer
|
|
130
|
-
{...args}
|
|
131
|
-
label='This is a test'
|
|
132
|
-
icon='EmphasisCn'
|
|
133
|
-
onClose={noop}
|
|
134
|
-
actions={[
|
|
135
|
-
{
|
|
136
|
-
responsive: false,
|
|
137
|
-
group: [
|
|
138
|
-
{
|
|
139
|
-
label: 'Non responsive',
|
|
140
|
-
icon: '24HoursFill',
|
|
141
|
-
customTheme: { main: '#eb0e8c' },
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
icon: 'FullscreenExitLine',
|
|
145
|
-
customTheme: { main: '#a40a62' },
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
group: [
|
|
151
|
-
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
152
|
-
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
as: ReqoreInput,
|
|
157
|
-
props: {
|
|
158
|
-
placeholder: 'Custom action!',
|
|
159
|
-
icon: 'Search2Line',
|
|
160
|
-
minimal: false,
|
|
161
|
-
} as IReqoreInputProps,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
label: 'More actions',
|
|
165
|
-
actions: [
|
|
166
|
-
{ value: 'Sub Test', icon: 'FileDownloadLine' },
|
|
167
|
-
{ value: 'Sub Test 2', icon: 'FileDownloadLine', intent: 'success' },
|
|
168
|
-
],
|
|
169
|
-
intent: 'info',
|
|
170
|
-
},
|
|
171
|
-
]}
|
|
172
|
-
bottomActions={[
|
|
173
|
-
{
|
|
174
|
-
position: 'left',
|
|
175
|
-
intent: 'success',
|
|
176
|
-
group: [
|
|
177
|
-
{ label: 'Test 1', icon: '24HoursFill' },
|
|
178
|
-
{ label: 'Test 2', icon: '24HoursFill' },
|
|
179
|
-
],
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
label: 'More actions',
|
|
183
|
-
position: 'right',
|
|
184
|
-
actions: [
|
|
185
|
-
{ value: 'Sub Test', icon: 'FileDownloadLine', intent: 'success' },
|
|
186
|
-
{ value: 'Sub Test 2', icon: 'FileDownloadLine' },
|
|
187
|
-
],
|
|
188
|
-
},
|
|
189
|
-
]}
|
|
190
|
-
>
|
|
127
|
+
<ReqoreDrawer {...args} label='This is a test' icon='EmphasisCn' onClose={noop}>
|
|
191
128
|
<ReqoreTabs
|
|
192
129
|
flat
|
|
193
130
|
intent={args.intent}
|
|
@@ -242,7 +179,3 @@ export const Transparent = Template.bind({});
|
|
|
242
179
|
Transparent.args = {
|
|
243
180
|
opacity: 0.5,
|
|
244
181
|
};
|
|
245
|
-
export const WithSize = Template.bind({});
|
|
246
|
-
WithSize.args = {
|
|
247
|
-
size: '500px',
|
|
248
|
-
};
|
|
@@ -159,21 +159,11 @@ const Template: Story<IReqoreDropdownProps> = (args: IReqoreDropdownProps) => {
|
|
|
159
159
|
|
|
160
160
|
return (
|
|
161
161
|
<>
|
|
162
|
-
<ReqoreControlGroup
|
|
162
|
+
<ReqoreControlGroup>
|
|
163
163
|
<ReqoreDropdown label='Default Dropdown' {...args} />
|
|
164
164
|
<ReqoreDropdown label='Disabled if empty' {...args} items={[]} />
|
|
165
|
-
<ReqoreDropdown
|
|
166
|
-
|
|
167
|
-
label='Custom icon'
|
|
168
|
-
{...args}
|
|
169
|
-
leftIconColor='warning:lighten:2'
|
|
170
|
-
/>
|
|
171
|
-
<ReqoreDropdown
|
|
172
|
-
rightIcon='SunCloudyLine'
|
|
173
|
-
caretPosition='right'
|
|
174
|
-
{...args}
|
|
175
|
-
iconColor='success:lighten:2'
|
|
176
|
-
>
|
|
165
|
+
<ReqoreDropdown icon='SunCloudyLine' label='Custom icon' {...args} />
|
|
166
|
+
<ReqoreDropdown rightIcon='SunCloudyLine' caretPosition='right' {...args}>
|
|
177
167
|
Custom icon with caret on right
|
|
178
168
|
</ReqoreDropdown>
|
|
179
169
|
<ReqoreDropdown
|
|
@@ -2,14 +2,13 @@ import { Meta, Story } from '@storybook/react/types-6-0';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import ReqoreInput, { IReqoreInputProps } from '../../components/Input';
|
|
4
4
|
import { ReqoreControlGroup } from '../../index';
|
|
5
|
-
import { FlatArg, IconArg, MinimalArg
|
|
5
|
+
import { FlatArg, IconArg, MinimalArg } from '../utils/args';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Components/Input',
|
|
9
9
|
argTypes: {
|
|
10
10
|
...MinimalArg,
|
|
11
11
|
...FlatArg,
|
|
12
|
-
...SizeArg,
|
|
13
12
|
...IconArg('icon', 'Icon', 'SearchLine'),
|
|
14
13
|
},
|
|
15
14
|
} as Meta<IReqoreInputProps>;
|
|
@@ -27,7 +26,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
28
|
<>
|
|
30
|
-
<ReqoreControlGroup
|
|
29
|
+
<ReqoreControlGroup>
|
|
31
30
|
<ReqoreInput {...args} placeholder='Reqore Input' onChange={handleValueChange} />
|
|
32
31
|
<ReqoreInput {...args} placeholder='Minimal Input' minimal onChange={handleValueChange} />
|
|
33
32
|
<ReqoreInput
|
|
@@ -39,7 +38,6 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
39
38
|
/>
|
|
40
39
|
<ReqoreInput
|
|
41
40
|
{...args}
|
|
42
|
-
iconColor='pending:lighten:2'
|
|
43
41
|
placeholder='Clearable Input'
|
|
44
42
|
onClearClick={handleValueClear}
|
|
45
43
|
onChange={handleValueChange}
|
|
@@ -53,7 +51,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
53
51
|
/>
|
|
54
52
|
</ReqoreControlGroup>
|
|
55
53
|
<br />
|
|
56
|
-
<ReqoreControlGroup
|
|
54
|
+
<ReqoreControlGroup>
|
|
57
55
|
<ReqoreInput
|
|
58
56
|
{...args}
|
|
59
57
|
placeholder='Reqore Input'
|
|
@@ -118,7 +118,6 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
118
118
|
{
|
|
119
119
|
icon: 'EmotionUnhappyLine',
|
|
120
120
|
rightIcon: 'Scissors2Fill',
|
|
121
|
-
leftIconColor: 'danger:lighten',
|
|
122
121
|
wrap: args.wrapText,
|
|
123
122
|
flat: args.flat,
|
|
124
123
|
} as IReqoreMenuItemProps
|
|
@@ -149,7 +148,6 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
149
148
|
</ReqoreMenu>
|
|
150
149
|
}
|
|
151
150
|
isReqoreComponent
|
|
152
|
-
noWrapper
|
|
153
151
|
handler='click'
|
|
154
152
|
placement='right'
|
|
155
153
|
>
|
|
@@ -52,13 +52,6 @@ Minimal.args = {
|
|
|
52
52
|
intent: 'danger',
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
export const WithIconColor: Story<IReqoreMessageProps> = Template.bind({});
|
|
56
|
-
WithIconColor.args = {
|
|
57
|
-
minimal: true,
|
|
58
|
-
intent: 'success',
|
|
59
|
-
iconColor: '#00fd9f',
|
|
60
|
-
};
|
|
61
|
-
|
|
62
55
|
export const Opaque: Story<IReqoreMessageProps> = Template.bind({});
|
|
63
56
|
Opaque.args = {
|
|
64
57
|
opaque: true,
|