@innovaccer/design-system 2.15.3 → 2.15.4
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/CHANGELOG.md +39 -0
- package/css/dist/index.css +1 -1
- package/css/dist/index.css.map +1 -1
- package/css/src/components/divider.css +1 -1
- package/dist/.lib/tsconfig.type.tsbuildinfo +4 -3
- package/dist/core/utils/validators.d.ts +1 -0
- package/dist/index.esm.js +21 -6
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1117,7 +1117,7 @@
|
|
|
1117
1117
|
"affectsGlobalScope": false
|
|
1118
1118
|
},
|
|
1119
1119
|
"../../core/components/molecules/pagination/Pagination.tsx": {
|
|
1120
|
-
"version": "
|
|
1120
|
+
"version": "2ea01e7e2649319e6e73e95f317af889acd6b65069f1acff937cbc5c2340fb8f",
|
|
1121
1121
|
"signature": "12eff4722fe853ec6816232cc744e8fda010e2a3c0b92d54d8b853a46b415383",
|
|
1122
1122
|
"affectsGlobalScope": false
|
|
1123
1123
|
},
|
|
@@ -1542,8 +1542,8 @@
|
|
|
1542
1542
|
"affectsGlobalScope": false
|
|
1543
1543
|
},
|
|
1544
1544
|
"../../core/utils/validators.ts": {
|
|
1545
|
-
"version": "
|
|
1546
|
-
"signature": "
|
|
1545
|
+
"version": "c1b4375466f10fb04cee0e6d126383457ca7c69941dbc127aff3406f5ff2ca8d",
|
|
1546
|
+
"signature": "eb47ed8bd033c681072a1c0dbe74e8bfe10a21970f1f2bdc61d2e3d88341d13a",
|
|
1547
1547
|
"affectsGlobalScope": false
|
|
1548
1548
|
},
|
|
1549
1549
|
"../../core/utils/masks.ts": {
|
|
@@ -5710,6 +5710,7 @@
|
|
|
5710
5710
|
"../../core/components/molecules/pagination/Pagination.tsx": [
|
|
5711
5711
|
"../../core/index.tsx",
|
|
5712
5712
|
"../../core/utils/types.tsx",
|
|
5713
|
+
"../../core/utils/validators.ts",
|
|
5713
5714
|
"../../node_modules/@types/node/util.d.ts",
|
|
5714
5715
|
"../../node_modules/@types/react/index.d.ts",
|
|
5715
5716
|
"../../node_modules/classnames/index.d.ts"
|
|
@@ -2,3 +2,4 @@ import { Validators } from "./types";
|
|
|
2
2
|
export declare const isValid: (validators: Validators, ...value: any[]) => boolean;
|
|
3
3
|
export declare const date: (val: string, format: string) => boolean;
|
|
4
4
|
export declare const time: (val: string, format: string) => boolean;
|
|
5
|
+
export declare const isNaturalNumber: (val: number | string) => boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1682330991244
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.15.
|
|
5
|
+
* Version: v2.15.4
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -660,12 +660,20 @@ var time$1 = function time(val, format) {
|
|
|
660
660
|
var hoursCond = isFormat12hour(format) ? hours <= 12 : hours < 24;
|
|
661
661
|
return hoursCond && minutes <= 60;
|
|
662
662
|
};
|
|
663
|
+
var isNaturalNumber = function isNaturalNumber(val) {
|
|
664
|
+
if (typeof val === 'string' && /[^0-9]/.test(val) || typeof val === 'number' && (val <= 0 || val - Math.floor(val) !== 0)) {
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
return true;
|
|
669
|
+
};
|
|
663
670
|
|
|
664
671
|
var validators = /*#__PURE__*/Object.freeze({
|
|
665
672
|
__proto__: null,
|
|
666
673
|
isValid: isValid,
|
|
667
674
|
date: date$1,
|
|
668
|
-
time: time$1
|
|
675
|
+
time: time$1,
|
|
676
|
+
isNaturalNumber: isNaturalNumber
|
|
669
677
|
});
|
|
670
678
|
|
|
671
679
|
var _time;
|
|
@@ -15571,6 +15579,12 @@ var Pagination = function Pagination(props) {
|
|
|
15571
15579
|
}
|
|
15572
15580
|
};
|
|
15573
15581
|
|
|
15582
|
+
var onKeyPressHandler = function onKeyPressHandler(e) {
|
|
15583
|
+
if (!isNaturalNumber(e.key)) {
|
|
15584
|
+
e.preventDefault();
|
|
15585
|
+
}
|
|
15586
|
+
};
|
|
15587
|
+
|
|
15574
15588
|
var onClickHandler = function onClickHandler(buttonType) {
|
|
15575
15589
|
setInit(true);
|
|
15576
15590
|
|
|
@@ -15621,8 +15635,9 @@ var Pagination = function Pagination(props) {
|
|
|
15621
15635
|
name: "page",
|
|
15622
15636
|
className: "Pagination-MetricInput",
|
|
15623
15637
|
onChange: inputChangeHandler,
|
|
15624
|
-
value: "".concat(page
|
|
15625
|
-
"data-test": "DesignSystem-Pagination--Input"
|
|
15638
|
+
value: "".concat(isNaturalNumber(page) ? page : ''),
|
|
15639
|
+
"data-test": "DesignSystem-Pagination--Input",
|
|
15640
|
+
onKeyPress: onKeyPressHandler
|
|
15626
15641
|
}), /*#__PURE__*/React.createElement(Text, null, " of ".concat(totalPages, " pages"))), /*#__PURE__*/React.createElement("div", {
|
|
15627
15642
|
className: nextButtonWrapperClass
|
|
15628
15643
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -21562,6 +21577,6 @@ var HelpText = function HelpText(props) {
|
|
|
21562
21577
|
};
|
|
21563
21578
|
HelpText.displayName = 'HelpText';
|
|
21564
21579
|
|
|
21565
|
-
var version = "2.15.
|
|
21580
|
+
var version = "2.15.4";
|
|
21566
21581
|
|
|
21567
21582
|
export { Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Divider, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HelpText, HorizontalNav, Icon, InlineMessage, Input, X as InputMask, Label, Legend, Link, List, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderImage, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, Textarea, TimePicker, Toast, Tooltip, index as Utils, VerificationCodeInput, VerticalNav, version };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1682330991522
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.15.
|
|
5
|
+
* Version: v2.15.4
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -271,12 +271,20 @@
|
|
|
271
271
|
var hoursCond = isFormat12hour(format) ? hours <= 12 : hours < 24;
|
|
272
272
|
return hoursCond && minutes <= 60;
|
|
273
273
|
};
|
|
274
|
+
var isNaturalNumber = function isNaturalNumber(val) {
|
|
275
|
+
if (typeof val === 'string' && /[^0-9]/.test(val) || typeof val === 'number' && (val <= 0 || val - Math.floor(val) !== 0)) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return true;
|
|
280
|
+
};
|
|
274
281
|
|
|
275
282
|
var validators = /*#__PURE__*/Object.freeze({
|
|
276
283
|
__proto__: null,
|
|
277
284
|
isValid: isValid,
|
|
278
285
|
date: date$1,
|
|
279
|
-
time: time$1
|
|
286
|
+
time: time$1,
|
|
287
|
+
isNaturalNumber: isNaturalNumber
|
|
280
288
|
});
|
|
281
289
|
|
|
282
290
|
var _a$1;
|
|
@@ -10167,6 +10175,12 @@
|
|
|
10167
10175
|
}
|
|
10168
10176
|
};
|
|
10169
10177
|
|
|
10178
|
+
var onKeyPressHandler = function onKeyPressHandler(e) {
|
|
10179
|
+
if (!isNaturalNumber(e.key)) {
|
|
10180
|
+
e.preventDefault();
|
|
10181
|
+
}
|
|
10182
|
+
};
|
|
10183
|
+
|
|
10170
10184
|
var onClickHandler = function onClickHandler(buttonType) {
|
|
10171
10185
|
setInit(true);
|
|
10172
10186
|
|
|
@@ -10217,8 +10231,9 @@
|
|
|
10217
10231
|
name: "page",
|
|
10218
10232
|
className: "Pagination-MetricInput",
|
|
10219
10233
|
onChange: inputChangeHandler,
|
|
10220
|
-
value: "" + (page
|
|
10221
|
-
"data-test": "DesignSystem-Pagination--Input"
|
|
10234
|
+
value: "" + (isNaturalNumber(page) ? page : ''),
|
|
10235
|
+
"data-test": "DesignSystem-Pagination--Input",
|
|
10236
|
+
onKeyPress: onKeyPressHandler
|
|
10222
10237
|
}), /*#__PURE__*/React__namespace.createElement(Text, null, " of " + totalPages + " pages")), /*#__PURE__*/React__namespace.createElement("div", {
|
|
10223
10238
|
className: nextButtonWrapperClass
|
|
10224
10239
|
}, /*#__PURE__*/React__namespace.createElement(Button, {
|
|
@@ -15892,7 +15907,7 @@
|
|
|
15892
15907
|
};
|
|
15893
15908
|
HelpText.displayName = 'HelpText';
|
|
15894
15909
|
|
|
15895
|
-
var version = "2.15.
|
|
15910
|
+
var version = "2.15.4";
|
|
15896
15911
|
|
|
15897
15912
|
exports.Avatar = Avatar;
|
|
15898
15913
|
exports.AvatarGroup = AvatarGroup;
|