@moda/om 21.11.0 → 21.13.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/dist/index.cjs.js +44 -42
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +44 -42
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/Paginator/Paginator.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/package.json +5 -5
- package/src/components/OtpInput/OtpInput.scss +2 -2
- package/src/components/Paginator/Paginator.tsx +5 -3
package/dist/index.cjs.js
CHANGED
|
@@ -63,7 +63,7 @@ var hasRequiredFocusVisible;
|
|
|
63
63
|
function requireFocusVisible() {
|
|
64
64
|
if (hasRequiredFocusVisible) return focusVisible$1.exports;
|
|
65
65
|
hasRequiredFocusVisible = 1;
|
|
66
|
-
(function (module, exports
|
|
66
|
+
(function (module, exports) {
|
|
67
67
|
(function (global, factory) {
|
|
68
68
|
factory() ;
|
|
69
69
|
})(focusVisible, function () {
|
|
@@ -943,7 +943,7 @@ var hasRequiredHelpers;
|
|
|
943
943
|
function requireHelpers() {
|
|
944
944
|
if (hasRequiredHelpers) return helpers;
|
|
945
945
|
hasRequiredHelpers = 1;
|
|
946
|
-
(function (exports
|
|
946
|
+
(function (exports) {
|
|
947
947
|
|
|
948
948
|
var __assign = helpers && helpers.__assign || function () {
|
|
949
949
|
__assign = Object.assign || function (t) {
|
|
@@ -960,10 +960,10 @@ function requireHelpers() {
|
|
|
960
960
|
"default": mod
|
|
961
961
|
};
|
|
962
962
|
};
|
|
963
|
-
Object.defineProperty(exports
|
|
963
|
+
Object.defineProperty(exports, "__esModule", {
|
|
964
964
|
value: true
|
|
965
965
|
});
|
|
966
|
-
exports
|
|
966
|
+
exports.spacing = exports.colorInHex = exports.color = exports.remToUnitlessPx = exports.text = void 0;
|
|
967
967
|
var color_string_1 = __importDefault(require$$0);
|
|
968
968
|
var colors_1 = requireColors();
|
|
969
969
|
var space_1 = requireSpace();
|
|
@@ -978,11 +978,11 @@ function requireHelpers() {
|
|
|
978
978
|
'line-height': "".concat(treatment['line-height'])
|
|
979
979
|
});
|
|
980
980
|
};
|
|
981
|
-
exports
|
|
981
|
+
exports.text = text;
|
|
982
982
|
var remToUnitlessPx = function remToUnitlessPx(value) {
|
|
983
983
|
return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
|
|
984
984
|
};
|
|
985
|
-
exports
|
|
985
|
+
exports.remToUnitlessPx = remToUnitlessPx;
|
|
986
986
|
var color = function color(name, alpha) {
|
|
987
987
|
var _a;
|
|
988
988
|
var color = colors_1.colors.all[name];
|
|
@@ -992,16 +992,16 @@ function requireHelpers() {
|
|
|
992
992
|
blue = _b[2];
|
|
993
993
|
return alpha != null ? color_string_1["default"].to.rgb(red, green, blue, alpha) : color;
|
|
994
994
|
};
|
|
995
|
-
exports
|
|
995
|
+
exports.color = color;
|
|
996
996
|
var colorInHex = function colorInHex(name, alpha) {
|
|
997
997
|
var _a, _b, _c;
|
|
998
|
-
var _d = (_b = color_string_1["default"].get.rgb((_a = (0, exports
|
|
998
|
+
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 : [],
|
|
999
999
|
red = _d[0],
|
|
1000
1000
|
green = _d[1],
|
|
1001
1001
|
blue = _d[2];
|
|
1002
1002
|
return (_c = color_string_1["default"].to.hex(red, green, blue, alpha)) !== null && _c !== void 0 ? _c : '';
|
|
1003
1003
|
};
|
|
1004
|
-
exports
|
|
1004
|
+
exports.colorInHex = colorInHex;
|
|
1005
1005
|
var spacing = function spacing(topY, rightX, bottom, left) {
|
|
1006
1006
|
return [topY, rightX, bottom, left].reduce(function (acc, value) {
|
|
1007
1007
|
var _a;
|
|
@@ -1009,7 +1009,7 @@ function requireHelpers() {
|
|
|
1009
1009
|
return [acc, (_a = space_1.space.scale[Number(value)]) !== null && _a !== void 0 ? _a : value].join(' ');
|
|
1010
1010
|
}, '');
|
|
1011
1011
|
};
|
|
1012
|
-
exports
|
|
1012
|
+
exports.spacing = spacing;
|
|
1013
1013
|
})(helpers);
|
|
1014
1014
|
return helpers;
|
|
1015
1015
|
}
|
|
@@ -1018,7 +1018,7 @@ var hasRequiredDist$4;
|
|
|
1018
1018
|
function requireDist$4() {
|
|
1019
1019
|
if (hasRequiredDist$4) return dist$4;
|
|
1020
1020
|
hasRequiredDist$4 = 1;
|
|
1021
|
-
(function (exports
|
|
1021
|
+
(function (exports) {
|
|
1022
1022
|
|
|
1023
1023
|
var __createBinding = dist$4 && dist$4.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1024
1024
|
if (k2 === undefined) k2 = k;
|
|
@@ -1036,42 +1036,42 @@ function requireDist$4() {
|
|
|
1036
1036
|
if (k2 === undefined) k2 = k;
|
|
1037
1037
|
o[k2] = m[k];
|
|
1038
1038
|
});
|
|
1039
|
-
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports
|
|
1040
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports
|
|
1039
|
+
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports) {
|
|
1040
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1041
1041
|
};
|
|
1042
|
-
Object.defineProperty(exports
|
|
1042
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1043
1043
|
value: true
|
|
1044
1044
|
});
|
|
1045
|
-
exports
|
|
1045
|
+
exports.breakpoints = exports.space = exports.typography = exports.colors = void 0;
|
|
1046
1046
|
var colors_1 = requireColors();
|
|
1047
|
-
Object.defineProperty(exports
|
|
1047
|
+
Object.defineProperty(exports, "colors", {
|
|
1048
1048
|
enumerable: true,
|
|
1049
1049
|
get: function get() {
|
|
1050
1050
|
return colors_1.colors;
|
|
1051
1051
|
}
|
|
1052
1052
|
});
|
|
1053
1053
|
var typography_1 = requireTypography();
|
|
1054
|
-
Object.defineProperty(exports
|
|
1054
|
+
Object.defineProperty(exports, "typography", {
|
|
1055
1055
|
enumerable: true,
|
|
1056
1056
|
get: function get() {
|
|
1057
1057
|
return typography_1.typography;
|
|
1058
1058
|
}
|
|
1059
1059
|
});
|
|
1060
1060
|
var space_1 = requireSpace();
|
|
1061
|
-
Object.defineProperty(exports
|
|
1061
|
+
Object.defineProperty(exports, "space", {
|
|
1062
1062
|
enumerable: true,
|
|
1063
1063
|
get: function get() {
|
|
1064
1064
|
return space_1.space;
|
|
1065
1065
|
}
|
|
1066
1066
|
});
|
|
1067
1067
|
var breakpoints_1 = requireBreakpoints();
|
|
1068
|
-
Object.defineProperty(exports
|
|
1068
|
+
Object.defineProperty(exports, "breakpoints", {
|
|
1069
1069
|
enumerable: true,
|
|
1070
1070
|
get: function get() {
|
|
1071
1071
|
return breakpoints_1.breakpoints;
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
|
-
__exportStar(requireHelpers(), exports
|
|
1074
|
+
__exportStar(requireHelpers(), exports);
|
|
1075
1075
|
})(dist$4);
|
|
1076
1076
|
return dist$4;
|
|
1077
1077
|
}
|
|
@@ -5339,7 +5339,7 @@ var hasRequiredScale;
|
|
|
5339
5339
|
function requireScale() {
|
|
5340
5340
|
if (hasRequiredScale) return scale;
|
|
5341
5341
|
hasRequiredScale = 1;
|
|
5342
|
-
(function (exports
|
|
5342
|
+
(function (exports) {
|
|
5343
5343
|
|
|
5344
5344
|
var __assign = scale && scale.__assign || function () {
|
|
5345
5345
|
__assign = Object.assign || function (t) {
|
|
@@ -5359,11 +5359,11 @@ function requireScale() {
|
|
|
5359
5359
|
}
|
|
5360
5360
|
return t;
|
|
5361
5361
|
};
|
|
5362
|
-
Object.defineProperty(exports
|
|
5362
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5363
5363
|
value: true
|
|
5364
5364
|
});
|
|
5365
|
-
exports
|
|
5366
|
-
exports
|
|
5365
|
+
exports.scale = exports.paddingBottom = exports.factor = void 0;
|
|
5366
|
+
exports.factor = function (_a) {
|
|
5367
5367
|
var width = _a.width,
|
|
5368
5368
|
height = _a.height,
|
|
5369
5369
|
dimensions = __rest(_a, ["width", "height"]);
|
|
@@ -5371,16 +5371,16 @@ function requireScale() {
|
|
|
5371
5371
|
if ("maxWidth" in dimensions && !("maxHeight" in dimensions)) return dimensions.maxWidth / width;
|
|
5372
5372
|
return Math.min(dimensions.maxWidth / width, dimensions.maxHeight / height);
|
|
5373
5373
|
};
|
|
5374
|
-
exports
|
|
5374
|
+
exports.paddingBottom = function (_a) {
|
|
5375
5375
|
var width = _a.width,
|
|
5376
5376
|
height = _a.height;
|
|
5377
5377
|
return height / width * 100.0 + "%";
|
|
5378
5378
|
};
|
|
5379
|
-
exports
|
|
5379
|
+
exports.scale = function (_a) {
|
|
5380
5380
|
var width = _a.width,
|
|
5381
5381
|
height = _a.height,
|
|
5382
5382
|
dimensions = __rest(_a, ["width", "height"]);
|
|
5383
|
-
var scale = exports
|
|
5383
|
+
var scale = exports.factor(__assign({
|
|
5384
5384
|
width: width,
|
|
5385
5385
|
height: height
|
|
5386
5386
|
}, dimensions));
|
|
@@ -5389,7 +5389,7 @@ function requireScale() {
|
|
|
5389
5389
|
return {
|
|
5390
5390
|
width: scaledWidth,
|
|
5391
5391
|
height: scaledHeight,
|
|
5392
|
-
paddingBottom: exports
|
|
5392
|
+
paddingBottom: exports.paddingBottom({
|
|
5393
5393
|
width: width,
|
|
5394
5394
|
height: height
|
|
5395
5395
|
}),
|
|
@@ -5404,7 +5404,7 @@ var hasRequiredDist$3;
|
|
|
5404
5404
|
function requireDist$3() {
|
|
5405
5405
|
if (hasRequiredDist$3) return dist$3;
|
|
5406
5406
|
hasRequiredDist$3 = 1;
|
|
5407
|
-
(function (exports
|
|
5407
|
+
(function (exports) {
|
|
5408
5408
|
|
|
5409
5409
|
var __createBinding = dist$3 && dist$3.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
5410
5410
|
if (k2 === undefined) k2 = k;
|
|
@@ -5418,13 +5418,13 @@ function requireDist$3() {
|
|
|
5418
5418
|
if (k2 === undefined) k2 = k;
|
|
5419
5419
|
o[k2] = m[k];
|
|
5420
5420
|
});
|
|
5421
|
-
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports
|
|
5422
|
-
for (var p in m) if (p !== "default" && !exports
|
|
5421
|
+
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports) {
|
|
5422
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
5423
5423
|
};
|
|
5424
|
-
Object.defineProperty(exports
|
|
5424
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5425
5425
|
value: true
|
|
5426
5426
|
});
|
|
5427
|
-
__exportStar(requireScale(), exports
|
|
5427
|
+
__exportStar(requireScale(), exports);
|
|
5428
5428
|
})(dist$3);
|
|
5429
5429
|
return dist$3;
|
|
5430
5430
|
}
|
|
@@ -10048,12 +10048,12 @@ var hasRequiredDist$1;
|
|
|
10048
10048
|
function requireDist$1() {
|
|
10049
10049
|
if (hasRequiredDist$1) return dist$1;
|
|
10050
10050
|
hasRequiredDist$1 = 1;
|
|
10051
|
-
(function (exports
|
|
10051
|
+
(function (exports) {
|
|
10052
10052
|
|
|
10053
10053
|
function __export(m) {
|
|
10054
|
-
for (var p in m) if (!exports
|
|
10054
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
10055
10055
|
}
|
|
10056
|
-
Object.defineProperty(exports
|
|
10056
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10057
10057
|
value: true
|
|
10058
10058
|
});
|
|
10059
10059
|
__export(requireMapCursorToMax());
|
|
@@ -11454,12 +11454,12 @@ var hasRequiredDist;
|
|
|
11454
11454
|
function requireDist() {
|
|
11455
11455
|
if (hasRequiredDist) return dist;
|
|
11456
11456
|
hasRequiredDist = 1;
|
|
11457
|
-
(function (exports
|
|
11457
|
+
(function (exports) {
|
|
11458
11458
|
|
|
11459
11459
|
function __export(m) {
|
|
11460
|
-
for (var p in m) if (!exports
|
|
11460
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
11461
11461
|
}
|
|
11462
|
-
Object.defineProperty(exports
|
|
11462
|
+
Object.defineProperty(exports, "__esModule", {
|
|
11463
11463
|
value: true
|
|
11464
11464
|
});
|
|
11465
11465
|
__export(requireUseCursor());
|
|
@@ -12293,6 +12293,8 @@ var Paginator = function Paginator(_ref) {
|
|
|
12293
12293
|
totalPages = _ref.totalPages,
|
|
12294
12294
|
_ref$maximumPagesToSh = _ref.maximumPagesToShow,
|
|
12295
12295
|
maximumPagesToShow = _ref$maximumPagesToSh === void 0 ? defaultMaximumNumberOfPagesToShow : _ref$maximumPagesToSh,
|
|
12296
|
+
_ref$scrollToTopOnPag = _ref.scrollToTopOnPageChange,
|
|
12297
|
+
scrollToTopOnPageChange = _ref$scrollToTopOnPag === void 0 ? true : _ref$scrollToTopOnPag,
|
|
12296
12298
|
onGoToPage = _ref.onGoToPage,
|
|
12297
12299
|
className = _ref.className;
|
|
12298
12300
|
var pages = determinePagesToShow(selectedPage, totalPages, maximumPagesToShow);
|
|
@@ -12309,7 +12311,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12309
12311
|
disabled: !canDoPrev(selectedPage),
|
|
12310
12312
|
onClick: function onClick() {
|
|
12311
12313
|
prevPage(selectedPage);
|
|
12312
|
-
window.scrollTo(0, 0);
|
|
12314
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12313
12315
|
},
|
|
12314
12316
|
className: classNames('Paginator__button', 'Paginator__button--previous')
|
|
12315
12317
|
}, /*#__PURE__*/React.createElement(ChevronLeft16, {
|
|
@@ -12320,7 +12322,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12320
12322
|
}, /*#__PURE__*/React.createElement("button", {
|
|
12321
12323
|
onClick: function onClick() {
|
|
12322
12324
|
onGoToPage(page);
|
|
12323
|
-
window.scrollTo(0, 0);
|
|
12325
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12324
12326
|
},
|
|
12325
12327
|
className: classNames('Paginator__button', {
|
|
12326
12328
|
'Paginator__button--currentPage': page === selectedPage
|
|
@@ -12332,7 +12334,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12332
12334
|
disabled: !canDoNext(selectedPage, totalPages),
|
|
12333
12335
|
onClick: function onClick() {
|
|
12334
12336
|
nextPage(selectedPage);
|
|
12335
|
-
window.scrollTo(0, 0);
|
|
12337
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12336
12338
|
},
|
|
12337
12339
|
className: classNames('Paginator__button', 'Paginator__button--next')
|
|
12338
12340
|
}, "Next ", /*#__PURE__*/React.createElement(ChevronRight16, {
|