@economic/taco 2.46.9 → 2.46.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Report/Report.d.ts +1 -1
  12. package/dist/components/Select2/components/Option.d.ts +4 -4
  13. package/dist/components/Select2/components/Search.d.ts +1 -1
  14. package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +1 -2
  15. package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +1 -0
  16. package/dist/components/Table3/util/editing.d.ts +3 -0
  17. package/dist/components/Tag/Tag.d.ts +1 -1
  18. package/dist/esm/index.css +13 -4
  19. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  20. package/dist/esm/packages/taco/src/components/Badge/Badge.js +9 -6
  21. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  22. package/dist/esm/packages/taco/src/components/Button/Button.js +2 -1
  23. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  24. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  25. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  26. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  27. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  28. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  29. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  30. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  31. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  32. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  33. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  34. package/dist/esm/packages/taco/src/components/Icon/components/index.js +10 -0
  35. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +7 -5
  37. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +56 -19
  39. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +1 -1
  41. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Table3/Table3.js +15 -7
  43. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +2 -4
  45. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +3 -3
  47. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +9 -1
  49. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Tag/Tag.js +6 -4
  51. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  52. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +2 -1
  53. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  54. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +4 -0
  55. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  56. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +7 -2
  57. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  58. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  59. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  60. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +5 -3
  61. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  62. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +0 -2
  63. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  64. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +2 -1
  65. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  66. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +3 -1
  67. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  68. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  69. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +2 -1
  70. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  71. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
  72. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  73. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +7 -1
  74. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  75. package/dist/index.css +13 -4
  76. package/dist/primitives/Table/Core/Table.d.ts +1 -0
  77. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  78. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  79. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  80. package/dist/primitives/Table/types.d.ts +2 -1
  81. package/dist/primitives/Table/useTableManager/features/useTableRowExpansion.d.ts +2 -1
  82. package/dist/taco.cjs.development.js +220 -63
  83. package/dist/taco.cjs.development.js.map +1 -1
  84. package/dist/taco.cjs.production.min.js +1 -1
  85. package/dist/taco.cjs.production.min.js.map +1 -1
  86. package/package.json +2 -3
package/dist/index.css CHANGED
@@ -650,13 +650,22 @@ table[data-taco^='table'] tr[data-row-group]:first-child {
650
650
  @apply pt-0;
651
651
  }
652
652
 
653
+ /* Only apply -mt-px when the row group header is sticked to the top of the table.
654
+ margin-top -1px is needed to hide a little gap between the group header and table and the edge of the table.
655
+ If we'll not do this, then it will be slightly visible how rows are moving behind it when scrolled.
656
+ */
657
+
658
+ table[data-taco^='table'] tr[data-row-group]:first-child td {
659
+ @apply -mt-px;
660
+ }
661
+
653
662
  table[data-taco^='table'] tr[data-row-group]:not(:first-child):before {
654
663
  content: '';
655
- @apply bg-grey-100 border-grey-300 absolute left-0 right-0 top-0 h-10 border-t print:top-0 print:h-[2px] print:border-t-2;
664
+ @apply bg-grey-100 border-grey-300 absolute -top-1 left-0 right-0 h-10 border-t print:top-0 print:h-[2px] print:border-t-2;
656
665
  }
657
666
 
658
667
  table[data-taco^='table'] tr[data-row-group] td {
659
- @apply -mt-px border-b-2 border-t-0 font-bold;
668
+ @apply border-b-2 border-t-0 font-bold;
660
669
  }
661
670
 
662
671
  table[data-taco^='table'] tr:first-child td {
@@ -752,14 +761,14 @@ table[data-taco^='table'] td:not([data-cell-truncate='true']) {
752
761
  }
753
762
 
754
763
  /* FOOTER */
755
- table[data-taco^='table'] tfoot td {
764
+ table[data-taco^='table'] tfoot tr:not([data-row-index]) td {
756
765
  /*
757
766
  * Since footer has sticky position, the top and bottom padding ensures that the inner content doesn't come over
758
767
  * the border of the footer row.
759
768
  */
760
769
  @apply border-b-0 !py-1 font-bold;
761
770
  }
762
- table[data-taco^='table'] tfoot td:first-child {
771
+ table[data-taco^='table'] tfoot tr:not([data-row-index]) td:first-child {
763
772
  @apply z-30 !pb-0 !pt-[2px];
764
773
  }
765
774
 
@@ -13,6 +13,7 @@ export declare namespace Table {
13
13
  export declare type TableGridProps<TType = unknown> = React.TableHTMLAttributes<HTMLTableElement> & {
14
14
  'data-taco': string;
15
15
  enableHorizontalArrowKeyNavigation?: boolean;
16
+ footerRows?: null | JSX.Element | JSX.Element[];
16
17
  table: useTableReturnValue<TType>;
17
18
  };
18
19
  export declare function TableGrid<TType = unknown>(props: TableGridProps<TType>): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TableFilter } from '../../../../../types';
3
+ export declare const FilterContext: React.Context<TableFilter[]>;
@@ -4,7 +4,6 @@ import { TableFilter } from '../../../../../../types';
4
4
  export declare type FilterProps<TType = unknown> = {
5
5
  allColumns: ReactTableColumn<TType, unknown>[];
6
6
  filter: TableFilter;
7
- filters: TableFilter[];
8
7
  position: number;
9
8
  onChange: (position: number, value: TableFilter) => void;
10
9
  onRemove?: (position: number) => void;
@@ -1,12 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Column as ReactTableColumn } from '@tanstack/react-table';
3
3
  import { Select2Props } from '../../../../../../../../components/Select2/Select2';
4
- import { TableFilter } from '../../../../../../types';
5
4
  export declare type FilterColumnProps<TType = unknown> = Omit<Select2Props, 'children'> & {
6
5
  allColumns: ReactTableColumn<TType, unknown>[];
7
- filters: TableFilter[];
8
6
  };
9
7
  export declare const FilterColumn: React.ForwardRefExoticComponent<Pick<Select2Props, "defaultValue" | "onChange" | "value" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "autoFocus" | "emptyValue" | "disabled" | "fontSize" | "highlighted" | "invalid" | "loading" | "multiple" | "name" | "onCreate" | "onDelete" | "onEdit" | "readOnly" | "required" | "tags" | "createDialog" | "createTriggerText"> & {
10
8
  allColumns: ReactTableColumn<unknown, unknown>[];
11
- filters: TableFilter[];
12
9
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -41,7 +41,7 @@ export declare type TableColumnFilter = ReactTableColumnFilter;
41
41
  export declare type TableColumnMenu = ((columnId: string) => React.ReactNode | null)[];
42
42
  export declare type TableColumnRenderer<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;
43
43
  export declare type TableColumnRendererAggregate<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;
44
- export declare type TableColumnRendererControl<TType = unknown> = ((props: TableColumnRendererControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'checkbox' | 'textarea';
44
+ export declare type TableColumnRendererControl<TType = unknown> = ((props: TableColumnRendererControlProps, row?: TType, filterState?: TableFilter[]) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'checkbox' | 'textarea';
45
45
  export declare type TableColumnRendererControlProps = {
46
46
  className?: string;
47
47
  disabled?: boolean;
@@ -134,6 +134,7 @@ export declare type TableFeatureProps<TType = unknown> = {
134
134
  enableColumnHiding?: boolean;
135
135
  enableColumnResizing?: boolean;
136
136
  enableRowExpansion?: boolean;
137
+ enableRowExpansionAll?: boolean;
137
138
  enableRowSelection?: TableConditionalRowProp<TType>;
138
139
  enableColumnOrdering?: boolean;
139
140
  enableFontSize?: boolean;
@@ -1,5 +1,6 @@
1
1
  import { TableRowExpansionRenderer } from '../../types';
2
- export declare function useTableRowExpansion<TType = unknown>(isEnabled?: boolean, rowExpansionRenderer?: TableRowExpansionRenderer<TType>): {
2
+ export declare function useTableRowExpansion<TType = unknown>(isEnabled?: boolean, canExpandAll?: boolean, rowExpansionRenderer?: TableRowExpansionRenderer<TType>): {
3
3
  isEnabled: boolean;
4
+ canExpandAll: boolean;
4
5
  rowExpansionRenderer: TableRowExpansionRenderer<TType> | undefined;
5
6
  };