@primer/react-brand 0.17.0-rc.c0b291e → 0.17.0

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 (153) hide show
  1. package/lib/Card/Card.d.ts +11 -1
  2. package/lib/Grid/Grid.d.ts +69 -0
  3. package/lib/Grid/Grid.visual.spec.d.ts +1 -0
  4. package/lib/Grid/index.d.ts +1 -0
  5. package/lib/Image/Image.d.ts +3 -1
  6. package/lib/Label/Label.d.ts +1 -1
  7. package/lib/SubdomainNavBar/SubdomainNavBar.d.ts +1 -1
  8. package/lib/Testimonial/Testimonial.d.ts +6 -1
  9. package/lib/constants.d.ts +2 -0
  10. package/lib/css/main.css +1032 -52
  11. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  12. package/lib/design-tokens/css/tokens/base/colors/color-scales.css +1 -1
  13. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  14. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  15. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  16. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  17. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  18. package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
  19. package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
  20. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  21. package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
  22. package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +57 -1
  23. package/lib/design-tokens/css/tokens/functional/components/card/colors.css +29 -1
  24. package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
  25. package/lib/design-tokens/css/tokens/functional/components/control/base.css +1 -1
  26. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
  27. package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
  28. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  29. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  30. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  31. package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
  32. package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
  33. package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +13 -0
  34. package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +8 -0
  35. package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +25 -0
  36. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  37. package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
  38. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  39. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  40. package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +3 -3
  41. package/lib/design-tokens/css/tokens/functional/components/label/colors.css +2 -2
  42. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  43. package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
  44. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  45. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  46. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  47. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  48. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  49. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -8
  50. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  51. package/lib/design-tokens/js/module/tokens/base/colors/color-scales.js +1 -1
  52. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  53. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  54. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  55. package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
  56. package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +539 -1
  57. package/lib/design-tokens/js/module/tokens/functional/components/control/base.js +1 -1
  58. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  59. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  60. package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
  61. package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +31 -0
  62. package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +121 -0
  63. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  64. package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
  65. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  66. package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +5 -5
  67. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  68. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  69. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  70. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  71. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  72. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  73. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  74. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  75. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  76. package/lib/design-tokens/js/tokens/base/colors/color-scales.js +1 -1
  77. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  78. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  79. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  80. package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
  81. package/lib/design-tokens/js/tokens/functional/components/card/colors.js +30 -2
  82. package/lib/design-tokens/js/tokens/functional/components/control/base.js +1 -1
  83. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  84. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  85. package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
  86. package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +6 -0
  87. package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +8 -0
  88. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  89. package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
  90. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  91. package/lib/design-tokens/js/tokens/functional/components/label/colors.js +2 -2
  92. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  93. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  94. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  95. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  96. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  97. package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
  98. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  99. package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
  100. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  101. package/lib/design-tokens/ts/tokens/base/colors/color-scales.d.ts +1 -1
  102. package/lib/design-tokens/ts/tokens/base/colors/color-scales.js +1 -1
  103. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  104. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  105. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  106. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  107. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  108. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  109. package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
  110. package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
  111. package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +35 -1
  112. package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +35 -1
  113. package/lib/design-tokens/ts/tokens/functional/components/control/base.d.ts +1 -1
  114. package/lib/design-tokens/ts/tokens/functional/components/control/base.js +1 -1
  115. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  116. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  117. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  118. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  119. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
  120. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
  121. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +15 -0
  122. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +14 -0
  123. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +17 -0
  124. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +16 -0
  125. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  126. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  127. package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
  128. package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
  129. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  130. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  131. package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
  132. package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +2 -2
  133. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  134. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  135. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  136. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  137. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  138. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  139. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  140. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  141. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  142. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  143. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  144. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  145. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  146. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  147. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  148. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  149. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  150. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  151. package/lib/index.d.ts +1 -0
  152. package/lib/index.js +1 -1
  153. package/package.json +1 -1
@@ -7,11 +7,14 @@ import type { BaseProps } from '../component-helpers';
7
7
  */
8
8
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/card/base.css';
9
9
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css';
10
+ import { Icon as IconProps } from '@primer/octicons-react';
11
+ export declare const CardIconColors: readonly ["default", "blue", "coral", "green", "gray", "indigo", "lemon", "lime", "orange", "pink", "purple", "red", "teal", "yellow"];
12
+ export declare const defaultCardIconColor: "default";
10
13
  export declare type CardProps = {
11
14
  /**
12
15
  * Valid children include Card.Image, Card.Heading, and Card.Description
13
16
  */
14
- children: React.ReactNode | React.ReactElement<CardLabelProps> | React.ReactElement<CardHeadingProps> | React.ReactElement<CardDescriptionProps>;
17
+ children: React.ReactNode | React.ReactElement<CardIconProps> | React.ReactElement<CardLabelProps> | React.ReactElement<CardHeadingProps> | React.ReactElement<CardDescriptionProps>;
15
18
  /**
16
19
  * The href of the link
17
20
  * */
@@ -21,6 +24,12 @@ export declare type CardProps = {
21
24
  * */
22
25
  ctaText?: string;
23
26
  } & BaseProps<HTMLAnchorElement> & React.ComponentPropsWithoutRef<'a'>;
27
+ declare type CardIconProps = BaseProps<HTMLSpanElement> & {
28
+ icon: React.ReactNode | IconProps;
29
+ color?: typeof CardIconColors[number];
30
+ hasBackground?: boolean;
31
+ };
32
+ declare function CardIcon({ icon: Icon, className, color, hasBackground, ...rest }: CardIconProps): JSX.Element;
24
33
  declare type CardLabelProps = BaseProps<HTMLSpanElement> & {
25
34
  children: React.ReactNode | React.ReactNode[];
26
35
  color?: typeof LabelColors[number];
@@ -38,6 +47,7 @@ declare type CardDescriptionProps = BaseProps<HTMLParagraphElement> & {
38
47
  */
39
48
  export declare const Card: React.ForwardRefExoticComponent<Pick<CardProps, "children" | "aria-labelledby" | "className" | "id" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-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" | "href" | "type" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy" | "key" | "ctaText"> & React.RefAttributes<HTMLAnchorElement>> & {
40
49
  Label: React.ForwardRefExoticComponent<Pick<CardLabelProps, "children" | "className" | "id" | "color"> & React.RefAttributes<HTMLSpanElement>>;
50
+ Icon: typeof CardIcon;
41
51
  Heading: React.ForwardRefExoticComponent<Pick<CardHeadingProps, "children" | "className" | "id" | "as"> & React.RefAttributes<HTMLHeadingElement>>;
42
52
  Description: React.ForwardRefExoticComponent<Pick<CardDescriptionProps, "children" | "className" | "id"> & React.RefAttributes<HTMLParagraphElement>>;
43
53
  };
@@ -0,0 +1,69 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import type { BaseProps } from '../component-helpers';
3
+ /**
4
+ * Design tokens
5
+ */
6
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/grid/grid.css';
7
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css';
8
+ declare type ResponsiveMap = {
9
+ xsmall?: GridColumnIndex;
10
+ small?: GridColumnIndex;
11
+ medium?: GridColumnIndex;
12
+ large?: GridColumnIndex;
13
+ xlarge?: GridColumnIndex;
14
+ xxlarge?: GridColumnIndex;
15
+ };
16
+ export declare type GridColumnIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
17
+ export declare type GridProps<T extends keyof JSX.IntrinsicElements = 'div'> = React.HTMLAttributes<T> & {
18
+ /**
19
+ * The HTML element used to render the grid.
20
+ */
21
+ as?: T | 'div' | 'span' | 'section';
22
+ /**
23
+ * Visual aid to help with alignment.
24
+ */
25
+ enableOverlay?: boolean;
26
+ /**
27
+ * Test id for the root element.
28
+ */
29
+ ['data-testid']?: string;
30
+ } & (T extends 'span' ? BaseProps<HTMLSpanElement> : T extends 'section' ? BaseProps<HTMLElement> : BaseProps<HTMLDivElement>);
31
+ declare type GridColumnProps<T extends keyof JSX.IntrinsicElements = 'div'> = {
32
+ as?: T | 'div' | 'span' | 'section';
33
+ span?: GridColumnIndex | ResponsiveMap;
34
+ start?: GridColumnIndex | ResponsiveMap;
35
+ } & (T extends 'span' ? BaseProps<HTMLSpanElement> : T extends 'section' ? BaseProps<HTMLElement> : BaseProps<HTMLDivElement>);
36
+ /**
37
+ * Use Grid to create flexible and responsive grid-based layouts
38
+ * @see https://primer.style/brand/components/Grid
39
+ * @example
40
+ * <Grid>
41
+ * <Grid.Column span="6">
42
+ * ...
43
+ * </Grid.Column>
44
+ * </Grid>
45
+ */
46
+ export declare const Grid: React.NamedExoticComponent<React.HTMLAttributes<"div"> & {
47
+ /**
48
+ * The HTML element used to render the grid.
49
+ */
50
+ as?: "div" | "section" | "span" | undefined;
51
+ /**
52
+ * Visual aid to help with alignment.
53
+ */
54
+ enableOverlay?: boolean | undefined;
55
+ /**
56
+ * Test id for the root element.
57
+ */
58
+ "data-testid"?: string | undefined;
59
+ } & BaseProps<HTMLDivElement> & {
60
+ children?: React.ReactNode;
61
+ }> & {
62
+ readonly type: ({ className, children, as, enableOverlay, ["data-testid"]: testId, ...rest }: PropsWithChildren<GridProps>) => JSX.Element;
63
+ } & {
64
+ Column: React.MemoExoticComponent<({ children, as, span, start, className, ...rest }: PropsWithChildren<GridColumnProps>) => JSX.Element>;
65
+ testIds: {
66
+ root: string;
67
+ };
68
+ };
69
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Grid';
@@ -6,15 +6,17 @@ export declare type ImageProps = React.ImgHTMLAttributes<HTMLImageElement> & Bas
6
6
  alt: string;
7
7
  aspectRatio?: AspectRatio;
8
8
  media?: string;
9
+ srcSet?: Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'srcSet'>;
9
10
  } & ({
10
11
  as?: 'img';
11
- srcSet?: 'string';
12
+ srcSet?: Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'srcSet'>;
12
13
  } | {
13
14
  as: 'picture';
14
15
  sources?: {
15
16
  srcset: string;
16
17
  media: string;
17
18
  }[];
19
+ srcSet?: undefined;
18
20
  });
19
21
  export declare const Image: ({ className, aspectRatio, as, ref, alt, width, height, media, srcSet, ...rest }: ImageProps) => JSX.Element;
20
22
  export {};
@@ -4,7 +4,7 @@ import type { BaseProps } from '../component-helpers';
4
4
  * Design tokens
5
5
  */
6
6
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css';
7
- export declare const LabelColors: readonly ["default", "blue", "blue-purple", "coral", "green", "green-blue", "gray", "indigo", "lemon", "lime", "orange", "pink", "pink-blue", "purple", "purple-red", "red", "red-orange", "teal", "yellow"];
7
+ export declare const LabelColors: readonly ["default", "blue", "coral", "green", "gray", "indigo", "lemon", "lime", "orange", "pink", "purple", "red", "teal", "yellow", "blue-purple", "green-blue", "pink-blue", "purple-red", "red-orange"];
8
8
  export declare const LabelSizes: readonly ["small", "medium", "large"];
9
9
  export declare const defaultLabelColor: "default";
10
10
  export declare const defaultLabelSize: "medium";
@@ -59,7 +59,7 @@ declare type SearchProps = {
59
59
  };
60
60
  declare type CTAActionProps = {
61
61
  href: string;
62
- };
62
+ } & React.HTMLAttributes<HTMLAnchorElement>;
63
63
  declare function PrimaryAction({ children, href, ...rest }: PropsWithChildren<CTAActionProps>): JSX.Element;
64
64
  declare function SecondaryAction({ children, href, ...rest }: PropsWithChildren<CTAActionProps>): JSX.Element;
65
65
  export declare const SubdomainNavBar: typeof Root & {
@@ -2,6 +2,7 @@ import React, { HTMLAttributes, SVGProps } from 'react';
2
2
  import { BaseProps } from '../component-helpers';
3
3
  import type { AvatarProps } from '../';
4
4
  declare type TestimonialAlignment = 'start' | 'center';
5
+ declare type TestimonialSize = 'small' | 'large';
5
6
  export declare type TestimonialProps = {
6
7
  /**
7
8
  * Valid children include Testimonial.Name, Testimonial.Avatar, and Testimonial.Name
@@ -11,6 +12,10 @@ export declare type TestimonialProps = {
11
12
  * Aligns the testimonial content
12
13
  */
13
14
  align?: TestimonialAlignment;
15
+ /**
16
+ * Sets the testimonial text size
17
+ */
18
+ size?: TestimonialSize;
14
19
  } & BaseProps<HTMLElement>;
15
20
  /**
16
21
  * Testimonial quote child element
@@ -42,7 +47,7 @@ declare function _Avatar({ size, ...rest }: AvatarProps): JSX.Element;
42
47
  * Use Testimonial to display a quote from a customer or user.
43
48
  * @see https://primer.style/brand/components/Testimonial
44
49
  */
45
- export declare const Testimonial: React.ForwardRefExoticComponent<Pick<TestimonialProps, "children" | "className" | "align" | "id"> & React.RefAttributes<unknown>> & {
50
+ export declare const Testimonial: React.ForwardRefExoticComponent<Pick<TestimonialProps, "children" | "className" | "align" | "id" | "size"> & React.RefAttributes<unknown>> & {
46
51
  Quote: React.ForwardRefExoticComponent<Pick<{
47
52
  children: string;
48
53
  } & React.HTMLAttributes<HTMLElement> & BaseProps<HTMLElement>, "children" | "aria-labelledby" | "className" | "id" | "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-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"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,2 @@
1
+ export declare const Colors: readonly ["default", "blue", "coral", "green", "gray", "indigo", "lemon", "lime", "orange", "pink", "purple", "red", "teal", "yellow"];
2
+ export declare const Gradients: readonly ["blue-purple", "green-blue", "pink-blue", "purple-red", "red-orange"];