@revotech-group/revotech-ui-kit 0.0.55 → 0.0.57
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 +2137 -1774
- package/dist/revotech-ui-kit.umd.cjs +342 -277
- package/dist/src/assets/icons/chart.icon.d.ts +1 -0
- package/dist/src/assets/icons/decrease.icon.d.ts +1 -0
- package/dist/src/assets/icons/index.d.ts +3 -0
- package/dist/src/assets/icons/plus.icon.d.ts +1 -0
- package/dist/src/components/atoms/drawer/drawer-close.d.ts +12 -0
- package/dist/src/components/atoms/drawer/drawer-content.d.ts +6 -0
- package/dist/src/components/atoms/drawer/drawer-description.d.ts +6 -0
- package/dist/src/components/atoms/drawer/drawer-footer.d.ts +5 -0
- package/dist/src/components/atoms/drawer/drawer-header.d.ts +7 -0
- package/dist/src/components/atoms/drawer/drawer-overlay.d.ts +5 -0
- package/dist/src/components/atoms/drawer/drawer-title.d.ts +6 -0
- package/dist/src/components/atoms/drawer/drawer-trigger.d.ts +8 -0
- package/dist/src/components/atoms/drawer/drawer.atom.d.ts +35 -0
- package/dist/src/components/atoms/drawer/drawer.stories.d.ts +4 -0
- package/dist/src/components/atoms/index.d.ts +1 -2
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/ui/index.d.ts +2 -0
- package/dist/src/components/{atoms/input/input.atom.d.ts → ui/input/input.d.ts} +3 -3
- package/dist/src/components/{atoms → ui}/input/input.stories.d.ts +2 -1
- package/dist/src/components/{atoms/label/label.atom.d.ts → ui/label/label.d.ts} +1 -1
- package/dist/src/components/widgets/index.d.ts +1 -0
- package/dist/src/components/widgets/light-sample-demo/light-sample.demo.d.ts +13 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/shadow-wrapper.d.ts +8 -0
- package/dist/src/index.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/src/components/{atoms → ui}/input/input.styles.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/input/input.type.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/label/label.stories.d.ts +0 -0
- /package/dist/src/components/{atoms → ui}/label/label.style.d.ts +0 -0
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
(function(s,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):(s=typeof globalThis<"u"?globalThis:s||self,l(s["revotech-ui-kit"]={},s.lit,s.decorators_js,s.litElement,s.html_js,s.directive_js,s.asyncDirective_js))})(this,function(s,l,d,I,on,gt,sn){"use strict";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 an(){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 mt="-",ln=o=>{const e=cn(o),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=o;return{getClassGroupId:a=>{const p=a.split(mt);return p[0]===""&&p.length!==1&&p.shift(),dr(p,e)||dn(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 i=o.join(mt);return(a=e.validators.find(({validator:p})=>p(i)))==null?void 0:a.classGroupId},cr=/^\[(.+)\]$/,dn=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}},cn=o=>{const{theme:e,prefix:r}=o,n={nextPart:new Map,validators:[]};return pn(Object.entries(o.classGroups),r).forEach(([i,a])=>{vt(a,n,i,e)}),n},vt=(o,e,r,n)=>{o.forEach(t=>{if(typeof t=="string"){const i=t===""?e:ur(e,t);i.classGroupId=r;return}if(typeof t=="function"){if(un(t)){vt(t(n),e,r,n);return}e.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(([i,a])=>{vt(a,ur(e,i),r,n)})})},ur=(o,e)=>{let r=o;return e.split(mt).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},un=o=>o.isThemeGetter,pn=(o,e)=>e?o.map(([r,n])=>{const t=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,p])=>[e+a,p])):i);return[r,t]}):o,hn=o=>{if(o<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const t=(i,a)=>{r.set(i,a),e++,e>o&&(e=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return t(i,a),a},set(i,a){r.has(i)?r.set(i,a):t(i,a)}}},pr="!",gn=o=>{const{separator:e,experimentalParseClassName:r}=o,n=e.length===1,t=e[0],i=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&&(n||p.slice(w,w+i)===e)){m.push(p.slice(v,w)),v=w+i;continue}if(O==="/"){C=w;continue}}O==="["?h++:O==="]"&&h--}const $=m.length===0?p:p.substring(v),E=$.startsWith(pr),k=E?$.substring(1):$,_=C&&C>v?C-v:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:k,maybePostfixModifierPosition:_}};return r?p=>r({className:p,parseClassName:a}):a},mn=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},vn=o=>({cache:hn(o.cacheSize),parseClassName:gn(o),...ln(o)}),fn=/\s+/,bn=(o,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:t}=e,i=[],a=o.trim().split(fn);let p="";for(let m=a.length-1;m>=0;m-=1){const h=a[m],{modifiers:v,hasImportantModifier:C,baseClassName:$,maybePostfixModifierPosition:E}=r(h);let k=!!E,_=n(k?$.substring(0,E):$);if(!_){if(!k){p=h+(p.length>0?" "+p:p);continue}if(_=n($),!_){p=h+(p.length>0?" "+p:p);continue}k=!1}const w=mn(v).join(":"),O=C?w+pr:w,D=O+_;if(i.includes(D))continue;i.push(D);const Te=t(_,k);for(let me=0;me<Te.length;++me){const ut=Te[me];i.push(O+ut)}p=h+(p.length>0?" "+p:p)}return p};function wn(){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 yn(o,...e){let r,n,t,i=a;function a(m){const h=e.reduce((v,C)=>C(v),o());return r=vn(h),n=r.cache.get,t=r.cache.set,i=p,p(m)}function p(m){const h=n(m);if(h)return h;const v=bn(m,r);return t(m,v),v}return function(){return i(wn.apply(null,arguments))}}const f=o=>{const e=r=>r[o]||[];return e.isThemeGetter=!0,e},gr=/^\[(?:([a-z-]+):)?(.+)\]$/i,xn=/^\d+\/\d+$/,Cn=new Set(["px","full","screen"]),$n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_n=/\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$/,On=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,En=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=o=>ve(o)||Cn.has(o)||xn.test(o),V=o=>fe(o,"length",zn),ve=o=>!!o&&!Number.isNaN(Number(o)),ft=o=>fe(o,"number",ve),Oe=o=>!!o&&Number.isInteger(Number(o)),Sn=o=>o.endsWith("%")&&ve(o.slice(0,-1)),g=o=>gr.test(o),U=o=>$n.test(o),kn=new Set(["length","size","percentage"]),Dn=o=>fe(o,kn,mr),Mn=o=>fe(o,"position",mr),In=new Set(["image","url"]),Ln=o=>fe(o,In,Rn),An=o=>fe(o,"",Bn),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},zn=o=>_n.test(o)&&!On.test(o),mr=()=>!1,Bn=o=>En.test(o),Rn=o=>Pn.test(o),Nn=yn(()=>{const o=f("colors"),e=f("spacing"),r=f("blur"),n=f("brightness"),t=f("borderColor"),i=f("borderRadius"),a=f("borderSpacing"),p=f("borderWidth"),m=f("contrast"),h=f("grayscale"),v=f("hueRotate"),C=f("invert"),$=f("gap"),E=f("gradientColorStops"),k=f("gradientColorStopPositions"),_=f("inset"),w=f("margin"),O=f("opacity"),D=f("padding"),Te=f("saturate"),me=f("scale"),ut=f("sepia"),Jr=f("skew"),Qr=f("space"),jr=f("translate"),or=()=>["auto","contain","none"],ir=()=>["auto","hidden","clip","visible","scroll"],sr=()=>["auto",g,e],y=()=>[g,e],en=()=>["",R,V],pt=()=>["auto",ve,g],tn=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ht=()=>["solid","dashed","dotted","double","none"],rn=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ar=()=>["start","end","center","between","around","evenly","stretch"],qe=()=>["","0",g],nn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ve,g];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[R,V],blur:["none","",U,g],brightness:F(),borderColor:[o],borderRadius:["none","","full",U,g],borderSpacing:y(),borderWidth:en(),contrast:F(),grayscale:qe(),hueRotate:F(),invert:qe(),gap:y(),gradientColorStops:[o],gradientColorStopPositions:[Sn,V],inset:sr(),margin:sr(),opacity:F(),padding:y(),saturate:F(),scale:F(),sepia:qe(),skew:F(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[U]}],"break-after":[{"break-after":nn()}],"break-before":[{"break-before":nn()}],"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:[...tn(),g]}],overflow:[{overflow:ir()}],"overflow-x":[{"overflow-x":ir()}],"overflow-y":[{"overflow-y":ir()}],overscroll:[{overscroll:or()}],"overscroll-x":[{"overscroll-x":or()}],"overscroll-y":[{"overscroll-y":or()}],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:sr()}],"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:qe()}],shrink:[{shrink:qe()}],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":pt()}],"col-end":[{"col-end":pt()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[Oe,g]},g]}],"row-start":[{"row-start":pt()}],"row-end":[{"row-end":pt()}],"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",...ar()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ar(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ar(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],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":[Qr]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Qr]}],"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:[U]},U]}],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",U,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ft]}],"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,ft]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",R,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:[...ht(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",R,V]}],"underline-offset":[{"underline-offset":["auto",R,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:[...tn(),Mn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ln]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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:[...ht(),"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:ht()}],"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:["",...ht()]}],"outline-offset":[{"outline-offset":[R,g]}],"outline-w":[{outline:[R,V]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:en()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[R,V]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",U,An]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...rn(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rn()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",U,g]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[C]}],saturate:[{saturate:[Te]}],sepia:[{sepia:[ut]}],"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":[C]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[Te]}],"backdrop-sepia":[{"backdrop-sepia":[ut]}],"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":[jr]}],"translate-y":[{"translate-y":[jr]}],"skew-x":[{"skew-x":[Jr]}],"skew-y":[{"skew-y":[Jr]}],"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:[R,V,ft]}],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 Nn(an(o))}class b extends l.LitElement{constructor(){super()}getFilteredAttributes(){const e={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(e[r.name]=r.value??"")}),e}isCustomPropertySet(e){const r=getComputedStyle(this).getPropertyValue(e).trim();return r!=="inherit"&&r.length>0}applyCustomClass(e,r,n=""){var i,a;let t="";e.some(p=>this.isCustomPropertySet(p))&&(t=n),t&&((a=(i=this.shadowRoot)==null?void 0:i.querySelector(r))==null||a.classList.add(t))}}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`
|
|
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`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: 'GeistSans';
|
|
4
4
|
|
|
5
|
-
src: url('assets/fonts/Geist/Geist-Regular.woff2') format('woff2');
|
|
6
|
-
}
|
|
7
|
-
@font-face {
|
|
8
|
-
font-family: 'GeistThin';
|
|
9
|
-
|
|
10
5
|
src: url('assets/fonts/Geist/GeistVariableVF.woff2') format('woff2');
|
|
11
6
|
}
|
|
12
7
|
|
|
@@ -472,7 +467,7 @@ video {
|
|
|
472
467
|
--muted: 240 4.8% 95.9%;
|
|
473
468
|
--muted-foreground: 240 4% 46%;
|
|
474
469
|
--accent: 240 5% 96%;
|
|
475
|
-
--accent-foreground: 240
|
|
470
|
+
--accent-foreground: 240 6% 10%;
|
|
476
471
|
--destructive: 0 84.2% 60.2%;
|
|
477
472
|
--destructive-foreground: 0 0% 98%;
|
|
478
473
|
--border: 240 5.9% 90%;
|
|
@@ -529,7 +524,7 @@ video {
|
|
|
529
524
|
|
|
530
525
|
* {
|
|
531
526
|
border-color: hsl(var(--border));
|
|
532
|
-
font-family: GeistSans,
|
|
527
|
+
font-family: GeistSans, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
533
528
|
}
|
|
534
529
|
|
|
535
530
|
body {
|
|
@@ -1864,7 +1859,7 @@ body {
|
|
|
1864
1859
|
}
|
|
1865
1860
|
|
|
1866
1861
|
.font-geist {
|
|
1867
|
-
font-family: GeistSans,
|
|
1862
|
+
font-family: GeistSans, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
1868
1863
|
}
|
|
1869
1864
|
|
|
1870
1865
|
.font-mono {
|
|
@@ -2842,7 +2837,16 @@ body {
|
|
|
2842
2837
|
.\\[\\&_svg\\]\\:shrink-0 svg {
|
|
2843
2838
|
flex-shrink: 0;
|
|
2844
2839
|
}
|
|
2845
|
-
|
|
2840
|
+
`,br=new CSSStyleSheet;br.replaceSync(c.cssText||c.toString());class wr extends l.LitElement{constructor(){super()}connectedCallback(){super.connectedCallback(),this.shadowRoot?(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,br],this.moveChildrenToShadow()):console.error("Shadow root not available in ShadowWrapper")}moveChildrenToShadow(){const e=Array.from(this.children);console.log("Moving children:",e),e.forEach(n=>{const r=document.createElement("div");r.className="wrapper",r.appendChild(n.cloneNode(!0)),this.shadowRoot.appendChild(r),n.remove()})}render(){return l.html``}}wr.styles=l.css`
|
|
2841
|
+
:host {
|
|
2842
|
+
display: block;
|
|
2843
|
+
border: 2px solid black;
|
|
2844
|
+
padding: 10px;
|
|
2845
|
+
}
|
|
2846
|
+
.wrapper {
|
|
2847
|
+
display: block;
|
|
2848
|
+
}
|
|
2849
|
+
`,customElements.define("shadow-wrapper",wr);class yr extends vn.AsyncDirective{constructor(){super(...arguments),this.prevData={}}render(e){return mn.nothing}update(e,[n]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)===null||r===void 0?void 0:r.host)||this.element,this.apply(n),this.groom(n),this.prevData={...n}}apply(e){if(!e)return;const{prevData:n,element:r}=this;for(const t in e){const s=e[t];s!==n[t]&&(r[t]=s)}}groom(e){const{prevData:n,element:r}=this;if(n)for(const t in n)(!e||!(t in e)&&r[t]===n[t])&&(r[t]=void 0)}}ht.directive(yr);class xr extends yr{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(const n in e){const r=e[n];r!==this.eventData[n]&&this.applyEvent(n,r)}}applyEvent(e,n){const{prevData:r,element:t}=this;this.eventData[e]=n,r[e]&&t.removeEventListener(e,this,n),t.addEventListener(e,this,n)}groom(e){const{prevData:n,element:r}=this;if(n)for(const t in n)(!e||!(t in e)&&r[t]===n[t])&&this.groomEvent(t,n[t])}groomEvent(e,n){const{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,n)}handleEvent(e){const n=this.eventData[e.type];typeof n=="function"?n.call(this.host,e):n.handleEvent(e)}disconnected(){const{eventData:e,element:n}=this;for(const r in e){const t=r.slice(1),s=e[r];n.removeEventListener(t,this,s)}}reconnected(){const{eventData:e,element:n}=this;for(const r in e){const t=r.slice(1),s=e[r];n.addEventListener(t,this,s)}}}ht.directive(xr);class Kn extends xr{apply(e){if(!e)return;const{prevData:n,element:r}=this;for(const t in e){const s=e[t];if(s===n[t])continue;const a=t.slice(1);switch(t[0]){case"@":this.eventData[a]=s,this.applyEvent(a,s);break;case".":r[a]=s;break;case"?":s?r.setAttribute(a,""):r.removeAttribute(a);break;default:s!=null?r.setAttribute(t,String(s)):r.removeAttribute(t);break}}}groom(e){const{prevData:n,element:r}=this;if(n)for(const t in n){const s=t.slice(1);if(!e||!(t in e)&&r[s]===n[t])switch(t[0]){case"@":this.groomEvent(s,n[t]);break;case".":r[s]=void 0;break;case"?":r.removeAttribute(s);break;default:r.removeAttribute(t);break}}}}const x=ht.directive(Kn);var Zn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,ft=(o,e,n,r)=>{for(var t=r>1?void 0:r?Jn(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&&Zn(e,n,t),t};let Q=class extends f{constructor(){super(...arguments),this.value="",this.tabindex=0,this.handleClick=o=>{o.preventDefault(),o.stopPropagation();const e=o.currentTarget;if(e instanceof HTMLDivElement){const n=e.getAttribute("value")??"";this._accordion&&this._accordion.raiseEvent(n)}}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(o){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this._accordion&&this._accordion.removeEventListener("clicked-accordion",()=>{})}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof H);)o=o.parentElement;return o}render(){var e;const o=this.getFilteredAttributes();return L.html`
|
|
2846
2850
|
<div
|
|
2847
2851
|
${x(o)}
|
|
2848
2852
|
data-state=${(e=this._accordion)!=null&&e.selectedItems.includes(this.value)?"open":"closed"}
|
|
@@ -2858,10 +2862,10 @@ body {
|
|
|
2858
2862
|
<slot name="accordion-trigger"></slot>
|
|
2859
2863
|
</h3>
|
|
2860
2864
|
<div>
|
|
2861
|
-
${this._accordion&&this._accordion.selectedItems.includes(this.value)?
|
|
2865
|
+
${this._accordion&&this._accordion.selectedItems.includes(this.value)?L.html`<slot name="accordion-content"></slot>`:L.nothing}
|
|
2862
2866
|
</div>
|
|
2863
2867
|
</div>
|
|
2864
|
-
`}};Q.styles=[
|
|
2868
|
+
`}};Q.styles=[L.css``,c],ft([d.property({type:String})],Q.prototype,"value",2),ft([d.property({type:Number})],Q.prototype,"tabindex",2),Q=ft([d.customElement("rtg-accordion-item")],Q);function Qn(){return l.svg` <svg
|
|
2865
2869
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
2866
2870
|
xmlns="http://www.w3.org/2000/svg"
|
|
2867
2871
|
width="24"
|
|
@@ -2876,7 +2880,7 @@ body {
|
|
|
2876
2880
|
<path d="m7 15 5 5 5-5"></path>
|
|
2877
2881
|
<path d="m7 9 5-5 5 5"></path>
|
|
2878
2882
|
</svg>
|
|
2879
|
-
`}function
|
|
2883
|
+
`}function Cr(){return l.svg`
|
|
2880
2884
|
<svg
|
|
2881
2885
|
class="shrink-0 size-3.5 text-blue-600 dark:text-blue-500"
|
|
2882
2886
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -2891,7 +2895,7 @@ body {
|
|
|
2891
2895
|
>
|
|
2892
2896
|
<path d="M20 6 9 17l-5-5"></path>
|
|
2893
2897
|
</svg>
|
|
2894
|
-
`}function
|
|
2898
|
+
`}function jn(){return l.svg` <svg
|
|
2895
2899
|
xmlns="http://www.w3.org/2000/svg"
|
|
2896
2900
|
width = "24"
|
|
2897
2901
|
height = "24"
|
|
@@ -2905,7 +2909,7 @@ body {
|
|
|
2905
2909
|
<circle cx="11" cy = "11" r = "8" > </circle>
|
|
2906
2910
|
<path d="m21 21-4.3-4.3"></path >
|
|
2907
2911
|
</svg>
|
|
2908
|
-
`}function
|
|
2912
|
+
`}function bt(){return l.svg` <svg
|
|
2909
2913
|
xmlns="http://www.w3.org/2000/svg"
|
|
2910
2914
|
width="24"
|
|
2911
2915
|
height="24"
|
|
@@ -2919,8 +2923,8 @@ body {
|
|
|
2919
2923
|
>
|
|
2920
2924
|
<circle cx="12" cy="12" r="10"></circle>
|
|
2921
2925
|
</svg>
|
|
2922
|
-
`}function
|
|
2923
|
-
`}function
|
|
2926
|
+
`}function $r(){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>
|
|
2927
|
+
`}function eo(){return l.svg` <svg
|
|
2924
2928
|
xmlns="http://www.w3.org/2000/svg"
|
|
2925
2929
|
width="24"
|
|
2926
2930
|
height="24"
|
|
@@ -2934,7 +2938,7 @@ body {
|
|
|
2934
2938
|
>
|
|
2935
2939
|
<circle cx="12" cy="12" r="10"></circle></svg
|
|
2936
2940
|
>
|
|
2937
|
-
`}function
|
|
2941
|
+
`}function to(){return l.svg` <svg
|
|
2938
2942
|
xmlns="http://www.w3.org/2000/svg"
|
|
2939
2943
|
width="24"
|
|
2940
2944
|
height="24"
|
|
@@ -2949,28 +2953,28 @@ body {
|
|
|
2949
2953
|
<path d="M18 6 6 18"></path>
|
|
2950
2954
|
<path d="m6 6 12 12"></path>
|
|
2951
2955
|
</svg>
|
|
2952
|
-
`}function
|
|
2956
|
+
`}function ro(){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">
|
|
2953
2957
|
<circle cx="12.1" cy="12.1" r="1"></circle>
|
|
2954
|
-
</svg>`}var
|
|
2958
|
+
</svg>`}var no=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,_r=(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&&no(e,n,t),t};let qe=class extends f{connectedCallback(){super.connectedCallback()}firstUpdated(o){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}getAttributesToExclude(){return["value","defaultValue"]}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof H);)o=o.parentElement;return o}get _item(){let o=this.parentElement;for(;o&&!(o instanceof Q);)o=o.parentElement;return o}hasActiveState(){return this._item&&this._accordion?!!this._accordion.selectedItems.includes(this._item.value):!1}render(){var n;const o=this.getFilteredAttributes(),e=this.hasActiveState();return L.html`
|
|
2955
2959
|
<button
|
|
2956
2960
|
${x(o)}
|
|
2957
2961
|
type="button"
|
|
2958
2962
|
part="accordion-trigger"
|
|
2959
2963
|
role="tab"
|
|
2960
|
-
value=${(
|
|
2964
|
+
value=${(n=this._item)==null?void 0:n.value}
|
|
2961
2965
|
aria-selected=${e?"true":"false"}
|
|
2962
2966
|
aria-controls=${!!e}
|
|
2963
2967
|
aria-expanded=${e?"true":"false"}
|
|
2964
2968
|
data-state=${e?"open":"closed"}
|
|
2965
|
-
class="w-full flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180"
|
|
2969
|
+
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"
|
|
2966
2970
|
tabindex="-1"
|
|
2967
2971
|
data-orientation="horizontal"
|
|
2968
2972
|
data-radix-collection-item=""
|
|
2969
2973
|
>
|
|
2970
2974
|
<slot></slot>
|
|
2971
|
-
${
|
|
2975
|
+
${$r()}
|
|
2972
2976
|
</button>
|
|
2973
|
-
`}};
|
|
2977
|
+
`}};qe.styles=[L.css``,c],_r([d.property({type:Function})],qe.prototype,"onClickCallback",2),qe=_r([d.customElement("rtg-accordion-trigger")],qe);var so=Object.defineProperty,io=Object.getOwnPropertyDescriptor,wt=(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&&so(e,n,t),t};let Ee=class extends L.LitElement{constructor(){super(...arguments),this.value="",this.selectedValue=""}updated(o){super.updated(o)}firstUpdated(o){var e;this._accordion&&((e=this._accordion)==null||e.addEventListener("clicked-accordion",()=>{this.requestUpdate()}))}get _accordion(){let o=this.parentElement;for(;o&&!(o instanceof H);)o=o.parentElement;return o}get _item(){let o=this.parentElement;for(;o&&!(o instanceof Q);)o=o.parentElement;return o}hasActiveState(){return this._item&&this._accordion?!!this._accordion.selectedItems.includes(this._item.value):!1}render(){return L.html`
|
|
2974
2978
|
<div
|
|
2975
2979
|
@click=${o=>{o.stopPropagation()}}
|
|
2976
2980
|
part="accordion-content"
|
|
@@ -2989,7 +2993,7 @@ body {
|
|
|
2989
2993
|
<slot></slot>
|
|
2990
2994
|
</div>
|
|
2991
2995
|
</div>
|
|
2992
|
-
`}};
|
|
2996
|
+
`}};Ee.styles=[L.css``,c],wt([d.property({type:String})],Ee.prototype,"value",2),wt([d.state()],Ee.prototype,"selectedValue",2),Ee=wt([d.customElement("rtg-accordion-content")],Ee);var be=(o=>(o.MULTIPLE="multiple",o.SINGLE="single",o))(be||{}),ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,yt=(o,e,n,r)=>{for(var t=r>1?void 0:r?lo(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&&ao(e,n,t),t};let H=class extends f{constructor(){super(...arguments),this.twCLass="",this.type=be.MULTIPLE,this.selectedItems=[]}getAttributesToExclude(){return["variant"]}connectedCallback(){var o;super.connectedCallback(),(o=this.shadowRoot)==null||o.addEventListener("clicked-accordion",()=>{})}disconnectedCallback(){super.disconnectedCallback()}setSelectedItems(o){const e=this.selectedItems.indexOf(o);if(e>-1)if(this.type===be.SINGLE)this.selectedItems=[];else if(this.type===be.MULTIPLE)this.selectedItems.splice(e,1);else throw new Error("Type does not correct");else if(this.type===be.SINGLE)this.selectedItems[0]=o;else if(this.type===be.MULTIPLE)this.selectedItems.push(o);else throw new Error("Type does not correct")}raiseEvent(o){this.setSelectedItems(o);const e=new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}});this.dispatchEvent(e)}render(){const o=this.getFilteredAttributes();return l.html`
|
|
2993
2997
|
<div
|
|
2994
2998
|
data-orientation="vertical"
|
|
2995
2999
|
${x(o)}
|
|
@@ -2998,22 +3002,22 @@ body {
|
|
|
2998
3002
|
>
|
|
2999
3003
|
<slot name="accordion-item"></slot>
|
|
3000
3004
|
</div>
|
|
3001
|
-
`}};H.styles=[l.css``,c],
|
|
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`
|
|
3002
3006
|
:host {
|
|
3003
3007
|
display: block;
|
|
3004
3008
|
font-weight: bold;
|
|
3005
3009
|
margin-bottom: 0.5rem;
|
|
3006
3010
|
}
|
|
3007
|
-
`,
|
|
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`
|
|
3008
3012
|
:host {
|
|
3009
3013
|
display: block;
|
|
3010
3014
|
}
|
|
3011
|
-
`,
|
|
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`
|
|
3012
3016
|
<div class="alert ${this.alertClasses} ${this.twCLass}" part="alert">
|
|
3013
3017
|
<slot name="title"></slot>
|
|
3014
3018
|
<slot name="description"></slot>
|
|
3015
3019
|
</div>
|
|
3016
|
-
`}},
|
|
3020
|
+
`}},i.Alert.styles=[l.css`
|
|
3017
3021
|
:host {
|
|
3018
3022
|
display: block;
|
|
3019
3023
|
margin-bottom: 1rem;
|
|
@@ -3026,7 +3030,7 @@ body {
|
|
|
3026
3030
|
font-weight: bold;
|
|
3027
3031
|
margin-bottom: 0.5rem;
|
|
3028
3032
|
}
|
|
3029
|
-
`,c],
|
|
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`
|
|
3030
3034
|
<div
|
|
3031
3035
|
class="${u("aspect-ratio-wrapper bg-muted",this.className,this.twCLass)} "
|
|
3032
3036
|
style="padding-top: ${e}%;"
|
|
@@ -3036,7 +3040,7 @@ body {
|
|
|
3036
3040
|
<slot></slot>
|
|
3037
3041
|
</div>
|
|
3038
3042
|
</div>
|
|
3039
|
-
`}},
|
|
3043
|
+
`}},i.AspectRatio.styles=[l.css`
|
|
3040
3044
|
.aspect-ratio-wrapper {
|
|
3041
3045
|
position: relative;
|
|
3042
3046
|
width: 100%;
|
|
@@ -3049,42 +3053,42 @@ body {
|
|
|
3049
3053
|
width: 100%;
|
|
3050
3054
|
height: 100%;
|
|
3051
3055
|
}
|
|
3052
|
-
`,c],
|
|
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`
|
|
3053
3057
|
<span
|
|
3054
|
-
class="${u(
|
|
3058
|
+
class="${u(xo,this.className,this.twCLass)}"
|
|
3055
3059
|
part="avatar"
|
|
3056
3060
|
>
|
|
3057
3061
|
<slot></slot>
|
|
3058
3062
|
</span>
|
|
3059
|
-
`}};
|
|
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`
|
|
3060
3064
|
<span
|
|
3061
|
-
class="${u(
|
|
3065
|
+
class="${u($o,this.className)}"
|
|
3062
3066
|
style="width:40px;height:40px"
|
|
3063
3067
|
part="avatar-fallback"
|
|
3064
3068
|
>
|
|
3065
3069
|
<slot></slot>
|
|
3066
3070
|
</span>
|
|
3067
|
-
`}}
|
|
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`
|
|
3068
3072
|
<img
|
|
3069
|
-
class="${u(
|
|
3073
|
+
class="${u(Co,this.className)}"
|
|
3070
3074
|
alt="${this.alt}"
|
|
3071
3075
|
src="${this.src}"
|
|
3072
3076
|
part="avatar-image"
|
|
3073
3077
|
>
|
|
3074
3078
|
<slot></slot>
|
|
3075
3079
|
</img>
|
|
3076
|
-
`}};
|
|
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`
|
|
3077
3081
|
<button
|
|
3078
3082
|
part="button"
|
|
3079
3083
|
type="${this.type}"
|
|
3080
3084
|
${x(e)}
|
|
3081
3085
|
?disabled="${this.disabled}"
|
|
3082
|
-
class="${u(
|
|
3086
|
+
class="${u(i.Button.buttonVariants({variant:this.variant,size:this.size,className:this.className}))} ${this.externalClass} ${this.isCustomClass?"rtg-button-custom-class":""}"
|
|
3083
3087
|
@click="${this.handleClick}"
|
|
3084
3088
|
>
|
|
3085
3089
|
<slot></slot>
|
|
3086
3090
|
</button>
|
|
3087
|
-
`}},
|
|
3091
|
+
`}},i.Button.buttonVariants=ko,i.Button.styles=[l.css`
|
|
3088
3092
|
:host {
|
|
3089
3093
|
--rtg-button-bg: unset;
|
|
3090
3094
|
--rtg-button-color: unset;
|
|
@@ -3097,25 +3101,25 @@ body {
|
|
|
3097
3101
|
border-radius: var(--rtg-button-radius, unset) !important;
|
|
3098
3102
|
height: var(--rtg-button-height, unset) !important;
|
|
3099
3103
|
}
|
|
3100
|
-
`,c],Y([d.property({type:Function})],
|
|
3104
|
+
`,c],Y([d.property({type:Function})],i.Button.prototype,"click",2),Y([d.property({type:Boolean})],i.Button.prototype,"disabled",2),Y([d.property({type:String})],i.Button.prototype,"type",2),Y([d.property({type:String})],i.Button.prototype,"variant",2),Y([d.property({type:String})],i.Button.prototype,"size",2),Y([d.property({type:String})],i.Button.prototype,"externalClass",2),Y([d.property({type:String})],i.Button.prototype,"isCustomClass",2),i.Button=Y([d.customElement("rtg-button")],i.Button);const Ao=k("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 zo=Object.defineProperty,Ro=Object.getOwnPropertyDescriptor,Ve=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ro(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&&zo(e,n,t),t};i.Badge=class extends f{constructor(){super(...arguments),this.twCLass="",this.variant="default",this.id="rtg-badge-id"}getAttributesToExclude(){return["variant"]}render(){const e=this.getFilteredAttributes();return l.html`
|
|
3101
3105
|
<div
|
|
3102
3106
|
${x(e)}
|
|
3103
3107
|
id="${this.id}"
|
|
3104
3108
|
part="badge"
|
|
3105
3109
|
class="
|
|
3106
|
-
${u(
|
|
3110
|
+
${u(i.Badge.badgeVariants({variant:this.variant,className:this.className}))},
|
|
3107
3111
|
${this.twCLass}
|
|
3108
3112
|
"
|
|
3109
3113
|
>
|
|
3110
3114
|
<slot></slot>
|
|
3111
3115
|
</div>
|
|
3112
|
-
`}},
|
|
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
|
|
3113
3117
|
part="card"
|
|
3114
3118
|
class="rounded-lg border bg-card text-card-foreground shadow-sm p-6"
|
|
3115
3119
|
id="rtg-card-id"
|
|
3116
3120
|
>
|
|
3117
3121
|
<slot></slot>
|
|
3118
|
-
</div>`}},
|
|
3122
|
+
</div>`}},i.Card.styles=[l.css``,c],i.Card=es([d.customElement("rtg-card")],i.Card);var ts=Object.defineProperty,rs=Object.getOwnPropertyDescriptor,ns=(o,e,n,r)=>{for(var t=r>1?void 0:r?rs(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&&ts(e,n,t),t};let _t=class extends f{getAttributesToExclude(){return[""]}get _collapsible(){let o=this.parentElement;for(;o&&!(o instanceof j);)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`
|
|
3119
3123
|
<div
|
|
3120
3124
|
@click=${this.onTrigger}
|
|
3121
3125
|
${x(o)}
|
|
@@ -3123,7 +3127,7 @@ body {
|
|
|
3123
3127
|
>
|
|
3124
3128
|
<slot></slot>
|
|
3125
3129
|
</div>
|
|
3126
|
-
`}};
|
|
3130
|
+
`}};_t.styles=[l.css``,c],_t=ns([d.customElement("rtg-collapsible-trigger")],_t);var os=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,is=(o,e,n,r)=>{for(var t=r>1?void 0:r?ss(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&&os(e,n,t),t};let Ot=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3127
3131
|
<div
|
|
3128
3132
|
${x(o)}
|
|
3129
3133
|
class="${this.className}"
|
|
@@ -3132,7 +3136,7 @@ body {
|
|
|
3132
3136
|
>
|
|
3133
3137
|
<slot></slot>
|
|
3134
3138
|
</div>
|
|
3135
|
-
`}};
|
|
3139
|
+
`}};Ot.styles=[l.css``,c],Ot=is([d.customElement("rtg-collapsible-content")],Ot);var as=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,Ge=(o,e,n,r)=>{for(var t=r>1?void 0:r?ls(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&&as(e,n,t),t};let j=class extends f{constructor(){super(...arguments),this.open=!1,this.onOpenChange=()=>{},this.twCLass=""}getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3136
3140
|
<div
|
|
3137
3141
|
data-state="${this.open?"open":"closed"}"
|
|
3138
3142
|
${x(o)}
|
|
@@ -3142,7 +3146,7 @@ body {
|
|
|
3142
3146
|
<slot></slot>
|
|
3143
3147
|
${this.open?l.html`<slot name="collapsible-content"></slot>`:l.nothing}
|
|
3144
3148
|
</div>
|
|
3145
|
-
`}};j.styles=[l.css``,c],
|
|
3149
|
+
`}};j.styles=[l.css``,c],Ge([d.property({type:Boolean})],j.prototype,"open",2),Ge([d.property({type:Function})],j.prototype,"onOpenChange",2),Ge([d.property({type:String})],j.prototype,"twCLass",2),j=Ge([d.customElement("rtg-collapsible")],j);const ds="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",cs="flex items-center justify-center text-current pointer-events-none";var us=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,ee=(o,e,n,r)=>{for(var t=r>1?void 0:r?ps(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&&us(e,n,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}render(){const e={...this.dataset};return l.html`
|
|
3146
3150
|
<button
|
|
3147
3151
|
part="checkbox"
|
|
3148
3152
|
data-testid="checkbox-atom"
|
|
@@ -3154,10 +3158,10 @@ body {
|
|
|
3154
3158
|
?required=${this.required}
|
|
3155
3159
|
?disabled=${this.disabled}
|
|
3156
3160
|
@click="${this._onClick}"
|
|
3157
|
-
class="${u(
|
|
3158
|
-
${Object.entries(e).map(([r
|
|
3161
|
+
class="${u(ds,this.className)} ${this.twCLass}"
|
|
3162
|
+
${Object.entries(e).map(([n,r])=>l.html` ${n}="${r}" `)}
|
|
3159
3163
|
>
|
|
3160
|
-
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${
|
|
3164
|
+
${this.checked||this.value==="on"?l.html`<span data-state="checked" class="${cs}"
|
|
3161
3165
|
><svg
|
|
3162
3166
|
xmlns="http://www.w3.org/2000/svg"
|
|
3163
3167
|
width="24"
|
|
@@ -3173,7 +3177,7 @@ body {
|
|
|
3173
3177
|
<polyline points="20 6 9 17 4 12"></polyline></svg
|
|
3174
3178
|
></span>`:l.nothing}
|
|
3175
3179
|
</button>
|
|
3176
|
-
`}},
|
|
3180
|
+
`}},i.Checkbox.styles=[l.css``,c],ee([d.property({type:Boolean})],i.Checkbox.prototype,"disabled",2),ee([d.property({type:Boolean})],i.Checkbox.prototype,"checked",2),ee([d.property({type:String})],i.Checkbox.prototype,"type",2),ee([d.property({type:String})],i.Checkbox.prototype,"value",2),ee([d.property({type:Boolean})],i.Checkbox.prototype,"required",2),ee([d.property({type:String})],i.Checkbox.prototype,"twCLass",2),i.Checkbox=ee([d.customElement("rtg-checkbox")],i.Checkbox);const He="closed";var hs=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,Et=(o,e,n,r)=>{for(var t=r>1?void 0:r?gs(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&&hs(e,n,t),t};i.ContextMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=He,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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-context-menu-content"),r=(s=this.shadowRoot)==null?void 0:s.querySelector("button");n&&!n.contains(e.target)&&!(r!=null&&r.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
3177
3181
|
<div
|
|
3178
3182
|
part="context-menu-content"
|
|
3179
3183
|
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"
|
|
@@ -3182,7 +3186,7 @@ body {
|
|
|
3182
3186
|
>
|
|
3183
3187
|
<slot></slot>
|
|
3184
3188
|
</div>
|
|
3185
|
-
`}},
|
|
3189
|
+
`}},i.ContextMenuContent.styles=[l.css``,c],Et([d.property({attribute:"data-state",type:String})],i.ContextMenuContent.prototype,"state",2),Et([d.state()],i.ContextMenuContent.prototype,"isOpen",2),i.ContextMenuContent=Et([d.customElement("rtg-context-menu-content")],i.ContextMenuContent);var ms=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,te=(o,e,n,r)=>{for(var t=r>1?void 0:r?vs(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&&ms(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3186
3190
|
<div
|
|
3187
3191
|
part="context-menu-checkbox"
|
|
3188
3192
|
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)}"
|
|
@@ -3216,13 +3220,13 @@ body {
|
|
|
3216
3220
|
</span>
|
|
3217
3221
|
<slot></slot>
|
|
3218
3222
|
</div>
|
|
3219
|
-
`}},
|
|
3223
|
+
`}},i.ContextMenuCheckboxItem._counter=0,i.ContextMenuCheckboxItem.styles=[l.css`
|
|
3220
3224
|
.icon-space {
|
|
3221
3225
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
3222
3226
|
height: 16px;
|
|
3223
3227
|
display: inline-block;
|
|
3224
3228
|
}
|
|
3225
|
-
`,c],te([d.property({type:String})],
|
|
3229
|
+
`,c],te([d.property({type:String})],i.ContextMenuCheckboxItem.prototype,"_id",2),te([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuCheckboxItem.prototype,"_hidden",2),te([d.property({attribute:"data-value",type:String})],i.ContextMenuCheckboxItem.prototype,"value",1),te([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"selected",2),te([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"checked",2),te([d.property({type:Boolean})],i.ContextMenuCheckboxItem.prototype,"disabled",2),i.ContextMenuCheckboxItem=te([d.customElement("rtg-context-menu-checkbox-item")],i.ContextMenuCheckboxItem);var fs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,Ye=(o,e,n,r)=>{for(var t=r>1?void 0:r?bs(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&&fs(e,n,t),t};i.ContextMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3226
3230
|
<div
|
|
3227
3231
|
part="context-menu-group"
|
|
3228
3232
|
class="${e}"
|
|
@@ -3245,7 +3249,7 @@ body {
|
|
|
3245
3249
|
<slot></slot>
|
|
3246
3250
|
</div>
|
|
3247
3251
|
</div>
|
|
3248
|
-
`}`}},
|
|
3252
|
+
`}`}},i.ContextMenuGroup._counter=0,i.ContextMenuGroup.styles=[l.css``,c],Ye([d.property({type:String})],i.ContextMenuGroup.prototype,"heading",2),Ye([d.property({attribute:"id",type:String})],i.ContextMenuGroup.prototype,"_id",2),Ye([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuGroup.prototype,"_hidden",2),i.ContextMenuGroup=Ye([d.customElement("rtg-context-menu-group")],i.ContextMenuGroup);var ws=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,Se=(o,e,n,r)=>{for(var t=r>1?void 0:r?ys(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&&ws(e,n,t),t};i.ContextMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3249
3253
|
<div
|
|
3250
3254
|
part="context-menu-item"
|
|
3251
3255
|
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)}"
|
|
@@ -3262,7 +3266,7 @@ body {
|
|
|
3262
3266
|
>
|
|
3263
3267
|
<slot></slot>
|
|
3264
3268
|
</div>
|
|
3265
|
-
`}`}},
|
|
3269
|
+
`}`}},i.ContextMenuItem._counter=0,i.ContextMenuItem.styles=[l.css``,c],Se([d.property({type:String})],i.ContextMenuItem.prototype,"_id",2),Se([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuItem.prototype,"_hidden",2),Se([d.property({attribute:"data-value",type:String})],i.ContextMenuItem.prototype,"value",1),Se([d.property({type:Boolean})],i.ContextMenuItem.prototype,"selected",2),i.ContextMenuItem=Se([d.customElement("rtg-context-menu-item")],i.ContextMenuItem);var xs=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,re=(o,e,n,r)=>{for(var t=r>1?void 0:r?Cs(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&&xs(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3266
3270
|
<div
|
|
3267
3271
|
part="context-menu-radio"
|
|
3268
3272
|
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)}"
|
|
@@ -3281,17 +3285,17 @@ body {
|
|
|
3281
3285
|
<span
|
|
3282
3286
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
3283
3287
|
>
|
|
3284
|
-
${this.checked?l.html` ${
|
|
3288
|
+
${this.checked?l.html` ${bt()} `:l.nothing}
|
|
3285
3289
|
</span>
|
|
3286
3290
|
<slot></slot>
|
|
3287
3291
|
</div>
|
|
3288
|
-
`}},
|
|
3292
|
+
`}},i.ContextMenuRadioItem._counter=0,i.ContextMenuRadioItem.styles=[l.css`
|
|
3289
3293
|
.icon-space {
|
|
3290
3294
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
3291
3295
|
height: 16px;
|
|
3292
3296
|
display: inline-block;
|
|
3293
3297
|
}
|
|
3294
|
-
`,c],re([d.property({type:String})],
|
|
3298
|
+
`,c],re([d.property({type:String})],i.ContextMenuRadioItem.prototype,"_id",2),re([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuRadioItem.prototype,"_hidden",2),re([d.property({attribute:"data-value",type:String})],i.ContextMenuRadioItem.prototype,"value",1),re([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"selected",2),re([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"checked",2),re([d.property({type:Boolean})],i.ContextMenuRadioItem.prototype,"disabled",2),i.ContextMenuRadioItem=re([d.customElement("rtg-context-menu-radio-item")],i.ContextMenuRadioItem);var $s=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,Pt=(o,e,n,r)=>{for(var t=r>1?void 0:r?_s(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&&$s(e,n,t),t};i.ContextMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3295
3299
|
<div
|
|
3296
3300
|
part="context-menu-separator"
|
|
3297
3301
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3299,14 +3303,14 @@ body {
|
|
|
3299
3303
|
role="separator"
|
|
3300
3304
|
id="${this.identifier}"
|
|
3301
3305
|
></div>
|
|
3302
|
-
`}`}},
|
|
3306
|
+
`}`}},i.ContextMenuSeparator._counter=0,i.ContextMenuSeparator.styles=[l.css``,c],Pt([d.property({type:String})],i.ContextMenuSeparator.prototype,"_id",2),Pt([d.property({attribute:"aria-hidden",type:String})],i.ContextMenuSeparator.prototype,"_hidden",2),i.ContextMenuSeparator=Pt([d.customElement("rtg-context-menu-separator")],i.ContextMenuSeparator);var Os=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(o,e,n,r)=>{for(var t=r>1?void 0:r?Es(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&&Os(e,n,t),t};i.ContextMenuShortcut=class extends l.LitElement{render(){return l.html`
|
|
3303
3307
|
<span
|
|
3304
3308
|
part="context-menu-shortcut"
|
|
3305
3309
|
class="${u("ml-auto text-xs font-semibold",this.className)}"
|
|
3306
3310
|
>
|
|
3307
3311
|
<slot></slot>
|
|
3308
3312
|
</span>
|
|
3309
|
-
`}},
|
|
3313
|
+
`}},i.ContextMenuShortcut.styles=[l.css``,c],i.ContextMenuShortcut=Ps([d.customElement("rtg-context-menu-shortcut")],i.ContextMenuShortcut);var Ss=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Mr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ds(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&&Ss(e,n,t),t};i.ContextMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var r;const n=e.target;(r=this.shadowRoot)!=null&&r.contains(n)||(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:n,clientY:r}=e,t=e.target.getBoundingClientRect();requestAnimationFrame(()=>{const s=this._content;s&&(s.style.position="absolute",s.style.left=`${n-t.left}px`,s.style.top=`${r-t.top}px`,s.dataset.state="open",this.isOpen=!0)})}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.ContextMenuContent)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-context-menu-radio-item").forEach(n=>{n!==e.target&&(n.checked=!1)})}render(){return l.html`
|
|
3310
3314
|
<div class="flex" part="context-menu">
|
|
3311
3315
|
<div>
|
|
3312
3316
|
<slot @contextmenu="${this.toggleDropdown}"></slot>
|
|
@@ -3315,7 +3319,7 @@ body {
|
|
|
3315
3319
|
<slot></slot>
|
|
3316
3320
|
</div>
|
|
3317
3321
|
</div>
|
|
3318
|
-
`}},
|
|
3322
|
+
`}},i.ContextMenu.styles=[l.css``,c],Mr([d.state()],i.ContextMenu.prototype,"isOpen",2),i.ContextMenu=Mr([d.customElement("rtg-context-menu")],i.ContextMenu);var Ms=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,St=(o,e,n,r)=>{for(var t=r>1?void 0:r?ks(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&&Ms(e,n,t),t};let De=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
|
3319
3323
|
<div
|
|
3320
3324
|
part="command"
|
|
3321
3325
|
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)}"
|
|
@@ -3324,7 +3328,7 @@ body {
|
|
|
3324
3328
|
>
|
|
3325
3329
|
<slot></slot>
|
|
3326
3330
|
</div>
|
|
3327
|
-
`}};De.styles=[l.css``,c],
|
|
3331
|
+
`}};De.styles=[l.css``,c],St([d.property({type:String})],De.prototype,"twCLass",2),St([d.queryAssignedElements({selector:"input[rtgcmd-input]"})],De.prototype,"_input",2),De=St([d.customElement("rtg-command")],De);var Ls=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Dt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Is(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&&Ls(e,n,t),t};let X=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="true"}get identifier(){var e,n;if(this._id!=="")return this._id;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return o?this._id=`${o.getAttribute("id")}e${X._counter++}`:this._id=`rtgcmdrxlxe${X._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3328
3332
|
<div
|
|
3329
3333
|
part="command-empty"
|
|
3330
3334
|
class="${u("py-6 text-center text-sm",this.className)}"
|
|
@@ -3334,7 +3338,7 @@ body {
|
|
|
3334
3338
|
>
|
|
3335
3339
|
<slot></slot>
|
|
3336
3340
|
</div>
|
|
3337
|
-
`}`}};X._counter=0,X.styles=[l.css``,c],Dt([d.property({type:String})],X.prototype,"_id",2),Dt([d.property({attribute:"aria-hidden",type:String})],X.prototype,"_hidden",2),X=Dt([d.customElement("rtg-command-empty")],X);var
|
|
3341
|
+
`}`}};X._counter=0,X.styles=[l.css``,c],Dt([d.property({type:String})],X.prototype,"_id",2),Dt([d.property({attribute:"aria-hidden",type:String})],X.prototype,"_hidden",2),X=Dt([d.customElement("rtg-command-empty")],X);var As=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Xe=(o,e,n,r)=>{for(var t=r>1?void 0:r?zs(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&&As(e,n,t),t};let N=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var e,n;if(this._id!=="")return this._id;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.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`
|
|
3338
3342
|
<div
|
|
3339
3343
|
part="command-group"
|
|
3340
3344
|
class="${o}"
|
|
@@ -3357,7 +3361,7 @@ body {
|
|
|
3357
3361
|
<slot></slot>
|
|
3358
3362
|
</div>
|
|
3359
3363
|
</div>
|
|
3360
|
-
`}`}};N._counter=0,N.styles=[l.css``,c],
|
|
3364
|
+
`}`}};N._counter=0,N.styles=[l.css``,c],Xe([d.property({type:String})],N.prototype,"heading",2),Xe([d.property({attribute:"id",type:String})],N.prototype,"_id",2),Xe([d.property({attribute:"aria-hidden",type:String})],N.prototype,"_hidden",2),N=Xe([d.customElement("rtg-command-group")],N);var Rs=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Mt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Bs(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&&Rs(e,n,t),t};let Me=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){var e,n;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-root]");return o?`${o.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const o=this.parentElement;if(o){let e=!0;const n=o.querySelectorAll("rtg-command-list > rtg-command-group");n&&n.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 r=o.querySelector("rtg-command-empty");r&&r.setAttribute("aria-hidden",e?"false":"true")}}handleChange(o){const e=o.target;e&&(this._value=e.value,this.filterItems())}render(){return l.html`
|
|
3361
3365
|
<div
|
|
3362
3366
|
part="command-input"
|
|
3363
3367
|
class="${u("flex items-center border-b px-3",this.className)}"
|
|
@@ -3396,7 +3400,7 @@ body {
|
|
|
3396
3400
|
data-value="${this._value}"
|
|
3397
3401
|
/>
|
|
3398
3402
|
</div>
|
|
3399
|
-
`}};Me.styles=[l.css``,c],Mt([d.property({type:String})],Me.prototype,"placeholder",2),Mt([d.property({attribute:"value",type:String})],Me.prototype,"_value",2),Me=Mt([d.customElement("rtg-command-input")],Me);var
|
|
3403
|
+
`}};Me.styles=[l.css``,c],Mt([d.property({type:String})],Me.prototype,"placeholder",2),Mt([d.property({attribute:"value",type:String})],Me.prototype,"_value",2),Me=Mt([d.customElement("rtg-command-input")],Me);var Ns=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,ke=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ts(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&&Ns(e,n,t),t};let I=class extends l.LitElement{constructor(){super(...arguments),this.selected=!1,this._id="",this._hidden="",this.onSelect=()=>{}}get identifier(){var e,n;if(this._id!=="")return this._id;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.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`
|
|
3400
3404
|
<div
|
|
3401
3405
|
part="command-item"
|
|
3402
3406
|
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)}"
|
|
@@ -3414,7 +3418,7 @@ body {
|
|
|
3414
3418
|
>
|
|
3415
3419
|
<slot></slot>
|
|
3416
3420
|
</div>
|
|
3417
|
-
`}`}};
|
|
3421
|
+
`}`}};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 qs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,Us=(o,e,n,r)=>{for(var t=r>1?void 0:r?Fs(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&&qs(e,n,t),t};let kt=class extends l.LitElement{get identifier(){var e,n;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-root]");return o?`${o.getAttribute("id")}l`:"rtgcmdrxl"}render(){return l.html`
|
|
3418
3422
|
<div
|
|
3419
3423
|
part="command-list"
|
|
3420
3424
|
class="${u("max-h-[300px] overflow-y-auto overflow-x-hidden",this.className)}"
|
|
@@ -3427,7 +3431,7 @@ body {
|
|
|
3427
3431
|
<slot></slot>
|
|
3428
3432
|
</div>
|
|
3429
3433
|
</div>
|
|
3430
|
-
`}};
|
|
3434
|
+
`}};kt.styles=[l.css``,c],kt=Us([d.customElement("rtg-command-list")],kt);var Vs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Lt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Gs(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&&Vs(e,n,t),t};let W=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var e,n;if(this._id!=="")return this._id;const o=(n=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:n.querySelector("div[rtgcmd-list]");return o?this._id=`${o.getAttribute("id")}s${W._counter++}`:this._id=`rtgcmdrxlxs${W._counter++}`,this._id}render(){return l.html`${this._hidden==="true"?l.nothing:l.html`
|
|
3431
3435
|
<div
|
|
3432
3436
|
part="command-separator"
|
|
3433
3437
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3435,7 +3439,7 @@ body {
|
|
|
3435
3439
|
role="separator"
|
|
3436
3440
|
id="${this.identifier}"
|
|
3437
3441
|
></div>
|
|
3438
|
-
`}`}};
|
|
3442
|
+
`}`}};W._counter=0,W.styles=[l.css``,c],Lt([d.property({type:String})],W.prototype,"_id",2),Lt([d.property({attribute:"aria-hidden",type:String})],W.prototype,"_hidden",2),W=Lt([d.customElement("rtg-command-separator")],W);var Hs=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Xs=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ys(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&&Hs(e,n,t),t};let It=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{if(this._comboBox){[...document.getElementsByTagName("rtg-combo-box")].map(n=>{var r;n.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(n.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 r,t;super.firstUpdated(o);const e=(r=this.shadowRoot)==null?void 0:r.querySelector('slot[name="combo-box-trigger"]'),n=e==null?void 0:e.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
|
3439
3443
|
<button
|
|
3440
3444
|
type="button"
|
|
3441
3445
|
part="combo-box-trigger-button"
|
|
@@ -3447,29 +3451,29 @@ body {
|
|
|
3447
3451
|
@click=${this.handleClick}
|
|
3448
3452
|
>
|
|
3449
3453
|
<slot></slot>
|
|
3450
|
-
${
|
|
3454
|
+
${Qn()}
|
|
3451
3455
|
</button>
|
|
3452
|
-
`}};
|
|
3456
|
+
`}};It.styles=[l.css``,c],It=Xs([d.customElement("rtg-combo-box-trigger")],It);var Ws=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,kr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ks(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&&Ws(e,n,t),t};let We=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{if(this._comboBox){[...document.getElementsByTagName("rtg-combo-box")].map(n=>{var r;n.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(n.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 r,t;super.firstUpdated(o);const e=(r=this.shadowRoot)==null?void 0:r.querySelector('slot[name="combo-box-trigger"]'),n=e==null?void 0:e.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
|
3453
3457
|
<span
|
|
3454
3458
|
part="combo-box-value"
|
|
3455
3459
|
class="flex line-clamp-1 w-[180px]"
|
|
3456
3460
|
@click=${this.handleClick}
|
|
3457
3461
|
>${this.renderLabel()}</span
|
|
3458
3462
|
>
|
|
3459
|
-
`}};We.styles=[l.css``,c],
|
|
3460
|
-
@mouseover="${
|
|
3463
|
+
`}};We.styles=[l.css``,c],kr([d.property({type:String})],We.prototype,"placeholder",2),We=kr([d.customElement("rtg-combo-box-value")],We);var Zs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Ke=(o,e,n,r)=>{for(var t=r>1?void 0:r?Js(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&&Zs(e,n,t),t};let ne=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,n;return(n=o.value)==null?void 0:n.toLowerCase().includes((e=this.searchKey)==null?void 0:e.toLowerCase())}).map((o,e)=>{var n;return l.html`<rtg-combo-box-item
|
|
3464
|
+
@mouseover="${r=>this.handleMouseOver(r,e)}"
|
|
3461
3465
|
data-hs-combo-box-value=${o}
|
|
3462
3466
|
tabIndex=${e}
|
|
3463
3467
|
.value=${o.value}
|
|
3464
3468
|
.selectItemIndex="${e}"
|
|
3465
3469
|
.isFocus="${e===this.focusedIndex}"
|
|
3466
3470
|
.onSelect=${this.onSelectedValue}
|
|
3467
|
-
.isSelected="${o.value.toLowerCase()===((
|
|
3471
|
+
.isSelected="${o.value.toLowerCase()===((n=this._comboBox)==null?void 0:n.selectedValue.toLowerCase())}"
|
|
3468
3472
|
>
|
|
3469
3473
|
${o.textContent||o.value}
|
|
3470
3474
|
</rtg-combo-box-item> `}):l.html` <div>
|
|
3471
3475
|
<slot name="combo-box-empty"></slot>
|
|
3472
|
-
</div>`}get _comboBox(){let o=this.parentElement;for(;o&&!(o instanceof
|
|
3476
|
+
</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 n;return e.value===((n=this._comboBox)==null?void 0:n.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 n=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.childrenArray[this.focusedIndex].value}});this.dispatchEvent(n)}break;default:console.log("defaule");break}}handleMouseOver(o,e){o.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
|
3473
3477
|
<div
|
|
3474
3478
|
part="select-group"
|
|
3475
3479
|
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
|
|
@@ -3481,7 +3485,7 @@ body {
|
|
|
3481
3485
|
</div>
|
|
3482
3486
|
<div>${this.checkRender()}</div>
|
|
3483
3487
|
</div>
|
|
3484
|
-
`}};ne.styles=[l.css``,c],
|
|
3488
|
+
`}};ne.styles=[l.css``,c],Ke([d.state()],ne.prototype,"searchKey",2),Ke([d.state()],ne.prototype,"focusedIndex",2),Ke([d.state()],ne.prototype,"selectedValue",2),ne=Ke([d.customElement("rtg-combo-box-group")],ne);var Qs=Object.defineProperty,js=Object.getOwnPropertyDescriptor,A=(o,e,n,r)=>{for(var t=r>1?void 0:r?js(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&&Qs(e,n,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`
|
|
3485
3489
|
<div
|
|
3486
3490
|
${x(o)}
|
|
3487
3491
|
@click=${this.handleClick}
|
|
@@ -3505,12 +3509,12 @@ body {
|
|
|
3505
3509
|
<span
|
|
3506
3510
|
class="${this.isSelected?"visible":"invisible"} data-hs-combo-box-value mr-2"
|
|
3507
3511
|
>
|
|
3508
|
-
${
|
|
3512
|
+
${Cr()}
|
|
3509
3513
|
</span>
|
|
3510
3514
|
</div>
|
|
3511
|
-
`}};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
|
|
3515
|
+
`}};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,ti=Object.getOwnPropertyDescriptor,Ze=(o,e,n,r)=>{for(var t=r>1?void 0:r?ti(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&&ei(e,n,t),t};let we=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 ne);)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`
|
|
3512
3516
|
<div class="flex items-center px-2">
|
|
3513
|
-
${
|
|
3517
|
+
${jn()}
|
|
3514
3518
|
<input
|
|
3515
3519
|
part="combo-box-input"
|
|
3516
3520
|
type="text"
|
|
@@ -3526,11 +3530,11 @@ body {
|
|
|
3526
3530
|
@keydown="${this.handleKeyDown}"
|
|
3527
3531
|
/>
|
|
3528
3532
|
</div>
|
|
3529
|
-
`}};we.styles=[l.css``,c],
|
|
3533
|
+
`}};we.styles=[l.css``,c],Ze([d.property({type:String})],we.prototype,"placeholder",2),Ze([d.property({type:String})],we.prototype,"twClass",2),Ze([d.state()],we.prototype,"searchValue",2),we=Ze([d.customElement("rtg-combo-box-input")],we);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,oi=(o,e,n,r)=>{for(var t=r>1?void 0:r?ni(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&&ri(e,n,t),t};let At=class extends l.LitElement{render(){return l.html`
|
|
3530
3534
|
<div class="py-6 text-center text-sm" cmdk-empty="" role="presentation">
|
|
3531
3535
|
<slot></slot>
|
|
3532
3536
|
</div>
|
|
3533
|
-
`}};
|
|
3537
|
+
`}};At.styles=[l.css``,c],At=oi([d.customElement("rtg-combo-box-empty")],At);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,T=(o,e,n,r)=>{for(var t=r>1?void 0:r?ii(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&&si(e,n,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=fr(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var t,s;const n=(t=this.shadowRoot)==null?void 0:t.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")){if(!n||!n.contains(r))this.isOpen=!1;else if(!((s=r.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(n=>n.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 n=e.target;if(n instanceof HTMLElement){const r=n.closest("rtg-combo-box-item");r?(this.selectedValue=r.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`
|
|
3534
3538
|
<div
|
|
3535
3539
|
class="relative"
|
|
3536
3540
|
data-hs-combo-box=""
|
|
@@ -3544,7 +3548,7 @@ body {
|
|
|
3544
3548
|
<slot name="combo-box-content"></slot>
|
|
3545
3549
|
</div>
|
|
3546
3550
|
</div>
|
|
3547
|
-
`}},
|
|
3551
|
+
`}},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 ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,Lr=(o,e,n,r)=>{for(var t=r>1?void 0:r?li(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&&ai(e,n,t),t};const di="open",Ir="closed";i.DialogContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Ir,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=Ir)}}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===di?l.html`
|
|
3548
3552
|
<div
|
|
3549
3553
|
part="dialog-content"
|
|
3550
3554
|
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)}"
|
|
@@ -3573,18 +3577,18 @@ body {
|
|
|
3573
3577
|
><span class="sr-only">Close</span>
|
|
3574
3578
|
</button>
|
|
3575
3579
|
</div>
|
|
3576
|
-
`:l.nothing}`}},
|
|
3580
|
+
`:l.nothing}`}},i.DialogContent.styles=[l.css``,c],Lr([d.property({attribute:"data-state",type:String})],i.DialogContent.prototype,"state",2),i.DialogContent=Lr([d.customElement("rtg-dialog-content")],i.DialogContent);var ci=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,pi=(o,e,n,r)=>{for(var t=r>1?void 0:r?ui(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&&ci(e,n,t),t};const hi="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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"),r=n==null?void 0:n.assignedElements();r&&r.length>0&&r[0].addEventListener("click",()=>{const a=this._dialog;a&&(a.dataset.state=hi)})}render(){return l.html`
|
|
3577
3581
|
<div part="dialog-close">
|
|
3578
3582
|
<slot></slot>
|
|
3579
3583
|
</div>
|
|
3580
|
-
`}},
|
|
3584
|
+
`}},i.DialogClose.styles=[l.css``,c],i.DialogClose=pi([d.customElement("rtg-dialog-close")],i.DialogClose);var gi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,vi=(o,e,n,r)=>{for(var t=r>1?void 0:r?mi(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&&gi(e,n,t),t};i.DialogFooter=class extends l.LitElement{render(){return l.html`
|
|
3581
3585
|
<div
|
|
3582
3586
|
part="dialog-footer"
|
|
3583
3587
|
class="${u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",this.className)}"
|
|
3584
3588
|
>
|
|
3585
3589
|
<slot></slot>
|
|
3586
3590
|
</div>
|
|
3587
|
-
`}},
|
|
3591
|
+
`}},i.DialogFooter.styles=[l.css``,c],i.DialogFooter=vi([d.customElement("rtg-dialog-footer")],i.DialogFooter);var fi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,zt=(o,e,n,r)=>{for(var t=r>1?void 0:r?bi(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&&fi(e,n,t),t};i.DialogHeader=class extends l.LitElement{constructor(){super(...arguments),this._title="",this.description=""}render(){return l.html`
|
|
3588
3592
|
<div
|
|
3589
3593
|
part="dialog-header"
|
|
3590
3594
|
class="${u("flex flex-col space-y-1.5 text-center sm:text-left",this.className)}"
|
|
@@ -3598,21 +3602,21 @@ body {
|
|
|
3598
3602
|
${this.description}
|
|
3599
3603
|
</p>
|
|
3600
3604
|
</div>
|
|
3601
|
-
`}},
|
|
3605
|
+
`}},i.DialogHeader.styles=[l.css``,c],zt([d.property({attribute:"title",type:String})],i.DialogHeader.prototype,"_title",2),zt([d.property({type:String})],i.DialogHeader.prototype,"description",2),i.DialogHeader=zt([d.customElement("rtg-dialog-header")],i.DialogHeader);var wi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,xi=(o,e,n,r)=>{for(var t=r>1?void 0:r?yi(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&&wi(e,n,t),t};i.DialogOverlay=class extends l.LitElement{render(){return l.html`
|
|
3602
3606
|
<div
|
|
3603
3607
|
part="dialog-overly"
|
|
3604
3608
|
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)}"
|
|
3605
3609
|
></div>
|
|
3606
|
-
`}},
|
|
3610
|
+
`}},i.DialogOverlay.styles=[l.css``,c],i.DialogOverlay=xi([d.customElement("rtg-dialog-overlay")],i.DialogOverlay);var Ci=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,_i=(o,e,n,r)=>{for(var t=r>1?void 0:r?$i(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&&Ci(e,n,t),t};const Oi="open";let Rt=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const o=this._dialog;o&&(o.dataset.state=Oi)}}get _dialog(){let o=this.parentElement;for(;o;){if(o instanceof i.Dialog)return o;o=o.parentElement}return o}firstUpdated(o){var r,t;super.firstUpdated(o);const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
|
3607
3611
|
<div part="dialog-trigger">
|
|
3608
3612
|
<slot></slot>
|
|
3609
3613
|
</div>
|
|
3610
|
-
`}};Rt.styles=[l.css``,c],Rt=
|
|
3614
|
+
`}};Rt.styles=[l.css``,c],Rt=_i([d.customElement("rtg-dialog-trigger")],Rt);var Ei=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Ar=(o,e,n,r)=>{for(var t=r>1?void 0:r?Pi(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&&Ei(e,n,t),t};const Si="open",Di="closed";i.Dialog=class extends l.LitElement{constructor(){super(...arguments),this.state=Di}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.DialogContent)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.state)}render(){return l.html`
|
|
3611
3615
|
<div rtgdlg-root part="dialog">
|
|
3612
|
-
${this.state===
|
|
3616
|
+
${this.state===Si?l.html` <rtg-dialog-overlay></rtg-dialog-overlay>`:l.nothing}
|
|
3613
3617
|
<slot></slot>
|
|
3614
3618
|
</div>
|
|
3615
|
-
`}},
|
|
3619
|
+
`}},i.Dialog.styles=[l.css``,c],Ar([d.property({attribute:"data-state",type:String})],i.Dialog.prototype,"state",2),i.Dialog=Ar([d.customElement("rtg-dialog")],i.Dialog);var Mi=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,Bt=(o,e,n,r)=>{for(var t=r>1?void 0:r?ki(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&&Mi(e,n,t),t};i.DropdownMenuContent=class extends l.LitElement{constructor(){super(...arguments),this.state=He,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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-dropdown-menu-content"),r=(s=this.shadowRoot)==null?void 0:s.querySelector("button");n&&!n.contains(e.target)&&!(r!=null&&r.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
3616
3620
|
<div
|
|
3617
3621
|
part="dropdown-menu-content"
|
|
3618
3622
|
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"
|
|
@@ -3620,7 +3624,7 @@ body {
|
|
|
3620
3624
|
>
|
|
3621
3625
|
<slot></slot>
|
|
3622
3626
|
</div>
|
|
3623
|
-
`}},
|
|
3627
|
+
`}},i.DropdownMenuContent.styles=[l.css``,c],Bt([d.property({attribute:"data-state",type:String})],i.DropdownMenuContent.prototype,"state",2),Bt([d.state()],i.DropdownMenuContent.prototype,"isOpen",2),i.DropdownMenuContent=Bt([d.customElement("rtg-dropdown-menu-content")],i.DropdownMenuContent);var Li=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,Le=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ii(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&&Li(e,n,t),t};i.DropdownMenuItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3624
3628
|
<div
|
|
3625
3629
|
part="dropdown-menu-item"
|
|
3626
3630
|
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)}"
|
|
@@ -3637,7 +3641,7 @@ body {
|
|
|
3637
3641
|
>
|
|
3638
3642
|
<slot></slot>
|
|
3639
3643
|
</div>
|
|
3640
|
-
`}`}},
|
|
3644
|
+
`}`}},i.DropdownMenuItem._counter=0,i.DropdownMenuItem.styles=[l.css``,c],Le([d.property({type:String})],i.DropdownMenuItem.prototype,"_id",2),Le([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuItem.prototype,"_hidden",2),Le([d.property({attribute:"data-value",type:String})],i.DropdownMenuItem.prototype,"value",1),Le([d.property({type:Boolean})],i.DropdownMenuItem.prototype,"selected",2),i.DropdownMenuItem=Le([d.customElement("rtg-dropdown-menu-item")],i.DropdownMenuItem);var Ai=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,oe=(o,e,n,r)=>{for(var t=r>1?void 0:r?zi(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&&Ai(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3641
3645
|
<div
|
|
3642
3646
|
part="dropdown-menu-radio"
|
|
3643
3647
|
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)}"
|
|
@@ -3656,17 +3660,17 @@ body {
|
|
|
3656
3660
|
<span
|
|
3657
3661
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
3658
3662
|
>
|
|
3659
|
-
${this.checked?l.html` ${
|
|
3663
|
+
${this.checked?l.html` ${bt()} `:l.nothing}
|
|
3660
3664
|
</span>
|
|
3661
3665
|
<slot></slot>
|
|
3662
3666
|
</div>
|
|
3663
|
-
`}},
|
|
3667
|
+
`}},i.DropdownMenuRadioItem._counter=0,i.DropdownMenuRadioItem.styles=[l.css`
|
|
3664
3668
|
.icon-space {
|
|
3665
3669
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
3666
3670
|
height: 16px;
|
|
3667
3671
|
display: inline-block;
|
|
3668
3672
|
}
|
|
3669
|
-
`,c],oe([d.property({type:String})],
|
|
3673
|
+
`,c],oe([d.property({type:String})],i.DropdownMenuRadioItem.prototype,"_id",2),oe([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuRadioItem.prototype,"_hidden",2),oe([d.property({attribute:"data-value",type:String})],i.DropdownMenuRadioItem.prototype,"value",1),oe([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"selected",2),oe([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"checked",2),oe([d.property({type:Boolean})],i.DropdownMenuRadioItem.prototype,"disabled",2),i.DropdownMenuRadioItem=oe([d.customElement("rtg-dropdown-menu-radio-item")],i.DropdownMenuRadioItem);var Ri=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,Nt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Bi(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&&Ri(e,n,t),t};i.DropdownMenuSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3670
3674
|
<div
|
|
3671
3675
|
part="dropdown-menu-seperator"
|
|
3672
3676
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -3674,7 +3678,7 @@ body {
|
|
|
3674
3678
|
role="separator"
|
|
3675
3679
|
id="${this.identifier}"
|
|
3676
3680
|
></div>
|
|
3677
|
-
`}`}},
|
|
3681
|
+
`}`}},i.DropdownMenuSeparator._counter=0,i.DropdownMenuSeparator.styles=[l.css``,c],Nt([d.property({type:String})],i.DropdownMenuSeparator.prototype,"_id",2),Nt([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuSeparator.prototype,"_hidden",2),i.DropdownMenuSeparator=Nt([d.customElement("rtg-dropdown-menu-separator")],i.DropdownMenuSeparator);var Ni=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,se=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ti(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&&Ni(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3678
3682
|
<div
|
|
3679
3683
|
part="dropdown-menu-item"
|
|
3680
3684
|
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)}"
|
|
@@ -3708,13 +3712,13 @@ body {
|
|
|
3708
3712
|
</span>
|
|
3709
3713
|
<slot></slot>
|
|
3710
3714
|
</div>
|
|
3711
|
-
`}},
|
|
3715
|
+
`}},i.DropdownMenuCheckboxItem._counter=0,i.DropdownMenuCheckboxItem.styles=[l.css`
|
|
3712
3716
|
.icon-space {
|
|
3713
3717
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
3714
3718
|
height: 16px;
|
|
3715
3719
|
display: inline-block;
|
|
3716
3720
|
}
|
|
3717
|
-
`,c],
|
|
3721
|
+
`,c],se([d.property({type:String})],i.DropdownMenuCheckboxItem.prototype,"_id",2),se([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuCheckboxItem.prototype,"_hidden",2),se([d.property({attribute:"data-value",type:String})],i.DropdownMenuCheckboxItem.prototype,"value",1),se([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"selected",2),se([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"checked",2),se([d.property({type:Boolean})],i.DropdownMenuCheckboxItem.prototype,"disabled",2),i.DropdownMenuCheckboxItem=se([d.customElement("rtg-dropdown-menu-checkbox-item")],i.DropdownMenuCheckboxItem);var qi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Je=(o,e,n,r)=>{for(var t=r>1?void 0:r?Fi(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&&qi(e,n,t),t};i.DropdownMenuGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3718
3722
|
<div
|
|
3719
3723
|
part="dropdown-menu-group"
|
|
3720
3724
|
class="${e}"
|
|
@@ -3737,7 +3741,7 @@ body {
|
|
|
3737
3741
|
<slot></slot>
|
|
3738
3742
|
</div>
|
|
3739
3743
|
</div>
|
|
3740
|
-
`}`}},
|
|
3744
|
+
`}`}},i.DropdownMenuGroup._counter=0,i.DropdownMenuGroup.styles=[l.css``,c],Je([d.property({type:String})],i.DropdownMenuGroup.prototype,"heading",2),Je([d.property({attribute:"id",type:String})],i.DropdownMenuGroup.prototype,"_id",2),Je([d.property({attribute:"aria-hidden",type:String})],i.DropdownMenuGroup.prototype,"_hidden",2),i.DropdownMenuGroup=Je([d.customElement("rtg-dropdown-menu-group")],i.DropdownMenuGroup);var Ui=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,zr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Vi(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&&Ui(e,n,t),t};i.DropdownMenu=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var r;const n=e.target;(r=this.shadowRoot)!=null&&r.contains(n)||(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 r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.DropdownMenuContent)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-dropdown-menu-radio-item").forEach(n=>{n!==e.target&&(n.checked=!1)})}render(){return l.html`
|
|
3741
3745
|
<div part="dropdown-menu">
|
|
3742
3746
|
<div>
|
|
3743
3747
|
<slot @click="${this.toggleDropdown}"></slot>
|
|
@@ -3746,7 +3750,7 @@ body {
|
|
|
3746
3750
|
<slot></slot>
|
|
3747
3751
|
</div>
|
|
3748
3752
|
</div>
|
|
3749
|
-
`}},
|
|
3753
|
+
`}},i.DropdownMenu.styles=[l.css``,c],zr([d.state()],i.DropdownMenu.prototype,"isOpen",2),i.DropdownMenu=zr([d.customElement("rtg-dropdown-menu")],i.DropdownMenu);var Gi=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Qe=(o,e,n,r)=>{for(var t=r>1?void 0:r?Hi(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&&Gi(e,n,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 n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("rtg-hover-card-content");e&&!e.contains(o.target)&&(this.isOpen=!1)}render(){return l.html`
|
|
3750
3754
|
<div
|
|
3751
3755
|
part="hover-card-content"
|
|
3752
3756
|
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)}"
|
|
@@ -3754,7 +3758,7 @@ body {
|
|
|
3754
3758
|
>
|
|
3755
3759
|
<slot></slot>
|
|
3756
3760
|
</div>
|
|
3757
|
-
`}};
|
|
3761
|
+
`}};ie.styles=[l.css``,c],Qe([d.property({type:String})],ie.prototype,"twClass",2),Qe([d.property({attribute:"data-state",type:String})],ie.prototype,"state",2),Qe([d.state()],ie.prototype,"isOpen",2),ie=Qe([d.customElement("rtg-hover-card-content")],ie);var Yi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,Tt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Xi(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&&Yi(e,n,t),t};let Ie=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.isOpen=!1}handleMouseEnter(){this.isOpen=!0}handleMouseLeave(){this.isOpen=!1}get _content(){var n;const o=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),e=o==null?void 0:o.assignedElements();if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof ie)return e[r]}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`
|
|
3758
3762
|
<div part="hover-card" class="${this.twClass}">
|
|
3759
3763
|
<div>
|
|
3760
3764
|
<slot
|
|
@@ -3766,38 +3770,7 @@ body {
|
|
|
3766
3770
|
<slot></slot>
|
|
3767
3771
|
</div>
|
|
3768
3772
|
</div>
|
|
3769
|
-
`}};
|
|
3770
|
-
<input
|
|
3771
|
-
part="input"
|
|
3772
|
-
type="${this.type}"
|
|
3773
|
-
placeholder="${this.placeholder}"
|
|
3774
|
-
?disabled=${this.disabled}
|
|
3775
|
-
.value=${this.type!=="file"?this.value:""}
|
|
3776
|
-
@change="${this.handleInputChange}"
|
|
3777
|
-
${x(e)}
|
|
3778
|
-
class="${u(Ns,this.twClass)}"
|
|
3779
|
-
/>
|
|
3780
|
-
`}},s.Input.styles=[l.css``,c],ae([d.property({type:Boolean})],s.Input.prototype,"disabled",2),ae([d.property({type:String})],s.Input.prototype,"type",2),ae([d.property({type:String})],s.Input.prototype,"placeholder",2),ae([d.property({type:String})],s.Input.prototype,"defaultValue",2),ae([d.property({type:String})],s.Input.prototype,"value",2),ae([d.property({type:String})],s.Input.prototype,"twClass",2),s.Input=ae([d.customElement("rtg-input")],s.Input);const Gs=M("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");var Fs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,Lr=(o,e,r,n)=>{for(var t=n>1?void 0:n?Vs(e,r):e,i=o.length-1,a;i>=0;i--)(a=o[i])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Fs(e,r,t),t};let ye=class extends b{constructor(){super(...arguments),this.for=""}firstUpdated(o){const e=["--label-text-color,--label-padding"];this.applyCustomClass(e,"label","label-base")}_onClick(o){var r;if(o.defaultPrevented)return;const e=(r=this.shadowRoot)==null?void 0:r.getElementById(this.for);e&&e.click()}getAttributesToExclude(){return["for","data-testid"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
3781
|
-
<label
|
|
3782
|
-
${x(o)}
|
|
3783
|
-
part="label"
|
|
3784
|
-
for="${this.for}"
|
|
3785
|
-
@click="${this._onClick}"
|
|
3786
|
-
@keydown="${this._onClick}"
|
|
3787
|
-
class="${u(ye.labelVariants({className:this.className}))}"
|
|
3788
|
-
>
|
|
3789
|
-
<slot></slot>
|
|
3790
|
-
</label>
|
|
3791
|
-
`}};ye.labelVariants=Gs,ye.styles=[l.css`
|
|
3792
|
-
:root {
|
|
3793
|
-
--label-text-color: inherit;
|
|
3794
|
-
--label-padding: inherit;
|
|
3795
|
-
}
|
|
3796
|
-
.label-base {
|
|
3797
|
-
color: var(--label-text-color) !important;
|
|
3798
|
-
padding: var(--label-padding) !important;
|
|
3799
|
-
}
|
|
3800
|
-
`,c],Lr([d.property({type:String})],ye.prototype,"for",2),ye=Lr([d.customElement("rtg-label")],ye);const Us=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"}}),Hs=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 Ys=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,et=(o,e,r,n)=>{for(var t=n>1?void 0:n?Xs(e,r):e,i=o.length-1,a;i>=0;i--)(a=o[i])&&(t=(n?a(e,r,t):a(t))||t);return n&&t&&Ys(e,r,t),t};s.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 s.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?Us({state:"open",side:this.side,styleContent:this.styleContent}):Hs({state:"open",side:this.side});return l.html`
|
|
3773
|
+
`}};Ie.styles=[l.css``,c],Tt([d.property({type:String})],Ie.prototype,"twClass",2),Tt([d.state()],Ie.prototype,"isOpen",2),Ie=Tt([d.customElement("rtg-hover-card")],Ie);const Wi=k("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"}}),Ki=k("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 Zi=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,je=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ji(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&&Zi(e,n,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 n=this._popover;n&&!n.contains(e.target)&&(n.isOpen=!1)}firstUpdated(e){window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var n;(n=this._popover)!=null&&n.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}render(){const e=this.enableDefaultStyle?Wi({state:"open",side:this.side,styleContent:this.styleContent}):Ki({state:"open",side:this.side});return l.html`
|
|
3801
3774
|
<div
|
|
3802
3775
|
@click="${this.preventClickPropagation}"
|
|
3803
3776
|
part="popover-content"
|
|
@@ -3806,11 +3779,11 @@ body {
|
|
|
3806
3779
|
>
|
|
3807
3780
|
<slot></slot>
|
|
3808
3781
|
</div>
|
|
3809
|
-
`}},
|
|
3782
|
+
`}},i.PopoverContent.styles=[l.css``,c],je([d.property({type:Boolean})],i.PopoverContent.prototype,"enableDefaultStyle",2),je([d.property({type:Boolean})],i.PopoverContent.prototype,"styleContent",2),je([d.property({type:String})],i.PopoverContent.prototype,"side",2),i.PopoverContent=je([d.customElement("rtg-popover-content")],i.PopoverContent);var Qi=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,ea=(o,e,n,r)=>{for(var t=r>1?void 0:r?ji(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&&Qi(e,n,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 n=(t=this.shadowRoot)==null?void 0:t.querySelector('slot[name="trigger-button"]'),r=n==null?void 0:n.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(s=this.shadowRoot)==null||s.addEventListener("click",a=>{a.stopPropagation()})}render(){return l.html`
|
|
3810
3783
|
<div part="popover-trigger" style="width: fit-content;">
|
|
3811
3784
|
<slot name="trigger-button"></slot>
|
|
3812
3785
|
</div>
|
|
3813
|
-
`}},
|
|
3786
|
+
`}},i.PopoverTrigger.styles=[l.css``,c],i.PopoverTrigger=ea([d.customElement("rtg-popover-trigger")],i.PopoverTrigger);var ta=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Rr=(o,e,n,r)=>{for(var t=r>1?void 0:r?ra(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&&ta(e,n,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`
|
|
3814
3787
|
<div part="popover" style="position:relative">
|
|
3815
3788
|
<slot
|
|
3816
3789
|
name="trigger"
|
|
@@ -3820,7 +3793,7 @@ body {
|
|
|
3820
3793
|
<slot style="position:absolute" name="content"></slot>
|
|
3821
3794
|
</div>
|
|
3822
3795
|
</div>
|
|
3823
|
-
`}},
|
|
3796
|
+
`}},i.Popover.styles=[l.css``,c],Rr([d.state()],i.Popover.prototype,"isOpen",2),i.Popover=Rr([d.customElement("rtg-popover")],i.Popover);const na="unChecked";var oa=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,ye=(o,e,n,r)=>{for(var t=r>1?void 0:r?sa(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&&oa(e,n,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=na}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l.html`
|
|
3824
3797
|
<div class="${u("flex items-center space-x-2")}" part="radio-group-item">
|
|
3825
3798
|
<button
|
|
3826
3799
|
type="button"
|
|
@@ -3838,7 +3811,7 @@ body {
|
|
|
3838
3811
|
data-state="checked"
|
|
3839
3812
|
class="flex items-center justify-center"
|
|
3840
3813
|
>
|
|
3841
|
-
${
|
|
3814
|
+
${eo()}
|
|
3842
3815
|
</span>`:l.nothing}
|
|
3843
3816
|
</button>
|
|
3844
3817
|
<label
|
|
@@ -3848,7 +3821,7 @@ body {
|
|
|
3848
3821
|
>${this.value}</label
|
|
3849
3822
|
>
|
|
3850
3823
|
</div>
|
|
3851
|
-
`}},
|
|
3824
|
+
`}},i.RadioGroupItem.styles=[l.css``,c],ye([d.property({type:Boolean,reflect:!0})],i.RadioGroupItem.prototype,"checked",2),ye([d.property({type:Number})],i.RadioGroupItem.prototype,"tabindex",2),ye([d.property({type:String})],i.RadioGroupItem.prototype,"value",2),ye([d.property({type:String})],i.RadioGroupItem.prototype,"id",2),ye([d.property({attribute:"data-state",type:String})],i.RadioGroupItem.prototype,"state",2),i.RadioGroupItem=ye([d.customElement("rtg-radio-group-item")],i.RadioGroupItem);var ia=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,Br=(o,e,n,r)=>{for(var t=r>1?void 0:r?aa(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&&ia(e,n,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(n=>{n!==e.target&&(n.checked=!1)})}render(){return l.html`
|
|
3852
3825
|
<div
|
|
3853
3826
|
part="radio-group"
|
|
3854
3827
|
class="${u("grid gap-2",this.twClass)}"
|
|
@@ -3856,7 +3829,7 @@ body {
|
|
|
3856
3829
|
>
|
|
3857
3830
|
<slot></slot>
|
|
3858
3831
|
</div>
|
|
3859
|
-
`}},
|
|
3832
|
+
`}},i.RadioGroup.styles=[l.css``,c],Br([d.property({type:String})],i.RadioGroup.prototype,"twClass",2),i.RadioGroup=Br([d.customElement("rtg-radio-group")],i.RadioGroup);var la=Object.defineProperty,da=Object.getOwnPropertyDescriptor,z=(o,e,n,r)=>{for(var t=r>1?void 0:r?da(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&&la(e,n,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,n)=>{},this.onMouseOver=(e,n)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const n=new CustomEvent("clicked-select-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(n)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}render(){const e=this.getFilteredAttributes();return l.html`
|
|
3860
3833
|
<div
|
|
3861
3834
|
${x(e)}
|
|
3862
3835
|
@click=${this.handleClick}
|
|
@@ -3880,10 +3853,10 @@ body {
|
|
|
3880
3853
|
<span
|
|
3881
3854
|
class="${this.isSelected?"visible":"invisible"} hs-select-selected:block mr-2"
|
|
3882
3855
|
>
|
|
3883
|
-
${
|
|
3856
|
+
${Cr()}
|
|
3884
3857
|
</span>
|
|
3885
3858
|
</div>
|
|
3886
|
-
`}},
|
|
3859
|
+
`}},i.SelectItem.styles=[l.css``,c],z([d.property({type:String})],i.SelectItem.prototype,"value",2),z([d.property({type:String})],i.SelectItem.prototype,"key",2),z([d.property({type:Number})],i.SelectItem.prototype,"tabindex",2),z([d.property({type:Boolean})],i.SelectItem.prototype,"isSelected",2),z([d.property({type:Boolean})],i.SelectItem.prototype,"isFocus",2),z([d.property({type:String})],i.SelectItem.prototype,"class",2),z([d.property({type:Number})],i.SelectItem.prototype,"selectItemIndex",2),z([d.property({type:Function})],i.SelectItem.prototype,"onSelect",2),z([d.property({type:Function})],i.SelectItem.prototype,"onMouseOver",2),i.SelectItem=z([d.customElement("rtg-select-item")],i.SelectItem);var ca=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,qt=(o,e,n,r)=>{for(var t=r>1?void 0:r?ua(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&&ca(e,n,t),t};i.SelectList=class extends l.LitElement{constructor(){super(...arguments),this.state=He,this.isOpen=!1}render(){return l.html`
|
|
3887
3860
|
<div
|
|
3888
3861
|
part="select-list"
|
|
3889
3862
|
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"
|
|
@@ -3893,14 +3866,14 @@ body {
|
|
|
3893
3866
|
>
|
|
3894
3867
|
<slot></slot>
|
|
3895
3868
|
</div>
|
|
3896
|
-
`}},
|
|
3869
|
+
`}},i.SelectList.styles=[l.css``,c],qt([d.property({attribute:"data-state",type:String})],i.SelectList.prototype,"state",2),qt([d.state()],i.SelectList.prototype,"isOpen",2),i.SelectList=qt([d.customElement("rtg-select-list")],i.SelectList);var pa=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,ga=(o,e,n,r)=>{for(var t=r>1?void 0:r?ha(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&&pa(e,n,t),t};i.SelectLabel=class extends l.LitElement{render(){return l.html`
|
|
3897
3870
|
<span
|
|
3898
3871
|
part="select-label"
|
|
3899
3872
|
class="${u("px-4 w-full text-base font-bold",this.className)}"
|
|
3900
3873
|
>
|
|
3901
3874
|
<slot></slot>
|
|
3902
3875
|
</span>
|
|
3903
|
-
`}},
|
|
3876
|
+
`}},i.SelectLabel.styles=[l.css``,c],i.SelectLabel=ga([d.customElement("rtg-select-label")],i.SelectLabel);var ma=Object.defineProperty,va=Object.getOwnPropertyDescriptor,Ft=(o,e,n,r)=>{for(var t=r>1?void 0:r?va(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&&ma(e,n,t),t};i.SelectSeperator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
3904
3877
|
<div
|
|
3905
3878
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
3906
3879
|
part="select-separator"
|
|
@@ -3908,7 +3881,7 @@ body {
|
|
|
3908
3881
|
role="separator"
|
|
3909
3882
|
id="${this.identifier}"
|
|
3910
3883
|
></div>
|
|
3911
|
-
`}`}},
|
|
3884
|
+
`}`}},i.SelectSeperator._counter=0,i.SelectSeperator.styles=[l.css``,c],Ft([d.property({type:String})],i.SelectSeperator.prototype,"_id",2),Ft([d.property({attribute:"aria-hidden",type:String})],i.SelectSeperator.prototype,"_hidden",2),i.SelectSeperator=Ft([d.customElement("rtg-select-separator")],i.SelectSeperator);var fa=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,wa=(o,e,n,r)=>{for(var t=r>1?void 0:r?ba(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&&fa(e,n,t),t};let Ut=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(n=>{var r;n.uuid!==((r=this._select)==null?void 0:r.uuid)&&(n.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 r,t;super.firstUpdated(o);const e=(r=this.shadowRoot)==null?void 0:r.querySelector('slot[name="select-trigger-button"]'),n=e==null?void 0:e.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
|
3912
3885
|
<button
|
|
3913
3886
|
type="button"
|
|
3914
3887
|
part="select-trigger"
|
|
@@ -3920,9 +3893,9 @@ body {
|
|
|
3920
3893
|
@click="${this.handleClick}"
|
|
3921
3894
|
>
|
|
3922
3895
|
<slot></slot>
|
|
3923
|
-
${
|
|
3896
|
+
${$r()}
|
|
3924
3897
|
</button>
|
|
3925
|
-
`}};
|
|
3898
|
+
`}};Ut.styles=[l.css``,c],Ut=wa([d.customElement("rtg-select-trigger")],Ut);var ya=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,Vt=(o,e,n,r)=>{for(var t=r>1?void 0:r?xa(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&&ya(e,n,t),t};let Ae=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 n;return e.value===((n=this._select)==null?void 0:n.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 n=new CustomEvent("clicked-select-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.childrenArray[this.focusedIndex].value}});this.dispatchEvent(n)}break}}handleMouseOver(o,e){o.preventDefault(),this.focusedIndex=e}render(){return l.html`
|
|
3926
3899
|
<div
|
|
3927
3900
|
part="select-group"
|
|
3928
3901
|
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
|
|
@@ -3930,41 +3903,41 @@ body {
|
|
|
3930
3903
|
data-hs-combo-box-output=""
|
|
3931
3904
|
>
|
|
3932
3905
|
<slot name="label"></slot>
|
|
3933
|
-
${this.childrenArray.map((o,e)=>{var
|
|
3934
|
-
@mouseover="${
|
|
3906
|
+
${this.childrenArray.map((o,e)=>{var n;return l.html`<rtg-select-item
|
|
3907
|
+
@mouseover="${r=>this.handleMouseOver(r,e)}"
|
|
3935
3908
|
.onSelect=${this.onSelectedValue}
|
|
3936
3909
|
data-hs-select-value=${o}
|
|
3937
3910
|
tabIndex=${e}
|
|
3938
3911
|
.value=${o.value}
|
|
3939
3912
|
.selectItemIndex="${e}"
|
|
3940
3913
|
.isFocus="${e===this.focusedIndex}"
|
|
3941
|
-
.isSelected="${o.value.toLowerCase()===((
|
|
3914
|
+
.isSelected="${o.value.toLowerCase()===((n=this._select)==null?void 0:n.selectedValue.toLowerCase())}"
|
|
3942
3915
|
>
|
|
3943
3916
|
${o.textContent}
|
|
3944
3917
|
</rtg-select-item> `})}
|
|
3945
3918
|
</div>
|
|
3946
|
-
`}};
|
|
3919
|
+
`}};Ae.styles=[l.css``,c],Vt([d.state()],Ae.prototype,"focusedIndex",2),Vt([d.state()],Ae.prototype,"selectedValue",2),Ae=Vt([d.customElement("rtg-select-group")],Ae);var Ca=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Nr=(o,e,n,r)=>{for(var t=r>1?void 0:r?$a(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&&Ca(e,n,t),t};let et=class extends l.LitElement{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{if(this._select){[...document.getElementsByTagName("rtg-select")].map(n=>{var r;n.uuid!==((r=this._select)==null?void 0:r.uuid)&&(n.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 r,t;super.firstUpdated(o);const e=(r=this.shadowRoot)==null?void 0:r.querySelector('slot[name="select-trigger-button"]'),n=e==null?void 0:e.assignedElements({flatten:!0});n&&n.length>0&&(n[0].click=this.handleClick),(t=this.shadowRoot)==null||t.addEventListener("click",s=>{s.stopPropagation()})}render(){return l.html`
|
|
3947
3920
|
<span
|
|
3948
3921
|
part="select-value"
|
|
3949
3922
|
class="flex line-clamp-1 w-[180px]"
|
|
3950
3923
|
@click=${this.handleClick}
|
|
3951
3924
|
>${this.renderLabel()}</span
|
|
3952
3925
|
>
|
|
3953
|
-
`}};
|
|
3926
|
+
`}};et.styles=[l.css``,c],Nr([d.property({type:String})],et.prototype,"placeholder",2),et=Nr([d.customElement("rtg-select-value")],et);var _a=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,tt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Oa(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&&_a(e,n,t),t};i.Select=class extends l.LitElement{constructor(){super(...arguments),this.isOpen=!1,this.selectedValue="",this.uuid=fr(),this.handleClickOutside=e=>{var t,s;const n=(t=this.shadowRoot)==null?void 0:t.querySelector("[data-select-uuid]"),r=e.target;if(!r.tagName.includes("RTG-SELECT")){if(!n||!n.contains(r))this.isOpen=!1;else if(!((s=r.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`
|
|
3954
3927
|
<div part="select" class="relative" data-select-uuid=${this.uuid}>
|
|
3955
3928
|
<slot name="trigger"></slot>
|
|
3956
3929
|
<div ?hidden="${!this.isOpen}">
|
|
3957
3930
|
<slot name="content"></slot>
|
|
3958
3931
|
</div>
|
|
3959
3932
|
</div>
|
|
3960
|
-
`}},
|
|
3933
|
+
`}},i.Select.styles=[l.css``,c],tt([d.state()],i.Select.prototype,"isOpen",2),tt([d.state()],i.Select.prototype,"selectedValue",2),tt([d.state()],i.Select.prototype,"uuid",2),i.Select=tt([d.customElement("rtg-select")],i.Select);var rt=(o=>(o.VERTICAL="vertical",o.HORIZONTAL="horizontal",o))(rt||{}),Ea=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,Gt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Pa(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&&Ea(e,n,t),t};i.Separator=class extends f{constructor(){super(...arguments),this.orientation=rt.HORIZONTAL,this.twClass=""}getAttributesToExclude(){return["variant"]}render(){const e=this.getFilteredAttributes();return l.html` <div
|
|
3961
3934
|
part="separator"
|
|
3962
3935
|
${x(e)}
|
|
3963
|
-
class=${u(this.orientation===
|
|
3936
|
+
class=${u(this.orientation===rt.HORIZONTAL?"shrink-0 bg-border w-full h-[1px] my-4":"shrink-0 bg-border h-full w-[1px]",this.twClass)}
|
|
3964
3937
|
role="none"
|
|
3965
3938
|
>
|
|
3966
|
-
${this.orientation!==
|
|
3967
|
-
</div>`}},
|
|
3939
|
+
${this.orientation!==rt.HORIZONTAL&&" "}
|
|
3940
|
+
</div>`}},i.Separator.styles=[l.css``,c],Gt([d.property({type:String})],i.Separator.prototype,"orientation",2),Gt([d.property({type:String})],i.Separator.prototype,"twClass",2),i.Separator=Gt([d.customElement("rtg-separator")],i.Separator);var Sa=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,nt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Da(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&&Sa(e,n,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`
|
|
3968
3941
|
<div class="${u("flex items-center space-x-2",this.twClass)}">
|
|
3969
3942
|
<div
|
|
3970
3943
|
part="switch"
|
|
@@ -3985,11 +3958,11 @@ body {
|
|
|
3985
3958
|
</div>
|
|
3986
3959
|
<slot></slot>
|
|
3987
3960
|
</div>
|
|
3988
|
-
`}},
|
|
3961
|
+
`}},i.Switch.styles=[l.css``,c],nt([d.property({type:Boolean,reflect:!0})],i.Switch.prototype,"checked",2),nt([d.property({type:Boolean})],i.Switch.prototype,"disabled",2),nt([d.property({type:String})],i.Switch.prototype,"twClass",2),i.Switch=nt([d.customElement("rtg-switch")],i.Switch);const Ma="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 ka=Object.defineProperty,La=Object.getOwnPropertyDescriptor,K=(o,e,n,r)=>{for(var t=r>1?void 0:r?La(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&&ka(e,n,t),t};let R=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`
|
|
3989
3962
|
<textarea
|
|
3990
3963
|
part="textarea"
|
|
3991
3964
|
${x(o)}
|
|
3992
|
-
class="${u(
|
|
3965
|
+
class="${u(Ma,this.className,this.twCLass)}"
|
|
3993
3966
|
placeholder="${this.placeholder}"
|
|
3994
3967
|
.value=${this.value}
|
|
3995
3968
|
.rows="${this.rows}"
|
|
@@ -3997,12 +3970,12 @@ body {
|
|
|
3997
3970
|
?disabled=${this.disabled}
|
|
3998
3971
|
@change="${this.handleInputChange}"
|
|
3999
3972
|
/>
|
|
4000
|
-
`}};
|
|
3973
|
+
`}};R.styles=[c],K([d.property({type:Boolean})],R.prototype,"disabled",2),K([d.property({type:String})],R.prototype,"placeholder",2),K([d.property({type:String})],R.prototype,"defaultValue",2),K([d.property({type:String})],R.prototype,"rows",2),K([d.property({type:String})],R.prototype,"cols",2),K([d.property({type:String})],R.prototype,"value",2),K([d.property({type:String})],R.prototype,"twCLass",2),R=K([d.customElement("rtg-textarea")],R);const Ia=k("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"}}),Aa="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]",za="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 Ra=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,Ht=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ba(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&&Ra(e,n,t),t};const Tr="closed";let Z=class extends l.LitElement{constructor(){super(...arguments),this.variant="default",this.state=Tr,this.handleCloseButtonClick=o=>{o.stopPropagation(),this.state=Tr,this.dispatchEvent(new CustomEvent("close-toast",{bubbles:!0,composed:!0}))}}render(){return l.html`
|
|
4001
3974
|
${this.state==="open"?l.html`<ol
|
|
4002
3975
|
part="toast-view-port"
|
|
4003
3976
|
tabindex="-1"
|
|
4004
3977
|
@click="${o=>o.stopPropagation()}"
|
|
4005
|
-
class="${u(
|
|
3978
|
+
class="${u(Aa,this.className)}"
|
|
4006
3979
|
>
|
|
4007
3980
|
<li
|
|
4008
3981
|
role="status"
|
|
@@ -4018,20 +3991,20 @@ body {
|
|
|
4018
3991
|
<slot></slot>
|
|
4019
3992
|
<button
|
|
4020
3993
|
type="button"
|
|
4021
|
-
class="${
|
|
3994
|
+
class="${za}"
|
|
4022
3995
|
toast-close=""
|
|
4023
3996
|
data-radix-toast-announce-exclude=""
|
|
4024
3997
|
@click="${o=>this.handleCloseButtonClick(o)}"
|
|
4025
3998
|
>
|
|
4026
|
-
${
|
|
3999
|
+
${to()}
|
|
4027
4000
|
</button>
|
|
4028
4001
|
</li>
|
|
4029
4002
|
</ol>`:l.nothing}
|
|
4030
|
-
`}};Z.toastVariants=
|
|
4003
|
+
`}};Z.toastVariants=Ia,Z.styles=[l.css`
|
|
4031
4004
|
button[toast-close] {
|
|
4032
4005
|
pointer-events: auto;
|
|
4033
4006
|
}
|
|
4034
|
-
`,c],
|
|
4007
|
+
`,c],Ht([d.property({type:String})],Z.prototype,"variant",2),Ht([d.property({attribute:"data-state",type:String})],Z.prototype,"state",2),Z=Ht([d.customElement("rtg-toast-view-port")],Z);var Na=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,Yt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ta(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&&Na(e,n,t),t};let ze=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 n;const o=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),e=o==null?void 0:o.assignedElements();if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof Z)return e[r]}return null}updated(o){super.updated(o);const e=this._content;e&&(e.dataset.state=this.isOpen?"open":"closed")}render(){return l.html`
|
|
4035
4008
|
<div class="{${this.twClass}}" part="toast">
|
|
4036
4009
|
<div>
|
|
4037
4010
|
<slot @click="${this.onClick}"></slot>
|
|
@@ -4039,11 +4012,11 @@ body {
|
|
|
4039
4012
|
<slot></slot>
|
|
4040
4013
|
<div></div>
|
|
4041
4014
|
</div>
|
|
4042
|
-
`}};
|
|
4015
|
+
`}};ze.styles=[l.css``,c],Yt([d.property({type:String})],ze.prototype,"twClass",2),Yt([d.state()],ze.prototype,"isOpen",2),ze=Yt([d.customElement("rtg-toast")],ze);var qr=(o=>(o.SMALL="sm",o.MEDIUM="md",o.LARGE="lg",o))(qr||{}),Fr=(o=>(o.DEFAULT="default",o.OUTLINE="outline",o))(Fr||{});const qa=k("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 Fa=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,ae=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ua(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&&Fa(e,n,t),t};i.Toggle=class extends f{constructor(){super(...arguments),this.disabled=!1,this.twCLass="",this.checked=!1,this.required=!1,this.variant=Fr.DEFAULT,this.size=qr.SMALL}getAttributesToExclude(){return["disabled","checked","variant","size","required"]}toggle(){this.disabled||(this.checked=!this.checked)}render(){const e=this.getFilteredAttributes();return L.html`
|
|
4043
4016
|
<button
|
|
4044
4017
|
type="button"
|
|
4045
4018
|
part="toggle"
|
|
4046
|
-
class="${u(
|
|
4019
|
+
class="${u(i.Toggle.toggleVariants({variant:this.variant,size:this.size,className:this.className}))} ${this.twCLass}"
|
|
4047
4020
|
aria-pressed=${this.checked}
|
|
4048
4021
|
data-state="${this.checked?"on":"off"}"
|
|
4049
4022
|
aria-label="Toggle bold"
|
|
@@ -4054,7 +4027,7 @@ body {
|
|
|
4054
4027
|
>
|
|
4055
4028
|
<slot></slot>
|
|
4056
4029
|
</button>
|
|
4057
|
-
`}},
|
|
4030
|
+
`}},i.Toggle.styles=[c],i.Toggle.toggleVariants=qa,ae([d.property({type:Boolean})],i.Toggle.prototype,"disabled",2),ae([d.property({type:String})],i.Toggle.prototype,"twCLass",2),ae([d.property({attribute:!0,type:Boolean,reflect:!0})],i.Toggle.prototype,"checked",2),ae([d.property({attribute:!0,type:Boolean,reflect:!0})],i.Toggle.prototype,"required",2),ae([d.property({attribute:!0,type:String})],i.Toggle.prototype,"variant",2),ae([d.property({attribute:!0,type:String})],i.Toggle.prototype,"size",2),i.Toggle=ae([d.customElement("rtg-toggle")],i.Toggle);const Va=k("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 Ga=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,q=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ha(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&&Ga(e,n,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`
|
|
4058
4031
|
<main>
|
|
4059
4032
|
<rtg-progress .value="${50}"></rtg-progress>
|
|
4060
4033
|
</main>
|
|
@@ -4070,59 +4043,7 @@ body {
|
|
|
4070
4043
|
.selectedEndDate="${this.selectedEndDate}">
|
|
4071
4044
|
</rtg-calendar>
|
|
4072
4045
|
</main>
|
|
4073
|
-
|
|
4074
|
-
<div style="max-width:310px;max-height:310px;margin:auto">
|
|
4075
|
-
<rtg-carousel .items="${o}">
|
|
4076
|
-
${o.map((r,n)=>l.html`
|
|
4077
|
-
<div slot="slide-${n}" class="p-1">
|
|
4078
|
-
<rtg-card>
|
|
4079
|
-
<rtg-card-content
|
|
4080
|
-
class="flex aspect-square items-center justify-center p-6"
|
|
4081
|
-
>
|
|
4082
|
-
<span class="text-4xl font-semibold">${r}</span>
|
|
4083
|
-
</rtg-card-content>
|
|
4084
|
-
</rtg-card>
|
|
4085
|
-
</div>
|
|
4086
|
-
`)}
|
|
4087
|
-
</rtg-carousel>
|
|
4088
|
-
</div>
|
|
4089
|
-
</main>
|
|
4090
|
-
|
|
4091
|
-
<main>
|
|
4092
|
-
<div style="max-width:310px;max-height:310px;margin:auto">
|
|
4093
|
-
<rtg-carousel size .items="${o}">
|
|
4094
|
-
${o.map((r,n)=>l.html`
|
|
4095
|
-
<div slot="slide-${n}" class="p-1">
|
|
4096
|
-
<rtg-card>
|
|
4097
|
-
<rtg-card-content
|
|
4098
|
-
class="flex aspect-square items-center justify-center p-6"
|
|
4099
|
-
>
|
|
4100
|
-
<span class="text-4xl font-semibold">${r}</span>
|
|
4101
|
-
</rtg-card-content>
|
|
4102
|
-
</rtg-card>
|
|
4103
|
-
</div>
|
|
4104
|
-
`)}
|
|
4105
|
-
</rtg-carousel>
|
|
4106
|
-
</div>
|
|
4107
|
-
</main>
|
|
4108
|
-
|
|
4109
|
-
<main>
|
|
4110
|
-
<div style="width:310px;height:310px;margin-top:40px">
|
|
4111
|
-
<rtg-carousel orientation="vertical" .items="${o}">
|
|
4112
|
-
${o.map((r,n)=>l.html`
|
|
4113
|
-
<div slot="slide-${n}" class="p-1">
|
|
4114
|
-
<rtg-card>
|
|
4115
|
-
<rtg-card-content
|
|
4116
|
-
class="flex aspect-square items-center justify-center p-6"
|
|
4117
|
-
>
|
|
4118
|
-
<span class="text-4xl font-semibold">${r}</span>
|
|
4119
|
-
</rtg-card-content>
|
|
4120
|
-
</rtg-card>
|
|
4121
|
-
</div>
|
|
4122
|
-
`)}
|
|
4123
|
-
</rtg-carousel>
|
|
4124
|
-
</div>
|
|
4125
|
-
</main>
|
|
4046
|
+
|
|
4126
4047
|
|
|
4127
4048
|
<main>
|
|
4128
4049
|
<rtg-dropdown-menu class="w-full max-w-md">
|
|
@@ -4521,7 +4442,7 @@ body {
|
|
|
4521
4442
|
</div>
|
|
4522
4443
|
</main>
|
|
4523
4444
|
|
|
4524
|
-
`}};S.buttonVariants=
|
|
4445
|
+
`}};S.buttonVariants=Va,S.styles=[c,l.css`
|
|
4525
4446
|
:host {
|
|
4526
4447
|
--rtg-sample-demo-bg: unset;
|
|
4527
4448
|
--rtg-sample-demo-color: unset;
|
|
@@ -4534,7 +4455,7 @@ body {
|
|
|
4534
4455
|
border-radius: var(--rtg-sample-demo-radius);
|
|
4535
4456
|
height: var(--rtg-sample-demo-height);
|
|
4536
4457
|
}
|
|
4537
|
-
`],q([d.property({type:Function})],S.prototype,"click",2),q([d.property({type:Boolean})],S.prototype,"disabled",2),q([d.property({type:
|
|
4458
|
+
`],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 Ya=Object.defineProperty,Xa=Object.getOwnPropertyDescriptor,xe=(o,e,n,r)=>{for(var t=r>1?void 0:r?Xa(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&&Ya(e,n,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 r;const n=e.target;(r=this.shadowRoot)!=null&&r.contains(n)||(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(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.MenubarContent)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-menubar-radio-item").forEach(n=>{const r=n;n!==e.target&&(r.checked=!1)})}get _slotElements(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot");return(e==null?void 0:e.assignedElements({flatten:!0}))||[]}firstUpdated(){const e=this._slotElements,n=[];for(let r=0;r<e.length-1;r+=2){const t=e[r],s=e[r+1],a=crypto.randomUUID();n.push(a),t.dataset.pairId=a,s.dataset.pairId=a}this.uniqueIds=n,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(n=>{n.isOpen=!1,n.isHovering=!1})}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}render(){return l.html`
|
|
4538
4459
|
<div>
|
|
4539
4460
|
<div
|
|
4540
4461
|
role="menuitem"
|
|
@@ -4555,7 +4476,7 @@ body {
|
|
|
4555
4476
|
<slot></slot>
|
|
4556
4477
|
</div>
|
|
4557
4478
|
</div>
|
|
4558
|
-
`}},
|
|
4479
|
+
`}},i.MenubarMenu.styles=[l.css``,c],xe([d.state()],i.MenubarMenu.prototype,"isOpen",2),xe([d.state()],i.MenubarMenu.prototype,"uniqueIds",2),xe([d.state()],i.MenubarMenu.prototype,"selectedMenu",2),xe([d.state()],i.MenubarMenu.prototype,"isHovering",2),xe([d.property({type:String})],i.MenubarMenu.prototype,"id",2),i.MenubarMenu=xe([d.customElement("rtg-menubar-menu")],i.MenubarMenu);var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,Re=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ka(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&&Wa(e,n,t),t};i.MenubarContent=class extends l.LitElement{constructor(){super(...arguments),this.state=He,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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-menubar-content"),r=(s=this.shadowRoot)==null?void 0:s.querySelector("button");n&&!n.contains(e.target)&&!(r!=null&&r.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
4559
4480
|
<div
|
|
4560
4481
|
part="menubar-content"
|
|
4561
4482
|
id="${this.id}"
|
|
@@ -4573,7 +4494,7 @@ body {
|
|
|
4573
4494
|
>
|
|
4574
4495
|
<slot></slot>
|
|
4575
4496
|
</div>
|
|
4576
|
-
`}},
|
|
4497
|
+
`}},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 Za=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ot=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ja(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&&Za(e,n,t),t};i.MenubarGroup=class extends l.LitElement{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
4577
4498
|
<div
|
|
4578
4499
|
part="menubar-group"
|
|
4579
4500
|
class="${e}"
|
|
@@ -4596,7 +4517,7 @@ body {
|
|
|
4596
4517
|
<slot></slot>
|
|
4597
4518
|
</div>
|
|
4598
4519
|
</div>
|
|
4599
|
-
`}`}},
|
|
4520
|
+
`}`}},i.MenubarGroup._counter=0,i.MenubarGroup.styles=[l.css``,c],ot([d.property({type:String})],i.MenubarGroup.prototype,"heading",2),ot([d.property({attribute:"id",type:String})],i.MenubarGroup.prototype,"_id",2),ot([d.property({attribute:"aria-hidden",type:String})],i.MenubarGroup.prototype,"_hidden",2),i.MenubarGroup=ot([d.customElement("rtg-menubar-group")],i.MenubarGroup);var Qa=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,Be=(o,e,n,r)=>{for(var t=r>1?void 0:r?ja(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&&Qa(e,n,t),t};i.MenubarItem=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
4600
4521
|
<div
|
|
4601
4522
|
part="menubar-item"
|
|
4602
4523
|
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)}"
|
|
@@ -4613,7 +4534,7 @@ body {
|
|
|
4613
4534
|
>
|
|
4614
4535
|
<slot></slot>
|
|
4615
4536
|
</div>
|
|
4616
|
-
`}`}},
|
|
4537
|
+
`}`}},i.MenubarItem._counter=0,i.MenubarItem.styles=[l.css``,c],Be([d.property({type:String})],i.MenubarItem.prototype,"_id",2),Be([d.property({attribute:"aria-hidden",type:String})],i.MenubarItem.prototype,"_hidden",2),Be([d.property({attribute:"data-value",type:String})],i.MenubarItem.prototype,"value",1),Be([d.property({type:Boolean})],i.MenubarItem.prototype,"selected",2),i.MenubarItem=Be([d.customElement("rtg-menubar-item")],i.MenubarItem);var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,le=(o,e,n,r)=>{for(var t=r>1?void 0:r?tl(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&&el(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
4617
4538
|
<div
|
|
4618
4539
|
part="menubar-radio-item"
|
|
4619
4540
|
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)}"
|
|
@@ -4632,17 +4553,17 @@ body {
|
|
|
4632
4553
|
<span
|
|
4633
4554
|
class="icon-space absolute left-2 flex items-center justify-center"
|
|
4634
4555
|
>
|
|
4635
|
-
${this.checked?l.html` ${
|
|
4556
|
+
${this.checked?l.html` ${bt()} `:l.nothing}
|
|
4636
4557
|
</span>
|
|
4637
4558
|
<slot></slot>
|
|
4638
4559
|
</div>
|
|
4639
|
-
`}},
|
|
4560
|
+
`}},i.MenubarRadioItem._counter=0,i.MenubarRadioItem.styles=[l.css`
|
|
4640
4561
|
.icon-space {
|
|
4641
4562
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
4642
4563
|
height: 16px;
|
|
4643
4564
|
display: inline-block;
|
|
4644
4565
|
}
|
|
4645
|
-
`,c],
|
|
4566
|
+
`,c],le([d.property({type:String})],i.MenubarRadioItem.prototype,"_id",2),le([d.property({attribute:"aria-hidden",type:String})],i.MenubarRadioItem.prototype,"_hidden",2),le([d.property({attribute:"data-value",type:String})],i.MenubarRadioItem.prototype,"value",1),le([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"selected",2),le([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"checked",2),le([d.property({type:Boolean})],i.MenubarRadioItem.prototype,"disabled",2),i.MenubarRadioItem=le([d.customElement("rtg-menubar-radio-item")],i.MenubarRadioItem);var rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,de=(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&&rl(e,n,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 n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
4646
4567
|
<div
|
|
4647
4568
|
part="menubar-checkbox-item"
|
|
4648
4569
|
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)}"
|
|
@@ -4676,13 +4597,13 @@ body {
|
|
|
4676
4597
|
</span>
|
|
4677
4598
|
<slot></slot>
|
|
4678
4599
|
</div>
|
|
4679
|
-
`}},
|
|
4600
|
+
`}},i.MenubarCheckboxItem._counter=0,i.MenubarCheckboxItem.styles=[l.css`
|
|
4680
4601
|
.icon-space {
|
|
4681
4602
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
4682
4603
|
height: 16px;
|
|
4683
4604
|
display: inline-block;
|
|
4684
4605
|
}
|
|
4685
|
-
`,c],
|
|
4606
|
+
`,c],de([d.property({type:String})],i.MenubarCheckboxItem.prototype,"_id",2),de([d.property({attribute:"aria-hidden",type:String})],i.MenubarCheckboxItem.prototype,"_hidden",2),de([d.property({attribute:"data-value",type:String})],i.MenubarCheckboxItem.prototype,"value",1),de([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"selected",2),de([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"checked",2),de([d.property({type:Boolean})],i.MenubarCheckboxItem.prototype,"disabled",2),i.MenubarCheckboxItem=de([d.customElement("rtg-menubar-checkbox-item")],i.MenubarCheckboxItem);var ol=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,Xt=(o,e,n,r)=>{for(var t=r>1?void 0:r?sl(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&&ol(e,n,t),t};i.MenubarSeparator=class extends l.LitElement{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){var n,r;if(this._id!=="")return this._id;const e=(r=(n=this.parentElement)==null?void 0:n.shadowRoot)==null?void 0:r.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`
|
|
4686
4607
|
<div
|
|
4687
4608
|
part="menubar-seperator"
|
|
4688
4609
|
class="${u("-mx-1 h-px bg-border",this.className)}"
|
|
@@ -4690,12 +4611,12 @@ body {
|
|
|
4690
4611
|
role="separator"
|
|
4691
4612
|
id="${this.identifier}"
|
|
4692
4613
|
></div>
|
|
4693
|
-
`}`}},
|
|
4614
|
+
`}`}},i.MenubarSeparator._counter=0,i.MenubarSeparator.styles=[l.css``,c],Xt([d.property({type:String})],i.MenubarSeparator.prototype,"_id",2),Xt([d.property({attribute:"aria-hidden",type:String})],i.MenubarSeparator.prototype,"_hidden",2),i.MenubarSeparator=Xt([d.customElement("rtg--menubar-separator")],i.MenubarSeparator);var il=Object.defineProperty,al=Object.getOwnPropertyDescriptor,ll=(o,e,n,r)=>{for(var t=r>1?void 0:r?al(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&&il(e,n,t),t};i.MenubarShortcut=class extends l.LitElement{render(){return l.html`
|
|
4694
4615
|
part="menubar-shortcut"
|
|
4695
4616
|
<span class="${u("ml-auto text-xs font-semibold",this.className)}">
|
|
4696
4617
|
<slot></slot>
|
|
4697
4618
|
</span>
|
|
4698
|
-
`}},
|
|
4619
|
+
`}},i.MenubarShortcut.styles=[l.css``,c],i.MenubarShortcut=ll([d.customElement("rtg-menubar-shortcut")],i.MenubarShortcut);var dl=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,Ur=(o,e,n,r)=>{for(var t=r>1?void 0:r?cl(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&&dl(e,n,t),t};i.Menubar=class extends l.LitElement{constructor(){super(...arguments),this.twCLass=""}render(){return l.html`
|
|
4699
4620
|
<div
|
|
4700
4621
|
part="menubar"
|
|
4701
4622
|
role="menubar"
|
|
@@ -4706,7 +4627,7 @@ body {
|
|
|
4706
4627
|
>
|
|
4707
4628
|
<slot></slot>
|
|
4708
4629
|
</div>
|
|
4709
|
-
`}},
|
|
4630
|
+
`}},i.Menubar.styles=[l.css``,c],Ur([d.property({type:String})],i.Menubar.prototype,"twCLass",2),i.Menubar=Ur([d.customElement("rtg-menubar")],i.Menubar);var ul=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Vr=(o,e,n,r)=>{for(var t=r>1?void 0:r?pl(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&&ul(e,n,t),t};i.NavigationMenuList=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4710
4631
|
<div part="navigation-menu-list" class="${u("relative",this.twClass)}">
|
|
4711
4632
|
<ul
|
|
4712
4633
|
data-orientation="horizontal"
|
|
@@ -4717,7 +4638,7 @@ body {
|
|
|
4717
4638
|
</ul>
|
|
4718
4639
|
<div></div>
|
|
4719
4640
|
</div>
|
|
4720
|
-
`}},
|
|
4641
|
+
`}},i.NavigationMenuList.styles=[l.css``,c],Vr([d.property({type:String})],i.NavigationMenuList.prototype,"twClass",2),i.NavigationMenuList=Vr([d.customElement("rtg-navigation-menu-list")],i.NavigationMenuList);var hl=Object.defineProperty,gl=Object.getOwnPropertyDescriptor,Ce=(o,e,n,r)=>{for(var t=r>1?void 0:r?gl(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&&hl(e,n,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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("rtg-menubar-content"),r=(s=this.shadowRoot)==null?void 0:s.querySelector("button");n&&!n.contains(e.target)&&!(r!=null&&r.contains(e.target))&&(this.isOpen=!1)}render(){return l.html`
|
|
4721
4642
|
<div
|
|
4722
4643
|
part="navigation-menu-content"
|
|
4723
4644
|
class="${u("absolute top-full flex justify-center",this.twClass)}"
|
|
@@ -4741,7 +4662,7 @@ body {
|
|
|
4741
4662
|
</div>
|
|
4742
4663
|
</div>
|
|
4743
4664
|
</div>
|
|
4744
|
-
`}},
|
|
4665
|
+
`}},i.NavigationMenuContent.styles=[l.css``,c],Ce([d.property({type:String})],i.NavigationMenuContent.prototype,"twClass",2),Ce([d.property({attribute:"data-state",type:String})],i.NavigationMenuContent.prototype,"state",2),Ce([d.property({type:String})],i.NavigationMenuContent.prototype,"id",2),Ce([d.property({type:String})],i.NavigationMenuContent.prototype,"side",2),Ce([d.state()],i.NavigationMenuContent.prototype,"isOpen",2),i.NavigationMenuContent=Ce([d.customElement("rtg-navigation-menu-content")],i.NavigationMenuContent);var ml=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,ce=(o,e,n,r)=>{for(var t=r>1?void 0:r?vl(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&&ml(e,n,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 r;const n=e.target;(r=this.shadowRoot)!=null&&r.contains(n)||(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 n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot");return(e==null?void 0:e.assignedElements({flatten:!0}))||[]}firstUpdated(){const e=this._slotElements,n=[];for(let r=0;r<e.length-1;r+=2){const t=e[r],s=e[r+1],a=crypto.randomUUID();n.push(a),t.dataset.pairId=a,s.dataset.pairId=a}this.uniqueIds=n,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}closeAllMenus(){document.querySelectorAll("rtg-navigation-menu-item").forEach(n=>{n.isOpen=!1,n.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("rtg-navigation-menu-item").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.NavigationMenuContent)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.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`
|
|
4745
4666
|
<li part="navigation-menu-item" class="${u("relative",this.twClass)}">
|
|
4746
4667
|
<div
|
|
4747
4668
|
class="flex"
|
|
@@ -4774,7 +4695,7 @@ body {
|
|
|
4774
4695
|
<slot></slot>
|
|
4775
4696
|
</div>
|
|
4776
4697
|
</li>
|
|
4777
|
-
`}},
|
|
4698
|
+
`}},i.NavigationMenuItem.styles=[l.css``,c],ce([d.property({type:String})],i.NavigationMenuItem.prototype,"twClass",2),ce([d.property({type:String})],i.NavigationMenuItem.prototype,"value",2),ce([d.property({type:Boolean})],i.NavigationMenuItem.prototype,"navigationLink",2),ce([d.state()],i.NavigationMenuItem.prototype,"isOpen",2),ce([d.state()],i.NavigationMenuItem.prototype,"uniqueIds",2),ce([d.state()],i.NavigationMenuItem.prototype,"isHovering",2),i.NavigationMenuItem=ce([d.customElement("rtg-navigation-menu-item")],i.NavigationMenuItem);var fl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,Wt=(o,e,n,r)=>{for(var t=r>1?void 0:r?bl(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&&fl(e,n,t),t};i.NavigationMenuLink=class extends l.LitElement{constructor(){super(...arguments),this.href="/",this.twCLass=""}render(){return l.html`
|
|
4778
4699
|
<a
|
|
4779
4700
|
part="navigation-menu-link"
|
|
4780
4701
|
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)}"
|
|
@@ -4785,11 +4706,11 @@ body {
|
|
|
4785
4706
|
>
|
|
4786
4707
|
<slot></slot>
|
|
4787
4708
|
</a>
|
|
4788
|
-
`}},
|
|
4709
|
+
`}},i.NavigationMenuLink.styles=[l.css`
|
|
4789
4710
|
a:hover {
|
|
4790
4711
|
background-color: #f2f2f2;
|
|
4791
4712
|
}
|
|
4792
|
-
`,c],Wt([d.property({type:String})],
|
|
4713
|
+
`,c],Wt([d.property({type:String})],i.NavigationMenuLink.prototype,"href",2),Wt([d.property({type:String})],i.NavigationMenuLink.prototype,"twCLass",2),i.NavigationMenuLink=Wt([d.customElement("rtg-navigation-menu-link")],i.NavigationMenuLink);var wl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,Gr=(o,e,n,r)=>{for(var t=r>1?void 0:r?yl(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&&wl(e,n,t),t};i.NavigationMenu=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4793
4714
|
<nav
|
|
4794
4715
|
part="navigation-menu"
|
|
4795
4716
|
aria-label="Main"
|
|
@@ -4799,29 +4720,29 @@ body {
|
|
|
4799
4720
|
>
|
|
4800
4721
|
<slot></slot>
|
|
4801
4722
|
</nav>
|
|
4802
|
-
`}},
|
|
4723
|
+
`}},i.NavigationMenu.styles=[l.css``,c],Gr([d.property({type:String})],i.NavigationMenu.prototype,"twClass",2),i.NavigationMenu=Gr([d.customElement("rtg-navigation-menu")],i.NavigationMenu);var xl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Hr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Cl(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&&xl(e,n,t),t};i.PaginationContent=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4803
4724
|
<ul
|
|
4804
4725
|
part="pagination-content"
|
|
4805
4726
|
class="${u("flex flex-row items-center gap-1",this.twClass)}"
|
|
4806
4727
|
>
|
|
4807
4728
|
<slot></slot>
|
|
4808
4729
|
</ul>
|
|
4809
|
-
`}},
|
|
4730
|
+
`}},i.PaginationContent.styles=[l.css``,c],Hr([d.property({type:String})],i.PaginationContent.prototype,"twClass",2),i.PaginationContent=Hr([d.customElement("rtg-pagination-content")],i.PaginationContent);const $l=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:{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 _l=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,ue=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ol(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&&_l(e,n,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`
|
|
4810
4731
|
<a
|
|
4811
4732
|
part="pagination-link"
|
|
4812
4733
|
data-state="${this.isActive}"
|
|
4813
4734
|
id="${this.id}"
|
|
4814
4735
|
href="${this.href}"
|
|
4815
4736
|
aria-current="${this.isActive?"page":void 0}"
|
|
4816
|
-
class="${u(
|
|
4737
|
+
class="${u(i.PaginationLink.paginationVariants({variant:this.isActive?"outline":"ghost",size:this.size,className:this.className}),this.twClass)}"
|
|
4817
4738
|
>
|
|
4818
4739
|
<slot></slot>
|
|
4819
4740
|
</a>
|
|
4820
|
-
`}},
|
|
4741
|
+
`}},i.PaginationLink.styles=[l.css``,c],i.PaginationLink.paginationVariants=$l,ue([d.property({attribute:"data-state",type:String})],i.PaginationLink.prototype,"state",2),ue([d.property({type:String})],i.PaginationLink.prototype,"twClass",2),ue([d.property({type:Boolean})],i.PaginationLink.prototype,"isActive",2),ue([d.property({type:String})],i.PaginationLink.prototype,"size",2),ue([d.property({type:String})],i.PaginationLink.prototype,"variant",2),ue([d.property({type:String})],i.PaginationLink.prototype,"href",2),i.PaginationLink=ue([d.customElement("rtg-pagination-link")],i.PaginationLink);var El=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,st=(o,e,n,r)=>{for(var t=r>1?void 0:r?Pl(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&&El(e,n,t),t};i.PaginationItem=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.uniqueIds=[],this.isActive=!1}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.PaginationLink)return n[t]}return null}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(r=>{r!==this&&(r.isActive=!1)}),this.isActive=!this.isActive}get _slotElements(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot");return(e==null?void 0:e.assignedElements({flatten:!0}))||[]}firstUpdated(){const e=this._slotElements,n=[];for(let r=0;r<e.length-1;r+=1){const t=e[r],s=crypto.randomUUID();n.push(s),t.dataset.pairId=s}this.uniqueIds=n,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`
|
|
4821
4742
|
<li part="pagination-item" class="${u("",this.twClass)}">
|
|
4822
4743
|
<slot @click="${this.handleClick}"></slot>
|
|
4823
4744
|
</li>
|
|
4824
|
-
`}},
|
|
4745
|
+
`}},i.PaginationItem.styles=[l.css``,c],st([d.property({type:String})],i.PaginationItem.prototype,"twClass",2),st([d.state()],i.PaginationItem.prototype,"uniqueIds",2),st([d.property({type:Boolean})],i.PaginationItem.prototype,"isActive",2),i.PaginationItem=st([d.customElement("rtg-pagination-item")],i.PaginationItem);var Sl=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,Yr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Dl(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&&Sl(e,n,t),t};i.PaginationEllipsis=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4825
4746
|
<span
|
|
4826
4747
|
part="pagination-ellipsis"
|
|
4827
4748
|
class="${u("flex h-9 w-9 items-center justify-center",this.twClass)}"
|
|
@@ -4846,7 +4767,7 @@ body {
|
|
|
4846
4767
|
</span>
|
|
4847
4768
|
<slot></slot>
|
|
4848
4769
|
</span>
|
|
4849
|
-
`}},
|
|
4770
|
+
`}},i.PaginationEllipsis.styles=[l.css``,c],Yr([d.property({type:String})],i.PaginationEllipsis.prototype,"twClass",2),i.PaginationEllipsis=Yr([d.customElement("rtg-pagination-ellipsis")],i.PaginationEllipsis);var Ml=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Xr=(o,e,n,r)=>{for(var t=r>1?void 0:r?kl(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&&Ml(e,n,t),t};i.PaginationNext=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4850
4771
|
<rtg-pagination-link
|
|
4851
4772
|
class="${u("gap-1 pl-2.5",this.twClass)}"
|
|
4852
4773
|
aria-label="Go to next page"
|
|
@@ -4869,7 +4790,7 @@ body {
|
|
|
4869
4790
|
</svg>
|
|
4870
4791
|
<slot></slot>
|
|
4871
4792
|
</rtg-pagination-link>
|
|
4872
|
-
`}},
|
|
4793
|
+
`}},i.PaginationNext.styles=[l.css``,c],Xr([d.property({type:String})],i.PaginationNext.prototype,"twClass",2),i.PaginationNext=Xr([d.customElement("rtg-pagination-next")],i.PaginationNext);var Ll=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Wr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Il(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&&Ll(e,n,t),t};i.PaginationPrevious=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4873
4794
|
<rtg-pagination-link
|
|
4874
4795
|
class="${u("gap-1 pl-2.5",this.twClass)}"
|
|
4875
4796
|
aria-label="Go to previous page"
|
|
@@ -4891,7 +4812,7 @@ body {
|
|
|
4891
4812
|
><span>Previous</span>
|
|
4892
4813
|
<slot></slot>
|
|
4893
4814
|
</rtg-pagination-link>
|
|
4894
|
-
`}},
|
|
4815
|
+
`}},i.PaginationPrevious.styles=[l.css``,c],Wr([d.property({type:String})],i.PaginationPrevious.prototype,"twClass",2),i.PaginationPrevious=Wr([d.customElement("rtg-pagination-previous")],i.PaginationPrevious);var Al=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Kr=(o,e,n,r)=>{for(var t=r>1?void 0:r?zl(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&&Al(e,n,t),t};i.Pagination=class extends l.LitElement{constructor(){super(...arguments),this.twClass=""}render(){return l.html`
|
|
4895
4816
|
<nav
|
|
4896
4817
|
part="pagination"
|
|
4897
4818
|
role="navigation"
|
|
@@ -4900,13 +4821,13 @@ body {
|
|
|
4900
4821
|
>
|
|
4901
4822
|
<slot></slot>
|
|
4902
4823
|
</nav>
|
|
4903
|
-
`}},
|
|
4824
|
+
`}},i.Pagination.styles=[l.css``,c],Kr([d.property({type:String})],i.Pagination.prototype,"twClass",2),i.Pagination=Kr([d.customElement("rtg-pagination")],i.Pagination);var Rl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,pe=(o,e,n,r)=>{for(var t=r>1?void 0:r?Bl(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&&Rl(e,n,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 n=this.orientation==="vertical"?100/this.items.length:100;this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*n}%)`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",()=>this.updateSlides())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",()=>this.updateSlides())}render(){const e=this.currentIndex===0,n=this.size===!0?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,r=this.currentIndex>=this.items.length-n;return l.html`
|
|
4904
4825
|
<div part="rtg-carousel" class="carousel-wrapper">
|
|
4905
4826
|
<div class="${u("carousel",this.className)} ${this.twCLass}">
|
|
4906
4827
|
<div class="slides">
|
|
4907
|
-
${this.items.map((t,
|
|
4828
|
+
${this.items.map((t,s)=>l.html`
|
|
4908
4829
|
<div class="slide">
|
|
4909
|
-
<slot name="slide-${
|
|
4830
|
+
<slot name="slide-${s}"></slot>
|
|
4910
4831
|
</div>
|
|
4911
4832
|
`)}
|
|
4912
4833
|
</div>
|
|
@@ -4942,7 +4863,7 @@ body {
|
|
|
4942
4863
|
<path d="M19 12H5"></path>
|
|
4943
4864
|
</svg>`}
|
|
4944
4865
|
</button>
|
|
4945
|
-
<button @click="${this.nextSlide}" ?disabled="${
|
|
4866
|
+
<button @click="${this.nextSlide}" ?disabled="${r}">
|
|
4946
4867
|
${this.orientation==="horizontal"?l.html`<svg
|
|
4947
4868
|
xmlns="http://www.w3.org/2000/svg"
|
|
4948
4869
|
width="24"
|
|
@@ -4976,7 +4897,7 @@ body {
|
|
|
4976
4897
|
</div>
|
|
4977
4898
|
</div>
|
|
4978
4899
|
</div>
|
|
4979
|
-
`}},
|
|
4900
|
+
`}},i.Carousel.styles=l.css`
|
|
4980
4901
|
.carousel-wrapper {
|
|
4981
4902
|
position: relative;
|
|
4982
4903
|
width: 100%;
|
|
@@ -5099,7 +5020,7 @@ body {
|
|
|
5099
5020
|
.controls button:disabled {
|
|
5100
5021
|
background: rgba(0, 0, 0, 0.2);
|
|
5101
5022
|
}
|
|
5102
|
-
`,
|
|
5023
|
+
`,pe([d.property({type:Number})],i.Carousel.prototype,"currentIndex",2),pe([d.property({type:Array})],i.Carousel.prototype,"items",2),pe([d.property({type:String})],i.Carousel.prototype,"twCLass",2),pe([d.property({type:String})],i.Carousel.prototype,"orientation",2),pe([d.property({type:Boolean})],i.Carousel.prototype,"size",2),pe([d.query(".slides")],i.Carousel.prototype,"slides",2),i.Carousel=pe([d.customElement("rtg-carousel")],i.Carousel);const Nl=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:{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 Tl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,F=(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.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,n){return new Date(e,n+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,n){if(!n){const r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),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}render(){const e=this.currentDate.getFullYear(),n=this.currentDate.getMonth(),r=this.getDaysInMonth(e,n),t=new Date(e,n,1).getDay(),s=new Date(e,n,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:r},(p,m)=>({day:(m+1).toString(),isInactive:!1,isCurrentMonth:!0}))),l.html`
|
|
5103
5024
|
<div
|
|
5104
5025
|
part="calendar"
|
|
5105
5026
|
class="${u("p-3 rounded-md border shadow bg-popover",this.styleCalendar?"styled-calendar":"",this.className,this.twCLass)}"
|
|
@@ -5132,7 +5053,7 @@ body {
|
|
|
5132
5053
|
</svg>
|
|
5133
5054
|
</button>
|
|
5134
5055
|
<div
|
|
5135
|
-
style="font-
|
|
5056
|
+
style="font-weight:600"
|
|
5136
5057
|
class="text-sm text-accent-foreground"
|
|
5137
5058
|
>
|
|
5138
5059
|
${this.currentDate.toLocaleString("default",{month:"long",year:"numeric"})}
|
|
@@ -5165,9 +5086,8 @@ body {
|
|
|
5165
5086
|
<tr class="flex">
|
|
5166
5087
|
${["Su","Mo","Tu","We","Th","Fr","Sa"].map(p=>l.html`
|
|
5167
5088
|
<th
|
|
5168
|
-
style="font-family:GeistThin"
|
|
5169
5089
|
scope="col"
|
|
5170
|
-
class="text-day text-muted-foreground rounded-md w-8 font-
|
|
5090
|
+
class="text-day text-muted-foreground rounded-md w-8 font-medium"
|
|
5171
5091
|
aria-label="${p}"
|
|
5172
5092
|
>
|
|
5173
5093
|
${p}
|
|
@@ -5184,7 +5104,6 @@ body {
|
|
|
5184
5104
|
role="presentation"
|
|
5185
5105
|
>
|
|
5186
5106
|
<button
|
|
5187
|
-
style="font-family:GeistThin"
|
|
5188
5107
|
name="day"
|
|
5189
5108
|
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")}"
|
|
5190
5109
|
role="gridcell"
|
|
@@ -5204,7 +5123,7 @@ body {
|
|
|
5204
5123
|
</div>
|
|
5205
5124
|
</div>
|
|
5206
5125
|
</div>
|
|
5207
|
-
`}},
|
|
5126
|
+
`}},i.Calendar.styles=[l.css`
|
|
5208
5127
|
:host {
|
|
5209
5128
|
display: inline-block;
|
|
5210
5129
|
|
|
@@ -5251,7 +5170,7 @@ body {
|
|
|
5251
5170
|
.text-day {
|
|
5252
5171
|
font-size: 0.8rem;
|
|
5253
5172
|
}
|
|
5254
|
-
`,c],
|
|
5173
|
+
`,c],i.Calendar.buttonVariants=Nl,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 Fl=Object.defineProperty,Ul=Object.getOwnPropertyDescriptor,Kt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ul(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&&Fl(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`
|
|
5255
5174
|
<div
|
|
5256
5175
|
part="date-picker"
|
|
5257
5176
|
class="${u("",this.className,this.twCLass)}"
|
|
@@ -5283,7 +5202,7 @@ body {
|
|
|
5283
5202
|
<path d="M3 10h18"></path>
|
|
5284
5203
|
</svg>
|
|
5285
5204
|
<span style="margin-left:8px">
|
|
5286
|
-
${this.selectedDate?this.selectedDate.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}).replace(/(\d+)/,(e,
|
|
5205
|
+
${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"}
|
|
5287
5206
|
</span>
|
|
5288
5207
|
</rtg-button>
|
|
5289
5208
|
</rtg-popover-trigger>
|
|
@@ -5299,7 +5218,7 @@ body {
|
|
|
5299
5218
|
</rtg-popover-content>
|
|
5300
5219
|
</rtg-popover>
|
|
5301
5220
|
</div>
|
|
5302
|
-
`}},
|
|
5221
|
+
`}},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 Vl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Zt=(o,e,n,r)=>{for(var t=r>1?void 0:r?Gl(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&&Vl(e,n,t),t};i.Progress=class extends l.LitElement{constructor(){super(...arguments),this.twClass="",this.value=15}render(){return l.html`
|
|
5303
5222
|
<div
|
|
5304
5223
|
part="progress"
|
|
5305
5224
|
aria-valuenow="${this.value}"
|
|
@@ -5318,18 +5237,121 @@ body {
|
|
|
5318
5237
|
style="width: ${this.value}%;"
|
|
5319
5238
|
></div>
|
|
5320
5239
|
</div>
|
|
5321
|
-
`}},
|
|
5240
|
+
`}},i.Progress.styles=[l.css`
|
|
5322
5241
|
.progress-bar__fill {
|
|
5323
5242
|
height: 100%;
|
|
5324
5243
|
transition: width 0.5s ease-in-out;
|
|
5325
5244
|
}
|
|
5326
|
-
`,c],
|
|
5245
|
+
`,c],Zt([d.property({type:String})],i.Progress.prototype,"twClass",2),Zt([d.property({type:Number})],i.Progress.prototype,"value",2),i.Progress=Zt([d.customElement("rtg-progress")],i.Progress);var Hl=Object.defineProperty,Yl=Object.getOwnPropertyDescriptor,Zr=(o,e,n,r)=>{for(var t=r>1?void 0:r?Yl(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&&Hl(e,n,t),t};const Jr="open",Xl="closed";i.DrawerContent=class extends l.LitElement{constructor(){super(...arguments),this.state=Xl}render(){return l.html`${this.state===Jr?l.html`
|
|
5246
|
+
<div
|
|
5247
|
+
part="drawer-content"
|
|
5248
|
+
style="border-top-left-radius: 10px;
|
|
5249
|
+
border-top-right-radius: 10px;
|
|
5250
|
+
position: fixed;
|
|
5251
|
+
width: 100%;
|
|
5252
|
+
left: 0;
|
|
5253
|
+
right: 0;
|
|
5254
|
+
bottom: 0;
|
|
5255
|
+
z-index: 50;
|
|
5256
|
+
margin-top: 6rem;
|
|
5257
|
+
display: flex;
|
|
5258
|
+
height: auto;
|
|
5259
|
+
flex-direction: column;"
|
|
5260
|
+
class="${u("border bg-background",this.state===Jr?"drawer-open":"drawer-closed",this.className)}"
|
|
5261
|
+
rtgdlg-content
|
|
5262
|
+
>
|
|
5263
|
+
|
|
5264
|
+
|
|
5265
|
+
<slot></slot>
|
|
5266
|
+
</div>
|
|
5267
|
+
</div>
|
|
5268
|
+
`:l.nothing}`}},i.DrawerContent.styles=[l.css`
|
|
5269
|
+
@keyframes slideInUp {
|
|
5270
|
+
from {
|
|
5271
|
+
transform: translateY(100%);
|
|
5272
|
+
}
|
|
5273
|
+
to {
|
|
5274
|
+
transform: translateY(0);
|
|
5275
|
+
}
|
|
5276
|
+
}
|
|
5277
|
+
|
|
5278
|
+
@keyframes slideOutDown {
|
|
5279
|
+
from {
|
|
5280
|
+
transform: translateY(0);
|
|
5281
|
+
}
|
|
5282
|
+
to {
|
|
5283
|
+
transform: translateY(100%);
|
|
5284
|
+
}
|
|
5285
|
+
}
|
|
5286
|
+
|
|
5287
|
+
.drawer-animation {
|
|
5288
|
+
touch-action: none;
|
|
5289
|
+
will-change: transform;
|
|
5290
|
+
transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
|
|
5291
|
+
}
|
|
5292
|
+
|
|
5293
|
+
.drawer-open {
|
|
5294
|
+
animation: slideInUp 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards;
|
|
5295
|
+
}
|
|
5296
|
+
|
|
5297
|
+
.drawer-closed {
|
|
5298
|
+
animation: slideOutDown 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards;
|
|
5299
|
+
}
|
|
5300
|
+
`,c],Zr([d.property({attribute:"data-state",type:String})],i.DrawerContent.prototype,"state",2),i.DrawerContent=Zr([d.customElement("rtg-drawer-content")],i.DrawerContent);var Wl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,Zl=(o,e,n,r)=>{for(var t=r>1?void 0:r?Kl(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&&Wl(e,n,t),t};const Jl="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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"),r=n==null?void 0:n.assignedElements();r&&r.length>0&&r[0].addEventListener("click",()=>{const a=this._drawer;a&&(a.dataset.state=Jl)})}render(){return l.html`
|
|
5301
|
+
<div part="drawer-close">
|
|
5302
|
+
<slot></slot>
|
|
5303
|
+
</div>
|
|
5304
|
+
`}},i.DrawerClose.styles=[l.css``,c],i.DrawerClose=Zl([d.customElement("rtg-drawer-close")],i.DrawerClose);var Ql=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,ed=(o,e,n,r)=>{for(var t=r>1?void 0:r?jl(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&&Ql(e,n,t),t};i.DrawerFooter=class extends l.LitElement{render(){return l.html`
|
|
5305
|
+
<div
|
|
5306
|
+
part="drawer-footer"
|
|
5307
|
+
class="${u("mt-auto flex flex-col gap-2 p-4",this.className)}"
|
|
5308
|
+
>
|
|
5309
|
+
<slot></slot>
|
|
5310
|
+
</div>
|
|
5311
|
+
`}},i.DrawerFooter.styles=[l.css``,c],i.DrawerFooter=ed([d.customElement("rtg-drawer-footer")],i.DrawerFooter);var td=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Jt=(o,e,n,r)=>{for(var t=r>1?void 0:r?rd(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&&td(e,n,t),t};i.DrawerHeader=class extends l.LitElement{constructor(){super(...arguments),this._title="",this.description=""}render(){return l.html`
|
|
5312
|
+
<div
|
|
5313
|
+
part="drawer-header"
|
|
5314
|
+
class="${u("grid gap-1.5 p-4 text-center sm:text-left",this.className)}"
|
|
5315
|
+
>
|
|
5316
|
+
<slot></slot>
|
|
5317
|
+
</div>
|
|
5318
|
+
`}},i.DrawerHeader.styles=[l.css``,c],Jt([d.property({attribute:"title",type:String})],i.DrawerHeader.prototype,"_title",2),Jt([d.property({type:String})],i.DrawerHeader.prototype,"description",2),i.DrawerHeader=Jt([d.customElement("rtg-drawer-header")],i.DrawerHeader);var nd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,Qr=(o,e,n,r)=>{for(var t=r>1?void 0:r?od(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&&nd(e,n,t),t};i.DrawerTitle=class extends l.LitElement{constructor(){super(...arguments),this.title=""}render(){return l.html`
|
|
5319
|
+
<h2
|
|
5320
|
+
part="drawer-title"
|
|
5321
|
+
style="margin-left:16px"
|
|
5322
|
+
class="${u("text-lg font-semibold leading-none tracking-tight",this.className)}"
|
|
5323
|
+
>
|
|
5324
|
+
<slot>${this.title}</slot>
|
|
5325
|
+
</h2>
|
|
5326
|
+
`}},i.DrawerTitle.styles=[l.css``,c],Qr([d.property({type:String})],i.DrawerTitle.prototype,"title",2),i.DrawerTitle=Qr([d.customElement("rtg-drawer-title")],i.DrawerTitle);var sd=Object.defineProperty,id=Object.getOwnPropertyDescriptor,ad=(o,e,n,r)=>{for(var t=r>1?void 0:r?id(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&&sd(e,n,t),t};i.DrawerOverlay=class extends l.LitElement{render(){return l.html`
|
|
5327
|
+
<div
|
|
5328
|
+
part="drawer-overly"
|
|
5329
|
+
class="${u("fixed inset-0 z-50 bg-black/80",this.className)}"
|
|
5330
|
+
></div>
|
|
5331
|
+
`}},i.DrawerOverlay.styles=[l.css``,c],i.DrawerOverlay=ad([d.customElement("rtg-drawer-overlay")],i.DrawerOverlay);var ld=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,cd=(o,e,n,r)=>{for(var t=r>1?void 0:r?dd(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&&ld(e,n,t),t};const ud="open";i.DrawerTrigger=class extends l.LitElement{constructor(){super(...arguments),this.handleClick=()=>{const e=this._drawer;e&&(e.dataset.state=ud)}}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 n=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"),r=n==null?void 0:n.assignedElements({flatten:!0});r&&r.length>0&&(r[0].click=this.handleClick),(s=this.shadowRoot)==null||s.addEventListener("click",a=>{a.stopPropagation()})}render(){return l.html`
|
|
5332
|
+
<div part="drawer-trigger">
|
|
5333
|
+
<slot></slot>
|
|
5334
|
+
</div>
|
|
5335
|
+
`}},i.DrawerTrigger.styles=[l.css``,c],i.DrawerTrigger=cd([d.customElement("rtg-drawer-trigger")],i.DrawerTrigger);var pd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,jr=(o,e,n,r)=>{for(var t=r>1?void 0:r?hd(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&&pd(e,n,t),t};i.DrawerDescription=class extends l.LitElement{constructor(){super(...arguments),this.description=""}render(){return l.html`
|
|
5336
|
+
<p
|
|
5337
|
+
part="drawer-description"
|
|
5338
|
+
style="margin-left:16px"
|
|
5339
|
+
class="${u("text-sm text-muted-foreground",this.className)}"
|
|
5340
|
+
>
|
|
5341
|
+
<slot>${this.description}</slot>
|
|
5342
|
+
</p>
|
|
5343
|
+
`}},i.DrawerDescription.styles=[l.css``,c],jr([d.property({type:String})],i.DrawerDescription.prototype,"description",2),i.DrawerDescription=jr([d.customElement("rtg-drawer-description")],i.DrawerDescription);var gd=Object.defineProperty,md=Object.getOwnPropertyDescriptor,en=(o,e,n,r)=>{for(var t=r>1?void 0:r?md(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&&gd(e,n,t),t};const Qt="open",tn="closed";i.Drawer=class extends l.LitElement{constructor(){super(...arguments),this.state=tn,this.handleOutsideClick=e=>{const n=this._content;this.state===Qt&&n&&(n.contains(e.target)||(this.state=tn,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _content(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),n=e==null?void 0:e.assignedElements();if(n){for(let t=0;t<n.length;t++)if(n[t]instanceof i.DrawerContent)return n[t]}return null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);const n=this._content;n&&(n.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===Qt?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}render(){return l.html`
|
|
5344
|
+
<div rtgdlg-root part="drawer">
|
|
5345
|
+
${this.state===Qt?l.html` <rtg-drawer-overlay></rtg-drawer-overlay>`:l.nothing}
|
|
5346
|
+
<slot></slot>
|
|
5347
|
+
</div>
|
|
5348
|
+
`}},i.Drawer.styles=[l.css``,c],en([d.property({attribute:"data-state",type:String})],i.Drawer.prototype,"state",2),i.Drawer=en([d.customElement("rtg-drawer")],i.Drawer);const vd="inline-flex items-center gap-1.5",fd="transition-colors hover:text-foreground",bd="font-normal text-foreground",wd="[&>svg]:size-3.5",yd="flex h-9 w-9 items-center justify-center",xd="flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5";var Cd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,_d=(o,e,n,r)=>{for(var t=r>1?void 0:r?$d(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&&Cd(e,n,t),t};let jt=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5327
5349
|
<span
|
|
5328
5350
|
${x(o)}
|
|
5329
5351
|
id="rtg-bread-crumb-ellipsis"
|
|
5330
5352
|
role="presentation"
|
|
5331
5353
|
aria-hidden="true"
|
|
5332
|
-
class="${u(
|
|
5354
|
+
class="${u(yd,this.className)}"
|
|
5333
5355
|
part="breadcrumb-ellipsis"
|
|
5334
5356
|
>
|
|
5335
5357
|
<svg
|
|
@@ -5345,31 +5367,31 @@ body {
|
|
|
5345
5367
|
/>
|
|
5346
5368
|
</svg>
|
|
5347
5369
|
</span>
|
|
5348
|
-
`}};
|
|
5370
|
+
`}};jt.styles=[l.css``,c],jt=_d([d.customElement("rtg-bread-crumb-ellipsis")],jt);var Od=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,Pd=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ed(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&&Od(e,n,t),t};let er=class extends f{getAttributesToExclude(){return["variant"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5349
5371
|
<li
|
|
5350
5372
|
${x(o)}
|
|
5351
5373
|
id="rtg-bread-crumb-item"
|
|
5352
|
-
class="${u(
|
|
5374
|
+
class="${u(vd,this.className)}"
|
|
5353
5375
|
part="breadcrumb-item"
|
|
5354
5376
|
>
|
|
5355
5377
|
<slot></slot>
|
|
5356
5378
|
</li>
|
|
5357
|
-
`}};
|
|
5379
|
+
`}};er.styles=[l.css``,c],er=Pd([d.customElement("rtg-bread-crumb-item")],er);var Sd=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Md=(o,e,n,r)=>{for(var t=r>1?void 0:r?Dd(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&&Sd(e,n,t),t};let tr=class extends f{getAttributesToExclude(){return["variant"]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5358
5380
|
<ol
|
|
5359
5381
|
${x(o)}
|
|
5360
5382
|
id="rtg-bread-crumb-list"
|
|
5361
|
-
class="${u(
|
|
5383
|
+
class="${u(xd,this.className)}"
|
|
5362
5384
|
part="breadcrumb-list"
|
|
5363
5385
|
>
|
|
5364
5386
|
<slot></slot>
|
|
5365
5387
|
</ol>
|
|
5366
|
-
`}};
|
|
5388
|
+
`}};tr.styles=[l.css``,c],tr=Md([d.customElement("rtg-bread-crumb-list")],tr);var kd=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,Id=(o,e,n,r)=>{for(var t=r>1?void 0:r?Ld(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&&kd(e,n,t),t};let rr=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5367
5389
|
<li
|
|
5368
5390
|
${x(o)}
|
|
5369
5391
|
id="rtg-bread-crumb-separator"
|
|
5370
5392
|
role="presentation"
|
|
5371
5393
|
aria-hidden="true"
|
|
5372
|
-
class="${u(
|
|
5394
|
+
class="${u(wd,this.className)}"
|
|
5373
5395
|
part="breadcrumb-separator"
|
|
5374
5396
|
|
|
5375
5397
|
>
|
|
@@ -5388,7 +5410,7 @@ body {
|
|
|
5388
5410
|
<path d="M22 2 2 22"></path>
|
|
5389
5411
|
</svg>
|
|
5390
5412
|
</div>
|
|
5391
|
-
`}};
|
|
5413
|
+
`}};rr.styles=[l.css``,c],rr=Id([d.customElement("rtg-bread-crumb-separator")],rr);var Ad=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,Rd=(o,e,n,r)=>{for(var t=r>1?void 0:r?zd(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&&Ad(e,n,t),t};let nr=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5392
5414
|
<nav
|
|
5393
5415
|
${x(o)}
|
|
5394
5416
|
part="breadcrumb"
|
|
@@ -5397,28 +5419,28 @@ body {
|
|
|
5397
5419
|
>
|
|
5398
5420
|
<slot></slot>
|
|
5399
5421
|
</nav>
|
|
5400
|
-
`}};
|
|
5422
|
+
`}};nr.styles=[l.css``,c],nr=Rd([d.customElement("rtg-bread-crumb")],nr);var Bd=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,Td=(o,e,n,r)=>{for(var t=r>1?void 0:r?Nd(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&&Bd(e,n,t),t};let or=class extends f{getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5401
5423
|
<span
|
|
5402
5424
|
${x(o)}
|
|
5403
5425
|
id="rtg-bread-crumb-text"
|
|
5404
5426
|
aria-disabled="true"
|
|
5405
5427
|
aria-current="page"
|
|
5406
|
-
class="${u(
|
|
5428
|
+
class="${u(bd,this.className)}"
|
|
5407
5429
|
part="breadcrumb-text"
|
|
5408
5430
|
>
|
|
5409
5431
|
<slot></slot>
|
|
5410
5432
|
</span>
|
|
5411
|
-
`}};
|
|
5433
|
+
`}};or.styles=[l.css``,c],or=Td([d.customElement("rtg-bread-crumb-text")],or);var qd=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,rn=(o,e,n,r)=>{for(var t=r>1?void 0:r?Fd(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&&qd(e,n,t),t};let it=class extends f{constructor(){super(...arguments),this.href="/"}getAttributesToExclude(){return[""]}render(){const o=this.getFilteredAttributes();return l.html`
|
|
5412
5434
|
<a
|
|
5413
5435
|
${x(o)}
|
|
5414
5436
|
id="rtg-bread-crumb-link"
|
|
5415
|
-
class="${u(
|
|
5437
|
+
class="${u(fd,this.className)}"
|
|
5416
5438
|
href="${this.href}"
|
|
5417
5439
|
part="breadcrumb-link"
|
|
5418
5440
|
>
|
|
5419
5441
|
<slot></slot>
|
|
5420
5442
|
</a>
|
|
5421
|
-
`}};
|
|
5443
|
+
`}};it.styles=[l.css``,c],rn([d.property({type:String})],it.prototype,"href",2),it=rn([d.customElement("rtg-bread-crumb-link")],it);var Ud=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,at=(o,e,n,r)=>{for(var t=r>1?void 0:r?Vd(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&&Ud(e,n,t),t};let he=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",n=1/0){const r=new CustomEvent("selected-input",{bubbles:!0,composed:!0,detail:{selectedItems:o,eventType:e,customIndex:n}});this.dispatchEvent(r)}render(){return l.html` <slot part="input-otp" class="flex items-center"></slot> `}};he.styles=[l.css``,c],at([d.property()],he.prototype,"maxLength",2),at([d.property()],he.prototype,"onChange",2),at([d.property()],he.prototype,"pin",2),he=at([d.customElement("rtg-input-otp")],he);var Gd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,nn=(o,e,n,r)=>{for(var t=r>1?void 0:r?Hd(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&&Gd(e,n,t),t};let lt=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,n)=>{e.isFirst=n===0,e.isLast=n===this.childrenArray.length-1}),this.requestUpdate()}render(){return l.html` <slot part="input-otp-group" class="flex"></slot> `}};lt.styles=[l.css``,c],nn([d.property({type:Function})],lt.prototype,"click",2),lt=nn([d.customElement("rtg-input-otp-group")],lt);var Yd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,on=(o,e,n,r)=>{for(var t=r>1?void 0:r?Xd(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&&Yd(e,n,t),t};let dt=class extends l.LitElement{constructor(){super(...arguments),this.index=0}render(){return l.html` <div role="separator">${ro()}</div> `}};dt.styles=[l.css``,c],on([d.property({type:Number})],dt.prototype,"index",2),dt=on([d.customElement("rtg-input-otp-separator")],dt);var Wd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,$e=(o,e,n,r)=>{for(var t=r>1?void 0:r?Kd(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&&Wd(e,n,t),t};let J=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 he);)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",n=>{console.log("event",n.detail);const r=this.shadowRoot.querySelector(`input[name="input-${n.detail.selectedItems}"]`);r&&(r.focus(),n.detail.eventType==="changes"&&(r.value=""))}))}disconnectedCallback(){super.disconnectedCallback(),this._inputOtp&&this._inputOtp.removeEventListener("selected-input",()=>{})}getAttributesToExclude(){return[]}handleFocus(o){const e=o.target,n=this._inputOtp;if(n&&!e.value){let r=n.inputes.reduce((t,s,a)=>s.value!==""?a:t,-1);console.log("inputOtpInstance lastIndex",r),console.log("inputOtpInstance.inputes",n.inputes[r]),r+1===n.maxLength?n.raiseEvent(r,"focus"):n.raiseEvent(++r,"focus")}}handleInputChange(o){const e=o.target;if(new RegExp(/^\d+$/).test(e.value)){const r=this._inputOtp;if(r){let t=r.inputes.findIndex(s=>s.index===this.index);r.inputes[t]={...r.inputes[t],value:e.value,isSelected:!1},r.inputes.length!==t+1&&r.raiseEvent(++t,"changes")}}else e.value=""}handleKeyDown(o){const e=o.target;if(o.key==="Backspace"){console.log("backspace");const n=this._inputOtp;if(n){let r=n.inputes.findIndex(t=>t.index===this.index);n.inputes[r]={...n.inputes[r],value:""},r+1===n.maxLength&&e.value?n.raiseEvent(r,"changes"):n.raiseEvent(--r,"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`
|
|
5422
5444
|
<input
|
|
5423
5445
|
part="input-otp-slot"
|
|
5424
5446
|
autocomplete="one-time-code"
|
|
@@ -5432,6 +5454,49 @@ body {
|
|
|
5432
5454
|
@input=${this.handleInputChange}
|
|
5433
5455
|
@keydown=${this.handleKeyDown}
|
|
5434
5456
|
style="outline: none"
|
|
5435
|
-
class=${Object.entries(o).map(([e,
|
|
5457
|
+
class=${Object.entries(o).map(([e,n])=>n?e:void 0).join(" ")}
|
|
5436
5458
|
/>
|
|
5437
|
-
`}};J.styles=[l.css``,c]
|
|
5459
|
+
`}};J.styles=[l.css``,c],$e([d.property({type:Function})],J.prototype,"click",2),$e([d.property({type:Number})],J.prototype,"index",2),$e([d.property({type:Boolean})],J.prototype,"isFirst",2),$e([d.property({type:Boolean})],J.prototype,"isLast",2),$e([d.property({type:String})],J.prototype,"value",2),J=$e([d.customElement("rtg-input-otp-slot")],J);const Zd="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 Jd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,ge=(o,e,n,r)=>{for(var t=r>1?void 0:r?Qd(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&&Jd(e,n,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 n=["--input-border-radius","--input-padding"];this.applyCustomClass(n,"input","input-base"),this.type!=="file"&&this.defaultValue&&(this.value=this.defaultValue)}handleInputChange(e){const n=e.target;n.type==="file"?this.value=n.files?n.files[0].name:"":this.value=n.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l.html`
|
|
5460
|
+
<input
|
|
5461
|
+
part="input"
|
|
5462
|
+
type="${this.type}"
|
|
5463
|
+
placeholder="${this.placeholder}"
|
|
5464
|
+
?disabled=${this.disabled}
|
|
5465
|
+
.value=${this.type!=="file"?this.value:""}
|
|
5466
|
+
@change="${this.handleInputChange}"
|
|
5467
|
+
${x(e)}
|
|
5468
|
+
class="${u(Zd,this.twClass)}"
|
|
5469
|
+
/>
|
|
5470
|
+
`}},ge([d.property({type:Boolean})],i.RtgInput.prototype,"disabled",2),ge([d.property({type:String})],i.RtgInput.prototype,"type",2),ge([d.property({type:String})],i.RtgInput.prototype,"placeholder",2),ge([d.property({type:String})],i.RtgInput.prototype,"defaultValue",2),ge([d.property({type:String})],i.RtgInput.prototype,"value",2),ge([d.property({type:String})],i.RtgInput.prototype,"twClass",2),i.RtgInput=ge([d.customElement("rtg-input")],i.RtgInput);const jd=k("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");var ec=Object.defineProperty,tc=Object.getOwnPropertyDescriptor,sn=(o,e,n,r)=>{for(var t=r>1?void 0:r?tc(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&&ec(e,n,t),t};i.Label=class extends f{constructor(){super(...arguments),this.for=""}firstUpdated(e){const n=["--label-text-color","--label-padding"];this.applyCustomClass(n,"label","label-base")}getAttributesToExclude(){return["for","data-testid","class"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l.html`
|
|
5471
|
+
<label
|
|
5472
|
+
${x(e)}
|
|
5473
|
+
part="label"
|
|
5474
|
+
for="${this.for}"
|
|
5475
|
+
class="${u(i.Label.labelVariants({className:this.className}),"label-base")}"
|
|
5476
|
+
>
|
|
5477
|
+
<slot></slot>
|
|
5478
|
+
<!-- Render children without comments -->
|
|
5479
|
+
</label>
|
|
5480
|
+
`}},i.Label.labelVariants=jd,i.Label.styles=[l.css`
|
|
5481
|
+
:root {
|
|
5482
|
+
--label-text-color: inherit;
|
|
5483
|
+
--label-padding: inherit;
|
|
5484
|
+
}
|
|
5485
|
+
.label-base {
|
|
5486
|
+
color: var(--label-text-color) !important;
|
|
5487
|
+
padding: var(--label-padding) !important;
|
|
5488
|
+
}
|
|
5489
|
+
`],sn([d.property({type:String})],i.Label.prototype,"for",2),i.Label=sn([d.customElement("rtg-label")],i.Label);var rc=Object.defineProperty,nc=Object.getOwnPropertyDescriptor,an=(o,e,n,r)=>{for(var t=r>1?void 0:r?nc(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&&rc(e,n,t),t};i.LightSampleDemo=class extends f{constructor(){super(),this.inputValue=""}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){return l.html`
|
|
5490
|
+
<shadow-wrapper>
|
|
5491
|
+
<rtg-input
|
|
5492
|
+
data-testid="input-id"
|
|
5493
|
+
data-testchild="children-id"
|
|
5494
|
+
id="test"
|
|
5495
|
+
type="text"
|
|
5496
|
+
placeholder="here..."
|
|
5497
|
+
.value=${this.inputValue}
|
|
5498
|
+
style="min-width:50%"
|
|
5499
|
+
twClass="bg-red-400"
|
|
5500
|
+
></rtg-input>
|
|
5501
|
+
</shadow-wrapper>
|
|
5502
|
+
`}},an([d.state()],i.LightSampleDemo.prototype,"inputValue",2),i.LightSampleDemo=an([d.customElement("light-sample-demo")],i.LightSampleDemo),Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|