@qoretechnologies/reqore 0.29.4 → 0.29.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/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +6 -3
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +4 -1
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +28 -3
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +1 -1
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +15 -3
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +146 -43
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +4 -1
- 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 +7 -4
- package/dist/components/Input/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/Panel/index.d.ts +2 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +2 -2
- package/dist/components/Panel/index.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 +1 -0
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/item.js +1 -1
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +1 -1
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/index.d.ts +3 -0
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +9 -9
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +0 -1
- package/dist/components/Textarea/index.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/package.json +1 -1
- package/src/components/Button/index.tsx +14 -2
- package/src/components/Collection/index.tsx +35 -4
- package/src/components/Collection/item.tsx +1 -1
- package/src/components/ControlGroup/index.tsx +252 -103
- package/src/components/Icon/index.tsx +6 -3
- package/src/components/Input/index.tsx +7 -3
- package/src/components/Message/index.tsx +9 -1
- package/src/components/Panel/index.tsx +3 -0
- package/src/components/Table/helpers.ts +12 -6
- package/src/components/Table/index.tsx +1 -0
- package/src/components/Tabs/item.tsx +4 -4
- package/src/components/Tabs/list.tsx +1 -0
- package/src/components/Tag/index.tsx +34 -11
- package/src/components/Textarea/index.tsx +0 -2
- package/src/mock/collectionData.tsx +3 -0
- package/src/stories/Button/Button.stories.tsx +14 -6
- package/src/stories/Checkbox/Checkbox.stories.tsx +4 -3
- package/src/stories/Collection/Collection.stories.tsx +16 -1
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +119 -35
- package/src/stories/Dropdown/Dropdown.stories.tsx +13 -3
- package/src/stories/Input/Input.stories.tsx +3 -2
- package/src/stories/Menu/Menu.stories.tsx +1 -0
- package/src/stories/Message/Message.stories.tsx +7 -0
- package/src/stories/Panel/Panel.stories.tsx +1 -0
- package/src/stories/Tabs/Tabs.stories.tsx +2 -1
- package/src/stories/Tag/Tag.stories.tsx +8 -0
- package/src/stories/TextArea/TextArea.stories.tsx +1 -1
- package/src/styles.ts +6 -0
- package/tests.json +1 -1
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
} from '../../helpers/colors';
|
|
22
22
|
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
23
23
|
import { useTooltip } from '../../hooks/useTooltip';
|
|
24
|
+
import { ActiveIconScale, InactiveIconScale } from '../../styles';
|
|
24
25
|
import {
|
|
25
26
|
IReqoreDisabled,
|
|
26
27
|
IReqoreIntent,
|
|
@@ -50,6 +51,9 @@ export interface IReqoreTagProps
|
|
|
50
51
|
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
51
52
|
icon?: IReqoreIconName;
|
|
52
53
|
rightIcon?: IReqoreIconName;
|
|
54
|
+
iconColor?: TReqoreEffectColor;
|
|
55
|
+
leftIconColor?: TReqoreEffectColor;
|
|
56
|
+
rightIconColor?: TReqoreEffectColor;
|
|
53
57
|
color?: TReqoreEffectColor;
|
|
54
58
|
actions?: IReqoreTagAction[];
|
|
55
59
|
width?: string;
|
|
@@ -81,6 +85,8 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
|
|
|
81
85
|
width: ${({ width }) => width || undefined};
|
|
82
86
|
transition: all 0.2s ease-out;
|
|
83
87
|
|
|
88
|
+
${InactiveIconScale};
|
|
89
|
+
|
|
84
90
|
${({ wrap, hasWidth }) =>
|
|
85
91
|
wrap || hasWidth
|
|
86
92
|
? css`
|
|
@@ -106,16 +112,24 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
|
|
|
106
112
|
`}
|
|
107
113
|
|
|
108
114
|
${({ theme, color, interactive, minimal, effect }) =>
|
|
109
|
-
interactive
|
|
115
|
+
interactive
|
|
110
116
|
? css`
|
|
111
117
|
cursor: pointer;
|
|
112
118
|
&:hover {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
.reqore-tag-content,
|
|
120
|
+
.reqore-tag-key-content {
|
|
121
|
+
${ActiveIconScale}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
${!effect?.gradient &&
|
|
125
|
+
css`
|
|
126
|
+
background-color: ${changeLightness(color || theme.main, color ? 0.05 : 0.15)};
|
|
127
|
+
color: ${minimal
|
|
128
|
+
? getReadableColor(theme, undefined, undefined, false, theme.originalMain)
|
|
129
|
+
: color
|
|
130
|
+
? getReadableColorFrom(color)
|
|
131
|
+
: getReadableColor(theme, undefined, undefined)};
|
|
132
|
+
`}
|
|
119
133
|
}
|
|
120
134
|
`
|
|
121
135
|
: undefined}
|
|
@@ -130,8 +144,6 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
|
|
|
130
144
|
`}
|
|
131
145
|
`;
|
|
132
146
|
|
|
133
|
-
const StyledTagRightIcon = styled(ReqoreIcon)``;
|
|
134
|
-
|
|
135
147
|
const StyledTagKeyWrapper = styled.span<{ size: TSizes }>`
|
|
136
148
|
display: flex;
|
|
137
149
|
align-items: center;
|
|
@@ -227,6 +239,9 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
227
239
|
minimal,
|
|
228
240
|
wrap = false,
|
|
229
241
|
width,
|
|
242
|
+
leftIconColor,
|
|
243
|
+
rightIconColor,
|
|
244
|
+
iconColor,
|
|
230
245
|
...rest
|
|
231
246
|
}: IReqoreTagProps,
|
|
232
247
|
ref
|
|
@@ -276,7 +291,14 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
276
291
|
hasWidth={!!width}
|
|
277
292
|
hasKey={!!labelKey}
|
|
278
293
|
>
|
|
279
|
-
{icon &&
|
|
294
|
+
{icon && (
|
|
295
|
+
<ReqoreIcon
|
|
296
|
+
icon={icon}
|
|
297
|
+
size={size}
|
|
298
|
+
margin={label ? 'left' : 'both'}
|
|
299
|
+
color={leftIconColor || iconColor}
|
|
300
|
+
/>
|
|
301
|
+
)}
|
|
280
302
|
{labelKey && (
|
|
281
303
|
<StyledTagContentKey wrap={wrap} hasWidth={!!width} size={size}>
|
|
282
304
|
{labelKey}
|
|
@@ -299,10 +321,11 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
299
321
|
</StyledTagContent>
|
|
300
322
|
) : null}
|
|
301
323
|
{rightIcon && (
|
|
302
|
-
<
|
|
324
|
+
<ReqoreIcon
|
|
303
325
|
icon={rightIcon}
|
|
304
326
|
size={size}
|
|
305
327
|
margin={label || icon ? 'right' : 'both'}
|
|
328
|
+
color={rightIconColor || iconColor}
|
|
306
329
|
/>
|
|
307
330
|
)}
|
|
308
331
|
</StyledTagContentWrapper>
|
|
@@ -143,8 +143,6 @@ const ReqoreInput = forwardRef<HTMLTextAreaElement, IReqoreTextareaProps>(
|
|
|
143
143
|
|
|
144
144
|
useTooltip(targetRef?.current, tooltip);
|
|
145
145
|
|
|
146
|
-
console.log(fluid);
|
|
147
|
-
|
|
148
146
|
return (
|
|
149
147
|
<StyledTextareaWrapper
|
|
150
148
|
className={`${className || ''} reqore-control-wrapper`}
|
|
@@ -32,6 +32,8 @@ export default [
|
|
|
32
32
|
tooltip: 'This is a test item',
|
|
33
33
|
headerSize: 2,
|
|
34
34
|
contentSize: 'huge',
|
|
35
|
+
selected: true,
|
|
36
|
+
icon: 'Hashtag',
|
|
35
37
|
content:
|
|
36
38
|
'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',
|
|
37
39
|
tags: [
|
|
@@ -89,6 +91,7 @@ export default [
|
|
|
89
91
|
{
|
|
90
92
|
label: 'Item with custom content when expanded',
|
|
91
93
|
tooltip: 'Expandable item with custom content',
|
|
94
|
+
selected: true,
|
|
92
95
|
content:
|
|
93
96
|
'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',
|
|
94
97
|
expandable: true,
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
21
21
|
return (
|
|
22
22
|
<>
|
|
23
|
-
<ReqoreControlGroup size={buttonProps.size}>
|
|
23
|
+
<ReqoreControlGroup size={buttonProps.size} wrap>
|
|
24
24
|
<ReqoreButton {...buttonProps} icon='BankFill' rightIcon={null} />
|
|
25
25
|
<ReqoreButton {...buttonProps} />
|
|
26
26
|
<ReqoreButton {...buttonProps}>Default</ReqoreButton>
|
|
@@ -41,14 +41,21 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
41
41
|
</ReqoreButton>
|
|
42
42
|
</ReqoreControlGroup>
|
|
43
43
|
<br />
|
|
44
|
-
<ReqoreControlGroup size={buttonProps.size}>
|
|
44
|
+
<ReqoreControlGroup size={buttonProps.size} wrap>
|
|
45
45
|
<ReqoreButton {...buttonProps} active flat={false} tooltip='hello'>
|
|
46
46
|
Active Not Flat
|
|
47
47
|
</ReqoreButton>
|
|
48
48
|
<ReqoreButton {...buttonProps} flat={false}>
|
|
49
49
|
Not Flat
|
|
50
50
|
</ReqoreButton>
|
|
51
|
-
<ReqoreButton
|
|
51
|
+
<ReqoreButton
|
|
52
|
+
{...buttonProps}
|
|
53
|
+
minimal
|
|
54
|
+
flat={false}
|
|
55
|
+
iconColor='#38fdb2'
|
|
56
|
+
leftIconColor='#33023c:lighten:3'
|
|
57
|
+
rightIconColor='#0a487b:lighten:3'
|
|
58
|
+
>
|
|
52
59
|
Minimal not flat
|
|
53
60
|
</ReqoreButton>
|
|
54
61
|
<ReqoreButton {...buttonProps} readOnly onClick={alert} flat={false}>
|
|
@@ -59,16 +66,17 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
59
66
|
</ReqoreButton>
|
|
60
67
|
</ReqoreControlGroup>
|
|
61
68
|
<br />
|
|
62
|
-
<ReqoreControlGroup fluid>
|
|
69
|
+
<ReqoreControlGroup fluid wrap>
|
|
63
70
|
<ReqoreButton {...buttonProps} fluid>
|
|
64
71
|
Fluid button
|
|
65
72
|
</ReqoreButton>
|
|
66
73
|
</ReqoreControlGroup>
|
|
67
74
|
<br />
|
|
68
|
-
<ReqoreControlGroup>
|
|
75
|
+
<ReqoreControlGroup wrap>
|
|
69
76
|
<ReqoreButton
|
|
70
77
|
{...buttonProps}
|
|
71
78
|
description='This is a very interesting description for a button, I like it very much'
|
|
79
|
+
iconColor='#38fdb2'
|
|
72
80
|
>
|
|
73
81
|
With Default Description
|
|
74
82
|
</ReqoreButton>
|
|
@@ -109,7 +117,7 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
109
117
|
/>
|
|
110
118
|
</ReqoreControlGroup>
|
|
111
119
|
<br />
|
|
112
|
-
<ReqoreControlGroup>
|
|
120
|
+
<ReqoreControlGroup wrap>
|
|
113
121
|
<ReqoreButton {...buttonProps} readOnly badge={10} onClick={alert}>
|
|
114
122
|
Read only with badge
|
|
115
123
|
</ReqoreButton>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
2
|
import Checkbox from '../../components/Checkbox';
|
|
3
|
-
import { ReqoreCheckbox, ReqoreControlGroup } from '../../index';
|
|
3
|
+
import { ReqoreCheckbox, ReqoreControlGroup, ReqoreVerticalSpacer } from '../../index';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Checkbox',
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
const Template: ComponentStory<typeof Checkbox> = (args) => {
|
|
11
11
|
return (
|
|
12
12
|
<ReqoreControlGroup vertical>
|
|
13
|
-
<ReqoreControlGroup>
|
|
13
|
+
<ReqoreControlGroup wrap>
|
|
14
14
|
<ReqoreCheckbox {...args} />
|
|
15
15
|
<ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelDetailPosition='left' />
|
|
16
16
|
<ReqoreCheckbox {...args} checked tooltip='I am checked' />
|
|
@@ -18,7 +18,8 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
|
|
|
18
18
|
<ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelPosition='left' />
|
|
19
19
|
<ReqoreCheckbox {...args} label='Read Only' labelPosition='left' readOnly />
|
|
20
20
|
</ReqoreControlGroup>
|
|
21
|
-
<
|
|
21
|
+
<ReqoreVerticalSpacer height={10} />
|
|
22
|
+
<ReqoreControlGroup wrap>
|
|
22
23
|
<ReqoreCheckbox {...args} intent='info' checked />
|
|
23
24
|
<ReqoreCheckbox
|
|
24
25
|
{...args}
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
description: 'If true, the collection will be rounded when stacked',
|
|
46
46
|
}),
|
|
47
47
|
...createArg('height', {
|
|
48
|
-
defaultValue:
|
|
48
|
+
defaultValue: undefined,
|
|
49
49
|
type: 'string',
|
|
50
50
|
name: 'Height',
|
|
51
51
|
description: 'Height of the collection',
|
|
@@ -73,6 +73,7 @@ const Template: Story<IReqoreCollectionProps> = (args) => {
|
|
|
73
73
|
<ReqoreCollection
|
|
74
74
|
{...args}
|
|
75
75
|
badge={10}
|
|
76
|
+
selectedIcon='CheckLine'
|
|
76
77
|
actions={[{ label: 'Custom action', icon: 'Home7Line' }, { actions: [{ value: 'Test' }] }]}
|
|
77
78
|
/>
|
|
78
79
|
);
|
|
@@ -84,6 +85,13 @@ Basic.args = {
|
|
|
84
85
|
items,
|
|
85
86
|
};
|
|
86
87
|
|
|
88
|
+
export const WithHeight = Template.bind({});
|
|
89
|
+
WithHeight.args = {
|
|
90
|
+
label: 'Collection of items',
|
|
91
|
+
height: '600px',
|
|
92
|
+
items,
|
|
93
|
+
};
|
|
94
|
+
|
|
87
95
|
export const Stacked = Template.bind({});
|
|
88
96
|
Stacked.args = {
|
|
89
97
|
label: 'Collection of items',
|
|
@@ -97,3 +105,10 @@ Fill.args = {
|
|
|
97
105
|
fill: true,
|
|
98
106
|
items,
|
|
99
107
|
};
|
|
108
|
+
|
|
109
|
+
export const SelectedFirst = Template.bind({});
|
|
110
|
+
SelectedFirst.args = {
|
|
111
|
+
label: 'Collection of items',
|
|
112
|
+
items,
|
|
113
|
+
showSelectedFirst: true,
|
|
114
|
+
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { IReqoreControlGroupProps } from '../../components/ControlGroup';
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
ReqoreButton,
|
|
5
|
+
ReqoreCheckbox,
|
|
6
|
+
ReqoreControlGroup,
|
|
7
|
+
ReqoreInput,
|
|
8
|
+
ReqoreTag,
|
|
9
|
+
ReqoreVerticalSpacer,
|
|
10
|
+
} from '../../index';
|
|
5
11
|
import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
|
|
6
12
|
|
|
7
13
|
const { createArg } = argManager<IReqoreControlGroupProps>();
|
|
@@ -30,42 +36,113 @@ export default {
|
|
|
30
36
|
description: 'Whether the control group should be fluid',
|
|
31
37
|
control: 'boolean',
|
|
32
38
|
}),
|
|
39
|
+
...createArg('wrap', {
|
|
40
|
+
name: 'wrap',
|
|
41
|
+
defaultValue: true,
|
|
42
|
+
description: 'Whether the control group should wrap',
|
|
43
|
+
control: 'boolean',
|
|
44
|
+
}),
|
|
33
45
|
},
|
|
34
46
|
} as Meta<IReqoreControlGroupProps>;
|
|
35
47
|
|
|
36
48
|
const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProps) => {
|
|
37
49
|
return (
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
<>
|
|
51
|
+
<ReqoreControlGroup {...args}>
|
|
52
|
+
<ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
|
|
53
|
+
<ReqoreButton
|
|
54
|
+
icon='PictureInPictureLine'
|
|
55
|
+
flat={false}
|
|
56
|
+
effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
|
|
57
|
+
>
|
|
58
|
+
Non flat Button
|
|
59
|
+
</ReqoreButton>
|
|
60
|
+
<ReqoreControlGroup stack>
|
|
61
|
+
<ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
|
|
62
|
+
<ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
|
|
63
|
+
</ReqoreControlGroup>
|
|
64
|
+
<ReqoreCheckbox
|
|
65
|
+
asSwitch
|
|
66
|
+
label='Switchy switch'
|
|
67
|
+
margin='both'
|
|
68
|
+
intent='warning'
|
|
69
|
+
checkedIcon='CheckFill'
|
|
70
|
+
checked
|
|
71
|
+
uncheckedIcon='CheckboxBlankLine'
|
|
72
|
+
/>
|
|
73
|
+
<ReqoreInput icon='4KFill' value='Hello' />
|
|
74
|
+
<ReqoreControlGroup stack>
|
|
75
|
+
<ReqoreControlGroup>
|
|
76
|
+
<ReqoreButton customTheme={{ main: '#00e3e8' }}>Level 2 deep</ReqoreButton>
|
|
77
|
+
<ReqoreControlGroup>
|
|
78
|
+
<ReqoreButton disabled fixed id='test'>
|
|
79
|
+
Level 3 deep
|
|
80
|
+
</ReqoreButton>
|
|
81
|
+
</ReqoreControlGroup>
|
|
82
|
+
</ReqoreControlGroup>
|
|
83
|
+
<ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
|
|
84
|
+
<ReqoreCheckbox checked margin='both' label='Level 1 deep' />
|
|
85
|
+
</ReqoreControlGroup>
|
|
65
86
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
87
|
+
<ReqoreButton minimal>Minimal</ReqoreButton>
|
|
88
|
+
<ReqoreTag label='smol tag' size='small' />
|
|
89
|
+
</ReqoreControlGroup>
|
|
90
|
+
<ReqoreVerticalSpacer height={15} />
|
|
91
|
+
<ReqoreControlGroup {...args} className='root-group' id='root-group'>
|
|
92
|
+
<ReqoreControlGroup intent='info' className='group-1' id='group-1-wrapper'>
|
|
93
|
+
<ReqoreControlGroup intent='info' className='group-1' id='group-1'>
|
|
94
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-1-button'>
|
|
95
|
+
Group 1
|
|
96
|
+
</ReqoreButton>
|
|
97
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 1' id='group-1-tag' />
|
|
98
|
+
</ReqoreControlGroup>
|
|
99
|
+
<ReqoreControlGroup intent='pending' className='group-1-1' id='group-1-1'>
|
|
100
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-1-1-button'>
|
|
101
|
+
Group 1-1
|
|
102
|
+
</ReqoreButton>
|
|
103
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 1-1' id='group-1-1-tag' />
|
|
104
|
+
</ReqoreControlGroup>
|
|
105
|
+
</ReqoreControlGroup>
|
|
106
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-root-button'>
|
|
107
|
+
Root group
|
|
108
|
+
</ReqoreButton>
|
|
109
|
+
<ReqoreControlGroup intent='success' className='group-2' id='group-2'>
|
|
110
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-2-button' fixed>
|
|
111
|
+
Group 2
|
|
112
|
+
</ReqoreButton>
|
|
113
|
+
<ReqoreControlGroup intent='danger' className='group-3' id='group-3'>
|
|
114
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-3-button-1'>
|
|
115
|
+
Group 3
|
|
116
|
+
</ReqoreButton>
|
|
117
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-3-button-2'>
|
|
118
|
+
Group 3
|
|
119
|
+
</ReqoreButton>
|
|
120
|
+
</ReqoreControlGroup>
|
|
121
|
+
<ReqoreCheckbox label='Group 2' margin='both' id='group-2-checkbox' />
|
|
122
|
+
</ReqoreControlGroup>
|
|
123
|
+
<ReqoreButton icon='PictureInPictureLine' id='group-root-button-2'>
|
|
124
|
+
Root group
|
|
125
|
+
</ReqoreButton>
|
|
126
|
+
<ReqoreControlGroup intent='warning' className='group-4' id='group-4'>
|
|
127
|
+
<ReqoreControlGroup id='group-4-1' fluid={false}>
|
|
128
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-1-tag' />
|
|
129
|
+
<ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-1-input' />
|
|
130
|
+
</ReqoreControlGroup>
|
|
131
|
+
<ReqoreControlGroup id='group-4-3'>
|
|
132
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-3-tag' />
|
|
133
|
+
<ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-3-input' />
|
|
134
|
+
<ReqoreControlGroup id='group-5' intent='muted' fluid={false}>
|
|
135
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-1-tag' />
|
|
136
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-2-tag' />
|
|
137
|
+
<ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-3-tag' />
|
|
138
|
+
<ReqoreControlGroup id='group 6' intent='success'>
|
|
139
|
+
<ReqoreButton fixed>Group 6</ReqoreButton>
|
|
140
|
+
</ReqoreControlGroup>
|
|
141
|
+
</ReqoreControlGroup>
|
|
142
|
+
</ReqoreControlGroup>
|
|
143
|
+
</ReqoreControlGroup>
|
|
144
|
+
</ReqoreControlGroup>
|
|
145
|
+
</>
|
|
69
146
|
);
|
|
70
147
|
};
|
|
71
148
|
|
|
@@ -85,6 +162,13 @@ Vertical.args = {
|
|
|
85
162
|
vertical: true,
|
|
86
163
|
};
|
|
87
164
|
|
|
165
|
+
export const VerticalStacked = Template.bind({});
|
|
166
|
+
VerticalStacked.args = {
|
|
167
|
+
vertical: true,
|
|
168
|
+
stack: true,
|
|
169
|
+
fluid: true,
|
|
170
|
+
};
|
|
171
|
+
|
|
88
172
|
export const Stacked = Template.bind({});
|
|
89
173
|
Stacked.args = {
|
|
90
174
|
stack: true,
|
|
@@ -95,7 +179,7 @@ BigGapSize.args = {
|
|
|
95
179
|
gapSize: 'big',
|
|
96
180
|
};
|
|
97
181
|
|
|
98
|
-
export const
|
|
99
|
-
|
|
100
|
-
wrap:
|
|
182
|
+
export const NoWrap = Template.bind({});
|
|
183
|
+
NoWrap.args = {
|
|
184
|
+
wrap: false,
|
|
101
185
|
};
|
|
@@ -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
|
|
@@ -26,7 +26,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
|
-
<ReqoreControlGroup>
|
|
29
|
+
<ReqoreControlGroup wrap>
|
|
30
30
|
<ReqoreInput {...args} placeholder='Reqore Input' onChange={handleValueChange} />
|
|
31
31
|
<ReqoreInput {...args} placeholder='Minimal Input' minimal onChange={handleValueChange} />
|
|
32
32
|
<ReqoreInput
|
|
@@ -38,6 +38,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
38
38
|
/>
|
|
39
39
|
<ReqoreInput
|
|
40
40
|
{...args}
|
|
41
|
+
iconColor='pending:lighten:2'
|
|
41
42
|
placeholder='Clearable Input'
|
|
42
43
|
onClearClick={handleValueClear}
|
|
43
44
|
onChange={handleValueChange}
|
|
@@ -51,7 +52,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
51
52
|
/>
|
|
52
53
|
</ReqoreControlGroup>
|
|
53
54
|
<br />
|
|
54
|
-
<ReqoreControlGroup>
|
|
55
|
+
<ReqoreControlGroup wrap>
|
|
55
56
|
<ReqoreInput
|
|
56
57
|
{...args}
|
|
57
58
|
placeholder='Reqore Input'
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
2
|
import { IReqoreTabsProps } from '../../components/Tabs';
|
|
3
3
|
import { ReqoreTabs, ReqoreTabsContent } from '../../index';
|
|
4
|
-
import {
|
|
4
|
+
import { IntentArg, SizeArg, argManager } from '../utils/args';
|
|
5
5
|
|
|
6
6
|
const tabs = [
|
|
7
7
|
{
|
|
@@ -30,6 +30,7 @@ const tabs = [
|
|
|
30
30
|
id: 3,
|
|
31
31
|
icon: 'FileSettingsLine',
|
|
32
32
|
tooltip: 'Click to go to page 3!',
|
|
33
|
+
iconColor: 'info:lighten:3',
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
id: 'tab4',
|
|
@@ -77,6 +77,12 @@ 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
|
+
/>
|
|
80
86
|
<ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' {...args} />
|
|
81
87
|
<ReqoreTag labelKey='Key' label='value' {...args} />
|
|
82
88
|
<ReqoreTag icon='QuestionAnswerLine' {...args} />
|
|
@@ -169,6 +175,8 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
169
175
|
label='Wrapped tag with some long text and NO width specified, AND wrap specified'
|
|
170
176
|
icon='ShareForward2Fill'
|
|
171
177
|
rightIcon={args.rightIcon}
|
|
178
|
+
leftIconColor='#00fafd'
|
|
179
|
+
rightIconColor='#eb0e8c'
|
|
172
180
|
wrap
|
|
173
181
|
onRemoveClick={null}
|
|
174
182
|
actions={[
|
package/src/styles.ts
CHANGED