@qoretechnologies/reqore 0.25.9 → 0.26.0
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/__tests__/dropdown.test.tsx +133 -12
- package/__tests__/effect.test.tsx +70 -0
- package/dist/components/Button/index.d.ts +3 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +15 -14
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +2 -2
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js +6 -3
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +4 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +8 -7
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +12 -5
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/item.d.ts +2 -2
- package/dist/components/Dropdown/item.d.ts.map +1 -1
- package/dist/components/Dropdown/item.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +9 -2
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +13 -5
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +29 -0
- package/dist/components/Effect/index.d.ts.map +1 -0
- package/dist/components/Effect/index.js +117 -0
- package/dist/components/Effect/index.js.map +1 -0
- package/dist/components/Header/index.d.ts +14 -8
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +52 -33
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +3 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +8 -7
- 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 +0 -1
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts +5 -11
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +4 -4
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Message/index.d.ts +3 -6
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +2 -1
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts +3 -2
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -2
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Panel/index.d.ts +5 -3
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +17 -27
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -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/Tabs/item.d.ts +1 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +6 -5
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +6 -4
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +8 -7
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/constants/sizes.d.ts +7 -0
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +8 -1
- package/dist/constants/sizes.js.map +1 -1
- package/dist/constants/theme.d.ts +1 -0
- package/dist/constants/theme.d.ts.map +1 -1
- package/dist/constants/theme.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts +2 -2
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +7 -5
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +9 -3
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +3 -2
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +2 -0
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +4 -1
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/colors.js.map +1 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +23 -9
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useWhyDidYouUpdate.d.ts +2 -0
- package/dist/hooks/useWhyDidYouUpdate.d.ts.map +1 -0
- package/dist/hooks/useWhyDidYouUpdate.js +47 -0
- package/dist/hooks/useWhyDidYouUpdate.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/types/global.d.ts +13 -0
- package/dist/types/global.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/Button/index.tsx +34 -23
- package/src/components/Collection/item.tsx +6 -3
- package/src/components/ControlGroup/index.tsx +1 -0
- package/src/components/Dropdown/index.tsx +62 -36
- package/src/components/Dropdown/item.tsx +3 -6
- package/src/components/Dropdown/list.tsx +82 -56
- package/src/components/Effect/index.tsx +134 -0
- package/src/components/Header/index.tsx +33 -28
- package/src/components/Input/index.tsx +15 -7
- package/src/components/InternalPopover/index.tsx +0 -2
- package/src/components/Menu/index.tsx +1 -1
- package/src/components/Menu/item.tsx +8 -17
- package/src/components/Message/index.tsx +13 -5
- package/src/components/Notifications/notification.tsx +6 -3
- package/src/components/Panel/index.tsx +83 -79
- package/src/components/Popover/index.tsx +40 -38
- package/src/components/Tabs/item.tsx +92 -79
- package/src/components/Tag/index.tsx +16 -7
- package/src/components/Textarea/index.tsx +14 -7
- package/src/constants/sizes.ts +8 -0
- package/src/constants/theme.ts +1 -0
- package/src/containers/ReqoreProvider.tsx +16 -8
- package/src/containers/UIProvider.tsx +15 -13
- package/src/context/ReqoreContext.tsx +5 -0
- package/src/helpers/colors.ts +1 -1
- package/src/hooks/usePopover.tsx +34 -20
- package/src/hooks/useWhyDidYouUpdate.ts +32 -0
- package/src/index.tsx +10 -1
- package/src/mock/collectionData.tsx +55 -2
- package/src/stories/Button/Button.stories.tsx +15 -2
- package/src/stories/Collection/Collection.stories.tsx +1 -1
- package/src/stories/Dropdown/Dropdown.stories.tsx +62 -34
- package/src/stories/Header/Header.stories.tsx +71 -0
- package/src/stories/Input/Input.stories.tsx +12 -0
- package/src/stories/Menu/Menu.stories.tsx +14 -0
- package/src/stories/Message/Message.stories.tsx +13 -0
- package/src/stories/Notifications/Notification.stories.tsx +7 -2
- package/src/stories/Panel/Panel.stories.tsx +41 -5
- package/src/stories/Tabs/Tabs.stories.tsx +23 -23
- package/src/stories/Tag/Tag.stories.tsx +16 -0
- package/src/stories/TextArea/TextArea.stories.tsx +18 -0
- package/src/types/global.ts +14 -0
- package/tests.json +1 -1
|
@@ -4,6 +4,7 @@ import { ReqoreH1 } from '../components/Header';
|
|
|
4
4
|
import ReqoreMessage from '../components/Message';
|
|
5
5
|
import { ReqoreP } from '../components/Paragraph';
|
|
6
6
|
import { ReqoreSpacer } from '../components/Spacer';
|
|
7
|
+
import ReqoreTag from '../components/Tag';
|
|
7
8
|
|
|
8
9
|
export default [
|
|
9
10
|
{
|
|
@@ -80,6 +81,15 @@ export default [
|
|
|
80
81
|
content:
|
|
81
82
|
'Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long',
|
|
82
83
|
expandable: true,
|
|
84
|
+
contentEffect: {
|
|
85
|
+
gradient: {
|
|
86
|
+
colors: { 0: '#3b065e', 100: '#00d3c8' },
|
|
87
|
+
direction: 'to right bottom',
|
|
88
|
+
},
|
|
89
|
+
uppercase: true,
|
|
90
|
+
weight: 'thin',
|
|
91
|
+
spaced: 2,
|
|
92
|
+
},
|
|
83
93
|
expandedContent: (
|
|
84
94
|
<>
|
|
85
95
|
<ReqoreMessage intent='info'>Hello I am a custom content</ReqoreMessage>
|
|
@@ -167,8 +177,51 @@ export default [
|
|
|
167
177
|
},
|
|
168
178
|
{
|
|
169
179
|
label: 'I have intent!',
|
|
170
|
-
content:
|
|
171
|
-
|
|
180
|
+
content: (
|
|
181
|
+
<p>
|
|
182
|
+
'Well would you look at that. Lorem ipsum dolor{' '}
|
|
183
|
+
<ReqoreTag label='dolor' icon='Briefcase3Line' /> <ReqoreTag label='sit amet' />,
|
|
184
|
+
consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis
|
|
185
|
+
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis,
|
|
186
|
+
ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec
|
|
187
|
+
pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut,
|
|
188
|
+
imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer
|
|
189
|
+
tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
|
|
190
|
+
Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante,
|
|
191
|
+
dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius
|
|
192
|
+
laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur
|
|
193
|
+
ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget
|
|
194
|
+
condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam
|
|
195
|
+
quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante
|
|
196
|
+
tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam
|
|
197
|
+
sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh.
|
|
198
|
+
Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus
|
|
199
|
+
nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus
|
|
200
|
+
quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras
|
|
201
|
+
ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci
|
|
202
|
+
luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam
|
|
203
|
+
pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis,
|
|
204
|
+
ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget,
|
|
205
|
+
posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc
|
|
206
|
+
nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl
|
|
207
|
+
sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat,
|
|
208
|
+
pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque
|
|
209
|
+
facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non,
|
|
210
|
+
auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae,
|
|
211
|
+
posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis
|
|
212
|
+
vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante
|
|
213
|
+
ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi
|
|
214
|
+
quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus
|
|
215
|
+
consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non,
|
|
216
|
+
nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent
|
|
217
|
+
turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin
|
|
218
|
+
urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis.
|
|
219
|
+
Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat
|
|
220
|
+
nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci
|
|
221
|
+
luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero.
|
|
222
|
+
Phasellus dolor. Maecenas vestibulum mollis'
|
|
223
|
+
</p>
|
|
224
|
+
),
|
|
172
225
|
expandable: true,
|
|
173
226
|
intent: 'info',
|
|
174
227
|
},
|
|
@@ -25,8 +25,8 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
25
25
|
<ReqoreButton {...buttonProps} active tooltip='hello'>
|
|
26
26
|
Active
|
|
27
27
|
</ReqoreButton>
|
|
28
|
-
<ReqoreButton {...buttonProps} flat>
|
|
29
|
-
Flat
|
|
28
|
+
<ReqoreButton {...buttonProps} flat={false}>
|
|
29
|
+
Not Flat
|
|
30
30
|
</ReqoreButton>
|
|
31
31
|
<ReqoreButton {...buttonProps} minimal>
|
|
32
32
|
Minimal
|
|
@@ -70,3 +70,16 @@ export const Muted = Template.bind({});
|
|
|
70
70
|
Muted.args = {
|
|
71
71
|
intent: 'muted',
|
|
72
72
|
};
|
|
73
|
+
export const Effect: ComponentStory<typeof ReqoreButton> = Template.bind({});
|
|
74
|
+
Effect.args = {
|
|
75
|
+
effect: {
|
|
76
|
+
gradient: {
|
|
77
|
+
direction: 'to right bottom',
|
|
78
|
+
colors: { 0: '#33023c', 100: '#0a487b' },
|
|
79
|
+
},
|
|
80
|
+
spaced: 2,
|
|
81
|
+
uppercase: true,
|
|
82
|
+
weight: 'thick',
|
|
83
|
+
textSize: 'small',
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -72,7 +72,7 @@ const Template: Story<IReqoreCollectionProps> = (args) => {
|
|
|
72
72
|
return (
|
|
73
73
|
<ReqoreCollection
|
|
74
74
|
{...args}
|
|
75
|
-
actions={[{ label: 'Custom action', icon: 'Home7Line' }, { actions: [{
|
|
75
|
+
actions={[{ label: 'Custom action', icon: 'Home7Line' }, { actions: [{ value: 'Test' }] }]}
|
|
76
76
|
/>
|
|
77
77
|
);
|
|
78
78
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import ReqoreButton from '../../components/Button';
|
|
3
4
|
import { IReqoreDropdownProps } from '../../components/Dropdown';
|
|
4
|
-
import {
|
|
5
|
-
import { ReqoreControlGroup, ReqoreDropdown, ReqoreInput } from '../../index';
|
|
5
|
+
import { ReqoreControlGroup, ReqoreDropdown, ReqoreInput, ReqoreTag } from '../../index';
|
|
6
6
|
import { argManager } from '../utils/args';
|
|
7
7
|
|
|
8
|
-
const { createArg } = argManager<IReqoreDropdownProps
|
|
8
|
+
const { createArg, disableArg } = argManager<IReqoreDropdownProps>();
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
title: 'Components/Dropdown',
|
|
12
|
+
parameters: {
|
|
13
|
+
chromatic: {
|
|
14
|
+
delay: 500,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
12
17
|
argTypes: {
|
|
18
|
+
...disableArg('multiSelect'),
|
|
13
19
|
...createArg('component', {
|
|
14
20
|
defaultValue: ReqoreButton,
|
|
15
21
|
table: {
|
|
16
22
|
disable: true,
|
|
17
23
|
},
|
|
18
24
|
}),
|
|
19
|
-
...createArg('componentProps', {
|
|
20
|
-
table: {
|
|
21
|
-
disable: true,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
25
|
...createArg('filterable', {
|
|
25
26
|
defaultValue: true,
|
|
26
27
|
name: 'Filterable',
|
|
@@ -34,96 +35,121 @@ export default {
|
|
|
34
35
|
defaultValue: [
|
|
35
36
|
{
|
|
36
37
|
selected: true,
|
|
37
|
-
|
|
38
|
+
value: 'Hello',
|
|
38
39
|
icon: 'SunCloudyLine',
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
|
-
|
|
42
|
+
value: 'How are ya, I am super long item and I am not going to fit in the dropdown',
|
|
42
43
|
icon: 'BatteryChargeFill',
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
disabled: true,
|
|
46
|
-
|
|
47
|
+
value: 'i aM diSAblEd',
|
|
47
48
|
icon: 'StopCircleLine',
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
selected: true,
|
|
51
|
-
|
|
52
|
+
value: 'Hello',
|
|
52
53
|
icon: 'SunCloudyLine',
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
|
-
|
|
56
|
+
value: 'How are ya',
|
|
56
57
|
icon: 'BatteryChargeFill',
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
disabled: true,
|
|
60
|
-
|
|
61
|
+
value: 'i aM diSAblEd',
|
|
61
62
|
icon: 'StopCircleLine',
|
|
62
63
|
},
|
|
63
64
|
{
|
|
64
65
|
selected: true,
|
|
65
|
-
|
|
66
|
+
value: 'Hello',
|
|
66
67
|
icon: 'SunCloudyLine',
|
|
67
68
|
},
|
|
68
69
|
{
|
|
69
|
-
|
|
70
|
+
value: 'How are ya',
|
|
70
71
|
icon: 'BatteryChargeFill',
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
74
|
disabled: true,
|
|
74
|
-
|
|
75
|
+
value: 'i aM diSAblEd',
|
|
75
76
|
icon: 'StopCircleLine',
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
selected: true,
|
|
79
|
-
|
|
80
|
+
value: 'Hello',
|
|
80
81
|
icon: 'SunCloudyLine',
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
|
-
|
|
84
|
+
value: 'How are ya',
|
|
84
85
|
icon: 'BatteryChargeFill',
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
88
|
disabled: true,
|
|
88
|
-
|
|
89
|
+
value: 'i aM diSAblEd',
|
|
89
90
|
icon: 'StopCircleLine',
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
selected: true,
|
|
93
|
-
|
|
94
|
+
value: 'Hello',
|
|
94
95
|
icon: 'SunCloudyLine',
|
|
95
96
|
},
|
|
96
97
|
{
|
|
97
|
-
|
|
98
|
+
value: 'How are ya',
|
|
98
99
|
icon: 'BatteryChargeFill',
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
102
|
disabled: true,
|
|
102
|
-
|
|
103
|
+
value: 'i aM diSAblEd',
|
|
103
104
|
icon: 'StopCircleLine',
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
107
|
selected: true,
|
|
107
|
-
|
|
108
|
+
value: 'Hello',
|
|
108
109
|
icon: 'SunCloudyLine',
|
|
109
110
|
},
|
|
110
111
|
{
|
|
111
|
-
|
|
112
|
+
value: 'How are ya',
|
|
112
113
|
icon: 'BatteryChargeFill',
|
|
113
114
|
},
|
|
114
115
|
{
|
|
115
116
|
disabled: true,
|
|
116
|
-
|
|
117
|
+
value: 'i aM diSAblEd',
|
|
117
118
|
icon: 'StopCircleLine',
|
|
118
119
|
},
|
|
119
120
|
],
|
|
120
121
|
}),
|
|
121
122
|
},
|
|
122
|
-
} as Meta<IReqoreDropdownProps
|
|
123
|
+
} as Meta<IReqoreDropdownProps>;
|
|
124
|
+
|
|
125
|
+
const Template: Story<IReqoreDropdownProps> = (args: IReqoreDropdownProps) => {
|
|
126
|
+
const [selected, setSelected] = useState<string[]>(['Item 3', 'Item 6']);
|
|
127
|
+
|
|
128
|
+
if (args.multiSelect) {
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<ReqoreControlGroup>
|
|
132
|
+
<ReqoreDropdown
|
|
133
|
+
label='Multi Select'
|
|
134
|
+
multiSelect
|
|
135
|
+
isDefaultOpen
|
|
136
|
+
onItemSelect={({ label }) => setSelected([...selected, label])}
|
|
137
|
+
items={Array(13)
|
|
138
|
+
.fill(null)
|
|
139
|
+
.map((_, i) => ({
|
|
140
|
+
label: `Item ${i}`,
|
|
141
|
+
value: `item-${i}`,
|
|
142
|
+
selected: selected.includes(`Item ${i}`),
|
|
143
|
+
}))}
|
|
144
|
+
/>
|
|
145
|
+
{selected.map((item, index) => (
|
|
146
|
+
<ReqoreTag label={item} key={index} />
|
|
147
|
+
))}
|
|
148
|
+
</ReqoreControlGroup>
|
|
149
|
+
</>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
123
152
|
|
|
124
|
-
const Template: Story<IReqoreDropdownProps<IReqoreInputProps>> = (
|
|
125
|
-
args: IReqoreDropdownProps<IReqoreInputProps>
|
|
126
|
-
) => {
|
|
127
153
|
return (
|
|
128
154
|
<>
|
|
129
155
|
<ReqoreControlGroup>
|
|
@@ -141,7 +167,7 @@ const Template: Story<IReqoreDropdownProps<IReqoreInputProps>> = (
|
|
|
141
167
|
caretPosition='right'
|
|
142
168
|
label='Open By Default'
|
|
143
169
|
{...args}
|
|
144
|
-
|
|
170
|
+
placeholder='Fluid component'
|
|
145
171
|
isDefaultOpen
|
|
146
172
|
useTargetWidth
|
|
147
173
|
/>
|
|
@@ -154,7 +180,9 @@ export const Basic = Template.bind({});
|
|
|
154
180
|
export const CustomComponent = Template.bind({});
|
|
155
181
|
CustomComponent.args = {
|
|
156
182
|
component: ReqoreInput,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
183
|
+
placeholder: 'Custom component',
|
|
184
|
+
};
|
|
185
|
+
export const MultiSelect = Template.bind({});
|
|
186
|
+
MultiSelect.args = {
|
|
187
|
+
multiSelect: true,
|
|
160
188
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
import { IReqoreHeadingProps } from '../../components/Header';
|
|
3
|
+
import { ReqoreHeading } from '../../index';
|
|
4
|
+
import { IntentArg } from '../utils/args';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/Heading',
|
|
8
|
+
argTypes: {
|
|
9
|
+
...IntentArg,
|
|
10
|
+
},
|
|
11
|
+
} as Meta;
|
|
12
|
+
|
|
13
|
+
const Template: Story<IReqoreHeadingProps> = (args) => {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<ReqoreHeading size={1} {...args}>
|
|
17
|
+
This is a heading
|
|
18
|
+
</ReqoreHeading>
|
|
19
|
+
<ReqoreHeading size={2} {...args}>
|
|
20
|
+
This is a heading
|
|
21
|
+
</ReqoreHeading>
|
|
22
|
+
<ReqoreHeading size={3} {...args}>
|
|
23
|
+
This is a heading
|
|
24
|
+
</ReqoreHeading>
|
|
25
|
+
<ReqoreHeading size={4} {...args}>
|
|
26
|
+
This is a heading
|
|
27
|
+
</ReqoreHeading>
|
|
28
|
+
<ReqoreHeading size={5} {...args}>
|
|
29
|
+
This is a heading
|
|
30
|
+
</ReqoreHeading>
|
|
31
|
+
<ReqoreHeading size={6} {...args}>
|
|
32
|
+
This is a heading
|
|
33
|
+
</ReqoreHeading>
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Basic = Template.bind({});
|
|
39
|
+
export const Success = Template.bind({});
|
|
40
|
+
Success.args = {
|
|
41
|
+
intent: 'success',
|
|
42
|
+
};
|
|
43
|
+
export const Danger = Template.bind({});
|
|
44
|
+
Danger.args = {
|
|
45
|
+
intent: 'danger',
|
|
46
|
+
};
|
|
47
|
+
export const Warning = Template.bind({});
|
|
48
|
+
Warning.args = {
|
|
49
|
+
intent: 'warning',
|
|
50
|
+
};
|
|
51
|
+
export const Info = Template.bind({});
|
|
52
|
+
Info.args = {
|
|
53
|
+
intent: 'info',
|
|
54
|
+
};
|
|
55
|
+
export const Pending = Template.bind({});
|
|
56
|
+
Pending.args = {
|
|
57
|
+
intent: 'pending',
|
|
58
|
+
};
|
|
59
|
+
export const Muted = Template.bind({});
|
|
60
|
+
Muted.args = {
|
|
61
|
+
intent: 'muted',
|
|
62
|
+
};
|
|
63
|
+
export const Effect = Template.bind({});
|
|
64
|
+
Effect.args = {
|
|
65
|
+
effect: {
|
|
66
|
+
gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
|
|
67
|
+
spaced: 4,
|
|
68
|
+
weight: 'bold',
|
|
69
|
+
uppercase: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -108,3 +108,15 @@ export const Muted = Template.bind({});
|
|
|
108
108
|
Muted.args = {
|
|
109
109
|
intent: 'muted',
|
|
110
110
|
};
|
|
111
|
+
|
|
112
|
+
export const Effect = Template.bind({});
|
|
113
|
+
Effect.args = {
|
|
114
|
+
effect: {
|
|
115
|
+
gradient: {
|
|
116
|
+
colors: {
|
|
117
|
+
0: '#56345e',
|
|
118
|
+
100: 'transparent',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
@@ -95,6 +95,20 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
95
95
|
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine' selected>
|
|
96
96
|
I am selected!
|
|
97
97
|
</ReqoreMenuItem>
|
|
98
|
+
<ReqoreMenuItem
|
|
99
|
+
icon='FireLine'
|
|
100
|
+
rightIcon='ArrowRightDownLine'
|
|
101
|
+
effect={{
|
|
102
|
+
gradient: {
|
|
103
|
+
colors: {
|
|
104
|
+
0: '#000000',
|
|
105
|
+
100: 'transparent',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
Fancy
|
|
111
|
+
</ReqoreMenuItem>
|
|
98
112
|
</ReqoreMenu>
|
|
99
113
|
);
|
|
100
114
|
};
|
|
@@ -57,3 +57,16 @@ CustomTheme.args = {
|
|
|
57
57
|
main: '#6e1295',
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
|
+
|
|
61
|
+
export const Effect: Story<IReqoreMessageProps> = Template.bind({});
|
|
62
|
+
Effect.args = {
|
|
63
|
+
effect: {
|
|
64
|
+
gradient: {
|
|
65
|
+
colors: {
|
|
66
|
+
0: '#00e3e8',
|
|
67
|
+
100: '#eb0e8c',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
color: '#000000',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -6,7 +6,7 @@ import ReqoreNotification, {
|
|
|
6
6
|
IReqoreNotificationProps,
|
|
7
7
|
} from '../../components/Notifications/notification';
|
|
8
8
|
import { IReqoreUIProviderProps } from '../../containers/UIProvider';
|
|
9
|
-
import { ReqoreUIProvider } from '../../index';
|
|
9
|
+
import { ReqoreTag, ReqoreUIProvider } from '../../index';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: 'Components/Notifications/Item',
|
|
@@ -35,7 +35,12 @@ const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
|
|
|
35
35
|
{...args}
|
|
36
36
|
type='success'
|
|
37
37
|
title='Simple notification'
|
|
38
|
-
content=
|
|
38
|
+
content={
|
|
39
|
+
<ReqoreTag
|
|
40
|
+
label='Custom content in notification'
|
|
41
|
+
effect={{ gradient: { colors: { 0: '#a11c58', 100: '#ff47a3' } } }}
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
39
44
|
onClick={noop}
|
|
40
45
|
/>
|
|
41
46
|
<ReqoreNotification
|
|
@@ -28,6 +28,12 @@ export default {
|
|
|
28
28
|
name: 'Collapsible',
|
|
29
29
|
description: 'If the panel should be collapsible',
|
|
30
30
|
}),
|
|
31
|
+
...createArg('minimal', {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
defaultValue: false,
|
|
34
|
+
name: 'Minimal',
|
|
35
|
+
description: 'If the panel should be minimal',
|
|
36
|
+
}),
|
|
31
37
|
...createArg('label', {
|
|
32
38
|
type: 'string',
|
|
33
39
|
defaultValue: 'Reqore panel component',
|
|
@@ -36,7 +42,7 @@ export default {
|
|
|
36
42
|
}),
|
|
37
43
|
...createArg('opacity', {
|
|
38
44
|
type: 'number',
|
|
39
|
-
defaultValue:
|
|
45
|
+
defaultValue: undefined,
|
|
40
46
|
name: 'Opacity',
|
|
41
47
|
description: 'The opacity of the panel',
|
|
42
48
|
}),
|
|
@@ -68,8 +74,8 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
68
74
|
{
|
|
69
75
|
label: 'More actions',
|
|
70
76
|
actions: [
|
|
71
|
-
{
|
|
72
|
-
{
|
|
77
|
+
{ value: 'Sub Test', icon: 'FileDownloadLine' },
|
|
78
|
+
{ value: 'Sub Test 2', icon: 'FileDownloadLine', intent: 'success' },
|
|
73
79
|
],
|
|
74
80
|
intent: 'info',
|
|
75
81
|
},
|
|
@@ -80,8 +86,8 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
80
86
|
label: 'More actions',
|
|
81
87
|
position: 'right',
|
|
82
88
|
actions: [
|
|
83
|
-
{
|
|
84
|
-
{
|
|
89
|
+
{ value: 'Sub Test', icon: 'FileDownloadLine', intent: 'success' },
|
|
90
|
+
{ value: 'Sub Test 2', icon: 'FileDownloadLine' },
|
|
85
91
|
],
|
|
86
92
|
},
|
|
87
93
|
]}
|
|
@@ -133,3 +139,33 @@ export const Opaque: Story<IReqorePanelProps> = Template.bind({});
|
|
|
133
139
|
Opaque.args = {
|
|
134
140
|
opacity: 0,
|
|
135
141
|
};
|
|
142
|
+
|
|
143
|
+
export const Minimal: Story<IReqorePanelProps> = Template.bind({});
|
|
144
|
+
Minimal.args = {
|
|
145
|
+
minimal: true,
|
|
146
|
+
flat: true,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const WithEffect: Story<IReqorePanelProps> = Template.bind({});
|
|
150
|
+
WithEffect.args = {
|
|
151
|
+
minimal: true,
|
|
152
|
+
flat: true,
|
|
153
|
+
contentEffect: {
|
|
154
|
+
gradient: {
|
|
155
|
+
type: 'radial',
|
|
156
|
+
shape: 'ellipse',
|
|
157
|
+
colors: { 0: '#670079', 100: '#180222' },
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
headerEffect: {
|
|
161
|
+
gradient: {
|
|
162
|
+
type: 'linear',
|
|
163
|
+
colors: { 0: '#3b065e', 100: '#00d3c8' },
|
|
164
|
+
direction: 'to right bottom',
|
|
165
|
+
},
|
|
166
|
+
uppercase: true,
|
|
167
|
+
weight: 'normal',
|
|
168
|
+
spaced: 2,
|
|
169
|
+
},
|
|
170
|
+
headerSize: 2,
|
|
171
|
+
};
|
|
@@ -83,6 +83,18 @@ export default {
|
|
|
83
83
|
name: 'Fill',
|
|
84
84
|
description: 'If the tabs should fill the container',
|
|
85
85
|
}),
|
|
86
|
+
...createArg('fillParent', {
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
defaultValue: false,
|
|
89
|
+
name: 'Fill Parent',
|
|
90
|
+
description: 'If the tabs should fill the parent container',
|
|
91
|
+
}),
|
|
92
|
+
...createArg('wrapTabNames', {
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
defaultValue: false,
|
|
95
|
+
name: 'Wrap Tab Names',
|
|
96
|
+
description: 'If the tab names should wrap',
|
|
97
|
+
}),
|
|
86
98
|
...createArg('vertical', {
|
|
87
99
|
type: 'boolean',
|
|
88
100
|
defaultValue: false,
|
|
@@ -195,39 +207,27 @@ Vertical.args = {
|
|
|
195
207
|
|
|
196
208
|
export const VerticalWithWrapping = Template.bind({});
|
|
197
209
|
VerticalWithWrapping.args = {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
fillParent: true,
|
|
202
|
-
wrapTabNames: true,
|
|
203
|
-
},
|
|
210
|
+
vertical: true,
|
|
211
|
+
fillParent: true,
|
|
212
|
+
wrapTabNames: true,
|
|
204
213
|
};
|
|
205
214
|
|
|
206
215
|
export const VerticalFill = Template.bind({});
|
|
207
216
|
VerticalFill.args = {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
fill: true,
|
|
212
|
-
fillParent: true,
|
|
213
|
-
},
|
|
217
|
+
vertical: true,
|
|
218
|
+
fill: true,
|
|
219
|
+
fillParent: true,
|
|
214
220
|
};
|
|
215
221
|
|
|
216
222
|
export const VerticalCustomWidth = Template.bind({});
|
|
217
223
|
VerticalCustomWidth.args = {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
fillParent: true,
|
|
223
|
-
width: '300px',
|
|
224
|
-
},
|
|
224
|
+
vertical: true,
|
|
225
|
+
fill: true,
|
|
226
|
+
fillParent: true,
|
|
227
|
+
width: '300px',
|
|
225
228
|
};
|
|
226
229
|
|
|
227
230
|
export const Flat = Template.bind({});
|
|
228
231
|
Flat.args = {
|
|
229
|
-
|
|
230
|
-
...tabs,
|
|
231
|
-
flat: true,
|
|
232
|
-
},
|
|
232
|
+
flat: true,
|
|
233
233
|
};
|
|
@@ -62,6 +62,7 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
62
62
|
<ReqoreTagGroup columns={columns} size={args.size}>
|
|
63
63
|
<ReqoreTag label='Basic Tag' icon='AlarmWarningLine' {...args} />
|
|
64
64
|
<ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' {...args} />
|
|
65
|
+
<ReqoreTag labelKey='Key' label='value' {...args} />
|
|
65
66
|
<ReqoreTag icon='QuestionAnswerLine' {...args} />
|
|
66
67
|
<ReqoreTag label='Disabled Tag' disabled icon='AlarmWarningLine' {...args} />
|
|
67
68
|
<ReqoreTag
|
|
@@ -81,3 +82,18 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
81
82
|
export const Basic = Template.bind({});
|
|
82
83
|
export const Badge = Template.bind({});
|
|
83
84
|
Badge.args = { badge: true };
|
|
85
|
+
|
|
86
|
+
export const Effect = Template.bind({});
|
|
87
|
+
Effect.args = {
|
|
88
|
+
effect: {
|
|
89
|
+
gradient: {
|
|
90
|
+
direction: 'to right bottom',
|
|
91
|
+
colors: { 0: '#33023c', 100: '#0a487b' },
|
|
92
|
+
},
|
|
93
|
+
color: '#ffffff',
|
|
94
|
+
spaced: 2,
|
|
95
|
+
uppercase: true,
|
|
96
|
+
weight: 'thick',
|
|
97
|
+
textSize: 'small',
|
|
98
|
+
},
|
|
99
|
+
};
|
|
@@ -142,3 +142,21 @@ Custom.args = {
|
|
|
142
142
|
main: '#38fdb2',
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
|
+
|
|
146
|
+
export const Effect = Template.bind({});
|
|
147
|
+
Effect.args = {
|
|
148
|
+
effect: {
|
|
149
|
+
gradient: {
|
|
150
|
+
type: 'radial',
|
|
151
|
+
colors: {
|
|
152
|
+
0: '#361554',
|
|
153
|
+
50: '#160013',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
spaced: 2,
|
|
157
|
+
color: '#ffffff',
|
|
158
|
+
uppercase: true,
|
|
159
|
+
textSize: 'small',
|
|
160
|
+
weight: 'bold',
|
|
161
|
+
},
|
|
162
|
+
};
|