@primer/components 33.0.0-rc.b495ba4a → 33.1.0-rc.6856bcf5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. package/.devcontainer/devcontainer.json +1 -1
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/release.yml +6 -27
  4. package/.github/workflows/release_canary.yml +4 -60
  5. package/.github/workflows/release_candidate.yml +5 -51
  6. package/.github/workflows/statuses.yml +32 -0
  7. package/.gitignore +1 -0
  8. package/.nvmrc +1 -1
  9. package/CHANGELOG.md +20 -0
  10. package/contributor-docs/CONTRIBUTING.md +14 -61
  11. package/dist/browser.esm.js +2 -2209
  12. package/dist/browser.esm.js.map +1 -1
  13. package/dist/browser.umd.js +2 -2209
  14. package/dist/browser.umd.js.map +1 -1
  15. package/docs/content/AnchoredOverlay.mdx +121 -1
  16. package/docs/content/Avatar.mdx +29 -14
  17. package/docs/content/AvatarPair.mdx +47 -0
  18. package/docs/content/AvatarStack.mdx +14 -6
  19. package/docs/content/Box.mdx +13 -11
  20. package/docs/content/BranchName.mdx +52 -0
  21. package/docs/content/{Breadcrumbs.md → Breadcrumbs.mdx} +21 -13
  22. package/docs/content/Link.mdx +75 -0
  23. package/docs/content/Radio.md +90 -0
  24. package/docs/content/TextInput.mdx +125 -0
  25. package/docs/content/drafts/ActionList2.mdx +484 -0
  26. package/docs/content/drafts/ActionMenu2.mdx +302 -0
  27. package/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js +9 -1
  28. package/docs/src/@primer/gatsby-theme-doctocat/mdx-components.js +15 -2
  29. package/docs/src/@primer/gatsby-theme-doctocat/nav.yml +4 -0
  30. package/docs/src/component-checklist.js +10 -2
  31. package/docs/src/props-table.js +165 -0
  32. package/docs/src/props.js +14 -28
  33. package/lib/ActionList/Header.js +1 -1
  34. package/lib/ActionList/Item.js +10 -10
  35. package/lib/ActionList/List.js +1 -1
  36. package/lib/ActionList2/ActionListContainerContext.d.ts +10 -0
  37. package/lib/ActionList2/ActionListContainerContext.js +15 -0
  38. package/lib/ActionList2/Divider.d.ts +3 -2
  39. package/lib/ActionList2/Divider.js +10 -5
  40. package/lib/ActionList2/Item.js +22 -8
  41. package/lib/ActionList2/List.js +12 -2
  42. package/lib/ActionList2/Selection.js +11 -0
  43. package/lib/ActionList2/index.d.ts +1 -2
  44. package/lib/ActionMenu2.d.ts +317 -0
  45. package/lib/ActionMenu2.js +125 -0
  46. package/lib/Autocomplete/Autocomplete.d.ts +2 -1
  47. package/lib/Autocomplete/AutocompleteInput.d.ts +2 -1
  48. package/lib/BaseStyles.js +2 -20
  49. package/lib/BorderBox.js +1 -1
  50. package/lib/Box.js +1 -1
  51. package/lib/BranchName.js +1 -1
  52. package/lib/Breadcrumbs.js +3 -3
  53. package/lib/Button/Button.d.ts +2 -2
  54. package/lib/Button/Button.js +1 -1
  55. package/lib/Button/ButtonClose.d.ts +2 -2
  56. package/lib/Button/ButtonDanger.d.ts +2 -2
  57. package/lib/Button/ButtonGroup.js +1 -1
  58. package/lib/Button/ButtonInvisible.d.ts +2 -2
  59. package/lib/Button/ButtonOutline.d.ts +2 -2
  60. package/lib/Button/ButtonPrimary.d.ts +2 -2
  61. package/lib/Checkbox.d.ts +1 -1
  62. package/lib/Checkbox.js +1 -1
  63. package/lib/CircleOcticon.d.ts +35 -35
  64. package/lib/Details.js +1 -1
  65. package/lib/Dialog.d.ts +37 -37
  66. package/lib/Dropdown.d.ts +6 -6
  67. package/lib/DropdownMenu/DropdownButton.d.ts +6 -3
  68. package/lib/FilterList.d.ts +1 -1
  69. package/lib/FilteredActionList/FilteredActionList.js +1 -1
  70. package/lib/Flex.js +1 -1
  71. package/lib/LabelGroup.js +1 -1
  72. package/lib/Overlay.js +1 -1
  73. package/lib/Pagination/Pagination.js +2 -2
  74. package/lib/Position.d.ts +4 -4
  75. package/lib/Position.js +1 -1
  76. package/lib/Radio.d.ts +38 -0
  77. package/lib/Radio.js +55 -0
  78. package/lib/SelectMenu/SelectMenu.d.ts +11 -10
  79. package/lib/SelectMenu/SelectMenu.js +1 -1
  80. package/lib/SelectMenu/SelectMenuFilter.js +1 -1
  81. package/lib/SelectMenu/SelectMenuFooter.js +1 -1
  82. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  83. package/lib/SelectMenu/SelectMenuItem.js +1 -1
  84. package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
  85. package/lib/SelectMenu/SelectMenuTab.js +1 -1
  86. package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
  87. package/lib/SelectMenu/SelectMenuTabs.js +1 -1
  88. package/lib/StateLabel.js +1 -1
  89. package/lib/StyledOcticon.js +1 -1
  90. package/lib/SubNav.js +3 -3
  91. package/lib/TextInputWithTokens.d.ts +2 -1
  92. package/lib/ThemeProvider.d.ts +1 -0
  93. package/lib/ThemeProvider.js +17 -4
  94. package/lib/Timeline.js +4 -4
  95. package/lib/Token/AvatarToken.d.ts +1 -1
  96. package/lib/Token/AvatarToken.js +1 -1
  97. package/lib/Token/IssueLabelToken.d.ts +1 -1
  98. package/lib/Token/Token.d.ts +1 -1
  99. package/lib/Token/TokenBase.js +1 -1
  100. package/lib/Tooltip.js +1 -1
  101. package/lib/UnderlineNav.js +2 -2
  102. package/lib/__tests__/Radio.test.d.ts +2 -0
  103. package/lib/__tests__/Radio.test.js +202 -0
  104. package/lib/__tests__/ThemeProvider.test.js +114 -0
  105. package/lib/drafts.d.ts +1 -0
  106. package/lib/drafts.js +13 -0
  107. package/lib/hooks/index.d.ts +1 -0
  108. package/lib/hooks/index.js +9 -1
  109. package/lib/index.d.ts +2 -0
  110. package/lib/index.js +8 -0
  111. package/lib/stories/ActionList.stories.js +3 -3
  112. package/lib/stories/ActionList2.stories.js +1 -1
  113. package/lib/stories/ActionMenu2.stories.js +455 -0
  114. package/lib/stories/Checkbox.stories.js +4 -4
  115. package/lib/stories/Radio.stories.js +146 -0
  116. package/lib/stories/ThemeProvider.stories.js +1 -5
  117. package/lib/stories/useFocusTrap.stories.js +1 -11
  118. package/lib/stories/useFocusZone.stories.js +2 -6
  119. package/lib-esm/ActionList/Header.js +1 -1
  120. package/lib-esm/ActionList/Item.js +10 -10
  121. package/lib-esm/ActionList/List.js +1 -1
  122. package/lib-esm/ActionList2/ActionListContainerContext.d.ts +10 -0
  123. package/lib-esm/ActionList2/ActionListContainerContext.js +3 -0
  124. package/lib-esm/ActionList2/Divider.d.ts +3 -2
  125. package/lib-esm/ActionList2/Divider.js +8 -5
  126. package/lib-esm/ActionList2/Item.js +20 -8
  127. package/lib-esm/ActionList2/List.js +10 -2
  128. package/lib-esm/ActionList2/Selection.js +9 -0
  129. package/lib-esm/ActionList2/index.d.ts +1 -2
  130. package/lib-esm/ActionMenu2.d.ts +317 -0
  131. package/lib-esm/ActionMenu2.js +100 -0
  132. package/lib-esm/Autocomplete/Autocomplete.d.ts +2 -1
  133. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +2 -1
  134. package/lib-esm/BaseStyles.js +2 -20
  135. package/lib-esm/BorderBox.js +1 -1
  136. package/lib-esm/Box.js +1 -1
  137. package/lib-esm/BranchName.js +1 -1
  138. package/lib-esm/Breadcrumbs.js +3 -3
  139. package/lib-esm/Button/Button.d.ts +2 -2
  140. package/lib-esm/Button/Button.js +1 -1
  141. package/lib-esm/Button/ButtonClose.d.ts +2 -2
  142. package/lib-esm/Button/ButtonDanger.d.ts +2 -2
  143. package/lib-esm/Button/ButtonGroup.js +1 -1
  144. package/lib-esm/Button/ButtonInvisible.d.ts +2 -2
  145. package/lib-esm/Button/ButtonOutline.d.ts +2 -2
  146. package/lib-esm/Button/ButtonPrimary.d.ts +2 -2
  147. package/lib-esm/Checkbox.d.ts +1 -1
  148. package/lib-esm/Checkbox.js +1 -1
  149. package/lib-esm/CircleOcticon.d.ts +35 -35
  150. package/lib-esm/Details.js +1 -1
  151. package/lib-esm/Dialog.d.ts +37 -37
  152. package/lib-esm/Dropdown.d.ts +6 -6
  153. package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -3
  154. package/lib-esm/FilterList.d.ts +1 -1
  155. package/lib-esm/FilteredActionList/FilteredActionList.js +1 -1
  156. package/lib-esm/Flex.js +1 -1
  157. package/lib-esm/LabelGroup.js +1 -1
  158. package/lib-esm/Overlay.js +1 -1
  159. package/lib-esm/Pagination/Pagination.js +2 -2
  160. package/lib-esm/Position.d.ts +4 -4
  161. package/lib-esm/Position.js +1 -1
  162. package/lib-esm/Radio.d.ts +38 -0
  163. package/lib-esm/Radio.js +40 -0
  164. package/lib-esm/SelectMenu/SelectMenu.d.ts +11 -10
  165. package/lib-esm/SelectMenu/SelectMenu.js +1 -1
  166. package/lib-esm/SelectMenu/SelectMenuFilter.js +1 -1
  167. package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
  168. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  169. package/lib-esm/SelectMenu/SelectMenuItem.js +1 -1
  170. package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
  171. package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
  172. package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
  173. package/lib-esm/SelectMenu/SelectMenuTabs.js +1 -1
  174. package/lib-esm/StateLabel.js +1 -1
  175. package/lib-esm/StyledOcticon.js +1 -1
  176. package/lib-esm/SubNav.js +3 -3
  177. package/lib-esm/TextInputWithTokens.d.ts +2 -1
  178. package/lib-esm/ThemeProvider.d.ts +1 -0
  179. package/lib-esm/ThemeProvider.js +17 -4
  180. package/lib-esm/Timeline.js +4 -4
  181. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  182. package/lib-esm/Token/AvatarToken.js +1 -1
  183. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  184. package/lib-esm/Token/Token.d.ts +1 -1
  185. package/lib-esm/Token/TokenBase.js +1 -1
  186. package/lib-esm/Tooltip.js +1 -1
  187. package/lib-esm/UnderlineNav.js +2 -2
  188. package/lib-esm/__tests__/Radio.test.d.ts +2 -0
  189. package/lib-esm/__tests__/Radio.test.js +183 -0
  190. package/lib-esm/__tests__/ThemeProvider.test.js +114 -0
  191. package/lib-esm/drafts.d.ts +1 -0
  192. package/lib-esm/drafts.js +2 -1
  193. package/lib-esm/hooks/index.d.ts +1 -0
  194. package/lib-esm/hooks/index.js +2 -1
  195. package/lib-esm/index.d.ts +2 -0
  196. package/lib-esm/index.js +1 -0
  197. package/lib-esm/stories/ActionList.stories.js +3 -3
  198. package/lib-esm/stories/ActionList2.stories.js +1 -1
  199. package/lib-esm/stories/ActionMenu2.stories.js +393 -0
  200. package/lib-esm/stories/Checkbox.stories.js +5 -5
  201. package/lib-esm/stories/Radio.stories.js +121 -0
  202. package/lib-esm/stories/ThemeProvider.stories.js +1 -5
  203. package/lib-esm/stories/useFocusTrap.stories.js +1 -11
  204. package/lib-esm/stories/useFocusZone.stories.js +2 -6
  205. package/package-lock.json +1366 -3544
  206. package/package.json +14 -8
  207. package/script/component-status-project/build.ts +100 -0
  208. package/script/component-status-project/deploy.rb +142 -0
  209. package/src/ActionList2/ActionListContainerContext.tsx +14 -0
  210. package/src/ActionList2/Divider.tsx +13 -8
  211. package/src/ActionList2/Item.tsx +14 -6
  212. package/src/ActionList2/List.tsx +6 -2
  213. package/src/ActionList2/Selection.tsx +9 -0
  214. package/src/ActionMenu2.tsx +116 -0
  215. package/src/BranchName.tsx +2 -1
  216. package/src/Radio.tsx +76 -0
  217. package/src/ThemeProvider.tsx +22 -5
  218. package/src/__tests__/Radio.test.tsx +174 -0
  219. package/src/__tests__/ThemeProvider.test.tsx +116 -0
  220. package/src/__tests__/__snapshots__/BranchName.test.tsx.snap +3 -1
  221. package/src/__tests__/__snapshots__/Radio.test.tsx.snap +16 -0
  222. package/src/drafts.ts +1 -0
  223. package/src/hooks/index.ts +1 -0
  224. package/src/index.ts +2 -0
  225. package/src/stories/ActionMenu2.stories.tsx +605 -0
  226. package/src/stories/Checkbox.stories.tsx +1 -3
  227. package/src/stories/Radio.stories.tsx +126 -0
  228. package/stats.html +1 -1
  229. package/tsconfig.build.json +1 -1
  230. package/tsconfig.json +1 -1
  231. package/docs/content/ActionList2.mdx +0 -379
  232. package/docs/content/BranchName.md +0 -39
  233. package/docs/content/Link.md +0 -29
  234. package/docs/content/TextInput.md +0 -42
@@ -36,14 +36,10 @@ var _default = {
36
36
  // this Storybook story, but they're not recommended for a real site!
37
37
 
38
38
  exports.default = _default;
39
- const HelperGlobalStyling = (0, _styledComponents.createGlobalStyle)`
40
- *:focus {
41
- outline: 2px solid ${(0, _themeGet.themeGet)('colors.border.info')} !important;
42
- }
43
- `;
39
+ const HelperGlobalStyling = (0, _styledComponents.createGlobalStyle)(["*:focus{outline:2px solid ", " !important;}"], (0, _themeGet.themeGet)('colors.border.info'));
44
40
  const MarginButton = (0, _styledComponents.default)(_.Button).withConfig({
45
41
  displayName: "useFocusZonestories__MarginButton",
46
- componentId: "e94kdz-0"
42
+ componentId: "sc-e94kdz-0"
47
43
  })(["margin:", ";"], (0, _themeGet.themeGet)('space.1'));
48
44
 
49
45
  const BasicFocusZone = () => {
@@ -10,7 +10,7 @@ import sx from '../sx';
10
10
 
11
11
  export const StyledHeader = styled.div.withConfig({
12
12
  displayName: "Header__StyledHeader",
13
- componentId: "qmofje-0"
13
+ componentId: "sc-qmofje-0"
14
14
  })(["{}padding:6px ", ";font-size:", ";font-weight:", ";color:", ";", " ", ""], get('space.3'), get('fontSizes.0'), get('fontWeights.bold'), get('colors.fg.muted'), ({
15
15
  variant
16
16
  }) => variant === 'filled' && css(["background:", ";margin:", " 0;border-top:1px solid ", ";border-bottom:1px solid ", ";&:first-child{margin-top:0;}"], get('colors.canvas.subtle'), get('space.2'), get('colors.neutral.muted'), get('colors.neutral.muted')), sx);
@@ -48,15 +48,15 @@ const getItemVariant = (variant = 'default', disabled) => {
48
48
 
49
49
  const DividedContent = styled.div.withConfig({
50
50
  displayName: "Item__DividedContent",
51
- componentId: "jqpvy8-0"
51
+ componentId: "sc-jqpvy8-0"
52
52
  })(["display:flex;min-width:0;position:relative;flex-grow:1;"]);
53
53
  const MainContent = styled.div.withConfig({
54
54
  displayName: "Item__MainContent",
55
- componentId: "jqpvy8-1"
55
+ componentId: "sc-jqpvy8-1"
56
56
  })(["align-items:baseline;display:flex;min-width:0;flex-direction:var(--main-content-flex-direction);flex-grow:1;"]);
57
57
  const StyledItem = styled.div.withConfig({
58
58
  displayName: "Item__StyledItem",
59
- componentId: "jqpvy8-2"
59
+ componentId: "sc-jqpvy8-2"
60
60
  })(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear;text-decoration:none;@media (hover:hover) and (pointer:fine){:hover{background:var( --item-hover-bg-override,", " );color:", ";cursor:", ";}}:not(:first-of-type):not(", " + &):not(", " + &){margin-top:", ";", "::before{content:' ';display:block;position:absolute;width:100%;top:-7px;border:0 solid ", ";border-top-width:", ";}}&:hover ", "::before,:hover + * ", "::before{border-color:var(--item-hover-divider-border-color-override,transparent) !important;}&:focus ", "::before,:focus + * ", "::before,&[", "] ", "::before,[", "] + & ", "::before{border-color:transparent !important;}&[", "='", "']{background:", ";}&[", "='", "']{background:", ";}&:focus{background:", ";outline:none;}&:active{background:", ";}", ""], get('space.2'), get('radii.2'), ({
61
61
  variant,
62
62
  item
@@ -88,37 +88,37 @@ const StyledItem = styled.div.withConfig({
88
88
  }) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).focusBg, sx);
89
89
  export const TextContainer = styled.span.withConfig({
90
90
  displayName: "Item__TextContainer",
91
- componentId: "jqpvy8-3"
91
+ componentId: "sc-jqpvy8-3"
92
92
  })([""]);
93
93
  const BaseVisualContainer = styled.div.withConfig({
94
94
  displayName: "Item__BaseVisualContainer",
95
- componentId: "jqpvy8-4"
95
+ componentId: "sc-jqpvy8-4"
96
96
  })(["height:20px;width:", ";margin-right:", ";display:flex;justify-content:center;align-items:center;flex-shrink:0;"], get('space.3'), get('space.2'));
97
97
  const ColoredVisualContainer = styled(BaseVisualContainer).withConfig({
98
98
  displayName: "Item__ColoredVisualContainer",
99
- componentId: "jqpvy8-5"
99
+ componentId: "sc-jqpvy8-5"
100
100
  })(["svg{fill:", ";font-size:", ";}"], ({
101
101
  variant,
102
102
  disabled
103
103
  }) => getItemVariant(variant, disabled).iconColor, get('fontSizes.0'));
104
104
  const LeadingVisualContainer = styled(ColoredVisualContainer).withConfig({
105
105
  displayName: "Item__LeadingVisualContainer",
106
- componentId: "jqpvy8-6"
106
+ componentId: "sc-jqpvy8-6"
107
107
  })(["display:flex;flex-direction:column;justify-content:center;"]);
108
108
  const TrailingContent = styled(ColoredVisualContainer).withConfig({
109
109
  displayName: "Item__TrailingContent",
110
- componentId: "jqpvy8-7"
110
+ componentId: "sc-jqpvy8-7"
111
111
  })(["color:", "};margin-left:", ";margin-right:0;width:auto;div:nth-child(2){margin-left:", ";}"], ({
112
112
  variant,
113
113
  disabled
114
114
  }) => getItemVariant(variant, disabled).annotationColor, get('space.2'), get('space.2'));
115
115
  const DescriptionContainer = styled.span.withConfig({
116
116
  displayName: "Item__DescriptionContainer",
117
- componentId: "jqpvy8-8"
117
+ componentId: "sc-jqpvy8-8"
118
118
  })(["color:", ";font-size:", ";line-height:16px;margin-left:var(--description-container-margin-left);min-width:0;flex-grow:1;flex-basis:var(--description-container-flex-basis);"], get('colors.fg.muted'), get('fontSizes.0'));
119
119
  const MultiSelectIcon = styled.svg.withConfig({
120
120
  displayName: "Item__MultiSelectIcon",
121
- componentId: "jqpvy8-9"
121
+ componentId: "sc-jqpvy8-9"
122
122
  })(["rect{fill:", ";stroke:", ";shape-rendering:auto;}path{fill:", ";boxshadow:", ";opacity:", ";}"], ({
123
123
  selected
124
124
  }) => selected ? get('colors.accent.fg') : get('colors.canvas.default'), ({
@@ -22,7 +22,7 @@ function isGroupedListProps(props) {
22
22
 
23
23
  const StyledList = styled.div.withConfig({
24
24
  displayName: "List__StyledList",
25
- componentId: "yr2k7d-0"
25
+ componentId: "sc-yr2k7d-0"
26
26
  })(["font-size:", ";line-height:20px;&[", "],&:focus-within{--item-hover-bg-override:none;--item-hover-divider-border-color-override:", ";}"], get('fontSizes.1'), hasActiveDescendantAttribute, get('colors.border.muted'));
27
27
  /**
28
28
  * Returns `sx` prop values for `List` children matching the given `List` style variation.
@@ -0,0 +1,10 @@
1
+ /** This context can be used by components that compose ActionList inside a Menu */
2
+ import React from 'react';
3
+ declare type ContextProps = {
4
+ container?: string;
5
+ listRole?: string;
6
+ itemRole?: string;
7
+ afterSelect?: Function;
8
+ };
9
+ export declare const ActionListContainerContext: React.Context<ContextProps>;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ /** This context can be used by components that compose ActionList inside a Menu */
2
+ import React from 'react';
3
+ export const ActionListContainerContext = /*#__PURE__*/React.createContext({});
@@ -1,5 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
+ import { SxProp } from '../sx';
2
3
  /**
3
4
  * Visually separates `Item`s or `Group`s in an `ActionList`.
4
5
  */
5
- export declare function Divider(): JSX.Element;
6
+ export declare const Divider: React.FC<SxProp>;
@@ -1,23 +1,26 @@
1
1
  import React from 'react';
2
2
  import Box from '../Box';
3
3
  import { get } from '../constants';
4
-
4
+ import { merge } from '../sx';
5
5
  /**
6
6
  * Visually separates `Item`s or `Group`s in an `ActionList`.
7
7
  */
8
- export function Divider() {
8
+
9
+ export const Divider = ({
10
+ sx = {}
11
+ }) => {
9
12
  return /*#__PURE__*/React.createElement(Box, {
10
13
  as: "li",
11
14
  role: "separator",
12
- sx: {
15
+ sx: merge({
13
16
  height: 1,
14
17
  backgroundColor: 'actionListItem.inlineDivider',
15
18
  marginTop: theme => `calc(${get('space.2')(theme)} - 1px)`,
16
19
  marginBottom: 2,
17
20
  listStyle: 'none' // hide the ::marker inserted by browser's stylesheet
18
21
 
19
- },
22
+ }, sx),
20
23
  "data-component": "ActionList.Divider"
21
24
  });
22
- }
25
+ };
23
26
  Divider.displayName = "Divider";
@@ -8,6 +8,7 @@ import Box from '../Box';
8
8
  import sx, { merge } from '../sx';
9
9
  import createSlots from '../utils/create-slots';
10
10
  import { ListContext } from './List';
11
+ import { ActionListContainerContext } from './ActionListContainerContext';
11
12
  import { Selection } from './Selection';
12
13
  export const getVariantStyles = (variant, disabled) => {
13
14
  if (disabled) {
@@ -43,7 +44,7 @@ const {
43
44
  export { Slot };
44
45
  const LiBox = styled.li.withConfig({
45
46
  displayName: "Item__LiBox",
46
- componentId: "c3scat-0"
47
+ componentId: "sc-c3scat-0"
47
48
  })(sx);
48
49
  export const TEXT_ROW_HEIGHT = '20px'; // custom value off the scale
49
50
 
@@ -54,6 +55,7 @@ export const Item = /*#__PURE__*/React.forwardRef(({
54
55
  onSelect,
55
56
  sx: sxProp = {},
56
57
  id,
58
+ role,
57
59
  _PrivateItemWrapper,
58
60
  ...props
59
61
  }, forwardedRef) => {
@@ -61,6 +63,10 @@ export const Item = /*#__PURE__*/React.forwardRef(({
61
63
  variant: listVariant,
62
64
  showDividers
63
65
  } = React.useContext(ListContext);
66
+ const {
67
+ itemRole,
68
+ afterSelect
69
+ } = React.useContext(ActionListContainerContext);
64
70
  const {
65
71
  theme
66
72
  } = useTheme();
@@ -133,18 +139,23 @@ export const Item = /*#__PURE__*/React.forwardRef(({
133
139
  }
134
140
  };
135
141
  const clickHandler = React.useCallback(event => {
136
- if (typeof onSelect !== 'function') return;
137
142
  if (disabled) return;
138
- if (!event.defaultPrevented) onSelect(event);
139
- }, [onSelect, disabled]);
143
+
144
+ if (!event.defaultPrevented) {
145
+ if (typeof onSelect === 'function') onSelect(event); // if this Item is inside a Menu, close the Menu
146
+
147
+ if (typeof afterSelect === 'function') afterSelect();
148
+ }
149
+ }, [onSelect, disabled, afterSelect]);
140
150
  const keyPressHandler = React.useCallback(event => {
141
- if (typeof onSelect !== 'function') return;
142
151
  if (disabled) return;
143
152
 
144
153
  if (!event.defaultPrevented && [' ', 'Enter'].includes(event.key)) {
145
- onSelect(event);
154
+ if (typeof onSelect === 'function') onSelect(event); // if this Item is inside a Menu, close the Menu
155
+
156
+ if (typeof afterSelect === 'function') afterSelect();
146
157
  }
147
- }, [onSelect, disabled]); // use props.id if provided, otherwise generate one.
158
+ }, [onSelect, disabled, afterSelect]); // use props.id if provided, otherwise generate one.
148
159
 
149
160
  const labelId = useSSRSafeId(id);
150
161
  const inlineDescriptionId = useSSRSafeId(id && `${id}--inline-description`);
@@ -166,7 +177,8 @@ export const Item = /*#__PURE__*/React.forwardRef(({
166
177
  "aria-disabled": disabled ? true : undefined,
167
178
  tabIndex: disabled || _PrivateItemWrapper ? undefined : 0,
168
179
  "aria-labelledby": `${labelId} ${slots.InlineDescription ? inlineDescriptionId : ''}`,
169
- "aria-describedby": slots.BlockDescription ? blockDescriptionId : undefined
180
+ "aria-describedby": slots.BlockDescription ? blockDescriptionId : undefined,
181
+ role: role || itemRole
170
182
  }, props), /*#__PURE__*/React.createElement(ItemWrapper, null, /*#__PURE__*/React.createElement(Selection, {
171
183
  selected: selected
172
184
  }), slots.LeadingVisual, /*#__PURE__*/React.createElement(Box, {
@@ -3,15 +3,17 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import React from 'react';
4
4
  import styled from 'styled-components';
5
5
  import sx, { merge } from '../sx';
6
+ import { ActionListContainerContext } from './ActionListContainerContext';
6
7
  export const ListContext = /*#__PURE__*/React.createContext({});
7
8
  const ListBox = styled.ul.withConfig({
8
9
  displayName: "List__ListBox",
9
- componentId: "cvbq60-0"
10
+ componentId: "sc-cvbq60-0"
10
11
  })(sx);
11
12
  export const List = /*#__PURE__*/React.forwardRef(({
12
13
  variant = 'inset',
13
14
  selectionVariant,
14
15
  showDividers = false,
16
+ role,
15
17
  sx: sxProp = {},
16
18
  ...props
17
19
  }, forwardedRef) => {
@@ -21,8 +23,14 @@ export const List = /*#__PURE__*/React.forwardRef(({
21
23
  // reset ul styles
22
24
  paddingY: variant === 'inset' ? 2 : 0
23
25
  };
26
+ /** if list is inside a Menu, it will get a role from the Menu */
27
+
28
+ const {
29
+ listRole
30
+ } = React.useContext(ActionListContainerContext);
24
31
  return /*#__PURE__*/React.createElement(ListBox, _extends({
25
- sx: merge(styles, sxProp)
32
+ sx: merge(styles, sxProp),
33
+ role: role || listRole
26
34
  }, props, {
27
35
  ref: forwardedRef
28
36
  }), /*#__PURE__*/React.createElement(ListContext.Provider, {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { CheckIcon } from '@primer/octicons-react';
3
3
  import { ListContext } from './List';
4
4
  import { GroupContext } from './Group';
5
+ import { ActionListContainerContext } from './ActionListContainerContext';
5
6
  import { LeadingVisualContainer } from './Visuals';
6
7
  export const Selection = ({
7
8
  selected
@@ -12,6 +13,9 @@ export const Selection = ({
12
13
  const {
13
14
  selectionVariant: groupSelectionVariant
14
15
  } = React.useContext(GroupContext);
16
+ const {
17
+ container
18
+ } = React.useContext(ActionListContainerContext);
15
19
  /** selectionVariant in Group can override the selectionVariant in List root */
16
20
 
17
21
  const selectionVariant = typeof groupSelectionVariant !== 'undefined' ? groupSelectionVariant : listSelectionVariant; // if selectionVariant is not set on List, don't show selection
@@ -22,6 +26,11 @@ export const Selection = ({
22
26
  return null;
23
27
  }
24
28
 
29
+ if (container === 'ActionMenu') {
30
+ throw new Error('ActionList cannot have a selectionVariant inside ActionMenu, please use DropdownMenu or SelectPanel instead. More information: https://primer.style/design/components/action-list#application');
31
+ return null;
32
+ }
33
+
25
34
  if (selectionVariant === 'single') {
26
35
  return /*#__PURE__*/React.createElement(LeadingVisualContainer, null, selected && /*#__PURE__*/React.createElement(CheckIcon, null));
27
36
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { Divider } from './Divider';
3
2
  export type { ListProps as ActionListProps } from './List';
4
3
  export type { GroupProps } from './Group';
5
4
  export type { ItemProps } from './Item';
@@ -26,7 +25,7 @@ export declare const ActionList: import("@radix-ui/react-polymorphic").ForwardRe
26
25
  referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
27
26
  }>;
28
27
  /** Visually separates `Item`s or `Group`s in an `ActionList`. */
29
- Divider: typeof Divider;
28
+ Divider: import("react").FC<import("../sx").SxProp>;
30
29
  /** Secondary text which provides additional information about an `Item`. */
31
30
  Description: import("react").FC<import("./Description").DescriptionProps>;
32
31
  /** Icon (or similar) positioned before `Item` text. */
@@ -0,0 +1,317 @@
1
+ import { ButtonProps } from './Button';
2
+ import React from 'react';
3
+ import { AnchoredOverlayProps } from './AnchoredOverlay';
4
+ import { OverlayProps } from './Overlay';
5
+ declare type MenuContextProps = Pick<AnchoredOverlayProps, 'anchorRef' | 'renderAnchor' | 'open' | 'onOpen' | 'onClose'>;
6
+ export declare const MenuContext: React.Context<MenuContextProps>;
7
+ export declare type ActionMenuProps = {
8
+ /**
9
+ * Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with `ActionMenu.Overlay`
10
+ */
11
+ children: React.ReactElement[] | React.ReactElement;
12
+ /**
13
+ * If defined, will control the open/closed state of the overlay. Must be used in conjuction with `onOpenChange`.
14
+ */
15
+ open?: boolean;
16
+ /**
17
+ * If defined, will control the open/closed state of the overlay. Must be used in conjuction with `open`.
18
+ */
19
+ onOpenChange?: (s: boolean) => void;
20
+ } & Pick<AnchoredOverlayProps, 'anchorRef'>;
21
+ export declare type MenuAnchorProps = {
22
+ children: React.ReactElement;
23
+ };
24
+ /** this component is syntactical sugar 🍭 */
25
+ export declare type MenuButtonProps = ButtonProps;
26
+ declare type MenuOverlayProps = Partial<OverlayProps> & {
27
+ /**
28
+ * Recommended: `ActionList`
29
+ */
30
+ children: React.ReactElement[] | React.ReactElement;
31
+ };
32
+ export declare const ActionMenu: React.FC<ActionMenuProps> & {
33
+ Button: React.ForwardRefExoticComponent<Pick<{
34
+ color?: string | undefined;
35
+ property?: string | undefined;
36
+ translate?: "yes" | "no" | undefined;
37
+ hidden?: boolean | undefined;
38
+ children?: React.ReactNode;
39
+ value?: string | number | readonly string[] | undefined;
40
+ ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
41
+ form?: string | undefined;
42
+ slot?: string | undefined;
43
+ style?: React.CSSProperties | undefined;
44
+ title?: string | undefined;
45
+ variant?: "small" | "medium" | "large" | undefined;
46
+ role?: React.AriaRole | undefined;
47
+ sx?: import("./sx").BetterSystemStyleObject | undefined;
48
+ type?: "button" | "reset" | "submit" | undefined;
49
+ name?: string | undefined;
50
+ key?: React.Key | null | undefined;
51
+ defaultChecked?: boolean | undefined;
52
+ defaultValue?: string | number | readonly string[] | undefined;
53
+ suppressContentEditableWarning?: boolean | undefined;
54
+ suppressHydrationWarning?: boolean | undefined;
55
+ accessKey?: string | undefined;
56
+ className?: string | undefined;
57
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
58
+ contextMenu?: string | undefined;
59
+ dir?: string | undefined;
60
+ draggable?: (boolean | "false" | "true") | undefined;
61
+ id?: string | undefined;
62
+ lang?: string | undefined;
63
+ placeholder?: string | undefined;
64
+ spellCheck?: (boolean | "false" | "true") | undefined;
65
+ tabIndex?: number | undefined;
66
+ radioGroup?: string | undefined;
67
+ about?: string | undefined;
68
+ datatype?: string | undefined;
69
+ inlist?: any;
70
+ prefix?: string | undefined;
71
+ resource?: string | undefined;
72
+ typeof?: string | undefined;
73
+ vocab?: string | undefined;
74
+ autoCapitalize?: string | undefined;
75
+ autoCorrect?: string | undefined;
76
+ autoSave?: string | undefined;
77
+ itemProp?: string | undefined;
78
+ itemScope?: boolean | undefined;
79
+ itemType?: string | undefined;
80
+ itemID?: string | undefined;
81
+ itemRef?: string | undefined;
82
+ results?: number | undefined;
83
+ security?: string | undefined;
84
+ unselectable?: "on" | "off" | undefined;
85
+ inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
86
+ is?: string | undefined;
87
+ 'aria-activedescendant'?: string | undefined;
88
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
89
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list" | undefined;
90
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
91
+ 'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
92
+ 'aria-colcount'?: number | undefined;
93
+ 'aria-colindex'?: number | undefined;
94
+ 'aria-colspan'?: number | undefined;
95
+ 'aria-controls'?: string | undefined;
96
+ 'aria-current'?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
97
+ 'aria-describedby'?: string | undefined;
98
+ 'aria-details'?: string | undefined;
99
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
100
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
101
+ 'aria-errormessage'?: string | undefined;
102
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
103
+ 'aria-flowto'?: string | undefined;
104
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
105
+ 'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "false" | "true" | "tree" | undefined;
106
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
107
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
108
+ 'aria-keyshortcuts'?: string | undefined;
109
+ 'aria-label'?: string | undefined;
110
+ 'aria-labelledby'?: string | undefined;
111
+ 'aria-level'?: number | undefined;
112
+ 'aria-live'?: "off" | "assertive" | "polite" | undefined;
113
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
114
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
115
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
116
+ 'aria-orientation'?: "horizontal" | "vertical" | undefined;
117
+ 'aria-owns'?: string | undefined;
118
+ 'aria-placeholder'?: string | undefined;
119
+ 'aria-posinset'?: number | undefined;
120
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
121
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
122
+ 'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
123
+ 'aria-required'?: boolean | "false" | "true" | undefined;
124
+ 'aria-roledescription'?: string | undefined;
125
+ 'aria-rowcount'?: number | undefined;
126
+ 'aria-rowindex'?: number | undefined;
127
+ 'aria-rowspan'?: number | undefined;
128
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
129
+ 'aria-setsize'?: number | undefined;
130
+ 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
131
+ 'aria-valuemax'?: number | undefined;
132
+ 'aria-valuemin'?: number | undefined;
133
+ 'aria-valuenow'?: number | undefined;
134
+ 'aria-valuetext'?: string | undefined;
135
+ dangerouslySetInnerHTML?: {
136
+ __html: string;
137
+ } | undefined;
138
+ onCopy?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
139
+ onCopyCapture?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
140
+ onCut?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
141
+ onCutCapture?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
142
+ onPaste?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
143
+ onPasteCapture?: React.ClipboardEventHandler<HTMLButtonElement> | undefined;
144
+ onCompositionEnd?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
145
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
146
+ onCompositionStart?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
147
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
148
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
149
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement> | undefined;
150
+ onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
151
+ onFocusCapture?: React.FocusEventHandler<HTMLButtonElement> | undefined;
152
+ onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
153
+ onBlurCapture?: React.FocusEventHandler<HTMLButtonElement> | undefined;
154
+ onChange?: React.FormEventHandler<HTMLButtonElement> | undefined;
155
+ onChangeCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
156
+ onBeforeInput?: React.FormEventHandler<HTMLButtonElement> | undefined;
157
+ onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
158
+ onInput?: React.FormEventHandler<HTMLButtonElement> | undefined;
159
+ onInputCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
160
+ onReset?: React.FormEventHandler<HTMLButtonElement> | undefined;
161
+ onResetCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
162
+ onSubmit?: React.FormEventHandler<HTMLButtonElement> | undefined;
163
+ onSubmitCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
164
+ onInvalid?: React.FormEventHandler<HTMLButtonElement> | undefined;
165
+ onInvalidCapture?: React.FormEventHandler<HTMLButtonElement> | undefined;
166
+ onLoad?: React.ReactEventHandler<HTMLButtonElement> | undefined;
167
+ onLoadCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
168
+ onError?: React.ReactEventHandler<HTMLButtonElement> | undefined;
169
+ onErrorCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
170
+ onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
171
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
172
+ onKeyPress?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
173
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
174
+ onKeyUp?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
175
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLButtonElement> | undefined;
176
+ onAbort?: React.ReactEventHandler<HTMLButtonElement> | undefined;
177
+ onAbortCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
178
+ onCanPlay?: React.ReactEventHandler<HTMLButtonElement> | undefined;
179
+ onCanPlayCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
180
+ onCanPlayThrough?: React.ReactEventHandler<HTMLButtonElement> | undefined;
181
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
182
+ onDurationChange?: React.ReactEventHandler<HTMLButtonElement> | undefined;
183
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
184
+ onEmptied?: React.ReactEventHandler<HTMLButtonElement> | undefined;
185
+ onEmptiedCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
186
+ onEncrypted?: React.ReactEventHandler<HTMLButtonElement> | undefined;
187
+ onEncryptedCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
188
+ onEnded?: React.ReactEventHandler<HTMLButtonElement> | undefined;
189
+ onEndedCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
190
+ onLoadedData?: React.ReactEventHandler<HTMLButtonElement> | undefined;
191
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
192
+ onLoadedMetadata?: React.ReactEventHandler<HTMLButtonElement> | undefined;
193
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
194
+ onLoadStart?: React.ReactEventHandler<HTMLButtonElement> | undefined;
195
+ onLoadStartCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
196
+ onPause?: React.ReactEventHandler<HTMLButtonElement> | undefined;
197
+ onPauseCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
198
+ onPlay?: React.ReactEventHandler<HTMLButtonElement> | undefined;
199
+ onPlayCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
200
+ onPlaying?: React.ReactEventHandler<HTMLButtonElement> | undefined;
201
+ onPlayingCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
202
+ onProgress?: React.ReactEventHandler<HTMLButtonElement> | undefined;
203
+ onProgressCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
204
+ onRateChange?: React.ReactEventHandler<HTMLButtonElement> | undefined;
205
+ onRateChangeCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
206
+ onSeeked?: React.ReactEventHandler<HTMLButtonElement> | undefined;
207
+ onSeekedCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
208
+ onSeeking?: React.ReactEventHandler<HTMLButtonElement> | undefined;
209
+ onSeekingCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
210
+ onStalled?: React.ReactEventHandler<HTMLButtonElement> | undefined;
211
+ onStalledCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
212
+ onSuspend?: React.ReactEventHandler<HTMLButtonElement> | undefined;
213
+ onSuspendCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
214
+ onTimeUpdate?: React.ReactEventHandler<HTMLButtonElement> | undefined;
215
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
216
+ onVolumeChange?: React.ReactEventHandler<HTMLButtonElement> | undefined;
217
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
218
+ onWaiting?: React.ReactEventHandler<HTMLButtonElement> | undefined;
219
+ onWaitingCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
220
+ onAuxClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
221
+ onAuxClickCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
222
+ onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
223
+ onClickCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
224
+ onContextMenu?: React.MouseEventHandler<HTMLButtonElement> | undefined;
225
+ onContextMenuCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
226
+ onDoubleClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
227
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
228
+ onDrag?: React.DragEventHandler<HTMLButtonElement> | undefined;
229
+ onDragCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
230
+ onDragEnd?: React.DragEventHandler<HTMLButtonElement> | undefined;
231
+ onDragEndCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
232
+ onDragEnter?: React.DragEventHandler<HTMLButtonElement> | undefined;
233
+ onDragEnterCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
234
+ onDragExit?: React.DragEventHandler<HTMLButtonElement> | undefined;
235
+ onDragExitCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
236
+ onDragLeave?: React.DragEventHandler<HTMLButtonElement> | undefined;
237
+ onDragLeaveCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
238
+ onDragOver?: React.DragEventHandler<HTMLButtonElement> | undefined;
239
+ onDragOverCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
240
+ onDragStart?: React.DragEventHandler<HTMLButtonElement> | undefined;
241
+ onDragStartCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
242
+ onDrop?: React.DragEventHandler<HTMLButtonElement> | undefined;
243
+ onDropCapture?: React.DragEventHandler<HTMLButtonElement> | undefined;
244
+ onMouseDown?: React.MouseEventHandler<HTMLButtonElement> | undefined;
245
+ onMouseDownCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
246
+ onMouseEnter?: React.MouseEventHandler<HTMLButtonElement> | undefined;
247
+ onMouseLeave?: React.MouseEventHandler<HTMLButtonElement> | undefined;
248
+ onMouseMove?: React.MouseEventHandler<HTMLButtonElement> | undefined;
249
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
250
+ onMouseOut?: React.MouseEventHandler<HTMLButtonElement> | undefined;
251
+ onMouseOutCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
252
+ onMouseOver?: React.MouseEventHandler<HTMLButtonElement> | undefined;
253
+ onMouseOverCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
254
+ onMouseUp?: React.MouseEventHandler<HTMLButtonElement> | undefined;
255
+ onMouseUpCapture?: React.MouseEventHandler<HTMLButtonElement> | undefined;
256
+ onSelect?: React.ReactEventHandler<HTMLButtonElement> | undefined;
257
+ onSelectCapture?: React.ReactEventHandler<HTMLButtonElement> | undefined;
258
+ onTouchCancel?: React.TouchEventHandler<HTMLButtonElement> | undefined;
259
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLButtonElement> | undefined;
260
+ onTouchEnd?: React.TouchEventHandler<HTMLButtonElement> | undefined;
261
+ onTouchEndCapture?: React.TouchEventHandler<HTMLButtonElement> | undefined;
262
+ onTouchMove?: React.TouchEventHandler<HTMLButtonElement> | undefined;
263
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLButtonElement> | undefined;
264
+ onTouchStart?: React.TouchEventHandler<HTMLButtonElement> | undefined;
265
+ onTouchStartCapture?: React.TouchEventHandler<HTMLButtonElement> | undefined;
266
+ onPointerDown?: React.PointerEventHandler<HTMLButtonElement> | undefined;
267
+ onPointerDownCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
268
+ onPointerMove?: React.PointerEventHandler<HTMLButtonElement> | undefined;
269
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
270
+ onPointerUp?: React.PointerEventHandler<HTMLButtonElement> | undefined;
271
+ onPointerUpCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
272
+ onPointerCancel?: React.PointerEventHandler<HTMLButtonElement> | undefined;
273
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
274
+ onPointerEnter?: React.PointerEventHandler<HTMLButtonElement> | undefined;
275
+ onPointerEnterCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
276
+ onPointerLeave?: React.PointerEventHandler<HTMLButtonElement> | undefined;
277
+ onPointerLeaveCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
278
+ onPointerOver?: React.PointerEventHandler<HTMLButtonElement> | undefined;
279
+ onPointerOverCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
280
+ onPointerOut?: React.PointerEventHandler<HTMLButtonElement> | undefined;
281
+ onPointerOutCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
282
+ onGotPointerCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
283
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
284
+ onLostPointerCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
285
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement> | undefined;
286
+ onScroll?: React.UIEventHandler<HTMLButtonElement> | undefined;
287
+ onScrollCapture?: React.UIEventHandler<HTMLButtonElement> | undefined;
288
+ onWheel?: React.WheelEventHandler<HTMLButtonElement> | undefined;
289
+ onWheelCapture?: React.WheelEventHandler<HTMLButtonElement> | undefined;
290
+ onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
291
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
292
+ onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
293
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
294
+ onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
295
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
296
+ onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
297
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
298
+ css?: import("@emotion/core").InterpolationWithTheme<any>;
299
+ disabled?: boolean | undefined;
300
+ as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
301
+ autoFocus?: boolean | undefined;
302
+ formAction?: string | undefined;
303
+ formEncType?: string | undefined;
304
+ formMethod?: string | undefined;
305
+ formNoValidate?: boolean | undefined;
306
+ formTarget?: string | undefined;
307
+ } & {
308
+ theme?: any;
309
+ }, "theme" | "sx" | "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement> | keyof {
310
+ as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
311
+ variant?: "small" | "medium" | "large" | undefined;
312
+ }> & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
313
+ Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
314
+ Overlay: React.FC<MenuOverlayProps>;
315
+ Divider: React.FC<import("./sx").SxProp>;
316
+ };
317
+ export {};