@esri/calcite-components 5.2.0-next.23 → 5.2.0-next.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{RPHF57ID.js → 22GC3RG5.js} +1 -1
- package/dist/cdn/{PE6HZSXG.js → 2LLTIUO2.js} +1 -1
- package/dist/cdn/{OKQBN2MY.js → 2RCCZVTQ.js} +1 -1
- package/dist/cdn/{VA6P67UG.js → 2WN5V5VV.js} +1 -1
- package/dist/cdn/2Y7V37OD.js +2 -0
- package/dist/cdn/{UQAL22P6.js → 37D7AZ7D.js} +1 -1
- package/dist/cdn/{N4VAVTXN.js → 3YHV4V2E.js} +1 -1
- package/dist/cdn/{W5QVWKA4.js → 4JVIOGR3.js} +1 -1
- package/dist/cdn/{5E34F2H7.js → 4TWFL7MF.js} +1 -1
- package/dist/cdn/4V5AT4ZJ.js +2 -0
- package/dist/cdn/{X2Y3U24F.js → 4VEXFJNW.js} +1 -1
- package/dist/cdn/{E7YSE7PA.js → 4XLWVEK2.js} +1 -1
- package/dist/cdn/56B4W3IX.js +2 -0
- package/dist/cdn/{QAVBQFIM.js → 5K6W25QR.js} +1 -1
- package/dist/cdn/{YURDXUY6.js → 5KEHJCHZ.js} +1 -1
- package/dist/cdn/5ZZL6VT5.js +2 -0
- package/dist/cdn/{J2WA3W5U.js → 6EUPYBJ7.js} +1 -1
- package/dist/cdn/{56DNJRTH.js → 6KMBQHVA.js} +1 -1
- package/dist/cdn/{XEKJUQX2.js → 6LJFVX4I.js} +1 -1
- package/dist/cdn/{MB2RASRM.js → 6XSZN5UI.js} +1 -1
- package/dist/cdn/{QJ4X6JEF.js → 73FYBQX2.js} +1 -1
- package/dist/cdn/{DHAK5MVE.js → 7MSJVPGW.js} +1 -1
- package/dist/cdn/{4MRGSEQH.js → 7OJ66Q4X.js} +1 -1
- package/dist/cdn/{XBNPHSQR.js → ABSKISJZ.js} +1 -1
- package/dist/cdn/{CKDOITAW.js → AKJDXNSH.js} +1 -1
- package/dist/cdn/{ZLY4AI4O.js → B55YECTU.js} +1 -1
- package/dist/cdn/B5JEWPWI.js +2 -0
- package/dist/cdn/{PXHOVMKD.js → BVZVGHBC.js} +1 -1
- package/dist/cdn/{44BCM4WD.js → C5GR7BRQ.js} +1 -1
- package/dist/cdn/{LSYCKJVH.js → CBFJM3WF.js} +1 -1
- package/dist/cdn/{XP7XYKMD.js → CBUAGE6G.js} +1 -1
- package/dist/cdn/{SSTWHVRD.js → CE4KECUJ.js} +1 -1
- package/dist/cdn/{RG2RKIDH.js → CNCYAYZV.js} +1 -1
- package/dist/cdn/{L6CCUDY4.js → CSEUL5M3.js} +1 -1
- package/dist/cdn/{2PFID3W6.js → CTYSCOBK.js} +1 -1
- package/dist/cdn/DKJI4BME.js +2 -0
- package/dist/cdn/{OCLWYV7X.js → DXKCNUEV.js} +1 -1
- package/dist/cdn/{MPUIKIV2.js → EEOXZS6M.js} +1 -1
- package/dist/cdn/EP5RWWWG.js +2 -0
- package/dist/cdn/{P2M56OT6.js → EPT63H4X.js} +1 -1
- package/dist/cdn/{JZSJTLPL.js → EQCD6SKO.js} +1 -1
- package/dist/cdn/{V4PSJEH7.js → EVWEP3U6.js} +1 -1
- package/dist/cdn/{32RBXVF4.js → F6JPKWYM.js} +1 -1
- package/dist/cdn/{GA5ZHZLZ.js → FH4FVT6N.js} +1 -1
- package/dist/cdn/{ETSNIYVJ.js → FH4NWCNH.js} +1 -1
- package/dist/cdn/{Q2XCENUN.js → FS7TGNLS.js} +1 -1
- package/dist/cdn/{5S2UFHFC.js → G7QXJNLL.js} +1 -1
- package/dist/cdn/{4YCUPVHB.js → GBPBKE62.js} +1 -1
- package/dist/cdn/GFU7D6D5.js +2 -0
- package/dist/cdn/GIZ3Q3DF.js +2 -0
- package/dist/cdn/{E3HA6ARS.js → GKGNNXHT.js} +1 -1
- package/dist/cdn/{UTFIFRAB.js → GRRE3UKT.js} +1 -1
- package/dist/cdn/{SHQXC5KI.js → GTOH3BST.js} +1 -1
- package/dist/cdn/GTUVDLDW.js +2 -0
- package/dist/cdn/GVH35AYA.js +2 -0
- package/dist/cdn/{WZS5WOVS.js → H3TOK6XZ.js} +1 -1
- package/dist/cdn/{WU7GZ3ZT.js → HHDUX7PF.js} +1 -1
- package/dist/cdn/{ZIHHVT6X.js → HIZXZAYX.js} +1 -1
- package/dist/cdn/{DMBFYRBO.js → HVUT6LOX.js} +1 -1
- package/dist/cdn/{HPCNE2D3.js → ICSW3D3J.js} +1 -1
- package/dist/cdn/{OF3NKVWJ.js → IDM3HU5C.js} +1 -1
- package/dist/cdn/{7KEQRK7M.js → IGKO7D7N.js} +1 -1
- package/dist/cdn/{GNQ7HT6N.js → IKUMXD7A.js} +1 -1
- package/dist/cdn/{DD6HKLEH.js → IPTKGSGY.js} +1 -1
- package/dist/cdn/{6AWM3III.js → J7I3EQSN.js} +1 -1
- package/dist/cdn/{EDJC2HTH.js → JA7OZCB3.js} +1 -1
- package/dist/cdn/{WI7WTRBR.js → JGRQ6CUV.js} +1 -1
- package/dist/cdn/{NCZEPH5R.js → JPKGBSWT.js} +1 -1
- package/dist/cdn/{YGCQA6I2.js → JPXIUUMZ.js} +1 -1
- package/dist/cdn/{26NLIAOY.js → JUR52VUJ.js} +1 -1
- package/dist/cdn/{ZTOH6K4N.js → K4O4I3A5.js} +1 -1
- package/dist/cdn/{3RRQA2FI.js → K5FXO3QH.js} +1 -1
- package/dist/cdn/{XKENPJIG.js → K7CNN7XW.js} +1 -1
- package/dist/cdn/{OX7WKNVG.js → KG53W6XH.js} +1 -1
- package/dist/cdn/{WEQLYKHQ.js → KPSXCXHX.js} +1 -1
- package/dist/cdn/{ZYUCFWLH.js → KUYDXE2F.js} +1 -1
- package/dist/cdn/{QDGKS7LE.js → KY5RECBD.js} +1 -1
- package/dist/cdn/{M6IGUW4G.js → KZPBMIPA.js} +1 -1
- package/dist/cdn/{MR3JPLGQ.js → L57CN7OS.js} +1 -1
- package/dist/cdn/{QR2UFQCP.js → L653U6TD.js} +1 -1
- package/dist/cdn/{V22TQ7PZ.js → L7CV2BYA.js} +1 -1
- package/dist/cdn/{PJS3MBW2.js → LJAJPLLO.js} +1 -1
- package/dist/cdn/{3TUJGRZ2.js → N3UBJVDD.js} +1 -1
- package/dist/cdn/{FWIPONLY.js → N62ZA5VU.js} +1 -1
- package/dist/cdn/{IDGW2P7Y.js → NEKKMY32.js} +1 -1
- package/dist/cdn/{OY3Z7S4F.js → OBUUDLYG.js} +1 -1
- package/dist/cdn/{YAFFQQRB.js → OI2PRXQX.js} +1 -1
- package/dist/cdn/OKWOTSY3.js +2 -0
- package/dist/cdn/{Y3K3KZ7C.js → OLLANWS4.js} +1 -1
- package/dist/cdn/{HPWZD6ES.js → OMBTETZO.js} +1 -1
- package/dist/cdn/{RV2VGY5Y.js → OMPGBFWM.js} +1 -1
- package/dist/cdn/OMYPRL6N.js +2 -0
- package/dist/cdn/{SPDOAEZW.js → OQCWMWIO.js} +1 -1
- package/dist/cdn/{MCHEB6JH.js → OQJB4DX3.js} +1 -1
- package/dist/cdn/{CKU3WVI5.js → OTEBTN57.js} +1 -1
- package/dist/cdn/{CW75VNTM.js → OTSVF2WP.js} +1 -1
- package/dist/cdn/{GQFOAB5T.js → PH74VKTL.js} +1 -1
- package/dist/cdn/{3O74FQRX.js → PRGZNHUH.js} +1 -1
- package/dist/cdn/PZPFL6PE.js +2 -0
- package/dist/cdn/{3JVMYXOC.js → QCK2MWTK.js} +1 -1
- package/dist/cdn/{C6VPC36M.js → QT3J2A2Q.js} +1 -1
- package/dist/cdn/{UINO3MUN.js → RM6HWC7A.js} +1 -1
- package/dist/cdn/SEQCBIEU.js +2 -0
- package/dist/cdn/{ATKSPCQC.js → SQT2NXTL.js} +1 -1
- package/dist/cdn/{XEDH2KRM.js → T3DRXPGG.js} +1 -1
- package/dist/cdn/{UFBPVUSS.js → T7S6WIFD.js} +1 -1
- package/dist/cdn/TDJEPWU5.js +2 -0
- package/dist/cdn/{W3EDPW5C.js → TGYKMD2U.js} +1 -1
- package/dist/cdn/{M7X4MZ4X.js → THCUZB6I.js} +1 -1
- package/dist/cdn/{TU2IDUJN.js → TIBJT3W7.js} +1 -1
- package/dist/cdn/{7XW3S3DN.js → TOGPTZKU.js} +1 -1
- package/dist/cdn/{PHZDEOBE.js → TRNEFG5H.js} +1 -1
- package/dist/cdn/TTIJIR65.js +2 -0
- package/dist/cdn/{N24IIHGN.js → U7YK4VGO.js} +1 -1
- package/dist/cdn/{VVDB4JOU.js → UCMA7O7D.js} +1 -1
- package/dist/cdn/{ASNTOIAQ.js → UHXPF3G6.js} +1 -1
- package/dist/cdn/{YQYSA6GQ.js → UJKDADQA.js} +1 -1
- package/dist/cdn/{J7OTKRVL.js → UTWBK7O2.js} +1 -1
- package/dist/cdn/{2OHOVQMB.js → UU4JZ5J7.js} +1 -1
- package/dist/cdn/UUL2RZBV.js +2 -0
- package/dist/cdn/{ADGSWGZE.js → UX7G2X3I.js} +1 -1
- package/dist/cdn/{4A4AQLXS.js → V3IQOTQA.js} +1 -1
- package/dist/cdn/{PB33ZFMH.js → VFIWF7UJ.js} +1 -1
- package/dist/cdn/VJXFPW34.js +2 -0
- package/dist/cdn/{4CTX7AWR.js → VUHZYZSW.js} +1 -1
- package/dist/cdn/{SGBGFWSI.js → VYOJ3KUJ.js} +1 -1
- package/dist/cdn/{GWNGI6C4.js → WGNMVVLL.js} +1 -1
- package/dist/cdn/{QBKW557S.js → X2UERL5J.js} +1 -1
- package/dist/cdn/{OQ7IXAQT.js → X7KIJRQX.js} +1 -1
- package/dist/cdn/{UKFONMST.js → XOOBZNX6.js} +1 -1
- package/dist/cdn/{UO7DMOAA.js → XTGEBM27.js} +1 -1
- package/dist/cdn/Y3CHBQSV.js +2 -0
- package/dist/cdn/{JEE2673Z.js → Y56HNNPM.js} +1 -1
- package/dist/cdn/{SLXOGLQG.js → YBUVMHQW.js} +1 -1
- package/dist/cdn/{W6WPGWK4.js → YCYEMH7U.js} +1 -1
- package/dist/cdn/{GYHJQTDE.js → YE7FX543.js} +1 -1
- package/dist/cdn/{7FDY66P2.js → YHY7NVSU.js} +1 -1
- package/dist/cdn/{LVCHWMHH.js → YNKMBNC7.js} +1 -1
- package/dist/cdn/{2RJOFMZ3.js → YOFWNW72.js} +1 -1
- package/dist/cdn/{Q4YMF7OQ.js → YQKI5E6J.js} +1 -1
- package/dist/cdn/{AOSWHTDQ.js → YU3LOETT.js} +1 -1
- package/dist/cdn/YVVQJVA6.js +2 -0
- package/dist/cdn/ZBKPVPD7.js +2 -0
- package/dist/cdn/{HL5J554X.js → ZTSMW2D4.js} +1 -1
- package/dist/cdn/{O2XJCEO6.js → ZXQXD2SB.js} +1 -1
- package/dist/cdn/{VNDV5V2E.js → ZXZVZLSA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/dom.js +2 -2
- package/dist/chunks/floating-ui.js +23 -13
- package/dist/chunks/label.js +1 -140
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useForm.js +1 -1
- package/dist/chunks/useLabel.js +150 -0
- package/dist/components/calcite-autocomplete/customElement.js +3 -3
- package/dist/components/calcite-button/customElement.js +3 -3
- package/dist/components/calcite-checkbox/customElement.js +3 -9
- package/dist/components/calcite-combobox/customElement.js +3 -3
- package/dist/components/calcite-inline-editable/customElement.js +3 -9
- package/dist/components/calcite-input/customElement.js +3 -3
- package/dist/components/calcite-input-date-picker/customElement.js +3 -3
- package/dist/components/calcite-input-number/customElement.js +3 -3
- package/dist/components/calcite-input-text/customElement.js +3 -6
- package/dist/components/calcite-input-time-picker/customElement.js +3 -9
- package/dist/components/calcite-input-time-zone/customElement.js +2 -9
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +3 -3
- package/dist/components/calcite-rating/customElement.js +3 -9
- package/dist/components/calcite-segmented-control/customElement.js +3 -9
- package/dist/components/calcite-select/customElement.js +3 -3
- package/dist/components/calcite-slider/customElement.js +3 -3
- package/dist/components/calcite-switch/customElement.d.ts +13 -0
- package/dist/components/calcite-switch/customElement.js +5 -10
- package/dist/components/calcite-text-area/customElement.js +3 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cdn/2JBFUIQH.js +0 -2
- package/dist/cdn/66ZAZMZH.js +0 -2
- package/dist/cdn/7NI3U4HX.js +0 -2
- package/dist/cdn/CQHOIB7Q.js +0 -2
- package/dist/cdn/DP7TXQLL.js +0 -2
- package/dist/cdn/EAYVGI7U.js +0 -2
- package/dist/cdn/EDDCKZDB.js +0 -2
- package/dist/cdn/F73XHF2M.js +0 -2
- package/dist/cdn/FPCQ5FII.js +0 -2
- package/dist/cdn/IE6SKFME.js +0 -2
- package/dist/cdn/II3HZQGY.js +0 -2
- package/dist/cdn/KLUVMIWX.js +0 -2
- package/dist/cdn/PV4J5OMF.js +0 -2
- package/dist/cdn/QB7DF7HL.js +0 -2
- package/dist/cdn/R3DCDJ4K.js +0 -2
- package/dist/cdn/RP3AR4AB.js +0 -2
- package/dist/cdn/SQIK6UYZ.js +0 -2
- package/dist/cdn/UVHXLQFS.js +0 -2
- package/dist/cdn/YDN74HYW.js +0 -2
- package/dist/cdn/Z7YWEK6A.js +0 -2
- package/dist/cdn/ZSMB7MEM.js +0 -2
|
@@ -4,7 +4,8 @@ import { css, nothing, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
8
9
|
import { d as decimalPlaces } from "../../chunks/math.js";
|
|
9
10
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
10
11
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
@@ -63,6 +64,7 @@ class InputTimePicker extends LitElement {
|
|
|
63
64
|
this.secondRef = createRef();
|
|
64
65
|
this.time = useTime(this);
|
|
65
66
|
this.interactiveContainer = useInteractive(this);
|
|
67
|
+
this.labelable = useLabel(this);
|
|
66
68
|
this.timePickerRef = createRef();
|
|
67
69
|
this.hasFocus = false;
|
|
68
70
|
this.disabled = false;
|
|
@@ -108,10 +110,6 @@ class InputTimePicker extends LitElement {
|
|
|
108
110
|
async setFocus(options) {
|
|
109
111
|
return this.focusSetter(() => this.el, options);
|
|
110
112
|
}
|
|
111
|
-
connectedCallback() {
|
|
112
|
-
super.connectedCallback();
|
|
113
|
-
connectLabel(this);
|
|
114
|
-
}
|
|
115
113
|
willUpdate(changes) {
|
|
116
114
|
if (changes.has("open") && (this.hasUpdated || this.open !== false)) {
|
|
117
115
|
this.openHandler();
|
|
@@ -138,10 +136,6 @@ class InputTimePicker extends LitElement {
|
|
|
138
136
|
}
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
|
-
disconnectedCallback() {
|
|
142
|
-
super.disconnectedCallback();
|
|
143
|
-
disconnectLabel(this);
|
|
144
|
-
}
|
|
145
139
|
blurHandler() {
|
|
146
140
|
this.changeEventHandler();
|
|
147
141
|
}
|
|
@@ -5,7 +5,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
5
5
|
import { css, nothing, html } from "lit";
|
|
6
6
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
8
|
-
import {
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
9
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
10
10
|
import { S as SLOTS$1 } from "../../chunks/resources7.js";
|
|
11
11
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
@@ -208,6 +208,7 @@ class InputTimeZone extends LitElement {
|
|
|
208
208
|
this.messages = useT9n({ blocking: true });
|
|
209
209
|
this.focusSetter = useSetFocus()(this);
|
|
210
210
|
this.interactiveContainer = useInteractive(this);
|
|
211
|
+
this.labelable = useLabel(this);
|
|
211
212
|
this.#valueUpdateContext = null;
|
|
212
213
|
this.clearable = false;
|
|
213
214
|
this.disabled = false;
|
|
@@ -250,10 +251,6 @@ class InputTimeZone extends LitElement {
|
|
|
250
251
|
async setFocus(options) {
|
|
251
252
|
return this.focusSetter(() => this.comboboxRef.value, options);
|
|
252
253
|
}
|
|
253
|
-
connectedCallback() {
|
|
254
|
-
super.connectedCallback();
|
|
255
|
-
connectLabel(this);
|
|
256
|
-
}
|
|
257
254
|
async load() {
|
|
258
255
|
this.normalizer = await getNormalizer(this.mode);
|
|
259
256
|
await this.updateTimeZoneItems();
|
|
@@ -278,10 +275,6 @@ class InputTimeZone extends LitElement {
|
|
|
278
275
|
loaded() {
|
|
279
276
|
this.openChanged();
|
|
280
277
|
}
|
|
281
|
-
disconnectedCallback() {
|
|
282
|
-
super.disconnectedCallback();
|
|
283
|
-
disconnectLabel(this);
|
|
284
|
-
}
|
|
285
278
|
async handleTimeZoneItemPropsChange() {
|
|
286
279
|
if (!this.timeZoneItems || !this.hasUpdated) {
|
|
287
280
|
return;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
|
-
import { l as labelConnectedEvent, a as associateExplicitLabelToUnlabeledComponent, b as labelDisconnectedEvent } from "../../chunks/
|
|
5
|
+
import { l as labelConnectedEvent, a as associateExplicitLabelToUnlabeledComponent, b as labelDisconnectedEvent } from "../../chunks/useLabel.js";
|
|
6
6
|
const CSS = {
|
|
7
7
|
container: "container"
|
|
8
8
|
};
|
|
@@ -5,7 +5,8 @@ import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { g as getRoundRobinIndex } from "../../chunks/array.js";
|
|
8
|
-
import {
|
|
8
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
9
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
9
10
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
10
11
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
11
12
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
@@ -23,6 +24,7 @@ class RadioButton extends LitElement {
|
|
|
23
24
|
this.formSupport = useForm({ inputType: "radio" })(this);
|
|
24
25
|
this.focusSetter = useSetFocus()(this);
|
|
25
26
|
this.interactiveContainer = useInteractive(this);
|
|
27
|
+
this.labelable = useLabel(this);
|
|
26
28
|
this.checked = false;
|
|
27
29
|
this.disabled = false;
|
|
28
30
|
this.focused = false;
|
|
@@ -62,7 +64,6 @@ class RadioButton extends LitElement {
|
|
|
62
64
|
if (this.name) {
|
|
63
65
|
this.checkLastRadioButton();
|
|
64
66
|
}
|
|
65
|
-
connectLabel(this);
|
|
66
67
|
this.updateTabIndexOfOtherRadioButtonsInGroup();
|
|
67
68
|
super.connectedCallback();
|
|
68
69
|
}
|
|
@@ -84,7 +85,6 @@ class RadioButton extends LitElement {
|
|
|
84
85
|
}
|
|
85
86
|
disconnectedCallback() {
|
|
86
87
|
super.disconnectedCallback();
|
|
87
|
-
disconnectLabel(this);
|
|
88
88
|
this.updateTabIndexOfOtherRadioButtonsInGroup();
|
|
89
89
|
}
|
|
90
90
|
checkedChanged(newChecked) {
|
|
@@ -4,7 +4,8 @@ import { live } from "lit/directives/live.js";
|
|
|
4
4
|
import { html, css } from "lit";
|
|
5
5
|
import { safeClassMap, LitElement, createEvent, stringOrBoolean, nothing, safeStyleMap } from "@arcgis/lumina";
|
|
6
6
|
import { g as guid } from "../../chunks/guid.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
8
9
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
9
10
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
10
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -45,6 +46,7 @@ class Rating extends LitElement {
|
|
|
45
46
|
this.messages = useT9n({ blocking: true });
|
|
46
47
|
this.focusSetter = useSetFocus()(this);
|
|
47
48
|
this.interactiveContainer = useInteractive(this);
|
|
49
|
+
this.labelable = useLabel(this);
|
|
48
50
|
this.disabled = false;
|
|
49
51
|
this.readOnly = false;
|
|
50
52
|
this.required = false;
|
|
@@ -80,10 +82,6 @@ class Rating extends LitElement {
|
|
|
80
82
|
async setFocus(options) {
|
|
81
83
|
return this.focusSetter(() => this.el, options);
|
|
82
84
|
}
|
|
83
|
-
connectedCallback() {
|
|
84
|
-
super.connectedCallback();
|
|
85
|
-
connectLabel(this);
|
|
86
|
-
}
|
|
87
85
|
async load() {
|
|
88
86
|
this.requestUpdate("value");
|
|
89
87
|
}
|
|
@@ -118,10 +116,6 @@ class Rating extends LitElement {
|
|
|
118
116
|
loaded() {
|
|
119
117
|
this.labelElements = Array.from(this.renderRoot.querySelectorAll("label"));
|
|
120
118
|
}
|
|
121
|
-
disconnectedCallback() {
|
|
122
|
-
super.disconnectedCallback();
|
|
123
|
-
disconnectLabel(this);
|
|
124
|
-
}
|
|
125
119
|
handleValueUpdate(newValue) {
|
|
126
120
|
this.hoverValue = newValue;
|
|
127
121
|
if (this.emit) {
|
|
@@ -4,7 +4,8 @@ import { css, isServer, nothing, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
8
9
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
9
10
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
10
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -27,6 +28,7 @@ class SegmentedControl extends LitElement {
|
|
|
27
28
|
this.messages = useT9n();
|
|
28
29
|
this.focusSetter = useSetFocus()(this);
|
|
29
30
|
this.interactiveContainer = useInteractive(this);
|
|
31
|
+
this.labelable = useLabel(this);
|
|
30
32
|
this.appearance = "solid";
|
|
31
33
|
this.disabled = false;
|
|
32
34
|
this.layout = "horizontal";
|
|
@@ -52,10 +54,6 @@ class SegmentedControl extends LitElement {
|
|
|
52
54
|
async setFocus(options) {
|
|
53
55
|
return this.focusSetter(() => this.selectedItem || this.items[0], options);
|
|
54
56
|
}
|
|
55
|
-
connectedCallback() {
|
|
56
|
-
super.connectedCallback();
|
|
57
|
-
connectLabel(this);
|
|
58
|
-
}
|
|
59
57
|
willUpdate(changes) {
|
|
60
58
|
if (changes.has("appearance") && (this.hasUpdated || this.appearance !== "solid") || changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
|
|
61
59
|
this.handleItemPropChange();
|
|
@@ -70,10 +68,6 @@ class SegmentedControl extends LitElement {
|
|
|
70
68
|
loaded() {
|
|
71
69
|
this.formSupport.overrideDefaultValue(this.value);
|
|
72
70
|
}
|
|
73
|
-
disconnectedCallback() {
|
|
74
|
-
super.disconnectedCallback();
|
|
75
|
-
disconnectLabel(this);
|
|
76
|
-
}
|
|
77
71
|
valueHandler(value) {
|
|
78
72
|
const { items } = this;
|
|
79
73
|
items.forEach((item) => item.checked = item.value === value);
|
|
@@ -4,7 +4,8 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
8
9
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
9
10
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
10
11
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
@@ -38,6 +39,7 @@ class Select extends LitElement {
|
|
|
38
39
|
this.messages = useT9n();
|
|
39
40
|
this.focusSetter = useSetFocus()(this);
|
|
40
41
|
this.interactiveContainer = useInteractive(this);
|
|
42
|
+
this.labelable = useLabel(this);
|
|
41
43
|
this.disabled = false;
|
|
42
44
|
this.required = false;
|
|
43
45
|
this.scale = "m";
|
|
@@ -66,7 +68,6 @@ class Select extends LitElement {
|
|
|
66
68
|
subtree: true,
|
|
67
69
|
childList: true
|
|
68
70
|
});
|
|
69
|
-
connectLabel(this);
|
|
70
71
|
}
|
|
71
72
|
willUpdate(changes) {
|
|
72
73
|
if (changes.has("value") && (this.hasUpdated || this.value !== null)) {
|
|
@@ -88,7 +89,6 @@ class Select extends LitElement {
|
|
|
88
89
|
disconnectedCallback() {
|
|
89
90
|
super.disconnectedCallback();
|
|
90
91
|
this.mutationObserver?.disconnect();
|
|
91
|
-
disconnectLabel(this);
|
|
92
92
|
}
|
|
93
93
|
handleInternalSelectChange() {
|
|
94
94
|
const selected = this.selectRef.value.selectedOptions[0];
|
|
@@ -9,7 +9,8 @@ import { j as isPrimaryPointerButton, z as intersects } from "../../chunks/dom.j
|
|
|
9
9
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
10
10
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
11
11
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
12
|
-
import {
|
|
12
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
13
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
13
14
|
import { n as numberStringFormatter, B as BigDecimal } from "../../chunks/locale.js";
|
|
14
15
|
import { d as decimalPlaces, c as clamp } from "../../chunks/math.js";
|
|
15
16
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -131,6 +132,7 @@ class Slider extends LitElement {
|
|
|
131
132
|
this.trackRef = createRef();
|
|
132
133
|
this.focusSetter = useSetFocus()(this);
|
|
133
134
|
this.interactiveContainer = useInteractive(this);
|
|
135
|
+
this.labelable = useLabel(this);
|
|
134
136
|
this._value = defaultValue;
|
|
135
137
|
this.activeProp = "value";
|
|
136
138
|
this.tickValues = [];
|
|
@@ -191,7 +193,6 @@ class Slider extends LitElement {
|
|
|
191
193
|
super.connectedCallback();
|
|
192
194
|
this.setMinMaxFromValue();
|
|
193
195
|
this.setValueFromMinMax();
|
|
194
|
-
connectLabel(this);
|
|
195
196
|
this.previousEmittedValue = this.value;
|
|
196
197
|
}
|
|
197
198
|
load() {
|
|
@@ -225,7 +226,6 @@ class Slider extends LitElement {
|
|
|
225
226
|
}
|
|
226
227
|
disconnectedCallback() {
|
|
227
228
|
super.disconnectedCallback();
|
|
228
|
-
disconnectLabel(this);
|
|
229
229
|
this.removeDragListeners();
|
|
230
230
|
}
|
|
231
231
|
setInitialValue() {
|
|
@@ -34,12 +34,25 @@ export abstract class Switch extends LitElement {
|
|
|
34
34
|
accessor labelTextStart: string | undefined;
|
|
35
35
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
36
36
|
accessor name: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* When `true` and the component resides in a form,
|
|
39
|
+
* the component must have a value in order for the form to submit.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
accessor required: boolean;
|
|
37
44
|
/**
|
|
38
45
|
* Specifies the component's size.
|
|
39
46
|
*
|
|
40
47
|
* @default "m"
|
|
41
48
|
*/
|
|
42
49
|
accessor scale: Scale;
|
|
50
|
+
/**
|
|
51
|
+
* The component's current validation state.
|
|
52
|
+
*
|
|
53
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
54
|
+
*/
|
|
55
|
+
get validity(): ValidityState;
|
|
43
56
|
/** The component's value. */
|
|
44
57
|
accessor value: any;
|
|
45
58
|
/**
|
|
@@ -4,7 +4,8 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
8
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
8
9
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
9
10
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
10
11
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
@@ -24,15 +25,17 @@ class Switch extends LitElement {
|
|
|
24
25
|
this.switchRef = createRef();
|
|
25
26
|
this.focusSetter = useSetFocus()(this);
|
|
26
27
|
this.interactiveContainer = useInteractive(this);
|
|
28
|
+
this.labelable = useLabel(this);
|
|
27
29
|
this.checked = false;
|
|
28
30
|
this.disabled = false;
|
|
31
|
+
this.required = false;
|
|
29
32
|
this.scale = "m";
|
|
30
33
|
this.calciteSwitchChange = createEvent({ cancelable: false });
|
|
31
34
|
this.listen("click", this.clickHandler);
|
|
32
35
|
this.listen("keydown", this.keyDownHandler);
|
|
33
36
|
}
|
|
34
37
|
static {
|
|
35
|
-
this.properties = { checked: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelTextEnd: 1, labelTextStart: 1, name: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], value: 1 };
|
|
38
|
+
this.properties = { checked: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelTextEnd: 1, labelTextStart: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
|
|
36
39
|
}
|
|
37
40
|
static {
|
|
38
41
|
this.formAssociated = true;
|
|
@@ -43,14 +46,6 @@ class Switch extends LitElement {
|
|
|
43
46
|
async setFocus(options) {
|
|
44
47
|
return this.focusSetter(() => this.switchRef.value, options);
|
|
45
48
|
}
|
|
46
|
-
connectedCallback() {
|
|
47
|
-
super.connectedCallback();
|
|
48
|
-
connectLabel(this);
|
|
49
|
-
}
|
|
50
|
-
disconnectedCallback() {
|
|
51
|
-
super.disconnectedCallback();
|
|
52
|
-
disconnectLabel(this);
|
|
53
|
-
}
|
|
54
49
|
keyDownHandler(event) {
|
|
55
50
|
if (!this.disabled && isActivationKey(event.key)) {
|
|
56
51
|
this.toggle();
|
|
@@ -6,7 +6,8 @@ import { createRef, ref } from "lit/directives/ref.js";
|
|
|
6
6
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap, nothing } from "@arcgis/lumina";
|
|
7
7
|
import { useWatchAttributes } from "@arcgis/lumina/controllers";
|
|
8
8
|
import { css, html } from "lit";
|
|
9
|
-
import {
|
|
9
|
+
import { g as getLabelText } from "../../chunks/label.js";
|
|
10
|
+
import { u as useLabel } from "../../chunks/useLabel.js";
|
|
10
11
|
import { s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
11
12
|
import { n as numberStringFormatter } from "../../chunks/locale.js";
|
|
12
13
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
@@ -79,6 +80,7 @@ class TextArea extends LitElement {
|
|
|
79
80
|
this.messages = useT9n({ blocking: true });
|
|
80
81
|
this.focusSetter = useSetFocus()(this);
|
|
81
82
|
this.interactiveContainer = useInteractive(this);
|
|
83
|
+
this.labelable = useLabel(this);
|
|
82
84
|
this.endSlotHasElements = false;
|
|
83
85
|
this.startSlotHasElements = false;
|
|
84
86
|
this.disabled = false;
|
|
@@ -113,7 +115,6 @@ class TextArea extends LitElement {
|
|
|
113
115
|
}
|
|
114
116
|
connectedCallback() {
|
|
115
117
|
super.connectedCallback();
|
|
116
|
-
connectLabel(this);
|
|
117
118
|
this.cancelable.add(this.updateSizeToAuto);
|
|
118
119
|
}
|
|
119
120
|
willUpdate(changes) {
|
|
@@ -132,7 +133,6 @@ class TextArea extends LitElement {
|
|
|
132
133
|
}
|
|
133
134
|
disconnectedCallback() {
|
|
134
135
|
super.disconnectedCallback();
|
|
135
|
-
disconnectLabel(this);
|
|
136
136
|
this.resizeObserver?.disconnect();
|
|
137
137
|
}
|
|
138
138
|
updateNumberFormatter() {
|