@umbraco-cms/backoffice 16.0.0-rc3 → 16.0.0-rc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/backoffice/backoffice.context.js +5 -1
- package/dist-cms/apps/backoffice/components/backoffice-main.element.js +3 -1
- package/dist-cms/assets/lang/en-us.js +1 -1
- package/dist-cms/assets/lang/en-us.ts +1 -1
- package/dist-cms/css/uui-css.css +481 -100
- package/dist-cms/custom-elements.json +33 -17
- package/dist-cms/external/rxjs/index.d.ts +1 -1
- package/dist-cms/external/rxjs/index.js +3 -3
- package/dist-cms/external/uui/index.js +663 -393
- package/dist-cms/libs/context-api/consume/context-consumer.js +1 -2
- package/dist-cms/libs/controller-api/controller-host.mixin.js +2 -2
- package/dist-cms/libs/extension-api/controller/server-extension-registrator.controller.js +6 -2
- package/dist-cms/packages/block/block/context/block-entry.context.js +10 -3
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit.element.js +1 -0
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +2 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/index.d.ts +2 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/index.js +2 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.d.ts +8 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.js +7 -0
- package/dist-cms/packages/content/content/{content-property.context.d.ts → components/property-type-based-property/property-type-based-property.context.d.ts} +6 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context.js +19 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.d.ts +1 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.js +8 -7
- package/dist-cms/packages/content/content/global-components/content-workspace-property.element.d.ts +26 -0
- package/dist-cms/packages/content/content/global-components/content-workspace-property.element.js +104 -0
- package/dist-cms/packages/content/content/global-components/index.d.ts +1 -0
- package/dist-cms/packages/content/content/global-components/index.js +1 -0
- package/dist-cms/packages/content/content/index.d.ts +1 -2
- package/dist-cms/packages/content/content/index.js +1 -2
- package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.js +2 -1
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.d.ts +1 -3
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.js +8 -48
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor.element.js +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.d.ts +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.js +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.d.ts +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.js +3 -3
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor.element.js +11 -7
- package/dist-cms/packages/content/property-type/workspace/property-type-workspace.context.js +5 -1
- package/dist-cms/packages/core/collection/collection-view.manager.js +4 -4
- package/dist-cms/packages/core/collection/components/collection-filter-field.element.js +1 -1
- package/dist-cms/packages/core/components/input-number-range/input-number-range.element.d.ts +4 -1
- package/dist-cms/packages/core/components/input-number-range/input-number-range.element.js +27 -3
- package/dist-cms/packages/core/components/input-with-alias/input-with-alias.element.js +0 -2
- package/dist-cms/packages/core/localization/manifests.js +27 -27
- package/dist-cms/packages/core/localization/registry/localization.registry.d.ts +2 -1
- package/dist-cms/packages/core/localization/registry/localization.registry.js +97 -37
- package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context-base.js +2 -2
- package/dist-cms/packages/core/package.json +2 -2
- package/dist-cms/packages/core/property/components/property/property.element.js +1 -0
- package/dist-cms/packages/core/property-editor/extensions/property-editor-ui-element.interface.d.ts +2 -0
- package/dist-cms/packages/core/repository/detail/detail-repository-base.js +6 -7
- package/dist-cms/packages/core/repository/item/item-repository-base.d.ts +1 -1
- package/dist-cms/packages/core/repository/item/item-repository-base.js +25 -9
- package/dist-cms/packages/core/repository/item/item-repository.interface.d.ts +1 -1
- package/dist-cms/packages/core/router/route/router-slot.element.js +3 -1
- package/dist-cms/packages/core/router/router-slot/model.d.ts +1 -0
- package/dist-cms/packages/core/router/router-slot/router-slot.d.ts +1 -0
- package/dist-cms/packages/core/router/router-slot/router-slot.js +30 -0
- package/dist-cms/packages/core/tree/data/tree-repository-base.d.ts +5 -1
- package/dist-cms/packages/core/tree/data/tree-repository-base.js +27 -13
- package/dist-cms/packages/core/tree/tree-item/tree-item.element.js +1 -1
- package/dist-cms/packages/core/validation/controllers/validation.controller.js +1 -1
- package/dist-cms/packages/core/workspace/components/workspace-action/common/save/save.action.js +3 -1
- package/dist-cms/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.element.js +5 -2
- package/dist-cms/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.js +2 -2
- package/dist-cms/packages/core/workspace/contexts/tokens/submittable-tree-entity-workspace.context-token.js +1 -1
- package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.d.ts +7 -0
- package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.js +31 -10
- package/dist-cms/packages/core/workspace/controllers/workspace-route-manager.controller.js +5 -5
- package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.js +1 -1
- package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.d.ts +1 -0
- package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.js +10 -0
- package/dist-cms/packages/data-type/collection/repository/data-type-collection.repository.js +6 -1
- package/dist-cms/packages/data-type/repository/detail/data-type-detail.repository.js +6 -1
- package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace-editor.element.js +5 -4
- package/dist-cms/packages/documents/documents/entity-actions/create-blueprint/modal/create-blueprint-modal.element.js +1 -1
- package/dist-cms/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.js +12 -2
- package/dist-cms/packages/documents/documents/tree/document-tree.context.js +2 -2
- package/dist-cms/packages/documents/documents/types.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/index.js +1 -0
- package/dist-cms/packages/documents/documents/url/types.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/types.js +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/document/conditions/document-user-permission.condition.js +3 -1
- package/dist-cms/packages/documents/documents/workspace/actions/save.action.js +4 -2
- package/dist-cms/packages/documents/documents/workspace/document-workspace-editor.element.js +13 -7
- package/dist-cms/packages/log-viewer/components/log-viewer-date-range-selector.element.d.ts +0 -2
- package/dist-cms/packages/log-viewer/components/log-viewer-date-range-selector.element.js +12 -24
- package/dist-cms/packages/log-viewer/repository/sources/log-viewer.server.data.js +9 -1
- package/dist-cms/packages/log-viewer/workspace/views/search/components/log-viewer-message.element.js +1 -1
- package/dist-cms/packages/media/media/dashboard/media-dashboard.element.js +1 -0
- package/dist-cms/packages/media/media/modals/media-picker/media-picker-modal.element.js +2 -2
- package/dist-cms/packages/media/media/tree/media-tree.context.js +2 -2
- package/dist-cms/packages/media/media/workspace/media-workspace-editor.element.js +1 -0
- package/dist-cms/packages/members/member/repository/member-repository-base.d.ts +8 -8
- package/dist-cms/packages/members/member/repository/member-repository-base.js +13 -12
- package/dist-cms/packages/members/member/workspace/member/member-workspace-editor.element.js +1 -0
- package/dist-cms/packages/packages/package-section/views/created/created-packages-section-view.element.js +1 -0
- package/dist-cms/packages/property-editors/dimensions/property-editor-ui-dimensions.element.js +16 -3
- package/dist-cms/packages/segment/package.json +8 -0
- package/dist-cms/packages/settings/package.json +8 -0
- package/dist-cms/packages/settings/vite.config.d.ts +2 -0
- package/dist-cms/packages/settings/vite.config.js +11 -0
- package/dist-cms/packages/templating/partial-views/entity-actions/rename/rename-partial-view.server.data-source.js +1 -1
- package/dist-cms/packages/templating/partial-views/repository/partial-view-detail.server.data-source.js +3 -3
- package/dist-cms/packages/templating/partial-views/tree/folder/repository/partial-view-folder.server.data-source.js +2 -2
- package/dist-cms/packages/templating/scripts/entity-actions/rename/rename-script.server.data-source.js +1 -1
- package/dist-cms/packages/templating/scripts/repository/script-detail.server.data-source.js +3 -3
- package/dist-cms/packages/templating/scripts/tree/folder/repository/script-folder.server.data-source.js +2 -2
- package/dist-cms/packages/templating/stylesheets/entity-actions/rename/rename-stylesheet.server.data-source.js +1 -1
- package/dist-cms/packages/templating/stylesheets/repository/stylesheet-detail.server.data-source.js +3 -3
- package/dist-cms/packages/templating/stylesheets/tree/folder/repository/stylesheet-folder.server.data-source.js +2 -2
- package/dist-cms/packages/tiptap/components/character-map/character-map-modal.element.js +0 -4
- package/dist-cms/packages/tiptap/components/input-tiptap/input-tiptap.element.js +1 -1
- package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.d.ts +6 -0
- package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.js +7 -1
- package/dist-cms/packages/tiptap/property-editors/tiptap/components/property-editor-ui-tiptap-extensions-configuration.element.js +1 -1
- package/dist-cms/packages/tiptap/property-editors/tiptap/components/property-editor-ui-tiptap-statusbar-configuration.element.js +0 -4
- package/dist-cms/packages/tiptap/property-editors/tiptap/components/property-editor-ui-tiptap-toolbar-configuration.element.js +1 -4
- package/dist-cms/packages/translation/package.json +8 -0
- package/dist-cms/packages/user/current-user/current-user.context.js +4 -1
- package/dist-cms/packages/user/current-user/repository/current-user.repository.d.ts +2 -2
- package/dist-cms/packages/user/current-user/repository/current-user.repository.js +8 -5
- package/dist-cms/packages/user/user/repository/user-repository-base.d.ts +7 -7
- package/dist-cms/packages/user/user/repository/user-repository-base.js +13 -12
- package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.js +4 -1
- package/dist-cms/packages/user/user-group/collection/user-group-collection.element.js +1 -1
- package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.d.ts +4 -0
- package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.js +7 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package.json +1 -1
- package/dist-cms/vscode-html-custom-data.json +16 -10
- package/examples/modal-routed/dashboard.element.ts +1 -0
- package/examples/modal-routed/modal/example-modal.element.ts +1 -0
- package/examples/validation-context/validation-context-dashboard.ts +12 -12
- package/package.json +8 -7
- package/dist-cms/packages/content/content/content-property.context-token.d.ts +0 -3
- package/dist-cms/packages/content/content/content-property.context-token.js +0 -2
- package/dist-cms/packages/content/content/content-property.context.js +0 -14
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.d.ts +0 -21
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.js +0 -63
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const co=globalThis,Rs=co.ShadowRoot&&(co.ShadyCSS===void 0||co.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ws=Symbol(),za=new WeakMap;let Ma=class{constructor(t,i,o){if(this._$cssResult$=!0,o!==Ws)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(Rs&&t===void 0){const o=i!==void 0&&i.length===1;o&&(t=za.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&za.set(i,t))}return t}toString(){return this.cssText}};const mt=e=>new Ma(typeof e=="string"?e:e+"",void 0,Ws),b=(e,...t)=>{const i=e.length===1?e[0]:t.reduce((o,r,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1],e[0]);return new Ma(i,e,Ws)},Hc=(e,t)=>{if(Rs)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const o=document.createElement("style"),r=co.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,e.appendChild(o)}},Da=Rs?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const o of t.cssRules)i+=o.cssText;return mt(i)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:jc,defineProperty:Rc,getOwnPropertyDescriptor:Wc,getOwnPropertyNames:Fc,getOwnPropertySymbols:Gc,getPrototypeOf:qc}=Object,ho=globalThis,La=ho.trustedTypes,Kc=La?La.emptyScript:"",Xc=ho.reactiveElementPolyfillSupport,gr=(e,t)=>e,po={toAttribute(e,t){switch(t){case Boolean:e=e?Kc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Fs=(e,t)=>!jc(e,t),Ta={attribute:!0,type:String,converter:po,reflect:!1,useDefault:!1,hasChanged:Fs};Symbol.metadata??=Symbol("metadata"),ho.litPropertyMetadata??=new WeakMap;let vi=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=Ta){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){const o=Symbol(),r=this.getPropertyDescriptor(t,o,i);r!==void 0&&Rc(this.prototype,t,r)}}static getPropertyDescriptor(t,i,o){const{get:r,set:s}=Wc(this.prototype,t)??{get(){return this[i]},set(n){this[i]=n}};return{get:r,set(n){const u=r?.call(this);s?.call(this,n),this.requestUpdate(t,u,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ta}static _$Ei(){if(this.hasOwnProperty(gr("elementProperties")))return;const t=qc(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(gr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gr("properties"))){const i=this.properties,o=[...Fc(i),...Gc(i)];for(const r of o)this.createProperty(r,i[r])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(const[i,o]of this.elementProperties){const r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const r of o)i.unshift(Da(r))}else t!==void 0&&i.push(Da(t));return i}static _$Eu(t,i){const o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const o of i.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Hc(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ET(t,i){const o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){const s=(o.converter?.toAttribute!==void 0?o.converter:po).toAttribute(i,o.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,i){const o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const s=o.getPropertyOptions(r),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:po;this._$Em=r,this[r]=n.fromAttribute(i,s.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,i,o){if(t!==void 0){const r=this.constructor,s=this[t];if(o??=r.getPropertyOptions(t),!((o.hasChanged??Fs)(s,i)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:o,reflect:r,wrapped:s},n){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??i??this[t]),s!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(i=void 0),this._$AL.set(t,i)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[r,s]of o){const{wrapped:n}=s,u=this[r];n!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,s,u)}}let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(i)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(t){}firstUpdated(t){}};vi.elementStyles=[],vi.shadowRootOptions={mode:"open"},vi[gr("elementProperties")]=new Map,vi[gr("finalized")]=new Map,Xc?.({ReactiveElement:vi}),(ho.reactiveElementVersions??=[]).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Gs=globalThis,vo=Gs.trustedTypes,Na=vo?vo.createPolicy("lit-html",{createHTML:e=>e}):void 0,Va="$lit$",_t=`lit$${Math.random().toFixed(9).slice(2)}$`,Ba="?"+_t,Yc=`<${Ba}>`,Dt=document,mr=()=>Dt.createComment(""),_r=e=>e===null||typeof e!="object"&&typeof e!="function",qs=Array.isArray,Zc=e=>qs(e)||typeof e?.[Symbol.iterator]=="function",Ks=`[
|
|
14
|
+
\f\r]`,yr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ha=/-->/g,ja=/>/g,Lt=RegExp(`>|${Ks}(?:([^\\s"'>=/]+)(${Ks}*=${Ks}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ra=/'/g,Wa=/"/g,Fa=/^(?:script|style|textarea|title)$/i,Ga=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),l=Ga(1),m=Ga(2),he=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),qa=new WeakMap,Tt=Dt.createTreeWalker(Dt,129);function Ka(e,t){if(!qs(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Na!==void 0?Na.createHTML(t):t}const Qc=(e,t)=>{const i=e.length-1,o=[];let r,s=t===2?"<svg>":t===3?"<math>":"",n=yr;for(let u=0;u<i;u++){const c=e[u];let p,f,h=-1,C=0;for(;C<c.length&&(n.lastIndex=C,f=n.exec(c),f!==null);)C=n.lastIndex,n===yr?f[1]==="!--"?n=Ha:f[1]!==void 0?n=ja:f[2]!==void 0?(Fa.test(f[2])&&(r=RegExp("</"+f[2],"g")),n=Lt):f[3]!==void 0&&(n=Lt):n===Lt?f[0]===">"?(n=r??yr,h=-1):f[1]===void 0?h=-2:(h=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?Lt:f[3]==='"'?Wa:Ra):n===Wa||n===Ra?n=Lt:n===Ha||n===ja?n=yr:(n=Lt,r=void 0);const d=n===Lt&&e[u+1].startsWith("/>")?" ":"";s+=n===yr?c+Yc:h>=0?(o.push(p),c.slice(0,h)+Va+c.slice(h)+_t+d):c+_t+(h===-2?u:d)}return[Ka(e,s+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};let Xs=class Vc{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let s=0,n=0;const u=t.length-1,c=this.parts,[p,f]=Qc(t,i);if(this.el=Vc.createElement(p,o),Tt.currentNode=this.el.content,i===2||i===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=Tt.nextNode())!==null&&c.length<u;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(Va)){const C=f[n++],d=r.getAttribute(h).split(_t),y=/([.?@])?(.*)/.exec(C);c.push({type:1,index:s,name:y[2],strings:d,ctor:y[1]==="."?eh:y[1]==="?"?th:y[1]==="@"?ih:fo}),r.removeAttribute(h)}else h.startsWith(_t)&&(c.push({type:6,index:s}),r.removeAttribute(h));if(Fa.test(r.tagName)){const h=r.textContent.split(_t),C=h.length-1;if(C>0){r.textContent=vo?vo.emptyScript:"";for(let d=0;d<C;d++)r.append(h[d],mr()),Tt.nextNode(),c.push({type:2,index:++s});r.append(h[C],mr())}}}else if(r.nodeType===8)if(r.data===Ba)c.push({type:2,index:s});else{let h=-1;for(;(h=r.data.indexOf(_t,h+1))!==-1;)c.push({type:7,index:s}),h+=_t.length-1}s++}}static createElement(t,i){const o=Dt.createElement("template");return o.innerHTML=t,o}};function fi(e,t,i=e,o){if(t===he)return t;let r=o!==void 0?i._$Co?.[o]:i._$Cl;const s=_r(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(e),r._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=r:i._$Cl=r),r!==void 0&&(t=fi(e,r._$AS(e,t.values),r,o)),t}let Jc=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:o}=this._$AD,r=(t?.creationScope??Dt).importNode(i,!0);Tt.currentNode=r;let s=Tt.nextNode(),n=0,u=0,c=o[0];for(;c!==void 0;){if(n===c.index){let p;c.type===2?p=new fr(s,s.nextSibling,this,t):c.type===1?p=new c.ctor(s,c.name,c.strings,this,t):c.type===6&&(p=new rh(s,this,t)),this._$AV.push(p),c=o[++u]}n!==c?.index&&(s=Tt.nextNode(),n++)}return Tt.currentNode=Dt,r}p(t){let i=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}};class fr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,r){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=fi(this,t,i),_r(t)?t===E||t==null||t===""?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==he&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Zc(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&_r(this._$AH)?this._$AA.nextSibling.data=t:this.T(Dt.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=Xs.createElement(Ka(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(i);else{const s=new Jc(r,this),n=s.u(this.options);s.p(i),this.T(n),this._$AH=s}}_$AC(t){let i=qa.get(t.strings);return i===void 0&&qa.set(t.strings,i=new Xs(t)),i}k(t){qs(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,r=0;for(const s of t)r===i.length?i.push(o=new fr(this.O(mr()),this.O(mr()),this,this.options)):o=i[r],o._$AI(s),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}let fo=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,r,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=r,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=E}_$AI(t,i=this,o,r){const s=this.strings;let n=!1;if(s===void 0)t=fi(this,t,i,0),n=!_r(t)||t!==this._$AH&&t!==he,n&&(this._$AH=t);else{const u=t;let c,p;for(t=s[0],c=0;c<s.length-1;c++)p=fi(this,u[o+c],i,c),p===he&&(p=this._$AH[c]),n||=!_r(p)||p!==this._$AH[c],p===E?t=E:t!==E&&(t+=(p??"")+s[c+1]),this._$AH[c]=p}n&&!r&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},eh=class extends fo{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}};class th extends fo{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class ih extends fo{constructor(t,i,o,r,s){super(t,i,o,r,s),this.type=5}_$AI(t,i=this){if((t=fi(this,t,i,0)??E)===he)return;const o=this._$AH,r=t===E&&o!==E||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==E&&(o===E||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class rh{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){fi(this,t)}}const oh={I:fr},sh=Gs.litHtmlPolyfillSupport;sh?.(Xs,fr),(Gs.litHtmlVersions??=[]).push("3.3.0");const nh=(e,t,i)=>{const o=i?.renderBefore??t;let r=o._$litPart$;if(r===void 0){const s=i?.renderBefore??null;o._$litPart$=r=new fr(t.insertBefore(mr(),s),s,void 0,i??{})}return r._$AI(e),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const
|
|
19
|
+
*/const Ys=globalThis;let g=class extends vi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=nh(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return he}};g._$litElement$=!0,g.finalized=!0,Ys.litElementHydrateSupport?.({LitElement:g});const ah=Ys.litElementPolyfillSupport;ah?.({LitElement:g}),(Ys.litElementVersions??=[]).push("4.2.0");var lh=`.uui-h1,
|
|
20
20
|
.uui-h2,
|
|
21
21
|
.uui-h3,
|
|
22
22
|
.uui-h4,
|
|
@@ -44,10 +44,12 @@
|
|
|
44
44
|
margin-top: var(--uui-size-layout-1,24px);
|
|
45
45
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
46
46
|
}
|
|
47
|
+
|
|
47
48
|
.uui-text p + h1,
|
|
48
49
|
.uui-text p + .uui-h1 {
|
|
49
50
|
margin-top: var(--uui-size-layout-4,66px);
|
|
50
51
|
}
|
|
52
|
+
|
|
51
53
|
.uui-text h1.--no-top-margin,
|
|
52
54
|
.uui-text h1:first-child,
|
|
53
55
|
.uui-h1.--no-top-margin,
|
|
@@ -64,10 +66,12 @@
|
|
|
64
66
|
margin-top: var(--uui-size-layout-1,24px);
|
|
65
67
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
66
68
|
}
|
|
69
|
+
|
|
67
70
|
.uui-text p + h2,
|
|
68
71
|
.uui-text p + .uui-h2 {
|
|
69
72
|
margin-top: var(--uui-size-layout-3,42px);
|
|
70
73
|
}
|
|
74
|
+
|
|
71
75
|
.uui-text h2.--no-top-margin,
|
|
72
76
|
.uui-text h2:first-child,
|
|
73
77
|
.uui-h2.--no-top-margin,
|
|
@@ -84,6 +88,7 @@
|
|
|
84
88
|
margin-top: var(--uui-size-layout-1,24px);
|
|
85
89
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
86
90
|
}
|
|
91
|
+
|
|
87
92
|
.uui-text h3.--no-top-margin,
|
|
88
93
|
.uui-text h3:first-child,
|
|
89
94
|
.uui-h3.--no-top-margin,
|
|
@@ -100,6 +105,7 @@
|
|
|
100
105
|
margin-top: var(--uui-size-layout-1,24px);
|
|
101
106
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
102
107
|
}
|
|
108
|
+
|
|
103
109
|
.uui-text h4.--no-top-margin,
|
|
104
110
|
.uui-text h4:first-child,
|
|
105
111
|
.uui-h4.--no-top-margin,
|
|
@@ -129,6 +135,7 @@
|
|
|
129
135
|
margin-top: var(--uui-size-layout-1,24px);
|
|
130
136
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
131
137
|
}
|
|
138
|
+
|
|
132
139
|
.uui-p-lead,
|
|
133
140
|
.uui-text p.uui-lead {
|
|
134
141
|
font-size: var(--uui-size-6,18px);
|
|
@@ -145,6 +152,7 @@
|
|
|
145
152
|
.uui-text a:active {
|
|
146
153
|
color: var(--uui-color-interactive,#1b264f);
|
|
147
154
|
}
|
|
155
|
+
|
|
148
156
|
.uui-a:hover,
|
|
149
157
|
.uui-text a:hover {
|
|
150
158
|
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
@@ -207,11 +215,11 @@
|
|
|
207
215
|
margin-top: var(--uui-size-layout-1,24px);
|
|
208
216
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
209
217
|
}
|
|
210
|
-
`;const
|
|
218
|
+
`;const bi=mt(lh);/**
|
|
211
219
|
* @license
|
|
212
220
|
* Copyright 2017 Google LLC
|
|
213
221
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
214
|
-
*/const
|
|
222
|
+
*/const uh={attribute:!0,type:String,converter:po,reflect:!1,hasChanged:Fs},ch=(e=uh,t,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),o==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),o==="accessor"){const{name:n}=i;return{set(u){const c=t.get.call(this);t.set.call(this,u),this.requestUpdate(n,c,e)},init(u){return u!==void 0&&this.C(n,void 0,e,u),u}}}if(o==="setter"){const{name:n}=i;return function(u){const c=this[n];t.call(this,u),this.requestUpdate(n,c,e)}}throw Error("Unsupported decorator location: "+o)};function a(e){return(t,i)=>typeof i=="object"?ch(e,t,i):((o,r,s)=>{const n=r.hasOwnProperty(s);return r.constructor.createProperty(s,o),n?Object.getOwnPropertyDescriptor(r,s):void 0})(e,t,i)}/**
|
|
215
223
|
* @license
|
|
216
224
|
* Copyright 2017 Google LLC
|
|
217
225
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -219,19 +227,19 @@
|
|
|
219
227
|
* @license
|
|
220
228
|
* Copyright 2017 Google LLC
|
|
221
229
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
222
|
-
*/const
|
|
230
|
+
*/const Zs=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,i),i);/**
|
|
223
231
|
* @license
|
|
224
232
|
* Copyright 2017 Google LLC
|
|
225
233
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
226
|
-
*/function O(e,t){return(i,o,r)=>{const s=n=>n.renderRoot?.querySelector(e)??null;return
|
|
234
|
+
*/function O(e,t){return(i,o,r)=>{const s=n=>n.renderRoot?.querySelector(e)??null;return Zs(i,o,{get(){return s(this)}})}}/**
|
|
227
235
|
* @license
|
|
228
236
|
* Copyright 2017 Google LLC
|
|
229
237
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
230
|
-
*/let
|
|
238
|
+
*/let hh;function dh(e){return(t,i)=>Zs(t,i,{get(){return(this.renderRoot??(hh??=document.createDocumentFragment())).querySelectorAll(e)}})}/**
|
|
231
239
|
* @license
|
|
232
240
|
* Copyright 2021 Google LLC
|
|
233
241
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
234
|
-
*/function
|
|
242
|
+
*/function yt(e){return(t,i)=>{const{slot:o,selector:r}=e??{},s="slot"+(o?`[name=${o}]`:":not([name])");return Zs(t,i,{get(){const n=this.renderRoot?.querySelector(s),u=n?.assignedElements(e)??[];return r===void 0?u:u.filter(c=>c.matches(r))}})}}const ph=b`
|
|
235
243
|
@keyframes uui-blink {
|
|
236
244
|
0%,
|
|
237
245
|
100% {
|
|
@@ -241,7 +249,7 @@
|
|
|
241
249
|
opacity: 1;
|
|
242
250
|
}
|
|
243
251
|
}
|
|
244
|
-
`,
|
|
252
|
+
`,vh=mt("uui-blink 0.9s infinite both"),fh=b`
|
|
245
253
|
@keyframes pulse {
|
|
246
254
|
0% {
|
|
247
255
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -259,7 +267,7 @@
|
|
|
259
267
|
opacity: 0;
|
|
260
268
|
}
|
|
261
269
|
}
|
|
262
|
-
`,
|
|
270
|
+
`,bh=mt("pulse 0.8s ease-in-out infinite both"),gh=b`
|
|
263
271
|
@keyframes uui-horizontal-shake {
|
|
264
272
|
10%,
|
|
265
273
|
90% {
|
|
@@ -282,14 +290,14 @@
|
|
|
282
290
|
transform: translateX(2px);
|
|
283
291
|
}
|
|
284
292
|
}
|
|
285
|
-
`,
|
|
293
|
+
`,mh=mt("uui-horizontal-shake 600ms ease backwards");let Qs=class extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}},Ye=class extends Qs{constructor(t,i={}){super(t,{bubbles:!0,...i})}};Ye.VALID="valid",Ye.INVALID="invalid";let Nt=class extends Qs{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}};Nt.SELECTED="selected",Nt.DESELECTED="deselected";var _h=Object.defineProperty,yh=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&_h(t,i,r),r};const wh=e=>{class t extends e{constructor(){super(...arguments),this.active=!1}}return yh([a({type:Boolean,reflect:!0})],t.prototype,"active"),t};var xh=Object.defineProperty,Xa=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&xh(t,i,r),r};const $h=(e,t)=>{class i extends t{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(r){super.firstUpdated(r),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(r){this._labelSlotHasContent=r.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return l`
|
|
286
294
|
${this._labelSlotHasContent===!1?l`<span class="label">${this.label}</span>`:""}
|
|
287
295
|
<slot
|
|
288
296
|
class="label"
|
|
289
|
-
style=${this._labelSlotHasContent?"":"
|
|
297
|
+
style=${this._labelSlotHasContent?"":"display: none"}
|
|
290
298
|
name=${e||""}
|
|
291
299
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
292
|
-
`}}return Ta([a({type:String})],i.prototype,"label"),Ta([_()],i.prototype,"_labelSlotHasContent"),i};var th=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,Va=e=>{throw TypeError(e)},Na=(e,t,i,o)=>{for(var r=o>1?void 0:o?ih(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&th(t,i,r),r},Fs=(e,t,i)=>t.has(e)||Va("Cannot "+i),ie=(e,t,i)=>(Fs(e,t,"read from private field"),i?i.call(e):t.get(e)),co=(e,t,i)=>t.has(e)?Va("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),rh=(e,t,i,o)=>(Fs(e,t,"write to private field"),t.set(e,i),i),ho=(e,t,i)=>(Fs(e,t,"access private method"),i);const oh=e=>{var t,i,o,r,s,n,u;class c extends e{constructor(...f){super(...f),co(this,r),this._selectable=!1,this.deselectable=!0,this.selected=!1,co(this,t,this),co(this,i,h=>{h.code!=="Space"&&h.code!=="Enter"||h.composedPath().indexOf(ie(this,t))===0&&ie(this,o).call(this,h)}),co(this,o,h=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const d=h.composedPath();ie(this,t)===this&&d.some(I=>{const $=I.tagName;return $==="A"||$==="BUTTON"||$==="INPUT"||$==="TEXTAREA"||$==="SELECT"})||d.indexOf(ie(this,t))!==-1&&(h.type==="keydown"&&h.preventDefault(),ho(this,r,s).call(this))}),this.addEventListener("click",ie(this,o)),this.addEventListener("keydown",ie(this,i))}get selectable(){return this._selectable}set selectable(f){const h=this._selectable;h!==f&&(this._selectable=f,ie(this,t)===this&&ie(this,t).setAttribute("tabindex",`${f?"0":"-1"}`),this.requestUpdate("selectable",h))}get selectableTarget(){return ie(this,t)}set selectableTarget(f){const h=ie(this,t);h.removeAttribute("tabindex"),h.removeEventListener("click",ie(this,o)),h.removeEventListener("keydown",ie(this,i)),rh(this,t,f),ie(this,t)===this&&ie(this,t).setAttribute("tabindex",this._selectable?"0":"-1"),f.addEventListener("click",ie(this,o)),f.addEventListener("keydown",ie(this,i))}}return t=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,s=function(){this.selectable&&(this.deselectable===!1?ho(this,r,n).call(this):this.selected?ho(this,r,u).call(this):ho(this,r,n).call(this))},n=function(){if(!this.selectable)return;const p=new Mt(Mt.SELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!0)},u=function(){if(!this.deselectable)return;const p=new Mt(Mt.DESELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!1)},Na([a({type:Boolean,reflect:!0})],c.prototype,"selectable",1),Na([a({type:Boolean,reflect:!0})],c.prototype,"selected",2),c};var sh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,ah=(e,t,i,o)=>{for(var r=nh(t,i),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&sh(t,i,r),r};const lh=e=>{class t extends e{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return ah([a({type:Boolean,reflect:!0,attribute:"select-only"})],t.prototype,"selectOnly"),t};var uh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,Ba=e=>{throw TypeError(e)},Dt=(e,t,i,o)=>{for(var r=o>1?void 0:o?ch(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&uh(t,i,r),r},Gs=(e,t,i)=>t.has(e)||Ba("Cannot "+i),U=(e,t,i)=>(Gs(e,t,"read from private field"),i?i.call(e):t.get(e)),Lt=(e,t,i)=>t.has(e)?Ba("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),qs=(e,t,i,o)=>(Gs(e,t,"write to private field"),t.set(e,i),i),po=(e,t,i)=>(Gs(e,t,"access private method"),i);const hh=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],dh=(e,t)=>{var i,o,r,s,n,u,c,p,f;class h extends e{constructor(...d){super(...d),Lt(this,u),this.name="",Lt(this,i,{}),this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",Lt(this,o,t),Lt(this,r,null),Lt(this,s,[]),Lt(this,n,[]),Lt(this,f,()=>{this.pristine=!1}),this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}get value(){return U(this,o)}set value(d){const y=U(this,o);qs(this,o,d),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(U(this,o)??null),this.requestUpdate("value",y)}set pristine(d){this._pristine!==d&&(this._pristine=d,d?this.setAttribute("pristine",""):this.removeAttribute("pristine"),po(this,u,p).call(this))}get pristine(){return this._pristine}hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const d=U(this,n).find(y=>y.validity.valid===!1);d?"focusFirstInvalidElement"in d?d.focusFirstInvalidElement():d.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),po(this,u,c).call(this)}addValidator(d,y,I){const $={flagKey:d,getMessageMethod:y,checkMethod:I,weight:hh.indexOf(d)};return U(this,s).push($),U(this,s).sort((V,te)=>V.weight>te.weight?1:te.weight>V.weight?-1:0),$}removeValidator(d){const y=U(this,s).indexOf(d);y!==-1&&U(this,s).splice(y,1)}addFormControlElement(d){U(this,n).push(d),d.addEventListener(qe.INVALID,()=>{this._runValidators()}),d.addEventListener(qe.VALID,()=>{this._runValidators()}),this._pristine===!1&&(d.checkValidity(),this._runValidators())}setCustomValidity(d){this._customValidityObject&&this.removeValidator(this._customValidityObject),d!=null&&d!==""&&(this._customValidityObject=this.addValidator("customError",()=>d,()=>!0)),this._runValidators()}_runValidators(){qs(this,i,{});let d,y;U(this,s).some($=>$.checkMethod()?(U(this,i)[$.flagKey]=!0,d=$.getMessageMethod(),!0):!1),d||U(this,n).some($=>{let V;for(V in $.validity)if(V!=="valid"&&$.validity[V])return U(this,i)[V]=!0,d=$.validationMessage,y??(y=$),!0;return!1});const I=Object.values(U(this,i)).includes(!0);U(this,i).valid=!I,this._internals.setValidity(U(this,i),d,y??this.getFormElement()??void 0),po(this,u,p).call(this)}updated(d){super.updated(d),this._runValidators()}submit(){U(this,r)?.requestSubmit()}formAssociatedCallback(){po(this,u,c).call(this),qs(this,r,this._internals.form),U(this,r)&&(U(this,r).hasAttribute("submit-invalid")&&(this.pristine=!1),U(this,r).addEventListener("submit",U(this,f)))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return t}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const d in U(this,n))if(U(this,n)[d].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return U(this,i)}get validationMessage(){return this._internals?.validationMessage}}return i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakMap,n=new WeakMap,u=new WeakSet,c=function(){U(this,r)&&U(this,r).removeEventListener("submit",U(this,f))},p=function(){this._pristine!==!0&&(U(this,i).valid?this.dispatchEvent(new qe(qe.VALID)):this.dispatchEvent(new qe(qe.INVALID)))},f=new WeakMap,h.formAssociated=!0,Dt([a({type:String})],h.prototype,"name",2),Dt([a()],h.prototype,"value",1),Dt([a({type:Boolean,reflect:!0,attribute:"pristine"})],h.prototype,"pristine",1),Dt([a({type:Boolean,reflect:!0})],h.prototype,"required",2),Dt([a({type:String,attribute:"required-message"})],h.prototype,"requiredMessage",2),Dt([a({type:Boolean,reflect:!0})],h.prototype,"error",2),Dt([a({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),h};let ph=class{constructor(t,i){this._callback=t,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}setDuration(t){this._duration=t,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const vh=(e,t,i=`This element has to be present for ${e.nodeName} to work appropriate.`)=>{customElements.get(t)||console.warn(`%c ${e.nodeName} requires ${t} element to be registered!`,"font-weight: bold;",i,e)},fh=(e,t)=>{function i(r){const s=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let p;if("TouchEvent"in window&&r instanceof TouchEvent)p=r.touches[0];else if(r instanceof PointerEvent)p=r;else return;const f=p.pageX-u,h=p.pageY-c;t?.onMove&&t.onMove(f,h)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),t?.onStop&&t.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),t?.initialEvent&&i(t.initialEvent)},bh=(e,t,i)=>Math.min(Math.max(e,t),i),gh=(e,t,i)=>i+t-e,mh=e=>{const t=Math.round(e).toString(16);return t.length===1?`0${t}`:t},Ha=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function _h(e){return e?e.assignedNodes({flatten:!0}).length>0:!1}var yh=Object.defineProperty,ja=e=>{throw TypeError(e)},wh=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&yh(t,i,r),r},Ra=(e,t,i)=>t.has(e)||ja("Cannot "+i),Wa=(e,t,i)=>(Ra(e,t,"read from private field"),t.get(e)),Fa=(e,t,i)=>t.has(e)?ja("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),xh=(e,t,i,o)=>(Ra(e,t,"write to private field"),t.set(e,i),i);const $h=e=>{var t,i;class o extends e{constructor(...s){super(...s),Fa(this,t,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Ha(this,"id",this.popoverContainerElement);n&&(Wa(this,t)?n.hidePopover():n.showPopover())},Fa(this,i,n=>{requestAnimationFrame(()=>{xh(this,t,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",Wa(this,i))}}return t=new WeakMap,i=new WeakMap,wh([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement"),o};function kh(e,t){return i=>{if(e.indexOf("-")>0===!1){console.error(`${e} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(e)||window.customElements.define(e,i,t)}}const Ch=["default","primary","secondary","outline","placeholder"],Eh=["default","positive","warning","danger","invalid"],Ph=["h1","h2","h3","h4","h5","h6"];function v(e,t){return i=>{if(e.indexOf("-")>0===!1){console.error(`${e} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(e)||window.customElements.define(e,i,t)}}var Sh=Object.getOwnPropertyDescriptor,Oh=(e,t,i,o)=>{for(var r=o>1?void 0:o?Sh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let di=class extends g{render(){return l`<slot></slot>`}};di.styles=[b`
|
|
300
|
+
`}}return Xa([a({type:String})],i.prototype,"label"),Xa([_()],i.prototype,"_labelSlotHasContent"),i};var kh=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,Ya=e=>{throw TypeError(e)},Za=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ch(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&kh(t,i,r),r},Js=(e,t,i)=>t.has(e)||Ya("Cannot "+i),re=(e,t,i)=>(Js(e,t,"read from private field"),i?i.call(e):t.get(e)),bo=(e,t,i)=>t.has(e)?Ya("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Eh=(e,t,i,o)=>(Js(e,t,"write to private field"),t.set(e,i),i),go=(e,t,i)=>(Js(e,t,"access private method"),i);const Ph=e=>{var t,i,o,r,s,n,u;class c extends e{constructor(...f){super(...f),bo(this,r),this._selectable=!1,this.deselectable=!0,this.selected=!1,bo(this,t,this),bo(this,i,h=>{h.code!=="Space"&&h.code!=="Enter"||h.composedPath().indexOf(re(this,t))===0&&re(this,o).call(this,h)}),bo(this,o,h=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const d=h.composedPath();re(this,t)===this&&d.some(I=>{const $=I.tagName;return $==="A"||$==="BUTTON"||$==="INPUT"||$==="TEXTAREA"||$==="SELECT"})||d.indexOf(re(this,t))!==-1&&(h.type==="keydown"&&h.preventDefault(),go(this,r,s).call(this))}),this.addEventListener("click",re(this,o)),this.addEventListener("keydown",re(this,i))}get selectable(){return this._selectable}set selectable(f){const h=this._selectable;h!==f&&(this._selectable=f,re(this,t)===this&&re(this,t).setAttribute("tabindex",`${f?"0":"-1"}`),this.requestUpdate("selectable",h))}get selectableTarget(){return re(this,t)}set selectableTarget(f){const h=re(this,t);h.removeAttribute("tabindex"),h.removeEventListener("click",re(this,o)),h.removeEventListener("keydown",re(this,i)),Eh(this,t,f),re(this,t)===this&&re(this,t).setAttribute("tabindex",this._selectable?"0":"-1"),f.addEventListener("click",re(this,o)),f.addEventListener("keydown",re(this,i))}}return t=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,s=function(){this.selectable&&(this.deselectable===!1?go(this,r,n).call(this):this.selected?go(this,r,u).call(this):go(this,r,n).call(this))},n=function(){if(!this.selectable)return;const p=new Nt(Nt.SELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!0)},u=function(){if(!this.deselectable)return;const p=new Nt(Nt.DESELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!1)},Za([a({type:Boolean,reflect:!0})],c.prototype,"selectable",1),Za([a({type:Boolean,reflect:!0})],c.prototype,"selected",2),c};var Sh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,Ih=(e,t,i,o)=>{for(var r=Oh(t,i),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Sh(t,i,r),r};const Ah=e=>{class t extends e{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return Ih([a({type:Boolean,reflect:!0,attribute:"select-only"})],t.prototype,"selectOnly"),t};var Uh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,Qa=e=>{throw TypeError(e)},Vt=(e,t,i,o)=>{for(var r=o>1?void 0:o?zh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Uh(t,i,r),r},en=(e,t,i)=>t.has(e)||Qa("Cannot "+i),U=(e,t,i)=>(en(e,t,"read from private field"),i?i.call(e):t.get(e)),Bt=(e,t,i)=>t.has(e)?Qa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),tn=(e,t,i,o)=>(en(e,t,"write to private field"),t.set(e,i),i),mo=(e,t,i)=>(en(e,t,"access private method"),i);const Mh=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],Dh=(e,t)=>{var i,o,r,s,n,u,c,p,f;class h extends e{constructor(...d){super(...d),Bt(this,u),this.name="",Bt(this,i,{}),this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",Bt(this,o,t),Bt(this,r,null),Bt(this,s,[]),Bt(this,n,[]),Bt(this,f,()=>{this.pristine=!1}),this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}get value(){return U(this,o)}set value(d){const y=U(this,o);tn(this,o,d),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(U(this,o)??null),this.requestUpdate("value",y)}set pristine(d){this._pristine!==d&&(this._pristine=d,d?this.setAttribute("pristine",""):this.removeAttribute("pristine"),mo(this,u,p).call(this))}get pristine(){return this._pristine}hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const d=U(this,n).find(y=>y.validity.valid===!1);d?"focusFirstInvalidElement"in d?d.focusFirstInvalidElement():d.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),mo(this,u,c).call(this)}addValidator(d,y,I){const $={flagKey:d,getMessageMethod:y,checkMethod:I,weight:Mh.indexOf(d)};return U(this,s).push($),U(this,s).sort((N,ie)=>N.weight>ie.weight?1:ie.weight>N.weight?-1:0),$}removeValidator(d){const y=U(this,s).indexOf(d);y!==-1&&U(this,s).splice(y,1)}addFormControlElement(d){U(this,n).push(d),d.addEventListener(Ye.INVALID,()=>{this._runValidators()}),d.addEventListener(Ye.VALID,()=>{this._runValidators()}),this._pristine===!1&&(d.checkValidity(),this._runValidators())}setCustomValidity(d){this._customValidityObject&&this.removeValidator(this._customValidityObject),d!=null&&d!==""&&(this._customValidityObject=this.addValidator("customError",()=>d,()=>!0)),this._runValidators()}_runValidators(){tn(this,i,{});let d,y;U(this,s).some($=>$.checkMethod()?(U(this,i)[$.flagKey]=!0,d=$.getMessageMethod(),!0):!1),d||U(this,n).some($=>{let N;for(N in $.validity)if(N!=="valid"&&$.validity[N])return U(this,i)[N]=!0,d=$.validationMessage,y??(y=$),!0;return!1});const I=Object.values(U(this,i)).includes(!0);U(this,i).valid=!I,this._internals.setValidity(U(this,i),d,y??this.getFormElement()??void 0),mo(this,u,p).call(this)}updated(d){super.updated(d),this._runValidators()}submit(){U(this,r)?.requestSubmit()}formAssociatedCallback(){mo(this,u,c).call(this),tn(this,r,this._internals.form),U(this,r)&&(U(this,r).hasAttribute("submit-invalid")&&(this.pristine=!1),U(this,r).addEventListener("submit",U(this,f)))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return t}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const d in U(this,n))if(U(this,n)[d].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return U(this,i)}get validationMessage(){return this._internals?.validationMessage}}return i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakMap,n=new WeakMap,u=new WeakSet,c=function(){U(this,r)&&U(this,r).removeEventListener("submit",U(this,f))},p=function(){this._pristine!==!0&&(U(this,i).valid?this.dispatchEvent(new Ye(Ye.VALID)):this.dispatchEvent(new Ye(Ye.INVALID)))},f=new WeakMap,h.formAssociated=!0,Vt([a({type:String})],h.prototype,"name",2),Vt([a()],h.prototype,"value",1),Vt([a({type:Boolean,reflect:!0,attribute:"pristine"})],h.prototype,"pristine",1),Vt([a({type:Boolean,reflect:!0})],h.prototype,"required",2),Vt([a({type:String,attribute:"required-message"})],h.prototype,"requiredMessage",2),Vt([a({type:Boolean,reflect:!0})],h.prototype,"error",2),Vt([a({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),h};let Lh=class{constructor(t,i){this._callback=t,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}setDuration(t){this._duration=t,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const Th=(e,t,i=`This element has to be present for ${e.nodeName} to work appropriate.`)=>{customElements.get(t)||console.warn(`%c ${e.nodeName} requires ${t} element to be registered!`,"font-weight: bold;",i,e)},Nh=(e,t)=>{function i(r){const s=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let p;if("TouchEvent"in window&&r instanceof TouchEvent)p=r.touches[0];else if(r instanceof MouseEvent)p=r;else return;const f=p.pageX-u,h=p.pageY-c;t?.onMove&&t.onMove(f,h)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),t?.onStop&&t.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),t?.initialEvent&&i(t.initialEvent)},Vh=(e,t,i)=>Math.min(Math.max(e,t),i),Bh=(e,t,i)=>i+t-e,Hh=e=>{const t=Math.round(e).toString(16);return t.length===1?`0${t}`:t},Ja=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function jh(e){return e?e.assignedNodes({flatten:!0}).length>0:!1}var Rh=Object.defineProperty,el=e=>{throw TypeError(e)},Wh=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Rh(t,i,r),r},tl=(e,t,i)=>t.has(e)||el("Cannot "+i),il=(e,t,i)=>(tl(e,t,"read from private field"),t.get(e)),rl=(e,t,i)=>t.has(e)?el("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Fh=(e,t,i,o)=>(tl(e,t,"write to private field"),t.set(e,i),i);const Gh=e=>{var t,i;class o extends e{constructor(...s){super(...s),rl(this,t,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Ja(this,"id",this.popoverContainerElement);n&&(il(this,t)?n.hidePopover():n.showPopover())},rl(this,i,n=>{requestAnimationFrame(()=>{Fh(this,t,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",il(this,i))}}return t=new WeakMap,i=new WeakMap,Wh([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement"),o};function qh(e,t){return i=>{if(e.indexOf("-")>0===!1){console.error(`${e} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(e)||window.customElements.define(e,i,t)}}const Kh=["default","primary","secondary","outline","placeholder"],Xh=["default","positive","warning","danger","invalid"],Yh=["h1","h2","h3","h4","h5","h6"];function v(e,t){return i=>{if(e.indexOf("-")>0===!1){console.error(`${e} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(e)||window.customElements.define(e,i,t)}}var Zh=Object.getOwnPropertyDescriptor,Qh=(e,t,i,o)=>{for(var r=o>1?void 0:o?Zh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let gi=class extends g{render(){return l`<slot></slot>`}};gi.styles=[b`
|
|
293
301
|
:host {
|
|
294
302
|
display: inline-flex;
|
|
295
303
|
align-items: stretch;
|
|
@@ -319,7 +327,7 @@
|
|
|
319
327
|
::slotted(*:hover) {
|
|
320
328
|
z-index: 1;
|
|
321
329
|
}
|
|
322
|
-
`],
|
|
330
|
+
`],gi=Qh([v("uui-button-group")],gi);var Jh=Object.getOwnPropertyDescriptor,ed=(e,t,i,o)=>{for(var r=o>1?void 0:o?Jh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let _o=class extends gi{};_o.styles=[...gi.styles,b`
|
|
323
331
|
::slotted(*) {
|
|
324
332
|
--uui-button-padding-left-factor: 0.5;
|
|
325
333
|
--uui-button-padding-right-factor: 0.5;
|
|
@@ -361,10 +369,10 @@
|
|
|
361
369
|
--uui-button-padding-left-factor: 1.5;
|
|
362
370
|
--uui-button-padding-right-factor: 1.5;
|
|
363
371
|
}
|
|
364
|
-
`],
|
|
372
|
+
`],_o=ed([v("uui-action-bar")],_o);var td=Object.defineProperty,id=Object.getOwnPropertyDescriptor,yo=(e,t,i,o)=>{for(var r=o>1?void 0:o?id(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&td(t,i,r),r};let Ht=class extends g{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return l`
|
|
365
373
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
366
374
|
${this._isLimitExceeded()?l`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}
|
|
367
|
-
`}};
|
|
375
|
+
`}};Ht.styles=[b`
|
|
368
376
|
:host {
|
|
369
377
|
display: inline-flex;
|
|
370
378
|
align-items: center;
|
|
@@ -381,15 +389,15 @@
|
|
|
381
389
|
#overflow-indication {
|
|
382
390
|
margin-left: 6px;
|
|
383
391
|
}
|
|
384
|
-
`],
|
|
392
|
+
`],yo([yt({selector:"uui-avatar, [uui-avatar]",flatten:!0})],Ht.prototype,"_avatarNodes",2),yo([_()],Ht.prototype,"_avatarArray",2),yo([a({type:Number,attribute:!0})],Ht.prototype,"limit",2),Ht=yo([v("uui-avatar-group")],Ht);var rd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,mi=(e,t,i,o)=>{for(var r=o>1?void 0:o?od(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&rd(t,i,r),r};let Ze=class extends g{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this.name=""}get _initials(){return this.initials?.substring(0,3)||this.createInitials(this.name)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const o=[...e.matchAll(/(?:^|\s)(.)/g)].map(r=>r[1]).join("");return o?.length?(t=o[0].charAt(0),o.length>1&&(t+=o[o.length-1].charAt(0)),t.toUpperCase()):t}renderImage(){return l` <img
|
|
385
393
|
src="${this.imgSrc}"
|
|
386
394
|
srcset="${this.imgSrcset}"
|
|
387
|
-
alt="${this.
|
|
395
|
+
alt="${this._initials}"
|
|
388
396
|
title="${this.name}" />`}render(){return l`
|
|
389
397
|
${this.imgSrc?this.renderImage():""}
|
|
390
|
-
${this.imgSrc?"":this.
|
|
398
|
+
${this.imgSrc?"":this._initials}
|
|
391
399
|
<slot></slot>
|
|
392
|
-
`}};
|
|
400
|
+
`}};Ze.styles=[b`
|
|
393
401
|
:host {
|
|
394
402
|
display: inline-flex;
|
|
395
403
|
align-items: center;
|
|
@@ -420,7 +428,7 @@
|
|
|
420
428
|
overflow: hidden;
|
|
421
429
|
border-radius: 50%;
|
|
422
430
|
}
|
|
423
|
-
`],
|
|
431
|
+
`],mi([a({type:Boolean,attribute:!0,reflect:!0})],Ze.prototype,"overflow",2),mi([a({type:String,attribute:"img-src"})],Ze.prototype,"imgSrc",2),mi([a({type:String,attribute:"img-srcset"})],Ze.prototype,"imgSrcset",2),mi([a({type:String,reflect:!0})],Ze.prototype,"name",2),mi([a({type:String})],Ze.prototype,"initials",2),Ze=mi([v("uui-avatar")],Ze);var sd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,wo=(e,t,i,o)=>{for(var r=o>1?void 0:o?nd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&sd(t,i,r),r};let jt=class extends g{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return l` <slot></slot> `}};jt.styles=[b`
|
|
424
432
|
:host {
|
|
425
433
|
position: var(--uui-badge-position, absolute);
|
|
426
434
|
display: flex;
|
|
@@ -447,12 +455,20 @@
|
|
|
447
455
|
|
|
448
456
|
:host {
|
|
449
457
|
--color: var(--uui-color-default,#1b264f);
|
|
450
|
-
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
458
|
+
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
459
|
+
28,
|
|
460
|
+
35,
|
|
461
|
+
59
|
|
462
|
+
));
|
|
451
463
|
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
452
464
|
}
|
|
453
465
|
:host([color='positive']) {
|
|
454
466
|
--color: var(--uui-color-positive,#0b8152);
|
|
455
|
-
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
467
|
+
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
468
|
+
10,
|
|
469
|
+
115,
|
|
470
|
+
73
|
|
471
|
+
));
|
|
456
472
|
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
457
473
|
}
|
|
458
474
|
:host([color='warning']) {
|
|
@@ -462,12 +478,20 @@
|
|
|
462
478
|
}
|
|
463
479
|
:host([color='danger']) {
|
|
464
480
|
--color: var(--uui-color-danger,#d42054);
|
|
465
|
-
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
481
|
+
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
482
|
+
191,
|
|
483
|
+
33,
|
|
484
|
+
78
|
|
485
|
+
));
|
|
466
486
|
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
467
487
|
}
|
|
468
488
|
:host([color='invalid']) {
|
|
469
489
|
--color: var(--uui-color-invalid,#d42054);
|
|
470
|
-
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
490
|
+
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
491
|
+
191,
|
|
492
|
+
33,
|
|
493
|
+
78
|
|
494
|
+
));
|
|
471
495
|
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
472
496
|
}
|
|
473
497
|
|
|
@@ -535,14 +559,14 @@
|
|
|
535
559
|
animation: none;
|
|
536
560
|
}
|
|
537
561
|
}
|
|
538
|
-
`],
|
|
562
|
+
`],wo([a({reflect:!0})],jt.prototype,"color",2),wo([a({reflect:!0})],jt.prototype,"look",2),wo([a({type:Boolean,reflect:!0})],jt.prototype,"attention",2),jt=wo([v("uui-badge")],jt);var ad=Object.defineProperty,ld=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&ad(t,i,r),r};const wr=e=>{class t extends e{constructor(){super(...arguments),this.active=!1}}return ld([a({type:Boolean,reflect:!0})],t.prototype,"active"),t};var ud=Object.defineProperty,ol=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&ud(t,i,r),r};const Te=(e,t)=>{class i extends t{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(r){super.firstUpdated(r),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(r){this._labelSlotHasContent=r.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return l`
|
|
539
563
|
${this._labelSlotHasContent===!1?l`<span class="label">${this.label}</span>`:""}
|
|
540
564
|
<slot
|
|
541
565
|
class="label"
|
|
542
|
-
style=${this._labelSlotHasContent?"":"
|
|
566
|
+
style=${this._labelSlotHasContent?"":"display: none"}
|
|
543
567
|
name=${e||""}
|
|
544
568
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
545
|
-
`}}return Ga([a({type:String})],i.prototype,"label"),Ga([_()],i.prototype,"_labelSlotHasContent"),i};let Hh=class extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}},vi=class extends Hh{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}};vi.SELECTED="selected",vi.DESELECTED="deselected";var jh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,qa=e=>{throw TypeError(e)},Ka=(e,t,i,o)=>{for(var r=o>1?void 0:o?Rh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&jh(t,i,r),r},Ks=(e,t,i)=>t.has(e)||qa("Cannot "+i),re=(e,t,i)=>(Ks(e,t,"read from private field"),i?i.call(e):t.get(e)),go=(e,t,i)=>t.has(e)?qa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Wh=(e,t,i,o)=>(Ks(e,t,"write to private field"),t.set(e,i),i),mo=(e,t,i)=>(Ks(e,t,"access private method"),i);const fi=e=>{var t,i,o,r,s,n,u;class c extends e{constructor(...f){super(...f),go(this,r),this._selectable=!1,this.deselectable=!0,this.selected=!1,go(this,t,this),go(this,i,h=>{h.code!=="Space"&&h.code!=="Enter"||h.composedPath().indexOf(re(this,t))===0&&re(this,o).call(this,h)}),go(this,o,h=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const d=h.composedPath();re(this,t)===this&&d.some(I=>{const $=I.tagName;return $==="A"||$==="BUTTON"||$==="INPUT"||$==="TEXTAREA"||$==="SELECT"})||d.indexOf(re(this,t))!==-1&&(h.type==="keydown"&&h.preventDefault(),mo(this,r,s).call(this))}),this.addEventListener("click",re(this,o)),this.addEventListener("keydown",re(this,i))}get selectable(){return this._selectable}set selectable(f){const h=this._selectable;h!==f&&(this._selectable=f,re(this,t)===this&&re(this,t).setAttribute("tabindex",`${f?"0":"-1"}`),this.requestUpdate("selectable",h))}get selectableTarget(){return re(this,t)}set selectableTarget(f){const h=re(this,t);h.removeAttribute("tabindex"),h.removeEventListener("click",re(this,o)),h.removeEventListener("keydown",re(this,i)),Wh(this,t,f),re(this,t)===this&&re(this,t).setAttribute("tabindex",this._selectable?"0":"-1"),f.addEventListener("click",re(this,o)),f.addEventListener("keydown",re(this,i))}}return t=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,s=function(){this.selectable&&(this.deselectable===!1?mo(this,r,n).call(this):this.selected?mo(this,r,u).call(this):mo(this,r,n).call(this))},n=function(){if(!this.selectable)return;const p=new vi(vi.SELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!0)},u=function(){if(!this.deselectable)return;const p=new vi(vi.DESELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!1)},Ka([a({type:Boolean,reflect:!0})],c.prototype,"selectable",1),Ka([a({type:Boolean,reflect:!0})],c.prototype,"selected",2),c};var Fh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,qh=(e,t,i,o)=>{for(var r=Gh(t,i),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Fh(t,i,r),r};const _o=e=>{class t extends e{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return qh([a({type:Boolean,reflect:!0,attribute:"select-only"})],t.prototype,"selectOnly"),t};let Xa=class extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}},gt=class extends Xa{constructor(t,i={}){super(t,{bubbles:!0,...i})}};gt.VALID="valid",gt.INVALID="invalid";let Ya=class extends Xa{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}};Ya.SELECTED="selected",Ya.DESELECTED="deselected";var Kh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Za=e=>{throw TypeError(e)},Nt=(e,t,i,o)=>{for(var r=o>1?void 0:o?Xh(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Kh(t,i,r),r},Xs=(e,t,i)=>t.has(e)||Za("Cannot "+i),z=(e,t,i)=>(Xs(e,t,"read from private field"),i?i.call(e):t.get(e)),Bt=(e,t,i)=>t.has(e)?Za("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Ys=(e,t,i,o)=>(Xs(e,t,"write to private field"),t.set(e,i),i),yo=(e,t,i)=>(Xs(e,t,"access private method"),i);const Yh=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],De=(e,t)=>{var i,o,r,s,n,u,c,p,f;class h extends e{constructor(...d){super(...d),Bt(this,u),this.name="",Bt(this,i,{}),this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",Bt(this,o,t),Bt(this,r,null),Bt(this,s,[]),Bt(this,n,[]),Bt(this,f,()=>{this.pristine=!1}),this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}get value(){return z(this,o)}set value(d){const y=z(this,o);Ys(this,o,d),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(z(this,o)??null),this.requestUpdate("value",y)}set pristine(d){this._pristine!==d&&(this._pristine=d,d?this.setAttribute("pristine",""):this.removeAttribute("pristine"),yo(this,u,p).call(this))}get pristine(){return this._pristine}hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const d=z(this,n).find(y=>y.validity.valid===!1);d?"focusFirstInvalidElement"in d?d.focusFirstInvalidElement():d.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),yo(this,u,c).call(this)}addValidator(d,y,I){const $={flagKey:d,getMessageMethod:y,checkMethod:I,weight:Yh.indexOf(d)};return z(this,s).push($),z(this,s).sort((V,te)=>V.weight>te.weight?1:te.weight>V.weight?-1:0),$}removeValidator(d){const y=z(this,s).indexOf(d);y!==-1&&z(this,s).splice(y,1)}addFormControlElement(d){z(this,n).push(d),d.addEventListener(gt.INVALID,()=>{this._runValidators()}),d.addEventListener(gt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(d.checkValidity(),this._runValidators())}setCustomValidity(d){this._customValidityObject&&this.removeValidator(this._customValidityObject),d!=null&&d!==""&&(this._customValidityObject=this.addValidator("customError",()=>d,()=>!0)),this._runValidators()}_runValidators(){Ys(this,i,{});let d,y;z(this,s).some($=>$.checkMethod()?(z(this,i)[$.flagKey]=!0,d=$.getMessageMethod(),!0):!1),d||z(this,n).some($=>{let V;for(V in $.validity)if(V!=="valid"&&$.validity[V])return z(this,i)[V]=!0,d=$.validationMessage,y??(y=$),!0;return!1});const I=Object.values(z(this,i)).includes(!0);z(this,i).valid=!I,this._internals.setValidity(z(this,i),d,y??this.getFormElement()??void 0),yo(this,u,p).call(this)}updated(d){super.updated(d),this._runValidators()}submit(){z(this,r)?.requestSubmit()}formAssociatedCallback(){yo(this,u,c).call(this),Ys(this,r,this._internals.form),z(this,r)&&(z(this,r).hasAttribute("submit-invalid")&&(this.pristine=!1),z(this,r).addEventListener("submit",z(this,f)))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return t}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const d in z(this,n))if(z(this,n)[d].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return z(this,i)}get validationMessage(){return this._internals?.validationMessage}}return i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakMap,n=new WeakMap,u=new WeakSet,c=function(){z(this,r)&&z(this,r).removeEventListener("submit",z(this,f))},p=function(){this._pristine!==!0&&(z(this,i).valid?this.dispatchEvent(new gt(gt.VALID)):this.dispatchEvent(new gt(gt.INVALID)))},f=new WeakMap,h.formAssociated=!0,Nt([a({type:String})],h.prototype,"name",2),Nt([a()],h.prototype,"value",1),Nt([a({type:Boolean,reflect:!0,attribute:"pristine"})],h.prototype,"pristine",1),Nt([a({type:Boolean,reflect:!0})],h.prototype,"required",2),Nt([a({type:String,attribute:"required-message"})],h.prototype,"requiredMessage",2),Nt([a({type:Boolean,reflect:!0})],h.prototype,"error",2),Nt([a({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),h},Zh=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};var Qh=Object.defineProperty,Qa=e=>{throw TypeError(e)},Jh=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Qh(t,i,r),r},Ja=(e,t,i)=>t.has(e)||Qa("Cannot "+i),el=(e,t,i)=>(Ja(e,t,"read from private field"),t.get(e)),tl=(e,t,i)=>t.has(e)?Qa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ed=(e,t,i,o)=>(Ja(e,t,"write to private field"),t.set(e,i),i);const td=e=>{var t,i;class o extends e{constructor(...s){super(...s),tl(this,t,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Zh(this,"id",this.popoverContainerElement);n&&(el(this,t)?n.hidePopover():n.showPopover())},tl(this,i,n=>{requestAnimationFrame(()=>{ed(this,t,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",el(this,i))}}return t=new WeakMap,i=new WeakMap,Jh([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement"),o};class A extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}}class bi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}bi.VALID="valid",bi.INVALID="invalid";class mt extends A{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}}mt.SELECTED="selected",mt.DESELECTED="deselected";class wo extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}wo.CHANGE="change";var id=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,il=e=>{throw TypeError(e)},gi=(e,t,i,o)=>{for(var r=o>1?void 0:o?rd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&id(t,i,r),r},od=(e,t,i)=>t.has(e)||il("Cannot "+i),sd=(e,t,i)=>t.has(e)?il("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),nd=(e,t,i)=>(od(e,t,"access private method"),i),Zs,rl;class we extends De(Me("",g),""){constructor(t="checkbox"){super(),sd(this,Zs),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=t,this.addEventListener("keydown",nd(this,Zs,rl))}get value(){return this._value}set value(t){const i=super.value;this._value=t,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",i)}get checked(){return this._checked}set checked(t){const i=this._checked;this._checked=t,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",i)}getFormElement(){return this._input}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(t){super.firstUpdated(t);const i=this.shadowRoot?.querySelector("label");let o=!1;this._input.addEventListener("blur",()=>{o===!1&&this.style.setProperty("--uui-show-focus-outline","1"),o=!1}),i.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),o=!0}),i.addEventListener("mouseup",()=>{o=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(t){t.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new wo(wo.CHANGE))}render(){return l`
|
|
569
|
+
`}}return ol([a({type:String})],i.prototype,"label"),ol([_()],i.prototype,"_labelSlotHasContent"),i};let cd=class extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}},_i=class extends cd{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}};_i.SELECTED="selected",_i.DESELECTED="deselected";var hd=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,sl=e=>{throw TypeError(e)},nl=(e,t,i,o)=>{for(var r=o>1?void 0:o?dd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&hd(t,i,r),r},rn=(e,t,i)=>t.has(e)||sl("Cannot "+i),oe=(e,t,i)=>(rn(e,t,"read from private field"),i?i.call(e):t.get(e)),xo=(e,t,i)=>t.has(e)?sl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),pd=(e,t,i,o)=>(rn(e,t,"write to private field"),t.set(e,i),i),$o=(e,t,i)=>(rn(e,t,"access private method"),i);const yi=e=>{var t,i,o,r,s,n,u;class c extends e{constructor(...f){super(...f),xo(this,r),this._selectable=!1,this.deselectable=!0,this.selected=!1,xo(this,t,this),xo(this,i,h=>{h.code!=="Space"&&h.code!=="Enter"||h.composedPath().indexOf(oe(this,t))===0&&oe(this,o).call(this,h)}),xo(this,o,h=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const d=h.composedPath();oe(this,t)===this&&d.some(I=>{const $=I.tagName;return $==="A"||$==="BUTTON"||$==="INPUT"||$==="TEXTAREA"||$==="SELECT"})||d.indexOf(oe(this,t))!==-1&&(h.type==="keydown"&&h.preventDefault(),$o(this,r,s).call(this))}),this.addEventListener("click",oe(this,o)),this.addEventListener("keydown",oe(this,i))}get selectable(){return this._selectable}set selectable(f){const h=this._selectable;h!==f&&(this._selectable=f,oe(this,t)===this&&oe(this,t).setAttribute("tabindex",`${f?"0":"-1"}`),this.requestUpdate("selectable",h))}get selectableTarget(){return oe(this,t)}set selectableTarget(f){const h=oe(this,t);h.removeAttribute("tabindex"),h.removeEventListener("click",oe(this,o)),h.removeEventListener("keydown",oe(this,i)),pd(this,t,f),oe(this,t)===this&&oe(this,t).setAttribute("tabindex",this._selectable?"0":"-1"),f.addEventListener("click",oe(this,o)),f.addEventListener("keydown",oe(this,i))}}return t=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakSet,s=function(){this.selectable&&(this.deselectable===!1?$o(this,r,n).call(this):this.selected?$o(this,r,u).call(this):$o(this,r,n).call(this))},n=function(){if(!this.selectable)return;const p=new _i(_i.SELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!0)},u=function(){if(!this.deselectable)return;const p=new _i(_i.DESELECTED);this.dispatchEvent(p),!p.defaultPrevented&&(this.selected=!1)},nl([a({type:Boolean,reflect:!0})],c.prototype,"selectable",1),nl([a({type:Boolean,reflect:!0})],c.prototype,"selected",2),c};var vd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,bd=(e,t,i,o)=>{for(var r=fd(t,i),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&vd(t,i,r),r};const ko=e=>{class t extends e{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return bd([a({type:Boolean,reflect:!0,attribute:"select-only"})],t.prototype,"selectOnly"),t};let al=class extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}},wt=class extends al{constructor(t,i={}){super(t,{bubbles:!0,...i})}};wt.VALID="valid",wt.INVALID="invalid";let ll=class extends al{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}};ll.SELECTED="selected",ll.DESELECTED="deselected";var gd=Object.defineProperty,md=Object.getOwnPropertyDescriptor,ul=e=>{throw TypeError(e)},Rt=(e,t,i,o)=>{for(var r=o>1?void 0:o?md(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&gd(t,i,r),r},on=(e,t,i)=>t.has(e)||ul("Cannot "+i),z=(e,t,i)=>(on(e,t,"read from private field"),i?i.call(e):t.get(e)),Wt=(e,t,i)=>t.has(e)?ul("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),sn=(e,t,i,o)=>(on(e,t,"write to private field"),t.set(e,i),i),Co=(e,t,i)=>(on(e,t,"access private method"),i);const _d=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],Ne=(e,t)=>{var i,o,r,s,n,u,c,p,f;class h extends e{constructor(...d){super(...d),Wt(this,u),this.name="",Wt(this,i,{}),this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",Wt(this,o,t),Wt(this,r,null),Wt(this,s,[]),Wt(this,n,[]),Wt(this,f,()=>{this.pristine=!1}),this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}get value(){return z(this,o)}set value(d){const y=z(this,o);sn(this,o,d),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(z(this,o)??null),this.requestUpdate("value",y)}set pristine(d){this._pristine!==d&&(this._pristine=d,d?this.setAttribute("pristine",""):this.removeAttribute("pristine"),Co(this,u,p).call(this))}get pristine(){return this._pristine}hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const d=z(this,n).find(y=>y.validity.valid===!1);d?"focusFirstInvalidElement"in d?d.focusFirstInvalidElement():d.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),Co(this,u,c).call(this)}addValidator(d,y,I){const $={flagKey:d,getMessageMethod:y,checkMethod:I,weight:_d.indexOf(d)};return z(this,s).push($),z(this,s).sort((N,ie)=>N.weight>ie.weight?1:ie.weight>N.weight?-1:0),$}removeValidator(d){const y=z(this,s).indexOf(d);y!==-1&&z(this,s).splice(y,1)}addFormControlElement(d){z(this,n).push(d),d.addEventListener(wt.INVALID,()=>{this._runValidators()}),d.addEventListener(wt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(d.checkValidity(),this._runValidators())}setCustomValidity(d){this._customValidityObject&&this.removeValidator(this._customValidityObject),d!=null&&d!==""&&(this._customValidityObject=this.addValidator("customError",()=>d,()=>!0)),this._runValidators()}_runValidators(){sn(this,i,{});let d,y;z(this,s).some($=>$.checkMethod()?(z(this,i)[$.flagKey]=!0,d=$.getMessageMethod(),!0):!1),d||z(this,n).some($=>{let N;for(N in $.validity)if(N!=="valid"&&$.validity[N])return z(this,i)[N]=!0,d=$.validationMessage,y??(y=$),!0;return!1});const I=Object.values(z(this,i)).includes(!0);z(this,i).valid=!I,this._internals.setValidity(z(this,i),d,y??this.getFormElement()??void 0),Co(this,u,p).call(this)}updated(d){super.updated(d),this._runValidators()}submit(){z(this,r)?.requestSubmit()}formAssociatedCallback(){Co(this,u,c).call(this),sn(this,r,this._internals.form),z(this,r)&&(z(this,r).hasAttribute("submit-invalid")&&(this.pristine=!1),z(this,r).addEventListener("submit",z(this,f)))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return t}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const d in z(this,n))if(z(this,n)[d].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return z(this,i)}get validationMessage(){return this._internals?.validationMessage}}return i=new WeakMap,o=new WeakMap,r=new WeakMap,s=new WeakMap,n=new WeakMap,u=new WeakSet,c=function(){z(this,r)&&z(this,r).removeEventListener("submit",z(this,f))},p=function(){this._pristine!==!0&&(z(this,i).valid?this.dispatchEvent(new wt(wt.VALID)):this.dispatchEvent(new wt(wt.INVALID)))},f=new WeakMap,h.formAssociated=!0,Rt([a({type:String})],h.prototype,"name",2),Rt([a()],h.prototype,"value",1),Rt([a({type:Boolean,reflect:!0,attribute:"pristine"})],h.prototype,"pristine",1),Rt([a({type:Boolean,reflect:!0})],h.prototype,"required",2),Rt([a({type:String,attribute:"required-message"})],h.prototype,"requiredMessage",2),Rt([a({type:Boolean,reflect:!0})],h.prototype,"error",2),Rt([a({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),h},yd=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};var wd=Object.defineProperty,cl=e=>{throw TypeError(e)},xd=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&wd(t,i,r),r},hl=(e,t,i)=>t.has(e)||cl("Cannot "+i),dl=(e,t,i)=>(hl(e,t,"read from private field"),t.get(e)),pl=(e,t,i)=>t.has(e)?cl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),$d=(e,t,i,o)=>(hl(e,t,"write to private field"),t.set(e,i),i);const kd=e=>{var t,i;class o extends e{constructor(...s){super(...s),pl(this,t,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=yd(this,"id",this.popoverContainerElement);n&&(dl(this,t)?n.hidePopover():n.showPopover())},pl(this,i,n=>{requestAnimationFrame(()=>{$d(this,t,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",dl(this,i))}}return t=new WeakMap,i=new WeakMap,xd([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement"),o};class A extends Event{constructor(t,i={}){super(t,{...i}),this.detail=i.detail||{}}}class wi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}wi.VALID="valid",wi.INVALID="invalid";class xt extends A{constructor(t,i={}){super(t,{bubbles:!0,cancelable:!0,...i})}}xt.SELECTED="selected",xt.DESELECTED="deselected";class Eo extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Eo.CHANGE="change";var Cd=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,vl=e=>{throw TypeError(e)},xi=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ed(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Cd(t,i,r),r},Pd=(e,t,i)=>t.has(e)||vl("Cannot "+i),Sd=(e,t,i)=>t.has(e)?vl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Od=(e,t,i)=>(Pd(e,t,"access private method"),i),nn,fl;class ke extends Ne(Te("",g),""){constructor(t="checkbox"){super(),Sd(this,nn),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=t,this.addEventListener("keydown",Od(this,nn,fl))}get value(){return this._value}set value(t){const i=super.value;this._value=t,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",i)}get checked(){return this._checked}set checked(t){const i=this._checked;this._checked=t,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",i)}getFormElement(){return this._input}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(t){super.firstUpdated(t);const i=this.shadowRoot?.querySelector("label");let o=!1;this._input.addEventListener("blur",()=>{o===!1&&this.style.setProperty("--uui-show-focus-outline","1"),o=!1}),i.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),o=!0}),i.addEventListener("mouseup",()=>{o=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(t){t.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new Eo(Eo.CHANGE))}render(){return l`
|
|
546
570
|
<label>
|
|
547
571
|
<input
|
|
548
572
|
id="input"
|
|
@@ -556,7 +580,7 @@
|
|
|
556
580
|
role="${this.inputRole}" />
|
|
557
581
|
${this.renderCheckbox()} ${this.renderLabel()}
|
|
558
582
|
</label>
|
|
559
|
-
`}}
|
|
583
|
+
`}}nn=new WeakSet,fl=function(e){e.key=="Enter"&&this.submit()},ke.styles=[b`
|
|
560
584
|
:host {
|
|
561
585
|
display: inline-block;
|
|
562
586
|
}
|
|
@@ -605,27 +629,31 @@
|
|
|
605
629
|
.label {
|
|
606
630
|
display: block;
|
|
607
631
|
}
|
|
608
|
-
|
|
632
|
+
|
|
633
|
+
span.label:empty {
|
|
634
|
+
display: none;
|
|
635
|
+
}
|
|
636
|
+
`],xi([a({type:String,attribute:"label-position",reflect:!0})],ke.prototype,"labelPosition",2),xi([a({type:Boolean})],ke.prototype,"checked",1),xi([a({type:Boolean,reflect:!0})],ke.prototype,"indeterminate",2),xi([a({type:Boolean,reflect:!0})],ke.prototype,"disabled",2),xi([a({type:Boolean,reflect:!0})],ke.prototype,"readonly",2),xi([O("#input")],ke.prototype,"_input",2);/**
|
|
609
637
|
* @license
|
|
610
638
|
* Copyright 2020 Google LLC
|
|
611
639
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
612
|
-
*/const
|
|
640
|
+
*/const bl=Symbol.for(""),Id=e=>{if(e?.r===bl)return e?._$litStatic$},gl=e=>({_$litStatic$:e,r:bl}),ml=new Map,Ad=e=>(t,...i)=>{const o=i.length;let r,s;const n=[],u=[];let c,p=0,f=!1;for(;p<o;){for(c=t[p];p<o&&(s=i[p],(r=Id(s))!==void 0);)c+=r+t[++p],f=!0;p!==o&&u.push(s),n.push(c),p++}if(p===o&&n.push(t[o]),f){const h=n.join("$$lit$$");(t=ml.get(h))===void 0&&(n.raw=n,ml.set(h,t=n)),i=u}return e(t,...i)},_l=Ad(l);var Ud=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,Ft=(e,t,i,o)=>{for(var r=o>1?void 0:o?zd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Ud(t,i,r),r};function an(e){return e?e.assignedNodes({flatten:!0}).length>0:!1}let Ve=class extends g{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag="h5",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=an(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=an(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=an(e.target)}}set headlineVariant(e){this._headlineVariantTag=e}get headlineVariant(){return this._headlineVariantTag}renderHeader(){return _l`<div
|
|
613
641
|
id="header"
|
|
614
642
|
class="uui-text"
|
|
615
643
|
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
616
|
-
<${
|
|
644
|
+
<${gl(this._headlineVariantTag)}
|
|
617
645
|
id="headline"
|
|
618
646
|
class="uui-h5"
|
|
619
647
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
620
648
|
${this.headline}
|
|
621
649
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
622
|
-
</${
|
|
650
|
+
</${gl(this._headlineVariantTag)}>
|
|
623
651
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
624
652
|
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
625
|
-
</div>`}render(){return
|
|
653
|
+
</div>`}render(){return _l`
|
|
626
654
|
${this.renderHeader()}
|
|
627
655
|
<slot></slot>
|
|
628
|
-
`}};
|
|
656
|
+
`}};Ve.styles=[bi,b`
|
|
629
657
|
:host {
|
|
630
658
|
display: block;
|
|
631
659
|
border: var(--uui-box-border-width, 0) solid
|
|
@@ -655,7 +683,7 @@
|
|
|
655
683
|
display: block;
|
|
656
684
|
margin-left: auto;
|
|
657
685
|
}
|
|
658
|
-
`],
|
|
686
|
+
`],Ft([a({type:String})],Ve.prototype,"headline",2),Ft([a({attribute:"headline-variant"})],Ve.prototype,"headlineVariant",1),Ft([_()],Ve.prototype,"_headlineVariantTag",2),Ft([_()],Ve.prototype,"_headlineSlotHasContent",2),Ft([_()],Ve.prototype,"_headerSlotHasContent",2),Ft([_()],Ve.prototype,"_headerActionsSlotHasContent",2),Ve=Ft([v("uui-box")],Ve);var Md=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,ln=(e,t,i,o)=>{for(var r=o>1?void 0:o?Dd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Md(t,i,r),r};let Gt=class extends g{constructor(){super(...arguments),this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}renderLinkAndSeparator(){const e=this.href?l`<a id="link" href=${this.href}><slot></slot></a>`:l`<span id="link"><slot></slot></span>`;return l`${e}<span part="separator"></span>`}renderCurrent(){return l`<span id="last-item"><slot></slot></span>`}render(){return l`${this.lastItem?this.renderCurrent():this.renderLinkAndSeparator()}`}};Gt.styles=[b`
|
|
659
687
|
:host {
|
|
660
688
|
font-size: var(--uui-type-small-size,12px);
|
|
661
689
|
color: currentColor;
|
|
@@ -689,9 +717,9 @@
|
|
|
689
717
|
overflow: hidden;
|
|
690
718
|
text-overflow: ellipsis;
|
|
691
719
|
}
|
|
692
|
-
`],
|
|
720
|
+
`],ln([a()],Gt.prototype,"href",2),ln([a({type:Boolean,attribute:"last-item"})],Gt.prototype,"lastItem",2),Gt=ln([v("uui-breadcrumb-item")],Gt);var Ld=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,yl=(e,t,i,o)=>{for(var r=o>1?void 0:o?Td(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Ld(t,i,r),r};let xr=class extends g{elementIsBreadcrumbItem(e){return e instanceof Gt}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation")}handleSlotChange(){if(this.slotNodes.length>0){const e=this.slotNodes[this.slotNodes.length-1];e.setAttribute("aria-current","page"),this.elementIsBreadcrumbItem(e)&&(e.lastItem=!0)}}render(){return l`<ol id="breadcrumbs-list">
|
|
693
721
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
694
|
-
</ol>`}};
|
|
722
|
+
</ol>`}};xr.styles=[b`
|
|
695
723
|
:host {
|
|
696
724
|
display: flex;
|
|
697
725
|
}
|
|
@@ -705,7 +733,7 @@
|
|
|
705
733
|
margin-inline-end: 0px;
|
|
706
734
|
padding-inline-start: 0px;
|
|
707
735
|
}
|
|
708
|
-
`],
|
|
736
|
+
`],yl([yt({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],xr.prototype,"slotNodes",2),xr=yl([v("uui-breadcrumbs")],xr);const Nd=b`
|
|
709
737
|
@keyframes uui-blink {
|
|
710
738
|
0%,
|
|
711
739
|
100% {
|
|
@@ -715,7 +743,7 @@
|
|
|
715
743
|
opacity: 1;
|
|
716
744
|
}
|
|
717
745
|
}
|
|
718
|
-
`,
|
|
746
|
+
`,Vd=mt("uui-blink 0.9s infinite both"),Bd=b`
|
|
719
747
|
@keyframes pulse {
|
|
720
748
|
0% {
|
|
721
749
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -733,7 +761,7 @@
|
|
|
733
761
|
opacity: 0;
|
|
734
762
|
}
|
|
735
763
|
}
|
|
736
|
-
`;
|
|
764
|
+
`;mt("pulse 0.8s ease-in-out infinite both");const Po=b`
|
|
737
765
|
@keyframes uui-horizontal-shake {
|
|
738
766
|
10%,
|
|
739
767
|
90% {
|
|
@@ -756,22 +784,22 @@
|
|
|
756
784
|
transform: translateX(2px);
|
|
757
785
|
}
|
|
758
786
|
}
|
|
759
|
-
|
|
787
|
+
`,So=mt("uui-horizontal-shake 600ms ease backwards");/**
|
|
760
788
|
* @license
|
|
761
789
|
* Copyright 2017 Google LLC
|
|
762
790
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
763
|
-
*/const
|
|
791
|
+
*/const Ie={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},$i=e=>(...t)=>({_$litDirective$:e,values:t});let ki=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};/**
|
|
764
792
|
* @license
|
|
765
793
|
* Copyright 2018 Google LLC
|
|
766
794
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
767
|
-
*/const
|
|
795
|
+
*/const wl="important",Hd=" !"+wl,Qe=$i(class extends ki{constructor(e){if(super(e),e.type!==Ie.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,i)=>{const o=e[i];return o==null?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:i}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?i.removeProperty(o):i[o]=null);for(const o in t){const r=t[o];if(r!=null){this.ft.add(o);const s=typeof r=="string"&&r.endsWith(Hd);o.includes("-")||s?i.setProperty(o,s?r.slice(0,-11):r,s?wl:""):i[o]=r}}return he}});/**
|
|
768
796
|
* @license
|
|
769
797
|
* Copyright 2018 Google LLC
|
|
770
798
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
771
|
-
*/const w=e=>e??E;class
|
|
799
|
+
*/const w=e=>e??E;class Oo extends A{constructor(t,i={}){super(t,{bubbles:!0,composed:!0,...i})}}Oo.CLICK="click";var jd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,xl=e=>{throw TypeError(e)},qt=(e,t,i,o)=>{for(var r=o>1?void 0:o?Rd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&jd(t,i,r),r},Wd=(e,t,i)=>t.has(e)||xl("Cannot "+i),Fd=(e,t,i)=>t.has(e)?xl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Io=(e,t,i)=>(Wd(e,t,"access private method"),i),Ci,un,$l,kl;let Be=class extends g{constructor(){super(...arguments),Fd(this,Ci),this._position=0,this.vertical=!1}_onMouseMove(e){this._position=(this.vertical?e.offsetY:e.offsetX)-5}_handleClick(e){e.preventDefault(),e.stopImmediatePropagation(),e.target?.blur?.(),this.dispatchEvent(new Oo(Oo.CLICK))}render(){return this.href?Io(this,Ci,$l).call(this):Io(this,Ci,kl).call(this)}};Ci=new WeakSet,un=function(){return l`
|
|
772
800
|
<div
|
|
773
801
|
id="plus"
|
|
774
|
-
style=${
|
|
802
|
+
style=${Qe({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}>
|
|
775
803
|
<svg
|
|
776
804
|
id="plus-icon"
|
|
777
805
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -780,23 +808,23 @@
|
|
|
780
808
|
d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z" />
|
|
781
809
|
</svg>
|
|
782
810
|
</div>
|
|
783
|
-
`}
|
|
811
|
+
`},$l=function(){return l`<a
|
|
784
812
|
id="button-wrapper"
|
|
785
813
|
@mousemove=${this._onMouseMove}
|
|
786
814
|
href=${w(this.href)}
|
|
787
815
|
target=${w(this.target||void 0)}
|
|
788
816
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
789
817
|
aria-label=${this.label?this.label:"create new element"}>
|
|
790
|
-
${
|
|
791
|
-
</a>`},
|
|
818
|
+
${Io(this,Ci,un).call(this)}
|
|
819
|
+
</a>`},kl=function(){return l`
|
|
792
820
|
<button
|
|
793
821
|
id="button-wrapper"
|
|
794
822
|
@mousemove=${this._onMouseMove}
|
|
795
823
|
@click=${this._handleClick}
|
|
796
824
|
aria-label=${this.label?this.label:"create new element"}>
|
|
797
|
-
${
|
|
825
|
+
${Io(this,Ci,un).call(this)}
|
|
798
826
|
</button>
|
|
799
|
-
`},
|
|
827
|
+
`},Be.styles=[Nd,b`
|
|
800
828
|
:host {
|
|
801
829
|
display: flex;
|
|
802
830
|
position: relative;
|
|
@@ -850,7 +878,7 @@
|
|
|
850
878
|
:host(:focus) #button-wrapper:before,
|
|
851
879
|
:host(:focus-within) #button-wrapper:before,
|
|
852
880
|
:host(:hover) #button-wrapper:before {
|
|
853
|
-
animation: ${
|
|
881
|
+
animation: ${Vd};
|
|
854
882
|
background-color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
855
883
|
border-color: var(--uui-color-surface,#fff) !important;
|
|
856
884
|
}
|
|
@@ -953,11 +981,11 @@
|
|
|
953
981
|
#button-wrapper:active #plus {
|
|
954
982
|
transform: scale(1.1);
|
|
955
983
|
}
|
|
956
|
-
`],Rt([_()],Te.prototype,"_position",2),Rt([a({type:String})],Te.prototype,"label",2),Rt([a({type:Boolean,reflect:!0})],Te.prototype,"vertical",2),Rt([a({type:String})],Te.prototype,"href",2),Rt([a({type:String})],Te.prototype,"target",2),Rt([a({type:String})],Te.prototype,"rel",2),Te=Rt([v("uui-button-inline-create")],Te);class $d{constructor(t,i){this._callback=t,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}setDuration(t){this._duration=t,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}}const x=(e,t,i=`This element has to be present for ${e.nodeName} to work appropriate.`)=>{customElements.get(t)||console.warn(`%c ${e.nodeName} requires ${t} element to be registered!`,"font-weight: bold;",i,e)},pl=(e,t)=>{function i(r){const s=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let p;if("TouchEvent"in window&&r instanceof TouchEvent)p=r.touches[0];else if(r instanceof PointerEvent)p=r;else return;const f=p.pageX-u,h=p.pageY-c;t?.onMove&&t.onMove(f,h)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),t?.onStop&&t.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),t?.initialEvent&&i(t.initialEvent)},M=(e,t,i)=>Math.min(Math.max(e,t),i),vl=(e,t,i)=>i+t-e,kd=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function Cd(e){return e?e.assignedNodes({flatten:!0}).length>0:!1}m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`;const Eo=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`;const Ed=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`;const Pd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`;const Sd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`;const tn=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`;const Od=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`;const Id=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`;const Ad=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,Ud=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`;const zd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;var Md=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,fl=e=>{throw TypeError(e)},Se=(e,t,i,o)=>{for(var r=o>1?void 0:o?Dd(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Md(t,i,r),r},bl=(e,t,i)=>t.has(e)||fl("Cannot "+i),Ld=(e,t,i)=>(bl(e,t,"read from private field"),t.get(e)),Td=(e,t,i)=>t.has(e)?fl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Vd=(e,t,i,o)=>(bl(e,t,"write to private field"),t.set(e,i),i),Po;let oe=class extends De(Me("",td(g))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,Td(this,Po),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(Ld(this,Po)),(this.state==="success"||this.state==="failed")&&Vd(this,Po,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":x(this,"uui-loader-circle"),e=l`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":x(this,"uui-icon"),e=l`<uui-icon
|
|
984
|
+
`],qt([_()],Be.prototype,"_position",2),qt([a({type:String})],Be.prototype,"label",2),qt([a({type:Boolean,reflect:!0})],Be.prototype,"vertical",2),qt([a({type:String})],Be.prototype,"href",2),qt([a({type:String})],Be.prototype,"target",2),qt([a({type:String})],Be.prototype,"rel",2),Be=qt([v("uui-button-inline-create")],Be);class Gd{constructor(t,i){this._callback=t,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}setDuration(t){this._duration=t,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}}const x=(e,t,i=`This element has to be present for ${e.nodeName} to work appropriate.`)=>{customElements.get(t)||console.warn(`%c ${e.nodeName} requires ${t} element to be registered!`,"font-weight: bold;",i,e)},Cl=(e,t)=>{function i(r){const s=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let p;if("TouchEvent"in window&&r instanceof TouchEvent)p=r.touches[0];else if(r instanceof MouseEvent)p=r;else return;const f=p.pageX-u,h=p.pageY-c;t?.onMove&&t.onMove(f,h)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),t?.onStop&&t.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),t?.initialEvent&&i(t.initialEvent)},M=(e,t,i)=>Math.min(Math.max(e,t),i),El=(e,t,i)=>i+t-e,qd=(e,t,i)=>{let o=e;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(t)&&o.getAttribute(t)===i,s=o.querySelector(`[${t}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${t}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function Kd(e){return e?e.assignedNodes({flatten:!0}).length>0:!1}m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`;const Ao=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`;const Xd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`;const Yd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`;const Zd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`;const cn=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`;const Qd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`;const Jd=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`;const ep=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,tp=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`;m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`;const ip=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;var rp=Object.defineProperty,op=Object.getOwnPropertyDescriptor,Pl=e=>{throw TypeError(e)},Ae=(e,t,i,o)=>{for(var r=o>1?void 0:o?op(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&rp(t,i,r),r},Sl=(e,t,i)=>t.has(e)||Pl("Cannot "+i),sp=(e,t,i)=>(Sl(e,t,"read from private field"),t.get(e)),np=(e,t,i)=>t.has(e)?Pl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ap=(e,t,i,o)=>(Sl(e,t,"write to private field"),t.set(e,i),i),Uo;let se=class extends Ne(Te("",kd(g))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,np(this,Uo),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(sp(this,Uo)),(this.state==="success"||this.state==="failed")&&ap(this,Uo,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":x(this,"uui-loader-circle"),e=l`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":x(this,"uui-icon"),e=l`<uui-icon
|
|
957
985
|
name="check"
|
|
958
|
-
.fallback=${
|
|
986
|
+
.fallback=${Ao.strings[0]}></uui-icon>`;break;case"failed":x(this,"uui-icon"),e=l`<uui-icon
|
|
959
987
|
name="wrong"
|
|
960
|
-
.fallback=${
|
|
988
|
+
.fallback=${ip.strings[0]}></uui-icon>`;break;default:return E}return l`<div id="state">${e}</div>`}render(){return this.href?l`
|
|
961
989
|
<a
|
|
962
990
|
id="button"
|
|
963
991
|
aria-label=${w(this.label)}
|
|
@@ -975,7 +1003,7 @@
|
|
|
975
1003
|
${this.renderState()} ${this.renderLabel()}
|
|
976
1004
|
<slot name="extra"></slot>
|
|
977
1005
|
</button>
|
|
978
|
-
`}};
|
|
1006
|
+
`}};Uo=new WeakMap,se.styles=[Po,b`
|
|
979
1007
|
:host {
|
|
980
1008
|
position: relative;
|
|
981
1009
|
display: inline-flex;
|
|
@@ -1076,7 +1104,7 @@
|
|
|
1076
1104
|
|
|
1077
1105
|
button[disabled]:active,
|
|
1078
1106
|
a:not([href]):active {
|
|
1079
|
-
animation: ${
|
|
1107
|
+
animation: ${So};
|
|
1080
1108
|
}
|
|
1081
1109
|
|
|
1082
1110
|
/* ANIMATIONS */
|
|
@@ -1127,32 +1155,64 @@
|
|
|
1127
1155
|
/** Button color attribute: */
|
|
1128
1156
|
#button {
|
|
1129
1157
|
--color: var(--uui-color-default,#1b264f);
|
|
1130
|
-
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
1158
|
+
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
1159
|
+
28,
|
|
1160
|
+
35,
|
|
1161
|
+
59
|
|
1162
|
+
));
|
|
1131
1163
|
--color-emphasis: var(--uui-color-default-emphasis,#3544b1);
|
|
1132
1164
|
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
1133
1165
|
}
|
|
1134
1166
|
:host([color='positive']) #button {
|
|
1135
1167
|
--color: var(--uui-color-positive,#0b8152);
|
|
1136
|
-
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
1137
|
-
|
|
1168
|
+
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
1169
|
+
10,
|
|
1170
|
+
115,
|
|
1171
|
+
73
|
|
1172
|
+
));
|
|
1173
|
+
--color-emphasis: var(--uui-color-positive-emphasis,rgb(
|
|
1174
|
+
13,
|
|
1175
|
+
155,
|
|
1176
|
+
98
|
|
1177
|
+
));
|
|
1138
1178
|
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
1139
1179
|
}
|
|
1140
1180
|
:host([color='warning']) #button {
|
|
1141
1181
|
--color: var(--uui-color-warning,#fbd142);
|
|
1142
1182
|
--color-standalone: var(--uui-color-warning-standalone,#a17700);
|
|
1143
|
-
--color-emphasis: var(--uui-color-warning-emphasis,rgb(
|
|
1183
|
+
--color-emphasis: var(--uui-color-warning-emphasis,rgb(
|
|
1184
|
+
251,
|
|
1185
|
+
224,
|
|
1186
|
+
101
|
|
1187
|
+
));
|
|
1144
1188
|
--color-contrast: var(--uui-color-warning-contrast,#000);
|
|
1145
1189
|
}
|
|
1146
1190
|
:host([color='danger']) #button {
|
|
1147
1191
|
--color: var(--uui-color-danger,#d42054);
|
|
1148
|
-
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
1149
|
-
|
|
1192
|
+
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
1193
|
+
191,
|
|
1194
|
+
33,
|
|
1195
|
+
78
|
|
1196
|
+
));
|
|
1197
|
+
--color-emphasis: var(--uui-color-danger-emphasis,rgb(
|
|
1198
|
+
226,
|
|
1199
|
+
60,
|
|
1200
|
+
107
|
|
1201
|
+
));
|
|
1150
1202
|
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
1151
1203
|
}
|
|
1152
1204
|
:host([color='invalid']) #button {
|
|
1153
1205
|
--color: var(--uui-color-invalid,#d42054);
|
|
1154
|
-
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
1155
|
-
|
|
1206
|
+
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
1207
|
+
191,
|
|
1208
|
+
33,
|
|
1209
|
+
78
|
|
1210
|
+
));
|
|
1211
|
+
--color-emphasis: var(--uui-color-invalid-emphasis,rgb(
|
|
1212
|
+
226,
|
|
1213
|
+
60,
|
|
1214
|
+
107
|
|
1215
|
+
));
|
|
1156
1216
|
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
1157
1217
|
}
|
|
1158
1218
|
:host([disabled]) #button {
|
|
@@ -1174,7 +1234,11 @@
|
|
|
1174
1234
|
:host(:not([disabled]):hover) #button {
|
|
1175
1235
|
background-color: var(
|
|
1176
1236
|
--uui-button-background-color-hover,
|
|
1177
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
1237
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
1238
|
+
250,
|
|
1239
|
+
250,
|
|
1240
|
+
250
|
|
1241
|
+
))
|
|
1178
1242
|
);
|
|
1179
1243
|
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1180
1244
|
border-color: var(--uui-button-border-color-hover, transparent);
|
|
@@ -1235,7 +1299,11 @@
|
|
|
1235
1299
|
:host([look='secondary']:hover) #button {
|
|
1236
1300
|
background-color: var(
|
|
1237
1301
|
--uui-button-background-color-hover,
|
|
1238
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
1302
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
1303
|
+
250,
|
|
1304
|
+
250,
|
|
1305
|
+
250
|
|
1306
|
+
))
|
|
1239
1307
|
);
|
|
1240
1308
|
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1241
1309
|
border-color: var(--uui-button-border-color-hover, transparent);
|
|
@@ -1304,12 +1372,12 @@
|
|
|
1304
1372
|
var(--color-standalone)
|
|
1305
1373
|
);
|
|
1306
1374
|
}
|
|
1307
|
-
`],
|
|
1375
|
+
`],Ae([a({type:String,reflect:!0})],se.prototype,"type",2),Ae([a({type:Boolean,reflect:!0})],se.prototype,"disabled",2),Ae([a({reflect:!0})],se.prototype,"look",2),Ae([a({reflect:!0})],se.prototype,"color",2),Ae([a({type:Boolean,reflect:!0})],se.prototype,"compact",2),Ae([a({type:String,reflect:!0})],se.prototype,"state",2),Ae([a({type:String})],se.prototype,"href",2),Ae([a({type:String})],se.prototype,"target",2),Ae([a({type:String})],se.prototype,"rel",2),Ae([O("#button")],se.prototype,"_button",2),se=Ae([v("uui-button")],se);class Kt extends A{constructor(){super(...arguments),this.text=null}}Kt.COPIED="copied",Kt.COPYING="copying";var lp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,Ol=e=>{throw TypeError(e)},zo=(e,t,i,o)=>{for(var r=o>1?void 0:o?up(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&lp(t,i,r),r},Il=(e,t,i)=>t.has(e)||Ol("Cannot "+i),hn=(e,t,i)=>(Il(e,t,"read from private field"),i?i.call(e):t.get(e)),Al=(e,t,i)=>t.has(e)?Ol("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),cp=(e,t,i,o)=>(Il(e,t,"write to private field"),t.set(e,i),i),$r,dn;let Xt=class extends se{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,Al(this,$r),Al(this,dn,async()=>{this.state="waiting";let e=this.text;if(this.copyFrom){const i=document.getElementById(this.copyFrom);if(i)"value"in i?e=i.value:e=i.textContent??i.innerText??"";else{console.error(`Element ID ${this.copyFrom} not found to copy from`),this.state="failed";return}}const t=new Kt(Kt.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const i=new Kt(Kt.COPIED);i.text=e,this.dispatchEvent(i),cp(this,$r,setTimeout(()=>{this.state="success"},this.animationStateDelay))}catch(i){this.state="failed",console.error("Error copying to clipboard",i)}}),x(this,"uui-icon"),this.addEventListener("click",hn(this,dn))}disconnectedCallback(){super.disconnectedCallback(),hn(this,$r)&&clearTimeout(hn(this,$r))}renderLabel(){return l`
|
|
1308
1376
|
<slot class="label">
|
|
1309
1377
|
<uui-icon name="copy"></uui-icon>
|
|
1310
1378
|
</slot>
|
|
1311
|
-
`}}
|
|
1312
|
-
<div id="select-border"></div>`}};
|
|
1379
|
+
`}};$r=new WeakMap,dn=new WeakMap,Xt.styles=se.styles,zo([a({type:String})],Xt.prototype,"text",2),zo([a({type:String,attribute:"copy-from"})],Xt.prototype,"copyFrom",2),zo([a({type:Number,attribute:"animation-state-delay"})],Xt.prototype,"animationStateDelay",2),Xt=zo([v("uui-button-copy-text")],Xt);class Ei extends A{}Ei.OPEN="open";var hp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Pi=(e,t,i,o)=>{for(var r=o>1?void 0:o?dp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&hp(t,i,r),r};let J=class extends ko(yi(g)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new Ei(Ei.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new Ei(Ei.OPEN)))}render(){return l`<slot id="open-part"></slot>
|
|
1380
|
+
<div id="select-border"></div>`}};J.styles=[bi,b`
|
|
1313
1381
|
:host {
|
|
1314
1382
|
position: relative;
|
|
1315
1383
|
display: flex;
|
|
@@ -1455,24 +1523,24 @@
|
|
|
1455
1523
|
background: var(--uui-color-disabled,#f3f3f5);
|
|
1456
1524
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1457
1525
|
}
|
|
1458
|
-
`],
|
|
1459
|
-
${
|
|
1460
|
-
${this.href?
|
|
1526
|
+
`],Pi([a({type:Boolean,reflect:!0,attribute:"disabled"})],J.prototype,"disabled",2),Pi([a({type:Boolean,reflect:!0})],J.prototype,"error",2),Pi([a({type:String})],J.prototype,"href",2),Pi([a({type:String})],J.prototype,"target",2),Pi([a({type:String})],J.prototype,"rel",2),J=Pi([v("uui-card")],J);var pp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,Ul=e=>{throw TypeError(e)},Mo=(e,t,i,o)=>{for(var r=o>1?void 0:o?vp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&pp(t,i,r),r},fp=(e,t,i)=>t.has(e)||Ul("Cannot "+i),bp=(e,t,i)=>t.has(e)?Ul("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),kr=(e,t,i)=>(fp(e,t,"access private method"),i),Yt,zl,Ml,Dl,pn;let Zt=class extends J{constructor(){super(...arguments),bp(this,Yt),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return l`
|
|
1527
|
+
${kr(this,Yt,Dl).call(this)}
|
|
1528
|
+
${this.href?kr(this,Yt,Ml).call(this):kr(this,Yt,zl).call(this)}
|
|
1461
1529
|
<!-- Select border must be right after #open-part -->
|
|
1462
1530
|
<div id="select-border"></div>
|
|
1463
1531
|
|
|
1464
1532
|
<slot name="tag"></slot>
|
|
1465
1533
|
<slot name="actions"></slot>
|
|
1466
|
-
`}};
|
|
1534
|
+
`}};Yt=new WeakSet,zl=function(){return l`
|
|
1467
1535
|
<button
|
|
1468
1536
|
id="open-part"
|
|
1469
1537
|
class="uui-text"
|
|
1470
1538
|
tabindex=${this.disabled?E:"0"}
|
|
1471
1539
|
@click=${this.handleOpenClick}
|
|
1472
1540
|
@keydown=${this.handleOpenKeydown}>
|
|
1473
|
-
${
|
|
1541
|
+
${kr(this,Yt,pn).call(this)}
|
|
1474
1542
|
</button>
|
|
1475
|
-
`},
|
|
1543
|
+
`},Ml=function(){return l`
|
|
1476
1544
|
<a
|
|
1477
1545
|
id="open-part"
|
|
1478
1546
|
class="uui-text"
|
|
@@ -1480,16 +1548,16 @@
|
|
|
1480
1548
|
href=${w(this.disabled?void 0:this.href)}
|
|
1481
1549
|
target=${w(this.target||void 0)}
|
|
1482
1550
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1483
|
-
${
|
|
1551
|
+
${kr(this,Yt,pn).call(this)}
|
|
1484
1552
|
</a>
|
|
1485
|
-
`}
|
|
1553
|
+
`},Dl=function(){return l`<div id="portrait">
|
|
1486
1554
|
<slot></slot>
|
|
1487
|
-
</div> `},
|
|
1555
|
+
</div> `},pn=function(){return l`
|
|
1488
1556
|
<div id="content">
|
|
1489
1557
|
<span title="${this.name}" id="name">${this.name}</span>
|
|
1490
1558
|
<small title="${this.description}">${this.description}<slot name="description"></slot></small>
|
|
1491
1559
|
</div></div>
|
|
1492
|
-
`},
|
|
1560
|
+
`},Zt.styles=[...J.styles,b`
|
|
1493
1561
|
:host {
|
|
1494
1562
|
background-color: var(--uui-color-surface-alt,#f3f3f5);
|
|
1495
1563
|
}
|
|
@@ -1631,7 +1699,7 @@
|
|
|
1631
1699
|
calc(var(--uui-size-space-4,12px) * -1);
|
|
1632
1700
|
top: 0;
|
|
1633
1701
|
}
|
|
1634
|
-
`],
|
|
1702
|
+
`],Mo([a({type:String})],Zt.prototype,"name",2),Mo([a({type:String})],Zt.prototype,"description",2),Mo([a({type:String,attribute:"background"})],Zt.prototype,"background",1),Zt=Mo([v("uui-card-block-type")],Zt);var gp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,Ll=e=>{throw TypeError(e)},Do=(e,t,i,o)=>{for(var r=o>1?void 0:o?mp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&gp(t,i,r),r},_p=(e,t,i)=>t.has(e)||Ll("Cannot "+i),yp=(e,t,i)=>t.has(e)?Ll("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Lo=(e,t,i)=>(_p(e,t,"access private method"),i),Si,vn,Tl,Nl;let Qt=class extends J{constructor(){super(...arguments),yp(this,Si),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
1635
1703
|
xmlns="http://www.w3.org/2000/svg"
|
|
1636
1704
|
viewBox="0 0 24 24"
|
|
1637
1705
|
fill="none"
|
|
@@ -1645,13 +1713,13 @@
|
|
|
1645
1713
|
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return x(this,"uui-icon"),l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}renderDetail(){return l`<small id="detail"
|
|
1646
1714
|
>${this.detail}<slot name="detail"></slot></small
|
|
1647
1715
|
><slot id="default"></slot>`}render(){return l`
|
|
1648
|
-
${this.href?
|
|
1716
|
+
${this.href?Lo(this,Si,Nl).call(this):Lo(this,Si,Tl).call(this)}
|
|
1649
1717
|
<!-- Select border must be right after #open-part -->
|
|
1650
1718
|
<div id="select-border"></div>
|
|
1651
1719
|
|
|
1652
1720
|
<slot name="tag"></slot>
|
|
1653
1721
|
<slot name="actions"></slot>
|
|
1654
|
-
`}}
|
|
1722
|
+
`}};Si=new WeakSet,vn=function(){return l`
|
|
1655
1723
|
<span id="content" class="uui-text">
|
|
1656
1724
|
<span id="item">
|
|
1657
1725
|
<span id="icon">
|
|
@@ -1664,20 +1732,20 @@
|
|
|
1664
1732
|
</span>
|
|
1665
1733
|
${this.renderDetail()}
|
|
1666
1734
|
</span>
|
|
1667
|
-
`},
|
|
1735
|
+
`},Tl=function(){return l`<button
|
|
1668
1736
|
id="open-part"
|
|
1669
1737
|
tabindex=${this.disabled?E:0}
|
|
1670
1738
|
@click=${this.handleOpenClick}
|
|
1671
1739
|
@keydown=${this.handleOpenKeydown}>
|
|
1672
|
-
${
|
|
1673
|
-
</button>`},
|
|
1740
|
+
${Lo(this,Si,vn).call(this)}
|
|
1741
|
+
</button>`},Nl=function(){return l`<a
|
|
1674
1742
|
id="open-part"
|
|
1675
1743
|
tabindex=${this.disabled?E:0}
|
|
1676
1744
|
href=${w(this.disabled?void 0:this.href)}
|
|
1677
1745
|
target=${w(this.target||void 0)}
|
|
1678
1746
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1679
|
-
${
|
|
1680
|
-
</a>`},
|
|
1747
|
+
${Lo(this,Si,vn).call(this)}
|
|
1748
|
+
</a>`},Qt.styles=[...J.styles,b`
|
|
1681
1749
|
:host {
|
|
1682
1750
|
min-width: 250px;
|
|
1683
1751
|
flex-direction: column;
|
|
@@ -1779,33 +1847,33 @@
|
|
|
1779
1847
|
:host(:not([disabled])) #open-part:hover #default {
|
|
1780
1848
|
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
1781
1849
|
}
|
|
1782
|
-
`],
|
|
1850
|
+
`],Do([a({type:String})],Qt.prototype,"name",2),Do([a({type:String})],Qt.prototype,"detail",2),Do([_()],Qt.prototype,"_iconSlotHasContent",2),Qt=Do([v("uui-card-content-node")],Qt);var wp=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,Vl=e=>{throw TypeError(e)},Cr=(e,t,i,o)=>{for(var r=o>1?void 0:o?xp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&wp(t,i,r),r},$p=(e,t,i)=>t.has(e)||Vl("Cannot "+i),kp=(e,t,i)=>t.has(e)?Vl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),To=(e,t,i)=>($p(e,t,"access private method"),i),Oi,Bl,Hl,fn;let $t=class extends J{constructor(){super(...arguments),kp(this,Oi),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),x(this,"uui-symbol-folder"),x(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?l`<uui-symbol-folder id="entity-symbol"></uui-symbol-folder>`:l`<uui-symbol-file
|
|
1783
1851
|
id="entity-symbol"
|
|
1784
1852
|
type="${this.fileExt}"></uui-symbol-file>`}render(){return l` ${this.renderMedia()}
|
|
1785
1853
|
<slot @slotchange=${this.queryPreviews}></slot>
|
|
1786
|
-
${this.href?
|
|
1854
|
+
${this.href?To(this,Oi,Hl).call(this):To(this,Oi,Bl).call(this)}
|
|
1787
1855
|
<!-- Select border must be right after .open-part -->
|
|
1788
1856
|
<div id="select-border"></div>
|
|
1789
1857
|
|
|
1790
1858
|
<slot name="tag"></slot>
|
|
1791
|
-
<slot name="actions"></slot>`}};
|
|
1859
|
+
<slot name="actions"></slot>`}};Oi=new WeakSet,Bl=function(){return l`
|
|
1792
1860
|
<button
|
|
1793
1861
|
id="open-part"
|
|
1794
1862
|
tabindex=${this.disabled?E:"0"}
|
|
1795
1863
|
@click=${this.handleOpenClick}
|
|
1796
1864
|
@keydown=${this.handleOpenKeydown}>
|
|
1797
|
-
${
|
|
1865
|
+
${To(this,Oi,fn).call(this)}
|
|
1798
1866
|
</button>
|
|
1799
|
-
`},
|
|
1867
|
+
`},Hl=function(){return l`
|
|
1800
1868
|
<a
|
|
1801
1869
|
id="open-part"
|
|
1802
1870
|
tabindex=${this.disabled?E:"0"}
|
|
1803
1871
|
href=${w(this.disabled?void 0:this.href)}
|
|
1804
1872
|
target=${w(this.target||void 0)}
|
|
1805
1873
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1806
|
-
${
|
|
1874
|
+
${To(this,Oi,fn).call(this)}
|
|
1807
1875
|
</a>
|
|
1808
|
-
`},
|
|
1876
|
+
`},fn=function(){return l`
|
|
1809
1877
|
<div id="content" class="uui-text">
|
|
1810
1878
|
<!--
|
|
1811
1879
|
TODO: Implement info box when pop-out is ready
|
|
@@ -1813,7 +1881,7 @@
|
|
|
1813
1881
|
<span id="name" title="${this.name}">${this.name}</span>
|
|
1814
1882
|
<small id="detail">${this.detail}<slot name="detail"></slot></small>
|
|
1815
1883
|
</div>
|
|
1816
|
-
`}
|
|
1884
|
+
`},$t.styles=[...J.styles,b`
|
|
1817
1885
|
#entity-symbol {
|
|
1818
1886
|
align-self: center;
|
|
1819
1887
|
width: 60%;
|
|
@@ -1897,7 +1965,7 @@
|
|
|
1897
1965
|
position: relative;
|
|
1898
1966
|
display: flex;
|
|
1899
1967
|
width: 100%;
|
|
1900
|
-
|
|
1968
|
+
flex-direction: column;
|
|
1901
1969
|
font-family: inherit;
|
|
1902
1970
|
box-sizing: border-box;
|
|
1903
1971
|
text-align: left;
|
|
@@ -1953,26 +2021,26 @@
|
|
|
1953
2021
|
height: var(--uui-size-8);
|
|
1954
2022
|
}
|
|
1955
2023
|
*/
|
|
1956
|
-
`],
|
|
1957
|
-
${this.href?
|
|
2024
|
+
`],Cr([a({type:String})],$t.prototype,"name",2),Cr([a({type:String})],$t.prototype,"detail",2),Cr([a({type:String,attribute:"file-ext"})],$t.prototype,"fileExt",2),Cr([_()],$t.prototype,"hasPreview",2),$t=Cr([v("uui-card-media")],$t);var Cp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,jl=e=>{throw TypeError(e)},bn=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ep(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Cp(t,i,r),r},Pp=(e,t,i)=>t.has(e)||jl("Cannot "+i),Sp=(e,t,i)=>t.has(e)?jl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),No=(e,t,i)=>(Pp(e,t,"access private method"),i),Ii,Rl,Wl,gn;let Ai=class extends J{constructor(){super(...arguments),Sp(this,Ii),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=Kd(e.target)}}connectedCallback(){super.connectedCallback(),x(this,"uui-avatar")}render(){return l`
|
|
2025
|
+
${this.href?No(this,Ii,Wl).call(this):No(this,Ii,Rl).call(this)}
|
|
1958
2026
|
<!-- Select border must be right after #open-part -->
|
|
1959
2027
|
<div id="select-border"></div>
|
|
1960
2028
|
<slot name="tag"></slot>
|
|
1961
2029
|
<slot name="actions"></slot>
|
|
1962
|
-
`}};
|
|
2030
|
+
`}};Ii=new WeakSet,Rl=function(){return l`<div
|
|
1963
2031
|
id="open-part"
|
|
1964
2032
|
tabindex=${this.disabled?E:"0"}
|
|
1965
2033
|
@click=${this.handleOpenClick}
|
|
1966
2034
|
@keydown=${this.handleOpenKeydown}>
|
|
1967
|
-
${
|
|
1968
|
-
</div>`},
|
|
2035
|
+
${No(this,Ii,gn).call(this)}
|
|
2036
|
+
</div>`},Wl=function(){return l`<a
|
|
1969
2037
|
id="open-part"
|
|
1970
2038
|
tabindex=${this.disabled?E:"0"}
|
|
1971
2039
|
href=${w(this.disabled?void 0:this.href)}
|
|
1972
2040
|
target=${w(this.target||void 0)}
|
|
1973
2041
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1974
|
-
${
|
|
1975
|
-
</a>`},
|
|
2042
|
+
${No(this,Ii,gn).call(this)}
|
|
2043
|
+
</a>`},gn=function(){return l`<div id="content">
|
|
1976
2044
|
${this._avatarSlotHasContent?E:l`<uui-avatar
|
|
1977
2045
|
class="avatar"
|
|
1978
2046
|
name=${this.name}
|
|
@@ -1983,7 +2051,7 @@
|
|
|
1983
2051
|
@slotchange=${this._avatarSlotChanged}></slot>
|
|
1984
2052
|
<span title="${this.name}">${this.name}</span>
|
|
1985
2053
|
<slot></slot>
|
|
1986
|
-
</div>`},
|
|
2054
|
+
</div>`},Ai.styles=[...J.styles,b`
|
|
1987
2055
|
:host {
|
|
1988
2056
|
min-width: 250px;
|
|
1989
2057
|
}
|
|
@@ -2069,7 +2137,7 @@
|
|
|
2069
2137
|
margin-top: var(--uui-size-space-1,3px);
|
|
2070
2138
|
margin-bottom: var(--uui-size-space-2,6px);
|
|
2071
2139
|
}
|
|
2072
|
-
`],
|
|
2140
|
+
`],bn([a({type:String})],Ai.prototype,"name",2),bn([_()],Ai.prototype,"_avatarSlotHasContent",2),Ai=bn([v("uui-card-user")],Ai);var Op=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,Fl=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ip(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Op(t,i,r),r};let Er=class extends g{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return l`<svg
|
|
2073
2141
|
xmlns="http://www.w3.org/2000/svg"
|
|
2074
2142
|
viewBox="0 0 24 24"
|
|
2075
2143
|
fill="none"
|
|
@@ -2078,7 +2146,7 @@
|
|
|
2078
2146
|
stroke-linecap="round"
|
|
2079
2147
|
stroke-linejoin="round">
|
|
2080
2148
|
<path d="m4 9 8 8 8-8"></path>
|
|
2081
|
-
</svg>`}};
|
|
2149
|
+
</svg>`}};Er.styles=[b`
|
|
2082
2150
|
:host {
|
|
2083
2151
|
display: inline-block;
|
|
2084
2152
|
width: 12px;
|
|
@@ -2092,13 +2160,13 @@
|
|
|
2092
2160
|
:host([open]) svg {
|
|
2093
2161
|
transform: rotate(180deg);
|
|
2094
2162
|
}
|
|
2095
|
-
`],
|
|
2163
|
+
`],Fl([a({type:Boolean,reflect:!0})],Er.prototype,"open",2),Er=Fl([v("uui-caret")],Er);var Ap=Object.getOwnPropertyDescriptor,Up=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ap(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Pr=class extends ke{renderCheckbox(){return l`
|
|
2096
2164
|
<div id="ticker">
|
|
2097
2165
|
<div id="icon-check">
|
|
2098
|
-
${this.indeterminate?
|
|
2166
|
+
${this.indeterminate?Jd:Ao}
|
|
2099
2167
|
</div>
|
|
2100
2168
|
</div>
|
|
2101
|
-
`}};
|
|
2169
|
+
`}};Pr.formAssociated=!0,Pr.styles=[...ke.styles,Po,b`
|
|
2102
2170
|
:host {
|
|
2103
2171
|
--uui-checkbox-size: 18px;
|
|
2104
2172
|
}
|
|
@@ -2135,7 +2203,11 @@
|
|
|
2135
2203
|
);
|
|
2136
2204
|
background-color: var(
|
|
2137
2205
|
--uui-checkbox-background-color-hover,
|
|
2138
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
2206
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
2207
|
+
250,
|
|
2208
|
+
250,
|
|
2209
|
+
250
|
|
2210
|
+
))
|
|
2139
2211
|
);
|
|
2140
2212
|
}
|
|
2141
2213
|
label:focus #ticker {
|
|
@@ -2145,7 +2217,11 @@
|
|
|
2145
2217
|
);
|
|
2146
2218
|
background-color: var(
|
|
2147
2219
|
--uui-checkbox-background-color-focus,
|
|
2148
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
2220
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
2221
|
+
250,
|
|
2222
|
+
250,
|
|
2223
|
+
250
|
|
2224
|
+
))
|
|
2149
2225
|
);
|
|
2150
2226
|
}
|
|
2151
2227
|
input:checked:not([disabled]) + #ticker,
|
|
@@ -2155,12 +2231,20 @@
|
|
|
2155
2231
|
|
|
2156
2232
|
label:hover input:checked:not([disabled]) + #ticker,
|
|
2157
2233
|
label:hover input:indeterminate:not([disabled]) + #ticker {
|
|
2158
|
-
border-color: var(--uui-color-selected-emphasis,rgb(
|
|
2234
|
+
border-color: var(--uui-color-selected-emphasis,rgb(
|
|
2235
|
+
70,
|
|
2236
|
+
86,
|
|
2237
|
+
200
|
|
2238
|
+
));
|
|
2159
2239
|
}
|
|
2160
2240
|
|
|
2161
2241
|
label:focus input:checked + #ticker,
|
|
2162
2242
|
label:focus input:indeterminate + #ticker {
|
|
2163
|
-
border-color: var(--uui-color-selected-emphasis,rgb(
|
|
2243
|
+
border-color: var(--uui-color-selected-emphasis,rgb(
|
|
2244
|
+
70,
|
|
2245
|
+
86,
|
|
2246
|
+
200
|
|
2247
|
+
));
|
|
2164
2248
|
}
|
|
2165
2249
|
|
|
2166
2250
|
#icon-check {
|
|
@@ -2196,7 +2280,11 @@
|
|
|
2196
2280
|
}
|
|
2197
2281
|
label:hover input:checked:not([disabled]) + #ticker::before,
|
|
2198
2282
|
label:hover input:indeterminate:not([disabled]) + #ticker::before {
|
|
2199
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
2283
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
2284
|
+
70,
|
|
2285
|
+
86,
|
|
2286
|
+
200
|
|
2287
|
+
));
|
|
2200
2288
|
}
|
|
2201
2289
|
|
|
2202
2290
|
input:checked + #ticker::before,
|
|
@@ -2210,7 +2298,11 @@
|
|
|
2210
2298
|
}
|
|
2211
2299
|
label:focus input:checked + #ticker,
|
|
2212
2300
|
label:focus input:indeterminate + #ticker {
|
|
2213
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
2301
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
2302
|
+
70,
|
|
2303
|
+
86,
|
|
2304
|
+
200
|
|
2305
|
+
));
|
|
2214
2306
|
}
|
|
2215
2307
|
|
|
2216
2308
|
input:focus + #ticker {
|
|
@@ -2247,7 +2339,11 @@
|
|
|
2247
2339
|
:host(:not([pristine])[internals-invalid]) label:hover input:indeterminate:not([disabled]) + #ticker,
|
|
2248
2340
|
:host(:not([pristine])[internals-invalid]) label:focus input:checked + #ticker,
|
|
2249
2341
|
:host(:not([pristine])[internals-invalid]) label:focus input:indeterminate + #ticker {
|
|
2250
|
-
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
2342
|
+
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
2343
|
+
191,
|
|
2344
|
+
33,
|
|
2345
|
+
78
|
|
2346
|
+
));
|
|
2251
2347
|
}
|
|
2252
2348
|
|
|
2253
2349
|
:host([disabled]) #ticker {
|
|
@@ -2266,33 +2362,33 @@
|
|
|
2266
2362
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2267
2363
|
}
|
|
2268
2364
|
:host([disabled]) label:active #ticker {
|
|
2269
|
-
animation: ${
|
|
2365
|
+
animation: ${So};
|
|
2270
2366
|
}
|
|
2271
2367
|
:host([disabled]) input:checked + #ticker #icon-check,
|
|
2272
2368
|
:host([disabled]) input:indeterminate + #ticker #icon-check {
|
|
2273
2369
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2274
2370
|
}
|
|
2275
|
-
`],
|
|
2371
|
+
`],Pr=Up([v("uui-checkbox")],Pr);/**
|
|
2276
2372
|
* @license
|
|
2277
2373
|
* Copyright 2018 Google LLC
|
|
2278
2374
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2279
|
-
*/const
|
|
2375
|
+
*/const mn=$i(class extends ki{constructor(e){if(super(e),e.type!==Ie.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}const i=e.element.classList;for(const o of this.st)o in t||(i.remove(o),this.st.delete(o));for(const o in t){const r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(i.add(o),this.st.add(o)):(i.remove(o),this.st.delete(o)))}return he}});var zp={grad:.9,turn:360,rad:360/(2*Math.PI)},Je=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},X=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=Math.pow(10,t)),Math.round(i*e)/i+0},Ce=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=1),e>i?i:e>t?e:t},Gl=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ql=function(e){return{r:Ce(e.r,0,255),g:Ce(e.g,0,255),b:Ce(e.b,0,255),a:Ce(e.a)}},_n=function(e){return{r:X(e.r),g:X(e.g),b:X(e.b),a:X(e.a,3)}},Mp=/^#([0-9a-f]{3,8})$/i,Vo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Kl=function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=Math.max(t,i,o),n=s-Math.min(t,i,o),u=n?s===t?(i-o)/n:s===i?2+(o-t)/n:4+(t-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},Xl=function(e){var t=e.h,i=e.s,o=e.v,r=e.a;t=t/360*6,i/=100,o/=100;var s=Math.floor(t),n=o*(1-i),u=o*(1-(t-s)*i),c=o*(1-(1-t+s)*i),p=s%6;return{r:255*[o,u,n,n,c,o][p],g:255*[c,o,o,u,n,n][p],b:255*[n,n,c,o,o,u][p],a:r}},Yl=function(e){return{h:Gl(e.h),s:Ce(e.s,0,100),l:Ce(e.l,0,100),a:Ce(e.a)}},Zl=function(e){return{h:X(e.h),s:X(e.s),l:X(e.l),a:X(e.a,3)}},Ql=function(e){return Xl((i=(t=e).s,{h:t.h,s:(i*=((o=t.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:t.a}));var t,i,o},Sr=function(e){return{h:(t=Kl(e)).h,s:(r=(200-(i=t.s))*(o=t.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,i,o,r},Dp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Np=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Jl={string:[[function(e){var t=Mp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?X(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?X(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Tp.exec(e)||Np.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ql({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Dp.exec(e)||Lp.exec(e);if(!t)return null;var i,o,r=Yl({h:(i=t[1],o=t[2],o===void 0&&(o="deg"),Number(i)*(zp[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ql(r)},"hsl"]],object:[[function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return Je(t)&&Je(i)&&Je(o)?ql({r:Number(t),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,i=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!Je(t)||!Je(i)||!Je(o))return null;var n=Yl({h:Number(t),s:Number(i),l:Number(o),a:Number(s)});return Ql(n)},"hsl"],[function(e){var t=e.h,i=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!Je(t)||!Je(i)||!Je(o))return null;var n=function(u){return{h:Gl(u.h),s:Ce(u.s,0,100),v:Ce(u.v,0,100),a:Ce(u.a)}}({h:Number(t),s:Number(i),v:Number(o),a:Number(s)});return Xl(n)},"hsv"]]},eu=function(e,t){for(var i=0;i<t.length;i++){var o=t[i][0](e);if(o)return[o,t[i][1]]}return[null,void 0]},Vp=function(e){return typeof e=="string"?eu(e.trim(),Jl.string):typeof e=="object"&&e!==null?eu(e,Jl.object):[null,void 0]},yn=function(e,t){var i=Sr(e);return{h:i.h,s:Ce(i.s+100*t,0,100),l:i.l,a:i.a}},wn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},tu=function(e,t){var i=Sr(e);return{h:i.h,s:i.s,l:Ce(i.l+100*t,0,100),a:i.a}},iu=function(){function e(t){this.parsed=Vp(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return X(wn(this.rgba),2)},e.prototype.isDark=function(){return wn(this.rgba)<.5},e.prototype.isLight=function(){return wn(this.rgba)>=.5},e.prototype.toHex=function(){return t=_n(this.rgba),i=t.r,o=t.g,r=t.b,n=(s=t.a)<1?Vo(X(255*s)):"","#"+Vo(i)+Vo(o)+Vo(r)+n;var t,i,o,r,s,n},e.prototype.toRgb=function(){return _n(this.rgba)},e.prototype.toRgbString=function(){return t=_n(this.rgba),i=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var t,i,o,r,s},e.prototype.toHsl=function(){return Zl(Sr(this.rgba))},e.prototype.toHslString=function(){return t=Zl(Sr(this.rgba)),i=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var t,i,o,r,s},e.prototype.toHsv=function(){return t=Kl(this.rgba),{h:X(t.h),s:X(t.s),v:X(t.v),a:X(t.a,3)};var t},e.prototype.invert=function(){return Ee({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ee(yn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ee(yn(this.rgba,-t))},e.prototype.grayscale=function(){return Ee(yn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ee(tu(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ee(tu(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ee({r:(i=this.rgba).r,g:i.g,b:i.b,a:t}):X(this.rgba.a,3);var i},e.prototype.hue=function(t){var i=Sr(this.rgba);return typeof t=="number"?Ee({h:t,s:i.s,l:i.l,a:i.a}):X(i.h)},e.prototype.isEqual=function(t){return this.toHex()===Ee(t).toHex()},e}(),Ee=function(e){return e instanceof iu?e:new iu(e)};class Bo extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Bo.CHANGE="change";var Bp=Object.defineProperty,Hp=Object.getOwnPropertyDescriptor,He=(e,t,i,o)=>{for(var r=o>1?void 0:o?Hp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Bp(t,i,r),r};let be=class extends g{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.disabled=!1,this.readonly=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000"}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const i=Ee(e);if(i.isValid()){const{h:o,s:r,l:s,a:n}=i.toHsl();o!==0&&(this.hue=o),this.lightness=s,this.saturation=r,this.brightness=this.getBrightness(s),this.alpha=n*100}}catch(i){console.error("Something went wrong parsing the color string.",i)}}handleGridDrag(e){if(this.disabled||this.readonly)return;const t=this.shadowRoot.querySelector(".color-area"),i=t.querySelector(".color-area__handle"),{width:o,height:r}=t.getBoundingClientRect();i.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,Cl(t,{onMove:(s,n)=>{isNaN(s)||isNaN(n)||(this.saturation=M(s/o*100,0,100),this.brightness=M(100-n/r*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=M(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=M(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=M(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=M(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return M(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return M((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=Ee({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new Bo(Bo.CHANGE))}getHexString(e,t,i,o=100){const r=Ee(`hsla(${e}, ${t}%, ${i}%, ${o/100})`);return r.isValid()?r.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return l`
|
|
2280
2376
|
<div
|
|
2281
2377
|
part="grid"
|
|
2282
2378
|
class="color-area"
|
|
2283
|
-
style=${
|
|
2379
|
+
style=${Qe({backgroundColor:this.getHexString(this.hue,100,50)})}
|
|
2284
2380
|
@mousedown=${this.handleGridDrag}
|
|
2285
2381
|
@touchstart=${this.handleGridDrag}>
|
|
2286
2382
|
<span
|
|
2287
2383
|
part="grid-handle"
|
|
2288
|
-
class=${
|
|
2289
|
-
style=${
|
|
2384
|
+
class=${mn({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}
|
|
2385
|
+
style=${Qe({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}
|
|
2290
2386
|
role="application"
|
|
2291
2387
|
tabindex=${w(this.disabled?void 0:"0")}
|
|
2292
2388
|
aria-label="HSB"
|
|
2293
2389
|
@keydown=${this.handleGridKeyDown}></span>
|
|
2294
2390
|
</div>
|
|
2295
|
-
`}};
|
|
2391
|
+
`}};be.styles=[b`
|
|
2296
2392
|
:host {
|
|
2297
2393
|
display: inline-block;
|
|
2298
2394
|
width: 280px;
|
|
@@ -2347,17 +2443,17 @@
|
|
|
2347
2443
|
.color-area__handle--empty {
|
|
2348
2444
|
display: none;
|
|
2349
2445
|
}
|
|
2350
|
-
`],
|
|
2446
|
+
`],He([_()],be.prototype,"isDraggingGridHandle",2),He([a({type:Boolean,reflect:!0})],be.prototype,"disabled",2),He([a({type:Boolean,reflect:!0})],be.prototype,"readonly",2),He([a({type:Number})],be.prototype,"hue",2),He([a({type:Number})],be.prototype,"saturation",2),He([a({type:Number})],be.prototype,"lightness",2),He([a({type:Number})],be.prototype,"brightness",2),He([a({type:Number})],be.prototype,"alpha",2),He([a({type:String})],be.prototype,"value",1),be=He([v("uui-color-area")],be);/**
|
|
2351
2447
|
* @license
|
|
2352
2448
|
* Copyright 2020 Google LLC
|
|
2353
2449
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2354
|
-
*/const{I:
|
|
2450
|
+
*/const{I:jp}=oh,ru=e=>e.strings===void 0,ou=()=>document.createComment(""),Or=(e,t,i)=>{const o=e._$AA.parentNode,r=t===void 0?e._$AB:t._$AA;if(i===void 0){const s=o.insertBefore(ou(),r),n=o.insertBefore(ou(),r);i=new jp(s,n,e,e.options)}else{const s=i._$AB.nextSibling,n=i._$AM,u=n!==e;if(u){let c;i._$AQ?.(e),i._$AM=e,i._$AP!==void 0&&(c=e._$AU)!==n._$AU&&i._$AP(c)}if(s!==r||u){let c=i._$AA;for(;c!==s;){const p=c.nextSibling;o.insertBefore(c,r),c=p}}}return i},Jt=(e,t,i=e)=>(e._$AI(t,i),e),Rp={},su=(e,t=Rp)=>e._$AH=t,Wp=e=>e._$AH,xn=e=>{e._$AP?.(!1,!0);let t=e._$AA;const i=e._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
2355
2451
|
* @license
|
|
2356
2452
|
* Copyright 2020 Google LLC
|
|
2357
2453
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2358
|
-
*/const xp=mi(class extends _i{constructor(e){if(super(e),e.type!==Pe.PROPERTY&&e.type!==Pe.ATTRIBUTE&&e.type!==Pe.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Fl(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ue||t===E)return t;const i=e.element,o=e.name;if(e.type===Pe.PROPERTY){if(t===i[o])return ue}else if(e.type===Pe.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(o))return ue}else if(e.type===Pe.ATTRIBUTE&&i.getAttribute(o)===t+"")return ue;return ql(e),t}});var $p={grad:.9,turn:360,rad:360/(2*Math.PI)},Ze=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Y=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=Math.pow(10,t)),Math.round(i*e)/i+0},ke=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=1),e>i?i:e>t?e:t},Kl=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Xl=function(e){return{r:ke(e.r,0,255),g:ke(e.g,0,255),b:ke(e.b,0,255),a:ke(e.a)}},fn=function(e){return{r:Y(e.r),g:Y(e.g),b:Y(e.b),a:Y(e.a,3)}},kp=/^#([0-9a-f]{3,8})$/i,Lo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Yl=function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=Math.max(t,i,o),n=s-Math.min(t,i,o),u=n?s===t?(i-o)/n:s===i?2+(o-t)/n:4+(t-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},Zl=function(e){var t=e.h,i=e.s,o=e.v,r=e.a;t=t/360*6,i/=100,o/=100;var s=Math.floor(t),n=o*(1-i),u=o*(1-(t-s)*i),c=o*(1-(1-t+s)*i),p=s%6;return{r:255*[o,u,n,n,c,o][p],g:255*[c,o,o,u,n,n][p],b:255*[n,n,c,o,o,u][p],a:r}},Ql=function(e){return{h:Kl(e.h),s:ke(e.s,0,100),l:ke(e.l,0,100),a:ke(e.a)}},Jl=function(e){return{h:Y(e.h),s:Y(e.s),l:Y(e.l),a:Y(e.a,3)}},eu=function(e){return Zl((i=(t=e).s,{h:t.h,s:(i*=((o=t.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:t.a}));var t,i,o},Cr=function(e){return{h:(t=Yl(e)).h,s:(r=(200-(i=t.s))*(o=t.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,i,o,r},Cp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ep=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bn={string:[[function(e){var t=kp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Y(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Y(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Pp.exec(e)||Sp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Xl({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cp.exec(e)||Ep.exec(e);if(!t)return null;var i,o,r=Ql({h:(i=t[1],o=t[2],o===void 0&&(o="deg"),Number(i)*($p[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return eu(r)},"hsl"]],object:[[function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return Ze(t)&&Ze(i)&&Ze(o)?Xl({r:Number(t),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,i=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!Ze(t)||!Ze(i)||!Ze(o))return null;var n=Ql({h:Number(t),s:Number(i),l:Number(o),a:Number(s)});return eu(n)},"hsl"],[function(e){var t=e.h,i=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!Ze(t)||!Ze(i)||!Ze(o))return null;var n=function(u){return{h:Kl(u.h),s:ke(u.s,0,100),v:ke(u.v,0,100),a:ke(u.a)}}({h:Number(t),s:Number(i),v:Number(o),a:Number(s)});return Zl(n)},"hsv"]]},tu=function(e,t){for(var i=0;i<t.length;i++){var o=t[i][0](e);if(o)return[o,t[i][1]]}return[null,void 0]},Op=function(e){return typeof e=="string"?tu(e.trim(),bn.string):typeof e=="object"&&e!==null?tu(e,bn.object):[null,void 0]},gn=function(e,t){var i=Cr(e);return{h:i.h,s:ke(i.s+100*t,0,100),l:i.l,a:i.a}},mn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},iu=function(e,t){var i=Cr(e);return{h:i.h,s:i.s,l:ke(i.l+100*t,0,100),a:i.a}},To=function(){function e(t){this.parsed=Op(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Y(mn(this.rgba),2)},e.prototype.isDark=function(){return mn(this.rgba)<.5},e.prototype.isLight=function(){return mn(this.rgba)>=.5},e.prototype.toHex=function(){return t=fn(this.rgba),i=t.r,o=t.g,r=t.b,n=(s=t.a)<1?Lo(Y(255*s)):"","#"+Lo(i)+Lo(o)+Lo(r)+n;var t,i,o,r,s,n},e.prototype.toRgb=function(){return fn(this.rgba)},e.prototype.toRgbString=function(){return t=fn(this.rgba),i=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var t,i,o,r,s},e.prototype.toHsl=function(){return Jl(Cr(this.rgba))},e.prototype.toHslString=function(){return t=Jl(Cr(this.rgba)),i=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var t,i,o,r,s},e.prototype.toHsv=function(){return t=Yl(this.rgba),{h:Y(t.h),s:Y(t.s),v:Y(t.v),a:Y(t.a,3)};var t},e.prototype.invert=function(){return Oe({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Oe(gn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Oe(gn(this.rgba,-t))},e.prototype.grayscale=function(){return Oe(gn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Oe(iu(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Oe(iu(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Oe({r:(i=this.rgba).r,g:i.g,b:i.b,a:t}):Y(this.rgba.a,3);var i},e.prototype.hue=function(t){var i=Cr(this.rgba);return typeof t=="number"?Oe({h:t,s:i.s,l:i.l,a:i.a}):Y(i.h)},e.prototype.isEqual=function(t){return this.toHex()===Oe(t).toHex()},e}(),Oe=function(e){return e instanceof To?e:new To(e)},ru=[],Ip=function(e){e.forEach(function(t){ru.indexOf(t)<0&&(t(To,bn),ru.push(t))})};function Ap(e,t){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in i)o[i[r]]=r;var s={};e.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,p=o[this.toHex()];if(p)return p;if(n?.closest){var f=this.toRgb(),h=1/0,C="black";if(!s.length)for(var d in i)s[d]=new e(i[d]).toRgb();for(var y in i){var I=(u=f,c=s[y],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));I<h&&(h=I,C=y)}return C}},t.string.push([function(n){var u=n.toLowerCase(),c=u==="transparent"?"#0000":i[u];return c?new e(c).toRgb():null},"name"])}class Pi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Pi.CHANGE="change";var Up=Object.defineProperty,zp=Object.getOwnPropertyDescriptor,W=(e,t,i,o)=>{for(var r=o>1?void 0:o?zp(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Up(t,i,r),r};Ip([Ap]);const ou="EyeDropper"in window;let N=class extends Me("label",g){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=0,this._colord=Oe("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-icon-registry-essential"),x(this,"uui-input"),x(this,"uui-button"),x(this,"uui-button-group"),x(this,"uui-color-swatches"),x(this,"uui-color-swatch"),x(this,"uui-color-area"),x(this,"uui-color-slider"),x(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,i=this._colord.toHex(),o=i.length>7?i.substring(0,i.length-2):i,{r,g:s,b:n}=this._colord.toRgb(),{h:u,s:c,l:p}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),h=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(i);case"rgb":return this.setLetterCase(`rgb(${r}, ${s}, ${n})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${u}, ${c}%, ${p}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${u}, ${c}%, ${p}%)`);case"hsva":return this.setLetterCase(`hsva(${u}, ${c}%, ${f}%, ${h})`);default:return""}}getBrightness(e){return M(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return M((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,i={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(i)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const i={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(i)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,i={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(i)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){if(!ou)return;new EyeDropper().open().then(t=>this.setColor(t.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=0,this.inputValue="",this._value=e,this.dispatchEvent(new Pi(Pi.CHANGE)),!0;const t=new To(e),{h:i,s:o,l:r,a:s}=t.toHsl();this.hue=i,this.saturation=o,this.lightness=r,this.alpha=this.opacity?s*100:100;const n=e;return n&&n.h&&(this.hue=n.h),this._colord=t,this._syncValues(),this.dispatchEvent(new Pi(Pi.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,i,o=100){const r=Oe(`hsla(${e}, ${t}%, ${i}%, ${o/100})`);return r.isValid()?r.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){return l`
|
|
2454
|
+
*/const Fp=$i(class extends ki{constructor(e){if(super(e),e.type!==Ie.PROPERTY&&e.type!==Ie.ATTRIBUTE&&e.type!==Ie.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ru(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===he||t===E)return t;const i=e.element,o=e.name;if(e.type===Ie.PROPERTY){if(t===i[o])return he}else if(e.type===Ie.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(o))return he}else if(e.type===Ie.ATTRIBUTE&&i.getAttribute(o)===t+"")return he;return su(e),t}});var Gp={grad:.9,turn:360,rad:360/(2*Math.PI)},et=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Y=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=Math.pow(10,t)),Math.round(i*e)/i+0},Pe=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=1),e>i?i:e>t?e:t},nu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},au=function(e){return{r:Pe(e.r,0,255),g:Pe(e.g,0,255),b:Pe(e.b,0,255),a:Pe(e.a)}},$n=function(e){return{r:Y(e.r),g:Y(e.g),b:Y(e.b),a:Y(e.a,3)}},qp=/^#([0-9a-f]{3,8})$/i,Ho=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},lu=function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=Math.max(t,i,o),n=s-Math.min(t,i,o),u=n?s===t?(i-o)/n:s===i?2+(o-t)/n:4+(t-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},uu=function(e){var t=e.h,i=e.s,o=e.v,r=e.a;t=t/360*6,i/=100,o/=100;var s=Math.floor(t),n=o*(1-i),u=o*(1-(t-s)*i),c=o*(1-(1-t+s)*i),p=s%6;return{r:255*[o,u,n,n,c,o][p],g:255*[c,o,o,u,n,n][p],b:255*[n,n,c,o,o,u][p],a:r}},cu=function(e){return{h:nu(e.h),s:Pe(e.s,0,100),l:Pe(e.l,0,100),a:Pe(e.a)}},hu=function(e){return{h:Y(e.h),s:Y(e.s),l:Y(e.l),a:Y(e.a,3)}},du=function(e){return uu((i=(t=e).s,{h:t.h,s:(i*=((o=t.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:t.a}));var t,i,o},Ir=function(e){return{h:(t=lu(e)).h,s:(r=(200-(i=t.s))*(o=t.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,i,o,r},Kp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kn={string:[[function(e){var t=qp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Y(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Y(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Yp.exec(e)||Zp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:au({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Kp.exec(e)||Xp.exec(e);if(!t)return null;var i,o,r=cu({h:(i=t[1],o=t[2],o===void 0&&(o="deg"),Number(i)*(Gp[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return du(r)},"hsl"]],object:[[function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return et(t)&&et(i)&&et(o)?au({r:Number(t),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,i=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!et(t)||!et(i)||!et(o))return null;var n=cu({h:Number(t),s:Number(i),l:Number(o),a:Number(s)});return du(n)},"hsl"],[function(e){var t=e.h,i=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!et(t)||!et(i)||!et(o))return null;var n=function(u){return{h:nu(u.h),s:Pe(u.s,0,100),v:Pe(u.v,0,100),a:Pe(u.a)}}({h:Number(t),s:Number(i),v:Number(o),a:Number(s)});return uu(n)},"hsv"]]},pu=function(e,t){for(var i=0;i<t.length;i++){var o=t[i][0](e);if(o)return[o,t[i][1]]}return[null,void 0]},Qp=function(e){return typeof e=="string"?pu(e.trim(),kn.string):typeof e=="object"&&e!==null?pu(e,kn.object):[null,void 0]},Cn=function(e,t){var i=Ir(e);return{h:i.h,s:Pe(i.s+100*t,0,100),l:i.l,a:i.a}},En=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},vu=function(e,t){var i=Ir(e);return{h:i.h,s:i.s,l:Pe(i.l+100*t,0,100),a:i.a}},jo=function(){function e(t){this.parsed=Qp(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Y(En(this.rgba),2)},e.prototype.isDark=function(){return En(this.rgba)<.5},e.prototype.isLight=function(){return En(this.rgba)>=.5},e.prototype.toHex=function(){return t=$n(this.rgba),i=t.r,o=t.g,r=t.b,n=(s=t.a)<1?Ho(Y(255*s)):"","#"+Ho(i)+Ho(o)+Ho(r)+n;var t,i,o,r,s,n},e.prototype.toRgb=function(){return $n(this.rgba)},e.prototype.toRgbString=function(){return t=$n(this.rgba),i=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var t,i,o,r,s},e.prototype.toHsl=function(){return hu(Ir(this.rgba))},e.prototype.toHslString=function(){return t=hu(Ir(this.rgba)),i=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var t,i,o,r,s},e.prototype.toHsv=function(){return t=lu(this.rgba),{h:Y(t.h),s:Y(t.s),v:Y(t.v),a:Y(t.a,3)};var t},e.prototype.invert=function(){return Ue({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ue(Cn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ue(Cn(this.rgba,-t))},e.prototype.grayscale=function(){return Ue(Cn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ue(vu(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ue(vu(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ue({r:(i=this.rgba).r,g:i.g,b:i.b,a:t}):Y(this.rgba.a,3);var i},e.prototype.hue=function(t){var i=Ir(this.rgba);return typeof t=="number"?Ue({h:t,s:i.s,l:i.l,a:i.a}):Y(i.h)},e.prototype.isEqual=function(t){return this.toHex()===Ue(t).toHex()},e}(),Ue=function(e){return e instanceof jo?e:new jo(e)},fu=[],Jp=function(e){e.forEach(function(t){fu.indexOf(t)<0&&(t(jo,kn),fu.push(t))})};function ev(e,t){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in i)o[i[r]]=r;var s={};e.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,p=o[this.toHex()];if(p)return p;if(n?.closest){var f=this.toRgb(),h=1/0,C="black";if(!s.length)for(var d in i)s[d]=new e(i[d]).toRgb();for(var y in i){var I=(u=f,c=s[y],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));I<h&&(h=I,C=y)}return C}},t.string.push([function(n){var u=n.toLowerCase(),c=u==="transparent"?"#0000":i[u];return c?new e(c).toRgb():null},"name"])}class Ui extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Ui.CHANGE="change";var tv=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,W=(e,t,i,o)=>{for(var r=o>1?void 0:o?iv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&tv(t,i,r),r};Jp([ev]);const bu="EyeDropper"in window;let V=class extends Te("label",g){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=Ue("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-icon-registry-essential"),x(this,"uui-input"),x(this,"uui-button"),x(this,"uui-button-group"),x(this,"uui-color-swatches"),x(this,"uui-color-swatch"),x(this,"uui-color-area"),x(this,"uui-color-slider"),x(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,i=this._colord.toHex(),o=i.length>7?i.substring(0,i.length-2):i,{r,g:s,b:n}=this._colord.toRgb(),{h:u,s:c,l:p}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),h=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(i);case"rgb":return this.setLetterCase(`rgb(${r}, ${s}, ${n})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${u}, ${c}%, ${p}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${u}, ${c}%, ${p}%)`);case"hsva":return this.setLetterCase(`hsva(${u}, ${c}%, ${f}%, ${h})`);default:return""}}getBrightness(e){return M(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return M((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,i={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(i)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const i={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(i)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,i={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(i)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){if(!bu)return;new EyeDropper().open().then(t=>this.setColor(t.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=100,this.inputValue="",this._value=e,this.dispatchEvent(new Ui(Ui.CHANGE)),!0;const t=new jo(e),{h:i,s:o,l:r,a:s}=t.toHsl();this.hue=i,this.saturation=o,this.lightness=r,this.alpha=this.opacity?s*100:100;const n=e;return n&&n.h&&(this.hue=n.h),this._colord=t,this._syncValues(),this.dispatchEvent(new Ui(Ui.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,i,o=100){const r=Ue(`hsla(${e}, ${t}%, ${i}%, ${o/100})`);return r.isValid()?r.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){return l`
|
|
2359
2455
|
<div
|
|
2360
|
-
class=${
|
|
2456
|
+
class=${mn({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}
|
|
2361
2457
|
aria-disabled=${this.disabled?"true":"false"}>
|
|
2362
2458
|
<uui-color-area
|
|
2363
2459
|
.value="${this.value}"
|
|
@@ -2395,7 +2491,7 @@
|
|
|
2395
2491
|
class="color-picker__preview color-picker__transparent-bg"
|
|
2396
2492
|
title="Copy"
|
|
2397
2493
|
aria-label="Copy"
|
|
2398
|
-
style=${
|
|
2494
|
+
style=${Qe({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}
|
|
2399
2495
|
@click=${this.handleCopy}></button>
|
|
2400
2496
|
</div>
|
|
2401
2497
|
<div class="color-picker__user-input" aria-live="polite">
|
|
@@ -2407,7 +2503,7 @@
|
|
|
2407
2503
|
autocomplete="off"
|
|
2408
2504
|
autocapitalize="off"
|
|
2409
2505
|
spellcheck="false"
|
|
2410
|
-
.value=${
|
|
2506
|
+
.value=${Fp(this.inputValue)}
|
|
2411
2507
|
?disabled=${this.disabled}
|
|
2412
2508
|
?readonly=${this.readonly}
|
|
2413
2509
|
@keydown=${this.handleInputKeyDown}
|
|
@@ -2422,7 +2518,7 @@
|
|
|
2422
2518
|
compact>
|
|
2423
2519
|
<span>${this.format}</span>
|
|
2424
2520
|
</uui-button>`}
|
|
2425
|
-
${
|
|
2521
|
+
${bu?l`<uui-button
|
|
2426
2522
|
label="Select a color"
|
|
2427
2523
|
?disabled=${this.disabled||this.readonly}
|
|
2428
2524
|
@click=${this.handleEyeDropper}
|
|
@@ -2448,19 +2544,20 @@
|
|
|
2448
2544
|
type="button"
|
|
2449
2545
|
part="trigger"
|
|
2450
2546
|
aria-label="${this.label||"Open Color picker"}"
|
|
2451
|
-
class=${
|
|
2452
|
-
style=${
|
|
2547
|
+
class=${mn({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}
|
|
2548
|
+
style=${Qe({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}
|
|
2453
2549
|
?disabled=${this.disabled}
|
|
2454
2550
|
aria-haspopup="true"
|
|
2455
2551
|
aria-expanded="false"
|
|
2456
2552
|
popovertarget="color-picker-popover"></button>
|
|
2457
2553
|
<uui-popover-container id="color-picker-popover">
|
|
2458
2554
|
${this._renderColorPicker()}
|
|
2459
|
-
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}};
|
|
2555
|
+
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}};V.styles=[b`
|
|
2460
2556
|
:host {
|
|
2461
2557
|
--uui-look-outline-border: #ddd;
|
|
2462
2558
|
--uui-look-outline-border-hover: #aaa;
|
|
2463
2559
|
font-size: 0.8rem;
|
|
2560
|
+
color: var(--uui-color-text,#060606);
|
|
2464
2561
|
display: block;
|
|
2465
2562
|
width: var(--uui-color-picker-width, 280px);
|
|
2466
2563
|
}
|
|
@@ -2472,9 +2569,9 @@
|
|
|
2472
2569
|
}
|
|
2473
2570
|
.color-picker {
|
|
2474
2571
|
width: 100%;
|
|
2475
|
-
background-color:
|
|
2572
|
+
background-color: var(--uui-color-surface,#fff);
|
|
2476
2573
|
user-select: none;
|
|
2477
|
-
border: solid 1px
|
|
2574
|
+
border: solid 1px var(--uui-color-border,#d8d7d9);
|
|
2478
2575
|
}
|
|
2479
2576
|
.color-picker__user-input {
|
|
2480
2577
|
display: flex;
|
|
@@ -2516,7 +2613,6 @@
|
|
|
2516
2613
|
width: 100%;
|
|
2517
2614
|
height: 100%;
|
|
2518
2615
|
border-radius: inherit;
|
|
2519
|
-
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
2520
2616
|
/* We use a custom property in lieu of currentColor because of https://bugs.webkit.org/show_bug.cgi?id=216780 */
|
|
2521
2617
|
background-color: var(--preview-color);
|
|
2522
2618
|
}
|
|
@@ -2526,6 +2622,7 @@
|
|
|
2526
2622
|
}
|
|
2527
2623
|
|
|
2528
2624
|
.color-picker__transparent-bg {
|
|
2625
|
+
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
2529
2626
|
background-image: linear-gradient(
|
|
2530
2627
|
45deg,
|
|
2531
2628
|
var(--uui-palette-grey,#c4c4c4) 25%,
|
|
@@ -2548,7 +2645,11 @@
|
|
|
2548
2645
|
|
|
2549
2646
|
@keyframes pulse {
|
|
2550
2647
|
0% {
|
|
2551
|
-
box-shadow: 0 0 0 0 var(--uui-palette-space-cadet-light,rgb(
|
|
2648
|
+
box-shadow: 0 0 0 0 var(--uui-palette-space-cadet-light,rgb(
|
|
2649
|
+
38,
|
|
2650
|
+
53,
|
|
2651
|
+
110
|
|
2652
|
+
));
|
|
2552
2653
|
}
|
|
2553
2654
|
70% {
|
|
2554
2655
|
box-shadow: 0 0 0 0.5rem transparent;
|
|
@@ -2580,7 +2681,7 @@
|
|
|
2580
2681
|
}
|
|
2581
2682
|
|
|
2582
2683
|
uui-color-swatches {
|
|
2583
|
-
border-top: solid 1px
|
|
2684
|
+
border-top: solid 1px var(--uui-color-border,#d8d7d9);
|
|
2584
2685
|
padding: 0.75rem;
|
|
2585
2686
|
}
|
|
2586
2687
|
|
|
@@ -2601,7 +2702,7 @@
|
|
|
2601
2702
|
uui-color-area {
|
|
2602
2703
|
width: 100%;
|
|
2603
2704
|
}
|
|
2604
|
-
`],W([O('[part="input"]')],
|
|
2705
|
+
`],W([O('[part="input"]')],V.prototype,"_input",2),W([O(".color-picker__preview")],V.prototype,"_previewButton",2),W([O("#swatches")],V.prototype,"_swatches",2),W([_()],V.prototype,"inputValue",2),W([_()],V.prototype,"hue",2),W([_()],V.prototype,"saturation",2),W([_()],V.prototype,"lightness",2),W([_()],V.prototype,"alpha",2),W([_()],V.prototype,"_colord",2),W([a()],V.prototype,"value",1),W([a()],V.prototype,"format",2),W([a()],V.prototype,"name",2),W([a()],V.prototype,"size",2),W([a({attribute:"no-format-toggle",type:Boolean})],V.prototype,"noFormatToggle",2),W([a({type:Boolean,reflect:!0})],V.prototype,"inline",2),W([a({type:Boolean,reflect:!0})],V.prototype,"disabled",2),W([a({type:Boolean})],V.prototype,"opacity",2),W([a({type:Boolean,reflect:!0})],V.prototype,"readonly",2),W([a({type:Boolean})],V.prototype,"uppercase",2),W([a({attribute:!1})],V.prototype,"swatches",2),V=W([v("uui-color-picker")],V);var rv={grad:.9,turn:360,rad:360/(2*Math.PI)},tt=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Z=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=Math.pow(10,t)),Math.round(i*e)/i+0},Se=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=1),e>i?i:e>t?e:t},gu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mu=function(e){return{r:Se(e.r,0,255),g:Se(e.g,0,255),b:Se(e.b,0,255),a:Se(e.a)}},Pn=function(e){return{r:Z(e.r),g:Z(e.g),b:Z(e.b),a:Z(e.a,3)}},ov=/^#([0-9a-f]{3,8})$/i,Ro=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_u=function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=Math.max(t,i,o),n=s-Math.min(t,i,o),u=n?s===t?(i-o)/n:s===i?2+(o-t)/n:4+(t-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},yu=function(e){var t=e.h,i=e.s,o=e.v,r=e.a;t=t/360*6,i/=100,o/=100;var s=Math.floor(t),n=o*(1-i),u=o*(1-(t-s)*i),c=o*(1-(1-t+s)*i),p=s%6;return{r:255*[o,u,n,n,c,o][p],g:255*[c,o,o,u,n,n][p],b:255*[n,n,c,o,o,u][p],a:r}},wu=function(e){return{h:gu(e.h),s:Se(e.s,0,100),l:Se(e.l,0,100),a:Se(e.a)}},xu=function(e){return{h:Z(e.h),s:Z(e.s),l:Z(e.l),a:Z(e.a,3)}},$u=function(e){return yu((i=(t=e).s,{h:t.h,s:(i*=((o=t.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:t.a}));var t,i,o},Ar=function(e){return{h:(t=_u(e)).h,s:(r=(200-(i=t.s))*(o=t.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,i,o,r},sv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,av=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ku={string:[[function(e){var t=ov.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Z(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Z(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=av.exec(e)||lv.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mu({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=sv.exec(e)||nv.exec(e);if(!t)return null;var i,o,r=wu({h:(i=t[1],o=t[2],o===void 0&&(o="deg"),Number(i)*(rv[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return $u(r)},"hsl"]],object:[[function(e){var t=e.r,i=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return tt(t)&&tt(i)&&tt(o)?mu({r:Number(t),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,i=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!tt(t)||!tt(i)||!tt(o))return null;var n=wu({h:Number(t),s:Number(i),l:Number(o),a:Number(s)});return $u(n)},"hsl"],[function(e){var t=e.h,i=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!tt(t)||!tt(i)||!tt(o))return null;var n=function(u){return{h:gu(u.h),s:Se(u.s,0,100),v:Se(u.v,0,100),a:Se(u.a)}}({h:Number(t),s:Number(i),v:Number(o),a:Number(s)});return yu(n)},"hsv"]]},Cu=function(e,t){for(var i=0;i<t.length;i++){var o=t[i][0](e);if(o)return[o,t[i][1]]}return[null,void 0]},uv=function(e){return typeof e=="string"?Cu(e.trim(),ku.string):typeof e=="object"&&e!==null?Cu(e,ku.object):[null,void 0]},Sn=function(e,t){var i=Ar(e);return{h:i.h,s:Se(i.s+100*t,0,100),l:i.l,a:i.a}},On=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Eu=function(e,t){var i=Ar(e);return{h:i.h,s:i.s,l:Se(i.l+100*t,0,100),a:i.a}},In=function(){function e(t){this.parsed=uv(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Z(On(this.rgba),2)},e.prototype.isDark=function(){return On(this.rgba)<.5},e.prototype.isLight=function(){return On(this.rgba)>=.5},e.prototype.toHex=function(){return t=Pn(this.rgba),i=t.r,o=t.g,r=t.b,n=(s=t.a)<1?Ro(Z(255*s)):"","#"+Ro(i)+Ro(o)+Ro(r)+n;var t,i,o,r,s,n},e.prototype.toRgb=function(){return Pn(this.rgba)},e.prototype.toRgbString=function(){return t=Pn(this.rgba),i=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var t,i,o,r,s},e.prototype.toHsl=function(){return xu(Ar(this.rgba))},e.prototype.toHslString=function(){return t=xu(Ar(this.rgba)),i=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var t,i,o,r,s},e.prototype.toHsv=function(){return t=_u(this.rgba),{h:Z(t.h),s:Z(t.s),v:Z(t.v),a:Z(t.a,3)};var t},e.prototype.invert=function(){return it({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),it(Sn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),it(Sn(this.rgba,-t))},e.prototype.grayscale=function(){return it(Sn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),it(Eu(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),it(Eu(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?it({r:(i=this.rgba).r,g:i.g,b:i.b,a:t}):Z(this.rgba.a,3);var i},e.prototype.hue=function(t){var i=Ar(this.rgba);return typeof t=="number"?it({h:t,s:i.s,l:i.l,a:i.a}):Z(i.h)},e.prototype.isEqual=function(t){return this.toHex()===it(t).toHex()},e}(),it=function(e){return e instanceof In?e:new In(e)};class Wo extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Wo.CHANGE="change";var cv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,je=(e,t,i,o)=>{for(var r=o>1?void 0:o?hv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&cv(t,i,r),r};let ge=class extends Te("label",g){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.readonly=!1,this.disabled=!1}willUpdate(e){if(e.has("type")&&(this.type==="hue"?this.max=this.max??360:this.type==="saturation"?this.max=this.max??100:this.type==="lightness"?this.max=this.max??100:this.type==="opacity"&&(this.max=this.max??100),this.precision=this.precision??1,this.color)){const t=new In(this.color),{h:i,s:o,l:r}=t.toHsl(),s=this.type==="saturation"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${i}, 0%, ${r}%), hsl(${i}, 100%, ${r}%))`:this.type==="lightness"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${i}, ${o}%, 0%), hsl(${i}, ${o}%, 100%))`:null;this.style.setProperty("--uui-slider-background-image",s)}}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||this.readonly||!this.container||!this.handle)return;const{width:t,height:i}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),Cl(this.container,{onMove:(o,r)=>{this.vertical?this.value=El(M(r/i*this.max,this.min,this.max),this.min,this.max):this.value=M(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||this.readonly||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=M(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=M(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=M(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=M(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:i}=this.container.getBoundingClientRect();return M(this.roundToPrecision((e-t)/i*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:i}=this.container.getBoundingClientRect();return M(this.roundToPrecision((e-t)/i*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new Wo(Wo.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/El(this.value,this.min,this.max):this.max/this.value)}render(){return l` <div
|
|
2605
2706
|
part="slider"
|
|
2606
2707
|
id="color-slider"
|
|
2607
2708
|
role="slider"
|
|
@@ -2616,7 +2717,7 @@
|
|
|
2616
2717
|
@keydown=${this.handleKeyDown}>
|
|
2617
2718
|
${this.type==="opacity"?l`<div
|
|
2618
2719
|
id="current-hue"
|
|
2619
|
-
style=${
|
|
2720
|
+
style=${Qe({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
2620
2721
|
transparent 0%,
|
|
2621
2722
|
${this.color} 100%
|
|
2622
2723
|
)`})}></div>`:""}
|
|
@@ -2627,7 +2728,7 @@
|
|
|
2627
2728
|
tabindex=${w(this.disabled?void 0:"0")}>
|
|
2628
2729
|
</span>
|
|
2629
2730
|
</div>
|
|
2630
|
-
${Math.round(this.value)}`}};
|
|
2731
|
+
${Math.round(this.value)}`}};ge.styles=[b`
|
|
2631
2732
|
:host {
|
|
2632
2733
|
--uui-slider-height: 15px;
|
|
2633
2734
|
--uui-slider-handle-size: 17px;
|
|
@@ -2744,25 +2845,25 @@
|
|
|
2744
2845
|
position: absolute;
|
|
2745
2846
|
inset: 0 0 0 0;
|
|
2746
2847
|
}
|
|
2747
|
-
`],
|
|
2848
|
+
`],je([a({reflect:!0})],ge.prototype,"type",2),je([a()],ge.prototype,"color",2),je([a({type:Number})],ge.prototype,"min",2),je([a({type:Number})],ge.prototype,"max",2),je([a({type:Number})],ge.prototype,"precision",2),je([a({type:Boolean,reflect:!0})],ge.prototype,"vertical",2),je([a()],ge.prototype,"value",2),je([a({type:Boolean,reflect:!0})],ge.prototype,"readonly",2),je([a({type:Boolean,reflect:!0})],ge.prototype,"disabled",2),ge=je([v("uui-color-slider")],ge);/**
|
|
2748
2849
|
* @license
|
|
2749
2850
|
* Copyright 2017 Google LLC
|
|
2750
2851
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2751
|
-
*/const
|
|
2852
|
+
*/const Ur=(e,t)=>{const i=e._$AN;if(i===void 0)return!1;for(const o of i)o._$AO?.(t,!1),Ur(o,t);return!0},Fo=e=>{let t,i;do{if((t=e._$AM)===void 0)break;i=t._$AN,i.delete(e),e=t}while(i?.size===0)},Pu=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),vv(t)}};function dv(e){this._$AN!==void 0?(Fo(this),this._$AM=e,Pu(this)):this._$AM=e}function pv(e,t=!1,i=0){const o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let s=i;s<o.length;s++)Ur(o[s],!1),Fo(o[s]);else o!=null&&(Ur(o,!1),Fo(o));else Ur(this,e)}const vv=e=>{e.type==Ie.CHILD&&(e._$AP??=pv,e._$AQ??=dv)};class fv extends ki{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,o){super._$AT(t,i,o),Pu(this),this.isConnected=t._$AU}_$AO(t,i=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),i&&(Ur(this,t),Fo(this))}setValue(t){if(ru(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}const An=new WeakMap,Go=$i(class extends fv{render(e){return E}update(e,[t]){const i=t!==this.G;return i&&this.G!==void 0&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),E}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let i=An.get(t);i===void 0&&(i=new WeakMap,An.set(t,i)),i.get(this.G)!==void 0&&this.G.call(this.ht,void 0),i.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?An.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var bv=Object.defineProperty,gv=Object.getOwnPropertyDescriptor,Su=e=>{throw TypeError(e)},zi=(e,t,i,o)=>{for(var r=o>1?void 0:o?gv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&bv(t,i,r),r},mv=(e,t,i)=>t.has(e)||Su("Cannot "+i),_v=(e,t,i)=>t.has(e)?Su("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),yv=(e,t,i)=>(mv(e,t,"access private method"),i),Un,Ou;let rt=class extends Te("label",yi(wr(g))){constructor(){super(),_v(this,Un),this.disabled=!1,this.readonly=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){return this._value??""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){(e.has("disabled")||e.has("readonly"))&&this.selectable&&(this.selectable=!this.disabled&&!this.readonly,this.deselectable=!this.disabled&&!this.readonly),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}focus(e){this.selectableTarget?.focus(e)}render(){return l`
|
|
2752
2853
|
<button
|
|
2753
2854
|
id="swatch"
|
|
2754
|
-
${
|
|
2855
|
+
${Go(yv(this,Un,Ou))}
|
|
2755
2856
|
aria-label=${this.label}
|
|
2756
2857
|
?disabled="${this.disabled}"
|
|
2757
2858
|
title="${this.label}">
|
|
2758
2859
|
<div class="color-swatch color-swatch--transparent-bg">
|
|
2759
2860
|
<div
|
|
2760
2861
|
class="color-swatch__color"
|
|
2761
|
-
style="background
|
|
2862
|
+
style="background: var(--uui-swatch-color, ${this.color??this.value})"></div>
|
|
2762
2863
|
<div
|
|
2763
2864
|
class="color-swatch__check"
|
|
2764
2865
|
style="color: var(--uui-swatch-color, ${this.color??this.value})">
|
|
2765
|
-
${
|
|
2866
|
+
${Ao}
|
|
2766
2867
|
</div>
|
|
2767
2868
|
</div>
|
|
2768
2869
|
${this._renderWithLabel()}
|
|
@@ -2770,7 +2871,7 @@
|
|
|
2770
2871
|
`}_renderWithLabel(){return this.showLabel?l`<div class="color-swatch__label">
|
|
2771
2872
|
<strong>${this.renderLabel()}</strong>
|
|
2772
2873
|
${this.value}
|
|
2773
|
-
</div>`:E}};
|
|
2874
|
+
</div>`:E}};Un=new WeakSet,Ou=function(e){this.selectableTarget=e||this},rt.styles=[b`
|
|
2774
2875
|
:host {
|
|
2775
2876
|
position: relative;
|
|
2776
2877
|
display: inline-flex;
|
|
@@ -2936,19 +3037,19 @@
|
|
|
2936
3037
|
white-space: nowrap;
|
|
2937
3038
|
box-sizing: border-box;
|
|
2938
3039
|
}
|
|
2939
|
-
`],
|
|
3040
|
+
`],zi([a()],rt.prototype,"value",1),zi([a()],rt.prototype,"color",1),zi([a({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),zi([a({type:Boolean,reflect:!0})],rt.prototype,"readonly",2),zi([a({type:Boolean,attribute:"show-label",reflect:!0})],rt.prototype,"showLabel",2),rt=zi([v("uui-color-swatch")],rt);class Mi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Mi.CHANGE="change";var wv=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,zr=(e,t,i,o)=>{for(var r=o>1?void 0:o?xv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&wv(t,i,r),r};let kt=class extends Te("label",g){constructor(){super(),this.value="",this.disabled=!1,this.readonly=!1,this._onSelected=e=>{const t=e.target;this._swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new Mi(Mi.CHANGE)))},this._onDeselected=e=>{const t=e.target;this._swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new Mi(Mi.CHANGE))))},this.addEventListener(xt.SELECTED,this._onSelected),this.addEventListener(xt.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this._swatches||this._swatches.length===0||this._swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.readonly&&e.setAttribute("readonly",""),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this._swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return l`<slot @slotchange=${this._handleSlotChange}></slot>`}};kt.styles=[b`
|
|
2940
3041
|
:host {
|
|
2941
3042
|
display: flex;
|
|
2942
3043
|
flex-wrap: wrap;
|
|
2943
3044
|
gap: 0.4rem;
|
|
2944
3045
|
}
|
|
2945
|
-
`],
|
|
3046
|
+
`],zr([a()],kt.prototype,"value",2),zr([a({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),zr([a({type:Boolean,reflect:!0})],kt.prototype,"readonly",2),zr([yt({selector:"uui-color-swatch"})],kt.prototype,"_swatches",2),kt=zr([v("uui-color-swatches")],kt);class me extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}me.CHANGE="change",me.INNER_SLOT_CHANGE="inner-slot-change";var $v=Object.defineProperty,kv=Object.getOwnPropertyDescriptor,Iu=e=>{throw TypeError(e)},Ct=(e,t,i,o)=>{for(var r=o>1?void 0:o?kv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&$v(t,i,r),r},Cv=(e,t,i)=>t.has(e)||Iu("Cannot "+i),Ev=(e,t,i)=>t.has(e)?Iu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Au=(e,t,i)=>(Cv(e,t,"access private method"),i),qo,zn;let ze=class extends g{constructor(){super(...arguments),Ev(this,qo),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{Au(this,qo,zn).call(this),this._updateSelection(),this.dispatchEvent(new me(me.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new me(me.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new me(me.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{if(!(this._options.length<=0))switch(e.key){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),this._getActiveElement?.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(xt.SELECTED,this._onSelected),this.addEventListener(xt.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(xt.SELECTED,this._onSelected),this.removeEventListener(xt.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(e=>e.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(e=>e.value===this._activeElementValue)}_goToIndex(e){if(this._options.length===0)return;e=Math.min(Math.max(e,0),this._options.length-1);const t=this._options[e];this._activeElementValue=t.value,Au(this,qo,zn).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return l` <slot @slotchange=${this._onSlotChange}></slot> `}};qo=new WeakSet,zn=function(){for(let t=0;t<this._activeOptions.length;t++)this._activeOptions[t].active=!1;const e=this._getActiveElement;e?e.active=!0:this._goToIndex(0)},ze.styles=[b`
|
|
2946
3047
|
:host {
|
|
2947
3048
|
display: flex;
|
|
2948
3049
|
flex-direction: column;
|
|
2949
3050
|
box-sizing: border-box;
|
|
2950
3051
|
}
|
|
2951
|
-
`],
|
|
3052
|
+
`],Ct([a()],ze.prototype,"value",1),Ct([a({type:String})],ze.prototype,"displayValue",2),Ct([a({attribute:!1})],ze.prototype,"for",1),Ct([yt({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],ze.prototype,"_options",2),Ct([yt({flatten:!0,selector:"uui-combobox-list-option[active]"})],ze.prototype,"_activeOptions",2),Ct([_()],ze.prototype,"_value",2),Ct([_()],ze.prototype,"_activeElementValue",2),ze=Ct([v("uui-combobox-list")],ze);var Pv=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,Di=(e,t,i,o)=>{for(var r=o>1?void 0:o?Sv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Pv(t,i,r),r};let ot=class extends yi(wr(g)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){return this._value?this._value:this.textContent?.trim()||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){return this._displayValue?this._displayValue:this.textContent?.trim()||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return l`<slot></slot>`}};ot.styles=[b`
|
|
2952
3053
|
:host {
|
|
2953
3054
|
position: relative;
|
|
2954
3055
|
cursor: pointer;
|
|
@@ -2991,7 +3092,11 @@
|
|
|
2991
3092
|
} */
|
|
2992
3093
|
|
|
2993
3094
|
:host(:hover) {
|
|
2994
|
-
background-color: var(--uui-color-surface-emphasis,rgb(
|
|
3095
|
+
background-color: var(--uui-color-surface-emphasis,rgb(
|
|
3096
|
+
250,
|
|
3097
|
+
250,
|
|
3098
|
+
250
|
|
3099
|
+
));
|
|
2995
3100
|
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
2996
3101
|
}
|
|
2997
3102
|
|
|
@@ -3016,13 +3121,17 @@
|
|
|
3016
3121
|
|
|
3017
3122
|
:host([selected]:hover) {
|
|
3018
3123
|
color: var(--uui-color-selected-contrast,#fff);
|
|
3019
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
3124
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
3125
|
+
70,
|
|
3126
|
+
86,
|
|
3127
|
+
200
|
|
3128
|
+
));
|
|
3020
3129
|
}
|
|
3021
3130
|
:host([selected][disabled]) {
|
|
3022
3131
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
3023
3132
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
3024
3133
|
}
|
|
3025
|
-
`],
|
|
3134
|
+
`],Di([_()],ot.prototype,"_disabled",2),Di([_()],ot.prototype,"_displayValue",2),Di([a({type:String})],ot.prototype,"value",1),Di([a({type:String,attribute:"display-value"})],ot.prototype,"displayValue",1),Di([a({type:Boolean,reflect:!0})],ot.prototype,"disabled",1),ot=Di([v("uui-combobox-list-option")],ot);class _e extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}_e.SEARCH="search",_e.CHANGE="change";var Ov=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,Uu=e=>{throw TypeError(e)},de=(e,t,i,o)=>{for(var r=o>1?void 0:o?Iv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Ov(t,i,r),r},Mn=(e,t,i)=>t.has(e)||Uu("Cannot "+i),P=(e,t,i)=>(Mn(e,t,"read from private field"),i?i.call(e):t.get(e)),ee=(e,t,i)=>t.has(e)?Uu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),zu=(e,t,i,o)=>(Mn(e,t,"write to private field"),t.set(e,i),i),Ko=(e,t,i)=>(Mn(e,t,"access private method"),i),pe,Li,Ti,Mu,Mr,Xo,Yo,Zo,Dn,Qo,Jo,Ln,es,Ni,Tn,ts,is,Nn,rs;let te=class extends Ne(g,""){constructor(){super(...arguments),ee(this,Ti),this.closeLabel="Close",this.disabled=!1,this.readonly=!1,ee(this,pe),ee(this,Li),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,ee(this,Mr,()=>{this._isPhone=P(this,Li).matches}),ee(this,Yo,()=>requestAnimationFrame(()=>this._input.focus())),ee(this,Zo,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||P(this,Ni).call(this)})),ee(this,Dn,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new _e(_e.SEARCH)),P(this,es).call(this)}),ee(this,Qo,()=>{this.value&&this.value!==P(this,pe)?.value&&Ko(this,Ti,Xo).call(this)}),ee(this,Jo,()=>{this.value=P(this,pe)?.value||"",this.search=this.value?this.search:"",P(this,Ni).call(this),this.dispatchEvent(new _e(_e.CHANGE))}),ee(this,Ln,()=>{this.readonly||(this.open=!this.open)}),ee(this,es,()=>{this.open||this.readonly||(this.open=!0)}),ee(this,Ni,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new _e(_e.SEARCH)))}),ee(this,Tn,e=>{this.open===!1&&e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.key==="ArrowUp"||e.key==="ArrowDown")&&P(this,es).call(this),(e.key==="Escape"||e.key==="Enter")&&P(this,Ni).call(this)}),ee(this,ts,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._input.value=this._displayValue,this._input.focus(),this.dispatchEvent(new _e(_e.SEARCH)),this.dispatchEvent(new _e(_e.CHANGE)))}),ee(this,is,()=>l` <uui-input
|
|
3026
3135
|
slot="trigger"
|
|
3027
3136
|
id="combobox-input"
|
|
3028
3137
|
label="combobox-input"
|
|
@@ -3032,42 +3141,42 @@
|
|
|
3032
3141
|
.disabled=${this.disabled}
|
|
3033
3142
|
.readonly=${this.readonly}
|
|
3034
3143
|
popovertarget="combobox-popover"
|
|
3035
|
-
@click=${P(this,
|
|
3036
|
-
@input=${P(this
|
|
3037
|
-
@keydown=${P(this,
|
|
3144
|
+
@click=${P(this,Ln)}
|
|
3145
|
+
@input=${P(this,Dn)}
|
|
3146
|
+
@keydown=${P(this,Tn)}>
|
|
3038
3147
|
<slot name="input-prepend" slot="prepend"></slot>
|
|
3039
|
-
${P(this,
|
|
3148
|
+
${P(this,Nn).call(this)}
|
|
3040
3149
|
<div id="expand-symbol-wrapper" slot="append">
|
|
3041
3150
|
<uui-symbol-expand .open=${this._isOpen}></uui-symbol-expand>
|
|
3042
3151
|
</div>
|
|
3043
3152
|
<slot name="input-append" slot="append"></slot>
|
|
3044
|
-
</uui-input>`),
|
|
3153
|
+
</uui-input>`),ee(this,Nn,()=>this.disabled||this.readonly?E:this.value||this.search?l`<uui-button
|
|
3045
3154
|
id="clear-button"
|
|
3046
|
-
@click=${P(this,
|
|
3047
|
-
@keydown=${P(this,
|
|
3155
|
+
@click=${P(this,ts)}
|
|
3156
|
+
@keydown=${P(this,ts)}
|
|
3048
3157
|
label="clear"
|
|
3049
3158
|
slot="append"
|
|
3050
3159
|
compact
|
|
3051
3160
|
style="height: 100%;">
|
|
3052
|
-
<uui-icon name="remove" .fallback=${
|
|
3053
|
-
</uui-button>`:""),
|
|
3161
|
+
<uui-icon name="remove" .fallback=${cn.strings[0]}></uui-icon>
|
|
3162
|
+
</uui-button>`:""),ee(this,rs,()=>l`<div id="dropdown">
|
|
3054
3163
|
<uui-scroll-container tabindex="-1" id="scroll-container">
|
|
3055
|
-
<slot @slotchange=${
|
|
3164
|
+
<slot @slotchange=${Ko(this,Ti,Mu)}></slot>
|
|
3056
3165
|
</uui-scroll-container>
|
|
3057
|
-
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&
|
|
3058
|
-
<uui-button label="close" look="primary" @click=${P(this,
|
|
3166
|
+
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&Ko(this,Ti,Xo).call(this)}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}get open(){return this._isOpen}set open(e){const t=e;this._isOpen=e;const i=this._comboboxPopoverElement;if(i)if(e){const o=this._input.offsetWidth;i.style.setProperty("--popover-width",`${o}px`),i.showPopover()}else i.hidePopover();this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",P(this,Zo)),this.addEventListener("mousedown",P(this,Yo)),zu(this,Li,window.matchMedia("(max-width: 600px)")),P(this,Mr).call(this),P(this,Li).addEventListener("change",P(this,Mr)),x(this,"uui-icon"),x(this,"uui-input"),x(this,"uui-button"),x(this,"uui-combobox-list"),x(this,"uui-scroll-container"),x(this,"uui-popover-container"),x(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",P(this,Zo)),this.removeEventListener("mousedown",P(this,Yo)),P(this,Li).removeEventListener("change",P(this,Mr))}getFormElement(){return this._input}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}render(){return this._isPhone&&this.open?l` <div id="phone-wrapper">
|
|
3167
|
+
<uui-button label="close" look="primary" @click=${P(this,Ni)}>
|
|
3059
3168
|
${this.closeLabel}
|
|
3060
3169
|
</uui-button>
|
|
3061
|
-
${P(this,
|
|
3170
|
+
${P(this,is).call(this)} ${P(this,rs).call(this)}
|
|
3062
3171
|
</div>`:l`
|
|
3063
|
-
${P(this,
|
|
3172
|
+
${P(this,is).call(this)}
|
|
3064
3173
|
<uui-popover-container
|
|
3065
3174
|
id="combobox-popover"
|
|
3066
3175
|
popover="manual"
|
|
3067
3176
|
placement="bottom-end">
|
|
3068
|
-
${P(this,
|
|
3177
|
+
${P(this,rs).call(this)}
|
|
3069
3178
|
</uui-popover-container>
|
|
3070
|
-
`}};
|
|
3179
|
+
`}};pe=new WeakMap,Li=new WeakMap,Ti=new WeakSet,Mu=function(){P(this,pe)&&(P(this,pe).removeEventListener(me.CHANGE,P(this,Jo)),P(this,pe).removeEventListener(me.INNER_SLOT_CHANGE,P(this,Qo)));const e=this._comboboxListElements?.[0];e&&(zu(this,pe,e),P(this,pe).for=this,P(this,pe).addEventListener(me.CHANGE,P(this,Jo)),P(this,pe).addEventListener(me.INNER_SLOT_CHANGE,P(this,Qo))),this.updateComplete.then(()=>{Ko(this,Ti,Xo).call(this)})},Mr=new WeakMap,Xo=function(){P(this,pe)&&(P(this,pe).value=this.value,requestAnimationFrame(()=>this._displayValue=P(this,pe).displayValue||""))},Yo=new WeakMap,Zo=new WeakMap,Dn=new WeakMap,Qo=new WeakMap,Jo=new WeakMap,Ln=new WeakMap,es=new WeakMap,Ni=new WeakMap,Tn=new WeakMap,ts=new WeakMap,is=new WeakMap,Nn=new WeakMap,rs=new WeakMap,te.styles=[b`
|
|
3071
3180
|
:host {
|
|
3072
3181
|
display: inline-block;
|
|
3073
3182
|
}
|
|
@@ -3136,12 +3245,12 @@
|
|
|
3136
3245
|
#phone-wrapper #scroll-container {
|
|
3137
3246
|
max-height: unset;
|
|
3138
3247
|
}
|
|
3139
|
-
`],
|
|
3248
|
+
`],de([a({attribute:"value",reflect:!0})],te.prototype,"value",1),de([a({type:String})],te.prototype,"search",1),de([a({type:Boolean})],te.prototype,"open",1),de([a({type:String})],te.prototype,"closeLabel",2),de([a({type:Boolean,reflect:!0})],te.prototype,"disabled",2),de([a({type:Boolean,reflect:!0})],te.prototype,"readonly",2),de([O("#combobox-input")],te.prototype,"_input",2),de([O("#combobox-popover")],te.prototype,"_comboboxPopoverElement",2),de([yt({flatten:!0,selector:"uui-combobox-list"})],te.prototype,"_comboboxListElements",2),de([_()],te.prototype,"_displayValue",2),de([_()],te.prototype,"_search",2),de([_()],te.prototype,"_isPhone",2),de([_()],te.prototype,"_isOpen",2),te=de([v("uui-combobox")],te);var Av=Object.defineProperty,Uv=Object.getOwnPropertyDescriptor,Vn=(e,t,i,o)=>{for(var r=o>1?void 0:o?Uv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Av(t,i,r),r};let Vi=class extends g{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return l` <h3
|
|
3140
3249
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
3141
3250
|
${this.headline}
|
|
3142
3251
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
3143
3252
|
</h3>`}renderContent(){return l`<slot></slot>`}renderActions(){return l`<slot id="actions" name="actions"></slot>`}render(){return l`${this.renderHeadline()} ${this.renderContent()}
|
|
3144
|
-
${this.renderActions()} `}};
|
|
3253
|
+
${this.renderActions()} `}};Vi.styles=[b`
|
|
3145
3254
|
:host {
|
|
3146
3255
|
display: block;
|
|
3147
3256
|
padding: var(--uui-size-10,30px) var(--uui-size-14,42px);
|
|
@@ -3154,7 +3263,7 @@
|
|
|
3154
3263
|
justify-content: end;
|
|
3155
3264
|
gap: var(--uui-size-4,12px);
|
|
3156
3265
|
}
|
|
3157
|
-
`],
|
|
3266
|
+
`],Vn([a({type:String})],Vi.prototype,"headline",2),Vn([_()],Vi.prototype,"_headlineSlotHasContent",2),Vi=Vn([v("uui-dialog-layout")],Vi);var zv=Object.getOwnPropertyDescriptor,Mv=(e,t,i,o)=>{for(var r=o>1?void 0:o?zv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let os=class extends g{render(){return l`<slot></slot>`}};os.styles=[b`
|
|
3158
3267
|
:host {
|
|
3159
3268
|
position: relative;
|
|
3160
3269
|
display: block;
|
|
@@ -3172,13 +3281,13 @@
|
|
|
3172
3281
|
calc(var(--uui-border-radius,3px) * 2)
|
|
3173
3282
|
);
|
|
3174
3283
|
}
|
|
3175
|
-
`],
|
|
3284
|
+
`],os=Mv([v("uui-dialog")],os);var Dv=Object.defineProperty,Lv=Object.getOwnPropertyDescriptor,Du=(e,t,i,o)=>{for(var r=o>1?void 0:o?Lv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Dv(t,i,r),r};let Dr=class extends g{constructor(){super(...arguments),this.error=!1}render(){return l`<svg
|
|
3176
3285
|
xmlns="http://www.w3.org/2000/svg"
|
|
3177
3286
|
viewBox="0 0 512 512"
|
|
3178
3287
|
id="upload-icon">
|
|
3179
3288
|
<path
|
|
3180
3289
|
d=${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"} />
|
|
3181
|
-
</svg> `}};
|
|
3290
|
+
</svg> `}};Dr.styles=[b`
|
|
3182
3291
|
:host {
|
|
3183
3292
|
display: flex;
|
|
3184
3293
|
flex-direction: column;
|
|
@@ -3197,7 +3306,7 @@
|
|
|
3197
3306
|
:host([error]) #upload-icon {
|
|
3198
3307
|
fill: var(--uui-color-invalid,#d42054);
|
|
3199
3308
|
}
|
|
3200
|
-
`],
|
|
3309
|
+
`],Du([a({type:Boolean,reflect:!0})],Dr.prototype,"error",2),Dr=Du([v("uui-symbol-file-dropzone")],Dr);class Bi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Bi.CHANGE="change";var Tv=Object.defineProperty,Nv=Object.getOwnPropertyDescriptor,Hi=(e,t,i,o)=>{for(var r=o>1?void 0:o?Nv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Tv(t,i,r),r};let st=class extends Te("",g){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.disallowFolderUpload=!1,this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const i=[],o=[];e.split(",").forEach(r=>{r=r.trim().toLowerCase(),/[a-z]+\/[a-z*]/s.test(r)?i.push(r):o.push(r.replace(/^\./,""))}),this._acceptedMimeTypes=i,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}async _getAllEntries(e){const t=[...e],i=[],o=[];for(const r of t){if(r?.kind!=="file")continue;const s=this._getEntry(r);if(s)if(s.isDirectory){if(!this.disallowFolderUpload&&this.multiple){const n=await this._mkdir(s);i.push(n)}}else{const n=r.getAsFile();if(!n)continue;this._isAccepted(n)&&o.push(n)}}return{files:o,folders:i}}_getEntry(e){let t=null;return"webkitGetAsEntry"in e?t=e.webkitGetAsEntry():"getAsEntry"in e&&(t=e.getAsEntry()),t}async _mkdir(e){const t=e.createReader(),i=[],o=[],r=n=>new Promise((u,c)=>{n.readEntries(async p=>{if(!p.length){u();return}for(const f of p)if(f.isFile){const h=await this._getAsFile(f);this._isAccepted(h)&&o.push(h)}else if(f.isDirectory){const h=await this._mkdir(f);i.push(h)}await r(n),u()},c)});return await r(t),{folderName:e.name,folders:i,files:o}}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),i=e.name.split(".").pop();if(i&&this._acceptedFileExtensions.includes(i.toLowerCase()))return!0;for(const o of this._acceptedMimeTypes){if(t===o)return!0;if(o.endsWith("/*")&&t.startsWith(o.replace("*","")))return!0}return!1}async _getAsFile(e){return new Promise((t,i)=>e.file(t,i))}async _onDrop(e){e.preventDefault(),this._dropzone.classList.remove("hover");const t=e.dataTransfer?.items;if(t){const i=await this._getAllEntries(t);if(this.multiple===!1&&i.files.length&&(i.files=[i.files[0]],i.folders=[]),!i.files.length&&!i.folders.length)return;this.dispatchEvent(new Bi(Bi.CHANGE,{detail:i}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.multiple===!1&&e.length>1&&e.splice(1,e.length-1);const t=e.filter(i=>this._isAccepted(i));t.length&&this.dispatchEvent(new Bi(Bi.CHANGE,{detail:{files:t,folders:[]}}))}render(){return l`
|
|
3201
3310
|
<div id="dropzone">
|
|
3202
3311
|
<uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>
|
|
3203
3312
|
${this.renderLabel()}
|
|
@@ -3211,7 +3320,7 @@
|
|
|
3211
3320
|
aria-label="${this.label}" />
|
|
3212
3321
|
<slot></slot>
|
|
3213
3322
|
</div>
|
|
3214
|
-
`}};
|
|
3323
|
+
`}};st.styles=[b`
|
|
3215
3324
|
#dropzone {
|
|
3216
3325
|
display: flex;
|
|
3217
3326
|
flex-direction: column;
|
|
@@ -3249,7 +3358,7 @@
|
|
|
3249
3358
|
opacity: 0;
|
|
3250
3359
|
display: none;
|
|
3251
3360
|
}
|
|
3252
|
-
`],
|
|
3361
|
+
`],Hi([O("#input")],st.prototype,"_input",2),Hi([O("#dropzone")],st.prototype,"_dropzone",2),Hi([a({type:String})],st.prototype,"accept",1),Hi([a({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],st.prototype,"disallowFolderUpload",2),Hi([a({type:Boolean})],st.prototype,"multiple",2),st=Hi([v("uui-file-dropzone")],st);class Vv{static humanFileSize(t,i=!1,o=1){const r=i?1e3:1024;if(Math.abs(t)<r)return t+" B";const s=i?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let n=-1;const u=10**o;do t/=r,++n;while(Math.round(Math.abs(t)*u)/u>=r&&n<s.length-1);return t.toFixed(o)+" "+s[n]}}var Bv=Object.defineProperty,Hv=Object.getOwnPropertyDescriptor,Re=(e,t,i,o)=>{for(var r=o>1?void 0:o?Hv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Bv(t,i,r),r};let ye=class extends g{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(i=>{this._src=i})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),x(this,"uui-symbol-file-thumbnail"),x(this,"uui-symbol-folder"),x(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?l`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?l`<uui-symbol-file-thumbnail
|
|
3253
3362
|
.src=${this._src}
|
|
3254
3363
|
.alt=${this._name}
|
|
3255
3364
|
id="file-symbol"></uui-symbol-file-thumbnail>`:l`<uui-symbol-file
|
|
@@ -3269,10 +3378,10 @@
|
|
|
3269
3378
|
<div id="file-info">
|
|
3270
3379
|
${this._renderLongName()}
|
|
3271
3380
|
<span id="file-size">
|
|
3272
|
-
${this._size&&!this._isDirectory?l`${
|
|
3381
|
+
${this._size&&!this._isDirectory?l`${Vv.humanFileSize(this._size,!0)}`:""}
|
|
3273
3382
|
</span>
|
|
3274
3383
|
</div>
|
|
3275
|
-
`}};
|
|
3384
|
+
`}};ye.styles=[b`
|
|
3276
3385
|
:host {
|
|
3277
3386
|
position: relative;
|
|
3278
3387
|
display: grid;
|
|
@@ -3340,7 +3449,7 @@
|
|
|
3340
3449
|
text-decoration: underline;
|
|
3341
3450
|
cursor: pointer;
|
|
3342
3451
|
}
|
|
3343
|
-
`],
|
|
3452
|
+
`],Re([_()],ye.prototype,"_name",2),Re([_()],ye.prototype,"_url",2),Re([_()],ye.prototype,"_extension",2),Re([_()],ye.prototype,"_src",2),Re([_()],ye.prototype,"_size",2),Re([_()],ye.prototype,"_isDirectory",2),Re([_()],ye.prototype,"_file",2),Re([_()],ye.prototype,"_isImage",2),Re([a({attribute:!1})],ye.prototype,"file",1),ye=Re([v("uui-file-preview")],ye);var jv=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,ss=(e,t,i,o)=>{for(var r=o>1?void 0:o?Rv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&jv(t,i,r),r};let ei=class extends g{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),x(this,"uui-form-validation-message")}render(){return l`
|
|
3344
3453
|
<div id="label" style=${this._labelSlotHasContent?"":"display: none"}>
|
|
3345
3454
|
<slot name="label" @slotchange=${this._labelSlotChanged}></slot>
|
|
3346
3455
|
</div>
|
|
@@ -3356,7 +3465,7 @@
|
|
|
3356
3465
|
<slot></slot>
|
|
3357
3466
|
<slot name="message" slot="message"></slot>
|
|
3358
3467
|
</uui-form-validation-message>
|
|
3359
|
-
`}};
|
|
3468
|
+
`}};ei.styles=[b`
|
|
3360
3469
|
:host {
|
|
3361
3470
|
position: relative;
|
|
3362
3471
|
display: block;
|
|
@@ -3375,25 +3484,29 @@
|
|
|
3375
3484
|
margin-top: -8px;
|
|
3376
3485
|
min-height: 8px;
|
|
3377
3486
|
}
|
|
3378
|
-
`],
|
|
3487
|
+
`],ss([a({type:String})],ei.prototype,"description",2),ss([_()],ei.prototype,"_labelSlotHasContent",2),ss([_()],ei.prototype,"_descriptionSlotHasContent",2),ei=ss([v("uui-form-layout-item")],ei);/**
|
|
3379
3488
|
* @license
|
|
3380
3489
|
* Copyright 2017 Google LLC
|
|
3381
3490
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3382
|
-
*/const
|
|
3491
|
+
*/const Lu=(e,t,i)=>{const o=new Map;for(let r=t;r<=i;r++)o.set(e[r],r);return o},Bn=$i(class extends ki{constructor(e){if(super(e),e.type!==Ie.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let o;i===void 0?i=t:t!==void 0&&(o=t);const r=[],s=[];let n=0;for(const u of e)r[n]=o?o(u,n):n,s[n]=i(u,n),n++;return{values:s,keys:r}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,o]){const r=Wp(e),{values:s,keys:n}=this.dt(t,i,o);if(!Array.isArray(r))return this.ut=n,s;const u=this.ut??=[],c=[];let p,f,h=0,C=r.length-1,d=0,y=s.length-1;for(;h<=C&&d<=y;)if(r[h]===null)h++;else if(r[C]===null)C--;else if(u[h]===n[d])c[d]=Jt(r[h],s[d]),h++,d++;else if(u[C]===n[y])c[y]=Jt(r[C],s[y]),C--,y--;else if(u[h]===n[y])c[y]=Jt(r[h],s[y]),Or(e,c[y+1],r[h]),h++,y--;else if(u[C]===n[d])c[d]=Jt(r[C],s[d]),Or(e,r[h],r[C]),C--,d++;else if(p===void 0&&(p=Lu(n,d,y),f=Lu(u,h,C)),p.has(u[h]))if(p.has(u[C])){const I=f.get(n[d]),$=I!==void 0?r[I]:null;if($===null){const N=Or(e,r[h]);Jt(N,s[d]),c[d]=N}else c[d]=Jt($,s[d]),Or(e,r[h],$),r[I]=null;d++}else xn(r[C]),C--;else xn(r[h]),h++;for(;d<=y;){const I=Or(e,c[y+1]);Jt(I,s[d]),c[d++]=I}for(;h<=C;){const I=r[h++];I!==null&&xn(I)}return this.ut=n,su(e,c),he}});/**
|
|
3383
3492
|
* @license
|
|
3384
3493
|
* Copyright 2017 Google LLC
|
|
3385
3494
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3386
|
-
*/class
|
|
3495
|
+
*/class Hn extends ki{constructor(t){if(super(t),this.it=E,t.type!==Ie.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===E||t==null)return this._t=void 0,this.it=t;if(t===he)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Hn.directiveName="unsafeHTML",Hn.resultType=1;const ns=$i(Hn);var Wv=Object.defineProperty,Fv=Object.getOwnPropertyDescriptor,Tu=(e,t,i,o)=>{for(var r=o>1?void 0:o?Fv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Wv(t,i,r),r};let Lr=class extends g{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=e=>{const t=e.composedPath()[0];t.pristine===!1?this._messages.set(t,t.validationMessage):this._messages.delete(t),this.requestUpdate("_messages")},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate("_messages")},this.for===null&&(this.for=this)}get for(){return this._for}set for(e){let t=null;typeof e=="string"?t=this.getRootNode()?.getElementById(e):e instanceof HTMLElement&&(t=e);const i=t??this,o=this._for;o!==i&&(o!==null&&(o.removeEventListener(wi.INVALID,this._onControlInvalid),o.removeEventListener(wi.VALID,this._onControlValid)),this._for=i,this._for.addEventListener(wi.INVALID,this._onControlInvalid),this._for.addEventListener(wi.VALID,this._onControlValid))}render(){return l`
|
|
3387
3496
|
<slot></slot>
|
|
3388
3497
|
<div id="messages">
|
|
3389
|
-
${
|
|
3498
|
+
${Bn(this._messages,e=>l`<div>${ns(e[1])}</div>`)}
|
|
3390
3499
|
<slot name="message"></slot>
|
|
3391
3500
|
</div>
|
|
3392
|
-
`}};
|
|
3501
|
+
`}};Lr.styles=[b`
|
|
3393
3502
|
#messages {
|
|
3394
|
-
color: var(--uui-color-invalid-standalone,rgb(
|
|
3503
|
+
color: var(--uui-color-invalid-standalone,rgb(
|
|
3504
|
+
191,
|
|
3505
|
+
33,
|
|
3506
|
+
78
|
|
3507
|
+
));
|
|
3395
3508
|
}
|
|
3396
|
-
`],
|
|
3509
|
+
`],Tu([a({reflect:!1,attribute:!0})],Lr.prototype,"for",1),Lr=Tu([v("uui-form-validation-message")],Lr);var Gv=Object.getOwnPropertyDescriptor,qv=(e,t,i,o)=>{for(var r=o>1?void 0:o?Gv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let jn=class extends g{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(e){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const t=e.target.assignedNodes({flatten:!0}).filter(i=>i instanceof HTMLFormElement);this._formElement=t.length>0?t[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(e){if(e.target===null)return;const t=e.target;if(!t.checkValidity()){t.setAttribute("submit-invalid","");return}t.removeAttribute("submit-invalid")}_onReset(e){e.target!==null&&e.target.removeAttribute("submit-invalid")}render(){return l`<slot @slotchange=${this._onSlotChanged}></slot>`}};jn=qv([v("uui-form")],jn);class ji extends A{constructor(t,i={}){super(t,{bubbles:!0,composed:!0,...i}),this.icon=null}acceptRequest(t){this.icon=t,this.stopImmediatePropagation()}}ji.ICON_REQUEST="icon-request";var Kv=Object.defineProperty,Xv=Object.getOwnPropertyDescriptor,ti=(e,t,i,o)=>{for(var r=o>1?void 0:o?Xv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Kv(t,i,r),r};let We=class extends g{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new ji(ji.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?l`<slot name="fallback"></slot>`:l`${ns(this.fallback)}`:this._nameSvg!==null?l`${ns(this._nameSvg)}`:this.svg!==null?l`${ns(this.svg)}`:l`<slot></slot>`}};We.styles=[b`
|
|
3397
3510
|
:host {
|
|
3398
3511
|
vertical-align: text-bottom;
|
|
3399
3512
|
display: inline-flex;
|
|
@@ -3416,16 +3529,16 @@
|
|
|
3416
3529
|
:host-context(div[slot='append']) {
|
|
3417
3530
|
margin-right: var(--uui-size-2, 6px);
|
|
3418
3531
|
}
|
|
3419
|
-
`],Zt([_()],He.prototype,"_nameSvg",2),Zt([a()],He.prototype,"label",2),Zt([a()],He.prototype,"name",1),Zt([a({attribute:!1})],He.prototype,"svg",2),Zt([a({attribute:!1})],He.prototype,"fallback",2),Zt([_()],He.prototype,"_useFallback",2),He=Zt([v("uui-icon")],He);class An{constructor(t){this.promise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),t&&this.resolve(t)}set svg(t){this.resolve(t)}}class Un{constructor(){this.icons={},this._onIconRequest=t=>{const i=this.getIcon(t.detail.iconName);i!==null&&t.acceptRequest(i)}}attach(t){t.addEventListener(Ti.ICON_REQUEST,this._onIconRequest)}detach(t){t.removeEventListener(Ti.ICON_REQUEST,this._onIconRequest)}defineIcon(t,i){if(this.icons[t]){this.icons[t].svg=i;return}this.icons[t]=new An(i)}getIcon(t){return this.icons[t]||this.acceptIcon(t)?this.icons[t].promise:null}provideIcon(t){return this.icons[t]=new An}acceptIcon(t){return!1}getIconNames(){return Object.keys(this.icons)}}var yv=Object.defineProperty,wv=Object.getOwnPropertyDescriptor,bu=(e,t,i,o)=>{for(var r=o>1?void 0:o?wv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&yv(t,i,r),r};let Ar=class extends g{constructor(){super(),this._icons={},this._registry=new Un,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,i])=>this._registry.defineIcon(t,i))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return l`<slot></slot>`}};bu([a({attribute:!1})],Ar.prototype,"_icons",2),Ar=bu([v("uui-icon-registry")],Ar);const xv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,$v=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,kv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,Cv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`,Ev=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`,Pv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,Sv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,Ov=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,Iv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`,Av=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`,Uv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,zv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,Mv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,Dv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,Lv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,Tv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,Vv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,Nv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`,Bv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`,Hv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`,jv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`,Rv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`,Wv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,Fv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`,Gv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`,qv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`,Kv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`,Xv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`,Yv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,Zv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`,Qv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`,Jv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;class gu extends Un{constructor(){super(),this.defineIcon("add",xv.strings[0]),this.defineIcon("alert",$v.strings[0]),this.defineIcon("attachment",kv.strings[0]),this.defineIcon("calendar",Cv.strings[0]),this.defineIcon("check",Ev.strings[0]),this.defineIcon("clipboard",Pv.strings[0]),this.defineIcon("code",Sv.strings[0]),this.defineIcon("colorpicker",Ov.strings[0]),this.defineIcon("copy",Iv.strings[0]),this.defineIcon("delete",Av.strings[0]),this.defineIcon("document",Uv.strings[0]),this.defineIcon("download",zv.strings[0]),this.defineIcon("edit",Mv.strings[0]),this.defineIcon("favorite",Dv.strings[0]),this.defineIcon("folder",Lv.strings[0]),this.defineIcon("forbidden",Tv.strings[0]),this.defineIcon("info",Vv.strings[0]),this.defineIcon("link",Nv.strings[0]),this.defineIcon("lock",Bv.strings[0]),this.defineIcon("pause",Hv.strings[0]),this.defineIcon("picture",jv.strings[0]),this.defineIcon("play",Rv.strings[0]),this.defineIcon("remove",Wv.strings[0]),this.defineIcon("search",Fv.strings[0]),this.defineIcon("see",Gv.strings[0]),this.defineIcon("settings",qv.strings[0]),this.defineIcon("subtract",Kv.strings[0]),this.defineIcon("sync",Xv.strings[0]),this.defineIcon("unlock",Yv.strings[0]),this.defineIcon("unsee",Zv.strings[0]),this.defineIcon("wand",Qv.strings[0]),this.defineIcon("wrong",Jv.strings[0])}}var ef=Object.getOwnPropertyDescriptor,tf=(e,t,i,o)=>{for(var r=o>1?void 0:o?ef(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let zn=class extends Ar{constructor(){super(),this.registry=new gu}};zn=tf([v("uui-icon-registry-essential")],zn);var rf=Object.defineProperty,of=Object.getOwnPropertyDescriptor,Vi=(e,t,i,o)=>{for(var r=o>1?void 0:o?of(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&rf(t,i,r),r};let tt=class extends De(g){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const i of e)this.multiple?t.push(i):t=[i];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-file-dropzone"),x(this,"uui-button"),x(this,"uui-action-bar"),x(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const i=e.detail.files.filter(r=>r instanceof File||r.isFile);if(!this.multiple){const r=i[0],n=r instanceof File?r:await this._getFile(r);if(this.value instanceof File){this.value=n;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,n),this._updateFileWrappers([n]);return}}let o=this.value;if(i.length>0&&!(this.value instanceof FormData)&&(o=new FormData),o instanceof FormData)for(const r of i){const s=r instanceof File;o.append(this.name,s?r:await this._getFile(r))}this.value=o}async _getFile(e){return await new Promise((t,i)=>e.file(t,i))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const o=this.value.getAll(this.name).filter(r=>r!==t);if(o.length===0)this.value="";else{this.value.delete(this.name);for(const r of o)this.value.append(this.name,r)}this._updateFileWrappers(o)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return l`<uui-file-preview .file="${e}">
|
|
3532
|
+
`],ti([_()],We.prototype,"_nameSvg",2),ti([a()],We.prototype,"label",2),ti([a()],We.prototype,"name",1),ti([a({attribute:!1})],We.prototype,"svg",2),ti([a({attribute:!1})],We.prototype,"fallback",2),ti([_()],We.prototype,"_useFallback",2),We=ti([v("uui-icon")],We);class Rn{constructor(t){this.promise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),t&&this.resolve(t)}set svg(t){this.resolve(t)}}class Wn{constructor(){this.icons={},this._onIconRequest=t=>{const i=this.getIcon(t.detail.iconName);i!==null&&t.acceptRequest(i)}}attach(t){t.addEventListener(ji.ICON_REQUEST,this._onIconRequest)}detach(t){t.removeEventListener(ji.ICON_REQUEST,this._onIconRequest)}defineIcon(t,i){if(this.icons[t]){this.icons[t].svg=i;return}this.icons[t]=new Rn(i)}getIcon(t){return this.icons[t]||this.acceptIcon(t)?this.icons[t].promise:null}provideIcon(t){return this.icons[t]=new Rn}acceptIcon(t){return!1}getIconNames(){return Object.keys(this.icons)}}var Yv=Object.defineProperty,Zv=Object.getOwnPropertyDescriptor,Nu=(e,t,i,o)=>{for(var r=o>1?void 0:o?Zv(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Yv(t,i,r),r};let Tr=class extends g{constructor(){super(),this._icons={},this._registry=new Wn,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,i])=>this._registry.defineIcon(t,i))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return l`<slot></slot>`}};Nu([a({attribute:!1})],Tr.prototype,"_icons",2),Tr=Nu([v("uui-icon-registry")],Tr);const Qv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,Jv=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,ef=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,tf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`,rf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`,of=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,sf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,nf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,af=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`,lf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`,uf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,cf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,hf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,df=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,pf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,vf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,ff=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,bf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`,gf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`,mf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`,_f=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`,yf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`,wf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,xf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`,$f=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`,kf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`,Cf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`,Ef=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`,Pf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,Sf=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`,Of=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`,If=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;class Vu extends Wn{constructor(){super(),this.defineIcon("add",Qv.strings[0]),this.defineIcon("alert",Jv.strings[0]),this.defineIcon("attachment",ef.strings[0]),this.defineIcon("calendar",tf.strings[0]),this.defineIcon("check",rf.strings[0]),this.defineIcon("clipboard",of.strings[0]),this.defineIcon("code",sf.strings[0]),this.defineIcon("colorpicker",nf.strings[0]),this.defineIcon("copy",af.strings[0]),this.defineIcon("delete",lf.strings[0]),this.defineIcon("document",uf.strings[0]),this.defineIcon("download",cf.strings[0]),this.defineIcon("edit",hf.strings[0]),this.defineIcon("favorite",df.strings[0]),this.defineIcon("folder",pf.strings[0]),this.defineIcon("forbidden",vf.strings[0]),this.defineIcon("info",ff.strings[0]),this.defineIcon("link",bf.strings[0]),this.defineIcon("lock",gf.strings[0]),this.defineIcon("pause",mf.strings[0]),this.defineIcon("picture",_f.strings[0]),this.defineIcon("play",yf.strings[0]),this.defineIcon("remove",wf.strings[0]),this.defineIcon("search",xf.strings[0]),this.defineIcon("see",$f.strings[0]),this.defineIcon("settings",kf.strings[0]),this.defineIcon("subtract",Cf.strings[0]),this.defineIcon("sync",Ef.strings[0]),this.defineIcon("unlock",Pf.strings[0]),this.defineIcon("unsee",Sf.strings[0]),this.defineIcon("wand",Of.strings[0]),this.defineIcon("wrong",If.strings[0])}}var Af=Object.getOwnPropertyDescriptor,Uf=(e,t,i,o)=>{for(var r=o>1?void 0:o?Af(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Fn=class extends Tr{constructor(){super(),this.registry=new Vu}};Fn=Uf([v("uui-icon-registry-essential")],Fn);var zf=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,Ri=(e,t,i,o)=>{for(var r=o>1?void 0:o?Mf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&zf(t,i,r),r};let nt=class extends Ne(g){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const i of e)this.multiple?t.push(i):t=[i];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-file-dropzone"),x(this,"uui-button"),x(this,"uui-action-bar"),x(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const i=e.detail.files.filter(r=>r instanceof File||r.isFile);if(!this.multiple){const r=i[0],n=r instanceof File?r:await this._getFile(r);if(this.value instanceof File){this.value=n;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,n),this._updateFileWrappers([n]);return}}let o=this.value;if(i.length>0&&!(this.value instanceof FormData)&&(o=new FormData),o instanceof FormData)for(const r of i){const s=r instanceof File;o.append(this.name,s?r:await this._getFile(r))}this.value=o}async _getFile(e){return await new Promise((t,i)=>e.file(t,i))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const o=this.value.getAll(this.name).filter(r=>r!==t);if(o.length===0)this.value="";else{this.value.delete(this.name);for(const r of o)this.value.append(this.name,r)}this._updateFileWrappers(o)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return l`<uui-file-preview .file="${e}">
|
|
3420
3533
|
<uui-action-bar slot="actions">
|
|
3421
3534
|
<uui-button
|
|
3422
3535
|
@click=${()=>this._removeFile(t)}
|
|
3423
3536
|
color="danger"
|
|
3424
3537
|
label=${`Delete ${e.name}`}>
|
|
3425
|
-
<uui-icon name="delete" .fallback=${
|
|
3538
|
+
<uui-icon name="delete" .fallback=${Xd.strings[0]}></uui-icon>
|
|
3426
3539
|
</uui-button>
|
|
3427
3540
|
</uui-action-bar>
|
|
3428
|
-
</uui-file-preview>`}_renderFiles(){return l`${
|
|
3541
|
+
</uui-file-preview>`}_renderFiles(){return l`${Bn(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return l`
|
|
3429
3542
|
<uui-file-dropzone
|
|
3430
3543
|
id="dropzone"
|
|
3431
3544
|
?multiple=${this.multiple}
|
|
@@ -3440,7 +3553,7 @@
|
|
|
3440
3553
|
look="placeholder"
|
|
3441
3554
|
label="Add"></uui-button>`:E}
|
|
3442
3555
|
</div>
|
|
3443
|
-
`}};
|
|
3556
|
+
`}};nt.styles=[b`
|
|
3444
3557
|
:host {
|
|
3445
3558
|
width: 100%;
|
|
3446
3559
|
height: 100%;
|
|
@@ -3489,7 +3602,7 @@
|
|
|
3489
3602
|
justify-content: center;
|
|
3490
3603
|
align-items: stretch;
|
|
3491
3604
|
}
|
|
3492
|
-
`],
|
|
3605
|
+
`],Ri([O("#dropzone")],nt.prototype,"_dropzone",2),Ri([O("#dropzone")],nt.prototype,"_dropZone",2),Ri([a({type:String})],nt.prototype,"accept",2),Ri([a({type:Boolean})],nt.prototype,"multiple",2),Ri([_()],nt.prototype,"_files",2),nt=Ri([v("uui-input-file")],nt);class ii extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}ii.CHANGE="change",ii.INPUT="input";var Df=Object.defineProperty,Lf=Object.getOwnPropertyDescriptor,Bu=e=>{throw TypeError(e)},Q=(e,t,i,o)=>{for(var r=o>1?void 0:o?Lf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Df(t,i,r),r},Tf=(e,t,i)=>t.has(e)||Bu("Cannot "+i),Nf=(e,t,i)=>t.has(e)?Bu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Vf=(e,t,i)=>(Tf(e,t,"access private method"),i),Gn,Hu;let D=class extends Ne(Te("",g),""){constructor(){super(),Nf(this,Gn),this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum length exceeded (${t}/${e} characters)`,this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="text",this.tabIndex=0,this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",Vf(this,Gn,Hu)),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&String(this.value).length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&String(this.value).length>this.maxlength),this.updateComplete.then(()=>{this.addFormControlElement(this._input)})}get type(){return this._type}set type(e){this._type=e}async blur(){await this.updateComplete,this._input.blur()}async focus(){await this.updateComplete,this._input.focus()}async select(){await this.updateComplete,this._input.select()}getFormElement(){return this.shadowRoot?.querySelector("input")}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new ii(ii.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new ii(ii.CHANGE))}renderPrepend(){return l`<slot name="prepend"></slot>`}renderAppend(){return l`<slot name="append"></slot>`}render(){return l`
|
|
3493
3606
|
${this.renderPrepend()}
|
|
3494
3607
|
${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()}
|
|
3495
3608
|
${this.renderAppend()}
|
|
@@ -3513,14 +3626,17 @@
|
|
|
3513
3626
|
?autofocus=${this.autofocus}
|
|
3514
3627
|
?required=${this.required}
|
|
3515
3628
|
?readonly=${this.readonly}
|
|
3629
|
+
tabindex=${w(this.tabIndex)}
|
|
3516
3630
|
@input=${this.onInput}
|
|
3517
|
-
@change=${this.onChange} />`}renderAutoWidthBackground(){return l` <div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return l`${this.value.length>0?this.value:this.placeholder}`}};
|
|
3631
|
+
@change=${this.onChange} />`}renderAutoWidthBackground(){return l` <div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return l`${this.value.length>0?this.value:this.placeholder}`}};Gn=new WeakSet,Hu=function(e){this.type!=="color"&&e.key=="Enter"&&this.submit()},D.formAssociated=!0,D.styles=[b`
|
|
3518
3632
|
:host {
|
|
3519
3633
|
position: relative;
|
|
3520
3634
|
display: inline-flex;
|
|
3521
3635
|
align-items: stretch;
|
|
3522
3636
|
height: var(--uui-input-height, var(--uui-size-11,33px));
|
|
3523
3637
|
text-align: left;
|
|
3638
|
+
color: var(--uui-color-text,#060606);
|
|
3639
|
+
color-scheme: var(--uui-color-scheme, normal);
|
|
3524
3640
|
box-sizing: border-box;
|
|
3525
3641
|
background-color: var(
|
|
3526
3642
|
--uui-input-background-color,
|
|
@@ -3605,7 +3721,11 @@
|
|
|
3605
3721
|
);
|
|
3606
3722
|
border-color: var(
|
|
3607
3723
|
--uui-input-border-color-readonly,
|
|
3608
|
-
var(--uui-color-disabled-standalone,rgb(
|
|
3724
|
+
var(--uui-color-disabled-standalone,rgb(
|
|
3725
|
+
226,
|
|
3726
|
+
226,
|
|
3727
|
+
226
|
|
3728
|
+
))
|
|
3609
3729
|
);
|
|
3610
3730
|
}
|
|
3611
3731
|
|
|
@@ -3617,7 +3737,8 @@
|
|
|
3617
3737
|
|
|
3618
3738
|
input {
|
|
3619
3739
|
font-family: inherit;
|
|
3620
|
-
padding: var(--uui-size-
|
|
3740
|
+
padding: 1px var(--uui-size-space-3,9px) var(--uui-size-1,3px)
|
|
3741
|
+
var(--uui-size-space-3,9px);
|
|
3621
3742
|
font-size: inherit;
|
|
3622
3743
|
color: inherit;
|
|
3623
3744
|
border-radius: var(--uui-border-radius,3px);
|
|
@@ -3641,21 +3762,29 @@
|
|
|
3641
3762
|
border: none;
|
|
3642
3763
|
}
|
|
3643
3764
|
|
|
3765
|
+
slot[name='prepend'],
|
|
3766
|
+
slot[name='append'] {
|
|
3767
|
+
display: flex;
|
|
3768
|
+
align-items: center;
|
|
3769
|
+
line-height: 1;
|
|
3770
|
+
height: 100%;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3644
3773
|
::slotted(uui-input),
|
|
3645
3774
|
::slotted(uui-input-lock) {
|
|
3646
3775
|
height: 100%;
|
|
3647
3776
|
--uui-input-border-width: 0;
|
|
3648
3777
|
}
|
|
3649
|
-
`],
|
|
3778
|
+
`],Q([a()],D.prototype,"min",2),Q([a({type:Number})],D.prototype,"minlength",2),Q([a({attribute:"minlength-message"})],D.prototype,"minlengthMessage",2),Q([a()],D.prototype,"max",2),Q([a({type:Number})],D.prototype,"maxlength",2),Q([a({attribute:"maxlength-message"})],D.prototype,"maxlengthMessage",2),Q([a({type:Number})],D.prototype,"step",2),Q([a({type:Boolean,reflect:!0})],D.prototype,"disabled",2),Q([a({type:Boolean,reflect:!0})],D.prototype,"readonly",2),Q([a()],D.prototype,"placeholder",2),Q([a()],D.prototype,"autocomplete",2),Q([a({type:Boolean,reflect:!0,attribute:"auto-width"})],D.prototype,"autoWidth",2),Q([a({type:String})],D.prototype,"type",1),Q([a({attribute:"inputmode"})],D.prototype,"inputMode",2),Q([a({type:String})],D.prototype,"pattern",2),Q([a({type:Number,reflect:!1,attribute:"tabindex"})],D.prototype,"tabIndex",2),Q([O("#input")],D.prototype,"_input",2),D=Q([v("uui-input")],D);class as extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}as.LOCK_CHANGE="lock-change";var Bf=Object.defineProperty,Hf=Object.getOwnPropertyDescriptor,ju=e=>{throw TypeError(e)},ls=(e,t,i,o)=>{for(var r=o>1?void 0:o?Hf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Bf(t,i,r),r},Ru=(e,t,i)=>t.has(e)||ju("Cannot "+i),jf=(e,t,i)=>(Ru(e,t,"read from private field"),i?i.call(e):t.get(e)),Rf=(e,t,i)=>t.has(e)?ju("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Wf=(e,t,i,o)=>(Ru(e,t,"write to private field"),t.set(e,i),i),us;let ri=class extends D{constructor(){super(),Rf(this,us,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){Wf(this,us,e),this.tabIndex=e?-1:0}get locked(){return jf(this,us)}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new as(as.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?l`<uui-icon name="lock" .fallback=${Yd.strings[0]}></uui-icon>`:l`<uui-icon
|
|
3650
3779
|
name="unlock"
|
|
3651
|
-
.fallback=${
|
|
3780
|
+
.fallback=${ep.strings[0]}></uui-icon>`}renderPrepend(){return l`<uui-button
|
|
3652
3781
|
.disabled=${this.disabled}
|
|
3653
3782
|
@click=${this._onLockToggle}
|
|
3654
3783
|
compact
|
|
3655
3784
|
id="lock"
|
|
3656
|
-
label="${this.locked?
|
|
3785
|
+
label="${this.locked?this.unlockLabel:this.lockLabel}">
|
|
3657
3786
|
${this.renderIcon()}
|
|
3658
|
-
</uui-button>`}};
|
|
3787
|
+
</uui-button>`}};us=new WeakMap,ri.styles=[...D.styles,b`
|
|
3659
3788
|
#lock {
|
|
3660
3789
|
height: 100%;
|
|
3661
3790
|
|
|
@@ -3668,16 +3797,16 @@
|
|
|
3668
3797
|
cursor: not-allowed;
|
|
3669
3798
|
opacity: 0.55;
|
|
3670
3799
|
}
|
|
3671
|
-
`],
|
|
3800
|
+
`],ls([a({type:Boolean,reflect:!0})],ri.prototype,"locked",1),ls([a({type:String,reflect:!1,attribute:"unlock-label"})],ri.prototype,"unlockLabel",2),ls([a({type:String,reflect:!1,attribute:"lock-label"})],ri.prototype,"lockLabel",2),ri=ls([v("uui-input-lock")],ri);var Ff=Object.defineProperty,Gf=Object.getOwnPropertyDescriptor,qn=(e,t,i,o)=>{for(var r=o>1?void 0:o?Gf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Ff(t,i,r),r};let Wi=class extends D{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){this.passwordType=e}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?l`<uui-icon name="see" .fallback=${Qd.strings[0]}></uui-icon>`:l`<uui-icon
|
|
3672
3801
|
name="unsee"
|
|
3673
|
-
.fallback=${
|
|
3802
|
+
.fallback=${tp.strings[0]}></uui-icon>`}renderAppend(){return l`<uui-button
|
|
3674
3803
|
.disabled=${this.disabled}
|
|
3675
3804
|
@click=${this._onPasswordToggle}
|
|
3676
3805
|
compact
|
|
3677
3806
|
label="${this.passwordType==="password"?"Show password":"Hide password"}"
|
|
3678
3807
|
id="eye">
|
|
3679
3808
|
${this.renderIcon()}
|
|
3680
|
-
</uui-button>`}};
|
|
3809
|
+
</uui-button>`}};Wi.styles=[...D.styles,b`
|
|
3681
3810
|
#eye {
|
|
3682
3811
|
height: 100%;
|
|
3683
3812
|
margin-left: -6px;
|
|
@@ -3686,7 +3815,7 @@
|
|
|
3686
3815
|
#clear:hover {
|
|
3687
3816
|
color: black;
|
|
3688
3817
|
}
|
|
3689
|
-
`],
|
|
3818
|
+
`],qn([_()],Wi.prototype,"passwordType",2),qn([a()],Wi.prototype,"type",1),Wi=qn([v("uui-input-password")],Wi);var qf=Object.getOwnPropertyDescriptor,Kf=(e,t,i,o)=>{for(var r=o>1?void 0:o?qf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let cs=class extends g{render(){return l`<slot></slot>`}};cs.styles=[b`
|
|
3690
3819
|
:host {
|
|
3691
3820
|
display: inline-block;
|
|
3692
3821
|
font-family: inherit;
|
|
@@ -3701,7 +3830,7 @@
|
|
|
3701
3830
|
::slotted(*:last-child)uui-key {
|
|
3702
3831
|
margin-right: 0px;
|
|
3703
3832
|
}
|
|
3704
|
-
`],
|
|
3833
|
+
`],cs=Kf([v("uui-keyboard-shortcut")],cs);var Xf=Object.getOwnPropertyDescriptor,Yf=(e,t,i,o)=>{for(var r=o>1?void 0:o?Xf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let hs=class extends g{render(){return l`<slot></slot>`}};hs.styles=[b`
|
|
3705
3834
|
:host {
|
|
3706
3835
|
background: var(--uui-color-surface,#fff);
|
|
3707
3836
|
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
@@ -3715,10 +3844,10 @@
|
|
|
3715
3844
|
user-select: none;
|
|
3716
3845
|
text-transform: lowercase;
|
|
3717
3846
|
}
|
|
3718
|
-
`],
|
|
3847
|
+
`],hs=Yf([v("uui-key")],hs);var Zf=Object.defineProperty,Qf=Object.getOwnPropertyDescriptor,ds=(e,t,i,o)=>{for(var r=o>1?void 0:o?Qf(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Zf(t,i,r),r};let oi=class extends g{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){return typeof this.for=="string"?this.getRootNode()?.getElementById(this.for)||null:this.for||null}render(){return l`
|
|
3719
3848
|
<slot></slot>
|
|
3720
3849
|
${this.required?l`<div id="required">*</div>`:""}
|
|
3721
|
-
`}};
|
|
3850
|
+
`}};oi.styles=[b`
|
|
3722
3851
|
:host {
|
|
3723
3852
|
font-weight: 700;
|
|
3724
3853
|
}
|
|
@@ -3730,10 +3859,10 @@
|
|
|
3730
3859
|
}
|
|
3731
3860
|
#required {
|
|
3732
3861
|
display: inline;
|
|
3733
|
-
color: var(--uui-color-
|
|
3862
|
+
color: var(--uui-color-danger,#d42054);
|
|
3734
3863
|
font-weight: 900;
|
|
3735
3864
|
}
|
|
3736
|
-
`],
|
|
3865
|
+
`],ds([a({type:Boolean,reflect:!0})],oi.prototype,"disabled",2),ds([a({reflect:!0,attribute:!0})],oi.prototype,"for",2),ds([a({type:Boolean,reflect:!0})],oi.prototype,"required",2),oi=ds([v("uui-label")],oi);var Jf=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,Kn=(e,t,i,o)=>{for(var r=o>1?void 0:o?eb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Jf(t,i,r),r};let Fi=class extends g{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=M(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return l`
|
|
3737
3866
|
${this.progress?l`<div
|
|
3738
3867
|
id="bar"
|
|
3739
3868
|
style="max-width: ${this.progress.toString()}%;"></div>`:""}
|
|
@@ -3742,7 +3871,7 @@
|
|
|
3742
3871
|
class=${this.progress?"":"animate"}
|
|
3743
3872
|
style="animation-duration: ${this.animationDuration}s"></div>
|
|
3744
3873
|
<div id="bar-background"></div>
|
|
3745
|
-
`}};
|
|
3874
|
+
`}};Fi.styles=[b`
|
|
3746
3875
|
:host {
|
|
3747
3876
|
position: relative;
|
|
3748
3877
|
display: block;
|
|
@@ -3801,7 +3930,7 @@
|
|
|
3801
3930
|
transform-origin: 175% 0%;
|
|
3802
3931
|
}
|
|
3803
3932
|
}
|
|
3804
|
-
`],
|
|
3933
|
+
`],Kn([a({type:Number})],Fi.prototype,"progress",1),Kn([a({type:Number})],Fi.prototype,"animationDuration",1),Fi=Kn([v("uui-loader-bar")],Fi);var tb=Object.defineProperty,ib=Object.getOwnPropertyDescriptor,Xn=(e,t,i,o)=>{for(var r=o>1?void 0:o?ib(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&tb(t,i,r),r};let Gi=class extends g{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?l`<span id="progress-display">${this.progress}</span>`:""}render(){return l`
|
|
3805
3934
|
<svg
|
|
3806
3935
|
id="spinner"
|
|
3807
3936
|
class=${this.progress?"":"animate"}
|
|
@@ -3814,11 +3943,11 @@
|
|
|
3814
3943
|
cx="50%"
|
|
3815
3944
|
cy="50%"
|
|
3816
3945
|
r="16"
|
|
3817
|
-
style=${
|
|
3946
|
+
style=${Qe(this._circleStyle())} />
|
|
3818
3947
|
</g>
|
|
3819
3948
|
</svg>
|
|
3820
3949
|
${this.renderProgress()}
|
|
3821
|
-
`}};
|
|
3950
|
+
`}};Gi.styles=[b`
|
|
3822
3951
|
:host {
|
|
3823
3952
|
vertical-align: middle;
|
|
3824
3953
|
line-height: 0;
|
|
@@ -3903,11 +4032,11 @@
|
|
|
3903
4032
|
/* Center the text */
|
|
3904
4033
|
padding-top: 0.09em;
|
|
3905
4034
|
}
|
|
3906
|
-
`],
|
|
4035
|
+
`],Xn([a({type:Number})],Gi.prototype,"progress",2),Xn([a({type:Boolean,reflect:!0,attribute:"show-progress"})],Gi.prototype,"showProgress",2),Gi=Xn([v("uui-loader-circle")],Gi);var rb=Object.getOwnPropertyDescriptor,ob=(e,t,i,o)=>{for(var r=o>1?void 0:o?rb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let ps=class extends g{render(){return l`
|
|
3907
4036
|
<div></div>
|
|
3908
4037
|
<div></div>
|
|
3909
4038
|
<div></div>
|
|
3910
|
-
`}};
|
|
4039
|
+
`}};ps.styles=[b`
|
|
3911
4040
|
:host {
|
|
3912
4041
|
color: var(--uui-color-default,#1b264f);
|
|
3913
4042
|
}
|
|
@@ -3947,28 +4076,28 @@
|
|
|
3947
4076
|
background-color: currentColor;
|
|
3948
4077
|
}
|
|
3949
4078
|
}
|
|
3950
|
-
`],
|
|
4079
|
+
`],ps=ob([v("uui-loader")],ps);class at extends A{}at.SHOW_CHILDREN="show-children",at.HIDE_CHILDREN="hide-children",at.CLICK_LABEL="click-label";var sb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,Wu=e=>{throw TypeError(e)},Me=(e,t,i,o)=>{for(var r=o>1?void 0:o?nb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&sb(t,i,r),r},ab=(e,t,i)=>t.has(e)||Wu("Cannot "+i),lb=(e,t,i)=>t.has(e)?Wu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Fu=(e,t,i)=>(ab(e,t,"access private method"),i),vs,Yn;let ve=class extends ko(yi(wr(Te("label",g)))){constructor(){super(...arguments),lb(this,vs),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.caretLabel="Reveal the underlying items",this.iconSlotHasContent=!1,this._labelButtonChanged=e=>{this.selectableTarget=e||this},this._iconSlotChanged=e=>{this.iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const e=this.showChildren?at.HIDE_CHILDREN:at.SHOW_CHILDREN,t=new at(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),x(this,"uui-symbol-expand"),x(this,"uui-loader-bar")}async focus(){await this.updateComplete,this.shadowRoot?.querySelector("#label-button")?.focus?.()}_renderLabelInside(){return l` <slot
|
|
3951
4080
|
name="icon"
|
|
3952
4081
|
id="icon"
|
|
3953
4082
|
style=${this.iconSlotHasContent?"":"display: none;"}
|
|
3954
4083
|
@slotchange=${this._iconSlotChanged}></slot>
|
|
3955
4084
|
${this.renderLabel()}
|
|
3956
|
-
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?l` <span id="label-button" ${
|
|
4085
|
+
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?l` <span id="label-button" ${Go(this._labelButtonChanged)}>
|
|
3957
4086
|
${this._renderLabelInside()}
|
|
3958
4087
|
</span>`:l` <a
|
|
3959
4088
|
id="label-button"
|
|
3960
|
-
${
|
|
4089
|
+
${Go(this._labelButtonChanged)}
|
|
3961
4090
|
href=${w(this.href)}
|
|
3962
4091
|
target=${w(this.target||void 0)}
|
|
3963
4092
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
3964
|
-
@click=${
|
|
4093
|
+
@click=${Fu(this,vs,Yn)}
|
|
3965
4094
|
?disabled=${this.disabled}
|
|
3966
4095
|
aria-label="${this.label}">
|
|
3967
4096
|
${this._renderLabelInside()}
|
|
3968
4097
|
</a>`}_renderLabelAsButton(){return l` <button
|
|
3969
4098
|
id="label-button"
|
|
3970
|
-
${
|
|
3971
|
-
@click=${
|
|
4099
|
+
${Go(this._labelButtonChanged)}
|
|
4100
|
+
@click=${Fu(this,vs,Yn)}
|
|
3972
4101
|
?disabled=${this.disabled}
|
|
3973
4102
|
aria-label="${this.label}">
|
|
3974
4103
|
${this._renderLabelInside()}
|
|
@@ -3989,7 +4118,7 @@
|
|
|
3989
4118
|
${this.loading?l`<uui-loader-bar id="loader"></uui-loader-bar>`:""}
|
|
3990
4119
|
</div>
|
|
3991
4120
|
${this.showChildren?l`<slot></slot>`:""}
|
|
3992
|
-
`}};
|
|
4121
|
+
`}};vs=new WeakSet,Yn=function(){if(this.selectOnly)return;const e=new at(at.CLICK_LABEL);this.dispatchEvent(e)},ve.styles=[b`
|
|
3993
4122
|
:host {
|
|
3994
4123
|
box-sizing: border-box;
|
|
3995
4124
|
display: block;
|
|
@@ -4021,7 +4150,11 @@
|
|
|
4021
4150
|
#caret-button:hover {
|
|
4022
4151
|
background-color: var(
|
|
4023
4152
|
--uui-menu-item-background-color-hover,
|
|
4024
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
4153
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
4154
|
+
250,
|
|
4155
|
+
250,
|
|
4156
|
+
250
|
|
4157
|
+
))
|
|
4025
4158
|
);
|
|
4026
4159
|
}
|
|
4027
4160
|
:host(:not([active], [selected], [disabled]))
|
|
@@ -4052,7 +4185,11 @@
|
|
|
4052
4185
|
:host([active]) #caret-button:hover {
|
|
4053
4186
|
background-color: var(
|
|
4054
4187
|
--uui-menu-item-background-color-active-hover,
|
|
4055
|
-
var(--uui-color-current-emphasis,rgb(
|
|
4188
|
+
var(--uui-color-current-emphasis,rgb(
|
|
4189
|
+
248,
|
|
4190
|
+
214,
|
|
4191
|
+
211
|
|
4192
|
+
))
|
|
4056
4193
|
);
|
|
4057
4194
|
}
|
|
4058
4195
|
|
|
@@ -4089,7 +4226,11 @@
|
|
|
4089
4226
|
#caret-button:hover {
|
|
4090
4227
|
background-color: var(
|
|
4091
4228
|
--uui-menu-item-background-color-selected-hover,
|
|
4092
|
-
var(--uui-color-selected-emphasis,rgb(
|
|
4229
|
+
var(--uui-color-selected-emphasis,rgb(
|
|
4230
|
+
70,
|
|
4231
|
+
86,
|
|
4232
|
+
200
|
|
4233
|
+
))
|
|
4093
4234
|
);
|
|
4094
4235
|
}
|
|
4095
4236
|
|
|
@@ -4101,7 +4242,11 @@
|
|
|
4101
4242
|
border-radius: var(--uui-border-radius,3px);
|
|
4102
4243
|
background-color: var(
|
|
4103
4244
|
--uui-menu-item-background-color-highlight,
|
|
4104
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
4245
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
4246
|
+
250,
|
|
4247
|
+
250,
|
|
4248
|
+
250
|
|
4249
|
+
))
|
|
4105
4250
|
);
|
|
4106
4251
|
}
|
|
4107
4252
|
|
|
@@ -4120,7 +4265,11 @@
|
|
|
4120
4265
|
border-radius: var(--uui-border-radius,3px);
|
|
4121
4266
|
background-color: var(
|
|
4122
4267
|
--uui-menu-item-background-color-highlight-active-selected,
|
|
4123
|
-
var(--uui-color-current-emphasis,rgb(
|
|
4268
|
+
var(--uui-color-current-emphasis,rgb(
|
|
4269
|
+
248,
|
|
4270
|
+
214,
|
|
4271
|
+
211
|
|
4272
|
+
))
|
|
4124
4273
|
);
|
|
4125
4274
|
}
|
|
4126
4275
|
|
|
@@ -4152,7 +4301,11 @@
|
|
|
4152
4301
|
border-radius: var(--uui-border-radius,3px);
|
|
4153
4302
|
background-color: var(
|
|
4154
4303
|
--uui-menu-item-background-color-highlight-selectable-selected,
|
|
4155
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
4304
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
4305
|
+
250,
|
|
4306
|
+
250,
|
|
4307
|
+
250
|
|
4308
|
+
))
|
|
4156
4309
|
);
|
|
4157
4310
|
color: var(
|
|
4158
4311
|
--uui-menu-item-color-highlight-selectable-selected,
|
|
@@ -4355,7 +4508,7 @@
|
|
|
4355
4508
|
--uui-button-height: calc(var(--uui-size-base-unit) * 4);
|
|
4356
4509
|
margin-right: var(--uui-size-base-unit);
|
|
4357
4510
|
}
|
|
4358
|
-
`],
|
|
4511
|
+
`],Me([a({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),Me([a({type:Boolean,reflect:!0,attribute:"show-children"})],ve.prototype,"showChildren",2),Me([a({type:Boolean,attribute:"has-children"})],ve.prototype,"hasChildren",2),Me([a({type:Boolean,attribute:"loading"})],ve.prototype,"loading",2),Me([a({type:String})],ve.prototype,"href",2),Me([a({type:String})],ve.prototype,"target",2),Me([a({type:String})],ve.prototype,"rel",2),Me([a({type:String,attribute:"select-mode",reflect:!0})],ve.prototype,"selectMode",2),Me([a({type:String,attribute:"caret-label"})],ve.prototype,"caretLabel",2),Me([_()],ve.prototype,"iconSlotHasContent",2),ve=Me([v("uui-menu-item")],ve);var ub=Object.defineProperty,cb=Object.getOwnPropertyDescriptor,qi=(e,t,i,o)=>{for(var r=o>1?void 0:o?cb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&ub(t,i,r),r};const Gu="uui:modal-open",Ki="uui:modal-close",qu="uui:modal-close-end";class we extends g{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=t=>{t?.preventDefault(),t?.stopImmediatePropagation();const i=new CustomEvent(Gu,{cancelable:!0}),o=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(i),this.dispatchEvent(o),!(i.defaultPrevented||o.defaultPrevented)&&this._openModal()},this.close=t=>{t?.preventDefault(),t?.stopImmediatePropagation();const i=new CustomEvent(Ki,{cancelable:!0});this.dispatchEvent(i),!i.defaultPrevented&&this.forceClose()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(t){this._transitionDuration=t,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(t){super.firstUpdated(t),this.isClosing||this.open()}_openModal(){this.isOpen=!0,this._dialogElement?.showModal(),this._dialogElement?.addEventListener("cancel",this.close)}forceClose(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.dispatchEvent(new CustomEvent(qu)),this.remove()}}we.styles=[b`
|
|
4359
4512
|
dialog {
|
|
4360
4513
|
display: block;
|
|
4361
4514
|
margin: 0;
|
|
@@ -4383,10 +4536,11 @@
|
|
|
4383
4536
|
:host([index='0']) dialog::after {
|
|
4384
4537
|
opacity: 0;
|
|
4385
4538
|
}
|
|
4386
|
-
`],
|
|
4539
|
+
`],qi([O("dialog")],we.prototype,"_dialogElement",2),qi([a({type:Boolean,reflect:!0,attribute:"is-open"})],we.prototype,"isOpen",2),qi([a({type:Boolean,reflect:!0,attribute:"is-closing"})],we.prototype,"isClosing",2),qi([a({type:Number,reflect:!0})],we.prototype,"index",2),qi([a({type:Number,reflect:!0,attribute:"unique-index"})],we.prototype,"uniqueIndex",2),qi([a({type:Number,attribute:"transition-duration"})],we.prototype,"transitionDuration",1);var hb=Object.defineProperty,db=Object.getOwnPropertyDescriptor,Ku=e=>{throw TypeError(e)},Xu=(e,t,i,o)=>{for(var r=o>1?void 0:o?db(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&hb(t,i,r),r},pb=(e,t,i)=>t.has(e)||Ku("Cannot "+i),Yu=(e,t,i)=>(pb(e,t,"read from private field"),i?i.call(e):t.get(e)),vb=(e,t,i)=>t.has(e)?Ku("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),fs,Zn;let Xi=class extends we{constructor(){super(...arguments),vb(this,fs),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Yu(this,fs,Zn)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}forceClose(){this.isClosing||(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Yu(this,fs,Zn)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return l`<dialog>
|
|
4387
4540
|
<slot></slot>
|
|
4388
|
-
</dialog>`}};
|
|
4541
|
+
</dialog>`}};fs=new WeakSet,Zn=function(){return this._dialogElement?.getBoundingClientRect().width??0},Xi.styles=[...we.styles,b`
|
|
4389
4542
|
:host {
|
|
4543
|
+
outline: none;
|
|
4390
4544
|
--uui-modal-sidebar-left-gap: 24px;
|
|
4391
4545
|
--uui-modal-sidebar-background: var(--uui-color-surface,#fff);
|
|
4392
4546
|
}
|
|
@@ -4426,7 +4580,7 @@
|
|
|
4426
4580
|
:host([size='small']) dialog {
|
|
4427
4581
|
max-width: min(500px, calc(100% - var(--uui-modal-sidebar-left-gap)));
|
|
4428
4582
|
}
|
|
4429
|
-
`],
|
|
4583
|
+
`],Xu([a({reflect:!0})],Xi.prototype,"size",2),Xi=Xu([v("uui-modal-sidebar")],Xi);var fb=Object.defineProperty,bb=Object.getOwnPropertyDescriptor,Zu=e=>{throw TypeError(e)},Yi=(e,t,i,o)=>{for(var r=o>1?void 0:o?bb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&fb(t,i,r),r},Qu=(e,t,i)=>t.has(e)||Zu("Cannot "+i),Nr=(e,t,i)=>(Qu(e,t,"read from private field"),i?i.call(e):t.get(e)),Qn=(e,t,i)=>t.has(e)?Zu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),bs=(e,t,i)=>(Qu(e,t,"access private method"),i),Jn,Zi,Qi,ea,ta;let lt=class extends g{constructor(){super(),Qn(this,Qi),this.sidebarGap=64,this.transitionDurationMS=250,Qn(this,Jn,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(o=>o instanceof we)??[],e.filter(o=>this._modals.indexOf(o)===-1).forEach(o=>o.removeEventListener(Ki,Nr(this,Zi))),this._modals.filter(o=>e.indexOf(o)===-1).forEach(o=>o.addEventListener(Ki,Nr(this,Zi))),this._sidebars=this._modals.filter(o=>o instanceof Xi),this._modals.length===0){this.removeAttribute("backdrop");return}bs(this,Qi,ea).call(this),bs(this,Qi,ta).call(this)}),Qn(this,Zi,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(Ki,Nr(this,Zi)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}bs(this,Qi,ea).call(this),bs(this,Qi,ta).call(this)}),this.addEventListener(Ki,Nr(this,Zi))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return l`<slot @slotchange=${Nr(this,Jn)}></slot>`}};Jn=new WeakMap,Zi=new WeakMap,Qi=new WeakSet,ea=function(){this.setAttribute("backdrop","");const e=this._modals?.filter(t=>!t.isClosing).reverse()??[];e?.forEach((t,i)=>{t.index=i,t.transitionDuration=this.transitionDurationMS}),e?.forEach(t=>{const i=e?.filter(o=>o.constructor.name===t.constructor.name);t.uniqueIndex=i?.indexOf(t)??0})},ta=function(){requestAnimationFrame(()=>{let e=0;const t=this._sidebars?.filter(i=>!i.isClosing).reverse()??[];for(let i=0;i<t.length;i++){const o=t[i],r=t[i+1],s=e;if(o.updateComplete.then(()=>{o.style.setProperty("--uui-modal-offset",s+"px")}),r?.hasAttribute("hide"))break;const n=o.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,u=r?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=n+e+this.sidebarGap-u;e=c>0?c:0}})},lt.styles=b`
|
|
4430
4584
|
:host {
|
|
4431
4585
|
position: fixed;
|
|
4432
4586
|
--uui-modal-color-backdrop: rgba(0, 0, 0, 0.5);
|
|
@@ -4443,12 +4597,13 @@
|
|
|
4443
4597
|
:host([backdrop])::after {
|
|
4444
4598
|
opacity: 1;
|
|
4445
4599
|
}
|
|
4446
|
-
`,
|
|
4600
|
+
`,Yi([O("slot")],lt.prototype,"modalSlot",2),Yi([_()],lt.prototype,"_modals",2),Yi([_()],lt.prototype,"_sidebars",2),Yi([a({type:Number})],lt.prototype,"sidebarGap",2),Yi([a({type:Number})],lt.prototype,"transitionDurationMS",2),lt=Yi([v("uui-modal-container")],lt);var gb=Object.getOwnPropertyDescriptor,mb=(e,t,i,o)=>{for(var r=o>1?void 0:o?gb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let gs=class extends we{render(){return l`
|
|
4447
4601
|
<dialog>
|
|
4448
4602
|
<slot></slot>
|
|
4449
4603
|
</dialog>
|
|
4450
|
-
`}};
|
|
4604
|
+
`}};gs.styles=[...we.styles,b`
|
|
4451
4605
|
:host {
|
|
4606
|
+
outline: none;
|
|
4452
4607
|
--uui-modal-dialog-background: var(--uui-color-surface,#fff);
|
|
4453
4608
|
}
|
|
4454
4609
|
dialog {
|
|
@@ -4470,44 +4625,36 @@
|
|
|
4470
4625
|
:host(:not([index='0'])) dialog {
|
|
4471
4626
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
4472
4627
|
}
|
|
4473
|
-
`],
|
|
4628
|
+
`],gs=mb([v("uui-modal-dialog")],gs);class Et extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Et.CHANGE="change";var _b=Object.defineProperty,yb=Object.getOwnPropertyDescriptor,xe=(e,t,i,o)=>{for(var r=o>1?void 0:o?yb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&_b(t,i,r),r};const wb=45,ia=(e,t,i)=>Math.min(Math.max(e,t),i),xb=(e,t)=>Array.from({length:t-e+1},(i,o)=>e+o);let ne=class extends g{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this.firstLabel="First",this.previousLabel="Previous",this.nextLabel="Next",this.lastLabel="Last",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),x(this,"uui-button"),x(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((r,s)=>r+s.getBoundingClientRect().width,0),o=(e-t)/wb/2;this._range=Math.max(1,Math.floor(o)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,i=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return xb(ia(t,1,this.total),ia(i,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=ia(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new Et(Et.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new Et(Et.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new Et(Et.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return l`<uui-button
|
|
4474
4629
|
compact
|
|
4475
4630
|
look="outline"
|
|
4476
4631
|
class="nav"
|
|
4477
4632
|
role="listitem"
|
|
4478
|
-
label
|
|
4633
|
+
label=${this.firstLabel}
|
|
4479
4634
|
?disabled=${this._current===1}
|
|
4480
|
-
@click=${()=>this.goToPage(1)}
|
|
4481
|
-
First
|
|
4482
|
-
</uui-button>`}renderPrevious(){return l`<uui-button
|
|
4635
|
+
@click=${()=>this.goToPage(1)}></uui-button>`}renderPrevious(){return l`<uui-button
|
|
4483
4636
|
compact
|
|
4484
4637
|
look="outline"
|
|
4485
4638
|
class="nav"
|
|
4486
4639
|
role="listitem"
|
|
4487
|
-
label
|
|
4640
|
+
label=${this.previousLabel}
|
|
4488
4641
|
?disabled=${this._current===1}
|
|
4489
|
-
@click=${this.goToPreviousPage}
|
|
4490
|
-
Previous
|
|
4491
|
-
</uui-button>`}renderNext(){return l`<uui-button
|
|
4642
|
+
@click=${this.goToPreviousPage}></uui-button>`}renderNext(){return l`<uui-button
|
|
4492
4643
|
compact
|
|
4493
4644
|
look="outline"
|
|
4494
4645
|
role="listitem"
|
|
4495
4646
|
class="nav"
|
|
4496
|
-
label
|
|
4647
|
+
label=${this.nextLabel}
|
|
4497
4648
|
?disabled=${this._current===this.total}
|
|
4498
|
-
@click=${this.goToNextPage}
|
|
4499
|
-
Next
|
|
4500
|
-
</uui-button>`}renderLast(){return l`
|
|
4649
|
+
@click=${this.goToNextPage}></uui-button>`}renderLast(){return l`
|
|
4501
4650
|
<uui-button
|
|
4502
4651
|
compact
|
|
4503
4652
|
look="outline"
|
|
4504
4653
|
role="listitem"
|
|
4505
4654
|
class="nav"
|
|
4506
|
-
label
|
|
4655
|
+
label=${this.lastLabel}
|
|
4507
4656
|
?disabled=${this.total===this._current}
|
|
4508
|
-
@click=${()=>this.goToPage(this.total)}>
|
|
4509
|
-
Last
|
|
4510
|
-
</uui-button>
|
|
4657
|
+
@click=${()=>this.goToPage(this.total)}></uui-button>
|
|
4511
4658
|
`}renderDots(){return l`<uui-button
|
|
4512
4659
|
compact
|
|
4513
4660
|
look="outline"
|
|
@@ -4532,7 +4679,7 @@
|
|
|
4532
4679
|
${this._visiblePages.map(e=>this.renderPage(e))}
|
|
4533
4680
|
${this.renderNavigationRight()}
|
|
4534
4681
|
</uui-button-group>
|
|
4535
|
-
`}};
|
|
4682
|
+
`}};ne.styles=[b`
|
|
4536
4683
|
uui-button-group {
|
|
4537
4684
|
width: 100%;
|
|
4538
4685
|
}
|
|
@@ -4562,7 +4709,7 @@
|
|
|
4562
4709
|
.active {
|
|
4563
4710
|
pointer-events: none;
|
|
4564
4711
|
}
|
|
4565
|
-
`],
|
|
4712
|
+
`],xe([dh("uui-button.nav")],ne.prototype,"_navButtons",2),xe([O("#pages")],ne.prototype,"_pagesGroup",2),xe([a()],ne.prototype,"label",2),xe([a({reflect:!0,attribute:"aria-label"})],ne.prototype,"ariaLabel",2),xe([a()],ne.prototype,"firstLabel",2),xe([a()],ne.prototype,"previousLabel",2),xe([a()],ne.prototype,"nextLabel",2),xe([a()],ne.prototype,"lastLabel",2),xe([a({type:Number})],ne.prototype,"total",1),xe([_()],ne.prototype,"_range",2),xe([_()],ne.prototype,"_visiblePages",2),xe([a({type:Number})],ne.prototype,"current",1),ne=xe([v("uui-pagination")],ne);class ra extends A{}ra.CLOSE="close";var $b=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,Vr=(e,t,i,o)=>{for(var r=o>1?void 0:o?kb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&$b(t,i,r),r};function ms(e,t,i){return e<t?t:e>i?i:e}let Pt=class extends g{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new ra(ra.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const i=t.position==="absolute",o=/(auto|scroll)/;let r=e;for(;r=r.parentElement;)if(t=getComputedStyle(r),!(i&&t.position==="static")&&(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(r),t.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){if(!this.shadowRoot)return;const e=this.containerElement;if(!e)return;const t=this.containerElement?.getBoundingClientRect(),i=this._trigger?.getBoundingClientRect();if(i!=null&&t!=null){const o=this._scrollParents.map(Le=>Le.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,t,o));let r=this._currentPlacement.indexOf("top")!==-1,s=this._currentPlacement.indexOf("bottom")!==-1,n=this._currentPlacement.indexOf("left")!==-1,u=this._currentPlacement.indexOf("right")!==-1;const c=this._currentPlacement.indexOf("-start")!==-1,p=this._currentPlacement.indexOf("-end")!==-1;let f=.5,h=.5,C=.5,d=.5,y=0,I=0;if(this.placement==="auto"){const Le=this._scrollParents[0],br=Le.clientWidth,Mt=Le.clientHeight,di=i.x-t.width,pi=br-(i.x+i.width)-t.width,js=i.y-t.height,ao=Mt-(i.y+i.height)-t.height;let lo=.5,uo=.5;const Bc=Math.max(di,pi);let Ua=Math.max(js,ao);ao>js&&ao>this.margin&&(Ua+=9999),Bc>Ua?(di>pi?(lo=0,n=!0):(lo=1,u=!0),y=this.margin):(js>ao?(uo=0,r=!0):(uo=1,s=!0),I=this.margin),f=lo,h=uo,C=1-lo,d=1-uo}else r&&(d=1,h=0),s&&(d=0,h=1),(r||s)&&(I=this.margin,c&&(C=0,f=0),p&&(C=1,f=1)),n&&(C=1,f=0),u&&(C=0,f=1),(n||u)&&(y=this.margin,c&&(d=0,h=0),p&&(d=1,h=1));const $=-t.width*C+i.width*f-y*(C*2-1),N=-t.height*d+i.height*h-I*(d*2-1);let ie=$,gt=N;r||s?(this._scrollParents.forEach((Le,br)=>{const Mt=Le===document.body?0:o[br].x,di=-i.x+Mt,pi=Le.clientWidth-i.x-i.width+$+Mt-(t.width-i.width)*(1-f);ie=ms(ie,di,pi)}),ie=ms(ie,-t.width,i.width)):(n||u)&&(this._scrollParents.forEach((Le,br)=>{const Mt=Le===document.body?0:o[br].y,di=-i.y+Mt,pi=Le.clientHeight-i.y-i.height+N+Mt-(t.height-i.height)*(1-h);gt=ms(gt,di,pi)}),gt=ms(gt,-t.height,i.height)),(this._positionX!==ie||this._positionY!==gt)&&(this._positionX=ie,this._positionY=gt,$===ie&&N===gt&&this._stopScrollListener(),e.style.left=`${this._positionX}px`,e.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,i){const r=e.split("-"),s=r[0],n=r[1]||null;let u;return this._scrollParents.some((c,p)=>{const f=c===document.body?0:i[p].x,h=c===document.body?0:i[p].y;return s==="top"&&t.y-2<=h?(u="bottom",!0):s==="bottom"&&t.y+t.height+2>=c.clientHeight+h?(u="top",!0):s==="left"&&t.x-2<=f?(u="right",!0):s==="right"&&t.x+t.width+2>=c.clientWidth+f?(u="left",!0):!1}),u?(this._startScrollListener(),u+(n?`-${n}`:"")):e}render(){return l`
|
|
4566
4713
|
<slot
|
|
4567
4714
|
id="trigger"
|
|
4568
4715
|
name="trigger"
|
|
@@ -4570,7 +4717,7 @@
|
|
|
4570
4717
|
<div id="container">
|
|
4571
4718
|
${this._open?l`<slot name="popover"></slot>`:""}
|
|
4572
4719
|
</div>
|
|
4573
|
-
`}}
|
|
4720
|
+
`}};Pt.styles=[b`
|
|
4574
4721
|
:host {
|
|
4575
4722
|
position: relative;
|
|
4576
4723
|
display: inline-block;
|
|
@@ -4597,7 +4744,7 @@
|
|
|
4597
4744
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
4598
4745
|
);
|
|
4599
4746
|
}
|
|
4600
|
-
`],
|
|
4747
|
+
`],Vr([O("#container")],Pt.prototype,"containerElement",2),Vr([a({type:Number})],Pt.prototype,"margin",2),Vr([a({type:String,reflect:!0})],Pt.prototype,"placement",1),Vr([a({type:Boolean,reflect:!0})],Pt.prototype,"open",1),Pt=Vr([v("uui-popover")],Pt);var Cb=Object.defineProperty,Eb=Object.getOwnPropertyDescriptor,Ju=e=>{throw TypeError(e)},si=(e,t,i,o)=>{for(var r=o>1?void 0:o?Eb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Cb(t,i,r),r},oa=(e,t,i)=>t.has(e)||Ju("Cannot "+i),H=(e,t,i)=>(oa(e,t,"read from private field"),i?i.call(e):t.get(e)),ni=(e,t,i)=>t.has(e)?Ju("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Pb=(e,t,i,o)=>(oa(e,t,"write to private field"),t.set(e,i),i),Ji=(e,t,i)=>(oa(e,t,"access private method"),i),ut,er,_s,St,Br,sa,Ot,na,ec,aa,tc;let Fe=class extends g{constructor(){super(...arguments),ni(this,Ot),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,ni(this,ut,null),ni(this,er,[]),ni(this,_s,e=>{if(this._open=e.newState==="open",Pb(this,ut,qd(this,"popovertarget",this.id)),Ji(this,Ot,tc).call(this),H(this,ut)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),!this._open){Ji(this,Ot,aa).call(this);return}Ji(this,Ot,ec).call(this),requestAnimationFrame(()=>{H(this,St).call(this)})}),ni(this,St,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",H(this,Br).call(this,3))}),ni(this,Br,e=>{if(H(this,sa).call(this),e--,H(this,ut)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,i=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,r=this._actualPlacement.indexOf("right")!==-1,s=this._actualPlacement.indexOf("-start")!==-1,n=this._actualPlacement.indexOf("-end")!==-1,u=H(this,ut).getBoundingClientRect(),c=this.getBoundingClientRect();let p=0,f=0;i&&(p=u.top+u.height,s&&(f=u.left),n&&(f=u.left+u.width-c.width),!s&&!n&&(f=u.left+u.width/2-c.width/2)),t&&(p=u.top-c.height,s&&(f=u.left),n&&(f=u.left+u.width-c.width),!s&&!n&&(f=u.left+u.width/2-c.width/2)),o&&(f=u.left-c.width,s&&(p=u.top),n&&(p=u.top+u.height-c.height),!s&&!n&&(p=u.top+u.height/2-c.height/2)),r&&(f=u.left+u.width,s&&(p=u.top),n&&(p=u.top+u.height-c.height),!s&&!n&&(p=u.top+u.height/2-c.height/2));const h=window.innerWidth,C=window.innerHeight,d=Math.min(0,u.top+u.height),y=Math.max(Math.min(p,C-c.height),u.top-c.height);if(Math.max(d,y)!==p&&(t||i)&&e>0){Ji(this,Ot,na).call(this),H(this,Br).call(this,e);return}p=Math.max(d,y);const $=Math.min(0,u.left+u.width),N=Math.max(Math.min(f,h-c.width),u.left-c.width),ie=Math.max($,N);if(ie!==f&&(o||r)&&e>0){Ji(this,Ot,na).call(this),H(this,Br).call(this,e);return}f=ie,(p+c.height<0||p>C||f+c.width<0||f>h)&&this.hidePopover(),this.style.transform=`translate(${f}px, ${p}px)`,this.style.opacity="1"}),ni(this,sa,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const i=`padding${t}`;this.style.padding="0",this.style[i]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,H(this,St).call(this)}connectedCallback(){this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",H(this,_s))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",H(this,_s)),Ji(this,Ot,aa).call(this)}render(){return l`<slot></slot>`}};ut=new WeakMap,er=new WeakMap,_s=new WeakMap,St=new WeakMap,Br=new WeakMap,sa=new WeakMap,Ot=new WeakSet,na=function(){const[e,t]=this._actualPlacement.split("-"),i=e==="top"?"bottom":e==="bottom"?"top":e==="left"?"right":"left";this._actualPlacement=`${i}-${t}`},ec=function(){H(this,er).forEach(e=>{e.addEventListener("scroll",H(this,St),{passive:!0})}),document.addEventListener("scroll",H(this,St),{passive:!0})},aa=function(){H(this,er).forEach(e=>{e.removeEventListener("scroll",H(this,St))}),document.removeEventListener("scroll",H(this,St))},tc=function(){if(!H(this,ut))return;let e=getComputedStyle(H(this,ut));if(e.position==="fixed")return;const t=e.position==="absolute",i=/(auto|scroll)/;let o=H(this,ut);for(;o=o.parentElement;)if(e=getComputedStyle(o),!(t&&e.position==="static")&&(i.test(e.overflow+e.overflowY+e.overflowX)&&H(this,er).push(o),e.position==="fixed"))return;H(this,er).push(document.body)},Fe.styles=[b`
|
|
4601
4748
|
:host {
|
|
4602
4749
|
margin: 0;
|
|
4603
4750
|
width: fit-content;
|
|
@@ -4610,9 +4757,9 @@
|
|
|
4610
4757
|
overflow: visible;
|
|
4611
4758
|
color: var(--uui-color-text,#060606);
|
|
4612
4759
|
}
|
|
4613
|
-
`],
|
|
4614
|
-
<div id="bar" style=${
|
|
4615
|
-
`}};
|
|
4760
|
+
`],si([a({type:Number})],Fe.prototype,"margin",2),si([a({type:Boolean})],Fe.prototype,"open",1),si([a({type:String,reflect:!0})],Fe.prototype,"placement",1),si([_()],Fe.prototype,"_placement",2),si([_()],Fe.prototype,"_open",2),si([_()],Fe.prototype,"_actualPlacement",2),Fe=si([v("uui-popover-container")],Fe);var Sb=Object.defineProperty,Ob=Object.getOwnPropertyDescriptor,ic=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ob(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Sb(t,i,r),r};const Ib=(e,t,i)=>Math.min(Math.max(e,t),i);let Hr=class extends g{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=Ib(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return l`
|
|
4761
|
+
<div id="bar" style=${Qe(this._getProgressStyle())}></div>
|
|
4762
|
+
`}};Hr.styles=[b`
|
|
4616
4763
|
:host {
|
|
4617
4764
|
width: 100%;
|
|
4618
4765
|
height: 4px;
|
|
@@ -4629,7 +4776,7 @@
|
|
|
4629
4776
|
height: 100%;
|
|
4630
4777
|
width: 0%;
|
|
4631
4778
|
}
|
|
4632
|
-
`],
|
|
4779
|
+
`],ic([a({type:Number})],Hr.prototype,"progress",1),Hr=ic([v("uui-progress-bar")],Hr);class tr extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}tr.CHANGE="change";var Ab=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,rc=e=>{throw TypeError(e)},It=(e,t,i,o)=>{for(var r=o>1?void 0:o?Ub(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Ab(t,i,r),r},zb=(e,t,i)=>t.has(e)||rc("Cannot "+i),Mb=(e,t,i)=>t.has(e)?rc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Db=(e,t,i)=>(zb(e,t,"access private method"),i),la,oc;let Oe=class extends g{constructor(){super(...arguments),Mb(this,la),this.name="",this.value="",this.label="",this.checked=!1,this.disabled=!1,this.readonly=!1}focus(){this._inputElement.focus()}click(){this._inputElement.click()}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.removeAttribute("tabindex")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}render(){return l` <label>
|
|
4633
4780
|
<input
|
|
4634
4781
|
id="input"
|
|
4635
4782
|
type="radio"
|
|
@@ -4637,12 +4784,12 @@
|
|
|
4637
4784
|
value=${this.value}
|
|
4638
4785
|
.checked=${this.checked}
|
|
4639
4786
|
.disabled=${this.disabled||this.readonly}
|
|
4640
|
-
@change=${
|
|
4787
|
+
@change=${Db(this,la,oc)} />
|
|
4641
4788
|
<div id="button"></div>
|
|
4642
4789
|
<div id="label">
|
|
4643
4790
|
${this.label?l`<span>${this.label}</span>`:l`<slot></slot>`}
|
|
4644
4791
|
</div>
|
|
4645
|
-
</label>`}};
|
|
4792
|
+
</label>`}};la=new WeakSet,oc=function(e){e.stopPropagation();const t=this._inputElement.checked;this.checked=t,t&&this.focus(),this.dispatchEvent(new tr(tr.CHANGE))},Oe.styles=[Po,b`
|
|
4646
4793
|
:host {
|
|
4647
4794
|
display: block;
|
|
4648
4795
|
box-sizing: border-box;
|
|
@@ -4723,11 +4870,19 @@
|
|
|
4723
4870
|
}
|
|
4724
4871
|
|
|
4725
4872
|
input:checked:hover ~ #button {
|
|
4726
|
-
border: 1px solid var(--uui-color-selected-emphasis,rgb(
|
|
4873
|
+
border: 1px solid var(--uui-color-selected-emphasis,rgb(
|
|
4874
|
+
70,
|
|
4875
|
+
86,
|
|
4876
|
+
200
|
|
4877
|
+
));
|
|
4727
4878
|
}
|
|
4728
4879
|
|
|
4729
4880
|
input:checked:hover ~ #button::after {
|
|
4730
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
4881
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
4882
|
+
70,
|
|
4883
|
+
86,
|
|
4884
|
+
200
|
|
4885
|
+
));
|
|
4731
4886
|
}
|
|
4732
4887
|
|
|
4733
4888
|
:host([disabled]) label {
|
|
@@ -4751,7 +4906,7 @@
|
|
|
4751
4906
|
}
|
|
4752
4907
|
|
|
4753
4908
|
:host([disabled]:active) #button {
|
|
4754
|
-
animation: ${
|
|
4909
|
+
animation: ${So};
|
|
4755
4910
|
}
|
|
4756
4911
|
|
|
4757
4912
|
@media (prefers-reduced-motion) {
|
|
@@ -4763,7 +4918,7 @@
|
|
|
4763
4918
|
transition: none;
|
|
4764
4919
|
}
|
|
4765
4920
|
}
|
|
4766
|
-
`],
|
|
4921
|
+
`],It([O("#input")],Oe.prototype,"_inputElement",2),It([a({type:String})],Oe.prototype,"name",2),It([a({type:String})],Oe.prototype,"value",2),It([a({type:String})],Oe.prototype,"label",2),It([a({type:Boolean,reflect:!0})],Oe.prototype,"checked",2),It([a({type:Boolean,reflect:!0})],Oe.prototype,"disabled",2),It([a({type:Boolean,reflect:!0})],Oe.prototype,"readonly",2),Oe=It([v("uui-radio")],Oe);class ys extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}ys.CHANGE="change";var Lb=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,sc=e=>{throw TypeError(e)},ua=(e,t,i,o)=>{for(var r=o>1?void 0:o?Tb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Lb(t,i,r),r},ca=(e,t,i)=>t.has(e)||sc("Cannot "+i),k=(e,t,i)=>(ca(e,t,"read from private field"),i?i.call(e):t.get(e)),At=(e,t,i)=>t.has(e)?sc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ws=(e,t,i,o)=>(ca(e,t,"write to private field"),t.set(e,i),i),F=(e,t,i)=>(ca(e,t,"access private method"),i),q,L,ha,da,xs,$s,pa,B,nc,va,fa,ba,ga,ai,ac,lc,jr;const Nb="ArrowLeft",Vb="ArrowUp",Bb="ArrowRight",Hb="ArrowDown",jb=" ",Rb="Enter";let li=class extends Ne(g,""){constructor(){super(),At(this,B),this.disabled=!1,this.readonly=!1,At(this,q,null),At(this,L,[]),At(this,ha,e=>{k(this,L)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),At(this,da,e=>{this.contains(e.relatedTarget)||k(this,q)===null&&k(this,L)?.forEach(t=>{t.makeFocusable()})}),At(this,xs,()=>{this.pristine=!1}),At(this,$s,e=>{e.target.checked===!0&&(this.value=e.target.value,F(this,B,jr).call(this))}),At(this,pa,e=>{switch(e.key){case Nb:case Vb:{e.preventDefault(),F(this,B,ac).call(this);break}case Bb:case Hb:{e.preventDefault(),F(this,B,lc).call(this);break}case jb:{k(this,q)===null&&(this.value=F(this,B,ai).call(this,1,!1)?.value,F(this,B,jr).call(this));break}case Rb:this.submit()}}),this.addEventListener("keydown",k(this,pa)),this.addEventListener("focusin",k(this,ha)),this.addEventListener("focusout",k(this,da)),this.updateComplete.then(()=>{F(this,B,fa).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,F(this,B,fa).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&F(this,B,ba).call(this,this.disabled),e.has("readonly")&&F(this,B,ga).call(this,this.readonly),e.has("name")&&F(this,B,va).call(this,e.get("name"))}async focus(){await this.updateComplete,k(this,q)!==null?k(this,L)[k(this,q)]?.focus():F(this,B,ai).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,k(this,q)!==null?k(this,L)[k(this,q)]?.blur():F(this,B,ai).call(this,1,!1)?.blur()}async click(){await this.updateComplete,k(this,q)!==null?k(this,L)[k(this,q)]?.click():F(this,B,ai).call(this,1,!1)?.click()}getFormElement(){if(k(this,L)&&k(this,q))return k(this,L)[k(this,q)]}render(){return l` <slot @slotchange=${F(this,B,nc)}></slot> `}};q=new WeakMap,L=new WeakMap,ha=new WeakMap,da=new WeakMap,xs=new WeakMap,$s=new WeakMap,pa=new WeakMap,B=new WeakSet,nc=function(e){if(e.stopPropagation(),k(this,L)?.forEach(i=>{i.removeEventListener(tr.CHANGE,k(this,$s)),i.removeEventListener("blur",k(this,xs))}),ws(this,q,null),ws(this,L,e.target.assignedElements({flatten:!0}).filter(i=>i instanceof Oe)),k(this,L).length===0)return;k(this,L).forEach(i=>{i.addEventListener(tr.CHANGE,k(this,$s)),i.addEventListener("blur",k(this,xs))}),F(this,B,va).call(this,this.name),this.disabled&&F(this,B,ba).call(this,!0),this.readonly&&F(this,B,ga).call(this,!0);const t=k(this,L).filter(i=>i.checked===!0);if(t.length>1&&(k(this,L).forEach(i=>{i.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),t.length===1){const i=t[0];this.value=i.value,ws(this,q,k(this,L).indexOf(i))}},va=function(e){k(this,L)?.forEach(t=>t.name=e)},fa=function(e){const t=[];k(this,L).forEach((i,o)=>{i.value===e?(i.checked=!0,i.makeFocusable(),ws(this,q,o)):(i.checked=!1,t.push(i))}),k(this,q)!==null&&t.forEach(i=>i.makeUnfocusable())},ba=function(e){k(this,L)?.forEach(t=>t.disabled=e)},ga=function(e){k(this,L)?.forEach(t=>t.readonly=e)},ai=function(e=1,t=!0){if(!k(this,L)||k(this,L).length===0)return null;const i=k(this,L).length;let o=k(this,q)??0;for(let r=0;r<i+1;r++){if(!t||r>0){const s=k(this,L)[o];if(!s.disabled&&!s.readonly)return s}o=(o+e+i)%i}return null},ac=function(){this.value=F(this,B,ai).call(this,-1)?.value??"",k(this,L)[k(this,q)??0]?.focus(),F(this,B,jr).call(this)},lc=function(){this.value=F(this,B,ai).call(this)?.value??"",k(this,L)[k(this,q)??0]?.focus(),F(this,B,jr).call(this)},jr=function(){this.pristine=!1,this.dispatchEvent(new ys(ys.CHANGE))},li.formAssociated=!0,li.styles=[b`
|
|
4767
4922
|
:host {
|
|
4768
4923
|
display: inline-block;
|
|
4769
4924
|
padding-right: 3px;
|
|
@@ -4774,9 +4929,13 @@
|
|
|
4774
4929
|
:host(:not([pristine]):invalid),
|
|
4775
4930
|
/* polyfill support */
|
|
4776
4931
|
:host(:not([pristine])[internals-invalid]) {
|
|
4777
|
-
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
4932
|
+
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
4933
|
+
191,
|
|
4934
|
+
33,
|
|
4935
|
+
78
|
|
4936
|
+
));
|
|
4778
4937
|
}
|
|
4779
|
-
`],
|
|
4938
|
+
`],ua([a({type:Boolean,reflect:!0})],li.prototype,"disabled",2),ua([a({type:Boolean,reflect:!0})],li.prototype,"readonly",2),li=ua([v("uui-radio-group")],li);class Ge extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Ge.INPUT="input",Ge.CHANGE="change";var Wb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,uc=e=>{throw TypeError(e)},j=(e,t,i,o)=>{for(var r=o>1?void 0:o?Fb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Wb(t,i,r),r},cc=(e,t,i)=>t.has(e)||uc("Cannot "+i),Gb=(e,t,i)=>(cc(e,t,"read from private field"),i?i.call(e):t.get(e)),hc=(e,t,i)=>t.has(e)?uc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ir=(e,t,i)=>(cc(e,t,"access private method"),i),Ut,ui,ma;const _a={TOP:3,CENTER:2},Rr=18,rr=3,ct=12,qb=24,ya=e=>{const t=e.toString().indexOf(".");return t>=0?e.toString().length-t-1:0};let T=class extends Ne(g,""){constructor(){super(),hc(this,Ut),this.disabled=!1,this.readonly=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,hc(this,ma,e=>{e.key=="Enter"&&this.submit()}),this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const i=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-i),r=Math.abs(this._highInputValue-i);o<r?this.setValueLow(i):this.setValueHigh(i)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled||this.readonly)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const i=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-i),r=Math.abs(this._highInputValue-i);o<r?this.setValueLow(i):this.setValueHigh(i)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keydown",Gb(this,ma)),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{this._trackWidth=this._outerTrack?.offsetWidth})}get min(){return this._min}set min(e){this._min=e,ir(this,Ut,ui).call(this)}get max(){return this._max}set max(e){this._max=e,ir(this,Ut,ui).call(this)}get step(){return this._step}set step(e){this._step=e,ir(this,Ut,ui).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,ir(this,Ut,ui).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,ir(this,Ut,ui).call(this)}get value(){return super.value}set value(e){super.value=e,ir(this,Ut,ui).call(this)}setValueLow(e){e=M(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=M(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,i){if(i){const o=this.startPoint.high-this.startPoint.low;e=M(e,this.min,this.max-o),t=M(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}async focus(){await this.updateComplete,this.getFormElement().focus()}async blur(){await this.updateComplete,this.getFormElement().blur()}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const t=this._minGap;this._highInputValue-t<this._min?(this.setValueHigh(this._lowInputValue+t),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-t),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,i=this._highInputValue-this._min,o=t/e*100,r=100-i/e*100;this._lowValuePercentStart=M(o,0,100),this._highValuePercentEnd=M(r,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-ct)/(this._trackWidth-ct*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,i=e-this.startPoint.mouse,o=this._max-this._min,r=i/(t+ct*2),s=Math.round(r*o/this._step)*this._step,n=this.startPoint.low+s,u=this.startPoint.high+s;this.setValue(n,u,!0),this.dispatchEvent(new Ge(Ge.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new Ge(Ge.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new Ge(Ge.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new Ge(Ge.CHANGE))}render(){return l`
|
|
4780
4939
|
<div id="range-slider">
|
|
4781
4940
|
${this._renderNativeInputs()}
|
|
4782
4941
|
<div id="inner-track">
|
|
@@ -4793,23 +4952,23 @@
|
|
|
4793
4952
|
`}_renderThumbValues(){return l`<div class="thumb-values">
|
|
4794
4953
|
<span
|
|
4795
4954
|
><span
|
|
4796
|
-
>${this._lowInputValue.toFixed(
|
|
4955
|
+
>${this._lowInputValue.toFixed(ya(this._step))}</span
|
|
4797
4956
|
></span
|
|
4798
4957
|
>
|
|
4799
4958
|
<span
|
|
4800
4959
|
><span
|
|
4801
|
-
>${this._highInputValue.toFixed(
|
|
4960
|
+
>${this._highInputValue.toFixed(ya(this._step))}</span
|
|
4802
4961
|
></span
|
|
4803
4962
|
>
|
|
4804
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-
|
|
4963
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-ct*2)/e;if(t<qb||e%1!==0)return;let i=0;const o=new Array(e+1).fill(t).map(r=>r*i++);return l`<div class="step-wrapper">
|
|
4805
4964
|
<svg height="100%" width="100%">
|
|
4806
|
-
<rect x="9" y="9" height="${
|
|
4965
|
+
<rect x="9" y="9" height="${rr}" rx="2" />
|
|
4807
4966
|
${this._renderStepCircles(o)}
|
|
4808
4967
|
</svg>
|
|
4809
4968
|
${this._renderStepValues(e)}
|
|
4810
|
-
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const i=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(
|
|
4969
|
+
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const i=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(ya(this._step)));return l`<div class="step-values">
|
|
4811
4970
|
${i.map(o=>l`<span><span>${o}</span></span>`)}
|
|
4812
|
-
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return m`${e.map(i=>{const o=i+
|
|
4971
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return m`${e.map(i=>{const o=i+ct,r=this._lowInputValue-this._min,s=this._highInputValue-this._min;return o/t>=r&&o/t<=s?m`<circle class="track-step filled" cx="${o}" cy="${rr*2}" r="4.5" />`:m`<circle class="track-step regular" cx="${o}" cy="${rr*2}" r="4.5" />`})}`}_renderNativeInputs(){return l` <div class="native-wrapper">
|
|
4813
4972
|
<input
|
|
4814
4973
|
id="inputLow"
|
|
4815
4974
|
class="${this._movement?"focus":""}"
|
|
@@ -4834,16 +4993,24 @@
|
|
|
4834
4993
|
?disabled="${this.disabled||this.readonly}"
|
|
4835
4994
|
@input=${this._onHighInput}
|
|
4836
4995
|
@change=${this._onHighChange} />
|
|
4837
|
-
</div>`}};
|
|
4996
|
+
</div>`}};Ut=new WeakSet,ui=function(){const e=this.value.split(",");let t=Number(e[0])||0,i=Number(e[1])||0;i=M(i,this._min,this._max),t=this._min+Math.round((t-this._min)/this._step)*this._step,i=this._min+Math.round((i-this._min)/this._step)*this._step,this._lowInputValue=M(t,this._min,this._minGap?i-this._minGap:i-this._step),this._highInputValue=M(i,this._minGap?this._lowInputValue+this._minGap:this._lowInputValue+this._step,Math.min(this._maxGap?t+this._maxGap:this._max,this._max)),this._updateInnerColor(),this.requestUpdate()},ma=new WeakMap,T.formAssociated=!0,T.styles=[b`
|
|
4838
4997
|
:host {
|
|
4839
4998
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
4840
|
-
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
4999
|
+
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
5000
|
+
70,
|
|
5001
|
+
86,
|
|
5002
|
+
200
|
|
5003
|
+
));
|
|
4841
5004
|
--color-focus: var(--uui-color-focus,#3879ff);
|
|
4842
5005
|
min-height: 30px;
|
|
4843
5006
|
}
|
|
4844
5007
|
|
|
4845
5008
|
:host([error]) {
|
|
4846
|
-
--color-interactive: var(--uui-color-invalid-standalone,rgb(
|
|
5009
|
+
--color-interactive: var(--uui-color-invalid-standalone,rgb(
|
|
5010
|
+
191,
|
|
5011
|
+
33,
|
|
5012
|
+
78
|
|
5013
|
+
));
|
|
4847
5014
|
--color-hover: var(--uui-color-invalid,#d42054);
|
|
4848
5015
|
}
|
|
4849
5016
|
|
|
@@ -4862,8 +5029,8 @@
|
|
|
4862
5029
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
4863
5030
|
position: absolute;
|
|
4864
5031
|
height: 3px;
|
|
4865
|
-
left: ${
|
|
4866
|
-
right: ${
|
|
5032
|
+
left: ${ct}px; /* Match TRACK_MARGIN */
|
|
5033
|
+
right: ${ct}px; /* Match TRACK_MARGIN */
|
|
4867
5034
|
}
|
|
4868
5035
|
|
|
4869
5036
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -4877,10 +5044,10 @@
|
|
|
4877
5044
|
display: flex;
|
|
4878
5045
|
flex-direction: column;
|
|
4879
5046
|
justify-content: center;
|
|
4880
|
-
height: ${
|
|
5047
|
+
height: ${Rr}px;
|
|
4881
5048
|
cursor: grab;
|
|
4882
5049
|
user-select: none;
|
|
4883
|
-
z-index: ${
|
|
5050
|
+
z-index: ${_a.CENTER};
|
|
4884
5051
|
}
|
|
4885
5052
|
|
|
4886
5053
|
:host([disabled]) #inner-color-thumb,
|
|
@@ -4904,16 +5071,16 @@
|
|
|
4904
5071
|
}
|
|
4905
5072
|
|
|
4906
5073
|
:host(:not([readonly])) #inner-color-thumb:hover .color {
|
|
4907
|
-
height: ${
|
|
5074
|
+
height: ${rr*2}px;
|
|
4908
5075
|
background-color: var(--color-hover);
|
|
4909
|
-
transform: translateY(-${
|
|
5076
|
+
transform: translateY(-${rr/2}px);
|
|
4910
5077
|
}
|
|
4911
5078
|
|
|
4912
5079
|
.color {
|
|
4913
5080
|
user-select: none;
|
|
4914
5081
|
position: absolute;
|
|
4915
5082
|
inset-inline: 0;
|
|
4916
|
-
height: ${
|
|
5083
|
+
height: ${rr}px;
|
|
4917
5084
|
top: 50%;
|
|
4918
5085
|
transform: translateY(0);
|
|
4919
5086
|
background-color: var(--color-interactive);
|
|
@@ -4921,16 +5088,24 @@
|
|
|
4921
5088
|
}
|
|
4922
5089
|
|
|
4923
5090
|
:host([error]) .color {
|
|
4924
|
-
background-color: var(--uui-color-invalid-standalone,rgb(
|
|
5091
|
+
background-color: var(--uui-color-invalid-standalone,rgb(
|
|
5092
|
+
191,
|
|
5093
|
+
33,
|
|
5094
|
+
78
|
|
5095
|
+
));
|
|
4925
5096
|
}
|
|
4926
5097
|
:host([error]) #inner-color-thumb:hover ~ .color,
|
|
4927
5098
|
:host([error]) #inner-color-thumb:focus ~ .color {
|
|
4928
|
-
background-color: var(--uui-color-invalid-emphasis,rgb(
|
|
5099
|
+
background-color: var(--uui-color-invalid-emphasis,rgb(
|
|
5100
|
+
226,
|
|
5101
|
+
60,
|
|
5102
|
+
107
|
|
5103
|
+
));
|
|
4929
5104
|
}
|
|
4930
5105
|
|
|
4931
5106
|
/** Steps */
|
|
4932
5107
|
.step-wrapper {
|
|
4933
|
-
margin: 0 ${-1*
|
|
5108
|
+
margin: 0 ${-1*ct}px;
|
|
4934
5109
|
height: 11px;
|
|
4935
5110
|
position: absolute;
|
|
4936
5111
|
left: 0;
|
|
@@ -4953,7 +5128,11 @@
|
|
|
4953
5128
|
}
|
|
4954
5129
|
|
|
4955
5130
|
:host([error]) .track-step.filled {
|
|
4956
|
-
fill: var(--uui-color-invalid-emphasis,rgb(
|
|
5131
|
+
fill: var(--uui-color-invalid-emphasis,rgb(
|
|
5132
|
+
226,
|
|
5133
|
+
60,
|
|
5134
|
+
107
|
|
5135
|
+
));
|
|
4957
5136
|
}
|
|
4958
5137
|
|
|
4959
5138
|
:host #inner-color-thumb.active ~ .step-wrapper .track-step.filled,
|
|
@@ -4969,7 +5148,7 @@
|
|
|
4969
5148
|
|
|
4970
5149
|
.step-values {
|
|
4971
5150
|
box-sizing: border-box;
|
|
4972
|
-
margin: 0 ${
|
|
5151
|
+
margin: 0 ${ct}px; /* Match TRACK_MARGIN */
|
|
4973
5152
|
display: flex;
|
|
4974
5153
|
justify-content: space-between;
|
|
4975
5154
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -5051,9 +5230,9 @@
|
|
|
5051
5230
|
pointer-events: all;
|
|
5052
5231
|
cursor: grab;
|
|
5053
5232
|
position: relative;
|
|
5054
|
-
z-index: ${
|
|
5055
|
-
width: ${
|
|
5056
|
-
height: ${
|
|
5233
|
+
z-index: ${_a.TOP};
|
|
5234
|
+
width: ${Rr}px;
|
|
5235
|
+
height: ${Rr}px;
|
|
5057
5236
|
border-radius: 24px;
|
|
5058
5237
|
border: none;
|
|
5059
5238
|
background-color: var(--color-interactive);
|
|
@@ -5097,9 +5276,9 @@
|
|
|
5097
5276
|
pointer-events: all;
|
|
5098
5277
|
cursor: grab;
|
|
5099
5278
|
position: relative;
|
|
5100
|
-
z-index: ${
|
|
5101
|
-
width: ${
|
|
5102
|
-
height: ${
|
|
5279
|
+
z-index: ${_a.TOP};
|
|
5280
|
+
width: ${Rr}px;
|
|
5281
|
+
height: ${Rr}px;
|
|
5103
5282
|
border-radius: 24px;
|
|
5104
5283
|
border: none;
|
|
5105
5284
|
background-color: var(--color-interactive);
|
|
@@ -5134,7 +5313,7 @@
|
|
|
5134
5313
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
5135
5314
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
5136
5315
|
}
|
|
5137
|
-
`],j([a({type:String})],
|
|
5316
|
+
`],j([a({type:String})],T.prototype,"label",2),j([a({type:Boolean,reflect:!0})],T.prototype,"disabled",2),j([a({type:Boolean,reflect:!0})],T.prototype,"readonly",2),j([a({type:Number})],T.prototype,"min",1),j([a({type:Number})],T.prototype,"max",1),j([a({type:Boolean,attribute:"hide-step-values"})],T.prototype,"hideStepValues",2),j([a({type:Number})],T.prototype,"step",1),j([a({type:Number,attribute:"min-gap"})],T.prototype,"minGap",1),j([a({type:Number,attribute:"max-gap"})],T.prototype,"maxGap",1),j([a({type:String})],T.prototype,"value",1),j([_()],T.prototype,"_movement",2),j([_()],T.prototype,"_lowInputValue",2),j([_()],T.prototype,"_highInputValue",2),j([_()],T.prototype,"_trackWidth",2),j([_()],T.prototype,"_lowValuePercentStart",2),j([_()],T.prototype,"_highValuePercentEnd",2),j([O("#range-slider")],T.prototype,"_outerTrack",2),j([O("#inputLow")],T.prototype,"_inputLow",2),j([O("#inputHigh")],T.prototype,"_inputHigh",2),j([O(".color")],T.prototype,"_innerColor",2),j([O("#inner-color-thumb")],T.prototype,"_innerColorThumb",2),T=j([v("uui-range-slider")],T);var Kb=Object.getOwnPropertyDescriptor,Xb=(e,t,i,o)=>{for(var r=o>1?void 0:o?Kb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let ks=class extends g{render(){return l`<slot></slot>`}};ks.styles=[b`
|
|
5138
5317
|
:host {
|
|
5139
5318
|
display: block;
|
|
5140
5319
|
}
|
|
@@ -5150,13 +5329,14 @@
|
|
|
5150
5329
|
right: 0;
|
|
5151
5330
|
border-top: 1px solid var(--uui-color-border,#d8d7d9);
|
|
5152
5331
|
}
|
|
5153
|
-
`],
|
|
5332
|
+
`],ks=Xb([v("uui-ref-list")],ks);class or extends A{}or.OPEN="open";var Yb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,Cs=(e,t,i,o)=>{for(var r=o>1?void 0:o?Zb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Yb(t,i,r),r};let ht=class extends ko(yi(g)){constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new or(or.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new or(or.OPEN)))}};ht.styles=[b`
|
|
5154
5333
|
:host {
|
|
5155
5334
|
position: relative;
|
|
5156
5335
|
display: flex;
|
|
5157
5336
|
justify-content: space-between;
|
|
5158
5337
|
align-items: center;
|
|
5159
5338
|
width: 100%;
|
|
5339
|
+
font-size: var(--uui-font-size);
|
|
5160
5340
|
|
|
5161
5341
|
box-sizing: border-box;
|
|
5162
5342
|
border-radius: var(--uui-border-radius,3px);
|
|
@@ -5312,7 +5492,11 @@
|
|
|
5312
5492
|
}
|
|
5313
5493
|
|
|
5314
5494
|
:host([standalone][disabled]) {
|
|
5315
|
-
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
5495
|
+
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
5496
|
+
226,
|
|
5497
|
+
226,
|
|
5498
|
+
226
|
|
5499
|
+
));
|
|
5316
5500
|
}
|
|
5317
5501
|
|
|
5318
5502
|
slot[name='tag'] {
|
|
@@ -5320,7 +5504,7 @@
|
|
|
5320
5504
|
justify-content: flex-end;
|
|
5321
5505
|
align-items: center;
|
|
5322
5506
|
}
|
|
5323
|
-
`],
|
|
5507
|
+
`],Cs([a({type:Boolean,reflect:!0})],ht.prototype,"disabled",2),Cs([a({type:Boolean,reflect:!0})],ht.prototype,"readonly",2),Cs([a({type:Boolean,reflect:!0})],ht.prototype,"error",2),ht=Cs([v("uui-ref")],ht);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,dc=e=>{throw TypeError(e)},ci=(e,t,i,o)=>{for(var r=o>1?void 0:o?Jb(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Qb(t,i,r),r},e0=(e,t,i)=>t.has(e)||dc("Cannot "+i),t0=(e,t,i)=>t.has(e)?dc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),zt=(e,t,i)=>(e0(e,t,"access private method"),i),qe,pc,vc,Es,fc,bc,gc;let R=class extends ht{constructor(){super(...arguments),t0(this,qe),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
5324
5508
|
xmlns="http://www.w3.org/2000/svg"
|
|
5325
5509
|
viewBox="0 0 24 24"
|
|
5326
5510
|
fill="none"
|
|
@@ -5334,33 +5518,33 @@
|
|
|
5334
5518
|
</svg>`}connectedCallback(){super.connectedCallback(),x(this,"uui-icon")}renderDetail(){return l`<small id="detail"
|
|
5335
5519
|
>${this.detail}<slot name="detail"></slot
|
|
5336
5520
|
></small>`}render(){return l`
|
|
5337
|
-
${
|
|
5521
|
+
${zt(this,qe,gc).call(this)}
|
|
5338
5522
|
<!-- Select border must be right after #open-part -->
|
|
5339
5523
|
<div id="select-border"></div>
|
|
5340
5524
|
|
|
5341
5525
|
<slot></slot>
|
|
5342
5526
|
<slot name="tag" id="tag-container"></slot>
|
|
5343
5527
|
<slot name="actions" id="actions-container"></slot>
|
|
5344
|
-
`}};
|
|
5528
|
+
`}};qe=new WeakSet,pc=function(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},vc=function(){return l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Es=function(){return l`
|
|
5345
5529
|
<span id="content" class="uui-text">
|
|
5346
5530
|
<span id="icon">
|
|
5347
|
-
<slot name="icon" @slotchange=${
|
|
5348
|
-
${this._iconSlotHasContent===!1?
|
|
5531
|
+
<slot name="icon" @slotchange=${zt(this,qe,pc)}></slot>
|
|
5532
|
+
${this._iconSlotHasContent===!1?zt(this,qe,vc).call(this):""}
|
|
5349
5533
|
</span>
|
|
5350
5534
|
<div id="info">
|
|
5351
5535
|
<div id="name">${this.name}<slot name="name"></slot></div>
|
|
5352
5536
|
${this.renderDetail()}
|
|
5353
5537
|
</div>
|
|
5354
5538
|
</span>
|
|
5355
|
-
`},
|
|
5539
|
+
`},fc=function(){return l`<a
|
|
5356
5540
|
id="open-part"
|
|
5357
5541
|
class="uui-text"
|
|
5358
5542
|
tabindex=${this.disabled?E:"0"}
|
|
5359
5543
|
href=${w(this.disabled?void 0:this.href)}
|
|
5360
5544
|
target=${w(this.target||void 0)}
|
|
5361
5545
|
rel=${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
5362
|
-
${
|
|
5363
|
-
</a>`},
|
|
5546
|
+
${zt(this,qe,Es).call(this)}
|
|
5547
|
+
</a>`},bc=function(){return l`
|
|
5364
5548
|
<button
|
|
5365
5549
|
type="button"
|
|
5366
5550
|
id="open-part"
|
|
@@ -5369,9 +5553,9 @@
|
|
|
5369
5553
|
@click=${this.handleOpenClick}
|
|
5370
5554
|
@keydown=${this.handleOpenKeydown}
|
|
5371
5555
|
?disabled=${this.disabled}>
|
|
5372
|
-
${
|
|
5556
|
+
${zt(this,qe,Es).call(this)}
|
|
5373
5557
|
</button>
|
|
5374
|
-
`},
|
|
5558
|
+
`},gc=function(){return this.readonly?l`${zt(this,qe,Es).call(this)}`:this.href?zt(this,qe,fc).call(this):zt(this,qe,bc).call(this)},R.styles=[...ht.styles,b`
|
|
5375
5559
|
:host {
|
|
5376
5560
|
min-width: 250px;
|
|
5377
5561
|
padding: 1px;
|
|
@@ -5379,10 +5563,10 @@
|
|
|
5379
5563
|
|
|
5380
5564
|
#content {
|
|
5381
5565
|
display: flex;
|
|
5566
|
+
flex-grow: 1;
|
|
5382
5567
|
align-items: center;
|
|
5383
|
-
justify-content: center;
|
|
5384
5568
|
line-height: 1.2em;
|
|
5385
|
-
padding: calc(var(--uui-size-
|
|
5569
|
+
padding: calc(var(--uui-size-3,9px));
|
|
5386
5570
|
}
|
|
5387
5571
|
|
|
5388
5572
|
#open-part {
|
|
@@ -5408,10 +5592,12 @@
|
|
|
5408
5592
|
justify-content: center;
|
|
5409
5593
|
height: 100%;
|
|
5410
5594
|
padding-left: var(--uui-size-2,6px);
|
|
5595
|
+
margin-top: 1px;
|
|
5411
5596
|
}
|
|
5412
5597
|
|
|
5413
5598
|
#detail {
|
|
5414
5599
|
opacity: 0.6;
|
|
5600
|
+
line-height: 1.2em;
|
|
5415
5601
|
}
|
|
5416
5602
|
|
|
5417
5603
|
:host([selectable]) #open-part {
|
|
@@ -5444,17 +5630,17 @@
|
|
|
5444
5630
|
:host([disabled]) #detail {
|
|
5445
5631
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5446
5632
|
}
|
|
5447
|
-
`],
|
|
5633
|
+
`],ci([a({type:String})],R.prototype,"name",2),ci([a({type:String})],R.prototype,"detail",2),ci([a({type:String})],R.prototype,"href",2),ci([a({type:String})],R.prototype,"target",2),ci([a({type:String})],R.prototype,"rel",2),ci([_()],R.prototype,"_iconSlotHasContent",2),R=ci([v("uui-ref-node")],R);var i0=Object.defineProperty,r0=Object.getOwnPropertyDescriptor,mc=(e,t,i,o)=>{for(var r=o>1?void 0:o?r0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&i0(t,i,r),r};let Wr=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),l`<small id="detail"
|
|
5448
5634
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5449
|
-
></small>`}};
|
|
5635
|
+
></small>`}};Wr.styles=[...R.styles],mc([a({type:String})],Wr.prototype,"alias",2),Wr=mc([v("uui-ref-node-data-type")],Wr);var o0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,_c=(e,t,i,o)=>{for(var r=o>1?void 0:o?s0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&o0(t,i,r),r};let Fr=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),l`<small id="detail"
|
|
5450
5636
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5451
|
-
></small>`}};
|
|
5637
|
+
></small>`}};Fr.styles=[...R.styles],_c([a({type:String})],Fr.prototype,"alias",2),Fr=_c([v("uui-ref-node-document-type")],Fr);var n0=Object.getOwnPropertyDescriptor,a0=(e,t,i,o)=>{for(var r=o>1?void 0:o?n0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Ps=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}};Ps.styles=[...R.styles],Ps=a0([v("uui-ref-node-form")],Ps);var l0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,yc=(e,t,i,o)=>{for(var r=o>1?void 0:o?u0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&l0(t,i,r),r};let Gr=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),l`<small id="detail"
|
|
5452
5638
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5453
|
-
></small>`}};
|
|
5639
|
+
></small>`}};Gr.styles=[...R.styles],yc([a({type:String,attribute:"group-name"})],Gr.prototype,"groupName",2),Gr=yc([v("uui-ref-node-member")],Gr);var c0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,wa=(e,t,i,o)=>{for(var r=o>1?void 0:o?h0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&c0(t,i,r),r};let sr=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),l`<small id="detail"
|
|
5454
5640
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5455
|
-
></small>`}};
|
|
5641
|
+
></small>`}};sr.styles=[...R.styles],wa([a({type:String})],sr.prototype,"version",2),wa([a({type:String})],sr.prototype,"author",2),sr=wa([v("uui-ref-node-package")],sr);var d0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,wc=(e,t,i,o)=>{for(var r=o>1?void 0:o?p0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&d0(t,i,r),r};let qr=class extends R{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),l`<small id="detail"
|
|
5456
5642
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5457
|
-
></small>`}};
|
|
5643
|
+
></small>`}};qr.styles=[...R.styles],wc([a({type:String,attribute:"group-name"})],qr.prototype,"groupName",2),qr=wc([v("uui-ref-node-user")],qr);var v0=Object.defineProperty,f0=Object.getOwnPropertyDescriptor,xc=(e,t,i,o)=>{for(var r=o>1?void 0:o?f0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&v0(t,i,r),r};let Kr=class extends g{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return l`<slot></slot>`}};Kr.styles=[b`
|
|
5458
5644
|
:host {
|
|
5459
5645
|
display: block;
|
|
5460
5646
|
scrollbar-width: thin;
|
|
@@ -5480,7 +5666,7 @@
|
|
|
5480
5666
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5481
5667
|
border-radius: 3px;
|
|
5482
5668
|
}
|
|
5483
|
-
`],
|
|
5669
|
+
`],xc([a({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],Kr.prototype,"enforceScroll",2),Kr=xc([v("uui-scroll-container")],Kr);class Ss extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}Ss.CHANGE="change";var b0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,De=(e,t,i,o)=>{for(var r=o>1?void 0:o?g0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&b0(t,i,r),r};let fe=class extends Ne(g,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(i=>i.value);const t=this.options.find(i=>i.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new Ss(Ss.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,i,o){return l`<option
|
|
5484
5670
|
value="${t}"
|
|
5485
5671
|
?selected=${i}
|
|
5486
5672
|
?disabled=${o}>
|
|
@@ -5501,7 +5687,7 @@
|
|
|
5501
5687
|
<option disabled selected value="" hidden>${this.placeholder}</option>
|
|
5502
5688
|
${this._renderGrouped()}
|
|
5503
5689
|
${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}
|
|
5504
|
-
</select>`}};
|
|
5690
|
+
</select>`}};fe.styles=[b`
|
|
5505
5691
|
:host {
|
|
5506
5692
|
display: inline-block;
|
|
5507
5693
|
position: relative;
|
|
@@ -5565,13 +5751,21 @@
|
|
|
5565
5751
|
}
|
|
5566
5752
|
|
|
5567
5753
|
:host([error]) #native {
|
|
5568
|
-
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
5754
|
+
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
5755
|
+
191,
|
|
5756
|
+
33,
|
|
5757
|
+
78
|
|
5758
|
+
));
|
|
5569
5759
|
}
|
|
5570
5760
|
|
|
5571
5761
|
:host([error]) #native[disabled] {
|
|
5572
|
-
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
5762
|
+
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
5763
|
+
191,
|
|
5764
|
+
33,
|
|
5765
|
+
78
|
|
5766
|
+
));
|
|
5573
5767
|
}
|
|
5574
|
-
`],
|
|
5768
|
+
`],De([a({type:String})],fe.prototype,"label",2),De([a()],fe.prototype,"placeholder",2),De([a({type:Boolean,reflect:!0})],fe.prototype,"disabled",2),De([a({type:Boolean,reflect:!0})],fe.prototype,"readonly",2),De([a({type:Boolean,reflect:!0})],fe.prototype,"error",2),De([a({type:Array,attribute:!1})],fe.prototype,"options",2),De([_()],fe.prototype,"_groups",2),De([a()],fe.prototype,"disabledGroups",2),De([_()],fe.prototype,"_disabledGroups",2),De([O("#native")],fe.prototype,"_input",2),fe=De([v("uui-select")],fe);const m0=b`
|
|
5575
5769
|
input[type='range'] {
|
|
5576
5770
|
left: 0;
|
|
5577
5771
|
position: absolute;
|
|
@@ -5678,12 +5872,12 @@
|
|
|
5678
5872
|
input[type='range']:focus::-ms-fill-upper {
|
|
5679
5873
|
background: transparent;
|
|
5680
5874
|
}
|
|
5681
|
-
`;class
|
|
5682
|
-
${this._steps.map(e=>{if(this._stepWidth>=
|
|
5875
|
+
`;class hi extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}hi.INPUT="input",hi.CHANGE="change";var _0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,$c=e=>{throw TypeError(e)},le=(e,t,i,o)=>{for(var r=o>1?void 0:o?y0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&_0(t,i,r),r},xa=(e,t,i)=>t.has(e)||$c("Cannot "+i),kc=(e,t,i)=>(xa(e,t,"read from private field"),i?i.call(e):t.get(e)),$a=(e,t,i)=>t.has(e)?$c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Cc=(e,t,i,o)=>(xa(e,t,"write to private field"),t.set(e,i),i),w0=(e,t,i)=>(xa(e,t,"access private method"),i),Os,Is,ka,Ec;const Xr=12,Pc=24,x0=(e,t,i)=>Array.from({length:(t-e)/i+1},(o,r)=>e+r*i),$0=e=>{const t=e.toString().indexOf(".");return t>=0?e.toString().length-t-1:0};let K=class extends Ne(g,""){constructor(){super(),$a(this,ka),$a(this,Os,0),this.hideStepValues=!1,this.hideValueLabel=!1,this.min=0,this.max=100,$a(this,Is,1),this.disabled=!1,this.readonly=!1,this._stepWidth=0,this.onWindowResize=()=>{this._stepWidth=this._calculateStepWidth()},this._steps=[],this._sliderPosition="0%",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",w0(this,ka,Ec))}get step(){return kc(this,Is)}set step(e){Cc(this,Is,e),Cc(this,Os,(e.toString().split(".")[1]||[]).length)}get value(){return super.value}set value(e){if(e instanceof File)return;const t=super.value;let i=e?parseFloat(e):0;i=Math.min(Math.max(i,this.min),this.max),this.step>0&&(i=Math.round(i/this.step)*this.step),super.value=i.toFixed(kc(this,Os)).toString(),this._calculateSliderPosition(),this.requestUpdate("value",t)}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.label||console.warn(this.tagName+" needs a `label`",this)}disconnectedCallback(){window.removeEventListener("resize",this.onWindowResize),super.disconnectedCallback()}firstUpdated(){this._calculateSliderPosition(),this._updateSteps()}updated(e){super.updated(e),(e.get("max")||e.get("min")||e.get("step"))&&(this.value=this.value,this._updateSteps())}_updateSteps(){this._steps=x0(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-Xr*2)/(this._steps.length-1)}_calculateSliderPosition(){const e=(parseFloat(super.value||"0")-this.min)/(this.max-this.min);this._sliderPosition=`${Math.floor(e*1e5)/1e3}%`}_onInput(e){e.stopPropagation(),this.value=this._input.value,this.dispatchEvent(new hi(hi.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new hi(hi.CHANGE))}renderTrackSteps(){return m`
|
|
5876
|
+
${this._steps.map(e=>{if(this._stepWidth>=Pc){const t=Math.round(Xr+this._stepWidth*this._steps.indexOf(e));return m`<circle class="track-step" cx="${t}" cy="50%" r="4.5" />`}return m``})}
|
|
5683
5877
|
`}renderStepValues(){return this.hideStepValues?E:l`<div id="step-values">
|
|
5684
5878
|
${this._steps.map(e=>l` <span
|
|
5685
5879
|
><span>
|
|
5686
|
-
${this._steps.length<=20&&this._stepWidth>=
|
|
5880
|
+
${this._steps.length<=20&&this._stepWidth>=Pc?e.toFixed($0(this.step)):E}
|
|
5687
5881
|
</span></span
|
|
5688
5882
|
>`)}
|
|
5689
5883
|
</div>`}render(){return l`
|
|
@@ -5706,13 +5900,13 @@
|
|
|
5706
5900
|
</svg>
|
|
5707
5901
|
|
|
5708
5902
|
<div id="track-inner" aria-hidden="true">
|
|
5709
|
-
<div id="thumb" style=${
|
|
5903
|
+
<div id="thumb" style=${Qe({left:this._sliderPosition})}>
|
|
5710
5904
|
${this.hideValueLabel?null:l`<div id="thumb-label">${this.value}</div>`}
|
|
5711
5905
|
</div>
|
|
5712
5906
|
</div>
|
|
5713
5907
|
</div>
|
|
5714
5908
|
${this.renderStepValues()}
|
|
5715
|
-
`}};
|
|
5909
|
+
`}};Os=new WeakMap,Is=new WeakMap,ka=new WeakSet,Ec=function(e){e.key=="Enter"&&this.submit()},K.formAssociated=!0,K.styles=[Bd,m0,b`
|
|
5716
5910
|
:host {
|
|
5717
5911
|
display: inline-block;
|
|
5718
5912
|
width: 100%;
|
|
@@ -5761,8 +5955,8 @@
|
|
|
5761
5955
|
|
|
5762
5956
|
#track-inner {
|
|
5763
5957
|
position: absolute;
|
|
5764
|
-
left: ${
|
|
5765
|
-
right: ${
|
|
5958
|
+
left: ${Xr}px; /* Match TRACK_MARGIN */
|
|
5959
|
+
right: ${Xr}px; /* Match TRACK_MARGIN */
|
|
5766
5960
|
}
|
|
5767
5961
|
|
|
5768
5962
|
#thumb {
|
|
@@ -5785,7 +5979,11 @@
|
|
|
5785
5979
|
}
|
|
5786
5980
|
:host([disabled]) #thumb {
|
|
5787
5981
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
5788
|
-
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
5982
|
+
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
5983
|
+
226,
|
|
5984
|
+
226,
|
|
5985
|
+
226
|
|
5986
|
+
));
|
|
5789
5987
|
}
|
|
5790
5988
|
|
|
5791
5989
|
#thumb:after {
|
|
@@ -5820,7 +6018,7 @@
|
|
|
5820
6018
|
}
|
|
5821
6019
|
|
|
5822
6020
|
#step-values {
|
|
5823
|
-
margin: 0 ${
|
|
6021
|
+
margin: 0 ${Xr}px; /* Match TRACK_MARGIN */
|
|
5824
6022
|
margin-top: 6px;
|
|
5825
6023
|
display: flex;
|
|
5826
6024
|
align-items: flex-end;
|
|
@@ -5846,7 +6044,11 @@
|
|
|
5846
6044
|
}
|
|
5847
6045
|
|
|
5848
6046
|
:host(:not([pristine]):invalid) #thumb {
|
|
5849
|
-
border-color: var(--uui-color-invalid-standalone,rgb(
|
|
6047
|
+
border-color: var(--uui-color-invalid-standalone,rgb(
|
|
6048
|
+
191,
|
|
6049
|
+
33,
|
|
6050
|
+
78
|
|
6051
|
+
));
|
|
5850
6052
|
}
|
|
5851
6053
|
:host(:not([pristine]):invalid) #thumb:after {
|
|
5852
6054
|
background-color: var(--uui-color-invalid,#d42054);
|
|
@@ -5855,13 +6057,17 @@
|
|
|
5855
6057
|
// readonly
|
|
5856
6058
|
:host([readonly]) #thumb {
|
|
5857
6059
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
5858
|
-
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
6060
|
+
border-color: var(--uui-color-disabled-standalone,rgb(
|
|
6061
|
+
226,
|
|
6062
|
+
226,
|
|
6063
|
+
226
|
|
6064
|
+
));
|
|
5859
6065
|
}
|
|
5860
6066
|
|
|
5861
6067
|
:host([readonly]) #thumb-label {
|
|
5862
6068
|
opacity: 1;
|
|
5863
6069
|
}
|
|
5864
|
-
`],
|
|
6070
|
+
`],le([a({type:Boolean,attribute:"hide-step-values"})],K.prototype,"hideStepValues",2),le([a({type:Boolean,attribute:"hide-value-label"})],K.prototype,"hideValueLabel",2),le([a({type:Number})],K.prototype,"min",2),le([a({type:Number})],K.prototype,"max",2),le([a({type:Number})],K.prototype,"step",1),le([a({type:String})],K.prototype,"value",1),le([a({type:Boolean,reflect:!0})],K.prototype,"disabled",2),le([a({type:Boolean,reflect:!0})],K.prototype,"readonly",2),le([a({type:String})],K.prototype,"label",2),le([O("#input")],K.prototype,"_input",2),le([O("#track")],K.prototype,"_track",2),le([_()],K.prototype,"_stepWidth",2),le([_()],K.prototype,"_steps",2),le([_()],K.prototype,"_sliderPosition",2),K=le([v("uui-slider")],K);var k0=Object.defineProperty,C0=Object.getOwnPropertyDescriptor,Sc=(e,t,i,o)=>{for(var r=o>1?void 0:o?C0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&k0(t,i,r),r};let Yr=class extends g{constructor(){super(...arguments),this.open=!1}render(){return l`<svg
|
|
5865
6071
|
xmlns="http://www.w3.org/2000/svg"
|
|
5866
6072
|
viewBox="0 0 24 24"
|
|
5867
6073
|
fill="none"
|
|
@@ -5870,7 +6076,7 @@
|
|
|
5870
6076
|
stroke-linecap="round"
|
|
5871
6077
|
stroke-linejoin="round">
|
|
5872
6078
|
<path d="m4 9 8 8 8-8"></path>
|
|
5873
|
-
</svg>`}};
|
|
6079
|
+
</svg>`}};Yr.styles=[b`
|
|
5874
6080
|
:host {
|
|
5875
6081
|
display: inline-flex;
|
|
5876
6082
|
width: 12px;
|
|
@@ -5888,9 +6094,9 @@
|
|
|
5888
6094
|
:host([open]) svg {
|
|
5889
6095
|
transform: rotate(0deg);
|
|
5890
6096
|
}
|
|
5891
|
-
`],
|
|
6097
|
+
`],Sc([a({type:Boolean,reflect:!0})],Yr.prototype,"open",2),Yr=Sc([v("uui-symbol-expand")],Yr);var E0=Object.defineProperty,P0=Object.getOwnPropertyDescriptor,Ca=(e,t,i,o)=>{for(var r=o>1?void 0:o?P0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&E0(t,i,r),r};let nr=class extends g{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),x(this,"uui-icon")}render(){return this.src?l`<img src=${this.src} alt=${this.alt} />`:l`<uui-icon
|
|
5892
6098
|
name="picture"
|
|
5893
|
-
.fallback=${
|
|
6099
|
+
.fallback=${Zd.strings[0]}></uui-icon>`}};nr.styles=[b`
|
|
5894
6100
|
:host {
|
|
5895
6101
|
display: block;
|
|
5896
6102
|
width: 100%;
|
|
@@ -5913,7 +6119,7 @@
|
|
|
5913
6119
|
color: var(--uui-color-surface,#fff);
|
|
5914
6120
|
background: var(--uui-color-surface-alt,#f3f3f5);
|
|
5915
6121
|
}
|
|
5916
|
-
`],
|
|
6122
|
+
`],Ca([a({type:String})],nr.prototype,"src",2),Ca([a({type:String})],nr.prototype,"alt",2),nr=Ca([v("uui-symbol-file-thumbnail")],nr);var S0=Object.defineProperty,O0=Object.getOwnPropertyDescriptor,Oc=(e,t,i,o)=>{for(var r=o>1?void 0:o?O0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&S0(t,i,r),r};let Zr=class extends g{constructor(){super(...arguments),this.type=""}render(){return l`
|
|
5917
6123
|
<svg
|
|
5918
6124
|
xmlns="http://www.w3.org/2000/svg"
|
|
5919
6125
|
viewBox="0 0 24 24"
|
|
@@ -5930,7 +6136,7 @@
|
|
|
5930
6136
|
${this.type?l`<small id="file-type" class="uui-small"
|
|
5931
6137
|
>${this.type.toUpperCase()}</small
|
|
5932
6138
|
>`:""}
|
|
5933
|
-
`}};
|
|
6139
|
+
`}};Zr.styles=[bi,b`
|
|
5934
6140
|
:host {
|
|
5935
6141
|
position: relative;
|
|
5936
6142
|
display: block;
|
|
@@ -5956,7 +6162,7 @@
|
|
|
5956
6162
|
width: 100%;
|
|
5957
6163
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5958
6164
|
}
|
|
5959
|
-
`],
|
|
6165
|
+
`],Oc([a({type:String})],Zr.prototype,"type",2),Zr=Oc([v("uui-symbol-file")],Zr);var I0=Object.getOwnPropertyDescriptor,A0=(e,t,i,o)=>{for(var r=o>1?void 0:o?I0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let As=class extends g{render(){return l`<svg
|
|
5960
6166
|
xmlns="http://www.w3.org/2000/svg"
|
|
5961
6167
|
viewBox="0 0 24 24"
|
|
5962
6168
|
fill="none"
|
|
@@ -5967,7 +6173,7 @@
|
|
|
5967
6173
|
id="icon">
|
|
5968
6174
|
<path
|
|
5969
6175
|
d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
|
|
5970
|
-
</svg>`}}
|
|
6176
|
+
</svg>`}};As.styles=[b`
|
|
5971
6177
|
:host {
|
|
5972
6178
|
display: block;
|
|
5973
6179
|
position: relative;
|
|
@@ -5978,9 +6184,9 @@
|
|
|
5978
6184
|
width: 100%;
|
|
5979
6185
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5980
6186
|
}
|
|
5981
|
-
`]
|
|
6187
|
+
`],As=A0([v("uui-symbol-folder")],As);var U0=Object.defineProperty,z0=Object.getOwnPropertyDescriptor,Ic=(e,t,i,o)=>{for(var r=o>1?void 0:o?z0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&U0(t,i,r),r};let Qr=class extends g{constructor(){super(...arguments),this.open=!1}render(){return m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
5982
6188
|
${this.open===!0?m`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:m`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}
|
|
5983
|
-
</svg>`}};
|
|
6189
|
+
</svg>`}};Qr.styles=[b`
|
|
5984
6190
|
:host {
|
|
5985
6191
|
display: inline-block;
|
|
5986
6192
|
vertical-align: middle;
|
|
@@ -5990,11 +6196,11 @@
|
|
|
5990
6196
|
svg {
|
|
5991
6197
|
fill: currentColor;
|
|
5992
6198
|
}
|
|
5993
|
-
`],
|
|
6199
|
+
`],Ic([a({type:Boolean,reflect:!0})],Qr.prototype,"open",2),Qr=Ic([v("uui-symbol-lock")],Qr);var M0=Object.getOwnPropertyDescriptor,D0=(e,t,i,o)=>{for(var r=o>1?void 0:o?M0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Us=class extends g{render(){return m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
5994
6200
|
<circle cx="17" cy="50" r="9"></circle>
|
|
5995
6201
|
<circle cx="50" cy="50" r="9"></circle>
|
|
5996
6202
|
<circle cx="83" cy="50" r="9"></circle>
|
|
5997
|
-
</svg>`}};
|
|
6203
|
+
</svg>`}};Us.styles=[b`
|
|
5998
6204
|
:host {
|
|
5999
6205
|
display: inline-block;
|
|
6000
6206
|
vertical-align: bottom;
|
|
@@ -6005,7 +6211,7 @@
|
|
|
6005
6211
|
svg {
|
|
6006
6212
|
fill: currentColor;
|
|
6007
6213
|
}
|
|
6008
|
-
`],
|
|
6214
|
+
`],Us=D0([v("uui-symbol-more")],Us);var L0=Object.defineProperty,T0=Object.getOwnPropertyDescriptor,Ac=(e,t,i,o)=>{for(var r=o>1?void 0:o?T0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&L0(t,i,r),r};let Jr=class extends wr(g){constructor(){super(...arguments),this.descending=!1}render(){return l` <svg
|
|
6009
6215
|
id="up"
|
|
6010
6216
|
xmlns="http://www.w3.org/2000/svg"
|
|
6011
6217
|
width="24"
|
|
@@ -6030,7 +6236,7 @@
|
|
|
6030
6236
|
stroke-linecap="round"
|
|
6031
6237
|
stroke-linejoin="round">
|
|
6032
6238
|
<path d="m4 9 8 8 8-8"></path>
|
|
6033
|
-
</svg>`}};
|
|
6239
|
+
</svg>`}};Jr.styles=[b`
|
|
6034
6240
|
:host {
|
|
6035
6241
|
position: relative;
|
|
6036
6242
|
display: inline-block;
|
|
@@ -6089,7 +6295,7 @@
|
|
|
6089
6295
|
:host([active][descending]) #down {
|
|
6090
6296
|
opacity: calc(0.25 * var(--uui-symbol-sort-hover, 0));
|
|
6091
6297
|
}
|
|
6092
|
-
`],
|
|
6298
|
+
`],Ac([a({type:Boolean,reflect:!0})],Jr.prototype,"descending",2),Jr=Ac([v("uui-symbol-sort")],Jr);var N0=Object.getOwnPropertyDescriptor,V0=(e,t,i,o)=>{for(var r=o>1?void 0:o?N0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let zs=class extends g{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return l`<slot></slot>`}};zs.styles=[b`
|
|
6093
6299
|
:host {
|
|
6094
6300
|
display: table;
|
|
6095
6301
|
width: 100%;
|
|
@@ -6097,7 +6303,7 @@
|
|
|
6097
6303
|
background-color: var(--uui-color-surface,#fff);
|
|
6098
6304
|
cursor: default;
|
|
6099
6305
|
}
|
|
6100
|
-
`],
|
|
6306
|
+
`],zs=V0([v("uui-table")],zs);var B0=Object.defineProperty,H0=Object.getOwnPropertyDescriptor,Ms=(e,t,i,o)=>{for(var r=o>1?void 0:o?H0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&B0(t,i,r),r};let dt=class extends g{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return l` <slot @slotchange=${this._detectOverflow}></slot>`}};dt.styles=[b`
|
|
6101
6307
|
:host {
|
|
6102
6308
|
position: relative;
|
|
6103
6309
|
display: table-cell;
|
|
@@ -6131,20 +6337,20 @@
|
|
|
6131
6337
|
:host([no-padding]) {
|
|
6132
6338
|
padding: 0;
|
|
6133
6339
|
}
|
|
6134
|
-
`],
|
|
6340
|
+
`],Ms([a({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],dt.prototype,"disableChildInteraction",2),Ms([a({type:Boolean,reflect:!0,attribute:"no-padding"})],dt.prototype,"noPadding",2),Ms([a({type:Boolean,reflect:!0,attribute:"clip-text"})],dt.prototype,"clipText",2),dt=Ms([v("uui-table-cell")],dt);var j0=Object.getOwnPropertyDescriptor,R0=(e,t,i,o)=>{for(var r=o>1?void 0:o?j0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Ds=class extends g{};Ds.styles=[b`
|
|
6135
6341
|
:host {
|
|
6136
6342
|
display: table-column;
|
|
6137
6343
|
}
|
|
6138
|
-
`],
|
|
6344
|
+
`],Ds=R0([v("uui-table-column")],Ds);var W0=Object.getOwnPropertyDescriptor,F0=(e,t,i,o)=>{for(var r=o>1?void 0:o?W0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Ls=class extends dt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}};Ls.styles=[...dt.styles,b`
|
|
6139
6345
|
:host {
|
|
6140
6346
|
border-top: none;
|
|
6141
6347
|
}
|
|
6142
|
-
`],
|
|
6348
|
+
`],Ls=F0([v("uui-table-head-cell")],Ls);var G0=Object.getOwnPropertyDescriptor,q0=(e,t,i,o)=>{for(var r=o>1?void 0:o?G0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Ts=class extends g{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return l`<slot></slot>`}};Ts.styles=[b`
|
|
6143
6349
|
:host {
|
|
6144
6350
|
display: table-header-group;
|
|
6145
6351
|
font-weight: bold;
|
|
6146
6352
|
}
|
|
6147
|
-
`],
|
|
6353
|
+
`],Ts=q0([v("uui-table-head")],Ts);var K0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,Uc=(e,t,i,o)=>{for(var r=o>1?void 0:o?X0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&K0(t,i,r),r};let eo=class extends ko(yi(g)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{e.disableChildInteraction!==void 0&&(e.disableChildInteraction=this.selectOnly)})}render(){return l` <slot @slotchanged=${this.updateChildSelectOnly}></slot> `}};eo.styles=[b`
|
|
6148
6354
|
:host {
|
|
6149
6355
|
display: table-row;
|
|
6150
6356
|
position: relative;
|
|
@@ -6166,7 +6372,7 @@
|
|
|
6166
6372
|
:host([selected]:focus) {
|
|
6167
6373
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
6168
6374
|
}
|
|
6169
|
-
`],
|
|
6375
|
+
`],Uc([yt({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],eo.prototype,"slotCellNodes",2),eo=Uc([v("uui-table-row")],eo);var Y0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,ar=(e,t,i,o)=>{for(var r=o>1?void 0:o?Z0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Y0(t,i,r),r};let pt=class extends wr(Te("",g)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?l`
|
|
6170
6376
|
<a
|
|
6171
6377
|
id="button"
|
|
6172
6378
|
href=${w(this.disabled?void 0:this.href)}
|
|
@@ -6187,7 +6393,7 @@
|
|
|
6187
6393
|
${this.renderLabel()}
|
|
6188
6394
|
<slot name="extra"></slot>
|
|
6189
6395
|
</button>
|
|
6190
|
-
`}};
|
|
6396
|
+
`}};pt.styles=[b`
|
|
6191
6397
|
:host {
|
|
6192
6398
|
color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
|
|
6193
6399
|
font-family: inherit;
|
|
@@ -6287,10 +6493,18 @@
|
|
|
6287
6493
|
}
|
|
6288
6494
|
|
|
6289
6495
|
#button:hover::before {
|
|
6290
|
-
background-color: var(--uui-color-current-emphasis,rgb(
|
|
6496
|
+
background-color: var(--uui-color-current-emphasis,rgb(
|
|
6497
|
+
248,
|
|
6498
|
+
214,
|
|
6499
|
+
211
|
|
6500
|
+
));
|
|
6291
6501
|
}
|
|
6292
6502
|
:host([disabled]) #button::before {
|
|
6293
|
-
background-color: var(--uui-color-disabled-standalone,rgb(
|
|
6503
|
+
background-color: var(--uui-color-disabled-standalone,rgb(
|
|
6504
|
+
226,
|
|
6505
|
+
226,
|
|
6506
|
+
226
|
|
6507
|
+
));
|
|
6294
6508
|
}
|
|
6295
6509
|
|
|
6296
6510
|
slot[name='icon']::slotted(*) {
|
|
@@ -6309,10 +6523,10 @@
|
|
|
6309
6523
|
:host([orientation='vertical']) slot.label {
|
|
6310
6524
|
text-align: left;
|
|
6311
6525
|
}
|
|
6312
|
-
`],
|
|
6526
|
+
`],ar([a({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),ar([a({type:String})],pt.prototype,"href",2),ar([a({type:String})],pt.prototype,"target",2),ar([a({type:String})],pt.prototype,"rel",2),ar([a({type:String,reflect:!0})],pt.prototype,"orientation",2),pt=ar([v("uui-tab")],pt);var Q0=Object.defineProperty,J0=Object.getOwnPropertyDescriptor,zc=e=>{throw TypeError(e)},lr=(e,t,i,o)=>{for(var r=o>1?void 0:o?J0(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Q0(t,i,r),r},Ea=(e,t,i)=>t.has(e)||zc("Cannot "+i),S=(e,t,i)=>(Ea(e,t,"read from private field"),i?i.call(e):t.get(e)),Ke=(e,t,i)=>t.has(e)?zc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),to=(e,t,i,o)=>(Ea(e,t,"write to private field"),t.set(e,i),i),$e=(e,t,i)=>(Ea(e,t,"access private method"),i),Ns,Xe,vt,ur,cr,Vs,io,ro,ue,Mc,Dc,Pa,Lc,hr,Bs,Tc,Sa,Oa;let ft=class extends g{constructor(){super(...arguments),Ke(this,ue),Ke(this,Ns,0),this.dropdownContentDirection="vertical",Ke(this,Xe,[]),Ke(this,vt,[]),Ke(this,ur,new Map),Ke(this,cr,[]),Ke(this,Vs,new ResizeObserver($e(this,ue,Dc).bind(this))),Ke(this,io,[]),Ke(this,ro,!1),Ke(this,hr,e=>{const t=e.currentTarget;if($e(this,ue,Oa).call(this,t)){t.active=!0;const i=S(this,ur).get(t);i&&(i.active=!0),[...S(this,Xe),...S(this,vt)].filter(s=>s!==t&&s!==i).forEach(s=>{$e(this,ue,Oa).call(this,s)&&(s.active=!1)}),S(this,vt).some(s=>s.active&&s!==i)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),$e(this,ue,Mc).call(this)}disconnectedCallback(){super.disconnectedCallback(),S(this,Vs).unobserve(this),$e(this,ue,Pa).call(this)}render(){return l`
|
|
6313
6527
|
<div id="main">
|
|
6314
6528
|
<div id="grid" role="tablist">
|
|
6315
|
-
<slot @slotchange=${
|
|
6529
|
+
<slot @slotchange=${$e(this,ue,Lc)}></slot>
|
|
6316
6530
|
</div>
|
|
6317
6531
|
<uui-button
|
|
6318
6532
|
popovertarget="popover-container"
|
|
@@ -6328,10 +6542,10 @@
|
|
|
6328
6542
|
popover
|
|
6329
6543
|
placement="bottom-end">
|
|
6330
6544
|
<div id="hidden-tabs-container" role="tablist">
|
|
6331
|
-
${
|
|
6545
|
+
${Bn(S(this,vt),e=>l`${e}`)}
|
|
6332
6546
|
</div>
|
|
6333
6547
|
</uui-popover-container>
|
|
6334
|
-
`}};
|
|
6548
|
+
`}};Ns=new WeakMap,Xe=new WeakMap,vt=new WeakMap,ur=new WeakMap,cr=new WeakMap,Vs=new WeakMap,io=new WeakMap,ro=new WeakMap,ue=new WeakSet,Mc=async function(){x(this,"uui-button"),x(this,"uui-popover-container"),x(this,"uui-symbol-more"),await this.updateComplete,S(this,Vs).observe(this._mainElement)},Dc=function(e){const t=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(t)?0:t)!==S(this,Ns)?$e(this,ue,Bs).call(this):$e(this,ue,Sa).call(this,e[0].contentBoxSize[0].inlineSize)},Pa=function(){S(this,Xe).forEach(e=>{e.removeEventListener("click",S(this,hr)),S(this,io).forEach(t=>t.disconnect())}),S(this,io).length=0,S(this,cr).length=0},Lc=function(){$e(this,ue,Pa).call(this),$e(this,ue,Tc).call(this),S(this,Xe).forEach(e=>{e.addEventListener("click",S(this,hr));const t=new ResizeObserver($e(this,ue,Bs).bind(this));t.observe(e),S(this,io).push(t)})},hr=new WeakMap,Bs=async function(){if(S(this,ro))return;to(this,ro,!0),requestAnimationFrame(()=>{to(this,ro,!1)}),await this.updateComplete;const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),t=Number.isNaN(e)?0:e;to(this,Ns,t);let i=0;for(let r=0;r<S(this,Xe).length;r++)S(this,Xe)[r].style.display="",i+=S(this,Xe)[r].offsetWidth,S(this,cr)[r]=i,i+=t;const o=2;this._mainElement.style.width=i-t+o+"px",$e(this,ue,Sa).call(this,this._mainElement.offsetWidth)},Tc=function(){to(this,Xe,this._slottedNodes?this._slottedNodes:[]),$e(this,ue,Bs).call(this)},Sa=function(e){const t=this._moreButtonElement.offsetWidth,i=e-(t||0);S(this,vt).forEach(s=>{s.removeEventListener("click",S(this,hr))}),to(this,vt,[]),S(this,ur).clear();let o=!1;const r=S(this,cr).length;for(let s=0;s<r;s++){const n=S(this,cr)[s],u=S(this,Xe)[s];if(n<=(s===r-1?e:i))u.style.display="";else{const c=u.cloneNode(!0);c.addEventListener("click",S(this,hr)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,S(this,ur).set(c,u),S(this,ur).set(u,c),S(this,vt).push(c),u.style.display="none",u.active&&(o=!0)}}S(this,vt).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement.hidePopover()):this._moreButtonElement.style.display="",o?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},Oa=function(e){return typeof e=="object"&&"active"in e&&typeof e.active=="boolean"},ft.styles=[b`
|
|
6335
6549
|
:host {
|
|
6336
6550
|
min-width: 0;
|
|
6337
6551
|
display: flex;
|
|
@@ -6419,7 +6633,7 @@
|
|
|
6419
6633
|
opacity 120ms,
|
|
6420
6634
|
height ease-out 120ms;
|
|
6421
6635
|
}
|
|
6422
|
-
`],
|
|
6636
|
+
`],lr([O("#more-button")],ft.prototype,"_moreButtonElement",2),lr([O("#popover-container")],ft.prototype,"_popoverContainerElement",2),lr([O("#main")],ft.prototype,"_mainElement",2),lr([yt({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],ft.prototype,"_slottedNodes",2),lr([a({type:String,reflect:!0,attribute:"dropdown-content-direction"})],ft.prototype,"dropdownContentDirection",2),ft=lr([v("uui-tab-group")],ft);class eg extends A{}class tg extends A{}var ig=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,Ia=(e,t,i,o)=>{for(var r=o>1?void 0:o?rg(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&ig(t,i,r),r};let dr=class extends g{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return l`<slot></slot>`}};dr.styles=[b`
|
|
6423
6637
|
:host {
|
|
6424
6638
|
display: inline-block;
|
|
6425
6639
|
font-size: var(--uui-tag-font-size, var(--uui-type-small-size,12px));
|
|
@@ -6443,12 +6657,20 @@
|
|
|
6443
6657
|
|
|
6444
6658
|
:host {
|
|
6445
6659
|
--color: var(--uui-color-default,#1b264f);
|
|
6446
|
-
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
6660
|
+
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
6661
|
+
28,
|
|
6662
|
+
35,
|
|
6663
|
+
59
|
|
6664
|
+
));
|
|
6447
6665
|
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
6448
6666
|
}
|
|
6449
6667
|
:host([color='positive']) {
|
|
6450
6668
|
--color: var(--uui-color-positive,#0b8152);
|
|
6451
|
-
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
6669
|
+
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
6670
|
+
10,
|
|
6671
|
+
115,
|
|
6672
|
+
73
|
|
6673
|
+
));
|
|
6452
6674
|
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
6453
6675
|
}
|
|
6454
6676
|
:host([color='warning']) {
|
|
@@ -6458,12 +6680,20 @@
|
|
|
6458
6680
|
}
|
|
6459
6681
|
:host([color='danger']) {
|
|
6460
6682
|
--color: var(--uui-color-danger,#d42054);
|
|
6461
|
-
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
6683
|
+
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
6684
|
+
191,
|
|
6685
|
+
33,
|
|
6686
|
+
78
|
|
6687
|
+
));
|
|
6462
6688
|
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
6463
6689
|
}
|
|
6464
6690
|
:host([color='invalid']) {
|
|
6465
6691
|
--color: var(--uui-color-invalid,#d42054);
|
|
6466
|
-
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
6692
|
+
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
6693
|
+
191,
|
|
6694
|
+
33,
|
|
6695
|
+
78
|
|
6696
|
+
));
|
|
6467
6697
|
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
6468
6698
|
}
|
|
6469
6699
|
|
|
@@ -6493,7 +6723,7 @@
|
|
|
6493
6723
|
color: var(--color-standalone);
|
|
6494
6724
|
border-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6495
6725
|
}
|
|
6496
|
-
`],
|
|
6726
|
+
`],Ia([a({reflect:!0})],dr.prototype,"color",2),Ia([a({reflect:!0})],dr.prototype,"look",2),dr=Ia([v("uui-tag")],dr);class oo extends A{constructor(t,i={}){super(t,{bubbles:!0,...i})}}oo.CHANGE="change",oo.INPUT="input";var og=Object.defineProperty,sg=Object.getOwnPropertyDescriptor,ae=(e,t,i,o)=>{for(var r=o>1?void 0:o?sg(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&og(t,i,r),r};let G=class extends Ne(g,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum ${e} characters, ${t} too many.`,this.autoHeight=!1,this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&this.value.length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&this.value.length>this.maxlength)}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this),this.autoHeight&&requestAnimationFrame(()=>{this.autoUpdateHeight()})}async focus(){await this.updateComplete,this._textarea.focus()}async blur(){await this.updateComplete,this._textarea.blur()}async click(){await this.updateComplete,this._textarea.click()}getFormElement(){return this._textarea}onInput(e){this.value=e.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new oo(oo.CHANGE))}autoUpdateHeight(){const e=this.shadowRoot.host,t=this._textarea,i=e.scrollTop,o=getComputedStyle(e).height;e.style.display="block",e.style.height=o,t.style.height="auto",t.scrollHeight+2>t.clientHeight?t.style.height=t.scrollHeight+2+"px":t.scrollHeight+2<t.clientHeight&&t.style.removeProperty("height"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=i}render(){return l`
|
|
6497
6727
|
<textarea
|
|
6498
6728
|
id="textarea"
|
|
6499
6729
|
rows=${w(this.rows)}
|
|
@@ -6534,7 +6764,11 @@
|
|
|
6534
6764
|
textarea[readonly] {
|
|
6535
6765
|
border-color: var(
|
|
6536
6766
|
--uui-textarea-border-color-readonly,
|
|
6537
|
-
var(--uui-color-disabled-standalone,rgb(
|
|
6767
|
+
var(--uui-color-disabled-standalone,rgb(
|
|
6768
|
+
226,
|
|
6769
|
+
226,
|
|
6770
|
+
226
|
|
6771
|
+
))
|
|
6538
6772
|
);
|
|
6539
6773
|
background-color: var(
|
|
6540
6774
|
--uui-textarea-background-color-readonly,
|
|
@@ -6589,7 +6823,7 @@
|
|
|
6589
6823
|
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
6590
6824
|
var(--uui-color-focus,#3879ff);
|
|
6591
6825
|
}
|
|
6592
|
-
`],
|
|
6826
|
+
`],ae([a()],G.prototype,"placeholder",2),ae([a({type:Boolean,reflect:!0})],G.prototype,"disabled",2),ae([a({type:Boolean,reflect:!0})],G.prototype,"readonly",2),ae([a({type:String})],G.prototype,"name",2),ae([a({type:Boolean,reflect:!0})],G.prototype,"error",2),ae([a({type:Number})],G.prototype,"minlength",2),ae([a({attribute:"minlength-message"})],G.prototype,"minlengthMessage",2),ae([a({type:Number})],G.prototype,"maxlength",2),ae([a({attribute:"maxlength-message"})],G.prototype,"maxlengthMessage",2),ae([O("#textarea")],G.prototype,"_textarea",2),ae([a({type:Boolean,attribute:"auto-height",reflect:!0})],G.prototype,"autoHeight",2),ae([a({type:String})],G.prototype,"label",2),ae([a({type:Number})],G.prototype,"rows",2),ae([a({type:Number})],G.prototype,"cols",2),ae([a({type:String})],G.prototype,"wrap",2),G=ae([v("uui-textarea")],G);class ce extends A{}ce.OPENING="opening",ce.OPENED="opened",ce.CLOSING="closing",ce.CLOSED="closed";var ng=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,pr=(e,t,i,o)=>{for(var r=o>1?void 0:o?ag(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&ng(t,i,r),r};let bt=class extends g{constructor(){super(),this.color="",this._autoClose=null,this._onOpenTimerComplete=()=>{this._open&&(this.open=!1)},this._timer=null,this._pauseTimer=!1,this.isOpen=!1,this._open=!1,this._animate=!1,this._requestAnimationUpdate=0,this.addEventListener("keyup",e=>{e.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,e!==null?(this._timer===null?this._timer=new Gd(this._onOpenTimerComplete,e):this._timer.setDuration(e),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):(this._timer?.destroy(),this._timer=null)}pauseAutoClose(){this._pauseTimer=!0,this._timer!==null&&this._timer.pause()}resumeAutoClose(){this._pauseTimer=!1,this._timer!==null&&this.isOpen===!0&&this._animate===!1&&this._timer.restart()}get open(){return this._open}set open(e){e===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),x(this,"uui-button"),x(this,"uui-icon")}_getAnimationDuration(){return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"),10)||480}_makeOpen(){this._open!==!0&&(this._open=!0,this.updateComplete.then(()=>{this._open===!0&&(cancelAnimationFrame(this._requestAnimationUpdate),this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!0,this.setAttribute("is-open",""),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,this.dispatchEvent(new ce(ce.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new ce(ce.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new ce(ce.CLOSING,{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented!==!0&&(this._open=!1,this._timer?.pause(),cancelAnimationFrame(this._requestAnimationUpdate),this.isOpen===!0&&(this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!1,this.removeAttribute("is-open"),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,requestAnimationFrame(()=>{this.style.height="0"}),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!1&&(this._animate=!1,this.dispatchEvent(new ce(ce.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return l`
|
|
6593
6827
|
<div id="toast" class=${this._animate?"animate":""}>
|
|
6594
6828
|
<div>
|
|
6595
6829
|
<div id="close">
|
|
@@ -6600,13 +6834,13 @@
|
|
|
6600
6834
|
@click=${()=>this.open=!1}>
|
|
6601
6835
|
<uui-icon
|
|
6602
6836
|
name="remove"
|
|
6603
|
-
.fallback=${
|
|
6837
|
+
.fallback=${cn.strings[0]}></uui-icon>
|
|
6604
6838
|
</uui-button>
|
|
6605
6839
|
</div>
|
|
6606
6840
|
<slot></slot>
|
|
6607
6841
|
</div>
|
|
6608
6842
|
</div>
|
|
6609
|
-
`}};
|
|
6843
|
+
`}};bt.styles=[bi,b`
|
|
6610
6844
|
:host {
|
|
6611
6845
|
--uui-toast-notification-margin: var(--uui-size-space-2,6px);
|
|
6612
6846
|
|
|
@@ -6685,12 +6919,20 @@
|
|
|
6685
6919
|
:host([color='default']) #toast > div {
|
|
6686
6920
|
background-color: var(--uui-color-default,#1b264f);
|
|
6687
6921
|
color: var(--uui-color-default-contrast,#fff);
|
|
6688
|
-
border-color: var(--uui-color-default-standalone,rgb(
|
|
6922
|
+
border-color: var(--uui-color-default-standalone,rgb(
|
|
6923
|
+
28,
|
|
6924
|
+
35,
|
|
6925
|
+
59
|
|
6926
|
+
));
|
|
6689
6927
|
}
|
|
6690
6928
|
:host([color='positive']) #toast > div {
|
|
6691
6929
|
background-color: var(--uui-color-positive,#0b8152);
|
|
6692
6930
|
color: var(--uui-color-positive-contrast,#fff);
|
|
6693
|
-
border-color: var(--uui-color-positive-standalone,rgb(
|
|
6931
|
+
border-color: var(--uui-color-positive-standalone,rgb(
|
|
6932
|
+
10,
|
|
6933
|
+
115,
|
|
6934
|
+
73
|
|
6935
|
+
));
|
|
6694
6936
|
}
|
|
6695
6937
|
:host([color='warning']) #toast > div {
|
|
6696
6938
|
background-color: var(--uui-color-warning,#fbd142);
|
|
@@ -6700,14 +6942,22 @@
|
|
|
6700
6942
|
:host([color='danger']) #toast > div {
|
|
6701
6943
|
background-color: var(--uui-color-danger,#d42054);
|
|
6702
6944
|
color: var(--uui-color-danger-contrast,white);
|
|
6703
|
-
border-color: var(--uui-color-danger-standalone,rgb(
|
|
6945
|
+
border-color: var(--uui-color-danger-standalone,rgb(
|
|
6946
|
+
191,
|
|
6947
|
+
33,
|
|
6948
|
+
78
|
|
6949
|
+
));
|
|
6704
6950
|
}
|
|
6705
6951
|
:host([color='invalid']) #toast > div {
|
|
6706
6952
|
background-color: var(--uui-color-invalid,#d42054);
|
|
6707
6953
|
color: var(--uui-color-invalid-contrast,white);
|
|
6708
|
-
border-color: var(--uui-color-invalid-standalone,rgb(
|
|
6954
|
+
border-color: var(--uui-color-invalid-standalone,rgb(
|
|
6955
|
+
191,
|
|
6956
|
+
33,
|
|
6957
|
+
78
|
|
6958
|
+
));
|
|
6709
6959
|
}
|
|
6710
|
-
`],
|
|
6960
|
+
`],pr([a({reflect:!0})],bt.prototype,"color",2),pr([a({type:Number})],bt.prototype,"autoClose",1),pr([O("#toast")],bt.prototype,"_toastEl",2),pr([_()],bt.prototype,"_animate",2),pr([a({type:Boolean,reflect:!0})],bt.prototype,"open",1),bt=pr([v("uui-toast-notification")],bt);var lg=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,Nc=(e,t,i,o)=>{for(var r=o>1?void 0:o?ug(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&lg(t,i,r),r};let so=class extends g{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{this._autoClosePause=!0,this._toasts?.forEach(e=>e.pauseAutoClose())},this.resumeAutoClose=()=>{this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,this._toasts?.forEach(e=>e.resumeAutoClose()))},this.onToastClosed=e=>{this.removeToast(e.target)},this._toasts=[],this.onSlotChanged=e=>{const t=[...this._toasts];this._toasts=e.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),t.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(ce.CLOSED,this.onToastClosed),r.removeEventListener("mouseenter",this.pauseAutoClose),r.removeEventListener("mouseleave",this.resumeAutoClose),r.removeEventListener("focus",this.pauseAutoClose),r.removeEventListener("blur",this.resumeAutoClose)}),this._toasts.filter(r=>t.indexOf(r)===-1).forEach(r=>{r.addEventListener(ce.CLOSED,this.onToastClosed),r.addEventListener("mouseenter",this.pauseAutoClose),r.addEventListener("mouseleave",this.resumeAutoClose),r.addEventListener("focus",this.pauseAutoClose),r.addEventListener("blur",this.resumeAutoClose),this._autoClose&&(r.autoClose=this._autoClose),this._autoClosePause===!0&&r.pauseAutoClose(),r.open=!0})}}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,this._toasts?.forEach(t=>t.autoClose=e)}removeToast(e){if(!e)e=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(e)===-1){console.warn("Toast-notification",e,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(e)}closeToast(e){let t=e;t||(t=this._toasts[this._toasts.length-1]),t.open=!1}render(){return l` <slot @slotchange=${this.onSlotChanged}></slot> `}};so.styles=[b`
|
|
6711
6961
|
:host {
|
|
6712
6962
|
position: absolute;
|
|
6713
6963
|
overflow: hidden;
|
|
@@ -6735,7 +6985,7 @@
|
|
|
6735
6985
|
:host([left-align]) slot {
|
|
6736
6986
|
align-items: start;
|
|
6737
6987
|
}
|
|
6738
|
-
`],
|
|
6988
|
+
`],Nc([a({type:Number,reflect:!0,attribute:"auto-close"})],so.prototype,"_autoClose",2),so=Nc([v("uui-toast-notification-container")],so);var cg=Object.defineProperty,hg=Object.getOwnPropertyDescriptor,Aa=(e,t,i,o)=>{for(var r=o>1?void 0:o?hg(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&cg(t,i,r),r};let vr=class extends g{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return l`
|
|
6739
6989
|
<div id="message" class="uui-text">
|
|
6740
6990
|
<h5
|
|
6741
6991
|
style=${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}>
|
|
@@ -6745,7 +6995,7 @@
|
|
|
6745
6995
|
<slot></slot>
|
|
6746
6996
|
<slot id="actions" name="actions"></slot>
|
|
6747
6997
|
</div>
|
|
6748
|
-
`}};
|
|
6998
|
+
`}};vr.styles=[bi,b`
|
|
6749
6999
|
#message {
|
|
6750
7000
|
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
6751
7001
|
}
|
|
@@ -6766,12 +7016,12 @@
|
|
|
6766
7016
|
margin-top: var(--uui-size-space-4,12px);
|
|
6767
7017
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
6768
7018
|
}
|
|
6769
|
-
`],
|
|
7019
|
+
`],Aa([a({type:String})],vr.prototype,"headline",2),Aa([_()],vr.prototype,"_headlineSlotHasContent",2),vr=Aa([v("uui-toast-notification-layout")],vr);var dg=Object.getOwnPropertyDescriptor,pg=(e,t,i,o)=>{for(var r=o>1?void 0:o?dg(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let no=class extends ke{constructor(){super("switch")}renderCheckbox(){return l`
|
|
6770
7020
|
<div id="toggle">
|
|
6771
|
-
<div id="icon-checked">${
|
|
6772
|
-
<div id="icon-unchecked">${
|
|
7021
|
+
<div id="icon-checked">${Ao}</div>
|
|
7022
|
+
<div id="icon-unchecked">${cn}</div>
|
|
6773
7023
|
</div>
|
|
6774
|
-
`}};
|
|
7024
|
+
`}};no.formAssociated=!0,no.styles=[...ke.styles,Po,b`
|
|
6775
7025
|
:host {
|
|
6776
7026
|
--uui-toggle-size: 18px;
|
|
6777
7027
|
--uui-toggle-switch-width: calc(2 * var(--uui-toggle-size));
|
|
@@ -6816,7 +7066,11 @@
|
|
|
6816
7066
|
);
|
|
6817
7067
|
background-color: var(
|
|
6818
7068
|
--uui-toggle-background-color-focus,
|
|
6819
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
7069
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
7070
|
+
250,
|
|
7071
|
+
250,
|
|
7072
|
+
250
|
|
7073
|
+
))
|
|
6820
7074
|
);
|
|
6821
7075
|
}
|
|
6822
7076
|
|
|
@@ -6825,11 +7079,19 @@
|
|
|
6825
7079
|
}
|
|
6826
7080
|
|
|
6827
7081
|
label:hover input:checked:not([disabled]) ~ #toggle {
|
|
6828
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
7082
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
7083
|
+
70,
|
|
7084
|
+
86,
|
|
7085
|
+
200
|
|
7086
|
+
));
|
|
6829
7087
|
}
|
|
6830
7088
|
|
|
6831
7089
|
label:focus input:checked ~ #toggle {
|
|
6832
|
-
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
7090
|
+
background-color: var(--uui-color-selected-emphasis,rgb(
|
|
7091
|
+
70,
|
|
7092
|
+
86,
|
|
7093
|
+
200
|
|
7094
|
+
));
|
|
6833
7095
|
}
|
|
6834
7096
|
|
|
6835
7097
|
#icon-checked,
|
|
@@ -6890,7 +7152,11 @@
|
|
|
6890
7152
|
}
|
|
6891
7153
|
|
|
6892
7154
|
:host([disabled]) #toggle {
|
|
6893
|
-
background-color: var(--uui-color-disabled-standalone,rgb(
|
|
7155
|
+
background-color: var(--uui-color-disabled-standalone,rgb(
|
|
7156
|
+
226,
|
|
7157
|
+
226,
|
|
7158
|
+
226
|
|
7159
|
+
));
|
|
6894
7160
|
}
|
|
6895
7161
|
:host([disabled]) input:checked ~ #toggle {
|
|
6896
7162
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
@@ -6902,7 +7168,7 @@
|
|
|
6902
7168
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
6903
7169
|
}
|
|
6904
7170
|
:host([disabled]) label:active #toggle {
|
|
6905
|
-
animation: ${
|
|
7171
|
+
animation: ${So};
|
|
6906
7172
|
}
|
|
6907
7173
|
:host([disabled]) input:checked #toggle #icon-checked {
|
|
6908
7174
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
@@ -6913,9 +7179,13 @@
|
|
|
6913
7179
|
/* polyfill support */
|
|
6914
7180
|
:host(:not([pristine])[internals-invalid]) #toggle,
|
|
6915
7181
|
:host(:not([pristine])[internals-invalid]) label:hover #toggle {
|
|
6916
|
-
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
7182
|
+
border: 1px solid var(--uui-color-invalid-standalone,rgb(
|
|
7183
|
+
191,
|
|
7184
|
+
33,
|
|
7185
|
+
78
|
|
7186
|
+
));
|
|
6917
7187
|
}
|
|
6918
|
-
`],
|
|
7188
|
+
`],no=pg([v("uui-toggle")],no);var vg=Object.getOwnPropertyDescriptor,fg=(e,t,i,o)=>{for(var r=o>1?void 0:o?vg(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(r)||r);return r};let Hs=class extends g{render(){return l`<slot></slot>`}};Hs.styles=[b`
|
|
6919
7189
|
:host(:not(:focus-within)) {
|
|
6920
7190
|
position: absolute !important;
|
|
6921
7191
|
width: 1px !important;
|
|
@@ -6927,4 +7197,4 @@
|
|
|
6927
7197
|
white-space: nowrap !important;
|
|
6928
7198
|
padding: 0 !important;
|
|
6929
7199
|
}
|
|
6930
|
-
`],
|
|
7200
|
+
`],Hs=fg([v("uui-visually-hidden")],Hs);export{wh as ActiveMixin,$h as LabelMixin,Gh as PopoverTargetMixin,Ah as SelectOnlyMixin,Ph as SelectableMixin,Lh as Timer,_o as UUIActionBarElement,Ze as UUIAvatarElement,Ht as UUIAvatarGroupElement,jt as UUIBadgeElement,vh as UUIBlinkAnimationValue,ph as UUIBlinkKeyframes,ke as UUIBooleanInputElement,Eo as UUIBooleanInputEvent,Ve as UUIBoxElement,Gt as UUIBreadcrumbItemElement,xr as UUIBreadcrumbsElement,Xt as UUIButtonCopyTextElement,se as UUIButtonElement,gi as UUIButtonGroupElement,Be as UUIButtonInlineCreateElement,Oo as UUIButtonInlineCreateEvent,Zt as UUICardBlockTypeElement,Qt as UUICardContentNodeElement,J as UUICardElement,Ei as UUICardEvent,$t as UUICardMediaElement,Ai as UUICardUserElement,Er as UUICaretElement,Pr as UUICheckboxElement,be as UUIColorAreaElement,Bo as UUIColorAreaEvent,Ui as UUIColorPickerChangeEvent,V as UUIColorPickerElement,ge as UUIColorSliderElement,Wo as UUIColorSliderEvent,rt as UUIColorSwatchElement,kt as UUIColorSwatchesElement,Mi as UUIColorSwatchesEvent,te as UUIComboboxElement,_e as UUIComboboxEvent,ze as UUIComboboxListElement,me as UUIComboboxListEvent,ot as UUIComboboxListOptionElement,Kt as UUICopyTextEvent,os as UUIDialogElement,Vi as UUIDialogLayoutElement,Qs as UUIEvent,st as UUIFileDropzoneElement,Bi as UUIFileDropzoneEvent,ye as UUIFilePreviewElement,Ye as UUIFormControlEvent,Dh as UUIFormControlMixin,jn as UUIFormElement,ei as UUIFormLayoutItemElement,Lr as UUIFormValidationMessageElement,bh as UUIHorizontalPulseAnimationValue,fh as UUIHorizontalPulseKeyframes,mh as UUIHorizontalShakeAnimationValue,gh as UUIHorizontalShakeKeyframes,We as UUIIconElement,Rn as UUIIconHost,Wn as UUIIconRegistry,Tr as UUIIconRegistryElement,Vu as UUIIconRegistryEssential,Fn as UUIIconRegistryEssentialElement,ji as UUIIconRequestEvent,D as UUIInputElement,ii as UUIInputEvent,nt as UUIInputFileElement,ri as UUIInputLockElement,as as UUIInputLockEvent,Wi as UUIInputPasswordElement,Xh as UUIInterfaceColorValues,Yh as UUIInterfaceHeadingValues,Kh as UUIInterfaceLookValues,hs as UUIKeyElement,cs as UUIKeyboardShortcutElement,oi as UUILabelElement,Fi as UUILoaderBarElement,Gi as UUILoaderCircleElement,ps as UUILoaderElement,ve as UUIMenuItemElement,at as UUIMenuItemEvent,qu as UUIModalCloseEndEvent,Ki as UUIModalCloseEvent,lt as UUIModalContainerElement,gs as UUIModalDialogElement,we as UUIModalElement,Gu as UUIModalOpenEvent,Xi as UUIModalSidebarElement,ne as UUIPaginationElement,Et as UUIPaginationEvent,Fe as UUIPopoverContainerElement,Pt as UUIPopoverElement,Hr as UUIProgressBarElement,Oe as UUIRadioElement,tr as UUIRadioEvent,li as UUIRadioGroupElement,ys as UUIRadioGroupEvent,T as UUIRangeSliderElement,ht as UUIRefElement,or as UUIRefEvent,ks as UUIRefListElement,Wr as UUIRefNodeDataTypeElement,Fr as UUIRefNodeDocumentTypeElement,R as UUIRefNodeElement,Ps as UUIRefNodeFormElement,Gr as UUIRefNodeMemberElement,sr as UUIRefNodePackageElement,qr as UUIRefNodeUserElement,Kr as UUIScrollContainerElement,fe as UUISelectElement,Ss as UUISelectEvent,Nt as UUISelectableEvent,K as UUISliderElement,hi as UUISliderEvent,Yr as UUISymbolExpandElement,Dr as UUISymbolFileDropzoneElement,Zr as UUISymbolFileElement,nr as UUISymbolFileThumbnailElement,As as UUISymbolFolderElement,Qr as UUISymbolLockElement,Us as UUISymbolMoreElement,Jr as UUISymbolSortElement,pt as UUITabElement,eg as UUITabEvent,ft as UUITabGroupElement,tg as UUITabGroupEvent,dt as UUITableCellElement,Ds as UUITableColumnElement,zs as UUITableElement,Ls as UUITableHeadCellElement,Ts as UUITableHeadElement,eo as UUITableRowElement,dr as UUITagElement,bi as UUITextStyles,G as UUITextareaElement,oo as UUITextareaEvent,so as UUIToastNotificationContainerElement,bt as UUIToastNotificationElement,ce as UUIToastNotificationEvent,vr as UUIToastNotificationLayoutElement,no as UUIToggleElement,Hs as UUIVisuallyHiddenElement,Vh as clamp,qh as defineElement,Th as demandCustomElement,Nh as drag,Ja as findAncestorByAttributeValue,Bh as reverseNumberInRange,jh as slotHasContent,Hh as toHex};
|