revotech-ui-kit 0.0.35 → 0.0.37
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/revotech-ui-kit.js +2293 -1597
- package/dist/revotech-ui-kit.umd.cjs +427 -198
- package/dist/src/components/atoms/dialog/dialog.atom.d.ts +3 -1
- package/dist/src/components/atoms/index.d.ts +9 -0
- package/dist/src/components/atoms/menubar/menubar-checkbox.item.d.ts +15 -0
- package/dist/src/components/atoms/menubar/menubar-content.d.ts +15 -0
- package/dist/src/components/atoms/menubar/menubar-group.d.ts +10 -0
- package/dist/src/components/atoms/menubar/menubar-item.d.ts +12 -0
- package/dist/src/components/atoms/menubar/menubar-menu.d.ts +22 -0
- package/dist/src/components/atoms/menubar/menubar-radio-item.d.ts +15 -0
- package/dist/src/components/atoms/menubar/menubar-seperator.d.ts +9 -0
- package/dist/src/components/atoms/menubar/menubar-shortcut.d.ts +5 -0
- package/dist/src/components/atoms/menubar/menubar.atom.d.ts +28 -0
- package/dist/src/components/atoms/menubar/menubar.stories.d.ts +4 -0
- package/dist/src/index.d.ts +2 -2
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(a,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("lit"),require("lit/decorators.js"),require("lit-element"),require("lit/html.js"),require("lit/directive.js"),require("lit/async-directive.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit-element","lit/html.js","lit/directive.js","lit/async-directive.js"],l):(a=typeof globalThis<"u"?globalThis:a||self,l(a["revotech-ui-kit"]={},a.lit,a.decorators_js,a.litElement,a.html_js,a.directive_js,a.asyncDirective_js))})(this,function(a,l,d,k,Mr,et,Ar){"use strict";function Ut(r){var e,o,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(e=0;e<t;e++)r[e]&&(o=Ut(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function zr(){for(var r,e,o=0,n="",t=arguments.length;o<t;o++)(r=arguments[o])&&(e=Ut(r))&&(n&&(n+=" "),n+=e);return n}const tt="-",Rr=r=>{const e=Tr(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:i=>{const p=i.split(tt);return p[0]===""&&p.length!==1&&p.shift(),Ht(p,e)||Br(i)},getConflictingClassGroupIds:(i,p)=>{const v=o[i]||[];return p&&n[i]?[...v,...n[i]]:v}}},Ht=(r,e)=>{var i;if(r.length===0)return e.classGroupId;const o=r[0],n=e.nextPart.get(o),t=n?Ht(r.slice(1),n):void 0;if(t)return t;if(e.validators.length===0)return;const s=r.join(tt);return(i=e.validators.find(({validator:p})=>p(s)))==null?void 0:i.classGroupId},Xt=/^\[(.+)\]$/,Br=r=>{if(Xt.test(r)){const e=Xt.exec(r)[1],o=e==null?void 0:e.substring(0,e.indexOf(":"));if(o)return"arbitrary.."+o}},Tr=r=>{const{theme:e,prefix:o}=r,n={nextPart:new Map,validators:[]};return qr(Object.entries(r.classGroups),o).forEach(([s,i])=>{rt(i,n,s,e)}),n},rt=(r,e,o,n)=>{r.forEach(t=>{if(typeof t=="string"){const s=t===""?e:Yt(e,t);s.classGroupId=o;return}if(typeof t=="function"){if(Nr(t)){rt(t(n),e,o,n);return}e.validators.push({validator:t,classGroupId:o});return}Object.entries(t).forEach(([s,i])=>{rt(i,Yt(e,s),o,n)})})},Yt=(r,e)=>{let o=r;return e.split(tt).forEach(n=>{o.nextPart.has(n)||o.nextPart.set(n,{nextPart:new Map,validators:[]}),o=o.nextPart.get(n)}),o},Nr=r=>r.isThemeGetter,qr=(r,e)=>e?r.map(([o,n])=>{const t=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,p])=>[e+i,p])):s);return[o,t]}):r,Fr=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,o=new Map,n=new Map;const t=(s,i)=>{o.set(s,i),e++,e>r&&(e=0,n=o,o=new Map)};return{get(s){let i=o.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return t(s,i),i},set(s,i){o.has(s)?o.set(s,i):t(s,i)}}},Kt="!",Vr=r=>{const{separator:e,experimentalParseClassName:o}=r,n=e.length===1,t=e[0],s=e.length,i=p=>{const v=[];let m=0,g=0,$;for(let w=0;w<p.length;w++){let O=p[w];if(m===0){if(O===t&&(n||p.slice(w,w+s)===e)){v.push(p.slice(g,w)),g=w+s;continue}if(O==="/"){$=w;continue}}O==="["?m++:O==="]"&&m--}const _=v.length===0?p:p.substring(g),D=_.startsWith(Kt),P=D?_.substring(1):_,C=$&&$>g?$-g:void 0;return{modifiers:v,hasImportantModifier:D,baseClassName:P,maybePostfixModifierPosition:C}};return o?p=>o({className:p,parseClassName:i}):i},Gr=r=>{if(r.length<=1)return r;const e=[];let o=[];return r.forEach(n=>{n[0]==="["?(e.push(...o.sort(),n),o=[]):o.push(n)}),e.push(...o.sort()),e},Ur=r=>({cache:Fr(r.cacheSize),parseClassName:Vr(r),...Rr(r)}),Hr=/\s+/,Xr=(r,e)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:t}=e,s=[],i=r.trim().split(Hr);let p="";for(let v=i.length-1;v>=0;v-=1){const m=i[v],{modifiers:g,hasImportantModifier:$,baseClassName:_,maybePostfixModifierPosition:D}=o(m);let P=!!D,C=n(P?_.substring(0,D):_);if(!C){if(!P){p=m+(p.length>0?" "+p:p);continue}if(C=n(_),!C){p=m+(p.length>0?" "+p:p);continue}P=!1}const w=Gr(g).join(":"),O=$?w+Kt:w,S=O+C;if(s.includes(S))continue;s.push(S);const De=t(C,P);for(let le=0;le<De.length;++le){const Je=De[le];s.push(O+Je)}p=m+(p.length>0?" "+p:p)}return p};function Yr(){let r=0,e,o,n="";for(;r<arguments.length;)(e=arguments[r++])&&(o=Wt(e))&&(n&&(n+=" "),n+=o);return n}const Wt=r=>{if(typeof r=="string")return r;let e,o="";for(let n=0;n<r.length;n++)r[n]&&(e=Wt(r[n]))&&(o&&(o+=" "),o+=e);return o};function Kr(r,...e){let o,n,t,s=i;function i(v){const m=e.reduce((g,$)=>$(g),r());return o=Ur(m),n=o.cache.get,t=o.cache.set,s=p,p(v)}function p(v){const m=n(v);if(m)return m;const g=Xr(v,o);return t(v,g),g}return function(){return s(Yr.apply(null,arguments))}}const f=r=>{const e=o=>o[r]||[];return e.isThemeGetter=!0,e},Zt=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wr=/^\d+\/\d+$/,Zr=new Set(["px","full","screen"]),Jr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,eo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,to=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=r=>de(r)||Zr.has(r)||Wr.test(r),F=r=>ce(r,"length",co),de=r=>!!r&&!Number.isNaN(Number(r)),ot=r=>ce(r,"number",de),be=r=>!!r&&Number.isInteger(Number(r)),ro=r=>r.endsWith("%")&&de(r.slice(0,-1)),h=r=>Zt.test(r),V=r=>Jr.test(r),oo=new Set(["length","size","percentage"]),no=r=>ce(r,oo,Jt),so=r=>ce(r,"position",Jt),io=new Set(["image","url"]),ao=r=>ce(r,io,uo),lo=r=>ce(r,"",po),ve=()=>!0,ce=(r,e,o)=>{const n=Zt.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):o(n[2]):!1},co=r=>Qr.test(r)&&!jr.test(r),Jt=()=>!1,po=r=>eo.test(r),uo=r=>to.test(r),ho=Kr(()=>{const r=f("colors"),e=f("spacing"),o=f("blur"),n=f("brightness"),t=f("borderColor"),s=f("borderRadius"),i=f("borderSpacing"),p=f("borderWidth"),v=f("contrast"),m=f("grayscale"),g=f("hueRotate"),$=f("invert"),_=f("gap"),D=f("gradientColorStops"),P=f("gradientColorStopPositions"),C=f("inset"),w=f("margin"),O=f("opacity"),S=f("padding"),De=f("saturate"),le=f("scale"),Je=f("sepia"),Er=f("skew"),Pr=f("space"),Sr=f("translate"),qt=()=>["auto","contain","none"],Ft=()=>["auto","hidden","clip","visible","scroll"],Vt=()=>["auto",h,e],y=()=>[h,e],Dr=()=>["",z,F],Qe=()=>["auto",de,h],kr=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],je=()=>["solid","dashed","dotted","double","none"],Ir=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Gt=()=>["start","end","center","between","around","evenly","stretch"],ke=()=>["","0",h],Lr=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[de,h];return{cacheSize:500,separator:":",theme:{colors:[ve],spacing:[z,F],blur:["none","",V,h],brightness:q(),borderColor:[r],borderRadius:["none","","full",V,h],borderSpacing:y(),borderWidth:Dr(),contrast:q(),grayscale:ke(),hueRotate:q(),invert:ke(),gap:y(),gradientColorStops:[r],gradientColorStopPositions:[ro,F],inset:Vt(),margin:Vt(),opacity:q(),padding:y(),saturate:q(),scale:q(),sepia:ke(),skew:q(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":Lr()}],"break-before":[{"break-before":Lr()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...kr(),h]}],overflow:[{overflow:Ft()}],"overflow-x":[{"overflow-x":Ft()}],"overflow-y":[{"overflow-y":Ft()}],overscroll:[{overscroll:qt()}],"overscroll-x":[{"overscroll-x":qt()}],"overscroll-y":[{"overscroll-y":qt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",be,h]}],basis:[{basis:Vt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:ke()}],shrink:[{shrink:ke()}],order:[{order:["first","last","none",be,h]}],"grid-cols":[{"grid-cols":[ve]}],"col-start-end":[{col:["auto",{span:["full",be,h]},h]}],"col-start":[{"col-start":Qe()}],"col-end":[{"col-end":Qe()}],"grid-rows":[{"grid-rows":[ve]}],"row-start-end":[{row:["auto",{span:[be,h]},h]}],"row-start":[{"row-start":Qe()}],"row-end":[{"row-end":Qe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...Gt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Gt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Gt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[Pr]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Pr]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,e]}],"min-w":[{"min-w":[h,e,"min","max","fit"]}],"max-w":[{"max-w":[h,e,"none","full","min","max","fit","prose",{screen:[V]},V]}],h:[{h:[h,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,e,"auto","min","max","fit"]}],"font-size":[{text:["base",V,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ot]}],"font-family":[{font:[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",de,ot]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,F]}],"underline-offset":[{"underline-offset":["auto",z,h]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...kr(),so]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",no]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ao]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...je(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:je()}],"border-color":[{border:[t]}],"border-color-x":[{"border-x":[t]}],"border-color-y":[{"border-y":[t]}],"border-color-t":[{"border-t":[t]}],"border-color-r":[{"border-r":[t]}],"border-color-b":[{"border-b":[t]}],"border-color-l":[{"border-l":[t]}],"divide-color":[{divide:[t]}],"outline-style":[{outline:["",...je()]}],"outline-offset":[{"outline-offset":[z,h]}],"outline-w":[{outline:[z,F]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:Dr()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[z,F]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",V,lo]}],"shadow-color":[{shadow:[ve]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...Ir(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ir()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[n]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",V,h]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[$]}],saturate:[{saturate:[De]}],sepia:[{sepia:[Je]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[$]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[De]}],"backdrop-sepia":[{"backdrop-sepia":[Je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[le]}],"scale-x":[{"scale-x":[le]}],"scale-y":[{"scale-y":[le]}],rotate:[{rotate:[be,h]}],"translate-x":[{"translate-x":[Sr]}],"translate-y":[{"translate-y":[Sr]}],"skew-x":[{"skew-x":[Er]}],"skew-y":[{"skew-y":[Er]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[z,F,ot]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function u(...r){return ho(zr(r))}class b extends l.LitElement{constructor(){super()}getFilteredAttributes(){const e={};return Array.from(this.attributes).forEach(o=>{this.getAttributesToExclude().includes(o.name)||(e[o.name]=o.value??"")}),e}isCustomPropertySet(e){const o=getComputedStyle(this).getPropertyValue(e).trim();return o!=="inherit"&&o.length>0}applyCustomClass(e,o,n=""){var s,i;let t="";e.some(p=>this.isCustomPropertySet(p))&&(t=n),t&&((i=(s=this.shadowRoot)==null?void 0:s.querySelector(o))==null||i.classList.add(t))}}function Qt(){const r=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){const n=(r+Math.random()*16)%16|0;return(o=="x"?n:n&3|8).toString(16)})}const c=l.css` @font-face {
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("lit"),require("lit/decorators.js"),require("lit-element"),require("lit/html.js"),require("lit/directive.js"),require("lit/async-directive.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit-element","lit/html.js","lit/directive.js","lit/async-directive.js"],l):(a=typeof globalThis<"u"?globalThis:a||self,l(a["revotech-ui-kit"]={},a.lit,a.decorators_js,a.litElement,a.html_js,a.directive_js,a.asyncDirective_js))})(this,function(a,l,d,D,Fr,at,Vr){"use strict";function jt(n){var e,r,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var t=n.length;for(e=0;e<t;e++)n[e]&&(r=jt(n[e]))&&(o&&(o+=" "),o+=r)}else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}function Ur(){for(var n,e,r=0,o="",t=arguments.length;r<t;r++)(n=arguments[r])&&(e=jt(n))&&(o&&(o+=" "),o+=e);return o}const lt="-",Hr=n=>{const e=Yr(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:i=>{const u=i.split(lt);return u[0]===""&&u.length!==1&&u.shift(),er(u,e)||Xr(i)},getConflictingClassGroupIds:(i,u)=>{const v=r[i]||[];return u&&o[i]?[...v,...o[i]]:v}}},er=(n,e)=>{var i;if(n.length===0)return e.classGroupId;const r=n[0],o=e.nextPart.get(r),t=o?er(n.slice(1),o):void 0;if(t)return t;if(e.validators.length===0)return;const s=n.join(lt);return(i=e.validators.find(({validator:u})=>u(s)))==null?void 0:i.classGroupId},tr=/^\[(.+)\]$/,Xr=n=>{if(tr.test(n)){const e=tr.exec(n)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Yr=n=>{const{theme:e,prefix:r}=n,o={nextPart:new Map,validators:[]};return Wr(Object.entries(n.classGroups),r).forEach(([s,i])=>{dt(i,o,s,e)}),o},dt=(n,e,r,o)=>{n.forEach(t=>{if(typeof t=="string"){const s=t===""?e:rr(e,t);s.classGroupId=r;return}if(typeof t=="function"){if(Kr(t)){dt(t(o),e,r,o);return}e.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(([s,i])=>{dt(i,rr(e,s),r,o)})})},rr=(n,e)=>{let r=n;return e.split(lt).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Kr=n=>n.isThemeGetter,Wr=(n,e)=>e?n.map(([r,o])=>{const t=o.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,u])=>[e+i,u])):s);return[r,t]}):n,Zr=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,o=new Map;const t=(s,i)=>{r.set(s,i),e++,e>n&&(e=0,o=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=o.get(s))!==void 0)return t(s,i),i},set(s,i){r.has(s)?r.set(s,i):t(s,i)}}},or="!",Jr=n=>{const{separator:e,experimentalParseClassName:r}=n,o=e.length===1,t=e[0],s=e.length,i=u=>{const v=[];let m=0,g=0,$;for(let w=0;w<u.length;w++){let O=u[w];if(m===0){if(O===t&&(o||u.slice(w,w+s)===e)){v.push(u.slice(g,w)),g=w+s;continue}if(O==="/"){$=w;continue}}O==="["?m++:O==="]"&&m--}const _=v.length===0?u:u.substring(g),M=_.startsWith(or),P=M?_.substring(1):_,C=$&&$>g?$-g:void 0;return{modifiers:v,hasImportantModifier:M,baseClassName:P,maybePostfixModifierPosition:C}};return r?u=>r({className:u,parseClassName:i}):i},Qr=n=>{if(n.length<=1)return n;const e=[];let r=[];return n.forEach(o=>{o[0]==="["?(e.push(...r.sort(),o),r=[]):r.push(o)}),e.push(...r.sort()),e},jr=n=>({cache:Zr(n.cacheSize),parseClassName:Jr(n),...Hr(n)}),eo=/\s+/,to=(n,e)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:t}=e,s=[],i=n.trim().split(eo);let u="";for(let v=i.length-1;v>=0;v-=1){const m=i[v],{modifiers:g,hasImportantModifier:$,baseClassName:_,maybePostfixModifierPosition:M}=r(m);let P=!!M,C=o(P?_.substring(0,M):_);if(!C){if(!P){u=m+(u.length>0?" "+u:u);continue}if(C=o(_),!C){u=m+(u.length>0?" "+u:u);continue}P=!1}const w=Qr(g).join(":"),O=$?w+or:w,S=O+C;if(s.includes(S))continue;s.push(S);const Ae=t(C,P);for(let ce=0;ce<Ae.length;++ce){const nt=Ae[ce];s.push(O+nt)}u=m+(u.length>0?" "+u:u)}return u};function ro(){let n=0,e,r,o="";for(;n<arguments.length;)(e=arguments[n++])&&(r=nr(e))&&(o&&(o+=" "),o+=r);return o}const nr=n=>{if(typeof n=="string")return n;let e,r="";for(let o=0;o<n.length;o++)n[o]&&(e=nr(n[o]))&&(r&&(r+=" "),r+=e);return r};function oo(n,...e){let r,o,t,s=i;function i(v){const m=e.reduce((g,$)=>$(g),n());return r=jr(m),o=r.cache.get,t=r.cache.set,s=u,u(v)}function u(v){const m=o(v);if(m)return m;const g=to(v,r);return t(v,g),g}return function(){return s(ro.apply(null,arguments))}}const f=n=>{const e=r=>r[n]||[];return e.isThemeGetter=!0,e},sr=/^\[(?:([a-z-]+):)?(.+)\]$/i,no=/^\d+\/\d+$/,so=new Set(["px","full","screen"]),io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ao=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,co=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=n=>ue(n)||so.has(n)||no.test(n),G=n=>pe(n,"length",wo),ue=n=>!!n&&!Number.isNaN(Number(n)),ct=n=>pe(n,"number",ue),ye=n=>!!n&&Number.isInteger(Number(n)),po=n=>n.endsWith("%")&&ue(n.slice(0,-1)),h=n=>sr.test(n),F=n=>io.test(n),ho=new Set(["length","size","percentage"]),mo=n=>pe(n,ho,ir),go=n=>pe(n,"position",ir),fo=new Set(["image","url"]),bo=n=>pe(n,fo,xo),vo=n=>pe(n,"",yo),xe=()=>!0,pe=(n,e,r)=>{const o=sr.exec(n);return o?o[1]?typeof e=="string"?o[1]===e:e.has(o[1]):r(o[2]):!1},wo=n=>ao.test(n)&&!lo.test(n),ir=()=>!1,yo=n=>co.test(n),xo=n=>uo.test(n),Co=oo(()=>{const n=f("colors"),e=f("spacing"),r=f("blur"),o=f("brightness"),t=f("borderColor"),s=f("borderRadius"),i=f("borderSpacing"),u=f("borderWidth"),v=f("contrast"),m=f("grayscale"),g=f("hueRotate"),$=f("invert"),_=f("gap"),M=f("gradientColorStops"),P=f("gradientColorStopPositions"),C=f("inset"),w=f("margin"),O=f("opacity"),S=f("padding"),Ae=f("saturate"),ce=f("scale"),nt=f("sepia"),Rr=f("skew"),zr=f("space"),Br=f("translate"),Wt=()=>["auto","contain","none"],Zt=()=>["auto","hidden","clip","visible","scroll"],Jt=()=>["auto",h,e],y=()=>[h,e],Tr=()=>["",R,G],st=()=>["auto",ue,h],qr=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],it=()=>["solid","dashed","dotted","double","none"],Nr=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Qt=()=>["start","end","center","between","around","evenly","stretch"],Re=()=>["","0",h],Gr=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[ue,h];return{cacheSize:500,separator:":",theme:{colors:[xe],spacing:[R,G],blur:["none","",F,h],brightness:N(),borderColor:[n],borderRadius:["none","","full",F,h],borderSpacing:y(),borderWidth:Tr(),contrast:N(),grayscale:Re(),hueRotate:N(),invert:Re(),gap:y(),gradientColorStops:[n],gradientColorStopPositions:[po,G],inset:Jt(),margin:Jt(),opacity:N(),padding:y(),saturate:N(),scale:N(),sepia:Re(),skew:N(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":Gr()}],"break-before":[{"break-before":Gr()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...qr(),h]}],overflow:[{overflow:Zt()}],"overflow-x":[{"overflow-x":Zt()}],"overflow-y":[{"overflow-y":Zt()}],overscroll:[{overscroll:Wt()}],"overscroll-x":[{"overscroll-x":Wt()}],"overscroll-y":[{"overscroll-y":Wt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ye,h]}],basis:[{basis:Jt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:Re()}],shrink:[{shrink:Re()}],order:[{order:["first","last","none",ye,h]}],"grid-cols":[{"grid-cols":[xe]}],"col-start-end":[{col:["auto",{span:["full",ye,h]},h]}],"col-start":[{"col-start":st()}],"col-end":[{"col-end":st()}],"grid-rows":[{"grid-rows":[xe]}],"row-start-end":[{row:["auto",{span:[ye,h]},h]}],"row-start":[{"row-start":st()}],"row-end":[{"row-end":st()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...Qt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Qt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Qt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[zr]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[zr]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,e]}],"min-w":[{"min-w":[h,e,"min","max","fit"]}],"max-w":[{"max-w":[h,e,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[h,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,e,"auto","min","max","fit"]}],"font-size":[{text:["base",F,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ct]}],"font-family":[{font:[xe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",ue,ct]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",R,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...it(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",R,G]}],"underline-offset":[{"underline-offset":["auto",R,h]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...qr(),go]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bo]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...it(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:it()}],"border-color":[{border:[t]}],"border-color-x":[{"border-x":[t]}],"border-color-y":[{"border-y":[t]}],"border-color-t":[{"border-t":[t]}],"border-color-r":[{"border-r":[t]}],"border-color-b":[{"border-b":[t]}],"border-color-l":[{"border-l":[t]}],"divide-color":[{divide:[t]}],"outline-style":[{outline:["",...it()]}],"outline-offset":[{"outline-offset":[R,h]}],"outline-w":[{outline:[R,G]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:Tr()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[R,G]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",F,vo]}],"shadow-color":[{shadow:[xe]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...Nr(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Nr()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",F,h]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[$]}],saturate:[{saturate:[Ae]}],sepia:[{sepia:[nt]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[$]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[Ae]}],"backdrop-sepia":[{"backdrop-sepia":[nt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ce]}],"scale-x":[{"scale-x":[ce]}],"scale-y":[{"scale-y":[ce]}],rotate:[{rotate:[ye,h]}],"translate-x":[{"translate-x":[Br]}],"translate-y":[{"translate-y":[Br]}],"skew-x":[{"skew-x":[Rr]}],"skew-y":[{"skew-y":[Rr]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[R,G,ct]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function p(...n){return Co(Ur(n))}class b extends l.LitElement{constructor(){super()}getFilteredAttributes(){const e={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(e[r.name]=r.value??"")}),e}isCustomPropertySet(e){const r=getComputedStyle(this).getPropertyValue(e).trim();return r!=="inherit"&&r.length>0}applyCustomClass(e,r,o=""){var s,i;let t="";e.some(u=>this.isCustomPropertySet(u))&&(t=o),t&&((i=(s=this.shadowRoot)==null?void 0:s.querySelector(r))==null||i.classList.add(t))}}function ar(){const n=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const o=(n+Math.random()*16)%16|0;return(r=="x"?o:o&3|8).toString(16)})}const c=l.css` @font-face {
|
2
2
|
font-family: 'GeistSans';
|
3
3
|
|
4
4
|
src: url('assets/fonts/Geist/Geist-Regular.woff2') format('woff2');
|
@@ -2833,9 +2833,9 @@ body {
|
|
2833
2833
|
.\\[\\&_svg\\]\\:shrink-0 svg {
|
2834
2834
|
flex-shrink: 0;
|
2835
2835
|
}
|
2836
|
-
`;class
|
2836
|
+
`;class lr extends Vr.AsyncDirective{constructor(){super(...arguments),this.prevData={}}render(e){return Fr.nothing}update(e,[r]){var o;this.element!==e.element&&(this.element=e.element),this.host=((o=e.options)===null||o===void 0?void 0:o.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(e){if(!e)return;const{prevData:r,element:o}=this;for(const t in e){const s=e[t];s!==r[t]&&(o[t]=s)}}groom(e){const{prevData:r,element:o}=this;if(r)for(const t in r)(!e||!(t in e)&&o[t]===r[t])&&(o[t]=void 0)}}at.directive(lr);class dr extends lr{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(const r in e){const o=e[r];o!==this.eventData[r]&&this.applyEvent(r,o)}}applyEvent(e,r){const{prevData:o,element:t}=this;this.eventData[e]=r,o[e]&&t.removeEventListener(e,this,r),t.addEventListener(e,this,r)}groom(e){const{prevData:r,element:o}=this;if(r)for(const t in r)(!e||!(t in e)&&o[t]===r[t])&&this.groomEvent(t,r[t])}groomEvent(e,r){const{element:o}=this;delete this.eventData[e],o.removeEventListener(e,this,r)}handleEvent(e){const r=this.eventData[e.type];typeof r=="function"?r.call(this.host,e):r.handleEvent(e)}disconnected(){const{eventData:e,element:r}=this;for(const o in e){const t=o.slice(1),s=e[o];r.removeEventListener(t,this,s)}}reconnected(){const{eventData:e,element:r}=this;for(const o in e){const t=o.slice(1),s=e[o];r.addEventListener(t,this,s)}}}at.directive(dr);class $o extends dr{apply(e){if(!e)return;const{prevData:r,element:o}=this;for(const t in e){const s=e[t];if(s===r[t])continue;const i=t.slice(1);switch(t[0]){case"@":this.eventData[i]=s,this.applyEvent(i,s);break;case".":o[i]=s;break;case"?":s?o.setAttribute(i,""):o.removeAttribute(i);break;default:s!=null?o.setAttribute(t,String(s)):o.removeAttribute(t);break}}}groom(e){const{prevData:r,element:o}=this;if(r)for(const t in r){const s=t.slice(1);if(!e||!(t in e)&&o[s]===r[t])switch(t[0]){case"@":this.groomEvent(s,r[t]);break;case".":o[s]=void 0;break;case"?":o.removeAttribute(s);break;default:o.removeAttribute(t);break}}}}const x=at.directive($o);var _o=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,ut=(n,e,r,o)=>{for(var t=o>1?void 0:o?Oo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&_o(e,r,t),t};let Z=class extends b{constructor(){super(...arguments),this.value="",this.tabindex=0,this.handleClick=n=>{n.preventDefault(),n.stopPropagation();const e=n.currentTarget;if(e instanceof HTMLDivElement){const r=e.getAttribute("value")??"";this._accordion&&this._accordion.raiseEvent(r)}}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(n){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this._accordion&&this._accordion.removeEventListener("clicked-accordion",()=>{})}get _accordion(){let n=this.parentElement;for(;n&&!(n instanceof V);)n=n.parentElement;return n}render(){var e;const n=this.getFilteredAttributes();return D.html`
|
2837
2837
|
<div
|
2838
|
-
${x(
|
2838
|
+
${x(n)}
|
2839
2839
|
data-state=${(e=this._accordion)!=null&&e.selectedItems.includes(this.value)?"open":"closed"}
|
2840
2840
|
role="tablist"
|
2841
2841
|
data-orientation="vertical"
|
@@ -2849,10 +2849,10 @@ body {
|
|
2849
2849
|
<slot name="accordion-trigger"></slot>
|
2850
2850
|
</h3>
|
2851
2851
|
<div>
|
2852
|
-
${this._accordion&&this._accordion.selectedItems.includes(this.value)?
|
2852
|
+
${this._accordion&&this._accordion.selectedItems.includes(this.value)?D.html`<slot name="accordion-content"></slot>`:D.nothing}
|
2853
2853
|
</div>
|
2854
2854
|
</div>
|
2855
|
-
`}};Z.styles=[
|
2855
|
+
`}};Z.styles=[D.css``,c],ut([d.property({type:String})],Z.prototype,"value",2),ut([d.property({type:Number})],Z.prototype,"tabindex",2),Z=ut([d.customElement("rtg-accordion-item")],Z);function Eo(){return l.svg` <svg
|
2856
2856
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
2857
2857
|
xmlns="http://www.w3.org/2000/svg"
|
2858
2858
|
width="24"
|
@@ -2867,7 +2867,7 @@ body {
|
|
2867
2867
|
<path d="m7 15 5 5 5-5"></path>
|
2868
2868
|
<path d="m7 9 5-5 5 5"></path>
|
2869
2869
|
</svg>
|
2870
|
-
`}function
|
2870
|
+
`}function cr(){return l.svg`
|
2871
2871
|
<svg
|
2872
2872
|
class="shrink-0 size-3.5 text-blue-600 dark:text-blue-500"
|
2873
2873
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -2882,7 +2882,7 @@ body {
|
|
2882
2882
|
>
|
2883
2883
|
<path d="M20 6 9 17l-5-5"></path>
|
2884
2884
|
</svg>
|
2885
|
-
`}function
|
2885
|
+
`}function Po(){return l.svg` <svg
|
2886
2886
|
xmlns="http://www.w3.org/2000/svg"
|
2887
2887
|
width = "24"
|
2888
2888
|
height = "24"
|
@@ -2896,7 +2896,7 @@ body {
|
|
2896
2896
|
<circle cx="11" cy = "11" r = "8" > </circle>
|
2897
2897
|
<path d="m21 21-4.3-4.3"></path >
|
2898
2898
|
</svg>
|
2899
|
-
`}function
|
2899
|
+
`}function pt(){return l.svg` <svg
|
2900
2900
|
xmlns="http://www.w3.org/2000/svg"
|
2901
2901
|
width="24"
|
2902
2902
|
height="24"
|
@@ -2910,8 +2910,8 @@ body {
|
|
2910
2910
|
>
|
2911
2911
|
<circle cx="12" cy="12" r="10"></circle>
|
2912
2912
|
</svg>
|
2913
|
-
`}function
|
2914
|
-
`}function
|
2913
|
+
`}function ur(){return l.svg` <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 shrink-0 transition-transform duration-200"><path d="m6 9 6 6 6-6"></path></svg>
|
2914
|
+
`}function So(){return l.svg` <svg
|
2915
2915
|
xmlns="http://www.w3.org/2000/svg"
|
2916
2916
|
width="24"
|
2917
2917
|
height="24"
|
@@ -2925,7 +2925,7 @@ body {
|
|
2925
2925
|
>
|
2926
2926
|
<circle cx="12" cy="12" r="10"></circle></svg
|
2927
2927
|
>
|
2928
|
-
`}function
|
2928
|
+
`}function Mo(){return l.svg` <svg
|
2929
2929
|
xmlns="http://www.w3.org/2000/svg"
|
2930
2930
|
width="24"
|
2931
2931
|
height="24"
|
@@ -2940,15 +2940,15 @@ body {
|
|
2940
2940
|
<path d="M18 6 6 18"></path>
|
2941
2941
|
<path d="m6 6 12 12"></path>
|
2942
2942
|
</svg>
|
2943
|
-
`}function
|
2943
|
+
`}function Do(){return l.svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-dot">
|
2944
2944
|
<circle cx="12.1" cy="12.1" r="1"></circle>
|
2945
|
-
</svg>`}var
|
2945
|
+
</svg>`}var ko=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,pr=(n,e,r,o)=>{for(var t=o>1?void 0:o?Io(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ko(e,r,t),t};let ze=class extends b{connectedCallback(){super.connectedCallback()}firstUpdated(n){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}getAttributesToExclude(){return["value","defaultValue"]}get _accordion(){let n=this.parentElement;for(;n&&!(n instanceof V);)n=n.parentElement;return n}get _item(){let n=this.parentElement;for(;n&&!(n instanceof Z);)n=n.parentElement;return n}hasActiveState(){return this._item&&this._accordion?!!this._accordion.selectedItems.includes(this._item.value):!1}render(){var r;const n=this.getFilteredAttributes(),e=this.hasActiveState();return D.html`
|
2946
2946
|
<button
|
2947
|
-
${x(
|
2947
|
+
${x(n)}
|
2948
2948
|
type="button"
|
2949
2949
|
part="accordion-trigger"
|
2950
2950
|
role="tab"
|
2951
|
-
value=${(
|
2951
|
+
value=${(r=this._item)==null?void 0:r.value}
|
2952
2952
|
aria-selected=${e?"true":"false"}
|
2953
2953
|
aria-controls=${!!e}
|
2954
2954
|
aria-expanded=${e?"true":"false"}
|
@@ -2959,11 +2959,11 @@ body {
|
|
2959
2959
|
data-radix-collection-item=""
|
2960
2960
|
>
|
2961
2961
|
<slot></slot>
|
2962
|
-
${
|
2962
|
+
${ur()}
|
2963
2963
|
</button>
|
2964
|
-
`}};
|
2964
|
+
`}};ze.styles=[D.css``,c],pr([d.property({type:Function})],ze.prototype,"onClickCallback",2),ze=pr([d.customElement("rtg-accordion-trigger")],ze);var Lo=Object.defineProperty,Ao=Object.getOwnPropertyDescriptor,ht=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ao(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Lo(e,r,t),t};let Ce=class extends D.LitElement{constructor(){super(...arguments),this.value="",this.selectedValue=""}updated(n){super.updated(n)}firstUpdated(n){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}get _accordion(){let n=this.parentElement;for(;n&&!(n instanceof V);)n=n.parentElement;return n}get _item(){let n=this.parentElement;for(;n&&!(n instanceof Z);)n=n.parentElement;return n}hasActiveState(){return this._item&&this._accordion?!!this._accordion.selectedItems.includes(this._item.value):!1}render(){return D.html`
|
2965
2965
|
<div
|
2966
|
-
@click=${
|
2966
|
+
@click=${n=>{n.stopPropagation()}}
|
2967
2967
|
part="accordion-content"
|
2968
2968
|
data-state=${this.hasActiveState()?"open":"closed"}
|
2969
2969
|
role="region"
|
@@ -2980,26 +2980,26 @@ body {
|
|
2980
2980
|
<slot></slot>
|
2981
2981
|
</div>
|
2982
2982
|
</div>
|
2983
|
-
`}};
|
2983
|
+
`}};Ce.styles=[D.css``,c],ht([d.property({type:String})],Ce.prototype,"value",2),ht([d.state()],Ce.prototype,"selectedValue",2),Ce=ht([d.customElement("rtg-accordion-content")],Ce);var he=(n=>(n.MULTIPLE="multiple",n.SINGLE="single",n))(he||{}),Ro=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,mt=(n,e,r,o)=>{for(var t=o>1?void 0:o?zo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ro(e,r,t),t};let V=class extends b{constructor(){super(...arguments),this.twCLass="",this.type=he.MULTIPLE,this.selectedItems=[]}getAttributesToExclude(){return["variant"]}connectedCallback(){var n;super.connectedCallback(),(n=this.shadowRoot)==null||n.addEventListener("clicked-accordion",()=>{})}disconnectedCallback(){super.disconnectedCallback()}setSelectedItems(n){const e=this.selectedItems.indexOf(n);if(e>-1)if(this.type===he.SINGLE)this.selectedItems=[];else if(this.type===he.MULTIPLE)this.selectedItems.splice(e,1);else throw new Error("Type does not correct");else if(this.type===he.SINGLE)this.selectedItems[0]=n;else if(this.type===he.MULTIPLE)this.selectedItems.push(n);else throw new Error("Type does not correct")}raiseEvent(n){this.setSelectedItems(n);const e=new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}});this.dispatchEvent(e)}render(){const n=this.getFilteredAttributes();return l.html`
|
2984
2984
|
<div
|
2985
2985
|
data-orientation="vertical"
|
2986
|
-
${x(
|
2986
|
+
${x(n)}
|
2987
2987
|
part="accordion"
|
2988
2988
|
class="${this.twCLass} w-full"
|
2989
2989
|
>
|
2990
2990
|
<slot name="accordion-item"></slot>
|
2991
2991
|
</div>
|
2992
|
-
`}};
|
2992
|
+
`}};V.styles=[l.css``,c],mt([d.property({type:String})],V.prototype,"twCLass",2),mt([d.property({type:String})],V.prototype,"type",2),V=mt([d.customElement("rtg-accordion")],V);function hr(n){var e,r,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n))for(e=0;e<n.length;e++)n[e]&&(r=hr(n[e]))&&(o&&(o+=" "),o+=r);else for(e in n)n[e]&&(o&&(o+=" "),o+=e);return o}function Bo(){for(var n,e,r=0,o="";r<arguments.length;)(n=arguments[r++])&&(e=hr(n))&&(o&&(o+=" "),o+=e);return o}const mr=n=>typeof n=="boolean"?"".concat(n):n===0?"0":n,gr=Bo,z=(n,e)=>r=>{var o;if((e==null?void 0:e.variants)==null)return gr(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:t,defaultVariants:s}=e,i=Object.keys(t).map(m=>{const g=r==null?void 0:r[m],$=s==null?void 0:s[m];if(g===null)return null;const _=mr(g)||mr($);return t[m][_]}),u=r&&Object.entries(r).reduce((m,g)=>{let[$,_]=g;return _===void 0||(m[$]=_),m},{}),v=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:$,className:_,...M}=g;return Object.entries(M).every(P=>{let[C,w]=P;return Array.isArray(w)?w.includes({...s,...u}[C]):{...s,...u}[C]===w})?[...m,$,_]:m},[]);return gr(n,i,v,r==null?void 0:r.class,r==null?void 0:r.className)},fr=z("p-4 rounded-sm text-sm font-medium",{variants:{variant:{success:"bg-green-100 text-green-800 border-green-200",error:"bg-red-100 text-red-800 border-red-200",warning:"bg-yellow-100 text-yellow-800 border-yellow-200",info:"bg-blue-100 text-blue-800 border-blue-200"},size:{small:"text-sm",default:"text-base",large:"text-xl"}},defaultVariants:{variant:"info",size:"default"}});var To=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,No=(n,e,r,o)=>{for(var t=o>1?void 0:o?qo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&To(e,r,t),t};a.AlertTitle=class extends l.LitElement{render(){return l.html`<slot part="alert-title"></slot>`}},a.AlertTitle.styles=l.css`
|
2993
2993
|
:host {
|
2994
2994
|
display: block;
|
2995
2995
|
font-weight: bold;
|
2996
2996
|
margin-bottom: 0.5rem;
|
2997
2997
|
}
|
2998
|
-
`,a.AlertTitle=
|
2998
|
+
`,a.AlertTitle=No([d.customElement("rtg-alert-title")],a.AlertTitle);var Go=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Vo=(n,e,r,o)=>{for(var t=o>1?void 0:o?Fo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Go(e,r,t),t};a.AlertDescription=class extends l.LitElement{render(){return l.html`<slot part="alert-description"></slot>`}},a.AlertDescription.styles=l.css`
|
2999
2999
|
:host {
|
3000
3000
|
display: block;
|
3001
3001
|
}
|
3002
|
-
`,a.AlertDescription=
|
3002
|
+
`,a.AlertDescription=Vo([d.customElement("rtg-alert-description")],a.AlertDescription);var Uo=Object.defineProperty,Ho=Object.getOwnPropertyDescriptor,Be=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ho(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Uo(e,r,t),t};a.Alert=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.variant="info",this.size="default"}get alertClasses(){return fr({variant:this.variant,size:this.size})}render(){return l.html`
|
3003
3003
|
<div class="alert ${this.alertClasses} ${this.twCLass}" part="alert">
|
3004
3004
|
<slot name="title"></slot>
|
3005
3005
|
<slot name="description"></slot>
|
@@ -3017,9 +3017,9 @@ body {
|
|
3017
3017
|
font-weight: bold;
|
3018
3018
|
margin-bottom: 0.5rem;
|
3019
3019
|
}
|
3020
|
-
`,c],a.Alert.alertVairants=
|
3020
|
+
`,c],a.Alert.alertVairants=fr,Be([d.property({type:String})],a.Alert.prototype,"twCLass",2),Be([d.property({type:String})],a.Alert.prototype,"variant",2),Be([d.property({type:String})],a.Alert.prototype,"size",2),a.Alert=Be([d.customElement("rtg-alert")],a.Alert);var Xo=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,gt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Yo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Xo(e,r,t),t};a.AspectRatio=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.ratio=16/9}render(){const e=1/this.ratio*100;return l.html`
|
3021
3021
|
<div
|
3022
|
-
class="${
|
3022
|
+
class="${p("aspect-ratio-wrapper bg-muted",this.className,this.twCLass)} "
|
3023
3023
|
style="padding-top: ${e}%;"
|
3024
3024
|
part="aspect-ratio"
|
3025
3025
|
>
|
@@ -3040,42 +3040,42 @@ body {
|
|
3040
3040
|
width: 100%;
|
3041
3041
|
height: 100%;
|
3042
3042
|
}
|
3043
|
-
`,c],
|
3043
|
+
`,c],gt([d.property({type:String})],a.AspectRatio.prototype,"twCLass",2),gt([d.property({type:Number})],a.AspectRatio.prototype,"ratio",2),a.AspectRatio=gt([d.customElement("rtg-aspect-ratio")],a.AspectRatio);const Ko="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",Wo="aspect-square h-full w-full",Zo="flex h-full w-full items-center justify-center rounded-full bg-muted";var Jo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,br=(n,e,r,o)=>{for(var t=o>1?void 0:o?Qo(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Jo(e,r,t),t};let Te=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
3044
3044
|
<span
|
3045
|
-
class="${
|
3045
|
+
class="${p(Ko,this.className,this.twCLass)}"
|
3046
3046
|
part="avatar"
|
3047
3047
|
>
|
3048
3048
|
<slot></slot>
|
3049
3049
|
</span>
|
3050
|
-
`}};
|
3050
|
+
`}};Te.styles=[l.css``,c],br([d.property({type:String})],Te.prototype,"twCLass",2),Te=br([d.customElement("rtg-avatar")],Te);var jo=Object.defineProperty,en=Object.getOwnPropertyDescriptor,tn=(n,e,r,o)=>{for(var t=o>1?void 0:o?en(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&jo(e,r,t),t};let ft=class extends l.LitElement{render(){return l.html`
|
3051
3051
|
<span
|
3052
|
-
class="${
|
3052
|
+
class="${p(Zo,this.className)}"
|
3053
3053
|
style="width:40px;height:40px"
|
3054
3054
|
part="avatar-fallback"
|
3055
3055
|
>
|
3056
3056
|
<slot></slot>
|
3057
3057
|
</span>
|
3058
|
-
`}};
|
3058
|
+
`}};ft.styles=[l.css``,c],ft=tn([d.customElement("rtg-avatar-fallback")],ft);var rn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,bt=(n,e,r,o)=>{for(var t=o>1?void 0:o?on(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&rn(e,r,t),t};let $e=class extends l.LitElement{constructor(){super(...arguments),this.alt="@shadcn",this.src="https://github.com/shadcn.png"}render(){return l.html`
|
3059
3059
|
<img
|
3060
|
-
class="${
|
3060
|
+
class="${p(Wo,this.className)}"
|
3061
3061
|
alt="${this.alt}"
|
3062
3062
|
src="${this.src}"
|
3063
3063
|
part="avatar-image"
|
3064
3064
|
>
|
3065
3065
|
<slot></slot>
|
3066
3066
|
</img>
|
3067
|
-
`}}
|
3067
|
+
`}};$e.styles=[l.css``,c],bt([d.property({type:String})],$e.prototype,"alt",2),bt([d.property({type:String})],$e.prototype,"src",2),$e=bt([d.customElement("rtg-avatar-image")],$e);const nn=z("inline-flex items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 px-4 py-2",sm:"h-7 rounded-sm px-3 text-xs",lg:"h-9 rounded-sm px-8",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}});var sn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,U=(n,e,r,o)=>{for(var t=o>1?void 0:o?an(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&sn(e,r,t),t};a.Button=class extends b{constructor(){super(...arguments),this.click=()=>{},this.disabled=!1,this.type="button",this.variant="default",this.size="default",this.externalClass="",this.isCustomClass=!1}handleClick(){this.disabled||this.click()}getAttributesToExclude(){return["click","disabled","type","variant","size","data-testid"]}render(){const e=this.getFilteredAttributes();return l.html`
|
3068
3068
|
<button
|
3069
3069
|
part="button"
|
3070
3070
|
type="${this.type}"
|
3071
3071
|
${x(e)}
|
3072
3072
|
?disabled="${this.disabled}"
|
3073
|
-
class="${
|
3073
|
+
class="${p(a.Button.buttonVariants({variant:this.variant,size:this.size,className:this.className}))} ${this.externalClass} ${this.isCustomClass?"rtg-button-custom-class":""}"
|
3074
3074
|
@click="${this.handleClick}"
|
3075
3075
|
>
|
3076
3076
|
<slot></slot>
|
3077
3077
|
</button>
|
3078
|
-
`}},a.Button.buttonVariants=
|
3078
|
+
`}},a.Button.buttonVariants=nn,a.Button.styles=[l.css`
|
3079
3079
|
:host {
|
3080
3080
|
--rtg-button-bg: unset;
|
3081
3081
|
--rtg-button-color: unset;
|
@@ -3088,52 +3088,52 @@ body {
|
|
3088
3088
|
border-radius: var(--rtg-button-radius, unset) !important;
|
3089
3089
|
height: var(--rtg-button-height, unset) !important;
|
3090
3090
|
}
|
3091
|
-
`,c],U([d.property({type:Function})],a.Button.prototype,"click",2),U([d.property({type:Boolean})],a.Button.prototype,"disabled",2),U([d.property({type:String})],a.Button.prototype,"type",2),U([d.property({type:String})],a.Button.prototype,"variant",2),U([d.property({type:String})],a.Button.prototype,"size",2),U([d.property({type:String})],a.Button.prototype,"externalClass",2),U([d.property({type:String})],a.Button.prototype,"isCustomClass",2),a.Button=U([d.customElement("rtg-button")],a.Button);const
|
3091
|
+
`,c],U([d.property({type:Function})],a.Button.prototype,"click",2),U([d.property({type:Boolean})],a.Button.prototype,"disabled",2),U([d.property({type:String})],a.Button.prototype,"type",2),U([d.property({type:String})],a.Button.prototype,"variant",2),U([d.property({type:String})],a.Button.prototype,"size",2),U([d.property({type:String})],a.Button.prototype,"externalClass",2),U([d.property({type:String})],a.Button.prototype,"isCustomClass",2),a.Button=U([d.customElement("rtg-button")],a.Button);const ln=z("inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});var dn=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,qe=(n,e,r,o)=>{for(var t=o>1?void 0:o?cn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&dn(e,r,t),t};a.Badge=class extends b{constructor(){super(...arguments),this.twCLass="",this.variant="default",this.id="rtg-badge-id"}getAttributesToExclude(){return["variant"]}render(){const e=this.getFilteredAttributes();return l.html`
|
3092
3092
|
<div
|
3093
3093
|
${x(e)}
|
3094
3094
|
id="${this.id}"
|
3095
3095
|
part="badge"
|
3096
3096
|
class="
|
3097
|
-
${
|
3097
|
+
${p(a.Badge.badgeVariants({variant:this.variant,className:this.className}))},
|
3098
3098
|
${this.twCLass}
|
3099
3099
|
"
|
3100
3100
|
>
|
3101
3101
|
<slot></slot>
|
3102
3102
|
</div>
|
3103
|
-
`}},a.Badge.badgeVariants=
|
3103
|
+
`}},a.Badge.badgeVariants=ln,a.Badge.styles=[l.css``,c],qe([d.property({type:String})],a.Badge.prototype,"twCLass",2),qe([d.property({type:String})],a.Badge.prototype,"variant",2),qe([d.property({type:String})],a.Badge.prototype,"id",2),a.Badge=qe([d.customElement("rtg-badge")],a.Badge);var un=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,hn=(n,e,r,o)=>{for(var t=o>1?void 0:o?pn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&un(e,r,t),t};a.CardTitle=class extends l.LitElement{render(){return l.html` <slot part="card-title"></slot> `}},a.CardTitle.styles=[l.css``,c],a.CardTitle=hn([d.customElement("rtg-card-title")],a.CardTitle);var mn=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,fn=(n,e,r,o)=>{for(var t=o>1?void 0:o?gn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&mn(e,r,t),t};a.CardHeader=class extends l.LitElement{render(){return l.html` <slot part="card-header"></slot> `}},a.CardHeader.styles=[l.css``,c],a.CardHeader=fn([d.customElement("rtg-card-header")],a.CardHeader);var bn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,wn=(n,e,r,o)=>{for(var t=o>1?void 0:o?vn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&bn(e,r,t),t};a.CardFooter=class extends l.LitElement{render(){return l.html` <slot part="card-footer"></slot> `}},a.CardFooter.styles=[l.css``,c],a.CardFooter=wn([d.customElement("rtg-card-footer")],a.CardFooter);var yn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Cn=(n,e,r,o)=>{for(var t=o>1?void 0:o?xn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&yn(e,r,t),t};a.CardDescription=class extends l.LitElement{render(){return l.html` <slot part="card-description"></slot> `}},a.CardDescription.styles=[l.css``,c],a.CardDescription=Cn([d.customElement("rtg-card-description")],a.CardDescription);var $n=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,On=(n,e,r,o)=>{for(var t=o>1?void 0:o?_n(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&$n(e,r,t),t};a.CardContent=class extends l.LitElement{render(){return l.html` <slot part="card-content"></slot> `}},a.CardContent.styles=[l.css``,c],a.CardContent=On([d.customElement("rtg-card-content")],a.CardContent);var En=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,Sn=(n,e,r,o)=>{for(var t=o>1?void 0:o?Pn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&En(e,r,t),t};a.Card=class extends l.LitElement{render(){return l.html`<div
|
3104
3104
|
part="card"
|
3105
3105
|
class="rounded-lg border bg-card text-card-foreground shadow-sm p-6"
|
3106
3106
|
id="rtg-card-id"
|
3107
3107
|
>
|
3108
3108
|
<slot></slot>
|
3109
|
-
</div>`}},a.Card.styles=[l.css``,c],a.Card=
|
3109
|
+
</div>`}},a.Card.styles=[l.css``,c],a.Card=Sn([d.customElement("rtg-card")],a.Card);var Mn=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,kn=(n,e,r,o)=>{for(var t=o>1?void 0:o?Dn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Mn(e,r,t),t};let vt=class extends b{getAttributesToExclude(){return[""]}get _collapsible(){let n=this.parentElement;for(;n&&!(n instanceof J);)n=n.parentElement;return n}onTrigger(){const n=this._collapsible;n&&(n.open=!n.open,n.onOpenChange())}render(){const n=this.getFilteredAttributes();return l.html`
|
3110
3110
|
<div
|
3111
3111
|
@click=${this.onTrigger}
|
3112
|
-
${x(
|
3112
|
+
${x(n)}
|
3113
3113
|
part="collapsible-trigger"
|
3114
3114
|
>
|
3115
3115
|
<slot></slot>
|
3116
3116
|
</div>
|
3117
|
-
`}};
|
3117
|
+
`}};vt.styles=[l.css``,c],vt=kn([d.customElement("rtg-collapsible-trigger")],vt);var In=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,An=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ln(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&In(e,r,t),t};let wt=class extends b{getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
3118
3118
|
<div
|
3119
|
-
${x(
|
3119
|
+
${x(n)}
|
3120
3120
|
class="${this.className}"
|
3121
3121
|
style="--radix-collapsible-content-height: 100px; --radix-collapsible-content-width: 350px;"
|
3122
3122
|
part="collapsible-content"
|
3123
3123
|
>
|
3124
3124
|
<slot></slot>
|
3125
3125
|
</div>
|
3126
|
-
`}};
|
3126
|
+
`}};wt.styles=[l.css``,c],wt=An([d.customElement("rtg-collapsible-content")],wt);var Rn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,Ne=(n,e,r,o)=>{for(var t=o>1?void 0:o?zn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Rn(e,r,t),t};let J=class extends b{constructor(){super(...arguments),this.open=!1,this.onOpenChange=()=>{},this.twCLass=""}getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
3127
3127
|
<div
|
3128
3128
|
data-state="${this.open?"open":"closed"}"
|
3129
|
-
${x(
|
3129
|
+
${x(n)}
|
3130
3130
|
class="${this.twCLass}"
|
3131
3131
|
part="collapsible"
|
3132
3132
|
>
|
3133
3133
|
<slot></slot>
|
3134
3134
|
${this.open?l.html`<slot name="collapsible-content"></slot>`:l.nothing}
|
3135
3135
|
</div>
|
3136
|
-
`}};J.styles=[l.css``,c],
|
3136
|
+
`}};J.styles=[l.css``,c],Ne([d.property({type:Boolean})],J.prototype,"open",2),Ne([d.property({type:Function})],J.prototype,"onOpenChange",2),Ne([d.property({type:String})],J.prototype,"twCLass",2),J=Ne([d.customElement("rtg-collapsible")],J);const Bn="peer h-4 w-4 align-middle shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",Tn="flex items-center justify-center text-current pointer-events-none";var qn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,Q=(n,e,r,o)=>{for(var t=o>1?void 0:o?Nn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&qn(e,r,t),t};a.Checkbox=class extends l.LitElement{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.type="text",this.value="",this.required=!1,this.twCLass=""}_onClick(e){e.defaultPrevented||(this.checked=!this.checked,this.required=!this.required,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}click(){this.checked=!this.checked,this.required=!this.required}render(){const e={...this.dataset};return l.html`
|
3137
3137
|
<button
|
3138
3138
|
part="checkbox"
|
3139
3139
|
data-testid="checkbox-atom"
|
@@ -3145,10 +3145,10 @@ body {
|
|
3145
3145
|
?required=${this.required}
|
3146
3146
|
?disabled=${this.disabled}
|
3147
3147
|
@click="${this._onClick}"
|
3148
|
-
class="${
|
3149
|
-
${Object.entries(e).map(([o
|
3148
|
+
class="${p(Bn,this.className)} ${this.twCLass}"
|
3149
|
+
${Object.entries(e).map(([r,o])=>l.html` ${r}="${o}" `)}
|
3150
3150
|
>
|
3151
|
-
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${
|
3151
|
+
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${Tn}"
|
3152
3152
|
><svg
|
3153
3153
|
xmlns="http://www.w3.org/2000/svg"
|
3154
3154
|
width="24"
|
@@ -3164,7 +3164,7 @@ body {
|
|
3164
3164
|
<polyline points="20 6 9 17 4 12"></polyline></svg
|
3165
3165
|
></span>`:l.nothing}
|
3166
3166
|
</button>
|
3167
|
-
`}},a.Checkbox.styles=[l.css``,c],Q([d.property({type:Boolean})],a.Checkbox.prototype,"disabled",2),Q([d.property({type:Boolean})],a.Checkbox.prototype,"checked",2),Q([d.property({type:String})],a.Checkbox.prototype,"type",2),Q([d.property({type:String})],a.Checkbox.prototype,"value",2),Q([d.property({type:Boolean})],a.Checkbox.prototype,"required",2),Q([d.property({type:String})],a.Checkbox.prototype,"twCLass",2),a.Checkbox=Q([d.customElement("rtg-checkbox")],a.Checkbox);const
|
3167
|
+
`}},a.Checkbox.styles=[l.css``,c],Q([d.property({type:Boolean})],a.Checkbox.prototype,"disabled",2),Q([d.property({type:Boolean})],a.Checkbox.prototype,"checked",2),Q([d.property({type:String})],a.Checkbox.prototype,"type",2),Q([d.property({type:String})],a.Checkbox.prototype,"value",2),Q([d.property({type:Boolean})],a.Checkbox.prototype,"required",2),Q([d.property({type:String})],a.Checkbox.prototype,"twCLass",2),a.Checkbox=Q([d.customElement("rtg-checkbox")],a.Checkbox);const Ge="closed";var Gn=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,yt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Fn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Gn(e,r,t),t};a.ContextMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Ge,this.isOpen=!1}get _contextMenu(){let e=this.parentElement;for(;e&&!(e instanceof a.ContextMenu);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-context-menu-content"),o=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(o!=null&&o.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
3168
3168
|
<div
|
3169
3169
|
part="context-menu-content"
|
3170
3170
|
class="z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
@@ -3173,10 +3173,10 @@ body {
|
|
3173
3173
|
>
|
3174
3174
|
<slot></slot>
|
3175
3175
|
</div>
|
3176
|
-
`}},a.ContextMenuContent.styles=[l.css``,c],
|
3176
|
+
`}},a.ContextMenuContent.styles=[l.css``,c],yt([d.property({attribute:"data-state",type:String})],a.ContextMenuContent.prototype,"state",2),yt([d.state()],a.ContextMenuContent.prototype,"isOpen",2),a.ContextMenuContent=yt([d.customElement("rtg-context-menu-content")],a.ContextMenuContent);var Vn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,j=(n,e,r,o)=>{for(var t=o>1?void 0:o?Un(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Vn(e,r,t),t};a.ContextMenuCheckboxItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.ContextMenuCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${a.ContextMenuCheckboxItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return l.html`
|
3177
3177
|
<div
|
3178
3178
|
part="context-menu-checkbox"
|
3179
|
-
class="${
|
3179
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
3180
3180
|
@click=${this.toggleChecked}
|
3181
3181
|
@mouseover="${this.handleMouseEvent}"
|
3182
3182
|
@mouseleave="${this.handleMouseEvent}"
|
@@ -3213,7 +3213,7 @@ body {
|
|
3213
3213
|
height: 16px;
|
3214
3214
|
display: inline-block;
|
3215
3215
|
}
|
3216
|
-
`,c],j([d.property({type:String})],a.ContextMenuCheckboxItem.prototype,"_id",2),j([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuCheckboxItem.prototype,"_hidden",2),j([d.property({attribute:"data-value",type:String})],a.ContextMenuCheckboxItem.prototype,"value",1),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"selected",2),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"checked",2),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"disabled",2),a.ContextMenuCheckboxItem=j([d.customElement("rtg-context-menu-checkbox-item")],a.ContextMenuCheckboxItem);var
|
3216
|
+
`,c],j([d.property({type:String})],a.ContextMenuCheckboxItem.prototype,"_id",2),j([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuCheckboxItem.prototype,"_hidden",2),j([d.property({attribute:"data-value",type:String})],a.ContextMenuCheckboxItem.prototype,"value",1),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"selected",2),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"checked",2),j([d.property({type:Boolean})],a.ContextMenuCheckboxItem.prototype,"disabled",2),a.ContextMenuCheckboxItem=j([d.customElement("rtg-context-menu-checkbox-item")],a.ContextMenuCheckboxItem);var Hn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,Fe=(n,e,r,o)=>{for(var t=o>1?void 0:o?Xn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Hn(e,r,t),t};a.ContextMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${a.ContextMenuGroup._counter++}`:this._id=`rtgcmdrxlxg${a.ContextMenuGroup._counter++}`,this._id}render(){const e="overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground";return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3217
3217
|
<div
|
3218
3218
|
part="context-menu-group"
|
3219
3219
|
class="${e}"
|
@@ -3236,10 +3236,10 @@ body {
|
|
3236
3236
|
<slot></slot>
|
3237
3237
|
</div>
|
3238
3238
|
</div>
|
3239
|
-
`}`}},a.ContextMenuGroup._counter=0,a.ContextMenuGroup.styles=[l.css``,c],
|
3239
|
+
`}`}},a.ContextMenuGroup._counter=0,a.ContextMenuGroup.styles=[l.css``,c],Fe([d.property({type:String})],a.ContextMenuGroup.prototype,"heading",2),Fe([d.property({attribute:"id",type:String})],a.ContextMenuGroup.prototype,"_id",2),Fe([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuGroup.prototype,"_hidden",2),a.ContextMenuGroup=Fe([d.customElement("rtg-context-menu-group")],a.ContextMenuGroup);var Yn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,_e=(n,e,r,o)=>{for(var t=o>1?void 0:o?Kn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Yn(e,r,t),t};a.ContextMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.ContextMenuItem._counter++}`:this._id=`rtgcmdrxgxli${a.ContextMenuItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}render(){return l.html` ${this._hidden==="true"?l.nothing:l.html`
|
3240
3240
|
<div
|
3241
3241
|
part="context-menu-item"
|
3242
|
-
class="${
|
3242
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground",this.className)}"
|
3243
3243
|
@mouseover="${this.handleMouseEvent}"
|
3244
3244
|
@mouseleave="${this.handleMouseEvent}"
|
3245
3245
|
@focus="${this.handleMouseEvent}"
|
@@ -3253,10 +3253,10 @@ body {
|
|
3253
3253
|
>
|
3254
3254
|
<slot></slot>
|
3255
3255
|
</div>
|
3256
|
-
`}`}},a.ContextMenuItem._counter=0,a.ContextMenuItem.styles=[l.css``,c],
|
3256
|
+
`}`}},a.ContextMenuItem._counter=0,a.ContextMenuItem.styles=[l.css``,c],_e([d.property({type:String})],a.ContextMenuItem.prototype,"_id",2),_e([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuItem.prototype,"_hidden",2),_e([d.property({attribute:"data-value",type:String})],a.ContextMenuItem.prototype,"value",1),_e([d.property({type:Boolean})],a.ContextMenuItem.prototype,"selected",2),a.ContextMenuItem=_e([d.customElement("rtg-context-menu-item")],a.ContextMenuItem);var Wn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,ee=(n,e,r,o)=>{for(var t=o>1?void 0:o?Zn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Wn(e,r,t),t};a.ContextMenuRadioItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.ContextMenuRadioItem._counter++}`:this._id=`rtgcmdrxgxli${a.ContextMenuRadioItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
3257
3257
|
<div
|
3258
3258
|
part="context-menu-radio"
|
3259
|
-
class="${
|
3259
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
3260
3260
|
@click=${this.toggleChecked}
|
3261
3261
|
@mouseover="${this.handleMouseEvent}"
|
3262
3262
|
@mouseleave="${this.handleMouseEvent}"
|
@@ -3272,7 +3272,7 @@ body {
|
|
3272
3272
|
<span
|
3273
3273
|
class="icon-space absolute left-2 flex items-center justify-center"
|
3274
3274
|
>
|
3275
|
-
${this.checked?l.html` ${
|
3275
|
+
${this.checked?l.html` ${pt()} `:l.nothing}
|
3276
3276
|
</span>
|
3277
3277
|
<slot></slot>
|
3278
3278
|
</div>
|
@@ -3282,22 +3282,22 @@ body {
|
|
3282
3282
|
height: 16px;
|
3283
3283
|
display: inline-block;
|
3284
3284
|
}
|
3285
|
-
`,c],ee([d.property({type:String})],a.ContextMenuRadioItem.prototype,"_id",2),ee([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuRadioItem.prototype,"_hidden",2),ee([d.property({attribute:"data-value",type:String})],a.ContextMenuRadioItem.prototype,"value",1),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"selected",2),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"checked",2),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"disabled",2),a.ContextMenuRadioItem=ee([d.customElement("rtg-context-menu-radio-item")],a.ContextMenuRadioItem);var
|
3285
|
+
`,c],ee([d.property({type:String})],a.ContextMenuRadioItem.prototype,"_id",2),ee([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuRadioItem.prototype,"_hidden",2),ee([d.property({attribute:"data-value",type:String})],a.ContextMenuRadioItem.prototype,"value",1),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"selected",2),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"checked",2),ee([d.property({type:Boolean})],a.ContextMenuRadioItem.prototype,"disabled",2),a.ContextMenuRadioItem=ee([d.customElement("rtg-context-menu-radio-item")],a.ContextMenuRadioItem);var Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,xt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Qn(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Jn(e,r,t),t};a.ContextMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${a.ContextMenuSeparator._counter++}`:this._id=`rtgcmdrxlxs${a.ContextMenuSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3286
3286
|
<div
|
3287
3287
|
part="context-menu-separator"
|
3288
|
-
class="${
|
3288
|
+
class="${p("-mx-1 h-px bg-border",this.className)}"
|
3289
3289
|
rtgcmd-separator
|
3290
3290
|
role="separator"
|
3291
3291
|
id="${this.identifier}"
|
3292
3292
|
></div>
|
3293
|
-
`}`}},a.ContextMenuSeparator._counter=0,a.ContextMenuSeparator.styles=[l.css``,c],
|
3293
|
+
`}`}},a.ContextMenuSeparator._counter=0,a.ContextMenuSeparator.styles=[l.css``,c],xt([d.property({type:String})],a.ContextMenuSeparator.prototype,"_id",2),xt([d.property({attribute:"aria-hidden",type:String})],a.ContextMenuSeparator.prototype,"_hidden",2),a.ContextMenuSeparator=xt([d.customElement("rtg-context-menu-separator")],a.ContextMenuSeparator);var jn=Object.defineProperty,es=Object.getOwnPropertyDescriptor,ts=(n,e,r,o)=>{for(var t=o>1?void 0:o?es(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&jn(e,r,t),t};a.ContextMenuShortcut=class extends l.LitElement{render(){return l.html`
|
3294
3294
|
<span
|
3295
3295
|
part="context-menu-shortcut"
|
3296
|
-
class="${
|
3296
|
+
class="${p("ml-auto text-xs font-semibold",this.className)}"
|
3297
3297
|
>
|
3298
3298
|
<slot></slot>
|
3299
3299
|
</span>
|
3300
|
-
`}},a.ContextMenuShortcut.styles=[l.css``,c],a.ContextMenuShortcut=
|
3300
|
+
`}},a.ContextMenuShortcut.styles=[l.css``,c],a.ContextMenuShortcut=ts([d.customElement("rtg-context-menu-shortcut")],a.ContextMenuShortcut);var rs=Object.defineProperty,os=Object.getOwnPropertyDescriptor,vr=(n,e,r,o)=>{for(var t=o>1?void 0:o?os(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&rs(e,r,t),t};a.ContextMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var o;const r=e.target;(o=this.shadowRoot)!=null&&o.contains(r)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();const{clientX:r,clientY:o}=e,t=e.target.getBoundingClientRect();requestAnimationFrame(()=>{const s=this._content;s&&(s.style.position="absolute",s.style.left=`${r-t.left}px`,s.style.top=`${o-t.top}px`,s.dataset.state="open",this.isOpen=!0)})}get _content(){var o;const e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof a.ContextMenuContent)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-context-menu-radio-item").forEach(r=>{r!==e.target&&(r.checked=!1)})}render(){return l.html`
|
3301
3301
|
<div class="flex" part="context-menu">
|
3302
3302
|
<div>
|
3303
3303
|
<slot @contextmenu="${this.toggleDropdown}"></slot>
|
@@ -3306,29 +3306,29 @@ body {
|
|
3306
3306
|
<slot></slot>
|
3307
3307
|
</div>
|
3308
3308
|
</div>
|
3309
|
-
`}},a.ContextMenu.styles=[l.css``,c],
|
3309
|
+
`}},a.ContextMenu.styles=[l.css``,c],vr([d.state()],a.ContextMenu.prototype,"isOpen",2),a.ContextMenu=vr([d.customElement("rtg-context-menu")],a.ContextMenu);var ns=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,Ct=(n,e,r,o)=>{for(var t=o>1?void 0:o?ss(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ns(e,r,t),t};let Oe=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
3310
3310
|
<div
|
3311
3311
|
part="command"
|
3312
|
-
class="${
|
3312
|
+
class="${p("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground border shadow-md",this.className,this.twCLass)}"
|
3313
3313
|
id="rtgcmdr1"
|
3314
3314
|
rtgcmd-root
|
3315
3315
|
>
|
3316
3316
|
<slot></slot>
|
3317
3317
|
</div>
|
3318
|
-
`}};
|
3318
|
+
`}};Oe.styles=[l.css``,c],Ct([d.property({type:String})],Oe.prototype,"twCLass",2),Ct([d.queryAssignedElements({selector:"input[rtgcmd-input]"})],Oe.prototype,"_input",2),Oe=Ct([d.customElement("rtg-command")],Oe);var is=Object.defineProperty,as=Object.getOwnPropertyDescriptor,$t=(n,e,r,o)=>{for(var t=o>1?void 0:o?as(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&is(e,r,t),t};let H=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="true"}get identifier(){var e,r;if(this._id!=="")return this._id;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return n?this._id=`${n.getAttribute("id")}e${H._counter++}`:this._id=`rtgcmdrxlxe${H._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3319
3319
|
<div
|
3320
3320
|
part="command-empty"
|
3321
|
-
class="${
|
3321
|
+
class="${p("py-6 text-center text-sm",this.className)}"
|
3322
3322
|
rtgcmd-empty
|
3323
3323
|
role="presentation"
|
3324
3324
|
id="${this.identifier}"
|
3325
3325
|
>
|
3326
3326
|
<slot></slot>
|
3327
3327
|
</div>
|
3328
|
-
`}`}};H._counter=0,H.styles=[l.css``,c]
|
3328
|
+
`}`}};H._counter=0,H.styles=[l.css``,c],$t([d.property({type:String})],H.prototype,"_id",2),$t([d.property({attribute:"aria-hidden",type:String})],H.prototype,"_hidden",2),H=$t([d.customElement("rtg-command-empty")],H);var ls=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,Ve=(n,e,r,o)=>{for(var t=o>1?void 0:o?ds(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ls(e,r,t),t};let B=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var e,r;if(this._id!=="")return this._id;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return n?this._id=`${n.getAttribute("id")}g${B._counter++}`:this._id=`rtgcmdrxlxg${B._counter++}`,this._id}render(){const n="overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground";return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3329
3329
|
<div
|
3330
3330
|
part="command-group"
|
3331
|
-
class="${
|
3331
|
+
class="${n}"
|
3332
3332
|
rtgcmd-group
|
3333
3333
|
role="presentation"
|
3334
3334
|
id="${this.identifier}"
|
@@ -3348,10 +3348,10 @@ body {
|
|
3348
3348
|
<slot></slot>
|
3349
3349
|
</div>
|
3350
3350
|
</div>
|
3351
|
-
`}`}};B._counter=0,B.styles=[l.css``,c],
|
3351
|
+
`}`}};B._counter=0,B.styles=[l.css``,c],Ve([d.property({type:String})],B.prototype,"heading",2),Ve([d.property({attribute:"id",type:String})],B.prototype,"_id",2),Ve([d.property({attribute:"aria-hidden",type:String})],B.prototype,"_hidden",2),B=Ve([d.customElement("rtg-command-group")],B);var cs=Object.defineProperty,us=Object.getOwnPropertyDescriptor,_t=(n,e,r,o)=>{for(var t=o>1?void 0:o?us(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&cs(e,r,t),t};let Ee=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){var e,r;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-root]");return n?`${n.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const n=this.parentElement;if(n){let e=!0;const r=n.querySelectorAll("rtg-command-list > rtg-command-group");r&&r.forEach(t=>{var v,m;let s=!0;const i=t.querySelectorAll("rtg-command-item");i&&i.forEach(g=>{((g==null?void 0:g.value)||"").toLowerCase().includes(this._value.toLowerCase())?(s=!1,e=!1,g.setAttribute("aria-hidden","false")):g.setAttribute("aria-hidden","true")}),t.setAttribute("aria-hidden",s?"true":"false");let u=t.previousElementSibling;u&&u.setAttribute("aria-hidden",s||((v=u.previousElementSibling)==null?void 0:v.getAttribute("aria-hidden"))==="true"?"true":"false"),u=t.nextElementSibling,u&&u.setAttribute("aria-hidden",s||((m=u.nextElementSibling)==null?void 0:m.getAttribute("aria-hidden"))==="true"?"true":"false")});const o=n.querySelector("rtg-command-empty");o&&o.setAttribute("aria-hidden",e?"false":"true")}}handleChange(n){const e=n.target;e&&(this._value=e.value,this.filterItems())}render(){return l.html`
|
3352
3352
|
<div
|
3353
3353
|
part="command-input"
|
3354
|
-
class="${
|
3354
|
+
class="${p("flex items-center border-b px-3",this.className)}"
|
3355
3355
|
name="rtgcmd-input-container"
|
3356
3356
|
>
|
3357
3357
|
<svg
|
@@ -3387,10 +3387,10 @@ body {
|
|
3387
3387
|
data-value="${this._value}"
|
3388
3388
|
/>
|
3389
3389
|
</div>
|
3390
|
-
`}}
|
3390
|
+
`}};Ee.styles=[l.css``,c],_t([d.property({type:String})],Ee.prototype,"placeholder",2),_t([d.property({attribute:"value",type:String})],Ee.prototype,"_value",2),Ee=_t([d.customElement("rtg-command-input")],Ee);var ps=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,Pe=(n,e,r,o)=>{for(var t=o>1?void 0:o?hs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ps(e,r,t),t};let k=class extends l.LitElement{constructor(){super(...arguments),this.selected=!1,this._id="",this._hidden="",this.onSelect=()=>{}}get identifier(){var e,r;if(this._id!=="")return this._id;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return n?this._id=`${n.getAttribute("id")}li${k._counter++}`:this._id=`rtgcmdrxgxli${k._counter++}`,this._id}get value(){var n;return((n=this.textContent)==null?void 0:n.trim())||""}handleMouseEvent(n){(n.type==="mouseover"||n.type==="focus")&&(this.selected=!0),n.type==="mouseleave"&&(this.selected=!1)}render(){return l.html` ${this._hidden==="true"?l.nothing:l.html`
|
3391
3391
|
<div
|
3392
3392
|
part="command-item"
|
3393
|
-
class="${
|
3393
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",this.className)}"
|
3394
3394
|
@mouseover="${this.handleMouseEvent}"
|
3395
3395
|
@mouseleave="${this.handleMouseEvent}"
|
3396
3396
|
@focus="${this.handleMouseEvent}"
|
@@ -3405,10 +3405,10 @@ body {
|
|
3405
3405
|
>
|
3406
3406
|
<slot></slot>
|
3407
3407
|
</div>
|
3408
|
-
`}`}};
|
3408
|
+
`}`}};k._counter=0,k.styles=[l.css``,c],Pe([d.property({type:String})],k.prototype,"_id",2),Pe([d.property({attribute:"aria-hidden",type:String})],k.prototype,"_hidden",2),Pe([d.property({type:Function})],k.prototype,"onSelect",2),Pe([d.property({attribute:"data-value",type:String}),d.property({type:Boolean})],k.prototype,"identifier",1),k=Pe([d.customElement("rtg-command-item")],k);var ms=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,fs=(n,e,r,o)=>{for(var t=o>1?void 0:o?gs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ms(e,r,t),t};let Ot=class extends l.LitElement{get identifier(){var e,r;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-root]");return n?`${n.getAttribute("id")}l`:"rtgcmdrxl"}render(){return l.html`
|
3409
3409
|
<div
|
3410
3410
|
part="command-list"
|
3411
|
-
class="${
|
3411
|
+
class="${p("max-h-[300px] overflow-y-auto overflow-x-hidden",this.className)}"
|
3412
3412
|
role="listbox"
|
3413
3413
|
id="${this.identifier}"
|
3414
3414
|
style="--rtgcmd-list-height: 265.0px;"
|
@@ -3418,15 +3418,15 @@ body {
|
|
3418
3418
|
<slot></slot>
|
3419
3419
|
</div>
|
3420
3420
|
</div>
|
3421
|
-
`}};
|
3421
|
+
`}};Ot.styles=[l.css``,c],Ot=fs([d.customElement("rtg-command-list")],Ot);var bs=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,Et=(n,e,r,o)=>{for(var t=o>1?void 0:o?vs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&bs(e,r,t),t};let X=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var e,r;if(this._id!=="")return this._id;const n=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return n?this._id=`${n.getAttribute("id")}s${X._counter++}`:this._id=`rtgcmdrxlxs${X._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3422
3422
|
<div
|
3423
3423
|
part="command-separator"
|
3424
|
-
class="${
|
3424
|
+
class="${p("-mx-1 h-px bg-border",this.className)}"
|
3425
3425
|
rtgcmd-separator
|
3426
3426
|
role="separator"
|
3427
3427
|
id="${this.identifier}"
|
3428
3428
|
></div>
|
3429
|
-
`}`}};X._counter=0,X.styles=[l.css``,c],
|
3429
|
+
`}`}};X._counter=0,X.styles=[l.css``,c],Et([d.property({type:String})],X.prototype,"_id",2),Et([d.property({attribute:"aria-hidden",type:String})],X.prototype,"_hidden",2),X=Et([d.customElement("rtg-command-separator")],X);var ws=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,xs=(n,e,r,o)=>{for(var t=o>1?void 0:o?ys(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ws(e,r,t),t};let Pt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{if(this._comboBox){[...document.getElementsByTagName("rtg-combo-box")].map(r=>{var o;r.uuid!==((o=this._comboBox)==null?void 0:o.uuid)&&(r.isOpen=!1)});const e=new CustomEvent("trigger-combo-box",{bubbles:!0,composed:!0,detail:{isOpen:!this._comboBox.isOpen}});this.dispatchEvent(e),this._comboBox.isOpen=!this._comboBox.isOpen}}}get _comboBox(){let n=this.parentElement;for(;n&&!(n instanceof a.ComboBox);)n=n.parentElement;return n}firstUpdated(n){var o,t;super.firstUpdated(n);const e=(o=this.shadowRoot)==null?void 0:o.querySelector('slot[name="combo-box-trigger"]'),r=e==null?void 0:e.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
3430
3430
|
<button
|
3431
3431
|
type="button"
|
3432
3432
|
part="combo-box-trigger-button"
|
@@ -3438,29 +3438,29 @@ body {
|
|
3438
3438
|
@click=${this.handleClick}
|
3439
3439
|
>
|
3440
3440
|
<slot></slot>
|
3441
|
-
${
|
3441
|
+
${Eo()}
|
3442
3442
|
</button>
|
3443
|
-
`}};
|
3443
|
+
`}};Pt.styles=[l.css``,c],Pt=xs([d.customElement("rtg-combo-box-trigger")],Pt);var Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,wr=(n,e,r,o)=>{for(var t=o>1?void 0:o?$s(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Cs(e,r,t),t};let Ue=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{if(this._comboBox){[...document.getElementsByTagName("rtg-combo-box")].map(r=>{var o;r.uuid!==((o=this._comboBox)==null?void 0:o.uuid)&&(r.isOpen=!1)});const e=new CustomEvent("trigger-combo-box",{bubbles:!0,composed:!0,detail:{isOpen:!this._comboBox.isOpen}});this.dispatchEvent(e),this._comboBox.isOpen=!this._comboBox.isOpen}},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let n=this.parentElement;for(;n&&!(n instanceof a.ComboBox);)n=n.parentElement;return n}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(n){var o,t;super.firstUpdated(n);const e=(o=this.shadowRoot)==null?void 0:o.querySelector('slot[name="combo-box-trigger"]'),r=e==null?void 0:e.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
3444
3444
|
<span
|
3445
3445
|
part="combo-box-value"
|
3446
3446
|
class="flex line-clamp-1 w-[180px]"
|
3447
3447
|
@click=${this.handleClick}
|
3448
3448
|
>${this.renderLabel()}</span
|
3449
3449
|
>
|
3450
|
-
`}};
|
3451
|
-
@mouseover="${
|
3452
|
-
data-hs-combo-box-value=${
|
3450
|
+
`}};Ue.styles=[l.css``,c],wr([d.property({type:String})],Ue.prototype,"placeholder",2),Ue=wr([d.customElement("rtg-combo-box-value")],Ue);var _s=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,He=(n,e,r,o)=>{for(var t=o>1?void 0:o?Os(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&_s(e,r,t),t};let te=class extends l.LitElement{constructor(){super(...arguments),this.childrenArray=[],this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.checkRender=()=>this.childrenArray.length>0?this.childrenArray.filter(n=>{var e,r;return(r=n.value)==null?void 0:r.toLowerCase().includes((e=this.searchKey)==null?void 0:e.toLowerCase())}).map((n,e)=>{var r;return l.html`<rtg-combo-box-item
|
3451
|
+
@mouseover="${o=>this.handleMouseOver(o,e)}"
|
3452
|
+
data-hs-combo-box-value=${n}
|
3453
3453
|
tabIndex=${e}
|
3454
|
-
.value=${
|
3454
|
+
.value=${n.value}
|
3455
3455
|
.selectItemIndex="${e}"
|
3456
3456
|
.isFocus="${e===this.focusedIndex}"
|
3457
3457
|
.onSelect=${this.onSelectedValue}
|
3458
|
-
.isSelected="${
|
3458
|
+
.isSelected="${n.value.toLowerCase()===((r=this._comboBox)==null?void 0:r.selectedValue.toLowerCase())}"
|
3459
3459
|
>
|
3460
|
-
${
|
3460
|
+
${n.textContent||n.value}
|
3461
3461
|
</rtg-combo-box-item> `}):l.html` <div>
|
3462
3462
|
<slot name="combo-box-empty"></slot>
|
3463
|
-
</div>`}get _comboBox(){let
|
3463
|
+
</div>`}get _comboBox(){let n=this.parentElement;for(;n&&!(n instanceof a.ComboBox);)n=n.parentElement;return n}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()}),document.addEventListener("trigger-combo-box",n=>{n.detail.isOpen&&this._comboBox&&this._comboBox.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(e=>{var r;return e.value===((r=this._comboBox)==null?void 0:r.selectedValue)}),this.requestUpdate())})}firstUpdated(n){document.addEventListener("keydown",this.handleKeyDown.bind(this)),this.childrenArray=Array.from(this.children).filter(e=>e.tagName.toLowerCase()==="rtg-combo-box-item"),this.requestUpdate()}updated(n){var e;(e=this._comboBox)!=null&&e.isOpen||document.removeEventListener("keydown",this.handleKeyDown.bind(this))}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}onSelectedValue(n,e){this.focusedIndex=e,this.selectedValue=n}handleKeyDown(n){var e;if(console.log("inja"),n.preventDefault(),(e=this._comboBox)!=null&&e.isOpen)switch(n.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length;break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<this.childrenArray.length){const r=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.childrenArray[this.focusedIndex].value}});this.dispatchEvent(r)}break;default:console.log("defaule");break}}handleMouseOver(n,e){n.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
3464
3464
|
<div
|
3465
3465
|
part="select-group"
|
3466
3466
|
class="absolute z-50 w-full max-h-72 mt-1 px-1 py-1 bg-white border border-gray-200 rounded-md overflow-hidden overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900 dark:border-neutral-700
|
@@ -3472,9 +3472,9 @@ body {
|
|
3472
3472
|
</div>
|
3473
3473
|
<div>${this.checkRender()}</div>
|
3474
3474
|
</div>
|
3475
|
-
`}};te.styles=[l.css``,c],
|
3475
|
+
`}};te.styles=[l.css``,c],He([d.state()],te.prototype,"searchKey",2),He([d.state()],te.prototype,"focusedIndex",2),He([d.state()],te.prototype,"selectedValue",2),te=He([d.customElement("rtg-combo-box-group")],te);var Es=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,I=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ps(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Es(e,r,t),t};let E=class extends b{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(n,e)=>{},this.onMouseOver=(n,e)=>{},this.handleClick=n=>{this.onSelect(this.value,this.selectItemIndex),n.stopPropagation();const e=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(e)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}render(){const n=this.getFilteredAttributes();return l.html`
|
3476
3476
|
<div
|
3477
|
-
${x(
|
3477
|
+
${x(n)}
|
3478
3478
|
@click=${this.handleClick}
|
3479
3479
|
class="flex items-center justify-between cursor-pointer py-2 px-4 w-full
|
3480
3480
|
rounded-lg
|
@@ -3496,12 +3496,12 @@ body {
|
|
3496
3496
|
<span
|
3497
3497
|
class="${this.isSelected?"visible":"invisible"} data-hs-combo-box-value mr-2"
|
3498
3498
|
>
|
3499
|
-
${
|
3499
|
+
${cr()}
|
3500
3500
|
</span>
|
3501
3501
|
</div>
|
3502
|
-
`}};E.styles=[l.css``,c],
|
3502
|
+
`}};E.styles=[l.css``,c],I([d.property({type:String})],E.prototype,"value",2),I([d.property({type:String})],E.prototype,"key",2),I([d.property({type:Number})],E.prototype,"tabindex",2),I([d.property({type:Boolean})],E.prototype,"isSelected",2),I([d.property({type:Boolean})],E.prototype,"isFocus",2),I([d.property({type:String})],E.prototype,"class",2),I([d.property({type:Number})],E.prototype,"selectItemIndex",2),I([d.property({type:Function})],E.prototype,"onSelect",2),I([d.property({type:Function})],E.prototype,"onMouseOver",2),E=I([d.customElement("rtg-combo-box-item")],E);var Ss=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,Xe=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ms(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ss(e,r,t),t};let me=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="Search Item ...",this.twClass="",this.searchValue=""}get _comboBoxGroup(){let n=this.parentElement;for(;n&&!(n instanceof te);)n=n.parentElement;return n}handleSearch(n){n.stopPropagation();const e=n.target;this.searchValue=e.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(n){n.stopPropagation()}render(){return l.html`
|
3503
3503
|
<div class="flex items-center px-2">
|
3504
|
-
${
|
3504
|
+
${Po()}
|
3505
3505
|
<input
|
3506
3506
|
part="combo-box-input"
|
3507
3507
|
type="text"
|
@@ -3517,11 +3517,11 @@ body {
|
|
3517
3517
|
@keydown="${this.handleKeyDown}"
|
3518
3518
|
/>
|
3519
3519
|
</div>
|
3520
|
-
`}};
|
3520
|
+
`}};me.styles=[l.css``,c],Xe([d.property({type:String})],me.prototype,"placeholder",2),Xe([d.property({type:String})],me.prototype,"twClass",2),Xe([d.state()],me.prototype,"searchValue",2),me=Xe([d.customElement("rtg-combo-box-input")],me);var Ds=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,Is=(n,e,r,o)=>{for(var t=o>1?void 0:o?ks(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ds(e,r,t),t};let St=class extends l.LitElement{render(){return l.html`
|
3521
3521
|
<div class="py-6 text-center text-sm" cmdk-empty="" role="presentation">
|
3522
3522
|
<slot></slot>
|
3523
3523
|
</div>
|
3524
|
-
`}};
|
3524
|
+
`}};St.styles=[l.css``,c],St=Is([d.customElement("rtg-combo-box-empty")],St);var Ls=Object.defineProperty,As=Object.getOwnPropertyDescriptor,T=(n,e,r,o)=>{for(var t=o>1?void 0:o?As(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ls(e,r,t),t};a.ComboBox=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=ar(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("[data-combo-box-uuid]"),o=e.target;if(!o.tagName.includes("RTG-COMBO")){if(!r||!r.contains(o))this.isOpen=!1;else if(!((s=o.shadowRoot)==null?void 0:s.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}firstUpdated(e){this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(r=>r.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){const r=e.target;if(r instanceof HTMLElement){const o=r.closest("rtg-combo-box-item");o?(this.selectedValue=o.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid rtg-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return l.html`
|
3525
3525
|
<div
|
3526
3526
|
class="relative"
|
3527
3527
|
data-hs-combo-box=""
|
@@ -3535,10 +3535,10 @@ body {
|
|
3535
3535
|
<slot name="combo-box-content"></slot>
|
3536
3536
|
</div>
|
3537
3537
|
</div>
|
3538
|
-
`}},a.ComboBox.styles=[l.css``,c],T([d.state()],a.ComboBox.prototype,"isOpen",2),T([d.state()],a.ComboBox.prototype,"selectedValue",2),T([d.state()],a.ComboBox.prototype,"searchTerm",2),T([d.state()],a.ComboBox.prototype,"focusedIndex",2),T([d.state()],a.ComboBox.prototype,"filteredItems",2),T([d.state()],a.ComboBox.prototype,"uuid",2),T([d.property({type:String})],a.ComboBox.prototype,"label",2),T([d.property({type:Array})],a.ComboBox.prototype,"items",2),a.ComboBox=T([d.customElement("rtg-combo-box")],a.ComboBox);var
|
3538
|
+
`}},a.ComboBox.styles=[l.css``,c],T([d.state()],a.ComboBox.prototype,"isOpen",2),T([d.state()],a.ComboBox.prototype,"selectedValue",2),T([d.state()],a.ComboBox.prototype,"searchTerm",2),T([d.state()],a.ComboBox.prototype,"focusedIndex",2),T([d.state()],a.ComboBox.prototype,"filteredItems",2),T([d.state()],a.ComboBox.prototype,"uuid",2),T([d.property({type:String})],a.ComboBox.prototype,"label",2),T([d.property({type:Array})],a.ComboBox.prototype,"items",2),a.ComboBox=T([d.customElement("rtg-combo-box")],a.ComboBox);var Rs=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,yr=(n,e,r,o)=>{for(var t=o>1?void 0:o?zs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Rs(e,r,t),t};const Bs="open",xr="closed";a.DialogContent=class extends l.LitElement{constructor(){super(...arguments),this.state=xr,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=xr)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof a.Dialog)return e;e=e.parentElement}return e}render(){return l.html`${this.state===Bs?l.html`
|
3539
3539
|
<div
|
3540
3540
|
part="dialog-content"
|
3541
|
-
class="${
|
3541
|
+
class="${p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",this.className)}"
|
3542
3542
|
rtgdlg-content
|
3543
3543
|
>
|
3544
3544
|
<slot></slot>
|
@@ -3564,42 +3564,46 @@ body {
|
|
3564
3564
|
><span class="sr-only">Close</span>
|
3565
3565
|
</button>
|
3566
3566
|
</div>
|
3567
|
-
`:l.nothing}`}},a.DialogContent.styles=[l.css``,c],
|
3567
|
+
`:l.nothing}`}},a.DialogContent.styles=[l.css``,c],yr([d.property({attribute:"data-state",type:String})],a.DialogContent.prototype,"state",2),a.DialogContent=yr([d.customElement("rtg-dialog-content")],a.DialogContent);var Ts=Object.defineProperty,qs=Object.getOwnPropertyDescriptor,Ns=(n,e,r,o)=>{for(var t=o>1?void 0:o?qs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ts(e,r,t),t};const Gs="closed";a.DialogClose=class extends l.LitElement{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof a.Dialog)return e;e=e.parentElement}return e}firstUpdated(e){var t;super.firstUpdated(e);const r=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"),o=r==null?void 0:r.assignedElements();o&&o.length>0&&o[0].addEventListener("click",()=>{const i=this._dialog;i&&(i.dataset.state=Gs)})}render(){return l.html`
|
3568
3568
|
<div part="dialog-close">
|
3569
3569
|
<slot></slot>
|
3570
3570
|
</div>
|
3571
|
-
`}},a.DialogClose.styles=[l.css``,c],a.DialogClose=
|
3571
|
+
`}},a.DialogClose.styles=[l.css``,c],a.DialogClose=Ns([d.customElement("rtg-dialog-close")],a.DialogClose);var Fs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,Us=(n,e,r,o)=>{for(var t=o>1?void 0:o?Vs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Fs(e,r,t),t};a.DialogFooter=class extends l.LitElement{render(){return l.html`
|
3572
3572
|
<div
|
3573
3573
|
part="dialog-footer"
|
3574
|
-
class="${
|
3574
|
+
class="${p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",this.className)}"
|
3575
3575
|
>
|
3576
3576
|
<slot></slot>
|
3577
3577
|
</div>
|
3578
|
-
`}},a.DialogFooter.styles=[l.css``,c],a.DialogFooter=
|
3578
|
+
`}},a.DialogFooter.styles=[l.css``,c],a.DialogFooter=Us([d.customElement("rtg-dialog-footer")],a.DialogFooter);var Hs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Mt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Xs(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Hs(e,r,t),t};a.DialogHeader=class extends l.LitElement{constructor(){super(...arguments),this._title="",this.description=""}render(){return l.html`
|
3579
3579
|
<div
|
3580
3580
|
part="dialog-header"
|
3581
|
-
class="${
|
3581
|
+
class="${p("flex flex-col space-y-1.5 text-center sm:text-left",this.className)}"
|
3582
3582
|
>
|
3583
3583
|
<h2
|
3584
|
-
class="${
|
3584
|
+
class="${p("text-lg font-semibold leading-none tracking-tight",this.className)}"
|
3585
3585
|
>
|
3586
3586
|
${this._title}
|
3587
3587
|
</h2>
|
3588
|
-
<p class="${
|
3588
|
+
<p class="${p("text-sm text-muted-foreground",this.className)}">
|
3589
3589
|
${this.description}
|
3590
3590
|
</p>
|
3591
3591
|
</div>
|
3592
|
-
`}},a.DialogHeader.styles=[l.css``,c],
|
3592
|
+
`}},a.DialogHeader.styles=[l.css``,c],Mt([d.property({attribute:"title",type:String})],a.DialogHeader.prototype,"_title",2),Mt([d.property({type:String})],a.DialogHeader.prototype,"description",2),a.DialogHeader=Mt([d.customElement("rtg-dialog-header")],a.DialogHeader);var Ys=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ws=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ks(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ys(e,r,t),t};a.DialogOverlay=class extends l.LitElement{render(){return l.html`
|
3593
3593
|
<div
|
3594
3594
|
part="dialog-overly"
|
3595
|
-
class="${
|
3595
|
+
class="${p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",this.className)}"
|
3596
3596
|
></div>
|
3597
|
-
`}},a.DialogOverlay.styles=[l.css``,c],a.DialogOverlay=
|
3597
|
+
`}},a.DialogOverlay.styles=[l.css``,c],a.DialogOverlay=Ws([d.customElement("rtg-dialog-overlay")],a.DialogOverlay);var Zs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Qs=(n,e,r,o)=>{for(var t=o>1?void 0:o?Js(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Zs(e,r,t),t};const js="open";let Dt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const n=this._dialog;n&&(n.dataset.state=js)}}get _dialog(){let n=this.parentElement;for(;n;){if(n instanceof a.Dialog)return n;n=n.parentElement}return n}firstUpdated(n){var o,t;super.firstUpdated(n);const e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),r=e==null?void 0:e.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
3598
|
+
<div part="dialog-trigger">
|
3599
|
+
<slot></slot>
|
3600
|
+
</div>
|
3601
|
+
`}};Dt.styles=[l.css``,c],Dt=Qs([d.customElement("rtg-dialog-trigger")],Dt);var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,Cr=(n,e,r,o)=>{for(var t=o>1?void 0:o?ti(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ei(e,r,t),t};const ri="open",oi="closed";a.Dialog=class extends l.LitElement{constructor(){super(...arguments),this.state=oi}get _content(){var o;const e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof a.DialogContent)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.state)}render(){return l.html`
|
3598
3602
|
<div rtgdlg-root part="dialog">
|
3599
|
-
${this.state===
|
3603
|
+
${this.state===ri?l.html` <rtg-dialog-overlay></rtg-dialog-overlay>`:l.nothing}
|
3600
3604
|
<slot></slot>
|
3601
3605
|
</div>
|
3602
|
-
`}},a.Dialog.styles=[l.css``,c],
|
3606
|
+
`}},a.Dialog.styles=[l.css``,c],Cr([d.property({attribute:"data-state",type:String})],a.Dialog.prototype,"state",2),a.Dialog=Cr([d.customElement("rtg-dialog")],a.Dialog);var ni=Object.defineProperty,si=Object.getOwnPropertyDescriptor,kt=(n,e,r,o)=>{for(var t=o>1?void 0:o?si(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ni(e,r,t),t};a.DropdownMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Ge,this.isOpen=!1}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof a.DropdownMenu);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-dropdown-menu-content"),o=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(o!=null&&o.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
3603
3607
|
<div
|
3604
3608
|
part="dropdown-menu-content"
|
3605
3609
|
class="flex h-full flex-col max-h-[300px] overflow-y-auto overflow-x-hidden rounded-md bg-popover text-popover-foreground border shadow-md"
|
@@ -3607,10 +3611,10 @@ body {
|
|
3607
3611
|
>
|
3608
3612
|
<slot></slot>
|
3609
3613
|
</div>
|
3610
|
-
`}},a.DropdownMenuContent.styles=[l.css``,c]
|
3614
|
+
`}},a.DropdownMenuContent.styles=[l.css``,c],kt([d.property({attribute:"data-state",type:String})],a.DropdownMenuContent.prototype,"state",2),kt([d.state()],a.DropdownMenuContent.prototype,"isOpen",2),a.DropdownMenuContent=kt([d.customElement("rtg-dropdown-menu-content")],a.DropdownMenuContent);var ii=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,Se=(n,e,r,o)=>{for(var t=o>1?void 0:o?ai(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ii(e,r,t),t};a.DropdownMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.DropdownMenuItem._counter++}`:this._id=`rtgcmdrxgxli${a.DropdownMenuItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}render(){return l.html` ${this._hidden==="true"?l.nothing:l.html`
|
3611
3615
|
<div
|
3612
3616
|
part="dropdown-menu-item"
|
3613
|
-
class="${
|
3617
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",this.className)}"
|
3614
3618
|
@mouseover="${this.handleMouseEvent}"
|
3615
3619
|
@mouseleave="${this.handleMouseEvent}"
|
3616
3620
|
@focus="${this.handleMouseEvent}"
|
@@ -3624,10 +3628,10 @@ body {
|
|
3624
3628
|
>
|
3625
3629
|
<slot></slot>
|
3626
3630
|
</div>
|
3627
|
-
`}`}},a.DropdownMenuItem._counter=0,a.DropdownMenuItem.styles=[l.css``,c],
|
3631
|
+
`}`}},a.DropdownMenuItem._counter=0,a.DropdownMenuItem.styles=[l.css``,c],Se([d.property({type:String})],a.DropdownMenuItem.prototype,"_id",2),Se([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuItem.prototype,"_hidden",2),Se([d.property({attribute:"data-value",type:String})],a.DropdownMenuItem.prototype,"value",1),Se([d.property({type:Boolean})],a.DropdownMenuItem.prototype,"selected",2),a.DropdownMenuItem=Se([d.customElement("rtg-dropdown-menu-item")],a.DropdownMenuItem);var li=Object.defineProperty,di=Object.getOwnPropertyDescriptor,re=(n,e,r,o)=>{for(var t=o>1?void 0:o?di(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&li(e,r,t),t};a.DropdownMenuRadioItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.DropdownMenuRadioItem._counter++}`:this._id=`rtgcmdrxgxli${a.DropdownMenuRadioItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
3628
3632
|
<div
|
3629
3633
|
part="dropdown-menu-radio"
|
3630
|
-
class="${
|
3634
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
3631
3635
|
@click=${this.toggleChecked}
|
3632
3636
|
@mouseover="${this.handleMouseEvent}"
|
3633
3637
|
@mouseleave="${this.handleMouseEvent}"
|
@@ -3643,7 +3647,7 @@ body {
|
|
3643
3647
|
<span
|
3644
3648
|
class="icon-space absolute left-2 flex items-center justify-center"
|
3645
3649
|
>
|
3646
|
-
${this.checked?l.html` ${
|
3650
|
+
${this.checked?l.html` ${pt()} `:l.nothing}
|
3647
3651
|
</span>
|
3648
3652
|
<slot></slot>
|
3649
3653
|
</div>
|
@@ -3653,18 +3657,18 @@ body {
|
|
3653
3657
|
height: 16px;
|
3654
3658
|
display: inline-block;
|
3655
3659
|
}
|
3656
|
-
`,c],re([d.property({type:String})],a.DropdownMenuRadioItem.prototype,"_id",2),re([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuRadioItem.prototype,"_hidden",2),re([d.property({attribute:"data-value",type:String})],a.DropdownMenuRadioItem.prototype,"value",1),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"selected",2),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"checked",2),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"disabled",2),a.DropdownMenuRadioItem=re([d.customElement("rtg-dropdown-menu-radio-item")],a.DropdownMenuRadioItem);var
|
3660
|
+
`,c],re([d.property({type:String})],a.DropdownMenuRadioItem.prototype,"_id",2),re([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuRadioItem.prototype,"_hidden",2),re([d.property({attribute:"data-value",type:String})],a.DropdownMenuRadioItem.prototype,"value",1),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"selected",2),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"checked",2),re([d.property({type:Boolean})],a.DropdownMenuRadioItem.prototype,"disabled",2),a.DropdownMenuRadioItem=re([d.customElement("rtg-dropdown-menu-radio-item")],a.DropdownMenuRadioItem);var ci=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,It=(n,e,r,o)=>{for(var t=o>1?void 0:o?ui(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ci(e,r,t),t};a.DropdownMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${a.DropdownMenuSeparator._counter++}`:this._id=`rtgcmdrxlxs${a.DropdownMenuSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3657
3661
|
<div
|
3658
3662
|
part="dropdown-menu-seperator"
|
3659
|
-
class="${
|
3663
|
+
class="${p("-mx-1 h-px bg-border",this.className)}"
|
3660
3664
|
rtgcmd-separator
|
3661
3665
|
role="separator"
|
3662
3666
|
id="${this.identifier}"
|
3663
3667
|
></div>
|
3664
|
-
`}`}},a.DropdownMenuSeparator._counter=0,a.DropdownMenuSeparator.styles=[l.css``,c],
|
3668
|
+
`}`}},a.DropdownMenuSeparator._counter=0,a.DropdownMenuSeparator.styles=[l.css``,c],It([d.property({type:String})],a.DropdownMenuSeparator.prototype,"_id",2),It([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuSeparator.prototype,"_hidden",2),a.DropdownMenuSeparator=It([d.customElement("rtg-dropdown-menu-separator")],a.DropdownMenuSeparator);var pi=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,oe=(n,e,r,o)=>{for(var t=o>1?void 0:o?hi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&pi(e,r,t),t};a.DropdownMenuCheckboxItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.DropdownMenuCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${a.DropdownMenuCheckboxItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return l.html`
|
3665
3669
|
<div
|
3666
3670
|
part="dropdown-menu-item"
|
3667
|
-
class="${
|
3671
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
3668
3672
|
@click=${this.toggleChecked}
|
3669
3673
|
@mouseover="${this.handleMouseEvent}"
|
3670
3674
|
@mouseleave="${this.handleMouseEvent}"
|
@@ -3701,7 +3705,7 @@ body {
|
|
3701
3705
|
height: 16px;
|
3702
3706
|
display: inline-block;
|
3703
3707
|
}
|
3704
|
-
`,c],oe([d.property({type:String})],a.DropdownMenuCheckboxItem.prototype,"_id",2),oe([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuCheckboxItem.prototype,"_hidden",2),oe([d.property({attribute:"data-value",type:String})],a.DropdownMenuCheckboxItem.prototype,"value",1),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"selected",2),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"checked",2),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"disabled",2),a.DropdownMenuCheckboxItem=oe([d.customElement("rtg-dropdown-menu-checkbox-item")],a.DropdownMenuCheckboxItem);var
|
3708
|
+
`,c],oe([d.property({type:String})],a.DropdownMenuCheckboxItem.prototype,"_id",2),oe([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuCheckboxItem.prototype,"_hidden",2),oe([d.property({attribute:"data-value",type:String})],a.DropdownMenuCheckboxItem.prototype,"value",1),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"selected",2),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"checked",2),oe([d.property({type:Boolean})],a.DropdownMenuCheckboxItem.prototype,"disabled",2),a.DropdownMenuCheckboxItem=oe([d.customElement("rtg-dropdown-menu-checkbox-item")],a.DropdownMenuCheckboxItem);var mi=Object.defineProperty,gi=Object.getOwnPropertyDescriptor,Ye=(n,e,r,o)=>{for(var t=o>1?void 0:o?gi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&mi(e,r,t),t};a.DropdownMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${a.DropdownMenuGroup._counter++}`:this._id=`rtgcmdrxlxg${a.DropdownMenuGroup._counter++}`,this._id}render(){const e="overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground";return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3705
3709
|
<div
|
3706
3710
|
part="dropdown-menu-group"
|
3707
3711
|
class="${e}"
|
@@ -3724,7 +3728,7 @@ body {
|
|
3724
3728
|
<slot></slot>
|
3725
3729
|
</div>
|
3726
3730
|
</div>
|
3727
|
-
`}`}},a.DropdownMenuGroup._counter=0,a.DropdownMenuGroup.styles=[l.css``,c],
|
3731
|
+
`}`}},a.DropdownMenuGroup._counter=0,a.DropdownMenuGroup.styles=[l.css``,c],Ye([d.property({type:String})],a.DropdownMenuGroup.prototype,"heading",2),Ye([d.property({attribute:"id",type:String})],a.DropdownMenuGroup.prototype,"_id",2),Ye([d.property({attribute:"aria-hidden",type:String})],a.DropdownMenuGroup.prototype,"_hidden",2),a.DropdownMenuGroup=Ye([d.customElement("rtg-dropdown-menu-group")],a.DropdownMenuGroup);var fi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,$r=(n,e,r,o)=>{for(var t=o>1?void 0:o?bi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&fi(e,r,t),t};a.DropdownMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var o;const r=e.target;(o=this.shadowRoot)!=null&&o.contains(r)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.stopPropagation(),this.isOpen=!this.isOpen}get _content(){var o;const e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof a.DropdownMenuContent)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-dropdown-menu-radio-item").forEach(r=>{r!==e.target&&(r.checked=!1)})}render(){return l.html`
|
3728
3732
|
<div part="dropdown-menu">
|
3729
3733
|
<div>
|
3730
3734
|
<slot @click="${this.toggleDropdown}"></slot>
|
@@ -3733,15 +3737,15 @@ body {
|
|
3733
3737
|
<slot></slot>
|
3734
3738
|
</div>
|
3735
3739
|
</div>
|
3736
|
-
`}},a.DropdownMenu.styles=[l.css``,c]
|
3740
|
+
`}},a.DropdownMenu.styles=[l.css``,c],$r([d.state()],a.DropdownMenu.prototype,"isOpen",2),a.DropdownMenu=$r([d.customElement("rtg-dropdown-menu")],a.DropdownMenu);var vi=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,Ke=(n,e,r,o)=>{for(var t=o>1?void 0:o?wi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&vi(e,r,t),t};let ne=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.state="close",this.isOpen=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("mouseenter",this.handleHoverEnter),document.addEventListener("mouseleave",this.handleHoverEnter)}disconnectedCallback(){document.removeEventListener("mouseleave",this.handleHoverEnter),document.removeEventListener("mouseenter",this.handleHoverEnter),super.disconnectedCallback()}updated(n){super.updated(n),this.state==="open"?this.isOpen=!0:this.isOpen=!1}handleHoverEnter(n){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("rtg-hover-card-content");e&&!e.contains(n.target)&&(this.isOpen=!1)}render(){return l.html`
|
3737
3741
|
<div
|
3738
3742
|
part="hover-card-content"
|
3739
|
-
class="${
|
3743
|
+
class="${p("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",this.twClass)}"
|
3740
3744
|
style="display: ${this.isOpen?"block":"none"};width:360px"
|
3741
3745
|
>
|
3742
3746
|
<slot></slot>
|
3743
3747
|
</div>
|
3744
|
-
`}};ne.styles=[l.css``,c],
|
3748
|
+
`}};ne.styles=[l.css``,c],Ke([d.property({type:String})],ne.prototype,"twClass",2),Ke([d.property({attribute:"data-state",type:String})],ne.prototype,"state",2),Ke([d.state()],ne.prototype,"isOpen",2),ne=Ke([d.customElement("rtg-hover-card-content")],ne);var yi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,Lt=(n,e,r,o)=>{for(var t=o>1?void 0:o?xi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&yi(e,r,t),t};let Me=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.isOpen=!1}handleMouseEnter(){this.isOpen=!0}handleMouseLeave(){this.isOpen=!1}get _content(){var r;const n=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=n==null?void 0:n.assignedElements();if(e){for(let o=0;o<e.length;o++)if(e[o]instanceof ne)return e[o]}return null}updated(n){super.updated(n);const e=this._content;e&&(e.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("mouseenter",this.handleMouseEnter),document.addEventListener("mouseleave",this.handleMouseLeave)}disconnectedCallback(){document.removeEventListener("mouseleave",this.handleMouseLeave),document.removeEventListener("mouseenter",this.handleMouseEnter),super.disconnectedCallback()}render(){return l.html`
|
3745
3749
|
<div part="hover-card" class="${this.twClass}">
|
3746
3750
|
<div>
|
3747
3751
|
<slot
|
@@ -3753,7 +3757,7 @@ body {
|
|
3753
3757
|
<slot></slot>
|
3754
3758
|
</div>
|
3755
3759
|
</div>
|
3756
|
-
`}};
|
3760
|
+
`}};Me.styles=[l.css``,c],Lt([d.property({type:String})],Me.prototype,"twClass",2),Lt([d.state()],Me.prototype,"isOpen",2),Me=Lt([d.customElement("rtg-hover-card")],Me);const Ci="flex h-8 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 input-base";var $i=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,se=(n,e,r,o)=>{for(var t=o>1?void 0:o?_i(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&$i(e,r,t),t};a.Input=class extends b{constructor(){super(),this.disabled=!1,this.type="text",this.placeholder="",this.defaultValue="",this.value="",this.twClass="",this.value=this.value||this.defaultValue}firstUpdated(e){const r=["--input-border-radius","--input-padding"];this.applyCustomClass(r,"input","input-base"),this.type!=="file"&&this.defaultValue&&(this.value=this.defaultValue)}handleInputChange(e){const r=e.target;r.type==="file"?this.value=r.files?r.files[0].name:"":this.value=r.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}render(){const e=this.getFilteredAttributes();return l.html`
|
3757
3761
|
<input
|
3758
3762
|
part="input"
|
3759
3763
|
type="${this.type}"
|
@@ -3762,20 +3766,20 @@ body {
|
|
3762
3766
|
.value=${this.type!=="file"?this.value:""}
|
3763
3767
|
@change="${this.handleInputChange}"
|
3764
3768
|
${x(e)}
|
3765
|
-
class="${
|
3769
|
+
class="${p(Ci,this.twClass)}"
|
3766
3770
|
/>
|
3767
|
-
`}},a.Input.styles=[l.css``,c],se([d.property({type:Boolean})],a.Input.prototype,"disabled",2),se([d.property({type:String})],a.Input.prototype,"type",2),se([d.property({type:String})],a.Input.prototype,"placeholder",2),se([d.property({type:String})],a.Input.prototype,"defaultValue",2),se([d.property({type:String})],a.Input.prototype,"value",2),se([d.property({type:String})],a.Input.prototype,"twClass",2),a.Input=se([d.customElement("rtg-input")],a.Input);const
|
3771
|
+
`}},a.Input.styles=[l.css``,c],se([d.property({type:Boolean})],a.Input.prototype,"disabled",2),se([d.property({type:String})],a.Input.prototype,"type",2),se([d.property({type:String})],a.Input.prototype,"placeholder",2),se([d.property({type:String})],a.Input.prototype,"defaultValue",2),se([d.property({type:String})],a.Input.prototype,"value",2),se([d.property({type:String})],a.Input.prototype,"twClass",2),a.Input=se([d.customElement("rtg-input")],a.Input);const Oi=z("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");var Ei=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,_r=(n,e,r,o)=>{for(var t=o>1?void 0:o?Pi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ei(e,r,t),t};let ge=class extends b{constructor(){super(...arguments),this.for=""}firstUpdated(n){const e=["--label-text-color,--label-padding"];this.applyCustomClass(e,"label","label-base")}_onClick(n){var r;if(n.defaultPrevented)return;const e=(r=this.shadowRoot)==null?void 0:r.getElementById(this.for);e&&e.click()}getAttributesToExclude(){return["for","data-testid"]}render(){const n=this.getFilteredAttributes();return l.html`
|
3768
3772
|
<label
|
3769
|
-
${x(
|
3773
|
+
${x(n)}
|
3770
3774
|
part="label"
|
3771
3775
|
for="${this.for}"
|
3772
3776
|
@click="${this._onClick}"
|
3773
3777
|
@keydown="${this._onClick}"
|
3774
|
-
class="${
|
3778
|
+
class="${p(ge.labelVariants({className:this.className}))}"
|
3775
3779
|
>
|
3776
3780
|
<slot></slot>
|
3777
3781
|
</label>
|
3778
|
-
`}};
|
3782
|
+
`}};ge.labelVariants=Oi,ge.styles=[l.css`
|
3779
3783
|
:root {
|
3780
3784
|
--label-text-color: inherit;
|
3781
3785
|
--label-padding: inherit;
|
@@ -3784,15 +3788,15 @@ body {
|
|
3784
3788
|
color: var(--label-text-color) !important;
|
3785
3789
|
padding: var(--label-padding) !important;
|
3786
3790
|
}
|
3787
|
-
`,c],
|
3788
|
-
<div part="popover-content" class="${
|
3791
|
+
`,c],_r([d.property({type:String})],ge.prototype,"for",2),ge=_r([d.customElement("rtg-label")],ge);const Si=z("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none transition-transform transition-opacity",{variants:{state:{open:"opacity-100 scale-100 duration-500",closed:"opacity-0 scale-95 duration-500"},side:{bottom:"translate-y-0",left:"translate-x-0",right:"translate-x-0",top:"translate-y-0"}},defaultVariants:{state:"closed",side:"bottom"}}),Mi=z("fixed",{variants:{state:{open:"opacity-100 scale-100 duration-500",closed:"opacity-0 scale-95 duration-500"},side:{bottom:"translate-y-0",left:"translate-x-0",right:"translate-x-0",top:"translate-y-0"}},defaultVariants:{state:"closed",side:"bottom"}});var Di=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,At=(n,e,r,o)=>{for(var t=o>1?void 0:o?ki(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Di(e,r,t),t};a.PopoverContent=class extends l.LitElement{constructor(){super(...arguments),this.enableDefaultStyle=!0,this.side="bottom"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof a.Popover);)e=e.parentElement;return e}handleClickOutside(e){var o,t;const r=(o=this.shadowRoot)==null?void 0:o.querySelector("slot");if(r&&!((t=r.assignedElements({flatten:!0})[0])!=null&&t.contains(e.target))){const i=this._popover;i.isOpen=!1}}firstUpdated(e){window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var r;(r=this._popover)!=null&&r.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}render(){const e=this.enableDefaultStyle?Si({state:"open",side:this.side}):Mi({state:"open",side:this.side});return l.html`
|
3792
|
+
<div part="popover-content" class="${p(e)}">
|
3789
3793
|
<slot></slot>
|
3790
3794
|
</div>
|
3791
|
-
`}},a.PopoverContent.styles=[l.css``,c],
|
3795
|
+
`}},a.PopoverContent.styles=[l.css``,c],At([d.property({type:Boolean})],a.PopoverContent.prototype,"enableDefaultStyle",2),At([d.property({type:String})],a.PopoverContent.prototype,"side",2),a.PopoverContent=At([d.customElement("rtg-popover-content")],a.PopoverContent);var Ii=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Ai=(n,e,r,o)=>{for(var t=o>1?void 0:o?Li(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ii(e,r,t),t};a.PopoverTrigger=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const e=this._popover;e&&(e.isOpen=!e.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof a.Popover);)e=e.parentElement;return e}firstUpdated(e){var t,s;super.firstUpdated(e);const r=(t=this.shadowRoot)==null?void 0:t.querySelector('slot[name="trigger-button"]'),o=r==null?void 0:r.assignedElements({flatten:!0});o&&o.length>0&&(o[0].click=this.handleClick),(s=this.shadowRoot)==null||s.addEventListener("click",i=>{i.stopPropagation()})}render(){return l.html`
|
3792
3796
|
<div part="popover-trigger" style="width: fit-content;">
|
3793
3797
|
<slot name="trigger-button"></slot>
|
3794
3798
|
</div>
|
3795
|
-
`}},a.PopoverTrigger.styles=[l.css``,c],a.PopoverTrigger=
|
3799
|
+
`}},a.PopoverTrigger.styles=[l.css``,c],a.PopoverTrigger=Ai([d.customElement("rtg-popover-trigger")],a.PopoverTrigger);var Ri=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Or=(n,e,r,o)=>{for(var t=o>1?void 0:o?zi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ri(e,r,t),t};a.Popover=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1}firstUpdated(e){super.firstUpdated(e)}updated(e){super.updated(e)}render(){return l.html`
|
3796
3800
|
<div part="popover">
|
3797
3801
|
<slot
|
3798
3802
|
name="trigger"
|
@@ -3802,8 +3806,8 @@ body {
|
|
3802
3806
|
<slot name="content"></slot>
|
3803
3807
|
</div>
|
3804
3808
|
</div>
|
3805
|
-
`}},a.Popover.styles=[l.css``,c],
|
3806
|
-
<div class="${
|
3809
|
+
`}},a.Popover.styles=[l.css``,c],Or([d.state()],a.Popover.prototype,"isOpen",2),a.Popover=Or([d.customElement("rtg-popover")],a.Popover);const Bi="unChecked";var Ti=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,fe=(n,e,r,o)=>{for(var t=o>1?void 0:o?qi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ti(e,r,t),t};a.RadioGroupItem=class extends l.LitElement{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=Bi}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
3810
|
+
<div class="${p("flex items-center space-x-2")}" part="radio-group-item">
|
3807
3811
|
<button
|
3808
3812
|
type="button"
|
3809
3813
|
role="radio"
|
@@ -3820,7 +3824,7 @@ body {
|
|
3820
3824
|
data-state="checked"
|
3821
3825
|
class="flex items-center justify-center"
|
3822
3826
|
>
|
3823
|
-
${
|
3827
|
+
${So()}
|
3824
3828
|
</span>`:l.nothing}
|
3825
3829
|
</button>
|
3826
3830
|
<label
|
@@ -3830,15 +3834,15 @@ body {
|
|
3830
3834
|
>${this.value}</label
|
3831
3835
|
>
|
3832
3836
|
</div>
|
3833
|
-
`}},a.RadioGroupItem.styles=[l.css``,c],
|
3837
|
+
`}},a.RadioGroupItem.styles=[l.css``,c],fe([d.property({type:Boolean,reflect:!0})],a.RadioGroupItem.prototype,"checked",2),fe([d.property({type:Number})],a.RadioGroupItem.prototype,"tabindex",2),fe([d.property({type:String})],a.RadioGroupItem.prototype,"value",2),fe([d.property({type:String})],a.RadioGroupItem.prototype,"id",2),fe([d.property({attribute:"data-state",type:String})],a.RadioGroupItem.prototype,"state",2),a.RadioGroupItem=fe([d.customElement("rtg-radio-group-item")],a.RadioGroupItem);var Ni=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Er=(n,e,r,o)=>{for(var t=o>1?void 0:o?Gi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ni(e,r,t),t};a.RadioGroup=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("rtg-radio-group-item").forEach(r=>{r!==e.target&&(r.checked=!1)})}render(){return l.html`
|
3834
3838
|
<div
|
3835
3839
|
part="radio-group"
|
3836
|
-
class="${
|
3840
|
+
class="${p("grid gap-2",this.twClass)}"
|
3837
3841
|
style="outline: none;"
|
3838
3842
|
>
|
3839
3843
|
<slot></slot>
|
3840
3844
|
</div>
|
3841
|
-
`}},a.RadioGroup.styles=[l.css``,c],
|
3845
|
+
`}},a.RadioGroup.styles=[l.css``,c],Er([d.property({type:String})],a.RadioGroup.prototype,"twClass",2),a.RadioGroup=Er([d.customElement("rtg-radio-group")],a.RadioGroup);var Fi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,L=(n,e,r,o)=>{for(var t=o>1?void 0:o?Vi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Fi(e,r,t),t};a.SelectItem=class extends b{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(e,r)=>{},this.onMouseOver=(e,r)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const r=new CustomEvent("clicked-select-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(r)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}render(){const e=this.getFilteredAttributes();return l.html`
|
3842
3846
|
<div
|
3843
3847
|
${x(e)}
|
3844
3848
|
@click=${this.handleClick}
|
@@ -3862,10 +3866,10 @@ body {
|
|
3862
3866
|
<span
|
3863
3867
|
class="${this.isSelected?"visible":"invisible"} hs-select-selected:block mr-2"
|
3864
3868
|
>
|
3865
|
-
${
|
3869
|
+
${cr()}
|
3866
3870
|
</span>
|
3867
3871
|
</div>
|
3868
|
-
`}},a.SelectItem.styles=[l.css``,c],
|
3872
|
+
`}},a.SelectItem.styles=[l.css``,c],L([d.property({type:String})],a.SelectItem.prototype,"value",2),L([d.property({type:String})],a.SelectItem.prototype,"key",2),L([d.property({type:Number})],a.SelectItem.prototype,"tabindex",2),L([d.property({type:Boolean})],a.SelectItem.prototype,"isSelected",2),L([d.property({type:Boolean})],a.SelectItem.prototype,"isFocus",2),L([d.property({type:String})],a.SelectItem.prototype,"class",2),L([d.property({type:Number})],a.SelectItem.prototype,"selectItemIndex",2),L([d.property({type:Function})],a.SelectItem.prototype,"onSelect",2),L([d.property({type:Function})],a.SelectItem.prototype,"onMouseOver",2),a.SelectItem=L([d.customElement("rtg-select-item")],a.SelectItem);var Ui=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Rt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Hi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ui(e,r,t),t};a.SelectList=class extends l.LitElement{constructor(){super(...arguments),this.state=Ge,this.isOpen=!1}render(){return l.html`
|
3869
3873
|
<div
|
3870
3874
|
part="select-list"
|
3871
3875
|
class="absolute z-50 w-full max-h-72 p-1 bg-white border border-gray-200 rounded-lg overflow-hidden overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900 dark:border-neutral-700"
|
@@ -3875,22 +3879,22 @@ body {
|
|
3875
3879
|
>
|
3876
3880
|
<slot></slot>
|
3877
3881
|
</div>
|
3878
|
-
`}},a.SelectList.styles=[l.css``,c],
|
3882
|
+
`}},a.SelectList.styles=[l.css``,c],Rt([d.property({attribute:"data-state",type:String})],a.SelectList.prototype,"state",2),Rt([d.state()],a.SelectList.prototype,"isOpen",2),a.SelectList=Rt([d.customElement("rtg-select-list")],a.SelectList);var Xi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,Ki=(n,e,r,o)=>{for(var t=o>1?void 0:o?Yi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Xi(e,r,t),t};a.SelectLabel=class extends l.LitElement{render(){return l.html`
|
3879
3883
|
<span
|
3880
3884
|
part="select-label"
|
3881
|
-
class="${
|
3885
|
+
class="${p("px-4 w-full text-base font-bold",this.className)}"
|
3882
3886
|
>
|
3883
3887
|
<slot></slot>
|
3884
3888
|
</span>
|
3885
|
-
`}},a.SelectLabel.styles=[l.css``,c],a.SelectLabel=
|
3889
|
+
`}},a.SelectLabel.styles=[l.css``,c],a.SelectLabel=Ki([d.customElement("rtg-select-label")],a.SelectLabel);var Wi=Object.defineProperty,Zi=Object.getOwnPropertyDescriptor,zt=(n,e,r,o)=>{for(var t=o>1?void 0:o?Zi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Wi(e,r,t),t};a.SelectSeperator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${a.SelectSeperator._counter++}`:this._id=`rtgcmdrxlxs${a.SelectSeperator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
3886
3890
|
<div
|
3887
|
-
class="${
|
3891
|
+
class="${p("-mx-1 h-px bg-border",this.className)}"
|
3888
3892
|
part="select-separator"
|
3889
3893
|
rtgcmd-separator
|
3890
3894
|
role="separator"
|
3891
3895
|
id="${this.identifier}"
|
3892
3896
|
></div>
|
3893
|
-
`}`}},a.SelectSeperator._counter=0,a.SelectSeperator.styles=[l.css``,c],
|
3897
|
+
`}`}},a.SelectSeperator._counter=0,a.SelectSeperator.styles=[l.css``,c],zt([d.property({type:String})],a.SelectSeperator.prototype,"_id",2),zt([d.property({attribute:"aria-hidden",type:String})],a.SelectSeperator.prototype,"_hidden",2),a.SelectSeperator=zt([d.customElement("rtg-select-separator")],a.SelectSeperator);var Ji=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,ji=(n,e,r,o)=>{for(var t=o>1?void 0:o?Qi(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ji(e,r,t),t};let Bt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(r=>{var o;r.uuid!==((o=this._select)==null?void 0:o.uuid)&&(r.isOpen=!1)});const e=new CustomEvent("trigger-select",{bubbles:!0,composed:!0,detail:{isOpen:!this._select.isOpen}});this.dispatchEvent(e),this._select.isOpen=!this._select.isOpen}}}get _select(){let n=this.parentElement;for(;n&&!(n instanceof a.Select);)n=n.parentElement;return n}firstUpdated(n){var o,t;super.firstUpdated(n);const e=(o=this.shadowRoot)==null?void 0:o.querySelector('slot[name="select-trigger-button"]'),r=e==null?void 0:e.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
3894
3898
|
<button
|
3895
3899
|
type="button"
|
3896
3900
|
part="select-trigger"
|
@@ -3902,9 +3906,9 @@ body {
|
|
3902
3906
|
@click="${this.handleClick}"
|
3903
3907
|
>
|
3904
3908
|
<slot></slot>
|
3905
|
-
${
|
3909
|
+
${ur()}
|
3906
3910
|
</button>
|
3907
|
-
`}};
|
3911
|
+
`}};Bt.styles=[l.css``,c],Bt=ji([d.customElement("rtg-select-trigger")],Bt);var ea=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,Tt=(n,e,r,o)=>{for(var t=o>1?void 0:o?ta(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ea(e,r,t),t};let De=class extends l.LitElement{constructor(){super(...arguments),this.childrenArray=[],this.focusedIndex=0,this.selectedValue=""}get _select(){let n=this.parentElement;for(;n&&!(n instanceof a.Select);)n=n.parentElement;return n}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()}),document.addEventListener("trigger-select",n=>{n.detail.isOpen&&this._select&&this._select.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(e=>{var r;return e.value===((r=this._select)==null?void 0:r.selectedValue)}),this.requestUpdate())})}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}firstUpdated(n){document.addEventListener("keydown",this.handleKeyDown.bind(this)),this.childrenArray=Array.from(this.children).filter(e=>e.tagName.toLowerCase()==="rtg-select-item"),this.requestUpdate()}updated(n){var e;(e=this._select)!=null&&e.isOpen||document.removeEventListener("keydown",this.handleKeyDown.bind(this))}onSelectedValue(n,e){this.focusedIndex=e,this.selectedValue=n}handleKeyDown(n){var e;if(n.preventDefault(),(e=this._select)!=null&&e.isOpen)switch(n.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length;break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<this.childrenArray.length){const r=new CustomEvent("clicked-select-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.childrenArray[this.focusedIndex].value}});this.dispatchEvent(r)}break}}handleMouseOver(n,e){n.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
3908
3912
|
<div
|
3909
3913
|
part="select-group"
|
3910
3914
|
class="absolute z-50 w-full max-h-72 mt-1 px-1 py-2 bg-white border border-gray-200 rounded-md overflow-hidden overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900 dark:border-neutral-700
|
@@ -3912,42 +3916,42 @@ body {
|
|
3912
3916
|
data-hs-combo-box-output=""
|
3913
3917
|
>
|
3914
3918
|
<slot name="label"></slot>
|
3915
|
-
${this.childrenArray.map((
|
3916
|
-
@mouseover="${
|
3919
|
+
${this.childrenArray.map((n,e)=>{var r;return l.html`<rtg-select-item
|
3920
|
+
@mouseover="${o=>this.handleMouseOver(o,e)}"
|
3917
3921
|
.onSelect=${this.onSelectedValue}
|
3918
|
-
data-hs-select-value=${
|
3922
|
+
data-hs-select-value=${n}
|
3919
3923
|
tabIndex=${e}
|
3920
|
-
.value=${
|
3924
|
+
.value=${n.value}
|
3921
3925
|
.selectItemIndex="${e}"
|
3922
3926
|
.isFocus="${e===this.focusedIndex}"
|
3923
|
-
.isSelected="${
|
3927
|
+
.isSelected="${n.value.toLowerCase()===((r=this._select)==null?void 0:r.selectedValue.toLowerCase())}"
|
3924
3928
|
>
|
3925
|
-
${
|
3929
|
+
${n.textContent}
|
3926
3930
|
</rtg-select-item> `})}
|
3927
3931
|
</div>
|
3928
|
-
`}};
|
3932
|
+
`}};De.styles=[l.css``,c],Tt([d.state()],De.prototype,"focusedIndex",2),Tt([d.state()],De.prototype,"selectedValue",2),De=Tt([d.customElement("rtg-select-group")],De);var ra=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,Pr=(n,e,r,o)=>{for(var t=o>1?void 0:o?oa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ra(e,r,t),t};let We=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(r=>{var o;r.uuid!==((o=this._select)==null?void 0:o.uuid)&&(r.isOpen=!1)});const e=new CustomEvent("trigger-select",{bubbles:!0,composed:!0,detail:{isOpen:!this._select.isOpen}});this.dispatchEvent(e),this._select.isOpen=!this._select.isOpen}},this.renderLabel=()=>this._select&&this._select.selectedValue.length>0?this._select.selectedValue:this.placeholder}get _select(){let n=this.parentElement;for(;n&&!(n instanceof a.Select);)n=n.parentElement;return n}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}firstUpdated(n){var o,t;super.firstUpdated(n);const e=(o=this.shadowRoot)==null?void 0:o.querySelector('slot[name="select-trigger-button"]'),r=e==null?void 0:e.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
3929
3933
|
<span
|
3930
3934
|
part="select-value"
|
3931
3935
|
class="flex line-clamp-1 w-[180px]"
|
3932
3936
|
@click=${this.handleClick}
|
3933
3937
|
>${this.renderLabel()}</span
|
3934
3938
|
>
|
3935
|
-
`}};
|
3939
|
+
`}};We.styles=[l.css``,c],Pr([d.property({type:String})],We.prototype,"placeholder",2),We=Pr([d.customElement("rtg-select-value")],We);var na=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,Ze=(n,e,r,o)=>{for(var t=o>1?void 0:o?sa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&na(e,r,t),t};a.Select=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.selectedValue="",this.uuid=ar(),this.handleClickOutside=e=>{var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("[data-select-uuid]"),o=e.target;if(!o.tagName.includes("RTG-SELECT")){if(!r||!r.contains(o))this.isOpen=!1;else if(!((s=o.shadowRoot)==null?void 0:s.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-select-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}updated(e){super.updated(e),e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}render(){return l.html`
|
3936
3940
|
<div part="select" class="relative" data-select-uuid=${this.uuid}>
|
3937
3941
|
<slot name="trigger"></slot>
|
3938
3942
|
<div ?hidden="${!this.isOpen}">
|
3939
3943
|
<slot name="content"></slot>
|
3940
3944
|
</div>
|
3941
3945
|
</div>
|
3942
|
-
`}},a.Select.styles=[l.css``,c],
|
3946
|
+
`}},a.Select.styles=[l.css``,c],Ze([d.state()],a.Select.prototype,"isOpen",2),Ze([d.state()],a.Select.prototype,"selectedValue",2),Ze([d.state()],a.Select.prototype,"uuid",2),a.Select=Ze([d.customElement("rtg-select")],a.Select);var Je=(n=>(n.VERTICAL="vertical",n.HORIZONTAL="horizontal",n))(Je||{}),ia=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,qt=(n,e,r,o)=>{for(var t=o>1?void 0:o?aa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ia(e,r,t),t};a.Separator=class extends b{constructor(){super(...arguments),this.orientation=Je.HORIZONTAL,this.twClass=""}getAttributesToExclude(){return["variant"]}render(){const e=this.getFilteredAttributes();return l.html` <div
|
3943
3947
|
part="separator"
|
3944
3948
|
${x(e)}
|
3945
|
-
class=${
|
3949
|
+
class=${p(this.orientation===Je.HORIZONTAL?"shrink-0 bg-border w-full h-[1px] my-4":"shrink-0 bg-border h-full w-[1px]",this.twClass)}
|
3946
3950
|
role="none"
|
3947
3951
|
>
|
3948
|
-
${this.orientation!==
|
3949
|
-
</div>`}},a.Separator.styles=[l.css``,c],
|
3950
|
-
<div class="${
|
3952
|
+
${this.orientation!==Je.HORIZONTAL&&" "}
|
3953
|
+
</div>`}},a.Separator.styles=[l.css``,c],qt([d.property({type:String})],a.Separator.prototype,"orientation",2),qt([d.property({type:String})],a.Separator.prototype,"twClass",2),a.Separator=qt([d.customElement("rtg-separator")],a.Separator);var la=Object.defineProperty,da=Object.getOwnPropertyDescriptor,Qe=(n,e,r,o)=>{for(var t=o>1?void 0:o?da(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&la(e,r,t),t};a.Switch=class extends l.LitElement{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.twClass=""}_toggleChecked(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{detail:this.checked})))}render(){return l.html`
|
3954
|
+
<div class="${p("flex items-center space-x-2",this.twClass)}">
|
3951
3955
|
<div
|
3952
3956
|
part="switch"
|
3953
3957
|
@click="${this._toggleChecked}"
|
@@ -3955,7 +3959,7 @@ body {
|
|
3955
3959
|
role="switch"
|
3956
3960
|
aria-checked="${this.checked}"
|
3957
3961
|
aria-disabled="${this.disabled}"
|
3958
|
-
class="${
|
3962
|
+
class="${p("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background")}"
|
3959
3963
|
style="background-color:${this.checked?"#000000":"#e0e0e0"};cursor:${this.disabled?"default":""}"
|
3960
3964
|
>
|
3961
3965
|
<div
|
@@ -3967,11 +3971,11 @@ body {
|
|
3967
3971
|
</div>
|
3968
3972
|
<slot></slot>
|
3969
3973
|
</div>
|
3970
|
-
`}},a.Switch.styles=[l.css``,c],
|
3974
|
+
`}},a.Switch.styles=[l.css``,c],Qe([d.property({type:Boolean,reflect:!0})],a.Switch.prototype,"checked",2),Qe([d.property({type:Boolean})],a.Switch.prototype,"disabled",2),Qe([d.property({type:String})],a.Switch.prototype,"twClass",2),a.Switch=Qe([d.customElement("rtg-switch")],a.Switch);const ca="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50";var ua=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,Y=(n,e,r,o)=>{for(var t=o>1?void 0:o?pa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ua(e,r,t),t};let A=class extends b{constructor(){super(),this.disabled=!1,this.placeholder="",this.defaultValue="",this.rows="4",this.cols="50",this.value="",this.twCLass="",this.value=this.value||this.defaultValue}firstUpdated(n){this.value=this.defaultValue}handleInputChange(n){const e=n.target;this.value=e.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}render(){const n=this.getFilteredAttributes();return l.html`
|
3971
3975
|
<textarea
|
3972
3976
|
part="textarea"
|
3973
|
-
${x(
|
3974
|
-
class="${
|
3977
|
+
${x(n)}
|
3978
|
+
class="${p(ca,this.className,this.twCLass)}"
|
3975
3979
|
placeholder="${this.placeholder}"
|
3976
3980
|
.value=${this.value}
|
3977
3981
|
.rows="${this.rows}"
|
@@ -3979,12 +3983,12 @@ body {
|
|
3979
3983
|
?disabled=${this.disabled}
|
3980
3984
|
@change="${this.handleInputChange}"
|
3981
3985
|
/>
|
3982
|
-
`}};A.styles=[c],Y([d.property({type:Boolean})],A.prototype,"disabled",2),Y([d.property({type:String})],A.prototype,"placeholder",2),Y([d.property({type:String})],A.prototype,"defaultValue",2),Y([d.property({type:String})],A.prototype,"rows",2),Y([d.property({type:String})],A.prototype,"cols",2),Y([d.property({type:String})],A.prototype,"value",2),Y([d.property({type:String})],A.prototype,"twCLass",2),A=Y([d.customElement("rtg-textarea")],A);const
|
3986
|
+
`}};A.styles=[c],Y([d.property({type:Boolean})],A.prototype,"disabled",2),Y([d.property({type:String})],A.prototype,"placeholder",2),Y([d.property({type:String})],A.prototype,"defaultValue",2),Y([d.property({type:String})],A.prototype,"rows",2),Y([d.property({type:String})],A.prototype,"cols",2),Y([d.property({type:String})],A.prototype,"value",2),Y([d.property({type:String})],A.prototype,"twCLass",2),A=Y([d.customElement("rtg-textarea")],A);const ha=z("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ma="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",ga="absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600";var fa=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,Nt=(n,e,r,o)=>{for(var t=o>1?void 0:o?ba(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&fa(e,r,t),t};const Sr="closed";let K=class extends l.LitElement{constructor(){super(...arguments),this.variant="default",this.state=Sr,this.handleCloseButtonClick=n=>{n.stopPropagation(),this.state=Sr,this.dispatchEvent(new CustomEvent("close-toast",{bubbles:!0,composed:!0}))}}render(){return l.html`
|
3983
3987
|
${this.state==="open"?l.html`<ol
|
3984
3988
|
part="toast-view-port"
|
3985
3989
|
tabindex="-1"
|
3986
|
-
@click="${
|
3987
|
-
class="${
|
3990
|
+
@click="${n=>n.stopPropagation()}"
|
3991
|
+
class="${p(ma,this.className)}"
|
3988
3992
|
>
|
3989
3993
|
<li
|
3990
3994
|
role="status"
|
@@ -3993,27 +3997,27 @@ body {
|
|
3993
3997
|
tabindex="0"
|
3994
3998
|
data-state="${this.state}"
|
3995
3999
|
data-swipe-direction="right"
|
3996
|
-
class="${
|
4000
|
+
class="${p(K.toastVariants({variant:this.variant,className:this.className}),this.className)}"
|
3997
4001
|
data-radix-collection-item=""
|
3998
4002
|
style="user-select: none; touch-action: none;"
|
3999
4003
|
>
|
4000
4004
|
<slot></slot>
|
4001
4005
|
<button
|
4002
4006
|
type="button"
|
4003
|
-
class="${
|
4007
|
+
class="${ga}"
|
4004
4008
|
toast-close=""
|
4005
4009
|
data-radix-toast-announce-exclude=""
|
4006
|
-
@click="${
|
4010
|
+
@click="${n=>this.handleCloseButtonClick(n)}"
|
4007
4011
|
>
|
4008
|
-
${
|
4012
|
+
${Mo()}
|
4009
4013
|
</button>
|
4010
4014
|
</li>
|
4011
4015
|
</ol>`:l.nothing}
|
4012
|
-
`}};K.toastVariants=
|
4016
|
+
`}};K.toastVariants=ha,K.styles=[l.css`
|
4013
4017
|
button[toast-close] {
|
4014
4018
|
pointer-events: auto;
|
4015
4019
|
}
|
4016
|
-
`,c],
|
4020
|
+
`,c],Nt([d.property({type:String})],K.prototype,"variant",2),Nt([d.property({attribute:"data-state",type:String})],K.prototype,"state",2),K=Nt([d.customElement("rtg-toast-view-port")],K);var va=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,Gt=(n,e,r,o)=>{for(var t=o>1?void 0:o?wa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&va(e,r,t),t};let ke=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.isOpen=!1}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1})}get _content(){var r;const n=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=n==null?void 0:n.assignedElements();if(e){for(let o=0;o<e.length;o++)if(e[o]instanceof K)return e[o]}return null}updated(n){super.updated(n);const e=this._content;e&&(e.dataset.state=this.isOpen?"open":"closed")}render(){return l.html`
|
4017
4021
|
<div class="{${this.twClass}}" part="toast">
|
4018
4022
|
<div>
|
4019
4023
|
<slot @click="${this.onClick}"></slot>
|
@@ -4021,11 +4025,11 @@ body {
|
|
4021
4025
|
<slot></slot>
|
4022
4026
|
<div></div>
|
4023
4027
|
</div>
|
4024
|
-
`}};
|
4028
|
+
`}};ke.styles=[l.css``,c],Gt([d.property({type:String})],ke.prototype,"twClass",2),Gt([d.state()],ke.prototype,"isOpen",2),ke=Gt([d.customElement("rtg-toast")],ke);var Mr=(n=>(n.SMALL="sm",n.MEDIUM="md",n.LARGE="lg",n))(Mr||{}),Dr=(n=>(n.DEFAULT="default",n.OUTLINE="outline",n))(Dr||{});const ya=z("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground bg-transparent h-10 px-3",{variants:{variant:{default:" hover:bg-muted hover:text-muted-foreground",outline:" border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-9 px-2.5",md:"h-10 px-3",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"sm"}});var xa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,ie=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ca(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&xa(e,r,t),t};a.Toggle=class extends b{constructor(){super(...arguments),this.disabled=!1,this.twCLass="",this.checked=!1,this.required=!1,this.variant=Dr.DEFAULT,this.size=Mr.SMALL}getAttributesToExclude(){return["disabled","checked","variant","size","required"]}toggle(){this.disabled||(this.checked=!this.checked)}render(){const e=this.getFilteredAttributes();return D.html`
|
4025
4029
|
<button
|
4026
4030
|
type="button"
|
4027
4031
|
part="toggle"
|
4028
|
-
class="${
|
4032
|
+
class="${p(a.Toggle.toggleVariants({variant:this.variant,size:this.size,className:this.className}))} ${this.twCLass}"
|
4029
4033
|
aria-pressed=${this.checked}
|
4030
4034
|
data-state="${this.checked?"on":"off"}"
|
4031
4035
|
aria-label="Toggle bold"
|
@@ -4036,7 +4040,60 @@ body {
|
|
4036
4040
|
>
|
4037
4041
|
<slot></slot>
|
4038
4042
|
</button>
|
4039
|
-
`}},a.Toggle.styles=[c],a.Toggle.toggleVariants=
|
4043
|
+
`}},a.Toggle.styles=[c],a.Toggle.toggleVariants=ya,ie([d.property({type:Boolean})],a.Toggle.prototype,"disabled",2),ie([d.property({type:String})],a.Toggle.prototype,"twCLass",2),ie([d.property({attribute:!0,type:Boolean,reflect:!0})],a.Toggle.prototype,"checked",2),ie([d.property({attribute:!0,type:Boolean,reflect:!0})],a.Toggle.prototype,"required",2),ie([d.property({attribute:!0,type:String})],a.Toggle.prototype,"variant",2),ie([d.property({attribute:!0,type:String})],a.Toggle.prototype,"size",2),a.Toggle=ie([d.customElement("rtg-toggle")],a.Toggle);const $a=z("inline-flex items-center justify-center rounded-sm text-sm font-medium ",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 px-4 py-2",sm:"h-7 rounded-sm px-3 text-xs",lg:"h-9 rounded-sm px-8",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}});var _a=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,be=(n,e,r,o)=>{for(var t=o>1?void 0:o?Oa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&_a(e,r,t),t};let q=class extends l.LitElement{constructor(){super(...arguments),this.click=()=>{},this.disabled=!1,this.isCustomClass=!1,this.variant="default",this.size="default"}render(){return l.html`
|
4044
|
+
<main>
|
4045
|
+
<div class="flex flex-nowrap">
|
4046
|
+
sample demo
|
4047
|
+
<div class="flex flex-wrap space-x-4 gap-5 mx-3">
|
4048
|
+
<rtg-dialog>
|
4049
|
+
<rtg-dialog-trigger>
|
4050
|
+
<rtg-button>Open Dialog Smple</rtg-button>
|
4051
|
+
</rtg-dialog-trigger>
|
4052
|
+
<rtg-dialog-content>
|
4053
|
+
<rtg-dialog-header title="Are you absolutely sure?" description="This action cannot be undone. This will permanently delete your
|
4054
|
+
content.">
|
4055
|
+
<rtg-dialog-title>Are you absolutely sure?</rtg-dialog-title>
|
4056
|
+
<rtg-dialog-description>
|
4057
|
+
This action cannot be undone. This will permanently delete your
|
4058
|
+
content.</rtg-dialog-description
|
4059
|
+
>
|
4060
|
+
</rtg-dialog-header>
|
4061
|
+
<rtg-dialog-footer>
|
4062
|
+
<div class="flex w-full justify-between space-x-1">
|
4063
|
+
<rtg-dialog-close><rtg-button variant="secondary">Close</rtg-button></rtg-dialog-close>
|
4064
|
+
<div class="justify-end">
|
4065
|
+
<rtg-button variant="destructive">Delete</rtg-button>
|
4066
|
+
<rtg-button>Cancel</rtg-button>
|
4067
|
+
</div>
|
4068
|
+
</div>
|
4069
|
+
</rtg-dialog-content>
|
4070
|
+
</rtg-dialog>
|
4071
|
+
</div>
|
4072
|
+
</div>
|
4073
|
+
<div class="flex items-center justify-center h-[400px]">
|
4074
|
+
<rtg-popover>
|
4075
|
+
<!-- Trigger to open/close the popover -->
|
4076
|
+
<rtg-popover-trigger slot="trigger">
|
4077
|
+
<rtg-button variant="outline" slot="trigger-button"
|
4078
|
+
>sample</rtg-button
|
4079
|
+
>
|
4080
|
+
</rtg-popover-trigger>
|
4081
|
+
|
4082
|
+
<!-- Popover content that will be shown or hidden -->
|
4083
|
+
<rtg-popover-content
|
4084
|
+
data-side="bottom"
|
4085
|
+
data-testid="popover-content"
|
4086
|
+
slot="content"
|
4087
|
+
>
|
4088
|
+
<div>
|
4089
|
+
<p>content</p>
|
4090
|
+
</div>
|
4091
|
+
</rtg-popover-content>
|
4092
|
+
</rtg-popover>
|
4093
|
+
</div>
|
4094
|
+
</main>
|
4095
|
+
|
4096
|
+
`}};q.buttonVariants=$a,q.styles=[c,l.css`
|
4040
4097
|
:host {
|
4041
4098
|
--rtg-sample-demo-bg: unset;
|
4042
4099
|
--rtg-sample-demo-color: unset;
|
@@ -4049,13 +4106,185 @@ body {
|
|
4049
4106
|
border-radius: var(--rtg-sample-demo-radius);
|
4050
4107
|
height: var(--rtg-sample-demo-height);
|
4051
4108
|
}
|
4052
|
-
`],
|
4109
|
+
`],be([d.property({type:Function})],q.prototype,"click",2),be([d.property({type:Boolean})],q.prototype,"disabled",2),be([d.property({type:String})],q.prototype,"isCustomClass",2),be([d.property({type:String})],q.prototype,"variant",2),be([d.property({type:String})],q.prototype,"size",2),q=be([d.customElement("rtg-sample-demo")],q);var Ea=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,ve=(n,e,r,o)=>{for(var t=o>1?void 0:o?Pa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ea(e,r,t),t};a.MenubarMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.handleClickOutside=e=>{var o;const r=e.target;(o=this.shadowRoot)!=null&&o.contains(r)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("rtg-menubar-menu").forEach(o=>{o!==this&&(o.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){var o;const e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof a.MenubarContent)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-menubar-radio-item").forEach(r=>{const o=r;r!==e.target&&(o.checked=!1)})}get _slotElements(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");return(e==null?void 0:e.assignedElements({flatten:!0}))||[]}firstUpdated(){const e=this._slotElements,r=[];for(let o=0;o<e.length-1;o+=2){const t=e[o],s=e[o+1],i=crypto.randomUUID();r.push(i),t.dataset.pairId=i,s.dataset.pairId=i}this.uniqueIds=r,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}handleHover(e){this.isHovering||(this.isHovering=!0,this.toggleMenubar(e))}handleMouseLeave(){this.isHovering=!1}render(){return l.html`
|
4110
|
+
<div>
|
4111
|
+
<div
|
4112
|
+
role="menuitem"
|
4113
|
+
id="${this.id}"
|
4114
|
+
data-state-id="aria-haspopup"
|
4115
|
+
="menu"
|
4116
|
+
aria-expanded="${!!this.isOpen}"
|
4117
|
+
data-state="${this.isOpen}"
|
4118
|
+
data-orientation="horizontal"
|
4119
|
+
>
|
4120
|
+
<slot
|
4121
|
+
@click="${this.toggleMenubar}"
|
4122
|
+
@mouseenter="${this.handleHover}"
|
4123
|
+
@mouseleave="${this.handleMouseLeave}"
|
4124
|
+
></slot>
|
4125
|
+
</div>
|
4126
|
+
<div>
|
4127
|
+
<slot></slot>
|
4128
|
+
</div>
|
4129
|
+
</div>
|
4130
|
+
`}},a.MenubarMenu.styles=[l.css``,c],ve([d.state()],a.MenubarMenu.prototype,"isOpen",2),ve([d.state()],a.MenubarMenu.prototype,"uniqueIds",2),ve([d.state()],a.MenubarMenu.prototype,"selectedMenu",2),ve([d.state()],a.MenubarMenu.prototype,"isHovering",2),ve([d.property({type:String})],a.MenubarMenu.prototype,"id",2),a.MenubarMenu=ve([d.customElement("rtg-menubar-menu")],a.MenubarMenu);var Sa=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,Ie=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ma(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Sa(e,r,t),t};a.MenubarContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Ge,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof a.MenubarMenu);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-menubar-content"),o=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(o!=null&&o.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
4131
|
+
<div
|
4132
|
+
part="menubar-content"
|
4133
|
+
id="${this.id}"
|
4134
|
+
data-side="${this.side}"
|
4135
|
+
data-align="start"
|
4136
|
+
role="menu"
|
4137
|
+
aria-orientation="vertical"
|
4138
|
+
data-state="${this.isOpen}"
|
4139
|
+
data-radix-menu-content=""
|
4140
|
+
dir="ltr"
|
4141
|
+
aria-labelledby="${this.id}"
|
4142
|
+
data-radix-menubar-content=""
|
4143
|
+
class="z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
4144
|
+
style="display: ${this.isOpen?"block":"none"};width:260px;position:absolute;"
|
4145
|
+
>
|
4146
|
+
<slot></slot>
|
4147
|
+
</div>
|
4148
|
+
`}},a.MenubarContent.styles=[l.css``,c],Ie([d.property({attribute:"data-state",type:String})],a.MenubarContent.prototype,"state",2),Ie([d.property({type:String})],a.MenubarContent.prototype,"id",2),Ie([d.property({type:String})],a.MenubarContent.prototype,"side",2),Ie([d.state()],a.MenubarContent.prototype,"isOpen",2),a.MenubarContent=Ie([d.customElement("rtg-menubar-content")],a.MenubarContent);var Da=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,je=(n,e,r,o)=>{for(var t=o>1?void 0:o?ka(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Da(e,r,t),t};a.MenubarGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${a.MenubarGroup._counter++}`:this._id=`rtgcmdrxlxg${a.MenubarGroup._counter++}`,this._id}render(){const e="overflow-hidden p-1 text-foreground [&_[rtgcmd-group-heading]]:px-2 [&_[rtgcmd-group-heading]]:py-1.5 [&_[rtgcmd-group-heading]]:text-xs [&_[rtgcmd-group-heading]]:font-medium [&_[rtgcmd-group-heading]]:text-muted-foreground";return l.html`${this._hidden==="true"?l.nothing:l.html`
|
4149
|
+
<div
|
4150
|
+
part="menubar-group"
|
4151
|
+
class="${e}"
|
4152
|
+
rtgcmd-group
|
4153
|
+
role="presentation"
|
4154
|
+
id="${this.identifier}"
|
4155
|
+
>
|
4156
|
+
<div
|
4157
|
+
rtgcmd-group-heading
|
4158
|
+
aria-hidden="true"
|
4159
|
+
id="${this.identifier}h"
|
4160
|
+
>
|
4161
|
+
${this.heading}
|
4162
|
+
</div>
|
4163
|
+
<div
|
4164
|
+
rtgcmd-group-items
|
4165
|
+
role="group"
|
4166
|
+
aria-labelledby="${this.identifier}h"
|
4167
|
+
>
|
4168
|
+
<slot></slot>
|
4169
|
+
</div>
|
4170
|
+
</div>
|
4171
|
+
`}`}},a.MenubarGroup._counter=0,a.MenubarGroup.styles=[l.css``,c],je([d.property({type:String})],a.MenubarGroup.prototype,"heading",2),je([d.property({attribute:"id",type:String})],a.MenubarGroup.prototype,"_id",2),je([d.property({attribute:"aria-hidden",type:String})],a.MenubarGroup.prototype,"_hidden",2),a.MenubarGroup=je([d.customElement("rtg-menubar-group")],a.MenubarGroup);var Ia=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Le=(n,e,r,o)=>{for(var t=o>1?void 0:o?La(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ia(e,r,t),t};a.MenubarItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.MenubarItem._counter++}`:this._id=`rtgcmdrxgxli${a.MenubarItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}render(){return l.html` ${this._hidden==="true"?l.nothing:l.html`
|
4172
|
+
<div
|
4173
|
+
part="menubar-item"
|
4174
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",this.className)}"
|
4175
|
+
@mouseover="${this.handleMouseEvent}"
|
4176
|
+
@mouseleave="${this.handleMouseEvent}"
|
4177
|
+
@focus="${this.handleMouseEvent}"
|
4178
|
+
rtgcmd-item
|
4179
|
+
role="option"
|
4180
|
+
aria-selected="${this.selected}"
|
4181
|
+
data-selected="${this.selected}"
|
4182
|
+
data-value="${this.value}"
|
4183
|
+
id="${this.identifier}"
|
4184
|
+
aria-hidden="${this.hidden}"
|
4185
|
+
>
|
4186
|
+
<slot></slot>
|
4187
|
+
</div>
|
4188
|
+
`}`}},a.MenubarItem._counter=0,a.MenubarItem.styles=[l.css``,c],Le([d.property({type:String})],a.MenubarItem.prototype,"_id",2),Le([d.property({attribute:"aria-hidden",type:String})],a.MenubarItem.prototype,"_hidden",2),Le([d.property({attribute:"data-value",type:String})],a.MenubarItem.prototype,"value",1),Le([d.property({type:Boolean})],a.MenubarItem.prototype,"selected",2),a.MenubarItem=Le([d.customElement("rtg-menubar-item")],a.MenubarItem);var Aa=Object.defineProperty,Ra=Object.getOwnPropertyDescriptor,ae=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ra(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Aa(e,r,t),t};a.MenubarRadioItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.MenubarRadioItem._counter++}`:this._id=`rtgcmdrxgxli${a.MenubarRadioItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
4189
|
+
<div
|
4190
|
+
part="menubar-radio-item"
|
4191
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
4192
|
+
@click=${this.toggleChecked}
|
4193
|
+
@mouseover="${this.handleMouseEvent}"
|
4194
|
+
@mouseleave="${this.handleMouseEvent}"
|
4195
|
+
@focus="${this.handleMouseEvent}"
|
4196
|
+
rtgcmd-item
|
4197
|
+
role="option"
|
4198
|
+
aria-selected="${this.selected}"
|
4199
|
+
data-selected="${this.selected}"
|
4200
|
+
data-value="${this.value}"
|
4201
|
+
id="${this.identifier}"
|
4202
|
+
aria-hidden="${this.hidden}"
|
4203
|
+
>
|
4204
|
+
<span
|
4205
|
+
class="icon-space absolute left-2 flex items-center justify-center"
|
4206
|
+
>
|
4207
|
+
${this.checked?l.html` ${pt()} `:l.nothing}
|
4208
|
+
</span>
|
4209
|
+
<slot></slot>
|
4210
|
+
</div>
|
4211
|
+
`}},a.MenubarRadioItem._counter=0,a.MenubarRadioItem.styles=[l.css`
|
4212
|
+
.icon-space {
|
4213
|
+
width: 16px; /* Fixed width to reserve space for the check icon */
|
4214
|
+
height: 16px;
|
4215
|
+
display: inline-block;
|
4216
|
+
}
|
4217
|
+
`,c],ae([d.property({type:String})],a.MenubarRadioItem.prototype,"_id",2),ae([d.property({attribute:"aria-hidden",type:String})],a.MenubarRadioItem.prototype,"_hidden",2),ae([d.property({attribute:"data-value",type:String})],a.MenubarRadioItem.prototype,"value",1),ae([d.property({type:Boolean})],a.MenubarRadioItem.prototype,"selected",2),ae([d.property({type:Boolean})],a.MenubarRadioItem.prototype,"checked",2),ae([d.property({type:Boolean})],a.MenubarRadioItem.prototype,"disabled",2),a.MenubarRadioItem=ae([d.customElement("rtg-menubar-radio-item")],a.MenubarRadioItem);var za=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,le=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ba(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&za(e,r,t),t};a.MenubarCheckboxItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${a.MenubarCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${a.MenubarCheckboxItem._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return l.html`
|
4218
|
+
<div
|
4219
|
+
part="menubar-checkbox-item"
|
4220
|
+
class="${p("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",this.disabled?"pointer-events-none opacity-50":"",this.className)}"
|
4221
|
+
@click=${this.toggleChecked}
|
4222
|
+
@mouseover="${this.handleMouseEvent}"
|
4223
|
+
@mouseleave="${this.handleMouseEvent}"
|
4224
|
+
@focus="${this.handleMouseEvent}"
|
4225
|
+
rtgcmd-item
|
4226
|
+
role="option"
|
4227
|
+
aria-selected="${this.selected}"
|
4228
|
+
data-selected="${this.selected}"
|
4229
|
+
data-value="${this.value}"
|
4230
|
+
id="${this.identifier}"
|
4231
|
+
aria-hidden="${this.hidden}"
|
4232
|
+
>
|
4233
|
+
<span
|
4234
|
+
class="icon-space absolute left-2 flex items-center justify-center"
|
4235
|
+
>
|
4236
|
+
${this.checked?l.html`
|
4237
|
+
<svg
|
4238
|
+
xmlns="http://www.w3.org/2000/svg"
|
4239
|
+
viewBox="0 0 24 24"
|
4240
|
+
width="16px"
|
4241
|
+
height="16px"
|
4242
|
+
>
|
4243
|
+
<path
|
4244
|
+
d="M 19.28125 5.28125 L 9 15.5625 L 4.71875 11.28125 L 3.28125 12.71875 L 8.28125 17.71875 L 9 18.40625 L 9.71875 17.71875 L 20.71875 6.71875 Z"
|
4245
|
+
/>
|
4246
|
+
</svg>
|
4247
|
+
`:l.nothing}
|
4248
|
+
</span>
|
4249
|
+
<slot></slot>
|
4250
|
+
</div>
|
4251
|
+
`}},a.MenubarCheckboxItem._counter=0,a.MenubarCheckboxItem.styles=[l.css`
|
4252
|
+
.icon-space {
|
4253
|
+
width: 16px; /* Fixed width to reserve space for the check icon */
|
4254
|
+
height: 16px;
|
4255
|
+
display: inline-block;
|
4256
|
+
}
|
4257
|
+
`,c],le([d.property({type:String})],a.MenubarCheckboxItem.prototype,"_id",2),le([d.property({attribute:"aria-hidden",type:String})],a.MenubarCheckboxItem.prototype,"_hidden",2),le([d.property({attribute:"data-value",type:String})],a.MenubarCheckboxItem.prototype,"value",1),le([d.property({type:Boolean})],a.MenubarCheckboxItem.prototype,"selected",2),le([d.property({type:Boolean})],a.MenubarCheckboxItem.prototype,"checked",2),le([d.property({type:Boolean})],a.MenubarCheckboxItem.prototype,"disabled",2),a.MenubarCheckboxItem=le([d.customElement("rtg-menubar-checkbox-item")],a.MenubarCheckboxItem);var Ta=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,Ft=(n,e,r,o)=>{for(var t=o>1?void 0:o?qa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ta(e,r,t),t};a.MenubarSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,o;if(this._id!=="")return this._id;const e=(o=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:o.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${a.MenubarSeparator._counter++}`:this._id=`rtgcmdrxlxs${a.MenubarSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
4258
|
+
<div
|
4259
|
+
part="menubar-seperator"
|
4260
|
+
class="${p("-mx-1 h-px bg-border",this.className)}"
|
4261
|
+
rtgcmd-separator
|
4262
|
+
role="separator"
|
4263
|
+
id="${this.identifier}"
|
4264
|
+
></div>
|
4265
|
+
`}`}},a.MenubarSeparator._counter=0,a.MenubarSeparator.styles=[l.css``,c],Ft([d.property({type:String})],a.MenubarSeparator.prototype,"_id",2),Ft([d.property({attribute:"aria-hidden",type:String})],a.MenubarSeparator.prototype,"_hidden",2),a.MenubarSeparator=Ft([d.customElement("rtg--menubar-separator")],a.MenubarSeparator);var Na=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,Fa=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ga(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Na(e,r,t),t};a.MenubarShortcut=class extends l.LitElement{render(){return l.html`
|
4266
|
+
part="menubar-shortcut"
|
4267
|
+
<span class="${p("ml-auto text-xs font-semibold",this.className)}">
|
4268
|
+
<slot></slot>
|
4269
|
+
</span>
|
4270
|
+
`}},a.MenubarShortcut.styles=[l.css``,c],a.MenubarShortcut=Fa([d.customElement("rtg-menubar-shortcut")],a.MenubarShortcut);var Va=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,kr=(n,e,r,o)=>{for(var t=o>1?void 0:o?Ua(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Va(e,r,t),t};a.Menubar=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
4271
|
+
<div
|
4272
|
+
part="menubar"
|
4273
|
+
role="menubar"
|
4274
|
+
class="${p("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",this.twCLass)}"
|
4275
|
+
tabindex="0"
|
4276
|
+
data-orientation="horizontal"
|
4277
|
+
style="outline: none;width:266px"
|
4278
|
+
>
|
4279
|
+
<slot></slot>
|
4280
|
+
</div>
|
4281
|
+
`}},a.Menubar.styles=[l.css``,c],kr([d.property({type:String})],a.Menubar.prototype,"twCLass",2),a.Menubar=kr([d.customElement("rtg-menubar")],a.Menubar);const Ha="inline-flex items-center gap-1.5",Xa="transition-colors hover:text-foreground",Ya="font-normal text-foreground",Ka="[&>svg]:size-3.5",Wa="flex h-9 w-9 items-center justify-center",Za="flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5";var Ja=Object.defineProperty,Qa=Object.getOwnPropertyDescriptor,ja=(n,e,r,o)=>{for(var t=o>1?void 0:o?Qa(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&Ja(e,r,t),t};let Vt=class extends b{getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
4053
4282
|
<span
|
4054
|
-
${x(
|
4283
|
+
${x(n)}
|
4055
4284
|
id="rtg-bread-crumb-ellipsis"
|
4056
4285
|
role="presentation"
|
4057
4286
|
aria-hidden="true"
|
4058
|
-
class="${
|
4287
|
+
class="${p(Wa,this.className)}"
|
4059
4288
|
part="breadcrumb-ellipsis"
|
4060
4289
|
>
|
4061
4290
|
<svg
|
@@ -4071,31 +4300,31 @@ body {
|
|
4071
4300
|
/>
|
4072
4301
|
</svg>
|
4073
4302
|
</span>
|
4074
|
-
`}};
|
4303
|
+
`}};Vt.styles=[l.css``,c],Vt=ja([d.customElement("rtg-bread-crumb-ellipsis")],Vt);var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,rl=(n,e,r,o)=>{for(var t=o>1?void 0:o?tl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&el(e,r,t),t};let Ut=class extends b{getAttributesToExclude(){return["variant"]}render(){const n=this.getFilteredAttributes();return l.html`
|
4075
4304
|
<li
|
4076
|
-
${x(
|
4305
|
+
${x(n)}
|
4077
4306
|
id="rtg-bread-crumb-item"
|
4078
|
-
class="${
|
4307
|
+
class="${p(Ha,this.className)}"
|
4079
4308
|
part="breadcrumb-item"
|
4080
4309
|
>
|
4081
4310
|
<slot></slot>
|
4082
4311
|
</li>
|
4083
|
-
`}};
|
4312
|
+
`}};Ut.styles=[l.css``,c],Ut=rl([d.customElement("rtg-bread-crumb-item")],Ut);var ol=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,sl=(n,e,r,o)=>{for(var t=o>1?void 0:o?nl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&ol(e,r,t),t};let Ht=class extends b{getAttributesToExclude(){return["variant"]}render(){const n=this.getFilteredAttributes();return l.html`
|
4084
4313
|
<ol
|
4085
|
-
${x(
|
4314
|
+
${x(n)}
|
4086
4315
|
id="rtg-bread-crumb-list"
|
4087
|
-
class="${
|
4316
|
+
class="${p(Za,this.className)}"
|
4088
4317
|
part="breadcrumb-list"
|
4089
4318
|
>
|
4090
4319
|
<slot></slot>
|
4091
4320
|
</ol>
|
4092
|
-
`}};
|
4321
|
+
`}};Ht.styles=[l.css``,c],Ht=sl([d.customElement("rtg-bread-crumb-list")],Ht);var il=Object.defineProperty,al=Object.getOwnPropertyDescriptor,ll=(n,e,r,o)=>{for(var t=o>1?void 0:o?al(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&il(e,r,t),t};let Xt=class extends b{getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
4093
4322
|
<li
|
4094
|
-
${x(
|
4323
|
+
${x(n)}
|
4095
4324
|
id="rtg-bread-crumb-separator"
|
4096
4325
|
role="presentation"
|
4097
4326
|
aria-hidden="true"
|
4098
|
-
class="${
|
4327
|
+
class="${p(Ka,this.className)}"
|
4099
4328
|
part="breadcrumb-separator"
|
4100
4329
|
|
4101
4330
|
>
|
@@ -4114,37 +4343,37 @@ body {
|
|
4114
4343
|
<path d="M22 2 2 22"></path>
|
4115
4344
|
</svg>
|
4116
4345
|
</div>
|
4117
|
-
`}};
|
4346
|
+
`}};Xt.styles=[l.css``,c],Xt=ll([d.customElement("rtg-bread-crumb-separator")],Xt);var dl=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,ul=(n,e,r,o)=>{for(var t=o>1?void 0:o?cl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&dl(e,r,t),t};let Yt=class extends b{getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
4118
4347
|
<nav
|
4119
|
-
${x(
|
4348
|
+
${x(n)}
|
4120
4349
|
part="breadcrumb"
|
4121
|
-
class="${
|
4350
|
+
class="${p(this.className)}"
|
4122
4351
|
aria-label="breadcrumb"
|
4123
4352
|
>
|
4124
4353
|
<slot></slot>
|
4125
4354
|
</nav>
|
4126
|
-
`}};
|
4355
|
+
`}};Yt.styles=[l.css``,c],Yt=ul([d.customElement("rtg-bread-crumb")],Yt);var pl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,ml=(n,e,r,o)=>{for(var t=o>1?void 0:o?hl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&pl(e,r,t),t};let Kt=class extends b{getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
4127
4356
|
<span
|
4128
|
-
${x(
|
4357
|
+
${x(n)}
|
4129
4358
|
id="rtg-bread-crumb-text"
|
4130
4359
|
aria-disabled="true"
|
4131
4360
|
aria-current="page"
|
4132
|
-
class="${
|
4361
|
+
class="${p(Ya,this.className)}"
|
4133
4362
|
part="breadcrumb-text"
|
4134
4363
|
>
|
4135
4364
|
<slot></slot>
|
4136
4365
|
</span>
|
4137
|
-
`}};
|
4366
|
+
`}};Kt.styles=[l.css``,c],Kt=ml([d.customElement("rtg-bread-crumb-text")],Kt);var gl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,Ir=(n,e,r,o)=>{for(var t=o>1?void 0:o?fl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&gl(e,r,t),t};let et=class extends b{constructor(){super(...arguments),this.href="/"}getAttributesToExclude(){return[""]}render(){const n=this.getFilteredAttributes();return l.html`
|
4138
4367
|
<a
|
4139
|
-
${x(
|
4368
|
+
${x(n)}
|
4140
4369
|
id="rtg-bread-crumb-link"
|
4141
|
-
class="${
|
4370
|
+
class="${p(Xa,this.className)}"
|
4142
4371
|
href="${this.href}"
|
4143
4372
|
part="breadcrumb-link"
|
4144
4373
|
>
|
4145
4374
|
<slot></slot>
|
4146
4375
|
</a>
|
4147
|
-
`}};
|
4376
|
+
`}};et.styles=[l.css``,c],Ir([d.property({type:String})],et.prototype,"href",2),et=Ir([d.customElement("rtg-bread-crumb-link")],et);var bl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,tt=(n,e,r,o)=>{for(var t=o>1?void 0:o?vl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&bl(e,r,t),t};let de=class extends b{constructor(){super(),this.maxLength=6,this.onChange=()=>{},this.pin=new Array(this.maxLength),this.inputes=[]}connectedCallback(){super.connectedCallback()}getAttributesToExclude(){return[]}raiseEvent(n,e="changes",r=1/0){const o=new CustomEvent("selected-input",{bubbles:!0,composed:!0,detail:{selectedItems:n,eventType:e,customIndex:r}});this.dispatchEvent(o)}render(){return l.html` <slot part="input-otp" class="flex items-center"></slot> `}};de.styles=[l.css``,c],tt([d.property()],de.prototype,"maxLength",2),tt([d.property()],de.prototype,"onChange",2),tt([d.property()],de.prototype,"pin",2),de=tt([d.customElement("rtg-input-otp")],de);var wl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,Lr=(n,e,r,o)=>{for(var t=o>1?void 0:o?yl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&wl(e,r,t),t};let rt=class extends b{constructor(){super(...arguments),this.click=()=>{},this.childrenArray=[]}getAttributesToExclude(){return[]}firstUpdated(n){super.firstUpdated(n),this.childrenArray=Array.from(this.children),this.childrenArray.forEach((e,r)=>{e.isFirst=r===0,e.isLast=r===this.childrenArray.length-1}),this.requestUpdate()}render(){return l.html` <slot part="input-otp-group" class="flex"></slot> `}};rt.styles=[l.css``,c],Lr([d.property({type:Function})],rt.prototype,"click",2),rt=Lr([d.customElement("rtg-input-otp-group")],rt);var xl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Ar=(n,e,r,o)=>{for(var t=o>1?void 0:o?Cl(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&xl(e,r,t),t};let ot=class extends l.LitElement{constructor(){super(...arguments),this.index=0}render(){return l.html` <div role="separator">${Do()}</div> `}};ot.styles=[l.css``,c],Ar([d.property({type:Number})],ot.prototype,"index",2),ot=Ar([d.customElement("rtg-input-otp-separator")],ot);var $l=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,we=(n,e,r,o)=>{for(var t=o>1?void 0:o?_l(e,r):e,s=n.length-1,i;s>=0;s--)(i=n[s])&&(t=(o?i(e,r,t):i(t))||t);return o&&t&&$l(e,r,t),t};let W=class extends b{constructor(){super(...arguments),this.click=()=>{},this.index=0,this.isFirst=!1,this.isLast=!1,this.value=""}get _inputOtp(){let n=this.parentElement;for(;n&&!(n instanceof de);)n=n.parentElement;return n}connectedCallback(){super.connectedCallback()}firstUpdated(n){const e=this._inputOtp;e&&(e.inputes.push({index:e.inputes.length,value:"",isSelected:!1,userIndex:this.index}),e.addEventListener("selected-input",r=>{console.log("event",r.detail);const o=this.shadowRoot.querySelector(`input[name="input-${r.detail.selectedItems}"]`);o&&(o.focus(),r.detail.eventType==="changes"&&(o.value=""))}))}disconnectedCallback(){super.disconnectedCallback(),this._inputOtp&&this._inputOtp.removeEventListener("selected-input",()=>{})}getAttributesToExclude(){return[]}handleFocus(n){const e=n.target,r=this._inputOtp;if(r&&!e.value){let o=r.inputes.reduce((t,s,i)=>s.value!==""?i:t,-1);console.log("inputOtpInstance lastIndex",o),console.log("inputOtpInstance.inputes",r.inputes[o]),o+1===r.maxLength?r.raiseEvent(o,"focus"):r.raiseEvent(++o,"focus")}}handleInputChange(n){const e=n.target;if(new RegExp(/^\d+$/).test(e.value)){const o=this._inputOtp;if(o){let t=o.inputes.findIndex(s=>s.index===this.index);o.inputes[t]={...o.inputes[t],value:e.value,isSelected:!1},o.inputes.length!==t+1&&o.raiseEvent(++t,"changes")}}else e.value=""}handleKeyDown(n){const e=n.target;if(n.key==="Backspace"){console.log("backspace");const r=this._inputOtp;if(r){let o=r.inputes.findIndex(t=>t.index===this.index);r.inputes[o]={...r.inputes[o],value:""},o+1===r.maxLength&&e.value?r.raiseEvent(o,"changes"):r.raiseEvent(--o,"changes")}}}render(){const n={"h-[40px]":!0,"w-[40px]":!0,"text-center relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all":!0,"first:rounded-l-md first:border-l":this.isFirst,"last:rounded-r-md":this.isLast,"overflow-hidden":!0," focus:border focus:border-[#c1c1c1] focus:border-[3px]":!0};return l.html`
|
4148
4377
|
<input
|
4149
4378
|
part="input-otp-slot"
|
4150
4379
|
autocomplete="one-time-code"
|
@@ -4158,6 +4387,6 @@ body {
|
|
4158
4387
|
@input=${this.handleInputChange}
|
4159
4388
|
@keydown=${this.handleKeyDown}
|
4160
4389
|
style="outline: none"
|
4161
|
-
class=${Object.entries(
|
4390
|
+
class=${Object.entries(n).map(([e,r])=>r?e:void 0).join(" ")}
|
4162
4391
|
/>
|
4163
|
-
`}};W.styles=[l.css``,c],
|
4392
|
+
`}};W.styles=[l.css``,c],we([d.property({type:Function})],W.prototype,"click",2),we([d.property({type:Number})],W.prototype,"index",2),we([d.property({type:Boolean})],W.prototype,"isFirst",2),we([d.property({type:Boolean})],W.prototype,"isLast",2),we([d.property({type:String})],W.prototype,"value",2),W=we([d.customElement("rtg-input-otp-slot")],W),Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|