@economic/taco 2.45.0-alpha.19 → 2.45.0-alpha.20
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/components/Combobox/Combobox.d.ts +1 -1
- package/dist/components/Hanger/Hanger.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +5 -19
- package/dist/esm/index.css +27 -6
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +1 -1
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Card/Card.js +2 -2
- package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +3 -2
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +5 -9
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +9 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +4 -2
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +4 -2
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/Select.js +0 -9
- package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +2 -2
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
- package/dist/index.css +27 -6
- package/dist/taco.cjs.development.js +30 -30
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +3 -3
@@ -3989,7 +3989,7 @@ const Action = /*#__PURE__*/React.forwardRef(function AlertDialogAction(props, r
|
|
3989
3989
|
});
|
3990
3990
|
|
3991
3991
|
const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
|
3992
|
-
const className = cn('fixed inset-0 cursor-default overflow-y-auto bg-blue-900/[0.3] aria-hidden:invisible print:overflow-visible print:absolute', props.className);
|
3992
|
+
const className = cn('fixed inset-0 cursor-default overflow-y-auto bg-blue-900/[0.3] aria-hidden:invisible print:overflow-visible print:absolute z-10', props.className);
|
3993
3993
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
3994
3994
|
className: className,
|
3995
3995
|
"data-taco": "backdrop",
|
@@ -4487,13 +4487,13 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
|
4487
4487
|
side: placement,
|
4488
4488
|
sideOffset: 3
|
4489
4489
|
}), /*#__PURE__*/React.createElement("div", {
|
4490
|
-
className: "xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded
|
4490
|
+
className: "xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded bg-blue-900 px-2 py-1 text-xs text-white print:hidden",
|
4491
4491
|
"data-taco": "tooltip",
|
4492
4492
|
style: {
|
4493
4493
|
transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
|
4494
4494
|
}
|
4495
4495
|
}, /*#__PURE__*/React.createElement(TooltipPrimitive.Arrow, {
|
4496
|
-
className: "-mt-px fill-blue-900
|
4496
|
+
className: "-mt-px fill-blue-900 stroke-blue-900"
|
4497
4497
|
}), title))));
|
4498
4498
|
});
|
4499
4499
|
|
@@ -5210,7 +5210,7 @@ const Content$2 = /*#__PURE__*/React.forwardRef(function CardContent(externalPro
|
|
5210
5210
|
...props
|
5211
5211
|
} = externalProps;
|
5212
5212
|
const className = cn('flex-grow overflow-auto', {
|
5213
|
-
'
|
5213
|
+
'px-4 pb-4': !noPadding
|
5214
5214
|
}, props.className);
|
5215
5215
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
5216
5216
|
className: className,
|
@@ -5232,7 +5232,7 @@ const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
|
|
5232
5232
|
"data-taco": "card",
|
5233
5233
|
ref: ref
|
5234
5234
|
}), /*#__PURE__*/React.createElement("div", {
|
5235
|
-
className: "
|
5235
|
+
className: "flex justify-between px-4 pb-2 pt-4"
|
5236
5236
|
}, title && (/*#__PURE__*/React.createElement(Truncate, {
|
5237
5237
|
tooltip: title
|
5238
5238
|
}, /*#__PURE__*/React.createElement("h4", {
|
@@ -5301,8 +5301,9 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
5301
5301
|
...otherProps
|
5302
5302
|
} = props;
|
5303
5303
|
const id = useId(props.id);
|
5304
|
-
const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0
|
5305
|
-
'self-start': !!label
|
5304
|
+
const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 focus-visible:yt-focus disabled:cursor-not-allowed text-white', {
|
5305
|
+
'self-start': !!label,
|
5306
|
+
'mt-[0.1rem]': !label
|
5306
5307
|
}, invalid ? {
|
5307
5308
|
'border-red-500 hover:border-red-700 aria-checked:border-red-500 aria-checked-mixed:border-red-500 aria-checked:bg-red-500 aria-checked-mixed:bg-red-500 aria-checked:hover:border-red-700 aria-checked-mixed:hover:border-red-700 aria-checked:hover:bg-red-700 aria-checked-mixed:hover:bg-red-700': !props.disabled,
|
5308
5309
|
'border-red-500/50 aria-checked:wcag-red-500/50 aria-checked-mixed:wcag-red-500/50': props.disabled
|
@@ -6063,15 +6064,11 @@ const useCombobox = ({
|
|
6063
6064
|
}
|
6064
6065
|
}, [open]);
|
6065
6066
|
const handleChange = nextValue => {
|
6066
|
-
const event = createCustomEvent('change');
|
6067
|
+
//const event = createCustomEvent('change');
|
6067
6068
|
if (onChange && nextValue !== String(value)) {
|
6068
6069
|
const item = findByValue(flattenedData, nextValue);
|
6069
|
-
|
6070
|
-
|
6071
|
-
if (parents !== null && parents.length > 0) {
|
6072
|
-
event.detail.parents = parents;
|
6073
|
-
}
|
6074
|
-
onChange(event);
|
6070
|
+
const sanitizedItem = sanitizeItem(item);
|
6071
|
+
onChange(sanitizedItem === null || sanitizedItem === void 0 ? void 0 : sanitizedItem.value);
|
6075
6072
|
}
|
6076
6073
|
};
|
6077
6074
|
// event handlers
|
@@ -6405,6 +6402,12 @@ const useDatepicker = ({
|
|
6405
6402
|
setInternalValue(formattedValue !== null && formattedValue !== void 0 ? formattedValue : '');
|
6406
6403
|
}
|
6407
6404
|
}, [value]);
|
6405
|
+
const isDisabledDay = React.useMemo(() => {
|
6406
|
+
if (originalValueAsDate && calendar !== null && calendar !== void 0 && calendar.disabledDays) {
|
6407
|
+
return reactDayPicker.isMatch(originalValueAsDate, calendar === null || calendar === void 0 ? void 0 : calendar.disabledDays); // can happen if you type a disabled date in input.
|
6408
|
+
}
|
6409
|
+
return false;
|
6410
|
+
}, [originalValueAsDate]);
|
6408
6411
|
// event handlers
|
6409
6412
|
const handleInputBlur = event => {
|
6410
6413
|
event.persist();
|
@@ -6442,6 +6445,7 @@ const useDatepicker = ({
|
|
6442
6445
|
const inputProps = {
|
6443
6446
|
...props,
|
6444
6447
|
autoComplete: 'off',
|
6448
|
+
invalid: props.invalid || isDisabledDay,
|
6445
6449
|
onBlur: handleInputBlur,
|
6446
6450
|
onChange: handleInputChange,
|
6447
6451
|
onKeyDown: handleKeyDown,
|
@@ -6807,8 +6811,10 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
6807
6811
|
const {
|
6808
6812
|
texts
|
6809
6813
|
} = useLocalization();
|
6810
|
-
const className = cn('relative bg-white animate-[fade-in_150ms] rounded', getDialogPositionClassnames(), getDialogSizeClassnames(dialog.size), 'print:w-full print:h-
|
6811
|
-
const containerClassName = cn('bg-white p-6 rounded relative z-10 shadow print:p-0',
|
6814
|
+
const className = cn('relative bg-white animate-[fade-in_150ms] rounded print:!static', getDialogPositionClassnames(), getDialogSizeClassnames(dialog.size), 'print:w-full print:h-max print:m-0 print:overflow-visible');
|
6815
|
+
const containerClassName = cn('bg-white p-6 rounded relative z-10 shadow print:p-0',
|
6816
|
+
// The `!fixed` property is crucial to ensure that when a draggable dialog is moved, the printed document still displays its content across the full page.
|
6817
|
+
'print:overflow-visible print:h-max print:!transform-none print:!inset-0 print:!m-0', {
|
6812
6818
|
'rounded-b-none': !!dialog.elements.extra
|
6813
6819
|
}, props.className);
|
6814
6820
|
const handleEscapeKeyDown = event => {
|
@@ -7567,7 +7573,8 @@ const Title$3 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
|
7567
7573
|
});
|
7568
7574
|
const Content$6 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
|
7569
7575
|
const {
|
7570
|
-
placement: side
|
7576
|
+
placement: side,
|
7577
|
+
hideWhenDetached = false
|
7571
7578
|
} = props;
|
7572
7579
|
const context = React.useContext(HangerContext);
|
7573
7580
|
const {
|
@@ -7583,7 +7590,8 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function HangerContent(props, re
|
|
7583
7590
|
onInteractOutside: handleInteractOutside,
|
7584
7591
|
side: side,
|
7585
7592
|
sideOffset: 1,
|
7586
|
-
ref: ref
|
7593
|
+
ref: ref,
|
7594
|
+
hideWhenDetached: hideWhenDetached
|
7587
7595
|
}, props.children, /*#__PURE__*/React.createElement(UnstyledArrow, {
|
7588
7596
|
className: "text-blue-500"
|
7589
7597
|
}), /*#__PURE__*/React.createElement(PopoverPrimitive.Close, {
|
@@ -9496,16 +9504,8 @@ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref)
|
|
9496
9504
|
});
|
9497
9505
|
const Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
|
9498
9506
|
const {
|
9499
|
-
editable,
|
9500
9507
|
...otherProps
|
9501
9508
|
} = props;
|
9502
|
-
if (editable) {
|
9503
|
-
return /*#__PURE__*/React.createElement(Combobox, Object.assign({}, otherProps, {
|
9504
|
-
dialog: undefined,
|
9505
|
-
inline: true,
|
9506
|
-
ref: ref
|
9507
|
-
}));
|
9508
|
-
}
|
9509
9509
|
return /*#__PURE__*/React.createElement(BaseSelect, Object.assign({}, otherProps, {
|
9510
9510
|
ref: ref
|
9511
9511
|
}));
|
@@ -12056,7 +12056,7 @@ function useTableStyleGrid(tableId, table, fontSize) {
|
|
12056
12056
|
// we have to be specific so that nested tables don't inherit the same css
|
12057
12057
|
const hiddenColumns = printHiddenColumns.map(id => `table[data-taco^='table']#${tableId} > thead > tr > th[data-cell-id='${id}']\n,table[data-taco^='table']#${tableId} > tbody > tr > td[data-cell-id='${id}']\n`).join(',');
|
12058
12058
|
const stylesheet = `@media print { table[data-taco^='table']#${tableId} { grid-template-columns: repeat(${printGridTemplateColumns}, auto) !important; }
|
12059
|
-
table[data-taco^='table']#${tableId} [data-cell-id^='__']${hiddenColumns ? `, ${hiddenColumns}` : ''} { display: none; }}`;
|
12059
|
+
table[data-taco^='table']#${tableId} [data-cell-id^='__']${hiddenColumns ? `, ${hiddenColumns}` : ''} { display: none; } table[data-taco^='table']#${tableId} tr { page-break-inside: avoid; break-inside: avoid;}}`;
|
12060
12060
|
return {
|
12061
12061
|
style,
|
12062
12062
|
stylesheet
|
@@ -20063,7 +20063,6 @@ function DiscardChangesConfirmationDialog(props) {
|
|
20063
20063
|
}, /*#__PURE__*/React__default.createElement(Dialog.Title, null, texts.table3.editing.clearChangesConfirmationDialog.title), /*#__PURE__*/React__default.createElement("p", null, texts.table3.editing.clearChangesConfirmationDialog.description), /*#__PURE__*/React__default.createElement(Dialog.Footer, null, /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
20064
20064
|
tabIndex: 0
|
20065
20065
|
}, texts.table3.editing.clearChangesConfirmationDialog.cancel)), /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
20066
|
-
autoFocus: true,
|
20067
20066
|
tabIndex: 0,
|
20068
20067
|
appearance: "primary",
|
20069
20068
|
onClick: handleDiscard
|
@@ -20481,7 +20480,7 @@ function CreateNewRow(props) {
|
|
20481
20480
|
keys: shortcut
|
20482
20481
|
});
|
20483
20482
|
}
|
20484
|
-
const className = cn('group/row border-grey-300 !sticky z-[21]
|
20483
|
+
const className = cn('group/row border-grey-300 !sticky z-[21]', {
|
20485
20484
|
'bottom-10': tableMeta.footer.isEnabled,
|
20486
20485
|
'bottom-0': !tableMeta.footer.isEnabled,
|
20487
20486
|
'border-b': !isScrolled
|
@@ -22483,7 +22482,8 @@ function useTableDataLoader2(fetchPage, fetchAll, options = {
|
|
22483
22482
|
length.current = response.length;
|
22484
22483
|
const pages = [];
|
22485
22484
|
const cache = {};
|
22486
|
-
|
22485
|
+
const pageCount = Math.ceil(response.length / pageSize);
|
22486
|
+
Array.from(Array(pageCount).keys()).forEach(index => {
|
22487
22487
|
pages.push(index);
|
22488
22488
|
const startIndex = index * pageSize;
|
22489
22489
|
cache[index] = response.data.slice(startIndex, startIndex + pageSize);
|