@uxf/styles 11.51.0 → 11.52.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/styles",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.52.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "git+https://gitlab.com/uxf-npm/styles.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@uxf/core": "11.
|
|
18
|
+
"@uxf/core": "11.52.0",
|
|
19
19
|
"color2k": "2.0.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
package/properties/transition.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transition = void 0;
|
|
4
|
-
const
|
|
4
|
+
const camel_case_to_dash_1 = require("@uxf/core/utils/camel-case-to-dash");
|
|
5
5
|
const with_unit_1 = require("../units/with-unit");
|
|
6
6
|
const transition = (property, duration = 400, easing = "ease-in-out") => {
|
|
7
7
|
if (Array.isArray(property)) {
|
|
8
8
|
return property.map((p) => (0, exports.transition)(p, duration, easing)).join(", ");
|
|
9
9
|
}
|
|
10
|
-
return `${(0,
|
|
10
|
+
return `${(0, camel_case_to_dash_1.camelCaseToDash)(property)} ${(0, with_unit_1.withUnit)(duration, "ms")} ${easing}`;
|
|
11
11
|
};
|
|
12
12
|
exports.transition = transition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchBetween = matchBetween;
|
|
4
|
-
const
|
|
4
|
+
const is_browser_1 = require("@uxf/core/utils/is-browser");
|
|
5
5
|
const mq_between_1 = require("./mq-between");
|
|
6
6
|
function matchBetween(from, to) {
|
|
7
|
-
return
|
|
7
|
+
return is_browser_1.isBrowser ? window.matchMedia((0, mq_between_1.mqBetween)(from, to)).matches : false;
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchHidpi = matchHidpi;
|
|
4
|
-
const
|
|
4
|
+
const is_browser_1 = require("@uxf/core/utils/is-browser");
|
|
5
5
|
const mq_hidpi_1 = require("./mq-hidpi");
|
|
6
6
|
function matchHidpi(ratio) {
|
|
7
|
-
return
|
|
7
|
+
return is_browser_1.isBrowser ? window.matchMedia((0, mq_hidpi_1.mqHiDpi)(ratio)).matches : false;
|
|
8
8
|
}
|
package/responsive/match-max.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchMax = matchMax;
|
|
4
|
-
const
|
|
4
|
+
const is_browser_1 = require("@uxf/core/utils/is-browser");
|
|
5
5
|
const mq_max_1 = require("./mq-max");
|
|
6
6
|
function matchMax(to) {
|
|
7
|
-
return
|
|
7
|
+
return is_browser_1.isBrowser ? window.matchMedia((0, mq_max_1.mqMax)(to)).matches : false;
|
|
8
8
|
}
|
package/responsive/match-min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchMin = matchMin;
|
|
4
|
-
const
|
|
4
|
+
const is_browser_1 = require("@uxf/core/utils/is-browser");
|
|
5
5
|
const mq_min_1 = require("./mq-min");
|
|
6
6
|
function matchMin(from) {
|
|
7
|
-
return
|
|
7
|
+
return is_browser_1.isBrowser ? window.matchMedia((0, mq_min_1.mqMin)(from)).matches : false;
|
|
8
8
|
}
|
package/units/percent.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.percent = void 0;
|
|
4
|
-
const
|
|
4
|
+
const trim_trailing_zeros_1 = require("@uxf/core/utils/trim-trailing-zeros");
|
|
5
5
|
const percent = (inputValue, maxValue = 100, precision = 2) => {
|
|
6
6
|
if (inputValue === 0) {
|
|
7
7
|
return inputValue;
|
|
8
8
|
}
|
|
9
|
-
return parseFloat((0,
|
|
9
|
+
return parseFloat((0, trim_trailing_zeros_1.trimTrailingZeros)(((inputValue / maxValue) * 100).toFixed(precision)));
|
|
10
10
|
};
|
|
11
11
|
exports.percent = percent;
|