@primer/react-brand 0.1.0-rc.ae0dfda → 0.1.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 (82) hide show
  1. package/fonts/alliance-1.woff2 +0 -0
  2. package/fonts/alliance-2.woff2 +0 -0
  3. package/fonts/fonts.css +30 -0
  4. package/lib/Heading/Heading.d.ts +20 -0
  5. package/lib/Heading/index.d.ts +1 -0
  6. package/lib/Hero/Hero.d.ts +3 -2
  7. package/lib/LinkButton/LinkButton.d.ts +1 -0
  8. package/lib/MonaSans/MonaSans.d.ts +10 -0
  9. package/lib/MonaSans/index.d.ts +1 -0
  10. package/lib/Text/Text.d.ts +36 -0
  11. package/lib/Text/index.d.ts +1 -0
  12. package/lib/css/main.css +1328 -59
  13. package/lib/css/stylesheets.d.ts +9 -0
  14. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +805 -0
  15. package/lib/design-tokens/css/tokens/base/colors/color-scales.css +139 -0
  16. package/lib/design-tokens/css/tokens/base/size/size.css +24 -0
  17. package/lib/design-tokens/css/tokens/base/typography/typography.css +14 -0
  18. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +58 -0
  19. package/lib/design-tokens/css/tokens/functional/colors/global.css +22 -0
  20. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +28 -0
  21. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +9 -0
  22. package/lib/design-tokens/css/tokens/functional/size/border.css +17 -0
  23. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +13 -0
  24. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +10 -0
  25. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +10 -0
  26. package/lib/design-tokens/css/tokens/functional/size/size.css +54 -0
  27. package/lib/design-tokens/css/tokens/functional/size/viewport.css +6 -0
  28. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +166 -0
  29. package/lib/design-tokens/css/tokens/functional/typography/typography.css +65 -0
  30. package/lib/design-tokens/js/module/tokens/base/colors/color-scales.js +2551 -0
  31. package/lib/design-tokens/js/module/tokens/base/size/size.js +266 -0
  32. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +125 -0
  33. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +289 -0
  34. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +47 -0
  35. package/lib/design-tokens/js/module/tokens/functional/size/border.js +165 -0
  36. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +101 -0
  37. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +73 -0
  38. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +73 -0
  39. package/lib/design-tokens/js/module/tokens/functional/size/size.js +824 -0
  40. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +101 -0
  41. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1973 -0
  42. package/lib/design-tokens/js/tokens/base/colors/color-scales.js +137 -0
  43. package/lib/design-tokens/js/tokens/base/size/size.js +22 -0
  44. package/lib/design-tokens/js/tokens/base/typography/typography.js +12 -0
  45. package/lib/design-tokens/js/tokens/functional/colors/global.js +20 -0
  46. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +7 -0
  47. package/lib/design-tokens/js/tokens/functional/size/border.js +15 -0
  48. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +11 -0
  49. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +8 -0
  50. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +8 -0
  51. package/lib/design-tokens/js/tokens/functional/size/size.js +52 -0
  52. package/lib/design-tokens/js/tokens/functional/size/viewport.js +11 -0
  53. package/lib/design-tokens/js/tokens/functional/typography/typography.js +63 -0
  54. package/lib/design-tokens/ts/tokens/base/colors/color-scales.d.ts +176 -0
  55. package/lib/design-tokens/ts/tokens/base/colors/color-scales.js +175 -0
  56. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +29 -0
  57. package/lib/design-tokens/ts/tokens/base/size/size.js +28 -0
  58. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +111 -0
  59. package/lib/design-tokens/ts/tokens/base/typography/typography.js +20 -0
  60. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +35 -0
  61. package/lib/design-tokens/ts/tokens/functional/colors/global.js +34 -0
  62. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +18 -0
  63. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +17 -0
  64. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +26 -0
  65. package/lib/design-tokens/ts/tokens/functional/size/border.js +25 -0
  66. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +18 -0
  67. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +17 -0
  68. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +27 -0
  69. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +26 -0
  70. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +27 -0
  71. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +26 -0
  72. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +101 -0
  73. package/lib/design-tokens/ts/tokens/functional/size/size.js +100 -0
  74. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +18 -0
  75. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +17 -0
  76. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +92 -0
  77. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +91 -0
  78. package/lib/index.d.ts +3 -0
  79. package/lib/index.js +1 -1
  80. package/package.json +20 -18
  81. package/CHANGELOG.md +0 -23
  82. package/lib/css/gh-variables.color.css +0 -1025
Binary file
Binary file
@@ -0,0 +1,30 @@
1
+ @font-face {
2
+ font-family: 'Alliance1';
3
+ src: url('./alliance-1.woff2') format('woff2 supports variations'),
4
+ url('./alliance-1.woff2') format('woff2-variations');
5
+ font-weight: 200 900;
6
+ font-display: swap;
7
+ font-synthesis: none;
8
+ }
9
+
10
+ @font-face {
11
+ font-family: 'Alliance1Fallback';
12
+ size-adjust: 104.5%;
13
+ ascent-override: 71%;
14
+ src: local(Arial);
15
+ }
16
+
17
+ @font-face {
18
+ font-family: 'Alliance1HeaderFallback';
19
+ size-adjust: 103.1%;
20
+ ascent-override: 70%;
21
+ src: local(Arial Bold);
22
+ }
23
+
24
+ @font-face {
25
+ font-family: 'Alliance2';
26
+ src: url('./alliance-2.woff2') format('woff2 supports variations'),
27
+ url('./alliance-2.woff2') format('woff2-variations');
28
+ font-weight: 200 900;
29
+ font-display: swap;
30
+ }
@@ -0,0 +1,20 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export declare const HeadingSizes: readonly ["1", "2", "3", "4", "5", "6"];
3
+ export declare const HeadingTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
4
+ export declare const defaultHeadingTag: "h2";
5
+ export declare const classMap: {
6
+ h1: "1";
7
+ h2: "2";
8
+ h3: "3";
9
+ h4: "4";
10
+ h5: "5";
11
+ h6: "6";
12
+ };
13
+ declare type HeadingTags = {
14
+ as?: typeof HeadingTags[number];
15
+ } & React.HTMLAttributes<HTMLHeadingElement>;
16
+ declare type HeadingProps = {
17
+ className?: string;
18
+ } & HeadingTags;
19
+ export declare function Heading({ className, children, as, ...rest }: PropsWithChildren<HeadingProps>): JSX.Element;
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Heading';
@@ -1,15 +1,16 @@
1
1
  import React from 'react';
2
+ import '../../lib/design-tokens/css/tokens/functional/components/hero/base.css';
2
3
  declare type Action = {
3
4
  text: string;
4
5
  href: string;
5
6
  };
6
7
  export declare type HeroProps = {
8
+ className?: string;
7
9
  heading: string | React.ReactElement;
8
10
  description?: string | React.ReactElement;
9
11
  primaryAction: Action;
10
12
  secondaryAction?: Action;
11
13
  align?: 'start' | 'center';
12
- size?: 'small' | 'large';
13
14
  };
14
- export declare function Hero({ heading, description, primaryAction, secondaryAction, align, size }: HeroProps): JSX.Element;
15
+ export declare function Hero({ className, heading, description, primaryAction, secondaryAction, align }: HeroProps): JSX.Element;
15
16
  export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import '../../lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css';
2
3
  export declare type LinkButtonProps = {
3
4
  href: string;
4
5
  variant?: 'primary' | 'secondary';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare type MonaSansProps = {
3
+ children: string | React.ReactElement;
4
+ italic?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10';
5
+ size?: number;
6
+ weight?: number;
7
+ width?: number;
8
+ };
9
+ export declare function MonaSans({ children, italic, size, weight, width }: MonaSansProps): JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from './MonaSans';
@@ -0,0 +1,36 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export declare const TextSizes: readonly ["700", "600", "500", "400", "300", "200", "100"];
3
+ export declare const TextTags: readonly ["p", "span", "div"];
4
+ export declare const TextVariants: readonly ["default", "muted"];
5
+ export declare const defaultTextTag: "span";
6
+ export declare const defaultTextSize: "400";
7
+ export declare const defaultTextVariant: "default";
8
+ declare type RestrictedPolymorphism = (React.HTMLAttributes<HTMLParagraphElement> & {
9
+ as?: 'p';
10
+ }) | (React.HTMLAttributes<HTMLSpanElement> & {
11
+ as?: 'span';
12
+ }) | (React.HTMLAttributes<HTMLDivElement> & {
13
+ as?: 'div';
14
+ });
15
+ declare type TextTags = {
16
+ /**
17
+ * Applies the underlying HTML element
18
+ */
19
+ as?: typeof TextTags[number];
20
+ } & RestrictedPolymorphism;
21
+ declare type TextProps = {
22
+ /**
23
+ * Forward a custom HTML class attribute
24
+ */
25
+ className?: string;
26
+ /**
27
+ * Specify the text size
28
+ */
29
+ size?: typeof TextSizes[number];
30
+ /**
31
+ * Specify alternative text appearance
32
+ */
33
+ variant?: typeof TextVariants[number];
34
+ } & TextTags;
35
+ export declare function Text({ as, className, children, size, variant, ...rest }: PropsWithChildren<TextProps>): JSX.Element;
36
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Text';