@dxos/react-ui 0.4.7-main.dca306f → 0.4.7-main.ea67fec
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/lib/browser/index.mjs +8 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +3 -5
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +3 -3
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.d.ts +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +1 -1
- package/package.json +8 -8
- package/src/components/Avatars/Avatar.stories.tsx +19 -24
- package/src/components/Avatars/Avatar.tsx +7 -16
- package/src/components/Avatars/AvatarGroup.stories.tsx +5 -3
|
@@ -41,7 +41,7 @@ export declare const Input: {
|
|
|
41
41
|
({ __inputScope, id: propsId, descriptionId: propsDescriptionId, errorMessageId: propsErrorMessageId, validationValence, children, }: InputScopedProps<InputRootProps>): JSX.Element;
|
|
42
42
|
displayName: string;
|
|
43
43
|
};
|
|
44
|
-
PinInput: React.ForwardRefExoticComponent<Pick<PinInputProps, "density" | "elevation" | "type" | "length" | "form" | "slot" | "style" | "title" | "pattern" | "width" | "height" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "list" | "step" | "size" | "variant" | "max" | "min" | "name" | "crossOrigin" | "fontFamily" | "fontSize" | "spacing" | "
|
|
44
|
+
PinInput: React.ForwardRefExoticComponent<Pick<PinInputProps, "density" | "elevation" | "type" | "length" | "form" | "slot" | "style" | "title" | "pattern" | "width" | "height" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "list" | "step" | "size" | "variant" | "max" | "min" | "name" | "crossOrigin" | "fontFamily" | "fontSize" | "spacing" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "multiple" | "checked" | "accept" | "alt" | "autoComplete" | "capture" | "enterKeyHint" | "minLength" | "readOnly" | "required" | "src" | "padding" | "paddingY" | "paddingX" | "characterWidth" | "segmentWidth" | "inputWidth" | "inputClassName" | "inputStyle" | "scrollWrapperClassName" | "segmentWrapperClassName" | "rootProps" | "segmentClassName" | "segmentPadding" | "segmentHeight"> & React.RefAttributes<HTMLInputElement>>;
|
|
45
45
|
TextInput: React.ForwardRefExoticComponent<Pick<InputScopedProps<TextInputProps>, "density" | "value" | "children" | "elevation" | "type" | "form" | "slot" | "style" | "title" | "pattern" | "width" | "height" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "asChild" | "classNames" | "list" | "step" | "size" | "variant" | "max" | "min" | "name" | "crossOrigin" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "multiple" | "checked" | "__inputScope" | "accept" | "alt" | "autoComplete" | "capture" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src"> & React.RefAttributes<HTMLInputElement>>;
|
|
46
46
|
TextArea: React.ForwardRefExoticComponent<Pick<InputScopedProps<TextAreaProps>, "density" | "value" | "children" | "elevation" | "form" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "classNames" | "variant" | "name" | "autoFocus" | "disabled" | "__inputScope" | "autoComplete" | "maxLength" | "minLength" | "readOnly" | "required" | "cols" | "dirName" | "rows" | "wrap"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
47
47
|
Checkbox: React.ForwardRefExoticComponent<CheckboxProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui",
|
|
3
|
-
"version": "0.4.7-main.
|
|
3
|
+
"version": "0.4.7-main.ea67fec",
|
|
4
4
|
"description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -37,13 +37,12 @@
|
|
|
37
37
|
"@radix-ui/react-use-controllable-state": "^1.0.0",
|
|
38
38
|
"date-fns": "^3.3.1",
|
|
39
39
|
"i18next": "^21.10.0",
|
|
40
|
-
"jdenticon": "^3.2.0",
|
|
41
40
|
"keyborg": "^2.5.0",
|
|
42
41
|
"react-i18next": "^11.18.6",
|
|
43
|
-
"@dxos/react-hooks": "0.4.7-main.
|
|
44
|
-
"@dxos/react-
|
|
45
|
-
"@dxos/react-
|
|
46
|
-
"@dxos/react-
|
|
42
|
+
"@dxos/react-hooks": "0.4.7-main.ea67fec",
|
|
43
|
+
"@dxos/react-ui-types": "0.4.7-main.ea67fec",
|
|
44
|
+
"@dxos/react-input": "0.4.7-main.ea67fec",
|
|
45
|
+
"@dxos/react-list": "0.4.7-main.ea67fec"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@dnd-kit/core": "^6.0.5",
|
|
@@ -56,8 +55,9 @@
|
|
|
56
55
|
"react-dom": "^18.2.0",
|
|
57
56
|
"vite": "^5.1.3",
|
|
58
57
|
"vite-plugin-turbosnap": "^1.0.2",
|
|
59
|
-
"@dxos/random": "0.4.7-main.
|
|
60
|
-
"@dxos/react-ui-theme": "0.4.7-main.
|
|
58
|
+
"@dxos/random": "0.4.7-main.ea67fec",
|
|
59
|
+
"@dxos/react-ui-theme": "0.4.7-main.ea67fec",
|
|
60
|
+
"@dxos/util": "0.4.7-main.ea67fec"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@phosphor-icons/react": "^2.0.5",
|
|
@@ -6,17 +6,15 @@ import '@dxosTheme';
|
|
|
6
6
|
|
|
7
7
|
import React, { type PropsWithChildren } from 'react';
|
|
8
8
|
|
|
9
|
-
import { getColorForValue } from '@dxos/react-ui-theme';
|
|
10
9
|
import { type Size } from '@dxos/react-ui-types';
|
|
10
|
+
import { hexToFallback } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import { Avatar,
|
|
12
|
+
import { Avatar, type AvatarVariant, type AvatarStatus, type AvatarAnimation, type AvatarRootProps } from './Avatar';
|
|
13
13
|
import { withTheme } from '../../testing';
|
|
14
14
|
|
|
15
|
-
const randomColor = () => getColorForValue({ value: Math.random().toString(16), type: 'color' });
|
|
16
|
-
|
|
17
15
|
type StorybookAvatarProps = {
|
|
16
|
+
id?: string;
|
|
18
17
|
imgSrc?: string;
|
|
19
|
-
fallbackValue?: string;
|
|
20
18
|
fallbackText?: string;
|
|
21
19
|
label?: string;
|
|
22
20
|
description?: string;
|
|
@@ -24,30 +22,27 @@ type StorybookAvatarProps = {
|
|
|
24
22
|
variant?: AvatarVariant;
|
|
25
23
|
animation?: AvatarAnimation;
|
|
26
24
|
size?: Size;
|
|
27
|
-
|
|
25
|
+
hue?: AvatarRootProps['hue'];
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
const StorybookAvatar = (props: PropsWithChildren<StorybookAvatarProps>) => {
|
|
31
29
|
const {
|
|
30
|
+
id = '20970b563fc49b5bb194a6ffdff376031a3a11f9481360c071c3fed87874106b',
|
|
32
31
|
status,
|
|
33
32
|
size = 12,
|
|
34
33
|
variant = 'circle',
|
|
35
34
|
label = 'Alice',
|
|
36
35
|
description = 'Online',
|
|
37
|
-
fallbackValue = '20970b563fc49b5bb194a6ffdff376031a3a11f9481360c071c3fed87874106b',
|
|
38
36
|
fallbackText = '',
|
|
39
37
|
animation,
|
|
40
38
|
imgSrc,
|
|
41
|
-
color = randomColor(),
|
|
42
39
|
} = props;
|
|
43
|
-
const
|
|
40
|
+
const { emoji, hue } = hexToFallback(id);
|
|
44
41
|
return (
|
|
45
42
|
<div className='flex flex-row gap-3 align-middle items-center'>
|
|
46
|
-
<Avatar.Root {...{ size, variant, status, animation,
|
|
43
|
+
<Avatar.Root {...{ size, variant, status, animation, hue: props.hue || hue }}>
|
|
47
44
|
<Avatar.Frame>
|
|
48
|
-
{!imgSrc && (
|
|
49
|
-
<Avatar.Fallback href={fallbackValue ? jdenticon : ''} text={fallbackText} />
|
|
50
|
-
)}
|
|
45
|
+
{!imgSrc && (fallbackText || emoji) && <Avatar.Fallback text={fallbackText || emoji} />}
|
|
51
46
|
{imgSrc && <Avatar.Image href={imgSrc} />}
|
|
52
47
|
</Avatar.Frame>
|
|
53
48
|
<div>
|
|
@@ -73,7 +68,7 @@ const sampleImage =
|
|
|
73
68
|
|
|
74
69
|
const row = (size: Size) => (
|
|
75
70
|
<>
|
|
76
|
-
<StorybookAvatar size={size} description='Offline'
|
|
71
|
+
<StorybookAvatar size={size} description='Offline' />
|
|
77
72
|
<StorybookAvatar size={size} status='active' />
|
|
78
73
|
<StorybookAvatar size={size} status='active' imgSrc={sampleImage} />
|
|
79
74
|
</>
|
|
@@ -113,22 +108,22 @@ export const Square = () => (
|
|
|
113
108
|
|
|
114
109
|
export const DefaultEmoji = () => (
|
|
115
110
|
<div className='flex flex-row gap-4'>
|
|
116
|
-
<StorybookAvatar fallbackText='🦄'
|
|
117
|
-
<StorybookAvatar fallbackText='🐒'
|
|
118
|
-
<StorybookAvatar fallbackText='🪲'
|
|
111
|
+
<StorybookAvatar fallbackText='🦄' status='active' animation='pulse' />
|
|
112
|
+
<StorybookAvatar fallbackText='🐒' animation='pulse' />
|
|
113
|
+
<StorybookAvatar fallbackText='🪲' />
|
|
119
114
|
</div>
|
|
120
115
|
);
|
|
121
116
|
|
|
122
|
-
export const SquareEmoji = () => <StorybookAvatar variant='square' fallbackText='🦄'
|
|
117
|
+
export const SquareEmoji = () => <StorybookAvatar variant='square' fallbackText='🦄' />;
|
|
123
118
|
|
|
124
119
|
export const DefaultText = () => (
|
|
125
120
|
<div className='flex flex-row gap-4'>
|
|
126
|
-
<StorybookAvatar fallbackText='PT'
|
|
127
|
-
<StorybookAvatar fallbackText='AP'
|
|
128
|
-
<StorybookAvatar fallbackText='Z'
|
|
129
|
-
<StorybookAvatar fallbackText='pt'
|
|
130
|
-
<StorybookAvatar fallbackText='ap'
|
|
131
|
-
<StorybookAvatar fallbackText='z'
|
|
121
|
+
<StorybookAvatar fallbackText='PT' />
|
|
122
|
+
<StorybookAvatar fallbackText='AP' />
|
|
123
|
+
<StorybookAvatar fallbackText='Z' />
|
|
124
|
+
<StorybookAvatar fallbackText='pt' />
|
|
125
|
+
<StorybookAvatar fallbackText='ap' />
|
|
126
|
+
<StorybookAvatar fallbackText='z' />
|
|
132
127
|
</div>
|
|
133
128
|
);
|
|
134
129
|
|
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
import { createContext } from '@radix-ui/react-context';
|
|
12
12
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
13
13
|
import { Slot } from '@radix-ui/react-slot';
|
|
14
|
-
import {
|
|
15
|
-
import React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, useMemo } from 'react';
|
|
14
|
+
import React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren } from 'react';
|
|
16
15
|
|
|
17
16
|
import { useId } from '@dxos/react-hooks';
|
|
18
17
|
import { type Size } from '@dxos/react-ui-types';
|
|
@@ -35,7 +34,7 @@ type AvatarContextValue = {
|
|
|
35
34
|
status?: AvatarStatus;
|
|
36
35
|
animation?: AvatarAnimation;
|
|
37
36
|
inGroup?: boolean;
|
|
38
|
-
|
|
37
|
+
hue?: string;
|
|
39
38
|
};
|
|
40
39
|
|
|
41
40
|
const AVATAR_NAME = 'Avatar';
|
|
@@ -51,13 +50,13 @@ const AvatarRoot = ({
|
|
|
51
50
|
descriptionId: propsDescriptionId,
|
|
52
51
|
maskId: propsMaskId,
|
|
53
52
|
inGroup,
|
|
54
|
-
|
|
53
|
+
hue,
|
|
55
54
|
}: AvatarRootProps) => {
|
|
56
55
|
const labelId = useId('avatar__label', propsLabelId);
|
|
57
56
|
const descriptionId = useId('avatar__description', propsDescriptionId);
|
|
58
57
|
const maskId = useId('avatar__mask', propsMaskId);
|
|
59
58
|
return (
|
|
60
|
-
<AvatarProvider {...{ labelId, descriptionId, maskId, size, variant, status, animation, inGroup,
|
|
59
|
+
<AvatarProvider {...{ labelId, descriptionId, maskId, size, variant, status, animation, inGroup, hue }}>
|
|
61
60
|
{children}
|
|
62
61
|
</AvatarProvider>
|
|
63
62
|
);
|
|
@@ -69,7 +68,7 @@ const rx = '0.25rem';
|
|
|
69
68
|
|
|
70
69
|
const AvatarFrame = forwardRef<HTMLSpanElement, AvatarFrameProps>(
|
|
71
70
|
({ classNames, children, ...props }, forwardedRef) => {
|
|
72
|
-
const { size, variant, labelId, descriptionId, maskId, inGroup, status, animation,
|
|
71
|
+
const { size, variant, labelId, descriptionId, maskId, inGroup, status, animation, hue } =
|
|
73
72
|
useAvatarContext('AvatarFrame');
|
|
74
73
|
|
|
75
74
|
const { tx } = useThemeContext();
|
|
@@ -113,11 +112,10 @@ const AvatarFrame = forwardRef<HTMLSpanElement, AvatarFrameProps>(
|
|
|
113
112
|
</defs>
|
|
114
113
|
{variant === 'circle' ? (
|
|
115
114
|
<circle
|
|
116
|
-
className={
|
|
115
|
+
className={hue ? tx('hue.fill', 'avatar__frame__circle', { hue }) : 'fill-[var(--surface-bg)]'}
|
|
117
116
|
cx='50%'
|
|
118
117
|
cy='50%'
|
|
119
118
|
r={r}
|
|
120
|
-
{...(color ? { fill: color } : {})}
|
|
121
119
|
/>
|
|
122
120
|
) : (
|
|
123
121
|
<rect
|
|
@@ -282,13 +280,6 @@ const AvatarFallback = forwardRef<SVGImageElement, AvatarFallbackProps>(({ delay
|
|
|
282
280
|
);
|
|
283
281
|
});
|
|
284
282
|
|
|
285
|
-
const getJdenticonHref = (value: string, size: Size) =>
|
|
286
|
-
`data:image/svg+xml;utf8,${encodeURIComponent(toSvg(value, size === 'px' ? 1 : size * 4, { padding: 0 }))}`;
|
|
287
|
-
|
|
288
|
-
const useJdenticonHref = (value: string, size: Size) => {
|
|
289
|
-
return useMemo(() => getJdenticonHref(value, size), [value]);
|
|
290
|
-
};
|
|
291
|
-
|
|
292
283
|
export const Avatar = {
|
|
293
284
|
Root: AvatarRoot,
|
|
294
285
|
Frame: AvatarFrame,
|
|
@@ -298,7 +289,7 @@ export const Avatar = {
|
|
|
298
289
|
Description: AvatarDescription,
|
|
299
290
|
};
|
|
300
291
|
|
|
301
|
-
export {
|
|
292
|
+
export { useAvatarContext };
|
|
302
293
|
|
|
303
294
|
export type {
|
|
304
295
|
AvatarStatus,
|
|
@@ -6,7 +6,9 @@ import '@dxosTheme';
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { toEmoji } from '@dxos/util';
|
|
10
|
+
|
|
11
|
+
import { Avatar } from './Avatar';
|
|
10
12
|
import { AvatarGroup, AvatarGroupItem } from './AvatarGroup';
|
|
11
13
|
import { withTheme } from '../../testing';
|
|
12
14
|
|
|
@@ -18,11 +20,11 @@ const items = [
|
|
|
18
20
|
];
|
|
19
21
|
|
|
20
22
|
const StorybookAvatarGroupItem = ({ n }: { n: number }) => {
|
|
21
|
-
const
|
|
23
|
+
const emoji = toEmoji(n);
|
|
22
24
|
return (
|
|
23
25
|
<AvatarGroupItem.Root>
|
|
24
26
|
<Avatar.Frame classNames={items[n]}>
|
|
25
|
-
<Avatar.Fallback
|
|
27
|
+
<Avatar.Fallback text={emoji} />
|
|
26
28
|
</Avatar.Frame>
|
|
27
29
|
</AvatarGroupItem.Root>
|
|
28
30
|
);
|