@qoretechnologies/reqore 0.29.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/__tests__/checkbox.test.tsx +7 -12
  2. package/__tests__/multiselect.test.tsx +46 -0
  3. package/dist/components/Button/index.js +1 -1
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/Checkbox/index.d.ts +7 -2
  6. package/dist/components/Checkbox/index.d.ts.map +1 -1
  7. package/dist/components/Checkbox/index.js +60 -26
  8. package/dist/components/Checkbox/index.js.map +1 -1
  9. package/dist/components/Effect/index.d.ts +12 -1
  10. package/dist/components/Effect/index.d.ts.map +1 -1
  11. package/dist/components/Effect/index.js +39 -7
  12. package/dist/components/Effect/index.js.map +1 -1
  13. package/dist/components/Icon/index.d.ts +2 -9
  14. package/dist/components/Icon/index.d.ts.map +1 -1
  15. package/dist/components/Icon/index.js +4 -28
  16. package/dist/components/Icon/index.js.map +1 -1
  17. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  18. package/dist/components/InternalPopover/index.js +16 -2
  19. package/dist/components/InternalPopover/index.js.map +1 -1
  20. package/dist/components/MultiSelect/index.d.ts +4 -2
  21. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  22. package/dist/components/MultiSelect/index.js +15 -14
  23. package/dist/components/MultiSelect/index.js.map +1 -1
  24. package/dist/components/RadioGroup/index.d.ts +3 -1
  25. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  26. package/dist/components/RadioGroup/index.js +2 -2
  27. package/dist/components/RadioGroup/index.js.map +1 -1
  28. package/dist/components/Tag/index.d.ts +1 -1
  29. package/dist/components/Tag/index.d.ts.map +1 -1
  30. package/dist/components/Tag/index.js +17 -14
  31. package/dist/components/Tag/index.js.map +1 -1
  32. package/dist/components/Textarea/index.js +3 -3
  33. package/dist/components/Textarea/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/src/components/Button/index.tsx +1 -1
  36. package/src/components/Checkbox/index.tsx +189 -34
  37. package/src/components/Effect/index.tsx +68 -7
  38. package/src/components/Icon/index.tsx +4 -52
  39. package/src/components/InternalPopover/index.tsx +3 -0
  40. package/src/components/MultiSelect/index.tsx +20 -11
  41. package/src/components/RadioGroup/index.tsx +6 -0
  42. package/src/components/Tag/index.tsx +19 -13
  43. package/src/components/Textarea/index.tsx +3 -3
  44. package/src/mock/collectionData.tsx +6 -6
  45. package/src/mock/multiSelect.ts +8 -0
  46. package/src/stories/Checkbox/Checkbox.stories.tsx +42 -7
  47. package/src/stories/Icon/Icon.stories.tsx +42 -12
  48. package/src/stories/Menu/Menu.stories.tsx +2 -1
  49. package/src/stories/MultiSelect/MultiSelect.stories.tsx +9 -2
  50. package/src/stories/Popover/Popover.stories.tsx +19 -2
  51. package/src/stories/RadioGroup/RadioGroup.stories.tsx +51 -1
  52. package/src/stories/Tag/Tag.stories.tsx +2 -2
  53. package/src/stories/utils/args.ts +1 -1
  54. package/tests.json +1 -1
@@ -19,6 +19,8 @@ export interface IReqoreRadioGroupProps
19
19
  size?: TSizes;
20
20
  disabled?: boolean;
21
21
  asSwitch?: boolean;
22
+ onText?: string;
23
+ offText?: string;
22
24
  }
23
25
 
24
26
  const ReqoreRadioGroup = ({
@@ -29,6 +31,8 @@ const ReqoreRadioGroup = ({
29
31
  disabled,
30
32
  asSwitch,
31
33
  vertical = true,
34
+ onText,
35
+ offText,
32
36
  ...rest
33
37
  }: IReqoreRadioGroupProps) => (
34
38
  <ReqoreControlGroup {...rest} vertical={vertical}>
@@ -44,6 +48,8 @@ const ReqoreRadioGroup = ({
44
48
  ) : (
45
49
  <ReqoreCheckbox
46
50
  asSwitch={asSwitch}
51
+ onText={onText}
52
+ offText={offText}
47
53
  {...itemRest}
48
54
  key={value}
49
55
  checked={value === selected}
@@ -53,7 +53,7 @@ export interface IReqoreTagProps
53
53
  color?: TReqoreEffectColor;
54
54
  actions?: IReqoreTagAction[];
55
55
  width?: string;
56
- badge?: boolean;
56
+ asBadge?: boolean;
57
57
  intent?: TReqoreIntent;
58
58
  wrap?: boolean;
59
59
  }
@@ -77,17 +77,18 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
77
77
  font-size: ${({ size }) => TEXT_FROM_SIZE[size]}px;
78
78
 
79
79
  min-width: ${({ size }) => SIZE_TO_PX[size]}px;
80
- border-radius: ${({ badge, size }) => (badge ? 18 : RADIUS_FROM_SIZE[size])}px;
80
+ border-radius: ${({ asBadge, size }) => (asBadge ? 18 : RADIUS_FROM_SIZE[size])}px;
81
81
  width: ${({ width }) => width || undefined};
82
82
  transition: all 0.2s ease-out;
83
83
 
84
84
  ${({ wrap, hasWidth }) =>
85
85
  wrap || hasWidth
86
86
  ? css`
87
- min-height: ${({ size, badge }) => (badge ? BADGE_SIZE_TO_PX[size] : SIZE_TO_PX[size])}px;
87
+ min-height: ${({ size, asBadge }) =>
88
+ asBadge ? BADGE_SIZE_TO_PX[size] : SIZE_TO_PX[size]}px;
88
89
  `
89
90
  : css`
90
- height: ${({ size, badge }) => (badge ? BADGE_SIZE_TO_PX[size] : SIZE_TO_PX[size])}px;
91
+ height: ${({ size, asBadge }) => (asBadge ? BADGE_SIZE_TO_PX[size] : SIZE_TO_PX[size])}px;
91
92
  `}
92
93
 
93
94
  ${({ theme, color, labelKey, minimal }: IReqoreTagStyle) =>
@@ -220,7 +221,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
220
221
  size = 'normal',
221
222
  onRemoveClick,
222
223
  actions,
223
- badge,
224
+ asBadge,
224
225
  intent,
225
226
  color,
226
227
  minimal,
@@ -236,10 +237,15 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
236
237
  useTooltip(targetRef.current, tooltip);
237
238
 
238
239
  // If color or intent was specified, set the color
239
- let customColor: TReqoreHexColor = intent
240
- ? theme.intents[intent]
241
- : getColorFromMaybeString(theme, color);
242
- customColor = minimal ? `${customColor || '#000000'}40` : customColor;
240
+ const getCustomColor = (itemIntent?: TReqoreIntent): TReqoreHexColor => {
241
+ let customColor: TReqoreHexColor = itemIntent
242
+ ? theme.intents[itemIntent]
243
+ : getColorFromMaybeString(theme, color);
244
+
245
+ customColor = minimal ? `${customColor || '#000000'}40` : customColor;
246
+
247
+ return customColor;
248
+ };
243
249
 
244
250
  return (
245
251
  <StyledTag
@@ -250,11 +256,11 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
250
256
  }}
251
257
  width={width}
252
258
  labelKey={labelKey}
253
- color={customColor}
259
+ color={getCustomColor(intent)}
254
260
  className={`${className || ''} reqore-tag`}
255
261
  size={size}
256
262
  ref={targetRef}
257
- badge={badge}
263
+ asBadge={asBadge}
258
264
  minimal={minimal}
259
265
  removable={!!onRemoveClick}
260
266
  interactive={!!onClick && !rest.disabled}
@@ -308,7 +314,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
308
314
  component={StyledButtonWrapper}
309
315
  componentProps={{
310
316
  size,
311
- color: customColor,
317
+ color: getCustomColor(action.intent),
312
318
  className: 'reqore-tag-action',
313
319
  onClick: action.onClick,
314
320
  effect: rest.effect,
@@ -330,7 +336,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
330
336
  component={StyledButtonWrapper}
331
337
  componentProps={{
332
338
  size,
333
- color: customColor,
339
+ color: getCustomColor(intent),
334
340
  className: 'reqore-tag-remove',
335
341
  onClick: onRemoveClick,
336
342
  effect: rest.effect,
@@ -81,9 +81,9 @@ export const StyledTextarea = styled(StyledEffect)<IReqoreTextareaStyle>`
81
81
  border-radius: ${({ minimal, rounded, _size }) =>
82
82
  minimal || !rounded ? 0 : RADIUS_FROM_SIZE[_size]}px;
83
83
  border: ${({ minimal, theme, flat }) =>
84
- !minimal && !flat ? `1px solid ${changeLightness(theme.main, 0.05)}` : 0};
84
+ !minimal && !flat ? `1px solid ${changeLightness(theme.main, 0.2)}` : 0};
85
85
  border-bottom: ${({ minimal, theme, flat }) =>
86
- minimal && !flat ? `0.5px solid ${changeLightness(theme.main, 0.05)}` : undefined};
86
+ minimal && !flat ? `0.5px solid ${changeLightness(theme.main, 0.2)}` : undefined};
87
87
 
88
88
  transition: all 0.2s ease-out;
89
89
 
@@ -94,7 +94,7 @@ export const StyledTextarea = styled(StyledEffect)<IReqoreTextareaStyle>`
94
94
  &:focus,
95
95
  &:hover {
96
96
  outline: none;
97
- border-color: ${({ theme }) => changeLightness(theme.main, 0.1)};
97
+ border-color: ${({ theme }) => changeLightness(theme.main, 0.25)};
98
98
  }
99
99
  `
100
100
  : undefined}
@@ -16,12 +16,12 @@ export default [
16
16
  tags: [
17
17
  {
18
18
  label: 23,
19
- badge: true,
19
+ asBadge: true,
20
20
  },
21
21
  {
22
22
  label: 2022,
23
23
  labelKey: 'Year',
24
- badge: true,
24
+ asBadge: true,
25
25
  onRemoveClick: noop,
26
26
  },
27
27
  ],
@@ -69,12 +69,12 @@ export default [
69
69
  tags: [
70
70
  {
71
71
  label: 23,
72
- badge: true,
72
+ asBadge: true,
73
73
  },
74
74
  {
75
75
  label: 2022,
76
76
  labelKey: 'Year',
77
- badge: true,
77
+ asBadge: true,
78
78
  onRemoveClick: noop(),
79
79
  },
80
80
  ],
@@ -273,12 +273,12 @@ export default [
273
273
  tags: [
274
274
  {
275
275
  label: 23,
276
- badge: true,
276
+ asBadge: true,
277
277
  },
278
278
  {
279
279
  label: 2022,
280
280
  labelKey: 'Year',
281
- badge: true,
281
+ asBadge: true,
282
282
  onRemoveClick: noop,
283
283
  },
284
284
  ],
@@ -16,6 +16,7 @@ export const MultiSelectItems: TReqoreMultiSelectItem[] = [
16
16
  value: 'Existing item 3',
17
17
  icon: 'DropboxFill',
18
18
  intent: 'info',
19
+ rightIcon: 'SunLine',
19
20
  },
20
21
  {
21
22
  label: 'Existing item 4',
@@ -42,6 +43,13 @@ export const MultiSelectItems: TReqoreMultiSelectItem[] = [
42
43
  {
43
44
  value: 'itemWithNoLabel',
44
45
  icon: 'TakeawayLine',
46
+ actions: [
47
+ {
48
+ icon: 'ArrowLeftUpFill',
49
+ onClick: () => console.log('clicked'),
50
+ intent: 'pending',
51
+ },
52
+ ],
45
53
  },
46
54
  {
47
55
  label: 'Other Item 1',
@@ -9,13 +9,48 @@ export default {
9
9
 
10
10
  const Template: ComponentStory<typeof Checkbox> = (args) => {
11
11
  return (
12
- <ReqoreControlGroup>
13
- <ReqoreCheckbox {...args} />
14
- <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelDetailPosition='left' />
15
- <ReqoreCheckbox {...args} checked tooltip='I am checked' />
16
- <ReqoreCheckbox {...args} disabled />
17
- <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelPosition='left' />
18
- <ReqoreCheckbox {...args} label='Read Only' labelPosition='left' readOnly />
12
+ <ReqoreControlGroup vertical>
13
+ <ReqoreControlGroup>
14
+ <ReqoreCheckbox {...args} />
15
+ <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelDetailPosition='left' />
16
+ <ReqoreCheckbox {...args} checked tooltip='I am checked' />
17
+ <ReqoreCheckbox {...args} disabled />
18
+ <ReqoreCheckbox {...args} label='Label' labelDetail='Detail' labelPosition='left' />
19
+ <ReqoreCheckbox {...args} label='Read Only' labelPosition='left' readOnly />
20
+ </ReqoreControlGroup>
21
+ <ReqoreControlGroup>
22
+ <ReqoreCheckbox {...args} intent='info' />
23
+ <ReqoreCheckbox
24
+ {...args}
25
+ label='Label'
26
+ labelDetail='Detail'
27
+ labelDetailPosition='left'
28
+ labelEffect={{ gradient: { colors: { 0: 'danger:lighten:1', 100: '#ff6700' } } }}
29
+ />
30
+ <ReqoreCheckbox
31
+ {...args}
32
+ checked
33
+ tooltip='I am checked'
34
+ effect={{ gradient: { colors: { 0: '#00fafd', 100: '#ff00d0' } } }}
35
+ />
36
+ <ReqoreCheckbox {...args} disabled onText='yes' offText='no' />
37
+ <ReqoreCheckbox
38
+ {...args}
39
+ label='Label'
40
+ labelDetail='Detail'
41
+ labelPosition='left'
42
+ checkedIcon='EmotionHappyFill'
43
+ uncheckedIcon='EmotionSadFill'
44
+ />
45
+ <ReqoreCheckbox
46
+ {...args}
47
+ label='Read Only'
48
+ labelPosition='left'
49
+ readOnly
50
+ checked
51
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
52
+ />
53
+ </ReqoreControlGroup>
19
54
  </ReqoreControlGroup>
20
55
  );
21
56
  };
@@ -15,22 +15,46 @@ export const Icon: Story<IReqoreIconProps> = () => {
15
15
  <ReqoreIcon icon='ArrowLeftCircleFill' intent='success' margin='both' />
16
16
  <ReqoreIcon icon='HotelFill' size='18px' margin='both' />
17
17
  <ReqoreIcon icon='SignalTowerFill' size='20px' color='#ff0000' margin='both' />
18
- <ReqoreIcon icon='SignalTowerFill' size='20px' color='#291133' sepia margin='both' />
19
- <ReqoreIcon icon='SignalTowerFill' size='20px' color='#0c7052' blur={1} margin='both' />
18
+ <ReqoreIcon
19
+ icon='SignalTowerFill'
20
+ size='20px'
21
+ color='#291133'
22
+ effect={{ sepia: true }}
23
+ margin='both'
24
+ />
25
+ <ReqoreIcon
26
+ icon='SignalTowerFill'
27
+ size='20px'
28
+ color='#0c7052'
29
+ effect={{ blur: 1 }}
30
+ margin='both'
31
+ />
20
32
  <ReqoreIcon
21
33
  icon='SignalTowerFill'
22
34
  size='20px'
23
35
  color='#700c57'
24
- contrast={150}
36
+ effect={{ contrast: 150 }}
37
+ margin='both'
38
+ />
39
+ <ReqoreIcon
40
+ icon='SignalTowerFill'
41
+ size='20px'
42
+ color='#d5be0f'
43
+ effect={{ grayscale: true }}
44
+ margin='both'
45
+ />
46
+ <ReqoreIcon
47
+ icon='SignalTowerFill'
48
+ size='20px'
49
+ color='#0f5bd5'
50
+ effect={{ invert: true }}
25
51
  margin='both'
26
52
  />
27
- <ReqoreIcon icon='SignalTowerFill' size='20px' color='#d5be0f' grayscale margin='both' />
28
- <ReqoreIcon icon='SignalTowerFill' size='20px' color='#0f5bd5' invert margin='both' />
29
53
  <ReqoreIcon
30
54
  icon='SignalTowerFill'
31
55
  size='20px'
32
56
  color='#ffffff'
33
- opacity={0.5}
57
+ effect={{ opacity: 0.5 }}
34
58
  margin='both'
35
59
  />
36
60
  </ReqorePanel>
@@ -50,37 +74,43 @@ export const Icon: Story<IReqoreIconProps> = () => {
50
74
  <ReqoreIcon
51
75
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
52
76
  size='30px'
53
- sepia
77
+ effect={{ sepia: true }}
54
78
  margin='both'
55
79
  />
56
80
  <ReqoreIcon
57
81
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
58
82
  size='40px'
59
- blur={3}
83
+ effect={{ grayscale: true }}
60
84
  margin='both'
61
85
  />
62
86
  <ReqoreIcon
63
87
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
64
88
  size='70px'
65
- contrast={150}
89
+ effect={{ blur: 1 }}
90
+ margin='both'
91
+ />
92
+ <ReqoreIcon
93
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
94
+ size='40px'
95
+ effect={{ contrast: 150 }}
66
96
  margin='both'
67
97
  />
68
98
  <ReqoreIcon
69
99
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
70
100
  size='40px'
71
- brightness={150}
101
+ effect={{ invert: true }}
72
102
  margin='both'
73
103
  />
74
104
  <ReqoreIcon
75
105
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
76
106
  size='40px'
77
- opacity={0.5}
107
+ effect={{ opacity: 0.5 }}
78
108
  margin='both'
79
109
  />
80
110
  <ReqoreIcon
81
111
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
82
112
  size='40px'
83
- invert
113
+ effect={{ saturate: 150 }}
84
114
  margin='both'
85
115
  />
86
116
  </ReqorePanel>
@@ -8,7 +8,7 @@ import {
8
8
  ReqoreMenuItem,
9
9
  ReqorePopover,
10
10
  } from '../../index';
11
- import { argManager, IntentArg } from '../utils/args';
11
+ import { IntentArg, argManager } from '../utils/args';
12
12
 
13
13
  const { createArg } = argManager<IReqoreMenuProps>();
14
14
 
@@ -113,6 +113,7 @@ const Template: Story<IReqoreMenuProps> = (args) => {
113
113
  <ReqoreMenuDivider label='Divider' />
114
114
  <ReqorePopover
115
115
  component={ReqoreMenuItem}
116
+ flat={args.flat}
116
117
  componentProps={
117
118
  {
118
119
  icon: 'EmotionUnhappyLine',
@@ -2,7 +2,8 @@ import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { useState } from 'react';
3
3
  import { IReqoreMultiSelectProps, ReqoreMultiSelect } from '../../components/MultiSelect';
4
4
  import { MultiSelectItems } from '../../mock/multiSelect';
5
- import { argManager, FlatArg, MinimalArg, SizeArg } from '../utils/args';
5
+ import { IReqoreIconName } from '../../types/icons';
6
+ import { FlatArg, IconArg, MinimalArg, SizeArg, argManager } from '../utils/args';
6
7
 
7
8
  const { createArg } = argManager<IReqoreMultiSelectProps>();
8
9
 
@@ -27,6 +28,7 @@ export default {
27
28
  name: 'Can remove items',
28
29
  type: 'boolean',
29
30
  }),
31
+ ...IconArg('onItemClickIcon', 'Clickable item right icon', null),
30
32
  },
31
33
  } as Meta<IReqoreMultiSelectProps>;
32
34
 
@@ -45,7 +47,6 @@ const Template: Story<IReqoreMultiSelectProps> = (args: IReqoreMultiSelectProps)
45
47
  {...args}
46
48
  onValueChange={setSelected}
47
49
  enterKeySelects
48
- onItemClick={(item) => console.log('onItemClick', item)}
49
50
  selectorProps={{
50
51
  listHeight: '600px',
51
52
  ...args.selectorProps,
@@ -76,6 +77,12 @@ Minimal.args = {
76
77
  minimal: true,
77
78
  };
78
79
 
80
+ export const Clickable = Template.bind({});
81
+ Clickable.args = {
82
+ onItemClick: (item) => console.log('onItemClick', item),
83
+ onItemClickIcon: 'EditLine' as IReqoreIconName,
84
+ };
85
+
79
86
  export const WithEffect = Template.bind({});
80
87
  WithEffect.args = {
81
88
  selectedItemEffect: {
@@ -10,7 +10,7 @@ import {
10
10
  ReqorePopover,
11
11
  ReqoreSpacer,
12
12
  } from '../../index';
13
- import { argManager, FlatArg } from '../utils/args';
13
+ import { FlatArg, argManager } from '../utils/args';
14
14
 
15
15
  const { createArg } = argManager<IReqorePopoverProps>();
16
16
 
@@ -178,10 +178,27 @@ const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
178
178
  component={ReqoreButton}
179
179
  isReqoreComponent
180
180
  openOnMount
181
- placement='bottom'
181
+ placement='right'
182
182
  >
183
183
  Auto open popover
184
184
  </ReqorePopover>
185
+ <ReqorePopover
186
+ {...args}
187
+ component={ReqoreButton}
188
+ isReqoreComponent
189
+ openOnMount
190
+ placement='bottom'
191
+ content={
192
+ <ReqorePanel label='This is a test' flat>
193
+ <ReqoreMessage flat>
194
+ In to am attended desirous raptures declared diverted confined at. Collected instantly
195
+ remaining up certainly to necessary as. Over walk dull into
196
+ </ReqoreMessage>
197
+ </ReqorePanel>
198
+ }
199
+ >
200
+ With Custom Content
201
+ </ReqorePopover>
185
202
  </ReqoreControlGroup>
186
203
  );
187
204
  };
@@ -33,6 +33,43 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
33
33
  {
34
34
  label: 'Option 2',
35
35
  value: 'opt2',
36
+ onText: 1,
37
+ offText: 0,
38
+ },
39
+ {
40
+ label: 'Danger option',
41
+ value: 'danger',
42
+ intent: 'danger',
43
+ },
44
+ {
45
+ label: 'Effect option',
46
+ labelPosition: 'left',
47
+ value: 'effect',
48
+ effect: {
49
+ gradient: {
50
+ colors: {
51
+ 0: 'info',
52
+ 100: 'success',
53
+ },
54
+ },
55
+ },
56
+ },
57
+ {
58
+ label: 'Text effect & custom theme option',
59
+ value: 'textEffect',
60
+ customTheme: {
61
+ main: '#110134',
62
+ },
63
+ onText: 'On',
64
+ offText: 'Off',
65
+ switchTextEffect: {
66
+ gradient: {
67
+ colors: {
68
+ 0: 'warning',
69
+ 100: 'pending',
70
+ },
71
+ },
72
+ },
36
73
  },
37
74
  {
38
75
  divider: true,
@@ -41,7 +78,7 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
41
78
  {
42
79
  label: 'Beautiful option 3 with gradient effect',
43
80
  value: 'opt3',
44
- effect: {
81
+ labelEffect: {
45
82
  gradient: {
46
83
  colors: {
47
84
  0: 'info',
@@ -51,6 +88,12 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
51
88
  weight: 'thick',
52
89
  },
53
90
  },
91
+ {
92
+ label: 'Custom Icons Option',
93
+ value: 'customIconsOpt',
94
+ checkedIcon: 'EmotionHappyLine',
95
+ uncheckedIcon: 'EmotionSadLine',
96
+ },
54
97
  {
55
98
  label: 'Custom Image Option',
56
99
  value: 'customOpt',
@@ -86,3 +129,10 @@ export const Switch = Template.bind({});
86
129
  Switch.args = {
87
130
  asSwitch: true,
88
131
  };
132
+
133
+ export const WithTexts = Template.bind({});
134
+ WithTexts.args = {
135
+ asSwitch: true,
136
+ onText: 'True',
137
+ offText: 'False and wrong',
138
+ };
@@ -3,7 +3,7 @@ import { noop } from 'lodash';
3
3
  import { IReqoreTagProps } from '../../components/Tag';
4
4
  import { IReqoreTagGroup } from '../../components/Tag/group';
5
5
  import { ReqoreTag, ReqoreTagGroup } from '../../index';
6
- import { argManager, SizeArg } from '../utils/args';
6
+ import { SizeArg, argManager } from '../utils/args';
7
7
 
8
8
  const { createArg } = argManager<IReqoreTagGroup & IReqoreTagProps>();
9
9
 
@@ -195,7 +195,7 @@ export const Basic = Template.bind({});
195
195
  export const BigGapSize = Template.bind({});
196
196
  BigGapSize.args = { gapSize: 'big' };
197
197
  export const Badge = Template.bind({});
198
- Badge.args = { badge: true };
198
+ Badge.args = { asBadge: true };
199
199
 
200
200
  export const Effect = Template.bind({});
201
201
  Effect.args = {
@@ -57,7 +57,7 @@ export const IconArg = (
57
57
  defaultValue?: IReqoreIconName
58
58
  ) =>
59
59
  argManager<any>().createArg(iconKeyName, {
60
- defaultValue: defaultValue || '24HoursFill',
60
+ defaultValue: defaultValue || (defaultValue === null ? null : '24HoursFill'),
61
61
  name: name || 'Icon',
62
62
  description: 'The icon name used',
63
63
  control: {