@ballistix.digital/react-components 3.3.0 → 3.3.2

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
@@ -446,6 +446,16 @@ type TTableListProps<TData> = {
446
446
  isStriped?: boolean;
447
447
  hasStickyHeader?: boolean;
448
448
  hasVerticalSeparators?: boolean;
449
+ columnPinning?: {
450
+ left?: {
451
+ name: string;
452
+ size: number;
453
+ }[];
454
+ right?: {
455
+ name: string;
456
+ size: number;
457
+ }[];
458
+ };
449
459
  };
450
460
  };
451
461
  isLoading?: boolean;
@@ -478,6 +488,7 @@ declare const base$e: {
478
488
  content: string;
479
489
  styleWrapper: string;
480
490
  tableWrapper: string;
491
+ tableWrapperWithLeftSide: string;
481
492
  table: {
482
493
  container: string;
483
494
  head: {
@@ -500,6 +511,11 @@ declare const base$e: {
500
511
  body: {
501
512
  container: string;
502
513
  row: string;
514
+ column: {
515
+ pinned: {
516
+ cell: string;
517
+ };
518
+ };
503
519
  cell: string;
504
520
  checkbox: string;
505
521
  indicator: string;
@@ -965,7 +981,29 @@ declare const base$6: {
965
981
  };
966
982
  type TSelectMenuFormStyles = DeepPartialType<typeof base$6>;
967
983
 
968
- type TDateMenuFormProps = {
984
+ type TDateMenuFormProps = Omit<TDateRangeMenuFormProps, 'value' | 'isRanged' | 'onChange'> & {
985
+ value?: string;
986
+ isRanged?: false;
987
+ onChange?: (value: string) => void;
988
+ };
989
+ declare const DateMenuForm: FC<TDateMenuFormProps>;
990
+
991
+ declare const base$5: {
992
+ container: string;
993
+ head: string;
994
+ body: string;
995
+ foot: string;
996
+ label: string;
997
+ hint: string;
998
+ leading: string;
999
+ input: string;
1000
+ trailing: string;
1001
+ description: string;
1002
+ error: string;
1003
+ };
1004
+ type TDateRangeMenuFormStyles = DeepPartialType<typeof base$5>;
1005
+
1006
+ type TDateRangeMenuFormProps = {
969
1007
  name: string;
970
1008
  type?: 'normal' | 'inset' | 'overlapping' | 'pill' | 'floored';
971
1009
  size?: 'compact' | 'expanded';
@@ -985,9 +1023,8 @@ type TDateMenuFormProps = {
985
1023
  isRequired: boolean;
986
1024
  }) => string | ReactNode;
987
1025
  value: {
988
- label: string;
989
- value: string;
990
- disabled?: boolean;
1026
+ startDate: string;
1027
+ endDate: string;
991
1028
  };
992
1029
  error?: string;
993
1030
  isRequired?: boolean;
@@ -1001,24 +1038,9 @@ type TDateMenuFormProps = {
1001
1038
  }) => void;
1002
1039
  onClear?: (name: string) => void;
1003
1040
  onBlur?: any;
1004
- styles?: TDateMenuFormStyles;
1005
- };
1006
- declare const DateMenuForm: FC<TDateMenuFormProps>;
1007
-
1008
- declare const base$5: {
1009
- container: string;
1010
- head: string;
1011
- body: string;
1012
- foot: string;
1013
- label: string;
1014
- hint: string;
1015
- leading: string;
1016
- input: string;
1017
- trailing: string;
1018
- description: string;
1019
- error: string;
1041
+ styles?: TDateRangeMenuFormStyles;
1020
1042
  };
1021
- type TDateMenuFormStyles = DeepPartialType<typeof base$5>;
1043
+ declare const DateRangeMenu: FC<TDateRangeMenuFormProps>;
1022
1044
 
1023
1045
  type TCheckboxInputGroupFormProps = {
1024
1046
  name: string;
@@ -1297,4 +1319,4 @@ type TReturn<TData> = {
1297
1319
  };
1298
1320
  declare const useExcel: <TData extends object>() => TReturn<TData>;
1299
1321
 
1300
- export { AddressInputGroupForm, BadgeElement$1 as AlertElement, AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, CheckboxInputForm as CheckboxInput, ContainerLayout, DateMenuForm, DividerLayout, DropdownElement, FileInputGroupForm, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, OpeningsHourInputGroupForm, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SelectMenuForm, SlideOverOverlay, Switch as SwitchForm, type TAddressInputGroupFormProps, type TAddressInputGroupFormStyles, type TAddressInputGroupFormValue, type TButtonElementProps, type TCheckboxInputFormProps, type TCheckboxInputFormStyles, type TCheckboxInputGroupFormProps, type TCheckboxInputGroupFormStyles, type TDateMenuFormProps, type TDateMenuFormStyles, type TExcelCell, type TExcelRow, type TExcelSheet, type TFileInputGroupFormProps, type TFileInputGroupFormStyles, type TInputGroupFormProps, type TInputGroupStyles, type TModalOverlayProps, type TOpeningsHourInputGroupFormProps, type TOpeningsHourInputGroupFormStyles, type TSelectMenuFormProps, type TSelectMenuFormStyles, type TSwitchFormProps, type TSwitchStylesForm, type TTableListProps as TTableList2Props, type TTableListProps$1 as TTableListProps, type TTableListStyles$1 as TTableListStyles, TabNavigation, TableColumnOptionsCustom, TableExcelExportCustom as TableExportCustom, TableList, TableList2, TooltipElement, VerticalNavigation, CheckboxInputGroupForm as __DEPRECATED__CheckboxInputGroupForm, useExcel };
1322
+ export { AddressInputGroupForm, BadgeElement$1 as AlertElement, AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, CheckboxInputForm as CheckboxInput, ContainerLayout, DateMenuForm, DateRangeMenu as DateRangeMenuForm, DividerLayout, DropdownElement, FileInputGroupForm, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, OpeningsHourInputGroupForm, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SelectMenuForm, SlideOverOverlay, Switch as SwitchForm, type TAddressInputGroupFormProps, type TAddressInputGroupFormStyles, type TAddressInputGroupFormValue, type TButtonElementProps, type TCheckboxInputFormProps, type TCheckboxInputFormStyles, type TCheckboxInputGroupFormProps, type TCheckboxInputGroupFormStyles, type TDateMenuFormProps, type TDateRangeMenuFormStyles as TDateMenuFormStyles, type TDateRangeMenuFormProps, type TDateRangeMenuFormStyles, type TExcelCell, type TExcelRow, type TExcelSheet, type TFileInputGroupFormProps, type TFileInputGroupFormStyles, type TInputGroupFormProps, type TInputGroupStyles, type TModalOverlayProps, type TOpeningsHourInputGroupFormProps, type TOpeningsHourInputGroupFormStyles, type TSelectMenuFormProps, type TSelectMenuFormStyles, type TSwitchFormProps, type TSwitchStylesForm, type TTableListProps as TTableList2Props, type TTableListProps$1 as TTableListProps, type TTableListStyles$1 as TTableListStyles, TabNavigation, TableColumnOptionsCustom, TableExcelExportCustom as TableExportCustom, TableList, TableList2, TooltipElement, VerticalNavigation, CheckboxInputGroupForm as __DEPRECATED__CheckboxInputGroupForm, useExcel };
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { ArrowPathIcon, ChevronDownIcon, EllipsisVerticalIcon, ExclamationCircleIcon, ChevronDoubleLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDoubleRightIcon, ChevronUpIcon, ChevronUpDownIcon, HomeIcon, ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid';
3
- import { isArray, map, set, get, noop as noop$2, indexOf, toSafeInteger, pick, isEmpty, some, compact as compact$1, forEach, assign, includes, times, intersection, trim, lastIndexOf } from 'lodash';
3
+ import { isArray, map, set, get, noop as noop$2, indexOf, toSafeInteger, pick, isEmpty, some, compact as compact$1, forEach, assign, includes, findIndex, last, first, find, concat, times, intersection, trim, lastIndexOf } from 'lodash';
4
4
  import get$1 from 'lodash/get';
5
5
  import React, { useState, useMemo, useRef, Children, Fragment as Fragment$1, useEffect, useCallback, useLayoutEffect, createContext, memo, useReducer, forwardRef, useContext, cloneElement, useImperativeHandle, createElement, PureComponent, Component } from 'react';
6
6
  import { library } from '@fortawesome/fontawesome-svg-core';
@@ -5820,11 +5820,11 @@ var isValidState = function (state) {
5820
5820
  };
5821
5821
 
5822
5822
  var TableList2 = function (props) {
5823
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
5823
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
5824
5824
  var id = props.id, config = props.table, head = props.head, foot = props.foot, leftSide = props.leftSide, isLoading = props.isLoading, onRowClick = props.onRowClick, onChange = props.onChange, stylesOverrides = props.styles, dragConfig = props.dragConfig;
5825
- var _l = useState({}), columnVisibility = _l[0], setColumnVisibility = _l[1];
5826
- var _m = useState([]), columnOrder = _m[0], setColumnOrder = _m[1];
5827
- var _o = useState((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _o[0], setSorting = _o[1];
5825
+ var _x = useState({}), columnVisibility = _x[0], setColumnVisibility = _x[1];
5826
+ var _y = useState([]), columnOrder = _y[0], setColumnOrder = _y[1];
5827
+ var _z = useState((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _z[0], setSorting = _z[1];
5828
5828
  var handleGenerateStyle = function () {
5829
5829
  var result = deepCopyObject(styles$g.base);
5830
5830
  var keys = calculateNestedKeys(styles$g.base);
@@ -5894,6 +5894,7 @@ var TableList2 = function (props) {
5894
5894
  }
5895
5895
  ], config.columns, true) : config.columns,
5896
5896
  data: config.data,
5897
+ enableColumnPinning: true,
5897
5898
  state: {
5898
5899
  sorting: sorting,
5899
5900
  columnVisibility: columnVisibility,
@@ -5904,6 +5905,10 @@ var TableList2 = function (props) {
5904
5905
  ? __assign$1({ 'drag-handle': true }, initialVisibilityState) : initialVisibilityState,
5905
5906
  columnOrder: isDraggable
5906
5907
  ? __spreadArray(['drag-handle'], ((_e = (_d = config.options) === null || _d === void 0 ? void 0 : _d.defaultOrder) !== null && _e !== void 0 ? _e : []), true) : (_f = config.options) === null || _f === void 0 ? void 0 : _f.defaultOrder,
5908
+ columnPinning: {
5909
+ left: (_j = map((_h = (_g = config.options) === null || _g === void 0 ? void 0 : _g.columnPinning) === null || _h === void 0 ? void 0 : _h.left, 'name')) !== null && _j !== void 0 ? _j : [],
5910
+ right: (_m = map((_l = (_k = config.options) === null || _k === void 0 ? void 0 : _k.columnPinning) === null || _l === void 0 ? void 0 : _l.right, 'name')) !== null && _m !== void 0 ? _m : [],
5911
+ },
5907
5912
  },
5908
5913
  manualPagination: true,
5909
5914
  manualSorting: true,
@@ -5954,7 +5959,7 @@ var TableList2 = function (props) {
5954
5959
  }
5955
5960
  setColumnVisibility(visibility_1);
5956
5961
  }
5957
- }, [(_g = config === null || config === void 0 ? void 0 : config.options) === null || _g === void 0 ? void 0 : _g.defaultVisibility, id, table]);
5962
+ }, [(_o = config === null || config === void 0 ? void 0 : config.options) === null || _o === void 0 ? void 0 : _o.defaultVisibility, id, table]);
5958
5963
  useEffect(function () {
5959
5964
  var _a, _b, _c, _d;
5960
5965
  var savedOrder = (_a = getTableState(id)) === null || _a === void 0 ? void 0 : _a.columnOrder;
@@ -5969,7 +5974,7 @@ var TableList2 = function (props) {
5969
5974
  var mappedColumns = map(config.columns, function (column) { var _a; return ((_a = column === null || column === void 0 ? void 0 : column.id) !== null && _a !== void 0 ? _a : get(column, 'accessorKey')); });
5970
5975
  setColumnOrder(isDraggable ? __spreadArray(['drag-handle'], mappedColumns, true) : mappedColumns);
5971
5976
  }
5972
- }, [config.columns, (_h = config === null || config === void 0 ? void 0 : config.options) === null || _h === void 0 ? void 0 : _h.defaultOrder, id, isDraggable]);
5977
+ }, [config.columns, (_p = config === null || config === void 0 ? void 0 : config.options) === null || _p === void 0 ? void 0 : _p.defaultOrder, id, isDraggable]);
5973
5978
  // Write state to local storage when it changes
5974
5979
  useEffect(function () {
5975
5980
  if (state) {
@@ -6004,7 +6009,52 @@ var TableList2 = function (props) {
6004
6009
  }) }, row.id));
6005
6010
  };
6006
6011
  var sensors = useSensors(useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), useSensor(KeyboardSensor, {}));
6007
- var Content = (jsxs("div", { className: styles.container, "data-cy": "table-list-".concat(id), children: [head && jsx("div", { className: styles.head, children: head(state) }), jsx("div", { className: styles.body.content, children: jsx("div", { className: styles.body.wrapper, children: jsxs("div", { className: styles.body.styleWrapper, children: [leftSide && (jsx("div", { className: styles.leftSide, children: leftSide(state) })), jsxs("div", { className: styles.body.tableWrapper, children: [jsxs("table", { className: styles.body.table.container, children: [jsx("thead", { className: styles.body.table.head.container, children: map(table === null || table === void 0 ? void 0 : table.getHeaderGroups(), function (headerGroup) { return (jsx("tr", { className: styles.body.table.head.row, children: map(headerGroup.headers, function (header) {
6012
+ var getPinnedColumnsWidth = useCallback(function (side, id) {
6013
+ var _a, _b, _c, _d;
6014
+ var pinnedColumns = map((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b[side], 'size');
6015
+ var pinnedColumnIndex = findIndex((_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d[side], { name: id });
6016
+ if (pinnedColumnIndex === -1)
6017
+ return null;
6018
+ var startIndex = side === 'left' ? 0 : pinnedColumnIndex + 1;
6019
+ var endIndex = side === 'left'
6020
+ ? pinnedColumnIndex
6021
+ : pinnedColumns.length - pinnedColumnIndex + 1;
6022
+ return pinnedColumns
6023
+ .slice(startIndex, endIndex)
6024
+ .reduce(function (acc, size) { return acc + size; }, 0);
6025
+ }, [(_q = config.options) === null || _q === void 0 ? void 0 : _q.columnPinning]);
6026
+ var getCommonPinningStyles = useCallback(function (column) {
6027
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6028
+ var isPinned = column.getIsPinned();
6029
+ var isLastLeftPinnedColumn = column.id == ((_c = last((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b.left)) === null || _c === void 0 ? void 0 : _c.name);
6030
+ var isFirstRightPinnedColumn = column.id == ((_f = first((_e = (_d = config.options) === null || _d === void 0 ? void 0 : _d.columnPinning) === null || _e === void 0 ? void 0 : _e.right)) === null || _f === void 0 ? void 0 : _f.name);
6031
+ if (isFirstRightPinnedColumn)
6032
+ console.log(column.id);
6033
+ var width = (_l = find(concat((_h = (_g = config.options) === null || _g === void 0 ? void 0 : _g.columnPinning) === null || _h === void 0 ? void 0 : _h.left, (_k = (_j = config.options) === null || _j === void 0 ? void 0 : _j.columnPinning) === null || _k === void 0 ? void 0 : _k.right), {
6034
+ name: column.id,
6035
+ })) === null || _l === void 0 ? void 0 : _l.size;
6036
+ return {
6037
+ width: width,
6038
+ maxWidth: width,
6039
+ minWidth: width,
6040
+ boxShadow: isLastLeftPinnedColumn
6041
+ ? '-4px 0 4px -4px gray inset'
6042
+ : isFirstRightPinnedColumn
6043
+ ? '4px 0 4px -4px gray inset'
6044
+ : undefined,
6045
+ left: isPinned === 'left'
6046
+ ? "".concat(getPinnedColumnsWidth('left', column.id), "px")
6047
+ : undefined,
6048
+ right: isPinned === 'right'
6049
+ ? "".concat(getPinnedColumnsWidth('right', column.id), "px")
6050
+ : undefined,
6051
+ };
6052
+ }, [
6053
+ (_s = (_r = config.options) === null || _r === void 0 ? void 0 : _r.columnPinning) === null || _s === void 0 ? void 0 : _s.left,
6054
+ (_u = (_t = config.options) === null || _t === void 0 ? void 0 : _t.columnPinning) === null || _u === void 0 ? void 0 : _u.right,
6055
+ getPinnedColumnsWidth,
6056
+ ]);
6057
+ var Content = (jsxs("div", { className: styles.container, "data-cy": "table-list-".concat(id), children: [head && jsx("div", { className: styles.head, children: head(state) }), jsx("div", { className: styles.body.content, children: jsx("div", { className: styles.body.wrapper, children: jsxs("div", { className: styles.body.styleWrapper, children: [leftSide && (jsx("div", { className: styles.leftSide, children: leftSide(state) })), jsxs("div", { className: toClassName(styles.body.tableWrapper, leftSide && styles.body.tableWrapperWithLeftSide), children: [jsxs("table", { className: styles.body.table.container, children: [jsx("thead", { className: styles.body.table.head.container, children: map(table === null || table === void 0 ? void 0 : table.getHeaderGroups(), function (headerGroup) { return (jsx("tr", { className: styles.body.table.head.row, children: map(headerGroup.headers, function (header) {
6008
6058
  // Default sort icon to show a user that the column is sortable
6009
6059
  var SortIconElement = ChevronUpDownIcon;
6010
6060
  if (header.column.getIsSorted()) {
@@ -6013,12 +6063,11 @@ var TableList2 = function (props) {
6013
6063
  ? ChevronUpIcon
6014
6064
  : ChevronDownIcon;
6015
6065
  }
6016
- return (jsx("th", { colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell.container, 'border-b', header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler(), style: {
6017
- minWidth: !!header.column.columnDef.size &&
6066
+ return (jsx("th", { colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell.container, 'border-b', header.column.getCanSort() && 'cursor-pointer', header.column.getIsPinned() &&
6067
+ styles.body.table.body.column.pinned.cell), onClick: header.column.getToggleSortingHandler(), style: __assign$1({ minWidth: !!header.column.columnDef.size &&
6018
6068
  header.column.columnDef.size !== 150
6019
6069
  ? "".concat(header.column.columnDef.size, "px")
6020
- : 'auto',
6021
- }, children: jsxs("div", { className: "grid gap-x-1 items-center", style: {
6070
+ : 'auto' }, getCommonPinningStyles(header.column)), children: jsxs("div", { className: "grid gap-x-1 items-center", style: {
6022
6071
  gridTemplateColumns: '1fr auto',
6023
6072
  }, children: [header.isPlaceholder ? null : (jsx("div", { className: styles.body.table.head.cell.text, children: flexRender(header.column.columnDef.header, header.getContext()) })), header.column.getCanSort() && (jsx("span", { className: toClassName(styles.body.table.head.cell.sortIndicator
6024
6073
  .container, header.column.getIsSorted()
@@ -6039,9 +6088,10 @@ var TableList2 = function (props) {
6039
6088
  index !==
6040
6089
  ((_c = (_b = table === null || table === void 0 ? void 0 : table.getState()) === null || _b === void 0 ? void 0 : _b.pagination) === null || _c === void 0 ? void 0 : _c.pageSize) -
6041
6090
  1 &&
6042
- 'border-b border-gray-200'), style: { width: cell.column.getSize() }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
6091
+ 'border-b border-gray-200', cell.column.getIsPinned() &&
6092
+ styles.body.table.body.column.pinned.cell), style: __assign$1({ width: cell.column.getSize() }, getCommonPinningStyles(cell.column)), children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
6043
6093
  }) }, row.id));
6044
- })) }))] }), isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsx(Fragment, { children: ((_j = config === null || config === void 0 ? void 0 : config.options) === null || _j === void 0 ? void 0 : _j.emptyComponent) ? ((_k = config === null || config === void 0 ? void 0 : config.options) === null || _k === void 0 ? void 0 : _k.emptyComponent) : (jsx("div", { className: "w-full flex justify-center my-2", children: "There is no data to show..." })) })), isLoading && (jsx("div", { className: "flex flex-col gap-y-2 w-full pt-5", children: times(8, function (index) { return (jsxs("div", { className: "flex gap-2", children: [jsx("div", { className: "w-20 h-12 rounded-md bg-gray-100 animate-pulse" }), jsx("div", { className: "w-full h-12 rounded-md bg-gray-100 animate-pulse" })] }, index)); }) }))] })] }) }) }), foot && jsx("div", { className: styles.foot, children: foot(state) })] }));
6094
+ })) }))] }), isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsx(Fragment, { children: ((_v = config === null || config === void 0 ? void 0 : config.options) === null || _v === void 0 ? void 0 : _v.emptyComponent) ? ((_w = config === null || config === void 0 ? void 0 : config.options) === null || _w === void 0 ? void 0 : _w.emptyComponent) : (jsx("div", { className: "w-full flex justify-center my-2", children: "There is no data to show..." })) })), isLoading && (jsx("div", { className: "flex flex-col gap-y-2 w-full pt-5", children: times(8, function (index) { return (jsxs("div", { className: "flex gap-2", children: [jsx("div", { className: "w-20 h-12 rounded-md bg-gray-100 animate-pulse" }), jsx("div", { className: "w-full h-12 rounded-md bg-gray-100 animate-pulse" })] }, index)); }) }))] })] }) }) }), foot && jsx("div", { className: styles.foot, children: foot(state) })] }));
6045
6095
  return isDraggable ? (jsx(DndContext, { collisionDetection: closestCenter, modifiers: [restrictToVerticalAxis], onDragEnd: onDragEnd, sensors: sensors, children: Content })) : (Content);
6046
6096
  };
6047
6097
 
@@ -6054,6 +6104,7 @@ var base$c = {
6054
6104
  content: '',
6055
6105
  styleWrapper: 'flex overflow-x-scroll overflow-y-visible',
6056
6106
  tableWrapper: 'inline-block min-w-full align-middle',
6107
+ tableWrapperWithLeftSide: '!min-w-max w-full',
6057
6108
  table: {
6058
6109
  container: 'min-w-full border-separate border-spacing-0',
6059
6110
  head: {
@@ -6076,6 +6127,11 @@ var base$c = {
6076
6127
  body: {
6077
6128
  container: 'divide-y divide-gray-200 border-t',
6078
6129
  row: '',
6130
+ column: {
6131
+ pinned: {
6132
+ cell: 'bg-white sticky z-10 overflow-hidden text-ellipsis',
6133
+ },
6134
+ },
6079
6135
  cell: 'whitespace-nowrap py-2.5 px-3 text-sm text-gray-500',
6080
6136
  checkbox: 'absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500 sm:left-6',
6081
6137
  indicator: 'absolute inset-y-0 left-0 w-0.5 bg-primary-600',
@@ -6835,6 +6891,95 @@ var TableExcelExportCustom = function (props) {
6835
6891
  };
6836
6892
 
6837
6893
  var DateMenuForm = function (props) {
6894
+ var onChange = props.onChange, defaultValue = props.value;
6895
+ var handleChange = useCallback(function (value) {
6896
+ onChange && onChange(value.startDate);
6897
+ }, [onChange]);
6898
+ var value = useMemo(function () {
6899
+ return defaultValue
6900
+ ? { startDate: defaultValue, endDate: defaultValue }
6901
+ : { startDate: '', endDate: '' };
6902
+ }, [defaultValue]);
6903
+ return (jsx(DateRangeMenu, __assign$1({}, props, { onChange: handleChange, isRanged: false, value: value })));
6904
+ };
6905
+
6906
+ var base$5 = {
6907
+ container: '',
6908
+ head: 'flex justify-between',
6909
+ body: 'relative rounded-md',
6910
+ foot: '',
6911
+ label: 'block font-medium text-gray-900',
6912
+ hint: 'text-xs text-gray-500',
6913
+ leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
6914
+ input: 'block w-full inline-flex',
6915
+ trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
6916
+ description: 'text-gray-400 text-xs mt-1',
6917
+ error: 'text-red-500 text-xs ml-5 mt-1',
6918
+ };
6919
+ var leading$3 = {
6920
+ input: 'pl-10',
6921
+ };
6922
+ var trailing$3 = {};
6923
+ var normal$3 = {
6924
+ label: 'leading-6 text-sm mb-2',
6925
+ hint: 'leading-6',
6926
+ leading: 'pl-3',
6927
+ input: 'rounded-md border-gray-200 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
6928
+ trailing: 'pr-3',
6929
+ description: 'mt-2 text-sm',
6930
+ };
6931
+ var inset$3 = {
6932
+ container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
6933
+ label: 'text-xs',
6934
+ hint: 'text-xs',
6935
+ input: 'border-0 !ring-0 p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
6936
+ description: 'hidden',
6937
+ };
6938
+ var overlapping$3 = {
6939
+ container: 'relative',
6940
+ head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
6941
+ label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
6942
+ hint: 'text-xs mr-4 bg-white px-1',
6943
+ input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
6944
+ description: 'hidden',
6945
+ };
6946
+ var pill$3 = {
6947
+ head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
6948
+ foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
6949
+ input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
6950
+ trailing: 'pr-2',
6951
+ description: 'text-xs',
6952
+ };
6953
+ var floored$3 = {
6954
+ body: 'relative mt-2',
6955
+ label: 'block text-sm font-medium leading-6 text-gray-900',
6956
+ input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
6957
+ description: 'text-xs mt-2',
6958
+ };
6959
+ var invalid$3 = {
6960
+ container: '!ring-red-500',
6961
+ input:
6962
+ // 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 sm:leading-6 pr-10',
6963
+ 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10',
6964
+ description: 'text-sm text-red-600',
6965
+ };
6966
+ var disabled$5 = {
6967
+ input: 'block w-full rounded-md border-0 text-gray-900 shadow-sm ring-1 ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200',
6968
+ };
6969
+ var styles$7 = {
6970
+ base: base$5,
6971
+ leading: leading$3,
6972
+ trailing: trailing$3,
6973
+ normal: normal$3,
6974
+ inset: inset$3,
6975
+ overlapping: overlapping$3,
6976
+ pill: pill$3,
6977
+ floored: floored$3,
6978
+ invalid: invalid$3,
6979
+ disabled: disabled$5,
6980
+ };
6981
+
6982
+ var DateRangeMenu = function (props) {
6838
6983
  var _a;
6839
6984
  var _b = props.name, name = _b === void 0 ? 'date-menu-form' : _b, _c = props.size, size = _c === void 0 ? 'compact' : _c, label = props.label, _d = props.i18n, i18n = _d === void 0 ? 'en' : _d, description = props.description, placeholder = props.placeholder, separator = props.separator, startFrom = props.startFrom, _e = props.displayFormat, displayFormat = _e === void 0 ? 'DD.MM.YYYY' : _e, _f = props.direction, direction = _f === void 0 ? 'down' : _f, minDate = props.minDate, maxDate = props.maxDate, _g = props.startWeekOn, startWeekOn = _g === void 0 ? 'mon' : _g, _h = props.icon, icon = _h === void 0 ? function (isEmpty) {
6840
6985
  return isEmpty ? (jsx(IconElement, { accessor: "calendar" })) : (jsx(IconElement, { accessor: "xmark", className: "text-black" }));
@@ -6916,82 +7061,6 @@ var DateMenuForm = function (props) {
6916
7061
  : (_a = error === null || error === void 0 ? void 0 : error.startDate) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.endDate }))] }))] })] }));
6917
7062
  };
6918
7063
 
6919
- var base$5 = {
6920
- container: '',
6921
- head: 'flex justify-between',
6922
- body: 'relative rounded-md',
6923
- foot: '',
6924
- label: 'block font-medium text-gray-900',
6925
- hint: 'text-xs text-gray-500',
6926
- leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
6927
- input: 'block w-full inline-flex',
6928
- trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
6929
- description: 'text-gray-400 text-xs mt-1',
6930
- error: 'text-red-500 text-xs ml-5 mt-1',
6931
- };
6932
- var leading$3 = {
6933
- input: 'pl-10',
6934
- };
6935
- var trailing$3 = {};
6936
- var normal$3 = {
6937
- label: 'leading-6 text-sm mb-2',
6938
- hint: 'leading-6',
6939
- leading: 'pl-3',
6940
- input: 'rounded-md border-gray-200 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
6941
- trailing: 'pr-3',
6942
- description: 'mt-2 text-sm',
6943
- };
6944
- var inset$3 = {
6945
- container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
6946
- label: 'text-xs',
6947
- hint: 'text-xs',
6948
- input: 'border-0 !ring-0 p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
6949
- description: 'hidden',
6950
- };
6951
- var overlapping$3 = {
6952
- container: 'relative',
6953
- head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
6954
- label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
6955
- hint: 'text-xs mr-4 bg-white px-1',
6956
- input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
6957
- description: 'hidden',
6958
- };
6959
- var pill$3 = {
6960
- head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
6961
- foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
6962
- input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
6963
- trailing: 'pr-2',
6964
- description: 'text-xs',
6965
- };
6966
- var floored$3 = {
6967
- body: 'relative mt-2',
6968
- label: 'block text-sm font-medium leading-6 text-gray-900',
6969
- input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
6970
- description: 'text-xs mt-2',
6971
- };
6972
- var invalid$3 = {
6973
- container: '!ring-red-500',
6974
- input:
6975
- // 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 sm:leading-6 pr-10',
6976
- 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10',
6977
- description: 'text-sm text-red-600',
6978
- };
6979
- var disabled$5 = {
6980
- input: 'block w-full rounded-md border-0 text-gray-900 shadow-sm ring-1 ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200',
6981
- };
6982
- var styles$7 = {
6983
- base: base$5,
6984
- leading: leading$3,
6985
- trailing: trailing$3,
6986
- normal: normal$3,
6987
- inset: inset$3,
6988
- overlapping: overlapping$3,
6989
- pill: pill$3,
6990
- floored: floored$3,
6991
- invalid: invalid$3,
6992
- disabled: disabled$5,
6993
- };
6994
-
6995
7064
  var CheckboxInputGroupForm = function (props) {
6996
7065
  var name = props.name, form = props.form, options = props.options, values = props.values, isDisabled = props.isDisabled, stylesOverrides = props.styles;
6997
7066
  var handleGenerateStyle = function () {
@@ -15211,5 +15280,5 @@ var styles = {
15211
15280
  disabled: disabled,
15212
15281
  };
15213
15282
 
15214
- export { AddressInputGroupForm, BadgeElement$1 as AlertElement, AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, CheckboxInputForm as CheckboxInput, ContainerLayout, DateMenuForm, DividerLayout, DropdownElement, FileInputGroupForm, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, OpeningsHourInputGroupForm, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SelectMenuForm, SlideOverOverlay, Switch as SwitchForm, TabNavigation, TableColumnOptionsCustom, TableExcelExportCustom as TableExportCustom, TableList, TableList2, TooltipElement, VerticalNavigation, CheckboxInputGroupForm as __DEPRECATED__CheckboxInputGroupForm, createColumnHelper, fromSelectMenuOptionToStringValue, useExcel };
15283
+ export { AddressInputGroupForm, BadgeElement$1 as AlertElement, AvatarElement, BadgeElement, BreadcrumbsNavigation, ButtonElement, ButtonGroupElement, CheckboxInputForm as CheckboxInput, ContainerLayout, DateMenuForm, DateRangeMenu as DateRangeMenuForm, DividerLayout, DropdownElement, FileInputGroupForm, IconElement, InputGroupForm, ListContainerLayout, MediaObjectLayout, ModalOverlay, NotificationOverlay, OpeningsHourInputGroupForm, PagePaginationNavigation, LayoutPanel as PanelLayout, PanelPaginationNavigation, SelectMenuForm, SlideOverOverlay, Switch as SwitchForm, TabNavigation, TableColumnOptionsCustom, TableExcelExportCustom as TableExportCustom, TableList, TableList2, TooltipElement, VerticalNavigation, CheckboxInputGroupForm as __DEPRECATED__CheckboxInputGroupForm, createColumnHelper, fromSelectMenuOptionToStringValue, useExcel };
15215
15284
  //# sourceMappingURL=index.esm.js.map