@economic/taco 2.14.2 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Drawer/Drawer.d.ts +5 -1
- package/dist/components/Icon/components/AiChatSolid.d.ts +3 -0
- package/dist/components/Icon/components/AiStars.d.ts +3 -0
- package/dist/components/Icon/components/EnvelopeSolid.d.ts +3 -0
- package/dist/components/Icon/components/PhoneSolid.d.ts +3 -0
- package/dist/components/Icon/components/QuestionMarkBold.d.ts +3 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/components/Navigation2/components/Link.d.ts +1 -1
- package/dist/components/Provider/Localization.d.ts +19 -0
- package/dist/components/SearchInput2/SearchInput2.d.ts +1 -0
- package/dist/components/Select2/components/Option.d.ts +2 -2
- package/dist/components/Select2/components/Search.d.ts +1 -1
- package/dist/components/Table3/components/alert/ErrorAlert.d.ts +10 -0
- package/dist/components/Table3/components/columns/cell/DisplayCell.d.ts +5 -2
- package/dist/components/Table3/components/columns/cell/EditingCell.d.ts +3 -0
- package/dist/components/Table3/components/columns/cell/Highlight.d.ts +2 -0
- package/dist/components/Table3/components/columns/internal/EditingActions.d.ts +1 -1
- package/dist/components/Table3/components/rows/Row.d.ts +2 -0
- package/dist/components/Table3/components/rows/RowContext.d.ts +1 -0
- package/dist/components/Table3/hooks/features/useEditing.d.ts +12 -11
- package/dist/components/Table3/hooks/features/usePauseShortcuts.d.ts +5 -0
- package/dist/components/Table3/hooks/features/useSearch.d.ts +2 -0
- package/dist/components/Table3/hooks/features/useValidation.d.ts +13 -0
- package/dist/components/Table3/hooks/useTable.d.ts +4 -0
- package/dist/components/Table3/types.d.ts +26 -1
- package/dist/components/Table3/util/editing.d.ts +6 -0
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/esm/index.css +112 -33
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +7 -2
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Field/Field.js +19 -3
- package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/AiChatSolid.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AiChatSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AiStars.js +30 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AiStars.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/EnvelopeSolid.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/EnvelopeSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PhoneSolid.js +17 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PhoneSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/QuestionMarkBold.js +17 -0
- package/dist/esm/packages/taco/src/components/Icon/components/QuestionMarkBold.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +10 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +19 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +4 -0
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +28 -4
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +154 -0
- package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +51 -6
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +7 -55
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +69 -37
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +17 -17
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +41 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +21 -12
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +6 -5
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +57 -17
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +42 -32
- package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +8 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +48 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js +185 -101
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js +12 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +4 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js +178 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +8 -2
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +21 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +4 -0
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +20 -0
- package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -0
- package/dist/index.css +112 -33
- package/dist/taco.cjs.development.js +1735 -957
- 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 +2 -2
- package/types.json +23852 -10957
@@ -1,10 +1,13 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { TableMeta, CellContext } from '@tanstack/react-table';
|
3
3
|
export declare type EditingCellProps<TType = unknown> = CellContext<TType, unknown> & {
|
4
|
+
highlighted?: boolean;
|
5
|
+
highlightedAsCurrent?: boolean;
|
4
6
|
children?: string | JSX.Element;
|
5
7
|
};
|
6
8
|
export declare function EditingCell<TType = unknown>(props: EditingCellProps<TType>): JSX.Element;
|
7
9
|
export declare type MemoedEditingCellProps<TType = unknown> = EditingCellProps<TType> & {
|
8
10
|
isHovered: boolean;
|
9
11
|
tableMeta: TableMeta<TType>;
|
12
|
+
error?: string;
|
10
13
|
};
|
@@ -5,4 +5,4 @@ export declare type EditingActionsProps<TType = unknown> = CellContext<TType, un
|
|
5
5
|
};
|
6
6
|
export declare const COLUMN_ID = "__editing_actions";
|
7
7
|
export declare const EDITING_ACTIONS_WIDTH = 60;
|
8
|
-
export declare function createRowEditingActionsColumn<TType = unknown>(): DisplayColumnDef<TType, unknown>;
|
8
|
+
export declare function createRowEditingActionsColumn<TType = unknown>(rowIdentifier?: string): DisplayColumnDef<TType, unknown>;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Row as RTRow, Table as RTable } from '@tanstack/react-table';
|
3
3
|
import { Table3RowClickHandler, Table3RowDropHandler } from '../../types';
|
4
|
+
import { LastCellIndex } from '../../util/editing';
|
4
5
|
declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onDrop'> & {
|
5
6
|
index: number;
|
6
7
|
isLastRow: boolean;
|
@@ -12,6 +13,7 @@ declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElemen
|
|
12
13
|
tableRef: React.RefObject<HTMLDivElement>;
|
13
14
|
};
|
14
15
|
export declare function Row<TType = unknown>(props: RowProps<TType>): JSX.Element;
|
16
|
+
export declare const lastCellIndex: LastCellIndex;
|
15
17
|
export declare type MemoedRowProps<TType = unknown> = RowProps<TType> & {
|
16
18
|
'aria-grabbed'?: boolean;
|
17
19
|
'data-current': boolean;
|
@@ -3,6 +3,7 @@ declare type RowContextValue = {
|
|
3
3
|
isHovered: boolean;
|
4
4
|
setIsHovered: (value: boolean) => void;
|
5
5
|
rowIndex: number;
|
6
|
+
hasError: boolean;
|
6
7
|
};
|
7
8
|
export declare const RowContext: React.Context<RowContextValue>;
|
8
9
|
export declare const useRowContext: () => RowContextValue;
|
@@ -1,30 +1,31 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Cell as RTCell } from '@tanstack/react-table';
|
3
|
+
import { Table3SaveHandler } from '../../types';
|
3
4
|
import { IndicatorReason } from '../../components/columns/cell/Indicator';
|
4
|
-
|
5
|
+
import { Table3Validation } from './useValidation';
|
6
|
+
export declare enum SavingStatusValue {
|
5
7
|
Saving = "saving",
|
6
8
|
Saved = "saved",
|
7
9
|
Error = "error"
|
8
10
|
}
|
9
|
-
export declare
|
10
|
-
state: SavingStateValue;
|
11
|
-
};
|
12
|
-
export declare function useEditing<TType = unknown>(isEnabled: boolean, onSave?: (row: TType) => void): {
|
11
|
+
export declare function useEditing<TType = unknown>(isEnabled: boolean, validation: Table3Validation<TType>, onSave?: Table3SaveHandler<TType>): {
|
13
12
|
isEnabled: boolean;
|
14
13
|
isEditing: boolean;
|
15
14
|
toggleEditing: React.Dispatch<React.SetStateAction<boolean>>;
|
16
|
-
changes:
|
15
|
+
changes: EditingState<TType>;
|
17
16
|
getCellValue: <T extends TType>(cell: RTCell<T, unknown>) => any;
|
18
17
|
setCellValue: <T_1 extends TType>(cell: RTCell<T_1, unknown>, value: unknown) => void;
|
19
18
|
saveChangesIfNeeded: () => Promise<void>;
|
20
19
|
detailModeEditing: boolean;
|
21
20
|
setDetailModeEditing: React.Dispatch<React.SetStateAction<boolean>>;
|
22
|
-
rowMoveReason: Record<string, IndicatorReason | null
|
23
|
-
setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null
|
24
|
-
removeRowMoveReason: (
|
21
|
+
rowMoveReason: Record<string, IndicatorReason | null> | null;
|
22
|
+
setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null> | null>>;
|
23
|
+
removeRowMoveReason: () => void;
|
25
24
|
handleKeyDown: (event: KeyboardEvent) => void;
|
26
25
|
handleBlur: (event: React.FocusEvent) => void;
|
27
26
|
resetChange: (rowId: string) => void;
|
28
|
-
|
29
|
-
|
27
|
+
getSavingStatus: (rowId: string) => SavingStatusValue | null;
|
28
|
+
resetSavingStatus: (rowId: string) => void;
|
30
29
|
};
|
30
|
+
declare type EditingState<TType = unknown> = Record<string, TType> | null;
|
31
|
+
export {};
|
@@ -13,4 +13,6 @@ export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInS
|
|
13
13
|
currentHighlightColumnIndex: number | undefined;
|
14
14
|
setCurrentHighlightColumnIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
|
15
15
|
loadAll: Table3LoadAllHandler | undefined;
|
16
|
+
isSearching: boolean;
|
17
|
+
setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;
|
16
18
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Cell as RTCell } from '@tanstack/react-table';
|
2
|
+
import { RowErrors, Table3CellValidationHandler, Table3RowValidationHandler } from '../../types';
|
3
|
+
export declare type Table3Validation<TType = unknown> = {
|
4
|
+
validate: (rowId: string, row: TType, cellId?: string) => Promise<void | RowErrors>;
|
5
|
+
setCellError: (rowId: string, cellId: string, error: string) => void;
|
6
|
+
setRowErrors: (rowId: string, errors: Record<string, string>) => void;
|
7
|
+
confirmErrors: (rowId: string) => void;
|
8
|
+
getCellError: <T extends TType>(cell: RTCell<T, unknown>) => string | undefined;
|
9
|
+
resetErrors: (rowId: string, cellId?: string) => void;
|
10
|
+
errors: Record<string, RowErrors> | null;
|
11
|
+
draftErrors: Record<string, RowErrors> | null;
|
12
|
+
};
|
13
|
+
export declare function useValidation<TType = unknown>(onCellValidate?: Table3CellValidationHandler<TType>, onRowValidate?: Table3RowValidationHandler<TType>): Table3Validation<TType>;
|
@@ -16,6 +16,8 @@ import { usePrinting } from './features/usePrinting';
|
|
16
16
|
import { useRowGoto } from './features/useRowGoto';
|
17
17
|
import { useSearch } from './features/useSearch';
|
18
18
|
import { useRowActions } from './features/useRowActions';
|
19
|
+
import { Table3Validation } from './features/useValidation';
|
20
|
+
import { usePauseShortcuts } from './features/usePauseShortcuts';
|
19
21
|
declare module '@tanstack/table-core' {
|
20
22
|
interface TableMeta<TData extends RowData> {
|
21
23
|
columnFreezing: ReturnType<typeof useColumnFreezing>;
|
@@ -37,6 +39,8 @@ declare module '@tanstack/table-core' {
|
|
37
39
|
rowHeight: ReturnType<typeof useRowHeight>;
|
38
40
|
rowSelection: ReturnType<typeof useRowSelection>;
|
39
41
|
search: ReturnType<typeof useSearch>;
|
42
|
+
shortcutsState: ReturnType<typeof usePauseShortcuts>;
|
43
|
+
validation: Table3Validation<TData>;
|
40
44
|
}
|
41
45
|
interface ColumnMeta<TData extends RowData, TValue> {
|
42
46
|
align?: Table3ColumnAlignment;
|
@@ -17,7 +17,7 @@ export declare type Table3ColumnControlProps = {
|
|
17
17
|
onBlur?: (value: any) => void;
|
18
18
|
onFocus?: React.FocusEventHandler;
|
19
19
|
readOnly?: boolean;
|
20
|
-
ref: React.RefObject<HTMLElement
|
20
|
+
ref: React.RefObject<HTMLElement> | ((instance: HTMLElement | null | undefined) => void);
|
21
21
|
setValue: (value: any) => void;
|
22
22
|
value: any;
|
23
23
|
};
|
@@ -112,6 +112,9 @@ export declare type Table3LoadAllHandler = (sorting: Table3ColumnSort[], filters
|
|
112
112
|
export declare type Table3RowGotoHandler = (column: string, query: string, sorting: Table3ColumnSort[], filters: ColumnFilter[], search: string | undefined) => Promise<number>;
|
113
113
|
export declare type Table3ColumnSort = RTTableColumnSort;
|
114
114
|
export declare type Table3SortHandler = (sorting: Table3ColumnSort[]) => void;
|
115
|
+
export declare type RowErrors = Record<string, string>;
|
116
|
+
export declare type Table3CellValidationHandler<TType = unknown> = (cellValue: any, cellId: string, row: TType) => Promise<RowErrors | undefined | void>;
|
117
|
+
export declare type Table3RowValidationHandler<TType = unknown> = (row: TType) => Promise<RowErrors | undefined | void>;
|
115
118
|
export declare type TableStrategy = {
|
116
119
|
renderBody: () => JSX.Element | JSX.Element[] | null;
|
117
120
|
scrollToIndex: (index: number, options?: {
|
@@ -169,10 +172,13 @@ export declare type Table3CommonProps<TType = unknown> = Partial<Table3Options>
|
|
169
172
|
onFilter?: Table3FilterHandler;
|
170
173
|
onSave?: Table3SaveHandler<TType>;
|
171
174
|
onSort?: Table3SortHandler;
|
175
|
+
onCellValidate?: Table3CellValidationHandler<TType>;
|
176
|
+
onRowValidate?: Table3RowValidationHandler<TType>;
|
172
177
|
preset?: Table3Preset;
|
173
178
|
shortcuts?: Table3Shortcuts<TType>;
|
174
179
|
toolbarLeft?: JSX.Element;
|
175
180
|
toolbarRight?: JSX.Element;
|
181
|
+
rowIdentifier?: string;
|
176
182
|
};
|
177
183
|
interface Table3ClientProps<TType = unknown> extends Table3CommonProps<TType> {
|
178
184
|
length?: never;
|
@@ -262,6 +268,12 @@ export declare type Table3Texts = {
|
|
262
268
|
progress: string;
|
263
269
|
complete: string;
|
264
270
|
};
|
271
|
+
clearChangesConfirmationDialog: {
|
272
|
+
title: string;
|
273
|
+
description: string;
|
274
|
+
cancel: string;
|
275
|
+
confirm: string;
|
276
|
+
};
|
265
277
|
};
|
266
278
|
filters: {
|
267
279
|
button: string;
|
@@ -344,5 +356,18 @@ export declare type Table3Texts = {
|
|
344
356
|
otherOptions: {
|
345
357
|
tooltip: string;
|
346
358
|
};
|
359
|
+
validation: {
|
360
|
+
index: string;
|
361
|
+
alert: {
|
362
|
+
unsavedEntries: (count?: number) => string;
|
363
|
+
incompleteAndHavntBeenSaved: (count?: number) => string;
|
364
|
+
};
|
365
|
+
resetFiltersDialog: {
|
366
|
+
title: string;
|
367
|
+
description: string;
|
368
|
+
cancel: string;
|
369
|
+
confirm: string;
|
370
|
+
};
|
371
|
+
};
|
347
372
|
};
|
348
373
|
export {};
|
@@ -2,3 +2,9 @@ export declare const focussableNodeNames: string[];
|
|
2
2
|
export declare const focusableSelector: string;
|
3
3
|
export declare const hasChanged: (value: any, newValue: any) => boolean;
|
4
4
|
export declare const willRowMoveAfterSorting: (value: any, cell: any, rowIndex: any, rows: any, desc: any) => boolean;
|
5
|
+
export declare class LastCellIndex {
|
6
|
+
_value: string | null | undefined;
|
7
|
+
get value(): string | null | undefined;
|
8
|
+
set value(val: string | null | undefined);
|
9
|
+
}
|
10
|
+
export declare function getColumnIndex(element: Element): string | null | undefined;
|
@@ -13,7 +13,7 @@ export declare const Tag: React.ForwardRefExoticComponent<Pick<React.HTMLAttribu
|
|
13
13
|
children: string;
|
14
14
|
color?: "green" | "yellow" | "red" | "blue" | "purple" | "brown" | "pink" | "orange" | "grey" | "transparent" | undefined;
|
15
15
|
disabled?: boolean | undefined;
|
16
|
-
icon?: React.ReactElement<IconProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach-warning" | "attach" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "chart-table" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-information" | "circle-minus" | "circle-plus" | "circle-questionmark" | "circle-tick" | "circle-warning" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "copy" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-split" | "document-time" | "document" | "download" | "drag" | "e-copedia" | "e-signature" | "edit-simple" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope" | "expand-view" | "expenses" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "filter" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "home" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "line" | "list-bulleted" | "list-search" | "list" | "location" | "lock-open" | "lock" | "log-out" | "log" | "market" | "match-amount" | "match-entries" | "menu" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "move" | "navigation-list" | "note-follow-up" | "note-read" | "note" | "numbers" | "partner-api" | "payment-paid" | "payment-unpaid" | "period" | "person-change" | "person-minus" | "person-plus" | "person-tick" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "search" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "time" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "warning" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
|
16
|
+
icon?: React.ReactElement<IconProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "ai-chat-solid" | "ai-stars" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach-warning" | "attach" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "chart-table" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-information" | "circle-minus" | "circle-plus" | "circle-questionmark" | "circle-tick" | "circle-warning" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "copy" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-split" | "document-time" | "document" | "download" | "drag" | "e-copedia" | "e-signature" | "edit-simple" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope-solid" | "envelope" | "expand-view" | "expenses" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "filter" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "home" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "line" | "list-bulleted" | "list-search" | "list" | "location" | "lock-open" | "lock" | "log-out" | "log" | "market" | "match-amount" | "match-entries" | "menu" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "move" | "navigation-list" | "note-follow-up" | "note-read" | "note" | "numbers" | "partner-api" | "payment-paid" | "payment-unpaid" | "period" | "person-change" | "person-minus" | "person-plus" | "person-tick" | "phone-solid" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark-bold" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "search" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "time" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "warning" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
|
17
17
|
readOnly?: boolean | undefined;
|
18
18
|
onDelete?: ((event: React.MouseEvent<SVGSVGElement>) => void) | undefined;
|
19
19
|
} & React.RefAttributes<HTMLSpanElement>>;
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
2
2
|
export declare type TooltipProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {
|
3
3
|
/** The element which activates the tooltip when hovered. Should be a single React/HTML element */
|
4
4
|
children: React.ReactElement | any;
|
5
|
+
/** Use this value to hide tooltip conditionally */
|
6
|
+
hide?: boolean;
|
5
7
|
/** Text displayed in the tooltip */
|
6
8
|
title: string | JSX.Element;
|
7
9
|
/**
|
@@ -13,6 +15,8 @@ export declare type TooltipProps = Omit<React.HTMLAttributes<HTMLDivElement>, 't
|
|
13
15
|
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
14
16
|
/** The element which activates the tooltip when hovered. Should be a single React/HTML element */
|
15
17
|
children: React.ReactElement | any;
|
18
|
+
/** Use this value to hide tooltip conditionally */
|
19
|
+
hide?: boolean | undefined;
|
16
20
|
/** Text displayed in the tooltip */
|
17
21
|
title: string | JSX.Element;
|
18
22
|
/**
|
package/dist/esm/index.css
CHANGED
@@ -652,6 +652,10 @@
|
|
652
652
|
@apply flex;
|
653
653
|
}
|
654
654
|
|
655
|
+
[data-taco='table3-column-group'] > div {
|
656
|
+
@apply grow;
|
657
|
+
}
|
658
|
+
|
655
659
|
/* In cases where row height might differ from default one (example: textarea without truncate or changing of font size or row height),
|
656
660
|
we need to prevent editing controls to take all available space */
|
657
661
|
[role='cell']:not([data-highlighted='true']) {
|
@@ -701,94 +705,108 @@
|
|
701
705
|
}
|
702
706
|
|
703
707
|
/* normal rows */
|
704
|
-
[role='row']:not([data-selected='true']):not([data-
|
708
|
+
[role='row']:not([data-selected='true']):not([data-invalid='true']) [role='cell'] {
|
705
709
|
@apply bg-white;
|
706
710
|
}
|
707
|
-
[role='row']:not([data-selected='true']):not([data-
|
711
|
+
[role='row']:not([data-selected='true']):not([data-invalid='true']):hover [role='cell'] {
|
708
712
|
--table3-row-actions-shadow: theme(colors.grey.100);
|
709
713
|
@apply bg-grey-100;
|
710
714
|
}
|
711
|
-
[role='row']:not([data-selected='true']):not([data-
|
715
|
+
[role='row']:not([data-selected='true']):not([data-invalid='true'])[data-current='true'] [role='cell'] {
|
712
716
|
--table3-row-actions-shadow: theme(colors.grey.100);
|
713
717
|
@apply bg-grey-100;
|
714
718
|
}
|
715
|
-
[role='row']:not([data-selected='true']):not([data-
|
719
|
+
[role='row']:not([data-selected='true']):not([data-invalid='true'])[data-current='true']:hover [role='cell'] {
|
716
720
|
--table3-row-actions-shadow: theme(colors.grey.100);
|
717
721
|
@apply bg-grey-100;
|
718
722
|
}
|
723
|
+
/* Fields shouldn’t have white background when not in current row and hovered*/
|
724
|
+
[role='row']:not([data-selected='true']):not([data-invalid='true'])[data-current='false']:hover [role='cell'] .bg-white {
|
725
|
+
@apply !bg-grey-100;
|
726
|
+
}
|
719
727
|
/* normal rows when focus is inside the table */
|
720
728
|
[data-taco='table2']:focus-within
|
721
|
-
[role='row'][data-current='true']:not([data-selected='true']):not([data-
|
729
|
+
[role='row'][data-current='true']:not([data-selected='true']):not([data-invalid='true'])
|
722
730
|
[role='cell'] {
|
723
731
|
--table3-row-actions-shadow: theme(colors.grey.200);
|
724
732
|
@apply bg-grey-200;
|
725
733
|
}
|
726
734
|
/* normal rows when hover is paused */
|
727
|
-
[data-pause-hover='true'] [role='row']:not([data-selected='true']):not([data-
|
735
|
+
[data-pause-hover='true'] [role='row']:not([data-selected='true']):not([data-invalid='true']):hover:not([data-current='true']) [role='cell'] {
|
728
736
|
--table3-row-actions-shadow: theme(colors.white);
|
729
737
|
@apply !bg-white;
|
730
738
|
}
|
731
|
-
[data-pause-hover='true'] [role='row']:not([data-selected='true']):not([data-
|
739
|
+
[data-pause-hover='true'] [role='row']:not([data-selected='true']):not([data-invalid='true']):hover[data-current='true'] [role='cell'] {
|
732
740
|
--table3-row-actions-shadow: theme(colors.grey.200);
|
733
741
|
@apply !bg-grey-200;
|
734
742
|
}
|
735
743
|
|
736
744
|
/* selected rows */
|
737
|
-
[role='row'][data-selected='true']:not([data-
|
745
|
+
[role='row'][data-selected='true']:not([data-invalid='true']) [role='cell'] {
|
738
746
|
@apply bg-blue-100;
|
739
747
|
}
|
740
|
-
[role='row'][data-selected='true']:not([data-
|
748
|
+
[role='row'][data-selected='true']:not([data-invalid='true']):hover [role='cell'] {
|
741
749
|
--table3-row-actions-shadow: #d6e3f6;
|
742
750
|
@apply bg-[#D6E3F6];
|
743
751
|
}
|
744
|
-
[role='row'][data-selected='true']:not([data-
|
752
|
+
[role='row'][data-selected='true']:not([data-invalid='true'])[data-current='true']:hover [role='cell'],
|
745
753
|
|
746
|
-
[role='row'][data-selected='true']:not([data-
|
754
|
+
[role='row'][data-selected='true']:not([data-invalid='true'])[data-current='true'] [role='cell'] {
|
747
755
|
--table3-row-actions-shadow: #d6e3f6;
|
748
756
|
@apply bg-[#D6E3F6];
|
749
757
|
}
|
750
758
|
/* selected rows when focus is inside the table */
|
751
|
-
[data-taco='table2']:focus-within
|
759
|
+
[data-taco='table2']:focus-within
|
760
|
+
[role='row'][data-current='true'][data-selected='true']:not([data-invalid='true'])
|
761
|
+
[role='cell'] {
|
752
762
|
--table3-row-actions-shadow: #ccd8eb;
|
753
763
|
@apply bg-[#CCD8EB];
|
754
764
|
}
|
755
765
|
/* selected rows when hover is paused */
|
756
|
-
[data-pause-hover='true'] [role='row'][data-selected='true']:not([data-
|
766
|
+
[data-pause-hover='true'] [role='row'][data-selected='true']:not([data-invalid='true']):hover:not([data-current='true']) [role='cell'] {
|
757
767
|
--table3-row-actions-shadow: theme(colors.blue.100);
|
758
768
|
@apply !bg-blue-100;
|
759
769
|
}
|
760
|
-
[data-pause-hover='true'] [role='row'][data-selected='true']:not([data-
|
770
|
+
[data-pause-hover='true'] [role='row'][data-selected='true']:not([data-invalid='true']):hover[data-current='true'] [role='cell'] {
|
761
771
|
--table3-row-actions-shadow: #ccd8eb;
|
762
772
|
@apply !bg-[#CCD8EB];
|
763
773
|
}
|
764
774
|
|
765
775
|
/* error rows */
|
766
|
-
[role='row'][data-
|
776
|
+
[role='row'][data-invalid='true'] [role='cell'] {
|
767
777
|
@apply bg-[#FFEDE9];
|
768
778
|
}
|
769
|
-
[role='row'][data-
|
779
|
+
[role='row'][data-invalid='true']:hover [role='cell'] {
|
770
780
|
--table3-row-actions-shadow: #ffe4de;
|
771
781
|
@apply bg-[#FFE4DE];
|
772
782
|
}
|
773
|
-
[role='row'][data-
|
783
|
+
[role='row'][data-invalid='true'][data-current='true'] [role='cell'] {
|
774
784
|
--table3-row-actions-shadow: theme(colors.red.100);
|
775
785
|
@apply bg-red-100;
|
776
786
|
}
|
777
|
-
[role='row'][data-
|
787
|
+
[role='row'][data-invalid='true'][data-current='true']:hover [role='cell'] {
|
778
788
|
--table3-row-actions-shadow: #ffe4de;
|
779
789
|
@apply bg-[#FFE4DE];
|
780
790
|
}
|
791
|
+
/* Fields with errors shouldn’t have white background when not in current row */
|
792
|
+
[role='row'][data-invalid='true'][data-current='false'] [role='cell'] .bg-white {
|
793
|
+
@apply !bg-[#FFEDE9];
|
794
|
+
}
|
795
|
+
/* Request from UX: In error state, input backgroud color should be the same as row background color */
|
796
|
+
[role='row'][data-invalid='true'][data-current='false']:hover [role='cell'] .bg-white {
|
797
|
+
@apply !bg-[#FFE4DE];
|
798
|
+
}
|
781
799
|
/* error rows when focus is inside the table */
|
782
|
-
[data-taco='table2']:focus-within [role='row'][data-current='true'][data-
|
800
|
+
[data-taco='table2']:focus-within [role='row'][data-current='true'][data-invalid='true'] [role='cell'] {
|
783
801
|
--table3-row-actions-shadow: theme(colors.red.100);
|
784
802
|
@apply bg-red-100;
|
785
803
|
}
|
786
804
|
/* error rows when hover is paused */
|
787
|
-
[data-pause-hover='true'] [role='row'][data-
|
805
|
+
[data-pause-hover='true'] [role='row'][data-invalid='true']:hover:not([data-current='true']) [role='cell'] {
|
788
806
|
--table3-row-actions-shadow: #ffede9;
|
789
807
|
@apply !bg-[#FFEDE9];
|
790
808
|
}
|
791
|
-
[data-pause-hover='true'] [role='row'][data-
|
809
|
+
[data-pause-hover='true'] [role='row'][data-invalid='true']:hover[data-current='true'] [role='cell'] {
|
792
810
|
--table3-row-actions-shadow: theme(colors.red.100);
|
793
811
|
@apply !bg-red-100;
|
794
812
|
}
|
@@ -802,6 +820,12 @@
|
|
802
820
|
@apply !wcag-blue-500;
|
803
821
|
}
|
804
822
|
|
823
|
+
/* error row */
|
824
|
+
/*!!!!*/
|
825
|
+
[data-taco='table2-body'] [role='row'][data-invalid='true'] [role='cell'] {
|
826
|
+
/*@apply !bg-[#FFF5F2];*/
|
827
|
+
}
|
828
|
+
|
805
829
|
/* cell component overrides */
|
806
830
|
|
807
831
|
/* small font size */
|
@@ -820,7 +844,9 @@
|
|
820
844
|
}
|
821
845
|
|
822
846
|
[data-font-size='small'] [role='cell'] [data-taco='badge'],
|
823
|
-
[data-font-size='small'] [role='cell'] [data-taco='badge-icon']
|
847
|
+
[data-font-size='small'] [role='cell'] [data-taco='badge-icon'],
|
848
|
+
[data-font-size='small'] [role='cell'] [data-taco='icon'],
|
849
|
+
[data-font-size='small'] [role='cell'] [data-taco='spinner'] {
|
824
850
|
@apply !-my-0.5 !text-xs;
|
825
851
|
}
|
826
852
|
|
@@ -828,11 +854,21 @@
|
|
828
854
|
@apply !-my-1;
|
829
855
|
}
|
830
856
|
|
831
|
-
[data-font-size='small'] [role='cell'] [data-taco='
|
832
|
-
[data-font-size='small'] [role='cell'] [data-taco='
|
857
|
+
[data-font-size='small'] [role='cell'] [data-taco='Select2'],
|
858
|
+
[data-font-size='small'] [role='cell'] [data-taco='input-container'] {
|
833
859
|
@apply !-my-[3px];
|
834
860
|
}
|
835
861
|
|
862
|
+
/* from validation */
|
863
|
+
[data-font-size='small'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='Select2'],
|
864
|
+
[data-font-size='small'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='input-container'],
|
865
|
+
[data-font-size='small'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='Select2'],
|
866
|
+
[data-font-size='small'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='input-container'] {
|
867
|
+
@apply !-mt-1;
|
868
|
+
@apply !mb-0;
|
869
|
+
}
|
870
|
+
/*---*/
|
871
|
+
|
836
872
|
[data-font-size='small'] [role='cell'] [data-taco='input'],
|
837
873
|
[data-font-size='small'] [role='cell'] [data-taco='Select2'],
|
838
874
|
[data-font-size='small'] [role='cell'] [data-taco='textarea'] {
|
@@ -859,9 +895,18 @@
|
|
859
895
|
@apply !my-0;
|
860
896
|
}
|
861
897
|
|
862
|
-
|
863
|
-
|
864
|
-
|
898
|
+
/* When cell is editable, but not highlighted, then we apply cell padding to a cell itself */
|
899
|
+
|
900
|
+
[data-font-size='small'] [role='cell'][data-editable]:not([data-highlighted='true']) {
|
901
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_6px)];
|
902
|
+
}
|
903
|
+
|
904
|
+
/* When cell is editable and highlighted, the padding should apply to highlight wrapper,
|
905
|
+
because it should take all the available space in the cell */
|
906
|
+
|
907
|
+
[data-font-size='small'] [role='cell'][data-editable][data-highlighted='true'] [data-taco='highlight'] {
|
908
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_6px)];
|
909
|
+
}
|
865
910
|
|
866
911
|
[data-font-size='small'] [role='cell'][data-editable] [data-taco='checkbox'],
|
867
912
|
[data-font-size='small'] [role='cell'][data-editable] [data-taco='checkbox-container'],
|
@@ -889,9 +934,18 @@
|
|
889
934
|
@apply !-my-[5px];
|
890
935
|
}
|
891
936
|
|
892
|
-
|
893
|
-
|
894
|
-
|
937
|
+
/* When cell is editable, but not highlighted, then we apply cell padding to a cell itself */
|
938
|
+
|
939
|
+
[data-font-size='medium'] [role='cell'][data-editable]:not([data-highlighted='true']) {
|
940
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_8px)];
|
941
|
+
}
|
942
|
+
|
943
|
+
/* When cell is editable and highlighted, the padding should apply to highlight wrapper,
|
944
|
+
because it should take all the available space in the cell */
|
945
|
+
|
946
|
+
[data-font-size='medium'] [role='cell'][data-editable][data-highlighted='true'] [data-taco='highlight'] {
|
947
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_8px)];
|
948
|
+
}
|
895
949
|
|
896
950
|
[data-font-size='medium'] [role='cell'][data-editable] [data-taco='checkbox'],
|
897
951
|
[data-font-size='medium'] [role='cell'][data-editable] [data-taco='checkbox-container'],
|
@@ -900,6 +954,14 @@
|
|
900
954
|
@apply !mx-[calc(var(--table3-cell-padding-x)_-_3px)] !mt-px;
|
901
955
|
}
|
902
956
|
|
957
|
+
[data-font-size='medium'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='Select2'],
|
958
|
+
[data-font-size='medium'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='input-container'],
|
959
|
+
[data-font-size='medium'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='Select2'],
|
960
|
+
[data-font-size='medium'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='input-container'] {
|
961
|
+
@apply !-mt-1.5;
|
962
|
+
@apply !mb-0;
|
963
|
+
}
|
964
|
+
|
903
965
|
/* large font size */
|
904
966
|
[data-font-size='large'] [role='cell'] > [data-taco='button'],
|
905
967
|
[data-font-size='large'] [role='cell'] > [data-taco='icon-button'] {
|
@@ -919,6 +981,14 @@
|
|
919
981
|
@apply !-my-[7.5px];
|
920
982
|
}
|
921
983
|
|
984
|
+
[data-font-size='large'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='Select2'],
|
985
|
+
[data-font-size='large'] [role='row'][data-invalid='true'] [role='cell'] [data-taco='input-container'],
|
986
|
+
[data-font-size='large'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='Select2'],
|
987
|
+
[data-font-size='large'] [role='row'] [role='cell'][data-invalid='true'] [data-taco='input-container'] {
|
988
|
+
@apply !-mt-2;
|
989
|
+
@apply !mb-0;
|
990
|
+
}
|
991
|
+
|
922
992
|
[data-font-size='large'] [role='cell'] [data-taco='input'],
|
923
993
|
[data-font-size='large'] [role='cell'] [data-taco='Select2'],
|
924
994
|
[data-font-size='large'] [role='cell'] [data-taco='textarea'] {
|
@@ -933,9 +1003,18 @@
|
|
933
1003
|
@apply !h-6 !w-6;
|
934
1004
|
}
|
935
1005
|
|
936
|
-
|
937
|
-
|
938
|
-
|
1006
|
+
/* When cell is editable, but not highlighted, then we apply cell padding to a cell itself */
|
1007
|
+
|
1008
|
+
[data-font-size='large'] [role='cell'][data-editable]:not([data-highlighted='true']) {
|
1009
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_10px)];
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
/* When cell is editable and highlighted, the padding should apply to highlight wrapper,
|
1013
|
+
because it should take all the available space in the cell */
|
1014
|
+
|
1015
|
+
[data-font-size='large'] [role='cell'][data-editable][data-highlighted='true'] [data-taco='highlight'] {
|
1016
|
+
@apply px-[calc(var(--table3-cell-padding-x)_-_10px)];
|
1017
|
+
}
|
939
1018
|
|
940
1019
|
[data-font-size='large'] [role='cell'][data-editable] [data-taco='checkbox'],
|
941
1020
|
[data-font-size='large'] [role='cell'][data-editable] [data-taco='checkbox-container'],
|
@@ -6,11 +6,14 @@ import { Content, InnerContent, Title, Footer, Close, Actions } from './componen
|
|
6
6
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
7
7
|
import { Trigger } from './components/Trigger.js';
|
8
8
|
|
9
|
+
const DEFAULT_OUTLET_NAME = 'default';
|
9
10
|
const Outlet = /*#__PURE__*/forwardRef(function Outlet(props, ref) {
|
11
|
+
var _props$name;
|
10
12
|
const className = cn('h-full ml-auto overflow-hidden flex-shrink-0', props.className);
|
11
13
|
return /*#__PURE__*/createElement("div", Object.assign({}, props, {
|
12
14
|
className: className,
|
13
15
|
"data-taco": "drawer-outlet",
|
16
|
+
"data-taco-outlet-name": (_props$name = props.name) !== null && _props$name !== void 0 ? _props$name : DEFAULT_OUTLET_NAME,
|
14
17
|
ref: ref
|
15
18
|
}));
|
16
19
|
});
|
@@ -34,6 +37,7 @@ const Drawer = /*#__PURE__*/forwardRef(function Drawer(props, ref) {
|
|
34
37
|
children,
|
35
38
|
focusTrap = props.focusTrap === undefined && props.variant === 'overlay' ? true : props.focusTrap,
|
36
39
|
showCloseButton = true,
|
40
|
+
outletName,
|
37
41
|
...otherProps
|
38
42
|
} = props;
|
39
43
|
const [open, setOpen] = useControllableState({
|
@@ -63,9 +67,10 @@ const Drawer = /*#__PURE__*/forwardRef(function Drawer(props, ref) {
|
|
63
67
|
}, []);
|
64
68
|
useEffect(() => {
|
65
69
|
var _document$querySelect;
|
66
|
-
const
|
70
|
+
const outletSelector = `[data-taco="drawer-outlet"][data-taco-outlet-name="${outletName !== null && outletName !== void 0 ? outletName : DEFAULT_OUTLET_NAME}"]`;
|
71
|
+
const outletElement = (_document$querySelect = document.querySelector(outletSelector)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.body;
|
67
72
|
setOutlet(outletElement);
|
68
|
-
}, []);
|
73
|
+
}, [outletName]);
|
69
74
|
useEffect(() => {
|
70
75
|
if (open) {
|
71
76
|
// if drawerStack is defined, this means that another drawer was opened before
|