@techsio/ui-kit 0.59.3 → 0.61.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/README.md +32 -0
- package/dist/atoms/label.js +3 -2
- package/dist/atoms/numeric-input.js +12 -4
- package/dist/atoms/rating.js +21 -9
- package/dist/atoms/skeleton.js +9 -3
- package/dist/internal/popover-template-content.js +13 -0
- package/dist/internal/required-label-text.js +12 -0
- package/dist/messages/ui-messages-provider.js +47 -0
- package/dist/messages/ui-messages.js +273 -0
- package/dist/molecules/carousel.js +11 -4
- package/dist/molecules/cascade-select.js +10 -6
- package/dist/molecules/chart.js +12 -8
- package/dist/molecules/color-select.js +9 -6
- package/dist/molecules/combobox.js +22 -16
- package/dist/molecules/date-picker.js +46 -31
- package/dist/molecules/dialog.js +5 -3
- package/dist/molecules/drawer.js +3 -1
- package/dist/molecules/file-upload.js +19 -8
- package/dist/molecules/form-error-summary.js +4 -2
- package/dist/molecules/menu.js +4 -2
- package/dist/molecules/pagination.js +12 -3
- package/dist/molecules/phone-input.js +24 -7
- package/dist/molecules/popover.js +9 -1
- package/dist/molecules/search-form.js +9 -5
- package/dist/molecules/select.js +16 -6
- package/dist/molecules/steps.js +6 -3
- package/dist/molecules/tabs.js +3 -0
- package/dist/molecules/toast.js +5 -3
- package/dist/molecules/tour.js +10 -2
- package/dist/molecules/tree-view.js +9 -1
- package/dist/organisms/data-table.fields.js +82 -65
- package/dist/organisms/data-table.js +90 -74
- package/dist/organisms/gallery.js +6 -5
- package/dist/organisms/header.js +4 -2
- package/dist/src/atoms/label.d.ts +2 -2
- package/dist/src/atoms/label.d.ts.map +1 -1
- package/dist/src/atoms/numeric-input.d.ts +1 -1
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/atoms/rating.d.ts +1 -1
- package/dist/src/atoms/rating.d.ts.map +1 -1
- package/dist/src/atoms/skeleton.d.ts +1 -1
- package/dist/src/atoms/skeleton.d.ts.map +1 -1
- package/dist/src/internal/popover-template-content.d.ts +11 -0
- package/dist/src/internal/popover-template-content.d.ts.map +1 -0
- package/dist/src/internal/required-label-text.d.ts +3 -0
- package/dist/src/internal/required-label-text.d.ts.map +1 -0
- package/dist/src/messages/ui-messages-provider.d.ts +18 -0
- package/dist/src/messages/ui-messages-provider.d.ts.map +1 -0
- package/dist/src/messages/ui-messages.d.ts +331 -0
- package/dist/src/messages/ui-messages.d.ts.map +1 -0
- package/dist/src/molecules/carousel.d.ts +1 -1
- package/dist/src/molecules/carousel.d.ts.map +1 -1
- package/dist/src/molecules/cascade-select.d.ts +2 -2
- package/dist/src/molecules/cascade-select.d.ts.map +1 -1
- package/dist/src/molecules/chart.d.ts.map +1 -1
- package/dist/src/molecules/color-select.d.ts +1 -1
- package/dist/src/molecules/color-select.d.ts.map +1 -1
- package/dist/src/molecules/combobox.d.ts +2 -2
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/date-picker.d.ts +11 -8
- package/dist/src/molecules/date-picker.d.ts.map +1 -1
- package/dist/src/molecules/dialog.d.ts +1 -1
- package/dist/src/molecules/dialog.d.ts.map +1 -1
- package/dist/src/molecules/drawer.d.ts.map +1 -1
- package/dist/src/molecules/file-upload.d.ts +1 -1
- package/dist/src/molecules/file-upload.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +1 -1
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -1
- package/dist/src/molecules/menu.d.ts +1 -1
- package/dist/src/molecules/menu.d.ts.map +1 -1
- package/dist/src/molecules/pagination.d.ts +1 -1
- package/dist/src/molecules/pagination.d.ts.map +1 -1
- package/dist/src/molecules/phone-input.d.ts +1 -1
- package/dist/src/molecules/phone-input.d.ts.map +1 -1
- package/dist/src/molecules/popover.d.ts +1 -1
- package/dist/src/molecules/popover.d.ts.map +1 -1
- package/dist/src/molecules/product-card.d.ts +1 -1
- package/dist/src/molecules/search-form.d.ts +1 -1
- package/dist/src/molecules/search-form.d.ts.map +1 -1
- package/dist/src/molecules/select.d.ts +1 -1
- package/dist/src/molecules/select.d.ts.map +1 -1
- package/dist/src/molecules/steps.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/src/molecules/toast.d.ts +4 -4
- package/dist/src/molecules/toast.d.ts.map +1 -1
- package/dist/src/molecules/tour.d.ts +1 -1
- package/dist/src/molecules/tour.d.ts.map +1 -1
- package/dist/src/molecules/tree-view.d.ts.map +1 -1
- package/dist/src/organisms/data-table.d.ts +4 -48
- package/dist/src/organisms/data-table.d.ts.map +1 -1
- package/dist/src/organisms/data-table.fields.d.ts +6 -1
- package/dist/src/organisms/data-table.fields.d.ts.map +1 -1
- package/dist/src/organisms/gallery.d.ts +2 -2
- package/dist/src/organisms/gallery.d.ts.map +1 -1
- package/dist/src/organisms/header.d.ts +1 -1
- package/dist/src/organisms/header.d.ts.map +1 -1
- package/dist/src/templates/carousel.d.ts +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
- package/dist/src/templates/gallery.d.ts +1 -1
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/src/templates/popover.d.ts +1 -1
- package/dist/src/templates/popover.d.ts.map +1 -1
- package/dist/src/templates/product-card.d.ts +1 -1
- package/dist/src/templates/product-card.d.ts.map +1 -1
- package/dist/src/templates/select.d.ts +1 -1
- package/dist/src/templates/tabs.d.ts +1 -1
- package/dist/src/theme/theme-toggle.d.ts.map +1 -1
- package/dist/templates/facet-filter-panel.js +16 -11
- package/dist/templates/popover.js +5 -4
- package/dist/templates/product-card.js +12 -8
- package/dist/theme/theme-toggle.js +10 -8
- package/package.json +5 -1
- package/src/tokens/figma/akros/variables.css +1 -1
- package/src/tokens/figma/business/variables.css +1 -1
- package/src/tokens/figma/dark/variables.css +1 -1
- package/src/tokens/figma/light/variables.css +1 -1
- package/src/tokens/figma/n1/variables.css +1 -1
|
@@ -18,6 +18,7 @@ import { Checkbox } from "../atoms/checkbox.js";
|
|
|
18
18
|
import { Icon } from "../atoms/icon.js";
|
|
19
19
|
import { Skeleton } from "../atoms/skeleton.js";
|
|
20
20
|
import { StatusText } from "../atoms/status-text.js";
|
|
21
|
+
import { useUiMessages } from "../messages/ui-messages-provider.js";
|
|
21
22
|
import { Menu } from "../molecules/menu.js";
|
|
22
23
|
import { Pagination } from "../molecules/pagination.js";
|
|
23
24
|
import { SearchForm } from "../molecules/search-form.js";
|
|
@@ -157,25 +158,40 @@ function useControllable(controlled, initial, callback) {
|
|
|
157
158
|
];
|
|
158
159
|
}
|
|
159
160
|
const tableSortablePlugins = (defaults)=>defaults.filter((plugin)=>plugin !== OptimisticSortingPlugin);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
dragstart: ({ operation: { source } })=>source ? `Picked up ${source.data.label}, position ${source.data.index + 1}.` : void 0,
|
|
166
|
-
dragover: ({ operation: { source, target } })=>{
|
|
167
|
-
if (!(source && target) || source.id === target.id) return;
|
|
168
|
-
const side = source.data.index < target.data.index ? "after" : "before";
|
|
169
|
-
return `${source.data.label} will move ${side} ${target.data.label}.`;
|
|
161
|
+
function buildTableDragAccessibility(latest) {
|
|
162
|
+
const t = ()=>latest.current;
|
|
163
|
+
return {
|
|
164
|
+
screenReaderInstructions: {
|
|
165
|
+
draggable: latest.current.reorderInstructions
|
|
170
166
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
announcements: {
|
|
168
|
+
dragstart: ({ operation: { source } })=>source ? t().reorderPickedUp({
|
|
169
|
+
label: source.data.label,
|
|
170
|
+
position: source.data.index + 1
|
|
171
|
+
}) : void 0,
|
|
172
|
+
dragover: ({ operation: { source, target } })=>{
|
|
173
|
+
if (!(source && target) || source.id === target.id) return;
|
|
174
|
+
const side = source.data.index < target.data.index ? "after" : "before";
|
|
175
|
+
return t().reorderMoving({
|
|
176
|
+
label: source.data.label,
|
|
177
|
+
target: target.data.label,
|
|
178
|
+
side
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
dragend: ({ canceled, operation: { source, target } })=>{
|
|
182
|
+
if (!source) return;
|
|
183
|
+
if (canceled || !target) return t().reorderCanceled(source.data.label);
|
|
184
|
+
return t().reorderDropped({
|
|
185
|
+
label: source.data.label,
|
|
186
|
+
position: target.data.index + 1
|
|
187
|
+
});
|
|
188
|
+
}
|
|
175
189
|
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function createTableDragPlugins(accessibility) {
|
|
193
|
+
return (defaults)=>defaults.map((plugin)=>plugin === Accessibility ? Accessibility.configure(accessibility) : plugin);
|
|
194
|
+
}
|
|
179
195
|
const tableDragSensors = (defaults)=>defaults.map((sensor)=>sensor === PointerSensor ? PointerSensor.configure({
|
|
180
196
|
activationConstraints: [
|
|
181
197
|
new PointerActivationConstraints.Distance({
|
|
@@ -350,36 +366,25 @@ function useDataTableContext() {
|
|
|
350
366
|
if (!ctx) throw new Error("DataTable sub-components must be used within DataTable");
|
|
351
367
|
return ctx;
|
|
352
368
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
requiredLabel: "Enter a value before saving this row.",
|
|
373
|
-
selectRowLabel: (rowLabel)=>`Select ${rowLabel}`,
|
|
374
|
-
editRowLabel: (rowLabel)=>`Edit ${rowLabel}`,
|
|
375
|
-
pageLabel: ({ page, pageCount })=>null == pageCount ? `Page ${page}` : `Page ${page} of ${pageCount}`,
|
|
376
|
-
previousPageLabel: "Previous page",
|
|
377
|
-
nextPageLabel: "Next page",
|
|
378
|
-
paginationPendingLabel: "Page unavailable — requesting an available page.",
|
|
379
|
-
invalidRangeLabel: "Enter valid dates with the start on or before the end.",
|
|
380
|
-
savePendingLabel: "Saving row…",
|
|
381
|
-
saveErrorLabel: "Could not save this row. Your changes are kept; try Save again."
|
|
382
|
-
};
|
|
369
|
+
function resolveDataTableTranslations(base, overrides) {
|
|
370
|
+
const resolved = {
|
|
371
|
+
...base,
|
|
372
|
+
operatorLabels: {
|
|
373
|
+
...base.operatorLabels
|
|
374
|
+
},
|
|
375
|
+
numberOperatorLabels: {
|
|
376
|
+
...base.numberOperatorLabels
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
if (!overrides) return resolved;
|
|
380
|
+
for (const [key, value] of Object.entries(overrides))if (void 0 !== value && "operatorLabels" !== key && "numberOperatorLabels" !== key) resolved[key] = value;
|
|
381
|
+
for (const [key, value] of Object.entries(overrides.operatorLabels ?? {}))if (void 0 !== value) {
|
|
382
|
+
resolved.operatorLabels[key] = value;
|
|
383
|
+
if (overrides.numberOperatorLabels?.[key] === void 0) resolved.numberOperatorLabels[key] = value;
|
|
384
|
+
}
|
|
385
|
+
for (const [key, value] of Object.entries(overrides.numberOperatorLabels ?? {}))if (void 0 !== value) resolved.numberOperatorLabels[key] = value;
|
|
386
|
+
return resolved;
|
|
387
|
+
}
|
|
383
388
|
const SELECTION_COLUMN_ID = "__select";
|
|
384
389
|
const EMPTY_COLUMN_PINNING = {
|
|
385
390
|
start: [],
|
|
@@ -398,9 +403,9 @@ function pinClass(column, kind) {
|
|
|
398
403
|
isFirstEndPinned(column) ? "border-s-(length:--border-width-data-table) border-data-table-border" : ""
|
|
399
404
|
].join(" ");
|
|
400
405
|
}
|
|
401
|
-
function HeaderDragHandle({ styles, handleRef,
|
|
406
|
+
function HeaderDragHandle({ styles, handleRef, ariaLabel }) {
|
|
402
407
|
return /*#__PURE__*/ jsx("button", {
|
|
403
|
-
"aria-label":
|
|
408
|
+
"aria-label": ariaLabel,
|
|
404
409
|
className: styles.dragHandle(),
|
|
405
410
|
onFocus: handleTableDragFocus,
|
|
406
411
|
ref: handleRef,
|
|
@@ -439,9 +444,9 @@ function HeaderSortLabel({ header, styles, enableSorting, locked }) {
|
|
|
439
444
|
]
|
|
440
445
|
});
|
|
441
446
|
}
|
|
442
|
-
function renderCellContent({ cell, column, styles, enableRowReorder, dnd, editor, editorError, editorErrorId, size, tableLayout, isDragCol,
|
|
447
|
+
function renderCellContent({ cell, column, styles, enableRowReorder, dnd, editor, editorError, editorErrorId, size, tableLayout, isDragCol, dragHandleLabel }) {
|
|
443
448
|
if (isDragCol && enableRowReorder && dnd) return /*#__PURE__*/ jsx("button", {
|
|
444
|
-
"aria-label":
|
|
449
|
+
"aria-label": dragHandleLabel,
|
|
445
450
|
className: styles.dragHandle(),
|
|
446
451
|
onClick: (e)=>e.stopPropagation(),
|
|
447
452
|
type: "button",
|
|
@@ -482,7 +487,7 @@ function stickyRowOffset(stickyHeader, offsets, groupIndex) {
|
|
|
482
487
|
top: offsets[groupIndex] ?? 0
|
|
483
488
|
};
|
|
484
489
|
}
|
|
485
|
-
function DataTableBodyCell({ cell, span, row, styles, columnSizing, enableColumnResizing, enableRowReorder, dnd, editor, editorError, editorErrorId, size, indentColumnId,
|
|
490
|
+
function DataTableBodyCell({ cell, span, row, styles, columnSizing, enableColumnResizing, enableRowReorder, dnd, editor, editorError, editorErrorId, size, indentColumnId, dragHandleLabel, pinningStyle }) {
|
|
486
491
|
const tableLayout = useContext(FieldTableLayoutContext);
|
|
487
492
|
const column = cell.column;
|
|
488
493
|
const pinned = column.getIsPinned();
|
|
@@ -514,7 +519,7 @@ function DataTableBodyCell({ cell, span, row, styles, columnSizing, enableColumn
|
|
|
514
519
|
size,
|
|
515
520
|
tableLayout,
|
|
516
521
|
isDragCol,
|
|
517
|
-
|
|
522
|
+
dragHandleLabel
|
|
518
523
|
})
|
|
519
524
|
});
|
|
520
525
|
}
|
|
@@ -647,12 +652,18 @@ function DataTable(props) {
|
|
|
647
652
|
50,
|
|
648
653
|
100
|
|
649
654
|
], manualSorting, manualFiltering, manualPagination, rowCount, pageCount, hasNextPage, onRowClick, onReachEnd, onColumnReorder, onRowReorder, onCellEditCommit, onReady, renderToolbar, toolbarActions, renderEmpty, renderRowActions, renderHeaderFilter, renderExpandedRow, slotProps, translations: translationsProp, estimateRowHeight = 44, reachEndThreshold = 240, enableInlineEdit = false, editingRowId: editingRowIdProp, onEditingRowIdChange, onEditStart, onEditChange, onEditCommit, onEditCancel, onEditValidationError, lockInteractionsWhileEditing = true, onInteractionBlocked, filterRenderers, editorRenderers, stickyActions = true, paginationProps, canEditRow, rowActions, getRowLabel, striped = false, tintNestedRows = false, loading = false, loadingRowCount = 5, loadingMore = false, selectionMode = "multiple", maxSelectedRows, canSelectRow, onSelectionLimitReached } = props;
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
655
|
+
const messages = useUiMessages();
|
|
656
|
+
const translations = useMemo(()=>resolveDataTableTranslations(messages.dataTable, translationsProp), [
|
|
657
|
+
messages.dataTable,
|
|
658
|
+
translationsProp
|
|
659
|
+
]);
|
|
660
|
+
const dragMessages = useRef(translations);
|
|
661
|
+
useEffect(()=>{
|
|
662
|
+
dragMessages.current = translations;
|
|
663
|
+
}, [
|
|
664
|
+
translations
|
|
665
|
+
]);
|
|
666
|
+
const [tableDragPlugins] = useState(()=>createTableDragPlugins(buildTableDragAccessibility(dragMessages)));
|
|
656
667
|
const outlined = "outline" === variant;
|
|
657
668
|
const effectiveStriped = striped || "striped" === variant;
|
|
658
669
|
const styles = dataTableVariants({
|
|
@@ -767,7 +778,7 @@ function DataTable(props) {
|
|
|
767
778
|
const [saveError, setSaveError] = useState();
|
|
768
779
|
const savingRef = useRef(false);
|
|
769
780
|
useEffect(()=>{
|
|
770
|
-
if (savePending || saveError) scrollRef.current?.querySelector('[
|
|
781
|
+
if (savePending || saveError) scrollRef.current?.querySelector('[data-action="save-row"]')?.focus();
|
|
771
782
|
}, [
|
|
772
783
|
saveError,
|
|
773
784
|
savePending
|
|
@@ -805,6 +816,7 @@ function DataTable(props) {
|
|
|
805
816
|
selectionLabel: translations.selectionLabel,
|
|
806
817
|
reorderLabel: translations.reorderLabel,
|
|
807
818
|
selectRowLabel: translations.selectRowLabel,
|
|
819
|
+
rowFallbackLabel: translations.rowFallbackLabel,
|
|
808
820
|
showSelectAll: "multiple" === selectionMode && null == maxSelectedRows
|
|
809
821
|
}), [
|
|
810
822
|
userColumns,
|
|
@@ -816,6 +828,7 @@ function DataTable(props) {
|
|
|
816
828
|
translations.selectionLabel,
|
|
817
829
|
translations.reorderLabel,
|
|
818
830
|
translations.selectRowLabel,
|
|
831
|
+
translations.rowFallbackLabel,
|
|
819
832
|
selectionMode,
|
|
820
833
|
maxSelectedRows
|
|
821
834
|
]);
|
|
@@ -1351,7 +1364,8 @@ function DataTable(props) {
|
|
|
1351
1364
|
setValue: (next)=>column.setFilterValue(next),
|
|
1352
1365
|
disabled: locked,
|
|
1353
1366
|
size,
|
|
1354
|
-
operatorLabels:
|
|
1367
|
+
operatorLabels: translationsProp?.operatorLabels,
|
|
1368
|
+
messages: translations,
|
|
1355
1369
|
options: meta?.options ?? meta?.filterOptions ?? []
|
|
1356
1370
|
};
|
|
1357
1371
|
if (meta?.renderFilter) return meta.renderFilter(ctx);
|
|
@@ -1427,8 +1441,8 @@ function DataTable(props) {
|
|
|
1427
1441
|
className: styles.headerLabel(),
|
|
1428
1442
|
children: [
|
|
1429
1443
|
dnd && /*#__PURE__*/ jsx(HeaderDragHandle, {
|
|
1444
|
+
ariaLabel: translations.dragHandleLabel(columnLabel(column)),
|
|
1430
1445
|
handleRef: dnd.handleRef,
|
|
1431
|
-
label: columnLabel(column),
|
|
1432
1446
|
styles: styles
|
|
1433
1447
|
}),
|
|
1434
1448
|
/*#__PURE__*/ jsx(HeaderSortLabel, {
|
|
@@ -1440,8 +1454,8 @@ function DataTable(props) {
|
|
|
1440
1454
|
]
|
|
1441
1455
|
}),
|
|
1442
1456
|
enableColumnResizing && !header.isPlaceholder && 0 === column.columns.length && column.getCanResize() ? /*#__PURE__*/ jsx("button", {
|
|
1443
|
-
"aria-description":
|
|
1444
|
-
"aria-label":
|
|
1457
|
+
"aria-description": translations.resizeColumnDescription,
|
|
1458
|
+
"aria-label": translations.resizeColumnLabel(columnLabel(column)),
|
|
1445
1459
|
className: styles.resizeHandle(),
|
|
1446
1460
|
onDoubleClick: ()=>column.resetSize(),
|
|
1447
1461
|
onKeyDown: (event)=>handleColumnResizeKeyDown(event, column),
|
|
@@ -1550,7 +1564,8 @@ function DataTable(props) {
|
|
|
1550
1564
|
error: editErrors[column.id] || void 0,
|
|
1551
1565
|
errorId: `${instanceId}-err-${row.id}-${column.id}`,
|
|
1552
1566
|
commit: commitEdit,
|
|
1553
|
-
cancel: cancelEdit
|
|
1567
|
+
cancel: cancelEdit,
|
|
1568
|
+
messages: translations
|
|
1554
1569
|
};
|
|
1555
1570
|
if (meta.renderEditor) return meta.renderEditor(ctx);
|
|
1556
1571
|
const renderer = editorRenderers?.[type] ?? DEFAULT_EDITOR_RENDERERS[type];
|
|
@@ -1561,7 +1576,7 @@ function DataTable(props) {
|
|
|
1561
1576
|
if (editingRowId === row.id) return /*#__PURE__*/ jsxs(Fragment, {
|
|
1562
1577
|
children: [
|
|
1563
1578
|
/*#__PURE__*/ jsx(Button, {
|
|
1564
|
-
"aria-label":
|
|
1579
|
+
"aria-label": translations.cancelEditLabel,
|
|
1565
1580
|
disabled: savePending,
|
|
1566
1581
|
icon: "token-icon-close",
|
|
1567
1582
|
onClick: (event)=>{
|
|
@@ -1574,7 +1589,8 @@ function DataTable(props) {
|
|
|
1574
1589
|
}),
|
|
1575
1590
|
/*#__PURE__*/ jsx(Button, {
|
|
1576
1591
|
"aria-describedby": saveError ? `${instanceId}-save-error` : void 0,
|
|
1577
|
-
"aria-label":
|
|
1592
|
+
"aria-label": translations.saveRowLabel,
|
|
1593
|
+
"data-action": "save-row",
|
|
1578
1594
|
icon: "token-icon-check",
|
|
1579
1595
|
isLoading: savePending,
|
|
1580
1596
|
onClick: (event)=>{
|
|
@@ -1587,7 +1603,7 @@ function DataTable(props) {
|
|
|
1587
1603
|
]
|
|
1588
1604
|
});
|
|
1589
1605
|
return /*#__PURE__*/ jsx(ActionIcon, {
|
|
1590
|
-
"aria-label": translations.editRowLabel(getRowLabel?.(row) ??
|
|
1606
|
+
"aria-label": translations.editRowLabel(getRowLabel?.(row) ?? translations.rowFallbackLabel(row.id)),
|
|
1591
1607
|
disabled: isEditing || (canEditRow ? !canEditRow(row) : false),
|
|
1592
1608
|
icon: "icon-[mdi--pencil-outline]",
|
|
1593
1609
|
id: `${instanceId}-edit-${row.id}`,
|
|
@@ -1625,7 +1641,7 @@ function DataTable(props) {
|
|
|
1625
1641
|
enableExpanding && row.getCanExpand() ? /*#__PURE__*/ jsx(Button, {
|
|
1626
1642
|
"aria-controls": expandAriaControls(row.id),
|
|
1627
1643
|
"aria-expanded": row.getIsExpanded(),
|
|
1628
|
-
"aria-label": row.getIsExpanded() ?
|
|
1644
|
+
"aria-label": row.getIsExpanded() ? translations.collapseRowLabel : translations.expandRowLabel,
|
|
1629
1645
|
disabled: locked,
|
|
1630
1646
|
icon: row.getIsExpanded() ? "token-icon-chevron-down" : "token-icon-chevron-right",
|
|
1631
1647
|
onClick: (e)=>{
|
|
@@ -1666,7 +1682,7 @@ function DataTable(props) {
|
|
|
1666
1682
|
});
|
|
1667
1683
|
const { onClick: rowOnClick, style: rowStyle, ref: rowRef, ...restRowProps } = slotProps?.row ?? {};
|
|
1668
1684
|
const renderRowCells = (row, cells, rowIndex, dnd)=>{
|
|
1669
|
-
const rowLabel = getRowLabel?.(row) ??
|
|
1685
|
+
const rowLabel = getRowLabel?.(row) ?? translations.rowFallbackLabel(row.id);
|
|
1670
1686
|
return cells.map((cell)=>{
|
|
1671
1687
|
const span = getCellSpan?.(cell, {
|
|
1672
1688
|
row,
|
|
@@ -1682,6 +1698,7 @@ function DataTable(props) {
|
|
|
1682
1698
|
cell: cell,
|
|
1683
1699
|
columnSizing: columnSizing,
|
|
1684
1700
|
dnd: dnd,
|
|
1701
|
+
dragHandleLabel: translations.dragHandleLabel(rowLabel),
|
|
1685
1702
|
editor: renderCellEditor(row, column),
|
|
1686
1703
|
editorError: editingRowId !== row.id || ownsFeedback ? void 0 : editErrors[column.id] || void 0,
|
|
1687
1704
|
editorErrorId: `${instanceId}-err-${row.id}-${column.id}`,
|
|
@@ -1690,7 +1707,6 @@ function DataTable(props) {
|
|
|
1690
1707
|
indentColumnId: indentColumnId,
|
|
1691
1708
|
pinningStyle: pinningStyles(column),
|
|
1692
1709
|
row: row,
|
|
1693
|
-
rowLabel: rowLabel,
|
|
1694
1710
|
size: size,
|
|
1695
1711
|
span: span,
|
|
1696
1712
|
styles: styles
|
|
@@ -1776,7 +1792,7 @@ function DataTable(props) {
|
|
|
1776
1792
|
}
|
|
1777
1793
|
return rowReorderActive && 0 === row.depth ? /*#__PURE__*/ jsx(SortableRow, {
|
|
1778
1794
|
index: rootRowIds.indexOf(row.id),
|
|
1779
|
-
label: getRowLabel?.(row) ??
|
|
1795
|
+
label: getRowLabel?.(row) ?? translations.rowFallbackLabel(row.id),
|
|
1780
1796
|
row: row,
|
|
1781
1797
|
children: (dnd)=>renderBodyRow(row, rowIndex, dnd)
|
|
1782
1798
|
}, row.id) : renderBodyRow(row, rowIndex);
|
|
@@ -2021,7 +2037,7 @@ function DataTable(props) {
|
|
|
2021
2037
|
})
|
|
2022
2038
|
});
|
|
2023
2039
|
}
|
|
2024
|
-
function buildColumns({ userColumns, enableRowReorder, enableRowSelection, locked, getRowLabel, selectAllLabel, selectionLabel, reorderLabel, selectRowLabel, showSelectAll }) {
|
|
2040
|
+
function buildColumns({ userColumns, enableRowReorder, enableRowSelection, locked, getRowLabel, selectAllLabel, selectionLabel, reorderLabel, selectRowLabel, rowFallbackLabel, showSelectAll }) {
|
|
2025
2041
|
const leading = [];
|
|
2026
2042
|
if (enableRowReorder) leading.push({
|
|
2027
2043
|
id: DRAG_COLUMN_ID,
|
|
@@ -2050,7 +2066,7 @@ function buildColumns({ userColumns, enableRowReorder, enableRowSelection, locke
|
|
|
2050
2066
|
children: selectionLabel
|
|
2051
2067
|
}),
|
|
2052
2068
|
cell: ({ row })=>/*#__PURE__*/ jsx(Checkbox, {
|
|
2053
|
-
"aria-label": selectRowLabel(getRowLabel?.(row) ??
|
|
2069
|
+
"aria-label": selectRowLabel(getRowLabel?.(row) ?? rowFallbackLabel(row.id)),
|
|
2054
2070
|
checked: row.getIsSelected(),
|
|
2055
2071
|
disabled: locked || !row.getCanSelect(),
|
|
2056
2072
|
indeterminate: row.getIsSomeSelected(),
|
|
@@ -3,6 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Fragment, createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Button } from "../atoms/button.js";
|
|
5
5
|
import { Image, ImageWithFallback } from "../atoms/image.js";
|
|
6
|
+
import { useUiMessages } from "../messages/ui-messages-provider.js";
|
|
6
7
|
import { Carousel } from "../molecules/carousel.js";
|
|
7
8
|
import { tv } from "../utils.js";
|
|
8
9
|
const galleryVariants = tv({
|
|
@@ -62,10 +63,9 @@ function clampPage(page, maxPage) {
|
|
|
62
63
|
if (!Number.isFinite(page)) return 1 / 0 === page ? maxPage : 0;
|
|
63
64
|
return Math.min(maxPage, Math.max(0, Math.trunc(page)));
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
function Gallery({ items, children, orientation, value, defaultValue = 0, onValueChange, showThumbnails = true, hideThumbnailsWhenSingle = true, thumbnailSize = 60, thumbnailImageAs, getThumbnailAriaLabel = getDefaultThumbnailAriaLabel, carouselProps, emptyState, className, ...props }) {
|
|
66
|
+
function Gallery({ items, children, orientation, value, defaultValue = 0, onValueChange, showThumbnails = true, hideThumbnailsWhenSingle = true, thumbnailSize = 60, thumbnailImageAs, getThumbnailAriaLabel: thumbnailAriaLabelProp, carouselProps, emptyState, className, ...props }) {
|
|
67
|
+
const messages = useUiMessages();
|
|
68
|
+
const getThumbnailAriaLabel = thumbnailAriaLabelProp ?? (({ index })=>messages.gallery.showSlide(index + 1));
|
|
69
69
|
const maxPage = Math.max(items.length - 1, 0);
|
|
70
70
|
const [internalPage, setInternalPage] = useState(defaultValue);
|
|
71
71
|
const isControlled = void 0 !== value;
|
|
@@ -245,6 +245,7 @@ Gallery.Thumbnail = function({ index, children, imageAs, imageClassName, classNa
|
|
|
245
245
|
});
|
|
246
246
|
};
|
|
247
247
|
Gallery.Carousel = function({ children, onPageChange, ...props }) {
|
|
248
|
+
const messages = useUiMessages();
|
|
248
249
|
const { items, page, setPage, carouselProps } = useGalleryContext();
|
|
249
250
|
const inheritedProps = carouselProps || {};
|
|
250
251
|
const mergedProps = {
|
|
@@ -259,7 +260,7 @@ Gallery.Carousel = function({ children, onPageChange, ...props }) {
|
|
|
259
260
|
onPageChange?.(details);
|
|
260
261
|
};
|
|
261
262
|
return /*#__PURE__*/ jsx(Carousel, {
|
|
262
|
-
"aria-label":
|
|
263
|
+
"aria-label": messages.gallery.images,
|
|
263
264
|
...mergedProps,
|
|
264
265
|
onPageChange: handlePageChange,
|
|
265
266
|
page: page,
|
package/dist/organisms/header.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
4
|
import { Button } from "../atoms/button.js";
|
|
5
|
+
import { useUiMessages } from "../messages/ui-messages-provider.js";
|
|
5
6
|
import { tv } from "../utils.js";
|
|
6
7
|
const headerVariants = tv({
|
|
7
8
|
slots: {
|
|
@@ -290,7 +291,8 @@ Header.ActionItem = function({ className, children, ref, size: overrideSize, ...
|
|
|
290
291
|
children: children
|
|
291
292
|
});
|
|
292
293
|
};
|
|
293
|
-
Header.Hamburger = function({ className, ref, onClick, "aria-label": ariaLabel
|
|
294
|
+
Header.Hamburger = function({ className, ref, onClick, "aria-label": ariaLabel, ...props }) {
|
|
295
|
+
const messages = useUiMessages();
|
|
294
296
|
const { toggleMobileMenu, isMobileMenuOpen, mobileMenuId, hamburgerRef, size } = useContext(HeaderContext);
|
|
295
297
|
const { hamburger } = headerVariants({
|
|
296
298
|
size
|
|
@@ -299,7 +301,7 @@ Header.Hamburger = function({ className, ref, onClick, "aria-label": ariaLabel =
|
|
|
299
301
|
"aria-controls": mobileMenuId,
|
|
300
302
|
"aria-expanded": isMobileMenuOpen,
|
|
301
303
|
...props,
|
|
302
|
-
"aria-label": ariaLabel,
|
|
304
|
+
"aria-label": ariaLabel ?? messages.header.toggleMenu,
|
|
303
305
|
className: hamburger({
|
|
304
306
|
className
|
|
305
307
|
}),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Label — @techsio/ui-kit atom.
|
|
3
3
|
*
|
|
4
4
|
* @component Label
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.2.0
|
|
6
6
|
* @skill label-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
@@ -44,7 +44,7 @@ declare const labelVariants: import("tailwind-variants").TVReturnType<{
|
|
|
44
44
|
}, undefined>>;
|
|
45
45
|
export type LabelProps = ComponentPropsWithRef<"label"> & VariantProps<typeof labelVariants> & {
|
|
46
46
|
required?: boolean;
|
|
47
|
-
/** Screen-reader text announced after the label when required
|
|
47
|
+
/** Screen-reader text announced after the label when required; "" omits it. Defaults to the UiMessagesProvider catalog's `label.required` ("(required)" in English). */
|
|
48
48
|
requiredLabel?: string;
|
|
49
49
|
children: ReactNode;
|
|
50
50
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/atoms/label.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/atoms/label.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiBjB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,CAAC,GACrD,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wKAAwK;IACxK,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAEH,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,+BA+BZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../../../src/atoms/numeric-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,EAQT,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../../../src/atoms/numeric-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO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B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,cAAc,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IAC5D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC,CAAA;AAEH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,YAAgB,EAChB,KAAS,EACT,SAAS,EACT,QAAQ,EAAE,YAAoB,EAC9B,WAAmB,EACnB,QAAQ,EAAE,YAAoB,EAC9B,SAAgB,EAChB,IAAI,EACJ,GAAW,EACX,YAAY,EACZ,QAAQ,EACR,cAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,IAAW,EACX,SAAS,EACT,kBAAkB,EAAE,eAAe,EACnC,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,KAAK,EACT,EAAE,WAAW,+BAqKb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/atoms/skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/atoms/skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAA;AAoHd,KAAK,iBAAiB,GAAG,IAAI,CAAC,wBAAwB,CAA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AAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AA2DD,KAAK,sBAAsB,GAAG,IAAI,CAChC,wBAAwB,CAAC,KAAK,CAAC,EAC/B,UAAU,CACX,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Popover } from "../molecules/popover.js";
|
|
3
|
+
/**
|
|
4
|
+
* PopoverTemplate's content: names an otherwise unnamed popover after its text trigger, or the
|
|
5
|
+
* catalog's `popover.details`. A client part, so the template itself stays hook-free.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PopoverTemplateContent({ fallbackName, unnamed, "aria-label": ariaLabel, ...props }: ComponentProps<typeof Popover.Content> & {
|
|
8
|
+
fallbackName?: string;
|
|
9
|
+
unnamed: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=popover-template-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover-template-content.d.ts","sourceRoot":"","sources":["../../../src/internal/popover-template-content.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,EACZ,OAAO,EACP,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;CACjB,+BAWA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-label-text.d.ts","sourceRoot":"","sources":["../../../src/internal/required-label-text.tsx"],"names":[],"mappings":"AAIA,oGAAoG;AACpG,wBAAgB,iBAAiB,uCAGhC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type UiMessages, type UiMessagesInput } from "./ui-messages.js";
|
|
3
|
+
export type UiMessagesProviderProps = {
|
|
4
|
+
/** The app's catalog, whole or partial. Missing entries come from the outer provider, then English. */
|
|
5
|
+
messages?: UiMessagesInput;
|
|
6
|
+
/** BCP 47 locale for formatting; shorthand for `messages.locale`. */
|
|
7
|
+
locale?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Sets the language of every @techsio/ui-kit component below it. Place it once near the app root;
|
|
12
|
+
* nest another to change part of the catalog for one subtree. Keep `messages` stable (a module
|
|
13
|
+
* constant or a memoized value), so components below do not re-render on every parent render.
|
|
14
|
+
*/
|
|
15
|
+
export declare function UiMessagesProvider({ messages, locale, children, }: UiMessagesProviderProps): import("react").JSX.Element;
|
|
16
|
+
/** The catalog in effect: the nearest providers' over English, or English without one. */
|
|
17
|
+
export declare function useUiMessages(): UiMessages;
|
|
18
|
+
//# sourceMappingURL=ui-messages-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-messages-provider.d.ts","sourceRoot":"","sources":["../../../src/messages/ui-messages-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,SAAS,EAGf,MAAM,OAAO,CAAA;AACd,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,eAAe,EACrB,MAAM,eAAe,CAAA;AAoCtB,MAAM,MAAM,uBAAuB,GAAG;IACpC,uGAAuG;IACvG,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE,uBAAuB,+BAiBzB;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
|