primer_view_components 0.0.112 → 0.0.113

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/assets/styles/primer_view_components.css +3 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/action_list.css +1 -1
  8. data/app/components/primer/alpha/action_list.css.json +1 -1
  9. data/app/components/primer/alpha/action_list.css.map +1 -1
  10. data/app/components/primer/alpha/action_list.pcss +0 -15
  11. data/app/components/primer/alpha/auto_complete.css +1 -1
  12. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  13. data/app/components/primer/alpha/auto_complete.pcss +1 -1
  14. data/app/components/primer/alpha/banner.css +1 -1
  15. data/app/components/primer/alpha/banner.css.map +1 -1
  16. data/app/components/primer/alpha/banner.pcss +2 -2
  17. data/app/components/primer/alpha/dialog/body.rb +3 -0
  18. data/app/components/primer/alpha/dialog/footer.rb +3 -0
  19. data/app/components/primer/alpha/dialog/header.rb +3 -0
  20. data/app/components/primer/alpha/dialog.css +1 -0
  21. data/app/components/primer/alpha/dialog.css.json +1 -0
  22. data/app/components/primer/alpha/dialog.css.map +1 -0
  23. data/app/components/primer/alpha/dialog.pcss +484 -0
  24. data/app/components/primer/alpha/dialog.rb +3 -0
  25. data/app/components/primer/alpha/segmented_control.css +1 -1
  26. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  27. data/app/components/primer/alpha/text_field.css +3 -0
  28. data/app/components/primer/alpha/text_field.css.json +1 -0
  29. data/app/components/primer/alpha/text_field.css.map +1 -0
  30. data/app/components/primer/alpha/text_field.pcss +683 -0
  31. data/app/components/primer/alpha/toggle_switch.d.ts +1 -1
  32. data/app/components/primer/alpha/toggle_switch.js +7 -4
  33. data/app/components/primer/alpha/toggle_switch.ts +7 -3
  34. data/app/components/primer/beta/button_group.css +1 -0
  35. data/app/components/primer/beta/button_group.css.json +1 -0
  36. data/app/components/primer/beta/button_group.css.map +1 -0
  37. data/app/components/primer/beta/button_group.pcss +92 -0
  38. data/app/components/primer/{clipboard_copy.d.ts → beta/clipboard_copy.d.ts} +0 -0
  39. data/app/components/primer/{clipboard_copy.html.erb → beta/clipboard_copy.html.erb} +0 -0
  40. data/app/components/primer/{clipboard_copy.js → beta/clipboard_copy.js} +0 -0
  41. data/app/components/primer/beta/clipboard_copy.rb +50 -0
  42. data/app/components/primer/{clipboard_copy.ts → beta/clipboard_copy.ts} +0 -0
  43. data/app/components/primer/beta/popover.css.map +1 -1
  44. data/app/components/primer/beta/popover.pcss +5 -5
  45. data/app/components/primer/beta/relative_time.rb +160 -0
  46. data/app/components/primer/button_component.css +1 -0
  47. data/app/components/primer/button_component.css.json +1 -0
  48. data/app/components/primer/button_component.css.map +1 -0
  49. data/app/components/primer/button_component.pcss +557 -0
  50. data/app/components/primer/button_component.rb +1 -1
  51. data/app/components/primer/clipboard_copy.rb +2 -43
  52. data/app/components/primer/component.rb +4 -0
  53. data/app/components/primer/local_time.d.ts +1 -1
  54. data/app/components/primer/local_time.js +1 -1
  55. data/app/components/primer/local_time.rb +3 -1
  56. data/app/components/primer/local_time.ts +1 -1
  57. data/app/components/primer/primer.d.ts +1 -1
  58. data/app/components/primer/primer.js +1 -1
  59. data/app/components/primer/primer.pcss +10 -0
  60. data/app/components/primer/primer.ts +1 -1
  61. data/app/components/primer/time_ago_component.d.ts +1 -1
  62. data/app/components/primer/time_ago_component.js +1 -1
  63. data/app/components/primer/time_ago_component.rb +2 -1
  64. data/app/components/primer/time_ago_component.ts +1 -1
  65. data/app/forms/submit_button_form.rb +8 -2
  66. data/app/helpers/primer/form_helper.rb +12 -0
  67. data/lib/postcss_mixins/clearfix.pcss +12 -0
  68. data/lib/primer/deprecations.rb +96 -26
  69. data/lib/primer/deprecations.yml +68 -0
  70. data/lib/primer/forms/base.rb +7 -20
  71. data/lib/primer/forms/base_component.rb +15 -1
  72. data/lib/primer/forms/button.html.erb +4 -0
  73. data/lib/primer/forms/button.rb +68 -0
  74. data/lib/primer/forms/check_box.html.erb +2 -2
  75. data/lib/primer/forms/check_box.rb +1 -1
  76. data/lib/primer/forms/check_box_group.html.erb +2 -2
  77. data/lib/primer/forms/dsl/button_input.rb +29 -0
  78. data/lib/primer/forms/dsl/input_methods.rb +7 -2
  79. data/lib/primer/forms/dsl/submit_button_input.rb +1 -0
  80. data/lib/primer/forms/dsl/text_field_input.rb +0 -7
  81. data/lib/primer/forms/radio_button.html.erb +2 -2
  82. data/lib/primer/forms/radio_button.rb +1 -1
  83. data/lib/primer/forms/radio_button_group.html.erb +2 -2
  84. data/lib/primer/forms/select_list.html.erb +1 -1
  85. data/lib/primer/forms/select_list.rb +4 -1
  86. data/lib/primer/forms/submit_button.html.erb +1 -4
  87. data/lib/primer/forms/submit_button.rb +1 -37
  88. data/lib/primer/forms/text_area.html.erb +1 -1
  89. data/lib/primer/forms/text_area.rb +5 -1
  90. data/lib/primer/forms/text_field.html.erb +1 -1
  91. data/lib/primer/forms/text_field.rb +11 -0
  92. data/lib/primer/forms/utils.rb +28 -0
  93. data/lib/primer/view_components/audited.rb +14 -0
  94. data/lib/primer/view_components/engine.rb +1 -0
  95. data/lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb +2 -2
  96. data/lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb +3 -18
  97. data/lib/primer/view_components/version.rb +1 -1
  98. data/lib/rubocop/cop/primer/component_name_migration.rb +2 -2
  99. data/lib/tasks/docs.rake +3 -2
  100. data/previews/primer/alpha/auto_complete_preview.rb +12 -0
  101. data/previews/primer/alpha/segmented_control_preview.rb +9 -6
  102. data/previews/primer/alpha/text_field_preview.rb +77 -52
  103. data/previews/primer/beta/clipboard_copy_preview/element.html.erb +2 -0
  104. data/previews/primer/beta/clipboard_copy_preview.rb +39 -0
  105. data/previews/primer/beta/relative_time_preview.rb +271 -0
  106. data/previews/primer/forms/forms_preview.rb +1 -0
  107. data/static/arguments.json +143 -33
  108. data/static/audited_at.json +6 -4
  109. data/static/constants.json +124 -0
  110. data/static/statuses.json +4 -2
  111. metadata +34 -8
  112. data/previews/primer/clipboard_copy_preview/element.html.erb +0 -2
  113. data/previews/primer/clipboard_copy_preview.rb +0 -37
@@ -0,0 +1,271 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Setup Playground to use all available component props
4
+ # Setup Features to use individual component props and combinations
5
+
6
+ module Primer
7
+ module Beta
8
+ # @label RelativeTime
9
+ class RelativeTimePreview < ViewComponent::Preview
10
+ # @label Playground
11
+ # @param datetime datetime-local
12
+ # @param tense [Symbol] select [~, auto, past, future]
13
+ # @param prefix [String] text
14
+ # @param second [Symbol] select [~, numeric, two_digit]
15
+ # @param minute [Symbol] select [~, numeric, two_digit]
16
+ # @param hour [Symbol] select [~, numeric, two_digit]
17
+ # @param weekday [Symbol] select [~, long, short, narrow]
18
+ # @param day [Symbol] select [~, numeric, two_digit]
19
+ # @param month [Symbol] select [~, numeric, two_digit, short, long, narrow]
20
+ # @param year [Symbol] select [~, numeric, two_digit]
21
+ # @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
22
+ # @param precision [Symbol] select [~, second, minute, hour, day, month, year]
23
+ # @param format [Symbol] select [~, auto, micro, elapsed]
24
+ # @param lang [String] text
25
+ # @param title [String] text
26
+ def playground(
27
+ tense: nil,
28
+ prefix: nil,
29
+ second: nil,
30
+ minute: nil,
31
+ hour: nil,
32
+ weekday: nil,
33
+ day: nil,
34
+ month: nil,
35
+ year: nil,
36
+ time_zone_name: nil,
37
+ threshold: nil,
38
+ precision: nil,
39
+ format: nil,
40
+ datetime: Time.utc(2020, 1, 1, 0, 0, 0),
41
+ lang: nil,
42
+ title: nil
43
+ )
44
+ render(Primer::Beta::RelativeTime.new(
45
+ tense: tense,
46
+ prefix: prefix,
47
+ second: second,
48
+ minute: minute,
49
+ hour: hour,
50
+ weekday: weekday,
51
+ day: day,
52
+ month: month,
53
+ year: year,
54
+ time_zone_name: time_zone_name,
55
+ threshold: threshold,
56
+ precision: precision,
57
+ format: format,
58
+ datetime: datetime,
59
+ lang: lang,
60
+ title: title
61
+ ))
62
+ end
63
+
64
+ # @label Default
65
+ # @param datetime datetime-local
66
+ # @param tense [Symbol] select [~, auto, past, future]
67
+ # @param prefix [String] text
68
+ # @param second [Symbol] select [~, numeric, two_digit]
69
+ # @param minute [Symbol] select [~, numeric, two_digit]
70
+ # @param hour [Symbol] select [~, numeric, two_digit]
71
+ # @param weekday [Symbol] select [~, long, short, narrow]
72
+ # @param day [Symbol] select [~, numeric, two_digit]
73
+ # @param month [Symbol] select [~, numeric, two_digit, short, long, narrow]
74
+ # @param year [Symbol] select [~, numeric, two_digit]
75
+ # @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
76
+ # @param precision [Symbol] select [~, second, minute, hour, day, month, year]
77
+ # @param format [Symbol] select [~, auto, micro, elapsed]
78
+ # @param lang [String] text
79
+ # @param title [String] text
80
+ def default(
81
+ tense: nil,
82
+ prefix: nil,
83
+ second: nil,
84
+ minute: nil,
85
+ hour: nil,
86
+ weekday: nil,
87
+ day: nil,
88
+ month: nil,
89
+ year: nil,
90
+ time_zone_name: nil,
91
+ threshold: nil,
92
+ precision: nil,
93
+ format: nil,
94
+ datetime: Time.now.utc,
95
+ lang: nil,
96
+ title: nil
97
+ )
98
+ render(Primer::Beta::RelativeTime.new(
99
+ tense: tense,
100
+ prefix: prefix,
101
+ second: second,
102
+ minute: minute,
103
+ hour: hour,
104
+ weekday: weekday,
105
+ day: day,
106
+ month: month,
107
+ year: year,
108
+ time_zone_name: time_zone_name,
109
+ threshold: threshold,
110
+ precision: precision,
111
+ format: format,
112
+ datetime: datetime,
113
+ lang: lang,
114
+ title: title
115
+ ))
116
+ end
117
+
118
+ # @label Micro Format
119
+ # @param datetime datetime-local
120
+ # @param tense [Symbol] select [~, auto, past, future]
121
+ # @param prefix [String] text
122
+ # @param second [Symbol] select [~, numeric, two_digit]
123
+ # @param minute [Symbol] select [~, numeric, two_digit]
124
+ # @param hour [Symbol] select [~, numeric, two_digit]
125
+ # @param weekday [Symbol] select [~, long, short, narrow]
126
+ # @param day [Symbol] select [~, numeric, two_digit]
127
+ # @param month [Symbol] select [~, numeric, two_digit, short, long, narrow]
128
+ # @param year [Symbol] select [~, numeric, two_digit]
129
+ # @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
130
+ # @param precision [Symbol] select [~, second, minute, hour, day, month, year]
131
+ # @param lang [String] text
132
+ # @param title [String] text
133
+ def micro_format(
134
+ tense: nil,
135
+ prefix: nil,
136
+ second: nil,
137
+ minute: nil,
138
+ hour: nil,
139
+ weekday: nil,
140
+ day: nil,
141
+ month: nil,
142
+ year: nil,
143
+ time_zone_name: nil,
144
+ threshold: nil,
145
+ precision: nil,
146
+ datetime: Time.now.iso8601,
147
+ lang: nil,
148
+ title: nil
149
+ )
150
+ render(Primer::Beta::RelativeTime.new(
151
+ tense: tense,
152
+ prefix: prefix,
153
+ second: second,
154
+ minute: minute,
155
+ hour: hour,
156
+ weekday: weekday,
157
+ day: day,
158
+ month: month,
159
+ year: year,
160
+ time_zone_name: time_zone_name,
161
+ threshold: threshold,
162
+ precision: precision,
163
+ format: :micro,
164
+ datetime: datetime,
165
+ lang: lang,
166
+ title: title
167
+ ))
168
+ end
169
+
170
+ # @label Recent Time
171
+ # @param datetime datetime-local
172
+ # @param tense [Symbol] select [~, auto, past, future]
173
+ # @param prefix [String] text
174
+ # @param second [Symbol] select [~, numeric, two_digit]
175
+ # @param minute [Symbol] select [~, numeric, two_digit]
176
+ # @param hour [Symbol] select [~, numeric, two_digit]
177
+ # @param weekday [Symbol] select [~, long, short, narrow]
178
+ # @param day [Symbol] select [~, numeric, two_digit]
179
+ # @param month [Symbol] select [~, numeric, two_digit, short, long, narrow]
180
+ # @param year [Symbol] select [~, numeric, two_digit]
181
+ # @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
182
+ # @param precision [Symbol] select [~, second, minute, hour, day, month, year]
183
+ # @param format [Symbol] select [~, auto, micro, elapsed]
184
+ # @param lang [String] text
185
+ # @param title [String] text
186
+ def recent_time(
187
+ tense: nil,
188
+ prefix: nil,
189
+ second: nil,
190
+ minute: nil,
191
+ hour: nil,
192
+ weekday: nil,
193
+ day: nil,
194
+ month: nil,
195
+ year: nil,
196
+ time_zone_name: nil,
197
+ threshold: nil,
198
+ precision: nil,
199
+ format: nil,
200
+ datetime: Time.now.iso8601,
201
+ lang: nil,
202
+ title: nil
203
+ )
204
+ render(Primer::Beta::RelativeTime.new(
205
+ tense: tense,
206
+ prefix: prefix,
207
+ second: second,
208
+ minute: minute,
209
+ hour: hour,
210
+ weekday: weekday,
211
+ day: day,
212
+ month: month,
213
+ year: year,
214
+ time_zone_name: time_zone_name,
215
+ threshold: threshold,
216
+ precision: precision,
217
+ format: format,
218
+ datetime: datetime,
219
+ lang: lang,
220
+ title: title
221
+ ))
222
+ end
223
+
224
+ # @label Count Down Timer
225
+ # @param datetime datetime-local
226
+ # @param tense [Symbol] select [~, auto, past, future]
227
+ # @param prefix [String] text
228
+ # @param second [Symbol] select [~, numeric, two_digit]
229
+ # @param minute [Symbol] select [~, numeric, two_digit]
230
+ # @param hour [Symbol] select [~, numeric, two_digit]
231
+ # @param weekday [Symbol] select [~, long, short, narrow]
232
+ # @param year [Symbol] select [~, numeric, two_digit]
233
+ # @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
234
+ # @param precision [Symbol] select [~, second, minute, hour, day, month, year]
235
+ # @param lang [String] text
236
+ # @param title [String] text
237
+ def count_down_timer(
238
+ tense: nil,
239
+ prefix: nil,
240
+ second: nil,
241
+ minute: nil,
242
+ hour: nil,
243
+ weekday: nil,
244
+ year: nil,
245
+ time_zone_name: nil,
246
+ threshold: nil,
247
+ precision: nil,
248
+ datetime: Time.utc(2038, 1, 19, 0o3, 14, 8),
249
+ lang: nil,
250
+ title: nil
251
+ )
252
+ render(Primer::Beta::RelativeTime.new(
253
+ tense: tense,
254
+ prefix: prefix,
255
+ second: second,
256
+ minute: minute,
257
+ hour: hour,
258
+ weekday: weekday,
259
+ year: year,
260
+ time_zone_name: time_zone_name,
261
+ threshold: threshold,
262
+ precision: precision,
263
+ format: :elapsed,
264
+ datetime: datetime,
265
+ lang: lang,
266
+ title: title
267
+ ))
268
+ end
269
+ end
270
+ end
271
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Primer
4
4
  module Forms
5
+ # :nodoc:
5
6
  class FormsPreview < ViewComponent::Preview
6
7
  def single_text_field_form; end
7
8
 
@@ -1387,6 +1387,38 @@
1387
1387
  }
1388
1388
  ]
1389
1389
  },
1390
+ {
1391
+ "component": "ClipboardCopy",
1392
+ "status": "beta",
1393
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy.rb",
1394
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy/default/",
1395
+ "parameters": [
1396
+ {
1397
+ "name": "aria-label",
1398
+ "type": "String",
1399
+ "default": "N/A",
1400
+ "description": "String that will be read to screenreaders when the component is focused"
1401
+ },
1402
+ {
1403
+ "name": "value",
1404
+ "type": "String",
1405
+ "default": "`nil`",
1406
+ "description": "Text to copy into the users clipboard when they click the component."
1407
+ },
1408
+ {
1409
+ "name": "for",
1410
+ "type": "String",
1411
+ "default": "N/A",
1412
+ "description": "Element id from where to get the copied value."
1413
+ },
1414
+ {
1415
+ "name": "system_arguments",
1416
+ "type": "Hash",
1417
+ "default": "N/A",
1418
+ "description": "[System arguments](/system-arguments)"
1419
+ }
1420
+ ]
1421
+ },
1390
1422
  {
1391
1423
  "component": "CloseButton",
1392
1424
  "status": "beta",
@@ -1743,6 +1775,116 @@
1743
1775
  }
1744
1776
  ]
1745
1777
  },
1778
+ {
1779
+ "component": "RelativeTime",
1780
+ "status": "beta",
1781
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/relative_time.rb",
1782
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/relative_time/default/",
1783
+ "parameters": [
1784
+ {
1785
+ "name": "datetime",
1786
+ "type": "Time",
1787
+ "default": "N/A",
1788
+ "description": "The time to be formatted."
1789
+ },
1790
+ {
1791
+ "name": "tense",
1792
+ "type": "Symbol",
1793
+ "default": "`:auto`",
1794
+ "description": "Which tense to use. One of `:auto`, `:future`, or `:past`."
1795
+ },
1796
+ {
1797
+ "name": "prefix",
1798
+ "type": "sring",
1799
+ "default": "`nil`",
1800
+ "description": "What to prefix the relative ime display with."
1801
+ },
1802
+ {
1803
+ "name": "second",
1804
+ "type": "Symbol",
1805
+ "default": "`SECOND_DEFAULT`",
1806
+ "description": "What format seconds should take. One of `nil`, `:numeric`, or `:two_digit`."
1807
+ },
1808
+ {
1809
+ "name": "minute",
1810
+ "type": "Symbol",
1811
+ "default": "`MINUTE_DEFAULT`",
1812
+ "description": "What format minues should take. One of `nil`, `:numeric`, or `:two_digit`."
1813
+ },
1814
+ {
1815
+ "name": "hour",
1816
+ "type": "Symbol",
1817
+ "default": "`HOUR_DEFAULT`",
1818
+ "description": "What format hours should take. One of `nil`, `:numeric`, or `:two_digit`."
1819
+ },
1820
+ {
1821
+ "name": "weekday",
1822
+ "type": "Symbol",
1823
+ "default": "`WEEKDAY_DEFAULT`",
1824
+ "description": "What format weekdays should take. One of `nil`, `:long`, `:narrow`, or `:short`."
1825
+ },
1826
+ {
1827
+ "name": "day",
1828
+ "type": "Symbol",
1829
+ "default": "`DAY_DEFAULT`",
1830
+ "description": "What format days should take. One of `nil`, `:numeric`, or `:two_digit`."
1831
+ },
1832
+ {
1833
+ "name": "month",
1834
+ "type": "Symbol",
1835
+ "default": "`MONTH_DEFAULT`",
1836
+ "description": "What format months should take. One of `nil`, `:long`, `:narrow`, `:numeric`, `:short`, or `:two_digit`."
1837
+ },
1838
+ {
1839
+ "name": "year",
1840
+ "type": "Symbol",
1841
+ "default": "`YEAR_DEFAULT`",
1842
+ "description": "What format years should take. One of `nil`, `:numeric`, or `:two_digit`."
1843
+ },
1844
+ {
1845
+ "name": "time_zone_name",
1846
+ "type": "Symbol",
1847
+ "default": "`TIMEZONENAME_DEFAULT`",
1848
+ "description": "What format the time zone should take. One of `nil`, `:long`, `:long_generic`, `:long_offset`, `:short`, `:short_generic`, or `:short_offset`."
1849
+ },
1850
+ {
1851
+ "name": "threshold",
1852
+ "type": "string",
1853
+ "default": "`nil`",
1854
+ "description": "The threshold at which relative time displays become absolute."
1855
+ },
1856
+ {
1857
+ "name": "precision",
1858
+ "type": "Symbol",
1859
+ "default": "`PRECISION_DEFAULT`",
1860
+ "description": "The precision elapsed time should display. One of `nil`, `:day`, `:hour`, `:minute`, `:month`, `:second`, or `:year`."
1861
+ },
1862
+ {
1863
+ "name": "format",
1864
+ "type": "Symbol",
1865
+ "default": "`nil`",
1866
+ "description": "The format the display should take. One of `:auto`, `:elapsed`, or `:micro`."
1867
+ },
1868
+ {
1869
+ "name": "lang",
1870
+ "type": "string",
1871
+ "default": "`nil`",
1872
+ "description": "The language to use."
1873
+ },
1874
+ {
1875
+ "name": "title",
1876
+ "type": "string",
1877
+ "default": "`nil`",
1878
+ "description": "Provide a custom title to the element."
1879
+ },
1880
+ {
1881
+ "name": "system_arguments",
1882
+ "type": "Hash",
1883
+ "default": "N/A",
1884
+ "description": "[System arguments](/system-arguments)"
1885
+ }
1886
+ ]
1887
+ },
1746
1888
  {
1747
1889
  "component": "Text",
1748
1890
  "status": "beta",
@@ -1793,7 +1935,7 @@
1793
1935
  },
1794
1936
  {
1795
1937
  "component": "Button",
1796
- "status": "beta",
1938
+ "status": "deprecated",
1797
1939
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/button_component.rb",
1798
1940
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/button/default/",
1799
1941
  "parameters": [
@@ -1853,38 +1995,6 @@
1853
1995
  }
1854
1996
  ]
1855
1997
  },
1856
- {
1857
- "component": "ClipboardCopy",
1858
- "status": "beta",
1859
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/clipboard_copy.rb",
1860
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/clipboard_copy/default/",
1861
- "parameters": [
1862
- {
1863
- "name": "aria-label",
1864
- "type": "String",
1865
- "default": "N/A",
1866
- "description": "String that will be read to screenreaders when the component is focused"
1867
- },
1868
- {
1869
- "name": "value",
1870
- "type": "String",
1871
- "default": "`nil`",
1872
- "description": "Text to copy into the users clipboard when they click the component."
1873
- },
1874
- {
1875
- "name": "for",
1876
- "type": "String",
1877
- "default": "N/A",
1878
- "description": "Element id from where to get the copied value."
1879
- },
1880
- {
1881
- "name": "system_arguments",
1882
- "type": "Hash",
1883
- "default": "N/A",
1884
- "description": "[System arguments](/system-arguments)"
1885
- }
1886
- ]
1887
- },
1888
1998
  {
1889
1999
  "component": "DropdownMenu",
1890
2000
  "status": "deprecated",
@@ -7,10 +7,10 @@
7
7
  "Primer::Alpha::AutoComplete::Item": "",
8
8
  "Primer::Alpha::Banner": "",
9
9
  "Primer::Alpha::ButtonMarketing": "",
10
- "Primer::Alpha::Dialog": "",
11
- "Primer::Alpha::Dialog::Body": "",
12
- "Primer::Alpha::Dialog::Footer": "",
13
- "Primer::Alpha::Dialog::Header": "",
10
+ "Primer::Alpha::Dialog": "2022-10-10",
11
+ "Primer::Alpha::Dialog::Body": "2022-10-10",
12
+ "Primer::Alpha::Dialog::Footer": "2022-10-10",
13
+ "Primer::Alpha::Dialog::Header": "2022-10-10",
14
14
  "Primer::Alpha::Dropdown": "",
15
15
  "Primer::Alpha::Dropdown::Menu": "",
16
16
  "Primer::Alpha::Dropdown::Menu::Item": "",
@@ -45,6 +45,7 @@
45
45
  "Primer::Beta::Breadcrumbs::Item": "",
46
46
  "Primer::Beta::Button": "",
47
47
  "Primer::Beta::ButtonGroup": "",
48
+ "Primer::Beta::ClipboardCopy": "",
48
49
  "Primer::Beta::CloseButton": "",
49
50
  "Primer::Beta::Counter": "",
50
51
  "Primer::Beta::Details": "",
@@ -55,6 +56,7 @@
55
56
  "Primer::Beta::Link": "",
56
57
  "Primer::Beta::Popover": "",
57
58
  "Primer::Beta::ProgressBar": "",
59
+ "Primer::Beta::RelativeTime": "",
58
60
  "Primer::Beta::Text": "",
59
61
  "Primer::Beta::Truncate": "",
60
62
  "Primer::Beta::Truncate::TruncateText": "",
@@ -558,6 +558,8 @@
558
558
  },
559
559
  "Primer::Beta::ButtonGroup": {
560
560
  },
561
+ "Primer::Beta::ClipboardCopy": {
562
+ },
561
563
  "Primer::Beta::CloseButton": {
562
564
  "DEFAULT_TYPE": "button",
563
565
  "TYPE_OPTIONS": [
@@ -738,6 +740,128 @@
738
740
  "large"
739
741
  ]
740
742
  },
743
+ "Primer::Beta::RelativeTime": {
744
+ "DAY_DEFAULT": null,
745
+ "DAY_MAPPINGS": {
746
+ "": null,
747
+ "numeric": "numeric",
748
+ "two_digit": "2-digit"
749
+ },
750
+ "DAY_OPTIONS": [
751
+ null,
752
+ "numeric",
753
+ "two_digit"
754
+ ],
755
+ "FORMAT_DEFAULT": "auto",
756
+ "FORMAT_OPTIONS": [
757
+ "auto",
758
+ "micro",
759
+ "elapsed"
760
+ ],
761
+ "HOUR_DEFAULT": null,
762
+ "HOUR_MAPPINGS": {
763
+ "": null,
764
+ "numeric": "numeric",
765
+ "two_digit": "2-digit"
766
+ },
767
+ "HOUR_OPTIONS": [
768
+ null,
769
+ "numeric",
770
+ "two_digit"
771
+ ],
772
+ "MINUTE_DEFAULT": null,
773
+ "MINUTE_MAPPINGS": {
774
+ "": null,
775
+ "numeric": "numeric",
776
+ "two_digit": "2-digit"
777
+ },
778
+ "MINUTE_OPTIONS": [
779
+ null,
780
+ "numeric",
781
+ "two_digit"
782
+ ],
783
+ "MONTH_DEFAULT": null,
784
+ "MONTH_MAPPINGS": {
785
+ "": null,
786
+ "numeric": "numeric",
787
+ "two_digit": "2-digit",
788
+ "short": "short",
789
+ "long": "long",
790
+ "narrow": "narrow"
791
+ },
792
+ "MONTH_OPTIONS": [
793
+ null,
794
+ "numeric",
795
+ "two_digit",
796
+ "short",
797
+ "long",
798
+ "narrow"
799
+ ],
800
+ "PRECISION_DEFAULT": null,
801
+ "PRECISION_OPTIONS": [
802
+ null,
803
+ "second",
804
+ "minute",
805
+ "hour",
806
+ "day",
807
+ "month",
808
+ "year"
809
+ ],
810
+ "SECOND_DEFAULT": null,
811
+ "SECOND_MAPPINGS": {
812
+ "": null,
813
+ "numeric": "numeric",
814
+ "two_digit": "2-digit"
815
+ },
816
+ "SECOND_OPTIONS": [
817
+ null,
818
+ "numeric",
819
+ "two_digit"
820
+ ],
821
+ "TENSE_DEFAULT": "auto",
822
+ "TENSE_OPTIONS": [
823
+ "auto",
824
+ "past",
825
+ "future"
826
+ ],
827
+ "TIMEZONENAME_DEFAULT": null,
828
+ "TIMEZONENAME_OPTIONS": [
829
+ null,
830
+ "long",
831
+ "short",
832
+ "short_offset",
833
+ "long_offset",
834
+ "short_generic",
835
+ "long_generic"
836
+ ],
837
+ "TIMEZONE_MAPPINGS": {
838
+ "": null,
839
+ "long": "long",
840
+ "short": "short",
841
+ "short_offset": "shortOffset",
842
+ "long_offset": "longOffset",
843
+ "short_generic": "shortGeneric",
844
+ "long_generic": "longGeneric"
845
+ },
846
+ "WEEKDAY_DEFAULT": null,
847
+ "WEEKDAY_OPTIONS": [
848
+ null,
849
+ "long",
850
+ "short",
851
+ "narrow"
852
+ ],
853
+ "YEAR_DEFAULT": null,
854
+ "YEAR_MAPPINGS": {
855
+ "": null,
856
+ "numeric": "numeric",
857
+ "two_digit": "2-digit"
858
+ },
859
+ "YEAR_OPTIONS": [
860
+ null,
861
+ "numeric",
862
+ "two_digit"
863
+ ]
864
+ },
741
865
  "Primer::Beta::Text": {
742
866
  "DEFAULT_TAG": "span"
743
867
  },
data/static/statuses.json CHANGED
@@ -45,6 +45,7 @@
45
45
  "Primer::Beta::Breadcrumbs::Item": "alpha",
46
46
  "Primer::Beta::Button": "beta",
47
47
  "Primer::Beta::ButtonGroup": "beta",
48
+ "Primer::Beta::ClipboardCopy": "beta",
48
49
  "Primer::Beta::CloseButton": "beta",
49
50
  "Primer::Beta::Counter": "beta",
50
51
  "Primer::Beta::Details": "beta",
@@ -55,14 +56,15 @@
55
56
  "Primer::Beta::Link": "beta",
56
57
  "Primer::Beta::Popover": "beta",
57
58
  "Primer::Beta::ProgressBar": "beta",
59
+ "Primer::Beta::RelativeTime": "beta",
58
60
  "Primer::Beta::Text": "beta",
59
61
  "Primer::Beta::Truncate": "beta",
60
62
  "Primer::Beta::Truncate::TruncateText": "alpha",
61
63
  "Primer::BlankslateComponent": "deprecated",
62
64
  "Primer::Box": "stable",
63
65
  "Primer::BoxComponent": "deprecated",
64
- "Primer::ButtonComponent": "beta",
65
- "Primer::ClipboardCopy": "beta",
66
+ "Primer::ButtonComponent": "deprecated",
67
+ "Primer::ClipboardCopy": "deprecated",
66
68
  "Primer::ConditionalWrapper": "alpha",
67
69
  "Primer::Content": "stable",
68
70
  "Primer::Dropdown": "deprecated",