@primer/react-brand 0.2.1-rc.66a41f5 → 0.3.0-rc.9ff153e

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 +20 -0
  2. package/lib/River/River.d.ts +3 -3
  3. package/lib/css/main.css +11 -11
  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 +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @primer/react-brand
2
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
+
3
23
  ## 0.2.1
4
24
 
5
25
  ### Patch Changes
@@ -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
  /**
package/lib/css/main.css CHANGED
@@ -91,7 +91,7 @@ select {
91
91
 
92
92
  /**
93
93
  * Do not edit directly
94
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
94
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
95
95
  */
96
96
 
97
97
  :root {
@@ -897,7 +897,7 @@ select {
897
897
 
898
898
  /**
899
899
  * Do not edit directly
900
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
900
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
901
901
  */
902
902
 
903
903
  :root {
@@ -922,7 +922,7 @@ select {
922
922
 
923
923
  /**
924
924
  * Do not edit directly
925
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
925
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
926
926
  */
927
927
 
928
928
  :root {
@@ -1089,7 +1089,7 @@ select {
1089
1089
 
1090
1090
  /**
1091
1091
  * Do not edit directly
1092
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
1092
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
1093
1093
  */
1094
1094
 
1095
1095
  :root {
@@ -1103,7 +1103,7 @@ select {
1103
1103
 
1104
1104
  /**
1105
1105
  * Do not edit directly
1106
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
1106
+ * Generated on Thu, 30 Jun 2022 12:33:17 GMT
1107
1107
  */
1108
1108
 
1109
1109
  :root {
@@ -1290,7 +1290,7 @@ select {
1290
1290
 
1291
1291
  /**
1292
1292
  * Do not edit directly
1293
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
1293
+ * Generated on Thu, 30 Jun 2022 12:33:17 GMT
1294
1294
  */
1295
1295
 
1296
1296
  :root {
@@ -1429,7 +1429,7 @@ select {
1429
1429
 
1430
1430
  /**
1431
1431
  * Do not edit directly
1432
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
1432
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
1433
1433
  */
1434
1434
 
1435
1435
  :root {
@@ -1439,7 +1439,7 @@ select {
1439
1439
 
1440
1440
  /**
1441
1441
  * Do not edit directly
1442
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
1442
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
1443
1443
  */
1444
1444
 
1445
1445
  :root {
@@ -1505,15 +1505,15 @@ select {
1505
1505
  grid-template-columns: [content] calc(40% - var(--base-size-12)) [visual] calc(60% - var(--base-size-12));
1506
1506
  }
1507
1507
 
1508
- .Primer_Brand__River-module__River--align-left___sOE5L {
1508
+ .Primer_Brand__River-module__River--align-start___L0mn_ {
1509
1509
  grid-template-areas: 'content visual';
1510
1510
  }
1511
1511
 
1512
- .Primer_Brand__River-module__River--align-right___J45pe {
1512
+ .Primer_Brand__River-module__River--align-end___UIM3e {
1513
1513
  grid-template-areas: 'visual content';
1514
1514
  }
1515
1515
 
1516
- .Primer_Brand__River-module__River--align-right___J45pe.Primer_Brand__River-module__River--60-40___XDKAU {
1516
+ .Primer_Brand__River-module__River--align-end___UIM3e.Primer_Brand__River-module__River--60-40___XDKAU {
1517
1517
  grid-template-columns: [visual] calc(60% - var(--base-size-12)) [content] calc(40% - var(--base-size-12));
1518
1518
  }
1519
1519
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:17 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:17 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  @media (pointer: coarse) { :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  @media (pointer: fine) { :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BaseColorScaleGray0 = "210 25% 98%";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BaseSize4 = "0.25rem";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BaseTextWeightLight = 300;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandColorTextDefault = "var(--base-color-scale-gray-9)";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandHeroNarrowPadding = "var(--base-size-96) 0";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandRiverLayoutMarginVertical = "var(--base-size-48) 0";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandBorderInsetThin = "inset 0 0 0 max(1px, 0.0625rem)";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandBreakpointXsmall = "20rem";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandControlMinTargetAuto = "2.75rem";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandControlMinTargetAuto = "1rem";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandControlMinTargetFine = "1rem";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandViewportRangeNarrow = "(max-width: calc(48rem - 0.02px))";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  export const BrandFontStackSystem = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 16 Jun 2022 14:28:12 GMT
3
+ * Generated on Thu, 30 Jun 2022 12:33:16 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define("@primer/react-brand",[],r):"object"==typeof exports?exports["@primer/react-brand"]=r(require("react")):e["@primer/react-brand"]=r(e.React)}(this,(e=>(()=>{"use strict";var r={418:e=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach((function(e){_[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},_)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,o,l=a(e),d=1;d<arguments.length;d++){for(var s in i=Object(arguments[d]))n.call(i,s)&&(l[s]=i[s]);if(r){o=r(i);for(var u=0;u<o.length;u++)_.call(i,o[u])&&(l[o[u]]=i[o[u]])}}return l}},251:(e,r,n)=>{n(418);var _=n(697),a=60103;if("function"==typeof Symbol&&Symbol.for){var t=Symbol.for;a=t("react.element"),t("react.fragment")}var i=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,n){var _,t={},d=null,s=null;for(_ in void 0!==n&&(d=""+n),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(s=r.ref),r)o.call(r,_)&&!l.hasOwnProperty(_)&&(t[_]=r[_]);if(e&&e.defaultProps)for(_ in r=e.defaultProps)void 0===t[_]&&(t[_]=r[_]);return{$$typeof:a,type:e,key:d,ref:s,props:t,_owner:i.current}}r.jsx=d,r.jsxs=d},893:(e,r,n)=>{e.exports=n(251)},697:r=>{r.exports=e}},n={};function _(e){var a=n[e];if(void 0!==a)return a.exports;var t=n[e]={exports:{}};return r[e](t,t.exports,_),t.exports}_.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return _.d(r,{a:r}),r},_.d=(e,r)=>{for(var n in r)_.o(r,n)&&!_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},_.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),_.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{_.r(a),_.d(a,{Button:()=>h,ColorModesEnum:()=>H,Heading:()=>R,HeadingSizes:()=>B,HeadingTags:()=>y,Hero:()=>j,Link:()=>$,River:()=>V,Text:()=>x,TextSizes:()=>s,TextTags:()=>u,TextVariants:()=>c,ThemeContext:()=>L,ThemeProvider:()=>E,classMap:()=>T,defaultHeadingTag:()=>b,defaultRiverAlign:()=>A,defaultRiverImageTextRatio:()=>M,defaultTextSize:()=>v,defaultTextTag:()=>m,defaultTextVariant:()=>p,getHeadingWarning:()=>S,useTheme:()=>k});var e=_(893);function r(e){var n,_,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(_=r(e[n]))&&(a&&(a+=" "),a+=_);else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function n(){for(var e,n,_=0,a="";_<arguments.length;)(e=arguments[_++])&&(n=r(e))&&(a&&(a+=" "),a+=n);return a}const t={Hero:"Primer_Brand__Hero-module__Hero___EM3jf","Hero--align-start":"Primer_Brand__Hero-module__Hero--align-start___m8GEr","Hero--align-center":"Primer_Brand__Hero-module__Hero--align-center___HUXm3","Hero-heading":"Primer_Brand__Hero-module__Hero-heading___QuVBH","Hero-description":"Primer_Brand__Hero-module__Hero-description___vG4iA","Hero-actions":"Primer_Brand__Hero-module__Hero-actions___oH1NT"};var i=_(697),o=_.n(i);function l({className:r,expanded:_=!1}){return(0,e.jsxs)("svg",{className:n("Primer_Brand__ExpandableArrow-module__ExpandableArrow___rkfek",_&&"Primer_Brand__ExpandableArrow-module__ExpandableArrow--expanded___gajDr",r),width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,e.jsx)("path",{fill:"currentColor",d:"M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"}),(0,e.jsx)("path",{className:n("Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___g4mdy",_&&"Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem--expanded___KwI_9"),stroke:"currentColor",d:"M1.75 8H11",strokeWidth:"1.5",strokeLinecap:"round"})]})}const d={Text:"Primer_Brand__Text-module__Text___pecHN","Text--default":"Primer_Brand__Text-module__Text--default___DChoE","Text--muted":"Primer_Brand__Text-module__Text--muted___lTaVa","Text--700":"Primer_Brand__Text-module__Text--700___cOggy","Text--600":"Primer_Brand__Text-module__Text--600___ThppA","Text--500":"Primer_Brand__Text-module__Text--500___orDRu","Text--400":"Primer_Brand__Text-module__Text--400___y7m4l","Text--300":"Primer_Brand__Text-module__Text--300___TBQTB","Text--200":"Primer_Brand__Text-module__Text--200___XAIGT","Text--100":"Primer_Brand__Text-module__Text--100___csEom"},s=["700","600","500","400","300","200","100"],u=["p","span","div"],c=["default","muted"],m=u[1],v=s[3],p=c[0];function x({as:r=m,className:_,children:a,size:t=v,variant:i=p,...o}){const l=n(d.Text,d[`Text--${i}`],d[`Text--${t}`],_);return"p"===r?(0,e.jsx)("p",{className:l,...o,children:a}):"div"===r?(0,e.jsx)("div",{className:l,...o,children:a}):(0,e.jsx)("span",{className:l,...o,children:a})}const f={Button:"Primer_Brand__Button-module__Button___lDruK","Button--label":"Primer_Brand__Button-module__Button--label___lUBc0","Button-arrow":"Primer_Brand__Button-module__Button-arrow___SkJXQ","Button--primary":"Primer_Brand__Button-module__Button--primary___xIC7G","Button--label-primary":"Primer_Brand__Button-module__Button--label-primary___Leisi","Button--secondary":"Primer_Brand__Button-module__Button--secondary___akMC2"};function h({as:r,variant:_="secondary",className:a,children:t,onMouseEnter:i,onMouseLeave:d,onFocus:s,onBlur:u,...c}){const[m,v]=o().useState(!1),[p,h]=o().useState(!1),g=r||"button";return(0,e.jsxs)(g,{className:n(f.Button,f[`Button--${_}`],a),onMouseEnter:e=>{v(!0),i?.(e)},onMouseLeave:e=>{v(!1),d?.(e)},onFocus:e=>{h(!0),s?.(e)},onBlur:e=>{h(!1),u?.(e)},...c,children:[(0,e.jsx)(x,{as:"span",size:"400",className:n(f["Button--label"],"primary"===_&&f["Button--label-primary"]),children:t}),(0,e.jsx)(l,{className:f["Button-arrow"],expanded:m||p})]})}const g={Heading:"Primer_Brand__Heading-module__Heading___IVpmp","Heading--1":"Primer_Brand__Heading-module__Heading--1___Ufc7G","Heading--2":"Primer_Brand__Heading-module__Heading--2___TFg09","Heading--3":"Primer_Brand__Heading-module__Heading--3___wsITu","Heading--4":"Primer_Brand__Heading-module__Heading--4___C9jDG","Heading--5":"Primer_Brand__Heading-module__Heading--5___HgypG","Heading--6":"Primer_Brand__Heading-module__Heading--6___FEQ_V"},B=["1","2","3","4","5","6"],y=["h1","h2","h3","h4","h5","h6"],b=y[1],T={h1:B[0],h2:B[1],h3:B[2],h4:B[3],h5:B[4],h6:B[5]};function R({className:r,children:_,as:a=b,...t}){const i=n(r,g.Heading,g[`Heading--${T[a]}`]),l=o().useCallback((({...e})=>y.includes(a)?o().createElement(a,e,_):(console.error(`Heading: 'as' prop must be one of ${y.join(", ")}`),null)),[a,_]);return(0,e.jsx)(l,{className:i,...t,children:_})}function j({className:r,heading:_,description:a,primaryAction:i,secondaryAction:o,align:l="start"}){return(0,e.jsxs)("div",{className:n(t.Hero,t[`Hero--align-${l}`],r),children:[(0,e.jsx)(R,{className:t["Hero-heading"],as:"h1",children:_}),a?(0,e.jsx)(x,{className:t["Hero-description"],as:"p",size:"400",variant:"muted",children:a}):null,(0,e.jsxs)("div",{className:t["Hero-actions"],children:[(0,e.jsx)(h,{as:"a",variant:"primary",href:i.href,children:i.text}),o?(0,e.jsx)(h,{as:"a",variant:"secondary",href:o.href,children:o.text}):null]})]})}var H;!function(e){e.LIGHT="light",e.DARK="dark",e.AUTO="auto"}(H||(H={}));const P=H.LIGHT,L=(0,i.createContext)({colorMode:P,availableColorModes:Object.values(H)});function E({colorMode:r=P,children:n,..._}){const[a,t]=(0,i.useState)(r),o=(0,i.useMemo)((()=>Object.values(H)),[]);return(0,i.useEffect)((()=>(r===H.AUTO?t(N()):a!==r&&t(r),C(t))),[r,a,t]),(0,e.jsx)(L.Provider,{value:{colorMode:a,availableColorModes:o},children:(0,e.jsx)("div",{"data-color-mode":a,..._,children:n})})}const w=()=>window.matchMedia(`(prefers-color-scheme: ${H.DARK})`),N=()=>w().matches?H.DARK:H.LIGHT,C=e=>{const r=w(),n=r=>e(r.matches?H.DARK:H.LIGHT);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},k=()=>(0,i.useContext)(L),O={River:"Primer_Brand__River-module__River___VHPl5",River__visual:"Primer_Brand__River-module__River__visual___sTe_U","River--align-center":"Primer_Brand__River-module__River--align-center___TH7xI","River__visual--has-shadow":"Primer_Brand__River-module__River__visual--has-shadow___cL9nP",River__heading:"Primer_Brand__River-module__River__heading___pwKXi","River__call-to-action":"Primer_Brand__River-module__River__call-to-action___GIOCe",River__text:"Primer_Brand__River-module__River__text___ZlR1K","River--50-50":"Primer_Brand__River-module__River--50-50___cpSFU","River--60-40":"Primer_Brand__River-module__River--60-40___XDKAU","River--align-left":"Primer_Brand__River-module__River--align-left___sOE5L","River--align-right":"Primer_Brand__River-module__River--align-right___J45pe",River__content:"Primer_Brand__River-module__River__content___opQUA","River__body-text":"Primer_Brand__River-module__River__body-text___tt2Yf"},M="50:50",A="left",S=e=>`River.Content does not accept a Heading with as="${e}". River automatically applies as="h3" by default.`,V=Object.assign((function({imageTextRatio:r=M,align:_=A,className:a,children:t,...i}){const{Visual:l,Content:d}=o().Children.toArray(t).reduce(((e,r)=>(!o().isValidElement(r)||"string"==typeof r.type||"Visual"!==r.type.name&&"Content"!==r.type.name||(e[r.type.name]=r),e)),{Visual:null,Content:null}),s="left"===_||"center"===_?[d,l]:[l,d];return(0,e.jsx)("section",{className:n(O.River,O[`River--${r.replace(":","-")}`],O[`River--align-${_}`],a),...i,children:s})}),{Visual:function({children:r,className:_,hasShadow:a=!0}){return(0,e.jsx)("div",{className:n(O.River__visual,a&&O["River__visual--has-shadow"],_),children:r})},Content:function({children:r,leadingComponent:_,trailingComponent:a}){const t=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===R)),i=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===x)),l=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===$));return(0,e.jsxs)("div",{className:O.River__content,children:[_&&(0,e.jsx)("div",{children:(0,e.jsx)(_,{})}),o().isValidElement(t)&&(0,e.jsx)("div",{className:O.River__heading,children:o().cloneElement(t,{as:(e=>{const{as:r}=e.props;return r&&y.includes(r)&&"h3"!==r&&console.warn(S(r)),"h3"})(t)})}),o().isValidElement(i)&&(0,e.jsx)("div",{className:O["River__body-text"],children:o().cloneElement(i,{variant:"muted",as:"p",className:n(O.River__text,i.props.className)})}),o().isValidElement(l)&&(0,e.jsx)("div",{className:O["River__call-to-action"],children:o().cloneElement(l,{size:"large"})}),a&&(0,e.jsx)("div",{children:(0,e.jsx)(a,{})})]})}}),I={Link:"Primer_Brand__Link-module__Link___lvKjM","Link--label":"Primer_Brand__Link-module__Link--label___j8etE","Link-arrow":"Primer_Brand__Link-module__Link-arrow___HBMJ9","Link--large":"Primer_Brand__Link-module__Link--large___cXMt5"};function $({size:r="medium",className:_,children:a,onMouseEnter:t,onMouseLeave:d,onFocus:s,onBlur:u,...c}){const[m,v]=o().useState(!1),[p,f]=o().useState(!1),h=(0,i.useCallback)((e=>{v(!m),t?.(e)}),[t,m]),g=(0,i.useCallback)((e=>{v(!m),d?.(e)}),[d,m]),B=(0,i.useCallback)((e=>{f(!p),s?.(e)}),[s,p]),y=(0,i.useCallback)((e=>{f(!p),u?.(e)}),[u,p]);return(0,e.jsxs)("a",{className:n(I.Link,I[`Link--${r}`],_),onMouseEnter:h,onMouseLeave:g,onFocus:B,onBlur:y,...c,children:[(0,e.jsx)(x,{as:"span",size:{medium:"300",large:"400"}[r],className:n(I["Link--label"]),children:a}),(0,e.jsx)(l,{className:I["Link-arrow"],expanded:m||p})]})}})(),a})()));
2
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define("@primer/react-brand",[],r):"object"==typeof exports?exports["@primer/react-brand"]=r(require("react")):e["@primer/react-brand"]=r(e.React)}(this,(e=>(()=>{"use strict";var r={418:e=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach((function(e){_[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},_)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,o,l=a(e),d=1;d<arguments.length;d++){for(var s in i=Object(arguments[d]))n.call(i,s)&&(l[s]=i[s]);if(r){o=r(i);for(var u=0;u<o.length;u++)_.call(i,o[u])&&(l[o[u]]=i[o[u]])}}return l}},251:(e,r,n)=>{n(418);var _=n(697),a=60103;if("function"==typeof Symbol&&Symbol.for){var t=Symbol.for;a=t("react.element"),t("react.fragment")}var i=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,n){var _,t={},d=null,s=null;for(_ in void 0!==n&&(d=""+n),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(s=r.ref),r)o.call(r,_)&&!l.hasOwnProperty(_)&&(t[_]=r[_]);if(e&&e.defaultProps)for(_ in r=e.defaultProps)void 0===t[_]&&(t[_]=r[_]);return{$$typeof:a,type:e,key:d,ref:s,props:t,_owner:i.current}}r.jsx=d,r.jsxs=d},893:(e,r,n)=>{e.exports=n(251)},697:r=>{r.exports=e}},n={};function _(e){var a=n[e];if(void 0!==a)return a.exports;var t=n[e]={exports:{}};return r[e](t,t.exports,_),t.exports}_.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return _.d(r,{a:r}),r},_.d=(e,r)=>{for(var n in r)_.o(r,n)&&!_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},_.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),_.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{_.r(a),_.d(a,{Button:()=>f,ColorModesEnum:()=>H,Heading:()=>R,HeadingSizes:()=>B,HeadingTags:()=>y,Hero:()=>j,Link:()=>$,River:()=>V,Text:()=>x,TextSizes:()=>s,TextTags:()=>u,TextVariants:()=>c,ThemeContext:()=>L,ThemeProvider:()=>E,classMap:()=>T,defaultHeadingTag:()=>b,defaultRiverAlign:()=>A,defaultRiverImageTextRatio:()=>M,defaultTextSize:()=>v,defaultTextTag:()=>m,defaultTextVariant:()=>p,getHeadingWarning:()=>S,useTheme:()=>k});var e=_(893);function r(e){var n,_,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(_=r(e[n]))&&(a&&(a+=" "),a+=_);else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function n(){for(var e,n,_=0,a="";_<arguments.length;)(e=arguments[_++])&&(n=r(e))&&(a&&(a+=" "),a+=n);return a}const t={Hero:"Primer_Brand__Hero-module__Hero___EM3jf","Hero--align-start":"Primer_Brand__Hero-module__Hero--align-start___m8GEr","Hero--align-center":"Primer_Brand__Hero-module__Hero--align-center___HUXm3","Hero-heading":"Primer_Brand__Hero-module__Hero-heading___QuVBH","Hero-description":"Primer_Brand__Hero-module__Hero-description___vG4iA","Hero-actions":"Primer_Brand__Hero-module__Hero-actions___oH1NT"};var i=_(697),o=_.n(i);function l({className:r,expanded:_=!1}){return(0,e.jsxs)("svg",{className:n("Primer_Brand__ExpandableArrow-module__ExpandableArrow___rkfek",_&&"Primer_Brand__ExpandableArrow-module__ExpandableArrow--expanded___gajDr",r),width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,e.jsx)("path",{fill:"currentColor",d:"M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"}),(0,e.jsx)("path",{className:n("Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem___g4mdy",_&&"Primer_Brand__ExpandableArrow-module__ExpandableArrow-stem--expanded___KwI_9"),stroke:"currentColor",d:"M1.75 8H11",strokeWidth:"1.5",strokeLinecap:"round"})]})}const d={Text:"Primer_Brand__Text-module__Text___pecHN","Text--default":"Primer_Brand__Text-module__Text--default___DChoE","Text--muted":"Primer_Brand__Text-module__Text--muted___lTaVa","Text--700":"Primer_Brand__Text-module__Text--700___cOggy","Text--600":"Primer_Brand__Text-module__Text--600___ThppA","Text--500":"Primer_Brand__Text-module__Text--500___orDRu","Text--400":"Primer_Brand__Text-module__Text--400___y7m4l","Text--300":"Primer_Brand__Text-module__Text--300___TBQTB","Text--200":"Primer_Brand__Text-module__Text--200___XAIGT","Text--100":"Primer_Brand__Text-module__Text--100___csEom"},s=["700","600","500","400","300","200","100"],u=["p","span","div"],c=["default","muted"],m=u[1],v=s[3],p=c[0];function x({as:r=m,className:_,children:a,size:t=v,variant:i=p,...o}){const l=n(d.Text,d[`Text--${i}`],d[`Text--${t}`],_);return"p"===r?(0,e.jsx)("p",{className:l,...o,children:a}):"div"===r?(0,e.jsx)("div",{className:l,...o,children:a}):(0,e.jsx)("span",{className:l,...o,children:a})}const h={Button:"Primer_Brand__Button-module__Button___lDruK","Button--label":"Primer_Brand__Button-module__Button--label___lUBc0","Button-arrow":"Primer_Brand__Button-module__Button-arrow___SkJXQ","Button--primary":"Primer_Brand__Button-module__Button--primary___xIC7G","Button--label-primary":"Primer_Brand__Button-module__Button--label-primary___Leisi","Button--secondary":"Primer_Brand__Button-module__Button--secondary___akMC2"};function f({as:r,variant:_="secondary",className:a,children:t,onMouseEnter:i,onMouseLeave:d,onFocus:s,onBlur:u,...c}){const[m,v]=o().useState(!1),[p,f]=o().useState(!1),g=r||"button";return(0,e.jsxs)(g,{className:n(h.Button,h[`Button--${_}`],a),onMouseEnter:e=>{v(!0),i?.(e)},onMouseLeave:e=>{v(!1),d?.(e)},onFocus:e=>{f(!0),s?.(e)},onBlur:e=>{f(!1),u?.(e)},...c,children:[(0,e.jsx)(x,{as:"span",size:"400",className:n(h["Button--label"],"primary"===_&&h["Button--label-primary"]),children:t}),(0,e.jsx)(l,{className:h["Button-arrow"],expanded:m||p})]})}const g={Heading:"Primer_Brand__Heading-module__Heading___IVpmp","Heading--1":"Primer_Brand__Heading-module__Heading--1___Ufc7G","Heading--2":"Primer_Brand__Heading-module__Heading--2___TFg09","Heading--3":"Primer_Brand__Heading-module__Heading--3___wsITu","Heading--4":"Primer_Brand__Heading-module__Heading--4___C9jDG","Heading--5":"Primer_Brand__Heading-module__Heading--5___HgypG","Heading--6":"Primer_Brand__Heading-module__Heading--6___FEQ_V"},B=["1","2","3","4","5","6"],y=["h1","h2","h3","h4","h5","h6"],b=y[1],T={h1:B[0],h2:B[1],h3:B[2],h4:B[3],h5:B[4],h6:B[5]};function R({className:r,children:_,as:a=b,...t}){const i=n(r,g.Heading,g[`Heading--${T[a]}`]),l=o().useCallback((({...e})=>y.includes(a)?o().createElement(a,e,_):(console.error(`Heading: 'as' prop must be one of ${y.join(", ")}`),null)),[a,_]);return(0,e.jsx)(l,{className:i,...t,children:_})}function j({className:r,heading:_,description:a,primaryAction:i,secondaryAction:o,align:l="start"}){return(0,e.jsxs)("div",{className:n(t.Hero,t[`Hero--align-${l}`],r),children:[(0,e.jsx)(R,{className:t["Hero-heading"],as:"h1",children:_}),a?(0,e.jsx)(x,{className:t["Hero-description"],as:"p",size:"400",variant:"muted",children:a}):null,(0,e.jsxs)("div",{className:t["Hero-actions"],children:[(0,e.jsx)(f,{as:"a",variant:"primary",href:i.href,children:i.text}),o?(0,e.jsx)(f,{as:"a",variant:"secondary",href:o.href,children:o.text}):null]})]})}var H;!function(e){e.LIGHT="light",e.DARK="dark",e.AUTO="auto"}(H||(H={}));const P=H.LIGHT,L=(0,i.createContext)({colorMode:P,availableColorModes:Object.values(H)});function E({colorMode:r=P,children:n,..._}){const[a,t]=(0,i.useState)(r),o=(0,i.useMemo)((()=>Object.values(H)),[]);return(0,i.useEffect)((()=>(r===H.AUTO?t(N()):a!==r&&t(r),C(t))),[r,a,t]),(0,e.jsx)(L.Provider,{value:{colorMode:a,availableColorModes:o},children:(0,e.jsx)("div",{"data-color-mode":a,..._,children:n})})}const w=()=>window.matchMedia(`(prefers-color-scheme: ${H.DARK})`),N=()=>w().matches?H.DARK:H.LIGHT,C=e=>{const r=w(),n=r=>e(r.matches?H.DARK:H.LIGHT);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},k=()=>(0,i.useContext)(L),O={River:"Primer_Brand__River-module__River___VHPl5",River__visual:"Primer_Brand__River-module__River__visual___sTe_U","River--align-center":"Primer_Brand__River-module__River--align-center___TH7xI","River__visual--has-shadow":"Primer_Brand__River-module__River__visual--has-shadow___cL9nP",River__heading:"Primer_Brand__River-module__River__heading___pwKXi","River__call-to-action":"Primer_Brand__River-module__River__call-to-action___GIOCe",River__text:"Primer_Brand__River-module__River__text___ZlR1K","River--50-50":"Primer_Brand__River-module__River--50-50___cpSFU","River--60-40":"Primer_Brand__River-module__River--60-40___XDKAU","River--align-start":"Primer_Brand__River-module__River--align-start___L0mn_","River--align-end":"Primer_Brand__River-module__River--align-end___UIM3e",River__content:"Primer_Brand__River-module__River__content___opQUA","River__body-text":"Primer_Brand__River-module__River__body-text___tt2Yf"},M="50:50",A="start",S=e=>`River.Content does not accept a Heading with as="${e}". River automatically applies as="h3" by default.`,V=Object.assign((function({imageTextRatio:r=M,align:_=A,className:a,children:t,...i}){const{Visual:l,Content:d}=o().Children.toArray(t).reduce(((e,r)=>(!o().isValidElement(r)||"string"==typeof r.type||"Visual"!==r.type.name&&"Content"!==r.type.name||(e[r.type.name]=r),e)),{Visual:null,Content:null}),s="start"===_||"center"===_?[d,l]:[l,d];return(0,e.jsx)("section",{className:n(O.River,O[`River--${r.replace(":","-")}`],O[`River--align-${_}`],a),...i,children:s})}),{Visual:function({children:r,className:_,hasShadow:a=!0}){return(0,e.jsx)("div",{className:n(O.River__visual,a&&O["River__visual--has-shadow"],_),children:r})},Content:function({children:r,leadingComponent:_,trailingComponent:a}){const t=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===R)),i=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===x)),l=o().Children.toArray(r).find((e=>o().isValidElement(e)&&e.type===$));return(0,e.jsxs)("div",{className:O.River__content,children:[_&&(0,e.jsx)("div",{children:(0,e.jsx)(_,{})}),o().isValidElement(t)&&(0,e.jsx)("div",{className:O.River__heading,children:o().cloneElement(t,{as:(e=>{const{as:r}=e.props;return r&&y.includes(r)&&"h3"!==r&&console.warn(S(r)),"h3"})(t)})}),o().isValidElement(i)&&(0,e.jsx)("div",{className:O["River__body-text"],children:o().cloneElement(i,{variant:"muted",as:"p",className:n(O.River__text,i.props.className)})}),o().isValidElement(l)&&(0,e.jsx)("div",{className:O["River__call-to-action"],children:o().cloneElement(l,{size:"large"})}),a&&(0,e.jsx)("div",{children:(0,e.jsx)(a,{})})]})}}),I={Link:"Primer_Brand__Link-module__Link___lvKjM","Link--label":"Primer_Brand__Link-module__Link--label___j8etE","Link-arrow":"Primer_Brand__Link-module__Link-arrow___HBMJ9","Link--large":"Primer_Brand__Link-module__Link--large___cXMt5"};function $({size:r="medium",className:_,children:a,onMouseEnter:t,onMouseLeave:d,onFocus:s,onBlur:u,...c}){const[m,v]=o().useState(!1),[p,h]=o().useState(!1),f=(0,i.useCallback)((e=>{v(!m),t?.(e)}),[t,m]),g=(0,i.useCallback)((e=>{v(!m),d?.(e)}),[d,m]),B=(0,i.useCallback)((e=>{h(!p),s?.(e)}),[s,p]),y=(0,i.useCallback)((e=>{h(!p),u?.(e)}),[u,p]);return(0,e.jsxs)("a",{className:n(I.Link,I[`Link--${r}`],_),onMouseEnter:f,onMouseLeave:g,onFocus:B,onBlur:y,...c,children:[(0,e.jsx)(x,{as:"span",size:{medium:"300",large:"400"}[r],className:n(I["Link--label"]),children:a}),(0,e.jsx)(l,{className:I["Link-arrow"],expanded:m||p})]})}})(),a})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/react-brand",
3
- "version": "0.2.1-rc.66a41f5",
3
+ "version": "0.3.0-rc.9ff153e",
4
4
  "author": "GitHub, Inc.",
5
5
  "license": "MIT",
6
6
  "bugs": {