@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.cjs
CHANGED
|
@@ -23945,7 +23945,7 @@ const Card = React__namespace.forwardRef(function Card2(props, ref) {
|
|
|
23945
23945
|
const { title, menu, children, className, ...otherProps } = props;
|
|
23946
23946
|
const localization = useLocalization();
|
|
23947
23947
|
const cardClassName = clsx(
|
|
23948
|
-
"bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300
|
|
23948
|
+
"bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300",
|
|
23949
23949
|
className
|
|
23950
23950
|
);
|
|
23951
23951
|
return /* @__PURE__ */ React__namespace.createElement("div", { ...otherProps, className: cardClassName, "data-taco": "card", ref }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex justify-between px-4 pb-2 pt-4" }, title && /* @__PURE__ */ React__namespace.createElement(Truncate, { tooltip: title }, /* @__PURE__ */ React__namespace.createElement("h4", { className: "mb-0 flex-grow truncate text-left" }, title)), menu ? /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -44944,6 +44944,11 @@ function getCellWidthPadding(fontSize) {
|
|
|
44944
44944
|
return "16px";
|
|
44945
44945
|
}
|
|
44946
44946
|
}
|
|
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
|
+
}
|
|
44947
44952
|
function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts = false) {
|
|
44948
44953
|
const tableMeta = table.options.meta;
|
|
44949
44954
|
const rows = table.getRowModel().rows;
|
|
@@ -44956,7 +44961,7 @@ function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts
|
|
|
44956
44961
|
if (isElementInsideExternalRelatedOverlay(trigger, tableRef)) {
|
|
44957
44962
|
return;
|
|
44958
44963
|
}
|
|
44959
|
-
const reachableRows =
|
|
44964
|
+
const reachableRows = getReachableRowCount(table);
|
|
44960
44965
|
tableMeta.rowActive.handleKeyDown(event, reachableRows, scrollToIndex);
|
|
44961
44966
|
tableMeta.rowSelection.handleKeyDown(event, table);
|
|
44962
44967
|
if (tableMeta.rowActive.rowActiveIndex !== void 0) {
|
|
@@ -47151,7 +47156,7 @@ function Body(props) {
|
|
|
47151
47156
|
}
|
|
47152
47157
|
if (tableMeta.rowActive.rowActiveIndex !== void 0) {
|
|
47153
47158
|
const isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;
|
|
47154
|
-
const reachableRows =
|
|
47159
|
+
const reachableRows = getReachableRowCount(table);
|
|
47155
47160
|
const isLastRow = tableMeta.rowActive.rowActiveIndex === reachableRows - 1;
|
|
47156
47161
|
if (event.key === "Tab" || enableHorizontalArrowKeyNavigation && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
|
47157
47162
|
if (event.key === "Tab" && !hasFocusableElement(event.target.closest("tr[data-row-id]"))) {
|
|
@@ -96740,7 +96745,7 @@ const getLinkClasses = (icon = void 0) => clsx(
|
|
|
96740
96745
|
"flex h-8 flex-shrink-0 flex-grow-0 cursor-pointer items-center justify-center ",
|
|
96741
96746
|
"focus:!shadow-none focus:!outline-none focus-visible:!yt-focus-dark",
|
|
96742
96747
|
"bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]",
|
|
96743
|
-
"text-white hover:text-white focus:text-white",
|
|
96748
|
+
"!text-white hover:text-white focus:text-white",
|
|
96744
96749
|
{
|
|
96745
96750
|
"!rounded-full !h-9 !w-9": icon,
|
|
96746
96751
|
"whitespace-nowrap px-3 rounded text-sm hidden lg:flex": !icon
|