@solid-design-system/components 6.0.0-next.2 → 6.0.0-next.3
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/cdn/chunks/chunk.URYTIP6C.js +2 -0
- package/cdn/components/range/range.d.ts +1 -1
- package/cdn/components/range/range.js +1 -1
- package/cdn/custom-elements.json +11 -11
- package/cdn/solid-components.bundle.js +38 -38
- package/cdn/solid-components.iife.js +44 -44
- package/cdn/solid-components.js +1 -1
- package/cdn/vscode.html-custom-data.json +8 -3
- package/cdn/web-types.json +10 -7
- package/cdn-versioned/chunks/chunk.3DB2ELEL.js +1 -1
- package/cdn-versioned/chunks/chunk.3ZRUHOGI.js +1 -1
- package/cdn-versioned/chunks/chunk.5G7ZOEWT.js +5 -5
- package/cdn-versioned/chunks/chunk.5PA35WD2.js +1 -1
- package/cdn-versioned/chunks/chunk.5TUC644H.js +2 -2
- package/cdn-versioned/chunks/chunk.5ZPLQS6G.js +2 -2
- package/cdn-versioned/chunks/chunk.5ZYFWIRD.js +1 -1
- package/cdn-versioned/chunks/chunk.63IQ23S4.js +1 -1
- package/cdn-versioned/chunks/chunk.66LOVPZM.js +1 -1
- package/cdn-versioned/chunks/chunk.66OZDVLX.js +2 -2
- package/cdn-versioned/chunks/chunk.6GHBG4PY.js +2 -2
- package/cdn-versioned/chunks/chunk.6Q6FRPBQ.js +2 -2
- package/cdn-versioned/chunks/chunk.6XTQ6373.js +2 -2
- package/cdn-versioned/chunks/chunk.6ZXO6XV7.js +2 -2
- package/cdn-versioned/chunks/chunk.7JAXJRX2.js +2 -2
- package/cdn-versioned/chunks/chunk.ALIY2YIR.js +2 -2
- package/cdn-versioned/chunks/chunk.AZC2MB6N.js +2 -2
- package/cdn-versioned/chunks/chunk.BL5NWLDW.js +1 -1
- package/cdn-versioned/chunks/chunk.BTMWUMPI.js +1 -1
- package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
- package/cdn-versioned/chunks/chunk.CINQCAVV.js +2 -2
- package/cdn-versioned/chunks/chunk.E7DVDO4P.js +1 -1
- package/cdn-versioned/chunks/chunk.EGKVLCBO.js +2 -2
- package/cdn-versioned/chunks/chunk.EIG3V7LV.js +2 -2
- package/cdn-versioned/chunks/chunk.F3OBG73C.js +1 -1
- package/cdn-versioned/chunks/chunk.FYS76H7M.js +1 -1
- package/cdn-versioned/chunks/chunk.GZN62V5M.js +2 -2
- package/cdn-versioned/chunks/chunk.H7N4XIFF.js +2 -2
- package/cdn-versioned/chunks/chunk.HO5NN73W.js +1 -1
- package/cdn-versioned/chunks/chunk.HWXFA3JT.js +2 -2
- package/cdn-versioned/chunks/chunk.IQUVFHYA.js +1 -1
- package/cdn-versioned/chunks/chunk.J3HOSC6V.js +2 -2
- package/cdn-versioned/chunks/chunk.J4LE3LKP.js +2 -2
- package/cdn-versioned/chunks/chunk.JGU23CP4.js +2 -2
- package/cdn-versioned/chunks/chunk.JS2HQ2N4.js +1 -1
- package/cdn-versioned/chunks/chunk.KL3CEU6E.js +3 -3
- package/cdn-versioned/chunks/chunk.MPLKGS34.js +2 -2
- package/cdn-versioned/chunks/chunk.MQ6HTONQ.js +2 -2
- package/cdn-versioned/chunks/chunk.MWU6TZ4N.js +2 -2
- package/cdn-versioned/chunks/chunk.NMHY6H5N.js +6 -6
- package/cdn-versioned/chunks/chunk.OXYZANQK.js +2 -2
- package/cdn-versioned/chunks/chunk.P3QDLITO.js +1 -1
- package/cdn-versioned/chunks/chunk.PES7MZKA.js +1 -1
- package/cdn-versioned/chunks/chunk.Q36WGVZ7.js +5 -5
- package/cdn-versioned/chunks/chunk.RJVGGY3Q.js +2 -2
- package/cdn-versioned/chunks/chunk.RXQYBUHG.js +2 -2
- package/cdn-versioned/chunks/chunk.S4EKTV5A.js +2 -2
- package/cdn-versioned/chunks/chunk.S5SNELX3.js +2 -2
- package/cdn-versioned/chunks/chunk.U6FGIHUI.js +2 -2
- package/cdn-versioned/chunks/chunk.URYTIP6C.js +2 -0
- package/cdn-versioned/chunks/chunk.UVDP4CO5.js +2 -2
- package/cdn-versioned/chunks/chunk.VA5ZPE34.js +2 -2
- package/cdn-versioned/chunks/chunk.VGYX7TTE.js +2 -2
- package/cdn-versioned/chunks/chunk.VHHOKYE5.js +2 -2
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WUWSF33N.js +1 -1
- package/cdn-versioned/chunks/chunk.XG6CO665.js +1 -1
- package/cdn-versioned/chunks/chunk.XHDZVSCR.js +2 -2
- package/cdn-versioned/chunks/chunk.XIRAK67B.js +1 -1
- package/cdn-versioned/chunks/chunk.YL7YHMIF.js +3 -3
- package/cdn-versioned/chunks/chunk.YUPZE4GS.js +2 -2
- package/cdn-versioned/chunks/chunk.YXMHHML2.js +2 -2
- package/cdn-versioned/chunks/chunk.ZATYZ65D.js +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +2 -2
- package/cdn-versioned/components/range/range.js +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +258 -258
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +78 -78
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +81 -81
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +102 -97
- package/cdn-versioned/web-types.json +172 -169
- package/dist/chunks/{chunk.XNEWFPWE.js → chunk.ES7AAS4J.js} +20 -7
- package/dist/components/range/range.d.ts +1 -1
- package/dist/components/range/range.js +1 -1
- package/dist/custom-elements.json +11 -11
- package/dist/solid-components.js +1 -1
- package/dist/vscode.html-custom-data.json +8 -3
- package/dist/web-types.json +10 -7
- package/dist-versioned/chunks/chunk.2ER4MXZC.js +1 -1
- package/dist-versioned/chunks/chunk.3BVNSUFD.js +1 -1
- package/dist-versioned/chunks/chunk.4CD5TTGT.js +4 -4
- package/dist-versioned/chunks/chunk.4FY6QRJ7.js +3 -3
- package/dist-versioned/chunks/chunk.5D7C4MXB.js +2 -2
- package/dist-versioned/chunks/chunk.5H7CWETG.js +2 -2
- package/dist-versioned/chunks/chunk.5WAWAUSM.js +2 -2
- package/dist-versioned/chunks/chunk.5ZRRM6UH.js +2 -2
- package/dist-versioned/chunks/chunk.662O4CMZ.js +12 -12
- package/dist-versioned/chunks/chunk.7RSL7EOY.js +6 -6
- package/dist-versioned/chunks/chunk.7XXRAMBH.js +1 -1
- package/dist-versioned/chunks/chunk.A3YMYTLW.js +4 -4
- package/dist-versioned/chunks/chunk.AAY5JRCW.js +4 -4
- package/dist-versioned/chunks/chunk.AEFLWSEK.js +12 -12
- package/dist-versioned/chunks/chunk.ANYT6TR4.js +1 -1
- package/dist-versioned/chunks/chunk.BFDY2E6R.js +11 -11
- package/dist-versioned/chunks/chunk.CR5C6OL5.js +26 -26
- package/dist-versioned/chunks/chunk.CT4BIUEI.js +6 -6
- package/dist-versioned/chunks/chunk.DFQ2QJI5.js +2 -2
- package/dist-versioned/chunks/chunk.DJ3WYVWV.js +6 -6
- package/dist-versioned/chunks/chunk.E7L2RBML.js +5 -5
- package/dist-versioned/chunks/chunk.EORXKFFT.js +1 -1
- package/dist-versioned/chunks/{chunk.XNEWFPWE.js → chunk.ES7AAS4J.js} +22 -9
- package/dist-versioned/chunks/chunk.F4A7G427.js +3 -3
- package/dist-versioned/chunks/chunk.FMSAUZWF.js +4 -4
- package/dist-versioned/chunks/chunk.FPMNMEXR.js +2 -2
- package/dist-versioned/chunks/chunk.HB45IF2T.js +1 -1
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.M5EPD6OZ.js +6 -6
- package/dist-versioned/chunks/chunk.MB47FVBP.js +1 -1
- package/dist-versioned/chunks/chunk.MFE2NCVX.js +3 -3
- package/dist-versioned/chunks/chunk.N5XK43AK.js +18 -18
- package/dist-versioned/chunks/chunk.NCZBBZOR.js +1 -1
- package/dist-versioned/chunks/chunk.NK5K5MMW.js +1 -1
- package/dist-versioned/chunks/chunk.NKPJM2WV.js +5 -5
- package/dist-versioned/chunks/chunk.O6OCXI2L.js +3 -3
- package/dist-versioned/chunks/chunk.OBQTYYBW.js +2 -2
- package/dist-versioned/chunks/chunk.OK3VBJRJ.js +3 -3
- package/dist-versioned/chunks/chunk.PF4UKMOY.js +2 -2
- package/dist-versioned/chunks/chunk.PJOYWTXL.js +1 -1
- package/dist-versioned/chunks/chunk.QHUH3UZT.js +2 -2
- package/dist-versioned/chunks/chunk.QJ2PELD5.js +2 -2
- package/dist-versioned/chunks/chunk.RIWKWSAL.js +2 -2
- package/dist-versioned/chunks/chunk.RY4KWEME.js +1 -1
- package/dist-versioned/chunks/chunk.RZGUWSF6.js +5 -5
- package/dist-versioned/chunks/chunk.SIUXYHUU.js +8 -8
- package/dist-versioned/chunks/chunk.SZDLCBRQ.js +24 -24
- package/dist-versioned/chunks/chunk.TIOVWVCD.js +2 -2
- package/dist-versioned/chunks/chunk.TXNCIVE5.js +14 -14
- package/dist-versioned/chunks/chunk.U7ASTWXS.js +5 -5
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.UIXXR3N5.js +3 -3
- package/dist-versioned/chunks/chunk.VN6V46I7.js +2 -2
- package/dist-versioned/chunks/chunk.WSRHW32L.js +3 -3
- package/dist-versioned/chunks/chunk.WSXDUNN7.js +1 -1
- package/dist-versioned/chunks/chunk.WSXRRFIW.js +1 -1
- package/dist-versioned/chunks/chunk.WTFF4KWO.js +3 -3
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/chunk.YBIM4TC7.js +1 -1
- package/dist-versioned/chunks/chunk.YLQNXR3G.js +2 -2
- package/dist-versioned/chunks/chunk.ZBAABZKL.js +1 -1
- package/dist-versioned/chunks/chunk.ZRJRFFVA.js +3 -3
- package/dist-versioned/chunks/chunk.ZXOKRAZP.js +2 -2
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +2 -2
- package/dist-versioned/components/range/range.js +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +258 -258
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +1 -1
- package/dist-versioned/vscode.html-custom-data.json +102 -97
- package/dist-versioned/web-types.json +172 -169
- package/package.json +3 -3
- package/cdn/chunks/chunk.LVDWFX3X.js +0 -2
- package/cdn-versioned/chunks/chunk.LVDWFX3X.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p,b,c as k}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.N3WG3NAL.js";import{b as D}from"./chunk.JS2HQ2N4.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as d}from"./chunk.PV6UYBMY.js";import{a as c}from"./chunk.YEDQWNIV.js";import{a as E}from"./chunk.7BPPDSHY.js";import{a as C,b as h,d as f,e as w,h as T}from"./chunk.PES7MZKA.js";import{b as I,e as v}from"./chunk.763RLJEK.js";import{e as o}from"./chunk.6EV4YU6C.js";var l=class extends T{constructor(){super();this.formControlController=new D(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new E(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.tooltip="on-interaction";this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],b(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value),this.thumbs.forEach(async e=>{var i,a;let t=e.parentElement;await t.updateComplete,(a=(i=t.shadowRoot)==null?void 0:i.querySelector("sd-popup"))==null||a.setAttribute("distance","14")})}willUpdate(e){super.willUpdate(e),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});b(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&(this.moveThumb(t,this._rangeValues.get(i)),this.tooltip==="always-visible"&&t.parentElement.show())}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",n=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${n}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${n}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),n=i[s-1]||this.min,r=i[s+1]||this.max,u=t<n||t>r;return{finalValue:Math.max(n,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:n}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=k(this.inputWrapper,i),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n),u=a.reduce((g,x)=>{let _=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(_-r),V=Math.abs(L-r);return $===V?_<r?x:g:$<V?x:g}),m=+u.dataset.rangeId;if(!m)return;this._rangeValues.set(m,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),this.tooltip==="on-interaction"&&await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=k(this.inputWrapper,e.clientX),n=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/n);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(t,r);m.isRestricted?(r=m.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),b(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,b(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),this.tooltip==="on-interaction"&&await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let n=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${n}`:`aria-label-hidden ${n}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-tooltip hoist trigger="${this.tooltip==="on-interaction"?"focus":"manual"}" disabled="${d(this.disabled||this.visuallyDisabled||this.tooltip==="hidden"?!0:void 0)}"><div id="${n}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${d(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" data-disabled="${d(this.disabled||this.visuallyDisabled||void 0)}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${c("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"outline-none":"cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${c("w-full text-start",t?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${d(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" data-disabled="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("h-1 my-[6px]")}"></div><div part="active-track" hidden="${d(this.noTrackBar?!0:void 0)}" data-disabled="${d(this.disabled||this.visuallyDisabled||void 0)}" class="${c("absolute top-0 h-1")}"></div></div>${this.renderThumbs(t)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
|
|
2
|
+
[part='base']{touch-action:none;-webkit-touch-callout:none}[part=thumb]{background-color:var(--sd-color-icon-fill-primary,var(--sd-color-primary))}[part=thumb]:hover{background-color:var(--sd-color-icon-fill-primary-500,var(--sd-color-primary-500))}[part=thumb].grabbed{background-color:var(--sd-color-icon-fill-primary-800,var(--sd-color-primary-800))}[part=thumb][data-disabled]{background-color:var(--sd-color-icon-fill-neutral-500,var(--sd-color-neutral-500))}[part=track]{background-color:var(--sd-color-border-neutral-400,var(--sd-color-neutral-400))}[part=track][data-disabled]{background-color:var(--sd-color-background-neutral-500,var(--sd-color-neutral-500))}[part=active-track]{background-color:var(--sd-color-icon-fill-primary,var(--sd-color-primary))}[part=active-track][data-disabled]{background-color:var(--sd-color-icon-fill-neutral-500,var(--sd-color-neutral-500))}`],o([f("#input")],l.prototype,"input",2),o([f('[part="active-track"]')],l.prototype,"activeTrack",2),o([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),o([w('[part="thumb"]')],l.prototype,"thumbs",2),o([h({attribute:!1})],l.prototype,"tooltipFormatter",2),o([h({type:String,reflect:!0})],l.prototype,"name",2),o([h({type:String,reflect:!0})],l.prototype,"label",2),o([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),o([h({type:Number,reflect:!0})],l.prototype,"min",2),o([h({type:Number,reflect:!0})],l.prototype,"max",2),o([h({type:Number,reflect:!0})],l.prototype,"step",2),o([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),o([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),o([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),o([h({attribute:"tooltip",type:String,reflect:!0})],l.prototype,"tooltip",2),o([A()],l.prototype,"defaultValue",2),o([h({type:String})],l.prototype,"value",1),l=o([C("sd-range")],l);export{l as a};
|
|
@@ -21,7 +21,7 @@ export default class SdRange extends SolidElement implements SolidFormControl {
|
|
|
21
21
|
disabled: boolean;
|
|
22
22
|
visuallyDisabled: boolean;
|
|
23
23
|
noTrackBar: boolean;
|
|
24
|
-
|
|
24
|
+
tooltip: 'on-interaction' | 'hidden' | 'always-visible';
|
|
25
25
|
defaultValue: string;
|
|
26
26
|
set value(value: string | null);
|
|
27
27
|
get value(): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.URYTIP6C.js";import"../../chunks/chunk.IVHEBGOY.js";import"../../chunks/chunk.N3WG3NAL.js";import"../../chunks/chunk.JS2HQ2N4.js";import"../../chunks/chunk.CGQ2BPPZ.js";import"../../chunks/chunk.PV6UYBMY.js";import"../../chunks/chunk.YEDQWNIV.js";import"../../chunks/chunk.7BPPDSHY.js";import"../../chunks/chunk.CIAY7P3F.js";import"../../chunks/chunk.2PZOUYOE.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.PES7MZKA.js";import"../../chunks/chunk.763RLJEK.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
|
package/cdn/custom-elements.json
CHANGED
|
@@ -15544,13 +15544,13 @@
|
|
|
15544
15544
|
},
|
|
15545
15545
|
{
|
|
15546
15546
|
"kind": "field",
|
|
15547
|
-
"name": "
|
|
15547
|
+
"name": "tooltip",
|
|
15548
15548
|
"type": {
|
|
15549
|
-
"text": "
|
|
15549
|
+
"text": "| 'on-interaction'\n | 'hidden'\n | 'always-visible'"
|
|
15550
15550
|
},
|
|
15551
|
-
"default": "
|
|
15552
|
-
"description": "
|
|
15553
|
-
"attribute": "
|
|
15551
|
+
"default": "'on-interaction'",
|
|
15552
|
+
"description": "Defines the thumbs tooltip behaviour.",
|
|
15553
|
+
"attribute": "tooltip",
|
|
15554
15554
|
"reflects": true
|
|
15555
15555
|
},
|
|
15556
15556
|
{
|
|
@@ -15791,13 +15791,13 @@
|
|
|
15791
15791
|
"fieldName": "noTrackBar"
|
|
15792
15792
|
},
|
|
15793
15793
|
{
|
|
15794
|
-
"name": "
|
|
15794
|
+
"name": "tooltip",
|
|
15795
15795
|
"type": {
|
|
15796
|
-
"text": "
|
|
15796
|
+
"text": "| 'on-interaction'\n | 'hidden'\n | 'always-visible'"
|
|
15797
15797
|
},
|
|
15798
|
-
"default": "
|
|
15799
|
-
"description": "
|
|
15800
|
-
"fieldName": "
|
|
15798
|
+
"default": "'on-interaction'",
|
|
15799
|
+
"description": "Defines the thumbs tooltip behaviour.",
|
|
15800
|
+
"fieldName": "tooltip"
|
|
15801
15801
|
},
|
|
15802
15802
|
{
|
|
15803
15803
|
"name": "value",
|
|
@@ -21849,7 +21849,7 @@
|
|
|
21849
21849
|
"package": {
|
|
21850
21850
|
"name": "@solid-design-system/components",
|
|
21851
21851
|
"description": "Solid Design System: Components",
|
|
21852
|
-
"version": "6.0.0-next.
|
|
21852
|
+
"version": "6.0.0-next.3",
|
|
21853
21853
|
"author": "Union Investment",
|
|
21854
21854
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
21855
21855
|
"license": "MIT"
|