@economic/taco 2.27.2 → 2.28.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Calendar/Calendar.d.ts +4 -9
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Icon/components/LinkExternal.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/List/List.d.ts +28 -0
- package/dist/components/List/components/Button.d.ts +8 -0
- package/dist/components/List/components/Collapsible.d.ts +10 -0
- package/dist/components/List/components/Group.d.ts +7 -0
- package/dist/components/List/components/Item.d.ts +22 -0
- package/dist/components/List/components/Link.d.ts +8 -0
- package/dist/components/List/components/Toggle.d.ts +8 -0
- 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/Select2/components/Option.d.ts +2 -2
- package/dist/components/Select2/components/Search.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/index.css +63 -51
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +62 -39
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/LinkExternal.js +22 -0
- package/dist/esm/packages/taco/src/components/Icon/components/LinkExternal.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +2 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/List.js +21 -0
- package/dist/esm/packages/taco/src/components/List/List.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Button.js +12 -0
- package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +30 -0
- package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Group.js +11 -0
- package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Item.js +40 -0
- package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Link.js +17 -0
- package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -0
- package/dist/esm/packages/taco/src/components/List/components/Toggle.js +94 -0
- package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +2 -2
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +1 -1
- package/dist/esm/packages/taco/src/index.js +2 -1
- package/dist/esm/packages/taco/src/index.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +12 -45
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +3 -7
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/index.css +63 -51
- package/dist/index.d.ts +1 -0
- package/dist/primitives/Table/types.d.ts +7 -6
- package/dist/primitives/Table/useTableDataLoader.d.ts +4 -5
- package/dist/primitives/Table/useTableManager/listeners/useTableSearchListener.d.ts +1 -2
- package/dist/taco.cjs.development.js +366 -179
- 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 +4 -3
package/dist/index.css
CHANGED
@@ -200,73 +200,35 @@
|
|
200
200
|
@apply -mr-2 ml-0;
|
201
201
|
}
|
202
202
|
|
203
|
-
[data-taco='calendar'] .
|
204
|
-
@apply
|
203
|
+
[data-taco='calendar'] .rdp {
|
204
|
+
@apply select-none;
|
205
205
|
}
|
206
|
-
|
207
|
-
|
208
|
-
@apply flex flex-wrap justify-center;
|
209
|
-
}
|
210
|
-
|
211
|
-
[data-taco='calendar'] .DayPicker-Month {
|
212
|
-
@apply m-0 flex border-collapse select-none flex-col;
|
213
|
-
}
|
214
|
-
|
215
|
-
[data-taco='calendar'] .DayPicker-Weekdays {
|
216
|
-
@apply flex h-10 items-center;
|
217
|
-
}
|
218
|
-
|
219
|
-
[data-taco='calendar'] .DayPicker-WeekdaysRow {
|
220
|
-
@apply flex w-full justify-between;
|
206
|
+
[data-taco='calendar'] .rdp-head {
|
207
|
+
@apply h-6;
|
221
208
|
}
|
222
209
|
|
223
|
-
[data-taco='calendar'] .
|
224
|
-
@apply text-grey-700 flex-grow text-center uppercase;
|
210
|
+
[data-taco='calendar'] .rdp-head_cell {
|
211
|
+
@apply text-grey-700 flex-grow text-center font-medium uppercase;
|
225
212
|
}
|
226
213
|
|
227
|
-
[data-taco='calendar'] .
|
228
|
-
@apply
|
214
|
+
[data-taco='calendar'] .rdp-day {
|
215
|
+
@apply hover:wcag-grey-200 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full;
|
229
216
|
}
|
230
217
|
|
231
|
-
[data-taco='calendar'] .
|
232
|
-
@apply
|
233
|
-
}
|
234
|
-
|
235
|
-
[data-taco='calendar'] .DayPicker-Week {
|
236
|
-
@apply flex w-full justify-between;
|
237
|
-
}
|
238
|
-
|
239
|
-
[data-taco='calendar'] .DayPicker-Day {
|
240
|
-
@apply flex h-10 w-10 cursor-pointer items-center justify-center rounded-full;
|
241
|
-
}
|
242
|
-
|
243
|
-
[data-taco='calendar'] .DayPicker--interactionDisabled .DayPicker-Day {
|
244
|
-
@apply cursor-default;
|
245
|
-
}
|
246
|
-
|
247
|
-
[data-taco='calendar'] .DayPicker-Footer {
|
248
|
-
@apply pt-1 text-center;
|
249
|
-
}
|
250
|
-
|
251
|
-
[data-taco='calendar'] .DayPicker-TodayButton {
|
252
|
-
@apply cursor-pointer border-none bg-transparent text-xs text-blue-500;
|
218
|
+
[data-taco='calendar'] .rdp-day_today {
|
219
|
+
@apply font-bold text-blue-500;
|
253
220
|
}
|
254
221
|
|
255
|
-
[data-taco='calendar'] .
|
256
|
-
@apply
|
222
|
+
[data-taco='calendar'] .rdp-day_selected {
|
223
|
+
@apply wcag-grey-200;
|
257
224
|
}
|
258
225
|
|
259
226
|
/* Default modifiers */
|
260
|
-
|
261
|
-
[data-taco='calendar'] .DayPicker-Day--today {
|
262
|
-
@apply font-bold text-blue-500;
|
263
|
-
}
|
264
|
-
|
265
227
|
[data-taco='calendar'] .DayPicker-Day--outside {
|
266
228
|
@apply text-grey-300 cursor-default;
|
267
229
|
}
|
268
230
|
|
269
|
-
[data-taco='calendar'] .
|
231
|
+
[data-taco='calendar'] .rdp-day_disabled {
|
270
232
|
@apply text-grey-300 pointer-events-none cursor-default;
|
271
233
|
}
|
272
234
|
|
@@ -456,6 +418,56 @@
|
|
456
418
|
@apply mb-0;
|
457
419
|
}
|
458
420
|
|
421
|
+
[data-taco='list'] {
|
422
|
+
@apply flex flex-col gap-y-2;
|
423
|
+
}
|
424
|
+
|
425
|
+
[data-taco='list-item'] {
|
426
|
+
@apply border-grey-300 flex w-full items-center gap-x-3 rounded-lg border bg-white p-3 text-left;
|
427
|
+
}
|
428
|
+
|
429
|
+
[data-taco='list-item']:focus-visible {
|
430
|
+
@apply yt-focus z-10;
|
431
|
+
}
|
432
|
+
|
433
|
+
[data-taco='list-item']:not([aria-disabled]):hover {
|
434
|
+
@apply cursor-pointer bg-black/[0.08];
|
435
|
+
}
|
436
|
+
|
437
|
+
[data-taco='list-item'][aria-disabled] {
|
438
|
+
@apply pointer-events-none opacity-50;
|
439
|
+
}
|
440
|
+
|
441
|
+
[data-taco='list-item-collapsible']:has([data-taco='list-item']:focus-visible) {
|
442
|
+
@apply z-10;
|
443
|
+
}
|
444
|
+
|
445
|
+
[data-taco='list-item-collapsible'] > [data-taco='list-item'][aria-expanded='true']:not(:focus-visible) {
|
446
|
+
@apply rounded-b-none border-b-transparent;
|
447
|
+
}
|
448
|
+
|
449
|
+
[data-taco='list-item-collapsible'] > div {
|
450
|
+
@apply border-grey-300 rounded-b-lg border border-t-0 bg-white p-3;
|
451
|
+
}
|
452
|
+
|
453
|
+
[data-taco='list-group'] {
|
454
|
+
@apply flex flex-col;
|
455
|
+
}
|
456
|
+
|
457
|
+
[data-taco='list-group'] > [data-taco='list-item']:not(:first-child):not(:focus-visible),
|
458
|
+
[data-taco='list-group'] > [data-taco='list-item-collapsible']:not(:first-child) [data-taco='list-item']:not(:focus-visible) {
|
459
|
+
@apply !rounded-t-none border-t-transparent;
|
460
|
+
}
|
461
|
+
|
462
|
+
[data-taco='list-group'] > [data-taco='list-item']:not(:last-child):not(:focus-visible),
|
463
|
+
[data-taco='list-group'] > [data-taco='list-item-collapsible']:not(:last-child) [data-taco='list-item']:not(:focus-visible) {
|
464
|
+
@apply !rounded-b-none;
|
465
|
+
}
|
466
|
+
|
467
|
+
[data-taco='list-group'] > [data-taco='list-item-collapsible']:not(:last-child) > div {
|
468
|
+
@apply rounded-b-none;
|
469
|
+
}
|
470
|
+
|
459
471
|
.yt-navigation__item a,
|
460
472
|
.yt-navigation__item .yt-navigation__item__postfix {
|
461
473
|
@apply text-black;
|
package/dist/index.d.ts
CHANGED
@@ -22,6 +22,7 @@ export * from './components/HoverCard/HoverCard';
|
|
22
22
|
export * from './components/Icon/Icon';
|
23
23
|
export * from './components/IconButton/IconButton';
|
24
24
|
export * from './components/Input/Input';
|
25
|
+
export * from './components/List/List';
|
25
26
|
export * from './components/Listbox/Listbox';
|
26
27
|
export * from './components/Menu/Menu';
|
27
28
|
export * from './components/ModeSwitch/ModeSwitch';
|
@@ -3,6 +3,7 @@ import { ColumnFilter as ReactTableColumnFilter, ColumnFiltersState as ReactTabl
|
|
3
3
|
import { FontSize, FontSizes, ValueOf } from '../../types';
|
4
4
|
import { MenuProps } from '../../components/Menu/Menu';
|
5
5
|
import { MenuItemProps } from '../../components/Menu/components/Item';
|
6
|
+
declare type TODO = any;
|
6
7
|
export declare type TableRef = HTMLTableElement & {
|
7
8
|
instance: {
|
8
9
|
resetFiltering: () => void;
|
@@ -80,16 +81,15 @@ export declare type TableShortcutHandlerObject<TType = unknown> = {
|
|
80
81
|
meta?: boolean;
|
81
82
|
shift?: boolean;
|
82
83
|
};
|
83
|
-
export declare type TableFilterHandler = (filters: TableColumnFilter[]) => void
|
84
|
+
export declare type TableFilterHandler = (filters: TableColumnFilter[]) => void;
|
84
85
|
export declare type TableFontSize = keyof typeof FontSizes;
|
85
86
|
export declare type TablePreset = 'complex' | 'list' | 'simple';
|
86
87
|
export declare type TableRowExpansionRenderer<TType = unknown> = (row: TType) => (() => JSX.Element) | null;
|
87
88
|
export declare type TableScrollToIndexHandler = (index: number, options?: {
|
88
89
|
align: 'start' | 'center' | 'end' | 'auto';
|
89
90
|
}) => void;
|
90
|
-
export declare type
|
91
|
-
export declare type
|
92
|
-
export declare type TableServerLoadAllHandler = (sorting: TableColumnSort[], filters: TableColumnFilter[]) => Promise<void>;
|
91
|
+
export declare type TableServerLoadPageHandler = (pageIndex: number, sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<void>;
|
92
|
+
export declare type TableServerLoadAllHandler = (sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<void>;
|
93
93
|
export declare enum TableServerLoadAllState {
|
94
94
|
Incomplete = 0,
|
95
95
|
Loading = 1,
|
@@ -97,7 +97,7 @@ export declare enum TableServerLoadAllState {
|
|
97
97
|
}
|
98
98
|
export declare type TableSettingsHandler = (settings: TableSettings) => void | Promise<void>;
|
99
99
|
export declare type TableShortcuts<TType = unknown> = Record<string, TableShortcutHandlerFn<TType> | TableShortcutHandlerObject<TType>>;
|
100
|
-
export declare type TableSortHandler = (sorting: TableColumnSort[]) => void
|
100
|
+
export declare type TableSortHandler = (sorting: TableColumnSort[]) => void;
|
101
101
|
export declare type TableCustomSettingsRenderer = (props: TableSettings) => React.ReactElement<MenuItemProps>[];
|
102
102
|
export declare type TableEmptyStateRenderer = () => JSX.Element | null;
|
103
103
|
export declare type TableSettings = {
|
@@ -172,7 +172,7 @@ export declare type TableCommonProps<TType = unknown> = TableFeatureProps & {
|
|
172
172
|
onRowGoto?: TableRowGotoHandler;
|
173
173
|
onRowSelect?: TableRowSelectHandler<TType>;
|
174
174
|
onChangeFilter?: TableFilterHandler;
|
175
|
-
onChangeSearch?:
|
175
|
+
onChangeSearch?: TODO;
|
176
176
|
onChangeSettings?: TableSettingsHandler;
|
177
177
|
onChangeSort?: TableSortHandler;
|
178
178
|
};
|
@@ -374,3 +374,4 @@ export declare type TableTexts = {
|
|
374
374
|
tooltip: string;
|
375
375
|
};
|
376
376
|
};
|
377
|
+
export {};
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { TableColumnFilter, TableColumnSort, TableFilterHandler, TableServerLoadPageHandler, TableServerLoadAllHandler, TableSortHandler
|
1
|
+
import { TableColumnFilter, TableColumnSort, TableFilterHandler, TableServerLoadPageHandler, TableServerLoadAllHandler, TableSortHandler } from './types';
|
2
2
|
export declare const DEFAULT_PAGE_SIZE = 100;
|
3
|
-
export declare type useTableDataPageFetcher<TType = unknown> = (pageIndex: number, pageSize: number, sorting: TableColumnSort[], filters: TableColumnFilter[]) => Promise<{
|
3
|
+
export declare type useTableDataPageFetcher<TType = unknown> = (pageIndex: number, pageSize: number, sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<{
|
4
4
|
data: TType[];
|
5
5
|
length: number;
|
6
6
|
}>;
|
7
|
-
export declare type useTableDataAllFetcher<TType = unknown> = (sorting: TableColumnSort[], filters: TableColumnFilter[]) => Promise<{
|
7
|
+
export declare type useTableDataAllFetcher<TType = unknown> = (sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<{
|
8
8
|
data: TType[];
|
9
9
|
length: number;
|
10
10
|
}>;
|
@@ -17,8 +17,7 @@ export declare type useTableDataLoaderValues<TType = unknown> = {
|
|
17
17
|
loadAll: TableServerLoadAllHandler;
|
18
18
|
loadPage: TableServerLoadPageHandler;
|
19
19
|
onChangeFilter: TableFilterHandler;
|
20
|
-
onChangeSearch: TableSearchHandler;
|
21
20
|
onChangeSort: TableSortHandler;
|
22
21
|
pageSize: number;
|
23
22
|
};
|
24
|
-
export declare function useTableDataLoader<TType = unknown>(
|
23
|
+
export declare function useTableDataLoader<TType = unknown>(fetch: useTableDataPageFetcher<TType>, fetchAll: useTableDataAllFetcher<TType>, options?: useTableDataLoaderOptions): [useTableDataLoaderValues<TType>, () => void];
|
@@ -1,3 +1,2 @@
|
|
1
1
|
import { Table as ReactTable } from '@tanstack/react-table';
|
2
|
-
|
3
|
-
export declare function useTableSearchListener<TType = unknown>(table: ReactTable<TType>, onChangeSearch?: TableSearchHandler): void;
|
2
|
+
export declare function useTableSearchListener<TType = unknown>(table: ReactTable<TType>): void;
|