@limetech/lime-elements 37.55.6 → 37.55.8
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/CHANGELOG.md +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +51 -931
- package/dist/cjs/limel-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +2498 -2498
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +86 -2
- package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +1 -1
- package/dist/collection/components/dialog/dialog.css +79 -679
- package/dist/collection/components/dialog/dialog.js +58 -62
- package/dist/collection/components/dialog/dialog.js.map +1 -1
- package/dist/esm/{_arrayIncludesWith-8fac90b7.js → _arrayIncludesWith-37fb8c3e.js} +3 -3
- package/dist/esm/{_arrayIncludesWith-8fac90b7.js.map → _arrayIncludesWith-37fb8c3e.js.map} +1 -1
- package/dist/esm/{_baseForOwn-6eb68438.js → _baseForOwn-fff53ded.js} +2 -2
- package/dist/esm/{_baseForOwn-6eb68438.js.map → _baseForOwn-fff53ded.js.map} +1 -1
- package/dist/esm/{_baseIsEqual-f751b77f.js → _baseIsEqual-f3eeaadf.js} +3 -3
- package/dist/esm/{_baseIsEqual-f751b77f.js.map → _baseIsEqual-f3eeaadf.js.map} +1 -1
- package/dist/esm/{_baseIteratee-77de5982.js → _baseIteratee-b8e533f5.js} +3 -3
- package/dist/esm/{_baseIteratee-77de5982.js.map → _baseIteratee-b8e533f5.js.map} +1 -1
- package/dist/esm/{_getAllKeysIn-f5fc1fe7.js → _getAllKeysIn-4936435d.js} +3 -3
- package/dist/esm/{_getAllKeysIn-f5fc1fe7.js.map → _getAllKeysIn-4936435d.js.map} +1 -1
- package/dist/esm/{isArrayLike-385e0f31.js → isArrayLike-dd37ba9a.js} +2 -2
- package/dist/esm/{isArrayLike-385e0f31.js.map → isArrayLike-dd37ba9a.js.map} +1 -1
- package/dist/esm/{isEmpty-3b1e5881.js → isEmpty-d700c746.js} +3 -3
- package/dist/esm/{isEmpty-3b1e5881.js.map → isEmpty-d700c746.js.map} +1 -1
- package/dist/esm/{isEqual-90c6e6fc.js → isEqual-883988f1.js} +2 -2
- package/dist/esm/{isEqual-90c6e6fc.js.map → isEqual-883988f1.js.map} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +4 -4
- package/dist/esm/limel-dialog.entry.js +51 -931
- package/dist/esm/limel-dialog.entry.js.map +1 -1
- package/dist/esm/limel-file-dropzone_2.entry.js +4 -4
- package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js.map +1 -1
- package/dist/esm/limel-form.entry.js +2507 -2507
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +4 -4
- package/dist/esm/limel-slider.entry.js +85 -1
- package/dist/esm/limel-slider.entry.js.map +1 -1
- package/dist/esm/limel-tab-bar.entry.js +4 -4
- package/dist/esm/limel-table.entry.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pickBy-7b1558ef.js → pickBy-923628c8.js} +4 -4
- package/dist/esm/{pickBy-7b1558ef.js.map → pickBy-923628c8.js.map} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-efe6d8b9.entry.js → p-11bc6383.entry.js} +3 -3
- package/dist/lime-elements/{p-efe6d8b9.entry.js.map → p-11bc6383.entry.js.map} +1 -1
- package/dist/lime-elements/{p-f1d08f33.entry.js → p-33733088.entry.js} +2 -2
- package/dist/lime-elements/p-3d88b583.js +2 -0
- package/dist/lime-elements/p-57906760.js +2 -0
- package/dist/lime-elements/{p-a28fa78d.js.map → p-57906760.js.map} +1 -1
- package/dist/lime-elements/p-69b694b5.js +2 -0
- package/dist/lime-elements/{p-038bd215.js.map → p-69b694b5.js.map} +1 -1
- package/dist/lime-elements/p-6a3d0141.js +2 -0
- package/dist/lime-elements/p-7377db39.js +2 -0
- package/dist/lime-elements/{p-2b06f854.entry.js → p-75b4a7aa.entry.js} +2 -2
- package/dist/lime-elements/p-785755e9.js +2 -0
- package/dist/lime-elements/{p-0ec8eec7.js.map → p-785755e9.js.map} +1 -1
- package/dist/lime-elements/{p-9acf7b5d.js → p-7f43b0c4.js} +2 -2
- package/dist/lime-elements/{p-347c1107.entry.js → p-82af91ed.entry.js} +2 -2
- package/dist/lime-elements/p-836774a8.js +2 -0
- package/dist/lime-elements/p-9b51660b.entry.js +21 -0
- package/dist/lime-elements/p-9b51660b.entry.js.map +1 -0
- package/dist/lime-elements/p-b11ab47e.entry.js +2 -0
- package/dist/lime-elements/p-b11ab47e.entry.js.map +1 -0
- package/dist/lime-elements/{p-9375145d.entry.js → p-d505de95.entry.js} +27 -5
- package/dist/lime-elements/p-d505de95.entry.js.map +1 -0
- package/dist/lime-elements/{p-178bbeb4.entry.js → p-e53fae23.entry.js} +2 -2
- package/dist/lime-elements/{p-1b9d3851.js → p-f069e11f.js} +2 -2
- package/dist/lime-elements/{p-36b385b2.entry.js → p-f629e2bf.entry.js} +2 -2
- package/dist/types/components/dialog/dialog.d.ts +5 -8
- package/package.json +2 -2
- package/dist/cjs/animationframe-e4c1798e.js +0 -90
- package/dist/cjs/animationframe-e4c1798e.js.map +0 -1
- package/dist/esm/animationframe-b52af02d.js +0 -88
- package/dist/esm/animationframe-b52af02d.js.map +0 -1
- package/dist/lime-elements/p-038bd215.js +0 -2
- package/dist/lime-elements/p-0ec8eec7.js +0 -2
- package/dist/lime-elements/p-22704cbc.js +0 -2
- package/dist/lime-elements/p-48105d44.js +0 -24
- package/dist/lime-elements/p-48105d44.js.map +0 -1
- package/dist/lime-elements/p-48ef6a20.js +0 -2
- package/dist/lime-elements/p-50303eb1.entry.js +0 -21
- package/dist/lime-elements/p-50303eb1.entry.js.map +0 -1
- package/dist/lime-elements/p-9375145d.entry.js.map +0 -1
- package/dist/lime-elements/p-a28fa78d.js +0 -2
- package/dist/lime-elements/p-adf6cbe8.entry.js +0 -112
- package/dist/lime-elements/p-adf6cbe8.entry.js.map +0 -1
- package/dist/lime-elements/p-d0bdb2e3.js +0 -2
- package/dist/lime-elements/p-d4029e33.js +0 -2
- /package/dist/lime-elements/{p-f1d08f33.entry.js.map → p-33733088.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-48ef6a20.js.map → p-3d88b583.js.map} +0 -0
- /package/dist/lime-elements/{p-d4029e33.js.map → p-6a3d0141.js.map} +0 -0
- /package/dist/lime-elements/{p-d0bdb2e3.js.map → p-7377db39.js.map} +0 -0
- /package/dist/lime-elements/{p-2b06f854.entry.js.map → p-75b4a7aa.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-9acf7b5d.js.map → p-7f43b0c4.js.map} +0 -0
- /package/dist/lime-elements/{p-347c1107.entry.js.map → p-82af91ed.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-22704cbc.js.map → p-836774a8.js.map} +0 -0
- /package/dist/lime-elements/{p-178bbeb4.entry.js.map → p-e53fae23.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-1b9d3851.js.map → p-f069e11f.js.map} +0 -0
- /package/dist/lime-elements/{p-36b385b2.entry.js.map → p-f629e2bf.entry.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as n,h as t,g as o}from"./p-443111b3.js";import{c as a}from"./p-3ccdc4a3.js";const i="@charset \"UTF-8\";\n/**\n * Note! This file is exported to `dist/scss/` in the published\n * node module, for consumer projects to import.\n * That means this file cannot import from any file that isn't\n * also exported, keeping the same relative path.\n *\n * Or, just don't import anything, that works too.\n */\n/**\n* This can be used on a trigger element that opens a dropdown menu or a popover.\n*/\n/**\n * This mixin will mask out the content that is close to\n * the edges of a scrollable area.\n * - If the scrollable content has `overflow-y`, use `vertically`\n * as an argument for `$direction`.\n - If the scrollable content has `overflow-x`, use `horizontally`\n * as an argument for `$direction`.\n *\n * For the visual effect to work smoothly, we need to make sure that\n * the size of the fade-out edge effect is the same as the\n * internal paddings of the scrollable area. Otherwise, content of a\n * scrollable area that does not have a padding will fade out before\n * any scrolling has been done.\n * This is why this mixin already adds paddings, which automatically\n * default to the size of the fade-out effect.\n * This size defaults to `1rem`, but to override the size use\n * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`\n * when `vertically` argument is set, and use\n * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`\n * when `horizontally` argument is set.\n * Of course you can also programmatically increase and decrease the\n * size of these variables for each edge, based on the amount of\n * scrolling that has been done by the user. In this case, make sure\n * to add a custom padding where the mixin is used, to override\n * the paddings that are automatically added by the mixin in the\n * compiled CSS code.\n */\n/**\n* This mixin will add an animated underline to the bottom of an `a` elements.\n* Note that you may need to add `all: unset;` –depending on your use case–\n* before using this mixin.\n*/\n/**\n* This mixin creates a cross-browser font stack.\n* - `sans-serif` can be used for the UI of the components.\n* - `monospace` can be used for code.\n*\n* ⚠️ If we change the font stacks, we need to update\n* 1. the consumer documentation in `README.md`, and\n* 2. the CSS variables of `--kompendium-example-font-family`\n* in the `<style>` tag of `index.html`.\n*/\n/**\n * @prop --dialog-width: Width of the dialog.\n * @prop --dialog-max-width: Max width of the dialog.\n * @prop --dialog-height: Height of the dialog.\n * @prop --dialog-max-height: Max height of the dialog.\n * @prop --dialog-padding-top-bottom: Padding on top and bottom of dialog content. Affects the height of fade-out effects on top and bottom edges when the content is scrollable and has overflowed out of the content area. Defaults to `1.5rem`. Note that if you use this variable and set it to numbers smaller than 1rem, you will loose the fade-out effects on the edges. If you have set these paddings to `0`, losing the fade out effects should be however fine for your use case! Because in such a case your intention is to handle the `overflow` internally in the component that is displayed in the dialog's content.\n * @prop --dialog-padding-left-right: Padding on the sides of dialog content. Defaults to `1.25rem`.\n * @prop --dialog-heading-title-color: Color of the title.\n * @prop --dialog-heading-subtitle-color: Color of the subtitle.\n * @prop --dialog-heading-supporting-text-color: Color of the supporting text.\n * @prop --dialog-heading-icon-color: Color of the icon.\n * @prop --dialog-heading-icon-background-color: Background color of the icon when displayed as a badge.\n */\n:host(limel-dialog) {\n --limel-dialog-border-radius: 0.75rem;\n --header-heading-color: var(--dialog-heading-title-color);\n --header-subheading-color: var(--dialog-heading-subtitle-color);\n --header-supporting-text-color: var(--dialog-heading-supporting-text-color);\n --header-icon-color: var(--dialog-heading-icon-color);\n --header-icon-background-color: var(--dialog-heading-icon-background-color);\n}\n\n* {\n box-sizing: border-box;\n}\n\ndialog {\n border: none;\n outline: none;\n padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);\n border-radius: var(--limel-dialog-border-radius);\n width: var(--dialog-width, fit-content);\n height: var(--dialog-height, fit-content);\n max-width: var(--dialog-max-width, calc(100vw - 1rem));\n max-height: var(--dialog-max-height, calc(100% - 1rem));\n background-color: transparent;\n box-shadow: var(--shadow-depth-8), var(--shadow-depth-64);\n}\ndialog.fullscreen {\n --dialog-width: 100%;\n --dialog-height: 100%;\n width: 100%;\n height: 100%;\n}\n\n.surface {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n border-radius: var(--limel-dialog-border-radius);\n background-color: var(--lime-elevated-surface-background-color);\n}\n\n.content {\n flex-grow: 1;\n overflow-y: auto;\n --limel-top-edge-fade-height: var(--dialog-padding-top-bottom, 1.5rem);\n --limel-bottom-edge-fade-height: var(--dialog-padding-top-bottom, 1.5rem);\n --limel-overflow-mask-vertical: linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );\n -webkit-mask-image: var(--limel-overflow-mask-vertical);\n mask-image: var(--limel-overflow-mask-vertical);\n padding-top: var(--limel-top-edge-fade-height, 1rem);\n padding-bottom: var(--limel-bottom-edge-fade-height, 1rem);\n color: var(--mdc-theme-on-surface);\n padding-left: var(--dialog-padding-left-right, min(1.25rem, 3vw));\n padding-right: var(--dialog-padding-left-right, min(1.25rem, 3vw));\n}\n\nlimel-header,\n.actions {\n flex-shrink: 0;\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-height: 52px;\n margin: 0px;\n padding: 8px;\n border-top: 1px solid transparent;\n}\n\nslot[name=header] {\n display: none;\n}\n\nslot[name=button] {\n display: flex;\n gap: 0.5rem;\n width: 100%;\n justify-content: flex-end;\n}\n\n@media screen and (max-width: 760px) {\n slot[name=button] {\n flex-direction: column-reverse;\n }\n .mdc-dialog__actions {\n padding: min(1.5rem, 3vw);\n padding-top: 1rem;\n }\n}\ndialog {\n --limel-dialog-display-speed: 0.2s;\n transition: opacity 0.2s ease, display var(--limel-dialog-display-speed) ease, transform var(--limel-dialog-display-speed) ease;\n transition-behavior: allow-discrete;\n opacity: 0;\n transform: translate3d(0, 1rem, 0);\n}\ndialog::backdrop {\n transition: background-color 0.6s ease;\n transition-behavior: allow-discrete;\n background-color: rgb(var(--color-black), 0);\n}\ndialog[open] {\n --limel-dialog-display-speed: 0.4s;\n opacity: 1;\n transform: translate3d(0, 0, 0) scale(1);\n}\n@starting-style {\n dialog[open] {\n opacity: 0;\n transform: translate3d(0, -1rem, 0) scale(0.9);\n }\n}\ndialog[open]::backdrop {\n transition-delay: var(--limel-dialog-display-speed);\n background-color: rgb(var(--color-black), 0.4);\n}\n@starting-style {\n dialog[open]::backdrop {\n background-color: rgb(var(--color-black), 0);\n }\n}\n\ndialog {\n position: fixed;\n inset: 0;\n}";const r=class{constructor(t){e(this,t);this.close=n(this,"close",7);this.closing=n(this,"closing",7);this.showFooter=true;this.handleCancel=e=>{if(!this.closingActions.escapeKey&&e.cancelable){e.preventDefault();return}this.closeDialog()};this.heading=undefined;this.fullscreen=false;this.open=false;this.closingActions={escapeKey:true,scrimClick:true}}connectedCallback(){this.initialize()}componentWillLoad(){this.id=a();this.showFooter=!!this.host.querySelector('[slot="button"]')}componentDidLoad(){this.initialize()}initialize(){if(!this.dialog){return}if(this.open){this.dialog.showModal()}}handleClick(e){if(!this.closingActions.scrimClick){return}const n=this.dialog.getBoundingClientRect();const t=n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width;if(!t){this.closeDialog()}}closeDialog(){if(!this.open){return}const e=this.closing.emit();if(e.defaultPrevented){return}this.close.emit();this.open=false}render(){return t("dialog",Object.assign({class:{fullscreen:!!this.fullscreen}},this.getDialogAttributes(this.open,this.id),{onCancel:this.handleCancel}),t("div",{class:"surface"},this.renderHeading(),t("div",{class:"content",id:"limel-dialog-content-"+this.id},t("slot",null)),this.renderFooter()))}watchHandler(e,n){if(n===e){return}if(e){this.dialog.showModal()}else{this.dialog.close()}}getDialogAttributes(e,n){if(e){return{role:"alertdialog","aria-modal":"true","aria-labelledby":"limel-dialog-title-"+n,"aria-describedby":"limel-dialog-content-"+n}}return{}}isBadgeHeading(e){return typeof e==="object"&&!!e.title&&!!e.icon}renderHeading(){if(this.isBadgeHeading(this.heading)){const{title:e,subtitle:n,supportingText:o,icon:a}=this.heading;return t("limel-header",{icon:a,heading:e,subheading:n,supportingText:o},t("slot",{name:"header-actions",slot:"actions"}))}else if(typeof this.heading==="string"){return t("limel-header",{heading:this.heading})}return null}renderFooter(){if(this.showFooter){return t("footer",{class:"actions"},t("slot",{name:"button"}))}}get dialog(){return this.host.shadowRoot.querySelector("dialog")}get host(){return o(this)}static get watchers(){return{open:["watchHandler"]}}};r.style=i;export{r as limel_dialog};
|
|
2
|
+
//# sourceMappingURL=p-b11ab47e.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dialogCss","Dialog","this","showFooter","handleCancel","event","closingActions","escapeKey","cancelable","preventDefault","closeDialog","scrimClick","connectedCallback","initialize","componentWillLoad","id","createRandomString","host","querySelector","componentDidLoad","dialog","open","showModal","handleClick","rect","getBoundingClientRect","clickedInDialog","top","clientY","height","left","clientX","width","closing","emit","defaultPrevented","close","render","h","Object","assign","class","fullscreen","getDialogAttributes","onCancel","renderHeading","renderFooter","watchHandler","newValue","oldValue","isOpen","role","isBadgeHeading","heading","title","icon","subtitle","supportingText","subheading","name","slot","shadowRoot"],"sources":["./src/components/dialog/dialog.scss?tag=limel-dialog&encapsulation=shadow","./src/components/dialog/dialog.tsx"],"sourcesContent":["@use '../../style/mixins';\n\n/**\n * @prop --dialog-width: Width of the dialog.\n * @prop --dialog-max-width: Max width of the dialog.\n * @prop --dialog-height: Height of the dialog.\n * @prop --dialog-max-height: Max height of the dialog.\n * @prop --dialog-padding-top-bottom: Padding on top and bottom of dialog content. Affects the height of fade-out effects on top and bottom edges when the content is scrollable and has overflowed out of the content area. Defaults to `1.5rem`. Note that if you use this variable and set it to numbers smaller than 1rem, you will loose the fade-out effects on the edges. If you have set these paddings to `0`, losing the fade out effects should be however fine for your use case! Because in such a case your intention is to handle the `overflow` internally in the component that is displayed in the dialog's content.\n * @prop --dialog-padding-left-right: Padding on the sides of dialog content. Defaults to `1.25rem`.\n * @prop --dialog-heading-title-color: Color of the title.\n * @prop --dialog-heading-subtitle-color: Color of the subtitle.\n * @prop --dialog-heading-supporting-text-color: Color of the supporting text.\n * @prop --dialog-heading-icon-color: Color of the icon.\n * @prop --dialog-heading-icon-background-color: Background color of the icon when displayed as a badge.\n */\n\n:host(limel-dialog) {\n --limel-dialog-border-radius: 0.75rem;\n --header-heading-color: var(--dialog-heading-title-color);\n --header-subheading-color: var(--dialog-heading-subtitle-color);\n --header-supporting-text-color: var(--dialog-heading-supporting-text-color);\n --header-icon-color: var(--dialog-heading-icon-color);\n --header-icon-background-color: var(--dialog-heading-icon-background-color);\n}\n\n* {\n box-sizing: border-box;\n}\n\n$responsive-body-padding: 3vw;\n\ndialog {\n border: none;\n outline: none;\n\n padding: env(safe-area-inset-top) env(safe-area-inset-right)\n env(safe-area-inset-bottom) env(safe-area-inset-left);\n border-radius: var(--limel-dialog-border-radius);\n\n width: var(--dialog-width, fit-content);\n height: var(--dialog-height, fit-content);\n\n max-width: var(--dialog-max-width, calc(100vw - 1rem));\n max-height: var(--dialog-max-height, calc(100% - 1rem));\n\n background-color: transparent;\n box-shadow: var(--shadow-depth-8), var(--shadow-depth-64);\n\n &.fullscreen {\n --dialog-width: 100%;\n --dialog-height: 100%;\n width: 100%;\n height: 100%;\n }\n}\n\n.surface {\n display: flex;\n flex-direction: column;\n\n height: 100%;\n width: 100%;\n\n border-radius: var(--limel-dialog-border-radius);\n background-color: var(--lime-elevated-surface-background-color);\n}\n\n.content {\n flex-grow: 1;\n overflow-y: auto;\n\n --limel-top-edge-fade-height: var(--dialog-padding-top-bottom, 1.5rem);\n --limel-bottom-edge-fade-height: var(--dialog-padding-top-bottom, 1.5rem);\n @include mixins.fade-out-overflowed-content-on-edges(vertically);\n\n color: var(--mdc-theme-on-surface);\n padding-left: var(\n --dialog-padding-left-right,\n min(1.25rem, $responsive-body-padding)\n );\n padding-right: var(\n --dialog-padding-left-right,\n min(1.25rem, $responsive-body-padding)\n );\n}\n\nlimel-header,\n.actions {\n flex-shrink: 0;\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-height: 52px;\n margin: 0px;\n padding: 8px;\n border-top: 1px solid transparent;\n}\n\nslot[name='header'] {\n display: none;\n}\n\nslot[name='button'] {\n display: flex;\n gap: 0.5rem;\n width: 100%;\n justify-content: flex-end;\n}\n\n@media screen and (max-width: 760px) {\n slot[name='button'] {\n flex-direction: column-reverse;\n }\n .mdc-dialog__actions {\n padding: min(1.5rem, $responsive-body-padding);\n padding-top: 1rem;\n }\n}\n\n@import './partial-styles/show-hide-animations.scss';\n","import { DialogHeading, ClosingActions } from './dialog.types';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\n\n/**\n * :::note\n * Regarding the `close` event: When putting other elements that emit `close`\n * events inside a dialog, those events must be caught and stopped inside the\n * dialog. If not, they will bubble to the event handler listening for `close`\n * events on the dialog, which will close the dialog too.\n *\n * See the example _Nested `close` events_.\n * :::\n *\n * :::important\n * Are you developing for\n * [Lime CRM](https://www.lime-technologies.com/en/lime-crm/)? Please note that\n * you should use the [DialogRenderer](https://lundalogik.github.io/lime-web-components/versions/latest/interfaces/DialogRenderer.html)\n * from Lime Web Components to open dialogs in Lime CRM.\n * :::\n *\n * @exampleComponent limel-example-dialog\n * @exampleComponent limel-example-dialog-nested-close-events\n * @exampleComponent limel-example-dialog-heading\n * @exampleComponent limel-example-dialog-heading-actions\n * @exampleComponent limel-example-dialog-form\n * @exampleComponent limel-example-dialog-size\n * @exampleComponent limel-example-dialog-fullscreen\n * @exampleComponent limel-example-dialog-closing-actions\n * @exampleComponent limel-example-dialog-action-buttons\n * @slot - Content to put inside the dialog\n * @slot header-actions - The dialog header buttons\n * @slot button - The dialog buttons\n */\n@Component({\n tag: 'limel-dialog',\n shadow: true,\n styleUrl: 'dialog.scss',\n})\nexport class Dialog {\n /**\n * The heading for the dialog, if any.\n */\n @Prop()\n public heading: string | DialogHeading;\n\n /**\n * Set to `true` to make the dialog \"fullscreen\".\n */\n @Prop({ reflect: true })\n public fullscreen = false;\n\n /**\n * `true` if the dialog is open, `false` otherwise.\n */\n @Prop({ mutable: true, reflect: true })\n public open = false;\n\n /**\n * Defines which action triggers a close-event.\n */\n @Prop({ reflect: true })\n public closingActions: ClosingActions = {\n escapeKey: true,\n scrimClick: true,\n };\n /**\n * Emitted when the dialog is closed from inside the component.\n * (*Not* emitted when the consumer sets the `open`-property to `false`.)\n */\n @Event()\n private close: EventEmitter<void>;\n\n /**\n * Emitted when the dialog is in the process of being closed.\n */\n @Event()\n private closing: EventEmitter<void>;\n\n @Element()\n private host: HTMLLimelDialogElement;\n\n private id: string;\n\n private showFooter = true;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n this.id = createRandomString();\n this.showFooter = !!this.host.querySelector('[slot=\"button\"]');\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n if (!this.dialog) {\n return;\n }\n\n if (this.open) {\n this.dialog.showModal();\n }\n }\n\n @Listen('click')\n protected handleClick(event: MouseEvent) {\n if (!this.closingActions.scrimClick) {\n return;\n }\n\n const rect = this.dialog.getBoundingClientRect();\n const clickedInDialog =\n rect.top <= event.clientY &&\n event.clientY <= rect.top + rect.height &&\n rect.left <= event.clientX &&\n event.clientX <= rect.left + rect.width;\n\n if (!clickedInDialog) {\n this.closeDialog();\n }\n }\n\n private handleCancel = (event: Event) => {\n if (!this.closingActions.escapeKey && event.cancelable) {\n event.preventDefault();\n\n return;\n }\n\n this.closeDialog();\n };\n\n private closeDialog() {\n if (!this.open) {\n return;\n }\n\n const event = this.closing.emit();\n if (event.defaultPrevented) {\n return;\n }\n\n this.close.emit();\n this.open = false;\n }\n\n public render() {\n return (\n <dialog\n class={{\n fullscreen: !!this.fullscreen,\n }}\n {...this.getDialogAttributes(this.open, this.id)}\n onCancel={this.handleCancel}\n >\n <div class=\"surface\">\n {this.renderHeading()}\n <div class=\"content\" id={'limel-dialog-content-' + this.id}>\n <slot />\n </div>\n {this.renderFooter()}\n </div>\n </dialog>\n );\n }\n\n @Watch('open')\n protected watchHandler(newValue: boolean, oldValue: boolean) {\n if (oldValue === newValue) {\n return;\n }\n\n if (newValue) {\n this.dialog.showModal();\n } else {\n this.dialog.close();\n }\n }\n\n private getDialogAttributes(isOpen, id) {\n if (isOpen) {\n return {\n role: 'alertdialog',\n 'aria-modal': 'true',\n 'aria-labelledby': 'limel-dialog-title-' + id,\n 'aria-describedby': 'limel-dialog-content-' + id,\n };\n }\n\n return {};\n }\n\n private isBadgeHeading(\n heading: string | DialogHeading,\n ): heading is DialogHeading {\n return typeof heading === 'object' && !!heading.title && !!heading.icon;\n }\n\n private renderHeading() {\n if (this.isBadgeHeading(this.heading)) {\n const { title, subtitle, supportingText, icon } = this.heading;\n\n return (\n <limel-header\n icon={icon}\n heading={title}\n subheading={subtitle}\n supportingText={supportingText}\n >\n <slot name=\"header-actions\" slot=\"actions\" />\n </limel-header>\n );\n } else if (typeof this.heading === 'string') {\n return <limel-header heading={this.heading} />;\n }\n\n return null;\n }\n\n private renderFooter() {\n if (this.showFooter) {\n return (\n <footer class=\"actions\">\n <slot name=\"button\" />\n </footer>\n );\n }\n }\n\n private get dialog() {\n return this.host.shadowRoot.querySelector('dialog');\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAY,utO,MCgDLC,EAAM,M,uFA6CPC,KAAAC,WAAa,KA2CbD,KAAAE,aAAgBC,IACpB,IAAKH,KAAKI,eAAeC,WAAaF,EAAMG,WAAY,CACpDH,EAAMI,iBAEN,M,CAGJP,KAAKQ,aAAa,E,uCApFF,M,UAMN,M,oBAM0B,CACpCH,UAAW,KACXI,WAAY,K,CAsBTC,oBACHV,KAAKW,Y,CAGFC,oBACHZ,KAAKa,GAAKC,IACVd,KAAKC,aAAeD,KAAKe,KAAKC,cAAc,kB,CAGzCC,mBACHjB,KAAKW,Y,CAGDA,aACJ,IAAKX,KAAKkB,OAAQ,CACd,M,CAGJ,GAAIlB,KAAKmB,KAAM,CACXnB,KAAKkB,OAAOE,W,EAKVC,YAAYlB,GAClB,IAAKH,KAAKI,eAAeK,WAAY,CACjC,M,CAGJ,MAAMa,EAAOtB,KAAKkB,OAAOK,wBACzB,MAAMC,EACFF,EAAKG,KAAOtB,EAAMuB,SAClBvB,EAAMuB,SAAWJ,EAAKG,IAAMH,EAAKK,QACjCL,EAAKM,MAAQzB,EAAM0B,SACnB1B,EAAM0B,SAAWP,EAAKM,KAAON,EAAKQ,MAEtC,IAAKN,EAAiB,CAClBxB,KAAKQ,a,EAcLA,cACJ,IAAKR,KAAKmB,KAAM,CACZ,M,CAGJ,MAAMhB,EAAQH,KAAK+B,QAAQC,OAC3B,GAAI7B,EAAM8B,iBAAkB,CACxB,M,CAGJjC,KAAKkC,MAAMF,OACXhC,KAAKmB,KAAO,K,CAGTgB,SACH,OACIC,EAAA,SAAAC,OAAAC,OAAA,CACIC,MAAO,CACHC,aAAcxC,KAAKwC,aAEnBxC,KAAKyC,oBAAoBzC,KAAKmB,KAAMnB,KAAKa,IAAG,CAChD6B,SAAU1C,KAAKE,eAEfkC,EAAA,OAAKG,MAAM,WACNvC,KAAK2C,gBACNP,EAAA,OAAKG,MAAM,UAAU1B,GAAI,wBAA0Bb,KAAKa,IACpDuB,EAAA,cAEHpC,KAAK4C,gB,CAOZC,aAAaC,EAAmBC,GACtC,GAAIA,IAAaD,EAAU,CACvB,M,CAGJ,GAAIA,EAAU,CACV9C,KAAKkB,OAAOE,W,KACT,CACHpB,KAAKkB,OAAOgB,O,EAIZO,oBAAoBO,EAAQnC,GAChC,GAAImC,EAAQ,CACR,MAAO,CACHC,KAAM,cACN,aAAc,OACd,kBAAmB,sBAAwBpC,EAC3C,mBAAoB,wBAA0BA,E,CAItD,MAAO,E,CAGHqC,eACJC,GAEA,cAAcA,IAAY,YAAcA,EAAQC,SAAWD,EAAQE,I,CAG/DV,gBACJ,GAAI3C,KAAKkD,eAAelD,KAAKmD,SAAU,CACnC,MAAMC,MAAEA,EAAKE,SAAEA,EAAQC,eAAEA,EAAcF,KAAEA,GAASrD,KAAKmD,QAEvD,OACIf,EAAA,gBACIiB,KAAMA,EACNF,QAASC,EACTI,WAAYF,EACZC,eAAgBA,GAEhBnB,EAAA,QAAMqB,KAAK,iBAAiBC,KAAK,Y,MAGtC,UAAW1D,KAAKmD,UAAY,SAAU,CACzC,OAAOf,EAAA,gBAAce,QAASnD,KAAKmD,S,CAGvC,OAAO,I,CAGHP,eACJ,GAAI5C,KAAKC,WAAY,CACjB,OACImC,EAAA,UAAQG,MAAM,WACVH,EAAA,QAAMqB,KAAK,W,EAMfvC,aACR,OAAOlB,KAAKe,KAAK4C,WAAW3C,cAAc,S"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as
|
|
1
|
+
import{r as t,c as i,h as e,H as r,g as s}from"./p-443111b3.js";import{c as n}from"./p-3ccdc4a3.js";import{_ as o,a,M as d,b as c}from"./p-2ff3f85e.js";import{M as l,a as h,b as m}from"./p-11d5d44e.js";import{m as u}from"./p-dcc97cc2.js";import{g as f}from"./p-9faad6eb.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2020 Google Inc.
|
|
@@ -20,7 +20,29 @@ import{r as t,c as e,h as i,H as r,g as s}from"./p-443111b3.js";import{c as n}fr
|
|
|
20
20
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
22
|
* THE SOFTWARE.
|
|
23
|
-
*/var
|
|
23
|
+
*/var p={DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",INPUT:"mdc-slider__input",RANGE:"mdc-slider--range",THUMB:"mdc-slider__thumb",THUMB_FOCUSED:"mdc-slider__thumb--focused",THUMB_KNOB:"mdc-slider__thumb-knob",THUMB_TOP:"mdc-slider__thumb--top",THUMB_WITH_INDICATOR:"mdc-slider__thumb--with-indicator",TICK_MARKS:"mdc-slider--tick-marks",TICK_MARKS_CONTAINER:"mdc-slider__tick-marks",TICK_MARK_ACTIVE:"mdc-slider__tick-mark--active",TICK_MARK_INACTIVE:"mdc-slider__tick-mark--inactive",TRACK:"mdc-slider__track",TRACK_ACTIVE:"mdc-slider__track--active_fill",VALUE_INDICATOR_TEXT:"mdc-slider__value-indicator-text"};var b={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5};var v={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"};var _={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2020 Google Inc.
|
|
27
|
+
*
|
|
28
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
29
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
30
|
+
* in the Software without restriction, including without limitation the rights
|
|
31
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
32
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
33
|
+
* furnished to do so, subject to the following conditions:
|
|
34
|
+
*
|
|
35
|
+
* The above copyright notice and this permission notice shall be included in
|
|
36
|
+
* all copies or substantial portions of the Software.
|
|
37
|
+
*
|
|
38
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
39
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
40
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
41
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
42
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
44
|
+
* THE SOFTWARE.
|
|
45
|
+
*/var g=function(){function t(){this.rafIDs=new Map}t.prototype.request=function(t,i){var e=this;this.cancel(t);var r=requestAnimationFrame((function(r){e.rafIDs.delete(t);i(r)}));this.rafIDs.set(t,r)};t.prototype.cancel=function(t){var i=this.rafIDs.get(t);if(i){cancelAnimationFrame(i);this.rafIDs.delete(t)}};t.prototype.cancelAll=function(){var t=this;this.rafIDs.forEach((function(i,e){t.cancel(e)}))};t.prototype.getQueue=function(){var t=[];this.rafIDs.forEach((function(i,e){t.push(e)}));return t};return t}();
|
|
24
46
|
/**
|
|
25
47
|
* @license
|
|
26
48
|
* Copyright 2020 Google Inc.
|
|
@@ -64,7 +86,7 @@ import{r as t,c as e,h as i,H as r,g as s}from"./p-443111b3.js";import{c as n}fr
|
|
|
64
86
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
65
87
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
66
88
|
* THE SOFTWARE.
|
|
67
|
-
*/var x;(function(t){t["SLIDER_UPDATE"]="slider_update"})(x||(x={}));var w=typeof window!=="undefined";var E=function(t){o(e,t);function e(i){var r=t.call(this,d(d({},e.defaultAdapter),i))||this;r.initialStylesRemoved=false;r.isDisabled=false;r.isDiscrete=false;r.step=v.STEP_SIZE;r.hasTickMarks=false;r.isRange=false;r.thumb=null;r.downEventClientX=null;r.startThumbKnobWidth=0;r.endThumbKnobWidth=0;r.animFrame=new f;return r}Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return false},addClass:function(){return undefined},removeClass:function(){return undefined},addThumbClass:function(){return undefined},removeThumbClass:function(){return undefined},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){return undefined},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){return undefined},isInputFocused:function(){return false},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return false},setThumbStyleProperty:function(){return undefined},removeThumbStyleProperty:function(){return undefined},setTrackActiveStyleProperty:function(){return undefined},removeTrackActiveStyleProperty:function(){return undefined},setValueIndicatorText:function(){return undefined},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){return undefined},setPointerCapture:function(){return undefined},emitChangeEvent:function(){return undefined},emitInputEvent:function(){return undefined},emitDragStartEvent:function(){return undefined},emitDragEndEvent:function(){return undefined},registerEventHandler:function(){return undefined},deregisterEventHandler:function(){return undefined},registerThumbEventHandler:function(){return undefined},deregisterThumbEventHandler:function(){return undefined},registerInputEventHandler:function(){return undefined},deregisterInputEventHandler:function(){return undefined},registerBodyEventHandler:function(){return undefined},deregisterBodyEventHandler:function(){return undefined},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});e.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(b.DISABLED);this.isDiscrete=this.adapter.hasClass(b.DISCRETE);this.hasTickMarks=this.adapter.hasClass(b.TICK_MARKS);this.isRange=this.adapter.hasClass(b.RANGE);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_MIN,this.isRange?k.START:k.END),_.INPUT_MIN);var i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_MAX,k.END),_.INPUT_MAX);var r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_VALUE,k.END),_.INPUT_VALUE);var s=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_VALUE,k.START),_.INPUT_VALUE):e;var n=this.adapter.getInputAttribute(_.INPUT_STEP,k.END);var o=n?this.convertAttributeValueToNumber(n,_.INPUT_STEP):this.step;this.validateProperties({min:e,max:i,value:r,valueStart:s,step:o});this.min=e;this.max=i;this.value=r;this.valueStart=s;this.step=o;this.numDecimalPlaces=C(this.step);this.valueBeforeDownEvent=r;this.valueStartBeforeDownEvent=s;this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this);this.moveListener=this.handleMove.bind(this);this.pointerdownListener=this.handlePointerdown.bind(this);this.pointerupListener=this.handlePointerup.bind(this);this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this);this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this);this.inputStartChangeListener=function(){t.handleInputChange(k.START)};this.inputEndChangeListener=function(){t.handleInputChange(k.END)};this.inputStartFocusListener=function(){t.handleInputFocus(k.START)};this.inputEndFocusListener=function(){t.handleInputFocus(k.END)};this.inputStartBlurListener=function(){t.handleInputBlur(k.START)};this.inputEndBlurListener=function(){t.handleInputBlur(k.END)};this.resizeListener=this.handleResize.bind(this);this.registerEventHandlers()};e.prototype.destroy=function(){this.deregisterEventHandlers()};e.prototype.setMin=function(t){this.min=t;if(!this.isRange){this.valueStart=t}this.updateUI()};e.prototype.setMax=function(t){this.max=t;this.updateUI()};e.prototype.getMin=function(){return this.min};e.prototype.getMax=function(){return this.max};e.prototype.getValue=function(){return this.value};e.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart){throw new Error("end thumb value ("+t+") must be >= start thumb "+("value ("+this.valueStart+")"))}this.updateValue(t,k.END)};e.prototype.getValueStart=function(){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}return this.valueStart};e.prototype.setValueStart=function(t){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}if(this.isRange&&t>this.value){throw new Error("start thumb value ("+t+") must be <= end thumb "+("value ("+this.value+")"))}this.updateValue(t,k.START)};e.prototype.setStep=function(t){this.step=t;this.numDecimalPlaces=C(t);this.updateUI()};e.prototype.setIsDiscrete=function(t){this.isDiscrete=t;this.updateValueIndicatorUI();this.updateTickMarksUI()};e.prototype.getStep=function(){return this.step};e.prototype.setHasTickMarks=function(t){this.hasTickMarks=t;this.updateTickMarksUI()};e.prototype.getDisabled=function(){return this.isDisabled};e.prototype.setDisabled=function(t){this.isDisabled=t;if(t){this.adapter.addClass(b.DISABLED);if(this.isRange){this.adapter.setInputAttribute(_.INPUT_DISABLED,"",k.START)}this.adapter.setInputAttribute(_.INPUT_DISABLED,"",k.END)}else{this.adapter.removeClass(b.DISABLED);if(this.isRange){this.adapter.removeInputAttribute(_.INPUT_DISABLED,k.START)}this.adapter.removeInputAttribute(_.INPUT_DISABLED,k.END)}};e.prototype.getIsRange=function(){return this.isRange};e.prototype.layout=function(t){var e=t===void 0?{}:t,i=e.skipUpdateUI;this.rect=this.adapter.getBoundingClientRect();if(this.isRange){this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(k.START);this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(k.END)}if(!i){this.updateUI()}};e.prototype.handleResize=function(){this.layout()};e.prototype.handleDown=function(t){if(this.isDisabled)return;this.valueStartBeforeDownEvent=this.valueStart;this.valueBeforeDownEvent=this.value;var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=e;var i=this.mapClientXOnSliderScale(e);this.thumb=this.getThumbFromDownEvent(e,i);if(this.thumb===null)return;this.handleDragStart(t,i,this.thumb);this.updateValue(i,this.thumb,{emitInputEvent:true})};e.prototype.handleMove=function(t){if(this.isDisabled)return;t.preventDefault();var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;var i=this.thumb!=null;this.thumb=this.getThumbFromMoveEvent(e);if(this.thumb===null)return;var r=this.mapClientXOnSliderScale(e);if(!i){this.handleDragStart(t,r,this.thumb);this.adapter.emitDragStartEvent(r,this.thumb)}this.updateValue(r,this.thumb,{emitInputEvent:true})};e.prototype.handleUp=function(){if(this.isDisabled||this.thumb===null)return;var t=this.thumb===k.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent;var e=this.thumb===k.START?this.valueStart:this.value;if(t!==e){this.adapter.emitChangeEvent(e,this.thumb)}this.adapter.emitDragEndEvent(e,this.thumb);this.thumb=null};e.prototype.handleThumbMouseenter=function(){if(!this.isDiscrete||!this.isRange)return;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,k.START);this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,k.END)};e.prototype.handleThumbMouseleave=function(){if(!this.isDiscrete||!this.isRange)return;if(this.adapter.isInputFocused(k.START)||this.adapter.isInputFocused(k.END)){return}this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,k.START);this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,k.END)};e.prototype.handleMousedownOrTouchstart=function(t){var e=this;var i=t.type==="mousedown"?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(i,this.moveListener);var r=function(){e.handleUp();e.adapter.deregisterBodyEventHandler(i,e.moveListener);e.adapter.deregisterEventHandler("mouseup",r);e.adapter.deregisterEventHandler("touchend",r)};this.adapter.registerBodyEventHandler("mouseup",r);this.adapter.registerBodyEventHandler("touchend",r);this.handleDown(t)};e.prototype.handlePointerdown=function(t){this.adapter.setPointerCapture(t.pointerId);this.adapter.registerEventHandler("pointermove",this.moveListener);this.handleDown(t)};e.prototype.handleInputChange=function(t){var e=Number(this.adapter.getInputValue(t));if(t===k.START){this.setValueStart(e)}else{this.setValue(e)}this.adapter.emitChangeEvent(t===k.START?this.valueStart:this.value,t);this.adapter.emitInputEvent(t===k.START?this.valueStart:this.value,t)};e.prototype.handleInputFocus=function(t){this.adapter.addThumbClass(b.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===k.START?k.END:k.START;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,e)}};e.prototype.handleInputBlur=function(t){this.adapter.removeThumbClass(b.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===k.START?k.END:k.START;this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,e)}};e.prototype.handleDragStart=function(t,e,i){this.adapter.emitDragStartEvent(e,i);this.adapter.focusInput(i);t.preventDefault()};e.prototype.getThumbFromDownEvent=function(t,e){if(!this.isRange)return k.END;var i=this.adapter.getThumbBoundingClientRect(k.START);var r=this.adapter.getThumbBoundingClientRect(k.END);var s=t>=i.left&&t<=i.right;var n=t>=r.left&&t<=r.right;if(s&&n){return null}if(s){return k.START}if(n){return k.END}if(e<this.valueStart){return k.START}if(e>this.value){return k.END}return e-this.valueStart<=this.value-e?k.START:k.END};e.prototype.getThumbFromMoveEvent=function(t){if(this.thumb!==null)return this.thumb;if(this.downEventClientX===null){throw new Error("`downEventClientX` is null after move event.")}var e=Math.abs(this.downEventClientX-t)<v.THUMB_UPDATE_MIN_PX;if(e)return this.thumb;var i=t<this.downEventClientX;if(i){return this.adapter.isRTL()?k.END:k.START}else{return this.adapter.isRTL()?k.START:k.END}};e.prototype.updateUI=function(t){this.updateThumbAndInputAttributes(t);this.updateThumbAndTrackUI(t);this.updateValueIndicatorUI(t);this.updateTickMarksUI()};e.prototype.updateThumbAndInputAttributes=function(t){if(!t)return;var e=this.isRange&&t===k.START?this.valueStart:this.value;var i=String(e);this.adapter.setInputAttribute(_.INPUT_VALUE,i,t);if(this.isRange&&t===k.START){this.adapter.setInputAttribute(_.INPUT_MIN,i,k.END)}else if(this.isRange&&t===k.END){this.adapter.setInputAttribute(_.INPUT_MAX,i,k.START)}if(this.adapter.getInputValue(t)!==i){this.adapter.setInputValue(i,t)}var r=this.adapter.getValueToAriaValueTextFn();if(r){this.adapter.setInputAttribute(_.ARIA_VALUETEXT,r(e),t)}};e.prototype.updateValueIndicatorUI=function(t){if(!this.isDiscrete)return;var e=this.isRange&&t===k.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(e,t===k.START?k.START:k.END);if(!t&&this.isRange){this.adapter.setValueIndicatorText(this.valueStart,k.START)}};e.prototype.updateTickMarksUI=function(){if(!this.isDiscrete||!this.hasTickMarks)return;var t=(this.valueStart-this.min)/this.step;var e=(this.value-this.valueStart)/this.step+1;var i=(this.max-this.value)/this.step;var r=Array.from({length:t}).fill(y.INACTIVE);var s=Array.from({length:e}).fill(y.ACTIVE);var n=Array.from({length:i}).fill(y.INACTIVE);this.adapter.updateTickMarks(r.concat(s).concat(n))};e.prototype.mapClientXOnSliderScale=function(t){var e=t-this.rect.left;var i=e/this.rect.width;if(this.adapter.isRTL()){i=1-i}var r=this.min+i*(this.max-this.min);if(r===this.max||r===this.min){return r}return Number(this.quantize(r).toFixed(this.numDecimalPlaces))};e.prototype.quantize=function(t){var e=Math.round((t-this.min)/this.step);return this.min+e*this.step};e.prototype.updateValue=function(t,e,i){var r=i===void 0?{}:i,s=r.emitInputEvent;t=this.clampValue(t,e);if(this.isRange&&e===k.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(e);if(s){this.adapter.emitInputEvent(e===k.START?this.valueStart:this.value,e)}};e.prototype.clampValue=function(t,e){t=Math.min(Math.max(t,this.min),this.max);var i=this.isRange&&e===k.START&&t>this.value;if(i){return this.value}var r=this.isRange&&e===k.END&&t<this.valueStart;if(r){return this.valueStart}return t};e.prototype.updateThumbAndTrackUI=function(t){var e=this;var i=this,r=i.max,s=i.min;var n=(this.value-this.valueStart)/(r-s);var o=n*this.rect.width;var d=this.adapter.isRTL();var a=w?p(window,"transform"):"transform";if(this.isRange){var c=this.adapter.isRTL()?(r-this.value)/(r-s)*this.rect.width:(this.valueStart-s)/(r-s)*this.rect.width;var l=c+o;this.animFrame.request(x.SLIDER_UPDATE,(function(){var i=!d&&t===k.START||d&&t!==k.START;if(i){e.adapter.setTrackActiveStyleProperty("transform-origin","right");e.adapter.setTrackActiveStyleProperty("left","unset");e.adapter.setTrackActiveStyleProperty("right",e.rect.width-l+"px")}else{e.adapter.setTrackActiveStyleProperty("transform-origin","left");e.adapter.setTrackActiveStyleProperty("right","unset");e.adapter.setTrackActiveStyleProperty("left",c+"px")}e.adapter.setTrackActiveStyleProperty(a,"scaleX("+n+")");var r=d?l:c;var s=e.adapter.isRTL()?c:l;if(t===k.START||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(a,"translateX("+r+"px)",k.START)}if(t===k.END||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(a,"translateX("+s+"px)",k.END)}e.removeInitialStyles(d);e.updateOverlappingThumbsUI(r,s,t)}))}else{this.animFrame.request(x.SLIDER_UPDATE,(function(){var t=d?e.rect.width-o:o;e.adapter.setThumbStyleProperty(a,"translateX("+t+"px)",k.END);e.adapter.setTrackActiveStyleProperty(a,"scaleX("+n+")");e.removeInitialStyles(d)}))}};e.prototype.removeInitialStyles=function(t){if(this.initialStylesRemoved)return;var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,k.END);if(this.isRange){this.adapter.removeThumbStyleProperty(e,k.START)}this.initialStylesRemoved=true;this.resetTrackAndThumbAnimation()};e.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(!this.isDiscrete)return;var e=w?p(window,"transition"):"transition";var i="all 0s ease 0s";this.adapter.setThumbStyleProperty(e,i,k.END);if(this.isRange){this.adapter.setThumbStyleProperty(e,i,k.START)}this.adapter.setTrackActiveStyleProperty(e,i);requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,k.END);t.adapter.removeTrackActiveStyleProperty(e);if(t.isRange){t.adapter.removeThumbStyleProperty(e,k.START)}}))};e.prototype.updateOverlappingThumbsUI=function(t,e,i){var r=false;if(this.adapter.isRTL()){var s=t-this.startThumbKnobWidth/2;var n=e+this.endThumbKnobWidth/2;r=n>=s}else{var o=t+this.startThumbKnobWidth/2;var d=e-this.endThumbKnobWidth/2;r=o>=d}if(r){this.adapter.addThumbClass(b.THUMB_TOP,i||k.END);this.adapter.removeThumbClass(b.THUMB_TOP,i===k.START?k.END:k.START)}else{this.adapter.removeThumbClass(b.THUMB_TOP,k.START);this.adapter.removeThumbClass(b.THUMB_TOP,k.END)}};e.prototype.convertAttributeValueToNumber=function(t,e){if(t===null){throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.")}var i=Number(t);if(isNaN(i)){throw new Error("MDCSliderFoundation: `"+e+"` value is "+("`"+t+"`, but must be a number."))}return i};e.prototype.validateProperties=function(t){var e=t.min,i=t.max,r=t.value,s=t.valueStart,n=t.step;if(e>=i){throw new Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+e+", max: "+i+"]"))}if(n<=0){throw new Error("MDCSliderFoundation: step must be a positive number. "+("Current step: "+this.step))}if(this.isRange){if(r<e||r>i||s<e||s>i){throw new Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+s+", end value: "+r+"]"))}if(s>r){throw new Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+s+", end value: "+r+"]"))}var o=(s-e)/n;var d=(r-e)/n;if(o%1!==0||d%1!==0){throw new Error("MDCSliderFoundation: Slider values must be valid based on the "+("step value. Current values: [start value: "+s+", ")+("end value: "+r+"]"))}}else{if(r<e||r>i){throw new Error("MDCSliderFoundation: value must be in [min, max] range. "+("Current value: "+r))}var d=(r-e)/n;if(d%1!==0){throw new Error("MDCSliderFoundation: Slider value must be valid based on the "+("step value. Current value: "+r))}}};e.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.registerEventHandler("pointerdown",this.pointerdownListener);this.adapter.registerEventHandler("pointerup",this.pointerupListener)}else{this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.registerThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.registerInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.registerInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.registerThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.registerInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.registerInputEventHandler(k.END,"blur",this.inputEndBlurListener)};e.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener);this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)}else{this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.deregisterThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.deregisterInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.deregisterInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.deregisterThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.deregisterInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.deregisterInputEventHandler(k.END,"blur",this.inputEndBlurListener)};e.prototype.handlePointerup=function(){this.handleUp();this.adapter.deregisterEventHandler("pointermove",this.moveListener)};e.SUPPORTS_POINTER_EVENTS=w&&Boolean(window.PointerEvent)&&!T();return e}(a);function T(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function C(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var i=e[1]||"";var r=e[2]||0;return Math.max(0,(i==="0"?0:i.length)-Number(r))}
|
|
89
|
+
*/var x;(function(t){t["SLIDER_UPDATE"]="slider_update"})(x||(x={}));var w=typeof window!=="undefined";var E=function(t){o(i,t);function i(e){var r=t.call(this,a(a({},i.defaultAdapter),e))||this;r.initialStylesRemoved=false;r.isDisabled=false;r.isDiscrete=false;r.step=b.STEP_SIZE;r.hasTickMarks=false;r.isRange=false;r.thumb=null;r.downEventClientX=null;r.startThumbKnobWidth=0;r.endThumbKnobWidth=0;r.animFrame=new g;return r}Object.defineProperty(i,"defaultAdapter",{get:function(){return{hasClass:function(){return false},addClass:function(){return undefined},removeClass:function(){return undefined},addThumbClass:function(){return undefined},removeThumbClass:function(){return undefined},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){return undefined},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){return undefined},isInputFocused:function(){return false},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return false},setThumbStyleProperty:function(){return undefined},removeThumbStyleProperty:function(){return undefined},setTrackActiveStyleProperty:function(){return undefined},removeTrackActiveStyleProperty:function(){return undefined},setValueIndicatorText:function(){return undefined},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){return undefined},setPointerCapture:function(){return undefined},emitChangeEvent:function(){return undefined},emitInputEvent:function(){return undefined},emitDragStartEvent:function(){return undefined},emitDragEndEvent:function(){return undefined},registerEventHandler:function(){return undefined},deregisterEventHandler:function(){return undefined},registerThumbEventHandler:function(){return undefined},deregisterThumbEventHandler:function(){return undefined},registerInputEventHandler:function(){return undefined},deregisterInputEventHandler:function(){return undefined},registerBodyEventHandler:function(){return undefined},deregisterBodyEventHandler:function(){return undefined},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});i.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(p.DISABLED);this.isDiscrete=this.adapter.hasClass(p.DISCRETE);this.hasTickMarks=this.adapter.hasClass(p.TICK_MARKS);this.isRange=this.adapter.hasClass(p.RANGE);var i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(v.INPUT_MIN,this.isRange?k.START:k.END),v.INPUT_MIN);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(v.INPUT_MAX,k.END),v.INPUT_MAX);var r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(v.INPUT_VALUE,k.END),v.INPUT_VALUE);var s=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(v.INPUT_VALUE,k.START),v.INPUT_VALUE):i;var n=this.adapter.getInputAttribute(v.INPUT_STEP,k.END);var o=n?this.convertAttributeValueToNumber(n,v.INPUT_STEP):this.step;this.validateProperties({min:i,max:e,value:r,valueStart:s,step:o});this.min=i;this.max=e;this.value=r;this.valueStart=s;this.step=o;this.numDecimalPlaces=C(this.step);this.valueBeforeDownEvent=r;this.valueStartBeforeDownEvent=s;this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this);this.moveListener=this.handleMove.bind(this);this.pointerdownListener=this.handlePointerdown.bind(this);this.pointerupListener=this.handlePointerup.bind(this);this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this);this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this);this.inputStartChangeListener=function(){t.handleInputChange(k.START)};this.inputEndChangeListener=function(){t.handleInputChange(k.END)};this.inputStartFocusListener=function(){t.handleInputFocus(k.START)};this.inputEndFocusListener=function(){t.handleInputFocus(k.END)};this.inputStartBlurListener=function(){t.handleInputBlur(k.START)};this.inputEndBlurListener=function(){t.handleInputBlur(k.END)};this.resizeListener=this.handleResize.bind(this);this.registerEventHandlers()};i.prototype.destroy=function(){this.deregisterEventHandlers()};i.prototype.setMin=function(t){this.min=t;if(!this.isRange){this.valueStart=t}this.updateUI()};i.prototype.setMax=function(t){this.max=t;this.updateUI()};i.prototype.getMin=function(){return this.min};i.prototype.getMax=function(){return this.max};i.prototype.getValue=function(){return this.value};i.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart){throw new Error("end thumb value ("+t+") must be >= start thumb "+("value ("+this.valueStart+")"))}this.updateValue(t,k.END)};i.prototype.getValueStart=function(){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}return this.valueStart};i.prototype.setValueStart=function(t){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}if(this.isRange&&t>this.value){throw new Error("start thumb value ("+t+") must be <= end thumb "+("value ("+this.value+")"))}this.updateValue(t,k.START)};i.prototype.setStep=function(t){this.step=t;this.numDecimalPlaces=C(t);this.updateUI()};i.prototype.setIsDiscrete=function(t){this.isDiscrete=t;this.updateValueIndicatorUI();this.updateTickMarksUI()};i.prototype.getStep=function(){return this.step};i.prototype.setHasTickMarks=function(t){this.hasTickMarks=t;this.updateTickMarksUI()};i.prototype.getDisabled=function(){return this.isDisabled};i.prototype.setDisabled=function(t){this.isDisabled=t;if(t){this.adapter.addClass(p.DISABLED);if(this.isRange){this.adapter.setInputAttribute(v.INPUT_DISABLED,"",k.START)}this.adapter.setInputAttribute(v.INPUT_DISABLED,"",k.END)}else{this.adapter.removeClass(p.DISABLED);if(this.isRange){this.adapter.removeInputAttribute(v.INPUT_DISABLED,k.START)}this.adapter.removeInputAttribute(v.INPUT_DISABLED,k.END)}};i.prototype.getIsRange=function(){return this.isRange};i.prototype.layout=function(t){var i=t===void 0?{}:t,e=i.skipUpdateUI;this.rect=this.adapter.getBoundingClientRect();if(this.isRange){this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(k.START);this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(k.END)}if(!e){this.updateUI()}};i.prototype.handleResize=function(){this.layout()};i.prototype.handleDown=function(t){if(this.isDisabled)return;this.valueStartBeforeDownEvent=this.valueStart;this.valueBeforeDownEvent=this.value;var i=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=i;var e=this.mapClientXOnSliderScale(i);this.thumb=this.getThumbFromDownEvent(i,e);if(this.thumb===null)return;this.handleDragStart(t,e,this.thumb);this.updateValue(e,this.thumb,{emitInputEvent:true})};i.prototype.handleMove=function(t){if(this.isDisabled)return;t.preventDefault();var i=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;var e=this.thumb!=null;this.thumb=this.getThumbFromMoveEvent(i);if(this.thumb===null)return;var r=this.mapClientXOnSliderScale(i);if(!e){this.handleDragStart(t,r,this.thumb);this.adapter.emitDragStartEvent(r,this.thumb)}this.updateValue(r,this.thumb,{emitInputEvent:true})};i.prototype.handleUp=function(){if(this.isDisabled||this.thumb===null)return;var t=this.thumb===k.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent;var i=this.thumb===k.START?this.valueStart:this.value;if(t!==i){this.adapter.emitChangeEvent(i,this.thumb)}this.adapter.emitDragEndEvent(i,this.thumb);this.thumb=null};i.prototype.handleThumbMouseenter=function(){if(!this.isDiscrete||!this.isRange)return;this.adapter.addThumbClass(p.THUMB_WITH_INDICATOR,k.START);this.adapter.addThumbClass(p.THUMB_WITH_INDICATOR,k.END)};i.prototype.handleThumbMouseleave=function(){if(!this.isDiscrete||!this.isRange)return;if(this.adapter.isInputFocused(k.START)||this.adapter.isInputFocused(k.END)){return}this.adapter.removeThumbClass(p.THUMB_WITH_INDICATOR,k.START);this.adapter.removeThumbClass(p.THUMB_WITH_INDICATOR,k.END)};i.prototype.handleMousedownOrTouchstart=function(t){var i=this;var e=t.type==="mousedown"?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(e,this.moveListener);var r=function(){i.handleUp();i.adapter.deregisterBodyEventHandler(e,i.moveListener);i.adapter.deregisterEventHandler("mouseup",r);i.adapter.deregisterEventHandler("touchend",r)};this.adapter.registerBodyEventHandler("mouseup",r);this.adapter.registerBodyEventHandler("touchend",r);this.handleDown(t)};i.prototype.handlePointerdown=function(t){this.adapter.setPointerCapture(t.pointerId);this.adapter.registerEventHandler("pointermove",this.moveListener);this.handleDown(t)};i.prototype.handleInputChange=function(t){var i=Number(this.adapter.getInputValue(t));if(t===k.START){this.setValueStart(i)}else{this.setValue(i)}this.adapter.emitChangeEvent(t===k.START?this.valueStart:this.value,t);this.adapter.emitInputEvent(t===k.START?this.valueStart:this.value,t)};i.prototype.handleInputFocus=function(t){this.adapter.addThumbClass(p.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.addThumbClass(p.THUMB_WITH_INDICATOR,t);if(this.isRange){var i=t===k.START?k.END:k.START;this.adapter.addThumbClass(p.THUMB_WITH_INDICATOR,i)}};i.prototype.handleInputBlur=function(t){this.adapter.removeThumbClass(p.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.removeThumbClass(p.THUMB_WITH_INDICATOR,t);if(this.isRange){var i=t===k.START?k.END:k.START;this.adapter.removeThumbClass(p.THUMB_WITH_INDICATOR,i)}};i.prototype.handleDragStart=function(t,i,e){this.adapter.emitDragStartEvent(i,e);this.adapter.focusInput(e);t.preventDefault()};i.prototype.getThumbFromDownEvent=function(t,i){if(!this.isRange)return k.END;var e=this.adapter.getThumbBoundingClientRect(k.START);var r=this.adapter.getThumbBoundingClientRect(k.END);var s=t>=e.left&&t<=e.right;var n=t>=r.left&&t<=r.right;if(s&&n){return null}if(s){return k.START}if(n){return k.END}if(i<this.valueStart){return k.START}if(i>this.value){return k.END}return i-this.valueStart<=this.value-i?k.START:k.END};i.prototype.getThumbFromMoveEvent=function(t){if(this.thumb!==null)return this.thumb;if(this.downEventClientX===null){throw new Error("`downEventClientX` is null after move event.")}var i=Math.abs(this.downEventClientX-t)<b.THUMB_UPDATE_MIN_PX;if(i)return this.thumb;var e=t<this.downEventClientX;if(e){return this.adapter.isRTL()?k.END:k.START}else{return this.adapter.isRTL()?k.START:k.END}};i.prototype.updateUI=function(t){this.updateThumbAndInputAttributes(t);this.updateThumbAndTrackUI(t);this.updateValueIndicatorUI(t);this.updateTickMarksUI()};i.prototype.updateThumbAndInputAttributes=function(t){if(!t)return;var i=this.isRange&&t===k.START?this.valueStart:this.value;var e=String(i);this.adapter.setInputAttribute(v.INPUT_VALUE,e,t);if(this.isRange&&t===k.START){this.adapter.setInputAttribute(v.INPUT_MIN,e,k.END)}else if(this.isRange&&t===k.END){this.adapter.setInputAttribute(v.INPUT_MAX,e,k.START)}if(this.adapter.getInputValue(t)!==e){this.adapter.setInputValue(e,t)}var r=this.adapter.getValueToAriaValueTextFn();if(r){this.adapter.setInputAttribute(v.ARIA_VALUETEXT,r(i),t)}};i.prototype.updateValueIndicatorUI=function(t){if(!this.isDiscrete)return;var i=this.isRange&&t===k.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(i,t===k.START?k.START:k.END);if(!t&&this.isRange){this.adapter.setValueIndicatorText(this.valueStart,k.START)}};i.prototype.updateTickMarksUI=function(){if(!this.isDiscrete||!this.hasTickMarks)return;var t=(this.valueStart-this.min)/this.step;var i=(this.value-this.valueStart)/this.step+1;var e=(this.max-this.value)/this.step;var r=Array.from({length:t}).fill(y.INACTIVE);var s=Array.from({length:i}).fill(y.ACTIVE);var n=Array.from({length:e}).fill(y.INACTIVE);this.adapter.updateTickMarks(r.concat(s).concat(n))};i.prototype.mapClientXOnSliderScale=function(t){var i=t-this.rect.left;var e=i/this.rect.width;if(this.adapter.isRTL()){e=1-e}var r=this.min+e*(this.max-this.min);if(r===this.max||r===this.min){return r}return Number(this.quantize(r).toFixed(this.numDecimalPlaces))};i.prototype.quantize=function(t){var i=Math.round((t-this.min)/this.step);return this.min+i*this.step};i.prototype.updateValue=function(t,i,e){var r=e===void 0?{}:e,s=r.emitInputEvent;t=this.clampValue(t,i);if(this.isRange&&i===k.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(i);if(s){this.adapter.emitInputEvent(i===k.START?this.valueStart:this.value,i)}};i.prototype.clampValue=function(t,i){t=Math.min(Math.max(t,this.min),this.max);var e=this.isRange&&i===k.START&&t>this.value;if(e){return this.value}var r=this.isRange&&i===k.END&&t<this.valueStart;if(r){return this.valueStart}return t};i.prototype.updateThumbAndTrackUI=function(t){var i=this;var e=this,r=e.max,s=e.min;var n=(this.value-this.valueStart)/(r-s);var o=n*this.rect.width;var a=this.adapter.isRTL();var d=w?f(window,"transform"):"transform";if(this.isRange){var c=this.adapter.isRTL()?(r-this.value)/(r-s)*this.rect.width:(this.valueStart-s)/(r-s)*this.rect.width;var l=c+o;this.animFrame.request(x.SLIDER_UPDATE,(function(){var e=!a&&t===k.START||a&&t!==k.START;if(e){i.adapter.setTrackActiveStyleProperty("transform-origin","right");i.adapter.setTrackActiveStyleProperty("left","unset");i.adapter.setTrackActiveStyleProperty("right",i.rect.width-l+"px")}else{i.adapter.setTrackActiveStyleProperty("transform-origin","left");i.adapter.setTrackActiveStyleProperty("right","unset");i.adapter.setTrackActiveStyleProperty("left",c+"px")}i.adapter.setTrackActiveStyleProperty(d,"scaleX("+n+")");var r=a?l:c;var s=i.adapter.isRTL()?c:l;if(t===k.START||!t||!i.initialStylesRemoved){i.adapter.setThumbStyleProperty(d,"translateX("+r+"px)",k.START)}if(t===k.END||!t||!i.initialStylesRemoved){i.adapter.setThumbStyleProperty(d,"translateX("+s+"px)",k.END)}i.removeInitialStyles(a);i.updateOverlappingThumbsUI(r,s,t)}))}else{this.animFrame.request(x.SLIDER_UPDATE,(function(){var t=a?i.rect.width-o:o;i.adapter.setThumbStyleProperty(d,"translateX("+t+"px)",k.END);i.adapter.setTrackActiveStyleProperty(d,"scaleX("+n+")");i.removeInitialStyles(a)}))}};i.prototype.removeInitialStyles=function(t){if(this.initialStylesRemoved)return;var i=t?"right":"left";this.adapter.removeThumbStyleProperty(i,k.END);if(this.isRange){this.adapter.removeThumbStyleProperty(i,k.START)}this.initialStylesRemoved=true;this.resetTrackAndThumbAnimation()};i.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(!this.isDiscrete)return;var i=w?f(window,"transition"):"transition";var e="all 0s ease 0s";this.adapter.setThumbStyleProperty(i,e,k.END);if(this.isRange){this.adapter.setThumbStyleProperty(i,e,k.START)}this.adapter.setTrackActiveStyleProperty(i,e);requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(i,k.END);t.adapter.removeTrackActiveStyleProperty(i);if(t.isRange){t.adapter.removeThumbStyleProperty(i,k.START)}}))};i.prototype.updateOverlappingThumbsUI=function(t,i,e){var r=false;if(this.adapter.isRTL()){var s=t-this.startThumbKnobWidth/2;var n=i+this.endThumbKnobWidth/2;r=n>=s}else{var o=t+this.startThumbKnobWidth/2;var a=i-this.endThumbKnobWidth/2;r=o>=a}if(r){this.adapter.addThumbClass(p.THUMB_TOP,e||k.END);this.adapter.removeThumbClass(p.THUMB_TOP,e===k.START?k.END:k.START)}else{this.adapter.removeThumbClass(p.THUMB_TOP,k.START);this.adapter.removeThumbClass(p.THUMB_TOP,k.END)}};i.prototype.convertAttributeValueToNumber=function(t,i){if(t===null){throw new Error("MDCSliderFoundation: `"+i+"` must be non-null.")}var e=Number(t);if(isNaN(e)){throw new Error("MDCSliderFoundation: `"+i+"` value is "+("`"+t+"`, but must be a number."))}return e};i.prototype.validateProperties=function(t){var i=t.min,e=t.max,r=t.value,s=t.valueStart,n=t.step;if(i>=e){throw new Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+i+", max: "+e+"]"))}if(n<=0){throw new Error("MDCSliderFoundation: step must be a positive number. "+("Current step: "+this.step))}if(this.isRange){if(r<i||r>e||s<i||s>e){throw new Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+s+", end value: "+r+"]"))}if(s>r){throw new Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+s+", end value: "+r+"]"))}var o=(s-i)/n;var a=(r-i)/n;if(o%1!==0||a%1!==0){throw new Error("MDCSliderFoundation: Slider values must be valid based on the "+("step value. Current values: [start value: "+s+", ")+("end value: "+r+"]"))}}else{if(r<i||r>e){throw new Error("MDCSliderFoundation: value must be in [min, max] range. "+("Current value: "+r))}var a=(r-i)/n;if(a%1!==0){throw new Error("MDCSliderFoundation: Slider value must be valid based on the "+("step value. Current value: "+r))}}};i.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener);if(i.SUPPORTS_POINTER_EVENTS){this.adapter.registerEventHandler("pointerdown",this.pointerdownListener);this.adapter.registerEventHandler("pointerup",this.pointerupListener)}else{this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.registerThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.registerInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.registerInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.registerThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.registerInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.registerInputEventHandler(k.END,"blur",this.inputEndBlurListener)};i.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener);if(i.SUPPORTS_POINTER_EVENTS){this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener);this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)}else{this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.deregisterThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.deregisterInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.deregisterInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.deregisterThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.deregisterInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.deregisterInputEventHandler(k.END,"blur",this.inputEndBlurListener)};i.prototype.handlePointerup=function(){this.handleUp();this.adapter.deregisterEventHandler("pointermove",this.moveListener)};i.SUPPORTS_POINTER_EVENTS=w&&Boolean(window.PointerEvent)&&!T();return i}(d);function T(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function C(t){var i=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!i)return 0;var e=i[1]||"";var r=i[2]||0;return Math.max(0,(e==="0"?0:e.length)-Number(r))}
|
|
68
90
|
/**
|
|
69
91
|
* @license
|
|
70
92
|
* Copyright 2020 Google Inc.
|
|
@@ -86,5 +108,5 @@ import{r as t,c as e,h as i,H as r,g as s}from"./p-443111b3.js";import{c as n}fr
|
|
|
86
108
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
87
109
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
88
110
|
* THE SOFTWARE.
|
|
89
|
-
*/var I=function(t){o(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.skipInitialUIUpdate=false;e.valueToAriaValueTextFn=null;return e}e.attachTo=function(t,i){if(i===void 0){i={}}return new e(t,undefined,i)};e.prototype.getDefaultFoundation=function(){var t=this;var e={hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addThumbClass:function(e,i){t.getThumbEl(i).classList.add(e)},removeThumbClass:function(e,i){t.getThumbEl(i).classList.remove(e)},getAttribute:function(e){return t.root.getAttribute(e)},getInputValue:function(e){return t.getInput(e).value},setInputValue:function(e,i){t.getInput(i).value=e},getInputAttribute:function(e,i){return t.getInput(i).getAttribute(e)},setInputAttribute:function(e,i,r){t.getInput(r).setAttribute(e,i)},removeInputAttribute:function(e,i){t.getInput(i).removeAttribute(e)},focusInput:function(e){t.getInput(e).focus()},isInputFocused:function(e){return t.getInput(e)===document.activeElement},getThumbKnobWidth:function(e){return t.getThumbEl(e).querySelector("."+b.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(e){return t.getThumbEl(e).getBoundingClientRect()},getBoundingClientRect:function(){return t.root.getBoundingClientRect()},isRTL:function(){return getComputedStyle(t.root).direction==="rtl"},setThumbStyleProperty:function(e,i,r){t.getThumbEl(r).style.setProperty(e,i)},removeThumbStyleProperty:function(e,i){t.getThumbEl(i).style.removeProperty(e)},setTrackActiveStyleProperty:function(e,i){t.trackActive.style.setProperty(e,i)},removeTrackActiveStyleProperty:function(e){t.trackActive.style.removeProperty(e)},setValueIndicatorText:function(e,i){var r=t.getThumbEl(i).querySelector("."+b.VALUE_INDICATOR_TEXT);r.textContent=String(e)},getValueToAriaValueTextFn:function(){return t.valueToAriaValueTextFn},updateTickMarks:function(e){var i=t.root.querySelector("."+b.TICK_MARKS_CONTAINER);if(!i){i=document.createElement("div");i.classList.add(b.TICK_MARKS_CONTAINER);var r=t.root.querySelector("."+b.TRACK);r.appendChild(i)}if(e.length!==i.children.length){while(i.firstChild){i.removeChild(i.firstChild)}t.addTickMarks(i,e)}else{t.updateTickMarks(i,e)}},setPointerCapture:function(e){t.root.setPointerCapture(e)},emitChangeEvent:function(e,i){t.emit(g.CHANGE,{value:e,thumb:i})},emitInputEvent:function(e,i){t.emit(g.INPUT,{value:e,thumb:i})},emitDragStartEvent:function(e,i){t.getRipple(i).activate()},emitDragEndEvent:function(e,i){t.getRipple(i).deactivate()},registerEventHandler:function(e,i){t.listen(e,i)},deregisterEventHandler:function(e,i){t.unlisten(e,i)},registerThumbEventHandler:function(e,i,r){t.getThumbEl(e).addEventListener(i,r)},deregisterThumbEventHandler:function(e,i,r){t.getThumbEl(e).removeEventListener(i,r)},registerInputEventHandler:function(e,i,r){t.getInput(e).addEventListener(i,r)},deregisterInputEventHandler:function(e,i,r){t.getInput(e).removeEventListener(i,r)},registerBodyEventHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyEventHandler:function(t,e){document.body.removeEventListener(t,e)},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}};return new E(e)};e.prototype.initialize=function(t){var e=t===void 0?{}:t,i=e.skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+b.INPUT));this.thumbs=[].slice.call(this.root.querySelectorAll("."+b.THUMB));this.trackActive=this.root.querySelector("."+b.TRACK_ACTIVE);this.ripples=this.createRipples();if(i){this.skipInitialUIUpdate=true}};e.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})};e.prototype.layout=function(){this.foundation.layout()};e.prototype.getValueStart=function(){return this.foundation.getValueStart()};e.prototype.setValueStart=function(t){this.foundation.setValueStart(t)};e.prototype.getValue=function(){return this.foundation.getValue()};e.prototype.setValue=function(t){this.foundation.setValue(t)};e.prototype.getDisabled=function(){return this.foundation.getDisabled()};e.prototype.setDisabled=function(t){this.foundation.setDisabled(t)};e.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t};e.prototype.getThumbEl=function(t){return t===k.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]};e.prototype.getInput=function(t){return t===k.END?this.inputs[this.inputs.length-1]:this.inputs[0]};e.prototype.getRipple=function(t){return t===k.END?this.ripples[this.ripples.length-1]:this.ripples[0]};e.prototype.addTickMarks=function(t,e){var i=document.createDocumentFragment();for(var r=0;r<e.length;r++){var s=document.createElement("div");var n=e[r]===y.ACTIVE?b.TICK_MARK_ACTIVE:b.TICK_MARK_INACTIVE;s.classList.add(n);i.appendChild(s)}t.appendChild(i)};e.prototype.updateTickMarks=function(t,e){var i=Array.from(t.children);for(var r=0;r<i.length;r++){if(e[r]===y.ACTIVE){i[r].classList.add(b.TICK_MARK_ACTIVE);i[r].classList.remove(b.TICK_MARK_INACTIVE)}else{i[r].classList.add(b.TICK_MARK_INACTIVE);i[r].classList.remove(b.TICK_MARK_ACTIVE)}}};e.prototype.createRipples=function(){var t=[];var e=[].slice.call(this.root.querySelectorAll("."+b.THUMB));var i=function(i){var s=e[i];var n=r.inputs[i];var o=d(d({},l.createAdapter(r)),{addClass:function(t){s.classList.add(t)},computeBoundingRect:function(){return s.getBoundingClientRect()},deregisterInteractionHandler:function(t,e){n.removeEventListener(t,e)},isSurfaceActive:function(){return u(n,":active")},isUnbounded:function(){return true},registerInteractionHandler:function(t,e){n.addEventListener(t,e,h())},removeClass:function(t){s.classList.remove(t)},updateCssVariable:function(t,e){s.style.setProperty(t,e)}});var a=new l(s,new m(o));a.unbounded=true;t.push(a)};var r=this;for(var s=0;s<e.length;s++){i(s)}return t};return e}(c);function S(t){const e=.1;const i=.2;const r=.3;const s=.4;const n=.5;const o=.6;const d=.7;const a=.8;const c=.9;if(t===0){return"percent-0"}if(t<e){return"percent-0-10"}if(t<i){return"percent-10-20"}if(t<r){return"percent-20-30"}if(t<s){return"percent-30-40"}if(t<n){return"percent-40-50"}if(t<o){return"percent-50-60"}if(t<d){return"percent-60-70"}if(t<a){return"percent-70-80"}if(t<c){return"percent-80-90"}return"percent-90-100"}const A='@charset "UTF-8";:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-slider__thumb{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-slider__thumb::before,.mdc-slider__thumb::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-slider__thumb::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-slider__thumb::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-slider__thumb.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-slider__thumb.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb::before,.mdc-slider__thumb::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-slider__thumb.mdc-ripple-upgraded::before,.mdc-slider__thumb.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb::before,.mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider__thumb:hover::before,.mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right;}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media (prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:inherit;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, inherit));font-size:0.8125rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.8125rem);line-height:1.125rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.125rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:0.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.6}.mdc-slider.mdc-slider--disabled{opacity:0.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media (prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:inherit;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, inherit));font-size:0.875rem;font-size:var(--mdc-typography-subtitle1-font-size, 0.875rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right;}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required,.mdc-floating-label--required[dir=rtl]{}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}:host(limel-slider){isolation:isolate;position:relative;display:flex;flex-direction:column}.mdc-slider{height:2.5rem;margin:0 0.75rem}.mdc-floating-label,.mdc-slider .mdc-slider__value-indicator-text{font-family:inherit}.slider__label{padding-left:1.25rem;top:0.75rem;color:rgba(var(--contrast-1200), 1)}:host(limel-slider.disabled:not(.readonly)) .slider__label{color:rgba(var(--contrast-1200), 0.5)}.slider__content-range-container{display:flex;order:2;justify-content:space-between;margin:0 auto;margin-top:-0.75rem;width:100%}.slider__content-min-label,.slider__content-max-label{line-height:1;transition:opacity 0.2s ease;opacity:0.7;font-size:0.75rem;color:rgba(var(--contrast-1200), 1)}.mdc-slider__track:before,.mdc-slider__track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.mdc-slider__track:before{left:-0.75rem}.mdc-slider__track:after{right:-0.75rem}.mdc-slider__track--active_fill,.mdc-slider__track--inactive,.mdc-slider__thumb-knob{transition:background-color 0.5s ease}:host(.displays-percentage-colors[readonly]){--mdc-theme-on-surface:var(--mdc-theme-primary)}:host(.displays-percentage-colors.percent-0){--mdc-theme-primary:var(--color-percent--0)}:host(.displays-percentage-colors.percent-0-10){--mdc-theme-primary:var(--color-percent--0to10)}:host(.displays-percentage-colors.percent-10-20){--mdc-theme-primary:var(--color-percent--10to20)}:host(.displays-percentage-colors.percent-20-30){--mdc-theme-primary:var(--color-percent--20to30)}:host(.displays-percentage-colors.percent-30-40){--mdc-theme-primary:var(--color-percent--30to40)}:host(.displays-percentage-colors.percent-40-50){--mdc-theme-primary:var(--color-percent--40to50)}:host(.displays-percentage-colors.percent-50-60){--mdc-theme-primary:var(--color-percent--50to60)}:host(.displays-percentage-colors.percent-60-70){--mdc-theme-primary:var(--color-percent--60to70)}:host(.displays-percentage-colors.percent-70-80){--mdc-theme-primary:var(--color-percent--70to80)}:host(.displays-percentage-colors.percent-80-90){--mdc-theme-primary:var(--color-percent--80to90)}:host(.displays-percentage-colors.percent-90-100){--mdc-theme-primary:var(--color-percent--90to100)}:host(.displays-percentage-colors.percent-30-40) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-darker))}:host(.displays-percentage-colors.percent-30-40) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-dark))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled{opacity:1}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{height:1rem;border-radius:1rem}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active{top:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{transition:all 0s;transform:translateY(1.75rem)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{opacity:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-theme-primary)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before,.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0.75rem;opacity:0;width:0;height:0;border:0.25rem solid transparent;border-top-color:rgba(var(--contrast-1400), 0.6)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before{left:-1.25rem;transform:rotate(90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{right:-1.25rem;transform:rotate(-90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:before{opacity:0.8;left:-1.75rem}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:after{opacity:0.8;right:-1.75rem}.mdc-slider .mdc-slider__thumb{top:-0.25rem}.mdc-slider .mdc-slider__value-indicator-container{z-index:1}.mdc-slider .mdc-slider__value-indicator{transition:transform 0.2s ease-out;opacity:1;transform:scale(1) translateY(2rem);border-radius:1.25rem;padding:0 0.5rem;height:1.5rem}.mdc-slider .mdc-slider__value-indicator:before{border-top-color:transparent}.mdc-slider .mdc-slider__value-indicator-text{color:rgb(var(--color-white))}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator{transform:scale(1.5) translateY(0);box-shadow:var(--shadow-depth-16)}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator:before{border-top-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator{box-shadow:var(--button-shadow-normal)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator,:host(limel-slider[readonly]) .mdc-slider__value-indicator{background-color:var(--mdc-theme-primary)}:host(limel-slider:focus),:host(limel-slider:focus-visible),:host(limel-slider:focus-within),:host(limel-slider[invalid]:not([invalid=false])),:host(limel-slider[invalid=true]){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-slider){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-slider:focus) limel-helper-line,:host(limel-slider:focus-visible) limel-helper-line,:host(limel-slider:focus-within) limel-helper-line,:host(limel-slider:hover) limel-helper-line{will-change:grid-template-rows}limel-helper-line{order:3}';const M=1;const z=100;const D=0;const H=class{constructor(r){t(this,r);this.change=e(this,"change",7);this.renderHelperLine=()=>{if(!this.helperText){return}return i("limel-helper-line",{helperText:this.helperText,helperTextId:this.helperTextId})};this.initialize=()=>{const t=this.getInputElement();if(!t){return}const e=this.getValue();t.setAttribute("value",`${this.multiplyByFactor(e)}`);const i=e>=this.valuemin;const r=e<=this.valuemax;if(!i){const i=this.multiplyByFactor(e);t.setAttribute("min",`${i}`)}if(!r){const i=this.multiplyByFactor(e);t.setAttribute("max",`${i}`)}if(!this.isMultipleOfStep(e,this.step)){t.removeAttribute("step")}this.createMDCSlider()};this.reCreateSliderWithStep=()=>{const t=this.getInputElement();const e=`${this.multiplyByFactor(this.step)}`;t.setAttribute("step",e);this.destroyMDCSlider();this.createMDCSlider()};this.createMDCSlider=()=>{const t=this.getRootElement();this.mdcSlider=new I(t);this.mdcSlider.listen("MDCSlider:change",this.changeHandler);this.mdcSlider.listen("MDCSlider:input",this.inputHandler)};this.changeHandler=t=>{let e=t.detail.value;const i=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(e,i)){e=this.roundToStep(e,i)}this.change.emit(e/this.factor)};this.inputHandler=t=>{this.setPercentageClass(t.detail.value/this.factor)};this.getContainerClassList=()=>({[this.percentageClass]:true,disabled:this.disabled||this.readonly,readonly:this.readonly});this.resizeObserverCallback=()=>{var t;(t=this.mdcSlider)===null||t===void 0?void 0:t.layout()};this.updateDisabledState=()=>{var t;if(!this.mdcSlider){return}(t=this.mdcSlider)===null||t===void 0?void 0:t.setDisabled(this.disabled||this.readonly)};this.multiplyByFactor=t=>Math.round(t*this.factor);this.getValue=()=>{let t=this.value;if(!isFinite(t)){t=this.valuemin}return t};this.setPercentageClass=t=>{this.percentageClass=S((t-this.valuemin)/(this.valuemax-this.valuemin))};this.isMultipleOfStep=(t,e)=>{if(!e){return true}return t%e===0};this.roundToStep=(t,e)=>Math.round(t/e)*e;this.getRootElement=()=>this.rootElement.shadowRoot.querySelector(".mdc-slider");this.getInputElement=()=>{const t=this.getRootElement();if(!t){return}return t.querySelector("input")};this.isStepConfigured=()=>{if(!this.step){return true}const t=this.getInputElement();if(!t){return true}return t.hasAttribute("step")};this.disabled=false;this.readonly=false;this.factor=M;this.label=undefined;this.helperText=undefined;this.unit="";this.value=undefined;this.valuemax=z;this.valuemin=D;this.step=undefined;this.percentageClass=undefined;this.labelId=n();this.helperTextId=n()}connectedCallback(){this.initialize();this.observer=new ResizeObserver(this.resizeObserverCallback);this.observer.observe(this.rootElement)}componentWillLoad(){this.setPercentageClass(this.value)}componentDidLoad(){this.initialize()}disconnectedCallback(){this.destroyMDCSlider();this.observer.disconnect()}render(){const t={};if(this.step){t.step=this.multiplyByFactor(this.step)}if(this.disabled||this.readonly){t.disabled=true}return i(r,{class:this.getContainerClassList()},i("label",{class:"slider__label mdc-floating-label mdc-floating-label--float-above",id:this.labelId},this.label),i("div",{class:"slider__content-range-container"},i("span",{class:"slider__content-min-label"},this.multiplyByFactor(this.valuemin),this.unit),i("span",{class:"slider__content-max-label"},this.multiplyByFactor(this.valuemax),this.unit)),i("div",{class:{"mdc-slider":true,"mdc-slider--discrete":true,"mdc-slider--disabled":this.disabled||this.readonly}},i("input",Object.assign({class:"mdc-slider__input",type:"range",min:this.multiplyByFactor(this.valuemin),max:this.multiplyByFactor(this.valuemax),value:this.multiplyByFactor(this.value),name:"volume","aria-labelledby":this.labelId,"aria-controls":this.helperTextId},t)),i("div",{class:"mdc-slider__track"},i("div",{class:"mdc-slider__track--inactive"}),i("div",{class:"mdc-slider__track--active"},i("div",{class:"mdc-slider__track--active_fill"}))),i("div",{class:"mdc-slider__thumb"},i("div",{class:"mdc-slider__value-indicator-container","aria-hidden":"true"},i("div",{class:"mdc-slider__value-indicator"},i("span",{class:"mdc-slider__value-indicator-text"},this.multiplyByFactor(this.value)))),i("div",{class:"mdc-slider__thumb-knob"}))),this.renderHelperLine())}watchDisabled(){this.updateDisabledState()}watchReadonly(){this.updateDisabledState()}watchValue(){if(!this.mdcSlider){return}const t=this.multiplyByFactor(this.getValue());this.mdcSlider.setValue(t);if(this.isStepConfigured()){return}const e=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(t,e)){return}this.reCreateSliderWithStep()}destroyMDCSlider(){this.mdcSlider.unlisten("MDCSlider:change",this.changeHandler);this.mdcSlider.unlisten("MDCSlider:input",this.inputHandler);this.mdcSlider.destroy();this.mdcSlider=undefined}get rootElement(){return s(this)}static get watchers(){return{disabled:["watchDisabled"],readonly:["watchReadonly"],value:["watchValue"]}}};H.style=A;export{H as limel_slider};
|
|
90
|
-
//# sourceMappingURL=p-
|
|
111
|
+
*/var I=function(t){o(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.skipInitialUIUpdate=false;i.valueToAriaValueTextFn=null;return i}i.attachTo=function(t,e){if(e===void 0){e={}}return new i(t,undefined,e)};i.prototype.getDefaultFoundation=function(){var t=this;var i={hasClass:function(i){return t.root.classList.contains(i)},addClass:function(i){t.root.classList.add(i)},removeClass:function(i){t.root.classList.remove(i)},addThumbClass:function(i,e){t.getThumbEl(e).classList.add(i)},removeThumbClass:function(i,e){t.getThumbEl(e).classList.remove(i)},getAttribute:function(i){return t.root.getAttribute(i)},getInputValue:function(i){return t.getInput(i).value},setInputValue:function(i,e){t.getInput(e).value=i},getInputAttribute:function(i,e){return t.getInput(e).getAttribute(i)},setInputAttribute:function(i,e,r){t.getInput(r).setAttribute(i,e)},removeInputAttribute:function(i,e){t.getInput(e).removeAttribute(i)},focusInput:function(i){t.getInput(i).focus()},isInputFocused:function(i){return t.getInput(i)===document.activeElement},getThumbKnobWidth:function(i){return t.getThumbEl(i).querySelector("."+p.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(i){return t.getThumbEl(i).getBoundingClientRect()},getBoundingClientRect:function(){return t.root.getBoundingClientRect()},isRTL:function(){return getComputedStyle(t.root).direction==="rtl"},setThumbStyleProperty:function(i,e,r){t.getThumbEl(r).style.setProperty(i,e)},removeThumbStyleProperty:function(i,e){t.getThumbEl(e).style.removeProperty(i)},setTrackActiveStyleProperty:function(i,e){t.trackActive.style.setProperty(i,e)},removeTrackActiveStyleProperty:function(i){t.trackActive.style.removeProperty(i)},setValueIndicatorText:function(i,e){var r=t.getThumbEl(e).querySelector("."+p.VALUE_INDICATOR_TEXT);r.textContent=String(i)},getValueToAriaValueTextFn:function(){return t.valueToAriaValueTextFn},updateTickMarks:function(i){var e=t.root.querySelector("."+p.TICK_MARKS_CONTAINER);if(!e){e=document.createElement("div");e.classList.add(p.TICK_MARKS_CONTAINER);var r=t.root.querySelector("."+p.TRACK);r.appendChild(e)}if(i.length!==e.children.length){while(e.firstChild){e.removeChild(e.firstChild)}t.addTickMarks(e,i)}else{t.updateTickMarks(e,i)}},setPointerCapture:function(i){t.root.setPointerCapture(i)},emitChangeEvent:function(i,e){t.emit(_.CHANGE,{value:i,thumb:e})},emitInputEvent:function(i,e){t.emit(_.INPUT,{value:i,thumb:e})},emitDragStartEvent:function(i,e){t.getRipple(e).activate()},emitDragEndEvent:function(i,e){t.getRipple(e).deactivate()},registerEventHandler:function(i,e){t.listen(i,e)},deregisterEventHandler:function(i,e){t.unlisten(i,e)},registerThumbEventHandler:function(i,e,r){t.getThumbEl(i).addEventListener(e,r)},deregisterThumbEventHandler:function(i,e,r){t.getThumbEl(i).removeEventListener(e,r)},registerInputEventHandler:function(i,e,r){t.getInput(i).addEventListener(e,r)},deregisterInputEventHandler:function(i,e,r){t.getInput(i).removeEventListener(e,r)},registerBodyEventHandler:function(t,i){document.body.addEventListener(t,i)},deregisterBodyEventHandler:function(t,i){document.body.removeEventListener(t,i)},registerWindowEventHandler:function(t,i){window.addEventListener(t,i)},deregisterWindowEventHandler:function(t,i){window.removeEventListener(t,i)}};return new E(i)};i.prototype.initialize=function(t){var i=t===void 0?{}:t,e=i.skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+p.INPUT));this.thumbs=[].slice.call(this.root.querySelectorAll("."+p.THUMB));this.trackActive=this.root.querySelector("."+p.TRACK_ACTIVE);this.ripples=this.createRipples();if(e){this.skipInitialUIUpdate=true}};i.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})};i.prototype.layout=function(){this.foundation.layout()};i.prototype.getValueStart=function(){return this.foundation.getValueStart()};i.prototype.setValueStart=function(t){this.foundation.setValueStart(t)};i.prototype.getValue=function(){return this.foundation.getValue()};i.prototype.setValue=function(t){this.foundation.setValue(t)};i.prototype.getDisabled=function(){return this.foundation.getDisabled()};i.prototype.setDisabled=function(t){this.foundation.setDisabled(t)};i.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t};i.prototype.getThumbEl=function(t){return t===k.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]};i.prototype.getInput=function(t){return t===k.END?this.inputs[this.inputs.length-1]:this.inputs[0]};i.prototype.getRipple=function(t){return t===k.END?this.ripples[this.ripples.length-1]:this.ripples[0]};i.prototype.addTickMarks=function(t,i){var e=document.createDocumentFragment();for(var r=0;r<i.length;r++){var s=document.createElement("div");var n=i[r]===y.ACTIVE?p.TICK_MARK_ACTIVE:p.TICK_MARK_INACTIVE;s.classList.add(n);e.appendChild(s)}t.appendChild(e)};i.prototype.updateTickMarks=function(t,i){var e=Array.from(t.children);for(var r=0;r<e.length;r++){if(i[r]===y.ACTIVE){e[r].classList.add(p.TICK_MARK_ACTIVE);e[r].classList.remove(p.TICK_MARK_INACTIVE)}else{e[r].classList.add(p.TICK_MARK_INACTIVE);e[r].classList.remove(p.TICK_MARK_ACTIVE)}}};i.prototype.createRipples=function(){var t=[];var i=[].slice.call(this.root.querySelectorAll("."+p.THUMB));var e=function(e){var s=i[e];var n=r.inputs[e];var o=a(a({},l.createAdapter(r)),{addClass:function(t){s.classList.add(t)},computeBoundingRect:function(){return s.getBoundingClientRect()},deregisterInteractionHandler:function(t,i){n.removeEventListener(t,i)},isSurfaceActive:function(){return u(n,":active")},isUnbounded:function(){return true},registerInteractionHandler:function(t,i){n.addEventListener(t,i,h())},removeClass:function(t){s.classList.remove(t)},updateCssVariable:function(t,i){s.style.setProperty(t,i)}});var d=new l(s,new m(o));d.unbounded=true;t.push(d)};var r=this;for(var s=0;s<i.length;s++){e(s)}return t};return i}(c);function A(t){const i=.1;const e=.2;const r=.3;const s=.4;const n=.5;const o=.6;const a=.7;const d=.8;const c=.9;if(t===0){return"percent-0"}if(t<i){return"percent-0-10"}if(t<e){return"percent-10-20"}if(t<r){return"percent-20-30"}if(t<s){return"percent-30-40"}if(t<n){return"percent-40-50"}if(t<o){return"percent-50-60"}if(t<a){return"percent-60-70"}if(t<d){return"percent-70-80"}if(t<c){return"percent-80-90"}return"percent-90-100"}const S='@charset "UTF-8";:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-slider__thumb{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-slider__thumb::before,.mdc-slider__thumb::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-slider__thumb::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-slider__thumb::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-slider__thumb.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-slider__thumb.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb::before,.mdc-slider__thumb::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-slider__thumb.mdc-ripple-upgraded::before,.mdc-slider__thumb.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb::before,.mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider__thumb:hover::before,.mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right;}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media (prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:inherit;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, inherit));font-size:0.8125rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.8125rem);line-height:1.125rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.125rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:0.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.6}.mdc-slider.mdc-slider--disabled{opacity:0.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media (prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:inherit;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, inherit));font-size:0.875rem;font-size:var(--mdc-typography-subtitle1-font-size, 0.875rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right;}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required,.mdc-floating-label--required[dir=rtl]{}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}:host(limel-slider){isolation:isolate;position:relative;display:flex;flex-direction:column}.mdc-slider{height:2.5rem;margin:0 0.75rem}.mdc-floating-label,.mdc-slider .mdc-slider__value-indicator-text{font-family:inherit}.slider__label{padding-left:1.25rem;top:0.75rem;color:rgba(var(--contrast-1200), 1)}:host(limel-slider.disabled:not(.readonly)) .slider__label{color:rgba(var(--contrast-1200), 0.5)}.slider__content-range-container{display:flex;order:2;justify-content:space-between;margin:0 auto;margin-top:-0.75rem;width:100%}.slider__content-min-label,.slider__content-max-label{line-height:1;transition:opacity 0.2s ease;opacity:0.7;font-size:0.75rem;color:rgba(var(--contrast-1200), 1)}.mdc-slider__track:before,.mdc-slider__track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.mdc-slider__track:before{left:-0.75rem}.mdc-slider__track:after{right:-0.75rem}.mdc-slider__track--active_fill,.mdc-slider__track--inactive,.mdc-slider__thumb-knob{transition:background-color 0.5s ease}:host(.displays-percentage-colors[readonly]){--mdc-theme-on-surface:var(--mdc-theme-primary)}:host(.displays-percentage-colors.percent-0){--mdc-theme-primary:var(--color-percent--0)}:host(.displays-percentage-colors.percent-0-10){--mdc-theme-primary:var(--color-percent--0to10)}:host(.displays-percentage-colors.percent-10-20){--mdc-theme-primary:var(--color-percent--10to20)}:host(.displays-percentage-colors.percent-20-30){--mdc-theme-primary:var(--color-percent--20to30)}:host(.displays-percentage-colors.percent-30-40){--mdc-theme-primary:var(--color-percent--30to40)}:host(.displays-percentage-colors.percent-40-50){--mdc-theme-primary:var(--color-percent--40to50)}:host(.displays-percentage-colors.percent-50-60){--mdc-theme-primary:var(--color-percent--50to60)}:host(.displays-percentage-colors.percent-60-70){--mdc-theme-primary:var(--color-percent--60to70)}:host(.displays-percentage-colors.percent-70-80){--mdc-theme-primary:var(--color-percent--70to80)}:host(.displays-percentage-colors.percent-80-90){--mdc-theme-primary:var(--color-percent--80to90)}:host(.displays-percentage-colors.percent-90-100){--mdc-theme-primary:var(--color-percent--90to100)}:host(.displays-percentage-colors.percent-30-40) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-darker))}:host(.displays-percentage-colors.percent-30-40) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-dark))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled{opacity:1}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{height:1rem;border-radius:1rem}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active{top:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{transition:all 0s;transform:translateY(1.75rem)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{opacity:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-theme-primary)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before,.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0.75rem;opacity:0;width:0;height:0;border:0.25rem solid transparent;border-top-color:rgba(var(--contrast-1400), 0.6)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before{left:-1.25rem;transform:rotate(90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{right:-1.25rem;transform:rotate(-90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:before{opacity:0.8;left:-1.75rem}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:after{opacity:0.8;right:-1.75rem}.mdc-slider .mdc-slider__thumb{top:-0.25rem}.mdc-slider .mdc-slider__value-indicator-container{z-index:1}.mdc-slider .mdc-slider__value-indicator{transition:transform 0.2s ease-out;opacity:1;transform:scale(1) translateY(2rem);border-radius:1.25rem;padding:0 0.5rem;height:1.5rem}.mdc-slider .mdc-slider__value-indicator:before{border-top-color:transparent}.mdc-slider .mdc-slider__value-indicator-text{color:rgb(var(--color-white))}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator{transform:scale(1.5) translateY(0);box-shadow:var(--shadow-depth-16)}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator:before{border-top-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator{box-shadow:var(--button-shadow-normal)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator,:host(limel-slider[readonly]) .mdc-slider__value-indicator{background-color:var(--mdc-theme-primary)}:host(limel-slider:focus),:host(limel-slider:focus-visible),:host(limel-slider:focus-within),:host(limel-slider[invalid]:not([invalid=false])),:host(limel-slider[invalid=true]){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-slider){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-slider:focus) limel-helper-line,:host(limel-slider:focus-visible) limel-helper-line,:host(limel-slider:focus-within) limel-helper-line,:host(limel-slider:hover) limel-helper-line{will-change:grid-template-rows}limel-helper-line{order:3}';const M=1;const z=100;const D=0;const H=class{constructor(r){t(this,r);this.change=i(this,"change",7);this.renderHelperLine=()=>{if(!this.helperText){return}return e("limel-helper-line",{helperText:this.helperText,helperTextId:this.helperTextId})};this.initialize=()=>{const t=this.getInputElement();if(!t){return}const i=this.getValue();t.setAttribute("value",`${this.multiplyByFactor(i)}`);const e=i>=this.valuemin;const r=i<=this.valuemax;if(!e){const e=this.multiplyByFactor(i);t.setAttribute("min",`${e}`)}if(!r){const e=this.multiplyByFactor(i);t.setAttribute("max",`${e}`)}if(!this.isMultipleOfStep(i,this.step)){t.removeAttribute("step")}this.createMDCSlider()};this.reCreateSliderWithStep=()=>{const t=this.getInputElement();const i=`${this.multiplyByFactor(this.step)}`;t.setAttribute("step",i);this.destroyMDCSlider();this.createMDCSlider()};this.createMDCSlider=()=>{const t=this.getRootElement();this.mdcSlider=new I(t);this.mdcSlider.listen("MDCSlider:change",this.changeHandler);this.mdcSlider.listen("MDCSlider:input",this.inputHandler)};this.changeHandler=t=>{let i=t.detail.value;const e=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(i,e)){i=this.roundToStep(i,e)}this.change.emit(i/this.factor)};this.inputHandler=t=>{this.setPercentageClass(t.detail.value/this.factor)};this.getContainerClassList=()=>({[this.percentageClass]:true,disabled:this.disabled||this.readonly,readonly:this.readonly});this.resizeObserverCallback=()=>{var t;(t=this.mdcSlider)===null||t===void 0?void 0:t.layout()};this.updateDisabledState=()=>{var t;if(!this.mdcSlider){return}(t=this.mdcSlider)===null||t===void 0?void 0:t.setDisabled(this.disabled||this.readonly)};this.multiplyByFactor=t=>Math.round(t*this.factor);this.getValue=()=>{let t=this.value;if(!isFinite(t)){t=this.valuemin}return t};this.setPercentageClass=t=>{this.percentageClass=A((t-this.valuemin)/(this.valuemax-this.valuemin))};this.isMultipleOfStep=(t,i)=>{if(!i){return true}return t%i===0};this.roundToStep=(t,i)=>Math.round(t/i)*i;this.getRootElement=()=>this.rootElement.shadowRoot.querySelector(".mdc-slider");this.getInputElement=()=>{const t=this.getRootElement();if(!t){return}return t.querySelector("input")};this.isStepConfigured=()=>{if(!this.step){return true}const t=this.getInputElement();if(!t){return true}return t.hasAttribute("step")};this.disabled=false;this.readonly=false;this.factor=M;this.label=undefined;this.helperText=undefined;this.unit="";this.value=undefined;this.valuemax=z;this.valuemin=D;this.step=undefined;this.percentageClass=undefined;this.labelId=n();this.helperTextId=n()}connectedCallback(){this.initialize();this.observer=new ResizeObserver(this.resizeObserverCallback);this.observer.observe(this.rootElement)}componentWillLoad(){this.setPercentageClass(this.value)}componentDidLoad(){this.initialize()}disconnectedCallback(){this.destroyMDCSlider();this.observer.disconnect()}render(){const t={};if(this.step){t.step=this.multiplyByFactor(this.step)}if(this.disabled||this.readonly){t.disabled=true}return e(r,{class:this.getContainerClassList()},e("label",{class:"slider__label mdc-floating-label mdc-floating-label--float-above",id:this.labelId},this.label),e("div",{class:"slider__content-range-container"},e("span",{class:"slider__content-min-label"},this.multiplyByFactor(this.valuemin),this.unit),e("span",{class:"slider__content-max-label"},this.multiplyByFactor(this.valuemax),this.unit)),e("div",{class:{"mdc-slider":true,"mdc-slider--discrete":true,"mdc-slider--disabled":this.disabled||this.readonly}},e("input",Object.assign({class:"mdc-slider__input",type:"range",min:this.multiplyByFactor(this.valuemin),max:this.multiplyByFactor(this.valuemax),value:this.multiplyByFactor(this.value),name:"volume","aria-labelledby":this.labelId,"aria-controls":this.helperTextId},t)),e("div",{class:"mdc-slider__track"},e("div",{class:"mdc-slider__track--inactive"}),e("div",{class:"mdc-slider__track--active"},e("div",{class:"mdc-slider__track--active_fill"}))),e("div",{class:"mdc-slider__thumb"},e("div",{class:"mdc-slider__value-indicator-container","aria-hidden":"true"},e("div",{class:"mdc-slider__value-indicator"},e("span",{class:"mdc-slider__value-indicator-text"},this.multiplyByFactor(this.value)))),e("div",{class:"mdc-slider__thumb-knob"}))),this.renderHelperLine())}watchDisabled(){this.updateDisabledState()}watchReadonly(){this.updateDisabledState()}watchValue(){if(!this.mdcSlider){return}const t=this.multiplyByFactor(this.getValue());this.mdcSlider.setValue(t);if(this.isStepConfigured()){return}const i=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(t,i)){return}this.reCreateSliderWithStep()}destroyMDCSlider(){this.mdcSlider.unlisten("MDCSlider:change",this.changeHandler);this.mdcSlider.unlisten("MDCSlider:input",this.inputHandler);this.mdcSlider.destroy();this.mdcSlider=undefined}get rootElement(){return s(this)}static get watchers(){return{disabled:["watchDisabled"],readonly:["watchReadonly"],value:["watchValue"]}}};H.style=S;export{H as limel_slider};
|
|
112
|
+
//# sourceMappingURL=p-d505de95.entry.js.map
|