@economic/taco 2.38.0 → 2.39.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/OverflowGroup/OverflowGroup.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -0
- package/dist/esm/index.css +5 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +3 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +15 -17
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +7 -2
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +12 -3
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +8 -5
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +3 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +4 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +7 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js +9 -1
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/index.css +5 -1
- package/dist/primitives/Table/types.d.ts +4 -3
- package/dist/taco.cjs.development.js +76 -51
- 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/dist/utils/dom.d.ts +1 -0
- package/package.json +2 -2
@@ -4211,6 +4211,14 @@ function isElementInteractive(element) {
|
|
4211
4211
|
function isElementInsideTable3OrReport(element) {
|
4212
4212
|
return !!(element !== null && element !== void 0 && element.closest('[data-taco^=table]'));
|
4213
4213
|
}
|
4214
|
+
function setDataFocusAttribute(target) {
|
4215
|
+
target.setAttribute('data-focus', 'programmatic');
|
4216
|
+
const cleanup = () => {
|
4217
|
+
target.removeAttribute('data-focus');
|
4218
|
+
target.removeEventListener('blur', cleanup);
|
4219
|
+
};
|
4220
|
+
target.addEventListener('blur', cleanup);
|
4221
|
+
}
|
4214
4222
|
|
4215
4223
|
function isPressingMetaKey(event) {
|
4216
4224
|
return isMacOs() ? event.metaKey : event.ctrlKey;
|
@@ -8966,7 +8974,9 @@ const OverflowGroup = /*#__PURE__*/React__default.forwardRef(function OverflowGr
|
|
8966
8974
|
})), hiddenChildren.length ? /*#__PURE__*/React__default.cloneElement(MoreButton, {
|
8967
8975
|
className: cn('sticky right-0 order-[99]', MoreButton.props.className),
|
8968
8976
|
'data-observer-ignore': true,
|
8969
|
-
menu: menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, hiddenChildren.map(
|
8977
|
+
menu: menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, hiddenChildren.map((child, index) => props.wrapChild ? ( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
|
8978
|
+
key: index
|
8979
|
+
}, child)) : sanitizeButtonPropsForMenuItem(child, index))))),
|
8970
8980
|
ref: buttonRefCallback
|
8971
8981
|
}) : null);
|
8972
8982
|
});
|
@@ -10220,6 +10230,9 @@ function mapTableChildrenToColumns(props, settings, options, internalColumns) {
|
|
10220
10230
|
function configureReactTableOptions(options, props) {
|
10221
10231
|
var _options$enableFilter, _options$enableColumn, _options$enableRowExp, _options$enableColumn2, _options$enableColumn3, _options$enableSortin;
|
10222
10232
|
const enableRowSelection = options.enableRowSelection || options.enableRowSelectionSingle;
|
10233
|
+
// We don't want to expose internal Tanstack Table row, so we need to wrap enableRowSelection callback into additional function,
|
10234
|
+
// which receives the React Table Row object and passes row.original to a callback.
|
10235
|
+
const reactTableEnableRowSelection = typeof enableRowSelection === 'function' ? row => enableRowSelection(row.original) : enableRowSelection;
|
10223
10236
|
const tableOptions = {
|
10224
10237
|
defaultColumn: {
|
10225
10238
|
enableColumnFilter: options.enableFiltering || true,
|
@@ -10238,8 +10251,8 @@ function configureReactTableOptions(options, props) {
|
|
10238
10251
|
enableGrouping: true,
|
10239
10252
|
enableHiding: (_options$enableColumn2 = options.enableColumnHiding) !== null && _options$enableColumn2 !== void 0 ? _options$enableColumn2 : false,
|
10240
10253
|
enablePinning: (_options$enableColumn3 = options.enableColumnFreezing) !== null && _options$enableColumn3 !== void 0 ? _options$enableColumn3 : false,
|
10241
|
-
enableRowSelection:
|
10242
|
-
enableMultiRowSelection: options.enableRowSelectionSingle
|
10254
|
+
enableRowSelection: reactTableEnableRowSelection !== null && reactTableEnableRowSelection !== void 0 ? reactTableEnableRowSelection : false,
|
10255
|
+
enableMultiRowSelection: !options.enableRowSelectionSingle && reactTableEnableRowSelection,
|
10243
10256
|
enableSorting: (_options$enableSortin = options.enableSorting) !== null && _options$enableSortin !== void 0 ? _options$enableSortin : false,
|
10244
10257
|
// models for default features
|
10245
10258
|
getExpandedRowModel: reactTable.getExpandedRowModel(),
|
@@ -10439,8 +10452,8 @@ function getTableFeaturePreset(props) {
|
|
10439
10452
|
enableColumnHiding: (_props$enableColumnHi = props.enableColumnHiding) !== null && _props$enableColumnHi !== void 0 ? _props$enableColumnHi : presetOptions.enableColumnHiding,
|
10440
10453
|
enableColumnResizing: (_props$enableColumnRe = props.enableColumnResizing) !== null && _props$enableColumnRe !== void 0 ? _props$enableColumnRe : presetOptions.enableColumnResizing,
|
10441
10454
|
enableRowExpansion: enableRowExpansion && !!props.rowExpansionRenderer,
|
10442
|
-
enableRowSelection:
|
10443
|
-
enableRowSelectionSingle:
|
10455
|
+
enableRowSelection: !!props.onRowSelect && enableRowSelection,
|
10456
|
+
enableRowSelectionSingle: !!props.onRowSelect && enableRowSelectionSingle,
|
10444
10457
|
// custom -- common between all table types
|
10445
10458
|
enableColumnOrdering: (_props$enableColumnOr = props.enableColumnOrdering) !== null && _props$enableColumnOr !== void 0 ? _props$enableColumnOr : presetOptions.enableColumnOrdering,
|
10446
10459
|
enableFontSize: (_props$enableFontSize = props.enableFontSize) !== null && _props$enableFontSize !== void 0 ? _props$enableFontSize : presetOptions.enableFontSize,
|
@@ -10737,11 +10750,12 @@ function useTableRowSelection(isEnabled = false) {
|
|
10737
10750
|
const rows = table.getRowModel().rows;
|
10738
10751
|
const tableMeta = table.options.meta;
|
10739
10752
|
if (event.key === ' ') {
|
10753
|
+
var _rows$rowActiveIndex;
|
10740
10754
|
event.preventDefault();
|
10741
10755
|
const rowActiveIndex = tableMeta.rowActive.rowActiveIndex;
|
10742
|
-
if (rowActiveIndex !== undefined) {
|
10743
|
-
var _rows$
|
10744
|
-
(_rows$
|
10756
|
+
if (rowActiveIndex !== undefined && (_rows$rowActiveIndex = rows[rowActiveIndex]) !== null && _rows$rowActiveIndex !== void 0 && _rows$rowActiveIndex.getCanSelect()) {
|
10757
|
+
var _rows$rowActiveIndex2;
|
10758
|
+
(_rows$rowActiveIndex2 = rows[rowActiveIndex]) === null || _rows$rowActiveIndex2 === void 0 ? void 0 : _rows$rowActiveIndex2.toggleSelected();
|
10745
10759
|
}
|
10746
10760
|
return;
|
10747
10761
|
} else if ((event.ctrlKey || event.metaKey) && event.key === 'a') {
|
@@ -11357,22 +11371,22 @@ function useTableRowHeightListener(table) {
|
|
11357
11371
|
}
|
11358
11372
|
|
11359
11373
|
function useTableRowSelectionListener(table, onRowSelect) {
|
11360
|
-
const
|
11374
|
+
const rows = table.getSelectedRowModel().flatRows;
|
11375
|
+
const rowSelection = React__default.useMemo(() => rows.map(row => row.original), [rows]);
|
11361
11376
|
useLazyEffect(() => {
|
11362
|
-
const selectedRows = table.getSelectedRowModel().rows;
|
11363
11377
|
if (table.options.enableRowSelection && typeof onRowSelect === 'function') {
|
11364
11378
|
if (table.options.enableMultiRowSelection) {
|
11365
|
-
onRowSelect(
|
11379
|
+
onRowSelect(rowSelection);
|
11366
11380
|
} else {
|
11367
|
-
var _ref
|
11368
|
-
onRowSelect((_ref = [
|
11381
|
+
var _ref;
|
11382
|
+
onRowSelect((_ref = [rowSelection[0]]) !== null && _ref !== void 0 ? _ref : []);
|
11369
11383
|
}
|
11370
11384
|
}
|
11371
11385
|
// It is important to stringify either rowSelection state or selectedRows, because we don't
|
11372
11386
|
// know if the array or object that is returned by react-table has the same reference or not.
|
11373
11387
|
// rowSelection state is used here because it will be more expensive to strigify selectedRows
|
11374
11388
|
// than rowSelection state.
|
11375
|
-
}, [table.options.enableRowSelection, table.options.enableMultiRowSelection,
|
11389
|
+
}, [table.options.enableRowSelection, table.options.enableMultiRowSelection, rowSelection]);
|
11376
11390
|
}
|
11377
11391
|
|
11378
11392
|
function resetHighlightedColumnIndexes(value, table) {
|
@@ -11571,7 +11585,7 @@ function useTableManager(props, meta, internalColumns) {
|
|
11571
11585
|
const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);
|
11572
11586
|
const rowGroups = useTableRowGroups(props.rowActionsForGroup);
|
11573
11587
|
const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);
|
11574
|
-
const rowSelection = useTableRowSelection(options.enableRowSelection);
|
11588
|
+
const rowSelection = useTableRowSelection(!!options.enableRowSelection);
|
11575
11589
|
const search = useTableSearch(options.enableSearch, settings.excludeUnmatchedRecordsInSearch);
|
11576
11590
|
const server = useTableServerLoading(props.loadPage, props.loadAll, props.pageSize);
|
11577
11591
|
// TODO: memoise
|
@@ -11978,7 +11992,7 @@ function Row(props) {
|
|
11978
11992
|
}
|
11979
11993
|
|
11980
11994
|
function useTableRenderer(renderers, table, tableRef, defaultRowActiveIndex) {
|
11981
|
-
var _table$getState$group,
|
11995
|
+
var _table$getState$group, _virtualItems$padding, _virtualItems$padding2, _virtualItems$padding3, _ref, _virtualItems;
|
11982
11996
|
const tableMeta = table.options.meta;
|
11983
11997
|
const rows = table.getRowModel().rows;
|
11984
11998
|
const isTableRowGrouped = !!((_table$getState$group = table.getState().grouping) !== null && _table$getState$group !== void 0 && _table$getState$group.length);
|
@@ -12000,8 +12014,6 @@ function useTableRenderer(renderers, table, tableRef, defaultRowActiveIndex) {
|
|
12000
12014
|
getScrollElement: () => tableRef.current,
|
12001
12015
|
overscan: tableMeta.printing.isPrinting ? rows.length : undefined,
|
12002
12016
|
rangeExtractor,
|
12003
|
-
// correctly sets top and bottom spacing for the scroll container - very sensitive, don't change
|
12004
|
-
scrollMargin: isTableRowGrouped ? 0 : scrollPaddingStart,
|
12005
12017
|
// correctly sets the scroll padding offset, e.g. when keyboard navigating rows in the list
|
12006
12018
|
scrollPaddingStart,
|
12007
12019
|
scrollPaddingEnd: tableMeta.footer.isEnabled ? scrollPaddingEnd * 2 : scrollPaddingEnd
|
@@ -12029,8 +12041,9 @@ function useTableRenderer(renderers, table, tableRef, defaultRowActiveIndex) {
|
|
12029
12041
|
}, [virtualItems.length, tableRef.current, totalSize, rows.length]);
|
12030
12042
|
// use row 1 not 0, because 0 might be sticky in grouped tables and it's start value will always be 0
|
12031
12043
|
const paddingStartIndex = isTableRowGrouped && rows.length > 1 ? 1 : 0;
|
12044
|
+
const startValue = isTableRowGrouped ? ((_virtualItems$padding = virtualItems[paddingStartIndex]) === null || _virtualItems$padding === void 0 ? void 0 : _virtualItems$padding.start) - ((_virtualItems$padding2 = virtualItems[paddingStartIndex]) === null || _virtualItems$padding2 === void 0 ? void 0 : _virtualItems$padding2.size) : (_virtualItems$padding3 = virtualItems[paddingStartIndex]) === null || _virtualItems$padding3 === void 0 ? void 0 : _virtualItems$padding3.start;
|
12032
12045
|
// styling for offsetting rows - this "is" the virtualisation
|
12033
|
-
const [paddingTop, paddingBottom] = virtualItems.length > 0 ? [Math.max(0,
|
12046
|
+
const [paddingTop, paddingBottom] = virtualItems.length > 0 ? [Math.max(0, startValue !== null && startValue !== void 0 ? startValue : 0), Math.max(0, (_ref = totalSize - ((_virtualItems = virtualItems[virtualItems.length - 1]) === null || _virtualItems === void 0 ? void 0 : _virtualItems.end)) !== null && _ref !== void 0 ? _ref : 0)] : [0, 0];
|
12034
12047
|
// ensure default active rows are scrolled to
|
12035
12048
|
React__default.useEffect(() => {
|
12036
12049
|
if (defaultRowActiveIndex) {
|
@@ -12260,7 +12273,7 @@ function Cell$1(context) {
|
|
12260
12273
|
const onDragStart = event => {
|
12261
12274
|
var _tableMeta$rowDrag$se, _tableMeta$rowDrag, _tableMeta$rowDrag$ha, _tableMeta$rowDrag2;
|
12262
12275
|
let rows = [row];
|
12263
|
-
if (
|
12276
|
+
if (row.getCanSelect()) {
|
12264
12277
|
rows = row.getIsSelected() ? table.getSelectedRowModel().rows : [row, ...table.getSelectedRowModel().rows];
|
12265
12278
|
}
|
12266
12279
|
const data = rows.map(row => row.original);
|
@@ -12409,9 +12422,8 @@ function Header$4(context) {
|
|
12409
12422
|
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
12410
12423
|
"aria-label": title,
|
12411
12424
|
className: "hover:border-blue !-mt-px",
|
12412
|
-
key: String(`${isAllRowsSelected}_${isSomeRowsSelected}`),
|
12413
12425
|
checked: isAllRowsSelected,
|
12414
|
-
indeterminate: isSomeRowsSelected,
|
12426
|
+
indeterminate: isSomeRowsSelected && !isAllRowsSelected,
|
12415
12427
|
loading: tableMeta.server.loadAllStatus === exports.TableServerLoadAllState.Loading,
|
12416
12428
|
onChange: handleChange
|
12417
12429
|
}));
|
@@ -12440,6 +12452,7 @@ function Cell$3(context) {
|
|
12440
12452
|
return null;
|
12441
12453
|
}
|
12442
12454
|
const isSelected = row.getIsGrouped() ? row.getIsAllSubRowsSelected() : row.getIsSelected();
|
12455
|
+
const canSelect = row.getCanSelect();
|
12443
12456
|
const title = isSelected ? texts.table.columns.select.deselect : texts.table.columns.select.select;
|
12444
12457
|
if (table.options.enableMultiRowSelection) {
|
12445
12458
|
const handleClick = function (event) {
|
@@ -12458,7 +12471,7 @@ function Cell$3(context) {
|
|
12458
12471
|
function _temp4() {
|
12459
12472
|
table.setRowSelection(currentRowSelection => ({
|
12460
12473
|
...currentRowSelection,
|
12461
|
-
...selectedRows.reduce((state, row) => ({
|
12474
|
+
...selectedRows.filter(row => row.getCanSelect()).reduce((state, row) => ({
|
12462
12475
|
...state,
|
12463
12476
|
[row.id]: true
|
12464
12477
|
}), {})
|
@@ -12486,6 +12499,7 @@ function Cell$3(context) {
|
|
12486
12499
|
}
|
12487
12500
|
};
|
12488
12501
|
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
12502
|
+
hidden: !canSelect,
|
12489
12503
|
title: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, title, /*#__PURE__*/React__default.createElement(Shortcut, {
|
12490
12504
|
className: "ml-2",
|
12491
12505
|
keys: "Space"
|
@@ -12495,11 +12509,12 @@ function Cell$3(context) {
|
|
12495
12509
|
className: "!mt-0",
|
12496
12510
|
checked: isSelected,
|
12497
12511
|
onClick: handleClick,
|
12512
|
+
disabled: !canSelect,
|
12498
12513
|
// this is necessary to remove console spam from eslint
|
12499
12514
|
onChange: () => false
|
12500
12515
|
}));
|
12501
12516
|
} else {
|
12502
|
-
const className = cn('!mt-0', getRadioClassnames());
|
12517
|
+
const className = cn('!mt-0', getRadioClassnames(!canSelect));
|
12503
12518
|
const handleClick = event => {
|
12504
12519
|
event.stopPropagation();
|
12505
12520
|
row.toggleSelected();
|
@@ -12507,7 +12522,8 @@ function Cell$3(context) {
|
|
12507
12522
|
};
|
12508
12523
|
return /*#__PURE__*/React__default.createElement("button", {
|
12509
12524
|
className: className,
|
12510
|
-
"aria-checked": isSelected,
|
12525
|
+
"aria-checked": canSelect && isSelected,
|
12526
|
+
disabled: !canSelect,
|
12511
12527
|
onClick: handleClick,
|
12512
12528
|
role: "radio",
|
12513
12529
|
type: "button"
|
@@ -12778,7 +12794,7 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
|
|
12778
12794
|
attributes['data-row-group'] = row.getIsGrouped() ? true : undefined;
|
12779
12795
|
}
|
12780
12796
|
// row selection
|
12781
|
-
if (
|
12797
|
+
if (row.getCanSelect()) {
|
12782
12798
|
attributes['data-row-selected'] = row.getIsSelected() || row.getIsAllSubRowsSelected() ? true : undefined;
|
12783
12799
|
}
|
12784
12800
|
// row expansion
|
@@ -15073,7 +15089,7 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
15073
15089
|
}, output));
|
15074
15090
|
});
|
15075
15091
|
const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerMultiple(props, ref) {
|
15076
|
-
var _buttonRef$
|
15092
|
+
var _buttonRef$current2;
|
15077
15093
|
const {
|
15078
15094
|
children,
|
15079
15095
|
emptyValue: _,
|
@@ -15090,6 +15106,11 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15090
15106
|
} = useSelect2Context();
|
15091
15107
|
const buttonRef = useMergedRef(ref);
|
15092
15108
|
const valuesAsChildren = values.map(value => children.find(c => c.props.value === value)).filter(c => !!c);
|
15109
|
+
const forwardClick = event => {
|
15110
|
+
var _buttonRef$current;
|
15111
|
+
event.preventDefault();
|
15112
|
+
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.click();
|
15113
|
+
};
|
15093
15114
|
let content;
|
15094
15115
|
let {
|
15095
15116
|
className
|
@@ -15097,7 +15118,8 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15097
15118
|
if (open) {
|
15098
15119
|
className = cn('!absolute z-20 !h-fit', buttonProps.className);
|
15099
15120
|
content = /*#__PURE__*/React__default.createElement(ScrollArea, {
|
15100
|
-
className: "my-1 flex max-h-[5.5rem] flex-col"
|
15121
|
+
className: "my-1 flex max-h-[5.5rem] flex-col",
|
15122
|
+
onClick: forwardClick
|
15101
15123
|
}, /*#__PURE__*/React__default.createElement("div", {
|
15102
15124
|
className: "flex flex-wrap gap-1"
|
15103
15125
|
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(Placeholder, {
|
@@ -15120,7 +15142,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15120
15142
|
}, child.props.children)))));
|
15121
15143
|
} else {
|
15122
15144
|
content = /*#__PURE__*/React__default.createElement(MultipleValue, {
|
15123
|
-
|
15145
|
+
onClick: forwardClick,
|
15124
15146
|
valuesAsChildren: valuesAsChildren,
|
15125
15147
|
placeholder: placeholder
|
15126
15148
|
});
|
@@ -15129,7 +15151,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15129
15151
|
className: "relative inline-flex h-fit flex-grow",
|
15130
15152
|
"data-taco": "select2-container",
|
15131
15153
|
style: {
|
15132
|
-
width: open ? (_buttonRef$
|
15154
|
+
width: open ? (_buttonRef$current2 = buttonRef.current) === null || _buttonRef$current2 === void 0 ? void 0 : _buttonRef$current2.offsetWidth : undefined
|
15133
15155
|
}
|
15134
15156
|
}, /*#__PURE__*/React__default.createElement(Button$3, Object.assign({}, buttonProps, {
|
15135
15157
|
className: className,
|
@@ -15137,30 +15159,23 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15137
15159
|
}), content));
|
15138
15160
|
});
|
15139
15161
|
const MultipleValue = ({
|
15162
|
+
onClick,
|
15140
15163
|
valuesAsChildren,
|
15141
15164
|
placeholder
|
15142
15165
|
}) => {
|
15143
15166
|
const {
|
15144
15167
|
disabled,
|
15145
|
-
open,
|
15146
15168
|
readOnly,
|
15147
|
-
setValue,
|
15148
15169
|
tags
|
15149
15170
|
} = useSelect2Context();
|
15150
15171
|
const [contentRef, setContentRef] = React__default.useState(null);
|
15151
15172
|
const boundaryIndex = contentRef ? getIndexOfFirstChildOverflowingParent(contentRef, 30) : undefined;
|
15152
|
-
const createClickHandler = tagValue => event => {
|
15153
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
15154
|
-
event === null || event === void 0 ? void 0 : event.preventDefault();
|
15155
|
-
if (!disabled && !readOnly) {
|
15156
|
-
setValue(tagValue);
|
15157
|
-
}
|
15158
|
-
};
|
15159
15173
|
return /*#__PURE__*/React__default.createElement("div", {
|
15160
|
-
className: "relative flex items-center gap-1 overflow-hidden"
|
15174
|
+
className: "relative flex w-full items-center gap-1 overflow-hidden",
|
15175
|
+
onClick: onClick
|
15161
15176
|
}, /*#__PURE__*/React__default.createElement("div", {
|
15162
|
-
className: "flex gap-1 truncate",
|
15163
|
-
ref:
|
15177
|
+
className: "flex flex-1 gap-1 truncate",
|
15178
|
+
ref: ref => setContentRef(ref)
|
15164
15179
|
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(Placeholder, {
|
15165
15180
|
disabled: disabled,
|
15166
15181
|
readOnly: readOnly
|
@@ -15174,7 +15189,6 @@ const MultipleValue = ({
|
|
15174
15189
|
color: tags ? child.props.color : undefined,
|
15175
15190
|
disabled: disabled,
|
15176
15191
|
icon: child.props.prefix,
|
15177
|
-
onDelete: open ? createClickHandler(child.props.value) : undefined,
|
15178
15192
|
readOnly: readOnly
|
15179
15193
|
}, child.props.children);
|
15180
15194
|
if (index === boundaryIndex) {
|
@@ -15749,7 +15763,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
15749
15763
|
})), /*#__PURE__*/React__default.createElement("span", null, texts.listbox.loading))) : flattenedChildren.length <= 0 ? ( /*#__PURE__*/React__default.createElement("div", {
|
15750
15764
|
className: "text-grey-700 -mt-0.5 flex h-8 items-center px-2",
|
15751
15765
|
role: "presentation"
|
15752
|
-
},
|
15766
|
+
}, texts.listbox.empty)) : ( /*#__PURE__*/React__default.createElement(Root$1, {
|
15753
15767
|
className: "flex flex-col gap-0.5",
|
15754
15768
|
customSelector: ":scope > button",
|
15755
15769
|
disabled: disabled,
|
@@ -16667,7 +16681,7 @@ function TableGrid(props) {
|
|
16667
16681
|
scrollToIndex: table.renderer.scrollToIndex,
|
16668
16682
|
style: props.children ? {
|
16669
16683
|
...table.renderer.style,
|
16670
|
-
height: table.renderer.style.height +
|
16684
|
+
height: table.renderer.style.height + ROW_HEIGHT_ESTIMATES[table.meta.rowHeight.height]
|
16671
16685
|
} : table.renderer.style
|
16672
16686
|
}, table.renderer.rows, props.children), table.meta.footer.isEnabled ? /*#__PURE__*/React__default.createElement(Foot, {
|
16673
16687
|
table: table.instance
|
@@ -18310,8 +18324,12 @@ function willRowMoveAfterSorting(cell, change, rowIndex) {
|
|
18310
18324
|
function animateCreateRow(id) {
|
18311
18325
|
const templateRow = document.querySelector(`[data-row-id="${id}"]`);
|
18312
18326
|
if (templateRow) {
|
18313
|
-
|
18314
|
-
|
18327
|
+
const firstCell = templateRow.querySelector(':first-child');
|
18328
|
+
const checkbox = firstCell === null || firstCell === void 0 ? void 0 : firstCell.querySelector('[data-taco="checkbox"]');
|
18329
|
+
firstCell === null || firstCell === void 0 ? void 0 : firstCell.focus();
|
18330
|
+
if (checkbox) {
|
18331
|
+
setDataFocusAttribute(checkbox);
|
18332
|
+
}
|
18315
18333
|
templateRow.scrollIntoView();
|
18316
18334
|
const keyframes = [{
|
18317
18335
|
background: '#b2c7ef'
|
@@ -19335,7 +19353,7 @@ function Row$2(props) {
|
|
19335
19353
|
const isActiveRow = tableMeta.rowActive.rowActiveIndex === index;
|
19336
19354
|
React__default.useEffect(() => {
|
19337
19355
|
if (tableMeta.editing.isEditing && isActiveRow && tableMeta.editing.lastFocusedCellIndex === undefined) {
|
19338
|
-
focusManager.focusFirst();
|
19356
|
+
setDataFocusAttribute(focusManager.focusFirst());
|
19339
19357
|
}
|
19340
19358
|
}, [tableMeta.editing.isEditing, tableMeta.rowActive.rowActiveIndex, tableMeta.editing.lastFocusedCellIndex]);
|
19341
19359
|
const handleFocus = React__default.useCallback(event => {
|
@@ -19717,11 +19735,18 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
|
|
19717
19735
|
}), children);
|
19718
19736
|
});
|
19719
19737
|
const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
19720
|
-
const
|
19738
|
+
const {
|
19739
|
+
children
|
19740
|
+
} = props;
|
19741
|
+
const className = cn('border-grey-300 flex flex-row m-0 mb-4 print:hidden', 'aria-orientation-horizontal:border-b', 'aria-orientation-vertical:border-r aria-orientation-vertical:m-0 aria-orientation-vertical:mr-4 aria-orientation-vertical:flex-col', props.className);
|
19721
19742
|
return /*#__PURE__*/React.createElement(TabsPrimitive.List, Object.assign({}, props, {
|
19722
19743
|
className: className,
|
19723
19744
|
ref: ref
|
19724
|
-
})
|
19745
|
+
}), /*#__PURE__*/React.createElement(OverflowGroup, {
|
19746
|
+
wrapChild: true,
|
19747
|
+
className: "w-full",
|
19748
|
+
moreButton: text => /*#__PURE__*/React.createElement(Button$1, null, text)
|
19749
|
+
}, children));
|
19725
19750
|
});
|
19726
19751
|
const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
19727
19752
|
const {
|
@@ -19731,7 +19756,7 @@ const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
19731
19756
|
tooltip,
|
19732
19757
|
...otherProps
|
19733
19758
|
} = props;
|
19734
|
-
const triggerClassName = cn('group relative p-0.5 outline-none disabled:cursor-not-allowed disabled:text-black/50',
|
19759
|
+
const triggerClassName = cn(props.className, 'group relative p-0.5 outline-none disabled:cursor-not-allowed disabled:text-black/50',
|
19735
19760
|
// horizontal
|
19736
19761
|
'[[aria-orientation="horizontal"]_&]:pb-1',
|
19737
19762
|
// horizontal
|