New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nordhealth/components

Package Overview
Dependencies
Maintainers
4
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nordhealth/components - npm Package Compare versions

Comparing version 1.0.0-alpha.48 to 1.0.0-alpha.49

lib/Calendar-d6be720e.js

2

lib/Badge.js

@@ -1,2 +0,2 @@

import{D as r,_ as a,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as e,$ as n,s}from"./lit-element-99571067.js";import{e as t}from"./property-03f59dce.js";const i=e`:host{display:inline-block}*,::after,::before{box-sizing:border-box;margin:0;padding:0}.n-badge{border-radius:var(--n-border-radius-pill);background:var(--n-color-surface);border:1px solid var(--n-color-border);font-size:var(--n-font-size-s);font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);line-height:var(--n-line-height);padding-block-start:calc(var(--n-space-s)/ 2);padding-block-end:calc(var(--n-space-s)/ 2);padding-inline-start:calc(var(--n-space-s) * 2.5);padding-inline-end:var(--n-space-s);color:var(--n-badge-color,var(--n-color-text-weaker));position:relative}.n-badge:hover{background:var(--n-color-active);color:var(--n-color-text);cursor:default}.n-badge::after{content:"";inline-size:var(--n-space-s);block-size:var(--n-space-s);background:var(--n-badge-chip-color,var(--n-color-status-info));border-radius:var(--n-border-radius-circle);display:inline-block;position:absolute;transform:translateY(-50%);inset-block-start:50%;inset-inline-start:var(--n-space-s);z-index:2}:host([type=success]){--n-badge-chip-color:var(--n-color-status-success)}:host([type=warning]){--n-badge-chip-color:var(--n-color-status-warning)}:host([type=danger]){--n-badge-chip-color:var(--n-color-status-danger)}:host([type=highlight]){--n-badge-chip-color:var(--n-color-status-highlight)}`;let c=class extends(r(s)){constructor(){super(...arguments),this.type="info"}render(){return n`<span class="n-badge"><slot></slot></span>`}};c.styles=i,a([t({reflect:!0})],c.prototype,"type",void 0),c=a([o("nord-badge")],c);var l=c;export{l as default};
import{D as r,_ as a,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as e,s}from"./lit-element-99571067.js";import{e as t}from"./property-03f59dce.js";import{s as i}from"./Component-a6208841.js";const c=n`:host{display:inline-block}.n-badge{border-radius:var(--n-border-radius-pill);background:var(--n-color-surface);border:1px solid var(--n-color-border);font-size:var(--n-font-size-s);font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);line-height:var(--n-line-height);padding-block-start:calc(var(--n-space-s)/ 2);padding-block-end:calc(var(--n-space-s)/ 2);padding-inline-start:calc(var(--n-space-s) * 2.5);padding-inline-end:var(--n-space-s);color:var(--n-badge-color,var(--n-color-text-weaker));position:relative}.n-badge:hover{background:var(--n-color-active);color:var(--n-color-text);cursor:default}.n-badge::after{content:"";inline-size:var(--n-space-s);block-size:var(--n-space-s);background:var(--n-badge-chip-color,var(--n-color-status-info));border-radius:var(--n-border-radius-circle);display:inline-block;position:absolute;transform:translateY(-50%);inset-block-start:50%;inset-inline-start:var(--n-space-s);z-index:2}:host([type=success]){--n-badge-chip-color:var(--n-color-status-success)}:host([type=warning]){--n-badge-chip-color:var(--n-color-status-warning)}:host([type=danger]){--n-badge-chip-color:var(--n-color-status-danger)}:host([type=highlight]){--n-badge-chip-color:var(--n-color-status-highlight)}`;let l=class extends(r(s)){constructor(){super(...arguments),this.type="info"}render(){return e`<span class="n-badge"><slot></slot></span>`}};l.styles=[i,c],a([t({reflect:!0})],l.prototype,"type",void 0),l=a([o("nord-badge")],l);var d=l;export{d as default};
//# sourceMappingURL=Badge.js.map

@@ -1,2 +0,2 @@

import{D as t,_ as o,n}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as e,w as a,s as i}from"./lit-element-99571067.js";import{e as s}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{e as d,n as b}from"./ref-3b5a3bd2.js";import{L as c}from"./LightDomController-37815039.js";import{I as u,F as v}from"./InputMixin-367f0927.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";const h=r`:host{all:unset;display:inline-block}*,::after,::before{box-sizing:border-box;margin:0;padding:0}.n-button{-webkit-appearance:none;align-items:center;appearance:none;background:var(--n-button-background-color,var(--n-color-button));border-radius:var(--n-button-border-radius,var(--n-border-radius-s));border:1px var(--n-button-border-style,solid) var(--n-button-border-color,var(--n-color-border-strong));box-shadow:var(--n-button-box-shadow,var(--n-box-shadow));color:var(--n-button-color,var(--n-color-text));cursor:pointer;display:flex;gap:var(--n-button-gap,var(--n-space-s));font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);font-size:var(--n-button-font-size,var(--n-font-size-m));font-weight:var(--n-button-font-weight,var(--n-font-weight));line-height:var(--n-line-height-form);margin:0;min-block-size:var(--n-button-min-height,var(--n-space-xl));padding:var(--n-button-padding-y,calc(var(--n-space-s)/ 1.6)) var(--n-button-padding-x,calc(var(--n-space-m)/ 1.2));text-align:var(--n-button-text-align,center);text-decoration:none;transition:all .1s ease;-webkit-user-select:none;user-select:none;position:relative;inline-size:var(--n-button-width,fit-content)}.n-button::after{content:"";position:absolute;background:0 0;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 50%,rgba(0,0,0,.013) 100%);background-repeat:repeat-x;inline-size:100%;inset-inline:0;block-size:100%;inset-block-start:0}:host([expand]){--n-button-width:100%;display:block}.n-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}:host(:hover){--n-button-background-color:var(--n-color-button-hover);--n-button-border-color:var(--n-color-border-hover)}.n-button:focus{--n-button-border-color:var(--n-color-primary);--n-button-border-style:solid;--n-button-box-shadow:0 0 0 1px var(--n-button-border-color);outline:0}.n-button:active{opacity:.8;transform:translateY(1px);transition:none}:host([variant=primary]){--n-button-background-color:var(--n-color-primary);--n-button-border-color:transparent;--n-button-box-shadow:none;--n-button-color:var(--n-color-text-inverse);--n-button-font-weight:var(--n-font-weight-active)}:host([variant=primary]:hover){--n-button-background-color:var(--n-color-primary-strong)}:host([variant=dashed]){--n-button-color:var(--n-color-text-weaker);--n-button-border-color:var(--n-color-border-hover);--n-button-border-style:dashed;--n-button-box-shadow:none}:host([variant=dashed]:hover){--n-button-color:var(--n-color-text)}:host([variant=dashed]) .n-button::after{display:none}:host([variant=plain]){--n-button-border-color:transparent;--n-button-box-shadow:none}:host([variant=plain]) .n-button::after{display:none}:host([variant=danger]){--n-button-border-color:var(--n-color-status-danger);--n-button-color:var(--n-color-text-error);--n-button-font-weight:var(--n-font-weight-active)}:host([disabled]){--n-button-background-color:var(--n-color-border);--n-button-box-shadow:none;--n-button-border-color:var(--n-button-background-color);--n-button-color:var(--n-color-text-weaker);opacity:.5;pointer-events:none}:host([disabled]) .n-button::after{display:none}:host([size="s"]){--n-button-font-size:var(--n-font-size-s);--n-button-min-height:var(--n-space-l);--n-button-padding-y:calc(var(--n-space-s) / 1.5);--n-button-padding-x:var(--n-space-s);--n-button-gap:calc(var(--n-space-s) / 2)}:host([size="s"]) .n-button{line-height:var(--n-line-height-tight)}:host([size="l"]){--n-button-border-radius:var(--n-border-radius);--n-button-font-size:var(--n-font-size-l);--n-button-min-height:calc(var(--n-space-xxl) - var(--n-space-l));--n-button-padding-x:calc(var(--n-space-l) / 1.3);--n-button-font-weight:var(--n-font-weight-active)}::slotted(*){color:inherit;pointer-events:none}::slotted(svg){color:var(--n-color-icon)}::slotted(button[slot=proxy]){display:none}`;let p=class extends(u(v(t(i)))){constructor(){super(...arguments),this.buttonRef=d(),this.lightDom=new c(this,{render:()=>this.renderLightDom()}),this.variant="default",this.type="submit",this.size="m",this.download=!1,this.target="_self",this.expand=!1}render(){const t=e`<slot name="before"></slot><div class="n-content"><slot></slot></div><slot name="after"></slot>`;return this.href?e`<a ${b(this.focusableRef)} class="n-button" target="${this.target}" ?download="${this.download}" href="${this.href}">${t}</a>`:e`<slot name="proxy"></slot><button ${b(this.focusableRef)} class="n-button" ?disabled="${this.disabled}" name="${l(this.name||void 0)}" value="${l(this.value||void 0)}" @click="${this.handleClick}">${t}</button>`}renderLightDom(){return this.href||!this.form?a:e`<button ${b(this.buttonRef)} slot="proxy" name="${l(this.name||void 0)}" value="${l(this.value||void 0)}" ?disabled="${this.disabled}" type="${this.type}"></button>`}handleClick(){var t;null===(t=this.buttonRef.value)||void 0===t||t.click()}};p.styles=h,o([s({reflect:!0})],p.prototype,"variant",void 0),o([s({reflect:!0})],p.prototype,"type",void 0),o([s({reflect:!0})],p.prototype,"size",void 0),o([s({reflect:!0})],p.prototype,"href",void 0),o([s({type:Boolean})],p.prototype,"download",void 0),o([s({reflect:!0})],p.prototype,"target",void 0),o([s({reflect:!0,type:Boolean})],p.prototype,"expand",void 0),p=o([n("nord-button")],p);var f=p;export{f as default};
import{D as t,_ as o,n}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as e,w as a,s as i}from"./lit-element-99571067.js";import{e as s}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{e as d,n as b}from"./ref-3b5a3bd2.js";import{L as c}from"./LightDomController-37815039.js";import{I as u,F as v}from"./InputMixin-f2da5fa8.js";import{s as h}from"./Component-a6208841.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";const p=r`:host{display:inline-block}.n-button{-webkit-appearance:none;align-items:center;appearance:none;background:var(--n-button-background-color,var(--n-color-button));border-radius:var(--n-button-border-radius,var(--n-border-radius-s));border:1px var(--n-button-border-style,solid) var(--n-button-border-color,var(--n-color-border-strong));box-shadow:var(--n-button-box-shadow,var(--n-box-shadow));color:var(--n-button-color,var(--n-color-text));cursor:pointer;display:flex;gap:var(--n-button-gap,var(--n-space-s));font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);font-size:var(--n-button-font-size,var(--n-font-size-m));font-weight:var(--n-button-font-weight,var(--n-font-weight));line-height:var(--n-line-height-form);margin:0;min-block-size:var(--n-button-min-height,var(--n-space-xl));padding:var(--n-button-padding-y,calc(var(--n-space-s)/ 1.6)) var(--n-button-padding-x,calc(var(--n-space-m)/ 1.2));text-align:var(--n-button-text-align,center);text-decoration:none;transition:all .1s ease;-webkit-user-select:none;user-select:none;position:relative;inline-size:var(--n-button-width,fit-content)}.n-button::after{content:"";position:absolute;background:0 0;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 50%,rgba(0,0,0,.013) 100%);background-repeat:repeat-x;inline-size:100%;inset-inline:0;block-size:100%;inset-block-start:0}:host([expand]){--n-button-width:100%;display:block}.n-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}:host(:hover){--n-button-background-color:var(--n-color-button-hover);--n-button-border-color:var(--n-color-border-hover)}.n-button:focus{--n-button-border-color:var(--n-color-primary);--n-button-border-style:solid;--n-button-box-shadow:0 0 0 1px var(--n-button-border-color);outline:0}.n-button:active{opacity:.8;transform:translateY(1px);transition:none}:host([variant=primary]){--n-button-background-color:var(--n-color-primary);--n-button-border-color:transparent;--n-button-box-shadow:none;--n-button-color:var(--n-color-text-inverse);--n-button-font-weight:var(--n-font-weight-active)}:host([variant=primary]:hover){--n-button-background-color:var(--n-color-primary-strong)}:host([variant=dashed]){--n-button-color:var(--n-color-text-weaker);--n-button-border-color:var(--n-color-border-hover);--n-button-border-style:dashed;--n-button-box-shadow:none}:host([variant=dashed]:hover){--n-button-color:var(--n-color-text)}:host([variant=dashed]) .n-button::after{display:none}:host([variant=plain]){--n-button-border-color:transparent;--n-button-box-shadow:none}:host([variant=plain]) .n-button::after{display:none}:host([variant=danger]){--n-button-border-color:var(--n-color-status-danger);--n-button-color:var(--n-color-text-error);--n-button-font-weight:var(--n-font-weight-active)}:host([disabled]){--n-button-background-color:var(--n-color-border);--n-button-box-shadow:none;--n-button-border-color:var(--n-button-background-color);--n-button-color:var(--n-color-text-weaker);opacity:.5;pointer-events:none}:host([disabled]) .n-button::after{display:none}:host([size="s"]){--n-button-font-size:var(--n-font-size-s);--n-button-min-height:var(--n-space-l);--n-button-padding-y:calc(var(--n-space-s) / 1.5);--n-button-padding-x:var(--n-space-s);--n-button-gap:calc(var(--n-space-s) / 2)}:host([size="s"]) .n-button{line-height:var(--n-line-height-tight)}:host([size="l"]){--n-button-border-radius:var(--n-border-radius);--n-button-font-size:var(--n-font-size-l);--n-button-min-height:calc(var(--n-space-xxl) - var(--n-space-l));--n-button-padding-x:calc(var(--n-space-l) / 1.3);--n-button-font-weight:var(--n-font-weight-active)}::slotted(*){color:inherit;pointer-events:none}::slotted(svg){color:var(--n-color-icon)}::slotted(button[slot=proxy]){display:none}`;let f=class extends(u(v(t(i)))){constructor(){super(...arguments),this.buttonRef=d(),this.lightDom=new c(this,{render:()=>this.renderLightDom()}),this.variant="default",this.type="submit",this.size="m",this.download=!1,this.target="_self",this.expand=!1}render(){const t=e`<slot name="before"></slot><div class="n-content"><slot></slot></div><slot name="after"></slot>`;return this.href?e`<a ${b(this.focusableRef)} class="n-button" target="${this.target}" ?download="${this.download}" href="${this.href}">${t}</a>`:e`<slot name="proxy"></slot><button ${b(this.focusableRef)} class="n-button" ?disabled="${this.disabled}" name="${l(this.name||void 0)}" value="${l(this.value||void 0)}" @click="${this.handleClick}">${t}</button>`}renderLightDom(){return this.href||!this.form?a:e`<button ${b(this.buttonRef)} slot="proxy" name="${l(this.name||void 0)}" value="${l(this.value||void 0)}" ?disabled="${this.disabled}" type="${this.type}"></button>`}handleClick(){var t;null===(t=this.buttonRef.value)||void 0===t||t.click()}};f.styles=[h,p],o([s({reflect:!0})],f.prototype,"variant",void 0),o([s({reflect:!0})],f.prototype,"type",void 0),o([s({reflect:!0})],f.prototype,"size",void 0),o([s({reflect:!0})],f.prototype,"href",void 0),o([s({type:Boolean})],f.prototype,"download",void 0),o([s({reflect:!0})],f.prototype,"target",void 0),o([s({reflect:!0,type:Boolean})],f.prototype,"expand",void 0),f=o([n("nord-button")],f);var g=f;export{g as default};
//# sourceMappingURL=Button.js.map

@@ -1,2 +0,2 @@

import"./DraftComponentMixin-1d7c27bc.js";import"./lit-element-99571067.js";import"./property-03f59dce.js";import"./state-70f38ceb.js";export{C as default}from"./Calendar-6776543a.js";import"./number-ca13a56f.js";import"./tinykeys.module-84e6cc41.js";import"./dates-ccf5a897.js";import"./calendar-localization.js";import"./month-view.js";import"./DateSelectEvent.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./class-map-df701775.js";import"./if-defined-f6a18fde.js";import"./collection-f3631dc8.js";import"./events-731d0007.js";
import"./DraftComponentMixin-1d7c27bc.js";import"./lit-element-99571067.js";import"./property-03f59dce.js";import"./state-70f38ceb.js";export{C as default}from"./Calendar-d6be720e.js";import"./number-ca13a56f.js";import"./tinykeys.module-84e6cc41.js";import"./dates-ccf5a897.js";import"./calendar-localization.js";import"./month-view.js";import"./DateSelectEvent.js";import"./Component-a6208841.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./class-map-df701775.js";import"./if-defined-f6a18fde.js";import"./collection-f3631dc8.js";import"./events-731d0007.js";
//# sourceMappingURL=Calendar.js.map

@@ -1,2 +0,2 @@

import{D as a,_ as o,n}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as t,s as e}from"./lit-element-99571067.js";import{e as d}from"./property-03f59dce.js";import{S as s}from"./SlotController-a18e9d36.js";const i=r`:host{--n-card-padding:var(--n-space-m);--n-card-slot-padding:var(--n-space-m);all:initial;display:block;font-family:var(--n-font-family);line-height:var(--n-line-height);font-feature-settings:var(--n-font-features);font-size:var(--n-font-size-m);color:var(--n-color-text)}*,::after,::before{box-sizing:border-box;margin:0;padding:0}.n-card{background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-card)}@media (max-width:1000px){slot:not([name]){overflow-x:auto}}:host([padding="l"]){--n-card-padding:var(--n-space-l);--n-card-slot-padding:var(--n-space-l)}:host([padding=none]){--n-card-padding:0;--n-card-slot-padding:var(--n-space-m)}slot{display:block}slot[hidden]{display:none}slot:not([name]){padding:var(--n-card-padding)}slot[name=header]{border-block-end:1px solid var(--n-color-border);padding:var(--n-space-m) var(--n-card-slot-padding)}slot[name=footer]{padding:var(--n-card-slot-padding);padding-block-start:0;white-space:nowrap}::slotted([slot=header]){font-size:var(--n-font-size-m);font-weight:var(--n-font-weight-heading);margin:0}`;let l=class extends(a(e)){constructor(){super(...arguments),this.headerSlot=new s(this,"header"),this.footerSlot=new s(this,"footer"),this.padding="m"}render(){return t`<div class="n-card"><slot name="header" ?hidden="${!this.headerSlot.hasContent}"></slot><slot></slot><slot name="footer" ?hidden="${!this.footerSlot.hasContent}"></slot></div>`}};l.styles=i,o([d({reflect:!0})],l.prototype,"padding",void 0),l=o([n("nord-card")],l);var p=l;export{p as default};
import{D as o,_ as a,n as r}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as d,s as t}from"./lit-element-99571067.js";import{e}from"./property-03f59dce.js";import{S as s}from"./SlotController-a18e9d36.js";import{s as i}from"./Component-a6208841.js";const l=n`:host{--n-card-padding:var(--n-space-m);--n-card-slot-padding:var(--n-space-m);font-size:var(--n-font-size-m);color:var(--n-color-text)}.n-card{background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-card)}@media (max-width:1000px){slot:not([name]){overflow-x:auto}}:host([padding="l"]){--n-card-padding:var(--n-space-l);--n-card-slot-padding:var(--n-space-l)}:host([padding=none]){--n-card-padding:0;--n-card-slot-padding:var(--n-space-m)}slot{display:block}slot[hidden]{display:none}slot:not([name]){padding:var(--n-card-padding)}slot[name=header]{border-block-end:1px solid var(--n-color-border);padding:var(--n-space-m) var(--n-card-slot-padding)}slot[name=footer]{padding:var(--n-card-slot-padding);padding-block-start:0;white-space:nowrap}::slotted([slot=header]){font-size:var(--n-font-size-m);font-weight:var(--n-font-weight-heading);margin:0}`;let p=class extends(o(t)){constructor(){super(...arguments),this.headerSlot=new s(this,"header"),this.footerSlot=new s(this,"footer"),this.padding="m"}render(){return d`<div class="n-card"><slot name="header" ?hidden="${!this.headerSlot.hasContent}"></slot><slot></slot><slot name="footer" ?hidden="${!this.footerSlot.hasContent}"></slot></div>`}};p.styles=[i,l],a([e({reflect:!0})],p.prototype,"padding",void 0),p=a([r("nord-card")],p);var c=p;export{c as default};
//# sourceMappingURL=Card.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as r,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as c,s as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l as t}from"./if-defined-f6a18fde.js";import{n as s}from"./ref-3b5a3bd2.js";import l from"./Icon.js";import{I as d,F as p}from"./InputMixin-367f0927.js";import{F as h}from"./FormAssociatedMixin-b460125c.js";import{s as b}from"./FormField-21cad3fa.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./state-70f38ceb.js";import"./unsafe-html-7493c929.js";import"./SlotController-a18e9d36.js";import"./events-731d0007.js";import"./VisuallyHidden.js";var v=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="m7 87.5 24.43 30.1a13.594 13.594 0 0 0 21-.126L133 17.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"/></svg>',title:"interface-checked",tags:"nordicon interface checked symbol checkmark done ready"});const u=n`:host{display:inline-block;font-size:var(--n-font-size-m)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}input{--n-checkbox-size:calc(var(--n-space-m) * 1.25);--n-checkbox-accent-color:var(--n-color-primary);-moz-appearance:none;-webkit-appearance:none;appearance:none;border:1px solid var(--n-checkbox-border-color,var(--n-color-border-hover));border-radius:var(--n-border-radius);display:block;inline-size:var(--n-checkbox-size);block-size:var(--n-checkbox-size);cursor:pointer}input:checked{--n-checkbox-border-color:var(--n-color-primary);background:var(--n-checkbox-accent-color)}input[aria-invalid]{--n-checkbox-accent-color:var(--n-color-status-danger);--n-checkbox-border-color:var(--n-checkbox-accent-color)}input:focus-visible{outline:0}input:focus{outline:0;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-primary)}input:active{opacity:.8}:host([disabled]) label{color:var(--n-color-text-weaker);cursor:default}:host([disabled]) input{--n-checkbox-accent-color:var(--n-color-border-strong);--n-checkbox-border-color:var(--n-checkbox-accent-color);background:var(--n-checkbox-accent-color);cursor:default;opacity:1}nord-icon{display:none;position:absolute;color:var(--n-color-text-inverse);inset-inline-start:calc(var(--n-space-s)/ 2);inset-block-start:calc(var(--n-space-s)/ 2);z-index:var(--n-index-default);pointer-events:none}input:checked+nord-icon{display:block}.n-label-container{padding-block-end:0}label{-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight);line-height:var(--n-line-height-l);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;l.registerIcon(v);let k=class extends(h(d(p(e(i))))){constructor(){super(...arguments),this.checked=!1}get formValue(){return this.checked?this.value||"on":void 0}render(){return c`<div class="n-flex"><div class="n-input-container"><input ${s(this.focusableRef)} class="n-input" id="${this.inputId}" type="checkbox" name="${t(this.name)}" .value="${this.value}" ?checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${t(this.getDescribedBy())}" aria-invalid="${t(this.getInvalid())}" @change="${this.handleChange}"><nord-icon name="interface-checked-small" size="s"></nord-icon></div><div class="n-expand">${this.renderLabel()} ${this.renderError()}</div></div>`}handleChange(e){const r=e.target;this.checked=r.checked,super.handleChange(e)}};k.styles=[b,u],r([a({type:Boolean})],k.prototype,"checked",void 0),k=r([o("nord-checkbox")],k);var m=k;export{m as default};
import{D as e,_ as r,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as c,s as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l as t}from"./if-defined-f6a18fde.js";import{n as s}from"./ref-3b5a3bd2.js";import l from"./Icon.js";import{I as d,F as p}from"./InputMixin-f2da5fa8.js";import{F as h}from"./FormAssociatedMixin-b460125c.js";import{s as b}from"./FormField-21cad3fa.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./state-70f38ceb.js";import"./unsafe-html-7493c929.js";import"./Component-a6208841.js";import"./SlotController-a18e9d36.js";import"./events-731d0007.js";import"./VisuallyHidden.js";var v=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="m7 87.5 24.43 30.1a13.594 13.594 0 0 0 21-.126L133 17.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"/></svg>',title:"interface-checked",tags:"nordicon interface checked symbol checkmark done ready"});const u=n`:host{display:inline-block;font-size:var(--n-font-size-m)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}input{--n-checkbox-size:calc(var(--n-space-m) * 1.25);--n-checkbox-accent-color:var(--n-color-primary);-moz-appearance:none;-webkit-appearance:none;appearance:none;border:1px solid var(--n-checkbox-border-color,var(--n-color-border-hover));border-radius:var(--n-border-radius-s);display:block;inline-size:var(--n-checkbox-size);block-size:var(--n-checkbox-size);cursor:pointer}input:checked{--n-checkbox-border-color:var(--n-color-primary);background:var(--n-checkbox-accent-color)}input[aria-invalid]{--n-checkbox-accent-color:var(--n-color-status-danger);--n-checkbox-border-color:var(--n-checkbox-accent-color)}input:focus-visible{outline:0}input:focus{outline:0;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-primary)}input:active{opacity:.8}:host([disabled]) label{color:var(--n-color-text-weaker);cursor:default}:host([disabled]) input{--n-checkbox-accent-color:var(--n-color-border-strong);--n-checkbox-border-color:var(--n-checkbox-accent-color);background:var(--n-checkbox-accent-color);cursor:default;opacity:1}nord-icon{display:none;position:absolute;color:var(--n-color-text-inverse);inset-inline-start:calc(var(--n-space-s)/ 2);inset-block-start:calc(var(--n-space-s)/ 2);z-index:var(--n-index-default);pointer-events:none}input:checked+nord-icon{display:block}.n-label-container{padding-block-end:0}label{-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight);line-height:var(--n-line-height-l);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;l.registerIcon(v);let m=class extends(h(d(p(e(i))))){constructor(){super(...arguments),this.checked=!1}get formValue(){return this.checked?this.value||"on":void 0}render(){return c`<div class="n-flex"><div class="n-input-container"><input ${s(this.focusableRef)} class="n-input" id="${this.inputId}" type="checkbox" name="${t(this.name)}" .value="${this.value}" ?checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${t(this.getDescribedBy())}" aria-invalid="${t(this.getInvalid())}" @change="${this.handleChange}"><nord-icon name="interface-checked-small" size="s"></nord-icon></div><div class="n-expand">${this.renderLabel()} ${this.renderError()}</div></div>`}handleChange(e){const r=e.target;this.checked=r.checked,super.handleChange(e)}};m.styles=[b,u],r([a({type:Boolean})],m.prototype,"checked",void 0),m=r([o("nord-checkbox")],m);var f=m;export{f as default};
//# sourceMappingURL=Checkbox.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as s,w as r,s as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{c as d,w as c}from"./number-ca13a56f.js";import{e as p,n as m}from"./ref-3b5a3bd2.js";import{o as h}from"./class-map-df701775.js";import{l as v}from"./if-defined-f6a18fde.js";import{g as u}from"./collection-f3631dc8.js";import{N as f}from"./events-731d0007.js";import{L as b}from"./LightDismissController-cc5b4bf2.js";import{KeyboardController as g}from"./KeyboardController.js";import x from"./Icon.js";import"./VisuallyHidden.js";import"./CommandMenuAction.js";import{SelectEvent as y}from"./events.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";import"./unsafe-html-7493c929.js";const w="keyboard-arrow-up-down";var k=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="M105.833 24v93m0-93L80 49.833M105.833 24l25.834 25.833M34.167 117V24m0 93L60 91.167M34.167 117 8.333 91.167" fill="none" stroke="currentColor" stroke-width="14" stroke-linecap="round" stroke-linejoin="round"/></svg>',title:w,tags:"nordicon keyboard keys arrow up down shortcut"});var z=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"><path d="M35 133 7 105l28-28"/><path d="M7 105h112a14 14 0 0 0 14-14V21a14 14 0 0 0-14-14H77"/></g></svg>',title:"keyboard-return",tags:"nordicon keyboard return key shortcut"});const $="keyboard-backspace";var C=Object.freeze({__proto__:null,default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M6.707 4.879A3 3 0 0 1 8.828 4H15a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H8.828a3 3 0 0 1-2.12-.879l-4.415-4.414a1 1 0 0 1 0-1.414l4.414-4.414zm4 2.414a1 1 0 0 0-1.414 1.414L10.586 10l-1.293 1.293a1 1 0 1 0 1.414 1.414L12 11.414l1.293 1.293a1 1 0 0 0 1.414-1.414L13.414 10l1.293-1.293a1 1 0 0 0-1.414-1.414L12 8.586l-1.293-1.293z" clip-rule="evenodd"/></svg>',title:$,tags:"nordicon keyboard backspace back delete key shortcut"});function j(e){var t;return(null===(t=e.activeElement)||void 0===t?void 0:t.shadowRoot)?j(e.activeElement.shadowRoot):e.activeElement||void 0}const I=n`:host{--n-command-menu-width:640px;--n-command-menu-top:16%;--n-command-menu-height:290px;all:initial;font-family:var(--n-font-family);line-height:var(--n-line-height);font-feature-settings:var(--n-font-features)}.n-modal{display:none;position:fixed;pointer-events:none;z-index:var(--n-index-modal);inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;overflow:auto}.n-modal.n-visible{display:block}.n-modal-content{position:relative;pointer-events:all;inset-block-start:var(--n-command-menu-top);margin:auto;display:flex;flex-direction:column;min-inline-size:0;background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-modal);max-inline-size:var(--n-command-menu-width);overflow:hidden}.n-bump{animation:zoom-in-zoom-out var(--n-transition-slowly)}@keyframes zoom-in-zoom-out{0%{transform:translateY(-10px) scale(.97);opacity:0}100%{transform:translateY(0) scale(1.0001);opacity:1}}.n-modal-footer{display:flex;gap:var(--n-space-s);padding:var(--n-space-s) var(--n-space-m);font-size:calc(var(--n-font-size-s) - 1px);color:var(--n-color-text-weaker)}.n-help{display:flex;align-items:center;gap:2px}.n-help+.n-help{padding-inline-start:var(--n-space-s);border-inline-start:1px solid var(--n-color-border-strong)}.n-help nord-icon{--n-icon-size:10px;color:currentColor;padding:3px 4px}.n-help.n-backspace nord-icon{--n-icon-size:12px}.n-search-wrapper{display:flex;border-block-end:1px solid var(--n-color-border)}[role=combobox]{flex:1;font-size:var(--n-font-size-l);font-weight:var(--n-font-weight);font-family:inherit;background:0 0;color:var(--n-color-text);border:none;border-radius:0;appearance:none;outline:0;margin:0;padding:var(--n-space-m)}[role=combobox]::-webkit-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-moz-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-ms-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=listbox]{max-block-size:var(--n-command-menu-height);overflow:auto;margin:0;padding:0}.n-group-header{line-height:var(--n-line-height);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-s)/ 1.4) var(--n-space-m);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:var(--n-font-size-s);background:var(--n-color-surface-raised);font-weight:var(--n-font-weight-active);color:var(--n-color-text-weaker)}.n-command-empty{display:flex;flex:1;flex-direction:column;border-inline-start:2px solid transparent;align-items:flex-start;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command-empty .n-title{flex:1;margin-block-start:var(--n-space-s);margin-inline-end:calc(var(--n-space-s)/ 2);max-inline-size:100%;font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-command-empty .n-tip{flex:1;margin-block-start:var(--n-space-s);margin-block-end:var(--n-space-m);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker)}`;x.registerIcon(k),x.registerIcon(z),x.registerIcon(C);let _=class extends(e(i)){constructor(){super(...arguments),this.inputRef=p(),this.listRef=p(),this.dismissController=new b(this,{isOpen:()=>this.open,onDismiss:()=>this.close()}),this.keyboardController=new g(this,{trigger:()=>this.select(),goBack:()=>this.goBack(),end:()=>this.end(),start:()=>this.start(),next:()=>this.next(),previous:()=>this.previous(),toggleOpen:()=>this.toggleOpen()}),this.open=!1,this.placeholder="Type a command or search...",this.commands=[],this.search="",this.bump=!0,this.selectedIndex=0,this.filteredCommands=[]}get selected(){return this.filteredCommands[this.selectedIndex]}show(e={}){this.open=!0,this.setParent(e.parent),this.dispatchEvent(new f("open"))}close(){var e;this.open=!1,null===(e=this.previousFocus)||void 0===e||e.focus(),this.previousFocus=void 0,this.dispatchEvent(new f("close"))}toggleOpen(){this.open?this.close():this.show()}focus(){var e;null===(e=this.inputRef.value)||void 0===e||e.focus()}willUpdate(e){e.has("commands")&&this.keyboardController.registerCommandShortcuts(),e.has("open")&&this.open&&(this.bump=!0),(e.has("search")||e.has("parent")||e.has("commands"))&&this.filterCommands()}updated(e){e.has("open")&&this.open&&(this.previousFocus=j(document),this.focus(),this.listRef.value&&(this.listRef.value.scrollTop=0))}render(){var e;const t=u(this.filteredCommands,"section"),o=0===this.filteredCommands.length?"no-results":null===(e=this.selected)||void 0===e?void 0:e.id;return s`<div class="${h({"n-visible":this.open,"n-modal":!0})}"><div @animationend="${this.handleAnimationEnd}" class="${h({"n-bump":this.bump,"n-modal-content":!0})}"><div class="n-search-wrapper"><nord-visually-hidden id="instructions">Press 'Enter' to confirm your input or 'Escape' to cancel</nord-visually-hidden><input type="text" id="search" @input="${this.handleInput}" @blur="${this.handleBlur}" ${m(this.inputRef)} placeholder="${this.placeholder}" .value="${this.search}" spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Type the name of a command to run." aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-controls="list" aria-expanded="true" aria-activedescendant="${v(o)}" aria-describedby="instructions"></div><div class="n-modal-body"><div id="list" ${m(this.listRef)} role="listbox">${0===this.filteredCommands.length?this.renderNoResults():Array.from(t,(([e,t])=>this.renderSection(e,t)))}</div></div><slot name="footer"><div class="n-modal-footer" slot="footer"><span class="n-help"><nord-icon label="Arrow keys" name="${w}"></nord-icon>Navigate</span> <span class="n-help"><nord-icon label="Enter key" name="${"keyboard-return"}"></nord-icon>Select</span> <span class="n-help">Esc to dismiss</span> <span class="n-help n-backspace"><nord-icon label="Backspace key" name="${$}"></nord-icon>Move to parent</span></div></slot></div></div>`}renderNoResults(){return s`<div id="no-results" class="n-command-empty" role="option" aria-selected="true"><div class="n-title">No results for “${this.search}”</div><div class="n-tip">Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.</div></div>`}renderSection(e,t){const o=`section-${e}`;return s`<div role="group" aria-labelledby="${v(e?o:void 0)}">${e?s`<div class="n-group-header" role="presentation" id="${v(o)}">${e}</div>`:r} ${d(t,(e=>e.id),(e=>{var t,o;return s`<nord-command-menu-action id="${e.id}" .command="${e}" ?selected="${e.id===(null===(t=this.selected)||void 0===t?void 0:t.id)}" @click="${()=>this.select(e)}" role="option" aria-selected="${v(e.id===(null===(o=this.selected)||void 0===o?void 0:o.id)||void 0)}"></nord-command-menu-action>`}))}</div>`}handleAnimationEnd(){this.bump=!1}handleBlur(){this.open&&this.focus()}handleInput(e){const t=e.target;this.setSearch(t.value)}select(e=this.selected){var t;this.commands.some((t=>t.parent===e.id))?(this.setParent(e.id),this.bump=!0,this.focus()):this.close(),this.setSearch(""),null===(t=e.handler)||void 0===t||t.call(e,this);const o=new y(e);this.dispatchEvent(o)}start(){this.selectedIndex=0}end(){this.selectedIndex=this.filteredCommands.length-1}next(){this.selectedIndex=c(this.selectedIndex+1,0,this.filteredCommands.length-1)}previous(){this.selectedIndex=c(this.selectedIndex-1,0,this.filteredCommands.length-1)}goBack(){if(!this.search&&this.parent){const e=this.commands.find((e=>e.id===this.parent));this.setParent(null==e?void 0:e.parent)}}setParent(e){this.parent=e,this.setSearch("")}setSearch(e){this.search=e,this.selectedIndex=0}filterCommands(){const e=this.search.toLocaleLowerCase().split(/\s+/);this.filteredCommands=this.commands.filter((({title:t,keywords:o="",parent:n})=>{const s=`${t} ${o}`.toLocaleLowerCase(),r=e.every((e=>s.includes(e)));return(!this.parent&&this.search||n===this.parent)&&r}))}};_.styles=I,t([a({type:Boolean})],_.prototype,"open",void 0),t([a({type:String})],_.prototype,"placeholder",void 0),t([a({type:Array,attribute:!1})],_.prototype,"commands",void 0),t([l()],_.prototype,"parent",void 0),t([l()],_.prototype,"search",void 0),t([l()],_.prototype,"bump",void 0),t([l()],_.prototype,"selectedIndex",void 0),t([l()],_.prototype,"filteredCommands",void 0),_=t([o("nord-command-menu")],_);var E=_;export{E as default};
import{D as e,_ as o,n as t}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as s,w as r,s as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{c as d,w as c}from"./number-ca13a56f.js";import{e as p,n as m}from"./ref-3b5a3bd2.js";import{o as h}from"./class-map-df701775.js";import{l as v}from"./if-defined-f6a18fde.js";import{g as u}from"./collection-f3631dc8.js";import{N as f}from"./events-731d0007.js";import{L as b}from"./LightDismissController-cc5b4bf2.js";import{KeyboardController as g}from"./KeyboardController.js";import x from"./Icon.js";import"./VisuallyHidden.js";import"./CommandMenuAction.js";import{SelectEvent as w}from"./events.js";import{s as y}from"./Component-a6208841.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";import"./unsafe-html-7493c929.js";const k="keyboard-arrow-up-down";var z=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="M105.833 24v93m0-93L80 49.833M105.833 24l25.834 25.833M34.167 117V24m0 93L60 91.167M34.167 117 8.333 91.167" fill="none" stroke="currentColor" stroke-width="14" stroke-linecap="round" stroke-linejoin="round"/></svg>',title:k,tags:"nordicon keyboard keys arrow up down shortcut"});var C=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"><path d="M35 133 7 105l28-28"/><path d="M7 105h112a14 14 0 0 0 14-14V21a14 14 0 0 0-14-14H77"/></g></svg>',title:"keyboard-return",tags:"nordicon keyboard return key shortcut"});const $="keyboard-backspace";var j=Object.freeze({__proto__:null,default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M6.707 4.879A3 3 0 0 1 8.828 4H15a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H8.828a3 3 0 0 1-2.12-.879l-4.415-4.414a1 1 0 0 1 0-1.414l4.414-4.414zm4 2.414a1 1 0 0 0-1.414 1.414L10.586 10l-1.293 1.293a1 1 0 1 0 1.414 1.414L12 11.414l1.293 1.293a1 1 0 0 0 1.414-1.414L13.414 10l1.293-1.293a1 1 0 0 0-1.414-1.414L12 8.586l-1.293-1.293z" clip-rule="evenodd"/></svg>',title:$,tags:"nordicon keyboard backspace back delete key shortcut"});function I(e){var o;return(null===(o=e.activeElement)||void 0===o?void 0:o.shadowRoot)?I(e.activeElement.shadowRoot):e.activeElement||void 0}const _=n`:host{--n-command-menu-width:640px;--n-command-menu-top:16%;--n-command-menu-height:290px}.n-modal{display:none;position:fixed;pointer-events:none;z-index:var(--n-index-modal);inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;overflow:auto}.n-modal.n-visible{display:block}.n-modal-content{position:relative;pointer-events:all;inset-block-start:var(--n-command-menu-top);margin:auto;display:flex;flex-direction:column;min-inline-size:0;background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-modal);max-inline-size:var(--n-command-menu-width);overflow:hidden}.n-bump{animation:zoom-in-zoom-out var(--n-transition-slowly)}@keyframes zoom-in-zoom-out{0%{transform:translateY(-10px) scale(.97);opacity:0}100%{transform:translateY(0) scale(1.0001);opacity:1}}.n-modal-footer{display:flex;gap:var(--n-space-s);padding:var(--n-space-s) var(--n-space-m);font-size:calc(var(--n-font-size-s) - 1px);color:var(--n-color-text-weaker)}.n-help{display:flex;align-items:center;gap:2px}.n-help+.n-help{padding-inline-start:var(--n-space-s);border-inline-start:1px solid var(--n-color-border-strong)}.n-help nord-icon{--n-icon-size:10px;color:currentColor;margin:3px 4px}.n-help.n-backspace nord-icon{--n-icon-size:12px}.n-search-wrapper{display:flex;border-block-end:1px solid var(--n-color-border)}[role=combobox]{flex:1;font-size:var(--n-font-size-l);font-weight:var(--n-font-weight);font-family:inherit;background:0 0;color:var(--n-color-text);border:none;border-radius:0;appearance:none;outline:0;margin:0;padding:var(--n-space-m)}[role=combobox]::-webkit-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-moz-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-ms-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=listbox]{max-block-size:var(--n-command-menu-height);overflow:auto;margin:0;padding:0}.n-group-header{line-height:var(--n-line-height);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-s)/ 1.4) var(--n-space-m);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:var(--n-font-size-s);background:var(--n-color-surface-raised);font-weight:var(--n-font-weight-active);color:var(--n-color-text-weaker)}.n-command-empty{display:flex;flex:1;flex-direction:column;border-inline-start:2px solid transparent;align-items:flex-start;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command-empty .n-title{flex:1;margin-block-start:var(--n-space-s);margin-inline-end:calc(var(--n-space-s)/ 2);max-inline-size:100%;font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-command-empty .n-tip{flex:1;margin-block-start:var(--n-space-s);margin-block-end:var(--n-space-m);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker)}`;x.registerIcon(z),x.registerIcon(C),x.registerIcon(j);let E=class extends(e(i)){constructor(){super(...arguments),this.inputRef=p(),this.listRef=p(),this.dismissController=new b(this,{isOpen:()=>this.open,onDismiss:()=>this.close()}),this.keyboardController=new g(this,{trigger:()=>this.select(),goBack:()=>this.goBack(),end:()=>this.end(),start:()=>this.start(),next:()=>this.next(),previous:()=>this.previous(),toggleOpen:()=>this.toggleOpen()}),this.open=!1,this.placeholder="Type a command or search...",this.commands=[],this.search="",this.bump=!0,this.selectedIndex=0,this.filteredCommands=[]}get selected(){return this.filteredCommands[this.selectedIndex]}show(e={}){this.open=!0,this.setParent(e.parent),this.dispatchEvent(new f("open"))}close(){var e;this.open=!1,null===(e=this.previousFocus)||void 0===e||e.focus(),this.previousFocus=void 0,this.dispatchEvent(new f("close"))}toggleOpen(){this.open?this.close():this.show()}focus(){var e;null===(e=this.inputRef.value)||void 0===e||e.focus()}willUpdate(e){e.has("commands")&&this.keyboardController.registerCommandShortcuts(),e.has("open")&&this.open&&(this.bump=!0),(e.has("search")||e.has("parent")||e.has("commands"))&&this.filterCommands()}updated(e){e.has("open")&&this.open&&(this.previousFocus=I(document),this.focus(),this.listRef.value&&(this.listRef.value.scrollTop=0))}render(){var e;const o=u(this.filteredCommands,"section"),t=0===this.filteredCommands.length?"no-results":null===(e=this.selected)||void 0===e?void 0:e.id;return s`<div class="${h({"n-visible":this.open,"n-modal":!0})}"><div @animationend="${this.handleAnimationEnd}" class="${h({"n-bump":this.bump,"n-modal-content":!0})}"><div class="n-search-wrapper"><nord-visually-hidden id="instructions">Press 'Enter' to confirm your input or 'Escape' to cancel</nord-visually-hidden><input type="text" id="search" @input="${this.handleInput}" @blur="${this.handleBlur}" ${m(this.inputRef)} placeholder="${this.placeholder}" .value="${this.search}" spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Type the name of a command to run." aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-controls="list" aria-expanded="true" aria-activedescendant="${v(t)}" aria-describedby="instructions"></div><div class="n-modal-body"><div id="list" ${m(this.listRef)} role="listbox">${0===this.filteredCommands.length?this.renderNoResults():Array.from(o,(([e,o])=>this.renderSection(e,o)))}</div></div><slot name="footer"><div class="n-modal-footer" slot="footer"><span class="n-help"><nord-icon label="Arrow keys" name="${k}"></nord-icon>Navigate</span> <span class="n-help"><nord-icon label="Enter key" name="${"keyboard-return"}"></nord-icon>Select</span> <span class="n-help">Esc to dismiss</span> <span class="n-help n-backspace"><nord-icon label="Backspace key" name="${$}"></nord-icon>Move to parent</span></div></slot></div></div>`}renderNoResults(){return s`<div id="no-results" class="n-command-empty" role="option" aria-selected="true"><div class="n-title">No results for “${this.search}”</div><div class="n-tip">Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.</div></div>`}renderSection(e,o){const t=`section-${e}`;return s`<div role="group" aria-labelledby="${v(e?t:void 0)}">${e?s`<div class="n-group-header" role="presentation" id="${v(t)}">${e}</div>`:r} ${d(o,(e=>e.id),(e=>{var o,t;return s`<nord-command-menu-action id="${e.id}" .command="${e}" ?selected="${e.id===(null===(o=this.selected)||void 0===o?void 0:o.id)}" @click="${()=>this.select(e)}" role="option" aria-selected="${v(e.id===(null===(t=this.selected)||void 0===t?void 0:t.id)||void 0)}"></nord-command-menu-action>`}))}</div>`}handleAnimationEnd(){this.bump=!1}handleBlur(){this.open&&this.focus()}handleInput(e){const o=e.target;this.setSearch(o.value)}select(e=this.selected){var o;this.commands.some((o=>o.parent===e.id))?(this.setParent(e.id),this.bump=!0,this.focus()):this.close(),this.setSearch(""),null===(o=e.handler)||void 0===o||o.call(e,this);const t=new w(e);this.dispatchEvent(t)}start(){this.selectedIndex=0}end(){this.selectedIndex=this.filteredCommands.length-1}next(){this.selectedIndex=c(this.selectedIndex+1,0,this.filteredCommands.length-1)}previous(){this.selectedIndex=c(this.selectedIndex-1,0,this.filteredCommands.length-1)}goBack(){if(!this.search&&this.parent){const e=this.commands.find((e=>e.id===this.parent));this.setParent(null==e?void 0:e.parent)}}setParent(e){this.parent=e,this.setSearch("")}setSearch(e){this.search=e,this.selectedIndex=0}filterCommands(){const e=this.search.toLocaleLowerCase().split(/\s+/);this.filteredCommands=this.commands.filter((({title:o,keywords:t="",parent:n})=>{const s=`${o} ${t}`.toLocaleLowerCase(),r=e.every((e=>s.includes(e)));return(!this.parent&&this.search||n===this.parent)&&r}))}};E.styles=[y,_],o([a({type:Boolean})],E.prototype,"open",void 0),o([a({type:String})],E.prototype,"placeholder",void 0),o([a({type:Array,attribute:!1})],E.prototype,"commands",void 0),o([l()],E.prototype,"parent",void 0),o([l()],E.prototype,"search",void 0),o([l()],E.prototype,"bump",void 0),o([l()],E.prototype,"selectedIndex",void 0),o([l()],E.prototype,"filteredCommands",void 0),E=o([t("nord-command-menu")],E);var L=E;export{L as default};
//# sourceMappingURL=CommandMenu.js.map

@@ -1,2 +0,2 @@

import{_ as e,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,s as r,$ as t,w as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{o as s}from"./class-map-df701775.js";import c from"./Icon.js";import"./VisuallyHidden.js";import"./directive-de55b00a.js";import"./state-70f38ceb.js";import"./if-defined-f6a18fde.js";import"./unsafe-html-7493c929.js";var l=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="m38.5 7 60.9 58.044a7 7 0 0 1 0 9.912L38.5 133" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"/></svg>',title:"arrow-right",tags:"nordicon arrow right caret pointing triangle chevron"});var d=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(14,0,0,14,0,0)"><path d="M0.5 3L3 3 6.5 7 9.5 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.5 3L9.5 3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>',title:"keyboard-option",tags:"nordicon keyboard option key shortcut"});const m=n`:host{display:flex}.n-command{display:flex;flex:1;border-inline-start:2px solid transparent;align-items:center;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command.n-selected,.n-command:hover{cursor:pointer;background-color:var(--n-color-active)}.n-command.n-selected{border-inline-start-color:var(--n-color-primary)}nord-icon{color:var(--n-color-icon)}.n-command-icon{margin-inline-start:2px;margin-inline-end:calc(var(--n-space-s) * 1.4);line-height:var(--n-line-height-tight)}.n-selected .n-command-icon nord-icon{color:var(--n-color-icon-hover)}.n-title{flex:1;margin-inline-end:calc(var(--n-space-s)/ 2);font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-hotkeys{display:flex;gap:calc(var(--n-space-s)/ 2)}.n-hotkey{padding:calc(var(--n-space-s)/ 4) calc(var(--n-space-s)/ 3);text-transform:capitalize;font-size:var(--n-font-size-xs);border:1px solid var(--n-color-border-strong);font-weight:var(--n-font-weight);box-shadow:var(--n-box-shadow);border-radius:var(--n-border-radius-s);color:var(--n-color-icon);background:var(--n-color-button);line-height:var(--n-line-height-tight);min-inline-size:var(--n-space-s);display:inline-flex;align-items:center;justify-content:center;user-select:none}`,p=/(?:Key|Digit)([A-Z0-9])/g;c.registerIcon(l),c.registerIcon(d);let v=class extends r{constructor(){super(...arguments),this.selected=!1}ensureInView(){requestAnimationFrame((()=>this.scrollIntoView({block:"nearest"})))}updated(e){e.has("selected")&&this.selected&&this.ensureInView()}render(){var e;return t`<div class="${s({"n-selected":this.selected,"n-command":!0})}"><div aria-hidden="true" class="n-command-icon"><nord-icon size="s" name="${null!==(e=this.command.icon)&&void 0!==e?e:"arrow-right"}"></nord-icon></div><div class="n-title">${this.command.title}</div>${this.renderShortcut()}</div>`}renderShortcut(){if(!this.command.hotkey)return i;const e=this.command.hotkey.replace(p,"$1");return t`<nord-visually-hidden>, ${e}</nord-visually-hidden><div aria-hidden="true" class="n-hotkeys">${e.split("+").map((e=>t`<div class="n-hotkey">${"alt"===e.toLowerCase()&&navigator.platform.indexOf("Mac")>-1?t`<nord-icon name="${"keyboard-option"}" size="s"></nord-icon>`:e}</div>`))}</div>`}};v.styles=m,e([a({type:Object})],v.prototype,"command",void 0),e([a({type:Boolean})],v.prototype,"selected",void 0),v=e([o("nord-command-menu-action")],v);var h=v;export{h as default};
import{_ as e,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r,s as n,$ as t,w as i}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{o as s}from"./class-map-df701775.js";import c from"./Icon.js";import"./VisuallyHidden.js";import"./directive-de55b00a.js";import"./state-70f38ceb.js";import"./if-defined-f6a18fde.js";import"./unsafe-html-7493c929.js";import"./Component-a6208841.js";var l=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="m38.5 7 60.9 58.044a7 7 0 0 1 0 9.912L38.5 133" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="14"/></svg>',title:"arrow-right",tags:"nordicon arrow right caret pointing triangle chevron"});var d=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(14,0,0,14,0,0)"><path d="M0.5 3L3 3 6.5 7 9.5 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.5 3L9.5 3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>',title:"keyboard-option",tags:"nordicon keyboard option key shortcut"});const m=r`:host{display:flex}.n-command{display:flex;flex:1;border-inline-start:2px solid transparent;align-items:center;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command.n-selected,.n-command:hover{cursor:pointer;background-color:var(--n-color-active)}.n-command.n-selected{border-inline-start-color:var(--n-color-primary)}nord-icon{color:var(--n-color-icon)}.n-command-icon{margin-inline-start:2px;margin-inline-end:calc(var(--n-space-s) * 1.4);line-height:var(--n-line-height-tight)}.n-selected .n-command-icon nord-icon{color:var(--n-color-icon-hover)}.n-title{flex:1;margin-inline-end:calc(var(--n-space-s)/ 2);font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-shortcuts{display:flex;gap:calc(var(--n-space-s)/ 2)}.n-shortcut{padding:calc(var(--n-space-s)/ 4) calc(var(--n-space-s)/ 3);text-transform:capitalize;font-size:var(--n-font-size-xs);border:1px solid var(--n-color-border-strong);font-weight:var(--n-font-weight);box-shadow:var(--n-box-shadow);border-radius:var(--n-border-radius-s);color:var(--n-color-icon);background:var(--n-color-button);line-height:var(--n-line-height-tight);min-inline-size:var(--n-space-s);display:inline-flex;align-items:center;justify-content:center;user-select:none}`,p=/(?:Key|Digit)([A-Z0-9])/g;c.registerIcon(l),c.registerIcon(d);let v=class extends n{constructor(){super(...arguments),this.selected=!1}ensureInView(){requestAnimationFrame((()=>this.scrollIntoView({block:"nearest"})))}updated(e){e.has("selected")&&this.selected&&this.ensureInView()}render(){var e;return t`<div class="${s({"n-selected":this.selected,"n-command":!0})}"><div aria-hidden="true" class="n-command-icon"><nord-icon size="s" name="${null!==(e=this.command.icon)&&void 0!==e?e:"arrow-right"}"></nord-icon></div><div class="n-title">${this.command.title}</div>${this.renderShortcut()}</div>`}renderShortcut(){if(!this.command.shortcut)return i;const e=this.command.shortcut.replace(p,"$1");return t`<nord-visually-hidden>, ${e}</nord-visually-hidden><div aria-hidden="true" class="n-shortcuts">${e.split("+").map((e=>t`<div class="n-shortcut">${"alt"===e.toLowerCase()&&navigator.platform.indexOf("Mac")>-1?t`<nord-icon name="${"keyboard-option"}" size="s"></nord-icon>`:e}</div>`))}</div>`}};v.styles=m,e([a({type:Object})],v.prototype,"command",void 0),e([a({type:Boolean})],v.prototype,"selected",void 0),v=e([o("nord-command-menu-action")],v);var h=v;export{h as default};
//# sourceMappingURL=CommandMenuAction.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as a,$ as o,w as n,s}from"./lit-element-99571067.js";import{e as r}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{S as d,i as c,a as p}from"./Calendar-6776543a.js";import{o as h}from"./class-map-df701775.js";import{n as m}from"./ref-3b5a3bd2.js";import{l as u}from"./if-defined-f6a18fde.js";import{I as b,F as v}from"./InputMixin-367f0927.js";import{F as g}from"./FormAssociatedMixin-b460125c.js";import{k as f,p as y,a as x}from"./dates-ccf5a897.js";import{N as w}from"./events-731d0007.js";import"./Button.js";import"./Icon.js";import"./VisuallyHidden.js";import{s as k}from"./FormField-21cad3fa.js";import{s as z}from"./TextField-d925074c.js";import{isoAdapter as j}from"./date-adapter.js";import $ from"./date-localization.js";import{L as D}from"./LightDismissController-cc5b4bf2.js";import"./number-ca13a56f.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./tinykeys.module-84e6cc41.js";import"./calendar-localization.js";import"./month-view.js";import"./collection-f3631dc8.js";import"./DateSelectEvent.js";import"./SlotController-a18e9d36.js";import"./LightDomController-37815039.js";import"./unsafe-html-7493c929.js";import"./ShortcutController-93173ff4.js";const F=a`:host{--n-date-picker-color-overlay:rgba(0, 0, 0, 0.8);--n-date-picker-line-height:1.25;--n-date-picker-toggle-height:34px;color:var(--n-color-text);font-size:var(--n-font-size-m);position:relative}.n-input-container{inline-size:fit-content}:host([expand]) .n-input-container{inline-size:100%}.n-date-toggle{-webkit-appearance:none;appearance:none;min-block-size:var(--n-date-picker-toggle-height);border-start-end-radius:var(--n-border-radius-s);border-end-end-radius:var(--n-border-radius-s);box-shadow:var(--n-box-shadow),var(--n-box-shadow);padding:1px calc(var(--n-space-m)/ 1.5) 0;color:var(--n-color-icon);cursor:pointer;background:var(--n-color-button);position:absolute;inset-inline-end:1px;inset-block-start:1px;border:0;border-inline-start:1px solid var(--n-color-border-strong);transition:color var(--n-transition-slowly),background var(--n-transition-slowly)}@media (max-width:35.9375em){.n-date-toggle{padding-block-start:0}}.n-date-toggle:hover{color:var(--n-color-icon-hover)}.n-date-toggle:focus{border:0;box-shadow:0 0 0 2px var(--n-color-primary);outline:0}.n-date-toggle:active{opacity:.8}.n-date-toggle:disabled{box-shadow:none;background:0 0;border:0;color:var(--n-color-text-weakest);cursor:default}.n-date-toggle::after{content:"";position:absolute;background:0 0;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 50%,rgba(0,0,0,.013) 100%);background-repeat:repeat-x;inline-size:100%;inset-inline:0;block-size:100%;inset-block-start:0}.n-input{padding-inline-end:calc(var(--n-space-s) * 1.6 + var(--n-date-picker-toggle-height))}[role=dialog]{display:flex;font-feature-settings:var(--n-font-features-reduced);opacity:0;position:absolute;inset-block-start:100%;inset-inline-start:0;transform:scale(.98) translateZ(0) translateY(-10px);transform-origin:top right;transition:transform var(--n-transition-slowly),opacity var(--n-transition-slowly),visibility var(--n-transition-slowly);visibility:hidden;will-change:transform,opacity,visibility;z-index:var(--n-index-dropdown)}@media (max-width:35.9375em){[role=dialog]{inset-block:0;position:fixed;inline-size:100%;inset-inline-end:0;min-inline-size:320px;transform:translateZ(0);transform-origin:bottom center}.n-date-dialog-content{box-shadow:var(--n-box-shadow-modal)}}[role=dialog].is-left{inset-inline:auto 0;inline-size:auto}[role=dialog][aria-hidden=false]{transition-property:transform,opacity;opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.n-date-dialog-content{margin-inline-start:auto;margin-block-start:8px;position:relative;transform:none;z-index:var(--n-index-dropdown)}nord-calendar{box-shadow:var(--n-box-shadow-popup)}@media (max-width:35.9375em){.n-date-dialog-content{background:var(--n-color-background);border:0;border-radius:0;border-start-start-radius:var(--n-border-radius-s);border-start-end-radius:var(--n-border-radius-s);inset-block-end:0;inset-inline-start:0;inline-size:100%;margin:0;max-inline-size:none;min-block-size:26em;opacity:0;padding:0 8% 20px;position:absolute;transform:translateZ(0) translateY(100%);transition:transform .4s ease,opacity .4s ease,visibility .4s ease;visibility:hidden;will-change:transform,opacity,visibility}[role=dialog][aria-hidden=false] .n-date-dialog-content{opacity:1;transform:translateZ(0) translateY(0);visibility:visible}nord-calendar{--n-calendar-box-shadow:none;--n-calendar-padding:0}}.n-date-header{align-items:center;display:flex;justify-content:space-between;margin-block-end:16px;inline-size:100%}.n-date-mobile{align-items:center;border-block-end:1px solid rgba(0,0,0,.12);display:flex;justify-content:space-between;margin-block-end:20px;margin-inline-start:-10%;overflow:hidden;padding:12px 20px;position:relative;text-overflow:ellipsis;white-space:nowrap;inline-size:120%}@media (min-width:36em){.n-date-mobile{border:0;margin:0;overflow:visible;padding:0;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;inline-size:auto}}.n-date-mobile-heading{display:inline-block;font-size:var(--n-font-size-m);font-weight:var(--n-font-weight-active);max-inline-size:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width:36em){.n-date-mobile-heading{display:none}}.n-date-close{-webkit-appearance:none;align-items:center;appearance:none;background:var(--n-color-background);border:0;border-radius:var(--n-border-radius);color:var(--n-color-text);cursor:pointer;display:flex;block-size:var(--n-size-icon-l);inline-size:var(--n-size-icon-l);justify-content:center;padding:0;z-index:10}@media (min-width:36em){.n-date-close{opacity:0}}.n-date-close:focus{box-shadow:0 0 0 2px var(--n-color-primary);outline:0}@media (min-width:36em){.n-date-close:focus{opacity:1}}.n-date-close svg{margin:0 auto}`,A=/[^0-9./-]+/g,E=()=>!1;let L=class extends(g(b(v(e(s))))){constructor(){super(...arguments),this.dismiss=new D(this,{isOpen:()=>this.open,onDismiss:e=>this.hide("click"!==e.type),isDismissible:e=>e!==this.calendar&&e!==this.toggleButton}),this.swipe=new d(this,{target:()=>this.dialog,matchesGesture:c,onSwipeEnd:()=>this.hide(!1)}),this.open=!1,this.value="",this.min="",this.max="",this.direction="right",this.firstDayOfWeek=1,this.localization=$,this.dateAdapter=j,this.isDateDisabled=E,this.handleDaySelect=e=>{this.setValue(e.date),this.hide()},this.toggleOpen=e=>{e.preventDefault(),this.open?this.hide(!1):this.show()},this.handleBlur=e=>{e.stopPropagation(),this.dispatchEvent(new w("blur"))},this.handleFocus=e=>{e.stopPropagation(),this.dispatchEvent(new w("focus"))},this.handleInputChange=e=>{const t=e.target;!function(e,t){const{value:i}=e,a=e.selectionStart,o=i.slice(0,a),n=i.slice(a,i.length),s=o.replace(t,""),r=s+n.replace(t,""),l=s.length;e.value=r,e.selectionStart=l,e.selectionEnd=l}(t,A),this.dispatchEvent(new w("input"));const i=this.dateAdapter.parse(t.value,f);(i||""===t.value)&&this.setValue(i)}}get valueAsDate(){return y(this.value)}set valueAsDate(e){this.value=e?x(e):""}get valueAsNumber(){var e,t;return null!==(t=null===(e=this.valueAsDate)||void 0===e?void 0:e.getTime())&&void 0!==t?t:NaN}set valueAsNumber(e){this.value=e?x(new Date(e)):""}show(){this.open=!0,this.dispatchEvent(new w("open")),this.updateComplete.then((()=>this.calendar.focus({target:"month"})))}hide(e=!0){this.open=!1,this.dispatchEvent(new w("close")),e&&this.toggleButton.focus()}willUpdate(e){e.has("localization")&&this.createDateFormatters()}createDateFormatters(){this.dateFormatLong=new Intl.DateTimeFormat(this.localization.locale,{day:"numeric",month:"long",year:"numeric"})}render(){const{valueAsDate:e}=this,t=e?this.dateAdapter.format(e):"";return o`${this.renderLabel()}<div class="n-input-container"><input class="n-input" name="${this.name}" .value="${t}" placeholder="${u(this.placeholder)}" id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" aria-autocomplete="none" @input="${this.handleInputChange}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" autocomplete="off" ${m(this.focusableRef)} aria-invalid="${u(this.error?"true":void 0)}" aria-describedby="${u(this.getDescribedBy())}"> <button class="n-date-toggle" @click="${this.toggleOpen}" ?disabled="${this.disabled}" type="button"><nord-icon name="interface-calendar" size="s"></nord-icon><nord-visually-hidden>${$.buttonLabel} ${e?o`<span>, ${$.selectedDateMessage} ${this.dateFormatLong.format(e)}</span>`:n}</nord-visually-hidden></button></div>${this.renderError()}<div class="${h({"is-left":"left"===this.direction,"is-active":this.open})}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dialog-header"><div class="n-date-dialog-content"><div aria-hidden="true" tabindex="0" @focus="${this.focusLast}"></div><div class="n-date-mobile"><div class="n-date-mobile-heading" id="dialog-header">${this.localization.calendarHeading}</div><button class="n-date-close" @click="${this.hide}" type="button"><nord-icon color="var(--n-color-icon)" name="interface-close-small" size="xs"></nord-icon><nord-visually-hidden>${this.localization.closeLabel}</nord-visually-hidden></button></div><nord-calendar value="${this.value}" min="${this.min}" max="${this.max}" .localization="${this.localization}" .firstDayOfWeek="${this.firstDayOfWeek}" .isDateDisabled="${this.isDateDisabled}" @nord-select="${this.handleDaySelect}"></nord-calendar><div aria-hidden="true" tabindex="0" @focus="${this.focusFirst}"></div></div></div>`}focusFirst(){this.closeButton.focus()}focusLast(){this.calendar.focus({target:"day"})}setValue(e){this.value=e?x(e):"",this.dispatchEvent(new w("change"))}};L.styles=[k,z,F],t([p(".n-date-toggle",!0)],L.prototype,"toggleButton",void 0),t([p(".n-date-close",!0)],L.prototype,"closeButton",void 0),t([p("nord-calendar",!0)],L.prototype,"calendar",void 0),t([p('[role="dialog"]',!0)],L.prototype,"dialog",void 0),t([l()],L.prototype,"open",void 0),t([r()],L.prototype,"value",void 0),t([r()],L.prototype,"min",void 0),t([r()],L.prototype,"max",void 0),t([r()],L.prototype,"direction",void 0),t([r({attribute:"first-day-of-week",type:Number})],L.prototype,"firstDayOfWeek",void 0),t([r({attribute:!1})],L.prototype,"localization",void 0),t([r({attribute:!1})],L.prototype,"dateAdapter",void 0),t([r({attribute:!1})],L.prototype,"isDateDisabled",void 0),L=t([i("nord-date-picker")],L);var B=L;export{B as default};
import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as a,$ as o,w as n,s}from"./lit-element-99571067.js";import{e as r}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{S as d,i as c,a as p}from"./Calendar-d6be720e.js";import{o as h}from"./class-map-df701775.js";import{n as m}from"./ref-3b5a3bd2.js";import{l as u}from"./if-defined-f6a18fde.js";import{I as b,F as v}from"./InputMixin-f2da5fa8.js";import{F as g}from"./FormAssociatedMixin-b460125c.js";import{k as f,p as y,a as x}from"./dates-ccf5a897.js";import{N as w}from"./events-731d0007.js";import"./Button.js";import"./Icon.js";import"./VisuallyHidden.js";import{s as k}from"./FormField-21cad3fa.js";import{s as z}from"./TextField-d925074c.js";import{isoAdapter as j}from"./date-adapter.js";import $ from"./date-localization.js";import{L as D}from"./LightDismissController-cc5b4bf2.js";import"./number-ca13a56f.js";import"./directive-de55b00a.js";import"./directive-helpers-f86e6d16.js";import"./tinykeys.module-84e6cc41.js";import"./calendar-localization.js";import"./month-view.js";import"./collection-f3631dc8.js";import"./DateSelectEvent.js";import"./Component-a6208841.js";import"./SlotController-a18e9d36.js";import"./LightDomController-37815039.js";import"./unsafe-html-7493c929.js";import"./ShortcutController-93173ff4.js";const F=a`:host{--n-date-picker-color-overlay:rgba(0, 0, 0, 0.8);--n-date-picker-line-height:1.25;--n-date-picker-toggle-height:34px;color:var(--n-color-text);font-size:var(--n-font-size-m);position:relative}.n-input-container{inline-size:fit-content}:host([expand]) .n-input-container{inline-size:100%}.n-date-toggle{-webkit-appearance:none;appearance:none;min-block-size:var(--n-date-picker-toggle-height);border-start-end-radius:var(--n-border-radius-s);border-end-end-radius:var(--n-border-radius-s);box-shadow:var(--n-box-shadow),var(--n-box-shadow);padding:1px calc(var(--n-space-m)/ 1.5) 0;color:var(--n-color-icon);cursor:pointer;background:var(--n-color-button);position:absolute;inset-inline-end:1px;inset-block-start:1px;border:0;border-inline-start:1px solid var(--n-color-border-strong);transition:color var(--n-transition-slowly),background var(--n-transition-slowly)}@media (max-width:35.9375em){.n-date-toggle{padding-block-start:0}}.n-date-toggle:hover{color:var(--n-color-icon-hover)}.n-date-toggle:focus{border:0;box-shadow:0 0 0 2px var(--n-color-primary);outline:0}.n-date-toggle:active{opacity:.8}.n-date-toggle:disabled{box-shadow:none;background:0 0;border:0;color:var(--n-color-text-weakest);cursor:default}.n-date-toggle::after{content:"";position:absolute;background:0 0;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 50%,rgba(0,0,0,.013) 100%);background-repeat:repeat-x;inline-size:100%;inset-inline:0;block-size:100%;inset-block-start:0}.n-input{padding-inline-end:calc(var(--n-space-s) * 1.6 + var(--n-date-picker-toggle-height))}[role=dialog]{display:flex;font-feature-settings:var(--n-font-features-reduced);opacity:0;position:absolute;inset-block-start:100%;inset-inline-start:0;transform:scale(.98) translateZ(0) translateY(-10px);transform-origin:top right;transition:transform var(--n-transition-slowly),opacity var(--n-transition-slowly),visibility var(--n-transition-slowly);visibility:hidden;will-change:transform,opacity,visibility;z-index:var(--n-index-dropdown)}@media (max-width:35.9375em){[role=dialog]{inset-block:0;position:fixed;inline-size:100%;inset-inline-end:0;min-inline-size:320px;transform:translateZ(0);transform-origin:bottom center}.n-date-dialog-content{box-shadow:var(--n-box-shadow-modal)}}[role=dialog].is-left{inset-inline:auto 0;inline-size:auto}[role=dialog][aria-hidden=false]{transition-property:transform,opacity;opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.n-date-dialog-content{margin-inline-start:auto;margin-block-start:8px;position:relative;transform:none;z-index:var(--n-index-dropdown)}nord-calendar{box-shadow:var(--n-box-shadow-popup)}@media (max-width:35.9375em){.n-date-dialog-content{background:var(--n-color-background);border:0;border-radius:0;border-start-start-radius:var(--n-border-radius-s);border-start-end-radius:var(--n-border-radius-s);inset-block-end:0;inset-inline-start:0;inline-size:100%;margin:0;max-inline-size:none;min-block-size:26em;opacity:0;padding:0 8% 20px;position:absolute;transform:translateZ(0) translateY(100%);transition:transform .4s ease,opacity .4s ease,visibility .4s ease;visibility:hidden;will-change:transform,opacity,visibility}[role=dialog][aria-hidden=false] .n-date-dialog-content{opacity:1;transform:translateZ(0) translateY(0);visibility:visible}nord-calendar{--n-calendar-box-shadow:none;--n-calendar-padding:0}}.n-date-header{align-items:center;display:flex;justify-content:space-between;margin-block-end:16px;inline-size:100%}.n-date-mobile{align-items:center;border-block-end:1px solid rgba(0,0,0,.12);display:flex;justify-content:space-between;margin-block-end:20px;margin-inline-start:-10%;overflow:hidden;padding:12px 20px;position:relative;text-overflow:ellipsis;white-space:nowrap;inline-size:120%}@media (min-width:36em){.n-date-mobile{border:0;margin:0;overflow:visible;padding:0;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;inline-size:auto}}.n-date-mobile-heading{display:inline-block;font-size:var(--n-font-size-m);font-weight:var(--n-font-weight-active);max-inline-size:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width:36em){.n-date-mobile-heading{display:none}}.n-date-close{-webkit-appearance:none;align-items:center;appearance:none;background:var(--n-color-background);border:0;border-radius:var(--n-border-radius);color:var(--n-color-text);cursor:pointer;display:flex;block-size:var(--n-size-icon-l);inline-size:var(--n-size-icon-l);justify-content:center;padding:0;z-index:10}@media (min-width:36em){.n-date-close{opacity:0}}.n-date-close:focus{box-shadow:0 0 0 2px var(--n-color-primary);outline:0}@media (min-width:36em){.n-date-close:focus{opacity:1}}.n-date-close svg{margin:0 auto}`,A=/[^0-9./-]+/g,C=()=>!1;let E=class extends(g(b(v(e(s))))){constructor(){super(...arguments),this.dismiss=new D(this,{isOpen:()=>this.open,onDismiss:e=>this.hide("click"!==e.type),isDismissible:e=>e!==this.calendar&&e!==this.toggleButton}),this.swipe=new d(this,{target:()=>this.dialog,matchesGesture:c,onSwipeEnd:()=>this.hide(!1)}),this.open=!1,this.value="",this.min="",this.max="",this.direction="right",this.firstDayOfWeek=1,this.localization=$,this.dateAdapter=j,this.isDateDisabled=C,this.handleDaySelect=e=>{this.setValue(e.date),this.hide()},this.toggleOpen=e=>{e.preventDefault(),this.open?this.hide(!1):this.show()},this.handleBlur=e=>{e.stopPropagation(),this.dispatchEvent(new w("blur"))},this.handleFocus=e=>{e.stopPropagation(),this.dispatchEvent(new w("focus"))},this.handleInputChange=e=>{const t=e.target;!function(e,t){const{value:i}=e,a=e.selectionStart,o=i.slice(0,a),n=i.slice(a,i.length),s=o.replace(t,""),r=s+n.replace(t,""),l=s.length;e.value=r,e.selectionStart=l,e.selectionEnd=l}(t,A),this.dispatchEvent(new w("input"));const i=this.dateAdapter.parse(t.value,f);(i||""===t.value)&&this.setValue(i)}}get valueAsDate(){return y(this.value)}set valueAsDate(e){this.value=e?x(e):""}get valueAsNumber(){var e,t;return null!==(t=null===(e=this.valueAsDate)||void 0===e?void 0:e.getTime())&&void 0!==t?t:NaN}set valueAsNumber(e){this.value=e?x(new Date(e)):""}show(){this.open=!0,this.dispatchEvent(new w("open")),this.updateComplete.then((()=>this.calendar.focus({target:"month"})))}hide(e=!0){this.open=!1,this.dispatchEvent(new w("close")),e&&this.toggleButton.focus()}willUpdate(e){e.has("localization")&&this.createDateFormatters()}createDateFormatters(){this.dateFormatLong=new Intl.DateTimeFormat(this.localization.locale,{day:"numeric",month:"long",year:"numeric"})}render(){const{valueAsDate:e}=this,t=e?this.dateAdapter.format(e):"";return o`${this.renderLabel()}<div class="n-input-container"><input class="n-input" name="${this.name}" .value="${t}" placeholder="${u(this.placeholder)}" id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" aria-autocomplete="none" @input="${this.handleInputChange}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" autocomplete="off" ${m(this.focusableRef)} aria-invalid="${u(this.error?"true":void 0)}" aria-describedby="${u(this.getDescribedBy())}"> <button class="n-date-toggle" @click="${this.toggleOpen}" ?disabled="${this.disabled}" type="button"><nord-icon name="interface-calendar" size="s"></nord-icon><nord-visually-hidden>${$.buttonLabel} ${e?o`<span>, ${$.selectedDateMessage} ${this.dateFormatLong.format(e)}</span>`:n}</nord-visually-hidden></button></div>${this.renderError()}<div class="${h({"is-left":"left"===this.direction,"is-active":this.open})}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dialog-header"><div class="n-date-dialog-content"><div aria-hidden="true" tabindex="0" @focus="${this.focusLast}"></div><div class="n-date-mobile"><div class="n-date-mobile-heading" id="dialog-header">${this.localization.calendarHeading}</div><button class="n-date-close" @click="${this.hide}" type="button"><nord-icon color="var(--n-color-icon)" name="interface-close-small" size="xs"></nord-icon><nord-visually-hidden>${this.localization.closeLabel}</nord-visually-hidden></button></div><nord-calendar value="${this.value}" min="${this.min}" max="${this.max}" .localization="${this.localization}" .firstDayOfWeek="${this.firstDayOfWeek}" .isDateDisabled="${this.isDateDisabled}" @nord-select="${this.handleDaySelect}"></nord-calendar><div aria-hidden="true" tabindex="0" @focus="${this.focusFirst}"></div></div></div>`}focusFirst(){this.closeButton.focus()}focusLast(){this.calendar.focus({target:"day"})}setValue(e){this.value=e?x(e):"",this.dispatchEvent(new w("change"))}};E.styles=[k,z,F],t([p(".n-date-toggle",!0)],E.prototype,"toggleButton",void 0),t([p(".n-date-close",!0)],E.prototype,"closeButton",void 0),t([p("nord-calendar",!0)],E.prototype,"calendar",void 0),t([p('[role="dialog"]',!0)],E.prototype,"dialog",void 0),t([l()],E.prototype,"open",void 0),t([r()],E.prototype,"value",void 0),t([r()],E.prototype,"min",void 0),t([r()],E.prototype,"max",void 0),t([r()],E.prototype,"direction",void 0),t([r({attribute:"first-day-of-week",type:Number})],E.prototype,"firstDayOfWeek",void 0),t([r({attribute:!1})],E.prototype,"localization",void 0),t([r({attribute:!1})],E.prototype,"dateAdapter",void 0),t([r({attribute:!1})],E.prototype,"isDateDisabled",void 0),E=t([i("nord-date-picker")],E);var L=E;export{L as default};
//# sourceMappingURL=DatePicker.js.map

@@ -1,2 +0,2 @@

import{D as r,_ as t,n as e}from"./DraftComponentMixin-1d7c27bc.js";import{r as o,$ as s,w as i,s as n}from"./lit-element-99571067.js";import{e as l}from"./property-03f59dce.js";import{l as a}from"./if-defined-f6a18fde.js";import{S as d}from"./SlotController-a18e9d36.js";import{s as h}from"./FormField-21cad3fa.js";const p=o`fieldset{border:none}`;let f=class extends(r(n)){constructor(){super(...arguments),this.errorSlot=new d(this,"error"),this.hintSlot=new d(this,"hint"),this.label=""}render(){const{hasError:r}=this;return s`<fieldset aria-invalid="${a(r?"true":void 0)}" aria-describedby="${a(r?"error":void 0)}"><legend class="n-label-container"><slot class="n-label" name="label">${this.label}</slot>${this.renderHint()}</legend><slot></slot>${this.renderError()}</fieldset>`}renderHint(){return this.hasHint?s`<div class="n-caption n-hint"><slot name="hint">${this.hint}</slot></div>`:i}renderError(){return this.hasError?s`<div class="n-caption n-error" id="error" role="alert"><slot name="error">${this.error}</slot></div>`:i}get hasHint(){return null!=this.hint||this.hintSlot.hasContent}get hasError(){return null!=this.error||this.errorSlot.hasContent}};f.styles=[h,p],t([l()],f.prototype,"label",void 0),t([l()],f.prototype,"hint",void 0),t([l()],f.prototype,"error",void 0),f=t([e("nord-fieldset")],f);var m=f;export{m as default};
import{D as r,_ as t,n as e}from"./DraftComponentMixin-1d7c27bc.js";import{r as o,$ as s,w as i,s as n}from"./lit-element-99571067.js";import{e as l}from"./property-03f59dce.js";import{l as a}from"./if-defined-f6a18fde.js";import{S as d}from"./SlotController-a18e9d36.js";import{s as h}from"./FormField-21cad3fa.js";const c=o`fieldset{border:none}.n-label-container{margin-block-end:var(--n-space-s)}`;let p=class extends(r(n)){constructor(){super(...arguments),this.errorSlot=new d(this,"error"),this.hintSlot=new d(this,"hint"),this.label=""}render(){const{hasError:r}=this;return s`<fieldset aria-invalid="${a(r?"true":void 0)}" aria-describedby="${a(r?"error":void 0)}"><legend class="n-label-container"><slot class="n-label" name="label">${this.label}</slot>${this.renderHint()}</legend><slot></slot>${this.renderError()}</fieldset>`}renderHint(){return this.hasHint?s`<div class="n-caption n-hint"><slot name="hint">${this.hint}</slot></div>`:i}renderError(){return this.hasError?s`<div class="n-caption n-error" id="error" role="alert"><slot name="error">${this.error}</slot></div>`:i}get hasHint(){return null!=this.hint||this.hintSlot.hasContent}get hasError(){return null!=this.error||this.errorSlot.hasContent}};p.styles=[h,c],t([l()],p.prototype,"label",void 0),t([l()],p.prototype,"hint",void 0),t([l()],p.prototype,"error",void 0),p=t([e("nord-fieldset")],p);var m=p;export{m as default};
//# sourceMappingURL=Fieldset.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as a,n as r}from"./DraftComponentMixin-1d7c27bc.js";import{r as o,$ as t,w as n,s}from"./lit-element-99571067.js";import{S as i}from"./SlotController-a18e9d36.js";const l=o`:host{all:unset;display:block;font-family:var(--n-font-family);line-height:var(--n-line-height);font-feature-settings:var(--n-font-features-reduced)}*,::after,::before{box-sizing:border-box}::slotted(*){margin:0!important}.n-header,.n-header-actions{display:flex;flex-flow:row wrap;align-items:center;gap:var(--n-space-m)}.n-header{padding:var(--n-space-m) var(--n-space-l);background-color:var(--n-color-surface);border-block-end:1px solid var(--n-color-border);box-shadow:var(--n-box-shadow-header)}.n-header-actions{margin-inline-start:auto;gap:var(--n-space-s)}`;let d=class extends(e(s)){constructor(){super(...arguments),this.actionSlot=new i(this,"action")}render(){return t`<header class="n-header"><slot></slot>${this.actionSlot.hasContent?t`<div class="n-header-actions"><slot name="action"></slot></div>`:n}</header>`}};d.styles=l,d=a([r("nord-header")],d);var c=d;export{c as default};
import{D as o,_ as a,n as e}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as t,w as n,s}from"./lit-element-99571067.js";import{S as l}from"./SlotController-a18e9d36.js";import{s as i}from"./Component-a6208841.js";const d=r`:host{font-size:var(--n-font-size-m);color:var(--n-color-text)}::slotted(*){margin:0!important}.n-header,.n-header-actions{display:flex;flex-flow:row wrap;align-items:center;gap:var(--n-space-m)}.n-header{padding:var(--n-space-m) var(--n-space-l);background-color:var(--n-color-surface);border-block-end:1px solid var(--n-color-border);box-shadow:var(--n-box-shadow-header)}.n-header-actions{margin-inline-start:auto;gap:var(--n-space-s)}`;let c=class extends(o(s)){constructor(){super(...arguments),this.actionSlot=new l(this,"action")}render(){return t`<header class="n-header"><slot></slot>${this.actionSlot.hasContent?t`<div class="n-header-actions"><slot name="action"></slot></div>`:n}</header>`}};c.styles=[i,d],c=a([e("nord-header")],c);var m=c;export{m as default};
//# sourceMappingURL=Header.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as s,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as t,$ as o,s as r}from"./lit-element-99571067.js";import{e as n}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{l as a}from"./if-defined-f6a18fde.js";import{o as c}from"./unsafe-html-7493c929.js";import"./directive-de55b00a.js";const d=t`:host{--n-icon-size:var(--n-size-icon-m);all:unset;display:inline-block;block-size:var(--n-icon-size);inline-size:var(--n-icon-size);line-height:var(--n-line-height)}*,::after,::before{box-sizing:border-box;margin:0;padding:0}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-icon{display:block}svg{display:block}`;var h;let v=h=class extends(e(r)){constructor(){super(...arguments),this.name="",this.size="m",this.svg=""}static registerResolver(e){h.resolver=e}static registerIcon(e,s){let i,t;if("string"==typeof e?(i=e,t=s):(i=e.title,t=e.default),!i)throw new Error("name is required when registering an icon");if(!t)throw new Error("icon must not be empty");h.registeredIcons.has(i)||h.registeredIcons.set(i,t)}willUpdate(e){if(!e.has("name"))return;const s=this.resolve();"string"==typeof s?this.svg=s:s.then((e=>{this.svg=e})).catch((()=>{this.svg=""}))}render(){return o`<div role="${a(this.label?"img":void 0)}" aria-label="${a(this.label)}"><slot style="${a(this.color?`color:${this.color}`:void 0)}" aria-hidden="true">${c(this.svg)}</slot></div>`}resolve(){return this.name?h.registeredIcons.has(this.name)?h.registeredIcons.get(this.name):h.resolver(this.name):""}};v.styles=d,v.resolver=e=>fetch(`https://nordcdn.net/ds/icons/1.3.1/assets/${e}.svg`).then((e=>e.text())),v.registeredIcons=new Map,s([n({reflect:!0})],v.prototype,"name",void 0),s([n({reflect:!0})],v.prototype,"size",void 0),s([n({reflect:!0})],v.prototype,"color",void 0),s([n({reflect:!0})],v.prototype,"label",void 0),s([l()],v.prototype,"svg",void 0),v=h=s([i("nord-icon")],v);var p=v;export{p as default};
import{D as e,_ as s,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as t,$ as o,s as r}from"./lit-element-99571067.js";import{e as n}from"./property-03f59dce.js";import{t as c}from"./state-70f38ceb.js";import{l}from"./if-defined-f6a18fde.js";import{o as a}from"./unsafe-html-7493c929.js";import{s as d}from"./Component-a6208841.js";import"./directive-de55b00a.js";const h=t`:host{--n-icon-size:var(--n-size-icon-m);display:inline-block;block-size:var(--n-icon-size);inline-size:var(--n-icon-size)}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-icon{display:block}svg{display:block}`;var v;let p=v=class extends(e(r)){constructor(){super(...arguments),this.name="",this.size="m",this.svg=""}static registerResolver(e){v.resolver=e}static registerIcon(e,s){let i,t;if("string"==typeof e?(i=e,t=s):(i=e.title,t=e.default),!i)throw new Error("name is required when registering an icon");if(!t)throw new Error("icon must not be empty");v.registeredIcons.has(i)||v.registeredIcons.set(i,t)}willUpdate(e){if(!e.has("name"))return;const s=this.resolve();"string"==typeof s?this.svg=s:s.then((e=>{this.svg=e})).catch((()=>{this.svg=""}))}render(){return o`<div role="${l(this.label?"img":void 0)}" aria-label="${l(this.label)}"><slot style="${l(this.color?`color:${this.color}`:void 0)}" aria-hidden="true">${a(this.svg)}</slot></div>`}resolve(){return this.name?v.registeredIcons.has(this.name)?v.registeredIcons.get(this.name):v.resolver(this.name):""}};p.styles=[d,h],p.resolver=e=>fetch(`https://nordcdn.net/ds/icons/1.3.1/assets/${e}.svg`).then((e=>e.text())),p.registeredIcons=new Map,s([n({reflect:!0})],p.prototype,"name",void 0),s([n({reflect:!0})],p.prototype,"size",void 0),s([n({reflect:!0})],p.prototype,"color",void 0),s([n({reflect:!0})],p.prototype,"label",void 0),s([c()],p.prototype,"svg",void 0),p=v=s([i("nord-icon")],p);var m=p;export{m as default};
//# sourceMappingURL=Icon.js.map

@@ -1,2 +0,2 @@

export{default as Badge}from"./Badge.js";export{default as Button}from"./Button.js";export{default as Card}from"./Card.js";export{default as Input}from"./Input.js";export{default as Icon}from"./Icon.js";export{default as CommandMenu}from"./CommandMenu.js";export{default as CommandMenuAction}from"./CommandMenuAction.js";export{default as Select}from"./Select.js";export{default as Stack}from"./Stack.js";export{default as Spinner}from"./Spinner.js";export{default as Table}from"./Table.js";export{default as VisuallyHidden}from"./VisuallyHidden.js";export{default as Textarea}from"./Textarea.js";export{C as Calendar}from"./Calendar-6776543a.js";export{default as DatePicker}from"./DatePicker.js";export{default as Checkbox}from"./Checkbox.js";export{default as Tooltip}from"./Tooltip.js";export{default as Fieldset}from"./Fieldset.js";export{default as Radio}from"./Radio.js";export{default as Header}from"./Header.js";import"./DraftComponentMixin-1d7c27bc.js";import"./lit-element-99571067.js";import"./property-03f59dce.js";import"./if-defined-f6a18fde.js";import"./ref-3b5a3bd2.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./LightDomController-37815039.js";import"./InputMixin-367f0927.js";import"./SlotController-a18e9d36.js";import"./unsafe-html-7493c929.js";import"./FormAssociatedMixin-b460125c.js";import"./events-731d0007.js";import"./FormField-21cad3fa.js";import"./TextField-d925074c.js";import"./state-70f38ceb.js";import"./number-ca13a56f.js";import"./class-map-df701775.js";import"./collection-f3631dc8.js";import"./LightDismissController-cc5b4bf2.js";import"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";import"./KeyboardController.js";import"./events.js";import"./dates-ccf5a897.js";import"./calendar-localization.js";import"./month-view.js";import"./DateSelectEvent.js";import"./date-adapter.js";import"./date-localization.js";
export{default as Badge}from"./Badge.js";export{default as Button}from"./Button.js";export{default as Card}from"./Card.js";export{default as Input}from"./Input.js";export{default as Icon}from"./Icon.js";export{default as CommandMenu}from"./CommandMenu.js";export{default as CommandMenuAction}from"./CommandMenuAction.js";export{default as Select}from"./Select.js";export{default as Stack}from"./Stack.js";export{default as Spinner}from"./Spinner.js";export{default as Table}from"./Table.js";export{default as VisuallyHidden}from"./VisuallyHidden.js";export{default as Textarea}from"./Textarea.js";export{C as Calendar}from"./Calendar-d6be720e.js";export{default as DatePicker}from"./DatePicker.js";export{default as Checkbox}from"./Checkbox.js";export{default as Tooltip}from"./Tooltip.js";export{default as Fieldset}from"./Fieldset.js";export{default as Radio}from"./Radio.js";export{default as Header}from"./Header.js";import"./DraftComponentMixin-1d7c27bc.js";import"./lit-element-99571067.js";import"./property-03f59dce.js";import"./Component-a6208841.js";import"./if-defined-f6a18fde.js";import"./ref-3b5a3bd2.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./LightDomController-37815039.js";import"./InputMixin-f2da5fa8.js";import"./SlotController-a18e9d36.js";import"./unsafe-html-7493c929.js";import"./FormAssociatedMixin-b460125c.js";import"./events-731d0007.js";import"./FormField-21cad3fa.js";import"./TextField-d925074c.js";import"./state-70f38ceb.js";import"./number-ca13a56f.js";import"./class-map-df701775.js";import"./collection-f3631dc8.js";import"./LightDismissController-cc5b4bf2.js";import"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";import"./KeyboardController.js";import"./events.js";import"./dates-ccf5a897.js";import"./calendar-localization.js";import"./month-view.js";import"./DateSelectEvent.js";import"./date-adapter.js";import"./date-localization.js";
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as s,w as r,$ as n,s as o}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{o as p}from"./unsafe-html-7493c929.js";import{I as c,F as m}from"./InputMixin-367f0927.js";import{F as h}from"./FormAssociatedMixin-b460125c.js";import{s as f}from"./FormField-21cad3fa.js";import{s as u}from"./TextField-d925074c.js";import{S as v}from"./SlotController-a18e9d36.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const b=s`.n-input::-webkit-search-cancel-button,.n-input::-webkit-search-decoration{-webkit-appearance:none;appearance:none}slot[name=before]{display:flex;align-items:center;position:absolute;margin-inline-start:var(--n-space-m);block-size:100%;pointer-events:none;color:var(--n-color-icon)}slot[name=before]+.n-input{padding-inline-start:var(--n-space-xl)}::slotted(svg),svg{block-size:var(--n-size-icon-s);inline-size:var(--n-size-icon-s)}`;let y=class extends(h(c(m(e(o))))){constructor(){super(...arguments),this.beforeSlot=new v(this,"before"),this.type="text"}render(){var e;const t="search"===this.type||this.beforeSlot.hasContent,i="number"===this.type,s="search"===this.type?p('<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="M7 59.5a52.5 52.5 0 1 0 105 0 52.5 52.5 0 1 0-105 0zM133 133 96.628 96.628" stroke-width="14" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></svg>'):r;return n`${this.renderLabel()}<div class="n-input-container">${t?n`<slot name="before">${s}</slot>`:r} <input ${d(this.focusableRef)} id="${this.inputId}" class="n-input" type="${i?"text":this.type}" inputmode="${l(i?"numeric":void 0)}" pattern="${l(i?"[0-9]*":void 0)}" ?disabled="${this.disabled}" ?required="${this.required}" name="${l(this.name)}" .value="${null!==(e=this.value)&&void 0!==e?e:""}" placeholder="${l(this.placeholder)}" @input="${this.handleInput}" @change="${this.handleChange}" @keydown="${this.handleKeydown}" aria-describedby="${l(this.getDescribedBy())}" aria-invalid="${l(this.getInvalid())}" spellcheck="false"></div>${this.renderError()}`}handleKeydown(e){var t;"Enter"===e.key&&this.form&&(null===(t=this.form.querySelector('button[type="submit"]'))||void 0===t||t.click())}};y.styles=[f,u,b],t([a()],y.prototype,"type",void 0),y=t([i("nord-input")],y);var $=y;export{$ as default};
import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as s,w as r,$ as n,s as o}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{o as p}from"./unsafe-html-7493c929.js";import{I as c,F as m}from"./InputMixin-f2da5fa8.js";import{F as h}from"./FormAssociatedMixin-b460125c.js";import{s as f}from"./FormField-21cad3fa.js";import{s as u}from"./TextField-d925074c.js";import{S as v}from"./SlotController-a18e9d36.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const b=s`.n-input::-webkit-search-cancel-button,.n-input::-webkit-search-decoration{-webkit-appearance:none;appearance:none}slot[name=before]{display:flex;align-items:center;position:absolute;margin-inline-start:var(--n-space-m);block-size:100%;pointer-events:none;color:var(--n-color-icon)}slot[name=before]+.n-input{padding-inline-start:var(--n-space-xl)}::slotted(svg),svg{block-size:var(--n-size-icon-s);inline-size:var(--n-size-icon-s)}`;let y=class extends(h(c(m(e(o))))){constructor(){super(...arguments),this.beforeSlot=new v(this,"before"),this.type="text"}render(){var e;const t="search"===this.type||this.beforeSlot.hasContent,i="number"===this.type,s="search"===this.type?p('<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path d="M7 59.5a52.5 52.5 0 1 0 105 0 52.5 52.5 0 1 0-105 0zM133 133 96.628 96.628" stroke-width="14" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></svg>'):r;return n`${this.renderLabel()}<div class="n-input-container">${t?n`<slot name="before">${s}</slot>`:r} <input ${d(this.focusableRef)} id="${this.inputId}" class="n-input" type="${i?"text":this.type}" inputmode="${l(i?"numeric":void 0)}" pattern="${l(i?"[0-9]*":void 0)}" ?disabled="${this.disabled}" ?required="${this.required}" name="${l(this.name)}" .value="${null!==(e=this.value)&&void 0!==e?e:""}" placeholder="${l(this.placeholder)}" @input="${this.handleInput}" @change="${this.handleChange}" @keydown="${this.handleKeydown}" aria-describedby="${l(this.getDescribedBy())}" aria-invalid="${l(this.getInvalid())}" spellcheck="false"></div>${this.renderError()}`}handleKeydown(e){var t;"Enter"===e.key&&this.form&&(null===(t=this.form.querySelector('button[type="submit"]'))||void 0===t||t.click())}};y.styles=[f,u,b],t([a()],y.prototype,"type",void 0),y=t([i("nord-input")],y);var $=y;export{$ as default};
//# sourceMappingURL=Input.js.map

@@ -1,2 +0,2 @@

import{S as t}from"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";const o=t=>o=>{o.preventDefault(),t(o)};class r{constructor(r,s){this.host=r,r.addController(this),this.commandShortcuts=new t(r),this.globalShortcuts=new t(r,{"$mod+k":o(s.toggleOpen)}),this.navigationShortcuts=new t(r,{Enter:o(s.trigger),Backspace:s.goBack,End:o(s.end),Home:o(s.start),ArrowDown:o(s.next),ArrowUp:o(s.previous)},r)}registerCommandShortcuts(){const t={};for(const o of this.host.commands)o.hotkey&&(t[o.hotkey]=()=>{var t;return null===(t=o.handler)||void 0===t?void 0:t.call(o,this.host)});this.commandShortcuts.bind(t)}}export{r as KeyboardController};
import{S as t}from"./ShortcutController-93173ff4.js";import"./tinykeys.module-84e6cc41.js";const o=t=>o=>{o.preventDefault(),t(o)};class r{constructor(r,s){this.host=r,r.addController(this),this.commandShortcuts=new t(r),this.globalShortcuts=new t(r,{"$mod+k":o(s.toggleOpen)}),this.navigationShortcuts=new t(r,{Enter:o(s.trigger),Backspace:s.goBack,End:o(s.end),Home:o(s.start),ArrowDown:o(s.next),ArrowUp:o(s.previous)},r)}registerCommandShortcuts(){const t={};for(const o of this.host.commands)o.shortcut&&(t[o.shortcut]=()=>{var t;return null===(t=o.handler)||void 0===t?void 0:t.call(o,this.host)});this.commandShortcuts.bind(t)}}export{r as KeyboardController};
//# sourceMappingURL=KeyboardController.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{w as o,r as n,$ as r,s}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{L as c}from"./LightDomController-37815039.js";import{S as h}from"./SlotController-a18e9d36.js";import{I as p,F as u}from"./InputMixin-367f0927.js";import{F as v}from"./FormAssociatedMixin-b460125c.js";import{s as b}from"./FormField-21cad3fa.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./events-731d0007.js";import"./VisuallyHidden.js";class m extends h{constructor(e,t){super(e,t.slotName),this.options=t,this.onChange=()=>{this.syncLightDom()},this.options=t,this.renderHook=document.createElement("div"),this.renderHook.dataset.slot=this.slotName,this.lightDom=new c(e,{render:()=>this.hasContent?o:this.options.render(),renderOptions:{renderBefore:this.renderHook}})}hostConnected(){super.hostConnected(),this.host.appendChild(this.renderHook),this.syncLightDom()}hostDisconnected(){super.hostDisconnected(),this.renderHook.remove()}syncLightDom(){const e=this.content;e&&this.options.syncLightDom(e)}}const f=n`:host{--n-radio-size:calc(var(--n-space-m) * 1.25);display:inline-block;line-height:var(--n-line-height);font-size:var(--n-font-size-m)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}::slotted(input){--n-radio-accent-color:var(--n-color-primary);-moz-appearance:none;-webkit-appearance:none;appearance:none;margin:0;border:1px solid var(--n-radio-border-color,var(--n-color-border-hover));border-radius:var(--n-border-radius-circle);display:block;inline-size:var(--n-radio-size);block-size:var(--n-radio-size);cursor:pointer}::slotted(input:checked){--n-radio-border-color:var(--n-color-primary);background:var(--n-radio-accent-color)}::slotted(input[aria-invalid]){--n-radio-accent-color:var(--n-color-status-danger);--n-radio-border-color:var(--n-radio-accent-color)}::slotted(input:active){opacity:.8}::slotted(input:focus-visible){outline:0}::slotted(input:focus){outline:0;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-primary)}:host([disabled]) ::slotted(input){--n-radio-accent-color:var(--n-color-border-strong);--n-radio-border-color:var(--n-radio-accent-color);background:var(--n-radio-accent-color);cursor:default;opacity:1}:host([disabled]) ::slotted(label){color:var(--n-color-text-weaker);cursor:default}.n-dot{--n-radio-dot-size:var(--n-space-s);--n-radio-dot-inset:calc((var(--n-radio-size) - var(--n-radio-dot-size)) / 2);position:absolute;border-radius:var(--n-border-radius-circle);inline-size:var(--n-radio-dot-size);block-size:var(--n-radio-dot-size);background-color:var(--n-color-text-inverse);inset-inline-start:var(--n-radio-dot-inset);inset-block-start:var(--n-radio-dot-inset);z-index:var(--n-index-default);pointer-events:none}.n-label-container{padding-block-end:0}::slotted(label){-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight);line-height:var(--n-line-height-l);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;let g=0;const k=e=>`nord-radio-${e}-${g++}`;let y=class extends(v(p(u(e(s))))){constructor(){super(...arguments),this.inputId=k("input"),this.hintId=k("hint"),this.errorId=k("error"),this.hintSlot=new m(this,{slotName:"hint",render:()=>this.hint?r`<div slot="hint-internal" id="${this.hintId}">${this.hint}</div>`:o,syncLightDom:e=>{e.id=this.hintId}}),this.labelSlot=new m(this,{slotName:"label",render:()=>this.label?r`<label slot="label-internal" for="${this.inputId}">${this.label}</label>`:o,syncLightDom:e=>{!function(e){return"label"===e.localName}(e)?console.warn('NORD: Only <label> elements should be placed in radio\'s "label" slot'):e.htmlFor=this.inputId}}),this.errorSlot=new m(this,{slotName:"error",render:()=>this.error?r`<div slot="error-internal" id="${this.errorId}">${this.error}</div>`:o,syncLightDom:e=>{e.id=this.hintId}}),this.inputSlot=new c(this,{render:()=>r`<input slot="input" @blur="${this.handleBlur}" @focus="${this.handleFocus}" ${d(this.focusableRef)} class="n-input" id="${this.inputId}" type="radio" name="${l(this.name)}" .value="${this.value}" .checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${l(this.getDescribedBy())}" aria-invalid="${l(this.getInvalid())}">`}),this.checked=!1,this.handleBlur=e=>{e.stopPropagation(),this.dispatchEvent(new Event("blur",{bubbles:!1,cancelable:!0}))},this.handleFocus=e=>{e.stopPropagation(),this.dispatchEvent(new Event("focus",{bubbles:!1,cancelable:!0}))}}get formValue(){}willUpdate(e){if(e.has("checked")){!e.get("checked")&&this.checked&&this.uncheckSiblings()}}render(){return r`<div class="n-flex"><div class="n-input-container" @change="${this.handleChange}"><slot name="input"></slot>${this.checked?r`<div class="n-dot"></div>`:o}</div><div class="n-expand"><div class="n-label-container">${e=this.hideLabel,t=()=>r`<slot name="label"></slot><slot name="label-internal"></slot>`,i=e=>r`<nord-visually-hidden>${e}</nord-visually-hidden>`,e?i(t()):t()}<div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint"></slot><slot name="hint-internal"></slot></div></div><div class="n-caption n-error" role="alert" ?hidden="${!this.hasError}"><slot name="error"></slot><slot name="error-internal"></slot></div></div></div>`;var e,t,i}uncheckSiblings(){this.getRootNode().querySelectorAll(`nord-radio[name="${this.name}"]`).forEach((e=>{e!==this&&(e.checked=!1)}))}handleChange(e){e.stopPropagation();const t=e.target;this.checked=t.checked,super.handleChange(e)}};y.styles=[b,f],t([a({type:Boolean,reflect:!0})],y.prototype,"checked",void 0),y=t([i("nord-radio")],y);var $=y;export{$ as default};
import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{w as o,r as n,$ as r,s}from"./lit-element-99571067.js";import{e as a}from"./property-03f59dce.js";import{l}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{L as c}from"./LightDomController-37815039.js";import{S as h}from"./SlotController-a18e9d36.js";import{I as p,F as u}from"./InputMixin-f2da5fa8.js";import{F as v}from"./FormAssociatedMixin-b460125c.js";import{s as b}from"./FormField-21cad3fa.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./events-731d0007.js";import"./VisuallyHidden.js";class m extends h{constructor(e,t){super(e,t.slotName),this.options=t,this.onChange=()=>{this.syncLightDom()},this.options=t,this.renderHook=document.createElement("div"),this.renderHook.dataset.slot=this.slotName,this.lightDom=new c(e,{render:()=>this.hasContent?o:this.options.render(),renderOptions:{renderBefore:this.renderHook}})}hostConnected(){super.hostConnected(),this.host.appendChild(this.renderHook),this.syncLightDom()}hostDisconnected(){super.hostDisconnected(),this.renderHook.remove()}syncLightDom(){const e=this.content;e&&this.options.syncLightDom(e)}}const f=n`:host{--n-radio-size:calc(var(--n-space-m) * 1.25);display:inline-block;line-height:var(--n-line-height);font-size:var(--n-font-size-m)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}::slotted(input){--n-radio-accent-color:var(--n-color-primary);-moz-appearance:none;-webkit-appearance:none;appearance:none;margin:0;border:1px solid var(--n-radio-border-color,var(--n-color-border-hover));border-radius:var(--n-border-radius-circle);display:block;inline-size:var(--n-radio-size);block-size:var(--n-radio-size);cursor:pointer}::slotted(input:checked){--n-radio-border-color:var(--n-color-primary);background:var(--n-radio-accent-color)}::slotted(input[aria-invalid]){--n-radio-accent-color:var(--n-color-status-danger);--n-radio-border-color:var(--n-radio-accent-color)}::slotted(input:active){opacity:.8}::slotted(input:focus-visible){outline:0}::slotted(input:focus){outline:0;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-primary)}:host([disabled]) ::slotted(input){--n-radio-accent-color:var(--n-color-border-strong);--n-radio-border-color:var(--n-radio-accent-color);background:var(--n-radio-accent-color);cursor:default;opacity:1}:host([disabled]) ::slotted(label){color:var(--n-color-text-weaker);cursor:default}.n-dot{--n-radio-dot-size:var(--n-space-s);--n-radio-dot-inset:calc((var(--n-radio-size) - var(--n-radio-dot-size)) / 2);position:absolute;border-radius:var(--n-border-radius-circle);inline-size:var(--n-radio-dot-size);block-size:var(--n-radio-dot-size);background-color:var(--n-color-text-inverse);inset-inline-start:var(--n-radio-dot-inset);inset-block-start:var(--n-radio-dot-inset);z-index:var(--n-index-default);pointer-events:none}.n-label-container{padding-block-end:0}::slotted(label){-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight);line-height:var(--n-line-height-l);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;let g=0;const k=e=>`nord-radio-${e}-${g++}`;let y=class extends(v(p(u(e(s))))){constructor(){super(...arguments),this.inputId=k("input"),this.hintId=k("hint"),this.errorId=k("error"),this.hintSlot=new m(this,{slotName:"hint",render:()=>this.hint?r`<div slot="hint-internal" id="${this.hintId}">${this.hint}</div>`:o,syncLightDom:e=>{e.id=this.hintId}}),this.labelSlot=new m(this,{slotName:"label",render:()=>this.label?r`<label slot="label-internal" for="${this.inputId}">${this.label}</label>`:o,syncLightDom:e=>{!function(e){return"label"===e.localName}(e)?console.warn('NORD: Only <label> elements should be placed in radio\'s "label" slot'):e.htmlFor=this.inputId}}),this.errorSlot=new m(this,{slotName:"error",render:()=>this.error?r`<div slot="error-internal" id="${this.errorId}">${this.error}</div>`:o,syncLightDom:e=>{e.id=this.hintId}}),this.inputSlot=new c(this,{render:()=>r`<input slot="input" @blur="${this.handleBlur}" @focus="${this.handleFocus}" ${d(this.focusableRef)} class="n-input" id="${this.inputId}" type="radio" name="${l(this.name)}" .value="${this.value}" .checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${l(this.getDescribedBy())}" aria-invalid="${l(this.getInvalid())}">`}),this.checked=!1,this.handleBlur=e=>{e.stopPropagation(),this.dispatchEvent(new Event("blur",{bubbles:!1,cancelable:!0}))},this.handleFocus=e=>{e.stopPropagation(),this.dispatchEvent(new Event("focus",{bubbles:!1,cancelable:!0}))}}get formValue(){}willUpdate(e){if(e.has("checked")){!e.get("checked")&&this.checked&&this.uncheckSiblings()}}render(){return r`<div class="n-flex"><div class="n-input-container" @change="${this.handleChange}"><slot name="input"></slot>${this.checked?r`<div class="n-dot"></div>`:o}</div><div class="n-expand"><div class="n-label-container">${e=this.hideLabel,t=()=>r`<slot name="label"></slot><slot name="label-internal"></slot>`,i=e=>r`<nord-visually-hidden>${e}</nord-visually-hidden>`,e?i(t()):t()}<div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint"></slot><slot name="hint-internal"></slot></div></div><div class="n-caption n-error" role="alert" ?hidden="${!this.hasError}"><slot name="error"></slot><slot name="error-internal"></slot></div></div></div>`;var e,t,i}uncheckSiblings(){this.getRootNode().querySelectorAll(`nord-radio[name="${this.name}"]`).forEach((e=>{e!==this&&(e.checked=!1)}))}handleChange(e){e.stopPropagation();const t=e.target;this.checked=t.checked,super.handleChange(e)}};y.styles=[b,f],t([a({type:Boolean,reflect:!0})],y.prototype,"checked",void 0),y=t([i("nord-radio")],y);var $=y;export{$ as default};
//# sourceMappingURL=Radio.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as r,s as i}from"./lit-element-99571067.js";import{l as s}from"./if-defined-f6a18fde.js";import{n as a}from"./ref-3b5a3bd2.js";import{o as l}from"./unsafe-html-7493c929.js";import"./Button.js";import{I as d,F as c}from"./InputMixin-367f0927.js";import{F as p}from"./FormAssociatedMixin-b460125c.js";import{s as u}from"./FormField-21cad3fa.js";import{S as b}from"./SlotController-a18e9d36.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./property-03f59dce.js";import"./LightDomController-37815039.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const v=n`.n-select-container{position:relative;inline-size:fit-content}:host([expand]) .n-select-container{inline-size:100%}select{-webkit-appearance:none;appearance:none;position:absolute;font-size:var(--n-font-size-m);font-family:var(--n-font-family);color:var(--n-color-text);inline-size:100%;opacity:.0001;cursor:pointer;background:0 0;border:0;block-size:var(--n-space-xl);inset-block-end:0;inset-inline-start:0;z-index:2}nord-button{--n-button-text-align:start}.n-label-container:hover+.n-select-container nord-button,select:hover+nord-button{--n-button-background-color:var(--n-color-button-hover);--n-button-border-color:var(--n-color-border-hover)}.n-label-container:hover+.n-select-container nord-button svg,select:hover+nord-button svg{color:var(--n-color-icon-hover)}select:focus+nord-button{--n-button-border-color:var(--n-color-primary);--n-button-box-shadow:0 0 0 1px var(--n-button-border-color)}:host([disabled]){cursor:auto;pointer-events:none}::slotted(:not([slot])){display:none}[slot=after] svg{color:var(--n-color-icon);margin-inline-start:var(--n-space-m);margin-inline-end:calc(var(--n-space-s)/ -2);min-inline-size:calc(var(--n-space-l)/ 2.2);max-inline-size:calc(var(--n-space-l)/ 2.2)}::slotted([slot=before]){margin-inline-start:calc(var(--n-space-s) * -1);margin-inline-end:var(--n-space-s)}select[aria-invalid=true]+nord-button{--n-button-border-color:var(--n-color-status-danger)}`;let h=class extends(p(d(c(e(i))))){constructor(){super(...arguments),this.defaultSlot=new b(this),this.inputId="select"}get formValue(){return this.value||void 0}render(){const e=this.options,t=this.getButtonText(e);return r`<slot></slot>${this.renderLabel()}<div class="n-select-container"><select ${a(this.focusableRef)} id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" name="${s(this.name)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${s(this.getDescribedBy())}" aria-invalid="${s(this.getInvalid())}">${this.placeholder&&r`<option value="" disabled="disabled" ?selected="${!this.value}">${this.placeholder}</option>`} ${e.map((e=>this.renderOption(e)))}</select><nord-button tabindex="-1" ?disabled="${this.disabled}" ?expand="${this.expand}" aria-hidden="true" type="button"><slot slot="before" name="before"></slot>${t}<div slot="after">${l('<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M105 56a10.416 10.416 0 0 1-7.42-3.08L72.478 27.818a3.528 3.528 0 0 0-4.956 0L42.42 52.92a10.5 10.5 0 0 1-14.84-14.84l35-35a10.486 10.486 0 0 1 14.84 0l35 35A10.5 10.5 0 0 1 105 56zm-35 84a10.416 10.416 0 0 1-7.42-3.08l-35-35a10.5 10.5 0 0 1 14.84-14.84l25.102 25.102a3.528 3.528 0 0 0 4.956 0L97.58 87.08a10.5 10.5 0 1 1 14.84 14.84l-35 35A10.416 10.416 0 0 1 70 140z"/></svg>')}</div></nord-button></div>${this.renderError()}`}get options(){return Array.from(this.querySelectorAll("option"))}getButtonText(e){const t=e.find((e=>e.value===this.value));return t?t.text:this.placeholder?this.placeholder:e[0]?e[0].text:""}renderOption(e){return r`<option value="${s(e.value)}" ?disabled="${e.disabled}" ?selected="${e.value===this.value}">${e.text}</option>`}};h.styles=[u,v],h=t([o("nord-select")],h);var m=h;export{m as default};
import{D as e,_ as t,n as o}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as r,s as i}from"./lit-element-99571067.js";import{l as s}from"./if-defined-f6a18fde.js";import{n as a}from"./ref-3b5a3bd2.js";import{o as l}from"./unsafe-html-7493c929.js";import"./Button.js";import{I as d,F as c}from"./InputMixin-f2da5fa8.js";import{F as p}from"./FormAssociatedMixin-b460125c.js";import{s as u}from"./FormField-21cad3fa.js";import{S as b}from"./SlotController-a18e9d36.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./property-03f59dce.js";import"./LightDomController-37815039.js";import"./Component-a6208841.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const v=n`.n-select-container{position:relative;inline-size:fit-content}:host([expand]) .n-select-container{inline-size:100%}select{-webkit-appearance:none;appearance:none;position:absolute;font-size:var(--n-font-size-m);font-family:var(--n-font-family);color:var(--n-color-text);inline-size:100%;opacity:.0001;cursor:pointer;background:0 0;border:0;block-size:var(--n-space-xl);inset-block-end:0;inset-inline-start:0;z-index:2}nord-button{--n-button-text-align:start}.n-label-container:hover+.n-select-container nord-button,select:hover+nord-button{--n-button-background-color:var(--n-color-button-hover);--n-button-border-color:var(--n-color-border-hover)}.n-label-container:hover+.n-select-container nord-button svg,select:hover+nord-button svg{color:var(--n-color-icon-hover)}select:focus+nord-button{--n-button-border-color:var(--n-color-primary);--n-button-box-shadow:0 0 0 1px var(--n-button-border-color)}:host([disabled]){cursor:auto;pointer-events:none}::slotted(:not([slot])){display:none}[slot=after] svg{color:var(--n-color-icon);margin-inline-start:var(--n-space-m);margin-inline-end:calc(var(--n-space-s)/ -2);min-inline-size:calc(var(--n-space-l)/ 2.2);max-inline-size:calc(var(--n-space-l)/ 2.2)}::slotted([slot=before]){margin-inline-start:calc(var(--n-space-s) * -1);margin-inline-end:var(--n-space-s)}select[aria-invalid=true]+nord-button{--n-button-border-color:var(--n-color-status-danger)}`;let h=class extends(p(d(c(e(i))))){constructor(){super(...arguments),this.defaultSlot=new b(this),this.inputId="select"}get formValue(){return this.value||void 0}render(){const e=this.options,t=this.getButtonText(e);return r`<slot></slot>${this.renderLabel()}<div class="n-select-container"><select ${a(this.focusableRef)} id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" name="${s(this.name)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${s(this.getDescribedBy())}" aria-invalid="${s(this.getInvalid())}">${this.placeholder&&r`<option value="" disabled="disabled" ?selected="${!this.value}">${this.placeholder}</option>`} ${e.map((e=>this.renderOption(e)))}</select><nord-button tabindex="-1" ?disabled="${this.disabled}" ?expand="${this.expand}" aria-hidden="true" type="button"><slot slot="before" name="before"></slot>${t}<div slot="after">${l('<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M105 56a10.416 10.416 0 0 1-7.42-3.08L72.478 27.818a3.528 3.528 0 0 0-4.956 0L42.42 52.92a10.5 10.5 0 0 1-14.84-14.84l35-35a10.486 10.486 0 0 1 14.84 0l35 35A10.5 10.5 0 0 1 105 56zm-35 84a10.416 10.416 0 0 1-7.42-3.08l-35-35a10.5 10.5 0 0 1 14.84-14.84l25.102 25.102a3.528 3.528 0 0 0 4.956 0L97.58 87.08a10.5 10.5 0 1 1 14.84 14.84l-35 35A10.416 10.416 0 0 1 70 140z"/></svg>')}</div></nord-button></div>${this.renderError()}`}get options(){return Array.from(this.querySelectorAll("option"))}getButtonText(e){const t=e.find((e=>e.value===this.value));return t?t.text:this.placeholder?this.placeholder:e[0]?e[0].text:""}renderOption(e){return r`<option value="${s(e.value)}" ?disabled="${e.disabled}" ?selected="${e.value===this.value}">${e.text}</option>`}};h.styles=[u,v],h=t([o("nord-select")],h);var m=h;export{m as default};
//# sourceMappingURL=Select.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as i,n as r}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as o,s}from"./lit-element-99571067.js";import{e as t}from"./property-03f59dce.js";import{l as a}from"./if-defined-f6a18fde.js";const l=n`:host{--n-icon-size:var(--n-size-icon-m);all:initial;display:block;block-size:var(--n-icon-size);line-height:var(--n-line-height);color:inherit}*,::after,::before{box-sizing:border-box;margin:0;padding:0}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-spinner,.n-spinner::after{position:absolute;inset-block-start:50%;inset-inline-start:50%;z-index:var(--n-index-spinner);transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0 0}.n-spinner{block-size:var(--n-icon-size);inline-size:var(--n-icon-size);font-size:var(--n-icon-size);color:var(--n-color-primary);border:.18em solid transparent;border-inline-start:.18em solid currentColor;border-radius:var(--n-border-radius-circle);animation:nRotate .66s linear infinite}.n-spinner::after{box-sizing:content-box;inline-size:100%;block-size:100%;overflow:hidden;content:"";border:.18em solid currentColor;border-radius:var(--n-border-radius-circle);opacity:.3}@keyframes nRotate{0%{transform:translateZ(0) rotate(0) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}`;let c=class extends(e(s)){constructor(){super(...arguments),this.size="m"}render(){return o`<div class="n-spinner" role="${a(this.label?"img":void 0)}" aria-label="${a(this.label)}" style="${a(this.color?`color:${this.color}`:void 0)}"></div>`}};c.styles=l,i([t({reflect:!0})],c.prototype,"size",void 0),i([t({reflect:!0})],c.prototype,"color",void 0),i([t({reflect:!0})],c.prototype,"label",void 0),c=i([r("nord-spinner")],c);var d=c;export{d as default};
import{D as e,_ as r,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as o,s}from"./lit-element-99571067.js";import{e as t}from"./property-03f59dce.js";import{l as a}from"./if-defined-f6a18fde.js";import{s as l}from"./Component-a6208841.js";const c=n`:host{--n-icon-size:var(--n-size-icon-m);block-size:var(--n-icon-size);color:inherit}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-spinner,.n-spinner::after{position:absolute;inset-block-start:50%;inset-inline-start:50%;z-index:var(--n-index-spinner);transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0 0}.n-spinner{block-size:var(--n-icon-size);inline-size:var(--n-icon-size);font-size:var(--n-icon-size);color:var(--n-color-primary);border:.18em solid transparent;border-inline-start:.18em solid currentColor;border-radius:var(--n-border-radius-circle);animation:nRotate .66s linear infinite}.n-spinner::after{box-sizing:content-box;inline-size:100%;block-size:100%;overflow:hidden;content:"";border:.18em solid currentColor;border-radius:var(--n-border-radius-circle);opacity:.3}@keyframes nRotate{0%{transform:translateZ(0) rotate(0) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}`;let d=class extends(e(s)){constructor(){super(...arguments),this.size="m"}render(){return o`<div class="n-spinner" role="${a(this.label?"img":void 0)}" aria-label="${a(this.label)}" style="${a(this.color?`color:${this.color}`:void 0)}"></div>`}};d.styles=[l,c],r([t({reflect:!0})],d.prototype,"size",void 0),r([t({reflect:!0})],d.prototype,"color",void 0),r([t({reflect:!0})],d.prototype,"label",void 0),d=r([i("nord-spinner")],d);var z=d;export{z as default};
//# sourceMappingURL=Spinner.js.map

@@ -11,6 +11,6 @@ import { LitElement } from "lit";

export default class Badge extends Badge_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
/**
* The type of badge.
* Determines the colour of the chip shown on the badge.
* Determines the color of the chip shown on the badge.
*/

@@ -17,0 +17,0 @@ type?: "warning" | "success" | "danger" | "highlight" | "info";

@@ -15,3 +15,3 @@ import { LitElement } from "lit";

export default class Button extends Button_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private buttonRef;

@@ -34,3 +34,3 @@ private lightDom;

* When provided, renders the button as a link,
* with it's href attribute set to the given value.
* with its href attribute set to the given value.
*/

@@ -37,0 +37,0 @@ href?: string;

@@ -15,3 +15,3 @@ import { LitElement, PropertyValues } from "lit";

export default class Calendar extends Calendar_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private dialogLabelId;

@@ -18,0 +18,0 @@ private monthSelectNode;

@@ -15,8 +15,8 @@ import { LitElement } from "lit";

export default class Card extends Card_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private headerSlot;
private footerSlot;
/**
* Control the padding of the card component.
* When set to "none", the header and footer slots will still have padding.
* Controls the padding of card component. When set to “none”,
* the header and footer slots will still have padding.
*/

@@ -23,0 +23,0 @@ padding: "m" | "l" | "none";

import "../icon/Icon.js";
import "../button/Button.js";
import "../stack/Stack.js";
import "../fieldset/Fieldset.js";

@@ -7,3 +7,5 @@ import { LitElement, PropertyValues } from "lit";

/**
* Command Menu allows users to navigate and use an app without touching the mouse and helps them transform into “power users” who can harness more advanced features far faster.
* Command Menu allows users to navigate and use an app without
* touching the mouse and helps them transform into “power users”
* who can harness more advanced features far faster.
*

@@ -13,8 +15,8 @@ * @status draft

* @slot footer - Used to replace the default footer contents.
* @fires open - The command menu was opened foo.
* @fires close - The command menu was closed bar.
* @fires open - The command menu was opened.
* @fires close - The command menu was closed.
* @fires {SelectEvent} n-select - User selected a command from the menu.
*/
export default class CommandMenu extends CommandMenu_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private inputRef;

@@ -30,3 +32,3 @@ private listRef;

/**
* Hint text to display in the search field.
* Hint text to display in the Command Menu search field.
*/

@@ -36,2 +38,3 @@ placeholder: string;

* Array of commands to be included in the menu.
* Please see “Commands data” section for more documentation.
*/

@@ -38,0 +41,0 @@ commands: Array<ICommandMenuAction>;

@@ -5,3 +5,3 @@ import CommandMenu from "./CommandMenu.js";

title: string;
hotkey?: string;
shortcut?: string;
handler?: (menu: CommandMenu) => void;

@@ -8,0 +8,0 @@ icon?: string;

@@ -39,3 +39,3 @@ import { LitElement, PropertyValues } from "lit";

/**
* Date value. Must be in IS0-8601 format: YYYY-MM-DD
* Date value. Must be in IS0-8601 format: YYYY-MM-DD.
*/

@@ -42,0 +42,0 @@ value: string;

@@ -13,3 +13,3 @@ import { LitElement } from "lit";

export default class Header extends Header_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private actionSlot;

@@ -16,0 +16,0 @@ render(): import("lit-html").TemplateResult<1>;

@@ -12,3 +12,3 @@ import { LitElement, PropertyValues } from "lit";

export default class Icon extends Icon_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private static resolver;

@@ -15,0 +15,0 @@ private static registeredIcons;

@@ -12,3 +12,3 @@ import { LitElement } from "lit";

export default class Spinner extends Spinner_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
/**

@@ -15,0 +15,0 @@ * The size of the spinner.

@@ -12,3 +12,3 @@ import { LitElement } from "lit";

export default class Stack extends Stack_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
/**

@@ -15,0 +15,0 @@ * The space injected between components.

@@ -6,3 +6,3 @@ import { LitElement, PropertyValues } from "lit";

* for the currently focused element. A tooltip can be useful when you want
* to e.g. give a hint about an existing Command Menu hotkey.
* to e.g. give a hint about an existing Command Menu shortcut.
*

@@ -15,3 +15,3 @@ * @status draft

export default class Tooltip extends Tooltip_base {
static styles: import("lit").CSSResult;
static styles: import("lit").CSSResult[];
private shortcutSlot;

@@ -18,0 +18,0 @@ private targetElement;

@@ -1,2 +0,2 @@

import{D as t,_ as e,n as a}from"./DraftComponentMixin-1d7c27bc.js";import{r as n,$ as s,s as o}from"./lit-element-99571067.js";import{e as r}from"./property-03f59dce.js";const i=n`:host{all:initial;display:flex;flex-flow:column wrap;justify-content:flex-start;font-size:var(--n-font-size-m);font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);line-height:var(--n-line-height);color:var(--n-color-text);gap:var(--n-stack-gap,var(--n-space-m))}*,::after,::before{box-sizing:border-box;margin:0;padding:0}:host([direction=horizontal]){align-items:center;flex-direction:row}:host([align-items=center]){align-items:center}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}::slotted(*){margin:0!important}:host([gap=none]){--n-stack-gap:0}:host([gap="s"]){--n-stack-gap:var(--n-space-s)}:host([gap="l"]){--n-stack-gap:var(--n-space-l)}:host([gap=xl]){--n-stack-gap:var(--n-space-xl)}:host([gap=xxl]){--n-stack-gap:var(--n-space-xxl)}`;let l=class extends(t(o)){constructor(){super(...arguments),this.gap="m",this.direction="vertical"}render(){return s`<slot></slot>`}};l.styles=i,e([r({reflect:!0})],l.prototype,"gap",void 0),e([r({reflect:!0})],l.prototype,"direction",void 0),e([r({reflect:!0,attribute:"align-items"})],l.prototype,"alignItems",void 0),l=e([a("nord-stack")],l);var p=l;export{p as default};
import{D as t,_ as e,n as a}from"./DraftComponentMixin-1d7c27bc.js";import{r as s,$ as o,s as r}from"./lit-element-99571067.js";import{e as n}from"./property-03f59dce.js";import{s as i}from"./Component-a6208841.js";const l=s`:host{display:flex;flex-flow:column wrap;justify-content:flex-start;font-size:var(--n-font-size-m);color:var(--n-color-text);gap:var(--n-stack-gap,var(--n-space-m))}:host([direction=horizontal]){align-items:center;flex-direction:row}:host([align-items=center]){align-items:center}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}::slotted(*){margin:0!important}:host([gap=none]){--n-stack-gap:0}:host([gap="s"]){--n-stack-gap:var(--n-space-s)}:host([gap="l"]){--n-stack-gap:var(--n-space-l)}:host([gap=xl]){--n-stack-gap:var(--n-space-xl)}:host([gap=xxl]){--n-stack-gap:var(--n-space-xxl)}`;let p=class extends(t(r)){constructor(){super(...arguments),this.gap="m",this.direction="vertical"}render(){return o`<slot></slot>`}};p.styles=[i,l],e([n({reflect:!0})],p.prototype,"gap",void 0),e([n({reflect:!0})],p.prototype,"direction",void 0),e([n({reflect:!0,attribute:"align-items"})],p.prototype,"alignItems",void 0),p=e([a("nord-stack")],p);var c=p;export{c as default};
//# sourceMappingURL=Stack.js.map

@@ -1,2 +0,2 @@

import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as s,s as a}from"./lit-element-99571067.js";import{e as o}from"./property-03f59dce.js";import{l as n}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{I as l,F as h}from"./InputMixin-367f0927.js";import{F as p}from"./FormAssociatedMixin-b460125c.js";import{s as c}from"./FormField-21cad3fa.js";import{s as m}from"./TextField-d925074c.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./SlotController-a18e9d36.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const u=r`.n-input{min-block-size:var(--n-textarea-height,76px);transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly);display:block;resize:vertical}:host([resize=auto]) .n-input{resize:none;overflow:hidden}`;let f=class extends(p(l(h(e(a))))){constructor(){super(...arguments),this.inputId="textarea",this.resize="vertical"}updated(e){(e.has("resize")||e.has("value"))&&this.resizeToFitContent()}render(){var e;return s`${this.renderLabel()}<div class="n-input-container"><textarea ${d(this.focusableRef)} id="${this.inputId}" class="n-input" ?disabled="${this.disabled}" ?required="${this.required}" name="${n(this.name)}" .value="${null!==(e=this.value)&&void 0!==e?e:""}" placeholder="${n(this.placeholder)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${n(this.getDescribedBy())}" aria-invalid="${n(this.getInvalid())}"></textarea></div>${this.renderError()}`}resizeToFitContent(){const e=this.focusableRef.value;e&&("auto"===this.resize?(e.style.height="auto",e.style.height=`${e.scrollHeight}px`):e.style.height=null)}};f.styles=[c,m,u],t([o({reflect:!0})],f.prototype,"resize",void 0),f=t([i("nord-textarea")],f);var v=f;export{v as default};
import{D as e,_ as t,n as i}from"./DraftComponentMixin-1d7c27bc.js";import{r,$ as s,s as a}from"./lit-element-99571067.js";import{e as o}from"./property-03f59dce.js";import{l as n}from"./if-defined-f6a18fde.js";import{n as d}from"./ref-3b5a3bd2.js";import{I as l,F as h}from"./InputMixin-f2da5fa8.js";import{F as p}from"./FormAssociatedMixin-b460125c.js";import{s as c}from"./FormField-21cad3fa.js";import{s as m}from"./TextField-d925074c.js";import"./directive-helpers-f86e6d16.js";import"./directive-de55b00a.js";import"./SlotController-a18e9d36.js";import"./events-731d0007.js";import"./VisuallyHidden.js";const u=r`.n-input{min-block-size:var(--n-textarea-height,76px);transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly);display:block;resize:vertical}:host([resize=auto]) .n-input{resize:none;overflow:hidden}`;let f=class extends(p(l(h(e(a))))){constructor(){super(...arguments),this.inputId="textarea",this.resize="vertical"}updated(e){(e.has("resize")||e.has("value"))&&this.resizeToFitContent()}render(){var e;return s`${this.renderLabel()}<div class="n-input-container"><textarea ${d(this.focusableRef)} id="${this.inputId}" class="n-input" ?disabled="${this.disabled}" ?required="${this.required}" name="${n(this.name)}" .value="${null!==(e=this.value)&&void 0!==e?e:""}" placeholder="${n(this.placeholder)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${n(this.getDescribedBy())}" aria-invalid="${n(this.getInvalid())}"></textarea></div>${this.renderError()}`}resizeToFitContent(){const e=this.focusableRef.value;e&&("auto"===this.resize?(e.style.height="auto",e.style.height=`${e.scrollHeight}px`):e.style.height=null)}};f.styles=[c,m,u],t([o({reflect:!0})],f.prototype,"resize",void 0),f=t([i("nord-textarea")],f);var v=f;export{v as default};
//# sourceMappingURL=Textarea.js.map

@@ -1,2 +0,2 @@

import{D as t,_ as e,n}from"./DraftComponentMixin-1d7c27bc.js";import{r as o,$ as i,w as r,s as l}from"./lit-element-99571067.js";import{e as s}from"./property-03f59dce.js";import{t as a}from"./state-70f38ceb.js";import{S as c}from"./SlotController-a18e9d36.js";function f(t){return t.split("-")[0]}function d(t){return t.split("-")[1]}function u(t){return["top","bottom"].includes(f(t))?"x":"y"}function h(t){return"y"===t?"height":"width"}function p(t){let{reference:e,floating:n,placement:o}=t;const i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;let l;switch(f(o)){case"top":l={x:i,y:e.y-n.height};break;case"bottom":l={x:i,y:e.y+e.height};break;case"right":l={x:e.x+e.width,y:r};break;case"left":l={x:e.x-n.width,y:r};break;default:l={x:e.x,y:e.y}}const s=u(o),a=h(s);switch(d(o)){case"start":l[s]=l[s]-(e[a]/2-n[a]/2);break;case"end":l[s]=l[s]+(e[a]/2-n[a]/2)}return l}function m(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function g(t,e){void 0===e&&(e={});const{x:n,y:o,platform:i,rects:r,elements:l,strategy:s}=t,{boundary:a="clippingParents",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:u=0}=e,h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),p=l[d?"floating"===f?"reference":"floating":f],g=await i.getClippingClientRect({element:await i.isElement(p)?p:p.contextElement||await i.getDocumentElement({element:l.floating}),boundary:a,rootBoundary:c}),y=m(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...r.floating,x:n,y:o}:r.reference,offsetParent:await i.getOffsetParent({element:l.floating}),strategy:s}));return{top:g.top-y.top+h.top,bottom:y.bottom-g.bottom+h.bottom,left:g.left-y.left+h.left,right:y.right-g.right+h.right}}const y=Math.min,v=Math.max;function b(t,e,n){return v(t,y(e,n))}const x={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,(t=>x[t]))}const E={start:"end",end:"start"};function k(t){return t.replace(/start|end/g,(t=>E[t]))}const L=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s}=e;if(null!=(n=r.flip)&&n.skip)return{};const{mainAxis:a=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...v}=t,b=f(i),x=p||(b===s||!y?[w(s)]:function(t){const e=w(t);return[k(t),e,k(e)]}(s)),E=[s,...x],L=await g(e,v),T=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(a&&T.push(L[b]),c){const{main:t,cross:e}=function(t,e){const n="start"===d(t),o=u(t),i=h(o);let r="x"===o?n?"right":"left":n?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=w(r)),{main:r,cross:w(r)}}(i,l);T.push(L[t],L[e])}if(C=[...C,{placement:i,overflows:T}],!T.every((t=>t<=0))){var R,S;const t=(null!=(R=null==(S=r.flip)?void 0:S.index)?R:0)+1,e=E[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let n="bottom";switch(m){case"bestFit":{var P;const t=null==(P=C.slice().sort(((t,e)=>t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)-e.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)))[0])?void 0:P.placement;t&&(n=t);break}case"initialPlacement":n=s}return{data:{skip:!0},reset:{placement:n}}}return{}}}};const T=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn(e){const{x:n,y:o,placement:i,rects:r}=e,l=function(t){let{placement:e,rects:n,value:o}=t;const i=f(e),r=["left","top"].includes(i)?-1:1,l="function"==typeof o?o({...n,placement:e}):o,{mainAxis:s,crossAxis:a}="number"==typeof l?{mainAxis:l,crossAxis:0}:{mainAxis:0,crossAxis:0,...l};return"x"===u(i)?{x:a,y:s*r}:{x:s*r,y:a}}({placement:i,rects:r,value:t});return{x:n+l.x,y:o+l.y,data:l}}}};function C(t){return"[object Window]"===(null==t?void 0:t.toString())}function R(t){if(null==t)return window;if(!C(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return R(t).getComputedStyle(t)}function P(t){return C(t)?"":t?(t.nodeName||"").toLowerCase():""}function D(t){return t instanceof R(t).HTMLElement}function W(t){return t instanceof R(t).Element}function A(t){return t instanceof R(t).ShadowRoot||t instanceof ShadowRoot}function H(t){const{overflow:e,overflowX:n,overflowY:o}=S(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function z(t){return["table","td","th"].includes(P(t))}function N(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=S(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}const M=Math.min,j=Math.max,B=Math.round;function O(t,e){void 0===e&&(e=!1);const n=t.getBoundingClientRect();let o=1,i=1;return e&&D(t)&&(o=t.offsetWidth>0&&B(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&B(n.height)/t.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function V(t){return(e=t,(e instanceof R(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function $(t){return C(t)?{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}:{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function q(t){return O(V(t)).left+$(t).scrollLeft}function F(t,e,n){const o=D(e),i=V(e),r=O(t,o&&function(t){const e=O(t);return B(e.width)!==t.offsetWidth||B(e.height)!==t.offsetHeight}(e));let l={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==P(e)||H(i))&&(l=$(e)),D(e)){const t=O(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=q(i));return{x:r.left+l.scrollLeft-s.x,y:r.top+l.scrollTop-s.y,width:r.width,height:r.height}}function X(t){return"html"===P(t)?t:t.assignedSlot||t.parentNode||(A(t)?t.host:null)||V(t)}function Y(t){return D(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function I(t){const e=R(t);let n=Y(t);for(;n&&z(n)&&"static"===getComputedStyle(n).position;)n=Y(n);return n&&("html"===P(n)||"body"===P(n)&&"static"===getComputedStyle(n).position&&!N(n))?e:n||function(t){let e=X(t);for(;D(e)&&!["html","body"].includes(P(e));){if(N(e))return e;e=e.parentNode}return null}(t)||e}function U(t){return{width:t.offsetWidth,height:t.offsetHeight}}function _(t){return["html","body","#document"].includes(P(t))?t.ownerDocument.body:D(t)&&H(t)?t:_(X(t))}function G(t,e){var n;void 0===e&&(e=[]);const o=_(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=R(o),l=i?[r].concat(r.visualViewport||[],H(o)?o:[]):o,s=e.concat(l);return i?s:s.concat(G(X(l)))}function J(t,e){return"viewport"===e?m(function(t){const e=R(t),n=V(t),o=e.visualViewport;let i=n.clientWidth,r=n.clientHeight,l=0,s=0;return o&&(i=o.width,r=o.height,Math.abs(e.innerWidth/o.scale-o.width)<.01&&(l=o.offsetLeft,s=o.offsetTop)),{width:i,height:r,x:l,y:s}}(t)):W(e)?function(t){const e=O(t),n=e.top+t.clientTop,o=e.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e):m(function(t){var e;const n=V(t),o=$(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=j(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=j(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-o.scrollLeft+q(t);const a=-o.scrollTop;return"rtl"===S(i||n).direction&&(s+=j(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:l,x:s,y:a}}(V(t)))}function K(t){const e=G(X(t)),n=["absolute","fixed"].includes(S(t).position)&&D(t)?I(t):t;return W(n)?e.filter((t=>W(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&A(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==P(t))):[]}const Q={getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:F(e,I(n),o),floating:{...U(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:t=>function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=D(n),r=V(n);if(n===r)return e;let l={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==P(n)||H(r))&&(l=$(n)),D(n))){const t=O(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-l.scrollLeft+s.x,y:e.y-l.scrollTop+s.y}}(t),getOffsetParent:t=>{let{element:e}=t;return I(e)},isElement:t=>W(t),getDocumentElement:t=>{let{element:e}=t;return V(e)},getClippingClientRect:t=>function(t){let{element:e,boundary:n,rootBoundary:o}=t;const i=[..."clippingParents"===n?K(e):[].concat(n),o],r=i[0],l=i.reduce(((t,n)=>{const o=J(e,n);return t.top=j(o.top,t.top),t.right=M(o.right,t.right),t.bottom=M(o.bottom,t.bottom),t.left=j(o.left,t.left),t}),J(e,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}(t),getDimensions:t=>{let{element:e}=t;return U(e)},getClientRects:t=>{let{element:e}=t;return e.getClientRects()}},Z=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n;let s=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:c}=p({...s,placement:o}),f=o,d={};for(let n=0;n<r.length;n++){const{name:u,fn:h}=r[n],{x:m,y:g,data:y,reset:v}=await h({x:a,y:c,initialPlacement:o,placement:f,strategy:i,middlewareData:d,rects:s,platform:l,elements:{reference:t,floating:e}});a=null!=m?m:a,c=null!=g?g:c,d={...d,[u]:null!=y?y:{}},v&&("object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(s=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:a,y:c}=p({...s,placement:f}))),n=-1)}return{x:a,y:c,placement:f,strategy:i,middlewareData:d}})(t,e,{platform:Q,...n}),tt=o`:host{all:initial;display:block;position:absolute;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .4s ease,visibility .4s ease,inset-inline-start .4s ease,inset-block-start .4s ease;--n-tooltip-background:rgba(20, 20, 20, 0.95);--n-tooltip-key-border:rgba(255, 255, 255, 0.03);--n-tooltip-key-background:rgba(255, 255, 255, 0.1)}*,::after,::before,::slotted([slot=shortcut]){box-sizing:border-box;margin:0;padding:0}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--n-color-text-inverse);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--n-tooltip-background);border-radius:var(--n-border-radius-s)}.n-tooltip,.n-tooltip-shortcut{display:flex;flex-wrap:wrap;align-items:center}.n-tooltip-shortcut{gap:2px}.n-tooltip-shortcut:empty{display:none}::slotted([slot=shortcut]):empty{display:none}::slotted([slot=shortcut]){inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--n-tooltip-key-border);padding:1px;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;background-color:var(--n-tooltip-key-background)}`;let et=class extends(t(l)){constructor(){super(...arguments),this.shortcutSlot=new c(this,"shortcut"),this.visible=!1,this.position="top",this.role="tooltip",this.id="",this.delay=300,this.updatePosition=async()=>{var t;await Z(this.targetElement,this,{placement:this.position,middleware:[(t={padding:8},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=t,c={x:n,y:o},d=await g(e,a),h=u(f(i)),p="x"===h?"y":"x";let m=c[h],y=c[p];if(r){const t="y"===h?"bottom":"right";m=b(m+d["y"===h?"top":"left"],m,m-d[t])}if(l){const t="y"===p?"bottom":"right";y=b(y+d["y"===p?"top":"left"],y,y-d[t])}const v=s.fn({...e,[h]:m,[p]:y});return{...v,data:{x:v.x-n,y:v.y-o}}}}),T(8),L()]}).then((({x:t,y:e})=>{this.style.insetInlineStart=`${t}px`,this.style.insetBlockStart=`${e}px`}))},this.handleScroll=()=>{this.visible&&this.updatePosition()},this.showTooltip=()=>{this.updatePosition().then((()=>{this.visible=!0}))},this.hideTooltip=()=>{this.visible=!1}}willUpdate(t){t.has("id")&&!this.id&&console.warn("The tooltip requires an id attribute and value"),t.has("visible")&&(this.visible?(this.style.transitionDelay=`${this.delay}ms`,this.style.visibility="visible",this.style.opacity="1"):(this.style.transitionDelay="0ms",this.style.visibility="hidden",this.style.opacity="0"))}connectedCallback(){super.connectedCallback();const t=this.getRootNode();this.targetElement=t.querySelector(`[aria-describedby='${this.id}']`),this.targetElement.addEventListener("mouseenter",this.showTooltip),this.targetElement.addEventListener("mouseleave",this.hideTooltip),this.targetElement.addEventListener("focus",this.showTooltip),this.targetElement.addEventListener("blur",this.hideTooltip),window.addEventListener("resize",this.updatePosition,{passive:!0}),window.addEventListener("scroll",this.handleScroll,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.targetElement.removeEventListener("mouseenter",this.showTooltip),this.targetElement.removeEventListener("mouseleave",this.hideTooltip),this.targetElement.removeEventListener("focus",this.showTooltip),this.targetElement.removeEventListener("blur",this.hideTooltip),window.removeEventListener("resize",this.updatePosition),window.removeEventListener("scroll",this.handleScroll)}render(){return i`<div class="n-tooltip"><slot></slot>${this.shortcutSlot.hasContent?i`<div class="n-tooltip-shortcut"><slot class="n-tooltip-key" name="shortcut"></slot></div>`:r}</div>`}};et.styles=tt,e([a()],et.prototype,"visible",void 0),e([s({reflect:!0})],et.prototype,"position",void 0),e([s({reflect:!0})],et.prototype,"role",void 0),e([s({reflect:!0})],et.prototype,"id",void 0),e([s({reflect:!0,type:Number})],et.prototype,"delay",void 0),et=e([n("nord-tooltip")],et);var nt=et;export{nt as default};
import{D as t,_ as e,n}from"./DraftComponentMixin-1d7c27bc.js";import{r as o,$ as i,w as r,s}from"./lit-element-99571067.js";import{e as l}from"./property-03f59dce.js";import{t as a}from"./state-70f38ceb.js";import{S as c}from"./SlotController-a18e9d36.js";import{s as f}from"./Component-a6208841.js";function d(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function h(t){return["top","bottom"].includes(d(t))?"x":"y"}function p(t){return"y"===t?"height":"width"}function m(t){let{reference:e,floating:n,placement:o}=t;const i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;let s;switch(d(o)){case"top":s={x:i,y:e.y-n.height};break;case"bottom":s={x:i,y:e.y+e.height};break;case"right":s={x:e.x+e.width,y:r};break;case"left":s={x:e.x-n.width,y:r};break;default:s={x:e.x,y:e.y}}const l=h(o),a=p(l);switch(u(o)){case"start":s[l]=s[l]-(e[a]/2-n[a]/2);break;case"end":s[l]=s[l]+(e[a]/2-n[a]/2)}return s}function g(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function y(t,e){void 0===e&&(e={});const{x:n,y:o,platform:i,rects:r,elements:s,strategy:l}=t,{boundary:a="clippingParents",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:u=0}=e,h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),p=s[d?"floating"===f?"reference":"floating":f],m=await i.getClippingClientRect({element:await i.isElement(p)?p:p.contextElement||await i.getDocumentElement({element:s.floating}),boundary:a,rootBoundary:c}),y=g(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...r.floating,x:n,y:o}:r.reference,offsetParent:await i.getOffsetParent({element:s.floating}),strategy:l}));return{top:m.top-y.top+h.top,bottom:y.bottom-m.bottom+h.bottom,left:m.left-y.left+h.left,right:y.right-m.right+h.right}}const v=Math.min,b=Math.max;function x(t,e,n){return b(t,v(e,n))}const w={left:"right",right:"left",bottom:"top",top:"bottom"};function E(t){return t.replace(/left|right|bottom|top/g,(t=>w[t]))}const k={start:"end",end:"start"};function L(t){return t.replace(/start|end/g,(t=>k[t]))}const T=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l}=e;if(null!=(n=r.flip)&&n.skip)return{};const{mainAxis:a=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",flipAlignment:g=!0,...v}=t,b=d(i),x=f||(b===l||!g?[E(l)]:function(t){const e=E(t);return[L(t),e,L(e)]}(l)),w=[l,...x],k=await y(e,v),T=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(a&&T.push(k[b]),c){const{main:t,cross:e}=function(t,e){const n="start"===u(t),o=h(t),i=p(o);let r="x"===o?n?"right":"left":n?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=E(r)),{main:r,cross:E(r)}}(i,s);T.push(k[t],k[e])}if(C=[...C,{placement:i,overflows:T}],!T.every((t=>t<=0))){var R,S;const t=(null!=(R=null==(S=r.flip)?void 0:S.index)?R:0)+1,e=w[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let n="bottom";switch(m){case"bestFit":{var P;const t=null==(P=C.slice().sort(((t,e)=>t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)-e.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)))[0])?void 0:P.placement;t&&(n=t);break}case"initialPlacement":n=l}return{data:{skip:!0},reset:{placement:n}}}return{}}}};const C=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn(e){const{x:n,y:o,placement:i,rects:r}=e,s=function(t){let{placement:e,rects:n,value:o}=t;const i=d(e),r=["left","top"].includes(i)?-1:1,s="function"==typeof o?o({...n,placement:e}):o,{mainAxis:l,crossAxis:a}="number"==typeof s?{mainAxis:s,crossAxis:0}:{mainAxis:0,crossAxis:0,...s};return"x"===h(i)?{x:a,y:l*r}:{x:l*r,y:a}}({placement:i,rects:r,value:t});return{x:n+s.x,y:o+s.y,data:s}}}};function R(t){return"[object Window]"===(null==t?void 0:t.toString())}function S(t){if(null==t)return window;if(!R(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function P(t){return S(t).getComputedStyle(t)}function D(t){return R(t)?"":t?(t.nodeName||"").toLowerCase():""}function W(t){return t instanceof S(t).HTMLElement}function A(t){return t instanceof S(t).Element}function H(t){return t instanceof S(t).ShadowRoot||t instanceof ShadowRoot}function z(t){const{overflow:e,overflowX:n,overflowY:o}=P(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function N(t){return["table","td","th"].includes(D(t))}function j(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=P(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}const M=Math.min,B=Math.max,O=Math.round;function V(t,e){void 0===e&&(e=!1);const n=t.getBoundingClientRect();let o=1,i=1;return e&&W(t)&&(o=t.offsetWidth>0&&O(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&O(n.height)/t.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function $(t){return(e=t,(e instanceof S(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function q(t){return R(t)?{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}:{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function F(t){return V($(t)).left+q(t).scrollLeft}function X(t,e,n){const o=W(e),i=$(e),r=V(t,o&&function(t){const e=V(t);return O(e.width)!==t.offsetWidth||O(e.height)!==t.offsetHeight}(e));let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==D(e)||z(i))&&(s=q(e)),W(e)){const t=V(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=F(i));return{x:r.left+s.scrollLeft-l.x,y:r.top+s.scrollTop-l.y,width:r.width,height:r.height}}function Y(t){return"html"===D(t)?t:t.assignedSlot||t.parentNode||(H(t)?t.host:null)||$(t)}function I(t){return W(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function U(t){const e=S(t);let n=I(t);for(;n&&N(n)&&"static"===getComputedStyle(n).position;)n=I(n);return n&&("html"===D(n)||"body"===D(n)&&"static"===getComputedStyle(n).position&&!j(n))?e:n||function(t){let e=Y(t);for(;W(e)&&!["html","body"].includes(D(e));){if(j(e))return e;e=e.parentNode}return null}(t)||e}function _(t){return{width:t.offsetWidth,height:t.offsetHeight}}function G(t){return["html","body","#document"].includes(D(t))?t.ownerDocument.body:W(t)&&z(t)?t:G(Y(t))}function J(t,e){var n;void 0===e&&(e=[]);const o=G(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=S(o),s=i?[r].concat(r.visualViewport||[],z(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(J(Y(s)))}function K(t,e){return"viewport"===e?g(function(t){const e=S(t),n=$(t),o=e.visualViewport;let i=n.clientWidth,r=n.clientHeight,s=0,l=0;return o&&(i=o.width,r=o.height,Math.abs(e.innerWidth/o.scale-o.width)<.01&&(s=o.offsetLeft,l=o.offsetTop)),{width:i,height:r,x:s,y:l}}(t)):A(e)?function(t){const e=V(t),n=e.top+t.clientTop,o=e.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e):g(function(t){var e;const n=$(t),o=q(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=B(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=B(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let l=-o.scrollLeft+F(t);const a=-o.scrollTop;return"rtl"===P(i||n).direction&&(l+=B(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}($(t)))}function Q(t){const e=J(Y(t)),n=["absolute","fixed"].includes(P(t).position)&&W(t)?U(t):t;return A(n)?e.filter((t=>A(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&H(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==D(t))):[]}const Z={getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:X(e,U(n),o),floating:{..._(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:t=>function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=W(n),r=$(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==D(n)||z(r))&&(s=q(n)),W(n))){const t=V(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+l.x,y:e.y-s.scrollTop+l.y}}(t),getOffsetParent:t=>{let{element:e}=t;return U(e)},isElement:t=>A(t),getDocumentElement:t=>{let{element:e}=t;return $(e)},getClippingClientRect:t=>function(t){let{element:e,boundary:n,rootBoundary:o}=t;const i=[..."clippingParents"===n?Q(e):[].concat(n),o],r=i[0],s=i.reduce(((t,n)=>{const o=K(e,n);return t.top=B(o.top,t.top),t.right=M(o.right,t.right),t.bottom=M(o.bottom,t.bottom),t.left=B(o.left,t.left),t}),K(e,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(t),getDimensions:t=>{let{element:e}=t;return _(e)},getClientRects:t=>{let{element:e}=t;return e.getClientRects()}},tt=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n;let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:c}=m({...l,placement:o}),f=o,d={};for(let n=0;n<r.length;n++){const{name:u,fn:h}=r[n],{x:p,y:g,data:y,reset:v}=await h({x:a,y:c,initialPlacement:o,placement:f,strategy:i,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});a=null!=p?p:a,c=null!=g?g:c,d={...d,[u]:null!=y?y:{}},v&&("object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(l=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:a,y:c}=m({...l,placement:f}))),n=-1)}return{x:a,y:c,placement:f,strategy:i,middlewareData:d}})(t,e,{platform:Z,...n}),et=o`:host{--n-tooltip-background:rgba(20, 20, 20, 0.95);--n-tooltip-key-border:rgba(255, 255, 255, 0.03);--n-tooltip-key-background:rgba(255, 255, 255, 0.1);position:absolute;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .4s ease,visibility .4s ease,inset-inline-start .4s ease,inset-block-start .4s ease}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--n-color-text-inverse);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--n-tooltip-background);border-radius:var(--n-border-radius-s)}.n-tooltip,.n-tooltip-shortcut{display:flex;flex-wrap:wrap;align-items:center}.n-tooltip-shortcut{gap:2px}.n-tooltip-shortcut:empty{display:none}::slotted([slot=shortcut]):empty{display:none}::slotted([slot=shortcut]){box-sizing:border-box;margin:0;inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--n-tooltip-key-border);padding:1px;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;background-color:var(--n-tooltip-key-background)}`;let nt=class extends(t(s)){constructor(){super(...arguments),this.shortcutSlot=new c(this,"shortcut"),this.visible=!1,this.position="top",this.role="tooltip",this.id="",this.delay=300,this.updatePosition=async()=>{var t;await tt(this.targetElement,this,{placement:this.position,middleware:[(t={padding:8},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=t,c={x:n,y:o},f=await y(e,a),u=h(d(i)),p="x"===u?"y":"x";let m=c[u],g=c[p];if(r){const t="y"===u?"bottom":"right";m=x(m+f["y"===u?"top":"left"],m,m-f[t])}if(s){const t="y"===p?"bottom":"right";g=x(g+f["y"===p?"top":"left"],g,g-f[t])}const v=l.fn({...e,[u]:m,[p]:g});return{...v,data:{x:v.x-n,y:v.y-o}}}}),C(8),T()]}).then((({x:t,y:e})=>{this.style.insetInlineStart=`${t}px`,this.style.insetBlockStart=`${e}px`}))},this.handleScroll=()=>{this.visible&&this.updatePosition()},this.showTooltip=()=>{this.updatePosition().then((()=>{this.visible=!0}))},this.hideTooltip=()=>{this.visible=!1}}willUpdate(t){t.has("id")&&!this.id&&console.warn("The tooltip requires an id attribute and value"),t.has("visible")&&(this.visible?(this.style.transitionDelay=`${this.delay}ms`,this.style.visibility="visible",this.style.opacity="1"):(this.style.transitionDelay="0ms",this.style.visibility="hidden",this.style.opacity="0"))}connectedCallback(){super.connectedCallback();const t=this.getRootNode();this.targetElement=t.querySelector(`[aria-describedby='${this.id}']`),this.targetElement.addEventListener("mouseenter",this.showTooltip),this.targetElement.addEventListener("mouseleave",this.hideTooltip),this.targetElement.addEventListener("focus",this.showTooltip),this.targetElement.addEventListener("blur",this.hideTooltip),window.addEventListener("resize",this.updatePosition,{passive:!0}),window.addEventListener("scroll",this.handleScroll,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.targetElement.removeEventListener("mouseenter",this.showTooltip),this.targetElement.removeEventListener("mouseleave",this.hideTooltip),this.targetElement.removeEventListener("focus",this.showTooltip),this.targetElement.removeEventListener("blur",this.hideTooltip),window.removeEventListener("resize",this.updatePosition),window.removeEventListener("scroll",this.handleScroll)}render(){return i`<div class="n-tooltip"><slot></slot>${this.shortcutSlot.hasContent?i`<div class="n-tooltip-shortcut"><slot class="n-tooltip-key" name="shortcut"></slot></div>`:r}</div>`}};nt.styles=[f,et],e([a()],nt.prototype,"visible",void 0),e([l({reflect:!0})],nt.prototype,"position",void 0),e([l({reflect:!0})],nt.prototype,"role",void 0),e([l({reflect:!0})],nt.prototype,"id",void 0),e([l({reflect:!0,type:Number})],nt.prototype,"delay",void 0),nt=e([n("nord-tooltip")],nt);var ot=nt;export{ot as default};
//# sourceMappingURL=Tooltip.js.map
{
"name": "@nordhealth/components",
"version": "1.0.0-alpha.48",
"version": "1.0.0-alpha.49",
"description": "This package includes Nord Design System web components",

@@ -152,3 +152,3 @@ "author": "Nordhealth <info@nordhealth.com>",

},
"gitHead": "a16aae5dd7570cdc4471dc1d2790a8d15209658b"
"gitHead": "f6a87fcd7254973ea56046ba08d4751bcf33a8d7"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc