@veeqo/ui 14.13.1 → 14.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/components/Action/Action.d.ts +8 -8
  2. package/dist/components/AnimatedDropdown/hooks/useClickAway.cjs.map +1 -1
  3. package/dist/components/AnimatedDropdown/hooks/useClickAway.d.ts +1 -1
  4. package/dist/components/AnimatedDropdown/hooks/useClickAway.js.map +1 -1
  5. package/dist/components/Button/Button.d.ts +2 -2
  6. package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs.map +1 -1
  7. package/dist/components/DataGrid/components/GridContainer/GridContainer.d.ts +2 -2
  8. package/dist/components/DataGrid/components/GridContainer/GridContainer.js.map +1 -1
  9. package/dist/components/DataGrid/hooks/useKeyboardNavigation.cjs.map +1 -1
  10. package/dist/components/DataGrid/hooks/useKeyboardNavigation.d.ts +1 -1
  11. package/dist/components/DataGrid/hooks/useKeyboardNavigation.js.map +1 -1
  12. package/dist/components/DataTable/components/ActionBar.cjs.map +1 -1
  13. package/dist/components/DataTable/components/ActionBar.d.ts +2 -2
  14. package/dist/components/DataTable/components/ActionBar.js.map +1 -1
  15. package/dist/components/DataTable/components/StickyHead.cjs.map +1 -1
  16. package/dist/components/DataTable/components/StickyHead.d.ts +2 -2
  17. package/dist/components/DataTable/components/StickyHead.js.map +1 -1
  18. package/dist/components/DataTable/hooks/useCellWidths.cjs.map +1 -1
  19. package/dist/components/DataTable/hooks/useCellWidths.d.ts +1 -1
  20. package/dist/components/DataTable/hooks/useCellWidths.js.map +1 -1
  21. package/dist/components/DataTable/hooks/useColumnWidths.cjs.map +1 -1
  22. package/dist/components/DataTable/hooks/useColumnWidths.d.ts +1 -1
  23. package/dist/components/DataTable/hooks/useColumnWidths.js.map +1 -1
  24. package/dist/components/DataTable/hooks/useColumns.cjs.map +1 -1
  25. package/dist/components/DataTable/hooks/useColumns.d.ts +1 -1
  26. package/dist/components/DataTable/hooks/useColumns.js.map +1 -1
  27. package/dist/components/DateInputField/types.d.ts +2 -2
  28. package/dist/components/DimensionsInput/DimensionsInput.d.ts +88 -69
  29. package/dist/components/Flex/FlexCol/FlexCol.d.ts +1 -1
  30. package/dist/components/Flex/FlexRow/FlexRow.d.ts +1 -1
  31. package/dist/components/LegacyDataTable/StickyHeader.cjs.map +1 -1
  32. package/dist/components/LegacyDataTable/StickyHeader.d.ts +2 -2
  33. package/dist/components/LegacyDataTable/StickyHeader.js.map +1 -1
  34. package/dist/components/PhoneInput/index.d.ts +89 -69
  35. package/dist/components/Search/Search.d.ts +88 -69
  36. package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.cjs.map +1 -1
  37. package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.d.ts +2 -1
  38. package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.js.map +1 -1
  39. package/dist/components/SimpleTable/SimpleTable.d.ts +2 -2
  40. package/dist/components/Slider/hooks/types.d.ts +3 -3
  41. package/dist/components/Stack/Stack.d.ts +4 -4
  42. package/dist/components/TextField/TextField.d.ts +88 -69
  43. package/dist/components/TextField/index.d.ts +89 -69
  44. package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
  45. package/dist/components/Tooltip/Tooltip.d.ts +2 -1
  46. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  47. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.d.ts +1 -1
  48. package/dist/components/View/View.cjs.map +1 -1
  49. package/dist/components/View/View.js.map +1 -1
  50. package/dist/components/ViewTab/ViewTab.d.ts +1 -1
  51. package/dist/components/ViewsContainer/hooks/useSetScrollPosition.cjs +1 -1
  52. package/dist/components/ViewsContainer/hooks/useSetScrollPosition.cjs.map +1 -1
  53. package/dist/components/ViewsContainer/hooks/useSetScrollPosition.js +1 -1
  54. package/dist/components/ViewsContainer/hooks/useSetScrollPosition.js.map +1 -1
  55. package/dist/components/WeightInput/WeightInput.cjs +0 -3
  56. package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
  57. package/dist/components/WeightInput/WeightInput.js +0 -3
  58. package/dist/components/WeightInput/WeightInput.js.map +1 -1
  59. package/dist/hoc/withTokens/withTokens.cjs.map +1 -1
  60. package/dist/hoc/withTokens/withTokens.js.map +1 -1
  61. package/dist/hooks/useClickOutside.d.ts +1 -1
  62. package/dist/hooks/useDragToScroll.cjs.map +1 -1
  63. package/dist/hooks/useDragToScroll.d.ts +1 -1
  64. package/dist/hooks/useDragToScroll.js.map +1 -1
  65. package/dist/hooks/useIntersectionObserver.cjs +4 -4
  66. package/dist/hooks/useIntersectionObserver.cjs.map +1 -1
  67. package/dist/hooks/useIntersectionObserver.js +4 -4
  68. package/dist/hooks/useIntersectionObserver.js.map +1 -1
  69. package/dist/hooks/useResizeObserver.cjs +2 -2
  70. package/dist/hooks/useResizeObserver.cjs.map +1 -1
  71. package/dist/hooks/useResizeObserver.js +2 -2
  72. package/dist/hooks/useResizeObserver.js.map +1 -1
  73. package/package.json +12 -9
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  */
5
5
  export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
6
6
  appearance?: import("./types").ActionAppearance | undefined;
7
- as?: React.ElementType<any> | undefined;
7
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
8
8
  children?: React.ReactNode;
9
9
  className?: string | undefined;
10
10
  disabled?: boolean | undefined;
@@ -14,7 +14,7 @@ export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
14
14
  size?: import("./types").ActionSize | undefined;
15
15
  type?: "button" | "submit" | "reset" | undefined;
16
16
  variant?: import("./types").ActionVariant | undefined;
17
- } & Omit<Omit<any, "ref">, "href" | "rel" | "placeholder" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
17
+ } & Omit<Omit<any, "ref">, "href" | "rel" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof {
18
18
  appearance?: import("./types").ActionAppearance | undefined;
19
19
  as?: C | undefined;
20
20
  children?: React.ReactNode;
@@ -32,7 +32,7 @@ export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
32
32
  hideExternalLinkIcon?: boolean | undefined;
33
33
  }, "ref"> | Omit<{
34
34
  appearance?: import("./types").ActionAppearance | undefined;
35
- as?: React.ElementType<any> | undefined;
35
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
36
36
  children?: React.ReactNode;
37
37
  className?: string | undefined;
38
38
  disabled?: boolean | undefined;
@@ -42,7 +42,7 @@ export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
42
42
  size?: import("./types").ActionSize | undefined;
43
43
  type?: "button" | "submit" | "reset" | undefined;
44
44
  variant?: import("./types").ActionVariant | undefined;
45
- } & Omit<Omit<any, "ref">, "href" | "rel" | "placeholder" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
45
+ } & Omit<Omit<any, "ref">, "href" | "rel" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof {
46
46
  appearance?: import("./types").ActionAppearance | undefined;
47
47
  as?: C | undefined;
48
48
  children?: React.ReactNode;
@@ -59,7 +59,7 @@ export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
59
59
  }, "ref">) & React.RefAttributes<HTMLElement>>;
60
60
  export declare const Action: React.ForwardRefExoticComponent<(Omit<Omit<Omit<{
61
61
  appearance?: import("./types").ActionAppearance | undefined;
62
- as?: React.ElementType<any> | undefined;
62
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
63
63
  children?: React.ReactNode;
64
64
  className?: string | undefined;
65
65
  disabled?: boolean | undefined;
@@ -69,7 +69,7 @@ export declare const Action: React.ForwardRefExoticComponent<(Omit<Omit<Omit<{
69
69
  size?: import("./types").ActionSize | undefined;
70
70
  type?: "button" | "submit" | "reset" | undefined;
71
71
  variant?: import("./types").ActionVariant | undefined;
72
- } & Omit<Omit<any, "ref">, "href" | "rel" | "placeholder" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
72
+ } & Omit<Omit<any, "ref">, "href" | "rel" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof {
73
73
  appearance?: import("./types").ActionAppearance | undefined;
74
74
  as?: C | undefined;
75
75
  children?: React.ReactNode;
@@ -87,7 +87,7 @@ export declare const Action: React.ForwardRefExoticComponent<(Omit<Omit<Omit<{
87
87
  hideExternalLinkIcon?: boolean | undefined;
88
88
  }, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & import("../../hoc/withTokens").WithTokensProps, "ref"> | Omit<Omit<Omit<{
89
89
  appearance?: import("./types").ActionAppearance | undefined;
90
- as?: React.ElementType<any> | undefined;
90
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
91
91
  children?: React.ReactNode;
92
92
  className?: string | undefined;
93
93
  disabled?: boolean | undefined;
@@ -97,7 +97,7 @@ export declare const Action: React.ForwardRefExoticComponent<(Omit<Omit<Omit<{
97
97
  size?: import("./types").ActionSize | undefined;
98
98
  type?: "button" | "submit" | "reset" | undefined;
99
99
  variant?: import("./types").ActionVariant | undefined;
100
- } & Omit<Omit<any, "ref">, "href" | "rel" | "placeholder" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "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" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
100
+ } & Omit<Omit<any, "ref">, "href" | "rel" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof {
101
101
  appearance?: import("./types").ActionAppearance | undefined;
102
102
  as?: C | undefined;
103
103
  children?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"useClickAway.cjs","sources":["../../../../src/components/AnimatedDropdown/hooks/useClickAway.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const useClickAway = (\n ref: React.RefObject<HTMLElement>,\n onClickAway: (event: Event) => void,\n) => {\n useEffect(() => {\n const handleClickAway = (event: Event) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n onClickAway(event);\n }\n };\n\n document.addEventListener('mousedown', handleClickAway);\n return () => {\n document.removeEventListener('mousedown', handleClickAway);\n };\n }, [ref, onClickAway]);\n};\n"],"names":["useEffect"],"mappings":";;;;MAEa,YAAY,GAAG,CAC1B,GAAiC,EACjC,WAAmC,KACjC;IACFA,eAAS,CAAC,MAAK;AACb,QAAA,MAAM,eAAe,GAAG,CAAC,KAAY,KAAI;AACvC,YAAA,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC9D,WAAW,CAAC,KAAK,CAAC;AACnB,YAAA;AACH,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC;AACvD,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC;AAC5D,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACxB;;;;"}
1
+ {"version":3,"file":"useClickAway.cjs","sources":["../../../../src/components/AnimatedDropdown/hooks/useClickAway.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const useClickAway = (\n ref: React.RefObject<HTMLElement | null>,\n onClickAway: (event: Event) => void,\n) => {\n useEffect(() => {\n const handleClickAway = (event: Event) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n onClickAway(event);\n }\n };\n\n document.addEventListener('mousedown', handleClickAway);\n return () => {\n document.removeEventListener('mousedown', handleClickAway);\n };\n }, [ref, onClickAway]);\n};\n"],"names":["useEffect"],"mappings":";;;;MAEa,YAAY,GAAG,CAC1B,GAAwC,EACxC,WAAmC,KACjC;IACFA,eAAS,CAAC,MAAK;AACb,QAAA,MAAM,eAAe,GAAG,CAAC,KAAY,KAAI;AACvC,YAAA,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC9D,WAAW,CAAC,KAAK,CAAC;AACnB,YAAA;AACH,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC;AACvD,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC;AAC5D,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACxB;;;;"}
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const useClickAway: (ref: React.RefObject<HTMLElement>, onClickAway: (event: Event) => void) => void;
2
+ export declare const useClickAway: (ref: React.RefObject<HTMLElement | null>, onClickAway: (event: Event) => void) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useClickAway.js","sources":["../../../../src/components/AnimatedDropdown/hooks/useClickAway.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const useClickAway = (\n ref: React.RefObject<HTMLElement>,\n onClickAway: (event: Event) => void,\n) => {\n useEffect(() => {\n const handleClickAway = (event: Event) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n onClickAway(event);\n }\n };\n\n document.addEventListener('mousedown', handleClickAway);\n return () => {\n document.removeEventListener('mousedown', handleClickAway);\n };\n }, [ref, onClickAway]);\n};\n"],"names":[],"mappings":";;MAEa,YAAY,GAAG,CAC1B,GAAiC,EACjC,WAAmC,KACjC;IACF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,eAAe,GAAG,CAAC,KAAY,KAAI;AACvC,YAAA,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC9D,WAAW,CAAC,KAAK,CAAC;AACnB,YAAA;AACH,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC;AACvD,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC;AAC5D,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACxB;;;;"}
1
+ {"version":3,"file":"useClickAway.js","sources":["../../../../src/components/AnimatedDropdown/hooks/useClickAway.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const useClickAway = (\n ref: React.RefObject<HTMLElement | null>,\n onClickAway: (event: Event) => void,\n) => {\n useEffect(() => {\n const handleClickAway = (event: Event) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n onClickAway(event);\n }\n };\n\n document.addEventListener('mousedown', handleClickAway);\n return () => {\n document.removeEventListener('mousedown', handleClickAway);\n };\n }, [ref, onClickAway]);\n};\n"],"names":[],"mappings":";;MAEa,YAAY,GAAG,CAC1B,GAAwC,EACxC,WAAmC,KACjC;IACF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,eAAe,GAAG,CAAC,KAAY,KAAI;AACvC,YAAA,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC9D,WAAW,CAAC,KAAK,CAAC;AACnB,YAAA;AACH,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC;AACvD,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC;AAC5D,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACxB;;;;"}
@@ -8,7 +8,7 @@ export declare const ButtonBase: React.ForwardRefExoticComponent<React.ButtonHTM
8
8
  children?: React.ReactNode;
9
9
  variant?: ButtonVariant | undefined;
10
10
  size?: import("./types").ButtonSize | undefined;
11
- iconSlot?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
11
+ iconSlot?: React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
12
12
  dropdown?: boolean | undefined;
13
13
  loading?: boolean | undefined;
14
14
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -16,7 +16,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<React.ButtonHT
16
16
  children?: React.ReactNode;
17
17
  variant?: ButtonVariant | undefined;
18
18
  size?: import("./types").ButtonSize | undefined;
19
- iconSlot?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
19
+ iconSlot?: React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
20
20
  dropdown?: boolean | undefined;
21
21
  loading?: boolean | undefined;
22
22
  } & React.RefAttributes<HTMLButtonElement>, "ref"> & import("../../hoc/withTokens").WithTokensProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"GridContainer.cjs","sources":["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { useScrollPosition } from '../../../../hooks';\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> &\n Pick<React.HTMLAttributes<HTMLTableElement>, 'id' | 'className'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n };\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n id,\n className,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n const { scrollPosition, onScroll, enableTransition } = useScrollPosition({ containerRef });\n\n // CSS variables to control pinned column shadow visibility\n const hideShadows = !scrollPosition || scrollPosition === 'none';\n const shadowVisibility = {\n '--pinned-left-shadow-opacity': hideShadows || scrollPosition === 'start' ? 0 : 1,\n '--pinned-right-shadow-opacity': hideShadows || scrollPosition === 'end' ? 0 : 1,\n '--pinned-shadow-transition-duration': enableTransition ? '0.3s' : '0s',\n };\n\n return (\n <Container\n ref={containerRef}\n borderMode={borderMode}\n style={containerStyles}\n onScroll={onScroll}\n >\n <table\n id={id}\n ref={tableRef}\n className={buildClassnames([gridContainerClassname, className])}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n ...shadowVisibility,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["buildClassnames","styles","usePinnedColumnLayout","useScrollPosition","React","Container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BAAuB,GAAG,OAAO,GAAG,MAAM;AACvD,gBAAA,WAAW,EAAEM,WAAK,CAAC,KAAK,CAAC,OAAO,CAAC;AACjC,gBAAA,GAAG,wBAAwB;AAC3B,gBAAA,GAAG,gBAAgB;AACH,aAAA,EAAA,eAAA,EAEL,KAAK,CAAC,cAAc,EAAE,CAAC,MAAM,mBAC7B,KAAK,CAAC,WAAW,EAAE,gBACtB,SAAS,EAAA,EAEpB,QAAQ,CACH,CACE;AAEhB;;;;"}
1
+ {"version":3,"file":"GridContainer.cjs","sources":["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { useScrollPosition } from '../../../../hooks';\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> &\n Pick<React.HTMLAttributes<HTMLTableElement>, 'id' | 'className'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement | null>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement | null>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n };\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n id,\n className,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n const { scrollPosition, onScroll, enableTransition } = useScrollPosition({ containerRef });\n\n // CSS variables to control pinned column shadow visibility\n const hideShadows = !scrollPosition || scrollPosition === 'none';\n const shadowVisibility = {\n '--pinned-left-shadow-opacity': hideShadows || scrollPosition === 'start' ? 0 : 1,\n '--pinned-right-shadow-opacity': hideShadows || scrollPosition === 'end' ? 0 : 1,\n '--pinned-shadow-transition-duration': enableTransition ? '0.3s' : '0s',\n };\n\n return (\n <Container\n ref={containerRef}\n borderMode={borderMode}\n style={containerStyles}\n onScroll={onScroll}\n >\n <table\n id={id}\n ref={tableRef}\n className={buildClassnames([gridContainerClassname, className])}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n ...shadowVisibility,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["buildClassnames","styles","usePinnedColumnLayout","useScrollPosition","React","Container","theme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAM,sBAAsB,GAAGA,+BAAe,CAAC,CAACC,oBAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AAEnF;;;AAGG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,EAAE,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hB;;;;"}
@@ -7,11 +7,11 @@ type GridContainerProps = Pick<AriaAttributes, 'aria-label'> & Pick<React.HTMLAt
7
7
  /**
8
8
  * Reference to be used for the outer container element.
9
9
  */
10
- containerRef?: RefObject<HTMLDivElement>;
10
+ containerRef?: RefObject<HTMLDivElement | null>;
11
11
  /**
12
12
  * Reference to be used for the table element.
13
13
  */
14
- tableRef?: RefObject<HTMLTableElement>;
14
+ tableRef?: RefObject<HTMLTableElement | null>;
15
15
  /**
16
16
  * Border mode.
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GridContainer.js","sources":["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { useScrollPosition } from '../../../../hooks';\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> &\n Pick<React.HTMLAttributes<HTMLTableElement>, 'id' | 'className'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n };\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n id,\n className,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n const { scrollPosition, onScroll, enableTransition } = useScrollPosition({ containerRef });\n\n // CSS variables to control pinned column shadow visibility\n const hideShadows = !scrollPosition || scrollPosition === 'none';\n const shadowVisibility = {\n '--pinned-left-shadow-opacity': hideShadows || scrollPosition === 'start' ? 0 : 1,\n '--pinned-right-shadow-opacity': hideShadows || scrollPosition === 'end' ? 0 : 1,\n '--pinned-shadow-transition-duration': enableTransition ? '0.3s' : '0s',\n };\n\n return (\n <Container\n ref={containerRef}\n borderMode={borderMode}\n style={containerStyles}\n onScroll={onScroll}\n >\n <table\n id={id}\n ref={tableRef}\n className={buildClassnames([gridContainerClassname, className])}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n ...shadowVisibility,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;AAgEA,MAAM,sBAAsB,GAAG,eAAe,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AAEnF;;;AAGG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,EAAE,EACF,SAAS,EACT,YAAY,EAAE,SA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["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { useScrollPosition } from '../../../../hooks';\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> &\n Pick<React.HTMLAttributes<HTMLTableElement>, 'id' | 'className'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement | null>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement | null>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n };\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n id,\n className,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n const { scrollPosition, onScroll, enableTransition } = useScrollPosition({ containerRef });\n\n // CSS variables to control pinned column shadow visibility\n const hideShadows = !scrollPosition || scrollPosition === 'none';\n const shadowVisibility = {\n '--pinned-left-shadow-opacity': hideShadows || scrollPosition === 'start' ? 0 : 1,\n '--pinned-right-shadow-opacity': hideShadows || scrollPosition === 'end' ? 0 : 1,\n '--pinned-shadow-transition-duration': enableTransition ? '0.3s' : '0s',\n };\n\n return (\n <Container\n ref={containerRef}\n borderMode={borderMode}\n style={containerStyles}\n onScroll={onScroll}\n >\n <table\n id={id}\n ref={tableRef}\n className={buildClassnames([gridContainerClassname, className])}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n ...shadowVisibility,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;AAgEA,MAAM,sBAAsB,GAAG,eAAe,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AAEnF;;;AAGG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,EAAE,EACF,SAAS,EACT,YAAY,EAAE,SAAS,GACJ,KAAI;IACvB,MAAM,EAAE,wBAAwB,EAAE,GAAG,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC;AACrE,IAAA,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,EAAE,YAAY,EAAE,CAAC;;IAG1F,MAAM,WAAW,GAAG,CAAC,cAAc,IAAI,cAAc,KAAK,MAAM;AAChE,IAAA,MAAM,gBAAgB,GAAG;AACvB,QAAA,8BAA8B,EAAE,WAAW,IAAI,cAAc,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC;AACjF,QAAA,+BAA+B,EAAE,WAAW,IAAI,cAAc,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC;QAChF,qCAAqC,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI;KACxE;AAED,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,SAAS,IACR,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,QAAQ,EAAA;QAElBA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,eAAe,CAAC,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,EAC/D,IAAI,EAAE,SAAS,CAAC,KAAK,EACrB,KAAK,EACH;gBACE,WAAW,EAAE,uBAAuB,GAAG,OAAO,GAAG,MAAM;AACvD,gBAAA,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;AACjC,gBAAA,GAAG,wBAAwB;AAC3B,gBAAA,GAAG,gBAAgB;AACH,aAAA,EAAA,eAAA,EAEL,KAAK,CAAC,cAAc,EAAE,CAAC,MAAM,mBAC7B,KAAK,CAAC,WAAW,EAAE,gBACtB,SAAS,EAAA,EAEpB,QAAQ,CACH,CACE;AAEhB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardNavigation.cjs","sources":["../../../../src/components/DataGrid/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { RefObject, useEffect } from 'react';\n\nimport { TABBABLE_SELECTORS } from '../../../utils/tabbableSelectors';\nimport { DataGridProps } from '../types';\n\ntype UseKeyboardNavigationProps = Pick<DataGridProps, 'enableKeyboardNavigation'> & {\n tableRef: RefObject<HTMLTableElement>;\n};\n\n/**\n * Finds a target element to be selected within a table cell element. If the table cell\n * contains focusable children, the first child will be returned, otherwise we'll simply\n * focus on the table cell.\n */\nconst findTargetElement = (tableCell: HTMLElement): HTMLElement => {\n const validChildTarget: HTMLElement | null = tableCell.querySelector(TABBABLE_SELECTORS);\n return validChildTarget ?? tableCell;\n};\n\n/**\n * Finds the next available cell that can be focused by the user, within the next row.\n */\nconst findNextCell = (nextRow: HTMLTableRowElement, nextCellIndex: number) => {\n if (\n nextCellIndex >= nextRow.cells.length ||\n nextRow.cells[nextCellIndex].hasAttribute('aria-hidden')\n ) {\n // Ignore (skip) cells that are marked as hidden. Find the next available cell (if there is one) that is visible.\n return [...nextRow.cells].reverse().find((cell) => !cell.hasAttribute('aria-hidden'));\n }\n\n return nextRow.cells[nextCellIndex];\n};\n\n/**\n * Handles a `keydown` event from within the table. Navigates between cells using the arrow keys.\n * @param table The table element.\n * @param event The keyboard event.\n */\nconst handleKeyDown = (table: HTMLTableElement, event: KeyboardEvent) => {\n const target = event.target as HTMLElement;\n\n if (!table) return;\n\n const currentCell = target.closest('td, th') as HTMLElement;\n if (!currentCell) return;\n\n const currentRow = currentCell.parentElement as HTMLTableRowElement;\n if (!currentRow) return;\n\n const rowIndex = Array.from(table.querySelectorAll('tr')).indexOf(currentRow);\n const cellIndex = Array.from(currentRow.children).indexOf(currentCell);\n\n let nextRowIndex = rowIndex;\n let nextCellIndex = cellIndex;\n\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n nextRowIndex = Math.max(0, rowIndex - 1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n nextRowIndex = Math.min(table.rows.length - 1, rowIndex + 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n nextCellIndex = Math.max(0, cellIndex - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n nextCellIndex = Math.min(currentRow.cells.length - 1, cellIndex + 1);\n break;\n default:\n return;\n }\n\n const nextRow = table.rows[nextRowIndex];\n const nextCell = findNextCell(nextRow, nextCellIndex);\n\n if (nextCell) {\n const nextTarget = findTargetElement(nextCell);\n nextTarget.setAttribute('tabindex', '0');\n nextTarget.scrollIntoView?.({ inline: 'nearest', block: 'nearest' });\n nextTarget.focus();\n\n // Clear the tabindex when the element loses focus\n nextTarget.addEventListener(\n 'blur',\n () => {\n if (nextTarget.attributes.getNamedItem('data-first')) {\n return;\n }\n\n nextTarget.removeAttribute('tabindex');\n },\n { once: true },\n );\n }\n};\n\n/**\n * Hook which sets up keyboard navigation within the `DataGrid` component using the arrow keys, can be disabled\n * with the `enableKeyboardNavigation` prop.\n *\n * Supports navigating between cells and rows, with the focus directed either towards the cell element, or\n * the first interactive child if one is present.\n */\nexport const useKeyboardNavigation = ({\n enableKeyboardNavigation,\n tableRef,\n}: UseKeyboardNavigationProps) => {\n useEffect(() => {\n if (!tableRef.current || !enableKeyboardNavigation) {\n return undefined;\n }\n\n const table = tableRef.current;\n\n // Find the first column header in the table, and assign it a tabindex.\n const firstElement = table.querySelector('th') as HTMLElement;\n if (!firstElement) return undefined;\n const firstTarget = findTargetElement(firstElement);\n\n firstTarget.setAttribute('tabindex', '0');\n firstTarget.setAttribute('data-first', '');\n\n const handler = (event: KeyboardEvent) => handleKeyDown(table, event);\n table.addEventListener('keydown', handler);\n\n return () => {\n table.removeEventListener('keydown', handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableRef, enableKeyboardNavigation]);\n};\n"],"names":["TABBABLE_SELECTORS","useEffect"],"mappings":";;;;;AASA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,SAAsB,KAAiB;IAChE,MAAM,gBAAgB,GAAuB,SAAS,CAAC,aAAa,CAACA,oCAAkB,CAAC;AACxF,IAAA,OAAO,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,SAAS;AACtC,CAAC;AAED;;AAEG;AACH,MAAM,YAAY,GAAG,CAAC,OAA4B,EAAE,aAAqB,KAAI;AAC3E,IAAA,IACE,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM;QACrC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,EAC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I,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,wBAAwB,EAAE;AAClD,YAAA,OAAO,SAAS;AACjB,QAAA;AAED,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO;;QAG9B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAgB;AAC7D,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,SAAS;AACnC,QAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC;AAEnD,QAAA,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACzC,QAAA,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC;AAE1C,QAAA,MAAM,OAAO,GAAG,CAAC,KAAoB,KAAK,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACrE,QAAA,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;AAE1C,QAAA,OAAO,MAAK;AACV,YAAA,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/C,QAAA,CAAC;;AAEH,IAAA,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;AAC1C;;;;"}
1
+ {"version":3,"file":"useKeyboardNavigation.cjs","sources":["../../../../src/components/DataGrid/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { RefObject, useEffect } from 'react';\n\nimport { TABBABLE_SELECTORS } from '../../../utils/tabbableSelectors';\nimport { DataGridProps } from '../types';\n\ntype UseKeyboardNavigationProps = Pick<DataGridProps, 'enableKeyboardNavigation'> & {\n tableRef: RefObject<HTMLTableElement | null>;\n};\n\n/**\n * Finds a target element to be selected within a table cell element. If the table cell\n * contains focusable children, the first child will be returned, otherwise we'll simply\n * focus on the table cell.\n */\nconst findTargetElement = (tableCell: HTMLElement): HTMLElement => {\n const validChildTarget: HTMLElement | null = tableCell.querySelector(TABBABLE_SELECTORS);\n return validChildTarget ?? tableCell;\n};\n\n/**\n * Finds the next available cell that can be focused by the user, within the next row.\n */\nconst findNextCell = (nextRow: HTMLTableRowElement, nextCellIndex: number) => {\n if (\n nextCellIndex >= nextRow.cells.length ||\n nextRow.cells[nextCellIndex].hasAttribute('aria-hidden')\n ) {\n // Ignore (skip) cells that are marked as hidden. Find the next available cell (if there is one) that is visible.\n return [...nextRow.cells].reverse().find((cell) => !cell.hasAttribute('aria-hidden'));\n }\n\n return nextRow.cells[nextCellIndex];\n};\n\n/**\n * Handles a `keydown` event from within the table. Navigates between cells using the arrow keys.\n * @param table The table element.\n * @param event The keyboard event.\n */\nconst handleKeyDown = (table: HTMLTableElement, event: KeyboardEvent) => {\n const target = event.target as HTMLElement;\n\n if (!table) return;\n\n const currentCell = target.closest('td, th') as HTMLElement;\n if (!currentCell) return;\n\n const currentRow = currentCell.parentElement as HTMLTableRowElement;\n if (!currentRow) return;\n\n const rowIndex = Array.from(table.querySelectorAll('tr')).indexOf(currentRow);\n const cellIndex = Array.from(currentRow.children).indexOf(currentCell);\n\n let nextRowIndex = rowIndex;\n let nextCellIndex = cellIndex;\n\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n nextRowIndex = Math.max(0, rowIndex - 1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n nextRowIndex = Math.min(table.rows.length - 1, rowIndex + 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n nextCellIndex = Math.max(0, cellIndex - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n nextCellIndex = Math.min(currentRow.cells.length - 1, cellIndex + 1);\n break;\n default:\n return;\n }\n\n const nextRow = table.rows[nextRowIndex];\n const nextCell = findNextCell(nextRow, nextCellIndex);\n\n if (nextCell) {\n const nextTarget = findTargetElement(nextCell);\n nextTarget.setAttribute('tabindex', '0');\n nextTarget.scrollIntoView?.({ inline: 'nearest', block: 'nearest' });\n nextTarget.focus();\n\n // Clear the tabindex when the element loses focus\n nextTarget.addEventListener(\n 'blur',\n () => {\n if (nextTarget.attributes.getNamedItem('data-first')) {\n return;\n }\n\n nextTarget.removeAttribute('tabindex');\n },\n { once: true },\n );\n }\n};\n\n/**\n * Hook which sets up keyboard navigation within the `DataGrid` component using the arrow keys, can be disabled\n * with the `enableKeyboardNavigation` prop.\n *\n * Supports navigating between cells and rows, with the focus directed either towards the cell element, or\n * the first interactive child if one is present.\n */\nexport const useKeyboardNavigation = ({\n enableKeyboardNavigation,\n tableRef,\n}: UseKeyboardNavigationProps) => {\n useEffect(() => {\n if (!tableRef.current || !enableKeyboardNavigation) {\n return undefined;\n }\n\n const table = tableRef.current;\n\n // Find the first column header in the table, and assign it a tabindex.\n const firstElement = table.querySelector('th') as HTMLElement;\n if (!firstElement) return undefined;\n const firstTarget = findTargetElement(firstElement);\n\n firstTarget.setAttribute('tabindex', '0');\n firstTarget.setAttribute('data-first', '');\n\n const handler = (event: KeyboardEvent) => handleKeyDown(table, event);\n table.addEventListener('keydown', handler);\n\n return () => {\n table.removeEventListener('keydown', handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableRef, enableKeyboardNavigation]);\n};\n"],"names":["TABBABLE_SELECTORS","useEffect"],"mappings":";;;;;AASA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,SAAsB,KAAiB;IAChE,MAAM,gBAAgB,GAAuB,SAAS,CAAC,aAAa,CAACA,oCAAkB,CAAC;AACxF,IAAA,OAAO,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,SAAS;AACtC,CAAC;AAED;;AAEG;AACH,MAAM,YAAY,GAAG,CAAC,OAA4B,EAAE,aAAqB,KAAI;AAC3E,IAAA,IACE,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM;QACrC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,EACxD;;QAEA,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,IAA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jB,QAAA;AAED,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO;;QAG9B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAgB;AAC7D,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,SAAS;AACnC,QAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC;AAEnD,QAAA,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACzC,QAAA,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC;AAE1C,QAAA,MAAM,OAAO,GAAG,CAAC,KAAoB,KAAK,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACrE,QAAA,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;AAE1C,QAAA,OAAO,MAAK;AACV,YAAA,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/C,QAAA,CAAC;;AAEH,IAAA,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;AAC1C;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { RefObject } from 'react';
2
2
  import { DataGridProps } from '../types';
3
3
  type UseKeyboardNavigationProps = Pick<DataGridProps, 'enableKeyboardNavigation'> & {
4
- tableRef: RefObject<HTMLTableElement>;
4
+ tableRef: RefObject<HTMLTableElement | null>;
5
5
  };
6
6
  /**
7
7
  * Hook which sets up keyboard navigation within the `DataGrid` component using the arrow keys, can be disabled
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/DataGrid/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { RefObject, useEffect } from 'react';\n\nimport { TABBABLE_SELECTORS } from '../../../utils/tabbableSelectors';\nimport { DataGridProps } from '../types';\n\ntype UseKeyboardNavigationProps = Pick<DataGridProps, 'enableKeyboardNavigation'> & {\n tableRef: RefObject<HTMLTableElement>;\n};\n\n/**\n * Finds a target element to be selected within a table cell element. If the table cell\n * contains focusable children, the first child will be returned, otherwise we'll simply\n * focus on the table cell.\n */\nconst findTargetElement = (tableCell: HTMLElement): HTMLElement => {\n const validChildTarget: HTMLElement | null = tableCell.querySelector(TABBABLE_SELECTORS);\n return validChildTarget ?? tableCell;\n};\n\n/**\n * Finds the next available cell that can be focused by the user, within the next row.\n */\nconst findNextCell = (nextRow: HTMLTableRowElement, nextCellIndex: number) => {\n if (\n nextCellIndex >= nextRow.cells.length ||\n nextRow.cells[nextCellIndex].hasAttribute('aria-hidden')\n ) {\n // Ignore (skip) cells that are marked as hidden. Find the next available cell (if there is one) that is visible.\n return [...nextRow.cells].reverse().find((cell) => !cell.hasAttribute('aria-hidden'));\n }\n\n return nextRow.cells[nextCellIndex];\n};\n\n/**\n * Handles a `keydown` event from within the table. Navigates between cells using the arrow keys.\n * @param table The table element.\n * @param event The keyboard event.\n */\nconst handleKeyDown = (table: HTMLTableElement, event: KeyboardEvent) => {\n const target = event.target as HTMLElement;\n\n if (!table) return;\n\n const currentCell = target.closest('td, th') as HTMLElement;\n if (!currentCell) return;\n\n const currentRow = currentCell.parentElement as HTMLTableRowElement;\n if (!currentRow) return;\n\n const rowIndex = Array.from(table.querySelectorAll('tr')).indexOf(currentRow);\n const cellIndex = Array.from(currentRow.children).indexOf(currentCell);\n\n let nextRowIndex = rowIndex;\n let nextCellIndex = cellIndex;\n\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n nextRowIndex = Math.max(0, rowIndex - 1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n nextRowIndex = Math.min(table.rows.length - 1, rowIndex + 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n nextCellIndex = Math.max(0, cellIndex - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n nextCellIndex = Math.min(currentRow.cells.length - 1, cellIndex + 1);\n break;\n default:\n return;\n }\n\n const nextRow = table.rows[nextRowIndex];\n const nextCell = findNextCell(nextRow, nextCellIndex);\n\n if (nextCell) {\n const nextTarget = findTargetElement(nextCell);\n nextTarget.setAttribute('tabindex', '0');\n nextTarget.scrollIntoView?.({ inline: 'nearest', block: 'nearest' });\n nextTarget.focus();\n\n // Clear the tabindex when the element loses focus\n nextTarget.addEventListener(\n 'blur',\n () => {\n if (nextTarget.attributes.getNamedItem('data-first')) {\n return;\n }\n\n nextTarget.removeAttribute('tabindex');\n },\n { once: true },\n );\n }\n};\n\n/**\n * Hook which sets up keyboard navigation within the `DataGrid` component using the arrow keys, can be disabled\n * with the `enableKeyboardNavigation` prop.\n *\n * Supports navigating between cells and rows, with the focus directed either towards the cell element, or\n * the first interactive child if one is present.\n */\nexport const useKeyboardNavigation = ({\n enableKeyboardNavigation,\n tableRef,\n}: UseKeyboardNavigationProps) => {\n useEffect(() => {\n if (!tableRef.current || !enableKeyboardNavigation) {\n return undefined;\n }\n\n const table = tableRef.current;\n\n // Find the first column header in the table, and assign it a tabindex.\n const firstElement = table.querySelector('th') as HTMLElement;\n if (!firstElement) return undefined;\n const firstTarget = findTargetElement(firstElement);\n\n firstTarget.setAttribute('tabindex', '0');\n firstTarget.setAttribute('data-first', '');\n\n const handler = (event: KeyboardEvent) => handleKeyDown(table, event);\n table.addEventListener('keydown', handler);\n\n return () => {\n table.removeEventListener('keydown', handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableRef, enableKeyboardNavigation]);\n};\n"],"names":[],"mappings":";;;AASA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,SAAsB,KAAiB;IAChE,MAAM,gBAAgB,GAAuB,SAAS,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxF,IAAA,OAAO,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,SAAS;AACtC,CAAC;AAED;;AAEG;AACH,MAAM,YAAY,GAAG,CAAC,OAA4B,EAAE,aAAqB,KAAI;AAC3E,IAAA,IACE,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,MA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pC,wBAAwB,EACxB,QAAQ,GACmB,KAAI;IAC/B,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,wBAAwB,EAAE;AAClD,YAAA,OAAO,SAAS;AACjB,QAAA;AAED,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO;;QAG9B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAgB;AAC7D,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,SAAS;AACnC,QAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC;AAEnD,QAAA,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACzC,QAAA,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC;AAE1C,QAAA,MAAM,OAAO,GAAG,CAAC,KAAoB,KAAK,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACrE,QAAA,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;AAE1C,QAAA,OAAO,MAAK;AACV,YAAA,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/C,QAAA,CAAC;;AAEH,IAAA,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;AAC1C;;;;"}
1
+ {"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/DataGrid/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { RefObject, useEffect } from 'react';\n\nimport { TABBABLE_SELECTORS } from '../../../utils/tabbableSelectors';\nimport { DataGridProps } from '../types';\n\ntype UseKeyboardNavigationProps = Pick<DataGridProps, 'enableKeyboardNavigation'> & {\n tableRef: RefObject<HTMLTableElement | null>;\n};\n\n/**\n * Finds a target element to be selected within a table cell element. If the table cell\n * contains focusable children, the first child will be returned, otherwise we'll simply\n * focus on the table cell.\n */\nconst findTargetElement = (tableCell: HTMLElement): HTMLElement => {\n const validChildTarget: HTMLElement | null = tableCell.querySelector(TABBABLE_SELECTORS);\n return validChildTarget ?? tableCell;\n};\n\n/**\n * Finds the next available cell that can be focused by the user, within the next row.\n */\nconst findNextCell = (nextRow: HTMLTableRowElement, nextCellIndex: number) => {\n if (\n nextCellIndex >= nextRow.cells.length ||\n nextRow.cells[nextCellIndex].hasAttribute('aria-hidden')\n ) {\n // Ignore (skip) cells that are marked as hidden. Find the next available cell (if there is one) that is visible.\n return [...nextRow.cells].reverse().find((cell) => !cell.hasAttribute('aria-hidden'));\n }\n\n return nextRow.cells[nextCellIndex];\n};\n\n/**\n * Handles a `keydown` event from within the table. Navigates between cells using the arrow keys.\n * @param table The table element.\n * @param event The keyboard event.\n */\nconst handleKeyDown = (table: HTMLTableElement, event: KeyboardEvent) => {\n const target = event.target as HTMLElement;\n\n if (!table) return;\n\n const currentCell = target.closest('td, th') as HTMLElement;\n if (!currentCell) return;\n\n const currentRow = currentCell.parentElement as HTMLTableRowElement;\n if (!currentRow) return;\n\n const rowIndex = Array.from(table.querySelectorAll('tr')).indexOf(currentRow);\n const cellIndex = Array.from(currentRow.children).indexOf(currentCell);\n\n let nextRowIndex = rowIndex;\n let nextCellIndex = cellIndex;\n\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n nextRowIndex = Math.max(0, rowIndex - 1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n nextRowIndex = Math.min(table.rows.length - 1, rowIndex + 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n nextCellIndex = Math.max(0, cellIndex - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n nextCellIndex = Math.min(currentRow.cells.length - 1, cellIndex + 1);\n break;\n default:\n return;\n }\n\n const nextRow = table.rows[nextRowIndex];\n const nextCell = findNextCell(nextRow, nextCellIndex);\n\n if (nextCell) {\n const nextTarget = findTargetElement(nextCell);\n nextTarget.setAttribute('tabindex', '0');\n nextTarget.scrollIntoView?.({ inline: 'nearest', block: 'nearest' });\n nextTarget.focus();\n\n // Clear the tabindex when the element loses focus\n nextTarget.addEventListener(\n 'blur',\n () => {\n if (nextTarget.attributes.getNamedItem('data-first')) {\n return;\n }\n\n nextTarget.removeAttribute('tabindex');\n },\n { once: true },\n );\n }\n};\n\n/**\n * Hook which sets up keyboard navigation within the `DataGrid` component using the arrow keys, can be disabled\n * with the `enableKeyboardNavigation` prop.\n *\n * Supports navigating between cells and rows, with the focus directed either towards the cell element, or\n * the first interactive child if one is present.\n */\nexport const useKeyboardNavigation = ({\n enableKeyboardNavigation,\n tableRef,\n}: UseKeyboardNavigationProps) => {\n useEffect(() => {\n if (!tableRef.current || !enableKeyboardNavigation) {\n return undefined;\n }\n\n const table = tableRef.current;\n\n // Find the first column header in the table, and assign it a tabindex.\n const firstElement = table.querySelector('th') as HTMLElement;\n if (!firstElement) return undefined;\n const firstTarget = findTargetElement(firstElement);\n\n firstTarget.setAttribute('tabindex', '0');\n firstTarget.setAttribute('data-first', '');\n\n const handler = (event: KeyboardEvent) => handleKeyDown(table, event);\n table.addEventListener('keydown', handler);\n\n return () => {\n table.removeEventListener('keydown', handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tableRef, enableKeyboardNavigation]);\n};\n"],"names":[],"mappings":";;;AASA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,SAAsB,KAAiB;IAChE,MAAM,gBAAgB,GAAuB,SAAS,CAAC,aAAa,CAAC,kBAAkB,CAAC;AACxF,IAAA,OAAO,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,SAAS;AACtC,CAAC;AAED;;AAEG;AACH,MAAM,YAAY,GAAG,CAAC,OAA4B,EAAE,aAAqB,KAAI;AAC3E,IAAA,IACE,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM;QACrC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,EACxD;;QAEA,OAAO,CAAC,GAAG,OA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,CAAC,wBAAwB,EAAE;AAClD,YAAA,OAAO,SAAS;AACjB,QAAA;AAED,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO;;QAG9B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAgB;AAC7D,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,SAAS;AACnC,QAAA,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC;AAEnD,QAAA,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACzC,QAAA,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC;AAE1C,QAAA,MAAM,OAAO,GAAG,CAAC,KAAoB,KAAK,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACrE,QAAA,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;AAE1C,QAAA,OAAO,MAAK;AACV,YAAA,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/C,QAAA,CAAC;;AAEH,IAAA,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBar.cjs","sources":["../../../../src/components/DataTable/components/ActionBar.tsx"],"sourcesContent":["import React, { useEffect, useState, RefObject, CSSProperties, ReactNode } from 'react';\nimport { renderHeader } from '../renderers/renderHeader';\nimport { ColumnConfig } from '../types';\nimport styles from './DataTable.module.scss';\n\nexport interface ActionBarProps {\n children: ReactNode;\n selectionColumn: ColumnConfig;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n}\n\nexport function ActionBar({\n selectionColumn,\n intersectionTargetRef,\n containerRef,\n children,\n}: ActionBarProps) {\n const [isSticky, setIsSticky] = useState(false);\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const callback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsSticky(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(callback);\n intersectionObserver.observe(intersectionTargetRef.current);\n /* eslint-disable-next-line consistent-return */\n return () => intersectionObserver.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [intersectionTargetRef.current]);\n\n const containerRect = containerRef.current?.getBoundingClientRect();\n\n const defaultPositionStyles: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n };\n\n const stickyPositionStyles: CSSProperties = {\n position: 'fixed',\n top: 0,\n left: containerRect?.left,\n width: containerRect?.width,\n };\n\n const style = isSticky ? stickyPositionStyles : defaultPositionStyles;\n\n return (\n <div className={styles.actionBarContainer} style={style}>\n {renderHeader({ column: selectionColumn })}\n <div className={styles.actionBarContent}>{children}</div>\n </div>\n );\n}\n"],"names":["useState","useEffect","React","styles","renderHeader"],"mappings":";;;;;;;;;;AAYM,SAAU,SAAS,CAAC,EACxB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,QAAQ,GACO,EAAA;;IACf,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC;IAE/CC,eAAS,CAAC,MAAK;QACb,IAAI,CAAC,qBAAqB,CAAC,OAAO;YAAE;AACpC,QAAA,MAAM,QAAQ,GAAiC,CAAC,OAAO,KAAI;AACzD,YAAA,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACxB,gBAAA,WAAW,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;AACpC,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC;AACD,QAAA,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,QAAQ,CAAC;AAC/D,QAAA,oBAAoB,CAAC,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAE3D,QAAA,OAAO,MAAM,oBAAoB,CAAC,UAAU,EAAE;;AAEhD,IAAA,CAAC,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAG,CAAA,EAAA,GAAA,YAAY,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,qBAAqB,EAAE;AAEnE,IAAA,MAAM,qBAAqB,GAAkB;AAC3C,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;KACT;AAED,IAAA,MAAM,oBAAoB,GAAkB;AAC1C,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI;AACzB,QAAA,KAAK,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,KAAK;KAC5B;IAED,MAAM,KAAK,GAAG,QAAQ,GAAG,oBAAoB,GAAG,qBAAqB;IAErE,QACEC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,gBAAM,CAAC,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAA;AACpD,QAAAC,yBAAY,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1CF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,gBAAM,CAAC,gBAAgB,IAAG,QAAQ,CAAO,CACrD;AAEV;;;;"}
1
+ {"version":3,"file":"ActionBar.cjs","sources":["../../../../src/components/DataTable/components/ActionBar.tsx"],"sourcesContent":["import React, { useEffect, useState, RefObject, CSSProperties, ReactNode } from 'react';\nimport { renderHeader } from '../renderers/renderHeader';\nimport { ColumnConfig } from '../types';\nimport styles from './DataTable.module.scss';\n\nexport interface ActionBarProps {\n children: ReactNode;\n selectionColumn: ColumnConfig;\n intersectionTargetRef: RefObject<HTMLElement | null>;\n containerRef: RefObject<HTMLElement | null>;\n}\n\nexport function ActionBar({\n selectionColumn,\n intersectionTargetRef,\n containerRef,\n children,\n}: ActionBarProps) {\n const [isSticky, setIsSticky] = useState(false);\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const callback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsSticky(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(callback);\n intersectionObserver.observe(intersectionTargetRef.current);\n /* eslint-disable-next-line consistent-return */\n return () => intersectionObserver.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [intersectionTargetRef.current]);\n\n const containerRect = containerRef.current?.getBoundingClientRect();\n\n const defaultPositionStyles: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n };\n\n const stickyPositionStyles: CSSProperties = {\n position: 'fixed',\n top: 0,\n left: containerRect?.left,\n width: containerRect?.width,\n };\n\n const style = isSticky ? stickyPositionStyles : defaultPositionStyles;\n\n return (\n <div className={styles.actionBarContainer} style={style}>\n {renderHeader({ column: selectionColumn })}\n <div className={styles.actionBarContent}>{children}</div>\n </div>\n );\n}\n"],"names":["useState","useEffect","React","styles","renderHeader"],"mappings":";;;;;;;;;;AAYM,SAAU,SAAS,CAAC,EACxB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,QAAQ,GACO,EAAA;;IACf,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC;IAE/CC,eAAS,CAAC,MAAK;QACb,IAAI,CAAC,qBAAqB,CAAC,OAAO;YAAE;AACpC,QAAA,MAAM,QAAQ,GAAiC,CAAC,OAAO,KAAI;AACzD,YAAA,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACxB,gBAAA,WAAW,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;AACpC,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC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7 +3,7 @@ import { ColumnConfig } from '../types';
3
3
  export interface ActionBarProps {
4
4
  children: ReactNode;
5
5
  selectionColumn: ColumnConfig;
6
- intersectionTargetRef: RefObject<HTMLElement>;
7
- containerRef: RefObject<HTMLElement>;
6
+ intersectionTargetRef: RefObject<HTMLElement | null>;
7
+ containerRef: RefObject<HTMLElement | null>;
8
8
  }
9
9
  export declare function ActionBar({ selectionColumn, intersectionTargetRef, containerRef, children, }: ActionBarProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBar.js","sources":["../../../../src/components/DataTable/components/ActionBar.tsx"],"sourcesContent":["import React, { useEffect, useState, RefObject, CSSProperties, ReactNode } from 'react';\nimport { renderHeader } from '../renderers/renderHeader';\nimport { ColumnConfig } from '../types';\nimport styles from './DataTable.module.scss';\n\nexport interface ActionBarProps {\n children: ReactNode;\n selectionColumn: ColumnConfig;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n}\n\nexport function ActionBar({\n selectionColumn,\n intersectionTargetRef,\n containerRef,\n children,\n}: ActionBarProps) {\n const [isSticky, setIsSticky] = useState(false);\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const callback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsSticky(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(callback);\n intersectionObserver.observe(intersectionTargetRef.current);\n /* eslint-disable-next-line consistent-return */\n return () => intersectionObserver.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [intersectionTargetRef.current]);\n\n const containerRect = containerRef.current?.getBoundingClientRect();\n\n const defaultPositionStyles: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n };\n\n const stickyPositionStyles: CSSProperties = {\n position: 'fixed',\n top: 0,\n left: containerRect?.left,\n width: containerRect?.width,\n };\n\n const style = isSticky ? stickyPositionStyles : defaultPositionStyles;\n\n return (\n <div className={styles.actionBarContainer} style={style}>\n {renderHeader({ column: selectionColumn })}\n <div className={styles.actionBarContent}>{children}</div>\n </div>\n );\n}\n"],"names":["React"],"mappings":";;;;AAYM,SAAU,SAAS,CAAC,EACxB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,QAAQ,GACO,EAAA;;IACf,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAE/C,SAAS,CAAC,MAAK;QACb,IAAI,CAAC,qBAAqB,CAAC,OAAO;YAAE;AACpC,QAAA,MAAM,QAAQ,GAAiC,CAAC,OAAO,KAAI;AACzD,YAAA,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACxB,gBAAA,WAAW,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;AACpC,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC;AACD,QAAA,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,QAAQ,CAAC;AAC/D,QAAA,oBAAoB,CAAC,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAE3D,QAAA,OAAO,MAAM,oBAAoB,CAAC,UAAU,EAAE;;AAEhD,IAAA,CAAC,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAG,CAAA,EAAA,GAAA,YAAY,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,qBAAqB,EAAE;AAEnE,IAAA,MAAM,qBAAqB,GAAkB;AAC3C,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;KACT;AAED,IAAA,MAAM,oBAAoB,GAAkB;AAC1C,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI;AACzB,QAAA,KAAK,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,KAAK;KAC5B;IAED,MAAM,KAAK,GAAG,QAAQ,GAAG,oBAAoB,GAAG,qBAAqB;IAErE,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAA;AACpD,QAAA,YAAY,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1CA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,IAAG,QAAQ,CAAO,CACrD;AAEV;;;;"}
1
+ {"version":3,"file":"ActionBar.js","sources":["../../../../src/components/DataTable/components/ActionBar.tsx"],"sourcesContent":["import React, { useEffect, useState, RefObject, CSSProperties, ReactNode } from 'react';\nimport { renderHeader } from '../renderers/renderHeader';\nimport { ColumnConfig } from '../types';\nimport styles from './DataTable.module.scss';\n\nexport interface ActionBarProps {\n children: ReactNode;\n selectionColumn: ColumnConfig;\n intersectionTargetRef: RefObject<HTMLElement | null>;\n containerRef: RefObject<HTMLElement | null>;\n}\n\nexport function ActionBar({\n selectionColumn,\n intersectionTargetRef,\n containerRef,\n children,\n}: ActionBarProps) {\n const [isSticky, setIsSticky] = useState(false);\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const callback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsSticky(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(callback);\n intersectionObserver.observe(intersectionTargetRef.current);\n /* eslint-disable-next-line consistent-return */\n return () => intersectionObserver.disconnect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [intersectionTargetRef.current]);\n\n const containerRect = containerRef.current?.getBoundingClientRect();\n\n const defaultPositionStyles: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n };\n\n const stickyPositionStyles: CSSProperties = {\n position: 'fixed',\n top: 0,\n left: containerRect?.left,\n width: containerRect?.width,\n };\n\n const style = isSticky ? stickyPositionStyles : defaultPositionStyles;\n\n return (\n <div className={styles.actionBarContainer} style={style}>\n {renderHeader({ column: selectionColumn })}\n <div className={styles.actionBarContent}>{children}</div>\n </div>\n );\n}\n"],"names":["React"],"mappings":";;;;AAYM,SAAU,SAAS,CAAC,EACxB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,QAAQ,GACO,EAAA;;IACf,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAE/C,SAAS,CAAC,MAAK;QACb,IAAI,CAAC,qBAAqB,CAAC,OAAO;YAAE;AACpC,QAAA,MAAM,QAAQ,GAAiC,CAAC,OAAO,KAAI;AACzD,YAAA,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACxB,gBAAA,WAAW,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;AACpC,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC;AACD,QAAA,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,QAAQ,CAAC;AAC/D,QAAA,oBAAoB,CAAC,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC;;AAE3D,QAAA,OAAO,MAAM,oBAAoB,CAAC,UAAU,EAAE;;AAEhD,IAAA,CAAC,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAG,CAAA,EAAA,GAAA,YAAY,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,qBAAqB,EAAE;AAEnE,IAAA,MAAM,qBAAqB,GAAkB;AAC3C,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;KACT;AAED,IAAA,MAAM,oBAAoB,GAAkB;AAC1C,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI;AACzB,QAAA,KAAK,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,KAAK;KAC5B;IAED,MAAM,KAAK,GAAG,QAAQ,GAAG,oBAAoB,GAAG,qBAAqB;IAErE,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAA;AACpD,QAAA,YAAY,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1CA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,IAAG,QAAQ,CAAO,CACrD;AAEV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickyHead.cjs","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["useRef","useState","useEffect","throttle","ResizeObserver","headerCellHeight","theme","Shadows","React","TableGrid"],"mappings":";;;;;;;;;;;;;;;;AAAA;SAoBgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,CAAC,GACH,EAAA;AAChB,IAAA,MAAM,kBAAkB,GAAGA,YAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGC,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AS;AAAE,QAAA,OAAO,IAAI;;IAG3B,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAChC,CAAC,KAAK,EAAE,KAAK,KAAK,gBAAgB,KAAK,GAAG,CAAC,CAAA,WAAA,EAAc,KAAK,CAAA,KAAA,CAAO,CACtE;AAED,IAAA,MAAM,cAAc,GAAkB;AACpC,QAAA,GAAG,aAAa;AAChB,QAAA,MAAM,EAAEG,0BAAgB;AACxB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,CAAA,UAAA,EAAaC,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,CAAE;QAC3D,SAAS,EAAE,CAAA,UAAA,EAAaA,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,CAAE;QACxD,SAAS,EAAEC,eAAO,CAAC,IAAI;AACvB,QAAA,GAAG,EAAE,CAAA,EAAG,eAAe,CAAA,EAAA,CAAI,IAAI,KAAK;KACrC;IAED,QACEC,8CAAK,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,kBAAkB,EAAA;QACjDA,sBAAA,CAAA,aAAA,CAACC,mBAAS,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAA;AACpD,YAAAD,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAQ,QAAQ,CAAS,CACf,CACR;AAEV;;;;"}
1
+ {"version":3,"file":"StickyHead.cjs","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement | null>;\n containerRef: RefObject<HTMLElement | null>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["useRef","useState","useEffect","throttle","ResizeObserver","headerCellHeight","theme","Sh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f,CACR;AAEV;;;;"}
@@ -3,8 +3,8 @@ import { TableCssOutput } from '../utils/generateTableCss';
3
3
  export interface StickyHeadProps {
4
4
  tableCss: TableCssOutput;
5
5
  children?: ReactNode;
6
- intersectionTargetRef: RefObject<HTMLElement>;
7
- containerRef: RefObject<HTMLElement>;
6
+ intersectionTargetRef: RefObject<HTMLElement | null>;
7
+ containerRef: RefObject<HTMLElement | null>;
8
8
  cellWidths: number[];
9
9
  stickyHeaderTop?: number;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StickyHead.js","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["React"],"mappings":";;;;;;;;AAAA;SAoBgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,CAAC,GACH,EAAA;AAChB,IAAA,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACjD,IAAA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,MAAM,EAAE,CAAC;AACV,KAAA,CAAC;AAEF,IAAA,MAAM,aAAa,GAAG,MAAM,CAAgB,IAAI,CAAC;IACjD,MAAM,eAAe,GAAG,EAAE;IAE1B,MAAM,yBAAyB,GAAG,MAAK;;QACrC,MAAM,UAAU,GAAG,CAAA,EAAA,GAAA,YAAY,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAA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AA,CAAE;QAC3D,SAAS,EAAE,CAAA,UAAA,EAAa,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,CAAE;QACxD,SAAS,EAAE,OAAO,CAAC,IAAI;AACvB,QAAA,GAAG,EAAE,CAAA,EAAG,eAAe,CAAA,EAAA,CAAI,IAAI,KAAK;KACrC;IAED,QACEA,sCAAK,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,kBAAkB,EAAA;QACjDA,cAAA,CAAA,aAAA,CAAC,SAAS,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAA;AACpD,YAAAA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAQ,QAAQ,CAAS,CACf,CACR;AAEV;;;;"}
1
+ {"version":3,"file":"StickyHead.js","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement | null>;\n containerRef: RefObject<HTMLElement | null>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["React"],"mappings":";;;;;;;;AAAA;SAoBgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,CAAC,GACH,EAAA;AAChB,IAAA,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACjD,IAAA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,MAAM,EAAE,CAAC;AACV,KAAA,CAAC;AAEF,IAAA,MAAM,aAAa,GAAG,MAAM,CAAgB,IAAI,CAAC;IACjD,MA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