@primer/react-brand 0.0.2 → 0.0.4-rc.3d5d40c

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # @primer/react-brand
2
+
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#21](https://github.com/primer/react-brand/pull/21) [`ab06cce`](https://github.com/primer/react-brand/commit/ab06cceb6ed3b2eaca70f9738b9708343b4e6db9) Thanks [@rezrah](https://github.com/rezrah)! - Remove fixed background color from `Hero` to allow underlying customisation to be surfaced.
8
+
9
+ ## 0.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#18](https://github.com/primer/react-brand/pull/18) [`0835830`](https://github.com/primer/react-brand/commit/0835830fc15c582e280ac692ff3d578d6bcf282e) Thanks [@rezrah](https://github.com/rezrah)! - Fixes for production bundles
14
+
15
+ ## 0.0.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [#2](https://github.com/primer/react-brand/pull/2) [`ab01a8a`](https://github.com/primer/react-brand/commit/ab01a8ad1dc504f7a2865213b6f41c0b0adba131) Thanks [@colebemis](https://github.com/colebemis)! - Initialize releases with [changesets](https://github.com/changesets/changesets)
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Primer
3
+ Copyright (c) 2022 GitHub Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,3 +1,40 @@
1
- # @primer/react-brand
1
+ <p align="center">
2
+ <img width="300px" src="https://user-images.githubusercontent.com/4608155/127241386-f11da52d-00d9-4366-b01c-6f4c1ebcf7f2.png">
3
+ </p>
2
4
 
3
- TODO
5
+ <h1 align="center">Primer React Brand</h1>
6
+
7
+ <p align="center">A React implementation of GitHub's Brand Design System</p>
8
+
9
+ <p align="center">
10
+ <a aria-label="npm package" href="https://www.npmjs.com/package/@primer/react-brand">
11
+ <img alt="" src="https://img.shields.io/npm/v/@primer/react-brand.svg">
12
+ </a>
13
+ <a aria-label="build status" href="https://github.com/primer/react-brand/actions/workflows/ci.yml">
14
+ <img alt="" src="https://github.com/primer/react-brand/actions/workflows/ci.yml/badge.svg">
15
+ </a>
16
+ <img src="https://img.shields.io/badge/status-experimental-red" alt="status: experimental">
17
+ <a aria-label="license" href="https://github.com/primer/react-brand/blob/main/LICENSE">
18
+ <img src="https://img.shields.io/github/license/primer/react-brand.svg" alt="">
19
+ </a>
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="https://primer.github.io/react-brand/" target="_blank">https://primer.github.io/react-brand</a>
24
+ </p>
25
+
26
+ ## Install
27
+
28
+ This repository is distributed on [npm]. After [installing npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), you can install `@primer/react-brand` as a dependency of your project:
29
+
30
+ ```sh
31
+ npm install @primer/react-brand
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ See our [getting started guide](https://primer.github.io/react-brand/getting-started) for more information.
37
+
38
+ ## License
39
+
40
+ [MIT](./LICENSE) &copy; [GitHub](https://github.com/)
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type ExpandableArrowProps = {
3
+ className?: string;
4
+ /** Animate between a chevron arrow and an arrow with a stem by toggling the value of `expanded` */
5
+ expanded?: boolean;
6
+ };
7
+ export declare function ExpandableArrow({ className, expanded }: ExpandableArrowProps): JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ExpandableArrow';
@@ -1,6 +1,14 @@
1
- import React from "react";
2
- declare type Props = {
3
- children: React.ReactNode;
1
+ import React from 'react';
2
+ declare type Action = {
3
+ text: string;
4
+ href: string;
4
5
  };
5
- export declare function Hero({ children }: Props): JSX.Element;
6
+ export declare type HeroProps = {
7
+ heading: string | React.ReactElement;
8
+ description?: string | React.ReactElement;
9
+ primaryAction: Action;
10
+ secondaryAction?: Action;
11
+ align?: 'start' | 'center';
12
+ };
13
+ export declare function Hero({ heading, description, primaryAction, secondaryAction, align }: HeroProps): JSX.Element;
6
14
  export {};
@@ -1 +1 @@
1
- export { Hero } from "./Hero";
1
+ export * from './Hero';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare type LinkButtonProps = {
3
+ href: string;
4
+ variant?: 'primary' | 'secondary';
5
+ } & React.ComponentPropsWithoutRef<'a'>;
6
+ export declare function LinkButton({ variant, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: LinkButtonProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './LinkButton';
@@ -0,0 +1,19 @@
1
+ import React, { HTMLAttributes, PropsWithChildren } from 'react';
2
+ export declare enum ColorModesEnum {
3
+ LIGHT = "light",
4
+ DARK = "dark",
5
+ AUTO = "auto"
6
+ }
7
+ export declare type ColorMode = `${ColorModesEnum}`;
8
+ export declare type ThemeContextProps = {
9
+ colorMode: ColorMode;
10
+ availableColorModes: ColorModesEnum[];
11
+ };
12
+ export declare type ThemeProviderProps = {
13
+ colorMode?: ColorMode;
14
+ } & HTMLAttributes<HTMLDivElement>;
15
+ export declare const ThemeContext: React.Context<ThemeContextProps>;
16
+ /**
17
+ * ThemeProvider is used to provide theme-related context to its child components.
18
+ */
19
+ export declare function ThemeProvider({ colorMode, children, ...rest }: PropsWithChildren<ThemeProviderProps>): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './ThemeProvider';
2
+ export { useTheme } from './useTheme';
@@ -0,0 +1 @@
1
+ export declare const useTheme: () => import("./ThemeProvider").ThemeContextProps;
@@ -0,0 +1 @@
1
+ export {};