@qoretechnologies/reqore 0.30.5 → 0.30.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/CODE_OF_CONDUCT.md +105 -0
  2. package/CONTRIBUTING.MD +78 -0
  3. package/LICENSE +1 -1
  4. package/README.md +44 -2
  5. package/SECURITY.md +5 -0
  6. package/__tests__/collection.test.tsx +1 -1
  7. package/__tests__/{control_group.test.tsx → control_group.text.tsx} +2 -4
  8. package/__tests__/modal.test.tsx +2 -74
  9. package/__tests__/panel.test.tsx +24 -96
  10. package/__tests__/popover.test.tsx +2 -24
  11. package/__tests__/tabs.test.tsx +0 -75
  12. package/dist/components/Button/index.d.ts +2 -7
  13. package/dist/components/Button/index.d.ts.map +1 -1
  14. package/dist/components/Button/index.js +20 -30
  15. package/dist/components/Button/index.js.map +1 -1
  16. package/dist/components/Checkbox/index.d.ts.map +1 -1
  17. package/dist/components/Checkbox/index.js +3 -6
  18. package/dist/components/Checkbox/index.js.map +1 -1
  19. package/dist/components/Collection/index.d.ts +2 -7
  20. package/dist/components/Collection/index.d.ts.map +1 -1
  21. package/dist/components/Collection/index.js +53 -57
  22. package/dist/components/Collection/index.js.map +1 -1
  23. package/dist/components/Collection/item.d.ts +5 -5
  24. package/dist/components/Collection/item.d.ts.map +1 -1
  25. package/dist/components/Collection/item.js +4 -15
  26. package/dist/components/Collection/item.js.map +1 -1
  27. package/dist/components/Columns/column.d.ts.map +1 -1
  28. package/dist/components/Columns/column.js +1 -1
  29. package/dist/components/Columns/column.js.map +1 -1
  30. package/dist/components/ControlGroup/index.d.ts +4 -21
  31. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  32. package/dist/components/ControlGroup/index.js +55 -250
  33. package/dist/components/ControlGroup/index.js.map +1 -1
  34. package/dist/components/Drawer/index.d.ts +3 -3
  35. package/dist/components/Drawer/index.d.ts.map +1 -1
  36. package/dist/components/Drawer/index.js +16 -27
  37. package/dist/components/Drawer/index.js.map +1 -1
  38. package/dist/components/Dropdown/index.d.ts +0 -1
  39. package/dist/components/Dropdown/index.d.ts.map +1 -1
  40. package/dist/components/Dropdown/index.js +2 -2
  41. package/dist/components/Dropdown/index.js.map +1 -1
  42. package/dist/components/Dropdown/list.d.ts +3 -3
  43. package/dist/components/Dropdown/list.d.ts.map +1 -1
  44. package/dist/components/Effect/index.d.ts +10 -10
  45. package/dist/components/Effect/index.d.ts.map +1 -1
  46. package/dist/components/Effect/index.js +6 -7
  47. package/dist/components/Effect/index.js.map +1 -1
  48. package/dist/components/Icon/index.d.ts +6 -5
  49. package/dist/components/Icon/index.d.ts.map +1 -1
  50. package/dist/components/Icon/index.js +7 -14
  51. package/dist/components/Icon/index.js.map +1 -1
  52. package/dist/components/Input/index.d.ts +0 -2
  53. package/dist/components/Input/index.d.ts.map +1 -1
  54. package/dist/components/Input/index.js +4 -10
  55. package/dist/components/Input/index.js.map +1 -1
  56. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  57. package/dist/components/InternalPopover/index.js +10 -12
  58. package/dist/components/InternalPopover/index.js.map +1 -1
  59. package/dist/components/Menu/index.d.ts.map +1 -1
  60. package/dist/components/Menu/index.js +1 -1
  61. package/dist/components/Menu/index.js.map +1 -1
  62. package/dist/components/Message/index.d.ts +0 -2
  63. package/dist/components/Message/index.d.ts.map +1 -1
  64. package/dist/components/Message/index.js +2 -2
  65. package/dist/components/Message/index.js.map +1 -1
  66. package/dist/components/MultiSelect/index.d.ts +2 -2
  67. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/index.js +10 -10
  69. package/dist/components/MultiSelect/index.js.map +1 -1
  70. package/dist/components/Notifications/index.d.ts +1 -1
  71. package/dist/components/Notifications/index.d.ts.map +1 -1
  72. package/dist/components/Notifications/notification.d.ts +1 -1
  73. package/dist/components/Notifications/notification.d.ts.map +1 -1
  74. package/dist/components/Panel/index.d.ts +6 -13
  75. package/dist/components/Panel/index.d.ts.map +1 -1
  76. package/dist/components/Panel/index.js +44 -78
  77. package/dist/components/Panel/index.js.map +1 -1
  78. package/dist/components/Popover/index.d.ts +2 -1
  79. package/dist/components/Popover/index.d.ts.map +1 -1
  80. package/dist/components/Popover/index.js +2 -2
  81. package/dist/components/Popover/index.js.map +1 -1
  82. package/dist/components/Spacer/index.d.ts +0 -2
  83. package/dist/components/Spacer/index.d.ts.map +1 -1
  84. package/dist/components/Spacer/index.js +7 -29
  85. package/dist/components/Spacer/index.js.map +1 -1
  86. package/dist/components/Table/header.js +2 -2
  87. package/dist/components/Table/header.js.map +1 -1
  88. package/dist/components/Table/headerCell.js +2 -2
  89. package/dist/components/Table/headerCell.js.map +1 -1
  90. package/dist/components/Table/helpers.d.ts +2 -3
  91. package/dist/components/Table/helpers.d.ts.map +1 -1
  92. package/dist/components/Table/helpers.js +3 -6
  93. package/dist/components/Table/helpers.js.map +1 -1
  94. package/dist/components/Table/index.d.ts +3 -4
  95. package/dist/components/Table/index.d.ts.map +1 -1
  96. package/dist/components/Table/index.js.map +1 -1
  97. package/dist/components/Table/row.d.ts +5 -0
  98. package/dist/components/Table/row.d.ts.map +1 -1
  99. package/dist/components/Table/row.js +7 -3
  100. package/dist/components/Table/row.js.map +1 -1
  101. package/dist/components/Tabs/content.d.ts +1 -3
  102. package/dist/components/Tabs/content.d.ts.map +1 -1
  103. package/dist/components/Tabs/content.js +3 -8
  104. package/dist/components/Tabs/content.js.map +1 -1
  105. package/dist/components/Tabs/index.d.ts +1 -4
  106. package/dist/components/Tabs/index.d.ts.map +1 -1
  107. package/dist/components/Tabs/index.js +4 -12
  108. package/dist/components/Tabs/index.js.map +1 -1
  109. package/dist/components/Tabs/item.d.ts +0 -1
  110. package/dist/components/Tabs/item.d.ts.map +1 -1
  111. package/dist/components/Tabs/item.js +7 -7
  112. package/dist/components/Tabs/item.js.map +1 -1
  113. package/dist/components/Tabs/list.d.ts +1 -1
  114. package/dist/components/Tabs/list.d.ts.map +1 -1
  115. package/dist/components/Tabs/list.js +6 -7
  116. package/dist/components/Tabs/list.js.map +1 -1
  117. package/dist/components/Tag/group.d.ts +2 -2
  118. package/dist/components/Tag/group.d.ts.map +1 -1
  119. package/dist/components/Tag/group.js +8 -7
  120. package/dist/components/Tag/group.js.map +1 -1
  121. package/dist/components/Tag/index.d.ts +2 -6
  122. package/dist/components/Tag/index.d.ts.map +1 -1
  123. package/dist/components/Tag/index.js +12 -24
  124. package/dist/components/Tag/index.js.map +1 -1
  125. package/dist/components/Tree/index.js +1 -1
  126. package/dist/components/Tree/index.js.map +1 -1
  127. package/dist/constants/animations.js +1 -1
  128. package/dist/constants/sizes.d.ts +2 -2
  129. package/dist/constants/sizes.d.ts.map +1 -1
  130. package/dist/constants/sizes.js +10 -10
  131. package/dist/constants/sizes.js.map +1 -1
  132. package/dist/constants/theme.d.ts +1 -1
  133. package/dist/constants/theme.d.ts.map +1 -1
  134. package/dist/containers/PopoverProvider.d.ts.map +1 -1
  135. package/dist/containers/PopoverProvider.js +8 -10
  136. package/dist/containers/PopoverProvider.js.map +1 -1
  137. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  138. package/dist/containers/ReqoreProvider.js +2 -4
  139. package/dist/containers/ReqoreProvider.js.map +1 -1
  140. package/dist/containers/UIProvider.d.ts +0 -7
  141. package/dist/containers/UIProvider.d.ts.map +1 -1
  142. package/dist/containers/UIProvider.js.map +1 -1
  143. package/dist/context/ReqoreContext.d.ts +0 -2
  144. package/dist/context/ReqoreContext.d.ts.map +1 -1
  145. package/dist/context/ReqoreContext.js.map +1 -1
  146. package/dist/helpers/colors.d.ts +1 -1
  147. package/dist/helpers/colors.d.ts.map +1 -1
  148. package/dist/helpers/colors.js +2 -6
  149. package/dist/helpers/colors.js.map +1 -1
  150. package/dist/helpers/utils.d.ts +0 -3
  151. package/dist/helpers/utils.d.ts.map +1 -1
  152. package/dist/helpers/utils.js +2 -17
  153. package/dist/helpers/utils.js.map +1 -1
  154. package/dist/hooks/useLatestZIndex.js +2 -2
  155. package/dist/hooks/useLatestZIndex.js.map +1 -1
  156. package/dist/hooks/usePopover.d.ts +0 -1
  157. package/dist/hooks/usePopover.d.ts.map +1 -1
  158. package/dist/hooks/usePopover.js +6 -8
  159. package/dist/hooks/usePopover.js.map +1 -1
  160. package/dist/styles.d.ts +0 -1
  161. package/dist/styles.d.ts.map +1 -1
  162. package/dist/styles.js +5 -6
  163. package/dist/styles.js.map +1 -1
  164. package/dist/types/global.d.ts +1 -27
  165. package/dist/types/global.d.ts.map +1 -1
  166. package/dist/types/icons.d.ts +1 -1
  167. package/dist/types/icons.d.ts.map +1 -1
  168. package/package.json +1 -1
  169. package/public/logo-dark.png +0 -0
  170. package/public/logo.png +0 -0
  171. package/public/q-symbol.png +0 -0
  172. package/public/qoreLogo-dark.png +0 -0
  173. package/public/qoreLogo.png +0 -0
  174. package/src/components/Button/index.tsx +34 -79
  175. package/src/components/Checkbox/index.tsx +2 -3
  176. package/src/components/Collection/index.tsx +60 -93
  177. package/src/components/Collection/item.tsx +9 -29
  178. package/src/components/Columns/column.tsx +0 -1
  179. package/src/components/ControlGroup/index.tsx +104 -449
  180. package/src/components/Drawer/index.tsx +27 -28
  181. package/src/components/Dropdown/index.tsx +1 -3
  182. package/src/components/Effect/index.tsx +14 -22
  183. package/src/components/Icon/index.tsx +62 -81
  184. package/src/components/Input/index.tsx +3 -8
  185. package/src/components/InternalPopover/index.tsx +126 -131
  186. package/src/components/Menu/index.tsx +1 -7
  187. package/src/components/Message/index.tsx +1 -9
  188. package/src/components/MultiSelect/index.tsx +188 -180
  189. package/src/components/Panel/index.tsx +100 -227
  190. package/src/components/Popover/index.tsx +3 -1
  191. package/src/components/Spacer/index.tsx +14 -63
  192. package/src/components/Table/header.tsx +2 -2
  193. package/src/components/Table/headerCell.tsx +2 -2
  194. package/src/components/Table/helpers.ts +6 -12
  195. package/src/components/Table/index.tsx +0 -1
  196. package/src/components/Table/row.tsx +7 -2
  197. package/src/components/Tabs/content.tsx +3 -11
  198. package/src/components/Tabs/index.tsx +3 -14
  199. package/src/components/Tabs/item.tsx +5 -28
  200. package/src/components/Tabs/list.tsx +3 -7
  201. package/src/components/Tag/group.tsx +12 -6
  202. package/src/components/Tag/index.tsx +35 -69
  203. package/src/components/Tree/index.tsx +1 -1
  204. package/src/constants/animations.ts +1 -1
  205. package/src/constants/sizes.ts +10 -10
  206. package/src/containers/PopoverProvider.tsx +8 -11
  207. package/src/containers/ReqoreProvider.tsx +35 -40
  208. package/src/containers/UIProvider.tsx +0 -7
  209. package/src/context/ReqoreContext.tsx +0 -2
  210. package/src/helpers/colors.ts +2 -8
  211. package/src/helpers/utils.ts +0 -18
  212. package/src/hooks/useLatestZIndex.ts +2 -2
  213. package/src/hooks/usePopover.tsx +6 -9
  214. package/src/mock/collectionData.tsx +2 -33
  215. package/src/stories/Button/Button.stories.tsx +7 -72
  216. package/src/stories/Checkbox/Checkbox.stories.tsx +3 -6
  217. package/src/stories/Collection/Collection.stories.tsx +2 -18
  218. package/src/stories/ControlGroup/ControlGroup.stories.tsx +33 -282
  219. package/src/stories/Drawer/Drawer.stories.tsx +3 -70
  220. package/src/stories/Dropdown/Dropdown.stories.tsx +3 -13
  221. package/src/stories/Icon/Icon.stories.tsx +0 -1
  222. package/src/stories/Input/Input.stories.tsx +3 -5
  223. package/src/stories/Menu/Menu.stories.tsx +0 -2
  224. package/src/stories/Message/Message.stories.tsx +0 -7
  225. package/src/stories/Panel/Panel.stories.tsx +13 -147
  226. package/src/stories/Popover/Popover.stories.tsx +82 -88
  227. package/src/stories/Tabs/Tabs.stories.tsx +15 -33
  228. package/src/stories/Tag/Tag.stories.tsx +3 -23
  229. package/src/stories/TextArea/TextArea.stories.tsx +3 -3
  230. package/src/styles.ts +0 -6
  231. package/src/types/global.ts +0 -28
  232. package/tests.json +1 -1
@@ -20,7 +20,7 @@ export default {
20
20
  const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
21
21
  return (
22
22
  <>
23
- <ReqoreControlGroup size={buttonProps.size} wrap>
23
+ <ReqoreControlGroup size={buttonProps.size}>
24
24
  <ReqoreButton {...buttonProps} icon='BankFill' rightIcon={null} />
25
25
  <ReqoreButton {...buttonProps} />
26
26
  <ReqoreButton {...buttonProps}>Default</ReqoreButton>
@@ -41,21 +41,14 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
41
41
  </ReqoreButton>
42
42
  </ReqoreControlGroup>
43
43
  <br />
44
- <ReqoreControlGroup size={buttonProps.size} wrap>
44
+ <ReqoreControlGroup size={buttonProps.size}>
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
52
- {...buttonProps}
53
- minimal
54
- flat={false}
55
- iconColor='#38fdb2'
56
- leftIconColor='#33023c:lighten:3'
57
- rightIconColor='#0a487b:lighten:3'
58
- >
51
+ <ReqoreButton {...buttonProps} minimal flat={false}>
59
52
  Minimal not flat
60
53
  </ReqoreButton>
61
54
  <ReqoreButton {...buttonProps} readOnly onClick={alert} flat={false}>
@@ -66,49 +59,16 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
66
59
  </ReqoreButton>
67
60
  </ReqoreControlGroup>
68
61
  <br />
69
- <ReqoreControlGroup fluid wrap>
62
+ <ReqoreControlGroup fluid>
70
63
  <ReqoreButton {...buttonProps} fluid>
71
64
  Fluid button
72
65
  </ReqoreButton>
73
66
  </ReqoreControlGroup>
74
67
  <br />
75
- <ReqoreControlGroup fluid wrap>
76
- <ReqoreButton {...buttonProps}>Left text</ReqoreButton>
77
- <ReqoreButton
78
- {...buttonProps}
79
- textAlign='center'
80
- maxWidth='250px'
81
- badge='10'
82
- wrap
83
- description='I am a button with a center aligned text and description'
84
- >
85
- Center
86
- </ReqoreButton>
87
- <ReqoreButton
88
- {...buttonProps}
89
- textAlign='center'
90
- maxWidth='200px'
91
- badge="I'm a badge, baby"
92
- wrap
93
- description='I am a button with a center aligned text and description'
94
- >
95
- Center text with a longer text
96
- </ReqoreButton>
97
- <ReqoreButton
98
- {...buttonProps}
99
- textAlign='right'
100
- badge="I'm a badge"
101
- description='I am a button with a right aligned text and description'
102
- >
103
- Right text
104
- </ReqoreButton>
105
- </ReqoreControlGroup>
106
- <br />
107
- <ReqoreControlGroup wrap>
68
+ <ReqoreControlGroup>
108
69
  <ReqoreButton
109
70
  {...buttonProps}
110
71
  description='This is a very interesting description for a button, I like it very much'
111
- iconColor='#38fdb2'
112
72
  >
113
73
  With Default Description
114
74
  </ReqoreButton>
@@ -127,22 +87,8 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
127
87
  </ReqoreButton>
128
88
  <ReqoreButton
129
89
  {...buttonProps}
130
- minimal
131
90
  description='This is a very interesting description for a button, I like it very much'
132
91
  maxWidth='200px'
133
- labelEffect={{
134
- gradient: { colors: { 0: '#00fafd', 130: '#eb0e8c' }, direction: 'to right bottom' },
135
- }}
136
- descriptionEffect={{
137
- gradient: { colors: { 0: '#fd7600', 90: '#c997ff' }, type: 'radial' },
138
- }}
139
- effect={{
140
- gradient: {
141
- colors: { 0: '#be00fd', 130: '#e70eeb' },
142
- direction: 'to left bottom',
143
- animate: 'hover',
144
- },
145
- }}
146
92
  badge={{
147
93
  effect: {
148
94
  gradient: { colors: { 0: '#00fafd', 130: '#eb0e8c' }, direction: 'to right bottom' },
@@ -163,22 +109,11 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
163
109
  />
164
110
  </ReqoreControlGroup>
165
111
  <br />
166
- <ReqoreControlGroup wrap>
112
+ <ReqoreControlGroup>
167
113
  <ReqoreButton {...buttonProps} readOnly badge={10} onClick={alert}>
168
114
  Read only with badge
169
115
  </ReqoreButton>
170
- <ReqoreButton
171
- {...buttonProps}
172
- minimal
173
- badge={20}
174
- onClick={alert}
175
- effect={{
176
- gradient: { colors: { 90: '#ffe69c', 0: '#ff7818' }, type: 'radial' },
177
- }}
178
- labelEffect={{
179
- gradient: { colors: { 0: '#ffe69c', 90: '#ff7818' }, type: 'radial' },
180
- }}
181
- >
116
+ <ReqoreButton {...buttonProps} minimal badge={20} onClick={alert}>
182
117
  Minimal with badge
183
118
  </ReqoreButton>
184
119
  <ReqoreButton
@@ -1,6 +1,6 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import Checkbox from '../../components/Checkbox';
3
- import { ReqoreCheckbox, ReqoreControlGroup, ReqoreVerticalSpacer } from '../../index';
3
+ import { ReqoreCheckbox, ReqoreControlGroup } 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 wrap>
13
+ <ReqoreControlGroup>
14
14
  <ReqoreCheckbox {...args} />
15
15
  <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelDetailPosition='left' />
16
16
  <ReqoreCheckbox {...args} checked tooltip='I am checked' />
@@ -18,8 +18,7 @@ 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
- <ReqoreVerticalSpacer height={10} />
22
- <ReqoreControlGroup wrap>
21
+ <ReqoreControlGroup>
23
22
  <ReqoreCheckbox {...args} intent='info' checked />
24
23
  <ReqoreCheckbox
25
24
  {...args}
@@ -35,8 +34,6 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
35
34
  effect={{ gradient: { colors: { 0: '#00fafd', 100: '#ff00d0' } } }}
36
35
  />
37
36
  <ReqoreCheckbox {...args} disabled onText='yes' offText='no' />
38
- <ReqoreCheckbox {...args} onText='yes' offText='no' />
39
- <ReqoreCheckbox {...args} onText='yes' offText='no' checked />
40
37
  <ReqoreCheckbox
41
38
  {...args}
42
39
  label='Label'
@@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/react';
2
2
  import { IReqoreCollectionProps, ReqoreCollection } from '../../components/Collection';
3
3
  import { IReqoreColumnsProps } from '../../components/Columns';
4
4
  import items from '../../mock/collectionData';
5
- import { IntentArg, SizeArg, argManager } from '../utils/args';
5
+ import { argManager, IntentArg, SizeArg } from '../utils/args';
6
6
 
7
7
  export interface IColumnsStoryArgs extends IReqoreColumnsProps {
8
8
  multipleColumns?: boolean;
@@ -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: undefined,
48
+ defaultValue: '600px',
49
49
  type: 'string',
50
50
  name: 'Height',
51
51
  description: 'Height of the collection',
@@ -72,8 +72,6 @@ const Template: Story<IReqoreCollectionProps> = (args) => {
72
72
  return (
73
73
  <ReqoreCollection
74
74
  {...args}
75
- badge={10}
76
- selectedIcon='CheckLine'
77
75
  actions={[{ label: 'Custom action', icon: 'Home7Line' }, { actions: [{ value: 'Test' }] }]}
78
76
  />
79
77
  );
@@ -85,13 +83,6 @@ Basic.args = {
85
83
  items,
86
84
  };
87
85
 
88
- export const WithHeight = Template.bind({});
89
- WithHeight.args = {
90
- label: 'Collection of items',
91
- height: '600px',
92
- items,
93
- };
94
-
95
86
  export const Stacked = Template.bind({});
96
87
  Stacked.args = {
97
88
  label: 'Collection of items',
@@ -105,10 +96,3 @@ Fill.args = {
105
96
  fill: true,
106
97
  items,
107
98
  };
108
-
109
- export const SelectedFirst = Template.bind({});
110
- SelectedFirst.args = {
111
- label: 'Collection of items',
112
- items,
113
- showSelectedFirst: true,
114
- };
@@ -1,14 +1,7 @@
1
1
  import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { IReqoreControlGroupProps } from '../../components/ControlGroup';
3
- import {
4
- ReqoreButton,
5
- ReqoreCheckbox,
6
- ReqoreControlGroup,
7
- ReqoreDropdown,
8
- ReqoreInput,
9
- ReqoreTag,
10
- ReqoreVerticalSpacer,
11
- } from '../../index';
3
+ import ReqoreInput from '../../components/Input';
4
+ import { ReqoreButton, ReqoreCheckbox, ReqoreControlGroup, ReqoreTag } from '../../index';
12
5
  import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
13
6
 
14
7
  const { createArg } = argManager<IReqoreControlGroupProps>();
@@ -37,240 +30,42 @@ export default {
37
30
  description: 'Whether the control group should be fluid',
38
31
  control: 'boolean',
39
32
  }),
40
- ...createArg('wrap', {
41
- name: 'wrap',
42
- defaultValue: true,
43
- description: 'Whether the control group should wrap',
44
- control: 'boolean',
45
- }),
46
33
  },
47
34
  } as Meta<IReqoreControlGroupProps>;
48
35
 
49
36
  const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProps) => {
50
- if (args.fill) {
51
- return (
52
- <>
53
- <ReqoreControlGroup {...args} stack>
54
- <ReqoreButton icon='PictureInPictureLine' description='I will be a bit larger'>
55
- Button
56
- </ReqoreButton>
57
- <ReqoreControlGroup stack>
58
- <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
59
- <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
60
- </ReqoreControlGroup>
61
- <ReqoreControlGroup stack>
62
- <ReqoreControlGroup>
63
- <ReqoreInput customTheme={{ main: '#00e3e8' }} placeholder='Level 2 deep' />
64
- <ReqoreControlGroup fixed>
65
- <ReqoreButton disabled fixed id='test'>
66
- Level 3 deep and fixed
67
- </ReqoreButton>
68
- </ReqoreControlGroup>
69
- </ReqoreControlGroup>
70
- <ReqoreCheckbox checked margin='both' label='Level 1 deep' />
71
- <ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
72
- </ReqoreControlGroup>
73
- </ReqoreControlGroup>
74
- <ReqoreVerticalSpacer height={10} />
75
- <ReqoreControlGroup {...args} stack>
76
- <ReqoreButton
77
- icon='PictureInPictureLine'
78
- description='Here is a really weird and long description that needs to stretch the button a little bit so we can get some idea on how the other buttons are going to react.'
79
- maxWidth='400px'
80
- >
81
- Please select
82
- </ReqoreButton>
83
- <ReqoreButton icon='AddLine' intent='info' />
84
- <ReqoreButton>Edit</ReqoreButton>
85
- <ReqoreButton icon='DeleteBinLine' intent='danger'>
86
- Remove
87
- </ReqoreButton>
88
- </ReqoreControlGroup>
89
- <ReqoreVerticalSpacer height={10} />
90
- <ReqoreControlGroup {...args} stack fluid>
91
- <ReqoreButton
92
- icon='PictureInPictureLine'
93
- description='Here is a really weird and long description that needs to stretch the button a little bit so we can get some idea on how the other buttons are going to react.'
94
- >
95
- Please select
96
- </ReqoreButton>
97
- <ReqoreButton icon='AddLine' intent='info' fixed />
98
- <ReqoreButton fixed>Edit</ReqoreButton>
99
- <ReqoreButton icon='DeleteBinLine' intent='danger' fixed>
100
- Remove
101
- </ReqoreButton>
102
- </ReqoreControlGroup>
103
- </>
104
- );
105
- }
106
-
107
- if (args.responsive) {
108
- return (
109
- <div style={{ width: 600 }}>
110
- <ReqoreControlGroup {...args} wrap={false}>
111
- <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
112
- <ReqoreControlGroup stack>
113
- <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
114
- </ReqoreControlGroup>
115
- <ReqoreControlGroup stack>
116
- <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
117
- <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
118
- </ReqoreControlGroup>
119
- <ReqoreControlGroup stack>
120
- <ReqoreControlGroup>
121
- <ReqoreButton customTheme={{ main: '#00e3e8' }}>Level 2 deep</ReqoreButton>
122
- <ReqoreControlGroup fixed>
123
- <ReqoreButton disabled fixed id='test'>
124
- Level 3 deep and fixed
125
- </ReqoreButton>
126
- </ReqoreControlGroup>
127
- </ReqoreControlGroup>
128
- <ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
129
- <ReqoreCheckbox checked margin='both' label='Level 1 deep' />
130
- </ReqoreControlGroup>
131
- <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
132
- <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
133
- </ReqoreControlGroup>
134
- </div>
135
- );
136
- }
137
-
138
37
  return (
139
- <>
140
- <ReqoreControlGroup {...args}>
141
- <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
142
- <ReqoreButton icon='PictureInPictureLine' fluid>
143
- Fluid Button
144
- </ReqoreButton>
145
- <ReqoreButton
146
- icon='PictureInPictureLine'
147
- flat={false}
148
- effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
149
- description="With a description, it's a bit longer than the button itself"
150
- fixed
151
- >
152
- Non flat fixed Button
153
- </ReqoreButton>
154
- <ReqoreControlGroup stack>
155
- <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
156
- <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
157
- </ReqoreControlGroup>
158
- <ReqoreCheckbox
159
- asSwitch
160
- label='Switchy switch'
161
- margin='both'
162
- intent='warning'
163
- checkedIcon='CheckFill'
164
- checked
165
- uncheckedIcon='CheckboxBlankLine'
166
- />
167
- <ReqoreInput icon='4KFill' value='Hello I am fluid' fluid />
168
- <ReqoreControlGroup stack>
169
- <ReqoreControlGroup>
170
- <ReqoreButton customTheme={{ main: '#00e3e8' }}>Level 2 deep</ReqoreButton>
171
- <ReqoreControlGroup fixed>
172
- <ReqoreButton disabled fixed id='test'>
173
- Level 3 deep and fixed
174
- </ReqoreButton>
175
- </ReqoreControlGroup>
176
- </ReqoreControlGroup>
177
- <ReqoreButton intent='danger'>Level 1 deep</ReqoreButton>
178
- <ReqoreCheckbox checked margin='both' label='Level 1 deep' />
179
- </ReqoreControlGroup>
180
-
181
- <ReqoreButton minimal>Minimal</ReqoreButton>
182
- <ReqoreTag label='smol tag' size='small' />
183
- </ReqoreControlGroup>
184
- <ReqoreVerticalSpacer height={15} />
185
- <ReqoreControlGroup {...args} className='root-group' id='root-group'>
186
- <ReqoreControlGroup intent='info' className='group-1' id='group-1-wrapper'>
187
- <ReqoreControlGroup intent='info' className='group-1' id='group-1'>
188
- <>
189
- <ReqoreButton icon='PictureInPictureLine' id='group-1-button'>
190
- Group 1
191
- </ReqoreButton>
192
- <ReqoreTag icon='PictureInPictureLine' label='Group 1' id='group-1-tag' />
193
- </>
194
- </ReqoreControlGroup>
195
- <ReqoreControlGroup intent='pending' className='group-1-1' id='group-1-1'>
196
- <ReqoreButton icon='PictureInPictureLine' id='group-1-1-button'>
197
- Group 1-1
198
- </ReqoreButton>
199
- <ReqoreTag icon='PictureInPictureLine' label='Group 1-1' id='group-1-1-tag' />
200
- <ReqoreDropdown
201
- items={[
202
- {
203
- selected: true,
204
- label: 'Hello',
205
- value: 'hello',
206
- icon: 'SunCloudyLine',
207
- },
208
- {
209
- label: 'How are ya',
210
- value: 'howareya',
211
- icon: 'BatteryChargeFill',
212
- },
213
- {
214
- disabled: true,
215
- label: 'i aM diSAblEd',
216
- value: 'disabled',
217
- icon: 'StopCircleLine',
218
- },
219
- {
220
- label: 'With right button',
221
- value: 'kek',
222
- icon: 'CheckDoubleLine',
223
- },
224
- ]}
225
- >
226
- Dropdown
227
- </ReqoreDropdown>
228
- </ReqoreControlGroup>
229
- </ReqoreControlGroup>
230
- <ReqoreButton icon='PictureInPictureLine' id='group-root-button'>
231
- Root group
232
- </ReqoreButton>
233
- <ReqoreControlGroup intent='success' className='group-2' id='group-2'>
234
- <>
235
- <ReqoreButton icon='PictureInPictureLine' id='group-2-button' fixed>
236
- Group 2
237
- </ReqoreButton>
238
- <ReqoreControlGroup intent='danger' className='group-3' id='group-3'>
239
- <ReqoreButton icon='PictureInPictureLine' id='group-3-button-1'>
240
- Group 3
241
- </ReqoreButton>
242
- <ReqoreButton icon='PictureInPictureLine' id='group-3-button-2'>
243
- Group 3
244
- </ReqoreButton>
245
- </ReqoreControlGroup>
246
- </>
247
- <ReqoreCheckbox label='Group 2' margin='both' id='group-2-checkbox' />
248
- </ReqoreControlGroup>
249
- <ReqoreButton icon='PictureInPictureLine' id='group-root-button-2'>
250
- Root group
251
- </ReqoreButton>
252
- <ReqoreControlGroup intent='warning' className='group-4' id='group-4'>
253
- <ReqoreControlGroup id='group-4-1' fluid={false}>
254
- <ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-1-tag' />
255
- <ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-1-input' />
256
- </ReqoreControlGroup>
257
- <ReqoreControlGroup id='group-4-3'>
258
- <ReqoreTag icon='PictureInPictureLine' label='Group 4' id='group-4-3-tag' />
259
- <>
260
- <ReqoreInput icon='PictureInPictureLine' value='Group 4' id='group-4-3-input' />
261
- <ReqoreControlGroup id='group-5' intent='muted' fluid={false}>
262
- <ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-1-tag' />
263
- <ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-2-tag' />
264
- <ReqoreTag icon='PictureInPictureLine' label='Group 5' id='group-4-3-3-tag' />
265
- <ReqoreControlGroup id='group 6' intent='success'>
266
- <ReqoreButton fixed>Group 6</ReqoreButton>
267
- </ReqoreControlGroup>
268
- </ReqoreControlGroup>
269
- </>
270
- </ReqoreControlGroup>
271
- </ReqoreControlGroup>
272
- </ReqoreControlGroup>
273
- </>
38
+ <ReqoreControlGroup {...args}>
39
+ <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
40
+ <ReqoreButton
41
+ icon='PictureInPictureLine'
42
+ flat={false}
43
+ effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
44
+ >
45
+ Non flat Button
46
+ </ReqoreButton>
47
+ <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
48
+ <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
49
+ <ReqoreCheckbox
50
+ asSwitch
51
+ label='Switchy switch'
52
+ margin='both'
53
+ intent='warning'
54
+ checkedIcon='CheckFill'
55
+ checked
56
+ uncheckedIcon='CheckboxBlankLine'
57
+ />
58
+ <ReqoreInput icon='4KFill' value='Hello' />
59
+ <ReqoreButton disabled fixed>
60
+ Disabled & Fixed
61
+ </ReqoreButton>
62
+ <ReqoreCheckbox checked margin='both'>
63
+ Checkbox
64
+ </ReqoreCheckbox>
65
+
66
+ <ReqoreButton minimal>Minimal</ReqoreButton>
67
+ <ReqoreTag label='smol tag' size='small' />
68
+ </ReqoreControlGroup>
274
69
  );
275
70
  };
276
71
 
@@ -280,16 +75,6 @@ Minimal.args = {
280
75
  minimal: true,
281
76
  };
282
77
 
283
- export const Fluid = Template.bind({});
284
- Fluid.args = {
285
- fluid: true,
286
- };
287
-
288
- export const Fill = Template.bind({});
289
- Fill.args = {
290
- fill: true,
291
- };
292
-
293
78
  export const NotFlat = Template.bind({});
294
79
  NotFlat.args = {
295
80
  flat: false,
@@ -300,19 +85,6 @@ Vertical.args = {
300
85
  vertical: true,
301
86
  };
302
87
 
303
- export const VerticalFluid = Template.bind({});
304
- VerticalFluid.args = {
305
- vertical: true,
306
- fluid: true,
307
- };
308
-
309
- export const VerticalStackedFluid = Template.bind({});
310
- VerticalStackedFluid.args = {
311
- vertical: true,
312
- stack: true,
313
- fluid: true,
314
- };
315
-
316
88
  export const Stacked = Template.bind({});
317
89
  Stacked.args = {
318
90
  stack: true,
@@ -322,24 +94,3 @@ export const BigGapSize = Template.bind({});
322
94
  BigGapSize.args = {
323
95
  gapSize: 'big',
324
96
  };
325
-
326
- export const NoWrap = Template.bind({});
327
- NoWrap.args = {
328
- wrap: false,
329
- };
330
-
331
- export const HorizontalAlign = Template.bind({});
332
- HorizontalAlign.args = {
333
- vertical: true,
334
- horizontalAlign: 'center',
335
- };
336
-
337
- export const VerticalAlign = Template.bind({});
338
- VerticalAlign.args = {
339
- verticalAlign: 'flex-end',
340
- };
341
-
342
- export const Responsive = Template.bind({});
343
- Responsive.args = {
344
- responsive: true,
345
- };
@@ -2,16 +2,14 @@ import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { noop } from 'lodash';
3
3
  import { useContext } from 'react';
4
4
  import { IReqoreDrawerProps, ReqoreDrawer } from '../../components/Drawer';
5
- import { IReqoreInputProps } from '../../components/Input';
6
5
  import {
7
6
  ReqoreButton,
8
7
  ReqoreContext,
9
- ReqoreInput,
10
8
  ReqorePanel,
11
9
  ReqoreTabs,
12
10
  ReqoreTabsContent,
13
11
  } from '../../index';
14
- import { FlatArg, IntentArg, argManager } from '../utils/args';
12
+ import { argManager, FlatArg, IntentArg } from '../utils/args';
15
13
 
16
14
  const { createArg } = argManager<IReqoreDrawerProps>();
17
15
 
@@ -48,7 +46,7 @@ export default {
48
46
  options: ['left', 'right', 'top', 'bottom'],
49
47
  }),
50
48
  ...createArg('size', {
51
- defaultValue: 'auto',
49
+ defaultValue: '450px',
52
50
  name: 'Size',
53
51
  type: 'string',
54
52
  }),
@@ -126,68 +124,7 @@ const Template: Story<IReqoreDrawerProps> = (args: IReqoreDrawerProps) => {
126
124
  attacks inhabit pursuit our but. Lasted hunted enough an up seeing in lively letter. Had
127
125
  judgment out opinions property the supplied.
128
126
  </ReqorePanel>
129
- <ReqoreDrawer
130
- {...args}
131
- label='This is a test'
132
- icon='EmphasisCn'
133
- onClose={noop}
134
- actions={[
135
- {
136
- responsive: false,
137
- group: [
138
- {
139
- label: 'Non responsive',
140
- icon: '24HoursFill',
141
- customTheme: { main: '#eb0e8c' },
142
- },
143
- {
144
- icon: 'FullscreenExitLine',
145
- customTheme: { main: '#a40a62' },
146
- },
147
- ],
148
- },
149
- {
150
- group: [
151
- { label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
152
- { icon: 'CopperCoinFill', intent: 'danger' },
153
- ],
154
- },
155
- {
156
- as: ReqoreInput,
157
- props: {
158
- placeholder: 'Custom action!',
159
- icon: 'Search2Line',
160
- minimal: false,
161
- } as IReqoreInputProps,
162
- },
163
- {
164
- label: 'More actions',
165
- actions: [
166
- { value: 'Sub Test', icon: 'FileDownloadLine' },
167
- { value: 'Sub Test 2', icon: 'FileDownloadLine', intent: 'success' },
168
- ],
169
- intent: 'info',
170
- },
171
- ]}
172
- bottomActions={[
173
- {
174
- position: 'left',
175
- intent: 'success',
176
- group: [
177
- { label: 'Test 1', icon: '24HoursFill' },
178
- { label: 'Test 2', icon: '24HoursFill' },
179
- ],
180
- },
181
- {
182
- label: 'More actions',
183
- position: 'right',
184
- actions: [
185
- { value: 'Sub Test', icon: 'FileDownloadLine', intent: 'success' },
186
- { value: 'Sub Test 2', icon: 'FileDownloadLine' },
187
- ],
188
- },
189
- ]}
190
- >
127
+ <ReqoreDrawer {...args} label='This is a test' icon='EmphasisCn' onClose={noop}>
191
128
  <ReqoreTabs
192
129
  flat
193
130
  intent={args.intent}
@@ -242,7 +179,3 @@ export const Transparent = Template.bind({});
242
179
  Transparent.args = {
243
180
  opacity: 0.5,
244
181
  };
245
- export const WithSize = Template.bind({});
246
- WithSize.args = {
247
- size: '500px',
248
- };