@zealicsolutions/web-ui 1.0.53-test.8 → 1.0.53-test.9
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.
- package/dist/cjs/contexts/LayoutContext/LayoutContext.d.ts +2 -1
- package/dist/cjs/contexts/LayoutContext/LayoutContextProvider.d.ts +1 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Drawer/styles.d.ts +2 -0
- package/dist/esm/contexts/LayoutContext/LayoutContext.d.ts +2 -1
- package/dist/esm/contexts/LayoutContext/LayoutContext.js +1 -1
- package/dist/esm/contexts/LayoutContext/LayoutContext.js.map +1 -1
- package/dist/esm/contexts/LayoutContext/LayoutContextProvider.d.ts +1 -0
- package/dist/esm/contexts/LayoutContext/LayoutContextProvider.js +1 -1
- package/dist/esm/contexts/LayoutContext/LayoutContextProvider.js.map +1 -1
- package/dist/esm/molecules/Drawer/Drawer.js +1 -1
- package/dist/esm/molecules/Drawer/Drawer.js.map +1 -1
- package/dist/esm/molecules/Drawer/styles.d.ts +2 -0
- package/dist/esm/molecules/Drawer/styles.js +1 -1
- package/dist/esm/molecules/Drawer/styles.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
@@ -14,6 +14,7 @@ export declare type StyledDrawerProps = DrawerComponentProps & {
|
|
14
14
|
marginRight?: string;
|
15
15
|
marginBottom?: string;
|
16
16
|
marginLeft?: string;
|
17
|
+
positionType?: 'absolute' | 'normal';
|
17
18
|
};
|
18
19
|
export declare const BaseDrawer: import("@emotion/styled").StyledComponent<DrawerComponentProps & {
|
19
20
|
theme?: import("@emotion/react").Theme | undefined;
|
@@ -29,6 +30,7 @@ export declare const BaseDrawer: import("@emotion/styled").StyledComponent<Drawe
|
|
29
30
|
marginRight?: string | undefined;
|
30
31
|
marginBottom?: string | undefined;
|
31
32
|
marginLeft?: string | undefined;
|
33
|
+
positionType?: "absolute" | "normal" | undefined;
|
32
34
|
}, {}, {}>;
|
33
35
|
export declare type IconWrapperProps = {
|
34
36
|
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
@@ -1,8 +1,9 @@
|
|
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;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{createContext as r}from"react";var
|
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};
|
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":"
|
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,2 +1,2 @@
|
|
1
|
-
import{__assign as
|
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};
|
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","
|
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,IAA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