@economic/taco 2.45.0-alpha.0 → 2.45.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/dist/components/Layout/components/Top.d.ts +3 -3
  2. package/dist/components/Popover/Popover.d.ts +1 -1
  3. package/dist/components/Provider/Localization.d.ts +2 -0
  4. package/dist/components/Report/Report.d.ts +1 -1
  5. package/dist/components/Select2/components/Search.d.ts +0 -6
  6. package/dist/components/Select2/utilities.d.ts +2 -0
  7. package/dist/components/Table3/Table3.d.ts +2 -14
  8. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +1 -2
  9. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.d.ts +7 -0
  10. package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +14 -0
  11. package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +11 -0
  12. package/dist/components/Table3/features/useEditingState.d.ts +29 -0
  13. package/dist/components/Table3/features/useTableEditing.d.ts +26 -36
  14. package/dist/components/Table3/listeners/useTableEditingListener.d.ts +1 -1
  15. package/dist/components/Table3/types.d.ts +24 -8
  16. package/dist/components/Table3/useTable3.d.ts +6 -0
  17. package/dist/components/Table3/util/editing.d.ts +7 -1
  18. package/dist/esm/index.css +35 -4
  19. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +2 -2
  20. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  21. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +2 -2
  22. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  23. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  24. package/dist/esm/packages/taco/src/components/Provider/Localization.js +5 -3
  25. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  26. package/dist/esm/packages/taco/src/components/Select2/Select2.js +50 -45
  27. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  28. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +1 -1
  29. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  30. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +3 -13
  31. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  32. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +19 -1
  33. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +1 -10
  35. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Select2/utilities.js +11 -1
  37. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Switch/Switch.js +1 -1
  39. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Table3/Table3.js +14 -6
  41. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +1 -2
  43. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +33 -11
  45. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +5 -37
  47. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +17 -12
  49. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +34 -0
  51. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -0
  52. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +103 -0
  53. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -0
  54. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +2 -14
  55. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +96 -0
  57. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -0
  58. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +39 -6
  59. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +4 -17
  61. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +519 -0
  63. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -0
  64. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +29 -406
  65. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +44 -33
  67. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +34 -13
  69. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +11 -23
  71. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  72. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +20 -4
  73. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  74. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +0 -4
  75. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  76. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +1 -0
  77. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  78. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +1 -3
  79. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  80. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +9 -3
  81. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  82. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +9 -7
  83. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  84. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  85. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +2 -2
  86. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  87. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +4 -2
  88. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  89. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +2 -1
  90. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  91. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +8 -1
  92. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  93. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +29 -7
  94. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  95. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +2 -2
  96. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  97. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  98. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +2 -1
  99. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  100. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +3 -3
  101. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  102. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
  103. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  104. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +11 -0
  105. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  106. package/dist/esm/packages/taco/src/utils/dom.js +23 -12
  107. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  108. package/dist/index.css +35 -4
  109. package/dist/primitives/Collection/components/Root.d.ts +3 -1
  110. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +3 -1
  111. package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +1 -1
  112. package/dist/primitives/Table/Core/components/Row/RowContext.d.ts +1 -0
  113. package/dist/primitives/Table/Core/features/useTableRenderer.d.ts +2 -2
  114. package/dist/primitives/Table/Core/features/useTableStyle.d.ts +3 -3
  115. package/dist/primitives/Table/Core/types.d.ts +4 -0
  116. package/dist/primitives/Table/Core/useTable.d.ts +2 -2
  117. package/dist/primitives/Table/types.d.ts +2 -2
  118. package/dist/primitives/Table/useTableManager/useTableManager.d.ts +1 -1
  119. package/dist/taco.cjs.development.js +1130 -756
  120. package/dist/taco.cjs.development.js.map +1 -1
  121. package/dist/taco.cjs.production.min.js +1 -1
  122. package/dist/taco.cjs.production.min.js.map +1 -1
  123. package/dist/utils/dom.d.ts +2 -1
  124. package/package.json +16 -16
  125. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js +0 -90
  126. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare type LayoutTopProps = {
3
- children: React.ReactNode | React.ReactNode[] | (({ toggleSidebar }: {
3
+ children: React.ReactNode | (({ toggleSidebar }: {
4
4
  toggleSidebar: () => void;
5
- }) => React.ReactNode | React.ReactNode[]);
5
+ }) => React.ReactNode);
6
6
  };
7
- export declare const Top: (props: LayoutTopProps) => React.ReactNode;
7
+ export declare const Top: (props: LayoutTopProps) => React.JSX.Element;
@@ -29,6 +29,6 @@ export declare type ForwardedPopoverWithStatics = React.ForwardRefExoticComponen
29
29
  Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;
30
30
  Content: React.ForwardRefExoticComponent<PopoverContentProps>;
31
31
  Close: React.ForwardRefExoticComponent<PopoverCloseProps>;
32
- Portal: React.FunctionComponent<PopoverPrimitive.PopoverPortalProps>;
32
+ Portal: React.FunctionComponent<PopoverPrimitive.PortalProps>;
33
33
  };
34
34
  export declare const Popover: ForwardedPopoverWithStatics;
@@ -303,6 +303,8 @@ export declare const defaultLocalisationTexts: {
303
303
  };
304
304
  create: {
305
305
  label: string;
306
+ disabled: string;
307
+ saving: string;
306
308
  };
307
309
  };
308
310
  clearChangesConfirmationDialog: {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';
3
3
  declare function Column<TType = unknown>(_: ReportColumnProps<TType>): null;
4
4
  declare function Group(_: ReportGroupProps): null;
5
- export declare const Report: (<TType = unknown>(props: Pick<import("../..").TableProps<TType>, "length" | "loadAll" | "loadPage" | "pageSize" | "enableFiltering" | "enableSearch" | "enableSorting" | "enableColumnFreezing" | "enableColumnHiding" | "enableColumnResizing" | "enableRowExpansion" | "enableRowSelection" | "enableColumnOrdering" | "enableFontSize" | "enableFooter" | "enablePrinting" | "enableRowActions" | "enableRowActive" | "enableRowClick" | "enableRowDrag" | "enableRowDrop" | "enableRowGoto" | "enableRowHeight" | "enableSaveSettings" | "children" | "data" | "id" | "customSettings" | "defaultColumnFreezingIndex" | "defaultRowActiveIndex" | "defaultRowGroupColumnId" | "defaultSettings" | "emptyState" | "rowActions" | "rowActionsForGroup" | "rowActionsLength" | "rowExpansionRenderer" | "rowIdentityColumnId" | "shortcuts" | "toolbarLeft" | "toolbarRight" | "toolbarPanel" | "onRowClick" | "onRowDrag" | "onRowDrop" | "onRowGoto" | "onRowSelect" | "onChangeFilter" | "onChangeSearch" | "onChangeSettings" | "onChangeSort"> & React.RefAttributes<import("../..").TableRef>) => JSX.Element) & {
5
+ export declare const Report: (<TType = unknown>(props: Pick<import("../..").TableProps<TType>, "length" | "loadAll" | "loadPage" | "pageSize" | "enableFiltering" | "enableSearch" | "enableSorting" | "enableColumnFreezing" | "enableColumnHiding" | "enableColumnResizing" | "enableRowExpansion" | "enableRowSelection" | "enableColumnOrdering" | "enableFontSize" | "enableFooter" | "enablePrinting" | "enableRowActions" | "enableRowActive" | "enableRowClick" | "enableRowDrag" | "enableRowDrop" | "enableRowGoto" | "enableRowHeight" | "enableSaveSettings" | "children" | "data" | "id" | "customSettings" | "defaultColumnFreezingIndex" | "defaultRowActiveIndex" | "defaultRowGroupColumnId" | "defaultSettings" | "emptyState" | "rowActions" | "rowActionsForGroup" | "rowActionsLength" | "rowExpansionRenderer" | "rowIdentityAccessor" | "shortcuts" | "toolbarLeft" | "toolbarRight" | "toolbarPanel" | "onRowClick" | "onRowDrag" | "onRowDrop" | "onRowGoto" | "onRowSelect" | "onChangeFilter" | "onChangeSearch" | "onChangeSettings" | "onChangeSort"> & React.RefAttributes<import("../..").TableRef>) => JSX.Element) & {
6
6
  Column: typeof Column;
7
7
  Group: typeof Group;
8
8
  };
@@ -1,8 +1,4 @@
1
1
  import React from 'react';
2
- import { InputProps } from '../../Input/Input';
3
- export declare type Select2SearchProps = InputProps & {
4
- onTabKeyPress: () => void;
5
- };
6
2
  export declare const Search: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "accept" | "alt" | "autoComplete" | "capture" | "checked" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "type" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "onResize" | "onResizeCapture" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
7
3
  highlighted?: boolean | undefined;
8
4
  invalid?: boolean | undefined;
@@ -11,6 +7,4 @@ export declare const Search: React.ForwardRefExoticComponent<Pick<React.InputHTM
11
7
  } & {
12
8
  button?: React.ReactElement<any, string | ((props: any, deprecatedLegacyContext?: any) => React.ReactElement<any, any> | null) | (new (props: any, deprecatedLegacyContext?: any) => React.Component<any, any, any>)> | undefined;
13
9
  icon?: "list" | "id" | JSX.Element | "warning" | "menu" | "search" | "time" | "filter" | "line" | "document" | "log" | "note" | "location" | "copy" | "move" | "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "ai-chat-solid" | "ai-stars" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach-warning" | "attach" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chart-area" | "chart-bar" | "chart-line" | "chart-pie" | "chart-table" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-information" | "circle-minus" | "circle-plus" | "circle-questionmark" | "circle-tick" | "circle-warning" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-signed-solid" | "document-signed" | "document-split" | "document-time" | "download" | "drag" | "e-copedia" | "edit-simple" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope-solid" | "envelope" | "expand-view" | "expenses" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "house-solid" | "house" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "link-external" | "list-bulleted" | "list-search" | "lock-open" | "lock" | "log-out" | "market" | "mastercard-os" | "match-amount" | "match-entries" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "navigation-list" | "note-follow-up" | "note-read" | "november-first" | "numbers" | "partner-api" | "payment-paid" | "payment-unpaid" | "period" | "person-change" | "person-minus" | "person-plus" | "person-tick" | "phone-solid" | "phone" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark-bold" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
14
- } & {
15
- onTabKeyPress: () => void;
16
10
  } & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,5 @@
1
+ import { Select2OptionProps } from './components/Option';
1
2
  export declare const createOptionClassName: (shouldPauseHoverState?: boolean) => string;
2
3
  export declare const createCollectionClassName: () => string;
3
4
  export declare const getFontSize: (fontSize?: "small" | "medium" | "large" | undefined) => "text-xs" | "text-base" | "text-sm";
5
+ export declare const filterOption: (child: React.ReactElement<Select2OptionProps>, searchQuery: string) => boolean;
@@ -9,20 +9,8 @@ declare function Group(_: Table3GroupProps): null;
9
9
  declare namespace Group {
10
10
  var displayName: string;
11
11
  }
12
- export declare const Table3: (<TType = unknown>(props: (import("../..").TableClientProps<TType> & {
13
- enableEditing?: boolean | undefined;
14
- onEditingChange?: import("./types").Table3EditingChangeHandler<TType> | undefined;
15
- onEditingCreate?: import("./types").Table3EditingCreateHandler<TType> | undefined;
16
- onEditingSave?: import("./types").Table3EditingSaveHandler<TType> | undefined;
17
- validator?: import("./types").Table3EditingValidatorFn<TType> | undefined;
18
- } & React.RefAttributes<Table3Ref>) | (import("../..").TableServerProps<TType> & {
19
- enableEditing?: boolean | undefined;
20
- onEditingChange?: import("./types").Table3EditingChangeHandler<TType> | undefined;
21
- onEditingCreate?: import("./types").Table3EditingCreateHandler<TType> | undefined;
22
- onEditingSave?: import("./types").Table3EditingSaveHandler<TType> | undefined;
23
- validator?: import("./types").Table3EditingValidatorFn<TType> | undefined;
24
- } & React.RefAttributes<Table3Ref>)) => JSX.Element) & {
12
+ export declare const Table3: (<TType = unknown>(props: (import("./types").Table3WithoutEditingWithClientProps<TType> & React.RefAttributes<Table3Ref>) | (import("./types").Table3WithoutEditingWithServerProps<TType> & React.RefAttributes<Table3Ref>) | (import("./types").Table3WithEditingWithClientProps<TType> & React.RefAttributes<Table3Ref>) | (import("./types").Table3WithEditingWithServerProps<TType> & React.RefAttributes<Table3Ref>)) => JSX.Element) & {
25
13
  Column: typeof Column;
26
14
  Group: typeof Group;
27
15
  };
28
- export type { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps, Table3EditingSaveHandler, Table3EditingValidatorFn, Table3FeatureProps, Table3Texts, } from './types';
16
+ export type { Table3Ref, Table3Props, Table3ColumnProps, Table3GroupProps, Table3EditingSaveHandler, Table3EditingValidatorFn, Table3Texts, Table3FeatureProps, Table3CommonProps, Table3WithoutEditingWithClientProps, Table3WithoutEditingWithServerProps, Table3WithEditingProps, Table3WithEditingWithClientProps, Table3WithEditingWithServerProps, Table3EditingChangeHandler, Table3EditingCreateHandler, } from './types';
@@ -2,8 +2,7 @@ import React from 'react';
2
2
  declare type EditingActionMenuProps = {
3
3
  hasChanges: boolean;
4
4
  hasErrors: boolean;
5
- onClear: () => void;
6
- onExit: () => void;
5
+ onDiscard: () => void;
7
6
  onEditingSave: () => Promise<void>;
8
7
  isLastRow: boolean;
9
8
  };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DialogProps } from '../../../Dialog/Dialog';
3
+ declare type DiscardChangesConfirmationDialogProps = Partial<DialogProps> & {
4
+ onDiscard: () => void;
5
+ };
6
+ export declare function DiscardChangesConfirmationDialog(props: DiscardChangesConfirmationDialogProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';
3
+ import { Table3EditingCreateHandler } from '../../../types';
4
+ import { TableRef } from '../../../../../primitives/Table/types';
5
+ declare type CreateNewRowProps<TType = unknown> = {
6
+ buttonRef: React.Ref<HTMLButtonElement>;
7
+ onEditingCreate?: Table3EditingCreateHandler<TType>;
8
+ scrollToIndex: (index: number) => void;
9
+ table: ReactTable<TType>;
10
+ tableMeta: ReactTableMeta<TType>;
11
+ tableRef: React.RefObject<TableRef>;
12
+ };
13
+ export declare function CreateNewRow<TType = unknown>(props: CreateNewRowProps<TType>): React.JSX.Element;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';
3
+ import { TableRef } from '../../../../../primitives/Table/types';
4
+ declare type TemporaryRowProps<TType = unknown> = {
5
+ createRowButtonRef: React.RefObject<HTMLButtonElement>;
6
+ table: ReactTable<TType>;
7
+ tableMeta: ReactTableMeta<TType>;
8
+ tableRef: React.RefObject<TableRef>;
9
+ };
10
+ export declare function TemporaryRow<TType = unknown>(props: TemporaryRowProps<TType>): React.JSX.Element;
11
+ export {};
@@ -0,0 +1,29 @@
1
+ import { Table as ReactTable, Cell as ReactTableCell } from '@tanstack/react-table';
2
+ import { Table3EditingChangeHandler, Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';
3
+ declare type EditingSaveState = 'saving' | 'saved' | 'errored';
4
+ export declare function usePendingChangesState<TType = unknown>(handleSave: Table3EditingSaveHandler<TType> | undefined, handleChange: Table3EditingChangeHandler<TType> | undefined, rowIdentityAccessor: keyof TType, validator: Table3EditingValidatorFn<TType> | undefined): {
5
+ setRowValue: <T extends TType>(rowId: string, original: T, value: Partial<T>) => Promise<void>;
6
+ getRowValue: (rowId: string) => any;
7
+ getRowMoveReason: (rowId: string) => unknown;
8
+ hasRowErrors: (rowId: string) => boolean;
9
+ hasRowErrorsShownInAlert: (rowId: string) => boolean;
10
+ hasTemporaryRowErrors: <T_1 extends TType>() => boolean;
11
+ getRowStatus: (rowId: string) => any;
12
+ setRowStatus: (rowId: string, status: EditingSaveState | undefined) => void;
13
+ setCellValue: <T_2 extends TType>(cell: ReactTableCell<T_2, unknown>, value: unknown) => void;
14
+ getCellValue: <T_3 extends TType>(cell: ReactTableCell<T_3, unknown>) => unknown | undefined;
15
+ getCellError: <T_4 extends TType>(cell: ReactTableCell<T_4, unknown>) => string | undefined;
16
+ onCellChanged: <T_5 extends TType>(cell: ReactTableCell<T_5, unknown>, rowIndex: number, shouldRunUpdaters?: boolean) => Promise<void>;
17
+ getErrorsShownInAlert: <T_6 extends TType>() => {
18
+ rowId: string;
19
+ changes: Partial<T_6>;
20
+ errors: any;
21
+ }[];
22
+ hasChanges: (rowId?: string | undefined) => boolean;
23
+ saveChanges: <T_7 extends TType>(table: ReactTable<T_7>, rowId?: string | undefined) => Promise<boolean>;
24
+ discardChanges: <T_8 extends TType>(rowId: string, table: ReactTable<T_8>) => void;
25
+ hasSaved: () => boolean;
26
+ createRow: <T_9 extends TType>(data: Partial<T_9>) => string;
27
+ temporaryRows: any;
28
+ };
29
+ export {};
@@ -1,46 +1,36 @@
1
1
  import React from 'react';
2
- import { Cell as ReactTableCell, Row as ReactTableRow } from '@tanstack/react-table';
2
+ import { Table as ReactTable } from '@tanstack/react-table';
3
3
  import { Table3EditingChangeHandler, Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';
4
- export declare function useTableEditing<TType = unknown>(isEnabled: boolean | undefined, handleSave: Table3EditingSaveHandler<TType> | undefined, handleChange: Table3EditingChangeHandler<TType> | undefined, validator: Table3EditingValidatorFn<TType> | undefined): {
5
- getCellValue: <T extends TType>(cell: ReactTableCell<T, unknown>) => unknown;
6
- getCellError: <T_1 extends TType>(cell: ReactTableCell<T_1, unknown>) => string | undefined;
7
- setCellValue: <T_2 extends TType>(cell: ReactTableCell<T_2, unknown>, change: unknown, rowIndex: number) => Promise<void>;
8
- validateCell: <T_3 extends TType>(cell: ReactTableCell<T_3, unknown>) => Promise<void>;
9
- addCreatedRowChangeset: (row: ReactTableRow<unknown>) => Promise<void>;
10
- hasChanges: (rowId?: string | undefined) => boolean;
11
- hasAlertErrors: () => boolean;
12
- getAlertErrors: <T_4 extends TType>() => {
4
+ export declare function useTableEditing<TType = unknown>(isEnabled: boolean | undefined, handleSave: Table3EditingSaveHandler<TType> | undefined, handleChange: Table3EditingChangeHandler<TType> | undefined, rowIdentityAccessor: keyof TType | undefined, validator: Table3EditingValidatorFn<TType> | undefined): {
5
+ setRowValue: <T extends TType>(rowId: string, original: T, value: Partial<T>) => Promise<void>;
6
+ getRowValue: (rowId: string) => any;
7
+ getRowMoveReason: (rowId: string) => unknown;
8
+ hasRowErrors: (rowId: string) => boolean;
9
+ hasRowErrorsShownInAlert: (rowId: string) => boolean;
10
+ hasTemporaryRowErrors: <T_1 extends TType>() => boolean;
11
+ getRowStatus: (rowId: string) => any;
12
+ setRowStatus: (rowId: string, status: "saving" | "saved" | "errored" | undefined) => void;
13
+ setCellValue: <T_2 extends TType>(cell: import("@tanstack/react-table").Cell<T_2, unknown>, value: unknown) => void;
14
+ getCellValue: <T_3 extends TType>(cell: import("@tanstack/react-table").Cell<T_3, unknown>) => unknown;
15
+ getCellError: <T_4 extends TType>(cell: import("@tanstack/react-table").Cell<T_4, unknown>) => string | undefined;
16
+ onCellChanged: <T_5 extends TType>(cell: import("@tanstack/react-table").Cell<T_5, unknown>, rowIndex: number, shouldRunUpdaters?: boolean) => Promise<void>;
17
+ getErrorsShownInAlert: <T_6 extends TType>() => {
13
18
  rowId: string;
14
- pendingChange: PendingChange<T_4>;
19
+ changes: Partial<T_6>;
20
+ errors: any;
15
21
  }[];
16
- saveChanges: (rowId?: string | undefined) => Promise<void>;
17
- resetChanges: (rowId: string) => void;
18
- hasRowErrors: (rowId: string) => boolean;
19
- hasRowErrorsSeen: (rowId: string) => boolean;
20
- getRowPendingChange: (rowId: string) => Pick<PendingChange<TType>, Exclude<keyof TType, "_meta">> | undefined;
21
- getRowSaveStatus: (rowId: string) => false | "pending" | "complete";
22
- setRowSaveStatus: (rowId: string, status: "pending" | "complete" | undefined) => void;
23
- getRowMoveReason: (rowId: string) => "search" | "sorting" | "filter" | undefined;
24
- getCompletedRowsCount: () => number;
22
+ hasChanges: (rowId?: string | undefined) => boolean;
23
+ saveChanges: <T_7 extends TType>(table: ReactTable<T_7>, rowId?: string | undefined) => Promise<boolean>;
24
+ discardChanges: <T_8 extends TType>(rowId: string, table: ReactTable<T_8>) => void;
25
+ hasSaved: () => boolean;
26
+ createRow: <T_9 extends TType>(data: Partial<T_9>) => string;
27
+ temporaryRows: any;
25
28
  isEnabled: boolean;
26
29
  isEditing: boolean;
27
30
  isDetailedMode: boolean;
28
31
  toggleDetailedMode: React.Dispatch<React.SetStateAction<boolean>>;
29
- toggleEditing: React.Dispatch<React.SetStateAction<boolean>>;
32
+ toggleEditing: <T_10 extends TType>(enabled: React.SetStateAction<boolean>, table: ReactTable<T_10>, scrollToIndex: (index: number) => void) => void;
30
33
  lastFocusedCellIndex: number | undefined;
31
- setLastFocusedCellIndex: (index: number | undefined) => void;
32
- };
33
- declare type SaveState = 'pending' | 'complete';
34
- export declare type PendingChange<TType = unknown> = Partial<TType> & {
35
- _meta: {
36
- original: TType;
37
- moveReason: Record<string, 'search' | 'sorting' | 'filter'>;
38
- errors: {
39
- row: string;
40
- cells: Record<string, string>;
41
- shouldShowErrorAlert: boolean;
42
- };
43
- status?: SaveState;
44
- };
34
+ setLastFocusedCellIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
35
+ createRowButtonRef: React.RefObject<HTMLButtonElement>;
45
36
  };
46
- export {};
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { Table as ReactTable } from '@tanstack/react-table';
3
3
  import { TableRef } from '../../../primitives/Table/types';
4
- export declare function useTableEditingListener<TType = unknown>(table: ReactTable<TType>, tableRef: React.RefObject<TableRef>): void;
4
+ export declare function useTableEditingListener<TType = unknown>(table: ReactTable<TType>, tableRef: React.RefObject<TableRef>, scrollToIndex: (index: number) => void): void;
@@ -1,23 +1,37 @@
1
- import { TableFeatureProps, TableProps, TableRef, TableColumnProps, TableGroupProps } from '../../primitives/Table/types';
1
+ import { TableRef, TableColumnProps, TableGroupProps, TableClientProps, TableServerProps, TableFeatureProps } from '../../primitives/Table/types';
2
2
  export declare type Table3Ref = TableRef & {
3
3
  instance: {
4
4
  toggleEditing: (enabled: boolean | undefined) => void;
5
+ createRow?: (row: unknown) => Promise<void>;
5
6
  };
6
7
  };
7
8
  export declare type Table3EditingChangeHandler<TType = unknown> = (accessor: string, value: unknown, row: TType, prevRow: TType) => Promise<Partial<TType>> | undefined;
8
- export declare type Table3EditingCreateHandler<TType = unknown> = () => (row: Partial<TType>) => boolean;
9
+ export declare type Table3EditingCreateHandler<TType = unknown> = () => Partial<TType>;
9
10
  export declare type Table3EditingSaveHandler<TType = unknown> = (row: TType) => Promise<void>;
10
11
  export declare type Table3EditingValidatorFn<TType = unknown> = (row: TType) => Promise<Partial<Record<keyof TType, string>> | undefined> | Partial<Record<keyof TType, string>> | undefined;
11
- export declare type Table3FeatureProps = TableFeatureProps & {
12
- enableEditing?: boolean;
13
- };
14
- export declare type Table3Props<TType = unknown> = TableProps<TType> & {
12
+ export interface Table3FeatureProps<TType = unknown> extends TableFeatureProps<TType> {
15
13
  enableEditing?: boolean;
14
+ }
15
+ export interface Table3CommonProps<TType = unknown> extends Table3FeatureProps<TType> {
16
16
  onEditingChange?: Table3EditingChangeHandler<TType>;
17
17
  onEditingCreate?: Table3EditingCreateHandler<TType>;
18
- onEditingSave?: Table3EditingSaveHandler<TType>;
19
18
  validator?: Table3EditingValidatorFn<TType>;
20
- };
19
+ }
20
+ export interface Table3WithoutEditingWithClientProps<TType = unknown> extends Table3CommonProps<TType>, TableClientProps<TType> {
21
+ onEditingSave?: never;
22
+ }
23
+ export interface Table3WithoutEditingWithServerProps<TType = unknown> extends Table3CommonProps<TType>, TableServerProps<TType> {
24
+ onEditingSave?: never;
25
+ }
26
+ export interface Table3WithEditingProps<TType = unknown> extends Table3CommonProps<TType> {
27
+ onEditingSave: Table3EditingSaveHandler<TType>;
28
+ rowIdentityAccessor: keyof TType;
29
+ }
30
+ export interface Table3WithEditingWithClientProps<TType = unknown> extends Table3WithEditingProps<TType>, Omit<TableClientProps<TType>, 'rowIdentityAccessor'> {
31
+ }
32
+ export interface Table3WithEditingWithServerProps<TType = unknown> extends Table3WithEditingProps<TType>, Omit<TableServerProps<TType>, 'rowIdentityAccessor'> {
33
+ }
34
+ export declare type Table3Props<TType = unknown> = Table3WithoutEditingWithClientProps<TType> | Table3WithoutEditingWithServerProps<TType> | Table3WithEditingWithClientProps<TType> | Table3WithEditingWithServerProps<TType>;
21
35
  export declare type Table3ColumnProps<TType = unknown> = TableColumnProps<TType>;
22
36
  export declare type Table3GroupProps = TableGroupProps;
23
37
  export declare type Table3Texts = {
@@ -34,6 +48,8 @@ export declare type Table3Texts = {
34
48
  };
35
49
  create: {
36
50
  label: string;
51
+ disabled: string;
52
+ saving: string;
37
53
  };
38
54
  };
39
55
  clearChangesConfirmationDialog: {
@@ -2,6 +2,12 @@ import React from 'react';
2
2
  import { RowData } from '@tanstack/react-table';
3
3
  import { useTableEditing } from './features/useTableEditing';
4
4
  import { Table3Props, Table3Ref } from './types';
5
+ import { Cell } from './components/Columns/Cell/Cell';
6
+ import { Row } from './components/Row/Row';
7
+ export declare const RENDERERS: {
8
+ row: typeof Row;
9
+ cell: typeof Cell;
10
+ };
5
11
  declare module '@tanstack/table-core' {
6
12
  interface TableMeta<TData extends RowData> {
7
13
  editing: ReturnType<typeof useTableEditing>;
@@ -1,4 +1,10 @@
1
1
  import { Cell as ReactTableCell } from '@tanstack/react-table';
2
2
  import { Localization } from '../../Provider/Localization';
3
3
  export declare function willRowMove<TType = unknown>(cell: ReactTableCell<TType, unknown>, change: unknown, rowIndex: number, localization: Localization): "search" | "filter" | "sorting" | undefined;
4
- export declare function animateCreateRow(id: string): void;
4
+ export declare const TEMPORARY_ROW_ID_PREFIX = "temp-";
5
+ export declare function isTemporaryRow(rowId: string): boolean;
6
+ export declare const shortcut: {
7
+ key: string;
8
+ meta: boolean;
9
+ shift: boolean;
10
+ };
@@ -833,7 +833,7 @@ table[data-taco^='table'][data-table-font-size='small'] td [data-taco='tag'] {
833
833
  table[data-taco^='table'][data-table-font-size='small'] td [data-taco='select2-container'],
834
834
  table[data-taco^='table'][data-table-font-size='small'] td [data-taco='Select2'],
835
835
  table[data-taco^='table'][data-table-font-size='small'] td [data-taco='textarea'] {
836
- @apply !-mx-[7px] !-mt-[4px] !min-h-[theme(spacing.6)] !w-[calc(100%_+_14px)] text-xs focus:z-10;
836
+ @apply !-mx-[7px] !-my-[4px] !min-h-[theme(spacing.6)] !w-[calc(100%_+_14px)] text-xs focus:z-10;
837
837
  }
838
838
 
839
839
  table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container']:has([data-taco='input']) {
@@ -923,7 +923,7 @@ table[data-taco^='table'][data-table-font-size='medium'] td [role='combobox'] [d
923
923
  table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='select2-container'],
924
924
  table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='Select2'],
925
925
  table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='textarea'] {
926
- @apply !-mx-[9px] !-mt-[6px] !min-h-[theme(spacing.8)] !w-[calc(100%_+_16px)] focus:z-10;
926
+ @apply !-mx-[9px] !-my-[6px] !min-h-[theme(spacing.8)] !w-[calc(100%_+_16px)] focus:z-10;
927
927
  }
928
928
 
929
929
  table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container']:has([data-taco='input']) {
@@ -1294,17 +1294,25 @@ table[data-taco='table3'][data-table-editing-mode] tbody tr[data-row-editing-mov
1294
1294
 
1295
1295
  /* invalid rows */
1296
1296
 
1297
- table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true'] > td, table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true'] > td, table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true'] > td {
1297
+ table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true'] > td,
1298
+ table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true']:not([data-row-selected]):not([data-row-active]) > td,
1299
+ table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true'] > td,
1300
+ table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true']:not([data-row-selected]):not([data-row-active]) > td,
1301
+ table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true'] > td,
1302
+ table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true']:not([data-row-selected]):not([data-row-active]) > td {
1298
1303
  --table-row-actions-shadow: #ffe4de;
1299
1304
  @apply bg-[#ffede9];
1300
1305
  }
1301
1306
 
1302
1307
  table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true']:hover > td,
1303
1308
  table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true'][data-row-group] > td,
1309
+ table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true']:hover:not([data-row-selected]):not([data-row-active]) > td,
1304
1310
  table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true']:hover > td,
1305
1311
  table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true'][data-row-group] > td,
1312
+ table[data-taco='table3']:focus-within > tbody > tr[data-row-editing-invalid='true']:hover:not([data-row-selected]):not([data-row-active]) > td,
1306
1313
  table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true']:hover > td,
1307
- table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true'][data-row-group] > td {
1314
+ table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true'][data-row-group] > td,
1315
+ table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true']:hover:not([data-row-selected]):not([data-row-active]) > td {
1308
1316
  --table-row-actions-shadow: #ffe4de;
1309
1317
  @apply bg-[#ffe4de];
1310
1318
  }
@@ -1337,3 +1345,26 @@ table[data-taco='table3'] > tbody > tr[data-row-editing-invalid='true']:not([dat
1337
1345
  table[data-taco='table3'][data-table-pause-hover='true'] > tbody > tr[data-row-editing-invalid='true']:not([data-row-active='true']) td [data-taco='Select2'] {
1338
1346
  @apply !bg-transparent;
1339
1347
  }
1348
+
1349
+ table[data-taco^='table'][data-table-font-size='medium'] tr[data-row-create] td [data-taco='spinner'] {
1350
+ @apply !h-4 !w-4;
1351
+ }
1352
+
1353
+ table[data-taco^='table'] tr [data-row-move-indicator] {
1354
+ @apply wcag-blue-500 absolute left-0 z-10 ml-1 whitespace-nowrap px-1 py-1 text-xs font-bold;
1355
+ }
1356
+
1357
+ table[data-taco^='table'] tr[data-row-id^='temp-'] [data-row-move-indicator] {
1358
+ @apply bottom-full rounded-t-md;
1359
+ }
1360
+
1361
+ table[data-taco^='table'] tr:not([data-row-id^='temp-']) [data-row-move-indicator] {
1362
+ @apply top-full rounded-b-md;
1363
+ }
1364
+
1365
+ table[data-taco^='table'][data-table-row-height='short'] tr[data-row-create] td,
1366
+ table[data-taco^='table'][data-table-row-height='medium'] tr[data-row-create] td,
1367
+ table[data-taco^='table'][data-table-row-height='tall'] tr[data-row-create] td,
1368
+ table[data-taco^='table'][data-table-row-height='extra-tall'] tr[data-row-create] td {
1369
+ @apply !min-h-[41px] !pt-[10px];
1370
+ }
@@ -6,9 +6,9 @@ const Top = props => {
6
6
  setSidebarOpen
7
7
  } = React__default.useContext(LayoutContext);
8
8
  const toggleSidebar = () => setSidebarOpen(open => !open);
9
- return typeof props.children === 'function' ? props.children({
9
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, typeof props.children === 'function' ? props.children({
10
10
  toggleSidebar
11
- }) : props.children;
11
+ }) : props.children);
12
12
  };
13
13
 
14
14
  export { Top };
@@ -1 +1 @@
1
- {"version":3,"file":"Top.js","sources":["../../../../../../../../src/components/Layout/components/Top.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutContext } from './Context';\n\nexport type LayoutTopProps = {\n children:\n | React.ReactNode\n | React.ReactNode[]\n | (({ toggleSidebar }: { toggleSidebar: () => void }) => React.ReactNode | React.ReactNode[]);\n};\n\nexport const Top = (props: LayoutTopProps): React.ReactNode => {\n const { setSidebarOpen } = React.useContext(LayoutContext);\n const toggleSidebar = () => setSidebarOpen(open => !open);\n\n return typeof props.children === 'function' ? props.children({ toggleSidebar }) : props.children;\n};\n"],"names":["Top","props","setSidebarOpen","React","useContext","LayoutContext","toggleSidebar","open","children"],"mappings":";;;MAUaA,GAAG,GAAIC,KAAqB;EACrC,MAAM;IAAEC;GAAgB,GAAGC,cAAK,CAACC,UAAU,CAACC,aAAa,CAAC;EAC1D,MAAMC,aAAa,GAAGA,MAAMJ,cAAc,CAACK,IAAI,IAAI,CAACA,IAAI,CAAC;EAEzD,OAAO,OAAON,KAAK,CAACO,QAAQ,KAAK,UAAU,GAAGP,KAAK,CAACO,QAAQ,CAAC;IAAEF;GAAe,CAAC,GAAGL,KAAK,CAACO,QAAQ;AACpG;;;;"}
1
+ {"version":3,"file":"Top.js","sources":["../../../../../../../../src/components/Layout/components/Top.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutContext } from './Context';\n\nexport type LayoutTopProps = {\n children: React.ReactNode | (({ toggleSidebar }: { toggleSidebar: () => void }) => React.ReactNode);\n};\n\nexport const Top = (props: LayoutTopProps) => {\n const { setSidebarOpen } = React.useContext(LayoutContext);\n const toggleSidebar = () => setSidebarOpen(open => !open);\n\n return <>{typeof props.children === 'function' ? props.children({ toggleSidebar }) : props.children}</>;\n};\n"],"names":["Top","props","setSidebarOpen","React","useContext","LayoutContext","toggleSidebar","open","children"],"mappings":";;;MAOaA,GAAG,GAAIC,KAAqB;EACrC,MAAM;IAAEC;GAAgB,GAAGC,cAAK,CAACC,UAAU,CAACC,aAAa,CAAC;EAC1D,MAAMC,aAAa,GAAGA,MAAMJ,cAAc,CAACK,IAAI,IAAI,CAACA,IAAI,CAAC;EAEzD,oBAAOJ,4DAAG,OAAOF,KAAK,CAACO,QAAQ,KAAK,UAAU,GAAGP,KAAK,CAACO,QAAQ,CAAC;IAAEF;GAAe,CAAC,GAAGL,KAAK,CAACO,QAAQ,CAAI;AAC3G;;;;"}
@@ -18,10 +18,10 @@ const ModeSwitch = /*#__PURE__*/forwardRef(function ModeSwitch(props, ref) {
18
18
  onCheckedChange: onChange,
19
19
  ref: ref
20
20
  }), /*#__PURE__*/createElement(Thumb, {
21
- className: "'will-change-transform flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform group-disabled:opacity-50 group-aria-checked:translate-x-[100%]"
21
+ className: "pointer-events-none flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform will-change-transform group-disabled:opacity-50 group-aria-checked:translate-x-[100%]"
22
22
  }, /*#__PURE__*/createElement(Icon, {
23
23
  name: "edit-simple",
24
- className: "!h-5 !w-5"
24
+ className: "pointer-events-none !h-5 !w-5"
25
25
  })));
26
26
  });
27
27
  ModeSwitch.displayName = 'ModeSwitch';
@@ -1 +1 @@
1
- {"version":3,"file":"ModeSwitch.js","sources":["../../../../../../../src/components/ModeSwitch/ModeSwitch.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as PrimitiveSwitch from '@radix-ui/react-switch';\n\nimport { Icon } from '../Icon/Icon';\n\ntype ModeSwitchBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledModeSwitchProps extends ModeSwitchBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledModeSwitchProps extends ModeSwitchBaseProps {\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 ModeSwitchProps = UncontrolledModeSwitchProps | ControlledModeSwitchProps;\n\nexport const ModeSwitch = React.forwardRef(function ModeSwitch(props: ModeSwitchProps, ref: React.Ref<HTMLButtonElement>) {\n const { onChange, ...otherProps } = props;\n\n const className = cn(\n 'group w-14 h-8 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus p-1',\n {\n 'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,\n 'bg-grey-500 aria-checked:bg-blue-500 cursor-not-allowed opacity-50': props.disabled,\n },\n props.className\n );\n\n return (\n <PrimitiveSwitch.Root {...otherProps} className={className} data-taco=\"mode\" onCheckedChange={onChange} ref={ref}>\n <PrimitiveSwitch.Thumb className=\"'will-change-transform flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform group-disabled:opacity-50 group-aria-checked:translate-x-[100%]\">\n <Icon name=\"edit-simple\" className=\"!h-5 !w-5\" />\n </PrimitiveSwitch.Thumb>\n </PrimitiveSwitch.Root>\n );\n});\nModeSwitch.displayName = 'ModeSwitch';\n"],"names":["ModeSwitch","React","props","ref","onChange","otherProps","className","cn","disabled","PrimitiveSwitch","onCheckedChange","Icon","name","displayName"],"mappings":";;;;;MA4BaA,UAAU,gBAAGC,UAAgB,CAAC,SAASD,UAAUA,CAACE,KAAsB,EAAEC,GAAiC;EACpH,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EAEzC,MAAMI,SAAS,GAAGC,EAAE,CAChB,uFAAuF,EACvF;IACI,uFAAuF,EAAE,CAACL,KAAK,CAACM,QAAQ;IACxG,oEAAoE,EAAEN,KAAK,CAACM;GAC/E,EACDN,KAAK,CAACI,SAAS,CAClB;EAED,oBACIL,cAACQ,IAAoB,oBAAKJ,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,MAAM;IAACI,eAAe,EAAEN,QAAQ;IAAED,GAAG,EAAEA;mBACzGF,cAACQ,KAAqB;IAACH,SAAS,EAAC;kBAC7BL,cAACU,IAAI;IAACC,IAAI,EAAC,aAAa;IAACN,SAAS,EAAC;IAAc,CAC7B,CACL;AAE/B,CAAC;AACDN,UAAU,CAACa,WAAW,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"ModeSwitch.js","sources":["../../../../../../../src/components/ModeSwitch/ModeSwitch.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as PrimitiveSwitch from '@radix-ui/react-switch';\n\nimport { Icon } from '../Icon/Icon';\n\ntype ModeSwitchBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledModeSwitchProps extends ModeSwitchBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledModeSwitchProps extends ModeSwitchBaseProps {\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 ModeSwitchProps = UncontrolledModeSwitchProps | ControlledModeSwitchProps;\n\nexport const ModeSwitch = React.forwardRef(function ModeSwitch(props: ModeSwitchProps, ref: React.Ref<HTMLButtonElement>) {\n const { onChange, ...otherProps } = props;\n\n const className = cn(\n 'group w-14 h-8 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus p-1',\n {\n 'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,\n 'bg-grey-500 aria-checked:bg-blue-500 cursor-not-allowed opacity-50': props.disabled,\n },\n props.className\n );\n\n return (\n <PrimitiveSwitch.Root {...otherProps} className={className} data-taco=\"mode\" onCheckedChange={onChange} ref={ref}>\n <PrimitiveSwitch.Thumb className=\"pointer-events-none flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform will-change-transform group-disabled:opacity-50 group-aria-checked:translate-x-[100%]\">\n <Icon name=\"edit-simple\" className=\"pointer-events-none !h-5 !w-5\" />\n </PrimitiveSwitch.Thumb>\n </PrimitiveSwitch.Root>\n );\n});\nModeSwitch.displayName = 'ModeSwitch';\n"],"names":["ModeSwitch","React","props","ref","onChange","otherProps","className","cn","disabled","PrimitiveSwitch","onCheckedChange","Icon","name","displayName"],"mappings":";;;;;MA4BaA,UAAU,gBAAGC,UAAgB,CAAC,SAASD,UAAUA,CAACE,KAAsB,EAAEC,GAAiC;EACpH,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EAEzC,MAAMI,SAAS,GAAGC,EAAE,CAChB,uFAAuF,EACvF;IACI,uFAAuF,EAAE,CAACL,KAAK,CAACM,QAAQ;IACxG,oEAAoE,EAAEN,KAAK,CAACM;GAC/E,EACDN,KAAK,CAACI,SAAS,CAClB;EAED,oBACIL,cAACQ,IAAoB,oBAAKJ,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,MAAM;IAACI,eAAe,EAAEN,QAAQ;IAAED,GAAG,EAAEA;mBACzGF,cAACQ,KAAqB;IAACH,SAAS,EAAC;kBAC7BL,cAACU,IAAI;IAACC,IAAI,EAAC,aAAa;IAACN,SAAS,EAAC;IAAkC,CACjD,CACL;AAE/B,CAAC;AACDN,UAAU,CAACa,WAAW,GAAG,YAAY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../..';\nimport { UnstyledArrow } from './Primitives';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement>;\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, ref: React.Ref<HTMLDivElement>) {\n return <PopoverPrimitive.Anchor {...props} asChild ref={ref} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement>;\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let children = props.children;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n console.warn(\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\n );\n children = <span>{props.children}</span>;\n }\n\n return (\n <PopoverPrimitive.Trigger {...parentProps} {...props} ref={refCallback} asChild>\n {children}\n </PopoverPrimitive.Trigger>\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\nexport type PopoverContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side' | 'children'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, ...popoverContentProps } = props;\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = (\n <PopoverPrimitive.Close asChild>\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\n </PopoverPrimitive.Close>\n );\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n {...popoverContentProps}\n className={className}\n data-taco=\"popover\"\n side={side}\n sideOffset={1}\n ref={ref}>\n {output}\n <UnstyledArrow className=\"text-white\" />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Close = React.forwardRef(\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\n )\n);\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: JSX.Element;\n modal?: boolean;\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n Portal: React.FunctionComponent<PopoverPrimitive.PopoverPortalProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = false, open, onChange, trigger, ...otherProps } = props;\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\n\n return (\n <PopoverContext.Provider value={context}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={onChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\nPopover.Portal = PopoverPrimitive.Portal;\n"],"names":["PopoverContext","React","props","ref","Anchor","PopoverAnchor","PopoverPrimitive","asChild","Trigger","PopoverTrigger","externalRef","parentRef","parentProps","refCallback","mergeRefs","children","_props$children","type","console","warn","name","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","placement","side","popoverContentProps","className","cn","getPopoverStyleClassnames","output","sideOffset","UnstyledArrow","Close","Popover","anchor","defaultOpen","modal","open","onChange","trigger","otherProps","context","Provider","value","onOpenChange","Portal"],"mappings":";;;;;;;AAUA,MAAMA,cAAc,gBAAGC,aAAmB,CAAsB;EAC5DC,KAAK,EAAE,EAAE;EACTC,GAAG,EAAE;CACR,CAAC;AAGF,MAAMC,MAAM,gBAAGH,UAAgB,CAAC,SAASI,aAAaA,CAACH,KAAyB,EAAEC,GAA8B;EAC5G,oBAAOF,cAACK,QAAuB,oBAAKJ,KAAK;IAAEK,OAAO;IAACJ,GAAG,EAAEA;KAAO;AACnE,CAAC,CAAC;AAGF,MAAMK,OAAO,gBAAGP,UAAgB,CAAC,SAASQ,cAAcA,CAACP,KAA0B,EAAEQ,WAAmC;;EACpH,MAAM;IAAEP,GAAG,EAAEQ,SAAS;IAAET,KA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MAAM,QAAEkC,MAAM,CAAU,GAAG,IAAI,EACzCK,OAAO,IAAI,CAACL,MAAM,gBAAGrC,cAACO,OAAO,QAAEmC,OAAO,CAAW,GAAG,IAAI,EACxD5B,QAAQ,CACW,CACF;AAElC,CAAC;AACDsB,OAAO,CAACjC,MAAM,GAAGA,MAAM;AACvBiC,OAAO,CAAC7B,OAAO,GAAGA,OAAO;AACzB6B,OAAO,CAACZ,OAAO,GAAGA,OAAO;AACzBY,OAAO,CAACD,KAAK,GAAGA,KAAK;AACrBC,OAAO,CAACY,MAAM,GAAG3C,MAAuB;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../..';\nimport { UnstyledArrow } from './Primitives';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement>;\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, ref: React.Ref<HTMLDivElement>) {\n return <PopoverPrimitive.Anchor {...props} asChild ref={ref} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement>;\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let children = props.children;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n console.warn(\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\n );\n children = <span>{props.children}</span>;\n }\n\n return (\n <PopoverPrimitive.Trigger {...parentProps} {...props} ref={refCallback} asChild>\n {children}\n </PopoverPrimitive.Trigger>\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\nexport type PopoverContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side' | 'children'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, ...popoverContentProps } = props;\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = (\n <PopoverPrimitive.Close asChild>\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\n </PopoverPrimitive.Close>\n );\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n {...popoverContentProps}\n className={className}\n data-taco=\"popover\"\n side={side}\n sideOffset={1}\n ref={ref}>\n {output}\n <UnstyledArrow className=\"text-white\" />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Close = React.forwardRef(\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\n )\n);\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: JSX.Element;\n modal?: boolean;\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n Portal: React.FunctionComponent<PopoverPrimitive.PortalProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = false, open, onChange, trigger, ...otherProps } = props;\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\n\n return (\n <PopoverContext.Provider value={context}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={onChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\nPopover.Portal = PopoverPrimitive.Portal;\n"],"names":["PopoverContext","React","props","ref","Anchor","PopoverAnchor","PopoverPrimitive","asChild","Trigger","PopoverTrigger","externalRef","parentRef","parentProps","refCallback","mergeRefs","children","_props$children","type","console","warn","name","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","placement","side","popoverContentProps","className","cn","getPopoverStyleClassnames","output","sideOffset","UnstyledArrow","Close","Popover","anchor","defaultOpen","modal","open","onChange","trigger","otherProps","context","Provider","value","onOpenChange","Portal"],"mappings":";;;;;;;AAUA,MAAMA,cAAc,gBAAGC,aAAmB,CAAsB;EAC5DC,KAAK,EAAE,EAAE;EACTC,GAAG,EAAE;CACR,CAAC;AAGF,MAAMC,MAA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AAO;IAAEC,KAAK,EAAE0C,UAAU;IAAEzC;GAAK,CAAC,EAAE,CAACyC,UAAU,CAAC,CAAC;EAE/E,oBACI3C,cAACD,cAAc,CAAC8C,QAAQ;IAACC,KAAK,EAAEF;kBAC5B5C,cAACK,IAAqB;IAACiC,WAAW,EAAEA,WAAW;IAAEC,KAAK,EAAEA,KAAK;IAAEC,IAAI,EAAEA,IAAI;IAAEO,YAAY,EAAEN;KACpFJ,MAAM,gBAAGrC,cAACG,MAAM,QAAEkC,MAAM,CAAU,GAAG,IAAI,EACzCK,OAAO,IAAI,CAACL,MAAM,gBAAGrC,cAACO,OAAO,QAAEmC,OAAO,CAAW,GAAG,IAAI,EACxD5B,QAAQ,CACW,CACF;AAElC,CAAC;AACDsB,OAAO,CAACjC,MAAM,GAAGA,MAAM;AACvBiC,OAAO,CAAC7B,OAAO,GAAGA,OAAO;AACzB6B,OAAO,CAACZ,OAAO,GAAGA,OAAO;AACzBY,OAAO,CAACD,KAAK,GAAGA,KAAK;AACrBC,OAAO,CAACY,MAAM,GAAG3C,MAAuB;;;;"}
@@ -232,7 +232,9 @@ const defaultLocalisationTexts = {
232
232
  tooltip: 'Edit table'
233
233
  },
234
234
  create: {
235
- label: 'New'
235
+ label: 'New',
236
+ disabled: 'Existing new row must be saved',
237
+ saving: 'Saving...'
236
238
  }
237
239
  },
238
240
  clearChangesConfirmationDialog: {
@@ -254,8 +256,8 @@ const defaultLocalisationTexts = {
254
256
  },
255
257
  validation: {
256
258
  alert: {
257
- titleOne: '[COUNT] unsaved entry:',
258
- titlePlural: '[COUNT] unsaved entries:',
259
+ titleOne: '[COUNT] unsaved row:',
260
+ titlePlural: '[COUNT] unsaved rows:',
259
261
  messageOne: "[COLUMN] [ROW] is incomplete and hasn't been saved.",
260
262
  messagePlural: "[COLUMN] [ROW] are incomplete and haven't been saved.",
261
263
  messageRow: 'Row',