@primer/components 32.0.2-rc.859381a1 → 32.1.1-rc.b4502a34
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/CHANGELOG.md +13 -1
- package/dist/browser.esm.js +9 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +9 -2
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/ActionList2.mdx +23 -3
- package/docs/content/Avatar.mdx +21 -1
- package/docs/content/AvatarStack.mdx +23 -3
- package/docs/content/BranchName.md +24 -4
- package/docs/content/Breadcrumbs.md +22 -1
- package/docs/content/Buttons.md +2 -1
- package/docs/content/Checkbox.md +118 -0
- package/docs/content/CircleBadge.md +1 -0
- package/docs/content/CircleOcticon.md +2 -1
- package/docs/content/CounterLabel.md +1 -1
- package/docs/content/Details.md +2 -1
- package/docs/content/Dialog.md +1 -0
- package/docs/content/Dialog2.mdx +1 -0
- package/docs/content/Dropdown.md +1 -0
- package/docs/content/DropdownMenu.mdx +1 -0
- package/docs/content/FilterList.md +1 -0
- package/docs/content/FilteredSearch.md +1 -0
- package/docs/content/Flash.md +1 -0
- package/docs/content/FormGroup.md +1 -0
- package/docs/content/Header.md +1 -0
- package/docs/content/Heading.md +8 -4
- package/docs/content/Label.md +1 -0
- package/docs/content/LabelGroup.md +1 -0
- package/docs/content/Link.md +1 -0
- package/docs/content/Overlay.mdx +1 -0
- package/docs/content/Pagehead.md +1 -0
- package/docs/content/Pagination.md +1 -0
- package/docs/content/PointerBox.md +1 -0
- package/docs/content/Popover.md +1 -0
- package/docs/content/Portal.mdx +1 -0
- package/docs/content/Position.md +2 -9
- package/docs/content/ProgressBar.mdx +1 -0
- package/docs/content/SelectMenu.md +1 -0
- package/docs/content/SideNav.md +1 -0
- package/docs/content/StateLabel.md +1 -0
- package/docs/content/StyledOcticon.md +1 -1
- package/docs/content/SubNav.md +1 -0
- package/docs/content/TabNav.md +1 -0
- package/docs/content/Text.md +10 -3
- package/docs/content/TextInput.md +9 -1
- package/docs/content/Timeline.md +1 -0
- package/docs/content/Tooltip.md +1 -0
- package/docs/content/Truncate.md +1 -0
- package/docs/content/UnderlineNav.md +1 -0
- package/docs/content/status.mdx +10 -0
- package/docs/src/@primer/gatsby-theme-doctocat/mdx-components.js +9 -0
- package/docs/src/@primer/gatsby-theme-doctocat/nav.yml +4 -0
- package/docs/src/component-statuses.js +74 -0
- package/lib/ActionList/Item.js +3 -3
- package/lib/ActionList2/Item.js +3 -1
- package/lib/ActionList2/List.js +1 -2
- package/lib/ActionList2/Selection.js +3 -1
- package/lib/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib/Button/Button.d.ts +1 -0
- package/lib/Button/ButtonClose.d.ts +2 -1
- package/lib/Button/ButtonDanger.d.ts +1 -0
- package/lib/Button/ButtonInvisible.d.ts +1 -0
- package/lib/Button/ButtonOutline.d.ts +1 -0
- package/lib/Button/ButtonPrimary.d.ts +1 -0
- package/lib/Checkbox.d.ts +29 -0
- package/lib/Checkbox.js +64 -0
- package/lib/CircleOcticon.d.ts +1 -0
- package/lib/Dialog.d.ts +3 -2
- package/lib/Dropdown.d.ts +4 -0
- package/lib/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib/FilterList.d.ts +1 -0
- package/lib/Position.d.ts +4 -4
- package/lib/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +1 -0
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/__tests__/ActionList2.test.d.ts +1 -0
- package/lib/__tests__/ActionList2.test.js +117 -0
- package/lib/__tests__/Checkbox.test.d.ts +2 -0
- package/lib/__tests__/Checkbox.test.js +189 -0
- package/lib/__tests__/themePreval.test.d.ts +1 -0
- package/lib/__tests__/themePreval.test.js +14 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib/stories/ActionList2.stories.js +20 -6
- package/lib/stories/Checkbox.stories.js +227 -0
- package/lib/utils/testing.d.ts +1 -0
- package/lib/utils/testing.js +29 -0
- package/lib-esm/ActionList/Item.js +3 -3
- package/lib-esm/ActionList2/Item.js +3 -1
- package/lib-esm/ActionList2/List.js +1 -2
- package/lib-esm/ActionList2/Selection.js +3 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib-esm/Button/Button.d.ts +1 -0
- package/lib-esm/Button/ButtonClose.d.ts +2 -1
- package/lib-esm/Button/ButtonDanger.d.ts +1 -0
- package/lib-esm/Button/ButtonInvisible.d.ts +1 -0
- package/lib-esm/Button/ButtonOutline.d.ts +1 -0
- package/lib-esm/Button/ButtonPrimary.d.ts +1 -0
- package/lib-esm/Checkbox.d.ts +29 -0
- package/lib-esm/Checkbox.js +44 -0
- package/lib-esm/CircleOcticon.d.ts +1 -0
- package/lib-esm/Dialog.d.ts +3 -2
- package/lib-esm/Dropdown.d.ts +4 -0
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib-esm/FilterList.d.ts +1 -0
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +1 -0
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/__tests__/ActionList2.test.d.ts +1 -0
- package/lib-esm/__tests__/ActionList2.test.js +105 -2
- package/lib-esm/__tests__/Checkbox.test.d.ts +2 -0
- package/lib-esm/__tests__/Checkbox.test.js +169 -0
- package/lib-esm/__tests__/themePreval.test.d.ts +1 -0
- package/lib-esm/__tests__/themePreval.test.js +7 -0
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/stories/ActionList2.stories.js +20 -6
- package/lib-esm/stories/Checkbox.stories.js +197 -0
- package/lib-esm/utils/testing.d.ts +1 -0
- package/lib-esm/utils/testing.js +24 -0
- package/package-lock.json +179 -20
- package/package.json +2 -2
- package/src/ActionList/Item.tsx +2 -1
- package/src/ActionList2/Item.tsx +3 -2
- package/src/ActionList2/List.tsx +1 -6
- package/src/ActionList2/Selection.tsx +2 -1
- package/src/Checkbox.tsx +75 -0
- package/src/__tests__/ActionList2.test.tsx +111 -2
- package/src/__tests__/Checkbox.test.tsx +155 -0
- package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +13 -0
- package/src/__tests__/__snapshots__/Checkbox.test.tsx.snap +16 -0
- package/src/__tests__/__snapshots__/themePreval.test.ts.snap +3176 -0
- package/src/__tests__/themePreval.test.ts +8 -0
- package/src/index.ts +3 -0
- package/src/stories/ActionList2.stories.tsx +22 -8
- package/src/stories/Checkbox.stories.tsx +164 -0
- package/src/utils/testing.tsx +22 -0
- package/stats.html +1 -1
- package/docs/content/TextInputTokens.mdx +0 -89
- package/lib/ActionList2/Header.d.ts +0 -26
- package/lib/ActionList2/Header.js +0 -55
- package/lib-esm/ActionList2/Header.d.ts +0 -26
- package/lib-esm/ActionList2/Header.js +0 -44
- package/src/ActionList2/Header.tsx +0 -58
@@ -3,5 +3,5 @@ import { TokenBaseProps } from './TokenBase';
|
|
3
3
|
export interface AvatarTokenProps extends TokenBaseProps {
|
4
4
|
avatarSrc: string;
|
5
5
|
}
|
6
|
-
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "avatarSrc"> & React.RefAttributes<HTMLElement>>;
|
6
|
+
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "avatarSrc"> & React.RefAttributes<HTMLElement>>;
|
7
7
|
export default AvatarToken;
|
@@ -10,5 +10,5 @@ export interface IssueLabelTokenProps extends TokenBaseProps {
|
|
10
10
|
*/
|
11
11
|
hideRemoveButton?: boolean;
|
12
12
|
}
|
13
|
-
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "hideRemoveButton" | "fillColor"> & React.RefAttributes<HTMLElement>>;
|
13
|
+
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "hideRemoveButton" | "fillColor"> & React.RefAttributes<HTMLElement>>;
|
14
14
|
export default IssueLabelToken;
|
package/lib/Token/Token.d.ts
CHANGED
@@ -11,5 +11,5 @@ export interface TokenProps extends TokenBaseProps {
|
|
11
11
|
*/
|
12
12
|
hideRemoveButton?: boolean;
|
13
13
|
}
|
14
|
-
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "sx" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "leadingVisual" | "onRemove" | "isSelected" | "hideRemoveButton"> & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
|
14
|
+
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "sx" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "leadingVisual" | "onRemove" | "isSelected" | "hideRemoveButton"> & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
|
15
15
|
export default Token;
|
@@ -16,6 +16,8 @@ var _testing = require("../utils/testing");
|
|
16
16
|
|
17
17
|
var _ = require("..");
|
18
18
|
|
19
|
+
require("@testing-library/jest-dom");
|
20
|
+
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
22
|
|
21
23
|
expect.extend(_jestAxe.toHaveNoViolations);
|
@@ -29,6 +31,36 @@ function SimpleActionList() {
|
|
29
31
|
}
|
30
32
|
|
31
33
|
SimpleActionList.displayName = "SimpleActionList";
|
34
|
+
const projects = [{
|
35
|
+
name: 'Primer Backlog',
|
36
|
+
scope: 'GitHub'
|
37
|
+
}, {
|
38
|
+
name: 'Primer React',
|
39
|
+
scope: 'github/primer'
|
40
|
+
}, {
|
41
|
+
name: 'Disabled Project',
|
42
|
+
scope: 'github/primer',
|
43
|
+
disabled: true
|
44
|
+
}];
|
45
|
+
|
46
|
+
function SingleSelectListStory() {
|
47
|
+
const [selectedIndex, setSelectedIndex] = _react2.default.useState(0);
|
48
|
+
|
49
|
+
return /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList, {
|
50
|
+
selectionVariant: "single",
|
51
|
+
showDividers: true,
|
52
|
+
role: "listbox",
|
53
|
+
"aria-label": "Select a project"
|
54
|
+
}, projects.map((project, index) => /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList.Item, {
|
55
|
+
key: index,
|
56
|
+
role: "option",
|
57
|
+
selected: index === selectedIndex,
|
58
|
+
onSelect: () => setSelectedIndex(index),
|
59
|
+
disabled: project.disabled
|
60
|
+
}, project.name)));
|
61
|
+
}
|
62
|
+
|
63
|
+
SingleSelectListStory.displayName = "SingleSelectListStory";
|
32
64
|
describe('ActionList', () => {
|
33
65
|
(0, _testing.behavesAsComponent)({
|
34
66
|
Component: _ActionList.ActionList,
|
@@ -50,4 +82,89 @@ describe('ActionList', () => {
|
|
50
82
|
expect(results).toHaveNoViolations();
|
51
83
|
(0, _react.cleanup)();
|
52
84
|
});
|
85
|
+
it('should fire onSelect on click and keypress', async () => {
|
86
|
+
const component = (0, _react.render)( /*#__PURE__*/_react2.default.createElement(SingleSelectListStory, null));
|
87
|
+
const options = await (0, _react.waitFor)(() => component.getAllByRole('option'));
|
88
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'true');
|
89
|
+
expect(options[1]).toHaveAttribute('aria-selected', 'false');
|
90
|
+
|
91
|
+
_react.fireEvent.click(options[1]);
|
92
|
+
|
93
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'false');
|
94
|
+
expect(options[1]).toHaveAttribute('aria-selected', 'true'); // We pass keycode here to navigate a implementation detail in react-testing-library
|
95
|
+
// https://github.com/testing-library/react-testing-library/issues/269#issuecomment-455854112
|
96
|
+
|
97
|
+
_react.fireEvent.keyPress(options[0], {
|
98
|
+
key: 'Enter',
|
99
|
+
charCode: 13
|
100
|
+
});
|
101
|
+
|
102
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'true');
|
103
|
+
expect(options[1]).toHaveAttribute('aria-selected', 'false');
|
104
|
+
|
105
|
+
_react.fireEvent.keyPress(options[1], {
|
106
|
+
key: ' ',
|
107
|
+
charCode: 32
|
108
|
+
});
|
109
|
+
|
110
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'false');
|
111
|
+
expect(options[1]).toHaveAttribute('aria-selected', 'true');
|
112
|
+
(0, _react.cleanup)();
|
113
|
+
});
|
114
|
+
it('should skip onSelect on disabled items', async () => {
|
115
|
+
const component = (0, _react.render)( /*#__PURE__*/_react2.default.createElement(SingleSelectListStory, null));
|
116
|
+
const options = await (0, _react.waitFor)(() => component.getAllByRole('option'));
|
117
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'true');
|
118
|
+
expect(options[2]).toHaveAttribute('aria-selected', 'false');
|
119
|
+
|
120
|
+
_react.fireEvent.click(options[2]);
|
121
|
+
|
122
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'true');
|
123
|
+
expect(options[2]).toHaveAttribute('aria-selected', 'false');
|
124
|
+
|
125
|
+
_react.fireEvent.keyPress(options[2], {
|
126
|
+
key: 'Enter',
|
127
|
+
charCode: 13
|
128
|
+
});
|
129
|
+
|
130
|
+
expect(options[0]).toHaveAttribute('aria-selected', 'true');
|
131
|
+
expect(options[2]).toHaveAttribute('aria-selected', 'false');
|
132
|
+
(0, _react.cleanup)();
|
133
|
+
});
|
134
|
+
it('should throw when selected is provided without a selectionVariant on parent', async () => {
|
135
|
+
// we expect console.error to be called, so we suppress that in the test
|
136
|
+
const mockError = jest.spyOn(console, 'error').mockImplementation(() => jest.fn());
|
137
|
+
expect(() => {
|
138
|
+
(0, _react.render)( /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList, {
|
139
|
+
showDividers: true,
|
140
|
+
role: "listbox",
|
141
|
+
"aria-label": "Select a project"
|
142
|
+
}, /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList.Item, {
|
143
|
+
role: "option",
|
144
|
+
selected: true
|
145
|
+
}, "Primer React")));
|
146
|
+
}).toThrow('For Item to be selected, ActionList or ActionList.Group needs to have a selectionVariant defined');
|
147
|
+
(0, _react.cleanup)();
|
148
|
+
mockError.mockRestore();
|
149
|
+
});
|
150
|
+
it('should not crash when clicking an item without an onSelect', async () => {
|
151
|
+
const component = (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList, {
|
152
|
+
role: "listbox"
|
153
|
+
}, /*#__PURE__*/_react2.default.createElement(_ActionList.ActionList.Item, {
|
154
|
+
role: "option"
|
155
|
+
}, "Primer React")));
|
156
|
+
const option = await (0, _react.waitFor)(() => component.getByRole('option'));
|
157
|
+
expect(option).toBeInTheDocument();
|
158
|
+
|
159
|
+
_react.fireEvent.click(option);
|
160
|
+
|
161
|
+
_react.fireEvent.keyPress(option, {
|
162
|
+
key: 'Enter',
|
163
|
+
charCode: 13
|
164
|
+
});
|
165
|
+
|
166
|
+
expect(option).toBeInTheDocument();
|
167
|
+
(0, _react.cleanup)();
|
168
|
+
});
|
169
|
+
(0, _testing.checkStoriesForAxeViolations)('ActionList2');
|
53
170
|
});
|
@@ -0,0 +1,189 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
4
|
+
|
5
|
+
var _ = require("..");
|
6
|
+
|
7
|
+
var _testing = require("../utils/testing");
|
8
|
+
|
9
|
+
var _react2 = require("@testing-library/react");
|
10
|
+
|
11
|
+
var _jestAxe = require("jest-axe");
|
12
|
+
|
13
|
+
require("babel-polyfill");
|
14
|
+
|
15
|
+
require("@testing-library/jest-dom");
|
16
|
+
|
17
|
+
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
18
|
+
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
|
+
|
21
|
+
expect.extend(_jestAxe.toHaveNoViolations);
|
22
|
+
describe('Checkbox', () => {
|
23
|
+
beforeEach(() => {
|
24
|
+
jest.resetAllMocks();
|
25
|
+
(0, _react2.cleanup)();
|
26
|
+
});
|
27
|
+
(0, _testing.behavesAsComponent)({
|
28
|
+
Component: _.Checkbox
|
29
|
+
});
|
30
|
+
(0, _testing.checkExports)('Checkbox', {
|
31
|
+
default: _.Checkbox
|
32
|
+
});
|
33
|
+
it('renders a valid checkbox input', () => {
|
34
|
+
const {
|
35
|
+
getByRole
|
36
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, null));
|
37
|
+
const checkbox = getByRole('checkbox');
|
38
|
+
expect(checkbox).toBeDefined();
|
39
|
+
});
|
40
|
+
it('renders an unchecked checkbox by default', () => {
|
41
|
+
const {
|
42
|
+
getByRole
|
43
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, null));
|
44
|
+
const checkbox = getByRole('checkbox');
|
45
|
+
expect(checkbox.checked).toEqual(false);
|
46
|
+
});
|
47
|
+
it('renders an active checkbox when checked attribute is passed', () => {
|
48
|
+
const handleChange = jest.fn();
|
49
|
+
const {
|
50
|
+
getByRole
|
51
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
52
|
+
checked: true,
|
53
|
+
onChange: handleChange
|
54
|
+
}));
|
55
|
+
const checkbox = getByRole('checkbox');
|
56
|
+
expect(checkbox.checked).toEqual(true);
|
57
|
+
});
|
58
|
+
it('accepts a change handler that can alter the checkbox state', () => {
|
59
|
+
const handleChange = jest.fn();
|
60
|
+
const {
|
61
|
+
getByRole
|
62
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
63
|
+
onChange: handleChange
|
64
|
+
}));
|
65
|
+
const checkbox = getByRole('checkbox');
|
66
|
+
expect(checkbox.checked).toEqual(false);
|
67
|
+
|
68
|
+
_userEvent.default.click(checkbox);
|
69
|
+
|
70
|
+
expect(handleChange).toHaveBeenCalled();
|
71
|
+
expect(checkbox.checked).toEqual(true);
|
72
|
+
|
73
|
+
_userEvent.default.click(checkbox);
|
74
|
+
|
75
|
+
expect(handleChange).toHaveBeenCalled();
|
76
|
+
expect(checkbox.checked).toEqual(false);
|
77
|
+
});
|
78
|
+
it('renders an indeterminate prop correctly', () => {
|
79
|
+
const handleChange = jest.fn();
|
80
|
+
const {
|
81
|
+
getByRole
|
82
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
83
|
+
indeterminate: true,
|
84
|
+
checked: true,
|
85
|
+
onChange: handleChange
|
86
|
+
}));
|
87
|
+
const checkbox = getByRole('checkbox');
|
88
|
+
expect(checkbox.indeterminate).toEqual(true);
|
89
|
+
expect(checkbox.checked).toEqual(false);
|
90
|
+
});
|
91
|
+
it('renders an inactive checkbox state correctly', () => {
|
92
|
+
const handleChange = jest.fn();
|
93
|
+
const {
|
94
|
+
getByRole,
|
95
|
+
rerender
|
96
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
97
|
+
disabled: true,
|
98
|
+
onChange: handleChange
|
99
|
+
}));
|
100
|
+
const checkbox = getByRole('checkbox');
|
101
|
+
expect(checkbox.disabled).toEqual(true);
|
102
|
+
expect(checkbox.checked).toEqual(false);
|
103
|
+
expect(checkbox).toHaveAttribute('aria-disabled', 'true');
|
104
|
+
|
105
|
+
_userEvent.default.click(checkbox);
|
106
|
+
|
107
|
+
expect(checkbox.disabled).toEqual(true);
|
108
|
+
expect(checkbox.checked).toEqual(false);
|
109
|
+
expect(checkbox).toHaveAttribute('aria-disabled', 'true'); // remove disabled attribute and retest
|
110
|
+
|
111
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
112
|
+
onChange: handleChange
|
113
|
+
}));
|
114
|
+
expect(checkbox).toHaveAttribute('aria-disabled', 'false');
|
115
|
+
});
|
116
|
+
it('renders an uncontrolled component correctly', () => {
|
117
|
+
const {
|
118
|
+
getByRole
|
119
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
120
|
+
defaultChecked: true
|
121
|
+
}));
|
122
|
+
const checkbox = getByRole('checkbox');
|
123
|
+
expect(checkbox.checked).toEqual(true);
|
124
|
+
|
125
|
+
_userEvent.default.click(checkbox);
|
126
|
+
|
127
|
+
expect(checkbox.checked).toEqual(false);
|
128
|
+
});
|
129
|
+
it('renders an aria-checked attribute correctly', () => {
|
130
|
+
const handleChange = jest.fn();
|
131
|
+
const {
|
132
|
+
getByRole,
|
133
|
+
rerender
|
134
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
135
|
+
checked: false,
|
136
|
+
onChange: handleChange
|
137
|
+
}));
|
138
|
+
const checkbox = getByRole('checkbox');
|
139
|
+
expect(checkbox).toHaveAttribute('aria-checked', 'false');
|
140
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
141
|
+
checked: true,
|
142
|
+
onChange: handleChange
|
143
|
+
}));
|
144
|
+
expect(checkbox).toHaveAttribute('aria-checked', 'true');
|
145
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
146
|
+
indeterminate: true,
|
147
|
+
checked: true,
|
148
|
+
onChange: handleChange
|
149
|
+
}));
|
150
|
+
expect(checkbox).toHaveAttribute('aria-checked', 'mixed');
|
151
|
+
});
|
152
|
+
it('renders an invalid aria state when validation prop indicates an error', () => {
|
153
|
+
const handleChange = jest.fn();
|
154
|
+
const {
|
155
|
+
getByRole,
|
156
|
+
rerender
|
157
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
158
|
+
onChange: handleChange
|
159
|
+
}));
|
160
|
+
const checkbox = getByRole('checkbox');
|
161
|
+
expect(checkbox).toHaveAttribute('aria-invalid', 'false');
|
162
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
163
|
+
onChange: handleChange,
|
164
|
+
validationStatus: "success"
|
165
|
+
}));
|
166
|
+
expect(checkbox).toHaveAttribute('aria-invalid', 'false');
|
167
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
168
|
+
onChange: handleChange,
|
169
|
+
validationStatus: "error"
|
170
|
+
}));
|
171
|
+
expect(checkbox).toHaveAttribute('aria-invalid', 'true');
|
172
|
+
});
|
173
|
+
it('renders an aria state indicating the field is required', () => {
|
174
|
+
const handleChange = jest.fn();
|
175
|
+
const {
|
176
|
+
getByRole,
|
177
|
+
rerender
|
178
|
+
} = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
179
|
+
onChange: handleChange
|
180
|
+
}));
|
181
|
+
const checkbox = getByRole('checkbox');
|
182
|
+
expect(checkbox).toHaveAttribute('aria-required', 'false');
|
183
|
+
rerender( /*#__PURE__*/_react.default.createElement(_.Checkbox, {
|
184
|
+
onChange: handleChange,
|
185
|
+
required: true
|
186
|
+
}));
|
187
|
+
expect(checkbox).toHaveAttribute('aria-required', 'true');
|
188
|
+
});
|
189
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _fs = _interopRequireDefault(require("fs"));
|
4
|
+
|
5
|
+
var _path = _interopRequireDefault(require("path"));
|
6
|
+
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8
|
+
|
9
|
+
test('snapshot theme-preval.js', () => {
|
10
|
+
// Snapshot test the build output of theme-preval.js to catch any unexpected changes
|
11
|
+
const themePrevalFile = _fs.default.readFileSync(_path.default.resolve(__dirname, '../../lib/theme-preval.js'), 'utf8');
|
12
|
+
|
13
|
+
expect(themePrevalFile).toMatchSnapshot();
|
14
|
+
});
|
package/lib/index.d.ts
CHANGED
@@ -115,4 +115,6 @@ export { default as Truncate } from './Truncate';
|
|
115
115
|
export type { TruncateProps } from './Truncate';
|
116
116
|
export { default as UnderlineNav } from './UnderlineNav';
|
117
117
|
export type { UnderlineNavProps, UnderlineNavLinkProps } from './UnderlineNav';
|
118
|
+
export { default as Checkbox } from './Checkbox';
|
119
|
+
export type { CheckboxProps } from './Checkbox';
|
118
120
|
export { SSRProvider, useSSRSafeId } from './utils/ssr';
|
package/lib/index.js
CHANGED
@@ -495,6 +495,12 @@ Object.defineProperty(exports, "UnderlineNav", {
|
|
495
495
|
return _UnderlineNav.default;
|
496
496
|
}
|
497
497
|
});
|
498
|
+
Object.defineProperty(exports, "Checkbox", {
|
499
|
+
enumerable: true,
|
500
|
+
get: function () {
|
501
|
+
return _Checkbox.default;
|
502
|
+
}
|
503
|
+
});
|
498
504
|
Object.defineProperty(exports, "SSRProvider", {
|
499
505
|
enumerable: true,
|
500
506
|
get: function () {
|
@@ -636,6 +642,8 @@ var _Truncate = _interopRequireDefault(require("./Truncate"));
|
|
636
642
|
|
637
643
|
var _UnderlineNav = _interopRequireDefault(require("./UnderlineNav"));
|
638
644
|
|
645
|
+
var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
646
|
+
|
639
647
|
var _ssr = require("./utils/ssr");
|
640
648
|
|
641
649
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -511,11 +511,17 @@ function AllCombinations() {
|
|
511
511
|
variant: "inline"
|
512
512
|
}, "inline description"), /*#__PURE__*/_react.default.createElement(ActionList.Description, {
|
513
513
|
variant: "block"
|
514
|
-
}, "Block description")), /*#__PURE__*/_react.default.createElement(ActionList.Item,
|
514
|
+
}, "Block description")), /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
515
|
+
disabled: true
|
516
|
+
}, /*#__PURE__*/_react.default.createElement(ActionList.LeadingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null)), "L + I + T", /*#__PURE__*/_react.default.createElement(ActionList.Description, {
|
515
517
|
variant: "inline"
|
516
|
-
}, "inline description"), /*#__PURE__*/_react.default.createElement(ActionList.TrailingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null))), /*#__PURE__*/_react.default.createElement(ActionList.Item,
|
518
|
+
}, "inline description"), /*#__PURE__*/_react.default.createElement(ActionList.TrailingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null))), /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
519
|
+
disabled: true
|
520
|
+
}, /*#__PURE__*/_react.default.createElement(ActionList.LeadingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null)), "L + B + T", /*#__PURE__*/_react.default.createElement(ActionList.Description, {
|
517
521
|
variant: "block"
|
518
|
-
}, "Block description"), /*#__PURE__*/_react.default.createElement(ActionList.TrailingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null))), /*#__PURE__*/_react.default.createElement(ActionList.Item,
|
522
|
+
}, "Block description"), /*#__PURE__*/_react.default.createElement(ActionList.TrailingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.StarIcon, null))), /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
523
|
+
disabled: true
|
524
|
+
}, "I + B + T", /*#__PURE__*/_react.default.createElement(ActionList.Description, {
|
519
525
|
variant: "inline"
|
520
526
|
}, "inline description"), /*#__PURE__*/_react.default.createElement(ActionList.Description, {
|
521
527
|
variant: "block"
|
@@ -707,11 +713,13 @@ function MemexGroupBy() {
|
|
707
713
|
}];
|
708
714
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h1", null, "Memex GroupBy List"), /*#__PURE__*/_react.default.createElement(ErsatzOverlay, null, /*#__PURE__*/_react.default.createElement(ActionList, null, /*#__PURE__*/_react.default.createElement(ActionList.Group, {
|
709
715
|
title: "Group by",
|
710
|
-
selectionVariant: "single"
|
716
|
+
selectionVariant: "single",
|
717
|
+
role: "listbox"
|
711
718
|
}, options.map((option, index) => /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
712
719
|
key: index,
|
713
720
|
selected: index === selectedIndex,
|
714
|
-
onSelect: () => setSelectedIndex(index)
|
721
|
+
onSelect: () => setSelectedIndex(index),
|
722
|
+
role: "option"
|
715
723
|
}, /*#__PURE__*/_react.default.createElement(ActionList.LeadingVisual, null, option.icon), option.text))), typeof selectedIndex === 'number' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ActionList.Divider, null), /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
716
724
|
onSelect: () => setSelectedIndex(null)
|
717
725
|
}, /*#__PURE__*/_react.default.createElement(ActionList.LeadingVisual, null, /*#__PURE__*/_react.default.createElement(_octiconsReact.XIcon, null)), "Clear Group by")))));
|
@@ -776,19 +784,23 @@ function MemexSortable() {
|
|
776
784
|
}, /*#__PURE__*/_react.default.createElement(ActionList, {
|
777
785
|
selectionVariant: "multiple"
|
778
786
|
}, /*#__PURE__*/_react.default.createElement(ActionList.Group, {
|
779
|
-
title: "Visible fields (can be reordered)"
|
787
|
+
title: "Visible fields (can be reordered)",
|
788
|
+
role: "listbox"
|
780
789
|
}, visibleOptions.map(option => /*#__PURE__*/_react.default.createElement(SortableItem, {
|
781
790
|
key: option.text,
|
791
|
+
role: "option",
|
782
792
|
option: option,
|
783
793
|
onSelect: () => toggle(option.text),
|
784
794
|
reorder: reorder
|
785
795
|
}))), /*#__PURE__*/_react.default.createElement(ActionList.Group, {
|
796
|
+
role: "listbox",
|
786
797
|
title: "Hidden fields",
|
787
798
|
selectionVariant:
|
788
799
|
/** selectionVariant override on Group: disable selection if there are no options */
|
789
800
|
hiddenOptions.length ? 'multiple' : false
|
790
801
|
}, hiddenOptions.map((option, index) => /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
791
802
|
key: index,
|
803
|
+
role: "option",
|
792
804
|
selected: option.selected,
|
793
805
|
onSelect: () => toggle(option.text)
|
794
806
|
}, /*#__PURE__*/_react.default.createElement(ActionList.LeadingVisual, null, option.icon), option.text)), hiddenOptions.length === 0 && /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
@@ -800,6 +812,7 @@ MemexSortable.storyName = 'Memex Sortable List';
|
|
800
812
|
|
801
813
|
const SortableItem = ({
|
802
814
|
option,
|
815
|
+
role,
|
803
816
|
onSelect,
|
804
817
|
reorder
|
805
818
|
}) => {
|
@@ -831,6 +844,7 @@ const SortableItem = ({
|
|
831
844
|
}
|
832
845
|
}));
|
833
846
|
return /*#__PURE__*/_react.default.createElement(ActionList.Item, {
|
847
|
+
role: role,
|
834
848
|
ref: element => dragRef(element) && dropRef(element) // merge refs
|
835
849
|
,
|
836
850
|
selected: option.selected,
|