@esri/calcite-components 5.1.0-next.54 → 5.1.0-next.56
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/{IQ6XZR4C.js → 245VQ6OU.js} +1 -1
- package/dist/cdn/{MSJMNG76.js → 26RUITLY.js} +1 -1
- package/dist/cdn/{IYFU4GLO.js → 27CZHLJB.js} +1 -1
- package/dist/cdn/{O4FTHIIQ.js → 2B6UCFBP.js} +1 -1
- package/dist/cdn/{AYFFVQJ2.js → 2GDK2QIY.js} +1 -1
- package/dist/cdn/{22IVUUIH.js → 36JME4Z5.js} +1 -1
- package/dist/cdn/{DUDTWBTW.js → 3EBBFAJH.js} +1 -1
- package/dist/cdn/{OOBDFQNN.js → 3I7MYGMI.js} +1 -1
- package/dist/cdn/{VWBZSVHP.js → 3OR7BGYM.js} +1 -1
- package/dist/cdn/{ZHNVZRXF.js → 3TWOR5Z6.js} +1 -1
- package/dist/cdn/{I7AJ4VKV.js → 3U5YMVJP.js} +1 -1
- package/dist/cdn/{G6Y3JAHG.js → 46JAXBFZ.js} +1 -1
- package/dist/cdn/{2RUZBL6D.js → 4EH64GJB.js} +1 -1
- package/dist/cdn/{TV6ZK6IS.js → 4EPM2WDA.js} +1 -1
- package/dist/cdn/{CDL6DNIR.js → 4MPQ7LUS.js} +1 -1
- package/dist/cdn/{X4ZS7TC6.js → 4TGGO6UN.js} +1 -1
- package/dist/cdn/{ZXY6RQ3L.js → 4UGUB5RC.js} +1 -1
- package/dist/cdn/{FJF2FRKC.js → 4WP6CW3O.js} +1 -1
- package/dist/cdn/{POZ7UA5F.js → 4ZEWKA7D.js} +1 -1
- package/dist/cdn/{GOEAJWAL.js → 536QWHES.js} +1 -1
- package/dist/cdn/{2OZSSX7R.js → 55FMQQBL.js} +1 -1
- package/dist/cdn/{JA5MUQEU.js → 5LDNNRYI.js} +1 -1
- package/dist/cdn/{UWSWNAJU.js → 5Y4USXMG.js} +1 -1
- package/dist/cdn/6J4BROGJ.js +2 -0
- package/dist/cdn/{R5XOXABT.js → 6J6TUJSU.js} +1 -1
- package/dist/cdn/{6RTKXNJX.js → 6K4QMHL2.js} +1 -1
- package/dist/cdn/{3ESNHHXQ.js → 6LKILLFT.js} +1 -1
- package/dist/cdn/6M5SZKYO.js +2 -0
- package/dist/cdn/{TGKCDQI3.js → 6YDMACKJ.js} +1 -1
- package/dist/cdn/{Z4ZYQ4KZ.js → 6ZIQNPVX.js} +1 -1
- package/dist/cdn/{3YVTZHM4.js → 74IYBK2S.js} +1 -1
- package/dist/cdn/{336X46VI.js → 7GN2PFF4.js} +1 -1
- package/dist/cdn/{E5E6AWC4.js → 7P4CFHZX.js} +1 -1
- package/dist/cdn/{I45WQTVR.js → 7RXS2OPK.js} +1 -1
- package/dist/cdn/{KUK5PHRI.js → ADVV4XQH.js} +1 -1
- package/dist/cdn/{RLTPLCWW.js → AGIEW3EV.js} +1 -1
- package/dist/cdn/{25WV7Z5X.js → AIJZX4UL.js} +1 -1
- package/dist/cdn/{JZP7NVM6.js → AROVD3NE.js} +1 -1
- package/dist/cdn/{PEZKYSLN.js → AZRGW5TC.js} +1 -1
- package/dist/cdn/{K3UYBNAJ.js → BB5YLGLJ.js} +1 -1
- package/dist/cdn/{OOXXCI2W.js → BXZUK77F.js} +1 -1
- package/dist/cdn/{BGAUW6GC.js → BY7KJYWX.js} +1 -1
- package/dist/cdn/{RWKZYNVE.js → C6SVV5LT.js} +1 -1
- package/dist/cdn/{TW27JCRI.js → CCUDOIVE.js} +1 -1
- package/dist/cdn/{D5WOEY7D.js → CETSBE2M.js} +1 -1
- package/dist/cdn/{EJBPLQLQ.js → CHAIY5WK.js} +1 -1
- package/dist/cdn/{WK2ENAZI.js → CJLPPTSS.js} +1 -1
- package/dist/cdn/{5GELSXJ5.js → CSCTU5OC.js} +1 -1
- package/dist/cdn/{3MNTWELP.js → DA3QBSWO.js} +1 -1
- package/dist/cdn/{WYYRL7PX.js → DIBINEJW.js} +1 -1
- package/dist/cdn/{VMRXO4W7.js → DJUXJIUU.js} +1 -1
- package/dist/cdn/{VXNY5ZOK.js → DPNR3TVE.js} +1 -1
- package/dist/cdn/{KMAMIQYT.js → E25LQEX4.js} +1 -1
- package/dist/cdn/{UP3MS2RO.js → EDLGFG7A.js} +1 -1
- package/dist/cdn/{D6MAQR7D.js → ERM7EE6N.js} +1 -1
- package/dist/cdn/{Y3T3ISUJ.js → F53FDZYB.js} +1 -1
- package/dist/cdn/{AD5B3IYF.js → F5YCCCTX.js} +1 -1
- package/dist/cdn/{SRTYH5N3.js → FM2IHVGM.js} +1 -1
- package/dist/cdn/{OOTJKLDL.js → FNP3CH73.js} +1 -1
- package/dist/cdn/{ANPJDGZL.js → FNREFYBQ.js} +1 -1
- package/dist/cdn/{JAJE6DKM.js → G756MYEB.js} +1 -1
- package/dist/cdn/{54QTZHAL.js → GOPZNJ3H.js} +1 -1
- package/dist/cdn/{5EO6TPQZ.js → GPWFQZ47.js} +1 -1
- package/dist/cdn/GULTBLGR.js +2 -0
- package/dist/cdn/{NJKUV7Z2.js → HBF7HY7I.js} +1 -1
- package/dist/cdn/{H4LN7BXD.js → I3HKTCDC.js} +1 -1
- package/dist/cdn/{GZFHBGOU.js → INIJSFZJ.js} +1 -1
- package/dist/cdn/{G5EYV6IQ.js → J2DC4XID.js} +1 -1
- package/dist/cdn/{JHEMDNRY.js → J3WJJ2RT.js} +1 -1
- package/dist/cdn/{INPES2GS.js → JADBH5BL.js} +1 -1
- package/dist/cdn/{3I2GKNM7.js → JCN4MHCC.js} +1 -1
- package/dist/cdn/{JO3ACOMA.js → JOXHLFYR.js} +1 -1
- package/dist/cdn/{VRT3DKMJ.js → JQ53OHR2.js} +1 -1
- package/dist/cdn/{BLC2QNVI.js → JU4ULBSF.js} +1 -1
- package/dist/cdn/{JWYKC4ZC.js → K5YJG2KB.js} +1 -1
- package/dist/cdn/{CN6MSWIR.js → KDITZP2X.js} +1 -1
- package/dist/cdn/{L7L67ZQH.js → KDXKV2PQ.js} +1 -1
- package/dist/cdn/{BWAKNJJK.js → KE6IHEC3.js} +1 -1
- package/dist/cdn/{RUPE5T2P.js → KORU3QNX.js} +1 -1
- package/dist/cdn/{AVXURALG.js → KXA2BQZR.js} +1 -1
- package/dist/cdn/{7BZSIPHM.js → LBAXGQKF.js} +1 -1
- package/dist/cdn/{ZQHDDYOV.js → LC3EAIPC.js} +1 -1
- package/dist/cdn/{TNNHGXEO.js → LSBSCCFB.js} +1 -1
- package/dist/cdn/{HQEEGEJY.js → LZKFTHUK.js} +1 -1
- package/dist/cdn/{E5AR3JN7.js → M4T7PXES.js} +1 -1
- package/dist/cdn/{XBXBNKHQ.js → MDDKVFRY.js} +1 -1
- package/dist/cdn/{VHOTO6RW.js → MEYF2335.js} +1 -1
- package/dist/cdn/{JSRGGY2G.js → ML33WSWY.js} +1 -1
- package/dist/cdn/{GBV3NOSW.js → MMSRJZFO.js} +1 -1
- package/dist/cdn/{3MD3VB4O.js → MQ7SCGWC.js} +1 -1
- package/dist/cdn/{6GSSNJP7.js → MTS5E2DI.js} +1 -1
- package/dist/cdn/{VE6BCA4B.js → N6S6V3JR.js} +1 -1
- package/dist/cdn/{NATFX6WC.js → NIXBHDOF.js} +1 -1
- package/dist/cdn/{OD6VMJEA.js → NK7SCPIU.js} +1 -1
- package/dist/cdn/NKJRLG5U.js +2 -0
- package/dist/cdn/{O4P4SSIP.js → NLXFJA5S.js} +1 -1
- package/dist/cdn/{CA2DZBX4.js → OHP2JOIY.js} +1 -1
- package/dist/cdn/{FFF2DUBB.js → OLOZCKZ4.js} +1 -1
- package/dist/cdn/{NYPCCBF6.js → OLQS5GTN.js} +1 -1
- package/dist/cdn/{A5M47AHN.js → OPRWWQH4.js} +1 -1
- package/dist/cdn/{5MDV25QX.js → P2QJTMWT.js} +1 -1
- package/dist/cdn/{4MM7JTIK.js → P3NNJJAP.js} +1 -1
- package/dist/cdn/{47CPJHUS.js → P3WMUQJJ.js} +1 -1
- package/dist/cdn/{WPMZGXD3.js → PLDSIWWH.js} +1 -1
- package/dist/cdn/{BGC4F6I5.js → PU3OQDKN.js} +1 -1
- package/dist/cdn/{DOVMM7XM.js → PVOIWXTY.js} +1 -1
- package/dist/cdn/{DFDS2TTC.js → Q4FQJ4LY.js} +1 -1
- package/dist/cdn/{CB26KXXN.js → QCKSVOHA.js} +1 -1
- package/dist/cdn/{E2IMD4S4.js → QIXICLBH.js} +1 -1
- package/dist/cdn/{RTZTCGZ3.js → RNT25OFO.js} +1 -1
- package/dist/cdn/{X4TO3HHT.js → SGG7JGTL.js} +1 -1
- package/dist/cdn/{BGNOLT7F.js → SRCTQP36.js} +1 -1
- package/dist/cdn/{77ZNXURF.js → TL7BRYVC.js} +1 -1
- package/dist/cdn/{7WOP45HP.js → TM4IPZE3.js} +1 -1
- package/dist/cdn/{XKAFATHA.js → TRCDNXC7.js} +1 -1
- package/dist/cdn/TZI3L7D4.js +2 -0
- package/dist/cdn/{YOZOGEXI.js → UCNU3UCQ.js} +1 -1
- package/dist/cdn/{I3XHFKZF.js → UE5TTZGB.js} +1 -1
- package/dist/cdn/{EU7F52XI.js → V4LBG3BU.js} +1 -1
- package/dist/cdn/{TE4FTZQS.js → VCSHJUFS.js} +1 -1
- package/dist/cdn/{YOPLVYTC.js → VO2DGAGH.js} +1 -1
- package/dist/cdn/{3OA2OD76.js → VQWRZ662.js} +1 -1
- package/dist/cdn/{LPL3KILS.js → VV47WTTZ.js} +1 -1
- package/dist/cdn/{SB7DCXHS.js → VWVCLI64.js} +1 -1
- package/dist/cdn/{2MS2SHUJ.js → WBVBS4EL.js} +1 -1
- package/dist/cdn/{X4Y72XWZ.js → WR37GQTH.js} +1 -1
- package/dist/cdn/{OPS5PJVD.js → WSZQC4TY.js} +1 -1
- package/dist/cdn/{MPEFMLER.js → X5RTUQLD.js} +1 -1
- package/dist/cdn/{YB3QV7IN.js → XL7LLSUL.js} +1 -1
- package/dist/cdn/{JN72QWKF.js → XMLDOVC4.js} +1 -1
- package/dist/cdn/{P5X5MXYX.js → XRNEAXRH.js} +1 -1
- package/dist/cdn/{CS7H2XIW.js → XTM7EBZN.js} +1 -1
- package/dist/cdn/{PPRMQFS4.js → XWS6LNFG.js} +1 -1
- package/dist/cdn/{AA5CAJKL.js → XYDSQOAV.js} +1 -1
- package/dist/cdn/{M2ULQF6T.js → Y4CHJJMC.js} +1 -1
- package/dist/cdn/{BSXIMKDV.js → Y537BA2C.js} +1 -1
- package/dist/cdn/{KR4WAL3P.js → YIFM7SRA.js} +1 -1
- package/dist/cdn/{4YGLEPX3.js → Z3LLW7YX.js} +1 -1
- package/dist/cdn/{SN3MJ4D4.js → ZDCYFWWC.js} +1 -1
- package/dist/cdn/{I3VZOUJF.js → ZDU3CMR3.js} +1 -1
- package/dist/cdn/{PSNDZNYB.js → ZGINNQ7T.js} +1 -1
- package/dist/cdn/ZRV3QZUK.js +2 -0
- package/dist/cdn/{GSHNHXNU.js → ZVZ6RUC5.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-action/customElement.d.ts +6 -0
- package/dist/components/calcite-action/customElement.js +3 -2
- package/dist/components/calcite-action-bar/customElement.js +7 -1
- package/dist/components/calcite-block/customElement.d.ts +6 -2
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.d.ts +7 -1
- package/dist/components/calcite-carousel/customElement.js +11 -8
- package/dist/components/calcite-carousel/interfaces.d.ts +3 -1
- package/dist/components/calcite-list/customElement.js +3 -3
- package/dist/components/calcite-shell-panel/customElement.js +56 -31
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.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 +2 -2
- 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 +2 -2
- package/dist/cdn/LLTLZFZU.js +0 -2
- package/dist/cdn/LZYJQJVL.js +0 -2
- package/dist/cdn/P4SQ3YIH.js +0 -2
- package/dist/cdn/PCXQSBRG.js +0 -2
- package/dist/cdn/QAJOWZJQ.js +0 -2
- package/dist/cdn/VRMS6UUE.js +0 -2
|
@@ -54,7 +54,7 @@ const idPrefix = "calcite-carousel-container";
|
|
|
54
54
|
const IDS = {
|
|
55
55
|
host: (id) => `${idPrefix}-${id}`
|
|
56
56
|
};
|
|
57
|
-
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;inline-size:100%;--calcite-internal-carousel-pagination-space: 1.5rem;--calcite-internal-carousel-pagination-space-wide: 3.5rem;--calcite-internal-carousel-pagination-background-color: var( --calcite-carousel-pagination-background-color, transparent );--calcite-internal-carousel-pagination-background-color-hover: var( --calcite-carousel-pagination-background-color-hover, transparent );--calcite-internal-carousel-pagination-background-color-press: var( --calcite-carousel-pagination-background-color-press, transparent );--calcite-internal-carousel-pagination-background-color-selected: var( --calcite-carousel-pagination-background-color-selected, transparent );--calcite-internal-carousel-pagination-overlay-background-color: var( --calcite-carousel-pagination-background-color, var(--calcite-color-foreground-1) );--calcite-internal-carousel-pagination-overlay-background-color-hover: var( --calcite-carousel-pagination-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-carousel-pagination-overlay-background-color-active: var( --calcite-carousel-pagination-background-color-press, var(--calcite-color-foreground-2) );--calcite-internal-carousel-pagination-overlay-background-color-selected: var( --calcite-carousel-pagination-background-color-selected, var(--calcite-color-foreground-1) );--calcite-internal-carousel-pagination-icon-color-hover: var( --calcite-carousel-pagination-icon-color-hover, var(--calcite-color-text-1) );--calcite-internal-carousel-pagination-icon-color: var( --calcite-carousel-pagination-icon-color, var(--calcite-color-border-1) );--calcite-internal-carousel-pagination-icon-color-selected: var( --calcite-carousel-pagination-icon-color-selected, var(--calcite-color-brand) );--calcite-internal-carousel-control-icon-color-hover: var( --calcite-carousel-control-icon-color-hover, var(--calcite-internal-carousel-pagination-icon-color-hover) );--calcite-internal-carousel-control-icon-color: var( --calcite-carousel-control-icon-color, var(--calcite-carousel-pagination-icon-color, var(--calcite-color-text-3)) );--calcite-internal-carousel-autoplay-progress-background-color: var( --calcite-carousel-autoplay-progress-background-color, var(--calcite-color-border-3) );--calcite-internal-carousel-autoplay-progress-fill-color: var( --calcite-carousel-autoplay-progress-fill-color, var(--calcite-color-brand) );--calcite-internal-carousel-autoplay-control-color: var( --calcite-carousel-pagination-icon-color, var(--calcite-color-text-3) )}.container{position:relative;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);color:var(--calcite-color-text-2);outline-color:transparent}.container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container--edged:not(.container--overlaid){padding-inline:var(--calcite-internal-carousel-pagination-space-wide);inline-size:calc(100% - var(--calcite-internal-carousel-pagination-space-wide) * 2)}.item-container{display:flex;flex:1 1 auto;align-items:flex-start;justify-content:center;overflow:auto;padding:.25rem;animation-name:none;animation-duration:var(--calcite-animation-timing)}.container--overlaid .item-container{padding:0}.item-container--forward{animation-name:item-forward}.item-container--backward{animation-name:item-backward}calcite-carousel-item:not([selected]){opacity:0}.pagination-aria-live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pagination{margin:.75rem;display:flex;flex-direction:row;align-items:center;justify-content:center;inline-size:auto}.pagination-items{display:flex;flex-direction:row;align-items:center}.container--overlaid .pagination{position:absolute}.pagination-item.page-next,.pagination-item.page-previous{color:var(--calcite-internal-carousel-control-icon-color);--calcite-icon-color: var(--calcite-internal-carousel-control-icon-color)}.pagination-item.page-next:hover,.pagination-item.page-previous:hover{color:var(--calcite-internal-carousel-control-icon-color-hover);--calcite-icon-color: var(--calcite-internal-carousel-control-icon-color-hover)}.container--edged .page-next,.container--edged .page-previous{block-size:3rem;inline-size:3rem;position:absolute;inset-block-start:50%;transform:translateY(-50%)}.container--edged .page-next{inset-inline-end:0}.container--edged .page-previous{inset-inline-start:0}.container--overlaid .pagination{inset-block-start:unset;inset-block-end:0;inset-inline:0}.pagination-item.autoplay-control{position:relative;color:var(--calcite-internal-carousel-autoplay-control-color);--calcite-progress-fill-color: var(--calcite-internal-carousel-autoplay-progress-fill-color);--calcite-progress-background-color: var(--calcite-internal-carousel-autoplay-progress-background-color)}.autoplay-control:focus .autoplay-progress{inset-block-end:4px;inset-inline:2px;inline-size:calc(100% - 4px)}.autoplay-progress{position:absolute;inset-block-end:2px;inset-inline:0;inline-size:100%}.pagination-item{margin:0;block-size:2rem;inline-size:2rem;cursor:pointer;align-items:center;border-style:none;background-color:transparent;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;-webkit-appearance:none;display:flex;align-content:center;justify-content:center;background-color:var(--calcite-internal-carousel-pagination-background-color);color:var(--calcite-internal-carousel-pagination-icon-color)}.pagination-item:hover{background-color:var(--calcite-internal-carousel-pagination-background-color-hover);color:var(--calcite-internal-carousel-pagination-icon-color-hover)}.pagination-item:focus{background-color:var(--calcite-internal-carousel-pagination-background-color-press);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.pagination-item:active{background-color:var(--calcite-internal-carousel-pagination-background-color-press);color:var(--calcite-internal-carousel-pagination-icon-color-hover)}.pagination-item calcite-icon{color:inherit;pointer-events:none}.pagination-item.pagination-item--selected{background-color:var(--calcite-internal-carousel-pagination-background-color-selected);color:var(--calcite-internal-carousel-pagination-icon-color-selected)}.pagination-item--individual{pointer-events:none;inline-size:0px;padding:0;opacity:0;visibility:hidden;transition:var(--calcite-animation-timing) ease-in-out inline-size,var(--calcite-animation-timing) ease-in-out padding,var(--calcite-animation-timing) ease-in-out opacity}.pagination-item--individual.pagination-item--visible{pointer-events:auto;inline-size:2rem;opacity:1;visibility:visible}.pagination-item--range-edge calcite-icon{scale:.75;transition:var(--calcite-animation-timing) ease-in-out scale}.container--overlaid .pagination-item{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color)}.container--overlaid .pagination-item:hover{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-hover)}.container--overlaid .pagination-item:focus{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-active)}.container--overlaid .pagination-item:active{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-active)}.container--overlaid .pagination-item.pagination-item--selected{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-selected);color:var(--calcite-internal-carousel-pagination-icon-color-selected)}@keyframes item-forward{0%{transform:translate3d(100px,0,0)}to{transform:translateZ(0)}}@keyframes item-backward{0%{transform:translate3d(-100px,0,0)}to{transform:translateZ(0)}}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
57
|
+
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;inline-size:100%;--calcite-internal-carousel-pagination-space: 1.5rem;--calcite-internal-carousel-pagination-space-wide: 3.5rem;--calcite-internal-carousel-pagination-background-color: var( --calcite-carousel-pagination-background-color, transparent );--calcite-internal-carousel-pagination-background-color-hover: var( --calcite-carousel-pagination-background-color-hover, transparent );--calcite-internal-carousel-pagination-background-color-press: var( --calcite-carousel-pagination-background-color-press, transparent );--calcite-internal-carousel-pagination-background-color-selected: var( --calcite-carousel-pagination-background-color-selected, transparent );--calcite-internal-carousel-pagination-overlay-background-color: var( --calcite-carousel-pagination-background-color, var(--calcite-color-foreground-1) );--calcite-internal-carousel-pagination-overlay-background-color-hover: var( --calcite-carousel-pagination-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-carousel-pagination-overlay-background-color-active: var( --calcite-carousel-pagination-background-color-press, var(--calcite-color-foreground-2) );--calcite-internal-carousel-pagination-overlay-background-color-selected: var( --calcite-carousel-pagination-background-color-selected, var(--calcite-color-foreground-1) );--calcite-internal-carousel-pagination-icon-color-hover: var( --calcite-carousel-pagination-icon-color-hover, var(--calcite-color-text-1) );--calcite-internal-carousel-pagination-icon-color: var( --calcite-carousel-pagination-icon-color, var(--calcite-color-border-1) );--calcite-internal-carousel-pagination-icon-color-selected: var( --calcite-carousel-pagination-icon-color-selected, var(--calcite-color-brand) );--calcite-internal-carousel-control-icon-color-hover: var( --calcite-carousel-control-icon-color-hover, var(--calcite-internal-carousel-pagination-icon-color-hover) );--calcite-internal-carousel-control-icon-color: var( --calcite-carousel-control-icon-color, var(--calcite-carousel-pagination-icon-color, var(--calcite-color-text-3)) );--calcite-internal-carousel-autoplay-progress-background-color: var( --calcite-carousel-autoplay-progress-background-color, var(--calcite-color-border-3) );--calcite-internal-carousel-autoplay-progress-fill-color: var( --calcite-carousel-autoplay-progress-fill-color, var(--calcite-color-brand) );--calcite-internal-carousel-autoplay-control-color: var( --calcite-carousel-pagination-icon-color, var(--calcite-color-text-3) )}.container{position:relative;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);color:var(--calcite-color-text-2);outline-color:transparent}.container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container--edged:not(.container--overlaid){padding-inline:var(--calcite-internal-carousel-pagination-space-wide);inline-size:calc(100% - var(--calcite-internal-carousel-pagination-space-wide) * 2)}.item-container{display:flex;flex:1 1 auto;align-items:flex-start;justify-content:center;overflow:auto;padding:.25rem;animation-name:none;animation-duration:var(--calcite-animation-timing)}.container--overlaid .item-container{padding:0}.item-container--forward{animation-name:item-forward}.item-container--backward{animation-name:item-backward}calcite-carousel-item:not([selected]){opacity:0}.pagination-aria-live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pagination{margin:.75rem;display:flex;flex-direction:row;align-items:center;justify-content:center;inline-size:auto}.pagination-items{display:flex;flex-direction:row;align-items:center}.container--overlaid .pagination{position:absolute}.pagination-item.page-next,.pagination-item.page-previous{color:var(--calcite-internal-carousel-control-icon-color);--calcite-icon-color: var(--calcite-internal-carousel-control-icon-color)}.pagination-item.page-next:hover,.pagination-item.page-previous:hover{color:var(--calcite-internal-carousel-control-icon-color-hover);--calcite-icon-color: var(--calcite-internal-carousel-control-icon-color-hover)}.container--edged .page-next,.container--edged .page-previous{block-size:3rem;inline-size:3rem;position:absolute;inset-block-start:50%;transform:translateY(-50%)}.container--edged .page-next{inset-inline-end:0}.container--edged .page-previous{inset-inline-start:0}.container--overlaid .pagination{inset-block-start:unset;inset-block-end:0;inset-inline:0}:host([pagination-position=top]) .container--overlaid .pagination{inset-block-start:0;inset-block-end:unset}.pagination-item.autoplay-control{position:relative;color:var(--calcite-internal-carousel-autoplay-control-color);--calcite-progress-fill-color: var(--calcite-internal-carousel-autoplay-progress-fill-color);--calcite-progress-background-color: var(--calcite-internal-carousel-autoplay-progress-background-color)}.autoplay-control:focus .autoplay-progress{inset-block-end:4px;inset-inline:2px;inline-size:calc(100% - 4px)}.autoplay-progress{position:absolute;inset-block-end:2px;inset-inline:0;inline-size:100%}.pagination-item{margin:0;block-size:2rem;inline-size:2rem;cursor:pointer;align-items:center;border-style:none;background-color:transparent;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;-webkit-appearance:none;display:flex;align-content:center;justify-content:center;background-color:var(--calcite-internal-carousel-pagination-background-color);color:var(--calcite-internal-carousel-pagination-icon-color)}.pagination-item:hover{background-color:var(--calcite-internal-carousel-pagination-background-color-hover);color:var(--calcite-internal-carousel-pagination-icon-color-hover)}.pagination-item:focus{background-color:var(--calcite-internal-carousel-pagination-background-color-press);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.pagination-item:active{background-color:var(--calcite-internal-carousel-pagination-background-color-press);color:var(--calcite-internal-carousel-pagination-icon-color-hover)}.pagination-item calcite-icon{color:inherit;pointer-events:none}.pagination-item.pagination-item--selected{background-color:var(--calcite-internal-carousel-pagination-background-color-selected);color:var(--calcite-internal-carousel-pagination-icon-color-selected)}.pagination-item--individual{pointer-events:none;inline-size:0px;padding:0;opacity:0;visibility:hidden;transition:var(--calcite-animation-timing) ease-in-out inline-size,var(--calcite-animation-timing) ease-in-out padding,var(--calcite-animation-timing) ease-in-out opacity}.pagination-item--individual.pagination-item--visible{pointer-events:auto;inline-size:2rem;opacity:1;visibility:visible}.pagination-item--range-edge calcite-icon{scale:.75;transition:var(--calcite-animation-timing) ease-in-out scale}.container--overlaid .pagination-item{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color)}.container--overlaid .pagination-item:hover{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-hover)}.container--overlaid .pagination-item:focus{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-active)}.container--overlaid .pagination-item:active{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-active)}.container--overlaid .pagination-item.pagination-item--selected{background-color:var(--calcite-internal-carousel-pagination-overlay-background-color-selected);color:var(--calcite-internal-carousel-pagination-icon-color-selected)}@keyframes item-forward{0%{transform:translate3d(100px,0,0)}to{transform:translateZ(0)}}@keyframes item-backward{0%{transform:translate3d(-100px,0,0)}to{transform:translateZ(0)}}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
58
58
|
class Carousel extends LitElement {
|
|
59
59
|
constructor() {
|
|
60
60
|
super(...arguments);
|
|
@@ -108,6 +108,7 @@ class Carousel extends LitElement {
|
|
|
108
108
|
this.controlOverlay = false;
|
|
109
109
|
this.disabled = false;
|
|
110
110
|
this.paginationDisabled = false;
|
|
111
|
+
this.paginationPosition = "bottom";
|
|
111
112
|
this.calciteCarouselChange = createEvent({ cancelable: false });
|
|
112
113
|
this.calciteCarouselPause = createEvent({ cancelable: false });
|
|
113
114
|
this.calciteCarouselPlay = createEvent({ cancelable: false });
|
|
@@ -115,7 +116,7 @@ class Carousel extends LitElement {
|
|
|
115
116
|
this.calciteCarouselStop = createEvent({ cancelable: false });
|
|
116
117
|
}
|
|
117
118
|
static {
|
|
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 }] };
|
|
119
|
+
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 }], paginationPosition: [3, {}, { reflect: true }], paused: [5, {}, { type: Boolean }], selectedItem: [0, {}, { attribute: false }] };
|
|
119
120
|
}
|
|
120
121
|
static {
|
|
121
122
|
this.styles = styles;
|
|
@@ -474,16 +475,18 @@ class Carousel extends LitElement {
|
|
|
474
475
|
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>`;
|
|
475
476
|
}
|
|
476
477
|
render() {
|
|
477
|
-
const { itemDirection } = this;
|
|
478
|
+
const { itemDirection, paginationPosition } = this;
|
|
479
|
+
const paginationArea = this.renderPaginationArea();
|
|
480
|
+
const itemContainer = html`<section class=${safeClassMap({
|
|
481
|
+
[CSS.itemContainer]: true,
|
|
482
|
+
[CSS.itemContainerForward]: itemDirection === "forward",
|
|
483
|
+
[CSS.itemContainerBackward]: itemDirection === "backward"
|
|
484
|
+
})} id=${this.containerId ?? nothing} ${ref(this.itemContainerRef)}><slot @slotchange=${this.handleSlotChange}></slot></section>`;
|
|
478
485
|
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaLabel=${this.label} .ariaLive=${this.playing ? "off" : "polite"} .ariaRoleDescription=${this.messages.carousel} class=${safeClassMap({
|
|
479
486
|
[CSS.container]: true,
|
|
480
487
|
[CSS.containerOverlaid]: this.controlOverlay,
|
|
481
488
|
[CSS.containerEdged]: this.arrowType === "edge"
|
|
482
|
-
})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${ref(this.containerRef)}
|
|
483
|
-
[CSS.itemContainer]: true,
|
|
484
|
-
[CSS.itemContainerForward]: itemDirection === "forward",
|
|
485
|
-
[CSS.itemContainerBackward]: itemDirection === "backward"
|
|
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>` });
|
|
489
|
+
})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${ref(this.containerRef)}>${paginationPosition === "top" ? paginationArea : itemContainer}${paginationPosition === "top" ? itemContainer : paginationArea}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("previous") || ""}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("next") || ""}</div>` });
|
|
487
490
|
}
|
|
488
491
|
}
|
|
489
492
|
customElement("calcite-carousel", Carousel);
|
|
@@ -32,7 +32,7 @@ const SLOTS = {
|
|
|
32
32
|
filterActionsStart: "filter-actions-start",
|
|
33
33
|
filterActionsEnd: "filter-actions-end"
|
|
34
34
|
};
|
|
35
|
-
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:block}:host([scale=s]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xs)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}::slotted(:is(calcite-action[slot=filter-actions-start],calcite-action[slot=filter-actions-end])){gap:var(--calcite-internal-list-action-spacing);align-self:center}::slotted(calcite-action[slot=filter-actions-start]){margin-inline-start:var(--calcite-internal-list-action-spacing)}::slotted(calcite-action[slot=filter-actions-end]){margin-inline-end:var(--calcite-internal-list-action-spacing)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
35
|
+
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:block}:host([scale=s]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xs)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:calc(var(--calcite-z-index-sticky) + 1);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}::slotted(:is(calcite-action[slot=filter-actions-start],calcite-action[slot=filter-actions-end])){gap:var(--calcite-internal-list-action-spacing);align-self:center}::slotted(calcite-action[slot=filter-actions-start]){margin-inline-start:var(--calcite-internal-list-action-spacing)}::slotted(calcite-action[slot=filter-actions-end]){margin-inline-end:var(--calcite-internal-list-action-spacing)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
36
36
|
const parentSelector = `${listItemGroupSelector}, ${listItemSelector}`;
|
|
37
37
|
class List extends LitElement {
|
|
38
38
|
constructor() {
|
|
@@ -680,13 +680,13 @@ class List extends LitElement {
|
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
682
|
render() {
|
|
683
|
-
const { loading, label, disabled, dataForFilter, filterEnabled, filterPlaceholder,
|
|
683
|
+
const { loading, label, disabled, dataForFilter, filterEnabled, filterPlaceholder, filterLabel, hasFilterActionsStart, hasFilterActionsEnd, effectiveFilterProps } = this;
|
|
684
684
|
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap({
|
|
685
685
|
[CSS.container]: true,
|
|
686
686
|
[CSS.containerHeight]: this.listItems.length < 1 && loading
|
|
687
687
|
})} style=${safeStyleMap({
|
|
688
688
|
["--calcite-internal-filter-enabled-offset"]: `${this.filterRowHeight}px`
|
|
689
|
-
})}>${this.dragEnabled ? html`<span aria-live=assertive class=${safeClassMap(CSS.assistiveText)}>${this.assistiveText}</span>` : null}${this.renderItemAriaLive()}${loading ? html`<calcite-scrim class=${safeClassMap(CSS.scrim)} .loading=${loading}></calcite-scrim>` : null}<div .ariaBusy=${loading} .ariaLabel=${label || ""} class=${safeClassMap(CSS.table)} @keydown=${this.handleListKeydown} role=treegrid>${filterEnabled || hasFilterActionsStart || hasFilterActionsEnd ? html`<div class=${safeClassMap(CSS.sticky)} role=rowgroup ${ref(this.setFilterContainerEl)}><div role=row><div role=columnheader><calcite-stack class=${safeClassMap(CSS.stack)}><slot name=${SLOTS.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${SLOTS$1.actionsStart}></slot><calcite-filter .ariaLabel=${filterPlaceholder} .disabled=${disabled} .filterProps=${effectiveFilterProps} .items=${dataForFilter} .label=${filterLabel} @calciteFilterChange=${this.handleFilterChange} .placeholder=${filterPlaceholder} .scale=${this.scale}
|
|
689
|
+
})}>${this.dragEnabled ? html`<span aria-live=assertive class=${safeClassMap(CSS.assistiveText)}>${this.assistiveText}</span>` : null}${this.renderItemAriaLive()}${loading ? html`<calcite-scrim class=${safeClassMap(CSS.scrim)} .loading=${loading}></calcite-scrim>` : null}<div .ariaBusy=${loading} .ariaLabel=${label || ""} class=${safeClassMap(CSS.table)} @keydown=${this.handleListKeydown} role=treegrid>${filterEnabled || hasFilterActionsStart || hasFilterActionsEnd ? html`<div class=${safeClassMap(CSS.sticky)} role=rowgroup ${ref(this.setFilterContainerEl)}><div role=row><div role=columnheader><calcite-stack class=${safeClassMap(CSS.stack)}><slot name=${SLOTS.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${SLOTS$1.actionsStart}></slot><calcite-filter .ariaLabel=${filterPlaceholder} .disabled=${disabled} .filterProps=${effectiveFilterProps} .items=${dataForFilter} .label=${filterLabel} @calciteFilterChange=${this.handleFilterChange} .placeholder=${filterPlaceholder} .scale=${this.scale} ${ref(this.setFilterEl)}></calcite-filter><slot name=${SLOTS.filterActionsEnd} @slotchange=${this.handleFilterActionsEndSlotChange} slot=${SLOTS$1.actionsEnd}></slot></calcite-stack></div></div></div>` : null}<div class=${safeClassMap(CSS.tableContainer)} role=rowgroup><div .hidden=${!this.showEmptyContentContainer}><slot name=${SLOTS.emptyContent} @slotchange=${this.handleEmptyContentSlotChange}></slot></div><slot @slotchange=${this.handleDefaultSlotChange} ${ref(this.setDefaultSlotEl)}></slot></div></div><div aria-live=polite .hidden=${!this.showNoResultsContainer}><slot name=${SLOTS.filterNoResults} @slotchange=${this.handleFilterNoResultsSlotChange}></slot></div></div>` });
|
|
690
690
|
}
|
|
691
691
|
renderItemAriaLive() {
|
|
692
692
|
const { messages, filteredItems, parentListEl, messages: { _lang: effectiveLocale }, numberingSystem } = this;
|
|
@@ -37,6 +37,7 @@ class ShellPanel extends LitElement {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super(...arguments);
|
|
39
39
|
this.direction = useDirection();
|
|
40
|
+
this.resizeHandleRef = createRef();
|
|
40
41
|
this.actionBars = [];
|
|
41
42
|
this.contentRef = createRef();
|
|
42
43
|
this.messages = useT9n();
|
|
@@ -79,13 +80,30 @@ class ShellPanel extends LitElement {
|
|
|
79
80
|
async updateSize(size) {
|
|
80
81
|
this.updateSizeInternal(size);
|
|
81
82
|
}
|
|
83
|
+
connectedCallback() {
|
|
84
|
+
super.connectedCallback();
|
|
85
|
+
if (this.hasUpdated) {
|
|
86
|
+
this.refreshResize();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
82
89
|
willUpdate(changes) {
|
|
90
|
+
let shouldRefreshResize = false;
|
|
83
91
|
if (changes.has("layout") && (this.hasUpdated || this.layout !== "vertical")) {
|
|
84
92
|
this.setActionBarsLayout(this.actionBars);
|
|
85
|
-
this.
|
|
93
|
+
this.updateSizeInternal({ inline: null, block: null });
|
|
94
|
+
shouldRefreshResize = true;
|
|
86
95
|
}
|
|
87
96
|
if (changes.has("direction") && this.hasUpdated || changes.has("position") && (this.hasUpdated || this.position !== "start")) {
|
|
88
|
-
|
|
97
|
+
shouldRefreshResize = true;
|
|
98
|
+
}
|
|
99
|
+
if (changes.has("collapsed") && (this.hasUpdated || this.collapsed !== false) || changes.has("resizable") && (this.hasUpdated || this.resizable !== false)) {
|
|
100
|
+
shouldRefreshResize = this.resizable && !this.collapsed;
|
|
101
|
+
if (!shouldRefreshResize) {
|
|
102
|
+
this.cleanUpInteractions();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (shouldRefreshResize) {
|
|
106
|
+
this.refreshResize();
|
|
89
107
|
}
|
|
90
108
|
if (changes.has("collapsed") && this.hasUpdated) {
|
|
91
109
|
if (this.collapsed) {
|
|
@@ -97,7 +115,7 @@ class ShellPanel extends LitElement {
|
|
|
97
115
|
}
|
|
98
116
|
disconnectedCallback() {
|
|
99
117
|
super.disconnectedCallback();
|
|
100
|
-
this.
|
|
118
|
+
this.cleanUpInteractions();
|
|
101
119
|
}
|
|
102
120
|
getContentElDOMRect() {
|
|
103
121
|
return this.contentRef.value.getBoundingClientRect();
|
|
@@ -154,43 +172,54 @@ class ShellPanel extends LitElement {
|
|
|
154
172
|
break;
|
|
155
173
|
}
|
|
156
174
|
}
|
|
157
|
-
|
|
175
|
+
cleanUpInteractions() {
|
|
158
176
|
this.interaction?.unset();
|
|
159
177
|
}
|
|
160
|
-
|
|
161
|
-
this
|
|
162
|
-
|
|
163
|
-
if (!contentRef.value || collapsed || !resizable || !resizeHandleEl) {
|
|
178
|
+
updateResizeValues() {
|
|
179
|
+
const { contentRef } = this;
|
|
180
|
+
if (!contentRef.value) {
|
|
164
181
|
return;
|
|
165
182
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
maxBlockSize: getStylePixelValue(maxBlockSize) || window.innerHeight
|
|
183
|
+
const computedStyle = window.getComputedStyle(contentRef.value);
|
|
184
|
+
this.resizeValues = {
|
|
185
|
+
inlineSize: getStylePixelValue(computedStyle.inlineSize),
|
|
186
|
+
blockSize: getStylePixelValue(computedStyle.blockSize),
|
|
187
|
+
minInlineSize: getStylePixelValue(computedStyle.minInlineSize),
|
|
188
|
+
minBlockSize: getStylePixelValue(computedStyle.minBlockSize),
|
|
189
|
+
maxInlineSize: getStylePixelValue(computedStyle.maxInlineSize) || window.innerWidth,
|
|
190
|
+
maxBlockSize: getStylePixelValue(computedStyle.maxBlockSize) || window.innerHeight
|
|
175
191
|
};
|
|
176
|
-
|
|
192
|
+
}
|
|
193
|
+
async refreshResize() {
|
|
194
|
+
await this.componentOnReady();
|
|
195
|
+
await this.updateComplete;
|
|
196
|
+
this.updateResizeValues();
|
|
197
|
+
this.setUpResizeInteractions();
|
|
198
|
+
}
|
|
199
|
+
setUpResizeInteractions() {
|
|
200
|
+
this.cleanUpInteractions();
|
|
201
|
+
const { el, contentRef, resizable, position, collapsed, resizeHandleRef, layout } = this;
|
|
202
|
+
const resizeHandle = resizeHandleRef.value;
|
|
203
|
+
if (!contentRef.value || collapsed || !resizable || !resizeHandle) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
177
206
|
const rtl = this.direction === "rtl";
|
|
178
207
|
this.interaction = interact(contentRef.value, { context: el.ownerDocument }).resizable({
|
|
179
208
|
edges: {
|
|
180
|
-
top: position === "end" && layout === "horizontal" ?
|
|
181
|
-
right: position === (rtl ? "end" : "start") && layout === "vertical" ?
|
|
182
|
-
bottom: position === "start" && layout === "horizontal" ?
|
|
183
|
-
left: position === (rtl ? "start" : "end") && layout === "vertical" ?
|
|
209
|
+
top: position === "end" && layout === "horizontal" ? resizeHandle : false,
|
|
210
|
+
right: position === (rtl ? "end" : "start") && layout === "vertical" ? resizeHandle : false,
|
|
211
|
+
bottom: position === "start" && layout === "horizontal" ? resizeHandle : false,
|
|
212
|
+
left: position === (rtl ? "start" : "end") && layout === "vertical" ? resizeHandle : false
|
|
184
213
|
},
|
|
185
214
|
modifiers: [
|
|
186
215
|
interact.modifiers.restrictSize({
|
|
187
216
|
min: {
|
|
188
|
-
width:
|
|
189
|
-
height:
|
|
217
|
+
width: this.resizeValues.minInlineSize,
|
|
218
|
+
height: this.resizeValues.minBlockSize
|
|
190
219
|
},
|
|
191
220
|
max: {
|
|
192
|
-
width:
|
|
193
|
-
height:
|
|
221
|
+
width: this.resizeValues.maxInlineSize,
|
|
222
|
+
height: this.resizeValues.maxBlockSize
|
|
194
223
|
}
|
|
195
224
|
})
|
|
196
225
|
],
|
|
@@ -208,10 +237,6 @@ class ShellPanel extends LitElement {
|
|
|
208
237
|
}
|
|
209
238
|
});
|
|
210
239
|
}
|
|
211
|
-
setResizeHandleEl(el) {
|
|
212
|
-
this.resizeHandleEl = el;
|
|
213
|
-
this.setupInteractions();
|
|
214
|
-
}
|
|
215
240
|
setActionBarsLayout(actionBars) {
|
|
216
241
|
actionBars.forEach((actionBar) => actionBar.layout = this.layout);
|
|
217
242
|
}
|
|
@@ -234,7 +259,7 @@ class ShellPanel extends LitElement {
|
|
|
234
259
|
const { collapsed, position, resizable, layout, displayMode, resizeValues } = this;
|
|
235
260
|
const dir = this.direction;
|
|
236
261
|
const isBlockPosition = layout === "horizontal";
|
|
237
|
-
const separatorNode = !collapsed && resizable ? keyed("resize-handle", html`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${isBlockPosition ? "vertical" : "horizontal"} .ariaValueMax=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.maxBlockSize, resizeValues.maxInlineSize)} .ariaValueMin=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.minBlockSize, resizeValues.minInlineSize)} .ariaValueNow=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.blockSize, resizeValues.inlineSize)} class=${safeClassMap(CSS.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${ref(this.
|
|
262
|
+
const separatorNode = !collapsed && resizable ? keyed("resize-handle", html`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${isBlockPosition ? "vertical" : "horizontal"} .ariaValueMax=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.maxBlockSize, resizeValues.maxInlineSize)} .ariaValueMin=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.minBlockSize, resizeValues.minInlineSize)} .ariaValueNow=${ariaValueFromSize(isBlockPosition ? "block" : "inline", resizeValues.blockSize, resizeValues.inlineSize)} class=${safeClassMap(CSS.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${ref(this.resizeHandleRef)}><div class=${safeClassMap(CSS.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`) : null;
|
|
238
263
|
const getAnimationDir = () => {
|
|
239
264
|
if (layout === "horizontal") {
|
|
240
265
|
return position === "start" ? CSS_UTILITY.calciteAnimateInDown : CSS_UTILITY.calciteAnimateInUp;
|