@ballistix.digital/react-components 0.4.6 → 0.4.8

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 CHANGED
@@ -6,6 +6,7 @@ import { ColumnDef, SortingState, ColumnOrderState } from '@tanstack/react-table
6
6
  import { TButtonElementStyles as TButtonElementStyles$1 } from 'components/Element/Button';
7
7
  import { TDropdownElementStyles as TDropdownElementStyles$1 } from 'components/Element/Dropdown';
8
8
  import { TPagePaginationNavigationStyles as TPagePaginationNavigationStyles$1 } from 'components/Navigation/PagePagination';
9
+ export { createColumnHelper } from 'helpers/table';
9
10
 
10
11
  declare const base$i: {
11
12
  loading: string;
package/dist/index.esm.js CHANGED
@@ -7,7 +7,7 @@ import { Menu, Transition, Dialog } from '@headlessui/react';
7
7
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
8
  import { unstable_batchedUpdates } from 'react-dom';
9
9
  import { ViewColumnsIcon, ChevronDownIcon as ChevronDownIcon$1, TableCellsIcon } from '@heroicons/react/24/outline';
10
- import { useReactTable, getCoreRowModel, flexRender } from '@tanstack/react-table';
10
+ import { useReactTable, getCoreRowModel, flexRender, createColumnHelper as createColumnHelper$1 } from '@tanstack/react-table';
11
11
  import { isValid, parse } from 'date-fns';
12
12
  import set$1 from 'lodash/set';
13
13
 
@@ -16865,7 +16865,7 @@ var PanelPaginationNavigation = function (props) {
16865
16865
  component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: styles.button.default, onClick: function () { return handleChangeCurrent(min); } }, { children: min })), jsx("span", __assign({ className: styles.divider }, { children: "..." })), jsx("button", __assign({ className: toClassName(styles.button.default, current === max - 2 && styles.button.active), onClick: function () { return handleChangeCurrent(max - 2); } }, { children: max - 2 })), jsx("button", __assign({ className: toClassName(styles.button.default, current === max - 1 && styles.button.active), onClick: function () { return handleChangeCurrent(max - 1); } }, { children: max - 1 })), jsx("button", __assign({ className: toClassName(styles.button.default, current === max && styles.button.active), onClick: function () { return handleChangeCurrent(max); } }, { children: max }))] }));
16866
16866
  break;
16867
16867
  case 'simple':
16868
- component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); } }, { children: min })), jsx("button", __assign({ className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); } }, { children: min + 1 })), jsx("button", __assign({ className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); } }, { children: min + 2 }))] }));
16868
+ component = (jsxs(Fragment$1, { children: [max <= min && (jsx("button", __assign({ className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); } }, { children: min }))), max <= min + 1 && (jsx("button", __assign({ 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", __assign({ className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); } }, { children: min + 2 })))] }));
16869
16869
  break;
16870
16870
  }
16871
16871
  return (jsxs("div", __assign({ className: styles.container }, { children: [jsxs("div", __assign({ className: "flex flex-1 justify-between sm:hidden" }, { children: [jsx("button", __assign({ className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: "Previous" })), jsx("button", __assign({ className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); } }, { children: "Next" }))] })), jsxs("div", __assign({ className: styles.desktop.container }, { children: [jsx("div", { children: jsx("div", __assign({ className: "text-sm text-gray-700" }, { children: children({ min: min, max: max, current: current }) })) }), jsx("div", { children: jsxs("nav", __assign({ className: styles.desktop.navigation, "aria-label": "Pagination" }, { children: [jsxs("button", __assign({ className: toClassName(styles.desktop.leftButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: [jsx("span", __assign({ className: styles.label }, { children: "Previous" })), jsx(ChevronLeftIcon, { className: styles.icon, "aria-hidden": "true" })] })), component, jsxs("button", __assign({ className: toClassName(styles.desktop.rightButton, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); } }, { children: [jsx("span", __assign({ className: styles.label }, { children: "Next" })), jsx(ChevronRightIcon, { className: styles.icon, "aria-hidden": "true" })] }))] })) })] }))] })));
@@ -17173,6 +17173,10 @@ var styles$7 = {
17173
17173
  controlled: controlled,
17174
17174
  };
17175
17175
 
17176
+ var createColumnHelper = function () {
17177
+ return createColumnHelper$1();
17178
+ };
17179
+
17176
17180
  var BreadcrumbsNavigation = function (props) {
17177
17181
  var _a = props.href, href = _a === void 0 ? '/' : _a, pages = props.pages, _b = props.type, type = _b === void 0 ? 'slashes' : _b, customSeparator = props.separator, stylesOverrides = props.styles;
17178
17182
  var handleGenerateStyle = function () {
@@ -17826,5 +17830,5 @@ var styles = {
17826
17830
  xl: xl,
17827
17831
  };
17828
17832
 
17829
- export { AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, ContainerLayout, DividerLayout, DropdownElement, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SlideOverOverlay, TabNavigation, TableList, VerticalNavigation };
17833
+ export { AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, ContainerLayout, DividerLayout, DropdownElement, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SlideOverOverlay, TabNavigation, TableList, VerticalNavigation, createColumnHelper };
17830
17834
  //# sourceMappingURL=index.esm.js.map