@economic/taco 3.0.1 → 3.0.2-row-active-search.0
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 +9 -4
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +9 -4
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.js
CHANGED
|
@@ -23927,7 +23927,7 @@ const Card = React.forwardRef(function Card2(props, ref) {
|
|
|
23927
23927
|
const { title, menu, children, className, ...otherProps } = props;
|
|
23928
23928
|
const localization = useLocalization();
|
|
23929
23929
|
const cardClassName = clsx(
|
|
23930
|
-
"bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300
|
|
23930
|
+
"bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300",
|
|
23931
23931
|
className
|
|
23932
23932
|
);
|
|
23933
23933
|
return /* @__PURE__ */ React.createElement("div", { ...otherProps, className: cardClassName, "data-taco": "card", ref }, /* @__PURE__ */ React.createElement("div", { className: "flex justify-between px-4 pb-2 pt-4" }, title && /* @__PURE__ */ React.createElement(Truncate, { tooltip: title }, /* @__PURE__ */ React.createElement("h4", { className: "mb-0 flex-grow truncate text-left" }, title)), menu ? /* @__PURE__ */ React.createElement(
|
|
@@ -44926,6 +44926,11 @@ function getCellWidthPadding(fontSize) {
|
|
|
44926
44926
|
return "16px";
|
|
44927
44927
|
}
|
|
44928
44928
|
}
|
|
44929
|
+
function getReachableRowCount(table) {
|
|
44930
|
+
const tableMeta = table.options.meta;
|
|
44931
|
+
const isFilteringActive = table.options.enableGlobalFilter && table.getState().globalFilter;
|
|
44932
|
+
return isFilteringActive ? table.getRowModel().rows.length + table.getBottomRows().length : tableMeta.length + table.getBottomRows().length;
|
|
44933
|
+
}
|
|
44929
44934
|
function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts = false) {
|
|
44930
44935
|
const tableMeta = table.options.meta;
|
|
44931
44936
|
const rows = table.getRowModel().rows;
|
|
@@ -44938,7 +44943,7 @@ function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts
|
|
|
44938
44943
|
if (isElementInsideExternalRelatedOverlay(trigger, tableRef)) {
|
|
44939
44944
|
return;
|
|
44940
44945
|
}
|
|
44941
|
-
const reachableRows =
|
|
44946
|
+
const reachableRows = getReachableRowCount(table);
|
|
44942
44947
|
tableMeta.rowActive.handleKeyDown(event, reachableRows, scrollToIndex);
|
|
44943
44948
|
tableMeta.rowSelection.handleKeyDown(event, table);
|
|
44944
44949
|
if (tableMeta.rowActive.rowActiveIndex !== void 0) {
|
|
@@ -47133,7 +47138,7 @@ function Body(props) {
|
|
|
47133
47138
|
}
|
|
47134
47139
|
if (tableMeta.rowActive.rowActiveIndex !== void 0) {
|
|
47135
47140
|
const isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;
|
|
47136
|
-
const reachableRows =
|
|
47141
|
+
const reachableRows = getReachableRowCount(table);
|
|
47137
47142
|
const isLastRow = tableMeta.rowActive.rowActiveIndex === reachableRows - 1;
|
|
47138
47143
|
if (event.key === "Tab" || enableHorizontalArrowKeyNavigation && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
|
47139
47144
|
if (event.key === "Tab" && !hasFocusableElement(event.target.closest("tr[data-row-id]"))) {
|
|
@@ -96722,7 +96727,7 @@ const getLinkClasses = (icon = void 0) => clsx(
|
|
|
96722
96727
|
"flex h-8 flex-shrink-0 flex-grow-0 cursor-pointer items-center justify-center ",
|
|
96723
96728
|
"focus:!shadow-none focus:!outline-none focus-visible:!yt-focus-dark",
|
|
96724
96729
|
"bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]",
|
|
96725
|
-
"text-white hover:text-white focus:text-white",
|
|
96730
|
+
"!text-white hover:text-white focus:text-white",
|
|
96726
96731
|
{
|
|
96727
96732
|
"!rounded-full !h-9 !w-9": icon,
|
|
96728
96733
|
"whitespace-nowrap px-3 rounded text-sm hidden lg:flex": !icon
|