@primer/view-components 0.1.5-rc.fff95e52 → 0.1.6-rc.277c7eae

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.1.5-rc.fff95e52",
3
+ "version": "0.1.6-rc.277c7eae",
4
4
  "description": "ViewComponents for the Primer Design System",
5
5
  "main": "app/assets/javascripts/primer_view_components.js",
6
6
  "module": "app/components/primer/primer.js",
@@ -50,10 +50,11 @@
50
50
  "@github/clipboard-copy-element": "^1.1.2",
51
51
  "@github/details-menu-element": "^1.0.12",
52
52
  "@github/image-crop-element": "^5.0.0",
53
+ "@github/include-fragment-element": "^6.1.1",
53
54
  "@github/mini-throttle": "^2.1.0",
54
55
  "@github/relative-time-element": "^4.0.0",
55
56
  "@github/tab-container-element": "^3.1.2",
56
- "@oddbird/popover-polyfill": "^0.0.10",
57
+ "@oddbird/popover-polyfill": "^0.1.1",
57
58
  "@primer/behaviors": "^1.2.0"
58
59
  },
59
60
  "devDependencies": {
@@ -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",
@@ -2646,6 +2738,12 @@
2646
2738
  "default": "`false`",
2647
2739
  "description": "Input can be full-width or fit to content"
2648
2740
  },
2741
+ {
2742
+ "name": "width",
2743
+ "type": "String",
2744
+ "default": "`:auto`",
2745
+ "description": "Optional parameter to set max width of results list. One of `:auto`, `:large`, `:medium`, `:small`, `:xlarge`, or `:xxlarge`."
2746
+ },
2649
2747
  {
2650
2748
  "name": "disabled",
2651
2749
  "type": "Boolean",
@@ -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,25 @@
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": "button",
106
+ "ITEM_TAG_OPTIONS": [
107
+ "a",
108
+ "button",
109
+ "clipboard-copy",
110
+ "button"
111
+ ]
112
+ },
80
113
  "Primer::Alpha::AutoComplete": {
81
114
  "Item": "Primer::Alpha::AutoComplete::Item"
82
115
  },
@@ -420,7 +453,8 @@
420
453
  ],
421
454
  "ROLE_OPTIONS": [
422
455
  "dialog",
423
- "menu"
456
+ "menu",
457
+ null
424
458
  ],
425
459
  "SIZE_MAPPINGS": {
426
460
  "auto": "Overlay--size-auto",
@@ -559,6 +593,7 @@
559
593
  },
560
594
  "Primer::Beta::AutoComplete": {
561
595
  "DEFAULT_SIZE": "medium",
596
+ "DEFAULT_WIDTH": "auto",
562
597
  "Item": "Primer::Beta::AutoComplete::Item",
563
598
  "SIZE_MAPPINGS": {
564
599
  "small": "FormControl-small",
@@ -569,6 +604,22 @@
569
604
  "small",
570
605
  "medium",
571
606
  "large"
607
+ ],
608
+ "WIDTH_MAPPINGS": {
609
+ "auto": "Overlay--width-auto",
610
+ "small": "Overlay--width-small",
611
+ "medium": "Overlay--width-medium",
612
+ "large": "Overlay--width-large",
613
+ "xlarge": "Overlay--width-xlarge",
614
+ "xxlarge": "Overlay--width-xxlarge"
615
+ },
616
+ "WIDTH_OPTIONS": [
617
+ "auto",
618
+ "small",
619
+ "medium",
620
+ "large",
621
+ "xlarge",
622
+ "xxlarge"
572
623
  ]
573
624
  },
574
625
  "Primer::Beta::AutoComplete::Item": {