@public-ui/hydrate 2.2.16-rc.2 → 2.2.16
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/dist/index.js +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -15677,6 +15677,11 @@ class KolSingleSelect {
|
|
|
15677
15677
|
}
|
|
15678
15678
|
selectOption(option) {
|
|
15679
15679
|
var _a, _b;
|
|
15680
|
+
if (option.value === this._value) {
|
|
15681
|
+
this._inputValue = option.label;
|
|
15682
|
+
this._filteredOptions = [...this.state._options];
|
|
15683
|
+
return;
|
|
15684
|
+
}
|
|
15680
15685
|
this._value = option.value;
|
|
15681
15686
|
this._inputValue = option.label;
|
|
15682
15687
|
const inputEvent = this.createEventWithTarget('input', {
|
|
@@ -15749,17 +15754,17 @@ class KolSingleSelect {
|
|
|
15749
15754
|
var _a;
|
|
15750
15755
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
15751
15756
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
15752
|
-
return (hAsync(Host, { key: '
|
|
15757
|
+
return (hAsync(Host, { key: '282afbddf18c466d9ff57a69eeee01f2347b0edd', class: "kol-single-select" }, hAsync("div", { key: 'ed4d8589974c5364a624d79c55bbf9f82e991895', class: `single-select ${this.state._disabled === true ? 'disabled' : ''} ` }, hAsync(KolInputTag, { key: 'a4439114f29704df1e021349780db796a5d91f84', _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _msg: this.state._msg, _required: this.state._required, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, role: `presentation` }, hAsync("span", { key: 'db7f763555dad0c9984863153fb3f5b04b07fa0c', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' || typeof this.state._shortKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedBadgeText, { badgeText: buildBadgeTextString(this.state._accessKey || this.state._shortKey), label: this.state._label }), ' ', hAsync("kbd", { class: "badge-text-hint", "aria-hidden": "true" }, buildBadgeTextString(this.state._accessKey || this.state._shortKey)))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: 'f0fe71f1beafe9a7a11058d0df257e650f378cc7', slot: "input" }, hAsync("div", { key: '32e017a76ab2d68dde52f361fb250757010f83b0', class: "single-select__group" }, hAsync("input", Object.assign({ key: 'ec6fe2ea1d86abd79af13f071399f93b2c3d116f', ref: this.catchRef, class: "single-select__input", "data-testid": "single-select-input", type: "text", "aria-autocomplete": "both", "aria-controls": "listbox", value: this._inputValue, accessKey: this.state._accessKey, "aria-keyshortcuts": this.state._shortKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, "aria-activedescendant": this._isOpen && this._focusedOptionIndex >= 0 ? `option-${this._focusedOptionIndex}` : undefined, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", disabled: this.state._disabled, name: this.state._name, required: this.state._required }, this.controller.onFacade, { onInput: this.onInput.bind(this), onChange: this.onChange.bind(this), onClick: this.toggleListbox.bind(this), onFocus: (event) => {
|
|
15753
15758
|
this.controller.onFacade.onFocus(event);
|
|
15754
15759
|
this.inputHasFocus = true;
|
|
15755
15760
|
}, onBlur: (event) => {
|
|
15756
15761
|
this.controller.onFacade.onBlur(event);
|
|
15757
15762
|
this.inputHasFocus = false;
|
|
15758
|
-
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: '
|
|
15763
|
+
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: 'e1732b2b161044cb3deaa5b6d0dc9037697b2bd3', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
|
|
15759
15764
|
var _a;
|
|
15760
15765
|
this.clearSelection();
|
|
15761
15766
|
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15762
|
-
}, class: "single-select__delete" })), hAsync("button", { key: '
|
|
15767
|
+
}, class: "single-select__delete" })), hAsync("button", { key: '0bec77ab0fd58230427710b5f2700c555e0ab433', tabindex: "-1", class: "single-select__button", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: '714b277576bd52bc07051fc0073450752cd2f994', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: '7738666d477873fa8127e9010933164c80cd6987', role: "listbox", class: clsx('single-select__listbox', this.blockSuggestionMouseOver && 'single-select__listbox--cursor-hidden'), style: { '--visible-options': `${(_a = this._rows) !== null && _a !== void 0 ? _a : 5}` }, onKeyDown: this.handleKeyDownDropdown.bind(this) }, Array.isArray(this._filteredOptions) && this._filteredOptions.length > 0 ? (this._filteredOptions.map((option, index) => (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
15763
15768
|
if (el)
|
|
15764
15769
|
this.refOptions[index] = el;
|
|
15765
15770
|
}, tabIndex: -1, role: "option", "aria-selected": this._value === option.value ? 'true' : undefined, onClick: (event) => {
|
package/dist/index.mjs
CHANGED
|
@@ -15673,6 +15673,11 @@ class KolSingleSelect {
|
|
|
15673
15673
|
}
|
|
15674
15674
|
selectOption(option) {
|
|
15675
15675
|
var _a, _b;
|
|
15676
|
+
if (option.value === this._value) {
|
|
15677
|
+
this._inputValue = option.label;
|
|
15678
|
+
this._filteredOptions = [...this.state._options];
|
|
15679
|
+
return;
|
|
15680
|
+
}
|
|
15676
15681
|
this._value = option.value;
|
|
15677
15682
|
this._inputValue = option.label;
|
|
15678
15683
|
const inputEvent = this.createEventWithTarget('input', {
|
|
@@ -15745,17 +15750,17 @@ class KolSingleSelect {
|
|
|
15745
15750
|
var _a;
|
|
15746
15751
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
15747
15752
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
15748
|
-
return (hAsync(Host, { key: '
|
|
15753
|
+
return (hAsync(Host, { key: '282afbddf18c466d9ff57a69eeee01f2347b0edd', class: "kol-single-select" }, hAsync("div", { key: 'ed4d8589974c5364a624d79c55bbf9f82e991895', class: `single-select ${this.state._disabled === true ? 'disabled' : ''} ` }, hAsync(KolInputTag, { key: 'a4439114f29704df1e021349780db796a5d91f84', _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _msg: this.state._msg, _required: this.state._required, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, role: `presentation` }, hAsync("span", { key: 'db7f763555dad0c9984863153fb3f5b04b07fa0c', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' || typeof this.state._shortKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedBadgeText, { badgeText: buildBadgeTextString(this.state._accessKey || this.state._shortKey), label: this.state._label }), ' ', hAsync("kbd", { class: "badge-text-hint", "aria-hidden": "true" }, buildBadgeTextString(this.state._accessKey || this.state._shortKey)))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: 'f0fe71f1beafe9a7a11058d0df257e650f378cc7', slot: "input" }, hAsync("div", { key: '32e017a76ab2d68dde52f361fb250757010f83b0', class: "single-select__group" }, hAsync("input", Object.assign({ key: 'ec6fe2ea1d86abd79af13f071399f93b2c3d116f', ref: this.catchRef, class: "single-select__input", "data-testid": "single-select-input", type: "text", "aria-autocomplete": "both", "aria-controls": "listbox", value: this._inputValue, accessKey: this.state._accessKey, "aria-keyshortcuts": this.state._shortKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, "aria-activedescendant": this._isOpen && this._focusedOptionIndex >= 0 ? `option-${this._focusedOptionIndex}` : undefined, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", disabled: this.state._disabled, name: this.state._name, required: this.state._required }, this.controller.onFacade, { onInput: this.onInput.bind(this), onChange: this.onChange.bind(this), onClick: this.toggleListbox.bind(this), onFocus: (event) => {
|
|
15749
15754
|
this.controller.onFacade.onFocus(event);
|
|
15750
15755
|
this.inputHasFocus = true;
|
|
15751
15756
|
}, onBlur: (event) => {
|
|
15752
15757
|
this.controller.onFacade.onBlur(event);
|
|
15753
15758
|
this.inputHasFocus = false;
|
|
15754
|
-
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: '
|
|
15759
|
+
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: 'e1732b2b161044cb3deaa5b6d0dc9037697b2bd3', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
|
|
15755
15760
|
var _a;
|
|
15756
15761
|
this.clearSelection();
|
|
15757
15762
|
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15758
|
-
}, class: "single-select__delete" })), hAsync("button", { key: '
|
|
15763
|
+
}, class: "single-select__delete" })), hAsync("button", { key: '0bec77ab0fd58230427710b5f2700c555e0ab433', tabindex: "-1", class: "single-select__button", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: '714b277576bd52bc07051fc0073450752cd2f994', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: '7738666d477873fa8127e9010933164c80cd6987', role: "listbox", class: clsx('single-select__listbox', this.blockSuggestionMouseOver && 'single-select__listbox--cursor-hidden'), style: { '--visible-options': `${(_a = this._rows) !== null && _a !== void 0 ? _a : 5}` }, onKeyDown: this.handleKeyDownDropdown.bind(this) }, Array.isArray(this._filteredOptions) && this._filteredOptions.length > 0 ? (this._filteredOptions.map((option, index) => (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
15759
15764
|
if (el)
|
|
15760
15765
|
this.refOptions[index] = el;
|
|
15761
15766
|
}, tabIndex: -1, role: "option", "aria-selected": this._value === option.value ? 'true' : undefined, onClick: (event) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "2.2.16
|
|
3
|
+
"version": "2.2.16",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"@public-ui/components": "2.2.16
|
|
49
|
+
"@public-ui/components": "2.2.16"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@public-ui/components": "2.2.16
|
|
52
|
+
"@public-ui/components": "2.2.16"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"type": "commonjs",
|