@uxf/styles 11.29.0 → 11.32.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.
@@ -1,2 +1,2 @@
1
- import { CSSProperties } from "react";
1
+ import type { CSSProperties } from "react";
2
2
  export declare const srOnly: Partial<CSSProperties>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/styles",
3
- "version": "11.29.0",
3
+ "version": "11.32.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,11 +15,11 @@
15
15
  "url": "git+https://gitlab.com/uxf-npm/styles.git"
16
16
  },
17
17
  "dependencies": {
18
- "@uxf/core": "11.29.0",
18
+ "@uxf/core": "11.32.0",
19
19
  "color2k": "2.0.3"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/react": "18.2.63",
22
+ "@types/react": "18.3.5",
23
23
  "csstype": "3.1.3"
24
24
  },
25
25
  "author": "",
@@ -1,3 +1,3 @@
1
- import { Property } from "csstype";
2
- import { TransitionProperties } from "../types";
1
+ import type { Property } from "csstype";
2
+ import type { TransitionProperties } from "../types";
3
3
  export declare const transition: (property: TransitionProperties, duration?: number, easing?: Property.TransitionTimingFunction) => string;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchBetween = void 0;
3
+ exports.matchBetween = matchBetween;
4
4
  const isBrowser_1 = require("@uxf/core/utils/isBrowser");
5
5
  const mq_between_1 = require("./mq-between");
6
6
  function matchBetween(from, to) {
7
7
  return isBrowser_1.isBrowser ? window.matchMedia((0, mq_between_1.mqBetween)(from, to)).matches : false;
8
8
  }
9
- exports.matchBetween = matchBetween;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchHidpi = void 0;
3
+ exports.matchHidpi = matchHidpi;
4
4
  const isBrowser_1 = require("@uxf/core/utils/isBrowser");
5
5
  const mq_hidpi_1 = require("./mq-hidpi");
6
6
  function matchHidpi(ratio) {
7
7
  return isBrowser_1.isBrowser ? window.matchMedia((0, mq_hidpi_1.mqHiDpi)(ratio)).matches : false;
8
8
  }
9
- exports.matchHidpi = matchHidpi;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchMax = void 0;
3
+ exports.matchMax = matchMax;
4
4
  const isBrowser_1 = require("@uxf/core/utils/isBrowser");
5
5
  const mq_max_1 = require("./mq-max");
6
6
  function matchMax(to) {
7
7
  return isBrowser_1.isBrowser ? window.matchMedia((0, mq_max_1.mqMax)(to)).matches : false;
8
8
  }
9
- exports.matchMax = matchMax;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchMin = void 0;
3
+ exports.matchMin = matchMin;
4
4
  const isBrowser_1 = require("@uxf/core/utils/isBrowser");
5
5
  const mq_min_1 = require("./mq-min");
6
6
  function matchMin(from) {
7
7
  return isBrowser_1.isBrowser ? window.matchMedia((0, mq_min_1.mqMin)(from)).matches : false;
8
8
  }
9
- exports.matchMin = matchMin;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mqBetween = void 0;
3
+ exports.mqBetween = mqBetween;
4
4
  const em_1 = require("../units/em");
5
5
  function mqBetween(from, to) {
6
6
  return `(min-width: ${(0, em_1.em)(from)}) and (max-width: ${(0, em_1.em)(to - 1)})`;
7
7
  }
8
- exports.mqBetween = mqBetween;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mqHiDpi = void 0;
3
+ exports.mqHiDpi = mqHiDpi;
4
4
  function mqHiDpi(ratio = 2) {
5
5
  if (ratio < 1) {
6
6
  ratio = 1;
@@ -17,4 +17,3 @@ function mqHiDpi(ratio = 2) {
17
17
  ratio +
18
18
  "dppx)\n ");
19
19
  }
20
- exports.mqHiDpi = mqHiDpi;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mqMax = void 0;
3
+ exports.mqMax = mqMax;
4
4
  const em_1 = require("../units/em");
5
5
  function mqMax(to) {
6
6
  return `(max-width: ${(0, em_1.em)(to - 1)})`;
7
7
  }
8
- exports.mqMax = mqMax;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mqMin = void 0;
3
+ exports.mqMin = mqMin;
4
4
  const em_1 = require("../units/em");
5
5
  function mqMin(from) {
6
6
  return `(min-width: ${(0, em_1.em)(from)})`;
7
7
  }
8
- exports.mqMin = mqMin;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from "react";
1
+ import type { CSSProperties } from "react";
2
2
  export type CssTimeUnits = "ms" | "s";
3
3
  export type CssAbsoluteLengthsUnits = "cm" | "mm" | "in" | "px" | "pt" | "pc" | "deg" | "rad";
4
4
  export type CssRelativeLengthsUnits = "em" | "ex" | "ch" | "rem" | "vw" | "vh" | "vmin" | "vmax" | "%";
package/units/em-to-px.js CHANGED
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emToPx = void 0;
3
+ exports.emToPx = emToPx;
4
4
  function emToPx(value, size = 16) {
5
5
  if (/\d*\.?\d+em/.test(value)) {
6
6
  return parseFloat(value) * size;
7
7
  }
8
8
  return value;
9
9
  }
10
- exports.emToPx = emToPx;
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.remToPx = void 0;
3
+ exports.remToPx = remToPx;
4
4
  function remToPx(value, size = 16) {
5
5
  if (/\d*\.?\d+rem/.test(value)) {
6
6
  return parseFloat(value) * size;
7
7
  }
8
8
  return value;
9
9
  }
10
- exports.remToPx = remToPx;
@@ -1,2 +1,2 @@
1
- import { CssUnits } from "../types";
1
+ import type { CssUnits } from "../types";
2
2
  export declare const withUnit: (input: number | string, unit: CssUnits) => string;