@esri/calcite-components 1.0.0-next.302 → 1.0.0-next.306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/calcite.js +1 -1
- package/dist/calcite/p-2a714a22.entry.js +5 -0
- package/dist/calcite/p-63da2e34.system.entry.js +5 -0
- package/dist/calcite/p-737fb960.entry.js +5 -0
- package/dist/calcite/{p-b2bbac37.system.entry.js → p-7cbc72b6.system.entry.js} +1 -1
- package/dist/calcite/p-8603b2e1.entry.js +5 -0
- package/dist/calcite/{p-e5932886.system.entry.js → p-88b875d3.system.entry.js} +1 -1
- package/dist/calcite/{p-6f1cca21.system.js → p-8e252799.system.js} +1 -1
- package/dist/calcite/{p-784e414b.entry.js → p-aa47308a.entry.js} +1 -1
- package/dist/calcite/p-dbe899c6.system.entry.js +5 -0
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +4 -6
- package/dist/cjs/calcite-graph_2.cjs.entry.js +20 -12
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input.cjs.entry.js +10 -2
- package/dist/cjs/calcite-tree_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/calcite-color-picker/calcite-color-picker.js +4 -6
- package/dist/collection/components/calcite-input/calcite-input.js +13 -8
- package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +2 -2
- package/dist/collection/components/calcite-slider/calcite-slider.css +1 -0
- package/dist/collection/components/calcite-slider/calcite-slider.js +21 -11
- package/dist/collection/components/calcite-tree-item/calcite-tree-item.css +47 -69
- package/dist/components/calcite-accordion-item.js +4 -1
- package/dist/components/calcite-accordion.js +4 -1
- package/dist/components/calcite-action-bar.js +4 -1
- package/dist/components/calcite-action-group2.js +4 -1
- package/dist/components/calcite-action-menu2.js +4 -1
- package/dist/components/calcite-action-pad.js +4 -1
- package/dist/components/calcite-action2.js +4 -1
- package/dist/components/calcite-alert.js +4 -1
- package/dist/components/calcite-avatar.js +4 -1
- package/dist/components/calcite-block-section.js +4 -1
- package/dist/components/calcite-block.js +4 -1
- package/dist/components/calcite-button2.js +5 -2
- package/dist/components/calcite-card.js +4 -1
- package/dist/components/calcite-checkbox2.js +4 -1
- package/dist/components/calcite-chip2.js +4 -1
- package/dist/components/calcite-color-picker-hex-input2.js +4 -1
- package/dist/components/calcite-color-picker-swatch2.js +4 -1
- package/dist/components/calcite-color-picker.js +8 -7
- package/dist/components/calcite-combobox-item-group.js +4 -1
- package/dist/components/calcite-combobox-item.js +4 -1
- package/dist/components/calcite-combobox.js +4 -1
- package/dist/components/calcite-date-picker-day2.js +4 -1
- package/dist/components/calcite-date-picker-month-header2.js +4 -1
- package/dist/components/calcite-date-picker-month2.js +4 -1
- package/dist/components/calcite-date-picker2.js +4 -1
- package/dist/components/calcite-dropdown-group.js +4 -1
- package/dist/components/calcite-dropdown-item.js +4 -1
- package/dist/components/calcite-dropdown2.js +4 -1
- package/dist/components/calcite-fab.js +4 -1
- package/dist/components/calcite-filter2.js +4 -1
- package/dist/components/calcite-flow.js +4 -1
- package/dist/components/calcite-graph2.js +4 -1
- package/dist/components/calcite-handle2.js +4 -1
- package/dist/components/calcite-icon2.js +4 -1
- package/dist/components/calcite-inline-editable.js +4 -1
- package/dist/components/calcite-input-date-picker.js +4 -1
- package/dist/components/calcite-input-message.js +4 -1
- package/dist/components/calcite-input-time-picker.js +5 -2
- package/dist/components/calcite-input2.js +14 -3
- package/dist/components/calcite-label2.js +4 -1
- package/dist/components/calcite-link2.js +4 -1
- package/dist/components/calcite-list-item-group.js +4 -1
- package/dist/components/calcite-list-item.js +4 -1
- package/dist/components/calcite-list.js +4 -1
- package/dist/components/calcite-loader2.js +4 -1
- package/dist/components/calcite-modal.js +4 -1
- package/dist/components/calcite-notice.js +4 -1
- package/dist/components/calcite-option-group.js +4 -1
- package/dist/components/calcite-option.js +4 -1
- package/dist/components/calcite-pagination.js +4 -1
- package/dist/components/calcite-panel.js +4 -1
- package/dist/components/calcite-pick-list-group.js +4 -1
- package/dist/components/calcite-pick-list-item2.js +4 -1
- package/dist/components/calcite-pick-list.js +4 -1
- package/dist/components/calcite-popover-manager.js +4 -1
- package/dist/components/calcite-popover2.js +4 -1
- package/dist/components/calcite-progress2.js +4 -1
- package/dist/components/calcite-radio-button-group.js +4 -1
- package/dist/components/calcite-radio-button.js +4 -1
- package/dist/components/calcite-radio-group-item.js +4 -1
- package/dist/components/calcite-radio-group.js +4 -1
- package/dist/components/calcite-radio2.js +4 -1
- package/dist/components/calcite-rating.js +4 -1
- package/dist/components/calcite-scrim2.js +4 -1
- package/dist/components/calcite-select.js +4 -1
- package/dist/components/calcite-shell-center-row.js +4 -1
- package/dist/components/calcite-shell-panel.js +4 -1
- package/dist/components/calcite-shell.js +4 -1
- package/dist/components/calcite-slider.js +24 -13
- package/dist/components/calcite-sortable-list.js +4 -1
- package/dist/components/calcite-split-button.js +4 -1
- package/dist/components/calcite-stepper-item.js +4 -1
- package/dist/components/calcite-stepper.js +4 -1
- package/dist/components/calcite-switch2.js +4 -1
- package/dist/components/calcite-tab-nav2.js +4 -1
- package/dist/components/calcite-tab-title2.js +4 -1
- package/dist/components/calcite-tab2.js +4 -1
- package/dist/components/calcite-tabs2.js +4 -1
- package/dist/components/calcite-tile-select-group.js +4 -1
- package/dist/components/calcite-tile-select.js +4 -1
- package/dist/components/calcite-tile2.js +4 -1
- package/dist/components/calcite-time-picker2.js +4 -1
- package/dist/components/calcite-tip-group.js +4 -1
- package/dist/components/calcite-tip-manager.js +4 -1
- package/dist/components/calcite-tip.js +4 -1
- package/dist/components/calcite-tooltip-manager2.js +4 -1
- package/dist/components/calcite-tooltip.js +4 -1
- package/dist/components/calcite-tree-item.js +5 -2
- package/dist/components/calcite-tree.js +4 -1
- package/dist/components/calcite-value-list-item.js +4 -1
- package/dist/components/calcite-value-list.js +4 -1
- package/dist/custom-elements/index.js +128 -114
- package/dist/esm/calcite-color-picker_3.entry.js +4 -6
- package/dist/esm/calcite-graph_2.entry.js +20 -12
- package/dist/esm/calcite-input-time-picker_2.entry.js +1 -1
- package/dist/esm/calcite-input.entry.js +10 -2
- package/dist/esm/calcite-tree_2.entry.js +1 -1
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/calcite-color-picker_3.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-input.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/extras/docs-json.json +13 -4
- package/dist/types/components/calcite-color-picker/calcite-color-picker.d.ts +0 -1
- package/dist/types/components/calcite-input/calcite-input.d.ts +1 -2
- package/dist/types/components/calcite-input-time-picker/calcite-input-time-picker.d.ts +1 -1
- package/dist/types/components/calcite-slider/calcite-slider.d.ts +3 -1
- package/dist/types/components.d.ts +6 -2
- package/hydrate/index.js +37 -23
- package/package.json +9 -9
- package/readme.md +2 -2
- package/dist/calcite/p-00716aa8.system.entry.js +0 -5
- package/dist/calcite/p-2b295331.entry.js +0 -5
- package/dist/calcite/p-610789ed.system.entry.js +0 -5
- package/dist/calcite/p-99a1c131.entry.js +0 -5
- package/dist/calcite/p-e6c84e63.entry.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,a,e,i){function n(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,r){function s(t){try{o(i.next(t))}catch(t){r(t)}}function l(t){try{o(i["throw"](t))}catch(t){r(t)}}function o(t){t.done?e(t.value):n(t.value).then(s,l)}o((i=i.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(a){return o([t,a])}}function o(s){if(i)throw new TypeError("Generator is already executing.");while(e)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=a.call(t,e)}catch(t){s=[6,t];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
5
|
+
*/System.register(["./p-288bc438.system.js","./p-e020662f.system.js","./p-56b352bf.system.js","./p-6cc23c39.system.js","./p-e095517f.system.js","./p-c34c4414.system.js","./p-523bc291.system.js"],(function(t){"use strict";var a,e,i,n,r,s,l,o,h,u,c,m,d,p,b;return{setters:[function(t){a=t.r;e=t.h;i=t.g;n=t.c;r=t.H},function(t){s=t.g},function(t){l=t.g},function(t){o=t.j},function(t){h=t.c},function(t){u=t.c;c=t.d},function(t){m=t.c;d=t.d;p=t.a;b=t.H}],execute:function(){function f(t,a,e){var i=a[0]-t[0];var n=e[0]-a[0];var r=a[1]-t[1];var s=e[1]-a[1];var l=r/(i||n<0&&0);var o=s/(n||i<0&&0);var h=(l*n+o*i)/(i+n);return(Math.sign(l)+Math.sign(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(h))||0}function g(t,a,e){var i=a[0]-t[0];var n=a[1]-t[1];return i?(3*n/i-e)/2:e}function v(t,a,e,i,n){var r=t[0],s=t[1];var l=a[0],o=a[1];var h=(l-r)/3;var u=n([r+h,s+h*e]).join(",");var c=n([l-h,o-h*i]).join(",");var m=n([l,o]).join(",");return"C "+u+" "+c+" "+m}function x(t){var a=t.width,e=t.height,i=t.min,n=t.max;var r=n[0]-i[0];var s=n[1]-i[1];return function(t){var n=(t[0]-i[0])/r*a;var l=e-t[1]/s*e;return[n,l]}}function k(t){var a=t[0],e=a[0],i=a[1];var n=[e,i];var r=[e,i];return t.reduce((function(t,a){var e=t.min,i=t.max;var n=a[0],r=a[1];return{min:[Math.min(e[0],n),Math.min(e[1],r)],max:[Math.max(i[0],n),Math.max(i[1],r)]}}),{min:n,max:r})}function y(t){var a=t.data,e=t.min,i=t.max,n=t.t;if(a.length===0){return""}var r=n(a[0]),s=r[0],l=r[1];var o=n(e),h=o[0],u=o[1];var c=n(i)[0];var m;var d;var p;var b=a.reduce((function(t,e,i){d=a[i-2];p=a[i-1];if(i>1){var r=f(d,p,e);var s=m===undefined?g(d,p,r):m;var l=v(d,p,s,r,n);m=r;return t+" "+l}return t}),"M "+h+","+u+" L "+h+","+l+" L "+s+","+l);var x=a[a.length-1];var k=v(p,x,m,g(p,x,m),n);return b+" "+k+" L "+c+","+u+" Z"}var w="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.svg{fill:currentColor;stroke:transparent;margin:0;padding:0;display:block}:host([data-style=slider-histogram]) svg{width:100%}:host([data-style=slider-histogram]) svg .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.5}";var _=t("calcite_graph",function(){function t(t){a(this,t);this.data=[];this.width=300;this.height=100;this.graphId="calcite-graph-"+s()}t.prototype.render=function(){var t=this,a=t.data,i=t.colorStops,n=t.width,r=t.height,s=t.highlightMax,l=t.highlightMin,o=t.min,h=t.max;var u=this.graphId;if(!a||a.length===0){return e("svg",{class:"svg",height:r,preserveAspectRatio:"none",viewBox:"0 0 "+n+" "+r,width:n})}var c=k(a),m=c.min,d=c.max;var p=m;var b=d;if(o<m[0]||o>m[0]){p=[o,0]}if(h>d[0]||h<d[0]){b=[h,d[1]]}var f=x({min:p,max:b,width:n,height:r});var g=f([l,b[1]])[0];var v=f([s,b[1]])[0];var w=y({data:a,min:m,max:d,t:f});var _=i?"url(#linear-gradient-"+u+")":undefined;return e("svg",{class:"svg",height:r,preserveAspectRatio:"none",viewBox:"0 0 "+n+" "+r,width:n},i?e("defs",null,e("linearGradient",{id:"linear-gradient-"+u,x1:"0",x2:"1",y1:"0",y2:"0"},i.map((function(t){var a=t.offset,i=t.color,n=t.opacity;return e("stop",{offset:a*100+"%","stop-color":i,"stop-opacity":n})})))):null,l!==undefined?[e("mask",{height:"100%",id:u+"1",width:"100%",x:"0%",y:"0%"},e("path",{d:"\n M 0,0\n L "+(g-1)+",0\n L "+(g-1)+","+r+"\n L 0,"+r+"\n Z\n ",fill:"white"})),e("mask",{height:"100%",id:u+"2",width:"100%",x:"0%",y:"0%"},e("path",{d:"\n M "+(g+1)+",0\n L "+(v-1)+",0\n L "+(v-1)+","+r+"\n L "+(g+1)+", "+r+"\n Z\n ",fill:"white"})),e("mask",{height:"100%",id:u+"3",width:"100%",x:"0%",y:"0%"},e("path",{d:"\n M "+(v+1)+",0\n L "+n+",0\n L "+n+","+r+"\n L "+(v+1)+", "+r+"\n Z\n ",fill:"white"})),e("path",{class:"graph-path",d:w,fill:_,mask:"url(#"+u+"1)"}),e("path",{class:"graph-path--highlight",d:w,fill:_,mask:"url(#"+u+"2)"}),e("path",{class:"graph-path",d:w,fill:_,mask:"url(#"+u+"3)"})]:e("path",{class:"graph-path",d:w,fill:_}))};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());_.style=w;var V='@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;position:relative;padding:7px 0;margin:7px 0.5rem}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border-style:none;background-color:transparent;cursor:pointer;outline:2px solid transparent;outline-offset:2px;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-family:inherit;z-index:2;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:var(--calcite-font-size--2);font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label.hyphen::after{content:"—";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:"";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1);pointer-events:none}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:var(--calcite-font-size--2);font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3)}:host([mirrored]:not([has-histogram])) .tick__label--min{right:0;left:unset;text-align:right}:host([mirrored]:not([has-histogram])) .tick__label--max{right:unset;left:0;text-align:left}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';var H=t("calcite_slider",function(){function t(t){var e=this;a(this,t);this.calciteSliderInput=n(this,"calciteSliderInput",7);this.calciteSliderChange=n(this,"calciteSliderChange",7);this.calciteSliderUpdate=n(this,"calciteSliderUpdate",7);this.disabled=false;this.hasHistogram=false;this.labelHandles=false;this.labelTicks=false;this.max=100;this.min=0;this.mirrored=false;this.precise=false;this.required=false;this.snap=false;this.step=1;this.value=null;this.guid="calcite-slider-"+s();this.isRange=false;this.activeProp="value";this.minMaxValueRange=null;this.minValueDragRange=null;this.maxValueDragRange=null;this.tickValues=[];this.dragUpdate=function(t){t.preventDefault();if(e.dragProp){var a=e.translate(t.clientX||t.pageX);if(e.isRange&&e.dragProp==="minMaxValue"){if(e.minValueDragRange&&e.maxValueDragRange&&e.minMaxValueRange){var i=a-e.minValueDragRange;var n=a+e.maxValueDragRange;if(n<=e.max&&i>=e.min&&n-i===e.minMaxValueRange){e.minValue=e.clamp(i,"minValue");e.maxValue=e.clamp(n,"maxValue")}}else{e.minValueDragRange=a-e.minValue;e.maxValueDragRange=e.maxValue-a;e.minMaxValueRange=e.maxValue-e.minValue}}else{e.setValue(e.dragProp,e.clamp(a,e.dragProp))}}};this.dragEnd=function(t){document.removeEventListener("pointermove",e.dragUpdate);document.removeEventListener("pointerup",e.dragEnd);document.removeEventListener("pointercancel",e.dragEnd);e.focusActiveHandle(t.clientX);if(e.lastDragPropValue!=e[e.dragProp]){e.emitChange()}e.dragProp=null;e.lastDragPropValue=null;e.minValueDragRange=null;e.maxValueDragRange=null;e.minMaxValueRange=null};this.storeTrackRef=function(t){e.trackEl=t}}t.prototype.histogramWatcher=function(t){this.hasHistogram=!!t};t.prototype.connectedCallback=function(){u(this);m(this)};t.prototype.disconnectedCallback=function(){c(this);d(this)};t.prototype.componentWillLoad=function(){this.isRange=!!(this.maxValue||this.maxValue===0);this.tickValues=this.generateTickValues();this.value=this.clamp(this.value);p(this,this.value);if(this.snap){this.value=this.getClosestStep(this.value)}if(this.histogram){this.hasHistogram=true}};t.prototype.componentDidRender=function(){if(this.labelHandles){this.adjustHostObscuredHandleLabel("value");if(this.isRange){this.adjustHostObscuredHandleLabel("minValue");if(!(this.precise&&this.isRange&&!this.hasHistogram)){this.hyphenateCollidingRangeHandleLabels()}}}this.hideObscuredBoundingTickLabels()};t.prototype.render=function(){var t=this;var a=this.el.id||this.guid;var i=this.minValue||this.min;var n=this.maxValue||this.value;var s=this.isRange?"maxValue":"value";var l=this[s];var o=this.shouldUseMinValue();var h=this.getUnitInterval(o?this.minValue:i)*100;var u=this.getUnitInterval(n)*100;var c=this.shouldMirror();var m=(c?100-h:h)+"%";var d=(c?u:100-u)+"%";var p=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("div",{class:"handle"}));var f=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("span",{"aria-hidden":"true",class:"handle__label handle__label--value"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value static"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value transformed"},l?l.toLocaleString():l),e("div",{class:"handle"}));var g=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value static"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value transformed"},l?l.toLocaleString():l));var v=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s,"thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("div",{class:"handle"}),e("div",{class:"handle-extension"}));var x=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s,"thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("div",{class:"handle-extension"}),e("div",{class:"handle"}));var k=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s,"thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("span",{"aria-hidden":"true",class:"handle__label handle__label--value"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value static"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value transformed"},l?l.toLocaleString():l),e("div",{class:"handle"}),e("div",{class:"handle-extension"}));var y=e("button",{"aria-label":this.isRange?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":l,class:{thumb:true,"thumb--value":true,"thumb--active":this.lastDragProp!=="minMaxValue"&&this.dragProp===s,"thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp=s},onPointerDown:function(){return t.dragStart(s)},ref:function(a){return t.maxHandle=a},role:"slider",style:{right:d}},e("div",{class:"handle-extension"}),e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value static"},l?l.toLocaleString():l),e("span",{"aria-hidden":"true",class:"handle__label handle__label--value transformed"},l?l.toLocaleString():l));var w=e("button",{"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:true,"thumb--minValue":true,"thumb--active":this.dragProp==="minValue"},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp="minValue"},onPointerDown:function(){return t.dragStart("minValue")},ref:function(a){return t.minHandle=a},role:"slider",style:{left:m}},e("div",{class:"handle"}));var _=e("button",{"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:true,"thumb--minValue":true,"thumb--active":this.dragProp==="minValue"},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp="minValue"},onPointerDown:function(){return t.dragStart("minValue")},ref:function(a){return t.minHandle=a},role:"slider",style:{left:m}},e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue static"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue transformed"},this.minValue&&this.minValue.toLocaleString()),e("div",{class:"handle"}));var V=e("button",{"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:true,"thumb--minValue":true,"thumb--active":this.dragProp==="minValue"},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp="minValue"},onPointerDown:function(){return t.dragStart("minValue")},ref:function(a){return t.minHandle=a},role:"slider",style:{left:m}},e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue static"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue transformed"},this.minValue&&this.minValue.toLocaleString()));var H=e("button",{"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:true,"thumb--minValue":true,"thumb--active":this.dragProp==="minValue","thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp="minValue"},onPointerDown:function(){return t.dragStart("minValue")},ref:function(a){return t.minHandle=a},role:"slider",style:{left:m}},e("div",{class:"handle-extension"}),e("div",{class:"handle"}));var D=e("button",{"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:true,"thumb--minValue":true,"thumb--active":this.dragProp==="minValue","thumb--precise":true},disabled:this.disabled,onBlur:function(){return t.activeProp=null},onFocus:function(){return t.activeProp="minValue"},onPointerDown:function(){return t.dragStart("minValue")},ref:function(a){return t.minHandle=a},role:"slider",style:{left:m}},e("div",{class:"handle-extension"}),e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue static"},this.minValue&&this.minValue.toLocaleString()),e("span",{"aria-hidden":"true",class:"handle__label handle__label--minValue transformed"},this.minValue&&this.minValue.toLocaleString()));return e(r,{id:a,onTouchStart:this.handleTouchStart},e("div",{class:{container:true,"container--range":this.isRange}},this.renderGraph(),e("div",{class:"track",ref:this.storeTrackRef},e("div",{class:"track__range",onPointerDown:function(){return t.dragStart("minMaxValue")},style:{left:(c?100-u:h)+"%",right:(c?h:100-u)+"%"}}),e("div",{class:"ticks"},this.tickValues.map((function(a){var r=t.getUnitInterval(a)*100+"%";var s=a>=i&&a<=n;if(o){s=a>=t.minValue&&a<=t.maxValue}return e("span",{class:{tick:true,"tick--active":s},style:{left:c?"":r,right:c?r:""}},t.renderTickLabel(a))})))),!this.precise&&!this.labelHandles&&this.isRange&&w,!this.hasHistogram&&!this.precise&&this.labelHandles&&this.isRange&&_,this.precise&&!this.labelHandles&&this.isRange&&H,this.precise&&this.labelHandles&&this.isRange&&D,this.hasHistogram&&!this.precise&&this.labelHandles&&this.isRange&&V,!this.precise&&!this.labelHandles&&p,!this.hasHistogram&&!this.precise&&this.labelHandles&&f,!this.hasHistogram&&this.precise&&!this.labelHandles&&v,this.hasHistogram&&this.precise&&!this.labelHandles&&x,!this.hasHistogram&&this.precise&&this.labelHandles&&k,this.hasHistogram&&!this.precise&&this.labelHandles&&g,this.hasHistogram&&this.precise&&this.labelHandles&&y,e(b,{component:this})))};t.prototype.renderGraph=function(){return this.histogram?e("div",{class:"graph"},e("calcite-graph",{colorStops:this.histogramStops,data:this.histogram,"data-style":"slider-histogram",height:48,highlightMax:this.isRange?this.maxValue:this.value,highlightMin:this.isRange?this.minValue:this.min,max:this.max,min:this.min,width:300})):null};t.prototype.renderTickLabel=function(t){var a=t===this.min;var i=t===this.max;var n=e("span",{class:{tick__label:true,"tick__label--min":a,"tick__label--max":i}},t.toLocaleString());if(this.labelTicks&&!this.hasHistogram&&!this.isRange){return n}if(this.labelTicks&&!this.hasHistogram&&this.isRange&&!this.precise&&!this.labelHandles){return n}if(this.labelTicks&&!this.hasHistogram&&this.isRange&&!this.precise&&this.labelHandles){return n}if(this.labelTicks&&!this.hasHistogram&&this.isRange&&this.precise&&(a||i)){return n}if(this.labelTicks&&this.hasHistogram&&!this.precise&&!this.labelHandles){return n}if(this.labelTicks&&this.hasHistogram&&this.precise&&!this.labelHandles&&(a||i)){return n}if(this.labelTicks&&this.hasHistogram&&!this.precise&&this.labelHandles&&(a||i)){return n}if(this.labelTicks&&this.hasHistogram&&this.precise&&this.labelHandles&&(a||i)){return n}return null};t.prototype.keyDownHandler=function(t){var a=this.shouldMirror();var e=this,i=e.activeProp,n=e.max,r=e.min,s=e.pageStep,o=e.step;var h=this[i];var u=l(t.key);if(u==="Enter"||u===" "){t.preventDefault();return}var c;if(u==="ArrowUp"||u==="ArrowRight"){var m=a&&u==="ArrowRight"?-1:1;c=h+o*m}else if(u==="ArrowDown"||u==="ArrowLeft"){var m=a&&u==="ArrowLeft"?-1:1;c=h-o*m}else if(u==="PageUp"){if(s){c=h+s}}else if(u==="PageDown"){if(s){c=h-s}}else if(u==="Home"){c=r}else if(u==="End"){c=n}if(isNaN(c)){return}t.preventDefault();this.setValue(i,this.clamp(c,i))};t.prototype.clickHandler=function(t){this.focusActiveHandle(t.clientX)};t.prototype.pointerDownHandler=function(t){var a=t.clientX||t.pageX;var e=this.translate(a);var i="value";if(this.isRange){var n=e>=this.minValue&&e<=this.maxValue;if(n&&this.lastDragProp==="minMaxValue"){i="minMaxValue"}else{var r=Math.abs(this.maxValue-e)<Math.abs(this.minValue-e);i=r||e>this.maxValue?"maxValue":"minValue"}}this.lastDragPropValue=this[i];this.dragStart(i);var s=this.el.shadowRoot.querySelector(".thumb:active");if(!s){this.setValue(i,this.clamp(e,i))}};t.prototype.handleTouchStart=function(t){t.preventDefault()};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(a){t=this.minHandle?this.minHandle:this.maxHandle;t.focus();return[2]}))}))};t.prototype.onLabelClick=function(){this.setFocus()};t.prototype.shouldMirror=function(){return this.mirrored&&!this.hasHistogram};t.prototype.shouldUseMinValue=function(){if(!this.isRange){return false}return this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0};t.prototype.generateTickValues=function(){var t=[];var a=this.min;while(this.ticks&&a<this.max+this.ticks){t.push(Math.min(a,this.max));a=a+this.ticks}return t};t.prototype.dragStart=function(t){this.dragProp=t;this.lastDragProp=this.dragProp;this.activeProp=t;document.addEventListener("pointermove",this.dragUpdate);document.addEventListener("pointerup",this.dragEnd);document.addEventListener("pointercancel",this.dragEnd)};t.prototype.focusActiveHandle=function(t){switch(this.dragProp){case"minValue":this.minHandle.focus();break;case"maxValue":this.maxHandle.focus();break;case"minMaxValue":this.getClosestHandle(t).focus();break}};t.prototype.emitInput=function(){this.calciteSliderInput.emit();this.calciteSliderUpdate.emit()};t.prototype.emitChange=function(){this.calciteSliderChange.emit()};t.prototype.setValue=function(t,a){var e=this[t];var i=e!==a;if(!i){return}this[t]=a;var n=this.dragProp;if(!n){this.emitChange()}this.emitInput()};t.prototype.clamp=function(t,a){t=h(t,this.min,this.max);if(a==="maxValue"){t=Math.max(t,this.minValue)}if(a==="minValue"){t=Math.min(t,this.maxValue)}return t};t.prototype.translate=function(t){var a=this.max-this.min;var e=this.trackEl.getBoundingClientRect(),i=e.left,n=e.width;var r=(t-i)/n;var s=this.shouldMirror();var l=this.clamp(this.min+a*(s?1-r:r));if(this.snap&&this.step){l=this.getClosestStep(l)}return l};t.prototype.getClosestStep=function(t){t=this.clamp(t);if(this.step){var a=Math.round(t/this.step)*this.step;t=this.clamp(a)}return t};t.prototype.getClosestHandle=function(t){return this.getDistanceX(this.maxHandle,t)>this.getDistanceX(this.minHandle,t)?this.minHandle:this.maxHandle};t.prototype.getDistanceX=function(t,a){return Math.abs(t.getBoundingClientRect().left-a)};t.prototype.getFontSizeForElement=function(t){return Number(window.getComputedStyle(t).getPropertyValue("font-size").match(/\d+/)[0])};t.prototype.getUnitInterval=function(t){t=this.clamp(t);var a=this.max-this.min;return(t-this.min)/a};t.prototype.adjustHostObscuredHandleLabel=function(t){var a=this.el.shadowRoot.querySelector(".handle__label--"+t);var e=this.el.shadowRoot.querySelector(".handle__label--"+t+".static");var i=this.el.shadowRoot.querySelector(".handle__label--"+t+".transformed");var n=e.getBoundingClientRect();var r=this.getHostOffset(n.left,n.right);a.style.transform="translateX("+r+"px)";i.style.transform="translateX("+r+"px)"};t.prototype.hyphenateCollidingRangeHandleLabels=function(){var t=this.el.shadowRoot;var a=this.shouldMirror();var e=a?"value":"minValue";var i=a?"minValue":"value";var n=t.querySelector(".handle__label--"+e);var r=t.querySelector(".handle__label--"+e+".static");var s=t.querySelector(".handle__label--"+e+".transformed");var l=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right);var o=t.querySelector(".handle__label--"+i);var h=t.querySelector(".handle__label--"+i+".static");var u=t.querySelector(".handle__label--"+i+".transformed");var c=this.getHostOffset(h.getBoundingClientRect().left,h.getBoundingClientRect().right);var m=this.getFontSizeForElement(n);var d=this.getRangeLabelOverlap(s,u);var p=n;var b=m/2;if(d>0){p.classList.add("hyphen");if(c===0&&l===0){var f=d/2-b;f=Math.sign(f)===-1?Math.abs(f):-f;var g=this.getHostOffset(s.getBoundingClientRect().left+f-b,s.getBoundingClientRect().right+f-b);var v=d/2;var x=this.getHostOffset(u.getBoundingClientRect().left+v,u.getBoundingClientRect().right+v);if(g!==0){f+=g;v+=g}if(x!==0){f+=x;v+=x}n.style.transform="translateX("+f+"px)";s.style.transform="translateX("+(f-b)+"px)";o.style.transform="translateX("+v+"px)";u.style.transform="translateX("+v+"px)"}else if(l>0||c>0){n.style.transform="translateX("+(l+b)+"px)";o.style.transform="translateX("+(d+c)+"px)";u.style.transform="translateX("+(d+c)+"px)"}else if(l<0||c<0){var f=Math.abs(l)+d-b;f=Math.sign(f)===-1?Math.abs(f):-f;n.style.transform="translateX("+f+"px)";s.style.transform="translateX("+(f-b)+"px)"}}else{p.classList.remove("hyphen");n.style.transform="translateX("+l+"px)";s.style.transform="translateX("+l+"px)";o.style.transform="translateX("+c+"px)";u.style.transform="translateX("+c+"px)"}};t.prototype.hideObscuredBoundingTickLabels=function(){if(!this.hasHistogram&&!this.isRange&&!this.labelHandles&&!this.precise){return}if(!this.hasHistogram&&!this.isRange&&this.labelHandles&&!this.precise){return}if(!this.hasHistogram&&!this.isRange&&!this.labelHandles&&this.precise){return}if(!this.hasHistogram&&!this.isRange&&this.labelHandles&&this.precise){return}if(!this.hasHistogram&&this.isRange&&!this.precise){return}if(this.hasHistogram&&!this.precise&&!this.labelHandles){return}var t=this.el.shadowRoot.querySelector(".thumb--minValue");var a=this.el.shadowRoot.querySelector(".thumb--value");var e=this.el.shadowRoot.querySelector(".tick__label--min");var i=this.el.shadowRoot.querySelector(".tick__label--max");if(!t&&a&&e&&i){e.style.opacity=this.isMinTickLabelObscured(e,a)?"0":"1";i.style.opacity=this.isMaxTickLabelObscured(i,a)?"0":"1"}if(t&&a&&e&&i){e.style.opacity=this.isMinTickLabelObscured(e,t)||this.isMinTickLabelObscured(e,a)?"0":"1";i.style.opacity=this.isMaxTickLabelObscured(i,t)||this.isMaxTickLabelObscured(i,a)&&this.hasHistogram?"0":"1"}};t.prototype.getHostOffset=function(t,a){var e=this.el.getBoundingClientRect();var i=7;if(t+i<e.left){return e.left-t-i}if(a-i>e.right){return-(a-e.right)+i}return 0};t.prototype.getRangeLabelOverlap=function(t,a){var e=t.getBoundingClientRect();var i=a.getBoundingClientRect();var n=this.getFontSizeForElement(t);var r=e.right+n-i.left;return Math.max(r,0)};t.prototype.isMinTickLabelObscured=function(t,a){var e=t.getBoundingClientRect();var i=a.getBoundingClientRect();return o(e,i)};t.prototype.isMaxTickLabelObscured=function(t,a){var e=t.getBoundingClientRect();var i=a.getBoundingClientRect();return o(e,i)};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{histogram:["histogramWatcher"]}},enumerable:false,configurable:true});return t}());H.style=V}}}));
|
|
@@ -2815,12 +2815,6 @@ let CalciteColorPicker = class {
|
|
|
2815
2815
|
//
|
|
2816
2816
|
//--------------------------------------------------------------------------
|
|
2817
2817
|
componentWillLoad() {
|
|
2818
|
-
const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
|
|
2819
|
-
if (this.storageId && localStorage.getItem(storageKey)) {
|
|
2820
|
-
this.savedColors = JSON.parse(localStorage.getItem(storageKey));
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
connectedCallback() {
|
|
2824
2818
|
const { allowEmpty, color: color$1, format, value } = this;
|
|
2825
2819
|
const willSetNoColor = allowEmpty && !value;
|
|
2826
2820
|
const parsedMode = utils.parseMode(value);
|
|
@@ -2832,6 +2826,10 @@ let CalciteColorPicker = class {
|
|
|
2832
2826
|
this.setMode(format);
|
|
2833
2827
|
this.internalColorSet(initialColor, false, "initial");
|
|
2834
2828
|
this.updateDimensions(this.scale);
|
|
2829
|
+
const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
|
|
2830
|
+
if (this.storageId && localStorage.getItem(storageKey)) {
|
|
2831
|
+
this.savedColors = JSON.parse(localStorage.getItem(storageKey));
|
|
2832
|
+
}
|
|
2835
2833
|
}
|
|
2836
2834
|
disconnectedCallback() {
|
|
2837
2835
|
document.removeEventListener("mousemove", this.globalMouseMoveHandler);
|
|
@@ -196,7 +196,7 @@ let CalciteGraph = class {
|
|
|
196
196
|
};
|
|
197
197
|
CalciteGraph.style = calciteGraphCss;
|
|
198
198
|
|
|
199
|
-
const calciteSliderCss = "@charset \"UTF-8\";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;position:relative;padding:7px 0;margin:7px 0.5rem}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border-style:none;background-color:transparent;cursor:pointer;outline:2px solid transparent;outline-offset:2px;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-family:inherit;z-index:2;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:var(--calcite-font-size--2);font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label.hyphen::after{content:\"—\";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:\"\";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1)}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:var(--calcite-font-size--2);font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3)}:host([mirrored]:not([has-histogram])) .tick__label--min{right:0;left:unset;text-align:right}:host([mirrored]:not([has-histogram])) .tick__label--max{right:unset;left:0;text-align:left}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
199
|
+
const calciteSliderCss = "@charset \"UTF-8\";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;position:relative;padding:7px 0;margin:7px 0.5rem}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border-style:none;background-color:transparent;cursor:pointer;outline:2px solid transparent;outline-offset:2px;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-family:inherit;z-index:2;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:var(--calcite-font-size--2);font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label.hyphen::after{content:\"—\";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:\"\";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1);pointer-events:none}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:var(--calcite-font-size--2);font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3)}:host([mirrored]:not([has-histogram])) .tick__label--min{right:0;left:unset;text-align:right}:host([mirrored]:not([has-histogram])) .tick__label--max{right:unset;left:0;text-align:left}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
|
200
200
|
|
|
201
201
|
let CalciteSlider = class {
|
|
202
202
|
constructor(hostRef) {
|
|
@@ -272,11 +272,11 @@ let CalciteSlider = class {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
this.dragEnd = () => {
|
|
275
|
+
this.dragEnd = (event) => {
|
|
276
276
|
document.removeEventListener("pointermove", this.dragUpdate);
|
|
277
277
|
document.removeEventListener("pointerup", this.dragEnd);
|
|
278
278
|
document.removeEventListener("pointercancel", this.dragEnd);
|
|
279
|
-
this.focusActiveHandle();
|
|
279
|
+
this.focusActiveHandle(event.clientX);
|
|
280
280
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
281
281
|
this.emitChange();
|
|
282
282
|
}
|
|
@@ -449,7 +449,7 @@ let CalciteSlider = class {
|
|
|
449
449
|
tick__label: true,
|
|
450
450
|
"tick__label--min": isMinTickLabel,
|
|
451
451
|
"tick__label--max": isMaxTickLabel
|
|
452
|
-
} },
|
|
452
|
+
} }, tick.toLocaleString()));
|
|
453
453
|
if (this.labelTicks && !this.hasHistogram && !this.isRange) {
|
|
454
454
|
return tickLabel;
|
|
455
455
|
}
|
|
@@ -545,8 +545,8 @@ let CalciteSlider = class {
|
|
|
545
545
|
event.preventDefault();
|
|
546
546
|
this.setValue(activeProp, this.clamp(adjustment, activeProp));
|
|
547
547
|
}
|
|
548
|
-
clickHandler() {
|
|
549
|
-
this.focusActiveHandle();
|
|
548
|
+
clickHandler(event) {
|
|
549
|
+
this.focusActiveHandle(event.clientX);
|
|
550
550
|
}
|
|
551
551
|
pointerDownHandler(event) {
|
|
552
552
|
const x = event.clientX || event.pageX;
|
|
@@ -604,7 +604,7 @@ let CalciteSlider = class {
|
|
|
604
604
|
const ticks = [];
|
|
605
605
|
let current = this.min;
|
|
606
606
|
while (this.ticks && current < this.max + this.ticks) {
|
|
607
|
-
ticks.push(current);
|
|
607
|
+
ticks.push(Math.min(current, this.max));
|
|
608
608
|
current = current + this.ticks;
|
|
609
609
|
}
|
|
610
610
|
return ticks;
|
|
@@ -617,16 +617,16 @@ let CalciteSlider = class {
|
|
|
617
617
|
document.addEventListener("pointerup", this.dragEnd);
|
|
618
618
|
document.addEventListener("pointercancel", this.dragEnd);
|
|
619
619
|
}
|
|
620
|
-
focusActiveHandle() {
|
|
620
|
+
focusActiveHandle(valueX) {
|
|
621
621
|
switch (this.dragProp) {
|
|
622
|
-
default:
|
|
623
|
-
case "maxValue":
|
|
624
|
-
this.maxHandle.focus();
|
|
625
|
-
break;
|
|
626
622
|
case "minValue":
|
|
627
623
|
this.minHandle.focus();
|
|
628
624
|
break;
|
|
625
|
+
case "maxValue":
|
|
626
|
+
this.maxHandle.focus();
|
|
627
|
+
break;
|
|
629
628
|
case "minMaxValue":
|
|
629
|
+
this.getClosestHandle(valueX).focus();
|
|
630
630
|
break;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
@@ -697,6 +697,14 @@ let CalciteSlider = class {
|
|
|
697
697
|
}
|
|
698
698
|
return num;
|
|
699
699
|
}
|
|
700
|
+
getClosestHandle(valueX) {
|
|
701
|
+
return this.getDistanceX(this.maxHandle, valueX) > this.getDistanceX(this.minHandle, valueX)
|
|
702
|
+
? this.minHandle
|
|
703
|
+
: this.maxHandle;
|
|
704
|
+
}
|
|
705
|
+
getDistanceX(el, valueX) {
|
|
706
|
+
return Math.abs(el.getBoundingClientRect().left - valueX);
|
|
707
|
+
}
|
|
700
708
|
getFontSizeForElement(element) {
|
|
701
709
|
return Number(window.getComputedStyle(element).getPropertyValue("font-size").match(/\d+/)[0]);
|
|
702
710
|
}
|
|
@@ -94,7 +94,7 @@ let CalciteInputTimePicker = class {
|
|
|
94
94
|
this.required = false;
|
|
95
95
|
/** The scale (size) of the time input */
|
|
96
96
|
this.scale = "m";
|
|
97
|
-
/** number that specifies the granularity that the value must adhere to */
|
|
97
|
+
/** number (seconds) that specifies the granularity that the value must adhere to */
|
|
98
98
|
this.step = 60;
|
|
99
99
|
/** The selected time (always 24-hour format)*/
|
|
100
100
|
this.value = null;
|
|
@@ -114,6 +114,10 @@ let CalciteInput = class {
|
|
|
114
114
|
//
|
|
115
115
|
//--------------------------------------------------------------------------
|
|
116
116
|
this.keyDownHandler = (event) => {
|
|
117
|
+
/* prevent default behavior for input to move the cursor to the beginning of the input with every ArrowUp press */
|
|
118
|
+
if (event.key === "ArrowUp") {
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
}
|
|
117
121
|
if (this.readOnly || this.disabled) {
|
|
118
122
|
return;
|
|
119
123
|
}
|
|
@@ -228,10 +232,14 @@ let CalciteInput = class {
|
|
|
228
232
|
}
|
|
229
233
|
const inputMax = this.maxString ? parseFloat(this.maxString) : null;
|
|
230
234
|
const inputMin = this.minString ? parseFloat(this.minString) : null;
|
|
231
|
-
const valueNudgeDelayInMs =
|
|
235
|
+
const valueNudgeDelayInMs = 100;
|
|
232
236
|
this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
|
|
237
|
+
let nudgeNumberValueIntervalCount = 0;
|
|
233
238
|
this.nudgeNumberValueIntervalId = setInterval(() => {
|
|
234
|
-
|
|
239
|
+
nudgeNumberValueIntervalCount !== 0
|
|
240
|
+
? this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent)
|
|
241
|
+
: null;
|
|
242
|
+
nudgeNumberValueIntervalCount++;
|
|
235
243
|
}, valueNudgeDelayInMs);
|
|
236
244
|
};
|
|
237
245
|
this.numberButtonMouseUpAndMouseOutHandler = () => {
|
|
@@ -222,7 +222,7 @@ const ICONS = {
|
|
|
222
222
|
chevronRight: "chevron-right"
|
|
223
223
|
};
|
|
224
224
|
|
|
225
|
-
const calciteTreeItemCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{
|
|
225
|
+
const calciteTreeItemCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block;cursor:pointer;outline:2px solid transparent;outline-offset:2px;max-width:100%;color:var(--calcite-ui-text-3)}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .node-container{--calcite-tree-padding-y:0.25rem}:host([scale=s]) .node-container .checkbox,:host([scale=s]) .node-container .chevron,:host([scale=s]) .node-container .checkmark,:host([scale=s]) .node-container .bullet-point{margin-inline:0.25rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .node-container{--calcite-tree-padding-y:0.5rem}:host([scale=m]) .node-container .checkbox,:host([scale=m]) .node-container .chevron,:host([scale=m]) .node-container .checkmark,:host([scale=m]) .node-container .bullet-point{margin-inline:0.5rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .node-container{--calcite-tree-padding-y:0.75rem}:host([scale=l]) .node-container .checkbox,:host([scale=l]) .node-container .chevron,:host([scale=l]) .node-container .checkmark,:host([scale=l]) .node-container .bullet-point{margin-inline:0.75rem}:host([lines]) .children-container:after{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-property:background-color, border-color, color, fill, stroke;transition-property:background-color, border-color, color, fill, stroke;top:0;position:absolute;width:1px;height:96%;content:\"\";background-color:var(--calcite-ui-border-2);z-index:-1}:host(:not([lines])) .node-container:after{display:none}::slotted(*){word-wrap:break-word;overflow-wrap:break-word;min-width:0;max-width:100%;color:inherit;text-decoration:none !important}::slotted(*):hover{text-decoration:none !important}::slotted(a){width:100%;text-decoration:none}:host{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.checkbox{outline:2px solid transparent;outline-offset:2px;line-height:0}.checkbox-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:none}.children-container{position:relative;overflow:hidden;height:0;-webkit-margin-start:1.25rem;margin-inline-start:1.25rem;-webkit-transform:scaleY(0);transform:scaleY(0);opacity:0;-webkit-transition:0.15s cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity 0.15s cubic-bezier(0.215, 0.44, 0.42, 0.88), all 0.15s ease-in-out;transition:0.15s cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity 0.15s cubic-bezier(0.215, 0.44, 0.42, 0.88), all 0.15s ease-in-out;-webkit-transform-origin:top;transform-origin:top}:host([expanded])>.children-container{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:1;height:auto}.node-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;padding:var(--calcite-tree-padding-y) 0}.node-container .checkmark,.node-container .bullet-point{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;opacity:0;color:var(--calcite-ui-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus) .node-container .checkmark,:host(:focus) .node-container .bullet-point{opacity:1}:host([selected])>.node-container,:host([selected])>.node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected])>.node-container .bullet-point,:host([selected])>.node-container .checkmark,:host([selected])>.node-container:hover .bullet-point,:host([selected])>.node-container:hover .checkmark{opacity:1;color:var(--calcite-ui-brand)}:host(:not([has-children])):host([scale=s])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}:host(:not([has-children])):host([scale=m])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=l])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}:host([has-children])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-margin-start:0;margin-inline-start:0}:host([has-children])>.node-container .bullet-point,:host([has-children])>.node-container .checkmark{display:none}:host([has-children][expanded]:not([selected]))>.node-container ::slotted(*){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([has-children][selected])>.node-container[data-selection-mode=children],:host([has-children][selected])>.node-container[data-selection-mode=multi-children]{color:var(--calcite-ui-brand)}.chevron{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;position:relative;-ms-flex-item-align:center;align-self:center;color:var(--calcite-ui-text-3);-ms-flex:0 0 auto;flex:0 0 auto;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.calcite--rtl .chevron{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host([expanded])>.node-container>.chevron{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-ui-brand)}";
|
|
226
226
|
|
|
227
227
|
let CalciteTreeItem = class {
|
|
228
228
|
constructor(hostRef) {
|
package/dist/cjs/calcite.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
const index = require('./index-6b5d2de5.js');
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
|
-
Stencil Client Patch Browser v2.
|
|
10
|
+
Stencil Client Patch Browser v2.11.0 | MIT Licensed | https://stenciljs.com
|
|
11
11
|
*/
|
|
12
12
|
const patchBrowser = () => {
|
|
13
13
|
// @ts-ignore
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index = require('./index-6b5d2de5.js');
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
|
-
Stencil Client Patch Esm v2.
|
|
12
|
+
Stencil Client Patch Esm v2.11.0 | MIT Licensed | https://stenciljs.com
|
|
13
13
|
*/
|
|
14
14
|
const patchEsm = () => {
|
|
15
15
|
return index.promiseResolve();
|
|
@@ -546,12 +546,6 @@ export class CalciteColorPicker {
|
|
|
546
546
|
//
|
|
547
547
|
//--------------------------------------------------------------------------
|
|
548
548
|
componentWillLoad() {
|
|
549
|
-
const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
|
|
550
|
-
if (this.storageId && localStorage.getItem(storageKey)) {
|
|
551
|
-
this.savedColors = JSON.parse(localStorage.getItem(storageKey));
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
connectedCallback() {
|
|
555
549
|
const { allowEmpty, color, format, value } = this;
|
|
556
550
|
const willSetNoColor = allowEmpty && !value;
|
|
557
551
|
const parsedMode = parseMode(value);
|
|
@@ -563,6 +557,10 @@ export class CalciteColorPicker {
|
|
|
563
557
|
this.setMode(format);
|
|
564
558
|
this.internalColorSet(initialColor, false, "initial");
|
|
565
559
|
this.updateDimensions(this.scale);
|
|
560
|
+
const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
|
|
561
|
+
if (this.storageId && localStorage.getItem(storageKey)) {
|
|
562
|
+
this.savedColors = JSON.parse(localStorage.getItem(storageKey));
|
|
563
|
+
}
|
|
566
564
|
}
|
|
567
565
|
disconnectedCallback() {
|
|
568
566
|
document.removeEventListener("mousemove", this.globalMouseMoveHandler);
|
|
@@ -79,6 +79,10 @@ export class CalciteInput {
|
|
|
79
79
|
//
|
|
80
80
|
//--------------------------------------------------------------------------
|
|
81
81
|
this.keyDownHandler = (event) => {
|
|
82
|
+
/* prevent default behavior for input to move the cursor to the beginning of the input with every ArrowUp press */
|
|
83
|
+
if (event.key === "ArrowUp") {
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
}
|
|
82
86
|
if (this.readOnly || this.disabled) {
|
|
83
87
|
return;
|
|
84
88
|
}
|
|
@@ -193,10 +197,14 @@ export class CalciteInput {
|
|
|
193
197
|
}
|
|
194
198
|
const inputMax = this.maxString ? parseFloat(this.maxString) : null;
|
|
195
199
|
const inputMin = this.minString ? parseFloat(this.minString) : null;
|
|
196
|
-
const valueNudgeDelayInMs =
|
|
200
|
+
const valueNudgeDelayInMs = 100;
|
|
197
201
|
this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
|
|
202
|
+
let nudgeNumberValueIntervalCount = 0;
|
|
198
203
|
this.nudgeNumberValueIntervalId = setInterval(() => {
|
|
199
|
-
|
|
204
|
+
nudgeNumberValueIntervalCount !== 0
|
|
205
|
+
? this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent)
|
|
206
|
+
: null;
|
|
207
|
+
nudgeNumberValueIntervalCount++;
|
|
200
208
|
}, valueNudgeDelayInMs);
|
|
201
209
|
};
|
|
202
210
|
this.numberButtonMouseUpAndMouseOutHandler = () => {
|
|
@@ -1095,15 +1103,12 @@ export class CalciteInput {
|
|
|
1095
1103
|
"cancelable": true,
|
|
1096
1104
|
"composed": true,
|
|
1097
1105
|
"docs": {
|
|
1098
|
-
"tags": [
|
|
1099
|
-
"name": "internal",
|
|
1100
|
-
"text": undefined
|
|
1101
|
-
}],
|
|
1106
|
+
"tags": [],
|
|
1102
1107
|
"text": "This event fires each time a new value is typed and committed."
|
|
1103
1108
|
},
|
|
1104
1109
|
"complexType": {
|
|
1105
|
-
"original": "
|
|
1106
|
-
"resolved": "
|
|
1110
|
+
"original": "void",
|
|
1111
|
+
"resolved": "void",
|
|
1107
1112
|
"references": {}
|
|
1108
1113
|
}
|
|
1109
1114
|
}]; }
|
|
@@ -29,7 +29,7 @@ export class CalciteInputTimePicker {
|
|
|
29
29
|
this.required = false;
|
|
30
30
|
/** The scale (size) of the time input */
|
|
31
31
|
this.scale = "m";
|
|
32
|
-
/** number that specifies the granularity that the value must adhere to */
|
|
32
|
+
/** number (seconds) that specifies the granularity that the value must adhere to */
|
|
33
33
|
this.step = 60;
|
|
34
34
|
/** The selected time (always 24-hour format)*/
|
|
35
35
|
this.value = null;
|
|
@@ -543,7 +543,7 @@ export class CalciteInputTimePicker {
|
|
|
543
543
|
"optional": false,
|
|
544
544
|
"docs": {
|
|
545
545
|
"tags": [],
|
|
546
|
-
"text": "number that specifies the granularity that the value must adhere to"
|
|
546
|
+
"text": "number (seconds) that specifies the granularity that the value must adhere to"
|
|
547
547
|
},
|
|
548
548
|
"attribute": "step",
|
|
549
549
|
"reflect": false,
|
|
@@ -79,11 +79,11 @@ export class CalciteSlider {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
this.dragEnd = () => {
|
|
82
|
+
this.dragEnd = (event) => {
|
|
83
83
|
document.removeEventListener("pointermove", this.dragUpdate);
|
|
84
84
|
document.removeEventListener("pointerup", this.dragEnd);
|
|
85
85
|
document.removeEventListener("pointercancel", this.dragEnd);
|
|
86
|
-
this.focusActiveHandle();
|
|
86
|
+
this.focusActiveHandle(event.clientX);
|
|
87
87
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
88
88
|
this.emitChange();
|
|
89
89
|
}
|
|
@@ -314,7 +314,7 @@ export class CalciteSlider {
|
|
|
314
314
|
tick__label: true,
|
|
315
315
|
"tick__label--min": isMinTickLabel,
|
|
316
316
|
"tick__label--max": isMaxTickLabel
|
|
317
|
-
} },
|
|
317
|
+
} }, tick.toLocaleString()));
|
|
318
318
|
if (this.labelTicks && !this.hasHistogram && !this.isRange) {
|
|
319
319
|
return tickLabel;
|
|
320
320
|
}
|
|
@@ -410,8 +410,8 @@ export class CalciteSlider {
|
|
|
410
410
|
event.preventDefault();
|
|
411
411
|
this.setValue(activeProp, this.clamp(adjustment, activeProp));
|
|
412
412
|
}
|
|
413
|
-
clickHandler() {
|
|
414
|
-
this.focusActiveHandle();
|
|
413
|
+
clickHandler(event) {
|
|
414
|
+
this.focusActiveHandle(event.clientX);
|
|
415
415
|
}
|
|
416
416
|
pointerDownHandler(event) {
|
|
417
417
|
const x = event.clientX || event.pageX;
|
|
@@ -469,7 +469,7 @@ export class CalciteSlider {
|
|
|
469
469
|
const ticks = [];
|
|
470
470
|
let current = this.min;
|
|
471
471
|
while (this.ticks && current < this.max + this.ticks) {
|
|
472
|
-
ticks.push(current);
|
|
472
|
+
ticks.push(Math.min(current, this.max));
|
|
473
473
|
current = current + this.ticks;
|
|
474
474
|
}
|
|
475
475
|
return ticks;
|
|
@@ -482,16 +482,18 @@ export class CalciteSlider {
|
|
|
482
482
|
document.addEventListener("pointerup", this.dragEnd);
|
|
483
483
|
document.addEventListener("pointercancel", this.dragEnd);
|
|
484
484
|
}
|
|
485
|
-
focusActiveHandle() {
|
|
485
|
+
focusActiveHandle(valueX) {
|
|
486
486
|
switch (this.dragProp) {
|
|
487
|
-
default:
|
|
488
|
-
case "maxValue":
|
|
489
|
-
this.maxHandle.focus();
|
|
490
|
-
break;
|
|
491
487
|
case "minValue":
|
|
492
488
|
this.minHandle.focus();
|
|
493
489
|
break;
|
|
490
|
+
case "maxValue":
|
|
491
|
+
this.maxHandle.focus();
|
|
492
|
+
break;
|
|
494
493
|
case "minMaxValue":
|
|
494
|
+
this.getClosestHandle(valueX).focus();
|
|
495
|
+
break;
|
|
496
|
+
default:
|
|
495
497
|
break;
|
|
496
498
|
}
|
|
497
499
|
}
|
|
@@ -562,6 +564,14 @@ export class CalciteSlider {
|
|
|
562
564
|
}
|
|
563
565
|
return num;
|
|
564
566
|
}
|
|
567
|
+
getClosestHandle(valueX) {
|
|
568
|
+
return this.getDistanceX(this.maxHandle, valueX) > this.getDistanceX(this.minHandle, valueX)
|
|
569
|
+
? this.minHandle
|
|
570
|
+
: this.maxHandle;
|
|
571
|
+
}
|
|
572
|
+
getDistanceX(el, valueX) {
|
|
573
|
+
return Math.abs(el.getBoundingClientRect().left - valueX);
|
|
574
|
+
}
|
|
565
575
|
getFontSizeForElement(element) {
|
|
566
576
|
return Number(window.getComputedStyle(element).getPropertyValue("font-size").match(/\d+/)[0]);
|
|
567
577
|
}
|