@saasbase-io/core-elements 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/renderers/_updated/field/_name-field.d.ts +262 -35
- package/dist/components/renderers/_updated/field/field.stories/name-field.stories.d.ts +9 -6
- package/dist/components/renderers/_updated/field/field.types.d.ts +6 -29
- package/dist/components/renderers/_updated/field/index.d.ts +1 -1
- package/dist/components/renderers/_updated/passkey-button/_passkey-button.d.ts +7 -20
- package/dist/index.js +447 -455
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1432 -1319
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
14
|
*/const ui=globalThis,Dn=e=>e,ms=ui.trustedTypes,Bn=ms?ms.createPolicy("lit-html",{createHTML:e=>e}):void 0,wd="$lit$",Fe=`lit$${Math.random().toFixed(9).slice(2)}$`,_d="?"+Fe,Ac=`<${_d}>`,fr=document,yi=()=>fr.createComment(""),wi=e=>e===null||typeof e!="object"&&typeof e!="function",nn=Array.isArray,Pc=e=>nn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Xs=`[
|
|
15
15
|
\f\r]`,Qr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mn=/-->/g,qn=/>/g,Ve=RegExp(`>|${Xs}(?:([^\\s"'>=/]+)(${Xs}*=${Xs}*(?:[^
|
|
16
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Vn=/'/g,Hn=/"/g,xd=/^(?:script|style|textarea|title)$/i,Sd=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=Sd(1),te=Sd(2),vr=Symbol.for("lit-noChange"),
|
|
16
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Vn=/'/g,Hn=/"/g,xd=/^(?:script|style|textarea|title)$/i,Sd=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=Sd(1),te=Sd(2),vr=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gn=new WeakMap,er=fr.createTreeWalker(fr,129);function $d(e,t){if(!nn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bn!==void 0?Bn.createHTML(t):t}const Fc=(e,t)=>{const r=e.length-1,i=[];let s,o=t===2?"<svg>":t===3?"<math>":"",n=Qr;for(let h=0;h<r;h++){const u=e[h];let g,y,w=-1,E=0;for(;E<u.length&&(n.lastIndex=E,y=n.exec(u),y!==null);)E=n.lastIndex,n===Qr?y[1]==="!--"?n=Mn:y[1]!==void 0?n=qn:y[2]!==void 0?(xd.test(y[2])&&(s=RegExp("</"+y[2],"g")),n=Ve):y[3]!==void 0&&(n=Ve):n===Ve?y[0]===">"?(n=s??Qr,w=-1):y[1]===void 0?w=-2:(w=n.lastIndex-y[2].length,g=y[1],n=y[3]===void 0?Ve:y[3]==='"'?Hn:Vn):n===Hn||n===Vn?n=Ve:n===Mn||n===qn?n=Qr:(n=Ve,s=void 0);const C=n===Ve&&e[h+1].startsWith("/>")?" ":"";o+=n===Qr?u+Ac:w>=0?(i.push(g),u.slice(0,w)+wd+u.slice(w)+Fe+C):u+Fe+(w===-2?h:C)}return[$d(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let Go=class Cd{constructor({strings:t,_$litType$:r},i){let s;this.parts=[];let o=0,n=0;const h=t.length-1,u=this.parts,[g,y]=Fc(t,r);if(this.el=Cd.createElement(g,i),er.currentNode=this.el.content,r===2||r===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(s=er.nextNode())!==null&&u.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(const w of s.getAttributeNames())if(w.endsWith(wd)){const E=y[n++],C=s.getAttribute(w).split(Fe),S=/([.?@])?(.*)/.exec(E);u.push({type:1,index:o,name:S[2],strings:C,ctor:S[1]==="."?Lc:S[1]==="?"?Nc:S[1]==="@"?zc:ws}),s.removeAttribute(w)}else w.startsWith(Fe)&&(u.push({type:6,index:o}),s.removeAttribute(w));if(xd.test(s.tagName)){const w=s.textContent.split(Fe),E=w.length-1;if(E>0){s.textContent=ms?ms.emptyScript:"";for(let C=0;C<E;C++)s.append(w[C],yi()),er.nextNode(),u.push({type:2,index:++o});s.append(w[E],yi())}}}else if(s.nodeType===8)if(s.data===_d)u.push({type:2,index:o});else{let w=-1;for(;(w=s.data.indexOf(Fe,w+1))!==-1;)u.push({type:7,index:o}),w+=Fe.length-1}o++}}static createElement(t,r){const i=fr.createElement("template");return i.innerHTML=t,i}};function Vr(e,t,r=e,i){var n,h;if(t===vr)return t;let s=i!==void 0?(n=r._$Co)==null?void 0:n[i]:r._$Cl;const o=wi(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((h=s==null?void 0:s._$AO)==null||h.call(s,!1),o===void 0?s=void 0:(s=new o(e),s._$AT(e,r,i)),i!==void 0?(r._$Co??(r._$Co=[]))[i]=s:r._$Cl=s),s!==void 0&&(t=Vr(e,s._$AS(e,t.values),s,i)),t}let Tc=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??fr).importNode(r,!0);er.currentNode=s;let o=er.nextNode(),n=0,h=0,u=i[0];for(;u!==void 0;){if(n===u.index){let g;u.type===2?g=new an(o,o.nextSibling,this,t):u.type===1?g=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(g=new jc(o,this,t)),this._$AV.push(g),u=i[++h]}n!==(u==null?void 0:u.index)&&(o=er.nextNode(),n++)}return er.currentNode=fr,s}p(t){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},an=class Ed{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,i,s){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Vr(this,t,r),wi(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==vr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pc(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&wi(this._$AH)?this._$AA.nextSibling.data=t:this.T(fr.createTextNode(t)),this._$AH=t}$(t){var o;const{values:r,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Go.createElement($d(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(r);else{const n=new Tc(s,this),h=n.u(this.options);n.p(r),this.T(h),this._$AH=n}}_$AC(t){let r=Gn.get(t.strings);return r===void 0&&Gn.set(t.strings,r=new Go(t)),r}k(t){nn(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,s=0;for(const o of t)s===r.length?r.push(i=new Ed(this.O(yi()),this.O(yi()),this,this.options)):i=r[s],i._$AI(o),s++;s<r.length&&(this._$AR(i&&i._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,r);t!==this._$AB;){const s=Dn(t).nextSibling;Dn(t).remove(),t=s}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}},ws=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,s,o){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=m}_$AI(t,r=this,i,s){const o=this.strings;let n=!1;if(o===void 0)t=Vr(this,t,r,0),n=!wi(t)||t!==this._$AH&&t!==vr,n&&(this._$AH=t);else{const h=t;let u,g;for(t=o[0],u=0;u<o.length-1;u++)g=Vr(this,h[i+u],r,u),g===vr&&(g=this._$AH[u]),n||(n=!wi(g)||g!==this._$AH[u]),g===m?t=m:t!==m&&(t+=(g??"")+o[u+1]),this._$AH[u]=g}n&&!s&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Lc=class extends ws{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}},Nc=class extends ws{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}},zc=class extends ws{constructor(t,r,i,s,o){super(t,r,i,s,o),this.type=5}_$AI(t,r=this){if((t=Vr(this,t,r,0)??m)===vr)return;const i=this._$AH,s=t===m&&i!==m||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==m&&(i===m||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}},jc=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Vr(this,t)}};const Zs=ui.litHtmlPolyfillSupport;Zs==null||Zs(Go,an),(ui.litHtmlVersions??(ui.litHtmlVersions=[])).push("3.3.2");const Uc=(e,t,r)=>{const i=(r==null?void 0:r.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(r==null?void 0:r.renderBefore)??null;i._$litPart$=s=new an(t.insertBefore(yi(),o),o,void 0,r??{})}return s._$AI(e),s};/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2017 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2017 Google LLC
|
|
55
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
56
|
-
*/let fs=class extends Rd{constructor(t){if(super(t),this.it=
|
|
56
|
+
*/let fs=class extends Rd{constructor(t){if(super(t),this.it=m,t.type!==kd.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===m||t==null)return this._t=void 0,this.it=t;if(t===vr)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};fs.directiveName="unsafeHTML",fs.resultType=1;const ln=_s(fs);/**
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright 2021 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2022 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/function Lt({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new Wn(this,{context:e,callback:s=>{r.set.call(this,s)},subscribe:t})})):r.constructor.addInitializer((s=>{new Wn(s,{context:e,callback:o=>{s[i]=o},subscribe:t})}))}}const Qs=new WeakMap,Zc=_s(class extends Od{render(e){return
|
|
84
|
+
*/function Lt({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new Wn(this,{context:e,callback:s=>{r.set.call(this,s)},subscribe:t})})):r.constructor.addInitializer((s=>{new Wn(s,{context:e,callback:o=>{s[i]=o},subscribe:t})}))}}const Qs=new WeakMap,Zc=_s(class extends Od{render(e){return m}update(e,[t]){var i;const r=t!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),m}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=Qs.get(t);r===void 0&&(r=new WeakMap,Qs.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=Qs.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Jc=Object.create,vs=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,th=Object.getOwnPropertyNames,eh=Object.getPrototypeOf,rh=Object.prototype.hasOwnProperty,Pd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ih=(e,t)=>{let r={};for(var i in e)vs(r,i,{get:e[i],enumerable:!0});return vs(r,Symbol.toStringTag,{value:"Module"}),r},sh=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=th(t),o=0,n=s.length,h;o<n;o++)h=s[o],!rh.call(e,h)&&h!==r&&vs(e,h,{get:(u=>t[u]).bind(null,h),enumerable:!(i=Qc(t,h))||i.enumerable});return e},oh=(e,t,r)=>(r=e==null?{}:Jc(eh(e)),sh(vs(r,"default",{value:e,enumerable:!0}),e));function c(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function l(e,t,r,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var h=e.length-1;h>=0;h--)(n=e[h])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}var _=class extends v{constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.mutationObserver)==null||e.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(e=>{e==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),e==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(e)&&this.removeAttribute(e)})}getFilteredAttributes(){let e={};return Array.from(this.attributes).forEach(t=>{this.getAttributesToExclude().includes(t.name)||(e[t.name]=t.value??"")}),e}isCustomPropertySet(e){let t=getComputedStyle(this).getPropertyValue(e).trim();return t!=="inherit"&&t.length>0}applyCustomClass(e,t,r=""){var s,o;let i="";e.some(n=>this.isCustomPropertySet(n))&&(i=r),i&&((o=(s=this.shadowRoot)==null?void 0:s.querySelector(t))==null||o.classList.add(i))}removeDuplicateContent(){var s;let e=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{var n;return o.nodeType===Node.COMMENT_NODE||o.nodeType===Node.TEXT_NODE&&!((n=o.textContent)!=null&&n.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),t=new Map,r=[],i;for(;i=e.nextNode();){let o;if(i.nodeType===Node.TEXT_NODE){let n=(s=i.textContent)==null?void 0:s.trim();if(!n)continue;o=`text:${n}`}else if(i instanceof HTMLElement){let n=Array.from(i.attributes).map(h=>`${h.name}=${h.value}`).sort().join(":");o=`element:${i.tagName}:${n}`}else continue;if(t.has(o)){let n=t.get(o);n&&n.parentNode&&r.push(n),t.set(o,i)}else t.set(o,i)}r.forEach(o=>{o.parentNode&&(console.log("Removing duplicate:",o),o.parentNode.removeChild(o))})}moveLightDomChildrenInto(e,t){let r;if(t&&t.length>0){r=t.filter(i=>this.contains(i)&&i!==e&&!i.contains(e));for(let i of r){let s=Array.from(e.childNodes).find(o=>{var n;return(n=o.isEqualNode)==null?void 0:n.call(o,i)});s&&e.removeChild(s)}}else r=Array.from(this.childNodes).filter(i=>i!==e&&!e.contains(i)&&!i.contains(e));for(let i of r)e.appendChild(i)}normalizeEnum(e,t,r){if(!e)return r;let i=Object.values(t),s=Object.keys(t);return i.includes(e)?e:s.includes(e)?t[e]:r}observeStyleAndClassSync(e){this.mutationObserver=new MutationObserver(t=>{for(let r of t)if(r.type==="attributes"){if(r.attributeName==="style"){let i=this.getAttribute("style")||"";i&&(this.customStyle=i,this.removeAttribute("style"))}if(r.attributeName==="class"){let i=this.getAttribute("class")||"";i&&(e.className=i,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}};l([a({type:String,reflect:!0}),c("design:type",Object)],_.prototype,"customClass",void 0),l([a({type:String,reflect:!0}),c("design:type",Object)],_.prototype,"customStyle",void 0);function dn(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let r=(e+Math.random()*16)%16|0;return(t=="x"?r:r&3|8).toString(16)})}var Yn=yd`
|
|
85
85
|
@font-face {
|
|
86
86
|
font-family: 'GeistSans';
|
|
87
87
|
|
|
@@ -2950,13 +2950,13 @@ body {
|
|
|
2950
2950
|
.wrapper {
|
|
2951
2951
|
display: block;
|
|
2952
2952
|
}
|
|
2953
|
-
`,qr);customElements.define("shadow-wrapper",nh);function Td(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Td(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ld(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Td(e))&&(i&&(i+=" "),i+=t);return i}var cn="-",ah=e=>{let t=dh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{let o=s.split(cn);return o[0]===""&&o.length!==1&&o.shift(),Nd(o,t)||lh(s)},getConflictingClassGroupIds:(s,o)=>{let n=r[s]||[];return o&&i[s]?[...n,...i[s]]:n}}},Nd=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),s=i?Nd(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let o=e.join(cn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},Xn=/^\[(.+)\]$/,lh=e=>{if(Xn.test(e)){let t=Xn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dh=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return hh(Object.entries(e.classGroups),r).forEach(([s,o])=>{Wo(o,i,s,t)}),i},Wo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){let o=s===""?t:Zn(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ch(s)){Wo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Wo(n,Zn(t,o),r,i)})})},Zn=(e,t)=>{let r=e;return t.split(cn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},ch=e=>e.isThemeGetter,hh=(e,t)=>t?e.map(([r,i])=>[r,i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,n])=>[t+o,n])):s)]):e,uh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},zd="!",ph=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{let u=[],g=0,y=0,w;for(let S=0;S<h.length;S++){let k=h[S];if(g===0){if(k===s&&(i||h.slice(S,S+o)===t)){u.push(h.slice(y,S)),y=S+o;continue}if(k==="/"){w=S;continue}}k==="["?g++:k==="]"&&g--}let E=u.length===0?h:h.substring(y),C=E.startsWith(zd);return{modifiers:u,hasImportantModifier:C,baseClassName:C?E.substring(1):E,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?h=>r({className:h,parseClassName:n}):n},gh=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},mh=e=>({cache:uh(e.cacheSize),parseClassName:ph(e),...ah(e)}),bh=/\s+/,fh=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(bh),h="";for(let u=n.length-1;u>=0;--u){let g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g),S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}let O=gh(y).join(":"),A=w?O+zd:O,F=A+k;if(o.includes(F))continue;o.push(F);let V=s(k,S);for(let M=0;M<V.length;++M){let J=V[M];o.push(A+J)}h=g+(h.length>0?" "+h:h)}return h};function vh(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=jd(t))&&(i&&(i+=" "),i+=r);return i}var jd=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=jd(e[i]))&&(r&&(r+=" "),r+=t);return r};function yh(e,...t){let r,i,s,o=n;function n(u){return r=mh(t.reduce((g,y)=>y(g),e())),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){let g=i(u);if(g)return g;let y=fh(u,r);return s(u,y),y}return function(){return o(vh.apply(null,arguments))}}var Y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ud=/^\[(?:([a-z-]+):)?(.+)\]$/i,wh=/^\d+\/\d+$/,_h=new Set(["px","full","screen"]),xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sh=/\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$/,$h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ch=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>jr(e)||_h.has(e)||wh.test(e),_e=e=>Gr(e,"length",Th),jr=e=>!!e&&!Number.isNaN(Number(e)),to=e=>Gr(e,"number",jr),ti=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&jr(e.slice(0,-1)),z=e=>Ud.test(e),xe=e=>xh.test(e),Rh=new Set(["length","size","percentage"]),Ih=e=>Gr(e,Rh,Dd),Oh=e=>Gr(e,"position",Dd),Ah=new Set(["image","url"]),Ph=e=>Gr(e,Ah,Nh),Fh=e=>Gr(e,"",Lh),ei=()=>!0,Gr=(e,t,r)=>{let i=Ud.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Th=e=>Sh.test(e)&&!$h.test(e),Dd=()=>!1,Lh=e=>Ch.test(e),Nh=e=>Eh.test(e),zh=yh(()=>{let e=Y("colors"),t=Y("spacing"),r=Y("blur"),i=Y("brightness"),s=Y("borderColor"),o=Y("borderRadius"),n=Y("borderSpacing"),h=Y("borderWidth"),u=Y("contrast"),g=Y("grayscale"),y=Y("hueRotate"),w=Y("invert"),E=Y("gap"),C=Y("gradientColorStops"),S=Y("gradientColorStopPositions"),k=Y("inset"),O=Y("margin"),A=Y("opacity"),F=Y("padding"),V=Y("saturate"),M=Y("scale"),J=Y("sepia"),it=Y("skew"),st=Y("space"),U=Y("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",z,t],P=()=>[z,t],Be=()=>["",ge,_e],Nt=()=>["auto",jr,z],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],jt=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",z],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[jr,z];return{cacheSize:500,separator:":",theme:{colors:[ei],spacing:[ge,_e],blur:["none","",xe,z],brightness:ot(),borderColor:[e],borderRadius:["none","","full",xe,z],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[kh,_e],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[xe]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"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:[...pe(),z]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,z]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",ti,z]}],"grid-cols":[{"grid-cols":[ei]}],"col-start-end":[{col:["auto",{span:["full",ti,z]},z]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[ei]}],"row-start-end":[{row:["auto",{span:[ti,z]},z]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...jt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...jt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...jt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[xe]},xe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xe,_e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",to]}],"font-family":[{font:[ei]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",jr,to]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,_e]}],"underline-offset":[{"underline-offset":["auto",ge,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],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",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),Oh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ih]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ph]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[ge,z]}],"outline-w":[{outline:[ge,_e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ge,_e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xe,Fh]}],"shadow-color":[{shadow:[ei]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",xe,z]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ti,z]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],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",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ge,_e,to]}],stroke:[{stroke:[e,"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-s","border-color-e","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 m(...e){return zh(Ld(e))}var jh=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return b}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];s!==t[i]&&(r[i]=s)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},Uh=class extends jh{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.removeEventListener(i,this,s)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.addEventListener(i,this,s)}}},wt=_s(class extends Uh{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];if(s===t[i])continue;let o=i.slice(1);switch(i[0]){case"@":this.eventData[o]=s,this.applyEvent(o,s);break;case".":r[o]=s;break;case"?":s?r.setAttribute(o,""):r.removeAttribute(o);break;default:s==null?r.removeAttribute(i):r.setAttribute(i,String(s));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let s=i.slice(1);if(!e||!(i in e)&&r[s]===t[i])switch(i[0]){case"@":this.groomEvent(s,t[i]);break;case".":r[s]=void 0;break;case"?":r.removeAttribute(s);break;default:r.removeAttribute(i);break}}}}),_i={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},Ko=class extends _{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return d`
|
|
2953
|
+
`,qr);customElements.define("shadow-wrapper",nh);function Td(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Td(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ld(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Td(e))&&(i&&(i+=" "),i+=t);return i}var cn="-",ah=e=>{let t=dh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{let o=s.split(cn);return o[0]===""&&o.length!==1&&o.shift(),Nd(o,t)||lh(s)},getConflictingClassGroupIds:(s,o)=>{let n=r[s]||[];return o&&i[s]?[...n,...i[s]]:n}}},Nd=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),s=i?Nd(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let o=e.join(cn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},Xn=/^\[(.+)\]$/,lh=e=>{if(Xn.test(e)){let t=Xn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dh=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return hh(Object.entries(e.classGroups),r).forEach(([s,o])=>{Wo(o,i,s,t)}),i},Wo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){let o=s===""?t:Zn(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ch(s)){Wo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Wo(n,Zn(t,o),r,i)})})},Zn=(e,t)=>{let r=e;return t.split(cn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},ch=e=>e.isThemeGetter,hh=(e,t)=>t?e.map(([r,i])=>[r,i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,n])=>[t+o,n])):s)]):e,uh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},zd="!",ph=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{let u=[],g=0,y=0,w;for(let S=0;S<h.length;S++){let k=h[S];if(g===0){if(k===s&&(i||h.slice(S,S+o)===t)){u.push(h.slice(y,S)),y=S+o;continue}if(k==="/"){w=S;continue}}k==="["?g++:k==="]"&&g--}let E=u.length===0?h:h.substring(y),C=E.startsWith(zd);return{modifiers:u,hasImportantModifier:C,baseClassName:C?E.substring(1):E,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?h=>r({className:h,parseClassName:n}):n},gh=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},mh=e=>({cache:uh(e.cacheSize),parseClassName:ph(e),...ah(e)}),bh=/\s+/,fh=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(bh),h="";for(let u=n.length-1;u>=0;--u){let g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g),S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}let O=gh(y).join(":"),A=w?O+zd:O,F=A+k;if(o.includes(F))continue;o.push(F);let V=s(k,S);for(let M=0;M<V.length;++M){let J=V[M];o.push(A+J)}h=g+(h.length>0?" "+h:h)}return h};function vh(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=jd(t))&&(i&&(i+=" "),i+=r);return i}var jd=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=jd(e[i]))&&(r&&(r+=" "),r+=t);return r};function yh(e,...t){let r,i,s,o=n;function n(u){return r=mh(t.reduce((g,y)=>y(g),e())),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){let g=i(u);if(g)return g;let y=fh(u,r);return s(u,y),y}return function(){return o(vh.apply(null,arguments))}}var Y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ud=/^\[(?:([a-z-]+):)?(.+)\]$/i,wh=/^\d+\/\d+$/,_h=new Set(["px","full","screen"]),xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sh=/\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$/,$h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ch=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>jr(e)||_h.has(e)||wh.test(e),_e=e=>Gr(e,"length",Th),jr=e=>!!e&&!Number.isNaN(Number(e)),to=e=>Gr(e,"number",jr),ti=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&jr(e.slice(0,-1)),z=e=>Ud.test(e),xe=e=>xh.test(e),Rh=new Set(["length","size","percentage"]),Ih=e=>Gr(e,Rh,Dd),Oh=e=>Gr(e,"position",Dd),Ah=new Set(["image","url"]),Ph=e=>Gr(e,Ah,Nh),Fh=e=>Gr(e,"",Lh),ei=()=>!0,Gr=(e,t,r)=>{let i=Ud.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Th=e=>Sh.test(e)&&!$h.test(e),Dd=()=>!1,Lh=e=>Ch.test(e),Nh=e=>Eh.test(e),zh=yh(()=>{let e=Y("colors"),t=Y("spacing"),r=Y("blur"),i=Y("brightness"),s=Y("borderColor"),o=Y("borderRadius"),n=Y("borderSpacing"),h=Y("borderWidth"),u=Y("contrast"),g=Y("grayscale"),y=Y("hueRotate"),w=Y("invert"),E=Y("gap"),C=Y("gradientColorStops"),S=Y("gradientColorStopPositions"),k=Y("inset"),O=Y("margin"),A=Y("opacity"),F=Y("padding"),V=Y("saturate"),M=Y("scale"),J=Y("sepia"),it=Y("skew"),st=Y("space"),U=Y("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",z,t],P=()=>[z,t],Be=()=>["",ge,_e],Nt=()=>["auto",jr,z],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],jt=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",z],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[jr,z];return{cacheSize:500,separator:":",theme:{colors:[ei],spacing:[ge,_e],blur:["none","",xe,z],brightness:ot(),borderColor:[e],borderRadius:["none","","full",xe,z],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[kh,_e],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[xe]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"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:[...pe(),z]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,z]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",ti,z]}],"grid-cols":[{"grid-cols":[ei]}],"col-start-end":[{col:["auto",{span:["full",ti,z]},z]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[ei]}],"row-start-end":[{row:["auto",{span:[ti,z]},z]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...jt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...jt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...jt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[xe]},xe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xe,_e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",to]}],"font-family":[{font:[ei]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",jr,to]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,_e]}],"underline-offset":[{"underline-offset":["auto",ge,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],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",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),Oh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ih]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ph]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[ge,z]}],"outline-w":[{outline:[ge,_e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ge,_e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xe,Fh]}],"shadow-color":[{shadow:[ei]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",xe,z]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ti,z]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],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",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ge,_e,to]}],stroke:[{stroke:[e,"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-s","border-color-e","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 b(...e){return zh(Ld(e))}var jh=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return m}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];s!==t[i]&&(r[i]=s)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},Uh=class extends jh{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.removeEventListener(i,this,s)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.addEventListener(i,this,s)}}},wt=_s(class extends Uh{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];if(s===t[i])continue;let o=i.slice(1);switch(i[0]){case"@":this.eventData[o]=s,this.applyEvent(o,s);break;case".":r[o]=s;break;case"?":s?r.setAttribute(o,""):r.removeAttribute(o);break;default:s==null?r.removeAttribute(i):r.setAttribute(i,String(s));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let s=i.slice(1);if(!e||!(i in e)&&r[s]===t[i])switch(i[0]){case"@":this.groomEvent(s,t[i]);break;case".":r[s]=void 0;break;case"?":r.removeAttribute(s);break;default:r.removeAttribute(i);break}}}}),_i={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},Ko=class extends _{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return d`
|
|
2954
2954
|
<div
|
|
2955
2955
|
part="accordion-content"
|
|
2956
2956
|
role="region"
|
|
2957
2957
|
data-state=${this.hasActiveState()?"open":"closed"}
|
|
2958
2958
|
data-orientation="vertical"
|
|
2959
|
-
class=${
|
|
2959
|
+
class=${b(_i.content,this.className)}
|
|
2960
2960
|
@click=${t=>t.stopPropagation()}
|
|
2961
2961
|
>
|
|
2962
2962
|
<div>${ln(((e=this.textContent)==null?void 0:e.trim())||"")}</div>
|
|
@@ -2964,7 +2964,7 @@ body {
|
|
|
2964
2964
|
`}};Ko=l([p("rtg-accordion-content")],Ko);var ne=class extends _{constructor(...e){super(...e),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=t=>{let r=t.target.closest("rtg-accordion-trigger");!r||!this._accordion||(t.preventDefault(),t.stopPropagation(),this._accordion.raiseEvent(this.value),r.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Yo||e instanceof Ko)}render(){var r;let e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return d`
|
|
2965
2965
|
<div
|
|
2966
2966
|
data-state=${e?"open":"closed"}
|
|
2967
|
-
class="${
|
|
2967
|
+
class="${b(_i.item,this.className)}"
|
|
2968
2968
|
value=${this.value}
|
|
2969
2969
|
role="tablist"
|
|
2970
2970
|
data-orientation="vertical"
|
|
@@ -2981,7 +2981,7 @@ body {
|
|
|
2981
2981
|
aria-selected=${e}
|
|
2982
2982
|
aria-expanded=${e}
|
|
2983
2983
|
data-state=${e?"open":"closed"}
|
|
2984
|
-
class="${
|
|
2984
|
+
class="${b(_i.trigger,this.className)}"
|
|
2985
2985
|
tabindex="-1"
|
|
2986
2986
|
data-orientation="horizontal"
|
|
2987
2987
|
data-radix-collection-item
|
|
@@ -2996,7 +2996,7 @@ body {
|
|
|
2996
2996
|
stroke-width="2"
|
|
2997
2997
|
stroke-linecap="round"
|
|
2998
2998
|
stroke-linejoin="round"
|
|
2999
|
-
class=${
|
|
2999
|
+
class=${b(_i.chevron,"lucide lucide-chevron-down-icon lucide-chevron-down")}
|
|
3000
3000
|
>
|
|
3001
3001
|
<path d="m6 9 6 6 6-6" />
|
|
3002
3002
|
</svg>
|
|
@@ -3006,12 +3006,12 @@ body {
|
|
|
3006
3006
|
data-orientation="vertical"
|
|
3007
3007
|
${wt(this.getFilteredAttributes())}
|
|
3008
3008
|
part="accordion"
|
|
3009
|
-
class="${
|
|
3009
|
+
class="${b(_i.base,this.className)}"
|
|
3010
3010
|
>
|
|
3011
3011
|
${e}
|
|
3012
3012
|
</div>
|
|
3013
|
-
`}};l([a({type:String}),c("design:type",typeof(Jn=Pe!==void 0&&Pe)=="function"?Jn:Object)],Ur.prototype,"type",void 0),Ur=l([p("rtg-accordion")],Ur);var eo=class extends v{constructor(...e){super(...e),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert" data-variant=${this.variant}></div>`}};l([a({type:String}),c("design:type",Object)],eo.prototype,"variant",void 0),eo=l([p("rtg-alert")],eo);var Qn=class extends v{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-title"></div>`}};Qn=l([p("rtg-alert-title")],Qn);var ta=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-description"></div>`}};ta=l([p("rtg-alert-description")],ta);var ea=class extends v{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-action"></div>`}};ea=l([p("rtg-alert-action")],ea);var ra={host:["rtg-block rtg-relative rtg-w-full"],self:["rtg-absolute rtg-inset-0"]},ro=class extends v{constructor(...e){super(...e),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=
|
|
3014
|
-
<div class="${
|
|
3013
|
+
`}};l([a({type:String}),c("design:type",typeof(Jn=Pe!==void 0&&Pe)=="function"?Jn:Object)],Ur.prototype,"type",void 0),Ur=l([p("rtg-accordion")],Ur);var eo=class extends v{constructor(...e){super(...e),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert" data-variant=${this.variant}></div>`}};l([a({type:String}),c("design:type",Object)],eo.prototype,"variant",void 0),eo=l([p("rtg-alert")],eo);var Qn=class extends v{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-title"></div>`}};Qn=l([p("rtg-alert-title")],Qn);var ta=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-description"></div>`}};ta=l([p("rtg-alert-description")],ta);var ea=class extends v{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-action"></div>`}};ea=l([p("rtg-alert-action")],ea);var ra={host:["rtg-block rtg-relative rtg-w-full"],self:["rtg-absolute rtg-inset-0"]},ro=class extends v{constructor(...e){super(...e),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=b(this.className,ra.host)}updated(e){e.has("ratio")&&(this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%")}firstUpdated(){var t;this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%";let e=this.querySelector(".aspect-ratio");if(e){if(this._userClass&&(e.className=b(e.className,this._userClass)),this._userStyle){let r=(t=e.getAttribute("style"))==null?void 0:t.trim(),i=this._userStyle.trim();e.setAttribute("style",[r,i].filter(Boolean).join("; "))}Array.from(this.childNodes).forEach(r=>{r!==e&&e.appendChild(r)})}}render(){return d`
|
|
3014
|
+
<div class="${b("aspect-ratio",ra.self)}"></div>
|
|
3015
3015
|
`}};l([a({type:Number,reflect:!0}),c("design:type",Object)],ro.prototype,"ratio",void 0),ro=l([p("rtg-aspect-ratio")],ro);var ri=class extends v{constructor(...e){super(...e),this.size="default",this._imageLoaded=!1,this._imageError=!1}get _rootSlot(){return this.querySelector('[data-slot="avatar"]')}get _avatarImageChild(){return this.querySelector("rtg-avatar-image")}get _avatarFallbackChild(){return this.querySelector("rtg-avatar-fallback")}_syncChildren(){let e=this._imageError||!this._imageLoaded;this._avatarImageChild&&(this._avatarImageChild.style.display=e?"none":""),this._avatarFallbackChild&&(this._avatarFallbackChild.style.display=e?"":"none")}_onImageLoad(){this._imageLoaded=!0,this._imageError=!1,this._syncChildren()}_onImageError(){this._imageLoaded=!1,this._imageError=!0,this._syncChildren()}connectedCallback(){super.connectedCallback(),this.addEventListener("rtg-avatar:image-load",this._onImageLoad),this.addEventListener("rtg-avatar:image-error",this._onImageError)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("rtg-avatar:image-load",this._onImageLoad),this.removeEventListener("rtg-avatar:image-error",this._onImageError)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<span data-slot="avatar" data-size=${this.size}></span>`}};l([a({type:String}),c("design:type",Object)],ri.prototype,"size",void 0),l([x(),c("design:type",Object)],ri.prototype,"_imageLoaded",void 0),l([x(),c("design:type",Object)],ri.prototype,"_imageError",void 0),ri=l([p("rtg-avatar")],ri);var Ii=class extends v{_onLoad(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-load",{bubbles:!0,composed:!0}))}_onError(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-error",{bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return d`
|
|
3016
3016
|
<img
|
|
3017
3017
|
data-slot="avatar-image"
|
|
@@ -3025,16 +3025,16 @@ body {
|
|
|
3025
3025
|
data-slot="badge"
|
|
3026
3026
|
data-variant=${this.variant}
|
|
3027
3027
|
href=${this.href}
|
|
3028
|
-
target=${this.target??
|
|
3029
|
-
aria-label=${this.ariaLabel??
|
|
3030
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
3028
|
+
target=${this.target??m}
|
|
3029
|
+
aria-label=${this.ariaLabel??m}
|
|
3030
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
3031
3031
|
></a>
|
|
3032
3032
|
`:d`
|
|
3033
3033
|
<span
|
|
3034
3034
|
data-slot="badge"
|
|
3035
3035
|
data-variant=${this.variant}
|
|
3036
|
-
aria-label=${this.ariaLabel??
|
|
3037
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
3036
|
+
aria-label=${this.ariaLabel??m}
|
|
3037
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
3038
3038
|
></span>
|
|
3039
3039
|
`}};l([a({type:String}),c("design:type",Object)],Ir.prototype,"variant",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Ir.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],Ir.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Ir.prototype,"target",void 0),Ir=l([p("rtg-badge")],Ir);var Wr={list:["rtg-flex rtg-flex-wrap rtg-gap-breadcrumb-list-space-gap-sm sm:rtg-gap-breadcrumb-list-space-gap rtg-items-center","rtg-text-breadcrumb-list-font rtg-font-breadcrumb-list-font-weight rtg-text-breadcrumb-list-color-text rtg-break-words"],item:["rtg-inline-flex rtg-gap-breadcrumb-item-space-gap rtg-items-center"],link:["rtg-transition-colors","hover:rtg-text-breadcrumb-link-color-text-hover"],page:["rtg-font-breadcrumb-page-font-weight rtg-text-breadcrumb-page-color-text"],separator:["[&>svg]:rtg-size-breadcrumb-separator-icon-space-size"],ellipsis:["rtg-flex rtg-justify-center rtg-items-center","rtg-size-breadcrumb-ellipsis-space-size","[&>svg]:rtg-size-breadcrumb-ellipsis-icon-space-size"]},aa=class extends _{getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){return d`
|
|
3040
3040
|
<span
|
|
@@ -3042,7 +3042,7 @@ body {
|
|
|
3042
3042
|
id="rtg-bread-crumb-ellipsis"
|
|
3043
3043
|
role="presentation"
|
|
3044
3044
|
aria-hidden="true"
|
|
3045
|
-
class="${
|
|
3045
|
+
class="${b(Wr.ellipsis,this.className)}"
|
|
3046
3046
|
part="breadcrumb-ellipsis"
|
|
3047
3047
|
>
|
|
3048
3048
|
<svg
|
|
@@ -3064,14 +3064,14 @@ body {
|
|
|
3064
3064
|
<li
|
|
3065
3065
|
${wt(this.getFilteredAttributes())}
|
|
3066
3066
|
id="rtg-bread-crumb-item"
|
|
3067
|
-
class="${
|
|
3067
|
+
class="${b(Wr.item,this.className)}"
|
|
3068
3068
|
part="breadcrumb-item"
|
|
3069
3069
|
></li>
|
|
3070
3070
|
`}};la=l([p("rtg-bread-crumb-item")],la);var io=class extends _{constructor(...e){super(...e),this.href="/"}get _containerElement(){return this.querySelector("a[part=breadcrumb-link]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3071
3071
|
<a
|
|
3072
3072
|
${wt(this.getFilteredAttributes())}
|
|
3073
3073
|
id="rtg-bread-crumb-link"
|
|
3074
|
-
class="${
|
|
3074
|
+
class="${b(Wr.link,this.className)}"
|
|
3075
3075
|
href="${this.href}"
|
|
3076
3076
|
part="breadcrumb-link"
|
|
3077
3077
|
>
|
|
@@ -3080,7 +3080,7 @@ body {
|
|
|
3080
3080
|
<ol
|
|
3081
3081
|
${wt(this.getFilteredAttributes())}
|
|
3082
3082
|
id="rtg-bread-crumb-list"
|
|
3083
|
-
class="${
|
|
3083
|
+
class="${b(Wr.list,this.className)}"
|
|
3084
3084
|
part="breadcrumb-list"
|
|
3085
3085
|
></ol>
|
|
3086
3086
|
`}};da=l([p("rtg-bread-crumb-list")],da);var ca=class extends _{getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){return d`
|
|
@@ -3089,7 +3089,7 @@ body {
|
|
|
3089
3089
|
id="rtg-bread-crumb-separator"
|
|
3090
3090
|
role="presentation"
|
|
3091
3091
|
aria-hidden="true"
|
|
3092
|
-
class="${
|
|
3092
|
+
class="${b(Wr.separator,this.className)}"
|
|
3093
3093
|
part="breadcrumb-separator"
|
|
3094
3094
|
>
|
|
3095
3095
|
<svg
|
|
@@ -3111,7 +3111,7 @@ body {
|
|
|
3111
3111
|
id="rtg-bread-crumb-text"
|
|
3112
3112
|
aria-disabled="true"
|
|
3113
3113
|
aria-current="page"
|
|
3114
|
-
class="${
|
|
3114
|
+
class="${b(Wr.page,this.className)}"
|
|
3115
3115
|
part="breadcrumb-text"
|
|
3116
3116
|
>
|
|
3117
3117
|
</span>
|
|
@@ -3119,7 +3119,7 @@ body {
|
|
|
3119
3119
|
<nav
|
|
3120
3120
|
${wt(this.getFilteredAttributes())}
|
|
3121
3121
|
part="breadcrumb"
|
|
3122
|
-
class="${
|
|
3122
|
+
class="${b(this.className)}"
|
|
3123
3123
|
aria-label="breadcrumb"
|
|
3124
3124
|
></nav>
|
|
3125
3125
|
`}};ua=l([p("rtg-bread-crumb")],ua);var Yt=class extends v{constructor(...e){super(...e),this.variant="default",this.size="default",this.type="button"}get _rootSlot(){return this.querySelector('[data-slot="button"]')}_handleClick(e){this.onClick&&this.onClick(e)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return this.href?d`
|
|
@@ -3128,10 +3128,10 @@ body {
|
|
|
3128
3128
|
data-variant=${this.variant}
|
|
3129
3129
|
data-size=${this.size}
|
|
3130
3130
|
href=${this.href}
|
|
3131
|
-
target=${this.target??
|
|
3131
|
+
target=${this.target??m}
|
|
3132
3132
|
?disabled=${this.disabled}
|
|
3133
|
-
aria-label=${this.ariaLabel??
|
|
3134
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
3133
|
+
aria-label=${this.ariaLabel??m}
|
|
3134
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
3135
3135
|
@click=${this._handleClick}
|
|
3136
3136
|
></a>
|
|
3137
3137
|
`:d`
|
|
@@ -3141,22 +3141,22 @@ body {
|
|
|
3141
3141
|
data-size=${this.size}
|
|
3142
3142
|
type=${this.type}
|
|
3143
3143
|
?disabled=${this.disabled}
|
|
3144
|
-
aria-label=${this.ariaLabel??
|
|
3145
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
3144
|
+
aria-label=${this.ariaLabel??m}
|
|
3145
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
3146
3146
|
@click=${this._handleClick}
|
|
3147
3147
|
></button>
|
|
3148
|
-
`}};l([a({type:String}),c("design:type",Object)],Yt.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],Yt.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],Yt.prototype,"onClick",void 0),Yt=l([p("rtg-button")],Yt);var Dh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Bh(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Mh(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),s=e.getFullYear();return`${t}, ${r} ${i}${Bh(i)}, ${s}`}var pa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ga=Ld,hn=(e,t)=>r=>{var h;if((t==null?void 0:t.variants)==null)return ga(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{let g=r==null?void 0:r[u],y=s==null?void 0:s[u];if(g===null)return null;let w=pa(g)||pa(y);return i[u][w]}),n=r&&Object.entries(r).reduce((u,g)=>{let[y,w]=g;return w===void 0||(u[y]=w),u},{});return ga(e,o,(h=t==null?void 0:t.compoundVariants)==null?void 0:h.reduce((u,g)=>{let{class:y,className:w,...E}=g;return Object.entries(E).every(C=>{let[S,k]=C;return Array.isArray(k)?k.includes({...s,...n}[S]):{...s,...n}[S]===k})?[...u,y,w]:u},[]),r==null?void 0:r.class,r==null?void 0:r.className)},gi=hn(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[gi({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},ma,Or=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+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,t){if(!t){let 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,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),s=this._userStyle.trim();t.setAttribute("style",[i,s].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),s=new Date(e,t,0).getDate(),o=[];for(let g=i-1;g>=0;g--)o.push({day:String(s-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)o.push({day:String(g),month:t,isOutside:!1});let n=o.length%7;if(n!==0){let g=7-n;for(let y=1;y<=g;y++)o.push({day:String(y),month:t+1,isOutside:!0})}let h=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return d`
|
|
3148
|
+
`}};l([a({type:String}),c("design:type",Object)],Yt.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],Yt.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],Yt.prototype,"onClick",void 0),Yt=l([p("rtg-button")],Yt);var Dh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Bh(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Mh(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),s=e.getFullYear();return`${t}, ${r} ${i}${Bh(i)}, ${s}`}var pa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ga=Ld,hn=(e,t)=>r=>{var h;if((t==null?void 0:t.variants)==null)return ga(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{let g=r==null?void 0:r[u],y=s==null?void 0:s[u];if(g===null)return null;let w=pa(g)||pa(y);return i[u][w]}),n=r&&Object.entries(r).reduce((u,g)=>{let[y,w]=g;return w===void 0||(u[y]=w),u},{});return ga(e,o,(h=t==null?void 0:t.compoundVariants)==null?void 0:h.reduce((u,g)=>{let{class:y,className:w,...E}=g;return Object.entries(E).every(C=>{let[S,k]=C;return Array.isArray(k)?k.includes({...s,...n}[S]):{...s,...n}[S]===k})?[...u,y,w]:u},[]),r==null?void 0:r.class,r==null?void 0:r.className)},gi=hn(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[b(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[b(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[gi({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},ma,Or=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+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,t){if(!t){let 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,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(b(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=b(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=b("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),s=this._userStyle.trim();t.setAttribute("style",[i,s].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),s=new Date(e,t,0).getDate(),o=[];for(let g=i-1;g>=0;g--)o.push({day:String(s-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)o.push({day:String(g),month:t,isOutside:!1});let n=o.length%7;if(n!==0){let g=7-n;for(let y=1;y<=g;y++)o.push({day:String(y),month:t+1,isOutside:!0})}let h=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return d`
|
|
3149
3149
|
<div
|
|
3150
|
-
class=${
|
|
3150
|
+
class=${b("calendar",q.root,this._userClass)}
|
|
3151
3151
|
data-slot="calendar"
|
|
3152
3152
|
data-mode=${this.mode}
|
|
3153
3153
|
part="calendar"
|
|
3154
3154
|
style=${this._userStyle}
|
|
3155
3155
|
>
|
|
3156
|
-
<div class=${
|
|
3157
|
-
<nav class=${
|
|
3156
|
+
<div class=${b("calendar-months",q.months)}>
|
|
3157
|
+
<nav class=${b("calendar-nav",q.nav)}>
|
|
3158
3158
|
<button
|
|
3159
|
-
class=${
|
|
3159
|
+
class=${b("calendar-button-previous",q.buttonPrevious)}
|
|
3160
3160
|
aria-label="Go to the Previous Month"
|
|
3161
3161
|
@click="${this.previousMonth}"
|
|
3162
3162
|
>
|
|
@@ -3170,14 +3170,14 @@ body {
|
|
|
3170
3170
|
stroke-width="2"
|
|
3171
3171
|
stroke-linecap="round"
|
|
3172
3172
|
stroke-linejoin="round"
|
|
3173
|
-
class=${
|
|
3173
|
+
class=${b("calendar-chevron",q.chevron,"lucide lucide-chevron-left-icon lucide-chevron-left")}
|
|
3174
3174
|
>
|
|
3175
3175
|
<path d="m15 18-6-6 6-6" />
|
|
3176
3176
|
</svg>
|
|
3177
3177
|
</button>
|
|
3178
3178
|
|
|
3179
3179
|
<button
|
|
3180
|
-
class=${
|
|
3180
|
+
class=${b("calendar-button-next",q.buttonNext)}
|
|
3181
3181
|
aria-label="Go to the Next Month"
|
|
3182
3182
|
@click="${this.nextMonth}"
|
|
3183
3183
|
>
|
|
@@ -3191,19 +3191,19 @@ body {
|
|
|
3191
3191
|
stroke-width="2"
|
|
3192
3192
|
stroke-linecap="round"
|
|
3193
3193
|
stroke-linejoin="round"
|
|
3194
|
-
class=${
|
|
3194
|
+
class=${b("calendar-chevron",q.chevron,"lucide lucide-chevron-right-icon lucide-chevron-right")}
|
|
3195
3195
|
>
|
|
3196
3196
|
<path d="m9 18 6-6-6-6" />
|
|
3197
3197
|
</svg>
|
|
3198
3198
|
</button>
|
|
3199
3199
|
</nav>
|
|
3200
3200
|
|
|
3201
|
-
<div class=${
|
|
3201
|
+
<div class=${b("calendar-month",q.month)}>
|
|
3202
3202
|
<div
|
|
3203
|
-
class=${
|
|
3203
|
+
class=${b("calendar-month-caption",q.monthCaption)}
|
|
3204
3204
|
>
|
|
3205
3205
|
<span
|
|
3206
|
-
class=${
|
|
3206
|
+
class=${b("calendar-caption-label",q.captionLabel)}
|
|
3207
3207
|
role="status"
|
|
3208
3208
|
aria-live="polite"
|
|
3209
3209
|
>
|
|
@@ -3212,16 +3212,16 @@ body {
|
|
|
3212
3212
|
</div>
|
|
3213
3213
|
|
|
3214
3214
|
<table
|
|
3215
|
-
class=${
|
|
3215
|
+
class=${b("calendar-month-grid",q.monthGrid)}
|
|
3216
3216
|
role="grid"
|
|
3217
3217
|
aria-label=${u}
|
|
3218
3218
|
aria-multiselectable=${this.mode==="range"?"true":"false"}
|
|
3219
3219
|
>
|
|
3220
3220
|
<thead aria-hidden="true">
|
|
3221
|
-
<tr class=${
|
|
3221
|
+
<tr class=${b("calendar-weekdays",q.weekdays)}>
|
|
3222
3222
|
${Dh.map(g=>d`
|
|
3223
3223
|
<th
|
|
3224
|
-
class=${
|
|
3224
|
+
class=${b("calendar-weekday",q.weekday)}
|
|
3225
3225
|
scope="col"
|
|
3226
3226
|
aria-label=${g}
|
|
3227
3227
|
>
|
|
@@ -3231,12 +3231,12 @@ body {
|
|
|
3231
3231
|
</tr>
|
|
3232
3232
|
</thead>
|
|
3233
3233
|
|
|
3234
|
-
<tbody class=${
|
|
3234
|
+
<tbody class=${b("calendar-weeks",q.weeks)}>
|
|
3235
3235
|
${Array.from({length:Math.ceil(o.length/7)},(g,y)=>d`
|
|
3236
|
-
<tr class=${
|
|
3236
|
+
<tr class=${b("calendar-week",q.week)}>
|
|
3237
3237
|
${o.slice(y*7,(y+1)*7).map((w,E)=>{var st,U,vt;let C=new Date(this.currentDate.getFullYear(),w.month,Number(w.day)),S=C.toDateString()===new Date().toDateString(),k=this.mode==="range"&&C.toDateString()===((st=this.selectedStartDate)==null?void 0:st.toDateString()),O=this.mode==="range"&&this.isDayInRange(C,!0),A=this.mode==="range"&&C.toDateString()===((U=this.selectedEndDate)==null?void 0:U.toDateString()),F=this.mode==="single"&&C.toDateString()===((vt=this.selectedStartDate)==null?void 0:vt.toDateString()),V=F||k||O||A,M=E===0,J=E===6,it=S?"Today, ":"";return it+=Mh(C),it+=V?", selected":"",d`
|
|
3238
3238
|
<td
|
|
3239
|
-
class=${
|
|
3239
|
+
class=${b("calendar-day",q.day.base,S&&!V&&q.day.today,V&&q.day.selected.common,F&&q.day.selected.single,k&&q.day.selected.range.start,O&&q.day.selected.range.middle,A&&q.day.selected.range.end,M&&q.day.index.first,J&&q.day.index.last,!1)}
|
|
3240
3240
|
role="gridcell"
|
|
3241
3241
|
data-day=${C.toISOString().slice(0,10)}
|
|
3242
3242
|
?data-disabled=${void 0}
|
|
@@ -3250,7 +3250,7 @@ body {
|
|
|
3250
3250
|
?aria-selected=${V?"true":void 0}
|
|
3251
3251
|
>
|
|
3252
3252
|
<button
|
|
3253
|
-
class=${
|
|
3253
|
+
class=${b("calendar-day-button",q.dayButton.base,w.isOutside&&q.dayButton.outside,S&&q.dayButton.today)}
|
|
3254
3254
|
?disabled=${void 0}
|
|
3255
3255
|
data-variant="ghost"
|
|
3256
3256
|
data-size="icon"
|
|
@@ -3336,7 +3336,7 @@ body {
|
|
|
3336
3336
|
stroke-width="2"
|
|
3337
3337
|
stroke-linecap="round"
|
|
3338
3338
|
stroke-linejoin="round"
|
|
3339
|
-
class=${
|
|
3339
|
+
class=${b("lucide lucide-check-icon lucide-check","")}
|
|
3340
3340
|
>
|
|
3341
3341
|
<path d="M20 6 9 17l-5-5"/>
|
|
3342
3342
|
</svg>
|
|
@@ -3351,7 +3351,7 @@ body {
|
|
|
3351
3351
|
stroke-width="2"
|
|
3352
3352
|
stroke-linecap="round"
|
|
3353
3353
|
stroke-linejoin="round"
|
|
3354
|
-
class=${
|
|
3354
|
+
class=${b("lucide lucide-minus-icon lucide-minus","")}
|
|
3355
3355
|
>
|
|
3356
3356
|
<path d="M5 12h14"/>
|
|
3357
3357
|
</svg>
|
|
@@ -3366,7 +3366,7 @@ body {
|
|
|
3366
3366
|
stroke-width="2"
|
|
3367
3367
|
stroke-linecap="round"
|
|
3368
3368
|
stroke-linejoin="round"
|
|
3369
|
-
class=${
|
|
3369
|
+
class=${b("lucide lucide-search-icon lucide-search","")}
|
|
3370
3370
|
>
|
|
3371
3371
|
<path d="m21 21-4.34-4.34"/>
|
|
3372
3372
|
<circle cx="11" cy="11" r="8"/>
|
|
@@ -3386,14 +3386,14 @@ body {
|
|
|
3386
3386
|
>
|
|
3387
3387
|
<path d="M20 6 9 17l-5-5"></path>
|
|
3388
3388
|
</svg>
|
|
3389
|
-
`}var Tt={root:["rtg-relative rtg-mx-carousel-space-mx rtg-h-carousel-space-h rtg-w-carousel-space-w"],viewport:["rtg-w-carousel-viewport-space-w rtg-h-carousel-viewport-space-h rtg-overflow-hidden"],slidesWrapper:{base:["rtg-flex rtg-transition-transform rtg-duration-carousel-motion-duration rtg-ease-carousel-motion-fn"],orientation:{horizontal:["rtg-flex-row"],vertical:["rtg-flex-col"]}},slide:{base:["rtg-min-w-0 rtg-basis-full rtg-h-carousel-slide-space-h rtg-flex-shrink-0 rtg-flex-grow-0 rtg-transition-transform rtg-duration-carousel-motion-duration rtg-px-carousel-slide-space-px rtg-py-carousel-slide-space-py"],size:{true:["lg:rtg-basis-1/3 lg:rtg-h-1/2 md:rtg-basis-1/2 md:rtg-h-1/2"],false:[""]}},controls:{base:["rtg-absolute rtg-z-10 rtg-flex"],orientation:{horizontal:["rtg-top-1/2 rtg-left-carousel-control-horizontal-space-left rtg-right-carousel-control-horizontal-space-right rtg-justify-between"],vertical:["rtg-w-carousel-control-vertical-space-w rtg-h-carousel-control-vertical-space-h rtg-top-0 rtg-flex-col rtg-justify-between rtg-items-center"]}},controlButton:{base:["rtg-bg-carousel-button-color-bg rtg-text-carousel-button-color-text rtg-border-none rtg-px-carousel-button-space-px rtg-py-carousel-button-space-py rtg-cursor-pointer rtg-z-10 rtg-rounded-carousel-button-radius rtg-w-carousel-button-space-w rtg-h-carousel-button-space-h rtg-flex rtg-items-center rtg-justify-center hover:rtg-bg-carousel-button-color-bg-hover disabled:rtg-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["rtg-relative rtg-top-carousel-button-vertical-prev-space-top rtg-rotate-90"],verticalNext:["rtg-relative rtg-top-carousel-button-vertical-next-space-top rtg-rotate-90"]}}},wa,He=class extends v{constructor(...e){super(...e),this.currentIndex=0,this.items=[],this.orientation="horizontal",this.size=!1,this.handleResize=()=>{this.updateSlides(),this.currentIndex=0,this.querySelectorAll(".slide").forEach(t=>{t.className=this.getSlideClasses()})}}createRenderRoot(){return this}firstUpdated(){this.restructureSlides()}restructureSlides(){let e=this.querySelector(".slides");if(e)for(let t=0;t<this.items.length;t++){let r=`slide-${t}`,i=this.querySelector(`[slot="${r}"]`);if(i&&i.parentElement!==e){let s=document.createElement("div");s.className=this.getSlideClasses(),e.appendChild(s),s.appendChild(i)}}}getSlideClasses(){return
|
|
3389
|
+
`}var Tt={root:["rtg-relative rtg-mx-carousel-space-mx rtg-h-carousel-space-h rtg-w-carousel-space-w"],viewport:["rtg-w-carousel-viewport-space-w rtg-h-carousel-viewport-space-h rtg-overflow-hidden"],slidesWrapper:{base:["rtg-flex rtg-transition-transform rtg-duration-carousel-motion-duration rtg-ease-carousel-motion-fn"],orientation:{horizontal:["rtg-flex-row"],vertical:["rtg-flex-col"]}},slide:{base:["rtg-min-w-0 rtg-basis-full rtg-h-carousel-slide-space-h rtg-flex-shrink-0 rtg-flex-grow-0 rtg-transition-transform rtg-duration-carousel-motion-duration rtg-px-carousel-slide-space-px rtg-py-carousel-slide-space-py"],size:{true:["lg:rtg-basis-1/3 lg:rtg-h-1/2 md:rtg-basis-1/2 md:rtg-h-1/2"],false:[""]}},controls:{base:["rtg-absolute rtg-z-10 rtg-flex"],orientation:{horizontal:["rtg-top-1/2 rtg-left-carousel-control-horizontal-space-left rtg-right-carousel-control-horizontal-space-right rtg-justify-between"],vertical:["rtg-w-carousel-control-vertical-space-w rtg-h-carousel-control-vertical-space-h rtg-top-0 rtg-flex-col rtg-justify-between rtg-items-center"]}},controlButton:{base:["rtg-bg-carousel-button-color-bg rtg-text-carousel-button-color-text rtg-border-none rtg-px-carousel-button-space-px rtg-py-carousel-button-space-py rtg-cursor-pointer rtg-z-10 rtg-rounded-carousel-button-radius rtg-w-carousel-button-space-w rtg-h-carousel-button-space-h rtg-flex rtg-items-center rtg-justify-center hover:rtg-bg-carousel-button-color-bg-hover disabled:rtg-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["rtg-relative rtg-top-carousel-button-vertical-prev-space-top rtg-rotate-90"],verticalNext:["rtg-relative rtg-top-carousel-button-vertical-next-space-top rtg-rotate-90"]}}},wa,He=class extends v{constructor(...e){super(...e),this.currentIndex=0,this.items=[],this.orientation="horizontal",this.size=!1,this.handleResize=()=>{this.updateSlides(),this.currentIndex=0,this.querySelectorAll(".slide").forEach(t=>{t.className=this.getSlideClasses()})}}createRenderRoot(){return this}firstUpdated(){this.restructureSlides()}restructureSlides(){let e=this.querySelector(".slides");if(e)for(let t=0;t<this.items.length;t++){let r=`slide-${t}`,i=this.querySelector(`[slot="${r}"]`);if(i&&i.parentElement!==e){let s=document.createElement("div");s.className=this.getSlideClasses(),e.appendChild(s),s.appendChild(i)}}}getSlideClasses(){return b(Tt.slide.base,this.size?Tt.slide.size.true:Tt.slide.size.false)}nextSlide(){this.currentIndex<this.items.length-1&&(this.currentIndex+=1,this.updateSlides())}prevSlide(){this.currentIndex>0&&(--this.currentIndex,this.updateSlides())}updateSlides(){let e;e=this.size?window.innerWidth>=1024?33.3333:window.innerWidth>=768?50:100:100;let t=this.orientation==="vertical"?100/this.items.length:100;this.slides&&(this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*t}%)`)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}render(){let e=this.currentIndex===0,t=this.size?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,r=this.currentIndex>=this.items.length-t,i=b(Tt.slidesWrapper.base,Tt.slidesWrapper.orientation[this.orientation]),s=b(Tt.controls.base,Tt.controls.orientation[this.orientation]),o=b(Tt.controlButton.base,this.orientation==="vertical"&&Tt.controlButton.orientation.verticalPrev),n=b(Tt.controlButton.base,this.orientation==="vertical"&&Tt.controlButton.orientation.verticalNext);return d`
|
|
3390
3390
|
<div
|
|
3391
3391
|
part="rtg-carousel"
|
|
3392
|
-
class="${
|
|
3392
|
+
class="${b(Tt.root,this.className)}"
|
|
3393
3393
|
size="${this.size}"
|
|
3394
3394
|
orientation="${this.orientation}"
|
|
3395
3395
|
>
|
|
3396
|
-
<div class="${
|
|
3396
|
+
<div class="${b(Tt.viewport,this.className)}">
|
|
3397
3397
|
<div class="slides ${i}"></div>
|
|
3398
3398
|
|
|
3399
3399
|
<div class="${s}">
|
|
@@ -3445,8 +3445,8 @@ body {
|
|
|
3445
3445
|
?disabled=${this.disabled}
|
|
3446
3446
|
value=${this.value}
|
|
3447
3447
|
aria-checked=${this._checked?"true":"false"}
|
|
3448
|
-
aria-required=${this.required?"true":
|
|
3449
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
3448
|
+
aria-required=${this.required?"true":m}
|
|
3449
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
3450
3450
|
@click=${this._handleClick}
|
|
3451
3451
|
>
|
|
3452
3452
|
${this._renderIndicator()}
|
|
@@ -3462,14 +3462,14 @@ body {
|
|
|
3462
3462
|
`}};_a=l([p("rtg-collapsible-trigger")],_a);var xa=class extends _{constructor(...e){super(...e),this._toggleHandler=t=>{let r=t;requestAnimationFrame(()=>{let i=this._containerElement;i&&(i.style.display=r.detail.open?"block":"none")})}}get _containerElement(){return this.querySelector("div[part=collapsible-content]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[""]}connectedCallback(){super.connectedCallback(),this.addEventListener("toggle-collapsible-content",this._toggleHandler)}disconnectedCallback(){this.removeEventListener("toggle-collapsible-content",this._toggleHandler),super.disconnectedCallback()}render(){return d`
|
|
3463
3463
|
<div
|
|
3464
3464
|
${wt(this.getFilteredAttributes())}
|
|
3465
|
-
class="${
|
|
3465
|
+
class="${b("",this.className)}"
|
|
3466
3466
|
style="display: none;--radix-collapsible-content-height: 100px; --radix-collapsible-content-width: 350px;"
|
|
3467
3467
|
part="collapsible-content"
|
|
3468
3468
|
></div>
|
|
3469
3469
|
`}};xa=l([p("rtg-collapsible-content")],xa);var ts=class extends _{constructor(...e){super(...e),this.open=!1,this._clickHandler=()=>{var t;(t=this.querySelector("rtg-collapsible-content"))==null||t.dispatchEvent(new CustomEvent("toggle-collapsible-content",{detail:{open:this.open}}))}}getAttributesToExclude(){return[""]}createRenderRoot(){return this}get _containerElement(){return this.querySelector("div[part=collapsible]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}connectedCallback(){super.connectedCallback(),this.addEventListener("click-collapsible-event",this._clickHandler)}disconnectedCallback(){this.removeEventListener("click-collapsible-event",this._clickHandler),super.disconnectedCallback()}render(){return d`
|
|
3470
3470
|
<div
|
|
3471
3471
|
${wt(this.getFilteredAttributes())}
|
|
3472
|
-
class="${
|
|
3472
|
+
class="${b("",this.className)}"
|
|
3473
3473
|
part="collapsible"
|
|
3474
3474
|
></div>
|
|
3475
3475
|
`}};l([a({type:Boolean}),c("design:type",Object)],ts.prototype,"open",void 0),ts=l([p("rtg-collapsible")],ts);var Kr={empty:["rtg-py-combo-box-empty-space-py","rtg-text-center","rtg-text-combo-box-empty-font"],group:{base:["rtg-pointer-events-none","rtg-invisible","rtg-absolute","rtg-z-50","rtg-mt-combo-box-group-space-mt","rtg-max-h-combo-box-group-space-max-h","rtg-w-combo-box-group-space-w","rtg-origin-top","rtg-scale-y-0","rtg-transform","rtg-overflow-hidden","rtg-overflow-y-auto","rtg-rounded-combo-box-group-radius","rtg-border-combo-box-group-width-border","rtg-border-combo-box-group-color-border","rtg-bg-combo-box-group-color-bg","rtg-px-combo-box-group-space-px","rtg-py-combo-box-group-space-py","rtg-opacity-0","rtg-shadow-combo-box-group-shadow","rtg-transition-opacity","rtg-duration-combo-box-group-motion-duration","rtg-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:rtg-w-0"]},input:["rtg-flex","rtg-h-combo-box-input-space-h","rtg-w-combo-box-input-space-w","rtg-rounded-combo-box-input-radius","rtg-border-0","rtg-bg-combo-box-input-color-bg","rtg-px-combo-box-input-space-px","rtg-py-combo-box-input-space-py","rtg-text-combo-box-input-font","rtg-text-combo-box-input-color-text","rtg-shadow-none","placeholder:rtg-text-combo-box-input-color-text-placeholder","focus:rtg-outline-none","focus-visible:rtg-ring-0"],trigger:{base:["rtg-z-20","rtg-flex","rtg-h-combo-box-trigger-space-h","rtg-flex-row-reverse","rtg-items-center","rtg-justify-between","rtg-rounded-combo-box-trigger-radius","rtg-border-combo-box-trigger-width-border","rtg-border-combo-box-trigger-color-border","rtg-bg-combo-box-trigger-color-bg","rtg-px-combo-box-trigger-space-px","rtg-py-combo-box-trigger-space-py","rtg-text-combo-box-trigger-font","focus:rtg-outline-none","focus:rtg-ring-combo-box-trigger-width-ring-focus","focus:rtg-ring-combo-box-trigger-color-ring-focus","focus:rtg-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:rtg-cursor-not-allowed","disabled:rtg-opacity-combo-box-trigger-opacity-disabled"]},value:["rtg-line-clamp-1","rtg-flex","rtg-w-combo-box-value-space-w"],item:{base:["rtg-flex","rtg-w-combo-box-item-space-w","rtg-cursor-pointer","rtg-flex-row-reverse","rtg-items-center","rtg-justify-between","rtg-rounded-combo-box-item-radius","rtg-px-combo-box-item-space-px","rtg-py-combo-box-item-space-py","hover:rtg-bg-accent","focus:rtg-bg-combo-box-item-color-bg-hover","focus:rtg-outline-none"]}},Sa,ao=class extends _{constructor(...e){super(...e),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Et);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return d`
|
|
@@ -3477,7 +3477,7 @@ body {
|
|
|
3477
3477
|
type="button"
|
|
3478
3478
|
part="combo-box-trigger-button"
|
|
3479
3479
|
role="tab"
|
|
3480
|
-
class="${
|
|
3480
|
+
class="${b(Kr.trigger.base,this.className)}"
|
|
3481
3481
|
tabindex="-1"
|
|
3482
3482
|
data-orientation="horizontal"
|
|
3483
3483
|
data-radix-collection-item=""
|
|
@@ -3488,7 +3488,7 @@ body {
|
|
|
3488
3488
|
`}};l([Ci("button"),c("design:type",typeof(Sa=typeof HTMLButtonElement<"u"&&HTMLButtonElement)=="function"?Sa:Object)],ao.prototype,"buttonElement",void 0),ao=l([p("rtg-combo-box-trigger")],ao);var lo=class extends v{constructor(...e){super(...e),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Et);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return d`
|
|
3489
3489
|
<span
|
|
3490
3490
|
part="combo-box-value"
|
|
3491
|
-
class="${
|
|
3491
|
+
class="${b(Kr.value,this.className)}"
|
|
3492
3492
|
@click=${this.handleClick}
|
|
3493
3493
|
>${this.renderLabel()}</span
|
|
3494
3494
|
>
|
|
@@ -3497,7 +3497,7 @@ body {
|
|
|
3497
3497
|
data-slot="separator"
|
|
3498
3498
|
data-orientation=${this.orientation}
|
|
3499
3499
|
role=${this.decorative?"none":"separator"}
|
|
3500
|
-
aria-orientation=${this.decorative?
|
|
3500
|
+
aria-orientation=${this.decorative?m:this.orientation}
|
|
3501
3501
|
></div>
|
|
3502
3502
|
`}};l([a({type:String}),c("design:type",Object)],Oi.prototype,"orientation",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Oi.prototype,"decorative",void 0),Oi=l([p("rtg-separator")],Oi);var Qe=class extends _{constructor(...t){super(...t),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=r=>{var i,s;r.detail.isOpen!==((i=this._comboBox)==null?void 0:i.isOpen)&&this.requestUpdate(),r.detail.isOpen&&((s=this._comboBox)!=null&&s.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var n;return o.getAttribute("value")===((n=this._comboBox)==null?void 0:n.selectedValue)}),this.requestUpdate())},this.handleKeyDown=r=>{var s;if(!((s=this._comboBox)!=null&&s.isOpen))return;r.preventDefault();let i=this.filteredItems;switch(r.key){case"ArrowDown":if(i.length===0)return;this.focusedIndex=(this.focusedIndex+1)%i.length;break;case"ArrowUp":if(i.length===0)return;this.focusedIndex=(this.focusedIndex-1+i.length)%i.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<i.length){let o=i[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(r,i)=>{r.preventDefault(),this.focusedIndex=i},this.onSelectedValue=(r,i)=>{this.focusedIndex=i,this.selectedValue=r},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="rtg-combo-box-item"], rtg-combo-box-item')).filter(t=>t.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("rtg-combo-box-input")}get comboBoxEmpty(){return this.querySelector("rtg-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var r;let t=(r=this.searchKey)==null?void 0:r.toLowerCase();return this.comboBoxItems.filter(i=>{var s;return(s=i.getAttribute("value"))==null?void 0:s.toLowerCase().includes(t)})}get _comboBox(){let t=this.parentElement;for(;t&&!(t instanceof Et);)t=t.parentElement;return t}handleComboBoxStateChanged(t){var o;let{isOpen:r,targetComboBoxId:i}=t.detail;if(this.isOpen=r,i!==((o=this._comboBox)==null?void 0:o.uuid))return;let s=this.renderRoot.querySelector('[part="select-group"]');s&&(r?(clearTimeout(s._hideTimeout),s.classList.remove("rtg-scale-y-0","rtg-opacity-0"),s.classList.add("rtg-scale-y-100","rtg-opacity-100"),s.classList.remove("rtg-invisible","rtg-pointer-events-none"),s.classList.add("rtg-visible","rtg-pointer-events-auto")):(s.classList.remove("rtg-opacity-100"),s.classList.add("rtg-opacity-0"),s._hideTimeout=setTimeout(()=>{s.classList.remove("rtg-visible","rtg-pointer-events-auto","rtg-scale-y-100"),s.classList.add("rtg-invisible","rtg-pointer-events-none","rtg-scale-y-0")},300)))}moveChildren(){let t=this.renderRoot.querySelector('[part="select-group"]');if(!t)return;let r={top:t.querySelector("#topSlot"),empty:t.querySelector("#emptySlot"),list:t.querySelector("#listSlot")},i={"rtg-combo-box-input":"top","rtg-combo-box-empty":"empty","rtg-combo-box-item":"list"};Array.from(this.children).forEach(s=>{var n;let o=i[s.tagName.toLowerCase()];o&&(s.setAttribute("data-managed","true"),(n=r[o])==null||n.appendChild(s))})}renderFilteredItems(){return this.comboBoxItems.forEach(t=>t.setAttribute("hidden","true")),this.filteredItems.map((t,r)=>{var n;let i=t.getAttribute("value")??"",s=r===this.focusedIndex,o=i.toLowerCase()===((n=this._comboBox)==null?void 0:n.selectedValue.toLowerCase());return d`
|
|
3503
3503
|
<rtg-combo-box-item
|
|
@@ -3513,7 +3513,7 @@ body {
|
|
|
3513
3513
|
`})}getAttributesToExclude(){return[]}connectedCallback(){super.connectedCallback(),document.addEventListener("rtg-combo-box-state-changed",this.boundHandleComboBoxStateChanged),document.addEventListener("clicked-combo-box-item",this.handleItemClicked),document.addEventListener("trigger-combo-box",this.handleTriggerComboBox)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("clicked-combo-box-item",this.handleItemClicked),document.removeEventListener("trigger-combo-box",this.handleTriggerComboBox),document.removeEventListener("rtg-combo-box-state-changed",this.boundHandleComboBoxStateChanged),document.removeEventListener("keydown",this.boundHandleKeyDown)}firstUpdated(t){this.moveChildren(),document.addEventListener("keydown",this.boundHandleKeyDown)}createRenderRoot(){return this}render(){return d`
|
|
3514
3514
|
<div
|
|
3515
3515
|
part="select-group"
|
|
3516
|
-
class="${
|
|
3516
|
+
class="${b(Kr.group.base,this.className)}"
|
|
3517
3517
|
data-hs-combo-box-output=""
|
|
3518
3518
|
data-testId="select-group"
|
|
3519
3519
|
>
|
|
@@ -3530,7 +3530,7 @@ body {
|
|
|
3530
3530
|
<div
|
|
3531
3531
|
${wt(this.getFilteredAttributes())}
|
|
3532
3532
|
@click=${this.handleClick}
|
|
3533
|
-
class="${
|
|
3533
|
+
class="${b(Kr.item.base,this.className)}"
|
|
3534
3534
|
data-hs-combo-box-value=${this.value}
|
|
3535
3535
|
aria-selected="${this.isSelected}"
|
|
3536
3536
|
data-selected="${this.isSelected}"
|
|
@@ -3548,7 +3548,7 @@ body {
|
|
|
3548
3548
|
<input
|
|
3549
3549
|
part="combo-box-input"
|
|
3550
3550
|
type="text"
|
|
3551
|
-
class="${
|
|
3551
|
+
class="${b(Kr.input,this.className)}"
|
|
3552
3552
|
placeholder=${this.placeholder}
|
|
3553
3553
|
autocomplete="off"
|
|
3554
3554
|
autocorrect="off"
|
|
@@ -3562,14 +3562,14 @@ body {
|
|
|
3562
3562
|
</div>
|
|
3563
3563
|
`}};l([a({type:String}),c("design:type",Object)],Ai.prototype,"placeholder",void 0),l([x(),c("design:type",Object)],Ai.prototype,"searchValue",void 0),Ai=l([p("rtg-combo-box-input")],Ai);var Ca=class extends _{createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.removeDuplicateContent()}render(){return d`
|
|
3564
3564
|
<div
|
|
3565
|
-
class="${
|
|
3565
|
+
class="${b(Kr.empty,this.className)}"
|
|
3566
3566
|
role="presentation"
|
|
3567
3567
|
>
|
|
3568
3568
|
${Array.from(this.childNodes)[0].textContent}
|
|
3569
3569
|
</div>
|
|
3570
3570
|
`}};Ca=l([p("rtg-combo-box-empty")],Ca);var Ea,Et=class extends _{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=dn(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var i;let t=(i=this.renderRoot)==null?void 0:i.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")&&!(r.shadowRoot&&r.shadowRoot.innerHTML.includes(t==null?void 0:t.innerHTML))){if(this.isOpen&&!t||!(t!=null&&t.contains(r)))this.isOpen=!1;else if(!(r!=null&&r.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("rtg-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){let t=e.target;if(t instanceof HTMLElement){let r=t.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 d`
|
|
3571
3571
|
<div
|
|
3572
|
-
class="${
|
|
3572
|
+
class="${b("rtg-relative",this.className)}"
|
|
3573
3573
|
data-hs-combo-box=""
|
|
3574
3574
|
data-combo-box-uuid=${this.uuid}
|
|
3575
3575
|
part="combo-box"
|
|
@@ -3580,7 +3580,7 @@ body {
|
|
|
3580
3580
|
id="${this.identifier}"
|
|
3581
3581
|
part="command-empty"
|
|
3582
3582
|
role="presentation"
|
|
3583
|
-
class=${
|
|
3583
|
+
class=${b(ae.empty,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3584
3584
|
></div>
|
|
3585
3585
|
`}},es=ir,ir._counter=0,ir);l([a({type:String}),c("design:type",Object)],Pi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Pi.prototype,"_hidden",void 0),Pi=es=l([p("rtg-command-empty")],Pi);var rs,sr,ii=(sr=class extends _{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}g${rs._counter++}`:this._id=`rtgcmdrxlxg${rs._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){let r=this.itemsContainerElement;if(r){for(;r.firstChild;)r.removeChild(r.firstChild);this.moveLightDomChildrenInto(r)}}render(){return d`
|
|
3586
3586
|
<div
|
|
@@ -3588,13 +3588,13 @@ body {
|
|
|
3588
3588
|
id="${this.identifier}"
|
|
3589
3589
|
part="command-group"
|
|
3590
3590
|
role="presentation"
|
|
3591
|
-
class=${
|
|
3591
|
+
class=${b(ae.group,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3592
3592
|
>
|
|
3593
3593
|
<div
|
|
3594
3594
|
rtgcmd-group-heading
|
|
3595
3595
|
aria-hidden="true"
|
|
3596
3596
|
id="${this.identifier}h"
|
|
3597
|
-
class=${
|
|
3597
|
+
class=${b(ae.heading)}
|
|
3598
3598
|
>
|
|
3599
3599
|
${this.heading}
|
|
3600
3600
|
</div>
|
|
@@ -3608,7 +3608,7 @@ body {
|
|
|
3608
3608
|
`}},rs=sr,sr._counter=0,sr);l([a({type:String}),c("design:type",Object)],ii.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],ii.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],ii.prototype,"_hidden",void 0),ii=rs=l([p("rtg-command-group")],ii);var Fi=class extends v{constructor(...e){super(...e),this.placeholder="Type a command or search...",this._value=""}get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){let e=this.parentElement;if(e){let t=!0,r=e.querySelectorAll("rtg-command-group");r&&r.forEach(s=>{var u,g;let o=!0,n=s.querySelectorAll("rtg-command-item");n&&n.forEach(y=>{(y.value||"").toLowerCase().includes(this._value.toLowerCase())?(o=!1,t=!1,y._hidden="false"):y._hidden="true"}),s._hidden=o?"true":"false";let h=s.previousElementSibling;h&&(h._hidden=o||((u=h.previousElementSibling)==null?void 0:u.getAttribute("aria-hidden"))==="true"?"true":"false"),h=s.nextElementSibling,h&&(h._hidden=o||((g=h.nextElementSibling)==null?void 0:g.getAttribute("aria-hidden"))==="true"?"true":"false")});let i=e.querySelector("rtg-command-empty");i&&i.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){let t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return d`
|
|
3609
3609
|
<div
|
|
3610
3610
|
part="command-input"
|
|
3611
|
-
class=${
|
|
3611
|
+
class=${b(ae.input.wrapper,this.className)}
|
|
3612
3612
|
name="rtgcmd-input-container"
|
|
3613
3613
|
data-slot="rtg-command-input-wrapper"
|
|
3614
3614
|
>
|
|
@@ -3622,7 +3622,7 @@ body {
|
|
|
3622
3622
|
stroke-width="2"
|
|
3623
3623
|
stroke-linecap="round"
|
|
3624
3624
|
stroke-linejoin="round"
|
|
3625
|
-
class=${
|
|
3625
|
+
class=${b(ae.input.icon,"lucide lucide-search-icon lucide-search")}
|
|
3626
3626
|
>
|
|
3627
3627
|
<path d="m21 21-4.34-4.34" />
|
|
3628
3628
|
<circle cx="11" cy="11" r="8" />
|
|
@@ -3643,7 +3643,7 @@ body {
|
|
|
3643
3643
|
aria-controls=":r1oe:"
|
|
3644
3644
|
aria-labelledby=":r1of:"
|
|
3645
3645
|
@input="${this.handleChange}"
|
|
3646
|
-
class=${
|
|
3646
|
+
class=${b(ae.input.input)}
|
|
3647
3647
|
/>
|
|
3648
3648
|
</div>
|
|
3649
3649
|
`}};l([a({type:String}),c("design:type",Object)],Fi.prototype,"placeholder",void 0),l([a({attribute:"value",type:String}),c("design:type",Object)],Fi.prototype,"_value",void 0),Fi=l([p("rtg-command-input")],Fi);var is,or,Ge=(or=class extends _{constructor(...t){super(...t),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}li${is._counter++}`:this._id=`rtgcmdrxgxli${is._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){this.moveLightDomChildrenInto(this.containerElement)}updated(t){}render(){return d`
|
|
@@ -3661,7 +3661,7 @@ body {
|
|
|
3661
3661
|
@mouseleave="${this.handleMouseEvent}"
|
|
3662
3662
|
@focus="${this.handleMouseEvent}"
|
|
3663
3663
|
@click="${this.onSelect}"
|
|
3664
|
-
class=${
|
|
3664
|
+
class=${b(ae.item,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3665
3665
|
></div>
|
|
3666
3666
|
`}},is=or,or._counter=0,or);l([a({type:String}),c("design:type",Object)],Ge.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ge.prototype,"_hidden",void 0),l([a({type:Function}),c("design:type",Object)],Ge.prototype,"onSelect",void 0),l([a({attribute:"data-value",type:String}),a({type:Boolean}),c("design:type",Object),c("design:paramtypes",[])],Ge.prototype,"containerElement",null),l([a({attribute:"data-disabled",type:String}),c("design:type",String)],Ge.prototype,"disabled",void 0),Ge=is=l([p("rtg-command-item")],Ge);var ka=class extends _{get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}l`:"rtgcmdrxl"}get containerElement(){return this.querySelector("div[rtgcmd-list]")}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return d`
|
|
3667
3667
|
<div
|
|
@@ -3669,22 +3669,22 @@ body {
|
|
|
3669
3669
|
id="${this.identifier}"
|
|
3670
3670
|
part="command-list"
|
|
3671
3671
|
role="listbox"
|
|
3672
|
-
class=${
|
|
3672
|
+
class=${b(ae.list,this.className)}
|
|
3673
3673
|
>
|
|
3674
3674
|
<div></div>
|
|
3675
3675
|
</div>
|
|
3676
|
-
`}};ka=l([p("rtg-command-list")],ka);var ss,nr,Ti=(nr=class extends v{constructor(...t){super(...t),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}s${ss._counter++}`:this._id=`rtgcmdrxlxs${ss._counter++}`,this._id}createRenderRoot(){return this}render(){return d`${this._hidden==="true"?
|
|
3676
|
+
`}};ka=l([p("rtg-command-list")],ka);var ss,nr,Ti=(nr=class extends v{constructor(...t){super(...t),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}s${ss._counter++}`:this._id=`rtgcmdrxlxs${ss._counter++}`,this._id}createRenderRoot(){return this}render(){return d`${this._hidden==="true"?m:d`
|
|
3677
3677
|
<div
|
|
3678
3678
|
rtgcmd-separator
|
|
3679
3679
|
id="${this.identifier}"
|
|
3680
3680
|
part="command-separator"
|
|
3681
3681
|
role="separator"
|
|
3682
|
-
class=${
|
|
3682
|
+
class=${b(ae.separator,this.className)}
|
|
3683
3683
|
></div>
|
|
3684
3684
|
`}`}},ss=nr,nr._counter=0,nr);l([a({type:String}),c("design:type",Object)],Ti.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ti.prototype,"_hidden",void 0),Ti=ss=l([p("rtg-command-separator")],Ti);var Ra=class extends _{get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){let e=this.customClass||"",t=this.customStyle||"";return d`
|
|
3685
3685
|
<div
|
|
3686
3686
|
part="command"
|
|
3687
|
-
class="${
|
|
3687
|
+
class="${b(ae.root,e)}"
|
|
3688
3688
|
style="${t}"
|
|
3689
3689
|
id="rtgcmdr1"
|
|
3690
3690
|
rtgcmd-root
|
|
@@ -3702,9 +3702,9 @@ body {
|
|
|
3702
3702
|
@mouseover="${this.handleMouseEvent}"
|
|
3703
3703
|
@mouseleave="${this.handleMouseEvent}"
|
|
3704
3704
|
@focus="${this.handleMouseEvent}"
|
|
3705
|
-
class=${
|
|
3705
|
+
class=${b(Rt.checkboxItem.base,this.className)}
|
|
3706
3706
|
>
|
|
3707
|
-
<span class=${
|
|
3707
|
+
<span class=${b(Rt.checkboxItem.span)}>
|
|
3708
3708
|
${this.checked?d`
|
|
3709
3709
|
<svg
|
|
3710
3710
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3716,27 +3716,27 @@ body {
|
|
|
3716
3716
|
stroke-width="2"
|
|
3717
3717
|
stroke-linecap="round"
|
|
3718
3718
|
stroke-linejoin="round"
|
|
3719
|
-
class=${
|
|
3719
|
+
class=${b(Rt.checkboxItem.icon,"lucide lucide-check-icon lucide-check")}
|
|
3720
3720
|
>
|
|
3721
3721
|
<path d="M20 6 9 17l-5-5" />
|
|
3722
3722
|
</svg>
|
|
3723
|
-
`:
|
|
3723
|
+
`:m}
|
|
3724
3724
|
</span>
|
|
3725
3725
|
<div part="context-menu-checkbox-item-container"></div>
|
|
3726
3726
|
</div>
|
|
3727
3727
|
`}};l([a({type:String}),c("design:type",Object)],We.prototype,"_id",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],We.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],We.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],We.prototype,"checked",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],We.prototype,"disabled",void 0),We=l([p("rtg-context-menu-checkbox-item")],We);var co=class extends _{constructor(){super(),this.isOpen=!1,this.handleClickOutside=this.handleClickOutside.bind(this)}get _containerElement(){return this.querySelector("div[part=context-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleClickOutside(e){let t=this==null?void 0:this.querySelector("button");!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&requestAnimationFrame(()=>{this._containerElement.style.display="none",this._containerElement.style.position="absolute",this._containerElement.dataset.state="closed",this.isOpen=!1})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3728
3728
|
<div
|
|
3729
3729
|
part="context-menu-content"
|
|
3730
|
-
class=${
|
|
3730
|
+
class=${b(Rt.content,this.className)}
|
|
3731
3731
|
></div>
|
|
3732
3732
|
`}};l([x(),c("design:type",Object)],co.prototype,"isOpen",void 0),co=l([p("rtg-context-menu-content"),c("design:paramtypes",[])],co);var ho=class extends _{constructor(...e){super(...e),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3733
3733
|
<div
|
|
3734
3734
|
rtgcmd-group
|
|
3735
3735
|
part="context-menu-group"
|
|
3736
3736
|
role="presentation"
|
|
3737
|
-
class=${
|
|
3737
|
+
class=${b(Rt.group,this.className)}
|
|
3738
3738
|
>
|
|
3739
|
-
<div rtgcmd-group-heading class=${
|
|
3739
|
+
<div rtgcmd-group-heading class=${b(Rt.label)}>
|
|
3740
3740
|
${this.heading}
|
|
3741
3741
|
</div>
|
|
3742
3742
|
|
|
@@ -3748,7 +3748,7 @@ body {
|
|
|
3748
3748
|
role="option"
|
|
3749
3749
|
data-value="${this.value}"
|
|
3750
3750
|
?data-disabled=${this.disabled}
|
|
3751
|
-
class=${
|
|
3751
|
+
class=${b(Rt.item,this.className)}
|
|
3752
3752
|
></div>
|
|
3753
3753
|
`}};l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Li.prototype,"value",null),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Li.prototype,"disabled",void 0),Li=l([p("rtg-context-menu-item")],Li);var Ke=class extends _{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-radio-item-container]")}getAttributesToExclude(){return["data-testid"]}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})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3754
3754
|
<div
|
|
@@ -3763,9 +3763,9 @@ body {
|
|
|
3763
3763
|
@mouseover="${this.handleMouseEvent}"
|
|
3764
3764
|
@mouseleave="${this.handleMouseEvent}"
|
|
3765
3765
|
@focus="${this.handleMouseEvent}"
|
|
3766
|
-
class=${
|
|
3766
|
+
class=${b(Rt.radioItem.base,this.className)}
|
|
3767
3767
|
>
|
|
3768
|
-
<span class=${
|
|
3768
|
+
<span class=${b(Rt.radioItem.span)}>
|
|
3769
3769
|
${this.checked?d`<svg
|
|
3770
3770
|
xmlns="http://www.w3.org/2000/svg"
|
|
3771
3771
|
width="24"
|
|
@@ -3776,10 +3776,10 @@ body {
|
|
|
3776
3776
|
stroke-width="2"
|
|
3777
3777
|
stroke-linecap="round"
|
|
3778
3778
|
stroke-linejoin="round"
|
|
3779
|
-
class=${
|
|
3779
|
+
class=${b(Rt.radioItem.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
3780
3780
|
>
|
|
3781
3781
|
<circle cx="12" cy="12" r="10" />
|
|
3782
|
-
</svg>`:
|
|
3782
|
+
</svg>`:m}
|
|
3783
3783
|
</span>
|
|
3784
3784
|
<div part="context-menu-radio-item-container"></div>
|
|
3785
3785
|
</div>
|
|
@@ -3788,47 +3788,47 @@ body {
|
|
|
3788
3788
|
rtgcmd-separator
|
|
3789
3789
|
part="context-menu-separator"
|
|
3790
3790
|
role="separator"
|
|
3791
|
-
class=${
|
|
3791
|
+
class=${b(Rt.separator,this.className)}
|
|
3792
3792
|
></div>
|
|
3793
|
-
`}};l([a({type:String}),c("design:type",Object)],uo.prototype,"_id",void 0),uo=l([p("rtg-context-menu-separator")],uo);var Ia=class extends _{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=
|
|
3793
|
+
`}};l([a({type:String}),c("design:type",Object)],uo.prototype,"_id",void 0),uo=l([p("rtg-context-menu-separator")],uo);var Ia=class extends _{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=b(Rt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3794
3794
|
<span
|
|
3795
3795
|
part="context-menu-shortcut"
|
|
3796
|
-
class=${
|
|
3796
|
+
class=${b(Rt.shortcut,this.className)}
|
|
3797
3797
|
>
|
|
3798
3798
|
</span>
|
|
3799
3799
|
`}};Ia=l([p("rtg-context-menu-shortcut")],Ia);var Oa=class extends v{createRenderRoot(){return this}render(){return d``}};Oa=l([p("rtg-context-menu-trigger")],Oa);var po=class extends _{constructor(...e){super(...e),this.isOpen=!1,this.handleClickOutside=t=>{let r=t.target;this!=null&&this.contains(r)||(this.isOpen=!1)}}get _containerElement(){return this.querySelector("div[part=context-menu]")}get _triggerElement(){return this.querySelector("rtg-context-menu-trigger")}get _content(){return this==null?void 0:this.querySelector("div[part=context-menu-content]")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected),this.addEventListener("close-context-menu",()=>{this.isOpen=!1,requestAnimationFrame(()=>{let e=this._content;e&&(e.style.display="none")})})}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();let{clientX:t,clientY:r}=e,i=e.target.getBoundingClientRect();requestAnimationFrame(()=>{let s=this._content;s&&(s.style.display="",s.style.position="absolute",s.style.left=`${t-i.left}px`,s.style.top=`${r-i.top}px`,s.dataset.state="open",this.isOpen=!0)})}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}_handleRadioSelected(e){this.querySelectorAll("rtg-context-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}getAttributesToExclude(){return[]}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("contextmenu",r=>{this.toggleDropdown(r)}),this.style.position="relative"}createRenderRoot(){return this}render(){return d`
|
|
3800
3800
|
<div
|
|
3801
3801
|
part="context-menu"
|
|
3802
|
-
class=${
|
|
3802
|
+
class=${b(Rt.root,this.className)}
|
|
3803
3803
|
></div>
|
|
3804
3804
|
`}};l([x(),c("design:type",Object)],po.prototype,"isOpen",void 0),po=l([p("rtg-context-menu")],po);var un={root:["rtg-relative"],trigger:[""],content:["rtg-absolute rtg-z-50","rtg-p-popover-content-space-p","rtg-w-popover-content-space-w","rtg-text-popover-content-color-text","rtg-bg-popover-content-color-bg","rtg-rounded-popover-content-radius rtg-border-popover-content-width-border rtg-border-popover-content-color-border rtg-outline-hidden","rtg-shadow-popover-content-shadow",'data-[state="open"]:rtg-block data-[state="closed"]:rtg-hidden','data-[state="open"]:rtg-animate-in data-[state="open"]:rtg-fade-in-0 data-[state="open"]:rtg-zoom-in-95','data-[state="closed"]:rtg-animate-out data-[state="closed"]:rtg-fade-out-0 data-[state="closed"]:rtg-zoom-out-95',"rtg-translate-y-0.5"]},Ar=class extends _{constructor(...e){super(...e),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof mi);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){let t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3805
3805
|
<div
|
|
3806
3806
|
part="popover-content"
|
|
3807
3807
|
data-state=${this.state}
|
|
3808
|
-
class=${
|
|
3808
|
+
class=${b(un.content,this.className)}
|
|
3809
3809
|
@click="${this.preventClickPropagation}"
|
|
3810
3810
|
></div>
|
|
3811
3811
|
`}};l([a({type:Boolean}),c("design:type",Object)],Ar.prototype,"enableDefaultStyle",void 0),l([a({type:Boolean}),c("design:type",Object)],Ar.prototype,"styleContent",void 0),l([a({type:String}),c("design:type",String)],Ar.prototype,"side",void 0),l([a({attribute:"data-state",type:String}),c("design:type",String)],Ar.prototype,"state",void 0),Ar=l([p("rtg-popover-content")],Ar);var Aa=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._popover;t&&(t.isOpen=!t.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof mi);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return d`
|
|
3812
3812
|
<div
|
|
3813
3813
|
part="popover-trigger"
|
|
3814
|
-
class=${
|
|
3814
|
+
class=${b(un.trigger,this.className)}
|
|
3815
3815
|
></div>
|
|
3816
3816
|
`}};Aa=l([p("rtg-popover-trigger")],Aa);var mi=class extends _{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=popover]")}get _contentElement(){return this.querySelector("rtg-popover-content")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){this._contentElement.state=this.isOpen?"open":"closed",this._contentElement.requestUpdate()}render(){return d`
|
|
3817
|
-
<div part="popover" class=${
|
|
3817
|
+
<div part="popover" class=${b(un.root,this.className)}></div>
|
|
3818
3818
|
`}};l([x(),c("design:type",Boolean)],mi.prototype,"isOpen",void 0),mi=l([p("rtg-popover")],mi);var Ni={root:[""],trigger:[""],triggerButton:[gi({variant:"outline"}).replace("rtg-justify-center",""),"rtg-justify-start","rtg-w-date-picker-trigger-button-space-w","rtg-text-left rtg-font-date-picker-trigger-button-font-weight","data-[empty=true]:rtg-text-date-picker-trigger-button-color-text-empty"],content:["rtg-p-date-picker-content-space-p","rtg-w-auto"]},go=class extends v{constructor(...e){super(...e),this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return d`
|
|
3819
3819
|
<rtg-popover
|
|
3820
|
-
class=${
|
|
3820
|
+
class=${b("date-picker",Ni.root,this.className)}
|
|
3821
3821
|
@date-selected=${this.handleDateSelected}
|
|
3822
3822
|
>
|
|
3823
3823
|
<rtg-popover-trigger
|
|
3824
3824
|
as-child
|
|
3825
|
-
class=${
|
|
3825
|
+
class=${b("date-picker-trigger",Ni.trigger)}
|
|
3826
3826
|
>
|
|
3827
3827
|
<button
|
|
3828
3828
|
data-variant="outline"
|
|
3829
3829
|
data-size="default"
|
|
3830
3830
|
data-empty=${this.selectedDate?"false":"true"}
|
|
3831
|
-
class=${
|
|
3831
|
+
class=${b("date-picker-trigger-button",Ni.triggerButton)}
|
|
3832
3832
|
>
|
|
3833
3833
|
<svg
|
|
3834
3834
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3853,7 +3853,7 @@ body {
|
|
|
3853
3853
|
</rtg-popover-trigger>
|
|
3854
3854
|
|
|
3855
3855
|
<rtg-popover-content
|
|
3856
|
-
class=${
|
|
3856
|
+
class=${b("date-picker-content",Ni.content)}
|
|
3857
3857
|
>
|
|
3858
3858
|
<rtg-calendar mode="single"></rtg-calendar>
|
|
3859
3859
|
</rtg-popover-content>
|
|
@@ -3861,13 +3861,13 @@ body {
|
|
|
3861
3861
|
`}};l([a({type:Object}),c("design:type",Object)],go.prototype,"selectedDate",void 0),go=l([p("rtg-date-picker")],go);var Zt={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-dialog-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-top-[50%] rtg-left-[50%] rtg-z-50","rtg-grid rtg-gap-dialog-content-space-gap","rtg-p-dialog-content-space-p","rtg-w-dialog-content-space-w rtg-max-w-dialog-content-space-max-w-sm sm:rtg-max-w-dialog-content-space-max-w","rtg-bg-dialog-content-color-bg","rtg-rounded-dialog-content-radius rtg-border-dialog-content-width-border rtg-border-dialog-content-color-border rtg-outline-none","rtg-shadow-dialog-content-shadow","rtg-duration-200","rtg-translate-x-[-50%] rtg-translate-y-[-50%]","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],close:{base:["rtg-absolute rtg-top-4 rtg-right-4","rtg-rounded-dialog-close-radius","rtg-ring-offset-dialog-close-color-ring-offset","rtg-transition-opacity","focus:rtg-ring-dialog-close-width-ring-focus focus:rtg-ring-dialog-close-color-ring-focus focus:rtg-ring-offset-dialog-close-width-ring-offset focus:rtg-outline-hidden","disabled:rtg-pointer-events-none","data-[state=open]:rtg-bg-dialog-close-color-bg data-[state=open]:rtg-text-dialog-close-color-text"],icon:["rtg-shrink-0","rtg-size-dialog-close-icon-space-size","rtg-pointer-events-none"]}},header:["rtg-flex rtg-flex-col rtg-gap-dialog-header-space-gap","rtg-text-center","sm:rtg-text-left"],footer:["rtg-flex rtg-flex-col-reverse rtg-gap-dialog-footer-space-gap","sm:rtg-flex-row sm:rtg-justify-end"],title:["rtg-text-dialog-title-font rtg-font-dialog-title-font-weight"],description:["rtg-text-dialog-description-font rtg-font-dialog-description-font-weight rtg-text-dialog-description-color-text"]},Xh="closed",Pa=class extends _{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{let t=this._dialog;t&&(t.dataset.state=Xh)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3862
3862
|
<div
|
|
3863
3863
|
part="dialog-close"
|
|
3864
|
-
class=${
|
|
3864
|
+
class=${b(Zt.close,this.className)}
|
|
3865
3865
|
></div>
|
|
3866
3866
|
`}};Pa=l([p("rtg-dialog-close")],Pa);var mo="closed",zi=class extends _{constructor(...e){super(...e),this.state=mo,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{let t=this._dialog;t&&(t.dataset.state=mo)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===mo?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return d`
|
|
3867
3867
|
<div
|
|
3868
3868
|
rtgdlg-content
|
|
3869
3869
|
part="dialog-content"
|
|
3870
|
-
class=${
|
|
3870
|
+
class=${b(Zt.content.base,this.className)}
|
|
3871
3871
|
>
|
|
3872
3872
|
<div part="dialog-content-slot"></div>
|
|
3873
3873
|
|
|
@@ -3876,7 +3876,7 @@ body {
|
|
|
3876
3876
|
data-slot="dialog-content-close"
|
|
3877
3877
|
type="button"
|
|
3878
3878
|
@click=${this.handleCloseButtonClick}
|
|
3879
|
-
class=${
|
|
3879
|
+
class=${b(Zt.content.close.base)}
|
|
3880
3880
|
>
|
|
3881
3881
|
<svg
|
|
3882
3882
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3888,7 +3888,7 @@ body {
|
|
|
3888
3888
|
stroke-width="2"
|
|
3889
3889
|
stroke-linecap="round"
|
|
3890
3890
|
stroke-linejoin="round"
|
|
3891
|
-
class=${
|
|
3891
|
+
class=${b(Zt.content.close.icon,"lucide lucide-x-icon lucide-x")}
|
|
3892
3892
|
>
|
|
3893
3893
|
<path d="M18 6 6 18" />
|
|
3894
3894
|
<path d="m6 6 12 12" />
|
|
@@ -3901,41 +3901,41 @@ body {
|
|
|
3901
3901
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],zi.prototype,"state",void 0),l([a({attribute:"show-close-button",type:Boolean}),c("design:type",Object)],zi.prototype,"showCloseButton",void 0),zi=l([p("rtg-dialog-content")],zi);var Fa=class extends _{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3902
3902
|
<div
|
|
3903
3903
|
part="dialog-footer"
|
|
3904
|
-
class=${
|
|
3904
|
+
class=${b(Zt.footer,this.className)}
|
|
3905
3905
|
></div>
|
|
3906
3906
|
`}};Fa=l([p("rtg-dialog-footer")],Fa);var ji=class extends v{constructor(...e){super(...e),this._title="",this.description=""}createRenderRoot(){return this}render(){return d`
|
|
3907
3907
|
<div
|
|
3908
3908
|
part="dialog-header"
|
|
3909
|
-
class=${
|
|
3909
|
+
class=${b(Zt.header,this.className)}
|
|
3910
3910
|
>
|
|
3911
|
-
<h2 class=${
|
|
3911
|
+
<h2 class=${b(Zt.title,this.className)}>${this._title}</h2>
|
|
3912
3912
|
|
|
3913
|
-
<p class=${
|
|
3913
|
+
<p class=${b(Zt.description,this.className)}>
|
|
3914
3914
|
${this.description}
|
|
3915
3915
|
</p>
|
|
3916
3916
|
</div>
|
|
3917
3917
|
`}};l([a({attribute:"title",type:String}),c("design:type",Object)],ji.prototype,"_title",void 0),l([a({type:String}),c("design:type",Object)],ji.prototype,"description",void 0),ji=l([p("rtg-dialog-header")],ji);var Ta=class extends v{createRenderRoot(){return this}render(){return d`
|
|
3918
3918
|
<div
|
|
3919
3919
|
part="dialog-overly"
|
|
3920
|
-
class=${
|
|
3920
|
+
class=${b(Zt.overlay,this.className)}
|
|
3921
3921
|
></div>
|
|
3922
3922
|
`}};Ta=l([p("rtg-dialog-overlay")],Ta);var Zh="open",La=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._dialog;t&&(t.dataset.state=Zh)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return d`
|
|
3923
3923
|
<div
|
|
3924
3924
|
part="dialog-trigger"
|
|
3925
|
-
class=${
|
|
3925
|
+
class=${b(Zt.trigger,this.className)}
|
|
3926
3926
|
></div>
|
|
3927
3927
|
`}};La=l([p("rtg-dialog-trigger")],La);var Jh="open",Qh="closed",Dr=class extends _{constructor(...e){super(...e),this.state=Qh}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-dialog-content")||null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return d`
|
|
3928
3928
|
<div
|
|
3929
3929
|
rtgdlg-root
|
|
3930
3930
|
part="dialog"
|
|
3931
|
-
class=${
|
|
3931
|
+
class=${b(Zt.root,this.className)}
|
|
3932
3932
|
>
|
|
3933
|
-
${this.state===Jh?d` <rtg-dialog-overlay></rtg-dialog-overlay>`:
|
|
3933
|
+
${this.state===Jh?d` <rtg-dialog-overlay></rtg-dialog-overlay>`:m}
|
|
3934
3934
|
</div>
|
|
3935
3935
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Dr.prototype,"state",void 0),Dr=l([p("rtg-dialog")],Dr);var oe={open:"open",closed:"closed"},le={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-drawer-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-inset-x-0 rtg-bottom-0 rtg-z-50","rtg-flex rtg-flex-col","rtg-mt-drawer-content-space-mt","rtg-h-auto rtg-max-h-[80vh]","rtg-bg-drawer-content-color-bg","rtg-rounded-t-drawer-content-radius rtg-border-t-drawer-content-width-border rtg-border-t-drawer-content-color-border"],thumb:["rtg-shrink-0","rtg-mx-auto rtg-mt-drawer-thumb-space-mt","rtg-w-drawer-thumb-space-w rtg-h-drawer-thumb-space-h","rtg-bg-drawer-thumb-color-bg","rtg-rounded-drawer-thumb-radius"]},header:["rtg-flex rtg-flex-col rtg-gap-drawer-header-space-gap-sm md:rtg-gap-drawer-header-space-gap","rtg-p-drawer-header-space-p","rtg-text-center"],footer:["rtg-flex rtg-flex-col rtg-gap-drawer-footer-space-gap","rtg-p-drawer-footer-space-p rtg-mt-auto"],title:["rtg-text-drawer-title-font rtg-font-drawer-title-font-weight rtg-text-drawer-title-color-text"],description:["rtg-text-drawer-description-font rtg-font-drawer-description-font-weight rtg-text-drawer-description-color-text"]},Na=class extends _{get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof bi)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-close]")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;let t=this._containerElement;if(t){this.moveLightDomChildrenInto(t);let r=t.querySelector("button, [data-close], [role=button]");r&&r.addEventListener("click",i=>{i.stopPropagation();let s=this._drawer;s&&(s.dataset.state=oe.closed)})}}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3936
3936
|
<div
|
|
3937
3937
|
part="drawer-close"
|
|
3938
|
-
class=${
|
|
3938
|
+
class=${b(le.close,this.className)}
|
|
3939
3939
|
></div>
|
|
3940
3940
|
`}};Na=l([p("rtg-drawer-close")],Na);var bo=class extends _{constructor(...e){super(...e),this.state=oe.closed}connectedCallback(){super.connectedCallback();let e=document.createElement("style");e.textContent=`
|
|
3941
3941
|
@keyframes slideInUp {
|
|
@@ -3961,48 +3961,48 @@ body {
|
|
|
3961
3961
|
<div
|
|
3962
3962
|
rtgdlg-content
|
|
3963
3963
|
part="drawer-content"
|
|
3964
|
-
class=${
|
|
3964
|
+
class=${b(le.content.base,this.state===oe.open?"drawer-open":"drawer-closed",this.className)}
|
|
3965
3965
|
>
|
|
3966
|
-
<div part="drawer-thumb" class=${
|
|
3966
|
+
<div part="drawer-thumb" class=${b(le.content.thumb)}></div>
|
|
3967
3967
|
<div part="drawer-content-slot"></div>
|
|
3968
3968
|
</div>
|
|
3969
3969
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],bo.prototype,"state",void 0),bo=l([p("rtg-drawer-content")],bo);var za=class extends _{get _containerElement(){return this.querySelector("p[part=drawer-description")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3970
3970
|
<p
|
|
3971
3971
|
part="drawer-description"
|
|
3972
|
-
class=${
|
|
3972
|
+
class=${b(le.description,this.className)}
|
|
3973
3973
|
></p>
|
|
3974
3974
|
`}};za=l([p("rtg-drawer-description")],za);var ja=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3975
3975
|
<div
|
|
3976
3976
|
part="drawer-footer"
|
|
3977
|
-
class=${
|
|
3977
|
+
class=${b(le.footer,this.className)}
|
|
3978
3978
|
></div>
|
|
3979
3979
|
`}};ja=l([p("rtg-drawer-footer")],ja);var Ua=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-header")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3980
3980
|
<div
|
|
3981
3981
|
part="drawer-header"
|
|
3982
|
-
class=${
|
|
3982
|
+
class=${b(le.header,this.className)}
|
|
3983
3983
|
></div>
|
|
3984
3984
|
`}};Ua=l([p("rtg-drawer-header")],Ua);var Da=class extends v{createRenderRoot(){return this}render(){return d`
|
|
3985
3985
|
<div
|
|
3986
3986
|
part="drawer-overly"
|
|
3987
|
-
class=${
|
|
3987
|
+
class=${b(le.overlay,this.className)}
|
|
3988
3988
|
></div>
|
|
3989
3989
|
`}};Da=l([p("rtg-drawer-overlay")],Da);var Ba=class extends _{get _containerElement(){return this.querySelector("h2[part=drawer-title")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3990
3990
|
<h2
|
|
3991
3991
|
part="drawer-title"
|
|
3992
|
-
class=${
|
|
3992
|
+
class=${b(le.title,this.className)}
|
|
3993
3993
|
></h2>
|
|
3994
3994
|
`}};Ba=l([p("rtg-drawer-title")],Ba);var Ma=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._drawer;t&&(t.dataset.state=oe.open)}}get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof bi)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return d`
|
|
3995
3995
|
<div
|
|
3996
3996
|
part="drawer-trigger"
|
|
3997
|
-
class=${
|
|
3997
|
+
class=${b(le.trigger,this.className)}
|
|
3998
3998
|
></div>
|
|
3999
3999
|
`}};Ma=l([p("rtg-drawer-trigger")],Ma);var bi=class extends _{constructor(...e){super(...e),this.state=oe.closed,this.handleOutsideClick=t=>{let r=this._content;this.state===oe.open&&r&&(r.contains(t.target)||(this.state=oe.closed,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-drawer-content")||null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===oe.open?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return d`
|
|
4000
4000
|
<div
|
|
4001
4001
|
rtgdlg-root
|
|
4002
4002
|
part="drawer"
|
|
4003
|
-
class=${
|
|
4003
|
+
class=${b(le.root,this.className)}
|
|
4004
4004
|
>
|
|
4005
|
-
${this.state===oe.open?d` <rtg-drawer-overlay></rtg-drawer-overlay>`:
|
|
4005
|
+
${this.state===oe.open?d` <rtg-drawer-overlay></rtg-drawer-overlay>`:m}
|
|
4006
4006
|
</div>
|
|
4007
4007
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],bi.prototype,"state",void 0),bi=l([p("rtg-drawer")],bi);var It={root:[""],content:["rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-p-dropdown-menu-content-space-p","rtg-min-w-dropdown-menu-content-space-min-w","rtg-text-dropdown-menu-content-color-text","rtg-bg-dropdown-menu-content-color-bg","rtg-rounded-dropdown-menu-content-radius rtg-border-dropdown-menu-content-width-border rtg-border-dropdown-menu-content-color-border","rtg-shadow-dropdown-menu-content-shadow","rtg-translate-y-0.5","rtg-slide-in-from-top-2","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],group:[""],item:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-item-space-gap rtg-items-center","rtg-px-dropdown-menu-item-space-px rtg-py-dropdown-menu-item-space-py","rtg-text-dropdown-menu-item-font","rtg-rounded-dropdown-menu-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","hover:rtg-bg-dropdown-menu-item-color-bg-hover hover:rtg-text-dropdown-menu-item-color-text-hover","focus:rtg-bg-dropdown-menu-item-color-bg-focus focus:rtg-text-dropdown-menu-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-dropdown-menu-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-checkbox-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-checkbox-item-space-pl rtg-pr-dropdown-menu-checkbox-item-space-pr rtg-py-dropdown-menu-checkbox-item-space-py","rtg-text-dropdown-menu-checkbox-item-font","rtg-rounded-dropdown-menu-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-checkbox-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-radio-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-radio-item-space-pl rtg-pr-dropdown-menu-radio-item-space-pr rtg-py-dropdown-menu-radio-item-space-py","rtg-text-dropdown-menu-radio-item-font","rtg-rounded-dropdown-menu-radio-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-radio-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-dropdown-menu-label-space-px rtg-py-dropdown-menu-label-space-py","rtg-text-dropdown-menu-label-font rtg-font-dropdown-menu-label-font-weight"],separator:["rtg-mx-dropdown-menu-separator-space-mx rtg-my-dropdown-menu-separator-space-my","rtg-h-dropdown-menu-separator-space-h","rtg-bg-dropdown-menu-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-dropdown-menu-shortcut-font rtg-text-dropdown-menu-shortcut-color-text"]},Ye=class extends _{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-checkbox-item-container]")}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this._dropdownMenu.isOpen=!1,this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4008
4008
|
<div
|
|
@@ -4019,9 +4019,9 @@ body {
|
|
|
4019
4019
|
@mouseover="${this.handleMouseEvent}"
|
|
4020
4020
|
@mouseleave="${this.handleMouseEvent}"
|
|
4021
4021
|
@focus="${this.handleMouseEvent}"
|
|
4022
|
-
class=${
|
|
4022
|
+
class=${b(It.checkboxItem.base,this.className)}
|
|
4023
4023
|
>
|
|
4024
|
-
<span class=${
|
|
4024
|
+
<span class=${b(It.checkboxItem.span)}>
|
|
4025
4025
|
${this.checked?d`
|
|
4026
4026
|
<svg
|
|
4027
4027
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4033,11 +4033,11 @@ body {
|
|
|
4033
4033
|
stroke-width="2"
|
|
4034
4034
|
stroke-linecap="round"
|
|
4035
4035
|
stroke-linejoin="round"
|
|
4036
|
-
class=${
|
|
4036
|
+
class=${b(It.checkboxItem.icon,"lucide lucide-check-icon lucide-check")}
|
|
4037
4037
|
>
|
|
4038
4038
|
<path d="M20 6 9 17l-5-5" />
|
|
4039
4039
|
</svg>
|
|
4040
|
-
`:
|
|
4040
|
+
`:m}
|
|
4041
4041
|
</span>
|
|
4042
4042
|
<div part="dropdown-menu-checkbox-item-container"></div>
|
|
4043
4043
|
</div>
|
|
@@ -4046,22 +4046,22 @@ body {
|
|
|
4046
4046
|
data-slot="dropdown-menu-content"
|
|
4047
4047
|
part="dropdown-menu-content"
|
|
4048
4048
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4049
|
-
class=${
|
|
4049
|
+
class=${b(It.content,this.className)}
|
|
4050
4050
|
></div>
|
|
4051
|
-
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Ui.prototype,"state",void 0),l([x(),c("design:type",Object)],Ui.prototype,"isOpen",void 0),Ui=l([p("rtg-dropdown-menu-content")],Ui);var si=class extends _{constructor(...e){super(...e),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?
|
|
4051
|
+
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Ui.prototype,"state",void 0),l([x(),c("design:type",Object)],Ui.prototype,"isOpen",void 0),Ui=l([p("rtg-dropdown-menu-content")],Ui);var si=class extends _{constructor(...e){super(...e),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?m:d`
|
|
4052
4052
|
<div
|
|
4053
4053
|
rtgcmd-group
|
|
4054
4054
|
part="dropdown-menu-group"
|
|
4055
4055
|
role="presentation"
|
|
4056
|
-
class=${
|
|
4056
|
+
class=${b(It.group,this.className)}
|
|
4057
4057
|
>
|
|
4058
|
-
<div rtgcmd-group-heading class=${
|
|
4058
|
+
<div rtgcmd-group-heading class=${b(It.label)}>
|
|
4059
4059
|
${this.heading}
|
|
4060
4060
|
</div>
|
|
4061
4061
|
|
|
4062
4062
|
<div rtgcmd-group-items role="group"></div>
|
|
4063
4063
|
</div>
|
|
4064
|
-
`}`}};l([a({type:String}),c("design:type",Object)],si.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],si.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],si.prototype,"_hidden",void 0),si=l([p("rtg-dropdown-menu-group")],si);var Xe=class extends _{constructor(...e){super(...e),this._id="",this._hidden="",this.selected=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=dropdown-menu-item]")}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}handleMouseEvent(e){console.log(e,this.value),(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}handleClickDefault(){this._dropdownMenu.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d` ${this._hidden==="true"?
|
|
4064
|
+
`}`}};l([a({type:String}),c("design:type",Object)],si.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],si.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],si.prototype,"_hidden",void 0),si=l([p("rtg-dropdown-menu-group")],si);var Xe=class extends _{constructor(...e){super(...e),this._id="",this._hidden="",this.selected=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=dropdown-menu-item]")}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}handleMouseEvent(e){console.log(e,this.value),(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}handleClickDefault(){this._dropdownMenu.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d` ${this._hidden==="true"?m:d`
|
|
4065
4065
|
<div
|
|
4066
4066
|
rtgcmd-item
|
|
4067
4067
|
part="dropdown-menu-item"
|
|
@@ -4075,7 +4075,7 @@ body {
|
|
|
4075
4075
|
@mouseleave="${this.handleMouseEvent}"
|
|
4076
4076
|
@focus="${this.handleMouseEvent}"
|
|
4077
4077
|
@click="${this.handleClickDefault}"
|
|
4078
|
-
class=${
|
|
4078
|
+
class=${b(It.item,this.className)}
|
|
4079
4079
|
></div>
|
|
4080
4080
|
`}`}};l([a({type:String}),c("design:type",Object)],Xe.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Xe.prototype,"_hidden",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Xe.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Xe.prototype,"selected",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Xe.prototype,"disabled",void 0),Xe=l([p("rtg-dropdown-menu-item")],Xe);var Se=class extends _{constructor(...e){super(...e),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-radio-item-container]")}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})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4081
4081
|
<div
|
|
@@ -4092,9 +4092,9 @@ body {
|
|
|
4092
4092
|
@mouseover="${this.handleMouseEvent}"
|
|
4093
4093
|
@mouseleave="${this.handleMouseEvent}"
|
|
4094
4094
|
@focus="${this.handleMouseEvent}"
|
|
4095
|
-
class=${
|
|
4095
|
+
class=${b(It.radioItem.base,this.className)}
|
|
4096
4096
|
>
|
|
4097
|
-
<span class=${
|
|
4097
|
+
<span class=${b(It.radioItem.span)}>
|
|
4098
4098
|
${this.checked?d`<svg
|
|
4099
4099
|
xmlns="http://www.w3.org/2000/svg"
|
|
4100
4100
|
width="24"
|
|
@@ -4105,10 +4105,10 @@ body {
|
|
|
4105
4105
|
stroke-width="2"
|
|
4106
4106
|
stroke-linecap="round"
|
|
4107
4107
|
stroke-linejoin="round"
|
|
4108
|
-
class=${
|
|
4108
|
+
class=${b(It.radioItem.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
4109
4109
|
>
|
|
4110
4110
|
<circle cx="12" cy="12" r="10" />
|
|
4111
|
-
</svg>`:
|
|
4111
|
+
</svg>`:m}
|
|
4112
4112
|
</span>
|
|
4113
4113
|
<div part="dropdown-menu-radio-item-container"></div>
|
|
4114
4114
|
</div>
|
|
@@ -4116,17 +4116,17 @@ body {
|
|
|
4116
4116
|
rtgcmd-separator
|
|
4117
4117
|
part="dropdown-menu-seperator"
|
|
4118
4118
|
role="separator"
|
|
4119
|
-
class=${
|
|
4120
|
-
></div>`}};qa=l([p("rtg-dropdown-menu-separator")],qa);var Va=class extends _{get _containerElement(){return this.querySelector("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=
|
|
4119
|
+
class=${b(It.separator,this.className)}
|
|
4120
|
+
></div>`}};qa=l([p("rtg-dropdown-menu-separator")],qa);var Va=class extends _{get _containerElement(){return this.querySelector("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=b(It.shortcut),this}render(){return d`
|
|
4121
4121
|
<span
|
|
4122
4122
|
part="dropdown-menu-shortcut"
|
|
4123
|
-
class=${
|
|
4123
|
+
class=${b(It.shortcut,this.className)}
|
|
4124
4124
|
>
|
|
4125
4125
|
</span>
|
|
4126
4126
|
`}};Va=l([p("rtg-dropdown-menu-shortcut")],Va);var Ha=class extends v{createRenderRoot(){return this}render(){return d``}};Ha=l([p("rtg-dropdown-menu-trigger")],Ha);var Bt,ar,Br=(ar=class extends _{constructor(...t){super(...t),this.isOpen=!1,this.handleClickOutside=r=>{var s,o;let i=r.target;!((s=this._containerElement)!=null&&s.contains(i))&&!((o=this._triggerElement)!=null&&o.contains(i))&&(this.isOpen=!1,Bt._openInstance===this&&(Bt._openInstance=null))}}get _triggerElement(){return this.querySelector("rtg-dropdown-menu-trigger")}get _containerElement(){return this.querySelector("div[part=dropdown-menu]")}get _content(){return this.querySelector("rtg-dropdown-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}toggleDropdown(t){t.stopPropagation();let r=this.isOpen;this.isOpen=!this.isOpen,this.isOpen?(Bt._openInstance&&Bt._openInstance!==this&&(Bt._openInstance.isOpen=!1),Bt._openInstance=this):r&&Bt._openInstance===this&&(Bt._openInstance=null)}disconnectedCallback(){Bt._openInstance===this&&(Bt._openInstance=null),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}updated(t){super.updated(t);let r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}firstUpdated(t){var r;this.moveLightDomChildrenInto(this._containerElement),(r=this._triggerElement)==null||r.addEventListener("click",i=>this.toggleDropdown(i))}_handleRadioSelected(t){this.isOpen=!1,this.querySelectorAll("rtg-dropdown-menu-radio-item").forEach(r=>{r!==t.target&&(r.checked=!1)})}createRenderRoot(){return this}render(){return d`
|
|
4127
4127
|
<div
|
|
4128
4128
|
part="dropdown-menu"
|
|
4129
|
-
class=${
|
|
4129
|
+
class=${b(It.root,this.className)}
|
|
4130
4130
|
></div>
|
|
4131
4131
|
`}},Bt=ar,ar._openInstance=null,ar);l([x(),c("design:type",Object)],Br.prototype,"isOpen",void 0),Br=Bt=l([p("rtg-dropdown-menu")],Br);var fo=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="empty"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="empty" ?data-border="${this.border}"></div>`}};l([a({type:Boolean}),c("design:type",Boolean)],fo.prototype,"border",void 0),fo=l([p("rtg-empty")],fo);var Ga=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="empty-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="empty-content"></div>`}};Ga=l([p("rtg-empty-content")],Ga);var Wa=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="empty-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="empty-description"></div>`}};Wa=l([p("rtg-empty-description")],Wa);var Ka=class extends v{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="empty-header"]')}firstUpdated(){let e=this._headerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="empty-header"></div>`}};Ka=l([p("rtg-empty-header")],Ka);var vo=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="empty-media"]')}firstUpdated(){let e=this._mediaSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4132
4132
|
<div data-slot="empty-media" data-variant="${this.variant}"></div>
|
|
@@ -4136,12 +4136,12 @@ body {
|
|
|
4136
4136
|
<div
|
|
4137
4137
|
data-slot="field"
|
|
4138
4138
|
data-orientation=${this.orientation}
|
|
4139
|
-
data-disabled=${this.disabled?"true":
|
|
4140
|
-
data-invalid=${this.invalid?"true":
|
|
4139
|
+
data-disabled=${this.disabled?"true":m}
|
|
4140
|
+
data-invalid=${this.invalid?"true":m}
|
|
4141
4141
|
role="group"
|
|
4142
4142
|
></div>
|
|
4143
|
-
`}};l([a({type:String}),c("design:type",Object)],oi.prototype,"orientation",void 0),l([a({type:Boolean}),c("design:type",Boolean)],oi.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],oi.prototype,"invalid",void 0),oi=l([p("rtg-field")],oi);var Za=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="field-content"></div>`}};Za=l([p("rtg-field-content")],Za);var _o=class extends v{get _rootSlot(){return this.querySelector('[data-slot="label"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<label data-slot="label" for=${this.for??
|
|
4144
|
-
<rtg-label data-slot="field-label" for=${this.for??
|
|
4143
|
+
`}};l([a({type:String}),c("design:type",Object)],oi.prototype,"orientation",void 0),l([a({type:Boolean}),c("design:type",Boolean)],oi.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],oi.prototype,"invalid",void 0),oi=l([p("rtg-field")],oi);var Za=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="field-content"></div>`}};Za=l([p("rtg-field-content")],Za);var _o=class extends v{get _rootSlot(){return this.querySelector('[data-slot="label"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<label data-slot="label" for=${this.for??m}></label>`}};l([a({type:String}),c("design:type",String)],_o.prototype,"for",void 0),_o=l([p("rtg-label")],_o);var xo=class extends v{createRenderRoot(){return this}get _labelSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){let e=this._labelSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4144
|
+
<rtg-label data-slot="field-label" for=${this.for??m}></rtg-label>
|
|
4145
4145
|
`}};l([a({type:String}),c("design:type",String)],xo.prototype,"for",void 0),xo=l([p("rtg-field-label")],xo);var Ja=class extends v{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){let e=this._titleSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="field-label"></div>`}};Ja=l([p("rtg-field-title")],Ja);var Qa=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="field-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<p data-slot="field-description"></p>`}};Qa=l([p("rtg-field-description")],Qa);var tl=class extends v{constructor(...e){super(...e),this._observer=null}createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="field-separator"]')}get _contentSlot(){return this.querySelector('[data-slot="field-separator-content"]')}_getExternalNodes(){let e=this._separatorSlot;return Array.from(this.childNodes).filter(t=>{var r;return!(t===e||t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&!((r=t.textContent)!=null&&r.trim()))})}_processChildren(){let e=this._separatorSlot;if(!e)return;let t=this._getExternalNodes();if(t.length>0){let r=this._contentSlot;r||(r=document.createElement("span"),r.setAttribute("data-slot","field-separator-content"),e.appendChild(r)),t.forEach(i=>r.appendChild(i)),e.setAttribute("data-content","true")}else{let r=this._contentSlot;r&&e.removeChild(r),e.setAttribute("data-content","false")}}firstUpdated(){this._processChildren(),this._observer=new MutationObserver(()=>{this._observer.disconnect(),this._processChildren(),this._observer.observe(this,{childList:!0})}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._observer)==null||e.disconnect(),this._observer=null}render(){return d`
|
|
4146
4146
|
<div data-slot="field-separator">
|
|
4147
4147
|
<rtg-separator></rtg-separator>
|
|
@@ -4149,12 +4149,12 @@ body {
|
|
|
4149
4149
|
</div>
|
|
4150
4150
|
`}};tl=l([p("rtg-field-separator")],tl);var So=class extends v{constructor(...e){super(...e),this._hasUserContent=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._hasUserContent=this.innerHTML.trim().length>0}_renderContent(){var t,r;if(!((t=this.errors)!=null&&t.length))return null;let e=[...new Map(this.errors.map(i=>[i==null?void 0:i.message,i])).values()];return e.length===1?(r=e[0])!=null&&r.message?e[0].message:null:d`
|
|
4151
4151
|
<ul data-slot="field-error-content">
|
|
4152
|
-
${e.map((i,s)=>i!=null&&i.message?d`<li key=${s}>${i.message}</li>`:
|
|
4152
|
+
${e.map((i,s)=>i!=null&&i.message?d`<li key=${s}>${i.message}</li>`:m)}
|
|
4153
4153
|
</ul>
|
|
4154
|
-
`}render(){let e=this._hasUserContent,t=this._renderContent();return e?d` <div data-slot="field-error" role="alert">${Array.from(this.childNodes)}</div>`:t?d` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",
|
|
4154
|
+
`}render(){let e=this._hasUserContent,t=this._renderContent();return e?d` <div data-slot="field-error" role="alert">${Array.from(this.childNodes)}</div>`:t?d` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",m)}};l([a({type:Array}),c("design:type",Array)],So.prototype,"errors",void 0),So=l([p("rtg-field-error")],So);var ze=class{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:e,defaultValue:t="",validator:r}){e in this.values||(this.values[e]=t),r&&(this.validators[e]=r)}unregisterField(e){delete this.values[e],delete this.errors[e],delete this.validators[e]}setValue(e,t){e in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${e}"`),this.values[e]=t,this.validateField(e),this.notify()}getValue(e){return this.values[e]}getError(e){return this.errors[e]??null}validateField(e){let t=this.validators[e],r=this.values[e],i=t?t(r):null;return this.errors[e]=i,this.notify(),!i}validateAll(){let e=!0;return Object.keys(this.validators).forEach(t=>{this.validateField(t)||(e=!1)}),e}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}notify(){this.subscribers.forEach(e=>e())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}},Ei="rtg-form-context",$o=class extends _{constructor(...e){super(...e),this.form=new ze,this.handleSubmit=t=>{if(t.preventDefault(),this.form.validateAll()){let r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("rtg-form-field").forEach(t=>{var s;let r=t.getAttribute("name"),i=(s=t.validators)==null?void 0:s[0];this.form.registerField({name:r,validator:i})})}render(){return d`
|
|
4155
4155
|
<form
|
|
4156
4156
|
part="form-controller"
|
|
4157
|
-
class="${
|
|
4157
|
+
class="${b("",this.className)}"
|
|
4158
4158
|
@submit=${this.handleSubmit}
|
|
4159
4159
|
${Zc(e=>this.formElement=e)}
|
|
4160
4160
|
></form>
|
|
@@ -4162,23 +4162,23 @@ body {
|
|
|
4162
4162
|
<p
|
|
4163
4163
|
id="${this.itemContext.id}-description"
|
|
4164
4164
|
part="form-description"
|
|
4165
|
-
class="${
|
|
4165
|
+
class="${b(eu,this.className)}"
|
|
4166
4166
|
></p>
|
|
4167
4167
|
`}};l([Lt({context:Bd}),c("design:type",Object)],Co.prototype,"itemContext",void 0),Co=l([p("rtg-form-description")],Co);var nu="rtg-form-field-context",el,ye=class extends _{constructor(...e){super(...e),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name||!Array.isArray(this.validators)||this.validators.length===0)return;this.form.registerField({name:this.name,validator:r=>{for(let i of this.validators){let s=i(r);if(s)return s}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);let e=(t=this._container)==null?void 0:t.querySelector("input, textarea, select");e&&(this.defaultValue!==void 0&&(e.value=this.defaultValue),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||((e=this.form)==null||e.unregisterField(this.name))}render(){return d`<div
|
|
4168
4168
|
part="form-field"
|
|
4169
|
-
class="${
|
|
4169
|
+
class="${b(ru,this.className)}"
|
|
4170
4170
|
></div>`}};l([Lt({context:Ei}),c("design:type",typeof(el=ze!==void 0&&ze)=="function"?el:Object)],ye.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"name",void 0),l([a({type:Array}),c("design:type",Array)],ye.prototype,"validators",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"defaultValue",void 0),l([Ue({context:nu}),c("design:type",Object)],ye.prototype,"fieldName",void 0),ye=l([p("rtg-form-field")],ye);var Eo=class extends _{constructor(...e){super(...e),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return d`<div
|
|
4171
4171
|
part="form-item"
|
|
4172
|
-
class="${
|
|
4172
|
+
class="${b(iu,this.className)}"
|
|
4173
4173
|
></div>`}};l([Ue({context:Bd}),c("design:type",Object)],Eo.prototype,"itemContext",void 0),Eo=l([p("rtg-form-item")],Eo);var rl,Di=class extends _{constructor(...e){super(...e),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof ye);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();let e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{this.hasError=!!this.form.getError(e),this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return d`
|
|
4174
4174
|
<label
|
|
4175
4175
|
part="form-label"
|
|
4176
4176
|
for="${this._field.name}"
|
|
4177
|
-
class="${
|
|
4177
|
+
class="${b(su,this.hasError&&"rtg-text-form-label-color-text-error",this.className)}"
|
|
4178
4178
|
></label>
|
|
4179
4179
|
`}};l([Lt({context:Ei}),c("design:type",typeof(rl=ze!==void 0&&ze)=="function"?rl:Object)],Di.prototype,"form",void 0),l([x(),c("design:type",Object)],Di.prototype,"hasError",void 0),Di=l([p("rtg-form-label")],Di);var il,Bi=class extends v{constructor(...e){super(...e),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof ye);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?d`<p
|
|
4180
4180
|
id="${this._field.name}-message"
|
|
4181
|
-
class="${
|
|
4181
|
+
class="${b(ou,this.className)}"
|
|
4182
4182
|
>
|
|
4183
4183
|
${this.error}
|
|
4184
4184
|
</p>`:null}};l([Lt({context:Ei}),c("design:type",typeof(il=ze!==void 0&&ze)=="function"?il:Object)],Bi.prototype,"form",void 0),l([x(),c("design:type",Object)],Bi.prototype,"error",void 0),Bi=l([p("rtg-form-message")],Bi);var Mi=class extends _{constructor(...e){super(...e),this.form=new ze,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&(alert("form submitted successfully"),this.onSubmit(this.form.getValues()))}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return d`
|
|
@@ -4186,20 +4186,20 @@ body {
|
|
|
4186
4186
|
part="form-root"
|
|
4187
4187
|
id="rtg-form"
|
|
4188
4188
|
@submit=${this.handleSubmit}
|
|
4189
|
-
class="${
|
|
4189
|
+
class="${b(tu,this.className)}"
|
|
4190
4190
|
></form>
|
|
4191
4191
|
`}};l([Ue({context:Ei}),c("design:type",Object)],Mi.prototype,"form",void 0),l([a({type:Function}),c("design:type",Function)],Mi.prototype,"onSubmit",void 0),Mi=l([p("rtg-form")],Mi);var gn={root:[""],trigger:[""],content:["rtg-fixed rtg-z-50","rtg-p-hover-card-content-space-p","rtg-w-hover-card-content-space-w","rtg-text-hover-card-content-color-text","rtg-bg-hover-card-content-color-bg","rtg-rounded-hover-card-content-radius rtg-border-hover-card-content-width-border rtg-border-hover-card-content-color-border rtg-outline-hidden","rtg-shadow-hover-card-content-shadow","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95","data-[side=bottom]:rtg-slide-in-from-top-2 data-[side=left]:rtg-slide-in-from-right-2 data-[side=right]:rtg-slide-in-from-left-2 data-[side=top]:rtg-slide-in-from-bottom-2"]},qi=class extends _{constructor(...e){super(...e),this.state="closed",this.isOpen=!1,this.onStateChange=t=>{this.state=t.detail.isOpen?"open":"closed"},this.handlePointerLeaveCheck=t=>{this.contains(t.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#rtg-hover-card-content"))}render(){return d`
|
|
4192
4192
|
<div
|
|
4193
4193
|
id="rtg-hover-card-content"
|
|
4194
4194
|
part="hover-card-content"
|
|
4195
|
-
class=${
|
|
4195
|
+
class=${b(gn.content,this.className)}
|
|
4196
4196
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4197
4197
|
></div>
|
|
4198
4198
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",String)],qi.prototype,"state",void 0),l([x(),c("design:type",Object)],qi.prototype,"isOpen",void 0),qi=l([p("rtg-hover-card-content")],qi);var sl=class extends _{getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}render(){return d`
|
|
4199
4199
|
<div
|
|
4200
4200
|
id="rtg-hover-card-trigger"
|
|
4201
4201
|
part="rtg-hover-card-trigger"
|
|
4202
|
-
class=${
|
|
4202
|
+
class=${b(gn.trigger,this.className)}
|
|
4203
4203
|
>
|
|
4204
4204
|
${Array.from(this.children)}
|
|
4205
4205
|
</div>
|
|
@@ -4207,7 +4207,7 @@ body {
|
|
|
4207
4207
|
<div
|
|
4208
4208
|
id="rtg-hover-card-container"
|
|
4209
4209
|
part="hover-card"
|
|
4210
|
-
class=${
|
|
4210
|
+
class=${b(gn.root,this.className)}
|
|
4211
4211
|
></div>
|
|
4212
4212
|
`}};l([x(),c("design:type",Object)],ko.prototype,"isOpen",void 0),ko=l([p("rtg-hover-card")],ko);var ol=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="input-group"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="input-group" role="group"></div>`}};ol=l([p("rtg-input-group")],ol);var Vi=class extends v{constructor(...e){super(...e),this.align="inline-start"}createRenderRoot(){return this}get _addonSlot(){return this.querySelector('[data-slot="input-group-addon"]')}firstUpdated(){let e=this._addonSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4213
4213
|
<div
|
|
@@ -4231,27 +4231,27 @@ body {
|
|
|
4231
4231
|
`}};l([a({type:String}),c("design:type",Object)],se.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],se.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],se.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],se.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],se.prototype,"onClick",void 0),se=l([p("rtg-input-group-button")],se);var G=class extends v{constructor(...e){super(...e),this.id="",this.type="text",this._onClick=t=>{this.onClick&&this.onClick(t)},this._onInput=t=>{this.value=t.target.value,this.onInput&&this.onInput(t)},this._onChange=t=>{this.value=t.target.value,this.onChange&&this.onChange(t)},this._onFocus=t=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onFocus&&this.onFocus(t)},this._onBlur=t=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onBlur&&this.onBlur(t)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}render(){return d`
|
|
4232
4232
|
<input
|
|
4233
4233
|
data-slot="input"
|
|
4234
|
-
accept=${this.type==="file"&&this.accept?this.accept:
|
|
4235
|
-
autocomplete=${this.autocomplete??
|
|
4234
|
+
accept=${this.type==="file"&&this.accept?this.accept:m}
|
|
4235
|
+
autocomplete=${this.autocomplete??m}
|
|
4236
4236
|
?disabled=${this.disabled}
|
|
4237
|
-
form=${this.form??
|
|
4238
|
-
id=${this._inputId&&this._inputId!==""?this._inputId:
|
|
4239
|
-
max=${this.max??
|
|
4240
|
-
maxlength=${this.maxlength??
|
|
4241
|
-
min=${this.min??
|
|
4242
|
-
minlength=${this.minlength??
|
|
4243
|
-
multiple=${this.multiple??
|
|
4244
|
-
name=${this.name??
|
|
4245
|
-
pattern=${this.max??
|
|
4246
|
-
placeholder=${this.placeholder??
|
|
4237
|
+
form=${this.form??m}
|
|
4238
|
+
id=${this._inputId&&this._inputId!==""?this._inputId:m}
|
|
4239
|
+
max=${this.max??m}
|
|
4240
|
+
maxlength=${this.maxlength??m}
|
|
4241
|
+
min=${this.min??m}
|
|
4242
|
+
minlength=${this.minlength??m}
|
|
4243
|
+
multiple=${this.multiple??m}
|
|
4244
|
+
name=${this.name??m}
|
|
4245
|
+
pattern=${this.max??m}
|
|
4246
|
+
placeholder=${this.placeholder??m}
|
|
4247
4247
|
?readonly=${this.readonly}
|
|
4248
4248
|
?required=${this.required}
|
|
4249
|
-
step=${this.step??
|
|
4249
|
+
step=${this.step??m}
|
|
4250
4250
|
type=${this.type}
|
|
4251
|
-
value=${this.value??
|
|
4252
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
4253
|
-
aria-label=${this.ariaLabel??
|
|
4254
|
-
aria-required=${this.required?"true":
|
|
4251
|
+
value=${this.value??m}
|
|
4252
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
4253
|
+
aria-label=${this.ariaLabel??m}
|
|
4254
|
+
aria-required=${this.required?"true":m}
|
|
4255
4255
|
@click=${this._onClick}
|
|
4256
4256
|
@input=${this._onInput}
|
|
4257
4257
|
@change=${this._onChange}
|
|
@@ -4265,7 +4265,7 @@ body {
|
|
|
4265
4265
|
.autocomplete=${this.autocomplete}
|
|
4266
4266
|
?disabled=${this.disabled}
|
|
4267
4267
|
.form=${this.form}
|
|
4268
|
-
id=${this._inputId&&this._inputId!==""?this._inputId:
|
|
4268
|
+
id=${this._inputId&&this._inputId!==""?this._inputId:m}
|
|
4269
4269
|
?invalid=${this.invalid}
|
|
4270
4270
|
.max=${this.max}
|
|
4271
4271
|
.maxlength=${this.maxlength}
|
|
@@ -4289,27 +4289,27 @@ body {
|
|
|
4289
4289
|
`}};l([a({type:String}),c("design:type",String)],W.prototype,"accept",void 0),l([a({type:String}),c("design:type",Object)],W.prototype,"autocomplete",void 0),l([a({type:Boolean}),c("design:type",Boolean)],W.prototype,"disabled",void 0),l([a({type:String}),c("design:type",String)],W.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],W.prototype,"id",void 0),l([a({type:Boolean}),c("design:type",Boolean)],W.prototype,"invalid",void 0),l([a({type:Number}),c("design:type",Number)],W.prototype,"max",void 0),l([a({type:Number}),c("design:type",Number)],W.prototype,"maxlength",void 0),l([a({type:Number}),c("design:type",Number)],W.prototype,"min",void 0),l([a({type:Number}),c("design:type",Number)],W.prototype,"minlength",void 0),l([a({type:Boolean}),c("design:type",Boolean)],W.prototype,"multiple",void 0),l([a({type:String}),c("design:type",String)],W.prototype,"name",void 0),l([a({type:String}),c("design:type",String)],W.prototype,"pattern",void 0),l([a({type:String}),c("design:type",String)],W.prototype,"placeholder",void 0),l([a({type:Boolean}),c("design:type",Boolean)],W.prototype,"readonly",void 0),l([a({type:Boolean}),c("design:type",Boolean)],W.prototype,"required",void 0),l([a({type:Number}),c("design:type",Number)],W.prototype,"step",void 0),l([a({type:String}),c("design:type",Object)],W.prototype,"type",void 0),l([a({type:String}),c("design:type",String)],W.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],W.prototype,"onClick",void 0),l([a({attribute:!1}),c("design:type",Function)],W.prototype,"onInput",void 0),l([a({attribute:!1}),c("design:type",Function)],W.prototype,"onChange",void 0),l([a({attribute:!1}),c("design:type",Function)],W.prototype,"onFocus",void 0),l([a({attribute:!1}),c("design:type",Function)],W.prototype,"onBlur",void 0),W=l([p("rtg-input-group-input")],W);var nl=class extends v{createRenderRoot(){return this}get _textSlot(){return this.querySelector('[data-slot="input-group-text"]')}firstUpdated(){let e=this._textSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<span data-slot="input-group-text"></span>`}};nl=l([p("rtg-input-group-text")],nl);var nt=class extends v{constructor(...e){super(...e),this.id="",this._onInput=t=>{this.value=t.target.value,this.onInput&&this.onInput(t)},this._onChange=t=>{this.value=t.target.value,this.onChange&&this.onChange(t)},this._onFocus=t=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onFocus&&this.onFocus(t)},this._onBlur=t=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onBlur&&this.onBlur(t)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return d`
|
|
4290
4290
|
<textarea
|
|
4291
4291
|
data-slot="textarea"
|
|
4292
|
-
autocapitalize=${this.autocapitalize?this.autocapitalize:
|
|
4293
|
-
autocomplete=${this.autocomplete??
|
|
4294
|
-
autocorrect=${this.autocorrect??
|
|
4295
|
-
autofocus=${this.autofocus??
|
|
4296
|
-
cols=${this.cols??
|
|
4292
|
+
autocapitalize=${this.autocapitalize?this.autocapitalize:m}
|
|
4293
|
+
autocomplete=${this.autocomplete??m}
|
|
4294
|
+
autocorrect=${this.autocorrect??m}
|
|
4295
|
+
autofocus=${this.autofocus??m}
|
|
4296
|
+
cols=${this.cols??m}
|
|
4297
4297
|
?disabled=${this.disabled}
|
|
4298
|
-
form=${this.form??
|
|
4299
|
-
id=${this._textareaId&&this._textareaId!==""?this._textareaId:
|
|
4300
|
-
maxlength=${this.maxlength??
|
|
4301
|
-
minlength=${this.minlength??
|
|
4302
|
-
name=${this.name??
|
|
4303
|
-
placeholder=${this.placeholder??
|
|
4298
|
+
form=${this.form??m}
|
|
4299
|
+
id=${this._textareaId&&this._textareaId!==""?this._textareaId:m}
|
|
4300
|
+
maxlength=${this.maxlength??m}
|
|
4301
|
+
minlength=${this.minlength??m}
|
|
4302
|
+
name=${this.name??m}
|
|
4303
|
+
placeholder=${this.placeholder??m}
|
|
4304
4304
|
?readonly=${this.readonly}
|
|
4305
4305
|
?required=${this.required}
|
|
4306
|
-
rows=${this.rows??
|
|
4307
|
-
spellcheck=${this.spellcheck??
|
|
4308
|
-
wrap=${this.wrap??
|
|
4309
|
-
value=${this.value?this.value:
|
|
4310
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
4311
|
-
aria-label=${this.ariaLabel??
|
|
4312
|
-
aria-required=${this.required?"true":
|
|
4306
|
+
rows=${this.rows??m}
|
|
4307
|
+
spellcheck=${this.spellcheck??m}
|
|
4308
|
+
wrap=${this.wrap??m}
|
|
4309
|
+
value=${this.value?this.value:m}
|
|
4310
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
4311
|
+
aria-label=${this.ariaLabel??m}
|
|
4312
|
+
aria-required=${this.required?"true":m}
|
|
4313
4313
|
@input=${this._onInput}
|
|
4314
4314
|
@change=${this._onChange}
|
|
4315
4315
|
@focus=${this._onFocus}
|
|
@@ -4318,46 +4318,46 @@ body {
|
|
|
4318
4318
|
`}};l([a({type:String}),c("design:type",Object)],nt.prototype,"autocomplete",void 0),l([a({type:Number}),c("design:type",Number)],nt.prototype,"cols",void 0),l([a({type:Boolean}),c("design:type",Boolean)],nt.prototype,"disabled",void 0),l([a({type:String}),c("design:type",String)],nt.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],nt.prototype,"id",void 0),l([a({type:Boolean}),c("design:type",Boolean)],nt.prototype,"invalid",void 0),l([a({type:Number}),c("design:type",Number)],nt.prototype,"maxlength",void 0),l([a({type:Number}),c("design:type",Number)],nt.prototype,"minlength",void 0),l([a({type:String}),c("design:type",String)],nt.prototype,"name",void 0),l([a({type:String}),c("design:type",String)],nt.prototype,"placeholder",void 0),l([a({type:Boolean}),c("design:type",Boolean)],nt.prototype,"readonly",void 0),l([a({type:Boolean}),c("design:type",Boolean)],nt.prototype,"required",void 0),l([a({type:Number}),c("design:type",Number)],nt.prototype,"rows",void 0),l([a({type:String}),c("design:type",Object)],nt.prototype,"wrap",void 0),l([a({type:String}),c("design:type",String)],nt.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],nt.prototype,"onInput",void 0),l([a({attribute:!1}),c("design:type",Function)],nt.prototype,"onChange",void 0),l([a({attribute:!1}),c("design:type",Function)],nt.prototype,"onFocus",void 0),l([a({attribute:!1}),c("design:type",Function)],nt.prototype,"onBlur",void 0),nt=l([p("rtg-textarea")],nt);var at=class extends v{constructor(...e){super(...e),this.id=""}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return d`
|
|
4319
4319
|
<rtg-textarea
|
|
4320
4320
|
data-slot="input-group-textarea"
|
|
4321
|
-
autocapitalize=${this.autocapitalize?this.autocapitalize:
|
|
4322
|
-
autocomplete=${this.autocomplete??
|
|
4323
|
-
autocorrect=${this.autocorrect??
|
|
4324
|
-
autofocus=${this.autofocus??
|
|
4325
|
-
cols=${this.cols??
|
|
4321
|
+
autocapitalize=${this.autocapitalize?this.autocapitalize:m}
|
|
4322
|
+
autocomplete=${this.autocomplete??m}
|
|
4323
|
+
autocorrect=${this.autocorrect??m}
|
|
4324
|
+
autofocus=${this.autofocus??m}
|
|
4325
|
+
cols=${this.cols??m}
|
|
4326
4326
|
?disabled=${this.disabled}
|
|
4327
|
-
form=${this.form??
|
|
4328
|
-
id=${this._textareaId&&this._textareaId!==""?this._textareaId:
|
|
4327
|
+
form=${this.form??m}
|
|
4328
|
+
id=${this._textareaId&&this._textareaId!==""?this._textareaId:m}
|
|
4329
4329
|
?invalid=${this.invalid}
|
|
4330
|
-
maxlength=${this.maxlength??
|
|
4331
|
-
minlength=${this.minlength??
|
|
4332
|
-
name=${this.name??
|
|
4333
|
-
placeholder=${this.placeholder??
|
|
4330
|
+
maxlength=${this.maxlength??m}
|
|
4331
|
+
minlength=${this.minlength??m}
|
|
4332
|
+
name=${this.name??m}
|
|
4333
|
+
placeholder=${this.placeholder??m}
|
|
4334
4334
|
?readonly=${this.readonly}
|
|
4335
4335
|
?required=${this.required}
|
|
4336
|
-
rows=${this.rows??
|
|
4337
|
-
spellcheck=${this.spellcheck??
|
|
4338
|
-
wrap=${this.wrap??
|
|
4339
|
-
value=${this.value?this.value:
|
|
4336
|
+
rows=${this.rows??m}
|
|
4337
|
+
spellcheck=${this.spellcheck??m}
|
|
4338
|
+
wrap=${this.wrap??m}
|
|
4339
|
+
value=${this.value?this.value:m}
|
|
4340
4340
|
.oninput=${this.onInput}
|
|
4341
4341
|
.onchange=${this.onChange}
|
|
4342
4342
|
.onfocus=${this.onFocus}
|
|
4343
4343
|
.onblur=${this.onBlur}
|
|
4344
4344
|
></rtg-textarea>
|
|
4345
|
-
`}};l([a({type:String}),c("design:type",Object)],at.prototype,"autocomplete",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"cols",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"disabled",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],at.prototype,"id",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"invalid",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"maxlength",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"minlength",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"name",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"placeholder",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"readonly",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"required",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"rows",void 0),l([a({type:String}),c("design:type",Object)],at.prototype,"wrap",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onInput",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onChange",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onFocus",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onBlur",void 0),at=l([p("rtg-input-group-textarea")],at);var
|
|
4345
|
+
`}};l([a({type:String}),c("design:type",Object)],at.prototype,"autocomplete",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"cols",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"disabled",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],at.prototype,"id",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"invalid",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"maxlength",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"minlength",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"name",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"placeholder",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"readonly",void 0),l([a({type:Boolean}),c("design:type",Boolean)],at.prototype,"required",void 0),l([a({type:Number}),c("design:type",Number)],at.prototype,"rows",void 0),l([a({type:String}),c("design:type",Object)],at.prototype,"wrap",void 0),l([a({type:String}),c("design:type",String)],at.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onInput",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onChange",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onFocus",void 0),l([a({attribute:!1}),c("design:type",Function)],at.prototype,"onBlur",void 0),at=l([p("rtg-input-group-textarea")],at);var rt=class extends v{constructor(){super(),this.autocomplete="one-time-code",this.id="",this.inputmode="numeric",this._activeSlot=null,this._hasFocus=!1,this._value="",this._children=[],this._handleBlur=e=>{var t;this._hasFocus=!1,this._activeSlot=null,this._sync(),this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onBlur)==null||t.call(this,e)},this._handleFocus=e=>{var t;this._hasFocus=!0,this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot()),this._sync(),this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onFocus)==null||t.call(this,e)},this._handleKeyDown=e=>{if(this.disabled||!this._hasFocus)return;this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot());let t=e.key;if(t==="Backspace"){e.preventDefault(),this._deleteChar();return}if(t.length!==1)return;let r=this._regex();r&&!r.test(t)||(e.preventDefault(),this._insertChar(t))},this._handlePaste=e=>{var s,o;if(this.disabled)return;e.preventDefault();let t=((s=e.clipboardData)==null?void 0:s.getData("text"))??"";this.pasteTransformer&&(t=this.pasteTransformer(t));let r=this._regex(),i=Array.from(t).filter(n=>r?r.test(n):!0).slice(0,this.maxlength).join("");this._updateValue(i),this._activeSlot=Math.min(i.length,this.maxlength-1),this._checkComplete(),(o=this.onPaste)==null||o.call(this,e)},this._children=Array.from(this.childNodes)}createRenderRoot(){return this}get _containerSlot(){return this.querySelector('[data-slot="input-otp-container"]')}get _wrapperSlot(){return this.querySelector('[data-slot="input-otp-wrapper"]')}get _slots(){return Array.from(this.querySelectorAll("rtg-input-otp-slot"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._value}_inputEl(){return this.querySelector('[data-slot="input-otp"]')}_regex(){return this.pattern?new RegExp(this.pattern):null}_clampIndex(e){return Math.max(0,Math.min(e,this.maxlength-1))}_computeInitialActiveSlot(){let e=(this._currentValue??"").length;return e>=this.maxlength?this.maxlength-1:e}_createCaret(){let e=document.createElement("div");e.dataset.slot="input-otp-slot-caret-wrapper";let t=document.createElement("div");return t.dataset.slot="input-otp-slot-caret",e.appendChild(t),e}_sync(){let e=this._currentValue??"";this._slots.forEach(t=>{let r=t._slotSlot;if(!r)return;let i=e[t.index]??"",s=this._hasFocus&&!this.disabled&&t.index===this._activeSlot;r.dataset.state=s?"active":"inactive",i?r.textContent=i:r.textContent="";let o=s&&!i,n=r.querySelector('[data-slot="input-otp-caret-wrapper"]');o&&!n&&r.appendChild(this._createCaret()),!o&&n&&n.remove()})}_updateValue(e){var t;this._isControlled||(this._value=e),(t=this.onChange)==null||t.call(this,e)}_checkComplete(){var e,t;((e=this._currentValue)==null?void 0:e.length)===this.maxlength&&((t=this.onComplete)==null||t.call(this,this._currentValue))}_insertChar(e){if(this._activeSlot===null)return;let t=this._activeSlot,r=(this._currentValue??"").split("");r[t]=e;let i=r.join("").slice(0,this.maxlength);this._updateValue(i),this._activeSlot=this._clampIndex(this._activeSlot+1),this._checkComplete()}_deleteChar(){if(this._activeSlot===null)return;let e=this._activeSlot,t=(this._currentValue??"").split("");e>0&&!t[e]&&e--,t[e]="",this._activeSlot=e,this._updateValue(t.join(""))}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id")),e.has("value")&&this._isControlled&&(this._value=this.value??""),this._sync()}firstUpdated(){this._inputId=this.id,this.removeAttribute("id"),this._value=this.value??this.defaultValue??"";let e=this._containerSlot,t=this._wrapperSlot;!e||!t||(this._children.forEach(r=>{e.insertBefore(r,t)}),this.addEventListener("rtg-input-otp-slot:focus",r=>{var s;if(this.disabled)return;let{index:i}=r.detail;this._activeSlot=i,this._hasFocus=!0,(s=this._inputEl())==null||s.focus(),this._sync()}))}render(){return d`
|
|
4346
4346
|
<div data-slot="input-otp-container">
|
|
4347
4347
|
<div data-slot="input-otp-wrapper">
|
|
4348
4348
|
<input
|
|
4349
4349
|
data-slot="input-otp"
|
|
4350
4350
|
autocomplete=${this.autocomplete}
|
|
4351
4351
|
?disabled=${this.disabled}
|
|
4352
|
-
form=${this.form??
|
|
4353
|
-
id=${this._inputId&&this._inputId!==""?this._inputId:
|
|
4352
|
+
form=${this.form??m}
|
|
4353
|
+
id=${this._inputId&&this._inputId!==""?this._inputId:m}
|
|
4354
4354
|
inputmode=${this.inputmode}
|
|
4355
4355
|
maxlength=${this.maxlength}
|
|
4356
|
-
name=${this.name??
|
|
4357
|
-
pattern=${this.pattern??
|
|
4356
|
+
name=${this.name??m}
|
|
4357
|
+
pattern=${this.pattern??m}
|
|
4358
4358
|
?required=${this.required}
|
|
4359
4359
|
spellcheck="false"
|
|
4360
|
-
value=${this._currentValue??
|
|
4360
|
+
value=${this._currentValue??m}
|
|
4361
4361
|
@blur=${this._handleBlur}
|
|
4362
4362
|
@focus=${this._handleFocus}
|
|
4363
4363
|
@keydown=${this._handleKeyDown}
|
|
@@ -4365,10 +4365,10 @@ body {
|
|
|
4365
4365
|
/>
|
|
4366
4366
|
</div>
|
|
4367
4367
|
</div>
|
|
4368
|
-
`}};l([a({type:String}),c("design:type",Object)],
|
|
4368
|
+
`}};l([a({type:String}),c("design:type",Object)],rt.prototype,"autocomplete",void 0),l([a({attribute:"default-value",type:String}),c("design:type",String)],rt.prototype,"defaultValue",void 0),l([a({type:Boolean}),c("design:type",Boolean)],rt.prototype,"disabled",void 0),l([a({type:String}),c("design:type",String)],rt.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],rt.prototype,"id",void 0),l([a({type:String}),c("design:type",Object)],rt.prototype,"inputmode",void 0),l([a({type:Number}),c("design:type",Number)],rt.prototype,"maxlength",void 0),l([a({type:String}),c("design:type",String)],rt.prototype,"name",void 0),l([a({type:String}),c("design:type",String)],rt.prototype,"pattern",void 0),l([a({type:Boolean}),c("design:type",Boolean)],rt.prototype,"required",void 0),l([a({type:String}),c("design:type",String)],rt.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"onChange",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"onComplete",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"onBlur",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"onFocus",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"onPaste",void 0),l([a({attribute:!1}),c("design:type",Function)],rt.prototype,"pasteTransformer",void 0),l([x(),c("design:type",Object)],rt.prototype,"_activeSlot",void 0),l([x(),c("design:type",Object)],rt.prototype,"_hasFocus",void 0),l([x(),c("design:type",Object)],rt.prototype,"_value",void 0),rt=l([p("rtg-input-otp"),c("design:paramtypes",[])],rt);var al=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="input-otp-group"></div>`}};al=l([p("rtg-input-otp-group")],al);var Hi=class extends v{constructor(...e){super(...e),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("rtg-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return d`
|
|
4369
4369
|
<div
|
|
4370
4370
|
data-slot="input-otp-slot"
|
|
4371
|
-
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":
|
|
4371
|
+
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":m}
|
|
4372
4372
|
@click=${this._handleClick}
|
|
4373
4373
|
></div>
|
|
4374
4374
|
`}};l([a({type:Number}),c("design:type",Number)],Hi.prototype,"index",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Hi.prototype,"invalid",void 0),Hi=l([p("rtg-input-otp-slot")],Hi);var ll=class extends v{createRenderRoot(){return this}render(){return d`
|
|
@@ -4381,7 +4381,7 @@ body {
|
|
|
4381
4381
|
data-variant="${this.variant}"
|
|
4382
4382
|
data-size="${this.size}"
|
|
4383
4383
|
href="${this.href}"
|
|
4384
|
-
target="${this.target??
|
|
4384
|
+
target="${this.target??m}"
|
|
4385
4385
|
></a>
|
|
4386
4386
|
`:d`
|
|
4387
4387
|
<div
|
|
@@ -4399,7 +4399,7 @@ body {
|
|
|
4399
4399
|
`}};ml=l([p("rtg-item-separator")],ml);var bl=class extends v{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="item-title"]')}firstUpdated(){let e=this._titleSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-title"></div>`}};bl=l([p("rtg-item-title")],bl);var fl=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="kbd"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<kbd data-slot="kbd"></kbd>`}};fl=l([p("rtg-kbd")],fl);var vl=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="kbd-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<kbd data-slot="kbd-group"></kbd>`}};vl=l([p("rtg-kbd-group")],vl);var yt={root:["rtg-flex","rtg-gap-menubar-space-gap rtg-items-center","rtg-p-menubar-space-p","rtg-h-menubar-space-h","rtg-bg-menubar-color-bg","rtg-rounded-menubar-radius rtg-border-menubar-width-border rtg-border-menubar-color-border"],menu:[""],group:[""],trigger:["rtg-flex","rtg-items-center","rtg-px-menubar-trigger-space-px rtg-py-menubar-trigger-space-py","rtg-text-menubar-trigger-font rtg-font-menubar-trigger-font-weight","rtg-rounded-menubar-trigger-radius rtg-outline-hidden","rtg-select-none","focus:rtg-text-menubar-trigger-color-text-focus focus:rtg-bg-menubar-trigger-color-bg-focus","hover:rtg-text-menubar-trigger-color-text-active hover:rtg-bg-menubar-trigger-color-bg-active"],content:["rtg-absolute rtg-overflow-hidden rtg-z-50","rtg-p-menubar-content-space-p","rtg-min-w-menubar-content-space-min-w","rtg-text-menubar-content-color-text","rtg-bg-menubar-content-color-bg","rtg-rounded-menubar-content-radius rtg-border-menubar-content-width-border rtg-border-menubar-content-color-border","rtg-shadow-menubar-content-shadow","rtg-translate-y-2","rtg-slide-in-from-top-2","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],item:["rtg-flex rtg-relative","rtg-gap-menubar-item-space-gap rtg-items-center","rtg-px-menubar-item-space-px rtg-py-menubar-item-space-py","rtg-text-menubar-item-font","rtg-rounded-menubar-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-item-color-text-active aria-selected:rtg-bg-menubar-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-menubar-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-menubar-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-menubar-checkbox-item-space-gap rtg-items-center","rtg-pl-menubar-checkbox-item-space-pl rtg-pr-menubar-checkbox-item-space-pr rtg-py-menubar-checkbox-item-space-py","rtg-text-menubar-checkbox-item-font","rtg-rounded-menubar-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-checkbox-item-color-text-active aria-selected:rtg-bg-menubar-checkbox-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-menubar-checkbox-item-indicator-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-menubar-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-menubar-radio-item-space-gap rtg-items-center","rtg-pl-menubar-radio-item-space-pl rtg-pr-menubar-radio-item-space-pr rtg-py-menubar-radio-item-space-py","rtg-text-menubar-radio-item-font","rtg-rounded-menubar-radio-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-radio-item-color-text-active aria-selected:rtg-bg-menubar-radio-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-menubar-radio-item-indicator-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-menubar-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-menubar-label-space-px rtg-py-menubar-label-space-py","rtg-text-menubar-label-font rtg-font-menubar-label-font-weight"],separator:["rtg-mx-menubar-separator-space-mx rtg-my-menubar-separator-space-my","rtg-h-menubar-separator-space-h","rtg-bg-menubar-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-menubar-shortcut-font rtg-text-menubar-shortcut-color-text"]},os,lr,$e=(lr=class extends _{constructor(...t){super(...t),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${os._counter++}`:this._id=`rtgcmdrxgxli${os._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return d`
|
|
4400
4400
|
<div
|
|
4401
4401
|
part="menubar-checkbox-item"
|
|
4402
|
-
class=${
|
|
4402
|
+
class=${b(yt.checkboxItem.base,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
4403
4403
|
@click=${this.toggleChecked}
|
|
4404
4404
|
@mouseover="${this.handleMouseEvent}"
|
|
4405
4405
|
@mouseleave="${this.handleMouseEvent}"
|
|
@@ -4412,7 +4412,7 @@ body {
|
|
|
4412
4412
|
id="${this.identifier}"
|
|
4413
4413
|
aria-hidden="${this.hidden}"
|
|
4414
4414
|
>
|
|
4415
|
-
<span class=${
|
|
4415
|
+
<span class=${b(yt.checkboxItem.indicator)}>
|
|
4416
4416
|
${this.checked?d`
|
|
4417
4417
|
<svg
|
|
4418
4418
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4424,15 +4424,15 @@ body {
|
|
|
4424
4424
|
stroke-width="2"
|
|
4425
4425
|
stroke-linecap="round"
|
|
4426
4426
|
stroke-linejoin="round"
|
|
4427
|
-
class=${
|
|
4427
|
+
class=${b(yt.checkboxItem.icon,"lucide lucide-check-icon lucide-check")}
|
|
4428
4428
|
>
|
|
4429
4429
|
<path d="M20 6 9 17l-5-5" />
|
|
4430
4430
|
</svg>
|
|
4431
|
-
`:
|
|
4431
|
+
`:m}
|
|
4432
4432
|
</span>
|
|
4433
4433
|
</div>
|
|
4434
4434
|
`}},os=lr,lr._counter=0,lr);l([a({type:String}),c("design:type",Object)],$e.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],$e.prototype,"_hidden",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],$e.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],$e.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],$e.prototype,"checked",void 0),l([a({type:Boolean}),c("design:type",Object)],$e.prototype,"disabled",void 0),$e=os=l([p("rtg-menubar-checkbox-item")],$e);var Oe=class extends _{constructor(...e){super(...e),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=t=>{t.stopPropagation(),document.querySelectorAll("rtg-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=t=>{let r=t.target;this.contains(r)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=t=>{let r=t.relatedTarget;if(this.isDescendant(r,"rtg-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("rtg-menubar-content")}get _button(){return this.querySelector("rtg-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-menubar-radio-item").forEach(t=>{let r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();let e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("rtg-menubar-menu").forEach(e=>{e.isOpen=!1,e.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){let e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return d`
|
|
4435
|
-
<div class=${
|
|
4435
|
+
<div class=${b(yt.menu,this.className)}>
|
|
4436
4436
|
<div
|
|
4437
4437
|
id="${this.id}"
|
|
4438
4438
|
data-state="${this.isOpen}"
|
|
@@ -4452,7 +4452,7 @@ body {
|
|
|
4452
4452
|
</div>
|
|
4453
4453
|
`}};l([x(),c("design:type",Object)],Oe.prototype,"isOpen",void 0),l([x(),c("design:type",Array)],Oe.prototype,"uniqueIds",void 0),l([x(),c("design:type",String)],Oe.prototype,"selectedMenu",void 0),l([x(),c("design:type",Object)],Oe.prototype,"isHovering",void 0),l([a({type:String}),c("design:type",Object)],Oe.prototype,"id",void 0),Oe=l([p("rtg-menubar-menu")],Oe);var Fr=class extends _{constructor(...e){super(...e),this.state=pn,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof Oe);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}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){let t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return d`
|
|
4454
4454
|
<div
|
|
4455
|
-
class=${
|
|
4455
|
+
class=${b(yt.content,this.className)}
|
|
4456
4456
|
id="${this.id}"
|
|
4457
4457
|
data-side="${this.side}"
|
|
4458
4458
|
data-align="start"
|
|
@@ -4464,15 +4464,15 @@ body {
|
|
|
4464
4464
|
dir="ltr"
|
|
4465
4465
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4466
4466
|
></div>
|
|
4467
|
-
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Fr.prototype,"state",void 0),l([a({type:String}),c("design:type",Object)],Fr.prototype,"id",void 0),l([a({type:String}),c("design:type",Object)],Fr.prototype,"side",void 0),l([x(),c("design:type",Object)],Fr.prototype,"isOpen",void 0),Fr=l([p("rtg-menubar-content")],Fr);var ns,dr,ni=(dr=class extends _{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}g${ns._counter++}`:this._id=`rtgcmdrxlxg${ns._counter++}`,this._id}render(){return d`${this._hidden==="true"?
|
|
4467
|
+
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Fr.prototype,"state",void 0),l([a({type:String}),c("design:type",Object)],Fr.prototype,"id",void 0),l([a({type:String}),c("design:type",Object)],Fr.prototype,"side",void 0),l([x(),c("design:type",Object)],Fr.prototype,"isOpen",void 0),Fr=l([p("rtg-menubar-content")],Fr);var ns,dr,ni=(dr=class extends _{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}g${ns._counter++}`:this._id=`rtgcmdrxlxg${ns._counter++}`,this._id}render(){return d`${this._hidden==="true"?m:d`
|
|
4468
4468
|
<div
|
|
4469
|
-
class=${
|
|
4469
|
+
class=${b(yt.group,this.className)}
|
|
4470
4470
|
id="${this.identifier}"
|
|
4471
4471
|
role="presentation"
|
|
4472
4472
|
part="menubar-group"
|
|
4473
4473
|
>
|
|
4474
4474
|
<div
|
|
4475
|
-
class=${
|
|
4475
|
+
class=${b(yt.label)}
|
|
4476
4476
|
id="${this.identifier}h"
|
|
4477
4477
|
aria-hidden="true"
|
|
4478
4478
|
>
|
|
@@ -4485,10 +4485,10 @@ body {
|
|
|
4485
4485
|
aria-labelledby="${this.identifier}h"
|
|
4486
4486
|
></div>
|
|
4487
4487
|
</div>
|
|
4488
|
-
`}`}},ns=dr,dr._counter=0,dr);l([a({type:String}),c("design:type",Object)],ni.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],ni.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],ni.prototype,"_hidden",void 0),ni=ns=l([p("rtg-menubar-group")],ni);var as,cr,Ze=(cr=class extends _{constructor(...t){super(...t),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${as._counter++}`:this._id=`rtgcmdrxgxli${as._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}render(){return d` ${this._hidden==="true"?
|
|
4488
|
+
`}`}},ns=dr,dr._counter=0,dr);l([a({type:String}),c("design:type",Object)],ni.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],ni.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],ni.prototype,"_hidden",void 0),ni=ns=l([p("rtg-menubar-group")],ni);var as,cr,Ze=(cr=class extends _{constructor(...t){super(...t),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${as._counter++}`:this._id=`rtgcmdrxgxli${as._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}render(){return d` ${this._hidden==="true"?m:d`
|
|
4489
4489
|
<div
|
|
4490
4490
|
part="menubar-item"
|
|
4491
|
-
class=${
|
|
4491
|
+
class=${b(yt.item,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
4492
4492
|
@mouseover="${this.handleMouseEvent}"
|
|
4493
4493
|
@mouseleave="${this.handleMouseEvent}"
|
|
4494
4494
|
@focus="${this.handleMouseEvent}"
|
|
@@ -4502,7 +4502,7 @@ body {
|
|
|
4502
4502
|
`}`}},as=cr,cr._counter=0,cr);l([a({type:String}),c("design:type",Object)],Ze.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ze.prototype,"_hidden",void 0),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"disabled",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ze.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"selected",void 0),Ze=as=l([p("rtg-menubar-item")],Ze);var ls,hr,Ce=(hr=class extends _{constructor(...t){super(...t),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${ls._counter++}`:this._id=`rtgcmdrxgxli${ls._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return d`
|
|
4503
4503
|
<div
|
|
4504
4504
|
part="menubar-radio-item"
|
|
4505
|
-
class=${
|
|
4505
|
+
class=${b(yt.radioItem.base,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
4506
4506
|
@click=${this.toggleChecked}
|
|
4507
4507
|
@mouseover="${this.handleMouseEvent}"
|
|
4508
4508
|
@mouseleave="${this.handleMouseEvent}"
|
|
@@ -4515,7 +4515,7 @@ body {
|
|
|
4515
4515
|
id="${this.identifier}"
|
|
4516
4516
|
aria-hidden="${this.hidden}"
|
|
4517
4517
|
>
|
|
4518
|
-
<span class=${
|
|
4518
|
+
<span class=${b(yt.radioItem.indicator)}>
|
|
4519
4519
|
${this.checked?d`<svg
|
|
4520
4520
|
xmlns="http://www.w3.org/2000/svg"
|
|
4521
4521
|
width="24"
|
|
@@ -4526,29 +4526,29 @@ body {
|
|
|
4526
4526
|
stroke-width="2"
|
|
4527
4527
|
stroke-linecap="round"
|
|
4528
4528
|
stroke-linejoin="round"
|
|
4529
|
-
class=${
|
|
4529
|
+
class=${b(yt.radioItem.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
4530
4530
|
>
|
|
4531
4531
|
<circle cx="12" cy="12" r="10" />
|
|
4532
|
-
</svg>`:
|
|
4532
|
+
</svg>`:m}
|
|
4533
4533
|
</span>
|
|
4534
4534
|
</div>
|
|
4535
|
-
`}},ls=hr,hr._counter=0,hr);l([a({type:String}),c("design:type",Object)],Ce.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ce.prototype,"_hidden",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ce.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"checked",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"disabled",void 0),Ce=ls=l([p("rtg-menubar-radio-item")],Ce);var ds,ur,Gi=(ur=class extends _{constructor(...t){super(...t),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var r;if(this._id!=="")return this._id;let t=(r=this.parentElement)==null?void 0:r.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}s${ds._counter++}`:this._id=`rtgcmdrxlxs${ds._counter++}`,this._id}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?
|
|
4535
|
+
`}},ls=hr,hr._counter=0,hr);l([a({type:String}),c("design:type",Object)],Ce.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ce.prototype,"_hidden",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ce.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"checked",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"disabled",void 0),Ce=ls=l([p("rtg-menubar-radio-item")],Ce);var ds,ur,Gi=(ur=class extends _{constructor(...t){super(...t),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var r;if(this._id!=="")return this._id;let t=(r=this.parentElement)==null?void 0:r.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}s${ds._counter++}`:this._id=`rtgcmdrxlxs${ds._counter++}`,this._id}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?m:d`
|
|
4536
4536
|
<div
|
|
4537
|
-
class=${
|
|
4537
|
+
class=${b(yt.separator,this.className)}
|
|
4538
4538
|
id="${this.identifier}"
|
|
4539
4539
|
role="separator"
|
|
4540
4540
|
part="menubar-separator"
|
|
4541
4541
|
rtgcmd-separator
|
|
4542
4542
|
></div>
|
|
4543
|
-
`}`}},ds=ur,ur._counter=0,ur);l([a({type:String}),c("design:type",Object)],Gi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Gi.prototype,"_hidden",void 0),Gi=ds=l([p("rtg-menubar-separator")],Gi);var yl=class extends _{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=
|
|
4543
|
+
`}`}},ds=ur,ur._counter=0,ur);l([a({type:String}),c("design:type",Object)],Gi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Gi.prototype,"_hidden",void 0),Gi=ds=l([p("rtg-menubar-separator")],Gi);var yl=class extends _{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=b(yt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4544
4544
|
<span
|
|
4545
|
-
class=${
|
|
4545
|
+
class=${b(yt.shortcut,this.className)}
|
|
4546
4546
|
part="menubar-shortcut"
|
|
4547
4547
|
>
|
|
4548
4548
|
</span>
|
|
4549
4549
|
`}};yl=l([p("rtg-menubar-shortcut")],yl);var wl=class extends _{get _containerElement(){return this.querySelector("button[part=menubar-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return d`
|
|
4550
4550
|
<button
|
|
4551
|
-
class=${
|
|
4551
|
+
class=${b(yt.trigger,this.className)}
|
|
4552
4552
|
type="button"
|
|
4553
4553
|
role="menuitem"
|
|
4554
4554
|
part="menubar-trigger"
|
|
@@ -4557,16 +4557,16 @@ body {
|
|
|
4557
4557
|
<div
|
|
4558
4558
|
role="menubar"
|
|
4559
4559
|
part="menubar"
|
|
4560
|
-
class=${
|
|
4560
|
+
class=${b(yt.root,this.className)}
|
|
4561
4561
|
tabindex="0"
|
|
4562
4562
|
data-orientation="horizontal"
|
|
4563
4563
|
></div>
|
|
4564
4564
|
`}};_l=l([p("rtg-menubar")],_l);var yr={content:["rtg-absolute","rtg-top-navigation-menu-content-space-top","rtg-flex","rtg-justify-center"],menu:["rtg-relative","rtg-z-10","rtg-flex","rtg-max-w-navigation-menu-space-max-w","rtg-flex-1","rtg-items-center","rtg-justify-center"],menuList:["rtg-flex","rtg-flex-1","rtg-list-none","rtg-items-center","rtg-justify-center","rtg-space-x-navigation-menu-list-space-x","group"],menuItem:["rtg-flex","rtg-cursor-pointer","rtg-items-center","rtg-rounded-navigation-menu-item-radius","rtg-bg-navigation-menu-item-color-bg","rtg-py-navigation-menu-list-space-py","rtg-px-navigation-menu-list-space-px","hover:rtg-bg-navigation-menu-item-color-bg-hover"],menuItemIcon:["lucide","lucide-chevron-down","rtg-relative","rtg-ml-navigation-menu-item-icon-space-ml","rtg-h-navigation-menu-item-icon-space-h","rtg-w-navigation-menu-item-icon-space-w","rtg-transition-transform","rtg-duration-navigation-menu-item-icon-motion-duration"],link:["rtg-flex","rtg-h-navigation-menu-link-space-h","rtg-bg-navigation-menu-link-color-bg","hover:rtg-bg-navigation-menu-link-color-bg-hover","rtg-rounded-navigation-menu-link-radius","rtg-px-navigation-menu-link-space-px","rtg-py-navigation-menu-link-space-py","rtg-w-navigation-menu-link-space-w","rtg-select-none","rtg-flex-col","rtg-justify-end","rtg-no-underline","rtg-outline-none"],contentContainer:["rtg-bg-navigation-menu-content-container-color-bg","origin-top-center","rtg-relative","rtg-mt-navigation-menu-content-container-space-mt","rtg-w-navigation-menu-content-container-space-w","rtg-overflow-hidden","rtg-rounded-navigation-menu-content-container-radius","rtg-border-navigation-menu-content-container-width-border","rtg-border-navigation-menu-content-container-color-border","rtg-navigation-menu-content-container-shadow"]},xl=class extends _{get _containerElement(){return this.querySelector("ul[part=navigation-menu-list]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4565
|
-
<div class="${
|
|
4565
|
+
<div class="${b("relative",this.className)}">
|
|
4566
4566
|
<ul
|
|
4567
4567
|
part="navigation-menu-list"
|
|
4568
4568
|
data-orientation="horizontal"
|
|
4569
|
-
class=${
|
|
4569
|
+
class=${b(yr.menuList)}
|
|
4570
4570
|
dir="ltr"
|
|
4571
4571
|
></ul>
|
|
4572
4572
|
<div></div>
|
|
@@ -4576,10 +4576,10 @@ body {
|
|
|
4576
4576
|
@mouseenter="${this.handleHover}"
|
|
4577
4577
|
@mouseleave="${this.handleMouseLeave}"
|
|
4578
4578
|
part="navigation-menu-item"
|
|
4579
|
-
class="${
|
|
4579
|
+
class="${b("rtg-relative",this.className)}"
|
|
4580
4580
|
>
|
|
4581
4581
|
${this.navigationLink?d`<div
|
|
4582
|
-
class=${
|
|
4582
|
+
class=${b(yr.menuItem)}
|
|
4583
4583
|
@click="${this.toggleMenubar}"
|
|
4584
4584
|
>
|
|
4585
4585
|
<div part="button-slot"></div>
|
|
@@ -4593,24 +4593,24 @@ body {
|
|
|
4593
4593
|
stroke-width="2"
|
|
4594
4594
|
stroke-linecap="round"
|
|
4595
4595
|
stroke-linejoin="round"
|
|
4596
|
-
class=${
|
|
4596
|
+
class=${b(yr.menuItemIcon,this.isOpen?"rtg-rotate-180":"")}
|
|
4597
4597
|
aria-hidden="true"
|
|
4598
4598
|
>
|
|
4599
4599
|
<path d="m6 9 6 6 6-6"></path>
|
|
4600
|
-
</svg>`:
|
|
4600
|
+
</svg>`:m}
|
|
4601
4601
|
</div>
|
|
4602
4602
|
<div part="content-slot" style="position:absolute"></div>`:""}
|
|
4603
4603
|
</li>
|
|
4604
4604
|
`}};l([a({type:String}),c("design:type",String)],Ae.prototype,"value",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Ae.prototype,"navigationLink",void 0),l([x(),c("design:type",Object)],Ae.prototype,"isOpen",void 0),l([x(),c("design:type",Array)],Ae.prototype,"uniqueIds",void 0),l([x(),c("design:type",Object)],Ae.prototype,"isHovering",void 0),Ae=l([p("rtg-navigation-menu-item")],Ae);var Tr=class extends _{constructor(...e){super(...e),this.state="close",this.id="",this.side="bottom",this.isOpen=!0}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof Ae);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=navigation-menu-content-container]")}getAttributesToExclude(){return["data-testid"]}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){let t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}render(){return d`
|
|
4605
4605
|
<div
|
|
4606
|
-
class="${
|
|
4606
|
+
class="${b(yr.content,this.className)}"
|
|
4607
4607
|
style="display: ${this.isOpen?"block":"none"};top:0px;left:0px;"
|
|
4608
4608
|
part="navigation-menu-content"
|
|
4609
4609
|
>
|
|
4610
4610
|
<div
|
|
4611
4611
|
data-state="${this.isOpen}"
|
|
4612
4612
|
data-orientation="horizontal"
|
|
4613
|
-
class="${
|
|
4613
|
+
class="${b(yr.contentContainer,this.className)}"
|
|
4614
4614
|
>
|
|
4615
4615
|
<div
|
|
4616
4616
|
id="${this.id}"
|
|
@@ -4624,7 +4624,7 @@ body {
|
|
|
4624
4624
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Tr.prototype,"state",void 0),l([a({type:String}),c("design:type",Object)],Tr.prototype,"id",void 0),l([a({type:String}),c("design:type",Object)],Tr.prototype,"side",void 0),l([x(),c("design:type",Object)],Tr.prototype,"isOpen",void 0),Tr=l([p("rtg-navigation-menu-content")],Tr);var Io=class extends _{constructor(...e){super(...e),this.href="/"}get _containerElement(){return this.querySelector("a[part=navigation-menu-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4625
4625
|
<a
|
|
4626
4626
|
part="navigation-menu-link"
|
|
4627
|
-
class="${
|
|
4627
|
+
class="${b(yr.link,this.className)}"
|
|
4628
4628
|
href="${this.href}"
|
|
4629
4629
|
data-radix-collection-item=""
|
|
4630
4630
|
data-tabindex=""
|
|
@@ -4632,27 +4632,27 @@ body {
|
|
|
4632
4632
|
>
|
|
4633
4633
|
</a>
|
|
4634
4634
|
`}};l([a({type:String}),c("design:type",Object)],Io.prototype,"href",void 0),Io=l([p("rtg-navigation-menu-link")],Io);var Sl=class extends _{get _containerElement(){return this.querySelector("div[part=navigation-menu-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return d`
|
|
4635
|
-
<div part="navigation-menu-trigger" class="${
|
|
4635
|
+
<div part="navigation-menu-trigger" class="${b(this.className)}"></div>
|
|
4636
4636
|
`}};Sl=l([p("rtg-navigation-menu-trigger")],Sl);var $l=class extends _{get _containerElement(){return this.querySelector("nav[part=navigation-menu]")}createRenderRoot(){return this}firstUpdated(e){}render(){return d`
|
|
4637
4637
|
<nav
|
|
4638
4638
|
part="navigation-menu"
|
|
4639
4639
|
aria-label="Main"
|
|
4640
4640
|
data-orientation="horizontal"
|
|
4641
4641
|
dir="ltr"
|
|
4642
|
-
class="${
|
|
4642
|
+
class="${b(yr.menu,this.className)}"
|
|
4643
4643
|
></nav>
|
|
4644
4644
|
`}};$l=l([p("rtg-navigation-menu")],$l);var Jt={root:["rtg-flex","rtg-justify-center","rtg-mx-auto","rtg-w-full"],content:["rtg-flex","rtg-flex-row rtg-gap-pagination-content-space-gap rtg-items-center"],item:[""],link:gi,previous:{base:["rtg-gap-pagination-previous-space-gap","rtg-px-pagination-previous-space-px sm:rtg-pl-pagination-previous-space-px"],span:["rtg-hidden sm:rtg-block"]},next:{base:["rtg-gap-pagination-next-space-gap","rtg-px-pagination-next-space-px sm:rtg-pr-pagination-next-space-px"],span:["rtg-hidden sm:rtg-block"]},ellipsis:{base:["rtg-flex rtg-justify-center rtg-items-center","rtg-size-pagination-ellipsis-space-size"],icon:["rtg-size-pagination-ellipsis-icon-space-size"],span:["rtg-sr-only"]}},Cl=class extends _{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4645
4645
|
<ul
|
|
4646
4646
|
data-slot="pagination-content"
|
|
4647
4647
|
part="pagination-content"
|
|
4648
|
-
class=${
|
|
4648
|
+
class=${b(Jt.content,this.className)}
|
|
4649
4649
|
></ul>
|
|
4650
4650
|
`}};Cl=l([p("rtg-pagination-content")],Cl);var El=class extends _{get _containerElement(){return this.querySelector("span[part=pagination-ellipsis]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4651
4651
|
<span
|
|
4652
4652
|
aria-hidden
|
|
4653
4653
|
data-slot="pagination-ellipsis"
|
|
4654
4654
|
part="pagination-ellipsis"
|
|
4655
|
-
class=${
|
|
4655
|
+
class=${b(Jt.ellipsis.base,this.className)}
|
|
4656
4656
|
>
|
|
4657
4657
|
<svg
|
|
4658
4658
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4664,14 +4664,14 @@ body {
|
|
|
4664
4664
|
stroke-width="2"
|
|
4665
4665
|
stroke-linecap="round"
|
|
4666
4666
|
stroke-linejoin="round"
|
|
4667
|
-
class=${
|
|
4667
|
+
class=${b(Jt.ellipsis.icon,"lucide lucide-ellipsis-icon lucide-ellipsis")}
|
|
4668
4668
|
>
|
|
4669
4669
|
<circle cx="12" cy="12" r="1" />
|
|
4670
4670
|
<circle cx="19" cy="12" r="1" />
|
|
4671
4671
|
<circle cx="5" cy="12" r="1" />
|
|
4672
4672
|
</svg>
|
|
4673
4673
|
|
|
4674
|
-
<span class=${
|
|
4674
|
+
<span class=${b(Jt.ellipsis.span)}>More pages</span>
|
|
4675
4675
|
</span>
|
|
4676
4676
|
`}};El=l([p("rtg-pagination-ellipsis")],El);var kl,tr=class extends _{constructor(...e){super(...e),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return d`
|
|
4677
4677
|
<a
|
|
@@ -4681,14 +4681,14 @@ body {
|
|
|
4681
4681
|
part="pagination-link"
|
|
4682
4682
|
id="${this.id}"
|
|
4683
4683
|
href="${this.href}"
|
|
4684
|
-
class=${
|
|
4684
|
+
class=${b(Jt.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
|
|
4685
4685
|
>
|
|
4686
4686
|
</a>
|
|
4687
4687
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],tr.prototype,"state",void 0),l([a({type:Boolean}),c("design:type",Boolean)],tr.prototype,"isActive",void 0),l([a({type:String}),c("design:type",typeof(kl=typeof Exclude<"u"&&Exclude)=="function"?kl:Object)],tr.prototype,"size",void 0),l([a({type:String}),c("design:type",String)],tr.prototype,"href",void 0),tr=l([p("rtg-pagination-link")],tr);var Wi=class extends _{constructor(...e){super(...e),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;let e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof tr)return e[r]}return null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(t=>{t!==this&&(t.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);let e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let i=0;i<e.length-1;i+=1){let s=e[i],o=crypto.randomUUID();t.push(o),s.dataset.pairId=o}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return d`
|
|
4688
4688
|
<li
|
|
4689
4689
|
data-slot="pagination-item"
|
|
4690
4690
|
part="pagination-item"
|
|
4691
|
-
class=${
|
|
4691
|
+
class=${b(Jt.item,this.className)}
|
|
4692
4692
|
@click="${this.handleClick}"
|
|
4693
4693
|
></li>
|
|
4694
4694
|
`}};l([x(),c("design:type",Array)],Wi.prototype,"uniqueIds",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Wi.prototype,"isActive",void 0),Wi=l([p("rtg-pagination-item")],Wi);var Oo=class extends _{constructor(...e){super(...e),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
@@ -4696,9 +4696,9 @@ body {
|
|
|
4696
4696
|
aria-label="Go to next page"
|
|
4697
4697
|
size="default"
|
|
4698
4698
|
href=${this.href}
|
|
4699
|
-
class=${
|
|
4699
|
+
class=${b(Jt.next.base,this.className)}
|
|
4700
4700
|
>
|
|
4701
|
-
<span class=${
|
|
4701
|
+
<span class=${b(Jt.next.span)}>Next</span>
|
|
4702
4702
|
|
|
4703
4703
|
<svg
|
|
4704
4704
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4722,7 +4722,7 @@ body {
|
|
|
4722
4722
|
aria-label="Go to previous page"
|
|
4723
4723
|
size="default"
|
|
4724
4724
|
href=${this.href}
|
|
4725
|
-
class=${
|
|
4725
|
+
class=${b(Jt.previous.base,this.className)}
|
|
4726
4726
|
>
|
|
4727
4727
|
<svg
|
|
4728
4728
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4739,7 +4739,7 @@ body {
|
|
|
4739
4739
|
<path d="m15 18-6-6 6-6" />
|
|
4740
4740
|
</svg>
|
|
4741
4741
|
|
|
4742
|
-
<span class=${
|
|
4742
|
+
<span class=${b(Jt.previous.span)}>Previous</span>
|
|
4743
4743
|
|
|
4744
4744
|
<div part="pagination-previous"></div>
|
|
4745
4745
|
</rtg-pagination-link>
|
|
@@ -4749,7 +4749,7 @@ body {
|
|
|
4749
4749
|
aria-label="pagination"
|
|
4750
4750
|
data-slot="pagination"
|
|
4751
4751
|
part="pagination"
|
|
4752
|
-
class=${
|
|
4752
|
+
class=${b(Jt.root,this.className)}
|
|
4753
4753
|
></nav>
|
|
4754
4754
|
`}};Rl=l([p("rtg-pagination")],Rl);var lt=class extends v{constructor(...e){super(...e),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?d`
|
|
4755
4755
|
<svg
|
|
@@ -4803,7 +4803,7 @@ body {
|
|
|
4803
4803
|
.autocomplete=${this.autocomplete}
|
|
4804
4804
|
?disabled=${this.disabled}
|
|
4805
4805
|
.form=${this.form}
|
|
4806
|
-
id=${this._inputId&&this._inputId!==""?this._inputId:
|
|
4806
|
+
id=${this._inputId&&this._inputId!==""?this._inputId:m}
|
|
4807
4807
|
?invalid=${this.invalid}
|
|
4808
4808
|
.maxlength=${this.maxlength}
|
|
4809
4809
|
.minlength=${this.minlength}
|
|
@@ -4846,16 +4846,16 @@ body {
|
|
|
4846
4846
|
role="progressbar"
|
|
4847
4847
|
data-state="indeterminate"
|
|
4848
4848
|
data-max="100"
|
|
4849
|
-
class="${
|
|
4849
|
+
class="${b(Il.root,this.className)}"
|
|
4850
4850
|
>
|
|
4851
4851
|
<div
|
|
4852
4852
|
data-state="indeterminate"
|
|
4853
4853
|
data-max="100"
|
|
4854
|
-
class="${
|
|
4854
|
+
class="${b(Il.indicator,this.className)}"
|
|
4855
4855
|
style="transform: translateX(-${100-(this.value||0)}%);"
|
|
4856
4856
|
></div>
|
|
4857
4857
|
</div>
|
|
4858
|
-
`}};l([a({type:Number}),c("design:type",Number)],Po.prototype,"value",void 0),Po=l([p("rtg-progress")],Po);var ci={root:["rtg-grid","rtg-gap-radio-group-space-gap"],item:{wrapper:["rtg-inline-flex","rtg-justify-center rtg-items-center","rtg-size-radio-group-item-space-size"],item:["rtg-aspect-square","rtg-shrink-0","rtg-size-radio-group-item-space-size","rtg-bg-radio-group-item-color-bg","rtg-rounded-radio-group-item-radius rtg-border-radio-group-item-width-border rtg-border-radio-group-item-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","focus-visible:rtg-border-radio-group-item-color-border-focus focus-visible:rtg-ring-radio-group-item-width-ring-focus focus-visible:rtg-ring-radio-group-item-color-ring-focus","disabled:rtg-opacity-radio-group-item-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-radio-group-item-color-border-invalid aria-invalid:rtg-ring-radio-group-item-width-ring-invalid aria-invalid:rtg-ring-radio-group-item-color-ring-invalid"],indicator:["rtg-flex rtg-relative","rtg-justify-center rtg-items-center"],icon:["rtg-absolute rtg-top-1/2 rtg-left-1/2","rtg-size-radio-group-indicator-space-size","rtg--translate-x-1/2 rtg--translate-y-1/2","rtg-fill-radio-group-indicator-color-fill"]}},au="unChecked",me=class extends _{constructor(...e){super(...e),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=au,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=
|
|
4858
|
+
`}};l([a({type:Number}),c("design:type",Number)],Po.prototype,"value",void 0),Po=l([p("rtg-progress")],Po);var ci={root:["rtg-grid","rtg-gap-radio-group-space-gap"],item:{wrapper:["rtg-inline-flex","rtg-justify-center rtg-items-center","rtg-size-radio-group-item-space-size"],item:["rtg-aspect-square","rtg-shrink-0","rtg-size-radio-group-item-space-size","rtg-bg-radio-group-item-color-bg","rtg-rounded-radio-group-item-radius rtg-border-radio-group-item-width-border rtg-border-radio-group-item-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","focus-visible:rtg-border-radio-group-item-color-border-focus focus-visible:rtg-ring-radio-group-item-width-ring-focus focus-visible:rtg-ring-radio-group-item-color-ring-focus","disabled:rtg-opacity-radio-group-item-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-radio-group-item-color-border-invalid aria-invalid:rtg-ring-radio-group-item-width-ring-invalid aria-invalid:rtg-ring-radio-group-item-color-ring-invalid"],indicator:["rtg-flex rtg-relative","rtg-justify-center rtg-items-center"],icon:["rtg-absolute rtg-top-1/2 rtg-left-1/2","rtg-size-radio-group-indicator-space-size","rtg--translate-x-1/2 rtg--translate-y-1/2","rtg-fill-radio-group-indicator-color-fill"]}},au="unChecked",me=class extends _{constructor(...e){super(...e),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=au,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=b(ci.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4859
4859
|
<button
|
|
4860
4860
|
type="button"
|
|
4861
4861
|
part="radio-group-item"
|
|
@@ -4866,14 +4866,14 @@ body {
|
|
|
4866
4866
|
value="${this.value}"
|
|
4867
4867
|
?disabled=${this.disabled}
|
|
4868
4868
|
@click="${this._onClick}"
|
|
4869
|
-
class=${
|
|
4869
|
+
class=${b(ci.item.item,this.className)}
|
|
4870
4870
|
id="${this.id}"
|
|
4871
4871
|
tabindex="${this.tabindex}"
|
|
4872
4872
|
>
|
|
4873
4873
|
${this.checked?d`<span
|
|
4874
4874
|
data-slot="radio-group-indicator"
|
|
4875
4875
|
part="radio-group-indicator"
|
|
4876
|
-
class=${
|
|
4876
|
+
class=${b(ci.item.indicator)}
|
|
4877
4877
|
>
|
|
4878
4878
|
<svg
|
|
4879
4879
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4885,22 +4885,22 @@ body {
|
|
|
4885
4885
|
stroke-width="2"
|
|
4886
4886
|
stroke-linecap="round"
|
|
4887
4887
|
stroke-linejoin="round"
|
|
4888
|
-
class=${
|
|
4888
|
+
class=${b(ci.item.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
4889
4889
|
>
|
|
4890
4890
|
<circle cx="12" cy="12" r="10" />
|
|
4891
4891
|
</svg>
|
|
4892
|
-
</span>`:
|
|
4892
|
+
</span>`:m}
|
|
4893
4893
|
</button>
|
|
4894
4894
|
`}};l([a({type:Boolean,reflect:!0}),c("design:type",Object)],me.prototype,"checked",void 0),l([a({type:Number}),c("design:type",Object)],me.prototype,"tabindex",void 0),l([a({type:String}),c("design:type",Object)],me.prototype,"value",void 0),l([a({type:String}),c("design:type",Object)],me.prototype,"id",void 0),l([a({attribute:"data-state",type:String}),c("design:type",Object)],me.prototype,"state",void 0),l([a({type:Boolean}),c("design:type",Object)],me.prototype,"disabled",void 0),l([a({attribute:"aria-invalid",type:Boolean}),c("design:type",Object)],me.prototype,"invalid",void 0),me=l([p("rtg-radio-group-item")],me);var Fo=class extends _{constructor(...e){super(...e),this.defaultValue=""}get _containerElement(){return this.querySelector("div[part=radio-group]")}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("rtg-radio-group-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return this.querySelectorAll("rtg-radio-group-item").forEach(e=>{e.checked=e.value==this.defaultValue}),d`
|
|
4895
4895
|
<div
|
|
4896
4896
|
part="radio-group"
|
|
4897
|
-
class=${
|
|
4897
|
+
class=${b(ci.root,this.className)}
|
|
4898
4898
|
></div>
|
|
4899
4899
|
`}};l([a({type:String}),c("design:type",Object)],Fo.prototype,"defaultValue",void 0),Fo=l([p("rtg-radio-group")],Fo);var lu=["rtg-relative","rtg-border rtg-border-scrollarea-color-border","rtg-bg-scrollarea-color-bg"],Ol,To=class extends _{createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return d`
|
|
4900
4900
|
<div
|
|
4901
4901
|
dir="ltr"
|
|
4902
4902
|
data-slot="scroll-area"
|
|
4903
|
-
class=${
|
|
4903
|
+
class=${b(lu,this.className)}
|
|
4904
4904
|
>
|
|
4905
4905
|
<style>
|
|
4906
4906
|
[data-radix-scroll-area-viewport] {
|
|
@@ -4937,12 +4937,12 @@ body {
|
|
|
4937
4937
|
<div
|
|
4938
4938
|
part="select-group"
|
|
4939
4939
|
data-slot="select-content"
|
|
4940
|
-
class="${
|
|
4940
|
+
class="${b(Qt.content.content,this.className)}"
|
|
4941
4941
|
style=${"min-width: 128px; display: none;"}
|
|
4942
4942
|
>
|
|
4943
4943
|
<div
|
|
4944
4944
|
part="select-viewport"
|
|
4945
|
-
class=${
|
|
4945
|
+
class=${b(Qt.content.viewport)}
|
|
4946
4946
|
></div>
|
|
4947
4947
|
</div>
|
|
4948
4948
|
`}};l([x(),c("design:type",Object)],Lo.prototype,"focusedIndex",void 0),Lo=l([p("rtg-select-group")],Lo);var Ee=class extends _{constructor(...e){super(...e),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.class="",this._onStoreChange=()=>{var t,r;this.isSelected=this.value.toLowerCase()===((r=(t=this._select.selectStore.selectedValue)==null?void 0:t.toLowerCase)==null?void 0:r.call(t)),this.requestUpdate()},this.handleClick=t=>{t.stopPropagation();let r=this.getTextContent();this._select.selectStore.select(this.value,r),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var i,s;let e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();let t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);return t&&((i=r.querySelector("[part=select-item-indicator]"))==null||i.remove()),((s=r.textContent)==null?void 0:s.trim())||""}render(){return d`
|
|
@@ -4950,7 +4950,7 @@ body {
|
|
|
4950
4950
|
${wt(this.getFilteredAttributes())}
|
|
4951
4951
|
part="select-item"
|
|
4952
4952
|
@click=${this.handleClick}
|
|
4953
|
-
class=${
|
|
4953
|
+
class=${b(Qt.item.item,this.className)}
|
|
4954
4954
|
data-hs-select-value=${this.value}
|
|
4955
4955
|
aria-selected="${this.isSelected}"
|
|
4956
4956
|
data-selected="${this.isSelected}"
|
|
@@ -4958,7 +4958,7 @@ body {
|
|
|
4958
4958
|
${this.isSelected?d`
|
|
4959
4959
|
<span
|
|
4960
4960
|
part="select-item-indicator"
|
|
4961
|
-
class=${
|
|
4961
|
+
class=${b(Qt.item.indicator)}
|
|
4962
4962
|
>
|
|
4963
4963
|
<svg
|
|
4964
4964
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4970,7 +4970,7 @@ body {
|
|
|
4970
4970
|
stroke-width="2"
|
|
4971
4971
|
stroke-linecap="round"
|
|
4972
4972
|
stroke-linejoin="round"
|
|
4973
|
-
class=${
|
|
4973
|
+
class=${b(Qt.item.icon,"lucide lucide-check-icon lucide-check")}
|
|
4974
4974
|
>
|
|
4975
4975
|
<path d="M20 6 9 17l-5-5" />
|
|
4976
4976
|
</svg>
|
|
@@ -4982,12 +4982,12 @@ body {
|
|
|
4982
4982
|
`}};l([a(),c("design:type",Object)],Ee.prototype,"value",void 0),l([a(),c("design:type",Object)],Ee.prototype,"isSelected",void 0),l([a(),c("design:type",Object)],Ee.prototype,"isFocus",void 0),l([a(),c("design:type",Object)],Ee.prototype,"selectItemIndex",void 0),l([a({type:Function}),c("design:type",Object)],Ee.prototype,"onSelect",void 0),l([a(),c("design:type",Object)],Ee.prototype,"class",void 0),Ee=l([p("rtg-select-item")],Ee);var Al=class extends _{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d`
|
|
4983
4983
|
<div
|
|
4984
4984
|
part="select-label"
|
|
4985
|
-
class=${
|
|
4985
|
+
class=${b(Qt.label,this.className)}
|
|
4986
4986
|
></div>
|
|
4987
4987
|
`}};Al=l([p("rtg-select-label")],Al);var Ki=class extends _{constructor(...e){super(...e),this.state=pn,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d`
|
|
4988
4988
|
<div
|
|
4989
4989
|
part="select-list"
|
|
4990
|
-
class="${
|
|
4990
|
+
class="${b("rtg-absolute rtg-z-50 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-lg rtg-border rtg-border-input rtg-bg-background p-1 [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]:rtg-bg-accent [&::-webkit-scrollbar-track]:rtg-bg-gray-100 [&::-webkit-scrollbar]:rtg-w-2",this.className)}"
|
|
4991
4991
|
data-hs-combo-box-output=""
|
|
4992
4992
|
data-state="${this.state}"
|
|
4993
4993
|
style="display: ${this.isOpen?"block":"none"}; top:115%"
|
|
@@ -4997,14 +4997,14 @@ body {
|
|
|
4997
4997
|
rtgcmd-separator
|
|
4998
4998
|
part="select-separator"
|
|
4999
4999
|
role="separator"
|
|
5000
|
-
class=${
|
|
5000
|
+
class=${b(Qt.separator,this.className)}
|
|
5001
5001
|
></div>
|
|
5002
5002
|
`}};l([a({type:String}),c("design:type",Object)],Yi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Yi.prototype,"_hidden",void 0),Yi=l([p("rtg-select-separator")],Yi);var Pl=class extends _{constructor(...e){super(...e),this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=t=>{t.stopPropagation(),this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]})}disconnectedCallback(){var e;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){let e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){let r=/rtg-w-[\w-[\]]+/;return r.test(t)?e.map(i=>i.split(/\s+/).filter(s=>!r.test(s)).join(" ")):e}render(){let e=this.getClassAttribute();return d`
|
|
5003
5003
|
<button
|
|
5004
5004
|
type="button"
|
|
5005
5005
|
part="select-trigger"
|
|
5006
5006
|
role="tab"
|
|
5007
|
-
class=${
|
|
5007
|
+
class=${b(...this.filterConflictingWidthClasses(Qt.trigger.trigger,e),e)}
|
|
5008
5008
|
tabindex="-1"
|
|
5009
5009
|
data-orientation="horizontal"
|
|
5010
5010
|
data-radix-collection-item=""
|
|
@@ -5023,22 +5023,22 @@ body {
|
|
|
5023
5023
|
stroke-width="2"
|
|
5024
5024
|
stroke-linecap="round"
|
|
5025
5025
|
stroke-linejoin="round"
|
|
5026
|
-
class=${
|
|
5026
|
+
class=${b(Qt.trigger.icon,"lucide lucide-chevron-down-icon lucide-chevron-down")}
|
|
5027
5027
|
>
|
|
5028
5028
|
<path d="m6 9 6 6 6-6" />
|
|
5029
5029
|
</svg>
|
|
5030
5030
|
</button>
|
|
5031
5031
|
`}};Pl=l([p("rtg-select-trigger")],Pl);var No=class extends _{constructor(...e){super(...e),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{if(this._select&&this._select.selectStore.selectedValue.length>0){let t=this._select.selectStore.selectedText;return t.length>0?t:this._select.selectStore.selectedValue}return this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}firstUpdated(e){super.firstUpdated(e)}createRenderRoot(){return this}render(){return d`
|
|
5032
|
-
<span part="select-value" class=${
|
|
5032
|
+
<span part="select-value" class=${b(Qt.value,this.className)}>
|
|
5033
5033
|
${this.renderLabel()}
|
|
5034
5034
|
</span>
|
|
5035
5035
|
`}};l([a({type:String}),c("design:type",Object)],No.prototype,"placeholder",void 0),No=l([p("rtg-select-value")],No);var Hr=class extends _{constructor(...e){super(...e),this.uuid=dn(),this.selectStore=new du,this.handleClickOutside=t=>{let r=this.querySelector("[data-select-uuid]"),i=t.target;r!=null&&r.contains(i)||this.selectStore.close()}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){let e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e)}createRenderRoot(){return this}render(){return d`
|
|
5036
5036
|
<div
|
|
5037
5037
|
part="select"
|
|
5038
5038
|
data-select-uuid=${this.uuid}
|
|
5039
|
-
class=${
|
|
5039
|
+
class=${b(Qt.root,this.className)}
|
|
5040
5040
|
></div>
|
|
5041
|
-
`}};Hr=l([p("rtg-select")],Hr);var cu="rtg-bg-skeleton-color-bg rtg-animate-skeleton-animate rtg-rounded-skeleton-radius",Fl=class extends _{createRenderRoot(){return this}render(){return d` <div class=${
|
|
5041
|
+
`}};Hr=l([p("rtg-select")],Hr);var cu="rtg-bg-skeleton-color-bg rtg-animate-skeleton-animate rtg-rounded-skeleton-radius",Fl=class extends _{createRenderRoot(){return this}render(){return d` <div class=${b(cu,this.className)}></div> `}};Fl=l([p("rtg-skeleton")],Fl);var zo=class extends v{constructor(...e){super(...e),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?d`
|
|
5042
5042
|
<svg
|
|
5043
5043
|
data-slot="spinner"
|
|
5044
5044
|
data-variant="basic"
|
|
@@ -5113,29 +5113,29 @@ body {
|
|
|
5113
5113
|
data-disabled=${this.disabled}
|
|
5114
5114
|
data-state=${this.state}
|
|
5115
5115
|
@click="${this._toggleChecked}"
|
|
5116
|
-
class=${
|
|
5116
|
+
class=${b(Tl.root,this.className)}
|
|
5117
5117
|
>
|
|
5118
5118
|
<div
|
|
5119
5119
|
part="switch-thumb"
|
|
5120
5120
|
data-state=${this.state}
|
|
5121
|
-
class=${
|
|
5121
|
+
class=${b(Tl.thumb)}
|
|
5122
5122
|
></div>
|
|
5123
5123
|
</div>
|
|
5124
5124
|
`}};l([a({attribute:"data-disabled",type:String}),c("design:type",String)],Xi.prototype,"disabled",void 0),l([a({attribute:"data-state",type:String}),c("design:type",String)],Xi.prototype,"state",void 0),Xi=l([p("rtg-switch")],Xi);var bt={preview:["rtg-flex rtg-bg-table-preview-color-bg rtg-w-table-preview-space-w rtg-items-center rtg-justify-center rtg-px-table-preview-space-px rtg-py-table-preview-space-py"],container:["rtg-relative rtg-w-table-container-space-w rtg-overflow-auto"],table:["rtg-w-table-space-w rtg-caption-bottom rtg-text-table-font"],caption:["rtg-mt-table-caption-space-mt rtg-text-table-caption-font rtg-text-table-caption-color-text"],head:{root:["[&_tr]:rtg-border-table-head-color-border [&_tr]:rtg-border-b-table-head-width-border"],row:["rtg-border-b-table-head-width-border rtg-border-table-head-color-border rtg-transition-colors hover:rtg-bg-table-head-row-color-bg-hover"],cell:{base:["rtg-h-table-head-cell-space-h rtg-px-table-head-cell-space-px rtg-align-middle rtg-font-table-head-cell-font-weight rtg-text-table-head-cell-color-text"],align:{left:"rtg-text-left",right:"rtg-text-right"}}},body:{root:["[&_tr:last-child]:rtg-border-0"],row:["rtg-border-b-table-body-width-border rtg-border-table-body-color-border rtg-transition-colors hover:rtg-bg-table-body-row-color-bg-hover"],cell:{base:["rtg-px-table-body-cell-space-px rtg-py-table-body-cell-space-py rtg-align-middle"],align:{right:"rtg-text-right"}}},footer:{root:["rtg-border-t-table-footer-width-border rtg-border-table-footer-color-border rtg-bg-table-footer-color-bg rtg-font-table-footer-font-weight [&>tr]:rtg-last:border-b-0"],row:["rtg-border-b-table-footer-width-border rtg-border-table-footer-color-border rtg-transition-colors hover:rtg-bg-table-footer-row-color-bg-hover"],cell:{base:["rtg-px-table-footer-cell-space-px rtg-py-table-footer-cell-space-py rtg-align-middle"],align:{right:"rtg-text-right"}}}},Ll,Nl,ai=class extends _{constructor(...e){super(...e),this.dataTable=[],this.footerData=[],this.captionText=""}get _containerElement(){return this.querySelector("table[part=table]")}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get columnKeys(){var t;let e=(t=this.dataTable)==null?void 0:t[0];return e?Object.keys(e).filter(r=>r!=="id"):[]}capitalizeLabel(e){return e.charAt(0).toUpperCase()+e.slice(1)}render(){let e=this.columnKeys;return d`
|
|
5125
|
-
<div class=${
|
|
5126
|
-
<div class=${
|
|
5127
|
-
<table part="table" class=${
|
|
5125
|
+
<div class=${b(bt.preview)}>
|
|
5126
|
+
<div class=${b(bt.container)}>
|
|
5127
|
+
<table part="table" class=${b(bt.table)}>
|
|
5128
5128
|
${this.captionText?d`
|
|
5129
|
-
<caption class=${
|
|
5129
|
+
<caption class=${b(bt.caption)}>
|
|
5130
5130
|
${this.captionText}
|
|
5131
5131
|
</caption>
|
|
5132
5132
|
`:null}
|
|
5133
5133
|
|
|
5134
|
-
<thead class=${
|
|
5135
|
-
<tr class=${
|
|
5134
|
+
<thead class=${b(bt.head.root)}>
|
|
5135
|
+
<tr class=${b(bt.head.row)}>
|
|
5136
5136
|
${e.map((t,r,i)=>{let s=r===i.length-1;return d`
|
|
5137
5137
|
<th
|
|
5138
|
-
class=${
|
|
5138
|
+
class=${b(bt.head.cell.base,s?bt.head.cell.align.right:bt.head.cell.align.left)}
|
|
5139
5139
|
>
|
|
5140
5140
|
${this.capitalizeLabel(t)}
|
|
5141
5141
|
</th>
|
|
@@ -5143,15 +5143,15 @@ body {
|
|
|
5143
5143
|
</tr>
|
|
5144
5144
|
</thead>
|
|
5145
5145
|
|
|
5146
|
-
<tbody class=${
|
|
5146
|
+
<tbody class=${b(bt.body.root)}>
|
|
5147
5147
|
${this.dataTable.map(t=>d`
|
|
5148
5148
|
<tr
|
|
5149
5149
|
data-id=${t.id??""}
|
|
5150
|
-
class=${
|
|
5150
|
+
class=${b(bt.body.row)}
|
|
5151
5151
|
>
|
|
5152
5152
|
${e.map((r,i,s)=>{let o=i===s.length-1;return d`
|
|
5153
5153
|
<td
|
|
5154
|
-
class=${
|
|
5154
|
+
class=${b(bt.body.cell.base,o&&bt.body.cell.align.right)}
|
|
5155
5155
|
>
|
|
5156
5156
|
${t[r]??""}
|
|
5157
5157
|
</td>
|
|
@@ -5161,11 +5161,11 @@ body {
|
|
|
5161
5161
|
</tbody>
|
|
5162
5162
|
|
|
5163
5163
|
${this.footerData.length?d`
|
|
5164
|
-
<tfoot class=${
|
|
5165
|
-
<tr class=${
|
|
5164
|
+
<tfoot class=${b(bt.footer.root)}>
|
|
5165
|
+
<tr class=${b(bt.footer.row)}>
|
|
5166
5166
|
${e.map((t,r,i)=>{let s=r===i.length-1,o=this.footerData.find(n=>n.key===t);return d`
|
|
5167
5167
|
<td
|
|
5168
|
-
class=${
|
|
5168
|
+
class=${b(bt.footer.cell.base,s&&bt.footer.cell.align.right)}
|
|
5169
5169
|
>
|
|
5170
5170
|
${(o==null?void 0:o.value)??""}
|
|
5171
5171
|
</td>
|
|
@@ -5210,7 +5210,7 @@ body {
|
|
|
5210
5210
|
part="toast-view-port"
|
|
5211
5211
|
tabindex="-1"
|
|
5212
5212
|
@click="${t=>t.stopPropagation()}"
|
|
5213
|
-
class="${
|
|
5213
|
+
class="${b(xi.viewportRoot,this.className,`${this.state===jl?"hidden":"block"} `)}"
|
|
5214
5214
|
>
|
|
5215
5215
|
<li
|
|
5216
5216
|
part="toast-view-port-li"
|
|
@@ -5220,7 +5220,7 @@ body {
|
|
|
5220
5220
|
tabindex="0"
|
|
5221
5221
|
data-state="${this.state}"
|
|
5222
5222
|
data-swipe-direction="right"
|
|
5223
|
-
class="${
|
|
5223
|
+
class="${b(cs.toastVariants.base,cs.toastVariants.variants[this.variant],this.className)}"
|
|
5224
5224
|
data-radix-collection-item=""
|
|
5225
5225
|
style="user-select: none; touch-action: none;"
|
|
5226
5226
|
></li>
|
|
@@ -5229,11 +5229,11 @@ body {
|
|
|
5229
5229
|
${wt(this.getFilteredAttributes())}
|
|
5230
5230
|
part="toast-action"
|
|
5231
5231
|
type="button"
|
|
5232
|
-
class="${
|
|
5232
|
+
class="${b(hs.toastVariants.base,hs.toastVariants.variants[this.variant],this.className,"rtg-w-max")}"
|
|
5233
5233
|
></button>
|
|
5234
5234
|
`}},hs=gr,gr.toastVariants=xi.action,gr);l([a({type:String}),c("design:type",typeof(Ul=Md!==void 0&&void 0)=="function"?Ul:Object)],Do.prototype,"variant",void 0),Do=hs=l([p("rtg-toast-action")],Do);var Dl=class extends _{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
5235
5235
|
<div
|
|
5236
|
-
class="${
|
|
5236
|
+
class="${b(xi.description,this.className)}"
|
|
5237
5237
|
part="toast-description"
|
|
5238
5238
|
>
|
|
5239
5239
|
<slot></slot>
|
|
@@ -5241,20 +5241,20 @@ body {
|
|
|
5241
5241
|
`}};Dl=l([p("rtg-toast-description")],Dl);var Bl=class extends _{get _containerElement(){return this.querySelector("div[part=toast-title]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
5242
5242
|
<div
|
|
5243
5243
|
part="toast-title"
|
|
5244
|
-
class="${
|
|
5244
|
+
class="${b(xi.title,this.className)}"
|
|
5245
5245
|
></div>
|
|
5246
5246
|
`}};Bl=l([p("rtg-toast-title")],Bl);var Ml=class extends _{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof us);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return d`
|
|
5247
5247
|
<div
|
|
5248
5248
|
@click=${this.handleClick}
|
|
5249
5249
|
part="toast-trigger"
|
|
5250
|
-
class="${
|
|
5250
|
+
class="${b(this.className)}"
|
|
5251
5251
|
></div>
|
|
5252
|
-
`}};Ml=l([p("rtg-toast-trigger"),c("design:paramtypes",[])],Ml);var us=class extends _{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("rtg-toast-view-port")}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d` <div class="${
|
|
5252
|
+
`}};Ml=l([p("rtg-toast-trigger"),c("design:paramtypes",[])],Ml);var us=class extends _{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("rtg-toast-view-port")}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d` <div class="${b("",this.className)}" part="toast"></div> `}};l([x(),c("design:type",Object)],us.prototype,"isOpen",void 0),us=l([p("rtg-toast")],us);var wr=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),_r=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),xr=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),gu=hn("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-group-item-radius rtg-text-toggle-group-item-font rtg-font-toggle-group-item-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-group-item-width-ring-focus focus-visible:rtg-ring-toggle-group-item-color-ring-focus focus-visible:rtg-ring-offset-toggle-group-item-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-group-item-opacity-disabled data-[state=on]:rtg-bg-toggle-group-item-color-bg-on data-[state=on]:rtg-text-toggle-group-item-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-group-item-default-color-bg-hover hover:rtg-text-toggle-group-item-default-color-text-hover",outline:"rtg-border rtg-border-toggle-group-item-outline-color-border hover:rtg-bg-toggle-group-item-outline-color-bg-hover hover:rtg-text-toggle-group-item-outline-color-text-hover"},size:{sm:"rtg-h-toggle-group-item-space-h-sm rtg-px-toggle-group-item-space-px-sm",md:"rtg-h-toggle-group-item-space-h-md rtg-px-toggle-group-item-space-px-md",lg:"rtg-h-toggle-group-item-space-h-lg rtg-px-toggle-group-item-space-px-lg"}}}),mu="rtg-flex rtg-items-center rtg-justify-center rtg-gap-toggle-group-space-gap",ql,Vl,Hl,Xo,mr,ke=(mr=class extends _{get _parent(){let t=this.parentElement;for(;t&&!(t instanceof ve);)t=t.parentElement;return t}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var t;return Array.from(((t=this.parentElement)==null?void 0:t.children)||[]).filter(r=>r!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(t){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}constructor(){super(),this.checked=!1,this.id=dn(),this.variant=_r.DEFAULT,this.size=xr.SMALL,this.disabled=!1,this.type=wr.SINGLE,this.variant=_r.DEFAULT,this.size=xr.SMALL}syncFromParent(){let t=this._parent;if(!t)return;this.variant!==t.variant&&(this.variant=t.variant),this.size!==t.size&&(this.size=t.size);let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r),this.type!==t.type&&(this.type=t.type)}syncSelection(){let t=this._parent;if(!t)return;let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r)}toggleSelection(t){if(this.disabled||!this._parent)return;let r=this._parent,i=r.selectedItems.indexOf(t);this.type===wr.SINGLE?(i===-1?r.selectedItems[0]=t:r.selectedItems.splice(i,1),this._siblings.forEach(s=>s.syncSelection())):i===-1?r.selectedItems.push(t):r.selectedItems.splice(i,1),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),d`
|
|
5253
5253
|
<button
|
|
5254
5254
|
part="toggle-group-item"
|
|
5255
5255
|
id=${this.id}
|
|
5256
5256
|
type="button"
|
|
5257
|
-
class="${
|
|
5257
|
+
class="${b(Xo.toggleGroupVariants({variant:this.variant,size:this.size,className:this.className}))}"
|
|
5258
5258
|
aria-pressed=${this.checked}
|
|
5259
5259
|
data-state="${this.checked?"on":"off"}"
|
|
5260
5260
|
?disabled=${this.disabled}
|
|
@@ -5265,14 +5265,14 @@ body {
|
|
|
5265
5265
|
part="toggle-group"
|
|
5266
5266
|
role="group"
|
|
5267
5267
|
${wt(e)}
|
|
5268
|
-
class="${
|
|
5268
|
+
class="${b(mu,this.className)}"
|
|
5269
5269
|
?disable="${this.disabled}"
|
|
5270
5270
|
></div>
|
|
5271
5271
|
`}};l([a({type:Boolean}),c("design:type",Object)],ve.prototype,"disabled",void 0),l([a({type:String}),c("design:type",typeof(Gl=wr!==void 0&&wr)=="function"?Gl:Object)],ve.prototype,"type",void 0),l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],ve.prototype,"required",void 0),l([a(),c("design:type",typeof(Wl=_r!==void 0&&_r)=="function"?Wl:Object)],ve.prototype,"variant",void 0),l([a(),c("design:type",typeof(Kl=xr!==void 0&&xr)=="function"?Kl:Object)],ve.prototype,"size",void 0),l([a({type:Array}),c("design:type",Array)],ve.prototype,"selectedItems",void 0),ve=l([p("rtg-toggle-group")],ve);var fi=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),vi=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),bu=hn("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-radius rtg-text-toggle-font rtg-font-toggle-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-width-ring-focus focus-visible:rtg-ring-toggle-color-ring-focus focus-visible:rtg-ring-offset-toggle-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-opacity-disabled data-[state=on]:rtg-bg-toggle-color-bg-on data-[state=on]:rtg-text-toggle-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-default-color-bg-hover hover:rtg-text-toggle-default-color-text-hover",outline:"rtg-border rtg-border-toggle-outline-color-border hover:rtg-bg-toggle-outline-color-bg-hover hover:rtg-text-toggle-outline-color-text-hover"},size:{sm:"rtg-h-toggle-space-h-sm rtg-px-toggle-space-px-sm",md:"rtg-h-toggle-space-h-md rtg-px-toggle-space-px-md",lg:"rtg-h-toggle-space-h-lg rtg-px-toggle-space-px-lg"}}}),Yl,Xl,Zo,br,Je=(br=class extends _{constructor(...t){super(...t),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=vi.DEFAULT,this.size=fi.SMALL}willUpdate(t){t.has("variant")&&(this.variant=this.normalizeEnum(this.variant,vi,vi.DEFAULT)),t.has("size")&&(this.size=this.normalizeEnum(this.size,fi,fi.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){let t=this.getFilteredAttributes();return d`
|
|
5272
5272
|
<button
|
|
5273
5273
|
type="button"
|
|
5274
5274
|
part="toggle"
|
|
5275
|
-
class="${
|
|
5275
|
+
class="${b(Zo.toggleVariants({variant:this.variant,size:this.size,className:this.className}))}"
|
|
5276
5276
|
aria-pressed=${this.checked}
|
|
5277
5277
|
data-state="${this.checked?"on":"off"}"
|
|
5278
5278
|
aria-label="Toggle bold"
|
|
@@ -5519,19 +5519,19 @@ body {
|
|
|
5519
5519
|
*/class Qo extends fs{}Qo.directiveName="unsafeSVG",Qo.resultType=2;const $s=_s(Qo);var Sp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,Cs=(e,t,r,i)=>{for(var s=i>1?void 0:i?$p(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Sp(t,r,s),s};exports.SbButtonRenderer=class extends v{constructor(){super(...arguments),this.theme=dd(),this._onClick=()=>{this._disabled||this.component.handleEvent(this.element.properties.event,this.element)}}createRenderRoot(){return this}get _disabled(){var t;return!this.component||!this.element?!1:((t=this.element.properties.requires_valid)==null?void 0:t.some(r=>{var s;const i=this.component.findElementByKey(r);return i&&"validation"in i.properties&&((s=i.properties.validation)==null?void 0:s.on_event)!=="submit"&&!this.component.isFieldValid(r)}))??!1}get _loading(){var t,r;return((r=(t=this.component)==null?void 0:t.loadingButtons)==null?void 0:r[this.element.id])??!1}patchComponentUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}observeThemeChanges(){this.observer=new MutationObserver(()=>{this.theme=dd()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}connectedCallback(){super.connectedCallback(),this.patchComponentUpdate(),this.observeThemeChanges()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.observer)==null||t.disconnect()}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=Ss(t);return r?d`${$s(r)}`:null}render(){var C,S;if(!this.element)return null;const{type:t,size:r,invalid:i,href:s,target:o,text:n,icon_position:h}=this.element.properties,u=Vt(t,this.component.customizations),{class:g,style:y}=I(this.element.class,this.element.style,u,this.element.id,this.component.customizations),{base:w,responsive:E}=St(y);return $t(this.element.id,E,((S=(C=this.component.customizations)==null?void 0:C.config)==null?void 0:S.breakpoints)??pt),d`
|
|
5520
5520
|
<rtg-button
|
|
5521
5521
|
variant=${t}
|
|
5522
|
-
size=${r??
|
|
5522
|
+
size=${r??m}
|
|
5523
5523
|
type=${this.element.properties.submit?"submit":"button"}
|
|
5524
5524
|
?disabled=${this._disabled||this._loading}
|
|
5525
5525
|
?invalid=${i}
|
|
5526
|
-
href=${s??
|
|
5527
|
-
target=${o??
|
|
5526
|
+
href=${s??m}
|
|
5527
|
+
target=${o??m}
|
|
5528
5528
|
class=${g}
|
|
5529
5529
|
style=${R(w)}
|
|
5530
5530
|
.onclick=${this._onClick}
|
|
5531
5531
|
>
|
|
5532
|
-
${h==="start"?this._renderIcon():
|
|
5532
|
+
${h==="start"?this._renderIcon():m}
|
|
5533
5533
|
${n}
|
|
5534
|
-
${h!=="start"?this._renderIcon():
|
|
5534
|
+
${h!=="start"?this._renderIcon():m}
|
|
5535
5535
|
</rtg-button>
|
|
5536
5536
|
`}};Cs([a({type:Object})],exports.SbButtonRenderer.prototype,"element",2);Cs([a({attribute:!1})],exports.SbButtonRenderer.prototype,"component",2);Cs([x()],exports.SbButtonRenderer.prototype,"theme",2);exports.SbButtonRenderer=Cs([p("sb-button-renderer")],exports.SbButtonRenderer);/**
|
|
5537
5537
|
* @license
|
|
@@ -5655,10 +5655,10 @@ body {
|
|
|
5655
5655
|
${this.label?d`<span class="sr-only">${this.label}</span>`:null}
|
|
5656
5656
|
`}};Xr([a({type:Number})],exports.SbSpinner.prototype,"size",2);Xr([a({type:Number,attribute:"stroke-width"})],exports.SbSpinner.prototype,"strokeWidth",2);Xr([a()],exports.SbSpinner.prototype,"color",2);Xr([a()],exports.SbSpinner.prototype,"label",2);Xr([a({type:Number})],exports.SbSpinner.prototype,"duration",2);exports.SbSpinner=Xr([p("sb-spinner")],exports.SbSpinner);var zp=Object.defineProperty,jp=Object.getOwnPropertyDescriptor,_n=(e,t,r,i)=>{for(var s=i>1?void 0:i?jp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zp(t,r,s),s};exports.SbOtpRenderer=class extends v{constructor(){super(...arguments),this._onComplete=t=>{if(!this.element.data_key)return;this.component.handleInputChange(this.element.data_key,t);const{event:r}=this.element.properties;r&&this.component.handleEvent(r,this.element)},this._onFocus=()=>{this.element.data_key&&this.component.handleFocus(this.element.data_key,this.element.id)},this._onBlur=()=>{this.element.data_key&&this.component.handleBlur(this.element.data_key)}}createRenderRoot(){return this}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}_buildOTPContentHTML(){const t=this.element.properties.variant||"digits_only",r=this.element.properties.length||6,i=(n,h)=>Array.from({length:h-n},(u,g)=>`<rtg-input-otp-slot index="${n+g}"></rtg-input-otp-slot>`).join(""),s=n=>`<rtg-input-otp-group>${n}</rtg-input-otp-group>`,o="<rtg-input-otp-separator></rtg-input-otp-separator>";if(t==="simple"){const n=Math.ceil(r/2);return s(i(0,n))+o+s(i(n,r))}if(t==="with_separator"){const n=Math.ceil(r/3);return s(i(0,n))+o+s(i(n,n*2))+o+s(i(n*2,r))}return t==="with_spacing"?Array.from({length:r},(n,h)=>s(`<rtg-input-otp-slot index="${h}"></rtg-input-otp-slot>`)).join(""):s(i(0,r))}render(){var n,h,u,g,y;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(u=(h=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:h.inputs)==null?void 0:u.inputField,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??pt);const o=this.element.properties.variant||"digits_only";return ys`
|
|
5657
5657
|
<rtg-input-otp
|
|
5658
|
-
id=${this.element.data_key??this.element.id??
|
|
5659
|
-
name=${this.element.data_key??this.element.id??
|
|
5658
|
+
id=${this.element.data_key??this.element.id??m}
|
|
5659
|
+
name=${this.element.data_key??this.element.id??m}
|
|
5660
5660
|
maxlength=${this.element.properties.length??6}
|
|
5661
|
-
pattern=${o==="digits_only"?"\\d+":
|
|
5661
|
+
pattern=${o==="digits_only"?"\\d+":m}
|
|
5662
5662
|
.value=${this.element.data_key&&this.component.formData[this.element.data_key]||""}
|
|
5663
5663
|
data-key=${this.element.data_key||""}
|
|
5664
5664
|
class=${t}
|
|
@@ -5673,8 +5673,8 @@ body {
|
|
|
5673
5673
|
`}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.errors)==null?void 0:h.serviceError,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
|
|
5674
5674
|
<rtg-alert
|
|
5675
5675
|
variant=${this.element.properties.variant??"destructive"}
|
|
5676
|
-
class=${t??
|
|
5677
|
-
style=${R(i)??
|
|
5676
|
+
class=${t??m}
|
|
5677
|
+
style=${R(i)??m}
|
|
5678
5678
|
>
|
|
5679
5679
|
${this._renderIcon()}
|
|
5680
5680
|
${this._renderTitle()}
|
|
@@ -5761,7 +5761,7 @@ body {
|
|
|
5761
5761
|
.component=${e}
|
|
5762
5762
|
.element=${t}
|
|
5763
5763
|
?hidden=${i}
|
|
5764
|
-
></sb-countdown-renderer>`;default:return d`<p>Unknown element type</p>`}}var Yp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,kn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Yp(t,r,s),s};exports.SbContainerRenderer=class extends v{constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var s,o;if(!((o=(s=this.element)==null?void 0:s.class)!=null&&o.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),r=t.length,i=this.offsetWidth;r===this.prevChildCount&&i===this.prevContainerWidth||(this.prevChildCount=r,this.prevContainerWidth=i,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,fp(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>En(this.component,t)):
|
|
5764
|
+
></sb-countdown-renderer>`;default:return d`<p>Unknown element type</p>`}}var Yp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,kn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Yp(t,r,s),s};exports.SbContainerRenderer=class extends v{constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var s,o;if(!((o=(s=this.element)==null?void 0:s.class)!=null&&o.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),r=t.length,i=this.offsetWidth;r===this.prevChildCount&&i===this.prevContainerWidth||(this.prevChildCount=r,this.prevContainerWidth=i,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,fp(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>En(this.component,t)):m}render(){var o,n,h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.containerStyles,(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.container,this.element.id,this.component.customizations,!0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??pt),d`
|
|
5765
5765
|
<div id=${this.element.id} class=${t} style=${R(i)}>
|
|
5766
5766
|
${this.renderChildren()}
|
|
5767
5767
|
</div>
|
|
@@ -5808,8 +5808,8 @@ body {
|
|
|
5808
5808
|
id=${this._key}
|
|
5809
5809
|
name=${this._key}
|
|
5810
5810
|
type=${this.element.properties.type}
|
|
5811
|
-
autocomplete=${this.element.properties.autocomplete??
|
|
5812
|
-
placeholder=${this.element.properties.placeholder??
|
|
5811
|
+
autocomplete=${this.element.properties.autocomplete??m}
|
|
5812
|
+
placeholder=${this.element.properties.placeholder??m}
|
|
5813
5813
|
value=${h}
|
|
5814
5814
|
?invalid=${this._invalid}
|
|
5815
5815
|
data-key=${this.element.data_key||""}
|
|
@@ -5823,9 +5823,9 @@ body {
|
|
|
5823
5823
|
</rtg-field>
|
|
5824
5824
|
`}};In([a({type:Object})],exports.SbInputRenderer.prototype,"element",2);In([a({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=In([p("sb-input-renderer")],exports.SbInputRenderer);var og=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,On=(e,t,r,i)=>{for(var s=i>1?void 0:i?ng(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&og(t,r,s),s};exports.SbLabelRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.labels)==null?void 0:h.inputLabel,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
|
|
5825
5825
|
<rtg-label
|
|
5826
|
-
for=${this.element.properties.for??
|
|
5827
|
-
class=${t??
|
|
5828
|
-
style=${R(i)??
|
|
5826
|
+
for=${this.element.properties.for??m}
|
|
5827
|
+
class=${t??m}
|
|
5828
|
+
style=${R(i)??m}
|
|
5829
5829
|
>
|
|
5830
5830
|
${this.element.properties.content}
|
|
5831
5831
|
</rtg-label>
|
|
@@ -5951,7 +5951,7 @@ body {
|
|
|
5951
5951
|
part="${exports.SbError.parts.root}"
|
|
5952
5952
|
variant="${this._variant}"
|
|
5953
5953
|
>
|
|
5954
|
-
${t?t(this.iconId,exports.SbError.parts.icon):
|
|
5954
|
+
${t?t(this.iconId,exports.SbError.parts.icon):m}
|
|
5955
5955
|
${r?d`
|
|
5956
5956
|
<rtg-alert-title
|
|
5957
5957
|
id="${this.titleId}"
|
|
@@ -5959,7 +5959,7 @@ body {
|
|
|
5959
5959
|
>
|
|
5960
5960
|
${r}
|
|
5961
5961
|
</rtg-alert-title>
|
|
5962
|
-
`:
|
|
5962
|
+
`:m}
|
|
5963
5963
|
${i?d`
|
|
5964
5964
|
<rtg-alert-description
|
|
5965
5965
|
id="${this.descriptionId}"
|
|
@@ -5967,9 +5967,9 @@ body {
|
|
|
5967
5967
|
>
|
|
5968
5968
|
${i}
|
|
5969
5969
|
</rtg-alert-description>
|
|
5970
|
-
`:
|
|
5970
|
+
`:m}
|
|
5971
5971
|
</rtg-alert>
|
|
5972
|
-
`}};exports.SbError._ROOT="error";exports.SbError._ICON="icon";exports.SbError._TITLE="title";exports.SbError._DESCRIPTION="description";Zr([a({type:String})],exports.SbError.prototype,"seed",2);Zr([a({attribute:"child-id",type:String})],exports.SbError.prototype,"childId",2);Zr([a({type:String})],exports.SbError.prototype,"variant",2);Zr([a({type:Object})],exports.SbError.prototype,"content",2);Zr([a({type:String})],exports.SbError.prototype,"icon",2);exports.SbError=Zr([p("sb-error")],exports.SbError);var bg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,Q=(e,t,r,i)=>{for(var s=i>1?void 0:i?fg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&bg(t,r,s),s};exports.SbPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="password",this.variant="simple",this.content="split",this.label="Password",this.rules=[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],this.requiredError="Password is a required field.",this.formatError="Enter a valid password.",this._invalid=!1,this._errors=[],this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPasswordField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbPasswordField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._errors=[]}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasswordField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPasswordField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPasswordField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPasswordField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPasswordField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPasswordField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPasswordField._ERROR}`}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPasswordField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._errors=[r],this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Password must be at least ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Password must be at most ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){let r=!0;const i=[];for(const o of this.rules)(o.name?exports.SbPasswordField._PATTERNS[o.name]:new RegExp(o.pattern)).test(t)||(r=!1,o.error&&i.push(o.error));if(r)return!0;const s=i.length?i.join(" "):this.formatError;return this._invalid=!0,this._errors=i.length?i:[this.formatError],this._dispatchValidate(!1,"format",t,s),!1}_doValidateSuccess(t,r){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid password."),!0)):(this._doValidateSuccess(t,"Valid password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?
|
|
5972
|
+
`}};exports.SbError._ROOT="error";exports.SbError._ICON="icon";exports.SbError._TITLE="title";exports.SbError._DESCRIPTION="description";Zr([a({type:String})],exports.SbError.prototype,"seed",2);Zr([a({attribute:"child-id",type:String})],exports.SbError.prototype,"childId",2);Zr([a({type:String})],exports.SbError.prototype,"variant",2);Zr([a({type:Object})],exports.SbError.prototype,"content",2);Zr([a({type:String})],exports.SbError.prototype,"icon",2);exports.SbError=Zr([p("sb-error")],exports.SbError);var bg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,Q=(e,t,r,i)=>{for(var s=i>1?void 0:i?fg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&bg(t,r,s),s};exports.SbPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="password",this.variant="simple",this.content="split",this.label="Password",this.rules=[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],this.requiredError="Password is a required field.",this.formatError="Enter a valid password.",this._invalid=!1,this._errors=[],this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPasswordField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbPasswordField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._errors=[]}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasswordField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPasswordField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPasswordField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPasswordField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPasswordField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPasswordField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPasswordField._ERROR}`}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPasswordField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._errors=[r],this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Password must be at least ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Password must be at most ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){let r=!0;const i=[];for(const o of this.rules)(o.name?exports.SbPasswordField._PATTERNS[o.name]:new RegExp(o.pattern)).test(t)||(r=!1,o.error&&i.push(o.error));if(r)return!0;const s=i.length?i.join(" "):this.formatError;return this._invalid=!0,this._errors=i.length?i:[this.formatError],this._dispatchValidate(!1,"format",t,s),!1}_doValidateSuccess(t,r){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid password."),!0)):(this._doValidateSuccess(t,"Valid password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
5973
5973
|
<span
|
|
5974
5974
|
id="${this.markId}"
|
|
5975
5975
|
part="${exports.SbPasswordField.parts.mark}"
|
|
@@ -5992,7 +5992,7 @@ body {
|
|
|
5992
5992
|
>
|
|
5993
5993
|
${this.description}
|
|
5994
5994
|
</rtg-field-description>
|
|
5995
|
-
`:
|
|
5995
|
+
`:m}_renderError(){if(!this._invalid)return m;const t=this._errors.map(r=>({message:r}));return d`
|
|
5996
5996
|
<rtg-field-error
|
|
5997
5997
|
id="${this.errorId}"
|
|
5998
5998
|
part="${exports.SbPasswordField.parts.error}"
|
|
@@ -6020,9 +6020,9 @@ body {
|
|
|
6020
6020
|
id="${this.inputId}"
|
|
6021
6021
|
part="${exports.SbPasswordField.parts.input}"
|
|
6022
6022
|
name="${this.name}"
|
|
6023
|
-
placeholder="${this.placeholder??
|
|
6024
|
-
minlength="${t??
|
|
6025
|
-
maxlength="${r??
|
|
6023
|
+
placeholder="${this.placeholder??m}"
|
|
6024
|
+
minlength="${t??m}"
|
|
6025
|
+
maxlength="${r??m}"
|
|
6026
6026
|
?disabled="${this.disabled}"
|
|
6027
6027
|
?invalid=${this._invalid}
|
|
6028
6028
|
?required=${this.required}
|
|
@@ -6033,18 +6033,18 @@ body {
|
|
|
6033
6033
|
part="${exports.SbPasswordField.parts.input}"
|
|
6034
6034
|
type="password"
|
|
6035
6035
|
name="${this.name}"
|
|
6036
|
-
placeholder="${this.placeholder??
|
|
6037
|
-
minlength="${t??
|
|
6038
|
-
maxlength="${r??
|
|
6036
|
+
placeholder="${this.placeholder??m}"
|
|
6037
|
+
minlength="${t??m}"
|
|
6038
|
+
maxlength="${r??m}"
|
|
6039
6039
|
?disabled="${this.disabled}"
|
|
6040
6040
|
?invalid=${this._invalid}
|
|
6041
6041
|
?required=${this.required}
|
|
6042
6042
|
></rtg-input>
|
|
6043
6043
|
`}
|
|
6044
6044
|
${this._renderError()}
|
|
6045
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6045
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6046
6046
|
</rtg-field>
|
|
6047
|
-
`}};exports.SbPasswordField._ROOT="password-field";exports.SbPasswordField._CONTENT="content";exports.SbPasswordField._LABEL="label";exports.SbPasswordField._MARK="mark";exports.SbPasswordField._DESCRIPTION="description";exports.SbPasswordField._INPUT="input";exports.SbPasswordField._ERROR="error";exports.SbPasswordField.TAG=`sb-${exports.SbPasswordField._ROOT}`;exports.SbPasswordField._PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};Q([a({type:String})],exports.SbPasswordField.prototype,"seed",2);Q([a({attribute:"child-id",type:String})],exports.SbPasswordField.prototype,"childId",2);Q([a({attribute:"field-id",type:String})],exports.SbPasswordField.prototype,"fieldId",2);Q([a({type:String})],exports.SbPasswordField.prototype,"name",2);Q([a({type:String})],exports.SbPasswordField.prototype,"variant",2);Q([a({type:String})],exports.SbPasswordField.prototype,"content",2);Q([a({type:String})],exports.SbPasswordField.prototype,"label",2);Q([a({type:String})],exports.SbPasswordField.prototype,"placeholder",2);Q([a({type:String})],exports.SbPasswordField.prototype,"description",2);Q([a({type:String})],exports.SbPasswordField.prototype,"mark",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"caret",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"disabled",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"required",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"minlength",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"maxlength",2);Q([a({type:Array})],exports.SbPasswordField.prototype,"rules",2);Q([a({attribute:"required-error",type:String})],exports.SbPasswordField.prototype,"requiredError",2);Q([a({attribute:"minlength-error",type:String})],exports.SbPasswordField.prototype,"minlengthError",2);Q([a({attribute:"maxlength-error",type:String})],exports.SbPasswordField.prototype,"maxlengthError",2);Q([a({attribute:"format-error",type:String})],exports.SbPasswordField.prototype,"formatError",2);Q([x()],exports.SbPasswordField.prototype,"_invalid",2);Q([x()],exports.SbPasswordField.prototype,"_errors",2);Q([x()],exports.SbPasswordField.prototype,"_value",2);exports.SbPasswordField=Q([p("sb-password-field")],exports.SbPasswordField);var vg=Object.defineProperty,yg=Object.getOwnPropertyDescriptor,dt=(e,t,r,i)=>{for(var s=i>1?void 0:i?yg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&vg(t,r,s),s};exports.SbConfirmField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="confirm",this.variant="simple",this.content="split",this.pair="sb-password-field",this.label="Confirm Password",this.requiredError="Confirm password is a required field.",this.matchError="Passwords do not match.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbConfirmField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbConfirmField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbConfirmField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbConfirmField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbConfirmField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbConfirmField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbConfirmField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbConfirmField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbConfirmField._ERROR}`}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_pairValue(){const t=this._form??document,r=this.pair,i=t.querySelector(r);if(!i)return"";const s=i.querySelector(`[part="${exports.SbPasswordField.parts.input}"] input`);return(s==null?void 0:s.value)??""}_dispatchValidate(t,r,i,s,o){const n=this.inputId,h=this.rootId,u=this.name,g=this.pair,y=new CustomEvent(exports.SbConfirmField.validateEventName,{detail:{id:n,parentId:h,name:u,value:i,pairSelector:g,pairValue:o,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(y)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMatch(t){const r=this._pairValue();if(t===r)return!0;const i=this.matchError;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"match",t,i,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMatch(t),r?(this._doValidateSuccess(t,"Valid confirm password."),!0):!1):(this._doValidateSuccess(t,"Valid confirm password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?
|
|
6047
|
+
`}};exports.SbPasswordField._ROOT="password-field";exports.SbPasswordField._CONTENT="content";exports.SbPasswordField._LABEL="label";exports.SbPasswordField._MARK="mark";exports.SbPasswordField._DESCRIPTION="description";exports.SbPasswordField._INPUT="input";exports.SbPasswordField._ERROR="error";exports.SbPasswordField.TAG=`sb-${exports.SbPasswordField._ROOT}`;exports.SbPasswordField._PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};Q([a({type:String})],exports.SbPasswordField.prototype,"seed",2);Q([a({attribute:"child-id",type:String})],exports.SbPasswordField.prototype,"childId",2);Q([a({attribute:"field-id",type:String})],exports.SbPasswordField.prototype,"fieldId",2);Q([a({type:String})],exports.SbPasswordField.prototype,"name",2);Q([a({type:String})],exports.SbPasswordField.prototype,"variant",2);Q([a({type:String})],exports.SbPasswordField.prototype,"content",2);Q([a({type:String})],exports.SbPasswordField.prototype,"label",2);Q([a({type:String})],exports.SbPasswordField.prototype,"placeholder",2);Q([a({type:String})],exports.SbPasswordField.prototype,"description",2);Q([a({type:String})],exports.SbPasswordField.prototype,"mark",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"caret",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"disabled",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"required",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"minlength",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"maxlength",2);Q([a({type:Array})],exports.SbPasswordField.prototype,"rules",2);Q([a({attribute:"required-error",type:String})],exports.SbPasswordField.prototype,"requiredError",2);Q([a({attribute:"minlength-error",type:String})],exports.SbPasswordField.prototype,"minlengthError",2);Q([a({attribute:"maxlength-error",type:String})],exports.SbPasswordField.prototype,"maxlengthError",2);Q([a({attribute:"format-error",type:String})],exports.SbPasswordField.prototype,"formatError",2);Q([x()],exports.SbPasswordField.prototype,"_invalid",2);Q([x()],exports.SbPasswordField.prototype,"_errors",2);Q([x()],exports.SbPasswordField.prototype,"_value",2);exports.SbPasswordField=Q([p("sb-password-field")],exports.SbPasswordField);var vg=Object.defineProperty,yg=Object.getOwnPropertyDescriptor,dt=(e,t,r,i)=>{for(var s=i>1?void 0:i?yg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&vg(t,r,s),s};exports.SbConfirmField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="confirm",this.variant="simple",this.content="split",this.pair="sb-password-field",this.label="Confirm Password",this.requiredError="Confirm password is a required field.",this.matchError="Passwords do not match.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbConfirmField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbConfirmField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbConfirmField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbConfirmField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbConfirmField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbConfirmField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbConfirmField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbConfirmField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbConfirmField._ERROR}`}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_pairValue(){const t=this._form??document,r=this.pair,i=t.querySelector(r);if(!i)return"";const s=i.querySelector(`[part="${exports.SbPasswordField.parts.input}"] input`);return(s==null?void 0:s.value)??""}_dispatchValidate(t,r,i,s,o){const n=this.inputId,h=this.rootId,u=this.name,g=this.pair,y=new CustomEvent(exports.SbConfirmField.validateEventName,{detail:{id:n,parentId:h,name:u,value:i,pairSelector:g,pairValue:o,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(y)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMatch(t){const r=this._pairValue();if(t===r)return!0;const i=this.matchError;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"match",t,i,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMatch(t),r?(this._doValidateSuccess(t,"Valid confirm password."),!0):!1):(this._doValidateSuccess(t,"Valid confirm password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6048
6048
|
<span
|
|
6049
6049
|
id="${this.markId}"
|
|
6050
6050
|
part="${exports.SbConfirmField.parts.mark}"
|
|
@@ -6067,13 +6067,13 @@ body {
|
|
|
6067
6067
|
>
|
|
6068
6068
|
${this.description}
|
|
6069
6069
|
</rtg-field-description>
|
|
6070
|
-
`:
|
|
6070
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6071
6071
|
<rtg-field-error
|
|
6072
6072
|
id="${this.errorId}"
|
|
6073
6073
|
part="${exports.SbConfirmField.parts.error}"
|
|
6074
6074
|
.errors="${[{message:this._error}]}"
|
|
6075
6075
|
></rtg-field-error>
|
|
6076
|
-
`:
|
|
6076
|
+
`:m}render(){return d`
|
|
6077
6077
|
<rtg-field
|
|
6078
6078
|
id="${this.rootId}"
|
|
6079
6079
|
part="${exports.SbConfirmField.parts.root}"
|
|
@@ -6095,7 +6095,7 @@ body {
|
|
|
6095
6095
|
id="${this.inputId}"
|
|
6096
6096
|
part="${exports.SbConfirmField.parts.input}"
|
|
6097
6097
|
name="${this.name}"
|
|
6098
|
-
placeholder="${this.placeholder??
|
|
6098
|
+
placeholder="${this.placeholder??m}"
|
|
6099
6099
|
?disabled="${this.disabled}"
|
|
6100
6100
|
?invalid=${this._invalid}
|
|
6101
6101
|
?required=${this.required}
|
|
@@ -6106,16 +6106,16 @@ body {
|
|
|
6106
6106
|
part="${exports.SbConfirmField.parts.input}"
|
|
6107
6107
|
type="password"
|
|
6108
6108
|
name="${this.name}"
|
|
6109
|
-
placeholder="${this.placeholder??
|
|
6109
|
+
placeholder="${this.placeholder??m}"
|
|
6110
6110
|
?disabled="${this.disabled}"
|
|
6111
6111
|
?invalid=${this._invalid}
|
|
6112
6112
|
?required=${this.required}
|
|
6113
6113
|
></rtg-input>
|
|
6114
6114
|
`}
|
|
6115
6115
|
${this._renderError()}
|
|
6116
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6116
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6117
6117
|
</rtg-field>
|
|
6118
|
-
`}};exports.SbConfirmField._ROOT="confirm-field";exports.SbConfirmField._CONTENT="content";exports.SbConfirmField._LABEL="label";exports.SbConfirmField._MARK="mark";exports.SbConfirmField._DESCRIPTION="description";exports.SbConfirmField._INPUT="input";exports.SbConfirmField._ERROR="error";exports.SbConfirmField.TAG=`sb-${exports.SbConfirmField._ROOT}`;dt([a({type:String})],exports.SbConfirmField.prototype,"seed",2);dt([a({attribute:"child-id",type:String})],exports.SbConfirmField.prototype,"childId",2);dt([a({attribute:"field-id",type:String})],exports.SbConfirmField.prototype,"fieldId",2);dt([a({type:String})],exports.SbConfirmField.prototype,"name",2);dt([a({type:String})],exports.SbConfirmField.prototype,"variant",2);dt([a({type:String})],exports.SbConfirmField.prototype,"content",2);dt([a({type:String})],exports.SbConfirmField.prototype,"pair",2);dt([a({type:String})],exports.SbConfirmField.prototype,"label",2);dt([a({type:String})],exports.SbConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.SbConfirmField.prototype,"description",2);dt([a({type:String})],exports.SbConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"caret",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"required",2);dt([a({attribute:"required-error",type:String})],exports.SbConfirmField.prototype,"requiredError",2);dt([a({attribute:"match-error",type:String})],exports.SbConfirmField.prototype,"matchError",2);dt([x()],exports.SbConfirmField.prototype,"_invalid",2);dt([x()],exports.SbConfirmField.prototype,"_error",2);dt([x()],exports.SbConfirmField.prototype,"_value",2);exports.SbConfirmField=dt([p("sb-confirm-field")],exports.SbConfirmField);var wg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,gt=(e,t,r,i)=>{for(var s=i>1?void 0:i?_g(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wg(t,r,s),s};exports.SbEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="email",this.content="split",this.label="Email",this.requiredError="Email is a required field.",this.formatError="Enter a valid email address.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbEmailField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbEmailField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbEmailField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbEmailField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbEmailField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbEmailField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbEmailField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbEmailField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbEmailField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbEmailField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbEmailField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid email address${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?
|
|
6118
|
+
`}};exports.SbConfirmField._ROOT="confirm-field";exports.SbConfirmField._CONTENT="content";exports.SbConfirmField._LABEL="label";exports.SbConfirmField._MARK="mark";exports.SbConfirmField._DESCRIPTION="description";exports.SbConfirmField._INPUT="input";exports.SbConfirmField._ERROR="error";exports.SbConfirmField.TAG=`sb-${exports.SbConfirmField._ROOT}`;dt([a({type:String})],exports.SbConfirmField.prototype,"seed",2);dt([a({attribute:"child-id",type:String})],exports.SbConfirmField.prototype,"childId",2);dt([a({attribute:"field-id",type:String})],exports.SbConfirmField.prototype,"fieldId",2);dt([a({type:String})],exports.SbConfirmField.prototype,"name",2);dt([a({type:String})],exports.SbConfirmField.prototype,"variant",2);dt([a({type:String})],exports.SbConfirmField.prototype,"content",2);dt([a({type:String})],exports.SbConfirmField.prototype,"pair",2);dt([a({type:String})],exports.SbConfirmField.prototype,"label",2);dt([a({type:String})],exports.SbConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.SbConfirmField.prototype,"description",2);dt([a({type:String})],exports.SbConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"caret",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"required",2);dt([a({attribute:"required-error",type:String})],exports.SbConfirmField.prototype,"requiredError",2);dt([a({attribute:"match-error",type:String})],exports.SbConfirmField.prototype,"matchError",2);dt([x()],exports.SbConfirmField.prototype,"_invalid",2);dt([x()],exports.SbConfirmField.prototype,"_error",2);dt([x()],exports.SbConfirmField.prototype,"_value",2);exports.SbConfirmField=dt([p("sb-confirm-field")],exports.SbConfirmField);var wg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,gt=(e,t,r,i)=>{for(var s=i>1?void 0:i?_g(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wg(t,r,s),s};exports.SbEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="email",this.content="split",this.label="Email",this.requiredError="Email is a required field.",this.formatError="Enter a valid email address.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbEmailField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbEmailField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbEmailField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbEmailField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbEmailField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbEmailField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbEmailField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbEmailField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbEmailField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbEmailField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbEmailField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid email address${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6119
6119
|
<span
|
|
6120
6120
|
id="${this.markId}"
|
|
6121
6121
|
part="${exports.SbEmailField.parts.mark}"
|
|
@@ -6138,13 +6138,13 @@ body {
|
|
|
6138
6138
|
>
|
|
6139
6139
|
${this.description}
|
|
6140
6140
|
</rtg-field-description>
|
|
6141
|
-
`:
|
|
6141
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6142
6142
|
<rtg-field-error
|
|
6143
6143
|
id="${this.errorId}"
|
|
6144
6144
|
part="${exports.SbEmailField.parts.error}"
|
|
6145
6145
|
.errors=${[{message:this._error}]}
|
|
6146
6146
|
></rtg-field-error>
|
|
6147
|
-
`:
|
|
6147
|
+
`:m}render(){return d`
|
|
6148
6148
|
<rtg-field
|
|
6149
6149
|
id="${this.rootId}"
|
|
6150
6150
|
part="${exports.SbEmailField.parts.root}"
|
|
@@ -6166,16 +6166,16 @@ body {
|
|
|
6166
6166
|
part="${exports.SbEmailField.parts.input}"
|
|
6167
6167
|
type="email"
|
|
6168
6168
|
name="${this.name}"
|
|
6169
|
-
placeholder="${this.placeholder??
|
|
6169
|
+
placeholder="${this.placeholder??m}"
|
|
6170
6170
|
?disabled="${this.disabled}"
|
|
6171
6171
|
?invalid=${this._invalid}
|
|
6172
6172
|
?required=${this.required}
|
|
6173
6173
|
></rtg-input>
|
|
6174
6174
|
|
|
6175
6175
|
${this._renderError()}
|
|
6176
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6176
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6177
6177
|
</rtg-field>
|
|
6178
|
-
`}};exports.SbEmailField._ROOT="email-field";exports.SbEmailField._CONTENT="content";exports.SbEmailField._LABEL="label";exports.SbEmailField._MARK="mark";exports.SbEmailField._DESCRIPTION="description";exports.SbEmailField._INPUT="input";exports.SbEmailField._ERROR="error";exports.SbEmailField.TAG=`sb-${exports.SbEmailField._ROOT}`;exports.SbEmailField._PATTERN=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;gt([a({type:String})],exports.SbEmailField.prototype,"seed",2);gt([a({attribute:"child-id",type:String})],exports.SbEmailField.prototype,"childId",2);gt([a({attribute:"field-id",type:String})],exports.SbEmailField.prototype,"fieldId",2);gt([a({type:String})],exports.SbEmailField.prototype,"name",2);gt([a({type:String})],exports.SbEmailField.prototype,"content",2);gt([a({type:String})],exports.SbEmailField.prototype,"label",2);gt([a({type:String})],exports.SbEmailField.prototype,"placeholder",2);gt([a({type:String})],exports.SbEmailField.prototype,"description",2);gt([a({type:String})],exports.SbEmailField.prototype,"mark",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"caret",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"disabled",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"required",2);gt([a({attribute:"required-error",type:String})],exports.SbEmailField.prototype,"requiredError",2);gt([a({attribute:"format-error",type:String})],exports.SbEmailField.prototype,"formatError",2);gt([x()],exports.SbEmailField.prototype,"_invalid",2);gt([x()],exports.SbEmailField.prototype,"_error",2);gt([x()],exports.SbEmailField.prototype,"_value",2);exports.SbEmailField=gt([p("sb-email-field")],exports.SbEmailField);var xg=Object.defineProperty,Sg=Object.getOwnPropertyDescriptor,ut=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xg(t,r,s),s};exports.SbIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="identifier",this.identifiers=[],this.content="split",this.requiredError="Identifier is a required field.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbIdentifierField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbIdentifierField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbIdentifierField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbIdentifierField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbIdentifierField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbIdentifierField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbIdentifierField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbIdentifierField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbIdentifierField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _label(){const t=this.identifiers;if(t.length===0)return"Identifier";let r=t[0];if(t.length>1){const i=t.slice(0,-1).join(", "),s=t.length>2?", or ":" or ",o=t.slice(-1)[0];r=i+s+o}return r.charAt(0).toUpperCase()+r.slice(1)}get _type(){return this.identifiers.length===1&&this.identifiers[0]==="email"?"email":this.identifiers.length===1&&this.identifiers[0]==="phone"?"tel":"text"}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=this.identifiers,g=new CustomEvent(exports.SbIdentifierField.validateEventName,{detail:{id:o,parentId:n,name:h,identifiers:u,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(g)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validate(){const t=this._normalizedValue;if(!this._validateRequired(t))return!1;const i=`Valid identifier${t?"":" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?
|
|
6178
|
+
`}};exports.SbEmailField._ROOT="email-field";exports.SbEmailField._CONTENT="content";exports.SbEmailField._LABEL="label";exports.SbEmailField._MARK="mark";exports.SbEmailField._DESCRIPTION="description";exports.SbEmailField._INPUT="input";exports.SbEmailField._ERROR="error";exports.SbEmailField.TAG=`sb-${exports.SbEmailField._ROOT}`;exports.SbEmailField._PATTERN=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;gt([a({type:String})],exports.SbEmailField.prototype,"seed",2);gt([a({attribute:"child-id",type:String})],exports.SbEmailField.prototype,"childId",2);gt([a({attribute:"field-id",type:String})],exports.SbEmailField.prototype,"fieldId",2);gt([a({type:String})],exports.SbEmailField.prototype,"name",2);gt([a({type:String})],exports.SbEmailField.prototype,"content",2);gt([a({type:String})],exports.SbEmailField.prototype,"label",2);gt([a({type:String})],exports.SbEmailField.prototype,"placeholder",2);gt([a({type:String})],exports.SbEmailField.prototype,"description",2);gt([a({type:String})],exports.SbEmailField.prototype,"mark",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"caret",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"disabled",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"required",2);gt([a({attribute:"required-error",type:String})],exports.SbEmailField.prototype,"requiredError",2);gt([a({attribute:"format-error",type:String})],exports.SbEmailField.prototype,"formatError",2);gt([x()],exports.SbEmailField.prototype,"_invalid",2);gt([x()],exports.SbEmailField.prototype,"_error",2);gt([x()],exports.SbEmailField.prototype,"_value",2);exports.SbEmailField=gt([p("sb-email-field")],exports.SbEmailField);var xg=Object.defineProperty,Sg=Object.getOwnPropertyDescriptor,ut=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xg(t,r,s),s};exports.SbIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="identifier",this.identifiers=[],this.content="split",this.requiredError="Identifier is a required field.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbIdentifierField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbIdentifierField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbIdentifierField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbIdentifierField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbIdentifierField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbIdentifierField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbIdentifierField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbIdentifierField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbIdentifierField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _label(){const t=this.identifiers;if(t.length===0)return"Identifier";let r=t[0];if(t.length>1){const i=t.slice(0,-1).join(", "),s=t.length>2?", or ":" or ",o=t.slice(-1)[0];r=i+s+o}return r.charAt(0).toUpperCase()+r.slice(1)}get _type(){return this.identifiers.length===1&&this.identifiers[0]==="email"?"email":this.identifiers.length===1&&this.identifiers[0]==="phone"?"tel":"text"}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=this.identifiers,g=new CustomEvent(exports.SbIdentifierField.validateEventName,{detail:{id:o,parentId:n,name:h,identifiers:u,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(g)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validate(){const t=this._normalizedValue;if(!this._validateRequired(t))return!1;const i=`Valid identifier${t?"":" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6179
6179
|
<span
|
|
6180
6180
|
id="${this.markId}"
|
|
6181
6181
|
part="${exports.SbIdentifierField.parts.mark}"
|
|
@@ -6198,13 +6198,13 @@ body {
|
|
|
6198
6198
|
>
|
|
6199
6199
|
${this.description}
|
|
6200
6200
|
</rtg-field-description>
|
|
6201
|
-
`:
|
|
6201
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6202
6202
|
<rtg-field-error
|
|
6203
6203
|
id="${this.errorId}"
|
|
6204
6204
|
part="${exports.SbIdentifierField.parts.error}"
|
|
6205
6205
|
.errors=${[{message:this._error}]}
|
|
6206
6206
|
></rtg-field-error>
|
|
6207
|
-
`:
|
|
6207
|
+
`:m}render(){return d`
|
|
6208
6208
|
<rtg-field
|
|
6209
6209
|
id="${this.rootId}"
|
|
6210
6210
|
part="${exports.SbIdentifierField.parts.root}"
|
|
@@ -6226,17 +6226,17 @@ body {
|
|
|
6226
6226
|
part="${exports.SbIdentifierField.parts.input}"
|
|
6227
6227
|
type="${this._type}"
|
|
6228
6228
|
name="${this.name}"
|
|
6229
|
-
placeholder="${this.placeholder??
|
|
6229
|
+
placeholder="${this.placeholder??m}"
|
|
6230
6230
|
?disabled="${this.disabled}"
|
|
6231
6231
|
?invalid=${this._invalid}
|
|
6232
|
-
autocomplete="${this.autocomplete??
|
|
6232
|
+
autocomplete="${this.autocomplete??m}"
|
|
6233
6233
|
?required=${this.required}
|
|
6234
6234
|
></rtg-input>
|
|
6235
6235
|
|
|
6236
6236
|
${this._renderError()}
|
|
6237
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6237
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6238
6238
|
</rtg-field>
|
|
6239
|
-
`}};exports.SbIdentifierField._ROOT="identifier-field";exports.SbIdentifierField._CONTENT="content";exports.SbIdentifierField._LABEL="label";exports.SbIdentifierField._MARK="mark";exports.SbIdentifierField._DESCRIPTION="description";exports.SbIdentifierField._INPUT="input";exports.SbIdentifierField._ERROR="error";exports.SbIdentifierField.TAG=`sb-${exports.SbIdentifierField._ROOT}`;ut([a({type:String})],exports.SbIdentifierField.prototype,"seed",2);ut([a({attribute:"child-id",type:String})],exports.SbIdentifierField.prototype,"childId",2);ut([a({attribute:"field-id",type:String})],exports.SbIdentifierField.prototype,"fieldId",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"name",2);ut([a({type:Array})],exports.SbIdentifierField.prototype,"identifiers",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"content",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"label",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"placeholder",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"description",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"mark",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"caret",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"disabled",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"required",2);ut([a({attribute:"required-error",type:String})],exports.SbIdentifierField.prototype,"requiredError",2);ut([x()],exports.SbIdentifierField.prototype,"_invalid",2);ut([x()],exports.SbIdentifierField.prototype,"_error",2);ut([x()],exports.SbIdentifierField.prototype,"_value",2);exports.SbIdentifierField=ut([p("sb-identifier-field")],exports.SbIdentifierField);var $g=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,
|
|
6239
|
+
`}};exports.SbIdentifierField._ROOT="identifier-field";exports.SbIdentifierField._CONTENT="content";exports.SbIdentifierField._LABEL="label";exports.SbIdentifierField._MARK="mark";exports.SbIdentifierField._DESCRIPTION="description";exports.SbIdentifierField._INPUT="input";exports.SbIdentifierField._ERROR="error";exports.SbIdentifierField.TAG=`sb-${exports.SbIdentifierField._ROOT}`;ut([a({type:String})],exports.SbIdentifierField.prototype,"seed",2);ut([a({attribute:"child-id",type:String})],exports.SbIdentifierField.prototype,"childId",2);ut([a({attribute:"field-id",type:String})],exports.SbIdentifierField.prototype,"fieldId",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"name",2);ut([a({type:Array})],exports.SbIdentifierField.prototype,"identifiers",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"content",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"label",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"placeholder",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"description",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"mark",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"caret",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"disabled",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"required",2);ut([a({attribute:"required-error",type:String})],exports.SbIdentifierField.prototype,"requiredError",2);ut([x()],exports.SbIdentifierField.prototype,"_invalid",2);ut([x()],exports.SbIdentifierField.prototype,"_error",2);ut([x()],exports.SbIdentifierField.prototype,"_value",2);exports.SbIdentifierField=ut([p("sb-identifier-field")],exports.SbIdentifierField);var $g=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,tt=(e,t,r,i)=>{for(var s=i>1?void 0:i?Cg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&$g(t,r,s),s};exports.SbNameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="name",this.content="split",this.label="Name",this.requiredError="Name is a required field.",this.formatError="Enter a valid name.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbNameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbNameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbNameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbNameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbNameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbNameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbNameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbNameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbNameField._ERROR}`}get _normalizedValue(){return this._value.trim().replace(/\s+/g," ")}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbNameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbNameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Name must be at least ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Name must be at most ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){if(this._pattern.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid name."),!0)):(this._doValidateSuccess(t,"Valid name (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6240
6240
|
<span
|
|
6241
6241
|
id="${this.markId}"
|
|
6242
6242
|
part="${exports.SbNameField.parts.mark}"
|
|
@@ -6244,69 +6244,62 @@ body {
|
|
|
6244
6244
|
>
|
|
6245
6245
|
${this.mark?this.mark:d`*`}
|
|
6246
6246
|
</span>
|
|
6247
|
-
`}
|
|
6248
|
-
<rtg-field
|
|
6249
|
-
id="${
|
|
6250
|
-
part="${exports.SbNameField.parts.
|
|
6251
|
-
|
|
6252
|
-
?disabled="${this.disabled}"
|
|
6253
|
-
?invalid="${this._firstInvalid}"
|
|
6247
|
+
`}_renderLabel(){return d`
|
|
6248
|
+
<rtg-field-label
|
|
6249
|
+
id="${this.labelId}"
|
|
6250
|
+
part="${exports.SbNameField.parts.label}"
|
|
6251
|
+
for="${this.inputId}"
|
|
6254
6252
|
>
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
<rtg-field-error part="${exports.SbNameField.parts.error}">
|
|
6272
|
-
${this._firstError}
|
|
6273
|
-
</rtg-field-error>
|
|
6274
|
-
`:b}
|
|
6275
|
-
</rtg-field>
|
|
6276
|
-
`}_renderLastField(){const t=`${this.rootId}-last`;return d`
|
|
6253
|
+
${this.label} ${this._renderMark()}
|
|
6254
|
+
</rtg-field-label>
|
|
6255
|
+
`}_renderDescription(){return this.description?d`
|
|
6256
|
+
<rtg-field-description
|
|
6257
|
+
id="${this.descriptionId}"
|
|
6258
|
+
part="${exports.SbNameField.parts.description}"
|
|
6259
|
+
>
|
|
6260
|
+
${this.description}
|
|
6261
|
+
</rtg-field-description>
|
|
6262
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6263
|
+
<rtg-field-error
|
|
6264
|
+
id="${this.errorId}"
|
|
6265
|
+
part="${exports.SbNameField.parts.error}"
|
|
6266
|
+
.errors=${[{message:this._error}]}
|
|
6267
|
+
></rtg-field-error>
|
|
6268
|
+
`:m}render(){const{minlength:t,maxlength:r}=this._lengths;return d`
|
|
6277
6269
|
<rtg-field
|
|
6278
|
-
id="${
|
|
6279
|
-
part="${exports.SbNameField.parts.
|
|
6280
|
-
data-content="
|
|
6270
|
+
id="${this.rootId}"
|
|
6271
|
+
part="${exports.SbNameField.parts.root}"
|
|
6272
|
+
data-content="${this.content}"
|
|
6281
6273
|
?disabled="${this.disabled}"
|
|
6282
|
-
?invalid="${this.
|
|
6274
|
+
?invalid="${this._invalid}"
|
|
6283
6275
|
>
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6276
|
+
${this.content==="group"?d`
|
|
6277
|
+
<rtg-field-content
|
|
6278
|
+
id="${this.contentId}"
|
|
6279
|
+
part="${exports.SbNameField.parts.content}"
|
|
6280
|
+
>
|
|
6281
|
+
${this._renderLabel()} ${this._renderDescription()}
|
|
6282
|
+
</rtg-field-content>
|
|
6283
|
+
`:this._renderLabel()}
|
|
6287
6284
|
|
|
6288
6285
|
<rtg-input
|
|
6289
|
-
id="${
|
|
6286
|
+
id="${this.inputId}"
|
|
6290
6287
|
part="${exports.SbNameField.parts.input}"
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6288
|
+
type="text"
|
|
6289
|
+
name="${this.name}"
|
|
6290
|
+
placeholder="${this.placeholder??m}"
|
|
6291
|
+
pattern="${this._pattern.source}"
|
|
6292
|
+
minlength="${t??m}"
|
|
6293
|
+
maxlength="${r??m}"
|
|
6294
|
+
?disabled="${this.disabled}"
|
|
6295
|
+
?invalid=${this._invalid}
|
|
6296
6296
|
?required=${this.required}
|
|
6297
6297
|
></rtg-input>
|
|
6298
6298
|
|
|
6299
|
-
${this.
|
|
6300
|
-
|
|
6301
|
-
${this._lastError}
|
|
6302
|
-
</rtg-field-error>
|
|
6303
|
-
`:b}
|
|
6299
|
+
${this._renderError()}
|
|
6300
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6304
6301
|
</rtg-field>
|
|
6305
|
-
`}
|
|
6306
|
-
<div class="sb-flex">
|
|
6307
|
-
${this._renderFirstField()} ${this._renderLastField()}
|
|
6308
|
-
</div>
|
|
6309
|
-
`}};exports.SbNameField._ROOT="name-field";exports.SbNameField._FIRST="first";exports.SbNameField._LAST="last";rt([a({type:String})],exports.SbNameField.prototype,"firstLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"lastLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"seed",2);rt([a({attribute:"child-id"})],exports.SbNameField.prototype,"childId",2);rt([a({type:String})],exports.SbNameField.prototype,"name",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);rt([a({type:String})],exports.SbNameField.prototype,"firstName",2);rt([a({type:String})],exports.SbNameField.prototype,"lastName",2);rt([a({type:String})],exports.SbNameField.prototype,"firstPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"lastPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"requiredError",2);rt([a({type:String})],exports.SbNameField.prototype,"formatError",2);rt([a({type:String})],exports.SbNameField.prototype,"mark",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);rt([x()],exports.SbNameField.prototype,"_first",2);rt([x()],exports.SbNameField.prototype,"_firstInvalid",2);rt([x()],exports.SbNameField.prototype,"_firstError",2);rt([x()],exports.SbNameField.prototype,"_last",2);rt([x()],exports.SbNameField.prototype,"_lastInvalid",2);rt([x()],exports.SbNameField.prototype,"_lastError",2);exports.SbNameField=rt([p("sb-name-field")],exports.SbNameField);var Eg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,mt=(e,t,r,i)=>{for(var s=i>1?void 0:i?kg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Eg(t,r,s),s};exports.SbPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="phone",this.content="split",this.label="Phone",this.requiredError="Phone is a required field.",this.formatError="Enter a valid phone number.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPhoneField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbPhoneField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPhoneField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPhoneField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPhoneField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPhoneField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPhoneField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPhoneField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPhoneField._ERROR}`}get _normalizedValue(){return this._value.replace(/\s/g,"")}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPhoneField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbPhoneField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid phone number${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?b:d`
|
|
6302
|
+
`}};exports.SbNameField._ROOT="name-field";exports.SbNameField._CONTENT="content";exports.SbNameField._LABEL="label";exports.SbNameField._MARK="mark";exports.SbNameField._DESCRIPTION="description";exports.SbNameField._INPUT="input";exports.SbNameField._ERROR="error";exports.SbNameField.TAG=`sb-${exports.SbNameField._ROOT}`;exports.SbNameField._PATTERN=/^[\p{L} .'-]*$/u;tt([a({type:String})],exports.SbNameField.prototype,"seed",2);tt([a({attribute:"child-id",type:String})],exports.SbNameField.prototype,"childId",2);tt([a({attribute:"field-id",type:String})],exports.SbNameField.prototype,"fieldId",2);tt([a({type:String})],exports.SbNameField.prototype,"name",2);tt([a({type:String})],exports.SbNameField.prototype,"content",2);tt([a({type:String})],exports.SbNameField.prototype,"label",2);tt([a({type:String})],exports.SbNameField.prototype,"placeholder",2);tt([a({type:String})],exports.SbNameField.prototype,"description",2);tt([a({type:String})],exports.SbNameField.prototype,"mark",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);tt([a({type:Number})],exports.SbNameField.prototype,"minlength",2);tt([a({type:Number})],exports.SbNameField.prototype,"maxlength",2);tt([a({type:String})],exports.SbNameField.prototype,"pattern",2);tt([a({attribute:"required-error",type:String})],exports.SbNameField.prototype,"requiredError",2);tt([a({attribute:"minlength-error",type:String})],exports.SbNameField.prototype,"minlengthError",2);tt([a({attribute:"maxlength-error",type:String})],exports.SbNameField.prototype,"maxlengthError",2);tt([a({attribute:"format-error",type:String})],exports.SbNameField.prototype,"formatError",2);tt([x()],exports.SbNameField.prototype,"_invalid",2);tt([x()],exports.SbNameField.prototype,"_error",2);tt([x()],exports.SbNameField.prototype,"_value",2);exports.SbNameField=tt([p("sb-name-field")],exports.SbNameField);var Eg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,mt=(e,t,r,i)=>{for(var s=i>1?void 0:i?kg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Eg(t,r,s),s};exports.SbPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="phone",this.content="split",this.label="Phone",this.requiredError="Phone is a required field.",this.formatError="Enter a valid phone number.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPhoneField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbPhoneField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPhoneField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPhoneField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPhoneField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPhoneField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPhoneField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPhoneField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPhoneField._ERROR}`}get _normalizedValue(){return this._value.replace(/\s/g,"")}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPhoneField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbPhoneField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid phone number${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6310
6303
|
<span
|
|
6311
6304
|
id="${this.markId}"
|
|
6312
6305
|
part="${exports.SbPhoneField.parts.mark}"
|
|
@@ -6329,13 +6322,13 @@ body {
|
|
|
6329
6322
|
>
|
|
6330
6323
|
${this.description}
|
|
6331
6324
|
</rtg-field-description>
|
|
6332
|
-
`:
|
|
6325
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6333
6326
|
<rtg-field-error
|
|
6334
6327
|
id="${this.errorId}"
|
|
6335
6328
|
part="${exports.SbPhoneField.parts.error}"
|
|
6336
6329
|
.errors=${[{message:this._error}]}
|
|
6337
6330
|
></rtg-field-error>
|
|
6338
|
-
`:
|
|
6331
|
+
`:m}render(){return d`
|
|
6339
6332
|
<rtg-field
|
|
6340
6333
|
id="${this.rootId}"
|
|
6341
6334
|
part="${exports.SbPhoneField.parts.root}"
|
|
@@ -6357,16 +6350,16 @@ body {
|
|
|
6357
6350
|
part="${exports.SbPhoneField.parts.input}"
|
|
6358
6351
|
type="tel"
|
|
6359
6352
|
name="${this.name}"
|
|
6360
|
-
placeholder="${this.placeholder??
|
|
6353
|
+
placeholder="${this.placeholder??m}"
|
|
6361
6354
|
?disabled="${this.disabled}"
|
|
6362
6355
|
?invalid=${this._invalid}
|
|
6363
6356
|
?required=${this.required}
|
|
6364
6357
|
></rtg-input>
|
|
6365
6358
|
|
|
6366
6359
|
${this._renderError()}
|
|
6367
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6360
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6368
6361
|
</rtg-field>
|
|
6369
|
-
`}};exports.SbPhoneField._ROOT="phone-field";exports.SbPhoneField._CONTENT="content";exports.SbPhoneField._LABEL="label";exports.SbPhoneField._MARK="mark";exports.SbPhoneField._DESCRIPTION="description";exports.SbPhoneField._INPUT="input";exports.SbPhoneField._ERROR="error";exports.SbPhoneField.TAG=`sb-${exports.SbPhoneField._ROOT}`;exports.SbPhoneField._PATTERN=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/;mt([a({type:String})],exports.SbPhoneField.prototype,"seed",2);mt([a({attribute:"child-id",type:String})],exports.SbPhoneField.prototype,"childId",2);mt([a({attribute:"field-id",type:String})],exports.SbPhoneField.prototype,"fieldId",2);mt([a({type:String})],exports.SbPhoneField.prototype,"name",2);mt([a({type:String})],exports.SbPhoneField.prototype,"content",2);mt([a({type:String})],exports.SbPhoneField.prototype,"label",2);mt([a({type:String})],exports.SbPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.SbPhoneField.prototype,"description",2);mt([a({type:String})],exports.SbPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"caret",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"required",2);mt([a({attribute:"required-error",type:String})],exports.SbPhoneField.prototype,"requiredError",2);mt([a({attribute:"format-error",type:String})],exports.SbPhoneField.prototype,"formatError",2);mt([x()],exports.SbPhoneField.prototype,"_invalid",2);mt([x()],exports.SbPhoneField.prototype,"_error",2);mt([x()],exports.SbPhoneField.prototype,"_value",2);exports.SbPhoneField=mt([p("sb-phone-field")],exports.SbPhoneField);var Rg=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,
|
|
6362
|
+
`}};exports.SbPhoneField._ROOT="phone-field";exports.SbPhoneField._CONTENT="content";exports.SbPhoneField._LABEL="label";exports.SbPhoneField._MARK="mark";exports.SbPhoneField._DESCRIPTION="description";exports.SbPhoneField._INPUT="input";exports.SbPhoneField._ERROR="error";exports.SbPhoneField.TAG=`sb-${exports.SbPhoneField._ROOT}`;exports.SbPhoneField._PATTERN=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/;mt([a({type:String})],exports.SbPhoneField.prototype,"seed",2);mt([a({attribute:"child-id",type:String})],exports.SbPhoneField.prototype,"childId",2);mt([a({attribute:"field-id",type:String})],exports.SbPhoneField.prototype,"fieldId",2);mt([a({type:String})],exports.SbPhoneField.prototype,"name",2);mt([a({type:String})],exports.SbPhoneField.prototype,"content",2);mt([a({type:String})],exports.SbPhoneField.prototype,"label",2);mt([a({type:String})],exports.SbPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.SbPhoneField.prototype,"description",2);mt([a({type:String})],exports.SbPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"caret",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"required",2);mt([a({attribute:"required-error",type:String})],exports.SbPhoneField.prototype,"requiredError",2);mt([a({attribute:"format-error",type:String})],exports.SbPhoneField.prototype,"formatError",2);mt([x()],exports.SbPhoneField.prototype,"_invalid",2);mt([x()],exports.SbPhoneField.prototype,"_error",2);mt([x()],exports.SbPhoneField.prototype,"_value",2);exports.SbPhoneField=mt([p("sb-phone-field")],exports.SbPhoneField);var Rg=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,et=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ig(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Rg(t,r,s),s};exports.SbUsernameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="username",this.content="split",this.label="Username",this.requiredError="Username is a required field.",this.formatError="Enter a valid username.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbUsernameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbUsernameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbUsernameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbUsernameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbUsernameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbUsernameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbUsernameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbUsernameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbUsernameField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbUsernameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbUsernameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Username must be at least ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Username must be at most ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){if(this._pattern.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid username."),!0)):(this._doValidateSuccess(t,"Valid username (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
|
|
6370
6363
|
<span
|
|
6371
6364
|
id="${this.markId}"
|
|
6372
6365
|
part="${exports.SbUsernameField.parts.mark}"
|
|
@@ -6389,13 +6382,13 @@ body {
|
|
|
6389
6382
|
>
|
|
6390
6383
|
${this.description}
|
|
6391
6384
|
</rtg-field-description>
|
|
6392
|
-
`:
|
|
6385
|
+
`:m}_renderError(){return this._invalid?d`
|
|
6393
6386
|
<rtg-field-error
|
|
6394
6387
|
id="${this.errorId}"
|
|
6395
6388
|
part="${exports.SbUsernameField.parts.error}"
|
|
6396
6389
|
.errors=${[{message:this._error}]}
|
|
6397
6390
|
></rtg-field-error>
|
|
6398
|
-
`:
|
|
6391
|
+
`:m}render(){const{minlength:t,maxlength:r}=this._lengths;return d`
|
|
6399
6392
|
<rtg-field
|
|
6400
6393
|
id="${this.rootId}"
|
|
6401
6394
|
part="${exports.SbUsernameField.parts.root}"
|
|
@@ -6417,25 +6410,25 @@ body {
|
|
|
6417
6410
|
part="${exports.SbUsernameField.parts.input}"
|
|
6418
6411
|
type="text"
|
|
6419
6412
|
name="${this.name}"
|
|
6420
|
-
placeholder="${this.placeholder??
|
|
6413
|
+
placeholder="${this.placeholder??m}"
|
|
6421
6414
|
pattern="${this._pattern.source}"
|
|
6422
|
-
minlength="${t??
|
|
6423
|
-
maxlength="${r??
|
|
6415
|
+
minlength="${t??m}"
|
|
6416
|
+
maxlength="${r??m}"
|
|
6424
6417
|
?disabled="${this.disabled}"
|
|
6425
6418
|
?invalid=${this._invalid}
|
|
6426
6419
|
?required=${this.required}
|
|
6427
6420
|
></rtg-input>
|
|
6428
6421
|
|
|
6429
6422
|
${this._renderError()}
|
|
6430
|
-
${this.content==="split"&&!this._invalid?this._renderDescription():
|
|
6423
|
+
${this.content==="split"&&!this._invalid?this._renderDescription():m}
|
|
6431
6424
|
</rtg-field>
|
|
6432
|
-
`}};exports.SbUsernameField._ROOT="username-field";exports.SbUsernameField._CONTENT="content";exports.SbUsernameField._LABEL="label";exports.SbUsernameField._MARK="mark";exports.SbUsernameField._DESCRIPTION="description";exports.SbUsernameField._INPUT="input";exports.SbUsernameField._ERROR="error";exports.SbUsernameField.TAG=`sb-${exports.SbUsernameField._ROOT}`;exports.SbUsernameField._PATTERN=/^[a-z0-9_]*$/;
|
|
6425
|
+
`}};exports.SbUsernameField._ROOT="username-field";exports.SbUsernameField._CONTENT="content";exports.SbUsernameField._LABEL="label";exports.SbUsernameField._MARK="mark";exports.SbUsernameField._DESCRIPTION="description";exports.SbUsernameField._INPUT="input";exports.SbUsernameField._ERROR="error";exports.SbUsernameField.TAG=`sb-${exports.SbUsernameField._ROOT}`;exports.SbUsernameField._PATTERN=/^[a-z0-9_]*$/;et([a({type:String})],exports.SbUsernameField.prototype,"seed",2);et([a({attribute:"child-id",type:String})],exports.SbUsernameField.prototype,"childId",2);et([a({attribute:"field-id",type:String})],exports.SbUsernameField.prototype,"fieldId",2);et([a({type:String})],exports.SbUsernameField.prototype,"name",2);et([a({type:String})],exports.SbUsernameField.prototype,"content",2);et([a({type:String})],exports.SbUsernameField.prototype,"label",2);et([a({type:String})],exports.SbUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.SbUsernameField.prototype,"description",2);et([a({type:String})],exports.SbUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"caret",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"required",2);et([a({type:Number})],exports.SbUsernameField.prototype,"minlength",2);et([a({type:Number})],exports.SbUsernameField.prototype,"maxlength",2);et([a({type:String})],exports.SbUsernameField.prototype,"pattern",2);et([a({attribute:"required-error",type:String})],exports.SbUsernameField.prototype,"requiredError",2);et([a({attribute:"minlength-error",type:String})],exports.SbUsernameField.prototype,"minlengthError",2);et([a({attribute:"maxlength-error",type:String})],exports.SbUsernameField.prototype,"maxlengthError",2);et([a({attribute:"format-error",type:String})],exports.SbUsernameField.prototype,"formatError",2);et([x()],exports.SbUsernameField.prototype,"_invalid",2);et([x()],exports.SbUsernameField.prototype,"_error",2);et([x()],exports.SbUsernameField.prototype,"_value",2);exports.SbUsernameField=et([p("sb-username-field")],exports.SbUsernameField);var Og=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,ee=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ag(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Og(t,r,s),s};exports.SbFormSubmit=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="default",this.size="default",this.label="Submit",this.spinnerAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||this.dispatchEvent(new CustomEvent(exports.SbFormSubmit.clickEventName,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}static get clickEventName(){return`${this.TAG}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSubmit.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSubmit._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
|
|
6433
6426
|
<rtg-spinner
|
|
6434
6427
|
id="${this.spinnerId}"
|
|
6435
6428
|
part="${exports.SbFormSubmit.parts.spinner}"
|
|
6436
6429
|
class="rtg-icon-inline-${this.spinnerAlign}"
|
|
6437
6430
|
></rtg-spinner>
|
|
6438
|
-
`:
|
|
6431
|
+
`:m}render(){return d`
|
|
6439
6432
|
<rtg-button
|
|
6440
6433
|
id="${this.rootId}"
|
|
6441
6434
|
part="${exports.SbFormSubmit.parts.root}"
|
|
@@ -6446,9 +6439,9 @@ body {
|
|
|
6446
6439
|
type="submit"
|
|
6447
6440
|
?disabled=${this.disabled||this.isLoading}
|
|
6448
6441
|
>
|
|
6449
|
-
${this.spinnerAlign==="start"?this._renderSpinner():
|
|
6442
|
+
${this.spinnerAlign==="start"?this._renderSpinner():m}
|
|
6450
6443
|
${this.label}
|
|
6451
|
-
${this.spinnerAlign==="end"?this._renderSpinner():
|
|
6444
|
+
${this.spinnerAlign==="end"?this._renderSpinner():m}
|
|
6452
6445
|
</rtg-button>
|
|
6453
6446
|
`}};exports.SbFormSubmit._ROOT="form-submit";exports.SbFormSubmit._SPINNER="spinner";exports.SbFormSubmit.TAG=`sb-${exports.SbFormSubmit._ROOT}`;ee([a({type:String})],exports.SbFormSubmit.prototype,"seed",2);ee([a({attribute:"child-id",type:String})],exports.SbFormSubmit.prototype,"childId",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"variant",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"size",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"label",2);ee([a({attribute:"spinner-align",type:String})],exports.SbFormSubmit.prototype,"spinnerAlign",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"disabled",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"loading",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"event",2);ee([x()],exports.SbFormSubmit.prototype,"_loading",2);exports.SbFormSubmit=ee([p("sb-form-submit")],exports.SbFormSubmit);const cc=[exports.SbEmailField,exports.SbPhoneField,exports.SbUsernameField,exports.SbIdentifierField,exports.SbPasswordField,exports.SbConfirmField],Pg=cc.map(e=>e.TAG).join(", "),ud=cc.map(e=>e.validateEventName);var Fg=Object.defineProperty,Tg=Object.getOwnPropertyDescriptor,ki=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Fg(t,r,s),s};exports.SbForm=class extends v{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields,i={},s=g=>{const y=g.detail;(y==null?void 0:y.name)!==void 0&&y.value!==void 0&&(i[y.name]=y.value)};ud.forEach(g=>this.addEventListener(g,s));const o=r.map(g=>g.validate());if(ud.forEach(g=>this.removeEventListener(g,s)),!o.every(Boolean))return;const h=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,h);return}if(!h)return;const u=r.map(g=>!!g.disabled);this._setLoading(!0,r,u);try{await ht.processLoginflowEvent({event:h,...Object.keys(i).length?{data:i}:{}}),this._dispatch(exports.SbForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:h})}catch(g){const y=g instanceof Error?g.message:String(g);this._dispatch(exports.SbForm.ERROR_EVENT,{id:this.rootId,data:i,event:h,message:y})}finally{this._setLoading(!1,r,u),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.SbForm.RESET_EVENT,{id:this.rootId})}}static get parts(){return{root:this._ROOT}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbForm.parts.root}-${this.seed}`}get _form(){return this.querySelector(`form[part="${exports.SbForm.parts.root}"]`)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(Pg)):[]}get _submit(){const t=this._form;return t?t.querySelector(exports.SbFormSubmit.TAG):null}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(i=>i!==t).forEach(i=>t.appendChild(i))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,i){r.forEach((o,n)=>{o.disabled=t?!0:i[n]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return d`
|
|
6454
6447
|
<form
|
|
@@ -6463,9 +6456,9 @@ body {
|
|
|
6463
6456
|
part="${exports.SbFormSeparator.parts.root}"
|
|
6464
6457
|
data-content="${this.content?"true":"false"}"
|
|
6465
6458
|
>
|
|
6466
|
-
${this.content??
|
|
6459
|
+
${this.content??m}
|
|
6467
6460
|
</rtg-field-separator>
|
|
6468
|
-
`}};exports.SbFormSeparator._ROOT="form-separator";Os([a({type:String})],exports.SbFormSeparator.prototype,"seed",2);Os([a({attribute:"child-id",type:String})],exports.SbFormSeparator.prototype,"childId",2);Os([a({type:String})],exports.SbFormSeparator.prototype,"content",2);exports.SbFormSeparator=Os([p("sb-form-separator")],exports.SbFormSeparator);var zg=Object.defineProperty,jg=Object.getOwnPropertyDescriptor,Ht=(e,t,r,i)=>{for(var s=i>1?void 0:i?jg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zg(t,r,s),s};exports.SbFormSwitch=class extends v{constructor(){super(...arguments),this.seed=_t(),this.type="default",this.variant="secondary",this.size="default",this.label="Switch",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbFormSwitch.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._WRAPPER}`,i=`${t}-${this._PROMPT}`,s=`${t}-${this._SPINNER}`;return{root:t,wrapper:r,prompt:i,spinner:s}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSwitch.parts.root}-${this.seed}`}get wrapperId(){return`${this.rootId}-${exports.SbFormSwitch._WRAPPER}`}get promptId(){return`${this.rootId}-${exports.SbFormSwitch._PROMPT}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSwitch._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderPrompt(){return this.type==="button"||!this.prompt?
|
|
6461
|
+
`}};exports.SbFormSeparator._ROOT="form-separator";Os([a({type:String})],exports.SbFormSeparator.prototype,"seed",2);Os([a({attribute:"child-id",type:String})],exports.SbFormSeparator.prototype,"childId",2);Os([a({type:String})],exports.SbFormSeparator.prototype,"content",2);exports.SbFormSeparator=Os([p("sb-form-separator")],exports.SbFormSeparator);var zg=Object.defineProperty,jg=Object.getOwnPropertyDescriptor,Ht=(e,t,r,i)=>{for(var s=i>1?void 0:i?jg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zg(t,r,s),s};exports.SbFormSwitch=class extends v{constructor(){super(...arguments),this.seed=_t(),this.type="default",this.variant="secondary",this.size="default",this.label="Switch",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbFormSwitch.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._WRAPPER}`,i=`${t}-${this._PROMPT}`,s=`${t}-${this._SPINNER}`;return{root:t,wrapper:r,prompt:i,spinner:s}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSwitch.parts.root}-${this.seed}`}get wrapperId(){return`${this.rootId}-${exports.SbFormSwitch._WRAPPER}`}get promptId(){return`${this.rootId}-${exports.SbFormSwitch._PROMPT}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSwitch._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderPrompt(){return this.type==="button"||!this.prompt?m:d`
|
|
6469
6462
|
<p id="${this.promptId}" part="${exports.SbFormSwitch.parts.prompt}">
|
|
6470
6463
|
${this.prompt}
|
|
6471
6464
|
</p>
|
|
@@ -6475,15 +6468,15 @@ body {
|
|
|
6475
6468
|
part="${exports.SbFormSwitch.parts.spinner}"
|
|
6476
6469
|
class="rtg-icon-inline-end"
|
|
6477
6470
|
></rtg-spinner>
|
|
6478
|
-
`:
|
|
6471
|
+
`:m}render(){const t=this.type==="button"?this.variant:"link",r=this.type==="button"?this.size:"default";return d`
|
|
6479
6472
|
<div id="${this.wrapperId}" part="${exports.SbFormSwitch.parts.wrapper}">
|
|
6480
6473
|
${this._renderPrompt()}
|
|
6481
6474
|
<rtg-button
|
|
6482
6475
|
id="${this.rootId}"
|
|
6483
6476
|
part="${exports.SbFormSwitch.parts.root}"
|
|
6484
6477
|
data-type="${this.type}"
|
|
6485
|
-
data-event="${this.event??
|
|
6486
|
-
data-loading="${this.isLoading?"true":
|
|
6478
|
+
data-event="${this.event??m}"
|
|
6479
|
+
data-loading="${this.isLoading?"true":m}"
|
|
6487
6480
|
variant="${t}"
|
|
6488
6481
|
size="${r}"
|
|
6489
6482
|
?disabled="${this.disabled||this.isLoading}"
|
|
@@ -6491,28 +6484,27 @@ body {
|
|
|
6491
6484
|
${this.label} ${this._renderSpinner()}
|
|
6492
6485
|
</rtg-button>
|
|
6493
6486
|
</div>
|
|
6494
|
-
`}};exports.SbFormSwitch._ROOT="form-switch";exports.SbFormSwitch._WRAPPER="wrapper";exports.SbFormSwitch._PROMPT="prompt";exports.SbFormSwitch._SPINNER="spinner";exports.SbFormSwitch.TAG=`sb-${exports.SbFormSwitch._ROOT}`;exports.SbFormSwitch.CLICK_EVENT=`${exports.SbFormSwitch.TAG}:click`;Ht([a({type:String})],exports.SbFormSwitch.prototype,"seed",2);Ht([a({attribute:"child-id",type:String})],exports.SbFormSwitch.prototype,"childId",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"type",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"variant",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"size",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"label",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"prompt",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"disabled",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"loading",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"event",2);Ht([x()],exports.SbFormSwitch.prototype,"_loading",2);exports.SbFormSwitch=Ht([p("sb-form-switch")],exports.SbFormSwitch);var Ug=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,re=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Ug(t,r,s),s};exports.SbPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="secondary",this.size="default",this.label="Use Passkey",this.spinnerAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading
|
|
6487
|
+
`}};exports.SbFormSwitch._ROOT="form-switch";exports.SbFormSwitch._WRAPPER="wrapper";exports.SbFormSwitch._PROMPT="prompt";exports.SbFormSwitch._SPINNER="spinner";exports.SbFormSwitch.TAG=`sb-${exports.SbFormSwitch._ROOT}`;exports.SbFormSwitch.CLICK_EVENT=`${exports.SbFormSwitch.TAG}:click`;Ht([a({type:String})],exports.SbFormSwitch.prototype,"seed",2);Ht([a({attribute:"child-id",type:String})],exports.SbFormSwitch.prototype,"childId",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"type",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"variant",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"size",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"label",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"prompt",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"disabled",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"loading",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"event",2);Ht([x()],exports.SbFormSwitch.prototype,"_loading",2);exports.SbFormSwitch=Ht([p("sb-form-switch")],exports.SbFormSwitch);var Ug=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,re=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Ug(t,r,s),s};exports.SbPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="secondary",this.size="default",this.label="Use Passkey",this.spinnerAlign="start",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasskeyButton.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbPasskeyButton._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
|
|
6495
6488
|
<rtg-spinner
|
|
6496
6489
|
id="${this.spinnerId}"
|
|
6497
6490
|
part="${exports.SbPasskeyButton.parts.spinner}"
|
|
6498
6491
|
class="rtg-icon-inline-${this.spinnerAlign}"
|
|
6499
6492
|
></rtg-spinner>
|
|
6500
|
-
`:
|
|
6493
|
+
`:m}render(){return d`
|
|
6501
6494
|
<rtg-button
|
|
6502
6495
|
id="${this.rootId}"
|
|
6503
6496
|
part="${exports.SbPasskeyButton.parts.root}"
|
|
6504
|
-
data-event="${this.event}"
|
|
6505
|
-
|
|
6506
|
-
?data-loading=${this.isLoading}
|
|
6497
|
+
data-event="${this.event??m}"
|
|
6498
|
+
data-loading="${this.isLoading?"true":m}"
|
|
6507
6499
|
variant="${this.variant}"
|
|
6508
6500
|
size="${this.size}"
|
|
6509
6501
|
?disabled=${this.disabled||this.isLoading}
|
|
6510
6502
|
>
|
|
6511
|
-
${this.spinnerAlign==="start"?this._renderSpinner():
|
|
6503
|
+
${this.spinnerAlign==="start"?this._renderSpinner():m}
|
|
6512
6504
|
${this.label}
|
|
6513
|
-
${this.spinnerAlign==="end"?this._renderSpinner():
|
|
6505
|
+
${this.spinnerAlign==="end"?this._renderSpinner():m}
|
|
6514
6506
|
</rtg-button>
|
|
6515
|
-
`}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";re([a({type:String})],exports.SbPasskeyButton.prototype,"seed",2);re([a({attribute:"child-id",type:String})],exports.SbPasskeyButton.prototype,"childId",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"variant",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"size",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"label",2);re([a({attribute:"spinner-align",type:String})],exports.SbPasskeyButton.prototype,"spinnerAlign",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"disabled",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"loading",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"event",2);re([x()],exports.SbPasskeyButton.prototype,"_loading",2);exports.SbPasskeyButton=re([p("sb-passkey-button")],exports.SbPasskeyButton);const Bg={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},Mg={apple:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",discord:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",facebook:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",google:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z",linkedin:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",meta:"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z",microsoft:"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z",x:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z"};var qg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,At=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qg(t,r,s),s};exports.SbProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.content="icon-label",this.variant="outline",this.size="default",this.prompt="Use",this.iconAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._ICON}`;return{root:t,icon:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbProviderButton.parts.root}-${this.provider}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.SbProviderButton._ICON}`}get iconCn(){return this.content==="icon"?"":`rtg-icon-align-${this.iconAlign}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_dispatchClick(){const t=new CustomEvent(exports.SbProviderButton.clickEventName,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0});this.dispatchEvent(t)}async _emitClickEvent(){if(this.event){this._loading||(this._loading=!0);try{await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}_renderLogo(){return d`
|
|
6507
|
+
`}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";exports.SbPasskeyButton.TAG=`sb-${exports.SbPasskeyButton._ROOT}`;exports.SbPasskeyButton.CLICK_EVENT=`${exports.SbPasskeyButton.TAG}:click`;re([a({type:String})],exports.SbPasskeyButton.prototype,"seed",2);re([a({attribute:"child-id",type:String})],exports.SbPasskeyButton.prototype,"childId",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"variant",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"size",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"label",2);re([a({attribute:"spinner-align",type:String})],exports.SbPasskeyButton.prototype,"spinnerAlign",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"disabled",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"loading",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"event",2);re([x()],exports.SbPasskeyButton.prototype,"_loading",2);exports.SbPasskeyButton=re([p("sb-passkey-button")],exports.SbPasskeyButton);const Bg={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},Mg={apple:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",discord:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",facebook:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",google:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z",linkedin:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",meta:"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z",microsoft:"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z",x:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z"};var qg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,At=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qg(t,r,s),s};exports.SbProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.content="icon-label",this.variant="outline",this.size="default",this.prompt="Use",this.iconAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._ICON}`;return{root:t,icon:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbProviderButton.parts.root}-${this.provider}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.SbProviderButton._ICON}`}get iconCn(){return this.content==="icon"?"":`rtg-icon-align-${this.iconAlign}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_dispatchClick(){const t=new CustomEvent(exports.SbProviderButton.clickEventName,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0});this.dispatchEvent(t)}async _emitClickEvent(){if(this.event){this._loading||(this._loading=!0);try{await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}_renderLogo(){return d`
|
|
6516
6508
|
<svg
|
|
6517
6509
|
id="${this.iconId}"
|
|
6518
6510
|
part="${exports.SbProviderButton.parts.icon}"
|
|
@@ -6532,7 +6524,7 @@ body {
|
|
|
6532
6524
|
data-icon="spinner"
|
|
6533
6525
|
class="${this.iconCn}"
|
|
6534
6526
|
></rtg-spinner>
|
|
6535
|
-
`}_renderIcon(){return this.isLoading?this._renderSpinner():this.content.includes("icon")?this._renderLogo():
|
|
6527
|
+
`}_renderIcon(){return this.isLoading?this._renderSpinner():this.content.includes("icon")?this._renderLogo():m}render(){const t=Bg[this.provider],r=this.label??`${this.prompt} ${t}`;return d`
|
|
6536
6528
|
<rtg-button
|
|
6537
6529
|
id="${this.rootId}"
|
|
6538
6530
|
part="${exports.SbProviderButton.parts.root}"
|
|
@@ -6545,26 +6537,26 @@ body {
|
|
|
6545
6537
|
size="${this.size}"
|
|
6546
6538
|
?disabled=${this.disabled||this.isLoading}
|
|
6547
6539
|
>
|
|
6548
|
-
${this.iconAlign==="start"?this._renderIcon():
|
|
6549
|
-
${this.content.includes("label")?r:
|
|
6550
|
-
${this.iconAlign==="end"?this._renderIcon():
|
|
6540
|
+
${this.iconAlign==="start"?this._renderIcon():m}
|
|
6541
|
+
${this.content.includes("label")?r:m}
|
|
6542
|
+
${this.iconAlign==="end"?this._renderIcon():m}
|
|
6551
6543
|
</rtg-button>
|
|
6552
6544
|
`}};exports.SbProviderButton._ROOT="provider-button";exports.SbProviderButton._ICON="icon";At([a({type:String})],exports.SbProviderButton.prototype,"seed",2);At([a({attribute:"child-id",type:String})],exports.SbProviderButton.prototype,"childId",2);At([a({type:String})],exports.SbProviderButton.prototype,"provider",2);At([a({type:String})],exports.SbProviderButton.prototype,"content",2);At([a({type:String})],exports.SbProviderButton.prototype,"variant",2);At([a({type:String})],exports.SbProviderButton.prototype,"size",2);At([a({type:String})],exports.SbProviderButton.prototype,"prompt",2);At([a({attribute:"icon-align",type:String})],exports.SbProviderButton.prototype,"iconAlign",2);At([a({type:String})],exports.SbProviderButton.prototype,"label",2);At([a({type:Boolean})],exports.SbProviderButton.prototype,"disabled",2);At([a({type:Boolean})],exports.SbProviderButton.prototype,"loading",2);At([a({type:String})],exports.SbProviderButton.prototype,"event",2);At([x()],exports.SbProviderButton.prototype,"_loading",2);exports.SbProviderButton=At([p("sb-provider-button")],exports.SbProviderButton);var Hg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,Pt=(e,t,r,i)=>{for(var s=i>1?void 0:i?Gg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Hg(t,r,s),s};exports.SbProviderField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.providers=[],this.overrides=[]}static get parts(){const t=this._ROOT,r=`${t}-${this._BUTTON}`;return{root:t,button:r}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbProviderField.parts.root}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.SbProviderField._BUTTON}`}get columns(){const t=this._providers.length;return t<3?"one":t%3===0?"three":t===5?"two-three":t===7?"three-four":"four"}get _providers(){return[...new Set(this.providers)]}get _overrides(){return this.overrides.filter((t,r,i)=>r===i.findIndex(s=>s.provider===t.provider))}_renderButton(t){return d`
|
|
6553
6545
|
<sb-provider-button
|
|
6554
6546
|
id="${this.buttonId}"
|
|
6555
6547
|
part="${exports.SbProviderField.parts.button}"
|
|
6556
6548
|
seed="${t.seed??this.seed}"
|
|
6557
|
-
child-id="${t.childId??
|
|
6549
|
+
child-id="${t.childId??m}"
|
|
6558
6550
|
provider="${t.provider}"
|
|
6559
|
-
content="${t.content??this.content??(this._providers.length>2?"icon":
|
|
6560
|
-
variant="${t.variant??this.variant??
|
|
6561
|
-
size="${t.size??this.size??
|
|
6562
|
-
prompt="${t.prompt??this.prompt??
|
|
6563
|
-
icon-align="${t.iconAlign??this.iconAlign??
|
|
6564
|
-
label="${t.label??this.label??
|
|
6551
|
+
content="${t.content??this.content??(this._providers.length>2?"icon":m)}"
|
|
6552
|
+
variant="${t.variant??this.variant??m}"
|
|
6553
|
+
size="${t.size??this.size??m}"
|
|
6554
|
+
prompt="${t.prompt??this.prompt??m}"
|
|
6555
|
+
icon-align="${t.iconAlign??this.iconAlign??m}"
|
|
6556
|
+
label="${t.label??this.label??m}"
|
|
6565
6557
|
?disabled="${t.disabled||this.disabled}"
|
|
6566
6558
|
?loading="${t.loading||this.loading}"
|
|
6567
|
-
event="${t.event??this.event??
|
|
6559
|
+
event="${t.event??this.event??m}"
|
|
6568
6560
|
></sb-provider-button>
|
|
6569
6561
|
`}render(){const t=this._overrides;return d`
|
|
6570
6562
|
<rtg-field
|
|
@@ -6587,10 +6579,10 @@ body {
|
|
|
6587
6579
|
`}};Ps([a({type:String})],exports.SbLogo.prototype,"id",2);Ps([a({type:String,attribute:"image-url"})],exports.SbLogo.prototype,"imageUrl",2);Ps([x()],exports.SbLogo.prototype,"theme",2);exports.SbLogo=Ps([p("sb-logo")],exports.SbLogo);var Qg=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,ce=(e,t,r,i)=>{for(var s=i>1?void 0:i?tm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Qg(t,r,s),s};exports.SbOtp=class extends de{constructor(){super(...arguments),this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="",this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this.handleComplete=t=>{this.emit("sb-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event||null})},this.handleFocus=()=>{this.emit("sb-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("sb-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=()=>{this.resendEvent&&this.emit("sb-otp:resend",{id:this.id,event:this.resendEvent})}}get _containerElement(){return this.querySelector(`rtg-input-otp[part=${this.id?this.id:"otp"}]`)}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,i=(n,h)=>Array.from({length:h-n},(u,g)=>`<rtg-input-otp-slot index="${n+g}"></rtg-input-otp-slot>`).join(""),s=n=>`<rtg-input-otp-group>${n}</rtg-input-otp-group>`,o="<rtg-input-otp-separator></rtg-input-otp-separator>";if(t==="simple"){const n=Math.ceil(r/2);return s(i(0,n))+o+s(i(n,r))}if(t==="with_separator"){const n=Math.ceil(r/3);return s(i(0,n))+o+s(i(n,n*2))+o+s(i(n*2,r))}return t==="with_spacing"?Array.from({length:r},(n,h)=>s(`<rtg-input-otp-slot index="${h}"></rtg-input-otp-slot>`)).join(""):s(i(0,r))}render(){const t=this.variant||"digits_only";return ys`
|
|
6588
6580
|
<rtg-input-otp
|
|
6589
6581
|
part=${this.id?this.id:"otp"}
|
|
6590
|
-
id=${this.dataKey??this.id??
|
|
6591
|
-
name=${this.dataKey??this.id??
|
|
6582
|
+
id=${this.dataKey??this.id??m}
|
|
6583
|
+
name=${this.dataKey??this.id??m}
|
|
6592
6584
|
maxlength=${this.length}
|
|
6593
|
-
pattern=${t==="digits_only"?"\\d+":
|
|
6585
|
+
pattern=${t==="digits_only"?"\\d+":m}
|
|
6594
6586
|
data-key=${this.dataKey||""}
|
|
6595
6587
|
.onComplete=${this.handleComplete}
|
|
6596
6588
|
.onFocus=${this.handleFocus}
|
|
@@ -6607,7 +6599,7 @@ body {
|
|
|
6607
6599
|
${this.resendButtonText}
|
|
6608
6600
|
</rtg-button>
|
|
6609
6601
|
</div>
|
|
6610
|
-
`:
|
|
6602
|
+
`:m}
|
|
6611
6603
|
`}};ce([a()],exports.SbOtp.prototype,"variant",2);ce([a({type:Number})],exports.SbOtp.prototype,"length",2);ce([a({type:Number})],exports.SbOtp.prototype,"timeout",2);ce([a({attribute:"data-key"})],exports.SbOtp.prototype,"dataKey",2);ce([a()],exports.SbOtp.prototype,"event",2);ce([a({attribute:"resend-text"})],exports.SbOtp.prototype,"resendText",2);ce([a({attribute:"resend-button-text"})],exports.SbOtp.prototype,"resendButtonText",2);ce([a({attribute:"resend-event"})],exports.SbOtp.prototype,"resendEvent",2);ce([a()],exports.SbOtp.prototype,"id",2);exports.SbOtp=ce([p("sb-otp")],exports.SbOtp);var em=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,Pn=(e,t,r,i)=>{for(var s=i>1?void 0:i?rm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&em(t,r,s),s};exports.SbSubtitle=class extends de{get _containerElement(){return this.querySelector(`rtg-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return d`
|
|
6612
6604
|
<rtg-typography-p part=${this.id?this.id:"subtitle"} id=${this.id}>
|
|
6613
6605
|
${this.content}
|
|
@@ -6657,8 +6649,8 @@ body {
|
|
|
6657
6649
|
data-badge="${this.badge}"
|
|
6658
6650
|
variant="${this.badge}"
|
|
6659
6651
|
>
|
|
6660
|
-
${this.logoAlign==="start"?this._renderLogo():
|
|
6661
|
-
${this.label} ${this.logoAlign==="end"?this._renderLogo():
|
|
6652
|
+
${this.logoAlign==="start"?this._renderLogo():m}
|
|
6653
|
+
${this.label} ${this.logoAlign==="end"?this._renderLogo():m}
|
|
6662
6654
|
</rtg-badge>
|
|
6663
6655
|
`}};exports.SbWatermark._ROOT="watermark";exports.SbWatermark._LOGO="logo";Sr([a({type:String})],exports.SbWatermark.prototype,"seed",2);Sr([a({attribute:"child-id",type:String})],exports.SbWatermark.prototype,"childId",2);Sr([a({type:String})],exports.SbWatermark.prototype,"label",2);Sr([a({type:String})],exports.SbWatermark.prototype,"variant",2);Sr([a({type:String})],exports.SbWatermark.prototype,"badge",2);Sr([a({attribute:"logo-align",type:String})],exports.SbWatermark.prototype,"logoAlign",2);exports.SbWatermark=Sr([p("sb-watermark")],exports.SbWatermark);var dm=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Jr=(e,t,r,i)=>{for(var s=i>1?void 0:i?cm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&dm(t,r,s),s};exports.SbCountdown=class extends de{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}firstUpdated(t){}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return d`
|
|
6664
6656
|
<div part=${this.id?this.id:"countdown"}>
|
|
@@ -7296,7 +7288,7 @@ body {
|
|
|
7296
7288
|
>
|
|
7297
7289
|
${mm()}
|
|
7298
7290
|
</button>
|
|
7299
|
-
`:
|
|
7291
|
+
`:m}renderWatermark(){return this.orientation!==Xt.VERTICAL?m:d`
|
|
7300
7292
|
<div
|
|
7301
7293
|
class="sb-fixed sb-bottom-0 sb-w-[-webkit-fill-available] sb-py-4 sb-bg-background"
|
|
7302
7294
|
>
|
|
@@ -7351,7 +7343,7 @@ body {
|
|
|
7351
7343
|
<div class=${$u}>
|
|
7352
7344
|
<div class=${Cu}>${this.renderProfileContent()}</div>
|
|
7353
7345
|
</div>
|
|
7354
|
-
`:this.renderProfileContent():
|
|
7346
|
+
`:this.renderProfileContent():m}createRenderRoot(){return this}}he([a({type:Boolean})],Gt.prototype,"showAvatarMenu");he([a({type:String})],Gt.prototype,"orientation");he([a({type:String})],Gt.prototype,"mobileDisplay");he([a({type:String})],Gt.prototype,"mode");he([a({type:String})],Gt.prototype,"widgetsLayout");he([a({type:Object})],Gt.prototype,"content");he([a({type:Object})],Gt.prototype,"customizations");he([Lt({context:Ts,subscribe:!0})],Gt.prototype,"providedCustomizations");he([x()],Gt.prototype,"isOpen");he([x()],Gt.prototype,"currentBreakpoint");customElements.define("sb-user-profile",Gt);var Nm=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,Vs=(e,t,r,i)=>{for(var s=i>1?void 0:i?zm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Nm(t,r,s),s};exports.PreviewComponent=class extends v{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.customizations={byType:{},config:{font:"font-geist"}}}createRenderRoot(){return this}render(){return d`
|
|
7355
7347
|
${this.loading?d`<div class="sb-p-8 sb-text-center">Loading...</div>`:d`
|
|
7356
7348
|
<sb-provider>
|
|
7357
7349
|
<signed-out>
|
|
@@ -7403,13 +7395,13 @@ body {
|
|
|
7403
7395
|
customClass=${t}
|
|
7404
7396
|
.customStyle=${r}
|
|
7405
7397
|
></linear-loader>
|
|
7406
|
-
`:
|
|
7398
|
+
`:m}
|
|
7407
7399
|
${this._wrapSubmitButtons(En(this,this.renderSpec.root_container,this.theme))}
|
|
7408
7400
|
</div>
|
|
7409
7401
|
</form>
|
|
7410
7402
|
`}async _onSubmit(t,r){t.preventDefault();const i=t.submitter;if(!i||!r||this.loadingButtons[r]||i.id!==r)return;const s=this._findButtonById(r);s&&await this.handleEvent(s.properties.event,s)}_findButtonById(t){const r=i=>{if(i.element_type==="button"&&i.id===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}animateHeight(){var u,g;const r=(((g=(u=this.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt).sm,i=r?parseInt(r.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=i)return;const o=this.renderRoot.querySelector("#root-container");if(!o)return;const n=o.scrollHeight;if(this.prevHeight===0){this.prevHeight=n,o.style.height="auto";return}if(n===this.prevHeight||this.isAnimating)return;const h=Math.abs(n-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const y=Math.min(600,Math.max(200,h*1));o.style.transition="none",o.style.height=this.prevHeight+"px",o.offsetHeight,o.style.transition=`height ${y}ms ease`,o.style.height=n+"px";const w=()=>{o.style.transition="",o.style.height="auto",this.prevHeight=o.scrollHeight,this.isAnimating=!1};let E=!1;const C=()=>{E||(E=!0,w())};o.addEventListener("transitionend",C,{once:!0}),setTimeout(C,y)})}collectDataKeys(t){const r={},i=s=>{if(s&&((s.element_type==="input"||s.element_type==="checkbox"||s.element_type==="otp")&&s.data_key&&!s.hidden&&(r[s.data_key]=""),s.element_type==="container"))for(const o of s.properties.children)i(o)};return i(t),r}handleInputChange(t,r){r!==void 0&&(this.formData={...this.formData,[t]:r},qo(this,t,"change"),this.requestUpdate())}handleBlur(t){qo(this,t,"blur"),this.requestUpdate()}handleFocus(t,r){var o;(o=this.errors[t])!=null&&o.length&&(this.errors={...this.errors,[t]:[]});const i=`${r}-error`,s=document.getElementById(i);s&&s.parentNode&&s.parentNode.removeChild(s)}async handleEvent(t,r){var i,s;if(r.element_type==="html")try{await ht.processLoginflowEvent({event:t,data:{}})}finally{this.eventEmitting=!1}else if(r.element_type==="otp")try{await ht.processLoginflowEvent({event:t,data:this.formData})}finally{this.eventEmitting=!1}else{if(this.loadingButtons[r.id])return;if((i=r.properties.requires_valid)==null||i.forEach(n=>{qo(this,n,"submit"),this.requestUpdate()}),!(((s=r.properties.requires_valid)==null?void 0:s.some(n=>{var h,u;return((u=(h=this.errors)==null?void 0:h[n])==null?void 0:u.length)>0}))??!1)){this.loadingButtons={...this.loadingButtons,[r.id]:!0},this.eventEmitting=!0;try{await ht.processLoginflowEvent({event:t,data:this.formData})}finally{this.loadingButtons={...this.loadingButtons,[r.id]:!1},this.eventEmitting=!1}}}}findElementByKey(t){const r=i=>{if((i.element_type==="input"||i.element_type==="checkbox"||i.element_type==="otp")&&i.data_key===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}isFieldValid(t){const r=this.findElementByKey(t);if(!r||!("validation"in r.properties))return!0;const{validation:i}=r.properties,{data_key:s}=r;if(!i||!s)return!0;const o=this.formData[s];return i.rules.every(h=>this.validateRule(h,o))}validateRule(t,r){switch(t.type){case"required":return Hd(r);case"min_length":return Gd(r,t.length);case"max_length":return Wd(r,t.length);case"min_value":return Kd(r,t.value);case"max_value":return Yd(r,t.value);case"regex":return Xd(r,t.regex);case"field_match":return Zd(r,t.field_match?this.formData[t.field_match]:void 0);case"email":return Jd(r);case"phone":return Qd(r);case"date":return tc(r);default:return!0}}};De([a({type:Object})],exports.SaasBaseLayout.prototype,"renderSpec",2);De([a({type:Object})],exports.SaasBaseLayout.prototype,"customizations",2);De([x()],exports.SaasBaseLayout.prototype,"formData",2);De([x()],exports.SaasBaseLayout.prototype,"errors",2);De([x()],exports.SaasBaseLayout.prototype,"loadingButtons",2);De([x()],exports.SaasBaseLayout.prototype,"eventEmitting",2);De([x()],exports.SaasBaseLayout.prototype,"theme",2);exports.SaasBaseLayout=De([p("sb-layout")],exports.SaasBaseLayout);var Vm=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,Rr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Hm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Vm(t,r,s),s};exports.SbProvider=class extends v{constructor(){super(...arguments),this.customizations=null,this.providedCustomizations=this.customizations,this.env=null,this.auth={isAuthenticated:!1},this.renderSpec=null,this.autoRedirect=!0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),mp(),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));ht.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)}}),this.refreshAuthState()})().catch(r=>console.error("Error initializing SbProvider:",r))}updated(t){var r;super.updated(t),t.has("customizations")&&(this.providedCustomizations=this.customizations),t.has("env")&&(r=this.env)!=null&&r.domain&&ht.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:i=>{i.render_spec&&(this.renderSpec=i.render_spec)}}),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if([this.env.signinUrl,this.env.signupUrl].some(s=>t.includes(s))){const n=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";window.location.href=n}}refreshAuthState(){this.auth={isAuthenticated:ht.isAuthenticated()}}};Rr([a({type:Object})],exports.SbProvider.prototype,"customizations",2);Rr([Ue({context:Ts})],exports.SbProvider.prototype,"providedCustomizations",2);Rr([a({type:Object}),Ue({context:hc})],exports.SbProvider.prototype,"env",2);Rr([x(),Ue({context:Fs})],exports.SbProvider.prototype,"auth",2);Rr([x(),Ue({context:Tn})],exports.SbProvider.prototype,"renderSpec",2);Rr([a({type:Boolean})],exports.SbProvider.prototype,"autoRedirect",2);exports.SbProvider=Rr([p("sb-provider")],exports.SbProvider);var Gm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,pc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Wm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Gm(t,r,s),s};exports.SignedOut=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?d`
|
|
7411
7403
|
<div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
7412
|
-
`:
|
|
7404
|
+
`:m}};pc([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=pc([p("sb-signed-out")],exports.SignedOut);var Km=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,gc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ym(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Km(t,r,s),s};exports.SignedIn=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?d`
|
|
7413
7405
|
<div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
7414
|
-
`:
|
|
7406
|
+
`:m}};gc([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=gc([p("sb-signed-in")],exports.SignedIn);var Xm=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,Ws=(e,t,r,i)=>{for(var s=i>1?void 0:i?Zm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Xm(t,r,s),s};exports.SbAuthenticated=class extends v{constructor(){super(...arguments),this._cachedChildren=[],this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){var t;return this.auth?this.auth.isAuthenticated?d`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),m):m}};Ws([a({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);Ws([Lt({context:hc}),a({attribute:!1})],exports.SbAuthenticated.prototype,"env",2);Ws([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SbAuthenticated.prototype,"auth",2);exports.SbAuthenticated=Ws([p("sb-authenticated")],exports.SbAuthenticated);function Jm(){return ht}exports.BaseElement=de;exports.SbUserProfile=Gt;exports.renderElement=En;exports.useAuthProvider=Jm;
|
|
7415
7407
|
//# sourceMappingURL=index.js.map
|