@primer/view-components 0.1.5-rc.fff95e52 → 0.1.5

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.
@@ -7,10 +7,16 @@
7
7
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list.rb",
8
8
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/default/",
9
9
  "parameters": [
10
+ {
11
+ "name": "id",
12
+ "type": "String",
13
+ "default": "`self.class.generate_id`",
14
+ "description": "HTML ID value."
15
+ },
10
16
  {
11
17
  "name": "role",
12
18
  "type": "Boolean",
13
- "default": "`:list`",
19
+ "default": "`nil`",
14
20
  "description": "ARIA role describing the function of the list. listbox and menu are a common values."
15
21
  },
16
22
  {
@@ -31,6 +37,12 @@
31
37
  "default": "`false`",
32
38
  "description": "Display a divider above each item in the list when it does not follow a header or divider."
33
39
  },
40
+ {
41
+ "name": "select_variant",
42
+ "type": "Symbol",
43
+ "default": "`:none`",
44
+ "description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
45
+ },
34
46
  {
35
47
  "name": "system_arguments",
36
48
  "type": "Hash",
@@ -70,10 +82,10 @@
70
82
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/heading/default/",
71
83
  "parameters": [
72
84
  {
73
- "name": "list_id",
85
+ "name": "id",
74
86
  "type": "String",
75
- "default": "N/A",
76
- "description": "The unique identifier of the sub list the heading belongs to. Used internally."
87
+ "default": "`self.class.generate_id`",
88
+ "description": "The group's identifier (ID attribute in HTML)."
77
89
  },
78
90
  {
79
91
  "name": "title",
@@ -203,7 +215,7 @@
203
215
  "name": "active",
204
216
  "type": "Boolean",
205
217
  "default": "`false`",
206
- "description": "Sets an active state on navigational items."
218
+ "description": "If the parent list's `select_variant` is set to `:single` or `:multiple`, causes this item to render checked."
207
219
  },
208
220
  {
209
221
  "name": "on_click",
@@ -225,6 +237,92 @@
225
237
  }
226
238
  ]
227
239
  },
240
+ {
241
+ "component": "ActionMenu",
242
+ "status": "alpha",
243
+ "a11y_reviewed": false,
244
+ "short_name": "ActionMenu",
245
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
246
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
247
+ "parameters": [
248
+ {
249
+ "name": "menu_id",
250
+ "type": "String",
251
+ "default": "`self.class.generate_id`",
252
+ "description": "Id of the menu."
253
+ },
254
+ {
255
+ "name": "anchor_align",
256
+ "type": "Symbol",
257
+ "default": "`:start`",
258
+ "description": "One of `:center`, `:end`, or `:start`.."
259
+ },
260
+ {
261
+ "name": "anchor_side",
262
+ "type": "Symbol",
263
+ "default": "`:outside_bottom`",
264
+ "description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
265
+ },
266
+ {
267
+ "name": "src",
268
+ "type": "String",
269
+ "default": "`nil`",
270
+ "description": "Used with an `include-fragment` element to load menu content from the given source URL."
271
+ },
272
+ {
273
+ "name": "preload",
274
+ "type": "Boolean",
275
+ "default": "`false`",
276
+ "description": "When true, and src is present, loads the `include-fragment` on trigger hover."
277
+ },
278
+ {
279
+ "name": "dynamic_label",
280
+ "type": "Boolean",
281
+ "default": "`false`",
282
+ "description": "Whether or not to display the text of the currently selected item in the show button."
283
+ },
284
+ {
285
+ "name": "dynamic_label_prefix",
286
+ "type": "String",
287
+ "default": "`nil`",
288
+ "description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
289
+ },
290
+ {
291
+ "name": "select_variant",
292
+ "type": "Symbol",
293
+ "default": "`:none`",
294
+ "description": ". One of `:multiple`, `:none`, or `:single`.."
295
+ },
296
+ {
297
+ "name": "system_arguments",
298
+ "type": "Hash",
299
+ "default": "N/A",
300
+ "description": "[System arguments](/system-arguments)."
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "component": "ActionMenu::List",
306
+ "status": "alpha",
307
+ "a11y_reviewed": false,
308
+ "short_name": "ActionMenuList",
309
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/list.rb",
310
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/list/default/",
311
+ "parameters": [
312
+ {
313
+ "name": "menu_id",
314
+ "type": "String",
315
+ "default": "N/A",
316
+ "description": "ID of the parent menu."
317
+ },
318
+ {
319
+ "name": "system_arguments",
320
+ "type": "Hash",
321
+ "default": "N/A",
322
+ "description": "[System arguments](/system-arguments)"
323
+ }
324
+ ]
325
+ },
228
326
  {
229
327
  "component": "AutoComplete",
230
328
  "status": "deprecated",
@@ -1425,12 +1523,6 @@
1425
1523
  "default": "`:auto`",
1426
1524
  "description": "The popover behaviour. One of `:auto` or `:manual`."
1427
1525
  },
1428
- {
1429
- "name": "popover",
1430
- "type": "Symbol",
1431
- "default": "`:auto`",
1432
- "description": "The popover behaviour. One of `:auto` or `:manual`."
1433
- },
1434
1526
  {
1435
1527
  "name": "size",
1436
1528
  "type": "Symbol",
@@ -1482,8 +1574,8 @@
1482
1574
  {
1483
1575
  "name": "role",
1484
1576
  "type": "String",
1485
- "default": "N/A",
1486
- "description": "The ARIA role. One of `:dialog` or `:menu`."
1577
+ "default": "`nil`",
1578
+ "description": "The ARIA role. One of `nil`, `:dialog`, or `:menu`."
1487
1579
  },
1488
1580
  {
1489
1581
  "name": "system_arguments",
@@ -3,6 +3,8 @@
3
3
  "Primer::Alpha::ActionList::Divider": "",
4
4
  "Primer::Alpha::ActionList::Heading": "",
5
5
  "Primer::Alpha::ActionList::Item": "",
6
+ "Primer::Alpha::ActionMenu": "",
7
+ "Primer::Alpha::ActionMenu::List": "",
6
8
  "Primer::Alpha::AutoComplete": "",
7
9
  "Primer::Alpha::AutoComplete::Item": "",
8
10
  "Primer::Alpha::Banner": "",
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "Primer::Alpha::ActionList": {
3
+ "DEFAULT_MENU_ITEM_ROLE": "menuitem",
3
4
  "DEFAULT_ROLE": "list",
4
5
  "DEFAULT_SCHEME": "full",
6
+ "DEFAULT_SELECT_VARIANT": "none",
5
7
  "Divider": "Primer::Alpha::ActionList::Divider",
6
8
  "Heading": "Primer::Alpha::ActionList::Heading",
7
9
  "Item": "Primer::Alpha::ActionList::Item",
10
+ "MENU_ROLE": "menu",
8
11
  "SCHEME_MAPPINGS": {
9
12
  "full": null,
10
13
  "inset": "ActionListWrap--inset"
@@ -12,7 +15,18 @@
12
15
  "SCHEME_OPTIONS": [
13
16
  "full",
14
17
  "inset"
15
- ]
18
+ ],
19
+ "SELECT_VARIANT_OPTIONS": [
20
+ "single",
21
+ "multiple",
22
+ "multiple_checkbox",
23
+ "none"
24
+ ],
25
+ "SELECT_VARIANT_ROLE_MAP": {
26
+ "single": "menuitemradio",
27
+ "multiple": "menuitemcheckbox",
28
+ "multiple_checkbox": "menuitemcheckbox"
29
+ }
16
30
  },
17
31
  "Primer::Alpha::ActionList::Divider": {
18
32
  "DEFAULT_SCHEME": "subtle",
@@ -77,6 +91,31 @@
77
91
  "xlarge"
78
92
  ]
79
93
  },
94
+ "Primer::Alpha::ActionMenu": {
95
+ "DEFAULT_PRELOAD": false,
96
+ "DEFAULT_SELECT_VARIANT": "none",
97
+ "List": "Primer::Alpha::ActionMenu::List",
98
+ "SELECT_VARIANT_OPTIONS": [
99
+ "single",
100
+ "multiple",
101
+ "none"
102
+ ]
103
+ },
104
+ "Primer::Alpha::ActionMenu::List": {
105
+ "DEFAULT_ITEM_TAG": "span",
106
+ "ITEM_ACTION_OPTIONS": [
107
+ "classes",
108
+ "onclick",
109
+ "href",
110
+ "value"
111
+ ],
112
+ "ITEM_TAG_OPTIONS": [
113
+ "a",
114
+ "button",
115
+ "clipboard-copy",
116
+ "span"
117
+ ]
118
+ },
80
119
  "Primer::Alpha::AutoComplete": {
81
120
  "Item": "Primer::Alpha::AutoComplete::Item"
82
121
  },
@@ -420,7 +459,8 @@
420
459
  ],
421
460
  "ROLE_OPTIONS": [
422
461
  "dialog",
423
- "menu"
462
+ "menu",
463
+ null
424
464
  ],
425
465
  "SIZE_MAPPINGS": {
426
466
  "auto": "Overlay--size-auto",