@zealicsolutions/web-ui 1.0.53-test.9 → 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 +4 -0
  5. package/dist/cjs/contexts/LayoutContext/LayoutContextProvider.d.ts +1 -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 +8 -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 +4 -0
  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 +1 -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 +8 -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 +45 -6
  77. package/package.json +1 -2
@@ -8,5 +8,9 @@ export interface DrawerState {
8
8
  export interface LayoutContextType {
9
9
  drawer: DrawerState;
10
10
  updateDrawer: (props: Partial<DrawerState>) => void;
11
+ drawerContainerRef?: Element | null;
12
+ setDrawerContainerRef?: (ref: Element | null) => void;
13
+ headerHeight?: string;
14
+ setHeaderHeight?: (height: string) => void;
11
15
  }
12
16
  export declare const LayoutContext: import("react").Context<LayoutContextType>;
@@ -1,2 +1,2 @@
1
- import{createContext as r}from"react";var i=r({drawer:{width:0,position:"right",isOpen:!1,positionType:"normal"},updateDrawer:function(){}});export{i 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","positionType","updateDrawer"],"mappings":"sCAiBO,IAAMA,EAAgBC,EAAiC,CAC5DC,OAAQ,CAAEC,MAAO,EAAGC,SAAU,QAASC,QAAQ,EAAOC,aAAc,UACpEC,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,6 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  export interface LayoutProviderProps extends PropsWithChildren {
3
3
  layoutPosition?: 'normal' | 'absolute';
4
+ headerHeight?: string;
4
5
  drawerMaxWidthPercent?: number;
5
6
  }
6
7
  export declare const LayoutProvider: React.FC<LayoutProviderProps>;
@@ -1,2 +1,2 @@
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 n,useRef as r,useEffect as e,useMemo as o}from"react";import{LayoutContext as d}from"./LayoutContext.js";var u=function(u){var s=u.children,c=u.layoutPosition,a=void 0===c?"normal":c,p=u.drawerMaxWidthPercent,f=void 0===p?80:p,v=n({width:0,position:"right",isOpen:!1,positionType:a}),h=v[0],l=v[1],m=r(null);e((function(){l((function(t){return i(i({},t),{positionType:a})}))}),[a]),e((function(){if(m.current){var t=function(){var t;if(h.isOpen){var n=(null===(t=m.current)||void 0===t?void 0:t.clientWidth)||0,r=Math.floor(n*(f/100));h.width>r&&l((function(t){return i(i({},t),{width:r})}))}};t();var n=new ResizeObserver((function(){t()}));return n.observe(m.current),function(){n.disconnect()}}}),[h.isOpen,h.width,f]);var w=o((function(){return function(t){l((function(n){var r=void 0!==t.width?t.width:n.width;if(m.current&&(t.isOpen||n.isOpen)){var e=m.current.clientWidth,o=Math.floor(e*(f/100));r=Math.min(r,o)}var d=void 0!==t.positionType?t.positionType:n.positionType;return i(i(i({},n),t),{width:r,positionType:d})}))}}),[f]),y=o((function(){return{drawer:h,updateDrawer:w}}),[h,w]);return t(d.Provider,i({value:y},{children:t("div",i({ref:m,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:s}))}))};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","layoutPosition","_c","drawerMaxWidthPercent","_d","useState","width","position","isOpen","positionType","drawer","setDrawer","containerRef","useRef","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":"uSASO,IAAMA,EAAgD,SAACC,GAC5D,IAAAC,EAAQD,EAAAC,SACRC,EAAyBF,EAAAG,eAAzBA,OAAiB,IAAAD,EAAA,SAAQA,EACzBE,EAA0BJ,EAAAK,sBAA1BA,OAAqB,IAAAD,EAAG,GAAEA,EAGpBE,EAAsBC,EAAsB,CAChDC,MAAO,EACPC,SAAU,QACVC,QAAQ,EACRC,aAAcR,IAJTS,EAAMN,EAAA,GAAEO,OAQTC,EAAeC,EAAuB,MAG5CC,GAAU,WACRH,GAAU,SAACI,GAAY,OAClBC,EAAAA,EAAA,CAAA,EAAAD,GACH,CAAAN,aAAcR,GACd,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AU,WACVD,MAAO,OACPmC,OAAQ,OACRC,SAAU,WACX,CAAA3C,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,GAA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