@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.mjs
CHANGED
|
@@ -2656,7 +2656,7 @@ var loglevel = {exports: {}};
|
|
|
2656
2656
|
|
|
2657
2657
|
var h = loglevel.exports;
|
|
2658
2658
|
|
|
2659
|
-
const
|
|
2659
|
+
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.
|
|
2660
2660
|
|
|
2661
2661
|
import { register } from 'adopted-style-sheets';
|
|
2662
2662
|
import { defineCustomElements } from '...';
|
|
@@ -2666,7 +2666,7 @@ const I=(t,e)=>s=>s(t,e),P$1=(t,e)=>s=>s(t,e,{append:!1}),$=()=>{const t=typeof
|
|
|
2666
2666
|
.then(() => {
|
|
2667
2667
|
// run your app or website
|
|
2668
2668
|
})
|
|
2669
|
-
.catch(console.warn);`));let
|
|
2669
|
+
.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);}}
|
|
2670
2670
|
|
|
2671
2671
|
var KeyEnum;
|
|
2672
2672
|
(function (KeyEnum) {
|
|
@@ -3798,9 +3798,9 @@ const koliBriQuerySelector = (selector, node) => querySelector(selector, node ||
|
|
|
3798
3798
|
const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, node || getDocument());
|
|
3799
3799
|
class KoliBriDevHelper {
|
|
3800
3800
|
}
|
|
3801
|
-
KoliBriDevHelper.getCssStyle =
|
|
3802
|
-
KoliBriDevHelper.patchTheme =
|
|
3803
|
-
KoliBriDevHelper.patchThemeTag =
|
|
3801
|
+
KoliBriDevHelper.getCssStyle = d;
|
|
3802
|
+
KoliBriDevHelper.patchTheme = K;
|
|
3803
|
+
KoliBriDevHelper.patchThemeTag = x;
|
|
3804
3804
|
KoliBriDevHelper.querySelector = koliBriQuerySelector;
|
|
3805
3805
|
KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
|
|
3806
3806
|
KoliBriDevHelper.stringifyJson = stringifyJson;
|
|
@@ -4497,7 +4497,7 @@ var KoliBriProgressVariantEnum;
|
|
|
4497
4497
|
KoliBriProgressVariantEnum["cycle"] = "cycle";
|
|
4498
4498
|
})(KoliBriProgressVariantEnum || (KoliBriProgressVariantEnum = {}));
|
|
4499
4499
|
|
|
4500
|
-
new
|
|
4500
|
+
new fe('kol', KeyEnum, TagEnum);
|
|
4501
4501
|
|
|
4502
4502
|
let nonce = () => Math.floor(Math.random() * 16777215).toString(16);
|
|
4503
4503
|
if (processEnv === 'test') {
|
|
@@ -5857,20 +5857,25 @@ class AssociatedInputController {
|
|
|
5857
5857
|
|
|
5858
5858
|
class KolButtonWc {
|
|
5859
5859
|
async kolFocus() {
|
|
5860
|
-
|
|
5861
|
-
|
|
5860
|
+
return new Promise((resolve) => {
|
|
5861
|
+
requestAnimationFrame(() => {
|
|
5862
|
+
var _a;
|
|
5863
|
+
(_a = this.buttonRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5864
|
+
resolve();
|
|
5865
|
+
});
|
|
5866
|
+
});
|
|
5862
5867
|
}
|
|
5863
5868
|
render() {
|
|
5864
5869
|
var _a;
|
|
5865
5870
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
5866
5871
|
const ariaDescription = (_a = this.state._ariaDescription) === null || _a === void 0 ? void 0 : _a.trim();
|
|
5867
|
-
return (hAsync(Host, { key: '
|
|
5872
|
+
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: {
|
|
5868
5873
|
button: true,
|
|
5869
5874
|
disabled: this.state._disabled === true,
|
|
5870
5875
|
[this.state._variant]: this.state._variant !== 'custom',
|
|
5871
5876
|
[this.state._customClass]: this.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,
|
|
5872
5877
|
'hide-label': this.state._hideLabel === true,
|
|
5873
|
-
}, 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: '
|
|
5878
|
+
}, 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 : '' })));
|
|
5874
5879
|
}
|
|
5875
5880
|
constructor(hostRef) {
|
|
5876
5881
|
registerInstance(this, hostRef);
|
|
@@ -6449,8 +6454,13 @@ class KolCombobox {
|
|
|
6449
6454
|
return this.state._value;
|
|
6450
6455
|
}
|
|
6451
6456
|
async kolFocus() {
|
|
6452
|
-
|
|
6453
|
-
|
|
6457
|
+
return new Promise((resolve) => {
|
|
6458
|
+
requestAnimationFrame(() => {
|
|
6459
|
+
var _a;
|
|
6460
|
+
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
6461
|
+
resolve();
|
|
6462
|
+
});
|
|
6463
|
+
});
|
|
6454
6464
|
}
|
|
6455
6465
|
selectOption(option) {
|
|
6456
6466
|
var _a;
|
|
@@ -6520,13 +6530,13 @@ class KolCombobox {
|
|
|
6520
6530
|
render() {
|
|
6521
6531
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
6522
6532
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
6523
|
-
return (hAsync(Host, { key: '
|
|
6533
|
+
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) => {
|
|
6524
6534
|
this.controller.onFacade.onFocus(event);
|
|
6525
6535
|
this.inputHasFocus = true;
|
|
6526
6536
|
}, onBlur: (event) => {
|
|
6527
6537
|
this.controller.onFacade.onBlur(event);
|
|
6528
6538
|
this.inputHasFocus = false;
|
|
6529
|
-
}, onChange: this.onChange.bind(this), onInput: this.onInput.bind(this), placeholder: this.state._placeholder })), hAsync("button", { key: '
|
|
6539
|
+
}, 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) &&
|
|
6530
6540
|
this._filteredSuggestions.length > 0 &&
|
|
6531
6541
|
this._filteredSuggestions.map((option, index) => (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
6532
6542
|
if (el)
|
|
@@ -7630,19 +7640,24 @@ class KolInputCheckbox {
|
|
|
7630
7640
|
await this.kolFocus();
|
|
7631
7641
|
}
|
|
7632
7642
|
async kolFocus() {
|
|
7633
|
-
|
|
7634
|
-
|
|
7643
|
+
return new Promise((resolve) => {
|
|
7644
|
+
requestAnimationFrame(() => {
|
|
7645
|
+
var _a;
|
|
7646
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7647
|
+
resolve();
|
|
7648
|
+
});
|
|
7649
|
+
});
|
|
7635
7650
|
}
|
|
7636
7651
|
render() {
|
|
7637
7652
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
7638
7653
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
7639
|
-
return (hAsync(Host, { key: '
|
|
7654
|
+
return (hAsync(Host, { key: '4cadc5a62e5a1ea876f3a1b4aee4dfd25d4a8f64', class: "kol-input-checkbox" }, hAsync(KolInputTag, { key: '0066a35b63781caf20487e561dadeec425023d5e', class: {
|
|
7640
7655
|
checkbox: true,
|
|
7641
7656
|
[this.state._variant]: true,
|
|
7642
7657
|
'hide-label': !!this.state._hideLabel,
|
|
7643
7658
|
checked: this.state._checked,
|
|
7644
7659
|
indeterminate: this.state._indeterminate,
|
|
7645
|
-
}, "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: '
|
|
7660
|
+
}, "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) => {
|
|
7646
7661
|
this.controller.onFacade.onFocus(event);
|
|
7647
7662
|
this.inputHasFocus = true;
|
|
7648
7663
|
}, onBlur: (event) => {
|
|
@@ -7908,17 +7923,22 @@ class KolInputColor {
|
|
|
7908
7923
|
await this.kolFocus();
|
|
7909
7924
|
}
|
|
7910
7925
|
async kolFocus() {
|
|
7911
|
-
|
|
7912
|
-
|
|
7926
|
+
return new Promise((resolve) => {
|
|
7927
|
+
requestAnimationFrame(() => {
|
|
7928
|
+
var _a;
|
|
7929
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7930
|
+
resolve();
|
|
7931
|
+
});
|
|
7932
|
+
});
|
|
7913
7933
|
}
|
|
7914
7934
|
render() {
|
|
7915
7935
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
7916
7936
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
7917
7937
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
7918
|
-
return (hAsync(Host, { key: '
|
|
7938
|
+
return (hAsync(Host, { key: '14802386cf0adc1cc1817c249c55e2e4b6f3c4d8', class: "kol-input-color" }, hAsync(KolInputTag, { key: 'b4560179abffdb5ee068cbd55b4772d4f2fb358a', class: {
|
|
7919
7939
|
color: true,
|
|
7920
7940
|
'hide-label': !!this.state._hideLabel,
|
|
7921
|
-
}, _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: '
|
|
7941
|
+
}, _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) => {
|
|
7922
7942
|
this.controller.onFacade.onFocus(event);
|
|
7923
7943
|
this.inputHasFocus = true;
|
|
7924
7944
|
}, onBlur: (event) => {
|
|
@@ -8263,8 +8283,13 @@ class KolInputDate {
|
|
|
8263
8283
|
await this.kolFocus();
|
|
8264
8284
|
}
|
|
8265
8285
|
async kolFocus() {
|
|
8266
|
-
|
|
8267
|
-
|
|
8286
|
+
return new Promise((resolve) => {
|
|
8287
|
+
requestAnimationFrame(() => {
|
|
8288
|
+
var _a;
|
|
8289
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
8290
|
+
resolve();
|
|
8291
|
+
});
|
|
8292
|
+
});
|
|
8268
8293
|
}
|
|
8269
8294
|
async reset() {
|
|
8270
8295
|
this.state = Object.assign(Object.assign({}, this.state), { _value: null });
|
|
@@ -8291,10 +8316,10 @@ class KolInputDate {
|
|
|
8291
8316
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
8292
8317
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
8293
8318
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
8294
|
-
return (hAsync(Host, { key: '
|
|
8319
|
+
return (hAsync(Host, { key: '7e608a0da873bcf10d9b86be7fad4ad28fb2e219', class: { 'kol-input-date': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: 'ab411d3ae02fe92c8791e84db7e4b9eef1a6b6c8', class: {
|
|
8295
8320
|
[this.state._type]: true,
|
|
8296
8321
|
'hide-label': !!this.state._hideLabel,
|
|
8297
|
-
}, _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: '
|
|
8322
|
+
}, _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) => {
|
|
8298
8323
|
this.controller.onFacade.onBlur(event);
|
|
8299
8324
|
this.inputHasFocus = false;
|
|
8300
8325
|
}, onFocus: (event) => {
|
|
@@ -8698,17 +8723,22 @@ class KolInputEmail {
|
|
|
8698
8723
|
await this.kolFocus();
|
|
8699
8724
|
}
|
|
8700
8725
|
async kolFocus() {
|
|
8701
|
-
|
|
8702
|
-
|
|
8726
|
+
return new Promise((resolve) => {
|
|
8727
|
+
requestAnimationFrame(() => {
|
|
8728
|
+
var _a;
|
|
8729
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
8730
|
+
resolve();
|
|
8731
|
+
});
|
|
8732
|
+
});
|
|
8703
8733
|
}
|
|
8704
8734
|
render() {
|
|
8705
8735
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
8706
8736
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
8707
8737
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
8708
|
-
return (hAsync(Host, { key: '
|
|
8738
|
+
return (hAsync(Host, { key: '1697bbe3f8d64a3cadb6b483ac94d4d0d6343539', class: {
|
|
8709
8739
|
'kol-input-email': true,
|
|
8710
8740
|
'has-value': this.state._hasValue,
|
|
8711
|
-
} }, hAsync(KolInputTag, { key: '
|
|
8741
|
+
} }, 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) => {
|
|
8712
8742
|
this.controller.onFacade.onFocus(event);
|
|
8713
8743
|
this.inputHasFocus = true;
|
|
8714
8744
|
}, onBlur: (event) => {
|
|
@@ -8991,16 +9021,21 @@ class KolInputFile {
|
|
|
8991
9021
|
await this.kolFocus();
|
|
8992
9022
|
}
|
|
8993
9023
|
async kolFocus() {
|
|
8994
|
-
|
|
8995
|
-
|
|
9024
|
+
return new Promise((resolve) => {
|
|
9025
|
+
requestAnimationFrame(() => {
|
|
9026
|
+
var _a;
|
|
9027
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9028
|
+
resolve();
|
|
9029
|
+
});
|
|
9030
|
+
});
|
|
8996
9031
|
}
|
|
8997
9032
|
render() {
|
|
8998
9033
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
8999
9034
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9000
|
-
return (hAsync(Host, { key: '
|
|
9035
|
+
return (hAsync(Host, { key: '24b411d3c604d89b04631615d10ecb3cb6a03ffc', class: "kol-input-file" }, hAsync(KolInputTag, { key: 'ccf43e4a304839702ae0d76d33780377ff384cc7', class: {
|
|
9001
9036
|
file: true,
|
|
9002
9037
|
'hide-label': !!this.state._hideLabel,
|
|
9003
|
-
}, _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: '
|
|
9038
|
+
}, _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) => {
|
|
9004
9039
|
this.controller.onFacade.onFocus(event);
|
|
9005
9040
|
this.inputHasFocus = true;
|
|
9006
9041
|
}, onBlur: (event) => {
|
|
@@ -9295,20 +9330,25 @@ class KolInputNumber {
|
|
|
9295
9330
|
await this.kolFocus();
|
|
9296
9331
|
}
|
|
9297
9332
|
async kolFocus() {
|
|
9298
|
-
|
|
9299
|
-
|
|
9333
|
+
return new Promise((resolve) => {
|
|
9334
|
+
requestAnimationFrame(() => {
|
|
9335
|
+
var _a;
|
|
9336
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9337
|
+
resolve();
|
|
9338
|
+
});
|
|
9339
|
+
});
|
|
9300
9340
|
}
|
|
9301
9341
|
render() {
|
|
9302
9342
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
9303
9343
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
9304
9344
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9305
|
-
return (hAsync(Host, { key: '
|
|
9345
|
+
return (hAsync(Host, { key: 'a01b3ae7dbe3a123d460766bf9ce8c919cffb616', class: {
|
|
9306
9346
|
'kol-input-number': true,
|
|
9307
9347
|
'has-value': this.state._hasValue,
|
|
9308
|
-
} }, hAsync(KolInputTag, { key: '
|
|
9348
|
+
} }, hAsync(KolInputTag, { key: 'aa1b4422efcb0b7c8a3338db6e97421eee91a8f3', class: {
|
|
9309
9349
|
number: true,
|
|
9310
9350
|
'hide-label': !!this.state._hideLabel,
|
|
9311
|
-
}, _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: '
|
|
9351
|
+
}, _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) => {
|
|
9312
9352
|
this.controller.onFacade.onFocus(event);
|
|
9313
9353
|
this.inputHasFocus = true;
|
|
9314
9354
|
}, onBlur: (event) => {
|
|
@@ -9551,19 +9591,24 @@ class KolInputPassword {
|
|
|
9551
9591
|
await this.kolFocus();
|
|
9552
9592
|
}
|
|
9553
9593
|
async kolFocus() {
|
|
9554
|
-
|
|
9555
|
-
|
|
9594
|
+
return new Promise((resolve) => {
|
|
9595
|
+
requestAnimationFrame(() => {
|
|
9596
|
+
var _a;
|
|
9597
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9598
|
+
resolve();
|
|
9599
|
+
});
|
|
9600
|
+
});
|
|
9556
9601
|
}
|
|
9557
9602
|
render() {
|
|
9558
9603
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
9559
9604
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9560
|
-
return (hAsync(Host, { key: '
|
|
9605
|
+
return (hAsync(Host, { key: '053e1f02a90d4f37adb592296fcc55db16bbc325', class: {
|
|
9561
9606
|
'kol-input-password': true,
|
|
9562
9607
|
'has-value': this.state._hasValue,
|
|
9563
|
-
} }, hAsync(KolInputTag, { key: '
|
|
9608
|
+
} }, hAsync(KolInputTag, { key: '9e9036e569c8073886d2329c21056bb4df3eeb36', class: {
|
|
9564
9609
|
'hide-label': !!this.state._hideLabel,
|
|
9565
9610
|
password: true,
|
|
9566
|
-
}, _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: '
|
|
9611
|
+
}, _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) => {
|
|
9567
9612
|
this.controller.onFacade.onFocus(event);
|
|
9568
9613
|
this.inputHasFocus = true;
|
|
9569
9614
|
}, onBlur: (event) => {
|
|
@@ -9836,20 +9881,25 @@ class KolInputRadio {
|
|
|
9836
9881
|
await this.kolFocus();
|
|
9837
9882
|
}
|
|
9838
9883
|
async kolFocus() {
|
|
9839
|
-
|
|
9840
|
-
|
|
9884
|
+
return new Promise((resolve) => {
|
|
9885
|
+
requestAnimationFrame(() => {
|
|
9886
|
+
var _a;
|
|
9887
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9888
|
+
resolve();
|
|
9889
|
+
});
|
|
9890
|
+
});
|
|
9841
9891
|
}
|
|
9842
9892
|
render() {
|
|
9843
9893
|
const { ariaDescribedBy, hasError, hasHint } = getRenderStates(this.state);
|
|
9844
9894
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
9845
|
-
return (hAsync(Host, { key: '
|
|
9895
|
+
return (hAsync(Host, { key: 'aacd43f73967156ee1ffd5452d05d554e9011d53', class: "kol-input-radio" }, hAsync("fieldset", { key: '55b6be289684f3d28474fb465d89d7756b577c97', "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, class: {
|
|
9846
9896
|
fieldset: true,
|
|
9847
9897
|
disabled: this.state._disabled === true,
|
|
9848
9898
|
error: hasError === true,
|
|
9849
9899
|
required: this.state._required === true,
|
|
9850
9900
|
'hidden-error': this._hideError === true,
|
|
9851
9901
|
[this.state._orientation]: true,
|
|
9852
|
-
} }, hAsync("legend", { key: '
|
|
9902
|
+
} }, 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) => {
|
|
9853
9903
|
const customId = `${this.state._id}-${index}`;
|
|
9854
9904
|
const slotName = `radio-${index}`;
|
|
9855
9905
|
const selected = this.state._value === option.value;
|
|
@@ -9868,7 +9918,7 @@ class KolInputRadio {
|
|
|
9868
9918
|
padding: this.state._hideLabel ? '0' : undefined,
|
|
9869
9919
|
visibility: this.state._hideLabel ? 'hidden' : undefined,
|
|
9870
9920
|
} }, hAsync("span", null, hAsync("span", { class: "radio-label-span-inner" }, option.label))))));
|
|
9871
|
-
}), hasError && hAsync(FormFieldMsgFc, { key: '
|
|
9921
|
+
}), 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)))));
|
|
9872
9922
|
}
|
|
9873
9923
|
constructor(hostRef) {
|
|
9874
9924
|
registerInstance(this, hostRef);
|
|
@@ -10111,8 +10161,13 @@ class KolInputRange {
|
|
|
10111
10161
|
await this.kolFocus();
|
|
10112
10162
|
}
|
|
10113
10163
|
async kolFocus() {
|
|
10114
|
-
|
|
10115
|
-
|
|
10164
|
+
return new Promise((resolve) => {
|
|
10165
|
+
requestAnimationFrame(() => {
|
|
10166
|
+
var _a;
|
|
10167
|
+
(_a = this.refInputNumber) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10168
|
+
resolve();
|
|
10169
|
+
});
|
|
10170
|
+
});
|
|
10116
10171
|
}
|
|
10117
10172
|
getSanitizedFloatValue(value) {
|
|
10118
10173
|
const floatValue = parseFloat(value);
|
|
@@ -10141,25 +10196,25 @@ class KolInputRange {
|
|
|
10141
10196
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
10142
10197
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
10143
10198
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
10144
|
-
return (hAsync(Host, { key: '
|
|
10199
|
+
return (hAsync(Host, { key: 'b924053d094a0d8049c0988816401cc5107a2f40', class: "kol-input-range" }, hAsync(KolInputTag, { key: '198352572b8d5647ef7df99c447222fe732d5fdd', class: {
|
|
10145
10200
|
range: true,
|
|
10146
10201
|
'hide-label': !!this.state._hideLabel,
|
|
10147
|
-
}, _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: '
|
|
10202
|
+
}, _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: {
|
|
10148
10203
|
'--kolibri-input-range--input-number--width': `calc(${String((_a = this.state._max) !== null && _a !== void 0 ? _a : 100).length}ch + 2em)`,
|
|
10149
|
-
} }, hAsync("input", Object.assign({ key: '
|
|
10204
|
+
} }, 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) => {
|
|
10150
10205
|
this.controller.onFacade.onFocus(event);
|
|
10151
10206
|
this.inputHasFocus = true;
|
|
10152
10207
|
}, onBlur: (event) => {
|
|
10153
10208
|
this.controller.onFacade.onBlur(event);
|
|
10154
10209
|
this.inputHasFocus = false;
|
|
10155
|
-
} })), hAsync("input", Object.assign({ key: '
|
|
10210
|
+
} })), 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) => {
|
|
10156
10211
|
this.controller.onFacade.onFocus(event);
|
|
10157
10212
|
this.inputHasFocus = true;
|
|
10158
10213
|
}, onBlur: (event) => {
|
|
10159
10214
|
this.controller.onFacade.onBlur(event);
|
|
10160
10215
|
this.inputHasFocus = false;
|
|
10161
10216
|
} }))), hasSuggestions && [
|
|
10162
|
-
hAsync("datalist", { key: '
|
|
10217
|
+
hAsync("datalist", { key: 'a0cba3e8afc7e3901b3da6207fc918415677c90f', id: `${this.state._id}-list` }, this.state._suggestions.map((option) => (hAsync("option", { value: JSON.stringify(option) })))),
|
|
10163
10218
|
]))));
|
|
10164
10219
|
}
|
|
10165
10220
|
constructor(hostRef) {
|
|
@@ -10390,20 +10445,25 @@ class KolInputText {
|
|
|
10390
10445
|
await this.kolFocus();
|
|
10391
10446
|
}
|
|
10392
10447
|
async kolFocus() {
|
|
10393
|
-
|
|
10394
|
-
|
|
10448
|
+
return new Promise((resolve) => {
|
|
10449
|
+
requestAnimationFrame(() => {
|
|
10450
|
+
var _a;
|
|
10451
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10452
|
+
resolve();
|
|
10453
|
+
});
|
|
10454
|
+
});
|
|
10395
10455
|
}
|
|
10396
10456
|
render() {
|
|
10397
10457
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
10398
10458
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
10399
10459
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
10400
|
-
return (hAsync(Host, { key: '
|
|
10460
|
+
return (hAsync(Host, { key: '1955f330e0ca93d6bae951877f44e26f1d4ff5c5', class: {
|
|
10401
10461
|
'has-value': this.state._hasValue,
|
|
10402
10462
|
'kol-input-text': true,
|
|
10403
|
-
} }, hAsync(KolInputTag, { key: '
|
|
10463
|
+
} }, hAsync(KolInputTag, { key: '80808142f2a05e3cb8cf8a9d305c0e2e19eab272', class: {
|
|
10404
10464
|
[this.state._type]: true,
|
|
10405
10465
|
'hide-label': !!this.state._hideLabel,
|
|
10406
|
-
}, _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: '
|
|
10466
|
+
}, _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) => {
|
|
10407
10467
|
this.controller.onFacade.onFocus(event);
|
|
10408
10468
|
this.inputHasFocus = true;
|
|
10409
10469
|
}, onBlur: (event) => {
|
|
@@ -11155,15 +11215,20 @@ class KolLinkWc {
|
|
|
11155
11215
|
};
|
|
11156
11216
|
}
|
|
11157
11217
|
async kolFocus() {
|
|
11158
|
-
|
|
11159
|
-
|
|
11218
|
+
return new Promise((resolve) => {
|
|
11219
|
+
requestAnimationFrame(() => {
|
|
11220
|
+
var _a;
|
|
11221
|
+
(_a = this.anchorRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11222
|
+
resolve();
|
|
11223
|
+
});
|
|
11224
|
+
});
|
|
11160
11225
|
}
|
|
11161
11226
|
render() {
|
|
11162
11227
|
var _a;
|
|
11163
11228
|
const { isExternal, tagAttrs } = this.getRenderValues();
|
|
11164
11229
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
11165
11230
|
const ariaDescription = (_a = this.state._ariaDescription) === null || _a === void 0 ? void 0 : _a.trim();
|
|
11166
|
-
return (hAsync(Host, { key: '
|
|
11231
|
+
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'
|
|
11167
11232
|
? `${this.state._label}${isExternal ? ` (${translate('kol-open-link-in-tab')})` : ''}`
|
|
11168
11233
|
: undefined, class: {
|
|
11169
11234
|
disabled: this.state._disabled === true,
|
|
@@ -11171,7 +11236,7 @@ class KolLinkWc {
|
|
|
11171
11236
|
'hide-label': this.state._hideLabel === true,
|
|
11172
11237
|
[this.state._variant]: this.state._variant !== 'custom',
|
|
11173
11238
|
[this.state._customClass]: this.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,
|
|
11174
|
-
} }, this.state._on, { onClick: this.onClick, onKeyPress: this.onClick, role: this.state._role, tabIndex: this.state._disabled ? -1 : this.state._tabIndex }), hAsync(KolSpanWcTag, { key: '
|
|
11239
|
+
} }, 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 })));
|
|
11175
11240
|
}
|
|
11176
11241
|
validateAccessKey(value) {
|
|
11177
11242
|
validateAccessKey(this, value);
|
|
@@ -14957,8 +15022,13 @@ class KolSelectWc {
|
|
|
14957
15022
|
await this.kolFocus();
|
|
14958
15023
|
}
|
|
14959
15024
|
async kolFocus() {
|
|
14960
|
-
|
|
14961
|
-
|
|
15025
|
+
return new Promise((resolve) => {
|
|
15026
|
+
requestAnimationFrame(() => {
|
|
15027
|
+
var _a;
|
|
15028
|
+
(_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15029
|
+
resolve();
|
|
15030
|
+
});
|
|
15031
|
+
});
|
|
14962
15032
|
}
|
|
14963
15033
|
renderOptgroup(optgroup, preKey) {
|
|
14964
15034
|
var _a;
|
|
@@ -14975,16 +15045,16 @@ class KolSelectWc {
|
|
|
14975
15045
|
render() {
|
|
14976
15046
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
14977
15047
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
14978
|
-
return (hAsync(Host, { key: '
|
|
15048
|
+
return (hAsync(Host, { key: '09e79a47288a7aa9e25f6ffc1dd9f94c4c356771', class: { 'kol-select-wc': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: 'c120d6f9c4450323d5349df62954450013e1196d', class: {
|
|
14979
15049
|
'hide-label': !!this.state._hideLabel,
|
|
14980
15050
|
select: true,
|
|
14981
|
-
}, _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: '
|
|
15051
|
+
}, _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) => {
|
|
14982
15052
|
event.preventDefault();
|
|
14983
15053
|
propagateSubmitEventToForm({
|
|
14984
15054
|
form: this.host,
|
|
14985
15055
|
ref: this.selectRef,
|
|
14986
15056
|
});
|
|
14987
|
-
} }, hAsync("input", { key: '
|
|
15057
|
+
} }, 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) => {
|
|
14988
15058
|
this.controller.onFacade.onFocus(event);
|
|
14989
15059
|
this.inputHasFocus = true;
|
|
14990
15060
|
}, onBlur: (event) => {
|
|
@@ -15258,8 +15328,13 @@ class KolSingleSelect {
|
|
|
15258
15328
|
return this._value;
|
|
15259
15329
|
}
|
|
15260
15330
|
async kolFocus() {
|
|
15261
|
-
|
|
15262
|
-
|
|
15331
|
+
return new Promise((resolve) => {
|
|
15332
|
+
requestAnimationFrame(() => {
|
|
15333
|
+
var _a;
|
|
15334
|
+
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15335
|
+
resolve();
|
|
15336
|
+
});
|
|
15337
|
+
});
|
|
15263
15338
|
}
|
|
15264
15339
|
onBlur() {
|
|
15265
15340
|
var _a, _b, _c;
|
|
@@ -15405,17 +15480,17 @@ class KolSingleSelect {
|
|
|
15405
15480
|
var _a;
|
|
15406
15481
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
15407
15482
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
15408
|
-
return (hAsync(Host, { key: '
|
|
15483
|
+
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) => {
|
|
15409
15484
|
this.controller.onFacade.onFocus(event);
|
|
15410
15485
|
this.inputHasFocus = true;
|
|
15411
15486
|
}, onBlur: (event) => {
|
|
15412
15487
|
this.controller.onFacade.onBlur(event);
|
|
15413
15488
|
this.inputHasFocus = false;
|
|
15414
|
-
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: '
|
|
15489
|
+
}, placeholder: this.state._placeholder })), this._inputValue && !this.state._hideClearButton && (hAsync(KolIconTag, { key: 'ee1817f5169b0c40bd6324c633e147072df33a6e', _icons: "codicon codicon-close", _label: translate('kol-delete-selection'), onClick: () => {
|
|
15415
15490
|
var _a;
|
|
15416
15491
|
this.clearSelection();
|
|
15417
15492
|
(_a = this.refInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15418
|
-
}, class: "single-select__delete" })), hAsync("button", { key: '
|
|
15493
|
+
}, 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) => {
|
|
15419
15494
|
var _a;
|
|
15420
15495
|
return (hAsync("li", { id: `option-${index}`, key: `-${index}`, ref: (el) => {
|
|
15421
15496
|
if (el)
|
|
@@ -20921,7 +20996,14 @@ function linkify (state, silent) {
|
|
|
20921
20996
|
if (url.length <= proto.length) return false
|
|
20922
20997
|
|
|
20923
20998
|
// disallow '*' at the end of the link (conflicts with emphasis)
|
|
20924
|
-
|
|
20999
|
+
// do manual backsearch to avoid perf issues with regex /\*+$/ on "****...****a".
|
|
21000
|
+
let urlEnd = url.length;
|
|
21001
|
+
while (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 0x2A/* * */) {
|
|
21002
|
+
urlEnd--;
|
|
21003
|
+
}
|
|
21004
|
+
if (urlEnd !== url.length) {
|
|
21005
|
+
url = url.slice(0, urlEnd);
|
|
21006
|
+
}
|
|
20925
21007
|
|
|
20926
21008
|
const fullUrl = state.md.normalizeLink(url);
|
|
20927
21009
|
if (!state.md.validateLink(fullUrl)) return false
|
|
@@ -25904,13 +25986,18 @@ class KolTextarea {
|
|
|
25904
25986
|
await this.kolFocus();
|
|
25905
25987
|
}
|
|
25906
25988
|
async kolFocus() {
|
|
25907
|
-
|
|
25908
|
-
|
|
25989
|
+
return new Promise((resolve) => {
|
|
25990
|
+
requestAnimationFrame(() => {
|
|
25991
|
+
var _a;
|
|
25992
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
25993
|
+
resolve();
|
|
25994
|
+
});
|
|
25995
|
+
});
|
|
25909
25996
|
}
|
|
25910
25997
|
render() {
|
|
25911
25998
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
25912
25999
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
25913
|
-
return (hAsync(Host, { key: '
|
|
26000
|
+
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) => {
|
|
25914
26001
|
this.controller.onFacade.onFocus(event);
|
|
25915
26002
|
this.inputHasFocus = true;
|
|
25916
26003
|
}, onBlur: (event) => {
|