@revotech-group/revotech-ui-kit 0.0.60 → 0.0.62
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 +3366 -3346
- package/dist/revotech-ui-kit.umd.cjs +477 -499
- package/dist/src/components/atoms/index.d.ts +1 -10
- package/dist/src/components/ui/accordion/accordion-content.d.ts +20 -0
- package/dist/src/components/{atoms → ui}/accordion/accordion-item.d.ts +6 -6
- package/dist/src/components/{atoms → ui}/accordion/accordion-trigger.d.ts +6 -9
- package/dist/src/components/{atoms/accordion/accordion.atoms.d.ts → ui/accordion/accordion.d.ts} +7 -4
- package/dist/src/components/ui/accordion/accordion.stories.d.ts +11 -0
- package/dist/src/components/{atoms/alert/alert.atom.d.ts → ui/alert/alert.d.ts} +5 -7
- package/dist/src/components/ui/alert/alert.stories.d.ts +8 -0
- package/dist/src/components/{atoms/aspect-ratio/aspect-ratio-atom.d.ts → ui/aspect-ratio/aspect-ratio.d.ts} +3 -1
- package/dist/src/components/{atoms → ui}/avatar/avatar-fallback.d.ts +1 -1
- package/dist/src/components/{atoms → ui}/avatar/avatar-image.d.ts +1 -1
- package/dist/src/components/ui/avatar/avatar.d.ts +16 -0
- package/dist/src/components/{atoms → ui}/avatar/avatar.style.d.ts +1 -1
- package/dist/src/components/{atoms/badge/badge.atom.d.ts → ui/badge/badge.d.ts} +3 -1
- package/dist/src/components/{atoms/calendar/calendar.atom.d.ts → ui/calendar/calendar.d.ts} +1 -0
- package/dist/src/components/ui/checkbox/checkbox.d.ts +0 -1
- package/dist/src/components/{atoms/date-picker/date-picker.atom.d.ts → ui/date-picker/date-picker.d.ts} +1 -1
- package/dist/src/components/ui/index.d.ts +7 -0
- package/dist/src/components/widgets/light-sample-demo/light-sample.demo.d.ts +4 -0
- package/dist/src/helpers/base-element.d.ts +1 -0
- package/dist/src/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/src/components/atoms/accordion/accordion-content.d.ts +0 -14
- package/dist/src/components/atoms/accordion/accordion.stories.d.ts +0 -5
- package/dist/src/components/atoms/alert/alert-description.d.ts +0 -5
- package/dist/src/components/atoms/alert/alert-title.d.ts +0 -5
- package/dist/src/components/atoms/alert/alert.stories.d.ts +0 -5
- package/dist/src/components/atoms/avatar/avatar.atom.d.ts +0 -11
- /package/dist/src/components/{atoms → ui}/accordion/accordion.defs.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/accordion/accordion.styles.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/alert/alert.styles.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/alert/alert.types.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/aspect-ratio/aspect-ratio.stories.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/avatar/avatar.stories.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/badge/badge.stories.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/badge/badge.style.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/badge/badge.type.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/calendar/calendar.stories.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/calendar/calendar.style.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/calendar/calendar.type.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/date-picker/date-picker.stories.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(i,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):(i=typeof globalThis<"u"?globalThis:i||self,l(i["revotech-ui-kit"]={},i.lit,i.decorators_js,i.litElement,i.html_js,i.directive_js,i.asyncDirective_js))})(this,function(i,l,d,L,mn,ht,vn){"use strict";function dr(o){var e,n,r="";if(typeof o=="string"||typeof o=="number")r+=o;else if(typeof o=="object")if(Array.isArray(o)){var t=o.length;for(e=0;e<t;e++)o[e]&&(n=dr(o[e]))&&(r&&(r+=" "),r+=n)}else for(n in o)o[n]&&(r&&(r+=" "),r+=n);return r}function fn(){for(var o,e,n=0,r="",t=arguments.length;n<t;n++)(o=arguments[n])&&(e=dr(o))&&(r&&(r+=" "),r+=e);return r}const gt="-",bn=o=>{const e=yn(o),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=o;return{getClassGroupId:a=>{const p=a.split(gt);return p[0]===""&&p.length!==1&&p.shift(),cr(p,e)||wn(a)},getConflictingClassGroupIds:(a,p)=>{const m=n[a]||[];return p&&r[a]?[...m,...r[a]]:m}}},cr=(o,e)=>{var a;if(o.length===0)return e.classGroupId;const n=o[0],r=e.nextPart.get(n),t=r?cr(o.slice(1),r):void 0;if(t)return t;if(e.validators.length===0)return;const s=o.join(gt);return(a=e.validators.find(({validator:p})=>p(s)))==null?void 0:a.classGroupId},ur=/^\[(.+)\]$/,wn=o=>{if(ur.test(o)){const e=ur.exec(o)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},yn=o=>{const{theme:e,prefix:n}=o,r={nextPart:new Map,validators:[]};return Cn(Object.entries(o.classGroups),n).forEach(([s,a])=>{mt(a,r,s,e)}),r},mt=(o,e,n,r)=>{o.forEach(t=>{if(typeof t=="string"){const s=t===""?e:pr(e,t);s.classGroupId=n;return}if(typeof t=="function"){if(xn(t)){mt(t(r),e,n,r);return}e.validators.push({validator:t,classGroupId:n});return}Object.entries(t).forEach(([s,a])=>{mt(a,pr(e,s),n,r)})})},pr=(o,e)=>{let n=o;return e.split(gt).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xn=o=>o.isThemeGetter,Cn=(o,e)=>e?o.map(([n,r])=>{const t=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,p])=>[e+a,p])):s);return[n,t]}):o,$n=o=>{if(o<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const t=(s,a)=>{n.set(s,a),e++,e>o&&(e=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return t(s,a),a},set(s,a){n.has(s)?n.set(s,a):t(s,a)}}},hr="!",_n=o=>{const{separator:e,experimentalParseClassName:n}=o,r=e.length===1,t=e[0],s=e.length,a=p=>{const m=[];let h=0,v=0,C;for(let w=0;w<p.length;w++){let O=p[w];if(h===0){if(O===t&&(r||p.slice(w,w+s)===e)){m.push(p.slice(v,w)),v=w+s;continue}if(O==="/"){C=w;continue}}O==="["?h++:O==="]"&&h--}const $=m.length===0?p:p.substring(v),E=$.startsWith(hr),D=E?$.substring(1):$,_=C&&C>v?C-v:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:D,maybePostfixModifierPosition:_}};return n?p=>n({className:p,parseClassName:a}):a},On=o=>{if(o.length<=1)return o;const e=[];let n=[];return o.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},En=o=>({cache:$n(o.cacheSize),parseClassName:_n(o),...bn(o)}),Pn=/\s+/,Sn=(o,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:t}=e,s=[],a=o.trim().split(Pn);let p="";for(let m=a.length-1;m>=0;m-=1){const h=a[m],{modifiers:v,hasImportantModifier:C,baseClassName:$,maybePostfixModifierPosition:E}=n(h);let D=!!E,_=r(D?$.substring(0,E):$);if(!_){if(!D){p=h+(p.length>0?" "+p:p);continue}if(_=r($),!_){p=h+(p.length>0?" "+p:p);continue}D=!1}const w=On(v).join(":"),O=C?w+hr:w,M=O+_;if(s.includes(M))continue;s.push(M);const Ne=t(_,D);for(let me=0;me<Ne.length;++me){const ct=Ne[me];s.push(O+ct)}p=h+(p.length>0?" "+p:p)}return p};function Dn(){let o=0,e,n,r="";for(;o<arguments.length;)(e=arguments[o++])&&(n=gr(e))&&(r&&(r+=" "),r+=n);return r}const gr=o=>{if(typeof o=="string")return o;let e,n="";for(let r=0;r<o.length;r++)o[r]&&(e=gr(o[r]))&&(n&&(n+=" "),n+=e);return n};function Mn(o,...e){let n,r,t,s=a;function a(m){const h=e.reduce((v,C)=>C(v),o());return n=En(h),r=n.cache.get,t=n.cache.set,s=p,p(m)}function p(m){const h=r(m);if(h)return h;const v=Sn(m,n);return t(m,v),v}return function(){return s(Dn.apply(null,arguments))}}const b=o=>{const e=n=>n[o]||[];return e.isThemeGetter=!0,e},mr=/^\[(?:([a-z-]+):)?(.+)\]$/i,kn=/^\d+\/\d+$/,Ln=new Set(["px","full","screen"]),In=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,An=/\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$/,zn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=o=>ve(o)||Ln.has(o)||kn.test(o),V=o=>fe(o,"length",Hn),ve=o=>!!o&&!Number.isNaN(Number(o)),vt=o=>fe(o,"number",ve),_e=o=>!!o&&Number.isInteger(Number(o)),Nn=o=>o.endsWith("%")&&ve(o.slice(0,-1)),g=o=>mr.test(o),G=o=>In.test(o),Tn=new Set(["length","size","percentage"]),qn=o=>fe(o,Tn,vr),Fn=o=>fe(o,"position",vr),Un=new Set(["image","url"]),Vn=o=>fe(o,Un,Xn),Gn=o=>fe(o,"",Yn),Oe=()=>!0,fe=(o,e,n)=>{const r=mr.exec(o);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},Hn=o=>An.test(o)&&!zn.test(o),vr=()=>!1,Yn=o=>Rn.test(o),Xn=o=>Bn.test(o),Wn=Mn(()=>{const o=b("colors"),e=b("spacing"),n=b("blur"),r=b("brightness"),t=b("borderColor"),s=b("borderRadius"),a=b("borderSpacing"),p=b("borderWidth"),m=b("contrast"),h=b("grayscale"),v=b("hueRotate"),C=b("invert"),$=b("gap"),E=b("gradientColorStops"),D=b("gradientColorStopPositions"),_=b("inset"),w=b("margin"),O=b("opacity"),M=b("padding"),Ne=b("saturate"),me=b("scale"),ct=b("sepia"),ln=b("skew"),dn=b("space"),cn=b("translate"),sr=()=>["auto","contain","none"],ir=()=>["auto","hidden","clip","visible","scroll"],ar=()=>["auto",g,e],y=()=>[g,e],un=()=>["",B,V],ut=()=>["auto",ve,g],pn=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pt=()=>["solid","dashed","dotted","double","none"],hn=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],lr=()=>["start","end","center","between","around","evenly","stretch"],Te=()=>["","0",g],gn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[ve,g];return{cacheSize:500,separator:":",theme:{colors:[Oe],spacing:[B,V],blur:["none","",G,g],brightness:U(),borderColor:[o],borderRadius:["none","","full",G,g],borderSpacing:y(),borderWidth:un(),contrast:U(),grayscale:Te(),hueRotate:U(),invert:Te(),gap:y(),gradientColorStops:[o],gradientColorStopPositions:[Nn,V],inset:ar(),margin:ar(),opacity:U(),padding:y(),saturate:U(),scale:U(),sepia:Te(),skew:U(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":gn()}],"break-before":[{"break-before":gn()}],"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:[...pn(),g]}],overflow:[{overflow:ir()}],"overflow-x":[{"overflow-x":ir()}],"overflow-y":[{"overflow-y":ir()}],overscroll:[{overscroll:sr()}],"overscroll-x":[{"overscroll-x":sr()}],"overscroll-y":[{"overscroll-y":sr()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_e,g]}],basis:[{basis:ar()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:Te()}],shrink:[{shrink:Te()}],order:[{order:["first","last","none",_e,g]}],"grid-cols":[{"grid-cols":[Oe]}],"col-start-end":[{col:["auto",{span:["full",_e,g]},g]}],"col-start":[{"col-start":ut()}],"col-end":[{"col-end":ut()}],"grid-rows":[{"grid-rows":[Oe]}],"row-start-end":[{row:["auto",{span:[_e,g]},g]}],"row-start":[{"row-start":ut()}],"row-end":[{"row-end":ut()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[$]}],"gap-x":[{"gap-x":[$]}],"gap-y":[{"gap-y":[$]}],"justify-content":[{justify:["normal",...lr()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...lr(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...lr(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],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":[dn]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[dn]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,e]}],"min-w":[{"min-w":[g,e,"min","max","fit"]}],"max-w":[{"max-w":[g,e,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[g,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,e,"auto","min","max","fit"]}],"font-size":[{text:["base",G,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vt]}],"font-family":[{font:[Oe]}],"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",g]}],"line-clamp":[{"line-clamp":["none",ve,vt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[o]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[o]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,V]}],"underline-offset":[{"underline-offset":["auto",B,g]}],"text-decoration-color":[{decoration:[o]}],"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",g]}],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",g]}],"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:[...pn(),Fn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Vn]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[D]}],"gradient-via-pos":[{via:[D]}],"gradient-to-pos":[{to:[D]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],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:[...pt(),"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:pt()}],"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:["",...pt()]}],"outline-offset":[{"outline-offset":[B,g]}],"outline-w":[{outline:[B,V]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:un()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[B,V]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",G,Gn]}],"shadow-color":[{shadow:[Oe]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...hn(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":hn()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",G,g]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[C]}],saturate:[{saturate:[Ne]}],sepia:[{sepia:[ct]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[C]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[Ne]}],"backdrop-sepia":[{"backdrop-sepia":[ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[me]}],"scale-x":[{"scale-x":[me]}],"scale-y":[{"scale-y":[me]}],rotate:[{rotate:[_e,g]}],"translate-x":[{"translate-x":[cn]}],"translate-y":[{"translate-y":[cn]}],"skew-x":[{"skew-x":[ln]}],"skew-y":[{"skew-y":[ln]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",o]}],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",g]}],"caret-color":[{caret:[o]}],"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",g]}],fill:[{fill:[o,"none"]}],"stroke-w":[{stroke:[B,V,vt]}],stroke:[{stroke:[o,"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(...o){return Wn(fn(o))}class f extends l.LitElement{constructor(){super()}getFilteredAttributes(){const e={};return Array.from(this.attributes).forEach(n=>{this.getAttributesToExclude().includes(n.name)||(e[n.name]=n.value??"")}),e}isCustomPropertySet(e){const n=getComputedStyle(this).getPropertyValue(e).trim();return n!=="inherit"&&n.length>0}applyCustomClass(e,n,r=""){var s,a;let t="";e.some(p=>this.isCustomPropertySet(p))&&(t=r),t&&((a=(s=this.shadowRoot)==null?void 0:s.querySelector(n))==null||a.classList.add(t))}}function fr(){const o=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(o+Math.random()*16)%16|0;return(n=="x"?r:r&3|8).toString(16)})}const c=l.css`
|
|
1
|
+
(function(i,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("lit"),require("lit/decorators.js"),require("lit/directives/unsafe-html.js"),require("lit/html.js"),require("lit/directive.js"),require("lit/async-directive.js"),require("lit-element"),require("lit/directives/if-defined.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit/directives/unsafe-html.js","lit/html.js","lit/directive.js","lit/async-directive.js","lit-element","lit/directives/if-defined.js"],l):(i=typeof globalThis<"u"?globalThis:i||self,l(i["revotech-ui-kit"]={},i.lit,i.decorators_js,i.unsafeHtml_js,i.html_js,i.directive_js,i.asyncDirective_js,i.litElement,i.ifDefined_js))})(this,function(i,l,d,ir,cn,dt,un,pn,hn){"use strict";class sr extends un.AsyncDirective{constructor(){super(...arguments),this.prevData={}}render(e){return cn.nothing}update(e,[r]){var n;this.element!==e.element&&(this.element=e.element),this.host=((n=e.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(e){if(!e)return;const{prevData:r,element:n}=this;for(const t in e){const s=e[t];s!==r[t]&&(n[t]=s)}}groom(e){const{prevData:r,element:n}=this;if(r)for(const t in r)(!e||!(t in e)&&n[t]===r[t])&&(n[t]=void 0)}}dt.directive(sr);class ar extends sr{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(const r in e){const n=e[r];n!==this.eventData[r]&&this.applyEvent(r,n)}}applyEvent(e,r){const{prevData:n,element:t}=this;this.eventData[e]=r,n[e]&&t.removeEventListener(e,this,r),t.addEventListener(e,this,r)}groom(e){const{prevData:r,element:n}=this;if(r)for(const t in r)(!e||!(t in e)&&n[t]===r[t])&&this.groomEvent(t,r[t])}groomEvent(e,r){const{element:n}=this;delete this.eventData[e],n.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 n in e){const t=n.slice(1),s=e[n];r.removeEventListener(t,this,s)}}reconnected(){const{eventData:e,element:r}=this;for(const n in e){const t=n.slice(1),s=e[n];r.addEventListener(t,this,s)}}}dt.directive(ar);class gn extends ar{apply(e){if(!e)return;const{prevData:r,element:n}=this;for(const t in e){const s=e[t];if(s===r[t])continue;const a=t.slice(1);switch(t[0]){case"@":this.eventData[a]=s,this.applyEvent(a,s);break;case".":n[a]=s;break;case"?":s?n.setAttribute(a,""):n.removeAttribute(a);break;default:s!=null?n.setAttribute(t,String(s)):n.removeAttribute(t);break}}}groom(e){const{prevData:r,element:n}=this;if(r)for(const t in r){const s=t.slice(1);if(!e||!(t in e)&&n[s]===r[t])switch(t[0]){case"@":this.groomEvent(s,r[t]);break;case".":n[s]=void 0;break;case"?":n.removeAttribute(s);break;default:n.removeAttribute(t);break}}}}const $=dt.directive(gn);function lr(o){var e,r,n="";if(typeof o=="string"||typeof o=="number")n+=o;else if(typeof o=="object")if(Array.isArray(o)){var t=o.length;for(e=0;e<t;e++)o[e]&&(r=lr(o[e]))&&(n&&(n+=" "),n+=r)}else for(r in o)o[r]&&(n&&(n+=" "),n+=r);return n}function mn(){for(var o,e,r=0,n="",t=arguments.length;r<t;r++)(o=arguments[r])&&(e=lr(o))&&(n&&(n+=" "),n+=e);return n}const ct="-",vn=o=>{const e=bn(o),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=o;return{getClassGroupId:a=>{const p=a.split(ct);return p[0]===""&&p.length!==1&&p.shift(),dr(p,e)||fn(a)},getConflictingClassGroupIds:(a,p)=>{const m=r[a]||[];return p&&n[a]?[...m,...n[a]]:m}}},dr=(o,e)=>{var a;if(o.length===0)return e.classGroupId;const r=o[0],n=e.nextPart.get(r),t=n?dr(o.slice(1),n):void 0;if(t)return t;if(e.validators.length===0)return;const s=o.join(ct);return(a=e.validators.find(({validator:p})=>p(s)))==null?void 0:a.classGroupId},cr=/^\[(.+)\]$/,fn=o=>{if(cr.test(o)){const e=cr.exec(o)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},bn=o=>{const{theme:e,prefix:r}=o,n={nextPart:new Map,validators:[]};return yn(Object.entries(o.classGroups),r).forEach(([s,a])=>{ut(a,n,s,e)}),n},ut=(o,e,r,n)=>{o.forEach(t=>{if(typeof t=="string"){const s=t===""?e:ur(e,t);s.classGroupId=r;return}if(typeof t=="function"){if(wn(t)){ut(t(n),e,r,n);return}e.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(([s,a])=>{ut(a,ur(e,s),r,n)})})},ur=(o,e)=>{let r=o;return e.split(ct).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},wn=o=>o.isThemeGetter,yn=(o,e)=>e?o.map(([r,n])=>{const t=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,p])=>[e+a,p])):s);return[r,t]}):o,xn=o=>{if(o<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const t=(s,a)=>{r.set(s,a),e++,e>o&&(e=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return t(s,a),a},set(s,a){r.has(s)?r.set(s,a):t(s,a)}}},pr="!",Cn=o=>{const{separator:e,experimentalParseClassName:r}=o,n=e.length===1,t=e[0],s=e.length,a=p=>{const m=[];let h=0,v=0,x;for(let w=0;w<p.length;w++){let O=p[w];if(h===0){if(O===t&&(n||p.slice(w,w+s)===e)){m.push(p.slice(v,w)),v=w+s;continue}if(O==="/"){x=w;continue}}O==="["?h++:O==="]"&&h--}const C=m.length===0?p:p.substring(v),E=C.startsWith(pr),D=E?C.substring(1):C,_=x&&x>v?x-v:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:D,maybePostfixModifierPosition:_}};return r?p=>r({className:p,parseClassName:a}):a},$n=o=>{if(o.length<=1)return o;const e=[];let r=[];return o.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},_n=o=>({cache:xn(o.cacheSize),parseClassName:Cn(o),...vn(o)}),On=/\s+/,En=(o,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:t}=e,s=[],a=o.trim().split(On);let p="";for(let m=a.length-1;m>=0;m-=1){const h=a[m],{modifiers:v,hasImportantModifier:x,baseClassName:C,maybePostfixModifierPosition:E}=r(h);let D=!!E,_=n(D?C.substring(0,E):C);if(!_){if(!D){p=h+(p.length>0?" "+p:p);continue}if(_=n(C),!_){p=h+(p.length>0?" "+p:p);continue}D=!1}const w=$n(v).join(":"),O=x?w+pr:w,k=O+_;if(s.includes(k))continue;s.push(k);const Be=t(_,D);for(let me=0;me<Be.length;++me){const st=Be[me];s.push(O+st)}p=h+(p.length>0?" "+p:p)}return p};function Pn(){let o=0,e,r,n="";for(;o<arguments.length;)(e=arguments[o++])&&(r=hr(e))&&(n&&(n+=" "),n+=r);return n}const hr=o=>{if(typeof o=="string")return o;let e,r="";for(let n=0;n<o.length;n++)o[n]&&(e=hr(o[n]))&&(r&&(r+=" "),r+=e);return r};function Sn(o,...e){let r,n,t,s=a;function a(m){const h=e.reduce((v,x)=>x(v),o());return r=_n(h),n=r.cache.get,t=r.cache.set,s=p,p(m)}function p(m){const h=n(m);if(h)return h;const v=En(m,r);return t(m,v),v}return function(){return s(Pn.apply(null,arguments))}}const b=o=>{const e=r=>r[o]||[];return e.isThemeGetter=!0,e},gr=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dn=/^\d+\/\d+$/,kn=new Set(["px","full","screen"]),Mn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ln=/\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$/,In=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,An=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=o=>ve(o)||kn.has(o)||Dn.test(o),V=o=>fe(o,"length",Vn),ve=o=>!!o&&!Number.isNaN(Number(o)),pt=o=>fe(o,"number",ve),Oe=o=>!!o&&Number.isInteger(Number(o)),zn=o=>o.endsWith("%")&&ve(o.slice(0,-1)),g=o=>gr.test(o),G=o=>Mn.test(o),Bn=new Set(["length","size","percentage"]),Nn=o=>fe(o,Bn,mr),Tn=o=>fe(o,"position",mr),qn=new Set(["image","url"]),Un=o=>fe(o,qn,Hn),Fn=o=>fe(o,"",Gn),Ee=()=>!0,fe=(o,e,r)=>{const n=gr.exec(o);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},Vn=o=>Ln.test(o)&&!In.test(o),mr=()=>!1,Gn=o=>An.test(o),Hn=o=>Rn.test(o),Yn=Sn(()=>{const o=b("colors"),e=b("spacing"),r=b("blur"),n=b("brightness"),t=b("borderColor"),s=b("borderRadius"),a=b("borderSpacing"),p=b("borderWidth"),m=b("contrast"),h=b("grayscale"),v=b("hueRotate"),x=b("invert"),C=b("gap"),E=b("gradientColorStops"),D=b("gradientColorStopPositions"),_=b("inset"),w=b("margin"),O=b("opacity"),k=b("padding"),Be=b("saturate"),me=b("scale"),st=b("sepia"),rn=b("skew"),nn=b("space"),on=b("translate"),tr=()=>["auto","contain","none"],rr=()=>["auto","hidden","clip","visible","scroll"],nr=()=>["auto",g,e],y=()=>[g,e],sn=()=>["",B,V],at=()=>["auto",ve,g],an=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],lt=()=>["solid","dashed","dotted","double","none"],ln=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],or=()=>["start","end","center","between","around","evenly","stretch"],Ne=()=>["","0",g],dn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ve,g];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[B,V],blur:["none","",G,g],brightness:F(),borderColor:[o],borderRadius:["none","","full",G,g],borderSpacing:y(),borderWidth:sn(),contrast:F(),grayscale:Ne(),hueRotate:F(),invert:Ne(),gap:y(),gradientColorStops:[o],gradientColorStopPositions:[zn,V],inset:nr(),margin:nr(),opacity:F(),padding:y(),saturate:F(),scale:F(),sepia:Ne(),skew:F(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":dn()}],"break-before":[{"break-before":dn()}],"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:[...an(),g]}],overflow:[{overflow:rr()}],"overflow-x":[{"overflow-x":rr()}],"overflow-y":[{"overflow-y":rr()}],overscroll:[{overscroll:tr()}],"overscroll-x":[{"overscroll-x":tr()}],"overscroll-y":[{"overscroll-y":tr()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oe,g]}],basis:[{basis:nr()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:Ne()}],shrink:[{shrink:Ne()}],order:[{order:["first","last","none",Oe,g]}],"grid-cols":[{"grid-cols":[Ee]}],"col-start-end":[{col:["auto",{span:["full",Oe,g]},g]}],"col-start":[{"col-start":at()}],"col-end":[{"col-end":at()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[Oe,g]},g]}],"row-start":[{"row-start":at()}],"row-end":[{"row-end":at()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...or()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...or(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...or(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],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":[nn]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[nn]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,e]}],"min-w":[{"min-w":[g,e,"min","max","fit"]}],"max-w":[{"max-w":[g,e,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[g,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,e,"auto","min","max","fit"]}],"font-size":[{text:["base",G,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pt]}],"font-family":[{font:[Ee]}],"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",g]}],"line-clamp":[{"line-clamp":["none",ve,pt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[o]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[o]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...lt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,V]}],"underline-offset":[{"underline-offset":["auto",B,g]}],"text-decoration-color":[{decoration:[o]}],"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",g]}],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",g]}],"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:[...an(),Tn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Nn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Un]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[D]}],"gradient-via-pos":[{via:[D]}],"gradient-to-pos":[{to:[D]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],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:[...lt(),"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:lt()}],"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:["",...lt()]}],"outline-offset":[{"outline-offset":[B,g]}],"outline-w":[{outline:[B,V]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:sn()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[B,V]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",G,Fn]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...ln(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ln()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",G,g]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[x]}],saturate:[{saturate:[Be]}],sepia:[{sepia:[st]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[Be]}],"backdrop-sepia":[{"backdrop-sepia":[st]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[me]}],"scale-x":[{"scale-x":[me]}],"scale-y":[{"scale-y":[me]}],rotate:[{rotate:[Oe,g]}],"translate-x":[{"translate-x":[on]}],"translate-y":[{"translate-y":[on]}],"skew-x":[{"skew-x":[rn]}],"skew-y":[{"skew-y":[rn]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",o]}],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",g]}],"caret-color":[{caret:[o]}],"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",g]}],fill:[{fill:[o,"none"]}],"stroke-w":[{stroke:[B,V,pt]}],stroke:[{stroke:[o,"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(...o){return Yn(mn(o))}class f 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,n=""){var s,a;let t="";e.some(p=>this.isCustomPropertySet(p))&&(t=n),t&&((a=(s=this.shadowRoot)==null?void 0:s.querySelector(r))==null||a.classList.add(t))}removeDuplicateContent(){var n,t;const e=document.createTreeWalker(this,NodeFilter.SHOW_TEXT,null);let r;for(;r=e.nextNode();)if((n=r.textContent)!=null&&n.trim()){(t=r.parentNode)==null||t.removeChild(r);break}}}function vr(){const o=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const n=(o+Math.random()*16)%16|0;return(r=="x"?n:n&3|8).toString(16)})}const c=l.css`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: 'GeistSans';
|
|
4
4
|
|
|
@@ -2837,7 +2837,7 @@ body {
|
|
|
2837
2837
|
.\\[\\&_svg\\]\\:shrink-0 svg {
|
|
2838
2838
|
flex-shrink: 0;
|
|
2839
2839
|
}
|
|
2840
|
-
`,
|
|
2840
|
+
`,fr=new CSSStyleSheet;fr.replaceSync(c.cssText||c.toString());class br extends l.LitElement{constructor(){super()}connectedCallback(){super.connectedCallback(),this.shadowRoot?(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,fr],this.moveChildrenToShadow()):console.error("Shadow root not available in ShadowWrapper")}moveChildrenToShadow(){const e=Array.from(this.children);console.log("Moving children:",e),e.forEach(r=>{const n=document.createElement("div");n.className="wrapper",n.appendChild(r.cloneNode(!0)),this.shadowRoot.appendChild(n),r.remove()})}render(){return l.html``}}br.styles=l.css`
|
|
2841
2841
|
:host {
|
|
2842
2842
|
display: block;
|
|
2843
2843
|
border: 2px solid black;
|
|
@@ -2846,26 +2846,18 @@ body {
|
|
|
2846
2846
|
.wrapper {
|
|
2847
2847
|
display: block;
|
|
2848
2848
|
}
|
|
2849
|
-
`,customElements.define("shadow-wrapper",
|
|
2849
|
+
`,customElements.define("shadow-wrapper",br);var J=(o=>(o.MULTIPLE="multiple",o.SINGLE="single",o))(J||{}),Xn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,ht=(o,e,r,n)=>{for(var t=n>1?void 0:n?Wn(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Xn(e,r,t),t};let L=class extends f{constructor(){super(...arguments),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=o=>{const e=o.target.closest("rtg-accordion-trigger");!e||!this._accordion||(o.preventDefault(),o.stopPropagation(),this._accordion.raiseEvent(this.value),e.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof j);)o=o.parentElement;return o}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var o;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(o=this._accordion)==null||o.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var o;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(o=this._accordion)==null||o.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(o=>o instanceof mt||o instanceof vt)}render(){var r;const o=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),e=this._initialChildren.length?this._initialChildren:this.filterChildren();return l.html`
|
|
2850
2850
|
<div
|
|
2851
|
-
|
|
2852
|
-
|
|
2851
|
+
data-state=${o?"open":"closed"}
|
|
2852
|
+
class="w-full border-b"
|
|
2853
|
+
value=${this.value}
|
|
2853
2854
|
role="tablist"
|
|
2854
2855
|
data-orientation="vertical"
|
|
2855
|
-
data-state="active"
|
|
2856
|
-
class="w-full border-b"
|
|
2857
|
-
value="${this.value}"
|
|
2858
|
-
@click=${this.handleClick}
|
|
2859
2856
|
part="accordion-item"
|
|
2860
2857
|
>
|
|
2861
|
-
|
|
2862
|
-
<slot name="accordion-trigger"></slot>
|
|
2863
|
-
</h3>
|
|
2864
|
-
<div>
|
|
2865
|
-
${this._accordion&&this._accordion.selectedItems.includes(this.value)?L.html`<slot name="accordion-content"></slot>`:L.nothing}
|
|
2866
|
-
</div>
|
|
2858
|
+
${e}
|
|
2867
2859
|
</div>
|
|
2868
|
-
`}};
|
|
2860
|
+
`}};ht([d.property({type:String})],L.prototype,"value",2),ht([d.property({type:Number})],L.prototype,"tabindex",2),L=ht([d.customElement("rtg-accordion-item")],L);function Kn(){return l.svg` <svg
|
|
2869
2861
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
2870
2862
|
xmlns="http://www.w3.org/2000/svg"
|
|
2871
2863
|
width="24"
|
|
@@ -2880,7 +2872,7 @@ body {
|
|
|
2880
2872
|
<path d="m7 15 5 5 5-5"></path>
|
|
2881
2873
|
<path d="m7 9 5-5 5 5"></path>
|
|
2882
2874
|
</svg>
|
|
2883
|
-
`}function
|
|
2875
|
+
`}function wr(){return l.svg`
|
|
2884
2876
|
<svg
|
|
2885
2877
|
class="shrink-0 size-3.5 text-blue-600 dark:text-blue-500"
|
|
2886
2878
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -2895,7 +2887,7 @@ body {
|
|
|
2895
2887
|
>
|
|
2896
2888
|
<path d="M20 6 9 17l-5-5"></path>
|
|
2897
2889
|
</svg>
|
|
2898
|
-
`}function
|
|
2890
|
+
`}function Zn(){return l.svg` <svg
|
|
2899
2891
|
xmlns="http://www.w3.org/2000/svg"
|
|
2900
2892
|
width = "24"
|
|
2901
2893
|
height = "24"
|
|
@@ -2909,7 +2901,7 @@ body {
|
|
|
2909
2901
|
<circle cx="11" cy = "11" r = "8" > </circle>
|
|
2910
2902
|
<path d="m21 21-4.3-4.3"></path >
|
|
2911
2903
|
</svg>
|
|
2912
|
-
`}function
|
|
2904
|
+
`}function gt(){return l.svg` <svg
|
|
2913
2905
|
xmlns="http://www.w3.org/2000/svg"
|
|
2914
2906
|
width="24"
|
|
2915
2907
|
height="24"
|
|
@@ -2923,8 +2915,8 @@ body {
|
|
|
2923
2915
|
>
|
|
2924
2916
|
<circle cx="12" cy="12" r="10"></circle>
|
|
2925
2917
|
</svg>
|
|
2926
|
-
`}function
|
|
2927
|
-
`}function
|
|
2918
|
+
`}function yr(){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>
|
|
2919
|
+
`}function Jn(){return l.svg` <svg
|
|
2928
2920
|
xmlns="http://www.w3.org/2000/svg"
|
|
2929
2921
|
width="24"
|
|
2930
2922
|
height="24"
|
|
@@ -2938,7 +2930,7 @@ body {
|
|
|
2938
2930
|
>
|
|
2939
2931
|
<circle cx="12" cy="12" r="10"></circle></svg
|
|
2940
2932
|
>
|
|
2941
|
-
`}function
|
|
2933
|
+
`}function jn(){return l.svg` <svg
|
|
2942
2934
|
xmlns="http://www.w3.org/2000/svg"
|
|
2943
2935
|
width="24"
|
|
2944
2936
|
height="24"
|
|
@@ -2953,142 +2945,65 @@ body {
|
|
|
2953
2945
|
<path d="M18 6 6 18"></path>
|
|
2954
2946
|
<path d="m6 6 12 12"></path>
|
|
2955
2947
|
</svg>
|
|
2956
|
-
`}function
|
|
2948
|
+
`}function Qn(){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">
|
|
2957
2949
|
<circle cx="12.1" cy="12.1" r="1"></circle>
|
|
2958
|
-
</svg>`}var
|
|
2950
|
+
</svg>`}var eo=Object.defineProperty,to=Object.getOwnPropertyDescriptor,ro=(o,e,r,n)=>{for(var t=n>1?void 0:n?to(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&eo(e,r,t),t};let mt=class extends f{get _item(){let o=this.parentElement;for(;o&&!(o instanceof L);)o=o.parentElement;return o}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof j);)o=o.parentElement;return o}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(o){this.removeDuplicateContent()}hasActiveState(){var o,e;return!!((o=this._item)!=null&&o.value)&&!!((e=this._accordion)!=null&&e.selectedItems.includes(this._item.value))}render(){var e;const o=this.hasActiveState();return l.html`
|
|
2959
2951
|
<button
|
|
2960
|
-
${x(o)}
|
|
2961
2952
|
type="button"
|
|
2962
2953
|
part="accordion-trigger"
|
|
2963
2954
|
role="tab"
|
|
2964
|
-
value=${(
|
|
2965
|
-
aria-selected=${
|
|
2966
|
-
aria-
|
|
2967
|
-
|
|
2968
|
-
data-state=${e?"open":"closed"}
|
|
2955
|
+
value=${((e=this._item)==null?void 0:e.value)||""}
|
|
2956
|
+
aria-selected=${o}
|
|
2957
|
+
aria-expanded=${o}
|
|
2958
|
+
data-state=${o?"open":"closed"}
|
|
2969
2959
|
class="w-full flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180"
|
|
2970
2960
|
tabindex="-1"
|
|
2971
2961
|
data-orientation="horizontal"
|
|
2972
|
-
data-radix-collection-item
|
|
2962
|
+
data-radix-collection-item
|
|
2973
2963
|
>
|
|
2974
|
-
|
|
2975
|
-
${$r()}
|
|
2964
|
+
${ir.unsafeHTML(this.textContent||"")}${yr()}
|
|
2976
2965
|
</button>
|
|
2977
|
-
`}};
|
|
2966
|
+
`}};mt=ro([d.customElement("rtg-accordion-trigger")],mt);var no=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,io=(o,e,r,n)=>{for(var t=n>1?void 0:n?oo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&no(e,r,t),t};let vt=class extends f{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof j);)o=o.parentElement;return o}get _item(){let o=this.parentElement;for(;o&&!(o instanceof L);)o=o.parentElement;return o}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var o;super.connectedCallback(),(o=this._accordion)==null||o.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this._accordion)==null||o.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(o){this.removeDuplicateContent()}hasActiveState(){var o,e;return!!((o=this._item)!=null&&o.value)&&!!((e=this._accordion)!=null&&e.selectedItems.includes(this._item.value))}render(){var e;const o=this.hasActiveState();return l.html`
|
|
2978
2967
|
<div
|
|
2979
|
-
|
|
2968
|
+
?hidden=${!o}
|
|
2969
|
+
@click=${r=>r.stopPropagation()}
|
|
2980
2970
|
part="accordion-content"
|
|
2981
|
-
data-state=${this.hasActiveState()?"open":"closed"}
|
|
2982
2971
|
role="region"
|
|
2972
|
+
data-state=${o?"open":"closed"}
|
|
2983
2973
|
data-orientation="vertical"
|
|
2984
|
-
class="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2974
|
+
class="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down text-wrap"
|
|
2975
|
+
style=${`
|
|
2976
|
+
--radix-accordion-content-height: var(--radix-collapsible-content-height);
|
|
2977
|
+
--radix-accordion-content-width: var(--radix-collapsible-content-width);
|
|
2978
|
+
--radix-collapsible-content-height: 36px;
|
|
2979
|
+
--radix-collapsible-content-width: 385px;
|
|
2980
|
+
`}
|
|
2991
2981
|
>
|
|
2992
2982
|
<div class="pb-4 pt-0">
|
|
2993
|
-
|
|
2983
|
+
${ir.unsafeHTML(((e=this.textContent)==null?void 0:e.trim())||"")}
|
|
2994
2984
|
</div>
|
|
2995
2985
|
</div>
|
|
2996
|
-
`}};
|
|
2986
|
+
`}};vt=io([d.customElement("rtg-accordion-content")],vt);var so=Object.defineProperty,ao=Object.getOwnPropertyDescriptor,ft=(o,e,r,n)=>{for(var t=n>1?void 0:n?ao(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&so(e,r,t),t};let j=class extends f{constructor(){super(...arguments),this.twClass="",this.type=J.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(o=>o instanceof L)}willUpdate(o){o.has("type")&&(this.type===J.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(e=>{e instanceof L&&e.requestUpdate()}))}updated(o){o.has("type")&&this._initialChildren.forEach(e=>{e instanceof L&&e.requestUpdate()})}setSelectedItems(o){const e=this.selectedItems.indexOf(o);if(e>-1)if(this.type===J.SINGLE)this.selectedItems=[];else if(this.type===J.MULTIPLE)this.selectedItems.splice(e,1);else throw new Error("Invalid accordion type");else if(this.type===J.SINGLE)this.selectedItems=[o];else if(this.type===J.MULTIPLE)this.selectedItems.push(o);else throw new Error("Invalid accordion type")}raiseEvent(o){this.setSelectedItems(o),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){const o=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(e=>e instanceof L);return l.html`
|
|
2997
2987
|
<div
|
|
2998
2988
|
data-orientation="vertical"
|
|
2999
|
-
${
|
|
2989
|
+
${$(this.getFilteredAttributes())}
|
|
3000
2990
|
part="accordion"
|
|
3001
|
-
class="${this.
|
|
3002
|
-
>
|
|
3003
|
-
<slot name="accordion-item"></slot>
|
|
3004
|
-
</div>
|
|
3005
|
-
`}};H.styles=[l.css``,c],yt([d.property({type:String})],H.prototype,"twCLass",2),yt([d.property({type:String})],H.prototype,"type",2),H=yt([d.customElement("rtg-accordion")],H);function Or(o){var e,n,r="";if(typeof o=="string"||typeof o=="number")r+=o;else if(typeof o=="object")if(Array.isArray(o))for(e=0;e<o.length;e++)o[e]&&(n=Or(o[e]))&&(r&&(r+=" "),r+=n);else for(e in o)o[e]&&(r&&(r+=" "),r+=e);return r}function co(){for(var o,e,n=0,r="";n<arguments.length;)(o=arguments[n++])&&(e=Or(o))&&(r&&(r+=" "),r+=e);return r}const Er=o=>typeof o=="boolean"?"".concat(o):o===0?"0":o,Pr=co,k=(o,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Pr(o,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:t,defaultVariants:s}=e,a=Object.keys(t).map(h=>{const v=n==null?void 0:n[h],C=s==null?void 0:s[h];if(v===null)return null;const $=Er(v)||Er(C);return t[h][$]}),p=n&&Object.entries(n).reduce((h,v)=>{let[C,$]=v;return $===void 0||(h[C]=$),h},{}),m=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((h,v)=>{let{class:C,className:$,...E}=v;return Object.entries(E).every(D=>{let[_,w]=D;return Array.isArray(w)?w.includes({...s,...p}[_]):{...s,...p}[_]===w})?[...h,C,$]:h},[]);return Pr(o,a,m,n==null?void 0:n.class,n==null?void 0:n.className)},Sr=k("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 uo=Object.defineProperty,po=Object.getOwnPropertyDescriptor,ho=(o,e,n,r)=>{for(var t=r>1?void 0:r?po(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&uo(e,n,t),t};i.AlertTitle=class extends l.LitElement{render(){return l.html`<slot part="alert-title"></slot>`}},i.AlertTitle.styles=l.css`
|
|
3006
|
-
:host {
|
|
3007
|
-
display: block;
|
|
3008
|
-
font-weight: bold;
|
|
3009
|
-
margin-bottom: 0.5rem;
|
|
3010
|
-
}
|
|
3011
|
-
`,i.AlertTitle=ho([d.customElement("rtg-alert-title")],i.AlertTitle);var go=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,vo=(o,e,n,r)=>{for(var t=r>1?void 0:r?mo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&go(e,n,t),t};i.AlertDescription=class extends l.LitElement{render(){return l.html`<slot part="alert-description"></slot>`}},i.AlertDescription.styles=l.css`
|
|
3012
|
-
:host {
|
|
3013
|
-
display: block;
|
|
3014
|
-
}
|
|
3015
|
-
`,i.AlertDescription=vo([d.customElement("rtg-alert-description")],i.AlertDescription);var fo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,Fe=(o,e,n,r)=>{for(var t=r>1?void 0:r?bo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&fo(e,n,t),t};i.Alert=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.variant="info",this.size="default"}get alertClasses(){return Sr({variant:this.variant,size:this.size})}render(){return l.html`
|
|
3016
|
-
<div class="alert ${this.alertClasses} ${this.twCLass}" part="alert">
|
|
3017
|
-
<slot name="title"></slot>
|
|
3018
|
-
<slot name="description"></slot>
|
|
3019
|
-
</div>
|
|
3020
|
-
`}},i.Alert.styles=[l.css`
|
|
3021
|
-
:host {
|
|
3022
|
-
display: block;
|
|
3023
|
-
margin-bottom: 1rem;
|
|
3024
|
-
}
|
|
3025
|
-
.alert {
|
|
3026
|
-
border: 1px solid transparent;
|
|
3027
|
-
border-radius: 0.375rem;
|
|
3028
|
-
}
|
|
3029
|
-
.title {
|
|
3030
|
-
font-weight: bold;
|
|
3031
|
-
margin-bottom: 0.5rem;
|
|
3032
|
-
}
|
|
3033
|
-
`,c],i.Alert.alertVairants=Sr,Fe([d.property({type:String})],i.Alert.prototype,"twCLass",2),Fe([d.property({type:String})],i.Alert.prototype,"variant",2),Fe([d.property({type:String})],i.Alert.prototype,"size",2),i.Alert=Fe([d.customElement("rtg-alert")],i.Alert);var wo=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,xt=(o,e,n,r)=>{for(var t=r>1?void 0:r?yo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&wo(e,n,t),t};i.AspectRatio=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.ratio=16/9}render(){const e=1/this.ratio*100;return l.html`
|
|
3034
|
-
<div
|
|
3035
|
-
class="${u("aspect-ratio-wrapper bg-muted",this.className,this.twCLass)} "
|
|
3036
|
-
style="padding-top: ${e}%;"
|
|
3037
|
-
part="aspect-ratio"
|
|
2991
|
+
class="${this.twClass} w-full"
|
|
3038
2992
|
>
|
|
3039
|
-
|
|
3040
|
-
<slot></slot>
|
|
3041
|
-
</div>
|
|
2993
|
+
${o}
|
|
3042
2994
|
</div>
|
|
3043
|
-
`}},i.
|
|
3044
|
-
.aspect-ratio-wrapper {
|
|
3045
|
-
position: relative;
|
|
3046
|
-
width: 100%;
|
|
3047
|
-
overflow: hidden;
|
|
3048
|
-
}
|
|
3049
|
-
.aspect-ratio-inner {
|
|
3050
|
-
position: absolute;
|
|
3051
|
-
top: 0;
|
|
3052
|
-
left: 0;
|
|
3053
|
-
width: 100%;
|
|
3054
|
-
height: 100%;
|
|
3055
|
-
}
|
|
3056
|
-
`,c],xt([d.property({type:String})],i.AspectRatio.prototype,"twCLass",2),xt([d.property({type:Number})],i.AspectRatio.prototype,"ratio",2),i.AspectRatio=xt([d.customElement("rtg-aspect-ratio")],i.AspectRatio);const xo="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",Co="aspect-square h-full w-full",$o="flex h-full w-full items-center justify-center rounded-full bg-muted";var _o=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,Dr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Oo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&_o(e,n,t),t};let Ue=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
|
3057
|
-
<span
|
|
3058
|
-
class="${u(xo,this.className,this.twCLass)}"
|
|
3059
|
-
part="avatar"
|
|
3060
|
-
>
|
|
3061
|
-
<slot></slot>
|
|
3062
|
-
</span>
|
|
3063
|
-
`}};Ue.styles=[l.css``,c],Dr([d.property({type:String})],Ue.prototype,"twCLass",2),Ue=Dr([d.customElement("rtg-avatar")],Ue);var Eo=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,So=(o,e,n,r)=>{for(var t=r>1?void 0:r?Po(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Eo(e,n,t),t};let Ct=class extends l.LitElement{render(){return l.html`
|
|
3064
|
-
<span
|
|
3065
|
-
class="${u($o,this.className)}"
|
|
3066
|
-
style="width:40px;height:40px"
|
|
3067
|
-
part="avatar-fallback"
|
|
3068
|
-
>
|
|
3069
|
-
<slot></slot>
|
|
3070
|
-
</span>
|
|
3071
|
-
`}};Ct.styles=[l.css``,c],Ct=So([d.customElement("rtg-avatar-fallback")],Ct);var Do=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,$t=(o,e,n,r)=>{for(var t=r>1?void 0:r?Mo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Do(e,n,t),t};let Pe=class extends l.LitElement{constructor(){super(...arguments),this.alt="@shadcn",this.src="https://github.com/shadcn.png"}render(){return l.html`
|
|
3072
|
-
<img
|
|
3073
|
-
class="${u(Co,this.className)}"
|
|
3074
|
-
alt="${this.alt}"
|
|
3075
|
-
src="${this.src}"
|
|
3076
|
-
part="avatar-image"
|
|
3077
|
-
>
|
|
3078
|
-
<slot></slot>
|
|
3079
|
-
</img>
|
|
3080
|
-
`}};Pe.styles=[l.css``,c],$t([d.property({type:String})],Pe.prototype,"alt",2),$t([d.property({type:String})],Pe.prototype,"src",2),Pe=$t([d.customElement("rtg-avatar-image")],Pe);const ko=k("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 Lo=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,Y=(o,e,n,r)=>{for(var t=r>1?void 0:r?Io(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Lo(e,n,t),t};i.Button=class extends f{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`
|
|
2995
|
+
`}};ft([d.property({type:String})],j.prototype,"twClass",2),ft([d.property({type:String})],j.prototype,"type",2),j=ft([d.customElement("rtg-accordion")],j);function xr(o){var e,r,n="";if(typeof o=="string"||typeof o=="number")n+=o;else if(typeof o=="object")if(Array.isArray(o))for(e=0;e<o.length;e++)o[e]&&(r=xr(o[e]))&&(n&&(n+=" "),n+=r);else for(e in o)o[e]&&(n&&(n+=" "),n+=e);return n}function lo(){for(var o,e,r=0,n="";r<arguments.length;)(o=arguments[r++])&&(e=xr(o))&&(n&&(n+=" "),n+=e);return n}const Cr=o=>typeof o=="boolean"?"".concat(o):o===0?"0":o,$r=lo,M=(o,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return $r(o,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:t,defaultVariants:s}=e,a=Object.keys(t).map(h=>{const v=r==null?void 0:r[h],x=s==null?void 0:s[h];if(v===null)return null;const C=Cr(v)||Cr(x);return t[h][C]}),p=r&&Object.entries(r).reduce((h,v)=>{let[x,C]=v;return C===void 0||(h[x]=C),h},{}),m=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((h,v)=>{let{class:x,className:C,...E}=v;return Object.entries(E).every(D=>{let[_,w]=D;return Array.isArray(w)?w.includes({...s,...p}[_]):{...s,...p}[_]===w})?[...h,x,C]:h},[]);return $r(o,a,m,r==null?void 0:r.class,r==null?void 0:r.className)},co=M("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 uo=Object.defineProperty,po=Object.getOwnPropertyDescriptor,H=(o,e,r,n)=>{for(var t=n>1?void 0:n?po(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&uo(e,r,t),t};i.Button=class extends f{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`
|
|
3081
2996
|
<button
|
|
3082
2997
|
part="button"
|
|
3083
2998
|
type="${this.type}"
|
|
3084
|
-
${
|
|
2999
|
+
${$(e)}
|
|
3085
3000
|
?disabled="${this.disabled}"
|
|
3086
3001
|
class="${u(i.Button.buttonVariants({variant:this.variant,size:this.size,className:this.className}))} ${this.externalClass} ${this.isCustomClass?"rtg-button-custom-class":""}"
|
|
3087
3002
|
@click="${this.handleClick}"
|
|
3088
3003
|
>
|
|
3089
3004
|
<slot></slot>
|
|
3090
3005
|
</button>
|
|
3091
|
-
`}},i.Button.buttonVariants=
|
|
3006
|
+
`}},i.Button.buttonVariants=co,i.Button.styles=[l.css`
|
|
3092
3007
|
:host {
|
|
3093
3008
|
--rtg-button-bg: unset;
|
|
3094
3009
|
--rtg-button-color: unset;
|
|
@@ -3101,52 +3016,40 @@ body {
|
|
|
3101
3016
|
border-radius: var(--rtg-button-radius, unset) !important;
|
|
3102
3017
|
height: var(--rtg-button-height, unset) !important;
|
|
3103
3018
|
}
|
|
3104
|
-
`,c],
|
|
3105
|
-
<div
|
|
3106
|
-
${x(e)}
|
|
3107
|
-
id="${this.id}"
|
|
3108
|
-
part="badge"
|
|
3109
|
-
class="
|
|
3110
|
-
${u(i.Badge.badgeVariants({variant:this.variant,className:this.className}))},
|
|
3111
|
-
${this.twCLass}
|
|
3112
|
-
"
|
|
3113
|
-
>
|
|
3114
|
-
<slot></slot>
|
|
3115
|
-
</div>
|
|
3116
|
-
`}},i.Badge.badgeVariants=Ao,i.Badge.styles=[l.css``,c],Ve([d.property({type:String})],i.Badge.prototype,"twCLass",2),Ve([d.property({type:String})],i.Badge.prototype,"variant",2),Ve([d.property({type:String})],i.Badge.prototype,"id",2),i.Badge=Ve([d.customElement("rtg-badge")],i.Badge);var Bo=Object.defineProperty,No=Object.getOwnPropertyDescriptor,To=(o,e,n,r)=>{for(var t=r>1?void 0:r?No(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Bo(e,n,t),t};i.CardTitle=class extends l.LitElement{render(){return l.html` <slot part="card-title"></slot> `}},i.CardTitle.styles=[l.css``,c],i.CardTitle=To([d.customElement("rtg-card-title")],i.CardTitle);var qo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Uo=(o,e,n,r)=>{for(var t=r>1?void 0:r?Fo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&qo(e,n,t),t};i.CardHeader=class extends l.LitElement{render(){return l.html` <slot part="card-header"></slot> `}},i.CardHeader.styles=[l.css``,c],i.CardHeader=Uo([d.customElement("rtg-card-header")],i.CardHeader);var Vo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Ho=(o,e,n,r)=>{for(var t=r>1?void 0:r?Go(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Vo(e,n,t),t};i.CardFooter=class extends l.LitElement{render(){return l.html` <slot part="card-footer"></slot> `}},i.CardFooter.styles=[l.css``,c],i.CardFooter=Ho([d.customElement("rtg-card-footer")],i.CardFooter);var Yo=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Wo=(o,e,n,r)=>{for(var t=r>1?void 0:r?Xo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Yo(e,n,t),t};i.CardDescription=class extends l.LitElement{render(){return l.html` <slot part="card-description"></slot> `}},i.CardDescription.styles=[l.css``,c],i.CardDescription=Wo([d.customElement("rtg-card-description")],i.CardDescription);var Ko=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,Jo=(o,e,n,r)=>{for(var t=r>1?void 0:r?Zo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Ko(e,n,t),t};i.CardContent=class extends l.LitElement{render(){return l.html` <slot part="card-content"></slot> `}},i.CardContent.styles=[l.css``,c],i.CardContent=Jo([d.customElement("rtg-card-content")],i.CardContent);var Qo=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,es=(o,e,n,r)=>{for(var t=r>1?void 0:r?jo(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Qo(e,n,t),t};i.Card=class extends l.LitElement{render(){return l.html`<div
|
|
3019
|
+
`,c],H([d.property({type:Function})],i.Button.prototype,"click",2),H([d.property({type:Boolean})],i.Button.prototype,"disabled",2),H([d.property({type:String})],i.Button.prototype,"type",2),H([d.property({type:String})],i.Button.prototype,"variant",2),H([d.property({type:String})],i.Button.prototype,"size",2),H([d.property({type:String})],i.Button.prototype,"externalClass",2),H([d.property({type:String})],i.Button.prototype,"isCustomClass",2),i.Button=H([d.customElement("rtg-button")],i.Button);var ho=Object.defineProperty,go=Object.getOwnPropertyDescriptor,mo=(o,e,r,n)=>{for(var t=n>1?void 0:n?go(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ho(e,r,t),t};i.CardTitle=class extends l.LitElement{render(){return l.html` <slot part="card-title"></slot> `}},i.CardTitle.styles=[l.css``,c],i.CardTitle=mo([d.customElement("rtg-card-title")],i.CardTitle);var vo=Object.defineProperty,fo=Object.getOwnPropertyDescriptor,bo=(o,e,r,n)=>{for(var t=n>1?void 0:n?fo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&vo(e,r,t),t};i.CardHeader=class extends l.LitElement{render(){return l.html` <slot part="card-header"></slot> `}},i.CardHeader.styles=[l.css``,c],i.CardHeader=bo([d.customElement("rtg-card-header")],i.CardHeader);var wo=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,xo=(o,e,r,n)=>{for(var t=n>1?void 0:n?yo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&wo(e,r,t),t};i.CardFooter=class extends l.LitElement{render(){return l.html` <slot part="card-footer"></slot> `}},i.CardFooter.styles=[l.css``,c],i.CardFooter=xo([d.customElement("rtg-card-footer")],i.CardFooter);var Co=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,_o=(o,e,r,n)=>{for(var t=n>1?void 0:n?$o(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Co(e,r,t),t};i.CardDescription=class extends l.LitElement{render(){return l.html` <slot part="card-description"></slot> `}},i.CardDescription.styles=[l.css``,c],i.CardDescription=_o([d.customElement("rtg-card-description")],i.CardDescription);var Oo=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,Po=(o,e,r,n)=>{for(var t=n>1?void 0:n?Eo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Oo(e,r,t),t};i.CardContent=class extends l.LitElement{render(){return l.html` <slot part="card-content"></slot> `}},i.CardContent.styles=[l.css``,c],i.CardContent=Po([d.customElement("rtg-card-content")],i.CardContent);var So=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,ko=(o,e,r,n)=>{for(var t=n>1?void 0:n?Do(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&So(e,r,t),t};i.Card=class extends l.LitElement{render(){return l.html`<div
|
|
3117
3020
|
part="card"
|
|
3118
3021
|
class="rounded-lg border bg-card text-card-foreground shadow-sm p-6"
|
|
3119
3022
|
id="rtg-card-id"
|
|
3120
3023
|
>
|
|
3121
3024
|
<slot></slot>
|
|
3122
|
-
</div>`}},i.Card.styles=[l.css``,c],i.Card=
|
|
3025
|
+
</div>`}},i.Card.styles=[l.css``,c],i.Card=ko([d.customElement("rtg-card")],i.Card);var Mo=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Io=(o,e,r,n)=>{for(var t=n>1?void 0:n?Lo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Mo(e,r,t),t};let bt=class extends f{getAttributesToExclude(){return[""]}get _collapsible(){let o=this.parentElement;for(;o&&!(o instanceof Q);)o=o.parentElement;return o}onTrigger(){const o=this._collapsible;o&&(o.open=!o.open,o.onOpenChange())}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3123
3026
|
<div
|
|
3124
3027
|
@click=${this.onTrigger}
|
|
3125
|
-
${
|
|
3028
|
+
${$(o)}
|
|
3126
3029
|
part="collapsible-trigger"
|
|
3127
3030
|
>
|
|
3128
3031
|
<slot></slot>
|
|
3129
3032
|
</div>
|
|
3130
|
-
`}};
|
|
3033
|
+
`}};bt.styles=[l.css``,c],bt=Io([d.customElement("rtg-collapsible-trigger")],bt);var Ao=Object.defineProperty,Ro=Object.getOwnPropertyDescriptor,zo=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ro(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ao(e,r,t),t};let wt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3131
3034
|
<div
|
|
3132
|
-
${
|
|
3035
|
+
${$(o)}
|
|
3133
3036
|
class="${this.className}"
|
|
3134
3037
|
style="--radix-collapsible-content-height: 100px; --radix-collapsible-content-width: 350px;"
|
|
3135
3038
|
part="collapsible-content"
|
|
3136
3039
|
>
|
|
3137
3040
|
<slot></slot>
|
|
3138
3041
|
</div>
|
|
3139
|
-
`}};
|
|
3042
|
+
`}};wt.styles=[l.css``,c],wt=zo([d.customElement("rtg-collapsible-content")],wt);var Bo=Object.defineProperty,No=Object.getOwnPropertyDescriptor,Te=(o,e,r,n)=>{for(var t=n>1?void 0:n?No(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Bo(e,r,t),t};let Q=class extends f{constructor(){super(...arguments),this.open=!1,this.onOpenChange=()=>{},this.twCLass=""}getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3140
3043
|
<div
|
|
3141
3044
|
data-state="${this.open?"open":"closed"}"
|
|
3142
|
-
${
|
|
3045
|
+
${$(o)}
|
|
3143
3046
|
class="${this.twCLass}"
|
|
3144
3047
|
part="collapsible"
|
|
3145
3048
|
>
|
|
3146
3049
|
<slot></slot>
|
|
3147
3050
|
${this.open?l.html`<slot name="collapsible-content"></slot>`:l.nothing}
|
|
3148
3051
|
</div>
|
|
3149
|
-
`}};
|
|
3052
|
+
`}};Q.styles=[l.css``,c],Te([d.property({type:Boolean})],Q.prototype,"open",2),Te([d.property({type:Function})],Q.prototype,"onOpenChange",2),Te([d.property({type:String})],Q.prototype,"twCLass",2),Q=Te([d.customElement("rtg-collapsible")],Q);const qe="closed";var To=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,yt=(o,e,r,n)=>{for(var t=n>1?void 0:n?qo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&To(e,r,t),t};i.ContextMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=qe,this.isOpen=!1}get _contextMenu(){let e=this.parentElement;for(;e&&!(e instanceof i.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"),n=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(n!=null&&n.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
3150
3053
|
<div
|
|
3151
3054
|
part="context-menu-content"
|
|
3152
3055
|
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"
|
|
@@ -3155,7 +3058,7 @@ body {
|
|
|
3155
3058
|
>
|
|
3156
3059
|
<slot></slot>
|
|
3157
3060
|
</div>
|
|
3158
|
-
`}},i.ContextMenuContent.styles=[l.css``,c],
|
|
3061
|
+
`}},i.ContextMenuContent.styles=[l.css``,c],yt([d.property({attribute:"data-state",type:String})],i.ContextMenuContent.prototype,"state",2),yt([d.state()],i.ContextMenuContent.prototype,"isOpen",2),i.ContextMenuContent=yt([d.customElement("rtg-context-menu-content")],i.ContextMenuContent);var Uo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,ee=(o,e,r,n)=>{for(var t=n>1?void 0:n?Fo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Uo(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.ContextMenuCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3159
3062
|
<div
|
|
3160
3063
|
part="context-menu-checkbox"
|
|
3161
3064
|
class="${u("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)}"
|
|
@@ -3195,7 +3098,7 @@ body {
|
|
|
3195
3098
|
height: 16px;
|
|
3196
3099
|
display: inline-block;
|
|
3197
3100
|
}
|
|
3198
|
-
`,c],ee([d.property({type:String})],i.ContextMenuCheckboxItem.prototype,"_id",2),ee([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuCheckboxItem.prototype,"_hidden",2),ee([d.property({attribute:"data-value",type:String})],i.ContextMenuCheckboxItem.prototype,"value",1),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"selected",2),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"checked",2),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"disabled",2),i.ContextMenuCheckboxItem=ee([d.customElement("rtg-context-menu-checkbox-item")],i.ContextMenuCheckboxItem);var
|
|
3101
|
+
`,c],ee([d.property({type:String})],i.ContextMenuCheckboxItem.prototype,"_id",2),ee([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuCheckboxItem.prototype,"_hidden",2),ee([d.property({attribute:"data-value",type:String})],i.ContextMenuCheckboxItem.prototype,"value",1),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"selected",2),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"checked",2),ee([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"disabled",2),i.ContextMenuCheckboxItem=ee([d.customElement("rtg-context-menu-checkbox-item")],i.ContextMenuCheckboxItem);var Vo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Ue=(o,e,r,n)=>{for(var t=n>1?void 0:n?Go(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Vo(e,r,t),t};i.ContextMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${i.ContextMenuGroup._counter++}`:this._id=`rtgcmdrxlxg${i.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`
|
|
3199
3102
|
<div
|
|
3200
3103
|
part="context-menu-group"
|
|
3201
3104
|
class="${e}"
|
|
@@ -3218,7 +3121,7 @@ body {
|
|
|
3218
3121
|
<slot></slot>
|
|
3219
3122
|
</div>
|
|
3220
3123
|
</div>
|
|
3221
|
-
`}`}},i.ContextMenuGroup._counter=0,i.ContextMenuGroup.styles=[l.css``,c],
|
|
3124
|
+
`}`}},i.ContextMenuGroup._counter=0,i.ContextMenuGroup.styles=[l.css``,c],Ue([d.property({type:String})],i.ContextMenuGroup.prototype,"heading",2),Ue([d.property({attribute:"id",type:String})],i.ContextMenuGroup.prototype,"_id",2),Ue([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuGroup.prototype,"_hidden",2),i.ContextMenuGroup=Ue([d.customElement("rtg-context-menu-group")],i.ContextMenuGroup);var Ho=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,Pe=(o,e,r,n)=>{for(var t=n>1?void 0:n?Yo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ho(e,r,t),t};i.ContextMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.ContextMenuItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3222
3125
|
<div
|
|
3223
3126
|
part="context-menu-item"
|
|
3224
3127
|
class="${u("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)}"
|
|
@@ -3235,7 +3138,7 @@ body {
|
|
|
3235
3138
|
>
|
|
3236
3139
|
<slot></slot>
|
|
3237
3140
|
</div>
|
|
3238
|
-
`}`}},i.ContextMenuItem._counter=0,i.ContextMenuItem.styles=[l.css``,c],
|
|
3141
|
+
`}`}},i.ContextMenuItem._counter=0,i.ContextMenuItem.styles=[l.css``,c],Pe([d.property({type:String})],i.ContextMenuItem.prototype,"_id",2),Pe([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuItem.prototype,"_hidden",2),Pe([d.property({attribute:"data-value",type:String})],i.ContextMenuItem.prototype,"value",1),Pe([d.property({type:Boolean})],i.ContextMenuItem.prototype,"selected",2),i.ContextMenuItem=Pe([d.customElement("rtg-context-menu-item")],i.ContextMenuItem);var Xo=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,te=(o,e,r,n)=>{for(var t=n>1?void 0:n?Wo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Xo(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.ContextMenuRadioItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3239
3142
|
<div
|
|
3240
3143
|
part="context-menu-radio"
|
|
3241
3144
|
class="${u("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)}"
|
|
@@ -3254,7 +3157,7 @@ body {
|
|
|
3254
3157
|
<span
|
|
3255
3158
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
3256
3159
|
>
|
|
3257
|
-
${this.checked?l.html` ${
|
|
3160
|
+
${this.checked?l.html` ${gt()} `:l.nothing}
|
|
3258
3161
|
</span>
|
|
3259
3162
|
<slot></slot>
|
|
3260
3163
|
</div>
|
|
@@ -3264,7 +3167,7 @@ body {
|
|
|
3264
3167
|
height: 16px;
|
|
3265
3168
|
display: inline-block;
|
|
3266
3169
|
}
|
|
3267
|
-
`,c],te([d.property({type:String})],i.ContextMenuRadioItem.prototype,"_id",2),te([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuRadioItem.prototype,"_hidden",2),te([d.property({attribute:"data-value",type:String})],i.ContextMenuRadioItem.prototype,"value",1),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"selected",2),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"checked",2),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"disabled",2),i.ContextMenuRadioItem=te([d.customElement("rtg-context-menu-radio-item")],i.ContextMenuRadioItem);var
|
|
3170
|
+
`,c],te([d.property({type:String})],i.ContextMenuRadioItem.prototype,"_id",2),te([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuRadioItem.prototype,"_hidden",2),te([d.property({attribute:"data-value",type:String})],i.ContextMenuRadioItem.prototype,"value",1),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"selected",2),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"checked",2),te([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"disabled",2),i.ContextMenuRadioItem=te([d.customElement("rtg-context-menu-radio-item")],i.ContextMenuRadioItem);var Ko=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,xt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Zo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ko(e,r,t),t};i.ContextMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${i.ContextMenuSeparator._counter++}`:this._id=`rtgcmdrxlxs${i.ContextMenuSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3268
3171
|
<div
|
|
3269
3172
|
part="context-menu-separator"
|
|
3270
3173
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3272,14 +3175,14 @@ body {
|
|
|
3272
3175
|
role="separator"
|
|
3273
3176
|
id="${this.identifier}"
|
|
3274
3177
|
></div>
|
|
3275
|
-
`}`}},i.ContextMenuSeparator._counter=0,i.ContextMenuSeparator.styles=[l.css``,c],
|
|
3178
|
+
`}`}},i.ContextMenuSeparator._counter=0,i.ContextMenuSeparator.styles=[l.css``,c],xt([d.property({type:String})],i.ContextMenuSeparator.prototype,"_id",2),xt([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuSeparator.prototype,"_hidden",2),i.ContextMenuSeparator=xt([d.customElement("rtg-context-menu-separator")],i.ContextMenuSeparator);var Jo=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,Qo=(o,e,r,n)=>{for(var t=n>1?void 0:n?jo(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Jo(e,r,t),t};i.ContextMenuShortcut=class extends l.LitElement{render(){return l.html`
|
|
3276
3179
|
<span
|
|
3277
3180
|
part="context-menu-shortcut"
|
|
3278
3181
|
class="${u("ml-auto text-xs font-semibold",this.className)}"
|
|
3279
3182
|
>
|
|
3280
3183
|
<slot></slot>
|
|
3281
3184
|
</span>
|
|
3282
|
-
`}},i.ContextMenuShortcut.styles=[l.css``,c],i.ContextMenuShortcut
|
|
3185
|
+
`}},i.ContextMenuShortcut.styles=[l.css``,c],i.ContextMenuShortcut=Qo([d.customElement("rtg-context-menu-shortcut")],i.ContextMenuShortcut);var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,_r=(o,e,r,n)=>{for(var t=n>1?void 0:n?ti(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ei(e,r,t),t};i.ContextMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var n;const r=e.target;(n=this.shadowRoot)!=null&&n.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:n}=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=`${n-t.top}px`,s.dataset.state="open",this.isOpen=!0)})}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.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`
|
|
3283
3186
|
<div class="flex" part="context-menu">
|
|
3284
3187
|
<div>
|
|
3285
3188
|
<slot @contextmenu="${this.toggleDropdown}"></slot>
|
|
@@ -3288,7 +3191,7 @@ body {
|
|
|
3288
3191
|
<slot></slot>
|
|
3289
3192
|
</div>
|
|
3290
3193
|
</div>
|
|
3291
|
-
`}},i.ContextMenu.styles=[l.css``,c],
|
|
3194
|
+
`}},i.ContextMenu.styles=[l.css``,c],_r([d.state()],i.ContextMenu.prototype,"isOpen",2),i.ContextMenu=_r([d.customElement("rtg-context-menu")],i.ContextMenu);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,Ct=(o,e,r,n)=>{for(var t=n>1?void 0:n?ni(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ri(e,r,t),t};let Se=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
|
3292
3195
|
<div
|
|
3293
3196
|
part="command"
|
|
3294
3197
|
class="${u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground border shadow-md",this.className,this.twCLass)}"
|
|
@@ -3297,7 +3200,7 @@ body {
|
|
|
3297
3200
|
>
|
|
3298
3201
|
<slot></slot>
|
|
3299
3202
|
</div>
|
|
3300
|
-
`}};
|
|
3203
|
+
`}};Se.styles=[l.css``,c],Ct([d.property({type:String})],Se.prototype,"twCLass",2),Ct([d.queryAssignedElements({selector:"input[rtgcmd-input]"})],Se.prototype,"_input",2),Se=Ct([d.customElement("rtg-command")],Se);var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,$t=(o,e,r,n)=>{for(var t=n>1?void 0:n?ii(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&oi(e,r,t),t};let Y=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="true"}get identifier(){var e,r;if(this._id!=="")return this._id;const o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return o?this._id=`${o.getAttribute("id")}e${Y._counter++}`:this._id=`rtgcmdrxlxe${Y._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3301
3204
|
<div
|
|
3302
3205
|
part="command-empty"
|
|
3303
3206
|
class="${u("py-6 text-center text-sm",this.className)}"
|
|
@@ -3307,7 +3210,7 @@ body {
|
|
|
3307
3210
|
>
|
|
3308
3211
|
<slot></slot>
|
|
3309
3212
|
</div>
|
|
3310
|
-
`}`}};
|
|
3213
|
+
`}`}};Y._counter=0,Y.styles=[l.css``,c],$t([d.property({type:String})],Y.prototype,"_id",2),$t([d.property({attribute:"aria-hidden",type:String})],Y.prototype,"_hidden",2),Y=$t([d.customElement("rtg-command-empty")],Y);var si=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,Fe=(o,e,r,n)=>{for(var t=n>1?void 0:n?ai(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&si(e,r,t),t};let N=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 o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return o?this._id=`${o.getAttribute("id")}g${N._counter++}`:this._id=`rtgcmdrxlxg${N._counter++}`,this._id}render(){const o="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`
|
|
3311
3214
|
<div
|
|
3312
3215
|
part="command-group"
|
|
3313
3216
|
class="${o}"
|
|
@@ -3330,7 +3233,7 @@ body {
|
|
|
3330
3233
|
<slot></slot>
|
|
3331
3234
|
</div>
|
|
3332
3235
|
</div>
|
|
3333
|
-
`}`}};N._counter=0,N.styles=[l.css``,c],
|
|
3236
|
+
`}`}};N._counter=0,N.styles=[l.css``,c],Fe([d.property({type:String})],N.prototype,"heading",2),Fe([d.property({attribute:"id",type:String})],N.prototype,"_id",2),Fe([d.property({attribute:"aria-hidden",type:String})],N.prototype,"_hidden",2),N=Fe([d.customElement("rtg-command-group")],N);var li=Object.defineProperty,di=Object.getOwnPropertyDescriptor,_t=(o,e,r,n)=>{for(var t=n>1?void 0:n?di(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&li(e,r,t),t};let De=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){var e,r;const o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-root]");return o?`${o.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const o=this.parentElement;if(o){let e=!0;const r=o.querySelectorAll("rtg-command-list > rtg-command-group");r&&r.forEach(t=>{var m,h;let s=!0;const a=t.querySelectorAll("rtg-command-item");a&&a.forEach(v=>{((v==null?void 0:v.value)||"").toLowerCase().includes(this._value.toLowerCase())?(s=!1,e=!1,v.setAttribute("aria-hidden","false")):v.setAttribute("aria-hidden","true")}),t.setAttribute("aria-hidden",s?"true":"false");let p=t.previousElementSibling;p&&p.setAttribute("aria-hidden",s||((m=p.previousElementSibling)==null?void 0:m.getAttribute("aria-hidden"))==="true"?"true":"false"),p=t.nextElementSibling,p&&p.setAttribute("aria-hidden",s||((h=p.nextElementSibling)==null?void 0:h.getAttribute("aria-hidden"))==="true"?"true":"false")});const n=o.querySelector("rtg-command-empty");n&&n.setAttribute("aria-hidden",e?"false":"true")}}handleChange(o){const e=o.target;e&&(this._value=e.value,this.filterItems())}render(){return l.html`
|
|
3334
3237
|
<div
|
|
3335
3238
|
part="command-input"
|
|
3336
3239
|
class="${u("flex items-center border-b px-3",this.className)}"
|
|
@@ -3369,7 +3272,7 @@ body {
|
|
|
3369
3272
|
data-value="${this._value}"
|
|
3370
3273
|
/>
|
|
3371
3274
|
</div>
|
|
3372
|
-
`}};
|
|
3275
|
+
`}};De.styles=[l.css``,c],_t([d.property({type:String})],De.prototype,"placeholder",2),_t([d.property({attribute:"value",type:String})],De.prototype,"_value",2),De=_t([d.customElement("rtg-command-input")],De);var ci=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,ke=(o,e,r,n)=>{for(var t=n>1?void 0:n?ui(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ci(e,r,t),t};let I=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 o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return o?this._id=`${o.getAttribute("id")}li${I._counter++}`:this._id=`rtgcmdrxgxli${I._counter++}`,this._id}get value(){var o;return((o=this.textContent)==null?void 0:o.trim())||""}handleMouseEvent(o){(o.type==="mouseover"||o.type==="focus")&&(this.selected=!0),o.type==="mouseleave"&&(this.selected=!1)}render(){return l.html` ${this._hidden==="true"?l.nothing:l.html`
|
|
3373
3276
|
<div
|
|
3374
3277
|
part="command-item"
|
|
3375
3278
|
class="${u("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 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800",this.className)}"
|
|
@@ -3387,7 +3290,7 @@ body {
|
|
|
3387
3290
|
>
|
|
3388
3291
|
<slot></slot>
|
|
3389
3292
|
</div>
|
|
3390
|
-
`}`}};I._counter=0,I.styles=[l.css``,c],ke([d.property({type:String})],I.prototype,"_id",2),ke([d.property({attribute:"aria-hidden",type:String})],I.prototype,"_hidden",2),ke([d.property({type:Function})],I.prototype,"onSelect",2),ke([d.property({attribute:"data-value",type:String}),d.property({type:Boolean})],I.prototype,"identifier",1),I=ke([d.customElement("rtg-command-item")],I);var
|
|
3293
|
+
`}`}};I._counter=0,I.styles=[l.css``,c],ke([d.property({type:String})],I.prototype,"_id",2),ke([d.property({attribute:"aria-hidden",type:String})],I.prototype,"_hidden",2),ke([d.property({type:Function})],I.prototype,"onSelect",2),ke([d.property({attribute:"data-value",type:String}),d.property({type:Boolean})],I.prototype,"identifier",1),I=ke([d.customElement("rtg-command-item")],I);var pi=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,gi=(o,e,r,n)=>{for(var t=n>1?void 0:n?hi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&pi(e,r,t),t};let Ot=class extends l.LitElement{get identifier(){var e,r;const o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-root]");return o?`${o.getAttribute("id")}l`:"rtgcmdrxl"}render(){return l.html`
|
|
3391
3294
|
<div
|
|
3392
3295
|
part="command-list"
|
|
3393
3296
|
class="${u("max-h-[300px] overflow-y-auto overflow-x-hidden",this.className)}"
|
|
@@ -3400,7 +3303,7 @@ body {
|
|
|
3400
3303
|
<slot></slot>
|
|
3401
3304
|
</div>
|
|
3402
3305
|
</div>
|
|
3403
|
-
`}};
|
|
3306
|
+
`}};Ot.styles=[l.css``,c],Ot=gi([d.customElement("rtg-command-list")],Ot);var mi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,Et=(o,e,r,n)=>{for(var t=n>1?void 0:n?vi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&mi(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 o=(r=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return o?this._id=`${o.getAttribute("id")}s${X._counter++}`:this._id=`rtgcmdrxlxs${X._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3404
3307
|
<div
|
|
3405
3308
|
part="command-separator"
|
|
3406
3309
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3408,7 +3311,7 @@ body {
|
|
|
3408
3311
|
role="separator"
|
|
3409
3312
|
id="${this.identifier}"
|
|
3410
3313
|
></div>
|
|
3411
|
-
`}`}};
|
|
3314
|
+
`}`}};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 fi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,wi=(o,e,r,n)=>{for(var t=n>1?void 0:n?bi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&fi(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 n;r.uuid!==((n=this._comboBox)==null?void 0:n.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 o=this.parentElement;for(;o&&!(o instanceof i.ComboBox);)o=o.parentElement;return o}firstUpdated(o){var n,t;super.firstUpdated(o);const e=(n=this.shadowRoot)==null?void 0:n.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`
|
|
3412
3315
|
<button
|
|
3413
3316
|
type="button"
|
|
3414
3317
|
part="combo-box-trigger-button"
|
|
@@ -3420,29 +3323,29 @@ body {
|
|
|
3420
3323
|
@click=${this.handleClick}
|
|
3421
3324
|
>
|
|
3422
3325
|
<slot></slot>
|
|
3423
|
-
${
|
|
3326
|
+
${Kn()}
|
|
3424
3327
|
</button>
|
|
3425
|
-
`}};
|
|
3328
|
+
`}};Pt.styles=[l.css``,c],Pt=wi([d.customElement("rtg-combo-box-trigger")],Pt);var yi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,Or=(o,e,r,n)=>{for(var t=n>1?void 0:n?xi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&yi(e,r,t),t};let Ve=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 n;r.uuid!==((n=this._comboBox)==null?void 0:n.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 o=this.parentElement;for(;o&&!(o instanceof i.ComboBox);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(o){var n,t;super.firstUpdated(o);const e=(n=this.shadowRoot)==null?void 0:n.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`
|
|
3426
3329
|
<span
|
|
3427
3330
|
part="combo-box-value"
|
|
3428
3331
|
class="flex line-clamp-1 w-[180px]"
|
|
3429
3332
|
@click=${this.handleClick}
|
|
3430
3333
|
>${this.renderLabel()}</span
|
|
3431
3334
|
>
|
|
3432
|
-
`}};
|
|
3433
|
-
@mouseover="${
|
|
3335
|
+
`}};Ve.styles=[l.css``,c],Or([d.property({type:String})],Ve.prototype,"placeholder",2),Ve=Or([d.customElement("rtg-combo-box-value")],Ve);var Ci=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,Ge=(o,e,r,n)=>{for(var t=n>1?void 0:n?$i(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ci(e,r,t),t};let re=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(o=>{var e,r;return(r=o.value)==null?void 0:r.toLowerCase().includes((e=this.searchKey)==null?void 0:e.toLowerCase())}).map((o,e)=>{var r;return l.html`<rtg-combo-box-item
|
|
3336
|
+
@mouseover="${n=>this.handleMouseOver(n,e)}"
|
|
3434
3337
|
data-hs-combo-box-value=${o}
|
|
3435
3338
|
tabIndex=${e}
|
|
3436
3339
|
.value=${o.value}
|
|
3437
3340
|
.selectItemIndex="${e}"
|
|
3438
3341
|
.isFocus="${e===this.focusedIndex}"
|
|
3439
3342
|
.onSelect=${this.onSelectedValue}
|
|
3440
|
-
.isSelected="${o.value.toLowerCase()===((
|
|
3343
|
+
.isSelected="${o.value.toLowerCase()===((r=this._comboBox)==null?void 0:r.selectedValue.toLowerCase())}"
|
|
3441
3344
|
>
|
|
3442
3345
|
${o.textContent||o.value}
|
|
3443
3346
|
</rtg-combo-box-item> `}):l.html` <div>
|
|
3444
3347
|
<slot name="combo-box-empty"></slot>
|
|
3445
|
-
</div>`}get _comboBox(){let o=this.parentElement;for(;o&&!(o instanceof i.ComboBox);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()}),document.addEventListener("trigger-combo-box",o=>{o.detail.isOpen&&this._comboBox&&this._comboBox.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(e=>{var
|
|
3348
|
+
</div>`}get _comboBox(){let o=this.parentElement;for(;o&&!(o instanceof i.ComboBox);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()}),document.addEventListener("trigger-combo-box",o=>{o.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(o){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(o){var e;(e=this._comboBox)!=null&&e.isOpen||document.removeEventListener("keydown",this.handleKeyDown.bind(this))}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}onSelectedValue(o,e){this.focusedIndex=e,this.selectedValue=o}handleKeyDown(o){var e;if(console.log("inja"),o.preventDefault(),(e=this._comboBox)!=null&&e.isOpen)switch(o.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(o,e){o.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
|
3446
3349
|
<div
|
|
3447
3350
|
part="select-group"
|
|
3448
3351
|
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
|
|
@@ -3454,9 +3357,9 @@ body {
|
|
|
3454
3357
|
</div>
|
|
3455
3358
|
<div>${this.checkRender()}</div>
|
|
3456
3359
|
</div>
|
|
3457
|
-
`}};re.styles=[l.css``,c],
|
|
3360
|
+
`}};re.styles=[l.css``,c],Ge([d.state()],re.prototype,"searchKey",2),Ge([d.state()],re.prototype,"focusedIndex",2),Ge([d.state()],re.prototype,"selectedValue",2),re=Ge([d.customElement("rtg-combo-box-group")],re);var _i=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,A=(o,e,r,n)=>{for(var t=n>1?void 0:n?Oi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&_i(e,r,t),t};let P=class extends f{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(o,e)=>{},this.onMouseOver=(o,e)=>{},this.handleClick=o=>{this.onSelect(this.value,this.selectItemIndex),o.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 o=this.getFilteredAttributes();return l.html`
|
|
3458
3361
|
<div
|
|
3459
|
-
${
|
|
3362
|
+
${$(o)}
|
|
3460
3363
|
@click=${this.handleClick}
|
|
3461
3364
|
class="flex items-center justify-between cursor-pointer py-2 px-4 w-full
|
|
3462
3365
|
rounded-lg
|
|
@@ -3478,12 +3381,12 @@ body {
|
|
|
3478
3381
|
<span
|
|
3479
3382
|
class="${this.isSelected?"visible":"invisible"} data-hs-combo-box-value mr-2"
|
|
3480
3383
|
>
|
|
3481
|
-
${
|
|
3384
|
+
${wr()}
|
|
3482
3385
|
</span>
|
|
3483
3386
|
</div>
|
|
3484
|
-
`}};P.styles=[l.css``,c],A([d.property({type:String})],P.prototype,"value",2),A([d.property({type:String})],P.prototype,"key",2),A([d.property({type:Number})],P.prototype,"tabindex",2),A([d.property({type:Boolean})],P.prototype,"isSelected",2),A([d.property({type:Boolean})],P.prototype,"isFocus",2),A([d.property({type:String})],P.prototype,"class",2),A([d.property({type:Number})],P.prototype,"selectItemIndex",2),A([d.property({type:Function})],P.prototype,"onSelect",2),A([d.property({type:Function})],P.prototype,"onMouseOver",2),P=A([d.customElement("rtg-combo-box-item")],P);var
|
|
3387
|
+
`}};P.styles=[l.css``,c],A([d.property({type:String})],P.prototype,"value",2),A([d.property({type:String})],P.prototype,"key",2),A([d.property({type:Number})],P.prototype,"tabindex",2),A([d.property({type:Boolean})],P.prototype,"isSelected",2),A([d.property({type:Boolean})],P.prototype,"isFocus",2),A([d.property({type:String})],P.prototype,"class",2),A([d.property({type:Number})],P.prototype,"selectItemIndex",2),A([d.property({type:Function})],P.prototype,"onSelect",2),A([d.property({type:Function})],P.prototype,"onMouseOver",2),P=A([d.customElement("rtg-combo-box-item")],P);var Ei=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,He=(o,e,r,n)=>{for(var t=n>1?void 0:n?Pi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ei(e,r,t),t};let be=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="Search Item ...",this.twClass="",this.searchValue=""}get _comboBoxGroup(){let o=this.parentElement;for(;o&&!(o instanceof re);)o=o.parentElement;return o}handleSearch(o){o.stopPropagation();const e=o.target;this.searchValue=e.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(o){o.stopPropagation()}render(){return l.html`
|
|
3485
3388
|
<div class="flex items-center px-2">
|
|
3486
|
-
${
|
|
3389
|
+
${Zn()}
|
|
3487
3390
|
<input
|
|
3488
3391
|
part="combo-box-input"
|
|
3489
3392
|
type="text"
|
|
@@ -3499,11 +3402,11 @@ body {
|
|
|
3499
3402
|
@keydown="${this.handleKeyDown}"
|
|
3500
3403
|
/>
|
|
3501
3404
|
</div>
|
|
3502
|
-
`}};
|
|
3405
|
+
`}};be.styles=[l.css``,c],He([d.property({type:String})],be.prototype,"placeholder",2),He([d.property({type:String})],be.prototype,"twClass",2),He([d.state()],be.prototype,"searchValue",2),be=He([d.customElement("rtg-combo-box-input")],be);var Si=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,ki=(o,e,r,n)=>{for(var t=n>1?void 0:n?Di(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Si(e,r,t),t};let St=class extends l.LitElement{render(){return l.html`
|
|
3503
3406
|
<div class="py-6 text-center text-sm" cmdk-empty="" role="presentation">
|
|
3504
3407
|
<slot></slot>
|
|
3505
3408
|
</div>
|
|
3506
|
-
`}};
|
|
3409
|
+
`}};St.styles=[l.css``,c],St=ki([d.customElement("rtg-combo-box-empty")],St);var Mi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,T=(o,e,r,n)=>{for(var t=n>1?void 0:n?Li(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Mi(e,r,t),t};i.ComboBox=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=vr(),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]"),n=e.target;if(!n.tagName.includes("RTG-COMBO")){if(!r||!r.contains(n))this.isOpen=!1;else if(!((s=n.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 n=r.closest("rtg-combo-box-item");n?(this.selectedValue=n.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`
|
|
3507
3410
|
<div
|
|
3508
3411
|
class="relative"
|
|
3509
3412
|
data-hs-combo-box=""
|
|
@@ -3517,7 +3420,7 @@ body {
|
|
|
3517
3420
|
<slot name="combo-box-content"></slot>
|
|
3518
3421
|
</div>
|
|
3519
3422
|
</div>
|
|
3520
|
-
`}},i.ComboBox.styles=[l.css``,c],T([d.state()],i.ComboBox.prototype,"isOpen",2),T([d.state()],i.ComboBox.prototype,"selectedValue",2),T([d.state()],i.ComboBox.prototype,"searchTerm",2),T([d.state()],i.ComboBox.prototype,"focusedIndex",2),T([d.state()],i.ComboBox.prototype,"filteredItems",2),T([d.state()],i.ComboBox.prototype,"uuid",2),T([d.property({type:String})],i.ComboBox.prototype,"label",2),T([d.property({type:Array})],i.ComboBox.prototype,"items",2),i.ComboBox=T([d.customElement("rtg-combo-box")],i.ComboBox);var
|
|
3423
|
+
`}},i.ComboBox.styles=[l.css``,c],T([d.state()],i.ComboBox.prototype,"isOpen",2),T([d.state()],i.ComboBox.prototype,"selectedValue",2),T([d.state()],i.ComboBox.prototype,"searchTerm",2),T([d.state()],i.ComboBox.prototype,"focusedIndex",2),T([d.state()],i.ComboBox.prototype,"filteredItems",2),T([d.state()],i.ComboBox.prototype,"uuid",2),T([d.property({type:String})],i.ComboBox.prototype,"label",2),T([d.property({type:Array})],i.ComboBox.prototype,"items",2),i.ComboBox=T([d.customElement("rtg-combo-box")],i.ComboBox);var Ii=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,Er=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ai(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ii(e,r,t),t};const Ri="open",Pr="closed";i.DialogContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Pr,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=Pr)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof i.Dialog)return e;e=e.parentElement}return e}render(){return l.html`${this.state===Ri?l.html`
|
|
3521
3424
|
<div
|
|
3522
3425
|
part="dialog-content"
|
|
3523
3426
|
class="${u("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)}"
|
|
@@ -3546,18 +3449,18 @@ body {
|
|
|
3546
3449
|
><span class="sr-only">Close</span>
|
|
3547
3450
|
</button>
|
|
3548
3451
|
</div>
|
|
3549
|
-
`:l.nothing}`}},i.DialogContent.styles=[l.css``,c],
|
|
3452
|
+
`:l.nothing}`}},i.DialogContent.styles=[l.css``,c],Er([d.property({attribute:"data-state",type:String})],i.DialogContent.prototype,"state",2),i.DialogContent=Er([d.customElement("rtg-dialog-content")],i.DialogContent);var zi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,Ni=(o,e,r,n)=>{for(var t=n>1?void 0:n?Bi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&zi(e,r,t),t};const Ti="closed";i.DialogClose=class extends l.LitElement{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof i.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"),n=r==null?void 0:r.assignedElements();n&&n.length>0&&n[0].addEventListener("click",()=>{const a=this._dialog;a&&(a.dataset.state=Ti)})}render(){return l.html`
|
|
3550
3453
|
<div part="dialog-close">
|
|
3551
3454
|
<slot></slot>
|
|
3552
3455
|
</div>
|
|
3553
|
-
`}},i.DialogClose.styles=[l.css``,c],i.DialogClose=
|
|
3456
|
+
`}},i.DialogClose.styles=[l.css``,c],i.DialogClose=Ni([d.customElement("rtg-dialog-close")],i.DialogClose);var qi=Object.defineProperty,Ui=Object.getOwnPropertyDescriptor,Fi=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ui(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&qi(e,r,t),t};i.DialogFooter=class extends l.LitElement{render(){return l.html`
|
|
3554
3457
|
<div
|
|
3555
3458
|
part="dialog-footer"
|
|
3556
3459
|
class="${u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",this.className)}"
|
|
3557
3460
|
>
|
|
3558
3461
|
<slot></slot>
|
|
3559
3462
|
</div>
|
|
3560
|
-
`}},i.DialogFooter.styles=[l.css``,c],i.DialogFooter=
|
|
3463
|
+
`}},i.DialogFooter.styles=[l.css``,c],i.DialogFooter=Fi([d.customElement("rtg-dialog-footer")],i.DialogFooter);var Vi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Dt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Gi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Vi(e,r,t),t};i.DialogHeader=class extends l.LitElement{constructor(){super(...arguments),this._title="",this.description=""}render(){return l.html`
|
|
3561
3464
|
<div
|
|
3562
3465
|
part="dialog-header"
|
|
3563
3466
|
class="${u("flex flex-col space-y-1.5 text-center sm:text-left",this.className)}"
|
|
@@ -3571,21 +3474,21 @@ body {
|
|
|
3571
3474
|
${this.description}
|
|
3572
3475
|
</p>
|
|
3573
3476
|
</div>
|
|
3574
|
-
`}},i.DialogHeader.styles=[l.css``,c],
|
|
3477
|
+
`}},i.DialogHeader.styles=[l.css``,c],Dt([d.property({attribute:"title",type:String})],i.DialogHeader.prototype,"_title",2),Dt([d.property({type:String})],i.DialogHeader.prototype,"description",2),i.DialogHeader=Dt([d.customElement("rtg-dialog-header")],i.DialogHeader);var Hi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,Xi=(o,e,r,n)=>{for(var t=n>1?void 0:n?Yi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Hi(e,r,t),t};i.DialogOverlay=class extends l.LitElement{render(){return l.html`
|
|
3575
3478
|
<div
|
|
3576
3479
|
part="dialog-overly"
|
|
3577
3480
|
class="${u("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)}"
|
|
3578
3481
|
></div>
|
|
3579
|
-
`}},i.DialogOverlay.styles=[l.css``,c],i.DialogOverlay=
|
|
3482
|
+
`}},i.DialogOverlay.styles=[l.css``,c],i.DialogOverlay=Xi([d.customElement("rtg-dialog-overlay")],i.DialogOverlay);var Wi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Zi=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ki(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Wi(e,r,t),t};const Ji="open";let kt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const o=this._dialog;o&&(o.dataset.state=Ji)}}get _dialog(){let o=this.parentElement;for(;o;){if(o instanceof i.Dialog)return o;o=o.parentElement}return o}firstUpdated(o){var n,t;super.firstUpdated(o);const e=(n=this.shadowRoot)==null?void 0:n.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`
|
|
3580
3483
|
<div part="dialog-trigger">
|
|
3581
3484
|
<slot></slot>
|
|
3582
3485
|
</div>
|
|
3583
|
-
`}};
|
|
3486
|
+
`}};kt.styles=[l.css``,c],kt=Zi([d.customElement("rtg-dialog-trigger")],kt);var ji=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Sr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Qi(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ji(e,r,t),t};const es="open",ts="closed";i.Dialog=class extends l.LitElement{constructor(){super(...arguments),this.state=ts}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.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`
|
|
3584
3487
|
<div rtgdlg-root part="dialog">
|
|
3585
|
-
${this.state===
|
|
3488
|
+
${this.state===es?l.html` <rtg-dialog-overlay></rtg-dialog-overlay>`:l.nothing}
|
|
3586
3489
|
<slot></slot>
|
|
3587
3490
|
</div>
|
|
3588
|
-
`}},i.Dialog.styles=[l.css``,c],
|
|
3491
|
+
`}},i.Dialog.styles=[l.css``,c],Sr([d.property({attribute:"data-state",type:String})],i.Dialog.prototype,"state",2),i.Dialog=Sr([d.customElement("rtg-dialog")],i.Dialog);var rs=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,Mt=(o,e,r,n)=>{for(var t=n>1?void 0:n?ns(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&rs(e,r,t),t};i.DropdownMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=qe,this.isOpen=!1}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof i.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"),n=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(n!=null&&n.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
3589
3492
|
<div
|
|
3590
3493
|
part="dropdown-menu-content"
|
|
3591
3494
|
class="absolute flex h-full flex-col max-h-[300px] overflow-y-auto overflow-x-hidden rounded-md bg-popover text-popover-foreground border shadow-md"
|
|
@@ -3593,7 +3496,7 @@ body {
|
|
|
3593
3496
|
>
|
|
3594
3497
|
<slot></slot>
|
|
3595
3498
|
</div>
|
|
3596
|
-
`}},i.DropdownMenuContent.styles=[l.css``,c],
|
|
3499
|
+
`}},i.DropdownMenuContent.styles=[l.css``,c],Mt([d.property({attribute:"data-state",type:String})],i.DropdownMenuContent.prototype,"state",2),Mt([d.state()],i.DropdownMenuContent.prototype,"isOpen",2),i.DropdownMenuContent=Mt([d.customElement("rtg-dropdown-menu-content")],i.DropdownMenuContent);var os=Object.defineProperty,is=Object.getOwnPropertyDescriptor,Me=(o,e,r,n)=>{for(var t=n>1?void 0:n?is(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&os(e,r,t),t};i.DropdownMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.DropdownMenuItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3597
3500
|
<div
|
|
3598
3501
|
part="dropdown-menu-item"
|
|
3599
3502
|
class="${u("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)}"
|
|
@@ -3610,7 +3513,7 @@ body {
|
|
|
3610
3513
|
>
|
|
3611
3514
|
<slot></slot>
|
|
3612
3515
|
</div>
|
|
3613
|
-
`}`}},i.DropdownMenuItem._counter=0,i.DropdownMenuItem.styles=[l.css``,c],
|
|
3516
|
+
`}`}},i.DropdownMenuItem._counter=0,i.DropdownMenuItem.styles=[l.css``,c],Me([d.property({type:String})],i.DropdownMenuItem.prototype,"_id",2),Me([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuItem.prototype,"_hidden",2),Me([d.property({attribute:"data-value",type:String})],i.DropdownMenuItem.prototype,"value",1),Me([d.property({type:Boolean})],i.DropdownMenuItem.prototype,"selected",2),i.DropdownMenuItem=Me([d.customElement("rtg-dropdown-menu-item")],i.DropdownMenuItem);var ss=Object.defineProperty,as=Object.getOwnPropertyDescriptor,ne=(o,e,r,n)=>{for(var t=n>1?void 0:n?as(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ss(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.DropdownMenuRadioItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3614
3517
|
<div
|
|
3615
3518
|
part="dropdown-menu-radio"
|
|
3616
3519
|
class="${u("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)}"
|
|
@@ -3629,7 +3532,7 @@ body {
|
|
|
3629
3532
|
<span
|
|
3630
3533
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
3631
3534
|
>
|
|
3632
|
-
${this.checked?l.html` ${
|
|
3535
|
+
${this.checked?l.html` ${gt()} `:l.nothing}
|
|
3633
3536
|
</span>
|
|
3634
3537
|
<slot></slot>
|
|
3635
3538
|
</div>
|
|
@@ -3639,7 +3542,7 @@ body {
|
|
|
3639
3542
|
height: 16px;
|
|
3640
3543
|
display: inline-block;
|
|
3641
3544
|
}
|
|
3642
|
-
`,c],ne([d.property({type:String})],i.DropdownMenuRadioItem.prototype,"_id",2),ne([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuRadioItem.prototype,"_hidden",2),ne([d.property({attribute:"data-value",type:String})],i.DropdownMenuRadioItem.prototype,"value",1),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"selected",2),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"checked",2),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"disabled",2),i.DropdownMenuRadioItem=ne([d.customElement("rtg-dropdown-menu-radio-item")],i.DropdownMenuRadioItem);var
|
|
3545
|
+
`,c],ne([d.property({type:String})],i.DropdownMenuRadioItem.prototype,"_id",2),ne([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuRadioItem.prototype,"_hidden",2),ne([d.property({attribute:"data-value",type:String})],i.DropdownMenuRadioItem.prototype,"value",1),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"selected",2),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"checked",2),ne([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"disabled",2),i.DropdownMenuRadioItem=ne([d.customElement("rtg-dropdown-menu-radio-item")],i.DropdownMenuRadioItem);var ls=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,Lt=(o,e,r,n)=>{for(var t=n>1?void 0:n?ds(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ls(e,r,t),t};i.DropdownMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${i.DropdownMenuSeparator._counter++}`:this._id=`rtgcmdrxlxs${i.DropdownMenuSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3643
3546
|
<div
|
|
3644
3547
|
part="dropdown-menu-seperator"
|
|
3645
3548
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3647,7 +3550,7 @@ body {
|
|
|
3647
3550
|
role="separator"
|
|
3648
3551
|
id="${this.identifier}"
|
|
3649
3552
|
></div>
|
|
3650
|
-
`}`}},i.DropdownMenuSeparator._counter=0,i.DropdownMenuSeparator.styles=[l.css``,c],
|
|
3553
|
+
`}`}},i.DropdownMenuSeparator._counter=0,i.DropdownMenuSeparator.styles=[l.css``,c],Lt([d.property({type:String})],i.DropdownMenuSeparator.prototype,"_id",2),Lt([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuSeparator.prototype,"_hidden",2),i.DropdownMenuSeparator=Lt([d.customElement("rtg-dropdown-menu-separator")],i.DropdownMenuSeparator);var cs=Object.defineProperty,us=Object.getOwnPropertyDescriptor,oe=(o,e,r,n)=>{for(var t=n>1?void 0:n?us(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&cs(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.DropdownMenuCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
3651
3554
|
<div
|
|
3652
3555
|
part="dropdown-menu-item"
|
|
3653
3556
|
class="${u("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)}"
|
|
@@ -3687,7 +3590,7 @@ body {
|
|
|
3687
3590
|
height: 16px;
|
|
3688
3591
|
display: inline-block;
|
|
3689
3592
|
}
|
|
3690
|
-
`,c],oe([d.property({type:String})],i.DropdownMenuCheckboxItem.prototype,"_id",2),oe([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuCheckboxItem.prototype,"_hidden",2),oe([d.property({attribute:"data-value",type:String})],i.DropdownMenuCheckboxItem.prototype,"value",1),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"selected",2),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"checked",2),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"disabled",2),i.DropdownMenuCheckboxItem=oe([d.customElement("rtg-dropdown-menu-checkbox-item")],i.DropdownMenuCheckboxItem);var
|
|
3593
|
+
`,c],oe([d.property({type:String})],i.DropdownMenuCheckboxItem.prototype,"_id",2),oe([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuCheckboxItem.prototype,"_hidden",2),oe([d.property({attribute:"data-value",type:String})],i.DropdownMenuCheckboxItem.prototype,"value",1),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"selected",2),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"checked",2),oe([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"disabled",2),i.DropdownMenuCheckboxItem=oe([d.customElement("rtg-dropdown-menu-checkbox-item")],i.DropdownMenuCheckboxItem);var ps=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,Ye=(o,e,r,n)=>{for(var t=n>1?void 0:n?hs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ps(e,r,t),t};i.DropdownMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${i.DropdownMenuGroup._counter++}`:this._id=`rtgcmdrxlxg${i.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`
|
|
3691
3594
|
<div
|
|
3692
3595
|
part="dropdown-menu-group"
|
|
3693
3596
|
class="${e}"
|
|
@@ -3710,7 +3613,7 @@ body {
|
|
|
3710
3613
|
<slot></slot>
|
|
3711
3614
|
</div>
|
|
3712
3615
|
</div>
|
|
3713
|
-
`}`}},i.DropdownMenuGroup._counter=0,i.DropdownMenuGroup.styles=[l.css``,c],
|
|
3616
|
+
`}`}},i.DropdownMenuGroup._counter=0,i.DropdownMenuGroup.styles=[l.css``,c],Ye([d.property({type:String})],i.DropdownMenuGroup.prototype,"heading",2),Ye([d.property({attribute:"id",type:String})],i.DropdownMenuGroup.prototype,"_id",2),Ye([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuGroup.prototype,"_hidden",2),i.DropdownMenuGroup=Ye([d.customElement("rtg-dropdown-menu-group")],i.DropdownMenuGroup);var gs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,Dr=(o,e,r,n)=>{for(var t=n>1?void 0:n?ms(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&gs(e,r,t),t};i.DropdownMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var n;const r=e.target;(n=this.shadowRoot)!=null&&n.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 n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.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`
|
|
3714
3617
|
<div part="dropdown-menu">
|
|
3715
3618
|
<div>
|
|
3716
3619
|
<slot @click="${this.toggleDropdown}"></slot>
|
|
@@ -3719,7 +3622,7 @@ body {
|
|
|
3719
3622
|
<slot></slot>
|
|
3720
3623
|
</div>
|
|
3721
3624
|
</div>
|
|
3722
|
-
`}},i.DropdownMenu.styles=[l.css``,c],
|
|
3625
|
+
`}},i.DropdownMenu.styles=[l.css``,c],Dr([d.state()],i.DropdownMenu.prototype,"isOpen",2),i.DropdownMenu=Dr([d.customElement("rtg-dropdown-menu")],i.DropdownMenu);var vs=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,Xe=(o,e,r,n)=>{for(var t=n>1?void 0:n?fs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&vs(e,r,t),t};let ie=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(o){super.updated(o),this.state==="open"?this.isOpen=!0:this.isOpen=!1}handleHoverEnter(o){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("rtg-hover-card-content");e&&!e.contains(o.target)&&(this.isOpen=!1)}render(){return l.html`
|
|
3723
3626
|
<div
|
|
3724
3627
|
part="hover-card-content"
|
|
3725
3628
|
class="${u("absolute 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)}"
|
|
@@ -3727,7 +3630,7 @@ body {
|
|
|
3727
3630
|
>
|
|
3728
3631
|
<slot></slot>
|
|
3729
3632
|
</div>
|
|
3730
|
-
`}};
|
|
3633
|
+
`}};ie.styles=[l.css``,c],Xe([d.property({type:String})],ie.prototype,"twClass",2),Xe([d.property({attribute:"data-state",type:String})],ie.prototype,"state",2),Xe([d.state()],ie.prototype,"isOpen",2),ie=Xe([d.customElement("rtg-hover-card-content")],ie);var bs=Object.defineProperty,ws=Object.getOwnPropertyDescriptor,It=(o,e,r,n)=>{for(var t=n>1?void 0:n?ws(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&bs(e,r,t),t};let Le=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 o=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=o==null?void 0:o.assignedElements();if(e){for(let n=0;n<e.length;n++)if(e[n]instanceof ie)return e[n]}return null}updated(o){super.updated(o);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`
|
|
3731
3634
|
<div part="hover-card" class="${this.twClass}">
|
|
3732
3635
|
<div>
|
|
3733
3636
|
<slot
|
|
@@ -3739,7 +3642,7 @@ body {
|
|
|
3739
3642
|
<slot></slot>
|
|
3740
3643
|
</div>
|
|
3741
3644
|
</div>
|
|
3742
|
-
`}};
|
|
3645
|
+
`}};Le.styles=[l.css``,c],It([d.property({type:String})],Le.prototype,"twClass",2),It([d.state()],Le.prototype,"isOpen",2),Le=It([d.customElement("rtg-hover-card")],Le);const ys=M("absolute z-50 rounded-md p-4 text-popover-foreground 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"},styleContent:{true:"w-72 border bg-popover shadow-md",false:""}},defaultVariants:{state:"closed",side:"bottom"}}),xs=M("absolute",{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 Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,We=(o,e,r,n)=>{for(var t=n>1?void 0:n?$s(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Cs(e,r,t),t};i.PopoverContent=class extends l.LitElement{constructor(){super(...arguments),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof i.Popover);)e=e.parentElement;return e}handleClickOutside(e){const r=this._popover;r&&!r.contains(e.target)&&(r.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))}preventClickPropagation(e){e.stopPropagation()}render(){const e=this.enableDefaultStyle?ys({state:"open",side:this.side,styleContent:this.styleContent}):xs({state:"open",side:this.side});return l.html`
|
|
3743
3646
|
<div
|
|
3744
3647
|
@click="${this.preventClickPropagation}"
|
|
3745
3648
|
part="popover-content"
|
|
@@ -3748,11 +3651,11 @@ body {
|
|
|
3748
3651
|
>
|
|
3749
3652
|
<slot></slot>
|
|
3750
3653
|
</div>
|
|
3751
|
-
`}},i.PopoverContent.styles=[l.css``,c],
|
|
3654
|
+
`}},i.PopoverContent.styles=[l.css``,c],We([d.property({type:Boolean})],i.PopoverContent.prototype,"enableDefaultStyle",2),We([d.property({type:Boolean})],i.PopoverContent.prototype,"styleContent",2),We([d.property({type:String})],i.PopoverContent.prototype,"side",2),i.PopoverContent=We([d.customElement("rtg-popover-content")],i.PopoverContent);var _s=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,Es=(o,e,r,n)=>{for(var t=n>1?void 0:n?Os(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&_s(e,r,t),t};i.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 i.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"]'),n=r==null?void 0:r.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(s=this.shadowRoot)==null||s.addEventListener("click",a=>{a.stopPropagation()})}render(){return l.html`
|
|
3752
3655
|
<div part="popover-trigger" style="width: fit-content;">
|
|
3753
3656
|
<slot name="trigger-button"></slot>
|
|
3754
3657
|
</div>
|
|
3755
|
-
`}},i.PopoverTrigger.styles=[l.css``,c],i.PopoverTrigger=
|
|
3658
|
+
`}},i.PopoverTrigger.styles=[l.css``,c],i.PopoverTrigger=Es([d.customElement("rtg-popover-trigger")],i.PopoverTrigger);var Ps=Object.defineProperty,Ss=Object.getOwnPropertyDescriptor,kr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ss(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ps(e,r,t),t};i.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`
|
|
3756
3659
|
<div part="popover" style="position:relative">
|
|
3757
3660
|
<slot
|
|
3758
3661
|
name="trigger"
|
|
@@ -3762,7 +3665,7 @@ body {
|
|
|
3762
3665
|
<slot style="position:absolute" name="content"></slot>
|
|
3763
3666
|
</div>
|
|
3764
3667
|
</div>
|
|
3765
|
-
`}},i.Popover.styles=[l.css``,c],
|
|
3668
|
+
`}},i.Popover.styles=[l.css``,c],kr([d.state()],i.Popover.prototype,"isOpen",2),i.Popover=kr([d.customElement("rtg-popover")],i.Popover);const Ds="unChecked";var ks=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,we=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ms(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ks(e,r,t),t};i.RadioGroupItem=class extends l.LitElement{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=Ds}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
|
3766
3669
|
<div class="${u("flex items-center space-x-2")}" part="radio-group-item">
|
|
3767
3670
|
<button
|
|
3768
3671
|
type="button"
|
|
@@ -3780,7 +3683,7 @@ body {
|
|
|
3780
3683
|
data-state="checked"
|
|
3781
3684
|
class="flex items-center justify-center"
|
|
3782
3685
|
>
|
|
3783
|
-
${
|
|
3686
|
+
${Jn()}
|
|
3784
3687
|
</span>`:l.nothing}
|
|
3785
3688
|
</button>
|
|
3786
3689
|
<label
|
|
@@ -3790,7 +3693,7 @@ body {
|
|
|
3790
3693
|
>${this.value}</label
|
|
3791
3694
|
>
|
|
3792
3695
|
</div>
|
|
3793
|
-
`}},i.RadioGroupItem.styles=[l.css``,c],
|
|
3696
|
+
`}},i.RadioGroupItem.styles=[l.css``,c],we([d.property({type:Boolean,reflect:!0})],i.RadioGroupItem.prototype,"checked",2),we([d.property({type:Number})],i.RadioGroupItem.prototype,"tabindex",2),we([d.property({type:String})],i.RadioGroupItem.prototype,"value",2),we([d.property({type:String})],i.RadioGroupItem.prototype,"id",2),we([d.property({attribute:"data-state",type:String})],i.RadioGroupItem.prototype,"state",2),i.RadioGroupItem=we([d.customElement("rtg-radio-group-item")],i.RadioGroupItem);var Ls=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Mr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Is(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ls(e,r,t),t};i.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`
|
|
3794
3697
|
<div
|
|
3795
3698
|
part="radio-group"
|
|
3796
3699
|
class="${u("grid gap-2",this.twClass)}"
|
|
@@ -3798,9 +3701,9 @@ body {
|
|
|
3798
3701
|
>
|
|
3799
3702
|
<slot></slot>
|
|
3800
3703
|
</div>
|
|
3801
|
-
`}},i.RadioGroup.styles=[l.css``,c],
|
|
3704
|
+
`}},i.RadioGroup.styles=[l.css``,c],Mr([d.property({type:String})],i.RadioGroup.prototype,"twClass",2),i.RadioGroup=Mr([d.customElement("rtg-radio-group")],i.RadioGroup);var As=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,R=(o,e,r,n)=>{for(var t=n>1?void 0:n?Rs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&As(e,r,t),t};i.SelectItem=class extends f{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`
|
|
3802
3705
|
<div
|
|
3803
|
-
${
|
|
3706
|
+
${$(e)}
|
|
3804
3707
|
@click=${this.handleClick}
|
|
3805
3708
|
class="flex items-center justify-between cursor-pointer py-2 px-4 w-full
|
|
3806
3709
|
rounded-lg
|
|
@@ -3822,10 +3725,10 @@ body {
|
|
|
3822
3725
|
<span
|
|
3823
3726
|
class="${this.isSelected?"visible":"invisible"} hs-select-selected:block mr-2"
|
|
3824
3727
|
>
|
|
3825
|
-
${
|
|
3728
|
+
${wr()}
|
|
3826
3729
|
</span>
|
|
3827
3730
|
</div>
|
|
3828
|
-
`}},i.SelectItem.styles=[l.css``,c],
|
|
3731
|
+
`}},i.SelectItem.styles=[l.css``,c],R([d.property({type:String})],i.SelectItem.prototype,"value",2),R([d.property({type:String})],i.SelectItem.prototype,"key",2),R([d.property({type:Number})],i.SelectItem.prototype,"tabindex",2),R([d.property({type:Boolean})],i.SelectItem.prototype,"isSelected",2),R([d.property({type:Boolean})],i.SelectItem.prototype,"isFocus",2),R([d.property({type:String})],i.SelectItem.prototype,"class",2),R([d.property({type:Number})],i.SelectItem.prototype,"selectItemIndex",2),R([d.property({type:Function})],i.SelectItem.prototype,"onSelect",2),R([d.property({type:Function})],i.SelectItem.prototype,"onMouseOver",2),i.SelectItem=R([d.customElement("rtg-select-item")],i.SelectItem);var zs=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,At=(o,e,r,n)=>{for(var t=n>1?void 0:n?Bs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&zs(e,r,t),t};i.SelectList=class extends l.LitElement{constructor(){super(...arguments),this.state=qe,this.isOpen=!1}render(){return l.html`
|
|
3829
3732
|
<div
|
|
3830
3733
|
part="select-list"
|
|
3831
3734
|
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"
|
|
@@ -3835,14 +3738,14 @@ body {
|
|
|
3835
3738
|
>
|
|
3836
3739
|
<slot></slot>
|
|
3837
3740
|
</div>
|
|
3838
|
-
`}},i.SelectList.styles=[l.css``,c],
|
|
3741
|
+
`}},i.SelectList.styles=[l.css``,c],At([d.property({attribute:"data-state",type:String})],i.SelectList.prototype,"state",2),At([d.state()],i.SelectList.prototype,"isOpen",2),i.SelectList=At([d.customElement("rtg-select-list")],i.SelectList);var Ns=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,qs=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ts(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ns(e,r,t),t};i.SelectLabel=class extends l.LitElement{render(){return l.html`
|
|
3839
3742
|
<span
|
|
3840
3743
|
part="select-label"
|
|
3841
3744
|
class="${u("px-4 w-full text-base font-bold",this.className)}"
|
|
3842
3745
|
>
|
|
3843
3746
|
<slot></slot>
|
|
3844
3747
|
</span>
|
|
3845
|
-
`}},i.SelectLabel.styles=[l.css``,c],i.SelectLabel=
|
|
3748
|
+
`}},i.SelectLabel.styles=[l.css``,c],i.SelectLabel=qs([d.customElement("rtg-select-label")],i.SelectLabel);var Us=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,Rt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Fs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Us(e,r,t),t};i.SelectSeperator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${i.SelectSeperator._counter++}`:this._id=`rtgcmdrxlxs${i.SelectSeperator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3846
3749
|
<div
|
|
3847
3750
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
3848
3751
|
part="select-separator"
|
|
@@ -3850,7 +3753,7 @@ body {
|
|
|
3850
3753
|
role="separator"
|
|
3851
3754
|
id="${this.identifier}"
|
|
3852
3755
|
></div>
|
|
3853
|
-
`}`}},i.SelectSeperator._counter=0,i.SelectSeperator.styles=[l.css``,c],
|
|
3756
|
+
`}`}},i.SelectSeperator._counter=0,i.SelectSeperator.styles=[l.css``,c],Rt([d.property({type:String})],i.SelectSeperator.prototype,"_id",2),Rt([d.property({attribute:"aria-hidden",type:String})],i.SelectSeperator.prototype,"_hidden",2),i.SelectSeperator=Rt([d.customElement("rtg-select-separator")],i.SelectSeperator);var Vs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Hs=(o,e,r,n)=>{for(var t=n>1?void 0:n?Gs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Vs(e,r,t),t};let zt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(r=>{var n;r.uuid!==((n=this._select)==null?void 0:n.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 o=this.parentElement;for(;o&&!(o instanceof i.Select);)o=o.parentElement;return o}firstUpdated(o){var n,t;super.firstUpdated(o);const e=(n=this.shadowRoot)==null?void 0:n.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`
|
|
3854
3757
|
<button
|
|
3855
3758
|
type="button"
|
|
3856
3759
|
part="select-trigger"
|
|
@@ -3862,9 +3765,9 @@ body {
|
|
|
3862
3765
|
@click="${this.handleClick}"
|
|
3863
3766
|
>
|
|
3864
3767
|
<slot></slot>
|
|
3865
|
-
${
|
|
3768
|
+
${yr()}
|
|
3866
3769
|
</button>
|
|
3867
|
-
`}};
|
|
3770
|
+
`}};zt.styles=[l.css``,c],zt=Hs([d.customElement("rtg-select-trigger")],zt);var Ys=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Bt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Xs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ys(e,r,t),t};let Ie=class extends l.LitElement{constructor(){super(...arguments),this.childrenArray=[],this.focusedIndex=0,this.selectedValue=""}get _select(){let o=this.parentElement;for(;o&&!(o instanceof i.Select);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()}),document.addEventListener("trigger-select",o=>{o.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(o){document.addEventListener("keydown",this.handleKeyDown.bind(this)),this.childrenArray=Array.from(this.children).filter(e=>e.tagName.toLowerCase()==="rtg-select-item"),this.requestUpdate()}updated(o){var e;(e=this._select)!=null&&e.isOpen||document.removeEventListener("keydown",this.handleKeyDown.bind(this))}onSelectedValue(o,e){this.focusedIndex=e,this.selectedValue=o}handleKeyDown(o){var e;if(o.preventDefault(),(e=this._select)!=null&&e.isOpen)switch(o.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(o,e){o.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
|
3868
3771
|
<div
|
|
3869
3772
|
part="select-group"
|
|
3870
3773
|
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
|
|
@@ -3872,41 +3775,41 @@ body {
|
|
|
3872
3775
|
data-hs-combo-box-output=""
|
|
3873
3776
|
>
|
|
3874
3777
|
<slot name="label"></slot>
|
|
3875
|
-
${this.childrenArray.map((o,e)=>{var
|
|
3876
|
-
@mouseover="${
|
|
3778
|
+
${this.childrenArray.map((o,e)=>{var r;return l.html`<rtg-select-item
|
|
3779
|
+
@mouseover="${n=>this.handleMouseOver(n,e)}"
|
|
3877
3780
|
.onSelect=${this.onSelectedValue}
|
|
3878
3781
|
data-hs-select-value=${o}
|
|
3879
3782
|
tabIndex=${e}
|
|
3880
3783
|
.value=${o.value}
|
|
3881
3784
|
.selectItemIndex="${e}"
|
|
3882
3785
|
.isFocus="${e===this.focusedIndex}"
|
|
3883
|
-
.isSelected="${o.value.toLowerCase()===((
|
|
3786
|
+
.isSelected="${o.value.toLowerCase()===((r=this._select)==null?void 0:r.selectedValue.toLowerCase())}"
|
|
3884
3787
|
>
|
|
3885
3788
|
${o.textContent}
|
|
3886
3789
|
</rtg-select-item> `})}
|
|
3887
3790
|
</div>
|
|
3888
|
-
`}};
|
|
3791
|
+
`}};Ie.styles=[l.css``,c],Bt([d.state()],Ie.prototype,"focusedIndex",2),Bt([d.state()],Ie.prototype,"selectedValue",2),Ie=Bt([d.customElement("rtg-select-group")],Ie);var Ws=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Lr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ks(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ws(e,r,t),t};let Ke=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(r=>{var n;r.uuid!==((n=this._select)==null?void 0:n.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 o=this.parentElement;for(;o&&!(o instanceof i.Select);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}firstUpdated(o){var n,t;super.firstUpdated(o);const e=(n=this.shadowRoot)==null?void 0:n.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`
|
|
3889
3792
|
<span
|
|
3890
3793
|
part="select-value"
|
|
3891
3794
|
class="flex line-clamp-1 w-[180px]"
|
|
3892
3795
|
@click=${this.handleClick}
|
|
3893
3796
|
>${this.renderLabel()}</span
|
|
3894
3797
|
>
|
|
3895
|
-
`}};
|
|
3798
|
+
`}};Ke.styles=[l.css``,c],Lr([d.property({type:String})],Ke.prototype,"placeholder",2),Ke=Lr([d.customElement("rtg-select-value")],Ke);var Zs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Ze=(o,e,r,n)=>{for(var t=n>1?void 0:n?Js(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Zs(e,r,t),t};i.Select=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.selectedValue="",this.uuid=vr(),this.handleClickOutside=e=>{var t,s;const r=(t=this.shadowRoot)==null?void 0:t.querySelector("[data-select-uuid]"),n=e.target;if(!n.tagName.includes("RTG-SELECT")){if(!r||!r.contains(n))this.isOpen=!1;else if(!((s=n.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`
|
|
3896
3799
|
<div part="select" class="relative" data-select-uuid=${this.uuid}>
|
|
3897
3800
|
<slot name="trigger"></slot>
|
|
3898
3801
|
<div ?hidden="${!this.isOpen}">
|
|
3899
3802
|
<slot name="content"></slot>
|
|
3900
3803
|
</div>
|
|
3901
3804
|
</div>
|
|
3902
|
-
`}},i.Select.styles=[l.css``,c],
|
|
3805
|
+
`}},i.Select.styles=[l.css``,c],Ze([d.state()],i.Select.prototype,"isOpen",2),Ze([d.state()],i.Select.prototype,"selectedValue",2),Ze([d.state()],i.Select.prototype,"uuid",2),i.Select=Ze([d.customElement("rtg-select")],i.Select);var Je=(o=>(o.VERTICAL="vertical",o.HORIZONTAL="horizontal",o))(Je||{}),js=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,Nt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Qs(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&js(e,r,t),t};i.Separator=class extends f{constructor(){super(...arguments),this.orientation=Je.HORIZONTAL,this.twClass=""}getAttributesToExclude(){return["variant"]}render(){const e=this.getFilteredAttributes();return l.html` <div
|
|
3903
3806
|
part="separator"
|
|
3904
|
-
${
|
|
3905
|
-
class=${u(this.orientation===
|
|
3807
|
+
${$(e)}
|
|
3808
|
+
class=${u(this.orientation===Je.HORIZONTAL?"shrink-0 bg-border w-full h-[1px] my-4":"shrink-0 bg-border h-full w-[1px]",this.twClass)}
|
|
3906
3809
|
role="none"
|
|
3907
3810
|
>
|
|
3908
|
-
${this.orientation!==
|
|
3909
|
-
</div>`}},i.Separator.styles=[l.css``,c],
|
|
3811
|
+
${this.orientation!==Je.HORIZONTAL&&" "}
|
|
3812
|
+
</div>`}},i.Separator.styles=[l.css``,c],Nt([d.property({type:String})],i.Separator.prototype,"orientation",2),Nt([d.property({type:String})],i.Separator.prototype,"twClass",2),i.Separator=Nt([d.customElement("rtg-separator")],i.Separator);var ea=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,je=(o,e,r,n)=>{for(var t=n>1?void 0:n?ta(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ea(e,r,t),t};i.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`
|
|
3910
3813
|
<div class="${u("flex items-center space-x-2",this.twClass)}">
|
|
3911
3814
|
<div
|
|
3912
3815
|
part="switch"
|
|
@@ -3927,11 +3830,11 @@ body {
|
|
|
3927
3830
|
</div>
|
|
3928
3831
|
<slot></slot>
|
|
3929
3832
|
</div>
|
|
3930
|
-
`}},i.Switch.styles=[l.css``,c],
|
|
3833
|
+
`}},i.Switch.styles=[l.css``,c],je([d.property({type:Boolean,reflect:!0})],i.Switch.prototype,"checked",2),je([d.property({type:Boolean})],i.Switch.prototype,"disabled",2),je([d.property({type:String})],i.Switch.prototype,"twClass",2),i.Switch=je([d.customElement("rtg-switch")],i.Switch);const ra="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 na=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,W=(o,e,r,n)=>{for(var t=n>1?void 0:n?oa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&na(e,r,t),t};let z=class extends f{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(o){this.value=this.defaultValue}handleInputChange(o){const e=o.target;this.value=e.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3931
3834
|
<textarea
|
|
3932
3835
|
part="textarea"
|
|
3933
|
-
${
|
|
3934
|
-
class="${u(
|
|
3836
|
+
${$(o)}
|
|
3837
|
+
class="${u(ra,this.className,this.twCLass)}"
|
|
3935
3838
|
placeholder="${this.placeholder}"
|
|
3936
3839
|
.value=${this.value}
|
|
3937
3840
|
.rows="${this.rows}"
|
|
@@ -3939,12 +3842,12 @@ body {
|
|
|
3939
3842
|
?disabled=${this.disabled}
|
|
3940
3843
|
@change="${this.handleInputChange}"
|
|
3941
3844
|
/>
|
|
3942
|
-
`}};
|
|
3845
|
+
`}};z.styles=[c],W([d.property({type:Boolean})],z.prototype,"disabled",2),W([d.property({type:String})],z.prototype,"placeholder",2),W([d.property({type:String})],z.prototype,"defaultValue",2),W([d.property({type:String})],z.prototype,"rows",2),W([d.property({type:String})],z.prototype,"cols",2),W([d.property({type:String})],z.prototype,"value",2),W([d.property({type:String})],z.prototype,"twCLass",2),z=W([d.customElement("rtg-textarea")],z);const ia=M("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"}}),sa="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]",aa="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 la=Object.defineProperty,da=Object.getOwnPropertyDescriptor,Tt=(o,e,r,n)=>{for(var t=n>1?void 0:n?da(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&la(e,r,t),t};const Ir="closed";let K=class extends l.LitElement{constructor(){super(...arguments),this.variant="default",this.state=Ir,this.handleCloseButtonClick=o=>{o.stopPropagation(),this.state=Ir,this.dispatchEvent(new CustomEvent("close-toast",{bubbles:!0,composed:!0}))}}render(){return l.html`
|
|
3943
3846
|
${this.state==="open"?l.html`<ol
|
|
3944
3847
|
part="toast-view-port"
|
|
3945
3848
|
tabindex="-1"
|
|
3946
3849
|
@click="${o=>o.stopPropagation()}"
|
|
3947
|
-
class="${u(
|
|
3850
|
+
class="${u(sa,this.className)}"
|
|
3948
3851
|
>
|
|
3949
3852
|
<li
|
|
3950
3853
|
role="status"
|
|
@@ -3953,27 +3856,27 @@ body {
|
|
|
3953
3856
|
tabindex="0"
|
|
3954
3857
|
data-state="${this.state}"
|
|
3955
3858
|
data-swipe-direction="right"
|
|
3956
|
-
class="${u(
|
|
3859
|
+
class="${u(K.toastVariants({variant:this.variant,className:this.className}),this.className)}"
|
|
3957
3860
|
data-radix-collection-item=""
|
|
3958
3861
|
style="user-select: none; touch-action: none;"
|
|
3959
3862
|
>
|
|
3960
3863
|
<slot></slot>
|
|
3961
3864
|
<button
|
|
3962
3865
|
type="button"
|
|
3963
|
-
class="${
|
|
3866
|
+
class="${aa}"
|
|
3964
3867
|
toast-close=""
|
|
3965
3868
|
data-radix-toast-announce-exclude=""
|
|
3966
3869
|
@click="${o=>this.handleCloseButtonClick(o)}"
|
|
3967
3870
|
>
|
|
3968
|
-
${
|
|
3871
|
+
${jn()}
|
|
3969
3872
|
</button>
|
|
3970
3873
|
</li>
|
|
3971
3874
|
</ol>`:l.nothing}
|
|
3972
|
-
`}};
|
|
3875
|
+
`}};K.toastVariants=ia,K.styles=[l.css`
|
|
3973
3876
|
button[toast-close] {
|
|
3974
3877
|
pointer-events: auto;
|
|
3975
3878
|
}
|
|
3976
|
-
`,c],
|
|
3879
|
+
`,c],Tt([d.property({type:String})],K.prototype,"variant",2),Tt([d.property({attribute:"data-state",type:String})],K.prototype,"state",2),K=Tt([d.customElement("rtg-toast-view-port")],K);var ca=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,qt=(o,e,r,n)=>{for(var t=n>1?void 0:n?ua(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ca(e,r,t),t};let Ae=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 o=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=o==null?void 0:o.assignedElements();if(e){for(let n=0;n<e.length;n++)if(e[n]instanceof K)return e[n]}return null}updated(o){super.updated(o);const e=this._content;e&&(e.dataset.state=this.isOpen?"open":"closed")}render(){return l.html`
|
|
3977
3880
|
<div class="{${this.twClass}}" part="toast">
|
|
3978
3881
|
<div>
|
|
3979
3882
|
<slot @click="${this.onClick}"></slot>
|
|
@@ -3981,7 +3884,7 @@ body {
|
|
|
3981
3884
|
<slot></slot>
|
|
3982
3885
|
<div></div>
|
|
3983
3886
|
</div>
|
|
3984
|
-
`}};
|
|
3887
|
+
`}};Ae.styles=[l.css``,c],qt([d.property({type:String})],Ae.prototype,"twClass",2),qt([d.state()],Ae.prototype,"isOpen",2),Ae=qt([d.customElement("rtg-toast")],Ae);var Ar=(o=>(o.SMALL="sm",o.MEDIUM="md",o.LARGE="lg",o))(Ar||{}),Rr=(o=>(o.DEFAULT="default",o.OUTLINE="outline",o))(Rr||{});const pa=M("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 ha=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,se=(o,e,r,n)=>{for(var t=n>1?void 0:n?ga(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ha(e,r,t),t};i.Toggle=class extends f{constructor(){super(...arguments),this.disabled=!1,this.twCLass="",this.checked=!1,this.required=!1,this.variant=Rr.DEFAULT,this.size=Ar.SMALL}getAttributesToExclude(){return["disabled","checked","variant","size","required"]}toggle(){this.disabled||(this.checked=!this.checked)}render(){const e=this.getFilteredAttributes();return pn.html`
|
|
3985
3888
|
<button
|
|
3986
3889
|
type="button"
|
|
3987
3890
|
part="toggle"
|
|
@@ -3992,11 +3895,11 @@ body {
|
|
|
3992
3895
|
@click=${this.toggle}
|
|
3993
3896
|
?required=${this.required}
|
|
3994
3897
|
?disabled=${this.disabled}
|
|
3995
|
-
${
|
|
3898
|
+
${$(e)}
|
|
3996
3899
|
>
|
|
3997
3900
|
<slot></slot>
|
|
3998
3901
|
</button>
|
|
3999
|
-
`}},i.Toggle.styles=[c],i.Toggle.toggleVariants=
|
|
3902
|
+
`}},i.Toggle.styles=[c],i.Toggle.toggleVariants=pa,se([d.property({type:Boolean})],i.Toggle.prototype,"disabled",2),se([d.property({type:String})],i.Toggle.prototype,"twCLass",2),se([d.property({attribute:!0,type:Boolean,reflect:!0})],i.Toggle.prototype,"checked",2),se([d.property({attribute:!0,type:Boolean,reflect:!0})],i.Toggle.prototype,"required",2),se([d.property({attribute:!0,type:String})],i.Toggle.prototype,"variant",2),se([d.property({attribute:!0,type:String})],i.Toggle.prototype,"size",2),i.Toggle=se([d.customElement("rtg-toggle")],i.Toggle);const ma=M("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 va=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,q=(o,e,r,n)=>{for(var t=n>1?void 0:n?fa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&va(e,r,t),t};let S=class extends l.LitElement{constructor(){super(...arguments),this.click=()=>{},this.disabled=!1,this.isCustomClass=!1,this.variant="default",this.size="default",this.mode="single",this.selectedStartDate=null,this.selectedEndDate=null}render(){return l.html`
|
|
4000
3903
|
<main>
|
|
4001
3904
|
<rtg-progress .value="${50}"></rtg-progress>
|
|
4002
3905
|
</main>
|
|
@@ -4411,7 +4314,7 @@ body {
|
|
|
4411
4314
|
</div>
|
|
4412
4315
|
</main>
|
|
4413
4316
|
|
|
4414
|
-
`}};S.buttonVariants=
|
|
4317
|
+
`}};S.buttonVariants=ma,S.styles=[c,l.css`
|
|
4415
4318
|
:host {
|
|
4416
4319
|
--rtg-sample-demo-bg: unset;
|
|
4417
4320
|
--rtg-sample-demo-color: unset;
|
|
@@ -4424,7 +4327,7 @@ body {
|
|
|
4424
4327
|
border-radius: var(--rtg-sample-demo-radius);
|
|
4425
4328
|
height: var(--rtg-sample-demo-height);
|
|
4426
4329
|
}
|
|
4427
|
-
`],q([d.property({type:Function})],S.prototype,"click",2),q([d.property({type:Boolean})],S.prototype,"disabled",2),q([d.property({type:Boolean})],S.prototype,"isCustomClass",2),q([d.property({type:String})],S.prototype,"variant",2),q([d.property({type:String})],S.prototype,"size",2),q([d.property({type:String})],S.prototype,"mode",2),q([d.property({type:Object})],S.prototype,"selectedStartDate",2),q([d.property({type:Object})],S.prototype,"selectedEndDate",2),S=q([d.customElement("rtg-sample-demo")],S);var
|
|
4330
|
+
`],q([d.property({type:Function})],S.prototype,"click",2),q([d.property({type:Boolean})],S.prototype,"disabled",2),q([d.property({type:Boolean})],S.prototype,"isCustomClass",2),q([d.property({type:String})],S.prototype,"variant",2),q([d.property({type:String})],S.prototype,"size",2),q([d.property({type:String})],S.prototype,"mode",2),q([d.property({type:Object})],S.prototype,"selectedStartDate",2),q([d.property({type:Object})],S.prototype,"selectedEndDate",2),S=q([d.customElement("rtg-sample-demo")],S);var ba=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,ye=(o,e,r,n)=>{for(var t=n>1?void 0:n?wa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ba(e,r,t),t};i.MenubarMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.handleClickOutside=e=>{var n;const r=e.target;(n=this.shadowRoot)!=null&&n.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(n=>{n!==this&&(n.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.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 n=r;r!==e.target&&(n.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 n=0;n<e.length-1;n+=2){const t=e[n],s=e[n+1],a=crypto.randomUUID();r.push(a),t.dataset.pairId=a,s.dataset.pairId=a}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)}closeAllMenus(){document.querySelectorAll("rtg-menubar-menu").forEach(r=>{r.isOpen=!1,r.isHovering=!1})}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}render(){return l.html`
|
|
4428
4331
|
<div>
|
|
4429
4332
|
<div
|
|
4430
4333
|
role="menuitem"
|
|
@@ -4445,7 +4348,7 @@ body {
|
|
|
4445
4348
|
<slot></slot>
|
|
4446
4349
|
</div>
|
|
4447
4350
|
</div>
|
|
4448
|
-
`}},i.MenubarMenu.styles=[l.css``,c],
|
|
4351
|
+
`}},i.MenubarMenu.styles=[l.css``,c],ye([d.state()],i.MenubarMenu.prototype,"isOpen",2),ye([d.state()],i.MenubarMenu.prototype,"uniqueIds",2),ye([d.state()],i.MenubarMenu.prototype,"selectedMenu",2),ye([d.state()],i.MenubarMenu.prototype,"isHovering",2),ye([d.property({type:String})],i.MenubarMenu.prototype,"id",2),i.MenubarMenu=ye([d.customElement("rtg-menubar-menu")],i.MenubarMenu);var ya=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,Re=(o,e,r,n)=>{for(var t=n>1?void 0:n?xa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ya(e,r,t),t};i.MenubarContent=class extends l.LitElement{constructor(){super(...arguments),this.state=qe,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof i.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"),n=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(n!=null&&n.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
4449
4352
|
<div
|
|
4450
4353
|
part="menubar-content"
|
|
4451
4354
|
id="${this.id}"
|
|
@@ -4463,7 +4366,7 @@ body {
|
|
|
4463
4366
|
>
|
|
4464
4367
|
<slot></slot>
|
|
4465
4368
|
</div>
|
|
4466
|
-
`}},i.MenubarContent.styles=[l.css``,c],Re([d.property({attribute:"data-state",type:String})],i.MenubarContent.prototype,"state",2),Re([d.property({type:String})],i.MenubarContent.prototype,"id",2),Re([d.property({type:String})],i.MenubarContent.prototype,"side",2),Re([d.state()],i.MenubarContent.prototype,"isOpen",2),i.MenubarContent=Re([d.customElement("rtg-menubar-content")],i.MenubarContent);var
|
|
4369
|
+
`}},i.MenubarContent.styles=[l.css``,c],Re([d.property({attribute:"data-state",type:String})],i.MenubarContent.prototype,"state",2),Re([d.property({type:String})],i.MenubarContent.prototype,"id",2),Re([d.property({type:String})],i.MenubarContent.prototype,"side",2),Re([d.state()],i.MenubarContent.prototype,"isOpen",2),i.MenubarContent=Re([d.customElement("rtg-menubar-content")],i.MenubarContent);var Ca=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Qe=(o,e,r,n)=>{for(var t=n>1?void 0:n?$a(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ca(e,r,t),t};i.MenubarGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${i.MenubarGroup._counter++}`:this._id=`rtgcmdrxlxg${i.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`
|
|
4467
4370
|
<div
|
|
4468
4371
|
part="menubar-group"
|
|
4469
4372
|
class="${e}"
|
|
@@ -4486,7 +4389,7 @@ body {
|
|
|
4486
4389
|
<slot></slot>
|
|
4487
4390
|
</div>
|
|
4488
4391
|
</div>
|
|
4489
|
-
`}`}},i.MenubarGroup._counter=0,i.MenubarGroup.styles=[l.css``,c],
|
|
4392
|
+
`}`}},i.MenubarGroup._counter=0,i.MenubarGroup.styles=[l.css``,c],Qe([d.property({type:String})],i.MenubarGroup.prototype,"heading",2),Qe([d.property({attribute:"id",type:String})],i.MenubarGroup.prototype,"_id",2),Qe([d.property({attribute:"aria-hidden",type:String})],i.MenubarGroup.prototype,"_hidden",2),i.MenubarGroup=Qe([d.customElement("rtg-menubar-group")],i.MenubarGroup);var _a=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,ze=(o,e,r,n)=>{for(var t=n>1?void 0:n?Oa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&_a(e,r,t),t};i.MenubarItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.MenubarItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
4490
4393
|
<div
|
|
4491
4394
|
part="menubar-item"
|
|
4492
4395
|
class="${u("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)}"
|
|
@@ -4503,7 +4406,7 @@ body {
|
|
|
4503
4406
|
>
|
|
4504
4407
|
<slot></slot>
|
|
4505
4408
|
</div>
|
|
4506
|
-
`}`}},i.MenubarItem._counter=0,i.MenubarItem.styles=[l.css``,c],
|
|
4409
|
+
`}`}},i.MenubarItem._counter=0,i.MenubarItem.styles=[l.css``,c],ze([d.property({type:String})],i.MenubarItem.prototype,"_id",2),ze([d.property({attribute:"aria-hidden",type:String})],i.MenubarItem.prototype,"_hidden",2),ze([d.property({attribute:"data-value",type:String})],i.MenubarItem.prototype,"value",1),ze([d.property({type:Boolean})],i.MenubarItem.prototype,"selected",2),i.MenubarItem=ze([d.customElement("rtg-menubar-item")],i.MenubarItem);var Ea=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,ae=(o,e,r,n)=>{for(var t=n>1?void 0:n?Pa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ea(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.MenubarRadioItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
4507
4410
|
<div
|
|
4508
4411
|
part="menubar-radio-item"
|
|
4509
4412
|
class="${u("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)}"
|
|
@@ -4522,7 +4425,7 @@ body {
|
|
|
4522
4425
|
<span
|
|
4523
4426
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
4524
4427
|
>
|
|
4525
|
-
${this.checked?l.html` ${
|
|
4428
|
+
${this.checked?l.html` ${gt()} `:l.nothing}
|
|
4526
4429
|
</span>
|
|
4527
4430
|
<slot></slot>
|
|
4528
4431
|
</div>
|
|
@@ -4532,7 +4435,7 @@ body {
|
|
|
4532
4435
|
height: 16px;
|
|
4533
4436
|
display: inline-block;
|
|
4534
4437
|
}
|
|
4535
|
-
`,c],ae([d.property({type:String})],i.MenubarRadioItem.prototype,"_id",2),ae([d.property({attribute:"aria-hidden",type:String})],i.MenubarRadioItem.prototype,"_hidden",2),ae([d.property({attribute:"data-value",type:String})],i.MenubarRadioItem.prototype,"value",1),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"selected",2),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"checked",2),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"disabled",2),i.MenubarRadioItem=ae([d.customElement("rtg-menubar-radio-item")],i.MenubarRadioItem);var
|
|
4438
|
+
`,c],ae([d.property({type:String})],i.MenubarRadioItem.prototype,"_id",2),ae([d.property({attribute:"aria-hidden",type:String})],i.MenubarRadioItem.prototype,"_hidden",2),ae([d.property({attribute:"data-value",type:String})],i.MenubarRadioItem.prototype,"value",1),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"selected",2),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"checked",2),ae([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"disabled",2),i.MenubarRadioItem=ae([d.customElement("rtg-menubar-radio-item")],i.MenubarRadioItem);var Sa=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,le=(o,e,r,n)=>{for(var t=n>1?void 0:n?Da(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Sa(e,r,t),t};i.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,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${i.MenubarCheckboxItem._counter++}`:this._id=`rtgcmdrxgxli${i.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`
|
|
4536
4439
|
<div
|
|
4537
4440
|
part="menubar-checkbox-item"
|
|
4538
4441
|
class="${u("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)}"
|
|
@@ -4572,7 +4475,7 @@ body {
|
|
|
4572
4475
|
height: 16px;
|
|
4573
4476
|
display: inline-block;
|
|
4574
4477
|
}
|
|
4575
|
-
`,c],le([d.property({type:String})],i.MenubarCheckboxItem.prototype,"_id",2),le([d.property({attribute:"aria-hidden",type:String})],i.MenubarCheckboxItem.prototype,"_hidden",2),le([d.property({attribute:"data-value",type:String})],i.MenubarCheckboxItem.prototype,"value",1),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"selected",2),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"checked",2),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"disabled",2),i.MenubarCheckboxItem=le([d.customElement("rtg-menubar-checkbox-item")],i.MenubarCheckboxItem);var
|
|
4478
|
+
`,c],le([d.property({type:String})],i.MenubarCheckboxItem.prototype,"_id",2),le([d.property({attribute:"aria-hidden",type:String})],i.MenubarCheckboxItem.prototype,"_hidden",2),le([d.property({attribute:"data-value",type:String})],i.MenubarCheckboxItem.prototype,"value",1),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"selected",2),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"checked",2),le([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"disabled",2),i.MenubarCheckboxItem=le([d.customElement("rtg-menubar-checkbox-item")],i.MenubarCheckboxItem);var ka=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,Ut=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ma(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ka(e,r,t),t};i.MenubarSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var r,n;if(this._id!=="")return this._id;const e=(n=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${i.MenubarSeparator._counter++}`:this._id=`rtgcmdrxlxs${i.MenubarSeparator._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
4576
4479
|
<div
|
|
4577
4480
|
part="menubar-seperator"
|
|
4578
4481
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -4580,12 +4483,12 @@ body {
|
|
|
4580
4483
|
role="separator"
|
|
4581
4484
|
id="${this.identifier}"
|
|
4582
4485
|
></div>
|
|
4583
|
-
`}`}},i.MenubarSeparator._counter=0,i.MenubarSeparator.styles=[l.css``,c],
|
|
4486
|
+
`}`}},i.MenubarSeparator._counter=0,i.MenubarSeparator.styles=[l.css``,c],Ut([d.property({type:String})],i.MenubarSeparator.prototype,"_id",2),Ut([d.property({attribute:"aria-hidden",type:String})],i.MenubarSeparator.prototype,"_hidden",2),i.MenubarSeparator=Ut([d.customElement("rtg--menubar-separator")],i.MenubarSeparator);var La=Object.defineProperty,Ia=Object.getOwnPropertyDescriptor,Aa=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ia(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&La(e,r,t),t};i.MenubarShortcut=class extends l.LitElement{render(){return l.html`
|
|
4584
4487
|
part="menubar-shortcut"
|
|
4585
4488
|
<span class="${u("ml-auto text-xs font-semibold",this.className)}">
|
|
4586
4489
|
<slot></slot>
|
|
4587
4490
|
</span>
|
|
4588
|
-
`}},i.MenubarShortcut.styles=[l.css``,c],i.MenubarShortcut=
|
|
4491
|
+
`}},i.MenubarShortcut.styles=[l.css``,c],i.MenubarShortcut=Aa([d.customElement("rtg-menubar-shortcut")],i.MenubarShortcut);var Ra=Object.defineProperty,za=Object.getOwnPropertyDescriptor,zr=(o,e,r,n)=>{for(var t=n>1?void 0:n?za(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ra(e,r,t),t};i.Menubar=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
|
4589
4492
|
<div
|
|
4590
4493
|
part="menubar"
|
|
4591
4494
|
role="menubar"
|
|
@@ -4596,7 +4499,7 @@ body {
|
|
|
4596
4499
|
>
|
|
4597
4500
|
<slot></slot>
|
|
4598
4501
|
</div>
|
|
4599
|
-
`}},i.Menubar.styles=[l.css``,c],
|
|
4502
|
+
`}},i.Menubar.styles=[l.css``,c],zr([d.property({type:String})],i.Menubar.prototype,"twCLass",2),i.Menubar=zr([d.customElement("rtg-menubar")],i.Menubar);var Ba=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,Br=(o,e,r,n)=>{for(var t=n>1?void 0:n?Na(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ba(e,r,t),t};i.NavigationMenuList=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4600
4503
|
<div part="navigation-menu-list" class="${u("relative",this.twClass)}">
|
|
4601
4504
|
<ul
|
|
4602
4505
|
data-orientation="horizontal"
|
|
@@ -4607,7 +4510,7 @@ body {
|
|
|
4607
4510
|
</ul>
|
|
4608
4511
|
<div></div>
|
|
4609
4512
|
</div>
|
|
4610
|
-
`}},i.NavigationMenuList.styles=[l.css``,c],
|
|
4513
|
+
`}},i.NavigationMenuList.styles=[l.css``,c],Br([d.property({type:String})],i.NavigationMenuList.prototype,"twClass",2),i.NavigationMenuList=Br([d.customElement("rtg-navigation-menu-list")],i.NavigationMenuList);var Ta=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,xe=(o,e,r,n)=>{for(var t=n>1?void 0:n?qa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ta(e,r,t),t};i.NavigationMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.state="close",this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof i.NavigationMenuItem);)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"),n=(s=this.shadowRoot)==null?void 0:s.querySelector("button");r&&!r.contains(e.target)&&!(n!=null&&n.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
4611
4514
|
<div
|
|
4612
4515
|
part="navigation-menu-content"
|
|
4613
4516
|
class="${u("absolute top-full flex justify-center",this.twClass)}"
|
|
@@ -4631,7 +4534,7 @@ body {
|
|
|
4631
4534
|
</div>
|
|
4632
4535
|
</div>
|
|
4633
4536
|
</div>
|
|
4634
|
-
`}},i.NavigationMenuContent.styles=[l.css``,c],
|
|
4537
|
+
`}},i.NavigationMenuContent.styles=[l.css``,c],xe([d.property({type:String})],i.NavigationMenuContent.prototype,"twClass",2),xe([d.property({attribute:"data-state",type:String})],i.NavigationMenuContent.prototype,"state",2),xe([d.property({type:String})],i.NavigationMenuContent.prototype,"id",2),xe([d.property({type:String})],i.NavigationMenuContent.prototype,"side",2),xe([d.state()],i.NavigationMenuContent.prototype,"isOpen",2),i.NavigationMenuContent=xe([d.customElement("rtg-navigation-menu-content")],i.NavigationMenuContent);var Ua=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,de=(o,e,r,n)=>{for(var t=n>1?void 0:n?Fa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ua(e,r,t),t};i.NavigationMenuItem=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.value="",this.navigationLink=!0,this.isOpen=!1,this.uniqueIds=[],this.isHovering=!1,this.handleClickOutside=e=>{var n;const r=e.target;(n=this.shadowRoot)!=null&&n.contains(r)||(this.isOpen=!1)}}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}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 n=0;n<e.length-1;n+=2){const t=e[n],s=e[n+1],a=crypto.randomUUID();r.push(a),t.dataset.pairId=a,s.dataset.pairId=a}this.uniqueIds=r,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}closeAllMenus(){document.querySelectorAll("rtg-navigation-menu-item").forEach(r=>{r.isOpen=!1,r.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("rtg-navigation-menu-item").forEach(n=>{n!==this&&(n.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.NavigationMenuContent)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}render(){return l.html`
|
|
4635
4538
|
<li part="navigation-menu-item" class="${u("relative",this.twClass)}">
|
|
4636
4539
|
<div
|
|
4637
4540
|
class="flex"
|
|
@@ -4664,7 +4567,7 @@ body {
|
|
|
4664
4567
|
<slot></slot>
|
|
4665
4568
|
</div>
|
|
4666
4569
|
</li>
|
|
4667
|
-
`}},i.NavigationMenuItem.styles=[l.css``,c],de([d.property({type:String})],i.NavigationMenuItem.prototype,"twClass",2),de([d.property({type:String})],i.NavigationMenuItem.prototype,"value",2),de([d.property({type:Boolean})],i.NavigationMenuItem.prototype,"navigationLink",2),de([d.state()],i.NavigationMenuItem.prototype,"isOpen",2),de([d.state()],i.NavigationMenuItem.prototype,"uniqueIds",2),de([d.state()],i.NavigationMenuItem.prototype,"isHovering",2),i.NavigationMenuItem=de([d.customElement("rtg-navigation-menu-item")],i.NavigationMenuItem);var
|
|
4570
|
+
`}},i.NavigationMenuItem.styles=[l.css``,c],de([d.property({type:String})],i.NavigationMenuItem.prototype,"twClass",2),de([d.property({type:String})],i.NavigationMenuItem.prototype,"value",2),de([d.property({type:Boolean})],i.NavigationMenuItem.prototype,"navigationLink",2),de([d.state()],i.NavigationMenuItem.prototype,"isOpen",2),de([d.state()],i.NavigationMenuItem.prototype,"uniqueIds",2),de([d.state()],i.NavigationMenuItem.prototype,"isHovering",2),i.NavigationMenuItem=de([d.customElement("rtg-navigation-menu-item")],i.NavigationMenuItem);var Va=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,Ft=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ga(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Va(e,r,t),t};i.NavigationMenuLink=class extends l.LitElement{constructor(){super(...arguments),this.href="/",this.twCLass=""}render(){return l.html`
|
|
4668
4571
|
<a
|
|
4669
4572
|
part="navigation-menu-link"
|
|
4670
4573
|
class="${u("flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md",this.twCLass)}"
|
|
@@ -4679,7 +4582,7 @@ body {
|
|
|
4679
4582
|
a:hover {
|
|
4680
4583
|
background-color: #f2f2f2;
|
|
4681
4584
|
}
|
|
4682
|
-
`,c],
|
|
4585
|
+
`,c],Ft([d.property({type:String})],i.NavigationMenuLink.prototype,"href",2),Ft([d.property({type:String})],i.NavigationMenuLink.prototype,"twCLass",2),i.NavigationMenuLink=Ft([d.customElement("rtg-navigation-menu-link")],i.NavigationMenuLink);var Ha=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,Nr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ya(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ha(e,r,t),t};i.NavigationMenu=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4683
4586
|
<nav
|
|
4684
4587
|
part="navigation-menu"
|
|
4685
4588
|
aria-label="Main"
|
|
@@ -4689,14 +4592,14 @@ body {
|
|
|
4689
4592
|
>
|
|
4690
4593
|
<slot></slot>
|
|
4691
4594
|
</nav>
|
|
4692
|
-
`}},i.NavigationMenu.styles=[l.css``,c],
|
|
4595
|
+
`}},i.NavigationMenu.styles=[l.css``,c],Nr([d.property({type:String})],i.NavigationMenu.prototype,"twClass",2),i.NavigationMenu=Nr([d.customElement("rtg-navigation-menu")],i.NavigationMenu);var Xa=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Tr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Wa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Xa(e,r,t),t};i.PaginationContent=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4693
4596
|
<ul
|
|
4694
4597
|
part="pagination-content"
|
|
4695
4598
|
class="${u("flex flex-row items-center gap-1",this.twClass)}"
|
|
4696
4599
|
>
|
|
4697
4600
|
<slot></slot>
|
|
4698
4601
|
</ul>
|
|
4699
|
-
`}},i.PaginationContent.styles=[l.css``,c],
|
|
4602
|
+
`}},i.PaginationContent.styles=[l.css``,c],Tr([d.property({type:String})],i.PaginationContent.prototype,"twClass",2),i.PaginationContent=Tr([d.customElement("rtg-pagination-content")],i.PaginationContent);const Ka=M("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:{outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},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:"ghost",size:"default"}});var Za=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ce=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ja(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Za(e,r,t),t};i.PaginationLink=class extends l.LitElement{constructor(){super(...arguments),this.state="close",this.twClass="",this.isActive=!1,this.size="icon",this.variant="ghost",this.href="javascript:void(0)"}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return l.html`
|
|
4700
4603
|
<a
|
|
4701
4604
|
part="pagination-link"
|
|
4702
4605
|
data-state="${this.isActive}"
|
|
@@ -4707,11 +4610,11 @@ body {
|
|
|
4707
4610
|
>
|
|
4708
4611
|
<slot></slot>
|
|
4709
4612
|
</a>
|
|
4710
|
-
`}},i.PaginationLink.styles=[l.css``,c],i.PaginationLink.paginationVariants=
|
|
4613
|
+
`}},i.PaginationLink.styles=[l.css``,c],i.PaginationLink.paginationVariants=Ka,ce([d.property({attribute:"data-state",type:String})],i.PaginationLink.prototype,"state",2),ce([d.property({type:String})],i.PaginationLink.prototype,"twClass",2),ce([d.property({type:Boolean})],i.PaginationLink.prototype,"isActive",2),ce([d.property({type:String})],i.PaginationLink.prototype,"size",2),ce([d.property({type:String})],i.PaginationLink.prototype,"variant",2),ce([d.property({type:String})],i.PaginationLink.prototype,"href",2),i.PaginationLink=ce([d.customElement("rtg-pagination-link")],i.PaginationLink);var ja=Object.defineProperty,Qa=Object.getOwnPropertyDescriptor,et=(o,e,r,n)=>{for(var t=n>1?void 0:n?Qa(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ja(e,r,t),t};i.PaginationItem=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.uniqueIds=[],this.isActive=!1}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.PaginationLink)return r[t]}return null}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(n=>{n!==this&&(n.isActive=!1)}),this.isActive=!this.isActive}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 n=0;n<e.length-1;n+=1){const t=e[n],s=crypto.randomUUID();r.push(s),t.dataset.pairId=s}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)}render(){return l.html`
|
|
4711
4614
|
<li part="pagination-item" class="${u("",this.twClass)}">
|
|
4712
4615
|
<slot @click="${this.handleClick}"></slot>
|
|
4713
4616
|
</li>
|
|
4714
|
-
`}},i.PaginationItem.styles=[l.css``,c],
|
|
4617
|
+
`}},i.PaginationItem.styles=[l.css``,c],et([d.property({type:String})],i.PaginationItem.prototype,"twClass",2),et([d.state()],i.PaginationItem.prototype,"uniqueIds",2),et([d.property({type:Boolean})],i.PaginationItem.prototype,"isActive",2),i.PaginationItem=et([d.customElement("rtg-pagination-item")],i.PaginationItem);var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,qr=(o,e,r,n)=>{for(var t=n>1?void 0:n?tl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&el(e,r,t),t};i.PaginationEllipsis=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4715
4618
|
<span
|
|
4716
4619
|
part="pagination-ellipsis"
|
|
4717
4620
|
class="${u("flex h-9 w-9 items-center justify-center",this.twClass)}"
|
|
@@ -4736,7 +4639,7 @@ body {
|
|
|
4736
4639
|
</span>
|
|
4737
4640
|
<slot></slot>
|
|
4738
4641
|
</span>
|
|
4739
|
-
`}},i.PaginationEllipsis.styles=[l.css``,c],
|
|
4642
|
+
`}},i.PaginationEllipsis.styles=[l.css``,c],qr([d.property({type:String})],i.PaginationEllipsis.prototype,"twClass",2),i.PaginationEllipsis=qr([d.customElement("rtg-pagination-ellipsis")],i.PaginationEllipsis);var rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,Ur=(o,e,r,n)=>{for(var t=n>1?void 0:n?nl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&rl(e,r,t),t};i.PaginationNext=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4740
4643
|
<rtg-pagination-link
|
|
4741
4644
|
class="${u("gap-1 pl-2.5",this.twClass)}"
|
|
4742
4645
|
aria-label="Go to next page"
|
|
@@ -4759,7 +4662,7 @@ body {
|
|
|
4759
4662
|
</svg>
|
|
4760
4663
|
<slot></slot>
|
|
4761
4664
|
</rtg-pagination-link>
|
|
4762
|
-
`}},i.PaginationNext.styles=[l.css``,c],
|
|
4665
|
+
`}},i.PaginationNext.styles=[l.css``,c],Ur([d.property({type:String})],i.PaginationNext.prototype,"twClass",2),i.PaginationNext=Ur([d.customElement("rtg-pagination-next")],i.PaginationNext);var ol=Object.defineProperty,il=Object.getOwnPropertyDescriptor,Fr=(o,e,r,n)=>{for(var t=n>1?void 0:n?il(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ol(e,r,t),t};i.PaginationPrevious=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4763
4666
|
<rtg-pagination-link
|
|
4764
4667
|
class="${u("gap-1 pl-2.5",this.twClass)}"
|
|
4765
4668
|
aria-label="Go to previous page"
|
|
@@ -4781,7 +4684,7 @@ body {
|
|
|
4781
4684
|
><span>Previous</span>
|
|
4782
4685
|
<slot></slot>
|
|
4783
4686
|
</rtg-pagination-link>
|
|
4784
|
-
`}},i.PaginationPrevious.styles=[l.css``,c],
|
|
4687
|
+
`}},i.PaginationPrevious.styles=[l.css``,c],Fr([d.property({type:String})],i.PaginationPrevious.prototype,"twClass",2),i.PaginationPrevious=Fr([d.customElement("rtg-pagination-previous")],i.PaginationPrevious);var sl=Object.defineProperty,al=Object.getOwnPropertyDescriptor,Vr=(o,e,r,n)=>{for(var t=n>1?void 0:n?al(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&sl(e,r,t),t};i.Pagination=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4785
4688
|
<nav
|
|
4786
4689
|
part="pagination"
|
|
4787
4690
|
role="navigation"
|
|
@@ -4790,7 +4693,7 @@ body {
|
|
|
4790
4693
|
>
|
|
4791
4694
|
<slot></slot>
|
|
4792
4695
|
</nav>
|
|
4793
|
-
`}},i.Pagination.styles=[l.css``,c],
|
|
4696
|
+
`}},i.Pagination.styles=[l.css``,c],Vr([d.property({type:String})],i.Pagination.prototype,"twClass",2),i.Pagination=Vr([d.customElement("rtg-pagination")],i.Pagination);var ll=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,ue=(o,e,r,n)=>{for(var t=n>1?void 0:n?dl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ll(e,r,t),t};i.Carousel=class extends l.LitElement{constructor(){super(...arguments),this.currentIndex=0,this.items=[],this.twCLass="",this.orientation="horizontal",this.size=!1}nextSlide(){this.currentIndex<this.items.length-1&&(this.currentIndex+=1,this.updateSlides())}prevSlide(){this.currentIndex>0&&(this.currentIndex-=1,this.updateSlides())}updateSlides(){let e;this.size?window.innerWidth>=1024?e=33.3333:window.innerWidth>=768?e=50:e=100:e=100;const r=this.orientation==="vertical"?100/this.items.length:100;this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*r}%)`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",()=>this.updateSlides())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",()=>this.updateSlides())}render(){const e=this.currentIndex===0,r=this.size===!0?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,n=this.currentIndex>=this.items.length-r;return l.html`
|
|
4794
4697
|
<div part="rtg-carousel" class="carousel-wrapper">
|
|
4795
4698
|
<div class="${u("carousel",this.className)} ${this.twCLass}">
|
|
4796
4699
|
<div class="slides">
|
|
@@ -4832,7 +4735,7 @@ body {
|
|
|
4832
4735
|
<path d="M19 12H5"></path>
|
|
4833
4736
|
</svg>`}
|
|
4834
4737
|
</button>
|
|
4835
|
-
<button @click="${this.nextSlide}" ?disabled="${
|
|
4738
|
+
<button @click="${this.nextSlide}" ?disabled="${n}">
|
|
4836
4739
|
${this.orientation==="horizontal"?l.html`<svg
|
|
4837
4740
|
xmlns="http://www.w3.org/2000/svg"
|
|
4838
4741
|
width="24"
|
|
@@ -4989,205 +4892,7 @@ body {
|
|
|
4989
4892
|
.controls button:disabled {
|
|
4990
4893
|
background: rgba(0, 0, 0, 0.2);
|
|
4991
4894
|
}
|
|
4992
|
-
`,ue([d.property({type:Number})],i.Carousel.prototype,"currentIndex",2),ue([d.property({type:Array})],i.Carousel.prototype,"items",2),ue([d.property({type:String})],i.Carousel.prototype,"twCLass",2),ue([d.property({type:String})],i.Carousel.prototype,"orientation",2),ue([d.property({type:Boolean})],i.Carousel.prototype,"size",2),ue([d.query(".slides")],i.Carousel.prototype,"slides",2),i.Carousel=ue([d.customElement("rtg-carousel")],i.Carousel);
|
|
4993
|
-
<div
|
|
4994
|
-
part="calendar"
|
|
4995
|
-
class="${u("p-3 rounded-md border shadow bg-popover",this.styleCalendar?"styled-calendar":"",this.className,this.twCLass)}"
|
|
4996
|
-
>
|
|
4997
|
-
<div
|
|
4998
|
-
class="flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0"
|
|
4999
|
-
>
|
|
5000
|
-
<div class="space-y-4">
|
|
5001
|
-
<div class="flex justify-center pt-1 relative items-center">
|
|
5002
|
-
<div class="space-x-1 flex items-center">
|
|
5003
|
-
<button
|
|
5004
|
-
style="width:1.75rem"
|
|
5005
|
-
class="nav-button text-muted-foreground absolute left-2 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 border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground h-7 w-7 p-0"
|
|
5006
|
-
@click="${this.previousMonth}"
|
|
5007
|
-
>
|
|
5008
|
-
<svg
|
|
5009
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5010
|
-
width="24"
|
|
5011
|
-
height="24"
|
|
5012
|
-
viewBox="0 0 24 24"
|
|
5013
|
-
fill="none"
|
|
5014
|
-
stroke="currentColor"
|
|
5015
|
-
stroke-width="2"
|
|
5016
|
-
stroke-linecap="round"
|
|
5017
|
-
stroke-linejoin="round"
|
|
5018
|
-
style="width:1.2rem;height:1.2rem;margin-top:-2px;margin-left:2px"
|
|
5019
|
-
class="lucide lucide-chevron-left rdp-nav_icon hover:text-muted-foreground"
|
|
5020
|
-
>
|
|
5021
|
-
<path d="m15 18-6-6 6-6"></path>
|
|
5022
|
-
</svg>
|
|
5023
|
-
</button>
|
|
5024
|
-
<div
|
|
5025
|
-
style="font-weight:600"
|
|
5026
|
-
class="text-sm text-accent-foreground"
|
|
5027
|
-
>
|
|
5028
|
-
${this.currentDate.toLocaleString("default",{month:"long",year:"numeric"})}
|
|
5029
|
-
</div>
|
|
5030
|
-
<button
|
|
5031
|
-
style="width:1.75rem"
|
|
5032
|
-
class="nav-button absolute right-1 text-muted-foreground 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 border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground h-7 w-7 p-0"
|
|
5033
|
-
@click="${this.nextMonth}"
|
|
5034
|
-
>
|
|
5035
|
-
<svg
|
|
5036
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5037
|
-
width="48"
|
|
5038
|
-
height="48"
|
|
5039
|
-
viewBox="0 0 24 24"
|
|
5040
|
-
fill="none"
|
|
5041
|
-
stroke="currentColor"
|
|
5042
|
-
stroke-width="2"
|
|
5043
|
-
stroke-linecap="round"
|
|
5044
|
-
stroke-linejoin="round"
|
|
5045
|
-
style="width:1.2rem;height:1.2rem;margin-top:-2px;margin-left:2px"
|
|
5046
|
-
class="lucide lucide-chevron-right rdp-nav_icon hover:text-muted-foreground"
|
|
5047
|
-
>
|
|
5048
|
-
<path d="m9 18 6-6-6-6"></path>
|
|
5049
|
-
</svg>
|
|
5050
|
-
</button>
|
|
5051
|
-
</div>
|
|
5052
|
-
</div>
|
|
5053
|
-
<table class="w-full border-collapse space-y-1" role="grid">
|
|
5054
|
-
<thead class="rdp-head">
|
|
5055
|
-
<tr class="flex">
|
|
5056
|
-
${["Su","Mo","Tu","We","Th","Fr","Sa"].map(p=>l.html`
|
|
5057
|
-
<th
|
|
5058
|
-
scope="col"
|
|
5059
|
-
class="text-day text-muted-foreground rounded-md w-8 font-medium"
|
|
5060
|
-
aria-label="${p}"
|
|
5061
|
-
>
|
|
5062
|
-
${p}
|
|
5063
|
-
</th>
|
|
5064
|
-
`)}
|
|
5065
|
-
</tr>
|
|
5066
|
-
</thead>
|
|
5067
|
-
<tbody class="rdp-tbody">
|
|
5068
|
-
${Array.from({length:Math.ceil(a.length/7)},(p,m)=>l.html`
|
|
5069
|
-
<tr class="flex w-full mt-2">
|
|
5070
|
-
${a.slice(m*7,(m+1)*7).map(h=>{const v=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),Number(h.day)),C=this.selectedStartDate&&v.toDateString()===this.selectedStartDate.toDateString(),$=this.selectedEndDate&&v.toDateString()===this.selectedEndDate.toDateString(),E=this.isDayInRange(v);return l.html`
|
|
5071
|
-
<td
|
|
5072
|
-
class="${u("relative p-0 text-center text-sm focus-within:relative focus-within:z-20",C&&h.isCurrentMonth&&"day-range-start",$&&h.isCurrentMonth&&"day-range-end",E&&h.isCurrentMonth&&"day-in-range bg-muted")}"
|
|
5073
|
-
role="presentation"
|
|
5074
|
-
>
|
|
5075
|
-
<button
|
|
5076
|
-
name="day"
|
|
5077
|
-
class="${u("flex justify-center items-center rounded cursor-pointer transition-colors duration-300 ease-in-out h-8 w-8 font-normal text-sm text-accent-foreground hover:bg-accent hover:text-accent-foreground",h.isInactive&&"hover:bg-accent text-muted-foreground",(C||$)&&h.isCurrentMonth&&"bg-primary text-primary-foreground opacity-100 hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground")}"
|
|
5078
|
-
role="gridcell"
|
|
5079
|
-
tabindex="-1"
|
|
5080
|
-
type="button"
|
|
5081
|
-
aria-selected="${(C||$)&&h.isCurrentMonth}"
|
|
5082
|
-
@click="${()=>this.selectDate(Number(h.day),h.isInactive)}"
|
|
5083
|
-
>
|
|
5084
|
-
${h.day}
|
|
5085
|
-
</button>
|
|
5086
|
-
</td>
|
|
5087
|
-
`})}
|
|
5088
|
-
</tr>
|
|
5089
|
-
`)}
|
|
5090
|
-
</tbody>
|
|
5091
|
-
</table>
|
|
5092
|
-
</div>
|
|
5093
|
-
</div>
|
|
5094
|
-
</div>
|
|
5095
|
-
`}},i.Calendar.styles=[l.css`
|
|
5096
|
-
:host {
|
|
5097
|
-
display: inline-block;
|
|
5098
|
-
|
|
5099
|
-
border: 1px solid #e0e0e0;
|
|
5100
|
-
border-radius: 8px;
|
|
5101
|
-
padding: 8px;
|
|
5102
|
-
}
|
|
5103
|
-
.styled-calendar {
|
|
5104
|
-
margin-left: -24px;
|
|
5105
|
-
margin-top: -24px;
|
|
5106
|
-
}
|
|
5107
|
-
.nav-button {
|
|
5108
|
-
background: transparent;
|
|
5109
|
-
border: 1px solid #ccc;
|
|
5110
|
-
cursor: pointer;
|
|
5111
|
-
font-size: 16px;
|
|
5112
|
-
border-radius: 6px;
|
|
5113
|
-
padding: 4px 8px;
|
|
5114
|
-
transition: background-color 0.3s ease;
|
|
5115
|
-
}
|
|
5116
|
-
.nav-button svg {
|
|
5117
|
-
pointer-events: none;
|
|
5118
|
-
width: 1rem;
|
|
5119
|
-
height: 1rem;
|
|
5120
|
-
flex-shrink: 0;
|
|
5121
|
-
padding-top: 4px;
|
|
5122
|
-
}
|
|
5123
|
-
table {
|
|
5124
|
-
width: 100%;
|
|
5125
|
-
border-collapse: collapse;
|
|
5126
|
-
}
|
|
5127
|
-
td {
|
|
5128
|
-
text-align: center;
|
|
5129
|
-
padding: 0;
|
|
5130
|
-
}
|
|
5131
|
-
td.day-range-start {
|
|
5132
|
-
border-top-left-radius: 8px;
|
|
5133
|
-
border-bottom-left-radius: 8px;
|
|
5134
|
-
}
|
|
5135
|
-
td.day-range-end {
|
|
5136
|
-
border-top-right-radius: 8px;
|
|
5137
|
-
border-bottom-right-radius: 8px;
|
|
5138
|
-
}
|
|
5139
|
-
.text-day {
|
|
5140
|
-
font-size: 0.8rem;
|
|
5141
|
-
}
|
|
5142
|
-
`,c],i.Calendar.buttonVariants=Al,F([d.property({type:Object})],i.Calendar.prototype,"currentDate",2),F([d.property({type:Object})],i.Calendar.prototype,"selectedStartDate",2),F([d.property({type:Object})],i.Calendar.prototype,"selectedEndDate",2),F([d.property({type:String})],i.Calendar.prototype,"variant",2),F([d.property({type:String})],i.Calendar.prototype,"size",2),F([d.property({type:Boolean})],i.Calendar.prototype,"styleCalendar",2),F([d.property({type:String})],i.Calendar.prototype,"twCLass",2),F([d.property({type:String})],i.Calendar.prototype,"mode",2),i.Calendar=F([d.customElement("rtg-calendar")],i.Calendar);var Bl=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Kt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Nl(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Bl(e,n,t),t};i.DatePicker=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}render(){return l.html`
|
|
5143
|
-
<div
|
|
5144
|
-
part="date-picker"
|
|
5145
|
-
class="${u("",this.className,this.twCLass)}"
|
|
5146
|
-
@date-selected=${this.handleDateSelected}
|
|
5147
|
-
>
|
|
5148
|
-
<rtg-popover>
|
|
5149
|
-
<!-- Trigger to open/close the popover -->
|
|
5150
|
-
<rtg-popover-trigger slot="trigger">
|
|
5151
|
-
<rtg-button
|
|
5152
|
-
class="w-64 justify-start text-left text-sm font-normal bg-background hover:bg-accent text-muted-foreground hover:text-muted-foreground"
|
|
5153
|
-
variant="outline"
|
|
5154
|
-
slot="trigger-button"
|
|
5155
|
-
>
|
|
5156
|
-
<svg
|
|
5157
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5158
|
-
width="16"
|
|
5159
|
-
height="16"
|
|
5160
|
-
viewBox="0 0 24 24"
|
|
5161
|
-
fill="none"
|
|
5162
|
-
stroke="currentColor"
|
|
5163
|
-
stroke-width="2"
|
|
5164
|
-
stroke-linecap="round"
|
|
5165
|
-
stroke-linejoin="round"
|
|
5166
|
-
class="lucide lucide-calendar "
|
|
5167
|
-
>
|
|
5168
|
-
<path d="M8 2v4"></path>
|
|
5169
|
-
<path d="M16 2v4"></path>
|
|
5170
|
-
<rect width="18" height="18" x="3" y="4" rx="2"></rect>
|
|
5171
|
-
<path d="M3 10h18"></path>
|
|
5172
|
-
</svg>
|
|
5173
|
-
<span style="margin-left:8px">
|
|
5174
|
-
${this.selectedDate?this.selectedDate.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}).replace(/(\d+)/,(e,n)=>{const r=parseInt(n,10);return r+(r>3?"th":["st","nd","rd"][r-1]||"th")}):"Pick a date"}
|
|
5175
|
-
</span>
|
|
5176
|
-
</rtg-button>
|
|
5177
|
-
</rtg-popover-trigger>
|
|
5178
|
-
|
|
5179
|
-
<!-- Popover content that will be shown or hidden -->
|
|
5180
|
-
<rtg-popover-content
|
|
5181
|
-
data-side="bottom"
|
|
5182
|
-
data-testid="popover-content"
|
|
5183
|
-
slot="content"
|
|
5184
|
-
.styleContent=${!1}
|
|
5185
|
-
>
|
|
5186
|
-
<rtg-calendar class="w-64" .styleCalendar=${!0}></rtg-calendar>
|
|
5187
|
-
</rtg-popover-content>
|
|
5188
|
-
</rtg-popover>
|
|
5189
|
-
</div>
|
|
5190
|
-
`}},i.DatePicker.styles=[l.css``,c],Kt([d.property({type:String})],i.DatePicker.prototype,"twCLass",2),Kt([d.property({type:Object})],i.DatePicker.prototype,"selectedDate",2),i.DatePicker=Kt([d.customElement("rtg-date-picker")],i.DatePicker);var Tl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,Zt=(o,e,n,r)=>{for(var t=r>1?void 0:r?ql(e,n):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(e,n,t):a(t))||t);return r&&t&&Tl(e,n,t),t};i.Progress=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.value=15}render(){return l.html`
|
|
4895
|
+
`,ue([d.property({type:Number})],i.Carousel.prototype,"currentIndex",2),ue([d.property({type:Array})],i.Carousel.prototype,"items",2),ue([d.property({type:String})],i.Carousel.prototype,"twCLass",2),ue([d.property({type:String})],i.Carousel.prototype,"orientation",2),ue([d.property({type:Boolean})],i.Carousel.prototype,"size",2),ue([d.query(".slides")],i.Carousel.prototype,"slides",2),i.Carousel=ue([d.customElement("rtg-carousel")],i.Carousel);var cl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Vt=(o,e,r,n)=>{for(var t=n>1?void 0:n?ul(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&cl(e,r,t),t};i.Progress=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.value=15}render(){return l.html`
|
|
5191
4896
|
<div
|
|
5192
4897
|
part="progress"
|
|
5193
4898
|
aria-valuenow="${this.value}"
|
|
@@ -5211,7 +4916,7 @@ body {
|
|
|
5211
4916
|
height: 100%;
|
|
5212
4917
|
transition: width 0.5s ease-in-out;
|
|
5213
4918
|
}
|
|
5214
|
-
`,c],
|
|
4919
|
+
`,c],Vt([d.property({type:String})],i.Progress.prototype,"twClass",2),Vt([d.property({type:Number})],i.Progress.prototype,"value",2),i.Progress=Vt([d.customElement("rtg-progress")],i.Progress);var pl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,Gr=(o,e,r,n)=>{for(var t=n>1?void 0:n?hl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&pl(e,r,t),t};const Hr="open",gl="closed";i.DrawerContent=class extends l.LitElement{constructor(){super(...arguments),this.state=gl}render(){return l.html`${this.state===Hr?l.html`
|
|
5215
4920
|
<div
|
|
5216
4921
|
part="drawer-content"
|
|
5217
4922
|
style="border-top-left-radius: 10px;
|
|
@@ -5226,7 +4931,7 @@ body {
|
|
|
5226
4931
|
display: flex;
|
|
5227
4932
|
height: auto;
|
|
5228
4933
|
flex-direction: column;"
|
|
5229
|
-
class="${u("border bg-background",this.state===
|
|
4934
|
+
class="${u("border bg-background",this.state===Hr?"drawer-open":"drawer-closed",this.className)}"
|
|
5230
4935
|
rtgdlg-content
|
|
5231
4936
|
>
|
|
5232
4937
|
|
|
@@ -5266,25 +4971,25 @@ body {
|
|
|
5266
4971
|
.drawer-closed {
|
|
5267
4972
|
animation: slideOutDown 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards;
|
|
5268
4973
|
}
|
|
5269
|
-
`,c],
|
|
4974
|
+
`,c],Gr([d.property({attribute:"data-state",type:String})],i.DrawerContent.prototype,"state",2),i.DrawerContent=Gr([d.customElement("rtg-drawer-content")],i.DrawerContent);var ml=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,fl=(o,e,r,n)=>{for(var t=n>1?void 0:n?vl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ml(e,r,t),t};const bl="closed";i.DrawerClose=class extends l.LitElement{get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof i.Drawer)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"),n=r==null?void 0:r.assignedElements();n&&n.length>0&&n[0].addEventListener("click",()=>{const a=this._drawer;a&&(a.dataset.state=bl)})}render(){return l.html`
|
|
5270
4975
|
<div part="drawer-close">
|
|
5271
4976
|
<slot></slot>
|
|
5272
4977
|
</div>
|
|
5273
|
-
`}},i.DrawerClose.styles=[l.css``,c],i.DrawerClose=
|
|
4978
|
+
`}},i.DrawerClose.styles=[l.css``,c],i.DrawerClose=fl([d.customElement("rtg-drawer-close")],i.DrawerClose);var wl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,xl=(o,e,r,n)=>{for(var t=n>1?void 0:n?yl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&wl(e,r,t),t};i.DrawerFooter=class extends l.LitElement{render(){return l.html`
|
|
5274
4979
|
<div
|
|
5275
4980
|
part="drawer-footer"
|
|
5276
4981
|
class="${u("mt-auto flex flex-col gap-2 p-4",this.className)}"
|
|
5277
4982
|
>
|
|
5278
4983
|
<slot></slot>
|
|
5279
4984
|
</div>
|
|
5280
|
-
`}},i.DrawerFooter.styles=[l.css``,c],i.DrawerFooter=
|
|
4985
|
+
`}},i.DrawerFooter.styles=[l.css``,c],i.DrawerFooter=xl([d.customElement("rtg-drawer-footer")],i.DrawerFooter);var Cl=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,Gt=(o,e,r,n)=>{for(var t=n>1?void 0:n?$l(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Cl(e,r,t),t};i.DrawerHeader=class extends l.LitElement{constructor(){super(...arguments),this._title="",this.description=""}render(){return l.html`
|
|
5281
4986
|
<div
|
|
5282
4987
|
part="drawer-header"
|
|
5283
4988
|
class="${u("grid gap-1.5 p-4 text-center sm:text-left",this.className)}"
|
|
5284
4989
|
>
|
|
5285
4990
|
<slot></slot>
|
|
5286
4991
|
</div>
|
|
5287
|
-
`}},i.DrawerHeader.styles=[l.css``,c],
|
|
4992
|
+
`}},i.DrawerHeader.styles=[l.css``,c],Gt([d.property({attribute:"title",type:String})],i.DrawerHeader.prototype,"_title",2),Gt([d.property({type:String})],i.DrawerHeader.prototype,"description",2),i.DrawerHeader=Gt([d.customElement("rtg-drawer-header")],i.DrawerHeader);var _l=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,Yr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ol(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&_l(e,r,t),t};i.DrawerTitle=class extends l.LitElement{constructor(){super(...arguments),this.title=""}render(){return l.html`
|
|
5288
4993
|
<h2
|
|
5289
4994
|
part="drawer-title"
|
|
5290
4995
|
style="margin-left:16px"
|
|
@@ -5292,16 +4997,16 @@ body {
|
|
|
5292
4997
|
>
|
|
5293
4998
|
<slot>${this.title}</slot>
|
|
5294
4999
|
</h2>
|
|
5295
|
-
`}},i.DrawerTitle.styles=[l.css``,c],
|
|
5000
|
+
`}},i.DrawerTitle.styles=[l.css``,c],Yr([d.property({type:String})],i.DrawerTitle.prototype,"title",2),i.DrawerTitle=Yr([d.customElement("rtg-drawer-title")],i.DrawerTitle);var El=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Sl=(o,e,r,n)=>{for(var t=n>1?void 0:n?Pl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&El(e,r,t),t};i.DrawerOverlay=class extends l.LitElement{render(){return l.html`
|
|
5296
5001
|
<div
|
|
5297
5002
|
part="drawer-overly"
|
|
5298
5003
|
class="${u("fixed inset-0 z-50 bg-black/80",this.className)}"
|
|
5299
5004
|
></div>
|
|
5300
|
-
`}},i.DrawerOverlay.styles=[l.css``,c],i.DrawerOverlay=
|
|
5005
|
+
`}},i.DrawerOverlay.styles=[l.css``,c],i.DrawerOverlay=Sl([d.customElement("rtg-drawer-overlay")],i.DrawerOverlay);var Dl=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Ml=(o,e,r,n)=>{for(var t=n>1?void 0:n?kl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Dl(e,r,t),t};const Ll="open";i.DrawerTrigger=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const e=this._drawer;e&&(e.dataset.state=Ll)}}get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof i.Drawer)return e;e=e.parentElement}return e}firstUpdated(e){var t,s;super.firstUpdated(e);const r=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"),n=r==null?void 0:r.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(s=this.shadowRoot)==null||s.addEventListener("click",a=>{a.stopPropagation()})}render(){return l.html`
|
|
5301
5006
|
<div part="drawer-trigger">
|
|
5302
5007
|
<slot></slot>
|
|
5303
5008
|
</div>
|
|
5304
|
-
`}},i.DrawerTrigger.styles=[l.css``,c],i.DrawerTrigger=
|
|
5009
|
+
`}},i.DrawerTrigger.styles=[l.css``,c],i.DrawerTrigger=Ml([d.customElement("rtg-drawer-trigger")],i.DrawerTrigger);var Il=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,Xr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Al(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Il(e,r,t),t};i.DrawerDescription=class extends l.LitElement{constructor(){super(...arguments),this.description=""}render(){return l.html`
|
|
5305
5010
|
<p
|
|
5306
5011
|
part="drawer-description"
|
|
5307
5012
|
style="margin-left:16px"
|
|
@@ -5309,18 +5014,18 @@ body {
|
|
|
5309
5014
|
>
|
|
5310
5015
|
<slot>${this.description}</slot>
|
|
5311
5016
|
</p>
|
|
5312
|
-
`}},i.DrawerDescription.styles=[l.css``,c],
|
|
5017
|
+
`}},i.DrawerDescription.styles=[l.css``,c],Xr([d.property({type:String})],i.DrawerDescription.prototype,"description",2),i.DrawerDescription=Xr([d.customElement("rtg-drawer-description")],i.DrawerDescription);var Rl=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Wr=(o,e,r,n)=>{for(var t=n>1?void 0:n?zl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Rl(e,r,t),t};const Ht="open",Kr="closed";i.Drawer=class extends l.LitElement{constructor(){super(...arguments),this.state=Kr,this.handleOutsideClick=e=>{const r=this._content;this.state===Ht&&r&&(r.contains(e.target)||(this.state=Kr,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _content(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=e==null?void 0:e.assignedElements();if(r){for(let t=0;t<r.length;t++)if(r[t]instanceof i.DrawerContent)return r[t]}return null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);const r=this._content;r&&(r.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===Ht?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}render(){return l.html`
|
|
5313
5018
|
<div rtgdlg-root part="drawer">
|
|
5314
|
-
${this.state===
|
|
5019
|
+
${this.state===Ht?l.html` <rtg-drawer-overlay></rtg-drawer-overlay>`:l.nothing}
|
|
5315
5020
|
<slot></slot>
|
|
5316
5021
|
</div>
|
|
5317
|
-
`}},i.Drawer.styles=[l.css``,c],
|
|
5022
|
+
`}},i.Drawer.styles=[l.css``,c],Wr([d.property({attribute:"data-state",type:String})],i.Drawer.prototype,"state",2),i.Drawer=Wr([d.customElement("rtg-drawer")],i.Drawer);const Bl="inline-flex items-center gap-1.5",Nl="transition-colors hover:text-foreground",Tl="font-normal text-foreground",ql="[&>svg]:size-3.5",Ul="flex h-9 w-9 items-center justify-center",Fl="flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5";var Vl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Hl=(o,e,r,n)=>{for(var t=n>1?void 0:n?Gl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Vl(e,r,t),t};let Yt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5318
5023
|
<span
|
|
5319
|
-
${
|
|
5024
|
+
${$(o)}
|
|
5320
5025
|
id="rtg-bread-crumb-ellipsis"
|
|
5321
5026
|
role="presentation"
|
|
5322
5027
|
aria-hidden="true"
|
|
5323
|
-
class="${u(
|
|
5028
|
+
class="${u(Ul,this.className)}"
|
|
5324
5029
|
part="breadcrumb-ellipsis"
|
|
5325
5030
|
>
|
|
5326
5031
|
<svg
|
|
@@ -5336,31 +5041,31 @@ body {
|
|
|
5336
5041
|
/>
|
|
5337
5042
|
</svg>
|
|
5338
5043
|
</span>
|
|
5339
|
-
`}};
|
|
5044
|
+
`}};Yt.styles=[l.css``,c],Yt=Hl([d.customElement("rtg-bread-crumb-ellipsis")],Yt);var Yl=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,Wl=(o,e,r,n)=>{for(var t=n>1?void 0:n?Xl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Yl(e,r,t),t};let Xt=class extends f{getAttributesToExclude(){return["variant"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5340
5045
|
<li
|
|
5341
|
-
${
|
|
5046
|
+
${$(o)}
|
|
5342
5047
|
id="rtg-bread-crumb-item"
|
|
5343
|
-
class="${u(
|
|
5048
|
+
class="${u(Bl,this.className)}"
|
|
5344
5049
|
part="breadcrumb-item"
|
|
5345
5050
|
>
|
|
5346
5051
|
<slot></slot>
|
|
5347
5052
|
</li>
|
|
5348
|
-
`}};
|
|
5053
|
+
`}};Xt.styles=[l.css``,c],Xt=Wl([d.customElement("rtg-bread-crumb-item")],Xt);var Kl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,Jl=(o,e,r,n)=>{for(var t=n>1?void 0:n?Zl(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Kl(e,r,t),t};let Wt=class extends f{getAttributesToExclude(){return["variant"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5349
5054
|
<ol
|
|
5350
|
-
${
|
|
5055
|
+
${$(o)}
|
|
5351
5056
|
id="rtg-bread-crumb-list"
|
|
5352
|
-
class="${u(
|
|
5057
|
+
class="${u(Fl,this.className)}"
|
|
5353
5058
|
part="breadcrumb-list"
|
|
5354
5059
|
>
|
|
5355
5060
|
<slot></slot>
|
|
5356
5061
|
</ol>
|
|
5357
|
-
`}};
|
|
5062
|
+
`}};Wt.styles=[l.css``,c],Wt=Jl([d.customElement("rtg-bread-crumb-list")],Wt);var jl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,ed=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ql(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&jl(e,r,t),t};let Kt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5358
5063
|
<li
|
|
5359
|
-
${
|
|
5064
|
+
${$(o)}
|
|
5360
5065
|
id="rtg-bread-crumb-separator"
|
|
5361
5066
|
role="presentation"
|
|
5362
5067
|
aria-hidden="true"
|
|
5363
|
-
class="${u(
|
|
5068
|
+
class="${u(ql,this.className)}"
|
|
5364
5069
|
part="breadcrumb-separator"
|
|
5365
5070
|
|
|
5366
5071
|
>
|
|
@@ -5379,37 +5084,37 @@ body {
|
|
|
5379
5084
|
<path d="M22 2 2 22"></path>
|
|
5380
5085
|
</svg>
|
|
5381
5086
|
</div>
|
|
5382
|
-
`}};
|
|
5087
|
+
`}};Kt.styles=[l.css``,c],Kt=ed([d.customElement("rtg-bread-crumb-separator")],Kt);var td=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,nd=(o,e,r,n)=>{for(var t=n>1?void 0:n?rd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&td(e,r,t),t};let Zt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5383
5088
|
<nav
|
|
5384
|
-
${
|
|
5089
|
+
${$(o)}
|
|
5385
5090
|
part="breadcrumb"
|
|
5386
5091
|
class="${u(this.className)}"
|
|
5387
5092
|
aria-label="breadcrumb"
|
|
5388
5093
|
>
|
|
5389
5094
|
<slot></slot>
|
|
5390
5095
|
</nav>
|
|
5391
|
-
`}};
|
|
5096
|
+
`}};Zt.styles=[l.css``,c],Zt=nd([d.customElement("rtg-bread-crumb")],Zt);var od=Object.defineProperty,id=Object.getOwnPropertyDescriptor,sd=(o,e,r,n)=>{for(var t=n>1?void 0:n?id(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&od(e,r,t),t};let Jt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5392
5097
|
<span
|
|
5393
|
-
${
|
|
5098
|
+
${$(o)}
|
|
5394
5099
|
id="rtg-bread-crumb-text"
|
|
5395
5100
|
aria-disabled="true"
|
|
5396
5101
|
aria-current="page"
|
|
5397
|
-
class="${u(
|
|
5102
|
+
class="${u(Tl,this.className)}"
|
|
5398
5103
|
part="breadcrumb-text"
|
|
5399
5104
|
>
|
|
5400
5105
|
<slot></slot>
|
|
5401
5106
|
</span>
|
|
5402
|
-
`}};
|
|
5107
|
+
`}};Jt.styles=[l.css``,c],Jt=sd([d.customElement("rtg-bread-crumb-text")],Jt);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,Zr=(o,e,r,n)=>{for(var t=n>1?void 0:n?ld(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ad(e,r,t),t};let tt=class extends f{constructor(){super(...arguments),this.href="/"}getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5403
5108
|
<a
|
|
5404
|
-
${
|
|
5109
|
+
${$(o)}
|
|
5405
5110
|
id="rtg-bread-crumb-link"
|
|
5406
|
-
class="${u(
|
|
5111
|
+
class="${u(Nl,this.className)}"
|
|
5407
5112
|
href="${this.href}"
|
|
5408
5113
|
part="breadcrumb-link"
|
|
5409
5114
|
>
|
|
5410
5115
|
<slot></slot>
|
|
5411
5116
|
</a>
|
|
5412
|
-
`}};
|
|
5117
|
+
`}};tt.styles=[l.css``,c],Zr([d.property({type:String})],tt.prototype,"href",2),tt=Zr([d.customElement("rtg-bread-crumb-link")],tt);var dd=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,rt=(o,e,r,n)=>{for(var t=n>1?void 0:n?cd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&dd(e,r,t),t};let pe=class extends f{constructor(){super(),this.maxLength=6,this.onChange=()=>{},this.pin=new Array(this.maxLength),this.inputes=[]}connectedCallback(){super.connectedCallback()}getAttributesToExclude(){return[]}raiseEvent(o,e="changes",r=1/0){const n=new CustomEvent("selected-input",{bubbles:!0,composed:!0,detail:{selectedItems:o,eventType:e,customIndex:r}});this.dispatchEvent(n)}render(){return l.html` <slot part="input-otp" class="flex items-center"></slot> `}};pe.styles=[l.css``,c],rt([d.property()],pe.prototype,"maxLength",2),rt([d.property()],pe.prototype,"onChange",2),rt([d.property()],pe.prototype,"pin",2),pe=rt([d.customElement("rtg-input-otp")],pe);var ud=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Jr=(o,e,r,n)=>{for(var t=n>1?void 0:n?pd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&ud(e,r,t),t};let nt=class extends f{constructor(){super(...arguments),this.click=()=>{},this.childrenArray=[]}getAttributesToExclude(){return[]}firstUpdated(o){super.firstUpdated(o),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> `}};nt.styles=[l.css``,c],Jr([d.property({type:Function})],nt.prototype,"click",2),nt=Jr([d.customElement("rtg-input-otp-group")],nt);var hd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,jr=(o,e,r,n)=>{for(var t=n>1?void 0:n?gd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&hd(e,r,t),t};let ot=class extends l.LitElement{constructor(){super(...arguments),this.index=0}render(){return l.html` <div role="separator">${Qn()}</div> `}};ot.styles=[l.css``,c],jr([d.property({type:Number})],ot.prototype,"index",2),ot=jr([d.customElement("rtg-input-otp-separator")],ot);var md=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,Ce=(o,e,r,n)=>{for(var t=n>1?void 0:n?vd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&md(e,r,t),t};let Z=class extends f{constructor(){super(...arguments),this.click=()=>{},this.index=0,this.isFirst=!1,this.isLast=!1,this.value=""}get _inputOtp(){let o=this.parentElement;for(;o&&!(o instanceof pe);)o=o.parentElement;return o}connectedCallback(){super.connectedCallback()}firstUpdated(o){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 n=this.shadowRoot.querySelector(`input[name="input-${r.detail.selectedItems}"]`);n&&(n.focus(),r.detail.eventType==="changes"&&(n.value=""))}))}disconnectedCallback(){super.disconnectedCallback(),this._inputOtp&&this._inputOtp.removeEventListener("selected-input",()=>{})}getAttributesToExclude(){return[]}handleFocus(o){const e=o.target,r=this._inputOtp;if(r&&!e.value){let n=r.inputes.reduce((t,s,a)=>s.value!==""?a:t,-1);console.log("inputOtpInstance lastIndex",n),console.log("inputOtpInstance.inputes",r.inputes[n]),n+1===r.maxLength?r.raiseEvent(n,"focus"):r.raiseEvent(++n,"focus")}}handleInputChange(o){const e=o.target;if(new RegExp(/^\d+$/).test(e.value)){const n=this._inputOtp;if(n){let t=n.inputes.findIndex(s=>s.index===this.index);n.inputes[t]={...n.inputes[t],value:e.value,isSelected:!1},n.inputes.length!==t+1&&n.raiseEvent(++t,"changes")}}else e.value=""}handleKeyDown(o){const e=o.target;if(o.key==="Backspace"){console.log("backspace");const r=this._inputOtp;if(r){let n=r.inputes.findIndex(t=>t.index===this.index);r.inputes[n]={...r.inputes[n],value:""},n+1===r.maxLength&&e.value?r.raiseEvent(n,"changes"):r.raiseEvent(--n,"changes")}}}render(){const o={"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`
|
|
5413
5118
|
<input
|
|
5414
5119
|
part="input-otp-slot"
|
|
5415
5120
|
autocomplete="one-time-code"
|
|
@@ -5423,9 +5128,9 @@ body {
|
|
|
5423
5128
|
@input=${this.handleInputChange}
|
|
5424
5129
|
@keydown=${this.handleKeyDown}
|
|
5425
5130
|
style="outline: none"
|
|
5426
|
-
class=${Object.entries(o).map(([e,
|
|
5131
|
+
class=${Object.entries(o).map(([e,r])=>r?e:void 0).join(" ")}
|
|
5427
5132
|
/>
|
|
5428
|
-
`}};
|
|
5133
|
+
`}};Z.styles=[l.css``,c],Ce([d.property({type:Function})],Z.prototype,"click",2),Ce([d.property({type:Number})],Z.prototype,"index",2),Ce([d.property({type:Boolean})],Z.prototype,"isFirst",2),Ce([d.property({type:Boolean})],Z.prototype,"isLast",2),Ce([d.property({type:String})],Z.prototype,"value",2),Z=Ce([d.customElement("rtg-input-otp-slot")],Z);const fd="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 bd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,he=(o,e,r,n)=>{for(var t=n>1?void 0:n?wd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&bd(e,r,t),t};i.RtgInput=class extends f{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"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l.html`
|
|
5429
5134
|
<input
|
|
5430
5135
|
part="input"
|
|
5431
5136
|
type="${this.type}"
|
|
@@ -5433,12 +5138,12 @@ body {
|
|
|
5433
5138
|
?disabled=${this.disabled}
|
|
5434
5139
|
.value=${this.type!=="file"?this.value:""}
|
|
5435
5140
|
@change="${this.handleInputChange}"
|
|
5436
|
-
${
|
|
5437
|
-
class="${u(
|
|
5141
|
+
${$(e)}
|
|
5142
|
+
class="${u(fd,this.twClass)}"
|
|
5438
5143
|
/>
|
|
5439
|
-
`}},he([d.property({type:Boolean})],i.RtgInput.prototype,"disabled",2),he([d.property({type:String})],i.RtgInput.prototype,"type",2),he([d.property({type:String})],i.RtgInput.prototype,"placeholder",2),he([d.property({type:String})],i.RtgInput.prototype,"defaultValue",2),he([d.property({type:String})],i.RtgInput.prototype,"value",2),he([d.property({type:String})],i.RtgInput.prototype,"twClass",2),i.RtgInput=he([d.customElement("rtg-input")],i.RtgInput);const
|
|
5144
|
+
`}},he([d.property({type:Boolean})],i.RtgInput.prototype,"disabled",2),he([d.property({type:String})],i.RtgInput.prototype,"type",2),he([d.property({type:String})],i.RtgInput.prototype,"placeholder",2),he([d.property({type:String})],i.RtgInput.prototype,"defaultValue",2),he([d.property({type:String})],i.RtgInput.prototype,"value",2),he([d.property({type:String})],i.RtgInput.prototype,"twClass",2),i.RtgInput=he([d.customElement("rtg-input")],i.RtgInput);const yd=M("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");var xd=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Qr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Cd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&xd(e,r,t),t};i.Label=class extends f{constructor(){super(...arguments),this.for=""}firstUpdated(e){const r=["--label-text-color","--label-padding"];this.applyCustomClass(r,"label","label-base")}getAttributesToExclude(){return["for","data-testid","class"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l.html`
|
|
5440
5145
|
<label
|
|
5441
|
-
${
|
|
5146
|
+
${$(e)}
|
|
5442
5147
|
part="label"
|
|
5443
5148
|
for="${this.for}"
|
|
5444
5149
|
class="${u(i.Label.labelVariants({className:this.className}),"label-base")}"
|
|
@@ -5446,7 +5151,7 @@ body {
|
|
|
5446
5151
|
<slot></slot>
|
|
5447
5152
|
<!-- Render children without comments -->
|
|
5448
5153
|
</label>
|
|
5449
|
-
`}},i.Label.labelVariants=
|
|
5154
|
+
`}},i.Label.labelVariants=yd,i.Label.styles=[l.css`
|
|
5450
5155
|
:root {
|
|
5451
5156
|
--label-text-color: inherit;
|
|
5452
5157
|
--label-padding: inherit;
|
|
@@ -5455,7 +5160,7 @@ body {
|
|
|
5455
5160
|
color: var(--label-text-color) !important;
|
|
5456
5161
|
padding: var(--label-padding) !important;
|
|
5457
5162
|
}
|
|
5458
|
-
`],
|
|
5163
|
+
`],Qr([d.property({type:String})],i.Label.prototype,"for",2),i.Label=Qr([d.customElement("rtg-label")],i.Label);const $d="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",_d="flex items-center justify-center text-current pointer-events-none";var Od=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,ge=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ed(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Od(e,r,t),t};i.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}createRenderRoot(){return this}render(){return l.html`
|
|
5459
5164
|
<button
|
|
5460
5165
|
part="checkbox"
|
|
5461
5166
|
data-testid="checkbox-atom"
|
|
@@ -5467,9 +5172,9 @@ body {
|
|
|
5467
5172
|
?required=${this.required}
|
|
5468
5173
|
?disabled=${this.disabled}
|
|
5469
5174
|
@click="${this._onClick}"
|
|
5470
|
-
class="${u(
|
|
5175
|
+
class="${u($d,this.className)} ${this.twCLass}"
|
|
5471
5176
|
>
|
|
5472
|
-
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${
|
|
5177
|
+
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${_d}"
|
|
5473
5178
|
><svg
|
|
5474
5179
|
xmlns="http://www.w3.org/2000/svg"
|
|
5475
5180
|
width="24"
|
|
@@ -5485,7 +5190,264 @@ body {
|
|
|
5485
5190
|
<polyline points="20 6 9 17 4 12"></polyline></svg
|
|
5486
5191
|
></span>`:l.nothing}
|
|
5487
5192
|
</button>
|
|
5488
|
-
`}},
|
|
5193
|
+
`}},ge([d.property({type:Boolean})],i.Checkbox.prototype,"disabled",2),ge([d.property({type:Boolean})],i.Checkbox.prototype,"checked",2),ge([d.property({type:String})],i.Checkbox.prototype,"type",2),ge([d.property({type:String})],i.Checkbox.prototype,"value",2),ge([d.property({type:Boolean})],i.Checkbox.prototype,"required",2),ge([d.property({type:String})],i.Checkbox.prototype,"twCLass",2),i.Checkbox=ge([d.customElement("rtg-checkbox")],i.Checkbox);const Pd="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",Sd="aspect-square w-10 h-10 rounded-full",Dd="flex h-full w-full items-center justify-center rounded-full bg-muted";var kd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,Ld=(o,e,r,n)=>{for(var t=n>1?void 0:n?Md(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&kd(e,r,t),t};i.AvatarFallback=class extends l.LitElement{createRenderRoot(){return this}render(){return l.html`
|
|
5194
|
+
<span
|
|
5195
|
+
class="${u(Dd,this.className)}"
|
|
5196
|
+
style="width:40px;height:40px"
|
|
5197
|
+
part="avatar-fallback"
|
|
5198
|
+
>
|
|
5199
|
+
<slot></slot>
|
|
5200
|
+
</span>
|
|
5201
|
+
`}},i.AvatarFallback=Ld([d.customElement("rtg-avatar-fallback")],i.AvatarFallback);var Id=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,jt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ad(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Id(e,r,t),t};i.AvatarImage=class extends l.LitElement{constructor(){super(...arguments),this.alt="@shadcn",this.src="https://github.com/shadcn.png"}createRenderRoot(){return this}render(){return l.html`
|
|
5202
|
+
<img
|
|
5203
|
+
class="${u(Sd,this.className)}"
|
|
5204
|
+
alt="${this.alt}"
|
|
5205
|
+
src="${this.src}"
|
|
5206
|
+
part="avatar-image"
|
|
5207
|
+
>
|
|
5208
|
+
<slot></slot>
|
|
5209
|
+
</img>
|
|
5210
|
+
`}},jt([d.property({type:String})],i.AvatarImage.prototype,"alt",2),jt([d.property({type:String})],i.AvatarImage.prototype,"src",2),i.AvatarImage=jt([d.customElement("rtg-avatar-image")],i.AvatarImage);var Rd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,en=(o,e,r,n)=>{for(var t=n>1?void 0:n?zd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Rd(e,r,t),t};i.Avatar=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}createRenderRoot(){return this}render(){return l.html`
|
|
5211
|
+
<span
|
|
5212
|
+
class="${u(Pd,this.className,this.twCLass)}"
|
|
5213
|
+
part="avatar"
|
|
5214
|
+
>
|
|
5215
|
+
<slot></slot>
|
|
5216
|
+
</span>
|
|
5217
|
+
`}},en([d.property({type:String})],i.Avatar.prototype,"twCLass",2),i.Avatar=en([d.customElement("rtg-avatar")],i.Avatar);var Bd=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,Qt=(o,e,r,n)=>{for(var t=n>1?void 0:n?Nd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Bd(e,r,t),t};i.AspectRatio=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.ratio=16/9,this._children=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._children=Array.from(this.childNodes)}render(){const e=1/this.ratio*100;return l.html`
|
|
5218
|
+
<div
|
|
5219
|
+
class="${u("relative w-full overflow-hidden bg-muted",this.className,this.twCLass)}"
|
|
5220
|
+
style="padding-top: ${e}%;"
|
|
5221
|
+
part="aspect-ratio"
|
|
5222
|
+
>
|
|
5223
|
+
<div class="absolute top-0 left-0 w-full h-full">${this._children}</div>
|
|
5224
|
+
</div>
|
|
5225
|
+
`}},Qt([d.property({type:String})],i.AspectRatio.prototype,"twCLass",2),Qt([d.property({type:Number})],i.AspectRatio.prototype,"ratio",2),i.AspectRatio=Qt([d.customElement("rtg-aspect-ratio")],i.AspectRatio);const Td=M("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 qd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,it=(o,e,r,n)=>{for(var t=n>1?void 0:n?Ud(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&qd(e,r,t),t};i.Badge=class extends f{constructor(){super(...arguments),this.twCLass="",this.variant="default",this.id="rtg-badge-id",this._children=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._children=Array.from(this.childNodes)}render(){const e=this.getFilteredAttributes();return l.html`
|
|
5226
|
+
<div
|
|
5227
|
+
${$(e)}
|
|
5228
|
+
id="${this.id}"
|
|
5229
|
+
part="badge"
|
|
5230
|
+
data-testid="badge-content"
|
|
5231
|
+
class="
|
|
5232
|
+
${u(i.Badge.badgeVariants({variant:this.variant,className:this.className}))},
|
|
5233
|
+
${this.twCLass}
|
|
5234
|
+
"
|
|
5235
|
+
>
|
|
5236
|
+
${this._children}
|
|
5237
|
+
</div>
|
|
5238
|
+
`}},i.Badge.badgeVariants=Td,it([d.property({type:String})],i.Badge.prototype,"twCLass",2),it([d.property({type:String})],i.Badge.prototype,"variant",2),it([d.property({type:String})],i.Badge.prototype,"id",2),i.Badge=it([d.customElement("rtg-badge")],i.Badge);const tn=M("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 Fd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,$e=(o,e,r,n)=>{for(var t=n>1?void 0:n?Vd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Fd(e,r,t),t};i.Alert=class extends l.LitElement{constructor(){super(...arguments),this.title="",this.message="",this.twCLass="",this.variant="info",this.size="default"}createRenderRoot(){return this}get alertClasses(){return tn({variant:this.variant,size:this.size})}render(){return l.html`
|
|
5239
|
+
<div
|
|
5240
|
+
class="border border-transparent rounded-md ${this.alertClasses} ${this.twCLass}"
|
|
5241
|
+
role="alert"
|
|
5242
|
+
>
|
|
5243
|
+
${this.title?l.html`<div class="font-bold mb-2" part="alert-title">
|
|
5244
|
+
${this.title}
|
|
5245
|
+
</div>`:""}
|
|
5246
|
+
${this.message?l.html`<div part="alert-description">${this.message}</div>`:""}
|
|
5247
|
+
</div>
|
|
5248
|
+
`}},i.Alert.alertVariants=tn,$e([d.property({type:String})],i.Alert.prototype,"title",2),$e([d.property({type:String})],i.Alert.prototype,"message",2),$e([d.property({type:String})],i.Alert.prototype,"twCLass",2),$e([d.property({type:String})],i.Alert.prototype,"variant",2),$e([d.property({type:String})],i.Alert.prototype,"size",2),i.Alert=$e([d.customElement("rtg-alert")],i.Alert);const Gd=M("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:{outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-7 w-7 p-0"}},defaultVariants:{variant:"outline",size:"default"}});var Hd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,U=(o,e,r,n)=>{for(var t=n>1?void 0:n?Yd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Hd(e,r,t),t};i.Calendar=class extends l.LitElement{constructor(){super(...arguments),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.variant="outline",this.size="default",this.styleCalendar=!1,this.twCLass="",this.mode="single"}getDaysInMonth(e,r){return new Date(e,r+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,r){if(!r){const n=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);n.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=n,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=n,this.selectedEndDate=null):n>=this.selectedStartDate?this.selectedEndDate=n:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=n)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}render(){const e=this.currentDate.getFullYear(),r=this.currentDate.getMonth(),n=this.getDaysInMonth(e,r),t=new Date(e,r,1).getDay(),s=new Date(e,r,0).getDate();let a=Array.from({length:t},(p,m)=>({day:(s-(t-1)+m).toString(),isInactive:!0,isCurrentMonth:!1}));return a=a.concat(Array.from({length:n},(p,m)=>({day:(m+1).toString(),isInactive:!1,isCurrentMonth:!0}))),l.html`
|
|
5249
|
+
<div
|
|
5250
|
+
part="calendar"
|
|
5251
|
+
style="
|
|
5252
|
+
width: fit-content;
|
|
5253
|
+
${this.styleCalendar?"margin-left: -16px; margin-top: -16px;":""}"
|
|
5254
|
+
class="${u("p-3 rounded-md border shadow bg-popover",this.className,this.twCLass)}"
|
|
5255
|
+
>
|
|
5256
|
+
<div
|
|
5257
|
+
class="flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0"
|
|
5258
|
+
>
|
|
5259
|
+
<div class="space-y-4">
|
|
5260
|
+
<div class="flex justify-center pt-1 relative items-center">
|
|
5261
|
+
<div class="space-x-1 flex items-center">
|
|
5262
|
+
<button
|
|
5263
|
+
style="width:1.75rem"
|
|
5264
|
+
class="nav-button text-muted-foreground absolute left-2 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 border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground h-7 w-7 p-0"
|
|
5265
|
+
@click="${this.previousMonth}"
|
|
5266
|
+
>
|
|
5267
|
+
<svg
|
|
5268
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5269
|
+
width="24"
|
|
5270
|
+
height="24"
|
|
5271
|
+
viewBox="0 0 24 24"
|
|
5272
|
+
fill="none"
|
|
5273
|
+
stroke="currentColor"
|
|
5274
|
+
stroke-width="2"
|
|
5275
|
+
stroke-linecap="round"
|
|
5276
|
+
stroke-linejoin="round"
|
|
5277
|
+
style="width:1rem;height:1rem;"
|
|
5278
|
+
class="lucide lucide-chevron-left rdp-nav_icon hover:text-muted-foreground"
|
|
5279
|
+
>
|
|
5280
|
+
<path d="m15 18-6-6 6-6"></path>
|
|
5281
|
+
</svg>
|
|
5282
|
+
</button>
|
|
5283
|
+
<div
|
|
5284
|
+
style="font-weight:600"
|
|
5285
|
+
class="text-sm text-accent-foreground"
|
|
5286
|
+
>
|
|
5287
|
+
${this.currentDate.toLocaleString("default",{month:"long",year:"numeric"})}
|
|
5288
|
+
</div>
|
|
5289
|
+
<button
|
|
5290
|
+
style="width:1.75rem"
|
|
5291
|
+
class="nav-button absolute right-1 text-muted-foreground 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 border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground h-7 w-7 p-0"
|
|
5292
|
+
@click="${this.nextMonth}"
|
|
5293
|
+
>
|
|
5294
|
+
<svg
|
|
5295
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5296
|
+
width="48"
|
|
5297
|
+
height="48"
|
|
5298
|
+
viewBox="0 0 24 24"
|
|
5299
|
+
fill="none"
|
|
5300
|
+
stroke="currentColor"
|
|
5301
|
+
stroke-width="2"
|
|
5302
|
+
stroke-linecap="round"
|
|
5303
|
+
stroke-linejoin="round"
|
|
5304
|
+
style="width:1rem;height:1rem;"
|
|
5305
|
+
class="lucide lucide-chevron-right rdp-nav_icon hover:text-muted-foreground"
|
|
5306
|
+
>
|
|
5307
|
+
<path d="m9 18 6-6-6-6"></path>
|
|
5308
|
+
</svg>
|
|
5309
|
+
</button>
|
|
5310
|
+
</div>
|
|
5311
|
+
</div>
|
|
5312
|
+
<table class="w-full border-collapse space-y-1" role="grid">
|
|
5313
|
+
<thead class="rdp-head">
|
|
5314
|
+
<tr class="flex">
|
|
5315
|
+
${["Su","Mo","Tu","We","Th","Fr","Sa"].map(p=>l.html`
|
|
5316
|
+
<th
|
|
5317
|
+
style="font-size:0.8rem"
|
|
5318
|
+
scope="col"
|
|
5319
|
+
class="text-muted-foreground rounded-md w-8 font-medium"
|
|
5320
|
+
aria-label="${p}"
|
|
5321
|
+
>
|
|
5322
|
+
${p}
|
|
5323
|
+
</th>
|
|
5324
|
+
`)}
|
|
5325
|
+
</tr>
|
|
5326
|
+
</thead>
|
|
5327
|
+
<tbody class="rdp-tbody">
|
|
5328
|
+
${Array.from({length:Math.ceil(a.length/7)},(p,m)=>l.html`
|
|
5329
|
+
<tr class="flex w-full mt-2">
|
|
5330
|
+
${a.slice(m*7,(m+1)*7).map(h=>{const v=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),Number(h.day)),x=this.selectedStartDate&&v.toDateString()===this.selectedStartDate.toDateString(),C=this.selectedEndDate&&v.toDateString()===this.selectedEndDate.toDateString(),E=this.isDayInRange(v);return l.html`
|
|
5331
|
+
<td
|
|
5332
|
+
class="${u("relative p-0 text-center text-sm focus-within:relative focus-within:z-20",x&&h.isCurrentMonth&&"day-range-start",C&&h.isCurrentMonth&&"day-range-end",E&&h.isCurrentMonth&&"day-in-range bg-muted")}"
|
|
5333
|
+
role="presentation"
|
|
5334
|
+
>
|
|
5335
|
+
<button
|
|
5336
|
+
name="day"
|
|
5337
|
+
class="${u("flex justify-center items-center rounded cursor-pointer transition-colors duration-300 ease-in-out h-8 w-8 font-normal text-sm text-accent-foreground hover:bg-accent hover:text-accent-foreground",h.isInactive&&"hover:bg-accent text-muted-foreground",(x||C)&&h.isCurrentMonth&&"bg-primary text-primary-foreground opacity-100 hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground")}"
|
|
5338
|
+
role="gridcell"
|
|
5339
|
+
tabindex="-1"
|
|
5340
|
+
type="button"
|
|
5341
|
+
aria-selected="${hn.ifDefined((x||C)&&h.isCurrentMonth?"true":void 0)}"
|
|
5342
|
+
@click="${()=>this.selectDate(Number(h.day),h.isInactive)}"
|
|
5343
|
+
>
|
|
5344
|
+
${h.day}
|
|
5345
|
+
</button>
|
|
5346
|
+
</td>
|
|
5347
|
+
`})}
|
|
5348
|
+
</tr>
|
|
5349
|
+
`)}
|
|
5350
|
+
</tbody>
|
|
5351
|
+
</table>
|
|
5352
|
+
</div>
|
|
5353
|
+
</div>
|
|
5354
|
+
</div>
|
|
5355
|
+
`}},i.Calendar.styles=[l.css`
|
|
5356
|
+
:host {
|
|
5357
|
+
display: inline-block;
|
|
5358
|
+
|
|
5359
|
+
border: 1px solid #e0e0e0;
|
|
5360
|
+
border-radius: 8px;
|
|
5361
|
+
padding: 8px;
|
|
5362
|
+
}
|
|
5363
|
+
.styled-calendar {
|
|
5364
|
+
margin-left: -16px;
|
|
5365
|
+
margin-top: -16px;
|
|
5366
|
+
}
|
|
5367
|
+
.nav-button {
|
|
5368
|
+
background: transparent;
|
|
5369
|
+
border: 1px solid #ccc;
|
|
5370
|
+
cursor: pointer;
|
|
5371
|
+
font-size: 16px;
|
|
5372
|
+
border-radius: 6px;
|
|
5373
|
+
padding: 4px 8px;
|
|
5374
|
+
transition: background-color 0.3s ease;
|
|
5375
|
+
}
|
|
5376
|
+
.nav-button svg {
|
|
5377
|
+
pointer-events: none;
|
|
5378
|
+
width: 1rem;
|
|
5379
|
+
height: 1rem;
|
|
5380
|
+
flex-shrink: 0;
|
|
5381
|
+
padding-top: 4px;
|
|
5382
|
+
}
|
|
5383
|
+
table {
|
|
5384
|
+
width: 100%;
|
|
5385
|
+
border-collapse: collapse;
|
|
5386
|
+
}
|
|
5387
|
+
td {
|
|
5388
|
+
text-align: center;
|
|
5389
|
+
padding: 0;
|
|
5390
|
+
}
|
|
5391
|
+
td.day-range-start {
|
|
5392
|
+
border-top-left-radius: 8px;
|
|
5393
|
+
border-bottom-left-radius: 8px;
|
|
5394
|
+
}
|
|
5395
|
+
td.day-range-end {
|
|
5396
|
+
border-top-right-radius: 8px;
|
|
5397
|
+
border-bottom-right-radius: 8px;
|
|
5398
|
+
}
|
|
5399
|
+
.text-day {
|
|
5400
|
+
font-size: 0.8rem;
|
|
5401
|
+
}
|
|
5402
|
+
`],i.Calendar.buttonVariants=Gd,U([d.property({type:Object})],i.Calendar.prototype,"currentDate",2),U([d.property({type:Object})],i.Calendar.prototype,"selectedStartDate",2),U([d.property({type:Object})],i.Calendar.prototype,"selectedEndDate",2),U([d.property({type:String})],i.Calendar.prototype,"variant",2),U([d.property({type:String})],i.Calendar.prototype,"size",2),U([d.property({type:Boolean})],i.Calendar.prototype,"styleCalendar",2),U([d.property({type:String})],i.Calendar.prototype,"twCLass",2),U([d.property({type:String})],i.Calendar.prototype,"mode",2),i.Calendar=U([d.customElement("rtg-calendar")],i.Calendar);var Xd=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,er=(o,e,r,n)=>{for(var t=n>1?void 0:n?Wd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Xd(e,r,t),t};i.DatePicker=class extends l.LitElement{constructor(){super(...arguments),this.twCLass="",this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return l.html`
|
|
5403
|
+
<div
|
|
5404
|
+
part="date-picker"
|
|
5405
|
+
class="${u("",this.className,this.twCLass)}"
|
|
5406
|
+
@date-selected=${this.handleDateSelected}
|
|
5407
|
+
>
|
|
5408
|
+
<rtg-popover>
|
|
5409
|
+
<!-- Trigger to open/close the popover -->
|
|
5410
|
+
<rtg-popover-trigger slot="trigger">
|
|
5411
|
+
<rtg-button
|
|
5412
|
+
class="w-64 justify-start text-left text-sm font-normal bg-background hover:bg-accent text-muted-foreground hover:text-muted-foreground"
|
|
5413
|
+
variant="outline"
|
|
5414
|
+
slot="trigger-button"
|
|
5415
|
+
>
|
|
5416
|
+
<svg
|
|
5417
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5418
|
+
width="16"
|
|
5419
|
+
height="16"
|
|
5420
|
+
viewBox="0 0 24 24"
|
|
5421
|
+
fill="none"
|
|
5422
|
+
stroke="currentColor"
|
|
5423
|
+
stroke-width="2"
|
|
5424
|
+
stroke-linecap="round"
|
|
5425
|
+
stroke-linejoin="round"
|
|
5426
|
+
class="lucide lucide-calendar "
|
|
5427
|
+
>
|
|
5428
|
+
<path d="M8 2v4"></path>
|
|
5429
|
+
<path d="M16 2v4"></path>
|
|
5430
|
+
<rect width="18" height="18" x="3" y="4" rx="2"></rect>
|
|
5431
|
+
<path d="M3 10h18"></path>
|
|
5432
|
+
</svg>
|
|
5433
|
+
<span style="margin-left:8px">
|
|
5434
|
+
${this.selectedDate?this.selectedDate.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}).replace(/(\d+)/,(e,r)=>{const n=parseInt(r,10);return n+(n>3?"th":["st","nd","rd"][n-1]||"th")}):"Pick a date"}
|
|
5435
|
+
</span>
|
|
5436
|
+
</rtg-button>
|
|
5437
|
+
</rtg-popover-trigger>
|
|
5438
|
+
|
|
5439
|
+
<!-- Popover content that will be shown or hidden -->
|
|
5440
|
+
<rtg-popover-content
|
|
5441
|
+
data-side="bottom"
|
|
5442
|
+
data-testid="popover-content"
|
|
5443
|
+
slot="content"
|
|
5444
|
+
.styleContent=${!1}
|
|
5445
|
+
>
|
|
5446
|
+
<rtg-calendar class="w-64" .styleCalendar=${!0}></rtg-calendar>
|
|
5447
|
+
</rtg-popover-content>
|
|
5448
|
+
</rtg-popover>
|
|
5449
|
+
</div>
|
|
5450
|
+
`}},er([d.property({type:String})],i.DatePicker.prototype,"twCLass",2),er([d.property({type:Object})],i.DatePicker.prototype,"selectedDate",2),i.DatePicker=er([d.customElement("rtg-date-picker")],i.DatePicker);var Kd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,_e=(o,e,r,n)=>{for(var t=n>1?void 0:n?Zd(e,r):e,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Kd(e,r,t),t};i.LightSampleDemo=class extends f{constructor(){super(),this.inputValue="",this.src="https://github.com/shadcn.png",this.mode="single",this.selectedStartDate=null,this.selectedEndDate=null}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){return l.html`
|
|
5489
5451
|
<shadow-wrapper>
|
|
5490
5452
|
<rtg-input
|
|
5491
5453
|
data-testid="input-id"
|
|
@@ -5501,4 +5463,20 @@ body {
|
|
|
5501
5463
|
<shadow-wrapper>
|
|
5502
5464
|
<rtg-checkbox type="button" role="checkbox"> </rtg-checkbox>
|
|
5503
5465
|
</shadow-wrapper>
|
|
5504
|
-
|
|
5466
|
+
<shadow-wrapper>
|
|
5467
|
+
<rtg-avatar>
|
|
5468
|
+
${this.src?l.html`<rtg-avatar-image src=${this.src}></rtg-avatar-image>`:l.html`<rtg-avatar-fallback>cn</rtg-avatar-fallback>`}
|
|
5469
|
+
</rtg-avatar>
|
|
5470
|
+
</shadow-wrapper>
|
|
5471
|
+
<shadow-wrapper>
|
|
5472
|
+
<rtg-calendar
|
|
5473
|
+
.mode="${this.mode}"
|
|
5474
|
+
.selectedStartDate="${this.selectedStartDate}"
|
|
5475
|
+
.selectedEndDate="${this.selectedEndDate}"
|
|
5476
|
+
>
|
|
5477
|
+
</rtg-calendar>
|
|
5478
|
+
</shadow-wrapper>
|
|
5479
|
+
<shadow-wrapper>
|
|
5480
|
+
<rtg-date-picker> </rtg-date-picker>
|
|
5481
|
+
</shadow-wrapper>
|
|
5482
|
+
`}},_e([d.state()],i.LightSampleDemo.prototype,"inputValue",2),_e([d.property({type:String})],i.LightSampleDemo.prototype,"src",2),_e([d.property({type:String})],i.LightSampleDemo.prototype,"mode",2),_e([d.property({type:Object})],i.LightSampleDemo.prototype,"selectedStartDate",2),_e([d.property({type:Object})],i.LightSampleDemo.prototype,"selectedEndDate",2),i.LightSampleDemo=_e([d.customElement("light-sample-demo")],i.LightSampleDemo),Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|