@public-ui/hydrate 2.2.20 → 2.2.21
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 +166 -79
- package/dist/index.mjs +166 -79
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2660,7 +2660,7 @@ var loglevel = {exports: {}};
|
|
|
2660
2660
|
|
|
2661
2661
|
var h = loglevel.exports;
|
|
2662
2662
|
|
|
2663
|
-
const
|
|
2663
|
+
const j=(t,e)=>s=>s(t,e),F=(t,e)=>s=>s(t,e,{append:!1}),Y=()=>{const t=typeof process<"u"&&process.env?process.env:{},e=t.NODE_ENV==="test",s="VITEST"in t,o="JEST_WORKER_ID"in t,a="PLAYWRIGHT_TEST_BASE_URL"in t,r=t.CI==="true",i=t.TEST==="true"||t.IS_TEST==="true",c=typeof navigator<"u"&&navigator.webdriver===!0,y=typeof navigator<"u"&&/playwright|puppeteer|webdriver|selenium|testcafe/i.test(navigator.userAgent);return e||s||o||a||r||i||c||y},n$1={A11yUi:{CSS_STYLE_CACHE:new Map,IS_TEST_ENVIRONMENT:Y(),PERFORMANCE_MEASURES:new Map,STYLING_TASK_QUEUE:new Map,THEMES:new Map,showAverageTimes:()=>{const t={};for(const[s,o]of n$1.A11yUi.PERFORMANCE_MEASURES.entries())t[s]=[o.totalTime/o.count,o.count];const e=Object.entries(t).sort((s,o)=>o[1][0]-s[1][0]);return console.table(Object.fromEntries(e.map(([s,[o,a]])=>[s,{"avg (ms)":parseFloat(o.toFixed(2)),count:a}]))),t}}};let f=!1;const k=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,G=t=>typeof t=="string"&&k.test(t),S=t=>{if(!G(t))throw new Error(`[Theming] The theme identifier "${typeof t=="string"?t:""}" (Type: ${typeof t}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},A=t=>t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s*([{},;])\s*/g,"$1").replace(/:\s+/g,":").replace(/\s+/g," ").replace(/;\}/g,"}").trim(),x=(t,e,s,o)=>T(t,e,s,o),T=(t,e,s,o)=>{o=o??{},o.append=o.append??!1,S(t),!f&&(f=!0,h.warn(`[Theming] The theme process is locked. This means that the theme "${t}" should not be patched.
|
|
2664
2664
|
|
|
2665
2665
|
import { register } from 'adopted-style-sheets';
|
|
2666
2666
|
import { defineCustomElements } from '...';
|
|
@@ -2670,7 +2670,7 @@ const I=(t,e)=>s=>s(t,e),P$1=(t,e)=>s=>s(t,e,{append:!1}),$=()=>{const t=typeof
|
|
|
2670
2670
|
.then(() => {
|
|
2671
2671
|
// run your app or website
|
|
2672
2672
|
})
|
|
2673
|
-
.catch(console.warn);`));let
|
|
2673
|
+
.catch(console.warn);`));let a=n$1.A11yUi.THEMES.get(t);if(a||(a=new Map,n$1.A11yUi.THEMES.set(t,a)),o.append&&a.has(e)){const r=a.get(e);a.set(e,A(`${r}${s}`));}else a.set(e,A(s));},K=(t,e,s,o)=>g(t,e,s,o),g=(t,e,s,o)=>(S(t),typeof e=="object"&&e!==null&&Object.getOwnPropertyNames(e).forEach(a=>{const r=e[a],i=a.toLowerCase(),c=typeof o?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(a)?o.transformTagName(i):a;typeof r=="string"&&r.length>0&&T(t,c.toUpperCase(),r,s);}),t);const v=new Set,N=new Map,X=/--[^;]+/g,Z$1=/:/,ee=typeof MutationObserver<"u";let R=()=>{};const te=(t,e)=>{let s=e.match(X);if(Array.isArray(s)){s=s.filter(a=>Z$1.test(a));const o=document.createElement("style");o.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(o);}v.add(t);},d=(t,e)=>{const s=n$1.A11yUi.THEMES.get(t);if(s instanceof Map){const o=s.get(e);if(o!==void 0)return o}return ""},se=t=>{const e=t.firstChild;if(!(!(e instanceof HTMLStyleElement)||e.dataset.themingFallback!==void 0))for(const s of Array.from(t.childNodes))if(s instanceof HTMLStyleElement&&s.tagName==="STYLE"&&s.dataset.themingFallback===void 0)t.removeChild(s);else break},oe=(t,e)=>{try{if(n$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=e.filter(o=>typeof o=="string"&&o.length>0).map(o=>{let a=N.get(o);return a||(a=new CSSStyleSheet,a.replaceSync(o),N.set(o,a)),a});t.adoptedStyleSheets=s;}catch{for(let o=e.length-1;o>=0;o--){const a=e[o];if(typeof a!="string"||a.length===0)continue;const r=e.length-1-o,i=document.createElement("style");switch(i.dataset.themingFallback="",r){case 4:i.dataset.themingBaseA11y="";break;case 3:i.dataset.themingBaseGlobal="";break;case 2:i.dataset.themingBaseComponent="";break;case 1:i.dataset.themingCustomGlobal="";break;case 0:i.dataset.themingCustomComponent="";break;default:i.dataset.themingUnknown="";break}i.innerHTML=a,t.insertBefore(i,t.firstChild);}}},ae=(t,e,s)=>{if(s===!1||s?.mode!=="before"&&s?.mode!=="after")return;const o=Array.from(t.childNodes).filter(r=>r instanceof HTMLStyleElement&&r.tagName==="STYLE");let a;try{a=Array.from(t.adoptedStyleSheets);}catch{a=[];}if(!(o.length===0&&a.length===0))if(s.mode==="before"){const r=[...a.map(i=>Array.from(i.cssRules).map(c=>c.cssText).join("")),...o.map(i=>i.innerHTML)];e.unshift(...r);}else o.forEach(r=>e.push(r.innerHTML)),a.forEach(r=>e.push(Array.from(r.cssRules).map(i=>i.cssText).join("")));},ne=(t,e,s)=>{const o=e.name||"default";let a;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");a=t.shadowRoot;}catch{a=t;}const r=n$1.A11yUi.CSS_STYLE_CACHE.get(o)?.get(t.tagName);if(r)_(t,a,r,s);else {const i=d(o,"PROPERTIES"),c=d(o,"GLOBAL"),y=d(o,t.tagName);v.has(o)===!1&&te(o,c);const u=[i,c,y];if(ae(a,u,e.encroachCss),e.cache===!0){let m=n$1.A11yUi.CSS_STYLE_CACHE.get(o);m||(m=new Map,n$1.A11yUi.CSS_STYLE_CACHE.set(o,m)),m.set(t.tagName,u);}_(t,a,u,s);}},_=(t,e,s,o)=>{const a=n$1.A11yUi.Theme?.loglevel==="debug",r=a?performance.now():0;if(se(e),oe(e,s),me(t),requestAnimationFrame(o),a){const i=performance.now()-r,c=n$1.A11yUi.PERFORMANCE_MEASURES.get(t.tagName);c?(c.count+=1,c.totalTime+=i):n$1.A11yUi.PERFORMANCE_MEASURES.set(t.tagName,{count:1,totalTime:i});}},O=t=>{const e=n$1.A11yUi.STYLING_TASK_QUEUE.get(t);if(e){const{resetCss:s,themeDetails:o}=e;ne(t,o,s);}};const ce={attributes:!0,attributeFilter:[],childList:!1,subtree:!1},I=ee?new MutationObserver((t,e)=>{const s=[];for(const o of t){const a=o.target;a.classList.contains("hydrated")&&n$1.A11yUi.STYLING_TASK_QUEUE.has(a)&&(O(a),s.push(a));}for(const o of s)e.observe(o,ce);}):null;I&&(R=()=>{});const me=t=>{n$1.A11yUi.STYLING_TASK_QUEUE.delete(t),R();};class fe{Prefix;Key;Tag;createTheme=(e,s)=>F(e,s);createTranslation=(e,s)=>j(e,s);constructor(e,s,o){this.Prefix=e,this.Key=Object.getOwnPropertyNames(s),this.Tag=Object.getOwnPropertyNames(o);}}
|
|
2674
2674
|
|
|
2675
2675
|
var KeyEnum;
|
|
2676
2676
|
(function (KeyEnum) {
|
|
@@ -3802,9 +3802,9 @@ const koliBriQuerySelector = (selector, node) => querySelector(selector, node ||
|
|
|
3802
3802
|
const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, node || getDocument());
|
|
3803
3803
|
class KoliBriDevHelper {
|
|
3804
3804
|
}
|
|
3805
|
-
KoliBriDevHelper.getCssStyle =
|
|
3806
|
-
KoliBriDevHelper.patchTheme =
|
|
3807
|
-
KoliBriDevHelper.patchThemeTag =
|
|
3805
|
+
KoliBriDevHelper.getCssStyle = d;
|
|
3806
|
+
KoliBriDevHelper.patchTheme = K;
|
|
3807
|
+
KoliBriDevHelper.patchThemeTag = x;
|
|
3808
3808
|
KoliBriDevHelper.querySelector = koliBriQuerySelector;
|
|
3809
3809
|
KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
|
|
3810
3810
|
KoliBriDevHelper.stringifyJson = stringifyJson;
|
|
@@ -4501,7 +4501,7 @@ var KoliBriProgressVariantEnum;
|
|
|
4501
4501
|
KoliBriProgressVariantEnum["cycle"] = "cycle";
|
|
4502
4502
|
})(KoliBriProgressVariantEnum || (KoliBriProgressVariantEnum = {}));
|
|
4503
4503
|
|
|
4504
|
-
new
|
|
4504
|
+
new fe('kol', KeyEnum, TagEnum);
|
|
4505
4505
|
|
|
4506
4506
|
let nonce = () => Math.floor(Math.random() * 16777215).toString(16);
|
|
4507
4507
|
if (processEnv === 'test') {
|
|
@@ -5861,20 +5861,25 @@ class AssociatedInputController {
|
|
|
5861
5861
|
|
|
5862
5862
|
class KolButtonWc {
|
|
5863
5863
|
async kolFocus() {
|
|
5864
|
-
|
|
5865
|
-
|
|
5864
|
+
return new Promise((resolve) => {
|
|
5865
|
+
requestAnimationFrame(() => {
|
|
5866
|
+
var _a;
|
|
5867
|
+
(_a = this.buttonRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5868
|
+
resolve();
|
|
5869
|
+
});
|
|
5870
|
+
});
|
|
5866
5871
|
}
|
|
5867
5872
|
render() {
|
|
5868
5873
|
var _a;
|
|
5869
5874
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
5870
5875
|
const ariaDescription = (_a = this.state._ariaDescription) === null || _a === void 0 ? void 0 : _a.trim();
|
|
5871
|
-
return (hAsync(Host, { key: '
|
|
5876
|
+
return (hAsync(Host, { key: '72b39aeae02832173cc71325c24868e6a644e76f', class: "kol-button-wc" }, hAsync("button", Object.assign({ key: '399d111ec92384c05a358e2454f94a83395b9b50', ref: this.catchRef, accessKey: this.state._accessKey || undefined, "aria-controls": this.state._ariaControls, "aria-description": ariaDescription || undefined, "aria-expanded": mapBoolean2String(this.state._ariaExpanded), "aria-haspopup": this._ariaHasPopup, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, "aria-selected": mapStringOrBoolean2String(this.state._ariaSelected), "aria-keyshortcuts": this.state._shortKey, class: {
|
|
5872
5877
|
button: true,
|
|
5873
5878
|
disabled: this.state._disabled === true,
|
|
5874
5879
|
[this.state._variant]: this.state._variant !== 'custom',
|
|
5875
5880
|
[this.state._customClass]: this.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,
|
|
5876
5881
|
'hide-label': this.state._hideLabel === true,
|
|
5877
|
-
}, disabled: this.state._disabled, id: this.state._id, name: this.state._name }, this.state._on, { onClick: this.onClick, role: this.state._role, tabIndex: this.state._tabIndex, type: this.state._type }), hAsync(KolSpanWcTag, { key: '
|
|
5882
|
+
}, disabled: this.state._disabled, id: this.state._id, name: this.state._name }, this.state._on, { onClick: this.onClick, role: this.state._role, tabIndex: this.state._tabIndex, type: this.state._type }), hAsync(KolSpanWcTag, { key: '3b3833d08213db84d1f2bc2be033c1865627b62f', class: "button-inner", _badgeText: this.state._accessKey || this.state._shortKey, _icons: this.state._icons, _hideLabel: this.state._hideLabel, _label: hasExpertSlot ? '' : this.state._label }, hAsync("slot", { key: '0e720bf8fd610c4592411e0890dd883d638de66c', name: "expert", slot: "expert" }))), hAsync(KolTooltipWcTag, { key: 'f9d29f9d7ecff5576cb0eb32fc8011fc107573f0', "aria-hidden": "true", hidden: hasExpertSlot || !this.state._hideLabel, _badgeText: this.state._accessKey || this.state._shortKey, _align: this.state._tooltipAlign, _label: typeof this.state._label === 'string' ? this.state._label : '' })));
|
|
5878
5883
|
}
|
|
5879
5884
|
constructor(hostRef) {
|
|
5880
5885
|
registerInstance(this, hostRef);
|
|
@@ -6453,8 +6458,13 @@ class KolCombobox {
|
|
|
6453
6458
|
return this.state._value;
|
|
6454
6459
|
}
|
|
6455
6460
|
async kolFocus() {
|
|
6456
|
-
|
|
6457
|
-
|
|
6461
|
+
return new Promise((resolve) => {
|
|
6462
|
+
requestAnimationFrame(() => {
|
|
6463
|
+
var _a;
|
|
6464
|
+
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
6465
|
+
resolve();
|
|
6466
|
+
});
|
|
6467
|
+
});
|
|
6458
6468
|
}
|
|
6459
6469
|
selectOption(option) {
|
|
6460
6470
|
var _a;
|
|
@@ -6524,13 +6534,13 @@ class KolCombobox {
|
|
|
6524
6534
|
render() {
|
|
6525
6535
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
6526
6536
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
6527
|
-
return (hAsync(Host, { key: '
|
|
6537
|
+
return (hAsync(Host, { key: '1de35d10edaef706615095d3323f0f6101b3c404', class: "kol-combobox" }, hAsync("div", { key: '224bf9bf096eb4203abf33fce2ad23c2390f9918', class: clsx('combobox', this.state._disabled && 'combobox--disabled') }, hAsync(KolInputTag, { key: 'b30dbc59a547b0dfb40ac84307b72b70255742bd', _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, onClick: () => { var _a; return (_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '12dcb1c35fae997d044d3b1051458147919c1adb', 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: '0b725fff09d7b7a88f9e91c7fbb52b292f9c92e1', slot: "input" }, hAsync("div", { key: 'e0c4c6229acc738f894d33939251f4484fc1f1b6', class: "combobox__group" }, hAsync("input", Object.assign({ key: '8025fe21ffe146f4abb046a977bdee335868a957', ref: this.catchRef, class: "combobox__input", type: "text", role: "combobox", "aria-autocomplete": "both", "aria-expanded": this._isOpen ? 'true' : 'false', "aria-controls": "listbox", value: this.state._value, 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-labelledby": this.state._id, "aria-activedescendant": this._isOpen && this._focusedOptionIndex >= 0 ? `option-${this._focusedOptionIndex}` : undefined, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, name: this.state._name, required: this.state._required }, this.controller.onFacade, { onFocus: (event) => {
|
|
6528
6538
|
this.controller.onFacade.onFocus(event);
|
|
6529
6539
|
this.inputHasFocus = true;
|
|
6530
6540
|
}, onBlur: (event) => {
|
|
6531
6541
|
this.controller.onFacade.onBlur(event);
|
|
6532
6542
|
this.inputHasFocus = false;
|
|
6533
|
-
}, onChange: this.onChange.bind(this), onInput: this.onInput.bind(this), placeholder: this.state._placeholder })), hAsync("button", { key: '
|
|
6543
|
+
}, onChange: this.onChange.bind(this), onInput: this.onInput.bind(this), placeholder: this.state._placeholder })), hAsync("button", { key: '7e3a5739fe56902a9861e841ca47796b31dc11b0', tabindex: "-1", class: "combobox__icon", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: '108ff74063106085f9f5ab1ca207b5636d77fc3d', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: '18b9105b2a475b4c7e4187567b2b9ea6b8331c51', role: "listbox", class: clsx('combobox__listbox', this.blockSuggestionMouseOver && 'combobox__listbox--cursor-hidden'), onKeyDown: this.handleKeyDownDropdown.bind(this) }, Array.isArray(this._filteredSuggestions) &&
|
|
6534
6544
|
this._filteredSuggestions.length > 0 &&
|
|
6535
6545
|
this._filteredSuggestions.map((option, index) => (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
6536
6546
|
if (el)
|
|
@@ -7634,19 +7644,24 @@ class KolInputCheckbox {
|
|
|
7634
7644
|
await this.kolFocus();
|
|
7635
7645
|
}
|
|
7636
7646
|
async kolFocus() {
|
|
7637
|
-
|
|
7638
|
-
|
|
7647
|
+
return new Promise((resolve) => {
|
|
7648
|
+
requestAnimationFrame(() => {
|
|
7649
|
+
var _a;
|
|
7650
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7651
|
+
resolve();
|
|
7652
|
+
});
|
|
7653
|
+
});
|
|
7639
7654
|
}
|
|
7640
7655
|
render() {
|
|
7641
7656
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
7642
7657
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
7643
|
-
return (hAsync(Host, { key: '
|
|
7658
|
+
return (hAsync(Host, { key: '4cadc5a62e5a1ea876f3a1b4aee4dfd25d4a8f64', class: "kol-input-checkbox" }, hAsync(KolInputTag, { key: '0066a35b63781caf20487e561dadeec425023d5e', class: {
|
|
7644
7659
|
checkbox: true,
|
|
7645
7660
|
[this.state._variant]: true,
|
|
7646
7661
|
'hide-label': !!this.state._hideLabel,
|
|
7647
7662
|
checked: this.state._checked,
|
|
7648
7663
|
indeterminate: this.state._indeterminate,
|
|
7649
|
-
}, "data-label-align": this.state._labelAlign || 'right', "data-role": this.state._variant === 'button' ? 'button' : undefined, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
7664
|
+
}, "data-label-align": this.state._labelAlign || 'right', "data-role": this.state._variant === 'button' ? 'button' : undefined, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '6f573626553adacd6aee5ffe842808c3c0512cc1', 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("label", { key: '2d3921dd12084a11bfa45c816a72d9ef533aeeb6', slot: "input", class: "checkbox-container" }, hAsync(KolIconTag, { key: '1579ae9ba28afb9224aae21b9bd0d9cec4947fb2', class: "icon", _icons: this.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked, _label: "" }), hAsync("input", Object.assign({ key: '47dba5d60adc6f3d5b11e4da162ba2f7768b205f', class: `checkbox-input-element${this.state._variant === 'button' ? ' visually-hidden' : ''}`, ref: this.catchRef, title: "", 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, checked: this.state._checked, disabled: this.state._disabled, id: this.state._id, indeterminate: this.state._indeterminate, name: this.state._name, required: this.state._required, tabIndex: this.state._tabIndex, type: "checkbox" }, this.controller.onFacade, { onInput: this.onInput, onChange: this.onChange, onKeyDown: this.onKeyDown.bind(this), onFocus: (event) => {
|
|
7650
7665
|
this.controller.onFacade.onFocus(event);
|
|
7651
7666
|
this.inputHasFocus = true;
|
|
7652
7667
|
}, onBlur: (event) => {
|
|
@@ -7912,17 +7927,22 @@ class KolInputColor {
|
|
|
7912
7927
|
await this.kolFocus();
|
|
7913
7928
|
}
|
|
7914
7929
|
async kolFocus() {
|
|
7915
|
-
|
|
7916
|
-
|
|
7930
|
+
return new Promise((resolve) => {
|
|
7931
|
+
requestAnimationFrame(() => {
|
|
7932
|
+
var _a;
|
|
7933
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7934
|
+
resolve();
|
|
7935
|
+
});
|
|
7936
|
+
});
|
|
7917
7937
|
}
|
|
7918
7938
|
render() {
|
|
7919
7939
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
7920
7940
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
7921
7941
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
7922
|
-
return (hAsync(Host, { key: '
|
|
7942
|
+
return (hAsync(Host, { key: '14802386cf0adc1cc1817c249c55e2e4b6f3c4d8', class: "kol-input-color" }, hAsync(KolInputTag, { key: 'b4560179abffdb5ee068cbd55b4772d4f2fb358a', class: {
|
|
7923
7943
|
color: true,
|
|
7924
7944
|
'hide-label': !!this.state._hideLabel,
|
|
7925
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _hideError: this.state._hideError, _id: this.state._id, _label: this.state._label, _shortKey: this.state._shortKey, _suggestions: this.state._suggestions, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
7945
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _hideError: this.state._hideError, _id: this.state._id, _label: this.state._label, _shortKey: this.state._shortKey, _suggestions: this.state._suggestions, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '515bf88ae4da7e9ee9a81da42b3d432b57d9d41a', 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: '32c80e95114d947549cd9dba6aecfffe94f0450a', slot: "input" }, hAsync("input", Object.assign({ key: '783413ec677c8325d35570674c361210eee5397f', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, name: this.state._name, slot: "input", type: "color", value: this.state._value }, this.controller.onFacade, { onFocus: (event) => {
|
|
7926
7946
|
this.controller.onFacade.onFocus(event);
|
|
7927
7947
|
this.inputHasFocus = true;
|
|
7928
7948
|
}, onBlur: (event) => {
|
|
@@ -8267,8 +8287,13 @@ class KolInputDate {
|
|
|
8267
8287
|
await this.kolFocus();
|
|
8268
8288
|
}
|
|
8269
8289
|
async kolFocus() {
|
|
8270
|
-
|
|
8271
|
-
|
|
8290
|
+
return new Promise((resolve) => {
|
|
8291
|
+
requestAnimationFrame(() => {
|
|
8292
|
+
var _a;
|
|
8293
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
8294
|
+
resolve();
|
|
8295
|
+
});
|
|
8296
|
+
});
|
|
8272
8297
|
}
|
|
8273
8298
|
async reset() {
|
|
8274
8299
|
this.state = Object.assign(Object.assign({}, this.state), { _value: null });
|
|
@@ -8295,10 +8320,10 @@ class KolInputDate {
|
|
|
8295
8320
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
8296
8321
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
8297
8322
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
8298
|
-
return (hAsync(Host, { key: '
|
|
8323
|
+
return (hAsync(Host, { key: '7e608a0da873bcf10d9b86be7fad4ad28fb2e219', class: { 'kol-input-date': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: 'ab411d3ae02fe92c8791e84db7e4b9eef1a6b6c8', class: {
|
|
8299
8324
|
[this.state._type]: true,
|
|
8300
8325
|
'hide-label': !!this.state._hideLabel,
|
|
8301
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
8326
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '5730c3b2fd4a4515171edf5b75dc1711a8e6ea94', 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: '5abee0db0e6d0b78f22f60b0cb333d40a0075aae', slot: "input" }, hAsync("input", Object.assign({ key: '09f3aa26a9a7f8e5697db6fe38f9cb5a61a66431', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, step: this.state._step, type: this.state._type, value: this.state._value || undefined }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onBlur: (event) => {
|
|
8302
8327
|
this.controller.onFacade.onBlur(event);
|
|
8303
8328
|
this.inputHasFocus = false;
|
|
8304
8329
|
}, onFocus: (event) => {
|
|
@@ -8702,17 +8727,22 @@ class KolInputEmail {
|
|
|
8702
8727
|
await this.kolFocus();
|
|
8703
8728
|
}
|
|
8704
8729
|
async kolFocus() {
|
|
8705
|
-
|
|
8706
|
-
|
|
8730
|
+
return new Promise((resolve) => {
|
|
8731
|
+
requestAnimationFrame(() => {
|
|
8732
|
+
var _a;
|
|
8733
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
8734
|
+
resolve();
|
|
8735
|
+
});
|
|
8736
|
+
});
|
|
8707
8737
|
}
|
|
8708
8738
|
render() {
|
|
8709
8739
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
8710
8740
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
8711
8741
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
8712
|
-
return (hAsync(Host, { key: '
|
|
8742
|
+
return (hAsync(Host, { key: '1697bbe3f8d64a3cadb6b483ac94d4d0d6343539', class: {
|
|
8713
8743
|
'kol-input-email': true,
|
|
8714
8744
|
'has-value': this.state._hasValue,
|
|
8715
|
-
} }, hAsync(KolInputTag, { key: '
|
|
8745
|
+
} }, hAsync(KolInputTag, { key: '61c5c52d2f4dd6f5ee6574a71683d81c872cfe70', class: { email: true, 'hide-label': !!this.state._hideLabel }, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hasCounter: this.state._hasCounter, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'eccf5d623456062a3f60841f1fd59bb2064d3e31', 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: '8e37b9a6be99a8fb203865efc6f296d638bb9395', slot: "input" }, hAsync("input", Object.assign({ key: 'd40837383b7acbc6cce00b003190dd138fc6f90f', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, multiple: this.state._multiple, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, type: "email", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onInput: this.onInput, onFocus: (event) => {
|
|
8716
8746
|
this.controller.onFacade.onFocus(event);
|
|
8717
8747
|
this.inputHasFocus = true;
|
|
8718
8748
|
}, onBlur: (event) => {
|
|
@@ -8995,16 +9025,21 @@ class KolInputFile {
|
|
|
8995
9025
|
await this.kolFocus();
|
|
8996
9026
|
}
|
|
8997
9027
|
async kolFocus() {
|
|
8998
|
-
|
|
8999
|
-
|
|
9028
|
+
return new Promise((resolve) => {
|
|
9029
|
+
requestAnimationFrame(() => {
|
|
9030
|
+
var _a;
|
|
9031
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9032
|
+
resolve();
|
|
9033
|
+
});
|
|
9034
|
+
});
|
|
9000
9035
|
}
|
|
9001
9036
|
render() {
|
|
9002
9037
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
9003
9038
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9004
|
-
return (hAsync(Host, { key: '
|
|
9039
|
+
return (hAsync(Host, { key: '24b411d3c604d89b04631615d10ecb3cb6a03ffc', class: "kol-input-file" }, hAsync(KolInputTag, { key: 'ccf43e4a304839702ae0d76d33780377ff384cc7', class: {
|
|
9005
9040
|
file: true,
|
|
9006
9041
|
'hide-label': !!this.state._hideLabel,
|
|
9007
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
9042
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'f8097c605adcabb3adf462f322019d658d0f2b21', 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: '69aae8136317eeb3d7523cbc52bbcaf5c65041b8', slot: "input" }, hAsync("input", Object.assign({ key: '11830ba3a0567d4255d359f451efe534b8920be4', ref: this.catchRef, title: "", accept: this.state._accept, 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, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, multiple: this.state._multiple, name: this.state._name, required: this.state._required, type: "file", value: this.state._value }, this.controller.onFacade, { onChange: this.onChange, onInput: this.onInput, onFocus: (event) => {
|
|
9008
9043
|
this.controller.onFacade.onFocus(event);
|
|
9009
9044
|
this.inputHasFocus = true;
|
|
9010
9045
|
}, onBlur: (event) => {
|
|
@@ -9299,20 +9334,25 @@ class KolInputNumber {
|
|
|
9299
9334
|
await this.kolFocus();
|
|
9300
9335
|
}
|
|
9301
9336
|
async kolFocus() {
|
|
9302
|
-
|
|
9303
|
-
|
|
9337
|
+
return new Promise((resolve) => {
|
|
9338
|
+
requestAnimationFrame(() => {
|
|
9339
|
+
var _a;
|
|
9340
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9341
|
+
resolve();
|
|
9342
|
+
});
|
|
9343
|
+
});
|
|
9304
9344
|
}
|
|
9305
9345
|
render() {
|
|
9306
9346
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
9307
9347
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
9308
9348
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9309
|
-
return (hAsync(Host, { key: '
|
|
9349
|
+
return (hAsync(Host, { key: 'a01b3ae7dbe3a123d460766bf9ce8c919cffb616', class: {
|
|
9310
9350
|
'kol-input-number': true,
|
|
9311
9351
|
'has-value': this.state._hasValue,
|
|
9312
|
-
} }, hAsync(KolInputTag, { key: '
|
|
9352
|
+
} }, hAsync(KolInputTag, { key: 'aa1b4422efcb0b7c8a3338db6e97421eee91a8f3', class: {
|
|
9313
9353
|
number: true,
|
|
9314
9354
|
'hide-label': !!this.state._hideLabel,
|
|
9315
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
9355
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '0d478c7411dc5b4b4138486369c3e1e70575931a', 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: 'f005eb5e009b8ae5f545172dba4604588ae7a4bb', slot: "input" }, hAsync("input", Object.assign({ key: '247f599bae4a0797970119064981bfd10b1fefde', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, placeholder: this.state._placeholder, step: this.state._step, type: "number", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onFocus: (event) => {
|
|
9316
9356
|
this.controller.onFacade.onFocus(event);
|
|
9317
9357
|
this.inputHasFocus = true;
|
|
9318
9358
|
}, onBlur: (event) => {
|
|
@@ -9555,19 +9595,24 @@ class KolInputPassword {
|
|
|
9555
9595
|
await this.kolFocus();
|
|
9556
9596
|
}
|
|
9557
9597
|
async kolFocus() {
|
|
9558
|
-
|
|
9559
|
-
|
|
9598
|
+
return new Promise((resolve) => {
|
|
9599
|
+
requestAnimationFrame(() => {
|
|
9600
|
+
var _a;
|
|
9601
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9602
|
+
resolve();
|
|
9603
|
+
});
|
|
9604
|
+
});
|
|
9560
9605
|
}
|
|
9561
9606
|
render() {
|
|
9562
9607
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
9563
9608
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9564
|
-
return (hAsync(Host, { key: '
|
|
9609
|
+
return (hAsync(Host, { key: '053e1f02a90d4f37adb592296fcc55db16bbc325', class: {
|
|
9565
9610
|
'kol-input-password': true,
|
|
9566
9611
|
'has-value': this.state._hasValue,
|
|
9567
|
-
} }, hAsync(KolInputTag, { key: '
|
|
9612
|
+
} }, hAsync(KolInputTag, { key: '9e9036e569c8073886d2329c21056bb4df3eeb36', class: {
|
|
9568
9613
|
'hide-label': !!this.state._hideLabel,
|
|
9569
9614
|
password: true,
|
|
9570
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _msg: this.state._msg, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
9615
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _msg: this.state._msg, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '9a6e60ce548c6e07c621956ad3adfa555f4ea7a1', 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: '514fec85beb2176ee2cca2fc80e739ad9def4ae4', slot: "input" }, hAsync("input", Object.assign({ key: '0b408dad8716e91d2fae64fa93a5b40634e7ffd6', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, type: this._passwordVisible ? 'text' : 'password', value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onInput: this.onInput, onFocus: (event) => {
|
|
9571
9616
|
this.controller.onFacade.onFocus(event);
|
|
9572
9617
|
this.inputHasFocus = true;
|
|
9573
9618
|
}, onBlur: (event) => {
|
|
@@ -9840,20 +9885,25 @@ class KolInputRadio {
|
|
|
9840
9885
|
await this.kolFocus();
|
|
9841
9886
|
}
|
|
9842
9887
|
async kolFocus() {
|
|
9843
|
-
|
|
9844
|
-
|
|
9888
|
+
return new Promise((resolve) => {
|
|
9889
|
+
requestAnimationFrame(() => {
|
|
9890
|
+
var _a;
|
|
9891
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9892
|
+
resolve();
|
|
9893
|
+
});
|
|
9894
|
+
});
|
|
9845
9895
|
}
|
|
9846
9896
|
render() {
|
|
9847
9897
|
const { ariaDescribedBy, hasError, hasHint } = getRenderStates(this.state);
|
|
9848
9898
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9849
|
-
return (hAsync(Host, { key: '
|
|
9899
|
+
return (hAsync(Host, { key: 'aacd43f73967156ee1ffd5452d05d554e9011d53', class: "kol-input-radio" }, hAsync("fieldset", { key: '55b6be289684f3d28474fb465d89d7756b577c97', "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, class: {
|
|
9850
9900
|
fieldset: true,
|
|
9851
9901
|
disabled: this.state._disabled === true,
|
|
9852
9902
|
error: hasError === true,
|
|
9853
9903
|
required: this.state._required === true,
|
|
9854
9904
|
'hidden-error': this._hideError === true,
|
|
9855
9905
|
[this.state._orientation]: true,
|
|
9856
|
-
} }, hAsync("legend", { key: '
|
|
9906
|
+
} }, hAsync("legend", { key: '7ddc271483f90f25372c6a5ddba259f18bb6df04', class: "block w-full mb-1 leading-normal" }, hAsync("span", { key: 'b34e2b42ec642bf033a7c58e905992258295f4ca' }, hAsync("span", { key: 'fdd91949f409e495b6ba8a027cd7959cf23af153', slot: "label" }, hasExpertSlot ? hAsync("slot", { name: "expert" }) : this._label))), this.state._options.map((option, index) => {
|
|
9857
9907
|
const customId = `${this.state._id}-${index}`;
|
|
9858
9908
|
const slotName = `radio-${index}`;
|
|
9859
9909
|
const selected = this.state._value === option.value;
|
|
@@ -9872,7 +9922,7 @@ class KolInputRadio {
|
|
|
9872
9922
|
padding: this.state._hideLabel ? '0' : undefined,
|
|
9873
9923
|
visibility: this.state._hideLabel ? 'hidden' : undefined,
|
|
9874
9924
|
} }, hAsync("span", null, hAsync("span", { class: "radio-label-span-inner" }, option.label))))));
|
|
9875
|
-
}), hasError && hAsync(FormFieldMsgFc, { key: '
|
|
9925
|
+
}), hasError && hAsync(FormFieldMsgFc, { key: '5ec08b6bdaf01d265a24a3f61c8306f94f3e4645', _alert: this.showAsAlert(), _hideError: this.state._hideError, _msg: this.state._msg, _id: this.state._id }), hasHint && (hAsync("span", { key: '2a023220b8f779bed5c706a200086a6893c7f49e', class: "hint", id: `${this.state._id}-hint` }, this.state._hint)))));
|
|
9876
9926
|
}
|
|
9877
9927
|
constructor(hostRef) {
|
|
9878
9928
|
registerInstance(this, hostRef);
|
|
@@ -10115,8 +10165,13 @@ class KolInputRange {
|
|
|
10115
10165
|
await this.kolFocus();
|
|
10116
10166
|
}
|
|
10117
10167
|
async kolFocus() {
|
|
10118
|
-
|
|
10119
|
-
|
|
10168
|
+
return new Promise((resolve) => {
|
|
10169
|
+
requestAnimationFrame(() => {
|
|
10170
|
+
var _a;
|
|
10171
|
+
(_a = this.refInputNumber) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10172
|
+
resolve();
|
|
10173
|
+
});
|
|
10174
|
+
});
|
|
10120
10175
|
}
|
|
10121
10176
|
getSanitizedFloatValue(value) {
|
|
10122
10177
|
const floatValue = parseFloat(value);
|
|
@@ -10145,25 +10200,25 @@ class KolInputRange {
|
|
|
10145
10200
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
10146
10201
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
10147
10202
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
10148
|
-
return (hAsync(Host, { key: '
|
|
10203
|
+
return (hAsync(Host, { key: 'b924053d094a0d8049c0988816401cc5107a2f40', class: "kol-input-range" }, hAsync(KolInputTag, { key: '198352572b8d5647ef7df99c447222fe732d5fdd', class: {
|
|
10149
10204
|
range: true,
|
|
10150
10205
|
'hide-label': !!this.state._hideLabel,
|
|
10151
|
-
}, _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, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
10206
|
+
}, _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, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '48d7ee984cc30b0d3d7d367e25ec52b005254eee', 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: '6d7ff7ec22eb0570a4c02aa4c6ad8c9b3826c5da', slot: "input" }, hAsync("div", { key: '10af6000f2844496db597b737568d86b4faecab5', class: "inputs-wrapper", style: {
|
|
10152
10207
|
'--kolibri-input-range--input-number--width': `calc(${String((_a = this.state._max) !== null && _a !== void 0 ? _a : 100).length}ch + 2em)`,
|
|
10153
|
-
} }, hAsync("input", Object.assign({ key: '
|
|
10208
|
+
} }, hAsync("input", Object.assign({ key: '9cb81aac50fa96e641b1f36f7aeb02c49b1938e4', ref: this.catchInputRangeRef, title: "", 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-hidden": "true", autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name ? `${this.state._name}-range` : undefined, step: this.state._step, tabIndex: -1, type: "range", value: this.state._value }, this.controller.onFacade, { onChange: this.onChange, onFocus: (event) => {
|
|
10154
10209
|
this.controller.onFacade.onFocus(event);
|
|
10155
10210
|
this.inputHasFocus = true;
|
|
10156
10211
|
}, onBlur: (event) => {
|
|
10157
10212
|
this.controller.onFacade.onBlur(event);
|
|
10158
10213
|
this.inputHasFocus = false;
|
|
10159
|
-
} })), hAsync("input", Object.assign({ key: '
|
|
10214
|
+
} })), hAsync("input", Object.assign({ key: '04838adc2b606a129cd6f80a6b9e6ae71e0a9b89', ref: this.catchInputNumberRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name ? `${this.state._name}-number` : undefined, step: this.state._step, type: "number", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onChange: this.onChange, onFocus: (event) => {
|
|
10160
10215
|
this.controller.onFacade.onFocus(event);
|
|
10161
10216
|
this.inputHasFocus = true;
|
|
10162
10217
|
}, onBlur: (event) => {
|
|
10163
10218
|
this.controller.onFacade.onBlur(event);
|
|
10164
10219
|
this.inputHasFocus = false;
|
|
10165
10220
|
} }))), hasSuggestions && [
|
|
10166
|
-
hAsync("datalist", { key: '
|
|
10221
|
+
hAsync("datalist", { key: 'a0cba3e8afc7e3901b3da6207fc918415677c90f', id: `${this.state._id}-list` }, this.state._suggestions.map((option) => (hAsync("option", { value: JSON.stringify(option) })))),
|
|
10167
10222
|
]))));
|
|
10168
10223
|
}
|
|
10169
10224
|
constructor(hostRef) {
|
|
@@ -10394,20 +10449,25 @@ class KolInputText {
|
|
|
10394
10449
|
await this.kolFocus();
|
|
10395
10450
|
}
|
|
10396
10451
|
async kolFocus() {
|
|
10397
|
-
|
|
10398
|
-
|
|
10452
|
+
return new Promise((resolve) => {
|
|
10453
|
+
requestAnimationFrame(() => {
|
|
10454
|
+
var _a;
|
|
10455
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10456
|
+
resolve();
|
|
10457
|
+
});
|
|
10458
|
+
});
|
|
10399
10459
|
}
|
|
10400
10460
|
render() {
|
|
10401
10461
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
10402
10462
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
10403
10463
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
10404
|
-
return (hAsync(Host, { key: '
|
|
10464
|
+
return (hAsync(Host, { key: '1955f330e0ca93d6bae951877f44e26f1d4ff5c5', class: {
|
|
10405
10465
|
'has-value': this.state._hasValue,
|
|
10406
10466
|
'kol-input-text': true,
|
|
10407
|
-
} }, hAsync(KolInputTag, { key: '
|
|
10467
|
+
} }, hAsync(KolInputTag, { key: '80808142f2a05e3cb8cf8a9d305c0e2e19eab272', class: {
|
|
10408
10468
|
[this.state._type]: true,
|
|
10409
10469
|
'hide-label': !!this.state._hideLabel,
|
|
10410
|
-
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _suggestions: this.state._suggestions, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
10470
|
+
}, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _smartButton: this.state._smartButton, _suggestions: this.state._suggestions, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '8b53ff880493ad5a5ef84663a6c40bfb2d51ba22', 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: '322c980c568568156fc22c126d010a37f78e3af3', slot: "input" }, hAsync("input", Object.assign({ key: '4bb71629ce134aa44e5a31c7723e19374e5274c8', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, spellcheck: this.state._spellCheck, type: this.state._type, value: this.state._value }, this.controller.onFacade, { onChange: this.onChange, onInput: this.onInput, onKeyDown: this.onKeyDown, onFocus: (event) => {
|
|
10411
10471
|
this.controller.onFacade.onFocus(event);
|
|
10412
10472
|
this.inputHasFocus = true;
|
|
10413
10473
|
}, onBlur: (event) => {
|
|
@@ -11159,15 +11219,20 @@ class KolLinkWc {
|
|
|
11159
11219
|
};
|
|
11160
11220
|
}
|
|
11161
11221
|
async kolFocus() {
|
|
11162
|
-
|
|
11163
|
-
|
|
11222
|
+
return new Promise((resolve) => {
|
|
11223
|
+
requestAnimationFrame(() => {
|
|
11224
|
+
var _a;
|
|
11225
|
+
(_a = this.anchorRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11226
|
+
resolve();
|
|
11227
|
+
});
|
|
11228
|
+
});
|
|
11164
11229
|
}
|
|
11165
11230
|
render() {
|
|
11166
11231
|
var _a;
|
|
11167
11232
|
const { isExternal, tagAttrs } = this.getRenderValues();
|
|
11168
11233
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
11169
11234
|
const ariaDescription = (_a = this.state._ariaDescription) === null || _a === void 0 ? void 0 : _a.trim();
|
|
11170
|
-
return (hAsync(Host, { key: '
|
|
11235
|
+
return (hAsync(Host, { key: '1b4ad1db2c1923366c875f58f97b65ac601ef019', class: "kol-link-wc" }, hAsync("a", Object.assign({ key: 'cf97afab9924d108a47cccb13b9e8fe1408e7fca', ref: this.catchRef }, tagAttrs, { accessKey: this.state._accessKey, "aria-current": this.state._ariaCurrent, "aria-description": ariaDescription || undefined, "aria-disabled": this.state._disabled ? 'true' : undefined, "aria-expanded": typeof this.state._ariaExpanded === 'boolean' ? String(this.state._ariaExpanded) : undefined, "aria-keyshortcuts": this.state._shortKey, "aria-owns": this.state._ariaOwns, "aria-label": this.state._hideLabel && typeof this.state._label === 'string'
|
|
11171
11236
|
? `${this.state._label}${isExternal ? ` (${translate('kol-open-link-in-tab')})` : ''}`
|
|
11172
11237
|
: undefined, class: {
|
|
11173
11238
|
disabled: this.state._disabled === true,
|
|
@@ -11175,7 +11240,7 @@ class KolLinkWc {
|
|
|
11175
11240
|
'hide-label': this.state._hideLabel === true,
|
|
11176
11241
|
[this.state._variant]: this.state._variant !== 'custom',
|
|
11177
11242
|
[this.state._customClass]: this.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,
|
|
11178
|
-
} }, this.state._on, { onClick: this.onClick, onKeyPress: this.onClick, role: this.state._role, tabIndex: this.state._disabled ? -1 : this.state._tabIndex }), hAsync(KolSpanWcTag, { key: '
|
|
11243
|
+
} }, this.state._on, { onClick: this.onClick, onKeyPress: this.onClick, role: this.state._role, tabIndex: this.state._disabled ? -1 : this.state._tabIndex }), hAsync(KolSpanWcTag, { key: '2c747fd94e2a4559bb0637a88b93216309d8d905', _badgeText: this.state._accessKey || this.state._shortKey, _icons: this.state._icons, _hideLabel: this.state._hideLabel, _label: hasExpertSlot ? '' : this.state._label || this.state._href }, hAsync("slot", { key: 'd8fb91207af9cb4a49f9959459d58490c42f2da4', name: "expert", slot: "expert" })), isExternal && (hAsync(KolIconTag, { key: '175464f02c1f332bf524366d7eaef141eb2f3821', class: "external-link-icon", _label: this.state._hideLabel ? '' : translate('kol-open-link-in-tab'), _icons: 'codicon codicon-link-external', "aria-hidden": this.state._hideLabel }))), hAsync(KolTooltipWcTag, { key: 'fe892b69044d673e8968c4eed71a15555811a8d5', "aria-hidden": "true", hidden: hasExpertSlot || !this.state._hideLabel, _badgeText: this.state._accessKey || this.state._shortKey, _align: this.state._tooltipAlign, _label: this.state._label || this.state._href })));
|
|
11179
11244
|
}
|
|
11180
11245
|
validateAccessKey(value) {
|
|
11181
11246
|
validateAccessKey(this, value);
|
|
@@ -14961,8 +15026,13 @@ class KolSelectWc {
|
|
|
14961
15026
|
await this.kolFocus();
|
|
14962
15027
|
}
|
|
14963
15028
|
async kolFocus() {
|
|
14964
|
-
|
|
14965
|
-
|
|
15029
|
+
return new Promise((resolve) => {
|
|
15030
|
+
requestAnimationFrame(() => {
|
|
15031
|
+
var _a;
|
|
15032
|
+
(_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15033
|
+
resolve();
|
|
15034
|
+
});
|
|
15035
|
+
});
|
|
14966
15036
|
}
|
|
14967
15037
|
renderOptgroup(optgroup, preKey) {
|
|
14968
15038
|
var _a;
|
|
@@ -14979,16 +15049,16 @@ class KolSelectWc {
|
|
|
14979
15049
|
render() {
|
|
14980
15050
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
14981
15051
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
14982
|
-
return (hAsync(Host, { key: '
|
|
15052
|
+
return (hAsync(Host, { key: '09e79a47288a7aa9e25f6ffc1dd9f94c4c356771', class: { 'kol-select-wc': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: 'c120d6f9c4450323d5349df62954450013e1196d', class: {
|
|
14983
15053
|
'hide-label': !!this.state._hideLabel,
|
|
14984
15054
|
select: true,
|
|
14985
|
-
}, _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, onClick: () => { var _a; return (_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
15055
|
+
}, _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, onClick: () => { var _a; return (_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '2d1e99d9539fb6a239f03694558f7992dea8d97a', 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: 'a2b5f39e922a441f6001581a7ea256f1b205dcae', slot: "input" }, hAsync("form", { key: '64f29549c34e181faf036a196cee91df451d5db2', onSubmit: (event) => {
|
|
14986
15056
|
event.preventDefault();
|
|
14987
15057
|
propagateSubmitEventToForm({
|
|
14988
15058
|
form: this.host,
|
|
14989
15059
|
ref: this.selectRef,
|
|
14990
15060
|
});
|
|
14991
|
-
} }, hAsync("input", { key: '
|
|
15061
|
+
} }, hAsync("input", { key: '14d371502ddda3858350b5f3bd349991f3d6dde2', type: "submit", hidden: true }), hAsync("select", Object.assign({ key: '229b5f7667f560f57dde321158faab9ea5499261', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, multiple: this.state._multiple, name: this.state._name, required: this.state._required, size: this.state._rows }, this.controller.onFacade, { onInput: this.onInput.bind(this), onChange: this.onChange.bind(this), onFocus: (event) => {
|
|
14992
15062
|
this.controller.onFacade.onFocus(event);
|
|
14993
15063
|
this.inputHasFocus = true;
|
|
14994
15064
|
}, onBlur: (event) => {
|
|
@@ -15262,8 +15332,13 @@ class KolSingleSelect {
|
|
|
15262
15332
|
return this._value;
|
|
15263
15333
|
}
|
|
15264
15334
|
async kolFocus() {
|
|
15265
|
-
|
|
15266
|
-
|
|
15335
|
+
return new Promise((resolve) => {
|
|
15336
|
+
requestAnimationFrame(() => {
|
|
15337
|
+
var _a;
|
|
15338
|
+
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15339
|
+
resolve();
|
|
15340
|
+
});
|
|
15341
|
+
});
|
|
15267
15342
|
}
|
|
15268
15343
|
onBlur() {
|
|
15269
15344
|
var _a, _b, _c;
|
|
@@ -15409,17 +15484,17 @@ class KolSingleSelect {
|
|
|
15409
15484
|
var _a;
|
|
15410
15485
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
15411
15486
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
15412
|
-
return (hAsync(Host, { key: '
|
|
15487
|
+
return (hAsync(Host, { key: '1433f20a2defed480cdfb50a04a1dd13360f86b3', class: "kol-single-select" }, hAsync("div", { key: '18159815f75153c0959f7a65872f6c34d81083d2', class: `single-select ${this.state._disabled === true ? 'disabled' : ''} ` }, hAsync(KolInputTag, { key: '0ecb14e3f2e3df4d90530a8599d08f4e16a6bbe0', _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: '434babd783c914627c145e8659f0efca36034207', 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: 'cded78e21aa33713865bf7e6a9f0c109258beb44', slot: "input" }, hAsync("div", { key: '323464b7c5c34f86561464efe7b8f2042020bd16', class: "single-select__group" }, hAsync("input", Object.assign({ key: 'd31aad3b8a7c79de4d2766a54f7a80b76208de85', 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) => {
|
|
15413
15488
|
this.controller.onFacade.onFocus(event);
|
|
15414
15489
|
this.inputHasFocus = true;
|
|
15415
15490
|
}, onBlur: (event) => {
|
|
15416
15491
|
this.controller.onFacade.onBlur(event);
|
|
15417
15492
|
this.inputHasFocus = false;
|
|
15418
|
-
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: '
|
|
15493
|
+
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: 'ee1817f5169b0c40bd6324c633e147072df33a6e', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
|
|
15419
15494
|
var _a;
|
|
15420
15495
|
this.clearSelection();
|
|
15421
15496
|
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15422
|
-
}, class: "single-select__delete" })), hAsync("button", { key: '
|
|
15497
|
+
}, class: "single-select__delete" })), hAsync("button", { key: '4747536e16e8e8eadd11b708fe3d1697fde076b1', tabindex: "-1", class: "single-select__button", onClick: this.toggleListbox.bind(this), disabled: this.state._disabled }, hAsync(KolIconTag, { key: '39fcfc3b9d0b88ae1374711e72419f0af9f465f5', _icons: "codicon codicon-triangle-down", _label: translate('kol-dropdown') }))), this._isOpen && !(this.state._disabled === true) && (hAsync("ul", { key: '2292d17fe22bd94fc768f189a9a20d4ec70f26f2', 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) => {
|
|
15423
15498
|
var _a;
|
|
15424
15499
|
return (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
15425
15500
|
if (el)
|
|
@@ -20925,7 +21000,14 @@ function linkify (state, silent) {
|
|
|
20925
21000
|
if (url.length <= proto.length) return false
|
|
20926
21001
|
|
|
20927
21002
|
// disallow '*' at the end of the link (conflicts with emphasis)
|
|
20928
|
-
|
|
21003
|
+
// do manual backsearch to avoid perf issues with regex /\*+$/ on "****...****a".
|
|
21004
|
+
let urlEnd = url.length;
|
|
21005
|
+
while (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 0x2A/* * */) {
|
|
21006
|
+
urlEnd--;
|
|
21007
|
+
}
|
|
21008
|
+
if (urlEnd !== url.length) {
|
|
21009
|
+
url = url.slice(0, urlEnd);
|
|
21010
|
+
}
|
|
20929
21011
|
|
|
20930
21012
|
const fullUrl = state.md.normalizeLink(url);
|
|
20931
21013
|
if (!state.md.validateLink(fullUrl)) return false
|
|
@@ -25908,13 +25990,18 @@ class KolTextarea {
|
|
|
25908
25990
|
await this.kolFocus();
|
|
25909
25991
|
}
|
|
25910
25992
|
async kolFocus() {
|
|
25911
|
-
|
|
25912
|
-
|
|
25993
|
+
return new Promise((resolve) => {
|
|
25994
|
+
requestAnimationFrame(() => {
|
|
25995
|
+
var _a;
|
|
25996
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
25997
|
+
resolve();
|
|
25998
|
+
});
|
|
25999
|
+
});
|
|
25913
26000
|
}
|
|
25914
26001
|
render() {
|
|
25915
26002
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
25916
26003
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
25917
|
-
return (hAsync(Host, { key: '
|
|
26004
|
+
return (hAsync(Host, { key: '70acb2ec2b7dd8d28320e65090c3e15452448fa1', class: { 'kol-textarea': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: '176ce932be5d9a89a3fe5da487687181d940e087', class: { textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }, _accessKey: this.state._accessKey, _alert: this.showAsAlert(), _currentLength: this.state._currentLength, _currentLengthDebounced: this.state._currentLengthDebounced, _disabled: this.state._disabled, _hideError: this.state._hideError, _hasCounter: this.state._hasCounter, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _shortKey: this.state._shortKey, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '1b2f9d092a70701807304d95b2e929931e34efec', 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: '3dcc46aa1f82a7a2d609f0e248934147b27b2377', slot: "input" }, hAsync("textarea", Object.assign({ key: '46331241584d26d0b8e8a87d66834674c59a1659', ref: this.catchRef, title: "", 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, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, maxlength: this.state._maxLength, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, rows: this.state._rows, placeholder: this.state._placeholder, spellcheck: this.state._spellCheck }, this.controller.onFacade, { onInput: this.onInput, onFocus: (event) => {
|
|
25918
26005
|
this.controller.onFacade.onFocus(event);
|
|
25919
26006
|
this.inputHasFocus = true;
|
|
25920
26007
|
}, onBlur: (event) => {
|