@qoretechnologies/reqore 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +6 -2
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts +29 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/DatePicker/index.js +147 -0
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/Effect/index.d.ts +1 -1
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +3 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +5 -1
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts +2 -0
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +5 -4
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/tests.json +1 -1
- package/.eslintrc.js +0 -40
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/ISSUE_TEMPLATE/new-component.md +0 -20
- package/.github/ISSUE_TEMPLATE/visual-bug-report.md +0 -38
- package/.github/workflows/beta_release.yml +0 -100
- package/.github/workflows/tests.yml +0 -84
- package/.gitpod.yml +0 -11
- package/.jest-test-results.json +0 -1
- package/.prettierrc +0 -7
- package/.vscode/settings.json +0 -0
- package/__tests__/breadcrumbs.test.tsx +0 -75
- package/__tests__/button.test.tsx +0 -218
- package/__tests__/checkbox.test.tsx +0 -45
- package/__tests__/collection.test.tsx +0 -243
- package/__tests__/containers/paging.test.tsx +0 -138
- package/__tests__/control_group.test.tsx +0 -32
- package/__tests__/drawer.test.tsx +0 -140
- package/__tests__/dropdown.test.tsx +0 -381
- package/__tests__/effect.test.tsx +0 -70
- package/__tests__/heading.test.tsx +0 -58
- package/__tests__/helpers/colors.test.tsx +0 -18
- package/__tests__/helpers/table.test.tsx +0 -67
- package/__tests__/hooks/useLatestZIndex.test.tsx +0 -10
- package/__tests__/hooks/useReqorePaging.test.tsx +0 -271
- package/__tests__/hooks/useTheme.test.tsx +0 -31
- package/__tests__/icon.test.tsx +0 -53
- package/__tests__/input.test.tsx +0 -482
- package/__tests__/layout.test.tsx +0 -37
- package/__tests__/menu.test.tsx +0 -65
- package/__tests__/messages.test.tsx +0 -79
- package/__tests__/modal.test.tsx +0 -204
- package/__tests__/multiselect.test.tsx +0 -458
- package/__tests__/navbar.test.tsx +0 -31
- package/__tests__/notifications.test.tsx +0 -178
- package/__tests__/pagination.test.tsx +0 -437
- package/__tests__/panel.test.tsx +0 -243
- package/__tests__/popover.test.tsx +0 -282
- package/__tests__/radiogroup.test.tsx +0 -47
- package/__tests__/setup.js +0 -8
- package/__tests__/stories/Collection.stories.tsx +0 -0
- package/__tests__/table.test.tsx +0 -647
- package/__tests__/tabs.test.tsx +0 -321
- package/__tests__/tag.test.tsx +0 -160
- package/__tests__/textarea.test.tsx +0 -467
- package/__tests__/timeAgo.test.tsx +0 -27
- package/__tests__/tree.test.tsx +0 -58
- package/build-storybook.log +0 -491
- package/chromatic.config.json +0 -1
- package/icons.ts +0 -1
- package/migration-storybook.log +0 -56
- package/public/logo-dark.png +0 -0
- package/public/logo.png +0 -0
- package/public/q-symbol-small.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/Breadcrumbs/index.tsx +0 -254
- package/src/components/Breadcrumbs/item.tsx +0 -44
- package/src/components/Button/index.tsx +0 -628
- package/src/components/Checkbox/index.tsx +0 -388
- package/src/components/Collection/index.tsx +0 -426
- package/src/components/Collection/item.tsx +0 -267
- package/src/components/Columns/column.tsx +0 -27
- package/src/components/Columns/index.tsx +0 -41
- package/src/components/Comment/index.tsx +0 -141
- package/src/components/CommentFeed/index.tsx +0 -34
- package/src/components/Content/index.tsx +0 -34
- package/src/components/Content/wrapper.tsx +0 -36
- package/src/components/ControlGroup/index.tsx +0 -523
- package/src/components/Drawer/backdrop.tsx +0 -54
- package/src/components/Drawer/index.tsx +0 -365
- package/src/components/Dropdown/index.tsx +0 -153
- package/src/components/Dropdown/item.tsx +0 -33
- package/src/components/Dropdown/list.tsx +0 -222
- package/src/components/Effect/index.tsx +0 -463
- package/src/components/ExportModal/index.tsx +0 -99
- package/src/components/Header/index.tsx +0 -81
- package/src/components/Icon/index.tsx +0 -184
- package/src/components/Input/index.tsx +0 -282
- package/src/components/InputClearButton/index.tsx +0 -59
- package/src/components/InternalPopover/index.tsx +0 -303
- package/src/components/KeyValueTable/index.tsx +0 -192
- package/src/components/Label/index.tsx +0 -10
- package/src/components/Layout/content.tsx +0 -31
- package/src/components/Layout/index.tsx +0 -55
- package/src/components/Menu/divider.tsx +0 -92
- package/src/components/Menu/index.tsx +0 -141
- package/src/components/Menu/item.tsx +0 -137
- package/src/components/Menu/section.tsx +0 -81
- package/src/components/Message/index.tsx +0 -220
- package/src/components/Modal/index.tsx +0 -26
- package/src/components/MultiSelect/index.tsx +0 -288
- package/src/components/Navbar/divider.tsx +0 -50
- package/src/components/Navbar/group.tsx +0 -53
- package/src/components/Navbar/index.tsx +0 -82
- package/src/components/Navbar/item.tsx +0 -92
- package/src/components/Notifications/index.tsx +0 -57
- package/src/components/Notifications/notification.tsx +0 -362
- package/src/components/Paging/index.tsx +0 -321
- package/src/components/Panel/LabelEditor.tsx +0 -67
- package/src/components/Panel/NonResponsiveActions.tsx +0 -79
- package/src/components/Panel/__screenshots__/linux/panel-SomePanel.png +0 -0
- package/src/components/Panel/index.tsx +0 -912
- package/src/components/Panel/panel.screenshot.tsx +0 -29
- package/src/components/Paragraph/index.tsx +0 -43
- package/src/components/Popover/index.tsx +0 -68
- package/src/components/RadioGroup/index.tsx +0 -71
- package/src/components/Slider/index.tsx +0 -358
- package/src/components/Spacer/index.tsx +0 -142
- package/src/components/Spinner/index.tsx +0 -74
- package/src/components/Table/body.tsx +0 -109
- package/src/components/Table/cell.tsx +0 -136
- package/src/components/Table/header.tsx +0 -236
- package/src/components/Table/headerCell.tsx +0 -203
- package/src/components/Table/helpers.ts +0 -308
- package/src/components/Table/index.tsx +0 -797
- package/src/components/Table/row.tsx +0 -288
- package/src/components/Table/value.tsx +0 -28
- package/src/components/Tabs/content.tsx +0 -68
- package/src/components/Tabs/index.tsx +0 -124
- package/src/components/Tabs/item.tsx +0 -198
- package/src/components/Tabs/list.tsx +0 -381
- package/src/components/Tag/group.tsx +0 -73
- package/src/components/Tag/index.tsx +0 -463
- package/src/components/Textarea/index.tsx +0 -277
- package/src/components/TimeAgo/index.tsx +0 -15
- package/src/components/Tree/index.tsx +0 -271
- package/src/constants/animations.ts +0 -9
- package/src/constants/colors.ts +0 -13
- package/src/constants/paging.ts +0 -93
- package/src/constants/sizes.ts +0 -185
- package/src/constants/theme.ts +0 -122
- package/src/containers/Paging.tsx +0 -136
- package/src/containers/PopoverProvider.tsx +0 -124
- package/src/containers/ReqoreProvider.tsx +0 -289
- package/src/containers/ThemeProvider.tsx +0 -12
- package/src/containers/UIProvider.tsx +0 -101
- package/src/context/PopoverContext.tsx +0 -11
- package/src/context/ReqoreContext.tsx +0 -47
- package/src/context/ThemeContext.tsx +0 -4
- package/src/helpers/animations.ts +0 -13
- package/src/helpers/colors.ts +0 -335
- package/src/helpers/time.ts +0 -21
- package/src/helpers/utils.ts +0 -152
- package/src/hooks/useAutoFocus.ts +0 -106
- package/src/hooks/useCloneThroughFragments.ts +0 -39
- package/src/hooks/useCombinedRefs.ts +0 -26
- package/src/hooks/useLatestZIndex.ts +0 -13
- package/src/hooks/useOutsideClick.ts +0 -29
- package/src/hooks/usePaging.ts +0 -128
- package/src/hooks/usePopover.tsx +0 -220
- package/src/hooks/useQueryWithDelay.ts +0 -30
- package/src/hooks/useReqore.ts +0 -12
- package/src/hooks/useReqoreContext.ts +0 -16
- package/src/hooks/useReqoreEffect.ts +0 -49
- package/src/hooks/useTextareaAutoSize.ts +0 -22
- package/src/hooks/useTheme.ts +0 -48
- package/src/hooks/useTooltip.ts +0 -40
- package/src/hooks/useWhyDidYouUpdate.ts +0 -32
- package/src/icons.json +0 -2295
- package/src/index.tsx +0 -79
- package/src/mock/breadcrumbs.ts +0 -146
- package/src/mock/collectionData.tsx +0 -380
- package/src/mock/data.json +0 -11000
- package/src/mock/icons.ts +0 -32
- package/src/mock/menu.ts +0 -93
- package/src/mock/multiSelect.ts +0 -71
- package/src/mock/object.json +0 -317
- package/src/mock/styleMock.js +0 -1
- package/src/mock/tableData.ts +0 -64
- package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +0 -27
- package/src/stories/Button/Button.stories.tsx +0 -405
- package/src/stories/Checkbox/Checkbox.stories.tsx +0 -75
- package/src/stories/Collection/Collection.stories.tsx +0 -317
- package/src/stories/Columns/Columns.stories.tsx +0 -158
- package/src/stories/Comment/Comment.stories.tsx +0 -136
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +0 -399
- package/src/stories/Drawer/Drawer.stories.tsx +0 -294
- package/src/stories/Dropdown/Dropdown.stories.tsx +0 -375
- package/src/stories/Dropdown/DropdownTests.stories.tsx +0 -111
- package/src/stories/ExportModal/ExportModal.stories.tsx +0 -18
- package/src/stories/Header/Header.stories.tsx +0 -108
- package/src/stories/Icon/Icon.stories.tsx +0 -162
- package/src/stories/Input/Input.stories.tsx +0 -220
- package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +0 -346
- package/src/stories/Label/Label.stories.tsx +0 -33
- package/src/stories/Menu/Menu.stories.tsx +0 -367
- package/src/stories/Message/Message.stories.tsx +0 -167
- package/src/stories/Modal/Manager.stories.tsx +0 -192
- package/src/stories/Modal/Modal.stories.tsx +0 -252
- package/src/stories/MultiSelect/MultiSelect.stories.tsx +0 -140
- package/src/stories/Navbar/Navbar.stories.tsx +0 -119
- package/src/stories/Notifications/Interactive.stories.tsx +0 -117
- package/src/stories/Notifications/Notification.stories.tsx +0 -216
- package/src/stories/Notifications/Notifications.stories.tsx +0 -81
- package/src/stories/Paging/Paging.stories.tsx +0 -255
- package/src/stories/Panel/Panel.stories.tsx +0 -753
- package/src/stories/Paragraph/Paragraph.stories.tsx +0 -108
- package/src/stories/Popover/Popover.stories.tsx +0 -510
- package/src/stories/RadioGroup/RadioGroup.stories.tsx +0 -212
- package/src/stories/Slider/Slider.stories.tsx +0 -173
- package/src/stories/Spacer/Spacer.stories.tsx +0 -100
- package/src/stories/Spinner/Spinner.stories.tsx +0 -82
- package/src/stories/Table/Table.stories.tsx +0 -571
- package/src/stories/Tabs/Tabs.stories.tsx +0 -346
- package/src/stories/Tag/Tag.stories.tsx +0 -381
- package/src/stories/Tag/TagGroup.stories.tsx +0 -307
- package/src/stories/TextArea/TextArea.stories.tsx +0 -287
- package/src/stories/TextArea/TextAreaTests.stories.tsx +0 -108
- package/src/stories/Tree/Tree.stories.tsx +0 -124
- package/src/stories/Wrapper.tsx +0 -13
- package/src/stories/utils/args.ts +0 -151
- package/src/stories/utils.ts +0 -39
- package/src/styles.ts +0 -124
- package/src/types/global.ts +0 -211
- package/src/types/icons.ts +0 -2272
- package/tsconfig.prod.json +0 -26
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
|
-
import { noop } from 'lodash';
|
|
3
|
-
import { IReqoreTagProps } from '../../components/Tag';
|
|
4
|
-
import { IReqoreTagGroup } from '../../components/Tag/group';
|
|
5
|
-
import { ReqoreTag, ReqoreTagGroup, ReqoreVerticalSpacer } from '../../index';
|
|
6
|
-
import { StoryMeta } from '../utils';
|
|
7
|
-
import { SizeArg, argManager } from '../utils/args';
|
|
8
|
-
|
|
9
|
-
const { createArg } = argManager<IReqoreTagGroup & IReqoreTagProps>();
|
|
10
|
-
|
|
11
|
-
const meta = {
|
|
12
|
-
title: 'Form/Tag/Stories',
|
|
13
|
-
component: ReqoreTag,
|
|
14
|
-
args: {
|
|
15
|
-
onClick: noop,
|
|
16
|
-
onRemoveClick: noop,
|
|
17
|
-
rightIcon: 'EBike2Line',
|
|
18
|
-
actions: [
|
|
19
|
-
{
|
|
20
|
-
icon: '24HoursFill',
|
|
21
|
-
onClick: noop,
|
|
22
|
-
disabled: true,
|
|
23
|
-
intent: 'info',
|
|
24
|
-
tooltip: { content: 'I am a tooltip' },
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
icon: 'SpyFill',
|
|
28
|
-
onClick: noop,
|
|
29
|
-
intent: 'success',
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
argTypes: {
|
|
34
|
-
...SizeArg,
|
|
35
|
-
...createArg('columns', {
|
|
36
|
-
name: 'Columns',
|
|
37
|
-
description: 'Number of columns',
|
|
38
|
-
control: 'number',
|
|
39
|
-
}),
|
|
40
|
-
...createArg('onClick', {
|
|
41
|
-
defaultValue: noop,
|
|
42
|
-
table: {
|
|
43
|
-
disable: true,
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
...createArg('onRemoveClick', {
|
|
47
|
-
defaultValue: noop,
|
|
48
|
-
table: {
|
|
49
|
-
disable: true,
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
...createArg('rightIcon', {
|
|
53
|
-
defaultValue: 'EBike2Line',
|
|
54
|
-
name: 'Right Icon',
|
|
55
|
-
description: 'Right icon',
|
|
56
|
-
control: 'text',
|
|
57
|
-
}),
|
|
58
|
-
...createArg('actions', {
|
|
59
|
-
table: {
|
|
60
|
-
disable: true,
|
|
61
|
-
},
|
|
62
|
-
}),
|
|
63
|
-
},
|
|
64
|
-
} as StoryMeta<typeof ReqoreTag>;
|
|
65
|
-
|
|
66
|
-
export default meta;
|
|
67
|
-
type Story = StoryObj<typeof meta>;
|
|
68
|
-
|
|
69
|
-
const Template: StoryFn<IReqoreTagProps> = (args) => {
|
|
70
|
-
return (
|
|
71
|
-
<>
|
|
72
|
-
<ReqoreTagGroup>
|
|
73
|
-
<ReqoreTag {...args} actions={null} onRemoveClick={null} rightIcon={null} label={1} />
|
|
74
|
-
<ReqoreTag
|
|
75
|
-
{...args}
|
|
76
|
-
actions={null}
|
|
77
|
-
onRemoveClick={null}
|
|
78
|
-
rightIcon={null}
|
|
79
|
-
label='Basic Tag'
|
|
80
|
-
onClick={() => console.log('Tag clicked')}
|
|
81
|
-
/>
|
|
82
|
-
<ReqoreTag
|
|
83
|
-
{...args}
|
|
84
|
-
actions={null}
|
|
85
|
-
onRemoveClick={null}
|
|
86
|
-
rightIcon={null}
|
|
87
|
-
labelKey='Number'
|
|
88
|
-
label={2}
|
|
89
|
-
/>
|
|
90
|
-
<ReqoreTag label='With Icon' icon='AlarmWarningLine' {...args} />
|
|
91
|
-
<ReqoreTag
|
|
92
|
-
{...args}
|
|
93
|
-
labelKey='Without label'
|
|
94
|
-
icon='AlarmWarningLine'
|
|
95
|
-
rightIcon='24HoursFill'
|
|
96
|
-
/>
|
|
97
|
-
<ReqoreTag
|
|
98
|
-
label='With Icon Colors'
|
|
99
|
-
icon='AlarmWarningLine'
|
|
100
|
-
{...args}
|
|
101
|
-
iconColor='warning:lighten:2'
|
|
102
|
-
/>
|
|
103
|
-
<ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' {...args} />
|
|
104
|
-
<ReqoreTag labelKey='Key' label='value' {...args} />
|
|
105
|
-
<ReqoreTag icon='QuestionAnswerLine' {...args} fixed />
|
|
106
|
-
<ReqoreTag label='Disabled Tag' disabled icon='AlarmWarningLine' {...args} />
|
|
107
|
-
<ReqoreTag
|
|
108
|
-
label='300px Tag'
|
|
109
|
-
width='300px'
|
|
110
|
-
fixed
|
|
111
|
-
icon='AlarmWarningLine'
|
|
112
|
-
{...args}
|
|
113
|
-
tooltip='I am wiiiiiiide'
|
|
114
|
-
actions={[
|
|
115
|
-
{
|
|
116
|
-
icon: 'ErrorWarningLine',
|
|
117
|
-
onClick: noop,
|
|
118
|
-
intent: 'info',
|
|
119
|
-
tooltip: {
|
|
120
|
-
content: 'IF YOU CAN SEE ME ITS A BUG!!! I HAVE show: false',
|
|
121
|
-
openOnMount: true,
|
|
122
|
-
intent: 'danger',
|
|
123
|
-
},
|
|
124
|
-
show: false,
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
icon: '24HoursFill',
|
|
128
|
-
onClick: noop,
|
|
129
|
-
disabled: true,
|
|
130
|
-
intent: 'info',
|
|
131
|
-
tooltip: { content: 'I am a tooltip' },
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
icon: 'SpyFill',
|
|
135
|
-
onClick: noop,
|
|
136
|
-
intent: 'success',
|
|
137
|
-
},
|
|
138
|
-
]}
|
|
139
|
-
/>
|
|
140
|
-
<ReqoreTag
|
|
141
|
-
label='300px fixed Tag with a big description that should wrap and make the tag bigger'
|
|
142
|
-
width='300px'
|
|
143
|
-
fixed
|
|
144
|
-
icon='AlarmWarningLine'
|
|
145
|
-
{...args}
|
|
146
|
-
tooltip='I am wiiiiiiide'
|
|
147
|
-
actions={[
|
|
148
|
-
{
|
|
149
|
-
icon: 'ErrorWarningLine',
|
|
150
|
-
onClick: noop,
|
|
151
|
-
intent: 'info',
|
|
152
|
-
tooltip: {
|
|
153
|
-
content: 'IF YOU CAN SEE ME ITS A BUG!!! I HAVE show: false',
|
|
154
|
-
openOnMount: true,
|
|
155
|
-
intent: 'danger',
|
|
156
|
-
},
|
|
157
|
-
show: false,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
icon: '24HoursFill',
|
|
161
|
-
onClick: noop,
|
|
162
|
-
disabled: true,
|
|
163
|
-
intent: 'info',
|
|
164
|
-
tooltip: { content: 'I am a tooltip' },
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
icon: 'SpyFill',
|
|
168
|
-
onClick: noop,
|
|
169
|
-
intent: 'success',
|
|
170
|
-
},
|
|
171
|
-
]}
|
|
172
|
-
/>
|
|
173
|
-
<ReqoreTag label='Danger Tag' icon='AlarmWarningLine' intent='danger' {...args} />
|
|
174
|
-
<ReqoreTag label='Transparent tag' icon='Ghost2Line' {...args} color='transparent' />
|
|
175
|
-
<ReqoreTag
|
|
176
|
-
label='Custom Color Tag'
|
|
177
|
-
icon='AlarmWarningLine'
|
|
178
|
-
color='#38fdb2'
|
|
179
|
-
{...args}
|
|
180
|
-
tooltip={{ content: 'Hm, another tooltip', openOnMount: true }}
|
|
181
|
-
/>
|
|
182
|
-
<ReqoreTag
|
|
183
|
-
label='Custom Effect Tag'
|
|
184
|
-
effect={{
|
|
185
|
-
gradient: {
|
|
186
|
-
colors: '#ff47a3',
|
|
187
|
-
},
|
|
188
|
-
}}
|
|
189
|
-
labelKeyEffect={{
|
|
190
|
-
gradient: {
|
|
191
|
-
colors: '#b8f58a',
|
|
192
|
-
},
|
|
193
|
-
weight: 'thin',
|
|
194
|
-
spaced: 2,
|
|
195
|
-
uppercase: true,
|
|
196
|
-
}}
|
|
197
|
-
labelEffect={{
|
|
198
|
-
gradient: {
|
|
199
|
-
colors: {
|
|
200
|
-
0: '#00e3e8',
|
|
201
|
-
100: '#143a40',
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
weight: 'bold',
|
|
205
|
-
}}
|
|
206
|
-
labelKey='Effect'
|
|
207
|
-
icon='Css3Fill'
|
|
208
|
-
{...args}
|
|
209
|
-
/>
|
|
210
|
-
<ReqoreTag
|
|
211
|
-
{...args}
|
|
212
|
-
label='No Buttons Tag'
|
|
213
|
-
icon='CarLine'
|
|
214
|
-
color='#0b4578'
|
|
215
|
-
rightIcon={args.rightIcon}
|
|
216
|
-
actions={null}
|
|
217
|
-
onRemoveClick={null}
|
|
218
|
-
/>
|
|
219
|
-
<ReqoreTag
|
|
220
|
-
{...args}
|
|
221
|
-
label='Minimal Tag'
|
|
222
|
-
minimal
|
|
223
|
-
icon='ShareForward2Fill'
|
|
224
|
-
rightIcon={args.rightIcon}
|
|
225
|
-
actions={null}
|
|
226
|
-
onRemoveClick={null}
|
|
227
|
-
/>
|
|
228
|
-
<ReqoreTag
|
|
229
|
-
{...args}
|
|
230
|
-
label='Minimal Tag with Intent'
|
|
231
|
-
minimal
|
|
232
|
-
intent='warning'
|
|
233
|
-
icon='ShareForward2Fill'
|
|
234
|
-
rightIcon={args.rightIcon}
|
|
235
|
-
actions={null}
|
|
236
|
-
onRemoveClick={null}
|
|
237
|
-
/>
|
|
238
|
-
<ReqoreTag
|
|
239
|
-
{...args}
|
|
240
|
-
labelKey='This is the key for a wrapped tag'
|
|
241
|
-
label='Wrapped tag with some long text and width specified, no wrap specified'
|
|
242
|
-
icon='ShareForward2Fill'
|
|
243
|
-
rightIcon={args.rightIcon}
|
|
244
|
-
width='400px'
|
|
245
|
-
onRemoveClick={null}
|
|
246
|
-
actions={[
|
|
247
|
-
{
|
|
248
|
-
icon: '24HoursFill',
|
|
249
|
-
onClick: noop,
|
|
250
|
-
disabled: true,
|
|
251
|
-
intent: 'info',
|
|
252
|
-
tooltip: { content: 'I am a tooltip' },
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
icon: 'SpyFill',
|
|
256
|
-
onClick: noop,
|
|
257
|
-
intent: 'success',
|
|
258
|
-
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
259
|
-
},
|
|
260
|
-
]}
|
|
261
|
-
/>
|
|
262
|
-
<ReqoreTag
|
|
263
|
-
{...args}
|
|
264
|
-
labelKey='This is the key for a wrapped tag'
|
|
265
|
-
label='Wrapped tag with some long text and NO width specified, AND wrap specified'
|
|
266
|
-
icon='ShareForward2Fill'
|
|
267
|
-
rightIcon={args.rightIcon}
|
|
268
|
-
leftIconColor='#00fafd'
|
|
269
|
-
rightIconColor='#eb0e8c'
|
|
270
|
-
wrap
|
|
271
|
-
onRemoveClick={null}
|
|
272
|
-
actions={[
|
|
273
|
-
{
|
|
274
|
-
icon: '24HoursFill',
|
|
275
|
-
onClick: noop,
|
|
276
|
-
disabled: true,
|
|
277
|
-
intent: 'info',
|
|
278
|
-
tooltip: { content: 'I am a tooltip' },
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
icon: 'SpyFill',
|
|
282
|
-
onClick: noop,
|
|
283
|
-
intent: 'success',
|
|
284
|
-
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
285
|
-
},
|
|
286
|
-
]}
|
|
287
|
-
/>
|
|
288
|
-
<ReqoreTag
|
|
289
|
-
{...args}
|
|
290
|
-
labelKey='Fixed'
|
|
291
|
-
fixed='key'
|
|
292
|
-
label='Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed key'
|
|
293
|
-
icon='DriveLine'
|
|
294
|
-
rightIcon={args.rightIcon}
|
|
295
|
-
wrap
|
|
296
|
-
onRemoveClick={null}
|
|
297
|
-
actions={[
|
|
298
|
-
{
|
|
299
|
-
icon: '24HoursFill',
|
|
300
|
-
onClick: noop,
|
|
301
|
-
disabled: true,
|
|
302
|
-
intent: 'info',
|
|
303
|
-
tooltip: { content: 'I am a tooltip' },
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
icon: 'SpyFill',
|
|
307
|
-
onClick: noop,
|
|
308
|
-
intent: 'success',
|
|
309
|
-
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
310
|
-
},
|
|
311
|
-
]}
|
|
312
|
-
/>
|
|
313
|
-
<ReqoreTag
|
|
314
|
-
{...args}
|
|
315
|
-
labelKey='Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed label, Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed label'
|
|
316
|
-
fixed='label'
|
|
317
|
-
label='Fixed'
|
|
318
|
-
icon='DriveLine'
|
|
319
|
-
rightIcon={args.rightIcon}
|
|
320
|
-
wrap
|
|
321
|
-
onRemoveClick={null}
|
|
322
|
-
actions={[
|
|
323
|
-
{
|
|
324
|
-
icon: '24HoursFill',
|
|
325
|
-
onClick: noop,
|
|
326
|
-
disabled: true,
|
|
327
|
-
intent: 'info',
|
|
328
|
-
tooltip: { content: 'I am a tooltip' },
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
icon: 'SpyFill',
|
|
332
|
-
onClick: noop,
|
|
333
|
-
intent: 'success',
|
|
334
|
-
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
335
|
-
},
|
|
336
|
-
]}
|
|
337
|
-
/>
|
|
338
|
-
</ReqoreTagGroup>
|
|
339
|
-
<ReqoreVerticalSpacer height={5} />
|
|
340
|
-
<ReqoreTagGroup>
|
|
341
|
-
<ReqoreTag label='Center aligned' align='center' {...args} />
|
|
342
|
-
</ReqoreTagGroup>
|
|
343
|
-
<ReqoreVerticalSpacer height={5} />
|
|
344
|
-
<ReqoreTagGroup>
|
|
345
|
-
<ReqoreTag label='Right aligned' align='right' {...args} />
|
|
346
|
-
</ReqoreTagGroup>
|
|
347
|
-
</>
|
|
348
|
-
);
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
export const Basic: Story = {
|
|
352
|
-
render: Template,
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export const Badge: Story = {
|
|
356
|
-
render: Template,
|
|
357
|
-
args: { asBadge: true },
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
export const Wrap: Story = {
|
|
361
|
-
render: Template,
|
|
362
|
-
args: { wrap: true },
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
export const Effect = {
|
|
366
|
-
render: Template,
|
|
367
|
-
|
|
368
|
-
args: {
|
|
369
|
-
effect: {
|
|
370
|
-
gradient: {
|
|
371
|
-
direction: 'to right bottom',
|
|
372
|
-
colors: { 0: '#33023c', 100: '#0a487b' },
|
|
373
|
-
},
|
|
374
|
-
color: '#ffffff',
|
|
375
|
-
spaced: 2,
|
|
376
|
-
uppercase: true,
|
|
377
|
-
weight: 'thick',
|
|
378
|
-
textSize: 'small',
|
|
379
|
-
},
|
|
380
|
-
},
|
|
381
|
-
};
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
|
-
import { noop } from 'lodash';
|
|
3
|
-
import { IReqoreTagGroup } from '../../components/Tag/group';
|
|
4
|
-
import { ReqoreTag, ReqoreTagGroup } from '../../index';
|
|
5
|
-
import { StoryMeta } from '../utils';
|
|
6
|
-
import { SizeArg, argManager } from '../utils/args';
|
|
7
|
-
|
|
8
|
-
const { createArg } = argManager<IReqoreTagGroup>();
|
|
9
|
-
|
|
10
|
-
const meta = {
|
|
11
|
-
title: 'Form/Tag Group/Stories',
|
|
12
|
-
component: ReqoreTagGroup,
|
|
13
|
-
args: {
|
|
14
|
-
onClick: noop,
|
|
15
|
-
onRemoveClick: noop,
|
|
16
|
-
rightIcon: 'EBike2Line',
|
|
17
|
-
actions: [
|
|
18
|
-
{
|
|
19
|
-
icon: '24HoursFill',
|
|
20
|
-
onClick: noop,
|
|
21
|
-
disabled: true,
|
|
22
|
-
intent: 'info',
|
|
23
|
-
tooltip: { content: 'I am a tooltip' },
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
icon: 'SpyFill',
|
|
27
|
-
onClick: noop,
|
|
28
|
-
intent: 'success',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
argTypes: {
|
|
33
|
-
...SizeArg,
|
|
34
|
-
...createArg('columns', {
|
|
35
|
-
name: 'Columns',
|
|
36
|
-
description: 'Number of columns',
|
|
37
|
-
control: 'number',
|
|
38
|
-
}),
|
|
39
|
-
...createArg('onClick', {
|
|
40
|
-
defaultValue: noop,
|
|
41
|
-
table: {
|
|
42
|
-
disable: true,
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
},
|
|
46
|
-
} as StoryMeta<typeof ReqoreTagGroup>;
|
|
47
|
-
|
|
48
|
-
export default meta;
|
|
49
|
-
type Story = StoryObj<typeof meta>;
|
|
50
|
-
|
|
51
|
-
const Template: StoryFn<IReqoreTagGroup> = (args) => {
|
|
52
|
-
return (
|
|
53
|
-
<ReqoreTagGroup {...args}>
|
|
54
|
-
<ReqoreTag actions={null} onRemoveClick={null} rightIcon={null} label={1} />
|
|
55
|
-
<ReqoreTag
|
|
56
|
-
actions={null}
|
|
57
|
-
onRemoveClick={null}
|
|
58
|
-
rightIcon={null}
|
|
59
|
-
label='Basic Tag'
|
|
60
|
-
onClick={() => console.log('Tag clicked')}
|
|
61
|
-
/>
|
|
62
|
-
<ReqoreTag actions={null} onRemoveClick={null} rightIcon={null} labelKey='Number' label={2} />
|
|
63
|
-
<ReqoreTag label='With Icon' icon='AlarmWarningLine' />
|
|
64
|
-
<ReqoreTag label='With Icon Colors' icon='AlarmWarningLine' iconColor='warning:lighten:2' />
|
|
65
|
-
<ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' />
|
|
66
|
-
<ReqoreTag labelKey='Key' label='value' />
|
|
67
|
-
<ReqoreTag icon='QuestionAnswerLine' fixed />
|
|
68
|
-
<ReqoreTag label='Disabled Tag' disabled icon='AlarmWarningLine' />
|
|
69
|
-
<ReqoreTag
|
|
70
|
-
label='300px Tag'
|
|
71
|
-
width='300px'
|
|
72
|
-
fixed
|
|
73
|
-
icon='AlarmWarningLine'
|
|
74
|
-
tooltip='I am wiiiiiiide'
|
|
75
|
-
actions={[
|
|
76
|
-
{
|
|
77
|
-
icon: 'ErrorWarningLine',
|
|
78
|
-
onClick: noop,
|
|
79
|
-
intent: 'info',
|
|
80
|
-
tooltip: {
|
|
81
|
-
content: 'IF YOU CAN SEE ME ITS A BUG!!! I HAVE show: false',
|
|
82
|
-
openOnMount: true,
|
|
83
|
-
intent: 'danger',
|
|
84
|
-
},
|
|
85
|
-
show: false,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
icon: '24HoursFill',
|
|
89
|
-
onClick: noop,
|
|
90
|
-
disabled: true,
|
|
91
|
-
intent: 'info',
|
|
92
|
-
tooltip: { content: 'I am a tooltip' },
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
icon: 'SpyFill',
|
|
96
|
-
onClick: noop,
|
|
97
|
-
intent: 'success',
|
|
98
|
-
},
|
|
99
|
-
]}
|
|
100
|
-
/>
|
|
101
|
-
<ReqoreTag
|
|
102
|
-
label='300px fixed Tag with a big description that should wrap and make the tag bigger'
|
|
103
|
-
width='300px'
|
|
104
|
-
fixed
|
|
105
|
-
icon='AlarmWarningLine'
|
|
106
|
-
tooltip='I am wiiiiiiide'
|
|
107
|
-
actions={[
|
|
108
|
-
{
|
|
109
|
-
icon: 'ErrorWarningLine',
|
|
110
|
-
onClick: noop,
|
|
111
|
-
intent: 'info',
|
|
112
|
-
tooltip: {
|
|
113
|
-
content: 'IF YOU CAN SEE ME ITS A BUG!!! I HAVE show: false',
|
|
114
|
-
openOnMount: true,
|
|
115
|
-
intent: 'danger',
|
|
116
|
-
},
|
|
117
|
-
show: false,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
icon: '24HoursFill',
|
|
121
|
-
onClick: noop,
|
|
122
|
-
disabled: true,
|
|
123
|
-
intent: 'info',
|
|
124
|
-
tooltip: { content: 'I am a tooltip' },
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
icon: 'SpyFill',
|
|
128
|
-
onClick: noop,
|
|
129
|
-
intent: 'success',
|
|
130
|
-
},
|
|
131
|
-
]}
|
|
132
|
-
/>
|
|
133
|
-
<ReqoreTag label='Danger Tag' icon='AlarmWarningLine' intent='danger' />
|
|
134
|
-
<ReqoreTag
|
|
135
|
-
label='Custom Color Tag'
|
|
136
|
-
icon='AlarmWarningLine'
|
|
137
|
-
color='#38fdb2'
|
|
138
|
-
tooltip={{ content: 'Hm, another tooltip', openOnMount: true }}
|
|
139
|
-
/>
|
|
140
|
-
<ReqoreTag
|
|
141
|
-
label='Custom Effect Tag'
|
|
142
|
-
effect={{
|
|
143
|
-
gradient: {
|
|
144
|
-
colors: '#ff47a3',
|
|
145
|
-
},
|
|
146
|
-
}}
|
|
147
|
-
labelKeyEffect={{
|
|
148
|
-
gradient: {
|
|
149
|
-
colors: '#b8f58a',
|
|
150
|
-
},
|
|
151
|
-
weight: 'thin',
|
|
152
|
-
spaced: 2,
|
|
153
|
-
uppercase: true,
|
|
154
|
-
}}
|
|
155
|
-
labelEffect={{
|
|
156
|
-
gradient: {
|
|
157
|
-
colors: {
|
|
158
|
-
0: '#00e3e8',
|
|
159
|
-
100: '#143a40',
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
weight: 'bold',
|
|
163
|
-
}}
|
|
164
|
-
labelKey='Effect'
|
|
165
|
-
icon='Css3Fill'
|
|
166
|
-
/>
|
|
167
|
-
<ReqoreTag
|
|
168
|
-
label='No Buttons Tag'
|
|
169
|
-
icon='CarLine'
|
|
170
|
-
color='#0b4578'
|
|
171
|
-
actions={null}
|
|
172
|
-
onRemoveClick={null}
|
|
173
|
-
/>
|
|
174
|
-
<ReqoreTag
|
|
175
|
-
label='Minimal Tag'
|
|
176
|
-
minimal
|
|
177
|
-
icon='ShareForward2Fill'
|
|
178
|
-
actions={null}
|
|
179
|
-
onRemoveClick={null}
|
|
180
|
-
/>
|
|
181
|
-
<ReqoreTag
|
|
182
|
-
label='Minimal Tag with Intent'
|
|
183
|
-
minimal
|
|
184
|
-
intent='warning'
|
|
185
|
-
icon='ShareForward2Fill'
|
|
186
|
-
actions={null}
|
|
187
|
-
onRemoveClick={null}
|
|
188
|
-
/>
|
|
189
|
-
<ReqoreTag
|
|
190
|
-
labelKey='This is the key for a wrapped tag'
|
|
191
|
-
label='Wrapped tag with some long text and width specified, no wrap specified'
|
|
192
|
-
icon='ShareForward2Fill'
|
|
193
|
-
width='400px'
|
|
194
|
-
onRemoveClick={null}
|
|
195
|
-
actions={[
|
|
196
|
-
{
|
|
197
|
-
icon: '24HoursFill',
|
|
198
|
-
onClick: noop,
|
|
199
|
-
disabled: true,
|
|
200
|
-
intent: 'info',
|
|
201
|
-
tooltip: { content: 'I am a tooltip' },
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
icon: 'SpyFill',
|
|
205
|
-
onClick: noop,
|
|
206
|
-
intent: 'success',
|
|
207
|
-
tooltip: { content: 'Hm, another tooltip', openOnMount: true },
|
|
208
|
-
},
|
|
209
|
-
]}
|
|
210
|
-
/>
|
|
211
|
-
<ReqoreTag
|
|
212
|
-
labelKey='This is the key for a wrapped tag'
|
|
213
|
-
label='Wrapped tag with some long text and NO width specified, AND wrap specified'
|
|
214
|
-
icon='ShareForward2Fill'
|
|
215
|
-
leftIconColor='#00fafd'
|
|
216
|
-
rightIconColor='#eb0e8c'
|
|
217
|
-
wrap
|
|
218
|
-
onRemoveClick={null}
|
|
219
|
-
actions={[
|
|
220
|
-
{
|
|
221
|
-
icon: '24HoursFill',
|
|
222
|
-
onClick: noop,
|
|
223
|
-
disabled: true,
|
|
224
|
-
intent: 'info',
|
|
225
|
-
tooltip: { content: 'I am a tooltip' },
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
icon: 'SpyFill',
|
|
229
|
-
onClick: noop,
|
|
230
|
-
intent: 'success',
|
|
231
|
-
tooltip: { content: 'Hm, another tooltip' },
|
|
232
|
-
},
|
|
233
|
-
]}
|
|
234
|
-
/>
|
|
235
|
-
<ReqoreTag
|
|
236
|
-
labelKey='Fixed'
|
|
237
|
-
fixed='key'
|
|
238
|
-
label='Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed key'
|
|
239
|
-
icon='DriveLine'
|
|
240
|
-
wrap
|
|
241
|
-
onRemoveClick={null}
|
|
242
|
-
actions={[
|
|
243
|
-
{
|
|
244
|
-
icon: '24HoursFill',
|
|
245
|
-
onClick: noop,
|
|
246
|
-
disabled: true,
|
|
247
|
-
intent: 'info',
|
|
248
|
-
tooltip: { content: 'I am a tooltip' },
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
icon: 'SpyFill',
|
|
252
|
-
onClick: noop,
|
|
253
|
-
intent: 'success',
|
|
254
|
-
tooltip: { content: 'Hm, another tooltip' },
|
|
255
|
-
},
|
|
256
|
-
]}
|
|
257
|
-
/>
|
|
258
|
-
<ReqoreTag
|
|
259
|
-
labelKey='Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed label, Wrapped tag with some long text and NO width specified, AND wrap specified, with fixed label'
|
|
260
|
-
fixed='label'
|
|
261
|
-
label='Fixed'
|
|
262
|
-
icon='DriveLine'
|
|
263
|
-
wrap
|
|
264
|
-
onRemoveClick={null}
|
|
265
|
-
actions={[
|
|
266
|
-
{
|
|
267
|
-
icon: '24HoursFill',
|
|
268
|
-
onClick: noop,
|
|
269
|
-
disabled: true,
|
|
270
|
-
intent: 'info',
|
|
271
|
-
tooltip: { content: 'I am a tooltip' },
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
icon: 'SpyFill',
|
|
275
|
-
onClick: noop,
|
|
276
|
-
intent: 'success',
|
|
277
|
-
tooltip: { content: 'Hm, another tooltip' },
|
|
278
|
-
},
|
|
279
|
-
]}
|
|
280
|
-
/>
|
|
281
|
-
</ReqoreTagGroup>
|
|
282
|
-
);
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
export const Basic: Story = {
|
|
286
|
-
render: Template,
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export const BigGapSize: Story = {
|
|
290
|
-
render: Template,
|
|
291
|
-
args: { gapSize: 'big' },
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
export const NoWrap: Story = {
|
|
295
|
-
render: Template,
|
|
296
|
-
args: { wrap: false },
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
export const CenterAlign: Story = {
|
|
300
|
-
render: Template,
|
|
301
|
-
args: { align: 'center' },
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export const RightAlign: Story = {
|
|
305
|
-
render: Template,
|
|
306
|
-
args: { align: 'right' },
|
|
307
|
-
};
|