@moda/om 21.6.0 → 21.6.1
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/dist/index.esm.js
CHANGED
|
@@ -43,7 +43,7 @@ var hasRequiredFocusVisible;
|
|
|
43
43
|
function requireFocusVisible() {
|
|
44
44
|
if (hasRequiredFocusVisible) return focusVisible$1.exports;
|
|
45
45
|
hasRequiredFocusVisible = 1;
|
|
46
|
-
(function (module, exports) {
|
|
46
|
+
(function (module, exports$1) {
|
|
47
47
|
(function (global, factory) {
|
|
48
48
|
factory() ;
|
|
49
49
|
})(focusVisible, function () {
|
|
@@ -919,7 +919,7 @@ var hasRequiredHelpers;
|
|
|
919
919
|
function requireHelpers() {
|
|
920
920
|
if (hasRequiredHelpers) return helpers;
|
|
921
921
|
hasRequiredHelpers = 1;
|
|
922
|
-
(function (exports) {
|
|
922
|
+
(function (exports$1) {
|
|
923
923
|
|
|
924
924
|
var __assign = helpers && helpers.__assign || function () {
|
|
925
925
|
__assign = Object.assign || function (t) {
|
|
@@ -936,10 +936,10 @@ function requireHelpers() {
|
|
|
936
936
|
"default": mod
|
|
937
937
|
};
|
|
938
938
|
};
|
|
939
|
-
Object.defineProperty(exports, "__esModule", {
|
|
939
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
940
940
|
value: true
|
|
941
941
|
});
|
|
942
|
-
exports.spacing = exports.colorInHex = exports.color = exports.remToUnitlessPx = exports.text = void 0;
|
|
942
|
+
exports$1.spacing = exports$1.colorInHex = exports$1.color = exports$1.remToUnitlessPx = exports$1.text = void 0;
|
|
943
943
|
var color_string_1 = __importDefault(require$$0);
|
|
944
944
|
var colors_1 = requireColors();
|
|
945
945
|
var space_1 = requireSpace();
|
|
@@ -954,11 +954,11 @@ function requireHelpers() {
|
|
|
954
954
|
'line-height': "".concat(treatment['line-height'])
|
|
955
955
|
});
|
|
956
956
|
};
|
|
957
|
-
exports.text = text;
|
|
957
|
+
exports$1.text = text;
|
|
958
958
|
var remToUnitlessPx = function remToUnitlessPx(value) {
|
|
959
959
|
return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
|
|
960
960
|
};
|
|
961
|
-
exports.remToUnitlessPx = remToUnitlessPx;
|
|
961
|
+
exports$1.remToUnitlessPx = remToUnitlessPx;
|
|
962
962
|
var color = function color(name, alpha) {
|
|
963
963
|
var _a;
|
|
964
964
|
var color = colors_1.colors.all[name];
|
|
@@ -968,16 +968,16 @@ function requireHelpers() {
|
|
|
968
968
|
blue = _b[2];
|
|
969
969
|
return alpha != null ? color_string_1["default"].to.rgb(red, green, blue, alpha) : color;
|
|
970
970
|
};
|
|
971
|
-
exports.color = color;
|
|
971
|
+
exports$1.color = color;
|
|
972
972
|
var colorInHex = function colorInHex(name, alpha) {
|
|
973
973
|
var _a, _b, _c;
|
|
974
|
-
var _d = (_b = color_string_1["default"].get.rgb((_a = (0, exports.color)(name, alpha)) !== null && _a !== void 0 ? _a : '')) !== null && _b !== void 0 ? _b : [],
|
|
974
|
+
var _d = (_b = color_string_1["default"].get.rgb((_a = (0, exports$1.color)(name, alpha)) !== null && _a !== void 0 ? _a : '')) !== null && _b !== void 0 ? _b : [],
|
|
975
975
|
red = _d[0],
|
|
976
976
|
green = _d[1],
|
|
977
977
|
blue = _d[2];
|
|
978
978
|
return (_c = color_string_1["default"].to.hex(red, green, blue, alpha)) !== null && _c !== void 0 ? _c : '';
|
|
979
979
|
};
|
|
980
|
-
exports.colorInHex = colorInHex;
|
|
980
|
+
exports$1.colorInHex = colorInHex;
|
|
981
981
|
var spacing = function spacing(topY, rightX, bottom, left) {
|
|
982
982
|
return [topY, rightX, bottom, left].reduce(function (acc, value) {
|
|
983
983
|
var _a;
|
|
@@ -985,7 +985,7 @@ function requireHelpers() {
|
|
|
985
985
|
return [acc, (_a = space_1.space.scale[Number(value)]) !== null && _a !== void 0 ? _a : value].join(' ');
|
|
986
986
|
}, '');
|
|
987
987
|
};
|
|
988
|
-
exports.spacing = spacing;
|
|
988
|
+
exports$1.spacing = spacing;
|
|
989
989
|
})(helpers);
|
|
990
990
|
return helpers;
|
|
991
991
|
}
|
|
@@ -994,7 +994,7 @@ var hasRequiredDist$4;
|
|
|
994
994
|
function requireDist$4() {
|
|
995
995
|
if (hasRequiredDist$4) return dist$4;
|
|
996
996
|
hasRequiredDist$4 = 1;
|
|
997
|
-
(function (exports) {
|
|
997
|
+
(function (exports$1) {
|
|
998
998
|
|
|
999
999
|
var __createBinding = dist$4 && dist$4.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1000
1000
|
if (k2 === undefined) k2 = k;
|
|
@@ -1012,42 +1012,42 @@ function requireDist$4() {
|
|
|
1012
1012
|
if (k2 === undefined) k2 = k;
|
|
1013
1013
|
o[k2] = m[k];
|
|
1014
1014
|
});
|
|
1015
|
-
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports) {
|
|
1016
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1015
|
+
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports$1) {
|
|
1016
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
1017
1017
|
};
|
|
1018
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1018
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
1019
1019
|
value: true
|
|
1020
1020
|
});
|
|
1021
|
-
exports.breakpoints = exports.space = exports.typography = exports.colors = void 0;
|
|
1021
|
+
exports$1.breakpoints = exports$1.space = exports$1.typography = exports$1.colors = void 0;
|
|
1022
1022
|
var colors_1 = requireColors();
|
|
1023
|
-
Object.defineProperty(exports, "colors", {
|
|
1023
|
+
Object.defineProperty(exports$1, "colors", {
|
|
1024
1024
|
enumerable: true,
|
|
1025
1025
|
get: function get() {
|
|
1026
1026
|
return colors_1.colors;
|
|
1027
1027
|
}
|
|
1028
1028
|
});
|
|
1029
1029
|
var typography_1 = requireTypography();
|
|
1030
|
-
Object.defineProperty(exports, "typography", {
|
|
1030
|
+
Object.defineProperty(exports$1, "typography", {
|
|
1031
1031
|
enumerable: true,
|
|
1032
1032
|
get: function get() {
|
|
1033
1033
|
return typography_1.typography;
|
|
1034
1034
|
}
|
|
1035
1035
|
});
|
|
1036
1036
|
var space_1 = requireSpace();
|
|
1037
|
-
Object.defineProperty(exports, "space", {
|
|
1037
|
+
Object.defineProperty(exports$1, "space", {
|
|
1038
1038
|
enumerable: true,
|
|
1039
1039
|
get: function get() {
|
|
1040
1040
|
return space_1.space;
|
|
1041
1041
|
}
|
|
1042
1042
|
});
|
|
1043
1043
|
var breakpoints_1 = requireBreakpoints();
|
|
1044
|
-
Object.defineProperty(exports, "breakpoints", {
|
|
1044
|
+
Object.defineProperty(exports$1, "breakpoints", {
|
|
1045
1045
|
enumerable: true,
|
|
1046
1046
|
get: function get() {
|
|
1047
1047
|
return breakpoints_1.breakpoints;
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
|
-
__exportStar(requireHelpers(), exports);
|
|
1050
|
+
__exportStar(requireHelpers(), exports$1);
|
|
1051
1051
|
})(dist$4);
|
|
1052
1052
|
return dist$4;
|
|
1053
1053
|
}
|
|
@@ -5313,7 +5313,7 @@ var hasRequiredScale;
|
|
|
5313
5313
|
function requireScale() {
|
|
5314
5314
|
if (hasRequiredScale) return scale;
|
|
5315
5315
|
hasRequiredScale = 1;
|
|
5316
|
-
(function (exports) {
|
|
5316
|
+
(function (exports$1) {
|
|
5317
5317
|
|
|
5318
5318
|
var __assign = scale && scale.__assign || function () {
|
|
5319
5319
|
__assign = Object.assign || function (t) {
|
|
@@ -5333,11 +5333,11 @@ function requireScale() {
|
|
|
5333
5333
|
}
|
|
5334
5334
|
return t;
|
|
5335
5335
|
};
|
|
5336
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5336
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
5337
5337
|
value: true
|
|
5338
5338
|
});
|
|
5339
|
-
exports.scale = exports.paddingBottom = exports.factor = void 0;
|
|
5340
|
-
exports.factor = function (_a) {
|
|
5339
|
+
exports$1.scale = exports$1.paddingBottom = exports$1.factor = void 0;
|
|
5340
|
+
exports$1.factor = function (_a) {
|
|
5341
5341
|
var width = _a.width,
|
|
5342
5342
|
height = _a.height,
|
|
5343
5343
|
dimensions = __rest(_a, ["width", "height"]);
|
|
@@ -5345,16 +5345,16 @@ function requireScale() {
|
|
|
5345
5345
|
if ("maxWidth" in dimensions && !("maxHeight" in dimensions)) return dimensions.maxWidth / width;
|
|
5346
5346
|
return Math.min(dimensions.maxWidth / width, dimensions.maxHeight / height);
|
|
5347
5347
|
};
|
|
5348
|
-
exports.paddingBottom = function (_a) {
|
|
5348
|
+
exports$1.paddingBottom = function (_a) {
|
|
5349
5349
|
var width = _a.width,
|
|
5350
5350
|
height = _a.height;
|
|
5351
5351
|
return height / width * 100.0 + "%";
|
|
5352
5352
|
};
|
|
5353
|
-
exports.scale = function (_a) {
|
|
5353
|
+
exports$1.scale = function (_a) {
|
|
5354
5354
|
var width = _a.width,
|
|
5355
5355
|
height = _a.height,
|
|
5356
5356
|
dimensions = __rest(_a, ["width", "height"]);
|
|
5357
|
-
var scale = exports.factor(__assign({
|
|
5357
|
+
var scale = exports$1.factor(__assign({
|
|
5358
5358
|
width: width,
|
|
5359
5359
|
height: height
|
|
5360
5360
|
}, dimensions));
|
|
@@ -5363,7 +5363,7 @@ function requireScale() {
|
|
|
5363
5363
|
return {
|
|
5364
5364
|
width: scaledWidth,
|
|
5365
5365
|
height: scaledHeight,
|
|
5366
|
-
paddingBottom: exports.paddingBottom({
|
|
5366
|
+
paddingBottom: exports$1.paddingBottom({
|
|
5367
5367
|
width: width,
|
|
5368
5368
|
height: height
|
|
5369
5369
|
}),
|
|
@@ -5378,7 +5378,7 @@ var hasRequiredDist$3;
|
|
|
5378
5378
|
function requireDist$3() {
|
|
5379
5379
|
if (hasRequiredDist$3) return dist$3;
|
|
5380
5380
|
hasRequiredDist$3 = 1;
|
|
5381
|
-
(function (exports) {
|
|
5381
|
+
(function (exports$1) {
|
|
5382
5382
|
|
|
5383
5383
|
var __createBinding = dist$3 && dist$3.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
5384
5384
|
if (k2 === undefined) k2 = k;
|
|
@@ -5392,13 +5392,13 @@ function requireDist$3() {
|
|
|
5392
5392
|
if (k2 === undefined) k2 = k;
|
|
5393
5393
|
o[k2] = m[k];
|
|
5394
5394
|
});
|
|
5395
|
-
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports) {
|
|
5396
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
5395
|
+
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports$1) {
|
|
5396
|
+
for (var p in m) if (p !== "default" && !exports$1.hasOwnProperty(p)) __createBinding(exports$1, m, p);
|
|
5397
5397
|
};
|
|
5398
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5398
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
5399
5399
|
value: true
|
|
5400
5400
|
});
|
|
5401
|
-
__exportStar(requireScale(), exports);
|
|
5401
|
+
__exportStar(requireScale(), exports$1);
|
|
5402
5402
|
})(dist$3);
|
|
5403
5403
|
return dist$3;
|
|
5404
5404
|
}
|
|
@@ -5948,7 +5948,7 @@ function _has(prop, obj) {
|
|
|
5948
5948
|
}
|
|
5949
5949
|
|
|
5950
5950
|
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
5951
|
-
function _objectIs(a, b) {
|
|
5951
|
+
function _objectIs$1(a, b) {
|
|
5952
5952
|
// SameValue algorithm
|
|
5953
5953
|
if (a === b) {
|
|
5954
5954
|
// Steps 1-5, 7-10
|
|
@@ -5959,7 +5959,7 @@ function _objectIs(a, b) {
|
|
|
5959
5959
|
return a !== a && b !== b;
|
|
5960
5960
|
}
|
|
5961
5961
|
}
|
|
5962
|
-
var _objectIs
|
|
5962
|
+
var _objectIs = typeof Object.is === 'function' ? Object.is : _objectIs$1;
|
|
5963
5963
|
|
|
5964
5964
|
var toString$1 = Object.prototype.toString;
|
|
5965
5965
|
var _isArguments = /*#__PURE__*/function () {
|
|
@@ -6093,7 +6093,7 @@ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
|
|
|
6093
6093
|
}, b, a);
|
|
6094
6094
|
}
|
|
6095
6095
|
function _equals(a, b, stackA, stackB) {
|
|
6096
|
-
if (_objectIs
|
|
6096
|
+
if (_objectIs(a, b)) {
|
|
6097
6097
|
return true;
|
|
6098
6098
|
}
|
|
6099
6099
|
var typeA = type(a);
|
|
@@ -6117,12 +6117,12 @@ function _equals(a, b, stackA, stackB) {
|
|
|
6117
6117
|
case 'Boolean':
|
|
6118
6118
|
case 'Number':
|
|
6119
6119
|
case 'String':
|
|
6120
|
-
if (!(_typeof$1(a) === _typeof$1(b) && _objectIs
|
|
6120
|
+
if (!(_typeof$1(a) === _typeof$1(b) && _objectIs(a.valueOf(), b.valueOf()))) {
|
|
6121
6121
|
return false;
|
|
6122
6122
|
}
|
|
6123
6123
|
break;
|
|
6124
6124
|
case 'Date':
|
|
6125
|
-
if (!_objectIs
|
|
6125
|
+
if (!_objectIs(a.valueOf(), b.valueOf())) {
|
|
6126
6126
|
return false;
|
|
6127
6127
|
}
|
|
6128
6128
|
break;
|
|
@@ -10015,12 +10015,12 @@ var hasRequiredDist$1;
|
|
|
10015
10015
|
function requireDist$1() {
|
|
10016
10016
|
if (hasRequiredDist$1) return dist$1;
|
|
10017
10017
|
hasRequiredDist$1 = 1;
|
|
10018
|
-
(function (exports) {
|
|
10018
|
+
(function (exports$1) {
|
|
10019
10019
|
|
|
10020
10020
|
function __export(m) {
|
|
10021
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
10021
|
+
for (var p in m) if (!exports$1.hasOwnProperty(p)) exports$1[p] = m[p];
|
|
10022
10022
|
}
|
|
10023
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10023
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
10024
10024
|
value: true
|
|
10025
10025
|
});
|
|
10026
10026
|
__export(requireMapCursorToMax());
|
|
@@ -11337,12 +11337,12 @@ var hasRequiredDist;
|
|
|
11337
11337
|
function requireDist() {
|
|
11338
11338
|
if (hasRequiredDist) return dist;
|
|
11339
11339
|
hasRequiredDist = 1;
|
|
11340
|
-
(function (exports) {
|
|
11340
|
+
(function (exports$1) {
|
|
11341
11341
|
|
|
11342
11342
|
function __export(m) {
|
|
11343
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
11343
|
+
for (var p in m) if (!exports$1.hasOwnProperty(p)) exports$1[p] = m[p];
|
|
11344
11344
|
}
|
|
11345
|
-
Object.defineProperty(exports, "__esModule", {
|
|
11345
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
11346
11346
|
value: true
|
|
11347
11347
|
});
|
|
11348
11348
|
__export(requireUseCursor());
|