@ds-autonomie/web-components 1.22.2 → 1.23.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/CHANGELOG.md +24 -0
- package/dist/chunks/{chunk.BPEI35FP.js → chunk.2JIPPL3I.js} +1 -1
- package/dist/chunks/{chunk.5X4QTZAP.js → chunk.2LWUWDHO.js} +5 -2
- package/dist/chunks/{chunk.KCJKFLMI.js → chunk.2TQJGNLG.js} +1 -1
- package/dist/chunks/{chunk.4CA7E26P.js → chunk.33HY22NK.js} +77 -189
- package/dist/chunks/{chunk.7KYHO6CO.js → chunk.35CKPBLE.js} +1 -1
- package/dist/chunks/{chunk.BUDRSMFF.js → chunk.3EZTOQNV.js} +2 -2
- package/dist/chunks/{chunk.FPXW7ZMC.js → chunk.3KY7QTZE.js} +13 -5
- package/dist/chunks/{chunk.YXVKJQFH.js → chunk.3PHQ4BLH.js} +4 -1
- package/dist/chunks/{chunk.PQR2GAOE.js → chunk.3XIJ443Y.js} +1 -1
- package/dist/chunks/{chunk.YQX6XBXO.js → chunk.43G4V4JA.js} +7 -6
- package/dist/chunks/{chunk.DMX6VF2L.js → chunk.47JHZBMB.js} +1 -1
- package/dist/chunks/{chunk.GAC47LAL.js → chunk.4P45LB2J.js} +6 -4
- package/dist/chunks/{chunk.5MBTOZ4X.js → chunk.4ZYXTXB5.js} +6 -2
- package/dist/chunks/{chunk.GBFSCUF6.js → chunk.52QZ25CM.js} +5 -5
- package/dist/chunks/{chunk.M3FN3PFT.js → chunk.5OBDCB7I.js} +1 -1
- package/dist/chunks/{chunk.5DJID6VS.js → chunk.5RR67NIN.js} +1 -1
- package/dist/chunks/{chunk.TOWCNBTG.js → chunk.5SPPXRRA.js} +1 -1
- package/dist/chunks/{chunk.HRKZRSEX.js → chunk.5W2ADPTV.js} +1 -1
- package/dist/chunks/{chunk.GUSO7ZX7.js → chunk.66WACVGP.js} +1 -1
- package/dist/chunks/{chunk.FCXJCZEG.js → chunk.6AMOVQMF.js} +3 -3
- package/dist/chunks/{chunk.FUDAY7X2.js → chunk.6QHJJ6HQ.js} +1 -1
- package/dist/chunks/{chunk.EEKMHAZ5.js → chunk.7CXSHK4V.js} +6 -2
- package/dist/chunks/{chunk.NZSU3FNO.js → chunk.7NKRGNGW.js} +22 -6
- package/dist/chunks/{chunk.6YV75XW5.js → chunk.AF3ZNLUV.js} +3 -2
- package/dist/chunks/{chunk.F4QJBOMR.js → chunk.AYYW4GA7.js} +88 -197
- package/dist/chunks/{chunk.YGFOBU5R.js → chunk.BLOOH4O7.js} +2 -2
- package/dist/chunks/{chunk.QUB3Z4YN.js → chunk.BSUMGQ4B.js} +1 -1
- package/dist/chunks/{chunk.RC7QZSCE.js → chunk.CABS34UZ.js} +3 -3
- package/dist/chunks/{chunk.A5FZ3ZP6.js → chunk.COCN62Q7.js} +116 -231
- package/dist/chunks/{chunk.ZBZTILB6.js → chunk.CQHOJJEI.js} +1 -1
- package/dist/chunks/{chunk.4MDEHTR2.js → chunk.DC7PUODY.js} +2 -2
- package/dist/chunks/{chunk.2YCECXQ4.js → chunk.DDBVITXE.js} +2 -2
- package/dist/chunks/{chunk.XOAAGTHU.js → chunk.DE4CISVH.js} +1 -1
- package/dist/chunks/{chunk.75JDBBOQ.js → chunk.DKPTGNVN.js} +4 -3
- package/dist/chunks/{chunk.OOD25N36.js → chunk.E7D46GR5.js} +3 -2
- package/dist/chunks/{chunk.BTIJON33.js → chunk.EEGNWUXW.js} +4 -3
- package/dist/chunks/{chunk.DKATFHVQ.js → chunk.EG62SZ5F.js} +2 -1
- package/dist/chunks/{chunk.46QRHHLQ.js → chunk.ELSWDQF7.js} +124 -246
- package/dist/chunks/{chunk.YTRQPTZ3.js → chunk.EP7LLKJN.js} +1 -1
- package/dist/chunks/{chunk.PIL5B5ND.js → chunk.FAWAATV6.js} +2 -2
- package/dist/chunks/chunk.FJI3P5RX.js +158 -0
- package/dist/chunks/{chunk.42I2CPKY.js → chunk.FQMS24GI.js} +1 -1
- package/dist/chunks/{chunk.QBK6A3R2.js → chunk.GDOUDNZH.js} +1 -1
- package/dist/chunks/{chunk.5NEMV7VX.js → chunk.GN5K7Y37.js} +22 -5
- package/dist/chunks/{chunk.LKXJNHSQ.js → chunk.GNPJFQU2.js} +1 -1
- package/dist/chunks/{chunk.YAXCH4J7.js → chunk.HBUDYFQQ.js} +2 -2
- package/dist/chunks/{chunk.BETV66IR.js → chunk.HKVZJ7FV.js} +5 -5
- package/dist/chunks/{chunk.4JK743ZT.js → chunk.IPPHRX7W.js} +3 -1
- package/dist/chunks/{chunk.GM4DVAZJ.js → chunk.IPUOJRFA.js} +1 -1
- package/dist/chunks/{chunk.HR3WCXZI.js → chunk.IXDXQH27.js} +3 -1
- package/dist/chunks/{chunk.E3B2D5KE.js → chunk.IZBHR7GP.js} +0 -1
- package/dist/chunks/{chunk.4QQ5B4IL.js → chunk.JLVXPL5R.js} +1 -1
- package/dist/chunks/{chunk.AO6LCWR7.js → chunk.JUFWKPKA.js} +1 -1
- package/dist/chunks/{chunk.HOATJHQQ.js → chunk.KADIEJEA.js} +17 -1
- package/dist/chunks/{chunk.PGUC3I5F.js → chunk.KDQ7QGKG.js} +50 -168
- package/dist/chunks/{chunk.SMB4Q2LK.js → chunk.L64R3324.js} +1 -1
- package/dist/chunks/{chunk.GL4GU5DO.js → chunk.MJ3ZLDHO.js} +1 -1
- package/dist/chunks/{chunk.SDJYJZWB.js → chunk.MOXUFEWV.js} +80 -201
- package/dist/chunks/{chunk.KSSPTHJA.js → chunk.NILDQYHY.js} +2 -2
- package/dist/chunks/{chunk.W45NKAQM.js → chunk.NVCV74RN.js} +154 -275
- package/dist/chunks/{chunk.MKM7ZZA3.js → chunk.O52CMQXZ.js} +10 -23
- package/dist/chunks/{chunk.Q62BRBYD.js → chunk.PVNTVHSM.js} +4 -1
- package/dist/chunks/{chunk.EOWQAIDU.js → chunk.QDKQMUIQ.js} +4 -11
- package/dist/chunks/{chunk.XJU66OLS.js → chunk.QDMCHM32.js} +2 -2
- package/dist/chunks/{chunk.75SMDXL6.js → chunk.QPVOW5Y7.js} +1 -1
- package/dist/chunks/chunk.QTUCYPM5.js +61 -0
- package/dist/chunks/{chunk.WUZDHRQQ.js → chunk.QZ743FPY.js} +2 -2
- package/dist/chunks/{chunk.D6LJAMJM.js → chunk.RJQHPU3G.js} +10 -4
- package/dist/chunks/{chunk.BYTDEMP3.js → chunk.RPQWUBXM.js} +5 -3
- package/dist/chunks/{chunk.YKMMYGAJ.js → chunk.RS4JPM7N.js} +1 -1
- package/dist/chunks/{chunk.RKHCGLX6.js → chunk.RS7HNQVM.js} +3 -1
- package/dist/chunks/{chunk.SYXHGIMC.js → chunk.RWGL6D5U.js} +1 -1
- package/dist/chunks/{chunk.36WWRNIP.js → chunk.SHETMEY4.js} +3 -2
- package/dist/chunks/{chunk.HQKKL7C7.js → chunk.SJBAMGV4.js} +8 -2
- package/dist/chunks/chunk.SPSOTQ3Q.js +268 -0
- package/dist/chunks/{chunk.UPDUFREI.js → chunk.SX2NHC2D.js} +2 -1
- package/dist/chunks/{chunk.PSAB4UIG.js → chunk.SXCNBPZV.js} +5 -1
- package/dist/chunks/{chunk.5KFYZRQZ.js → chunk.TB3WT3D4.js} +2 -39
- package/dist/chunks/{chunk.LE6KR6YZ.js → chunk.TRPN2KWP.js} +28 -4
- package/dist/chunks/{chunk.O2PIWM25.js → chunk.UCR5H4HY.js} +3 -3
- package/dist/chunks/chunk.UTM2OEQ6.js +40 -0
- package/dist/chunks/{chunk.MAFEZZTX.js → chunk.UZEXRPNC.js} +2 -1
- package/dist/chunks/{chunk.L4BDK6WG.js → chunk.VBCRFPTQ.js} +6 -2
- package/dist/chunks/{chunk.LWJY5VKB.js → chunk.VMJ6DIIE.js} +6 -2
- package/dist/chunks/{chunk.KCKFUT7W.js → chunk.VNFFOE7Z.js} +2 -1
- package/dist/chunks/{chunk.KVWD6T4L.js → chunk.VOOE2BQV.js} +1 -1
- package/dist/chunks/{chunk.OMS37ACU.js → chunk.VT3IWNRD.js} +1 -1
- package/dist/chunks/{chunk.SG6IR57O.js → chunk.W635ZS25.js} +1 -1
- package/dist/chunks/{chunk.3KCZS7CR.js → chunk.WFXH625U.js} +1 -1
- package/dist/chunks/chunk.WOZTYBTC.js +38 -0
- package/dist/chunks/{chunk.CPXD6UYZ.js → chunk.WQQM4ALY.js} +5 -1
- package/dist/chunks/{chunk.5DAITYVK.js → chunk.XCRMRJG6.js} +3 -2
- package/dist/chunks/{chunk.OEYZ3CTB.js → chunk.XTFOV6IO.js} +10 -4
- package/dist/chunks/{chunk.7YZDEXJY.js → chunk.Y4AZARNM.js} +13 -5
- package/dist/chunks/{chunk.FN3YT4DB.js → chunk.Y7CSNRKE.js} +1 -1
- package/dist/chunks/{chunk.DA6UU6UL.js → chunk.YIY5RM53.js} +0 -17
- package/dist/chunks/{chunk.IE34DJRP.js → chunk.YPDQVYQD.js} +1 -1
- package/dist/chunks/{chunk.POBERW54.js → chunk.ZJSZJA26.js} +2 -1
- package/dist/components/accordion/accordion.js +6 -6
- package/dist/components/alert/alert.js +7 -7
- package/dist/components/avatar/avatar.js +5 -5
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +6 -6
- package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
- package/dist/components/button/button.d.ts +5 -0
- package/dist/components/button/button.js +9 -9
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/calendar/calendar.js +2 -2
- package/dist/components/callout/callout.js +5 -5
- package/dist/components/card/card.js +2 -2
- package/dist/components/checkbox/checkbox.js +10 -10
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/checkbox-button/checkbox-button.d.ts +4 -34
- package/dist/components/checkbox-button/checkbox-button.js +7 -8
- package/dist/components/checkbox-group/checkbox-group.js +6 -6
- package/dist/components/checkbox-group/checkbox-group.styles.js +2 -2
- package/dist/components/combobox/combobox.d.ts +3 -36
- package/dist/components/combobox/combobox.js +15 -14
- package/dist/components/combobox/combobox.styles.js +2 -2
- package/dist/components/dialog/dialog.js +8 -8
- package/dist/components/download-card/download-card.d.ts +2 -0
- package/dist/components/download-card/download-card.js +5 -5
- package/dist/components/download-link/download-link.d.ts +2 -0
- package/dist/components/download-link/download-link.js +5 -5
- package/dist/components/drawer/drawer.js +8 -8
- package/dist/components/dropdown/dropdown.js +2 -2
- package/dist/components/error-message-panel/error-message-panel.js +3 -3
- package/dist/components/error-text/error-text.js +1 -1
- package/dist/components/error-text/error-text.utils.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +3 -1
- package/dist/components/file-upload/file-upload.js +6 -6
- package/dist/components/file-upload/file-upload.styles.js +2 -2
- package/dist/components/file-upload-item/file-upload-item.js +3 -3
- package/dist/components/filter/filter-base/filter-base.js +3 -3
- package/dist/components/filter/filter-button/filter-button.js +8 -8
- package/dist/components/filter/filter-counter/filter-counter.js +4 -4
- package/dist/components/filter/filter-date/filter-date.js +12 -12
- package/dist/components/filter/filter-range/filter-range.js +21 -20
- package/dist/components/filter/filter-select/filter-select.js +19 -18
- package/dist/components/footer/footer.js +3 -3
- package/dist/components/footer-content-block/footer-content-block.js +2 -2
- package/dist/components/footer-mandatory-mentions/footer-mandatory-mentions.js +2 -2
- package/dist/components/footer-sitemap/footer-sitemap.js +2 -2
- package/dist/components/format-bytes/format-bytes.js +2 -2
- package/dist/components/format-date/format-date.js +2 -2
- package/dist/components/format-number/format-number.js +2 -2
- package/dist/components/header/header.js +4 -4
- package/dist/components/header-search/header-search.js +2 -2
- package/dist/components/icon/icon.js +4 -4
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.d.ts +5 -0
- package/dist/components/icon-button/icon-button.js +5 -5
- package/dist/components/input/input.d.ts +4 -35
- package/dist/components/input/input.js +16 -15
- package/dist/components/input/input.styles.js +2 -2
- package/dist/components/input-date/input-date.d.ts +3 -36
- package/dist/components/input-date/input-date.js +15 -14
- package/dist/components/input-date/input-date.styles.js +3 -3
- package/dist/components/input-mask/input-mask.d.ts +3 -37
- package/dist/components/input-mask/input-mask.js +8 -7
- package/dist/components/input-mask/input-mask.styles.js +2 -2
- package/dist/components/input-phone/input-phone.d.ts +3 -33
- package/dist/components/input-phone/input-phone.js +22 -21
- package/dist/components/input-phone/input-phone.styles.js +2 -2
- package/dist/components/menu-accordion/menu-accordion.js +6 -6
- package/dist/components/menu-item/menu-item.js +6 -6
- package/dist/components/navbar/navbar-link/navbar-link.js +4 -4
- package/dist/components/navbar/navbar-menu/navbar-menu.js +7 -7
- package/dist/components/option/option.js +6 -6
- package/dist/components/pagination/pagination.js +20 -19
- package/dist/components/pagination-button/pagination-button.js +4 -4
- package/dist/components/pagination-button/pagination-button.styles.js +2 -2
- package/dist/components/profile-button/profile-button.js +9 -9
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/quote/quote.js +5 -5
- package/dist/components/radio/radio.js +6 -6
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/radio-button/radio-button.d.ts +4 -32
- package/dist/components/radio-button/radio-button.js +17 -9
- package/dist/components/radio-group/radio-group.js +6 -6
- package/dist/components/radio-group/radio-group.styles.js +2 -2
- package/dist/components/relative-time/relative-time.js +2 -2
- package/dist/components/select/select.d.ts +3 -35
- package/dist/components/select/select.js +14 -13
- package/dist/components/select/select.styles.js +2 -2
- package/dist/components/skip-links/skip-links.js +2 -2
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/split-panel/split-panel.js +6 -6
- package/dist/components/step/step.d.ts +1 -0
- package/dist/components/step/step.js +7 -7
- package/dist/components/tab/tab.d.ts +0 -6
- package/dist/components/tab/tab.js +3 -4
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tab-group/tab-group.js +2 -2
- package/dist/components/table/table-action/table-action.js +2 -2
- package/dist/components/table/table-caption/table-caption.js +3 -3
- package/dist/components/table/table-header-cell/table-header-cell.js +2 -2
- package/dist/components/table/table-header-row/table-header-row.js +3 -3
- package/dist/components/table/table-row/table-row.js +2 -2
- package/dist/components/table-container/table-container.js +2 -2
- package/dist/components/table-of-contents/table-of-contents.js +1 -1
- package/dist/components/tag/tag.js +7 -7
- package/dist/components/textarea/textarea.d.ts +6 -37
- package/dist/components/textarea/textarea.js +7 -6
- package/dist/components/textarea/textarea.styles.js +2 -2
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/components/tree/tree.js +14 -14
- package/dist/components/tree-item/tree-item.js +13 -13
- package/dist/custom-elements.json +259 -2206
- package/dist/design-system.js +145 -145
- package/dist/internal/components/form-control/form-control-layout.d.ts +41 -0
- package/dist/internal/components/form-control/form-control-layout.js +166 -0
- package/dist/internal/components/form-toggle-button/form-toggle-button-stories.d.ts +86 -0
- package/dist/internal/components/form-toggle-button/form-toggle-button-stories.js +62 -0
- package/dist/internal/components/form-toggle-button/form-toggle-button.d.ts +32 -0
- package/dist/internal/components/form-toggle-button/form-toggle-button.js +129 -0
- package/dist/{chunks/chunk.LP7HSAS3.js → internal/components/form-toggle-button/form-toggle-button.styles.js} +30 -24
- package/dist/styles/form-control.styles.js +4 -11
- package/dist/themes/dsa-wc-theme.css +8 -4
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +8 -4
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/localize.d.ts +1 -1
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +43 -537
- package/dist/web-types.json +212 -1578
- package/package.json +1 -1
- package/dist/chunks/chunk.EJ4VOCOO.js +0 -150
- package/dist/chunks/chunk.M4JDLOFR.js +0 -167
- package/dist/chunks/chunk.PCO6EOKB.js +0 -156
- package/dist/chunks/chunk.RB6TMBWW.js +0 -127
- package/dist/components/checkbox-button/checkbox-button.styles.js +0 -9
- package/dist/components/radio-button/radio-button.styles.d.ts +0 -2
- package/dist/components/radio-button/radio-button.styles.js +0 -9
- /package/dist/{components/checkbox-button/checkbox-button.styles.d.ts → internal/components/form-toggle-button/form-toggle-button.styles.d.ts} +0 -0
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
textarea_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.IPUOJRFA.js";
|
|
4
|
+
import {
|
|
5
|
+
FormControlLayout
|
|
6
|
+
} from "./chunk.FJI3P5RX.js";
|
|
4
7
|
import {
|
|
5
8
|
defaultValue
|
|
6
9
|
} from "./chunk.CMJ2SRTL.js";
|
|
7
|
-
import {
|
|
8
|
-
renderFormElementErrors
|
|
9
|
-
} from "./chunk.E3B2D5KE.js";
|
|
10
10
|
import {
|
|
11
11
|
FormControlController
|
|
12
12
|
} from "./chunk.KIFBWPW5.js";
|
|
13
|
-
import {
|
|
14
|
-
HasSlotController
|
|
15
|
-
} from "./chunk.DA6UU6UL.js";
|
|
16
13
|
import {
|
|
17
14
|
watch
|
|
18
15
|
} from "./chunk.6IH66JBY.js";
|
|
19
16
|
import {
|
|
20
17
|
ifDefinedAndNotEmpty
|
|
21
18
|
} from "./chunk.ZQJVCRB2.js";
|
|
22
|
-
import {
|
|
23
|
-
ShoelaceElement
|
|
24
|
-
} from "./chunk.YCXTCVAZ.js";
|
|
25
19
|
import {
|
|
26
20
|
__decorateClass
|
|
27
21
|
} from "./chunk.6M63UXML.js";
|
|
@@ -32,37 +26,19 @@ import { customElement, property, query, state } from "lit/decorators.js";
|
|
|
32
26
|
import { classMap } from "lit/directives/class-map.js";
|
|
33
27
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
34
28
|
import { live } from "lit/directives/live.js";
|
|
35
|
-
var DSATextarea = class extends
|
|
29
|
+
var DSATextarea = class extends FormControlLayout {
|
|
36
30
|
constructor() {
|
|
37
31
|
super(...arguments);
|
|
38
32
|
this.formControlController = new FormControlController(this, {
|
|
39
33
|
assumeInteractionOn: ["dsa-blur", "dsa-input"]
|
|
40
34
|
});
|
|
41
|
-
this.hasSlotController = new HasSlotController(
|
|
42
|
-
this,
|
|
43
|
-
"help-text",
|
|
44
|
-
"label"
|
|
45
|
-
);
|
|
46
35
|
this.hasFocus = false;
|
|
47
|
-
this.title = "";
|
|
48
|
-
this.name = "";
|
|
49
36
|
this.value = "";
|
|
50
|
-
this.
|
|
51
|
-
this.variant = "base";
|
|
52
|
-
this.error = false;
|
|
53
|
-
this.errorMessage = "";
|
|
54
|
-
this.label = "";
|
|
55
|
-
this.helpText = "";
|
|
56
|
-
this.placeholder = "";
|
|
37
|
+
this.defaultValue = "";
|
|
57
38
|
this.rows = 4;
|
|
58
39
|
this.resize = "vertical";
|
|
59
|
-
this.disabled = false;
|
|
60
|
-
this.readonly = false;
|
|
61
|
-
this.form = "";
|
|
62
|
-
this.required = false;
|
|
63
40
|
this.counter = false;
|
|
64
41
|
this.spellcheck = true;
|
|
65
|
-
this.defaultValue = "";
|
|
66
42
|
}
|
|
67
43
|
/** Gets the validity state object */
|
|
68
44
|
get validity() {
|
|
@@ -199,45 +175,13 @@ var DSATextarea = class extends ShoelaceElement {
|
|
|
199
175
|
this.input.setCustomValidity(message);
|
|
200
176
|
this.formControlController.updateValidity();
|
|
201
177
|
}
|
|
202
|
-
|
|
178
|
+
renderInput() {
|
|
203
179
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
204
|
-
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
205
180
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
206
|
-
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
207
|
-
const counterText = this.maxlength && this.counter ? `${this.value.length}/${this.maxlength}` : void 0;
|
|
208
181
|
return html`
|
|
209
182
|
<div
|
|
210
|
-
part="
|
|
183
|
+
part="base"
|
|
211
184
|
class=${classMap({
|
|
212
|
-
"form-control": true,
|
|
213
|
-
"form-control--small": this.size === "small",
|
|
214
|
-
"form-control--medium": this.size === "medium",
|
|
215
|
-
"form-control--large": this.size === "large",
|
|
216
|
-
"form-control--disabled": this.disabled,
|
|
217
|
-
"form-control--has-label": hasLabel,
|
|
218
|
-
"form-control--has-help-text": hasHelpText,
|
|
219
|
-
"form-control--error": this.error,
|
|
220
|
-
"form-control--has-counter": counterText !== void 0
|
|
221
|
-
})}
|
|
222
|
-
>
|
|
223
|
-
<label
|
|
224
|
-
part="form-control-label"
|
|
225
|
-
class="form-control__label"
|
|
226
|
-
for="input"
|
|
227
|
-
aria-hidden=${hasLabel ? "false" : "true"}
|
|
228
|
-
>
|
|
229
|
-
${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
|
|
230
|
-
<slot name="label">${this.label}</slot>
|
|
231
|
-
</label>
|
|
232
|
-
<slot name="tooltip" class="form-control__tooltip"></slot>
|
|
233
|
-
|
|
234
|
-
<div
|
|
235
|
-
part="form-control-input"
|
|
236
|
-
class="form-control-input form-control__field"
|
|
237
|
-
>
|
|
238
|
-
<div
|
|
239
|
-
part="base"
|
|
240
|
-
class=${classMap({
|
|
241
185
|
textarea: true,
|
|
242
186
|
"textarea--small": this.size === "small",
|
|
243
187
|
"textarea--medium": this.size === "medium",
|
|
@@ -253,60 +197,49 @@ var DSATextarea = class extends ShoelaceElement {
|
|
|
253
197
|
"textarea--resize-vertical": this.resize === "vertical",
|
|
254
198
|
"textarea--resize-auto": this.resize === "auto"
|
|
255
199
|
})}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
class="form-control__help-text"
|
|
295
|
-
aria-hidden=${hasHelpText ? "false" : "true"}
|
|
296
|
-
>
|
|
297
|
-
${this.helpText}
|
|
298
|
-
</slot>
|
|
299
|
-
${counterText !== void 0 ? html`<span
|
|
300
|
-
id="counter"
|
|
301
|
-
class=${classMap({
|
|
200
|
+
>
|
|
201
|
+
<textarea
|
|
202
|
+
part="textarea"
|
|
203
|
+
id="input"
|
|
204
|
+
class="textarea__control"
|
|
205
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
206
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
207
|
+
.value=${live(this.value)}
|
|
208
|
+
?disabled=${this.disabled}
|
|
209
|
+
?readonly=${this.readonly}
|
|
210
|
+
?required=${this.required}
|
|
211
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
212
|
+
rows=${ifDefined(this.rows)}
|
|
213
|
+
minlength=${ifDefined(this.minlength)}
|
|
214
|
+
maxlength=${ifDefined(this.maxlength)}
|
|
215
|
+
autocapitalize=${ifDefined(this.autocapitalize)}
|
|
216
|
+
autocorrect=${ifDefined(this.autocorrect)}
|
|
217
|
+
?autofocus=${this.autofocus}
|
|
218
|
+
spellcheck=${ifDefined(this.spellcheck)}
|
|
219
|
+
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
220
|
+
inputmode=${ifDefined(this.inputmode)}
|
|
221
|
+
aria-describedby=${this.getDescriptionIds()}
|
|
222
|
+
aria-label=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
223
|
+
aria-invalid=${ifDefined(this.error ? "true" : void 0)}
|
|
224
|
+
@change=${this.handleChange}
|
|
225
|
+
@input=${this.handleInput}
|
|
226
|
+
@invalid=${this.handleInvalid}
|
|
227
|
+
@focus=${this.handleFocus}
|
|
228
|
+
@blur=${this.handleBlur}
|
|
229
|
+
></textarea>
|
|
230
|
+
</div>
|
|
231
|
+
`;
|
|
232
|
+
}
|
|
233
|
+
renderCounter() {
|
|
234
|
+
const counterText = this.maxlength && this.counter ? `${this.value.length}/${this.maxlength}` : void 0;
|
|
235
|
+
return counterText !== void 0 ? html`<span
|
|
236
|
+
id="counter"
|
|
237
|
+
class=${classMap({
|
|
302
238
|
"form-control__counter": true,
|
|
303
239
|
"form-control__counter--animated": this.value.length === this.maxlength
|
|
304
240
|
})}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
${this.error && !this.disabled ? renderFormElementErrors(this.errorMessage) : ""}
|
|
308
|
-
</div>
|
|
309
|
-
`;
|
|
241
|
+
>${counterText}</span
|
|
242
|
+
>` : html``;
|
|
310
243
|
}
|
|
311
244
|
};
|
|
312
245
|
DSATextarea.styles = textarea_styles_default;
|
|
@@ -316,66 +249,18 @@ __decorateClass([
|
|
|
316
249
|
__decorateClass([
|
|
317
250
|
state()
|
|
318
251
|
], DSATextarea.prototype, "hasFocus", 2);
|
|
319
|
-
__decorateClass([
|
|
320
|
-
property()
|
|
321
|
-
], DSATextarea.prototype, "title", 2);
|
|
322
|
-
__decorateClass([
|
|
323
|
-
property()
|
|
324
|
-
], DSATextarea.prototype, "name", 2);
|
|
325
252
|
__decorateClass([
|
|
326
253
|
property()
|
|
327
254
|
], DSATextarea.prototype, "value", 2);
|
|
328
255
|
__decorateClass([
|
|
329
|
-
|
|
330
|
-
], DSATextarea.prototype, "
|
|
331
|
-
__decorateClass([
|
|
332
|
-
property({ reflect: true })
|
|
333
|
-
], DSATextarea.prototype, "variant", 2);
|
|
334
|
-
__decorateClass([
|
|
335
|
-
property({ type: Boolean })
|
|
336
|
-
], DSATextarea.prototype, "error", 2);
|
|
337
|
-
__decorateClass([
|
|
338
|
-
property({
|
|
339
|
-
attribute: "error-message",
|
|
340
|
-
converter: {
|
|
341
|
-
fromAttribute: (value) => value ? value.split("|") : "",
|
|
342
|
-
toAttribute: (value) => {
|
|
343
|
-
if (typeof value === "string") {
|
|
344
|
-
return value;
|
|
345
|
-
} else {
|
|
346
|
-
return value.join("|");
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
})
|
|
351
|
-
], DSATextarea.prototype, "errorMessage", 2);
|
|
352
|
-
__decorateClass([
|
|
353
|
-
property()
|
|
354
|
-
], DSATextarea.prototype, "label", 2);
|
|
355
|
-
__decorateClass([
|
|
356
|
-
property({ attribute: "help-text" })
|
|
357
|
-
], DSATextarea.prototype, "helpText", 2);
|
|
358
|
-
__decorateClass([
|
|
359
|
-
property()
|
|
360
|
-
], DSATextarea.prototype, "placeholder", 2);
|
|
256
|
+
defaultValue()
|
|
257
|
+
], DSATextarea.prototype, "defaultValue", 2);
|
|
361
258
|
__decorateClass([
|
|
362
259
|
property({ type: Number })
|
|
363
260
|
], DSATextarea.prototype, "rows", 2);
|
|
364
261
|
__decorateClass([
|
|
365
262
|
property()
|
|
366
263
|
], DSATextarea.prototype, "resize", 2);
|
|
367
|
-
__decorateClass([
|
|
368
|
-
property({ type: Boolean, reflect: true })
|
|
369
|
-
], DSATextarea.prototype, "disabled", 2);
|
|
370
|
-
__decorateClass([
|
|
371
|
-
property({ type: Boolean, reflect: true })
|
|
372
|
-
], DSATextarea.prototype, "readonly", 2);
|
|
373
|
-
__decorateClass([
|
|
374
|
-
property({ reflect: true })
|
|
375
|
-
], DSATextarea.prototype, "form", 2);
|
|
376
|
-
__decorateClass([
|
|
377
|
-
property({ type: Boolean, reflect: true })
|
|
378
|
-
], DSATextarea.prototype, "required", 2);
|
|
379
264
|
__decorateClass([
|
|
380
265
|
property({ type: Number })
|
|
381
266
|
], DSATextarea.prototype, "minlength", 2);
|
|
@@ -413,9 +298,6 @@ __decorateClass([
|
|
|
413
298
|
__decorateClass([
|
|
414
299
|
property()
|
|
415
300
|
], DSATextarea.prototype, "inputmode", 2);
|
|
416
|
-
__decorateClass([
|
|
417
|
-
defaultValue()
|
|
418
|
-
], DSATextarea.prototype, "defaultValue", 2);
|
|
419
301
|
__decorateClass([
|
|
420
302
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
421
303
|
], DSATextarea.prototype, "handleDisabledChange", 1);
|