@economic/taco 2.2.3 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +5 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +18 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js +1 -2
- package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js.map +1 -1
- package/dist/taco.cjs.development.js +30 -10
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
- package/types.json +1 -1
@@ -15979,6 +15979,10 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
|
|
15979
15979
|
const [internalRef, setInternalRef] = React__default.useState(null);
|
15980
15980
|
React__default.useLayoutEffect(() => {
|
15981
15981
|
if (internalRef && length) {
|
15982
|
+
// the actions column size gets set by the column itself
|
15983
|
+
if (id === COLUMN_ID) {
|
15984
|
+
return;
|
15985
|
+
}
|
15982
15986
|
table.setColumnSizing(sizes => ({
|
15983
15987
|
...sizes,
|
15984
15988
|
[id]: internalRef.getBoundingClientRect().width
|
@@ -16211,6 +16215,21 @@ const MemoedCell = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
|
|
16211
16215
|
const {
|
16212
16216
|
texts
|
16213
16217
|
} = useLocalization();
|
16218
|
+
const ref = React__default.useRef(null);
|
16219
|
+
/*
|
16220
|
+
const size = table.getState().columnSizing[COLUMN_ID];
|
16221
|
+
// the actions column needs to set its size based on its content, not the actual column
|
16222
|
+
// so we do this here instead of in the header
|
16223
|
+
React.useLayoutEffect(() => {
|
16224
|
+
if (ref.current && !size) {
|
16225
|
+
const width = ref.current.getBoundingClientRect().width;
|
16226
|
+
table.setColumnSizing(sizes => ({
|
16227
|
+
...sizes,
|
16228
|
+
[COLUMN_ID]: width,
|
16229
|
+
}));
|
16230
|
+
}
|
16231
|
+
}, [ref.current]);
|
16232
|
+
*/
|
16214
16233
|
let content;
|
16215
16234
|
// We don't want to show actions in edit mode, since we have editing actions,
|
16216
16235
|
// which is shown in edit mode instead.
|
@@ -16219,7 +16238,8 @@ const MemoedCell = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
|
|
16219
16238
|
const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
|
16220
16239
|
const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
|
16221
16240
|
content = /*#__PURE__*/React__default.createElement("span", {
|
16222
|
-
className: "-mb-2 -mt-2 flex justify-end text-right"
|
16241
|
+
className: "-mb-2 -mt-2 flex justify-end pl-2 text-right",
|
16242
|
+
ref: ref
|
16223
16243
|
}, actionsOnRow.map((button, index) => {
|
16224
16244
|
var _ref, _button$props$tooltip;
|
16225
16245
|
const tooltip = String((_ref = (_button$props$tooltip = button.props.tooltip) !== null && _button$props$tooltip !== void 0 ? _button$props$tooltip : button.props['aria-label']) !== null && _ref !== void 0 ? _ref : '');
|
@@ -16268,7 +16288,7 @@ function createRowActionsColumn$1() {
|
|
16268
16288
|
footer: Footer$4,
|
16269
16289
|
meta: {
|
16270
16290
|
align: 'right',
|
16271
|
-
className: cn('
|
16291
|
+
className: cn('!pt-[var(--table3-row-padding)] print:opacity-0 [[role="table"][data-editing="false"]_&]:group-[[data-current="true"]]/row:sticky [[role="table"][data-pause-hover="false"][data-editing="false"]_&]:group-hover/row:sticky right-0 !pl-1 !pr-1', '[[role="table"][data-editing="false"]_&]:group-[[data-current="true"]]/row:shadow-[-6px_0px_6px] [[role="table"][data-pause-hover="false"][data-editing="false"]_&]:group-hover/row:shadow-[-6px_0px_6px]', 'group-[[data-current="true"][data-selected="false"]]/row:text-grey-200', 'group-[[data-selected="true"]]/row:text-blue-100', 'group-[[data-selected="false"]:hover]/row:text-grey-100'),
|
16272
16292
|
enableOrdering: false,
|
16273
16293
|
enableSearch: false,
|
16274
16294
|
enableTruncate: false,
|
@@ -16280,7 +16300,6 @@ function createRowActionsColumn$1() {
|
|
16280
16300
|
};
|
16281
16301
|
}
|
16282
16302
|
|
16283
|
-
const REACT_TABLE_DEFAULT_COLUMN_SIZE_DO_NOT_CHANGE = 150;
|
16284
16303
|
const useCssGrid = table => {
|
16285
16304
|
const allVisibleColumns = table.getVisibleLeafColumns();
|
16286
16305
|
const columnSizing = table.getState().columnSizing;
|
@@ -16294,7 +16313,7 @@ const useCssGrid = table => {
|
|
16294
16313
|
const width = columnSizing[column.id];
|
16295
16314
|
if (isInternalColumn$1(column.id)) {
|
16296
16315
|
if (column.id === COLUMN_ID) {
|
16297
|
-
size =
|
16316
|
+
size = 'minmax(max-content, auto)';
|
16298
16317
|
} else {
|
16299
16318
|
size = `${column.getSize()}px`;
|
16300
16319
|
}
|
@@ -16572,7 +16591,7 @@ function useSettingsStateListener$1(table, onChangeSettings) {
|
|
16572
16591
|
}), 250);
|
16573
16592
|
}
|
16574
16593
|
return () => clearTimeout(handler);
|
16575
|
-
}, [
|
16594
|
+
}, [meta.columnFreezing.frozenColumnIndex, state.columnOrder, state.columnPinning, state.columnSizing, state.columnVisibility, meta.search.excludeUnmatchedResults, meta.fontSize.size, meta.rowHeight.height, meta.printing.printWarningDialogVisibility, state.sorting]);
|
16576
16595
|
}
|
16577
16596
|
|
16578
16597
|
var Table3FilterComparator;
|
@@ -17686,7 +17705,7 @@ function createRowSelectionColumn$1(onRowDrag) {
|
|
17686
17705
|
footer: Footer$4,
|
17687
17706
|
meta: {
|
17688
17707
|
align: 'center',
|
17689
|
-
className: '
|
17708
|
+
className: '!pt-[var(--table3-row-padding)] !justify-end !p-0 !pr-0.5',
|
17690
17709
|
enableOrdering: false,
|
17691
17710
|
enableSearch: false,
|
17692
17711
|
enableTruncate: false,
|
@@ -17745,6 +17764,7 @@ const MemoedCell$2 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
|
|
17745
17764
|
title: title
|
17746
17765
|
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
17747
17766
|
appearance: "discrete",
|
17767
|
+
className: "-mt-1.5",
|
17748
17768
|
icon: isExpanded ? 'chevron-down' : 'chevron-right',
|
17749
17769
|
onClick: handleClick,
|
17750
17770
|
tabIndex: tabIndex,
|
@@ -17778,7 +17798,7 @@ function createRowExpansionColumn$1(expandedRowRenderer) {
|
|
17778
17798
|
footer: Footer$4,
|
17779
17799
|
meta: {
|
17780
17800
|
align: 'center',
|
17781
|
-
className: '
|
17801
|
+
className: '!p-0 !pt-[var(--table3-row-padding)]',
|
17782
17802
|
enableOrdering: false,
|
17783
17803
|
enableSearch: false,
|
17784
17804
|
enableTruncate: false,
|
@@ -17840,7 +17860,7 @@ const Cell$6 = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
|
|
17840
17860
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
17841
17861
|
"aria-label": texts.table3.columns.drag.tooltip,
|
17842
17862
|
name: "drag",
|
17843
|
-
className: "text-grey-darkest invisible w-[20px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white"
|
17863
|
+
className: "text-grey-darkest invisible -mt-1 w-[20px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white"
|
17844
17864
|
})));
|
17845
17865
|
});
|
17846
17866
|
function createRowDragColumn(onRowDrag) {
|
@@ -17854,7 +17874,7 @@ function createRowDragColumn(onRowDrag) {
|
|
17854
17874
|
footer: Footer$4,
|
17855
17875
|
meta: {
|
17856
17876
|
align: 'center',
|
17857
|
-
className: '
|
17877
|
+
className: '!p-0 !pt-[var(--table3-row-padding)]',
|
17858
17878
|
enableOrdering: false,
|
17859
17879
|
enableSearch: false,
|
17860
17880
|
enableTruncate: false,
|
@@ -20616,7 +20636,7 @@ const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function Seco
|
|
20616
20636
|
});
|
20617
20637
|
|
20618
20638
|
const MenuButton = /*#__PURE__*/React__default.forwardRef(function MenuButton(props, ref) {
|
20619
|
-
const className = cn(getButtonClasses$1(false), 'mr-1 !bg-transparent hover:!bg-white/[.08] focus:!bg-white/[.08]] lg:hidden z-[2]');
|
20639
|
+
const className = cn(getButtonClasses$1(false), 'mr-1 !bg-transparent hover:!bg-white/[.08] focus:!bg-white/[.08]] lg:hidden z-[2] !text-white');
|
20620
20640
|
return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, props, {
|
20621
20641
|
className: className,
|
20622
20642
|
"data-taco": "header-toggle-sidebar",
|