@esri/calcite-components 5.1.1-next.1 → 5.1.1-next.2
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/{TJLEHU6N.js → 25E6V6DD.js} +1 -1
- package/dist/cdn/{TAV73N7I.js → 25G5SA4Q.js} +1 -1
- package/dist/cdn/{SJQNZIOR.js → 2E53OHKU.js} +1 -1
- package/dist/cdn/{Q6II3XTP.js → 2NYZMRRD.js} +1 -1
- package/dist/cdn/{OVVO7HZE.js → 2SGPZ2OL.js} +1 -1
- package/dist/cdn/{CY24CXIT.js → 2ZK6DQ2U.js} +1 -1
- package/dist/cdn/{WSBBZ2YL.js → 34X7NSBK.js} +1 -1
- package/dist/cdn/{BMQJGUNC.js → 3ATY4VRY.js} +1 -1
- package/dist/cdn/{XDCKLXIM.js → 422VOMHU.js} +1 -1
- package/dist/cdn/{6HYXO4HG.js → 4WV5KYRR.js} +1 -1
- package/dist/cdn/{NTTBV4GW.js → 5FI2X47S.js} +1 -1
- package/dist/cdn/{GSJSIJRA.js → 5FRM3GVJ.js} +1 -1
- package/dist/cdn/{NQN2WSJW.js → 5HLSHKB4.js} +1 -1
- package/dist/cdn/{SYDO43IX.js → 5IMNHFTU.js} +1 -1
- package/dist/cdn/{X63FOM65.js → 63ATMMEF.js} +1 -1
- package/dist/cdn/{LGNS77KR.js → 6DJ5YPBS.js} +1 -1
- package/dist/cdn/{ED3LVXXU.js → 6KC2DOFL.js} +1 -1
- package/dist/cdn/{AAOOXSNF.js → 6LRFOBVJ.js} +1 -1
- package/dist/cdn/{HAEJDZHN.js → 6NWOOIXP.js} +1 -1
- package/dist/cdn/{EZ5445TQ.js → 6XSYXX43.js} +1 -1
- package/dist/cdn/{RGFCXTTU.js → 76KBU7AH.js} +1 -1
- package/dist/cdn/{W35T3VMC.js → 7COI7LVO.js} +1 -1
- package/dist/cdn/{Q2A6IPFA.js → 7NJ5JTBR.js} +1 -1
- package/dist/cdn/{VDAQB5YL.js → A7EJ44LC.js} +1 -1
- package/dist/cdn/{Z6QVKQ5S.js → AU3YMK5A.js} +1 -1
- package/dist/cdn/{QJXY45XK.js → B3XYD7KK.js} +1 -1
- package/dist/cdn/{S4OWDKFL.js → BOQ4PBCL.js} +1 -1
- package/dist/cdn/{IDUDNWXT.js → C2IZTBPT.js} +1 -1
- package/dist/cdn/{ADFVLGFH.js → CRWJA7I7.js} +1 -1
- package/dist/cdn/{YATKUTSV.js → D6PQBEUI.js} +1 -1
- package/dist/cdn/{44Z3ZTNF.js → DQ4LYHVZ.js} +1 -1
- package/dist/cdn/{UITF7YEX.js → DUY4X6VD.js} +1 -1
- package/dist/cdn/{4X26VMH5.js → DWKTGMAF.js} +1 -1
- package/dist/cdn/{CQY7OQCM.js → E25MFA2R.js} +1 -1
- package/dist/cdn/{XWR5YSIV.js → E6TDQAXW.js} +1 -1
- package/dist/cdn/{ON7SO3I7.js → EBG7P4AV.js} +1 -1
- package/dist/cdn/{AMBK5EQK.js → EEJ3TQCF.js} +1 -1
- package/dist/cdn/{YQQET3OF.js → EHRISGMA.js} +1 -1
- package/dist/cdn/{CC2NSXXJ.js → EK3ADZMZ.js} +1 -1
- package/dist/cdn/{FE43UIZ6.js → EYF72BFK.js} +1 -1
- package/dist/cdn/{BMOQYYKD.js → FA7DV6EI.js} +1 -1
- package/dist/cdn/{34KRZJL3.js → FL2SUJQR.js} +1 -1
- package/dist/cdn/{YG2S6OKO.js → FQ6WY62D.js} +1 -1
- package/dist/cdn/{NUTUWAM5.js → FQW4VGBQ.js} +1 -1
- package/dist/cdn/{QYODIFMY.js → GCBRC77Z.js} +1 -1
- package/dist/cdn/{7U4GZP6F.js → GIIEIMPX.js} +1 -1
- package/dist/cdn/{QYBRXLDV.js → GJ7BDRPS.js} +1 -1
- package/dist/cdn/{VR3CKV5W.js → GJVJDX6U.js} +1 -1
- package/dist/cdn/{VN26OZJ7.js → GLYGWUJI.js} +1 -1
- package/dist/cdn/{RCMSQZVI.js → H633EPML.js} +1 -1
- package/dist/cdn/{LWZL77Q7.js → HKCPOX75.js} +1 -1
- package/dist/cdn/{ACSP5NAU.js → HMZJJMDN.js} +1 -1
- package/dist/cdn/{2SPMAQ5L.js → HOXYU7K6.js} +1 -1
- package/dist/cdn/{OWRDHRTW.js → HS624KMA.js} +1 -1
- package/dist/cdn/{X762FZFW.js → HSUQ6QCT.js} +1 -1
- package/dist/cdn/{VG3BGZ5P.js → HVX336C7.js} +1 -1
- package/dist/cdn/{DM4ZFMNJ.js → I2CWSWSH.js} +1 -1
- package/dist/cdn/{5ZZEWEIT.js → I2GWQU3Z.js} +1 -1
- package/dist/cdn/{AXM7XBEQ.js → J2APFSVP.js} +1 -1
- package/dist/cdn/{66HZFVZ7.js → JTL527CY.js} +1 -1
- package/dist/cdn/{4K7HGXDC.js → JVBQACDW.js} +1 -1
- package/dist/cdn/{55YDFORF.js → JYBC5CRH.js} +1 -1
- package/dist/cdn/{NV27VTSL.js → JZZIYBTI.js} +1 -1
- package/dist/cdn/{YP6625BH.js → K5KVOYJV.js} +1 -1
- package/dist/cdn/{M3WDJO47.js → K7XPCT22.js} +1 -1
- package/dist/cdn/{SBCXLNEH.js → KARS3PXW.js} +1 -1
- package/dist/cdn/{VQACNJVS.js → KFTB4ORQ.js} +1 -1
- package/dist/cdn/{GRUZM5ST.js → KH6NFWMG.js} +1 -1
- package/dist/cdn/{HCDEPNE3.js → KHGMTZM3.js} +1 -1
- package/dist/cdn/{YBKBGX2I.js → KM3GQDOM.js} +1 -1
- package/dist/cdn/{THG5DAAH.js → KNRJJMFP.js} +1 -1
- package/dist/cdn/{RS5QYCJM.js → KWBEH72U.js} +1 -1
- package/dist/cdn/{PUID3A5D.js → KYHAYUN4.js} +1 -1
- package/dist/cdn/{5XRVSEG7.js → LDU267SZ.js} +1 -1
- package/dist/cdn/{MXM2TW7T.js → LXMMPOKJ.js} +1 -1
- package/dist/cdn/{GDFNVTHK.js → M4SJ4ZWQ.js} +1 -1
- package/dist/cdn/{MAQ6XAAT.js → MCJEYHRO.js} +1 -1
- package/dist/cdn/{QYKX74U3.js → MEIMF65V.js} +1 -1
- package/dist/cdn/{67BDZ5MU.js → MPBR66PF.js} +1 -1
- package/dist/cdn/{BQMQMPXL.js → MPR6P5ZQ.js} +1 -1
- package/dist/cdn/{WXT6IRHJ.js → MSGCQDRV.js} +1 -1
- package/dist/cdn/{LBP5CM53.js → MSHPGKFG.js} +1 -1
- package/dist/cdn/{NBBTFJDZ.js → N2IIHI5L.js} +1 -1
- package/dist/cdn/{H3WM47M7.js → N5JZWBDK.js} +1 -1
- package/dist/cdn/{CN5IHYVF.js → NTNNSHUM.js} +1 -1
- package/dist/cdn/{4KLNRQPT.js → O5HHK3WX.js} +1 -1
- package/dist/cdn/{R36WJ6MV.js → OBFSBQIQ.js} +1 -1
- package/dist/cdn/{FJYOGST7.js → OBLX62IJ.js} +1 -1
- package/dist/cdn/OE4WJN6O.js +2 -0
- package/dist/cdn/{Z3NZFAUV.js → OI5K4FGU.js} +1 -1
- package/dist/cdn/{A7BQRB3N.js → OTKY2C5F.js} +1 -1
- package/dist/cdn/{GOVFVBB5.js → OTM7SVGP.js} +1 -1
- package/dist/cdn/{4B4VLO74.js → P2DWHOK7.js} +1 -1
- package/dist/cdn/{6YNWDB5R.js → PASWG6ME.js} +1 -1
- package/dist/cdn/{S5F2DCHT.js → PCF5YHKG.js} +1 -1
- package/dist/cdn/{PFXITFXY.js → PF6TAWUY.js} +1 -1
- package/dist/cdn/{GK3H6G2N.js → PNZO7UBI.js} +1 -1
- package/dist/cdn/{COR7OSZ4.js → Q2H2PQXD.js} +1 -1
- package/dist/cdn/{Q6CSK4RU.js → QALQEASP.js} +1 -1
- package/dist/cdn/{F3ZEJSCS.js → QAOIVGQN.js} +1 -1
- package/dist/cdn/{HSRDJS2W.js → QBDTJOHQ.js} +1 -1
- package/dist/cdn/{JPWFFKOA.js → QSY2SDG7.js} +1 -1
- package/dist/cdn/{NFTODSNS.js → QYENJ22N.js} +1 -1
- package/dist/cdn/{CQN3EBLZ.js → R2DJRKFJ.js} +1 -1
- package/dist/cdn/{FKTEA2XN.js → RRKXCRYN.js} +1 -1
- package/dist/cdn/{XAB3X5BV.js → RVYCJSSJ.js} +1 -1
- package/dist/cdn/{W3MDWS2O.js → RVZKJPEM.js} +1 -1
- package/dist/cdn/{PPJRU5Z5.js → RZDFQXYS.js} +1 -1
- package/dist/cdn/{GZMF6BSV.js → SAI6OQQT.js} +1 -1
- package/dist/cdn/{2ZHIUXVZ.js → SG4RBVWV.js} +1 -1
- package/dist/cdn/{7BU6MRTR.js → SGE62UPZ.js} +1 -1
- package/dist/cdn/{GL2JPUTY.js → SX6TMPIT.js} +1 -1
- package/dist/cdn/{PXHXTDG5.js → TGMATTT3.js} +1 -1
- package/dist/cdn/{EI7PYDCL.js → TKLDOUMB.js} +1 -1
- package/dist/cdn/{IGF7FPF4.js → TTUCCNLX.js} +1 -1
- package/dist/cdn/{FTABOHZ5.js → UDEHQIZY.js} +1 -1
- package/dist/cdn/{EXGMAWUU.js → UDPWCXAG.js} +1 -1
- package/dist/cdn/{5CRWBOSC.js → UFZ5NLCO.js} +1 -1
- package/dist/cdn/{ZKGAVZTU.js → ULIK666O.js} +1 -1
- package/dist/cdn/{USTJNZOH.js → UTOGWTZA.js} +1 -1
- package/dist/cdn/{UYATX7WS.js → UUJFJ4FQ.js} +1 -1
- package/dist/cdn/{KTJRYASH.js → UX5HBPON.js} +1 -1
- package/dist/cdn/{B3DO2CTZ.js → VB63I6DV.js} +1 -1
- package/dist/cdn/{MNNGD3GV.js → VROP4YZD.js} +1 -1
- package/dist/cdn/{P4JV4CYU.js → W3SEEU5B.js} +1 -1
- package/dist/cdn/{ZBRRCLN2.js → W4AJ5WQI.js} +1 -1
- package/dist/cdn/{5RO62KJK.js → WAWJRWCC.js} +1 -1
- package/dist/cdn/{NCV5JMLQ.js → WEUGW625.js} +1 -1
- package/dist/cdn/{LRR54WUD.js → WFNBGFBU.js} +1 -1
- package/dist/cdn/{7ZLXU3MF.js → WLEZ3PKG.js} +1 -1
- package/dist/cdn/{C4DKRIKN.js → WMC5J245.js} +1 -1
- package/dist/cdn/{GQN4OXMJ.js → WOEHH6JP.js} +1 -1
- package/dist/cdn/{PC3TYPIR.js → WZEVWNGF.js} +1 -1
- package/dist/cdn/{VQPFO6TZ.js → XFYTD2GE.js} +1 -1
- package/dist/cdn/{SDHDHO3F.js → YAEU7WPO.js} +1 -1
- package/dist/cdn/{5YHUPYKE.js → YL4HBV5J.js} +1 -1
- package/dist/cdn/{7ADUVBN5.js → YSZ4LDJS.js} +1 -1
- package/dist/cdn/{HMX6OA7N.js → Z3K3V76T.js} +1 -1
- package/dist/cdn/{BIU2FT4R.js → Z62EPPFO.js} +1 -1
- package/dist/cdn/{ITNBFIMC.js → ZC2OUE5B.js} +1 -1
- package/dist/cdn/{ZYJNW6W7.js → ZK3VS2OO.js} +1 -1
- package/dist/cdn/{2NMB77K5.js → ZKMX263L.js} +1 -1
- package/dist/cdn/{XLSQO27P.js → ZNRSTTYO.js} +1 -1
- package/dist/cdn/{IP64EJYK.js → ZO4TQWNN.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +6 -4
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -16
- package/dist/components/calcite-autocomplete/customElement.js +4 -4
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +5 -5
- package/dist/components/calcite-avatar/customElement.d.ts +5 -5
- package/dist/components/calcite-dialog/customElement.js +7 -7
- package/dist/components/calcite-dropdown/customElement.js +3 -0
- package/dist/components/calcite-sheet/customElement.js +32 -27
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
- package/dist/cdn/6UQG2LBL.js +0 -2
|
@@ -130,7 +130,7 @@ class Autocomplete extends LitElement {
|
|
|
130
130
|
this.transitionRef.value?.scrollTo(options);
|
|
131
131
|
}
|
|
132
132
|
async selectText() {
|
|
133
|
-
return this.referenceEl
|
|
133
|
+
return this.referenceEl?.selectText();
|
|
134
134
|
}
|
|
135
135
|
async setFocus(options) {
|
|
136
136
|
return this.focusSetter(() => this.referenceEl, options);
|
|
@@ -163,7 +163,7 @@ class Autocomplete extends LitElement {
|
|
|
163
163
|
}
|
|
164
164
|
let itemsAndGroupsUpdated = false;
|
|
165
165
|
if (changes.has("inputValue") && (this.hasUpdated || this.inputValue)) {
|
|
166
|
-
this.inputValueMatchPattern = this.inputValue
|
|
166
|
+
this.inputValueMatchPattern = this.inputValue ? new RegExp(`(${escapeRegExp(this.inputValue)})`, "i") : void 0;
|
|
167
167
|
this.updateItems();
|
|
168
168
|
this.updateGroups();
|
|
169
169
|
itemsAndGroupsUpdated = true;
|
|
@@ -260,7 +260,7 @@ class Autocomplete extends LitElement {
|
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
updateItems() {
|
|
263
|
-
let activeDescendant =
|
|
263
|
+
let activeDescendant = "";
|
|
264
264
|
this.items.forEach((item) => {
|
|
265
265
|
item.scale = this.scale;
|
|
266
266
|
item.inputValueMatchPattern = this.inputValueMatchPattern;
|
|
@@ -386,7 +386,7 @@ class Autocomplete extends LitElement {
|
|
|
386
386
|
const autofocus = this.el.autofocus;
|
|
387
387
|
const enterKeyHint = this.el.enterKeyHint;
|
|
388
388
|
const inputMode = this.el.inputMode;
|
|
389
|
-
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant ?? nothing} aria-controls=${listId ?? nothing} aria-label=${getLabelText(this) ?? nothing} aria-owns=${listId ?? nothing} aria-autocomplete=list .ariaExpanded=${isOpen} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${autofocus} class=${safeClassMap(CSS.input)} clearable .disabled=${disabled} enterkeyhint=${enterKeyHint ?? nothing} .form=${this.form} .icon=${this.icon ?? true} .iconFlipRtl=${this.iconFlipRtl} id=${inputId ?? nothing} inputmode=${inputMode ?? nothing} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @
|
|
389
|
+
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant ?? nothing} aria-controls=${listId ?? nothing} aria-label=${getLabelText(this) ?? nothing} aria-owns=${listId ?? nothing} aria-autocomplete=list .ariaExpanded=${isOpen} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${autofocus} class=${safeClassMap(CSS.input)} clearable .disabled=${disabled} enterkeyhint=${enterKeyHint ?? nothing} .form=${this.form} .icon=${this.icon ?? true} .iconFlipRtl=${this.iconFlipRtl} id=${inputId ?? nothing} inputmode=${inputMode ?? nothing} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${ref(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${safeClassMap({
|
|
390
390
|
[CSS.contentContainer]: true,
|
|
391
391
|
[CSS.floatingUIContainer]: true,
|
|
392
392
|
[CSS.floatingUIContainerActive]: isOpen
|
|
@@ -13,7 +13,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export abstract class AutocompleteItem extends LitElement {
|
|
15
15
|
/** Specifies a description for the component. Displays below the label text. */
|
|
16
|
-
accessor description: string;
|
|
16
|
+
accessor description: string | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
19
19
|
*
|
|
@@ -27,13 +27,13 @@ export abstract class AutocompleteItem extends LitElement {
|
|
|
27
27
|
*/
|
|
28
28
|
accessor heading: string;
|
|
29
29
|
/** Specifies an icon to display at the end of the component. */
|
|
30
|
-
accessor iconEnd: IconName;
|
|
30
|
+
accessor iconEnd: IconName | undefined;
|
|
31
31
|
/** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
|
|
32
|
-
accessor iconFlipRtl: FlipContext;
|
|
32
|
+
accessor iconFlipRtl: FlipContext | undefined;
|
|
33
33
|
/** Specifies an icon to display at the start of the component. */
|
|
34
|
-
accessor iconStart: IconName;
|
|
34
|
+
accessor iconStart: IconName | undefined;
|
|
35
35
|
/** Specifies an accessible label for the component. */
|
|
36
|
-
accessor label: string;
|
|
36
|
+
accessor label: string | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* When `true`, the component is selected.
|
|
39
39
|
*
|
|
@@ -9,9 +9,9 @@ import type { Scale } from "../interfaces.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export abstract class Avatar extends LitElement {
|
|
11
11
|
/** Specifies the full name of the user. When `label` and `thumbnail` are not defined, specifies the accessible name for the component. */
|
|
12
|
-
accessor fullName: string;
|
|
12
|
+
accessor fullName: string | undefined;
|
|
13
13
|
/** Specifies alternative text when `thumbnail` is defined, otherwise specifies an accessible label for the component. */
|
|
14
|
-
accessor label: string;
|
|
14
|
+
accessor label: string | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* Specifies the size of the component.
|
|
17
17
|
*
|
|
@@ -19,9 +19,9 @@ export abstract class Avatar extends LitElement {
|
|
|
19
19
|
*/
|
|
20
20
|
accessor scale: Scale;
|
|
21
21
|
/** Specifies the `src` to an image. If the image is private, include an access token in the URL. */
|
|
22
|
-
accessor thumbnail: string;
|
|
22
|
+
accessor thumbnail: string | undefined;
|
|
23
23
|
/** Specifies the unique id of the user. */
|
|
24
|
-
accessor userId: string;
|
|
24
|
+
accessor userId: string | undefined;
|
|
25
25
|
/** Specifies the username of the user. */
|
|
26
|
-
accessor username: string;
|
|
26
|
+
accessor username: string | undefined;
|
|
27
27
|
}
|
|
@@ -158,11 +158,11 @@ class Dialog extends LitElement {
|
|
|
158
158
|
connectedCallback() {
|
|
159
159
|
super.connectedCallback();
|
|
160
160
|
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
|
|
161
|
-
this.
|
|
161
|
+
this.setUpInteractions();
|
|
162
162
|
}
|
|
163
163
|
willUpdate(changes) {
|
|
164
164
|
if (changes.has("open") && (this.hasUpdated || this.open !== false) || changes.has("placement") && (this.hasUpdated || this.placement !== "center") || changes.has("resizable") && (this.hasUpdated || this.resizable !== false) || changes.has("dragEnabled") && (this.hasUpdated || this.dragEnabled !== false)) {
|
|
165
|
-
this.
|
|
165
|
+
this.setUpInteractions();
|
|
166
166
|
}
|
|
167
167
|
if (changes.has("messages") || changes.has("dragEnabled") && (this.hasUpdated || this.dragEnabled !== false) || changes.has("resizable") && (this.hasUpdated || this.resizable !== false)) {
|
|
168
168
|
this.updateAssistiveText();
|
|
@@ -175,7 +175,7 @@ class Dialog extends LitElement {
|
|
|
175
175
|
super.disconnectedCallback();
|
|
176
176
|
this.mutationObserver?.disconnect();
|
|
177
177
|
this.embedded = false;
|
|
178
|
-
this.
|
|
178
|
+
this.cleanUpInteractions();
|
|
179
179
|
}
|
|
180
180
|
focusTrapDisabledOverride() {
|
|
181
181
|
return !this.modal && this.focusTrapDisabled;
|
|
@@ -335,7 +335,7 @@ class Dialog extends LitElement {
|
|
|
335
335
|
const translateY = Math.round(y + top + bottom);
|
|
336
336
|
this.transitionEl.style.transform = translateX || translateY ? `translate(${translateX}px, ${translateY}px)` : null;
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
cleanUpInteractions() {
|
|
339
339
|
this.interaction?.unset();
|
|
340
340
|
this.updateSizeInternal({
|
|
341
341
|
inline: null,
|
|
@@ -345,8 +345,8 @@ class Dialog extends LitElement {
|
|
|
345
345
|
this.resizePosition = { ...initialResizePosition };
|
|
346
346
|
this.updateTransform();
|
|
347
347
|
}
|
|
348
|
-
async
|
|
349
|
-
this.
|
|
348
|
+
async setUpInteractions() {
|
|
349
|
+
this.cleanUpInteractions();
|
|
350
350
|
const { el, transitionEl, resizable, dragEnabled, resizePosition, dragPosition } = this;
|
|
351
351
|
if (!transitionEl || !this.open) {
|
|
352
352
|
return;
|
|
@@ -447,7 +447,7 @@ class Dialog extends LitElement {
|
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
449
|
this.transitionEl = el;
|
|
450
|
-
this.
|
|
450
|
+
this.setUpInteractions();
|
|
451
451
|
}
|
|
452
452
|
handleInternalPanelScroll(event) {
|
|
453
453
|
if (event.target !== this.panelRef.value) {
|
|
@@ -269,6 +269,9 @@ class Dropdown extends LitElement {
|
|
|
269
269
|
const previousReferenceEl = this.referenceEl instanceof HTMLElement ? this.referenceEl : null;
|
|
270
270
|
const nextReferenceEl = el instanceof HTMLElement ? el : null;
|
|
271
271
|
updateRefObserver(this.resizeObserver, previousReferenceEl, nextReferenceEl);
|
|
272
|
+
if (this.referenceElementType || !nextReferenceEl) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
272
275
|
this.referenceEl = el;
|
|
273
276
|
connectFloatingUI(this);
|
|
274
277
|
}
|
|
@@ -138,14 +138,16 @@ class Sheet extends LitElement {
|
|
|
138
138
|
connectedCallback() {
|
|
139
139
|
super.connectedCallback();
|
|
140
140
|
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
|
|
141
|
-
this.
|
|
141
|
+
if (this.hasUpdated) {
|
|
142
|
+
this.refreshResize();
|
|
143
|
+
}
|
|
142
144
|
}
|
|
143
145
|
willUpdate(changes) {
|
|
144
146
|
if (changes.has("opened") && (this.hasUpdated || this.opened !== false) && this.transitionRef.value) {
|
|
145
147
|
toggleOpenClose(this);
|
|
146
148
|
}
|
|
147
149
|
if (changes.has("open") && (this.hasUpdated || this.open !== false) || changes.has("position") && (this.hasUpdated || this.position !== "inline-start") || changes.has("resizable") && (this.hasUpdated || this.resizable !== false) || changes.has("direction")) {
|
|
148
|
-
this.
|
|
150
|
+
this.refreshResize();
|
|
149
151
|
}
|
|
150
152
|
if (this.contentRef.value) {
|
|
151
153
|
this.contentId = ensureId(this.contentRef.value);
|
|
@@ -155,7 +157,7 @@ class Sheet extends LitElement {
|
|
|
155
157
|
super.disconnectedCallback();
|
|
156
158
|
this.mutationObserver?.disconnect();
|
|
157
159
|
this.embedded = false;
|
|
158
|
-
this.
|
|
160
|
+
this.cleanUpInteractions();
|
|
159
161
|
}
|
|
160
162
|
async setOpenState(value) {
|
|
161
163
|
if (this.beforeClose && !value) {
|
|
@@ -230,31 +232,34 @@ class Sheet extends LitElement {
|
|
|
230
232
|
}
|
|
231
233
|
this.sizeOverride.resize(size);
|
|
232
234
|
}
|
|
233
|
-
|
|
235
|
+
cleanUpInteractions() {
|
|
234
236
|
this.interaction?.unset();
|
|
235
237
|
}
|
|
236
|
-
|
|
237
|
-
this
|
|
238
|
-
|
|
239
|
-
if (!contentRef.value || !open || !resizable || !resizeHandleEl) {
|
|
238
|
+
updateResizeValues() {
|
|
239
|
+
const { contentRef } = this;
|
|
240
|
+
if (!contentRef.value) {
|
|
240
241
|
return;
|
|
241
242
|
}
|
|
242
|
-
await this.el.componentOnReady();
|
|
243
243
|
const computedStyle = window.getComputedStyle(contentRef.value);
|
|
244
|
-
this.resizeValues
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
blockSize: getStylePixelValue(blockSize),
|
|
252
|
-
minInlineSize: getStylePixelValue(minInlineSize),
|
|
253
|
-
minBlockSize: getStylePixelValue(minBlockSize),
|
|
254
|
-
maxInlineSize: getStylePixelValue(maxInlineSize) || window.innerWidth,
|
|
255
|
-
maxBlockSize: getStylePixelValue(maxBlockSize) || window.innerHeight
|
|
244
|
+
this.resizeValues = {
|
|
245
|
+
inlineSize: getStylePixelValue(computedStyle.inlineSize),
|
|
246
|
+
blockSize: getStylePixelValue(computedStyle.blockSize),
|
|
247
|
+
minInlineSize: getStylePixelValue(computedStyle.minInlineSize),
|
|
248
|
+
minBlockSize: getStylePixelValue(computedStyle.minBlockSize),
|
|
249
|
+
maxInlineSize: getStylePixelValue(computedStyle.maxInlineSize) || window.innerWidth,
|
|
250
|
+
maxBlockSize: getStylePixelValue(computedStyle.maxBlockSize) || window.innerHeight
|
|
256
251
|
};
|
|
257
|
-
|
|
252
|
+
}
|
|
253
|
+
refreshResize() {
|
|
254
|
+
this.updateResizeValues();
|
|
255
|
+
this.setUpResizeInteractions();
|
|
256
|
+
}
|
|
257
|
+
setUpResizeInteractions() {
|
|
258
|
+
this.cleanUpInteractions();
|
|
259
|
+
const { contentRef, el, resizable, position, open, resizeHandleEl } = this;
|
|
260
|
+
if (!contentRef.value || !open || !resizable || !resizeHandleEl) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
258
263
|
const rtl = this.direction === "rtl";
|
|
259
264
|
this.interaction = interact(contentRef.value, { context: el.ownerDocument }).resizable({
|
|
260
265
|
edges: {
|
|
@@ -266,12 +271,12 @@ class Sheet extends LitElement {
|
|
|
266
271
|
modifiers: [
|
|
267
272
|
interact.modifiers.restrictSize({
|
|
268
273
|
min: {
|
|
269
|
-
width:
|
|
270
|
-
height:
|
|
274
|
+
width: this.resizeValues.minInlineSize,
|
|
275
|
+
height: this.resizeValues.minBlockSize
|
|
271
276
|
},
|
|
272
277
|
max: {
|
|
273
|
-
width:
|
|
274
|
-
height:
|
|
278
|
+
width: this.resizeValues.maxInlineSize,
|
|
279
|
+
height: this.resizeValues.maxBlockSize
|
|
275
280
|
}
|
|
276
281
|
})
|
|
277
282
|
],
|
|
@@ -304,7 +309,7 @@ class Sheet extends LitElement {
|
|
|
304
309
|
}
|
|
305
310
|
setResizeHandleEl(el) {
|
|
306
311
|
this.resizeHandleEl = el;
|
|
307
|
-
this.
|
|
312
|
+
this.refreshResize();
|
|
308
313
|
}
|
|
309
314
|
handleOutsideClose() {
|
|
310
315
|
if (this.outsideCloseDisabled) {
|