@deephaven/components 0.74.0 → 0.74.1-beta.1
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.
- package/dist/Button.d.ts +1 -1
- package/dist/Select.d.ts +1 -1
- package/dist/spectrum/ItemContent.d.ts.map +1 -1
- package/dist/spectrum/ItemContent.js +2 -1
- package/dist/spectrum/ItemContent.js.map +1 -1
- package/dist/spectrum/picker/Picker.d.ts +6 -8
- package/dist/spectrum/picker/Picker.d.ts.map +1 -1
- package/dist/spectrum/picker/Picker.js +54 -59
- package/dist/spectrum/picker/Picker.js.map +1 -1
- package/dist/spectrum/picker/PickerNormalized.d.ts +16 -0
- package/dist/spectrum/picker/PickerNormalized.d.ts.map +1 -0
- package/dist/spectrum/picker/PickerNormalized.js +88 -0
- package/dist/spectrum/picker/PickerNormalized.js.map +1 -0
- package/dist/spectrum/picker/index.d.ts +2 -0
- package/dist/spectrum/picker/index.d.ts.map +1 -1
- package/dist/spectrum/picker/index.js +2 -0
- package/dist/spectrum/picker/index.js.map +1 -1
- package/dist/spectrum/picker/usePickerScrollOnOpen.d.ts +22 -0
- package/dist/spectrum/picker/usePickerScrollOnOpen.d.ts.map +1 -0
- package/dist/spectrum/picker/usePickerScrollOnOpen.js +33 -0
- package/dist/spectrum/picker/usePickerScrollOnOpen.js.map +1 -0
- package/dist/spectrum/utils/index.d.ts +2 -0
- package/dist/spectrum/utils/index.d.ts.map +1 -1
- package/dist/spectrum/utils/index.js +2 -0
- package/dist/spectrum/utils/index.js.map +1 -1
- package/dist/spectrum/utils/itemUtils.d.ts +29 -3
- package/dist/spectrum/utils/itemUtils.d.ts.map +1 -1
- package/dist/spectrum/utils/itemUtils.js +69 -3
- package/dist/spectrum/utils/itemUtils.js.map +1 -1
- package/dist/spectrum/utils/itemWrapperUtils.d.ts +12 -0
- package/dist/spectrum/utils/itemWrapperUtils.d.ts.map +1 -0
- package/dist/spectrum/utils/itemWrapperUtils.js +65 -0
- package/dist/spectrum/utils/itemWrapperUtils.js.map +1 -0
- package/dist/spectrum/utils/useRenderNormalizedItem.d.ts.map +1 -1
- package/dist/spectrum/utils/useRenderNormalizedItem.js +3 -3
- package/dist/spectrum/utils/useRenderNormalizedItem.js.map +1 -1
- package/dist/spectrum/utils/useStringifiedMultiSelection.d.ts.map +1 -1
- package/dist/spectrum/utils/useStringifiedMultiSelection.js +5 -2
- package/dist/spectrum/utils/useStringifiedMultiSelection.js.map +1 -1
- package/dist/spectrum/utils/useStringifiedSelection.d.ts +33 -0
- package/dist/spectrum/utils/useStringifiedSelection.d.ts.map +1 -0
- package/dist/spectrum/utils/useStringifiedSelection.js +50 -0
- package/dist/spectrum/utils/useStringifiedSelection.js.map +1 -0
- package/package.json +7 -7
package/dist/Button.d.ts
CHANGED
|
@@ -30,6 +30,6 @@ type IconOnlyButtonJsxTooltip = BaseButtonProps & {
|
|
|
30
30
|
icon: IconDefinition | JSX.Element;
|
|
31
31
|
children?: undefined;
|
|
32
32
|
};
|
|
33
|
-
declare const Button: React.ForwardRefExoticComponent<(Pick<ButtonWithChildren, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "aria-label" | "icon" | "active" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind"> | Pick<IconOnlyButtonStringTooltip, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "aria-label" | "icon" | "active" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind"> | Pick<IconOnlyButtonJsxTooltip, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "aria-label" | "icon" | "active" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind">) & React.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
declare const Button: React.ForwardRefExoticComponent<(Pick<ButtonWithChildren, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "icon" | "active" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind"> | Pick<IconOnlyButtonStringTooltip, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "icon" | "active" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind"> | Pick<IconOnlyButtonJsxTooltip, "className" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "form" | "slot" | "style" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "children" | "id" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "tooltip" | "onClick" | "tabIndex" | "role" | "icon" | "active" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "onKeyUp" | "lang" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind">) & React.RefAttributes<HTMLButtonElement>>;
|
|
34
34
|
export default Button;
|
|
35
35
|
//# sourceMappingURL=Button.d.ts.map
|
package/dist/Select.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export type SelectProps = baseSelectProps & {
|
|
|
10
10
|
* native select element.
|
|
11
11
|
* @param props.onChange returns a string value and not the event
|
|
12
12
|
*/
|
|
13
|
-
declare const Select: React.ForwardRefExoticComponent<Pick<SelectProps, "className" | "pattern" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "start" | "children" | "id" | "accept" | "alt" | "capture" | "checked" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "size" | "src" | "step" | "useMap" | "width" | "onClick" | "tabIndex" | "role" | "aria-label" | "
|
|
13
|
+
declare const Select: React.ForwardRefExoticComponent<Pick<SelectProps, "className" | "pattern" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "start" | "children" | "id" | "accept" | "alt" | "capture" | "checked" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "size" | "src" | "step" | "useMap" | "width" | "onClick" | "tabIndex" | "role" | "content" | "default" | "wrap" | "open" | "aria-label" | "href" | "target" | "rel" | "download" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onScroll" | "autoFocus" | "autoComplete" | "isInvalid" | "onKeyUp" | "lang" | "media" | "method" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "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" | "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" | "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" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "rows" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind" | "htmlFor" | "action" | "nonce" | "selected" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "wmode"> & React.RefAttributes<HTMLSelectElement>>;
|
|
14
14
|
export default Select;
|
|
15
15
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.d.ts","sourceRoot":"","sources":["../../src/spectrum/ItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAEV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ItemContent.d.ts","sourceRoot":"","sources":["../../src/spectrum/ItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAEV,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EAAE,OAAO,EACjB,cAAc,GACf,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAsEvC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -6,6 +6,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
6
6
|
import { Children, cloneElement, isValidElement, useState } from 'react';
|
|
7
7
|
import cl from 'classnames';
|
|
8
8
|
import { isElementOfType, useCheckOverflow } from '@deephaven/react-hooks';
|
|
9
|
+
import { NON_BREAKING_SPACE } from '@deephaven/utils';
|
|
9
10
|
import { Text } from "./Text.js";
|
|
10
11
|
import ItemTooltip from "./ItemTooltip.js";
|
|
11
12
|
import stylesCommon from "../SpectrumComponent.module.css";
|
|
@@ -43,7 +44,7 @@ export function ItemContent(_ref) {
|
|
|
43
44
|
/* eslint-disable no-param-reassign */
|
|
44
45
|
if (content === '') {
|
|
45
46
|
// Prevent the item height from collapsing when the content is empty
|
|
46
|
-
content =
|
|
47
|
+
content = NON_BREAKING_SPACE;
|
|
47
48
|
} else if (typeof content === 'boolean') {
|
|
48
49
|
// Boolean values need to be stringified to render
|
|
49
50
|
content = String(content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.js","names":["Children","cloneElement","isValidElement","useState","cl","isElementOfType","useCheckOverflow","Text","ItemTooltip","stylesCommon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ItemContent","_ref","children","content","tooltipOptions","checkOverflow","isOverflowing","resetIsOverflowing","previousContent","setPreviousContent","String","Array","isArray","map","el","_objectSpread","props","ref","UNSAFE_className","spectrumEllipsis","tooltip","options"],"sources":["../../src/spectrum/ItemContent.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n ReactNode,\n useState,\n} from 'react';\nimport cl from 'classnames';\nimport { isElementOfType, useCheckOverflow } from '@deephaven/react-hooks';\nimport { Text } from './Text';\nimport { TooltipOptions } from './utils';\nimport ItemTooltip from './ItemTooltip';\nimport stylesCommon from '../SpectrumComponent.module.scss';\n\nexport interface ItemContentProps {\n children: ReactNode;\n tooltipOptions?: TooltipOptions | null;\n}\n\n/**\n * Item content. Text content will be wrapped in a Spectrum Text\n * component with ellipsis overflow handling. If text content overflows and\n * tooltipOptions are provided a tooltip will be displayed when hovering over\n * the item content.\n */\nexport function ItemContent({\n children: content,\n tooltipOptions,\n}: ItemContentProps): JSX.Element | null {\n const { checkOverflow, isOverflowing, resetIsOverflowing } =\n useCheckOverflow();\n\n const [previousContent, setPreviousContent] = useState(content);\n\n // Reset `isOverflowing` if content changes. It will get re-calculated as\n // `Text` components render.\n if (previousContent !== content) {\n setPreviousContent(content);\n resetIsOverflowing();\n }\n\n if (isValidElement(content)) {\n return content;\n }\n\n /* eslint-disable no-param-reassign */\n if (content === '') {\n // Prevent the item height from collapsing when the content is empty\n content =
|
|
1
|
+
{"version":3,"file":"ItemContent.js","names":["Children","cloneElement","isValidElement","useState","cl","isElementOfType","useCheckOverflow","NON_BREAKING_SPACE","Text","ItemTooltip","stylesCommon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ItemContent","_ref","children","content","tooltipOptions","checkOverflow","isOverflowing","resetIsOverflowing","previousContent","setPreviousContent","String","Array","isArray","map","el","_objectSpread","props","ref","UNSAFE_className","spectrumEllipsis","tooltip","options"],"sources":["../../src/spectrum/ItemContent.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n ReactNode,\n useState,\n} from 'react';\nimport cl from 'classnames';\nimport { isElementOfType, useCheckOverflow } from '@deephaven/react-hooks';\nimport { NON_BREAKING_SPACE } from '@deephaven/utils';\nimport { Text } from './Text';\nimport { TooltipOptions } from './utils';\nimport ItemTooltip from './ItemTooltip';\nimport stylesCommon from '../SpectrumComponent.module.scss';\n\nexport interface ItemContentProps {\n children: ReactNode;\n tooltipOptions?: TooltipOptions | null;\n}\n\n/**\n * Item content. Text content will be wrapped in a Spectrum Text\n * component with ellipsis overflow handling. If text content overflows and\n * tooltipOptions are provided a tooltip will be displayed when hovering over\n * the item content.\n */\nexport function ItemContent({\n children: content,\n tooltipOptions,\n}: ItemContentProps): JSX.Element | null {\n const { checkOverflow, isOverflowing, resetIsOverflowing } =\n useCheckOverflow();\n\n const [previousContent, setPreviousContent] = useState(content);\n\n // Reset `isOverflowing` if content changes. It will get re-calculated as\n // `Text` components render.\n if (previousContent !== content) {\n setPreviousContent(content);\n resetIsOverflowing();\n }\n\n if (isValidElement(content)) {\n return content;\n }\n\n /* eslint-disable no-param-reassign */\n if (content === '') {\n // Prevent the item height from collapsing when the content is empty\n content = NON_BREAKING_SPACE;\n } else if (typeof content === 'boolean') {\n // Boolean values need to be stringified to render\n content = String(content);\n } else if (Array.isArray(content)) {\n // For cases where there are multiple `Text` children, add a css class to\n // handle overflow. The primary use case for multiple text nodes is when a\n // description is provided for an item. e.g.\n // <Item textValue=\"Some Text\">\n // <SomeIcon />\n // <Text>Some Label</Text>\n // <Text slot=\"description\">Some Description</Text>\n // </Item>\n content = Children.map(content, el =>\n isElementOfType(el, Text)\n ? cloneElement(el, {\n ...el.props,\n ref: checkOverflow,\n UNSAFE_className: cl(\n el.props.UNSAFE_className,\n stylesCommon.spectrumEllipsis\n ),\n })\n : el\n );\n }\n\n if (typeof content === 'string' || typeof content === 'number') {\n content = (\n <Text\n ref={checkOverflow}\n UNSAFE_className={stylesCommon.spectrumEllipsis}\n >\n {content}\n </Text>\n );\n }\n /* eslint-enable no-param-reassign */\n\n const tooltip =\n tooltipOptions == null || !isOverflowing ? null : (\n <ItemTooltip options={tooltipOptions}>{content}</ItemTooltip>\n );\n\n return (\n <>\n {content}\n {tooltip}\n </>\n );\n}\n\nexport default ItemContent;\n"],"mappings":";;;;;AAAA,SACEA,QAAQ,EACRC,YAAY,EACZC,cAAc,EAEdC,QAAQ,QACH,OAAO;AACd,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC1E,SAASC,kBAAkB,QAAQ,kBAAkB;AAAC,SAC7CC,IAAI;AAAA,OAENC,WAAW;AAAA,OACXC,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAOnB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAAC,IAAA,EAGc;EAAA,IAHb;IAC1BC,QAAQ,EAAEC,OAAO;IACjBC;EACgB,CAAC,GAAAH,IAAA;EACjB,IAAM;IAAEI,aAAa;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GACxDlB,gBAAgB,CAAC,CAAC;EAEpB,IAAM,CAACmB,eAAe,EAAEC,kBAAkB,CAAC,GAAGvB,QAAQ,CAACiB,OAAO,CAAC;;EAE/D;EACA;EACA,IAAIK,eAAe,KAAKL,OAAO,EAAE;IAC/BM,kBAAkB,CAACN,OAAO,CAAC;IAC3BI,kBAAkB,CAAC,CAAC;EACtB;EAEA,kBAAItB,cAAc,CAACkB,OAAO,CAAC,EAAE;IAC3B,OAAOA,OAAO;EAChB;;EAEA;EACA,IAAIA,OAAO,KAAK,EAAE,EAAE;IAClB;IACAA,OAAO,GAAGb,kBAAkB;EAC9B,CAAC,MAAM,IAAI,OAAOa,OAAO,KAAK,SAAS,EAAE;IACvC;IACAA,OAAO,GAAGO,MAAM,CAACP,OAAO,CAAC;EAC3B,CAAC,MAAM,IAAIQ,KAAK,CAACC,OAAO,CAACT,OAAO,CAAC,EAAE;IACjC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACAA,OAAO,GAAGpB,QAAQ,CAAC8B,GAAG,CAACV,OAAO,EAAEW,EAAE,IAChC1B,eAAe,CAAC0B,EAAE,EAAEvB,IAAI,CAAC,gBACrBP,YAAY,CAAC8B,EAAE,EAAAC,aAAA,CAAAA,aAAA,KACVD,EAAE,CAACE,KAAK;MACXC,GAAG,EAAEZ,aAAa;MAClBa,gBAAgB,EAAE/B,EAAE,CAClB2B,EAAE,CAACE,KAAK,CAACE,gBAAgB,EACzBzB,YAAY,CAAC0B,gBACf;IAAC,EACF,CAAC,GACFL,EACN,CAAC;EACH;EAEA,IAAI,OAAOX,OAAO,KAAK,QAAQ,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC9DA,OAAO,gBACLR,IAAA,CAACJ,IAAI;MACH0B,GAAG,EAAEZ,aAAc;MACnBa,gBAAgB,EAAEzB,YAAY,CAAC0B,gBAAiB;MAAAjB,QAAA,EAE/CC;IAAO,CACJ,CACP;EACH;EACA;;EAEA,IAAMiB,OAAO,GACXhB,cAAc,IAAI,IAAI,IAAI,CAACE,aAAa,GAAG,IAAI,gBAC7CX,IAAA,CAACH,WAAW;IAAC6B,OAAO,EAAEjB,cAAe;IAAAF,QAAA,EAAEC;EAAO,CAAc,CAC7D;EAEH,oBACEJ,KAAA,CAAAF,SAAA;IAAAK,QAAA,GACGC,OAAO,EACPiB,OAAO;EAAA,CACR,CAAC;AAEP;AAEA,eAAepB,WAAW"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { NormalizedSpectrumPickerProps,
|
|
2
|
+
import { NormalizedSpectrumPickerProps, ItemOrSection, ItemKey, TooltipOptions } from '../utils/itemUtils';
|
|
3
3
|
export type PickerProps = {
|
|
4
|
-
children: ItemOrSection | ItemOrSection[]
|
|
4
|
+
children: ItemOrSection | ItemOrSection[];
|
|
5
5
|
/** Can be set to true or a TooltipOptions to enable item tooltips */
|
|
6
6
|
tooltip?: boolean | TooltipOptions;
|
|
7
7
|
/** The currently selected key in the collection (controlled). */
|
|
8
8
|
selectedKey?: ItemKey | null;
|
|
9
9
|
/** The initial selected key in the collection (uncontrolled). */
|
|
10
10
|
defaultSelectedKey?: ItemKey;
|
|
11
|
-
/** Function to retrieve initial scroll position when opening the picker */
|
|
12
|
-
getInitialScrollPosition?: () => Promise<number | null>;
|
|
13
11
|
/**
|
|
14
12
|
* Handler that is called when the selection change.
|
|
15
13
|
* Note that under the hood, this is just an alias for Spectrum's
|
|
@@ -27,11 +25,11 @@ export type PickerProps = {
|
|
|
27
25
|
} & Omit<NormalizedSpectrumPickerProps, 'children' | 'items' | 'onSelectionChange' | 'selectedKey' | 'defaultSelectedKey'>;
|
|
28
26
|
/**
|
|
29
27
|
* Picker component for selecting items from a list of items. Items can be
|
|
30
|
-
* provided via the `
|
|
31
|
-
*
|
|
32
|
-
*
|
|
28
|
+
* provided via the `children` prop. Each item can be a string, number, boolean,
|
|
29
|
+
* or a Spectrum <Item> element. The remaining props are just pass through props
|
|
30
|
+
* for the Spectrum Picker component.
|
|
33
31
|
* See https://react-spectrum.adobe.com/react-spectrum/Picker.html
|
|
34
32
|
*/
|
|
35
|
-
export declare function Picker({ children, tooltip, defaultSelectedKey, selectedKey,
|
|
33
|
+
export declare function Picker({ children, tooltip, defaultSelectedKey, selectedKey, onChange, onOpenChange, onScroll, onSelectionChange, UNSAFE_className, ...spectrumPickerProps }: PickerProps): JSX.Element;
|
|
36
34
|
export default Picker;
|
|
37
35
|
//# sourceMappingURL=Picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/Picker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/Picker.tsx"],"names":[],"mappings":";AASA,OAAO,EACL,6BAA6B,EAC7B,aAAa,EAEb,OAAO,EAEP,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAK5B,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,CAAC;IAE1C,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAEnC,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7B,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAElC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAElC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,GAKK,IAAI,CACR,6BAA6B,EAC3B,UAAU,GACV,OAAO,GACP,mBAAmB,GACnB,aAAa,GACb,oBAAoB,CACvB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAc,EACd,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAyB,EACzB,iBAAiB,EAEjB,gBAAgB,EAChB,GAAG,mBAAmB,EACvB,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAuF3B;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
var _excluded = ["children", "tooltip", "defaultSelectedKey", "selectedKey", "
|
|
1
|
+
var _excluded = ["children", "tooltip", "defaultSelectedKey", "selectedKey", "onChange", "onOpenChange", "onScroll", "onSelectionChange", "UNSAFE_className"];
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
8
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
7
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
-
import { useCallback, useMemo } from 'react';
|
|
11
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
10
12
|
import { Picker as SpectrumPicker } from '@adobe/react-spectrum';
|
|
11
|
-
import { getPositionOfSelectedItem, findSpectrumPickerScrollArea, usePopoverOnScrollRef } from '@deephaven/react-hooks';
|
|
12
|
-
import { EMPTY_FUNCTION, PICKER_ITEM_HEIGHT, PICKER_TOP_OFFSET } from '@deephaven/utils';
|
|
13
13
|
import cl from 'classnames';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { EMPTY_FUNCTION, PICKER_ITEM_HEIGHTS, PICKER_TOP_OFFSET } from '@deephaven/utils';
|
|
15
|
+
import { getPositionOfSelectedItemElement, normalizeTooltipOptions, isItemElementWithDescription, isSectionElement } from "../utils/itemUtils.js";
|
|
16
|
+
import { wrapItemChildren } from "../utils/itemWrapperUtils.js";
|
|
17
|
+
import usePickerScrollOnOpen from "./usePickerScrollOnOpen.js";
|
|
18
|
+
import { useSpectrumThemeProvider } from "../../theme/index.js";
|
|
17
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
20
|
/**
|
|
19
21
|
* Picker component for selecting items from a list of items. Items can be
|
|
20
|
-
* provided via the `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
22
|
+
* provided via the `children` prop. Each item can be a string, number, boolean,
|
|
23
|
+
* or a Spectrum <Item> element. The remaining props are just pass through props
|
|
24
|
+
* for the Spectrum Picker component.
|
|
23
25
|
* See https://react-spectrum.adobe.com/react-spectrum/Picker.html
|
|
24
26
|
*/
|
|
25
27
|
export function Picker(_ref) {
|
|
@@ -28,7 +30,6 @@ export function Picker(_ref) {
|
|
|
28
30
|
tooltip = true,
|
|
29
31
|
defaultSelectedKey,
|
|
30
32
|
selectedKey,
|
|
31
|
-
getInitialScrollPosition,
|
|
32
33
|
onChange,
|
|
33
34
|
onOpenChange,
|
|
34
35
|
onScroll = EMPTY_FUNCTION,
|
|
@@ -37,63 +38,57 @@ export function Picker(_ref) {
|
|
|
37
38
|
UNSAFE_className
|
|
38
39
|
} = _ref,
|
|
39
40
|
spectrumPickerProps = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
var
|
|
41
|
+
var {
|
|
42
|
+
scale
|
|
43
|
+
} = useSpectrumThemeProvider();
|
|
44
|
+
var itemHeight = PICKER_ITEM_HEIGHTS[scale];
|
|
41
45
|
var tooltipOptions = useMemo(() => normalizeTooltipOptions(tooltip), [tooltip]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
|
|
47
|
+
// `null` is a valid value for `selectedKey` in controlled mode, so we check
|
|
48
|
+
// for explicit `undefined` to identify uncontrolled mode.
|
|
49
|
+
var isUncontrolled = selectedKey === undefined;
|
|
50
|
+
var [uncontrolledSelectedKey, setUncontrolledSelectedKey] = useState(defaultSelectedKey);
|
|
51
|
+
var wrappedItems = useMemo(() => wrapItemChildren(children, tooltipOptions), [children, tooltipOptions]);
|
|
52
|
+
|
|
53
|
+
// Item descriptions and Section elements introduce variable item heights.
|
|
54
|
+
// This throws off scroll position calculations, so we disable auto scrolling
|
|
55
|
+
// if either of these are found.
|
|
56
|
+
var disableScrollOnOpen = useMemo(() => wrappedItems.some(item => isSectionElement(item) || isItemElementWithDescription(item)), [wrappedItems]);
|
|
57
|
+
var getInitialScrollPosition = useCallback( /*#__PURE__*/_asyncToGenerator(function* () {
|
|
58
|
+
return disableScrollOnOpen ? null : getPositionOfSelectedItemElement({
|
|
59
|
+
items: wrappedItems,
|
|
60
|
+
itemHeight,
|
|
61
|
+
selectedKey: isUncontrolled ? uncontrolledSelectedKey : selectedKey,
|
|
62
|
+
topOffset: PICKER_TOP_OFFSET
|
|
63
|
+
});
|
|
64
|
+
}), [disableScrollOnOpen, isUncontrolled, itemHeight, selectedKey, uncontrolledSelectedKey, wrappedItems]);
|
|
65
|
+
var onSelectionChangeInternal = useCallback(key => {
|
|
66
|
+
var _ref3;
|
|
67
|
+
// If our component is uncontrolled, track the selected key internally
|
|
68
|
+
// so that we can scroll to the selected item if the user re-opens
|
|
69
|
+
if (isUncontrolled) {
|
|
70
|
+
setUncontrolledSelectedKey(key);
|
|
71
|
+
}
|
|
72
|
+
(_ref3 = onChange !== null && onChange !== void 0 ? onChange : onSelectionChange) === null || _ref3 === void 0 ? void 0 : _ref3(key);
|
|
73
|
+
}, [isUncontrolled, onChange, onSelectionChange]);
|
|
51
74
|
var {
|
|
52
75
|
ref: scrollRef,
|
|
53
|
-
onOpenChange:
|
|
54
|
-
} =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [onOpenChange, popoverOnOpenChange]);
|
|
60
|
-
var onSelectionChangeInternal = useCallback(key => {
|
|
61
|
-
var _getItemKey, _ref2;
|
|
62
|
-
// The `key` arg will always be a string due to us setting the `Item` key
|
|
63
|
-
// prop in `renderItem`. We need to find the matching item to determine
|
|
64
|
-
// the actual key.
|
|
65
|
-
var selectedItem = normalizedItems.find(item => String(getItemKey(item)) === key);
|
|
66
|
-
var actualKey = (_getItemKey = getItemKey(selectedItem)) !== null && _getItemKey !== void 0 ? _getItemKey : key;
|
|
67
|
-
(_ref2 = onChange !== null && onChange !== void 0 ? onChange : onSelectionChange) === null || _ref2 === void 0 ? void 0 : _ref2(actualKey);
|
|
68
|
-
}, [normalizedItems, onChange, onSelectionChange]);
|
|
76
|
+
onOpenChange: onOpenChangeInternal
|
|
77
|
+
} = usePickerScrollOnOpen({
|
|
78
|
+
getInitialScrollPosition,
|
|
79
|
+
onScroll,
|
|
80
|
+
onOpenChange
|
|
81
|
+
});
|
|
69
82
|
return /*#__PURE__*/_jsx(SpectrumPicker
|
|
70
83
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
71
84
|
, _objectSpread(_objectSpread({}, spectrumPickerProps), {}, {
|
|
72
85
|
ref: scrollRef,
|
|
73
|
-
onOpenChange: onOpenChangeInternal,
|
|
74
86
|
UNSAFE_className: cl('dh-picker', UNSAFE_className),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// set on `Item` elements. Since we do this in `renderItem`, we need to
|
|
78
|
-
// ensure that `selectedKey` and `defaultSelectedKey` are strings in order
|
|
79
|
-
// for selection to work.
|
|
80
|
-
,
|
|
81
|
-
selectedKey: selectedKey == null ? selectedKey : selectedKey.toString(),
|
|
82
|
-
defaultSelectedKey: defaultSelectedKey == null ? defaultSelectedKey : defaultSelectedKey.toString()
|
|
83
|
-
// `onChange` is just an alias for `onSelectionChange`
|
|
84
|
-
,
|
|
87
|
+
selectedKey: selectedKey,
|
|
88
|
+
defaultSelectedKey: defaultSelectedKey,
|
|
85
89
|
onSelectionChange: onSelectionChangeInternal,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var _itemOrSection$item, _itemOrSection$item2;
|
|
89
|
-
return /*#__PURE__*/_jsx(Section, {
|
|
90
|
-
title: (_itemOrSection$item = itemOrSection.item) === null || _itemOrSection$item === void 0 ? void 0 : _itemOrSection$item.title,
|
|
91
|
-
items: (_itemOrSection$item2 = itemOrSection.item) === null || _itemOrSection$item2 === void 0 ? void 0 : _itemOrSection$item2.items,
|
|
92
|
-
children: renderNormalizedItem
|
|
93
|
-
}, getItemKey(itemOrSection));
|
|
94
|
-
}
|
|
95
|
-
return renderNormalizedItem(itemOrSection);
|
|
96
|
-
}
|
|
90
|
+
onOpenChange: onOpenChangeInternal,
|
|
91
|
+
children: wrappedItems
|
|
97
92
|
}));
|
|
98
93
|
}
|
|
99
94
|
export default Picker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.js","names":["useCallback","useMemo","Picker","SpectrumPicker","getPositionOfSelectedItem","findSpectrumPickerScrollArea","usePopoverOnScrollRef","EMPTY_FUNCTION","PICKER_ITEM_HEIGHT","PICKER_TOP_OFFSET","cl","isNormalizedSection","normalizeItemList","normalizeTooltipOptions","getItemKey","Section","useRenderNormalizedItem","jsx","_jsx","_ref","children","tooltip","defaultSelectedKey","selectedKey","getInitialScrollPosition","onChange","onOpenChange","onScroll","onSelectionChange","UNSAFE_className","spectrumPickerProps","_objectWithoutProperties","_excluded","normalizedItems","tooltipOptions","renderNormalizedItem","getInitialScrollPositionInternal","keyedItems","itemHeight","topOffset","ref","scrollRef","popoverOnOpenChange","onOpenChangeInternal","isOpen","onSelectionChangeInternal","key","_getItemKey","_ref2","selectedItem","find","item","String","actualKey","_objectSpread","items","toString","itemOrSection","_itemOrSection$item","_itemOrSection$item2","title"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport { DOMRef } from '@react-types/shared';\nimport { Picker as SpectrumPicker } from '@adobe/react-spectrum';\nimport {\n getPositionOfSelectedItem,\n findSpectrumPickerScrollArea,\n usePopoverOnScrollRef,\n} from '@deephaven/react-hooks';\nimport {\n EMPTY_FUNCTION,\n PICKER_ITEM_HEIGHT,\n PICKER_TOP_OFFSET,\n} from '@deephaven/utils';\nimport cl from 'classnames';\nimport {\n isNormalizedSection,\n NormalizedSpectrumPickerProps,\n normalizeItemList,\n normalizeTooltipOptions,\n NormalizedItem,\n ItemOrSection,\n TooltipOptions,\n ItemKey,\n getItemKey,\n} from '../utils/itemUtils';\nimport { Section } from '../shared';\nimport { useRenderNormalizedItem } from '../utils';\n\nexport type PickerProps = {\n children: ItemOrSection | ItemOrSection[] | NormalizedItem[];\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n /** The currently selected key in the collection (controlled). */\n selectedKey?: ItemKey | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: ItemKey;\n /** Function to retrieve initial scroll position when opening the picker */\n getInitialScrollPosition?: () => Promise<number | null>;\n /**\n * Handler that is called when the selection change.\n * Note that under the hood, this is just an alias for Spectrum's\n * `onSelectionChange`. We are renaming for better consistency with other\n * components.\n */\n onChange?: (key: ItemKey) => void;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n\n /**\n * Handler that is called when the selection changes.\n * @deprecated Use `onChange` instead\n */\n onSelectionChange?: (key: ItemKey) => void;\n} /*\n * Support remaining SpectrumPickerProps.\n * Note that `selectedKey`, `defaultSelectedKey`, and `onSelectionChange` are\n * re-defined above to account for boolean types which aren't included in the\n * React `Key` type, but are actually supported by the Spectrum Picker component.\n */ & Omit<\n NormalizedSpectrumPickerProps,\n | 'children'\n | 'items'\n | 'onSelectionChange'\n | 'selectedKey'\n | 'defaultSelectedKey'\n>;\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `items` prop or as children. Each item can be a string,\n * number, boolean, or a Spectrum <Item> element. The remaining props are just\n * pass through props for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport function Picker({\n children,\n tooltip = true,\n defaultSelectedKey,\n selectedKey,\n getInitialScrollPosition,\n onChange,\n onOpenChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n // eslint-disable-next-line camelcase\n UNSAFE_className,\n ...spectrumPickerProps\n}: PickerProps): JSX.Element {\n const normalizedItems = useMemo(\n () => normalizeItemList(children),\n [children]\n );\n\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n const renderNormalizedItem = useRenderNormalizedItem(tooltipOptions);\n\n const getInitialScrollPositionInternal = useCallback(\n () =>\n getInitialScrollPosition == null\n ? getPositionOfSelectedItem({\n keyedItems: normalizedItems,\n // TODO: #1890 & deephaven-plugins#371 add support for sections and\n // items with descriptions since they impact the height calculations\n itemHeight: PICKER_ITEM_HEIGHT,\n selectedKey,\n topOffset: PICKER_TOP_OFFSET,\n })\n : getInitialScrollPosition(),\n [getInitialScrollPosition, normalizedItems, selectedKey]\n );\n\n const { ref: scrollRef, onOpenChange: popoverOnOpenChange } =\n usePopoverOnScrollRef(\n findSpectrumPickerScrollArea,\n onScroll,\n getInitialScrollPositionInternal\n );\n\n const onOpenChangeInternal = useCallback(\n (isOpen: boolean): void => {\n // Attach scroll event handling\n popoverOnOpenChange(isOpen);\n\n onOpenChange?.(isOpen);\n },\n [onOpenChange, popoverOnOpenChange]\n );\n\n const onSelectionChangeInternal = useCallback(\n (key: ItemKey): void => {\n // The `key` arg will always be a string due to us setting the `Item` key\n // prop in `renderItem`. We need to find the matching item to determine\n // the actual key.\n const selectedItem = normalizedItems.find(\n item => String(getItemKey(item)) === key\n );\n\n const actualKey = getItemKey(selectedItem) ?? key;\n\n (onChange ?? onSelectionChange)?.(actualKey);\n },\n [normalizedItems, onChange, onSelectionChange]\n );\n\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...spectrumPickerProps}\n ref={scrollRef as unknown as DOMRef<HTMLDivElement>}\n onOpenChange={onOpenChangeInternal}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n items={normalizedItems}\n // Spectrum Picker treats keys as strings if the `key` prop is explicitly\n // set on `Item` elements. Since we do this in `renderItem`, we need to\n // ensure that `selectedKey` and `defaultSelectedKey` are strings in order\n // for selection to work.\n selectedKey={selectedKey == null ? selectedKey : selectedKey.toString()}\n defaultSelectedKey={\n defaultSelectedKey == null\n ? defaultSelectedKey\n : defaultSelectedKey.toString()\n }\n // `onChange` is just an alias for `onSelectionChange`\n onSelectionChange={\n onSelectionChangeInternal as NormalizedSpectrumPickerProps['onSelectionChange']\n }\n >\n {itemOrSection => {\n if (isNormalizedSection(itemOrSection)) {\n return (\n <Section\n key={getItemKey(itemOrSection)}\n title={itemOrSection.item?.title}\n items={itemOrSection.item?.items}\n >\n {renderNormalizedItem}\n </Section>\n );\n }\n\n return renderNormalizedItem(itemOrSection);\n }}\n </SpectrumPicker>\n );\n}\n\nexport default Picker;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Picker.js","names":["useCallback","useMemo","useState","Picker","SpectrumPicker","cl","EMPTY_FUNCTION","PICKER_ITEM_HEIGHTS","PICKER_TOP_OFFSET","getPositionOfSelectedItemElement","normalizeTooltipOptions","isItemElementWithDescription","isSectionElement","wrapItemChildren","usePickerScrollOnOpen","useSpectrumThemeProvider","jsx","_jsx","_ref","children","tooltip","defaultSelectedKey","selectedKey","onChange","onOpenChange","onScroll","onSelectionChange","UNSAFE_className","spectrumPickerProps","_objectWithoutProperties","_excluded","scale","itemHeight","tooltipOptions","isUncontrolled","undefined","uncontrolledSelectedKey","setUncontrolledSelectedKey","wrappedItems","disableScrollOnOpen","some","item","getInitialScrollPosition","_asyncToGenerator","items","topOffset","onSelectionChangeInternal","key","_ref3","ref","scrollRef","onOpenChangeInternal","_objectSpread"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport type { DOMRef } from '@react-types/shared';\nimport { Picker as SpectrumPicker } from '@adobe/react-spectrum';\nimport cl from 'classnames';\nimport {\n EMPTY_FUNCTION,\n PICKER_ITEM_HEIGHTS,\n PICKER_TOP_OFFSET,\n} from '@deephaven/utils';\nimport {\n NormalizedSpectrumPickerProps,\n ItemOrSection,\n getPositionOfSelectedItemElement,\n ItemKey,\n normalizeTooltipOptions,\n TooltipOptions,\n isItemElementWithDescription,\n isSectionElement,\n} from '../utils/itemUtils';\nimport { wrapItemChildren } from '../utils/itemWrapperUtils';\nimport usePickerScrollOnOpen from './usePickerScrollOnOpen';\nimport { useSpectrumThemeProvider } from '../../theme';\n\nexport type PickerProps = {\n children: ItemOrSection | ItemOrSection[];\n\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n\n /** The currently selected key in the collection (controlled). */\n selectedKey?: ItemKey | null;\n\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: ItemKey;\n\n /**\n * Handler that is called when the selection change.\n * Note that under the hood, this is just an alias for Spectrum's\n * `onSelectionChange`. We are renaming for better consistency with other\n * components.\n */\n onChange?: (key: ItemKey) => void;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n\n /**\n * Handler that is called when the selection changes.\n * @deprecated Use `onChange` instead\n */\n onSelectionChange?: (key: ItemKey) => void;\n} /*\n * Support remaining SpectrumPickerProps.\n * Note that `selectedKey`, `defaultSelectedKey`, and `onSelectionChange` are\n * re-defined above to account for boolean types which aren't included in the\n * React `Key` type, but are actually supported by the Spectrum Picker component.\n */ & Omit<\n NormalizedSpectrumPickerProps,\n | 'children'\n | 'items'\n | 'onSelectionChange'\n | 'selectedKey'\n | 'defaultSelectedKey'\n>;\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `children` prop. Each item can be a string,\tnumber, boolean,\n * or a Spectrum <Item> element. The remaining props are just\tpass through props\n * for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport function Picker({\n children,\n tooltip = true,\n defaultSelectedKey,\n selectedKey,\n onChange,\n onOpenChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n // eslint-disable-next-line camelcase\n UNSAFE_className,\n ...spectrumPickerProps\n}: PickerProps): JSX.Element {\n const { scale } = useSpectrumThemeProvider();\n const itemHeight = PICKER_ITEM_HEIGHTS[scale];\n\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n // `null` is a valid value for `selectedKey` in controlled mode, so we check\n // for explicit `undefined` to identify uncontrolled mode.\n const isUncontrolled = selectedKey === undefined;\n const [uncontrolledSelectedKey, setUncontrolledSelectedKey] =\n useState(defaultSelectedKey);\n\n const wrappedItems = useMemo(\n () => wrapItemChildren(children, tooltipOptions),\n [children, tooltipOptions]\n );\n\n // Item descriptions and Section elements introduce variable item heights.\n // This throws off scroll position calculations, so we disable auto scrolling\n // if either of these are found.\n const disableScrollOnOpen = useMemo(\n () =>\n wrappedItems.some(\n item => isSectionElement(item) || isItemElementWithDescription(item)\n ),\n [wrappedItems]\n );\n\n const getInitialScrollPosition = useCallback(\n async () =>\n disableScrollOnOpen\n ? null\n : getPositionOfSelectedItemElement({\n items: wrappedItems,\n itemHeight,\n selectedKey: isUncontrolled ? uncontrolledSelectedKey : selectedKey,\n topOffset: PICKER_TOP_OFFSET,\n }),\n [\n disableScrollOnOpen,\n isUncontrolled,\n itemHeight,\n selectedKey,\n uncontrolledSelectedKey,\n wrappedItems,\n ]\n );\n\n const onSelectionChangeInternal = useCallback(\n (key: ItemKey): void => {\n // If our component is uncontrolled, track the selected key internally\n // so that we can scroll to the selected item if the user re-opens\n if (isUncontrolled) {\n setUncontrolledSelectedKey(key);\n }\n\n (onChange ?? onSelectionChange)?.(key);\n },\n [isUncontrolled, onChange, onSelectionChange]\n );\n\n const { ref: scrollRef, onOpenChange: onOpenChangeInternal } =\n usePickerScrollOnOpen({\n getInitialScrollPosition,\n onScroll,\n onOpenChange,\n });\n\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...spectrumPickerProps}\n ref={scrollRef as DOMRef<HTMLDivElement>}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n selectedKey={selectedKey as NormalizedSpectrumPickerProps['selectedKey']}\n defaultSelectedKey={\n defaultSelectedKey as NormalizedSpectrumPickerProps['defaultSelectedKey']\n }\n onSelectionChange={onSelectionChangeInternal}\n onOpenChange={onOpenChangeInternal}\n >\n {wrappedItems}\n </SpectrumPicker>\n );\n}\n\nexport default Picker;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PickerProps as PickerBaseProps } from './Picker';
|
|
3
|
+
import { NormalizedItem, NormalizedSection } from '../utils';
|
|
4
|
+
export interface PickerNormalizedProps extends Omit<PickerBaseProps, 'children'> {
|
|
5
|
+
normalizedItems: (NormalizedItem | NormalizedSection)[];
|
|
6
|
+
getInitialScrollPosition?: () => Promise<number | null | undefined>;
|
|
7
|
+
onScroll?: (event: Event) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Picker that takes an array of `NormalizedItem` or `NormalizedSection` items
|
|
11
|
+
* as children and uses a render item function to render the items. This is
|
|
12
|
+
* necessary to support windowed data.
|
|
13
|
+
*/
|
|
14
|
+
export declare function PickerNormalized({ normalizedItems, tooltip, selectedKey, defaultSelectedKey, disabledKeys, UNSAFE_className, getInitialScrollPosition, onChange, onOpenChange, onScroll, onSelectionChange, ...props }: PickerNormalizedProps): JSX.Element;
|
|
15
|
+
export default PickerNormalized;
|
|
16
|
+
//# sourceMappingURL=PickerNormalized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerNormalized.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/PickerNormalized.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAGL,cAAc,EACd,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACzC,eAAe,EAAE,CAAC,cAAc,GAAG,iBAAiB,CAAC,EAAE,CAAC;IACxD,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,OAAc,EACd,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,QAAQ,EACR,YAAY,EACZ,QAAyB,EACzB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAiErC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var _excluded = ["normalizedItems", "tooltip", "selectedKey", "defaultSelectedKey", "disabledKeys", "UNSAFE_className", "getInitialScrollPosition", "onChange", "onOpenChange", "onScroll", "onSelectionChange"];
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import { Picker as SpectrumPicker } from '@adobe/react-spectrum';
|
|
11
|
+
import cl from 'classnames';
|
|
12
|
+
import { EMPTY_FUNCTION } from '@deephaven/utils';
|
|
13
|
+
import { Section } from "../shared.js";
|
|
14
|
+
import { getItemKey, isNormalizedSection, normalizeTooltipOptions, useRenderNormalizedItem, useStringifiedSelection } from "../utils/index.js";
|
|
15
|
+
import usePickerScrollOnOpen from "./usePickerScrollOnOpen.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
/**
|
|
18
|
+
* Picker that takes an array of `NormalizedItem` or `NormalizedSection` items
|
|
19
|
+
* as children and uses a render item function to render the items. This is
|
|
20
|
+
* necessary to support windowed data.
|
|
21
|
+
*/
|
|
22
|
+
export function PickerNormalized(_ref) {
|
|
23
|
+
var {
|
|
24
|
+
normalizedItems,
|
|
25
|
+
tooltip = true,
|
|
26
|
+
selectedKey,
|
|
27
|
+
defaultSelectedKey,
|
|
28
|
+
disabledKeys,
|
|
29
|
+
UNSAFE_className,
|
|
30
|
+
getInitialScrollPosition,
|
|
31
|
+
onChange,
|
|
32
|
+
onOpenChange,
|
|
33
|
+
onScroll = EMPTY_FUNCTION,
|
|
34
|
+
onSelectionChange
|
|
35
|
+
} = _ref,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
var tooltipOptions = useMemo(() => normalizeTooltipOptions(tooltip), [tooltip]);
|
|
38
|
+
var renderNormalizedItem = useRenderNormalizedItem(tooltipOptions);
|
|
39
|
+
var {
|
|
40
|
+
ref: scrollRef,
|
|
41
|
+
onOpenChange: onOpenChangeInternal
|
|
42
|
+
} = usePickerScrollOnOpen({
|
|
43
|
+
getInitialScrollPosition,
|
|
44
|
+
onScroll,
|
|
45
|
+
onOpenChange
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// Spectrum Picker treats keys as strings if the `key` prop is explicitly
|
|
49
|
+
// set on `Item` elements. Since we do this in `renderItem`, we need to
|
|
50
|
+
// map original key types to and from strings so that selection works.
|
|
51
|
+
var {
|
|
52
|
+
selectedStringKey,
|
|
53
|
+
defaultSelectedStringKey,
|
|
54
|
+
disabledStringKeys,
|
|
55
|
+
onStringSelectionChange
|
|
56
|
+
} = useStringifiedSelection({
|
|
57
|
+
normalizedItems,
|
|
58
|
+
selectedKey,
|
|
59
|
+
defaultSelectedKey,
|
|
60
|
+
disabledKeys,
|
|
61
|
+
onChange: onChange !== null && onChange !== void 0 ? onChange : onSelectionChange
|
|
62
|
+
});
|
|
63
|
+
return /*#__PURE__*/_jsx(SpectrumPicker
|
|
64
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
65
|
+
, _objectSpread(_objectSpread({}, props), {}, {
|
|
66
|
+
ref: scrollRef,
|
|
67
|
+
UNSAFE_className: cl('dh-picker', 'dh-picker-normalized', UNSAFE_className),
|
|
68
|
+
items: normalizedItems,
|
|
69
|
+
selectedKey: selectedStringKey,
|
|
70
|
+
defaultSelectedKey: defaultSelectedStringKey,
|
|
71
|
+
disabledKeys: disabledStringKeys,
|
|
72
|
+
onSelectionChange: onStringSelectionChange,
|
|
73
|
+
onOpenChange: onOpenChangeInternal,
|
|
74
|
+
children: itemOrSection => {
|
|
75
|
+
if (isNormalizedSection(itemOrSection)) {
|
|
76
|
+
var _itemOrSection$item, _itemOrSection$item2;
|
|
77
|
+
return /*#__PURE__*/_jsx(Section, {
|
|
78
|
+
title: (_itemOrSection$item = itemOrSection.item) === null || _itemOrSection$item === void 0 ? void 0 : _itemOrSection$item.title,
|
|
79
|
+
items: (_itemOrSection$item2 = itemOrSection.item) === null || _itemOrSection$item2 === void 0 ? void 0 : _itemOrSection$item2.items,
|
|
80
|
+
children: renderNormalizedItem
|
|
81
|
+
}, getItemKey(itemOrSection));
|
|
82
|
+
}
|
|
83
|
+
return renderNormalizedItem(itemOrSection);
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
export default PickerNormalized;
|
|
88
|
+
//# sourceMappingURL=PickerNormalized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerNormalized.js","names":["useMemo","Picker","SpectrumPicker","cl","EMPTY_FUNCTION","Section","getItemKey","isNormalizedSection","normalizeTooltipOptions","useRenderNormalizedItem","useStringifiedSelection","usePickerScrollOnOpen","jsx","_jsx","PickerNormalized","_ref","normalizedItems","tooltip","selectedKey","defaultSelectedKey","disabledKeys","UNSAFE_className","getInitialScrollPosition","onChange","onOpenChange","onScroll","onSelectionChange","props","_objectWithoutProperties","_excluded","tooltipOptions","renderNormalizedItem","ref","scrollRef","onOpenChangeInternal","selectedStringKey","defaultSelectedStringKey","disabledStringKeys","onStringSelectionChange","_objectSpread","items","children","itemOrSection","_itemOrSection$item","_itemOrSection$item2","title","item"],"sources":["../../../src/spectrum/picker/PickerNormalized.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Picker as SpectrumPicker } from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport { Section } from '../shared';\nimport type { PickerProps as PickerBaseProps } from './Picker';\n\nimport {\n getItemKey,\n isNormalizedSection,\n NormalizedItem,\n NormalizedSection,\n normalizeTooltipOptions,\n useRenderNormalizedItem,\n useStringifiedSelection,\n} from '../utils';\nimport usePickerScrollOnOpen from './usePickerScrollOnOpen';\n\nexport interface PickerNormalizedProps\n extends Omit<PickerBaseProps, 'children'> {\n normalizedItems: (NormalizedItem | NormalizedSection)[];\n getInitialScrollPosition?: () => Promise<number | null | undefined>;\n onScroll?: (event: Event) => void;\n}\n\n/**\n * Picker that takes an array of `NormalizedItem` or `NormalizedSection` items\n * as children and uses a render item function to render the items. This is\n * necessary to support windowed data.\n */\nexport function PickerNormalized({\n normalizedItems,\n tooltip = true,\n selectedKey,\n defaultSelectedKey,\n disabledKeys,\n UNSAFE_className,\n getInitialScrollPosition,\n onChange,\n onOpenChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n ...props\n}: PickerNormalizedProps): JSX.Element {\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n const renderNormalizedItem = useRenderNormalizedItem(tooltipOptions);\n\n const { ref: scrollRef, onOpenChange: onOpenChangeInternal } =\n usePickerScrollOnOpen({\n getInitialScrollPosition,\n onScroll,\n onOpenChange,\n });\n\n // Spectrum Picker treats keys as strings if the `key` prop is explicitly\n // set on `Item` elements. Since we do this in `renderItem`, we need to\n // map original key types to and from strings so that selection works.\n const {\n selectedStringKey,\n defaultSelectedStringKey,\n disabledStringKeys,\n onStringSelectionChange,\n } = useStringifiedSelection({\n normalizedItems,\n selectedKey,\n defaultSelectedKey,\n disabledKeys,\n onChange: onChange ?? onSelectionChange,\n });\n\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n ref={scrollRef as DOMRef<HTMLDivElement>}\n UNSAFE_className={cl(\n 'dh-picker',\n 'dh-picker-normalized',\n UNSAFE_className\n )}\n items={normalizedItems}\n selectedKey={selectedStringKey}\n defaultSelectedKey={defaultSelectedStringKey}\n disabledKeys={disabledStringKeys}\n onSelectionChange={onStringSelectionChange}\n onOpenChange={onOpenChangeInternal}\n >\n {itemOrSection => {\n if (isNormalizedSection(itemOrSection)) {\n return (\n <Section\n key={getItemKey(itemOrSection)}\n title={itemOrSection.item?.title}\n items={itemOrSection.item?.items}\n >\n {renderNormalizedItem}\n </Section>\n );\n }\n\n return renderNormalizedItem(itemOrSection);\n }}\n </SpectrumPicker>\n );\n}\n\nexport default PickerNormalized;\n"],"mappings":";;;;;;;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,MAAM,IAAIC,cAAc,QAAQ,uBAAuB;AAEhE,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,cAAc,QAAQ,kBAAkB;AAAC,SACzCC,OAAO;AAAA,SAIdC,UAAU,EACVC,mBAAmB,EAGnBC,uBAAuB,EACvBC,uBAAuB,EACvBC,uBAAuB;AAAA,OAElBC,qBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAS5B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAaO;EAAA,IAbN;MAC/BC,eAAe;MACfC,OAAO,GAAG,IAAI;MACdC,WAAW;MACXC,kBAAkB;MAClBC,YAAY;MACZC,gBAAgB;MAChBC,wBAAwB;MACxBC,QAAQ;MACRC,YAAY;MACZC,QAAQ,GAAGrB,cAAc;MACzBsB;IAEqB,CAAC,GAAAX,IAAA;IADnBY,KAAK,GAAAC,wBAAA,CAAAb,IAAA,EAAAc,SAAA;EAER,IAAMC,cAAc,GAAG9B,OAAO,CAC5B,MAAMQ,uBAAuB,CAACS,OAAO,CAAC,EACtC,CAACA,OAAO,CACV,CAAC;EAED,IAAMc,oBAAoB,GAAGtB,uBAAuB,CAACqB,cAAc,CAAC;EAEpE,IAAM;IAAEE,GAAG,EAAEC,SAAS;IAAET,YAAY,EAAEU;EAAqB,CAAC,GAC1DvB,qBAAqB,CAAC;IACpBW,wBAAwB;IACxBG,QAAQ;IACRD;EACF,CAAC,CAAC;;EAEJ;EACA;EACA;EACA,IAAM;IACJW,iBAAiB;IACjBC,wBAAwB;IACxBC,kBAAkB;IAClBC;EACF,CAAC,GAAG5B,uBAAuB,CAAC;IAC1BM,eAAe;IACfE,WAAW;IACXC,kBAAkB;IAClBC,YAAY;IACZG,QAAQ,EAAEA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIG;EACxB,CAAC,CAAC;EAEF,oBACEb,IAAA,CAACX;EACC;EAAA,EAAAqC,aAAA,CAAAA,aAAA,KACIZ,KAAK;IACTK,GAAG,EAAEC,SAAoC;IACzCZ,gBAAgB,EAAElB,EAAE,CAClB,WAAW,EACX,sBAAsB,EACtBkB,gBACF,CAAE;IACFmB,KAAK,EAAExB,eAAgB;IACvBE,WAAW,EAAEiB,iBAAkB;IAC/BhB,kBAAkB,EAAEiB,wBAAyB;IAC7ChB,YAAY,EAAEiB,kBAAmB;IACjCX,iBAAiB,EAAEY,uBAAwB;IAC3Cd,YAAY,EAAEU,oBAAqB;IAAAO,QAAA,EAElCC,aAAa,IAAI;MAChB,IAAInC,mBAAmB,CAACmC,aAAa,CAAC,EAAE;QAAA,IAAAC,mBAAA,EAAAC,oBAAA;QACtC,oBACE/B,IAAA,CAACR,OAAO;UAENwC,KAAK,GAAAF,mBAAA,GAAED,aAAa,CAACI,IAAI,cAAAH,mBAAA,uBAAlBA,mBAAA,CAAoBE,KAAM;UACjCL,KAAK,GAAAI,oBAAA,GAAEF,aAAa,CAACI,IAAI,cAAAF,oBAAA,uBAAlBA,oBAAA,CAAoBJ,KAAM;UAAAC,QAAA,EAEhCV;QAAoB,GAJhBzB,UAAU,CAACoC,aAAa,CAKtB,CAAC;MAEd;MAEA,OAAOX,oBAAoB,CAACW,aAAa,CAAC;IAC5C;EAAC,EACa,CAAC;AAErB;AAEA,eAAe5B,gBAAgB"}
|