@primer/react-brand 0.2.0 → 0.3.0-rc.46d8768

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 (73) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/lib/River/River.d.ts +3 -3
  3. package/lib/css/main.css +82 -82
  4. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  5. package/lib/design-tokens/css/tokens/base/colors/color-scales.css +1 -1
  6. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  7. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  8. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  9. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  10. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  11. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  12. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  13. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  14. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  15. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  16. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  17. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  18. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  19. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  20. package/lib/design-tokens/js/module/tokens/base/colors/color-scales.js +1 -1
  21. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  22. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  23. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  24. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  25. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  26. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  27. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  28. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  29. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  30. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  31. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  32. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  33. package/lib/design-tokens/js/tokens/base/colors/color-scales.js +1 -1
  34. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  35. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  36. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  37. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  38. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  39. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  40. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  41. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  42. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  43. package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
  44. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  45. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  46. package/lib/design-tokens/ts/tokens/base/colors/color-scales.d.ts +1 -1
  47. package/lib/design-tokens/ts/tokens/base/colors/color-scales.js +1 -1
  48. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  49. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  50. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  51. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  52. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  53. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  54. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  55. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  56. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  57. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  58. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  59. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  60. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  61. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  62. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  63. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  64. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  65. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  66. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  67. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  68. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  69. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  70. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  71. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  72. package/lib/index.js +1 -1
  73. package/package.json +2 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,168 @@
1
+ # @primer/react-brand
2
+
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#45](https://github.com/primer/react-brand/pull/45) [`2fb6924`](https://github.com/primer/react-brand/commit/2fb6924a834ddcbad34cfb97ecfc1659d54f4ed5) Thanks [@rezrah](https://github.com/rezrah)! - > **Warning**
8
+
9
+ > This is a breaking change, but as the library is a pre-v1 release we are publishing this update as a `minor` change.
10
+ > Please read the following instructions carefully before updating:
11
+
12
+ ### Updated references for "left" and "right" to "start" and "end"
13
+
14
+ For improved i18n support and closer alignment with our Figma naming conventions, we have updated the references for "left" and "right" to "start" and "end" respectively in `Hero` and `River` components.
15
+
16
+ ```diff
17
+ - <River align="left">
18
+ - <River align="right">
19
+ + <River align="start">
20
+ + <River align="end">
21
+ ```
22
+
23
+ ## 0.2.1
24
+
25
+ ### Patch Changes
26
+
27
+ - [#38](https://github.com/primer/react-brand/pull/38) [`b0c9293`](https://github.com/primer/react-brand/commit/b0c929389d62f184e5ae447c0b00e351cb2d1c6e) Thanks [@rezrah](https://github.com/rezrah)! - updated `css-loader` to generate valid (escaped) class names
28
+
29
+ ## 0.2.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [#33](https://github.com/primer/react-brand/pull/33) [`662fcfc`](https://github.com/primer/react-brand/commit/662fcfc6d123460730317b7ddd3d3a4622d30dce) Thanks [@rezrah](https://github.com/rezrah)! - - Adds `River` component
34
+
35
+ - Renames `LinkButton` to `Button` :warning: (see below)
36
+ - Button supports polymorphism and can be used `as` either `a` or `button`
37
+
38
+ ### `River`
39
+
40
+ **NEW** Component :sparkles:
41
+
42
+ <table>
43
+ <tr>
44
+ <th> Before</th> <th> After</th>
45
+ </tr>
46
+ <tr>
47
+ <td valign="top">❌</td>
48
+ <td valign="top">
49
+
50
+ ```jsx
51
+ // import {River} from "@primer/react-brand";
52
+
53
+ <River>
54
+ <River.Visual>
55
+ <img
56
+ src="https://via.placeholder.com/600x400/f5f5f5/f5f5f5.png"
57
+ alt="placeholder, blank area with an off-white background color"
58
+ />
59
+ </River.Visual>
60
+ <River.Content>
61
+ <Heading>Heading</Heading>
62
+ <Text>
63
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien sit ullamcorper id. Aliquam luctus sed turpis
64
+ felis nam pulvinar risus elementum.
65
+ </Text>
66
+ <Link href="#">Call to action</Link>
67
+ </River.Content>
68
+ </River>
69
+ ```
70
+
71
+ </td>
72
+ </tr>
73
+ </table>
74
+
75
+ See more examples in our documentation.
76
+ https://primer.style/react-brand/components/River
77
+
78
+ ### `LinkButton`
79
+
80
+ > **Warning**
81
+ > The changes below should be considered a breaking change for anyone relying on `LinkButton`, but as we are shipping a pre-v1 library, this has been marked as a `minor` release rather than `major`. Please remember to update your usage per the below example.
82
+
83
+ <table>
84
+ <tr>
85
+ <th> Before</th> <th> After</th>
86
+ </tr>
87
+ <tr>
88
+ <td valign="top">
89
+
90
+ ```jsx
91
+ //import { LinkButton } from '@primer/react-brand';
92
+
93
+ <LinkButton href="#">Sign up</LinkButton>
94
+ ```
95
+
96
+ </td>
97
+ <td valign="top">
98
+
99
+ ```jsx
100
+ //import { Button } from '@primer/react-brand';
101
+
102
+ <Button as="a" href="#">
103
+ Sign up
104
+ </Button>
105
+ ```
106
+
107
+ </td>
108
+ </tr>
109
+ <tr>
110
+ <td valign="top">
111
+
112
+ ❌
113
+
114
+ </td>
115
+ <td valign="top">
116
+
117
+ ```jsx
118
+ //import { Button } from '@primer/react-brand';
119
+
120
+ <Button onClick={handler}>Sign Up</Button>
121
+ ```
122
+
123
+ </td>
124
+ </tr>
125
+
126
+ </table>
127
+
128
+ ## 0.1.0
129
+
130
+ ### Minor Changes
131
+
132
+ - [#19](https://github.com/primer/react-brand/pull/19) [`3b22e9e`](https://github.com/primer/react-brand/commit/3b22e9e0823401104d6e33b3c4f8664b755ea6ba) Thanks [@colebemis](https://github.com/colebemis)! - Add `size` prop to `Hero` component
133
+
134
+ ### Patch Changes
135
+
136
+ - [#23](https://github.com/primer/react-brand/pull/23) [`77abf53`](https://github.com/primer/react-brand/commit/77abf535e77ef26fa29fb09d6d2dfb746f4bc383) Thanks [@rezrah](https://github.com/rezrah)! - add Text and Heading components
137
+
138
+ * [#29](https://github.com/primer/react-brand/pull/29) [`144c7d7`](https://github.com/primer/react-brand/commit/144c7d762a91cb691699e4f8923ab08385c77966) Thanks [@rezrah](https://github.com/rezrah)! - Removed `gh-variables.css` from package as Brand variables are now surfaced in main.css
139
+
140
+ **To upgrade:**
141
+
142
+ - _Remove_ `import "@primer/react-brand/lib/css/gh-variables.css"`
143
+
144
+ - _Add_ `import "@primer/react-brand/lib/css/main.css"`
145
+
146
+ - [#23](https://github.com/primer/react-brand/pull/23) [`77abf53`](https://github.com/primer/react-brand/commit/77abf535e77ef26fa29fb09d6d2dfb746f4bc383) Thanks [@rezrah](https://github.com/rezrah)! - forward className in Hero
147
+
148
+ * [#25](https://github.com/primer/react-brand/pull/25) [`4b00b72`](https://github.com/primer/react-brand/commit/4b00b72f5dbf5e578351ea77e1e74cddc69833e7) Thanks [@rezrah](https://github.com/rezrah)! - adds baseline tokens
149
+
150
+ - [#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.
151
+
152
+ * [#27](https://github.com/primer/react-brand/pull/27) [`ca2d300`](https://github.com/primer/react-brand/commit/ca2d3002ba6f7ca9c719f80077c4d95246f33410) Thanks [@rezrah](https://github.com/rezrah)! - Updated Hero text appearance
153
+
154
+ - **updated** Hero description text size from `500` to `400`
155
+ - **updated** button alignment to not stretch on mobile viewports
156
+ - **removed** `size` prop. Now only one responsive size available.
157
+
158
+ ## 0.0.3
159
+
160
+ ### Patch Changes
161
+
162
+ - [#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
163
+
164
+ ## 0.0.2
165
+
166
+ ### Patch Changes
167
+
168
+ - [#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)
@@ -18,12 +18,12 @@ export declare type RiverProps = {
18
18
  */
19
19
  imageTextRatio?: '60:40' | '50:50';
20
20
  /**
21
- * Adjust the order of the `Content` column. The default is `left`.
21
+ * Adjust the order of the `Content` column. The default is `start`.
22
22
  */
23
- align?: 'left' | 'right' | 'center';
23
+ align?: 'start' | 'end' | 'center';
24
24
  };
25
25
  export declare const defaultRiverImageTextRatio = "50:50";
26
- export declare const defaultRiverAlign = "left";
26
+ export declare const defaultRiverAlign = "start";
27
27
  declare function Root({ imageTextRatio, align, className, children, ...rest }: RiverProps): JSX.Element;
28
28
  declare type RiverContentProps = {
29
29
  /**