@qoretechnologies/reqore 0.30.2 → 0.30.4

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 (52) hide show
  1. package/__tests__/collection.test.tsx +1 -1
  2. package/__tests__/modal.test.tsx +74 -2
  3. package/__tests__/panel.test.tsx +47 -0
  4. package/dist/components/Checkbox/index.js +1 -1
  5. package/dist/components/Collection/index.d.ts.map +1 -1
  6. package/dist/components/Collection/index.js +21 -22
  7. package/dist/components/Collection/index.js.map +1 -1
  8. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  9. package/dist/components/ControlGroup/index.js +4 -21
  10. package/dist/components/ControlGroup/index.js.map +1 -1
  11. package/dist/components/Drawer/index.d.ts +1 -1
  12. package/dist/components/Drawer/index.d.ts.map +1 -1
  13. package/dist/components/Drawer/index.js +21 -12
  14. package/dist/components/Drawer/index.js.map +1 -1
  15. package/dist/components/Panel/index.d.ts +5 -2
  16. package/dist/components/Panel/index.d.ts.map +1 -1
  17. package/dist/components/Panel/index.js +25 -25
  18. package/dist/components/Panel/index.js.map +1 -1
  19. package/dist/components/Tag/index.d.ts +2 -2
  20. package/dist/components/Tag/index.d.ts.map +1 -1
  21. package/dist/components/Tag/index.js.map +1 -1
  22. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  23. package/dist/containers/ReqoreProvider.js +3 -2
  24. package/dist/containers/ReqoreProvider.js.map +1 -1
  25. package/dist/context/ReqoreContext.d.ts +1 -0
  26. package/dist/context/ReqoreContext.d.ts.map +1 -1
  27. package/dist/context/ReqoreContext.js.map +1 -1
  28. package/dist/helpers/utils.d.ts +2 -0
  29. package/dist/helpers/utils.d.ts.map +1 -1
  30. package/dist/helpers/utils.js +3 -1
  31. package/dist/helpers/utils.js.map +1 -1
  32. package/dist/hooks/useLatestZIndex.js +2 -2
  33. package/dist/hooks/useLatestZIndex.js.map +1 -1
  34. package/dist/types/global.d.ts +13 -0
  35. package/dist/types/global.d.ts.map +1 -1
  36. package/package.json +6 -1
  37. package/src/components/Checkbox/index.tsx +1 -1
  38. package/src/components/Collection/index.tsx +25 -28
  39. package/src/components/ControlGroup/index.tsx +2 -22
  40. package/src/components/Drawer/index.tsx +21 -22
  41. package/src/components/Panel/index.tsx +44 -35
  42. package/src/components/Tag/index.tsx +3 -1
  43. package/src/containers/ReqoreProvider.tsx +39 -35
  44. package/src/context/ReqoreContext.tsx +1 -0
  45. package/src/helpers/utils.ts +3 -0
  46. package/src/hooks/useLatestZIndex.ts +2 -2
  47. package/src/stories/Checkbox/Checkbox.stories.tsx +2 -0
  48. package/src/stories/Drawer/Drawer.stories.tsx +65 -2
  49. package/src/stories/Panel/Panel.stories.tsx +52 -11
  50. package/src/stories/Tag/Tag.stories.tsx +2 -2
  51. package/src/types/global.ts +14 -0
  52. package/tests.json +1 -1
@@ -170,6 +170,7 @@ export const ReqoreDrawer = ({
170
170
  _isModal,
171
171
  width,
172
172
  height,
173
+ actions = [],
173
174
  ...rest
174
175
  }: IReqoreDrawerProps) => {
175
176
  const { animations } = useContext(ReqoreContext);
@@ -199,12 +200,12 @@ export const ReqoreDrawer = ({
199
200
 
200
201
  const zIndex = useLatestZIndex();
201
202
  const wrapperZIndex = useLatestZIndex();
202
- const actions: IReqorePanelAction[] = useMemo(() => {
203
- const actions: IReqorePanelAction[] = [];
203
+ const _actions: IReqorePanelAction[] = useMemo(() => {
204
+ const builtActions: IReqorePanelAction[] = [...actions];
204
205
 
205
206
  /* Adding a hide/show button to the drawer. */
206
207
  if (hidable) {
207
- actions.push({
208
+ builtActions.push({
208
209
  responsive: false,
209
210
  icon: getHideShowIcon(position, _isHidden),
210
211
  onClick: () => {
@@ -219,7 +220,7 @@ export const ReqoreDrawer = ({
219
220
 
220
221
  /* Adding a close button to the drawer. */
221
222
  if (onClose) {
222
- actions.push({
223
+ builtActions.push({
223
224
  responsive: false,
224
225
  icon: 'CloseLine',
225
226
  onClick: onClose,
@@ -227,7 +228,7 @@ export const ReqoreDrawer = ({
227
228
  });
228
229
  }
229
230
 
230
- return actions;
231
+ return builtActions;
231
232
  }, [hidable, position, onClose]);
232
233
 
233
234
  const positions = useMemo(() => {
@@ -265,7 +266,7 @@ export const ReqoreDrawer = ({
265
266
  />
266
267
  ) : null}
267
268
  <Resizable
268
- className='reqore-drawer-resizable'
269
+ className={`${className || ''} reqore-drawer-resizable`}
269
270
  maxHeight={
270
271
  layout === 'horizontal' || layout === 'center' ? maxSize || '90vh' : undefined
271
272
  }
@@ -344,21 +345,19 @@ export const ReqoreDrawer = ({
344
345
  <StyledCloseWrapper
345
346
  className='reqore-drawer-controls'
346
347
  position={position}
347
- w={layout === 'vertical' && _isHidden ? 0 : _size.width}
348
- h={layout === 'horizontal' && _isHidden ? 0 : _size.height}
348
+ w={layout === 'vertical' ? 0 : _size.width}
349
+ h={layout === 'horizontal' ? 0 : _size.height}
349
350
  >
350
- {hidable && (
351
- <ReqoreButton
352
- flat
353
- customTheme={theme}
354
- className='reqore-drawer-control reqore-drawer-hide-button'
355
- icon={getHideShowIcon(position, _isHidden)}
356
- onClick={() => {
357
- setIsHidden(!_isHidden);
358
- onHideToggle && onHideToggle(!_isHidden);
359
- }}
360
- />
361
- )}
351
+ <ReqoreButton
352
+ flat
353
+ customTheme={theme}
354
+ className='reqore-drawer-control reqore-drawer-hide-button'
355
+ icon={getHideShowIcon(position, _isHidden)}
356
+ onClick={() => {
357
+ setIsHidden(!_isHidden);
358
+ onHideToggle && onHideToggle(!_isHidden);
359
+ }}
360
+ />
362
361
  </StyledCloseWrapper>
363
362
  ) : null}
364
363
  {!_isHidden && (
@@ -366,12 +365,12 @@ export const ReqoreDrawer = ({
366
365
  {...rest}
367
366
  opacity={opacity}
368
367
  blur={hasBackdrop ? 0 : blur}
369
- actions={actions}
368
+ actions={_actions}
370
369
  customTheme={customTheme}
371
370
  intent={intent}
372
371
  rounded={floating || _isModal ? true : false}
373
372
  flat={flat}
374
- className={`${className || ''} reqore-drawer`}
373
+ className={`reqore-drawer`}
375
374
  style={{
376
375
  width: '100%',
377
376
  maxHeight: '100%',
@@ -19,6 +19,7 @@ import {
19
19
  getMainBackgroundColor,
20
20
  getReadableColor,
21
21
  } from '../../helpers/colors';
22
+ import { isActionShown } from '../../helpers/utils';
22
23
  import { useCombinedRefs } from '../../hooks/useCombinedRefs';
23
24
  import { useReqoreTheme } from '../../hooks/useTheme';
24
25
  import { useTooltip } from '../../hooks/useTooltip';
@@ -45,6 +46,7 @@ import { ReqoreHorizontalSpacer, ReqoreSpacer } from '../Spacer';
45
46
  export interface IReqorePanelAction extends IReqoreButtonProps, IWithReqoreTooltip, IReqoreIntent {
46
47
  label?: string | number;
47
48
  onClick?: () => void;
49
+ group?: IReqorePanelAction[];
48
50
  actions?: Omit<IReqoreDropdownItem[], 'value'>;
49
51
  // Custom react element
50
52
  as?: React.ElementType;
@@ -60,6 +62,8 @@ export interface IReqorePanelBottomAction extends IReqorePanelAction {
60
62
  }
61
63
 
62
64
  export interface IReqorePanelContent {}
65
+ export type TReqorePanelActions = IReqorePanelAction[];
66
+ export type TReqorePanelBottomActions = IReqorePanelBottomAction[];
63
67
 
64
68
  export interface IReqorePanelProps
65
69
  extends IWithReqoreSize,
@@ -78,8 +82,8 @@ export interface IReqorePanelProps
78
82
  isCollapsed?: boolean;
79
83
  onClose?: () => void;
80
84
  rounded?: boolean;
81
- actions?: (IReqorePanelAction | IReqorePanelAction[])[];
82
- bottomActions?: IReqorePanelBottomAction[];
85
+ actions?: TReqorePanelActions;
86
+ bottomActions?: TReqorePanelBottomActions;
83
87
  unMountContentOnCollapse?: boolean;
84
88
  onCollapseChange?: (isCollapsed?: boolean) => void;
85
89
  fill?: boolean;
@@ -305,7 +309,13 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
305
309
 
306
310
  // Return true if the card has a title bar, otherwise return false.
307
311
  const hasTitleBar: boolean = useMemo(
308
- () => !!label || collapsible || !!onClose || !!size(actions) || !!badge,
312
+ () =>
313
+ !!label ||
314
+ collapsible ||
315
+ !!onClose ||
316
+ !!size(actions.filter(isActionShown)) ||
317
+ !!badge ||
318
+ !!icon,
309
319
  [label, collapsible, onClose, actions, badge]
310
320
  );
311
321
 
@@ -332,60 +342,42 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
332
342
 
333
343
  // Calculates whether or not the bottom actions should be displayed.
334
344
  const hasBottomActions: boolean = useMemo(
335
- () => !!(size(leftBottomActions) || size(rightBottomActions)),
345
+ () =>
346
+ !!(
347
+ size(leftBottomActions.filter(isActionShown)) ||
348
+ size(rightBottomActions.filter(isActionShown))
349
+ ),
336
350
  [leftBottomActions, rightBottomActions]
337
351
  );
338
352
 
339
353
  const renderResponsiveActions = useCallback(
340
- (actionOrActions: IReqorePanelAction | IReqorePanelAction[], index: number) => {
341
- return renderActions(actionOrActions, index, true);
354
+ (action: IReqorePanelAction, index: number) => {
355
+ return renderActions(action, index, true);
342
356
  },
343
357
  [actions]
344
358
  );
345
359
 
346
360
  const hasNonResponsiveActions = useCallback(
347
- (data: (IReqorePanelAction[] | IReqorePanelAction)[]) =>
348
- data.some(
349
- (action) => !Array.isArray(action) && action.responsive === false && action.show !== false
350
- ),
361
+ (data: TReqorePanelActions) =>
362
+ data.some((action) => action.responsive === false && action.show !== false),
351
363
  [actions, bottomActions]
352
364
  );
353
365
 
354
366
  const hasResponsiveActions = useCallback(
355
- (data: (IReqorePanelAction[] | IReqorePanelAction)[]) =>
356
- data.some(
357
- (action) =>
358
- Array.isArray(action) || (action.responsive !== false && action.show !== false)
359
- ),
367
+ (data: TReqorePanelActions) =>
368
+ data.some((action) => action.responsive !== false && action.show !== false),
360
369
  [actions, bottomActions]
361
370
  );
362
371
 
363
372
  const renderNonResponsiveActions = useCallback(
364
- (actionOrActions: IReqorePanelAction | IReqorePanelAction[], index: number) => {
365
- return renderActions(actionOrActions, index, false);
373
+ (action: IReqorePanelAction, index: number) => {
374
+ return renderActions(action, index, false);
366
375
  },
367
376
  [actions]
368
377
  );
369
378
 
370
379
  const renderActions = useCallback(
371
- (
372
- actionOrActions: IReqorePanelAction | IReqorePanelAction[],
373
- index: number,
374
- includeResponsive
375
- ) => {
376
- const action: IReqorePanelAction = Array.isArray(actionOrActions)
377
- ? {
378
- show: true,
379
- responsive: true,
380
- as: ReqoreControlGroup,
381
- props: {
382
- stack: true,
383
- fluid: true,
384
- children: actionOrActions.map(renderActions),
385
- },
386
- }
387
- : actionOrActions;
388
-
380
+ (action: IReqorePanelAction, index: number, includeResponsive) => {
389
381
  if (
390
382
  action.show === false ||
391
383
  (includeResponsive && action.responsive === false) ||
@@ -402,9 +394,26 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
402
394
  className,
403
395
  as: CustomElement,
404
396
  props = {},
397
+ group,
405
398
  ...rest
406
399
  }: IReqorePanelAction = action;
407
400
 
401
+ if (size(group)) {
402
+ return (
403
+ <ReqoreControlGroup
404
+ intent={intent}
405
+ stack
406
+ customTheme={rest.customTheme || theme}
407
+ size={rest.size}
408
+ fixed
409
+ fluid={rest.fluid}
410
+ key={index}
411
+ >
412
+ {group.map((action, index) => renderActions(action, index, true))}
413
+ </ReqoreControlGroup>
414
+ );
415
+ }
416
+
408
417
  if (size(actions)) {
409
418
  return (
410
419
  <ReqoreDropdown<IReqoreButtonProps>
@@ -26,6 +26,7 @@ import {
26
26
  IReqoreDisabled,
27
27
  IReqoreIntent,
28
28
  IWithReqoreEffect,
29
+ IWithReqoreFixed,
29
30
  IWithReqoreFluid,
30
31
  IWithReqoreMinimal,
31
32
  IWithReqoreTooltip,
@@ -46,7 +47,8 @@ export interface IReqoreTagProps
46
47
  IReqoreDisabled,
47
48
  IWithReqoreEffect,
48
49
  IWithReqoreMinimal,
49
- IWithReqoreFluid {
50
+ IWithReqoreFluid,
51
+ IWithReqoreFixed {
50
52
  size?: TSizes;
51
53
  label?: string | number;
52
54
  labelKey?: string | number;
@@ -120,6 +120,7 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, options = {}
120
120
  isMobile,
121
121
  isTablet,
122
122
  isMobileOrTablet,
123
+ latestZIndex: latestZIndex.current,
123
124
  getAndIncreaseZIndex,
124
125
  animations: options.animations || { buttons: true, dialogs: true },
125
126
  tooltips: options.tooltips || { delay: 0 },
@@ -157,44 +158,47 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, options = {}
157
158
  </ReqoreNotificationsWrapper>
158
159
  ) : null}
159
160
  {children}
160
- <ReqoreModal
161
- isOpen={confirmationModal.isOpen}
162
- flat
163
- opacity={0.9}
164
- blur={2}
165
- width='500px'
166
- intent={confirmationModal.intent}
167
- label={confirmationModal.title || 'Confirm your action'}
168
- icon='ErrorWarningFill'
169
- bottomActions={[
170
- {
171
- label: confirmationModal.cancelLabel || 'Cancel',
172
- icon: 'CloseLine',
173
- onClick: () => {
174
- confirmationModal?.onCancel?.();
175
- closeConfirmationModal();
161
+ {confirmationModal.isOpen && (
162
+ <ReqoreModal
163
+ isOpen
164
+ flat
165
+ opacity={0.9}
166
+ blur={2}
167
+ width='500px'
168
+ intent={confirmationModal.intent}
169
+ label={confirmationModal.title || 'Confirm your action'}
170
+ icon='ErrorWarningFill'
171
+ className='reqore-confirmation-modal'
172
+ bottomActions={[
173
+ {
174
+ label: confirmationModal.cancelLabel || 'Cancel',
175
+ icon: 'CloseLine',
176
+ onClick: () => {
177
+ confirmationModal?.onCancel?.();
178
+ closeConfirmationModal();
179
+ },
180
+ position: 'left',
176
181
  },
177
- position: 'left',
178
- },
179
- {
180
- label: confirmationModal.confirmLabel || 'Confirm',
181
- intent: confirmationModal.confirmButtonIntent || 'success',
182
- icon: confirmationModal.confirmIcon || 'CheckLine',
183
- onClick: () => {
184
- confirmationModal?.onConfirm?.();
185
- closeConfirmationModal();
182
+ {
183
+ label: confirmationModal.confirmLabel || 'Confirm',
184
+ intent: confirmationModal.confirmButtonIntent || 'success',
185
+ icon: confirmationModal.confirmIcon || 'CheckLine',
186
+ onClick: () => {
187
+ confirmationModal?.onConfirm?.();
188
+ closeConfirmationModal();
189
+ },
190
+ position: 'right',
186
191
  },
187
- position: 'right',
188
- },
189
- ]}
190
- >
191
- <ReqoreTextEffect
192
- as='p'
193
- effect={{ textAlign: 'center', weight: 'bold', textSize: 'big' }}
192
+ ]}
194
193
  >
195
- {confirmationModal.description || 'Are you sure you want to proceed?'}
196
- </ReqoreTextEffect>
197
- </ReqoreModal>
194
+ <ReqoreTextEffect
195
+ as='p'
196
+ effect={{ textAlign: 'center', weight: 'bold', textSize: 'big' }}
197
+ >
198
+ {confirmationModal.description || 'Are you sure you want to proceed?'}
199
+ </ReqoreTextEffect>
200
+ </ReqoreModal>
201
+ )}
198
202
  </ReqoreContext.Provider>
199
203
  </>
200
204
  );
@@ -14,6 +14,7 @@ export interface IReqoreContext {
14
14
  readonly animations?: IReqoreOptions['animations'];
15
15
  readonly tooltips?: IReqoreOptions['tooltips'];
16
16
  readonly closePopoversOnEscPress?: boolean;
17
+ readonly latestZIndex?: number;
17
18
  }
18
19
 
19
20
  export default createContext<IReqoreContext>({
@@ -8,6 +8,7 @@ import {
8
8
  isString,
9
9
  isUndefined,
10
10
  } from 'lodash';
11
+ import { IReqorePanelAction } from '../components/Panel';
11
12
  import { NUMBER_TO_SIZE, SIZES, SIZE_TO_NUMBER, TSizes } from '../constants/sizes';
12
13
 
13
14
  export const sleep = async (ms: number) => await new Promise((r) => setTimeout(r, ms));
@@ -88,3 +89,5 @@ export const getOneLessSize = (size: TSizes): TSizes => {
88
89
  // Get the size name from the number
89
90
  return NUMBER_TO_SIZE[oneLessSizeNumber];
90
91
  };
92
+
93
+ export const isActionShown = (action: IReqorePanelAction) => action.show !== false;
@@ -2,8 +2,8 @@ import { useContext, useMemo } from 'react';
2
2
  import { ReqoreContext } from '..';
3
3
 
4
4
  const useLatestZIndex = (): number => {
5
- const { getAndIncreaseZIndex } = useContext(ReqoreContext);
6
- const zIndex = useMemo(() => getAndIncreaseZIndex(), []);
5
+ const { getAndIncreaseZIndex, latestZIndex } = useContext(ReqoreContext);
6
+ const zIndex = useMemo(() => getAndIncreaseZIndex(), [latestZIndex]);
7
7
 
8
8
  return zIndex;
9
9
  };
@@ -35,6 +35,8 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
35
35
  effect={{ gradient: { colors: { 0: '#00fafd', 100: '#ff00d0' } } }}
36
36
  />
37
37
  <ReqoreCheckbox {...args} disabled onText='yes' offText='no' />
38
+ <ReqoreCheckbox {...args} onText='yes' offText='no' />
39
+ <ReqoreCheckbox {...args} onText='yes' offText='no' checked />
38
40
  <ReqoreCheckbox
39
41
  {...args}
40
42
  label='Label'
@@ -2,9 +2,11 @@ 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';
5
6
  import {
6
7
  ReqoreButton,
7
8
  ReqoreContext,
9
+ ReqoreInput,
8
10
  ReqorePanel,
9
11
  ReqoreTabs,
10
12
  ReqoreTabsContent,
@@ -124,7 +126,68 @@ const Template: Story<IReqoreDrawerProps> = (args: IReqoreDrawerProps) => {
124
126
  attacks inhabit pursuit our but. Lasted hunted enough an up seeing in lively letter. Had
125
127
  judgment out opinions property the supplied.
126
128
  </ReqorePanel>
127
- <ReqoreDrawer {...args} label='This is a test' icon='EmphasisCn' onClose={noop}>
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
+ >
128
191
  <ReqoreTabs
129
192
  flat
130
193
  intent={args.intent}
@@ -181,5 +244,5 @@ Transparent.args = {
181
244
  };
182
245
  export const WithSize = Template.bind({});
183
246
  WithSize.args = {
184
- size: '350px',
247
+ size: '500px',
185
248
  };
@@ -124,7 +124,6 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
124
124
 
125
125
  return (
126
126
  <ReqorePanel
127
- {...args}
128
127
  badge={[
129
128
  10,
130
129
  0,
@@ -144,15 +143,25 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
144
143
  ]}
145
144
  actions={[
146
145
  {
147
- label: 'Non responsive',
148
- icon: '24HoursFill',
149
- customTheme: { main: '#eb0e8c' },
150
146
  responsive: false,
147
+ group: [
148
+ {
149
+ label: 'Non responsive',
150
+ icon: '24HoursFill',
151
+ customTheme: { main: '#eb0e8c' },
152
+ },
153
+ {
154
+ icon: 'FullscreenExitLine',
155
+ customTheme: { main: '#a40a62' },
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ group: [
161
+ { label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
162
+ { icon: 'CopperCoinFill', intent: 'danger' },
163
+ ],
151
164
  },
152
- [
153
- { label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
154
- { icon: 'CopperCoinFill', intent: 'danger' },
155
- ],
156
165
  {
157
166
  as: ReqoreInput,
158
167
  props: {
@@ -171,7 +180,14 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
171
180
  },
172
181
  ]}
173
182
  bottomActions={[
174
- { label: 'Test', icon: '24HoursFill', position: 'left' },
183
+ {
184
+ position: 'left',
185
+ intent: 'success',
186
+ group: [
187
+ { label: 'Test 1', icon: '24HoursFill' },
188
+ { label: 'Test 2', icon: '24HoursFill' },
189
+ ],
190
+ },
175
191
  {
176
192
  label: 'More actions',
177
193
  position: 'right',
@@ -181,6 +197,7 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
181
197
  ],
182
198
  },
183
199
  ]}
200
+ {...args}
184
201
  >
185
202
  Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
186
203
  of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
@@ -220,9 +237,33 @@ export const Flat = Template.bind({});
220
237
  Flat.args = {
221
238
  flat: true,
222
239
  };
223
- export const NoLabel: Story<IReqorePanelProps> = Template.bind({});
224
- NoLabel.args = {
240
+ export const NoBars: Story<IReqorePanelProps> = Template.bind({});
241
+ NoBars.args = {
225
242
  label: undefined,
243
+ badge: undefined,
244
+ icon: undefined,
245
+ actions: [
246
+ { label: 'test', show: false },
247
+ {
248
+ show: false,
249
+ group: [
250
+ { label: 'test 2', show: true },
251
+ { label: 'test 3', show: true },
252
+ ],
253
+ },
254
+ ],
255
+ bottomActions: [
256
+ { label: 'test', show: false, position: 'left' },
257
+ {
258
+ position: 'right',
259
+ show: false,
260
+ group: [
261
+ { label: 'test 2', show: true },
262
+ { label: 'test 3', show: true },
263
+ ],
264
+ },
265
+ ],
266
+ collapsible: false,
226
267
  };
227
268
 
228
269
  export const Transparent: Story<IReqorePanelProps> = Template.bind({});
@@ -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
 
@@ -85,7 +85,7 @@ const Template: Story<IReqoreTagGroup & IReqoreTagProps> = ({ columns, ...args }
85
85
  />
86
86
  <ReqoreTag labelKey='Tag with' label='Label Key' icon='AlarmWarningLine' {...args} />
87
87
  <ReqoreTag labelKey='Key' label='value' {...args} />
88
- <ReqoreTag icon='QuestionAnswerLine' {...args} />
88
+ <ReqoreTag icon='QuestionAnswerLine' {...args} fixed />
89
89
  <ReqoreTag label='Disabled Tag' disabled icon='AlarmWarningLine' {...args} />
90
90
  <ReqoreTag
91
91
  label='300px Tag'
@@ -140,6 +140,20 @@ export interface IWithReqoreFluid {
140
140
  fluid?: boolean;
141
141
  }
142
142
 
143
+ export interface IWithReqoreFixed {
144
+ /**
145
+ * If true, the component will be fixed in fluid containers
146
+ * @default false
147
+ * @type boolean
148
+ * @example
149
+ * <ReqoreInput fixed />
150
+ * <ReqoreInput fixed={true} />
151
+ * <ReqoreInput fixed={false} />
152
+ *
153
+ */
154
+ fixed?: boolean;
155
+ }
156
+
143
157
  export interface IWithReqoreMinimal {
144
158
  /**
145
159
  * If true, the component will be minimal