smoothly 1.121.0 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/smoothly-app_99.cjs.entry.js +6 -6
- package/dist/cjs/smoothly-app_99.cjs.entry.js.map +1 -1
- package/dist/collection/components/input/range/demo/index.js +1 -1
- package/dist/collection/components/input/range/demo/index.js.map +1 -1
- package/dist/collection/components/input/range/index.js +4 -4
- package/dist/collection/components/input/range/index.js.map +1 -1
- package/dist/collection/components/input/range/style.css +1 -1
- package/dist/components/{p-C0Vb-3iG.js → p-B1VLjp0y.js} +2 -2
- package/dist/components/{p-DZ4052aB.js → p-BbtmZQlk.js} +2 -2
- package/dist/components/{p-BbI_Odg-.js → p-CDbQFx9i.js} +2 -2
- package/dist/components/{p-DUoSHWe1.js → p-CYxd1Pkd.js} +2 -2
- package/dist/components/{p-y6VfFBKz.js → p-CaQWZMN4.js} +2 -2
- package/dist/components/p-Cfvi2T1F.js +2 -0
- package/dist/components/{p-D97PTGAK.js.map → p-Cfvi2T1F.js.map} +1 -1
- package/dist/components/{p-ChiRe9cW.js → p-Ch1HU37X.js} +2 -2
- package/dist/components/{p-CM72sJqO.js → p-Ch5M1RA7.js} +2 -2
- package/dist/components/{p-CrDAs9xy.js → p-CsTmaH-Y.js} +2 -2
- package/dist/components/{p-j4UEmpTa.js → p-PwCtk_DY.js} +2 -2
- package/dist/components/{p-j4UEmpTa.js.map → p-PwCtk_DY.js.map} +1 -1
- package/dist/components/{p-BrBilp2f.js → p-WvQaS_J6.js} +2 -2
- package/dist/components/smoothly-app-demo.js +1 -1
- package/dist/components/smoothly-form-demo-all.js +1 -1
- package/dist/components/smoothly-form-demo-pet.js +1 -1
- package/dist/components/smoothly-form-demo.js +1 -1
- package/dist/components/smoothly-icon-demo.js +1 -1
- package/dist/components/smoothly-input-checkbox-demo.js +1 -1
- package/dist/components/smoothly-input-color-demo.js +1 -1
- package/dist/components/smoothly-input-color.js +1 -1
- package/dist/components/smoothly-input-demo-standard.js +1 -1
- package/dist/components/smoothly-input-demo-user-input.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-range-demo.js +1 -1
- package/dist/components/smoothly-input-range.js +1 -1
- package/dist/esm/smoothly-app_99.entry.js +6 -6
- package/dist/esm/smoothly-app_99.entry.js.map +1 -1
- package/dist/smoothly/{p-baf5063c.entry.js → p-2ea46d26.entry.js} +2 -2
- package/dist/smoothly/{p-baf5063c.entry.js.map → p-2ea46d26.entry.js.map} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-D97PTGAK.js +0 -2
- /package/dist/components/{p-C0Vb-3iG.js.map → p-B1VLjp0y.js.map} +0 -0
- /package/dist/components/{p-DZ4052aB.js.map → p-BbtmZQlk.js.map} +0 -0
- /package/dist/components/{p-BbI_Odg-.js.map → p-CDbQFx9i.js.map} +0 -0
- /package/dist/components/{p-DUoSHWe1.js.map → p-CYxd1Pkd.js.map} +0 -0
- /package/dist/components/{p-y6VfFBKz.js.map → p-CaQWZMN4.js.map} +0 -0
- /package/dist/components/{p-ChiRe9cW.js.map → p-Ch1HU37X.js.map} +0 -0
- /package/dist/components/{p-CM72sJqO.js.map → p-Ch5M1RA7.js.map} +0 -0
- /package/dist/components/{p-CrDAs9xy.js.map → p-CsTmaH-Y.js.map} +0 -0
- /package/dist/components/{p-BrBilp2f.js.map → p-WvQaS_J6.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,h as o,d as a,t as s}from"./p-BsZrGTcp.js";import{C as d}from"./p-Br0kWrBT.js";import"./p-BVKhAhsB.js";import"./p-DoFURPl2.js";import{L as i,d as c}from"./p-vvQg46ti.js";import{d as l}from"./p-mmAi00ak.js";import{d as m}from"./p-CHjWijPI.js";import{d as r}from"./p-BE5E3Jm6.js";import{d as n}from"./p-CN3iME9d.js";import{d as h}from"./p-DG2pfnCV.js";import{d as f}from"./p-uFR5K4vd.js";import{d as b}from"./p-DvZK__s-.js";import{d as p}from"./p-F8qX8ZuL.js";import{d as y}from"./p-DFSiKg4M.js";import{d as u}from"./p-o8kM0Soe.js";import{d as k}from"./p-Dd9tz4Tj.js";import{d as g}from"./p-BX-sEZyq.js";import{d as v}from"./p-y6VfFBKz.js";import{d as j}from"./p-CtVEKtM6.js";import{d as w}from"./p-KZeR_6LG.js";import{d as E}from"./p-BSHxNVcQ.js";import{d as x}from"./p-gEWA_tZo.js";import{d as L}from"./p-MqffyRVU.js";import{d as M}from"./p-wjlHVReJ.js";import{d as R}from"./p-4Xn3Nprv.js";import{d as S}from"./p-j4UEmpTa.js";import{d as B}from"./p-C22G-tNF.js";import{d as C}from"./p-BplZiuMF.js";import{d as D}from"./p-CVdJ19AA.js";import{d as F}from"./p-DvOr53No.js";import{d as T}from"./p-BsHachOX.js";const A=()=>`.sc-smoothly-input-demo-standard-h{max-width:min(calc(100% - 0.5rem), 48rem);margin:auto}.sc-smoothly-input-demo-standard-h h2.sc-smoothly-input-demo-standard,.sc-smoothly-input-demo-standard-h p.sc-smoothly-input-demo-standard{margin:.5rem 0}.sc-smoothly-input-demo-standard-h>.description.sc-smoothly-input-demo-standard{--smoothly-form-input-min-width:18rem}.sc-smoothly-input-demo-standard-h smoothly-input-range[name=borderRadius].sc-smoothly-input-demo-standard{flex-basis:100%}div.input-wrapper.sc-smoothly-input-demo-standard{display:grid;margin-top:1rem;grid-template-columns:1fr 9rem;gap:1rem;position:relative;justify-content:space-around}div.input-wrapper.sc-smoothly-input-demo-standard>[name].sc-smoothly-input-demo-standard{grid-column:1 / 2}div.input-wrapper.sc-smoothly-input-demo-standard>.width.sc-smoothly-input-demo-standard{width:100%;text-align:center;border-bottom:1px dashed black}div.input-wrapper.sc-smoothly-input-demo-standard>.height.sc-smoothly-input-demo-standard{align-content:center;grid-column:2 / 3;border-left:1px dashed black;padding-left:1rem;content:"hello"}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard{width:0.5rem;grid-column:1 / 2;white-space:nowrap;overflow:visible;position:relative;cursor:default}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard::before{content:"";position:absolute;width:100%;top:1.5rem;bottom:-1rem;border:1px dashed black;z-index:2}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard:hover::before{bottom:-100vh}`;const G=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.duration={hours:8};this.options={}}connectedCallback(){this.updateInputHeightText()}componentDidRender(){this.updateInputHeightText()}updateInputHeightText(){const e=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));this.element.querySelectorAll(".height").forEach((t=>{const o=t.clientHeight;t.innerHTML=`<b>${o/e}rem</b> (${o}pixels)`}))}render(){return o(a,{key:"54cf2b88dfb0ae3326c332e0d608b5e2aab4e2af"},o("div",{key:"c549a1f2bf55faa1db79e85170fd5106269400d0",class:"description"},o("h2",{key:"4cd8be6f457b84c4363c93262a0a8c57d6ad794a"},"Input Standard"),o("p",{key:"d704b09fb11c51a92fa618c106039ed01695ce58"},"Height of input should be ",o("code",{key:"abee88ddb4d762af1cde9a6f7c94ad13fd069152"},"3rem")," including border. This is should result in a 48 pixel height at 100% zoom, assuming a root font-size of 16 pixels."),o("smoothly-form",{key:"0922d6713e44cffa51cc253e94fb1ae98a823f24",looks:"grid",onSmoothlyFormInput:e=>this.options=e.detail},o("smoothly-input-select",{key:"1cdba85a6cddb32a49a763394b8cdb7b36d2c24a",name:"color"},o("span",{key:"58013cb8ab43cc7cc05f6ab58670ec5f41eab179",slot:"label"},"Color"),d.values.map((e=>o("smoothly-item",{value:e},o("span",{color:e},e)))),o("smoothly-input-clear",{key:"0eae109840ebc9b0101fb08f7daa61253826da9c",slot:"end"})),o("smoothly-input-select",{key:"f48cf9bd8f86d1eb5e68e3383bf9178ea27b5f22",name:"looks"},o("span",{key:"d6f665f4cbc8e871229312e611180bc0bf9607d1",slot:"label"},"Looks"),i.values.map((e=>o("smoothly-item",{value:e},e)))),o("smoothly-input-range",{key:"955d191d8da75e9dace4c57e6f6f3d427bdac864",label:"Border Radius (rem)",name:"borderRadius",min:0,max:2,step:.25}),o("smoothly-input-checkbox",{key:"cbd64dab264df038bf40efa6c2d8733f6c767185",name:"readonly"},"Readonly"),o("smoothly-input-checkbox",{key:"e5a2a80fba021019871563ac7197360060ccb451",name:"disabled"},"Disabled"),o("smoothly-input-checkbox",{key:"f1bca93555a7cc9fa7a56a39e6bbdfc5b7570edc",name:"invalid"},"Invalid"),o("smoothly-input",{key:"15361ba7d104e800e627aebc52d8fff1623782b9",name:"errorMessage",value:"This is not a valid value"},"Error Message"),o("smoothly-input-checkbox",{key:"649cc21e6575e27e765e17443678f14ac73ba84f",name:"showLabel",checked:true},"Show Label"),o("smoothly-input",{key:"59125e661fdf79f98c9d5a0f8f2c97eeb52f2b52",name:"placeholder"},"Placeholder"),o("smoothly-input-checkbox",{key:"bc3803d7f0e97f5f8b7c863153aa0ce0d382e1de",name:"alwaysShowGuide"},"Always Show Guide (for date inputs)"))),o("div",{key:"44d87477325a59e8b62c1f7ce3a29cdc29705916",class:"input-wrapper",style:{"--smoothly-input-border-radius":`${this.options.borderRadius}rem`}},o("div",{key:"0adfeb398a2f6f969d206cb46eb4776808fd4fc9",class:"width"},"width: 100%"),o("div",{key:"1e617acd8e12c75a00259062602a8ef8775651cf",class:"left-padding"},"padding-left: 0.5rem"),o("smoothly-input",{key:"9521d2afdc06788925f96c2d0702fd3f00466359",name:"text",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"75e835255286d02e1b8185902b4df7fc2b0a1147"},"Text"),o("smoothly-input-clear",{key:"ddd739321caa1aad97518efcde5068fef178b456",slot:"end"})),o("div",{key:"a4ad7dae327fc4cf6fb5caa803f388f31d06ecff",class:"height"}),o("smoothly-input-select",{key:"f231934cefc5d3821b6f520e72ce616c8df1edf2",name:"month",color:this.options.color,looks:this.options.looks,menuHeight:"6.7items",readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder},this.options.showLabel&&o("label",{key:"a2b4eebb1dea9f2d1b22fd1be6b93a93b0597f7c",slot:"label"},"Select"),o("smoothly-item",{key:"1fb2b0202b27ce56ca8e2fa06caed522ff0b5b3a",value:"1"},"January"),o("smoothly-item",{key:"72aa6742664a98052cc7141e5a687b1cf813faff",value:"2"},"February"),o("smoothly-item",{key:"27a92cf4d1d270763606d11a1b2b863d714a18b9",value:"3"},"March"),o("smoothly-item",{key:"376e37b6c878d72052c0567c7ea8c5ddaedde42c",value:"4"},"April"),o("smoothly-item",{key:"ee5cb30a384b68ac775d4f2dd14d999876cc6e01",value:"5"},"May"),o("smoothly-item",{key:"1cccb653d2ba1e1c26f71b9d6d8d21b10c21640b",value:"6"},"June"),o("smoothly-item",{key:"53d755ca36cda89d4940b7870a2deab407b4aa8e",value:"7"},"July"),o("smoothly-item",{key:"bd2d030a7572e8deab0c4fb4bb5d46909e2152f5",value:"8"},"August"),o("smoothly-item",{key:"4aced24179d7ea64fd2e2974d121ede5530cbc4e",value:"9"},"September"),o("smoothly-item",{key:"175e1169c83cc572769b74b6e3423ed8c2cf16ff",value:"10"},"October"),o("smoothly-item",{key:"c9c658f19451bb0fa45deb3b1474ea26d303ec6d",value:"11"},"November"),o("smoothly-item",{key:"02072c3b0f758a906a37c389d74dc9d1f5afd448",value:"12"},"December"),o("smoothly-input-clear",{key:"363af4a49d65196a12635c968b2c8c4af91a056f",slot:"end"})),o("div",{key:"c81bee8b491579b8707397127ecbf54f3539034b",class:"height"}),o("smoothly-input-checkbox",{key:"edf6953cc408b492b44e68c62607a530a8874438",name:"checkbox",checked:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled},"Check",o("smoothly-input-reset",{key:"eb5e4c9ac0a1589a42aa19923232cfe13fa64361",slot:"end"})),o("div",{key:"97202244d11753ea46184bec8c5b9dfe31e2e0d3",class:"height"}),o("smoothly-input-radio",{key:"8302f3b0ed032f66c75c286b4f0cf4aae285c35a",name:"radio",clearable:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("label",{key:"cd39ed8dc900e22b6efa93e2ef5b4255dad1660d",slot:"label"},"Radio"),o("smoothly-input-radio-item",{key:"8bb8c65b1e90e4e442de1d1329965112667d2eba",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"933fbb50487b72cd8f1ecc196547de5aee5e1e3a",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"6ae375b8ea906bc5f8cfa8f8407a9aee8eb29ab0",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"78c245bd8bf62b9df6937d572f3f815e84cd9bd3",slot:"end"})),o("div",{key:"f5df508ced55175718eaa0f19431f900ff0d2788",class:"height"}),o("smoothly-input-file",{key:"5d4ae4418d3f7013cf22f8fb0f78bd93f0ecb979",name:"file",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"d462612c0e9e13643f4a7df616edcbee8f006b1d",slot:"label"},"File"),o("smoothly-input-clear",{key:"ffc7bd441f3dff66eacb3ed51f5844d63aee7ef5",slot:"end"})),o("div",{key:"c29124164ed913c99cfe804486c354ffa7653132",class:"height"}),o("smoothly-input-range",{key:"6aa933677354590b9ddd1f95fea3a1cf541f7696",name:"range",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,label:this.options.showLabel?"Range":undefined},o("smoothly-input-clear",{key:"46d9c421bf413d7af9f4a8d2cdd695600af7ded5",slot:"end"})),o("div",{key:"93acf05936faabd3aa658e2ea7bb9dcf012d908d",class:"height"}),o("smoothly-input-color",{key:"93b1fe1b0383b938248d54827bf9983a9914b3ef",name:"color",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"b796f92deb8e0d60d1ac58cd8106009e2ed1c2cd"},"Color"),o("smoothly-input-clear",{key:"b28f8a1870a419d0afe6cfa8e0f9fc7302909e86",slot:"end"})),o("div",{key:"aea88b754fff22bae5ab652fbcd1a41d9c8cf895",class:"height"}),o("smoothly-input-date",{key:"1c910d8bc7eb1d7348afc5206d6d934e645cec82",name:"date",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide},this.options.showLabel&&o("span",{key:"ba7c7b9530c8890283b2357bb21e92bc25d64f7f"},"Date"),o("smoothly-input-clear",{key:"6abc2e55907861115339e3e13171751c0db11bac",slot:"end"})),o("div",{key:"164956934ba95e7edaf0631840da001d195ac246",class:"height"}),o("smoothly-input-date-time",{key:"6cfe15912a517a36a9398bb9aaa8bf0d18a67171",name:"dateTime",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel},"DateTime",o("smoothly-input-clear",{key:"79304b822a99ca3c24573e6383bf53855352ce0e",slot:"end"})),o("div",{key:"8a7d1e32a5e7599813f9e3e1c6e53ccfcb0ac546",class:"height"}),o("smoothly-input-date-range",{key:"ad46ae4f0436a0387daf5a8f4dd9f408d96454f8",name:"dateRange",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"f2855738add5a20423d72a6faeacf9184feb27af"},"Date Range"),o("smoothly-input-clear",{key:"f84b6db52dafa6b2c85f8cb807daf0c6199007a1",slot:"end"})),o("div",{key:"54f5a41d2d404c7d17ab212ddbd07c85a2b45966",class:"height"})))}get element(){return this}static get style(){return A()}},[2,"smoothly-input-demo-standard",{duration:[32],options:[32]}]);function V(){if(typeof customElements==="undefined"){return}const e=["smoothly-input-demo-standard","smoothly-button","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-date","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-file","smoothly-input-month","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-item","smoothly-spinner","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-input-demo-standard":if(!customElements.get(s(e))){customElements.define(s(e),G)}break;case"smoothly-button":if(!customElements.get(s(e))){l()}break;case"smoothly-calendar":if(!customElements.get(s(e))){m()}break;case"smoothly-date-text":if(!customElements.get(s(e))){r()}break;case"smoothly-display":if(!customElements.get(s(e))){n()}break;case"smoothly-display-json":if(!customElements.get(s(e))){h()}break;case"smoothly-display-json-object":if(!customElements.get(s(e))){f()}break;case"smoothly-display-json-primitive":if(!customElements.get(s(e))){b()}break;case"smoothly-display-json-record-key":if(!customElements.get(s(e))){p()}break;case"smoothly-form":if(!customElements.get(s(e))){c()}break;case"smoothly-icon":if(!customElements.get(s(e))){y()}break;case"smoothly-input":if(!customElements.get(s(e))){u()}break;case"smoothly-input-checkbox":if(!customElements.get(s(e))){k()}break;case"smoothly-input-clear":if(!customElements.get(s(e))){g()}break;case"smoothly-input-color":if(!customElements.get(s(e))){v()}break;case"smoothly-input-date":if(!customElements.get(s(e))){j()}break;case"smoothly-input-date-range":if(!customElements.get(s(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(s(e))){E()}break;case"smoothly-input-file":if(!customElements.get(s(e))){x()}break;case"smoothly-input-month":if(!customElements.get(s(e))){L()}break;case"smoothly-input-radio":if(!customElements.get(s(e))){M()}break;case"smoothly-input-radio-item":if(!customElements.get(s(e))){R()}break;case"smoothly-input-range":if(!customElements.get(s(e))){S()}break;case"smoothly-input-reset":if(!customElements.get(s(e))){B()}break;case"smoothly-input-select":if(!customElements.get(s(e))){C()}break;case"smoothly-item":if(!customElements.get(s(e))){D()}break;case"smoothly-spinner":if(!customElements.get(s(e))){F()}break;case"smoothly-toggle-switch":if(!customElements.get(s(e))){T()}break}}))}V();export{G as S,V as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,h as o,d as a,t as s}from"./p-BsZrGTcp.js";import{C as d}from"./p-Br0kWrBT.js";import"./p-BVKhAhsB.js";import"./p-DoFURPl2.js";import{L as i,d as c}from"./p-vvQg46ti.js";import{d as l}from"./p-mmAi00ak.js";import{d as m}from"./p-CHjWijPI.js";import{d as r}from"./p-BE5E3Jm6.js";import{d as n}from"./p-CN3iME9d.js";import{d as h}from"./p-DG2pfnCV.js";import{d as f}from"./p-uFR5K4vd.js";import{d as b}from"./p-DvZK__s-.js";import{d as p}from"./p-F8qX8ZuL.js";import{d as y}from"./p-DFSiKg4M.js";import{d as u}from"./p-o8kM0Soe.js";import{d as k}from"./p-Dd9tz4Tj.js";import{d as g}from"./p-BX-sEZyq.js";import{d as v}from"./p-CaQWZMN4.js";import{d as j}from"./p-CtVEKtM6.js";import{d as w}from"./p-KZeR_6LG.js";import{d as E}from"./p-BSHxNVcQ.js";import{d as x}from"./p-gEWA_tZo.js";import{d as L}from"./p-MqffyRVU.js";import{d as M}from"./p-wjlHVReJ.js";import{d as C}from"./p-4Xn3Nprv.js";import{d as R}from"./p-PwCtk_DY.js";import{d as S}from"./p-C22G-tNF.js";import{d as D}from"./p-BplZiuMF.js";import{d as B}from"./p-CVdJ19AA.js";import{d as F}from"./p-DvOr53No.js";import{d as T}from"./p-BsHachOX.js";const A=()=>`.sc-smoothly-input-demo-standard-h{max-width:min(calc(100% - 0.5rem), 48rem);margin:auto}.sc-smoothly-input-demo-standard-h h2.sc-smoothly-input-demo-standard,.sc-smoothly-input-demo-standard-h p.sc-smoothly-input-demo-standard{margin:.5rem 0}.sc-smoothly-input-demo-standard-h>.description.sc-smoothly-input-demo-standard{--smoothly-form-input-min-width:18rem}.sc-smoothly-input-demo-standard-h smoothly-input-range[name=borderRadius].sc-smoothly-input-demo-standard{flex-basis:100%}div.input-wrapper.sc-smoothly-input-demo-standard{display:grid;margin-top:1rem;grid-template-columns:1fr 9rem;gap:1rem;position:relative;justify-content:space-around}div.input-wrapper.sc-smoothly-input-demo-standard>[name].sc-smoothly-input-demo-standard{grid-column:1 / 2}div.input-wrapper.sc-smoothly-input-demo-standard>.width.sc-smoothly-input-demo-standard{width:100%;text-align:center;border-bottom:1px dashed black}div.input-wrapper.sc-smoothly-input-demo-standard>.height.sc-smoothly-input-demo-standard{align-content:center;grid-column:2 / 3;border-left:1px dashed black;padding-left:1rem;content:"hello"}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard{width:0.5rem;grid-column:1 / 2;white-space:nowrap;overflow:visible;position:relative;cursor:default}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard::before{content:"";position:absolute;width:100%;top:1.5rem;bottom:-1rem;border:1px dashed black;z-index:2}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard:hover::before{bottom:-100vh}`;const G=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.duration={hours:8};this.options={}}connectedCallback(){this.updateInputHeightText()}componentDidRender(){this.updateInputHeightText()}updateInputHeightText(){const e=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));this.element.querySelectorAll(".height").forEach((t=>{const o=t.clientHeight;t.innerHTML=`<b>${o/e}rem</b> (${o}pixels)`}))}render(){return o(a,{key:"54cf2b88dfb0ae3326c332e0d608b5e2aab4e2af"},o("div",{key:"c549a1f2bf55faa1db79e85170fd5106269400d0",class:"description"},o("h2",{key:"4cd8be6f457b84c4363c93262a0a8c57d6ad794a"},"Input Standard"),o("p",{key:"d704b09fb11c51a92fa618c106039ed01695ce58"},"Height of input should be ",o("code",{key:"abee88ddb4d762af1cde9a6f7c94ad13fd069152"},"3rem")," including border. This is should result in a 48 pixel height at 100% zoom, assuming a root font-size of 16 pixels."),o("smoothly-form",{key:"0922d6713e44cffa51cc253e94fb1ae98a823f24",looks:"grid",onSmoothlyFormInput:e=>this.options=e.detail},o("smoothly-input-select",{key:"1cdba85a6cddb32a49a763394b8cdb7b36d2c24a",name:"color"},o("span",{key:"58013cb8ab43cc7cc05f6ab58670ec5f41eab179",slot:"label"},"Color"),d.values.map((e=>o("smoothly-item",{value:e},o("span",{color:e},e)))),o("smoothly-input-clear",{key:"0eae109840ebc9b0101fb08f7daa61253826da9c",slot:"end"})),o("smoothly-input-select",{key:"f48cf9bd8f86d1eb5e68e3383bf9178ea27b5f22",name:"looks"},o("span",{key:"d6f665f4cbc8e871229312e611180bc0bf9607d1",slot:"label"},"Looks"),i.values.map((e=>o("smoothly-item",{value:e},e)))),o("smoothly-input-range",{key:"955d191d8da75e9dace4c57e6f6f3d427bdac864",label:"Border Radius (rem)",name:"borderRadius",min:0,max:2,step:.25}),o("smoothly-input-checkbox",{key:"cbd64dab264df038bf40efa6c2d8733f6c767185",name:"readonly"},"Readonly"),o("smoothly-input-checkbox",{key:"e5a2a80fba021019871563ac7197360060ccb451",name:"disabled"},"Disabled"),o("smoothly-input-checkbox",{key:"f1bca93555a7cc9fa7a56a39e6bbdfc5b7570edc",name:"invalid"},"Invalid"),o("smoothly-input",{key:"15361ba7d104e800e627aebc52d8fff1623782b9",name:"errorMessage",value:"This is not a valid value"},"Error Message"),o("smoothly-input-checkbox",{key:"649cc21e6575e27e765e17443678f14ac73ba84f",name:"showLabel",checked:true},"Show Label"),o("smoothly-input",{key:"59125e661fdf79f98c9d5a0f8f2c97eeb52f2b52",name:"placeholder"},"Placeholder"),o("smoothly-input-checkbox",{key:"bc3803d7f0e97f5f8b7c863153aa0ce0d382e1de",name:"alwaysShowGuide"},"Always Show Guide (for date inputs)"))),o("div",{key:"44d87477325a59e8b62c1f7ce3a29cdc29705916",class:"input-wrapper",style:{"--smoothly-input-border-radius":`${this.options.borderRadius}rem`}},o("div",{key:"0adfeb398a2f6f969d206cb46eb4776808fd4fc9",class:"width"},"width: 100%"),o("div",{key:"1e617acd8e12c75a00259062602a8ef8775651cf",class:"left-padding"},"padding-left: 0.5rem"),o("smoothly-input",{key:"9521d2afdc06788925f96c2d0702fd3f00466359",name:"text",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"75e835255286d02e1b8185902b4df7fc2b0a1147"},"Text"),o("smoothly-input-clear",{key:"ddd739321caa1aad97518efcde5068fef178b456",slot:"end"})),o("div",{key:"a4ad7dae327fc4cf6fb5caa803f388f31d06ecff",class:"height"}),o("smoothly-input-select",{key:"f231934cefc5d3821b6f520e72ce616c8df1edf2",name:"month",color:this.options.color,looks:this.options.looks,menuHeight:"6.7items",readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder},this.options.showLabel&&o("label",{key:"a2b4eebb1dea9f2d1b22fd1be6b93a93b0597f7c",slot:"label"},"Select"),o("smoothly-item",{key:"1fb2b0202b27ce56ca8e2fa06caed522ff0b5b3a",value:"1"},"January"),o("smoothly-item",{key:"72aa6742664a98052cc7141e5a687b1cf813faff",value:"2"},"February"),o("smoothly-item",{key:"27a92cf4d1d270763606d11a1b2b863d714a18b9",value:"3"},"March"),o("smoothly-item",{key:"376e37b6c878d72052c0567c7ea8c5ddaedde42c",value:"4"},"April"),o("smoothly-item",{key:"ee5cb30a384b68ac775d4f2dd14d999876cc6e01",value:"5"},"May"),o("smoothly-item",{key:"1cccb653d2ba1e1c26f71b9d6d8d21b10c21640b",value:"6"},"June"),o("smoothly-item",{key:"53d755ca36cda89d4940b7870a2deab407b4aa8e",value:"7"},"July"),o("smoothly-item",{key:"bd2d030a7572e8deab0c4fb4bb5d46909e2152f5",value:"8"},"August"),o("smoothly-item",{key:"4aced24179d7ea64fd2e2974d121ede5530cbc4e",value:"9"},"September"),o("smoothly-item",{key:"175e1169c83cc572769b74b6e3423ed8c2cf16ff",value:"10"},"October"),o("smoothly-item",{key:"c9c658f19451bb0fa45deb3b1474ea26d303ec6d",value:"11"},"November"),o("smoothly-item",{key:"02072c3b0f758a906a37c389d74dc9d1f5afd448",value:"12"},"December"),o("smoothly-input-clear",{key:"363af4a49d65196a12635c968b2c8c4af91a056f",slot:"end"})),o("div",{key:"c81bee8b491579b8707397127ecbf54f3539034b",class:"height"}),o("smoothly-input-checkbox",{key:"edf6953cc408b492b44e68c62607a530a8874438",name:"checkbox",checked:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled},"Check",o("smoothly-input-reset",{key:"eb5e4c9ac0a1589a42aa19923232cfe13fa64361",slot:"end"})),o("div",{key:"97202244d11753ea46184bec8c5b9dfe31e2e0d3",class:"height"}),o("smoothly-input-radio",{key:"8302f3b0ed032f66c75c286b4f0cf4aae285c35a",name:"radio",clearable:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("label",{key:"cd39ed8dc900e22b6efa93e2ef5b4255dad1660d",slot:"label"},"Radio"),o("smoothly-input-radio-item",{key:"8bb8c65b1e90e4e442de1d1329965112667d2eba",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"933fbb50487b72cd8f1ecc196547de5aee5e1e3a",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"6ae375b8ea906bc5f8cfa8f8407a9aee8eb29ab0",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"78c245bd8bf62b9df6937d572f3f815e84cd9bd3",slot:"end"})),o("div",{key:"f5df508ced55175718eaa0f19431f900ff0d2788",class:"height"}),o("smoothly-input-file",{key:"5d4ae4418d3f7013cf22f8fb0f78bd93f0ecb979",name:"file",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"d462612c0e9e13643f4a7df616edcbee8f006b1d",slot:"label"},"File"),o("smoothly-input-clear",{key:"ffc7bd441f3dff66eacb3ed51f5844d63aee7ef5",slot:"end"})),o("div",{key:"c29124164ed913c99cfe804486c354ffa7653132",class:"height"}),o("smoothly-input-range",{key:"6aa933677354590b9ddd1f95fea3a1cf541f7696",name:"range",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,label:this.options.showLabel?"Range":undefined},o("smoothly-input-clear",{key:"46d9c421bf413d7af9f4a8d2cdd695600af7ded5",slot:"end"})),o("div",{key:"93acf05936faabd3aa658e2ea7bb9dcf012d908d",class:"height"}),o("smoothly-input-color",{key:"93b1fe1b0383b938248d54827bf9983a9914b3ef",name:"color",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"b796f92deb8e0d60d1ac58cd8106009e2ed1c2cd"},"Color"),o("smoothly-input-clear",{key:"b28f8a1870a419d0afe6cfa8e0f9fc7302909e86",slot:"end"})),o("div",{key:"aea88b754fff22bae5ab652fbcd1a41d9c8cf895",class:"height"}),o("smoothly-input-date",{key:"1c910d8bc7eb1d7348afc5206d6d934e645cec82",name:"date",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide},this.options.showLabel&&o("span",{key:"ba7c7b9530c8890283b2357bb21e92bc25d64f7f"},"Date"),o("smoothly-input-clear",{key:"6abc2e55907861115339e3e13171751c0db11bac",slot:"end"})),o("div",{key:"164956934ba95e7edaf0631840da001d195ac246",class:"height"}),o("smoothly-input-date-time",{key:"6cfe15912a517a36a9398bb9aaa8bf0d18a67171",name:"dateTime",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel},"DateTime",o("smoothly-input-clear",{key:"79304b822a99ca3c24573e6383bf53855352ce0e",slot:"end"})),o("div",{key:"8a7d1e32a5e7599813f9e3e1c6e53ccfcb0ac546",class:"height"}),o("smoothly-input-date-range",{key:"ad46ae4f0436a0387daf5a8f4dd9f408d96454f8",name:"dateRange",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"f2855738add5a20423d72a6faeacf9184feb27af"},"Date Range"),o("smoothly-input-clear",{key:"f84b6db52dafa6b2c85f8cb807daf0c6199007a1",slot:"end"})),o("div",{key:"54f5a41d2d404c7d17ab212ddbd07c85a2b45966",class:"height"})))}get element(){return this}static get style(){return A()}},[2,"smoothly-input-demo-standard",{duration:[32],options:[32]}]);function N(){if(typeof customElements==="undefined"){return}const e=["smoothly-input-demo-standard","smoothly-button","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-date","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-file","smoothly-input-month","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-item","smoothly-spinner","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-input-demo-standard":if(!customElements.get(s(e))){customElements.define(s(e),G)}break;case"smoothly-button":if(!customElements.get(s(e))){l()}break;case"smoothly-calendar":if(!customElements.get(s(e))){m()}break;case"smoothly-date-text":if(!customElements.get(s(e))){r()}break;case"smoothly-display":if(!customElements.get(s(e))){n()}break;case"smoothly-display-json":if(!customElements.get(s(e))){h()}break;case"smoothly-display-json-object":if(!customElements.get(s(e))){f()}break;case"smoothly-display-json-primitive":if(!customElements.get(s(e))){b()}break;case"smoothly-display-json-record-key":if(!customElements.get(s(e))){p()}break;case"smoothly-form":if(!customElements.get(s(e))){c()}break;case"smoothly-icon":if(!customElements.get(s(e))){y()}break;case"smoothly-input":if(!customElements.get(s(e))){u()}break;case"smoothly-input-checkbox":if(!customElements.get(s(e))){k()}break;case"smoothly-input-clear":if(!customElements.get(s(e))){g()}break;case"smoothly-input-color":if(!customElements.get(s(e))){v()}break;case"smoothly-input-date":if(!customElements.get(s(e))){j()}break;case"smoothly-input-date-range":if(!customElements.get(s(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(s(e))){E()}break;case"smoothly-input-file":if(!customElements.get(s(e))){x()}break;case"smoothly-input-month":if(!customElements.get(s(e))){L()}break;case"smoothly-input-radio":if(!customElements.get(s(e))){M()}break;case"smoothly-input-radio-item":if(!customElements.get(s(e))){C()}break;case"smoothly-input-range":if(!customElements.get(s(e))){R()}break;case"smoothly-input-reset":if(!customElements.get(s(e))){S()}break;case"smoothly-input-select":if(!customElements.get(s(e))){D()}break;case"smoothly-item":if(!customElements.get(s(e))){B()}break;case"smoothly-spinner":if(!customElements.get(s(e))){F()}break;case"smoothly-toggle-switch":if(!customElements.get(s(e))){T()}break}}))}N();export{G as S,N as d};
|
|
2
|
+
//# sourceMappingURL=p-Ch1HU37X.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as o,h as t,d as a,t as s}from"./p-BsZrGTcp.js";import{d as m}from"./p-mmAi00ak.js";import{d as l}from"./p-Cl8L61mt.js";import{d as c}from"./p-CN3iME9d.js";import{d as i}from"./p-DG2pfnCV.js";import{d
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as o,h as t,d as a,t as s}from"./p-BsZrGTcp.js";import{d as m}from"./p-mmAi00ak.js";import{d as l}from"./p-Cl8L61mt.js";import{d as c}from"./p-CN3iME9d.js";import{d as i}from"./p-DG2pfnCV.js";import{d}from"./p-uFR5K4vd.js";import{d as f}from"./p-DvZK__s-.js";import{d as b}from"./p-F8qX8ZuL.js";import{d as r}from"./p-vvQg46ti.js";import{d as n}from"./p-DFSiKg4M.js";import{d as y}from"./p-o8kM0Soe.js";import{d as p}from"./p-Dd9tz4Tj.js";import{d as u}from"./p-BX-sEZyq.js";import{d as h}from"./p-CaQWZMN4.js";import{d as k}from"./p-DLgeylX5.js";import{d as j}from"./p-gEWA_tZo.js";import{d as g}from"./p-wjlHVReJ.js";import{d as v}from"./p-4Xn3Nprv.js";import{d as E}from"./p-PwCtk_DY.js";import{d as x}from"./p-C22G-tNF.js";import{d as F}from"./p-BplZiuMF.js";import{d as C}from"./p-BLdivqFr.js";import{d as z}from"./p-CVdJ19AA.js";import{d as D}from"./p-DvOr53No.js";import{d as A}from"./p-BsHachOX.js";const L=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}}render(){return t(a,{key:"2b2e779dc35f9f35173515a6db59425654d7446a"},t("h2",{key:"b2423e5f45a6841b6fedcb7db17626ed192ee15d"},"All inputs"),t("smoothly-form",{key:"ac6fc721d22456edb5104ba9553c423d6f8bdebe",looks:"grid",type:"create",readonly:true,action:"https://api.toiletapi.com/upload/6b12fd2f-e896-46f9-b38f-25cf42cee4b4",onSmoothlyFormSubmit:e=>{Object.entries(e.detail.value).forEach((([e,o])=>console.log(e,o)))}},t("smoothly-input",{key:"4ec033bb9d51a7edc81cce2a1fde55bd21458318",readonly:true,name:"First Name",value:"John"},"First name"),t("smoothly-input",{key:"8d6abee797b1c9b60efeb068c828453174401012",showLabel:false,name:"Last name",value:"Doe"},"Last name",t("smoothly-input-clear",{key:"8caeac3cbd2290eaeeda549aea083d4499b960c5",size:"icon",slot:"end"})),t("smoothly-input",{key:"9a22277ed064a84b98a8c68c5f176758735748f0",type:"phone",name:"Phone",value:"777888999"},"Phone",t("smoothly-input-reset",{key:"2b45ff8ceaf71289d350e102d53123dc1c82600f",size:"icon",slot:"end"})),t("smoothly-input-radio",{key:"15856b48204c21b5f7318df22130e17aa3e14e8d",clearable:true,name:"radioFirstInput"},t("label",{key:"c94b6e0c185c8ab4325161a6e4249863017e5eb2",slot:"label"},"Clearable"),t("smoothly-input-radio-item",{key:"e978bde5ec519ab872eac3fb2a7d75b493099f31",value:"first"},"Label 1"),t("smoothly-input-radio-item",{key:"3c30fd0d9b549f93c912759f8329570db377df79",selected:true,value:"second"},"Label 2"),t("smoothly-input-radio-item",{key:"2f3f773cade1c39fa2a121b24ba2778a42d9a9b0",value:"third"},"Label 3")),t("smoothly-input-color",{key:"f1e0b0b1e759c85c5de1f3a8af9818b41c692bdb",name:"color"},"Color"),t("smoothly-input-select",{key:"7e1069ff0515224e17145539afefec11979ed88c",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},t("label",{key:"c42749acb44e6e7db99f4e7981f20ad0c09f1694",slot:"label"},"Month multiple select"),t("smoothly-item",{key:"fdd0c90294bdf50d77ccf187777fdd804760b8ac",value:"1"},"January"),t("smoothly-item",{key:"4f0c9d90f6909eaacccd5d385e317832f5a8b213",value:"2"},"February"),t("smoothly-item",{key:"7779ea4af1f17cb48ef0249b7857262deb6c485d",value:"3"},"March"),t("smoothly-item",{key:"5f15c3d32240bfb7c3b8d0a61f90599697b8e2a0",value:"4"},"April"),t("smoothly-item",{key:"0952c95b2cf623f5573d70b5fa39b1c1ce008f16",value:"5"},"May"),t("smoothly-item",{key:"1352e9245e39341d99d1bc8d051691b6b70dac37",value:"6"},"June"),t("smoothly-item",{key:"7eddedff608a9148cb2b9c17f23ac2108b2190fd",value:"7"},"July"),t("smoothly-item",{key:"627e81c5c7ddd5e1230b6eead20ac7932edbff9a",value:"8"},"August"),t("smoothly-item",{key:"587bcf666e0bc92c14f5665f975563f06a419bac",value:"9"},"September"),t("smoothly-item",{key:"896f05e2b88d7613cbc7f21b2aa4c58f1ae3938d",value:"10"},"October"),t("smoothly-item",{key:"fb539afa5edd3fe8391df5fc9d63fcb84940512c",value:"11"},"November"),t("smoothly-item",{key:"959e9af2c479a299431f302041649bd86f5db331",value:"12"},"December")),t("smoothly-input-select",{key:"64e83fb7dba19c8c21b5697eade0c7c5404d330c",name:"select-icon",clearable:false,showSelected:false},t("smoothly-item",{key:"b1a055ab1c73f28e0b49e626561aeff83efb124b",value:"folder",selected:true},t("smoothly-icon",{key:"9ba931c9dd28c9f88168f5ab94fd80bc6f7f6bc0",size:"small",name:"folder-outline"})),t("smoothly-item",{key:"acd791714a16504b5dc6a56f2fbfc89cf1ef4600",value:"camera"},t("smoothly-icon",{key:"d65e7beb3c74941bf494769126124ef79ce800d0",size:"small",name:"camera-outline"}))),t("smoothly-input-checkbox",{key:"d6f2f199daf447bb0992ca8839b89e4e14166846",name:"checkbox"},"Check the box"),t("smoothly-input-checkbox",{key:"79885d84642626f7cba6d348d0044f2c8037007e",name:"checkbox2",checked:true},"Check the box 2"),t("smoothly-input-range",{key:"7e791279c3b1bd2898d4c5e9e35ef9df76aa14cf",step:1,name:"range3",value:20,label:"Range"}),t("smoothly-input",{key:"f7b07cef9882952dc91be6484c04ba459ef5db62",name:"pets.0.name"},"First Pet's Name"),t("smoothly-input-range",{key:"44b404105c6d9aa19c7f14ac529e7b8ab3f964e9",name:"pets.0.age",max:100,step:1,label:"First Pet's Age"}),t("smoothly-input",{key:"aca9bc7aebd243f8e82158d1c60b7a69886e9a02",name:"pets.1.name"},"Second Pet's Name"),t("smoothly-input-range",{key:"674b16d94949bcbd3fd4980b0b262ba580efbd5b",name:"pets.1.age",max:100,step:1,label:"Second Pet's Age"}),t("smoothly-input",{key:"b25175ffa941b70d606a66db0f97e61547faf5b9",name:"pets.2.name"},"Third Pet's Name"),t("smoothly-input-range",{key:"0113d466fc09afc4734a65500cdc20b06267d77d",name:"pets.2.age",max:100,step:1,label:"Third Pet's Age"}),t("smoothly-input-range",{key:"d06183dd7731f6a70070ff0d823fb18ad8e4a10f",dual:true,name:"dualRange",min:0,max:100,step:1,label:"Dual Range"}),t("smoothly-input-file",{key:"ed5cf91c1db69c748cf52d4a99601fc2ddd675eb",name:"profile",placeholder:"Click or drag your profile picture here..."},t("span",{key:"f72fba530a1ee1d6f6a021544863dbb892f5a955",slot:"label"},"Profile"),t("smoothly-icon",{key:"dae1cc212fb3ea87ec62ac7e40c7d489bcb5cb1d",slot:"button",name:"person-circle-outline",size:"tiny",fill:"default"})),t("smoothly-input",{key:"0e9e8dc38f055440bba351cb5b7c3186d480f661",type:"duration",name:"duration",value:{}},"Duration"),t("smoothly-input-clear",{key:"ce7946c654f4a4cef855455a94311b08eee47108",fill:"default",type:"form",color:"warning",slot:"clear",size:"icon",shape:"rounded"}),t("smoothly-input-edit",{key:"c77b9febf666fac99980b868327a3a03946edb1a",fill:"default",type:"form",color:"tertiary",slot:"edit",size:"icon",shape:"rounded"}),t("smoothly-input-reset",{key:"d1597484a38571db597eecca554f706f484b8d08",fill:"default",type:"form",color:"warning",slot:"reset",size:"icon",shape:"rounded"}),t("smoothly-input-submit",{key:"0fb965b190a21ff54bb69a34b41bf8b264b06b81",delete:true,slot:"delete",color:"danger",size:"icon",shape:"rounded"}),t("smoothly-input-submit",{key:"2003e45ab3c0fa5301cbbc39717b9c2dd3b74af5",fill:"default",color:"success",slot:"submit",size:"icon",shape:"rounded"})))}},[2,"smoothly-form-demo-all"]);function N(){if(typeof customElements==="undefined"){return}const e=["smoothly-form-demo-all","smoothly-button","smoothly-button-confirm","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-edit","smoothly-input-file","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-form-demo-all":if(!customElements.get(s(e))){customElements.define(s(e),L)}break;case"smoothly-button":if(!customElements.get(s(e))){m()}break;case"smoothly-button-confirm":if(!customElements.get(s(e))){l()}break;case"smoothly-display":if(!customElements.get(s(e))){c()}break;case"smoothly-display-json":if(!customElements.get(s(e))){i()}break;case"smoothly-display-json-object":if(!customElements.get(s(e))){d()}break;case"smoothly-display-json-primitive":if(!customElements.get(s(e))){f()}break;case"smoothly-display-json-record-key":if(!customElements.get(s(e))){b()}break;case"smoothly-form":if(!customElements.get(s(e))){r()}break;case"smoothly-icon":if(!customElements.get(s(e))){n()}break;case"smoothly-input":if(!customElements.get(s(e))){y()}break;case"smoothly-input-checkbox":if(!customElements.get(s(e))){p()}break;case"smoothly-input-clear":if(!customElements.get(s(e))){u()}break;case"smoothly-input-color":if(!customElements.get(s(e))){h()}break;case"smoothly-input-edit":if(!customElements.get(s(e))){k()}break;case"smoothly-input-file":if(!customElements.get(s(e))){j()}break;case"smoothly-input-radio":if(!customElements.get(s(e))){g()}break;case"smoothly-input-radio-item":if(!customElements.get(s(e))){v()}break;case"smoothly-input-range":if(!customElements.get(s(e))){E()}break;case"smoothly-input-reset":if(!customElements.get(s(e))){x()}break;case"smoothly-input-select":if(!customElements.get(s(e))){F()}break;case"smoothly-input-submit":if(!customElements.get(s(e))){C()}break;case"smoothly-item":if(!customElements.get(s(e))){z()}break;case"smoothly-spinner":if(!customElements.get(s(e))){D()}break;case"smoothly-toggle-switch":if(!customElements.get(s(e))){A()}break}}))}N();export{L as S,N as d};
|
|
2
|
+
//# sourceMappingURL=p-Ch5M1RA7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,H as s,h as m,d as t,t as e}from"./p-BsZrGTcp.js";import{d as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as o,H as s,h as m,d as t,t as e}from"./p-BsZrGTcp.js";import{d as a}from"./p-mmAi00ak.js";import{d as r}from"./p-Cl8L61mt.js";import{d as l}from"./p-CHjWijPI.js";import{d as i}from"./p-BE5E3Jm6.js";import{d}from"./p-CN3iME9d.js";import{d as c}from"./p-DG2pfnCV.js";import{d as f}from"./p-uFR5K4vd.js";import{d as p}from"./p-DvZK__s-.js";import{d as n}from"./p-F8qX8ZuL.js";import{d as y}from"./p-vvQg46ti.js";import{d as h}from"./p-Ch5M1RA7.js";import{d as b}from"./p-D5xdTtVs.js";import{d as u}from"./p-MduEqLch.js";import{d as k}from"./p-B3S9rR8a.js";import{d as j}from"./p-Bzg8bBIr.js";import{d as E}from"./p-EsCYK0HQ.js";import{d as g}from"./p-WvQaS_J6.js";import{d as C}from"./p-DWcI5nnM.js";import{d as v}from"./p-BI_XG1Oj.js";import{d as x}from"./p-U7a1lSmf.js";import{d as B}from"./p-C-5nbahV.js";import{d as M}from"./p-DFSiKg4M.js";import{d as D}from"./p-o8kM0Soe.js";import{d as S}from"./p-Dd9tz4Tj.js";import{d as V}from"./p-BX-sEZyq.js";import{d as Z}from"./p-CaQWZMN4.js";import{d as w}from"./p-CtVEKtM6.js";import{d as L}from"./p-KZeR_6LG.js";import{d as _}from"./p-BSHxNVcQ.js";import{d as F}from"./p-DLgeylX5.js";import{d as K}from"./p-gEWA_tZo.js";import{d as N}from"./p-MqffyRVU.js";import{d as Q}from"./p-wjlHVReJ.js";import{d as R}from"./p-4Xn3Nprv.js";import{d as X}from"./p-PwCtk_DY.js";import{d as q}from"./p-C22G-tNF.js";import{d as A}from"./p-BplZiuMF.js";import{d as G}from"./p-BLdivqFr.js";import{d as H}from"./p-CVdJ19AA.js";import{d as I}from"./p-DvOr53No.js";import{d as W}from"./p-Cs0CtSI2.js";import{d as J}from"./p-2Y5tLcQ1.js";import{d as O}from"./p-BsHachOX.js";const T=()=>`.sc-smoothly-form-demo-h{display:flex;margin-top:2em;margin-bottom:10em}.sc-smoothly-form-demo-h>div.sc-smoothly-form-demo{margin:auto;width:1200px;max-width:calc(100% - 0.5rem)}`;const Y=o(class o extends s{constructor(o){super();if(o!==false){this.__registerHost()}}render(){return m(t,{key:"e6b40ea5e535c8fd4fbbe65aa060d0ba061f5a3e"},m("div",{key:"848116c5bc43a4a5adb20ecf3f66a66b050e529c"},m("smoothly-form-demo-all",{key:"44179c77bfd53bfa4f347a465a3f4000d4d94b08"}),m("smoothly-form-demo-pet",{key:"356b17321dc0f11e63c8dd4846c4e1d91c7b6b5c"}),m("smoothly-form-demo-card",{key:"2584856236b89b5818551f8826056c0a14ab6356"}),m("smoothly-form-demo-login",{key:"dacc85e611dec4115fefc49f63463912b6718285"}),m("smoothly-form-demo-prices",{key:"500d6d4c056c79113b16bd0f67bfe0ab562cd8d8"}),m("smoothly-form-demo-typed",{key:"933cce32ed4668eb28140c0c01c8238cdf1526d2"}),m("smoothly-form-demo-transparent",{key:"2a39b5d64aaff4d53d703c9508df3de18d5a6ad6"}),m("smoothly-form-demo-date",{key:"fb0a6356529047d3bbbebd1b5980c2884be0cbb6"}),m("smoothly-form-demo-schedule",{key:"c7eb48895c714d436f04544af9519a93232f76d0"}),m("smoothly-form-demo-date-range",{key:"6370bf9ca0671705777b03e6b985361d06ee9d56"}),m("smoothly-form-demo-controlled",{key:"abf920dd124a8c43ce7818ba29bb1931a4b90910"})))}static get style(){return T()}},[2,"smoothly-form-demo"]);function z(){if(typeof customElements==="undefined"){return}const o=["smoothly-form-demo","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-form-demo-all","smoothly-form-demo-card","smoothly-form-demo-controlled","smoothly-form-demo-date","smoothly-form-demo-date-range","smoothly-form-demo-login","smoothly-form-demo-pet","smoothly-form-demo-prices","smoothly-form-demo-schedule","smoothly-form-demo-transparent","smoothly-form-demo-typed","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-date","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-edit","smoothly-input-file","smoothly-input-month","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-tab","smoothly-tabs","smoothly-toggle-switch"];o.forEach((o=>{switch(o){case"smoothly-form-demo":if(!customElements.get(e(o))){customElements.define(e(o),Y)}break;case"smoothly-button":if(!customElements.get(e(o))){a()}break;case"smoothly-button-confirm":if(!customElements.get(e(o))){r()}break;case"smoothly-calendar":if(!customElements.get(e(o))){l()}break;case"smoothly-date-text":if(!customElements.get(e(o))){i()}break;case"smoothly-display":if(!customElements.get(e(o))){d()}break;case"smoothly-display-json":if(!customElements.get(e(o))){c()}break;case"smoothly-display-json-object":if(!customElements.get(e(o))){f()}break;case"smoothly-display-json-primitive":if(!customElements.get(e(o))){p()}break;case"smoothly-display-json-record-key":if(!customElements.get(e(o))){n()}break;case"smoothly-form":if(!customElements.get(e(o))){y()}break;case"smoothly-form-demo-all":if(!customElements.get(e(o))){h()}break;case"smoothly-form-demo-card":if(!customElements.get(e(o))){b()}break;case"smoothly-form-demo-controlled":if(!customElements.get(e(o))){u()}break;case"smoothly-form-demo-date":if(!customElements.get(e(o))){k()}break;case"smoothly-form-demo-date-range":if(!customElements.get(e(o))){j()}break;case"smoothly-form-demo-login":if(!customElements.get(e(o))){E()}break;case"smoothly-form-demo-pet":if(!customElements.get(e(o))){g()}break;case"smoothly-form-demo-prices":if(!customElements.get(e(o))){C()}break;case"smoothly-form-demo-schedule":if(!customElements.get(e(o))){v()}break;case"smoothly-form-demo-transparent":if(!customElements.get(e(o))){x()}break;case"smoothly-form-demo-typed":if(!customElements.get(e(o))){B()}break;case"smoothly-icon":if(!customElements.get(e(o))){M()}break;case"smoothly-input":if(!customElements.get(e(o))){D()}break;case"smoothly-input-checkbox":if(!customElements.get(e(o))){S()}break;case"smoothly-input-clear":if(!customElements.get(e(o))){V()}break;case"smoothly-input-color":if(!customElements.get(e(o))){Z()}break;case"smoothly-input-date":if(!customElements.get(e(o))){w()}break;case"smoothly-input-date-range":if(!customElements.get(e(o))){L()}break;case"smoothly-input-date-time":if(!customElements.get(e(o))){_()}break;case"smoothly-input-edit":if(!customElements.get(e(o))){F()}break;case"smoothly-input-file":if(!customElements.get(e(o))){K()}break;case"smoothly-input-month":if(!customElements.get(e(o))){N()}break;case"smoothly-input-radio":if(!customElements.get(e(o))){Q()}break;case"smoothly-input-radio-item":if(!customElements.get(e(o))){R()}break;case"smoothly-input-range":if(!customElements.get(e(o))){X()}break;case"smoothly-input-reset":if(!customElements.get(e(o))){q()}break;case"smoothly-input-select":if(!customElements.get(e(o))){A()}break;case"smoothly-input-submit":if(!customElements.get(e(o))){G()}break;case"smoothly-item":if(!customElements.get(e(o))){H()}break;case"smoothly-spinner":if(!customElements.get(e(o))){I()}break;case"smoothly-tab":if(!customElements.get(e(o))){W()}break;case"smoothly-tabs":if(!customElements.get(e(o))){J()}break;case"smoothly-toggle-switch":if(!customElements.get(e(o))){O()}break}}))}z();export{Y as S,z as d};
|
|
2
|
+
//# sourceMappingURL=p-CsTmaH-Y.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as o,c as n,h as s,d as e,t as i}from"./p-BsZrGTcp.js";import{E as r}from"./p-iQDU7l2c.js";import{I as a}from"./p-vvQg46ti.js";import{d as l}from"./p-CN3iME9d.js";import{d as h}from"./p-DG2pfnCV.js";import{d as u}from"./p-uFR5K4vd.js";import{d as p}from"./p-DvZK__s-.js";import{d}from"./p-F8qX8ZuL.js";import{d as m}from"./p-DFSiKg4M.js";import{d as c}from"./p-o8kM0Soe.js";var g;(function(t){function o(t){return typeof t=="object"&&t!=undefined&&"start"in t&&"end"in t}t.is=o;function n(t,o,n){return t<o?o:t>n?n:t}t.clamp=n;function s(t,o){var n,s;const e=!o?undefined:(s=(n=o.toString().split(".")[1])===null||n===void 0?void 0:n.length)!==null&&s!==void 0?s:0;return+t.toFixed(e)}t.round=s;function e(t,o,s,e,i){const r=n(s,e,i);return o=="start"?{start:Math.min(r,t.end),end:t.end}:{start:t.start,end:Math.max(r,t.start)}}t.setPart=e;function i(t,n){return o(t)?{start:s(t.start,n),end:s(t.end,n)}:t==undefined||Number.isNaN(t)?undefined:s(t,n)}t.normalize=i;function r(t,n){return o(t)&&o(n)?t.start===n.start&&t.end===n.end:t===n}t.equals=r;function a(t){return o(t)?typeof t.start=="number"&&typeof t.end=="number":typeof t=="number"}t.defined=a;function l(t,o,n){return n==o?0:(t-o)/(n-o)*100}t.percent=l})(g||(g={}));const y=()=>`.sc-smoothly-input-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-range-h,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-range-h>input.sc-smoothly-input-range,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within)>input.sc-smoothly-input-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-range-h.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .label.sc-smoothly-input-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-range-h .label.sc-smoothly-input-range{transform-origin:top right}.sc-smoothly-input-range-h.floating-label.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.floating-label .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder] .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly] .sc-smoothly-input-range-s>[slot=label],.floating-label.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-value.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-text.sc-smoothly-input-range-h .label.sc-smoothly-input-range,[placeholder].sc-smoothly-input-range-h .label.sc-smoothly-input-range,[readonly].sc-smoothly-input-range-h .label.sc-smoothly-input-range,.sc-smoothly-input-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-range{display:none}.sc-smoothly-input-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}*.sc-smoothly-input-range{box-sizing:border-box}.sc-smoothly-input-range-h{position:relative;width:100%;justify-content:center;align-items:center;display:flex;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-range-h>div.sc-smoothly-input-range:not([slot]){position:relative;display:flex;justify-content:center;align-items:center;width:100%;padding-right:var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:12em;--input-min-height:calc(3rem - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{white-space:nowrap}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range{padding:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{text-align:center;margin-left:var(--input-padding-side);border:none;box-sizing:border-box;width:6rem;order:3;margin:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-display.sc-smoothly-input-range,.sc-smoothly-input-range-h:not(.output-side-right)>div.sc-smoothly-input-range>label.sc-smoothly-input-range{display:none}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range input.sc-smoothly-input-range{padding:0;text-align:center}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{width:100%}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>label.sc-smoothly-input-range{position:static;font-size:inherit;text-align:center;margin:0 var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none;width:100%;background:transparent;height:1.5em;padding:0 .4em}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;border-radius:100%;margin-top:-.25em;border:none}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{width:100%;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-tint))}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-tint))}[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track,[disabled].sc-smoothly-input-range-h,[disabled].sc-smoothly-input-range-h *.sc-smoothly-input-range{cursor:not-allowed}input.sc-smoothly-input-range::-webkit-outer-spin-button,input.sc-smoothly-input-range::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dual.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:6rem;flex:0 0 auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range{position:relative;flex:1;height:1.5em;display:flex;align-items:center}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range::before{content:"";position:absolute;left:.4em;right:.4em;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .fill.sc-smoothly-input-range{position:absolute;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-primary-color));pointer-events:none}.dual[readonly].sc-smoothly-input-range-h .fill.sc-smoothly-input-range,.dual[disabled].sc-smoothly-input-range-h .fill.sc-smoothly-input-range{background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{position:absolute;left:0;right:0;width:100%;margin:0;background:transparent;pointer-events:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;margin-top:-.25em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{cursor:not-allowed}`;const b=t(class t extends o{constructor(t){super();if(t!==false){this.__registerHost()}this.smoothlyInputLooks=n(this,"smoothlyInputLooks");this.smoothlyInput=n(this,"smoothlyInput");this.smoothlyUserInput=n(this,"smoothlyUserInput");this.smoothlyInputLoad=n(this,"smoothlyInputLoad");this.smoothlyFormDisable=n(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=r.Observer.create(this);this.initialValue=undefined;this.sliding=false;this.value=undefined;this.dual=false;this.defined=false;this.readonly=false;this.type="text";this.min=0;this.max=100;this.name="range";this.outputSide="left";this.showInput=false}componentWillLoad(){this.smoothlyInputLooks.emit(((t,o)=>{var n;return this.looks=(n=this.looks)!==null&&n!==void 0?n:t,this.color=o}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));if(this.dual&&!g.is(this.value)){this.initialValue={start:this.min,end:this.max};this.value=this.initialValue}else{this.value&&(this.initialValue=this.value);this.valueChanged()}}smoothlyInputLoadHandler(t){a.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,o){a.formRename(this,o)}async register(){a.formAdd(this)}async unregister(){a.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false;this.valueChanged()}valueChanged(){const t=g.normalize(this.value,this.step);if(!g.equals(t,this.value)){this.value=t;return}this.isDifferentFromInitial=!g.equals(this.initialValue,this.value);this.defined=g.defined(this.value);if(!this.sliding){this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value})}}watchingReadonly(){this.observer.publish()}setValue(t){var o;if(t==undefined||Number.isNaN(t)){this.value=undefined}else if(t<this.min){this.value=this.min}else if(t>this.max){this.value=this.max}else{this.value=t}this.input&&(this.input.value=this.type=="text"?(o=this.value)===null||o===void 0?void 0:o.toString():this.value)}setRange(t,o){const n=g.is(this.value)?this.value:{start:this.min,end:this.max};const s=o==undefined||Number.isNaN(o)?t=="start"?this.min:this.max:o;const e=g.setPart(n,t,s,this.min,this.max);if(g.equals(e,this.value)){return}this.value=e;const i=t=="start"?this.startInput:this.endInput;const r=e[t];i&&(i.value=this.type=="text"?r.toString():r);!this.sliding&&this.smoothlyUserInput.emit({name:this.name,value:this.value})}async commitField(t){const o=t=="start"?this.startInput:this.endInput;this.setRange(t,o?Number(await o.getValue()):undefined);const n=g.is(this.value)?this.value[t]:undefined;o===null||o===void 0?void 0:o.setValue(this.type=="text"?n===null||n===void 0?void 0:n.toString():n)}renderSingle(){var t,o,n;return[s("smoothly-input",{ref:t=>this.input=t,looks:undefined,color:this.color,name:this.name,showLabel:this.outputSide==="left"&&!!this.label,type:this.type,onSmoothlyInputLoad:async t=>(t.stopPropagation(),this.setValue(a.Element.is(t.target)?Number(await t.target.getValue()):undefined)),onSmoothlyBlur:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.setValue(a.Element.is(t.target)?Number(await t.target.getValue()):undefined)},value:this.type=="percent"?this.value:(t=this.value)===null||t===void 0?void 0:t.toString(),placeholder:this.outputSide==="right"?"-":undefined,readonly:this.readonly,disabled:this.disabled},this.label),s("smoothly-display",{label:(this.type=="percent"?this.min*100:this.min).toString()}),s("input",{name:this.name,part:"range",type:"range",min:this.min,max:this.max,step:(o=this.step)!==null&&o!==void 0?o:"any",disabled:this.readonly||this.disabled,onInput:t=>{t.stopPropagation();this.sliding=true;this.setValue(t.target.valueAsNumber)},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:(n=this.value)!==null&&n!==void 0?n:this.min}),s("smoothly-display",{label:(this.type=="percent"?this.max*100:this.max).toString()})]}renderDual(){const t=g.is(this.value)?this.value:{start:this.min,end:this.max};const o=g.percent(t.start,this.min,this.max);const n=100-g.percent(t.end,this.min,this.max);return[this.renderField("start",t.start),s("div",{class:"track",part:"track"},s("div",{class:"fill",part:"fill",style:{left:`${o}%`,right:`${n}%`}}),this.renderRangeInput("start",t.start),this.renderRangeInput("end",t.end)),this.renderField("end",t.end)]}renderField(t,o){return s("smoothly-input",{ref:o=>t=="start"?this.startInput=o:this.endInput=o,class:t,color:this.color,name:`${this.name}-${t}`,showLabel:true,type:this.type,onSmoothlyBlur:o=>(o.stopPropagation(),this.commitField(t)),onSmoothlyKeydown:o=>void(o.detail.key=="Enter"&&this.commitField(t)),onSmoothlyInput:t=>t.stopPropagation(),onSmoothlyUserInput:t=>t.stopPropagation(),value:this.type=="percent"?o:o===null||o===void 0?void 0:o.toString(),readonly:this.readonly,disabled:this.disabled,right:t=="start"},t=="start"?"From":"To")}renderRangeInput(t,o){var n;return s("input",{part:t=="start"?"range range-start":"range range-end",type:"range",min:this.min,max:this.max,step:(n=this.step)!==null&&n!==void 0?n:"any",disabled:this.readonly||this.disabled,onInput:o=>{const n=o.target;o.stopPropagation();this.sliding=true;this.setRange(t,n.valueAsNumber);const s=g.is(this.value)?this.value[t]:undefined;s!=undefined&&(n.value=String(s))},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:o!==null&&o!==void 0?o:t=="start"?this.min:this.max})}render(){return s(e,{key:"93a4e9afcd01c8eda143e413360f20e14bcaa920",class:{"output-side-right":this.outputSide==="right","show-label":this.outputSide==="left"&&!!this.label,dual:this.dual}},s("slot",{key:"72711b5578bab0320901dbd513bb312b54b3ff40",name:"start"}),s("div",{key:"be83442baeb8cd97fd650ac17717a0e4d703976e"},s("label",{key:"17c0d638d8a9550c01de699efae66f55e1b27b8c",htmlFor:this.name},this.label),this.dual?this.renderDual():this.renderSingle()),s("slot",{key:"1162b21a65fdd05c5703ff547201765b28858554",name:"end"}))}get element(){return this}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}static get style(){return y()}},[262,"smoothly-input-range",{value:[1026],dual:[4],looks:[1537],color:[1537],defined:[1028],readonly:[1540],disabled:[516],type:[1],min:[2],max:[2],name:[513],step:[2],outputSide:[1,"output-side"],label:[1],showInput:[32],register:[64],unregister:[64],getValue:[64],clear:[64],listen:[64],edit:[64],reset:[64],setInitialValue:[64]},[[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]],{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}]);function f(){if(typeof customElements==="undefined"){return}const t=["smoothly-input-range","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-icon","smoothly-input"];t.forEach((t=>{switch(t){case"smoothly-input-range":if(!customElements.get(i(t))){customElements.define(i(t),b)}break;case"smoothly-display":if(!customElements.get(i(t))){l()}break;case"smoothly-display-json":if(!customElements.get(i(t))){h()}break;case"smoothly-display-json-object":if(!customElements.get(i(t))){u()}break;case"smoothly-display-json-primitive":if(!customElements.get(i(t))){p()}break;case"smoothly-display-json-record-key":if(!customElements.get(i(t))){d()}break;case"smoothly-icon":if(!customElements.get(i(t))){m()}break;case"smoothly-input":if(!customElements.get(i(t))){c()}break}}))}f();export{b as S,f as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as o,c as n,h as s,d as e,t as i}from"./p-BsZrGTcp.js";import{E as r}from"./p-iQDU7l2c.js";import{I as a}from"./p-vvQg46ti.js";import{d as l}from"./p-CN3iME9d.js";import{d as h}from"./p-DG2pfnCV.js";import{d as u}from"./p-uFR5K4vd.js";import{d as p}from"./p-DvZK__s-.js";import{d}from"./p-F8qX8ZuL.js";import{d as m}from"./p-DFSiKg4M.js";import{d as c}from"./p-o8kM0Soe.js";var g;(function(t){function o(t){return typeof t=="object"&&t!=undefined&&"start"in t&&"end"in t}t.is=o;function n(t,o,n){return t<o?o:t>n?n:t}t.clamp=n;function s(t,o){var n,s;const e=!o?undefined:(s=(n=o.toString().split(".")[1])===null||n===void 0?void 0:n.length)!==null&&s!==void 0?s:0;return+t.toFixed(e)}t.round=s;function e(t,o,s,e,i){const r=n(s,e,i);return o=="start"?{start:Math.min(r,t.end),end:t.end}:{start:t.start,end:Math.max(r,t.start)}}t.setPart=e;function i(t,n){return o(t)?{start:s(t.start,n),end:s(t.end,n)}:t==undefined||Number.isNaN(t)?undefined:s(t,n)}t.normalize=i;function r(t,n){return o(t)&&o(n)?t.start===n.start&&t.end===n.end:t===n}t.equals=r;function a(t){return o(t)?typeof t.start=="number"&&typeof t.end=="number":typeof t=="number"}t.defined=a;function l(t,o,n){return n==o?0:(t-o)/(n-o)*100}t.percent=l})(g||(g={}));const y=()=>`.sc-smoothly-input-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-range-h,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-range-h>input.sc-smoothly-input-range,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within)>input.sc-smoothly-input-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-range-h.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .label.sc-smoothly-input-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-range-h .label.sc-smoothly-input-range{transform-origin:top right}.sc-smoothly-input-range-h.floating-label.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.floating-label .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder] .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly] .sc-smoothly-input-range-s>[slot=label],.floating-label.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-value.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-text.sc-smoothly-input-range-h .label.sc-smoothly-input-range,[placeholder].sc-smoothly-input-range-h .label.sc-smoothly-input-range,[readonly].sc-smoothly-input-range-h .label.sc-smoothly-input-range,.sc-smoothly-input-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-range{display:none}.sc-smoothly-input-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}*.sc-smoothly-input-range{box-sizing:border-box}.sc-smoothly-input-range-h{position:relative;width:100%;justify-content:center;align-items:center;display:flex;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-range-h>div.sc-smoothly-input-range:not([slot]){position:relative;display:flex;justify-content:center;align-items:center;width:100%;padding-right:var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:12em;--input-min-height:calc(3rem - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{white-space:nowrap}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range{padding:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{text-align:center;margin-left:var(--input-padding-side);border:none;box-sizing:border-box;width:6rem;order:3;margin:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-display.sc-smoothly-input-range,.sc-smoothly-input-range-h:not(.output-side-right)>div.sc-smoothly-input-range>label.sc-smoothly-input-range{display:none}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range input.sc-smoothly-input-range{padding:0;text-align:center}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{width:100%}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>label.sc-smoothly-input-range{position:static;font-size:inherit;text-align:center;margin:0 var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none;width:100%;background:transparent;height:1.5em;padding:0 .4em}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;border-radius:100%;margin-top:-.25em;border:none}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{width:100%;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-tint))}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-tint))}[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track,[disabled].sc-smoothly-input-range-h,[disabled].sc-smoothly-input-range-h *.sc-smoothly-input-range{cursor:not-allowed}input.sc-smoothly-input-range::-webkit-outer-spin-button,input.sc-smoothly-input-range::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dual.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:7rem;flex:0 0 auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range{position:relative;flex:1;height:1.5em;display:flex;align-items:center}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range::before{content:"";position:absolute;left:.4em;right:.4em;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .fill.sc-smoothly-input-range{position:absolute;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-primary-color));pointer-events:none}.dual[readonly].sc-smoothly-input-range-h .fill.sc-smoothly-input-range,.dual[disabled].sc-smoothly-input-range-h .fill.sc-smoothly-input-range{background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{position:absolute;left:0;right:0;width:100%;margin:0;background:transparent;pointer-events:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;margin-top:-.25em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{cursor:not-allowed}`;const b=t(class t extends o{constructor(t){super();if(t!==false){this.__registerHost()}this.smoothlyInputLooks=n(this,"smoothlyInputLooks");this.smoothlyInput=n(this,"smoothlyInput");this.smoothlyUserInput=n(this,"smoothlyUserInput");this.smoothlyInputLoad=n(this,"smoothlyInputLoad");this.smoothlyFormDisable=n(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=r.Observer.create(this);this.initialValue=undefined;this.sliding=false;this.value=undefined;this.dual=false;this.defined=false;this.readonly=false;this.type="text";this.min=0;this.max=100;this.name="range";this.outputSide="left";this.showInput=false}componentWillLoad(){this.smoothlyInputLooks.emit(((t,o)=>{var n;return this.looks=(n=this.looks)!==null&&n!==void 0?n:t,this.color=o}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));if(this.dual&&!g.is(this.value)){this.initialValue={start:this.min,end:this.max};this.value=this.initialValue}else{this.value&&(this.initialValue=this.value);this.valueChanged()}}smoothlyInputLoadHandler(t){a.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,o){a.formRename(this,o)}async register(){a.formAdd(this)}async unregister(){a.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false;this.valueChanged()}valueChanged(){const t=g.normalize(this.value,this.step);if(!g.equals(t,this.value)){this.value=t;return}this.isDifferentFromInitial=!g.equals(this.initialValue,this.value);this.defined=g.defined(this.value);if(!this.sliding){this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value})}}watchingReadonly(){this.observer.publish()}setValue(t){var o;if(t==undefined||Number.isNaN(t)){this.value=undefined}else if(t<this.min){this.value=this.min}else if(t>this.max){this.value=this.max}else{this.value=t}this.input&&(this.input.value=this.type=="text"?(o=this.value)===null||o===void 0?void 0:o.toString():this.value)}setRange(t,o){const n=g.is(this.value)?this.value:{start:this.min,end:this.max};const s=o==undefined||Number.isNaN(o)?t=="start"?this.min:this.max:o;const e=g.setPart(n,t,s,this.min,this.max);if(g.equals(e,this.value)){return}this.value=e;const i=t=="start"?this.startInput:this.endInput;const r=e[t];i&&(i.value=this.type=="text"?r.toString():r);!this.sliding&&this.smoothlyUserInput.emit({name:this.name,value:this.value})}async commitField(t){const o=t=="start"?this.startInput:this.endInput;this.setRange(t,o?Number(await o.getValue()):undefined);const n=g.is(this.value)?this.value[t]:undefined;o===null||o===void 0?void 0:o.setValue(this.type=="text"?n===null||n===void 0?void 0:n.toString():n)}renderSingle(){var t,o,n;return[s("smoothly-input",{ref:t=>this.input=t,looks:undefined,color:this.color,name:this.name,showLabel:this.outputSide==="left"&&!!this.label,type:this.type,onSmoothlyInputLoad:async t=>(t.stopPropagation(),this.setValue(a.Element.is(t.target)?Number(await t.target.getValue()):undefined)),onSmoothlyBlur:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.setValue(a.Element.is(t.target)?Number(await t.target.getValue()):undefined)},value:this.type=="percent"?this.value:(t=this.value)===null||t===void 0?void 0:t.toString(),placeholder:this.outputSide==="right"?"-":undefined,readonly:this.readonly,disabled:this.disabled},this.label),s("smoothly-display",{label:(this.type=="percent"?this.min*100:this.min).toString()}),s("input",{name:this.name,part:"range",type:"range",min:this.min,max:this.max,step:(o=this.step)!==null&&o!==void 0?o:"any",disabled:this.readonly||this.disabled,onInput:t=>{t.stopPropagation();this.sliding=true;this.setValue(t.target.valueAsNumber)},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:(n=this.value)!==null&&n!==void 0?n:this.min}),s("smoothly-display",{label:(this.type=="percent"?this.max*100:this.max).toString()})]}renderDual(){const t=g.is(this.value)?this.value:{start:this.min,end:this.max};const o=g.percent(t.start,this.min,this.max);const n=100-g.percent(t.end,this.min,this.max);return[this.renderField("start",t.start),s("div",{class:"track",part:"track"},s("div",{class:"fill",part:"fill",style:{left:`${o}%`,right:`${n}%`}}),this.renderRangeInput("start",t.start),this.renderRangeInput("end",t.end)),this.renderField("end",t.end)]}renderField(t,o){return s("smoothly-input",{ref:o=>t=="start"?this.startInput=o:this.endInput=o,class:t,color:this.color,name:`${this.name}-${t}`,showLabel:true,type:this.type,onSmoothlyBlur:o=>(o.stopPropagation(),this.commitField(t)),onSmoothlyKeydown:o=>void(o.detail.key=="Enter"&&this.commitField(t)),onSmoothlyInput:t=>t.stopPropagation(),onSmoothlyUserInput:t=>t.stopPropagation(),value:this.type=="percent"?o:o===null||o===void 0?void 0:o.toString(),readonly:this.readonly,disabled:this.disabled,right:t=="start"},`${this.label?this.label:""} ${t=="start"?"From":"To"}`)}renderRangeInput(t,o){var n;return s("input",{part:t=="start"?"range range-start":"range range-end",type:"range",min:this.min,max:this.max,step:(n=this.step)!==null&&n!==void 0?n:"any",disabled:this.readonly||this.disabled,onInput:o=>{const n=o.target;o.stopPropagation();this.sliding=true;this.setRange(t,n.valueAsNumber);const s=g.is(this.value)?this.value[t]:undefined;s!=undefined&&(n.value=String(s))},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:o!==null&&o!==void 0?o:t=="start"?this.min:this.max})}render(){return s(e,{key:"7e69877d633e5cd9052202f8e556018053101b34",class:{"output-side-right":this.outputSide==="right","show-label":this.dual||this.outputSide==="left"&&!!this.label,dual:this.dual}},s("slot",{key:"dc821324171d047270222d1b127887f28311fe5b",name:"start"}),s("div",{key:"29c8fc53b306df07ed0781a4fb8f8650a8f04d45"},s("label",{key:"44505c248cff4062e54c1383cebdec3c2dd3ac5f",htmlFor:this.name},this.label),this.dual?this.renderDual():this.renderSingle()),s("slot",{key:"d65e624e57acc9da5b14409d5ffe2bb1717449fd",name:"end"}))}get element(){return this}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}static get style(){return y()}},[262,"smoothly-input-range",{value:[1026],dual:[4],looks:[1537],color:[1537],defined:[1028],readonly:[1540],disabled:[516],type:[1],min:[2],max:[2],name:[513],step:[2],outputSide:[1,"output-side"],label:[1],showInput:[32],register:[64],unregister:[64],getValue:[64],clear:[64],listen:[64],edit:[64],reset:[64],setInitialValue:[64]},[[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]],{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}]);function f(){if(typeof customElements==="undefined"){return}const t=["smoothly-input-range","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-icon","smoothly-input"];t.forEach((t=>{switch(t){case"smoothly-input-range":if(!customElements.get(i(t))){customElements.define(i(t),b)}break;case"smoothly-display":if(!customElements.get(i(t))){l()}break;case"smoothly-display-json":if(!customElements.get(i(t))){h()}break;case"smoothly-display-json-object":if(!customElements.get(i(t))){u()}break;case"smoothly-display-json-primitive":if(!customElements.get(i(t))){p()}break;case"smoothly-display-json-record-key":if(!customElements.get(i(t))){d()}break;case"smoothly-icon":if(!customElements.get(i(t))){m()}break;case"smoothly-input":if(!customElements.get(i(t))){c()}break}}))}f();export{b as S,f as d};
|
|
2
|
+
//# sourceMappingURL=p-PwCtk_DY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Range","is","value","undefined","clamp","min","max","round","step","decimals","_b","_a","toString","split","length","toFixed","setPart","current","part","clamped","start","Math","end","normalize","Number","isNaN","equals","a","b","defined","percent","styleCss","SmoothlyInputRange","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","isDifferentFromInitial","observer","Editable","Observer","create","initialValue","sliding","dual","readonly","type","name","outputSide","showInput","componentWillLoad","smoothlyInputLooks","emit","looks","color","smoothlyInputLoad","parent","smoothlyFormDisable","valueChanged","smoothlyInputLoadHandler","event","Input","registerSubAction","smoothlyInputLooksHandler","target","element","stopPropagation","disconnectedCallback","isConnected","unregister","nameChange","_","oldName","formRename","register","formAdd","formRemove","getValue","clear","listen","listener","subscribe","edit","editable","reset","setInitialValue","normalized","publish","smoothlyInput","watchingReadonly","setValue","input","setRange","resolved","next","field","startInput","endInput","bound","smoothlyUserInput","commitField","renderSingle","h","ref","e","showLabel","label","onSmoothlyInputLoad","async","Element","onSmoothlyBlur","onSmoothlyInput","placeholder","disabled","onInput","valueAsNumber","onChange","_c","renderDual","range","left","right","renderField","class","style","renderRangeInput","onSmoothlyKeydown","detail","key","onSmoothlyUserInput","String","render","Host","htmlFor"],"sources":["src/components/input/range/Range.ts","src/components/input/range/style.css?tag=smoothly-input-range&encapsulation=scoped","src/components/input/range/index.tsx"],"sourcesContent":["export type Range = { start: number; end: number }\n\nexport namespace Range {\n\texport type Value = number | Range\n\texport function is(value: Value | undefined): value is Range {\n\t\treturn typeof value == \"object\" && value != undefined && \"start\" in value && \"end\" in value\n\t}\n\texport function clamp(value: number, min: number, max: number): number {\n\t\treturn value < min ? min : value > max ? max : value\n\t}\n\texport function round(value: number, step: number | undefined): number {\n\t\tconst decimals = !step ? undefined : (step.toString().split(\".\")[1]?.length ?? 0)\n\t\treturn +value.toFixed(decimals)\n\t}\n\texport function setPart(current: Range, part: \"start\" | \"end\", value: number, min: number, max: number): Range {\n\t\tconst clamped = clamp(value, min, max)\n\t\treturn part == \"start\"\n\t\t\t? { start: Math.min(clamped, current.end), end: current.end }\n\t\t\t: { start: current.start, end: Math.max(clamped, current.start) }\n\t}\n\texport function normalize(value: Value | undefined, step: number | undefined): Value | undefined {\n\t\treturn is(value)\n\t\t\t? { start: round(value.start, step), end: round(value.end, step) }\n\t\t\t: value == undefined || Number.isNaN(value)\n\t\t\t\t? undefined\n\t\t\t\t: round(value, step)\n\t}\n\texport function equals(a: Value | undefined, b: Value | undefined): boolean {\n\t\treturn is(a) && is(b) ? a.start === b.start && a.end === b.end : a === b\n\t}\n\texport function defined(value: Value | undefined): boolean {\n\t\treturn is(value) ? typeof value.start == \"number\" && typeof value.end == \"number\" : typeof value == \"number\"\n\t}\n\texport function percent(value: number, min: number, max: number): number {\n\t\treturn max == min ? 0 : ((value - min) / (max - min)) * 100\n\t}\n}\n","@import \"../shared.css\";\n\n* {\n\tbox-sizing: border-box;\n}\n:host {\n\tposition: relative;\n\twidth: 100%;\n\tjustify-content: center;\n\talign-items: center;\n\tdisplay: flex;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tbox-sizing: border-box;\n}\n:host>div:not([slot]) {\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\twidth: 100%;\n\tpadding-right: var(--input-padding-side);\n}\n:host>div>smoothly-input {\n\twidth: 12em;\n\t--input-min-height: calc(3rem - 2px);\n\t--smoothly-input-border-focus: none;\n}\n:host>div>smoothly-input label {\n\twhite-space: nowrap;\n}\n:host.output-side-right>div {\n\tpadding: 0;\n}\n:host.output-side-right>div>smoothly-input {\n\ttext-align: center;\n\tmargin-left: var(--input-padding-side);\n\tborder: none;\n\tbox-sizing: border-box;\n\twidth: 6rem;\n\torder: 3;\n\tmargin: 0;\n}\n:host.output-side-right>div>smoothly-display,\n:host:not(.output-side-right)>div>label {\n\tdisplay: none;\n}\n:host.output-side-right>div>smoothly-input input {\n\tpadding: 0;\n\ttext-align: center;\n}\n:host.output-side-right>div>smoothly-input label {\n\twidth: 100%;\n}\n:host.output-side-right>div>label {\n\tposition: static;\n\tfont-size: inherit;\n\ttext-align: center;\n\tmargin: 0 var(--input-padding-side);\n}\n\n/*--------------------Reset browserspecific CSS------------------ */\n:host>div>input[type=range] {\n\t-webkit-appearance: none;\n\t/* Hides the slider so that custom slider can be made */\n\twidth: 100%;\n\t/* Specific width is required for Firefox. */\n\tbackground: transparent;\n\t/* Otherwise white in Chrome */\n\theight: 1.5em;\n\tpadding: 0 .4em;\n}\n\n/*--------------------THUMB------------------ */\n/* WebKit/Blink */\n:host>div>input[type=range]::-webkit-slider-thumb {\n\t-webkit-appearance: none;\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tmargin-top: -.25em;\n\tborder: none;\n\t/* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n/* Firefox */\n:host>div>input[type=range]::-moz-range-thumb {\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-moz-range-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n/*--------------------SLIDER TRACK------------------ */\n:host>div>input[type=range]::-webkit-slider-runnable-track {\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-runnable-track {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n:host>div>input[type=range]::-moz-range-track {\n\twidth: 100%;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-moz-range-track {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n:host:not([value]):not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-runnable-track {\n\tbackground-color: rgb(var(--smoothly-primary-tint));\n}\n\n:host:not([value]):not([disabled]):not([readonly])>div>input[type=range]::-moz-range-track {\n\tbackground-color: rgb(var(--smoothly-primary-tint));\n}\n\n:host[disabled]>div>input[type=range]::-webkit-slider-thumb,\n:host[disabled]>div>input[type=range]::-moz-range-thumb,\n:host[disabled]>div>input[type=range]::-webkit-slider-runnable-track,\n:host[disabled]>div>input[type=range]::-moz-range-track,\n:host[disabled],\n:host[disabled] * {\n\tcursor: not-allowed\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/*--------------------DUAL MODE------------------ */\n:host(.dual)>div>smoothly-input {\n\twidth: 6rem;\n\tflex: 0 0 auto;\n}\n:host(.dual) .track {\n\tposition: relative;\n\tflex: 1;\n\theight: 1.5em;\n\tdisplay: flex;\n\talign-items: center;\n}\n/* Shared visible track line */\n:host(.dual) .track::before {\n\tcontent: \"\";\n\tposition: absolute;\n\tleft: .4em;\n\tright: .4em;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual) .fill {\n\tposition: absolute;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tpointer-events: none;\n}\n/* Match the single range: the active fill drops to the foreground color when readonly/disabled. */\n:host(.dual[readonly]) .fill,\n:host(.dual[disabled]) .fill {\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n/* Both range inputs occupy the same box; only their thumbs receive pointer events */\n:host(.dual) .track > input[type=range] {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\twidth: 100%;\n\tmargin: 0;\n\tbackground: transparent;\n\tpointer-events: none;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-runnable-track {\n\tbackground: transparent;\n}\n:host(.dual) .track > input[type=range]::-moz-range-track {\n\tbackground: transparent;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-thumb {\n\tpointer-events: auto;\n}\n:host(.dual) .track > input[type=range]::-moz-range-thumb {\n\tpointer-events: auto;\n}\n\n/*--------------------DUAL MODE THUMBS------------------ */\n/* Single-mode thumb rules only match the direct-child :host>div>input, not the nested dual inputs, so replicate them here. */\n:host(.dual) .track > input[type=range] {\n\t-webkit-appearance: none;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-runnable-track {\n\theight: .3rem;\n}\n:host(.dual) .track > input[type=range]::-moz-range-track {\n\theight: .3rem;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-thumb {\n\t-webkit-appearance: none;\n\theight: 0.8em;\n\twidth: 0.8em;\n\tmargin-top: -.25em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual):not([disabled]):not([readonly]) .track > input[type=range]::-webkit-slider-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n:host(.dual) .track > input[type=range]::-moz-range-thumb {\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual):not([disabled]):not([readonly]) .track > input[type=range]::-moz-range-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n:host(.dual)[disabled] .track > input[type=range]::-webkit-slider-thumb,\n:host(.dual)[disabled] .track > input[type=range]::-moz-range-thumb {\n\tcursor: not-allowed;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { tidily } from \"tidily\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\nimport { Range } from \"./Range\"\n\n@Component({\n\ttag: \"smoothly-input-range\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputRange implements Input, Clearable, Editable, ComponentWillLoad {\n\tparent: Editable | undefined\n\tisDifferentFromInitial = false\n\tprivate observer = Editable.Observer.create(this)\n\tprivate input?: HTMLSmoothlyInputElement\n\tprivate startInput?: HTMLSmoothlyInputElement\n\tprivate endInput?: HTMLSmoothlyInputElement\n\tprivate initialValue: Range.Value | undefined = undefined\n\tprivate sliding = false\n\t@Element() element: HTMLSmoothlyInputRangeElement\n\t@Prop({ mutable: true }) value: Range.Value | undefined = undefined\n\t@Prop() dual = false\n\t@Prop({ reflect: true, mutable: true }) looks?: Looks\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ mutable: true }) defined = false\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop({ reflect: true }) disabled?: boolean\n\t@Prop() type: Extract<tidily.Type, \"text\" | \"percent\"> = \"text\"\n\t@Prop() min = 0\n\t@Prop() max = 100\n\t@Prop({ reflect: true }) name = \"range\"\n\t@Prop() step?: number\n\t@Prop() outputSide: \"right\" | \"left\" = \"left\"\n\t@Prop() label: string\n\t@State() showInput = false\n\t@Event() smoothlyInputLooks: EventEmitter<(looks?: Looks, color?: Color) => void>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@Event() smoothlyUserInput: EventEmitter<Input.UserInput>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = this.looks ?? looks), (this.color = color)))\n\t\tthis.smoothlyInputLoad.emit(parent => (this.parent = parent))\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tif (this.dual && !Range.is(this.value)) {\n\t\t\tthis.initialValue = { start: this.min, end: this.max }\n\t\t\tthis.value = this.initialValue\n\t\t} else {\n\t\t\tthis.value && (this.initialValue = this.value)\n\t\t\tthis.valueChanged()\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tsmoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputRange) => void>) {\n\t\tInput.registerSubAction(this, event)\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\tasync disconnectedCallback() {\n\t\tif (!this.element.isConnected) {\n\t\t\tawait this.unregister()\n\t\t}\n\t}\n\t@Watch(\"name\")\n\tnameChange(_: string | undefined, oldName: string | undefined) {\n\t\tInput.formRename(this, oldName)\n\t}\n\t@Method()\n\tasync register() {\n\t\tInput.formAdd(this)\n\t}\n\t@Method()\n\tasync unregister() {\n\t\tInput.formRemove(this)\n\t}\n\t@Method()\n\tasync getValue(): Promise<Range.Value | undefined> {\n\t\treturn this.value\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\t@Method()\n\tasync listen(listener: Editable.Observer.Listener): Promise<void> {\n\t\tthis.observer.subscribe(listener)\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.value = this.initialValue\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.initialValue = this.value\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.valueChanged()\n\t}\n\t@Watch(\"value\")\n\tvalueChanged(): void {\n\t\tconst normalized = Range.normalize(this.value, this.step)\n\t\tif (!Range.equals(normalized, this.value)) {\n\t\t\tthis.value = normalized\n\t\t\treturn\n\t\t}\n\t\tthis.isDifferentFromInitial = !Range.equals(this.initialValue, this.value)\n\t\tthis.defined = Range.defined(this.value)\n\t\tif (!this.sliding) {\n\t\t\tthis.observer.publish()\n\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t}\n\t}\n\t@Watch(\"disabled\")\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.observer.publish()\n\t}\n\tsetValue(value: number | undefined): void {\n\t\tif (value == undefined || Number.isNaN(value)) {\n\t\t\tthis.value = undefined\n\t\t} else if (value < this.min) {\n\t\t\tthis.value = this.min\n\t\t} else if (value > this.max) {\n\t\t\tthis.value = this.max\n\t\t} else {\n\t\t\tthis.value = value\n\t\t}\n\t\tthis.input && (this.input.value = this.type == \"text\" ? (this.value as number)?.toString() : (this.value as number))\n\t}\n\tsetRange(part: \"start\" | \"end\", value: number | undefined): void {\n\t\tconst current = Range.is(this.value) ? this.value : { start: this.min, end: this.max }\n\t\tconst resolved = value == undefined || Number.isNaN(value) ? (part == \"start\" ? this.min : this.max) : value\n\t\tconst next = Range.setPart(current, part, resolved, this.min, this.max)\n\t\tif (Range.equals(next, this.value)) {\n\t\t\treturn\n\t\t}\n\t\tthis.value = next\n\t\tconst field = part == \"start\" ? this.startInput : this.endInput\n\t\tconst bound = next[part]\n\t\tfield && (field.value = this.type == \"text\" ? bound.toString() : bound)\n\t\t!this.sliding && this.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t}\n\tprivate async commitField(part: \"start\" | \"end\"): Promise<void> {\n\t\tconst field = part == \"start\" ? this.startInput : this.endInput\n\t\tthis.setRange(part, field ? Number(await field.getValue()) : undefined)\n\t\tconst bound = Range.is(this.value) ? this.value[part] : undefined\n\t\tfield?.setValue(this.type == \"text\" ? bound?.toString() : bound)\n\t}\n\n\tprivate renderSingle(): VNode[] {\n\t\treturn [\n\t\t\t<smoothly-input\n\t\t\t\tref={e => (this.input = e)}\n\t\t\t\tlooks={undefined}\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={this.name}\n\t\t\t\tshowLabel={this.outputSide === \"left\" && !!this.label}\n\t\t\t\ttype={this.type}\n\t\t\t\tonSmoothlyInputLoad={async e => (\n\t\t\t\t\te.stopPropagation(),\n\t\t\t\t\tthis.setValue(Input.Element.is(e.target) ? Number(await e.target.getValue()) : undefined)\n\t\t\t\t)}\n\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={async e => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tthis.setValue(Input.Element.is(e.target) ? Number(await e.target.getValue()) : undefined)\n\t\t\t\t}}\n\t\t\t\tvalue={this.type == \"percent\" ? (this.value as number) : (this.value as number)?.toString()}\n\t\t\t\tplaceholder={this.outputSide === \"right\" ? \"-\" : undefined}\n\t\t\t\treadonly={this.readonly}\n\t\t\t\tdisabled={this.disabled}>\n\t\t\t\t{this.label}\n\t\t\t</smoothly-input>,\n\t\t\t<smoothly-display label={(this.type == \"percent\" ? this.min * 100 : this.min).toString()} />,\n\t\t\t<input\n\t\t\t\tname={this.name}\n\t\t\t\tpart=\"range\"\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin={this.min}\n\t\t\t\tmax={this.max}\n\t\t\t\tstep={this.step ?? \"any\"}\n\t\t\t\tdisabled={this.readonly || this.disabled}\n\t\t\t\tonInput={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = true\n\t\t\t\t\tthis.setValue((event.target as HTMLInputElement).valueAsNumber)\n\t\t\t\t}}\n\t\t\t\tonChange={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = false\n\t\t\t\t\tthis.observer.publish()\n\t\t\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t\t\t\t}}\n\t\t\t\tvalue={(this.value as number) ?? this.min}\n\t\t\t/>,\n\t\t\t<smoothly-display label={(this.type == \"percent\" ? this.max * 100 : this.max).toString()} />,\n\t\t]\n\t}\n\tprivate renderDual(): VNode[] {\n\t\tconst range = Range.is(this.value) ? this.value : { start: this.min, end: this.max }\n\t\tconst left = Range.percent(range.start, this.min, this.max)\n\t\tconst right = 100 - Range.percent(range.end, this.min, this.max)\n\t\treturn [\n\t\t\tthis.renderField(\"start\", range.start),\n\t\t\t<div class=\"track\" part=\"track\">\n\t\t\t\t<div class=\"fill\" part=\"fill\" style={{ left: `${left}%`, right: `${right}%` }} />\n\t\t\t\t{this.renderRangeInput(\"start\", range.start)}\n\t\t\t\t{this.renderRangeInput(\"end\", range.end)}\n\t\t\t</div>,\n\t\t\tthis.renderField(\"end\", range.end),\n\t\t]\n\t}\n\tprivate renderField(part: \"start\" | \"end\", value: number): VNode {\n\t\treturn (\n\t\t\t<smoothly-input\n\t\t\t\tref={e => (part == \"start\" ? (this.startInput = e) : (this.endInput = e))}\n\t\t\t\tclass={part}\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={`${this.name}-${part}`}\n\t\t\t\tshowLabel={true}\n\t\t\t\ttype={this.type}\n\t\t\t\tonSmoothlyBlur={e => (e.stopPropagation(), this.commitField(part))}\n\t\t\t\tonSmoothlyKeydown={e => void (e.detail.key == \"Enter\" && this.commitField(part))}\n\t\t\t\tonSmoothlyInput={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyUserInput={e => e.stopPropagation()}\n\t\t\t\tvalue={this.type == \"percent\" ? value : value?.toString()}\n\t\t\t\treadonly={this.readonly}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\tright={part == \"start\"}>\n\t\t\t\t{part == \"start\" ? \"From\" : \"To\"}\n\t\t\t</smoothly-input>\n\t\t)\n\t}\n\tprivate renderRangeInput(part: \"start\" | \"end\", value: number): VNode {\n\t\treturn (\n\t\t\t<input\n\t\t\t\tpart={part == \"start\" ? \"range range-start\" : \"range range-end\"}\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin={this.min}\n\t\t\t\tmax={this.max}\n\t\t\t\tstep={this.step ?? \"any\"}\n\t\t\t\tdisabled={this.readonly || this.disabled}\n\t\t\t\tonInput={event => {\n\t\t\t\t\tconst input = event.target as HTMLInputElement\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = true\n\t\t\t\t\tthis.setRange(part, input.valueAsNumber)\n\t\t\t\t\tconst bound = Range.is(this.value) ? this.value[part] : undefined\n\t\t\t\t\tbound != undefined && (input.value = String(bound))\n\t\t\t\t}}\n\t\t\t\tonChange={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = false\n\t\t\t\t\tthis.observer.publish()\n\t\t\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t\t\t\t}}\n\t\t\t\tvalue={value ?? (part == \"start\" ? this.min : this.max)}\n\t\t\t/>\n\t\t)\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t\"output-side-right\": this.outputSide === \"right\",\n\t\t\t\t\t\"show-label\": this.outputSide === \"left\" && !!this.label,\n\t\t\t\t\tdual: this.dual,\n\t\t\t\t}}>\n\t\t\t\t<slot name=\"start\" />\n\t\t\t\t<div>\n\t\t\t\t\t<label htmlFor={this.name}>{this.label}</label>\n\t\t\t\t\t{this.dual ? this.renderDual() : this.renderSingle()}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"end\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"sYAEM,IAAWA,GAAjB,SAAiBA,GAEhB,SAAgBC,EAAGC,GAClB,cAAcA,GAAS,UAAYA,GAASC,WAAa,UAAWD,GAAS,QAASA,C,CADvEF,EAAAC,GAAEA,EAGlB,SAAgBG,EAAMF,EAAeG,EAAaC,GACjD,OAAOJ,EAAQG,EAAMA,EAAMH,EAAQI,EAAMA,EAA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AAK,UACXuD,EAAA,OAAA0B,IAAA,4CACC1B,EAAA,SAAA0B,IAAA,2CAAOK,QAASjG,KAAKW,MAAOX,KAAKsE,OAChCtE,KAAKQ,KAAOR,KAAKkF,aAAelF,KAAKiE,gBAEvCC,EAAA,QAAA0B,IAAA,2CAAMjF,KAAK,Q","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Range","is","value","undefined","clamp","min","max","round","step","decimals","_b","_a","toString","split","length","toFixed","setPart","current","part","clamped","start","Math","end","normalize","Number","isNaN","equals","a","b","defined","percent","styleCss","SmoothlyInputRange","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","isDifferentFromInitial","observer","Editable","Observer","create","initialValue","sliding","dual","readonly","type","name","outputSide","showInput","componentWillLoad","smoothlyInputLooks","emit","looks","color","smoothlyInputLoad","parent","smoothlyFormDisable","valueChanged","smoothlyInputLoadHandler","event","Input","registerSubAction","smoothlyInputLooksHandler","target","element","stopPropagation","disconnectedCallback","isConnected","unregister","nameChange","_","oldName","formRename","register","formAdd","formRemove","getValue","clear","listen","listener","subscribe","edit","editable","reset","setInitialValue","normalized","publish","smoothlyInput","watchingReadonly","setValue","input","setRange","resolved","next","field","startInput","endInput","bound","smoothlyUserInput","commitField","renderSingle","h","ref","e","showLabel","label","onSmoothlyInputLoad","async","Element","onSmoothlyBlur","onSmoothlyInput","placeholder","disabled","onInput","valueAsNumber","onChange","_c","renderDual","range","left","right","renderField","class","style","renderRangeInput","onSmoothlyKeydown","detail","key","onSmoothlyUserInput","String","render","Host","htmlFor"],"sources":["src/components/input/range/Range.ts","src/components/input/range/style.css?tag=smoothly-input-range&encapsulation=scoped","src/components/input/range/index.tsx"],"sourcesContent":["export type Range = { start: number; end: number }\n\nexport namespace Range {\n\texport type Value = number | Range\n\texport function is(value: Value | undefined): value is Range {\n\t\treturn typeof value == \"object\" && value != undefined && \"start\" in value && \"end\" in value\n\t}\n\texport function clamp(value: number, min: number, max: number): number {\n\t\treturn value < min ? min : value > max ? max : value\n\t}\n\texport function round(value: number, step: number | undefined): number {\n\t\tconst decimals = !step ? undefined : (step.toString().split(\".\")[1]?.length ?? 0)\n\t\treturn +value.toFixed(decimals)\n\t}\n\texport function setPart(current: Range, part: \"start\" | \"end\", value: number, min: number, max: number): Range {\n\t\tconst clamped = clamp(value, min, max)\n\t\treturn part == \"start\"\n\t\t\t? { start: Math.min(clamped, current.end), end: current.end }\n\t\t\t: { start: current.start, end: Math.max(clamped, current.start) }\n\t}\n\texport function normalize(value: Value | undefined, step: number | undefined): Value | undefined {\n\t\treturn is(value)\n\t\t\t? { start: round(value.start, step), end: round(value.end, step) }\n\t\t\t: value == undefined || Number.isNaN(value)\n\t\t\t\t? undefined\n\t\t\t\t: round(value, step)\n\t}\n\texport function equals(a: Value | undefined, b: Value | undefined): boolean {\n\t\treturn is(a) && is(b) ? a.start === b.start && a.end === b.end : a === b\n\t}\n\texport function defined(value: Value | undefined): boolean {\n\t\treturn is(value) ? typeof value.start == \"number\" && typeof value.end == \"number\" : typeof value == \"number\"\n\t}\n\texport function percent(value: number, min: number, max: number): number {\n\t\treturn max == min ? 0 : ((value - min) / (max - min)) * 100\n\t}\n}\n","@import \"../shared.css\";\n\n* {\n\tbox-sizing: border-box;\n}\n:host {\n\tposition: relative;\n\twidth: 100%;\n\tjustify-content: center;\n\talign-items: center;\n\tdisplay: flex;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tbox-sizing: border-box;\n}\n:host>div:not([slot]) {\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\twidth: 100%;\n\tpadding-right: var(--input-padding-side);\n}\n:host>div>smoothly-input {\n\twidth: 12em;\n\t--input-min-height: calc(3rem - 2px);\n\t--smoothly-input-border-focus: none;\n}\n:host>div>smoothly-input label {\n\twhite-space: nowrap;\n}\n:host.output-side-right>div {\n\tpadding: 0;\n}\n:host.output-side-right>div>smoothly-input {\n\ttext-align: center;\n\tmargin-left: var(--input-padding-side);\n\tborder: none;\n\tbox-sizing: border-box;\n\twidth: 6rem;\n\torder: 3;\n\tmargin: 0;\n}\n:host.output-side-right>div>smoothly-display,\n:host:not(.output-side-right)>div>label {\n\tdisplay: none;\n}\n:host.output-side-right>div>smoothly-input input {\n\tpadding: 0;\n\ttext-align: center;\n}\n:host.output-side-right>div>smoothly-input label {\n\twidth: 100%;\n}\n:host.output-side-right>div>label {\n\tposition: static;\n\tfont-size: inherit;\n\ttext-align: center;\n\tmargin: 0 var(--input-padding-side);\n}\n\n/*--------------------Reset browserspecific CSS------------------ */\n:host>div>input[type=range] {\n\t-webkit-appearance: none;\n\t/* Hides the slider so that custom slider can be made */\n\twidth: 100%;\n\t/* Specific width is required for Firefox. */\n\tbackground: transparent;\n\t/* Otherwise white in Chrome */\n\theight: 1.5em;\n\tpadding: 0 .4em;\n}\n\n/*--------------------THUMB------------------ */\n/* WebKit/Blink */\n:host>div>input[type=range]::-webkit-slider-thumb {\n\t-webkit-appearance: none;\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tmargin-top: -.25em;\n\tborder: none;\n\t/* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n/* Firefox */\n:host>div>input[type=range]::-moz-range-thumb {\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-moz-range-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n/*--------------------SLIDER TRACK------------------ */\n:host>div>input[type=range]::-webkit-slider-runnable-track {\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-runnable-track {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n:host>div>input[type=range]::-moz-range-track {\n\twidth: 100%;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host:not([disabled]):not([readonly])>div>input[type=range]::-moz-range-track {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n\n:host:not([value]):not([disabled]):not([readonly])>div>input[type=range]::-webkit-slider-runnable-track {\n\tbackground-color: rgb(var(--smoothly-primary-tint));\n}\n\n:host:not([value]):not([disabled]):not([readonly])>div>input[type=range]::-moz-range-track {\n\tbackground-color: rgb(var(--smoothly-primary-tint));\n}\n\n:host[disabled]>div>input[type=range]::-webkit-slider-thumb,\n:host[disabled]>div>input[type=range]::-moz-range-thumb,\n:host[disabled]>div>input[type=range]::-webkit-slider-runnable-track,\n:host[disabled]>div>input[type=range]::-moz-range-track,\n:host[disabled],\n:host[disabled] * {\n\tcursor: not-allowed\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/*--------------------DUAL MODE------------------ */\n:host(.dual)>div>smoothly-input {\n\twidth: 7rem;\n\tflex: 0 0 auto;\n}\n:host(.dual) .track {\n\tposition: relative;\n\tflex: 1;\n\theight: 1.5em;\n\tdisplay: flex;\n\talign-items: center;\n}\n/* Shared visible track line */\n:host(.dual) .track::before {\n\tcontent: \"\";\n\tposition: absolute;\n\tleft: .4em;\n\tright: .4em;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual) .fill {\n\tposition: absolute;\n\theight: .3rem;\n\tborder-radius: 20px;\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tpointer-events: none;\n}\n/* Match the single range: the active fill drops to the foreground color when readonly/disabled. */\n:host(.dual[readonly]) .fill,\n:host(.dual[disabled]) .fill {\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n/* Both range inputs occupy the same box; only their thumbs receive pointer events */\n:host(.dual) .track > input[type=range] {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\twidth: 100%;\n\tmargin: 0;\n\tbackground: transparent;\n\tpointer-events: none;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-runnable-track {\n\tbackground: transparent;\n}\n:host(.dual) .track > input[type=range]::-moz-range-track {\n\tbackground: transparent;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-thumb {\n\tpointer-events: auto;\n}\n:host(.dual) .track > input[type=range]::-moz-range-thumb {\n\tpointer-events: auto;\n}\n\n/*--------------------DUAL MODE THUMBS------------------ */\n/* Single-mode thumb rules only match the direct-child :host>div>input, not the nested dual inputs, so replicate them here. */\n:host(.dual) .track > input[type=range] {\n\t-webkit-appearance: none;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-runnable-track {\n\theight: .3rem;\n}\n:host(.dual) .track > input[type=range]::-moz-range-track {\n\theight: .3rem;\n}\n:host(.dual) .track > input[type=range]::-webkit-slider-thumb {\n\t-webkit-appearance: none;\n\theight: 0.8em;\n\twidth: 0.8em;\n\tmargin-top: -.25em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual):not([disabled]):not([readonly]) .track > input[type=range]::-webkit-slider-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n:host(.dual) .track > input[type=range]::-moz-range-thumb {\n\theight: 0.8em;\n\twidth: 0.8em;\n\tborder-radius: 100%;\n\tborder: none;\n\tbackground-color: rgb(var(--smoothly-input-foreground));\n}\n:host(.dual):not([disabled]):not([readonly]) .track > input[type=range]::-moz-range-thumb {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcursor: pointer;\n}\n:host(.dual)[disabled] .track > input[type=range]::-webkit-slider-thumb,\n:host(.dual)[disabled] .track > input[type=range]::-moz-range-thumb {\n\tcursor: not-allowed;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { tidily } from \"tidily\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\nimport { Range } from \"./Range\"\n\n@Component({\n\ttag: \"smoothly-input-range\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputRange implements Input, Clearable, Editable, ComponentWillLoad {\n\tparent: Editable | undefined\n\tisDifferentFromInitial = false\n\tprivate observer = Editable.Observer.create(this)\n\tprivate input?: HTMLSmoothlyInputElement\n\tprivate startInput?: HTMLSmoothlyInputElement\n\tprivate endInput?: HTMLSmoothlyInputElement\n\tprivate initialValue: Range.Value | undefined = undefined\n\tprivate sliding = false\n\t@Element() element: HTMLSmoothlyInputRangeElement\n\t@Prop({ mutable: true }) value: Range.Value | undefined = undefined\n\t@Prop() dual = false\n\t@Prop({ reflect: true, mutable: true }) looks?: Looks\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ mutable: true }) defined = false\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop({ reflect: true }) disabled?: boolean\n\t@Prop() type: Extract<tidily.Type, \"text\" | \"percent\"> = \"text\"\n\t@Prop() min = 0\n\t@Prop() max = 100\n\t@Prop({ reflect: true }) name = \"range\"\n\t@Prop() step?: number\n\t@Prop() outputSide: \"right\" | \"left\" = \"left\"\n\t@Prop() label: string\n\t@State() showInput = false\n\t@Event() smoothlyInputLooks: EventEmitter<(looks?: Looks, color?: Color) => void>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@Event() smoothlyUserInput: EventEmitter<Input.UserInput>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = this.looks ?? looks), (this.color = color)))\n\t\tthis.smoothlyInputLoad.emit(parent => (this.parent = parent))\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tif (this.dual && !Range.is(this.value)) {\n\t\t\tthis.initialValue = { start: this.min, end: this.max }\n\t\t\tthis.value = this.initialValue\n\t\t} else {\n\t\t\tthis.value && (this.initialValue = this.value)\n\t\t\tthis.valueChanged()\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tsmoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputRange) => void>) {\n\t\tInput.registerSubAction(this, event)\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\tasync disconnectedCallback() {\n\t\tif (!this.element.isConnected) {\n\t\t\tawait this.unregister()\n\t\t}\n\t}\n\t@Watch(\"name\")\n\tnameChange(_: string | undefined, oldName: string | undefined) {\n\t\tInput.formRename(this, oldName)\n\t}\n\t@Method()\n\tasync register() {\n\t\tInput.formAdd(this)\n\t}\n\t@Method()\n\tasync unregister() {\n\t\tInput.formRemove(this)\n\t}\n\t@Method()\n\tasync getValue(): Promise<Range.Value | undefined> {\n\t\treturn this.value\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\t@Method()\n\tasync listen(listener: Editable.Observer.Listener): Promise<void> {\n\t\tthis.observer.subscribe(listener)\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.value = this.initialValue\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.initialValue = this.value\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.valueChanged()\n\t}\n\t@Watch(\"value\")\n\tvalueChanged(): void {\n\t\tconst normalized = Range.normalize(this.value, this.step)\n\t\tif (!Range.equals(normalized, this.value)) {\n\t\t\tthis.value = normalized\n\t\t\treturn\n\t\t}\n\t\tthis.isDifferentFromInitial = !Range.equals(this.initialValue, this.value)\n\t\tthis.defined = Range.defined(this.value)\n\t\tif (!this.sliding) {\n\t\t\tthis.observer.publish()\n\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t}\n\t}\n\t@Watch(\"disabled\")\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.observer.publish()\n\t}\n\tsetValue(value: number | undefined): void {\n\t\tif (value == undefined || Number.isNaN(value)) {\n\t\t\tthis.value = undefined\n\t\t} else if (value < this.min) {\n\t\t\tthis.value = this.min\n\t\t} else if (value > this.max) {\n\t\t\tthis.value = this.max\n\t\t} else {\n\t\t\tthis.value = value\n\t\t}\n\t\tthis.input && (this.input.value = this.type == \"text\" ? (this.value as number)?.toString() : (this.value as number))\n\t}\n\tsetRange(part: \"start\" | \"end\", value: number | undefined): void {\n\t\tconst current = Range.is(this.value) ? this.value : { start: this.min, end: this.max }\n\t\tconst resolved = value == undefined || Number.isNaN(value) ? (part == \"start\" ? this.min : this.max) : value\n\t\tconst next = Range.setPart(current, part, resolved, this.min, this.max)\n\t\tif (Range.equals(next, this.value)) {\n\t\t\treturn\n\t\t}\n\t\tthis.value = next\n\t\tconst field = part == \"start\" ? this.startInput : this.endInput\n\t\tconst bound = next[part]\n\t\tfield && (field.value = this.type == \"text\" ? bound.toString() : bound)\n\t\t!this.sliding && this.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t}\n\tprivate async commitField(part: \"start\" | \"end\"): Promise<void> {\n\t\tconst field = part == \"start\" ? this.startInput : this.endInput\n\t\tthis.setRange(part, field ? Number(await field.getValue()) : undefined)\n\t\tconst bound = Range.is(this.value) ? this.value[part] : undefined\n\t\tfield?.setValue(this.type == \"text\" ? bound?.toString() : bound)\n\t}\n\n\tprivate renderSingle(): VNode[] {\n\t\treturn [\n\t\t\t<smoothly-input\n\t\t\t\tref={e => (this.input = e)}\n\t\t\t\tlooks={undefined}\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={this.name}\n\t\t\t\tshowLabel={this.outputSide === \"left\" && !!this.label}\n\t\t\t\ttype={this.type}\n\t\t\t\tonSmoothlyInputLoad={async e => (\n\t\t\t\t\te.stopPropagation(),\n\t\t\t\t\tthis.setValue(Input.Element.is(e.target) ? Number(await e.target.getValue()) : undefined)\n\t\t\t\t)}\n\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={async e => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tthis.setValue(Input.Element.is(e.target) ? Number(await e.target.getValue()) : undefined)\n\t\t\t\t}}\n\t\t\t\tvalue={this.type == \"percent\" ? (this.value as number) : (this.value as number)?.toString()}\n\t\t\t\tplaceholder={this.outputSide === \"right\" ? \"-\" : undefined}\n\t\t\t\treadonly={this.readonly}\n\t\t\t\tdisabled={this.disabled}>\n\t\t\t\t{this.label}\n\t\t\t</smoothly-input>,\n\t\t\t<smoothly-display label={(this.type == \"percent\" ? this.min * 100 : this.min).toString()} />,\n\t\t\t<input\n\t\t\t\tname={this.name}\n\t\t\t\tpart=\"range\"\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin={this.min}\n\t\t\t\tmax={this.max}\n\t\t\t\tstep={this.step ?? \"any\"}\n\t\t\t\tdisabled={this.readonly || this.disabled}\n\t\t\t\tonInput={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = true\n\t\t\t\t\tthis.setValue((event.target as HTMLInputElement).valueAsNumber)\n\t\t\t\t}}\n\t\t\t\tonChange={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = false\n\t\t\t\t\tthis.observer.publish()\n\t\t\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t\t\t\t}}\n\t\t\t\tvalue={(this.value as number) ?? this.min}\n\t\t\t/>,\n\t\t\t<smoothly-display label={(this.type == \"percent\" ? this.max * 100 : this.max).toString()} />,\n\t\t]\n\t}\n\tprivate renderDual(): VNode[] {\n\t\tconst range = Range.is(this.value) ? this.value : { start: this.min, end: this.max }\n\t\tconst left = Range.percent(range.start, this.min, this.max)\n\t\tconst right = 100 - Range.percent(range.end, this.min, this.max)\n\t\treturn [\n\t\t\tthis.renderField(\"start\", range.start),\n\t\t\t<div class=\"track\" part=\"track\">\n\t\t\t\t<div class=\"fill\" part=\"fill\" style={{ left: `${left}%`, right: `${right}%` }} />\n\t\t\t\t{this.renderRangeInput(\"start\", range.start)}\n\t\t\t\t{this.renderRangeInput(\"end\", range.end)}\n\t\t\t</div>,\n\t\t\tthis.renderField(\"end\", range.end),\n\t\t]\n\t}\n\tprivate renderField(part: \"start\" | \"end\", value: number): VNode {\n\t\treturn (\n\t\t\t<smoothly-input\n\t\t\t\tref={e => (part == \"start\" ? (this.startInput = e) : (this.endInput = e))}\n\t\t\t\tclass={part}\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={`${this.name}-${part}`}\n\t\t\t\tshowLabel={true}\n\t\t\t\ttype={this.type}\n\t\t\t\tonSmoothlyBlur={e => (e.stopPropagation(), this.commitField(part))}\n\t\t\t\tonSmoothlyKeydown={e => void (e.detail.key == \"Enter\" && this.commitField(part))}\n\t\t\t\tonSmoothlyInput={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyUserInput={e => e.stopPropagation()}\n\t\t\t\tvalue={this.type == \"percent\" ? value : value?.toString()}\n\t\t\t\treadonly={this.readonly}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\tright={part == \"start\"}>\n\t\t\t\t{`${this.label ? this.label : \"\"} ${part == \"start\" ? \"From\" : \"To\"}`}\n\t\t\t</smoothly-input>\n\t\t)\n\t}\n\tprivate renderRangeInput(part: \"start\" | \"end\", value: number): VNode {\n\t\treturn (\n\t\t\t<input\n\t\t\t\tpart={part == \"start\" ? \"range range-start\" : \"range range-end\"}\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin={this.min}\n\t\t\t\tmax={this.max}\n\t\t\t\tstep={this.step ?? \"any\"}\n\t\t\t\tdisabled={this.readonly || this.disabled}\n\t\t\t\tonInput={event => {\n\t\t\t\t\tconst input = event.target as HTMLInputElement\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = true\n\t\t\t\t\tthis.setRange(part, input.valueAsNumber)\n\t\t\t\t\tconst bound = Range.is(this.value) ? this.value[part] : undefined\n\t\t\t\t\tbound != undefined && (input.value = String(bound))\n\t\t\t\t}}\n\t\t\t\tonChange={event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tthis.sliding = false\n\t\t\t\t\tthis.observer.publish()\n\t\t\t\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\t\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: this.value })\n\t\t\t\t}}\n\t\t\t\tvalue={value ?? (part == \"start\" ? this.min : this.max)}\n\t\t\t/>\n\t\t)\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t\"output-side-right\": this.outputSide === \"right\",\n\t\t\t\t\t\"show-label\": this.dual || (this.outputSide === \"left\" && !!this.label),\n\t\t\t\t\tdual: this.dual,\n\t\t\t\t}}>\n\t\t\t\t<slot name=\"start\" />\n\t\t\t\t<div>\n\t\t\t\t\t<label htmlFor={this.name}>{this.label}</label>\n\t\t\t\t\t{this.dual ? this.renderDual() : this.renderSingle()}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"end\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"sYAEM,IAAWA,GAAjB,SAAiBA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,QAAUmB,KAAKhC,IAAMgC,KAAK/B,K,CAItD,MAAA8H,GACC,OACC7B,EAAC8B,EAAI,CAAAJ,IAAA,2CACJL,MAAO,CACN,oBAAqBvF,KAAKY,aAAe,QACzC,aAAcZ,KAAKQ,MAASR,KAAKY,aAAe,UAAYZ,KAAKsE,MACjE9D,KAAMR,KAAKQ,OAEZ0D,EAAA,QAAA0B,IAAA,2CAAMjF,KAAK,UACXuD,EAAA,OAAA0B,IAAA,4CACC1B,EAAA,SAAA0B,IAAA,2CAAOK,QAASjG,KAAKW,MAAOX,KAAKsE,OAChCtE,KAAKQ,KAAOR,KAAKkF,aAAelF,KAAKiE,gBAEvCC,EAAA,QAAA0B,IAAA,2CAAMjF,KAAK,Q","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,h as o,F as a,d as s,t as m}from"./p-BsZrGTcp.js";import{R as c}from"./p-Br0kWrBT.js";import{d as i}from"./p-mmAi00ak.js";import{d as r}from"./p-Cl8L61mt.js";import{d as l}from"./p-CHjWijPI.js";import{d as n}from"./p-BE5E3Jm6.js";import{d as f}from"./p-CN3iME9d.js";import{d}from"./p-DG2pfnCV.js";import{d as b}from"./p-uFR5K4vd.js";import{d as y}from"./p-DvZK__s-.js";import{d as p}from"./p-F8qX8ZuL.js";import{d as h}from"./p-vvQg46ti.js";import{d as u}from"./p-DFSiKg4M.js";import{d as k}from"./p-o8kM0Soe.js";import{d as j}from"./p-Dd9tz4Tj.js";import{d as g}from"./p-BX-sEZyq.js";import{d as v}from"./p-y6VfFBKz.js";import{d as E}from"./p-CtVEKtM6.js";import{d as w}from"./p-KZeR_6LG.js";import{d as O}from"./p-BSHxNVcQ.js";import{d as S}from"./p-gEWA_tZo.js";import{d as F}from"./p-MqffyRVU.js";import{d as x}from"./p-wjlHVReJ.js";import{d as P}from"./p-4Xn3Nprv.js";import{d as z}from"./p-j4UEmpTa.js";import{d as C}from"./p-C22G-tNF.js";import{d as H}from"./p-BplZiuMF.js";import{d as I}from"./p-BLdivqFr.js";import{d as N}from"./p-CVdJ19AA.js";import{d as D}from"./p-DvOr53No.js";import{d as R}from"./p-Cs0CtSI2.js";import{d as B}from"./p-2Y5tLcQ1.js";import{d as V}from"./p-BsHachOX.js";const q=()=>`.sc-smoothly-form-demo-pet-h{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:auto auto;grid-column-gap:2rem}.sc-smoothly-form-demo-pet-h smoothly-input-checkbox[name="hasOwner"].sc-smoothly-form-demo-pet,.sc-smoothly-form-demo-pet-h>smoothly-form.sc-smoothly-form-demo-pet smoothly-tabs.sc-smoothly-form-demo-pet{flex-basis:100%}`;const L=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.hasOwner=false;this.owner={}}render(){var e,t;return o(s,{key:"3555b678ce1821ff509e6c6bf7cd5f846150361e"},o("h2",{key:"977304593cbf95b3a07e55d27bcba52421c3a806"},"Pet"),o("h3",{key:"30d9e280ca0f61806f9267fd2cb64b0018a13fd0"},"Value"),o("smoothly-form",{key:"9fea67b46ff29a01b7a15aa482cd7d756c766315",looks:"border",onSmoothlyFormSubmit:e=>alert(JSON.stringify(e.detail)),onSmoothlyFormInput:e=>this.value=Object.assign({},e.detail)},o("smoothly-input",{key:"0e4dcd3f6853fcd923db4e2aec019d5448a9985c",type:"text",name:"name.first",value:"Johnny"},"Name",o("smoothly-input-reset",{key:"5741904cab68af6d1be19fe0f8a54490b84d21ba",slot:"end"})),o("smoothly-input",{key:"c866df63069281710b3a331655de6d052402b139",type:"integer",name:"age"},"Age (Years)"),o("smoothly-input-checkbox",{key:"0b1b661bf19f1ca7fa08fe79af51082843d3170c",name:"hasOwner",onSmoothlyInputLoad:e=>e.stopPropagation(),onSmoothlyInput:e=>{this.hasOwner=e.detail.hasOwner;e.stopPropagation()}},"Has Owner",o("smoothly-input-reset",{key:"b11ab6e4f6c4f5c3b58b7b1d697031830ef6c897",slot:"end"})),this.hasOwner&&o(a,{key:"f73c34c51c677c929481e3467a4a1720d2af6192"},o("smoothly-input",{key:"93e88b422344bf296bc08e1c87153ee5e171f116",type:"text",name:"owner.firstName",value:this.owner.firstName,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{firstName:e.detail["owner.firstName"]})},"Owner First Name",o("smoothly-input-reset",{key:"b7364d965671c8389a4ebf10b6dff81a8f83579d",slot:"end"})),o("smoothly-input",{key:"e02d9a248eadadca31f2b7e54a4fe2d7dcb78ab7",type:"text",name:"owner.lastName",value:this.owner.lastName,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{lastName:e.detail["owner.lastName"]})},"Owner Last Name"),o("smoothly-input-file",{key:"c62884a682169ef822236373673f6b21c960fe79",name:"owner.picture"},o("span",{key:"dee1e245fbb06cfff787b50beff581bc48dff312",slot:"label"},"Owner picture")),o("smoothly-input-date",{key:"968c755e88629fd76f61cc109f8a7c85c6b87b14",name:"owner.birthday",value:this.owner.birthday,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{birthday:e.detail["owner.birthday"]})},"Owner birthday",o("smoothly-input-reset",{key:"bdc545954853494c63ec34555b90f35f12a081c1",slot:"end"})),o("smoothly-input-date-range",{key:"e18ac1955b66407c2dd2aebb3d1b616752cba832",name:"owner.ownedRange",start:(e=this.owner.ownedRange)===null||e===void 0?void 0:e.start,end:(t=this.owner.ownedRange)===null||t===void 0?void 0:t.end,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{ownedRange:e.detail["owner.ownedRange"]})},"Owner ownedRange",o("smoothly-input-reset",{key:"56d1ce3d8b2a0a0daf1b0e66b5e5fd2fca291d12",slot:"end"})),o("smoothly-input-range",{key:"aa6cf832bc63235bc0590ac6cab2da6b1d5923f0",name:"owner.height",step:1,max:250,value:this.owner.height,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{height:e.detail["owner.height"]})},"Owner's Height",o("smoothly-input-reset",{key:"ecae9fdf30760aa00a799a24729221ef0bb26786",slot:"end"})),o("smoothly-input-select",{key:"587127c00899a6b985a1ba41f73c906e94abf504",name:"owner.favoriteHat"},o("span",{key:"02289ec45dd570ca382776beb9fa34d2552d92da",slot:"label"},"Owner's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t,selected:this.owner.favoriteHat==e},e))),o("smoothly-input-reset",{key:"52aeef0a52c37c0ad9236c99e3a5af20c26f7c6d",slot:"end"})),o("smoothly-input-color",{key:"2640d32a91c9e12b2ffb9564e44e43bd24d97162",name:"owner.favoriteColor",value:this.owner.favoriteColor?c.toHex(this.owner.favoriteColor):undefined,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{favoriteColor:e.detail["owner.favoriteColor"]})},"Owner's Favorite Color",o("smoothly-input-reset",{key:"9253ea9ae7e24f1fc70da6f7ab04bbe38599024a",slot:"end"})),o("smoothly-input-radio",{key:"f6b4f1e0b3c1e8eef422c154b22454610e7e6af3",name:"owner.favoritePizza",value:this.owner.favoritePizza,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{favoritePizza:e.detail["owner.favoritePizza"]})},o("span",{key:"6ec795591acadf04027319369d72e9470787945f",slot:"label"},"Owner's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"34815b0ebee805a4481312379025218fd46f01c7",name:"owner.hasPet",checked:this.owner.hasPet,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{hasPet:e.detail["owner.hasPet"]})},"Has Pet")),o("smoothly-tabs",{key:"ae43c2284ea51f72e415e00a1ada8cab10afebdb"},o("smoothly-tab",{key:"6485c24546d14f5845987da38646066c8f066c61",label:"Dog",name:"dog"},o("smoothly-input",{key:"257d6b7f1140ff7210173fb0e5de4704000bc432",type:"text",name:"dog.breed"},"Breed"),o("smoothly-input-file",{key:"a75e2029fe5b630410fee39462d197489a5291db",name:"dog.picture"},o("span",{key:"7d881935f028284bb80a3e33a47baf59813bc63a",slot:"label"},"Dog picture")),o("smoothly-input-date-time",{key:"f8991e1f543ad09a241977a2570a473597c79a80",name:"dog.lastWalk"},"Time of last walk"),o("smoothly-input-date",{key:"abdf29fd0b95142a6a28aacbc2a3de52b28acfa6",name:"dog.birthday"},"Dog birthday"),o("smoothly-input-date-range",{key:"07710a1af7f884114fee361d80b27e9351cd85d5",name:"dog.dateRange"},"Dog date range"),o("smoothly-input-select",{key:"1307c6bdafc9598e829ee60c4ce7c1b1546dc7af",name:"dog.favoriteHat"},o("span",{key:"4ed1cd24bba8e63db60d63cffdd1417023117a2d",slot:"label"},"Dog's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t},e)))),o("smoothly-input-color",{key:"0b049778a99bee6df6d2ec48dbc071697136fe16",name:"dog.favoriteColor"},"Dog's Favorite Color"),o("smoothly-input-radio",{key:"c65093016a5b90c6bb25e85e4e3575124712c7be",name:"dog.favoritePizza"},o("span",{key:"9565009584ed77b05040ed9468700f116adb563c",slot:"label"},"Dog's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"666be38409bc89d3e4650ad9401c854327ebefc1",name:"dog.hasPet"},"Has Pet")),o("smoothly-tab",{key:"fb5f8f5459b5f642b0c6a2439b319a42002959a4",label:"Cat",name:"cat",open:true},o("smoothly-input",{key:"682f5638f562e61dd092f83eccf7925f720cf194",name:"cat.favoriteFood"},"Favorite Food")),o("smoothly-tab",{key:"c5482174c9405a1136f012fa82cca350c2ed83c2",label:"Parrot",name:"parrot"},o("smoothly-input",{key:"f78b450a29382f8f856ebbff27745c953af53308",type:"price",name:"parrot.price",currency:"EUR"},"Summary Price"),o("smoothly-input-file",{key:"efbd349e10beda447d69c20474c692e2688bcaab",name:"parrot.picture"},o("span",{key:"01a1817ed064f0181742eb5aeb3f2723338f84e7",slot:"label"},"Summary picture"),o("smoothly-input-clear",{key:"be120da97155f2f5591d924aa32604d6086e31c1",slot:"end"})),o("smoothly-input-date",{key:"e59e3a24b479cfbd94eb3c6c7c5f394f93049274",name:"parrot.birthday"},"Summary birthday"),o("smoothly-input-date-range",{key:"4e918229a0745964257c0fb32f0ecd1a4283cdca",name:"parrot.ownedRange",start:"2020-01-01",end:"2020-01-15"},"Summary ownedRange",o("smoothly-input-reset",{key:"514983470344439c22cc6b68bace5b1609f04f89",slot:"end"})),o("smoothly-input-range",{key:"cca92a33c0bc46d7bf85e86e467b9f703063d35d",name:"parrot.height",label:"Height"},o("smoothly-input-reset",{key:"edb1126fcabc71b9d98f33257c8d282982e8ea36",slot:"end"})),o("smoothly-input-select",{key:"868654a72f5642b033392aa33b3b107b1d7ddfa4",name:"parrot.favoriteHat"},o("span",{key:"f811c0c08c4277aba3e85da353903b0185bb9df7",slot:"label"},"Summary's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t},e)))),o("smoothly-input-month",{key:"4226a5e036817f3a80fce926c6761cee1a8bcd66",name:"parrot.month"},o("span",{key:"61570b4fc31693fd2d3f81bea327cfc890ea6c54",slot:"month-label"},"Summary month")),o("smoothly-input-color",{key:"23a77f1358748ee93995b71253bf43641593fc3c",name:"parrot.color"},"Summary Color"),o("smoothly-input-radio",{key:"a32718e3246ec6ffa4cb33eab22c6e549ef764f0",name:"parrot.favoritePizza"},o("span",{key:"5283e5e305bbc586ac74665518f077a2b20e261a",slot:"label"},"Summary's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"15c5b92cd4ee1c6f46880327a7737abba978cb6a",name:"parrot.hasPet"},"Has Pet"))),o("smoothly-input-submit",{key:"975b1bbb887c933a2eacb4bc1a79dfdf99d73972",size:"icon",slot:"submit",color:"success",fill:"solid"})),o("smoothly-display",{key:"09fef0282ab5dea1bceacee812f4d9563c21ed2c",type:"json",value:this.value}))}static get style(){return q()}},[2,"smoothly-form-demo-pet",{hasOwner:[32],owner:[32],value:[32]}]);function Z(){if(typeof customElements==="undefined"){return}const e=["smoothly-form-demo-pet","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-date","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-file","smoothly-input-month","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-tab","smoothly-tabs","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-form-demo-pet":if(!customElements.get(m(e))){customElements.define(m(e),L)}break;case"smoothly-button":if(!customElements.get(m(e))){i()}break;case"smoothly-button-confirm":if(!customElements.get(m(e))){r()}break;case"smoothly-calendar":if(!customElements.get(m(e))){l()}break;case"smoothly-date-text":if(!customElements.get(m(e))){n()}break;case"smoothly-display":if(!customElements.get(m(e))){f()}break;case"smoothly-display-json":if(!customElements.get(m(e))){d()}break;case"smoothly-display-json-object":if(!customElements.get(m(e))){b()}break;case"smoothly-display-json-primitive":if(!customElements.get(m(e))){y()}break;case"smoothly-display-json-record-key":if(!customElements.get(m(e))){p()}break;case"smoothly-form":if(!customElements.get(m(e))){h()}break;case"smoothly-icon":if(!customElements.get(m(e))){u()}break;case"smoothly-input":if(!customElements.get(m(e))){k()}break;case"smoothly-input-checkbox":if(!customElements.get(m(e))){j()}break;case"smoothly-input-clear":if(!customElements.get(m(e))){g()}break;case"smoothly-input-color":if(!customElements.get(m(e))){v()}break;case"smoothly-input-date":if(!customElements.get(m(e))){E()}break;case"smoothly-input-date-range":if(!customElements.get(m(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(m(e))){O()}break;case"smoothly-input-file":if(!customElements.get(m(e))){S()}break;case"smoothly-input-month":if(!customElements.get(m(e))){F()}break;case"smoothly-input-radio":if(!customElements.get(m(e))){x()}break;case"smoothly-input-radio-item":if(!customElements.get(m(e))){P()}break;case"smoothly-input-range":if(!customElements.get(m(e))){z()}break;case"smoothly-input-reset":if(!customElements.get(m(e))){C()}break;case"smoothly-input-select":if(!customElements.get(m(e))){H()}break;case"smoothly-input-submit":if(!customElements.get(m(e))){I()}break;case"smoothly-item":if(!customElements.get(m(e))){N()}break;case"smoothly-spinner":if(!customElements.get(m(e))){D()}break;case"smoothly-tab":if(!customElements.get(m(e))){R()}break;case"smoothly-tabs":if(!customElements.get(m(e))){B()}break;case"smoothly-toggle-switch":if(!customElements.get(m(e))){V()}break}}))}Z();export{L as S,Z as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,h as o,F as a,d as s,t as m}from"./p-BsZrGTcp.js";import{R as c}from"./p-Br0kWrBT.js";import{d as i}from"./p-mmAi00ak.js";import{d as r}from"./p-Cl8L61mt.js";import{d as l}from"./p-CHjWijPI.js";import{d as n}from"./p-BE5E3Jm6.js";import{d as f}from"./p-CN3iME9d.js";import{d}from"./p-DG2pfnCV.js";import{d as b}from"./p-uFR5K4vd.js";import{d as y}from"./p-DvZK__s-.js";import{d as p}from"./p-F8qX8ZuL.js";import{d as h}from"./p-vvQg46ti.js";import{d as u}from"./p-DFSiKg4M.js";import{d as k}from"./p-o8kM0Soe.js";import{d as j}from"./p-Dd9tz4Tj.js";import{d as g}from"./p-BX-sEZyq.js";import{d as v}from"./p-CaQWZMN4.js";import{d as E}from"./p-CtVEKtM6.js";import{d as w}from"./p-KZeR_6LG.js";import{d as O}from"./p-BSHxNVcQ.js";import{d as S}from"./p-gEWA_tZo.js";import{d as F}from"./p-MqffyRVU.js";import{d as P}from"./p-wjlHVReJ.js";import{d as x}from"./p-4Xn3Nprv.js";import{d as C}from"./p-PwCtk_DY.js";import{d as z}from"./p-C22G-tNF.js";import{d as H}from"./p-BplZiuMF.js";import{d as N}from"./p-BLdivqFr.js";import{d as D}from"./p-CVdJ19AA.js";import{d as I}from"./p-DvOr53No.js";import{d as R}from"./p-Cs0CtSI2.js";import{d as B}from"./p-2Y5tLcQ1.js";import{d as Z}from"./p-BsHachOX.js";const q=()=>`.sc-smoothly-form-demo-pet-h{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:auto auto;grid-column-gap:2rem}.sc-smoothly-form-demo-pet-h smoothly-input-checkbox[name="hasOwner"].sc-smoothly-form-demo-pet,.sc-smoothly-form-demo-pet-h>smoothly-form.sc-smoothly-form-demo-pet smoothly-tabs.sc-smoothly-form-demo-pet{flex-basis:100%}`;const L=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.hasOwner=false;this.owner={}}render(){var e,t;return o(s,{key:"3555b678ce1821ff509e6c6bf7cd5f846150361e"},o("h2",{key:"977304593cbf95b3a07e55d27bcba52421c3a806"},"Pet"),o("h3",{key:"30d9e280ca0f61806f9267fd2cb64b0018a13fd0"},"Value"),o("smoothly-form",{key:"9fea67b46ff29a01b7a15aa482cd7d756c766315",looks:"border",onSmoothlyFormSubmit:e=>alert(JSON.stringify(e.detail)),onSmoothlyFormInput:e=>this.value=Object.assign({},e.detail)},o("smoothly-input",{key:"0e4dcd3f6853fcd923db4e2aec019d5448a9985c",type:"text",name:"name.first",value:"Johnny"},"Name",o("smoothly-input-reset",{key:"5741904cab68af6d1be19fe0f8a54490b84d21ba",slot:"end"})),o("smoothly-input",{key:"c866df63069281710b3a331655de6d052402b139",type:"integer",name:"age"},"Age (Years)"),o("smoothly-input-checkbox",{key:"0b1b661bf19f1ca7fa08fe79af51082843d3170c",name:"hasOwner",onSmoothlyInputLoad:e=>e.stopPropagation(),onSmoothlyInput:e=>{this.hasOwner=e.detail.hasOwner;e.stopPropagation()}},"Has Owner",o("smoothly-input-reset",{key:"b11ab6e4f6c4f5c3b58b7b1d697031830ef6c897",slot:"end"})),this.hasOwner&&o(a,{key:"f73c34c51c677c929481e3467a4a1720d2af6192"},o("smoothly-input",{key:"93e88b422344bf296bc08e1c87153ee5e171f116",type:"text",name:"owner.firstName",value:this.owner.firstName,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{firstName:e.detail["owner.firstName"]})},"Owner First Name",o("smoothly-input-reset",{key:"b7364d965671c8389a4ebf10b6dff81a8f83579d",slot:"end"})),o("smoothly-input",{key:"e02d9a248eadadca31f2b7e54a4fe2d7dcb78ab7",type:"text",name:"owner.lastName",value:this.owner.lastName,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{lastName:e.detail["owner.lastName"]})},"Owner Last Name"),o("smoothly-input-file",{key:"c62884a682169ef822236373673f6b21c960fe79",name:"owner.picture"},o("span",{key:"dee1e245fbb06cfff787b50beff581bc48dff312",slot:"label"},"Owner picture")),o("smoothly-input-date",{key:"968c755e88629fd76f61cc109f8a7c85c6b87b14",name:"owner.birthday",value:this.owner.birthday,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{birthday:e.detail["owner.birthday"]})},"Owner birthday",o("smoothly-input-reset",{key:"bdc545954853494c63ec34555b90f35f12a081c1",slot:"end"})),o("smoothly-input-date-range",{key:"e18ac1955b66407c2dd2aebb3d1b616752cba832",name:"owner.ownedRange",start:(e=this.owner.ownedRange)===null||e===void 0?void 0:e.start,end:(t=this.owner.ownedRange)===null||t===void 0?void 0:t.end,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{ownedRange:e.detail["owner.ownedRange"]})},"Owner ownedRange",o("smoothly-input-reset",{key:"56d1ce3d8b2a0a0daf1b0e66b5e5fd2fca291d12",slot:"end"})),o("smoothly-input-range",{key:"aa6cf832bc63235bc0590ac6cab2da6b1d5923f0",name:"owner.height",step:1,max:250,value:this.owner.height,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{height:e.detail["owner.height"]})},"Owner's Height",o("smoothly-input-reset",{key:"ecae9fdf30760aa00a799a24729221ef0bb26786",slot:"end"})),o("smoothly-input-select",{key:"587127c00899a6b985a1ba41f73c906e94abf504",name:"owner.favoriteHat"},o("span",{key:"02289ec45dd570ca382776beb9fa34d2552d92da",slot:"label"},"Owner's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t,selected:this.owner.favoriteHat==e},e))),o("smoothly-input-reset",{key:"52aeef0a52c37c0ad9236c99e3a5af20c26f7c6d",slot:"end"})),o("smoothly-input-color",{key:"2640d32a91c9e12b2ffb9564e44e43bd24d97162",name:"owner.favoriteColor",value:this.owner.favoriteColor?c.toHex(this.owner.favoriteColor):undefined,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{favoriteColor:e.detail["owner.favoriteColor"]})},"Owner's Favorite Color",o("smoothly-input-reset",{key:"9253ea9ae7e24f1fc70da6f7ab04bbe38599024a",slot:"end"})),o("smoothly-input-radio",{key:"f6b4f1e0b3c1e8eef422c154b22454610e7e6af3",name:"owner.favoritePizza",value:this.owner.favoritePizza,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{favoritePizza:e.detail["owner.favoritePizza"]})},o("span",{key:"6ec795591acadf04027319369d72e9470787945f",slot:"label"},"Owner's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"34815b0ebee805a4481312379025218fd46f01c7",name:"owner.hasPet",checked:this.owner.hasPet,onSmoothlyInput:e=>this.owner=Object.assign(Object.assign({},this.owner),{hasPet:e.detail["owner.hasPet"]})},"Has Pet")),o("smoothly-tabs",{key:"ae43c2284ea51f72e415e00a1ada8cab10afebdb"},o("smoothly-tab",{key:"6485c24546d14f5845987da38646066c8f066c61",label:"Dog",name:"dog"},o("smoothly-input",{key:"257d6b7f1140ff7210173fb0e5de4704000bc432",type:"text",name:"dog.breed"},"Breed"),o("smoothly-input-file",{key:"a75e2029fe5b630410fee39462d197489a5291db",name:"dog.picture"},o("span",{key:"7d881935f028284bb80a3e33a47baf59813bc63a",slot:"label"},"Dog picture")),o("smoothly-input-date-time",{key:"f8991e1f543ad09a241977a2570a473597c79a80",name:"dog.lastWalk"},"Time of last walk"),o("smoothly-input-date",{key:"abdf29fd0b95142a6a28aacbc2a3de52b28acfa6",name:"dog.birthday"},"Dog birthday"),o("smoothly-input-date-range",{key:"07710a1af7f884114fee361d80b27e9351cd85d5",name:"dog.dateRange"},"Dog date range"),o("smoothly-input-select",{key:"1307c6bdafc9598e829ee60c4ce7c1b1546dc7af",name:"dog.favoriteHat"},o("span",{key:"4ed1cd24bba8e63db60d63cffdd1417023117a2d",slot:"label"},"Dog's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t},e)))),o("smoothly-input-color",{key:"0b049778a99bee6df6d2ec48dbc071697136fe16",name:"dog.favoriteColor"},"Dog's Favorite Color"),o("smoothly-input-radio",{key:"c65093016a5b90c6bb25e85e4e3575124712c7be",name:"dog.favoritePizza"},o("span",{key:"9565009584ed77b05040ed9468700f116adb563c",slot:"label"},"Dog's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"666be38409bc89d3e4650ad9401c854327ebefc1",name:"dog.hasPet"},"Has Pet")),o("smoothly-tab",{key:"fb5f8f5459b5f642b0c6a2439b319a42002959a4",label:"Cat",name:"cat",open:true},o("smoothly-input",{key:"682f5638f562e61dd092f83eccf7925f720cf194",name:"cat.favoriteFood"},"Favorite Food")),o("smoothly-tab",{key:"c5482174c9405a1136f012fa82cca350c2ed83c2",label:"Parrot",name:"parrot"},o("smoothly-input",{key:"f78b450a29382f8f856ebbff27745c953af53308",type:"price",name:"parrot.price",currency:"EUR"},"Summary Price"),o("smoothly-input-file",{key:"efbd349e10beda447d69c20474c692e2688bcaab",name:"parrot.picture"},o("span",{key:"01a1817ed064f0181742eb5aeb3f2723338f84e7",slot:"label"},"Summary picture"),o("smoothly-input-clear",{key:"be120da97155f2f5591d924aa32604d6086e31c1",slot:"end"})),o("smoothly-input-date",{key:"e59e3a24b479cfbd94eb3c6c7c5f394f93049274",name:"parrot.birthday"},"Summary birthday"),o("smoothly-input-date-range",{key:"4e918229a0745964257c0fb32f0ecd1a4283cdca",name:"parrot.ownedRange",start:"2020-01-01",end:"2020-01-15"},"Summary ownedRange",o("smoothly-input-reset",{key:"514983470344439c22cc6b68bace5b1609f04f89",slot:"end"})),o("smoothly-input-range",{key:"cca92a33c0bc46d7bf85e86e467b9f703063d35d",name:"parrot.height",label:"Height"},o("smoothly-input-reset",{key:"edb1126fcabc71b9d98f33257c8d282982e8ea36",slot:"end"})),o("smoothly-input-select",{key:"868654a72f5642b033392aa33b3b107b1d7ddfa4",name:"parrot.favoriteHat"},o("span",{key:"f811c0c08c4277aba3e85da353903b0185bb9df7",slot:"label"},"Summary's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((e,t)=>o("smoothly-item",{value:e,key:t},e)))),o("smoothly-input-month",{key:"4226a5e036817f3a80fce926c6761cee1a8bcd66",name:"parrot.month"},o("span",{key:"61570b4fc31693fd2d3f81bea327cfc890ea6c54",slot:"month-label"},"Summary month")),o("smoothly-input-color",{key:"23a77f1358748ee93995b71253bf43641593fc3c",name:"parrot.color"},"Summary Color"),o("smoothly-input-radio",{key:"a32718e3246ec6ffa4cb33eab22c6e549ef764f0",name:"parrot.favoritePizza"},o("span",{key:"5283e5e305bbc586ac74665518f077a2b20e261a",slot:"label"},"Summary's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((e,t)=>o("smoothly-input-radio-item",{value:e,key:t},e)))),o("smoothly-input-checkbox",{key:"15c5b92cd4ee1c6f46880327a7737abba978cb6a",name:"parrot.hasPet"},"Has Pet"))),o("smoothly-input-submit",{key:"975b1bbb887c933a2eacb4bc1a79dfdf99d73972",size:"icon",slot:"submit",color:"success",fill:"solid"})),o("smoothly-display",{key:"09fef0282ab5dea1bceacee812f4d9563c21ed2c",type:"json",value:this.value}))}static get style(){return q()}},[2,"smoothly-form-demo-pet",{hasOwner:[32],owner:[32],value:[32]}]);function M(){if(typeof customElements==="undefined"){return}const e=["smoothly-form-demo-pet","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-date","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-file","smoothly-input-month","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-tab","smoothly-tabs","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-form-demo-pet":if(!customElements.get(m(e))){customElements.define(m(e),L)}break;case"smoothly-button":if(!customElements.get(m(e))){i()}break;case"smoothly-button-confirm":if(!customElements.get(m(e))){r()}break;case"smoothly-calendar":if(!customElements.get(m(e))){l()}break;case"smoothly-date-text":if(!customElements.get(m(e))){n()}break;case"smoothly-display":if(!customElements.get(m(e))){f()}break;case"smoothly-display-json":if(!customElements.get(m(e))){d()}break;case"smoothly-display-json-object":if(!customElements.get(m(e))){b()}break;case"smoothly-display-json-primitive":if(!customElements.get(m(e))){y()}break;case"smoothly-display-json-record-key":if(!customElements.get(m(e))){p()}break;case"smoothly-form":if(!customElements.get(m(e))){h()}break;case"smoothly-icon":if(!customElements.get(m(e))){u()}break;case"smoothly-input":if(!customElements.get(m(e))){k()}break;case"smoothly-input-checkbox":if(!customElements.get(m(e))){j()}break;case"smoothly-input-clear":if(!customElements.get(m(e))){g()}break;case"smoothly-input-color":if(!customElements.get(m(e))){v()}break;case"smoothly-input-date":if(!customElements.get(m(e))){E()}break;case"smoothly-input-date-range":if(!customElements.get(m(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(m(e))){O()}break;case"smoothly-input-file":if(!customElements.get(m(e))){S()}break;case"smoothly-input-month":if(!customElements.get(m(e))){F()}break;case"smoothly-input-radio":if(!customElements.get(m(e))){P()}break;case"smoothly-input-radio-item":if(!customElements.get(m(e))){x()}break;case"smoothly-input-range":if(!customElements.get(m(e))){C()}break;case"smoothly-input-reset":if(!customElements.get(m(e))){z()}break;case"smoothly-input-select":if(!customElements.get(m(e))){H()}break;case"smoothly-input-submit":if(!customElements.get(m(e))){N()}break;case"smoothly-item":if(!customElements.get(m(e))){D()}break;case"smoothly-spinner":if(!customElements.get(m(e))){I()}break;case"smoothly-tab":if(!customElements.get(m(e))){R()}break;case"smoothly-tabs":if(!customElements.get(m(e))){B()}break;case"smoothly-toggle-switch":if(!customElements.get(m(e))){Z()}break}}))}M();export{L as S,M as d};
|
|
2
|
+
//# sourceMappingURL=p-WvQaS_J6.js.map
|