@trintel/zooy 1.0.1-beta.0
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/LICENSE +190 -0
- package/README.md +471 -0
- package/dist/chunks/16-30f5E9no.js +1 -0
- package/dist/chunks/16-41wFkj7S.js +1 -0
- package/dist/chunks/16-4Ffg4DOO.js +1 -0
- package/dist/chunks/16-8pr5mbIO.js +28 -0
- package/dist/chunks/16-B56B50XT.js +1 -0
- package/dist/chunks/16-BFJN6B6d.js +39 -0
- package/dist/chunks/16-BTonF5Je.js +29 -0
- package/dist/chunks/16-BiShwKPX.js +28 -0
- package/dist/chunks/16-BwDdccyH.js +33 -0
- package/dist/chunks/16-C7Xs-wKv.js +1 -0
- package/dist/chunks/16-CDRTWf-C.js +21 -0
- package/dist/chunks/16-CSWwhDUY.js +21 -0
- package/dist/chunks/16-ChlL35BX.js +62 -0
- package/dist/chunks/16-CpNRIuiB.js +1 -0
- package/dist/chunks/16-CqC9427V.js +21 -0
- package/dist/chunks/16-Cubm18Em.js +1 -0
- package/dist/chunks/16-D3Ol0pdg.js +21 -0
- package/dist/chunks/16-DH311Of_.js +1 -0
- package/dist/chunks/16-Dlq3qxDh.js +1 -0
- package/dist/chunks/16-Drl9-5Gn.js +21 -0
- package/dist/chunks/16-Dt4v0bcc.js +1 -0
- package/dist/chunks/16-DylBiJnm.js +1 -0
- package/dist/chunks/20-CZPIOG-A.js +84 -0
- package/dist/chunks/20-gmyNFvDv.js +1 -0
- package/dist/chunks/button-DdJepOoE.js +271 -0
- package/dist/chunks/button-skeleton-COf2kCDL.js +48 -0
- package/dist/chunks/button-skeleton-rf3WDPTZ.js +21 -0
- package/dist/chunks/button-zHEPxpXa.js +66 -0
- package/dist/chunks/carbon-element-CbfPUYRT.js +1 -0
- package/dist/chunks/carbon-element-DzDuXiyl.js +25 -0
- package/dist/chunks/checkbox-B5mHvx0J.js +200 -0
- package/dist/chunks/checkbox-BRPCg-DN.js +40 -0
- package/dist/chunks/class-map-BfNAkUL_.js +5 -0
- package/dist/chunks/class-map-DEHG4tmw.js +32 -0
- package/dist/chunks/collection-helpers-BwUB2CEz.js +8 -0
- package/dist/chunks/collection-helpers-CYLIiyii.js +1 -0
- package/dist/chunks/content-switcher-item-DeGjVRQY.js +350 -0
- package/dist/chunks/content-switcher-item-DucclV1b.js +27 -0
- package/dist/chunks/defs-DMmigODC.js +1077 -0
- package/dist/chunks/defs-DPD20sPK.js +1 -0
- package/dist/chunks/directive-Dp4ZTz-F.js +5 -0
- package/dist/chunks/directive-kLG6oqUu.js +27 -0
- package/dist/chunks/dropdown-item-BgLQ1VLo.js +69 -0
- package/dist/chunks/dropdown-item-DPdwOION.js +620 -0
- package/dist/chunks/focus-B9JYe97T.js +20 -0
- package/dist/chunks/focus-rQSNiwy7.js +1 -0
- package/dist/chunks/form-D6Tce4-W.js +1 -0
- package/dist/chunks/form-DpI-v6DA.js +20 -0
- package/dist/chunks/host-listener-CN245INl.js +37 -0
- package/dist/chunks/host-listener-DD3oGxvg.js +16 -0
- package/dist/chunks/host-listener-gxrTpxgv.js +1 -0
- package/dist/chunks/host-listener-rUcT_LUW.js +1 -0
- package/dist/chunks/icon-loader-Dk_AU26w.js +7 -0
- package/dist/chunks/icon-loader-o_JYDmJX.js +1 -0
- package/dist/chunks/icon-loader-utils-BBjK16O-.js +5 -0
- package/dist/chunks/icon-loader-utils-BEOGXn0q.js +117 -0
- package/dist/chunks/if-defined-BdZRLDJ6.js +5 -0
- package/dist/chunks/if-defined-C0yJsxi2.js +10 -0
- package/dist/chunks/if-non-empty-CEHK-hqx.js +1 -0
- package/dist/chunks/if-non-empty-DTGflHtA.js +5 -0
- package/dist/chunks/index-16wphaSo.js +4 -0
- package/dist/chunks/index-27oFQaOS.js +37 -0
- package/dist/chunks/index-45EApaFs.js +205 -0
- package/dist/chunks/index-5jmZyISW.js +1 -0
- package/dist/chunks/index-B1vQ44Hl.js +363 -0
- package/dist/chunks/index-B3CDjjXh.js +214 -0
- package/dist/chunks/index-B3mXrMt1.js +24 -0
- package/dist/chunks/index-B7mGUQhz.js +79 -0
- package/dist/chunks/index-BBNaYDog.js +22 -0
- package/dist/chunks/index-BBt9OmO5.js +12 -0
- package/dist/chunks/index-BIaF1Dfx.js +107 -0
- package/dist/chunks/index-BJAuRs3y.js +75 -0
- package/dist/chunks/index-BJKftWYn.js +89 -0
- package/dist/chunks/index-BLjNrhkN.js +4 -0
- package/dist/chunks/index-BOTu9u-3.js +86 -0
- package/dist/chunks/index-BPVpH8ll.js +160 -0
- package/dist/chunks/index-BRuvyoCz.js +15 -0
- package/dist/chunks/index-BSgHSOVT.js +65 -0
- package/dist/chunks/index-BSh7UYcP.js +9 -0
- package/dist/chunks/index-BUxB7aWd.js +96 -0
- package/dist/chunks/index-BXIxcS00.js +22 -0
- package/dist/chunks/index-BXczHDk-.js +187 -0
- package/dist/chunks/index-BaVyBv2V.js +25 -0
- package/dist/chunks/index-BgbqX0uv.js +234 -0
- package/dist/chunks/index-BjQlt8g2.js +451 -0
- package/dist/chunks/index-BoNLj7PW.js +44 -0
- package/dist/chunks/index-BwIoRMDI.js +24 -0
- package/dist/chunks/index-Bwix1iwB.js +38 -0
- package/dist/chunks/index-BxVW3p3I.js +258 -0
- package/dist/chunks/index-ByKyGGzb.js +3 -0
- package/dist/chunks/index-ByTSSU1x.js +1 -0
- package/dist/chunks/index-C8LyfVmf.js +428 -0
- package/dist/chunks/index-CBbsFlsv.js +290 -0
- package/dist/chunks/index-CByffhPq.js +762 -0
- package/dist/chunks/index-CIbRjtWm.js +32 -0
- package/dist/chunks/index-CIzeMGQv.js +81 -0
- package/dist/chunks/index-CLGxSjLW.js +62 -0
- package/dist/chunks/index-CMF5Cawn.js +70 -0
- package/dist/chunks/index-CO-A2KY9.js +562 -0
- package/dist/chunks/index-CONgwvp0.js +12 -0
- package/dist/chunks/index-CT43RMOu.js +20 -0
- package/dist/chunks/index-CUgiXqyk.js +4 -0
- package/dist/chunks/index-C_K070Kn.js +284 -0
- package/dist/chunks/index-C_ttE2g9.js +16 -0
- package/dist/chunks/index-CcgnA1uu.js +29 -0
- package/dist/chunks/index-Cd7aoWrX.js +336 -0
- package/dist/chunks/index-Ce-pMzBC.js +19 -0
- package/dist/chunks/index-CgYZ66P_.js +187 -0
- package/dist/chunks/index-ChcHMeAS.js +35 -0
- package/dist/chunks/index-Cixdzvwd.js +682 -0
- package/dist/chunks/index-Clq0Fl19.js +15 -0
- package/dist/chunks/index-CtxTJnIm.js +58 -0
- package/dist/chunks/index-Cv1hWa_y.js +242 -0
- package/dist/chunks/index-CzTjJ8lP.js +432 -0
- package/dist/chunks/index-D0xRAPD5.js +75 -0
- package/dist/chunks/index-D25buhRm.js +79 -0
- package/dist/chunks/index-D4DqJG5_.js +16 -0
- package/dist/chunks/index-D5GGFPcS.js +251 -0
- package/dist/chunks/index-D5kiHJpX.js +413 -0
- package/dist/chunks/index-DEjRiv5B.js +1 -0
- package/dist/chunks/index-DFA4_spk.js +160 -0
- package/dist/chunks/index-DFZsXFsx.js +19 -0
- package/dist/chunks/index-DGauWNwV.js +156 -0
- package/dist/chunks/index-DIR0jr3f.js +127 -0
- package/dist/chunks/index-DNeagy5a.js +65 -0
- package/dist/chunks/index-DO0fmDR9.js +2 -0
- package/dist/chunks/index-DSitHBEh.js +36 -0
- package/dist/chunks/index-DW7ST0tB.js +1 -0
- package/dist/chunks/index-DWfFgEXE.js +110 -0
- package/dist/chunks/index-DX6WAtmo.js +874 -0
- package/dist/chunks/index-DaPfSuLu.js +393 -0
- package/dist/chunks/index-DbKlVm7y.js +74 -0
- package/dist/chunks/index-DdNZTQw1.js +48 -0
- package/dist/chunks/index-Dgi-m1K-.js +1 -0
- package/dist/chunks/index-Dh4uigJs.js +454 -0
- package/dist/chunks/index-DnYNK1mz.js +8 -0
- package/dist/chunks/index-DnierBep.js +510 -0
- package/dist/chunks/index-DnpSGM23.js +213 -0
- package/dist/chunks/index-DntY4deR.js +41 -0
- package/dist/chunks/index-Dp4A8k6C.js +103 -0
- package/dist/chunks/index-Dphpk5r2.js +1 -0
- package/dist/chunks/index-DrBrgF-v.js +49 -0
- package/dist/chunks/index-Dr_cqQ-_.js +77 -0
- package/dist/chunks/index-Dt-nBtrQ.js +26 -0
- package/dist/chunks/index-DurPWBYc.js +24 -0
- package/dist/chunks/index-DwTj7cFr.js +57 -0
- package/dist/chunks/index-DyZVAYLv.js +52 -0
- package/dist/chunks/index-Hh597Yu6.js +121 -0
- package/dist/chunks/index-LxkAuMAA.js +1 -0
- package/dist/chunks/index-OaQhvPR1.js +46 -0
- package/dist/chunks/index-UPr2EvBX.js +149 -0
- package/dist/chunks/index-WNXgzThF.js +2340 -0
- package/dist/chunks/index-WvrCPen2.js +367 -0
- package/dist/chunks/index-cTXIVcWI.js +45 -0
- package/dist/chunks/index-caLn8cu1.js +1603 -0
- package/dist/chunks/index-hLI0Bnyb.js +77 -0
- package/dist/chunks/index-jBse-XgU.js +35 -0
- package/dist/chunks/index-oTjafsfN.js +25 -0
- package/dist/chunks/index-qNmuI3RB.js +149 -0
- package/dist/chunks/index-qiqzy9MI.js +23 -0
- package/dist/chunks/index-rwBsdvh6.js +87 -0
- package/dist/chunks/index-siqJUhKa.js +1 -0
- package/dist/chunks/index-w-G9CFId.js +1 -0
- package/dist/chunks/index-x6SeA7x7.js +405 -0
- package/dist/chunks/loading-icon-DJQIjg97.js +23 -0
- package/dist/chunks/loading-icon-DhJR6LyV.js +16 -0
- package/dist/chunks/main-DUusfqrI.js +18 -0
- package/dist/chunks/main-Dp7wHHgP.js +2882 -0
- package/dist/chunks/on-BPhwbVf3.js +10 -0
- package/dist/chunks/on-XRofyGQh.js +1 -0
- package/dist/chunks/property-DCYiZTFF.js +5 -0
- package/dist/chunks/property-pT1z5CCa.js +36 -0
- package/dist/chunks/query-CbRg6ZGy.js +23 -0
- package/dist/chunks/query-Dh8joWcT.js +9 -0
- package/dist/chunks/radio-group-manager-DBAEmhDM.js +1 -0
- package/dist/chunks/radio-group-manager-Du5wSOS1.js +102 -0
- package/dist/chunks/register-BK21_Wkj.js +11035 -0
- package/dist/chunks/register-BMNs2hNG.js +2157 -0
- package/dist/chunks/register-Cc9zkA5F.js +1 -0
- package/dist/chunks/register-JwwMwdRf.js +1273 -0
- package/dist/chunks/search-C3raqgOD.js +30 -0
- package/dist/chunks/search-CIhxkVjj.js +239 -0
- package/dist/chunks/select-item-4aISXm0r.js +76 -0
- package/dist/chunks/select-item-DjoxYopL.js +356 -0
- package/dist/chunks/settings-BPOpwVkr.js +594 -0
- package/dist/chunks/settings-CK2vhfPu.js +78 -0
- package/dist/chunks/shared-enums-BJDDuJr7.js +1 -0
- package/dist/chunks/shared-enums-DALKjQ7e.js +7 -0
- package/dist/chunks/state-Bpmgn27B.js +12 -0
- package/dist/chunks/state-FnSmMH94.js +5 -0
- package/dist/chunks/text-input-BygzMjjc.js +371 -0
- package/dist/chunks/text-input-cjcnMXO-.js +68 -0
- package/dist/chunks/tooltip-content-BjdZJ_Ui.js +134 -0
- package/dist/chunks/tooltip-content-DHyDYyOH.js +3 -0
- package/dist/chunks/tslib.es6-B07k2eac.js +1 -0
- package/dist/chunks/tslib.es6-C5gLNDSD.js +160 -0
- package/dist/chunks/unsafe-html-C_MKAcuC.js +5 -0
- package/dist/chunks/unsafe-html-D49sIpJ5.js +27 -0
- package/dist/chunks/validity-BMLNCMmP.js +1 -0
- package/dist/chunks/validity-CTz7ivUd.js +59 -0
- package/dist/zooy.cjs.js +1 -0
- package/dist/zooy.es.js +4 -0
- package/package.json +57 -0
- package/src/sass/carbon-icons.scss +46 -0
- package/src/sass/main.scss +7 -0
- package/src/sass/panels.scss +642 -0
- package/src/sass/reset.scss +43 -0
- package/src/sass/split.scss +131 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { s } from "./settings-BPOpwVkr.js";
|
|
2
|
+
const c = (o) => class extends o {
|
|
3
|
+
/**
|
|
4
|
+
* Focuses on the first focusable element in the shadow DOM.
|
|
5
|
+
*/
|
|
6
|
+
focus() {
|
|
7
|
+
if (this.shadowRoot.delegatesFocus)
|
|
8
|
+
super.focus();
|
|
9
|
+
else {
|
|
10
|
+
const e = (
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
12
|
+
this.shadowRoot.querySelector(s) || this.querySelector(s)
|
|
13
|
+
);
|
|
14
|
+
e ? e.focus() : super.focus();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
c as F
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./settings-CK2vhfPu.js"),t=o=>class extends o{focus(){if(this.shadowRoot.delegatesFocus)super.focus();else{const e=this.shadowRoot.querySelector(s.selectorTabbable)||this.querySelector(s.selectorTabbable);e?e.focus():super.focus()}}};exports.FocusMixin=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./on-XRofyGQh.js"),r=a=>{class s extends a{constructor(){super(...arguments),this._hFormdata=null}connectedCallback(){super.connectedCallback();const t=this.closest("form");t&&(this._hFormdata=o.on(t,"formdata",this._handleFormdata.bind(this)))}disconnectedCallback(){this._hFormdata&&(this._hFormdata=this._hFormdata.release()),super.disconnectedCallback()}}return s};exports.FormMixin=r;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { o as s } from "./on-BPhwbVf3.js";
|
|
2
|
+
const n = (a) => {
|
|
3
|
+
class o extends a {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this._hFormdata = null;
|
|
6
|
+
}
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
super.connectedCallback();
|
|
9
|
+
const t = this.closest("form");
|
|
10
|
+
t && (this._hFormdata = s(t, "formdata", this._handleFormdata.bind(this)));
|
|
11
|
+
}
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
this._hFormdata && (this._hFormdata = this._hFormdata.release()), super.disconnectedCallback();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return o;
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
n as F
|
|
20
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { o as l } from "./on-BPhwbVf3.js";
|
|
2
|
+
const u = /^((document|window|parentRoot|shadowRoot):)?([\w-]+)$/, _ = (a) => {
|
|
3
|
+
class s extends a {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this._handles = /* @__PURE__ */ new Set();
|
|
6
|
+
}
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
super.connectedCallback();
|
|
9
|
+
const t = this.constructor._hostListeners;
|
|
10
|
+
Object.keys(t).forEach((o) => {
|
|
11
|
+
Object.keys(t[o]).forEach((n) => {
|
|
12
|
+
var e;
|
|
13
|
+
const c = u.exec(n);
|
|
14
|
+
if (!c)
|
|
15
|
+
throw new Error(`Could not parse the event name: ${o}`);
|
|
16
|
+
const [, , i, r] = c, h = {
|
|
17
|
+
document: this.ownerDocument,
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
19
|
+
window: this.ownerDocument.defaultView,
|
|
20
|
+
parentRoot: this.getRootNode(),
|
|
21
|
+
shadowRoot: this.shadowRoot
|
|
22
|
+
}[i] || this, { options: d } = t[o][n];
|
|
23
|
+
this._handles.add(l(h, (e = this.constructor[r]) !== null && e !== void 0 ? e : r, this[o], d));
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
this._handles.forEach((t) => {
|
|
29
|
+
t.release(), this._handles.delete(t);
|
|
30
|
+
}), super.disconnectedCallback();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return s._hostListeners = {}, s;
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
_ as H
|
|
37
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const r = (s, n, e, t) => {
|
|
2
|
+
const o = e._hostListeners;
|
|
3
|
+
if (!o)
|
|
4
|
+
throw new Error("The method `@HostListener()` is defined on has to be of a class that has `HostListerMixin`.");
|
|
5
|
+
o[t] || (o[t] = {}), o[t][s] = { options: n };
|
|
6
|
+
}, h = (s, n, e) => {
|
|
7
|
+
const { kind: t, key: o, placement: i } = e;
|
|
8
|
+
if (!(t === "method" && i === "prototype" || t === "field" && i === "own"))
|
|
9
|
+
throw new Error("`@HostListener()` must be defined on instance methods, but you may have defined it on static, field, etc.");
|
|
10
|
+
return Object.assign(Object.assign({}, e), { finisher(d) {
|
|
11
|
+
r(s, n, d, o);
|
|
12
|
+
} });
|
|
13
|
+
}, c = (s, n) => (e, t) => typeof t < "u" ? r(s, n, e.constructor, t) : h(s, n, e);
|
|
14
|
+
export {
|
|
15
|
+
c as H
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./on-XRofyGQh.js"),l=/^((document|window|parentRoot|shadowRoot):)?([\w-]+)$/,w=i=>{class s extends i{constructor(){super(...arguments),this._handles=new Set}connectedCallback(){super.connectedCallback();const t=this.constructor._hostListeners;Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{var o;const c=l.exec(n);if(!c)throw new Error(`Could not parse the event name: ${e}`);const[,,a,r]=c,h={document:this.ownerDocument,window:this.ownerDocument.defaultView,parentRoot:this.getRootNode(),shadowRoot:this.shadowRoot}[a]||this,{options:d}=t[e][n];this._handles.add(u.on(h,(o=this.constructor[r])!==null&&o!==void 0?o:r,this[e],d))})})}disconnectedCallback(){this._handles.forEach(t=>{t.release(),this._handles.delete(t)}),super.disconnectedCallback()}}return s._hostListeners={},s};exports.HostListenerMixin=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=(s,n,e,t)=>{const o=e._hostListeners;if(!o)throw new Error("The method `@HostListener()` is defined on has to be of a class that has `HostListerMixin`.");o[t]||(o[t]={}),o[t][s]={options:n}},c=(s,n,e)=>{const{kind:t,key:o,placement:i}=e;if(!(t==="method"&&i==="prototype"||t==="field"&&i==="own"))throw new Error("`@HostListener()` must be defined on instance methods, but you may have defined it on static, field, etc.");return Object.assign(Object.assign({},e),{finisher(d){r(s,n,d,o)}})},h=(s,n)=>(e,t)=>typeof t<"u"?r(s,n,e.constructor,t):c(s,n,e);exports.HostListener=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./icon-loader-utils-BBjK16O-.js");function r(e,t={},a){return e?"default"in e||"attrs"in e&&"content"in e?n.createIconTemplate(e)(t):e:null}exports.iconLoader=r;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const v=require("./directive-Dp4ZTz-F.js"),d=require("./unsafe-html-C_MKAcuC.js");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(n){m(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function m(t,e,r){return e=h(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function b(t,e){if(t==null)return{};var r=O(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function y(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function h(t){var e=y(t,"string");return typeof e=="symbol"?e:String(e)}var j=["width","height","viewBox"],w=["tabindex"],P={focusable:"false",preserveAspectRatio:"xMidYMid meet"};function x(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width,r=t.height,n=t.viewBox,i=n===void 0?"0 0 ".concat(e," ").concat(r):n,o=b(t,j),a=o.tabindex,u=b(o,w),c=f(f(f({},P),u),{},{width:e,height:r,viewBox:i});return c["aria-label"]||c["aria-labelledby"]||c.title?(c.role="img",a!=null&&(c.focusable="true",c.tabindex=a)):c["aria-hidden"]=!0,c}function g(t){return Object.keys(t).reduce(function(e,r,n){var i="".concat(r,'="').concat(t[r],'"');return n===0?i:e+" "+i},"")}/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/class s extends d.e{}s.directiveName="unsafeSVG",s.resultType=2;const S=v.e(s);function _(t){return"default"in t&&t.default?t.default:t}function A(t,e={}){const r=_(t);r.attrs||(r.attrs={});const n=Object.assign(Object.assign({},r.attrs),e),i=x(n),o=g(i),u=(r.content||[]).map(c=>typeof c=="string"?c:p(c)).join("");return`<svg ${o}>${u}</svg>`}function p(t){if(typeof t=="string")return t;const{elem:e="svg",attrs:r={},content:n=[]}=t,i=n.map(p).join(""),o=g(r);return`<${e} ${o}>${i}</${e}>`}function $(t){return(e={})=>{const r=A(t,e);return S(r)}}exports.createIconTemplate=$;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { e as v } from "./directive-kLG6oqUu.js";
|
|
2
|
+
import { e as d } from "./unsafe-html-D49sIpJ5.js";
|
|
3
|
+
function l(t, e) {
|
|
4
|
+
var r = Object.keys(t);
|
|
5
|
+
if (Object.getOwnPropertySymbols) {
|
|
6
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
7
|
+
e && (n = n.filter(function(i) {
|
|
8
|
+
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
9
|
+
})), r.push.apply(r, n);
|
|
10
|
+
}
|
|
11
|
+
return r;
|
|
12
|
+
}
|
|
13
|
+
function f(t) {
|
|
14
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
15
|
+
var r = arguments[e] != null ? arguments[e] : {};
|
|
16
|
+
e % 2 ? l(Object(r), !0).forEach(function(n) {
|
|
17
|
+
m(t, n, r[n]);
|
|
18
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : l(Object(r)).forEach(function(n) {
|
|
19
|
+
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
function m(t, e, r) {
|
|
25
|
+
return e = h(e), e in t ? Object.defineProperty(t, e, {
|
|
26
|
+
value: r,
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0
|
|
30
|
+
}) : t[e] = r, t;
|
|
31
|
+
}
|
|
32
|
+
function O(t, e) {
|
|
33
|
+
if (t == null) return {};
|
|
34
|
+
var r = {}, n = Object.keys(t), i, o;
|
|
35
|
+
for (o = 0; o < n.length; o++)
|
|
36
|
+
i = n[o], !(e.indexOf(i) >= 0) && (r[i] = t[i]);
|
|
37
|
+
return r;
|
|
38
|
+
}
|
|
39
|
+
function b(t, e) {
|
|
40
|
+
if (t == null) return {};
|
|
41
|
+
var r = O(t, e), n, i;
|
|
42
|
+
if (Object.getOwnPropertySymbols) {
|
|
43
|
+
var o = Object.getOwnPropertySymbols(t);
|
|
44
|
+
for (i = 0; i < o.length; i++)
|
|
45
|
+
n = o[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]);
|
|
46
|
+
}
|
|
47
|
+
return r;
|
|
48
|
+
}
|
|
49
|
+
function y(t, e) {
|
|
50
|
+
if (typeof t != "object" || t === null) return t;
|
|
51
|
+
var r = t[Symbol.toPrimitive];
|
|
52
|
+
if (r !== void 0) {
|
|
53
|
+
var n = r.call(t, e);
|
|
54
|
+
if (typeof n != "object") return n;
|
|
55
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
|
+
}
|
|
57
|
+
return (e === "string" ? String : Number)(t);
|
|
58
|
+
}
|
|
59
|
+
function h(t) {
|
|
60
|
+
var e = y(t, "string");
|
|
61
|
+
return typeof e == "symbol" ? e : String(e);
|
|
62
|
+
}
|
|
63
|
+
var j = ["width", "height", "viewBox"], w = ["tabindex"], P = {
|
|
64
|
+
// Reference:
|
|
65
|
+
// https://github.com/IBM/carbon-components-react/issues/1392
|
|
66
|
+
// https://github.com/PolymerElements/iron-iconset-svg/pull/47
|
|
67
|
+
// `focusable` is a string attribute which is why we do not use a boolean here
|
|
68
|
+
focusable: "false",
|
|
69
|
+
preserveAspectRatio: "xMidYMid meet"
|
|
70
|
+
};
|
|
71
|
+
function x() {
|
|
72
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.width, r = t.height, n = t.viewBox, i = n === void 0 ? "0 0 ".concat(e, " ").concat(r) : n, o = b(t, j), c = o.tabindex, u = b(o, w), a = f(f(f({}, P), u), {}, {
|
|
73
|
+
width: e,
|
|
74
|
+
height: r,
|
|
75
|
+
viewBox: i
|
|
76
|
+
});
|
|
77
|
+
return a["aria-label"] || a["aria-labelledby"] || a.title ? (a.role = "img", c != null && (a.focusable = "true", a.tabindex = c)) : a["aria-hidden"] = !0, a;
|
|
78
|
+
}
|
|
79
|
+
function g(t) {
|
|
80
|
+
return Object.keys(t).reduce(function(e, r, n) {
|
|
81
|
+
var i = "".concat(r, '="').concat(t[r], '"');
|
|
82
|
+
return n === 0 ? i : e + " " + i;
|
|
83
|
+
}, "");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @license
|
|
87
|
+
* Copyright 2017 Google LLC
|
|
88
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
89
|
+
*/
|
|
90
|
+
class s extends d {
|
|
91
|
+
}
|
|
92
|
+
s.directiveName = "unsafeSVG", s.resultType = 2;
|
|
93
|
+
const S = v(s);
|
|
94
|
+
function _(t) {
|
|
95
|
+
return "default" in t && t.default ? t.default : t;
|
|
96
|
+
}
|
|
97
|
+
function $(t, e = {}) {
|
|
98
|
+
const r = _(t);
|
|
99
|
+
r.attrs || (r.attrs = {});
|
|
100
|
+
const n = Object.assign(Object.assign({}, r.attrs), e), i = x(n), o = g(i), u = (r.content || []).map((a) => typeof a == "string" ? a : p(a)).join("");
|
|
101
|
+
return `<svg ${o}>${u}</svg>`;
|
|
102
|
+
}
|
|
103
|
+
function p(t) {
|
|
104
|
+
if (typeof t == "string")
|
|
105
|
+
return t;
|
|
106
|
+
const { elem: e = "svg", attrs: r = {}, content: n = [] } = t, i = n.map(p).join(""), o = g(r);
|
|
107
|
+
return `<${e} ${o}>${i}</${e}>`;
|
|
108
|
+
}
|
|
109
|
+
function B(t) {
|
|
110
|
+
return (e = {}) => {
|
|
111
|
+
const r = $(t, e);
|
|
112
|
+
return S(r);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
B as c
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./if-defined-BdZRLDJ6.js");var d=i=>n.o(i===""?void 0:i??void 0);exports.ifNonEmpty=d;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const s=require("./search-C3raqgOD.js"),t=require("./tslib.es6-B07k2eac.js"),e=require("./settings-CK2vhfPu.js"),n=require("./property-DCYiZTFF.js"),c=require("./text-input-cjcnMXO-.js"),i=require("./carbon-element-CbfPUYRT.js");let r=class extends e.i{constructor(){super(...arguments),this.size=c.INPUT_SIZE.MEDIUM}render(){return e.x`
|
|
2
|
+
<span class="${e.prefix}--label"></span>
|
|
3
|
+
<div class="${e.prefix}--search-input"></div>
|
|
4
|
+
`}};r.styles=s.styles;t.__decorate([n.n({reflect:!0})],r.prototype,"size",void 0);r=t.__decorate([i.carbonElement(`${e.prefix}-search-skeleton`)],r);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";const y=require("./checkbox-BRPCg-DN.js"),r=require("./tslib.es6-B07k2eac.js"),w=require("./class-map-BfNAkUL_.js"),e=require("./settings-CK2vhfPu.js"),i=require("./property-DCYiZTFF.js"),T=require("./16-4Ffg4DOO.js"),A=require("./16-CpNRIuiB.js"),v=require("./icon-loader-o_JYDmJX.js"),k=require("./carbon-element-CbfPUYRT.js");var b;(function(d){d.HORIZONTAL="horizontal",d.VERTICAL="vertical"})(b||(b={}));let t=class extends e.i{constructor(){super(...arguments),this.orientation=b.VERTICAL,this.readonly=!1,this.warn=!1,this.warnText="",this._hasAILabel=!1}_handleSlotChange({target:n}){const l=n.assignedNodes().filter(a=>a.matches!==void 0?a.matches(this.constructor.aiLabelItem)||a.matches(this.constructor.slugItem):!1);this._hasAILabel=!!l,l[0].setAttribute("size","mini"),this.requestUpdate()}updated(n){const{selectorCheckbox:l}=this.constructor,a=this.querySelectorAll(l);if(["disabled","readonly","orientation"].forEach(o=>{if(n.has(o)){const{[o]:s}=this;a.forEach(p=>{p[o]=s})}}),n.has("invalid")){const{invalid:o}=this;a.forEach(s=>{o?s.setAttribute("invalid-group",""):s.removeAttribute("invalid-group")})}}render(){const{ariaLabelledBy:n,disabled:l,helperText:a,invalid:o,invalidText:s,legendId:p,legendText:m,orientation:u,readonly:c,warn:h,warnText:S,_hasAILabel:C,_handleSlotChange:x}=this,g=!c&&!o&&h,I=!o&&!h,L=Math.random().toString(16).slice(2),_=a?`checkbox-group-helper-text-${L}`:void 0,$=a?e.x` <div id="${_}" class="${e.prefix}--form__helper-text">
|
|
2
|
+
${a}
|
|
3
|
+
</div>`:null,q=w.e({[`${e.prefix}--checkbox-group`]:!0,[`${e.prefix}--checkbox-group--readonly`]:c,[`${e.prefix}--checkbox-group--invalid`]:!c&&o,[`${e.prefix}--checkbox-group--warning`]:g,[`${e.prefix}--checkbox-group--slug`]:C,[`${e.prefix}--checkbox-group--${u}`]:u==="horizontal"});return e.x`
|
|
4
|
+
<fieldset
|
|
5
|
+
class="${q}"
|
|
6
|
+
?data-invalid=${o}
|
|
7
|
+
?disabled=${l}
|
|
8
|
+
aria-disabled=${c}
|
|
9
|
+
?aria-labelledby=${n||p}
|
|
10
|
+
?aria-describedby=${!o&&!h&&$?_:void 0}
|
|
11
|
+
orientation=${u}>
|
|
12
|
+
<legend class="${e.prefix}--label" id=${p||n}>
|
|
13
|
+
${m}
|
|
14
|
+
<slot name="ai-label" @slotchange="${x}"></slot>
|
|
15
|
+
<slot name="decorator" @slotchange="${x}"></slot>
|
|
16
|
+
<slot name="slug" @slotchange="${x}"></slot>
|
|
17
|
+
</legend>
|
|
18
|
+
<slot></slot>
|
|
19
|
+
<div class="${e.prefix}--checkbox-group__validation-msg">
|
|
20
|
+
${!c&&o?e.x`
|
|
21
|
+
${v.iconLoader(T._16,{class:`${e.prefix}--checkbox__invalid-icon`})}
|
|
22
|
+
<div class="${e.prefix}--form-requirement">${s}</div>
|
|
23
|
+
`:null}
|
|
24
|
+
${g?e.x`
|
|
25
|
+
${v.iconLoader(A._16,{class:`${e.prefix}--checkbox__invalid-icon ${e.prefix}--checkbox__invalid-icon--warning`})}
|
|
26
|
+
<div class="${e.prefix}--form-requirement">${S}</div>
|
|
27
|
+
`:null}
|
|
28
|
+
</div>
|
|
29
|
+
${I?$:null}
|
|
30
|
+
</fieldset>
|
|
31
|
+
`}static get selectorCheckbox(){return`${e.prefix}-checkbox`}static get slugItem(){return`${e.prefix}-slug`}static get aiLabelItem(){return`${e.prefix}-ai-label`}};t.shadowRootOptions=Object.assign(Object.assign({},e.i.shadowRootOptions),{delegatesFocus:!0});t.styles=y.styles;r.__decorate([i.n({type:String,reflect:!0,attribute:"aria-labelledby"})],t.prototype,"ariaLabelledBy",void 0);r.__decorate([i.n({type:Boolean})],t.prototype,"disabled",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"helper-text"})],t.prototype,"helperText",void 0);r.__decorate([i.n({type:Boolean,attribute:"invalid"})],t.prototype,"invalid",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"invalid-text"})],t.prototype,"invalidText",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"legend-id"})],t.prototype,"legendId",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"legend-text"})],t.prototype,"legendText",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"orientation"})],t.prototype,"orientation",void 0);r.__decorate([i.n({type:Boolean,reflect:!0})],t.prototype,"readonly",void 0);r.__decorate([i.n({type:Boolean,reflect:!0})],t.prototype,"warn",void 0);r.__decorate([i.n({type:String,reflect:!0,attribute:"warn-text"})],t.prototype,"warnText",void 0);t=r.__decorate([k.carbonElement(`${e.prefix}-checkbox-group`)],t);let f=class extends e.i{render(){return e.x`
|
|
32
|
+
<label class="${e.prefix}--checkbox-label" for="checkbox" part="label">
|
|
33
|
+
<span class="${e.prefix}--checkbox-label-text ${e.prefix}--skeleton"
|
|
34
|
+
><slot></slot
|
|
35
|
+
></span>
|
|
36
|
+
</label>
|
|
37
|
+
`}};f.styles=y.styles;f=r.__decorate([k.carbonElement(`${e.prefix}-checkbox-skeleton`)],f);
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { _ as d } from "./tslib.es6-C5gLNDSD.js";
|
|
2
|
+
import { a as W, i as f, p as e, x as v } from "./settings-BPOpwVkr.js";
|
|
3
|
+
import { n as o } from "./property-pT1z5CCa.js";
|
|
4
|
+
import { e as F } from "./query-CbRg6ZGy.js";
|
|
5
|
+
import { e as u } from "./class-map-DEHG4tmw.js";
|
|
6
|
+
import { _ as I } from "./16-BiShwKPX.js";
|
|
7
|
+
import { _ as R } from "./16-BwDdccyH.js";
|
|
8
|
+
import { i as h } from "./if-non-empty-DTGflHtA.js";
|
|
9
|
+
import { o as y } from "./if-defined-C0yJsxi2.js";
|
|
10
|
+
import { C as B } from "./text-input-BygzMjjc.js";
|
|
11
|
+
import { c as b } from "./carbon-element-DzDuXiyl.js";
|
|
12
|
+
import { i as x } from "./icon-loader-Dk_AU26w.js";
|
|
13
|
+
var _ = W(['.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--layer-one,:root{--cds-layer:var(--cds-layer-01,#f4f4f4);--cds-layer-active:var(--cds-layer-active-01,#c6c6c6);--cds-layer-background:var(--cds-layer-background-01,#fff);--cds-layer-hover:var(--cds-layer-hover-01,#e8e8e8);--cds-layer-selected:var(--cds-layer-selected-01,#e0e0e0);--cds-layer-selected-hover:var(--cds-layer-selected-hover-01,#d1d1d1);--cds-layer-accent:var(--cds-layer-accent-01,#e0e0e0);--cds-layer-accent-hover:var(--cds-layer-accent-hover-01,#d1d1d1);--cds-layer-accent-active:var(--cds-layer-accent-active-01,#a8a8a8);--cds-field:var(--cds-field-01,#f4f4f4);--cds-field-hover:var(--cds-field-hover-01,#e8e8e8);--cds-border-subtle:var(--cds-border-subtle-00,#e0e0e0);--cds-border-subtle-selected:var(--cds-border-subtle-selected-01,#c6c6c6);--cds-border-strong:var(--cds-border-strong-01,#8d8d8d);--cds-border-tile:var(--cds-border-tile-01,#c6c6c6)}.cds--layer-two{--cds-layer:var(--cds-layer-02,#fff);--cds-layer-active:var(--cds-layer-active-02,#c6c6c6);--cds-layer-background:var(--cds-layer-background-02,#f4f4f4);--cds-layer-hover:var(--cds-layer-hover-02,#e8e8e8);--cds-layer-selected:var(--cds-layer-selected-02,#e0e0e0);--cds-layer-selected-hover:var(--cds-layer-selected-hover-02,#d1d1d1);--cds-layer-accent:var(--cds-layer-accent-02,#e0e0e0);--cds-layer-accent-hover:var(--cds-layer-accent-hover-02,#d1d1d1);--cds-layer-accent-active:var(--cds-layer-accent-active-02,#a8a8a8);--cds-field:var(--cds-field-02,#fff);--cds-field-hover:var(--cds-field-hover-02,#e8e8e8);--cds-border-subtle:var(--cds-border-subtle-01,#c6c6c6);--cds-border-subtle-selected:var(--cds-border-subtle-selected-02,#c6c6c6);--cds-border-strong:var(--cds-border-strong-02,#8d8d8d);--cds-border-tile:var(--cds-border-tile-02,#a8a8a8)}.cds--layer-three{--cds-layer:var(--cds-layer-03,#f4f4f4);--cds-layer-active:var(--cds-layer-active-03,#c6c6c6);--cds-layer-background:var(--cds-layer-background-03,#fff);--cds-layer-hover:var(--cds-layer-hover-03,#e8e8e8);--cds-layer-selected:var(--cds-layer-selected-03,#e0e0e0);--cds-layer-selected-hover:var(--cds-layer-selected-hover-03,#d1d1d1);--cds-layer-accent:var(--cds-layer-accent-03,#e0e0e0);--cds-layer-accent-hover:var(--cds-layer-accent-hover-03,#d1d1d1);--cds-layer-accent-active:var(--cds-layer-accent-active-03,#a8a8a8);--cds-field:var(--cds-field-03,#f4f4f4);--cds-field-hover:var(--cds-field-hover-03,#e8e8e8);--cds-border-subtle:var(--cds-border-subtle-02,#e0e0e0);--cds-border-subtle-selected:var(--cds-border-subtle-selected-03,#c6c6c6);--cds-border-strong:var(--cds-border-strong-03,#8d8d8d);--cds-border-tile:var(--cds-border-tile-03,#c6c6c6)}.cds--layer-one.cds--layer__with-background,.cds--layer-three.cds--layer__with-background,.cds--layer-two.cds--layer__with-background{background-color:var(--cds-layer-background)}@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}input:-webkit-autofill,input:-webkit-autofill:focus,input:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:focus,textarea:-webkit-autofill:hover{box-shadow:0 0 0 1000px var(--cds-field) inset;-webkit-text-fill-color:var(--cds-text-primary,#161616)}.cds--fieldset{border:0;box-sizing:border-box;font-family:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}.cds--fieldset *,.cds--fieldset :after,.cds--fieldset :before{box-sizing:inherit}.cds--form-item{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572)}.cds--label{color:var(--cds-text-secondary,#525252);display:inline-block;font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);font-weight:400;letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);line-height:1rem;margin-block-end:.5rem;vertical-align:baseline}.cds--label html{font-size:100%}.cds--label body{font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif;font-weight:400;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.cds--label code{font-family:IBM Plex Mono,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,monospace}.cds--label strong{font-weight:600}.cds--label .cds--toggletip-label{font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333)}.cds--label--no-margin{margin-block-end:0}.cds--label+.cds--tooltip{inset-block-start:.2rem;inset-inline-start:.5rem;position:relative}.cds--label+.cds--tooltip .cds--tooltip__trigger{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;box-sizing:border-box;cursor:pointer;display:inline-block;display:flex;font-family:inherit;font-size:100%;font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);inline-size:100%;justify-content:center;letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin:0;padding:0;text-align:start;vertical-align:baseline}.cds--label+.cds--tooltip .cds--tooltip__trigger *,.cds--label+.cds--tooltip .cds--tooltip__trigger :after,.cds--label+.cds--tooltip .cds--tooltip__trigger :before{box-sizing:inherit}.cds--label+.cds--tooltip .cds--tooltip__trigger::-moz-focus-inner{border:0}.cds--label+.cds--tooltip .cds--tooltip__trigger:focus{outline:1px solid var(--cds-focus,#0f62fe)}.cds--label+.cds--tooltip .cds--tooltip__trigger svg{fill:var(--cds-icon-secondary,#525252)}.cds--label+.cds--tooltip .cds--tooltip__trigger svg :hover{fill:var(--cds-icon-primary,#161616)}.cds--label+.cds--toggletip{inset-block-start:.2rem;inset-inline-start:.5rem}.cds--label.cds--skeleton{background:var(--cds-skeleton-background,#e8e8e8);block-size:.875rem;border:none;box-shadow:none;inline-size:4.6875rem;padding:0;pointer-events:none;position:relative}.cds--label.cds--skeleton:active,.cds--label.cds--skeleton:focus,.cds--label.cds--skeleton:hover{border:none;cursor:default;outline:none}.cds--label.cds--skeleton:before{animation:cds--skeleton 3s ease-in-out infinite;background:var(--cds-skeleton-element,#c6c6c6);block-size:100%;content:"";inline-size:100%;inset-inline-start:0;position:absolute;will-change:transform-origin,transform,opacity}@media (prefers-reduced-motion:reduce){.cds--label.cds--skeleton:before{animation:none}}@media (forced-colors:active),screen and (-ms-high-contrast:active){.cds--label.cds--skeleton{background:CanvasText}.cds--label.cds--skeleton:before{background:Canvas;forced-color-adjust:none}}input[type=number],input[type=text].cds--number{font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif}.cds--combo-box[data-invalid]:not(.cds--multi-select--selected) .cds--text-input:not(:focus),.cds--list-box[data-invalid]:not(.cds--multi-select--invalid--focused,.cds--combo-box--invalid--focused),.cds--number[data-invalid] input[type=number]:not(:focus),.cds--number[data-invalid] input[type=text]:not(:focus),.cds--select-input__wrapper[data-invalid] .cds--select-input:not(:focus),.cds--text-area__wrapper[data-invalid]>.cds--text-area--invalid:not(:focus),.cds--text-input__field-wrapper[data-invalid]>.cds--text-input--invalid:not(:focus),input[data-invalid]:not(:focus){outline:2px solid var(--cds-support-error,#da1e28);outline-offset:-2px}@media screen and (prefers-contrast){.cds--combo-box[data-invalid]:not(.cds--multi-select--selected) .cds--text-input:not(:focus),.cds--list-box[data-invalid]:not(.cds--multi-select--invalid--focused,.cds--combo-box--invalid--focused),.cds--number[data-invalid] input[type=number]:not(:focus),.cds--number[data-invalid] input[type=text]:not(:focus),.cds--select-input__wrapper[data-invalid] .cds--select-input:not(:focus),.cds--text-area__wrapper[data-invalid]>.cds--text-area--invalid:not(:focus),.cds--text-input__field-wrapper[data-invalid]>.cds--text-input--invalid:not(:focus),input[data-invalid]:not(:focus){outline-style:dotted}}.cds--date-picker-input__wrapper--invalid~.cds--form-requirement,.cds--date-picker-input__wrapper--warn~.cds--form-requirement,.cds--date-picker-input__wrapper~.cds--form-requirement,.cds--list-box--warning~.cds--form-requirement,.cds--list-box[data-invalid]~.cds--form-requirement,.cds--number[data-invalid] .cds--number__input-wrapper~.cds--form-requirement,.cds--number__input-wrapper--warning~.cds--form-requirement,.cds--select--warning .cds--select-input__wrapper~.cds--form-requirement,.cds--select-input__wrapper[data-invalid]~.cds--form-requirement,.cds--text-area__wrapper--warn~.cds--form-requirement,.cds--text-area__wrapper[data-invalid]~.cds--form-requirement,.cds--text-input__field-wrapper--warning>.cds--text-input~.cds--form-requirement,.cds--text-input__field-wrapper--warning~.cds--form-requirement,.cds--text-input__field-wrapper[data-invalid]~.cds--form-requirement,.cds--time-picker--invalid~.cds--form-requirement,.cds--time-picker--warning~.cds--form-requirement,.cds--time-picker[data-invalid]~.cds--form-requirement,input[data-invalid]~.cds--form-requirement{display:block;font-weight:400;max-block-size:12.5rem;overflow:visible}.cds--select--inline.cds--select--warning .cds--select-input--inline__wrapper~.cds--form-requirement,.cds--select-input--inline__wrapper[data-invalid]~.cds--form-requirement{display:inline-flex;inline-size:100%;margin:0;margin-block-end:0;max-block-size:100%;overflow:visible;padding-inline-start:.5rem}.cds--date-picker-input__wrapper--invalid~.cds--form-requirement,.cds--date-picker-input__wrapper~.cds--form-requirement,.cds--list-box[data-invalid]~.cds--form-requirement,.cds--number[data-invalid] .cds--number__input-wrapper~.cds--form-requirement,.cds--select-input--inline__wrapper[data-invalid]~.cds--form-requirement,.cds--select-input__wrapper[data-invalid]~.cds--form-requirement,.cds--text-area__wrapper[data-invalid]~.cds--form-requirement,.cds--text-input__field-wrapper[data-invalid]~.cds--form-requirement,.cds--time-picker--invalid~.cds--form-requirement,.cds--time-picker[data-invalid]~.cds--form-requirement,input[data-invalid]~.cds--form-requirement{color:var(--cds-text-error,#da1e28)}.cds--form--fluid .cds--text-input__field-wrapper--warning,.cds--form--fluid .cds--text-input__field-wrapper[data-invalid]{display:block}.cds--form--fluid input[data-invalid]{outline:none}.cds--form--fluid .cds--form-requirement{margin:0;padding:.5rem 2.5rem .5rem 1rem}input:not(output,[data-invalid]):-moz-ui-invalid{box-shadow:none}.cds--form-requirement{display:none;font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin:.25rem 0 0;max-block-size:0;overflow:hidden}.cds--form-requirement html{font-size:100%}.cds--form-requirement body{font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif;font-weight:400;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.cds--form-requirement code{font-family:IBM Plex Mono,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,monospace}.cds--form-requirement strong{font-weight:600}.cds--select--inline .cds--form__helper-text{margin-block-start:0}.cds--form__helper-text{color:var(--cds-text-helper,#6f6f6f);font-size:var(--cds-helper-text-01-font-size,.75rem);inline-size:100%;letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);line-height:var(--cds-helper-text-01-line-height,1.33333);margin-block-start:.25rem;opacity:1;z-index:0}.cds--form__helper-text--disabled,.cds--label--disabled,fieldset[disabled] .cds--form__helper-text,fieldset[disabled] .cds--label{color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--assistive-text,.cds--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.cds--text-area{background-color:var(--cds-field);block-size:100%;border:none;border-block-end:1px solid var(--cds-border-strong);box-sizing:border-box;color:var(--cds-text-primary,#161616);font-family:inherit;font-size:100%;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);margin:0;min-block-size:2.5rem;min-inline-size:10rem;outline:2px solid transparent;outline-offset:-2px;padding:0;padding:.6875rem var(--cds-layout-density-padding-inline-local);resize:vertical;transition:background-color 70ms cubic-bezier(.2,0,.38,.9),outline 70ms cubic-bezier(.2,0,.38,.9);vertical-align:baseline}.cds--text-area *,.cds--text-area :after,.cds--text-area :before{box-sizing:inherit}.cds--text-area:active,.cds--text-area:focus{outline:2px solid var(--cds-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){.cds--text-area:active,.cds--text-area:focus{outline-style:dotted}}.cds--text-area::-moz-placeholder{color:var(--cds-text-placeholder,hsla(0,0%,9%,.4));font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);opacity:1}.cds--text-area::placeholder{color:var(--cds-text-placeholder,hsla(0,0%,9%,.4));font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);opacity:1}.cds--text-area--light{background-color:var(--cds-field-02,#fff)}.cds--text-area__wrapper{--cds-layout-density-padding-inline-local:clamp(var(--cds-layout-density-padding-inline-min),var(--cds-layout-density-padding-inline,var(--cds-layout-density-padding-inline-normal)),var(--cds-layout-density-padding-inline-max));display:flex;inline-size:100%;max-inline-size:100%;position:relative}.cds--text-area__wrapper--cols{inline-size:auto}.cds--text-area__invalid-icon{position:absolute;fill:var(--cds-support-error,#da1e28);inset-block-start:.75rem;inset-inline-end:var(--cds-layout-density-padding-inline-local)}.cds--text-area__invalid-icon--warning{fill:var(--cds-support-warning,#f1c21b)}.cds--text-area__invalid-icon--warning path[fill]{fill:#000;opacity:1}.cds--text-area__counter-alert{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px}.cds--form-item:has(.cds--text-area__wrapper--cols){inline-size:-moz-fit-content;inline-size:fit-content}.cds--text-area:disabled{background-color:var(--cds-field);border-block-end:1px solid transparent;color:var(--cds-text-disabled,hsla(0,0%,9%,.25));cursor:not-allowed;outline:none;resize:none}.cds--text-area:disabled::-moz-placeholder{color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--text-area:disabled::placeholder{color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--text-area__wrapper--readonly .cds--text-area{background:transparent;border-block-end-color:var(--cds-border-subtle)}.cds--text-area__wrapper--decorator .cds--text-area__inner-wrapper--decorator>*,.cds--text-area__wrapper--slug .cds--ai-label,.cds--text-area__wrapper--slug .cds--slug{inset-block-start:.75rem;inset-inline-end:1rem;position:absolute}.cds--text-area__wrapper--decorator .cds--ai-label.cds--ai-label--revert,.cds--text-area__wrapper--slug .cds--ai-label.cds--ai-label--revert,.cds--text-area__wrapper--slug .cds--slug.cds--slug--revert{inset-block-start:.25rem;inset-inline-end:.5rem;transform:translate(0)}.cds--text-area__wrapper--decorator .cds--text-area:has(~.cds--text-area__inner-wrapper--decorator .cds--ai-label):not(:has(~.cds--text-area__inner-wrapper--decorator .cds--ai-label--revert)),.cds--text-area__wrapper--slug .cds--text-area:has(~.cds--ai-label):not(:has(~.cds--ai-label--revert)),.cds--text-area__wrapper--slug .cds--text-area:has(~.cds--slug):not(:has(~.cds--slug--revert)){background-image:linear-gradient(0deg,var(--cds-ai-aura-start-sm,rgba(69,137,255,.16)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%,transparent 100%);border-block-end-color:var(--cds-ai-border-strong,#4589ff)}.cds--text-area__wrapper--decorator .cds--text-area:has(~.cds--text-area__inner-wrapper--decorator>*),.cds--text-area__wrapper--slug .cds--text-area:has(~.cds--ai-label),.cds--text-area__wrapper--slug .cds--text-area:has(~.cds--slug){padding-inline-end:2.5rem}.cds--text-area--invalid:has(~.cds--ai-label),.cds--text-area--invalid:has(~.cds--slug),.cds--text-area--invalid:has(~.cds--text-area__inner-wrapper--decorator>*),.cds--text-area--warn:has(~.cds--ai-label),.cds--text-area--warn:has(~.cds--slug),.cds--text-area--warn:has(~.cds--text-area__inner-wrapper--decorator>*){padding-inline-end:4rem}.cds--text-area--invalid~.cds--ai-label,.cds--text-area--invalid~.cds--slug,.cds--text-area--invalid~.cds--text-area__inner-wrapper--decorator>*,.cds--text-area--warn~.cds--ai-label,.cds--text-area--warn~.cds--slug,.cds--text-area--warn~.cds--text-area__inner-wrapper--decorator>*{inset-inline-end:2.5rem}.cds--text-area--invalid~.cds--ai-label.cds--ai-label--revert,.cds--text-area--invalid~.cds--slug.cds--slug--revert,.cds--text-area--invalid~.cds--text-area__inner-wrapper--decorator>.cds--ai-label.cds--ai-label--revert,.cds--text-area--warn~.cds--ai-label.cds--ai-label--revert,.cds--text-area--warn~.cds--slug.cds--slug--revert,.cds--text-area--warn~.cds--text-area__inner-wrapper--decorator>.cds--ai-label.cds--ai-label--revert{inset-inline-end:2rem}.cds--text-area.cds--skeleton{background:var(--cds-skeleton-background,#e8e8e8);block-size:6.25rem;border:none;box-shadow:none;inline-size:100%;padding:0;pointer-events:none;position:relative}.cds--text-area.cds--skeleton:active,.cds--text-area.cds--skeleton:focus,.cds--text-area.cds--skeleton:hover{border:none;cursor:default;outline:none}.cds--text-area.cds--skeleton:before{animation:cds--skeleton 3s ease-in-out infinite;background:var(--cds-skeleton-element,#c6c6c6);block-size:100%;content:"";inline-size:100%;inset-inline-start:0;position:absolute;will-change:transform-origin,transform,opacity}@media (prefers-reduced-motion:reduce){.cds--text-area.cds--skeleton:before{animation:none}}@media (forced-colors:active),screen and (-ms-high-contrast:active){.cds--text-area.cds--skeleton{background:CanvasText}.cds--text-area.cds--skeleton:before{background:Canvas;forced-color-adjust:none}}.cds--text-area.cds--skeleton::-moz-placeholder{color:transparent}.cds--text-area.cds--skeleton::placeholder{color:transparent}.cds--text-area__label-wrapper{display:flex;inline-size:100%;justify-content:space-between;position:relative}:host(cds-textarea){--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px;outline:none}:host(cds-textarea) ::slotted(cds-ai-label),:host(cds-textarea) ::slotted(cds-slug){inset-block-start:.75rem;inset-inline-end:1rem;position:absolute}:host(cds-textarea) ::slotted(cds-ai-label[revert-active]),:host(cds-textarea) ::slotted(cds-slug[revert-active]){inset-block-start:.25rem;inset-inline-end:.5rem;transform:translate(0)}:host(cds-textarea) textarea:not([cols]),:host(cds-textarea) textarea[cols="0"],:host(cds-textarea:not([cols])),:host(cds-textarea[cols="0"]){inline-size:100%}:host(cds-textarea[invalid]) .cds--text-area__wrapper--decorator .cds--text-area,:host(cds-textarea[warn]) .cds--text-area__wrapper--decorator .cds--text-area{padding-inline-end:4rem}:host(cds-textarea[invalid]) ::slotted(cds-ai-label),:host(cds-textarea[invalid]) ::slotted(cds-slug),:host(cds-textarea[warn]) ::slotted(cds-ai-label),:host(cds-textarea[warn]) ::slotted(cds-slug){inset-inline-end:2.5rem}:host(cds-textarea[invalid]) ::slotted(cds-ai-label[revert-active]),:host(cds-textarea[invalid]) ::slotted(cds-slug[revert-active]),:host(cds-textarea[warn]) ::slotted(cds-ai-label[revert-active]),:host(cds-textarea[warn]) ::slotted(cds-slug[revert-active]){inset-inline-end:2rem}:host(cds-textarea[ai-label]) .cds--text-area__wrapper--decorator{background-image:linear-gradient(0deg,var(--cds-ai-aura-start-sm,rgba(69,137,255,.16)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%,transparent 100%);border-block-end-color:var(--cds-ai-border-strong,#4589ff)}.cds--text-area__wrapper--cols{display:inline-flex}']);
|
|
14
|
+
let r = class extends B {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.counterMode = "character", this.id = "", this.pattern = "", this.required = !1, this.rows = 4, this._prevCounterMode = this.counterMode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Manually handles maxCount for counterMode = 'word'
|
|
20
|
+
* @param event The keyboard event.
|
|
21
|
+
*/
|
|
22
|
+
_onKeyDown(t) {
|
|
23
|
+
var a, s;
|
|
24
|
+
if (!this.disabled && this.enableCounter && this.counterMode === "word") {
|
|
25
|
+
const i = ((s = (a = this.value) === null || a === void 0 ? void 0 : a.match(new RegExp("\\p{L}+", "gu"))) === null || s === void 0 ? void 0 : s.length) || 0;
|
|
26
|
+
(this.maxCount && i >= this.maxCount && t.key === " " || this.maxCount && i >= this.maxCount && t.key === "Enter") && t.preventDefault();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Handles `onPaste` event on the `<input>`.
|
|
31
|
+
* Manually handles maxCount for counterMode = 'word' when
|
|
32
|
+
* the user is pasting text
|
|
33
|
+
*
|
|
34
|
+
* @param event The clipboard event.
|
|
35
|
+
*/
|
|
36
|
+
_onPaste(t) {
|
|
37
|
+
var a;
|
|
38
|
+
if (this.counterMode === "word" && this.enableCounter && typeof this.maxCount < "u") {
|
|
39
|
+
const s = this._textarea.value.match(new RegExp("\\p{L}+", "gu")) || [], i = ((a = t.clipboardData) === null || a === void 0 ? void 0 : a.getData("Text").match(new RegExp("\\p{L}+", "gu"))) || [];
|
|
40
|
+
if (s.length + i.length > this.maxCount) {
|
|
41
|
+
t.preventDefault();
|
|
42
|
+
const n = s.concat(i).slice(0, this.maxCount);
|
|
43
|
+
this._textarea.value = n.join(" "), this._textarea.dispatchEvent(new InputEvent("input", {
|
|
44
|
+
inputType: "insertFromPaste",
|
|
45
|
+
data: n.join(" "),
|
|
46
|
+
bubbles: !0
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Handles `oninput` event on the `<input>`.
|
|
53
|
+
*
|
|
54
|
+
* @param event The event.
|
|
55
|
+
* @param event.target The event target.
|
|
56
|
+
*/
|
|
57
|
+
_handleInput({ target: t }) {
|
|
58
|
+
this.value = t.value;
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
var t, a, s, i;
|
|
62
|
+
const { enableCounter: p, maxCount: n } = this, m = (a = (t = this.value) === null || t === void 0 ? void 0 : t.length) !== null && a !== void 0 ? a : 0, c = ((i = (s = this.value) === null || s === void 0 ? void 0 : s.match(new RegExp("\\p{L}+", "gu"))) === null || i === void 0 ? void 0 : i.length) || 0, w = x(I, {
|
|
63
|
+
class: `${e}--text-area__invalid-icon`
|
|
64
|
+
}), z = x(R, {
|
|
65
|
+
class: `${e}--text-area__invalid-icon ${e}--text-area__invalid-icon--warning`
|
|
66
|
+
}), k = u({
|
|
67
|
+
[`${e}--text-area`]: !0,
|
|
68
|
+
[`${e}--text-area--warn`]: this.warn,
|
|
69
|
+
[`${e}--text-area--invalid`]: this.invalid,
|
|
70
|
+
[`${e}--text-area__wrapper--decorator`]: this._hasAILabel
|
|
71
|
+
}), $ = u({
|
|
72
|
+
[`${e}--text-area__wrapper`]: !0,
|
|
73
|
+
[`${e}--text-area__wrapper--cols`]: this.cols,
|
|
74
|
+
[`${e}--text-area__wrapper--warn`]: this.warn,
|
|
75
|
+
[`${e}--text-area__wrapper--readonly`]: this.readonly
|
|
76
|
+
}), q = u({
|
|
77
|
+
[`${e}--label`]: !0,
|
|
78
|
+
[`${e}--visually-hidden`]: this.hideLabel,
|
|
79
|
+
[`${e}--label--disabled`]: this.disabled
|
|
80
|
+
}), C = u({
|
|
81
|
+
[`${e}--label`]: !0,
|
|
82
|
+
[`${e}--label--disabled`]: this.disabled
|
|
83
|
+
}), S = u({
|
|
84
|
+
[`${e}--form__helper-text`]: !0,
|
|
85
|
+
[`${e}--form__helper-text--disabled`]: this.disabled
|
|
86
|
+
}), M = p && n ? v` <label class="${C}">
|
|
87
|
+
<slot name="label-text"
|
|
88
|
+
>${this.counterMode === "word" ? c : m}/${n}</slot
|
|
89
|
+
>
|
|
90
|
+
</label>` : null, T = () => this.invalid ? w : this.warn && !this.invalid ? z : null;
|
|
91
|
+
return v`
|
|
92
|
+
<div class="${e}--text-area__label-wrapper">
|
|
93
|
+
<label class="${q}" for="input">
|
|
94
|
+
<slot name="label-text"> ${this.label} </slot>
|
|
95
|
+
</label>
|
|
96
|
+
${M}
|
|
97
|
+
</div>
|
|
98
|
+
<div class="${$}" ?data-invalid="${this.invalid}">
|
|
99
|
+
${T()}
|
|
100
|
+
<textarea
|
|
101
|
+
autocomplete="${this.autocomplete}"
|
|
102
|
+
?autofocus="${this.autofocus}"
|
|
103
|
+
class="${k}"
|
|
104
|
+
cols="${y(this.cols)}"
|
|
105
|
+
?data-invalid="${this.invalid}"
|
|
106
|
+
?disabled="${this.disabled}"
|
|
107
|
+
id="input"
|
|
108
|
+
name="${h(this.name)}"
|
|
109
|
+
pattern="${h(this.pattern)}"
|
|
110
|
+
placeholder="${h(this.placeholder)}"
|
|
111
|
+
?readonly="${this.readonly}"
|
|
112
|
+
?required="${this.required}"
|
|
113
|
+
rows="${y(this.rows)}"
|
|
114
|
+
.value="${this.value}"
|
|
115
|
+
maxlength="${this.counterMode === "character" ? h(this.maxCount) : ""}"
|
|
116
|
+
@keydown="${this._onKeyDown}"
|
|
117
|
+
@paste="${this._onPaste}"
|
|
118
|
+
@input="${this._handleInput}"></textarea>
|
|
119
|
+
<slot name="ai-label" @slotchange="${this._handleSlotChange}"></slot>
|
|
120
|
+
<slot name="slug" @slotchange="${this._handleSlotChange}"></slot>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="${S}" ?hidden="${this.invalid || this.warn}">
|
|
123
|
+
<slot name="helper-text"> ${this.helperText} </slot>
|
|
124
|
+
</div>
|
|
125
|
+
<div
|
|
126
|
+
class="${e}--form-requirement"
|
|
127
|
+
?hidden="${!this.invalid && !this.warn}">
|
|
128
|
+
<slot name="${this.invalid ? "invalid-text" : "warn-text"}">
|
|
129
|
+
${this.invalid ? this.invalidText : this.warnText}
|
|
130
|
+
</slot>
|
|
131
|
+
</div>
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
134
|
+
updated() {
|
|
135
|
+
var t, a;
|
|
136
|
+
if ((t = super.updated) === null || t === void 0 || t.call(this), this.counterMode !== this._prevCounterMode) {
|
|
137
|
+
const i = this._textarea;
|
|
138
|
+
i && (this.counterMode === "character" ? i.setAttribute("maxlength", String(this.maxCount)) : i.removeAttribute("maxlength")), this._prevCounterMode = this.counterMode;
|
|
139
|
+
}
|
|
140
|
+
const s = (a = this.shadowRoot) === null || a === void 0 ? void 0 : a.querySelector(`.${e}--text-area__wrapper`);
|
|
141
|
+
s && (this._resizeObserver = new ResizeObserver(() => {
|
|
142
|
+
this._measureWrapper();
|
|
143
|
+
}), this._resizeObserver.observe(s));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Measures the width of the wrapper and applies that to the max-width of the
|
|
147
|
+
* helper-text and invalid/warn-text
|
|
148
|
+
*/
|
|
149
|
+
_measureWrapper() {
|
|
150
|
+
var t, a, s;
|
|
151
|
+
const i = (t = this.shadowRoot) === null || t === void 0 ? void 0 : t.querySelector(`.${e}--text-area__wrapper`), p = i?.scrollWidth, n = (a = this.shadowRoot) === null || a === void 0 ? void 0 : a.querySelector(`.${e}--form__helper-text`), m = (s = this.shadowRoot) === null || s === void 0 ? void 0 : s.querySelector(`.${e}--form-requirement`);
|
|
152
|
+
[n, m].forEach((c) => {
|
|
153
|
+
c && (c.style.maxWidth = `${p}px`, c.style.overflowWrap = "break-word");
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
var t, a;
|
|
158
|
+
(t = super.disconnectedCallback) === null || t === void 0 || t.call(this), (a = this._resizeObserver) === null || a === void 0 || a.disconnect();
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
r.shadowRootOptions = Object.assign(Object.assign({}, f.shadowRootOptions), { delegatesFocus: !0 });
|
|
162
|
+
r.styles = _;
|
|
163
|
+
d([
|
|
164
|
+
o({ type: Number })
|
|
165
|
+
], r.prototype, "cols", void 0);
|
|
166
|
+
d([
|
|
167
|
+
o({
|
|
168
|
+
type: String,
|
|
169
|
+
reflect: !0,
|
|
170
|
+
hasChanged(l, t) {
|
|
171
|
+
return (l === "character" || l === "word") && l !== t;
|
|
172
|
+
},
|
|
173
|
+
attribute: "counter-mode"
|
|
174
|
+
})
|
|
175
|
+
], r.prototype, "counterMode", void 0);
|
|
176
|
+
d([
|
|
177
|
+
o()
|
|
178
|
+
], r.prototype, "id", void 0);
|
|
179
|
+
d([
|
|
180
|
+
o()
|
|
181
|
+
], r.prototype, "pattern", void 0);
|
|
182
|
+
d([
|
|
183
|
+
o({ type: Boolean, reflect: !0 })
|
|
184
|
+
], r.prototype, "required", void 0);
|
|
185
|
+
d([
|
|
186
|
+
o()
|
|
187
|
+
], r.prototype, "rows", void 0);
|
|
188
|
+
d([
|
|
189
|
+
F("textarea")
|
|
190
|
+
], r.prototype, "_textarea", void 0);
|
|
191
|
+
r = d([
|
|
192
|
+
b(`${e}-textarea`)
|
|
193
|
+
], r);
|
|
194
|
+
let g = class extends f {
|
|
195
|
+
render() {
|
|
196
|
+
return v`
|
|
197
|
+
<span class="${e}--label ${e}--skeleton"></span>
|
|
198
|
+
<div class="${e}--skeleton ${e}--text-area"></div>
|
|
199
|
+
`;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
g.styles = _;
|
|
203
|
+
g = d([
|
|
204
|
+
b(`${e}-textarea-skeleton`)
|
|
205
|
+
], g);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./tslib.es6-B07k2eac.js"),c=require("./settings-CK2vhfPu.js"),p=require("./property-DCYiZTFF.js"),g=require("./carbon-element-CbfPUYRT.js");var m=c.i$1([".cds--stack-horizontal,:host(cds-stack[orientation=horizontal]) div{-moz-column-gap:var(--cds-stack-gap,0);column-gap:var(--cds-stack-gap,0);display:inline-grid;grid-auto-flow:column}.cds--stack-vertical,:host(cds-stack[orientation=vertical]) div{display:grid;grid-auto-flow:row;row-gap:var(--cds-stack-gap,0)}.cds--stack-scale-1{--cds-stack-gap:0.125rem}.cds--stack-scale-2{--cds-stack-gap:0.25rem}.cds--stack-scale-3{--cds-stack-gap:0.5rem}.cds--stack-scale-4{--cds-stack-gap:0.75rem}.cds--stack-scale-5{--cds-stack-gap:1rem}.cds--stack-scale-6{--cds-stack-gap:1.5rem}.cds--stack-scale-7{--cds-stack-gap:2rem}.cds--stack-scale-8{--cds-stack-gap:2.5rem}.cds--stack-scale-9{--cds-stack-gap:3rem}.cds--stack-scale-10{--cds-stack-gap:4rem}.cds--stack-scale-11{--cds-stack-gap:5rem}.cds--stack-scale-12{--cds-stack-gap:6rem}.cds--stack-scale-13{--cds-stack-gap:10rem}:host(cds-stack) .cds--stack-scale-1{--cds-stack-gap:0.125rem}:host(cds-stack) .cds--stack-scale-2{--cds-stack-gap:0.25rem}:host(cds-stack) .cds--stack-scale-3{--cds-stack-gap:0.5rem}:host(cds-stack) .cds--stack-scale-4{--cds-stack-gap:0.75rem}:host(cds-stack) .cds--stack-scale-5{--cds-stack-gap:1rem}:host(cds-stack) .cds--stack-scale-6{--cds-stack-gap:1.5rem}:host(cds-stack) .cds--stack-scale-7{--cds-stack-gap:2rem}:host(cds-stack) .cds--stack-scale-8{--cds-stack-gap:2.5rem}:host(cds-stack) .cds--stack-scale-9{--cds-stack-gap:3rem}:host(cds-stack) .cds--stack-scale-10{--cds-stack-gap:4rem}:host(cds-stack) .cds--stack-scale-11{--cds-stack-gap:5rem}:host(cds-stack) .cds--stack-scale-12{--cds-stack-gap:6rem}:host(cds-stack) .cds--stack-scale-13{--cds-stack-gap:10rem}"]),v=16;function u(a){return"".concat(a/v,"rem")}var h=8;function s(a){return u(h*a)}var y=s(.25),f=s(.5),_=s(1),S=s(1.5),C=s(2),$=s(3),b=s(4),q=s(5),w=s(6),x=s(8),V=s(10),z=s(12),A=s(20),E=[y,f,_,S,C,$,b,q,w,x,V,z,A],l;(function(a){a.VERTICAL="vertical",a.HORIZONTAL="horizontal"})(l||(l={}));const G=Array.from({length:E.length-1}).map((a,e)=>e+1);let t=class extends c.i{constructor(){super(...arguments),this.orientation=l.VERTICAL,this.useCustomGapValue=!1}updated(e){var d,o,i,k;if(e.has("gap"))if(this.useCustomGapValue)this.style.setProperty(`--${c.prefix}-stack-gap`,`${this.gap}`);else{const n=e.get("gap");(o=(d=this.shadowRoot)===null||d===void 0?void 0:d.querySelector("div"))===null||o===void 0||o.classList.remove(`${c.prefix}--stack-scale-${n}`),(k=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelector("div"))===null||k===void 0||k.classList.add(`${c.prefix}--stack-scale-${this.gap}`)}}render(){return c.x`<div><slot></slot></div>`}};t.styles=m;r.__decorate([p.n({type:String,reflect:!0})],t.prototype,"orientation",void 0);r.__decorate([p.n({type:G||String,reflect:!0})],t.prototype,"gap",void 0);r.__decorate([p.n({type:Boolean,attribute:"use-custom-gap-value"})],t.prototype,"useCustomGapValue",void 0);t=r.__decorate([g.carbonElement(`${c.prefix}-stack`)],t);
|