@ballistix.digital/react-components 0.5.7 → 0.5.9
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.d.ts +3 -6
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -411,10 +411,6 @@ type TTableListProps<TData> = {
|
|
|
411
411
|
table: {
|
|
412
412
|
columns: ColumnDef<TData>[];
|
|
413
413
|
data: TData[];
|
|
414
|
-
pages: {
|
|
415
|
-
current: number;
|
|
416
|
-
total: number;
|
|
417
|
-
};
|
|
418
414
|
options?: {
|
|
419
415
|
defaultOrder?: string[];
|
|
420
416
|
defaultVisibility?: string[];
|
|
@@ -514,8 +510,9 @@ declare const base$b: {
|
|
|
514
510
|
};
|
|
515
511
|
desktop: {
|
|
516
512
|
container: string;
|
|
517
|
-
|
|
518
|
-
|
|
513
|
+
outerRightButton: string;
|
|
514
|
+
outerLeftButton: string;
|
|
515
|
+
innerButton: string;
|
|
519
516
|
navigation: string;
|
|
520
517
|
};
|
|
521
518
|
button: {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
|
-
import { ArrowPathIcon, ChevronDownIcon, EllipsisVerticalIcon, ExclamationCircleIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronUpDownIcon, HomeIcon, ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid';
|
|
2
|
+
import { ArrowPathIcon, ChevronDownIcon, EllipsisVerticalIcon, ExclamationCircleIcon, ChevronDoubleLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDoubleRightIcon, ChevronUpIcon, ChevronUpDownIcon, HomeIcon, ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid';
|
|
3
3
|
import { isArray, map, set, get, noop as noop$1, indexOf, pick, isEmpty, some, forEach, assign } from 'lodash';
|
|
4
4
|
import get$1 from 'lodash/get';
|
|
5
5
|
import React, { useState, useMemo, Children, Fragment, useEffect, useCallback, forwardRef, useImperativeHandle, useRef, useReducer, createElement, PureComponent, Component } from 'react';
|
|
@@ -1234,7 +1234,7 @@ var PanelPaginationNavigation = function (props) {
|
|
|
1234
1234
|
component = (jsxs(Fragment$1, { children: [jsx("button", { className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); }, children: min }), max >= min + 1 && (jsx("button", { className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); }, children: min + 1 })), max >= min + 2 && (jsx("button", { className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); }, children: min + 2 })), max >= min + 3 && (jsx("button", { className: toClassName(styles.button.default, current === min + 3 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 3); }, children: min + 3 }))] }));
|
|
1235
1235
|
break;
|
|
1236
1236
|
}
|
|
1237
|
-
return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: "flex flex-1 justify-between sm:hidden", children: [jsx("button", { className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); }, children: "Previous" }), jsx("button", { className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); }, children: "Next" })] }), jsxs("div", { className: styles.desktop.container, children: [jsx("div", { children: jsx("div", { className: "text-sm text-gray-700", children: children && children({ min: min, max: max, current: current }) }) }), jsx("div", { children: jsxs("nav", { className: styles.desktop.navigation, "aria-label": "Pagination", children: [jsxs("button", { className: toClassName(styles.desktop.
|
|
1237
|
+
return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: "flex flex-1 justify-between sm:hidden", children: [jsx("button", { className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); }, children: "Previous" }), jsx("button", { className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); }, children: "Next" })] }), jsxs("div", { className: styles.desktop.container, children: [jsx("div", { children: jsx("div", { className: "text-sm text-gray-700", children: children && children({ min: min, max: max, current: current }) }) }), jsx("div", { children: jsxs("nav", { className: styles.desktop.navigation, "aria-label": "Pagination", children: [jsxs("button", { className: toClassName(styles.desktop.outerLeftButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(1); }, children: [jsx("span", { className: styles.label, children: "First" }), jsx(ChevronDoubleLeftIcon, { className: styles.icon, "aria-hidden": "true" })] }), jsxs("button", { className: toClassName(styles.desktop.innerButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); }, children: [jsx("span", { className: styles.label, children: "Previous" }), jsx(ChevronLeftIcon, { className: styles.icon, "aria-hidden": "true" })] }), component, jsxs("button", { className: toClassName(styles.desktop.innerButton, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); }, children: [jsx("span", { className: styles.label, children: "Next" }), jsx(ChevronRightIcon, { className: styles.icon, "aria-hidden": "true" })] }), jsxs("button", { className: toClassName(styles.desktop.outerRightButton, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(max); }, children: [jsx("span", { className: styles.label, children: "Last" }), jsx(ChevronDoubleRightIcon, { className: styles.icon, "aria-hidden": "true" })] })] }) })] })] }));
|
|
1238
1238
|
};
|
|
1239
1239
|
|
|
1240
1240
|
var base$e = {
|
|
@@ -1245,8 +1245,9 @@ var base$e = {
|
|
|
1245
1245
|
},
|
|
1246
1246
|
desktop: {
|
|
1247
1247
|
container: 'hidden sm:flex sm:flex-1 sm:items-center sm:justify-between',
|
|
1248
|
-
|
|
1249
|
-
|
|
1248
|
+
outerRightButton: 'relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20',
|
|
1249
|
+
outerLeftButton: 'relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20',
|
|
1250
|
+
innerButton: 'relative inline-flex items-center border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20',
|
|
1250
1251
|
navigation: 'isolate inline-flex -space-x-px rounded-md shadow-sm',
|
|
1251
1252
|
},
|
|
1252
1253
|
button: {
|
|
@@ -2483,7 +2484,7 @@ var SelectMenuForm = function (props) {
|
|
|
2483
2484
|
var styles = handleGenerateStyle();
|
|
2484
2485
|
// Simulate onClear event.
|
|
2485
2486
|
useEffect(function () {
|
|
2486
|
-
if (state === null) {
|
|
2487
|
+
if (state === null && !isFocus) {
|
|
2487
2488
|
onClear && onClear(name);
|
|
2488
2489
|
}
|
|
2489
2490
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|