@foris/avocado-not-front 1.3.0 → 1.4.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.
@@ -0,0 +1,8 @@
1
+ import { type FC } from 'react';
2
+ import { DrawerNotFrontProps } from '../../types';
3
+ interface DrawerNotFrontExtendedProps extends DrawerNotFrontProps {
4
+ userFlow: string;
5
+ pageId: string;
6
+ }
7
+ declare const DrawerNotFront: FC<DrawerNotFrontExtendedProps>;
8
+ export default DrawerNotFront;
@@ -20,4 +20,5 @@ import Table from './table/Table';
20
20
  import TextField from './text-field/TextField';
21
21
  import Toast from './toast/Toast';
22
22
  import Accordion from './accordion/Accordion';
23
- export { Body, Breadcrumbs, Button, CardNotification, Checkbox, CodeEditor, ContentWrapper, Divider, Chart, Header, Modal, OverlayRenderer, Pill, RoundButton, Row, Select, Spacing, Switch, Table, TextField, Toast, Accordion, };
23
+ import Drawer from './drawer/Drawer';
24
+ export { Body, Breadcrumbs, Button, CardNotification, Checkbox, CodeEditor, ContentWrapper, Divider, Chart, Drawer, Header, Modal, OverlayRenderer, Pill, RoundButton, Row, Select, Spacing, Switch, Table, TextField, Toast, Accordion, };
@@ -11,6 +11,7 @@ export type UserFlow = {
11
11
  isLoading: boolean;
12
12
  overlay: OverlayContent | null;
13
13
  isModalOpen?: boolean;
14
+ isDrawerOpen?: boolean;
14
15
  };
15
16
  export declare const useStore: import("zustand").UseBoundStore<import("zustand").StoreApi<NotFrontStore>>;
16
17
  export declare const setNotFrontStore: (userFlowId: string, apiConfig: ApiConfig, page: PageContent) => void;
@@ -53,3 +54,10 @@ export declare const setIsLoading: (userFlow: string, isLoading: boolean) => voi
53
54
  * @param isModalOpen - The new isModalOpen state
54
55
  */
55
56
  export declare const setModalOpen: (userFlow: string, isModalOpen: boolean) => void;
57
+ /**
58
+ * Updates the isDrawerOpen state for a specific userFlow.
59
+ *
60
+ * @param userFlow - The identifier for the current userFlow
61
+ * @param isDrawerOpen - The new isDrawerOpen state
62
+ */
63
+ export declare const setDrawerOpen: (userFlow: string, isDrawerOpen: boolean) => void;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- ._body_14tsv_1{padding:2rem 2.75rem;width:100%}._body_content_14tsv_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._cardNotificationNotFront_t7pln_1{max-width:50%}@media (max-width: 992px){._cardNotificationNotFront_t7pln_1{max-width:100%}}._codeEditor_1t8xs_1:not(:first-child){margin:1rem 0 0}._codeEditor_label_1t8xs_4{color:var(--color-neutral-90);display:block;font-family:Roboto,sans-serif;font-size:.75rem;font-weight:700;line-height:.875rem;margin:0 0 .5rem}._codeEditor_wrapper_1t8xs_13{display:flex;gap:1rem}._codeEditor_wrapper_1t8xs_13 ._input_1t8xs_17,._codeEditor_wrapper_1t8xs_13 ._preview_1t8xs_18{flex:1}._codeEditor_wrapper_1t8xs_13 ._input_1t8xs_17{border-radius:.25rem;border:1px solid var(--color-neutral-30);overflow:hidden}._codeEditor_wrapper_1t8xs_13 ._preview_1t8xs_18{max-height:400px;border-radius:.25rem;border:1px solid var(--color-neutral-30);min-height:400px;overflow-y:auto;padding:.75rem}._contentWrapper_12gyy_1{max-width:1440px}._contentWrapper_12gyy_1._contentWrapper__centered_12gyy_4{margin:0 auto}._dividerNotFront_tze3j_1{margin:1.25rem 0}._header_g1eri_1{padding:1.5rem 2.75rem;background-color:var(--color-gray-80)}._header_content_g1eri_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._modalContent_1ynhd_1{display:flex;flex-direction:column;gap:.75rem;max-height:50vh;overflow:auto;padding:0 .25rem .5rem 0;width:calc(100% - .25rem)}@media (max-width: 992px){._modalContent_1ynhd_1{max-height:70vh;overflow:auto}}._row_1bqj4_1{display:flex;width:100%}._row__gap-none_1bqj4_5{gap:0}._row__gap-xxs_1bqj4_8{gap:.25rem}._row__gap-xs_1bqj4_11{gap:.5rem}._row__gap-sm_1bqj4_14{gap:.75rem}._row__gap-md_1bqj4_17{gap:1rem}._row__gap-lg_1bqj4_20{gap:1.25rem}._row__gap-xl_1bqj4_23{gap:1.5rem}._row__gap-xxl_1bqj4_26{gap:2rem}._row__gap-xxxl_1bqj4_29{gap:2.75rem}._row__justify-start_1bqj4_32{justify-content:flex-start}._row__justify-end_1bqj4_35{justify-content:flex-end}._row__justify-center_1bqj4_38{justify-content:center}._row__justify-space-between_1bqj4_41{justify-content:space-between}._row__justify-space-around_1bqj4_44{justify-content:space-around}._row__justify-space-evenly_1bqj4_47{justify-content:space-evenly}._row__align-start_1bqj4_50{align-items:flex-start}._row__align-end_1bqj4_53{align-items:flex-end}._row__align-center_1bqj4_56{align-items:center}._row__align-stretch_1bqj4_59{align-items:stretch}._row__align-baseline_1bqj4_62{align-items:baseline}._row_column_1bqj4_65{display:flex;flex-direction:column;min-height:1px;overflow-wrap:break-word;word-wrap:break-word}._row_column__gap-none_1bqj4_72{gap:0}._row_column__gap-xxs_1bqj4_75{gap:.25rem}._row_column__gap-xs_1bqj4_78{gap:.5rem}._row_column__gap-sm_1bqj4_81{gap:.75rem}._row_column__gap-md_1bqj4_84{gap:1rem}._row_column__gap-lg_1bqj4_87{gap:1.25rem}._row_column__gap-xl_1bqj4_90{gap:1.5rem}._row_column__gap-xxl_1bqj4_93{gap:2rem}._row_column__gap-xxxl_1bqj4_96{gap:2.75rem}._row_column__justify-start_1bqj4_99{justify-content:flex-start}._row_column__justify-end_1bqj4_102{justify-content:flex-end}._row_column__justify-center_1bqj4_105{justify-content:center}._row_column__justify-space-between_1bqj4_108{justify-content:space-between}._row_column__justify-space-around_1bqj4_111{justify-content:space-around}._row_column__justify-space-evenly_1bqj4_114{justify-content:space-evenly}._row_column__align-start_1bqj4_117{align-items:flex-start}._row_column__align-end_1bqj4_120{align-items:flex-end}._row_column__align-center_1bqj4_123{align-items:center}._row_column__align-stretch_1bqj4_126{align-items:stretch}._row_column__align-baseline_1bqj4_129{align-items:baseline}._selectNotFront_1yw9q_1{max-width:364px}@media (max-width: 992px){._selectNotFront_1yw9q_1{max-width:364px}}._spacing_19hqa_1._spacing__xxs_19hqa_1{margin:.25rem 0 0}._spacing_19hqa_1._spacing__xs_19hqa_4{margin:.5rem 0 0}._spacing_19hqa_1._spacing__sm_19hqa_7{margin:.75rem 0 0}._spacing_19hqa_1._spacing__md_19hqa_10{margin:1rem 0 0}._spacing_19hqa_1._spacing__lg_19hqa_13{margin:1.25rem 0 0}._spacing_19hqa_1._spacing__xl_19hqa_16{margin:1.5rem 0 0}._spacing_19hqa_1._spacing__xxl_19hqa_19{margin:2rem 0 0}._spacing_19hqa_1._spacing__xxxl_19hqa_22{margin:2.75rem 0 0}._tableSkeleton_3nr9n_1{display:flex;flex-direction:column;gap:.5rem}._tableArrayPills_3nr9n_7{display:flex;gap:.5rem;flex-wrap:wrap}._textFieldNotFront_cps4i_1{max-width:364px}@media (max-width: 992px){._textFieldNotFront_cps4i_1{max-width:364px}}._accordion_1ri2t_1{flex-shrink:0}._accordion_1ri2t_1 [class*=cardNotificationNotFront]{max-width:100%}._accordionBody_1ri2t_8{display:flex;flex-direction:column;gap:.75rem}
1
+ ._body_14tsv_1{padding:2rem 2.75rem;width:100%}._body_content_14tsv_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._cardNotificationNotFront_t7pln_1{max-width:50%}@media (max-width: 992px){._cardNotificationNotFront_t7pln_1{max-width:100%}}._codeEditor_1t8xs_1:not(:first-child){margin:1rem 0 0}._codeEditor_label_1t8xs_4{color:var(--color-neutral-90);display:block;font-family:Roboto,sans-serif;font-size:.75rem;font-weight:700;line-height:.875rem;margin:0 0 .5rem}._codeEditor_wrapper_1t8xs_13{display:flex;gap:1rem}._codeEditor_wrapper_1t8xs_13 ._input_1t8xs_17,._codeEditor_wrapper_1t8xs_13 ._preview_1t8xs_18{flex:1}._codeEditor_wrapper_1t8xs_13 ._input_1t8xs_17{border-radius:.25rem;border:1px solid var(--color-neutral-30);overflow:hidden}._codeEditor_wrapper_1t8xs_13 ._preview_1t8xs_18{max-height:400px;border-radius:.25rem;border:1px solid var(--color-neutral-30);min-height:400px;overflow-y:auto;padding:.75rem}._contentWrapper_12gyy_1{max-width:1440px}._contentWrapper_12gyy_1._contentWrapper__centered_12gyy_4{margin:0 auto}._dividerNotFront_tze3j_1{margin:1.25rem 0}._header_g1eri_1{padding:1.5rem 2.75rem;background-color:var(--color-gray-80)}._header_content_g1eri_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._modalContent_1ynhd_1{display:flex;flex-direction:column;gap:.75rem;max-height:50vh;overflow:auto;padding:0 .25rem .5rem 0;width:calc(100% - .25rem)}@media (max-width: 992px){._modalContent_1ynhd_1{max-height:70vh;overflow:auto}}._row_1bqj4_1{display:flex;width:100%}._row__gap-none_1bqj4_5{gap:0}._row__gap-xxs_1bqj4_8{gap:.25rem}._row__gap-xs_1bqj4_11{gap:.5rem}._row__gap-sm_1bqj4_14{gap:.75rem}._row__gap-md_1bqj4_17{gap:1rem}._row__gap-lg_1bqj4_20{gap:1.25rem}._row__gap-xl_1bqj4_23{gap:1.5rem}._row__gap-xxl_1bqj4_26{gap:2rem}._row__gap-xxxl_1bqj4_29{gap:2.75rem}._row__justify-start_1bqj4_32{justify-content:flex-start}._row__justify-end_1bqj4_35{justify-content:flex-end}._row__justify-center_1bqj4_38{justify-content:center}._row__justify-space-between_1bqj4_41{justify-content:space-between}._row__justify-space-around_1bqj4_44{justify-content:space-around}._row__justify-space-evenly_1bqj4_47{justify-content:space-evenly}._row__align-start_1bqj4_50{align-items:flex-start}._row__align-end_1bqj4_53{align-items:flex-end}._row__align-center_1bqj4_56{align-items:center}._row__align-stretch_1bqj4_59{align-items:stretch}._row__align-baseline_1bqj4_62{align-items:baseline}._row_column_1bqj4_65{display:flex;flex-direction:column;min-height:1px;overflow-wrap:break-word;word-wrap:break-word}._row_column__gap-none_1bqj4_72{gap:0}._row_column__gap-xxs_1bqj4_75{gap:.25rem}._row_column__gap-xs_1bqj4_78{gap:.5rem}._row_column__gap-sm_1bqj4_81{gap:.75rem}._row_column__gap-md_1bqj4_84{gap:1rem}._row_column__gap-lg_1bqj4_87{gap:1.25rem}._row_column__gap-xl_1bqj4_90{gap:1.5rem}._row_column__gap-xxl_1bqj4_93{gap:2rem}._row_column__gap-xxxl_1bqj4_96{gap:2.75rem}._row_column__justify-start_1bqj4_99{justify-content:flex-start}._row_column__justify-end_1bqj4_102{justify-content:flex-end}._row_column__justify-center_1bqj4_105{justify-content:center}._row_column__justify-space-between_1bqj4_108{justify-content:space-between}._row_column__justify-space-around_1bqj4_111{justify-content:space-around}._row_column__justify-space-evenly_1bqj4_114{justify-content:space-evenly}._row_column__align-start_1bqj4_117{align-items:flex-start}._row_column__align-end_1bqj4_120{align-items:flex-end}._row_column__align-center_1bqj4_123{align-items:center}._row_column__align-stretch_1bqj4_126{align-items:stretch}._row_column__align-baseline_1bqj4_129{align-items:baseline}._selectNotFront_1yw9q_1{max-width:364px}@media (max-width: 992px){._selectNotFront_1yw9q_1{max-width:364px}}._spacing_19hqa_1._spacing__xxs_19hqa_1{margin:.25rem 0 0}._spacing_19hqa_1._spacing__xs_19hqa_4{margin:.5rem 0 0}._spacing_19hqa_1._spacing__sm_19hqa_7{margin:.75rem 0 0}._spacing_19hqa_1._spacing__md_19hqa_10{margin:1rem 0 0}._spacing_19hqa_1._spacing__lg_19hqa_13{margin:1.25rem 0 0}._spacing_19hqa_1._spacing__xl_19hqa_16{margin:1.5rem 0 0}._spacing_19hqa_1._spacing__xxl_19hqa_19{margin:2rem 0 0}._spacing_19hqa_1._spacing__xxxl_19hqa_22{margin:2.75rem 0 0}._tableSkeleton_3nr9n_1{display:flex;flex-direction:column;gap:.5rem}._tableArrayPills_3nr9n_7{display:flex;gap:.5rem;flex-wrap:wrap}._textFieldNotFront_cps4i_1{max-width:364px}@media (max-width: 992px){._textFieldNotFront_cps4i_1{max-width:364px}}._accordion_1ri2t_1{flex-shrink:0}._accordion_1ri2t_1 [class*=cardNotificationNotFront]{max-width:100%}._accordionBody_1ri2t_8{display:flex;flex-direction:column;gap:.75rem}._drawer_13pxo_1{z-index:9}._drawerBody_13pxo_5{display:flex;flex-direction:column;gap:.75rem}._drawerFooter_13pxo_11{display:flex;gap:.75rem}
@@ -1,4 +1,4 @@
1
- import { ButtonProps, CardNotificationProps, CheckboxProps, DividerProps, HeadingProps, PillProps, RoundButtonProps, SelectProps, SwitchProps, TableProps, TextFieldProps, TextProps, ModalProps, AccordionProps } from '../../../avocado-suite';
1
+ import { ButtonProps, CardNotificationProps, CheckboxProps, DividerProps, HeadingProps, PillProps, RoundButtonProps, SelectProps, SwitchProps, TableProps, TextFieldProps, TextProps, ModalProps, AccordionProps, DrawerProps } from '../../../avocado-suite';
2
2
  import { NotFrontActionType, NotFrontBaseProps, NotFrontDataSource, NotFrontDataSourceChart, NotFrontDataSourceSelect, NotFrontDataSourceTable, NotFrontDependency } from './componentsCore.type';
3
3
  /**
4
4
  * Represents a single breadcrumb item for the NotFront component
@@ -437,6 +437,24 @@ export interface ToastNotFrontProps extends NotFrontBaseProps {
437
437
  */
438
438
  variant: 'success' | 'error' | 'warning' | 'info';
439
439
  }
440
+ /**
441
+ * Interface for the props used in the DrawerNotFront component.
442
+ */
443
+ export interface DrawerNotFrontProps extends NotFrontBaseProps, Omit<DrawerProps, 'children' | 'header' | 'footer' | 'isOpen' | 'onClose'> {
444
+ component: 'drawer';
445
+ /**
446
+ * The content to be rendered in the header section of the drawer.
447
+ */
448
+ header?: string | NotFrontComponent[];
449
+ /**
450
+ * The content to be rendered in the body section of the drawer.
451
+ */
452
+ body: NotFrontComponent[];
453
+ /**
454
+ * The content to be rendered in the footer section of the drawer.
455
+ */
456
+ footer?: NotFrontComponent[];
457
+ }
440
458
  /**
441
459
  * Interface for the props used in the AccordionNotFront component.
442
460
  */
@@ -452,7 +470,7 @@ export interface AccordionNotFrontProps extends NotFrontBaseProps, Omit<Accordio
452
470
  /**
453
471
  * Union type representing all possible NotFront component prop types.
454
472
  */
455
- export type NotFrontComponent = AccordionNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DividerNotFrontProps | HeadingNotFrontProps | ModalNotFrontProps | PillNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps;
473
+ export type NotFrontComponent = AccordionNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DividerNotFrontProps | DrawerNotFrontProps | HeadingNotFrontProps | ModalNotFrontProps | PillNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps;
456
474
  /**
457
475
  * Mapping of component identifiers (as strings) to their corresponding prop types.
458
476
  */
@@ -465,6 +483,7 @@ export type NotFrontComponentTypeMap = {
465
483
  checkbox: CheckboxNotFrontProps;
466
484
  code: CodeEditorNotFrontProps;
467
485
  divider: DividerNotFrontProps;
486
+ drawer: DrawerNotFrontProps;
468
487
  heading: HeadingNotFrontProps;
469
488
  modal: ModalNotFrontProps;
470
489
  pill: PillNotFrontProps;
@@ -2,7 +2,7 @@ export interface NotFrontBaseProps {
2
2
  hash: string;
3
3
  responseKey: string;
4
4
  }
5
- export type NotFrontActionType = 'GO_TO_NEXT_UI' | 'FETCH_AND_GO_TO_NEXT_UI' | 'REDIRECT' | 'GET_DATA_SOURCE' | 'AUTOCLOSE_AND_REDIRECT' | 'CLOSE_MODAL';
5
+ export type NotFrontActionType = 'GO_TO_NEXT_UI' | 'FETCH_AND_GO_TO_NEXT_UI' | 'REDIRECT' | 'GET_DATA_SOURCE' | 'AUTOCLOSE_AND_REDIRECT' | 'CLOSE_MODAL' | 'CLOSE_DRAWER' | 'OPEN_DRAWER';
6
6
  interface BaseDataSource {
7
7
  url: string;
8
8
  method: 'post' | 'get' | 'put' | 'patch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foris/avocado-not-front",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,9 +31,9 @@
31
31
  "react-select-async-paginate": "0.7.3",
32
32
  "recharts": "3.1.0",
33
33
  "zustand": "4.5.4",
34
- "@foris/avocado-core": "0.12.1",
34
+ "@foris/avocado-suite": "1.0.1",
35
35
  "@foris/avocado-icons": "1.16.0",
36
- "@foris/avocado-suite": "1.0.0"
36
+ "@foris/avocado-core": "0.12.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@testing-library/jest-dom": "6.4.0",