@qoretechnologies/reqore 0.28.6 → 0.29.1
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/.vscode/settings.json +2 -1
- package/__tests__/checkbox.test.tsx +7 -12
- package/__tests__/multiselect.test.tsx +407 -0
- package/__tests__/popover.test.tsx +35 -8
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +7 -2
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +60 -26
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collection/item.js +2 -2
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +3 -4
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +7 -9
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +3 -3
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +6 -3
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +19 -1
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +15 -2
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +60 -23
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -9
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +4 -28
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.js +1 -1
- package/dist/components/InputClearButton/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +19 -5
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/divider.d.ts +3 -2
- package/dist/components/Menu/divider.d.ts.map +1 -1
- package/dist/components/Menu/divider.js +2 -2
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.js +4 -3
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +34 -0
- package/dist/components/MultiSelect/index.d.ts.map +1 -0
- package/dist/components/MultiSelect/index.js +178 -0
- package/dist/components/MultiSelect/index.js.map +1 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +5 -2
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +3 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/RadioGroup/index.js.map +1 -1
- package/dist/components/Table/row.js +2 -2
- package/dist/components/Table/row.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 +5 -4
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts +3 -3
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tag/group.js +6 -3
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +21 -18
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Textarea/index.js +3 -3
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Tree/index.js +1 -1
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/PopoverProvider.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.js +28 -3
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +6 -5
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +1 -0
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/PopoverContext.d.ts +1 -0
- package/dist/context/PopoverContext.d.ts.map +1 -1
- package/dist/context/PopoverContext.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +1 -0
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +2 -1
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/colors.d.ts +3 -0
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +27 -3
- package/dist/helpers/colors.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +8 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +12 -7
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useReqore.d.ts +3 -0
- package/dist/hooks/useReqore.d.ts.map +1 -0
- package/dist/hooks/useReqore.js +17 -0
- package/dist/hooks/useReqore.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.js +3 -0
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.tsx +1 -1
- package/src/components/Checkbox/index.tsx +189 -34
- package/src/components/Collection/item.tsx +2 -2
- package/src/components/ControlGroup/index.tsx +46 -35
- package/src/components/Dropdown/index.tsx +5 -0
- package/src/components/Dropdown/list.tsx +29 -15
- package/src/components/Effect/index.tsx +123 -55
- package/src/components/Icon/index.tsx +4 -52
- package/src/components/Input/index.tsx +3 -3
- package/src/components/InputClearButton/index.tsx +1 -0
- package/src/components/InternalPopover/index.tsx +6 -3
- package/src/components/Menu/divider.tsx +15 -4
- package/src/components/Menu/index.tsx +3 -3
- package/src/components/MultiSelect/index.tsx +292 -0
- package/src/components/Panel/index.tsx +6 -4
- package/src/components/Popover/index.tsx +8 -3
- package/src/components/RadioGroup/index.tsx +6 -0
- package/src/components/Table/row.tsx +2 -2
- package/src/components/Tabs/item.tsx +1 -1
- package/src/components/Tabs/list.tsx +11 -11
- package/src/components/Tag/group.tsx +10 -2
- package/src/components/Tag/index.tsx +26 -20
- package/src/components/Textarea/index.tsx +3 -3
- package/src/components/Tree/index.tsx +3 -3
- package/src/containers/PopoverProvider.tsx +35 -3
- package/src/containers/ReqoreProvider.tsx +6 -4
- package/src/containers/UIProvider.tsx +1 -0
- package/src/context/PopoverContext.tsx +1 -0
- package/src/context/ReqoreContext.tsx +2 -0
- package/src/helpers/colors.ts +52 -4
- package/src/hooks/usePopover.tsx +24 -10
- package/src/hooks/useReqore.ts +12 -0
- package/src/hooks/useTheme.ts +6 -1
- package/src/index.tsx +3 -0
- package/src/mock/collectionData.tsx +6 -6
- package/src/mock/multiSelect.ts +69 -0
- package/src/stories/Button/Button.stories.tsx +20 -8
- package/src/stories/Checkbox/Checkbox.stories.tsx +42 -7
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +7 -2
- package/src/stories/Dropdown/Dropdown.stories.tsx +6 -1
- package/src/stories/Icon/Icon.stories.tsx +42 -12
- package/src/stories/Input/Input.stories.tsx +25 -0
- package/src/stories/Menu/Menu.stories.tsx +3 -1
- package/src/stories/MultiSelect/MultiSelect.stories.tsx +106 -0
- package/src/stories/Popover/Popover.stories.tsx +19 -2
- package/src/stories/RadioGroup/RadioGroup.stories.tsx +51 -1
- package/src/stories/Tabs/Tabs.stories.tsx +23 -3
- package/src/stories/Tag/Tag.stories.tsx +10 -3
- package/src/stories/utils/args.ts +1 -1
- package/tests.json +1 -1
|
@@ -15,22 +15,46 @@ export const Icon: Story<IReqoreIconProps> = () => {
|
|
|
15
15
|
<ReqoreIcon icon='ArrowLeftCircleFill' intent='success' margin='both' />
|
|
16
16
|
<ReqoreIcon icon='HotelFill' size='18px' margin='both' />
|
|
17
17
|
<ReqoreIcon icon='SignalTowerFill' size='20px' color='#ff0000' margin='both' />
|
|
18
|
-
<ReqoreIcon
|
|
19
|
-
|
|
18
|
+
<ReqoreIcon
|
|
19
|
+
icon='SignalTowerFill'
|
|
20
|
+
size='20px'
|
|
21
|
+
color='#291133'
|
|
22
|
+
effect={{ sepia: true }}
|
|
23
|
+
margin='both'
|
|
24
|
+
/>
|
|
25
|
+
<ReqoreIcon
|
|
26
|
+
icon='SignalTowerFill'
|
|
27
|
+
size='20px'
|
|
28
|
+
color='#0c7052'
|
|
29
|
+
effect={{ blur: 1 }}
|
|
30
|
+
margin='both'
|
|
31
|
+
/>
|
|
20
32
|
<ReqoreIcon
|
|
21
33
|
icon='SignalTowerFill'
|
|
22
34
|
size='20px'
|
|
23
35
|
color='#700c57'
|
|
24
|
-
|
|
36
|
+
effect={{ contrast: 150 }}
|
|
37
|
+
margin='both'
|
|
38
|
+
/>
|
|
39
|
+
<ReqoreIcon
|
|
40
|
+
icon='SignalTowerFill'
|
|
41
|
+
size='20px'
|
|
42
|
+
color='#d5be0f'
|
|
43
|
+
effect={{ grayscale: true }}
|
|
44
|
+
margin='both'
|
|
45
|
+
/>
|
|
46
|
+
<ReqoreIcon
|
|
47
|
+
icon='SignalTowerFill'
|
|
48
|
+
size='20px'
|
|
49
|
+
color='#0f5bd5'
|
|
50
|
+
effect={{ invert: true }}
|
|
25
51
|
margin='both'
|
|
26
52
|
/>
|
|
27
|
-
<ReqoreIcon icon='SignalTowerFill' size='20px' color='#d5be0f' grayscale margin='both' />
|
|
28
|
-
<ReqoreIcon icon='SignalTowerFill' size='20px' color='#0f5bd5' invert margin='both' />
|
|
29
53
|
<ReqoreIcon
|
|
30
54
|
icon='SignalTowerFill'
|
|
31
55
|
size='20px'
|
|
32
56
|
color='#ffffff'
|
|
33
|
-
|
|
57
|
+
effect={{ opacity: 0.5 }}
|
|
34
58
|
margin='both'
|
|
35
59
|
/>
|
|
36
60
|
</ReqorePanel>
|
|
@@ -50,37 +74,43 @@ export const Icon: Story<IReqoreIconProps> = () => {
|
|
|
50
74
|
<ReqoreIcon
|
|
51
75
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
52
76
|
size='30px'
|
|
53
|
-
sepia
|
|
77
|
+
effect={{ sepia: true }}
|
|
54
78
|
margin='both'
|
|
55
79
|
/>
|
|
56
80
|
<ReqoreIcon
|
|
57
81
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
58
82
|
size='40px'
|
|
59
|
-
|
|
83
|
+
effect={{ grayscale: true }}
|
|
60
84
|
margin='both'
|
|
61
85
|
/>
|
|
62
86
|
<ReqoreIcon
|
|
63
87
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
64
88
|
size='70px'
|
|
65
|
-
|
|
89
|
+
effect={{ blur: 1 }}
|
|
90
|
+
margin='both'
|
|
91
|
+
/>
|
|
92
|
+
<ReqoreIcon
|
|
93
|
+
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
94
|
+
size='40px'
|
|
95
|
+
effect={{ contrast: 150 }}
|
|
66
96
|
margin='both'
|
|
67
97
|
/>
|
|
68
98
|
<ReqoreIcon
|
|
69
99
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
70
100
|
size='40px'
|
|
71
|
-
|
|
101
|
+
effect={{ invert: true }}
|
|
72
102
|
margin='both'
|
|
73
103
|
/>
|
|
74
104
|
<ReqoreIcon
|
|
75
105
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
76
106
|
size='40px'
|
|
77
|
-
|
|
107
|
+
effect={{ opacity: 0.5 }}
|
|
78
108
|
margin='both'
|
|
79
109
|
/>
|
|
80
110
|
<ReqoreIcon
|
|
81
111
|
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
82
112
|
size='40px'
|
|
83
|
-
|
|
113
|
+
effect={{ saturate: 150 }}
|
|
84
114
|
margin='both'
|
|
85
115
|
/>
|
|
86
116
|
</ReqorePanel>
|
|
@@ -26,6 +26,31 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
|
+
<ReqoreControlGroup>
|
|
30
|
+
<ReqoreInput {...args} placeholder='Reqore Input' onChange={handleValueChange} />
|
|
31
|
+
<ReqoreInput {...args} placeholder='Minimal Input' minimal onChange={handleValueChange} />
|
|
32
|
+
<ReqoreInput
|
|
33
|
+
{...args}
|
|
34
|
+
placeholder='Flat Input'
|
|
35
|
+
flat
|
|
36
|
+
tooltip="I'm a tooltip"
|
|
37
|
+
onChange={handleValueChange}
|
|
38
|
+
/>
|
|
39
|
+
<ReqoreInput
|
|
40
|
+
{...args}
|
|
41
|
+
placeholder='Clearable Input'
|
|
42
|
+
onClearClick={handleValueClear}
|
|
43
|
+
onChange={handleValueChange}
|
|
44
|
+
/>
|
|
45
|
+
<ReqoreInput {...args} placeholder='Disabled Input' disabled onChange={handleValueChange} />
|
|
46
|
+
<ReqoreInput
|
|
47
|
+
{...args}
|
|
48
|
+
placeholder='Read Only Input'
|
|
49
|
+
readOnly
|
|
50
|
+
onChange={handleValueChange}
|
|
51
|
+
/>
|
|
52
|
+
</ReqoreControlGroup>
|
|
53
|
+
<br />
|
|
29
54
|
<ReqoreControlGroup>
|
|
30
55
|
<ReqoreInput
|
|
31
56
|
{...args}
|
|
@@ -113,6 +113,7 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
113
113
|
<ReqoreMenuDivider label='Divider' />
|
|
114
114
|
<ReqorePopover
|
|
115
115
|
component={ReqoreMenuItem}
|
|
116
|
+
flat={args.flat}
|
|
116
117
|
componentProps={
|
|
117
118
|
{
|
|
118
119
|
icon: 'EmotionUnhappyLine',
|
|
@@ -154,7 +155,8 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
154
155
|
</ReqorePopover>
|
|
155
156
|
<ReqoreMenuDivider
|
|
156
157
|
label='Fancy divider'
|
|
157
|
-
effect={{
|
|
158
|
+
effect={{ gradient: { colors: { 0: '#0d5ba5', 100: '#ff5dfd' } } }}
|
|
159
|
+
align='left'
|
|
158
160
|
/>
|
|
159
161
|
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine' selected>
|
|
160
162
|
I am selected!
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { IReqoreMultiSelectProps, ReqoreMultiSelect } from '../../components/MultiSelect';
|
|
4
|
+
import { MultiSelectItems } from '../../mock/multiSelect';
|
|
5
|
+
import { IReqoreIconName } from '../../types/icons';
|
|
6
|
+
import { FlatArg, IconArg, MinimalArg, SizeArg, argManager } from '../utils/args';
|
|
7
|
+
|
|
8
|
+
const { createArg } = argManager<IReqoreMultiSelectProps>();
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Components/MultiSelect',
|
|
12
|
+
parameters: {
|
|
13
|
+
chromatic: {
|
|
14
|
+
delay: 500,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
...FlatArg,
|
|
19
|
+
...MinimalArg(),
|
|
20
|
+
...SizeArg,
|
|
21
|
+
...createArg('canCreateItems', {
|
|
22
|
+
defaultValue: true,
|
|
23
|
+
name: 'Can create items',
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
}),
|
|
26
|
+
...createArg('canRemoveItems', {
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
name: 'Can remove items',
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
}),
|
|
31
|
+
...IconArg('onItemClickIcon', 'Clickable item right icon', null),
|
|
32
|
+
},
|
|
33
|
+
} as Meta<IReqoreMultiSelectProps>;
|
|
34
|
+
|
|
35
|
+
const Template: Story<IReqoreMultiSelectProps> = (args: IReqoreMultiSelectProps) => {
|
|
36
|
+
const [selected, setSelected] = useState<string[]>([
|
|
37
|
+
'Existing item 1',
|
|
38
|
+
'Existing item 3',
|
|
39
|
+
'Disabled item',
|
|
40
|
+
'Minimal item with border',
|
|
41
|
+
'itemWithNoLabel',
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<ReqoreMultiSelect
|
|
46
|
+
value={selected}
|
|
47
|
+
{...args}
|
|
48
|
+
onValueChange={setSelected}
|
|
49
|
+
enterKeySelects
|
|
50
|
+
selectorProps={{
|
|
51
|
+
listHeight: '600px',
|
|
52
|
+
...args.selectorProps,
|
|
53
|
+
}}
|
|
54
|
+
items={MultiSelectItems}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const Basic = Template.bind({});
|
|
60
|
+
export const Empty = Template.bind({});
|
|
61
|
+
Empty.args = {
|
|
62
|
+
value: [],
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const AutoOpen = Template.bind({});
|
|
66
|
+
AutoOpen.args = {
|
|
67
|
+
openOnMount: true,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Flat = Template.bind({});
|
|
71
|
+
Flat.args = {
|
|
72
|
+
flat: true,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const Minimal = Template.bind({});
|
|
76
|
+
Minimal.args = {
|
|
77
|
+
minimal: true,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Clickable = Template.bind({});
|
|
81
|
+
Clickable.args = {
|
|
82
|
+
onItemClick: (item) => console.log('onItemClick', item),
|
|
83
|
+
onItemClickIcon: 'EditLine' as IReqoreIconName,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const WithEffect = Template.bind({});
|
|
87
|
+
WithEffect.args = {
|
|
88
|
+
selectedItemEffect: {
|
|
89
|
+
gradient: {
|
|
90
|
+
colors: {
|
|
91
|
+
0: '#7f60ea',
|
|
92
|
+
100: '#00fd67',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
selectorProps: {
|
|
97
|
+
effect: {
|
|
98
|
+
gradient: {
|
|
99
|
+
colors: {
|
|
100
|
+
0: '#7f60ea',
|
|
101
|
+
100: '#00fd67',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
ReqorePopover,
|
|
11
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
|
|
|
@@ -178,10 +178,27 @@ const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
|
178
178
|
component={ReqoreButton}
|
|
179
179
|
isReqoreComponent
|
|
180
180
|
openOnMount
|
|
181
|
-
placement='
|
|
181
|
+
placement='right'
|
|
182
182
|
>
|
|
183
183
|
Auto open popover
|
|
184
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>
|
|
185
202
|
</ReqoreControlGroup>
|
|
186
203
|
);
|
|
187
204
|
};
|
|
@@ -33,6 +33,43 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
|
|
|
33
33
|
{
|
|
34
34
|
label: 'Option 2',
|
|
35
35
|
value: 'opt2',
|
|
36
|
+
onText: 1,
|
|
37
|
+
offText: 0,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Danger option',
|
|
41
|
+
value: 'danger',
|
|
42
|
+
intent: 'danger',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'Effect option',
|
|
46
|
+
labelPosition: 'left',
|
|
47
|
+
value: 'effect',
|
|
48
|
+
effect: {
|
|
49
|
+
gradient: {
|
|
50
|
+
colors: {
|
|
51
|
+
0: 'info',
|
|
52
|
+
100: 'success',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Text effect & custom theme option',
|
|
59
|
+
value: 'textEffect',
|
|
60
|
+
customTheme: {
|
|
61
|
+
main: '#110134',
|
|
62
|
+
},
|
|
63
|
+
onText: 'On',
|
|
64
|
+
offText: 'Off',
|
|
65
|
+
switchTextEffect: {
|
|
66
|
+
gradient: {
|
|
67
|
+
colors: {
|
|
68
|
+
0: 'warning',
|
|
69
|
+
100: 'pending',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
36
73
|
},
|
|
37
74
|
{
|
|
38
75
|
divider: true,
|
|
@@ -41,7 +78,7 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
|
|
|
41
78
|
{
|
|
42
79
|
label: 'Beautiful option 3 with gradient effect',
|
|
43
80
|
value: 'opt3',
|
|
44
|
-
|
|
81
|
+
labelEffect: {
|
|
45
82
|
gradient: {
|
|
46
83
|
colors: {
|
|
47
84
|
0: 'info',
|
|
@@ -51,6 +88,12 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
|
|
|
51
88
|
weight: 'thick',
|
|
52
89
|
},
|
|
53
90
|
},
|
|
91
|
+
{
|
|
92
|
+
label: 'Custom Icons Option',
|
|
93
|
+
value: 'customIconsOpt',
|
|
94
|
+
checkedIcon: 'EmotionHappyLine',
|
|
95
|
+
uncheckedIcon: 'EmotionSadLine',
|
|
96
|
+
},
|
|
54
97
|
{
|
|
55
98
|
label: 'Custom Image Option',
|
|
56
99
|
value: 'customOpt',
|
|
@@ -86,3 +129,10 @@ export const Switch = Template.bind({});
|
|
|
86
129
|
Switch.args = {
|
|
87
130
|
asSwitch: true,
|
|
88
131
|
};
|
|
132
|
+
|
|
133
|
+
export const WithTexts = Template.bind({});
|
|
134
|
+
WithTexts.args = {
|
|
135
|
+
asSwitch: true,
|
|
136
|
+
onText: 'True',
|
|
137
|
+
offText: 'False and wrong',
|
|
138
|
+
};
|
|
@@ -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 { IntentArg, SizeArg
|
|
4
|
+
import { argManager, IntentArg, SizeArg } from '../utils/args';
|
|
5
5
|
|
|
6
6
|
const tabs = [
|
|
7
7
|
{
|
|
@@ -67,14 +67,34 @@ const tabs = [
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
label: '
|
|
70
|
+
label: 'With Effect',
|
|
71
71
|
id: 'tab8',
|
|
72
72
|
icon: 'MapPin3Line',
|
|
73
|
+
flat: false,
|
|
74
|
+
effect: {
|
|
75
|
+
gradient: {
|
|
76
|
+
colors: {
|
|
77
|
+
0: 'info',
|
|
78
|
+
100: 'danger',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
73
82
|
},
|
|
74
83
|
{
|
|
75
|
-
label: '
|
|
84
|
+
label: 'With another effect',
|
|
76
85
|
id: 'tab9',
|
|
77
86
|
icon: 'EjectLine',
|
|
87
|
+
effect: {
|
|
88
|
+
glow: {
|
|
89
|
+
color: 'warning',
|
|
90
|
+
blur: 16,
|
|
91
|
+
size: -5,
|
|
92
|
+
},
|
|
93
|
+
spaced: 3,
|
|
94
|
+
uppercase: true,
|
|
95
|
+
weight: 'thick',
|
|
96
|
+
textSize: 'small',
|
|
97
|
+
},
|
|
78
98
|
},
|
|
79
99
|
] as IReqoreTabsProps['tabs'];
|
|
80
100
|
|
|
@@ -3,7 +3,7 @@ import { noop } from 'lodash';
|
|
|
3
3
|
import { IReqoreTagProps } from '../../components/Tag';
|
|
4
4
|
import { IReqoreTagGroup } from '../../components/Tag/group';
|
|
5
5
|
import { ReqoreTag, ReqoreTagGroup } from '../../index';
|
|
6
|
-
import {
|
|
6
|
+
import { SizeArg, argManager } from '../utils/args';
|
|
7
7
|
|
|
8
8
|
const { createArg } = argManager<IReqoreTagGroup & IReqoreTagProps>();
|
|
9
9
|
|
|
@@ -60,7 +60,14 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
|
|
|
60
60
|
return (
|
|
61
61
|
<ReqoreTagGroup columns={columns} size={args.size} gapSize={args.gapSize}>
|
|
62
62
|
<ReqoreTag {...args} actions={null} onRemoveClick={null} rightIcon={null} label={1} />
|
|
63
|
-
<ReqoreTag
|
|
63
|
+
<ReqoreTag
|
|
64
|
+
{...args}
|
|
65
|
+
actions={null}
|
|
66
|
+
onRemoveClick={null}
|
|
67
|
+
rightIcon={null}
|
|
68
|
+
label='Basic Tag'
|
|
69
|
+
onClick={() => console.log('Tag clicked')}
|
|
70
|
+
/>
|
|
64
71
|
<ReqoreTag
|
|
65
72
|
{...args}
|
|
66
73
|
actions={null}
|
|
@@ -188,7 +195,7 @@ export const Basic = Template.bind({});
|
|
|
188
195
|
export const BigGapSize = Template.bind({});
|
|
189
196
|
BigGapSize.args = { gapSize: 'big' };
|
|
190
197
|
export const Badge = Template.bind({});
|
|
191
|
-
Badge.args = {
|
|
198
|
+
Badge.args = { asBadge: true };
|
|
192
199
|
|
|
193
200
|
export const Effect = Template.bind({});
|
|
194
201
|
Effect.args = {
|
|
@@ -57,7 +57,7 @@ export const IconArg = (
|
|
|
57
57
|
defaultValue?: IReqoreIconName
|
|
58
58
|
) =>
|
|
59
59
|
argManager<any>().createArg(iconKeyName, {
|
|
60
|
-
defaultValue: defaultValue || '24HoursFill',
|
|
60
|
+
defaultValue: defaultValue || (defaultValue === null ? null : '24HoursFill'),
|
|
61
61
|
name: name || 'Icon',
|
|
62
62
|
description: 'The icon name used',
|
|
63
63
|
control: {
|