@esri/solutions-components 0.3.5 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +26 -8
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
- package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-card.cjs.entry.js +1 -1
- package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +41 -7
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +48 -0
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +10 -4
- package/dist/collection/components/public-notification/public-notification.css +12 -12
- package/dist/collection/components/public-notification/public-notification.js +50 -4
- package/dist/collection/components/refine-selection/refine-selection.js +4 -2
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
- package/dist/collection/demos/new-public-notification.html +7 -6
- package/dist/collection/utils/interfaces.js +1 -1
- package/dist/collection/utils/interfaces.ts +7 -2
- package/dist/components/buffer-tools2.js +10 -0
- package/dist/components/interfaces3.js +1 -1
- package/dist/components/map-draw-tools2.js +10 -4
- package/dist/components/public-notification.js +40 -6
- package/dist/components/refine-selection-tools2.js +4 -2
- package/dist/components/refine-selection2.js +4 -2
- package/dist/esm/buffer-tools_6.entry.js +26 -8
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-input-message_5.entry.js +6 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
- package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-card.entry.js +1 -1
- package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
- package/dist/esm/public-notification.entry.js +41 -7
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +7 -6
- package/dist/solutions-components/p-05e64bd1.js +498 -2
- package/dist/solutions-components/p-08a95b33.entry.js +138 -0
- package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
- package/dist/solutions-components/p-0ef91144.entry.js +913 -0
- package/dist/solutions-components/p-0f523243.entry.js +1916 -0
- package/dist/solutions-components/p-11b9510e.entry.js +173 -0
- package/dist/solutions-components/p-1b875d94.entry.js +58 -0
- package/dist/solutions-components/p-1c567f3a.js +23 -16
- package/dist/solutions-components/p-1c883db9.entry.js +43 -0
- package/dist/solutions-components/p-1f225056.js +322 -0
- package/dist/solutions-components/p-1f499e67.entry.js +72 -0
- package/dist/solutions-components/p-20d3d758.entry.js +881 -0
- package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
- package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
- package/dist/solutions-components/p-2447798c.entry.js +155 -0
- package/dist/solutions-components/p-2525e691.entry.js +432 -0
- package/dist/solutions-components/p-2561f5b5.js +4092 -0
- package/dist/solutions-components/p-29f887c0.entry.js +234 -0
- package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
- package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
- package/dist/solutions-components/p-2e9ed892.js +46 -1
- package/dist/solutions-components/p-316f56db.js +219 -2
- package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
- package/dist/solutions-components/p-356f8b54.entry.js +138 -0
- package/dist/solutions-components/p-359c58de.entry.js +172 -0
- package/dist/solutions-components/p-37336c0d.entry.js +116 -0
- package/dist/solutions-components/p-374a5031.js +105 -2
- package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
- package/dist/solutions-components/p-3b010ce1.js +17 -1
- package/dist/solutions-components/p-4307dacd.js +194 -1
- package/dist/solutions-components/p-44da2507.js +405 -14
- package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
- package/dist/solutions-components/p-4894bbeb.js +53 -2
- package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
- package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
- package/dist/solutions-components/p-4e32bf8c.js +482 -1
- package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
- package/dist/solutions-components/p-508317b3.js +13 -2
- package/dist/solutions-components/p-54697d58.entry.js +198 -0
- package/dist/solutions-components/p-55c79103.entry.js +311 -0
- package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
- package/dist/solutions-components/p-59b48fde.entry.js +443 -0
- package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
- package/dist/solutions-components/p-621d0534.entry.js +123 -0
- package/dist/solutions-components/p-63f6e8f1.js +14 -1
- package/dist/solutions-components/p-66aeec57.entry.js +61 -0
- package/dist/solutions-components/p-69834f46.entry.js +618 -0
- package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
- package/dist/solutions-components/p-6e0da576.js +13 -1
- package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
- package/dist/solutions-components/p-6fe17794.js +9 -1
- package/dist/solutions-components/p-7024cb16.entry.js +72 -0
- package/dist/solutions-components/p-70535506.entry.js +226 -0
- package/dist/solutions-components/p-708a63a8.js +12 -1
- package/dist/solutions-components/p-729708a3.js +14 -1
- package/dist/solutions-components/p-73e23995.js +6 -1
- package/dist/solutions-components/p-74b29d75.entry.js +231 -0
- package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
- package/dist/solutions-components/p-77182c3a.js +3015 -1
- package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
- package/dist/solutions-components/p-79709c19.js +60 -3
- package/dist/solutions-components/p-7a46ef97.js +181 -2
- package/dist/solutions-components/p-7be159e6.entry.js +175 -0
- package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
- package/dist/solutions-components/p-7daea1df.js +41 -1
- package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
- package/dist/solutions-components/p-7fb45059.entry.js +43 -0
- package/dist/solutions-components/p-815533de.js +306 -3
- package/dist/solutions-components/p-816622ca.entry.js +248 -0
- package/dist/solutions-components/p-83166522.js +205 -2
- package/dist/solutions-components/p-83bd1991.entry.js +36 -0
- package/dist/solutions-components/p-856464d7.entry.js +572 -0
- package/dist/solutions-components/p-8c349bad.entry.js +347 -0
- package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
- package/dist/solutions-components/p-904c185a.entry.js +228 -0
- package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
- package/dist/solutions-components/p-9371145a.entry.js +477 -0
- package/dist/solutions-components/p-93d3119d.js +1948 -1
- package/dist/solutions-components/p-95ec8062.entry.js +173 -0
- package/dist/solutions-components/p-991ee695.js +109 -1
- package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
- package/dist/solutions-components/p-9a9955db.js +41 -1
- package/dist/solutions-components/p-9c1ebc90.js +35 -16
- package/dist/solutions-components/p-9eba5c66.js +399 -3
- package/dist/solutions-components/p-a033a507.entry.js +252 -0
- package/dist/solutions-components/p-a3773415.entry.js +1132 -0
- package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
- package/dist/solutions-components/p-a5b1ab03.js +33 -3
- package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
- package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
- package/dist/solutions-components/p-a8005026.entry.js +565 -0
- package/dist/solutions-components/p-a80b3880.js +14 -1
- package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
- package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
- package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
- package/dist/solutions-components/p-ae1fd76b.js +11 -1
- package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
- package/dist/solutions-components/p-b359dc78.js +41 -1
- package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
- package/dist/solutions-components/p-b75cc407.entry.js +145 -0
- package/dist/solutions-components/p-b911cb75.entry.js +71 -0
- package/dist/solutions-components/p-b965e177.entry.js +335 -0
- package/dist/solutions-components/p-b978636e.js +14 -1
- package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
- package/dist/solutions-components/p-bd67334c.js +122 -2
- package/dist/solutions-components/p-bde20dba.entry.js +212 -0
- package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
- package/dist/solutions-components/p-c023e6a1.js +2028 -2
- package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
- package/dist/solutions-components/p-c579ed60.entry.js +447 -0
- package/dist/solutions-components/p-c92bc231.js +101 -2
- package/dist/solutions-components/p-cc815aca.js +839 -16
- package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
- package/dist/solutions-components/p-cdc46c0c.js +1751 -2
- package/dist/solutions-components/p-d12e6992.entry.js +118 -0
- package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
- package/dist/solutions-components/p-d48a24e6.js +754 -2
- package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
- package/dist/solutions-components/p-dbc9a5a8.js +80 -0
- package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
- package/dist/solutions-components/p-de39206f.entry.js +113 -0
- package/dist/solutions-components/p-de5416e8.js +28 -1
- package/dist/solutions-components/p-df420d54.entry.js +213 -0
- package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
- package/dist/solutions-components/p-e4845fec.entry.js +152 -0
- package/dist/solutions-components/p-e611d8c8.js +28 -1
- package/dist/solutions-components/p-e947d3b0.js +5 -1
- package/dist/solutions-components/p-ea534300.js +41 -2
- package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
- package/dist/solutions-components/p-ed36c637.entry.js +85 -0
- package/dist/solutions-components/p-f0add71c.js +74 -0
- package/dist/solutions-components/p-f42e014b.js +171 -2
- package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
- package/dist/solutions-components/p-fc884dd6.js +28 -16
- package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
- package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
- package/dist/solutions-components/solutions-components.esm.js +20 -1
- package/dist/solutions-components/utils/interfaces.ts +7 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +9 -1
- package/dist/types/components/public-notification/public-notification.d.ts +26 -0
- package/dist/types/components.d.ts +9 -1
- package/dist/types/preact.d.ts +3 -1
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-021432b8.entry.js +0 -12
- package/dist/solutions-components/p-03440b1e.entry.js +0 -11
- package/dist/solutions-components/p-0512635b.entry.js +0 -6
- package/dist/solutions-components/p-086ef115.entry.js +0 -29
- package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
- package/dist/solutions-components/p-0c088725.entry.js +0 -6
- package/dist/solutions-components/p-0f820c08.entry.js +0 -6
- package/dist/solutions-components/p-164780a0.entry.js +0 -6
- package/dist/solutions-components/p-179a68a0.entry.js +0 -6
- package/dist/solutions-components/p-184b5005.entry.js +0 -11
- package/dist/solutions-components/p-1d082fee.entry.js +0 -11
- package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
- package/dist/solutions-components/p-20a58e62.entry.js +0 -17
- package/dist/solutions-components/p-20b2458c.entry.js +0 -11
- package/dist/solutions-components/p-245d47c1.entry.js +0 -6
- package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
- package/dist/solutions-components/p-2cc72806.entry.js +0 -23
- package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
- package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
- package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
- package/dist/solutions-components/p-3109d940.entry.js +0 -6
- package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
- package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
- package/dist/solutions-components/p-3fa9b3c8.js +0 -36
- package/dist/solutions-components/p-40c41709.entry.js +0 -6
- package/dist/solutions-components/p-40e963c7.entry.js +0 -11
- package/dist/solutions-components/p-40f480da.entry.js +0 -11
- package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
- package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
- package/dist/solutions-components/p-506e4d78.entry.js +0 -6
- package/dist/solutions-components/p-576fdcab.entry.js +0 -6
- package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
- package/dist/solutions-components/p-65e177f1.entry.js +0 -6
- package/dist/solutions-components/p-67d710c2.entry.js +0 -6
- package/dist/solutions-components/p-7268b445.entry.js +0 -11
- package/dist/solutions-components/p-75ea4667.entry.js +0 -6
- package/dist/solutions-components/p-778c0a36.entry.js +0 -17
- package/dist/solutions-components/p-7a22509b.entry.js +0 -12
- package/dist/solutions-components/p-7bff51db.entry.js +0 -6
- package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
- package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
- package/dist/solutions-components/p-8060fb94.entry.js +0 -6
- package/dist/solutions-components/p-80a1b305.entry.js +0 -6
- package/dist/solutions-components/p-81eae877.entry.js +0 -12
- package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
- package/dist/solutions-components/p-877dd0dc.entry.js +0 -18
- package/dist/solutions-components/p-9106950a.entry.js +0 -11
- package/dist/solutions-components/p-979804a4.entry.js +0 -11
- package/dist/solutions-components/p-9862baa8.entry.js +0 -11
- package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
- package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
- package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
- package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
- package/dist/solutions-components/p-a33c044e.entry.js +0 -6
- package/dist/solutions-components/p-a516c658.entry.js +0 -6
- package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
- package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
- package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
- package/dist/solutions-components/p-ad469b92.entry.js +0 -11
- package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
- package/dist/solutions-components/p-addc1156.entry.js +0 -11
- package/dist/solutions-components/p-ae846934.entry.js +0 -11
- package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
- package/dist/solutions-components/p-b4e476b7.js +0 -257
- package/dist/solutions-components/p-b668daf8.js +0 -21
- package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
- package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
- package/dist/solutions-components/p-bd4d0773.entry.js +0 -6
- package/dist/solutions-components/p-be41429f.js +0 -21
- package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
- package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
- package/dist/solutions-components/p-c4afae53.entry.js +0 -12
- package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
- package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
- package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
- package/dist/solutions-components/p-d09a168c.entry.js +0 -6
- package/dist/solutions-components/p-d377f913.entry.js +0 -11
- package/dist/solutions-components/p-d4cefead.entry.js +0 -37
- package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
- package/dist/solutions-components/p-d8968487.entry.js +0 -11
- package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
- package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
- package/dist/solutions-components/p-ec27e493.entry.js +0 -11
- package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
- package/dist/solutions-components/p-ef21e195.entry.js +0 -23
- package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
- package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
- package/dist/solutions-components/p-f847291f.entry.js +0 -6
- package/dist/solutions-components/p-f90fd262.entry.js +0 -11
- package/dist/solutions-components/p-fc973005.entry.js +0 -6
- package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -1,23 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as e,H as a,g as o}from"./p-c023e6a1.js";import{t as n,o as s,q as r,g as c,a as l,E as d,b as h}from"./p-c92bc231.js";import{f as p,a as m,i as u,q as f,t as g}from"./p-83166522.js";import{c as v}from"./p-9a9955db.js";import{c as b,d as x}from"./p-ea534300.js";import{d as w}from"./p-4e32bf8c.js";import{g as y}from"./p-a80b3880.js";import{b as k,c as E,u as D,a as H,r as z,F as _}from"./p-cdc46c0c.js";import"./p-6e0da576.js";import"./p-708a63a8.js";import"./p-729708a3.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const T="bottom-actions",j="expand-tooltip",C=class{constructor(e){t(this,e),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.mutationObserver=v("mutation",(()=>{const{el:t,expanded:i}=this;n({parent:t,expanded:i}),this.conditionallyOverflowActions()})),this.resizeObserver=v("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenChangeHandler=t=>{if(t.detail){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:e}=t.contentRect;this.resize({width:i,height:e})},this.resize=w((({width:t,height:i})=>{const{el:e,expanded:a,expandDisabled:o,layout:n}=this;if("vertical"===n&&!i||"horizontal"===n&&!t)return;const s=r(e),d=o?s.length:s.length+1,p=Array.from(e.querySelectorAll("calcite-action-group")),u=m(e,T)||!o?p.length+1:p.length,{actionHeight:f,actionWidth:g}=c(s),v=h({layout:n,actionCount:d,actionHeight:f,actionWidth:g,height:i,width:t,groupCount:u});l({actionGroups:p,expanded:a,overflowCount:v})}),s),this.conditionallyOverflowActions=()=>{this.overflowActionsDisabled||this.overflowActions()},this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.setExpandToggleRef=t=>{this.expandToggleEl=t}}expandHandler(){this.conditionallyOverflowActions()}expandedHandler(t){n({parent:this.el,expanded:t}),this.conditionallyOverflowActions()}overflowDisabledHandler(t){t?this.resizeObserver.disconnect():this.resizeObserver.observe(this.el)}componentDidLoad(){this.conditionallyOverflowActions()}connectedCallback(){var t,i;const{el:e,expanded:a}=this;n({parent:e,expanded:a}),null===(t=this.mutationObserver)||void 0===t||t.observe(e,{childList:!0,subtree:!0}),this.overflowActionsDisabled||null===(i=this.resizeObserver)||void 0===i||i.observe(e),this.conditionallyOverflowActions(),b(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),x(this)}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){var i;"expand-toggle"!==t?null===(i=this.el)||void 0===i||i.focus():await p(this.expandToggleEl)}renderBottomActionGroup(){const{expanded:t,expandDisabled:i,intlExpand:a,intlCollapse:o,el:n,position:s,toggleExpand:r,scale:c,layout:l}=this,h=m(n,j),p=i?null:e(d,{el:n,expanded:t,intlCollapse:o||"Collapse",intlExpand:a||"Expand",position:s,ref:this.setExpandToggleRef,scale:c,toggle:r,tooltip:h});return m(n,T)||p?e("calcite-action-group",{class:"action-group--bottom",layout:l,scale:c},e("slot",{name:T}),e("slot",{name:j}),p):null}render(){return e(a,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},e("slot",null),this.renderBottomActionGroup())}get el(){return o(this)}static get watchers(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],overflowActionsDisabled:["overflowDisabledHandler"]}}};C.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}:host([layout=vertical]){flex-direction:column}:host([layout=horizontal]){flex-direction:row}:host([layout=vertical][overflow-actions-disabled]){overflow-y:auto}:host([layout=horizontal][overflow-actions-disabled]){overflow-x:auto}:host([layout=vertical][expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-width:0px;border-inline-end-width:1px;border-style:solid}::slotted(calcite-action-group:last-child){border-block-end-width:0px;border-inline-end-width:0px}.action-group--bottom{flex-grow:1;justify-content:flex-end;-webkit-padding-after:0px;padding-block-end:0px;-webkit-padding-end:0px;padding-inline-end:0px}";
|
12
|
-
/*!
|
13
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
15
|
-
* v1.0.0-beta.97
|
16
|
-
*/
|
17
|
-
const A="aria-describedby",R=new
|
18
|
-
/*!
|
19
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
20
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
21
|
-
* v1.0.0-beta.97
|
22
|
-
*/
|
23
|
-
class{constructor(){this.registeredElements=new WeakMap,this.hoverTimeouts=new WeakMap,this.registeredElementCount=0,this.queryTooltip=t=>{const{registeredElements:i}=this,e=t.find((t=>i.has(t)));return i.get(e)},this.keyDownHandler=t=>{if("Escape"===t.key){const{activeTooltipEl:t}=this;t&&(this.clearHoverTimeout(t),this.toggleTooltip(t,!1))}},this.mouseEnterShow=t=>{this.hoverEvent(t,!0)},this.mouseLeaveHide=t=>{this.hoverEvent(t,!1)},this.clickHandler=t=>{if(!u(t))return;const i=this.queryTooltip(t.composedPath());this.clickedTooltip=i,(null==i?void 0:i.closeOnClick)&&(this.toggleTooltip(i,!1),this.clearHoverTimeout(i))},this.focusShow=t=>{this.focusEvent(t,!0)},this.blurHide=t=>{this.focusEvent(t,!1)},this.hoverToggle=(t,i)=>{const{hoverTimeouts:e}=this;e.delete(t),i&&this.closeExistingTooltip(),this.toggleTooltip(t,i)}}registerElement(t,i){this.registeredElementCount++,this.registeredElements.set(t,i),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}addListeners(){document.addEventListener("keydown",this.keyDownHandler),document.addEventListener("pointerover",this.mouseEnterShow,{capture:!0}),document.addEventListener("pointerout",this.mouseLeaveHide,{capture:!0}),document.addEventListener("pointerdown",this.clickHandler,{capture:!0}),document.addEventListener("focusin",this.focusShow,{capture:!0}),document.addEventListener("focusout",this.blurHide,{capture:!0})}removeListeners(){document.removeEventListener("keydown",this.keyDownHandler),document.removeEventListener("pointerover",this.mouseEnterShow,{capture:!0}),document.removeEventListener("pointerout",this.mouseLeaveHide,{capture:!0}),document.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),document.removeEventListener("focusin",this.focusShow,{capture:!0}),document.removeEventListener("focusout",this.blurHide,{capture:!0})}clearHoverTimeout(t){const{hoverTimeouts:i}=this;i.has(t)&&(window.clearTimeout(i.get(t)),i.delete(t))}closeExistingTooltip(){const{activeTooltipEl:t}=this;t&&this.toggleTooltip(t,!1)}focusTooltip(t,i){this.closeExistingTooltip(),i&&this.clearHoverTimeout(t),this.toggleTooltip(t,i)}toggleTooltip(t,i){t.open=i,i&&(this.activeTooltipEl=t)}hoverTooltip(t,i){this.clearHoverTimeout(t);const{hoverTimeouts:e}=this,a=window.setTimeout((()=>this.hoverToggle(t,i)),500);e.set(t,a)}activeTooltipHover(t){const{activeTooltipEl:i,hoverTimeouts:e}=this,{type:a}=t;i&&("pointerover"===a&&t.composedPath().includes(i)?this.clearHoverTimeout(i):"pointerout"!==a||e.has(i)||this.hoverTooltip(i,!1))}hoverEvent(t,i){const e=this.queryTooltip(t.composedPath());this.activeTooltipHover(t),e&&this.hoverTooltip(e,i)}focusEvent(t,i){const e=this.queryTooltip(t.composedPath());e&&e!==this.clickedTooltip?this.focusTooltip(e,i):this.clickedTooltip=null}},L=class{constructor(i){t(this,i),this.closeOnClick=!1,this.offsetDistance=k,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.guid=`calcite-tooltip-${y()}`,this.hasLoaded=!1,this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),E(this,this.effectiveReferenceElement,this.el);const{el:i,referenceElement:e,effectiveReferenceElement:a}=this;t&&e&&!a&&console.warn(`${i.tagName}: reference-element id "${e}" was not found.`,{el:i}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const i=this.getId();"setAttribute"in t&&t.setAttribute(A,i),R.registerElement(t,this.el)},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&t.removeAttribute(A),R.unregisterElement(t))}}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(t){t?this.reposition(!0):D(this.el)}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement()}connectedCallback(){this.setUpReferenceElement(this.hasLoaded)}componentDidLoad(){this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(!0),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),H(this,this.effectiveReferenceElement,this.el)}async reposition(t=!1){const{el:i,effectiveReferenceElement:e,placement:a,overlayPositioning:o,offsetDistance:n,offsetSkidding:s,arrowEl:r}=this;return z(this,{floatingEl:i,referenceEl:e,overlayPositioning:o,placement:a,offsetDistance:n,offsetSkidding:s,includeArrow:!0,arrowEl:r,type:"tooltip"},t)}getReferenceElement(){const{referenceElement:t,el:i}=this;return("string"==typeof t?f(i,{id:t}):t)||null}render(){const{effectiveReferenceElement:t,label:i,open:o}=this,n=t&&o,s=!n;return e(a,{"aria-hidden":g(s),"aria-label":i,"aria-live":"polite","calcite-hydrated-hidden":s,id:this.getId(),role:"tooltip"},e("div",{class:{[_.animation]:!0,[_.animationActive]:n}},e("div",{class:"arrow",ref:t=>this.arrowEl=t}),e("div",{class:"container"},e("slot",null))))}get el(){return o(this)}static get watchers(){return{offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}};L.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:999}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:"";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}.container{position:relative;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);max-inline-size:20rem;max-block-size:20rem;text-align:start}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}';export{C as calcite_action_bar,L as calcite_tooltip}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as e,g as s}from"./p-c023e6a1.js";import{c as n}from"./p-93d3119d.js";import{D as a,T as o,a as l,H as r,C as h,b as c,R as d}from"./p-374a5031.js";import{i as p,b as u,f as m}from"./p-83166522.js";import{n as f,C as g,p as b,c as v}from"./p-991ee695.js";import{c as x}from"./p-63f6e8f1.js";import{u as w}from"./p-7daea1df.js";import{i as y}from"./p-73e23995.js";import{d as k,i as C}from"./p-4e32bf8c.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-a80b3880.js";const S=f(a.hex()),D=class{constructor(s){var m,b,v,w;t(this,s),this.calciteColorPickerChange=i(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=i(this,"calciteColorPickerInput",6),this.allowEmpty=!1,this.appearance="solid",this.color=a,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.intlB=o.b,this.intlBlue=o.blue,this.intlDeleteColor=o.deleteColor,this.intlG=o.g,this.intlGreen=o.green,this.intlH=o.h,this.intlHsv=o.hsv,this.intlHex=o.hex,this.intlHue=o.hue,this.intlNoColor=o.noColor,this.intlR=o.r,this.intlRed=o.red,this.intlRgb=o.rgb,this.intlS=o.s,this.intlSaturation=o.saturation,this.intlSaveColor=o.saveColor,this.intlSaved=o.saved,this.intlV=o.v,this.intlValue=o.value,this.scale="m",this.value=S,this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=g.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(a),this.dimensions=l.m,this.savedColors=[],this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:i}=t,e={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};e[i]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===i||"ArrowUp"===i?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+e[i].x||0,this.colorFieldScopeTop+e[i].y||0,!1))},this.handleHueScopeKeyDown=t=>{const i=t.shiftKey?10:1,{key:e}=t,s={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(s[e]){t.preventDefault();const n=s[e]*i,a=this.baseColorFieldColor.hue(),o=this.baseColorFieldColor.hue(a+n);this.internalColorSet(o,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:i,color:e}=this,s=t.target.value;!i||s?s!==(e&&f(e.hex()))&&this.internalColorSet(n(s)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(n(t.currentTarget.color))},this.handleChannelInput=t=>{const i=t.currentTarget,e=t.detail.nativeEvent.target,s=Number(i.getAttribute("data-channel-index")),n="rgb"===this.channelMode?d[Object.keys(d)[s]]:r[Object.keys(r)[s]];let a;if(this.allowEmpty&&!i.value)a="";else{const t=Number(i.value)+this.shiftKeyChannelAdjustment;a=x(t,0,n).toString()}i.value=a,e.value=a},this.handleChannelChange=t=>{const i=t.currentTarget,e=Number(i.getAttribute("data-channel-index")),s=[...this.channels];if(this.allowEmpty&&!i.value)return this.channels=[null,null,null],void this.internalColorSet(null);s[e]=Number(i.value),this.updateColorFromChannels(s)},this.handleSavedColorKeyDown=t=>{y(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{var i,e;if(!p(t))return;const{offsetX:s,offsetY:n}=t,a=this.getCanvasRegion(n);"color-field"===a?(this.hueThumbState="drag",this.captureColorFieldColor(s,n),null===(i=this.colorFieldScopeNode)||void 0===i||i.focus()):"slider"===a&&(this.sliderThumbState="drag",this.captureHueSliderColor(s),null===(e=this.hueScopeNode)||void 0===e||e.focus()),t.preventDefault(),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!p(t))return;const i="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),i&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:i,dimensions:e}=this,s="drag"===this.hueThumbState;if(!i.isConnected||"drag"!==this.sliderThumbState&&!s)return;let n,a;const o=this.activeColorFieldAndSliderRect,{clientX:l,clientY:r}=t;if(this.colorFieldAndSliderHovered)n=l-o.x,a=r-o.y;else{const t=e.colorField.width,i=e.colorField.height,s=e.slider.height;n=l<o.x+t&&l>o.x?l-o.x:l<o.x?0:t-1,a=r<o.y+i+s&&r>o.y?r-o.y:r<o.y?0:i+s}s?this.captureColorFieldColor(n,a,!1):this.captureHueSliderColor(n)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:i})=>{const{dimensions:{colorField:e,slider:s,thumb:n}}=this;this.colorFieldAndSliderInteractive=i<=e.height+s.height,this.colorFieldAndSliderHovered=!0;const a=this.getCanvasRegion(i);if("color-field"===a){const s=this.hueThumbState,a=this.baseColorFieldColor.hsv(),o=Math.round(a.saturationv()/(r.s/e.width)),l=Math.round(e.height-a.value()/(r.v/e.height)),h=this.containsPoint(t,i,o,l,n.radius);let c=!1;"idle"===s&&h?(this.hueThumbState="hover",c=!0):"hover"!==s||h||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===a){const a=this.baseColorFieldColor.hsv().saturationv(100).value(100),o=this.sliderThumbState,l=Math.round(a.hue()/(360/s.width)),r=Math.round((s.height+this.getSliderCapSpacing())/2)+e.height,h=this.containsPoint(t,i,l,r,n.radius);let c=!1;"idle"===o&&h?(this.sliderThumbState="hover",c=!0):"hover"!==o||h||(this.sliderThumbState="idle",c=!0),"drag"!==this.sliderThumbState&&c&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:i,intlRgb:s,intlHsv:n}=this;return e("calcite-tab-title",{active:t===i,class:h.colorMode,"data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate},"rgb"===t?s:n)},this.renderChannelsTab=t=>{const{channelMode:i,channels:s,intlB:n,intlBlue:a,intlG:o,intlGreen:l,intlH:r,intlHue:c,intlR:d,intlRed:p,intlS:m,intlSaturation:f,intlV:g,intlValue:b}=this,v=t===i,x="rgb"===t,w=x?[d,o,n]:[r,m,g],y=x?[p,l,a]:[c,f,b],k=u(this.el);return e("calcite-tab",{active:v,class:h.control,key:t},e("div",{class:h.channels,dir:"ltr"},s.map(((t,i)=>this.renderChannel(t,i,w[i],y[i],k)))))},this.renderChannel=(t,i,s,n,a)=>e("calcite-input",{class:h.channel,"data-channel-index":i,dir:a,label:n,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:s,scale:"l"===this.scale?"m":"s",type:"number",value:null==t?void 0:t.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const i=this.savedColors.filter((i=>i!==t));this.savedColors=i,this.storageId&&localStorage.setItem(`${c}${this.storageId}`,JSON.stringify(i))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const i=[...this.savedColors,t];this.savedColors=i,this.storageId&&localStorage.setItem(`${c}${this.storageId}`,JSON.stringify(i))},this.drawColorFieldAndSlider=(m=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},v=!0,w=!0,C(b)&&(v="leading"in b?!!b.leading:v,w="trailing"in b?!!b.trailing:w),k(m,16,{leading:v,maxWait:16,trailing:w})),this.captureColorFieldColor=(t,i,e=!0)=>{const{dimensions:{colorField:{height:s,width:n}}}=this,a=Math.round(r.s/n*t),o=Math.round(r.v/s*(s-i));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(a).value(o),e)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)}}handleColorChange(t,i){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=i}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){var i;this.updateDimensions(t),this.updateCanvasSize(null===(i=this.fieldAndSliderRenderingContext)||void 0===i?void 0:i.canvas)}handleValueChange(t,i){const{allowEmpty:e,format:s}=this;let a=!1;if(!e||t){const e=b(t);if(!e||"auto"!==s&&e!==s)return this.showIncompatibleColorWarning(t,s),void(this.value=i);a=this.mode!==e,this.setMode(e)}const o="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(o||this.calciteColorPickerChange.emit());const l=e&&!t?null:n(t),r=!v(l,this.color);(a||r)&&this.internalColorSet(l,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||a}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:i}=t;if("ArrowUp"!==i&&"ArrowDown"!==i||!t.composedPath().some((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains(h.channel)})))return;const{shiftKey:e}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===i&&e?9:"ArrowDown"===i&&e?-9:0}async setFocus(){return m(this.colorFieldScopeNode)}componentWillLoad(){const{allowEmpty:t,color:i,format:e,value:s}=this,a=t&&!s,o=b(s),l=a||"auto"===e&&o||e===o,r=a?null:l?n(s):i;l||this.showIncompatibleColorWarning(s,e),this.setMode(e),this.internalColorSet(r,!1,"initial"),this.updateDimensions(this.scale);const h=`${c}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler)}componentDidRender(){w(this)}render(){const{allowEmpty:t,color:i,intlDeleteColor:s,hideHex:n,hideChannels:o,hideSaved:l,intlHex:c,intlSaved:d,intlSaveColor:p,savedColors:u,scale:m}=this,f=i?i.hex():null,g="l"===m?"m":"s",{colorFieldAndSliderInteractive:b,colorFieldScopeTop:v,colorFieldScopeLeft:x,hueScopeLeft:w,hueScopeTop:y,scopeOrientation:k,dimensions:{colorField:{height:C,width:S},slider:{height:D}}}=this,F=null!=y?y:D/2+C,A=null!=w?w:S*a.hue()/r.h,z=null===i,j="vertical"===k;return e("div",{class:h.container},e("div",{class:h.colorFieldAndSliderWrap},e("canvas",{class:{[h.colorFieldAndSlider]:!0,[h.colorFieldAndSliderInteractive]:b},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),e("div",{"aria-label":j?this.intlValue:this.intlSaturation,"aria-valuemax":j?r.v:r.s,"aria-valuemin":"0","aria-valuenow":(j?null==i?void 0:i.saturationv():null==i?void 0:i.value())||"0",class:{[h.scope]:!0,[h.colorFieldScope]:!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${v||0}px`,left:`${x||0}px`},tabindex:"0"}),e("div",{"aria-label":this.intlHue,"aria-valuemax":r.h,"aria-valuemin":"0","aria-valuenow":(null==i?void 0:i.round().hue())||a.round().hue(),class:{[h.scope]:!0,[h.hueScope]:!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${F}px`,left:`${A}px`},tabindex:"0"})),n&&o?null:e("div",{class:{[h.controlSection]:!0,[h.section]:!0}},n?null:e("div",{class:h.hexOptions},e("span",{class:{[h.header]:!0,[h.headerHex]:!0}},c),e("calcite-color-picker-hex-input",{allowEmpty:t,class:h.control,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:g,value:f})),o?null:e("calcite-tabs",{class:{[h.colorModeContainer]:!0,[h.splitSection]:!0},scale:g},e("calcite-tab-nav",{slot:"tab-nav"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),l?null:e("div",{class:{[h.savedColorsSection]:!0,[h.section]:!0}},e("div",{class:h.header},e("label",null,d),e("div",{class:h.savedColorsButtons},e("calcite-button",{appearance:"transparent",class:h.deleteColor,color:"neutral",disabled:z,iconStart:"minus",label:s,onClick:this.deleteColor,scale:g,type:"button"}),e("calcite-button",{appearance:"transparent",class:h.saveColor,color:"neutral",disabled:z,iconStart:"plus",label:p,onClick:this.saveColor,scale:g,type:"button"}))),u.length>0?e("div",{class:h.savedColors},[...u.map((t=>e("calcite-color-picker-swatch",{active:f===t,class:h.savedColor,color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:m,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,i){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${i})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:i}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/i*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:i},slider:{height:e}}}=this;return t<=i?"color-field":t<=i+e?"slider":"none"}internalColorSet(t,i=!0,e="user-interaction"){i&&v(t,this.color)||(this.internalColorUpdateContext=e,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,i=this.mode){if(!t)return null;if(i.includes("hex"))return f(t.round().hex());if(i.includes("-css"))return t[i.replace("-css","").replace("a","")]().round().string();const e=t[i]().round().object();return i.endsWith("a")&&(e.a=e.alpha,delete e.alpha),e}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:i}}}=this;return 2*i-t}updateDimensions(t="m"){this.dimensions=l[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:i,width:e}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,e,i);const s=t.createLinearGradient(0,0,e,0);s.addColorStop(0,"rgba(255,255,255,1)"),s.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=s,t.fillRect(0,0,e,i);const n=t.createLinearGradient(0,0,0,i);n.addColorStop(0,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=n,t.fillRect(0,0,e,i),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:i,width:e}){const s=window.devicePixelRatio||1;t.width=e*s,t.height=i*s,t.style.height=`${i}px`,t.style.width=`${e}px`,t.getContext("2d").scale(s,s)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,i,e,s,n){return Math.pow(t-e,2)+Math.pow(i-s,2)<=Math.pow(n,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const i=t.hsv(),{dimensions:{colorField:{height:e,width:s},thumb:{radius:n}}}=this,a=i.saturationv()/(r.s/s),o=e-i.value()/(r.v/e);requestAnimationFrame((()=>{this.colorFieldScopeLeft=a,this.colorFieldScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,n,a,o,i,this.hueThumbState)}drawThumb(t,i,e,s,n,a){const o=2*Math.PI;t.beginPath(),t.arc(e,s,i,0,o),t.shadowBlur="hover"===a?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===a?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(e,s,i-3,0,o),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=n.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const i=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:e},slider:{height:s,width:n},thumb:{radius:a}}}=this,o=i.hue()/(360/n),l=s/2+e;requestAnimationFrame((()=>{this.hueScopeLeft=o,this.hueScopeTop=l})),this.drawThumb(this.fieldAndSliderRenderingContext,a,o,l,i,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:i},slider:{height:e,width:s}}}=this,a=t.createLinearGradient(0,0,s,0),o=["red","yellow","lime","cyan","blue","magenta","red"],l=1/(o.length-1);let r=0;o.forEach((t=>{a.addColorStop(r,n(t).string()),r+=l})),t.fillStyle=a,t.clearRect(0,i,s,e+2*this.getSliderCapSpacing()),t.fillRect(0,i,s,e),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(n(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:i}=this;return t[i]().array().map((t=>Math.floor(t)))}get el(){return s(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],value:["handleValueChange"]}}};D.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;-webkit-margin-after:4px;margin-block-end:4px}:host([scale=s]) .channel:last-child{-webkit-margin-after:0;margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{-webkit-padding-after:0px;padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{-webkit-margin-after:-20px;margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{-webkit-padding-before:16px;padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;-webkit-padding-before:16px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){-webkit-margin-start:12px;margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}:host([appearance=minimal]) .container{border:none}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{pointer-events:none;position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:16px}.color-field-and-slider{-webkit-margin-after:-16px;margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{-webkit-padding-before:12px;padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;-webkit-padding-after:0.25rem;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{-webkit-padding-before:12px;padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{-webkit-padding-before:12px;padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";export{D as calcite_color_picker}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as a,h as i,F as t,g as n}from"./p-c023e6a1.js";import{S as e,C as r,H as c}from"./p-ae1fd76b.js";import{a as o}from"./p-83166522.js";import{H as l,c as s}from"./p-508317b3.js";import{c as m,d}from"./p-ea534300.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const p=class{constructor(i){a(this,i)}connectedCallback(){m(this)}disconnectedCallback(){d(this)}render(){var a;const{el:n,groupTitle:m,headingLevel:d}=this,p=null!==o(n,e.parentItem),f={[r.container]:!0,[r.indented]:p},g=m,u=null===(a=n.closest("calcite-pick-list"))||void 0===a?void 0:a.headingLevel,h=u?s(u+1):null;return i(t,null,g?i(l,{class:r.heading,level:d||h||c},g):null,i("slot",{name:e.parentItem}),i("section",{class:f},i("slot",null)))}get el(){return n(this)}};p.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{-webkit-margin-after:0.25rem;margin-block-end:0.25rem;box-sizing:border-box;display:block;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host(:last-child){-webkit-margin-after:0px;margin-block-end:0px}.header{margin:0px;display:flex;align-content:space-between;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{flex:1 1 auto;padding:0.5rem}.heading{margin-block:0.5rem;margin-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-size:var(--calcite-font-size--1);line-height:1.375;color:var(--calcite-ui-text-3)}.container--indented{-webkit-margin-start:1.5rem;margin-inline-start:1.5rem}";export{p as calcite_pick_list_group}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as a,g as n}from"./p-c023e6a1.js";import{S as e}from"./p-77182c3a.js";import{c as r}from"./p-9a9955db.js";import{u as s}from"./p-7daea1df.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const o=class{constructor(a){t(this,a),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.handleSelector="calcite-handle",this.layout="vertical",this.disabled=!1,this.loading=!1,this.handleActivated=!1,this.items=[],this.mutationObserver=r("mutation",(()=>{this.cleanUpDragAndDrop(),this.items=Array.from(this.el.children),this.setUpDragAndDrop()}))}connectedCallback(){this.items=Array.from(this.el.children),this.setUpDragAndDrop(),this.beginObserving()}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.cleanUpDragAndDrop()}componentDidRender(){s(this)}calciteHandleNudgeHandler(t){var i;const a=this.items.find((i=>i.contains(t.detail.handle)||t.composedPath().includes(i))),n=this.items.length-1,e=this.items.indexOf(a);let r,s=!1;switch(t.detail.direction){case"up":t.preventDefault(),0===e?s=!0:r=e-1;break;case"down":t.preventDefault(),e===n?r=0:e===n-1?s=!0:r=e+2;break;default:return}null===(i=this.mutationObserver)||void 0===i||i.disconnect(),s?a.parentElement.appendChild(a):a.parentElement.insertBefore(a,this.items[r]),this.items=Array.from(this.el.children),t.detail.handle.activated=!0,t.detail.handle.setFocus(),this.beginObserving()}setUpDragAndDrop(){this.cleanUpDragAndDrop();const t={dataIdAttr:"id",group:this.group,handle:this.handleSelector,onUpdate:()=>{this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()},onStart:()=>{var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()},onEnd:()=>{this.beginObserving()}};this.dragSelector&&(t.draggable=this.dragSelector),this.sortable=e.create(this.el,t)}cleanUpDragAndDrop(){var t;null===(t=this.sortable)||void 0===t||t.destroy(),this.sortable=null}beginObserving(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}render(){const{layout:t}=this,i="horizontal"===t||!1;return a("div",{class:{container:!0,"container--vertical":!i,"container--horizontal":i}},a("slot",null))}get el(){return n(this)}};o.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}";export{o as calcite_sortable_list}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,h as i,H as a,g as s}from"./p-c023e6a1.js";import{g as l}from"./p-44da2507.js";import"./p-3b010ce1.js";const o=class{constructor(i){t(this,i),this.open=!1,this._translations=void 0}async componentWillLoad(){await this._getTranslations()}render(){return i(a,null,i("div",null,i("calcite-modal",{open:this.open,width:"s"},i("div",{class:"font-500",slot:"header"},this._translations.addRecord),i("div",{slot:"content"},i("div",null,i("div",{class:"padding-bottom-1"},i("calcite-label",{class:"font-bold"},this._translations.source,i("calcite-input",{placeholder:this._translations.textField,type:"textarea"}))),i("div",{class:"padding-bottom-1"},i("calcite-label",{class:"font-bold"},this._translations.publicView,i("calcite-input",{placeholder:this._translations.textField,type:"textarea"}))),i("div",{class:"padding-bottom-1"},i("calcite-label",{class:"font-bold"},this._translations.attachments,i("div",null,i("input",{class:"display-none",onChange:t=>this._updateAttachment(t),ref:t=>this._browseForAttachment=t,type:"file"}),i("calcite-button",{appearance:"solid",color:"neutral",onClick:()=>this._browse(),width:"auto"},this._translations.browse)))))),i("calcite-button",{appearance:"outline",onClick:()=>this._cancel(),slot:"secondary",width:"full"},this._translations.cancel),i("calcite-button",{appearance:"solid",onClick:()=>this._save(),slot:"primary",width:"full"},this._translations.save))))}_browse(){this._browseForAttachment.click()}_cancel(){this.open=!1}_save(){this.open=!1}_updateAttachment(t){const i=t.target.files;i&&i[0]&&console.log(i[0])}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}};o.style=":host{display:block;--calcite-label-margin-bottom:0px}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:bold}.font-500{font-weight:500}.display-none{display:none}";export{o as add_record_modal}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as i,h as t,H as e,g as a,c as s}from"./p-c023e6a1.js";import{s as n,g as o,a as l}from"./p-83166522.js";import{S as c}from"./p-6fe17794.js";import{c as r,d as h}from"./p-ea534300.js";import{l as d}from"./p-1c567f3a.js";import{g as m,h as p,d as g,e as u}from"./p-3fa9b3c8.js";import{E as v,f as b,g as f,c as y}from"./p-be41429f.js";import{s as w}from"./p-9c1ebc90.js";import{g as k}from"./p-44da2507.js";import{e as x}from"./p-b668daf8.js";import{a as D,g as _}from"./p-fc884dd6.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";import"./p-4307dacd.js";import"./p-3b010ce1.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/var z;!function(i){i.valid="check-circle",i.invalid="exclamation-mark-triangle",i.idle="information"}(z||(z={}));const S=class{constructor(t){i(this,t),this.active=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=n(z,this.icon,this.status)}connectedCallback(){this.status=o(this.el,"status",this.status),this.scale=o(this.el,"scale",this.scale),this.requestedIcon=n(z,this.icon,this.status)}render(){return t(e,{"calcite-hydrated-hidden":!this.active},this.renderIcon(this.requestedIcon),t("slot",null))}renderIcon(i){if(i)return t("calcite-icon",{class:"calcite-input-message-icon",icon:i,scale:"s"})}get el(){return a(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};S.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([active][scale=m]),:host([active][scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{visibility:hidden;box-sizing:border-box;display:flex;block-size:0px;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active]){visibility:visible;block-size:auto;opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active][scale=m]),:host([active][scale=l]){-webkit-margin-before:var(--calcite-input-message-spacing-value);margin-block-start:var(--calcite-input-message-spacing-value)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-ui-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-ui-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-ui-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-ui-brand)}:host([status][active]){color:var(--calcite-ui-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}";
|
12
|
-
/*!
|
13
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
15
|
-
* v1.0.0-beta.97
|
16
|
-
*/
|
17
|
-
const P="actions-end",L=class{constructor(t){i(this,t),this.calciteNoticeClose=s(this,"calciteNoticeClose",6),this.calciteNoticeOpen=s(this,"calciteNoticeOpen",6),this.active=!1,this.open=!1,this.color="blue",this.dismissible=!1,this.closable=!1,this.intlClose="Close",this.scale="m",this.width="auto",this.close=()=>{this.open=!1,this.calciteNoticeClose.emit()}}activeHandler(i){this.open=i}openHandler(i){this.active=i}handleDismissible(i){this.closable=i}handleClosable(i){this.dismissible=i}updateRequestedIcon(){this.requestedIcon=n(c,this.icon,this.color)}connectedCallback(){r(this);const i=this.active||this.open;i&&(this.activeHandler(i),this.openHandler(i)),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){h(this)}componentWillLoad(){this.requestedIcon=n(c,this.icon,this.color)}render(){const{el:i}=this,e=t("button",{"aria-label":this.intlClose,class:"notice-close",onClick:this.close,ref:i=>this.closeButton=i},t("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),a=l(i,P);return t("div",{class:"container"},this.requestedIcon?t("div",{class:"notice-icon"},t("calcite-icon",{icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"})):null,t("div",{class:"notice-content"},t("slot",{name:"title"}),t("slot",{name:"message"}),t("slot",{name:"link"})),a?t("div",{class:"actions-end"},t("slot",{name:P})):null,this.closable?e:null)}async setFocus(){const i=this.el.querySelector("calcite-link");(this.closeButton||i)&&(i?i.setFocus():this.closeButton&&this.closeButton.focus())}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],dismissible:["handleDismissible"],closable:["handleClosable"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"]}}};L.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";const I=class{constructor(t){i(this,t),this.selectionSetChange=s(this,"selectionSetChange",7),this.sketchTypeChange=s(this,"sketchTypeChange",7),this.workflowTypeChange=s(this,"workflowTypeChange",7),this._selectedIds=[],this._selectionLabel="",this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=void 0,this.isUpdate=!1,this.mapView=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectLayerView=void 0,this.showBufferTools=!0,this._layerSelectChecked=void 0,this._searchTerm=void 0,this._translations=void 0,this._workflowType=void 0}async watchGeometriesHandler(i,t){if(i!==t){if(i.length>0)return this._geomQuery(this.geometries);if(0===i.length)return this._clearResults(!0,!0)}}async workflowTypeHandler(i,t){i!==t&&(this.mapView.popup.autoOpenEnabled=["SELECT","SKETCH","REFINE"].indexOf(i)<0,this.workflowTypeChange.emit(i))}async clearSelection(){return this._clearResults()}async getSelection(){/\S+/gm.test(this._selectionLabel)||(this._selectionLabel=this._getSelectionBaseLabel());const i=this._selectionLabel===this._getSelectionBaseLabel();return{id:this.isUpdate?this.selectionSet.id:Date.now(),workflowType:this._workflowType,searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel&&!i?this._selectionLabel:`${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,refineSelectLayers:this._refineTools.layerViews}}labelChange(i){this._selectionLabel=i.detail}sketchGraphicsChange(i){this._updateSelection(v.SKETCH,i.detail,this._selectionLabel||this._translations.sketch)}refineSelectionGraphicsChange(i){const t=i.detail;this._updateSelection(v.SELECT,t,this._selectionLabel||this._translations.select);const e=Array.isArray(t)?t.map((i=>i.attributes[i.layer.objectIdField])):[];return this._highlightFeatures(e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){var i,a,s;const n=this._workflowType===v.SEARCH,o=n?" div-visible-search":" div-not-visible",l=this._workflowType===v.SKETCH||this._workflowType===v.SELECT,c=this.showBufferTools?"search-distance":"div-not-visible",r=this._layerSelectChecked&&!n?" div-visible":" div-not-visible",h=this._layerSelectChecked||n?" div-not-visible":" div-visible",d=n?"div-not-visible":"div-visible";return t(e,null,t("div",{class:"padding-bottom-1"},t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._workflowChange(i)},t("calcite-radio-group-item",{checked:n,class:"w-50 end-border",value:v.SEARCH},this._translations.search),t("calcite-radio-group-item",{checked:l,class:"w-50",value:v.SKETCH},this._translations.sketch))),t("div",{class:o},t("div",{class:"search-widget",ref:i=>{this._searchElement=i}})),t("div",{class:d},t("calcite-label",{layout:"inline"},t("calcite-checkbox",{checked:(null===(i=this.selectionSet)||void 0===i?void 0:i.workflowType)===v.SELECT,onCalciteCheckboxChange:()=>this._layerSelectChanged(),ref:i=>this._selectFromLayerElement=i}),"Use layer features")),t("div",{class:h},t("map-draw-tools",{active:!0,border:!0,mapView:this.mapView,ref:i=>{this._drawTools=i}})),t("div",{class:r},t("refine-selection-tools",{active:!0,border:!0,enabledLayerIds:this.enabledLayerIds,layerViews:this._refineSelectLayers,mapView:this.mapView,mode:b.ADD,ref:i=>{this._refineTools=i},refineMode:f.SUBSET})),t("calcite-label",{class:c},this._translations.searchDistance,t("buffer-tools",{distance:(null===(a=this.selectionSet)||void 0===a?void 0:a.distance)||this.defaultBufferDistance,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(s=this.selectionSet)||void 0===s?void 0:s.unit)||this.defaultBufferUnit})),t("slot",null))}async _initModules(){const[i,t,e,a,s]=await d(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=a,this.FeatureLayer=s}async _init(){this._initGraphicsLayer(),this._initSelectionSet(),this._initSearchWidget()}_initSelectionSet(){var i,t,e,a,s,n,o;this.selectionSet?(this._searchTerm=null===(t=null===(i=this.selectionSet)||void 0===i?void 0:i.searchResult)||void 0===t?void 0:t.name,this._workflowType=null===(e=this.selectionSet)||void 0===e?void 0:e.workflowType,this._searchResult=null===(a=this.selectionSet)||void 0===a?void 0:a.searchResult,this._refineSelectLayers=null===(s=this.selectionSet)||void 0===s?void 0:s.refineSelectLayers,this.geometries=[...null===(n=this.selectionSet)||void 0===n?void 0:n.geometries],this._selectionLabel=(null===(o=this.selectionSet)||void 0===o?void 0:o.label)||this._getSelectionBaseLabel(),m(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1)):this._workflowType=v.SEARCH}_getSelectionBaseLabel(){var i,t;return this._workflowType===v.SKETCH?this._translations.sketch:this._workflowType===v.SELECT?this._translations.select:this._workflowType===v.SEARCH&&this._searchResult?null===(i=this._searchResult)||void 0===i?void 0:i.name:null===(t=this.selectionSet)||void 0===t?void 0:t.label}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.on("search-clear",(()=>{this._clearResults(!1)})),this._searchWidget.on("select-result",(i=>{var t;this._clearResults(!1),i.result&&(this._searchResult=i.result,this._updateSelection(v.SEARCH,[i.result.feature],null===(t=null==i?void 0:i.result)||void 0===t?void 0:t.name))}))}}_getSearchConfig(i,t){var e;const a=null==i?void 0:i.sources;return a&&a.forEach((i=>{var e,a,s;if(i.hasOwnProperty("layer")){const n=i,o=(null===(e=n.layer)||void 0===e?void 0:e.id)?t.map.findLayerById(n.layer.id):null;o?n.layer=o:(null===(a=null==n?void 0:n.layer)||void 0===a?void 0:a.url)&&(n.layer=new this.FeatureLayer(null===(s=null==n?void 0:n.layer)||void 0===s?void 0:s.url))}})),null===(e=null==i?void 0:i.sources)||void 0===e||e.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;t.url=t.url,delete t.url}})),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i}),w.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}_layerSelectChanged(){this._layerSelectChecked=this._selectFromLayerElement.checked,this.sketchTypeChange.emit(this._layerSelectChecked?y.LAYER:y.INTERACTIVE)}_workflowChange(i){this._workflowType=i.detail}async _highlightFeatures(i){var t;null===(t=w.highlightHandle)||void 0===t||t.remove(),i.length>0&&(w.highlightHandle=await p(i,this.selectLayerView,this.mapView)),this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectedIds=await g(i,this.selectLayerView.layer),this._drawTools.graphics=this.geometries.map((i=>{var t,e,a;const s={geometry:i,symbol:"point"===i.type?null===(t=this._drawTools)||void 0===t?void 0:t.pointSymbol:"polyline"===i.type?null===(e=this._drawTools)||void 0===e?void 0:e.polylineSymbol:"polygon"===i.type?null===(a=this._drawTools)||void 0===a?void 0:a.polygonSymbol:void 0};return new this.Graphic(s)})),this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){if(this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail,this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),this._selectFeatures([this._bufferGeometry]),this.mapView.goTo(i.geometry.extent)}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),this._geomQuery(this.geometries)}_geomQuery(i){const t=u(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!0){var e,a;this._selectedIds=[],t&&(this._selectionLabel=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._searchWidget.clear(),null===(e=w.highlightHandle)||void 0===e||e.remove(),(null===(a=this._drawTools)||void 0===a?void 0:a.clear)&&this._drawTools.clear(),this.selectionSetChange.emit(this._selectedIds.length)}_updateSelection(i,t,e){this.geometries=Array.isArray(t)?t.map((i=>i.geometry)):this.geometries,this._workflowType=i,this._selectionLabel=e}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],_workflowType:["workflowTypeHandler"]}}};I.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}';const C=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),M=class{constructor(t){i(this,t),this.disabled=!0,this.enabledSizeValues=[],this.layerView=void 0,this._translations=void 0}async downloadPDF(i,t){return this._downloadPDF(i,t)}async downloadCSV(i,t,e){return this._downloadCSV(i,t,e)}async componentWillLoad(){await this._getTranslations()}render(){return t(e,null,t("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}},this._renderItems()))}_renderItems(){return(C.default||C).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<a?-1:e>a?1:0})).reduce(((i,e)=>((0===this.enabledSizeValues.length||this.enabledSizeValues.indexOf(parseInt(e.descriptionPDF.labelsPerPageDisplay,10))>-1)&&i.push(t("calcite-option",{value:e},this._getLabelSizeText(e))),i)),[])}async _downloadPDF(i,t){alert(`PDF download: (${this._getLabelSizeText(this._labelInfoElement.selectedOption.value)}) (remove dups: ${t}) ${i.join(", ")}`)}async _downloadCSV(i,t,e){console.log(t),await x(this.layerView,i,e)}_getLabelSizeText(i){const t=`${i.descriptionPDF.labelWidthDisplay} x ${i.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}get el(){return a(this)}};M.style=":host{display:block}";const H=class{constructor(t){i(this,t),this.selectionSetsChanged=s(this,"selectionSetsChanged",7),this._addEnabled=!0,this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.GraphicsLayer=void 0,this.SketchViewModel=void 0,this._translations=void 0}refineSelectionIdsChange(i){var t,e;const a=(null===(t=i.detail)||void 0===t?void 0:t.addIds)||[],s=(null===(e=i.detail)||void 0===e?void 0:e.removeIds)||[];this._updateSelectionSets(s),this._updateRefineSelectionSet(a,s)}async componentWillLoad(){await this._getTranslations()}render(){return t(e,null,t("div",{class:"padding-1"},t("div",null,t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._modeChanged(i)},t("calcite-radio-group-item",{checked:this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(b.ADD),value:b.ADD},this._translations.add),t("calcite-radio-group-item",{checked:!this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(b.REMOVE),value:b.REMOVE},this._translations.remove)),t("refine-selection-tools",{border:!0,enabledLayerIds:this.enabledLayerIds,ids:D(this.selectionSets),layerViews:[this.addresseeLayer],mapView:this.mapView,mode:this._addEnabled?b.ADD:b.REMOVE,ref:i=>{this._refineTools=i},useLayerPicker:!1})),t("br",null),t("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_modeChanged(i){this._addEnabled=i.detail===b.ADD}_setSelectionMode(i){this._refineTools.mode=i}_getRefineSelectionSetList(){const i=_(this.selectionSets),e=this._getRefineSelectionSet(this.selectionSets),a=(null==e?void 0:e.refineIds.removeIds.length)||0;return[t("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",((null==e?void 0:e.refineIds.addIds.length)||0).toString())}),t("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString())}),t("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString())})]}_getRefineSelectionSet(i){let t;return i.some((i=>{if(i.workflowType===v.REFINE)return t=i,!0})),t}_updateSelectionSets(i){i.length>0&&(this.selectionSets=this.selectionSets.reduce(((t,e)=>(e.selectedIds=e.selectedIds.filter((t=>i.indexOf(t)<0)),e.selectedIds.length>0&&t.push(e),t)),[]),this.selectionSetsChanged.emit(this.selectionSets))}_updateRefineSelectionSet(i,t){const e=this._getRefineSelectionSet(this.selectionSets);this.selectionSets=e?this._updateRefineIds(e,i,t):this._addRefineSelectionSet(i,t),this.selectionSetsChanged.emit(this.selectionSets)}_updateRefineIds(i,t,e){i.refineIds.addIds=i.refineIds.addIds.filter((i=>e.indexOf(i)<0)),i.refineIds.removeIds=i.refineIds.removeIds.filter((i=>t.indexOf(i)<0));const a=[...new Set(i.refineIds.addIds.concat(t))],s=[...new Set(i.refineIds.removeIds.concat(e))];return i.refineIds={addIds:a.filter((i=>s.indexOf(i)<0)),removeIds:s.filter((i=>a.indexOf(i)<0))},i.selectedIds=i.refineIds.addIds.length>0?[...new Set(i.selectedIds.concat(i.refineIds.addIds))]:i.selectedIds.filter((t=>i.refineIds.removeIds.indexOf(t)<0)),this.selectionSets.map((t=>t.workflowType===v.REFINE?i:t))}_addRefineSelectionSet(i,t){return[...this.selectionSets,{buffer:void 0,distance:0,download:!0,geometries:[],id:Date.now(),label:"Refine",layerView:this.addresseeLayer,refineSelectLayers:[],searchResult:void 0,selectedIds:i,unit:"feet",workflowType:v.REFINE,refineIds:{addIds:i,removeIds:t}}]}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_modeChanged":return this._modeChanged(t);case"_setSelectionMode":return this._setSelectionMode(t)}return null}get el(){return a(this)}};H.style=":host{display:block}";export{S as calcite_input_message,L as calcite_notice,I as map_select_tools,M as pdf_download,H as refine_selection}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,h as e,g as a}from"./p-c023e6a1.js";import{c as o}from"./p-83166522.js";import{c as n,d as r,g as c}from"./p-bd67334c.js";import{c as i}from"./p-9a9955db.js";import{u as l}from"./p-7daea1df.js";import{s,r as u}from"./p-316f56db.js";import"./p-729708a3.js";import"./p-a80b3880.js";!function(t){function e(t,e,a){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+e+".",a)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,a){t instanceof HTMLElement||e(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||e(TypeError,"The specified element is not a submit button"),t.form==a||e(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const p="icon",d=class{constructor(e){t(this,e),this.alignment="center",this.appearance="solid",this.color="blue",this.disabled=!1,this.intlLoading="Loading",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto",this.mutationObserver=i("mutation",(()=>this.updateHasContent())),this.hasContent=!1,this.hasLoader=!1,this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?s(this):"reset"===t&&u(this))}}loadingChanged(t,e){t&&!e&&(this.hasLoader=!0),!t&&e&&window.setTimeout((()=>{this.hasLoader=!1}),300)}connectedCallback(){this.hasLoader=this.loading,this.setupTextContentObserver(),n(this),this.formEl=o(this.el,this.form?`#${this.form}`:"form")}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),r(this),this.formEl=null}componentWillLoad(){this.updateHasContent()}componentDidRender(){l(this)}render(){const t=this.href?"a":"button",a=t,o=this.hasLoader?e("div",{class:"calcite-button--loader"},e("calcite-loader",{active:!0,class:this.loading?"loading-in":"loading-out",inline:!0,label:this.intlLoading,scale:"l"===this.scale?"m":"s"})):null,n=e("calcite-icon",{class:{[p]:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),r=e("calcite-icon",{class:{[p]:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),i=e("span",{class:"content"},e("slot",null));return e(a,{"aria-label":c(this),class:{"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},o,this.iconStart?n:null,this.hasContent?i:null,this.iconEnd?r:null)}async setFocus(){var t;null===(t=this.childEl)||void 0===t||t.focus()}updateHasContent(){var t,e;const a=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===(null===(t=this.el.childNodes[0])||void 0===t?void 0:t.nodeName)?(null===(e=this.el.textContent)||void 0===e?void 0:e.trim().length)>0:a}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}get el(){return a(this)}static get watchers(){return{loading:["loadingChanged"]}}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin:0.5rem;--calcite-button-padding-x:7px;--calcite-button-padding-y:3px;padding-block:var(--calcite-button-padding-y);padding-inline:var(--calcite-button-padding-x);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);-webkit-text-decoration-line:none;text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{-webkit-text-decoration-line:none;text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin)}.icon-start-empty .content{-webkit-margin-start:unset;margin-inline-start:unset}.icon-end-empty .content{-webkit-margin-end:unset;margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{-webkit-margin-end:auto;margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{-webkit-margin-start:auto;margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{-webkit-margin-start:var(--calcite-button-content-margin);margin-inline-start:var(--calcite-button-content-margin)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{-webkit-margin-end:var(--calcite-button-content-margin);margin-inline-end:var(--calcite-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance=solid]) button,:host([appearance=solid]) a{border-width:1px;border-style:solid;border-color:transparent}:host([color=blue]) button,:host([color=blue]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([color=blue]) button:hover,:host([color=blue]) button:focus,:host([color=blue]) a:hover,:host([color=blue]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([color=blue]) button:active,:host([color=blue]) a:active{background-color:var(--calcite-ui-brand-press)}:host([color=blue]) button calcite-loader,:host([color=blue]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=red]) button,:host([color=red]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=red]) button:hover,:host([color=red]) button:focus,:host([color=red]) a:hover,:host([color=red]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([color=red]) button:active,:host([color=red]) a:active{background-color:var(--calcite-ui-danger-press)}:host([color=red]) button calcite-loader,:host([color=red]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=neutral]) button,:host([color=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([color=neutral]) button:hover,:host([color=neutral]) button:focus,:host([color=neutral]) a:hover,:host([color=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([color=neutral]) button:active,:host([color=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([color=neutral]) button calcite-loader,:host([color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([color=inverse]) button,:host([color=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([color=inverse]) button:hover,:host([color=inverse]) button:focus,:host([color=inverse]) a:hover,:host([color=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([color=inverse]) button:active,:host([color=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([color=inverse]) button calcite-loader,:host([color=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=blue]) button,:host([appearance=outline][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:hover,:host([appearance=outline][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][color=blue]) button:focus,:host([appearance=outline][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:active,:host([appearance=outline][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button calcite-loader,:host([appearance=outline][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][color=red]) button,:host([appearance=outline][color=red]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:hover,:host([appearance=outline][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][color=red]) button:focus,:host([appearance=outline][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:active,:host([appearance=outline][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button calcite-loader,:host([appearance=outline][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][color=neutral]) button,:host([appearance=outline][color=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:hover,:host([appearance=outline][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:focus,:host([appearance=outline][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:active,:host([appearance=outline][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button calcite-loader,:host([appearance=outline][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button,:host([appearance=outline][color=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:hover,:host([appearance=outline][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][color=inverse]) button:focus,:host([appearance=outline][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:active,:host([appearance=outline][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][color=inverse]) button calcite-loader,:host([appearance=outline][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear]) button,:host([appearance=clear]) a,:host([appearance=minimal]) button,:host([appearance=minimal]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=blue]) button,:host([appearance=clear][color=blue]) a,:host([appearance=minimal][color=blue]) button,:host([appearance=minimal][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:hover,:host([appearance=clear][color=blue]) a:hover,:host([appearance=minimal][color=blue]) button:hover,:host([appearance=minimal][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=clear][color=blue]) button:focus,:host([appearance=clear][color=blue]) a:focus,:host([appearance=minimal][color=blue]) button:focus,:host([appearance=minimal][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:active,:host([appearance=clear][color=blue]) a:active,:host([appearance=minimal][color=blue]) button:active,:host([appearance=minimal][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button calcite-loader,:host([appearance=clear][color=blue]) a calcite-loader,:host([appearance=minimal][color=blue]) button calcite-loader,:host([appearance=minimal][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=clear][color=red]) button,:host([appearance=clear][color=red]) a,:host([appearance=minimal][color=red]) button,:host([appearance=minimal][color=red]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:hover,:host([appearance=clear][color=red]) a:hover,:host([appearance=minimal][color=red]) button:hover,:host([appearance=minimal][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=clear][color=red]) button:focus,:host([appearance=clear][color=red]) a:focus,:host([appearance=minimal][color=red]) button:focus,:host([appearance=minimal][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:active,:host([appearance=clear][color=red]) a:active,:host([appearance=minimal][color=red]) button:active,:host([appearance=minimal][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button calcite-loader,:host([appearance=clear][color=red]) a calcite-loader,:host([appearance=minimal][color=red]) button calcite-loader,:host([appearance=minimal][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=clear][color=neutral]) button,:host([appearance=clear][color=neutral]) a,:host([appearance=minimal][color=neutral]) button,:host([appearance=minimal][color=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:hover,:host([appearance=clear][color=neutral]) a:hover,:host([appearance=minimal][color=neutral]) button:hover,:host([appearance=minimal][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:focus,:host([appearance=clear][color=neutral]) a:focus,:host([appearance=minimal][color=neutral]) button:focus,:host([appearance=minimal][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:active,:host([appearance=clear][color=neutral]) a:active,:host([appearance=minimal][color=neutral]) button:active,:host([appearance=minimal][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button calcite-loader,:host([appearance=clear][color=neutral]) a calcite-loader,:host([appearance=minimal][color=neutral]) button calcite-loader,:host([appearance=minimal][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button,:host([appearance=clear][color=inverse]) a,:host([appearance=minimal][color=inverse]) button,:host([appearance=minimal][color=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:hover,:host([appearance=clear][color=inverse]) a:hover,:host([appearance=minimal][color=inverse]) button:hover,:host([appearance=minimal][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=clear][color=inverse]) button:focus,:host([appearance=clear][color=inverse]) a:focus,:host([appearance=minimal][color=inverse]) button:focus,:host([appearance=minimal][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:active,:host([appearance=clear][color=inverse]) a:active,:host([appearance=minimal][color=inverse]) button:active,:host([appearance=minimal][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=clear][color=inverse]) button calcite-loader,:host([appearance=clear][color=inverse]) a calcite-loader,:host([appearance=minimal][color=inverse]) button calcite-loader,:host([appearance=minimal][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][split-child=primary]) button,:host([appearance=clear][split-child=primary]) button,:host([appearance=minimal][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline][split-child=secondary]) button,:host([appearance=clear][split-child=secondary]) button,:host([appearance=minimal][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=blue]) button,:host([appearance=transparent][color=blue]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:hover,:host([appearance=transparent][color=blue]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][color=blue]) button:focus,:host([appearance=transparent][color=blue]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:active,:host([appearance=transparent][color=blue]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][color=blue]) button calcite-loader,:host([appearance=transparent][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=red]) button,:host([appearance=transparent][color=red]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:hover,:host([appearance=transparent][color=red]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][color=red]) button:focus,:host([appearance=transparent][color=red]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:active,:host([appearance=transparent][color=red]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][color=red]) button calcite-loader,:host([appearance=transparent][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][color=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y:0}:host([appearance=transparent][color=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][color=inverse]) button,:host([appearance=transparent][color=inverse]) a,:host([appearance=transparent][color=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.5rem;--calcite-button-padding-y:0.25rem}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]:not([appearance=transparent])) button.content--slotted,:host([scale=m]:not([appearance=transparent])) a.content--slotted{--calcite-button-padding-y:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.75rem;--calcite-button-padding-y:0.5rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]:not([appearance=transparent])) button.content--slotted,:host([scale=l]:not([appearance=transparent])) a.content--slotted{--calcite-button-padding-y:11px}:host([scale=l][appearance=transparent]) button.content--slotted,:host([scale=l][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:1rem;--calcite-button-padding-y:0.75rem}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=s][appearance=transparent]) button:not(.content--slotted),:host([scale=s][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.25rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=m][appearance=transparent]) button:not(.content--slotted),:host([scale=m][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.5rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{-webkit-margin-start:1rem;margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:2.75rem}";export{d as calcite_button}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as a,F as e,g as n}from"./p-c023e6a1.js";import{T as o,I as c,C as r,S as s}from"./p-de5416e8.js";import{I as l}from"./p-b978636e.js";import{a as d,t as h}from"./p-83166522.js";import{c as m,d as p}from"./p-ea534300.js";import{u}from"./p-7daea1df.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const f=class{constructor(a){t(this,a),this.calciteListItemChange=i(this,"calciteListItemChange",6),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.calciteInternalListItemPropsChange=i(this,"calciteInternalListItemPropsChange",6),this.calciteInternalListItemValueChange=i(this,"calciteInternalListItemValueChange",6),this.disabled=!1,this.disableDeselect=!1,this.nonInteractive=!1,this.icon=null,this.removable=!1,this.selected=!1,this.intlRemove=o.remove,this.pickListClickHandler=t=>{this.disabled||this.disableDeselect&&this.selected||this.nonInteractive||(this.shiftPressed=t.shiftKey,this.selected=!this.selected)},this.pickListKeyDownHandler=t=>{if(" "===t.key){if(t.preventDefault(),this.disableDeselect&&this.selected||this.nonInteractive)return;this.selected=!this.selected}},this.removeClickHandler=()=>{this.calciteListItemRemove.emit()}}descriptionWatchHandler(){this.calciteInternalListItemPropsChange.emit()}labelWatchHandler(){this.calciteInternalListItemPropsChange.emit()}metadataWatchHandler(){this.calciteInternalListItemPropsChange.emit()}selectedWatchHandler(){this.calciteListItemChange.emit({item:this.el,value:this.value,selected:this.selected,shiftPressed:this.shiftPressed}),this.shiftPressed=!1}valueWatchHandler(t,i){this.calciteInternalListItemValueChange.emit({oldValue:i,newValue:t})}connectedCallback(){m(this)}disconnectedCallback(){p(this)}componentDidRender(){u(this,!!this.el.closest("calcite-pick-list")&&"managed")}async toggleSelected(t){this.selected="boolean"==typeof t?t:!this.selected}async setFocus(){var t;null===(t=this.focusEl)||void 0===t||t.focus()}renderIcon(){const{icon:t}=this;return t?a("span",{class:{[r.icon]:!0,[r.iconDot]:t===l.circle},onClick:this.pickListClickHandler},t===l.square?a("calcite-icon",{icon:c.checked,scale:"s"}):null):null}renderRemoveAction(){return this.removable?a("calcite-action",{class:r.remove,icon:c.remove,onCalciteActionClick:this.removeClickHandler,slot:s.actionsEnd,text:this.intlRemove}):null}renderActionsStart(){const{el:t}=this;return d(t,s.actionsStart)?a("div",{class:{[r.actions]:!0,[r.actionsStart]:!0}},a("slot",{name:s.actionsStart})):null}renderActionsEnd(){const{el:t,removable:i}=this;return d(t,s.actionsEnd)||i?a("div",{class:{[r.actions]:!0,[r.actionsEnd]:!0}},a("slot",{name:s.actionsEnd}),this.renderRemoveAction()):null}render(){const{description:t,label:i}=this;return a(e,null,this.renderIcon(),this.renderActionsStart(),a("label",{"aria-label":i,class:r.label,onClick:this.pickListClickHandler,onKeyDown:this.pickListKeyDownHandler,ref:t=>this.focusEl=t,tabIndex:0},a("div",{"aria-checked":h(this.selected),class:r.textContainer,role:"menuitemcheckbox"},a("span",{class:r.title},i),t?a("span",{class:r.description},t):null)),this.renderActionsEnd())}get el(){return n(this)}static get watchers(){return{description:["descriptionWatchHandler"],label:["labelWatchHandler"],metadata:["metadataWatchHandler"],selected:["selectedWatchHandler"],value:["valueWatchHandler"]}}};f.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{margin:0px;-webkit-margin-after:1px;margin-block-end:1px;box-sizing:border-box;display:flex;align-items:stretch;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing);animation:calcite-fade-in var(--calcite-animation-timing)}:host *{box-sizing:border-box}.label{display:flex;flex:1 1 auto;cursor:pointer;align-items:center;background-color:transparent;outline-color:transparent}.label:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover{background-color:var(--calcite-ui-foreground-2)}:host([non-interactive]:hover){background-color:var(--calcite-ui-foreground-1)}:host([non-interactive]) .label,:host([non-interactive]) .icon{pointer-events:none}.icon{margin-block:0px;display:flex;cursor:pointer;align-items:center;padding:0.25rem;color:var(--calcite-ui-brand);flex:0 0 auto;line-height:0}.icon:hover{background-color:var(--calcite-ui-foreground-2)}.icon-dot{display:flex;inline-size:1.5rem;align-items:center;padding:0.5rem}.icon-dot:before{opacity:0;content:"•"}.icon calcite-icon{opacity:0}:host([selected]) .icon-dot:before,:host([selected]) .icon calcite-icon{transition:opacity var(--calcite-animation-timing);opacity:1}.text-container{pointer-events:none;display:flex;flex-direction:column;flex-wrap:nowrap;overflow:hidden;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--2);line-height:1.375;word-wrap:break-word;word-break:break-word}.title{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}.description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.actions{margin:0px;display:flex;flex:0 1 auto;align-items:stretch;justify-content:flex-end}.actions--start~.label{-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}';export{f as calcite_pick_list_item}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as i,h as e,g as n}from"./p-c023e6a1.js";import{f as a}from"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";const s=class{constructor(e){t(this,e),this.calciteStepperItemChange=i(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=i(this,"calciteInternalStepperItemChange",6),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.itemMap=new Map,this.items=[],this.enabledItems=[]}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return e("slot",{onSlotchange:t=>{const i=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===(null==t?void 0:t.tagName))),e=Array(i.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=e,this.el.style.gridTemplateColumns=e}})}calciteInternalStepperItemKeyEvent(t){const i=t.detail.item,e=t.target,n=0===this.itemIndex(e),a=this.itemIndex(e)===this.enabledItems.length-1;switch(i.key){case"ArrowDown":case"ArrowRight":a?this.focusFirstItem():this.focusNextItem(e);break;case"ArrowUp":case"ArrowLeft":n?this.focusLastItem():this.focusPrevItem(e);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}registerItem(t){const i=t.target,{content:e,position:n}=t.detail;this.itemMap.set(i,{position:n,content:e}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:i}=t.detail;"number"==typeof i&&(this.currentPosition=i),this.calciteInternalStepperItemChange.emit({position:i})}handleUserRequestedStepperItemSelect(t){const{position:i}=t.detail;this.calciteStepperItemChange.emit({position:i})}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const i=t-1;this.currentPosition!==i&&this.updateStep(i)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,i="next"){var e;const{items:n,currentPosition:a}=this;let s=t;for(;null===(e=n[s])||void 0===e?void 0:e.disabled;)s+="previous"===i?-1:1;return s!==a&&s<n.length&&s>=0?s:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}focusFirstItem(){a(this.enabledItems[0])}focusLastItem(){a(this.enabledItems[this.enabledItems.length-1])}focusNextItem(t){const i=this.itemIndex(t);a(this.enabledItems[i+1]||this.enabledItems[0])}focusPrevItem(t){const i=this.itemIndex(t);a(this.enabledItems[i-1]||this.enabledItems[this.enabledItems.length-1])}itemIndex(t){return this.enabledItems.indexOf(t)}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((i,e)=>t.get(i).position-t.get(e).position))}filterItems(){return this.items.filter((t=>!t.disabled))}get el(){return n(this)}};s.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';export{s as calcite_stepper}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as t,c as e,h as i,H as a,g as s}from"./p-c023e6a1.js";import{s as o,t as n,a as l}from"./p-83166522.js";import{S as r}from"./p-6fe17794.js";import{c,d}from"./p-2e9ed892.js";import{c as h,d as m,n as u}from"./p-9eba5c66.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-73e23995.js";import"./p-9a9955db.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const p={slow:14e3,medium:1e4,fast:6e3},g=class{constructor(i){t(this,i),this.calciteAlertBeforeClose=e(this,"calciteAlertBeforeClose",6),this.calciteAlertClose=e(this,"calciteAlertClose",6),this.calciteAlertBeforeOpen=e(this,"calciteAlertBeforeOpen",6),this.calciteAlertOpen=e(this,"calciteAlertOpen",6),this.calciteInternalAlertSync=e(this,"calciteInternalAlertSync",6),this.calciteInternalAlertRegister=e(this,"calciteInternalAlertRegister",6),this.active=!1,this.open=!1,this.autoDismiss=!1,this.autoDismissDuration=this.autoDismiss?"medium":null,this.color="blue",this.intlClose="Close",this.placement="bottom",this.scale="m",this.effectiveLocale="",this.queue=[],this.queueLength=0,this.queued=!1,this.autoDismissTimeoutId=null,this.trackTimer=Date.now(),this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t,c(this)},this.closeAlert=()=>{this.autoDismissTimeoutId=null,this.queued=!1,this.open=!1,this.queue=this.queue.filter((t=>t!==this.el)),this.determineActiveAlert(),this.calciteInternalAlertSync.emit({queue:this.queue})}}activeHandler(t){this.open=t}openHandler(t){this.open&&!this.queued&&(this.calciteInternalAlertRegister.emit(),this.active=t),this.open||(this.queue=this.queue.filter((t=>t!==this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.active=!1)}updateRequestedIcon(){this.requestedIcon=o(r,this.icon,this.color)}updateDuration(){this.autoDismiss&&this.autoDismissTimeoutId&&(window.clearTimeout(this.autoDismissTimeoutId),this.autoDismissTimeoutId=window.setTimeout((()=>this.closeAlert()),p[this.autoDismissDuration]-(Date.now()-this.trackTimer)))}connectedCallback(){h(this);const t=this.open||this.active;t&&!this.queued&&(this.activeHandler(t),this.openHandler(t),this.calciteInternalAlertRegister.emit()),c(this)}componentWillLoad(){this.requestedIcon=o(r,this.icon,this.color)}disconnectedCallback(){window.clearTimeout(this.autoDismissTimeoutId),d(this),m(this)}render(){const t=i("button",{"aria-label":this.intlClose,class:"alert-close",onClick:this.closeAlert,ref:t=>this.closeButton=t,type:"button"},i("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"}));u.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,signDisplay:"always"};const e=u.numberFormatter.format(this.queueLength>2?this.queueLength-1:1),s=i("div",{class:(this.queueLength>1?"active ":"")+"alert-queue-count"},i("calcite-chip",{scale:this.scale,value:e},e)),{active:o,autoDismiss:l,label:r,placement:c,queued:d,requestedIcon:h}=this,m=l?"alert":"alertdialog",p=!o;return i(a,{"aria-hidden":n(p),"aria-label":r,"calcite-hydrated-hidden":p,role:m},i("div",{class:{container:!0,queued:d,[c]:!0},ref:this.setTransitionEl},h?i("div",{class:"alert-icon"},i("calcite-icon",{icon:h,scale:"l"===this.scale?"m":"s"})):null,i("div",{class:"alert-content"},i("slot",{name:"title"}),i("slot",{name:"message"}),i("slot",{name:"link"})),s,l?null:t,o&&!d&&l?i("div",{class:"alert-dismiss-progress"}):null))}alertSync(t){this.queue!==t.detail.queue&&(this.queue=t.detail.queue),this.queueLength=this.queue.length,this.determineActiveAlert(),t.stopPropagation()}alertRegister(){this.open&&!this.queue.includes(this.el)&&(this.queued=!0,this.queue.push(this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.determineActiveAlert()}async setFocus(){const t=l(this.el,{selector:"calcite-link"});(this.closeButton||t)&&(t?t.setFocus():this.closeButton&&this.closeButton.focus())}determineActiveAlert(){var t;(null===(t=this.queue)||void 0===t?void 0:t[0])===this.el&&(this.openAlert(),this.autoDismiss&&!this.autoDismissTimeoutId&&(this.trackTimer=Date.now(),this.autoDismissTimeoutId=window.setTimeout((()=>this.closeAlert()),p[this.autoDismissDuration])))}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}openAlert(){window.clearTimeout(this.queueTimeout),this.queueTimeout=window.setTimeout((()=>this.queued=!1),300)}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"],autoDismissDuration:["updateDuration"]}}};g.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-alert-width:40em;--calcite-alert-spacing-token-small:0.5rem;--calcite-alert-spacing-token-large:0.75rem}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .alert-queue-count{margin-inline:0.5rem}:host([scale=s]) .container{--calcite-alert-min-height:3.5rem}:host([scale=s]) .alert-close{padding:0.5rem}:host([scale=m]){--calcite-alert-width:50em;--calcite-alert-spacing-token-small:0.75rem;--calcite-alert-spacing-token-large:1rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .alert-queue-count{margin-inline:0.75rem}:host([scale=m]) .container{--calcite-alert-min-height:4.1875rem}:host([scale=l]){--calcite-alert-width:60em;--calcite-alert-spacing-token-small:1rem;--calcite-alert-spacing-token-large:1.25rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){-webkit-margin-after:0.25rem;margin-block-end:0.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .alert-queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-alert-min-height:5.625rem}:host{--calcite-alert-edge-distance:2rem;display:block}:host .container{pointer-events:none;position:fixed;z-index:500;margin-block:0px;margin-inline:auto;display:flex;align-items:center;justify-content:center;background-color:var(--calcite-ui-foreground-1);opacity:0;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-radius:var(--calcite-border-radius);-webkit-border-before:0px solid transparent;border-block-start:0px solid transparent;border-inline:1px solid var(--calcite-ui-border-3);-webkit-border-after:1px solid var(--calcite-ui-border-3);border-block-end:1px solid var(--calcite-ui-border-3);min-block-size:var(--calcite-alert-min-height);inline-size:var(--calcite-alert-width);max-inline-size:calc(100% - (var(--calcite-alert-edge-distance) * 2 + 2px));max-block-size:0;transition:var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out}:host .container.bottom,:host .container.top{inset-inline-end:0;inset-inline-start:0}:host .container[class*=bottom]{transform:translate3d(0, var(--calcite-alert-edge-distance), 0);inset-block-end:var(--calcite-alert-edge-distance)}:host .container[class*=top]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), 0);inset-block-start:var(--calcite-alert-edge-distance)}:host .container[class*=-start]{inset-inline-start:var(--calcite-alert-edge-distance);inset-inline-end:auto}:host .container[class*=-end]{inset-inline-end:var(--calcite-alert-edge-distance);inset-inline-start:auto}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.container{display:flex;inline-size:100%;align-items:center;justify-content:center}.alert-close{outline-color:transparent}.alert-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([open]) .container:not(.queued){max-block-size:100%;border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container:not(.queued)[class*=bottom]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), inherit)}:host([open]) .container:not(.queued)[class*=top]{transform:translate3d(0, var(--calcite-alert-edge-distance), inherit)}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0px;display:inline;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-ui-text-link)}.alert-content{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-alert-spacing-token-large);flex:0 0 auto;overflow-wrap:break-word;background-color:var(--calcite-ui-foreground-1);flex:1 1 auto;min-inline-size:0;padding-block:var(--calcite-alert-spacing-token-small);padding-inline:0 var(--calcite-alert-spacing-token-small);border-end-start-radius:var(--calcite-border-radius);border-end-end-radius:var(--calcite-border-radius)}.alert-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-alert-spacing-token-large);padding-inline-start:var(--calcite-alert-spacing-token-large)}.alert-content:only-child{padding:var(--calcite-alert-spacing-token-small)}.alert-icon{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-alert-spacing-token-small);padding-inline:var(--calcite-alert-spacing-token-large);flex:0 0 auto;display:flex;align-items:center;align-self:stretch;background-color:var(--calcite-ui-foreground-1);padding-block:0px}.alert-close{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-alert-spacing-token-small);padding-inline:var(--calcite-alert-spacing-token-large);flex:0 0 auto;cursor:pointer;align-self:stretch;overflow:hidden;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-block:0px;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;border-end-end-radius:var(--calcite-border-radius)}.alert-close:hover,.alert-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.alert-close:open{background-color:var(--calcite-ui-foreground-3)}.alert-queue-count{visibility:hidden;display:flex;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;background-color:var(--calcite-ui-foreground-1);text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline:0px solid transparent;border-start-end-radius:0}.alert-queue-count.active{visibility:visible;opacity:1}:host([auto-dismiss])>.alert-queue-count{-webkit-border-end:0px solid transparent;border-inline-end:0px solid transparent}.alert-dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.alert-dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-alert-dismiss-progress-background);inset-inline-end:0}:host([color=blue]) .container{border-block-start-color:var(--calcite-ui-info)}:host([color=blue]) .container .alert-icon{color:var(--calcite-ui-info)}:host([color=red]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([color=red]) .container .alert-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-block-start-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .alert-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-block-start-color:var(--calcite-ui-success)}:host([color=green]) .container .alert-icon{color:var(--calcite-ui-success)}:host([auto-dismiss-duration=fast]) .alert-dismiss-progress:after{animation:dismissProgress 6000ms ease-out}:host([auto-dismiss-duration=medium]) .alert-dismiss-progress:after{animation:dismissProgress 10000ms ease-out}:host([auto-dismiss-duration=slow]) .alert-dismiss-progress:after{animation:dismissProgress 14000ms ease-out}@keyframes dismissProgress{0%{inline-size:0px;opacity:0.75}100%{inline-size:100%;opacity:1}}';export{g as calcite_alert}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as a,h as e,H as i,g as t}from"./p-c023e6a1.js";import{g as r}from"./p-a80b3880.js";const n=class{constructor(e){a(this,e),this.active=!1,this.inline=!1,this.scale="m",this.value=0,this.text="",this.noPadding=!1}render(){const{el:a,inline:t,label:n,scale:o,text:l,type:s,value:c}=this,d=a.id||r(),m=t?this.getInlineSize(o):this.getSize(o),f=.45*m,v=`0 0 ${m} ${m}`,g="determinate"===s,h=2*f*Math.PI,k=c/100*h,p=h-k,_=Math.floor(c),z={r:f,cx:m/2,cy:m/2},u={"stroke-dasharray":`${k} ${p}`};return e(i,Object.assign({"aria-label":n,id:d,role:"progressbar"},g?{"aria-valuenow":_,"aria-valuemin":0,"aria-valuemax":100,complete:100===_}:{}),e("div",{class:"loader__svgs"},e("svg",{class:"loader__svg loader__svg--1",viewBox:v},e("circle",Object.assign({},z))),e("svg",{class:"loader__svg loader__svg--2",viewBox:v},e("circle",Object.assign({},z))),e("svg",Object.assign({class:"loader__svg loader__svg--3",viewBox:v},g?{style:u}:{}),e("circle",Object.assign({},z)))),l&&e("div",{class:"loader__text"},l),g&&e("div",{class:"loader__percentage"},c))}getSize(a){return{s:32,m:56,l:80}[a]}getInlineSize(a){return{s:12,m:16,l:20}[a]}get el(){return t(this)}};n.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) * 2) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:none}:host([active]){display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 2.4)}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.2)}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.867)}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';export{n as calcite_loader}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as a,h as t,g as i}from"./p-c023e6a1.js";import{u as e}from"./p-7daea1df.js";const n=class{constructor(t){a(this,t),this.disabled=!1,this.layout="horizontal"}componentDidRender(){e(this)}render(){return t("slot",null)}get el(){return i(this)}};n.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-wrap:wrap}:host ::slotted(calcite-tile-select){-webkit-margin-after:1px;margin-block-end:1px;-webkit-margin-end:1px;margin-inline-end:1px}:host([layout=vertical]){flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{n as calcite_tile_select_group}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as e,c as t,h as a,H as r,g as i,F as o}from"./p-c023e6a1.js";import{c as n,b as s}from"./p-83166522.js";import{C as c}from"./p-729708a3.js";import{u as l}from"./p-7daea1df.js";import{i as d}from"./p-73e23995.js";import{n as h}from"./p-9eba5c66.js";import{c as u,b as p,i as g,e as f,n as v,f as m}from"./p-f42e014b.js";import{H as w}from"./p-508317b3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const y=class{constructor(a){e(this,a),this.calciteDaySelect=t(this,"calciteDaySelect",6),this.calciteInternalDayHover=t(this,"calciteInternalDayHover",6),this.disabled=!1,this.currentMonth=!1,this.selected=!1,this.highlighted=!1,this.range=!1,this.startOfRange=!1,this.endOfRange=!1,this.rangeHover=!1,this.active=!1,this.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=e=>{d(e.key)&&(!this.disabled&&this.calciteDaySelect.emit(),e.preventDefault())}}mouseoverHandler(){this.calciteInternalDayHover.emit()}componentWillLoad(){this.parentDatePickerEl=n(this.el,"calcite-date-picker")}render(){if(this.parentDatePickerEl){const{numberingSystem:e,lang:t}=this.parentDatePickerEl;h.numberFormatOptions=Object.assign(Object.assign({useGrouping:!1},e&&{numberingSystem:e}),t&&{locale:t})}const e=h.localize(String(this.day)),t=s(this.el);return a(r,{onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[c.rtl]:"rtl"===t}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},e)))))}componentDidRender(){l(this,this.isTabbable)}isTabbable(){return this.active}get el(){return i(this)}};y.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;min-inline-size:0px;cursor:pointer;justify-content:center;color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.day-v-wrapper{flex:1 1 auto}.day-wrapper{display:flex;flex-direction:column;align-items:center}.day{display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background:none;box-shadow:0 0 0 2px transparent}.text{margin-block:1px 0px;-webkit-margin-start:0px;margin-inline-start:0px}:host([scale=s]) .day-v-wrapper{padding-block:0.125rem}:host([scale=s]) .day-wrapper{padding:0px}:host([scale=s]) .day{block-size:27px;inline-size:27px;font-size:var(--calcite-font-size--2)}:host([scale=m]) .day-v-wrapper{padding-block:0.25rem}:host([scale=m]) .day-wrapper{padding-inline:0.25rem}:host([scale=m]) .day{block-size:33px;inline-size:33px;font-size:var(--calcite-font-size--1)}:host([scale=l]) .day-v-wrapper{padding-block:0.25rem}:host([scale=l]) .day-wrapper{padding-inline:0.25rem}:host([scale=l]) .day{block-size:43px;inline-size:43px;font-size:var(--calcite-font-size-0)}:host([current-month]) .day{opacity:1}:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:focus),:host([active]){outline:2px solid transparent;outline-offset:2px}:host(:focus:not([disabled])) .day{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-ui-brand) !important;color:var(--calcite-ui-foreground-1) !important}:host([range][selected]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([start-of-range]) .day-wrapper{border-start-start-radius:40%;border-end-start-radius:40%}:host([end-of-range]) .day-wrapper{border-start-end-radius:40%;border-end-end-radius:40%}:host([start-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .day{opacity:1}:host([end-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .day{opacity:1}:host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([highlighted]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([highlighted]) .day-wrapper .day{color:var(--calcite-ui-text-1)}:host([highlighted]:not([active]:focus)) .day{border-radius:0px;color:var(--calcite-ui-text-1)}:host([range-hover]:not([selected])) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([range-hover]:not([selected])) .day{border-radius:0px}:host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--start) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--end) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1))}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper,:host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper{background-image:none}:host([start-of-range].hover--inside-range.focused--end) .day-wrapper,:host([end-of-range].hover--inside-range.focused--start) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:first-child) .calcite--rtl .day-wrapper,:host([range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:last-child) .calcite--rtl .day-wrapper,:host([range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 6px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) .day-wrapper,:host([range-hover]:first-child) .day-wrapper{border-start-start-radius:45%;border-end-start-radius:45%}:host([highlighted]:last-child) .day-wrapper,:host([range-hover]:last-child) .day-wrapper{border-start-end-radius:45%;border-end-end-radius:45%}:host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -6px 0px 0px 0px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{border-radius:0px}:host([selected]){outline:2px solid canvasText}:host([selected]) .day{border-radius:0px;background-color:highlight}:host([range][selected]) .day-wrapper,:host([highlighted]) .day-wrapper,:host([range-hover]:not([selected])) .day-wrapper{background-color:highlight}:host([range][selected][start-of-range]) .day-wrapper,:host([range][selected][end-of-range]) .day-wrapper{background-color:canvas}}";const b=class{constructor(a){e(this,a),this.calciteDatePickerSelect=t(this,"calciteDatePickerSelect",6),this.calciteInternalDatePickerHover=t(this,"calciteInternalDatePickerHover",6),this.calciteDatePickerActiveDateChange=t(this,"calciteDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=t(this,"calciteInternalDatePickerMouseOut",6),this.activeDate=new Date,this.keyDownHandler=e=>{if(e.defaultPrevented)return;const t="rtl"===this.el.dir;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7);break;case"ArrowRight":e.preventDefault(),this.addDays(t?-1:1);break;case"ArrowDown":e.preventDefault(),this.addDays(7);break;case"ArrowLeft":e.preventDefault(),this.addDays(t?1:-1);break;case"PageUp":e.preventDefault(),this.addMonths(-1);break;case"PageDown":e.preventDefault(),this.addMonths(1);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays();break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays();break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}},this.disableActiveFocus=()=>{this.activeFocus=!1},this.dayHover=e=>{const t=e.target;t.disabled?this.calciteInternalDatePickerMouseOut.emit():this.calciteInternalDatePickerHover.emit(t.value),e.stopPropagation()},this.daySelect=e=>{this.calciteDatePickerSelect.emit(e.target.value)}}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const e=this.activeDate.getMonth(),t=this.activeDate.getFullYear(),i=this.localeData.weekStart%7,{abbreviated:o,short:n,narrow:s}=this.localeData.days,c="s"===this.scale?s||n||o:n||o||s,l=[...c.slice(i,7),...c.slice(0,i)],d=this.getCurrentMonthDays(e,t),h=this.getPrevMonthdays(e,t,i),p=this.getNextMonthDays(e,t,i),g=[...h.map((a=>{const r=new Date(t,e-1,a);return this.renderDateDay(!1,a,r)})),...d.map((a=>{const r=new Date(t,e,a),i=u(r,this.activeDate);return this.renderDateDay(i,a,r,!0,!0)})),...p.map((a=>{const r=new Date(t,e+1,a);return this.renderDateDay(!1,a,r)}))],f=[];for(let e=0;e<g.length;e+=7)f.push(g.slice(e,e+7));return a(r,{onFocusOut:this.disableActiveFocus,onKeyDown:this.keyDownHandler},a("div",{class:"calender",role:"grid"},a("div",{class:"week-headers",role:"row"},l.map((e=>a("span",{class:"week-header",role:"columnheader"},e)))),f.map((e=>a("div",{class:"week-days",role:"row"},e)))))}addMonths(e){const t=new Date(this.activeDate);t.setMonth(this.activeDate.getMonth()+e),this.calciteDatePickerActiveDateChange.emit(p(t,this.min,this.max)),this.activeFocus=!0}addDays(e=0){const t=new Date(this.activeDate);t.setDate(this.activeDate.getDate()+e),this.calciteDatePickerActiveDateChange.emit(p(t,this.min,this.max)),this.activeFocus=!0}getPrevMonthdays(e,t,a){const r=new Date(t,e,0),i=r.getDate(),o=[];if(r.getDay()-6===a)return o;for(let e=r.getDay()-a;e>=0;e--)o.push(i-e);return o}getCurrentMonthDays(e,t){const a=new Date(t,e+1,0).getDate(),r=[];for(let e=0;e<a;e++)r.push(e+1);return r}getNextMonthDays(e,t,a){const r=new Date(t,e+1,0).getDay(),i=[];if(r===(a+6)%7)return i;for(let e=0;e<(6-(r-a))%7;e++)i.push(e+1);return i}betweenSelectedRange(e){return!(!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate)||this.isRangeHover(e))}isSelected(e){return!!(u(e,this.selectedDate)||this.startDate&&u(e,this.startDate)||this.endDate&&u(e,this.endDate))}isStartOfRange(e){return!(!this.startDate||u(this.startDate,this.endDate)||!u(this.startDate,e)||this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!u(this.startDate,this.endDate)&&u(this.endDate,e)||!this.endDate&&this.hoverRange&&u(this.startDate,this.hoverRange.end)&&u(e,this.hoverRange.end))}renderDateDay(e,t,r,i,o){var n;const s=this.isFocusedOnStart(),c=this.isHoverInRange()||!this.endDate&&this.hoverRange&&u(null===(n=this.hoverRange)||void 0===n?void 0:n.end,this.startDate);return a("calcite-date-picker-day",{active:e,class:{"hover--inside-range":this.startDate&&c,"hover--outside-range":this.startDate&&!c,"focused--start":s,"focused--end":!s},currentMonth:i,day:t,disabled:!g(r,this.min,this.max),endOfRange:this.isEndOfRange(r),highlighted:this.betweenSelectedRange(r),key:r.toDateString(),onCalciteDaySelect:this.daySelect,onCalciteInternalDayHover:this.dayHover,range:!!this.startDate&&!!this.endDate&&!u(this.startDate,this.endDate),rangeHover:this.isRangeHover(r),ref:t=>{o&&e&&this.activeFocus&&(null==t||t.focus())},scale:this.scale,selected:this.isSelected(r),startOfRange:this.isStartOfRange(r),value:r})}isFocusedOnStart(){var e;return"start"===(null===(e=this.hoverRange)||void 0===e?void 0:e.focused)}isHoverInRange(){if(!this.hoverRange)return!1;const{start:e,end:t}=this.hoverRange;return!!(!this.isFocusedOnStart()&&this.startDate&&(!this.endDate||t<this.endDate)||this.isFocusedOnStart()&&this.startDate&&e>this.startDate)}isRangeHover(e){if(!this.hoverRange)return!1;const{start:t,end:a}=this.hoverRange,r=this.isFocusedOnStart(),i=this.isHoverInRange(),o=i&&(!r&&e>this.startDate&&(e<a||u(e,a))||r&&e<this.endDate&&(e>t||u(e,t))),n=!i&&(!r&&e>=this.endDate&&(e<a||u(e,a))||r&&(e<this.startDate||this.endDate&&u(e,this.startDate))&&(e>t||u(e,t)));return o||n}get el(){return i(this)}};b.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.calender{-webkit-margin-after:0.25rem;margin-block-end:0.25rem}.week-headers{display:flex;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline:0.25rem}.week-header{text-align:center;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([scale=s]) .week-header{padding-inline:0px;padding-block:0.5rem 0.75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .week-header{padding-inline:0px;padding-block:0.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]) .week-header{padding-inline:0px;padding-block:1rem 1.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}.week-days{display:flex;flex-direction:row;padding-block:0px;padding-inline:6px}.week-days:focus{outline:2px solid transparent;outline-offset:2px}";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const x=class{constructor(a){e(this,a),this.calciteDatePickerSelect=t(this,"calciteDatePickerSelect",6),this.globalAttributes={},this.onYearKey=e=>{const t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1})}},this.onYearChange=e=>{this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})},this.onYearInput=e=>{this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})},this.prevMonthClick=e=>{this.handleArrowClick(e,this.prevMonthDate)},this.prevMonthKeydown=e=>{d(e.key)&&this.prevMonthClick(e)},this.nextMonthClick=e=>{this.handleArrowClick(e,this.nextMonthDate)},this.nextMonthKeydown=e=>{d(e.key)&&this.nextMonthClick(e)},this.handleArrowClick=(e,t)=>{e.preventDefault(),this.calciteDatePickerSelect.emit(t)}}componentWillLoad(){this.parentDatePickerEl=n(this.el,"calcite-date-picker")}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){var e;if(!this.activeDate||!this.localeData)return null;if(this.parentDatePickerEl){const{numberingSystem:e,lang:t}=this.parentDatePickerEl;h.numberFormatOptions=Object.assign(Object.assign({useGrouping:!1},e&&{numberingSystem:e}),t&&{locale:t})}const t=this.activeDate.getMonth(),{months:r,unitOrder:i}=this.localeData,n=(r.wide||r.narrow||r.abbreviated)[t],s=this.formatCalendarYear(this.activeDate.getFullYear()),c="l"===this.scale?"m":"s",l=f(i),d=l.indexOf("y")<l.indexOf("m"),u=null===(e=this.localeData.year)||void 0===e?void 0:e.suffix;return a(o,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===t}`,"aria-label":this.intlPrevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===t?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:c})),a("div",{class:{text:!0,"text--reverse":d}},a(w,{class:"month",level:this.headingLevel},n),a("span",{class:"year-wrap"},a("input",{"aria-label":this.intlYear,class:{year:!0,"year--suffix":!!u},inputmode:"numeric",maxlength:"4",minlength:"1",onChange:this.onYearChange,onInput:this.onYearInput,onKeyDown:this.onYearKey,pattern:"\\d*",ref:e=>this.yearInput=e,type:"text",value:s}),u&&a("span",{class:"suffix"},u))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===t}`,"aria-label":this.intlNextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===t?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:c})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=p(v(this.activeDate),this.min,this.max),this.prevMonthDate=p(m(this.activeDate),this.min,this.max))}formatCalendarYear(e){const{localeData:t}=this;return h.localize(`${e+("buddhist"===t["default-calendar"]?543:0)}`)}parseCalendarYear(e){const{localeData:t}=this,a="buddhist"===t["default-calendar"]?543:0,r=Number(h.delocalize(e))-a;return h.localize(`${r}`)}getInRangeDate({localizedYear:e,offset:t=0}){const{min:a,max:r,activeDate:i}=this,o=Number(h.delocalize(e)),n=o.toString().length,s=!isNaN(o)&&o+t,c=s&&(!a||a.getFullYear()<=s)&&(!r||r.getFullYear()>=s);if(s&&c&&n===e.length){const e=new Date(i);return e.setFullYear(s),p(e,a,r)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){const{yearInput:r,activeDate:i}=this,o=this.getInRangeDate({localizedYear:e,offset:a});o&&this.calciteDatePickerSelect.emit(o),t&&(r.value=this.formatCalendarYear((o||i).getFullYear()))}get el(){return i(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}.header{display:flex;justify-content:space-between;padding-block:0px;padding-inline:0.25rem}:host([scale=s]) .text{margin-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=s]) .chevron{block-size:2.25rem}:host([scale=m]) .text{margin-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m]) .chevron{block-size:3rem}:host([scale=l]) .text{margin-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.5rem}:host([scale=l]) .chevron{block-size:3.5rem}.chevron{margin-inline:-0.25rem;box-sizing:content-box;display:flex;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-inline:0.25rem;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inline-size:14.2857142857%}.chevron:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.chevron:hover,.chevron:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.chevron:active{background-color:var(--calcite-ui-foreground-3)}.chevron[aria-disabled=true]{pointer-events:none;opacity:0}.text{margin-block:auto;display:flex;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text--reverse{flex-direction:row-reverse}.month,.year,.suffix{margin-inline:0.25rem;margin-block:auto;display:inline-block;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-1);font-size:inherit}.year{position:relative;inline-size:2.5rem;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent}.year:hover{transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:outline-color;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}.year:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.year--suffix{text-align:start}.year-wrap{position:relative}.suffix{inset-block-start:0px;white-space:nowrap;text-align:start;inset-inline-start:0}";export{y as calcite_date_picker_day,b as calcite_date_picker_month,x as calcite_date_picker_month_header}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as i,c as t,h as e,H as a,g as n}from"./p-c023e6a1.js";import{g as s}from"./p-a80b3880.js";import{l as o,f as l,i as c}from"./p-7a46ef97.js";import{c as r,d as h,g as d}from"./p-bd67334c.js";import{s as m,c as p,d as u,H as f}from"./p-316f56db.js";import{u as g}from"./p-7daea1df.js";import{n as b,u as v,c as y,d as k}from"./p-9eba5c66.js";import{n as D}from"./p-73e23995.js";import"./p-83166522.js";import"./p-729708a3.js";import"./p-9a9955db.js";const S=class{constructor(e){i(this,e),this.calciteInputTimePickerChange=t(this,"calciteInputTimePickerChange",7),this.active=!1,this.open=!1,this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.overlayPositioning="absolute",this.placement="auto",this.step=60,this.value=null,this.internalValueChange=!1,this.previousValidValue=null,this.referenceElementId=`input-time-picker-${s()}`,this.effectiveLocale="",this.calciteInternalInputBlurHandler=()=>{this.open=!1;const i=this.shouldIncludeSeconds(),{effectiveLocale:t,numberingSystem:e,value:a,calciteInputEl:n}=this;b.numberFormatOptions={locale:t,numberingSystem:e,useGrouping:!1};const s=b.delocalize(n.value),l=o({value:s,includeSeconds:i,locale:t,numberingSystem:e});this.setInputValue(l||o({value:a,locale:t,numberingSystem:e,includeSeconds:i}))},this.calciteInternalInputFocusHandler=i=>{this.readOnly||(this.open=!0,i.stopPropagation())},this.calciteInputInputHandler=i=>{const t=i.target;b.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1};const e=b.delocalize(t.value);this.setValue({value:e});const a=e.split("").map((i=>D.includes(i)?b.numberFormatter.format(Number(i)):i)).join("");this.setInputValue(a)},this.timePickerChangeHandler=i=>{i.stopPropagation(),this.setValue({value:i.target.value,origin:"time-picker"})},this.keyDownHandler=i=>{const{defaultPrevented:t,key:e}=i;t||("Enter"===e&&m(this)&&i.preventDefault(),"Escape"===e&&this.open&&(this.open=!1,i.preventDefault()))},this.setCalcitePopoverEl=i=>{this.popoverEl=i},this.setCalciteInputEl=i=>{this.calciteInputEl=i},this.setCalciteTimePickerEl=i=>{this.calciteTimePickerEl=i},this.setInputValue=i=>{this.calciteInputEl&&(this.calciteInputEl.value=i)},this.setValue=({value:i,origin:t="input"})=>{const e=this.value,a=l(i),n=o({value:a,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()});this.internalValueChange="external"!==t&&"loading"!==t;const s="loading"!==t&&"external"!==t&&(i!==this.previousValidValue&&!i||!(this.previousValidValue||!a)||a!==this.previousValidValue&&a);i?(s&&(this.previousValidValue=a),a&&a!==this.value&&(this.value=a),this.localizedValue=n):(this.value=i,this.localizedValue=null),"time-picker"!==t&&"external"!==t||this.setInputValue(n),s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?(this.internalValueChange=!1,this.value=e,this.setInputValue(e),this.previousValidValue=e):this.previousValidValue=a)}}activeHandler(i){this.open=i}openHandler(i){this.active=i,this.disabled||this.readOnly?this.open=!1:i&&this.reposition(!0)}handleDisabledAndReadOnlyChange(i){i||(this.open=!1)}localeChanged(){v(this)}valueWatcher(i){this.internalValueChange||this.setValue({value:i,origin:"external"}),this.internalValueChange=!1}effectiveLocaleWatcher(){this.setInputValue(o({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))}clickHandler(i){i.composedPath().includes(this.calciteTimePickerEl)||this.setFocus()}timePickerBlurHandler(i){i.preventDefault(),i.stopPropagation(),this.open=!1}timePickerFocusHandler(i){i.preventDefault(),i.stopPropagation(),this.readOnly||(this.open=!0)}async setFocus(){var i;null===(i=this.calciteInputEl)||void 0===i||i.setFocus()}async reposition(i=!1){var t;null===(t=this.popoverEl)||void 0===t||t.reposition(i)}onLabelClick(){this.setFocus()}shouldIncludeSeconds(){return this.step<60}connectedCallback(){y(this);const{active:i,open:t}=this;this.value&&this.setValue({value:c(this.value)?this.value:void 0,origin:"loading"}),r(this),p(this),t?this.active=t:i&&(this.open=i)}componentDidLoad(){this.setInputValue(this.localizedValue)}disconnectedCallback(){h(this),u(this),k(this)}componentDidRender(){g(this)}render(){const i=`${this.referenceElementId}-popover`;return e(a,{onKeyDown:this.keyDownHandler},e("div",{"aria-controls":i,"aria-haspopup":"dialog","aria-label":this.name,"aria-owns":i,id:this.referenceElementId,role:"combobox"},e("calcite-input",{disabled:this.disabled,icon:"clock",label:d(this),onCalciteInputInput:this.calciteInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.calciteInternalInputFocusHandler,readOnly:this.readOnly,ref:this.setCalciteInputEl,scale:this.scale,step:this.step})),e("calcite-popover",{id:i,label:"Time Picker",open:this.open,overlayPositioning:this.overlayPositioning,placement:this.placement,ref:this.setCalcitePopoverEl,referenceElement:this.referenceElementId,triggerDisabled:!0},e("calcite-time-picker",{intlHour:this.intlHour,intlHourDown:this.intlHourDown,intlHourUp:this.intlHourUp,intlMeridiem:this.intlMeridiem,intlMeridiemDown:this.intlMeridiemDown,intlMeridiemUp:this.intlMeridiemUp,intlMinute:this.intlMinute,intlMinuteDown:this.intlMinuteDown,intlMinuteUp:this.intlMinuteUp,intlSecond:this.intlSecond,intlSecondDown:this.intlSecondDown,intlSecondUp:this.intlSecondUp,lang:this.effectiveLocale,numberingSystem:this.numberingSystem,onCalciteInternalTimePickerChange:this.timePickerChangeHandler,ref:this.setCalciteTimePickerEl,scale:this.scale,step:this.step,value:this.value})),e(f,{component:this}))}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],locale:["localeChanged"],value:["valueWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};S.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{S as calcite_input_time_picker}
|