@primer/react-brand 0.3.0 → 0.4.0-rc.420e2e9

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 (135) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/README.md +25 -9
  3. package/lib/Accordion/Accordion.d.ts +9 -9
  4. package/lib/Accordion/Accordion.visual.spec.d.ts +1 -0
  5. package/lib/Button/Button.d.ts +6 -2
  6. package/lib/Button/Button.visual.spec.d.ts +1 -0
  7. package/lib/ExpandableArrow/ExpandableArrow.visual.spec.d.ts +1 -0
  8. package/lib/FAQ/FAQ.d.ts +14 -15
  9. package/lib/FAQ/FAQ.visual.spec.d.ts +1 -0
  10. package/lib/Heading/Heading.d.ts +4 -3
  11. package/lib/Heading/Heading.visual.spec.d.ts +1 -0
  12. package/lib/Hero/Hero.d.ts +3 -3
  13. package/lib/Hero/Hero.visual.spec.d.ts +1 -0
  14. package/lib/InlineLink/InlineLink.d.ts +4 -7
  15. package/lib/InlineLink/InlineLink.visual.spec.d.ts +1 -0
  16. package/lib/Link/Link.visual.spec.d.ts +1 -0
  17. package/lib/MonaSans/MonaSans.visual.spec.d.ts +1 -0
  18. package/lib/River/River.d.ts +52 -16
  19. package/lib/River/River.visual.spec.d.ts +1 -0
  20. package/lib/Text/Text.visual.spec.d.ts +1 -0
  21. package/lib/ThemeProvider/ThemeProvider.visual.spec.d.ts +1 -0
  22. package/lib/component-helpers.d.ts +21 -3
  23. package/lib/css/main.css +788 -19
  24. package/lib/css/stylesheets.d.ts +1 -0
  25. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  26. package/lib/design-tokens/css/tokens/base/colors/color-scales.css +1 -1
  27. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  28. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  29. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +25 -1
  30. package/lib/design-tokens/css/tokens/functional/colors/global.css +9 -1
  31. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  32. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  33. package/lib/design-tokens/css/tokens/functional/components/control/base.css +18 -0
  34. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +55 -0
  35. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  36. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  37. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  38. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  39. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  40. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  41. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  42. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  43. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  44. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  45. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  46. package/lib/design-tokens/css/tokens/functional/size/size.css +3 -5
  47. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  48. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  49. package/lib/design-tokens/js/module/tokens/base/colors/color-scales.js +1 -1
  50. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  51. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  52. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +149 -1
  53. package/lib/design-tokens/js/module/tokens/functional/components/control/base.js +195 -0
  54. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  55. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  56. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  57. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  58. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  59. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  60. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  61. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  62. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  63. package/lib/design-tokens/js/module/tokens/functional/size/size.js +3 -35
  64. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  65. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  66. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  67. package/lib/design-tokens/js/tokens/base/colors/color-scales.js +1 -1
  68. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  69. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  70. package/lib/design-tokens/js/tokens/functional/colors/global.js +9 -1
  71. package/lib/design-tokens/js/tokens/functional/components/control/base.js +16 -0
  72. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  73. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  74. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  75. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  76. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  77. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  78. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  79. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  80. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  81. package/lib/design-tokens/js/tokens/functional/size/size.js +3 -5
  82. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  83. package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
  84. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  85. package/lib/design-tokens/ts/tokens/base/colors/color-scales.d.ts +1 -1
  86. package/lib/design-tokens/ts/tokens/base/colors/color-scales.js +1 -1
  87. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  88. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  89. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  90. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  91. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +13 -1
  92. package/lib/design-tokens/ts/tokens/functional/colors/global.js +13 -1
  93. package/lib/design-tokens/ts/tokens/functional/components/control/base.d.ts +31 -0
  94. package/lib/design-tokens/ts/tokens/functional/components/control/base.js +30 -0
  95. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  96. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  97. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  98. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  99. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  100. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  101. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  102. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  103. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  104. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  105. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  106. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  107. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  108. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  109. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  110. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  111. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  112. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  113. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -3
  114. package/lib/design-tokens/ts/tokens/functional/size/size.js +3 -5
  115. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  116. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  117. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  118. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  119. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  120. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  121. package/lib/forms/Checkbox/Checkbox.d.ts +57 -0
  122. package/lib/forms/Checkbox/forms.visual.spec.d.ts +1 -0
  123. package/lib/forms/Checkbox/index.d.ts +1 -0
  124. package/lib/forms/FormControl/FormControl.d.ts +57 -0
  125. package/lib/forms/FormControl/forms.visual.spec.d.ts +1 -0
  126. package/lib/forms/FormControl/index.d.ts +1 -0
  127. package/lib/forms/Select/Select.d.ts +58 -0
  128. package/lib/forms/Select/index.d.ts +1 -0
  129. package/lib/forms/TextInput/TextInput.d.ts +87 -0
  130. package/lib/forms/TextInput/index.d.ts +1 -0
  131. package/lib/forms/form-types.d.ts +2 -0
  132. package/lib/forms/index.d.ts +10 -0
  133. package/lib/index.d.ts +1 -0
  134. package/lib/index.js +1 -1
  135. package/package.json +26 -9
@@ -1,11 +1,23 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
7
7
  "brand": {
8
8
  "color": {
9
+ "success": {
10
+ "fg": string,
11
+ "emphasis": string,
12
+ "muted": string,
13
+ "subtle": string
14
+ },
15
+ "error": {
16
+ "fg": string,
17
+ "emphasis": string,
18
+ "muted": string,
19
+ "subtle": string
20
+ },
9
21
  "accent": {
10
22
  "fg": string,
11
23
  "emphasis": string,
@@ -1,11 +1,23 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
7
7
  "brand": {
8
8
  "color": {
9
+ "success": {
10
+ "fg": "var(--base-color-scale-green-5)",
11
+ "emphasis": "var(--base-color-scale-green-4)",
12
+ "muted": "hsl(var(--base-color-scale-green-3-hsl) / 60%)",
13
+ "subtle": "var(--base-color-scale-green-0)"
14
+ },
15
+ "error": {
16
+ "fg": "var(--base-color-scale-red-5)",
17
+ "emphasis": "var(--base-color-scale-red-5)",
18
+ "muted": "hsl(var(--base-color-scale-red-3-hsl) / 60%)",
19
+ "subtle": "var(--base-color-scale-red-0)"
20
+ },
9
21
  "accent": {
10
22
  "fg": "var(--base-color-scale-pink-5)",
11
23
  "emphasis": "var(--base-color-scale-pink-5)",
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 GMT
4
+ */
5
+
6
+ declare const tokens: {
7
+ "brand": {
8
+ "control": {
9
+ "medium": {
10
+ "size": string,
11
+ "padding": string,
12
+ "fontWeight": string,
13
+ "fontSize": string
14
+ },
15
+ "large": {
16
+ "size": string,
17
+ "padding": string,
18
+ "fontWeight": string,
19
+ "fontSize": string
20
+ },
21
+ "border": {
22
+ "radius": string
23
+ },
24
+ "animation": {
25
+ "duration": string,
26
+ "easing": string
27
+ }
28
+ }
29
+ }
30
+ }
31
+ export default tokens;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
+ */
5
+
6
+ module.exports = {
7
+ "brand": {
8
+ "control": {
9
+ "medium": {
10
+ "size": "2.5rem",
11
+ "padding": "0.625rem",
12
+ "fontWeight": "var(--brand-text-weight-200)",
13
+ "fontSize": "var(--brand-text-size-200)"
14
+ },
15
+ "large": {
16
+ "size": "var(--base-size-48)",
17
+ "padding": "var(--base-size-12)",
18
+ "fontWeight": "var(--brand-text-weight-300)",
19
+ "fontSize": "var(--brand-text-size-300)"
20
+ },
21
+ "border": {
22
+ "radius": "var(--brand-borderRadius-medium)"
23
+ },
24
+ "animation": {
25
+ "duration": "80ms",
26
+ "easing": "cubic-bezier(0.33, 1, 0.68, 1)"
27
+ }
28
+ }
29
+ }
30
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 GMT
4
4
  */
5
5
 
6
6
  declare const tokens: {
@@ -32,7 +32,6 @@ declare const tokens: {
32
32
  "gap": string
33
33
  },
34
34
  "medium": {
35
- "size": string,
36
35
  "lineBoxHeight": string,
37
36
  "paddingBlock": string,
38
37
  "paddingInline": {
@@ -43,7 +42,6 @@ declare const tokens: {
43
42
  "gap": string
44
43
  },
45
44
  "large": {
46
- "size": string,
47
45
  "lineBoxHeight": string,
48
46
  "paddingBlock": string,
49
47
  "paddingInline": {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -32,9 +32,8 @@ module.exports = {
32
32
  "gap": "0.25rem"
33
33
  },
34
34
  "medium": {
35
- "size": "2rem",
36
35
  "lineBoxHeight": "1.25rem",
37
- "paddingBlock": "calc((2rem - 1.25rem) / 2)",
36
+ "paddingBlock": "calc((2.5rem - 1.25rem) / 2)",
38
37
  "paddingInline": {
39
38
  "condensed": "0.5rem",
40
39
  "normal": "0.75rem",
@@ -43,9 +42,8 @@ module.exports = {
43
42
  "gap": "0.5rem"
44
43
  },
45
44
  "large": {
46
- "size": "2.5rem",
47
45
  "lineBoxHeight": "1.25rem",
48
- "paddingBlock": "calc((2.5rem - 1.25rem) / 2)",
46
+ "paddingBlock": "calc((var(--base-size-48) - 1.25rem) / 2)",
49
47
  "paddingInline": {
50
48
  "normal": "0.75rem",
51
49
  "spacious": "1rem"
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:23 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 Fri, 01 Jul 2022 09:59:37 GMT
3
+ * Generated on Mon, 12 Sep 2022 10:04:24 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -0,0 +1,57 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ import type { BaseProps } from '../../component-helpers';
3
+ import type { FormValidationStatus } from '../form-types';
4
+ export declare type CheckboxProps = {
5
+ /**
6
+ * Apply indeterminate visual appearance to the checkbox
7
+ */
8
+ indeterminate?: boolean;
9
+ /**
10
+ * Apply inactive visual appearance to the checkbox
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * Forward a ref to the underlying input element
15
+ */
16
+ ref?: React.RefObject<HTMLInputElement>;
17
+ /**
18
+ * Indicates whether the checkbox must be checked
19
+ */
20
+ required?: boolean;
21
+ /**
22
+ * Only used to inform ARIA attributes. Individual checkboxes do not have validation styles.
23
+ */
24
+ validationStatus?: FormValidationStatus;
25
+ /**
26
+ * A unique value that is never shown to the user.
27
+ * Used during form submission and to identify which checkbox inputs are selected
28
+ */
29
+ value?: string;
30
+ } & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'> & BaseProps<HTMLInputElement>;
31
+ export declare const Checkbox: React.ForwardRefExoticComponent<Pick<{
32
+ /**
33
+ * Apply indeterminate visual appearance to the checkbox
34
+ */
35
+ indeterminate?: boolean | undefined;
36
+ /**
37
+ * Apply inactive visual appearance to the checkbox
38
+ */
39
+ disabled?: boolean | undefined;
40
+ /**
41
+ * Forward a ref to the underlying input element
42
+ */
43
+ ref?: React.RefObject<HTMLInputElement> | undefined;
44
+ /**
45
+ * Indicates whether the checkbox must be checked
46
+ */
47
+ required?: boolean | undefined;
48
+ /**
49
+ * Only used to inform ARIA attributes. Individual checkboxes do not have validation styles.
50
+ */
51
+ validationStatus?: FormValidationStatus | undefined;
52
+ /**
53
+ * A unique value that is never shown to the user.
54
+ * Used during form submission and to identify which checkbox inputs are selected
55
+ */
56
+ value?: string | undefined;
57
+ } & React.InputHTMLAttributes<HTMLInputElement> & BaseProps<HTMLInputElement>, "value" | "children" | "className" | "id" | "form" | "slot" | "style" | "title" | "pattern" | "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-labelledby" | "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" | "list" | "size" | "type" | "step" | "alt" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "maxLength" | "minLength" | "src" | "indeterminate" | "required" | "validationStatus" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "min" | "name" | "readOnly" | "width"> & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1,57 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import type { BaseProps } from '../../component-helpers';
3
+ import type { FormValidationStatus, FormInputSizes } from '../';
4
+ export declare type FormControlProps = BaseProps<HTMLElement> & {
5
+ /**
6
+ * Namespaced children include: `FormControl.Label`, `FormControl.Hint`, `FormControl.Validation`, `TextInput`, `Select`, `Checkbox`.
7
+ */
8
+ children?: React.ReactElement[];
9
+ /**
10
+ * Apply a decorative border to the form control.
11
+ */
12
+ hasBorder?: boolean;
13
+ /**
14
+ * Applies full width styling.
15
+ */
16
+ fullWidth?: boolean;
17
+ /**
18
+ * A unique identifier for the form control.
19
+ * This is used to associate the form control with its associated label.
20
+ * If an id is not provided, a unique id will be generated.
21
+ */
22
+ id?: string;
23
+ /**
24
+ * Applies required styling to the label and input.
25
+ */
26
+ required?: boolean;
27
+ /**
28
+ * Alternative sizes for inputs and labels.
29
+ */
30
+ size?: FormInputSizes;
31
+ /**
32
+ * Provides contextual validation feedback to all children, showing relevant messaging where applicable.
33
+ */
34
+ validationStatus?: FormValidationStatus;
35
+ };
36
+ declare type FormControlLabelProps = {
37
+ htmlFor?: string;
38
+ required?: boolean;
39
+ showRequiredIndicator?: boolean;
40
+ size?: FormInputSizes;
41
+ validationStatus?: FormValidationStatus;
42
+ visuallyHidden?: boolean;
43
+ } & BaseProps<HTMLLabelElement>;
44
+ declare type FormControlValidationProps = {
45
+ children: string;
46
+ validationStatus?: FormValidationStatus;
47
+ } & BaseProps<HTMLSpanElement>;
48
+ /**
49
+ * FormControl
50
+ * {@link https://primer.style/brand/components/FormControl/ See usage examples}.
51
+ */
52
+ export declare const FormControl: (({ children, className, hasBorder, fullWidth, id, required, size, validationStatus, ...rest }: FormControlProps) => JSX.Element) & {
53
+ Label: ({ children, className, htmlFor, required, showRequiredIndicator, size, validationStatus, visuallyHidden, ...rest }: PropsWithChildren<FormControlLabelProps>) => JSX.Element;
54
+ Validation: ({ children, validationStatus }: FormControlValidationProps) => JSX.Element;
55
+ Hint: ({ children, className, ...rest }: PropsWithChildren<BaseProps<HTMLSpanElement>>) => JSX.Element;
56
+ };
57
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './FormControl';
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import type { BaseProps } from '../../component-helpers';
3
+ import type { FormInputSizes, FormValidationStatus } from '../form-types';
4
+ export declare type SelectProps = {
5
+ /**
6
+ * Applies full width styling.
7
+ */
8
+ fullWidth?: boolean;
9
+ /**
10
+ * Applies a required attribute to the input
11
+ */
12
+ required?: boolean;
13
+ /**
14
+ * Applies alternative sizing to the input
15
+ */
16
+ size?: FormInputSizes;
17
+ /**
18
+ *
19
+ */
20
+ validationStatus?: FormValidationStatus;
21
+ } & Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'size'> & BaseProps<HTMLSelectElement>;
22
+ export declare type OptionProps = {
23
+ value: string;
24
+ } & React.PropsWithChildren<React.HTMLProps<HTMLOptionElement>>;
25
+ export declare type OptGroupProps = {
26
+ /**
27
+ * Specifies that an option-group should be disabled
28
+ */
29
+ disabled?: string;
30
+ /**
31
+ * Specifies a label for an option-group
32
+ */
33
+ label: string;
34
+ } & React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>;
35
+ /**
36
+ * Select
37
+ */
38
+ export declare const Select: React.ForwardRefExoticComponent<Pick<{
39
+ /**
40
+ * Applies full width styling.
41
+ */
42
+ fullWidth?: boolean | undefined;
43
+ /**
44
+ * Applies a required attribute to the input
45
+ */
46
+ required?: boolean | undefined;
47
+ /**
48
+ * Applies alternative sizing to the input
49
+ */
50
+ size?: FormInputSizes | undefined;
51
+ /**
52
+ *
53
+ */
54
+ validationStatus?: FormValidationStatus | undefined;
55
+ } & Omit<React.InputHTMLAttributes<HTMLSelectElement>, "size"> & BaseProps<HTMLSelectElement>, "value" | "children" | "className" | "id" | "form" | "slot" | "style" | "title" | "pattern" | "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-labelledby" | "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" | "list" | "size" | "type" | "step" | "alt" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "maxLength" | "minLength" | "src" | "required" | "validationStatus" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "min" | "name" | "readOnly" | "width" | "fullWidth"> & React.RefAttributes<unknown>> & {
56
+ Option: ({ children, value, ...rest }: OptionProps) => JSX.Element;
57
+ OptGroup: ({ children, label, ...rest }: OptGroupProps) => JSX.Element;
58
+ };
@@ -0,0 +1 @@
1
+ export * from './Select';