@esri/calcite-components 5.1.1-next.6 → 5.1.1
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/README.md +1 -1
- package/dist/cdn/{BTSHRUHD.js → 2J4U5E4U.js} +1 -1
- package/dist/cdn/{FZTLSQJL.js → 2JJ5YBBT.js} +1 -1
- package/dist/cdn/{KQGUXAM6.js → 2P3LOGHK.js} +1 -1
- package/dist/cdn/{RIEKXKB2.js → 34ENIUR5.js} +1 -1
- package/dist/cdn/{YNG6JO67.js → 3KWJQXAT.js} +1 -1
- package/dist/cdn/{E4MGJ47Y.js → 3RRY5HHA.js} +1 -1
- package/dist/cdn/{MD2UCHOX.js → 3TYJSBP3.js} +1 -1
- package/dist/cdn/44HFP2I6.js +2 -0
- package/dist/cdn/44VCOKJX.js +2 -0
- package/dist/cdn/{CUSR767T.js → 47Q2AE5B.js} +1 -1
- package/dist/cdn/{CDGEWGDD.js → 4NUFBGFK.js} +1 -1
- package/dist/cdn/{7YNDWV76.js → 4UHTWXNV.js} +1 -1
- package/dist/cdn/{72EJ64LI.js → 524MMG22.js} +1 -1
- package/dist/cdn/{Y6WCKCHJ.js → 5D7IEY6J.js} +1 -1
- package/dist/cdn/{CUTXFNYN.js → 5O6YGOJE.js} +1 -1
- package/dist/cdn/{VCDOY22T.js → 5VAPN2S2.js} +1 -1
- package/dist/cdn/{ZEEFJOPQ.js → 6HRHKHF5.js} +1 -1
- package/dist/cdn/6S3G75WP.js +2 -0
- package/dist/cdn/6SZY5PY7.js +2 -0
- package/dist/cdn/{GEKASHNF.js → 6V3FX2W2.js} +1 -1
- package/dist/cdn/{FE3TGEP7.js → 6VDGKXTH.js} +1 -1
- package/dist/cdn/{HQHM5NWX.js → 6VP3K6WL.js} +1 -1
- package/dist/cdn/{6N246L5H.js → 6X3QWKZL.js} +1 -1
- package/dist/cdn/{ERBKUSSX.js → 6XMUSNRS.js} +1 -1
- package/dist/cdn/{773VWCGD.js → 7B4FOF3S.js} +1 -1
- package/dist/cdn/{SBQVCX2M.js → 7QS3Z4ZJ.js} +1 -1
- package/dist/cdn/{34WAUXUE.js → 7SDGC2RW.js} +1 -1
- package/dist/cdn/A6V4I2J3.js +2 -0
- package/dist/cdn/{QN4XN67Z.js → ALLL4LZ4.js} +1 -1
- package/dist/cdn/BCRYMNH7.js +2 -0
- package/dist/cdn/{CBUNIAKL.js → BSMPD6VA.js} +1 -1
- package/dist/cdn/C462ZIJD.js +2 -0
- package/dist/cdn/{QABVNEOF.js → C4DW27AP.js} +1 -1
- package/dist/cdn/C4OX3FC4.js +2 -0
- package/dist/cdn/{RZR44QGM.js → CDNETLLO.js} +1 -1
- package/dist/cdn/{NDVX6CLP.js → CENYPZ3Y.js} +1 -1
- package/dist/cdn/{RVXZUGJA.js → CEWOZ7LP.js} +1 -1
- package/dist/cdn/{WVJUNLFN.js → CM45J66U.js} +1 -1
- package/dist/cdn/{VYXKMJSU.js → COXLBEPM.js} +1 -1
- package/dist/cdn/CVJBK7K3.js +2 -0
- package/dist/cdn/{RUNWK23I.js → DDUIHGBF.js} +1 -1
- package/dist/cdn/{XCNAJ4XA.js → DK3SDSZL.js} +1 -1
- package/dist/cdn/{DJMAPSDY.js → DP2TY4KH.js} +1 -1
- package/dist/cdn/{TPML2DIA.js → E6X6BQLH.js} +1 -1
- package/dist/cdn/{JMKB4CRU.js → E7GXKIIO.js} +1 -1
- package/dist/cdn/{3XFDQDVC.js → ECVX7SVS.js} +1 -1
- package/dist/cdn/{UE4QYUAU.js → ELXBBUY5.js} +1 -1
- package/dist/cdn/{F5MS5PBN.js → EQKCU4NC.js} +1 -1
- package/dist/cdn/{SH7DQCS7.js → ETEMG44R.js} +1 -1
- package/dist/cdn/{MWMTHMMN.js → G2G6FHMB.js} +1 -1
- package/dist/cdn/{VVJGLEIA.js → GCAYSD7G.js} +1 -1
- package/dist/cdn/{YBFI2FQL.js → GDFQSWZ7.js} +1 -1
- package/dist/cdn/{72XY7IDN.js → GDYGEN45.js} +1 -1
- package/dist/cdn/{G62VTWNT.js → GTH6QFMV.js} +1 -1
- package/dist/cdn/{WAXTXFBL.js → HA65OOQD.js} +1 -1
- package/dist/cdn/HYIVUAZU.js +2 -0
- package/dist/cdn/{UIFHJ5IO.js → I4IDQ735.js} +1 -1
- package/dist/cdn/{O6PZKJ7R.js → ICGT7C6U.js} +1 -1
- package/dist/cdn/{3BUDIEL3.js → ID2LCYSN.js} +1 -1
- package/dist/cdn/{5RJTKL4J.js → IEWVQCQW.js} +1 -1
- package/dist/cdn/{3H6RVKMN.js → IHYNJVS4.js} +1 -1
- package/dist/cdn/{5N32D533.js → IMUM436K.js} +1 -1
- package/dist/cdn/{PJSI5N6F.js → IRANNKJ2.js} +1 -1
- package/dist/cdn/{C4DX6ZIA.js → JCVLN6XL.js} +1 -1
- package/dist/cdn/{5QXKHC54.js → JDVSVNSE.js} +1 -1
- package/dist/cdn/{6MUZLYOR.js → JGCJVDJA.js} +1 -1
- package/dist/cdn/{6UM5PQBD.js → JPPCKAMD.js} +1 -1
- package/dist/cdn/{OWJYARYV.js → JSXQ6NFN.js} +1 -1
- package/dist/cdn/KCN4PBFZ.js +2 -0
- package/dist/cdn/{7M4ANW77.js → KJCVGOXF.js} +1 -1
- package/dist/cdn/{OXKGEAUB.js → KLNQGCK2.js} +1 -1
- package/dist/cdn/KOWFGIAY.js +2 -0
- package/dist/cdn/{Y44WJ7Z2.js → KXD6O3ZI.js} +1 -1
- package/dist/cdn/{TFTS26NS.js → L3D2OBOR.js} +1 -1
- package/dist/cdn/L5IKT3WY.js +2 -0
- package/dist/cdn/LGB6OAXT.js +2 -0
- package/dist/cdn/{3NNR2AZU.js → LI2CATYC.js} +1 -1
- package/dist/cdn/{4NYY44U4.js → LJSR66HF.js} +1 -1
- package/dist/cdn/{YFUBBPNI.js → LKYA2H2B.js} +1 -1
- package/dist/cdn/{MRRVOAJL.js → LOJBKHVF.js} +1 -1
- package/dist/cdn/{A332WZ6V.js → MHE72N53.js} +1 -1
- package/dist/cdn/{REW7C42W.js → MW5MGBT4.js} +1 -1
- package/dist/cdn/{5SYOHCLD.js → NBAYHB3K.js} +1 -1
- package/dist/cdn/{3VNZC64N.js → NCSMOKFP.js} +1 -1
- package/dist/cdn/{XTGDCTQE.js → NG7BG3QY.js} +1 -1
- package/dist/cdn/NL77UDLL.js +2 -0
- package/dist/cdn/{D2HPEC7F.js → NTD2BJWG.js} +1 -1
- package/dist/cdn/{FKX46Z6K.js → ODGJXDZK.js} +1 -1
- package/dist/cdn/{OGNY6ZIB.js → ORIGVFX7.js} +1 -1
- package/dist/cdn/{N6V2UT62.js → OWIJSXYV.js} +1 -1
- package/dist/cdn/{EJUEMY56.js → OXCL3M4W.js} +1 -1
- package/dist/cdn/{I2DNOFC6.js → PB3LTBSS.js} +1 -1
- package/dist/cdn/{PW2XM5HR.js → PHEMAFCT.js} +1 -1
- package/dist/cdn/{FKPCRFUW.js → PIR7PWBO.js} +1 -1
- package/dist/cdn/PM5MZR4Z.js +2 -0
- package/dist/cdn/{TQJK5WF5.js → Q4V5DVKS.js} +1 -1
- package/dist/cdn/{YI3ZMHS5.js → Q56UST3A.js} +1 -1
- package/dist/cdn/{TMWGSGAP.js → QC5NB4VL.js} +1 -1
- package/dist/cdn/{5L5RJCKK.js → QEJBAQOY.js} +1 -1
- package/dist/cdn/{JDAOWOTY.js → QGF4JJQO.js} +1 -1
- package/dist/cdn/{DZSC3TJX.js → QZJ7GLQ3.js} +1 -1
- package/dist/cdn/RK2LH73E.js +2 -0
- package/dist/cdn/{5CBFI2KM.js → ROJYTRK6.js} +1 -1
- package/dist/cdn/{DAXLXKIY.js → RRKFBHMW.js} +1 -1
- package/dist/cdn/{KCENWQ6Z.js → RUUD543Z.js} +1 -1
- package/dist/cdn/{N3YQ6P66.js → S2BIRHQ7.js} +1 -1
- package/dist/cdn/{CQYI4Z2Z.js → SJCWFQNF.js} +1 -1
- package/dist/cdn/SNJLHXVG.js +2 -0
- package/dist/cdn/{IXQQO6HC.js → SNY2QKQJ.js} +1 -1
- package/dist/cdn/{27MK2V4G.js → ST6WRTR2.js} +1 -1
- package/dist/cdn/{WYGNUS2B.js → SW5TNX5V.js} +1 -1
- package/dist/cdn/SXXFODM6.js +2 -0
- package/dist/cdn/{4Q7PL2KY.js → TKK3AWQJ.js} +1 -1
- package/dist/cdn/{45C4ENM6.js → TTCZVBEF.js} +1 -1
- package/dist/cdn/TV47CRME.js +2 -0
- package/dist/cdn/{DEQNFOAS.js → TVU7KEKM.js} +1 -1
- package/dist/cdn/{C4PPQBLW.js → TVYIJRI2.js} +1 -1
- package/dist/cdn/{3XMNPYNB.js → TWVXE232.js} +1 -1
- package/dist/cdn/{32QFEQZS.js → TYQB2FN4.js} +1 -1
- package/dist/cdn/{ZBN5LXKS.js → U4GRIQVY.js} +1 -1
- package/dist/cdn/{Z2GSU7Q2.js → U7OJQ4EC.js} +1 -1
- package/dist/cdn/UCWB5EGV.js +2 -0
- package/dist/cdn/{CZPSEMDH.js → UTVGUMUM.js} +1 -1
- package/dist/cdn/{NAJTDRNC.js → V3X47NBI.js} +1 -1
- package/dist/cdn/{R4C3WA5S.js → V7PYDILT.js} +1 -1
- package/dist/cdn/{5JIKOOZ6.js → V7YPIVAX.js} +1 -1
- package/dist/cdn/{ROY5CHB3.js → VDJMOKVP.js} +1 -1
- package/dist/cdn/{2MRL4RKW.js → VEZBAZZG.js} +1 -1
- package/dist/cdn/VXBJOP6X.js +2 -0
- package/dist/cdn/{74UIHSVE.js → VZ2YR2UG.js} +1 -1
- package/dist/cdn/{KB2WIMAL.js → W57IL7KF.js} +1 -1
- package/dist/cdn/{5WFJNGXP.js → WCUO6JQN.js} +1 -1
- package/dist/cdn/{F3E7QPPC.js → WER7FADP.js} +1 -1
- package/dist/cdn/{F7RQCNJ4.js → WQCT4VLB.js} +1 -1
- package/dist/cdn/X3HV2NYH.js +2 -0
- package/dist/cdn/{SGZ3IG5W.js → XRUJ4D7O.js} +1 -1
- package/dist/cdn/{EHS7L663.js → XT4GLBAQ.js} +1 -1
- package/dist/cdn/{GYYFBZS2.js → Y7O6UR4T.js} +1 -1
- package/dist/cdn/{IHGSINVA.js → YHAJICJ2.js} +1 -1
- package/dist/cdn/{IRDSJTUK.js → YKL7MIG5.js} +1 -1
- package/dist/cdn/YYAYEKGB.js +2 -0
- package/dist/cdn/{TRN7FUFM.js → Z3IP3JBL.js} +1 -1
- package/dist/cdn/ZK2W2KJX.js +2 -0
- package/dist/cdn/ZOEJDQXA.js +2 -0
- package/dist/cdn/{RDOHAXOA.js → ZRMTOZ3B.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/date.js +3 -3
- package/dist/chunks/dom.js +3 -15
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/label.js +6 -6
- package/dist/chunks/locale.js +6 -3
- package/dist/chunks/manager.js +5 -5
- package/dist/chunks/resources10.js +63 -0
- package/dist/chunks/resources5.js +27 -52
- package/dist/chunks/resources6.js +48 -45
- package/dist/chunks/resources7.js +49 -7
- package/dist/chunks/resources8.js +9 -11
- package/dist/chunks/resources9.js +4 -48
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useTime.js +45 -40
- package/dist/chunks/utils2.js +59 -6
- 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 +4 -6
- 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-card/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +6 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -4
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -27
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +292 -143
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +11 -2
- package/dist/components/calcite-dialog/customElement.js +8 -8
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +2 -2
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +2 -2
- package/dist/components/calcite-input/customElement.js +5 -2
- package/dist/components/calcite-input-date-picker/customElement.js +5 -10
- package/dist/components/calcite-input-text/customElement.js +2 -2
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.d.ts +4 -4
- package/dist/components/calcite-list/customElement.js +6 -5
- package/dist/components/calcite-list-item/customElement.d.ts +6 -6
- package/dist/components/calcite-list-item/customElement.js +16 -13
- package/dist/components/calcite-list-item-group/customElement.d.ts +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +3 -3
- package/dist/components/calcite-menu-item/customElement.d.ts +7 -7
- package/dist/components/calcite-menu-item/customElement.js +0 -3
- package/dist/components/calcite-meter/customElement.d.ts +6 -6
- package/dist/components/calcite-meter/customElement.js +7 -14
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +0 -3
- package/dist/components/calcite-panel/customElement.d.ts +6 -6
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.d.ts +4 -4
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.d.ts +2 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +5 -5
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -4
- package/dist/components/calcite-radio-button-group/customElement.js +3 -3
- package/dist/components/calcite-rating/customElement.d.ts +7 -7
- package/dist/components/calcite-rating/customElement.js +9 -13
- package/dist/components/calcite-sheet/customElement.js +27 -32
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -2
- package/dist/components/calcite-tab-nav/customElement.d.ts +3 -3
- package/dist/components/calcite-tab-nav/customElement.js +7 -12
- package/dist/components/calcite-tab-title/customElement.d.ts +3 -3
- package/dist/components/calcite-tab-title/customElement.js +0 -2
- package/dist/components/calcite-table/customElement.js +14 -22
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-cell/customElement.js +0 -6
- package/dist/components/calcite-table-header/customElement.d.ts +4 -4
- package/dist/components/calcite-table-header/customElement.js +0 -2
- package/dist/components/calcite-table-row/customElement.js +3 -5
- package/dist/components/calcite-tabs/customElement.js +2 -3
- package/dist/components/calcite-text-area/customElement.d.ts +12 -12
- package/dist/components/calcite-text-area/customElement.js +3 -5
- package/dist/components/calcite-tile/customElement.d.ts +6 -6
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +15 -35
- package/dist/components/calcite-tooltip/customElement.d.ts +2 -2
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +6 -7
- package/dist/components/calcite-tree-item/customElement.d.ts +3 -3
- package/dist/components/calcite-tree-item/customElement.js +6 -12
- package/dist/controllers/useSortable.d.ts +2 -2
- package/dist/controllers/useTime.d.ts +20 -20
- 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.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/utils/dom.d.ts +1 -1
- package/package.json +9 -8
- package/dist/cdn/2PEF7GQE.js +0 -2
- package/dist/cdn/2VL3OCAZ.js +0 -2
- package/dist/cdn/6W4CWLXH.js +0 -2
- package/dist/cdn/73EQ5TEB.js +0 -2
- package/dist/cdn/74CLXGQH.js +0 -2
- package/dist/cdn/7AOQ4FPG.js +0 -2
- package/dist/cdn/ATWAUE4R.js +0 -2
- package/dist/cdn/BZJYGCDK.js +0 -2
- package/dist/cdn/C2BK5CUC.js +0 -2
- package/dist/cdn/I5HZNPIE.js +0 -2
- package/dist/cdn/JQIHTMWX.js +0 -2
- package/dist/cdn/KJNTF66K.js +0 -2
- package/dist/cdn/M2TFDONT.js +0 -2
- package/dist/cdn/OB3Z74X6.js +0 -2
- package/dist/cdn/OJO5NPP3.js +0 -2
- package/dist/cdn/QXPWDVC2.js +0 -2
- package/dist/cdn/SS4J7QES.js +0 -2
- package/dist/cdn/U6NA5WAH.js +0 -2
- package/dist/cdn/UOSSQPFY.js +0 -2
- package/dist/cdn/VWQPK5JA.js +0 -2
- package/dist/cdn/VYZ6WAWT.js +0 -2
- package/dist/cdn/W3N2DKPC.js +0 -2
- package/dist/cdn/WRQD4O6A.js +0 -2
- package/dist/cdn/WUBPEGFV.js +0 -2
- package/dist/cdn/Z7NNDJEN.js +0 -2
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly16.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly24.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly32.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer16.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer24.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer32.json +0 -1
- /package/dist/cdn/{IYGANVDT.js → 72YUATHS.js} +0 -0
- /package/dist/cdn/{MYDCGCGV.js → IIA2H2SU.js} +0 -0
- /package/dist/cdn/{DCWL5FUH.js → LKL63VXR.js} +0 -0
- /package/dist/cdn/{UM6KICQF.js → MO64UYDH.js} +0 -0
- /package/dist/cdn/{R6HABYRV.js → Q55YTOMB.js} +0 -0
|
@@ -90,16 +90,12 @@ class Rating extends LitElement {
|
|
|
90
90
|
willUpdate() {
|
|
91
91
|
this.starsMap = Array.from({ length: this.max }, (_, i) => {
|
|
92
92
|
const value = i + 1;
|
|
93
|
-
const
|
|
94
|
-
const hasHoverValue = hoverValue > 0;
|
|
95
|
-
const hasAverage = this.average != null;
|
|
96
|
-
const averageValue = this.average ?? 0;
|
|
97
|
-
const average = !hasHoverValue && hasAverage && !this.value && value <= averageValue;
|
|
93
|
+
const average = !this.hoverValue && this.average && !this.value && value <= this.average;
|
|
98
94
|
const checked = value === this.value;
|
|
99
|
-
const fraction =
|
|
100
|
-
const hovered =
|
|
95
|
+
const fraction = this.average && this.average + 1 - value;
|
|
96
|
+
const hovered = value <= this.hoverValue;
|
|
101
97
|
const id = `${this.guid}-${value}`;
|
|
102
|
-
const partial = !
|
|
98
|
+
const partial = !this.hoverValue && !this.value && !hovered && fraction > 0 && fraction < 1;
|
|
103
99
|
const selected = this.value >= value;
|
|
104
100
|
const tabIndex = this.getTabIndex(value);
|
|
105
101
|
return {
|
|
@@ -137,7 +133,7 @@ class Rating extends LitElement {
|
|
|
137
133
|
}
|
|
138
134
|
handleRatingPointerOut() {
|
|
139
135
|
this.isKeyboardInteraction = true;
|
|
140
|
-
this.hoverValue =
|
|
136
|
+
this.hoverValue = null;
|
|
141
137
|
}
|
|
142
138
|
handleHostKeyDown() {
|
|
143
139
|
this.isKeyboardInteraction = true;
|
|
@@ -145,7 +141,7 @@ class Rating extends LitElement {
|
|
|
145
141
|
handleLabelKeyDown(event) {
|
|
146
142
|
const inputValue = this.getValueFromLabelEvent(event);
|
|
147
143
|
const key = event.key;
|
|
148
|
-
const numberKey = key == " " ?
|
|
144
|
+
const numberKey = key == " " ? void 0 : Number(key);
|
|
149
145
|
this.emit = true;
|
|
150
146
|
if (isNaN(numberKey)) {
|
|
151
147
|
switch (key) {
|
|
@@ -164,7 +160,7 @@ class Rating extends LitElement {
|
|
|
164
160
|
event.preventDefault();
|
|
165
161
|
break;
|
|
166
162
|
case "Tab":
|
|
167
|
-
this.hoverValue =
|
|
163
|
+
this.hoverValue = null;
|
|
168
164
|
break;
|
|
169
165
|
}
|
|
170
166
|
} else {
|
|
@@ -178,7 +174,7 @@ class Rating extends LitElement {
|
|
|
178
174
|
}
|
|
179
175
|
handleInputChange(event) {
|
|
180
176
|
if (this.isKeyboardInteraction === true) {
|
|
181
|
-
const inputVal = Number(event.target
|
|
177
|
+
const inputVal = Number(event.target["value"]);
|
|
182
178
|
this.hoverValue = inputVal;
|
|
183
179
|
this.value = inputVal;
|
|
184
180
|
}
|
|
@@ -203,7 +199,7 @@ class Rating extends LitElement {
|
|
|
203
199
|
}
|
|
204
200
|
updateFocus() {
|
|
205
201
|
this.hoverValue = this.value;
|
|
206
|
-
this.labelElements[this.value - 1]
|
|
202
|
+
this.labelElements[this.value - 1].focus();
|
|
207
203
|
}
|
|
208
204
|
getTabIndex(value) {
|
|
209
205
|
if (this.readOnly || this.value !== value && (this.value || value !== 1)) {
|
|
@@ -138,16 +138,14 @@ class Sheet extends LitElement {
|
|
|
138
138
|
connectedCallback() {
|
|
139
139
|
super.connectedCallback();
|
|
140
140
|
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
|
|
141
|
-
|
|
142
|
-
this.refreshResize();
|
|
143
|
-
}
|
|
141
|
+
this.setupInteractions();
|
|
144
142
|
}
|
|
145
143
|
willUpdate(changes) {
|
|
146
144
|
if (changes.has("opened") && (this.hasUpdated || this.opened !== false) && this.transitionRef.value) {
|
|
147
145
|
toggleOpenClose(this);
|
|
148
146
|
}
|
|
149
147
|
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")) {
|
|
150
|
-
this.
|
|
148
|
+
this.setupInteractions();
|
|
151
149
|
}
|
|
152
150
|
if (this.contentRef.value) {
|
|
153
151
|
this.contentId = ensureId(this.contentRef.value);
|
|
@@ -157,7 +155,7 @@ class Sheet extends LitElement {
|
|
|
157
155
|
super.disconnectedCallback();
|
|
158
156
|
this.mutationObserver?.disconnect();
|
|
159
157
|
this.embedded = false;
|
|
160
|
-
this.
|
|
158
|
+
this.cleanupInteractions();
|
|
161
159
|
}
|
|
162
160
|
async setOpenState(value) {
|
|
163
161
|
if (this.beforeClose && !value) {
|
|
@@ -232,34 +230,31 @@ class Sheet extends LitElement {
|
|
|
232
230
|
}
|
|
233
231
|
this.sizeOverride.resize(size);
|
|
234
232
|
}
|
|
235
|
-
|
|
233
|
+
cleanupInteractions() {
|
|
236
234
|
this.interaction?.unset();
|
|
237
235
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
if (!contentRef.value) {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
const computedStyle = window.getComputedStyle(contentRef.value);
|
|
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
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
refreshResize() {
|
|
254
|
-
this.updateResizeValues();
|
|
255
|
-
this.setUpResizeInteractions();
|
|
256
|
-
}
|
|
257
|
-
setUpResizeInteractions() {
|
|
258
|
-
this.cleanUpInteractions();
|
|
236
|
+
async setupInteractions() {
|
|
237
|
+
this.cleanupInteractions();
|
|
259
238
|
const { contentRef, el, resizable, position, open, resizeHandleEl } = this;
|
|
260
239
|
if (!contentRef.value || !open || !resizable || !resizeHandleEl) {
|
|
261
240
|
return;
|
|
262
241
|
}
|
|
242
|
+
await this.el.componentOnReady();
|
|
243
|
+
const computedStyle = window.getComputedStyle(contentRef.value);
|
|
244
|
+
this.resizeValues.minInlineSize = parseInt(computedStyle.minInlineSize) || 0;
|
|
245
|
+
this.resizeValues.maxInlineSize = parseInt(computedStyle.maxInlineSize) || window.innerWidth;
|
|
246
|
+
this.resizeValues.minBlockSize = parseInt(computedStyle.minBlockSize) || 0;
|
|
247
|
+
this.resizeValues.maxBlockSize = parseInt(computedStyle.maxBlockSize) || window.innerHeight;
|
|
248
|
+
const { inlineSize, minInlineSize, blockSize, minBlockSize, maxInlineSize, maxBlockSize } = computedStyle;
|
|
249
|
+
const values = {
|
|
250
|
+
inlineSize: getStylePixelValue(inlineSize),
|
|
251
|
+
blockSize: getStylePixelValue(blockSize),
|
|
252
|
+
minInlineSize: getStylePixelValue(minInlineSize),
|
|
253
|
+
minBlockSize: getStylePixelValue(minBlockSize),
|
|
254
|
+
maxInlineSize: getStylePixelValue(maxInlineSize) || window.innerWidth,
|
|
255
|
+
maxBlockSize: getStylePixelValue(maxBlockSize) || window.innerHeight
|
|
256
|
+
};
|
|
257
|
+
this.resizeValues = values;
|
|
263
258
|
const rtl = this.direction === "rtl";
|
|
264
259
|
this.interaction = interact(contentRef.value, { context: el.ownerDocument }).resizable({
|
|
265
260
|
edges: {
|
|
@@ -271,12 +266,12 @@ class Sheet extends LitElement {
|
|
|
271
266
|
modifiers: [
|
|
272
267
|
interact.modifiers.restrictSize({
|
|
273
268
|
min: {
|
|
274
|
-
width:
|
|
275
|
-
height:
|
|
269
|
+
width: values.minInlineSize,
|
|
270
|
+
height: values.minBlockSize
|
|
276
271
|
},
|
|
277
272
|
max: {
|
|
278
|
-
width:
|
|
279
|
-
height:
|
|
273
|
+
width: values.maxInlineSize,
|
|
274
|
+
height: values.maxBlockSize
|
|
280
275
|
}
|
|
281
276
|
})
|
|
282
277
|
],
|
|
@@ -309,7 +304,7 @@ class Sheet extends LitElement {
|
|
|
309
304
|
}
|
|
310
305
|
setResizeHandleEl(el) {
|
|
311
306
|
this.resizeHandleEl = el;
|
|
312
|
-
this.
|
|
307
|
+
this.setupInteractions();
|
|
313
308
|
}
|
|
314
309
|
handleOutsideClose() {
|
|
315
310
|
if (this.outsideCloseDisabled) {
|
|
@@ -4,7 +4,7 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { keyed } from "lit/directives/keyed.js";
|
|
5
5
|
import { LitElement, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
7
|
-
import { S as SLOTS, C as CSS } from "../../chunks/
|
|
7
|
+
import { S as SLOTS, C as CSS } from "../../chunks/resources9.js";
|
|
8
8
|
const styles = css`:host([disabled]) .content{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) .content *,:host([disabled]) .content ::slotted(*){pointer-events:none}:host{display:flex;flex:1 1 0%;flex-direction:column}.container{display:flex;flex:1 1 auto;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);padding-inline:var(--calcite-stack-padding-inline, .75rem);padding-block:var(--calcite-stack-padding-block, .5rem)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:0 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:.75rem;align-self:center}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
9
9
|
class Stack extends LitElement {
|
|
10
10
|
constructor() {
|
|
@@ -20,7 +20,7 @@ export abstract class Tab extends LitElement {
|
|
|
20
20
|
*
|
|
21
21
|
* When specified, use the same value on the `calcite-tab-title`.
|
|
22
22
|
*/
|
|
23
|
-
accessor tab: string
|
|
23
|
+
accessor tab: string;
|
|
24
24
|
/** Returns the index of the component item within the tab array. */
|
|
25
25
|
getTabIndex(): Promise<number>;
|
|
26
26
|
}
|
|
@@ -17,7 +17,6 @@ class Tab extends LitElement {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
this.guid = IDS.tabTitleId(guid());
|
|
20
|
-
this.parentTabsEl = null;
|
|
21
20
|
this.scale = "m";
|
|
22
21
|
this.selected = false;
|
|
23
22
|
this.listenOn(document.body, "calciteInternalTabChange", this.internalTabChangeHandler);
|
|
@@ -32,7 +31,7 @@ class Tab extends LitElement {
|
|
|
32
31
|
return Array.prototype.indexOf.call(nodeListToArray(this.el.parentElement.children).filter((el) => el.matches("calcite-tab")), this.el);
|
|
33
32
|
}
|
|
34
33
|
_updateAriaInfo(tabIds = [], titleIds = []) {
|
|
35
|
-
this.labeledBy = titleIds[tabIds.indexOf(this.el.id)] ||
|
|
34
|
+
this.labeledBy = titleIds[tabIds.indexOf(this.el.id)] || null;
|
|
36
35
|
}
|
|
37
36
|
connectedCallback() {
|
|
38
37
|
super.connectedCallback();
|
|
@@ -24,11 +24,11 @@ export abstract class TabNav extends LitElement {
|
|
|
24
24
|
*/
|
|
25
25
|
accessor position: TabPosition;
|
|
26
26
|
/** Specifies the component's selected `calcite-tab-title`. */
|
|
27
|
-
get selectedTitle(): TabTitle
|
|
27
|
+
get selectedTitle(): TabTitle;
|
|
28
28
|
/** Specifies the name when saving selected `calcite-tab` data to `localStorage`. */
|
|
29
|
-
accessor storageId: string
|
|
29
|
+
accessor storageId: string;
|
|
30
30
|
/** Specifies text to update multiple components to keep in sync if one changes. */
|
|
31
|
-
accessor syncId: string
|
|
31
|
+
accessor syncId: string;
|
|
32
32
|
/** Emits when the selected `calcite-tab` changes. */
|
|
33
33
|
readonly calciteTabChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
34
34
|
readonly "@eventTypes": {
|
|
@@ -49,9 +49,9 @@ class TabNav extends LitElement {
|
|
|
49
49
|
this.listen("calciteInternalTabsFocusNext", this.focusNextTabHandler);
|
|
50
50
|
this.listen("calciteInternalTabsFocusFirst", this.focusFirstTabHandler);
|
|
51
51
|
this.listen("calciteInternalTabsFocusLast", this.focusLastTabHandler);
|
|
52
|
-
this.listen("calciteInternalTabTitleRegister", this.updateTabTitles);
|
|
53
52
|
this.listen("calciteInternalTabsActivate", this.internalActivateTabHandler);
|
|
54
53
|
this.listen("calciteInternalTabsClose", this.internalCloseTabHandler);
|
|
54
|
+
this.listen("calciteInternalTabTitleRegister", this.updateTabTitles);
|
|
55
55
|
this.listenOn(document.body, "calciteInternalTabChange", this.globalInternalTabChangeHandler);
|
|
56
56
|
}
|
|
57
57
|
static {
|
|
@@ -62,17 +62,14 @@ class TabNav extends LitElement {
|
|
|
62
62
|
}
|
|
63
63
|
connectedCallback() {
|
|
64
64
|
super.connectedCallback();
|
|
65
|
-
this.parentTabsEl = this.el.closest("calcite-tabs")
|
|
65
|
+
this.parentTabsEl = this.el.closest("calcite-tabs");
|
|
66
66
|
this.resizeObserver?.observe(this.el);
|
|
67
67
|
}
|
|
68
68
|
async load() {
|
|
69
69
|
const storageKey = `calcite-tab-nav-${this.storageId}`;
|
|
70
|
-
if (localStorage && this.storageId) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const storedTab = JSON.parse(storageItem);
|
|
74
|
-
this.selectedTabId = storedTab;
|
|
75
|
-
}
|
|
70
|
+
if (localStorage && this.storageId && localStorage.getItem(storageKey)) {
|
|
71
|
+
const storedTab = JSON.parse(localStorage.getItem(storageKey));
|
|
72
|
+
this.selectedTabId = storedTab;
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
75
|
willUpdate(changes) {
|
|
@@ -85,10 +82,8 @@ class TabNav extends LitElement {
|
|
|
85
82
|
this.selectedTabIdChanged();
|
|
86
83
|
}
|
|
87
84
|
const { parentTabsEl } = this;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.bordered = parentTabsEl.bordered;
|
|
91
|
-
}
|
|
85
|
+
this.layout = parentTabsEl?.layout;
|
|
86
|
+
this.bordered = parentTabsEl?.bordered;
|
|
92
87
|
this.effectiveDir = this.direction;
|
|
93
88
|
}
|
|
94
89
|
loaded() {
|
|
@@ -44,11 +44,11 @@ export abstract class TabTitle extends LitElement {
|
|
|
44
44
|
*/
|
|
45
45
|
accessor disabled: boolean;
|
|
46
46
|
/** Specifies an icon to display at the end of the component. */
|
|
47
|
-
accessor iconEnd: IconName
|
|
47
|
+
accessor iconEnd: IconName;
|
|
48
48
|
/** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
|
|
49
|
-
accessor iconFlipRtl: FlipContext
|
|
49
|
+
accessor iconFlipRtl: FlipContext;
|
|
50
50
|
/** Specifies an icon to display at the start of the component. */
|
|
51
|
-
accessor iconStart: IconName
|
|
51
|
+
accessor iconStart: IconName;
|
|
52
52
|
/** Overrides individual strings used by the component. */
|
|
53
53
|
accessor messageOverrides: { close?: string; };
|
|
54
54
|
/**
|
|
@@ -37,13 +37,11 @@ class TabTitle extends LitElement {
|
|
|
37
37
|
this.direction = useDirection();
|
|
38
38
|
this.guid = IDS.host(guid());
|
|
39
39
|
this.mutationObserver = createObserver("mutation", () => this.updateHasText());
|
|
40
|
-
this.parentTabsEl = null;
|
|
41
40
|
this.resizeObserver = createObserver("resize", () => {
|
|
42
41
|
this.calciteInternalTabIconChanged.emit();
|
|
43
42
|
});
|
|
44
43
|
this.messages = useT9n();
|
|
45
44
|
this.interactiveContainer = useInteractive(this);
|
|
46
|
-
this.controls = null;
|
|
47
45
|
this.hasText = false;
|
|
48
46
|
this.bordered = false;
|
|
49
47
|
this.closable = false;
|
|
@@ -44,10 +44,6 @@ const styles = css`@charset "UTF-8";:host([scale=s]){--calcite-internal-table-ce
|
|
|
44
44
|
class Table extends LitElement {
|
|
45
45
|
constructor() {
|
|
46
46
|
super();
|
|
47
|
-
this.allRows = [];
|
|
48
|
-
this.bodyRows = [];
|
|
49
|
-
this.footRows = [];
|
|
50
|
-
this.headRows = [];
|
|
51
47
|
this.paginationRef = createRef();
|
|
52
48
|
this.tableBodySlotRef = createRef();
|
|
53
49
|
this.tableFootSlotRef = createRef();
|
|
@@ -55,7 +51,6 @@ class Table extends LitElement {
|
|
|
55
51
|
this.messages = useT9n({ blocking: true });
|
|
56
52
|
this.colCount = 0;
|
|
57
53
|
this.pageStartRow = 1;
|
|
58
|
-
this.readCellContentsToAT = false;
|
|
59
54
|
this.selectedCount = 0;
|
|
60
55
|
this._selectedItems = [];
|
|
61
56
|
this.bordered = false;
|
|
@@ -140,8 +135,8 @@ class Table extends LitElement {
|
|
|
140
135
|
rowPosition = leavingFooter ? lastBodyRow : enteringHeader ? lastHeadRow : rowPos - 1;
|
|
141
136
|
break;
|
|
142
137
|
}
|
|
143
|
-
const destinationCount = this.allRows
|
|
144
|
-
const adjustedPos =
|
|
138
|
+
const destinationCount = this.allRows?.find((row) => row.positionAll === rowPosition)?.cellCount;
|
|
139
|
+
const adjustedPos = cellPosition > destinationCount ? destinationCount : cellPosition;
|
|
145
140
|
if (rowPosition !== void 0) {
|
|
146
141
|
this.calciteInternalTableRowFocusChange.emit({
|
|
147
142
|
cellPosition: adjustedPos,
|
|
@@ -152,35 +147,32 @@ class Table extends LitElement {
|
|
|
152
147
|
}
|
|
153
148
|
}
|
|
154
149
|
getSlottedRows(el) {
|
|
155
|
-
|
|
156
|
-
return [];
|
|
157
|
-
}
|
|
158
|
-
return el.assignedElements({ flatten: true }).filter((el2) => el2.matches("calcite-table-row"));
|
|
150
|
+
return el?.assignedElements({ flatten: true })?.filter((el2) => el2?.matches("calcite-table-row"));
|
|
159
151
|
}
|
|
160
152
|
updateRows() {
|
|
161
|
-
const headRows = this.getSlottedRows(this.tableHeadSlotRef.value);
|
|
162
|
-
const bodyRows = this.getSlottedRows(this.tableBodySlotRef.value);
|
|
163
|
-
const footRows = this.getSlottedRows(this.tableFootSlotRef.value);
|
|
153
|
+
const headRows = this.getSlottedRows(this.tableHeadSlotRef.value) || [];
|
|
154
|
+
const bodyRows = this.getSlottedRows(this.tableBodySlotRef.value) || [];
|
|
155
|
+
const footRows = this.getSlottedRows(this.tableFootSlotRef.value) || [];
|
|
164
156
|
const allRows = [...headRows, ...bodyRows, ...footRows];
|
|
165
|
-
headRows
|
|
166
|
-
const position = headRows
|
|
157
|
+
headRows?.forEach((row) => {
|
|
158
|
+
const position = headRows?.indexOf(row);
|
|
167
159
|
row.rowType = "head";
|
|
168
160
|
row.positionSection = position;
|
|
169
161
|
row.positionSectionLocalized = this.localizeNumber((position + 1).toString());
|
|
170
162
|
});
|
|
171
|
-
bodyRows
|
|
172
|
-
const position = bodyRows
|
|
163
|
+
bodyRows?.forEach((row) => {
|
|
164
|
+
const position = bodyRows?.indexOf(row);
|
|
173
165
|
row.rowType = "body";
|
|
174
166
|
row.positionSection = position;
|
|
175
167
|
row.positionSectionLocalized = this.localizeNumber((position + 1).toString());
|
|
176
168
|
});
|
|
177
|
-
footRows
|
|
178
|
-
const position = footRows
|
|
169
|
+
footRows?.forEach((row) => {
|
|
170
|
+
const position = footRows?.indexOf(row);
|
|
179
171
|
row.rowType = "foot";
|
|
180
172
|
row.positionSection = position;
|
|
181
173
|
row.positionSectionLocalized = this.localizeNumber((position + 1).toString());
|
|
182
174
|
});
|
|
183
|
-
allRows
|
|
175
|
+
allRows?.forEach((row) => {
|
|
184
176
|
row.interactionMode = this.interactionMode;
|
|
185
177
|
row.selectionMode = this.selectionMode;
|
|
186
178
|
row.bodyRowCount = bodyRows?.length;
|
|
@@ -290,7 +282,7 @@ class Table extends LitElement {
|
|
|
290
282
|
[CSS.striped]: this.striped,
|
|
291
283
|
[CSS.tableContainer]: true
|
|
292
284
|
})}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${/* workaround to ensure the attr gets removed; we should be able to avoid the ternary when fixed */
|
|
293
|
-
this.selectionMode === "multiple" ? "true" :
|
|
285
|
+
this.selectionMode === "multiple" ? "true" : null} .ariaRowCount=${this.allRows?.length} class=${safeClassMap({ [CSS.tableFixed]: this.layout === "fixed" })} .role=${this.interactionMode === "interactive" ? "grid" : "table"} ${ref((el) => {
|
|
294
286
|
if (!el) {
|
|
295
287
|
return;
|
|
296
288
|
}
|
|
@@ -20,7 +20,7 @@ export abstract class TableCell extends LitElement {
|
|
|
20
20
|
*/
|
|
21
21
|
accessor alignment: Alignment;
|
|
22
22
|
/** Specifies the number of columns the component should span. */
|
|
23
|
-
accessor colSpan: number
|
|
23
|
+
accessor colSpan: number;
|
|
24
24
|
/** Overrides individual strings used by the component. */
|
|
25
25
|
accessor messageOverrides: {
|
|
26
26
|
keyboardDeselect?: string;
|
|
@@ -30,7 +30,7 @@ export abstract class TableCell extends LitElement {
|
|
|
30
30
|
unselected?: string;
|
|
31
31
|
};
|
|
32
32
|
/** Specifies the number of rows the component should span. */
|
|
33
|
-
accessor rowSpan: number
|
|
33
|
+
accessor rowSpan: number;
|
|
34
34
|
/**
|
|
35
35
|
* Sets focus on the component.
|
|
36
36
|
*
|
|
@@ -30,15 +30,9 @@ class TableCell extends LitElement {
|
|
|
30
30
|
this.focused = false;
|
|
31
31
|
this.selectionText = "";
|
|
32
32
|
this.alignment = "start";
|
|
33
|
-
this.disabled = false;
|
|
34
33
|
this.interactionMode = "interactive";
|
|
35
|
-
this.lastCell = false;
|
|
36
|
-
this.numberCell = false;
|
|
37
34
|
this.parentRowAlignment = "start";
|
|
38
|
-
this.parentRowIsSelected = false;
|
|
39
|
-
this.readCellContentsToAT = false;
|
|
40
35
|
this.scale = "m";
|
|
41
|
-
this.selectionCell = false;
|
|
42
36
|
}
|
|
43
37
|
static {
|
|
44
38
|
this.properties = { contentsText: [16, {}, { state: true }], focused: [16, {}, { state: true }], selectionText: [16, {}, { state: true }], alignment: [3, {}, { reflect: true }], colSpan: [11, {}, { reflect: true, type: Number }], disabled: [5, {}, { type: Boolean }], interactionMode: 1, lastCell: [5, {}, { type: Boolean }], messageOverrides: [0, {}, { attribute: false }], numberCell: [5, {}, { type: Boolean }], parentRowAlignment: 1, parentRowIsSelected: [5, {}, { type: Boolean }], parentRowPositionLocalized: 1, parentRowType: 1, positionInRow: [9, {}, { type: Number }], readCellContentsToAT: [5, {}, { type: Boolean }], rowSpan: [11, {}, { reflect: true, type: Number }], scale: 1, selectionCell: [5, {}, { type: Boolean }] };
|
|
@@ -17,11 +17,11 @@ export abstract class TableHeader extends LitElement {
|
|
|
17
17
|
*/
|
|
18
18
|
accessor alignment: Alignment;
|
|
19
19
|
/** Specifies the number of columns the component should span. */
|
|
20
|
-
accessor colSpan: number
|
|
20
|
+
accessor colSpan: number;
|
|
21
21
|
/** Specifies a description for the component. Displays below the `heading`. */
|
|
22
|
-
accessor description: string
|
|
22
|
+
accessor description: string;
|
|
23
23
|
/** Specifies the component's heading text. Displays above the `description`. */
|
|
24
|
-
accessor heading: string
|
|
24
|
+
accessor heading: string;
|
|
25
25
|
/** Overrides individual strings used by the component. */
|
|
26
26
|
accessor messageOverrides: {
|
|
27
27
|
all?: string;
|
|
@@ -32,7 +32,7 @@ export abstract class TableHeader extends LitElement {
|
|
|
32
32
|
selectionColumn?: string;
|
|
33
33
|
};
|
|
34
34
|
/** Specifies the number of rows the component should span. */
|
|
35
|
-
accessor rowSpan: number
|
|
35
|
+
accessor rowSpan: number;
|
|
36
36
|
/**
|
|
37
37
|
* Sets focus on the component.
|
|
38
38
|
*
|
|
@@ -37,10 +37,8 @@ class TableHeader extends LitElement {
|
|
|
37
37
|
this.screenReaderText = "";
|
|
38
38
|
this.alignment = "start";
|
|
39
39
|
this.interactionMode = "interactive";
|
|
40
|
-
this.lastCell = false;
|
|
41
40
|
this.numberCell = false;
|
|
42
41
|
this.parentRowAlignment = "start";
|
|
43
|
-
this.parentRowIsSelected = false;
|
|
44
42
|
this.selectionCell = false;
|
|
45
43
|
}
|
|
46
44
|
static {
|
|
@@ -40,7 +40,6 @@ class TableRow extends LitElement {
|
|
|
40
40
|
this.itemHidden = false;
|
|
41
41
|
this.disabled = false;
|
|
42
42
|
this.interactionMode = "interactive";
|
|
43
|
-
this.lastVisibleRow = false;
|
|
44
43
|
this.numbered = false;
|
|
45
44
|
this.selectionMode = "none";
|
|
46
45
|
this.calciteInternalTableRowFocusRequest = createEvent({ cancelable: false });
|
|
@@ -170,7 +169,7 @@ class TableRow extends LitElement {
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
|
-
emitTableRowFocusRequest(cellPosition, rowPosition, destination, lastCell
|
|
172
|
+
emitTableRowFocusRequest(cellPosition, rowPosition, destination, lastCell) {
|
|
174
173
|
this.calciteInternalTableRowFocusRequest.emit({
|
|
175
174
|
cellPosition,
|
|
176
175
|
rowPosition,
|
|
@@ -180,9 +179,8 @@ class TableRow extends LitElement {
|
|
|
180
179
|
}
|
|
181
180
|
updateCells() {
|
|
182
181
|
const alignment = this.alignment ? this.alignment : this.rowType !== "head" ? "center" : "start";
|
|
183
|
-
const slottedCells = this.tableRowSlotRef.value?.assignedElements({ flatten: true })?.filter((el) => el.matches("calcite-table-cell") || el.matches("calcite-table-header"))
|
|
184
|
-
const
|
|
185
|
-
const renderedCells = tableRowEls ? Array.from(tableRowEls).filter((el) => el.numberCell || el.selectionCell) : void 0;
|
|
182
|
+
const slottedCells = this.tableRowSlotRef.value?.assignedElements({ flatten: true })?.filter((el) => el.matches("calcite-table-cell") || el.matches("calcite-table-header"));
|
|
183
|
+
const renderedCells = Array.from(this.tableRowEl?.querySelectorAll("calcite-table-header, calcite-table-cell"))?.filter((el) => el.numberCell || el.selectionCell);
|
|
186
184
|
const cells = renderedCells ? renderedCells.concat(slottedCells) : slottedCells;
|
|
187
185
|
if (cells.length > 0) {
|
|
188
186
|
cells?.forEach((cell, index) => {
|
|
@@ -64,7 +64,7 @@ class Tabs extends LitElement {
|
|
|
64
64
|
const tabs = getSlotAssignedElements(this.slotRef.value, "calcite-tab");
|
|
65
65
|
await Promise.all([...tabs, ...this.titles].map((tabOrTitle) => tabOrTitle.componentOnReady()));
|
|
66
66
|
if (tabs.some((el) => el.tab) || this.titles.some((el) => el.tab)) {
|
|
67
|
-
tabIds = tabs.sort((a, b) => a.tab
|
|
67
|
+
tabIds = tabs.sort((a, b) => a.tab.localeCompare(b.tab)).map((el) => el.id);
|
|
68
68
|
titleIds = this.titles.sort((a, b) => a.tab.localeCompare(b.tab)).map((el) => el.id);
|
|
69
69
|
} else {
|
|
70
70
|
const tabDomIndexes = await Promise.all(tabs.map((el) => el.getTabIndex()));
|
|
@@ -93,8 +93,7 @@ class Tabs extends LitElement {
|
|
|
93
93
|
tab.scale = scale;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
|
|
97
|
-
Array.from(tabTitleEls).forEach((title) => {
|
|
96
|
+
Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach((title) => {
|
|
98
97
|
title.position = position;
|
|
99
98
|
title.scale = scale;
|
|
100
99
|
});
|
|
@@ -30,7 +30,7 @@ export abstract class TextArea extends LitElement {
|
|
|
30
30
|
*
|
|
31
31
|
* @see [MDN - cols](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols)
|
|
32
32
|
*/
|
|
33
|
-
accessor columns: number
|
|
33
|
+
accessor columns: number;
|
|
34
34
|
/**
|
|
35
35
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
36
36
|
*
|
|
@@ -43,7 +43,7 @@ export abstract class TextArea extends LitElement {
|
|
|
43
43
|
*
|
|
44
44
|
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
45
45
|
*/
|
|
46
|
-
accessor form: string
|
|
46
|
+
accessor form: string;
|
|
47
47
|
/**
|
|
48
48
|
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
|
|
49
49
|
*
|
|
@@ -51,9 +51,9 @@ export abstract class TextArea extends LitElement {
|
|
|
51
51
|
*/
|
|
52
52
|
accessor groupSeparator: boolean;
|
|
53
53
|
/** Specifies an accessible label for the component. */
|
|
54
|
-
accessor label: string
|
|
54
|
+
accessor label: string;
|
|
55
55
|
/** Specifies the component's label text. */
|
|
56
|
-
accessor labelText: string
|
|
56
|
+
accessor labelText: string;
|
|
57
57
|
/**
|
|
58
58
|
* When `true`, prevents input beyond the `maxLength` value, mimicking native text area behavior.
|
|
59
59
|
*
|
|
@@ -72,7 +72,7 @@ export abstract class TextArea extends LitElement {
|
|
|
72
72
|
*
|
|
73
73
|
* @see [MDN - maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-maxlength)
|
|
74
74
|
*/
|
|
75
|
-
accessor maxLength: number
|
|
75
|
+
accessor maxLength: number;
|
|
76
76
|
/** Overrides individual strings used by the component. */
|
|
77
77
|
accessor messageOverrides: {
|
|
78
78
|
invalid?: string;
|
|
@@ -87,21 +87,21 @@ export abstract class TextArea extends LitElement {
|
|
|
87
87
|
*
|
|
88
88
|
* @see [MDN - minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-minlength)
|
|
89
89
|
*/
|
|
90
|
-
accessor minLength: number
|
|
90
|
+
accessor minLength: number;
|
|
91
91
|
/**
|
|
92
92
|
* Specifies the name of the component. Required to pass the component's value on form submission.
|
|
93
93
|
*
|
|
94
94
|
* @see [MDN - name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-name)
|
|
95
95
|
*/
|
|
96
|
-
accessor name: string
|
|
96
|
+
accessor name: string;
|
|
97
97
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
98
|
-
accessor numberingSystem: NumberingSystem
|
|
98
|
+
accessor numberingSystem: NumberingSystem;
|
|
99
99
|
/**
|
|
100
100
|
* Specifies the placeholder text for the component.
|
|
101
101
|
*
|
|
102
102
|
* @see [MDN - placeholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-placeholder)
|
|
103
103
|
*/
|
|
104
|
-
accessor placeholder: string
|
|
104
|
+
accessor placeholder: string;
|
|
105
105
|
/**
|
|
106
106
|
* When `true`, the component's `value` can be read, but cannot be modified.
|
|
107
107
|
*
|
|
@@ -128,7 +128,7 @@ export abstract class TextArea extends LitElement {
|
|
|
128
128
|
*
|
|
129
129
|
* @see [MDN - rows](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows)
|
|
130
130
|
*/
|
|
131
|
-
accessor rows: number
|
|
131
|
+
accessor rows: number;
|
|
132
132
|
/**
|
|
133
133
|
* Specifies the size of the component.
|
|
134
134
|
*
|
|
@@ -142,9 +142,9 @@ export abstract class TextArea extends LitElement {
|
|
|
142
142
|
*/
|
|
143
143
|
accessor status: Status;
|
|
144
144
|
/** Specifies the validation icon to display under the component. */
|
|
145
|
-
accessor validationIcon: IconName | boolean
|
|
145
|
+
accessor validationIcon: IconName | boolean;
|
|
146
146
|
/** Specifies the validation message to display under the component. */
|
|
147
|
-
accessor validationMessage: string
|
|
147
|
+
accessor validationMessage: string;
|
|
148
148
|
/**
|
|
149
149
|
* The component's current validation state.
|
|
150
150
|
*
|
|
@@ -79,8 +79,6 @@ class TextArea extends LitElement {
|
|
|
79
79
|
this.messages = useT9n({ blocking: true });
|
|
80
80
|
this.focusSetter = useSetFocus()(this);
|
|
81
81
|
this.interactiveContainer = useInteractive(this);
|
|
82
|
-
this.endSlotHasElements = false;
|
|
83
|
-
this.startSlotHasElements = false;
|
|
84
82
|
this.disabled = false;
|
|
85
83
|
this.groupSeparator = false;
|
|
86
84
|
this.limitText = false;
|
|
@@ -150,7 +148,7 @@ class TextArea extends LitElement {
|
|
|
150
148
|
this.setFocus();
|
|
151
149
|
}
|
|
152
150
|
handleInput(event) {
|
|
153
|
-
this.value = event.target
|
|
151
|
+
this.value = event.target["value"];
|
|
154
152
|
this.calciteTextAreaInput.emit();
|
|
155
153
|
}
|
|
156
154
|
handleChange() {
|
|
@@ -160,7 +158,7 @@ class TextArea extends LitElement {
|
|
|
160
158
|
if (!this.value) {
|
|
161
159
|
const nodes = this.el.childNodes;
|
|
162
160
|
nodes.forEach((el) => {
|
|
163
|
-
if (el.nodeName === "#text"
|
|
161
|
+
if (el.nodeName === "#text") {
|
|
164
162
|
this.value = el.nodeValue.trim();
|
|
165
163
|
}
|
|
166
164
|
});
|
|
@@ -206,7 +204,7 @@ class TextArea extends LitElement {
|
|
|
206
204
|
return this.messages.tooLong.replace("{maxLength}", this.localizedCharacterLengthObj.maxLength).replace("{currentLength}", this.localizedCharacterLengthObj.currentLength);
|
|
207
205
|
}
|
|
208
206
|
isCharacterLimitExceeded() {
|
|
209
|
-
return this.
|
|
207
|
+
return this.value?.length > this.maxLength;
|
|
210
208
|
}
|
|
211
209
|
setValidationRef(el) {
|
|
212
210
|
if (!el) {
|