@hotosm/ui 0.3.1-b1 → 0.3.1-b3

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.
Files changed (55) hide show
  1. package/dist/chunks/button.LEHBRWP3.js +1 -0
  2. package/dist/chunks/callout.USQGOL5A.js +69 -0
  3. package/dist/chunks/{chunk.DQ7UCE7O.js → chunk.4YLAIDAG.js} +1 -1
  4. package/dist/chunks/chunk.6ZDEZIWM.js +73 -0
  5. package/dist/chunks/chunk.7VBX4GII.js +1 -0
  6. package/dist/chunks/chunk.BPVA67NM.js +94 -0
  7. package/dist/chunks/chunk.FIQQYKEP.js +14 -0
  8. package/dist/chunks/{chunk.N5L63ITD.js → chunk.IG27I42A.js} +1 -1
  9. package/dist/chunks/{chunk.XYLRVYKD.js → chunk.IWVLJ74K.js} +2 -2
  10. package/dist/chunks/chunk.KPZVTN5G.js +460 -0
  11. package/dist/chunks/chunk.NI7UJOOZ.js +1 -0
  12. package/dist/chunks/chunk.OHRBDQCO.js +45 -0
  13. package/dist/chunks/{chunk.277I73JI.js → chunk.T4GALJJA.js} +1 -1
  14. package/dist/chunks/chunk.TFICHQZE.js +186 -0
  15. package/dist/chunks/chunk.U4P7XQR4.js +40 -0
  16. package/dist/chunks/{chunk.TVZQJVLS.js → chunk.UTSKEKTV.js} +1 -1
  17. package/dist/chunks/{chunk.TJK2P3MY.js → chunk.XCJG4HAO.js} +3 -3
  18. package/dist/chunks/dialog.7CZCE2KM.js +217 -0
  19. package/dist/chunks/icon.ZB6BUFKB.js +1 -0
  20. package/dist/chunks/tab-group.JN54CODM.js +360 -0
  21. package/dist/components/consent/consent.component.d.ts +0 -3
  22. package/dist/components/consent/consent.component.js +1 -1
  23. package/dist/components/consent/consent.js +1 -1
  24. package/dist/components/consent/consent.styles.js +1 -1
  25. package/dist/components/header/header.component.d.ts +0 -3
  26. package/dist/components/header/header.component.js +1 -1
  27. package/dist/components/header/header.js +1 -1
  28. package/dist/components/header/header.styles.js +1 -1
  29. package/dist/components/icons.js +1 -1
  30. package/dist/components/logo/logo.component.js +1 -1
  31. package/dist/components/logo/logo.js +1 -1
  32. package/dist/components/logo/logo.styles.js +1 -1
  33. package/dist/components/tracking/tracking.component.d.ts +0 -3
  34. package/dist/components/tracking/tracking.component.js +1 -1
  35. package/dist/components/tracking/tracking.js +1 -1
  36. package/dist/hotosm-ui.js +1 -1
  37. package/package.json +4 -3
  38. package/dist/chunks/chunk.2C7KHCNI.js +0 -40
  39. package/dist/chunks/chunk.3BMRK6RX.js +0 -94
  40. package/dist/chunks/chunk.6QXNTVCU.js +0 -1
  41. package/dist/chunks/chunk.7P5E5KMI.js +0 -73
  42. package/dist/chunks/chunk.BLTVEIFI.js +0 -1
  43. package/dist/chunks/chunk.GRD7DOAE.js +0 -14
  44. package/dist/chunks/chunk.GTA7FK6E.js +0 -1
  45. package/dist/chunks/chunk.H27BHZTL.js +0 -1
  46. package/dist/chunks/chunk.NK4IZUTO.js +0 -1
  47. package/dist/chunks/chunk.PICS5Z5K.js +0 -1
  48. package/dist/chunks/chunk.RGDK5VTE.js +0 -1
  49. package/dist/chunks/chunk.V76UU3GK.js +0 -1
  50. package/dist/chunks/chunk.W5TPMQK4.js +0 -1
  51. package/dist/react/consent/index.js +0 -1
  52. package/dist/react/header/index.js +0 -1
  53. package/dist/react/index.js +0 -1
  54. package/dist/react/logo/index.js +0 -1
  55. package/dist/react/tracking/index.js +0 -1
@@ -0,0 +1,360 @@
1
+ import{c as y}from"./chunk.7VBX4GII.js";import{a as T,b as m}from"./chunk.KPZVTN5G.js";import"./chunk.TFICHQZE.js";import{a as h}from"./chunk.OHRBDQCO.js";import{a as n,b as v}from"./chunk.FIQQYKEP.js";import{a as p,b as s,c as x,d as u}from"./chunk.6ZDEZIWM.js";import{e as b}from"./chunk.U4P7XQR4.js";import{a as k}from"./chunk.NI7UJOOZ.js";var A=class extends Event{constructor(t){super("wa-tab-hide",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},C=class extends Event{constructor(t){super("wa-tab-show",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},S=`:host {
2
+ --indicator-color: var(--wa-color-brand-fill-loud);
3
+ --track-color: var(--wa-color-neutral-fill-normal);
4
+ --track-width: 0.125rem;
5
+
6
+ display: block;
7
+ }
8
+
9
+ .tab-group {
10
+ display: flex;
11
+ border-radius: 0;
12
+ }
13
+
14
+ .tabs {
15
+ display: flex;
16
+ position: relative;
17
+ }
18
+
19
+ .indicator {
20
+ position: absolute;
21
+ }
22
+
23
+ .tab-group-has-scroll-controls .nav-container {
24
+ position: relative;
25
+ padding: 0 1.5em;
26
+ }
27
+
28
+ .body {
29
+ display: block;
30
+ overflow: auto;
31
+ }
32
+
33
+ .scroll-button {
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ position: absolute;
38
+ top: 0;
39
+ bottom: 0;
40
+ width: 1.5em;
41
+ }
42
+
43
+ .scroll-button-start {
44
+ inset-inline-start: 0;
45
+ }
46
+
47
+ .scroll-button-end {
48
+ inset-inline-end: 0;
49
+ }
50
+
51
+ /*
52
+ * Top
53
+ */
54
+
55
+ .tab-group-top {
56
+ flex-direction: column;
57
+ }
58
+
59
+ .tab-group-top .nav-container {
60
+ order: 1;
61
+ }
62
+
63
+ .tab-group-top .nav {
64
+ display: flex;
65
+ overflow-x: auto;
66
+
67
+ /* Hide scrollbar in Firefox */
68
+ scrollbar-width: none;
69
+ }
70
+
71
+ /* Hide scrollbar in Chrome/Safari */
72
+ .tab-group-top .nav::-webkit-scrollbar {
73
+ width: 0;
74
+ height: 0;
75
+ }
76
+
77
+ .tab-group-top .tabs {
78
+ flex: 1 1 auto;
79
+ position: relative;
80
+ flex-direction: row;
81
+ border-bottom: solid var(--track-width) var(--track-color);
82
+ }
83
+
84
+ .tab-group-top .indicator {
85
+ bottom: calc(-1 * var(--track-width));
86
+ border-bottom: solid var(--track-width) var(--indicator-color);
87
+ }
88
+
89
+ .tab-group-top .body {
90
+ order: 2;
91
+ }
92
+
93
+ .tab-group-top ::slotted(wa-tab[active]) {
94
+ border-block-end: solid var(--track-width) var(--indicator-color);
95
+ margin-block-end: calc(-1 * var(--track-width));
96
+ }
97
+
98
+ .tab-group-top ::slotted(wa-tab-panel) {
99
+ --padding: var(--wa-space-xl) 0;
100
+ }
101
+
102
+ /*
103
+ * Bottom
104
+ */
105
+
106
+ .tab-group-bottom {
107
+ flex-direction: column;
108
+ }
109
+
110
+ .tab-group-bottom .nav-container {
111
+ order: 2;
112
+ }
113
+
114
+ .tab-group-bottom .nav {
115
+ display: flex;
116
+ overflow-x: auto;
117
+
118
+ /* Hide scrollbar in Firefox */
119
+ scrollbar-width: none;
120
+ }
121
+
122
+ /* Hide scrollbar in Chrome/Safari */
123
+ .tab-group-bottom .nav::-webkit-scrollbar {
124
+ width: 0;
125
+ height: 0;
126
+ }
127
+
128
+ .tab-group-bottom .tabs {
129
+ flex: 1 1 auto;
130
+ position: relative;
131
+ flex-direction: row;
132
+ border-top: solid var(--track-width) var(--track-color);
133
+ }
134
+
135
+ .tab-group-bottom .indicator {
136
+ top: calc(-1 * var(--track-width));
137
+ border-top: solid var(--track-width) var(--indicator-color);
138
+ }
139
+
140
+ .tab-group-bottom .body {
141
+ order: 1;
142
+ }
143
+
144
+ .tab-group-bottom ::slotted(wa-tab[active]) {
145
+ border-block-start: solid var(--track-width) var(--indicator-color);
146
+ margin-block-start: calc(-1 * var(--track-width));
147
+ }
148
+
149
+ .tab-group-bottom ::slotted(wa-tab-panel) {
150
+ --padding: var(--wa-space-xl) 0;
151
+ }
152
+
153
+ /*
154
+ * Start
155
+ */
156
+
157
+ .tab-group-start {
158
+ flex-direction: row;
159
+ }
160
+
161
+ .tab-group-start .nav-container {
162
+ order: 1;
163
+ }
164
+
165
+ .tab-group-start .tabs {
166
+ flex: 0 0 auto;
167
+ flex-direction: column;
168
+ border-inline-end: solid var(--track-width) var(--track-color);
169
+ }
170
+
171
+ .tab-group-start .indicator {
172
+ inset-inline-end: calc(-1 * var(--track-width));
173
+ border-right: solid var(--track-width) var(--indicator-color);
174
+ }
175
+
176
+ .tab-group-start .body {
177
+ flex: 1 1 auto;
178
+ order: 2;
179
+ }
180
+
181
+ .tab-group-start ::slotted(wa-tab[active]) {
182
+ border-inline-end: solid var(--track-width) var(--indicator-color);
183
+ margin-inline-end: calc(-1 * var(--track-width));
184
+ }
185
+
186
+ .tab-group-start ::slotted(wa-tab-panel) {
187
+ --padding: 0 var(--wa-space-xl);
188
+ }
189
+
190
+ /*
191
+ * End
192
+ */
193
+
194
+ .tab-group-end {
195
+ flex-direction: row;
196
+ }
197
+
198
+ .tab-group-end .nav-container {
199
+ order: 2;
200
+ }
201
+
202
+ .tab-group-end .tabs {
203
+ flex: 0 0 auto;
204
+ flex-direction: column;
205
+ border-left: solid var(--track-width) var(--track-color);
206
+ }
207
+
208
+ .tab-group-end .indicator {
209
+ inset-inline-start: calc(-1 * var(--track-width));
210
+ border-inline-start: solid var(--track-width) var(--indicator-color);
211
+ }
212
+
213
+ .tab-group-end .body {
214
+ flex: 1 1 auto;
215
+ order: 1;
216
+ }
217
+
218
+ .tab-group-end ::slotted(wa-tab[active]) {
219
+ border-inline-start: solid var(--track-width) var(--indicator-color);
220
+ margin-inline-start: calc(-1 * var(--track-width));
221
+ }
222
+
223
+ .tab-group-end ::slotted(wa-tab-panel) {
224
+ --padding: 0 var(--wa-space-xl);
225
+ }
226
+ `,i=class extends v{constructor(){super(...arguments),this.tabs=[],this.focusableTabs=[],this.panels=[],this.localize=new T(this),this.hasScrollControls=!1,this.active="",this.placement="top",this.activation="auto",this.withoutScrollControls=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls()}),this.mutationObserver=new MutationObserver(t=>{t.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this.setAriaLabels());let a=t.filter(e=>e.target.closest("wa-tab-group")===this);if(a.some(e=>e.attributeName==="disabled"))this.syncTabsAndPanels();else if(a.some(e=>e.attributeName==="active")){let r=a.filter(o=>o.attributeName==="active"&&o.target.tagName.toLowerCase()==="wa-tab").map(o=>o.target).find(o=>o.active);r&&r.closest("wa-tab-group")===this&&this.setActiveTab(r)}}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),new IntersectionObserver((a,e)=>{var r;if(a[0].intersectionRatio>0){if(this.setAriaLabels(),this.active){let o=this.tabs.find(w=>w.panel===this.active);o&&this.setActiveTab(o)}else this.setActiveTab((r=this.getActiveTab())!=null?r:this.tabs[0],{emitEvents:!1});e.unobserve(a[0].target)}}).observe(this.tabGroup)})}disconnectedCallback(){var t,a;super.disconnectedCallback(),(t=this.mutationObserver)==null||t.disconnect(),this.nav&&((a=this.resizeObserver)==null||a.unobserve(this.nav))}getAllTabs(){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(a=>a.tagName.toLowerCase()==="wa-tab")}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="wa-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.active)}handleClick(t){let e=t.target.closest("wa-tab");(e==null?void 0:e.closest("wa-tab-group"))===this&&e!==null&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){let e=t.target.closest("wa-tab");if((e==null?void 0:e.closest("wa-tab-group"))===this){if(["Enter"," "].includes(t.key)){e!==null&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault());return}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let o=this.tabs.find(d=>d.matches(":focus")),w=this.localize.dir()==="rtl",l=null;if((o==null?void 0:o.tagName.toLowerCase())==="wa-tab"){if(t.key==="Home")l=this.focusableTabs[0];else if(t.key==="End")l=this.focusableTabs[this.focusableTabs.length-1];else if(["top","bottom"].includes(this.placement)&&t.key===(w?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&t.key==="ArrowUp"){let d=this.tabs.findIndex(g=>g===o);l=this.findNextFocusableTab(d,"backward")}else if(["top","bottom"].includes(this.placement)&&t.key===(w?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&t.key==="ArrowDown"){let d=this.tabs.findIndex(g=>g===o);l=this.findNextFocusableTab(d,"forward")}if(!l)return;l.tabIndex=0,l.focus({preventScroll:!0}),this.activation==="auto"?this.setActiveTab(l,{scrollBehavior:"smooth"}):this.tabs.forEach(d=>{d.tabIndex=d===l?0:-1}),["top","bottom"].includes(this.placement)&&y(l,this.nav,"horizontal"),t.preventDefault()}}}}findNextFocusableTab(t,a){let e=null,r=a==="forward"?1:-1,o=t+r;for(;t<this.tabs.length;){if(e=this.tabs[o]||null,e===null){a==="forward"?e=this.focusableTabs[0]:e=this.focusableTabs[this.focusableTabs.length-1];break}if(!e.disabled)break;o+=r}return e}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,a){if(a=k({emitEvents:!0,scrollBehavior:"auto"},a),t.closest("wa-tab-group")===this&&t!==this.activeTab&&!t.disabled){let e=this.activeTab;this.active=t.panel,this.activeTab=t,this.tabs.forEach(r=>{r.active=r===this.activeTab,r.tabIndex=r===this.activeTab?0:-1}),this.panels.forEach(r=>{var o;return r.active=r.name===((o=this.activeTab)==null?void 0:o.panel)}),["top","bottom"].includes(this.placement)&&y(this.activeTab,this.nav,"horizontal",a.scrollBehavior),a.emitEvents&&(e&&this.dispatchEvent(new A({name:e.panel})),this.dispatchEvent(new C({name:this.activeTab.panel})))}}setAriaLabels(){this.tabs.forEach(t=>{let a=this.panels.find(e=>e.name===t.panel);a&&(t.setAttribute("aria-controls",a.getAttribute("id")),a.setAttribute("aria-labelledby",t.getAttribute("id")))})}syncTabsAndPanels(){this.tabs=this.getAllTabs(),this.focusableTabs=this.tabs.filter(t=>!t.disabled),this.panels=this.getAllPanels(),this.updateComplete.then(()=>this.updateScrollControls())}updateActiveTab(){let t=this.tabs.find(a=>a.panel===this.active);t&&this.setActiveTab(t,{scrollBehavior:"smooth"})}updateScrollControls(){this.withoutScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1}render(){let t=this.hasUpdated?this.localize.dir()==="rtl":this.dir==="rtl";return b`
227
+ <div
228
+ part="base"
229
+ class=${m({"tab-group":!0,"tab-group-top":this.placement==="top","tab-group-bottom":this.placement==="bottom","tab-group-start":this.placement==="start","tab-group-end":this.placement==="end","tab-group-has-scroll-controls":this.hasScrollControls})}
230
+ @click=${this.handleClick}
231
+ @keydown=${this.handleKeyDown}
232
+ >
233
+ <div class="nav-container" part="nav">
234
+ ${this.hasScrollControls?b`
235
+ <wa-button
236
+ part="scroll-button scroll-button-start"
237
+ exportparts="base:scroll-button__base"
238
+ class="scroll-button scroll-button-start"
239
+ appearance="plain"
240
+ @click=${this.handleScrollToStart}
241
+ >
242
+ <wa-icon
243
+ name=${t?"chevron-right":"chevron-left"}
244
+ library="system"
245
+ variant="solid"
246
+ label=${this.localize.term("scrollToStart")}
247
+ ></wa-icon>
248
+ </wa-button>
249
+ `:""}
250
+
251
+ <!-- We have a focus listener because in Firefox (and soon to be Chrome) overflow containers are focusable. -->
252
+ <div class="nav" @focus=${()=>{var a;return(a=this.activeTab)==null?void 0:a.focus({preventScroll:!0})}}>
253
+ <div part="tabs" class="tabs" role="tablist">
254
+ <slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
255
+ </div>
256
+ </div>
257
+
258
+ ${this.hasScrollControls?b`
259
+ <wa-button
260
+ part="scroll-button scroll-button-end"
261
+ class="scroll-button scroll-button-end"
262
+ exportparts="base:scroll-button__base"
263
+ appearance="plain"
264
+ @click=${this.handleScrollToEnd}
265
+ >
266
+ <wa-icon
267
+ name=${t?"chevron-left":"chevron-right"}
268
+ library="system"
269
+ variant="solid"
270
+ label=${this.localize.term("scrollToEnd")}
271
+ ></wa-icon>
272
+ </wa-button>
273
+ `:""}
274
+ </div>
275
+
276
+ <slot part="body" class="body" @slotchange=${this.syncTabsAndPanels}></slot>
277
+ </div>
278
+ `}};i.css=S;n([u(".tab-group")],i.prototype,"tabGroup",2);n([u(".body")],i.prototype,"body",2);n([u(".nav")],i.prototype,"nav",2);n([x()],i.prototype,"hasScrollControls",2);n([s({reflect:!0})],i.prototype,"active",2);n([s()],i.prototype,"placement",2);n([s()],i.prototype,"activation",2);n([s({attribute:"without-scroll-controls",type:Boolean})],i.prototype,"withoutScrollControls",2);n([h("active")],i.prototype,"updateActiveTab",1);n([h("withoutScrollControls",{waitUntilFirstUpdate:!0})],i.prototype,"updateScrollControls",1);i=n([p("wa-tab-group")],i);var E=`:host {
279
+ display: inline-block;
280
+ color: var(--wa-color-neutral-on-quiet);
281
+ font-weight: var(--wa-font-weight-action);
282
+ }
283
+
284
+ .tab {
285
+ display: inline-flex;
286
+ align-items: center;
287
+ font: inherit;
288
+ padding: 1em 1.5em;
289
+ white-space: nowrap;
290
+ user-select: none;
291
+ -webkit-user-select: none;
292
+ cursor: pointer;
293
+ transition: color var(--wa-transition-fast) var(--wa-transition-easing);
294
+
295
+ ::slotted(wa-icon:first-child) {
296
+ margin-inline-end: 0.5em;
297
+ }
298
+
299
+ ::slotted(wa-icon:last-child) {
300
+ margin-inline-start: 0.5em;
301
+ }
302
+ }
303
+
304
+ @media (hover: hover) {
305
+ :host(:hover:not([disabled])) .tab {
306
+ color: currentColor;
307
+ }
308
+ }
309
+
310
+ :host(:focus) {
311
+ outline: transparent;
312
+ }
313
+
314
+ :host(:focus-visible) .tab {
315
+ outline: var(--wa-focus-ring);
316
+ outline-offset: calc(-1 * var(--wa-border-width-l) - var(--wa-focus-ring-offset));
317
+ }
318
+
319
+ :host([active]:not([disabled])) {
320
+ color: var(--wa-color-brand-on-quiet);
321
+ }
322
+
323
+ :host([disabled]) .tab {
324
+ opacity: 0.5;
325
+ cursor: not-allowed;
326
+ }
327
+
328
+ @media (forced-colors: active) {
329
+ :host([active]:not([disabled])) {
330
+ outline: solid 1px transparent;
331
+ outline-offset: -3px;
332
+ }
333
+ }
334
+ `,I=0,c=class extends v{constructor(){super(...arguments),this.attrId=++I,this.componentId=`wa-tab-${this.attrId}`,this.panel="",this.active=!1,this.disabled=!1,this.tabIndex=0}connectedCallback(){this.slot||(this.slot="nav"),super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&!this.active?this.tabIndex=-1:this.tabIndex=0}render(){var t;return this.id=((t=this.id)==null?void 0:t.length)>0?this.id:this.componentId,b`
335
+ <div
336
+ part="base"
337
+ class=${m({tab:!0,"tab-active":this.active})}
338
+ >
339
+ <slot></slot>
340
+ </div>
341
+ `}};c.css=E;n([u(".tab")],c.prototype,"tab",2);n([s({reflect:!0})],c.prototype,"panel",2);n([s({type:Boolean,reflect:!0})],c.prototype,"active",2);n([s({type:Boolean,reflect:!0})],c.prototype,"disabled",2);n([s({type:Number,reflect:!0})],c.prototype,"tabIndex",2);n([h("active")],c.prototype,"handleActiveChange",1);n([h("disabled")],c.prototype,"handleDisabledChange",1);c=n([p("wa-tab")],c);var $=`:host {
342
+ --padding: 0;
343
+
344
+ display: none;
345
+ }
346
+
347
+ :host([active]) {
348
+ display: block;
349
+ }
350
+
351
+ .tab-panel {
352
+ display: block;
353
+ padding: var(--padding);
354
+ }
355
+ `,L=0,f=class extends v{constructor(){super(...arguments),this.attrId=++L,this.componentId=`wa-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return b`
356
+ <slot
357
+ part="base"
358
+ class=${m({"tab-panel":!0,"tab-panel-active":this.active})}
359
+ ></slot>
360
+ `}};f.css=$;n([s({reflect:!0})],f.prototype,"name",2);n([s({type:Boolean,reflect:!0})],f.prototype,"active",2);n([h("active")],f.prototype,"handleActiveChange",1);f=n([p("wa-tab-panel")],f);export{i as default};
@@ -1,6 +1,3 @@
1
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/callout/callout.js';
2
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/icon/icon.js';
3
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/button/button.js';
4
1
  import { LitElement } from "lit";
5
2
  import type { CSSResultGroup } from 'lit';
6
3
  export declare class Consent extends LitElement {
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.XYLRVYKD.js";import"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Consent,b as default};
1
+ import{a,b}from"../../chunks/chunk.IWVLJ74K.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Consent,b as default};
@@ -1 +1 @@
1
- import{a as b}from"../../chunks/chunk.BLTVEIFI.js";import{a}from"../../chunks/chunk.XYLRVYKD.js";import"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Consent,b as default};
1
+ import{a as o,b as e}from"../../chunks/chunk.IWVLJ74K.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var n=e;export{o as Consent,n as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
@@ -1,6 +1,3 @@
1
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/tab-group/tab-group.js';
2
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/dialog/dialog.js';
3
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/button/button.js';
4
1
  import { LitElement } from "lit";
5
2
  import { type sizes } from './header.styles.js';
6
3
  import type { CSSResultGroup } from 'lit';
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.3BMRK6RX.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Header,b as default};
1
+ import{a,b}from"../../chunks/chunk.BPVA67NM.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Header,b as default};
@@ -1 +1 @@
1
- import{a as b}from"../../chunks/chunk.W5TPMQK4.js";import{a}from"../../chunks/chunk.3BMRK6RX.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Header,b as default};
1
+ import{a,b as e}from"../../chunks/chunk.BPVA67NM.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var o=e;export{a as Header,o as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as headerVariants,b as styles};
1
+ import{a,b}from"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as headerVariants,b as styles};
@@ -1 +1 @@
1
- import{a}from"../chunks/chunk.KO4EOD3I.js";import"../chunks/chunk.RGDK5VTE.js";export{a as default};
1
+ import{a}from"../chunks/chunk.KO4EOD3I.js";import"../chunks/chunk.NI7UJOOZ.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.DQ7UCE7O.js";import"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Logo,b as default};
1
+ import{a,b}from"../../chunks/chunk.4YLAIDAG.js";import"../../chunks/chunk.UTSKEKTV.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Logo,b as default};
@@ -1 +1 @@
1
- import{a as b}from"../../chunks/chunk.6QXNTVCU.js";import{a}from"../../chunks/chunk.DQ7UCE7O.js";import"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Logo,b as default};
1
+ import{a as e,b as o}from"../../chunks/chunk.4YLAIDAG.js";import"../../chunks/chunk.UTSKEKTV.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var r=o;export{e as Logo,r as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.UTSKEKTV.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
@@ -1,6 +1,3 @@
1
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/callout/callout.js';
2
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/button/button.js';
3
- import 'https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/icon/icon.js';
4
1
  import { LitElement } from "lit";
5
2
  declare global {
6
3
  interface Window {
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.TJK2P3MY.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as MatomoTracking,b as default};
1
+ import{a,b}from"../../chunks/chunk.XCJG4HAO.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as MatomoTracking,b as default};
@@ -1 +1 @@
1
- import{a as b}from"../../chunks/chunk.GTA7FK6E.js";import{a}from"../../chunks/chunk.TJK2P3MY.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as MatomoTracking,b as default};
1
+ import{a as o,b as a}from"../../chunks/chunk.XCJG4HAO.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var r=a;export{o as MatomoTracking,r as default};
package/dist/hotosm-ui.js CHANGED
@@ -1 +1 @@
1
- import{b as t}from"./chunks/chunk.DQ7UCE7O.js";import"./chunks/chunk.TVZQJVLS.js";import{b as e}from"./chunks/chunk.TJK2P3MY.js";import{b as r}from"./chunks/chunk.XYLRVYKD.js";import"./chunks/chunk.277I73JI.js";import{b as o}from"./chunks/chunk.3BMRK6RX.js";import"./chunks/chunk.7P5E5KMI.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.N5L63ITD.js";import"./chunks/chunk.2C7KHCNI.js";import"./chunks/chunk.RGDK5VTE.js";export{r as Consent,o as Header,t as Logo,e as Tracking};
1
+ import{b as e}from"./chunks/chunk.XCJG4HAO.js";import{b as t}from"./chunks/chunk.4YLAIDAG.js";import"./chunks/chunk.UTSKEKTV.js";import{b as r}from"./chunks/chunk.IWVLJ74K.js";import"./chunks/chunk.T4GALJJA.js";import{b as o}from"./chunks/chunk.BPVA67NM.js";import"./chunks/chunk.6ZDEZIWM.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.IG27I42A.js";import"./chunks/chunk.U4P7XQR4.js";import"./chunks/chunk.NI7UJOOZ.js";export{r as Consent,o as Header,t as Logo,e as Tracking};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotosm/ui",
3
- "version": "0.3.1-b1",
3
+ "version": "0.3.1-b3",
4
4
  "description": "Shared UI components with HOT theming.",
5
5
  "homepage": "https://github.com/hotosm/ui#readme",
6
6
  "author": {
@@ -49,18 +49,19 @@
49
49
  "node": ">=14.17.0"
50
50
  },
51
51
  "dependencies": {
52
+ "@awesome.me/webawesome": "3.0.0-beta.1",
52
53
  "class-variance-authority": "^0.7.0",
53
54
  "lit": "^3.0.0"
54
55
  },
55
56
  "devDependencies": {
56
- "@storybook/blocks": "^8.3.5",
57
57
  "@storybook/addon-essentials": "^8.3.5",
58
58
  "@storybook/addon-links": "^8.3.5",
59
+ "@storybook/blocks": "^8.3.5",
59
60
  "@storybook/web-components": "^8.2.9",
60
61
  "@storybook/web-components-vite": "^8.2.9",
61
- "globby": "^14.0.2",
62
62
  "del": "^7.1.0",
63
63
  "esbuild": "^0.19.4",
64
+ "globby": "^14.0.2",
64
65
  "storybook": "^8.2.9",
65
66
  "typescript": "^5.2.2",
66
67
  "user-agent-data-types": "^0.3.1"
@@ -1,40 +0,0 @@
1
- var N=globalThis,L=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),X=new WeakMap,w=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(L&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}},Y=o=>new w(typeof o=="string"?o:o+"",void 0,D),vt=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new w(e,o,D)},tt=(o,t)=>{if(L)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=N.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},B=L?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Y(e)})(o):o;var{is:St,defineProperty:Et,getOwnPropertyDescriptor:bt,getOwnPropertyNames:Ct,getOwnPropertySymbols:wt,getPrototypeOf:xt}=Object,f=globalThis,et=f.trustedTypes,Pt=et?et.emptyScript:"",j=f.reactiveElementPolyfillSupport,x=(o,t)=>o,z={toAttribute(o,t){switch(t){case Boolean:o=o?Pt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},nt=(o,t)=>!St(o,t),st={attribute:!0,type:String,converter:z,reflect:!1,useDefault:!1,hasChanged:nt},it,ot;(it=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ot=f.litPropertyMetadata)!=null||(f.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Et(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var r;let{get:i,set:n}=(r=bt(this.prototype,t))!=null?r:{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let h=i==null?void 0:i.call(this);n==null||n.call(this,a),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:st}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;let t=xt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){let e=this.properties,s=[...Ct(e),...wt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(B(i))}else t!==void 0&&e.push(B(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return tt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:z).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r,a,h;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:z;this._$Em=i,this[i]=(h=(a=d.fromAttribute(e,l.type))!=null?a:(r=this._$Ej)==null?void 0:r.get(i))!=null?h:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let r=this.constructor,a=this[t];if(s!=null||(s=r.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:nt)(a,e)||s.useDefault&&s.reflect&&a===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){var a,h,l;s&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(h=r!=null?r:e)!=null?h:this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,a]of n){let{wrapped:h}=a,l=this[r];h!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,a,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}},rt;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[x("elementProperties")]=new Map,$[x("finalized")]=new Map,j==null||j({ReactiveElement:$}),((rt=f.reactiveElementVersions)!=null?rt:f.reactiveElementVersions=[]).push("2.1.0");var U=globalThis,k=U.trustedTypes,ht=k?k.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+A,Ut=`<${_t}>`,y=document,O=()=>y.createComment(""),H=o=>o===null||typeof o!="object"&&typeof o!="function",J=Array.isArray,Ot=o=>J(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",I=`[
2
- \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,lt=/>/g,m=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,dt=/"/g,ft=/^(?:script|style|textarea|title)$/i,G=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Lt=G(1),kt=G(2),Dt=G(3),v=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),pt=new WeakMap,g=y.createTreeWalker(y,129);function At(o,t){if(!J(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}var Ht=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=P;for(let a=0;a<e;a++){let h=o[a],l,d,c=-1,u=0;for(;u<h.length&&(r.lastIndex=u,d=r.exec(h),d!==null);)u=r.lastIndex,r===P?d[1]==="!--"?r=at:d[1]!==void 0?r=lt:d[2]!==void 0?(ft.test(d[2])&&(i=RegExp("</"+d[2],"g")),r=m):d[3]!==void 0&&(r=m):r===m?d[0]===">"?(r=i!=null?i:P,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,l=d[1],r=d[3]===void 0?m:d[3]==='"'?dt:ct):r===dt||r===ct?r=m:r===at||r===lt?r=P:(r=m,i=void 0);let _=r===m&&o[a+1].startsWith("/>")?" ":"";n+=r===P?h+Ut:c>=0?(s.push(l),h.slice(0,c)+$t+h.slice(c)+A+_):h+A+(c===-2?a:_)}return[At(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},R=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,h=this.parts,[l,d]=Ht(t,e);if(this.el=o.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith($t)){let u=d[r++],_=i.getAttribute(c).split(A),M=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:M[2],strings:_,ctor:M[1]==="."?q:M[1]==="?"?K:M[1]==="@"?Z:b}),i.removeAttribute(c)}else c.startsWith(A)&&(h.push({type:6,index:n}),i.removeAttribute(c));if(ft.test(i.tagName)){let c=i.textContent.split(A),u=c.length-1;if(u>0){i.textContent=k?k.emptyScript:"";for(let _=0;_<u;_++)i.append(c[_],O()),g.nextNode(),h.push({type:2,index:++n});i.append(c[u],O())}}}else if(i.nodeType===8)if(i.data===_t)h.push({type:2,index:n});else{let c=-1;for(;(c=i.data.indexOf(A,c+1))!==-1;)h.push({type:7,index:n}),c+=A.length-1}n++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function E(o,t,e=o,s){var r,a,h;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl,n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?((h=e._$Co)!=null?h:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=E(o,i._$AS(o,t.values),i,s)),t}var W=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=i;let n=g.nextNode(),r=0,a=0,h=s[0];for(;h!==void 0;){if(r===h.index){let d;h.type===2?d=new T(n,n.nextSibling,this,t):h.type===1?d=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(d=new F(n,this,t)),this._$AV.push(d),h=s[++a]}r!==(h==null?void 0:h.index)&&(n=g.nextNode(),r++)}return g.currentNode=y,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},T=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),H(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ot(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!==p&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=R.createElement(At(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let r=new W(i,this),a=r.u(this.options);r.p(e),this.T(a),this._$AH=r}}_$AC(t){let e=pt.get(t.strings);return e===void 0&&pt.set(t.strings,e=new R(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},b=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=E(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{let a=t,h,l;for(t=n[0],h=0;h<n.length-1;h++)l=E(this,a[s+h],e,h),l===v&&(l=this._$AH[h]),r||(r=!H(l)||l!==this._$AH[h]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[h+1]),this._$AH[h]=l}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},q=class extends b{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},K=class extends b{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},Z=class extends b{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var r;if((t=(r=E(this,t,e,0))!=null?r:p)===v)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},F=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}};var V=U.litHtmlPolyfillSupport,ut;V==null||V(R,T),((ut=U.litHtmlVersions)!=null?ut:U.litHtmlVersions=[]).push("3.3.0");var mt=(o,t,e)=>{var n,r;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(r=e==null?void 0:e.renderBefore)!=null?r:null;s._$litPart$=i=new T(t.insertBefore(O(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var S=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}},gt;C._$litElement$=!0,C.finalized=!0,(gt=S.litElementHydrateSupport)==null||gt.call(S,{LitElement:C});var Q=S.litElementPolyfillSupport;Q==null||Q({LitElement:C});var yt;((yt=S.litElementVersions)!=null?yt:S.litElementVersions=[]).push("4.2.0");export{vt as a,z as b,nt as c,Lt as d,C as e};
4
- /*! Bundled license information:
5
-
6
- @lit/reactive-element/css-tag.js:
7
- (**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- *)
12
-
13
- @lit/reactive-element/reactive-element.js:
14
- (**
15
- * @license
16
- * Copyright 2017 Google LLC
17
- * SPDX-License-Identifier: BSD-3-Clause
18
- *)
19
-
20
- lit-html/lit-html.js:
21
- (**
22
- * @license
23
- * Copyright 2017 Google LLC
24
- * SPDX-License-Identifier: BSD-3-Clause
25
- *)
26
-
27
- lit-element/lit-element.js:
28
- (**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- *)
33
-
34
- lit-html/is-server.js:
35
- (**
36
- * @license
37
- * Copyright 2022 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- *)
40
- */