@primer/components 31.0.2-rc.c7dafefb → 31.2.0-rc.2a086bac

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/.storybook/main.js +7 -9
  2. package/.storybook/preview.js +5 -1
  3. package/CHANGELOG.md +21 -1
  4. package/dist/browser.esm.js +623 -620
  5. package/dist/browser.esm.js.map +1 -1
  6. package/dist/browser.umd.js +164 -161
  7. package/dist/browser.umd.js.map +1 -1
  8. package/docs/content/ActionList2.mdx +354 -0
  9. package/docs/content/FilterList.md +2 -2
  10. package/docs/content/TextInputWithTokens.mdx +114 -0
  11. package/docs/content/theming.md +23 -0
  12. package/docs/src/@primer/gatsby-theme-doctocat/components/hero.js +1 -3
  13. package/docs/src/@primer/gatsby-theme-doctocat/components/live-preview-wrapper.js +1 -1
  14. package/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js +17 -0
  15. package/lib/ActionList/Header.js +1 -1
  16. package/lib/ActionList2/Description.d.ts +12 -0
  17. package/lib/ActionList2/Description.js +53 -0
  18. package/lib/ActionList2/Divider.d.ts +5 -0
  19. package/lib/ActionList2/Divider.js +35 -0
  20. package/lib/ActionList2/Group.d.ts +11 -0
  21. package/lib/ActionList2/Group.js +57 -0
  22. package/lib/ActionList2/Header.d.ts +26 -0
  23. package/lib/ActionList2/Header.js +55 -0
  24. package/lib/ActionList2/Item.d.ts +63 -0
  25. package/lib/ActionList2/Item.js +234 -0
  26. package/lib/ActionList2/LinkItem.d.ts +17 -0
  27. package/lib/ActionList2/LinkItem.js +57 -0
  28. package/lib/ActionList2/List.d.ts +26 -0
  29. package/lib/ActionList2/List.js +59 -0
  30. package/lib/ActionList2/Selection.d.ts +5 -0
  31. package/lib/ActionList2/Selection.js +70 -0
  32. package/lib/ActionList2/Visuals.d.ts +9 -0
  33. package/lib/ActionList2/Visuals.js +90 -0
  34. package/lib/ActionList2/index.d.ts +36 -0
  35. package/lib/ActionList2/index.js +47 -0
  36. package/lib/Autocomplete/Autocomplete.d.ts +4 -4
  37. package/lib/Autocomplete/AutocompleteInput.d.ts +4 -4
  38. package/lib/Button/Button.d.ts +5 -5
  39. package/lib/Button/ButtonBase.d.ts +1 -1
  40. package/lib/Button/ButtonClose.d.ts +3 -3
  41. package/lib/Button/ButtonDanger.d.ts +5 -5
  42. package/lib/Button/ButtonInvisible.d.ts +5 -5
  43. package/lib/Button/ButtonOutline.d.ts +5 -5
  44. package/lib/Button/ButtonPrimary.d.ts +5 -5
  45. package/lib/CircleBadge.d.ts +2 -2
  46. package/lib/CircleOcticon.d.ts +4 -4
  47. package/lib/Dialog.d.ts +4 -4
  48. package/lib/Dropdown.d.ts +16 -16
  49. package/lib/DropdownMenu/DropdownButton.d.ts +6 -6
  50. package/lib/FilterList.d.ts +3 -3
  51. package/lib/Flash.d.ts +1 -1
  52. package/lib/Label.d.ts +1 -1
  53. package/lib/Overlay.js +3 -1
  54. package/lib/Portal/Portal.js +3 -2
  55. package/lib/Position.d.ts +4 -4
  56. package/lib/ProgressBar.d.ts +1 -1
  57. package/lib/SelectMenu/SelectMenu.d.ts +24 -24
  58. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  59. package/lib/TextInputWithTokens.d.ts +8 -4
  60. package/lib/TextInputWithTokens.js +61 -8
  61. package/lib/Timeline.d.ts +4 -4
  62. package/lib/Token/AvatarToken.d.ts +1 -1
  63. package/lib/Token/IssueLabelToken.d.ts +1 -1
  64. package/lib/Token/Token.d.ts +1 -1
  65. package/lib/_TextInputWrapper.d.ts +1 -1
  66. package/lib/_TextInputWrapper.js +2 -2
  67. package/lib/__tests__/ActionList2.test.d.ts +1 -0
  68. package/lib/__tests__/ActionList2.test.js +53 -0
  69. package/lib/__tests__/AnchoredOverlay.test.js +4 -2
  70. package/lib/__tests__/KeyPaths.types.test.d.ts +11 -0
  71. package/lib/__tests__/KeyPaths.types.test.js +10 -0
  72. package/lib/__tests__/TextInputWithTokens.test.js +138 -7
  73. package/lib/__tests__/utils/createSlots.test.d.ts +1 -0
  74. package/lib/__tests__/utils/createSlots.test.js +75 -0
  75. package/lib/hooks/useAnchoredPosition.js +3 -2
  76. package/lib/hooks/useCombinedRefs.d.ts +2 -2
  77. package/lib/hooks/useCombinedRefs.js +4 -6
  78. package/lib/hooks/useResizeObserver.js +2 -2
  79. package/lib/stories/ActionList2.stories.js +875 -0
  80. package/lib/stories/TextInput.stories.js +144 -0
  81. package/lib/stories/TextInputWithTokens.stories.js +18 -1
  82. package/lib/stories/Token.stories.js +19 -2
  83. package/lib/sx.d.ts +10 -2
  84. package/lib/sx.js +8 -0
  85. package/lib/theme-preval.js +81 -2
  86. package/lib/theme.d.ts +78 -0
  87. package/lib/theme.js +3 -1
  88. package/lib/unreleased.d.ts +7 -0
  89. package/lib/unreleased.js +18 -0
  90. package/lib/utils/create-slots.d.ts +17 -0
  91. package/lib/utils/create-slots.js +105 -0
  92. package/lib/utils/testing.d.ts +14 -1
  93. package/lib/utils/types/KeyPaths.d.ts +3 -0
  94. package/lib/utils/types/KeyPaths.js +1 -0
  95. package/lib/utils/use-force-update.d.ts +1 -0
  96. package/lib/utils/use-force-update.js +19 -0
  97. package/lib/utils/useIsomorphicLayoutEffect.d.ts +3 -0
  98. package/lib/utils/useIsomorphicLayoutEffect.js +12 -0
  99. package/lib-esm/ActionList/Header.js +1 -1
  100. package/lib-esm/ActionList2/Description.d.ts +12 -0
  101. package/lib-esm/ActionList2/Description.js +37 -0
  102. package/lib-esm/ActionList2/Divider.d.ts +5 -0
  103. package/lib-esm/ActionList2/Divider.js +23 -0
  104. package/lib-esm/ActionList2/Group.d.ts +11 -0
  105. package/lib-esm/ActionList2/Group.js +40 -0
  106. package/lib-esm/ActionList2/Header.d.ts +26 -0
  107. package/lib-esm/ActionList2/Header.js +44 -0
  108. package/lib-esm/ActionList2/Item.d.ts +63 -0
  109. package/lib-esm/ActionList2/Item.js +201 -0
  110. package/lib-esm/ActionList2/LinkItem.d.ts +17 -0
  111. package/lib-esm/ActionList2/LinkItem.js +43 -0
  112. package/lib-esm/ActionList2/List.d.ts +26 -0
  113. package/lib-esm/ActionList2/List.js +37 -0
  114. package/lib-esm/ActionList2/Selection.d.ts +5 -0
  115. package/lib-esm/ActionList2/Selection.js +52 -0
  116. package/lib-esm/ActionList2/Visuals.d.ts +9 -0
  117. package/lib-esm/ActionList2/Visuals.js +68 -0
  118. package/lib-esm/ActionList2/index.d.ts +36 -0
  119. package/lib-esm/ActionList2/index.js +33 -0
  120. package/lib-esm/Autocomplete/Autocomplete.d.ts +4 -4
  121. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +4 -4
  122. package/lib-esm/Button/Button.d.ts +5 -5
  123. package/lib-esm/Button/ButtonBase.d.ts +1 -1
  124. package/lib-esm/Button/ButtonClose.d.ts +3 -3
  125. package/lib-esm/Button/ButtonDanger.d.ts +5 -5
  126. package/lib-esm/Button/ButtonInvisible.d.ts +5 -5
  127. package/lib-esm/Button/ButtonOutline.d.ts +5 -5
  128. package/lib-esm/Button/ButtonPrimary.d.ts +5 -5
  129. package/lib-esm/CircleBadge.d.ts +2 -2
  130. package/lib-esm/CircleOcticon.d.ts +4 -4
  131. package/lib-esm/Dialog.d.ts +4 -4
  132. package/lib-esm/Dropdown.d.ts +16 -16
  133. package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -6
  134. package/lib-esm/FilterList.d.ts +3 -3
  135. package/lib-esm/Flash.d.ts +1 -1
  136. package/lib-esm/Label.d.ts +1 -1
  137. package/lib-esm/Overlay.js +2 -1
  138. package/lib-esm/Portal/Portal.js +2 -1
  139. package/lib-esm/Position.d.ts +4 -4
  140. package/lib-esm/ProgressBar.d.ts +1 -1
  141. package/lib-esm/SelectMenu/SelectMenu.d.ts +24 -24
  142. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  143. package/lib-esm/TextInputWithTokens.d.ts +8 -4
  144. package/lib-esm/TextInputWithTokens.js +60 -8
  145. package/lib-esm/Timeline.d.ts +4 -4
  146. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  147. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  148. package/lib-esm/Token/Token.d.ts +1 -1
  149. package/lib-esm/_TextInputWrapper.d.ts +1 -1
  150. package/lib-esm/_TextInputWrapper.js +2 -2
  151. package/lib-esm/__tests__/ActionList2.test.d.ts +1 -0
  152. package/lib-esm/__tests__/ActionList2.test.js +41 -0
  153. package/lib-esm/__tests__/AnchoredOverlay.test.js +4 -2
  154. package/lib-esm/__tests__/KeyPaths.types.test.d.ts +11 -0
  155. package/lib-esm/__tests__/KeyPaths.types.test.js +3 -0
  156. package/lib-esm/__tests__/TextInputWithTokens.test.js +132 -8
  157. package/lib-esm/__tests__/utils/createSlots.test.d.ts +1 -0
  158. package/lib-esm/__tests__/utils/createSlots.test.js +67 -0
  159. package/lib-esm/hooks/useAnchoredPosition.js +2 -1
  160. package/lib-esm/hooks/useCombinedRefs.d.ts +2 -2
  161. package/lib-esm/hooks/useCombinedRefs.js +3 -2
  162. package/lib-esm/hooks/useResizeObserver.js +2 -2
  163. package/lib-esm/stories/ActionList2.stories.js +764 -0
  164. package/lib-esm/stories/TextInput.stories.js +117 -0
  165. package/lib-esm/stories/TextInputWithTokens.stories.js +14 -0
  166. package/lib-esm/stories/Token.stories.js +14 -1
  167. package/lib-esm/sx.d.ts +10 -2
  168. package/lib-esm/sx.js +3 -1
  169. package/lib-esm/theme-preval.js +81 -2
  170. package/lib-esm/theme.d.ts +78 -0
  171. package/lib-esm/theme.js +2 -1
  172. package/lib-esm/unreleased.d.ts +7 -0
  173. package/lib-esm/unreleased.js +8 -0
  174. package/lib-esm/utils/create-slots.d.ts +17 -0
  175. package/lib-esm/utils/create-slots.js +84 -0
  176. package/lib-esm/utils/testing.d.ts +14 -1
  177. package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
  178. package/lib-esm/utils/types/KeyPaths.js +1 -0
  179. package/lib-esm/utils/use-force-update.d.ts +1 -0
  180. package/lib-esm/utils/use-force-update.js +6 -0
  181. package/lib-esm/utils/useIsomorphicLayoutEffect.d.ts +3 -0
  182. package/lib-esm/utils/useIsomorphicLayoutEffect.js +3 -0
  183. package/migrating.md +1 -1
  184. package/package-lock.json +38098 -45
  185. package/package.json +7 -3
  186. package/script/build +2 -0
  187. package/src/ActionList/Header.tsx +1 -1
  188. package/src/ActionList2/Description.tsx +49 -0
  189. package/src/ActionList2/Divider.tsx +24 -0
  190. package/src/ActionList2/Group.tsx +34 -0
  191. package/src/ActionList2/Header.tsx +58 -0
  192. package/src/ActionList2/Item.tsx +228 -0
  193. package/src/ActionList2/LinkItem.tsx +49 -0
  194. package/src/ActionList2/List.tsx +55 -0
  195. package/src/ActionList2/Selection.tsx +40 -0
  196. package/src/ActionList2/Visuals.tsx +76 -0
  197. package/src/ActionList2/index.ts +39 -0
  198. package/src/Overlay.tsx +2 -1
  199. package/src/Portal/Portal.tsx +2 -1
  200. package/src/TextInputWithTokens.tsx +64 -8
  201. package/src/_TextInputWrapper.tsx +8 -0
  202. package/src/__tests__/ActionList2.test.tsx +47 -0
  203. package/src/__tests__/AnchoredOverlay.test.tsx +2 -2
  204. package/src/__tests__/KeyPaths.types.test.ts +14 -0
  205. package/src/__tests__/TextInputWithTokens.test.tsx +123 -1
  206. package/src/__tests__/__snapshots__/ActionList2.test.tsx.snap +14 -0
  207. package/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap +35 -135
  208. package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +7 -0
  209. package/src/__tests__/__snapshots__/TextInput.test.tsx.snap +6 -0
  210. package/src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap +463 -0
  211. package/src/__tests__/utils/__snapshots__/createSlots.test.tsx.snap +55 -0
  212. package/src/__tests__/utils/createSlots.test.tsx +74 -0
  213. package/src/hooks/useAnchoredPosition.ts +2 -1
  214. package/src/hooks/useCombinedRefs.ts +3 -3
  215. package/src/hooks/useResizeObserver.ts +2 -2
  216. package/src/stories/ActionList2.stories.tsx +1279 -0
  217. package/src/stories/Button.stories.tsx +1 -1
  218. package/src/stories/TextInput.stories.tsx +113 -0
  219. package/src/stories/TextInputWithTokens.stories.tsx +9 -0
  220. package/src/stories/Token.stories.tsx +12 -1
  221. package/src/sx.ts +17 -2
  222. package/src/theme-preval.js +1 -0
  223. package/src/theme.ts +86 -0
  224. package/src/unreleased.ts +9 -0
  225. package/src/utils/create-slots.tsx +96 -0
  226. package/src/utils/types/KeyPaths.ts +10 -0
  227. package/src/utils/use-force-update.ts +7 -0
  228. package/src/utils/useIsomorphicLayoutEffect.ts +10 -0
  229. package/stats.html +1 -1
@@ -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, "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "list" | "default" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "download" | "hrefLang" | "rel" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "as" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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" | "list" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "as" | "hrefLang" | "integrity" | "rel" | "charSet" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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, "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "list" | "default" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "download" | "hrefLang" | "rel" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "as" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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" | "list" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "as" | "hrefLang" | "integrity" | "rel" | "charSet" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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;
@@ -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, "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "list" | "default" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "sx" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "download" | "hrefLang" | "rel" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "as" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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" | "list" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "start" | "step" | "size" | "wrap" | "open" | "sx" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "href" | "classID" | "useMap" | "wmode" | "as" | "hrefLang" | "integrity" | "rel" | "charSet" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "async" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "selected" | "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;
@@ -5,6 +5,6 @@ declare const TextInputWrapper: import("styled-components").StyledComponent<"spa
5
5
  hasIcon?: boolean | undefined;
6
6
  block?: boolean | undefined;
7
7
  contrast?: boolean | undefined;
8
- variant?: "large" | "small" | undefined;
8
+ variant?: "small" | "large" | undefined;
9
9
  } & WidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>> & MinWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>> & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SxProp, never>;
10
10
  export default TextInputWrapper;
@@ -21,11 +21,11 @@ const sizeVariants = variant({
21
21
  const TextInputWrapper = styled.span.withConfig({
22
22
  displayName: "_TextInputWrapper__TextInputWrapper",
23
23
  componentId: "sc-5vfcis-0"
24
- })(["display:inline-flex;align-items:stretch;min-height:34px;font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-repeat:no-repeat;background-position:right 8px center;border:1px solid ", ";border-radius:", ";outline:none;box-shadow:", ";", " .TextInput-icon{align-self:center;color:", ";margin:0 ", ";flex-shrink:0;}&:focus-within{border-color:", ";box-shadow:", ";}", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", ";"], get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('radii.2'), get('shadows.primer.shadow.inset'), props => {
24
+ })(["display:inline-flex;align-items:stretch;min-height:34px;font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-repeat:no-repeat;background-position:right 8px center;border:1px solid ", ";border-radius:", ";outline:none;box-shadow:", ";cursor:text;", " .TextInput-icon{align-self:center;color:", ";margin:0 ", ";flex-shrink:0;}&:focus-within{border-color:", ";box-shadow:", ";}", " ", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", ";"], get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('radii.2'), get('shadows.primer.shadow.inset'), props => {
25
25
  if (props.hasIcon) {
26
26
  return css(["padding:0;"]);
27
27
  } else {
28
28
  return css(["padding:6px 12px;"]);
29
29
  }
30
- }, get('colors.fg.muted'), get('space.2'), get('colors.accent.emphasis'), get('shadows.primer.shadow.focus'), props => props.contrast && css(["background-color:", ";"], get('colors.canvas.inset')), props => props.disabled && css(["color:", ";background-color:", ";border-color:", ";"], get('colors.primer.fg.disabled'), get('colors.input.disabledBg'), get('colors.border.default')), props => props.block && css(["display:block;width:100%;"]), get('breakpoints.1'), get('fontSizes.1'), width, minWidth, maxWidth, sizeVariants, sx);
30
+ }, get('colors.fg.muted'), get('space.2'), get('colors.accent.emphasis'), get('shadows.primer.shadow.focus'), props => props.contrast && css(["background-color:", ";"], get('colors.canvas.inset')), props => props.disabled && css(["color:", ";background-color:", ";border-color:", ";"], get('colors.primer.fg.disabled'), get('colors.input.disabledBg'), get('colors.border.default')), props => props.block && css(["display:block;width:100%;"]), props => props.block && props.hasIcon && css(["display:flex;"]), get('breakpoints.1'), get('fontSizes.1'), width, minWidth, maxWidth, sizeVariants, sx);
31
31
  export default TextInputWrapper;
@@ -0,0 +1 @@
1
+ import 'babel-polyfill';
@@ -0,0 +1,41 @@
1
+ import { cleanup, render as HTMLRender } from '@testing-library/react';
2
+ import 'babel-polyfill';
3
+ import { axe, toHaveNoViolations } from 'jest-axe';
4
+ import React from 'react';
5
+ import theme from '../theme';
6
+ import { ActionList } from '../ActionList2';
7
+ import { behavesAsComponent, checkExports } from '../utils/testing';
8
+ import { BaseStyles, ThemeProvider, SSRProvider } from '..';
9
+ expect.extend(toHaveNoViolations);
10
+
11
+ function SimpleActionList() {
12
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
13
+ theme: theme
14
+ }, /*#__PURE__*/React.createElement(SSRProvider, null, /*#__PURE__*/React.createElement(BaseStyles, null, /*#__PURE__*/React.createElement(ActionList, null, /*#__PURE__*/React.createElement(ActionList.Item, null, "New file"), /*#__PURE__*/React.createElement(ActionList.Divider, null), /*#__PURE__*/React.createElement(ActionList.Item, null, "Copy link"), /*#__PURE__*/React.createElement(ActionList.Item, null, "Edit file"), /*#__PURE__*/React.createElement(ActionList.Item, {
15
+ variant: "danger"
16
+ }, "Delete file")))));
17
+ }
18
+
19
+ SimpleActionList.displayName = "SimpleActionList";
20
+ describe('ActionList', () => {
21
+ behavesAsComponent({
22
+ Component: ActionList,
23
+ options: {
24
+ skipAs: true,
25
+ skipSx: true
26
+ },
27
+ toRender: () => /*#__PURE__*/React.createElement(ActionList, null)
28
+ });
29
+ checkExports('ActionList2', {
30
+ default: undefined,
31
+ ActionList
32
+ });
33
+ it('should have no axe violations', async () => {
34
+ const {
35
+ container
36
+ } = HTMLRender( /*#__PURE__*/React.createElement(SimpleActionList, null));
37
+ const results = await axe(container);
38
+ expect(results).toHaveNoViolations();
39
+ cleanup();
40
+ });
41
+ });
@@ -126,9 +126,11 @@ describe('AnchoredOverlay', () => {
126
126
  expect(mockCloseCallback).toHaveBeenCalledWith('escape');
127
127
  });
128
128
  it('should render consistently when open', () => {
129
- const anchoredOverlay = HTMLRender( /*#__PURE__*/React.createElement(AnchoredOverlayTestComponent, {
129
+ const {
130
+ container
131
+ } = HTMLRender( /*#__PURE__*/React.createElement(AnchoredOverlayTestComponent, {
130
132
  initiallyOpen: true
131
133
  }));
132
- expect(anchoredOverlay).toMatchSnapshot();
134
+ expect(container).toMatchSnapshot();
133
135
  });
134
136
  });
@@ -0,0 +1,11 @@
1
+ import { Union } from 'ts-toolbelt';
2
+ import { KeyPaths } from '../utils/types/KeyPaths';
3
+ declare type NestedObject = {
4
+ a: string;
5
+ b: {
6
+ b1: string;
7
+ b2: string;
8
+ };
9
+ };
10
+ export declare function generatesKeyPathsFromObject(x: Union.Diff<KeyPaths<NestedObject>, 'a' | 'b.b1' | 'b.b2'>): never;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ export function generatesKeyPathsFromObject(x) {
2
+ return x;
3
+ }
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
2
2
 
3
3
  import React from 'react';
4
4
  import { render } from '../utils/testing';
5
- import { render as HTMLRender, cleanup, fireEvent } from '@testing-library/react';
5
+ import { render as HTMLRender, fireEvent, act, cleanup } from '@testing-library/react';
6
6
  import { axe, toHaveNoViolations } from 'jest-axe';
7
7
  import 'babel-polyfill';
8
8
  import { tokenSizes } from '../Token/TokenBase';
@@ -48,6 +48,7 @@ const LabelledTextInputWithTokens = ({
48
48
  id: "tokenInput"
49
49
  }, rest)));
50
50
 
51
+ jest.useFakeTimers();
51
52
  describe('TextInputWithTokens', () => {
52
53
  it('renders without tokens', () => {
53
54
  const onRemoveMock = jest.fn();
@@ -115,6 +116,14 @@ describe('TextInputWithTokens', () => {
115
116
  onTokenRemove: onRemoveMock
116
117
  }))).toMatchSnapshot();
117
118
  });
119
+ it('renders a truncated set of tokens', () => {
120
+ const onRemoveMock = jest.fn();
121
+ expect(render( /*#__PURE__*/React.createElement(TextInputWithTokens, {
122
+ tokens: mockTokens,
123
+ onTokenRemove: onRemoveMock,
124
+ visibleTokenCount: 2
125
+ }))).toMatchSnapshot();
126
+ });
118
127
  it('focuses the previous token when keying ArrowLeft', () => {
119
128
  var _document$activeEleme, _document$activeEleme2;
120
129
 
@@ -220,8 +229,123 @@ describe('TextInputWithTokens', () => {
220
229
  expect((_document$activeEleme8 = document.activeElement) === null || _document$activeEleme8 === void 0 ? void 0 : _document$activeEleme8.id).not.toEqual(lastTokenNode.id);
221
230
  expect((_document$activeEleme9 = document.activeElement) === null || _document$activeEleme9 === void 0 ? void 0 : _document$activeEleme9.id).toEqual(inputNode.id);
222
231
  });
232
+ it('does not focus the input when clicking a token', () => {
233
+ var _document$activeEleme10;
234
+
235
+ const onRemoveMock = jest.fn();
236
+ const {
237
+ getByLabelText,
238
+ getByText
239
+ } = HTMLRender( /*#__PURE__*/React.createElement(LabelledTextInputWithTokens, {
240
+ tokens: mockTokens,
241
+ onTokenRemove: onRemoveMock,
242
+ visibleTokenCount: 2
243
+ }));
244
+ const inputNode = getByLabelText('Tokens');
245
+ const tokenNode = getByText(mockTokens[0].text);
246
+ expect(document.activeElement).not.toEqual(inputNode.id);
247
+ fireEvent.click(tokenNode);
248
+ expect((_document$activeEleme10 = document.activeElement) === null || _document$activeEleme10 === void 0 ? void 0 : _document$activeEleme10.id).not.toEqual(inputNode.id);
249
+ });
250
+ it('focuses the input when clicking somewhere in the component besides the tokens', () => {
251
+ var _document$activeEleme11;
252
+
253
+ const onRemoveMock = jest.fn();
254
+ const {
255
+ getByLabelText,
256
+ getByText
257
+ } = HTMLRender( /*#__PURE__*/React.createElement(LabelledTextInputWithTokens, {
258
+ tokens: mockTokens,
259
+ onTokenRemove: onRemoveMock,
260
+ visibleTokenCount: 2
261
+ }));
262
+ const inputNode = getByLabelText('Tokens');
263
+ const truncatedTokenCount = getByText('+6');
264
+ expect(document.activeElement).not.toEqual(inputNode.id);
265
+ fireEvent.click(truncatedTokenCount);
266
+ expect((_document$activeEleme11 = document.activeElement) === null || _document$activeEleme11 === void 0 ? void 0 : _document$activeEleme11.id).toEqual(inputNode.id);
267
+ });
268
+ it('shows all tokens when the input is focused and hides them when it is blurred (when visibleTokenCount is set)', () => {
269
+ const onRemoveMock = jest.fn();
270
+ const visibleTokenCount = 2;
271
+ const {
272
+ getByLabelText,
273
+ getByText
274
+ } = HTMLRender( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelledTextInputWithTokens, {
275
+ tokens: mockTokens,
276
+ onTokenRemove: onRemoveMock,
277
+ visibleTokenCount: visibleTokenCount
278
+ }), /*#__PURE__*/React.createElement("button", {
279
+ id: "focusableOutsideComponent"
280
+ }, "Focus me")));
281
+ const inputNode = getByLabelText('Tokens');
282
+ const focusableOutsideComponentNode = getByText('Focus me');
283
+ const allTokenLabels = mockTokens.map(token => token.text);
284
+ const truncatedTokenCountNode = getByText('+6');
285
+ act(() => {
286
+ jest.runAllTimers();
287
+ fireEvent.focus(inputNode);
288
+ });
289
+ setTimeout(() => {
290
+ for (const tokenLabel of allTokenLabels) {
291
+ const tokenNode = getByText(tokenLabel);
292
+ expect(tokenNode).toBeDefined();
293
+ }
294
+ }, 0);
295
+ act(() => {
296
+ jest.runAllTimers(); // onBlur isn't called on input unless we specifically fire the "blur" event
297
+ // eslint-disable-next-line github/no-blur
298
+
299
+ fireEvent.blur(inputNode);
300
+ fireEvent.focus(focusableOutsideComponentNode);
301
+ });
302
+ setTimeout(() => {
303
+ expect(truncatedTokenCountNode).toBeDefined();
304
+
305
+ for (const tokenLabel of allTokenLabels) {
306
+ const tokenNode = getByText(tokenLabel);
307
+
308
+ if (allTokenLabels.indexOf(tokenLabel) > visibleTokenCount) {
309
+ // eslint-disable-next-line jest/no-conditional-expect
310
+ expect(tokenNode).toBeDefined();
311
+ } else {
312
+ // eslint-disable-next-line jest/no-conditional-expect
313
+ expect(tokenNode).not.toBeDefined();
314
+ }
315
+ }
316
+ }, 0);
317
+ jest.useRealTimers();
318
+ });
319
+ it('does not hide tokens when blurring the input to focus within the component (when visibleTokenCount is set)', () => {
320
+ const onRemoveMock = jest.fn();
321
+ const visibleTokenCount = 2;
322
+ const {
323
+ getByLabelText,
324
+ getByText
325
+ } = HTMLRender( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelledTextInputWithTokens, {
326
+ tokens: mockTokens,
327
+ onTokenRemove: onRemoveMock,
328
+ visibleTokenCount: visibleTokenCount
329
+ }), /*#__PURE__*/React.createElement("button", {
330
+ id: "focusableOutsideComponent"
331
+ }, "Focus me")));
332
+ const inputNode = getByLabelText('Tokens');
333
+ const firstTokenNode = getByText(mockTokens[visibleTokenCount - 1].text);
334
+ const allTokenLabels = mockTokens.map(token => token.text);
335
+ const truncatedTokenCountNode = getByText('+6');
336
+ act(() => {
337
+ fireEvent.focus(inputNode);
338
+ fireEvent.focus(firstTokenNode);
339
+ });
340
+ expect(truncatedTokenCountNode).toBeDefined();
341
+
342
+ for (const tokenLabel of allTokenLabels) {
343
+ const tokenNode = getByText(tokenLabel);
344
+ expect(tokenNode).toBeDefined();
345
+ }
346
+ });
223
347
  it('focuses the first token when keying ArrowRight in the input', () => {
224
- var _document$activeEleme10, _document$activeEleme11;
348
+ var _document$activeEleme12, _document$activeEleme13;
225
349
 
226
350
  const onRemoveMock = jest.fn();
227
351
  const {
@@ -238,8 +362,8 @@ describe('TextInputWithTokens', () => {
238
362
  fireEvent.keyDown(inputNode, {
239
363
  key: 'ArrowRight'
240
364
  });
241
- expect((_document$activeEleme10 = document.activeElement) === null || _document$activeEleme10 === void 0 ? void 0 : _document$activeEleme10.id).not.toEqual(inputNode.id);
242
- expect((_document$activeEleme11 = document.activeElement) === null || _document$activeEleme11 === void 0 ? void 0 : _document$activeEleme11.id).toEqual(firstTokenNode.id);
365
+ expect((_document$activeEleme12 = document.activeElement) === null || _document$activeEleme12 === void 0 ? void 0 : _document$activeEleme12.id).not.toEqual(inputNode.id);
366
+ expect((_document$activeEleme13 = document.activeElement) === null || _document$activeEleme13 === void 0 ? void 0 : _document$activeEleme13.id).toEqual(firstTokenNode.id);
243
367
  });
244
368
  it('calls onTokenRemove on the last token when keying Backspace in an empty input', () => {
245
369
  const onRemoveMock = jest.fn();
@@ -324,9 +448,9 @@ describe('TextInputWithTokens', () => {
324
448
  });
325
449
  jest.runAllTimers();
326
450
  setTimeout(() => {
327
- var _document$activeEleme12;
451
+ var _document$activeEleme14;
328
452
 
329
- expect((_document$activeEleme12 = document.activeElement) === null || _document$activeEleme12 === void 0 ? void 0 : _document$activeEleme12.textContent).toBe(mockTokens[1].text);
453
+ expect((_document$activeEleme14 = document.activeElement) === null || _document$activeEleme14 === void 0 ? void 0 : _document$activeEleme14.textContent).toBe(mockTokens[1].text);
330
454
  }, 0);
331
455
  jest.useRealTimers();
332
456
  });
@@ -348,9 +472,9 @@ describe('TextInputWithTokens', () => {
348
472
  });
349
473
  jest.runAllTimers();
350
474
  setTimeout(() => {
351
- var _document$activeEleme13;
475
+ var _document$activeEleme15;
352
476
 
353
- expect((_document$activeEleme13 = document.activeElement) === null || _document$activeEleme13 === void 0 ? void 0 : _document$activeEleme13.id).toBe(inputNode.id);
477
+ expect((_document$activeEleme15 = document.activeElement) === null || _document$activeEleme15 === void 0 ? void 0 : _document$activeEleme15.id).toBe(inputNode.id);
354
478
  }, 0);
355
479
  jest.useRealTimers();
356
480
  });
@@ -0,0 +1 @@
1
+ import 'babel-polyfill';
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import 'babel-polyfill';
3
+ import { render, waitFor } from '@testing-library/react';
4
+ import createSlots from '../../utils/create-slots'; // setup a component with slots
5
+
6
+ const {
7
+ Slots,
8
+ Slot
9
+ } = createSlots(['One', 'Two', 'Three']);
10
+
11
+ const ComponentWithSlots = ({
12
+ salutation,
13
+ children
14
+ }) => {
15
+ return /*#__PURE__*/React.createElement(Slots, {
16
+ context: {
17
+ salutation
18
+ }
19
+ }, slots => /*#__PURE__*/React.createElement("div", null, slots.One, /*#__PURE__*/React.createElement("span", null, children, " ", slots.Two, " ", slots.Three)));
20
+ };
21
+
22
+ ComponentWithSlots.displayName = "ComponentWithSlots";
23
+
24
+ const SlotItem1 = ({
25
+ children
26
+ }) => /*#__PURE__*/React.createElement(Slot, {
27
+ name: "One"
28
+ }, children);
29
+
30
+ SlotItem1.displayName = "SlotItem1";
31
+
32
+ const SlotItem2 = ({
33
+ children
34
+ }) => /*#__PURE__*/React.createElement(Slot, {
35
+ name: "Two"
36
+ }, children);
37
+
38
+ SlotItem2.displayName = "SlotItem2";
39
+
40
+ const SlotItem3 = ({
41
+ children
42
+ }) => /*#__PURE__*/React.createElement(Slot, {
43
+ name: "Three"
44
+ }, context => /*#__PURE__*/React.createElement(React.Fragment, null, context.salutation, " ", children));
45
+
46
+ SlotItem3.displayName = "SlotItem3";
47
+ describe('ComponentWithSlots', () => {
48
+ it('renders all slots', async () => {
49
+ const component = render( /*#__PURE__*/React.createElement(ComponentWithSlots, null, /*#__PURE__*/React.createElement(SlotItem1, null, "first"), /*#__PURE__*/React.createElement(SlotItem2, null, "second"), "free form"));
50
+ await waitFor(() => component.getByText('first'));
51
+ expect(component.container).toMatchSnapshot();
52
+ });
53
+ it('renders without any slots', async () => {
54
+ const component = render( /*#__PURE__*/React.createElement(ComponentWithSlots, null, "free form"));
55
+ expect(component.container).toMatchSnapshot();
56
+ });
57
+ it('renders with just one slot', async () => {
58
+ const component = render( /*#__PURE__*/React.createElement(ComponentWithSlots, null, /*#__PURE__*/React.createElement(SlotItem1, null, "first"), "free form"));
59
+ expect(component.container).toMatchSnapshot();
60
+ });
61
+ it('renders with context passed to children', async () => {
62
+ const component = render( /*#__PURE__*/React.createElement(ComponentWithSlots, {
63
+ salutation: "hi"
64
+ }, /*#__PURE__*/React.createElement(SlotItem3, null, "third"), "free form"));
65
+ expect(component.container).toMatchSnapshot();
66
+ });
67
+ });
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { getAnchoredPosition } from '../behaviors/anchoredPosition';
3
3
  import { useProvidedRefOrCreate } from './useProvidedRefOrCreate';
4
4
  import { useResizeObserver } from './useResizeObserver';
5
+ import useLayoutEffect from '../utils/useIsomorphicLayoutEffect';
5
6
 
6
7
  /**
7
8
  * Calculates the top and left values for an absolutely-positioned floating element
@@ -24,7 +25,7 @@ export function useAnchoredPosition(settings, dependencies = []) {
24
25
  }
25
26
  }, // eslint-disable-next-line react-hooks/exhaustive-deps
26
27
  [floatingElementRef, anchorElementRef, ...dependencies]);
27
- React.useLayoutEffect(updatePosition, [updatePosition]);
28
+ useLayoutEffect(updatePosition, [updatePosition]);
28
29
  useResizeObserver(updatePosition);
29
30
  return {
30
31
  floatingElementRef,
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef } from 'react';
1
+ import { ForwardedRef } from 'react';
2
2
  /**
3
3
  * Creates a ref by combining multiple constituent refs. The ref returned by this hook
4
4
  * should be passed as the ref for the element that needs to be shared. This is
@@ -7,4 +7,4 @@ import React, { ForwardedRef } from 'react';
7
7
  * though, as it breaks encapsulation.
8
8
  * @param refs
9
9
  */
10
- export declare function useCombinedRefs<T>(...refs: (ForwardedRef<T> | null | undefined)[]): React.MutableRefObject<T | null>;
10
+ export declare function useCombinedRefs<T>(...refs: (ForwardedRef<T> | null | undefined)[]): import("react").MutableRefObject<T | null>;
@@ -1,4 +1,5 @@
1
- import React, { useRef } from 'react';
1
+ import { useRef } from 'react';
2
+ import useLayoutEffect from '../utils/useIsomorphicLayoutEffect';
2
3
  /**
3
4
  * Creates a ref by combining multiple constituent refs. The ref returned by this hook
4
5
  * should be passed as the ref for the element that needs to be shared. This is
@@ -10,7 +11,7 @@ import React, { useRef } from 'react';
10
11
 
11
12
  export function useCombinedRefs(...refs) {
12
13
  const combinedRef = useRef(null);
13
- React.useLayoutEffect(() => {
14
+ useLayoutEffect(() => {
14
15
  function setRefs(current = null) {
15
16
  for (const ref of refs) {
16
17
  if (!ref) {
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import useLayoutEffect from '../utils/useIsomorphicLayoutEffect';
2
2
  export function useResizeObserver(callback) {
3
- React.useLayoutEffect(() => {
3
+ useLayoutEffect(() => {
4
4
  const observer = new window.ResizeObserver(() => callback());
5
5
  observer.observe(document.documentElement);
6
6
  return () => {