@primer/view-components 0.38.0 → 0.39.0-rc.17eb78d6

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.
@@ -893,7 +893,8 @@ _SelectPanelElement_setDynamicLabel = function _SelectPanelElement_setDynamicLab
893
893
  };
894
894
  _SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
895
895
  if (this.selectVariant === 'single') {
896
- const input = this.querySelector(`[data-list-inputs=true] input`);
896
+ const input = this.querySelector(`[data-select-panel-inputs=true] input`) ??
897
+ this.querySelector(`[data-list-inputs=true] input`);
897
898
  if (!input)
898
899
  return;
899
900
  const selectedItem = this.selectedItems[0];
@@ -903,13 +904,14 @@ _SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
903
904
  input.name = selectedItem.inputName;
904
905
  input.removeAttribute('disabled');
905
906
  }
906
- else {
907
+ else if (__classPrivateFieldGet(this, _SelectPanelElement_hasLoadedData, "f")) {
907
908
  input.setAttribute('disabled', 'disabled');
908
909
  }
909
910
  }
910
911
  else if (this.selectVariant !== 'none') {
911
912
  // multiple select variant
912
- const inputList = this.querySelector('[data-list-inputs=true]');
913
+ const isRemoteInput = !!this.querySelector('[data-select-panel-inputs=true]');
914
+ const inputList = this.querySelector('[data-select-panel-inputs=true]') ?? this.querySelector('[data-list-inputs=true]');
913
915
  if (!inputList)
914
916
  return;
915
917
  const inputs = inputList.querySelectorAll('input');
@@ -918,7 +920,7 @@ _SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
918
920
  }
919
921
  for (const selectedItem of this.selectedItems) {
920
922
  const newInput = document.createElement('input');
921
- newInput.setAttribute('data-list-input', 'true');
923
+ newInput.setAttribute(`${isRemoteInput ? 'data-select-panel-input' : 'data-list-input'}`, 'true');
922
924
  newInput.type = 'hidden';
923
925
  newInput.autocomplete = 'off';
924
926
  newInput.name = selectedItem.inputName || __classPrivateFieldGet(this, _SelectPanelElement_inputName, "f");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.38.0",
3
+ "version": "0.39.0-rc.17eb78d6",
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",
@@ -70,7 +70,7 @@
70
70
  "@playwright/test": "^1.49.1",
71
71
  "@primer/css": "21.5.1",
72
72
  "@primer/stylelint-config": "^13.1.1",
73
- "@rollup/plugin-node-resolve": "^15.2.3",
73
+ "@rollup/plugin-node-resolve": "^16.0.1",
74
74
  "@rollup/plugin-typescript": "^8.3.3",
75
75
  "@typescript-eslint/eslint-plugin": "^7.0.1",
76
76
  "@typescript-eslint/parser": "^7.0.1",