@qoretechnologies/reqore 0.29.4 → 0.29.5

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 (83) hide show
  1. package/dist/components/Button/index.d.ts +3 -0
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +2 -2
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/Collection/index.d.ts +4 -1
  6. package/dist/components/Collection/index.d.ts.map +1 -1
  7. package/dist/components/Collection/index.js +28 -3
  8. package/dist/components/Collection/index.js.map +1 -1
  9. package/dist/components/Collection/item.d.ts +1 -1
  10. package/dist/components/Collection/item.d.ts.map +1 -1
  11. package/dist/components/ControlGroup/index.d.ts +10 -3
  12. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  13. package/dist/components/ControlGroup/index.js +133 -37
  14. package/dist/components/ControlGroup/index.js.map +1 -1
  15. package/dist/components/Icon/index.d.ts +2 -1
  16. package/dist/components/Icon/index.d.ts.map +1 -1
  17. package/dist/components/Icon/index.js +4 -1
  18. package/dist/components/Icon/index.js.map +1 -1
  19. package/dist/components/Input/index.d.ts +2 -0
  20. package/dist/components/Input/index.d.ts.map +1 -1
  21. package/dist/components/Input/index.js +2 -2
  22. package/dist/components/Input/index.js.map +1 -1
  23. package/dist/components/Message/index.d.ts +2 -0
  24. package/dist/components/Message/index.d.ts.map +1 -1
  25. package/dist/components/Message/index.js +2 -2
  26. package/dist/components/Message/index.js.map +1 -1
  27. package/dist/components/Panel/index.d.ts +2 -1
  28. package/dist/components/Panel/index.d.ts.map +1 -1
  29. package/dist/components/Panel/index.js +2 -2
  30. package/dist/components/Panel/index.js.map +1 -1
  31. package/dist/components/Table/helpers.d.ts +3 -2
  32. package/dist/components/Table/helpers.d.ts.map +1 -1
  33. package/dist/components/Table/helpers.js +6 -3
  34. package/dist/components/Table/helpers.js.map +1 -1
  35. package/dist/components/Table/index.d.ts +1 -0
  36. package/dist/components/Table/index.d.ts.map +1 -1
  37. package/dist/components/Table/index.js.map +1 -1
  38. package/dist/components/Tabs/item.js +1 -1
  39. package/dist/components/Tabs/item.js.map +1 -1
  40. package/dist/components/Tabs/list.d.ts.map +1 -1
  41. package/dist/components/Tabs/list.js +1 -1
  42. package/dist/components/Tabs/list.js.map +1 -1
  43. package/dist/components/Tag/index.d.ts +3 -0
  44. package/dist/components/Tag/index.d.ts.map +1 -1
  45. package/dist/components/Tag/index.js +9 -9
  46. package/dist/components/Tag/index.js.map +1 -1
  47. package/dist/components/Textarea/index.d.ts.map +1 -1
  48. package/dist/components/Textarea/index.js +0 -1
  49. package/dist/components/Textarea/index.js.map +1 -1
  50. package/dist/styles.d.ts +1 -0
  51. package/dist/styles.d.ts.map +1 -1
  52. package/dist/styles.js +6 -5
  53. package/dist/styles.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/components/Button/index.tsx +13 -2
  56. package/src/components/Collection/index.tsx +35 -4
  57. package/src/components/Collection/item.tsx +1 -1
  58. package/src/components/ControlGroup/index.tsx +220 -103
  59. package/src/components/Icon/index.tsx +6 -3
  60. package/src/components/Input/index.tsx +4 -2
  61. package/src/components/Message/index.tsx +9 -1
  62. package/src/components/Panel/index.tsx +3 -0
  63. package/src/components/Table/helpers.ts +12 -6
  64. package/src/components/Table/index.tsx +1 -0
  65. package/src/components/Tabs/item.tsx +4 -4
  66. package/src/components/Tabs/list.tsx +1 -0
  67. package/src/components/Tag/index.tsx +34 -11
  68. package/src/components/Textarea/index.tsx +0 -2
  69. package/src/mock/collectionData.tsx +3 -0
  70. package/src/stories/Button/Button.stories.tsx +14 -6
  71. package/src/stories/Checkbox/Checkbox.stories.tsx +4 -3
  72. package/src/stories/Collection/Collection.stories.tsx +16 -1
  73. package/src/stories/ControlGroup/ControlGroup.stories.tsx +67 -31
  74. package/src/stories/Dropdown/Dropdown.stories.tsx +13 -3
  75. package/src/stories/Input/Input.stories.tsx +3 -2
  76. package/src/stories/Menu/Menu.stories.tsx +1 -0
  77. package/src/stories/Message/Message.stories.tsx +7 -0
  78. package/src/stories/Panel/Panel.stories.tsx +1 -0
  79. package/src/stories/Tabs/Tabs.stories.tsx +2 -1
  80. package/src/stories/Tag/Tag.stories.tsx +8 -0
  81. package/src/stories/TextArea/TextArea.stories.tsx +1 -1
  82. package/src/styles.ts +6 -0
  83. package/tests.json +1 -1
@@ -6,14 +6,15 @@ import styled, { css } from 'styled-components';
6
6
  import { ReqoreThemeContext } from '../..';
7
7
  import { ICON_FROM_SIZE, PADDING_FROM_SIZE, TSizes } from '../../constants/sizes';
8
8
  import { TReqoreIntent } from '../../constants/theme';
9
+ import { getColorFromMaybeString } from '../../helpers/colors';
9
10
  import { isStringSize } from '../../helpers/utils';
10
11
  import { IWithReqoreEffect } from '../../types/global';
11
12
  import { IReqoreIconName } from '../../types/icons';
12
- import { StyledEffect } from '../Effect';
13
+ import { StyledEffect, TReqoreEffectColor } from '../Effect';
13
14
 
14
15
  export interface IReqoreIconProps extends React.HTMLAttributes<HTMLSpanElement>, IWithReqoreEffect {
15
16
  icon?: IReqoreIconName;
16
- color?: string;
17
+ color?: TReqoreEffectColor;
17
18
  size?: TSizes | string;
18
19
  iconProps?: IconBaseProps;
19
20
  intent?: TReqoreIntent;
@@ -66,7 +67,9 @@ const ReqoreIcon = memo(
66
67
  }: IReqoreIconProps) => {
67
68
  const theme = useContext(ReqoreThemeContext);
68
69
  const Icon: IconType = RemixIcons[`Ri${icon}`];
69
- const finalColor: string | undefined = intent ? theme.intents[intent] : color;
70
+ const finalColor: string | undefined = intent
71
+ ? theme.intents[intent]
72
+ : getColorFromMaybeString(theme, color);
70
73
  const finalSize: string = isStringSize(size) ? ICON_FROM_SIZE[size] : size;
71
74
 
72
75
  if (image) {
@@ -22,7 +22,7 @@ import {
22
22
  IWithReqoreEffect,
23
23
  } from '../../types/global';
24
24
  import { IReqoreIconName } from '../../types/icons';
25
- import { StyledEffect } from '../Effect';
25
+ import { StyledEffect, TReqoreEffectColor } from '../Effect';
26
26
  import ReqoreIcon from '../Icon';
27
27
  import ReqoreInputClearButton from '../InputClearButton';
28
28
 
@@ -48,6 +48,7 @@ export interface IReqoreInputProps
48
48
  rounded?: boolean;
49
49
  type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
50
50
  wrapperStyle?: React.CSSProperties;
51
+ iconColor?: TReqoreEffectColor;
51
52
  }
52
53
 
53
54
  export interface IReqoreInputStyle extends IReqoreInputProps {
@@ -150,6 +151,7 @@ const ReqoreInput = forwardRef<HTMLDivElement, IReqoreInputProps>(
150
151
  className,
151
152
  onClearClick,
152
153
  icon,
154
+ iconColor,
153
155
  flat,
154
156
  rounded = true,
155
157
  minimal,
@@ -185,7 +187,7 @@ const ReqoreInput = forwardRef<HTMLDivElement, IReqoreInputProps>(
185
187
  >
186
188
  {icon && (
187
189
  <StyledIconWrapper _size={size}>
188
- <ReqoreIcon size={size} icon={icon} />
190
+ <ReqoreIcon size={size} icon={icon} color={iconColor} />
189
191
  </StyledIconWrapper>
190
192
  )}
191
193
  <StyledInput
@@ -14,6 +14,7 @@ import {
14
14
  IWithReqoreSize,
15
15
  } from '../../types/global';
16
16
  import { IReqoreIconName } from '../../types/icons';
17
+ import { TReqoreEffectColor } from '../Effect';
17
18
  import { ReqoreHeading } from '../Header';
18
19
  import ReqoreIcon from '../Icon';
19
20
  import {
@@ -35,6 +36,7 @@ export interface IReqoreMessageProps
35
36
  title?: string;
36
37
  children: any;
37
38
  icon?: IReqoreIconName;
39
+ iconColor?: TReqoreEffectColor;
38
40
  onClose?: () => any;
39
41
  onClick?: () => any;
40
42
  duration?: number;
@@ -64,6 +66,7 @@ const ReqoreMessage = forwardRef<HTMLDivElement, IReqoreMessageProps>(
64
66
  minimal,
65
67
  size = 'normal',
66
68
  customTheme,
69
+ iconColor,
67
70
  ...rest
68
71
  },
69
72
  ref: any
@@ -128,7 +131,12 @@ const ReqoreMessage = forwardRef<HTMLDivElement, IReqoreMessageProps>(
128
131
  >
129
132
  {leftIcon ? (
130
133
  <StyledIconWrapper intent={intent} size={size} theme={theme}>
131
- <ReqoreIcon icon={leftIcon} margin={flat && minimal ? 'right' : 'both'} size={size} />
134
+ <ReqoreIcon
135
+ icon={leftIcon}
136
+ margin={flat && minimal ? 'right' : 'both'}
137
+ size={size}
138
+ color={iconColor}
139
+ />
132
140
  </StyledIconWrapper>
133
141
  ) : null}
134
142
  <StyledNotificationContentWrapper size={size} theme={theme}>
@@ -87,6 +87,7 @@ export interface IReqorePanelProps
87
87
  contentEffect?: IReqoreEffect;
88
88
  headerEffect?: IReqoreEffect;
89
89
  transparent?: boolean;
90
+ iconColor?: TReqoreEffectColor;
90
91
  }
91
92
 
92
93
  export interface IStyledPanel extends IReqorePanelProps {
@@ -266,6 +267,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
266
267
  minimal,
267
268
  tooltip,
268
269
  badge,
270
+ iconColor,
269
271
  ...rest
270
272
  }: IReqorePanelProps,
271
273
  ref
@@ -455,6 +457,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
455
457
  size={`${ICON_FROM_HEADER_SIZE[headerSize]}px`}
456
458
  icon={icon}
457
459
  margin='right'
460
+ color={iconColor}
458
461
  />
459
462
  )}
460
463
  {typeof label === 'string' ? (
@@ -1,19 +1,25 @@
1
- import { firstBy } from "thenby";
2
- import { IReqoreTableSort } from ".";
1
+ import { firstBy } from 'thenby';
2
+ import { IReqoreTableSort } from '.';
3
3
 
4
- export const flipSortDirection = (direction: "asc" | "desc"): "asc" | "desc" =>
5
- direction === "asc" ? "desc" : "asc";
4
+ export const flipSortDirection = (direction: 'asc' | 'desc'): 'asc' | 'desc' =>
5
+ direction === 'asc' ? 'desc' : 'asc';
6
6
 
7
7
  export const fixSort = (sort?: IReqoreTableSort) => {
8
- return { ...(sort || {}), direction: sort?.direction || "desc" };
8
+ return { ...(sort || {}), direction: sort?.direction || 'desc' };
9
9
  };
10
10
 
11
11
  export const sortTableData = (data: any[], sort: IReqoreTableSort) => {
12
- const { by, direction } = sort;
12
+ const { by, thenBy, direction } = sort;
13
13
 
14
14
  if (!by) {
15
15
  return data;
16
16
  }
17
17
 
18
+ if (thenBy) {
19
+ return [...data].sort(
20
+ firstBy(by, { ignoreCase: true, direction }).thenBy(thenBy, { ignoreCase: true, direction })
21
+ );
22
+ }
23
+
18
24
  return [...data].sort(firstBy(by, { ignoreCase: true, direction }));
19
25
  };
@@ -89,6 +89,7 @@ export interface IReqoreTableStyle {
89
89
 
90
90
  export interface IReqoreTableSort {
91
91
  by?: string;
92
+ thenBy?: string;
92
93
  direction?: 'asc' | 'desc';
93
94
  }
94
95
 
@@ -45,8 +45,8 @@ export const StyledTabListItem = styled.div<IReqoreTabListItemStyle>`
45
45
  border-right: 0;
46
46
  }
47
47
  ${StyledButton}:last-child {
48
- border-top-right-radius: 0;
49
- border-bottom-right-radius: 0;
48
+ border-top-right-radius: 0 !important;
49
+ border-bottom-right-radius: 0 !important;
50
50
  }
51
51
  `
52
52
  : css`
@@ -54,10 +54,10 @@ export const StyledTabListItem = styled.div<IReqoreTabListItemStyle>`
54
54
  border-bottom: 0;
55
55
  }
56
56
  ${StyledButton}:first-child {
57
- border-bottom-left-radius: 0;
57
+ border-bottom-left-radius: 0 !important;
58
58
  }
59
59
  ${StyledButton}:last-child {
60
- border-bottom-right-radius: 0;
60
+ border-bottom-right-radius: 0 !important;
61
61
  }
62
62
  `}
63
63
 
@@ -216,6 +216,7 @@ const ReqoreTabsList = ({
216
216
  }
217
217
  closeOnOutsideClick
218
218
  isReqoreComponent
219
+ noWrapper
219
220
  handler='hoverStay'
220
221
  content={
221
222
  <ReqoreMenu customTheme={theme}>
@@ -21,6 +21,7 @@ import {
21
21
  } from '../../helpers/colors';
22
22
  import { useCombinedRefs } from '../../hooks/useCombinedRefs';
23
23
  import { useTooltip } from '../../hooks/useTooltip';
24
+ import { ActiveIconScale, InactiveIconScale } from '../../styles';
24
25
  import {
25
26
  IReqoreDisabled,
26
27
  IReqoreIntent,
@@ -50,6 +51,9 @@ export interface IReqoreTagProps
50
51
  onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
51
52
  icon?: IReqoreIconName;
52
53
  rightIcon?: IReqoreIconName;
54
+ iconColor?: TReqoreEffectColor;
55
+ leftIconColor?: TReqoreEffectColor;
56
+ rightIconColor?: TReqoreEffectColor;
53
57
  color?: TReqoreEffectColor;
54
58
  actions?: IReqoreTagAction[];
55
59
  width?: string;
@@ -81,6 +85,8 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
81
85
  width: ${({ width }) => width || undefined};
82
86
  transition: all 0.2s ease-out;
83
87
 
88
+ ${InactiveIconScale};
89
+
84
90
  ${({ wrap, hasWidth }) =>
85
91
  wrap || hasWidth
86
92
  ? css`
@@ -106,16 +112,24 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
106
112
  `}
107
113
 
108
114
  ${({ theme, color, interactive, minimal, effect }) =>
109
- interactive && !effect?.gradient
115
+ interactive
110
116
  ? css`
111
117
  cursor: pointer;
112
118
  &:hover {
113
- background-color: ${changeLightness(color || theme.main, color ? 0.05 : 0.15)};
114
- color: ${minimal
115
- ? getReadableColor(theme, undefined, undefined, false, theme.originalMain)
116
- : color
117
- ? getReadableColorFrom(color)
118
- : getReadableColor(theme, undefined, undefined)};
119
+ .reqore-tag-content,
120
+ .reqore-tag-key-content {
121
+ ${ActiveIconScale}
122
+ }
123
+
124
+ ${!effect?.gradient &&
125
+ css`
126
+ background-color: ${changeLightness(color || theme.main, color ? 0.05 : 0.15)};
127
+ color: ${minimal
128
+ ? getReadableColor(theme, undefined, undefined, false, theme.originalMain)
129
+ : color
130
+ ? getReadableColorFrom(color)
131
+ : getReadableColor(theme, undefined, undefined)};
132
+ `}
119
133
  }
120
134
  `
121
135
  : undefined}
@@ -130,8 +144,6 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
130
144
  `}
131
145
  `;
132
146
 
133
- const StyledTagRightIcon = styled(ReqoreIcon)``;
134
-
135
147
  const StyledTagKeyWrapper = styled.span<{ size: TSizes }>`
136
148
  display: flex;
137
149
  align-items: center;
@@ -227,6 +239,9 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
227
239
  minimal,
228
240
  wrap = false,
229
241
  width,
242
+ leftIconColor,
243
+ rightIconColor,
244
+ iconColor,
230
245
  ...rest
231
246
  }: IReqoreTagProps,
232
247
  ref
@@ -276,7 +291,14 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
276
291
  hasWidth={!!width}
277
292
  hasKey={!!labelKey}
278
293
  >
279
- {icon && <ReqoreIcon icon={icon} size={size} margin={label ? 'left' : 'both'} />}
294
+ {icon && (
295
+ <ReqoreIcon
296
+ icon={icon}
297
+ size={size}
298
+ margin={label ? 'left' : 'both'}
299
+ color={leftIconColor || iconColor}
300
+ />
301
+ )}
280
302
  {labelKey && (
281
303
  <StyledTagContentKey wrap={wrap} hasWidth={!!width} size={size}>
282
304
  {labelKey}
@@ -299,10 +321,11 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
299
321
  </StyledTagContent>
300
322
  ) : null}
301
323
  {rightIcon && (
302
- <StyledTagRightIcon
324
+ <ReqoreIcon
303
325
  icon={rightIcon}
304
326
  size={size}
305
327
  margin={label || icon ? 'right' : 'both'}
328
+ color={rightIconColor || iconColor}
306
329
  />
307
330
  )}
308
331
  </StyledTagContentWrapper>
@@ -143,8 +143,6 @@ const ReqoreInput = forwardRef<HTMLTextAreaElement, IReqoreTextareaProps>(
143
143
 
144
144
  useTooltip(targetRef?.current, tooltip);
145
145
 
146
- console.log(fluid);
147
-
148
146
  return (
149
147
  <StyledTextareaWrapper
150
148
  className={`${className || ''} reqore-control-wrapper`}
@@ -32,6 +32,8 @@ export default [
32
32
  tooltip: 'This is a test item',
33
33
  headerSize: 2,
34
34
  contentSize: 'huge',
35
+ selected: true,
36
+ icon: 'Hashtag',
35
37
  content:
36
38
  'Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long',
37
39
  tags: [
@@ -89,6 +91,7 @@ export default [
89
91
  {
90
92
  label: 'Item with custom content when expanded',
91
93
  tooltip: 'Expandable item with custom content',
94
+ selected: true,
92
95
  content:
93
96
  'Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long',
94
97
  expandable: true,
@@ -20,7 +20,7 @@ export default {
20
20
  const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
21
21
  return (
22
22
  <>
23
- <ReqoreControlGroup size={buttonProps.size}>
23
+ <ReqoreControlGroup size={buttonProps.size} wrap>
24
24
  <ReqoreButton {...buttonProps} icon='BankFill' rightIcon={null} />
25
25
  <ReqoreButton {...buttonProps} />
26
26
  <ReqoreButton {...buttonProps}>Default</ReqoreButton>
@@ -41,14 +41,21 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
41
41
  </ReqoreButton>
42
42
  </ReqoreControlGroup>
43
43
  <br />
44
- <ReqoreControlGroup size={buttonProps.size}>
44
+ <ReqoreControlGroup size={buttonProps.size} wrap>
45
45
  <ReqoreButton {...buttonProps} active flat={false} tooltip='hello'>
46
46
  Active Not Flat
47
47
  </ReqoreButton>
48
48
  <ReqoreButton {...buttonProps} flat={false}>
49
49
  Not Flat
50
50
  </ReqoreButton>
51
- <ReqoreButton {...buttonProps} minimal flat={false}>
51
+ <ReqoreButton
52
+ {...buttonProps}
53
+ minimal
54
+ flat={false}
55
+ iconColor='#38fdb2'
56
+ leftIconColor='#33023c:lighten:3'
57
+ rightIconColor='#0a487b:lighten:3'
58
+ >
52
59
  Minimal not flat
53
60
  </ReqoreButton>
54
61
  <ReqoreButton {...buttonProps} readOnly onClick={alert} flat={false}>
@@ -59,16 +66,17 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
59
66
  </ReqoreButton>
60
67
  </ReqoreControlGroup>
61
68
  <br />
62
- <ReqoreControlGroup fluid>
69
+ <ReqoreControlGroup fluid wrap>
63
70
  <ReqoreButton {...buttonProps} fluid>
64
71
  Fluid button
65
72
  </ReqoreButton>
66
73
  </ReqoreControlGroup>
67
74
  <br />
68
- <ReqoreControlGroup>
75
+ <ReqoreControlGroup wrap>
69
76
  <ReqoreButton
70
77
  {...buttonProps}
71
78
  description='This is a very interesting description for a button, I like it very much'
79
+ iconColor='#38fdb2'
72
80
  >
73
81
  With Default Description
74
82
  </ReqoreButton>
@@ -109,7 +117,7 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
109
117
  />
110
118
  </ReqoreControlGroup>
111
119
  <br />
112
- <ReqoreControlGroup>
120
+ <ReqoreControlGroup wrap>
113
121
  <ReqoreButton {...buttonProps} readOnly badge={10} onClick={alert}>
114
122
  Read only with badge
115
123
  </ReqoreButton>
@@ -1,6 +1,6 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import Checkbox from '../../components/Checkbox';
3
- import { ReqoreCheckbox, ReqoreControlGroup } from '../../index';
3
+ import { ReqoreCheckbox, ReqoreControlGroup, ReqoreVerticalSpacer } from '../../index';
4
4
 
5
5
  export default {
6
6
  title: 'Components/Checkbox',
@@ -10,7 +10,7 @@ export default {
10
10
  const Template: ComponentStory<typeof Checkbox> = (args) => {
11
11
  return (
12
12
  <ReqoreControlGroup vertical>
13
- <ReqoreControlGroup>
13
+ <ReqoreControlGroup wrap>
14
14
  <ReqoreCheckbox {...args} />
15
15
  <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelDetailPosition='left' />
16
16
  <ReqoreCheckbox {...args} checked tooltip='I am checked' />
@@ -18,7 +18,8 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
18
18
  <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelPosition='left' />
19
19
  <ReqoreCheckbox {...args} label='Read Only' labelPosition='left' readOnly />
20
20
  </ReqoreControlGroup>
21
- <ReqoreControlGroup>
21
+ <ReqoreVerticalSpacer height={10} />
22
+ <ReqoreControlGroup wrap>
22
23
  <ReqoreCheckbox {...args} intent='info' checked />
23
24
  <ReqoreCheckbox
24
25
  {...args}
@@ -45,7 +45,7 @@ export default {
45
45
  description: 'If true, the collection will be rounded when stacked',
46
46
  }),
47
47
  ...createArg('height', {
48
- defaultValue: '600px',
48
+ defaultValue: undefined,
49
49
  type: 'string',
50
50
  name: 'Height',
51
51
  description: 'Height of the collection',
@@ -73,6 +73,7 @@ const Template: Story<IReqoreCollectionProps> = (args) => {
73
73
  <ReqoreCollection
74
74
  {...args}
75
75
  badge={10}
76
+ selectedIcon='CheckLine'
76
77
  actions={[{ label: 'Custom action', icon: 'Home7Line' }, { actions: [{ value: 'Test' }] }]}
77
78
  />
78
79
  );
@@ -84,6 +85,13 @@ Basic.args = {
84
85
  items,
85
86
  };
86
87
 
88
+ export const WithHeight = Template.bind({});
89
+ WithHeight.args = {
90
+ label: 'Collection of items',
91
+ height: '600px',
92
+ items,
93
+ };
94
+
87
95
  export const Stacked = Template.bind({});
88
96
  Stacked.args = {
89
97
  label: 'Collection of items',
@@ -97,3 +105,10 @@ Fill.args = {
97
105
  fill: true,
98
106
  items,
99
107
  };
108
+
109
+ export const SelectedFirst = Template.bind({});
110
+ SelectedFirst.args = {
111
+ label: 'Collection of items',
112
+ items,
113
+ showSelectedFirst: true,
114
+ };
@@ -1,7 +1,13 @@
1
1
  import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { IReqoreControlGroupProps } from '../../components/ControlGroup';
3
3
  import ReqoreInput from '../../components/Input';
4
- import { ReqoreButton, ReqoreCheckbox, ReqoreControlGroup, ReqoreTag } from '../../index';
4
+ import {
5
+ ReqoreButton,
6
+ ReqoreCheckbox,
7
+ ReqoreControlGroup,
8
+ ReqoreTag,
9
+ ReqoreVerticalSpacer,
10
+ } from '../../index';
5
11
  import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
6
12
 
7
13
  const { createArg } = argManager<IReqoreControlGroupProps>();
@@ -35,37 +41,60 @@ export default {
35
41
 
36
42
  const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProps) => {
37
43
  return (
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>
44
+ <>
45
+ <ReqoreControlGroup {...args}>
46
+ <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
47
+ <ReqoreButton
48
+ icon='PictureInPictureLine'
49
+ flat={false}
50
+ effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
51
+ >
52
+ Non flat Button
53
+ </ReqoreButton>
54
+ <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
55
+ <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
56
+ <ReqoreCheckbox
57
+ asSwitch
58
+ label='Switchy switch'
59
+ margin='both'
60
+ intent='warning'
61
+ checkedIcon='CheckFill'
62
+ checked
63
+ uncheckedIcon='CheckboxBlankLine'
64
+ />
65
+ <ReqoreInput icon='4KFill' value='Hello' />
66
+ <ReqoreButton disabled fixed>
67
+ Disabled & Fixed
68
+ </ReqoreButton>
69
+ <ReqoreCheckbox checked margin='both'>
70
+ Checkbox
71
+ </ReqoreCheckbox>
65
72
 
66
- <ReqoreButton minimal>Minimal</ReqoreButton>
67
- <ReqoreTag label='smol tag' size='small' />
68
- </ReqoreControlGroup>
73
+ <ReqoreButton minimal>Minimal</ReqoreButton>
74
+ <ReqoreTag label='smol tag' size='small' />
75
+ </ReqoreControlGroup>
76
+ <ReqoreVerticalSpacer height={15} />
77
+ <ReqoreControlGroup {...args} className='root-group'>
78
+ <ReqoreControlGroup intent='info' className='group-1'>
79
+ <ReqoreButton icon='PictureInPictureLine'>Group 1</ReqoreButton>
80
+ <ReqoreTag icon='PictureInPictureLine' label='Group 1' />
81
+ </ReqoreControlGroup>
82
+ <ReqoreButton icon='PictureInPictureLine'>Root group</ReqoreButton>
83
+ <ReqoreControlGroup intent='success' className='group-2'>
84
+ <ReqoreButton icon='PictureInPictureLine'>Group 2</ReqoreButton>
85
+ <ReqoreControlGroup intent='danger' className='group-3'>
86
+ <ReqoreButton icon='PictureInPictureLine'>Group 3</ReqoreButton>
87
+ <ReqoreButton icon='PictureInPictureLine'>Group 3</ReqoreButton>
88
+ </ReqoreControlGroup>
89
+ <ReqoreCheckbox label='Group 2' margin='both' />
90
+ </ReqoreControlGroup>
91
+ <ReqoreButton icon='PictureInPictureLine'>Root group</ReqoreButton>
92
+ <ReqoreControlGroup intent='warning' className='group-4'>
93
+ <ReqoreButton icon='PictureInPictureLine'>Group 4</ReqoreButton>
94
+ <ReqoreInput icon='PictureInPictureLine' value='Group 4' />
95
+ </ReqoreControlGroup>
96
+ </ReqoreControlGroup>
97
+ </>
69
98
  );
70
99
  };
71
100
 
@@ -85,6 +114,13 @@ Vertical.args = {
85
114
  vertical: true,
86
115
  };
87
116
 
117
+ export const VerticalStacked = Template.bind({});
118
+ VerticalStacked.args = {
119
+ vertical: true,
120
+ stack: true,
121
+ fluid: true,
122
+ };
123
+
88
124
  export const Stacked = Template.bind({});
89
125
  Stacked.args = {
90
126
  stack: true,
@@ -159,11 +159,21 @@ const Template: Story<IReqoreDropdownProps> = (args: IReqoreDropdownProps) => {
159
159
 
160
160
  return (
161
161
  <>
162
- <ReqoreControlGroup>
162
+ <ReqoreControlGroup wrap>
163
163
  <ReqoreDropdown label='Default Dropdown' {...args} />
164
164
  <ReqoreDropdown label='Disabled if empty' {...args} items={[]} />
165
- <ReqoreDropdown icon='SunCloudyLine' label='Custom icon' {...args} />
166
- <ReqoreDropdown rightIcon='SunCloudyLine' caretPosition='right' {...args}>
165
+ <ReqoreDropdown
166
+ icon='SunCloudyLine'
167
+ label='Custom icon'
168
+ {...args}
169
+ leftIconColor='warning:lighten:2'
170
+ />
171
+ <ReqoreDropdown
172
+ rightIcon='SunCloudyLine'
173
+ caretPosition='right'
174
+ {...args}
175
+ iconColor='success:lighten:2'
176
+ >
167
177
  Custom icon with caret on right
168
178
  </ReqoreDropdown>
169
179
  <ReqoreDropdown
@@ -26,7 +26,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
26
26
 
27
27
  return (
28
28
  <>
29
- <ReqoreControlGroup>
29
+ <ReqoreControlGroup wrap>
30
30
  <ReqoreInput {...args} placeholder='Reqore Input' onChange={handleValueChange} />
31
31
  <ReqoreInput {...args} placeholder='Minimal Input' minimal onChange={handleValueChange} />
32
32
  <ReqoreInput
@@ -38,6 +38,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
38
38
  />
39
39
  <ReqoreInput
40
40
  {...args}
41
+ iconColor='pending:lighten:2'
41
42
  placeholder='Clearable Input'
42
43
  onClearClick={handleValueClear}
43
44
  onChange={handleValueChange}
@@ -51,7 +52,7 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
51
52
  />
52
53
  </ReqoreControlGroup>
53
54
  <br />
54
- <ReqoreControlGroup>
55
+ <ReqoreControlGroup wrap>
55
56
  <ReqoreInput
56
57
  {...args}
57
58
  placeholder='Reqore Input'
@@ -118,6 +118,7 @@ const Template: Story<IReqoreMenuProps> = (args) => {
118
118
  {
119
119
  icon: 'EmotionUnhappyLine',
120
120
  rightIcon: 'Scissors2Fill',
121
+ leftIconColor: 'danger:lighten',
121
122
  wrap: args.wrapText,
122
123
  flat: args.flat,
123
124
  } as IReqoreMenuItemProps
@@ -52,6 +52,13 @@ Minimal.args = {
52
52
  intent: 'danger',
53
53
  };
54
54
 
55
+ export const WithIconColor: Story<IReqoreMessageProps> = Template.bind({});
56
+ WithIconColor.args = {
57
+ minimal: true,
58
+ intent: 'success',
59
+ iconColor: '#00fd9f',
60
+ };
61
+
55
62
  export const Opaque: Story<IReqoreMessageProps> = Template.bind({});
56
63
  Opaque.args = {
57
64
  opaque: true,