@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 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: 'dc3138e5d26bf2378a912798f4d74df22b9f40e5', class: "kol-single-select" }, hAsync("div", { key: '0e66657247dd08a547763a40f11d1bd265cca470', class: `single-select ${this.state._disabled === true ? 'disabled' : ''} ` }, hAsync(KolInputTag, { key: '3bf80abe04b484fd849936644c4de583ea08160b', _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: '3a27fc72a26d502f5f1a50656e39f81f9c0d9d26', 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: '287432b2cc43c8536d0b59e9e4495a12227e6916', slot: "input" }, hAsync("div", { key: 'feb7b795dc4a6ab2447167222d9a3973f868a7da', class: "single-select__group" }, hAsync("input", Object.assign({ key: '1da2b138947d26efc863041ee43ba7bf6432d1e6', 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) => {
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: '14de8f1c01f2ae1f373ed4d5fea93f85b179b9fa', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
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: '5b295d620df8af1c6ac7f9144111924aaf1c3240', tabindex: "-1", class: "single-select__button", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: 'a75954be59a425c82f23eddb41deb2549ddff6bd', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: 'f7f1523a0f99559b50ef009f3ba7a9e2a2d596e6', 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) => {
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: 'dc3138e5d26bf2378a912798f4d74df22b9f40e5', class: "kol-single-select" }, hAsync("div", { key: '0e66657247dd08a547763a40f11d1bd265cca470', class: `single-select ${this.state._disabled === true ? 'disabled' : ''} ` }, hAsync(KolInputTag, { key: '3bf80abe04b484fd849936644c4de583ea08160b', _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: '3a27fc72a26d502f5f1a50656e39f81f9c0d9d26', 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: '287432b2cc43c8536d0b59e9e4495a12227e6916', slot: "input" }, hAsync("div", { key: 'feb7b795dc4a6ab2447167222d9a3973f868a7da', class: "single-select__group" }, hAsync("input", Object.assign({ key: '1da2b138947d26efc863041ee43ba7bf6432d1e6', 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
+ 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: '14de8f1c01f2ae1f373ed4d5fea93f85b179b9fa', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
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: '5b295d620df8af1c6ac7f9144111924aaf1c3240', tabindex: "-1", class: "single-select__button", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: 'a75954be59a425c82f23eddb41deb2549ddff6bd', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: 'f7f1523a0f99559b50ef009f3ba7a9e2a2d596e6', 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
+ }, 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-rc.2",
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-rc.2"
49
+ "@public-ui/components": "2.2.16"
50
50
  },
51
51
  "peerDependencies": {
52
- "@public-ui/components": "2.2.16-rc.2"
52
+ "@public-ui/components": "2.2.16"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "commonjs",