react-responsive-tools 2.3.21 → 2.4.0

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/README.MD CHANGED
@@ -29,7 +29,7 @@ npm install react-responsive-tools
29
29
  To use the generated SCSS files, import the main SCSS file from the library:
30
30
 
31
31
  ```scss
32
- @import 'react-responsive-tools';
32
+ @use 'react-responsive-tools' as *;
33
33
  ```
34
34
 
35
35
  ### Import JavaScript
@@ -306,7 +306,7 @@ After re-generating the files, the following SCSS mixins will be available:
306
306
  #### Horizontal Breakpoints
307
307
 
308
308
  ```scss
309
- @import "_custom-breakpoints";
309
+ @use "_custom-breakpoints" as *;
310
310
 
311
311
  @mixin mob-first($breakpoint) {
312
312
  @media (min-width: map-get($horizontal-breakpoints, $breakpoint)) {
@@ -445,7 +445,7 @@ After re-generating the files, the following SCSS mixins will be available:
445
445
  #### Vertical Breakpoints
446
446
 
447
447
  ```scss
448
- @import "_custom-breakpoints";
448
+ @use "_custom-breakpoints" as *;
449
449
 
450
450
  @mixin v-mob-first($breakpoint) {
451
451
  @media (min-height: map-get($vertical-breakpoints, $breakpoint)) {
@@ -9,6 +9,6 @@ interface Props {
9
9
  interface ForComponentProps extends Props {
10
10
  p: TBreakpoint | number;
11
11
  }
12
- export declare function For({ children, p }: ForComponentProps): React.ReactNode;
13
- export declare function Before({ children, p }: ForComponentProps): React.ReactNode;
12
+ export declare function For({ children, p }: ForComponentProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export declare function Before({ children, p }: ForComponentProps): import("react/jsx-runtime").JSX.Element | null;
14
14
  export {};
@@ -1,16 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  /**
2
3
  * Created by westp on 15.05.2023
3
4
  */
5
+ import { Fragment } from "react";
4
6
  import { useBreakpointDF, useBreakpointMF } from '../hooks/useBreakpoint.js';
5
7
  export function For({ children, p }) {
6
8
  const is = useBreakpointMF(p);
7
9
  if (is)
8
- return children;
10
+ return _jsx(Fragment, { children: children });
9
11
  return null;
10
12
  }
11
13
  export function Before({ children, p }) {
12
14
  const is = useBreakpointDF(p);
13
15
  if (is)
14
- return children;
16
+ return _jsx(Fragment, { children: children });
15
17
  return null;
16
18
  }
package/dist/index.scss CHANGED
@@ -1,4 +1,4 @@
1
- @import "./scss/vertical";
2
- @import "./scss/horizontal";
3
- @import "./scss/horizontal-breakpoints";
4
- @import "./scss/vertical-breakpoints";
1
+ @use "./scss/vertical" as *;
2
+ @use "./scss/horizontal" as *;
3
+ @use "./scss/horizontal-breakpoints" as *;
4
+ @use "./scss/vertical-breakpoints" as *;
@@ -1 +1 @@
1
- import n from"fs";import e from"path";import{fileURLToPath as i}from"url";import{HORIZONTAL_BREAKPOINTS as r,VERTICAL_BREAKPOINTS as o}from"../breakpoints.config.js";const s=i(import.meta.url),t=e.dirname(s),l=(c=r,`\n@import "horizontal";\n\n${Object.keys(c).map((n=>`\n/**\n * @mixin for-${n}\n * @description Mixin for applying styles for screens greater than or equal to ${c[n]}px.\n * @example\n * @include for-${n} {\n * // your styles here\n * }\n */\n@mixin for-${n}() {\n @include mob-first(${n}) {\n @content;\n }\n}`)).join("\n")}\n\n${Object.keys(c).map((n=>`\n/**\n * @mixin before-${n}\n * @description Mixin for applying styles for screens less than ${c[n]}px.\n * @example\n * @include before-${n} {\n * // your styles here\n * }\n */\n@mixin before-${n}() {\n @include desk-first(${n}) {\n @content;\n }\n}`)).join("\n")}\n`);var c;const p=(n=>`\n@import "vertical";\n\n${Object.keys(n).map((e=>`\n/**\n * @mixin v-for-${e}\n * @description Mixin for applying styles for screens with height greater than or equal to ${n[e]}px.\n * @example\n * @include v-for-${e} {\n * // your styles here\n * }\n */\n@mixin v-for-${e}() {\n @include v-mob-first(${e}) {\n @content;\n }\n}`)).join("\n")}\n\n${Object.keys(n).map((e=>`\n/**\n * @mixin v-before-${e}\n * @description Mixin for applying styles for screens with height less than ${n[e]}px.\n * @example\n * @include v-before-${e} {\n * // your styles here\n * }\n */\n@mixin v-before-${e}() {\n @include v-desk-first(${e}) {\n @content;\n }\n}`)).join("\n")}\n`)(o);n.writeFileSync(e.resolve(t,"../scss/_horizontal-breakpoints.scss"),l),n.writeFileSync(e.resolve(t,"../scss/_vertical-breakpoints.scss"),p),console.log("SCSS files have been generated successfully.");
1
+ import n from"fs";import e from"path";import{fileURLToPath as i}from"url";import{HORIZONTAL_BREAKPOINTS as s,VERTICAL_BREAKPOINTS as r}from"../breakpoints.config.js";const o=i(import.meta.url),t=e.dirname(o),l=(c=s,`\n@use "horizontal" as *;\n\n${Object.keys(c).map((n=>`\n/**\n * @mixin for-${n}\n * @description Mixin for applying styles for screens greater than or equal to ${c[n]}px.\n * @example\n * @include for-${n} {\n * // your styles here\n * }\n */\n@mixin for-${n}() {\n @include mob-first(${n}) {\n @content;\n }\n}`)).join("\n")}\n\n${Object.keys(c).map((n=>`\n/**\n * @mixin before-${n}\n * @description Mixin for applying styles for screens less than ${c[n]}px.\n * @example\n * @include before-${n} {\n * // your styles here\n * }\n */\n@mixin before-${n}() {\n @include desk-first(${n}) {\n @content;\n }\n}`)).join("\n")}\n`);var c;const a=(n=>`\n@use "vertical" as *;\n\n${Object.keys(n).map((e=>`\n/**\n * @mixin v-for-${e}\n * @description Mixin for applying styles for screens with height greater than or equal to ${n[e]}px.\n * @example\n * @include v-for-${e} {\n * // your styles here\n * }\n */\n@mixin v-for-${e}() {\n @include v-mob-first(${e}) {\n @content;\n }\n}`)).join("\n")}\n\n${Object.keys(n).map((e=>`\n/**\n * @mixin v-before-${e}\n * @description Mixin for applying styles for screens with height less than ${n[e]}px.\n * @example\n * @include v-before-${e} {\n * // your styles here\n * }\n */\n@mixin v-before-${e}() {\n @include v-desk-first(${e}) {\n @content;\n }\n}`)).join("\n")}\n`)(r);n.writeFileSync(e.resolve(t,"../scss/_horizontal-breakpoints.scss"),l),n.writeFileSync(e.resolve(t,"../scss/_vertical-breakpoints.scss"),a),console.log("SCSS files have been generated successfully.");
@@ -1,5 +1,5 @@
1
1
 
2
- @import "horizontal";
2
+ @use "horizontal" as *;
3
3
 
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- @import "_custom-breakpoints";
1
+ @use "_custom-breakpoints" as *;
2
2
 
3
3
  @mixin mob-first($breakpoint){
4
4
  @media (min-width: map-get($horizontal-breakpoints, $breakpoint)) {
@@ -1,5 +1,5 @@
1
1
 
2
- @import "vertical";
2
+ @use "vertical" as *;
3
3
 
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- @import "_custom-breakpoints";
1
+ @use "_custom-breakpoints" as *;
2
2
 
3
3
  @mixin v-mob-first($breakpoint){
4
4
  @media (min-height: map-get($vertical-breakpoints, $breakpoint)) {
package/index.scss CHANGED
@@ -1,4 +1,4 @@
1
- @import "./dist/scss/vertical";
2
- @import "./dist/scss/horizontal";
3
- @import "./dist/scss/horizontal-breakpoints";
4
- @import "./dist/scss/vertical-breakpoints";
1
+ @use "./dist/scss/vertical" as *;
2
+ @use "./dist/scss/horizontal" as *;
3
+ @use "./dist/scss/horizontal-breakpoints" as *;
4
+ @use "./dist/scss/vertical-breakpoints" as *;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-responsive-tools",
3
- "version": "2.3.21",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",