@primer/components 0.0.0-20211030123816 → 0.0.0-20211030134829

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 (60) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/dist/browser.esm.js +1 -1
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +1 -1
  5. package/dist/browser.umd.js.map +1 -1
  6. package/lib/ActionList/Item.js +2 -2
  7. package/lib/ActionList2/Item.js +3 -1
  8. package/lib/Autocomplete/Autocomplete.d.ts +1 -0
  9. package/lib/Autocomplete/AutocompleteInput.d.ts +1 -0
  10. package/lib/Button/Button.d.ts +1 -0
  11. package/lib/Button/ButtonClose.d.ts +2 -1
  12. package/lib/Button/ButtonDanger.d.ts +1 -0
  13. package/lib/Button/ButtonInvisible.d.ts +1 -0
  14. package/lib/Button/ButtonOutline.d.ts +1 -0
  15. package/lib/Button/ButtonPrimary.d.ts +1 -0
  16. package/lib/CircleOcticon.d.ts +1 -0
  17. package/lib/Dialog.d.ts +3 -2
  18. package/lib/Dropdown.d.ts +4 -0
  19. package/lib/DropdownMenu/DropdownButton.d.ts +2 -1
  20. package/lib/FilterList.d.ts +1 -0
  21. package/lib/Position.d.ts +4 -4
  22. package/lib/SelectMenu/SelectMenu.d.ts +10 -4
  23. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  24. package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
  25. package/lib/TextInputWithTokens.d.ts +1 -0
  26. package/lib/Token/AvatarToken.d.ts +1 -1
  27. package/lib/Token/IssueLabelToken.d.ts +1 -1
  28. package/lib/Token/Token.d.ts +1 -1
  29. package/lib/utils/testing.d.ts +0 -20
  30. package/lib/utils/testing.js +1 -1
  31. package/lib-esm/ActionList/Item.js +2 -2
  32. package/lib-esm/ActionList2/Item.js +3 -1
  33. package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -0
  34. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -0
  35. package/lib-esm/Button/Button.d.ts +1 -0
  36. package/lib-esm/Button/ButtonClose.d.ts +2 -1
  37. package/lib-esm/Button/ButtonDanger.d.ts +1 -0
  38. package/lib-esm/Button/ButtonInvisible.d.ts +1 -0
  39. package/lib-esm/Button/ButtonOutline.d.ts +1 -0
  40. package/lib-esm/Button/ButtonPrimary.d.ts +1 -0
  41. package/lib-esm/CircleOcticon.d.ts +1 -0
  42. package/lib-esm/Dialog.d.ts +3 -2
  43. package/lib-esm/Dropdown.d.ts +4 -0
  44. package/lib-esm/DropdownMenu/DropdownButton.d.ts +2 -1
  45. package/lib-esm/FilterList.d.ts +1 -0
  46. package/lib-esm/Position.d.ts +4 -4
  47. package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -4
  48. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  49. package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
  50. package/lib-esm/TextInputWithTokens.d.ts +1 -0
  51. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  52. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  53. package/lib-esm/Token/Token.d.ts +1 -1
  54. package/lib-esm/utils/testing.d.ts +0 -20
  55. package/lib-esm/utils/testing.js +1 -1
  56. package/package.json +2 -3
  57. package/lib/ActionList2/Header.d.ts +0 -26
  58. package/lib/ActionList2/Header.js +0 -55
  59. package/lib-esm/ActionList2/Header.d.ts +0 -26
  60. package/lib-esm/ActionList2/Header.js +0 -44
@@ -1,26 +0,0 @@
1
- /// <reference types="react" />
2
- import { SxProp } from '../sx';
3
- /**
4
- * Contract for props passed to the `Header` component.
5
- */
6
- export declare type HeaderProps = {
7
- /**
8
- * Style variations. Usage is discretionary.
9
- *
10
- * - `"filled"` - Superimposed on a background, offset from nearby content
11
- * - `"subtle"` - Relatively less offset from nearby content
12
- */
13
- variant?: 'subtle' | 'filled';
14
- /**
15
- * Primary text which names a `Group`.
16
- */
17
- title?: string;
18
- /**
19
- * Secondary text which provides additional information about a `Group`.
20
- */
21
- auxiliaryText?: string;
22
- } & SxProp;
23
- /**
24
- * Displays the name and description of a `Group`.
25
- */
26
- export declare const Header: ({ variant, title, auxiliaryText, sx, ...props }: HeaderProps) => JSX.Element;
@@ -1,44 +0,0 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- import React from 'react';
4
- import Box from '../Box';
5
- import { ListContext } from './List';
6
- /**
7
- * Contract for props passed to the `Header` component.
8
- */
9
-
10
- /**
11
- * Displays the name and description of a `Group`.
12
- */
13
- export const Header = ({
14
- variant = 'subtle',
15
- title,
16
- auxiliaryText,
17
- sx = {},
18
- ...props
19
- }) => {
20
- const {
21
- variant: listVariant
22
- } = React.useContext(ListContext);
23
- const styles = {
24
- paddingY: '6px',
25
- paddingX: listVariant === 'full' ? 2 : 3,
26
- fontSize: 0,
27
- fontWeight: 'bold',
28
- color: 'fg.muted',
29
- ...(variant === 'filled' && {
30
- backgroundColor: 'canvas.subtle',
31
- marginX: 0,
32
- marginBottom: 2,
33
- borderTop: '1px solid',
34
- borderBottom: '1px solid',
35
- borderColor: 'neutral.muted'
36
- }),
37
- ...sx
38
- };
39
- return /*#__PURE__*/React.createElement(Box, _extends({
40
- sx: styles,
41
- role: "heading"
42
- }, props), title, auxiliaryText && /*#__PURE__*/React.createElement("span", null, auxiliaryText));
43
- };
44
- Header.displayName = "Header";