@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,9 +1,8 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
import ReqoreInput, { IReqoreInputProps } from '../../components/Input';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { FlatArg, IconArg, IntentArg, SizeArg, argManager } from '../utils/args';
|
|
4
|
+
import { IReqorePanelProps, ReqorePanel } from '../../components/Panel';
|
|
5
|
+
import { FlatArg, IconArg, IntentArg, argManager } from '../utils/args';
|
|
7
6
|
|
|
8
7
|
const { createArg } = argManager<IReqorePanelProps>();
|
|
9
8
|
|
|
@@ -12,7 +11,6 @@ export default {
|
|
|
12
11
|
argTypes: {
|
|
13
12
|
...IntentArg,
|
|
14
13
|
...FlatArg,
|
|
15
|
-
...SizeArg,
|
|
16
14
|
...createArg('padded', {
|
|
17
15
|
type: 'boolean',
|
|
18
16
|
defaultValue: true,
|
|
@@ -50,8 +48,8 @@ export default {
|
|
|
50
48
|
description: 'The opacity of the panel',
|
|
51
49
|
}),
|
|
52
50
|
...createArg('headerSize', {
|
|
53
|
-
type: '
|
|
54
|
-
defaultValue:
|
|
51
|
+
type: 'number',
|
|
52
|
+
defaultValue: 4,
|
|
55
53
|
name: 'Header Size',
|
|
56
54
|
description: 'The size of the header',
|
|
57
55
|
}),
|
|
@@ -66,64 +64,9 @@ export default {
|
|
|
66
64
|
} as Meta<IReqorePanelProps>;
|
|
67
65
|
|
|
68
66
|
const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
69
|
-
if (args.fluid) {
|
|
70
|
-
const actions: IReqorePanelAction[] = [
|
|
71
|
-
{
|
|
72
|
-
icon: 'GiftFill',
|
|
73
|
-
label: 'Visible',
|
|
74
|
-
responsive: false,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: 'Hidden when small',
|
|
78
|
-
icon: 'EyeCloseLine',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
label: 'Hidden when small',
|
|
82
|
-
icon: 'EyeCloseLine',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: 'Hidden when small',
|
|
86
|
-
icon: 'EyeCloseLine',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: 'Hidden when small',
|
|
90
|
-
icon: 'EyeCloseLine',
|
|
91
|
-
},
|
|
92
|
-
];
|
|
93
|
-
|
|
94
|
-
return (
|
|
95
|
-
<>
|
|
96
|
-
<ReqorePanel
|
|
97
|
-
{...args}
|
|
98
|
-
badge='Fluid'
|
|
99
|
-
actions={actions}
|
|
100
|
-
bottomActions={[
|
|
101
|
-
...actions,
|
|
102
|
-
...actions.map((action) => ({ ...action, position: 'right' })),
|
|
103
|
-
]}
|
|
104
|
-
>
|
|
105
|
-
This is a fluid panel
|
|
106
|
-
</ReqorePanel>
|
|
107
|
-
<ReqoreVerticalSpacer height={10} />
|
|
108
|
-
<ReqorePanel
|
|
109
|
-
{...args}
|
|
110
|
-
style={{ width: 400 }}
|
|
111
|
-
fluid={false}
|
|
112
|
-
badge='Not Fluid'
|
|
113
|
-
actions={actions}
|
|
114
|
-
bottomActions={[
|
|
115
|
-
...actions,
|
|
116
|
-
...actions.map((action) => ({ ...action, position: 'right' })),
|
|
117
|
-
]}
|
|
118
|
-
>
|
|
119
|
-
This is not a fluid panel
|
|
120
|
-
</ReqorePanel>
|
|
121
|
-
</>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
67
|
return (
|
|
126
68
|
<ReqorePanel
|
|
69
|
+
{...args}
|
|
127
70
|
badge={[
|
|
128
71
|
10,
|
|
129
72
|
0,
|
|
@@ -142,26 +85,11 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
142
85
|
},
|
|
143
86
|
]}
|
|
144
87
|
actions={[
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
icon: '24HoursFill',
|
|
151
|
-
customTheme: { main: '#eb0e8c' },
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
icon: 'FullscreenExitLine',
|
|
155
|
-
customTheme: { main: '#a40a62' },
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
group: [
|
|
161
|
-
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
162
|
-
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
163
|
-
],
|
|
164
|
-
},
|
|
88
|
+
{ label: 'Test', icon: '24HoursFill', intent: 'info' },
|
|
89
|
+
[
|
|
90
|
+
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
91
|
+
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
92
|
+
],
|
|
165
93
|
{
|
|
166
94
|
as: ReqoreInput,
|
|
167
95
|
props: {
|
|
@@ -180,14 +108,7 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
180
108
|
},
|
|
181
109
|
]}
|
|
182
110
|
bottomActions={[
|
|
183
|
-
{
|
|
184
|
-
position: 'left',
|
|
185
|
-
intent: 'success',
|
|
186
|
-
group: [
|
|
187
|
-
{ label: 'Test 1', icon: '24HoursFill' },
|
|
188
|
-
{ label: 'Test 2', icon: '24HoursFill' },
|
|
189
|
-
],
|
|
190
|
-
},
|
|
111
|
+
{ label: 'Test', icon: '24HoursFill', position: 'left' },
|
|
191
112
|
{
|
|
192
113
|
label: 'More actions',
|
|
193
114
|
position: 'right',
|
|
@@ -197,7 +118,6 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
197
118
|
],
|
|
198
119
|
},
|
|
199
120
|
]}
|
|
200
|
-
{...args}
|
|
201
121
|
>
|
|
202
122
|
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
203
123
|
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
@@ -237,33 +157,9 @@ export const Flat = Template.bind({});
|
|
|
237
157
|
Flat.args = {
|
|
238
158
|
flat: true,
|
|
239
159
|
};
|
|
240
|
-
export const
|
|
241
|
-
|
|
160
|
+
export const NoLabel: Story<IReqorePanelProps> = Template.bind({});
|
|
161
|
+
NoLabel.args = {
|
|
242
162
|
label: undefined,
|
|
243
|
-
badge: undefined,
|
|
244
|
-
icon: undefined,
|
|
245
|
-
actions: [
|
|
246
|
-
{ label: 'test', show: false },
|
|
247
|
-
{
|
|
248
|
-
show: false,
|
|
249
|
-
group: [
|
|
250
|
-
{ label: 'test 2', show: true },
|
|
251
|
-
{ label: 'test 3', show: true },
|
|
252
|
-
],
|
|
253
|
-
},
|
|
254
|
-
],
|
|
255
|
-
bottomActions: [
|
|
256
|
-
{ label: 'test', show: false, position: 'left' },
|
|
257
|
-
{
|
|
258
|
-
position: 'right',
|
|
259
|
-
show: false,
|
|
260
|
-
group: [
|
|
261
|
-
{ label: 'test 2', show: true },
|
|
262
|
-
{ label: 'test 3', show: true },
|
|
263
|
-
],
|
|
264
|
-
},
|
|
265
|
-
],
|
|
266
|
-
collapsible: false,
|
|
267
163
|
};
|
|
268
164
|
|
|
269
165
|
export const Transparent: Story<IReqorePanelProps> = Template.bind({});
|
|
@@ -271,44 +167,14 @@ Transparent.args = {
|
|
|
271
167
|
transparent: true,
|
|
272
168
|
};
|
|
273
169
|
|
|
274
|
-
export const Intent: Story<IReqorePanelProps> = Template.bind({});
|
|
275
|
-
Intent.args = {
|
|
276
|
-
intent: 'success',
|
|
277
|
-
iconColor: 'success:lighten:2',
|
|
278
|
-
transparent: true,
|
|
279
|
-
flat: true,
|
|
280
|
-
};
|
|
281
|
-
|
|
282
170
|
export const Minimal: Story<IReqorePanelProps> = Template.bind({});
|
|
283
171
|
Minimal.args = {
|
|
284
172
|
minimal: true,
|
|
285
173
|
flat: true,
|
|
286
174
|
};
|
|
287
175
|
|
|
288
|
-
export const TransparentFlat: Story<IReqorePanelProps> = Template.bind({});
|
|
289
|
-
TransparentFlat.args = {
|
|
290
|
-
transparent: true,
|
|
291
|
-
flat: true,
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
export const Fluid: Story<IReqorePanelProps> = Template.bind({});
|
|
295
|
-
Fluid.args = {
|
|
296
|
-
fluid: true,
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
export const Size: Story<IReqorePanelProps> = Template.bind({});
|
|
300
|
-
Size.args = {
|
|
301
|
-
size: 'small',
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export const ContentSize: Story<IReqorePanelProps> = Template.bind({});
|
|
305
|
-
ContentSize.args = {
|
|
306
|
-
contentSize: 'big',
|
|
307
|
-
};
|
|
308
|
-
|
|
309
176
|
export const WithEffect: Story<IReqorePanelProps> = Template.bind({});
|
|
310
177
|
WithEffect.args = {
|
|
311
|
-
iconColor: 'info:lighten:2',
|
|
312
178
|
minimal: true,
|
|
313
179
|
contentEffect: {
|
|
314
180
|
gradient: {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
ReqoreMessage,
|
|
9
9
|
ReqorePanel,
|
|
10
10
|
ReqorePopover,
|
|
11
|
-
ReqoreSpacer
|
|
11
|
+
ReqoreSpacer,
|
|
12
12
|
} from '../../index';
|
|
13
|
-
import {
|
|
13
|
+
import { FlatArg, argManager } from '../utils/args';
|
|
14
14
|
|
|
15
15
|
const { createArg } = argManager<IReqorePopoverProps>();
|
|
16
16
|
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
|
|
57
57
|
const HoverButton = (args: any) => {
|
|
58
58
|
return (
|
|
59
|
-
<ReqorePopover component={ReqoreButton} isReqoreComponent {...args}
|
|
59
|
+
<ReqorePopover component={ReqoreButton} isReqoreComponent {...args}>
|
|
60
60
|
Hover popover
|
|
61
61
|
</ReqorePopover>
|
|
62
62
|
);
|
|
@@ -106,105 +106,100 @@ const HoverStayButton = (args: any) => {
|
|
|
106
106
|
|
|
107
107
|
const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
108
108
|
return (
|
|
109
|
-
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
<ReqoreControlGroup vertical gapSize='huge'>
|
|
110
|
+
<HoverButton {...args} />
|
|
111
|
+
<ClickButton {...args} />
|
|
112
|
+
<DelayButton {...args} />
|
|
113
|
+
<HoverStayButton {...args} />
|
|
114
|
+
{typeof args.content === 'string' && (
|
|
115
|
+
<>
|
|
116
|
+
<ReqoreSpacer height={100} />
|
|
117
|
+
<ReqorePopover
|
|
118
|
+
{...args}
|
|
119
|
+
component={ReqoreButton}
|
|
120
|
+
isReqoreComponent
|
|
121
|
+
openOnMount
|
|
122
|
+
title='I opened on my own'
|
|
123
|
+
icon='CactusFill'
|
|
124
|
+
intent='success'
|
|
125
|
+
placement='top'
|
|
126
|
+
>
|
|
127
|
+
Full popover
|
|
128
|
+
</ReqorePopover>
|
|
129
|
+
<ReqoreControlGroup>
|
|
130
|
+
<ReqoreSpacer width={350} />
|
|
118
131
|
<ReqorePopover
|
|
119
132
|
{...args}
|
|
120
133
|
component={ReqoreButton}
|
|
121
134
|
isReqoreComponent
|
|
122
135
|
openOnMount
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
placement='top'
|
|
136
|
+
intent='info'
|
|
137
|
+
minimal
|
|
138
|
+
placement='left'
|
|
127
139
|
>
|
|
128
|
-
|
|
140
|
+
Minimal popover
|
|
129
141
|
</ReqorePopover>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</ReqorePopover>
|
|
143
|
-
</ReqoreControlGroup>
|
|
144
|
-
<ReqorePopover
|
|
145
|
-
{...args}
|
|
146
|
-
component={ReqoreButton}
|
|
147
|
-
isReqoreComponent
|
|
148
|
-
openOnMount
|
|
149
|
-
icon='CactusFill'
|
|
150
|
-
effect={{
|
|
151
|
-
gradient: {
|
|
152
|
-
colors: {
|
|
153
|
-
0: 'warning',
|
|
154
|
-
100: 'warning:darken:2',
|
|
155
|
-
},
|
|
142
|
+
</ReqoreControlGroup>
|
|
143
|
+
<ReqorePopover
|
|
144
|
+
{...args}
|
|
145
|
+
component={ReqoreButton}
|
|
146
|
+
isReqoreComponent
|
|
147
|
+
openOnMount
|
|
148
|
+
icon='CactusFill'
|
|
149
|
+
effect={{
|
|
150
|
+
gradient: {
|
|
151
|
+
colors: {
|
|
152
|
+
0: 'warning',
|
|
153
|
+
100: 'warning:darken:2',
|
|
156
154
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
{...args}
|
|
167
|
-
component={ReqoreButton}
|
|
168
|
-
isReqoreComponent
|
|
169
|
-
openOnMount
|
|
170
|
-
transparent
|
|
171
|
-
placement='right'
|
|
172
|
-
>
|
|
173
|
-
Transparent popover
|
|
174
|
-
</ReqorePopover>
|
|
175
|
-
</>
|
|
176
|
-
)}
|
|
177
|
-
<ReqorePopover
|
|
178
|
-
{...args}
|
|
179
|
-
component={ReqoreButton}
|
|
180
|
-
isReqoreComponent
|
|
181
|
-
openOnMount
|
|
182
|
-
placement='right'
|
|
183
|
-
>
|
|
184
|
-
Auto open popover
|
|
185
|
-
</ReqorePopover>
|
|
186
|
-
<ReqorePanel label='This is a test' flat>
|
|
155
|
+
},
|
|
156
|
+
spaced: 2,
|
|
157
|
+
uppercase: true,
|
|
158
|
+
weight: 'thick',
|
|
159
|
+
}}
|
|
160
|
+
placement='right'
|
|
161
|
+
>
|
|
162
|
+
Effect popover
|
|
163
|
+
</ReqorePopover>
|
|
187
164
|
<ReqorePopover
|
|
188
165
|
{...args}
|
|
189
166
|
component={ReqoreButton}
|
|
190
167
|
isReqoreComponent
|
|
191
168
|
openOnMount
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
content={
|
|
195
|
-
<ReqorePanel label='This is a test' flat>
|
|
196
|
-
<ReqoreMessage flat>
|
|
197
|
-
In to am attended desirous raptures declared diverted confined at. Collected
|
|
198
|
-
instantly remaining up certainly to necessary as. Over walk dull into
|
|
199
|
-
</ReqoreMessage>
|
|
200
|
-
</ReqorePanel>
|
|
201
|
-
}
|
|
169
|
+
transparent
|
|
170
|
+
placement='right'
|
|
202
171
|
>
|
|
203
|
-
|
|
172
|
+
Transparent popover
|
|
204
173
|
</ReqorePopover>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
174
|
+
</>
|
|
175
|
+
)}
|
|
176
|
+
<ReqorePopover
|
|
177
|
+
{...args}
|
|
178
|
+
component={ReqoreButton}
|
|
179
|
+
isReqoreComponent
|
|
180
|
+
openOnMount
|
|
181
|
+
placement='right'
|
|
182
|
+
>
|
|
183
|
+
Auto open popover
|
|
184
|
+
</ReqorePopover>
|
|
185
|
+
<ReqorePopover
|
|
186
|
+
{...args}
|
|
187
|
+
component={ReqoreButton}
|
|
188
|
+
isReqoreComponent
|
|
189
|
+
openOnMount
|
|
190
|
+
placement='bottom'
|
|
191
|
+
content={
|
|
192
|
+
<ReqorePanel label='This is a test' flat>
|
|
193
|
+
<ReqoreMessage flat>
|
|
194
|
+
In to am attended desirous raptures declared diverted confined at. Collected instantly
|
|
195
|
+
remaining up certainly to necessary as. Over walk dull into
|
|
196
|
+
</ReqoreMessage>
|
|
197
|
+
</ReqorePanel>
|
|
198
|
+
}
|
|
199
|
+
>
|
|
200
|
+
With Custom Content
|
|
201
|
+
</ReqorePopover>
|
|
202
|
+
</ReqoreControlGroup>
|
|
208
203
|
);
|
|
209
204
|
};
|
|
210
205
|
|
|
@@ -215,7 +210,6 @@ NotFlat.args = {
|
|
|
215
210
|
};
|
|
216
211
|
export const CustomContent = Template.bind({});
|
|
217
212
|
CustomContent.args = {
|
|
218
|
-
noWrapper: true,
|
|
219
213
|
content: (
|
|
220
214
|
<ReqorePanel label='This is a test' flat>
|
|
221
215
|
<ReqoreMessage flat>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { IReqoreTabsProps } from '../../components/Tabs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { IntentArg, SizeArg, argManager } from '../utils/args';
|
|
3
|
+
import { ReqoreTabs, ReqoreTabsContent } from '../../index';
|
|
4
|
+
import { argManager, IntentArg, SizeArg } from '../utils/args';
|
|
6
5
|
|
|
7
6
|
const tabs = [
|
|
8
7
|
{
|
|
@@ -31,7 +30,6 @@ const tabs = [
|
|
|
31
30
|
id: 3,
|
|
32
31
|
icon: 'FileSettingsLine',
|
|
33
32
|
tooltip: 'Click to go to page 3!',
|
|
34
|
-
iconColor: 'info:lighten:3',
|
|
35
33
|
},
|
|
36
34
|
{
|
|
37
35
|
id: 'tab4',
|
|
@@ -100,7 +98,7 @@ const tabs = [
|
|
|
100
98
|
},
|
|
101
99
|
] as IReqoreTabsProps['tabs'];
|
|
102
100
|
|
|
103
|
-
const { createArg } = argManager<IReqoreTabsProps
|
|
101
|
+
const { createArg } = argManager<IReqoreTabsProps>();
|
|
104
102
|
|
|
105
103
|
export default {
|
|
106
104
|
title: 'Components/Tabs',
|
|
@@ -138,25 +136,25 @@ export default {
|
|
|
138
136
|
description: 'If the tabs should be vertical',
|
|
139
137
|
}),
|
|
140
138
|
},
|
|
141
|
-
} as Meta<IReqoreTabsProps
|
|
139
|
+
} as Meta<IReqoreTabsProps>;
|
|
142
140
|
|
|
143
|
-
const Template: Story<IReqoreTabsProps
|
|
141
|
+
const Template: Story<IReqoreTabsProps> = (args) => {
|
|
144
142
|
return (
|
|
145
143
|
<ReqoreTabs {...args} tabs={tabs}>
|
|
146
144
|
<ReqoreTabsContent tabId='tab1'>
|
|
147
|
-
<
|
|
145
|
+
<h3>Tab 1</h3>
|
|
148
146
|
</ReqoreTabsContent>
|
|
149
147
|
<ReqoreTabsContent tabId='tab2'>
|
|
150
|
-
<
|
|
148
|
+
<h3>Tab 2</h3>
|
|
151
149
|
</ReqoreTabsContent>
|
|
152
|
-
<ReqoreTabsContent tabId={3}
|
|
153
|
-
<
|
|
150
|
+
<ReqoreTabsContent tabId={3}>
|
|
151
|
+
<h3>Tab 3</h3>
|
|
154
152
|
</ReqoreTabsContent>
|
|
155
153
|
<ReqoreTabsContent tabId='tab4'>
|
|
156
|
-
<
|
|
154
|
+
<h3>Tab 4</h3>
|
|
157
155
|
</ReqoreTabsContent>
|
|
158
156
|
<ReqoreTabsContent tabId='tab5'>
|
|
159
|
-
<
|
|
157
|
+
<h3>Tab 5</h3>
|
|
160
158
|
</ReqoreTabsContent>
|
|
161
159
|
<ReqoreTabsContent tabId='tab6'>
|
|
162
160
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vitae nisi ligula. Proin
|
|
@@ -217,13 +215,13 @@ const Template: Story<IReqoreTabsProps & { tabPadding: TReqoreTabsContentPadding
|
|
|
217
215
|
Praesent vitae bibendum mauris, eu blandit dui.
|
|
218
216
|
</ReqoreTabsContent>
|
|
219
217
|
<ReqoreTabsContent tabId='tab7'>
|
|
220
|
-
<
|
|
218
|
+
<h3>Tab 7</h3>
|
|
221
219
|
</ReqoreTabsContent>
|
|
222
220
|
<ReqoreTabsContent tabId='tab8'>
|
|
223
|
-
<
|
|
221
|
+
<h3>Tab 8</h3>
|
|
224
222
|
</ReqoreTabsContent>
|
|
225
223
|
<ReqoreTabsContent tabId='tab9'>
|
|
226
|
-
<
|
|
224
|
+
<h3>Tab 9</h3>
|
|
227
225
|
</ReqoreTabsContent>
|
|
228
226
|
</ReqoreTabs>
|
|
229
227
|
);
|
|
@@ -245,23 +243,12 @@ NotFlat.args = {
|
|
|
245
243
|
flat: false,
|
|
246
244
|
};
|
|
247
245
|
|
|
248
|
-
export const NoTabsPadding = Template.bind({});
|
|
249
|
-
NoTabsPadding.args = {
|
|
250
|
-
padded: false,
|
|
251
|
-
};
|
|
252
|
-
|
|
253
246
|
export const Vertical = Template.bind({});
|
|
254
247
|
Vertical.args = {
|
|
255
248
|
vertical: true,
|
|
256
249
|
fillParent: true,
|
|
257
250
|
};
|
|
258
251
|
|
|
259
|
-
export const VerticalNoTabsPadding = Template.bind({});
|
|
260
|
-
VerticalNoTabsPadding.args = {
|
|
261
|
-
padded: false,
|
|
262
|
-
vertical: true,
|
|
263
|
-
};
|
|
264
|
-
|
|
265
252
|
export const VerticalWithWrapping = Template.bind({});
|
|
266
253
|
VerticalWithWrapping.args = {
|
|
267
254
|
vertical: true,
|
|
@@ -272,11 +259,7 @@ VerticalWithWrapping.args = {
|
|
|
272
259
|
export const VerticalCustomWidth = Template.bind({});
|
|
273
260
|
VerticalCustomWidth.args = {
|
|
274
261
|
vertical: true,
|
|
262
|
+
fill: true,
|
|
275
263
|
fillParent: true,
|
|
276
264
|
width: '300px',
|
|
277
265
|
};
|
|
278
|
-
|
|
279
|
-
export const CustomTabsPadding = Template.bind({});
|
|
280
|
-
CustomTabsPadding.args = {
|
|
281
|
-
tabsPadding: 'none',
|
|
282
|
-
};
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
|
|
59
59
|
const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }) => {
|
|
60
60
|
return (
|
|
61
|
-
<ReqoreTagGroup columns={columns} size={args.size} gapSize={args.gapSize}
|
|
61
|
+
<ReqoreTagGroup columns={columns} size={args.size} gapSize={args.gapSize}>
|
|
62
62
|
<ReqoreTag {...args} actions={null} onRemoveClick={null} rightIcon={null} label={1} />
|
|
63
63
|
<ReqoreTag
|
|
64
64
|
{...args}
|
|
@@ -77,15 +77,9 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
77
77
|
label={2}
|
|
78
78
|
/>
|
|
79
79
|
<ReqoreTag label='With Icon' icon='AlarmWarningLine' {...args} />
|
|
80
|
-
<ReqoreTag
|
|
81
|
-
label='With Icon Colors'
|
|
82
|
-
icon='AlarmWarningLine'
|
|
83
|
-
{...args}
|
|
84
|
-
iconColor='warning:lighten:2'
|
|
85
|
-
/>
|
|
86
80
|
<ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' {...args} />
|
|
87
81
|
<ReqoreTag labelKey='Key' label='value' {...args} />
|
|
88
|
-
<ReqoreTag icon='QuestionAnswerLine' {...args}
|
|
82
|
+
<ReqoreTag icon='QuestionAnswerLine' {...args} />
|
|
89
83
|
<ReqoreTag label='Disabled Tag' disabled icon='AlarmWarningLine' {...args} />
|
|
90
84
|
<ReqoreTag
|
|
91
85
|
label='300px Tag'
|
|
@@ -94,17 +88,6 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
94
88
|
{...args}
|
|
95
89
|
tooltip='I am wiiiiiiide'
|
|
96
90
|
actions={[
|
|
97
|
-
{
|
|
98
|
-
icon: 'ErrorWarningLine',
|
|
99
|
-
onClick: noop,
|
|
100
|
-
intent: 'info',
|
|
101
|
-
tooltip: {
|
|
102
|
-
content: 'IF YOU CAN SEE ME ITS A BUG!!! I HAVE show: false',
|
|
103
|
-
openOnMount: true,
|
|
104
|
-
intent: 'danger',
|
|
105
|
-
},
|
|
106
|
-
show: false,
|
|
107
|
-
},
|
|
108
91
|
{
|
|
109
92
|
icon: '24HoursFill',
|
|
110
93
|
onClick: noop,
|
|
@@ -116,6 +99,7 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
116
99
|
icon: 'SpyFill',
|
|
117
100
|
onClick: noop,
|
|
118
101
|
intent: 'success',
|
|
102
|
+
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
119
103
|
},
|
|
120
104
|
]}
|
|
121
105
|
/>
|
|
@@ -185,8 +169,6 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
185
169
|
label='Wrapped tag with some long text and NO width specified, AND wrap specified'
|
|
186
170
|
icon='ShareForward2Fill'
|
|
187
171
|
rightIcon={args.rightIcon}
|
|
188
|
-
leftIconColor='#00fafd'
|
|
189
|
-
rightIconColor='#eb0e8c'
|
|
190
172
|
wrap
|
|
191
173
|
onRemoveClick={null}
|
|
192
174
|
actions={[
|
|
@@ -214,8 +196,6 @@ export const BigGapSize = Template.bind({});
|
|
|
214
196
|
BigGapSize.args = { gapSize: 'big' };
|
|
215
197
|
export const Badge = Template.bind({});
|
|
216
198
|
Badge.args = { asBadge: true };
|
|
217
|
-
export const NoWrap = Template.bind({});
|
|
218
|
-
NoWrap.args = { wrap: false };
|
|
219
199
|
|
|
220
200
|
export const Effect = Template.bind({});
|
|
221
201
|
Effect.args = {
|
|
@@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/react/types-6-0';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { IReqoreTextareaProps } from '../../components/Textarea';
|
|
4
4
|
import { ReqoreControlGroup, ReqoreTextarea } from '../../index';
|
|
5
|
-
import { DisabledArg, MinimalArg, SizeArg
|
|
5
|
+
import { argManager, DisabledArg, MinimalArg, SizeArg } from '../utils/args';
|
|
6
6
|
|
|
7
7
|
const { createArg } = argManager<IReqoreTextareaProps>();
|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
name: 'Fluid',
|
|
23
23
|
description: 'Fluid',
|
|
24
24
|
control: 'boolean',
|
|
25
|
-
defaultValue:
|
|
25
|
+
defaultValue: false,
|
|
26
26
|
}),
|
|
27
27
|
...createArg('placeholder', {
|
|
28
28
|
name: 'Placeholder',
|
|
@@ -55,7 +55,7 @@ const Template: Story<IReqoreTextareaProps> = (args) => {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<>
|
|
58
|
-
<ReqoreControlGroup
|
|
58
|
+
<ReqoreControlGroup fluid>
|
|
59
59
|
<ReqoreTextarea
|
|
60
60
|
{...args}
|
|
61
61
|
onChange={handleValueChange}
|
package/src/styles.ts
CHANGED