period-ui 0.3.5 → 0.3.7
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/components/atoms/drop-down-menu/components/full-screen-drop-down-menu.d.ts.map +1 -1
- package/dist/components/atoms/drop-down-menu/components/full-screen-drop-down-menu.js +1 -1
- package/dist/components/atoms/drop-down-menu/components/full-screen-drop-down-menu.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/molecules/modal/components/full-screen-modal.d.ts.map +1 -1
- package/dist/components/molecules/modal/components/full-screen-modal.js +3 -1
- package/dist/components/molecules/modal/components/full-screen-modal.js.map +1 -1
- package/dist/components/organisms/dropdown-button/dropdown-button.d.ts +19 -0
- package/dist/components/organisms/dropdown-button/dropdown-button.d.ts.map +1 -0
- package/dist/components/organisms/dropdown-button/dropdown-button.js +13 -0
- package/dist/components/organisms/dropdown-button/dropdown-button.js.map +1 -0
- package/dist/components/organisms/dropdown-button/index.d.ts +2 -0
- package/dist/components/organisms/dropdown-button/index.d.ts.map +1 -0
- package/dist/components/organisms/dropdown-button/index.js +18 -0
- package/dist/components/organisms/dropdown-button/index.js.map +1 -0
- package/dist/components/organisms/dropdown-button/use-dropdown-button.d.ts +11 -0
- package/dist/components/organisms/dropdown-button/use-dropdown-button.d.ts.map +1 -0
- package/dist/components/organisms/dropdown-button/use-dropdown-button.js +19 -0
- package/dist/components/organisms/dropdown-button/use-dropdown-button.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21781 -0
- package/dist/utils/window-dimensions-utils.d.ts.map +1 -1
- package/dist/utils/window-dimensions-utils.js +6 -7
- package/dist/utils/window-dimensions-utils.js.map +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-dimensions-utils.d.ts","sourceRoot":"","sources":["../../src/utils/window-dimensions-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"window-dimensions-utils.d.ts","sourceRoot":"","sources":["../../src/utils/window-dimensions-utils.ts"],"names":[],"mappings":"AAmBA,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,oBAAoB,CAyB1D"}
|
|
@@ -9,20 +9,19 @@ const screenBreakpoints = {
|
|
|
9
9
|
lg: 924,
|
|
10
10
|
xl: 1366,
|
|
11
11
|
};
|
|
12
|
+
const INITIAL_DIMENSIONS = { width: 0, height: 0, isMobile: true };
|
|
12
13
|
function getWindowDimensions() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return { width, height, isMobile };
|
|
17
|
-
}
|
|
18
|
-
return { width: 0, height: 0, isMobile: true };
|
|
14
|
+
const { innerWidth: width, innerHeight: height } = window;
|
|
15
|
+
const isMobile = width <= screenBreakpoints.md;
|
|
16
|
+
return { width, height, isMobile };
|
|
19
17
|
}
|
|
20
18
|
function useWindowDimensions() {
|
|
21
|
-
const [windowDimensions, setWindowDimensions] = (0, react_1.useState)(
|
|
19
|
+
const [windowDimensions, setWindowDimensions] = (0, react_1.useState)(INITIAL_DIMENSIONS);
|
|
22
20
|
(0, react_1.useEffect)(() => {
|
|
23
21
|
function handleResize() {
|
|
24
22
|
setWindowDimensions(getWindowDimensions());
|
|
25
23
|
}
|
|
24
|
+
handleResize();
|
|
26
25
|
window.addEventListener('resize', handleResize);
|
|
27
26
|
return () => window.removeEventListener('resize', handleResize);
|
|
28
27
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-dimensions-utils.js","sourceRoot":"","sources":["../../src/utils/window-dimensions-utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"window-dimensions-utils.js","sourceRoot":"","sources":["../../src/utils/window-dimensions-utils.ts"],"names":[],"mappings":";;AA0BA,kDAyBC;AAnDD,iCAAqD;AAErD,MAAM,iBAAiB,GAAG;IACxB,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,IAAI;CACT,CAAC;AAEF,MAAM,kBAAkB,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEnE,SAAS,mBAAmB;IAC1B,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1D,MAAM,QAAQ,GAAG,KAAK,IAAI,iBAAiB,CAAC,EAAE,CAAC;IAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACrC,CAAC;AASD,SAAgB,mBAAmB;IAKjC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,IAAA,gBAAQ,EAAC,kBAAkB,CAAC,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,SAAS,YAAY;YACnB,mBAAmB,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAC7C,CAAC;QAED,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEzF,OAAO;QACL,KAAK,EAAE,gBAAgB,CAAC,KAAK;QAC7B,MAAM,EAAE,gBAAgB,CAAC,MAAM;QAC/B,QAAQ,EAAE,gBAAgB,CAAC,QAAQ;QACnC,SAAS;KACV,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "period-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/index.mjs",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
6
7
|
"style": "dist/index.css",
|
|
7
8
|
"type": "commonjs",
|
|
9
|
+
"sideEffects": false,
|
|
8
10
|
"files": [
|
|
9
11
|
"dist",
|
|
10
12
|
"README.md",
|
|
@@ -103,7 +105,7 @@
|
|
|
103
105
|
"exports": {
|
|
104
106
|
".": {
|
|
105
107
|
"types": "./dist/index.d.ts",
|
|
106
|
-
"import": "./dist/index.
|
|
108
|
+
"import": "./dist/index.mjs",
|
|
107
109
|
"require": "./dist/index.js",
|
|
108
110
|
"style": "./dist/index.css"
|
|
109
111
|
}
|