@zealicsolutions/web-ui 1.0.53-test.8 → 1.0.54

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 (77) hide show
  1. package/dist/cjs/components/RichTextViewer/RichTextViewer.d.ts +1 -1
  2. package/dist/cjs/containers/types/moleculeItemTypes.d.ts +9 -3
  3. package/dist/cjs/containers/types/moleculeTypes.d.ts +2 -2
  4. package/dist/cjs/contexts/LayoutContext/LayoutContext.d.ts +6 -1
  5. package/dist/cjs/contexts/LayoutContext/LayoutContextProvider.d.ts +2 -0
  6. package/dist/cjs/index.js +1568 -1568
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/molecules/Avatar/Avatar.stories.d.ts +6 -17
  9. package/dist/cjs/molecules/ContentWrapper/ContentWrapper.d.ts +3 -0
  10. package/dist/cjs/molecules/ContentWrapper/ContentWrapper.stories.d.ts +4 -0
  11. package/dist/cjs/molecules/Drawer/styles.d.ts +10 -3
  12. package/dist/cjs/molecules/Drawer/types.d.ts +27 -2
  13. package/dist/esm/components/Avatar/Avatar.js +1 -1
  14. package/dist/esm/components/Buttons/IconButton.js +1 -1
  15. package/dist/esm/components/Circle/Circle.js +1 -1
  16. package/dist/esm/components/RichTextViewer/RichTextViewer.d.ts +1 -1
  17. package/dist/esm/components/RichTextViewer/RichTextViewer.js +1 -1
  18. package/dist/esm/components/RichTextViewer/RichTextViewer.js.map +1 -1
  19. package/dist/esm/components/Toast/ToastContent.js +1 -1
  20. package/dist/esm/containers/Container.js +1 -1
  21. package/dist/esm/containers/ContainerStoriesComponent.js +1 -1
  22. package/dist/esm/containers/FormContainer.js +1 -1
  23. package/dist/esm/containers/FormStepContainer.js +1 -1
  24. package/dist/esm/containers/OrganismItem.js +1 -1
  25. package/dist/esm/containers/hooks/useStateListenerValue.js +1 -1
  26. package/dist/esm/containers/hooks/useStateModifierHandler.js +1 -1
  27. package/dist/esm/containers/types/moleculeItemTypes.d.ts +9 -3
  28. package/dist/esm/containers/types/moleculeTypes.d.ts +2 -2
  29. package/dist/esm/contexts/ApiContext/queries/useDataModelFieldOptions.js +1 -1
  30. package/dist/esm/contexts/ButtonActionsContext/ButtonActionsContextProvider.js +1 -1
  31. package/dist/esm/contexts/FormStepContext/FormStepContextProvider.js +1 -1
  32. package/dist/esm/contexts/LayoutContext/LayoutContext.d.ts +6 -1
  33. package/dist/esm/contexts/LayoutContext/LayoutContext.js +1 -1
  34. package/dist/esm/contexts/LayoutContext/LayoutContext.js.map +1 -1
  35. package/dist/esm/contexts/LayoutContext/LayoutContextProvider.d.ts +2 -0
  36. package/dist/esm/contexts/LayoutContext/LayoutContextProvider.js +1 -1
  37. package/dist/esm/contexts/LayoutContext/LayoutContextProvider.js.map +1 -1
  38. package/dist/esm/helpers/utils.js +1 -1
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/molecules/Accordion/Accordion.js +1 -1
  41. package/dist/esm/molecules/Avatar/Avatar.js +1 -1
  42. package/dist/esm/molecules/Avatar/Avatar.stories.d.ts +6 -17
  43. package/dist/esm/molecules/BaseMolecule.js +1 -1
  44. package/dist/esm/molecules/BaseMolecule.js.map +1 -1
  45. package/dist/esm/molecules/BasicTextField/BasicTextField.js +1 -1
  46. package/dist/esm/molecules/Checklist/Checklist.js +1 -1
  47. package/dist/esm/molecules/Consent/ConsentCapture.js +1 -1
  48. package/dist/esm/molecules/Consent/ConsentMolecule.js +1 -1
  49. package/dist/esm/molecules/ContentWrapper/ContentWrapper.d.ts +3 -0
  50. package/dist/esm/molecules/ContentWrapper/ContentWrapper.js +1 -1
  51. package/dist/esm/molecules/ContentWrapper/ContentWrapper.js.map +1 -1
  52. package/dist/esm/molecules/ContentWrapper/ContentWrapper.stories.d.ts +4 -0
  53. package/dist/esm/molecules/CurrencyInputtField/CurrencyInputField.js +1 -1
  54. package/dist/esm/molecules/CustomValidation/CustomValidation.js +1 -1
  55. package/dist/esm/molecules/DatePicker/DatePicker.js +1 -1
  56. package/dist/esm/molecules/Drawer/Drawer.js +1 -1
  57. package/dist/esm/molecules/Drawer/Drawer.js.map +1 -1
  58. package/dist/esm/molecules/Drawer/styles.d.ts +10 -3
  59. package/dist/esm/molecules/Drawer/styles.js +1 -1
  60. package/dist/esm/molecules/Drawer/styles.js.map +1 -1
  61. package/dist/esm/molecules/Drawer/types.d.ts +27 -2
  62. package/dist/esm/molecules/EmailInputField/EmailInputField.js +1 -1
  63. package/dist/esm/molecules/Menu/Menu.js +1 -1
  64. package/dist/esm/molecules/NumericInputField/NumericInputField.js +1 -1
  65. package/dist/esm/molecules/PasswordSetup/PasswordSetup.js +1 -1
  66. package/dist/esm/molecules/PdfDocument/PdfDocument.js +1 -1
  67. package/dist/esm/molecules/PhoneNumberInputField/PhoneNumberInputField.js +1 -1
  68. package/dist/esm/molecules/Rating/Rating.js +1 -1
  69. package/dist/esm/molecules/Select/Select.js +1 -1
  70. package/dist/esm/molecules/Slider/Slider.js +1 -1
  71. package/dist/esm/molecules/SpeedDial/SpeedDial.js +1 -1
  72. package/dist/esm/molecules/Stepper/Stepper.js +1 -1
  73. package/dist/esm/molecules/Switch/Switch.js +1 -1
  74. package/dist/esm/molecules/Tabs/Tabs.js +1 -1
  75. package/dist/esm/molecules/ZealUIModal/ZealUIModal.js +1 -1
  76. package/dist/index.d.ts +48 -7
  77. package/package.json +1 -2
@@ -1,11 +1,16 @@
1
1
  /// <reference types="react" />
2
2
  export interface DrawerState {
3
3
  width: number;
4
- position: 'left' | 'right';
4
+ position: 'left' | 'right' | 'top' | 'bottom';
5
5
  isOpen: boolean;
6
+ positionType?: 'absolute' | 'normal';
6
7
  }
7
8
  export interface LayoutContextType {
8
9
  drawer: DrawerState;
9
10
  updateDrawer: (props: Partial<DrawerState>) => void;
11
+ drawerContainerRef?: Element | null;
12
+ setDrawerContainerRef?: (ref: Element | null) => void;
13
+ headerHeight?: string;
14
+ setHeaderHeight?: (height: string) => void;
10
15
  }
11
16
  export declare const LayoutContext: import("react").Context<LayoutContextType>;
@@ -1,2 +1,2 @@
1
- import{createContext as r}from"react";var t=r({drawer:{width:0,position:"right",isOpen:!1},updateDrawer:function(){}});export{t as LayoutContext};
1
+ import{createContext as e}from"react";var r=e({drawer:{width:0,position:"right",isOpen:!1,positionType:"normal"},updateDrawer:function(){},drawerContainerRef:void 0,setDrawerContainerRef:function(){},headerHeight:"0px",setHeaderHeight:function(){}});export{r as LayoutContext};
2
2
  //# sourceMappingURL=LayoutContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutContext.js","sources":["../../../../../src/contexts/LayoutContext/LayoutContext.ts"],"sourcesContent":[null],"names":["LayoutContext","createContext","drawer","width","position","isOpen","updateDrawer"],"mappings":"sCAgBO,IAAMA,EAAgBC,EAAiC,CAC5DC,OAAQ,CAAEC,MAAO,EAAGC,SAAU,QAASC,QAAQ,GAC/CC,aAAc,WAAQ"}
1
+ {"version":3,"file":"LayoutContext.js","sources":["../../../../../src/contexts/LayoutContext/LayoutContext.ts"],"sourcesContent":[null],"names":["LayoutContext","createContext","drawer","width","position","isOpen","positionType","updateDrawer","drawerContainerRef","undefined","setDrawerContainerRef","headerHeight","setHeaderHeight"],"mappings":"sCAqBO,IAAMA,EAAgBC,EAAiC,CAC5DC,OAAQ,CAAEC,MAAO,EAAGC,SAAU,QAASC,QAAQ,EAAOC,aAAc,UACpEC,aAAc,WAAQ,EACtBC,wBAAoBC,EACpBC,sBAAuB,WAAQ,EAC/BC,aAAc,MACdC,gBAAiB,WAAQ"}
@@ -1,5 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  export interface LayoutProviderProps extends PropsWithChildren {
3
+ layoutPosition?: 'normal' | 'absolute';
4
+ headerHeight?: string;
3
5
  drawerMaxWidthPercent?: number;
4
6
  }
5
7
  export declare const LayoutProvider: React.FC<LayoutProviderProps>;
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"../../node_modules/tslib/tslib.es6.js";import{jsx as t}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useState as i,useRef as e,useEffect as n,useMemo as o}from"react";import{LayoutContext as d}from"./LayoutContext.js";var u=function(u){var c=u.children,s=u.drawerMaxWidthPercent,a=void 0===s?80:s,h=i({width:0,position:"right",isOpen:!1}),f=h[0],v=h[1],l=e(null);n((function(){if(l.current){var t=function(){var t;if(f.isOpen){var i=(null===(t=l.current)||void 0===t?void 0:t.clientWidth)||0,e=Math.floor(i*(a/100));f.width>e&&v((function(t){return r(r({},t),{width:e})}))}};t();var i=new ResizeObserver((function(){t()}));return i.observe(l.current),function(){i.disconnect()}}}),[f.isOpen,f.width,a]);var m=o((function(){return function(t){v((function(i){var e=void 0!==t.width?t.width:i.width;if(l.current&&(t.isOpen||i.isOpen)){var n=l.current.clientWidth,o=Math.floor(n*(a/100));e=Math.min(e,o)}return r(r(r({},i),t),{width:e})}))}}),[a]),w=o((function(){return{drawer:f,updateDrawer:m}}),[f,m]);return t(d.Provider,r({value:w},{children:t("div",r({ref:l,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:c}))}))};export{u as LayoutProvider};
1
+ import{__assign as i}from"../../node_modules/tslib/tslib.es6.js";import{jsx as t}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useState as e,useRef as r,useEffect as n,useMemo as o}from"react";import{LayoutContext as d}from"./LayoutContext.js";var u=function(u){var a=u.children,s=u.layoutPosition,c=void 0===s?"normal":s,h=u.drawerMaxWidthPercent,p=void 0===h?80:h,f=u.headerHeight,v=void 0===f?"0px":f,l=e({width:0,position:"right",isOpen:!1,positionType:c}),m=l[0],w=l[1],y=r(null),x=e(null),O=x[0],T=x[1];n((function(){w((function(t){return i(i({},t),{positionType:c})}))}),[c]),n((function(){if(y.current){var t=function(){var t;if(m.isOpen){var e=(null===(t=y.current)||void 0===t?void 0:t.clientWidth)||0,r=Math.floor(e*(p/100));m.width>r&&w((function(t){return i(i({},t),{width:r})}))}};t();var e=new ResizeObserver((function(){t()}));return e.observe(y.current),function(){e.disconnect()}}}),[m.isOpen,m.width,p]);var j=o((function(){return function(t){w((function(e){var r=void 0!==t.width?t.width:e.width;if(y.current&&(t.isOpen||e.isOpen)){var n=y.current.clientWidth,o=Math.floor(n*(p/100));r=Math.min(r,o)}var d=void 0!==t.positionType?t.positionType:e.positionType;return i(i(i({},e),t),{width:r,positionType:d})}))}}),[p]),b=o((function(){return{drawer:m,updateDrawer:j,drawerContainerRef:O,setDrawerContainerRef:T,headerHeight:v}}),[m,j,O,v]);return t(d.Provider,i({value:b},{children:t("div",i({ref:y,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:a}))}))};export{u as LayoutProvider};
2
2
  //# sourceMappingURL=LayoutContextProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutContextProvider.js","sources":["../../../../../src/contexts/LayoutContext/LayoutContextProvider.tsx"],"sourcesContent":[null],"names":["LayoutProvider","_a","children","_b","drawerMaxWidthPercent","_c","useState","width","position","isOpen","drawer","setDrawer","containerRef","useRef","useEffect","current","constrainDrawerWidth","containerWidth","clientWidth","maxWidth","Math","floor","__assign","resizeObserver","ResizeObserver","observe","disconnect","updateDrawer","useMemo","props","newWidth","undefined","min","contextValue","_jsx","LayoutContext","Provider","value","ref","style","height","overflow"],"mappings":"uSAQO,IAAMA,EAAgD,SAACC,GAC5D,IAAAC,aACAC,EAAAF,EAAAG,sBAAAA,OAAqB,IAAAD,EAAG,GAAEA,EAGpBE,EAAsBC,EAAsB,CAChDC,MAAO,EACPC,SAAU,QACVC,QAAQ,IAHHC,EAAML,EAAA,GAAEM,OAOTC,EAAeC,EAAuB,MAG5CC,GAAU,WACR,GAAKF,EAAaG,QAAlB,CAGA,IAAMC,EAAuB,iBAC3B,GAAKN,EAAOD,OAAZ,CAEA,IAAMQ,GAAuC,QAAtBhB,EAAAW,EAAaG,eAAS,IAAAd,OAAA,EAAAA,EAAAiB,cAAe,EACtDC,EAAWC,KAAKC,MAAMJ,GAAkBb,EAAwB,MAElEM,EAAOH,MAAQY,GACjBR,GAAU,SAAAI,GAAW,OAChBO,EAAAA,EAAA,CAAA,EAAAP,GACH,CAAAR,MAAOY,GACP,GATuB,CAW7B,EAGAH,IAGA,IAAMO,EAAiB,IAAIC,gBAAe,WACxCR,GACF,IAIA,OAFAO,EAAeE,QAAQb,EAAaG,SAE7B,WACLQ,EAAeG,YACjB,CA7BkC,CA8BpC,GAAG,CAAChB,EAAOD,OAAQC,EAAOH,MAAOH,IAGjC,IAAMuB,EAAeC,GACnB,WAAM,OAAA,SAACC,GACLlB,GAAU,SAAAI,GAER,IAAIe,OAA2BC,IAAhBF,EAAMtB,MAAsBsB,EAAMtB,MAAQQ,EAAQR,MAEjE,GAAIK,EAAaG,UAAYc,EAAMpB,QAAUM,EAAQN,QAAS,CAC5D,IAAMQ,EAAiBL,EAAaG,QAAQG,YACtCC,EAAWC,KAAKC,MAAMJ,GAAkBb,EAAwB,MACtE0B,EAAWV,KAAKY,IAAIF,EAAUX,EAC/B,CAED,OAAAG,EAAAA,EAAAA,EAAA,GACKP,GACAc,IACHtB,MAAOuB,GAEX,GACF,CAAC,GACD,CAAC1B,IAIG6B,EAAeL,GACnB,WAAM,MAAC,CACLlB,OAAMA,EACNiB,aAAYA,KAEd,CAACjB,EAAQiB,IAGX,OACEO,EAACC,EAAcC,YAASC,MAAOJ,GAAY,CAAA/B,SACzCgC,WACEI,IAAK1B,EACL2B,MAAO,CACL/B,SAAU,WACVD,MAAO,OACPiC,OAAQ,OACRC,SAAU,WACX,CAAAvC,SAEAA,OAIT"}
1
+ {"version":3,"file":"LayoutContextProvider.js","sources":["../../../../../src/contexts/LayoutContext/LayoutContextProvider.tsx"],"sourcesContent":[null],"names":["LayoutProvider","_a","children","_b","layoutPosition","_c","drawerMaxWidthPercent","_d","headerHeight","_e","useState","width","position","isOpen","positionType","drawer","setDrawer","containerRef","useRef","_f","drawerContainerRef","setDrawerContainerRef","useEffect","current","__assign","constrainDrawerWidth","containerWidth","clientWidth","maxWidth","Math","floor","resizeObserver","ResizeObserver","observe","disconnect","updateDrawer","useMemo","props","newWidth","undefined","min","newPositionType","contextValue","_jsx","LayoutContext","Provider","value","ref","style","height","overflow"],"mappings":"uSAUO,IAAMA,EAAgD,SAACC,GAC5D,IAAAC,aACAC,EAAAF,EAAAG,eAAAA,aAAiB,SAAQD,EACzBE,EAAAJ,EAAAK,sBAAAA,OAAqB,IAAAD,EAAG,GAAEA,EAC1BE,EAAAN,EAAAO,aAAAA,OAAY,IAAAD,EAAG,MAAKA,EAGdE,EAAsBC,EAAsB,CAChDC,MAAO,EACPC,SAAU,QACVC,QAAQ,EACRC,aAAcV,IAJTW,EAAMN,EAAA,GAAEO,OAQTC,EAAeC,EAAuB,MAGtCC,EAA8CT,EAAyB,MAAtEU,EAAkBD,EAAA,GAAEE,EAAqBF,EAAA,GAGhDG,GAAU,WACRN,GAAU,SAACO,GAAY,OAClBC,EAAAA,EAAA,CAAA,EAAAD,GACH,CAAAT,aAAcV,GACd,GACJ,GAAG,CAACA,IAGJkB,GAAU,WACR,GAAKL,EAAaM,QAAlB,CAGA,IAAME,EAAuB,iBAC3B,GAAKV,EAAOF,OAAZ,CAEA,IAAMa,GAAuC,QAAtBzB,EAAAgB,EAAaM,eAAS,IAAAtB,OAAA,EAAAA,EAAA0B,cAAe,EACtDC,EAAWC,KAAKC,MAAMJ,GAAkBpB,EAAwB,MAElES,EAAOJ,MAAQiB,GACjBZ,GAAU,SAACO,GAAY,OAClBC,EAAAA,EAAA,CAAA,EAAAD,GACH,CAAAZ,MAAOiB,GACP,GATuB,CAW7B,EAGAH,IAGA,IAAMM,EAAiB,IAAIC,gBAAe,WACxCP,GACF,IAIA,OAFAM,EAAeE,QAAQhB,EAAaM,SAE7B,WACLQ,EAAeG,YACjB,CA7BkC,CA8BpC,GAAG,CAACnB,EAAOF,OAAQE,EAAOJ,MAAOL,IAGjC,IAAM6B,EAAeC,GACnB,WAAM,OAAA,SAACC,GACLrB,GAAU,SAACO,GAET,IAAIe,OAA2BC,IAAhBF,EAAM1B,MAAsB0B,EAAM1B,MAAQY,EAAQZ,MAGjE,GAAIM,EAAaM,UAAYc,EAAMxB,QAAUU,EAAQV,QAAS,CAC5D,IAAMa,EAAiBT,EAAaM,QAAQI,YACtCC,EAAWC,KAAKC,MAAMJ,GAAkBpB,EAAwB,MAEtEgC,EAAWT,KAAKW,IAAIF,EAAUV,EAC/B,CAGD,IAAMa,OACmBF,IAAvBF,EAAMvB,aAA6BuB,EAAMvB,aAAeS,EAAQT,aAElE,OACKU,EAAAA,EAAAA,EAAA,CAAA,EAAAD,GACAc,GACH,CAAA1B,MAAO2B,EACPxB,aAAc2B,GAElB,GACF,CAAC,GACD,CAACnC,IAIGoC,EAAeN,GACnB,WAAM,MAAC,CACLrB,OAAMA,EACNoB,aAAYA,EACZf,mBAAkBA,EAClBC,sBAAqBA,EACrBb,aAAYA,EALR,GAON,CAACO,EAAQoB,EAAcf,EAAoBZ,IAG7C,OACEmC,EAACC,EAAcC,YAASC,MAAOJ,GAAY,CAAAxC,SACzCyC,WACEI,IAAK9B,EACL+B,MAAO,CACLpC,SAAU,WACVD,MAAO,OACPsC,OAAQ,OACRC,SAAU,WACX,CAAAhD,SAEAA,OAIT"}