@primer/view-components 0.6.1-rc.1fca6dcf → 0.6.1-rc.59ed67c8
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/alpha/action_menu/action_menu_element.js +8 -1
- package/package.json +1 -1
- package/static/arguments.json +12 -1
- package/static/info_arch.json +18 -14
- package/static/previews.json +0 -13
@@ -141,8 +141,11 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
141
141
|
return;
|
142
142
|
const ariaChecked = item.getAttribute('aria-checked');
|
143
143
|
const checked = ariaChecked !== 'true';
|
144
|
-
item.setAttribute('aria-checked', `${checked}`);
|
145
144
|
if (this.selectVariant === 'single') {
|
145
|
+
// Only check, never uncheck here. Single-select mode does not allow unchecking a checked item.
|
146
|
+
if (checked) {
|
147
|
+
item.setAttribute('aria-checked', 'true');
|
148
|
+
}
|
146
149
|
for (const checkedItem of this.querySelectorAll('[aria-checked]')) {
|
147
150
|
if (checkedItem !== item) {
|
148
151
|
checkedItem.setAttribute('aria-checked', 'false');
|
@@ -150,6 +153,10 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
150
153
|
}
|
151
154
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_setDynamicLabel).call(this);
|
152
155
|
}
|
156
|
+
else {
|
157
|
+
// multi-select mode allows unchecking a checked item
|
158
|
+
item.setAttribute('aria-checked', `${checked}`);
|
159
|
+
}
|
153
160
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_updateInput).call(this);
|
154
161
|
if (event instanceof KeyboardEvent && event.target instanceof HTMLButtonElement) {
|
155
162
|
// prevent buttons from being clicked twice
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.6.1-rc.
|
3
|
+
"version": "0.6.1-rc.59ed67c8",
|
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
@@ -4248,7 +4248,18 @@
|
|
4248
4248
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/conditional_wrapper.rb",
|
4249
4249
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/conditional_wrapper/default/",
|
4250
4250
|
"parameters": [
|
4251
|
-
|
4251
|
+
{
|
4252
|
+
"name": "condition",
|
4253
|
+
"type": "Boolean",
|
4254
|
+
"default": "N/A",
|
4255
|
+
"description": "Whether or not to wrap the content in a `Primer::BaseComponent`."
|
4256
|
+
},
|
4257
|
+
{
|
4258
|
+
"name": "base_component_arguments",
|
4259
|
+
"type": "Hash",
|
4260
|
+
"default": "N/A",
|
4261
|
+
"description": "The arguments to pass to `Primer::BaseComponent`."
|
4262
|
+
}
|
4252
4263
|
]
|
4253
4264
|
},
|
4254
4265
|
{
|
package/static/info_arch.json
CHANGED
@@ -8411,19 +8411,6 @@
|
|
8411
8411
|
]
|
8412
8412
|
}
|
8413
8413
|
},
|
8414
|
-
{
|
8415
|
-
"preview_path": "primer/alpha/tooltip/label_tooltip_on_button_with_existing_labelledby",
|
8416
|
-
"name": "label_tooltip_on_button_with_existing_labelledby",
|
8417
|
-
"snapshot": "false",
|
8418
|
-
"skip_rules": {
|
8419
|
-
"wont_fix": [
|
8420
|
-
"region"
|
8421
|
-
],
|
8422
|
-
"will_fix": [
|
8423
|
-
"color-contrast"
|
8424
|
-
]
|
8425
|
-
}
|
8426
|
-
},
|
8427
8414
|
{
|
8428
8415
|
"preview_path": "primer/alpha/tooltip/description_tooltip_on_button_with_existing_describedby",
|
8429
8416
|
"name": "description_tooltip_on_button_with_existing_describedby",
|
@@ -10284,7 +10271,13 @@
|
|
10284
10271
|
}
|
10285
10272
|
],
|
10286
10273
|
"methods": [
|
10274
|
+
{
|
10275
|
+
"name": "id",
|
10276
|
+
"description": "Returns the value of attribute id.",
|
10277
|
+
"parameters": [
|
10287
10278
|
|
10279
|
+
]
|
10280
|
+
}
|
10288
10281
|
],
|
10289
10282
|
"previews": [
|
10290
10283
|
|
@@ -14029,7 +14022,18 @@
|
|
14029
14022
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/conditional_wrapper.rb",
|
14030
14023
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/conditional_wrapper/default/",
|
14031
14024
|
"parameters": [
|
14032
|
-
|
14025
|
+
{
|
14026
|
+
"name": "condition",
|
14027
|
+
"type": "Boolean",
|
14028
|
+
"default": "N/A",
|
14029
|
+
"description": "Whether or not to wrap the content in a `Primer::BaseComponent`."
|
14030
|
+
},
|
14031
|
+
{
|
14032
|
+
"name": "base_component_arguments",
|
14033
|
+
"type": "Hash",
|
14034
|
+
"default": "N/A",
|
14035
|
+
"description": "The arguments to pass to `Primer::BaseComponent`."
|
14036
|
+
}
|
14033
14037
|
],
|
14034
14038
|
"slots": [
|
14035
14039
|
|
package/static/previews.json
CHANGED
@@ -6158,19 +6158,6 @@
|
|
6158
6158
|
]
|
6159
6159
|
}
|
6160
6160
|
},
|
6161
|
-
{
|
6162
|
-
"preview_path": "primer/alpha/tooltip/label_tooltip_on_button_with_existing_labelledby",
|
6163
|
-
"name": "label_tooltip_on_button_with_existing_labelledby",
|
6164
|
-
"snapshot": "false",
|
6165
|
-
"skip_rules": {
|
6166
|
-
"wont_fix": [
|
6167
|
-
"region"
|
6168
|
-
],
|
6169
|
-
"will_fix": [
|
6170
|
-
"color-contrast"
|
6171
|
-
]
|
6172
|
-
}
|
6173
|
-
},
|
6174
6161
|
{
|
6175
6162
|
"preview_path": "primer/alpha/tooltip/description_tooltip_on_button_with_existing_describedby",
|
6176
6163
|
"name": "description_tooltip_on_button_with_existing_describedby",
|