@esri/calcite-components 1.0.0-next.365 → 1.0.0-next.366

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.
Files changed (180) hide show
  1. package/dist/calcite/calcite.esm.js +1 -1
  2. package/dist/calcite/p-0282fd8b.system.entry.js +5 -0
  3. package/dist/calcite/p-050ff462.entry.js +5 -0
  4. package/dist/calcite/p-05b03971.system.entry.js +5 -0
  5. package/dist/calcite/p-08847812.entry.js +5 -0
  6. package/dist/calcite/p-1bcce6c9.entry.js +5 -0
  7. package/dist/calcite/p-1ef9235e.system.entry.js +5 -0
  8. package/dist/calcite/p-25ed6059.entry.js +5 -0
  9. package/dist/calcite/p-40cbbd20.entry.js +5 -0
  10. package/dist/calcite/p-4347fde9.system.entry.js +5 -0
  11. package/dist/calcite/p-43cd4b9b.entry.js +5 -0
  12. package/dist/calcite/p-55e2658e.entry.js +5 -0
  13. package/dist/calcite/p-5682a918.entry.js +5 -0
  14. package/dist/calcite/p-597b782e.system.entry.js +5 -0
  15. package/dist/calcite/p-60e4f404.entry.js +5 -0
  16. package/dist/calcite/p-660c8077.js +5 -0
  17. package/dist/calcite/p-7279ccf9.entry.js +5 -0
  18. package/dist/calcite/p-832d7f68.system.entry.js +5 -0
  19. package/dist/calcite/p-888a152c.system.entry.js +5 -0
  20. package/dist/calcite/p-946c3bed.system.entry.js +5 -0
  21. package/dist/calcite/p-94717214.entry.js +5 -0
  22. package/dist/calcite/p-953259af.entry.js +5 -0
  23. package/dist/calcite/p-99d32fc3.system.js +1 -1
  24. package/dist/calcite/p-9b723fdd.system.entry.js +5 -0
  25. package/dist/calcite/p-9fe77a88.system.entry.js +5 -0
  26. package/dist/calcite/p-a52288cd.system.entry.js +5 -0
  27. package/dist/calcite/p-a71d17b4.entry.js +5 -0
  28. package/dist/calcite/p-aea7c650.system.entry.js +5 -0
  29. package/dist/calcite/p-af7ed41f.system.entry.js +5 -0
  30. package/dist/calcite/p-b14e0be5.system.entry.js +5 -0
  31. package/dist/calcite/p-b53b28e3.system.js +5 -0
  32. package/dist/calcite/p-b88d7391.entry.js +5 -0
  33. package/dist/calcite/p-ba915998.entry.js +5 -0
  34. package/dist/calcite/p-dd4457cd.entry.js +5 -0
  35. package/dist/calcite/p-eff2fb8c.system.entry.js +5 -0
  36. package/dist/calcite/p-fd57beb5.system.entry.js +5 -0
  37. package/dist/cjs/calcite-action-bar.cjs.entry.js +3 -24
  38. package/dist/cjs/calcite-action-group.cjs.entry.js +13 -0
  39. package/dist/cjs/calcite-action-menu.cjs.entry.js +3 -0
  40. package/dist/cjs/calcite-action-pad.cjs.entry.js +8 -0
  41. package/dist/cjs/calcite-block_2.cjs.entry.js +14 -1
  42. package/dist/cjs/calcite-chip.cjs.entry.js +14 -1
  43. package/dist/cjs/calcite-list_3.cjs.entry.js +13 -0
  44. package/dist/cjs/calcite-modal.cjs.entry.js +5 -2
  45. package/dist/cjs/calcite-notice.cjs.entry.js +8 -0
  46. package/dist/cjs/calcite-panel.cjs.entry.js +18 -12
  47. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +23 -0
  48. package/dist/cjs/calcite-shell_3.cjs.entry.js +35 -7
  49. package/dist/cjs/calcite-tile.cjs.entry.js +13 -0
  50. package/dist/cjs/calcite-tip_3.cjs.entry.js +13 -1
  51. package/dist/cjs/calcite-tree_2.cjs.entry.js +6 -0
  52. package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -0
  53. package/dist/cjs/conditionalSlot-e874fbb0.js +43 -0
  54. package/dist/collection/components/calcite-action-group/calcite-action-group.js +12 -0
  55. package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +3 -0
  56. package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +7 -0
  57. package/dist/collection/components/calcite-block/calcite-block.js +13 -1
  58. package/dist/collection/components/calcite-chip/calcite-chip.js +13 -1
  59. package/dist/collection/components/calcite-list-item/calcite-list-item.js +12 -0
  60. package/dist/collection/components/calcite-modal/calcite-modal.js +5 -2
  61. package/dist/collection/components/calcite-notice/calcite-notice.js +7 -0
  62. package/dist/collection/components/calcite-panel/calcite-panel.js +19 -14
  63. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +12 -0
  64. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +12 -0
  65. package/dist/collection/components/calcite-shell/calcite-shell.js +14 -2
  66. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +13 -1
  67. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +9 -4
  68. package/dist/collection/components/calcite-tile/calcite-tile.js +12 -0
  69. package/dist/collection/components/calcite-tip/calcite-tip.js +13 -1
  70. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +5 -0
  71. package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.js +12 -0
  72. package/dist/collection/utils/conditionalSlot.js +22 -11
  73. package/dist/components/calcite-action-bar.js +2 -23
  74. package/dist/components/calcite-action-group2.js +12 -0
  75. package/dist/components/calcite-action-menu2.js +3 -0
  76. package/dist/components/calcite-action-pad.js +7 -0
  77. package/dist/components/calcite-block.js +13 -1
  78. package/dist/components/calcite-chip2.js +13 -1
  79. package/dist/components/calcite-list-item.js +12 -0
  80. package/dist/components/calcite-modal.js +5 -2
  81. package/dist/components/calcite-notice.js +7 -0
  82. package/dist/components/calcite-panel.js +17 -12
  83. package/dist/components/calcite-pick-list-group.js +12 -0
  84. package/dist/components/calcite-pick-list-item2.js +12 -0
  85. package/dist/components/calcite-shell-center-row.js +13 -1
  86. package/dist/components/calcite-shell-panel.js +9 -4
  87. package/dist/components/calcite-shell.js +14 -2
  88. package/dist/components/calcite-tile2.js +12 -0
  89. package/dist/components/calcite-tip.js +13 -1
  90. package/dist/components/calcite-tree-item.js +5 -0
  91. package/dist/components/calcite-value-list-item.js +12 -0
  92. package/dist/components/conditionalSlot.js +40 -0
  93. package/dist/custom-elements/index.js +194 -35
  94. package/dist/esm/calcite-action-bar.entry.js +2 -23
  95. package/dist/esm/calcite-action-group.entry.js +13 -0
  96. package/dist/esm/calcite-action-menu.entry.js +3 -0
  97. package/dist/esm/calcite-action-pad.entry.js +8 -0
  98. package/dist/esm/calcite-block_2.entry.js +14 -1
  99. package/dist/esm/calcite-chip.entry.js +14 -1
  100. package/dist/esm/calcite-list_3.entry.js +13 -0
  101. package/dist/esm/calcite-modal.entry.js +5 -2
  102. package/dist/esm/calcite-notice.entry.js +8 -0
  103. package/dist/esm/calcite-panel.entry.js +18 -12
  104. package/dist/esm/calcite-pick-list_3.entry.js +23 -0
  105. package/dist/esm/calcite-shell_3.entry.js +35 -7
  106. package/dist/esm/calcite-tile.entry.js +13 -0
  107. package/dist/esm/calcite-tip_3.entry.js +13 -1
  108. package/dist/esm/calcite-tree_2.entry.js +6 -0
  109. package/dist/esm/calcite-value-list_2.entry.js +12 -0
  110. package/dist/esm/conditionalSlot-0c4ea23a.js +40 -0
  111. package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
  112. package/dist/esm-es5/calcite-action-group.entry.js +1 -1
  113. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  114. package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
  115. package/dist/esm-es5/calcite-block_2.entry.js +1 -1
  116. package/dist/esm-es5/calcite-chip.entry.js +2 -2
  117. package/dist/esm-es5/calcite-list_3.entry.js +1 -1
  118. package/dist/esm-es5/calcite-modal.entry.js +1 -1
  119. package/dist/esm-es5/calcite-notice.entry.js +2 -2
  120. package/dist/esm-es5/calcite-panel.entry.js +2 -2
  121. package/dist/esm-es5/calcite-pick-list_3.entry.js +1 -1
  122. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  123. package/dist/esm-es5/calcite-tile.entry.js +1 -1
  124. package/dist/esm-es5/calcite-tip_3.entry.js +1 -1
  125. package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
  126. package/dist/esm-es5/calcite-value-list_2.entry.js +1 -1
  127. package/dist/esm-es5/conditionalSlot-0c4ea23a.js +5 -0
  128. package/dist/extras/docs-json.json +1 -1
  129. package/dist/types/components/calcite-action-group/calcite-action-group.d.ts +4 -1
  130. package/dist/types/components/calcite-action-menu/calcite-action-menu.d.ts +2 -1
  131. package/dist/types/components/calcite-action-pad/calcite-action-pad.d.ts +4 -1
  132. package/dist/types/components/calcite-block/calcite-block.d.ts +4 -1
  133. package/dist/types/components/calcite-chip/calcite-chip.d.ts +4 -1
  134. package/dist/types/components/calcite-list-item/calcite-list-item.d.ts +4 -1
  135. package/dist/types/components/calcite-modal/calcite-modal.d.ts +2 -1
  136. package/dist/types/components/calcite-notice/calcite-notice.d.ts +4 -1
  137. package/dist/types/components/calcite-panel/calcite-panel.d.ts +5 -6
  138. package/dist/types/components/calcite-pick-list-group/calcite-pick-list-group.d.ts +4 -1
  139. package/dist/types/components/calcite-pick-list-item/calcite-pick-list-item.d.ts +4 -1
  140. package/dist/types/components/calcite-shell/calcite-shell.d.ts +4 -1
  141. package/dist/types/components/calcite-shell-center-row/calcite-shell-center-row.d.ts +4 -1
  142. package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +3 -1
  143. package/dist/types/components/calcite-tile/calcite-tile.d.ts +4 -1
  144. package/dist/types/components/calcite-tip/calcite-tip.d.ts +4 -1
  145. package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +3 -1
  146. package/dist/types/components/calcite-value-list-item/calcite-value-list-item.d.ts +4 -1
  147. package/hydrate/index.js +194 -35
  148. package/package.json +1 -1
  149. package/dist/calcite/p-0af820bf.entry.js +0 -5
  150. package/dist/calcite/p-0cf878ed.system.entry.js +0 -5
  151. package/dist/calcite/p-1d7a9909.system.entry.js +0 -5
  152. package/dist/calcite/p-253efee4.entry.js +0 -5
  153. package/dist/calcite/p-2618de8a.entry.js +0 -5
  154. package/dist/calcite/p-273cd5ab.entry.js +0 -5
  155. package/dist/calcite/p-2a8938c7.system.entry.js +0 -5
  156. package/dist/calcite/p-2c954eaa.system.entry.js +0 -5
  157. package/dist/calcite/p-37bddb73.system.entry.js +0 -5
  158. package/dist/calcite/p-3ab992ff.system.entry.js +0 -5
  159. package/dist/calcite/p-3b73b785.system.entry.js +0 -5
  160. package/dist/calcite/p-4659df78.entry.js +0 -5
  161. package/dist/calcite/p-54e271c9.system.entry.js +0 -5
  162. package/dist/calcite/p-5df1936f.entry.js +0 -5
  163. package/dist/calcite/p-698167ac.entry.js +0 -5
  164. package/dist/calcite/p-7d355abe.system.entry.js +0 -5
  165. package/dist/calcite/p-8d36bc7c.entry.js +0 -5
  166. package/dist/calcite/p-9d81d229.entry.js +0 -5
  167. package/dist/calcite/p-a0043c61.entry.js +0 -5
  168. package/dist/calcite/p-a1f65f6e.entry.js +0 -5
  169. package/dist/calcite/p-a4dec1f6.system.entry.js +0 -5
  170. package/dist/calcite/p-a9c50960.system.entry.js +0 -5
  171. package/dist/calcite/p-aaed1677.entry.js +0 -5
  172. package/dist/calcite/p-ac778725.system.entry.js +0 -5
  173. package/dist/calcite/p-ac8cf248.entry.js +0 -5
  174. package/dist/calcite/p-b4d3f1c1.entry.js +0 -5
  175. package/dist/calcite/p-c0ed9eff.entry.js +0 -5
  176. package/dist/calcite/p-cb9cd28c.system.entry.js +0 -5
  177. package/dist/calcite/p-d578e568.system.entry.js +0 -5
  178. package/dist/calcite/p-e564004a.system.entry.js +0 -5
  179. package/dist/calcite/p-f6fc151d.system.entry.js +0 -5
  180. package/dist/calcite/p-f73124d0.entry.js +0 -5
@@ -2,4 +2,4 @@ var __awaiter=this&&this.__awaiter||function(t,e,i,a){function n(t){return t ins
2
2
  /*!
3
3
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
4
4
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
5
- */import{r as registerInstance,c as createEvent,h,F as Fragment,g as getElement}from"./index-9de00868.js";import{g as getSlotted,a as getElementDir}from"./dom-037dc374.js";import{C as CalciteHeading,c as constrainHeadingLevel}from"./CalciteHeading-1d6cd311.js";import{c as createObserver}from"./observers-8f0bc419.js";import"./guid-196bd5ea.js";var CSS$1={header:"header",heading:"heading",close:"close",container:"container",tipContainer:"tip-container",tipContainerAdvancing:"tip-container--advancing",tipContainerRetreating:"tip-container--retreating",pagination:"pagination",pagePosition:"page-position",pageNext:"page-next",pagePrevious:"page-previous"};var ICONS$1={chevronLeft:"chevron-left",chevronRight:"chevron-right",close:"x"};var TEXT$1={defaultGroupTitle:"Tips",defaultPaginationLabel:"Tip",close:"Close",previous:"Previous",next:"Next"};var HEADING_LEVEL$1=2;var CSS={container:"container",header:"header",heading:"heading",close:"close",imageFrame:"image-frame",content:"content",info:"info"};var ICONS={close:"x"};var SLOTS={thumbnail:"thumbnail"};var TEXT={close:"Close"};var HEADING_LEVEL=HEADING_LEVEL$1+1;var calciteTipCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin:1rem;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.container{width:100%;padding:1rem}:host([dismissed]),:host([dismissed]) .container{display:none}:host([selected]) .container{margin:0px;border-style:none;padding:0px}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}.header{margin-bottom:0.5rem}.header .heading{padding:0px;color:var(--calcite-ui-text-1)}.container[hidden]{display:none}.content{display:-ms-flexbox;display:flex}.info{padding-top:0px;padding-bottom:0px;padding-left:1rem;padding-right:1rem;width:70%}.info:only-child{width:100%;padding-left:0px;padding-right:0px}::slotted(p){margin-top:0px}::slotted(a){outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;color:var(--calcite-ui-brand)}::slotted(a:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.image-frame{width:25%}.image-frame img{max-width:100%}::slotted(img){max-width:100%}";var CalciteTip=function(){function t(t){var e=this;registerInstance(this,t);this.calciteTipDismiss=createEvent(this,"calciteTipDismiss",7);this.dismissed=false;this.nonDismissible=false;this.selected=false;this.hideTip=function(){e.dismissed=true;e.calciteTipDismiss.emit()}}t.prototype.renderHeader=function(){var t;var e=this,i=e.heading,a=e.headingLevel,n=e.el;var r=(t=n.closest("calcite-tip-manager"))===null||t===void 0?void 0:t.headingLevel;var o=r?constrainHeadingLevel(r+1):null;var s=a||o||HEADING_LEVEL;return i?h("header",{class:CSS.header},h(CalciteHeading,{class:CSS.heading,level:s},i)):null};t.prototype.renderDismissButton=function(){var t=this,e=t.nonDismissible,i=t.hideTip,a=t.intlClose;var n=a||TEXT.close;return!e?h("calcite-action",{class:CSS.close,icon:ICONS.close,onClick:i,scale:"l",text:n}):null};t.prototype.renderImageFrame=function(){var t=this.el;return getSlotted(t,SLOTS.thumbnail)?h("div",{class:CSS.imageFrame},h("slot",{name:SLOTS.thumbnail})):null};t.prototype.renderInfoNode=function(){return h("div",{class:CSS.info},h("slot",null))};t.prototype.renderContent=function(){return h("div",{class:CSS.content},this.renderImageFrame(),this.renderInfoNode())};t.prototype.render=function(){return h(Fragment,null,h("article",{class:CSS.container},this.renderHeader(),this.renderContent()),this.renderDismissButton())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteTip.style=calciteTipCss;var calciteTipGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}::slotted(calcite-tip){margin:0px;border-style:none}:host-context(calcite-tip-manager){margin-top:0.75rem;margin-bottom:0.75rem}:host-context(calcite-tip-manager) ::slotted(calcite-tip){padding:1rem}";var CalciteTipGroup=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return h("slot",null)};return t}();CalciteTipGroup.style=calciteTipGroupCss;var calciteTipManagerCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2);--calcite-tip-manager-height:19vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([closed]){display:none}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}.header{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-top:0px;padding-bottom:0px;-webkit-padding-end:0px;padding-inline-end:0px;-webkit-padding-start:1rem;padding-inline-start:1rem}.header h2.heading{padding:0px;font-size:var(--calcite-font-size-1);line-height:1.5rem;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1)}.container{position:relative;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;overflow:hidden;min-height:150px}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.tip-container{margin-top:1px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center;overflow:auto;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-animation-name:none;animation-name:none;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing);height:var(--calcite-tip-manager-height)}.tip-container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(calcite-tip){border-style:none;padding:0.75rem;max-width:var(--calcite-tip-max-width)}.tip-container--advancing{-webkit-animation-name:tip-advance;animation-name:tip-advance}.tip-container--retreating{-webkit-animation-name:tip-retreat;animation-name:tip-retreat}.pagination{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-left:0px;padding-right:0px;padding-top:0.75rem;padding-bottom:0.5rem}.page-position{margin-top:0px;margin-bottom:0px;margin-left:0.5rem;margin-right:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}@-webkit-keyframes tip-advance{0%{opacity:0}0%{-webkit-transform:translate3d(50px, 0, 0) scale(0.99);transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-advance{0%{opacity:0}0%{-webkit-transform:translate3d(50px, 0, 0) scale(0.99);transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@-webkit-keyframes tip-retreat{0%{opacity:0}0%{-webkit-transform:translate3d(-50px, 0, 0) scale(0.99);transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-retreat{0%{opacity:0}0%{-webkit-transform:translate3d(-50px, 0, 0) scale(0.99);transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}";var CalciteTipManager=function(){function t(t){var e=this;registerInstance(this,t);this.calciteTipManagerToggle=createEvent(this,"calciteTipManagerToggle",7);this.closed=false;this.mutationObserver=createObserver("mutation",(function(){return e.setUpTips()}));this.hideTipManager=function(){e.closed=true;e.calciteTipManagerToggle.emit()};this.previousClicked=function(){e.previousTip()};this.nextClicked=function(){e.nextTip()};this.tipManagerKeyUpHandler=function(t){if(t.target!==e.container){return}switch(t.key){case"ArrowRight":t.preventDefault();e.nextTip();break;case"ArrowLeft":t.preventDefault();e.previousTip();break;case"Home":t.preventDefault();e.selectedIndex=0;break;case"End":t.preventDefault();e.selectedIndex=e.total-1;break}};this.storeContainerRef=function(t){e.container=t}}t.prototype.closedChangeHandler=function(){this.direction=null;this.calciteTipManagerToggle.emit()};t.prototype.selectedChangeHandler=function(){this.showSelectedTip();this.updateGroupTitle()};t.prototype.connectedCallback=function(){var t;this.setUpTips();(t=this.mutationObserver)===null||t===void 0?void 0:t.observe(this.el,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.nextTip=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){this.direction="advancing";t=this.selectedIndex+1;this.selectedIndex=(t+this.total)%this.total;return[2]}))}))};t.prototype.previousTip=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){this.direction="retreating";t=this.selectedIndex-1;this.selectedIndex=(t+this.total)%this.total;return[2]}))}))};t.prototype.setUpTips=function(){var t=Array.from(this.el.querySelectorAll("calcite-tip"));this.total=t.length;if(this.total===0){return}var e=this.el.querySelector("calcite-tip[selected]");this.tips=t;this.selectedIndex=e?t.indexOf(e):0;t.forEach((function(t){t.nonDismissible=true}));this.showSelectedTip();this.updateGroupTitle()};t.prototype.showSelectedTip=function(){var t=this;this.tips.forEach((function(e,i){var a=t.selectedIndex===i;e.selected=a;e.hidden=!a}))};t.prototype.updateGroupTitle=function(){var t=this.tips[this.selectedIndex];var e=t.closest("calcite-tip-group");this.groupTitle=(e===null||e===void 0?void 0:e.groupTitle)||this.intlDefaultTitle||TEXT$1.defaultGroupTitle};t.prototype.renderPagination=function(){var t=getElementDir(this.el);var e=this,i=e.selectedIndex,a=e.tips,n=e.total,r=e.intlNext,o=e.intlPrevious,s=e.intlPaginationLabel;var c=r||TEXT$1.next;var l=o||TEXT$1.previous;var m=s||TEXT$1.defaultPaginationLabel;return a.length>1?h("footer",{class:CSS$1.pagination},h("calcite-action",{class:CSS$1.pagePrevious,icon:t==="ltr"?ICONS$1.chevronLeft:ICONS$1.chevronRight,onClick:this.previousClicked,scale:"m",text:l}),h("span",{class:CSS$1.pagePosition},m+" "+(i+1)+"/"+n),h("calcite-action",{class:CSS$1.pageNext,icon:t==="ltr"?ICONS$1.chevronRight:ICONS$1.chevronLeft,onClick:this.nextClicked,scale:"m",text:c})):null};t.prototype.render=function(){var t;var e=this,i=e.closed,a=e.direction,n=e.headingLevel,r=e.groupTitle,o=e.selectedIndex,s=e.intlClose,c=e.total;var l=s||TEXT$1.close;if(c===0){return null}return h("section",{"aria-hidden":i.toString(),class:CSS$1.container,hidden:i,onKeyUp:this.tipManagerKeyUpHandler,ref:this.storeContainerRef,tabIndex:0},h("header",{class:CSS$1.header},h(CalciteHeading,{class:CSS$1.heading,level:n||HEADING_LEVEL$1},r),h("calcite-action",{class:CSS$1.close,onClick:this.hideTipManager,scale:"m",text:l},h("calcite-icon",{icon:ICONS$1.close,scale:"m"}))),h("div",{class:(t={},t[CSS$1.tipContainer]=true,t[CSS$1.tipContainerAdvancing]=!i&&a==="advancing",t[CSS$1.tipContainerRetreating]=!i&&a==="retreating",t),key:o,tabIndex:0},h("slot",null)),this.renderPagination())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{closed:["closedChangeHandler"],selectedIndex:["selectedChangeHandler"]}},enumerable:false,configurable:true});return t}();CalciteTipManager.style=calciteTipManagerCss;export{CalciteTip as calcite_tip,CalciteTipGroup as calcite_tip_group,CalciteTipManager as calcite_tip_manager};
5
+ */import{r as registerInstance,c as createEvent,h,F as Fragment,g as getElement}from"./index-9de00868.js";import{g as getSlotted,a as getElementDir}from"./dom-037dc374.js";import{C as CalciteHeading,c as constrainHeadingLevel}from"./CalciteHeading-1d6cd311.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-0c4ea23a.js";import{c as createObserver}from"./observers-8f0bc419.js";import"./guid-196bd5ea.js";var CSS$1={header:"header",heading:"heading",close:"close",container:"container",tipContainer:"tip-container",tipContainerAdvancing:"tip-container--advancing",tipContainerRetreating:"tip-container--retreating",pagination:"pagination",pagePosition:"page-position",pageNext:"page-next",pagePrevious:"page-previous"};var ICONS$1={chevronLeft:"chevron-left",chevronRight:"chevron-right",close:"x"};var TEXT$1={defaultGroupTitle:"Tips",defaultPaginationLabel:"Tip",close:"Close",previous:"Previous",next:"Next"};var HEADING_LEVEL$1=2;var CSS={container:"container",header:"header",heading:"heading",close:"close",imageFrame:"image-frame",content:"content",info:"info"};var ICONS={close:"x"};var SLOTS={thumbnail:"thumbnail"};var TEXT={close:"Close"};var HEADING_LEVEL=HEADING_LEVEL$1+1;var calciteTipCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin:1rem;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.container{width:100%;padding:1rem}:host([dismissed]),:host([dismissed]) .container{display:none}:host([selected]) .container{margin:0px;border-style:none;padding:0px}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}.header{margin-bottom:0.5rem}.header .heading{padding:0px;color:var(--calcite-ui-text-1)}.container[hidden]{display:none}.content{display:-ms-flexbox;display:flex}.info{padding-top:0px;padding-bottom:0px;padding-left:1rem;padding-right:1rem;width:70%}.info:only-child{width:100%;padding-left:0px;padding-right:0px}::slotted(p){margin-top:0px}::slotted(a){outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;color:var(--calcite-ui-brand)}::slotted(a:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.image-frame{width:25%}.image-frame img{max-width:100%}::slotted(img){max-width:100%}";var CalciteTip=function(){function t(t){var e=this;registerInstance(this,t);this.calciteTipDismiss=createEvent(this,"calciteTipDismiss",7);this.dismissed=false;this.nonDismissible=false;this.selected=false;this.hideTip=function(){e.dismissed=true;e.calciteTipDismiss.emit()}}t.prototype.connectedCallback=function(){connectConditionalSlotComponent(this)};t.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};t.prototype.renderHeader=function(){var t;var e=this,i=e.heading,a=e.headingLevel,n=e.el;var r=(t=n.closest("calcite-tip-manager"))===null||t===void 0?void 0:t.headingLevel;var o=r?constrainHeadingLevel(r+1):null;var s=a||o||HEADING_LEVEL;return i?h("header",{class:CSS.header},h(CalciteHeading,{class:CSS.heading,level:s},i)):null};t.prototype.renderDismissButton=function(){var t=this,e=t.nonDismissible,i=t.hideTip,a=t.intlClose;var n=a||TEXT.close;return!e?h("calcite-action",{class:CSS.close,icon:ICONS.close,onClick:i,scale:"l",text:n}):null};t.prototype.renderImageFrame=function(){var t=this.el;return getSlotted(t,SLOTS.thumbnail)?h("div",{class:CSS.imageFrame,key:"thumbnail"},h("slot",{name:SLOTS.thumbnail})):null};t.prototype.renderInfoNode=function(){return h("div",{class:CSS.info},h("slot",null))};t.prototype.renderContent=function(){return h("div",{class:CSS.content},this.renderImageFrame(),this.renderInfoNode())};t.prototype.render=function(){return h(Fragment,null,h("article",{class:CSS.container},this.renderHeader(),this.renderContent()),this.renderDismissButton())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteTip.style=calciteTipCss;var calciteTipGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}::slotted(calcite-tip){margin:0px;border-style:none}:host-context(calcite-tip-manager){margin-top:0.75rem;margin-bottom:0.75rem}:host-context(calcite-tip-manager) ::slotted(calcite-tip){padding:1rem}";var CalciteTipGroup=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return h("slot",null)};return t}();CalciteTipGroup.style=calciteTipGroupCss;var calciteTipManagerCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2);--calcite-tip-manager-height:19vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([closed]){display:none}.header{margin:0px;display:-ms-flexbox;display:flex;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-align:center;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{-ms-flex:1 1 auto;flex:1 1 auto;padding:0.5rem}h1.heading{font-size:var(--calcite-font-size-2);line-height:1.5rem}h2.heading{font-size:var(--calcite-font-size-1);line-height:1.5rem}h3.heading{font-size:var(--calcite-font-size-0);line-height:1.25rem}h4.heading,h5.heading{font-size:var(--calcite-font-size--1);line-height:1rem}.header{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-top:0px;padding-bottom:0px;-webkit-padding-end:0px;padding-inline-end:0px;-webkit-padding-start:1rem;padding-inline-start:1rem}.header h2.heading{padding:0px;font-size:var(--calcite-font-size-1);line-height:1.5rem;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1)}.container{position:relative;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;overflow:hidden;min-height:150px}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.tip-container{margin-top:1px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center;overflow:auto;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;-webkit-animation-name:none;animation-name:none;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing);height:var(--calcite-tip-manager-height)}.tip-container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(calcite-tip){border-style:none;padding:0.75rem;max-width:var(--calcite-tip-max-width)}.tip-container--advancing{-webkit-animation-name:tip-advance;animation-name:tip-advance}.tip-container--retreating{-webkit-animation-name:tip-retreat;animation-name:tip-retreat}.pagination{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-left:0px;padding-right:0px;padding-top:0.75rem;padding-bottom:0.5rem}.page-position{margin-top:0px;margin-bottom:0px;margin-left:0.5rem;margin-right:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}@-webkit-keyframes tip-advance{0%{opacity:0}0%{-webkit-transform:translate3d(50px, 0, 0) scale(0.99);transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-advance{0%{opacity:0}0%{-webkit-transform:translate3d(50px, 0, 0) scale(0.99);transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@-webkit-keyframes tip-retreat{0%{opacity:0}0%{-webkit-transform:translate3d(-50px, 0, 0) scale(0.99);transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-retreat{0%{opacity:0}0%{-webkit-transform:translate3d(-50px, 0, 0) scale(0.99);transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1}100%{-webkit-transform:translate3d(0, 0, 0) scale(1);transform:translate3d(0, 0, 0) scale(1)}}";var CalciteTipManager=function(){function t(t){var e=this;registerInstance(this,t);this.calciteTipManagerToggle=createEvent(this,"calciteTipManagerToggle",7);this.closed=false;this.mutationObserver=createObserver("mutation",(function(){return e.setUpTips()}));this.hideTipManager=function(){e.closed=true;e.calciteTipManagerToggle.emit()};this.previousClicked=function(){e.previousTip()};this.nextClicked=function(){e.nextTip()};this.tipManagerKeyUpHandler=function(t){if(t.target!==e.container){return}switch(t.key){case"ArrowRight":t.preventDefault();e.nextTip();break;case"ArrowLeft":t.preventDefault();e.previousTip();break;case"Home":t.preventDefault();e.selectedIndex=0;break;case"End":t.preventDefault();e.selectedIndex=e.total-1;break}};this.storeContainerRef=function(t){e.container=t}}t.prototype.closedChangeHandler=function(){this.direction=null;this.calciteTipManagerToggle.emit()};t.prototype.selectedChangeHandler=function(){this.showSelectedTip();this.updateGroupTitle()};t.prototype.connectedCallback=function(){var t;this.setUpTips();(t=this.mutationObserver)===null||t===void 0?void 0:t.observe(this.el,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.nextTip=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){this.direction="advancing";t=this.selectedIndex+1;this.selectedIndex=(t+this.total)%this.total;return[2]}))}))};t.prototype.previousTip=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){this.direction="retreating";t=this.selectedIndex-1;this.selectedIndex=(t+this.total)%this.total;return[2]}))}))};t.prototype.setUpTips=function(){var t=Array.from(this.el.querySelectorAll("calcite-tip"));this.total=t.length;if(this.total===0){return}var e=this.el.querySelector("calcite-tip[selected]");this.tips=t;this.selectedIndex=e?t.indexOf(e):0;t.forEach((function(t){t.nonDismissible=true}));this.showSelectedTip();this.updateGroupTitle()};t.prototype.showSelectedTip=function(){var t=this;this.tips.forEach((function(e,i){var a=t.selectedIndex===i;e.selected=a;e.hidden=!a}))};t.prototype.updateGroupTitle=function(){var t=this.tips[this.selectedIndex];var e=t.closest("calcite-tip-group");this.groupTitle=(e===null||e===void 0?void 0:e.groupTitle)||this.intlDefaultTitle||TEXT$1.defaultGroupTitle};t.prototype.renderPagination=function(){var t=getElementDir(this.el);var e=this,i=e.selectedIndex,a=e.tips,n=e.total,r=e.intlNext,o=e.intlPrevious,s=e.intlPaginationLabel;var c=r||TEXT$1.next;var l=o||TEXT$1.previous;var m=s||TEXT$1.defaultPaginationLabel;return a.length>1?h("footer",{class:CSS$1.pagination},h("calcite-action",{class:CSS$1.pagePrevious,icon:t==="ltr"?ICONS$1.chevronLeft:ICONS$1.chevronRight,onClick:this.previousClicked,scale:"m",text:l}),h("span",{class:CSS$1.pagePosition},m+" "+(i+1)+"/"+n),h("calcite-action",{class:CSS$1.pageNext,icon:t==="ltr"?ICONS$1.chevronRight:ICONS$1.chevronLeft,onClick:this.nextClicked,scale:"m",text:c})):null};t.prototype.render=function(){var t;var e=this,i=e.closed,a=e.direction,n=e.headingLevel,r=e.groupTitle,o=e.selectedIndex,s=e.intlClose,c=e.total;var l=s||TEXT$1.close;if(c===0){return null}return h("section",{"aria-hidden":i.toString(),class:CSS$1.container,hidden:i,onKeyUp:this.tipManagerKeyUpHandler,ref:this.storeContainerRef,tabIndex:0},h("header",{class:CSS$1.header},h(CalciteHeading,{class:CSS$1.heading,level:n||HEADING_LEVEL$1},r),h("calcite-action",{class:CSS$1.close,onClick:this.hideTipManager,scale:"m",text:l},h("calcite-icon",{icon:ICONS$1.close,scale:"m"}))),h("div",{class:(t={},t[CSS$1.tipContainer]=true,t[CSS$1.tipContainerAdvancing]=!i&&a==="advancing",t[CSS$1.tipContainerRetreating]=!i&&a==="retreating",t),key:o,tabIndex:0},h("slot",null)),this.renderPagination())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{closed:["closedChangeHandler"],selectedIndex:["selectedChangeHandler"]}},enumerable:false,configurable:true});return t}();CalciteTipManager.style=calciteTipManagerCss;export{CalciteTip as calcite_tip,CalciteTipGroup as calcite_tip_group,CalciteTipManager as calcite_tip_manager};
@@ -2,4 +2,4 @@
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{f as focusElement,n as nodeListToArray,g as getSlotted,a as getElementDir,C as CSS_UTILITY,k as filterDirectChildren}from"./dom-037dc374.js";import"./guid-196bd5ea.js";var TreeSelectionMode;(function(e){e["Single"]="single";e["Multi"]="multi";e["Children"]="children";e["MultiChildren"]="multi-children";e["Ancestors"]="ancestors"})(TreeSelectionMode||(TreeSelectionMode={}));var calciteTreeCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;outline:2px solid transparent;outline-offset:2px}";var CalciteTree=function(){function e(e){registerInstance(this,e);this.calciteTreeSelect=createEvent(this,"calciteTreeSelect",7);this.lines=false;this.inputEnabled=false;this.scale="m";this.selectionMode=TreeSelectionMode.Single}e.prototype.componentWillRender=function(){var e=this.el.parentElement.closest("calcite-tree");this.lines=e?e.lines:this.lines;this.scale=e?e.scale:this.scale;this.selectionMode=e?e.selectionMode:this.selectionMode;this.child=!!e};e.prototype.render=function(){return h(Host,{"aria-multiselectable":(this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren).toString(),role:!this.child?"tree":undefined,tabIndex:this.getRootTabIndex()},h("slot",null))};e.prototype.onFocus=function(){if(!this.child){var e=this.el.querySelector("calcite-tree-item[selected]")||this.el.querySelector("calcite-tree-item");focusElement(e)}};e.prototype.onFocusIn=function(e){var t=e.relatedTarget===this.el||!this.el.contains(e.relatedTarget);if(t){this.el.tabIndex=-1}};e.prototype.onFocusOut=function(e){var t=!this.el.contains(e.relatedTarget);if(t){this.el.tabIndex=this.getRootTabIndex()}};e.prototype.onClick=function(e){var t=e.target;var i=nodeListToArray(t.querySelectorAll("calcite-tree-item"));if(this.child){return}if(!this.child){e.preventDefault();e.stopPropagation()}if(this.selectionMode===TreeSelectionMode.Ancestors&&!this.child){this.updateAncestorTree(e);return}var n=this.selectionMode!==null&&(!t.hasChildren||t.hasChildren&&(this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren));var a=e.detail.modifyCurrentSelection&&(this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren);var r=this.selectionMode===TreeSelectionMode.MultiChildren||this.selectionMode===TreeSelectionMode.Children;var o=!a&&((this.selectionMode===TreeSelectionMode.Single||this.selectionMode===TreeSelectionMode.Multi)&&i.length<=0||this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren);var c=this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren;if(!this.child){var l=[];if(n){l.push(t)}if(r){i.forEach((function(e){l.push(e)}))}if(o){var s=nodeListToArray(this.el.querySelectorAll("calcite-tree-item[selected]"));s.forEach((function(e){if(!l.includes(e)){e.selected=false}}))}if(c&&!e.detail.forceToggle){t.expanded=true}if(a){window.getSelection().removeAllRanges()}if(a&&t.selected||r&&e.detail.forceToggle){l.forEach((function(e){e.selected=false}))}else{l.forEach((function(e){e.selected=true}))}}this.calciteTreeSelect.emit({selected:nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((function(e){return e.selected}))})};e.prototype.updateAncestorTree=function(e){var t=e.target;var i=t.querySelectorAll("calcite-tree-item");var n=[];var a=t.parentElement.closest("calcite-tree-item");while(a){n.push(a);a=a.parentElement.closest("calcite-tree-item")}t.selected=!t.selected;t.indeterminate=false;if(i===null||i===void 0?void 0:i.length){i.forEach((function(e){e.selected=t.selected;e.indeterminate=false}))}if(n){n.forEach((function(e){var t=nodeListToArray(e.querySelectorAll("calcite-tree-item"));var i=t.filter((function(e){return e.selected}));if(i.length===0){e.selected=false;e.indeterminate=false;return}var n=i.length<t.length;e.indeterminate=n;e.selected=!n}))}this.calciteTreeSelect.emit({selected:nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((function(e){return e.selected}))})};e.prototype.getRootTabIndex=function(){return!this.child?0:-1};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteTree.style=calciteTreeCss;var CSS={checkboxLabel:"checkbox-label",checkbox:"checkbox",chevron:"chevron",nodeContainer:"node-container",childrenContainer:"children-container",bulletPointIcon:"bullet-point",checkmarkIcon:"checkmark"};var SLOTS={children:"children"};var ICONS={bulletPoint:"bullet-point",checkmark:"check",chevronRight:"chevron-right"};var calciteTreeItemCss='@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;max-width:100%;cursor:pointer;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .node-container{--calcite-tree-padding-y:0.25rem}:host([scale=s]) .node-container .checkbox,:host([scale=s]) .node-container .chevron,:host([scale=s]) .node-container .checkmark,:host([scale=s]) .node-container .bullet-point{margin-inline:0.25rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .node-container{--calcite-tree-padding-y:0.5rem}:host([scale=m]) .node-container .checkbox,:host([scale=m]) .node-container .chevron,:host([scale=m]) .node-container .checkmark,:host([scale=m]) .node-container .bullet-point{margin-inline:0.5rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .node-container{--calcite-tree-padding-y:0.75rem}:host([scale=l]) .node-container .checkbox,:host([scale=l]) .node-container .chevron,:host([scale=l]) .node-container .checkmark,:host([scale=l]) .node-container .bullet-point{margin-inline:0.75rem}:host([lines]) .children-container:after{position:absolute;top:0px;width:1px;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;height:96%;content:"";background-color:var(--calcite-ui-border-2);z-index:-1}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-width:0px;max-width:100%;overflow-wrap:break-word;color:inherit;text-decoration:none !important}::slotted(*):hover{text-decoration:none !important}::slotted(a){width:100%;-webkit-text-decoration-line:none;text-decoration-line:none}:host{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.checkbox{outline:2px solid transparent;outline-offset:2px;line-height:0}.checkbox-label{pointer-events:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.children-container{position:relative;height:0px;overflow:hidden;-webkit-margin-start:1.25rem;margin-inline-start:1.25rem;-webkit-transform:scaleY(0);transform:scaleY(0);opacity:0;-webkit-transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;-webkit-transform-origin:top;transform-origin:top}:host([expanded])>.children-container{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:1;height:auto}.node-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:var(--calcite-tree-padding-y) 0}.node-container .checkmark,.node-container .bullet-point{opacity:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;color:var(--calcite-ui-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus) .node-container .checkmark,:host(:focus) .node-container .bullet-point{opacity:1}:host([selected])>.node-container,:host([selected])>.node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected])>.node-container .bullet-point,:host([selected])>.node-container .checkmark,:host([selected])>.node-container:hover .bullet-point,:host([selected])>.node-container:hover .checkmark{opacity:1;color:var(--calcite-ui-brand)}:host(:not([has-children])):host([scale=s])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}:host(:not([has-children])):host([scale=m])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=l])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}:host([has-children])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-margin-start:0;margin-inline-start:0}:host([has-children])>.node-container .bullet-point,:host([has-children])>.node-container .checkmark{display:none}:host([has-children][expanded]:not([selected]))>.node-container ::slotted(*){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([has-children][selected])>.node-container[data-selection-mode=children],:host([has-children][selected])>.node-container[data-selection-mode=multi-children]{color:var(--calcite-ui-brand)}.chevron{position:relative;-ms-flex-item-align:center;align-self:center;color:var(--calcite-ui-text-3);-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.calcite--rtl .chevron{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host([expanded])>.node-container>.chevron{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-ui-brand)}';var CalciteTreeItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteTreeItemSelect=createEvent(this,"calciteTreeItemSelect",7);this.selected=false;this.expanded=false;this.parentExpanded=false;this.depth=-1;this.hasChildren=null;this.iconClickHandler=function(e){e.stopPropagation();t.expanded=!t.expanded;if(t.selectionMode!==TreeSelectionMode.Ancestors){t.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:true})}};this.childrenClickHandler=function(e){return e.stopPropagation()};this.updateParentIsExpanded=function(e,t){var i=getSlotted(e,SLOTS.children,{all:true,selector:"calcite-tree-item"});i.forEach((function(e){return e.parentExpanded=t}))};this.updateAncestorTree=function(){if(t.selected&&t.selectionMode===TreeSelectionMode.Ancestors){var e=[];var i=t.parentTreeItem;while(i){e.push(i);i=i.parentElement.closest("calcite-tree-item")}e.forEach((function(e){return e.indeterminate=true}));return}}}e.prototype.expandedHandler=function(e){this.updateParentIsExpanded(this.el,e)};e.prototype.connectedCallback=function(){this.parentTreeItem=this.el.parentElement.closest("calcite-tree-item");if(this.parentTreeItem){var e=this.parentTreeItem.expanded;this.updateParentIsExpanded(this.parentTreeItem,e)}};e.prototype.componentWillRender=function(){this.hasChildren=!!this.el.querySelector("calcite-tree");this.depth=0;var e=this.el.closest("calcite-tree");if(!e){return}this.selectionMode=e.selectionMode;this.scale=e.scale||"m";this.lines=e.lines;var t;while(e){t=e.parentElement.closest("calcite-tree");if(t===e){break}else{e=t;this.depth=this.depth+1}}};e.prototype.componentDidLoad=function(){this.updateAncestorTree()};e.prototype.render=function(){var e,t,i,n;var a=this;var r=getElementDir(this.el)==="rtl";var o=this.selectionMode===TreeSelectionMode.Single||this.selectionMode===TreeSelectionMode.Children;var c=this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren;var l=this.hasChildren?h("calcite-icon",{class:(e={},e[CSS.chevron]=true,e[CSS_UTILITY.rtl]=r,e),"data-test-id":"icon",icon:ICONS.chevronRight,onClick:this.iconClickHandler,scale:"s"}):null;var s=this.selectionMode===TreeSelectionMode.Ancestors?h("label",{class:CSS.checkboxLabel},h("calcite-checkbox",{checked:this.selected,class:CSS.checkbox,"data-test-id":"checkbox",indeterminate:this.hasChildren&&this.indeterminate,scale:this.scale,tabIndex:-1}),h("slot",null)):null;var d=o?ICONS.bulletPoint:c?ICONS.checkmark:null;var m=d?h("calcite-icon",{class:(t={},t[CSS.bulletPointIcon]=d===ICONS.bulletPoint,t[CSS.checkmarkIcon]=d===ICONS.checkmark,t[CSS_UTILITY.rtl]=r,t),icon:d,scale:"s"}):null;var f=!(this.parentExpanded||this.depth===1);return h(Host,{"aria-expanded":this.hasChildren?this.expanded.toString():undefined,"aria-hidden":f.toString(),"aria-selected":this.selected?"true":c?"false":undefined,"calcite-hydrated-hidden":f,role:"treeitem",tabindex:this.parentExpanded||this.depth===1?"0":"-1"},h("div",{class:(i={},i[CSS.nodeContainer]=true,i[CSS_UTILITY.rtl]=r,i),"data-selection-mode":this.selectionMode,ref:function(e){return a.defaultSlotWrapper=e}},l,m,s?s:h("slot",null)),h("div",{class:(n={},n[CSS.childrenContainer]=true,n[CSS_UTILITY.rtl]=r,n),"data-test-id":"calcite-tree-children",onClick:this.childrenClickHandler,ref:function(e){return a.childrenSlotWrapper=e},role:this.hasChildren?"group":undefined},h("slot",{name:SLOTS.children})))};e.prototype.onClick=function(e){var t=filterDirectChildren(this.el,"a")[0];if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){var i=t.target===""?"_self":t.target;window.open(t.href,i)}this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey||this.selectionMode===TreeSelectionMode.Ancestors,forceToggle:false})};e.prototype.keyDownHandler=function(e){var t;switch(e.key){case" ":this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:false});e.preventDefault();e.stopPropagation();break;case"Enter":var i=nodeListToArray(this.el.children).find((function(e){return e.matches("a")}));if(i){i.click();this.selected=true}else{this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:false})}e.preventDefault();e.stopPropagation();break;case"ArrowLeft":if(this.hasChildren&&this.expanded){this.expanded=false;e.preventDefault();e.stopPropagation();break}var n=this.parentTreeItem;if(n&&(!this.hasChildren||this.expanded===false)){n.focus();e.preventDefault();e.stopPropagation();break}break;case"ArrowRight":if(this.hasChildren&&this.expanded===false){this.expanded=true;e.preventDefault();e.stopPropagation();break}if(this.hasChildren&&this.expanded){this.el.querySelector("calcite-tree-item").focus();break}break;case"ArrowUp":var a=this.el.previousElementSibling;if(a&&a.matches("calcite-tree-item")){a.focus()}break;case"ArrowDown":var r=this.el.nextElementSibling;if(r&&r.matches("calcite-tree-item")){r.focus()}break;case"Home":t=this.el.closest("calcite-tree:not([child])");var o=t.querySelector("calcite-tree-item");o.focus();break;case"End":t=this.el.closest("calcite-tree:not([child])");var c=t.children[t.children.length-1];var l=nodeListToArray(c.children).find((function(e){return e.matches("calcite-tree")}));while(l){c=l.children[t.children.length-1];l=nodeListToArray(c.children).find((function(e){return e.matches("calcite-tree")}))}c.focus();break}};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["expandedHandler"]}},enumerable:false,configurable:true});return e}();CalciteTreeItem.style=calciteTreeItemCss;export{CalciteTree as calcite_tree,CalciteTreeItem as calcite_tree_item};
5
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9de00868.js";import{f as focusElement,n as nodeListToArray,g as getSlotted,a as getElementDir,C as CSS_UTILITY,k as filterDirectChildren}from"./dom-037dc374.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-0c4ea23a.js";import"./guid-196bd5ea.js";import"./observers-8f0bc419.js";var TreeSelectionMode;(function(e){e["Single"]="single";e["Multi"]="multi";e["Children"]="children";e["MultiChildren"]="multi-children";e["Ancestors"]="ancestors"})(TreeSelectionMode||(TreeSelectionMode={}));var calciteTreeCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;outline:2px solid transparent;outline-offset:2px}";var CalciteTree=function(){function e(e){registerInstance(this,e);this.calciteTreeSelect=createEvent(this,"calciteTreeSelect",7);this.lines=false;this.inputEnabled=false;this.scale="m";this.selectionMode=TreeSelectionMode.Single}e.prototype.componentWillRender=function(){var e=this.el.parentElement.closest("calcite-tree");this.lines=e?e.lines:this.lines;this.scale=e?e.scale:this.scale;this.selectionMode=e?e.selectionMode:this.selectionMode;this.child=!!e};e.prototype.render=function(){return h(Host,{"aria-multiselectable":(this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren).toString(),role:!this.child?"tree":undefined,tabIndex:this.getRootTabIndex()},h("slot",null))};e.prototype.onFocus=function(){if(!this.child){var e=this.el.querySelector("calcite-tree-item[selected]")||this.el.querySelector("calcite-tree-item");focusElement(e)}};e.prototype.onFocusIn=function(e){var t=e.relatedTarget===this.el||!this.el.contains(e.relatedTarget);if(t){this.el.tabIndex=-1}};e.prototype.onFocusOut=function(e){var t=!this.el.contains(e.relatedTarget);if(t){this.el.tabIndex=this.getRootTabIndex()}};e.prototype.onClick=function(e){var t=e.target;var i=nodeListToArray(t.querySelectorAll("calcite-tree-item"));if(this.child){return}if(!this.child){e.preventDefault();e.stopPropagation()}if(this.selectionMode===TreeSelectionMode.Ancestors&&!this.child){this.updateAncestorTree(e);return}var n=this.selectionMode!==null&&(!t.hasChildren||t.hasChildren&&(this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren));var a=e.detail.modifyCurrentSelection&&(this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren);var o=this.selectionMode===TreeSelectionMode.MultiChildren||this.selectionMode===TreeSelectionMode.Children;var r=!a&&((this.selectionMode===TreeSelectionMode.Single||this.selectionMode===TreeSelectionMode.Multi)&&i.length<=0||this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren);var c=this.selectionMode===TreeSelectionMode.Children||this.selectionMode===TreeSelectionMode.MultiChildren;if(!this.child){var l=[];if(n){l.push(t)}if(o){i.forEach((function(e){l.push(e)}))}if(r){var s=nodeListToArray(this.el.querySelectorAll("calcite-tree-item[selected]"));s.forEach((function(e){if(!l.includes(e)){e.selected=false}}))}if(c&&!e.detail.forceToggle){t.expanded=true}if(a){window.getSelection().removeAllRanges()}if(a&&t.selected||o&&e.detail.forceToggle){l.forEach((function(e){e.selected=false}))}else{l.forEach((function(e){e.selected=true}))}}this.calciteTreeSelect.emit({selected:nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((function(e){return e.selected}))})};e.prototype.updateAncestorTree=function(e){var t=e.target;var i=t.querySelectorAll("calcite-tree-item");var n=[];var a=t.parentElement.closest("calcite-tree-item");while(a){n.push(a);a=a.parentElement.closest("calcite-tree-item")}t.selected=!t.selected;t.indeterminate=false;if(i===null||i===void 0?void 0:i.length){i.forEach((function(e){e.selected=t.selected;e.indeterminate=false}))}if(n){n.forEach((function(e){var t=nodeListToArray(e.querySelectorAll("calcite-tree-item"));var i=t.filter((function(e){return e.selected}));if(i.length===0){e.selected=false;e.indeterminate=false;return}var n=i.length<t.length;e.indeterminate=n;e.selected=!n}))}this.calciteTreeSelect.emit({selected:nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((function(e){return e.selected}))})};e.prototype.getRootTabIndex=function(){return!this.child?0:-1};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteTree.style=calciteTreeCss;var CSS={checkboxLabel:"checkbox-label",checkbox:"checkbox",chevron:"chevron",nodeContainer:"node-container",childrenContainer:"children-container",bulletPointIcon:"bullet-point",checkmarkIcon:"checkmark"};var SLOTS={children:"children"};var ICONS={bulletPoint:"bullet-point",checkmark:"check",chevronRight:"chevron-right"};var calciteTreeItemCss='@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;max-width:100%;cursor:pointer;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .node-container{--calcite-tree-padding-y:0.25rem}:host([scale=s]) .node-container .checkbox,:host([scale=s]) .node-container .chevron,:host([scale=s]) .node-container .checkmark,:host([scale=s]) .node-container .bullet-point{margin-inline:0.25rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .node-container{--calcite-tree-padding-y:0.5rem}:host([scale=m]) .node-container .checkbox,:host([scale=m]) .node-container .chevron,:host([scale=m]) .node-container .checkmark,:host([scale=m]) .node-container .bullet-point{margin-inline:0.5rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .node-container{--calcite-tree-padding-y:0.75rem}:host([scale=l]) .node-container .checkbox,:host([scale=l]) .node-container .chevron,:host([scale=l]) .node-container .checkmark,:host([scale=l]) .node-container .bullet-point{margin-inline:0.75rem}:host([lines]) .children-container:after{position:absolute;top:0px;width:1px;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;height:96%;content:"";background-color:var(--calcite-ui-border-2);z-index:-1}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-width:0px;max-width:100%;overflow-wrap:break-word;color:inherit;text-decoration:none !important}::slotted(*):hover{text-decoration:none !important}::slotted(a){width:100%;-webkit-text-decoration-line:none;text-decoration-line:none}:host{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.checkbox{outline:2px solid transparent;outline-offset:2px;line-height:0}.checkbox-label{pointer-events:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.children-container{position:relative;height:0px;overflow:hidden;-webkit-margin-start:1.25rem;margin-inline-start:1.25rem;-webkit-transform:scaleY(0);transform:scaleY(0);opacity:0;-webkit-transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;-webkit-transform-origin:top;transform-origin:top}:host([expanded])>.children-container{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:1;height:auto}.node-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:var(--calcite-tree-padding-y) 0}.node-container .checkmark,.node-container .bullet-point{opacity:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;color:var(--calcite-ui-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus) .node-container .checkmark,:host(:focus) .node-container .bullet-point{opacity:1}:host([selected])>.node-container,:host([selected])>.node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected])>.node-container .bullet-point,:host([selected])>.node-container .checkmark,:host([selected])>.node-container:hover .bullet-point,:host([selected])>.node-container:hover .checkmark{opacity:1;color:var(--calcite-ui-brand)}:host(:not([has-children])):host([scale=s])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}:host(:not([has-children])):host([scale=m])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=l])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}:host([has-children])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-margin-start:0;margin-inline-start:0}:host([has-children])>.node-container .bullet-point,:host([has-children])>.node-container .checkmark{display:none}:host([has-children][expanded]:not([selected]))>.node-container ::slotted(*){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([has-children][selected])>.node-container[data-selection-mode=children],:host([has-children][selected])>.node-container[data-selection-mode=multi-children]{color:var(--calcite-ui-brand)}.chevron{position:relative;-ms-flex-item-align:center;align-self:center;color:var(--calcite-ui-text-3);-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.calcite--rtl .chevron{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host([expanded])>.node-container>.chevron{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-ui-brand)}';var CalciteTreeItem=function(){function e(e){var t=this;registerInstance(this,e);this.calciteTreeItemSelect=createEvent(this,"calciteTreeItemSelect",7);this.selected=false;this.expanded=false;this.parentExpanded=false;this.depth=-1;this.hasChildren=null;this.iconClickHandler=function(e){e.stopPropagation();t.expanded=!t.expanded;if(t.selectionMode!==TreeSelectionMode.Ancestors){t.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:true})}};this.childrenClickHandler=function(e){return e.stopPropagation()};this.updateParentIsExpanded=function(e,t){var i=getSlotted(e,SLOTS.children,{all:true,selector:"calcite-tree-item"});i.forEach((function(e){return e.parentExpanded=t}))};this.updateAncestorTree=function(){if(t.selected&&t.selectionMode===TreeSelectionMode.Ancestors){var e=[];var i=t.parentTreeItem;while(i){e.push(i);i=i.parentElement.closest("calcite-tree-item")}e.forEach((function(e){return e.indeterminate=true}));return}}}e.prototype.expandedHandler=function(e){this.updateParentIsExpanded(this.el,e)};e.prototype.connectedCallback=function(){this.parentTreeItem=this.el.parentElement.closest("calcite-tree-item");if(this.parentTreeItem){var e=this.parentTreeItem.expanded;this.updateParentIsExpanded(this.parentTreeItem,e)}connectConditionalSlotComponent(this)};e.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};e.prototype.componentWillRender=function(){this.hasChildren=!!this.el.querySelector("calcite-tree");this.depth=0;var e=this.el.closest("calcite-tree");if(!e){return}this.selectionMode=e.selectionMode;this.scale=e.scale||"m";this.lines=e.lines;var t;while(e){t=e.parentElement.closest("calcite-tree");if(t===e){break}else{e=t;this.depth=this.depth+1}}};e.prototype.componentDidLoad=function(){this.updateAncestorTree()};e.prototype.render=function(){var e,t,i,n;var a=this;var o=getElementDir(this.el)==="rtl";var r=this.selectionMode===TreeSelectionMode.Single||this.selectionMode===TreeSelectionMode.Children;var c=this.selectionMode===TreeSelectionMode.Multi||this.selectionMode===TreeSelectionMode.MultiChildren;var l=this.hasChildren?h("calcite-icon",{class:(e={},e[CSS.chevron]=true,e[CSS_UTILITY.rtl]=o,e),"data-test-id":"icon",icon:ICONS.chevronRight,onClick:this.iconClickHandler,scale:"s"}):null;var s=this.selectionMode===TreeSelectionMode.Ancestors?h("label",{class:CSS.checkboxLabel},h("calcite-checkbox",{checked:this.selected,class:CSS.checkbox,"data-test-id":"checkbox",indeterminate:this.hasChildren&&this.indeterminate,scale:this.scale,tabIndex:-1}),h("slot",null)):null;var d=r?ICONS.bulletPoint:c?ICONS.checkmark:null;var m=d?h("calcite-icon",{class:(t={},t[CSS.bulletPointIcon]=d===ICONS.bulletPoint,t[CSS.checkmarkIcon]=d===ICONS.checkmark,t[CSS_UTILITY.rtl]=o,t),icon:d,scale:"s"}):null;var f=!(this.parentExpanded||this.depth===1);return h(Host,{"aria-expanded":this.hasChildren?this.expanded.toString():undefined,"aria-hidden":f.toString(),"aria-selected":this.selected?"true":c?"false":undefined,"calcite-hydrated-hidden":f,role:"treeitem",tabindex:this.parentExpanded||this.depth===1?"0":"-1"},h("div",{class:(i={},i[CSS.nodeContainer]=true,i[CSS_UTILITY.rtl]=o,i),"data-selection-mode":this.selectionMode,ref:function(e){return a.defaultSlotWrapper=e}},l,m,s?s:h("slot",null)),h("div",{class:(n={},n[CSS.childrenContainer]=true,n[CSS_UTILITY.rtl]=o,n),"data-test-id":"calcite-tree-children",onClick:this.childrenClickHandler,ref:function(e){return a.childrenSlotWrapper=e},role:this.hasChildren?"group":undefined},h("slot",{name:SLOTS.children})))};e.prototype.onClick=function(e){var t=filterDirectChildren(this.el,"a")[0];if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){var i=t.target===""?"_self":t.target;window.open(t.href,i)}this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey||this.selectionMode===TreeSelectionMode.Ancestors,forceToggle:false})};e.prototype.keyDownHandler=function(e){var t;switch(e.key){case" ":this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:false});e.preventDefault();e.stopPropagation();break;case"Enter":var i=nodeListToArray(this.el.children).find((function(e){return e.matches("a")}));if(i){i.click();this.selected=true}else{this.calciteTreeItemSelect.emit({modifyCurrentSelection:e.shiftKey,forceToggle:false})}e.preventDefault();e.stopPropagation();break;case"ArrowLeft":if(this.hasChildren&&this.expanded){this.expanded=false;e.preventDefault();e.stopPropagation();break}var n=this.parentTreeItem;if(n&&(!this.hasChildren||this.expanded===false)){n.focus();e.preventDefault();e.stopPropagation();break}break;case"ArrowRight":if(this.hasChildren&&this.expanded===false){this.expanded=true;e.preventDefault();e.stopPropagation();break}if(this.hasChildren&&this.expanded){this.el.querySelector("calcite-tree-item").focus();break}break;case"ArrowUp":var a=this.el.previousElementSibling;if(a&&a.matches("calcite-tree-item")){a.focus()}break;case"ArrowDown":var o=this.el.nextElementSibling;if(o&&o.matches("calcite-tree-item")){o.focus()}break;case"Home":t=this.el.closest("calcite-tree:not([child])");var r=t.querySelector("calcite-tree-item");r.focus();break;case"End":t=this.el.closest("calcite-tree:not([child])");var c=t.children[t.children.length-1];var l=nodeListToArray(c.children).find((function(e){return e.matches("calcite-tree")}));while(l){c=l.children[t.children.length-1];l=nodeListToArray(c.children).find((function(e){return e.matches("calcite-tree")}))}c.focus();break}};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["expandedHandler"]}},enumerable:false,configurable:true});return e}();CalciteTreeItem.style=calciteTreeItemCss;export{CalciteTree as calcite_tree,CalciteTreeItem as calcite_tree_item};
@@ -2,4 +2,4 @@ var __awaiter=this&&this.__awaiter||function(t,e,a,i){function n(t){return t ins
2
2
  /*!
3
3
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
4
4
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
5
- */import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-9de00868.js";import{S as Sortable}from"./sortable.esm-04824d33.js";import{m as mutationObserverCallback,d as deselectRemovedItems,a as deselectSiblingItems,s as selectSiblings,h as handleFilter,g as getItemData,k as keyDownHandler,i as initialize,b as initializeObserver,c as cleanUpObserver,r as removeItem,e as calciteListItemChangeHandler,f as calciteListItemValueChangeHandler,j as setUpItems,l as setFocus,L as List,I as ICON_TYPES$1,C as CSS$1,S as SLOTS$1}from"./resources-03c0a433.js";import{g as getRoundRobinIndex}from"./array-91a648e2.js";import{c as createObserver}from"./observers-8f0bc419.js";import{g as guid}from"./guid-196bd5ea.js";import{g as getSlotted}from"./dom-037dc374.js";import"./debounce-79648d42.js";var CSS={container:"container",handle:"handle"};var ICON_TYPES;(function(t){t["grip"]="grip"})(ICON_TYPES||(ICON_TYPES={}));var calciteValueListCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}calcite-value-list-item:last-of-type{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header{margin-bottom:0.25rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:-webkit-sticky;position:sticky;top:0px;z-index:10}calcite-filter{margin-bottom:1px}";var CalciteValueList=function(){function t(t){var e=this;registerInstance(this,t);this.calciteListChange=createEvent(this,"calciteListChange",7);this.calciteListOrderChange=createEvent(this,"calciteListOrderChange",7);this.disabled=false;this.dragEnabled=false;this.filterEnabled=false;this.loading=false;this.multiple=false;this.selectionFollowsFocus=false;this.selectedValues=new Map;this.dataForFilter=[];this.lastSelectedItem=null;this.mutationObserver=createObserver("mutation",mutationObserverCallback.bind(this));this.setFilterEl=function(t){e.filterEl=t};this.deselectRemovedItems=deselectRemovedItems.bind(this);this.deselectSiblingItems=deselectSiblingItems.bind(this);this.selectSiblings=selectSiblings.bind(this);this.handleFilter=handleFilter.bind(this);this.getItemData=getItemData.bind(this);this.keyDownHandler=function(t){var a=t.composedPath().find((function(t){var e;return((e=t.dataset)===null||e===void 0?void 0:e.jsHandle)!==undefined}));var i=t.composedPath().find((function(t){var e;return((e=t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="calcite-value-list-item"}));if(!a||!i.handleActivated){keyDownHandler.call(e,t);return}var n=e.items;if(t.key!=="ArrowUp"&&t.key!=="ArrowDown"||n.length<=1){return}t.preventDefault();var r=e.el;var o=t.key==="ArrowDown"?1:-1;var s=n.indexOf(i);var l=getRoundRobinIndex(s+o,n.length);if(l===n.length-1){r.appendChild(i)}else{var c=r.children[l];var d=c===i.nextElementSibling?c.nextElementSibling:c;r.insertBefore(i,d)}e.items=e.getItems();e.calciteListOrderChange.emit(e.items.map((function(t){var e=t.value;return e})));requestAnimationFrame((function(){return a.focus()}));i.handleActivated=true}}t.prototype.connectedCallback=function(){initialize.call(this);initializeObserver.call(this)};t.prototype.componentDidLoad=function(){this.setUpDragAndDrop()};t.prototype.disconnectedCallback=function(){cleanUpObserver.call(this);this.cleanUpDragAndDrop()};t.prototype.calciteListItemRemoveHandler=function(t){removeItem.call(this,t)};t.prototype.calciteListItemChangeHandler=function(t){calciteListItemChangeHandler.call(this,t)};t.prototype.calciteListItemPropsChangeHandler=function(t){t.stopPropagation();this.setUpFilter()};t.prototype.calciteListItemValueChangeHandler=function(t){calciteListItemValueChangeHandler.call(this,t)};t.prototype.getItems=function(){return Array.from(this.el.querySelectorAll("calcite-value-list-item"))};t.prototype.setUpItems=function(){setUpItems.call(this,"calcite-value-list-item")};t.prototype.setUpFilter=function(){if(this.filterEnabled){this.dataForFilter=this.getItemData()}};t.prototype.setUpDragAndDrop=function(){var t=this;this.cleanUpDragAndDrop();if(!this.dragEnabled){return}this.sortable=Sortable.create(this.el,{dataIdAttr:"id",handle:"."+CSS.handle,draggable:"calcite-value-list-item",group:this.group,onSort:function(){t.items=Array.from(t.el.querySelectorAll("calcite-value-list-item"));var e=t.items.map((function(t){return t.value}));t.calciteListOrderChange.emit(e)}})};t.prototype.cleanUpDragAndDrop=function(){var t;(t=this.sortable)===null||t===void 0?void 0:t.destroy();this.sortable=null};t.prototype.getSelectedItems=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedValues]}))}))};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,setFocus.call(this,t)]}))}))};t.prototype.getIconType=function(){var t=null;if(this.dragEnabled){t=ICON_TYPES.grip}return t};t.prototype.render=function(){return h(List,{onKeyDown:this.keyDownHandler,props:this})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteValueList.style=calciteValueListCss;var ICONS={drag:"drag"};var SLOTS={actionsEnd:"actions-end",actionsStart:"actions-start"};var calciteValueListItemCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-bottom:1px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;-ms-flex-positive:1;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.handle{display:-ms-flexbox;display:flex;cursor:move;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-style:none;background-color:transparent;padding-top:0px;padding-bottom:0px;padding-left:0.25rem;padding-right:0.25rem;color:var(--calcite-ui-border-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}";var CalciteValueListItem=function(){function t(t){var e=this;registerInstance(this,t);this.calciteListItemRemove=createEvent(this,"calciteListItemRemove",7);this.disabled=false;this.disableDeselect=false;this.nonInteractive=false;this.handleActivated=false;this.icon=null;this.removable=false;this.selected=false;this.pickListItem=null;this.guid="calcite-value-list-item-"+guid();this.getPickListRef=function(t){return e.pickListItem=t};this.handleKeyDown=function(t){if(t.key===" "){e.handleActivated=!e.handleActivated}};this.handleBlur=function(){e.handleActivated=false};this.handleSelectChange=function(t){e.selected=t.detail.selected}}t.prototype.toggleSelected=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.pickListItem.toggleSelected(t);return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){(t=this.pickListItem)===null||t===void 0?void 0:t.setFocus();return[2]}))}))};t.prototype.calciteListItemChangeHandler=function(t){t.detail.item=this.el};t.prototype.renderActionsEnd=function(){var t=this.el;var e=getSlotted(t,SLOTS.actionsEnd);return e?h("slot",{name:SLOTS.actionsEnd,slot:SLOTS$1.actionsEnd}):null};t.prototype.renderActionsStart=function(){var t=this.el;var e=getSlotted(t,SLOTS.actionsStart);return e?h("slot",{name:SLOTS.actionsStart,slot:SLOTS$1.actionsStart}):null};t.prototype.renderHandle=function(){var t;var e=this.icon;if(e===ICON_TYPES$1.grip){return h("span",{"aria-pressed":this.handleActivated.toString(),class:(t={},t[CSS$1.handle]=true,t[CSS$1.handleActivated]=this.handleActivated,t),"data-js-handle":true,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0"},h("calcite-icon",{icon:ICONS.drag,scale:"s"}))}};t.prototype.render=function(){return h(Host,{id:this.el.id||this.guid},this.renderHandle(),h("calcite-pick-list-item",{description:this.description,disableDeselect:this.disableDeselect,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,ref:this.getPickListRef,removable:this.removable,selected:this.selected,value:this.value},this.renderActionsStart(),this.renderActionsEnd()))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteValueListItem.style=calciteValueListItemCss;export{CalciteValueList as calcite_value_list,CalciteValueListItem as calcite_value_list_item};
5
+ */import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-9de00868.js";import{S as Sortable}from"./sortable.esm-04824d33.js";import{m as mutationObserverCallback,d as deselectRemovedItems,a as deselectSiblingItems,s as selectSiblings,h as handleFilter,g as getItemData,k as keyDownHandler,i as initialize,b as initializeObserver,c as cleanUpObserver,r as removeItem,e as calciteListItemChangeHandler,f as calciteListItemValueChangeHandler,j as setUpItems,l as setFocus,L as List,I as ICON_TYPES$1,C as CSS$1,S as SLOTS$1}from"./resources-03c0a433.js";import{g as getRoundRobinIndex}from"./array-91a648e2.js";import{c as createObserver}from"./observers-8f0bc419.js";import{g as guid}from"./guid-196bd5ea.js";import{g as getSlotted}from"./dom-037dc374.js";import{c as connectConditionalSlotComponent,d as disconnectConditionalSlotComponent}from"./conditionalSlot-0c4ea23a.js";import"./debounce-79648d42.js";var CSS={container:"container",handle:"handle"};var ICON_TYPES;(function(t){t["grip"]="grip"})(ICON_TYPES||(ICON_TYPES={}));var calciteValueListCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}calcite-value-list-item:last-of-type{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header{margin-bottom:0.25rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:-webkit-sticky;position:sticky;top:0px;z-index:10}calcite-filter{margin-bottom:1px}";var CalciteValueList=function(){function t(t){var e=this;registerInstance(this,t);this.calciteListChange=createEvent(this,"calciteListChange",7);this.calciteListOrderChange=createEvent(this,"calciteListOrderChange",7);this.disabled=false;this.dragEnabled=false;this.filterEnabled=false;this.loading=false;this.multiple=false;this.selectionFollowsFocus=false;this.selectedValues=new Map;this.dataForFilter=[];this.lastSelectedItem=null;this.mutationObserver=createObserver("mutation",mutationObserverCallback.bind(this));this.setFilterEl=function(t){e.filterEl=t};this.deselectRemovedItems=deselectRemovedItems.bind(this);this.deselectSiblingItems=deselectSiblingItems.bind(this);this.selectSiblings=selectSiblings.bind(this);this.handleFilter=handleFilter.bind(this);this.getItemData=getItemData.bind(this);this.keyDownHandler=function(t){var a=t.composedPath().find((function(t){var e;return((e=t.dataset)===null||e===void 0?void 0:e.jsHandle)!==undefined}));var i=t.composedPath().find((function(t){var e;return((e=t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="calcite-value-list-item"}));if(!a||!i.handleActivated){keyDownHandler.call(e,t);return}var n=e.items;if(t.key!=="ArrowUp"&&t.key!=="ArrowDown"||n.length<=1){return}t.preventDefault();var r=e.el;var o=t.key==="ArrowDown"?1:-1;var s=n.indexOf(i);var l=getRoundRobinIndex(s+o,n.length);if(l===n.length-1){r.appendChild(i)}else{var c=r.children[l];var d=c===i.nextElementSibling?c.nextElementSibling:c;r.insertBefore(i,d)}e.items=e.getItems();e.calciteListOrderChange.emit(e.items.map((function(t){var e=t.value;return e})));requestAnimationFrame((function(){return a.focus()}));i.handleActivated=true}}t.prototype.connectedCallback=function(){initialize.call(this);initializeObserver.call(this)};t.prototype.componentDidLoad=function(){this.setUpDragAndDrop()};t.prototype.disconnectedCallback=function(){cleanUpObserver.call(this);this.cleanUpDragAndDrop()};t.prototype.calciteListItemRemoveHandler=function(t){removeItem.call(this,t)};t.prototype.calciteListItemChangeHandler=function(t){calciteListItemChangeHandler.call(this,t)};t.prototype.calciteListItemPropsChangeHandler=function(t){t.stopPropagation();this.setUpFilter()};t.prototype.calciteListItemValueChangeHandler=function(t){calciteListItemValueChangeHandler.call(this,t)};t.prototype.getItems=function(){return Array.from(this.el.querySelectorAll("calcite-value-list-item"))};t.prototype.setUpItems=function(){setUpItems.call(this,"calcite-value-list-item")};t.prototype.setUpFilter=function(){if(this.filterEnabled){this.dataForFilter=this.getItemData()}};t.prototype.setUpDragAndDrop=function(){var t=this;this.cleanUpDragAndDrop();if(!this.dragEnabled){return}this.sortable=Sortable.create(this.el,{dataIdAttr:"id",handle:"."+CSS.handle,draggable:"calcite-value-list-item",group:this.group,onSort:function(){t.items=Array.from(t.el.querySelectorAll("calcite-value-list-item"));var e=t.items.map((function(t){return t.value}));t.calciteListOrderChange.emit(e)}})};t.prototype.cleanUpDragAndDrop=function(){var t;(t=this.sortable)===null||t===void 0?void 0:t.destroy();this.sortable=null};t.prototype.getSelectedItems=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedValues]}))}))};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,setFocus.call(this,t)]}))}))};t.prototype.getIconType=function(){var t=null;if(this.dragEnabled){t=ICON_TYPES.grip}return t};t.prototype.render=function(){return h(List,{onKeyDown:this.keyDownHandler,props:this})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteValueList.style=calciteValueListCss;var ICONS={drag:"drag"};var SLOTS={actionsEnd:"actions-end",actionsStart:"actions-start"};var calciteValueListItemCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-bottom:1px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing), -webkit-box-shadow var(--calcite-animation-timing)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;-ms-flex-positive:1;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);-webkit-box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.handle{display:-ms-flexbox;display:flex;cursor:move;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-style:none;background-color:transparent;padding-top:0px;padding-bottom:0px;padding-left:0.25rem;padding-right:0.25rem;color:var(--calcite-ui-border-1);outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}";var CalciteValueListItem=function(){function t(t){var e=this;registerInstance(this,t);this.calciteListItemRemove=createEvent(this,"calciteListItemRemove",7);this.disabled=false;this.disableDeselect=false;this.nonInteractive=false;this.handleActivated=false;this.icon=null;this.removable=false;this.selected=false;this.pickListItem=null;this.guid="calcite-value-list-item-"+guid();this.getPickListRef=function(t){return e.pickListItem=t};this.handleKeyDown=function(t){if(t.key===" "){e.handleActivated=!e.handleActivated}};this.handleBlur=function(){e.handleActivated=false};this.handleSelectChange=function(t){e.selected=t.detail.selected}}t.prototype.connectedCallback=function(){connectConditionalSlotComponent(this)};t.prototype.disconnectedCallback=function(){disconnectConditionalSlotComponent(this)};t.prototype.toggleSelected=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.pickListItem.toggleSelected(t);return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){(t=this.pickListItem)===null||t===void 0?void 0:t.setFocus();return[2]}))}))};t.prototype.calciteListItemChangeHandler=function(t){t.detail.item=this.el};t.prototype.renderActionsEnd=function(){var t=this.el;var e=getSlotted(t,SLOTS.actionsEnd);return e?h("slot",{name:SLOTS.actionsEnd,slot:SLOTS$1.actionsEnd}):null};t.prototype.renderActionsStart=function(){var t=this.el;var e=getSlotted(t,SLOTS.actionsStart);return e?h("slot",{name:SLOTS.actionsStart,slot:SLOTS$1.actionsStart}):null};t.prototype.renderHandle=function(){var t;var e=this.icon;if(e===ICON_TYPES$1.grip){return h("span",{"aria-pressed":this.handleActivated.toString(),class:(t={},t[CSS$1.handle]=true,t[CSS$1.handleActivated]=this.handleActivated,t),"data-js-handle":true,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0"},h("calcite-icon",{icon:ICONS.drag,scale:"s"}))}};t.prototype.render=function(){return h(Host,{id:this.el.id||this.guid},this.renderHandle(),h("calcite-pick-list-item",{description:this.description,disableDeselect:this.disableDeselect,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,ref:this.getPickListRef,removable:this.removable,selected:this.selected,value:this.value},this.renderActionsStart(),this.renderActionsEnd()))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CalciteValueListItem.style=calciteValueListItemCss;export{CalciteValueList as calcite_value_list,CalciteValueListItem as calcite_value_list_item};
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
+ */
5
+ import{f as forceUpdate}from"./index-9de00868.js";import{c as createObserver}from"./observers-8f0bc419.js";var observed=new Set;var mutationObserver;var observerOptions={childList:true};function connectConditionalSlotComponent(e){if(!mutationObserver){mutationObserver=createObserver("mutation",processMutations)}mutationObserver.observe(e.el,observerOptions)}function disconnectConditionalSlotComponent(e){observed.delete(e.el);processMutations(mutationObserver.takeRecords());mutationObserver.disconnect();for(var o=0,t=observed.entries();o<t.length;o++){var r=t[o][0];mutationObserver.observe(r,observerOptions)}}function processMutations(e){e.forEach((function(e){var o=e.target;forceUpdate(o)}))}export{connectConditionalSlotComponent as c,disconnectConditionalSlotComponent as d};
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2022-01-13T18:48:43",
2
+ "timestamp": "2022-01-13T21:26:13",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.12.1",
@@ -1,11 +1,12 @@
1
1
  import { VNode } from "../../stencil-public-runtime";
2
2
  import { Columns, Layout, Scale } from "../interfaces";
3
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
3
4
  /**
4
5
  * @slot - A slot for adding a group of `calcite-action`s.
5
6
  * @slot menu-actions - a slot for adding an overflow menu with actions inside a dropdown.
6
7
  * @slot menu-tooltip - a slot for adding an tooltip for the menu.
7
8
  */
8
- export declare class CalciteActionGroup {
9
+ export declare class CalciteActionGroup implements ConditionalSlotComponent {
9
10
  /**
10
11
  * Indicates whether widget is expanded.
11
12
  */
@@ -32,6 +33,8 @@ export declare class CalciteActionGroup {
32
33
  */
33
34
  scale: Scale;
34
35
  el: HTMLCalciteActionGroupElement;
36
+ connectedCallback(): void;
37
+ disconnectedCallback(): void;
35
38
  renderTooltip(): VNode;
36
39
  renderMenu(): VNode;
37
40
  render(): VNode;
@@ -3,12 +3,13 @@ import { VNode } from "../../stencil-public-runtime";
3
3
  import { PopperPlacement, OverlayPositioning } from "../../utils/popper";
4
4
  import { Placement } from "@popperjs/core";
5
5
  import { Scale } from "../interfaces";
6
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
6
7
  /**
7
8
  * @slot - A slot for adding `calcite-action`s.
8
9
  * @slot trigger - A slot for adding a `calcite-action` to trigger opening the menu.
9
10
  * @slot tooltip - A slot for adding an tooltip for the menu.
10
11
  */
11
- export declare class CalciteActionMenu {
12
+ export declare class CalciteActionMenu implements ConditionalSlotComponent {
12
13
  connectedCallback(): void;
13
14
  disconnectedCallback(): void;
14
15
  /**
@@ -1,10 +1,11 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { Layout, Position, Scale } from "../interfaces";
3
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
3
4
  /**
4
5
  * @slot - A slot for adding `calcite-action`s to the action pad.
5
6
  * @slot expand-tooltip - Used to set the tooltip for the expand toggle.
6
7
  */
7
- export declare class CalciteActionPad {
8
+ export declare class CalciteActionPad implements ConditionalSlotComponent {
8
9
  /**
9
10
  * When set to true, the expand-toggling behavior will be disabled.
10
11
  */
@@ -41,6 +42,8 @@ export declare class CalciteActionPad {
41
42
  calciteActionPadToggle: EventEmitter;
42
43
  el: HTMLCalciteActionPadElement;
43
44
  expandToggleEl: HTMLCalciteActionElement;
45
+ connectedCallback(): void;
46
+ disconnectedCallback(): void;
44
47
  componentWillLoad(): void;
45
48
  /** Sets focus on the component. */
46
49
  setFocus(focusId?: "expand-toggle"): Promise<void>;
@@ -1,13 +1,14 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { HeadingLevel } from "../functional/CalciteHeading";
3
3
  import { Status } from "../interfaces";
4
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
4
5
  /**
5
6
  * @slot - A slot for adding content to the block.
6
7
  * @slot icon - A slot for adding a leading header icon.
7
8
  * @slot control - A slot for adding a single HTML input element in a header.
8
9
  * @slot header-menu-actions - a slot for adding an overflow menu with actions inside a dropdown.
9
10
  */
10
- export declare class CalciteBlock {
11
+ export declare class CalciteBlock implements ConditionalSlotComponent {
11
12
  /**
12
13
  * When true, this block will be collapsible.
13
14
  */
@@ -61,6 +62,8 @@ export declare class CalciteBlock {
61
62
  */
62
63
  summary: string;
63
64
  el: HTMLCalciteBlockElement;
65
+ connectedCallback(): void;
66
+ disconnectedCallback(): void;
64
67
  /**
65
68
  * Emitted when the header has been clicked.
66
69
  */
@@ -1,11 +1,12 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { ChipColor } from "./interfaces";
3
3
  import { Appearance, Scale } from "../interfaces";
4
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
4
5
  /**
5
6
  * @slot - A slot for adding text.
6
7
  * @slot image - A slot for adding an image.
7
8
  */
8
- export declare class CalciteChip {
9
+ export declare class CalciteChip implements ConditionalSlotComponent {
9
10
  /** specify the appearance style of the button, defaults to solid. */
10
11
  appearance: Extract<"solid" | "clear", Appearance>;
11
12
  /** specify the color of the button, defaults to blue */
@@ -25,6 +26,8 @@ export declare class CalciteChip {
25
26
  /** The assigned value for the chip */
26
27
  value: any;
27
28
  el: HTMLCalciteChipElement;
29
+ connectedCallback(): void;
30
+ disconnectedCallback(): void;
28
31
  /** Sets focus on the component. */
29
32
  setFocus(): Promise<void>;
30
33
  /** Emitted when the dismiss button is clicked */
@@ -1,4 +1,5 @@
1
1
  import { VNode } from "../../stencil-public-runtime";
2
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
2
3
  /**
3
4
  * @slot - A slot for adding `calcite-list-item` and `calcite-list-item-group` elements.
4
5
  * @slot actions-start - A slot for adding actionable `calcite-action` elements before the content of the list item.
@@ -6,7 +7,7 @@ import { VNode } from "../../stencil-public-runtime";
6
7
  * @slot content-end - A slot for adding non-actionable elements after the label and description of the list item.
7
8
  * @slot actions-end - A slot for adding actionable `calcite-action` elements after the content of the list item.
8
9
  */
9
- export declare class CalciteListItem {
10
+ export declare class CalciteListItem implements ConditionalSlotComponent {
10
11
  /**
11
12
  * When true, prevents the content of the list item from user interaction.
12
13
  */
@@ -25,6 +26,8 @@ export declare class CalciteListItem {
25
26
  label: string;
26
27
  el: HTMLCalciteListItemElement;
27
28
  focusEl: HTMLButtonElement;
29
+ connectedCallback(): void;
30
+ disconnectedCallback(): void;
28
31
  /** Sets focus on the component. */
29
32
  setFocus(): Promise<void>;
30
33
  renderActionsStart(): VNode;
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { Scale } from "../interfaces";
3
3
  import { ModalBackgroundColor } from "./interfaces";
4
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
4
5
  /**
5
6
  * @slot header - a slot for adding a modal header
6
7
  * @slot content - a slot for adding modal content
@@ -8,7 +9,7 @@ import { ModalBackgroundColor } from "./interfaces";
8
9
  * @slot secondary - a slot for adding a secondary button
9
10
  * @slot back - a slot for adding a back button
10
11
  */
11
- export declare class CalciteModal {
12
+ export declare class CalciteModal implements ConditionalSlotComponent {
12
13
  el: HTMLCalciteModalElement;
13
14
  /** Add the active attribute to open the modal */
14
15
  active: boolean;
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { Scale, Width } from "../interfaces";
3
3
  import { StatusColor } from "../calcite-alert/interfaces";
4
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
4
5
  /** Notices are intended to be used to present users with important-but-not-crucial contextual tips or copy. Because
5
6
  * notices are displayed inline, a common use case is displaying them on page-load to present users with short hints or contextual copy.
6
7
  * They are optionally dismissible - useful for keeping track of whether or not a user has dismissed the notice. You can also choose not
@@ -12,7 +13,7 @@ import { StatusColor } from "../calcite-alert/interfaces";
12
13
  * @slot link - Optional action to take from the notice (undo, try again, link to page, etc.)
13
14
  * @slot actions-end - Allows adding a `calcite-action` at the end of the notice. It is recommended to use 2 or less actions.
14
15
  */
15
- export declare class CalciteNotice {
16
+ export declare class CalciteNotice implements ConditionalSlotComponent {
16
17
  el: HTMLCalciteNoticeElement;
17
18
  /** Is the notice currently active or not */
18
19
  active: boolean;
@@ -32,6 +33,8 @@ export declare class CalciteNotice {
32
33
  /** specify the width of the notice, defaults to auto */
33
34
  width: Width;
34
35
  updateRequestedIcon(): void;
36
+ connectedCallback(): void;
37
+ disconnectedCallback(): void;
35
38
  componentWillLoad(): void;
36
39
  componentDidLoad(): void;
37
40
  render(): VNode;
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { Scale } from "../interfaces";
3
3
  import { HeadingLevel } from "../functional/CalciteHeading";
4
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
4
5
  /**
5
6
  * @slot - A slot for adding custom content.
6
7
  * @slot header-actions-start - A slot for adding actions or content to the start side of the panel header.
@@ -11,7 +12,7 @@ import { HeadingLevel } from "../functional/CalciteHeading";
11
12
  * @slot footer-actions - A slot for adding buttons to the footer.
12
13
  * @slot footer - A slot for adding custom content to the footer.
13
14
  */
14
- export declare class CalcitePanel {
15
+ export declare class CalcitePanel implements ConditionalSlotComponent {
15
16
  /**
16
17
  * Hides the panel.
17
18
  */
@@ -77,6 +78,8 @@ export declare class CalcitePanel {
77
78
  backButtonEl: HTMLCalciteActionElement;
78
79
  dismissButtonEl: HTMLCalciteActionElement;
79
80
  containerEl: HTMLElement;
81
+ connectedCallback(): void;
82
+ disconnectedCallback(): void;
80
83
  /**
81
84
  * Emitted when the close button has been clicked.
82
85
  */
@@ -108,11 +111,7 @@ export declare class CalcitePanel {
108
111
  renderHeaderActionsEnd(): VNode;
109
112
  renderMenu(): VNode;
110
113
  renderHeaderNode(): VNode;
111
- /**
112
- * Allows user to override the entire footer node.
113
- */
114
- renderFooterSlottedContent(): VNode;
115
- renderFooterActions(): VNode;
114
+ renderFooterNode(): VNode;
116
115
  renderContent(): VNode;
117
116
  renderFab(): VNode;
118
117
  render(): VNode;
@@ -1,9 +1,10 @@
1
1
  import { VNode } from "../../stencil-public-runtime";
2
2
  import { HeadingLevel } from "../functional/CalciteHeading";
3
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
3
4
  /**
4
5
  * @slot - A slot for adding `calcite-pick-list-item` elements.
5
6
  */
6
- export declare class CalcitePickListGroup {
7
+ export declare class CalcitePickListGroup implements ConditionalSlotComponent {
7
8
  /**
8
9
  * The title used for all nested `calcite-pick-list` rows.
9
10
  *
@@ -14,5 +15,7 @@ export declare class CalcitePickListGroup {
14
15
  */
15
16
  headingLevel: HeadingLevel;
16
17
  el: HTMLCalcitePickListGroupElement;
18
+ connectedCallback(): void;
19
+ disconnectedCallback(): void;
17
20
  render(): VNode;
18
21
  }
@@ -1,10 +1,11 @@
1
1
  import { EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import { ICON_TYPES } from "../calcite-pick-list/resources";
3
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
3
4
  /**
4
5
  * @slot actions-end - a slot for adding actions or content to the end side of the item.
5
6
  * @slot actions-start - a slot for adding actions or content to the start side of the item.
6
7
  */
7
- export declare class CalcitePickListItem {
8
+ export declare class CalcitePickListItem implements ConditionalSlotComponent {
8
9
  /**
9
10
  * An optional description for this item. This will appear below the label text.
10
11
  */
@@ -59,6 +60,8 @@ export declare class CalcitePickListItem {
59
60
  el: HTMLCalcitePickListItemElement;
60
61
  private focusEl;
61
62
  shiftPressed: boolean;
63
+ connectedCallback(): void;
64
+ disconnectedCallback(): void;
62
65
  /**
63
66
  * Emitted whenever the item is selected or unselected.
64
67
  */
@@ -1,4 +1,5 @@
1
1
  import { VNode } from "../../stencil-public-runtime";
2
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
2
3
  /**
3
4
  * @slot - A slot for adding content to the shell. This content will appear between any leading and trailing panels added to the shell. (eg. a map)
4
5
  * @slot header - A slot for adding header content. This content will be positioned at the top of the shell.
@@ -7,12 +8,14 @@ import { VNode } from "../../stencil-public-runtime";
7
8
  * @slot contextual-panel - A slot for adding the trailing `calcite-shell-panel`.
8
9
  * @slot center-row - A slot for adding custom content in the center row.
9
10
  */
10
- export declare class CalciteShell {
11
+ export declare class CalciteShell implements ConditionalSlotComponent {
11
12
  /**
12
13
  * Positions the center content behind any calcite-shell-panels.
13
14
  */
14
15
  contentBehind: boolean;
15
16
  el: HTMLCalciteShellElement;
17
+ connectedCallback(): void;
18
+ disconnectedCallback(): void;
16
19
  renderHeader(): VNode;
17
20
  renderContent(): VNode[];
18
21
  renderFooter(): VNode;
@@ -1,10 +1,11 @@
1
1
  import { VNode } from "../../stencil-public-runtime";
2
2
  import { Position, Scale } from "../interfaces";
3
+ import { ConditionalSlotComponent } from "../../utils/conditionalSlot";
3
4
  /**
4
5
  * @slot - A slot for adding content to the shell panel.
5
6
  * @slot action-bar - A slot for adding a `calcite-action-bar` to the panel.
6
7
  */
7
- export declare class CalciteShellCenterRow {
8
+ export declare class CalciteShellCenterRow implements ConditionalSlotComponent {
8
9
  /**
9
10
  * This property makes the content area appear like a "floating" panel.
10
11
  */
@@ -18,5 +19,7 @@ export declare class CalciteShellCenterRow {
18
19
  */
19
20
  position: Position;
20
21
  el: HTMLCalciteShellCenterRowElement;
22
+ connectedCallback(): void;
23
+ disconnectedCallback(): void;
21
24
  render(): VNode;
22
25
  }