@economic/taco 3.0.2-row-active-search.0 → 3.0.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/taco.cjs CHANGED
@@ -811,6 +811,16 @@ function IconClamp(props, svgRef) {
811
811
  ));
812
812
  }
813
813
  const Clamp = React__namespace.forwardRef(IconClamp);
814
+ function IconClickToPay(props, svgRef) {
815
+ return /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ref: svgRef, ...props }, /* @__PURE__ */ React__namespace.createElement(
816
+ "path",
817
+ {
818
+ d: "M23.804 11.52l-5.752-6.676a.692.692 0 00-1.282.357c0 .2.086.38.224.506l5.209 6.275-5.152 6.157h-2.225l4.869-5.629.009-.01a.7.7 0 00.192-.491.7.7 0 00-.192-.492l-.01-.01-5.813-6.651-.004-.005a.692.692 0 00-.595-.337H9.2a.689.689 0 00-.691.687c0 .115.015.235.079.32l5.411 6.512-4.611 5.497c-.028.028-.425.59-1.124.59H2.757c-.75 0-1.37-.58-1.37-1.353v-9.53c0-.671.62-1.361 1.386-1.361H6.2c.403 0 .691-.274.691-.676s-.286-.7-.69-.7l-3.461.013C1.101 4.514 0 5.858 0 7.223v9.544c0 1.471 1.304 2.723 2.74 2.723h5.506c.277 0 .532-.04.76-.105l.096-.029a2.966 2.966 0 001.306-.853l5.19-6.01c.245-.277.278-.677.004-.977l-.008-.01-4.91-5.63h2.266l5.13 6.13-5.399 6.472s.001.007.01.016a.685.685 0 00.611 1.006h4.084a.69.69 0 00.594-.337s.002-.003.005-.004l5.813-6.65.009-.01c.274-.3.241-.7-.005-.977",
819
+ fill: "currentColor"
820
+ }
821
+ ));
822
+ }
823
+ const ClickToPay = React__namespace.forwardRef(IconClickToPay);
814
824
  function IconClose(props, svgRef) {
815
825
  return /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ref: svgRef, ...props }, /* @__PURE__ */ React__namespace.createElement(
816
826
  "path",
@@ -3065,6 +3075,7 @@ const icons = {
3065
3075
  "circle-warning": CircleWarning,
3066
3076
  "clamp-open": ClampOpen,
3067
3077
  clamp: Clamp,
3078
+ "click-to-pay": ClickToPay,
3068
3079
  close: Close$3,
3069
3080
  "column-freeze": ColumnFreeze,
3070
3081
  "column-unfreeze": ColumnUnfreeze,
@@ -44944,11 +44955,6 @@ function getCellWidthPadding(fontSize) {
44944
44955
  return "16px";
44945
44956
  }
44946
44957
  }
44947
- function getReachableRowCount(table) {
44948
- const tableMeta = table.options.meta;
44949
- const isFilteringActive = table.options.enableGlobalFilter && table.getState().globalFilter;
44950
- return isFilteringActive ? table.getRowModel().rows.length + table.getBottomRows().length : tableMeta.length + table.getBottomRows().length;
44951
- }
44952
44958
  function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts = false) {
44953
44959
  const tableMeta = table.options.meta;
44954
44960
  const rows = table.getRowModel().rows;
@@ -44961,7 +44967,7 @@ function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts
44961
44967
  if (isElementInsideExternalRelatedOverlay(trigger, tableRef)) {
44962
44968
  return;
44963
44969
  }
44964
- const reachableRows = getReachableRowCount(table);
44970
+ const reachableRows = tableMeta.length + table.getBottomRows().length;
44965
44971
  tableMeta.rowActive.handleKeyDown(event, reachableRows, scrollToIndex);
44966
44972
  tableMeta.rowSelection.handleKeyDown(event, table);
44967
44973
  if (tableMeta.rowActive.rowActiveIndex !== void 0) {
@@ -47156,7 +47162,7 @@ function Body(props) {
47156
47162
  }
47157
47163
  if (tableMeta.rowActive.rowActiveIndex !== void 0) {
47158
47164
  const isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;
47159
- const reachableRows = getReachableRowCount(table);
47165
+ const reachableRows = tableMeta.length + table.getBottomRows().length;
47160
47166
  const isLastRow = tableMeta.rowActive.rowActiveIndex === reachableRows - 1;
47161
47167
  if (event.key === "Tab" || enableHorizontalArrowKeyNavigation && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
47162
47168
  if (event.key === "Tab" && !hasFocusableElement(event.target.closest("tr[data-row-id]"))) {