@warp-ds/elements 2.2.0-next.12 → 2.2.0-next.14
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/custom-elements.json +2082 -920
- package/dist/packages/attention/index.js +11 -11
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/breadcrumbs/index.js.map +1 -1
- package/dist/packages/combobox/combobox.stories.d.ts +14 -0
- package/dist/packages/combobox/combobox.stories.js +95 -0
- package/dist/packages/combobox/index.d.ts +100 -0
- package/dist/packages/combobox/index.js +2492 -0
- package/dist/packages/combobox/index.js.map +7 -0
- package/dist/packages/combobox/locales/da/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/da/messages.mjs +1 -0
- package/dist/packages/combobox/locales/en/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/en/messages.mjs +1 -0
- package/dist/packages/combobox/locales/fi/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/fi/messages.mjs +1 -0
- package/dist/packages/combobox/locales/nb/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/nb/messages.mjs +1 -0
- package/dist/packages/combobox/locales/sv/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/sv/messages.mjs +1 -0
- package/dist/packages/combobox/styles.d.ts +1 -0
- package/dist/packages/combobox/styles.js +2 -0
- package/dist/packages/expandable/index.d.ts +2 -0
- package/dist/packages/expandable/index.js +20 -11
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/slider/Slider.d.ts +2 -0
- package/dist/packages/slider/Slider.js +8 -0
- package/dist/packages/slider/SliderThumb.d.ts +2 -0
- package/dist/packages/slider/SliderThumb.js +8 -0
- package/dist/packages/slider/index.d.ts +2 -0
- package/dist/packages/slider/index.js +2791 -0
- package/dist/packages/slider/index.js.map +7 -0
- package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +2 -0
- package/dist/packages/slider/oddbird-css-anchor-positioning.js +3 -0
- package/dist/packages/slider/slider-thumb.d.ts +60 -0
- package/dist/packages/slider/slider-thumb.js +2663 -0
- package/dist/packages/slider/slider-thumb.js.map +7 -0
- package/dist/packages/slider/slider.d.ts +51 -0
- package/dist/packages/slider/slider.js +2569 -0
- package/dist/packages/slider/slider.js.map +7 -0
- package/dist/packages/slider/slider.stories.d.ts +17 -0
- package/dist/packages/slider/slider.stories.js +203 -0
- package/dist/packages/slider/slider.test.d.ts +4 -0
- package/dist/packages/slider/slider.test.js +62 -0
- package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +1 -0
- package/dist/packages/slider/styles/w-slider-thumb.styles.js +132 -0
- package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
- package/dist/packages/slider/styles/w-slider.styles.js +118 -0
- package/dist/packages/slider/styles.d.ts +1 -0
- package/dist/packages/slider/styles.js +2 -0
- package/dist/packages/textfield/index.d.ts +12 -1
- package/dist/packages/textfield/index.js +77 -28
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/styles/w-textfield.styles.d.ts +1 -0
- package/dist/packages/textfield/styles/w-textfield.styles.js +46 -0
- package/dist/packages/textfield/styles.js +1 -1
- package/dist/packages/textfield/textfield.stories.d.ts +1 -0
- package/dist/packages/textfield/textfield.stories.js +19 -0
- package/dist/packages/textfield/textfield.test.d.ts +1 -0
- package/dist/packages/textfield/textfield.test.js +62 -3
- package/dist/vscode.html-custom-data.json +148 -24
- package/dist/web-types.json +382 -51
- package/package.json +5 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function
|
|
1
|
+
var Ne=Object.create;var X=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var K=r=>{throw TypeError(r)};var Te=(r,e,o)=>e in r?X(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var G=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ze=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Xe(e))!Se.call(r,a)&&a!==o&&X(r,a,{get:()=>e[a],enumerable:!(t=V(e,a))||t.enumerable});return r};var $e=(r,e,o)=>(o=r!=null?Ne(Oe(r)):{},Ze(e||!r||!r.__esModule?X(o,"default",{value:r,enumerable:!0}):o,r));var b=(r,e,o,t)=>{for(var a=t>1?void 0:t?V(e,o):e,n=r.length-1,i;n>=0;n--)(i=r[n])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&X(e,o,a),a};var Y=(r,e,o)=>Te(r,typeof e!="symbol"?e+"":e,o),je=(r,e,o)=>e.has(r)||K("Cannot "+o);var _=(r,e,o)=>(je(r,e,"read from private field"),o?o.call(r):e.get(r)),Q=(r,e,o)=>e.has(r)?K("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,o);var W=G(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.errorMessages=z.ErrorType=void 0;var E;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(E=z.ErrorType||(z.ErrorType={}));z.errorMessages=new Map([[E.MalformedUnicode,"malformed Unicode character escape sequence"],[E.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[E.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[E.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[E.EndOfString,"malformed escape sequence at end of string"]])});var oe=G(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.unraw=f.errorMessages=f.ErrorType=void 0;var d=W();Object.defineProperty(f,"ErrorType",{enumerable:!0,get:function(){return d.ErrorType}});Object.defineProperty(f,"errorMessages",{enumerable:!0,get:function(){return d.errorMessages}});function De(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function O(r,e,o){let t=De(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(d.errorMessages.get(e));return t}function Pe(r){let e=O(r,d.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function ee(r,e){let o=O(r,d.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=O(e,d.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function Be(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function Ae(r){if(!Be(r))throw new SyntaxError(d.errorMessages.get(d.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=O(e,d.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(d.errorMessages.get(d.ErrorType.CodePointLimit)):t}}function Fe(r,e=!1){if(e)throw new SyntaxError(d.errorMessages.get(d.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var Ie=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ue(r){return Ie.get(r)||r}var He=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function re(r,e=!1){return r.replace(He,function(o,t,a,n,i,s,l,v,k){if(t!==void 0)return"\\";if(a!==void 0)return Pe(a);if(n!==void 0)return Ae(n);if(i!==void 0)return ee(i,s);if(l!==void 0)return ee(l);if(v==="0")return"\0";if(v!==void 0)return Fe(v,!e);if(k!==void 0)return Ue(k);throw new SyntaxError(d.errorMessages.get(d.ErrorType.EndOfString))})}f.unraw=re;f.default=re});import{css as Dr,html as w,LitElement as Pr}from"lit";var m=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r.reduce(function(o,t){return o.concat(typeof t=="string"?t:Array.isArray(t)?m.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};import{property as h}from"lit/decorators.js";import{ifDefined as Br}from"lit/directives/if-defined.js";import{LitElement as tr}from"lit";import{unsafeStatic as ar,html as nr}from"lit/static-html.js";var ne=$e(oe(),1);var x=r=>typeof r=="string",Re=r=>typeof r=="function",te=new Map,ie="en";function A(r){return[...Array.isArray(r)?r:[r],ie]}function F(r,e,o){let t=A(r);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return S(()=>T("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(x(e)?new Date(e):e)}function qe(r,e,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return F(r,e,t)}function D(r,e,o){let t=A(r);return S(()=>T("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function ae(r,e,o,{offset:t=0,...a}){var s,l;let n=A(r),i=e?S(()=>T("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):S(()=>T("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(l=(s=a[o])!=null?s:a[i.select(o-t)])!=null?l:a.other}function S(r,e){let o=r(),t=te.get(o);return t||(t=e(),te.set(o,t)),t}function T(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var se=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,le="%__lingui_octothorpe__%",Je=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],n=(i,s)=>{let l=Object.keys(o).length?a("number"):void 0,v=D(t,i,l);return s.replace(new RegExp(le,"g"),v)};return{plural:(i,s)=>{let{offset:l=0}=s,v=ae(t,!1,i,s);return n(i-l,v)},selectordinal:(i,s)=>{let{offset:l=0}=s,v=ae(t,!0,i,s);return n(i-l,v)},select:Ve,number:(i,s)=>D(t,i,a(s)||{style:s}),date:(i,s)=>F(t,i,a(s)||s),time:(i,s)=>qe(t,i,a(s)||s)}},Ve=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function Ke(r,e,o){return(t={},a)=>{let n=Je(e,o,a),i=(l,v=!1)=>Array.isArray(l)?l.reduce((k,M)=>{if(M==="#"&&v)return k+le;if(x(M))return k+M;let[q,y,J]=M,$={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(J).forEach(([j,Me])=>{$[j]=i(Me,y==="plural"||y==="selectordinal")}):$=J;let N;if(y){let j=n[y];N=j(t[q],$)}else N=t[q];return N==null?k:k+N},""):l,s=i(r);return x(s)&&se.test(s)?(0,ne.unraw)(s):x(s)?s:s?String(s):""}}var Ge=Object.defineProperty,Qe=(r,e,o)=>e in r?Ge(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,We=(r,e,o)=>(Qe(r,typeof e!="symbol"?e+"":e,o),o),P=class{constructor(){We(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},er=Object.defineProperty,rr=(r,e,o)=>e in r?er(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,C=(r,e,o)=>(rr(r,typeof e!="symbol"?e+"":e,o),o),B=class extends P{constructor(e){var o;super(),C(this,"_locale",""),C(this,"_locales"),C(this,"_localeData",{}),C(this,"_messages",{}),C(this,"_missing"),C(this,"_messageCompiler"),C(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((o=e.locale)!=null?o:ie,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,o,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),x(e)||(o=e.values||o,a=e.message,e=e.id);let n=this.messages[e],i=n===void 0,s=this._missing;if(s&&i)return Re(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=n||a||e;return x(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
|
|
3
3
|
|
|
4
4
|
> ${l}
|
|
5
5
|
|
|
@@ -7,7 +7,16 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
7
7
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
8
8
|
|
|
9
9
|
Please compile your catalog first.
|
|
10
|
-
`)),x(l)&&
|
|
10
|
+
`)),x(l)&&se.test(l)?JSON.parse(`"${l}"`):x(l)?l:Ke(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return F(this._locales||this._locale,e,o)}number(e,o){return D(this._locales||this._locale,e,o)}};function or(r={}){return new B(r)}var g=or();var ir=JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}'),sr=JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}'),lr=JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}'),cr=JSON.parse('{"icon.title.chevron-down":["Pil nedad"]}'),dr=JSON.parse('{"icon.title.chevron-down":["Pil ned"]}'),ce=["en","nb","fi","da","sv"],de="en",pr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},pe=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":de},I=r=>ce.find(e=>r===e||r.toLowerCase().includes(e))||pe();function ur(){var r;if(typeof window=="undefined"){let e=pr();return I(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=pe();return ce.includes(e)?I(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),I(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),de}}var br=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,vr=(r,e,o,t,a)=>{let n=ur(),i=br(n,r,e,o,t,a);g.load(n,i),g.activate(n)};vr(sr,ir,lr,cr,dr);var hr=class extends tr{render(){let r=g.t({message:"Downward arrow",id:"icon.title.chevron-down",comment:"Title for chevron-down icon"});return nr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${ar(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-down-16")||customElements.define("w-icon-chevron-down-16",hr);import{LitElement as gr}from"lit";import{unsafeStatic as wr,html as mr}from"lit/static-html.js";var fr=JSON.parse('{"icon.title.chevron-up":["Oppoverpil"]}'),xr=JSON.parse('{"icon.title.chevron-up":["Upward arrow"]}'),kr=JSON.parse('{"icon.title.chevron-up":["Nuoli yl\xF6sp\xE4in"]}'),yr=JSON.parse('{"icon.title.chevron-up":["Pil opad"]}'),_r=JSON.parse('{"icon.title.chevron-up":["Pil upp"]}'),ue=["en","nb","fi","da","sv"],be="en",zr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},ve=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":be},U=r=>ue.find(e=>r===e||r.toLowerCase().includes(e))||ve();function Cr(){var r;if(typeof window=="undefined"){let e=zr();return U(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=ve();return ue.includes(e)?U(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),U(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),be}}var Er=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Yr=(r,e,o,t,a)=>{let n=Cr(),i=Er(n,r,e,o,t,a);g.load(n,i),g.activate(n)};Yr(xr,fr,kr,yr,_r);var Lr=class extends gr{render(){let r=g.t({message:"Upward arrow",id:"icon.title.chevron-up",comment:"Title for chevron-up icon"});return mr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-up-16-part">${wr(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.5 11 8 5.5l5.5 5.5"></path></svg>`}};customElements.get("w-icon-chevron-up-16")||customElements.define("w-icon-chevron-up-16",Lr);import{css as Xr,html as R,LitElement as Or}from"lit";var H=typeof window!="undefined",he=!0;if(H){let r=window.matchMedia("(prefers-reduced-motion: reduce)"),e=({matches:o})=>he=!o;r.addEventListener&&r.addEventListener("change",e),e(r)}var ge=r=>{r.style.transition=null,r.style.backfaceVisibility=null,r.style.overflow=null},we=r=>{let e=he?"var(--f-expansion-duration, 0.3s)":"0.01s";r.style.transition=`height ${e}`,r.style.backfaceVisibility="hidden",r.style.overflow="hidden"},Mr=(r,e)=>()=>{r.style.height="auto",r.style.overflow=null,e&&e()},Nr=r=>()=>{r&&r()},me=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=Mr(r,e);ge(r),r.style.height="auto";let a=r.scrollHeight;if(H&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height="0px",r.style.transitionTimingFunction="ease-out",we(r),requestAnimationFrame(()=>r.style.height=a+"px")}),o)return o},fe=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=Nr(e);ge(r);let a=r.scrollHeight;if(H&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height=a+"px",r.style.transitionTimingFunction="ease-in",we(r),requestAnimationFrame(()=>r.style.height="0px")}),o)return o};import{ifDefined as Sr}from"lit/directives/if-defined.js";var L=class extends Or{constructor(){super(),this.show=!1,this._mounted=!1,this._removeElement=!1}willUpdate(){this._mounted||(this._removeElement=!this.show),this.show&&this._removeElement&&(this._removeElement=!1)}updated(){if(this._wrapper){if(!this._mounted){this._mounted=!0;return}this.show&&me(this._wrapper),!this.show&&!this._removeElement&&fe(this._wrapper,()=>this._removeElement=!0)}}get _wrapper(){return this!=null?this:null}render(){return R`<div aria-hidden=${Sr(this.show?void 0:"true")}>${this._removeElement?R``:R`<slot></slot>`}</div>`}};Y(L,"properties",{show:{type:Boolean,reflect:!0},_removeElement:{type:Boolean,state:!0}}),Y(L,"styles",[Xr`
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
`]);customElements.get("w-expand-transition")||customElements.define("w-expand-transition",L);import{html as Tr,LitElement as Zr}from"lit";import{unsafeHTML as $r}from"lit/directives/unsafe-html.js";var Z=class extends Zr{get _markup(){return`<h${this.level}
|
|
15
|
+
style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
|
|
16
|
+
>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</h${this.level}>
|
|
19
|
+
`}render(){return this.level?$r(this._markup):Tr`<slot></slot>`}};Y(Z,"properties",{level:{type:Number}});customElements.get("w-unstyled-heading")||customElements.define("w-unstyled-heading",Z);import{css as xe}from"lit";var ke=xe`
|
|
11
20
|
*,
|
|
12
21
|
:before,
|
|
13
22
|
:after {
|
|
@@ -280,7 +289,7 @@ Please compile your catalog first.
|
|
|
280
289
|
svg {
|
|
281
290
|
pointer-events: none;
|
|
282
291
|
}
|
|
283
|
-
`,
|
|
292
|
+
`,wo=xe`*, :before, :after {
|
|
284
293
|
--w-rotate: 0;
|
|
285
294
|
--w-rotate-x: 0;
|
|
286
295
|
--w-rotate-y: 0;
|
|
@@ -2446,30 +2455,30 @@ Please compile your catalog first.
|
|
|
2446
2455
|
display: none
|
|
2447
2456
|
}
|
|
2448
2457
|
}
|
|
2449
|
-
`;import{css as
|
|
2458
|
+
`;import{css as jr}from"lit";var ye=jr`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.t4{font-weight:700;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-left{text-align:left}.align-middle{vertical-align:middle}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.will-change-height{will-change:height}.border-0{border-width:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:underline:hover{text-decoration-line:underline}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.overflow-hidden{overflow:hidden}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.h-0{height:0}.w-full{width:100%}.m-0{margin:0}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-top:0;padding-bottom:0}.pt-0{padding-top:0}.invisible{visibility:hidden}.break-words{overflow-wrap:break-word}.cursor-pointer{cursor:pointer}.-rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:-rotate-180::part(w-icon-chevron-down-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:rotate-180::part(w-icon-chevron-up-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform::part(w-icon-chevron-down-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform::part(w-icon-chevron-up-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform-gpu::part(w-icon-chevron-down-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform-gpu::part(w-icon-chevron-up-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:transition-transform::part(w-icon-chevron-down-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:transition-transform::part(w-icon-chevron-up-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:ease-in-out::part(w-icon-chevron-down-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:ease-in-out::part(w-icon-chevron-up-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var Ar={base:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"s-bg-info-subtle",neutral:"s-surface-sunken",bordered:"border-2 s-border s-bg"},c={wrapper:"will-change-height s-text",box:"s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 group block relative break-words last-child:mb-0 rounded-8",bleed:"-mx-16 rounded-l-0 rounded-r-0 sm:mx-0 sm:rounded-8",chevron:"inline-block align-middle s-icon",chevronNonBox:"ml-8",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",elementsChevronDownTransform:"part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out",elementsChevronUpTransform:"part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out",elementsChevronExpand:"part-[w-icon-chevron-down-16-part]:-rotate-180",elementsChevronCollapse:"part-[w-icon-chevron-up-16-part]:rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:"focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 hover:underline focus-visible:underline",buttonBox:"w-full text-left relative inline-flex items-center justify-between group relative break-words last-child:mb-0 p-16 rounded-8",contentWithTitle:"pt-0",title:"flex w-full justify-between items-center",titleType:"t4"},u,_e,ze,Ce,Ee,Ye,Le,p=class extends Pr{constructor(){super(...arguments);Q(this,u);this.expanded=!1;this.box=!1;this.bleed=!1;this.noChevron=!1;this.animated=!1;this._hasTitle=!0;this._showChevronUp=!1}updated(o){o.has("expanded")&&setTimeout(()=>{this._showChevronUp=this.expanded},200)}firstUpdated(){var a;let o=!!this.title,t=((a=this.renderRoot.querySelector("slot[name='title']"))==null?void 0:a.assignedNodes().length)>0;this._hasTitle=o||t}get _expandableSlot(){return w`<div class="${_(this,u,Ye)}">
|
|
2450
2459
|
<slot></slot>
|
|
2451
|
-
</div>`}render(){return w` <div class="${
|
|
2460
|
+
</div>`}render(){return w` <div class="${_(this,u,_e)}">
|
|
2452
2461
|
${this._hasTitle?w`<w-unstyled-heading level=${this.headingLevel}>
|
|
2453
2462
|
<button
|
|
2454
2463
|
type="button"
|
|
2455
2464
|
aria-expanded="${this.expanded}"
|
|
2456
|
-
class="${
|
|
2465
|
+
class="${_(this,u,ze)}"
|
|
2457
2466
|
@click=${()=>this.expanded=!this.expanded}>
|
|
2458
2467
|
<div class="${c.title}">
|
|
2459
2468
|
${this.title?w`<span class="${c.titleType}">${this.title}</span>`:w`<slot name="title"></slot>`}
|
|
2460
|
-
${this.noChevron?"":w`<div class="${
|
|
2469
|
+
${this.noChevron?"":w`<div class="${_(this,u,Ce)}">${_(this,u,Ee)}</div>`}
|
|
2461
2470
|
</div>
|
|
2462
2471
|
</button>
|
|
2463
2472
|
</w-unstyled-heading>`:""}
|
|
2464
|
-
${this.animated?w`<w-expand-transition ?show=${this.expanded}> ${this._expandableSlot} </w-expand-transition>`:w`<div class="${
|
|
2473
|
+
${this.animated?w`<w-expand-transition ?show=${this.expanded}> ${this._expandableSlot} </w-expand-transition>`:w`<div class="${_(this,u,Le)}" aria-hidden=${Br(this.expanded?void 0:!0)}>
|
|
2465
2474
|
${this._expandableSlot}
|
|
2466
2475
|
</div>`}
|
|
2467
|
-
</div>`}};
|
|
2476
|
+
</div>`}};u=new WeakSet,_e=function(){return m([c.wrapper,this.box&&c.box,this.bleed&&c.bleed])},ze=function(){return m(this.buttonClass,[c.button,this.box&&c.buttonBox])},Ce=function(){return m([c.chevron,!this.box&&c.chevronNonBox])},Ee=function(){let o=m([c.elementsChevronUpTransform,!this.expanded&&this._showChevronUp&&c.elementsChevronCollapse]),t=m([c.elementsChevronDownTransform,this.expanded&&!this._showChevronUp&&c.elementsChevronExpand]);return this._showChevronUp?w`<w-icon-chevron-up-16 class="${o}"></w-icon-chevron-up-16>`:w`<w-icon-chevron-down-16 class="${t}"></w-icon-chevron-down-16>`},Ye=function(){return m(this.contentClass,[this.box&&Ar.base,this._hasTitle&&this.box&&c.contentWithTitle])},Le=function(){return m([c.expansion,!this.expanded&&c.expansionNotExpanded])},p.styles=[ke,ye,Dr`
|
|
2468
2477
|
:host {
|
|
2469
2478
|
display: block;
|
|
2470
2479
|
}
|
|
2471
2480
|
::slotted(:last-child) {
|
|
2472
2481
|
margin-bottom: 0px !important;
|
|
2473
2482
|
}
|
|
2474
|
-
`],
|
|
2483
|
+
`],b([h({type:Boolean,reflect:!0})],p.prototype,"expanded",2),b([h({type:String})],p.prototype,"title",2),b([h({type:Boolean})],p.prototype,"box",2),b([h({type:Boolean})],p.prototype,"bleed",2),b([h({attribute:"button-class",type:String})],p.prototype,"buttonClass",2),b([h({attribute:"content-class",type:String})],p.prototype,"contentClass",2),b([h({attribute:"no-chevron",type:Boolean})],p.prototype,"noChevron",2),b([h({type:Boolean})],p.prototype,"animated",2),b([h({attribute:"heading-level",type:Number})],p.prototype,"headingLevel",2),b([h({type:Boolean,state:!0})],p.prototype,"_hasTitle",2),b([h({type:Boolean,state:!0})],p.prototype,"_showChevronUp",2);customElements.get("w-expandable")||customElements.define("w-expandable",p);export{p as WarpExpandable,Ar as ccBox,c as ccExpandable};
|
|
2475
2484
|
//# sourceMappingURL=index.js.map
|