@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 +44 -22
- package/dist/index.esm.js +160 -91
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +159 -89
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5822,11 +5822,11 @@ var isValidState = function (state) {
|
|
|
5822
5822
|
};
|
|
5823
5823
|
|
|
5824
5824
|
var TableList2 = function (props) {
|
|
5825
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
5825
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
5826
5826
|
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;
|
|
5827
|
-
var
|
|
5828
|
-
var
|
|
5829
|
-
var
|
|
5827
|
+
var _x = React.useState({}), columnVisibility = _x[0], setColumnVisibility = _x[1];
|
|
5828
|
+
var _y = React.useState([]), columnOrder = _y[0], setColumnOrder = _y[1];
|
|
5829
|
+
var _z = React.useState((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _z[0], setSorting = _z[1];
|
|
5830
5830
|
var handleGenerateStyle = function () {
|
|
5831
5831
|
var result = deepCopyObject(styles$g.base);
|
|
5832
5832
|
var keys = calculateNestedKeys(styles$g.base);
|
|
@@ -5896,6 +5896,7 @@ var TableList2 = function (props) {
|
|
|
5896
5896
|
}
|
|
5897
5897
|
], config.columns, true) : config.columns,
|
|
5898
5898
|
data: config.data,
|
|
5899
|
+
enableColumnPinning: true,
|
|
5899
5900
|
state: {
|
|
5900
5901
|
sorting: sorting,
|
|
5901
5902
|
columnVisibility: columnVisibility,
|
|
@@ -5906,6 +5907,10 @@ var TableList2 = function (props) {
|
|
|
5906
5907
|
? __assign$1({ 'drag-handle': true }, initialVisibilityState) : initialVisibilityState,
|
|
5907
5908
|
columnOrder: isDraggable
|
|
5908
5909
|
? __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,
|
|
5910
|
+
columnPinning: {
|
|
5911
|
+
left: (_j = lodash.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 : [],
|
|
5912
|
+
right: (_m = lodash.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 : [],
|
|
5913
|
+
},
|
|
5909
5914
|
},
|
|
5910
5915
|
manualPagination: true,
|
|
5911
5916
|
manualSorting: true,
|
|
@@ -5956,7 +5961,7 @@ var TableList2 = function (props) {
|
|
|
5956
5961
|
}
|
|
5957
5962
|
setColumnVisibility(visibility_1);
|
|
5958
5963
|
}
|
|
5959
|
-
}, [(
|
|
5964
|
+
}, [(_o = config === null || config === void 0 ? void 0 : config.options) === null || _o === void 0 ? void 0 : _o.defaultVisibility, id, table]);
|
|
5960
5965
|
React.useEffect(function () {
|
|
5961
5966
|
var _a, _b, _c, _d;
|
|
5962
5967
|
var savedOrder = (_a = getTableState(id)) === null || _a === void 0 ? void 0 : _a.columnOrder;
|
|
@@ -5971,7 +5976,7 @@ var TableList2 = function (props) {
|
|
|
5971
5976
|
var mappedColumns = lodash.map(config.columns, function (column) { var _a; return ((_a = column === null || column === void 0 ? void 0 : column.id) !== null && _a !== void 0 ? _a : lodash.get(column, 'accessorKey')); });
|
|
5972
5977
|
setColumnOrder(isDraggable ? __spreadArray(['drag-handle'], mappedColumns, true) : mappedColumns);
|
|
5973
5978
|
}
|
|
5974
|
-
}, [config.columns, (
|
|
5979
|
+
}, [config.columns, (_p = config === null || config === void 0 ? void 0 : config.options) === null || _p === void 0 ? void 0 : _p.defaultOrder, id, isDraggable]);
|
|
5975
5980
|
// Write state to local storage when it changes
|
|
5976
5981
|
React.useEffect(function () {
|
|
5977
5982
|
if (state) {
|
|
@@ -6006,7 +6011,52 @@ var TableList2 = function (props) {
|
|
|
6006
6011
|
}) }, row.id));
|
|
6007
6012
|
};
|
|
6008
6013
|
var sensors = useSensors(useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), useSensor(KeyboardSensor, {}));
|
|
6009
|
-
var
|
|
6014
|
+
var getPinnedColumnsWidth = React.useCallback(function (side, id) {
|
|
6015
|
+
var _a, _b, _c, _d;
|
|
6016
|
+
var pinnedColumns = lodash.map((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b[side], 'size');
|
|
6017
|
+
var pinnedColumnIndex = lodash.findIndex((_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d[side], { name: id });
|
|
6018
|
+
if (pinnedColumnIndex === -1)
|
|
6019
|
+
return null;
|
|
6020
|
+
var startIndex = side === 'left' ? 0 : pinnedColumnIndex + 1;
|
|
6021
|
+
var endIndex = side === 'left'
|
|
6022
|
+
? pinnedColumnIndex
|
|
6023
|
+
: pinnedColumns.length - pinnedColumnIndex + 1;
|
|
6024
|
+
return pinnedColumns
|
|
6025
|
+
.slice(startIndex, endIndex)
|
|
6026
|
+
.reduce(function (acc, size) { return acc + size; }, 0);
|
|
6027
|
+
}, [(_q = config.options) === null || _q === void 0 ? void 0 : _q.columnPinning]);
|
|
6028
|
+
var getCommonPinningStyles = React.useCallback(function (column) {
|
|
6029
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6030
|
+
var isPinned = column.getIsPinned();
|
|
6031
|
+
var isLastLeftPinnedColumn = column.id == ((_c = lodash.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);
|
|
6032
|
+
var isFirstRightPinnedColumn = column.id == ((_f = lodash.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);
|
|
6033
|
+
if (isFirstRightPinnedColumn)
|
|
6034
|
+
console.log(column.id);
|
|
6035
|
+
var width = (_l = lodash.find(lodash.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), {
|
|
6036
|
+
name: column.id,
|
|
6037
|
+
})) === null || _l === void 0 ? void 0 : _l.size;
|
|
6038
|
+
return {
|
|
6039
|
+
width: width,
|
|
6040
|
+
maxWidth: width,
|
|
6041
|
+
minWidth: width,
|
|
6042
|
+
boxShadow: isLastLeftPinnedColumn
|
|
6043
|
+
? '-4px 0 4px -4px gray inset'
|
|
6044
|
+
: isFirstRightPinnedColumn
|
|
6045
|
+
? '4px 0 4px -4px gray inset'
|
|
6046
|
+
: undefined,
|
|
6047
|
+
left: isPinned === 'left'
|
|
6048
|
+
? "".concat(getPinnedColumnsWidth('left', column.id), "px")
|
|
6049
|
+
: undefined,
|
|
6050
|
+
right: isPinned === 'right'
|
|
6051
|
+
? "".concat(getPinnedColumnsWidth('right', column.id), "px")
|
|
6052
|
+
: undefined,
|
|
6053
|
+
};
|
|
6054
|
+
}, [
|
|
6055
|
+
(_s = (_r = config.options) === null || _r === void 0 ? void 0 : _r.columnPinning) === null || _s === void 0 ? void 0 : _s.left,
|
|
6056
|
+
(_u = (_t = config.options) === null || _t === void 0 ? void 0 : _t.columnPinning) === null || _u === void 0 ? void 0 : _u.right,
|
|
6057
|
+
getPinnedColumnsWidth,
|
|
6058
|
+
]);
|
|
6059
|
+
var Content = (jsxRuntime.jsxs("div", { className: styles.container, "data-cy": "table-list-".concat(id), children: [head && jsxRuntime.jsx("div", { className: styles.head, children: head(state) }), jsxRuntime.jsx("div", { className: styles.body.content, children: jsxRuntime.jsx("div", { className: styles.body.wrapper, children: jsxRuntime.jsxs("div", { className: styles.body.styleWrapper, children: [leftSide && (jsxRuntime.jsx("div", { className: styles.leftSide, children: leftSide(state) })), jsxRuntime.jsxs("div", { className: toClassName(styles.body.tableWrapper, leftSide && styles.body.tableWrapperWithLeftSide), children: [jsxRuntime.jsxs("table", { className: styles.body.table.container, children: [jsxRuntime.jsx("thead", { className: styles.body.table.head.container, children: lodash.map(table === null || table === void 0 ? void 0 : table.getHeaderGroups(), function (headerGroup) { return (jsxRuntime.jsx("tr", { className: styles.body.table.head.row, children: lodash.map(headerGroup.headers, function (header) {
|
|
6010
6060
|
// Default sort icon to show a user that the column is sortable
|
|
6011
6061
|
var SortIconElement = solid.ChevronUpDownIcon;
|
|
6012
6062
|
if (header.column.getIsSorted()) {
|
|
@@ -6015,12 +6065,11 @@ var TableList2 = function (props) {
|
|
|
6015
6065
|
? solid.ChevronUpIcon
|
|
6016
6066
|
: solid.ChevronDownIcon;
|
|
6017
6067
|
}
|
|
6018
|
-
return (jsxRuntime.jsx("th", { colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell.container, 'border-b', header.column.getCanSort() && 'cursor-pointer'
|
|
6019
|
-
minWidth: !!header.column.columnDef.size &&
|
|
6068
|
+
return (jsxRuntime.jsx("th", { colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell.container, 'border-b', header.column.getCanSort() && 'cursor-pointer', header.column.getIsPinned() &&
|
|
6069
|
+
styles.body.table.body.column.pinned.cell), onClick: header.column.getToggleSortingHandler(), style: __assign$1({ minWidth: !!header.column.columnDef.size &&
|
|
6020
6070
|
header.column.columnDef.size !== 150
|
|
6021
6071
|
? "".concat(header.column.columnDef.size, "px")
|
|
6022
|
-
: 'auto',
|
|
6023
|
-
}, children: jsxRuntime.jsxs("div", { className: "grid gap-x-1 items-center", style: {
|
|
6072
|
+
: 'auto' }, getCommonPinningStyles(header.column)), children: jsxRuntime.jsxs("div", { className: "grid gap-x-1 items-center", style: {
|
|
6024
6073
|
gridTemplateColumns: '1fr auto',
|
|
6025
6074
|
}, children: [header.isPlaceholder ? null : (jsxRuntime.jsx("div", { className: styles.body.table.head.cell.text, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) })), header.column.getCanSort() && (jsxRuntime.jsx("span", { className: toClassName(styles.body.table.head.cell.sortIndicator
|
|
6026
6075
|
.container, header.column.getIsSorted()
|
|
@@ -6041,9 +6090,10 @@ var TableList2 = function (props) {
|
|
|
6041
6090
|
index !==
|
|
6042
6091
|
((_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) -
|
|
6043
6092
|
1 &&
|
|
6044
|
-
'border-b border-gray-200'
|
|
6093
|
+
'border-b border-gray-200', cell.column.getIsPinned() &&
|
|
6094
|
+
styles.body.table.body.column.pinned.cell), style: __assign$1({ width: cell.column.getSize() }, getCommonPinningStyles(cell.column)), children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
|
|
6045
6095
|
}) }, row.id));
|
|
6046
|
-
})) }))] }), lodash.isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: ((
|
|
6096
|
+
})) }))] }), lodash.isEmpty(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (jsxRuntime.jsx(jsxRuntime.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) : (jsxRuntime.jsx("div", { className: "w-full flex justify-center my-2", children: "There is no data to show..." })) })), isLoading && (jsxRuntime.jsx("div", { className: "flex flex-col gap-y-2 w-full pt-5", children: lodash.times(8, function (index) { return (jsxRuntime.jsxs("div", { className: "flex gap-2", children: [jsxRuntime.jsx("div", { className: "w-20 h-12 rounded-md bg-gray-100 animate-pulse" }), jsxRuntime.jsx("div", { className: "w-full h-12 rounded-md bg-gray-100 animate-pulse" })] }, index)); }) }))] })] }) }) }), foot && jsxRuntime.jsx("div", { className: styles.foot, children: foot(state) })] }));
|
|
6047
6097
|
return isDraggable ? (jsxRuntime.jsx(DndContext, { collisionDetection: closestCenter, modifiers: [restrictToVerticalAxis], onDragEnd: onDragEnd, sensors: sensors, children: Content })) : (Content);
|
|
6048
6098
|
};
|
|
6049
6099
|
|
|
@@ -6056,6 +6106,7 @@ var base$c = {
|
|
|
6056
6106
|
content: '',
|
|
6057
6107
|
styleWrapper: 'flex overflow-x-scroll overflow-y-visible',
|
|
6058
6108
|
tableWrapper: 'inline-block min-w-full align-middle',
|
|
6109
|
+
tableWrapperWithLeftSide: '!min-w-max w-full',
|
|
6059
6110
|
table: {
|
|
6060
6111
|
container: 'min-w-full border-separate border-spacing-0',
|
|
6061
6112
|
head: {
|
|
@@ -6078,6 +6129,11 @@ var base$c = {
|
|
|
6078
6129
|
body: {
|
|
6079
6130
|
container: 'divide-y divide-gray-200 border-t',
|
|
6080
6131
|
row: '',
|
|
6132
|
+
column: {
|
|
6133
|
+
pinned: {
|
|
6134
|
+
cell: 'bg-white sticky z-10 overflow-hidden text-ellipsis',
|
|
6135
|
+
},
|
|
6136
|
+
},
|
|
6081
6137
|
cell: 'whitespace-nowrap py-2.5 px-3 text-sm text-gray-500',
|
|
6082
6138
|
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',
|
|
6083
6139
|
indicator: 'absolute inset-y-0 left-0 w-0.5 bg-primary-600',
|
|
@@ -6837,6 +6893,95 @@ var TableExcelExportCustom = function (props) {
|
|
|
6837
6893
|
};
|
|
6838
6894
|
|
|
6839
6895
|
var DateMenuForm = function (props) {
|
|
6896
|
+
var onChange = props.onChange, defaultValue = props.value;
|
|
6897
|
+
var handleChange = React.useCallback(function (value) {
|
|
6898
|
+
onChange && onChange(value.startDate);
|
|
6899
|
+
}, [onChange]);
|
|
6900
|
+
var value = React.useMemo(function () {
|
|
6901
|
+
return defaultValue
|
|
6902
|
+
? { startDate: defaultValue, endDate: defaultValue }
|
|
6903
|
+
: { startDate: '', endDate: '' };
|
|
6904
|
+
}, [defaultValue]);
|
|
6905
|
+
return (jsxRuntime.jsx(DateRangeMenu, __assign$1({}, props, { onChange: handleChange, isRanged: false, value: value })));
|
|
6906
|
+
};
|
|
6907
|
+
|
|
6908
|
+
var base$5 = {
|
|
6909
|
+
container: '',
|
|
6910
|
+
head: 'flex justify-between',
|
|
6911
|
+
body: 'relative rounded-md',
|
|
6912
|
+
foot: '',
|
|
6913
|
+
label: 'block font-medium text-gray-900',
|
|
6914
|
+
hint: 'text-xs text-gray-500',
|
|
6915
|
+
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
6916
|
+
input: 'block w-full inline-flex',
|
|
6917
|
+
trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
|
|
6918
|
+
description: 'text-gray-400 text-xs mt-1',
|
|
6919
|
+
error: 'text-red-500 text-xs ml-5 mt-1',
|
|
6920
|
+
};
|
|
6921
|
+
var leading$3 = {
|
|
6922
|
+
input: 'pl-10',
|
|
6923
|
+
};
|
|
6924
|
+
var trailing$3 = {};
|
|
6925
|
+
var normal$3 = {
|
|
6926
|
+
label: 'leading-6 text-sm mb-2',
|
|
6927
|
+
hint: 'leading-6',
|
|
6928
|
+
leading: 'pl-3',
|
|
6929
|
+
input: 'rounded-md border-gray-200 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
6930
|
+
trailing: 'pr-3',
|
|
6931
|
+
description: 'mt-2 text-sm',
|
|
6932
|
+
};
|
|
6933
|
+
var inset$3 = {
|
|
6934
|
+
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',
|
|
6935
|
+
label: 'text-xs',
|
|
6936
|
+
hint: 'text-xs',
|
|
6937
|
+
input: 'border-0 !ring-0 p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
6938
|
+
description: 'hidden',
|
|
6939
|
+
};
|
|
6940
|
+
var overlapping$3 = {
|
|
6941
|
+
container: 'relative',
|
|
6942
|
+
head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
6943
|
+
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
6944
|
+
hint: 'text-xs mr-4 bg-white px-1',
|
|
6945
|
+
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',
|
|
6946
|
+
description: 'hidden',
|
|
6947
|
+
};
|
|
6948
|
+
var pill$3 = {
|
|
6949
|
+
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
6950
|
+
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
6951
|
+
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',
|
|
6952
|
+
trailing: 'pr-2',
|
|
6953
|
+
description: 'text-xs',
|
|
6954
|
+
};
|
|
6955
|
+
var floored$3 = {
|
|
6956
|
+
body: 'relative mt-2',
|
|
6957
|
+
label: 'block text-sm font-medium leading-6 text-gray-900',
|
|
6958
|
+
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',
|
|
6959
|
+
description: 'text-xs mt-2',
|
|
6960
|
+
};
|
|
6961
|
+
var invalid$3 = {
|
|
6962
|
+
container: '!ring-red-500',
|
|
6963
|
+
input:
|
|
6964
|
+
// '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',
|
|
6965
|
+
'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',
|
|
6966
|
+
description: 'text-sm text-red-600',
|
|
6967
|
+
};
|
|
6968
|
+
var disabled$5 = {
|
|
6969
|
+
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',
|
|
6970
|
+
};
|
|
6971
|
+
var styles$7 = {
|
|
6972
|
+
base: base$5,
|
|
6973
|
+
leading: leading$3,
|
|
6974
|
+
trailing: trailing$3,
|
|
6975
|
+
normal: normal$3,
|
|
6976
|
+
inset: inset$3,
|
|
6977
|
+
overlapping: overlapping$3,
|
|
6978
|
+
pill: pill$3,
|
|
6979
|
+
floored: floored$3,
|
|
6980
|
+
invalid: invalid$3,
|
|
6981
|
+
disabled: disabled$5,
|
|
6982
|
+
};
|
|
6983
|
+
|
|
6984
|
+
var DateRangeMenu = function (props) {
|
|
6840
6985
|
var _a;
|
|
6841
6986
|
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) {
|
|
6842
6987
|
return isEmpty ? (jsxRuntime.jsx(IconElement, { accessor: "calendar" })) : (jsxRuntime.jsx(IconElement, { accessor: "xmark", className: "text-black" }));
|
|
@@ -6918,82 +7063,6 @@ var DateMenuForm = function (props) {
|
|
|
6918
7063
|
: (_a = error === null || error === void 0 ? void 0 : error.startDate) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.endDate }))] }))] })] }));
|
|
6919
7064
|
};
|
|
6920
7065
|
|
|
6921
|
-
var base$5 = {
|
|
6922
|
-
container: '',
|
|
6923
|
-
head: 'flex justify-between',
|
|
6924
|
-
body: 'relative rounded-md',
|
|
6925
|
-
foot: '',
|
|
6926
|
-
label: 'block font-medium text-gray-900',
|
|
6927
|
-
hint: 'text-xs text-gray-500',
|
|
6928
|
-
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
6929
|
-
input: 'block w-full inline-flex',
|
|
6930
|
-
trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
|
|
6931
|
-
description: 'text-gray-400 text-xs mt-1',
|
|
6932
|
-
error: 'text-red-500 text-xs ml-5 mt-1',
|
|
6933
|
-
};
|
|
6934
|
-
var leading$3 = {
|
|
6935
|
-
input: 'pl-10',
|
|
6936
|
-
};
|
|
6937
|
-
var trailing$3 = {};
|
|
6938
|
-
var normal$3 = {
|
|
6939
|
-
label: 'leading-6 text-sm mb-2',
|
|
6940
|
-
hint: 'leading-6',
|
|
6941
|
-
leading: 'pl-3',
|
|
6942
|
-
input: 'rounded-md border-gray-200 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
6943
|
-
trailing: 'pr-3',
|
|
6944
|
-
description: 'mt-2 text-sm',
|
|
6945
|
-
};
|
|
6946
|
-
var inset$3 = {
|
|
6947
|
-
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',
|
|
6948
|
-
label: 'text-xs',
|
|
6949
|
-
hint: 'text-xs',
|
|
6950
|
-
input: 'border-0 !ring-0 p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
6951
|
-
description: 'hidden',
|
|
6952
|
-
};
|
|
6953
|
-
var overlapping$3 = {
|
|
6954
|
-
container: 'relative',
|
|
6955
|
-
head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
6956
|
-
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
6957
|
-
hint: 'text-xs mr-4 bg-white px-1',
|
|
6958
|
-
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',
|
|
6959
|
-
description: 'hidden',
|
|
6960
|
-
};
|
|
6961
|
-
var pill$3 = {
|
|
6962
|
-
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
6963
|
-
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
6964
|
-
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',
|
|
6965
|
-
trailing: 'pr-2',
|
|
6966
|
-
description: 'text-xs',
|
|
6967
|
-
};
|
|
6968
|
-
var floored$3 = {
|
|
6969
|
-
body: 'relative mt-2',
|
|
6970
|
-
label: 'block text-sm font-medium leading-6 text-gray-900',
|
|
6971
|
-
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',
|
|
6972
|
-
description: 'text-xs mt-2',
|
|
6973
|
-
};
|
|
6974
|
-
var invalid$3 = {
|
|
6975
|
-
container: '!ring-red-500',
|
|
6976
|
-
input:
|
|
6977
|
-
// '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',
|
|
6978
|
-
'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',
|
|
6979
|
-
description: 'text-sm text-red-600',
|
|
6980
|
-
};
|
|
6981
|
-
var disabled$5 = {
|
|
6982
|
-
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',
|
|
6983
|
-
};
|
|
6984
|
-
var styles$7 = {
|
|
6985
|
-
base: base$5,
|
|
6986
|
-
leading: leading$3,
|
|
6987
|
-
trailing: trailing$3,
|
|
6988
|
-
normal: normal$3,
|
|
6989
|
-
inset: inset$3,
|
|
6990
|
-
overlapping: overlapping$3,
|
|
6991
|
-
pill: pill$3,
|
|
6992
|
-
floored: floored$3,
|
|
6993
|
-
invalid: invalid$3,
|
|
6994
|
-
disabled: disabled$5,
|
|
6995
|
-
};
|
|
6996
|
-
|
|
6997
7066
|
var CheckboxInputGroupForm = function (props) {
|
|
6998
7067
|
var name = props.name, form = props.form, options = props.options, values = props.values, isDisabled = props.isDisabled, stylesOverrides = props.styles;
|
|
6999
7068
|
var handleGenerateStyle = function () {
|
|
@@ -15223,6 +15292,7 @@ exports.ButtonGroupElement = ButtonGroupElement;
|
|
|
15223
15292
|
exports.CheckboxInput = CheckboxInputForm;
|
|
15224
15293
|
exports.ContainerLayout = ContainerLayout;
|
|
15225
15294
|
exports.DateMenuForm = DateMenuForm;
|
|
15295
|
+
exports.DateRangeMenuForm = DateRangeMenu;
|
|
15226
15296
|
exports.DividerLayout = DividerLayout;
|
|
15227
15297
|
exports.DropdownElement = DropdownElement;
|
|
15228
15298
|
exports.FileInputGroupForm = FileInputGroupForm;
|