@esri/calcite-components 5.1.0-next.4 → 5.1.0-next.6
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/{GW7IPUQS.js → 232WBXIW.js} +1 -1
- package/dist/cdn/27KIJJVA.js +2 -0
- package/dist/cdn/{KVSU3DLB.js → 27S7SCHF.js} +1 -1
- package/dist/cdn/2CV466KR.js +2 -0
- package/dist/cdn/{LHJSBAM5.js → 2M3L5CHC.js} +1 -1
- package/dist/cdn/2XWHTJYS.js +2 -0
- package/dist/cdn/{QBLAE2O5.js → 3HLHTUY5.js} +1 -1
- package/dist/cdn/{IFHMJCAE.js → 3N3YST3P.js} +1 -1
- package/dist/cdn/3OCOXFJX.js +2 -0
- package/dist/cdn/3ZTULMLE.js +2 -0
- package/dist/cdn/{LGKOEBZ4.js → 44K6CFSA.js} +1 -1
- package/dist/cdn/46ATGQXN.js +2 -0
- package/dist/cdn/{CDTY6WOM.js → 4HL2Z5HN.js} +1 -1
- package/dist/cdn/{QOSBMGOZ.js → 526JZ6Y2.js} +1 -1
- package/dist/cdn/{AYPT6VGV.js → 56V6AANR.js} +1 -1
- package/dist/cdn/{5HQ3O27G.js → 57UFQM3M.js} +1 -1
- package/dist/cdn/{FCNCDBSI.js → 5D32LNQR.js} +1 -1
- package/dist/cdn/{FDGUUC3D.js → 5G2KVW4P.js} +1 -1
- package/dist/cdn/5H7EBO5K.js +2 -0
- package/dist/cdn/{CZYFEVKF.js → 5HB4KJ7Y.js} +1 -1
- package/dist/cdn/{HRUVPNCI.js → 633FBLBS.js} +1 -1
- package/dist/cdn/{JKLX623E.js → 66YZFACX.js} +1 -1
- package/dist/cdn/672VGWH7.js +2 -0
- package/dist/cdn/{R6D5F2V7.js → 67O6G5DT.js} +1 -1
- package/dist/cdn/6CKEQZO7.js +2 -0
- package/dist/cdn/{ZZNRLKQQ.js → 6E6JZIDL.js} +1 -1
- package/dist/cdn/{MXRMT4RB.js → 6UH6TKTT.js} +1 -1
- package/dist/cdn/6XNHTAM2.js +2 -0
- package/dist/cdn/7KPHVGVG.js +2 -0
- package/dist/cdn/{SBPWZDAB.js → 7MRH7XSL.js} +1 -1
- package/dist/cdn/7UOYXJ3K.js +2 -0
- package/dist/cdn/{7B4D4WJ2.js → AECJNJ7Y.js} +1 -1
- package/dist/cdn/{HXS3PD57.js → AELSFDTC.js} +1 -1
- package/dist/cdn/{YOYLPMEA.js → AKVWZOJU.js} +1 -1
- package/dist/cdn/ARN4B4IT.js +2 -0
- package/dist/cdn/{GJE7FY35.js → B4SHCCW6.js} +1 -1
- package/dist/cdn/BCO3LX7A.js +2 -0
- package/dist/cdn/{Q7WYXKFZ.js → BRMCZ6ZG.js} +1 -1
- package/dist/cdn/BRXJTIAG.js +2 -0
- package/dist/cdn/{QKUQGG2M.js → BVFHM66P.js} +1 -1
- package/dist/cdn/{SXVCUXNL.js → C44ME3U7.js} +1 -1
- package/dist/cdn/{VLGFWPBL.js → CILYQWNA.js} +1 -1
- package/dist/cdn/{5TWM6GKK.js → CSXVZ7IA.js} +1 -1
- package/dist/cdn/{6IZMIAV2.js → D2EYC7T6.js} +1 -1
- package/dist/cdn/{5YROPSGB.js → DNYQCUGR.js} +1 -1
- package/dist/cdn/{KNDQJ2XX.js → EMOZ2DH3.js} +1 -1
- package/dist/cdn/{HXVXRVZW.js → ETPCGFQN.js} +1 -1
- package/dist/cdn/{2ZJ5ADD2.js → FC5MLLP5.js} +1 -1
- package/dist/cdn/{7DA7BZM3.js → FIYBHBE3.js} +1 -1
- package/dist/cdn/FO3VFHYC.js +2 -0
- package/dist/cdn/GCGNKBZK.js +2 -0
- package/dist/cdn/{OVU2NGHU.js → HAVRDDW3.js} +1 -1
- package/dist/cdn/{YQY6DOSF.js → HBRWGV2Z.js} +1 -1
- package/dist/cdn/{CPDXUV3S.js → HGX7LZAA.js} +1 -1
- package/dist/cdn/{X7JEHH2B.js → HJRA23WV.js} +1 -1
- package/dist/cdn/{3TCEXRVB.js → HMZKLPV5.js} +1 -1
- package/dist/cdn/{FAOX7WLQ.js → IBP55ZGE.js} +1 -1
- package/dist/cdn/IIYUSLAE.js +2 -0
- package/dist/cdn/{F7XISEIT.js → IYMANB2G.js} +1 -1
- package/dist/cdn/{FAHLSHDH.js → JN5O4TLZ.js} +1 -1
- package/dist/cdn/{Z3IVC2AV.js → JQY63BDJ.js} +1 -1
- package/dist/cdn/JVNG2BRO.js +2 -0
- package/dist/cdn/{CAAZHUX4.js → JVZSWSGV.js} +1 -1
- package/dist/cdn/JX4VBEH7.js +2 -0
- package/dist/cdn/{R3EE76WN.js → K724PPGV.js} +1 -1
- package/dist/cdn/{RROGXGP5.js → KJ42NLHR.js} +1 -1
- package/dist/cdn/KP6U3OB3.js +2 -0
- package/dist/cdn/{YUJ33VWR.js → KT4JL3GM.js} +1 -1
- package/dist/cdn/KZ5EXCXL.js +2 -0
- package/dist/cdn/{EIFNZZAD.js → L3TZLATI.js} +1 -1
- package/dist/cdn/{AMZPSRIA.js → L62IP5MG.js} +1 -1
- package/dist/cdn/{7KCC74EE.js → LCHIHTFT.js} +1 -1
- package/dist/cdn/{MUGKSK5F.js → LKQBHGZ7.js} +1 -1
- package/dist/cdn/LOPKPGRY.js +2 -0
- package/dist/cdn/{HYYJZO6T.js → LRM2CLPW.js} +1 -1
- package/dist/cdn/LRM7ZHT5.js +2 -0
- package/dist/cdn/LSDUQPFS.js +2 -0
- package/dist/cdn/LTLVP6R6.js +2 -0
- package/dist/cdn/{7TEW7OYZ.js → MCSIAIDA.js} +1 -1
- package/dist/cdn/{HVBNJRAQ.js → MFSDYV4U.js} +1 -1
- package/dist/cdn/{LIJYENWJ.js → NCCVRAIB.js} +1 -1
- package/dist/cdn/{SYSNPKVM.js → NGDCIJ3J.js} +1 -1
- package/dist/cdn/{RA4KNUNM.js → NLVQFJ3Z.js} +1 -1
- package/dist/cdn/{WR6QBFCR.js → NU744SVB.js} +1 -1
- package/dist/cdn/{PS64W4X6.js → NXCII3YU.js} +1 -1
- package/dist/cdn/{XYAZINKS.js → O24SM7OF.js} +1 -1
- package/dist/cdn/{Z22BRBT4.js → O535TZZ6.js} +1 -1
- package/dist/cdn/O7YWW6X6.js +2 -0
- package/dist/cdn/OIYWPY2M.js +2 -0
- package/dist/cdn/{4MFRMO5M.js → OS5HZHBU.js} +1 -1
- package/dist/cdn/{DFXECQ6Z.js → OSCPBA6O.js} +1 -1
- package/dist/cdn/{GZNBU3BV.js → OX5RYOW4.js} +1 -1
- package/dist/cdn/{ED2GANBI.js → P3W4A5BT.js} +1 -1
- package/dist/cdn/{UTFS3HNB.js → PKKVWQIA.js} +1 -1
- package/dist/cdn/PT5LBDUL.js +2 -0
- package/dist/cdn/{MASQZEFU.js → Q5SNHQHW.js} +1 -1
- package/dist/cdn/QID335AW.js +2 -0
- package/dist/cdn/{HCJDTU7F.js → QMSQZWET.js} +1 -1
- package/dist/cdn/{MJCRT7H4.js → QX54642B.js} +1 -1
- package/dist/cdn/{XDOFVA4S.js → REPXOUSM.js} +1 -1
- package/dist/cdn/RJSLWYFJ.js +2 -0
- package/dist/cdn/RTJOU72W.js +2 -0
- package/dist/cdn/{A4OYPK5D.js → RZSXCJTK.js} +1 -1
- package/dist/cdn/S3FVUTIY.js +2 -0
- package/dist/cdn/SJYYS7RH.js +2 -0
- package/dist/cdn/SMSVNRM4.js +2 -0
- package/dist/cdn/{GDTRICJF.js → SSQXPR3D.js} +1 -1
- package/dist/cdn/{7CZHE7FZ.js → TBVIBCHL.js} +1 -1
- package/dist/cdn/{MTNYIXZQ.js → THSY4EQU.js} +1 -1
- package/dist/cdn/TR56QFJC.js +2 -0
- package/dist/cdn/{A22XLAKZ.js → TT5S3S4L.js} +1 -1
- package/dist/cdn/{BWUA5WU5.js → TWXMFG7A.js} +1 -1
- package/dist/cdn/{P7U46JDU.js → U3AOFOT7.js} +1 -1
- package/dist/cdn/UPE6RIV2.js +2 -0
- package/dist/cdn/{7CLOFSLV.js → V4NX2X3B.js} +1 -1
- package/dist/cdn/V6NB5CGO.js +2 -0
- package/dist/cdn/{ILES2J66.js → VESBDAE7.js} +1 -1
- package/dist/cdn/{V4KATS7H.js → VKQJIDXT.js} +1 -1
- package/dist/cdn/{IMOAPVVW.js → VMMRWNOB.js} +1 -1
- package/dist/cdn/{IOSK2I75.js → W4HQGAKN.js} +1 -1
- package/dist/cdn/{FRI4RPRX.js → W5FGAVGO.js} +1 -1
- package/dist/cdn/{XLGGANFA.js → W5HANC6S.js} +1 -1
- package/dist/cdn/{37APBABQ.js → WBP5XEJH.js} +1 -1
- package/dist/cdn/{5WKPS2ZT.js → WE2SWJDR.js} +1 -1
- package/dist/cdn/{WAC3IAWB.js → WNADDPUF.js} +1 -1
- package/dist/cdn/{GAUJK4Z7.js → XGRU4PI2.js} +1 -1
- package/dist/cdn/{TCAGY7OI.js → XI7FVSES.js} +1 -1
- package/dist/cdn/{LRL6N22U.js → XRGPWSUO.js} +1 -1
- package/dist/cdn/{3W4NT367.js → XZX7ZHUA.js} +1 -1
- package/dist/cdn/{6NGWODBG.js → Y36WJADK.js} +1 -1
- package/dist/cdn/{TLAXB6HU.js → Y555OQ57.js} +1 -1
- package/dist/cdn/{GM6FZWSL.js → YBIQF3JQ.js} +1 -1
- package/dist/cdn/{ULBA6IRN.js → YGHVUKLM.js} +1 -1
- package/dist/cdn/{RRHN2PDB.js → YGKHTZ4V.js} +1 -1
- package/dist/cdn/{KKH2HVQW.js → YNGZPTWY.js} +1 -1
- package/dist/cdn/{S22OVJTO.js → YPOMUQHV.js} +2 -2
- package/dist/cdn/{RSCA2AM5.js → YWIQC7RF.js} +1 -1
- package/dist/cdn/{ZIOXZBYF.js → ZB7NSHVW.js} +1 -1
- package/dist/cdn/{EW6277QZ.js → ZCJDNXK2.js} +1 -1
- package/dist/cdn/{GFZYTB3O.js → ZHOHVRUX.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +4 -5
- package/dist/chunks/dom.js +22 -29
- package/dist/chunks/floating-ui.js +2 -2
- package/dist/chunks/input.js +17 -7
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +4 -3
- package/dist/components/calcite-action-bar/customElement.d.ts +9 -0
- package/dist/components/calcite-action-bar/customElement.js +40 -13
- package/dist/components/calcite-action-pad/customElement.js +4 -2
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +3 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +27 -25
- package/dist/components/calcite-checkbox/customElement.js +3 -2
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +4 -2
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +11 -1
- package/dist/components/calcite-combobox/customElement.js +8 -3
- package/dist/components/calcite-combobox-item/customElement.js +10 -4
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +2 -2
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +4 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +3 -3
- package/dist/components/calcite-flow-item/customElement.js +3 -3
- package/dist/components/calcite-icon/customElement.js +4 -3
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +4 -3
- package/dist/components/calcite-input-date-picker/customElement.js +3 -0
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +4 -3
- package/dist/components/calcite-input-text/customElement.d.ts +1 -1
- package/dist/components/calcite-input-text/customElement.js +174 -27
- package/dist/components/calcite-input-time-picker/customElement.js +3 -2
- package/dist/components/calcite-link/customElement.js +4 -3
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +5 -3
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +4 -2
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +4 -1
- package/dist/components/calcite-progress/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.js +3 -3
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +5 -3
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +8 -5
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +7 -5
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +5 -3
- package/dist/components/calcite-table-cell/customElement.js +3 -2
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +3 -2
- package/dist/components/calcite-tooltip/customElement.js +4 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +4 -2
- package/dist/controllers/useForm.d.ts +3 -0
- 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/vscode.css-custom-data.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 +4 -4
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cdn/256EMMKX.js +0 -2
- package/dist/cdn/3OIE2RR5.js +0 -2
- package/dist/cdn/43T3HPVW.js +0 -2
- package/dist/cdn/4ET37OQN.js +0 -2
- package/dist/cdn/4SJVPWEI.js +0 -2
- package/dist/cdn/7WPF3NTF.js +0 -2
- package/dist/cdn/F7SGO63N.js +0 -2
- package/dist/cdn/G6R56WT6.js +0 -2
- package/dist/cdn/HBVQ77SB.js +0 -2
- package/dist/cdn/HD23H6LX.js +0 -2
- package/dist/cdn/I6CQ5UW5.js +0 -2
- package/dist/cdn/IR6Z2XSF.js +0 -2
- package/dist/cdn/IUAHSZQ6.js +0 -2
- package/dist/cdn/JLB2FYLL.js +0 -2
- package/dist/cdn/JRCEHRYP.js +0 -2
- package/dist/cdn/L6F7C3O7.js +0 -2
- package/dist/cdn/LIZ5IMMJ.js +0 -2
- package/dist/cdn/LR57FDVO.js +0 -2
- package/dist/cdn/LYKD5N65.js +0 -2
- package/dist/cdn/MAXAPKJ5.js +0 -2
- package/dist/cdn/MQPFYNQR.js +0 -2
- package/dist/cdn/N6QRZM7N.js +0 -2
- package/dist/cdn/NQEVKT6K.js +0 -2
- package/dist/cdn/OS7NHPEF.js +0 -2
- package/dist/cdn/P7RXOG72.js +0 -2
- package/dist/cdn/PBMFDSRI.js +0 -2
- package/dist/cdn/Q52SIZ3L.js +0 -2
- package/dist/cdn/R6YSSNOG.js +0 -2
- package/dist/cdn/SFEXJ2YW.js +0 -2
- package/dist/cdn/TPXLAPIE.js +0 -2
- package/dist/cdn/TSZAQNPK.js +0 -2
- package/dist/cdn/U6LKEFFT.js +0 -2
- package/dist/cdn/UAADJQTQ.js +0 -2
- package/dist/cdn/UOIMVKXE.js +0 -2
- package/dist/cdn/XSSG2WBN.js +0 -2
- package/dist/cdn/YHGC7HRA.js +0 -2
- package/dist/cdn/Z53AVC5H.js +0 -2
- package/dist/cdn/ZXUITROT.js +0 -2
package/dist/chunks/runtime.js
CHANGED
|
@@ -60,9 +60,9 @@ function getConfig() {
|
|
|
60
60
|
}
|
|
61
61
|
return effectiveConfig;
|
|
62
62
|
}
|
|
63
|
-
const version = "5.1.0-next.
|
|
64
|
-
const buildDate = "2026-03-
|
|
65
|
-
const revision = "
|
|
63
|
+
const version = "5.1.0-next.6";
|
|
64
|
+
const buildDate = "2026-03-11";
|
|
65
|
+
const revision = "b9e85e81c";
|
|
66
66
|
function stampVersion() {
|
|
67
67
|
const config = getConfig();
|
|
68
68
|
if (config && config.version) {
|
|
@@ -85,7 +85,7 @@ if (!isServer) {
|
|
|
85
85
|
if (process.env.NODE_ENV !== "test") {
|
|
86
86
|
queueMicrotask(stampVersion);
|
|
87
87
|
}
|
|
88
|
-
const runtime = makeRuntime({ defaultAssetPath: "https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.
|
|
88
|
+
const runtime = makeRuntime({ defaultAssetPath: "https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.6/dist/cdn/", hydratedAttribute: "calcite-hydrated" });
|
|
89
89
|
const { customElement, getAssetPath, setAssetPath } = runtime;
|
|
90
90
|
export {
|
|
91
91
|
CSS_UTILITY as C,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
3
3
|
import { createFocusTrap } from "focus-trap";
|
|
4
|
-
import { t as tabbableOptions,
|
|
4
|
+
import { t as tabbableOptions, i as focusElement } from "./dom.js";
|
|
5
5
|
import { a as getConfig } from "./runtime.js";
|
|
6
6
|
function getEffectiveContainerElements(targetEl, { focusTrapOptions }, extraContainers) {
|
|
7
7
|
if (!focusTrapOptions?.extraContainers && !extraContainers) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
3
3
|
import { c as componentFocusable } from "./component.js";
|
|
4
|
-
import {
|
|
4
|
+
import { e as getRootNode, i as focusElement } from "./dom.js";
|
|
5
5
|
const useSetFocus = () => {
|
|
6
6
|
return makeGenericController((component, controller) => {
|
|
7
7
|
let abortController;
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { isServer } from "lit";
|
|
3
|
-
import {
|
|
3
|
+
import { n as nodeListToArray } from "./dom.js";
|
|
4
4
|
import { A as AllComboboxChildrenSelector, a as ComboboxItemSelector, b as ComboboxItemGroupSelector } from "./resources5.js";
|
|
5
5
|
function getAncestors(element) {
|
|
6
6
|
const parent = element.parentElement?.closest(AllComboboxChildrenSelector);
|
|
@@ -3,8 +3,9 @@ import { C as CSS_UTILITY, c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { keyed } from "lit/directives/keyed.js";
|
|
4
4
|
import { css, html, nothing } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
6
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import { c as closestElementCrossShadowBoundary, s as slotChangeHasAssignedElement
|
|
8
|
+
import { c as closestElementCrossShadowBoundary, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
8
9
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
9
10
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
10
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -51,6 +52,7 @@ const styles = css`.icon-position--end,.icon-position--start{--calcite-internal-
|
|
|
51
52
|
class AccordionItem extends LitElement {
|
|
52
53
|
constructor() {
|
|
53
54
|
super();
|
|
55
|
+
this.direction = useDirection();
|
|
54
56
|
this.headerRef = createRef();
|
|
55
57
|
this.focusSetter = useSetFocus()(this);
|
|
56
58
|
this.messages = useT9n();
|
|
@@ -173,7 +175,6 @@ class AccordionItem extends LitElement {
|
|
|
173
175
|
}
|
|
174
176
|
render() {
|
|
175
177
|
const { iconFlipRtl, heading, headingLevel, messages, expanded } = this;
|
|
176
|
-
const dir = getElementDir(this.el);
|
|
177
178
|
const expandIconTitle = expanded ? messages.collapse : messages.expand;
|
|
178
179
|
const iconStartEl = this.iconStart ? keyed("icon-start", html`<calcite-icon class=${safeClassMap({ [CSS.icon]: true, [CSS.iconStart]: true })} .flipRtl=${iconFlipRtl === "both" || iconFlipRtl === "start"} .icon=${this.iconStart} .scale=${getIconScale(this.scale)}></calcite-icon>`) : null;
|
|
179
180
|
const iconEndEl = this.iconEnd ? keyed("icon-end", html`<calcite-icon class=${safeClassMap({ [CSS.iconEnd]: true, [CSS.icon]: true })} .flipRtl=${iconFlipRtl === "both" || iconFlipRtl === "end"} .icon=${this.iconEnd} .scale=${getIconScale(this.scale)}></calcite-icon>`) : null;
|
|
@@ -183,7 +184,7 @@ class AccordionItem extends LitElement {
|
|
|
183
184
|
[CSS.iconType(this.iconType)]: true
|
|
184
185
|
})}><div class=${safeClassMap({
|
|
185
186
|
[CSS.header]: true,
|
|
186
|
-
[CSS_UTILITY.rtl]:
|
|
187
|
+
[CSS_UTILITY.rtl]: this.direction === "rtl",
|
|
187
188
|
[CSS.headerAppearance(this.appearance)]: true
|
|
188
189
|
})}>${this.renderActionsStart()}<button aria-controls=${IDS.section} .ariaExpanded=${expanded} class=${safeClassMap(CSS.headerContent)} id=${IDS.sectionToggle} @click=${this.itemHeaderClickHandler} type=button ${ref(this.headerRef)}><div class=${safeClassMap(CSS.headerContainer)}>${this.renderContentStart()}${iconStartEl}<div class=${safeClassMap(CSS.headerText)}>${Heading({ class: CSS.heading, level: headingLevel, children: heading })}${description ? html`<span class=${safeClassMap(CSS.description)}>${description}</span>` : null}</div>${iconEndEl}${this.renderContentEnd()}</div><calcite-icon class=${safeClassMap(CSS.expandIcon)} .icon=${this.iconType === "chevron" ? ICONS.chevronDown : this.iconType === "caret" ? ICONS.caretDown : expanded ? ICONS.minus : ICONS.plus} .scale=${getIconScale(this.scale)} title=${expandIconTitle ?? nothing}></calcite-icon></button>${this.renderActionsEnd()}</div><section aria-labelledby=${IDS.sectionToggle} class=${safeClassMap(CSS.content)} id=${IDS.section}><slot></slot></section></div>`;
|
|
189
190
|
}
|
|
@@ -11,11 +11,14 @@ import type { OverlayPositioning } from "../../utils/floating-ui.js";
|
|
|
11
11
|
* @cssproperty [--calcite-action-bar-shadow] - Specifies the component's shadow when `floating` is `true`.
|
|
12
12
|
* @slot - A slot for adding `calcite-action`s that will appear at the top of the component.
|
|
13
13
|
* @slot [actions-end] - A slot for adding `calcite-action`s that will appear at the end of the component, prior to the collapse/expand button.
|
|
14
|
+
* @slot [actions-start] - A slot for adding `calcite-action`s that will appear at the start of the component. When `expandPosition` is `"start"`, actions in this slot will render after the collapse/expand button.
|
|
14
15
|
* @slot [expand-tooltip] - A slot to set the `calcite-tooltip` for the expand toggle.
|
|
15
16
|
*/
|
|
16
17
|
export abstract class ActionBar extends LitElement {
|
|
17
18
|
/** Specifies an accessible name for the last `calcite-action-group`. */
|
|
18
19
|
accessor actionsEndGroupLabel: string;
|
|
20
|
+
/** Specifies an accessible name for the first `calcite-action-group`. */
|
|
21
|
+
accessor actionsStartGroupLabel: string;
|
|
19
22
|
/**
|
|
20
23
|
* When `true`, the expand-toggling behavior is disabled.
|
|
21
24
|
*
|
|
@@ -29,6 +32,12 @@ export abstract class ActionBar extends LitElement {
|
|
|
29
32
|
* @default false
|
|
30
33
|
*/
|
|
31
34
|
accessor expanded: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Specifies the position of the expand `calcite-action`.
|
|
37
|
+
*
|
|
38
|
+
* @default "end"
|
|
39
|
+
*/
|
|
40
|
+
accessor expandPosition: Extract<"start" | "end", Position>;
|
|
32
41
|
/**
|
|
33
42
|
* When `true`, the component is in a floating state.
|
|
34
43
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { D as DEBOUNCE, c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { debounce } from "es-toolkit";
|
|
4
|
-
import { css, html } from "lit";
|
|
4
|
+
import { css, html, nothing } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { g as getStylePixelValue, s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements, f as focusElementInGroup } from "../../chunks/dom.js";
|
|
8
9
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
9
10
|
import { o as overflowActions, q as queryActions, t as toggleChildActionText, E as ExpandToggle } from "../../chunks/ExpandToggle.js";
|
|
10
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -39,10 +40,12 @@ const getOverflowCount = ({
|
|
|
39
40
|
};
|
|
40
41
|
const CSS = {
|
|
41
42
|
container: "container",
|
|
42
|
-
actionGroupEnd: "action-group--end"
|
|
43
|
+
actionGroupEnd: "action-group--end",
|
|
44
|
+
actionGroupStart: "action-group--start"
|
|
43
45
|
};
|
|
44
46
|
const SLOTS = {
|
|
45
47
|
actionsEnd: "actions-end",
|
|
48
|
+
actionsStart: "actions-start",
|
|
46
49
|
expandTooltip: "expand-tooltip"
|
|
47
50
|
};
|
|
48
51
|
const styles = css`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-bar-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-sm));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm-plus)}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc(var(--calcite-spacing-base) + 1px)}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-action-bar-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
@@ -51,16 +54,20 @@ class ActionBar extends LitElement {
|
|
|
51
54
|
super();
|
|
52
55
|
this.actions = [];
|
|
53
56
|
this.containerRef = createRef();
|
|
57
|
+
this.direction = useDirection();
|
|
54
58
|
this.mutationObserver = createObserver("mutation", () => this.mutationObserverHandler());
|
|
55
59
|
this.cancelable = useCancelable()(this);
|
|
56
60
|
this.resize = debounce(({ width, height }) => {
|
|
57
|
-
const { expanded, expandDisabled, layout, overflowActionsDisabled,
|
|
61
|
+
const { expanded, expandDisabled, layout, overflowActionsDisabled, expandPosition } = this;
|
|
58
62
|
if (overflowActionsDisabled || layout === "vertical" && !height || layout === "horizontal" && !width) {
|
|
59
63
|
return;
|
|
60
64
|
}
|
|
61
|
-
const itemSizes = this.getItemSizes();
|
|
62
65
|
this.updateGroups();
|
|
63
|
-
const
|
|
66
|
+
const itemSizes = this.getItemSizes();
|
|
67
|
+
const { actionGroups } = this;
|
|
68
|
+
const actionsEndCount = this.hasActionsEnd || !expandDisabled && expandPosition === "end" ? 1 : 0;
|
|
69
|
+
const actionsStartCount = this.hasActionsStart || !expandDisabled && expandPosition === "start" ? 1 : 0;
|
|
70
|
+
const groupCount = actionGroups.length + actionsEndCount + actionsStartCount;
|
|
64
71
|
let bufferSize = groupCount;
|
|
65
72
|
const actionBarContainerStyle = getComputedStyle(this.containerRef.value);
|
|
66
73
|
bufferSize += getStylePixelValue(layout === "horizontal" ? actionBarContainerStyle.paddingInlineStart : actionBarContainerStyle.paddingBlockStart) + getStylePixelValue(layout === "horizontal" ? actionBarContainerStyle.paddingInlineEnd : actionBarContainerStyle.paddingBlockEnd);
|
|
@@ -107,9 +114,11 @@ class ActionBar extends LitElement {
|
|
|
107
114
|
this.expandToggleEl = el;
|
|
108
115
|
};
|
|
109
116
|
this.hasActionsEnd = false;
|
|
117
|
+
this.hasActionsStart = false;
|
|
110
118
|
this.floating = false;
|
|
111
119
|
this.expandDisabled = false;
|
|
112
120
|
this.expanded = false;
|
|
121
|
+
this.expandPosition = "end";
|
|
113
122
|
this.layout = "vertical";
|
|
114
123
|
this.overflowActionsDisabled = false;
|
|
115
124
|
this.overlayPositioning = "absolute";
|
|
@@ -122,7 +131,7 @@ class ActionBar extends LitElement {
|
|
|
122
131
|
this.listen("keydown", this.handleKeyDown);
|
|
123
132
|
}
|
|
124
133
|
static {
|
|
125
|
-
this.properties = { expandTooltip: [16, {}, { state: true }], hasActionsEnd: [16, {}, { state: true }], actionsEndGroupLabel: 1, floating: [7, {}, { reflect: true, type: Boolean }], expandDisabled: [7, {}, { reflect: true, type: Boolean }], expanded: [7, {}, { reflect: true, type: Boolean }], layout: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overflowActionsDisabled: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], position: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }] };
|
|
134
|
+
this.properties = { expandTooltip: [16, {}, { state: true }], hasActionsEnd: [16, {}, { state: true }], hasActionsStart: [16, {}, { state: true }], actionsEndGroupLabel: 1, actionsStartGroupLabel: 1, floating: [7, {}, { reflect: true, type: Boolean }], expandDisabled: [7, {}, { reflect: true, type: Boolean }], expanded: [7, {}, { reflect: true, type: Boolean }], expandPosition: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overflowActionsDisabled: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], position: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }] };
|
|
126
135
|
}
|
|
127
136
|
static {
|
|
128
137
|
this.styles = styles;
|
|
@@ -143,7 +152,7 @@ class ActionBar extends LitElement {
|
|
|
143
152
|
this.cancelable.add(this.resize);
|
|
144
153
|
}
|
|
145
154
|
willUpdate(changes) {
|
|
146
|
-
if (changes.has("expandDisabled") && (this.hasUpdated || this.expandDisabled !== false)) {
|
|
155
|
+
if (changes.has("expandDisabled") && (this.hasUpdated || this.expandDisabled !== false) || changes.has("expandPosition") && (this.hasUpdated || this.expandPosition !== "end")) {
|
|
147
156
|
this.overflowActions();
|
|
148
157
|
}
|
|
149
158
|
if (changes.has("layout") && (this.hasUpdated || this.layout !== "vertical")) {
|
|
@@ -229,6 +238,11 @@ class ActionBar extends LitElement {
|
|
|
229
238
|
}
|
|
230
239
|
handleActionsEndSlotChange(event) {
|
|
231
240
|
this.hasActionsEnd = slotChangeHasAssignedElement(event);
|
|
241
|
+
this.overflowActions();
|
|
242
|
+
}
|
|
243
|
+
handleActionsStartSlotChange(event) {
|
|
244
|
+
this.hasActionsStart = slotChangeHasAssignedElement(event);
|
|
245
|
+
this.overflowActions();
|
|
232
246
|
}
|
|
233
247
|
handleTooltipSlotChange(event) {
|
|
234
248
|
const tooltips = slotChangeGetAssignedElements(event).filter((el) => el?.matches("calcite-tooltip"));
|
|
@@ -278,13 +292,26 @@ class ActionBar extends LitElement {
|
|
|
278
292
|
action.tabIndex = !action.disabled && action === active ? 0 : -1;
|
|
279
293
|
});
|
|
280
294
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
295
|
+
renderExpandTooltipSlot() {
|
|
296
|
+
return html`<slot name=${SLOTS.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`;
|
|
297
|
+
}
|
|
298
|
+
renderExpandToggle() {
|
|
299
|
+
const { el, expanded, toggleExpand, messages, position, scale } = this;
|
|
300
|
+
return ExpandToggle({ collapseLabel: messages.collapseLabel, collapseText: messages.collapse, direction: this.direction, el, expandLabel: messages.expandLabel, expandText: messages.expand, expanded, position, ref: this.setExpandToggleEl, scale, toggle: toggleExpand, tooltip: this.expandTooltip });
|
|
301
|
+
}
|
|
302
|
+
renderActionsGroup(position) {
|
|
303
|
+
const { expandDisabled, scale, layout, overlayPositioning, expandPosition } = this;
|
|
304
|
+
const isStart = position === "start";
|
|
305
|
+
const hasExpandToggle = !expandDisabled && expandPosition === position;
|
|
306
|
+
const slotName = isStart ? SLOTS.actionsStart : SLOTS.actionsEnd;
|
|
307
|
+
const onSlotChange = isStart ? this.handleActionsStartSlotChange : this.handleActionsEndSlotChange;
|
|
308
|
+
const label = isStart ? this.actionsStartGroupLabel : this.actionsEndGroupLabel;
|
|
309
|
+
const hidden = !hasExpandToggle && !(isStart ? this.hasActionsStart : this.hasActionsEnd);
|
|
310
|
+
const className = isStart ? CSS.actionGroupStart : CSS.actionGroupEnd;
|
|
311
|
+
return html`<calcite-action-group class=${safeClassMap(className)} .hidden=${hidden} .label=${label} .layout=${layout} .overlayPositioning=${overlayPositioning} .scale=${scale}>${isStart && hasExpandToggle ? this.renderExpandToggle() : null}<slot name=${slotName ?? nothing} @slotchange=${onSlotChange}></slot>${hasExpandToggle ? this.renderExpandTooltipSlot() : null}${!isStart && hasExpandToggle ? this.renderExpandToggle() : null}</calcite-action-group>`;
|
|
285
312
|
}
|
|
286
313
|
render() {
|
|
287
|
-
return html`<div .ariaOrientation=${this.layout === "horizontal" ? "horizontal" : "vertical"} class=${safeClassMap(CSS.container)} role=toolbar ${ref(this.containerRef)}
|
|
314
|
+
return html`<div .ariaOrientation=${this.layout === "horizontal" ? "horizontal" : "vertical"} class=${safeClassMap(CSS.container)} role=toolbar ${ref(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderActionsGroup("end")}</div>`;
|
|
288
315
|
}
|
|
289
316
|
}
|
|
290
317
|
customElement("calcite-action-bar", ActionBar);
|
|
@@ -2,7 +2,8 @@
|
|
|
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 {
|
|
5
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
6
|
+
import { a as slotChangeGetAssignedElements, f as focusElementInGroup } from "../../chunks/dom.js";
|
|
6
7
|
import { t as toggleChildActionText, E as ExpandToggle } from "../../chunks/ExpandToggle.js";
|
|
7
8
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
8
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -21,6 +22,7 @@ class ActionPad extends LitElement {
|
|
|
21
22
|
constructor() {
|
|
22
23
|
super();
|
|
23
24
|
this.actions = [];
|
|
25
|
+
this.direction = useDirection();
|
|
24
26
|
this.mutationObserver = createObserver("mutation", () => this.mutationObserverHandler());
|
|
25
27
|
this.toggleExpand = () => {
|
|
26
28
|
this.expanded = !this.expanded;
|
|
@@ -165,7 +167,7 @@ class ActionPad extends LitElement {
|
|
|
165
167
|
}
|
|
166
168
|
renderBottomActionGroup() {
|
|
167
169
|
const { expanded, expandDisabled, messages, el, position, toggleExpand, scale, layout, actionsEndGroupLabel, overlayPositioning } = this;
|
|
168
|
-
const expandToggleNode = !expandDisabled ? ExpandToggle({ collapseLabel: messages.collapseLabel, collapseText: messages.collapse, el, expandLabel: messages.expandLabel, expandText: messages.expand, expanded, position, scale, toggle: toggleExpand, tooltip: this.expandTooltip }) : null;
|
|
170
|
+
const expandToggleNode = !expandDisabled ? ExpandToggle({ collapseLabel: messages.collapseLabel, collapseText: messages.collapse, direction: this.direction, el, expandLabel: messages.expandLabel, expandText: messages.expand, expanded, position, scale, toggle: toggleExpand, tooltip: this.expandTooltip }) : null;
|
|
169
171
|
return expandToggleNode ? html`<calcite-action-group class=${safeClassMap(CSS.actionGroupEnd)} .label=${actionsEndGroupLabel} .layout=${layout} .overlayPositioning=${overlayPositioning} .scale=${scale}><slot name=${SLOTS.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${expandToggleNode}</calcite-action-group>` : null;
|
|
170
172
|
}
|
|
171
173
|
render() {
|
|
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { css, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import { s as slotChangeHasAssignedElement,
|
|
7
|
+
import { s as slotChangeHasAssignedElement, b as setRequestedIcon } from "../../chunks/dom.js";
|
|
8
8
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
9
9
|
import { N as NumberStringFormat } from "../../chunks/locale.js";
|
|
10
10
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { repeat } from "lit/directives/repeat.js";
|
|
4
4
|
import { css, nothing, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
6
|
-
import { useWatchAttributes } from "@arcgis/lumina/controllers";
|
|
6
|
+
import { useWatchAttributes, useDirection } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { debounce } from "es-toolkit";
|
|
8
8
|
import { escapeRegExp } from "es-toolkit/compat";
|
|
9
9
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
@@ -50,6 +50,7 @@ class Autocomplete extends LitElement {
|
|
|
50
50
|
super();
|
|
51
51
|
this.guid = guid();
|
|
52
52
|
this.attributeWatch = useWatchAttributes(["autofocus", "enterkeyhint", "inputmode"], this.handleGlobalAttributesChanged);
|
|
53
|
+
this.direction = useDirection();
|
|
53
54
|
this.inputId = IDS.input(this.guid);
|
|
54
55
|
this.listId = IDS.list(this.guid);
|
|
55
56
|
this.messages = useT9n();
|
|
@@ -123,6 +124,7 @@ class Autocomplete extends LitElement {
|
|
|
123
124
|
async reposition(delayed = false) {
|
|
124
125
|
const { floatingEl, referenceEl, placement, overlayPositioning, flipPlacements } = this;
|
|
125
126
|
return reposition(this, {
|
|
127
|
+
direction: this.direction,
|
|
126
128
|
floatingEl,
|
|
127
129
|
referenceEl,
|
|
128
130
|
overlayPositioning,
|
|
@@ -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, nothing, safeClassMap, safeStyleMap } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { d as getModeName } from "../../chunks/dom.js";
|
|
6
6
|
import { h as hexToRGB, i as isValidHex } from "../../chunks/utils.js";
|
|
7
7
|
const CSS = {
|
|
8
8
|
thumbnail: "thumbnail",
|
|
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { ref } from "lit/directives/ref.js";
|
|
5
5
|
import { css, html, nothing } from "lit";
|
|
6
6
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
7
|
-
import { s as slotChangeHasAssignedElement,
|
|
7
|
+
import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
8
8
|
import { H as Heading } from "../../chunks/Heading.js";
|
|
9
9
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
10
10
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
@@ -5,7 +5,7 @@ import { css, html } from "lit";
|
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
7
7
|
import { d as disconnectSortableComponent, c as connectSortableComponent } from "../../chunks/sortableComponent.js";
|
|
8
|
-
import {
|
|
8
|
+
import { e as getRootNode, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
9
9
|
import { g as guid } from "../../chunks/guid.js";
|
|
10
10
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
11
11
|
import { u as useCancelable } from "../../chunks/useCancelable.js";
|
|
@@ -10,7 +10,7 @@ import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../.
|
|
|
10
10
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
11
11
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
12
12
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
13
|
-
import {
|
|
13
|
+
import { h as hasVisibleContent } from "../../chunks/dom.js";
|
|
14
14
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
15
15
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
16
16
|
const CSS = {
|
|
@@ -4,7 +4,8 @@ import { repeat } from "lit/directives/repeat.js";
|
|
|
4
4
|
import { css, nothing, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { w as whenAnimationDone, a as slotChangeGetAssignedElements, f as focusElementInGroup } from "../../chunks/dom.js";
|
|
8
9
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
10
11
|
import { b as breakpoints } from "../../chunks/responsive.js";
|
|
@@ -63,6 +64,7 @@ class Carousel extends LitElement {
|
|
|
63
64
|
};
|
|
64
65
|
this.containerRef = createRef();
|
|
65
66
|
this.containerId = IDS.host(guid());
|
|
67
|
+
this.direction = useDirection();
|
|
66
68
|
this.itemContainerRef = createRef();
|
|
67
69
|
this.resizeHandler = ({ contentRect: { width } }) => {
|
|
68
70
|
this.setMaxItemsToBreakpoint(width);
|
|
@@ -77,7 +79,7 @@ class Carousel extends LitElement {
|
|
|
77
79
|
if (notSuspended) {
|
|
78
80
|
if (time <= 0.01) {
|
|
79
81
|
time = 1;
|
|
80
|
-
this.
|
|
82
|
+
this.itemDirection = "forward";
|
|
81
83
|
this.nextItem(false);
|
|
82
84
|
} else {
|
|
83
85
|
time = time - 0.01;
|
|
@@ -90,7 +92,7 @@ class Carousel extends LitElement {
|
|
|
90
92
|
this.messages = useT9n();
|
|
91
93
|
this.focusSetter = useSetFocus()(this);
|
|
92
94
|
this.interactiveContainer = useInteractive(this);
|
|
93
|
-
this.
|
|
95
|
+
this.itemDirection = "standby";
|
|
94
96
|
this.hasMultiple = false;
|
|
95
97
|
this.items = [];
|
|
96
98
|
this.maxItems = centerItemsByBreakpoint.xxsmall;
|
|
@@ -113,7 +115,7 @@ class Carousel extends LitElement {
|
|
|
113
115
|
this.calciteCarouselStop = createEvent({ cancelable: false });
|
|
114
116
|
}
|
|
115
117
|
static {
|
|
116
|
-
this.properties = {
|
|
118
|
+
this.properties = { itemDirection: [16, {}, { state: true }], hasMultiple: [16, {}, { state: true }], items: [16, {}, { state: true }], maxItems: [16, {}, { state: true }], playing: [16, {}, { state: true }], selectedIndex: [16, {}, { state: true }], slideDurationRemaining: [16, {}, { state: true }], suspendedDueToFocus: [16, {}, { state: true }], suspendedDueToHover: [16, {}, { state: true }], suspendedSlideDurationRemaining: [16, {}, { state: true }], userPreventsSuspend: [16, {}, { state: true }], arrowType: [3, {}, { reflect: true }], autoplay: [3, {}, { reflect: true }], autoplayDuration: [11, {}, { type: Number, reflect: true }], controlOverlay: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, messageOverrides: [0, {}, { attribute: false }], paginationDisabled: [5, {}, { type: Boolean }], paused: [5, {}, { type: Boolean }], selectedItem: [0, {}, { attribute: false }] };
|
|
117
119
|
}
|
|
118
120
|
static {
|
|
119
121
|
this.styles = styles;
|
|
@@ -151,8 +153,8 @@ class Carousel extends LitElement {
|
|
|
151
153
|
if (changes.has("autoplay") && this.hasUpdated) {
|
|
152
154
|
this.autoplayWatcher(this.autoplay);
|
|
153
155
|
}
|
|
154
|
-
if (changes.has("
|
|
155
|
-
this.
|
|
156
|
+
if (changes.has("itemDirection") && (this.hasUpdated || this.itemDirection !== "standby")) {
|
|
157
|
+
this.itemDirectionWatcher(this.itemDirection);
|
|
156
158
|
}
|
|
157
159
|
if (changes.has("playing") && (this.hasUpdated || this.playing !== false)) {
|
|
158
160
|
this.paused = !this.playing;
|
|
@@ -171,12 +173,12 @@ class Carousel extends LitElement {
|
|
|
171
173
|
this.handlePause(false);
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
|
-
async
|
|
175
|
-
if (
|
|
176
|
+
async itemDirectionWatcher(itemDirection) {
|
|
177
|
+
if (itemDirection === "standby" || !this.itemContainerRef.value) {
|
|
176
178
|
return;
|
|
177
179
|
}
|
|
178
|
-
await whenAnimationDone(this.itemContainerRef.value,
|
|
179
|
-
this.
|
|
180
|
+
await whenAnimationDone(this.itemContainerRef.value, itemDirection === "forward" ? "item-forward" : "item-backward");
|
|
181
|
+
this.itemDirection = "standby";
|
|
180
182
|
}
|
|
181
183
|
suspendWatcher() {
|
|
182
184
|
if (!this.suspendedDueToFocus && !this.suspendedDueToHover) {
|
|
@@ -271,15 +273,15 @@ class Carousel extends LitElement {
|
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
handleArrowClick(event) {
|
|
274
|
-
const direction = event.target.dataset.
|
|
276
|
+
const direction = event.target.dataset.itemDirection;
|
|
275
277
|
if (this.playing) {
|
|
276
278
|
this.handlePause(true);
|
|
277
279
|
}
|
|
278
280
|
if (direction === "next") {
|
|
279
|
-
this.
|
|
281
|
+
this.itemDirection = "forward";
|
|
280
282
|
this.nextItem(true);
|
|
281
283
|
} else if (direction === "previous") {
|
|
282
|
-
this.
|
|
284
|
+
this.itemDirection = "backward";
|
|
283
285
|
this.previousItem();
|
|
284
286
|
}
|
|
285
287
|
}
|
|
@@ -292,7 +294,7 @@ class Carousel extends LitElement {
|
|
|
292
294
|
if (this.playing) {
|
|
293
295
|
this.handlePause(true);
|
|
294
296
|
}
|
|
295
|
-
this.
|
|
297
|
+
this.itemDirection = requestedPosition > this.selectedIndex ? "forward" : "backward";
|
|
296
298
|
this.setSelectedItem(requestedPosition, true);
|
|
297
299
|
}
|
|
298
300
|
toggleRotation() {
|
|
@@ -361,7 +363,7 @@ class Carousel extends LitElement {
|
|
|
361
363
|
if (!this.hasMultiple) {
|
|
362
364
|
return;
|
|
363
365
|
}
|
|
364
|
-
this.
|
|
366
|
+
this.itemDirection = "forward";
|
|
365
367
|
this.nextItem(true);
|
|
366
368
|
break;
|
|
367
369
|
case "ArrowLeft":
|
|
@@ -369,7 +371,7 @@ class Carousel extends LitElement {
|
|
|
369
371
|
if (!this.hasMultiple) {
|
|
370
372
|
return;
|
|
371
373
|
}
|
|
372
|
-
this.
|
|
374
|
+
this.itemDirection = "backward";
|
|
373
375
|
this.previousItem();
|
|
374
376
|
break;
|
|
375
377
|
case "Home":
|
|
@@ -377,7 +379,7 @@ class Carousel extends LitElement {
|
|
|
377
379
|
if (this.selectedIndex === 0) {
|
|
378
380
|
return;
|
|
379
381
|
}
|
|
380
|
-
this.
|
|
382
|
+
this.itemDirection = "backward";
|
|
381
383
|
this.setSelectedItem(0, true);
|
|
382
384
|
break;
|
|
383
385
|
case "End":
|
|
@@ -385,7 +387,7 @@ class Carousel extends LitElement {
|
|
|
385
387
|
if (this.selectedIndex === lastItem) {
|
|
386
388
|
return;
|
|
387
389
|
}
|
|
388
|
-
this.
|
|
390
|
+
this.itemDirection = "forward";
|
|
389
391
|
this.setSelectedItem(lastItem, true);
|
|
390
392
|
break;
|
|
391
393
|
}
|
|
@@ -462,25 +464,25 @@ class Carousel extends LitElement {
|
|
|
462
464
|
};
|
|
463
465
|
return html`<div aria-live=off class=${safeClassMap(CSS.paginationAriaLive)} role=status>${messages.paginationStatus.replace("{current}", numberStringFormatter.localize(`${selectedIndex + 1}`)).replace("{total}", numberStringFormatter.localize(`${items.length}`))}</div>`;
|
|
464
466
|
}
|
|
465
|
-
renderArrow(
|
|
466
|
-
const isPrev =
|
|
467
|
-
const dir =
|
|
467
|
+
renderArrow(itemDirection) {
|
|
468
|
+
const isPrev = itemDirection === "previous";
|
|
469
|
+
const dir = this.direction;
|
|
468
470
|
const scale = this.arrowType === "edge" ? "m" : "s";
|
|
469
471
|
const css2 = isPrev ? CSS.pagePrevious : CSS.pageNext;
|
|
470
472
|
const title = isPrev ? this.messages.previous : this.messages.next;
|
|
471
473
|
const icon = isPrev ? ICONS.chevronLeft : ICONS.chevronRight;
|
|
472
|
-
return html`<button aria-controls=${this.containerId ?? nothing} class=${safeClassMap({ [CSS.paginationItem]: true, [css2]: true })} data-direction=${
|
|
474
|
+
return html`<button aria-controls=${this.containerId ?? nothing} class=${safeClassMap({ [CSS.paginationItem]: true, [css2]: true })} data-item-direction=${itemDirection ?? nothing} @click=${this.handleArrowClick} title=${title ?? nothing}><calcite-icon .flipRtl=${dir === "rtl"} .icon=${icon} .scale=${scale}></calcite-icon></button>`;
|
|
473
475
|
}
|
|
474
476
|
render() {
|
|
475
|
-
const {
|
|
477
|
+
const { itemDirection } = this;
|
|
476
478
|
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaLabel=${this.label} .ariaLive=${this.playing ? "off" : "polite"} .ariaRoleDescription=${this.messages.carousel} class=${safeClassMap({
|
|
477
479
|
[CSS.container]: true,
|
|
478
480
|
[CSS.containerOverlaid]: this.controlOverlay,
|
|
479
481
|
[CSS.containerEdged]: this.arrowType === "edge"
|
|
480
482
|
})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${ref(this.containerRef)}><section class=${safeClassMap({
|
|
481
483
|
[CSS.itemContainer]: true,
|
|
482
|
-
[CSS.itemContainerForward]:
|
|
483
|
-
[CSS.itemContainerBackward]:
|
|
484
|
+
[CSS.itemContainerForward]: itemDirection === "forward",
|
|
485
|
+
[CSS.itemContainerBackward]: itemDirection === "backward"
|
|
484
486
|
})} id=${this.containerId ?? nothing} ${ref(this.itemContainerRef)}><slot @slotchange=${this.handleSlotChange}></slot></section>${this.renderPaginationArea()}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("previous") || ""}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("next") || ""}</div>` });
|
|
485
487
|
}
|
|
486
488
|
}
|
|
@@ -3,7 +3,7 @@ import { C as CSS_UTILITY, c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, svg, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap, nothing } from "@arcgis/lumina";
|
|
6
|
-
import {
|
|
6
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
8
8
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
9
9
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
@@ -20,6 +20,7 @@ class Checkbox extends LitElement {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
this.checkedPath = "M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";
|
|
23
|
+
this.direction = useDirection();
|
|
23
24
|
this.indeterminatePath = "M13 8v1H3V8z";
|
|
24
25
|
this.onLabelClick = () => {
|
|
25
26
|
this.toggle();
|
|
@@ -103,7 +104,7 @@ class Checkbox extends LitElement {
|
|
|
103
104
|
this.calciteInternalCheckboxFocus.emit(true);
|
|
104
105
|
}
|
|
105
106
|
render() {
|
|
106
|
-
const rtl =
|
|
107
|
+
const rtl = this.direction === "rtl";
|
|
107
108
|
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaChecked=${this.checked} .ariaLabel=${getLabelText(this)} .ariaRequired=${this.required} class=${safeClassMap({
|
|
108
109
|
[CSS.toggle]: true,
|
|
109
110
|
[CSS_UTILITY.rtl]: rtl
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, isServer, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
|
-
import {
|
|
6
|
+
import { i as focusElement, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
7
7
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
8
8
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
9
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement, createEvent } from "@arcgis/lumina";
|
|
6
|
-
import { f as focusElementInGroup,
|
|
6
|
+
import { f as focusElementInGroup, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
7
7
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
8
8
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
9
9
|
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;inline-size:100%;flex-wrap:wrap;gap:.5rem}::slotted(calcite-chip){flex:none}:host([scale=s]) .container{gap:.25rem}:host([scale=l]) .container{gap:.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
@@ -7,7 +7,8 @@ import { throttle } from "es-toolkit";
|
|
|
7
7
|
import { css, html, nothing } from "lit";
|
|
8
8
|
import { LitElement, createEvent, safeClassMap, safeStyleMap } from "@arcgis/lumina";
|
|
9
9
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
10
|
-
import {
|
|
10
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
11
|
+
import { j as isPrimaryPointerButton } from "../../chunks/dom.js";
|
|
11
12
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
12
13
|
import { c as clamp, r as remap, a as closeToRangeEdge } from "../../chunks/math.js";
|
|
13
14
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -23,6 +24,7 @@ class ColorPicker extends LitElement {
|
|
|
23
24
|
super();
|
|
24
25
|
this._color = DEFAULT_COLOR;
|
|
25
26
|
this.colorFieldScopeRef = createRef();
|
|
27
|
+
this.direction = useDirection();
|
|
26
28
|
this.hueScopeRef = createRef();
|
|
27
29
|
this.internalColorUpdateContext = null;
|
|
28
30
|
this.isActiveChannelInputEmpty = false;
|
|
@@ -866,7 +868,7 @@ class ColorPicker extends LitElement {
|
|
|
866
868
|
const selected = channelMode === activeChannelMode;
|
|
867
869
|
const isRgb = channelMode === "rgb";
|
|
868
870
|
const channelAriaLabels = isRgb ? [messages.red, messages.green, messages.blue] : [messages.hue, messages.saturation, messages.value];
|
|
869
|
-
const direction =
|
|
871
|
+
const direction = this.direction;
|
|
870
872
|
const channelsToRender = alphaChannel ? channels : channels.slice(0, 3);
|
|
871
873
|
return keyed(channelMode, html`<calcite-tab class=${safeClassMap(CSS.control)} .selected=${selected}><div class=${safeClassMap(CSS.channels)} dir=ltr>${channelsToRender.map((channelValue, index) => {
|
|
872
874
|
const isAlphaChannel = index === 3;
|
|
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import Color from "color";
|
|
5
5
|
import { css, html, nothing, svg } from "lit";
|
|
6
6
|
import { LitElement, safeClassMap } from "@arcgis/lumina";
|
|
7
|
-
import {
|
|
7
|
+
import { d as getModeName } from "../../chunks/dom.js";
|
|
8
8
|
import { b as hexify } from "../../chunks/utils.js";
|
|
9
9
|
const CSS = {
|
|
10
10
|
swatch: "swatch",
|