@hitachivantara/uikit-react-lab 3.41.6 → 3.41.7
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 +8 -0
- package/dist/DotPagination/DotPagination.d.ts +11 -0
- package/dist/DotPagination/DotPagination.js +167 -0
- package/dist/DotPagination/DotPagination.js.map +1 -0
- package/dist/DotPagination/index.d.ts +2 -0
- package/dist/DotPagination/index.js +16 -0
- package/dist/DotPagination/index.js.map +1 -0
- package/dist/DotPagination/styles.js +26 -0
- package/dist/DotPagination/styles.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/DotPagination/DotPagination.d.ts +11 -0
- package/dist/legacy/DotPagination/DotPagination.js +136 -0
- package/dist/legacy/DotPagination/DotPagination.js.map +1 -0
- package/dist/legacy/DotPagination/index.d.ts +2 -0
- package/dist/legacy/DotPagination/index.js +2 -0
- package/dist/legacy/DotPagination/index.js.map +1 -0
- package/dist/legacy/DotPagination/styles.js +18 -0
- package/dist/legacy/DotPagination/styles.js.map +1 -0
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/DotPagination/DotPagination.d.ts +11 -0
- package/dist/modern/DotPagination/DotPagination.js +124 -0
- package/dist/modern/DotPagination/DotPagination.js.map +1 -0
- package/dist/modern/DotPagination/index.d.ts +2 -0
- package/dist/modern/DotPagination/index.js +2 -0
- package/dist/modern/DotPagination/index.js.map +1 -0
- package/dist/modern/DotPagination/styles.js +16 -0
- package/dist/modern/DotPagination/styles.js.map +1 -0
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.41.7](https://github.com/lumada-design/hv-uikit-react/compare/@hitachivantara/uikit-react-lab@3.41.6...@hitachivantara/uikit-react-lab@3.41.7) (2022-04-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @hitachivantara/uikit-react-lab
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.41.6](https://github.com/lumada-design/hv-uikit-react/compare/@hitachivantara/uikit-react-lab@3.41.5...@hitachivantara/uikit-react-lab@3.41.6) (2022-04-14)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
export type HvDotPaginationClassKey = "root";
|
|
5
|
+
|
|
6
|
+
export type HvDotPaginationProps = StandardProps<
|
|
7
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
8
|
+
HvDotPaginationClassKey
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export default function HvDotPagination(props: HvDotPaginationProps): JSX.Element | null;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getSelectorIcons = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
require("core-js/modules/es.array.from.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.string.iterator.js");
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/es.array.map.js");
|
|
15
|
+
|
|
16
|
+
require("core-js/modules/es.array.concat.js");
|
|
17
|
+
|
|
18
|
+
require("core-js/modules/es.object.to-string.js");
|
|
19
|
+
|
|
20
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
21
|
+
|
|
22
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
23
|
+
|
|
24
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
25
|
+
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
|
+
|
|
28
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
29
|
+
|
|
30
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
31
|
+
|
|
32
|
+
var _core = require("@material-ui/core");
|
|
33
|
+
|
|
34
|
+
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
35
|
+
|
|
36
|
+
var _uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
37
|
+
|
|
38
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
39
|
+
|
|
40
|
+
var _excluded = ["className", "classes", "pages", "page", "onPageChange", "getItemAriaLabel", "id"];
|
|
41
|
+
|
|
42
|
+
var getSelectorIcons = function getSelectorIcons(classes, options) {
|
|
43
|
+
var disabled = options.disabled;
|
|
44
|
+
var color = disabled && ["atmo3", "atmo5"] || undefined;
|
|
45
|
+
var checkedColor = disabled && ["atmo3", "atmo5"] || undefined;
|
|
46
|
+
return {
|
|
47
|
+
radio: /*#__PURE__*/_react.default.createElement(_uikitReactIcons.RadioButtonUnselected, {
|
|
48
|
+
color: color,
|
|
49
|
+
className: classes.icon,
|
|
50
|
+
iconSize: "XS"
|
|
51
|
+
}),
|
|
52
|
+
radioChecked: /*#__PURE__*/_react.default.createElement(_uikitReactIcons.CurrentStep, {
|
|
53
|
+
color: checkedColor,
|
|
54
|
+
className: classes.icon,
|
|
55
|
+
iconSize: "XS"
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* DotPagination description/documentation paragraph
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
exports.getSelectorIcons = getSelectorIcons;
|
|
65
|
+
|
|
66
|
+
var HvDotPagination = function HvDotPagination(props) {
|
|
67
|
+
var className = props.className,
|
|
68
|
+
classes = props.classes,
|
|
69
|
+
_props$pages = props.pages,
|
|
70
|
+
pages = _props$pages === void 0 ? 1 : _props$pages,
|
|
71
|
+
_props$page = props.page,
|
|
72
|
+
page = _props$page === void 0 ? 0 : _props$page,
|
|
73
|
+
onPageChange = props.onPageChange,
|
|
74
|
+
getItemAriaLabel = props.getItemAriaLabel,
|
|
75
|
+
id = props.id,
|
|
76
|
+
others = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
77
|
+
|
|
78
|
+
var range = function range(n) {
|
|
79
|
+
return Array.from(Array(n), function (v, i) {
|
|
80
|
+
return i;
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var icons = getSelectorIcons(classes, {});
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
86
|
+
className: (0, _clsx.default)(className, classes.root)
|
|
87
|
+
}, others), /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvRadioGroup, {
|
|
88
|
+
classes: {
|
|
89
|
+
horizontal: classes.horizontal
|
|
90
|
+
},
|
|
91
|
+
orientation: "horizontal"
|
|
92
|
+
}, range(pages).map(function (pg, i) {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvRadio, {
|
|
94
|
+
classes: {
|
|
95
|
+
root: classes.radioRoot
|
|
96
|
+
},
|
|
97
|
+
key: "dot_navigation".concat(id && id.toString(), "_item").concat(i.toString()),
|
|
98
|
+
value: i,
|
|
99
|
+
checked: page === i,
|
|
100
|
+
onChange: function onChange() {
|
|
101
|
+
return onPageChange(i);
|
|
102
|
+
},
|
|
103
|
+
icon: icons.radio,
|
|
104
|
+
checkedIcon: icons.radioChecked,
|
|
105
|
+
"aria-label": getItemAriaLabel(i)
|
|
106
|
+
});
|
|
107
|
+
})));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
process.env.NODE_ENV !== "production" ? HvDotPagination.propTypes = {
|
|
111
|
+
/**
|
|
112
|
+
* Class names to be applied.
|
|
113
|
+
*/
|
|
114
|
+
className: _propTypes.default.string,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* A Jss Object used to override or extend the styles applied.
|
|
118
|
+
*/
|
|
119
|
+
classes: _propTypes.default.shape({
|
|
120
|
+
/**
|
|
121
|
+
* Styles applied to the component root class.
|
|
122
|
+
*/
|
|
123
|
+
root: _propTypes.default.string,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Styles applied to the radio button group to overrrite horizontal class margins.
|
|
127
|
+
*/
|
|
128
|
+
horizontal: _propTypes.default.string,
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Styles applied to the radio root ( to override radio group horizontal )
|
|
132
|
+
*/
|
|
133
|
+
radioRoot: _propTypes.default.string
|
|
134
|
+
}).isRequired,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The number of pages the component has.
|
|
138
|
+
*/
|
|
139
|
+
pages: _propTypes.default.number,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The currently selected page (0-indexed).
|
|
143
|
+
*/
|
|
144
|
+
page: _propTypes.default.number,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Function called when the page changes.
|
|
148
|
+
*/
|
|
149
|
+
onPageChange: _propTypes.default.func,
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Function called to get the respective aria label.
|
|
153
|
+
*/
|
|
154
|
+
getItemAriaLabel: _propTypes.default.func,
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)
|
|
158
|
+
*/
|
|
159
|
+
id: _propTypes.default.number
|
|
160
|
+
} : void 0;
|
|
161
|
+
|
|
162
|
+
var _default = (0, _core.withStyles)(_styles.default, {
|
|
163
|
+
name: "HvDotPagination"
|
|
164
|
+
})(HvDotPagination);
|
|
165
|
+
|
|
166
|
+
exports.default = _default;
|
|
167
|
+
//# sourceMappingURL=DotPagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/DotPagination/DotPagination.js"],"names":["getSelectorIcons","classes","options","disabled","color","undefined","checkedColor","radio","icon","radioChecked","HvDotPagination","props","className","pages","page","onPageChange","getItemAriaLabel","id","others","range","n","Array","from","v","i","icons","root","horizontal","map","pg","radioRoot","toString","propTypes","PropTypes","string","shape","isRequired","number","func","styles","name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEO,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,OAAD,EAAUC,OAAV,EAAsB;AACpD,MAAQC,QAAR,GAAqBD,OAArB,CAAQC,QAAR;AACA,MAAMC,KAAK,GAAID,QAAQ,IAAI,CAAC,OAAD,EAAU,OAAV,CAAb,IAAoCE,SAAlD;AACA,MAAMC,YAAY,GAAIH,QAAQ,IAAI,CAAC,OAAD,EAAU,OAAV,CAAb,IAAoCE,SAAzD;AAEA,SAAO;AACLE,IAAAA,KAAK,eAAE,6BAAC,sCAAD;AAAuB,MAAA,KAAK,EAAEH,KAA9B;AAAqC,MAAA,SAAS,EAAEH,OAAO,CAACO,IAAxD;AAA8D,MAAA,QAAQ,EAAC;AAAvE,MADF;AAELC,IAAAA,YAAY,eAAE,6BAAC,4BAAD;AAAa,MAAA,KAAK,EAAEH,YAApB;AAAkC,MAAA,SAAS,EAAEL,OAAO,CAACO,IAArD;AAA2D,MAAA,QAAQ,EAAC;AAApE;AAFT,GAAP;AAID,CATM;AAWP;AACA;AACA;;;;;AACA,IAAME,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAW;AACjC,MACEC,SADF,GASID,KATJ,CACEC,SADF;AAAA,MAEEX,OAFF,GASIU,KATJ,CAEE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B;AAAA,OALZ;AAME,MAAA,IAAI,EAAEC,KAAK,CAAClB,KANd;AAOE,MAAA,WAAW,EAAEkB,KAAK,CAAChB,YAPrB;AAQE,oBAAYO,gBAAgB,CAACQ,CAAD;AAR9B,MADgB;AAAA,GAAjB,CADH,CADF,CADF;AAkBD,CAlCD;;AAoCA,wCAAAd,eAAe,CAACsB,SAAhB,GAA4B;AAC1B;AACF;AACA;AACEpB,EAAAA,SAAS,EAAEqB,mBAAUC,MAJK;;AAK1B;AACF;AACA;AACEjC,EAAAA,OAAO,EAAEgC,mBAAUE,KAAV,CAAgB;AACvB;AACJ;AACA;AACIT,IAAAA,IAAI,EAAEO,mBAAUC,MAJO;;AAKvB;AACJ;AACA;AACIP,IAAAA,UAAU,EAAEM,mBAAUC,MARC;;AASvB;AACJ;AACA;AACIJ,IAAAA,SAAS,EAAEG,mBAAUC;AAZE,GAAhB,EAaNE,UArBuB;;AAsB1B;AACF;AACA;AACEvB,EAAAA,KAAK,EAAEoB,mBAAUI,MAzBS;;AA0B1B;AACF;AACA;AACEvB,EAAAA,IAAI,EAAEmB,mBAAUI,MA7BU;;AA8B1B;AACF;AACA;AACEtB,EAAAA,YAAY,EAAEkB,mBAAUK,IAjCE;;AAkC1B;AACF;AACA;AACEtB,EAAAA,gBAAgB,EAAEiB,mBAAUK,IArCF;;AAsC1B;AACF;AACA;AACErB,EAAAA,EAAE,EAAEgB,mBAAUI;AAzCY,CAA5B;;eA4Ce,sBAAWE,eAAX,EAAmB;AAAEC,EAAAA,IAAI,EAAE;AAAR,CAAnB,EAAgD9B,eAAhD,C","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvRadio, HvRadioGroup } from \"@hitachivantara/uikit-react-core\";\nimport { CurrentStep, RadioButtonUnselected } from \"@hitachivantara/uikit-react-icons\";\nimport styles from \"./styles\";\n\nexport const getSelectorIcons = (classes, options) => {\n const { disabled } = options;\n const color = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n const checkedColor = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n\n return {\n radio: <RadioButtonUnselected color={color} className={classes.icon} iconSize=\"XS\" />,\n radioChecked: <CurrentStep color={checkedColor} className={classes.icon} iconSize=\"XS\" />,\n };\n};\n\n/**\n * DotPagination description/documentation paragraph\n */\nconst HvDotPagination = (props) => {\n const {\n className,\n classes,\n pages = 1,\n page = 0,\n onPageChange,\n getItemAriaLabel,\n id,\n ...others\n } = props;\n\n const range = (n) => Array.from(Array(n), (v, i) => i);\n\n const icons = getSelectorIcons(classes, {});\n\n return (\n <div className={clsx(className, classes.root)} {...others}>\n <HvRadioGroup classes={{ horizontal: classes.horizontal }} orientation=\"horizontal\">\n {range(pages).map((pg, i) => (\n <HvRadio\n classes={{ root: classes.radioRoot }}\n key={`dot_navigation${id && id.toString()}_item${i.toString()}`}\n value={i}\n checked={page === i}\n onChange={() => onPageChange(i)}\n icon={icons.radio}\n checkedIcon={icons.radioChecked}\n aria-label={getItemAriaLabel(i)}\n />\n ))}\n </HvRadioGroup>\n </div>\n );\n};\n\nHvDotPagination.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the radio button group to overrrite horizontal class margins.\n */\n horizontal: PropTypes.string,\n /**\n * Styles applied to the radio root ( to override radio group horizontal )\n */\n radioRoot: PropTypes.string,\n }).isRequired,\n /**\n * The number of pages the component has.\n */\n pages: PropTypes.number,\n /**\n * The currently selected page (0-indexed).\n */\n page: PropTypes.number,\n /**\n * Function called when the page changes.\n */\n onPageChange: PropTypes.func,\n /**\n * Function called to get the respective aria label.\n */\n getItemAriaLabel: PropTypes.func,\n /**\n * Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)\n */\n id: PropTypes.number,\n};\n\nexport default withStyles(styles, { name: \"HvDotPagination\" })(HvDotPagination);\n"],"file":"DotPagination.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _DotPagination.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _DotPagination = _interopRequireDefault(require("./DotPagination"));
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/DotPagination/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from \"./DotPagination\";\n"],"file":"index.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var styles = function styles() {
|
|
9
|
+
return {
|
|
10
|
+
root: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
justifyContent: "center"
|
|
13
|
+
},
|
|
14
|
+
horizontal: {
|
|
15
|
+
marginLeft: 0,
|
|
16
|
+
width: "auto"
|
|
17
|
+
},
|
|
18
|
+
radioRoot: {
|
|
19
|
+
marginLeft: "0"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var _default = styles;
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/DotPagination/styles.js"],"names":["styles","root","display","justifyContent","horizontal","marginLeft","width","radioRoot"],"mappings":";;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,cAAc,EAAE;AAFZ,KADc;AAMpBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,UAAU,EAAE,CADF;AAEVC,MAAAA,KAAK,EAAE;AAFG,KANQ;AAWpBC,IAAAA,SAAS,EAAE;AACTF,MAAAA,UAAU,EAAE;AADH;AAXS,GAAP;AAAA,CAAf;;eAgBeL,M","sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n\n horizontal: {\n marginLeft: 0,\n width: \"auto\",\n },\n\n radioRoot: {\n marginLeft: \"0\",\n },\n});\n\nexport default styles;\n"],"file":"styles.js"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -37,7 +37,8 @@ var _exportNames = {
|
|
|
37
37
|
HvColorPicker: true,
|
|
38
38
|
HvQueryBuilder: true,
|
|
39
39
|
HvInlineEditor: true,
|
|
40
|
-
HvProgressBar: true
|
|
40
|
+
HvProgressBar: true,
|
|
41
|
+
HvDotPagination: true
|
|
41
42
|
};
|
|
42
43
|
Object.defineProperty(exports, "HvAppSwitcherPanel", {
|
|
43
44
|
enumerable: true,
|
|
@@ -51,6 +52,12 @@ Object.defineProperty(exports, "HvColorPicker", {
|
|
|
51
52
|
return _ColorPicker.default;
|
|
52
53
|
}
|
|
53
54
|
});
|
|
55
|
+
Object.defineProperty(exports, "HvDotPagination", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function get() {
|
|
58
|
+
return _DotPagination.default;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
54
61
|
Object.defineProperty(exports, "HvDrawer", {
|
|
55
62
|
enumerable: true,
|
|
56
63
|
get: function get() {
|
|
@@ -188,6 +195,8 @@ var _InlineEditor = _interopRequireDefault(require("./InlineEditor"));
|
|
|
188
195
|
|
|
189
196
|
var _ProgressBar = _interopRequireDefault(require("./ProgressBar"));
|
|
190
197
|
|
|
198
|
+
var _DotPagination = _interopRequireDefault(require("./DotPagination"));
|
|
199
|
+
|
|
191
200
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
192
201
|
|
|
193
202
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\n"],"file":"index.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
export type HvDotPaginationClassKey = "root";
|
|
5
|
+
|
|
6
|
+
export type HvDotPaginationProps = StandardProps<
|
|
7
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
8
|
+
HvDotPaginationClassKey
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export default function HvDotPagination(props: HvDotPaginationProps): JSX.Element | null;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "classes", "pages", "page", "onPageChange", "getItemAriaLabel", "id"];
|
|
4
|
+
import "core-js/modules/es.array.from.js";
|
|
5
|
+
import "core-js/modules/es.string.iterator.js";
|
|
6
|
+
import "core-js/modules/es.array.map.js";
|
|
7
|
+
import "core-js/modules/es.array.concat.js";
|
|
8
|
+
import "core-js/modules/es.object.to-string.js";
|
|
9
|
+
import "core-js/modules/es.regexp.to-string.js";
|
|
10
|
+
import React from "react";
|
|
11
|
+
import PropTypes from "prop-types";
|
|
12
|
+
import clsx from "clsx";
|
|
13
|
+
import { withStyles } from "@material-ui/core";
|
|
14
|
+
import { HvRadio, HvRadioGroup } from "@hitachivantara/uikit-react-core";
|
|
15
|
+
import { CurrentStep, RadioButtonUnselected } from "@hitachivantara/uikit-react-icons";
|
|
16
|
+
import styles from "./styles";
|
|
17
|
+
export var getSelectorIcons = function getSelectorIcons(classes, options) {
|
|
18
|
+
var disabled = options.disabled;
|
|
19
|
+
var color = disabled && ["atmo3", "atmo5"] || undefined;
|
|
20
|
+
var checkedColor = disabled && ["atmo3", "atmo5"] || undefined;
|
|
21
|
+
return {
|
|
22
|
+
radio: /*#__PURE__*/React.createElement(RadioButtonUnselected, {
|
|
23
|
+
color: color,
|
|
24
|
+
className: classes.icon,
|
|
25
|
+
iconSize: "XS"
|
|
26
|
+
}),
|
|
27
|
+
radioChecked: /*#__PURE__*/React.createElement(CurrentStep, {
|
|
28
|
+
color: checkedColor,
|
|
29
|
+
className: classes.icon,
|
|
30
|
+
iconSize: "XS"
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* DotPagination description/documentation paragraph
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
var HvDotPagination = function HvDotPagination(props) {
|
|
39
|
+
var className = props.className,
|
|
40
|
+
classes = props.classes,
|
|
41
|
+
_props$pages = props.pages,
|
|
42
|
+
pages = _props$pages === void 0 ? 1 : _props$pages,
|
|
43
|
+
_props$page = props.page,
|
|
44
|
+
page = _props$page === void 0 ? 0 : _props$page,
|
|
45
|
+
onPageChange = props.onPageChange,
|
|
46
|
+
getItemAriaLabel = props.getItemAriaLabel,
|
|
47
|
+
id = props.id,
|
|
48
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
49
|
+
|
|
50
|
+
var range = function range(n) {
|
|
51
|
+
return Array.from(Array(n), function (v, i) {
|
|
52
|
+
return i;
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var icons = getSelectorIcons(classes, {});
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
58
|
+
className: clsx(className, classes.root)
|
|
59
|
+
}, others), /*#__PURE__*/React.createElement(HvRadioGroup, {
|
|
60
|
+
classes: {
|
|
61
|
+
horizontal: classes.horizontal
|
|
62
|
+
},
|
|
63
|
+
orientation: "horizontal"
|
|
64
|
+
}, range(pages).map(function (pg, i) {
|
|
65
|
+
return /*#__PURE__*/React.createElement(HvRadio, {
|
|
66
|
+
classes: {
|
|
67
|
+
root: classes.radioRoot
|
|
68
|
+
},
|
|
69
|
+
key: "dot_navigation".concat(id && id.toString(), "_item").concat(i.toString()),
|
|
70
|
+
value: i,
|
|
71
|
+
checked: page === i,
|
|
72
|
+
onChange: function onChange() {
|
|
73
|
+
return onPageChange(i);
|
|
74
|
+
},
|
|
75
|
+
icon: icons.radio,
|
|
76
|
+
checkedIcon: icons.radioChecked,
|
|
77
|
+
"aria-label": getItemAriaLabel(i)
|
|
78
|
+
});
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
process.env.NODE_ENV !== "production" ? HvDotPagination.propTypes = {
|
|
83
|
+
/**
|
|
84
|
+
* Class names to be applied.
|
|
85
|
+
*/
|
|
86
|
+
className: PropTypes.string,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A Jss Object used to override or extend the styles applied.
|
|
90
|
+
*/
|
|
91
|
+
classes: PropTypes.shape({
|
|
92
|
+
/**
|
|
93
|
+
* Styles applied to the component root class.
|
|
94
|
+
*/
|
|
95
|
+
root: PropTypes.string,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Styles applied to the radio button group to overrrite horizontal class margins.
|
|
99
|
+
*/
|
|
100
|
+
horizontal: PropTypes.string,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Styles applied to the radio root ( to override radio group horizontal )
|
|
104
|
+
*/
|
|
105
|
+
radioRoot: PropTypes.string
|
|
106
|
+
}).isRequired,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The number of pages the component has.
|
|
110
|
+
*/
|
|
111
|
+
pages: PropTypes.number,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The currently selected page (0-indexed).
|
|
115
|
+
*/
|
|
116
|
+
page: PropTypes.number,
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Function called when the page changes.
|
|
120
|
+
*/
|
|
121
|
+
onPageChange: PropTypes.func,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Function called to get the respective aria label.
|
|
125
|
+
*/
|
|
126
|
+
getItemAriaLabel: PropTypes.func,
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)
|
|
130
|
+
*/
|
|
131
|
+
id: PropTypes.number
|
|
132
|
+
} : void 0;
|
|
133
|
+
export default withStyles(styles, {
|
|
134
|
+
name: "HvDotPagination"
|
|
135
|
+
})(HvDotPagination);
|
|
136
|
+
//# sourceMappingURL=DotPagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/DotPagination.js"],"names":["React","PropTypes","clsx","withStyles","HvRadio","HvRadioGroup","CurrentStep","RadioButtonUnselected","styles","getSelectorIcons","classes","options","disabled","color","undefined","checkedColor","radio","icon","radioChecked","HvDotPagination","props","className","pages","page","onPageChange","getItemAriaLabel","id","others","range","n","Array","from","v","i","icons","root","horizontal","map","pg","radioR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D;AAR9B,MADgB;AAAA,GAAjB,CADH,CADF,CADF;AAkBD,CAlCD;;AAoCA,wCAAAd,eAAe,CAACsB,SAAhB,GAA4B;AAC1B;AACF;AACA;AACEpB,EAAAA,SAAS,EAAEpB,SAAS,CAACyC,MAJK;;AAK1B;AACF;AACA;AACEhC,EAAAA,OAAO,EAAET,SAAS,CAAC0C,KAAV,CAAgB;AACvB;AACJ;AACA;AACIR,IAAAA,IAAI,EAAElC,SAAS,CAACyC,MAJO;;AAKvB;AACJ;AACA;AACIN,IAAAA,UAAU,EAAEnC,SAAS,CAACyC,MARC;;AASvB;AACJ;AACA;AACIH,IAAAA,SAAS,EAAEtC,SAAS,CAACyC;AAZE,GAAhB,EAaNE,UArBuB;;AAsB1B;AACF;AACA;AACEtB,EAAAA,KAAK,EAAErB,SAAS,CAAC4C,MAzBS;;AA0B1B;AACF;AACA;AACEtB,EAAAA,IAAI,EAAEtB,SAAS,CAAC4C,MA7BU;;AA8B1B;AACF;AACA;AACErB,EAAAA,YAAY,EAAEvB,SAAS,CAAC6C,IAjCE;;AAkC1B;AACF;AACA;AACErB,EAAAA,gBAAgB,EAAExB,SAAS,CAAC6C,IArCF;;AAsC1B;AACF;AACA;AACEpB,EAAAA,EAAE,EAAEzB,SAAS,CAAC4C;AAzCY,CAA5B;AA4CA,eAAe1C,UAAU,CAACK,MAAD,EAAS;AAAEuC,EAAAA,IAAI,EAAE;AAAR,CAAT,CAAV,CAAgD5B,eAAhD,CAAf","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvRadio, HvRadioGroup } from \"@hitachivantara/uikit-react-core\";\nimport { CurrentStep, RadioButtonUnselected } from \"@hitachivantara/uikit-react-icons\";\nimport styles from \"./styles\";\n\nexport const getSelectorIcons = (classes, options) => {\n const { disabled } = options;\n const color = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n const checkedColor = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n\n return {\n radio: <RadioButtonUnselected color={color} className={classes.icon} iconSize=\"XS\" />,\n radioChecked: <CurrentStep color={checkedColor} className={classes.icon} iconSize=\"XS\" />,\n };\n};\n\n/**\n * DotPagination description/documentation paragraph\n */\nconst HvDotPagination = (props) => {\n const {\n className,\n classes,\n pages = 1,\n page = 0,\n onPageChange,\n getItemAriaLabel,\n id,\n ...others\n } = props;\n\n const range = (n) => Array.from(Array(n), (v, i) => i);\n\n const icons = getSelectorIcons(classes, {});\n\n return (\n <div className={clsx(className, classes.root)} {...others}>\n <HvRadioGroup classes={{ horizontal: classes.horizontal }} orientation=\"horizontal\">\n {range(pages).map((pg, i) => (\n <HvRadio\n classes={{ root: classes.radioRoot }}\n key={`dot_navigation${id && id.toString()}_item${i.toString()}`}\n value={i}\n checked={page === i}\n onChange={() => onPageChange(i)}\n icon={icons.radio}\n checkedIcon={icons.radioChecked}\n aria-label={getItemAriaLabel(i)}\n />\n ))}\n </HvRadioGroup>\n </div>\n );\n};\n\nHvDotPagination.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the radio button group to overrrite horizontal class margins.\n */\n horizontal: PropTypes.string,\n /**\n * Styles applied to the radio root ( to override radio group horizontal )\n */\n radioRoot: PropTypes.string,\n }).isRequired,\n /**\n * The number of pages the component has.\n */\n pages: PropTypes.number,\n /**\n * The currently selected page (0-indexed).\n */\n page: PropTypes.number,\n /**\n * Function called when the page changes.\n */\n onPageChange: PropTypes.func,\n /**\n * Function called to get the respective aria label.\n */\n getItemAriaLabel: PropTypes.func,\n /**\n * Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)\n */\n id: PropTypes.number,\n};\n\nexport default withStyles(styles, { name: \"HvDotPagination\" })(HvDotPagination);\n"],"file":"DotPagination.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB","sourcesContent":["export { default } from \"./DotPagination\";\n"],"file":"index.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var styles = function styles() {
|
|
2
|
+
return {
|
|
3
|
+
root: {
|
|
4
|
+
display: "flex",
|
|
5
|
+
justifyContent: "center"
|
|
6
|
+
},
|
|
7
|
+
horizontal: {
|
|
8
|
+
marginLeft: 0,
|
|
9
|
+
width: "auto"
|
|
10
|
+
},
|
|
11
|
+
radioRoot: {
|
|
12
|
+
marginLeft: "0"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default styles;
|
|
18
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/styles.js"],"names":["styles","root","display","justifyContent","horizontal","marginLeft","width","radioRoot"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,cAAc,EAAE;AAFZ,KADc;AAMpBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,UAAU,EAAE,CADF;AAEVC,MAAAA,KAAK,EAAE;AAFG,KANQ;AAWpBC,IAAAA,SAAS,EAAE;AACTF,MAAAA,UAAU,EAAE;AADH;AAXS,GAAP;AAAA,CAAf;;AAgBA,eAAeL,MAAf","sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n\n horizontal: {\n marginLeft: 0,\n width: \"auto\",\n },\n\n radioRoot: {\n marginLeft: \"0\",\n },\n});\n\nexport default styles;\n"],"file":"styles.js"}
|
package/dist/legacy/index.d.ts
CHANGED
package/dist/legacy/index.js
CHANGED
|
@@ -16,4 +16,5 @@ export { default as HvColorPicker } from "./ColorPicker";
|
|
|
16
16
|
export { default as HvQueryBuilder } from "./QueryBuilder";
|
|
17
17
|
export { default as HvInlineEditor } from "./InlineEditor";
|
|
18
18
|
export { default as HvProgressBar } from "./ProgressBar";
|
|
19
|
+
export { default as HvDotPagination } from "./DotPagination";
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.js"],"names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvInlineEditor","HvProgressBar"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,cAApB,QAA0C,gBAA1C;AACA,SAASb,OAAO,IAAIc,aAApB,QAAyC,eAAzC","sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvInlineEditor","HvProgressBar","HvDotPagination"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,cAApB,QAA0C,gBAA1C;AACA,SAASb,OAAO,IAAIc,aAApB,QAAyC,eAAzC;AACA,SAASd,OAAO,IAAIe,eAApB,QAA2C,iBAA3C","sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\n"],"file":"index.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
export type HvDotPaginationClassKey = "root";
|
|
5
|
+
|
|
6
|
+
export type HvDotPaginationProps = StandardProps<
|
|
7
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
8
|
+
HvDotPaginationClassKey
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export default function HvDotPagination(props: HvDotPaginationProps): JSX.Element | null;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["className", "classes", "pages", "page", "onPageChange", "getItemAriaLabel", "id"];
|
|
4
|
+
import React from "react";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { withStyles } from "@material-ui/core";
|
|
8
|
+
import { HvRadio, HvRadioGroup } from "@hitachivantara/uikit-react-core";
|
|
9
|
+
import { CurrentStep, RadioButtonUnselected } from "@hitachivantara/uikit-react-icons";
|
|
10
|
+
import styles from "./styles";
|
|
11
|
+
export const getSelectorIcons = (classes, options) => {
|
|
12
|
+
const {
|
|
13
|
+
disabled
|
|
14
|
+
} = options;
|
|
15
|
+
const color = disabled && ["atmo3", "atmo5"] || undefined;
|
|
16
|
+
const checkedColor = disabled && ["atmo3", "atmo5"] || undefined;
|
|
17
|
+
return {
|
|
18
|
+
radio: /*#__PURE__*/React.createElement(RadioButtonUnselected, {
|
|
19
|
+
color: color,
|
|
20
|
+
className: classes.icon,
|
|
21
|
+
iconSize: "XS"
|
|
22
|
+
}),
|
|
23
|
+
radioChecked: /*#__PURE__*/React.createElement(CurrentStep, {
|
|
24
|
+
color: checkedColor,
|
|
25
|
+
className: classes.icon,
|
|
26
|
+
iconSize: "XS"
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* DotPagination description/documentation paragraph
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
const HvDotPagination = props => {
|
|
35
|
+
const {
|
|
36
|
+
className,
|
|
37
|
+
classes,
|
|
38
|
+
pages = 1,
|
|
39
|
+
page = 0,
|
|
40
|
+
onPageChange,
|
|
41
|
+
getItemAriaLabel,
|
|
42
|
+
id
|
|
43
|
+
} = props,
|
|
44
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
45
|
+
|
|
46
|
+
const range = n => Array.from(Array(n), (v, i) => i);
|
|
47
|
+
|
|
48
|
+
const icons = getSelectorIcons(classes, {});
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
50
|
+
className: clsx(className, classes.root)
|
|
51
|
+
}, others), /*#__PURE__*/React.createElement(HvRadioGroup, {
|
|
52
|
+
classes: {
|
|
53
|
+
horizontal: classes.horizontal
|
|
54
|
+
},
|
|
55
|
+
orientation: "horizontal"
|
|
56
|
+
}, range(pages).map((pg, i) => /*#__PURE__*/React.createElement(HvRadio, {
|
|
57
|
+
classes: {
|
|
58
|
+
root: classes.radioRoot
|
|
59
|
+
},
|
|
60
|
+
key: `dot_navigation${id && id.toString()}_item${i.toString()}`,
|
|
61
|
+
value: i,
|
|
62
|
+
checked: page === i,
|
|
63
|
+
onChange: () => onPageChange(i),
|
|
64
|
+
icon: icons.radio,
|
|
65
|
+
checkedIcon: icons.radioChecked,
|
|
66
|
+
"aria-label": getItemAriaLabel(i)
|
|
67
|
+
}))));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
process.env.NODE_ENV !== "production" ? HvDotPagination.propTypes = {
|
|
71
|
+
/**
|
|
72
|
+
* Class names to be applied.
|
|
73
|
+
*/
|
|
74
|
+
className: PropTypes.string,
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A Jss Object used to override or extend the styles applied.
|
|
78
|
+
*/
|
|
79
|
+
classes: PropTypes.shape({
|
|
80
|
+
/**
|
|
81
|
+
* Styles applied to the component root class.
|
|
82
|
+
*/
|
|
83
|
+
root: PropTypes.string,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Styles applied to the radio button group to overrrite horizontal class margins.
|
|
87
|
+
*/
|
|
88
|
+
horizontal: PropTypes.string,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Styles applied to the radio root ( to override radio group horizontal )
|
|
92
|
+
*/
|
|
93
|
+
radioRoot: PropTypes.string
|
|
94
|
+
}).isRequired,
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The number of pages the component has.
|
|
98
|
+
*/
|
|
99
|
+
pages: PropTypes.number,
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The currently selected page (0-indexed).
|
|
103
|
+
*/
|
|
104
|
+
page: PropTypes.number,
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Function called when the page changes.
|
|
108
|
+
*/
|
|
109
|
+
onPageChange: PropTypes.func,
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Function called to get the respective aria label.
|
|
113
|
+
*/
|
|
114
|
+
getItemAriaLabel: PropTypes.func,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)
|
|
118
|
+
*/
|
|
119
|
+
id: PropTypes.number
|
|
120
|
+
} : void 0;
|
|
121
|
+
export default withStyles(styles, {
|
|
122
|
+
name: "HvDotPagination"
|
|
123
|
+
})(HvDotPagination);
|
|
124
|
+
//# sourceMappingURL=DotPagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/DotPagination.js"],"names":["React","PropTypes","clsx","withStyles","HvRadio","HvRadioGroup","CurrentStep","RadioButtonUnselected","styles","getSelectorIcons","classes","options","disabled","color","undefined","checkedColor","radio","icon","radioChecked","HvDotPagination","props","className","pages","page","onPageChange","getItemAriaLabel","id","others","range","n","Array","from","v","i","icons","root","horizontal","map","pg","radioRoot","toString","propTypes","string","shape","isRequired","number","func","name"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,OAAT,EAAkBC,YAAlB,QAAsC,kCAAtC;AACA,SAASC,WAAT,EAAsBC,qBAAtB,QAAmD,mCAAnD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,OAAO,MAAMC,gBAAgB,GAAG,CAACC,OAAD,EAAUC,OAAV,KAAsB;AACpD,QAAM;AAAEC,IAAAA;AAAF,MAAeD,OAArB;AACA,QAAME,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C,IArCF;;AAsC1B;AACF;AACA;AACEpB,EAAAA,EAAE,EAAEzB,SAAS,CAAC4C;AAzCY,CAA5B;AA4CA,eAAe1C,UAAU,CAACK,MAAD,EAAS;AAAEuC,EAAAA,IAAI,EAAE;AAAR,CAAT,CAAV,CAAgD5B,eAAhD,CAAf","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvRadio, HvRadioGroup } from \"@hitachivantara/uikit-react-core\";\nimport { CurrentStep, RadioButtonUnselected } from \"@hitachivantara/uikit-react-icons\";\nimport styles from \"./styles\";\n\nexport const getSelectorIcons = (classes, options) => {\n const { disabled } = options;\n const color = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n const checkedColor = (disabled && [\"atmo3\", \"atmo5\"]) || undefined;\n\n return {\n radio: <RadioButtonUnselected color={color} className={classes.icon} iconSize=\"XS\" />,\n radioChecked: <CurrentStep color={checkedColor} className={classes.icon} iconSize=\"XS\" />,\n };\n};\n\n/**\n * DotPagination description/documentation paragraph\n */\nconst HvDotPagination = (props) => {\n const {\n className,\n classes,\n pages = 1,\n page = 0,\n onPageChange,\n getItemAriaLabel,\n id,\n ...others\n } = props;\n\n const range = (n) => Array.from(Array(n), (v, i) => i);\n\n const icons = getSelectorIcons(classes, {});\n\n return (\n <div className={clsx(className, classes.root)} {...others}>\n <HvRadioGroup classes={{ horizontal: classes.horizontal }} orientation=\"horizontal\">\n {range(pages).map((pg, i) => (\n <HvRadio\n classes={{ root: classes.radioRoot }}\n key={`dot_navigation${id && id.toString()}_item${i.toString()}`}\n value={i}\n checked={page === i}\n onChange={() => onPageChange(i)}\n icon={icons.radio}\n checkedIcon={icons.radioChecked}\n aria-label={getItemAriaLabel(i)}\n />\n ))}\n </HvRadioGroup>\n </div>\n );\n};\n\nHvDotPagination.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the radio button group to overrrite horizontal class margins.\n */\n horizontal: PropTypes.string,\n /**\n * Styles applied to the radio root ( to override radio group horizontal )\n */\n radioRoot: PropTypes.string,\n }).isRequired,\n /**\n * The number of pages the component has.\n */\n pages: PropTypes.number,\n /**\n * The currently selected page (0-indexed).\n */\n page: PropTypes.number,\n /**\n * Function called when the page changes.\n */\n onPageChange: PropTypes.func,\n /**\n * Function called to get the respective aria label.\n */\n getItemAriaLabel: PropTypes.func,\n /**\n * Component id used to generate unique radio keys ( to avoid repeated keys in case multiple dotPagination components are needed)\n */\n id: PropTypes.number,\n};\n\nexport default withStyles(styles, { name: \"HvDotPagination\" })(HvDotPagination);\n"],"file":"DotPagination.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB","sourcesContent":["export { default } from \"./DotPagination\";\n"],"file":"index.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const styles = () => ({
|
|
2
|
+
root: {
|
|
3
|
+
display: "flex",
|
|
4
|
+
justifyContent: "center"
|
|
5
|
+
},
|
|
6
|
+
horizontal: {
|
|
7
|
+
marginLeft: 0,
|
|
8
|
+
width: "auto"
|
|
9
|
+
},
|
|
10
|
+
radioRoot: {
|
|
11
|
+
marginLeft: "0"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export default styles;
|
|
16
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DotPagination/styles.js"],"names":["styles","root","display","justifyContent","horizontal","marginLeft","width","radioRoot"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;AACpBC,EAAAA,IAAI,EAAE;AACJC,IAAAA,OAAO,EAAE,MADL;AAEJC,IAAAA,cAAc,EAAE;AAFZ,GADc;AAMpBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,UAAU,EAAE,CADF;AAEVC,IAAAA,KAAK,EAAE;AAFG,GANQ;AAWpBC,EAAAA,SAAS,EAAE;AACTF,IAAAA,UAAU,EAAE;AADH;AAXS,CAAP,CAAf;;AAgBA,eAAeL,MAAf","sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n\n horizontal: {\n marginLeft: 0,\n width: \"auto\",\n },\n\n radioRoot: {\n marginLeft: \"0\",\n },\n});\n\nexport default styles;\n"],"file":"styles.js"}
|
package/dist/modern/index.d.ts
CHANGED
package/dist/modern/index.js
CHANGED
|
@@ -16,4 +16,5 @@ export { default as HvColorPicker } from "./ColorPicker";
|
|
|
16
16
|
export { default as HvQueryBuilder } from "./QueryBuilder";
|
|
17
17
|
export { default as HvInlineEditor } from "./InlineEditor";
|
|
18
18
|
export { default as HvProgressBar } from "./ProgressBar";
|
|
19
|
+
export { default as HvDotPagination } from "./DotPagination";
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/modern/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.js"],"names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvInlineEditor","HvProgressBar"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,cAApB,QAA0C,gBAA1C;AACA,SAASb,OAAO,IAAIc,aAApB,QAAyC,eAAzC","sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvInlineEditor","HvProgressBar","HvDotPagination"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,cAApB,QAA0C,gBAA1C;AACA,SAASb,OAAO,IAAIc,aAApB,QAAyC,eAAzC;AACA,SAASd,OAAO,IAAIe,eAApB,QAA2C,iBAA3C","sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "3.41.
|
|
3
|
+
"version": "3.41.7",
|
|
4
4
|
"description": "A collection of contributed React components for the Hitachi Vantara's Design System.",
|
|
5
5
|
"homepage": "https://github.com/lumada-design/hv-uikit-react",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "83c85021d6842f5fc4299069cc94b6c0263274e8"
|
|
87
87
|
}
|