@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.cjs
CHANGED
@@ -11409,22 +11409,22 @@ const getButtonClasses$1 = () => {
|
|
11409
11409
|
const getAppearanceClasses = (value, icon = false) => {
|
11410
11410
|
switch (value) {
|
11411
11411
|
case "primary":
|
11412
|
-
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`;
|
11412
|
+
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`;
|
11413
11413
|
case "danger":
|
11414
|
-
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`;
|
11414
|
+
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`;
|
11415
11415
|
case "ghost":
|
11416
|
-
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`;
|
11416
|
+
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`;
|
11417
11417
|
case "discrete": {
|
11418
11418
|
if (icon) {
|
11419
|
-
return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30`;
|
11419
|
+
return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] focus-visible:bg-[#000]/[0.08] aria-disabled:text-black/30`;
|
11420
11420
|
}
|
11421
|
-
return `bg-transparent text-blue-500 visited:text-blue-500 hover:text-blue-700 aria-disabled:text-blue-500/50`;
|
11421
|
+
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`;
|
11422
11422
|
}
|
11423
11423
|
case "transparent": {
|
11424
|
-
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`;
|
11424
|
+
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`;
|
11425
11425
|
}
|
11426
11426
|
default:
|
11427
|
-
return `wcag-grey-200 visited:wcag-grey-200 hover:wcag-grey-300 aria-disabled:bg-grey-200/50 aria-disabled:text-black/30`;
|
11427
|
+
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`;
|
11428
11428
|
}
|
11429
11429
|
};
|
11430
11430
|
const createButtonWithTooltip = (props, className, ref) => {
|
@@ -38499,7 +38499,16 @@ const useResizeObserver$1 = (ref, enabled = true) => {
|
|
38499
38499
|
const DisplayRow = React.memo(
|
38500
38500
|
React.forwardRef(function DisplayRow2(props, externalRef) {
|
38501
38501
|
var _a, _b, _c;
|
38502
|
-
const {
|
38502
|
+
const {
|
38503
|
+
children,
|
38504
|
+
cellRenderer: CellRenderer,
|
38505
|
+
index: index2,
|
38506
|
+
measureRow,
|
38507
|
+
row,
|
38508
|
+
table,
|
38509
|
+
remeasureDependencies = [],
|
38510
|
+
...otherAttributes
|
38511
|
+
} = props;
|
38503
38512
|
const tableMeta = table.options.meta;
|
38504
38513
|
const attributes = {
|
38505
38514
|
...otherAttributes,
|
@@ -38595,7 +38604,7 @@ const DisplayRow = React.memo(
|
|
38595
38604
|
const rowHeight = ((_a2 = ref.current) == null ? void 0 : _a2.getBoundingClientRect().height) ?? 0;
|
38596
38605
|
const expansionHeight = ((_b2 = expansionRef.current) == null ? void 0 : _b2.getBoundingClientRect().height) ?? 0;
|
38597
38606
|
measureRow(rowHeight + expansionHeight);
|
38598
|
-
}, [expansionRef.current, expandedRowSize == null ? void 0 : expandedRowSize.height]);
|
38607
|
+
}, [expansionRef.current, expandedRowSize == null ? void 0 : expandedRowSize.height, ...remeasureDependencies]);
|
38599
38608
|
const className = clsx("group/row", otherAttributes.className, {
|
38600
38609
|
"hover:cursor-grab": tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== "function",
|
38601
38610
|
"hover:cursor-pointer": typeof attributes.onClick === "function"
|
@@ -56226,16 +56235,11 @@ function DiscardChangesConfirmationDialog(props) {
|
|
56226
56235
|
));
|
56227
56236
|
}
|
56228
56237
|
function Row(props) {
|
56229
|
-
const { row, index: index2, table
|
56238
|
+
const { row, index: index2, table } = props;
|
56230
56239
|
const focusManager = useAugmentedFocusManager();
|
56231
56240
|
const tableMeta = table.options.meta;
|
56232
56241
|
const isActiveRow = tableMeta.rowActive.rowActiveIndex === index2;
|
56233
|
-
const rowRef = React.useRef(null);
|
56234
56242
|
const hasErrors = tableMeta.editing.hasRowErrors(row.id);
|
56235
|
-
React.useEffect(() => {
|
56236
|
-
if (!measureRow || !rowRef.current) return;
|
56237
|
-
measureRow(rowRef.current.getBoundingClientRect().height);
|
56238
|
-
}, [hasErrors, measureRow]);
|
56239
56243
|
React.useEffect(() => {
|
56240
56244
|
if (tableMeta.editing.isEditing && isActiveRow && tableMeta.editing.lastFocusedCellIndex === void 0) {
|
56241
56245
|
const element = focusManager.focusFirst();
|
@@ -56292,7 +56296,7 @@ function Row(props) {
|
|
56292
56296
|
onFocus: handleFocus,
|
56293
56297
|
onKeyDown: handleKeyDown
|
56294
56298
|
};
|
56295
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DisplayRow, { ...props, ...attributes,
|
56299
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DisplayRow, { ...props, ...attributes, remeasureDependencies: [hasErrors] }, rowStatus === "saving" || rowStatus === "saved" ? /* @__PURE__ */ React.createElement(SaveStatus, { rowId: row.id, table }) : null), /* @__PURE__ */ React.createElement(
|
56296
56300
|
DiscardChangesConfirmationDialog,
|
56297
56301
|
{
|
56298
56302
|
open: showDiscardDialog,
|