@economic/taco 2.38.0 → 2.39.1

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