@economic/taco 2.23.0 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. package/dist/components/Card/Card.d.ts +1 -0
  2. package/dist/components/Checkbox/Checkbox.d.ts +2 -0
  3. package/dist/components/Provider/Localization.d.ts +4 -0
  4. package/dist/components/Report/components/Body/Body.d.ts +0 -1
  5. package/dist/components/Report/components/Footer/Summary.d.ts +0 -1
  6. package/dist/components/Report/components/Toolbar/components/Filters/components/Filter.d.ts +2 -2
  7. package/dist/components/Report/components/Toolbar/components/Filters/components/FilterColumn.d.ts +5 -2
  8. package/dist/components/Report/useReport.d.ts +0 -1
  9. package/dist/components/Select2/Select2.d.ts +4 -0
  10. package/dist/components/Select2/hooks/useChildren.d.ts +1 -0
  11. package/dist/components/Table3/components/toolbar/Filter/filters/components/Filter.d.ts +2 -2
  12. package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.d.ts +5 -2
  13. package/dist/esm/index.css +55 -46
  14. package/dist/esm/packages/taco/src/components/Button/util.js +8 -8
  15. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  16. package/dist/esm/packages/taco/src/components/Card/Card.js +2 -1
  17. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  18. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +11 -2
  19. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  20. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +1 -1
  21. package/dist/esm/packages/taco/src/components/Provider/Localization.js +5 -1
  22. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  23. package/dist/esm/packages/taco/src/components/Report/Report.js +3 -8
  24. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  25. package/dist/esm/packages/taco/src/components/Report/components/Body/Body.js +1 -2
  26. package/dist/esm/packages/taco/src/components/Report/components/Body/Body.js.map +1 -1
  27. package/dist/esm/packages/taco/src/components/Report/components/Footer/Footer.js +14 -2
  28. package/dist/esm/packages/taco/src/components/Report/components/Footer/Footer.js.map +1 -1
  29. package/dist/esm/packages/taco/src/components/Report/components/Footer/Summary.js +2 -2
  30. package/dist/esm/packages/taco/src/components/Report/components/Footer/Summary.js.map +1 -1
  31. package/dist/esm/packages/taco/src/components/Report/components/Internal/Selection.js +47 -11
  32. package/dist/esm/packages/taco/src/components/Report/components/Internal/Selection.js.map +1 -1
  33. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/ManageFiltersPopover.js +28 -43
  34. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  35. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Filter.js +14 -7
  36. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  37. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterColumn.js +4 -3
  38. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  39. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/Print.js +10 -8
  40. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/Print.js.map +1 -1
  41. package/dist/esm/packages/taco/src/components/Report/listeners/useTableRowActiveListener.js +2 -2
  42. package/dist/esm/packages/taco/src/components/Report/listeners/useTableRowActiveListener.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Report/styles/useCssGridStylesheet.js +7 -4
  44. package/dist/esm/packages/taco/src/components/Report/styles/useCssGridStylesheet.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Report/util/useTableGlobalShortcuts.js +3 -10
  46. package/dist/esm/packages/taco/src/components/Report/util/useTableGlobalShortcuts.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +2 -1
  48. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/Select2/Select2.js +43 -4
  50. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +1 -1
  52. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/Table3/Table3.js +4 -6
  54. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +66 -14
  56. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +27 -44
  58. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js +14 -7
  60. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +4 -3
  62. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +1 -1
  64. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +2 -0
  66. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -1
  68. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js +1 -1
  69. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +3 -1
  70. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +10 -3
  72. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  73. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  74. package/dist/esm/packages/taco/src/index.js +1 -1
  75. package/dist/esm/packages/taco/src/primitives/Button.js +1 -0
  76. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  77. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  78. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js +24 -4
  79. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +1 -1
  80. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableSettings.js +1 -2
  81. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableSettings.js.map +1 -1
  82. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSettingsListener.js +1 -1
  83. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSettingsListener.js.map +1 -1
  84. package/dist/esm/packages/taco/src/primitives/Table/useTable/useTable.js +7 -5
  85. package/dist/esm/packages/taco/src/primitives/Table/useTable/useTable.js.map +1 -1
  86. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js +33 -7
  87. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -1
  88. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/settings.js +0 -1
  89. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/settings.js.map +1 -1
  90. package/dist/esm/packages/taco/src/utils/dom.js +12 -3
  91. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  92. package/dist/esm/packages/taco/src/utils/keyboard.js +2 -2
  93. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  94. package/dist/hooks/useLocalStorage.d.ts +2 -1
  95. package/dist/index.css +55 -46
  96. package/dist/primitives/Table/types.d.ts +0 -2
  97. package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +10 -3
  98. package/dist/primitives/Table/useTable/useTable.d.ts +1 -1
  99. package/dist/primitives/Table/useTable/util/settings.d.ts +0 -1
  100. package/dist/taco.cjs.development.js +511 -387
  101. package/dist/taco.cjs.development.js.map +1 -1
  102. package/dist/taco.cjs.production.min.js +1 -1
  103. package/dist/taco.cjs.production.min.js.map +1 -1
  104. package/dist/utils/dom.d.ts +3 -1
  105. package/package.json +2 -2
  106. package/types.json +6781 -6993
  107. package/dist/components/Report/components/Toolbar/components/Filters/components/Placeholder.d.ts +0 -12
  108. package/dist/components/Table3/components/toolbar/Filter/filters/components/Placeholder.d.ts +0 -12
  109. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Placeholder.js +0 -41
  110. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Placeholder.js.map +0 -1
  111. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Placeholder.js +0 -41
  112. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Placeholder.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MenuProps } from '../Menu/Menu';
3
+ import './style.css';
3
4
  export declare type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {
4
5
  noPadding?: boolean;
5
6
  };
@@ -8,6 +8,8 @@ declare type CheckboxBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonEleme
8
8
  invalid?: boolean;
9
9
  /** Label for the checkbox */
10
10
  label?: React.ReactNode;
11
+ /** Displays loading state in checkbox */
12
+ loading?: boolean;
11
13
  required?: boolean;
12
14
  };
13
15
  interface UncontrolledCheckboxProps extends CheckboxBaseProps {
@@ -360,6 +360,10 @@ export declare const defaultLocalisationTexts: {
360
360
  save: string;
361
361
  search: string;
362
362
  searchOrCreate: string;
363
+ selectAll: string;
364
+ selectAllResults: string;
365
+ deselectAll: string;
366
+ deselectAllResults: string;
363
367
  };
364
368
  toasts: {
365
369
  dismiss: string;
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { Table as ReactTable } from '@tanstack/react-table';
3
3
  declare type BodyProps<TType = unknown> = React.HTMLAttributes<HTMLTableSectionElement> & {
4
4
  enableArrowKeyFocusing?: boolean;
5
- length: number;
6
5
  table: ReactTable<TType>;
7
6
  };
8
7
  export declare function Body<TType = unknown>(props: BodyProps<TType>): JSX.Element;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Table as ReactTable } from '@tanstack/react-table';
3
3
  export declare type FooterSummaryProps<TType = unknown> = {
4
- length: number;
5
4
  table: ReactTable<TType>;
6
5
  };
7
6
  export declare function Summary<TType = unknown>(props: FooterSummaryProps<TType>): JSX.Element;
@@ -6,7 +6,7 @@ export declare type FilterProps<TType = unknown> = {
6
6
  filter: TableFilter;
7
7
  filters: TableFilter[];
8
8
  position: number;
9
- onChange: (id: string, value: TableFilter) => void;
10
- onRemove: (columnId: string) => void;
9
+ onChange: (position: number, value: TableFilter) => void;
10
+ onRemove?: (position: number) => void;
11
11
  };
12
12
  export declare function Filter<TType = unknown>(props: FilterProps<TType>): JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { Column as ReactTableColumn } from '@tanstack/react-table';
3
3
  import { Select2Props } from '../../../../../../Select2/Select2';
4
4
  import { TableFilter } from '../../../../../../../primitives/Table/types';
@@ -6,4 +6,7 @@ export declare type FilterColumnProps<TType = unknown> = Omit<Select2Props, 'chi
6
6
  allColumns: ReactTableColumn<TType, unknown>[];
7
7
  filters: TableFilter[];
8
8
  };
9
- export declare function FilterColumn<TType = unknown>(props: FilterColumnProps<TType>): JSX.Element;
9
+ 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" | "highlighted" | "invalid" | "multiple" | "name" | "onCreate" | "onDelete" | "onEdit" | "readOnly" | "required" | "tags" | "fontSize"> & {
10
+ allColumns: ReactTableColumn<unknown, unknown>[];
11
+ filters: TableFilter[];
12
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -4,7 +4,6 @@ import { TableRef } from '../../primitives/Table/types';
4
4
  export declare function useReport<TType>(props: ReportProps<TType>, ref: React.RefObject<TableRef>): {
5
5
  id: string;
6
6
  instance: import("@tanstack/table-core").Table<TType>;
7
- length: number;
8
7
  meta: import("@tanstack/table-core").TableMeta<TType>;
9
8
  state: import("@tanstack/table-core").TableState;
10
9
  };
@@ -14,6 +14,10 @@ declare type Select2Texts = {
14
14
  save: string;
15
15
  search: string;
16
16
  searchOrCreate: string;
17
+ selectAll: string;
18
+ selectAllResults: string;
19
+ deselectAll: string;
20
+ deselectAllResults: string;
17
21
  };
18
22
  declare type Select2Props = Omit<React.HTMLAttributes<HTMLButtonElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> & {
19
23
  autoFocus?: boolean;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Select2OptionProps } from '../components/Option';
3
3
  import { Select2Children, Select2OptionValue, Select2Value } from '../types';
4
+ export declare const isGroup: (child: React.ReactElement) => boolean;
4
5
  export declare type useChildrenArgs = {
5
6
  children: Select2Children;
6
7
  emptyValue?: Select2OptionValue;
@@ -6,7 +6,7 @@ export declare type FilterProps<TType = unknown> = {
6
6
  filter: Table3Filter;
7
7
  filters: Table3Filter[];
8
8
  position: number;
9
- onChange: (id: string | null, value: Table3Filter) => void;
10
- onRemove: (columnId: string | null) => void;
9
+ onChange: (position: number, value: Table3Filter) => void;
10
+ onRemove?: (position: number) => void;
11
11
  };
12
12
  export declare function Filter<TType = unknown>(props: FilterProps<TType>): JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { Column as RTColumn } from '@tanstack/react-table';
3
3
  import { Select2Props } from '../../../../../../Select2/Select2';
4
4
  import { Table3Filter } from '../../../../../types';
@@ -6,4 +6,7 @@ export declare type FilterColumnProps<TType = unknown> = Omit<Select2Props, 'chi
6
6
  allColumns: RTColumn<TType, unknown>[];
7
7
  filters: Table3Filter[];
8
8
  };
9
- export declare function FilterColumn<TType = unknown>(props: FilterColumnProps<TType>): JSX.Element;
9
+ 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" | "highlighted" | "invalid" | "multiple" | "name" | "onCreate" | "onDelete" | "onEdit" | "readOnly" | "required" | "tags" | "fontSize"> & {
10
+ allColumns: RTColumn<unknown, unknown>[];
11
+ filters: Table3Filter[];
12
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -282,51 +282,9 @@
282
282
  @apply font-semibold;
283
283
  }
284
284
 
285
- [data-taco='scrollable-list'].yt-list--multiselect li:first-child {
286
- @apply border-grey-100 border-b-2 pl-4; /* Listbox max-height is dependant on this border-bottom-width value! */
287
- }
288
-
289
- [data-taco='scrollable-list'] li > [data-taco='icon'] {
290
- @apply mr-2;
291
- }
292
-
293
- [data-taco='scrollable-list']:not([readonly]) li:not([disabled]):hover {
294
- @apply wcag-grey-200;
295
- }
296
-
297
- [data-taco='scrollable-list']:not([readonly]) li:not([disabled]):hover [data-taco='icon'] {
298
- @apply wcag-grey-200;
299
- }
300
-
301
- [data-taco='scrollable-list'] li:focus,
302
- [data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'],
303
- [data-taco='scrollable-list'] li[data-focused='true'] {
304
- @apply wcag-blue-500;
305
- }
306
-
307
- [data-taco='scrollable-list'] li:focus [data-taco='icon'],
308
- [data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'] [data-taco='icon'],
309
- [data-taco='scrollable-list'] li[data-focused='true'] [data-taco='icon'] {
310
- @apply wcag-blue-500;
311
- }
312
-
313
- [data-taco='scrollable-list'][readonly] li {
314
- @apply cursor-not-allowed;
315
- }
316
-
317
- [data-taco='scrollable-list'] li[disabled],
318
- [data-taco='scrollable-list'][disabled] li[aria-selected='true'] {
319
- @apply cursor-not-allowed text-black text-opacity-25;
320
- }
321
-
322
- [data-taco='scrollable-list'] li.yt-list__empty,
323
- [data-taco='scrollable-list'] li.yt-list__empty:hover,
324
- [data-taco='scrollable-list'] li.yt-list__empty:focus {
325
- @apply text-grey-700 flex w-full items-center overflow-hidden bg-white px-3 italic;
326
- }
327
-
328
- [data-taco='scrollable-list'] li.yt-list__empty [data-taco='spinner'] {
329
- @apply mr-2 mt-2 h-5 w-5 opacity-75;
285
+ [data-taco='card'] [data-taco='report'],
286
+ [data-taco='card'] [data-taco='table2'] {
287
+ @apply !border-0;
330
288
  }
331
289
 
332
290
  [data-taco='spinner'] svg circle {
@@ -404,6 +362,53 @@
404
362
  stroke: currentColor;
405
363
  }
406
364
 
365
+ [data-taco='scrollable-list'].yt-list--multiselect li:first-child {
366
+ @apply border-grey-100 border-b-2 pl-4; /* Listbox max-height is dependant on this border-bottom-width value! */
367
+ }
368
+
369
+ [data-taco='scrollable-list'] li > [data-taco='icon'] {
370
+ @apply mr-2;
371
+ }
372
+
373
+ [data-taco='scrollable-list']:not([readonly]) li:not([disabled]):hover {
374
+ @apply wcag-grey-200;
375
+ }
376
+
377
+ [data-taco='scrollable-list']:not([readonly]) li:not([disabled]):hover [data-taco='icon'] {
378
+ @apply wcag-grey-200;
379
+ }
380
+
381
+ [data-taco='scrollable-list'] li:focus,
382
+ [data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'],
383
+ [data-taco='scrollable-list'] li[data-focused='true'] {
384
+ @apply wcag-blue-500;
385
+ }
386
+
387
+ [data-taco='scrollable-list'] li:focus [data-taco='icon'],
388
+ [data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'] [data-taco='icon'],
389
+ [data-taco='scrollable-list'] li[data-focused='true'] [data-taco='icon'] {
390
+ @apply wcag-blue-500;
391
+ }
392
+
393
+ [data-taco='scrollable-list'][readonly] li {
394
+ @apply cursor-not-allowed;
395
+ }
396
+
397
+ [data-taco='scrollable-list'] li[disabled],
398
+ [data-taco='scrollable-list'][disabled] li[aria-selected='true'] {
399
+ @apply cursor-not-allowed text-black text-opacity-25;
400
+ }
401
+
402
+ [data-taco='scrollable-list'] li.yt-list__empty,
403
+ [data-taco='scrollable-list'] li.yt-list__empty:hover,
404
+ [data-taco='scrollable-list'] li.yt-list__empty:focus {
405
+ @apply text-grey-700 flex w-full items-center overflow-hidden bg-white px-3 italic;
406
+ }
407
+
408
+ [data-taco='scrollable-list'] li.yt-list__empty [data-taco='spinner'] {
409
+ @apply mr-2 mt-2 h-5 w-5 opacity-75;
410
+ }
411
+
407
412
  [data-taco='combobox'] > [aria-expanded='true'] + [role='dialog'] > ul,
408
413
  [data-taco='combobox'] > [aria-expanded='true'] + [role='dialog'] > ul:hover {
409
414
  @apply border-blue-500;
@@ -574,9 +579,13 @@ table[data-taco='report'] tfoot {
574
579
  /* z-indexes & layout */
575
580
  @apply sticky bottom-0 isolate z-20;
576
581
  /* grid */
577
- @apply col-span-full grid auto-rows-min grid-cols-[subgrid];
582
+ @apply col-span-full grid grid-cols-[subgrid] grid-rows-[calc(theme(spacing.10)_+_2px)];
578
583
  }
579
584
 
585
+ table[data-taco='report'] tfoot > tr {
586
+ @apply grid-rows-[calc(theme(spacing.10)_+_2px)];
587
+ }
588
+
580
589
  table[data-taco='report'] tbody {
581
590
  /* z-indexes & layout */
582
591
  @apply isolate z-10;
@@ -3,29 +3,29 @@ import { Button } from '../../primitives/Button.js';
3
3
  import { Tooltip } from '../Tooltip/Tooltip.js';
4
4
 
5
5
  const getButtonClasses = () => {
6
- return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center focus-visible:yt-focus disabled:cursor-not-allowed';
6
+ return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center focus-visible:yt-focus aria-disabled:cursor-not-allowed';
7
7
  };
8
8
  const getAppearanceClasses = (value, icon = false) => {
9
9
  switch (value) {
10
10
  case 'primary':
11
- return `wcag-blue-500 enabled:hover:wcag-blue-700 enabled:hover:active:wcag-blue-500 disabled:bg-blue-500/50`;
11
+ return `wcag-blue-500 visited:wcag-blue-500 hover:wcag-blue-700 hover:active:wcag-blue-500 aria-disabled:bg-blue-500/50 aria-disabled:active:bg-blue-500/50`;
12
12
  case 'danger':
13
- return `wcag-red-500 enabled:hover:wcag-red-700 enabled:hover:active:wcag-red-500 disabled:bg-red-500/50`;
13
+ return `wcag-red-500 visited:wcag-red-500 hover:wcag-red-700 hover:active:wcag-red-500 aria-disabled:bg-red-500/50 aria-disabled:active:bg-red-500/50`;
14
14
  case 'ghost':
15
- return `bg-white border border-blue-500 text-blue-500 enabled:hover:bg-blue-100 enabled:hover:text-blue-700 disabled:border-blue-500/50 disabled:text-blue-500/50`;
15
+ return `bg-white border border-blue-500 text-blue-500 visited:text-blue-500 hover:bg-blue-100 hover:text-blue-700 aria-disabled:border-blue-500/50 aria-disabled:text-blue-500/50 aria-disabled:bg-white`;
16
16
  case 'discrete':
17
17
  {
18
18
  if (icon) {
19
- return `bg-transparent text-black enabled:hover:bg-[#000]/[0.08] disabled:text-black/30`;
19
+ return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30`;
20
20
  }
21
- return `bg-transparent text-blue-500 enabled:hover:text-blue-700 disabled:text-blue-500/50`;
21
+ return `bg-transparent text-blue-500 visited:text-blue-500 hover:text-blue-700 aria-disabled:text-blue-500/50`;
22
22
  }
23
23
  case 'transparent':
24
24
  {
25
- return `bg-transparent text-black enabled:hover:text-black enabled:hover:bg-[#000]/[0.08] disabled:text-black/30`;
25
+ return `bg-transparent text-black visited:text-black hover:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30 aria-disabled:bg-transparent`;
26
26
  }
27
27
  default:
28
- return `wcag-grey-200 enabled:hover:wcag-grey-300 disabled:bg-grey-200/50 disabled:text-black/30`;
28
+ return `wcag-grey-200 visited:wcag-grey-200 hover:wcag-grey-300 aria-disabled:bg-grey-200/50 aria-disabled:text-black/30`;
29
29
  }
30
30
  };
31
31
  const createButtonWithTooltip = (props, className, ref) => {
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../src/components/Button/util.tsx"],"sourcesContent":["import React from 'react';\nimport { Appearance } from '../../types';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Tooltip } from '../Tooltip/Tooltip';\n\nexport const getButtonClasses = () => {\n return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center focus-visible:yt-focus disabled:cursor-not-allowed';\n};\n\nexport const getAppearanceClasses = (value: Appearance | undefined, icon = false): string => {\n switch (value) {\n case 'primary':\n return `wcag-blue-500 enabled:hover:wcag-blue-700 enabled:hover:active:wcag-blue-500 disabled:bg-blue-500/50`;\n\n case 'danger':\n return `wcag-red-500 enabled:hover:wcag-red-700 enabled:hover:active:wcag-red-500 disabled:bg-red-500/50`;\n\n case 'ghost':\n return `bg-white border border-blue-500 text-blue-500 enabled:hover:bg-blue-100 enabled:hover:text-blue-700 disabled:border-blue-500/50 disabled:text-blue-500/50`;\n\n case 'discrete': {\n if (icon) {\n return `bg-transparent text-black enabled:hover:bg-[#000]/[0.08] disabled:text-black/30`;\n }\n\n return `bg-transparent text-blue-500 enabled:hover:text-blue-700 disabled:text-blue-500/50`;\n }\n\n case 'transparent': {\n return `bg-transparent text-black enabled:hover:text-black enabled:hover:bg-[#000]/[0.08] disabled:text-black/30`;\n }\n\n default:\n return `wcag-grey-200 enabled:hover:wcag-grey-300 disabled:bg-grey-200/50 disabled:text-black/30`;\n }\n};\n\nexport const createButtonWithTooltip = (\n props: any,\n className: string,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n): JSX.Element => {\n const { tooltip, ...buttonProps } = props;\n const button = <ButtonPrimitive.Button {...buttonProps} className={className} ref={ref} />;\n\n if (tooltip) {\n return <Tooltip title={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n};\n\nexport const createButtonWithOverlays = (props: any, buttonBase: JSX.Element) => {\n const { dialog, drawer, hanger, menu, popover } = props;\n let button = buttonBase;\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button });\n } else if (typeof drawer === 'function') {\n button = drawer({ trigger: button });\n } else if (typeof menu === 'function') {\n button = menu({ trigger: button });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n if (typeof hanger === 'function') {\n button = hanger({ anchor: button });\n }\n\n return button;\n};\n"],"names":["getButtonClasses","getAppearanceClasses","value","icon","createButtonWithTooltip","props","className","ref","tooltip","buttonProps","button","React","ButtonPrimitive","Tooltip","title","createButtonWithOverlays","buttonB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;IACnCV,MAAM,GAAGU,IAAI,CAAC;MAAEE,OAAO,EAAEZ;KAAQ,CAAC;GACrC,MAAM,IAAI,OAAOW,OAAO,KAAK,UAAU,EAAE;IACtCX,MAAM,GAAGW,OAAO,CAAC;MAAEC,OAAO,EAAEZ;KAAQ,CAAC;;EAGzC,IAAI,OAAOS,MAAM,KAAK,UAAU,EAAE;IAC9BT,MAAM,GAAGS,MAAM,CAAC;MAAEI,MAAM,EAAEb;KAAQ,CAAC;;EAGvC,OAAOA,MAAM;AACjB;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../src/components/Button/util.tsx"],"sourcesContent":["import React from 'react';\nimport { Appearance } from '../../types';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Tooltip } from '../Tooltip/Tooltip';\n\nexport const getButtonClasses = () => {\n return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center focus-visible:yt-focus aria-disabled:cursor-not-allowed';\n};\n\nexport const getAppearanceClasses = (value: Appearance | undefined, icon = false): string => {\n switch (value) {\n case 'primary':\n return `wcag-blue-500 visited:wcag-blue-500 hover:wcag-blue-700 hover:active:wcag-blue-500 aria-disabled:bg-blue-500/50 aria-disabled:active:bg-blue-500/50`;\n\n case 'danger':\n return `wcag-red-500 visited:wcag-red-500 hover:wcag-red-700 hover:active:wcag-red-500 aria-disabled:bg-red-500/50 aria-disabled:active:bg-red-500/50`;\n\n case 'ghost':\n return `bg-white border border-blue-500 text-blue-500 visited:text-blue-500 hover:bg-blue-100 hover:text-blue-700 aria-disabled:border-blue-500/50 aria-disabled:text-blue-500/50 aria-disabled:bg-white`;\n\n case 'discrete': {\n if (icon) {\n return `bg-transparent text-black visited:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30`;\n }\n\n return `bg-transparent text-blue-500 visited:text-blue-500 hover:text-blue-700 aria-disabled:text-blue-500/50`;\n }\n\n case 'transparent': {\n return `bg-transparent text-black visited:text-black hover:text-black hover:bg-[#000]/[0.08] aria-disabled:text-black/30 aria-disabled:bg-transparent`;\n }\n\n default:\n return `wcag-grey-200 visited:wcag-grey-200 hover:wcag-grey-300 aria-disabled:bg-grey-200/50 aria-disabled:text-black/30`;\n }\n};\n\nexport const createButtonWithTooltip = (\n props: any,\n className: string,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>\n): JSX.Element => {\n const { tooltip, ...buttonProps } = props;\n const button = <ButtonPrimitive.Button {...buttonProps} className={className} ref={ref} />;\n\n if (tooltip) {\n return <Tooltip title={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n};\n\nexport const createButtonWithOverlays = (props: any, buttonBase: JSX.Element) => {\n const { dialog, drawer, hanger, menu, popover } = props;\n let button = buttonBase;\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button });\n } else if (typeof drawer === 'function') {\n button = drawer({ trigger: button });\n } else if (typeof menu === 'function') {\n button = menu({ trigger: button });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n if (typeof hanger === 'function') {\n button = hanger({ anchor: button });\n }\n\n return button;\n};\n"],"names":["getButtonClasses","getAppearanceClasses","value","icon","createButtonWithTooltip","props","className","ref","tooltip","buttonProps","button","React","ButtonPrimitive","Tooltip","title","createButtonWithOverlays","buttonBase","dialog","drawer","hanger","menu","popover","trigger","anchor"],"mappings":";;;;MAKaA,gBAAgB,GAAGA;EAC5B,OAAO,uLAAuL;AAClM;MAEaC,oBAAoB,GAAGA,CAACC,KAA6B,EAAEC,IAAI,GAAG,KAAK;EAC5E,QAAQD,KAAK;IACT,KAAK,SAAS;MACV,4JAA4J;IAEhK,KAAK,QAAQ;MACT,sJAAsJ;IAE1J,KAAK,OAAO;MACR,yMAAyM;IAE7M,KAAK,UAAU;MAAE;QACb,IAAIC,IAAI,EAAE;UACN,wGAAwG;;QAG5G,8GAA8G;;IAGlH,KAAK,aAAa;MAAE;QAChB,sJAAsJ;;IAG1J;MACI,yHAAyH;;AAErI;M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/createElement("div", Object.assign({}, props, {
15
15
  className: className,
16
+ "data-taco": "card-content",
16
17
  ref: ref
17
18
  }));
18
19
  });
@@ -22,7 +23,7 @@ const Card = /*#__PURE__*/forwardRef(function Card(props, ref) {
22
23
  menu,
23
24
  children
24
25
  } = props;
25
- const className = cn('bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500 [&_[data-taco="table2"]]:!border-0', props.className);
26
+ const className = cn('bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500', props.className);
26
27
  return /*#__PURE__*/createElement("div", {
27
28
  className: className,
28
29
  "data-taco": "card",
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\n\nimport { MenuProps } from '../Menu/Menu';\nimport { IconButton } from '../IconButton/IconButton';\nimport { Truncate } from '../Truncate/Truncate';\n\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n noPadding?: boolean;\n};\n\nconst Content = React.forwardRef<HTMLDivElement, CardContentProps>(function CardContent(externalProps, ref) {\n const { noPadding, ...props } = externalProps;\n const className = cn(\n 'flex-grow overflow-auto',\n {\n 'mx-4 mb-4': !noPadding,\n },\n props.className\n );\n return <div {...props} className={className} ref={ref} />;\n});\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Title of the Card */\n title: string | React.ReactElement;\n /** Menu component associated with the Card */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n};\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\n const { title, menu, children } = props;\n const className = cn(\n 'bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500 [&_[data-taco=\"table2\"]]:!border-0',\n props.className\n );\n\n return (\n <div className={className} data-taco=\"card\" ref={ref}>\n <div className=\"mx-4 mb-2 mt-4 flex\">\n {title && (\n <Truncate tooltip={title}>\n <h4 className=\"mb-0 flex-grow truncate text-left\">{title}</h4>\n </Truncate>\n )}\n {menu ? <IconButton icon=\"ellipsis-horizontal\" appearance=\"discrete\" menu={menu} className=\"-mt-[4px]\" /> : null}\n </div>\n {children}\n </div>\n );\n}) as React.ForwardRefExoticComponent<CardProps> & {\n Content: React.ForwardRefExoticComponent<CardContentProps>;\n};\nCard.Content = Content;\n"],"names":["Content","React","CardContent","externalProps","ref","noPadding","props","className","cn","Card","title","menu","children","Truncate","tooltip","IconButton","icon","appearance"],"mappings":";;;;;AAWA,MAAMA,OAAO,gBAAGC,UAAgB,CAAmC,SAASC,WAAWA,CAACC,aAAa,EAAEC,GAAG;EACtG,MAAM;IAAEC,SAAS;IAAE,GAAGC;GAAO,GAAGH,aAAa;EAC7C,MAAMI,SAAS,GAAGC,EAAE,CAChB,yBAAyB,EACzB;IACI,WAAW,EAAE,CAACH;GACjB,EACDC,KAAK,CAACC,SAAS,CAClB;EACD,oBAAON,uCAASK,KAAK;IAAEC,SAAS,EAAEA,SAAS;IAAEH,GAAG,EAAEA;KAAO;AAC7D,CAAC,CAAC;MASWK,IAAI,gBAAGR,UAAgB,CAA4B,SAASQ,IAAIA,CAACH,KAAK,EAAEF,GAAG;EACpF,MAAM;IAAEM,KAAK;IAAEC,IAAI;IAAEC;GAAU,GAAGN,KAAK;EACvC,MAAMC,SAAS,GAAGC,EAAE,CAChB,qJAAqJ,EACrJF,KAAK,CAACC,SAAS,CAClB;EAED,oBACIN;IAAKM,SAAS,EAAEA,SAAS;iBAAY,MAAM;IAACH,GAAG,EAAEA;kBAC7CH;IAAKM,SAAS,EAAC;KACVG,KAAK,mBACFT,cAACY,QAAQ;IAACC,OAAO,EAAEJ;kBACfT;IAAIM,SAAS,EAAC;KAAqCG,KAAK,CAAM,CACvD,CACd,EACAC,IAAI,gBAAGV,cAACc,UAAU;IAACC,IAAI,EAAC,qBAAqB;IAACC,UAAU,EAAC,UAAU;IAACN,IAAI,EAAEA,IAAI;IAAEJ,SAAS,EAAC;IAAc,GAAG,IAAI,CAC9G,EACLK,QAAQ,CACP;AAEd,CAAC;AAGDH,IAAI,CAACT,OAAO,GAAGA,OAAO;;;;"}
1
+ {"version":3,"file":"Card.js","sources":["../../../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { MenuProps } from '../Menu/Menu';\nimport { IconButton } from '../IconButton/IconButton';\nimport { Truncate } from '../Truncate/Truncate';\nimport './style.css';\n\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n noPadding?: boolean;\n};\n\nconst Content = React.forwardRef<HTMLDivElement, CardContentProps>(function CardContent(externalProps, ref) {\n const { noPadding, ...props } = externalProps;\n const className = cn(\n 'flex-grow overflow-auto',\n {\n 'mx-4 mb-4': !noPadding,\n },\n props.className\n );\n return <div {...props} className={className} data-taco=\"card-content\" ref={ref} />;\n});\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Title of the Card */\n title: string | React.ReactElement;\n /** Menu component associated with the Card */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n};\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(props, ref) {\n const { title, menu, children } = props;\n const className = cn(\n 'bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500',\n props.className\n );\n\n return (\n <div className={className} data-taco=\"card\" ref={ref}>\n <div className=\"mx-4 mb-2 mt-4 flex\">\n {title && (\n <Truncate tooltip={title}>\n <h4 className=\"mb-0 flex-grow truncate text-left\">{title}</h4>\n </Truncate>\n )}\n {menu ? <IconButton icon=\"ellipsis-horizontal\" appearance=\"discrete\" menu={menu} className=\"-mt-[4px]\" /> : null}\n </div>\n {children}\n </div>\n );\n}) as React.ForwardRefExoticComponent<CardProps> & {\n Content: React.ForwardRefExoticComponent<CardContentProps>;\n};\nCard.Content = Content;\n"],"names":["Content","React","CardContent","externalProps","ref","noPadding","props","className","cn","Card","title","menu","children","Truncate","tooltip","IconButton","icon","appearance"],"mappings":";;;;;AAWA,MAAMA,OAAO,gBAAGC,UAAgB,CAAmC,SAASC,WAAWA,CAACC,aAAa,EAAEC,GAAG;EACtG,MAAM;IAAEC,SAAS;IAAE,GAAGC;GAAO,GAAGH,aAAa;EAC7C,MAAMI,SAAS,GAAGC,EAAE,CAChB,yBAAyB,EACzB;IACI,WAAW,EAAE,CAACH;GACjB,EACDC,KAAK,CAACC,SAAS,CAClB;EACD,oBAAON,uCAASK,KAAK;IAAEC,SAAS,EAAEA,SAAS;iBAAY,cAAc;IAACH,GAAG,EAAEA;KAAO;AACtF,CAAC,CAAC;MASWK,IAAI,gBAAGR,UAAgB,CAA4B,SAASQ,IAAIA,CAACH,KAAK,EAAEF,GAAG;EACpF,MAAM;IAAEM,KAAK;IAAEC,IAAI;IAAEC;GAAU,GAAGN,KAAK;EACvC,MAAMC,SAAS,GAAGC,EAAE,CAChB,kHAAkH,EAClHF,KAAK,CAACC,SAAS,CAClB;EAED,oBACIN;IAAKM,SAAS,EAAEA,SAAS;iBAAY,MAAM;IAACH,GAAG,EAAEA;kBAC7CH;IAAKM,SAAS,EAAC;KACVG,KAAK,mBACFT,cAACY,QAAQ;IAACC,OAAO,EAAEJ;kBACfT;IAAIM,SAAS,EAAC;KAAqCG,KAAK,CAAM,CACvD,CACd,EACAC,IAAI,gBAAGV,cAACc,UAAU;IAACC,IAAI,EAAC,qBAAqB;IAACC,UAAU,EAAC,UAAU;IAACN,IAAI,EAAEA,IAAI;IAAEJ,SAAS,EAAC;IAAc,GAAG,IAAI,CAC9G,EACLK,QAAQ,CACP;AAEd,CAAC;AAGDH,IAAI,CAACT,OAAO,GAAGA,OAAO;;;;"}
@@ -3,6 +3,7 @@ import cn from 'clsx';
3
3
  import { Icon } from '../Icon/Icon.js';
4
4
  import { Root, Indicator } from '@radix-ui/react-checkbox';
5
5
  import { useId } from '../../hooks/useId.js';
6
+ import { Spinner } from '../Spinner/Spinner.js';
6
7
 
7
8
  const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
8
9
  const {
@@ -10,6 +11,7 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
10
11
  indeterminate,
11
12
  invalid,
12
13
  label,
14
+ loading,
13
15
  onChange,
14
16
  ...otherProps
15
17
  } = props;
@@ -40,6 +42,11 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
40
42
  event.currentTarget.click();
41
43
  }
42
44
  };
45
+ const spinnerClassname = cn(
46
+ //Spinner is slightly bigger then 'line' and 'tick' icons, so making it 2px smaller from each side
47
+ "m-0.5 !h-[calc(100%-theme('spacing.1'))] !w-[calc(100%-theme('spacing.1'))]", {
48
+ 'text-blue-500': !checked && !indeterminate
49
+ });
43
50
  const element = /*#__PURE__*/createElement(Root, Object.assign({}, otherProps, labelledByProps, {
44
51
  "aria-invalid": invalid ? 'true' : undefined,
45
52
  "data-taco": "checkbox",
@@ -48,12 +55,14 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
48
55
  onCheckedChange: handleChange,
49
56
  onKeyDown: handleKeyDown,
50
57
  ref: ref
51
- }), /*#__PURE__*/createElement(Indicator, {
58
+ }), loading ? ( /*#__PURE__*/createElement(Spinner, {
59
+ className: spinnerClassname
60
+ })) : ( /*#__PURE__*/createElement(Indicator, {
52
61
  className: "flex h-full w-full"
53
62
  }, /*#__PURE__*/createElement(Icon, {
54
63
  name: indeterminate ? 'line' : 'tick',
55
64
  className: "!h-full !w-full"
56
- })));
65
+ }))));
57
66
  if (label) {
58
67
  const labelContainerClassName = cn('flex items-center cursor-pointer gap-2', {
59
68
  'cursor-not-allowed text-grey-300': props.disabled
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Icon } from '../Icon/Icon';\nimport { useId } from '../../hooks/useId';\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /**\n * Indeterminate state should only be used with sub-checkboxes. The indeterminate state is shown if not all\n * sub-checkboxes are selected. This only affects the style, changing the icon in the checkbox.\n */\n indeterminate?: boolean;\n /* Whether the checkbox is in an invalid state */\n invalid?: boolean;\n /** Label for the checkbox */\n label?: React.ReactNode;\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledCheckboxProps extends CheckboxBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledCheckboxProps extends CheckboxBaseProps {\n defaultChecked?: never;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean) => void;\n}\n\nexport type CheckboxProps = UncontrolledCheckboxProps | ControlledCheckboxProps;\n\nexport const Checkbox = React.forwardRef(function Checkbox(props: CheckboxProps, ref: React.Ref<HTMLButtonElement>) {\n const { checked, indeterminate, invalid, label, onChange, ...otherProps } = props;\n const id = useId(props.id);\n\n const className = cn(\n 'bg-white h-5 w-5 border rounded text-sm flex-shrink-0 mt-[0.1rem] focus-visible:yt-focus disabled:cursor-not-allowed text-white',\n {\n 'self-start': !!label,\n },\n invalid\n ? {\n 'border-red-500 hover:border-red-700 aria-checked:border-red-500 aria-checked-mixed:border-red-500 aria-checked:bg-red-500 aria-checked-mixed:bg-red-500 aria-checked:hover:border-red-700 aria-checked-mixed:hover:border-red-700 aria-checked:hover:bg-red-700 aria-checked-mixed:hover:bg-red-700':\n !props.disabled,\n 'border-red-500/50 aria-checked:wcag-red-500/50 aria-checked-mixed:wcag-red-500/50': props.disabled,\n }\n : {\n 'border-grey-500 hover:border-grey-700 aria-checked:border-blue-500 aria-checked-mixed:border-blue-500 aria-checked:bg-blue-500 aria-checked-mixed:bg-blue-500 aria-checked:hover:border-blue-700 aria-checked-mixed:hover:border-blue-700 aria-checked:hover:bg-blue-700 aria-checked-mixed:hover:bg-blue-700':\n !props.disabled,\n 'border-grey-500/50 aria-checked:bg-blue-500/50 aria-checked-mixed:bg-blue-500/50': props.disabled,\n },\n props.className\n );\n\n let handleChange: ((checked: CheckedState) => void) | undefined;\n\n if (onChange) {\n handleChange = (checked: CheckedState) => onChange(checked === 'indeterminate' ? false : checked);\n }\n\n let labelledByProps: Record<string, string> | null = null;\n\n if (label) {\n labelledByProps = {\n 'aria-labelledby': `${id}-label`,\n id,\n };\n }\n\n // the enter keyboard shortcut isn't supported by default, but we want it\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter') {\n event.currentTarget.click();\n }\n };\n\n const element = (\n <CheckboxPrimitive.Root\n {...otherProps}\n {...labelledByProps}\n aria-invalid={invalid ? 'true' : undefined}\n data-taco=\"checkbox\"\n checked={indeterminate ? 'indeterminate' : checked}\n className={className}\n onCheckedChange={handleChange}\n onKeyDown={handleKeyDown}\n ref={ref}>\n <CheckboxPrimitive.Indicator className=\"flex h-full w-full\">\n <Icon name={indeterminate ? 'line' : 'tick'} className=\"!h-full !w-full\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n if (label) {\n const labelContainerClassName = cn('flex items-center cursor-pointer gap-2', {\n 'cursor-not-allowed text-grey-300': props.disabled,\n });\n\n return (\n <span className={labelContainerClassName} data-taco=\"checkbox-container\">\n {element}\n <label htmlFor={id} id={`${id}-label`}>\n {label}\n </label>\n </span>\n );\n }\n\n return element;\n});\nCheckbox.displayName = 'Checkbox';\n"],"names":["Checkbox","React","props","ref","checked","indeterminate","invalid","label","onChange","otherProps","id","useId","className","cn","disabled","handleChange","labelledByProps","handleKeyDown","event","key","currentTarget","click","element","CheckboxPrimitive","undefined","onCheckedChange","onKeyDown","Icon","name","labelContainerClassName","htmlFor","displayName"],"mappings":";;;;;;MAuCaA,QAAQ,gBAAGC,UAA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SAA2B;IAACX,SAAS,EAAC;kBACnCX,cAAC0B,IAAI;IAACC,IAAI,EAAEvB,aAAa,GAAG,MAAM,GAAG,MAAM;IAAEO,SAAS,EAAC;IAAoB,CACjD,CAErC;EAED,IAAIL,KAAK,EAAE;IACP,MAAMsB,uBAAuB,GAAGhB,EAAE,CAAC,wCAAwC,EAAE;MACzE,kCAAkC,EAAEX,KAAK,CAACY;KAC7C,CAAC;IAEF,oBACIb;MAAMW,SAAS,EAAEiB,uBAAuB;mBAAY;OAC/CP,OAAO,eACRrB;MAAO6B,OAAO,EAAEpB,EAAE;MAAEA,EAAE,KAAKA;OACtBH,KAAK,CACF,CACL;;EAIf,OAAOe,OAAO;AAClB,CAAC;AACDtB,QAAQ,CAAC+B,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Icon } from '../Icon/Icon';\nimport { useId } from '../../hooks/useId';\nimport { Spinner } from '../Spinner/Spinner';\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /**\n * Indeterminate state should only be used with sub-checkboxes. The indeterminate state is shown if not all\n * sub-checkboxes are selected. This only affects the style, changing the icon in the checkbox.\n */\n indeterminate?: boolean;\n /* Whether the checkbox is in an invalid state */\n invalid?: boolean;\n /** Label for the checkbox */\n label?: React.ReactNode;\n /** Displays loading state in checkbox */\n loading?: boolean;\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledCheckboxProps extends CheckboxBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledCheckboxProps extends CheckboxBaseProps {\n defaultChecked?: never;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean) => void;\n}\n\nexport type CheckboxProps = UncontrolledCheckboxProps | ControlledCheckboxProps;\n\nexport const Checkbox = React.forwardRef(function Checkbox(props: CheckboxProps, ref: React.Ref<HTMLButtonElement>) {\n const { checked, indeterminate, invalid, label, loading, onChange, ...otherProps } = props;\n const id = useId(props.id);\n\n const className = cn(\n 'bg-white h-5 w-5 border rounded text-sm flex-shrink-0 mt-[0.1rem] focus-visible:yt-focus disabled:cursor-not-allowed text-white',\n {\n 'self-start': !!label,\n },\n invalid\n ? {\n 'border-red-500 hover:border-red-700 aria-checked:border-red-500 aria-checked-mixed:border-red-500 aria-checked:bg-red-500 aria-checked-mixed:bg-red-500 aria-checked:hover:border-red-700 aria-checked-mixed:hover:border-red-700 aria-checked:hover:bg-red-700 aria-checked-mixed:hover:bg-red-700':\n !props.disabled,\n 'border-red-500/50 aria-checked:wcag-red-500/50 aria-checked-mixed:wcag-red-500/50': props.disabled,\n }\n : {\n 'border-grey-500 hover:border-grey-700 aria-checked:border-blue-500 aria-checked-mixed:border-blue-500 aria-checked:bg-blue-500 aria-checked-mixed:bg-blue-500 aria-checked:hover:border-blue-700 aria-checked-mixed:hover:border-blue-700 aria-checked:hover:bg-blue-700 aria-checked-mixed:hover:bg-blue-700':\n !props.disabled,\n 'border-grey-500/50 aria-checked:bg-blue-500/50 aria-checked-mixed:bg-blue-500/50': props.disabled,\n },\n props.className\n );\n\n let handleChange: ((checked: CheckedState) => void) | undefined;\n\n if (onChange) {\n handleChange = (checked: CheckedState) => onChange(checked === 'indeterminate' ? false : checked);\n }\n\n let labelledByProps: Record<string, string> | null = null;\n\n if (label) {\n labelledByProps = {\n 'aria-labelledby': `${id}-label`,\n id,\n };\n }\n\n // the enter keyboard shortcut isn't supported by default, but we want it\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter') {\n event.currentTarget.click();\n }\n };\n\n const spinnerClassname = cn(\n //Spinner is slightly bigger then 'line' and 'tick' icons, so making it 2px smaller from each side\n \"m-0.5 !h-[calc(100%-theme('spacing.1'))] !w-[calc(100%-theme('spacing.1'))]\",\n { 'text-blue-500': !checked && !indeterminate }\n );\n\n const element = (\n <CheckboxPrimitive.Root\n {...otherProps}\n {...labelledByProps}\n aria-invalid={invalid ? 'true' : undefined}\n data-taco=\"checkbox\"\n checked={indeterminate ? 'indeterminate' : checked}\n className={className}\n onCheckedChange={handleChange}\n onKeyDown={handleKeyDown}\n ref={ref}>\n {loading ? (\n <Spinner className={spinnerClassname} />\n ) : (\n <CheckboxPrimitive.Indicator className=\"flex h-full w-full\">\n <Icon name={indeterminate ? 'line' : 'tick'} className=\"!h-full !w-full\" />\n </CheckboxPrimitive.Indicator>\n )}\n </CheckboxPrimitive.Root>\n );\n\n if (label) {\n const labelContainerClassName = cn('flex items-center cursor-pointer gap-2', {\n 'cursor-not-allowed text-grey-300': props.disabled,\n });\n\n return (\n <span className={labelContainerClassName} data-taco=\"checkbox-container\">\n {element}\n <label htmlFor={id} id={`${id}-label`}>\n {label}\n </label>\n </span>\n );\n }\n\n return element;\n});\nCheckbox.displayName = 'Checkbox';\n"],"names":["Checkbox","React","props","ref","checked","indeterminate","invalid","label","loading","onChange","otherProps","id","useId","className","cn","disabled","handleChange","labelledByProps","handleKeyDown","event","key","currentTarget","click","spinnerClassname","element","CheckboxPrimitive","undefined","onCheckedChange","onKeyDown","Spinner","Icon","name","labelContainerClassName","htmlFor","displayName"],"mappings":";;;;;;;MA0CaA,QAAQ,gBAAGC,UAAgB,CAAC,SAASD,QAAQA,CAACE,KAAoB,EAAEC,GAAiC;EAC9G,MAAM;IAAEC,OAAO;IAAEC,aAAa;IAAEC,OAAO;IAAEC,KAAK;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGR,KAAK;EAC1F,MAAMS,EAAE,GAAGC,KAAK,CAACV,KAAK,CAACS,EAAE,CAAC;EAE1B,MAAME,SAAS,GAAGC,EAAE,CAChB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MAAM;IAAEQ,SAAS,EAAC;IAAoB,CACjD,CACjC,CAER;EAED,IAAIN,KAAK,EAAE;IACP,MAAMyB,uBAAuB,GAAGlB,EAAE,CAAC,wCAAwC,EAAE;MACzE,kCAAkC,EAAEZ,KAAK,CAACa;KAC7C,CAAC;IAEF,oBACId;MAAMY,SAAS,EAAEmB,uBAAuB;mBAAY;OAC/CR,OAAO,eACRvB;MAAOgC,OAAO,EAAEtB,EAAE;MAAEA,EAAE,KAAKA;OACtBJ,KAAK,CACF,CACL;;EAIf,OAAOiB,OAAO;AAClB,CAAC;AACDxB,QAAQ,CAACkC,WAAW,GAAG,UAAU;;;;"}
@@ -2,11 +2,11 @@ import { forwardRef, useMemo, createRef, useEffect, createElement } from 'react'
2
2
  import cn from 'clsx';
3
3
  import { useMergedRef } from '../../hooks/useMergedRef.js';
4
4
  import { useLocalization } from '../Provider/Localization.js';
5
+ import { Spinner } from '../Spinner/Spinner.js';
5
6
  import { Checkbox } from '../Checkbox/Checkbox.js';
6
7
  import { getInputClasses } from '../Input/util.js';
7
8
  import { getNextIndexFromKey } from '../../utils/hooks/useListKeyboardNavigation.js';
8
9
  import { useListScrollTo } from '../../utils/hooks/useListScrollTo.js';
9
- import { Spinner } from '../Spinner/Spinner.js';
10
10
 
11
11
  const getId = (id, value) => `${id}_${value}`;
12
12
  const getNextEnabledItem = (event, data, index) => {
@@ -292,7 +292,11 @@ const defaultLocalisationTexts = {
292
292
  delete: 'Delete',
293
293
  save: 'Save',
294
294
  search: 'Search...',
295
- searchOrCreate: 'Search or create...'
295
+ searchOrCreate: 'Search or create...',
296
+ selectAll: 'Select all',
297
+ selectAllResults: 'Select all results',
298
+ deselectAll: 'Deselect all',
299
+ deselectAllResults: 'Deselect all results'
296
300
  },
297
301
  toasts: {
298
302
  dismiss: 'Dismiss'