@qoretechnologies/reqore 0.30.6 → 0.30.7
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/LICENSE +1 -1
- package/README.md +2 -44
- package/__tests__/collection.test.tsx +1 -1
- package/__tests__/{control_group.text.tsx → control_group.test.tsx} +4 -2
- package/__tests__/modal.test.tsx +74 -2
- package/__tests__/panel.test.tsx +96 -24
- package/__tests__/popover.test.tsx +24 -2
- package/__tests__/tabs.test.tsx +75 -0
- package/dist/components/Button/index.d.ts +7 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +30 -20
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +6 -3
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +7 -2
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +57 -53
- 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 +15 -4
- 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 +21 -4
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +250 -55
- 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 +27 -16
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +1 -0
- 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 +10 -10
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +7 -6
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +5 -6
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +14 -7
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +10 -4
- 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 +12 -10
- 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 +2 -0
- 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 +13 -6
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +78 -44
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -2
- 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 +2 -0
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spacer/index.js +29 -7
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Table/header.js +2 -2
- package/dist/components/Table/header.js.map +1 -1
- package/dist/components/Table/headerCell.js +2 -2
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/components/Table/helpers.d.ts +3 -2
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +6 -3
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +4 -3
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +0 -5
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +3 -7
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Tabs/content.d.ts +3 -1
- package/dist/components/Tabs/content.d.ts.map +1 -1
- package/dist/components/Tabs/content.js +8 -3
- package/dist/components/Tabs/content.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +4 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +12 -4
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts +1 -0
- 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 +7 -6
- 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 +7 -8
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.d.ts +6 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +24 -12
- 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 +10 -8
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +4 -2
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +7 -0
- package/dist/containers/UIProvider.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/colors.js.map +1 -1
- package/dist/helpers/utils.d.ts +3 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +17 -2
- 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 +1 -0
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +8 -6
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/styles.d.ts +1 -0
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +6 -5
- package/dist/styles.js.map +1 -1
- package/dist/types/global.d.ts +27 -1
- 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/src/components/Button/index.tsx +79 -34
- package/src/components/Checkbox/index.tsx +3 -2
- package/src/components/Collection/index.tsx +93 -60
- package/src/components/Collection/item.tsx +29 -9
- package/src/components/Columns/column.tsx +1 -0
- package/src/components/ControlGroup/index.tsx +449 -104
- package/src/components/Drawer/index.tsx +28 -27
- package/src/components/Dropdown/index.tsx +3 -1
- package/src/components/Effect/index.tsx +22 -14
- package/src/components/Icon/index.tsx +81 -62
- package/src/components/Input/index.tsx +8 -3
- package/src/components/InternalPopover/index.tsx +131 -126
- package/src/components/Menu/index.tsx +7 -1
- package/src/components/Message/index.tsx +9 -1
- package/src/components/MultiSelect/index.tsx +180 -188
- package/src/components/Panel/index.tsx +227 -100
- package/src/components/Popover/index.tsx +1 -3
- package/src/components/Spacer/index.tsx +63 -14
- package/src/components/Table/header.tsx +2 -2
- package/src/components/Table/headerCell.tsx +2 -2
- package/src/components/Table/helpers.ts +12 -6
- package/src/components/Table/index.tsx +1 -0
- package/src/components/Table/row.tsx +2 -7
- package/src/components/Tabs/content.tsx +11 -3
- package/src/components/Tabs/index.tsx +14 -3
- package/src/components/Tabs/item.tsx +28 -5
- package/src/components/Tabs/list.tsx +7 -3
- package/src/components/Tag/group.tsx +6 -12
- package/src/components/Tag/index.tsx +69 -35
- 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 +11 -8
- package/src/containers/ReqoreProvider.tsx +40 -35
- package/src/containers/UIProvider.tsx +7 -0
- package/src/context/ReqoreContext.tsx +2 -0
- package/src/helpers/colors.ts +8 -2
- package/src/helpers/utils.ts +18 -0
- package/src/hooks/useLatestZIndex.ts +2 -2
- package/src/hooks/usePopover.tsx +9 -6
- package/src/mock/collectionData.tsx +33 -2
- package/src/stories/Button/Button.stories.tsx +72 -7
- package/src/stories/Checkbox/Checkbox.stories.tsx +6 -3
- package/src/stories/Collection/Collection.stories.tsx +18 -2
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +282 -33
- package/src/stories/Drawer/Drawer.stories.tsx +70 -3
- package/src/stories/Dropdown/Dropdown.stories.tsx +13 -3
- package/src/stories/Icon/Icon.stories.tsx +1 -0
- package/src/stories/Input/Input.stories.tsx +5 -3
- package/src/stories/Menu/Menu.stories.tsx +2 -0
- package/src/stories/Message/Message.stories.tsx +7 -0
- package/src/stories/Panel/Panel.stories.tsx +147 -13
- package/src/stories/Popover/Popover.stories.tsx +88 -82
- package/src/stories/Tabs/Tabs.stories.tsx +33 -15
- package/src/stories/Tag/Tag.stories.tsx +23 -3
- package/src/stories/TextArea/TextArea.stories.tsx +3 -3
- package/src/styles.ts +6 -0
- package/src/types/global.ts +28 -0
- package/tests.json +1 -1
- package/CODE_OF_CONDUCT.md +0 -105
- package/CONTRIBUTING.MD +0 -78
- package/SECURITY.md +0 -5
- 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
|
@@ -159,11 +159,21 @@ const Template: Story<IReqoreDropdownProps> = (args: IReqoreDropdownProps) => {
|
|
|
159
159
|
|
|
160
160
|
return (
|
|
161
161
|
<>
|
|
162
|
-
<ReqoreControlGroup>
|
|
162
|
+
<ReqoreControlGroup wrap>
|
|
163
163
|
<ReqoreDropdown label='Default Dropdown' {...args} />
|
|
164
164
|
<ReqoreDropdown label='Disabled if empty' {...args} items={[]} />
|
|
165
|
-
<ReqoreDropdown
|
|
166
|
-
|
|
165
|
+
<ReqoreDropdown
|
|
166
|
+
icon='SunCloudyLine'
|
|
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
|
+
>
|
|
167
177
|
Custom icon with caret on right
|
|
168
178
|
</ReqoreDropdown>
|
|
169
179
|
<ReqoreDropdown
|
|
@@ -2,13 +2,14 @@ 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 } from '../utils/args';
|
|
5
|
+
import { FlatArg, IconArg, MinimalArg, SizeArg } 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,
|
|
12
13
|
...IconArg('icon', 'Icon', 'SearchLine'),
|
|
13
14
|
},
|
|
14
15
|
} as Meta<IReqoreInputProps>;
|
|
@@ -26,7 +27,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
26
27
|
|
|
27
28
|
return (
|
|
28
29
|
<>
|
|
29
|
-
<ReqoreControlGroup>
|
|
30
|
+
<ReqoreControlGroup wrap>
|
|
30
31
|
<ReqoreInput {...args} placeholder='Reqore Input' onChange={handleValueChange} />
|
|
31
32
|
<ReqoreInput {...args} placeholder='Minimal Input' minimal onChange={handleValueChange} />
|
|
32
33
|
<ReqoreInput
|
|
@@ -38,6 +39,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
38
39
|
/>
|
|
39
40
|
<ReqoreInput
|
|
40
41
|
{...args}
|
|
42
|
+
iconColor='pending:lighten:2'
|
|
41
43
|
placeholder='Clearable Input'
|
|
42
44
|
onClearClick={handleValueClear}
|
|
43
45
|
onChange={handleValueChange}
|
|
@@ -51,7 +53,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
51
53
|
/>
|
|
52
54
|
</ReqoreControlGroup>
|
|
53
55
|
<br />
|
|
54
|
-
<ReqoreControlGroup>
|
|
56
|
+
<ReqoreControlGroup wrap>
|
|
55
57
|
<ReqoreInput
|
|
56
58
|
{...args}
|
|
57
59
|
placeholder='Reqore Input'
|
|
@@ -118,6 +118,7 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
118
118
|
{
|
|
119
119
|
icon: 'EmotionUnhappyLine',
|
|
120
120
|
rightIcon: 'Scissors2Fill',
|
|
121
|
+
leftIconColor: 'danger:lighten',
|
|
121
122
|
wrap: args.wrapText,
|
|
122
123
|
flat: args.flat,
|
|
123
124
|
} as IReqoreMenuItemProps
|
|
@@ -148,6 +149,7 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
148
149
|
</ReqoreMenu>
|
|
149
150
|
}
|
|
150
151
|
isReqoreComponent
|
|
152
|
+
noWrapper
|
|
151
153
|
handler='click'
|
|
152
154
|
placement='right'
|
|
153
155
|
>
|
|
@@ -52,6 +52,13 @@ 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
|
+
|
|
55
62
|
export const Opaque: Story<IReqoreMessageProps> = Template.bind({});
|
|
56
63
|
Opaque.args = {
|
|
57
64
|
opaque: true,
|
|
@@ -1,8 +1,9 @@
|
|
|
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 { IReqorePanelProps, ReqorePanel } from '../../components/Panel';
|
|
5
|
-
import {
|
|
4
|
+
import { IReqorePanelAction, IReqorePanelProps, ReqorePanel } from '../../components/Panel';
|
|
5
|
+
import { ReqoreVerticalSpacer } from '../../components/Spacer';
|
|
6
|
+
import { FlatArg, IconArg, IntentArg, SizeArg, argManager } from '../utils/args';
|
|
6
7
|
|
|
7
8
|
const { createArg } = argManager<IReqorePanelProps>();
|
|
8
9
|
|
|
@@ -11,6 +12,7 @@ export default {
|
|
|
11
12
|
argTypes: {
|
|
12
13
|
...IntentArg,
|
|
13
14
|
...FlatArg,
|
|
15
|
+
...SizeArg,
|
|
14
16
|
...createArg('padded', {
|
|
15
17
|
type: 'boolean',
|
|
16
18
|
defaultValue: true,
|
|
@@ -48,8 +50,8 @@ export default {
|
|
|
48
50
|
description: 'The opacity of the panel',
|
|
49
51
|
}),
|
|
50
52
|
...createArg('headerSize', {
|
|
51
|
-
type: '
|
|
52
|
-
defaultValue:
|
|
53
|
+
type: 'string',
|
|
54
|
+
defaultValue: undefined,
|
|
53
55
|
name: 'Header Size',
|
|
54
56
|
description: 'The size of the header',
|
|
55
57
|
}),
|
|
@@ -64,9 +66,64 @@ export default {
|
|
|
64
66
|
} as Meta<IReqorePanelProps>;
|
|
65
67
|
|
|
66
68
|
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
|
+
|
|
67
125
|
return (
|
|
68
126
|
<ReqorePanel
|
|
69
|
-
{...args}
|
|
70
127
|
badge={[
|
|
71
128
|
10,
|
|
72
129
|
0,
|
|
@@ -85,11 +142,26 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
85
142
|
},
|
|
86
143
|
]}
|
|
87
144
|
actions={[
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
145
|
+
{
|
|
146
|
+
responsive: false,
|
|
147
|
+
group: [
|
|
148
|
+
{
|
|
149
|
+
label: 'Non responsive',
|
|
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
|
+
},
|
|
93
165
|
{
|
|
94
166
|
as: ReqoreInput,
|
|
95
167
|
props: {
|
|
@@ -108,7 +180,14 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
108
180
|
},
|
|
109
181
|
]}
|
|
110
182
|
bottomActions={[
|
|
111
|
-
{
|
|
183
|
+
{
|
|
184
|
+
position: 'left',
|
|
185
|
+
intent: 'success',
|
|
186
|
+
group: [
|
|
187
|
+
{ label: 'Test 1', icon: '24HoursFill' },
|
|
188
|
+
{ label: 'Test 2', icon: '24HoursFill' },
|
|
189
|
+
],
|
|
190
|
+
},
|
|
112
191
|
{
|
|
113
192
|
label: 'More actions',
|
|
114
193
|
position: 'right',
|
|
@@ -118,6 +197,7 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
118
197
|
],
|
|
119
198
|
},
|
|
120
199
|
]}
|
|
200
|
+
{...args}
|
|
121
201
|
>
|
|
122
202
|
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
123
203
|
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
@@ -157,9 +237,33 @@ export const Flat = Template.bind({});
|
|
|
157
237
|
Flat.args = {
|
|
158
238
|
flat: true,
|
|
159
239
|
};
|
|
160
|
-
export const
|
|
161
|
-
|
|
240
|
+
export const NoBars: Story<IReqorePanelProps> = Template.bind({});
|
|
241
|
+
NoBars.args = {
|
|
162
242
|
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,
|
|
163
267
|
};
|
|
164
268
|
|
|
165
269
|
export const Transparent: Story<IReqorePanelProps> = Template.bind({});
|
|
@@ -167,14 +271,44 @@ Transparent.args = {
|
|
|
167
271
|
transparent: true,
|
|
168
272
|
};
|
|
169
273
|
|
|
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
|
+
|
|
170
282
|
export const Minimal: Story<IReqorePanelProps> = Template.bind({});
|
|
171
283
|
Minimal.args = {
|
|
172
284
|
minimal: true,
|
|
173
285
|
flat: true,
|
|
174
286
|
};
|
|
175
287
|
|
|
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
|
+
|
|
176
309
|
export const WithEffect: Story<IReqorePanelProps> = Template.bind({});
|
|
177
310
|
WithEffect.args = {
|
|
311
|
+
iconColor: 'info:lighten:2',
|
|
178
312
|
minimal: true,
|
|
179
313
|
contentEffect: {
|
|
180
314
|
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 { argManager, FlatArg } 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} fixed>
|
|
60
60
|
Hover popover
|
|
61
61
|
</ReqorePopover>
|
|
62
62
|
);
|
|
@@ -106,100 +106,105 @@ 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
|
-
|
|
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} />
|
|
109
|
+
<>
|
|
110
|
+
<ReqoreControlGroup vertical gapSize='huge' horizontalAlign='flex-start'>
|
|
111
|
+
<HoverButton {...args} />
|
|
112
|
+
<ClickButton {...args} />
|
|
113
|
+
<DelayButton {...args} />
|
|
114
|
+
<HoverStayButton {...args} />
|
|
115
|
+
{typeof args.content === 'string' && (
|
|
116
|
+
<>
|
|
117
|
+
<ReqoreSpacer height={100} />
|
|
131
118
|
<ReqorePopover
|
|
132
119
|
{...args}
|
|
133
120
|
component={ReqoreButton}
|
|
134
121
|
isReqoreComponent
|
|
135
122
|
openOnMount
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
123
|
+
title='I opened on my own'
|
|
124
|
+
icon='CactusFill'
|
|
125
|
+
intent='success'
|
|
126
|
+
placement='top'
|
|
139
127
|
>
|
|
140
|
-
|
|
128
|
+
Full popover
|
|
141
129
|
</ReqorePopover>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
130
|
+
<ReqoreControlGroup>
|
|
131
|
+
<ReqoreSpacer width={190} />
|
|
132
|
+
<ReqorePopover
|
|
133
|
+
{...args}
|
|
134
|
+
component={ReqoreButton}
|
|
135
|
+
isReqoreComponent
|
|
136
|
+
openOnMount
|
|
137
|
+
intent='info'
|
|
138
|
+
minimal
|
|
139
|
+
placement='left'
|
|
140
|
+
>
|
|
141
|
+
Minimal popover
|
|
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
|
+
},
|
|
154
156
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
spaced: 2,
|
|
158
|
+
uppercase: true,
|
|
159
|
+
weight: 'thick',
|
|
160
|
+
}}
|
|
161
|
+
placement='right'
|
|
162
|
+
>
|
|
163
|
+
Effect popover
|
|
164
|
+
</ReqorePopover>
|
|
165
|
+
<ReqorePopover
|
|
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>
|
|
164
187
|
<ReqorePopover
|
|
165
188
|
{...args}
|
|
166
189
|
component={ReqoreButton}
|
|
167
190
|
isReqoreComponent
|
|
168
191
|
openOnMount
|
|
169
|
-
|
|
170
|
-
|
|
192
|
+
placement='bottom'
|
|
193
|
+
title="I'm a title"
|
|
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
|
+
}
|
|
171
202
|
>
|
|
172
|
-
|
|
203
|
+
With Custom Content inside a panel
|
|
173
204
|
</ReqorePopover>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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>
|
|
205
|
+
</ReqorePanel>
|
|
206
|
+
</ReqoreControlGroup>
|
|
207
|
+
</>
|
|
203
208
|
);
|
|
204
209
|
};
|
|
205
210
|
|
|
@@ -210,6 +215,7 @@ NotFlat.args = {
|
|
|
210
215
|
};
|
|
211
216
|
export const CustomContent = Template.bind({});
|
|
212
217
|
CustomContent.args = {
|
|
218
|
+
noWrapper: true,
|
|
213
219
|
content: (
|
|
214
220
|
<ReqorePanel label='This is a test' flat>
|
|
215
221
|
<ReqoreMessage flat>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { IReqoreTabsProps } from '../../components/Tabs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { TReqoreTabsContentPadding } from '../../components/Tabs/content';
|
|
4
|
+
import { ReqoreH3, ReqoreTabs, ReqoreTabsContent } from '../../index';
|
|
5
|
+
import { IntentArg, SizeArg, argManager } from '../utils/args';
|
|
5
6
|
|
|
6
7
|
const tabs = [
|
|
7
8
|
{
|
|
@@ -30,6 +31,7 @@ const tabs = [
|
|
|
30
31
|
id: 3,
|
|
31
32
|
icon: 'FileSettingsLine',
|
|
32
33
|
tooltip: 'Click to go to page 3!',
|
|
34
|
+
iconColor: 'info:lighten:3',
|
|
33
35
|
},
|
|
34
36
|
{
|
|
35
37
|
id: 'tab4',
|
|
@@ -98,7 +100,7 @@ const tabs = [
|
|
|
98
100
|
},
|
|
99
101
|
] as IReqoreTabsProps['tabs'];
|
|
100
102
|
|
|
101
|
-
const { createArg } = argManager<IReqoreTabsProps>();
|
|
103
|
+
const { createArg } = argManager<IReqoreTabsProps & { tabPadding: TReqoreTabsContentPadding }>();
|
|
102
104
|
|
|
103
105
|
export default {
|
|
104
106
|
title: 'Components/Tabs',
|
|
@@ -136,25 +138,25 @@ export default {
|
|
|
136
138
|
description: 'If the tabs should be vertical',
|
|
137
139
|
}),
|
|
138
140
|
},
|
|
139
|
-
} as Meta<IReqoreTabsProps>;
|
|
141
|
+
} as Meta<IReqoreTabsProps & { tabPadding: TReqoreTabsContentPadding }>;
|
|
140
142
|
|
|
141
|
-
const Template: Story<IReqoreTabsProps> = (args) => {
|
|
143
|
+
const Template: Story<IReqoreTabsProps & { tabPadding: TReqoreTabsContentPadding }> = (args) => {
|
|
142
144
|
return (
|
|
143
145
|
<ReqoreTabs {...args} tabs={tabs}>
|
|
144
146
|
<ReqoreTabsContent tabId='tab1'>
|
|
145
|
-
<
|
|
147
|
+
<ReqoreH3>Tab 1</ReqoreH3>
|
|
146
148
|
</ReqoreTabsContent>
|
|
147
149
|
<ReqoreTabsContent tabId='tab2'>
|
|
148
|
-
<
|
|
150
|
+
<ReqoreH3>Tab 2</ReqoreH3>
|
|
149
151
|
</ReqoreTabsContent>
|
|
150
|
-
<ReqoreTabsContent tabId={3}>
|
|
151
|
-
<
|
|
152
|
+
<ReqoreTabsContent tabId={3} padded='vertical'>
|
|
153
|
+
<ReqoreH3>Tab 3</ReqoreH3>
|
|
152
154
|
</ReqoreTabsContent>
|
|
153
155
|
<ReqoreTabsContent tabId='tab4'>
|
|
154
|
-
<
|
|
156
|
+
<ReqoreH3>Tab 4</ReqoreH3>
|
|
155
157
|
</ReqoreTabsContent>
|
|
156
158
|
<ReqoreTabsContent tabId='tab5'>
|
|
157
|
-
<
|
|
159
|
+
<ReqoreH3>Tab 5</ReqoreH3>
|
|
158
160
|
</ReqoreTabsContent>
|
|
159
161
|
<ReqoreTabsContent tabId='tab6'>
|
|
160
162
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vitae nisi ligula. Proin
|
|
@@ -215,13 +217,13 @@ const Template: Story<IReqoreTabsProps> = (args) => {
|
|
|
215
217
|
Praesent vitae bibendum mauris, eu blandit dui.
|
|
216
218
|
</ReqoreTabsContent>
|
|
217
219
|
<ReqoreTabsContent tabId='tab7'>
|
|
218
|
-
<
|
|
220
|
+
<ReqoreH3>Tab 7</ReqoreH3>
|
|
219
221
|
</ReqoreTabsContent>
|
|
220
222
|
<ReqoreTabsContent tabId='tab8'>
|
|
221
|
-
<
|
|
223
|
+
<ReqoreH3>Tab 8</ReqoreH3>
|
|
222
224
|
</ReqoreTabsContent>
|
|
223
225
|
<ReqoreTabsContent tabId='tab9'>
|
|
224
|
-
<
|
|
226
|
+
<ReqoreH3>Tab 9</ReqoreH3>
|
|
225
227
|
</ReqoreTabsContent>
|
|
226
228
|
</ReqoreTabs>
|
|
227
229
|
);
|
|
@@ -236,6 +238,7 @@ Fill.args = {
|
|
|
236
238
|
export const CustomActiveIntent = Template.bind({});
|
|
237
239
|
CustomActiveIntent.args = {
|
|
238
240
|
activeTabIntent: 'warning',
|
|
241
|
+
activeTab: 'tab8',
|
|
239
242
|
};
|
|
240
243
|
|
|
241
244
|
export const NotFlat = Template.bind({});
|
|
@@ -243,12 +246,23 @@ NotFlat.args = {
|
|
|
243
246
|
flat: false,
|
|
244
247
|
};
|
|
245
248
|
|
|
249
|
+
export const NoTabsPadding = Template.bind({});
|
|
250
|
+
NoTabsPadding.args = {
|
|
251
|
+
padded: false,
|
|
252
|
+
};
|
|
253
|
+
|
|
246
254
|
export const Vertical = Template.bind({});
|
|
247
255
|
Vertical.args = {
|
|
248
256
|
vertical: true,
|
|
249
257
|
fillParent: true,
|
|
250
258
|
};
|
|
251
259
|
|
|
260
|
+
export const VerticalNoTabsPadding = Template.bind({});
|
|
261
|
+
VerticalNoTabsPadding.args = {
|
|
262
|
+
padded: false,
|
|
263
|
+
vertical: true,
|
|
264
|
+
};
|
|
265
|
+
|
|
252
266
|
export const VerticalWithWrapping = Template.bind({});
|
|
253
267
|
VerticalWithWrapping.args = {
|
|
254
268
|
vertical: true,
|
|
@@ -259,7 +273,11 @@ VerticalWithWrapping.args = {
|
|
|
259
273
|
export const VerticalCustomWidth = Template.bind({});
|
|
260
274
|
VerticalCustomWidth.args = {
|
|
261
275
|
vertical: true,
|
|
262
|
-
fill: true,
|
|
263
276
|
fillParent: true,
|
|
264
277
|
width: '300px',
|
|
265
278
|
};
|
|
279
|
+
|
|
280
|
+
export const CustomTabsPadding = Template.bind({});
|
|
281
|
+
CustomTabsPadding.args = {
|
|
282
|
+
tabsPadding: 'none',
|
|
283
|
+
};
|