@economic/taco 2.69.0 → 2.69.1
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 +20 -16
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +20 -16
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.js
CHANGED
@@ -11391,22 +11391,22 @@ const getButtonClasses$1 = () => {
|
|
11391
11391
|
const getAppearanceClasses = (value, icon = false) => {
|
11392
11392
|
switch (value) {
|
11393
11393
|
case "primary":
|
11394
|
-
return `wcag-blue-500 visited:wcag-blue-500 hover:wcag-blue-700 hover:active:wcag-blue-500 aria-disabled:bg-blue-500/50 aria-disabled:active:bg-blue-500/50`;
|
11394
|
+
return `wcag-blue-500 visited:wcag-blue-500 hover:wcag-blue-700 hover:active:wcag-blue-500 focus-visible:wcag-blue-500 aria-disabled:bg-blue-500/50 aria-disabled:active:bg-blue-500/50`;
|
11395
11395
|
case "danger":
|
11396
|
-
return `wcag-red-500 visited:wcag-red-500 hover:wcag-red-700 hover:active:wcag-red-500 aria-disabled:bg-red-500/50 aria-disabled:active:bg-red-500/50`;
|
11396
|
+
return `wcag-red-500 visited:wcag-red-500 hover:wcag-red-700 hover:active:wcag-red-500 focus-visible:wcag-red-500 aria-disabled:bg-red-500/50 aria-disabled:active:bg-red-500/50`;
|
11397
11397
|
case "ghost":
|
11398
|
-
return `bg-white border border-blue-500 text-blue-500 visited:text-blue-500 hover:bg-blue-100 hover:text-blue-700 aria-disabled:border-blue-500/50 aria-disabled:text-blue-500/50 aria-disabled:bg-white`;
|
11398
|
+
return `bg-white border border-blue-500 text-blue-500 visited:text-blue-500 hover:bg-blue-100 hover:text-blue-700 focus-visible:text-blue-700 aria-disabled:border-blue-500/50 aria-disabled:text-blue-500/50 aria-disabled:bg-white`;
|
11399
11399
|
case "discrete": {
|
11400
11400
|
if (icon) {
|
11401
|
-
return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30`;
|
11401
|
+
return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] focus-visible:bg-[#000]/[0.08] aria-disabled:text-black/30`;
|
11402
11402
|
}
|
11403
|
-
return `bg-transparent text-blue-500 visited:text-blue-500 hover:text-blue-700 aria-disabled:text-blue-500/50`;
|
11403
|
+
return `bg-transparent text-blue-500 visited:text-blue-500 hover:text-blue-700 focus-visible:text-blue-700 aria-disabled:text-blue-500/50`;
|
11404
11404
|
}
|
11405
11405
|
case "transparent": {
|
11406
|
-
return `bg-transparent text-black visited:text-black hover:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30 aria-disabled:bg-transparent`;
|
11406
|
+
return `bg-transparent text-black visited:text-black hover:text-black focus-visible:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30 aria-disabled:bg-transparent`;
|
11407
11407
|
}
|
11408
11408
|
default:
|
11409
|
-
return `wcag-grey-200 visited:wcag-grey-200 hover:wcag-grey-300 aria-disabled:bg-grey-200/50 aria-disabled:text-black/30`;
|
11409
|
+
return `wcag-grey-200 visited:wcag-grey-200 hover:wcag-grey-300 focus-visible:wcag-grey-300 aria-disabled:bg-grey-200/50 aria-disabled:text-black/30`;
|
11410
11410
|
}
|
11411
11411
|
};
|
11412
11412
|
const createButtonWithTooltip = (props, className, ref) => {
|
@@ -38481,7 +38481,16 @@ const useResizeObserver$1 = (ref, enabled = true) => {
|
|
38481
38481
|
const DisplayRow = React__default.memo(
|
38482
38482
|
React__default.forwardRef(function DisplayRow2(props, externalRef) {
|
38483
38483
|
var _a, _b, _c;
|
38484
|
-
const {
|
38484
|
+
const {
|
38485
|
+
children,
|
38486
|
+
cellRenderer: CellRenderer,
|
38487
|
+
index: index2,
|
38488
|
+
measureRow,
|
38489
|
+
row,
|
38490
|
+
table,
|
38491
|
+
remeasureDependencies = [],
|
38492
|
+
...otherAttributes
|
38493
|
+
} = props;
|
38485
38494
|
const tableMeta = table.options.meta;
|
38486
38495
|
const attributes = {
|
38487
38496
|
...otherAttributes,
|
@@ -38577,7 +38586,7 @@ const DisplayRow = React__default.memo(
|
|
38577
38586
|
const rowHeight = ((_a2 = ref.current) == null ? void 0 : _a2.getBoundingClientRect().height) ?? 0;
|
38578
38587
|
const expansionHeight = ((_b2 = expansionRef.current) == null ? void 0 : _b2.getBoundingClientRect().height) ?? 0;
|
38579
38588
|
measureRow(rowHeight + expansionHeight);
|
38580
|
-
}, [expansionRef.current, expandedRowSize == null ? void 0 : expandedRowSize.height]);
|
38589
|
+
}, [expansionRef.current, expandedRowSize == null ? void 0 : expandedRowSize.height, ...remeasureDependencies]);
|
38581
38590
|
const className = clsx("group/row", otherAttributes.className, {
|
38582
38591
|
"hover:cursor-grab": tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== "function",
|
38583
38592
|
"hover:cursor-pointer": typeof attributes.onClick === "function"
|
@@ -56208,16 +56217,11 @@ function DiscardChangesConfirmationDialog(props) {
|
|
56208
56217
|
));
|
56209
56218
|
}
|
56210
56219
|
function Row(props) {
|
56211
|
-
const { row, index: index2, table
|
56220
|
+
const { row, index: index2, table } = props;
|
56212
56221
|
const focusManager = useAugmentedFocusManager();
|
56213
56222
|
const tableMeta = table.options.meta;
|
56214
56223
|
const isActiveRow = tableMeta.rowActive.rowActiveIndex === index2;
|
56215
|
-
const rowRef = React__default.useRef(null);
|
56216
56224
|
const hasErrors = tableMeta.editing.hasRowErrors(row.id);
|
56217
|
-
React__default.useEffect(() => {
|
56218
|
-
if (!measureRow || !rowRef.current) return;
|
56219
|
-
measureRow(rowRef.current.getBoundingClientRect().height);
|
56220
|
-
}, [hasErrors, measureRow]);
|
56221
56225
|
React__default.useEffect(() => {
|
56222
56226
|
if (tableMeta.editing.isEditing && isActiveRow && tableMeta.editing.lastFocusedCellIndex === void 0) {
|
56223
56227
|
const element = focusManager.focusFirst();
|
@@ -56274,7 +56278,7 @@ function Row(props) {
|
|
56274
56278
|
onFocus: handleFocus,
|
56275
56279
|
onKeyDown: handleKeyDown
|
56276
56280
|
};
|
56277
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(DisplayRow, { ...props, ...attributes,
|
56281
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(DisplayRow, { ...props, ...attributes, remeasureDependencies: [hasErrors] }, rowStatus === "saving" || rowStatus === "saved" ? /* @__PURE__ */ React__default.createElement(SaveStatus, { rowId: row.id, table }) : null), /* @__PURE__ */ React__default.createElement(
|
56278
56282
|
DiscardChangesConfirmationDialog,
|
56279
56283
|
{
|
56280
56284
|
open: showDiscardDialog,
|