indicator-ui 0.0.90 → 0.0.91
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.css +74 -201
- package/dist/index.css.map +1 -1
- package/dist/index.js +24 -17
- package/dist/index.js.map +1 -1
- package/dist/scss/styles/mixins/centerInsideContent.scss +5 -3
- package/dist/scss/styles/mixins/fnt.scss +0 -1
- package/dist/scss/ui/InputFields/FlexField/styles/mixins/flexField.scss +2 -2
- package/dist/scss/ui/InputFields/InputFieldWrapper/styles/mixins/inputFieldWrapper.scss +0 -1
- package/dist/scss/ui/InputFields/SelectField/styles/mixins/selectField.scss +12 -11
- package/dist/types/src/test/pages/PaginationPage.d.ts +1 -0
- package/dist/types/src/test/pages/index.d.ts +1 -0
- package/dist/types/src/ui/PaginationBar/types/PageSwitcherTypes.d.ts +1 -0
- package/dist/types/src/ui/PaginationBar/types/PaginationBarTypes.d.ts +1 -0
- package/dist/types/src/ui/PaginationBar/ui/PageSwitcher.d.ts +1 -1
- package/dist/types/src/ui/PaginationBar/ui/PaginationBar.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3178,7 +3178,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3178
3178
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3179
3179
|
/* harmony export */ });
|
|
3180
3180
|
// extracted by mini-css-extract-plugin
|
|
3181
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"flexField":"InputField-module__flexField___aNE6o","inputField":"InputField-module__inputField___mzakH","placeholder":"InputField-module__placeholder___ybb3Y","icon":"InputField-module__icon___xR6jG","textSupport":"InputField-module__textSupport___njpRn","userPic":"InputField-module__userPic___OQ_q0","help":"InputField-module__help___uSjvq","dropdown":"InputField-module__dropdown___QQuFp","dropdownReverse":"InputField-module__dropdownReverse___Nfb9Z","button":"InputField-module__button___jm0td","red":"InputField-module__red___euINw","gray":"InputField-module__gray___GGFcb","pointer":"InputField-module__pointer___Ij_hP","focus":"InputField-module__focus___xpWhB","isError":"InputField-module__isError___x2fXo","disabled":"InputField-module__disabled___hH7HA","inputFieldWrapper":"InputField-module__inputFieldWrapper___ao9Rs","labelText":"InputField-module__labelText___Fxxc3","required":"InputField-module__required___p4MLk","hintText":"InputField-module__hintText___LC2Oq","hintError":"InputField-module__hintError___LrJWr","helperLink":"InputField-module__helperLink___A_6Ua","selectField":"InputField-module__selectField___ED0Q3","modalWindow":"InputField-module__modalWindow___JplNC","selectModalWindow":"InputField-module__selectModalWindow___Dg52i","
|
|
3181
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"flexField":"InputField-module__flexField___aNE6o","inputField":"InputField-module__inputField___mzakH","placeholder":"InputField-module__placeholder___ybb3Y","icon":"InputField-module__icon___xR6jG","textSupport":"InputField-module__textSupport___njpRn","userPic":"InputField-module__userPic___OQ_q0","help":"InputField-module__help___uSjvq","dropdown":"InputField-module__dropdown___QQuFp","dropdownReverse":"InputField-module__dropdownReverse___Nfb9Z","button":"InputField-module__button___jm0td","red":"InputField-module__red___euINw","gray":"InputField-module__gray___GGFcb","pointer":"InputField-module__pointer___Ij_hP","focus":"InputField-module__focus___xpWhB","isError":"InputField-module__isError___x2fXo","disabled":"InputField-module__disabled___hH7HA","inputFieldWrapper":"InputField-module__inputFieldWrapper___ao9Rs","labelText":"InputField-module__labelText___Fxxc3","required":"InputField-module__required___p4MLk","hintText":"InputField-module__hintText___LC2Oq","hintError":"InputField-module__hintError___LrJWr","helperLink":"InputField-module__helperLink___A_6Ua","selectField":"InputField-module__selectField___ED0Q3","modalWindow":"InputField-module__modalWindow___JplNC","selectModalWindow":"InputField-module__selectModalWindow___Dg52i","show-animation":"InputField-module__show-animation___z7gvz","selectFieldOptionsItem":"InputField-module__selectFieldOptionsItem___HBdJA","label":"InputField-module__label___Wlb6C","active":"InputField-module__active___RcF6w","switcherField":"InputField-module__switcherField___Qezr0","radioFieldItem":"InputField-module__radioFieldItem___c6OMz","checkbox":"InputField-module__checkbox___KcnRp","textareaField":"InputField-module__textareaField___iuYg7","offFocus":"InputField-module__offFocus___FeRXp"});
|
|
3182
3182
|
|
|
3183
3183
|
/***/ }),
|
|
3184
3184
|
|
|
@@ -7050,17 +7050,11 @@ function Button({ children, text, iconLeft, iconRight, hierarchy = 'primary', wa
|
|
|
7050
7050
|
return className?.heightHug;
|
|
7051
7051
|
}
|
|
7052
7052
|
};
|
|
7053
|
-
const getAdditionStyles = () => {
|
|
7054
|
-
if (typeof additionStyles === 'string') {
|
|
7055
|
-
return additionStyles;
|
|
7056
|
-
}
|
|
7057
|
-
return additionStyles.join(' ');
|
|
7058
|
-
};
|
|
7059
7053
|
const getWarningStyles = () => {
|
|
7060
7054
|
return warning ? className?.warning : '';
|
|
7061
7055
|
};
|
|
7062
7056
|
const getMainContent = () => {
|
|
7063
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [iconLeft && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.icon, children: iconLeft }), children && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.text, children: text || children }), iconRight && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.icon, children: iconRight })] }));
|
|
7057
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [iconLeft && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.icon, children: iconLeft }), children || text && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.text, children: text || children }), iconRight && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: className?.icon, children: iconRight })] }));
|
|
7064
7058
|
};
|
|
7065
7059
|
const getClassName = () => {
|
|
7066
7060
|
return (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(className?.button, getHierarchyClassName(), getSizeClassName(), getWidthClassName(), getHeightClassName(), additionStyles, getWarningStyles(), { [_styles__WEBPACK_IMPORTED_MODULE_3__.ButtonsStyle.disabled]: disabled });
|
|
@@ -10377,21 +10371,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10377
10371
|
|
|
10378
10372
|
|
|
10379
10373
|
|
|
10380
|
-
function PageSwitcher({ curPage = 1, numPage, next, prev, onChange, }) {
|
|
10374
|
+
function PageSwitcher({ curPage = 1, numPage, next, prev, onChange, smallVersion = false, }) {
|
|
10381
10375
|
const getNumberList = () => {
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10376
|
+
if (numPage <= 7) {
|
|
10377
|
+
return Array.from({ length: numPage }, (_, i) => i + 1);
|
|
10378
|
+
}
|
|
10379
|
+
if (curPage <= 2 || curPage >= numPage - 1) {
|
|
10380
|
+
return [1, 2, 3, '...', numPage - 2, numPage - 1, numPage];
|
|
10381
|
+
}
|
|
10382
|
+
return [1, '...', curPage - 1, curPage, curPage + 1, '...', numPage];
|
|
10383
|
+
};
|
|
10384
|
+
const getNumberListSmall = () => {
|
|
10385
|
+
if (numPage <= 5) {
|
|
10386
|
+
return Array.from({ length: numPage }, (_, i) => i + 1);
|
|
10387
|
+
}
|
|
10388
|
+
if (curPage <= 2 || curPage >= numPage - 1) {
|
|
10389
|
+
return [1, 2, '...', numPage - 1, numPage];
|
|
10385
10390
|
}
|
|
10386
|
-
return
|
|
10391
|
+
return [1, '...', curPage, '...', numPage];
|
|
10387
10392
|
};
|
|
10388
10393
|
const getNumberButton = (item, idx) => {
|
|
10389
10394
|
if (typeof item === 'string') {
|
|
10390
10395
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.plug, children: item }, idx);
|
|
10391
10396
|
}
|
|
10392
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: () => onChange
|
|
10397
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: () => onChange?.(item), className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.numberButton, {
|
|
10398
|
+
[_styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.active]: item === curPage
|
|
10399
|
+
}), children: item }, idx));
|
|
10393
10400
|
};
|
|
10394
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.pageSwitcher, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { onClick: prev, width: 'hug', iconLeft: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_3__.ArrowLeftSVG, {}), hierarchy: 'link-gray', size: 'small', children:
|
|
10401
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.pageSwitcher, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { onClick: prev, width: 'hug', iconLeft: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_3__.ArrowLeftSVG, {}), hierarchy: 'link-gray', size: 'small', disabled: curPage === 1, children: smallVersion ? undefined : 'Предыдущая' }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.PageSwitcherStyle.buttonsList, children: (smallVersion ? getNumberListSmall() : getNumberList()).map((item, idx) => getNumberButton(item, idx)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { onClick: next, width: 'hug', iconRight: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_3__.ArrowRightSVG, {}), hierarchy: 'link-gray', size: 'small', disabled: curPage === numPage, children: smallVersion ? undefined : 'Следующая' })] }));
|
|
10395
10402
|
}
|
|
10396
10403
|
|
|
10397
10404
|
|
|
@@ -10416,9 +10423,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10416
10423
|
|
|
10417
10424
|
|
|
10418
10425
|
|
|
10419
|
-
function PaginationBar({ numPage, getCurPage, nextPage, changePage, prevPage, loadMore, canLoadMore, loadMoreButton = true }) {
|
|
10426
|
+
function PaginationBar({ numPage, getCurPage, nextPage, changePage, prevPage, loadMore, canLoadMore = () => false, loadMoreButton = true, smallVersion = false, }) {
|
|
10420
10427
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.PaginationBarStyle.paginationBar, children: [loadMoreButton && canLoadMore() &&
|
|
10421
|
-
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: loadMore, hierarchy: 'secondary-gray', size: 'large', width: 'fill', children: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0435" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PageSwitcher__WEBPACK_IMPORTED_MODULE_3__.PageSwitcher, { numPage: numPage, onChange: changePage, next: nextPage, prev: prevPage, curPage: getCurPage() })] }));
|
|
10428
|
+
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: loadMore, hierarchy: 'secondary-gray', size: 'large', width: 'fill', children: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0435" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PageSwitcher__WEBPACK_IMPORTED_MODULE_3__.PageSwitcher, { numPage: numPage, onChange: changePage, next: nextPage, prev: prevPage, smallVersion: smallVersion, curPage: getCurPage() })] }));
|
|
10422
10429
|
}
|
|
10423
10430
|
|
|
10424
10431
|
|