@open-condo/ui 1.27.1 → 1.27.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoints.d.ts","sourceRoot":"","sources":["../../../../src/components/_utils/hooks/useBreakpoints.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAKhD,wBAAgB,cAAc,CAAE,eAAe,UAAO,GAAG,SAAS,CAkBjE"}
1
+ {"version":3,"file":"useBreakpoints.d.ts","sourceRoot":"","sources":["../../../../src/components/_utils/hooks/useBreakpoints.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAehD,wBAAgB,cAAc,CAAE,eAAe,UAAO,GAAG,SAAS,CAkBjE"}
package/dist/hooks.js CHANGED
@@ -290,10 +290,19 @@ function useForceUpdate() {
290
290
  ;// CONCATENATED MODULE: ./src/components/_utils/hooks/useBreakpoints.tsx
291
291
 
292
292
 
293
-
293
+ // NOTE: In ssr we do not know the width of the window, so we set all breakpoints to true by default
294
+
295
+ var DEFAULT_BREAKPOINTS_VALUE = {
296
+ MOBILE_SMALL: true,
297
+ MOBILE_LARGE: true,
298
+ TABLET_SMALL: true,
299
+ TABLET_LARGE: true,
300
+ DESKTOP_SMALL: true,
301
+ DESKTOP_LARGE: true
302
+ };
294
303
  function useBreakpoints() {
295
304
  var refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
296
- var screensRef = (0,external_react_.useRef)({});
305
+ var screensRef = (0,external_react_.useRef)(DEFAULT_BREAKPOINTS_VALUE);
297
306
  var forceUpdate = useForceUpdate();
298
307
  (0,external_react_.useEffect)(function () {
299
308
  if (typeof window !== 'undefined') {
package/dist/index.js CHANGED
@@ -47817,10 +47817,19 @@ var responsiveObserve = {
47817
47817
  ;// CONCATENATED MODULE: ./src/components/_utils/hooks/useBreakpoints.tsx
47818
47818
 
47819
47819
 
47820
-
47820
+ // NOTE: In ssr we do not know the width of the window, so we set all breakpoints to true by default
47821
+
47822
+ var DEFAULT_BREAKPOINTS_VALUE = {
47823
+ MOBILE_SMALL: true,
47824
+ MOBILE_LARGE: true,
47825
+ TABLET_SMALL: true,
47826
+ TABLET_LARGE: true,
47827
+ DESKTOP_SMALL: true,
47828
+ DESKTOP_LARGE: true
47829
+ };
47821
47830
  function useBreakpoints() {
47822
47831
  var refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
47823
- var screensRef = useRef({});
47832
+ var screensRef = useRef(DEFAULT_BREAKPOINTS_VALUE);
47824
47833
  var forceUpdate = useForceUpdate();
47825
47834
  useEffect(function () {
47826
47835
  if (typeof window !== 'undefined') {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 04 Apr 2023 15:52:40 GMT
3
+ * Generated on Fri, 07 Apr 2023 11:57:38 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 04 Apr 2023 15:52:40 GMT
3
+ // Generated on Fri, 07 Apr 2023 11:57:38 GMT
4
4
 
5
5
  @condo-global-spacing-4: 4px;
6
6
  @condo-global-spacing-8: 8px;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "React",
9
9
  "components"
10
10
  ],
11
- "version": "1.27.1",
11
+ "version": "1.27.2",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/open-condo-software/condo.git",