@primer/view-components 0.27.0-rc.6dc14b71 → 0.27.0-rc.903d7668
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/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/components/primer/focus_group.js +1 -1
- package/package.json +1 -1
- package/static/arguments.json +12 -0
- package/static/constants.json +6 -0
- package/static/info_arch.json +32 -0
- package/static/previews.json +13 -0
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
11
11
|
};
|
12
12
|
var _FocusGroupElement_instances, _FocusGroupElement_retainSignal, _FocusGroupElement_abortController, _FocusGroupElement_items_get;
|
13
13
|
import '@oddbird/popover-polyfill';
|
14
|
-
const validSelectors = ['[role="menuitem"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]'];
|
14
|
+
const validSelectors = ['[role="menuitem"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]', '[role="option"]'];
|
15
15
|
const menuItemSelector = validSelectors.map(selector => `:not([hidden]) > ${selector}`).join(', ');
|
16
16
|
const getMnemonicFor = (item) => item.textContent?.trim()[0].toLowerCase();
|
17
17
|
const printable = /^\S$/;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.27.0-rc.
|
3
|
+
"version": "0.27.0-rc.903d7668",
|
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",
|
package/static/arguments.json
CHANGED
@@ -104,6 +104,12 @@
|
|
104
104
|
"default": "`:none`",
|
105
105
|
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
106
106
|
},
|
107
|
+
{
|
108
|
+
"name": "aria_selection_variant",
|
109
|
+
"type": "Symbol",
|
110
|
+
"default": "`:checked`",
|
111
|
+
"description": "Specifies which aria selection to use. <%= one_of(Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS) %?"
|
112
|
+
},
|
107
113
|
{
|
108
114
|
"name": "form_arguments",
|
109
115
|
"type": "Hash",
|
@@ -441,6 +447,12 @@
|
|
441
447
|
"default": "`:none`",
|
442
448
|
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
443
449
|
},
|
450
|
+
{
|
451
|
+
"name": "aria_selection_variant",
|
452
|
+
"type": "Symbol",
|
453
|
+
"default": "`:checked`",
|
454
|
+
"description": "Specifies which aria selection to use. <%= one_of(Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS) %?"
|
455
|
+
},
|
444
456
|
{
|
445
457
|
"name": "form_arguments",
|
446
458
|
"type": "Hash",
|
package/static/constants.json
CHANGED
@@ -19,6 +19,11 @@
|
|
19
19
|
"Primer::Alpha::ActionBar::Item": {
|
20
20
|
},
|
21
21
|
"Primer::Alpha::ActionList": {
|
22
|
+
"ARIA_SELECTION_VARIANT_OPTIONS": [
|
23
|
+
"selected",
|
24
|
+
"checked"
|
25
|
+
],
|
26
|
+
"DEFAULT_ARIA_SELECTION_VARIANT": "checked",
|
22
27
|
"DEFAULT_MENU_ITEM_ROLE": "menuitem",
|
23
28
|
"DEFAULT_ROLE": "list",
|
24
29
|
"DEFAULT_SCHEME": "full",
|
@@ -27,6 +32,7 @@
|
|
27
32
|
"FormWrapper": "Primer::Alpha::ActionList::FormWrapper",
|
28
33
|
"Heading": "Primer::Alpha::ActionList::Heading",
|
29
34
|
"Item": "Primer::Alpha::ActionList::Item",
|
35
|
+
"LIST_BOX_ITEM_ROLE": "option",
|
30
36
|
"MENU_ROLE": "menu",
|
31
37
|
"SCHEME_MAPPINGS": {
|
32
38
|
"full": null,
|
package/static/info_arch.json
CHANGED
@@ -246,6 +246,12 @@
|
|
246
246
|
"default": "`:none`",
|
247
247
|
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
248
248
|
},
|
249
|
+
{
|
250
|
+
"name": "aria_selection_variant",
|
251
|
+
"type": "Symbol",
|
252
|
+
"default": "`:checked`",
|
253
|
+
"description": "Specifies which aria selection to use. <%= one_of(Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS) %?"
|
254
|
+
},
|
249
255
|
{
|
250
256
|
"name": "form_arguments",
|
251
257
|
"type": "Hash",
|
@@ -386,6 +392,13 @@
|
|
386
392
|
|
387
393
|
]
|
388
394
|
},
|
395
|
+
{
|
396
|
+
"name": "aria_selection_variant",
|
397
|
+
"description": "Returns the value of attribute aria_selection_variant.",
|
398
|
+
"parameters": [
|
399
|
+
|
400
|
+
]
|
401
|
+
},
|
389
402
|
{
|
390
403
|
"name": "build_item",
|
391
404
|
"description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.",
|
@@ -798,6 +811,19 @@
|
|
798
811
|
"color-contrast"
|
799
812
|
]
|
800
813
|
}
|
814
|
+
},
|
815
|
+
{
|
816
|
+
"preview_path": "primer/alpha/action_list/listbox",
|
817
|
+
"name": "listbox",
|
818
|
+
"snapshot": "false",
|
819
|
+
"skip_rules": {
|
820
|
+
"wont_fix": [
|
821
|
+
"region"
|
822
|
+
],
|
823
|
+
"will_fix": [
|
824
|
+
"color-contrast"
|
825
|
+
]
|
826
|
+
}
|
801
827
|
}
|
802
828
|
],
|
803
829
|
"subcomponents": [
|
@@ -1974,6 +2000,12 @@
|
|
1974
2000
|
"default": "`:none`",
|
1975
2001
|
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
1976
2002
|
},
|
2003
|
+
{
|
2004
|
+
"name": "aria_selection_variant",
|
2005
|
+
"type": "Symbol",
|
2006
|
+
"default": "`:checked`",
|
2007
|
+
"description": "Specifies which aria selection to use. <%= one_of(Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS) %?"
|
2008
|
+
},
|
1977
2009
|
{
|
1978
2010
|
"name": "form_arguments",
|
1979
2011
|
"type": "Hash",
|
package/static/previews.json
CHANGED
@@ -428,6 +428,19 @@
|
|
428
428
|
"color-contrast"
|
429
429
|
]
|
430
430
|
}
|
431
|
+
},
|
432
|
+
{
|
433
|
+
"preview_path": "primer/alpha/action_list/listbox",
|
434
|
+
"name": "listbox",
|
435
|
+
"snapshot": "false",
|
436
|
+
"skip_rules": {
|
437
|
+
"wont_fix": [
|
438
|
+
"region"
|
439
|
+
],
|
440
|
+
"will_fix": [
|
441
|
+
"color-contrast"
|
442
|
+
]
|
443
|
+
}
|
431
444
|
}
|
432
445
|
]
|
433
446
|
},
|