@uxf/styles
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "@uxf/styles", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"typecheck": "tsc --noEmit --skipLibCheck", | ||
"test": "npm run lint:css && npm run typecheck" | ||
"test": "npm run lint:ts && npm run lint:css && npm run typecheck" | ||
}, | ||
@@ -17,0 +17,0 @@ "publishConfig": { |
@@ -1,5 +0,10 @@ | ||
import { Breakpoints, TransitionProperties } from "../types"; | ||
import { Property } from "csstype"; | ||
import { TransitionProperties } from "../types"; | ||
export interface Transitions { | ||
$transition?: TransitionProperties; | ||
$transition?: { | ||
property: TransitionProperties; | ||
duration?: number; | ||
easing?: Property.TransitionTimingFunction; | ||
}; | ||
} | ||
export declare const transitions: <B extends Record<string, number>>({ breakpoints, $transition, }: Transitions & Breakpoints<B>) => import("styled-components").FlattenSimpleInterpolation; | ||
export declare const transitions: ({ $transition }: Transitions) => import("styled-components").FlattenSimpleInterpolation; |
@@ -9,13 +9,9 @@ "use strict"; | ||
var styled_components_1 = require("styled-components"); | ||
var formatTransitions_1 = require("../utils/formatTransitions"); | ||
var responsive_1 = require("../utils/responsive"); | ||
var transition_1 = require("../utils/transition"); | ||
var transitions = function (_a) { | ||
var breakpoints = _a.breakpoints, $transition = _a.$transition; | ||
return styled_components_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", | ||
"\n"])), responsive_1.facepaintMin(breakpoints)({ | ||
transition: formatTransitions_1.formatTransitions($transition), | ||
})); | ||
var $transition = _a.$transition; | ||
return styled_components_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transition: ", ";\n"], ["\n transition: ", ";\n"])), $transition ? transition_1.transition($transition.property, $transition.duration, $transition.easing) : null); | ||
}; | ||
exports.transitions = transitions; | ||
var templateObject_1; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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BQUEsV0FBVyxlQUV0QiJ9 |
@@ -207,3 +207,2 @@ # @uxf/styles | ||
### `formatResponsiveGridColumns` | ||
### `formatTransitions` | ||
### `formatValue` | ||
@@ -210,0 +209,0 @@ ### `formatResponsiveValue` |
import { Property } from "csstype"; | ||
import { TransitionProperty } from "../types"; | ||
export declare const transition: (property: TransitionProperty, duration?: number, easing?: Property.TransitionTimingFunction) => string; | ||
import { TransitionProperties } from "../types"; | ||
export declare const transition: (property: TransitionProperties, duration?: number, easing?: Property.TransitionTimingFunction) => string; |
@@ -9,5 +9,8 @@ "use strict"; | ||
if (easing === void 0) { easing = "ease-in-out"; } | ||
if (Array.isArray(property)) { | ||
return property.map(function (p) { return exports.transition(p, duration, easing); }).join(", "); | ||
} | ||
return camelCaseToDash_1.camelCaseToDash(property) + " " + withUnit_1.withUnit(duration, "ms") + " " + easing; | ||
}; | ||
exports.transition = transition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNpdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy90cmFuc2l0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1FQUFrRTtBQUdsRSx1Q0FBc0M7QUFFL0IsSUFBTSxVQUFVLEdBQUcsVUFDdEIsUUFBNEIsRUFDNUIsUUFBYyxFQUNkLE1BQXlEO0lBRHpELHlCQUFBLEVBQUEsY0FBYztJQUNkLHVCQUFBLEVBQUEsc0JBQXlEO0lBQ3hELE9BQUcsaUNBQWUsQ0FBQyxRQUFRLENBQUMsU0FBSSxtQkFBUSxDQUFDLFFBQVEsRUFBRSxJQUFJLENBQUMsU0FBSSxNQUFRO0FBQXBFLENBQW9FLENBQUM7QUFKN0QsUUFBQSxVQUFVLGNBSW1EIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNpdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy90cmFuc2l0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1FQUFrRTtBQUdsRSx1Q0FBc0M7QUFFL0IsSUFBTSxVQUFVLEdBQUcsVUFDdEIsUUFBOEIsRUFDOUIsUUFBYyxFQUNkLE1BQXlEO0lBRHpELHlCQUFBLEVBQUEsY0FBYztJQUNkLHVCQUFBLEVBQUEsc0JBQXlEO0lBRXpELElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsRUFBRTtRQUN6QixPQUFPLFFBQVEsQ0FBQyxHQUFHLENBQUMsVUFBQyxDQUFDLElBQUssT0FBQSxrQkFBVSxDQUFDLENBQUMsRUFBRSxRQUFRLEVBQUUsTUFBTSxDQUFDLEVBQS9CLENBQStCLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDMUU7SUFDRCxPQUFVLGlDQUFlLENBQUMsUUFBUSxDQUFDLFNBQUksbUJBQVEsQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLFNBQUksTUFBUSxDQUFDO0FBQ2hGLENBQUMsQ0FBQztBQVRXLFFBQUEsVUFBVSxjQVNyQiJ9 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172654
126
1703
228