@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.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) {
|
|
47
47
|
(function (global, factory) {
|
|
48
48
|
factory() ;
|
|
49
49
|
})(focusVisible, function () {
|
|
@@ -923,7 +923,7 @@ var hasRequiredHelpers;
|
|
|
923
923
|
function requireHelpers() {
|
|
924
924
|
if (hasRequiredHelpers) return helpers;
|
|
925
925
|
hasRequiredHelpers = 1;
|
|
926
|
-
(function (exports
|
|
926
|
+
(function (exports) {
|
|
927
927
|
|
|
928
928
|
var __assign = helpers && helpers.__assign || function () {
|
|
929
929
|
__assign = Object.assign || function (t) {
|
|
@@ -940,10 +940,10 @@ function requireHelpers() {
|
|
|
940
940
|
"default": mod
|
|
941
941
|
};
|
|
942
942
|
};
|
|
943
|
-
Object.defineProperty(exports
|
|
943
|
+
Object.defineProperty(exports, "__esModule", {
|
|
944
944
|
value: true
|
|
945
945
|
});
|
|
946
|
-
exports
|
|
946
|
+
exports.spacing = exports.colorInHex = exports.color = exports.remToUnitlessPx = exports.text = void 0;
|
|
947
947
|
var color_string_1 = __importDefault(require$$0);
|
|
948
948
|
var colors_1 = requireColors();
|
|
949
949
|
var space_1 = requireSpace();
|
|
@@ -958,11 +958,11 @@ function requireHelpers() {
|
|
|
958
958
|
'line-height': "".concat(treatment['line-height'])
|
|
959
959
|
});
|
|
960
960
|
};
|
|
961
|
-
exports
|
|
961
|
+
exports.text = text;
|
|
962
962
|
var remToUnitlessPx = function remToUnitlessPx(value) {
|
|
963
963
|
return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
|
|
964
964
|
};
|
|
965
|
-
exports
|
|
965
|
+
exports.remToUnitlessPx = remToUnitlessPx;
|
|
966
966
|
var color = function color(name, alpha) {
|
|
967
967
|
var _a;
|
|
968
968
|
var color = colors_1.colors.all[name];
|
|
@@ -972,16 +972,16 @@ function requireHelpers() {
|
|
|
972
972
|
blue = _b[2];
|
|
973
973
|
return alpha != null ? color_string_1["default"].to.rgb(red, green, blue, alpha) : color;
|
|
974
974
|
};
|
|
975
|
-
exports
|
|
975
|
+
exports.color = color;
|
|
976
976
|
var colorInHex = function colorInHex(name, alpha) {
|
|
977
977
|
var _a, _b, _c;
|
|
978
|
-
var _d = (_b = color_string_1["default"].get.rgb((_a = (0, exports
|
|
978
|
+
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 : [],
|
|
979
979
|
red = _d[0],
|
|
980
980
|
green = _d[1],
|
|
981
981
|
blue = _d[2];
|
|
982
982
|
return (_c = color_string_1["default"].to.hex(red, green, blue, alpha)) !== null && _c !== void 0 ? _c : '';
|
|
983
983
|
};
|
|
984
|
-
exports
|
|
984
|
+
exports.colorInHex = colorInHex;
|
|
985
985
|
var spacing = function spacing(topY, rightX, bottom, left) {
|
|
986
986
|
return [topY, rightX, bottom, left].reduce(function (acc, value) {
|
|
987
987
|
var _a;
|
|
@@ -989,7 +989,7 @@ function requireHelpers() {
|
|
|
989
989
|
return [acc, (_a = space_1.space.scale[Number(value)]) !== null && _a !== void 0 ? _a : value].join(' ');
|
|
990
990
|
}, '');
|
|
991
991
|
};
|
|
992
|
-
exports
|
|
992
|
+
exports.spacing = spacing;
|
|
993
993
|
})(helpers);
|
|
994
994
|
return helpers;
|
|
995
995
|
}
|
|
@@ -998,7 +998,7 @@ var hasRequiredDist$4;
|
|
|
998
998
|
function requireDist$4() {
|
|
999
999
|
if (hasRequiredDist$4) return dist$4;
|
|
1000
1000
|
hasRequiredDist$4 = 1;
|
|
1001
|
-
(function (exports
|
|
1001
|
+
(function (exports) {
|
|
1002
1002
|
|
|
1003
1003
|
var __createBinding = dist$4 && dist$4.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1004
1004
|
if (k2 === undefined) k2 = k;
|
|
@@ -1016,42 +1016,42 @@ function requireDist$4() {
|
|
|
1016
1016
|
if (k2 === undefined) k2 = k;
|
|
1017
1017
|
o[k2] = m[k];
|
|
1018
1018
|
});
|
|
1019
|
-
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports
|
|
1020
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports
|
|
1019
|
+
var __exportStar = dist$4 && dist$4.__exportStar || function (m, exports) {
|
|
1020
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1021
1021
|
};
|
|
1022
|
-
Object.defineProperty(exports
|
|
1022
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1023
1023
|
value: true
|
|
1024
1024
|
});
|
|
1025
|
-
exports
|
|
1025
|
+
exports.breakpoints = exports.space = exports.typography = exports.colors = void 0;
|
|
1026
1026
|
var colors_1 = requireColors();
|
|
1027
|
-
Object.defineProperty(exports
|
|
1027
|
+
Object.defineProperty(exports, "colors", {
|
|
1028
1028
|
enumerable: true,
|
|
1029
1029
|
get: function get() {
|
|
1030
1030
|
return colors_1.colors;
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
1033
1033
|
var typography_1 = requireTypography();
|
|
1034
|
-
Object.defineProperty(exports
|
|
1034
|
+
Object.defineProperty(exports, "typography", {
|
|
1035
1035
|
enumerable: true,
|
|
1036
1036
|
get: function get() {
|
|
1037
1037
|
return typography_1.typography;
|
|
1038
1038
|
}
|
|
1039
1039
|
});
|
|
1040
1040
|
var space_1 = requireSpace();
|
|
1041
|
-
Object.defineProperty(exports
|
|
1041
|
+
Object.defineProperty(exports, "space", {
|
|
1042
1042
|
enumerable: true,
|
|
1043
1043
|
get: function get() {
|
|
1044
1044
|
return space_1.space;
|
|
1045
1045
|
}
|
|
1046
1046
|
});
|
|
1047
1047
|
var breakpoints_1 = requireBreakpoints();
|
|
1048
|
-
Object.defineProperty(exports
|
|
1048
|
+
Object.defineProperty(exports, "breakpoints", {
|
|
1049
1049
|
enumerable: true,
|
|
1050
1050
|
get: function get() {
|
|
1051
1051
|
return breakpoints_1.breakpoints;
|
|
1052
1052
|
}
|
|
1053
1053
|
});
|
|
1054
|
-
__exportStar(requireHelpers(), exports
|
|
1054
|
+
__exportStar(requireHelpers(), exports);
|
|
1055
1055
|
})(dist$4);
|
|
1056
1056
|
return dist$4;
|
|
1057
1057
|
}
|
|
@@ -5319,7 +5319,7 @@ var hasRequiredScale;
|
|
|
5319
5319
|
function requireScale() {
|
|
5320
5320
|
if (hasRequiredScale) return scale;
|
|
5321
5321
|
hasRequiredScale = 1;
|
|
5322
|
-
(function (exports
|
|
5322
|
+
(function (exports) {
|
|
5323
5323
|
|
|
5324
5324
|
var __assign = scale && scale.__assign || function () {
|
|
5325
5325
|
__assign = Object.assign || function (t) {
|
|
@@ -5339,11 +5339,11 @@ function requireScale() {
|
|
|
5339
5339
|
}
|
|
5340
5340
|
return t;
|
|
5341
5341
|
};
|
|
5342
|
-
Object.defineProperty(exports
|
|
5342
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5343
5343
|
value: true
|
|
5344
5344
|
});
|
|
5345
|
-
exports
|
|
5346
|
-
exports
|
|
5345
|
+
exports.scale = exports.paddingBottom = exports.factor = void 0;
|
|
5346
|
+
exports.factor = function (_a) {
|
|
5347
5347
|
var width = _a.width,
|
|
5348
5348
|
height = _a.height,
|
|
5349
5349
|
dimensions = __rest(_a, ["width", "height"]);
|
|
@@ -5351,16 +5351,16 @@ function requireScale() {
|
|
|
5351
5351
|
if ("maxWidth" in dimensions && !("maxHeight" in dimensions)) return dimensions.maxWidth / width;
|
|
5352
5352
|
return Math.min(dimensions.maxWidth / width, dimensions.maxHeight / height);
|
|
5353
5353
|
};
|
|
5354
|
-
exports
|
|
5354
|
+
exports.paddingBottom = function (_a) {
|
|
5355
5355
|
var width = _a.width,
|
|
5356
5356
|
height = _a.height;
|
|
5357
5357
|
return height / width * 100.0 + "%";
|
|
5358
5358
|
};
|
|
5359
|
-
exports
|
|
5359
|
+
exports.scale = function (_a) {
|
|
5360
5360
|
var width = _a.width,
|
|
5361
5361
|
height = _a.height,
|
|
5362
5362
|
dimensions = __rest(_a, ["width", "height"]);
|
|
5363
|
-
var scale = exports
|
|
5363
|
+
var scale = exports.factor(__assign({
|
|
5364
5364
|
width: width,
|
|
5365
5365
|
height: height
|
|
5366
5366
|
}, dimensions));
|
|
@@ -5369,7 +5369,7 @@ function requireScale() {
|
|
|
5369
5369
|
return {
|
|
5370
5370
|
width: scaledWidth,
|
|
5371
5371
|
height: scaledHeight,
|
|
5372
|
-
paddingBottom: exports
|
|
5372
|
+
paddingBottom: exports.paddingBottom({
|
|
5373
5373
|
width: width,
|
|
5374
5374
|
height: height
|
|
5375
5375
|
}),
|
|
@@ -5384,7 +5384,7 @@ var hasRequiredDist$3;
|
|
|
5384
5384
|
function requireDist$3() {
|
|
5385
5385
|
if (hasRequiredDist$3) return dist$3;
|
|
5386
5386
|
hasRequiredDist$3 = 1;
|
|
5387
|
-
(function (exports
|
|
5387
|
+
(function (exports) {
|
|
5388
5388
|
|
|
5389
5389
|
var __createBinding = dist$3 && dist$3.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
5390
5390
|
if (k2 === undefined) k2 = k;
|
|
@@ -5398,13 +5398,13 @@ function requireDist$3() {
|
|
|
5398
5398
|
if (k2 === undefined) k2 = k;
|
|
5399
5399
|
o[k2] = m[k];
|
|
5400
5400
|
});
|
|
5401
|
-
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports
|
|
5402
|
-
for (var p in m) if (p !== "default" && !exports
|
|
5401
|
+
var __exportStar = dist$3 && dist$3.__exportStar || function (m, exports) {
|
|
5402
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
5403
5403
|
};
|
|
5404
|
-
Object.defineProperty(exports
|
|
5404
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5405
5405
|
value: true
|
|
5406
5406
|
});
|
|
5407
|
-
__exportStar(requireScale(), exports
|
|
5407
|
+
__exportStar(requireScale(), exports);
|
|
5408
5408
|
})(dist$3);
|
|
5409
5409
|
return dist$3;
|
|
5410
5410
|
}
|
|
@@ -10028,12 +10028,12 @@ var hasRequiredDist$1;
|
|
|
10028
10028
|
function requireDist$1() {
|
|
10029
10029
|
if (hasRequiredDist$1) return dist$1;
|
|
10030
10030
|
hasRequiredDist$1 = 1;
|
|
10031
|
-
(function (exports
|
|
10031
|
+
(function (exports) {
|
|
10032
10032
|
|
|
10033
10033
|
function __export(m) {
|
|
10034
|
-
for (var p in m) if (!exports
|
|
10034
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
10035
10035
|
}
|
|
10036
|
-
Object.defineProperty(exports
|
|
10036
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10037
10037
|
value: true
|
|
10038
10038
|
});
|
|
10039
10039
|
__export(requireMapCursorToMax());
|
|
@@ -11434,12 +11434,12 @@ var hasRequiredDist;
|
|
|
11434
11434
|
function requireDist() {
|
|
11435
11435
|
if (hasRequiredDist) return dist;
|
|
11436
11436
|
hasRequiredDist = 1;
|
|
11437
|
-
(function (exports
|
|
11437
|
+
(function (exports) {
|
|
11438
11438
|
|
|
11439
11439
|
function __export(m) {
|
|
11440
|
-
for (var p in m) if (!exports
|
|
11440
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
11441
11441
|
}
|
|
11442
|
-
Object.defineProperty(exports
|
|
11442
|
+
Object.defineProperty(exports, "__esModule", {
|
|
11443
11443
|
value: true
|
|
11444
11444
|
});
|
|
11445
11445
|
__export(requireUseCursor());
|
|
@@ -12273,6 +12273,8 @@ var Paginator = function Paginator(_ref) {
|
|
|
12273
12273
|
totalPages = _ref.totalPages,
|
|
12274
12274
|
_ref$maximumPagesToSh = _ref.maximumPagesToShow,
|
|
12275
12275
|
maximumPagesToShow = _ref$maximumPagesToSh === void 0 ? defaultMaximumNumberOfPagesToShow : _ref$maximumPagesToSh,
|
|
12276
|
+
_ref$scrollToTopOnPag = _ref.scrollToTopOnPageChange,
|
|
12277
|
+
scrollToTopOnPageChange = _ref$scrollToTopOnPag === void 0 ? true : _ref$scrollToTopOnPag,
|
|
12276
12278
|
onGoToPage = _ref.onGoToPage,
|
|
12277
12279
|
className = _ref.className;
|
|
12278
12280
|
var pages = determinePagesToShow(selectedPage, totalPages, maximumPagesToShow);
|
|
@@ -12289,7 +12291,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12289
12291
|
disabled: !canDoPrev(selectedPage),
|
|
12290
12292
|
onClick: function onClick() {
|
|
12291
12293
|
prevPage(selectedPage);
|
|
12292
|
-
window.scrollTo(0, 0);
|
|
12294
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12293
12295
|
},
|
|
12294
12296
|
className: classNames('Paginator__button', 'Paginator__button--previous')
|
|
12295
12297
|
}, /*#__PURE__*/React__default.createElement(ChevronLeft16, {
|
|
@@ -12300,7 +12302,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12300
12302
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
12301
12303
|
onClick: function onClick() {
|
|
12302
12304
|
onGoToPage(page);
|
|
12303
|
-
window.scrollTo(0, 0);
|
|
12305
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12304
12306
|
},
|
|
12305
12307
|
className: classNames('Paginator__button', {
|
|
12306
12308
|
'Paginator__button--currentPage': page === selectedPage
|
|
@@ -12312,7 +12314,7 @@ var Paginator = function Paginator(_ref) {
|
|
|
12312
12314
|
disabled: !canDoNext(selectedPage, totalPages),
|
|
12313
12315
|
onClick: function onClick() {
|
|
12314
12316
|
nextPage(selectedPage);
|
|
12315
|
-
window.scrollTo(0, 0);
|
|
12317
|
+
if (scrollToTopOnPageChange) window.scrollTo(0, 0);
|
|
12316
12318
|
},
|
|
12317
12319
|
className: classNames('Paginator__button', 'Paginator__button--next')
|
|
12318
12320
|
}, "Next ", /*#__PURE__*/React__default.createElement(ChevronRight16, {
|