@cupra/ui-react 1.0.0-canary.12 → 1.0.0-canary.13
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/index.js +3309 -112
- package/package.json +2 -2
- package/dist/components/Accordion/Accordion.js +0 -8
- package/dist/components/Avatar/Avatar.js +0 -11
- package/dist/components/Bullets/Bullets.js +0 -6
- package/dist/components/Button/Button.js +0 -20
- package/dist/components/CarouselIndicator/CarouselIndicator.js +0 -9
- package/dist/components/Checkbox/Checkbox.js +0 -11
- package/dist/components/Chip/Chip.js +0 -9
- package/dist/components/Chips/Chips.js +0 -13
- package/dist/components/Currency/Currency.js +0 -9
- package/dist/components/Dialog/Dialog.js +0 -15
- package/dist/components/DialogBody/DialogBody.js +0 -9
- package/dist/components/DialogFooter/DialogFooter.js +0 -9
- package/dist/components/DialogHeader/DialogHeader.js +0 -9
- package/dist/components/Divider/Divider.js +0 -8
- package/dist/components/Hyperlink/Hyperlink.js +0 -11
- package/dist/components/Icon/Icon.js +0 -9
- package/dist/components/IconButton/IconButton.js +0 -19
- package/dist/components/Input/Input.js +0 -14
- package/dist/components/InteractiveCard/InteractiveCard.js +0 -26
- package/dist/components/LinkButton/LinkButton.js +0 -11
- package/dist/components/Loader/Loader.js +0 -24
- package/dist/components/Logo/Logo.js +0 -9
- package/dist/components/MapPin/MapPin.js +0 -11
- package/dist/components/Modal/Modal.js +0 -49
- package/dist/components/PasswordInput/PasswordInput.js +0 -39
- package/dist/components/PickerItem/PickerItem.js +0 -21
- package/dist/components/Radio/Radio.js +0 -14
- package/dist/components/RadioButton/RadioButton.js +0 -10
- package/dist/components/RadioButtonGroup/RadioButtonGroup.js +0 -10
- package/dist/components/Search/Search.js +0 -8
- package/dist/components/SearchInput/SearchInput.js +0 -46
- package/dist/components/SecondaryNavigation/SecondaryNavigation.js +0 -16
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -11
- package/dist/components/Select/Select.js +0 -6
- package/dist/components/Selection/Selection.js +0 -9
- package/dist/components/SidebarNavigation/SidebarNavigation.js +0 -15
- package/dist/components/Slider/Slider.js +0 -16
- package/dist/components/StaticBox/StaticBox.js +0 -20
- package/dist/components/Stepper/Stepper.js +0 -6
- package/dist/components/Tabs/Tabs.js +0 -19
- package/dist/components/Tag/Tag.js +0 -11
- package/dist/components/Text/Text.js +0 -9
- package/dist/components/TextInput/TextInput.js +0 -44
- package/dist/components/Textarea/Textarea.js +0 -57
- package/dist/components/ThemeProvider/ThemeProvider.js +0 -6
- package/dist/components/Toast/Toast.js +0 -16
- package/dist/components/ToastMessage/ToastMessage.js +0 -13
- package/dist/components/ToggleButton/ToggleButton.js +0 -11
- package/dist/components/ToggleSwitch/ToggleSwitch.js +0 -22
- package/dist/components/Tooltip/Tooltip.js +0 -24
- package/dist/hooks/useBreakpoint.js +0 -42
- package/dist/hooks/useEventListeners.js +0 -26
- package/dist/hooks/useHandleEvent.js +0 -25
- package/dist/hooks/useResizeObserver/useResizeObserver.js +0 -14
- package/dist/node_modules/.pnpm/@emotion_is-prop-valid@1.2.2/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +0 -10
- package/dist/node_modules/.pnpm/@emotion_memoize@0.8.1/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -9
- package/dist/node_modules/.pnpm/@emotion_unitless@0.8.1/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -52
- package/dist/node_modules/.pnpm/styled-components@6.1.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js +0 -572
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Enum.js +0 -12
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Middleware.js +0 -49
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Parser.js +0 -131
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Prefixer.js +0 -187
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Serializer.js +0 -27
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Tokenizer.js +0 -147
- package/dist/node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Utility.js +0 -56
- package/dist/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js +0 -18
- package/dist/packages/ui-kit/dist-react/index.js +0 -9226
- package/dist/packages/ui-kit/dist-react/utils/breakpoints.js +0 -11
- package/dist/packages/ui-kit/dist-react/utils/debounce.js +0 -11
package/dist/index.js
CHANGED
|
@@ -1,112 +1,3309 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
(function(x,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],m):(x=typeof globalThis<"u"?globalThis:x||self,m(x.CupraUiReact={},x.jsxRuntime,x.o))})(this,(function(x,m,R){"use strict";const _t={xs:0,s:480,m:768,l:1024,xl:1440,xxl:1920};function Ai({func:e,milliseconds:t=100}){let s;return function(r){clearTimeout(s),s=setTimeout(()=>{e(r)},t)}}/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/let Br=class extends Event{constructor(e,t,s,r){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=s,this.subscribe=r??!1}};/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2021 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*//**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2021 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/let Pi=class{constructor(e,t,s,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(i,n)=>{this.unsubscribe&&(this.unsubscribe!==n&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=i,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(i,n)),this.unsubscribe=n},this.host=e,t.context!==void 0){const i=t;this.context=i.context,this.callback=i.callback,this.subscribe=i.subscribe??!1}else this.context=t,this.callback=s,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Br(this.context,this.host,this.t,this.subscribe))}};/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2021 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/let Po=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){const s=t||!Object.is(e,this.o);this.o=e,s&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:s}]of this.subscriptions)t(this.o,s)},e!==void 0&&(this.value=e)}addCallback(e,t,s){if(!s)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}};/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2021 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/let zo=class extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},Lr=class extends Po{constructor(e,t,s){var r,i;super(t.context!==void 0?t.initialValue:s),this.onContextRequest=n=>{if(n.context!==this.context)return;const o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.composedPath()[0])===this.host)return;const o=new Set;for(const[l,{consumerHost:d}]of this.subscriptions)o.has(l)||(o.add(l),d.dispatchEvent(new Br(this.context,d,l,!0)));n.stopPropagation()},this.host=e,t.context!==void 0?this.context=t.context:this.context=t,this.attachListeners(),(i=(r=this.host).addController)==null||i.call(r,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new zo(this.context,this.host))}};/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2017 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/function Ie({context:e}){return(t,s)=>{const r=new WeakMap;if(typeof s=="object")return{get(){return t.get.call(this)},set(i){return r.get(this).setValue(i),t.set.call(this,i)},init(i){return r.set(this,new Lr(this,{context:e,initialValue:i})),i}};{t.constructor.addInitializer((o=>{r.set(o,new Lr(o,{context:e}))}));const i=Object.getOwnPropertyDescriptor(t,s);let n;if(i===void 0){const o=new WeakMap;n={get(){return o.get(this)},set(l){r.get(this).setValue(l),o.set(this,l)},configurable:!0,enumerable:!0}}else{const o=i.set;n={...i,set(l){r.get(this).setValue(l),o==null||o.call(this,l)}}}return void Object.defineProperty(t,s,n)}}}/**
|
|
26
|
+
* @license
|
|
27
|
+
* Copyright 2022 Google LLC
|
|
28
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
+
*/function Dr({context:e,subscribe:t}){return(s,r)=>{typeof r=="object"?r.addInitializer((function(){new Pi(this,{context:e,callback:i=>{s.set.call(this,i)},subscribe:t})})):s.constructor.addInitializer((i=>{new Pi(i,{context:e,callback:n=>{i[r]=n},subscribe:t})}))}}const zi="theme",Ae=(class Ms{constructor(){this.subscribers={},this.lastPublishedData={}}static getInstance(){return Ms.instance||(Ms.instance=new Ms),Ms.instance}subscribe(t,s){return this.subscribers[t]||(this.subscribers[t]=[]),this.subscribers[t].push(s),this.lastPublishedData[t]}unsubscribe(t,s){this.subscribers[t]&&(this.subscribers[t]=this.subscribers[t].filter(r=>r!==s))}publish(t,s){this.lastPublishedData[t]=s,this.subscribers[t]&&this.subscribers[t].forEach(r=>{try{r(s)}catch(i){console.error(`Error in subscriber for event "${t}":`,i)}})}}).getInstance(),No=(class js{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:t,theme:s})=>{if(!s||!t)return;const r=`https://ds-assets.cupra.com/1.0.0-canary.9/styles/${s}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;const n=this.fetchStyle({url:r}).then(o=>(o||this.stylePromises.delete(r),o));return this.stylePromises.set(r,n),this.stylePromises.get(r)}}async fetchStyle({url:t}){try{const s=await fetch(t,{cache:"force-cache"});if(s.ok)return s.text()}catch(s){console.error(`Failed to fetch Style Sheet "${t}":`,s)}}getCachedStyleSheetPromise({url:t}){return this.stylePromises.get(t)}static getInstance(){return js.instance||(js.instance=new js),js.instance}}).getInstance();/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2019 Google LLC
|
|
32
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
+
*/const Us=globalThis,Ni=Us.ShadowRoot&&(Us.ShadyCSS===void 0||Us.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_i=Symbol(),Mr=new WeakMap;let jr=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==_i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ni&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Mr.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Mr.set(t,e))}return e}toString(){return this.cssText}};const Fr=e=>new jr(typeof e=="string"?e:e+"",void 0,_i),f=(e,...t)=>{const s=e.length===1?e[0]:t.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[n+1]),e[0]);return new jr(s,e,_i)},Bi=(e,t)=>{if(Ni)e.adoptedStyleSheets=t.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of t){const r=document.createElement("style"),i=Us.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,e.appendChild(r)}},Rr=Ni?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(const r of t.cssRules)s+=r.cssText;return Fr(s)})(e):e;/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2017 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
+
*/const{is:_o,defineProperty:Bo,getOwnPropertyDescriptor:Lo,getOwnPropertyNames:Do,getOwnPropertySymbols:Mo,getPrototypeOf:jo}=Object,Pe=globalThis,Ur=Pe.trustedTypes,Fo=Ur?Ur.emptyScript:"",Vr=Pe.reactiveElementPolyfillSupport,ds=(e,t)=>e,Vs={toAttribute(e,t){switch(t){case Boolean:e=e?Fo:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},Li=(e,t)=>!_o(e,t),Hr={attribute:!0,type:String,converter:Vs,reflect:!1,useDefault:!1,hasChanged:Li};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Pe.litPropertyMetadata??(Pe.litPropertyMetadata=new WeakMap);let ze=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Hr){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,s);i!==void 0&&Bo(this.prototype,t,i)}}static getPropertyDescriptor(t,s,r){const{get:i,set:n}=Lo(this.prototype,t)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const l=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Hr}static _$Ei(){if(this.hasOwnProperty(ds("elementProperties")))return;const t=jo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ds("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ds("properties"))){const s=this.properties,r=[...Do(s),...Mo(s)];for(const i of r)this.createProperty(i,s[i])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)s.unshift(Rr(i))}else t!==void 0&&s.push(Rr(t));return s}static _$Eu(t,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((s=>this.enableUpdating=s)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((s=>s(this)))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bi(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((s=>{var r;return(r=s.hostConnected)==null?void 0:r.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((s=>{var r;return(r=s.hostDisconnected)==null?void 0:r.call(s)}))}attributeChangedCallback(t,s,r){this._$AK(t,r)}_$ET(t,s){var r;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const o=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Vs).toAttribute(s,i.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,s){var r,i;const n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const l=n.getPropertyOptions(o),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((r=l.converter)==null?void 0:r.fromAttribute)!==void 0?l.converter:Vs;this._$Em=o;const u=d.fromAttribute(s,l.type);this[o]=u??((i=this._$Ej)==null?void 0:i.get(o))??u,this._$Em=null}}requestUpdate(t,s,r){var i;if(t!==void 0){const n=this.constructor,o=this[t];if(r??(r=n.getPropertyOptions(t)),!((r.hasChanged??Li)(o,s)||r.useDefault&&r.reflect&&o===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??s??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(s=void 0),this._$AL.set(t,s)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i){const{wrapped:l}=o,d=this[n];l!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,o,d)}}let s=!1;const r=this._$AL;try{s=this.shouldUpdate(r),s?(this.willUpdate(r),(t=this._$EO)==null||t.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(r)):this._$EM()}catch(i){throw s=!1,this._$EM(),i}s&&this._$AE(r)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach((r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((s=>this._$ET(s,this[s])))),this._$EM()}updated(t){}firstUpdated(t){}};ze.elementStyles=[],ze.shadowRootOptions={mode:"open"},ze[ds("elementProperties")]=new Map,ze[ds("finalized")]=new Map,Vr==null||Vr({ReactiveElement:ze}),(Pe.reactiveElementVersions??(Pe.reactiveElementVersions=[])).push("2.1.1");/**
|
|
38
|
+
* @license
|
|
39
|
+
* Copyright 2017 Google LLC
|
|
40
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
+
*/const Hs=globalThis,Ws=Hs.trustedTypes,Wr=Ws?Ws.createPolicy("lit-html",{createHTML:e=>e}):void 0,qr="$lit$",Xt=`lit$${Math.random().toFixed(9).slice(2)}$`,Gr="?"+Xt,Ro=`<${Gr}>`,le=document,hs=()=>le.createComment(""),us=e=>e===null||typeof e!="object"&&typeof e!="function",Di=Array.isArray,Uo=e=>Di(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Mi=`[
|
|
42
|
+
\f\r]`,ps=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kr=/-->/g,Yr=/>/g,ce=RegExp(`>|${Mi}(?:([^\\s"'>=/]+)(${Mi}*=${Mi}*(?:[^
|
|
43
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xr=/'/g,Jr=/"/g,Zr=/^(?:script|style|textarea|title)$/i,Vo=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),c=Vo(1),Bt=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Qr=new WeakMap,de=le.createTreeWalker(le,129);function tn(e,t){if(!Di(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wr!==void 0?Wr.createHTML(t):t}const Ho=(e,t)=>{const s=e.length-1,r=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=ps;for(let l=0;l<s;l++){const d=e[l];let u,v,p=-1,g=0;for(;g<d.length&&(o.lastIndex=g,v=o.exec(d),v!==null);)g=o.lastIndex,o===ps?v[1]==="!--"?o=Kr:v[1]!==void 0?o=Yr:v[2]!==void 0?(Zr.test(v[2])&&(i=RegExp("</"+v[2],"g")),o=ce):v[3]!==void 0&&(o=ce):o===ce?v[0]===">"?(o=i??ps,p=-1):v[1]===void 0?p=-2:(p=o.lastIndex-v[2].length,u=v[1],o=v[3]===void 0?ce:v[3]==='"'?Jr:Xr):o===Jr||o===Xr?o=ce:o===Kr||o===Yr?o=ps:(o=ce,i=void 0);const b=o===ce&&e[l+1].startsWith("/>")?" ":"";n+=o===ps?d+Ro:p>=0?(r.push(u),d.slice(0,p)+qr+d.slice(p)+Xt+b):d+Xt+(p===-2?l:b)}return[tn(e,n+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};class ms{constructor({strings:t,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const l=t.length-1,d=this.parts,[u,v]=Ho(t,s);if(this.el=ms.createElement(u,r),de.currentNode=this.el.content,s===2||s===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=de.nextNode())!==null&&d.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(qr)){const g=v[o++],b=i.getAttribute(p).split(Xt),S=/([.?@])?(.*)/.exec(g);d.push({type:1,index:n,name:S[2],strings:b,ctor:S[1]==="."?qo:S[1]==="?"?Go:S[1]==="@"?Ko:Gs}),i.removeAttribute(p)}else p.startsWith(Xt)&&(d.push({type:6,index:n}),i.removeAttribute(p));if(Zr.test(i.tagName)){const p=i.textContent.split(Xt),g=p.length-1;if(g>0){i.textContent=Ws?Ws.emptyScript:"";for(let b=0;b<g;b++)i.append(p[b],hs()),de.nextNode(),d.push({type:2,index:++n});i.append(p[g],hs())}}}else if(i.nodeType===8)if(i.data===Gr)d.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(Xt,p+1))!==-1;)d.push({type:7,index:n}),p+=Xt.length-1}n++}}static createElement(t,s){const r=le.createElement("template");return r.innerHTML=t,r}}function Ne(e,t,s=e,r){var i,n;if(t===Bt)return t;let o=r!==void 0?(i=s._$Co)==null?void 0:i[r]:s._$Cl;const l=us(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==l&&((n=o==null?void 0:o._$AO)==null||n.call(o,!1),l===void 0?o=void 0:(o=new l(e),o._$AT(e,s,r)),r!==void 0?(s._$Co??(s._$Co=[]))[r]=o:s._$Cl=o),o!==void 0&&(t=Ne(e,o._$AS(e,t.values),o,r)),t}let Wo=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=((e==null?void 0:e.creationScope)??le).importNode(t,!0);de.currentNode=r;let i=de.nextNode(),n=0,o=0,l=s[0];for(;l!==void 0;){if(n===l.index){let d;l.type===2?d=new qs(i,i.nextSibling,this,e):l.type===1?d=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(d=new Yo(i,this,e)),this._$AV.push(d),l=s[++o]}n!==(l==null?void 0:l.index)&&(i=de.nextNode(),n++)}return de.currentNode=le,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}},qs=class Io{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,r,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Ne(this,t,s),us(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==Bt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Uo(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!==h&&us(this._$AH)?this._$AA.nextSibling.data=t:this.T(le.createTextNode(t)),this._$AH=t}$(t){var s;const{values:r,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ms.createElement(tn(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===n)this._$AH.p(r);else{const o=new Wo(n,this),l=o.u(this.options);o.p(r),this.T(l),this._$AH=o}}_$AC(t){let s=Qr.get(t.strings);return s===void 0&&Qr.set(t.strings,s=new ms(t)),s}k(t){Di(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of t)i===s.length?s.push(r=new Io(this.O(hs()),this.O(hs()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(t=this._$AA.nextSibling,s){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,s);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}};class Gs{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,r,i,n){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h}_$AI(t,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)t=Ne(this,t,s,0),o=!us(t)||t!==this._$AH&&t!==Bt,o&&(this._$AH=t);else{const l=t;let d,u;for(t=n[0],d=0;d<n.length-1;d++)u=Ne(this,l[r+d],s,d),u===Bt&&(u=this._$AH[d]),o||(o=!us(u)||u!==this._$AH[d]),u===h?t=h:t!==h&&(t+=(u??"")+n[d+1]),this._$AH[d]=u}o&&!i&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qo extends Gs{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class Go extends Gs{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class Ko extends Gs{constructor(t,s,r,i,n){super(t,s,r,i,n),this.type=5}_$AI(t,s=this){if((t=Ne(this,t,s,0)??h)===Bt)return;const r=this._$AH,i=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==h&&(r===h||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Yo{constructor(t,s,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Ne(this,t)}}const Xo={I:qs},en=Hs.litHtmlPolyfillSupport;en==null||en(ms,qs),(Hs.litHtmlVersions??(Hs.litHtmlVersions=[])).push("3.3.1");const Jo=(e,t,s)=>{const r=(s==null?void 0:s.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const n=(s==null?void 0:s.renderBefore)??null;r._$litPart$=i=new qs(t.insertBefore(hs(),n),n,void 0,s??{})}return i._$AI(e),i};/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2017 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/const fs=globalThis;let Lt=class extends ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const s=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=s.firstChild),s}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Jo(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Bt}};var sn;Lt._$litElement$=!0,Lt.finalized=!0,(sn=fs.litElementHydrateSupport)==null||sn.call(fs,{LitElement:Lt});const rn=fs.litElementPolyfillSupport;rn==null||rn({LitElement:Lt}),(fs.litElementVersions??(fs.litElementVersions=[])).push("4.2.1");/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright 2017 Google LLC
|
|
50
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
+
*/const Zo={attribute:!0,type:String,converter:Vs,reflect:!1,hasChanged:Li},Qo=(e=Zo,t,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((e=Object.create(e)).wrapped=!0),n.set(s.name,e),r==="accessor"){const{name:o}=s;return{set(l){const d=t.get.call(this);t.set.call(this,l),this.requestUpdate(o,d,e)},init(l){return l!==void 0&&this.C(o,void 0,e,l),l}}}if(r==="setter"){const{name:o}=s;return function(l){const d=this[o];t.call(this,l),this.requestUpdate(o,d,e)}}throw Error("Unsupported decorator location: "+r)};function a(e){return(t,s)=>typeof s=="object"?Qo(e,t,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(e,t,s)}/**
|
|
52
|
+
* @license
|
|
53
|
+
* Copyright 2017 Google LLC
|
|
54
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
+
*/function k(e){return a({...e,state:!0,attribute:!1})}/**
|
|
56
|
+
* @license
|
|
57
|
+
* Copyright 2017 Google LLC
|
|
58
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
+
*/const ji=(e,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,s),s);/**
|
|
60
|
+
* @license
|
|
61
|
+
* Copyright 2017 Google LLC
|
|
62
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
+
*/function Et(e,t){return(s,r,i)=>{const n=o=>{var l;return((l=o.renderRoot)==null?void 0:l.querySelector(e))??null};return ji(s,r,{get(){return n(this)}})}}/**
|
|
64
|
+
* @license
|
|
65
|
+
* Copyright 2021 Google LLC
|
|
66
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
67
|
+
*/function yt(e){return(t,s)=>{const{slot:r,selector:i}=e??{},n="slot"+(r?`[name=${r}]`:":not([name])");return ji(t,s,{get(){var o;const l=(o=this.renderRoot)==null?void 0:o.querySelector(n),d=(l==null?void 0:l.assignedElements(e))??[];return i===void 0?d:d.filter((u=>u.matches(i)))}})}}/**
|
|
68
|
+
* @license
|
|
69
|
+
* Copyright 2017 Google LLC
|
|
70
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
+
*/function Fi(e){return(t,s)=>{const{slot:r}=e??{},i="slot"+(r?`[name=${r}]`:":not([name])");return ji(t,s,{get(){var n;const o=(n=this.renderRoot)==null?void 0:n.querySelector(i);return(o==null?void 0:o.assignedNodes(e))??[]}})}}var ta=Object.defineProperty,nn=(e,t,s,r)=>{for(var i=void 0,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(t,s,i)||i);return i&&ta(t,s,i),i};const ea=f`:host([unresolved]){visibility:hidden}`,Ri=class Ao extends Lt{constructor(){super(),this.appliedConstructables=[],this.appliedStyleTags=[],this.handleChangeTheme=t=>{this.pubSubTheme=t},this.pubSubTheme=Ae.subscribe("theme",this.handleChangeTheme)}get theme(){return this.contextTheme??this.pubSubTheme}connectedCallback(){super.connectedCallback(),this.shadowRoot||this.attachShadow({mode:"open"}),this.setAttribute("unresolved","");const t=this.constructor,s=Array.isArray(t.styles)?t.styles:[t.styles].filter(Boolean);Bi(this.shadowRoot,[...s,ea]),this.applyThemeStyles()}disconnectedCallback(){super.disconnectedCallback(),Ae.unsubscribe("theme",this.handleChangeTheme)}updated(t){super.updated(t),(t.has("contextTheme")||t.has("pubSubTheme"))&&this.applyThemeStyles()}getComponentNames(){const t=new Set;let s=this.constructor;for(;s&&s!==Ao;)Array.isArray(s.componentName)&&s.componentName.forEach(r=>t.add(r)),s=Object.getPrototypeOf(s);return Array.from(t).reverse()}supportsAdoptedSheets(){return"adoptedStyleSheets"in((ShadowRoot==null?void 0:ShadowRoot.prototype)||{})&&"replace"in CSSStyleSheet.prototype}async applyThemeStyles(){const t=this.getComponentNames();if(!(!this.theme||!(t!=null&&t.length)))try{const s=await Promise.all(t.map(o=>No.getStyles({componentName:o,theme:this.theme}))),r=this.supportsAdoptedSheets(),i=this.shadowRoot.adoptedStyleSheets||[],n=this.appliedConstructables?i.filter(o=>!this.appliedConstructables.includes(o)):i;this.appliedConstructables=[],this.appliedStyleTags.forEach(o=>o.remove()),this.appliedStyleTags=[],s.forEach(o=>{if(o)if(r){const l=new CSSStyleSheet;l.replaceSync(o),this.appliedConstructables.push(l)}else{const l=document.createElement("style");l.textContent=o,this.shadowRoot.appendChild(l),this.appliedStyleTags.push(l)}}),r&&(this.shadowRoot.adoptedStyleSheets=[...n,...this.appliedConstructables])}catch(s){console.error(s)}finally{this.removeAttribute("unresolved"),this.requestUpdate()}}};nn([a({attribute:!1}),Dr({context:zi,subscribe:!0})],Ri.prototype,"contextTheme"),nn([k()],Ri.prototype,"pubSubTheme");let T=Ri;const sa=f`
|
|
72
|
+
:host {
|
|
73
|
+
display: block;
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
summary {
|
|
78
|
+
list-style: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
summary::-webkit-details-marker {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
summary::marker {
|
|
86
|
+
content: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.title {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
user-select: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.open .close-icon,
|
|
98
|
+
.open-icon {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.open .open-icon,
|
|
103
|
+
.close-icon {
|
|
104
|
+
display: block;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
details {
|
|
108
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
109
|
+
interpolate-size: allow-keywords;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::details-content {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
block-size: 0;
|
|
115
|
+
overflow-y: clip;
|
|
116
|
+
transition:
|
|
117
|
+
content-visibility 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete,
|
|
118
|
+
opacity 0.3s cubic-bezier(0, 0, 0.2, 1),
|
|
119
|
+
block-size 0.3s cubic-bezier(0, 0, 0.2, 1);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&[open]::details-content {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
block-size: auto;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`,on={cupra:{"icon-names":{open:"minus",close:"plus"},"icon-button-variant":"secondary"},"cupra-diagonal":{"icon-names":{open:"arrow-up",close:"arrow-down"},"icon-button-variant":"primary"},seat:{"icon-names":{open:"minus",close:"plus"},"icon-button-variant":"secondary"}};/**
|
|
128
|
+
* @license
|
|
129
|
+
* Copyright 2018 Google LLC
|
|
130
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
131
|
+
*/const ot=e=>e??h,ia={createIcon:e=>c`
|
|
132
|
+
<ds-icon-react
|
|
133
|
+
class=${ot(e==null?void 0:e.class)}
|
|
134
|
+
data-testid=${ot(e==null?void 0:e["data-testid"])}
|
|
135
|
+
@click=${e==null?void 0:e["@click"]}
|
|
136
|
+
@keydown=${e==null?void 0:e["@keydown"]}
|
|
137
|
+
icon-name=${e==null?void 0:e["icon-name"]}
|
|
138
|
+
color=${ot(e==null?void 0:e.color)}
|
|
139
|
+
background-color=${ot(e==null?void 0:e["background-color"])}
|
|
140
|
+
size=${ot(e==null?void 0:e.size)}
|
|
141
|
+
aria-label=${ot(e==null?void 0:e["aria-label"])}
|
|
142
|
+
aria-hidden=${ot(e==null?void 0:e["aria-hidden"])}
|
|
143
|
+
role=${ot(e==null?void 0:e.role)}
|
|
144
|
+
tabindex=${ot(e==null?void 0:e.tabindex)}
|
|
145
|
+
>
|
|
146
|
+
${e.children}
|
|
147
|
+
</ds-icon-react>
|
|
148
|
+
`,createButton:(e={})=>c`
|
|
149
|
+
<ds-button-react
|
|
150
|
+
class=${e==null?void 0:e.class}
|
|
151
|
+
@click=${e==null?void 0:e["@click"]}
|
|
152
|
+
.size=${ot(e==null?void 0:e.size)}
|
|
153
|
+
type=${e==null?void 0:e.type}
|
|
154
|
+
icon-position=${e==null?void 0:e["icon-position"]}
|
|
155
|
+
.rounded=${e==null?void 0:e.rounded}
|
|
156
|
+
.full-width=${e==null?void 0:e["full-width"]}
|
|
157
|
+
variant=${(e==null?void 0:e.variant)??"primary"}
|
|
158
|
+
mode=${(e==null?void 0:e.mode)??"light"}
|
|
159
|
+
.disabled=${e==null?void 0:e.disabled}
|
|
160
|
+
icon-name=${e==null?void 0:e["icon-name"]}
|
|
161
|
+
html-tag-name=${e==null?void 0:e["html-tag-name"]}
|
|
162
|
+
href=${e==null?void 0:e.href}
|
|
163
|
+
rel=${e==null?void 0:e.rel}
|
|
164
|
+
target=${e==null?void 0:e.target}
|
|
165
|
+
data-testid=${e==null?void 0:e["data-testid"]}
|
|
166
|
+
>
|
|
167
|
+
${e.children}
|
|
168
|
+
</ds-button-react>
|
|
169
|
+
`,createIconButton:(e={})=>c`
|
|
170
|
+
<ds-icon-button-react
|
|
171
|
+
class=${e==null?void 0:e.class}
|
|
172
|
+
@click=${e==null?void 0:e["@click"]}
|
|
173
|
+
size=${ot(e==null?void 0:e.size)}
|
|
174
|
+
variant=${(e==null?void 0:e.variant)??"primary"}
|
|
175
|
+
mode=${(e==null?void 0:e.mode)??"light"}
|
|
176
|
+
.disabled=${e==null?void 0:e.disabled}
|
|
177
|
+
icon-name=${e==null?void 0:e["icon-name"]}
|
|
178
|
+
html-tag-name=${e==null?void 0:e["html-tag-name"]}
|
|
179
|
+
href=${e==null?void 0:e.href}
|
|
180
|
+
rel=${e==null?void 0:e.rel}
|
|
181
|
+
target=${e==null?void 0:e.target}
|
|
182
|
+
data-testid=${e==null?void 0:e["data-testid"]}
|
|
183
|
+
data-aria-label=${e==null?void 0:e["data-aria-label"]}
|
|
184
|
+
>
|
|
185
|
+
${e.children}
|
|
186
|
+
</ds-icon-button-react>
|
|
187
|
+
`,createLoaderSpinner:(e={})=>c`
|
|
188
|
+
<ds-loader-spinner-react
|
|
189
|
+
?show=${e==null?void 0:e.show}
|
|
190
|
+
orientation=${(e==null?void 0:e.orientation)??"row"}
|
|
191
|
+
mode=${(e==null?void 0:e.mode)??"light"}
|
|
192
|
+
></ds-loader-spinner-react>
|
|
193
|
+
`,createToastMessage:e=>c`
|
|
194
|
+
<ds-toast-message-react
|
|
195
|
+
data-id="${e["data-id"]}"
|
|
196
|
+
data-template="${e["data-template"]}"
|
|
197
|
+
title="${e.title}"
|
|
198
|
+
text="${e.text}"
|
|
199
|
+
status="${e.status}"
|
|
200
|
+
></ds-toast-message-react>
|
|
201
|
+
`};function $(e,t){return function(s){var r,i,n;if(!((s==null?void 0:s.prototype)instanceof HTMLElement))throw new TypeError("@customUiKitElement requires a class that extends HTMLElement.");const o=`${e}-react`;if(customElements.get(o))return;let l=t!=null&&t.skipTagAsComponentName?[]:[e];Array.isArray(t==null?void 0:t.extendComponentNames)&&(l=[...t.extendComponentNames,...l]),(n=(r=window==null?void 0:window.customElements)==null?void 0:r.define)==null||n.call(r,o,(i=class extends s{constructor(){super(...arguments),this.componentFactory=ia}},i.componentName=l,i))}}const w=e=>typeof e=="boolean"?e:e==="true"||e===""?!0:e==="false"?!1:!!e;/**
|
|
202
|
+
* @license
|
|
203
|
+
* Copyright 2017 Google LLC
|
|
204
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
205
|
+
*/const Ui={ATTRIBUTE:1,CHILD:2},Vi=e=>(...t)=>({_$litDirective$:e,values:t});class Hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,r){this._$Ct=t,this._$AM=s,this._$Ci=r}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}/**
|
|
206
|
+
* @license
|
|
207
|
+
* Copyright 2017 Google LLC
|
|
208
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
209
|
+
*/let Wi=class extends Hi{constructor(e){if(super(e),this.it=h,e.type!==Ui.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===h||e==null)return this._t=void 0,this.it=e;if(e===Bt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Wi.directiveName="unsafeHTML",Wi.resultType=1;const Ks=Vi(Wi);function M(e,...t){const s=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v1-0-0-canary-9"),r=Ks(s);return c`${r}`}/**
|
|
210
|
+
* @license
|
|
211
|
+
* Copyright 2018 Google LLC
|
|
212
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
213
|
+
*/const y=Vi(class extends Hi{constructor(e){var t;if(super(e),e.type!==Ui.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.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]){var s,r;if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((n=>n!==""))));for(const n in t)t[n]&&!((s=this.nt)!=null&&s.has(n))&&this.st.add(n);return this.render(t)}const i=e.element.classList;for(const n of this.st)n in t||(i.remove(n),this.st.delete(n));for(const n in t){const o=!!t[n];o===this.st.has(n)||(r=this.nt)!=null&&r.has(n)||(o?(i.add(n),this.st.add(n)):(i.remove(n),this.st.delete(n)))}return Bt}});var ra=Object.defineProperty,na=Object.getOwnPropertyDescriptor,he=(e,t,s,r)=>{for(var i=r>1?void 0:r?na(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ra(t,s,i),i};let Dt=class extends T{constructor(){super(...arguments),this.maxHeight=300,this.open=!1,this.mode="light",this.size="medium",this.disabled=!1,this._open=!1}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete,this._open=this.open}get containerClasses(){return{container:!0,disabled:this.disabled,open:this._open,[this.size]:!0,[this.mode]:!!this.mode}}get dividerClasses(){return{divider:!0,[this.mode]:!!this.mode}}get openIconTemplate(){var e;if(!this.theme)return h;const t=(e=on[this.theme])==null?void 0:e["icon-names"];return this.componentFactory.createIcon({class:"icon open-icon",role:"image","aria-hidden":"true","icon-name":(t==null?void 0:t.open)||"minus"})}get closeIconTemplate(){var e;if(!this.theme)return h;const t=(e=on[this.theme])==null?void 0:e["icon-names"];return this.componentFactory.createIcon({class:"icon close-icon",role:"image","aria-hidden":"true","icon-name":(t==null?void 0:t.close)||"plus"})}get styleTokens(){return M`
|
|
214
|
+
<style>
|
|
215
|
+
:host{
|
|
216
|
+
color-scheme: ${this.mode};
|
|
217
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
218
|
+
}
|
|
219
|
+
</style>
|
|
220
|
+
`}handleKeyDown(e){this.disabled&&e.preventDefault()}handleToggle(e){this._open=e.newState==="open"}render(){return c`
|
|
221
|
+
${this.styleTokens}
|
|
222
|
+
|
|
223
|
+
<details
|
|
224
|
+
class=${y(this.containerClasses)}
|
|
225
|
+
aria-disabled=${!!this.disabled}
|
|
226
|
+
?open=${this.open}
|
|
227
|
+
@keydown=${this.handleKeyDown}
|
|
228
|
+
@toggle=${this.handleToggle}
|
|
229
|
+
>
|
|
230
|
+
<summary class="title">
|
|
231
|
+
<slot name="title"></slot>
|
|
232
|
+
${this.openIconTemplate}
|
|
233
|
+
${this.closeIconTemplate}
|
|
234
|
+
</summary>
|
|
235
|
+
<slot name="content"></slot>
|
|
236
|
+
</details>
|
|
237
|
+
<div class=${y(this.dividerClasses)}></div>
|
|
238
|
+
`}};Dt.styles=[sa],he([a({type:Number,attribute:"max-height"})],Dt.prototype,"maxHeight",2),he([a({type:Boolean,converter:w,reflect:!0})],Dt.prototype,"open",2),he([a({type:String,reflect:!0})],Dt.prototype,"mode",2),he([a({type:String})],Dt.prototype,"size",2),he([a({type:Boolean,converter:w})],Dt.prototype,"disabled",2),he([k()],Dt.prototype,"_open",2),Dt=he([$("ds-accordion")],Dt);const oa=f`
|
|
239
|
+
:host {
|
|
240
|
+
display: block;
|
|
241
|
+
width: 100%;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.container {
|
|
245
|
+
display: flex;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.bullet {
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
background-clip: content-box;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.bullet.active {
|
|
254
|
+
cursor: auto;
|
|
255
|
+
}
|
|
256
|
+
`;var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,Ys=(e,t,s,r)=>{for(var i=r>1?void 0:r?la(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&aa(t,s,i),i};let _e=class extends T{constructor(){super(...arguments),this.mode="light",this.activeBulletIndex=0,this.handleClickChunk=t=>()=>{this.activeBulletIndex!==t&&(this.activeBulletIndex=t,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{index:t}})))}}get bulletsTemplate(){const t=[];for(let s=0;s<this.bulletsNumber;s++){const r={bullet:!0,active:s===this.activeBulletIndex};t.push(c`
|
|
257
|
+
<div @click=${this.handleClickChunk(s)} class=${y(r)}></div>
|
|
258
|
+
`)}return t}get classes(){return{container:!0,[this.mode]:!0}}get styleTokens(){return M`
|
|
259
|
+
<style>
|
|
260
|
+
:host{
|
|
261
|
+
color-scheme: ${this.mode};
|
|
262
|
+
}
|
|
263
|
+
</style>
|
|
264
|
+
`}render(){return this.bulletsNumber>0?c`
|
|
265
|
+
${this.styleTokens}
|
|
266
|
+
<div class=${y(this.classes)}>${this.bulletsTemplate}</div>
|
|
267
|
+
`:h}};_e.styles=[oa],Ys([a({type:String,reflect:!0})],_e.prototype,"mode",2),Ys([a({type:Number,attribute:"bullets-number"})],_e.prototype,"bulletsNumber",2),Ys([a({type:Number,attribute:"active-bullet-index",reflect:!0})],_e.prototype,"activeBulletIndex",2),_e=Ys([$("ds-bullets")],_e);const Jt=e=>class extends e{constructor(){super(...arguments),this.handleResize=()=>{this.updateViewportWithDebounce()},this.updateViewport=()=>{let t="xs";const s=["xxl","xl","l","m","s"];for(const r of s)if((window==null?void 0:window.innerWidth)>=_t[r]){t=r;break}t!==this.currentViewport&&(this.currentViewport=t,this.requestUpdate("viewport",null))}}connectedCallback(){super.connectedCallback(),this.updateViewportWithDebounce=Ai({func:this.updateViewport}),this.updateViewport(),window==null||window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("resize",this.handleResize)}get viewport(){return this.currentViewport}},gs=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};/**
|
|
268
|
+
* @license
|
|
269
|
+
* Copyright 2021 Google LLC
|
|
270
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
271
|
+
*/const vs=(e,t,s)=>{for(const r of t)if(r[0]===e)return(0,r[1])();return s==null?void 0:s()};/**
|
|
272
|
+
* @license
|
|
273
|
+
* Copyright 2021 Google LLC
|
|
274
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
275
|
+
*/function Ot(e,t,s){return e?t(e):s==null?void 0:s(e)}const ca=f`
|
|
276
|
+
:host {
|
|
277
|
+
display: contents;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.button {
|
|
281
|
+
text-decoration: none;
|
|
282
|
+
user-select: none;
|
|
283
|
+
display: inline-flex;
|
|
284
|
+
box-sizing: border-box;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
align-items: center;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
outline-style: solid;
|
|
289
|
+
max-width: 100%;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.button.full-width {
|
|
293
|
+
width: 100%;
|
|
294
|
+
}
|
|
295
|
+
`,da=f`
|
|
296
|
+
.text.container {
|
|
297
|
+
display: inline-flex;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.container {
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
text-overflow: ellipsis;
|
|
303
|
+
white-space: nowrap;
|
|
304
|
+
}
|
|
305
|
+
`,ha=f`
|
|
306
|
+
.loading-dots {
|
|
307
|
+
display: inline-flex;
|
|
308
|
+
align-items: baseline;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.loading-dots span {
|
|
312
|
+
animation-duration: 1.5s;
|
|
313
|
+
animation-iteration-count: infinite;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.loading-dots span:nth-child(1) {
|
|
317
|
+
animation-name: dot1;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.loading-dots span:nth-child(2) {
|
|
321
|
+
animation-name: dot2;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.loading-dots span:nth-child(3) {
|
|
325
|
+
animation-name: dot3;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@keyframes dot1 {
|
|
329
|
+
0% {
|
|
330
|
+
opacity: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
20% {
|
|
334
|
+
opacity: 0;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
30% {
|
|
338
|
+
opacity: 1;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
100% {
|
|
342
|
+
opacity: 1;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@keyframes dot2 {
|
|
347
|
+
0% {
|
|
348
|
+
opacity: 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
45% {
|
|
352
|
+
opacity: 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
55% {
|
|
356
|
+
opacity: 1;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
100% {
|
|
360
|
+
opacity: 1;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@keyframes dot3 {
|
|
365
|
+
0% {
|
|
366
|
+
opacity: 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
70% {
|
|
370
|
+
opacity: 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
80% {
|
|
374
|
+
opacity: 1;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
100% {
|
|
378
|
+
opacity: 1;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
`;var ua=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,X=(e,t,s,r)=>{for(var i=r>1?void 0:r?pa(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ua(t,s,i),i};let H=class extends Jt(T){constructor(){super(...arguments),this.variant="primary",this.mode="light",this.size="large",this.disabled=!1,this.destructive=!1,this.htmlTagName="button",this.type="button",this.iconPosition="left",this.rounded=!1,this.fullWidth=!1,this.loading=!1}firstUpdated(){this.closestForm=this.closest("form")}get classes(){const t=typeof this.size=="string"?this.size:this.size[this.viewport];return{button:!0,custom:this.htmlTagName==="custom",[t]:!!t,[this.mode]:!!this.mode,[this.variant]:!!this.variant,rounded:this.rounded,disabled:this.disabled||this.loading,destructive:this.destructive,"full-width":this.fullWidth}}handleClick(t){if(this.href||t.preventDefault(),this.closestForm&&this.type==="submit"){const s=new Event("submit",{bubbles:!0,composed:!0,cancelable:!0});this.closestForm.dispatchEvent(s)}}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName}):h}get loadingTemplate(){return this.loading?c`
|
|
382
|
+
<span class="loading-dots">
|
|
383
|
+
<span>.</span>
|
|
384
|
+
<span>.</span>
|
|
385
|
+
<span>.</span>
|
|
386
|
+
</span>
|
|
387
|
+
`:h}get cssTokens(){return M`
|
|
388
|
+
<style>
|
|
389
|
+
:host{
|
|
390
|
+
color-scheme: ${this.mode};
|
|
391
|
+
pointer-events: ${this.loading||this.disabled?"none":"visible"};
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
:host:has(::slotted(*:disabled)){
|
|
395
|
+
pointer-events: none;
|
|
396
|
+
}
|
|
397
|
+
</style>`}render(){return c`
|
|
398
|
+
${this.cssTokens}
|
|
399
|
+
${vs(this.htmlTagName||"button",[["button",()=>{var t;return c`
|
|
400
|
+
<button
|
|
401
|
+
aria-label=${(t=this.textContent)==null?void 0:t.replace(/^\s+|\s+$/g,"")}
|
|
402
|
+
class=${y(this.classes)}
|
|
403
|
+
type=${this.type}
|
|
404
|
+
@click=${this.handleClick}
|
|
405
|
+
?disabled=${this.disabled}
|
|
406
|
+
>
|
|
407
|
+
${Ot(this.iconPosition==="left",()=>c` ${this.iconTemplate} `)}
|
|
408
|
+
<span class="container">
|
|
409
|
+
<slot></slot>
|
|
410
|
+
${this.loadingTemplate}
|
|
411
|
+
</span>
|
|
412
|
+
${Ot(this.iconPosition==="right",()=>c` ${this.iconTemplate} `)}
|
|
413
|
+
</button>
|
|
414
|
+
`}],["a",()=>{var t;return c`
|
|
415
|
+
<a
|
|
416
|
+
aria-label=${(t=this.textContent)==null?void 0:t.replace(/^\s+|\s+$/g,"")}
|
|
417
|
+
class=${y(this.classes)}
|
|
418
|
+
href=${this.href}
|
|
419
|
+
rel=${this.rel}
|
|
420
|
+
target=${this.target}
|
|
421
|
+
@click=${this.handleClick}
|
|
422
|
+
?disabled=${this.disabled}
|
|
423
|
+
>
|
|
424
|
+
${Ot(this.iconPosition==="left",()=>c`${this.iconTemplate}`)}
|
|
425
|
+
<span class="container">
|
|
426
|
+
<slot></slot>
|
|
427
|
+
${this.loadingTemplate}
|
|
428
|
+
</span>
|
|
429
|
+
${Ot(this.iconPosition==="right",()=>c`${this.iconTemplate}`)}
|
|
430
|
+
</a>
|
|
431
|
+
`}],["custom",()=>c`
|
|
432
|
+
<div class=${y(this.classes)}>
|
|
433
|
+
<slot></slot>
|
|
434
|
+
</div>
|
|
435
|
+
`]])}
|
|
436
|
+
`}};H.styles=[ca,da,ha],X([a({type:String})],H.prototype,"variant",2),X([a({type:String,reflect:!0})],H.prototype,"mode",2),X([a({type:String,converter:gs})],H.prototype,"size",2),X([a({type:Boolean,converter:w})],H.prototype,"disabled",2),X([a({type:Boolean,converter:w})],H.prototype,"destructive",2),X([a({type:String,attribute:"icon-name"})],H.prototype,"iconName",2),X([a({type:String,attribute:"html-tag-name"})],H.prototype,"htmlTagName",2),X([a({type:String,reflect:!0})],H.prototype,"href",2),X([a({type:String,reflect:!0})],H.prototype,"rel",2),X([a({type:String,reflect:!0})],H.prototype,"target",2),X([a({type:String})],H.prototype,"type",2),X([a({type:String,attribute:"icon-position"})],H.prototype,"iconPosition",2),X([a({type:Boolean,converter:w})],H.prototype,"rounded",2),X([a({type:Boolean,converter:w,attribute:"full-width"})],H.prototype,"fullWidth",2),X([a({type:Boolean,converter:w})],H.prototype,"loading",2),X([k()],H.prototype,"closestForm",2),H=X([$("ds-button")],H);const ma=f`
|
|
437
|
+
:host {
|
|
438
|
+
display: flex;
|
|
439
|
+
width: 100%;
|
|
440
|
+
justify-content: center;
|
|
441
|
+
align-items: center;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.container {
|
|
445
|
+
display: flex;
|
|
446
|
+
}
|
|
447
|
+
`;var fa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,Xs=(e,t,s,r)=>{for(var i=r>1?void 0:r?ga(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&fa(t,s,i),i};let Be=class extends T{constructor(){super(...arguments),this.maxSelectorsShown=6}get classes(){return{container:!0,infinite:this.selectorsNumber>this.maxSelectorsShown}}get selectorsTemplate(){const t=[],s=this.selectorsNumber>this.maxSelectorsShown;for(let r=0;r<this.selectorsNumber;r++){let i=!1;const n=this.selectedIndex>=3&&this.selectedIndex<this.selectorsNumber-3,o=this.selectedIndex<3,l=this.selectedIndex>=this.selectorsNumber-3;s&&(n&&(r<this.selectedIndex-3||r>this.selectedIndex+3)||o&&r>=5||l&&r<this.selectorsNumber-5)&&(i=s);const d={selector:!0,selected:r===this.selectedIndex,hidden:i};t.push(c` <div class=${y(d)}></div> `)}return t}render(){return this.selectorsNumber>0?c`
|
|
448
|
+
<div data-testid="ds-carousel-indicator-container" class=${y(this.classes)}>
|
|
449
|
+
${this.selectorsTemplate}
|
|
450
|
+
</div>
|
|
451
|
+
`:h}};Be.styles=[ma],Xs([a({type:Number,attribute:"selectors-number"})],Be.prototype,"selectorsNumber",2),Xs([a({type:Number,attribute:"selected-index"})],Be.prototype,"selectedIndex",2),Xs([k()],Be.prototype,"maxSelectorsShown",2),Be=Xs([$("ds-carousel-indicator")],Be);const Js=e=>{const t=class extends e{constructor(...i){var n;super(i),this._internals=(n=this.attachInternals)==null?void 0:n.call(this)}};return t.formAssociated=!0,t},va=f`
|
|
452
|
+
:host {
|
|
453
|
+
display: block;
|
|
454
|
+
width: 100%;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
label {
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
display: flex;
|
|
460
|
+
justify-content: flex-start;
|
|
461
|
+
align-items: flex-start;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
input {
|
|
465
|
+
position: absolute;
|
|
466
|
+
opacity: 0;
|
|
467
|
+
width: 100%;
|
|
468
|
+
height: 100%;
|
|
469
|
+
top: 0;
|
|
470
|
+
left: 0;
|
|
471
|
+
margin: 0;
|
|
472
|
+
padding: 0;
|
|
473
|
+
z-index: 1;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.checkmark-container {
|
|
477
|
+
display: inline-flex;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.checkmark {
|
|
481
|
+
position: relative;
|
|
482
|
+
box-sizing: border-box;
|
|
483
|
+
border-style: solid;
|
|
484
|
+
transition: all 200ms ease-in-out;
|
|
485
|
+
display: inline-flex;
|
|
486
|
+
justify-content: center;
|
|
487
|
+
overflow: hidden;
|
|
488
|
+
align-items: center;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.invalid-error {
|
|
492
|
+
display: none;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.container:has(input:invalid) .invalid-error {
|
|
496
|
+
display: block;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.container:has(input:invalid) .helper-text,
|
|
500
|
+
.container.error .helper-text {
|
|
501
|
+
display: none;
|
|
502
|
+
}
|
|
503
|
+
`;var ya=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,et=(e,t,s,r)=>{for(var i=r>1?void 0:r?ba(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ya(t,s,i),i};let J=class extends Js(T){constructor(){super(...arguments),this.inputPlacement="left",this.checked=!1,this.required=!1,this.disabled=!1,this.mode="light",this.size="medium",this.helperText="",this.infoText="",this.forcedError="",this.invalidError="",this.indeterminate=!1}handleChange(t){const s=t.target;this.checked=s.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{checked:this.checked,value:this.value}}))}get classes(){return{container:!0,[this.inputPlacement]:!!this.inputPlacement,[this.mode]:!!this.mode,[this.size]:!!this.size,disabled:this.disabled,checked:this.checked,error:!!this.forcedError}}get iconTemplate(){if(!this.checked)return h;const t=this.indeterminate?"minus":"check";return this.componentFactory.createIcon({class:"icon","icon-name":t})}get styleTokens(){return M`
|
|
504
|
+
<style>
|
|
505
|
+
:host{
|
|
506
|
+
color-scheme: ${this.mode};
|
|
507
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
508
|
+
}
|
|
509
|
+
</style>
|
|
510
|
+
`}render(){return c`
|
|
511
|
+
${this.styleTokens}
|
|
512
|
+
<div class=${y(this.classes)}>
|
|
513
|
+
<label>
|
|
514
|
+
<span class="checkmark-container">
|
|
515
|
+
<span class="checkmark">
|
|
516
|
+
${this.iconTemplate}
|
|
517
|
+
<input
|
|
518
|
+
tabindex="0"
|
|
519
|
+
type="checkbox"
|
|
520
|
+
name=${this.name}
|
|
521
|
+
value=${this.value}
|
|
522
|
+
?required=${this.required}
|
|
523
|
+
?checked=${this.checked}
|
|
524
|
+
?disabled=${this.disabled}
|
|
525
|
+
@change=${this.handleChange}
|
|
526
|
+
/>
|
|
527
|
+
</span>
|
|
528
|
+
</span>
|
|
529
|
+
<div class="text-container">
|
|
530
|
+
<div class="text">
|
|
531
|
+
<slot></slot>
|
|
532
|
+
${this.infoText?c` <div class="info-text">${this.infoText}</div> `:h}
|
|
533
|
+
</div>
|
|
534
|
+
${this.helperText?c` <div class="helper-text">${this.helperText}</div> `:h}
|
|
535
|
+
${this.forcedError?c` <div class="error-text">${this.forcedError}</div> `:h}
|
|
536
|
+
${this.invalidError&&!this.forcedError?c`<div class="error-text invalid-error">${this.invalidError}</div>`:h}
|
|
537
|
+
</div>
|
|
538
|
+
</label>
|
|
539
|
+
</div>
|
|
540
|
+
`}};J.styles=[va],et([a({type:String})],J.prototype,"name",2),et([a({type:String})],J.prototype,"value",2),et([a({type:String,attribute:"input-placement"})],J.prototype,"inputPlacement",2),et([a({type:Boolean,converter:w,reflect:!0})],J.prototype,"checked",2),et([a({type:Boolean,converter:w})],J.prototype,"required",2),et([a({type:Boolean,converter:w})],J.prototype,"disabled",2),et([a({type:String,reflect:!0})],J.prototype,"mode",2),et([a({type:String})],J.prototype,"size",2),et([a({type:String,attribute:"helper-text"})],J.prototype,"helperText",2),et([a({type:String,attribute:"info-text"})],J.prototype,"infoText",2),et([a({type:String,attribute:"forced-error"})],J.prototype,"forcedError",2),et([a({type:String,attribute:"invalid-error"})],J.prototype,"invalidError",2),et([a({type:Boolean,converter:w})],J.prototype,"indeterminate",2),J=et([$("ds-checkbox")],J);const xa=f`
|
|
541
|
+
:host {
|
|
542
|
+
display: inline-block;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.container {
|
|
546
|
+
cursor: pointer;
|
|
547
|
+
display: inline-flex;
|
|
548
|
+
justify-content: center;
|
|
549
|
+
align-items: center;
|
|
550
|
+
user-select: none;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.icon {
|
|
554
|
+
cursor: pointer;
|
|
555
|
+
pointer-events: visible;
|
|
556
|
+
}
|
|
557
|
+
`;var wa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,ue=(e,t,s,r)=>{for(var i=r>1?void 0:r?$a(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&wa(t,s,i),i};let Mt=class extends T{constructor(){super(...arguments),this.mode="light",this.size="large",this.selected=!1,this.deselectable=!1,this.slottedText=""}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot.querySelector("slot").assignedNodes({flatten:!0});this.slottedText=t.filter(s=>s.nodeType===Node.TEXT_NODE).map(s=>s.textContent.trim()).join(" ")}get classes(){return{container:!0,[this.size]:!0,[this.mode]:!!this.mode,selected:this.selected,deselectable:this.deselectable}}get styleTokens(){return M`
|
|
558
|
+
<style>
|
|
559
|
+
:host{
|
|
560
|
+
color-scheme: ${this.mode};
|
|
561
|
+
pointer-events: ${this.selected?"none":"visible"};
|
|
562
|
+
}
|
|
563
|
+
</style>
|
|
564
|
+
`}handleClick(){this.selected||this.dispatchEvent(new CustomEvent("select",{bubbles:!0,composed:!0,detail:{value:this.value}}))}handleKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClick())}handleClickIcon(e){e.stopImmediatePropagation(),!(!this.deselectable||!this.selected)&&this.dispatchEvent(new CustomEvent("deselect",{bubbles:!0,composed:!0,detail:{value:this.value}}))}handleKeyDownIcon(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClickIcon(e))}get iconTemplate(){if(!this.selected||!this.deselectable)return h;const e=this.mode==="light"?"dark":"light";return this.componentFactory.createIcon({class:"icon","icon-name":"cross","data-testid":"ds-chip-icon","@click":this.handleClickIcon,"@keydown":this.handleKeyDownIcon,role:"button","aria-label":`deselect ${this.slottedText}`,tabindex:"0",mode:e})}render(){return c`
|
|
565
|
+
${this.styleTokens}
|
|
566
|
+
<div
|
|
567
|
+
role="button"
|
|
568
|
+
aria-label=${`chip ${this.slottedText}`}
|
|
569
|
+
tabindex="0"
|
|
570
|
+
data-testid="ds-chip-container"
|
|
571
|
+
class=${y(this.classes)}
|
|
572
|
+
@click=${this.handleClick}
|
|
573
|
+
@keydown=${this.handleKeyDown}
|
|
574
|
+
>
|
|
575
|
+
<slot></slot>
|
|
576
|
+
${this.iconTemplate}
|
|
577
|
+
</div>
|
|
578
|
+
`}};Mt.styles=[xa],ue([a({type:String})],Mt.prototype,"value",2),ue([a({type:String,reflect:!0})],Mt.prototype,"mode",2),ue([a({type:String,reflect:!0})],Mt.prototype,"size",2),ue([a({type:Boolean,converter:w,reflect:!0})],Mt.prototype,"selected",2),ue([a({type:Boolean,converter:w})],Mt.prototype,"deselectable",2),ue([k()],Mt.prototype,"slottedText",2),Mt=ue([$("ds-chip")],Mt);const Sa={fromAttribute(e){if(!e)return[];try{const t=JSON.parse(e);if(Array.isArray(t))return t;throw new Error}catch{return e.split(",")}},toAttribute(e){return JSON.stringify(e)}},ka=f`
|
|
579
|
+
.container {
|
|
580
|
+
display: inline-flex;
|
|
581
|
+
position: relative;
|
|
582
|
+
max-width: 100%;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.chips-container {
|
|
586
|
+
box-sizing: border-box;
|
|
587
|
+
display: inline-flex;
|
|
588
|
+
justify-content: flex-start;
|
|
589
|
+
overflow-y: auto;
|
|
590
|
+
scrollbar-width: none;
|
|
591
|
+
scroll-behavior: smooth;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.chips-container.scroll-left {
|
|
595
|
+
mask-image: linear-gradient(
|
|
596
|
+
to left,
|
|
597
|
+
rgba(0, 0, 0, 1) 0,
|
|
598
|
+
rgba(0, 0, 0, 1) calc(100% - 48px),
|
|
599
|
+
rgba(0, 0, 0, 0) calc(100% - 32px),
|
|
600
|
+
rgba(0, 0, 0, 0) 100%
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.chips-container.scroll-right {
|
|
605
|
+
mask-image: linear-gradient(
|
|
606
|
+
to right,
|
|
607
|
+
rgba(0, 0, 0, 1) 0,
|
|
608
|
+
rgba(0, 0, 0, 1) calc(100% - 48px),
|
|
609
|
+
rgba(0, 0, 0, 0) calc(100% - 32px),
|
|
610
|
+
rgba(0, 0, 0, 0) 100%
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.chips-container.scroll-left.scroll-right {
|
|
615
|
+
mask-image: linear-gradient(
|
|
616
|
+
to right,
|
|
617
|
+
rgba(0, 0, 0, 0) 0px,
|
|
618
|
+
rgba(0, 0, 0, 0) 32px,
|
|
619
|
+
rgba(0, 0, 0, 1) 48px,
|
|
620
|
+
rgba(0, 0, 0, 1) calc(100% - 48px),
|
|
621
|
+
rgba(0, 0, 0, 0) calc(100% - 32px),
|
|
622
|
+
rgba(0, 0, 0, 0) 100%
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.chips-container::-webkit-scrollbar {
|
|
627
|
+
display: none;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
::slotted(*) {
|
|
631
|
+
white-space: nowrap;
|
|
632
|
+
flex: 0 1 auto;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.scroll-button {
|
|
636
|
+
position: absolute;
|
|
637
|
+
top: 0;
|
|
638
|
+
z-index: 1;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.scroll-button.left {
|
|
642
|
+
left: 0;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.scroll-button.right {
|
|
646
|
+
right: 0;
|
|
647
|
+
}
|
|
648
|
+
`;var Ta=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,jt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ca(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ta(t,s,i),i};let bt=class extends T{constructor(){super(...arguments),this.multiChoice=null,this.size="medium",this.mode="light",this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScrollNav()}),this.handleScrollNav=()=>{var t,s,r,i;const n=((t=this.chipsContainer)==null?void 0:t.scrollLeft)+((s=this.chipsContainer)==null?void 0:s.clientWidth);this.hasScrollLeft=((r=this.chipsContainer)==null?void 0:r.scrollLeft)>0,this.hasScrollRight=n<((i=this.chipsContainer)==null?void 0:i.scrollWidth)},this.handleScrollLeft=()=>{this.chipsContainer.scrollBy({left:-150,behavior:"smooth"})},this.handleScrollRight=()=>{this.chipsContainer.scrollBy({left:150,behavior:"smooth"})}}firstUpdated(){this.handleScrollNav(),this.resizeObserver.observe(this.chipsContainer),this.chips.forEach(t=>this.resizeObserver.observe(t)),window.addEventListener("resize",this.handleScrollNav),this.chipsContainer.addEventListener("scroll",this.handleScrollNav)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener("resize",this.handleScrollNav),this.chipsContainer.removeEventListener("scroll",this.handleScrollNav)}getScrollButtonTemplate(t,s){if(t==="left"&&!this.hasScrollLeft||t==="right"&&!this.hasScrollRight)return h;const r=`arrow-${t}`;return this.componentFactory.createIconButton({class:`scroll-button ${t}`,"data-testid":`scroll-button-${t}`,"data-aria-label":`scroll-button-${t}`,"@click":s,size:this.size||"large","icon-name":r,variant:"standard",mode:this.mode})}updated(t){super.updated(t),(t.has("selectedChips")||t.has("multiChoice")||t.has("size")||t.has("mode"))&&this.updateChildChips()}updateChildChips(){var t;(t=this.chips)==null||t.forEach(s=>{var r,i;s.size=this.size,s.selected=(i=(r=this.selectedChips)==null?void 0:r.includes)==null?void 0:i.call(r,s.value),s.deselectable=!!this.multiChoice,s.mode=this.mode})}get chipsContainerClasses(){return{"chips-container":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}handleSelect(t){var s,r;let i;this.multiChoice&&!((r=(s=this.selectedChips)==null?void 0:s.includes)!=null&&r.call(s,t.detail.value))?i=[...this.selectedChips||[],t.detail.value]:i=[t.detail.value],this.selectedChips=i,this.updateChildChips(),this.dispatchEvent(new CustomEvent("ds-chips:change",{bubbles:!0,composed:!0,detail:{selectedChips:i}}))}handleDeselect(t){const s=[...(this.selectedChips||[]).filter(r=>r!==t.detail.value)];this.selectedChips=s,this.updateChildChips(),this.dispatchEvent(new CustomEvent("ds-chips:change",{bubbles:!0,composed:!0,detail:{selectedChips:s}}))}render(){return c`
|
|
649
|
+
<div
|
|
650
|
+
class="container"
|
|
651
|
+
data-testid="ds-chips-container"
|
|
652
|
+
@select=${this.handleSelect}
|
|
653
|
+
@deselect=${this.handleDeselect}
|
|
654
|
+
>
|
|
655
|
+
${this.getScrollButtonTemplate("left",this.handleScrollLeft)}
|
|
656
|
+
<nav tabindex="0" class=${y(this.chipsContainerClasses)}>
|
|
657
|
+
<slot @slotchange=${this.updateChildChips}></slot>
|
|
658
|
+
</nav>
|
|
659
|
+
${this.getScrollButtonTemplate("right",this.handleScrollRight)}
|
|
660
|
+
</div>
|
|
661
|
+
`}};bt.styles=[ka],jt([a({type:Array,attribute:"selected-chips",converter:Sa,reflect:!0})],bt.prototype,"selectedChips",2),jt([a({type:Boolean,attribute:"multi-choice",converter:w})],bt.prototype,"multiChoice",2),jt([a({type:String})],bt.prototype,"size",2),jt([a({type:String,reflect:!0})],bt.prototype,"mode",2),jt([k()],bt.prototype,"hasScrollLeft",2),jt([k()],bt.prototype,"hasScrollRight",2),jt([yt({slot:""})],bt.prototype,"chips",2),jt([Et(".chips-container")],bt.prototype,"chipsContainer",2),bt=jt([$("ds-chips")],bt);function an({value:e,locale:t,style:s,unit:r,currency:i,localeMatcher:n="lookup",minimumIntegerDigits:o=1,minimumFractionDigits:l=0,maximumFractionDigits:d=20,thousandSeparator:u,fractionSeparator:v,useGrouping:p="auto"}){let g="",b,S;const C=new Intl.NumberFormat(t,{...s&&{style:s},...r&&{unit:r},...i&&{currency:i},localeMatcher:n,minimumIntegerDigits:o,minimumFractionDigits:l,maximumFractionDigits:d,useGrouping:p}).formatToParts(e??0);return C.forEach((I,N)=>{switch(I.type){case"unit":case"currency":case"percentSign":b=I.value,S=N===0||(C[0].type==="minusSign"||C[0].type==="plusSign")&&N===1?"left":"right";break;case"group":g+=u??I.value;break;case"decimal":g+=v??I.value;break;case"integer":case"fraction":case"plusSign":case"minusSign":g+=I.value;break}}),{formattedValue:g,...b&&{unitSymbol:b},...S&&{unitSymbolPosition:S}}}const Ea=f`
|
|
662
|
+
:host {
|
|
663
|
+
display: inline;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.container {
|
|
667
|
+
display: inline-flex;
|
|
668
|
+
align-items: flex-end;
|
|
669
|
+
}
|
|
670
|
+
`;var Oa=Object.defineProperty,Ia=Object.getOwnPropertyDescriptor,q=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ia(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Oa(t,s,i),i};let V=class extends T{constructor(){super(...arguments),this.minimumFractionDigits=0,this.maximumFractionDigits=20,this.amountSize="medium",this.amountWeight="medium",this.currencySize="medium",this.currencyWeight="medium",this.periodSize="medium",this.periodWeight="medium",this.noteSize="medium",this.noteWeight="medium"}get valueTemplate(){const{formattedValue:t,unitSymbol:s,unitSymbolPosition:r}=an({value:this.amountNumber??0,locale:this.locale,style:"currency",currency:this.currencyCode,localeMatcher:"lookup",minimumFractionDigits:this.minimumFractionDigits,maximumFractionDigits:this.maximumFractionDigits}),i=this.amountText||t,n={amount:!0,text:!0,[`size-${this.amountSize}`]:!0,[`weight-${this.amountWeight}`]:!0},o={currency:!0,left:r==="left",right:r==="right",text:!0,[`size-${this.currencySize}`]:!0,[`weight-${this.currencyWeight}`]:!0};return c`
|
|
671
|
+
${r==="left"?c`<span class=${y(o)}>${s}</span>`:h}
|
|
672
|
+
<span class=${y(n)}>${i}</span>
|
|
673
|
+
${r==="right"?c`<span class=${y(o)}>${s}</span>`:h}
|
|
674
|
+
`}get periodTemplate(){if(!this.period)return h;const t=new Intl.DisplayNames(this.locale,{type:"dateTimeField"}),s={period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0};return c`
|
|
675
|
+
<span class=${y(s)}"period">/${t.of(this.period)}</span>
|
|
676
|
+
`}get noteTemplate(){if(!this.note)return h;const t={note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0};return c` <span class=${y(t)}>${this.note}</span> `}render(){return c`
|
|
677
|
+
<div class="container">
|
|
678
|
+
${this.valueTemplate}
|
|
679
|
+
${this.noteTemplate}
|
|
680
|
+
${this.periodTemplate}
|
|
681
|
+
</div>
|
|
682
|
+
`}};V.styles=[Ea],q([a({type:String})],V.prototype,"locale",2),q([a({type:String,attribute:"currency-code"})],V.prototype,"currencyCode",2),q([a({type:String,attribute:"amount-text"})],V.prototype,"amountText",2),q([a({type:Number,attribute:"amount-number"})],V.prototype,"amountNumber",2),q([a({type:Number,attribute:"minimum-fraction-digits"})],V.prototype,"minimumFractionDigits",2),q([a({type:Number,attribute:"maximum-fraction-digits"})],V.prototype,"maximumFractionDigits",2),q([a({type:String})],V.prototype,"period",2),q([a({type:String})],V.prototype,"note",2),q([a({type:String,attribute:"thousand-separator"})],V.prototype,"thousandSeparator",2),q([a({type:String,attribute:"fraction-separator"})],V.prototype,"fractionSeparator",2),q([a({type:String,attribute:"amount-size"})],V.prototype,"amountSize",2),q([a({type:String,attribute:"amount-weight"})],V.prototype,"amountWeight",2),q([a({type:String,attribute:"currency-size"})],V.prototype,"currencySize",2),q([a({type:String,attribute:"currency-weight"})],V.prototype,"currencyWeight",2),q([a({type:String,attribute:"period-size"})],V.prototype,"periodSize",2),q([a({type:String,attribute:"period-weight"})],V.prototype,"periodWeight",2),q([a({type:String,attribute:"note-size"})],V.prototype,"noteSize",2),q([a({type:String,attribute:"note-weight"})],V.prototype,"noteWeight",2),V=q([$("ds-currency")],V);const Aa=f`
|
|
683
|
+
:host {
|
|
684
|
+
display: inline-block;
|
|
685
|
+
}
|
|
686
|
+
`;var Pa=(e,t,s,r)=>{for(var i=t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};let qi=class extends T{get classes(){return{container:!0}}get styleTokens(){return M`
|
|
687
|
+
<style>
|
|
688
|
+
:host{
|
|
689
|
+
grid-area: body;
|
|
690
|
+
}
|
|
691
|
+
</style>
|
|
692
|
+
`}render(){return c`
|
|
693
|
+
${this.styleTokens}
|
|
694
|
+
<div data-testid="ds-dialog-body-container" class=${y(this.classes)}>
|
|
695
|
+
<slot name="description"></slot>
|
|
696
|
+
<slot name="image"></slot>
|
|
697
|
+
<slot></slot>
|
|
698
|
+
</div>
|
|
699
|
+
`}};qi.styles=[Aa],qi=Pa([$("ds-dialog-body")],qi);const za=f`
|
|
700
|
+
:host {
|
|
701
|
+
display: flex;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.container {
|
|
705
|
+
width: 100%;
|
|
706
|
+
}
|
|
707
|
+
`;var Na=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,ln=(e,t,s,r)=>{for(var i=r>1?void 0:r?_a(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Na(t,s,i),i};let Zs=class extends T{constructor(){super(...arguments),this.withDivider=!0}get classes(){return{container:!0}}render(){return c`
|
|
708
|
+
<div data-testid="ds-dialog-footer-container" class=${y(this.classes)}>
|
|
709
|
+
${this.withDivider?c`<div class="divider"></div>`:h}
|
|
710
|
+
<slot></slot>
|
|
711
|
+
<slot name="actions"></slot>
|
|
712
|
+
</div>
|
|
713
|
+
`}};Zs.styles=[za],ln([a({type:Boolean,attribute:"with-divider",converter:w})],Zs.prototype,"withDivider",2),Zs=ln([$("ds-dialog-footer")],Zs);const Ba=f`
|
|
714
|
+
:host {
|
|
715
|
+
display: block;
|
|
716
|
+
}
|
|
717
|
+
`;var La=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,Qs=(e,t,s,r)=>{for(var i=r>1?void 0:r?Da(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&La(t,s,i),i};let Le=class extends T{constructor(){super(...arguments),this.title="primary",this.iconSize=32}get classes(){return{container:!0}}get styleTokens(){return M`
|
|
718
|
+
<style>
|
|
719
|
+
:host{
|
|
720
|
+
grid-area: header;
|
|
721
|
+
}
|
|
722
|
+
</style>
|
|
723
|
+
`}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName,size:this.iconSize}):h}render(){return c`
|
|
724
|
+
${this.styleTokens}
|
|
725
|
+
<div data-testid="ds-dialog-header-container" class=${y(this.classes)}>
|
|
726
|
+
<div class="title-container">
|
|
727
|
+
${this.iconTemplate}
|
|
728
|
+
<div class="title">${this.title}</div>
|
|
729
|
+
</div>
|
|
730
|
+
<slot name="subtitle"></slot>
|
|
731
|
+
</div>
|
|
732
|
+
`}};Le.styles=[Ba],Qs([a({type:String})],Le.prototype,"title",2),Qs([a({type:String,attribute:"icon-name"})],Le.prototype,"iconName",2),Qs([a({type:Number,attribute:"icon-size"})],Le.prototype,"iconSize",2),Le=Qs([$("ds-dialog-header")],Le);const at={xs:f`@media(min-width: ${_t.xs}px)`,s:f`@media(min-width: ${_t.s}px)`,m:f`@media(min-width: ${_t.m}px)`,l:f`@media(min-width: ${_t.l}px)`,xl:f`@media(min-width: ${_t.xl}px)`,xxl:f`@media(min-width: ${_t.xxl}px)`},Ma=f`
|
|
733
|
+
:host {
|
|
734
|
+
transition: display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.container.close {
|
|
738
|
+
display: none;
|
|
739
|
+
opacity: 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.container {
|
|
743
|
+
position: fixed;
|
|
744
|
+
top: 0;
|
|
745
|
+
left: 0;
|
|
746
|
+
width: 100dvw;
|
|
747
|
+
height: 100dvh;
|
|
748
|
+
display: flex;
|
|
749
|
+
justify-content: center;
|
|
750
|
+
align-items: center;
|
|
751
|
+
z-index: var(--ds-z-index-modal);
|
|
752
|
+
transition:
|
|
753
|
+
opacity 0.3s cubic-bezier(0, 0, 0.2, 1),
|
|
754
|
+
display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
|
|
755
|
+
opacity: 1;
|
|
756
|
+
@starting-style {
|
|
757
|
+
opacity: 0;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.dialog {
|
|
762
|
+
padding: 0;
|
|
763
|
+
position: relative;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.content-container {
|
|
767
|
+
display: flex;
|
|
768
|
+
flex-direction: column;
|
|
769
|
+
overflow: hidden;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.ds-scroll::-webkit-scrollbar,
|
|
773
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
774
|
+
appearance: none;
|
|
775
|
+
display: initial;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.ds-scroll::-webkit-scrollbar-thumb,
|
|
779
|
+
.ds-scroll-global *::-webkit-scrollbar-thumb {
|
|
780
|
+
border-radius: var(--dg-border-radius-full);
|
|
781
|
+
background-clip: padding-box;
|
|
782
|
+
background-color: var(--dg-global-opacity-white-70);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.ds-scroll::-webkit-scrollbar-track,
|
|
786
|
+
.ds-scroll-global *::-webkit-scrollbar-track {
|
|
787
|
+
background-color: transparent;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
${at.xs} {
|
|
791
|
+
.ds-scroll::-webkit-scrollbar,
|
|
792
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
793
|
+
height: 4px;
|
|
794
|
+
width: 4px;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
${at.m} {
|
|
799
|
+
.ds-scroll::-webkit-scrollbar,
|
|
800
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
801
|
+
height: 8px;
|
|
802
|
+
width: 8px;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
`;var ja=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,De=(e,t,s,r)=>{for(var i=r>1?void 0:r?Fa(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ja(t,s,i),i};let Zt=class extends T{constructor(){super(...arguments),this.open=!1,this.size="medium",this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=Ai({func:()=>this.checkScroll()}),this.handleKeyDown=e=>{this.open&&e.key==="Escape"&&this.handleClose()}}async updated(e){super.updated(e),!this.hasBeenOpened&&e.has("open")&&this.open&&(this.hasBeenOpened=!0),e.has("open")&&this.handleResizeObserver(),e.has("open")&&this.open&&(await this.updateComplete,this.requestUpdate())}async handleResizeObserver(){var e;document.body.style.overflow=this.open?"hidden":"",(e=this.resizeObserver)==null||e.disconnect(),this.content&&(this.resizeObserver.observe(this.content),await new Promise(requestAnimationFrame),this.checkScroll())}get containerClasses(){return{container:!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}get dialogClasses(){return{dialog:!0,[this.size]:!!this.size}}handleClose(){this.open=!1,this.dispatchEvent(new Event("ds-dialog:close",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),document.body.style.overflow="",(e=this.resizeObserver)==null||e.disconnect()}checkScroll(){var e,t;this.hasScroll=((e=this.content)==null?void 0:e.scrollHeight)>((t=this.content)==null?void 0:t.clientHeight)}render(){return!this.hasBeenOpened&&!this.open?h:c`
|
|
806
|
+
<style>
|
|
807
|
+
:host {
|
|
808
|
+
display: ${this.open?"flex":"none"};
|
|
809
|
+
}
|
|
810
|
+
</style>
|
|
811
|
+
|
|
812
|
+
<div class=${y(this.containerClasses)}>
|
|
813
|
+
<div class="overlay" @click=${this.handleClose}></div>
|
|
814
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${y(this.dialogClasses)}>
|
|
815
|
+
<slot name="close-button" @click=${this.handleClose}></slot>
|
|
816
|
+
<div class="content-container">
|
|
817
|
+
<div tabindex="0" class="content ds-scroll">
|
|
818
|
+
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
819
|
+
</div>
|
|
820
|
+
<slot name="footer"></slot>
|
|
821
|
+
</div>
|
|
822
|
+
</dialog>
|
|
823
|
+
</div>
|
|
824
|
+
`}};Zt.styles=[Ma],De([a({type:Boolean,converter:w})],Zt.prototype,"open",2),De([a({type:String})],Zt.prototype,"size",2),De([k()],Zt.prototype,"hasBeenOpened",2),De([k()],Zt.prototype,"hasScroll",2),De([Et(".content")],Zt.prototype,"content",2),Zt=De([$("ds-dialog")],Zt);const Ra=f`
|
|
825
|
+
.divider {
|
|
826
|
+
border: none;
|
|
827
|
+
margin: 0;
|
|
828
|
+
}
|
|
829
|
+
`;var Ua=Object.defineProperty,Va=Object.getOwnPropertyDescriptor,ti=(e,t,s,r)=>{for(var i=r>1?void 0:r?Va(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ua(t,s,i),i};let Me=class extends T{constructor(){super(...arguments),this.orientation="horizontal",this.variant="primary",this.mode="light"}get classes(){return{divider:!0,[this.orientation]:!!this.orientation,[this.variant]:!!this.variant,[this.mode]:!!this.mode}}get styleTokens(){return M`
|
|
830
|
+
<style>
|
|
831
|
+
:host{
|
|
832
|
+
color-scheme: ${this.mode};
|
|
833
|
+
}
|
|
834
|
+
</style>
|
|
835
|
+
`}render(){return c`
|
|
836
|
+
${this.styleTokens}
|
|
837
|
+
<hr aria-orientation=${this.orientation} class=${y(this.classes)} />
|
|
838
|
+
`}};Me.styles=[Ra],ti([a({type:String})],Me.prototype,"orientation",2),ti([a({type:String})],Me.prototype,"variant",2),ti([a({type:String,reflect:!0})],Me.prototype,"mode",2),Me=ti([$("ds-divider")],Me);const Ha=f`
|
|
839
|
+
:host {
|
|
840
|
+
display: inline-flex;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.hyperlink {
|
|
844
|
+
box-sizing: border-box;
|
|
845
|
+
display: inline-block;
|
|
846
|
+
text-align: center;
|
|
847
|
+
cursor: pointer;
|
|
848
|
+
text-decoration: none;
|
|
849
|
+
padding: 0;
|
|
850
|
+
background: transparent;
|
|
851
|
+
}
|
|
852
|
+
`;var Wa=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,pe=(e,t,s,r)=>{for(var i=r>1?void 0:r?qa(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Wa(t,s,i),i};let Ft=class extends T{constructor(){super(...arguments),this.htmlTagName="a",this.mode="light",this.size="large"}handleClick(e){this.href||e.preventDefault()}get styleTokens(){return M`
|
|
853
|
+
<style>
|
|
854
|
+
:host {
|
|
855
|
+
color-scheme: ${this.mode};
|
|
856
|
+
}
|
|
857
|
+
</style>
|
|
858
|
+
`}get classes(){return{hyperlink:!0,[this.size]:!!this.size,[this.mode]:!!this.mode}}render(){return c`
|
|
859
|
+
${this.styleTokens}
|
|
860
|
+
${vs(this.htmlTagName||"a",[["button",()=>c`
|
|
861
|
+
<button class=${y(this.classes)}>
|
|
862
|
+
<slot></slot>
|
|
863
|
+
</button>
|
|
864
|
+
`],["a",()=>c`
|
|
865
|
+
<a
|
|
866
|
+
class=${y(this.classes)}
|
|
867
|
+
href=${this.href}
|
|
868
|
+
rel=${this.rel}
|
|
869
|
+
target=${this.target}
|
|
870
|
+
@click=${this.handleClick}
|
|
871
|
+
>
|
|
872
|
+
<slot></slot>
|
|
873
|
+
</a>
|
|
874
|
+
`]])}
|
|
875
|
+
`}};Ft.styles=[Ha],pe([a({type:String,attribute:"html-tag-name"})],Ft.prototype,"htmlTagName",2),pe([a({type:String,reflect:!0})],Ft.prototype,"href",2),pe([a({type:String,reflect:!0})],Ft.prototype,"rel",2),pe([a({type:String,reflect:!0})],Ft.prototype,"target",2),pe([a({type:String,reflect:!0})],Ft.prototype,"mode",2),pe([a({type:String})],Ft.prototype,"size",2),Ft=pe([$("ds-hyperlink")],Ft);const Ga=f`
|
|
876
|
+
:host {
|
|
877
|
+
display: inline-flex;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.button {
|
|
881
|
+
text-decoration: none;
|
|
882
|
+
user-select: none;
|
|
883
|
+
display: inline-flex;
|
|
884
|
+
box-sizing: border-box;
|
|
885
|
+
justify-content: center;
|
|
886
|
+
align-items: center;
|
|
887
|
+
cursor: pointer;
|
|
888
|
+
outline-style: solid;
|
|
889
|
+
padding: 0;
|
|
890
|
+
}
|
|
891
|
+
`;var Ka=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,xt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ya(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ka(t,s,i),i};let lt=class extends Jt(T){constructor(){super(...arguments),this.variant="primary",this.mode="light",this.size="large",this.disabled=!1,this.htmlTagName="button"}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName}):h}handleClick(t){this.href||t.preventDefault()}get classes(){const t=typeof this.size=="string"?this.size:this.size[this.viewport];return{button:!0,custom:this.htmlTagName==="custom",disabled:this.disabled,[t]:!!t,[this.mode]:!!this.mode,[this.variant]:!!this.variant}}get variantColorTokens(){return M`
|
|
892
|
+
<style>
|
|
893
|
+
:host{
|
|
894
|
+
color-scheme: ${this.mode};
|
|
895
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
896
|
+
}
|
|
897
|
+
</style>
|
|
898
|
+
`}render(){return c`
|
|
899
|
+
<style>
|
|
900
|
+
:host {
|
|
901
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
902
|
+
}
|
|
903
|
+
</style>
|
|
904
|
+
${this.variantColorTokens}
|
|
905
|
+
${vs(this.htmlTagName||"button",[["button",()=>c`
|
|
906
|
+
<button
|
|
907
|
+
?disabled=${this.disabled}
|
|
908
|
+
class=${y(this.classes)}
|
|
909
|
+
aria-label=${this.dataAriaLabel}
|
|
910
|
+
>
|
|
911
|
+
${this.iconTemplate}
|
|
912
|
+
</button>
|
|
913
|
+
`],["a",()=>c`
|
|
914
|
+
<a
|
|
915
|
+
?disabled=${this.disabled}
|
|
916
|
+
class=${y(this.classes)}
|
|
917
|
+
href=${this.href}
|
|
918
|
+
rel=${this.rel}
|
|
919
|
+
target=${this.target}
|
|
920
|
+
@click=${this.handleClick}
|
|
921
|
+
aria-label=${this.dataAriaLabel}
|
|
922
|
+
>
|
|
923
|
+
${this.iconTemplate}
|
|
924
|
+
</a>
|
|
925
|
+
`],["custom",()=>c`
|
|
926
|
+
<div class=${y(this.classes)}>
|
|
927
|
+
<slot></slot>
|
|
928
|
+
</div>
|
|
929
|
+
`]])}
|
|
930
|
+
`}};lt.styles=[Ga],xt([a({type:String})],lt.prototype,"variant",2),xt([a({type:String,reflect:!0})],lt.prototype,"mode",2),xt([a({type:String,converter:gs})],lt.prototype,"size",2),xt([a({type:Boolean,converter:w})],lt.prototype,"disabled",2),xt([a({type:String,attribute:"icon-name"})],lt.prototype,"iconName",2),xt([a({type:String,attribute:"html-tag-name"})],lt.prototype,"htmlTagName",2),xt([a({type:String,attribute:"data-aria-label"})],lt.prototype,"dataAriaLabel",2),xt([a({type:String,reflect:!0})],lt.prototype,"href",2),xt([a({type:String,reflect:!0})],lt.prototype,"rel",2),xt([a({type:String,reflect:!0})],lt.prototype,"target",2),lt=xt([$("ds-icon-button")],lt);const cn=(class Fs{constructor(){this.icons={},this.handleChangeTheme=t=>{this.theme=t;const s=Object.keys(this.icons);this.icons={},s.forEach(r=>this.fetchIcon(r))},this.fetchIcon=async(t,s={})=>(!this.theme&&window.DS_THEME&&(this.theme=window.DS_THEME),await this.getCachedIcon(t)||(this.icons[t]=this.loadIcon(t,s),this.icons[t])),Ae.subscribe("theme",this.handleChangeTheme)}static getInstance(){return Fs.instance||(Fs.instance=new Fs),Fs.instance}getCachedIcon(t){return this.icons[t]}loadIcon(t,{cache:s="force-cache",...r}){return this.theme?fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${t}.svg`,{cache:s,...r}).then(i=>i.text()).catch(i=>((i==null?void 0:i.name)!=="AbortError"&&console.error(`Failed to fetch icon "${t}":`,i),"")):Promise.resolve('<svg class="ds-icon"></svg>')}}).getInstance();var Xa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,dn=e=>{throw TypeError(e)},me=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ja(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Xa(t,s,i),i},hn=(e,t,s)=>t.has(e)||dn("Cannot "+s),un=(e,t,s)=>(hn(e,t,"read from private field"),t.get(e)),Za=(e,t,s)=>t.has(e)?dn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Qa=(e,t,s,r)=>(hn(e,t,"write to private field"),t.set(e,s),s),ys;let Rt=class extends T{constructor(){super(),this.iconHtml="",Za(this,ys),this.getIcon=async()=>{var e,t;(e=un(this,ys))==null||e.abort(),Qa(this,ys,new AbortController);const s=un(this,ys).signal;this.iconHtml=await((t=cn.fetchIcon)==null?void 0:t.call(cn,this.iconName,{signal:s}))},Ae.subscribe("theme",this.getIcon)}async updated(e){super.updated(e),(e.has("iconName")||!this.iconHtml)&&await this.getIcon()}getDimension(e,t,s){return e?`${e}px`:t?"auto":this.size?`${this.size}px`:s}get styleTokens(){const e=this.getDimension(this.width,this.height,"var(--private-ds-icon-width, var(--ds-icon-width, 20px))"),t=this.getDimension(this.height,this.width,"var(--private-ds-icon-height, var(--ds-icon-height, 20px))");return M`
|
|
931
|
+
<style>
|
|
932
|
+
.ds-icon {
|
|
933
|
+
display: inline-block;
|
|
934
|
+
width: ${e};
|
|
935
|
+
height: ${t};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.ds-icon-color {
|
|
939
|
+
fill: ${this.color?this.color:"var(--private-ds-icon-color, var(--ds-icon-color, black))"};
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.ds-icon-color-stroke {
|
|
943
|
+
stroke: ${this.color?this.color:"var(--private-ds-icon-color, var(--ds-icon-color, black))"};
|
|
944
|
+
}
|
|
945
|
+
</style>
|
|
946
|
+
`}render(){return c`
|
|
947
|
+
${this.styleTokens}
|
|
948
|
+
${this.iconHtml?Ks(this.iconHtml):c`<svg class="ds-icon"></svg>`}
|
|
949
|
+
`}};ys=new WeakMap,Rt.styles=f`
|
|
950
|
+
:host {
|
|
951
|
+
line-height: 0;
|
|
952
|
+
display: inline-block;
|
|
953
|
+
}
|
|
954
|
+
`,me([a({type:String,attribute:"icon-name"})],Rt.prototype,"iconName",2),me([a({type:String,attribute:"color"})],Rt.prototype,"color",2),me([a({type:Number})],Rt.prototype,"width",2),me([a({type:Number})],Rt.prototype,"height",2),me([a({type:Number,attribute:"size"})],Rt.prototype,"size",2),me([k()],Rt.prototype,"iconHtml",2),Rt=me([$("ds-icon")],Rt);var tl=Object.defineProperty,Gi=(e,t,s,r)=>{for(var i=void 0,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(t,s,i)||i);return i&&tl(t,s,i),i};let bs=class extends Lt{constructor(){super(),this.handleChangeTheme=t=>{this.pubSubTheme=t},this.pubSubTheme=Ae.subscribe("theme",this.handleChangeTheme)}connectedCallback(){super.connectedCallback(),this.applyTheme()}updated(t){super.updated(t),(t.has("contextTheme")||t.has("pubSubTheme"))&&(this.theme=this.contextTheme??this.pubSubTheme,this.applyTheme())}applyTheme(){var t;const s=this.constructor,r=(t=s.themesStyles)==null?void 0:t[this.theme],i=Array.isArray(r)?r:[r];if(!(i!=null&&i.length))return;const n=Array.isArray(s.styles)?s.styles:[s.styles];Bi(this.shadowRoot,[...n,...i].filter(Boolean))}};Gi([a({attribute:!1}),Dr({context:zi,subscribe:!0})],bs.prototype,"contextTheme"),Gi([k()],bs.prototype,"pubSubTheme"),Gi([k()],bs.prototype,"theme");const el=f`
|
|
955
|
+
:host {
|
|
956
|
+
display: block;
|
|
957
|
+
width: 100%;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.label,
|
|
961
|
+
.error-text,
|
|
962
|
+
.helper-text {
|
|
963
|
+
user-select: none;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.label {
|
|
967
|
+
position: absolute;
|
|
968
|
+
top: 0;
|
|
969
|
+
left: 0;
|
|
970
|
+
transform-origin: top left;
|
|
971
|
+
pointer-events: none;
|
|
972
|
+
transition:
|
|
973
|
+
transform 0.2s,
|
|
974
|
+
font-size 0.2s;
|
|
975
|
+
white-space: nowrap;
|
|
976
|
+
}
|
|
977
|
+
`,sl=f`
|
|
978
|
+
.container {
|
|
979
|
+
position: relative;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.input-field::-webkit-search-decoration,
|
|
983
|
+
.input-field::-webkit-search-cancel-button,
|
|
984
|
+
.input-field::-webkit-search-results-button,
|
|
985
|
+
.input-field::-webkit-search-results-decoration,
|
|
986
|
+
.input-field:not(.number)::-webkit-inner-spin-button,
|
|
987
|
+
.input-field::-webkit-calendar-picker-indicator {
|
|
988
|
+
display: none;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.input-field {
|
|
992
|
+
box-sizing: border-box;
|
|
993
|
+
width: 100%;
|
|
994
|
+
border: none;
|
|
995
|
+
outline: none;
|
|
996
|
+
background-color: transparent;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
.inner-container {
|
|
1000
|
+
align-items: center;
|
|
1001
|
+
display: flex;
|
|
1002
|
+
position: relative;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.input-field:focus {
|
|
1006
|
+
outline: none;
|
|
1007
|
+
}
|
|
1008
|
+
`,il=f`
|
|
1009
|
+
.container {
|
|
1010
|
+
padding: 16px 0 0 0;
|
|
1011
|
+
}
|
|
1012
|
+
.inner-container {
|
|
1013
|
+
border-bottom-style: solid;
|
|
1014
|
+
border-bottom-width: 1px;
|
|
1015
|
+
margin-top: 4px;
|
|
1016
|
+
}
|
|
1017
|
+
.light .inner-container {
|
|
1018
|
+
border-bottom-color: var(--ds-color-dark-grey);
|
|
1019
|
+
}
|
|
1020
|
+
.dark .inner-container {
|
|
1021
|
+
border-bottom-color: var(--ds-color-medium-grey);
|
|
1022
|
+
}
|
|
1023
|
+
.success.light .inner-container {
|
|
1024
|
+
border-bottom-color: var(--ds-color-green-100);
|
|
1025
|
+
}
|
|
1026
|
+
.success.dark .inner-container {
|
|
1027
|
+
border-bottom-color: var(--ds-color-green-100);
|
|
1028
|
+
}
|
|
1029
|
+
:focus.light .inner-container {
|
|
1030
|
+
border-bottom-color: var(--ds-color-black);
|
|
1031
|
+
}
|
|
1032
|
+
.focused.dark .inner-container {
|
|
1033
|
+
border-bottom-color: var(--ds-color-light-grey);
|
|
1034
|
+
}
|
|
1035
|
+
.error.light .inner-container {
|
|
1036
|
+
border-bottom-color: #b50303;
|
|
1037
|
+
}
|
|
1038
|
+
.error.dark .inner-container {
|
|
1039
|
+
border-bottom-color: #ec8b8b;
|
|
1040
|
+
}
|
|
1041
|
+
.disabled.light .inner-container {
|
|
1042
|
+
border-bottom-color: var(--ds-color-medium-grey);
|
|
1043
|
+
}
|
|
1044
|
+
.disabled.dark .inner-container {
|
|
1045
|
+
border-bottom-color: var(--ds-color-dark-grey);
|
|
1046
|
+
}
|
|
1047
|
+
.input-field {
|
|
1048
|
+
padding: 0 0 8px 0;
|
|
1049
|
+
}
|
|
1050
|
+
.large .input-field {
|
|
1051
|
+
font: var(--ds-font-cupra-light-30-title);
|
|
1052
|
+
}
|
|
1053
|
+
.small .input-field {
|
|
1054
|
+
font: var(--ds-font-cupra-light-20-title);
|
|
1055
|
+
}
|
|
1056
|
+
.light .input-field {
|
|
1057
|
+
color: var(--ds-color-black);
|
|
1058
|
+
}
|
|
1059
|
+
.dark .input-field {
|
|
1060
|
+
color: var(--ds-color-white);
|
|
1061
|
+
}
|
|
1062
|
+
.disabled.light .input-field {
|
|
1063
|
+
color: var(--ds-color-off-white);
|
|
1064
|
+
}
|
|
1065
|
+
.disabled.dark .input-field {
|
|
1066
|
+
color: var(--ds-color-grey);
|
|
1067
|
+
}
|
|
1068
|
+
.error-text {
|
|
1069
|
+
font: var(--ds-font-cupra-light-10);
|
|
1070
|
+
margin-top: 4px;
|
|
1071
|
+
}
|
|
1072
|
+
.light .error-text {
|
|
1073
|
+
color: #b50303;
|
|
1074
|
+
}
|
|
1075
|
+
.dark .error-text {
|
|
1076
|
+
color: #ec8b8b;
|
|
1077
|
+
}
|
|
1078
|
+
.helper-text {
|
|
1079
|
+
font: var(--ds-font-cupra-light-10);
|
|
1080
|
+
margin-top: 4px;
|
|
1081
|
+
}
|
|
1082
|
+
.light .helper-text {
|
|
1083
|
+
color: var(--ds-color-grey);
|
|
1084
|
+
}
|
|
1085
|
+
.dark .helper-text {
|
|
1086
|
+
color: var(--ds-color-off-white);
|
|
1087
|
+
}
|
|
1088
|
+
.disabled.light .helper-text {
|
|
1089
|
+
color: var(--ds-color-off-white);
|
|
1090
|
+
}
|
|
1091
|
+
.disabled.dark .helper-text {
|
|
1092
|
+
color: var(--ds-color-grey);
|
|
1093
|
+
}
|
|
1094
|
+
.large .label {
|
|
1095
|
+
font: var(--ds-font-cupra-light-30-title);
|
|
1096
|
+
}
|
|
1097
|
+
.small .label {
|
|
1098
|
+
font: var(--ds-font-cupra-light-20-title);
|
|
1099
|
+
}
|
|
1100
|
+
.light .label {
|
|
1101
|
+
color: var(--ds-color-grey);
|
|
1102
|
+
}
|
|
1103
|
+
.dark .label {
|
|
1104
|
+
color: var(--ds-color-off-white);
|
|
1105
|
+
}
|
|
1106
|
+
.disabled.light .label {
|
|
1107
|
+
color: var(--ds-color-off-white);
|
|
1108
|
+
}
|
|
1109
|
+
.disabled.dark .label {
|
|
1110
|
+
color: var(--ds-color-grey);
|
|
1111
|
+
}
|
|
1112
|
+
.light .icon {
|
|
1113
|
+
--ds-icon-color: var(--ds-color-dark-grey);
|
|
1114
|
+
}
|
|
1115
|
+
.dark .icon {
|
|
1116
|
+
--ds-icon-color: var(--ds-color-light-grey);
|
|
1117
|
+
}
|
|
1118
|
+
.disabled.light .icon {
|
|
1119
|
+
--ds-icon-color: var(--ds-color-medium-grey);
|
|
1120
|
+
}
|
|
1121
|
+
.disabled.dark .icon {
|
|
1122
|
+
--ds-icon-color: var(--ds-color-dark-grey);
|
|
1123
|
+
}
|
|
1124
|
+
`,rl=[il];var nl=Object.defineProperty,wt=(e,t,s,r)=>{for(var i=void 0,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(t,s,i)||i);return i&&nl(t,s,i),i};const Ki=class extends Js(bs){constructor(){super(...arguments),this.initialValue="",this.label="",this.helperText="",this.errorText="",this.disabled=!1,this.success=!1,this.mode="light",this.size="large",this.focused=!1,this.handleFocus=()=>{this.focused=!0},this.handleBlur=()=>{this.focused=!1}}firstUpdated(){this._value=this.initialValue}get value(){return this._value}set value(t){this._value=t}get classes(){return{container:!0,focused:this.focused,error:!!this.errorText,success:this.success,disabled:this.disabled,[this.size]:!0,[this.mode]:!0}}get styleTokens(){return M`
|
|
1125
|
+
<style>
|
|
1126
|
+
:host{
|
|
1127
|
+
color-scheme: ${this.mode};
|
|
1128
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
1129
|
+
}
|
|
1130
|
+
</style>
|
|
1131
|
+
`}render(){return c`
|
|
1132
|
+
${this.styleTokens}
|
|
1133
|
+
<div class=${y(this.classes)}>
|
|
1134
|
+
<div class="inner-container">
|
|
1135
|
+
${this.labelTemplate}
|
|
1136
|
+
${this.inputTemplate}
|
|
1137
|
+
${this.iconTemplate}
|
|
1138
|
+
</div>
|
|
1139
|
+
<div class="helper-text">${this.helperText}</div>
|
|
1140
|
+
<div class="error-text">${this.errorText}</div>
|
|
1141
|
+
${this.dropdownTemplate}
|
|
1142
|
+
</div>
|
|
1143
|
+
`}};Ki.styles=[el,sl],Ki.themesStyles={cupra:rl};let ut=Ki;wt([a({type:String,reflect:!0,attribute:"initial-value"})],ut.prototype,"initialValue"),wt([a({type:String})],ut.prototype,"label"),wt([a({type:String,attribute:"helper-text"})],ut.prototype,"helperText"),wt([a({type:String,attribute:"error-text"})],ut.prototype,"errorText"),wt([a({type:Boolean,converter:w})],ut.prototype,"disabled"),wt([a({type:Boolean,converter:w})],ut.prototype,"success"),wt([a({type:String,reflect:!0})],ut.prototype,"mode"),wt([a({type:String})],ut.prototype,"size"),wt([k()],ut.prototype,"_value"),wt([k()],ut.prototype,"focused"),wt([Et(".input-field")],ut.prototype,"inputField");var ol=Object.defineProperty,al=Object.getOwnPropertyDescriptor,Ut=(e,t,s,r)=>{for(var i=r>1?void 0:r?al(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ol(t,s,i),i};let It=class extends ut{constructor(){super(...arguments),this.name="",this.placeholder="",this.type="text",this.min=0,this.max=100,this.step=1,this._hasPicker=!1,this.handleClickIcon=()=>{var t,s;(s=(t=this.inputField)==null?void 0:t.showPicker)==null||s.call(t)},this.handleInput=t=>{const s=t.target;this._value=s.value||""}}firstUpdated(){var t;super.firstUpdated(),this._hasPicker=!!((t=this.inputField)!=null&&t.showPicker)}get iconTemplate(){if(this.type!=="time"&&this.type!=="date")return h;let t;switch(this.type){case"date":t="calendar";break;case"time":t="clock";break}return c`
|
|
1144
|
+
<style>
|
|
1145
|
+
.icon {
|
|
1146
|
+
cursor: ${this._hasPicker?"pointer":"auto"};
|
|
1147
|
+
}
|
|
1148
|
+
</style>
|
|
1149
|
+
${this.componentFactory.createIcon({class:"icon","icon-name":t,"@click":this.handleClickIcon})}
|
|
1150
|
+
`}get labelTemplate(){return c`
|
|
1151
|
+
<label
|
|
1152
|
+
id="label"
|
|
1153
|
+
class="label"
|
|
1154
|
+
style=${this.focused||this._value||["date","time"].includes(this.type)?"transform: translateY(-18px); font-size: 12px;":"transform: translateY(0);"}
|
|
1155
|
+
>
|
|
1156
|
+
${this.label}
|
|
1157
|
+
</label>
|
|
1158
|
+
`}get inputTemplate(){return c`
|
|
1159
|
+
${vs(this.type==="number",[[!0,()=>c`
|
|
1160
|
+
<input
|
|
1161
|
+
aria-labelledby="label"
|
|
1162
|
+
class="input-field number"
|
|
1163
|
+
type=${this.type}
|
|
1164
|
+
min="${this.min}"
|
|
1165
|
+
max="${this.max}"
|
|
1166
|
+
step="${this.step}"
|
|
1167
|
+
name=${this.name}
|
|
1168
|
+
placeholder=${this.focused?this.placeholder:""}
|
|
1169
|
+
value=${this._value}
|
|
1170
|
+
@focus=${this.handleFocus}
|
|
1171
|
+
@blur=${this.handleBlur}
|
|
1172
|
+
@input=${this.handleInput}
|
|
1173
|
+
/>
|
|
1174
|
+
`],[!1,()=>c`
|
|
1175
|
+
<input
|
|
1176
|
+
aria-labelledby="label"
|
|
1177
|
+
class="input-field"
|
|
1178
|
+
type=${this.type}
|
|
1179
|
+
maxlength=${this.maxLength}
|
|
1180
|
+
name=${this.name}
|
|
1181
|
+
placeholder=${this.focused?this.placeholder:""}
|
|
1182
|
+
value=${this._value}
|
|
1183
|
+
@focus=${this.handleFocus}
|
|
1184
|
+
@blur=${this.handleBlur}
|
|
1185
|
+
@input=${this.handleInput}
|
|
1186
|
+
/>
|
|
1187
|
+
`]])}
|
|
1188
|
+
`}get dropdownTemplate(){return h}};Ut([a({type:String})],It.prototype,"name",2),Ut([a({type:String})],It.prototype,"placeholder",2),Ut([a({type:String,attribute:"max-length"})],It.prototype,"maxLength",2),Ut([a({type:String})],It.prototype,"type",2),Ut([a({type:Number})],It.prototype,"min",2),Ut([a({type:Number})],It.prototype,"max",2),Ut([a({type:Number})],It.prototype,"step",2),Ut([k()],It.prototype,"_hasPicker",2),It=Ut([$("ds-input",{skipTagAsComponentName:!0})],It);const ll=f`
|
|
1189
|
+
:host {
|
|
1190
|
+
display: inline-flex;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.link-button {
|
|
1194
|
+
background: transparent;
|
|
1195
|
+
border: none;
|
|
1196
|
+
outline: none;
|
|
1197
|
+
text-align: center;
|
|
1198
|
+
padding: 0;
|
|
1199
|
+
display: inline-flex;
|
|
1200
|
+
justify-content: center;
|
|
1201
|
+
align-items: center;
|
|
1202
|
+
cursor: pointer;
|
|
1203
|
+
}
|
|
1204
|
+
`;var cl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,$t=(e,t,s,r)=>{for(var i=r>1?void 0:r?dl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&cl(t,s,i),i};let ct=class extends T{constructor(){super(...arguments),this.mode="light",this.size="large",this.underline=!1,this.disabled=!1,this.iconName="arrow-right",this.iconPosition="right"}get iconTemplate(){return this.iconName==="none"?h:this.componentFactory.createIcon({class:"icon","icon-name":this.iconName})}get classes(){return{"link-button":!0,disabled:!!this.disabled,underline:!!this.underline,[this.size]:!0,[this.mode]:!!this.mode}}handleClick(t){this.href||t.preventDefault()}get styleTokens(){return M`
|
|
1205
|
+
<style>
|
|
1206
|
+
:host{
|
|
1207
|
+
color-scheme: ${this.mode};
|
|
1208
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
1209
|
+
}
|
|
1210
|
+
</style>
|
|
1211
|
+
`}render(){return c`
|
|
1212
|
+
${this.styleTokens}
|
|
1213
|
+
${vs(this.htmlTagName||"button",[["button",()=>c`
|
|
1214
|
+
<button class=${y(this.classes)} ?disabled=${this.disabled}>
|
|
1215
|
+
${this.iconPosition==="left"?this.iconTemplate:h}
|
|
1216
|
+
<slot></slot>
|
|
1217
|
+
${this.iconPosition==="right"?this.iconTemplate:h}
|
|
1218
|
+
</button>
|
|
1219
|
+
`],["a",()=>c`
|
|
1220
|
+
<a
|
|
1221
|
+
class=${y(this.classes)}
|
|
1222
|
+
href=${this.href}
|
|
1223
|
+
rel=${this.rel}
|
|
1224
|
+
target=${this.target}
|
|
1225
|
+
@click=${this.handleClick}
|
|
1226
|
+
?disabled=${this.disabled}
|
|
1227
|
+
>
|
|
1228
|
+
${this.iconPosition==="left"?this.iconTemplate:h}
|
|
1229
|
+
<slot></slot>
|
|
1230
|
+
${this.iconPosition==="right"?this.iconTemplate:h}
|
|
1231
|
+
</a>
|
|
1232
|
+
`]])}
|
|
1233
|
+
`}};ct.styles=[ll],$t([a({type:String,reflect:!0})],ct.prototype,"mode",2),$t([a({type:String})],ct.prototype,"size",2),$t([a({type:Boolean,converter:w})],ct.prototype,"underline",2),$t([a({type:Boolean,converter:w})],ct.prototype,"disabled",2),$t([a({type:String,attribute:"html-tag-name"})],ct.prototype,"htmlTagName",2),$t([a({type:String,reflect:!0})],ct.prototype,"href",2),$t([a({type:String,reflect:!0})],ct.prototype,"rel",2),$t([a({type:String,reflect:!0})],ct.prototype,"target",2),$t([a({type:String,attribute:"icon-name"})],ct.prototype,"iconName",2),$t([a({type:String,attribute:"icon-position"})],ct.prototype,"iconPosition",2),ct=$t([$("ds-link-button")],ct);const hl=f`
|
|
1234
|
+
.track {
|
|
1235
|
+
width: 100%;
|
|
1236
|
+
position: relative;
|
|
1237
|
+
overflow: hidden;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
.fill {
|
|
1241
|
+
position: absolute;
|
|
1242
|
+
top: 0;
|
|
1243
|
+
left: 0;
|
|
1244
|
+
height: 100%;
|
|
1245
|
+
display: block;
|
|
1246
|
+
}
|
|
1247
|
+
`,ul=f`
|
|
1248
|
+
.track.large {
|
|
1249
|
+
height: 4px;
|
|
1250
|
+
}
|
|
1251
|
+
.track.small {
|
|
1252
|
+
height: 2px;
|
|
1253
|
+
}
|
|
1254
|
+
.track.light {
|
|
1255
|
+
background-color: var(--ds-color-off-white);
|
|
1256
|
+
}
|
|
1257
|
+
.track.dark {
|
|
1258
|
+
background-color: var(--ds-color-off-white);
|
|
1259
|
+
}
|
|
1260
|
+
.light .fill {
|
|
1261
|
+
background-color: var(--ds-color-black);
|
|
1262
|
+
}
|
|
1263
|
+
.dark .fill {
|
|
1264
|
+
background-color: var(--ds-color-white);
|
|
1265
|
+
}
|
|
1266
|
+
`,pl=[ul],ml=f`
|
|
1267
|
+
.track.large {
|
|
1268
|
+
height: 4px;
|
|
1269
|
+
}
|
|
1270
|
+
.track.small {
|
|
1271
|
+
height: 2px;
|
|
1272
|
+
}
|
|
1273
|
+
.track.light {
|
|
1274
|
+
background-color: var(--ds-color-off-white);
|
|
1275
|
+
}
|
|
1276
|
+
.track.dark {
|
|
1277
|
+
background-color: var(--ds-color-off-white);
|
|
1278
|
+
}
|
|
1279
|
+
.light .fill {
|
|
1280
|
+
background-color: var(--ds-color-black);
|
|
1281
|
+
}
|
|
1282
|
+
.dark .fill {
|
|
1283
|
+
background-color: var(--ds-color-white);
|
|
1284
|
+
}
|
|
1285
|
+
`,fl=[ml],gl=f``,vl=[gl];var yl=Object.defineProperty,Yi=(e,t,s,r)=>{for(var i=void 0,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(t,s,i)||i);return i&&yl(t,s,i),i};const Xi=class extends bs{constructor(){super(...arguments),this.show=!1,this.mode="light",this.size="large"}get classes(){return{track:!0,[this.size]:!0,[this.mode]:!!this.mode}}get styleTokens(){return M`
|
|
1286
|
+
<style>
|
|
1287
|
+
:host {
|
|
1288
|
+
color-scheme: ${this.mode};
|
|
1289
|
+
}
|
|
1290
|
+
</style>
|
|
1291
|
+
`}get barTemplate(){return c`
|
|
1292
|
+
${this.styleTokens}
|
|
1293
|
+
<div class=${y(this.classes)}>
|
|
1294
|
+
<div class="fill"></div>
|
|
1295
|
+
</div>
|
|
1296
|
+
`}};Xi.styles=[hl],Xi.themesStyles={cupra:fl,"cupra-diagonal":pl,seat:vl};let xs=Xi;Yi([a({type:Boolean,converter:w})],xs.prototype,"show"),Yi([a({type:String,reflect:!0})],xs.prototype,"mode"),Yi([a({type:String})],xs.prototype,"size");const bl=f`
|
|
1297
|
+
.fill {
|
|
1298
|
+
width: 33%;
|
|
1299
|
+
transform: translateX(-100%);
|
|
1300
|
+
animation: loader 1.4s linear infinite;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
@keyframes loader {
|
|
1304
|
+
0% {
|
|
1305
|
+
transform: translateX(-100%);
|
|
1306
|
+
}
|
|
1307
|
+
100% {
|
|
1308
|
+
transform: translateX(300%);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
`;var xl=Object.getPrototypeOf,wl=Reflect.get,$l=(e,t,s,r)=>{for(var i=t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i},Sl=(e,t,s)=>wl(xl(e),s,t);let ws=class extends xs{render(){return this.show?this.barTemplate:h}};ws.styles=[...Sl(ws,ws,"styles"),bl],ws=$l([$("ds-loader-bar",{skipTagAsComponentName:!0})],ws);function fe(e,...t){const s=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v1-0-0-canary-9"),r=Fr(s);return f`${r}`}const kl=fe`
|
|
1312
|
+
.container {
|
|
1313
|
+
display: inline-flex;
|
|
1314
|
+
justify-content: center;
|
|
1315
|
+
align-items: center;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.dot.middle {
|
|
1319
|
+
animation-delay: 0.4s;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
.dot.last {
|
|
1323
|
+
animation-delay: 0.8s;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.dot {
|
|
1327
|
+
border-radius: 50%;
|
|
1328
|
+
animation-name: loader;
|
|
1329
|
+
animation-timing-function: linear;
|
|
1330
|
+
animation-iteration-count: infinite;
|
|
1331
|
+
animation-fill-mode: forwards;
|
|
1332
|
+
animation-duration: 2s;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
@keyframes loader {
|
|
1336
|
+
0% { opacity: 1 }
|
|
1337
|
+
18% { opacity: 0.2 }
|
|
1338
|
+
82% { opacity: 0.6 }
|
|
1339
|
+
100% { opacity: 1 }
|
|
1340
|
+
}
|
|
1341
|
+
`;var Tl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,ei=(e,t,s,r)=>{for(var i=r>1?void 0:r?Cl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Tl(t,s,i),i};let je=class extends T{constructor(){super(...arguments),this.show=!1,this.mode="light",this.size="large"}get classes(){return{container:!0,[this.size]:!0,[this.mode]:!!this.mode}}get styleTokens(){return M`
|
|
1342
|
+
<style>
|
|
1343
|
+
:host {
|
|
1344
|
+
color-scheme: ${this.mode};
|
|
1345
|
+
}
|
|
1346
|
+
</style>
|
|
1347
|
+
`}render(){return this.show?c`
|
|
1348
|
+
${this.styleTokens}
|
|
1349
|
+
<div class=${y(this.classes)}>
|
|
1350
|
+
<div class="dot first"></div>
|
|
1351
|
+
<div class="dot middle"></div>
|
|
1352
|
+
<div class="dot last"></div>
|
|
1353
|
+
</div>
|
|
1354
|
+
`:h}};je.styles=[kl],ei([a({type:Boolean,converter:w})],je.prototype,"show",2),ei([a({type:String,reflect:!0})],je.prototype,"mode",2),ei([a({type:String})],je.prototype,"size",2),je=ei([$("ds-loader-dots")],je);const El=f`
|
|
1355
|
+
.backdrop {
|
|
1356
|
+
display: flex;
|
|
1357
|
+
position: fixed;
|
|
1358
|
+
height: 100dvh;
|
|
1359
|
+
width: 100dvw;
|
|
1360
|
+
left: 0;
|
|
1361
|
+
top: 0;
|
|
1362
|
+
justify-content: center;
|
|
1363
|
+
align-items: center;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/* WebKit and Opera browsers */
|
|
1367
|
+
@-webkit-keyframes spinner {
|
|
1368
|
+
from {
|
|
1369
|
+
-webkit-transform: rotateY(0deg);
|
|
1370
|
+
}
|
|
1371
|
+
to {
|
|
1372
|
+
-webkit-transform: rotateY(-360deg);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/* all other browsers */
|
|
1377
|
+
@keyframes spinner {
|
|
1378
|
+
from {
|
|
1379
|
+
-moz-transform: rotateY(0deg);
|
|
1380
|
+
-ms-transform: rotateY(0deg);
|
|
1381
|
+
transform: rotateY(0deg);
|
|
1382
|
+
}
|
|
1383
|
+
to {
|
|
1384
|
+
-moz-transform: rotateY(-360deg);
|
|
1385
|
+
-ms-transform: rotateY(-360deg);
|
|
1386
|
+
transform: rotateY(-360deg);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.container {
|
|
1391
|
+
position: relative;
|
|
1392
|
+
perspective: 1000px;
|
|
1393
|
+
animation-name: spinner;
|
|
1394
|
+
animation-timing-function: ease-in-out;
|
|
1395
|
+
animation-iteration-count: infinite;
|
|
1396
|
+
animation-duration: 2s;
|
|
1397
|
+
transform-style: preserve-3d;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.logo {
|
|
1401
|
+
position: absolute;
|
|
1402
|
+
top: 0;
|
|
1403
|
+
left: 0;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.front-logo {
|
|
1407
|
+
z-index: 1;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.back-logo {
|
|
1411
|
+
z-index: 0;
|
|
1412
|
+
}
|
|
1413
|
+
`;var Ol=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,$s=(e,t,s,r)=>{for(var i=r>1?void 0:r?Il(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ol(t,s,i),i};let ge=class extends T{constructor(){super(...arguments),this.show=!1,this.zIndex=2e3,this.iconName="logo"}get styleTokens(){return c`
|
|
1414
|
+
<style>
|
|
1415
|
+
:host {
|
|
1416
|
+
--ds-icon-color: ${this.color||"var(--ds-loader-logo-icon-color)"};
|
|
1417
|
+
}
|
|
1418
|
+
</style>
|
|
1419
|
+
`}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName}):h}render(){return this.show?c`
|
|
1420
|
+
<style>
|
|
1421
|
+
.backdrop {
|
|
1422
|
+
z-index: ${this.zIndex};
|
|
1423
|
+
}
|
|
1424
|
+
</style>
|
|
1425
|
+
${this.styleTokens}
|
|
1426
|
+
<div class="backdrop">
|
|
1427
|
+
<div class="container">${this.iconTemplate}</div>
|
|
1428
|
+
</div>
|
|
1429
|
+
`:h}};ge.styles=[El],$s([a({type:Boolean,converter:w})],ge.prototype,"show",2),$s([a({type:Number,attribute:"z-index"})],ge.prototype,"zIndex",2),$s([a({type:String,attribute:"icon-name"})],ge.prototype,"iconName",2),$s([a({type:String})],ge.prototype,"color",2),ge=$s([$("ds-loader-logo")],ge);const Al=f`
|
|
1430
|
+
:host {
|
|
1431
|
+
display: contents;
|
|
1432
|
+
}
|
|
1433
|
+
.container {
|
|
1434
|
+
display: inline-flex;
|
|
1435
|
+
justify-content: center;
|
|
1436
|
+
align-items: center;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
.container.column {
|
|
1440
|
+
flex-direction: column;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
.container.default ::slotted([slot='text']) {
|
|
1444
|
+
display: none;
|
|
1445
|
+
}
|
|
1446
|
+
`,Pl=f`
|
|
1447
|
+
.spinner {
|
|
1448
|
+
width: 24px;
|
|
1449
|
+
height: 24px;
|
|
1450
|
+
animation: spin 1s linear infinite;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
.spinner circle {
|
|
1454
|
+
fill: none;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.spinner-bg {
|
|
1458
|
+
stroke-width: 10;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
.spinner-fg {
|
|
1462
|
+
stroke-width: 6;
|
|
1463
|
+
stroke-linecap: round;
|
|
1464
|
+
stroke-dasharray: 90;
|
|
1465
|
+
stroke-dashoffset: 10;
|
|
1466
|
+
transform-origin: center;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
@keyframes spin {
|
|
1470
|
+
0% {
|
|
1471
|
+
transform: rotate(0deg);
|
|
1472
|
+
}
|
|
1473
|
+
100% {
|
|
1474
|
+
transform: rotate(360deg);
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
`,zl=[Al,Pl];var Nl=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,si=(e,t,s,r)=>{for(var i=r>1?void 0:r?_l(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Nl(t,s,i),i};let Fe=class extends T{constructor(){super(...arguments),this.show=!1,this.mode="light",this.orientation="row"}get classes(){return{container:!0,[this.mode]:!!this.mode,[this.orientation]:!!this.orientation}}render(){return this.show?c`
|
|
1478
|
+
<div class=${y(this.classes)}>
|
|
1479
|
+
<svg class="spinner" viewBox="0 0 50 50">
|
|
1480
|
+
<circle class="spinner-bg" cx="25" cy="25" r="20" />
|
|
1481
|
+
<circle class="spinner-fg" cx="25" cy="25" r="20" />
|
|
1482
|
+
</svg>
|
|
1483
|
+
<slot name="text"></slot>
|
|
1484
|
+
</div>
|
|
1485
|
+
`:h}};Fe.styles=zl,si([a({type:Boolean,converter:w})],Fe.prototype,"show",2),si([a({type:String,reflect:!0})],Fe.prototype,"mode",2),si([a({type:String})],Fe.prototype,"orientation",2),Fe=si([$("ds-loader-spinner")],Fe);const Bl=f`
|
|
1486
|
+
:host {
|
|
1487
|
+
display: contents;
|
|
1488
|
+
}
|
|
1489
|
+
`,Ll=f`
|
|
1490
|
+
.container {
|
|
1491
|
+
display: grid;
|
|
1492
|
+
grid-template-columns: auto auto;
|
|
1493
|
+
}
|
|
1494
|
+
`;var Dl=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Ji=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ml(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Dl(t,s,i),i};let Ss=class extends T{constructor(){super(...arguments),this.size="xxsmall",this.mode="light"}get logoTemplate(){return this.componentFactory.createIcon({class:"icon-logo","icon-name":"logo"})}get logoWordmarkTemplate(){return this.componentFactory.createIcon({class:"icon-wordmark","icon-name":"logo-wordmark"})}get classes(){return{container:!0,[this.size]:!0,[this.mode]:!!this.mode}}get styleTokens(){return M`
|
|
1495
|
+
<style>
|
|
1496
|
+
:host {
|
|
1497
|
+
color-scheme: ${this.mode};
|
|
1498
|
+
}
|
|
1499
|
+
</style>
|
|
1500
|
+
`}render(){return c`
|
|
1501
|
+
${this.styleTokens}
|
|
1502
|
+
<div data-testid="ds-logo-container" class=${y(this.classes)}>
|
|
1503
|
+
${this.logoTemplate}
|
|
1504
|
+
${this.logoWordmarkTemplate}
|
|
1505
|
+
</div>
|
|
1506
|
+
`}};Ss.styles=[Bl,Ll],Ji([a({type:String})],Ss.prototype,"size",2),Ji([a({type:String,reflect:!0})],Ss.prototype,"mode",2),Ss=Ji([$("ds-logo")],Ss);const jl=f`
|
|
1507
|
+
:host {
|
|
1508
|
+
display: inline-block;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.container {
|
|
1512
|
+
display: inline-block;
|
|
1513
|
+
position: relative;
|
|
1514
|
+
cursor: pointer;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.icon {
|
|
1518
|
+
position: absolute;
|
|
1519
|
+
left: 50%;
|
|
1520
|
+
transform: translateX(-50%);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
.cluster-count {
|
|
1524
|
+
display: flex;
|
|
1525
|
+
position: absolute;
|
|
1526
|
+
border-radius: var(--dg-border-radius-full);
|
|
1527
|
+
background: var(--dg-color-bg-base);
|
|
1528
|
+
align-items: center;
|
|
1529
|
+
justify-content: center;
|
|
1530
|
+
top: -8px;
|
|
1531
|
+
right: -6px;
|
|
1532
|
+
width: 24px;
|
|
1533
|
+
height: 24px;
|
|
1534
|
+
font-size: var(--dg-font-size-body-s, 12px);
|
|
1535
|
+
font-style: normal;
|
|
1536
|
+
font-weight: 400;
|
|
1537
|
+
line-height: var(--dg-font-height-body-s, 16px); /* 133.333% */
|
|
1538
|
+
letter-spacing: var(--dg-font-letter-spacing-m, 0.5px);
|
|
1539
|
+
color: var(--dg-color-text-strong);
|
|
1540
|
+
}
|
|
1541
|
+
`;var Fl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,Qt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Rl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Fl(t,s,i),i};let At=class extends T{constructor(){super(...arguments),this.width=48,this.height=48,this.checked=!1,this.iconSize=24,this.iconTop=8}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName,size:this.iconSize}):h}get clusterNumberTemplate(){return this.clusterCount?c`
|
|
1542
|
+
<div class='cluster-count'>
|
|
1543
|
+
${this.clusterCount}
|
|
1544
|
+
</div>
|
|
1545
|
+
`:h}handleClick(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}get styleTokens(){return c`
|
|
1546
|
+
<style>
|
|
1547
|
+
:host{
|
|
1548
|
+
--ds-icon-color: var(--ds-map-pin-icon-color);
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
.icon {
|
|
1552
|
+
top: ${this.iconTop}px;
|
|
1553
|
+
}
|
|
1554
|
+
</style>
|
|
1555
|
+
`}get classes(){return{container:!0,checked:this.checked,cluster:!!this.clusterCount}}render(){return c`
|
|
1556
|
+
${this.styleTokens}
|
|
1557
|
+
<span data-testid="ds-map-pin-container" class=${y(this.classes)} @click=${this.handleClick}>
|
|
1558
|
+
<svg
|
|
1559
|
+
class="marker"
|
|
1560
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1561
|
+
width=${this.width}
|
|
1562
|
+
height=${this.height}
|
|
1563
|
+
viewBox="0 0 48 49"
|
|
1564
|
+
fill="none"
|
|
1565
|
+
>
|
|
1566
|
+
<path
|
|
1567
|
+
fill-rule="evenodd"
|
|
1568
|
+
clip-rule="evenodd"
|
|
1569
|
+
d="M24.1599 48.6467C26.4109 38.2008 41.9998 30.5848 41.9998 18.5849C41.9998 8.74991 33.9409 0.777954 23.9999 0.777954C14.059 0.777954 6 8.74991 6 18.5849C6 31.2298 21.5719 37.9948 23.5469 48.6077C23.7759 48.8277 23.8869 48.8277 24.1599 48.6467Z"
|
|
1570
|
+
fill="#1B1B1B"
|
|
1571
|
+
/>
|
|
1572
|
+
</svg>
|
|
1573
|
+
${this.iconTemplate}
|
|
1574
|
+
${this.clusterNumberTemplate}
|
|
1575
|
+
</span>
|
|
1576
|
+
`}};At.styles=[jl],Qt([a({type:Number,attribute:"width"})],At.prototype,"width",2),Qt([a({type:Number,attribute:"height"})],At.prototype,"height",2),Qt([a({type:Boolean,converter:w,reflect:!0})],At.prototype,"checked",2),Qt([a({type:String,attribute:"icon-name"})],At.prototype,"iconName",2),Qt([a({type:Number,attribute:"icon-size"})],At.prototype,"iconSize",2),Qt([a({type:Number,attribute:"icon-top"})],At.prototype,"iconTop",2),Qt([a({type:Number,attribute:"cluster-count"})],At.prototype,"clusterCount",2),At=Qt([$("ds-map-pin")],At);const Ul=f`
|
|
1577
|
+
:host {
|
|
1578
|
+
transition: display 300ms ease allow-discrete;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
.animate {
|
|
1582
|
+
transition:
|
|
1583
|
+
opacity 300ms ease,
|
|
1584
|
+
display 300ms ease allow-discrete;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
.container {
|
|
1588
|
+
flex-direction: column;
|
|
1589
|
+
justify-content: center;
|
|
1590
|
+
align-items: center;
|
|
1591
|
+
opacity: 1;
|
|
1592
|
+
@starting-style {
|
|
1593
|
+
opacity: 0;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
.open {
|
|
1598
|
+
display: flex;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.close {
|
|
1602
|
+
display: none;
|
|
1603
|
+
opacity: 0;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.close-button {
|
|
1607
|
+
position: absolute;
|
|
1608
|
+
right: 8px;
|
|
1609
|
+
top: 24px;
|
|
1610
|
+
z-index: 1;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
.content-container {
|
|
1614
|
+
max-height: calc(100dvh - 48px);
|
|
1615
|
+
box-sizing: content-box;
|
|
1616
|
+
width: 100%;
|
|
1617
|
+
display: grid;
|
|
1618
|
+
grid-gap: 16px;
|
|
1619
|
+
grid-template-rows: auto 1fr auto auto;
|
|
1620
|
+
grid-template-areas:
|
|
1621
|
+
'title'
|
|
1622
|
+
'content'
|
|
1623
|
+
'cancelButton'
|
|
1624
|
+
'confirmButton';
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
::slotted([slot='title']) {
|
|
1628
|
+
grid-area: title;
|
|
1629
|
+
width: calc(100% - 32px);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
::slotted([slot='content']) {
|
|
1633
|
+
grid-area: content;
|
|
1634
|
+
overflow: auto;
|
|
1635
|
+
margin: 16px 0 24px;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
.cancel-button {
|
|
1639
|
+
grid-area: cancelButton;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
.confirm-button {
|
|
1643
|
+
grid-area: confirmButton;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
${at.m} {
|
|
1647
|
+
.content-container.full-width {
|
|
1648
|
+
max-width: 700px;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.content-container {
|
|
1652
|
+
max-width: 456px;
|
|
1653
|
+
grid-row-gap: 40px;
|
|
1654
|
+
grid-column-gap: 32px;
|
|
1655
|
+
grid-template-rows: auto 1fr auto;
|
|
1656
|
+
grid-template-columns: 1fr 1fr;
|
|
1657
|
+
grid-template-areas:
|
|
1658
|
+
'title title'
|
|
1659
|
+
'content content'
|
|
1660
|
+
'cancelButton confirmButton';
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
::slotted([slot='title']) {
|
|
1664
|
+
width: 100%;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
::slotted([slot='content']) {
|
|
1668
|
+
margin: 0;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
.close-button {
|
|
1672
|
+
right: 24px;
|
|
1673
|
+
top: 24px;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
${at.l} {
|
|
1678
|
+
.content-container.full-width {
|
|
1679
|
+
max-width: 952px;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.content-container {
|
|
1683
|
+
max-width: 624px;
|
|
1684
|
+
grid-row-gap: 40px;
|
|
1685
|
+
grid-column-gap: 32px;
|
|
1686
|
+
grid-template-rows: auto 1fr auto;
|
|
1687
|
+
grid-template-columns: 2fr 3fr 3fr;
|
|
1688
|
+
grid-template-areas:
|
|
1689
|
+
'title title title'
|
|
1690
|
+
'content content content'
|
|
1691
|
+
'. cancelButton confirmButton';
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
${at.xl} {
|
|
1696
|
+
.content-container.full-width {
|
|
1697
|
+
max-width: 1138px;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
.content-container {
|
|
1701
|
+
max-width: 670px;
|
|
1702
|
+
grid-row-gap: 40px;
|
|
1703
|
+
grid-column-gap: 32px;
|
|
1704
|
+
grid-template-rows: auto 1fr auto;
|
|
1705
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
1706
|
+
grid-template-areas:
|
|
1707
|
+
'title title title'
|
|
1708
|
+
'content content content'
|
|
1709
|
+
'. cancelButton confirmButton';
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
`,Vl=f`
|
|
1713
|
+
.container.full-screen {
|
|
1714
|
+
position: fixed;
|
|
1715
|
+
height: 100%;
|
|
1716
|
+
width: 100%;
|
|
1717
|
+
top: 0;
|
|
1718
|
+
left: 0;
|
|
1719
|
+
box-sizing: border-box;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
.container.full-screen .content-container {
|
|
1723
|
+
width: calc(100dvw - 32px);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.icon {
|
|
1727
|
+
margin-bottom: 32px;
|
|
1728
|
+
}
|
|
1729
|
+
`,Hl=f`
|
|
1730
|
+
.container.dialog {
|
|
1731
|
+
position: fixed;
|
|
1732
|
+
height: auto;
|
|
1733
|
+
width: auto;
|
|
1734
|
+
left: 50%;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
.backdrop {
|
|
1738
|
+
position: fixed;
|
|
1739
|
+
top: 0;
|
|
1740
|
+
left: 0;
|
|
1741
|
+
height: 100%;
|
|
1742
|
+
width: 100%;
|
|
1743
|
+
max-height: 100dvh;
|
|
1744
|
+
max-width: 100dvw;
|
|
1745
|
+
opacity: 0.8;
|
|
1746
|
+
@starting-style {
|
|
1747
|
+
opacity: 0;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
.container.dialog .content-container {
|
|
1752
|
+
max-height: calc(100dvh - 64px);
|
|
1753
|
+
padding: 24px 8px;
|
|
1754
|
+
width: calc(100dvw - 32px);
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
${at.m} {
|
|
1758
|
+
.container.dialog .content-container {
|
|
1759
|
+
max-height: calc(100dvh - 112px);
|
|
1760
|
+
padding: 48px;
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
`,Wl=f`
|
|
1764
|
+
.container.fit {
|
|
1765
|
+
position: absolute;
|
|
1766
|
+
}
|
|
1767
|
+
`,ql=f`
|
|
1768
|
+
.container.full-screen.v-align-default {
|
|
1769
|
+
justify-content: flex-start;
|
|
1770
|
+
padding-top: 24px;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
${at.m} {
|
|
1774
|
+
.container.full-screen.v-align-default {
|
|
1775
|
+
justify-content: center;
|
|
1776
|
+
padding-top: 0;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
.container.dialog.v-align-default {
|
|
1781
|
+
top: 50%;
|
|
1782
|
+
transform: translate(-50%, -50%);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.container.full-screen.v-align-start {
|
|
1786
|
+
justify-content: flex-start;
|
|
1787
|
+
padding-top: 24px;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
${at.m} {
|
|
1791
|
+
.container.full-screen.v-align-start {
|
|
1792
|
+
padding-top: 32px;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
${at.l} {
|
|
1797
|
+
.container.full-screen.v-align-start {
|
|
1798
|
+
padding-top: 32px;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
${at.xl} {
|
|
1803
|
+
.container.full-screen.v-align-start {
|
|
1804
|
+
padding-top: 64px;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
.container.dialog.v-align-start {
|
|
1809
|
+
top: 0;
|
|
1810
|
+
transform: translateX(-50%);
|
|
1811
|
+
margin-top: 24px;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.container.full-screen.v-align-center {
|
|
1815
|
+
justify-content: center;
|
|
1816
|
+
padding-top: 0;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.container.dialog.v-align-center {
|
|
1820
|
+
top: 50%;
|
|
1821
|
+
transform: translate(-50%, -50%);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
.container.full-screen.v-align-end {
|
|
1825
|
+
justify-content: flex-end;
|
|
1826
|
+
padding-bottom: 24px;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
${at.m} {
|
|
1830
|
+
.container.full-screen.v-align-end {
|
|
1831
|
+
padding-bottom: 32px;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
${at.l} {
|
|
1836
|
+
.container.full-screen.v-align-end {
|
|
1837
|
+
padding-bottom: 32px;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
${at.xl} {
|
|
1842
|
+
.container.full-screen.v-align-end {
|
|
1843
|
+
padding-bottom: 64px;
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
.container.dialog.v-align-end {
|
|
1848
|
+
bottom: 0;
|
|
1849
|
+
transform: translateX(-50%);
|
|
1850
|
+
margin-bottom: 24px;
|
|
1851
|
+
}
|
|
1852
|
+
`;var Gl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,St=(e,t,s,r)=>{for(var i=r>1?void 0:r?Kl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Gl(t,s,i),i};let dt=class extends Jt(T){constructor(){super(...arguments),this.withCloseButton=!0,this.variant="fullScreen",this.zIndex=2e3,this.disableScrollLock=!1,this.fullWidth=!1,this.vAlign="default"}disconnectedCallback(){super.disconnectedCallback(),document.body.style.paddingRight="0",document.body.style.overflow=""}handleScroll(){const t=this.open&&!this.disableScrollLock,s=window.innerWidth>document.documentElement.clientWidth;document.body.style.paddingRight=t&&s?`${window.innerWidth-document.documentElement.clientWidth}px`:"0",document.body.style.overflow=t?"hidden":""}updated(t){super.updated(t),(t.has("open")||t.has("disableScrollLock"))&&this.handleScroll()}get backdropClasses(){return{backdrop:!0,animate:!0,open:this.open,close:!this.open}}get backdropTemplate(){return this.variant==="dialog"?c`<div class=${y(this.backdropClasses)} />`:h}get buttonSize(){return["xs","s","m"].includes(this.viewport)?"medium":"large"}get closeButtonSize(){return this.variant==="dialog"||["xs","s"].includes(this.viewport)?"small":"medium"}get closeButtonTemplate(){return this.withCloseButton?this.componentFactory.createIconButton({class:"close-button","data-aria-label":"close-button","@click":this.handleClickCloseButton,size:this.closeButtonSize,"icon-name":"cross",mode:"light",variant:"primary"}):h}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:"icon","icon-name":this.iconName,size:64}):h}get cancelButtonTemplate(){return this.cancelButtonText?this.componentFactory.createButton({class:"cancel-button",variant:"secondary",size:this.buttonSize,"@click":this.handleClickCancelButton,children:this.cancelButtonText}):h}get confirmButtonTemplate(){return this.confirmButtonText?this.componentFactory.createButton({class:"confirm-button",variant:"primary",size:this.buttonSize,"@click":this.handleClickConfirmButton,children:this.confirmButtonText}):h}get modalClasses(){return{container:!0,animate:!0,open:this.open,close:!this.open,dialog:this.variant==="dialog","full-screen":this.variant==="fullScreen"||this.variant==="fit",fit:this.variant==="fit",[`v-align-${this.vAlign}`]:!!this.vAlign}}get contentClasses(){return{"content-container":!0,"full-width":!!this.fullWidth}}render(){return c`
|
|
1853
|
+
<style>
|
|
1854
|
+
:host {
|
|
1855
|
+
${!this.open&&"display: none;"}
|
|
1856
|
+
}
|
|
1857
|
+
.container, .backdrop {
|
|
1858
|
+
z-index: ${this.zIndex};
|
|
1859
|
+
}
|
|
1860
|
+
</style>
|
|
1861
|
+
${this.backdropTemplate}
|
|
1862
|
+
<div
|
|
1863
|
+
role="dialog"
|
|
1864
|
+
aria-labelledby="ds-modal-title"
|
|
1865
|
+
class=${y(this.modalClasses)}
|
|
1866
|
+
@transitionend=${this.handleTransitionEnd}
|
|
1867
|
+
>
|
|
1868
|
+
${this.closeButtonTemplate}
|
|
1869
|
+
${this.iconTemplate}
|
|
1870
|
+
<div class=${y(this.contentClasses)}>
|
|
1871
|
+
<slot id="ds-modal-title" name="title"></slot>
|
|
1872
|
+
<slot name="content"></slot>
|
|
1873
|
+
${this.cancelButtonTemplate}
|
|
1874
|
+
${this.confirmButtonTemplate}
|
|
1875
|
+
</div>
|
|
1876
|
+
</div>
|
|
1877
|
+
`}handleClickCancelButton(){this.open=!1,this.dispatchEvent(new CustomEvent("click-cancel-button",{bubbles:!0,composed:!0}))}handleClickConfirmButton(){this.dispatchEvent(new CustomEvent("click-confirm-button",{bubbles:!0,composed:!0}))}handleClickCloseButton(){this.open=!1,this.dispatchEvent(new CustomEvent("click-close-button",{bubbles:!0,composed:!0}))}handleTransitionEnd(t){t.propertyName==="opacity"&&(this.open?this.dispatchEvent(new CustomEvent("open-transition-end",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("close-transition-end",{bubbles:!0,composed:!0})))}};dt.styles=[Vl,Hl,Wl,Ul,ql],St([a({type:Boolean,reflect:!0,converter:w})],dt.prototype,"open",2),St([a({type:Boolean,attribute:"with-close-button",converter:w})],dt.prototype,"withCloseButton",2),St([a({type:String,attribute:"cancel-button-text"})],dt.prototype,"cancelButtonText",2),St([a({type:String,attribute:"confirm-button-text"})],dt.prototype,"confirmButtonText",2),St([a({type:String})],dt.prototype,"variant",2),St([a({type:Number,attribute:"z-index"})],dt.prototype,"zIndex",2),St([a({type:Boolean,converter:w,attribute:"disable-scroll-lock"})],dt.prototype,"disableScrollLock",2),St([a({type:String,attribute:"icon-name"})],dt.prototype,"iconName",2),St([a({type:Boolean,converter:w,attribute:"full-width"})],dt.prototype,"fullWidth",2),St([a({type:String,attribute:"v-align"})],dt.prototype,"vAlign",2),dt=St([$("ds-modal")],dt);const Zi=e=>class extends e{constructor(){super(...arguments),this.inputStates={currentValue:"",focus:!1,focusVisible:!1,invalid:!1,filled:!1,disabled:!1},this.keyboardMode=!1,this._updateStates=()=>{var t,s,r,i,n;this.inputStates.currentValue=(t=this.nativeInput)==null?void 0:t.value,this.inputStates.invalid=!((s=this.nativeInput)!=null&&s.validity.valid),this.inputStates.focus=document.activeElement===this.nativeInput,this.inputStates.disabled=(r=this.nativeInput)==null?void 0:r.disabled,this.inputStates.filled=((n=(i=this.nativeInput)==null?void 0:i.value)==null?void 0:n.length)>0,this.requestUpdate()},this._handleKeydown=()=>{this.keyboardMode=!0},this._handleMousedown=()=>{this.keyboardMode=!1},this._handlePointerdown=()=>{this.keyboardMode=!1},this._handleFocusIn=t=>{t.target===this.nativeInput&&(this.inputStates.focus=!0,this.inputStates.focusVisible=!!this.keyboardMode,this.requestUpdate())},this._handleFocusOut=()=>{this.inputStates.focus=!1,this.inputStates.focusVisible=!1,this.requestUpdate()}}onInputReady(t){}firstUpdated(t){super.firstUpdated(t),window==null||window.addEventListener("keydown",this._handleKeydown),window==null||window.addEventListener("mousedown",this._handleMousedown),window==null||window.addEventListener("pointerdown",this._handlePointerdown);const s=()=>{var r,i,n;const o=this.querySelector("input")||this.querySelector("textarea")||((r=this.shadowRoot)==null?void 0:r.querySelector("input"))||((i=this.shadowRoot)==null?void 0:i.querySelector("textarea"));o&&(this.nativeInput=o,this._setupInputObservers(),this.onInputReady(o),(n=this.hostMutationObserver)==null||n.disconnect())};s(),this.hostMutationObserver=new MutationObserver(s),this.hostMutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0})}_setupInputObservers(){this.nativeInput.addEventListener("input",this._updateStates),this.nativeInput.addEventListener("focusin",this._handleFocusIn),this.nativeInput.addEventListener("focusout",this._handleFocusOut),this.inputMutationObserver=new MutationObserver(this._updateStates),this.inputMutationObserver.observe(this.nativeInput,{attributes:!0}),this._updateStates()}disconnectedCallback(){var t,s;super.disconnectedCallback(),window==null||window.removeEventListener("keydown",this._handleKeydown),window==null||window.removeEventListener("mousedown",this._handleMousedown),window==null||window.removeEventListener("pointerdown",this._handlePointerdown),(t=this.hostMutationObserver)==null||t.disconnect(),(s=this.inputMutationObserver)==null||s.disconnect(),this.nativeInput&&(this.nativeInput.removeEventListener("input",this._updateStates),this.nativeInput.removeEventListener("focusin",this._handleFocusIn),this.nativeInput.removeEventListener("focusout",this._handleFocusOut))}};function Qi(e){return!e||typeof e!="string"&&typeof e!="number"?!1:(typeof e=="string"?Number(e):e)>0}const Yl=f`
|
|
1878
|
+
:host {
|
|
1879
|
+
display: contents;
|
|
1880
|
+
}
|
|
1881
|
+
`;var Xl=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,Re=(e,t,s,r)=>{for(var i=r>1?void 0:r?Jl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Xl(t,s,i),i};let Vt=class extends Zi(T){constructor(){super(...arguments),this.keyboardMode=!1,this.size="medium",this.helperText="",this.forcedError="",this.invalidError="",this.dataAriaLabelRemoveButton="",this.handleClickIcon=()=>{this.nativeInput.value="",this.nativeInput.focus(),["input","change"].forEach(e=>this.nativeInput.dispatchEvent(new Event(e,{bubbles:!0,composed:!0})))}}get classes(){return{container:!0,error:!!this.forcedError,[this.size]:!!this.size,disabled:this.inputStates.disabled,filled:this.inputStates.filled,invalid:this.inputStates.invalid,focus:this.inputStates.focus,"focus-visible":this.inputStates.focusVisible}}render(){return c`
|
|
1882
|
+
<div class=${y(this.classes)}>
|
|
1883
|
+
<div class="input-container">
|
|
1884
|
+
<div><slot></slot></div>
|
|
1885
|
+
${this.iconTemplate}
|
|
1886
|
+
</div>
|
|
1887
|
+
<div class="footer">
|
|
1888
|
+
${this.helperTextTemplate}
|
|
1889
|
+
${this.forcedErrorTemplate}
|
|
1890
|
+
${this.invalidErrorTemplate}
|
|
1891
|
+
${this.lengthTemplate}
|
|
1892
|
+
</div>
|
|
1893
|
+
</div>
|
|
1894
|
+
`}get iconTemplate(){var e,t,s;return(t=(e=this.nativeInput)==null?void 0:e.value)!=null&&t.length?this.componentFactory.createIconButton({class:"icon-button","icon-name":"cross",size:this.size,disabled:!!((s=this.nativeInput)!=null&&s.disabled),variant:"standard","@click":this.handleClickIcon,"data-aria-label":this.dataAriaLabelRemoveButton||"remove button"}):h}get lengthTemplate(){var e,t,s;const r=(t=(e=this.nativeInput)==null?void 0:e.maxLength)==null?void 0:t.toString();return Qi(r)?c`<span class="char-counter">${((s=this.inputStates.currentValue)==null?void 0:s.length)||0}/${r}</span>`:h}get helperTextTemplate(){return this.forcedError||this.inputStates.invalid&&this.invalidError?h:c`<span class="support-text helper-text">${this.helperText}</span>`}get forcedErrorTemplate(){return this.forcedError?c`<span class="support-text error-text forced-error">${this.forcedError}</span>`:h}get invalidErrorTemplate(){return this.forcedError||!this.inputStates.invalid||!this.invalidError?h:c`<span class="support-text error-text invalid-error">${this.invalidError}</span>`}};Vt.styles=[Yl],Re([a({type:String})],Vt.prototype,"size",2),Re([a({type:String,attribute:"helper-text"})],Vt.prototype,"helperText",2),Re([a({type:String,attribute:"forced-error"})],Vt.prototype,"forcedError",2),Re([a({type:String,attribute:"invalid-error"})],Vt.prototype,"invalidError",2),Re([a({type:String,attribute:"data-aria-label-remove-button"})],Vt.prototype,"dataAriaLabelRemoveButton",2),Vt=Re([$("ds-text-input")],Vt);var Zl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,ii=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ql(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Zl(t,s,i),i};let ks=class extends Vt{constructor(){super(...arguments),this.dataAriaLabelHideButton="",this.dataAriaLabelShowButton="",this.visible=!1,this.handleClickIcon=()=>{this.visible?(this.nativeInput.setAttribute("type","password"),this.visible=!1):(this.nativeInput.setAttribute("type","text"),this.visible=!0)}}get iconTemplate(){var t;return this.componentFactory.createIconButton({class:"icon-button","icon-name":this.visible?"eye-crossed-out":"eye",disabled:!!((t=this.nativeInput)!=null&&t.disabled),size:this.size,variant:"standard","@click":this.handleClickIcon,"data-aria-label":this.visible?this.dataAriaLabelHideButton||"hide":this.dataAriaLabelShowButton||"show"})}};ii([a({type:String,attribute:"data-aria-label-hide-button"})],ks.prototype,"dataAriaLabelHideButton",2),ii([a({type:String,attribute:"data-aria-label-show-button"})],ks.prototype,"dataAriaLabelShowButton",2),ii([k()],ks.prototype,"visible",2),ks=ii([$("ds-password-input",{extendComponentNames:["ds-text-input"]})],ks);const tc=f`
|
|
1895
|
+
:host {
|
|
1896
|
+
display: contents;
|
|
1897
|
+
}
|
|
1898
|
+
`;var ec=Object.defineProperty,sc=Object.getOwnPropertyDescriptor,Ts=(e,t,s,r)=>{for(var i=r>1?void 0:r?sc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ec(t,s,i),i};let ve=class extends Jt(T){constructor(){super(...arguments),this.variant="without-border",this.size="medium",this.loading=!1,this.selected=!1}get containerClasses(){const e=typeof this.size=="string"?this.size:this.size[this.viewport];return{container:!0,[e]:!!e,selected:this.selected,loading:this.loading}}handleClick(){this.selected||this.loading||this.dispatchEvent(new CustomEvent("ds-picker-item:click",{bubbles:!0,composed:!0}))}get imageContainerClasses(){return{"image-container":!0,[this.variant]:!!this.variant}}get loadingTemplate(){return this.loading?c`
|
|
1899
|
+
<div class="overlay">
|
|
1900
|
+
<svg class="spinner" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
|
|
1901
|
+
<path
|
|
1902
|
+
d="M38.3334 20.0001C38.3334 30.1253 30.1252 38.3334 20 38.3334C9.8748 38.3334 1.66669 30.1253 1.66669 20.0001C1.66669 9.87486 9.8748 1.66675 20 1.66675C30.1252 1.66675 38.3334 9.87486 38.3334 20.0001ZM7.97929 20.0001C7.97929 26.6389 13.3612 32.0208 20 32.0208C26.6389 32.0208 32.0207 26.6389 32.0207 20.0001C32.0207 13.3612 26.6389 7.97935 20 7.97935C13.3612 7.97935 7.97929 13.3612 7.97929 20.0001Z"
|
|
1903
|
+
fill="#2F3A41"
|
|
1904
|
+
/>
|
|
1905
|
+
<path
|
|
1906
|
+
d="M4.99998 19.9999C4.0795 19.9999 3.32468 20.748 3.41657 21.6639C3.69704 24.4593 4.68091 27.1482 6.28825 29.4744C8.2125 32.2592 10.9391 34.3921 14.1053 35.5893C17.2714 36.7865 20.7271 36.9913 24.0125 36.1764C27.2979 35.3614 30.2573 33.5655 32.4969 31.0273C34.7366 28.4892 36.1503 25.3294 36.55 21.9681C36.9498 18.6068 36.3165 15.2035 34.7346 12.2109C33.1527 9.21836 30.6971 6.7784 27.6944 5.21568C25.1863 3.91033 22.3958 3.26875 19.5872 3.33835C18.667 3.36115 18.0187 4.20321 18.1332 5.11653C18.2478 6.02985 19.0826 6.66636 20.0031 6.66657C22.1369 6.66706 24.2483 7.17991 26.1555 8.17253C28.5576 9.42271 30.5221 11.3747 31.7877 13.7687C33.0532 16.1628 33.5598 18.8854 33.24 21.5745C32.9202 24.2635 31.7893 26.7914 29.9975 28.8219C28.2058 30.8523 25.8383 32.2891 23.21 32.9411C20.5817 33.593 17.8171 33.4292 15.2842 32.4715C12.7513 31.5137 10.57 29.8074 9.0306 27.5795C7.80833 25.8106 7.03672 23.7795 6.77067 21.6623C6.65591 20.749 5.92045 19.9999 4.99998 19.9999Z"
|
|
1907
|
+
fill="#E1E6EA"
|
|
1908
|
+
/>
|
|
1909
|
+
</svg>
|
|
1910
|
+
</div>
|
|
1911
|
+
`:h}render(){return c`
|
|
1912
|
+
<div class=${y(this.containerClasses)} @click=${this.handleClick}>
|
|
1913
|
+
<div class=${y(this.imageContainerClasses)}>
|
|
1914
|
+
<slot></slot>
|
|
1915
|
+
</div>
|
|
1916
|
+
${this.loadingTemplate}
|
|
1917
|
+
</div>
|
|
1918
|
+
`}};ve.styles=[tc],Ts([a({type:String})],ve.prototype,"variant",2),Ts([a({type:String,converter:gs})],ve.prototype,"size",2),Ts([a({type:Boolean,converter:w})],ve.prototype,"loading",2),Ts([a({type:Boolean,converter:w})],ve.prototype,"selected",2),ve=Ts([$("ds-picker-item")],ve);var ic=Object.defineProperty,rc=Object.getOwnPropertyDescriptor,pn=(e,t,s,r)=>{for(var i=r>1?void 0:r?rc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ic(t,s,i),i};let tr=class extends Lt{constructor(){super(...arguments),this.nodes=[],this.querySelectorText="body"}render(){return c`<slot></slot>`}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.nodes)==null||e.forEach(t=>t.remove())}updated(e){super.updated(e),requestAnimationFrame(()=>{const t=document.querySelector(this.querySelectorText)||document.body;if(!t)return;const s=this.renderRoot.querySelector("slot"),r=(s==null?void 0:s.assignedNodes())||[];this.nodes=r,r.forEach(i=>{t.appendChild(i)})})}};pn([a({type:String,attribute:"query-selector-text"})],tr.prototype,"querySelectorText",2),tr=pn([$("ds-portal",{skipTagAsComponentName:!0})],tr);const nc=f`
|
|
1919
|
+
.fill {
|
|
1920
|
+
transition: all 200ms ease-in-out;
|
|
1921
|
+
}
|
|
1922
|
+
`;var oc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,lc=Object.getPrototypeOf,cc=Reflect.get,mn=(e,t,s,r)=>{for(var i=r>1?void 0:r?ac(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&oc(t,s,i),i},dc=(e,t,s)=>cc(lc(e),s,t);let Ue=class extends xs{render(){return this.show?c`
|
|
1923
|
+
<style>
|
|
1924
|
+
.fill {
|
|
1925
|
+
width: ${this.progress}%;
|
|
1926
|
+
}
|
|
1927
|
+
</style>
|
|
1928
|
+
${this.barTemplate}
|
|
1929
|
+
`:h}};Ue.styles=[...dc(Ue,Ue,"styles"),nc],mn([a({type:Number})],Ue.prototype,"progress",2),Ue=mn([$("ds-progress-bar",{skipTagAsComponentName:!0})],Ue);const hc=f`
|
|
1930
|
+
:host {
|
|
1931
|
+
display: contents;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
.container {
|
|
1935
|
+
display: block;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.container.vertical ::slotted(ds-radio-button) {
|
|
1939
|
+
display: block;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
.container.horizontal ::slotted(ds-radio-button) {
|
|
1943
|
+
display: inline-flex;
|
|
1944
|
+
vertical-align: top;
|
|
1945
|
+
}
|
|
1946
|
+
`;var uc=Object.defineProperty,pc=Object.getOwnPropertyDescriptor,ye=(e,t,s,r)=>{for(var i=r>1?void 0:r?pc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&uc(t,s,i),i};const fn=Symbol("ds-radio-button-group:disabled"),gn=Symbol("ds-radio-button-group:error"),vn=Symbol("ds-radio-button-group:error-text"),yn=Symbol("ds-radio-button-group:helper-text"),bn=Symbol("ds-radio-button-group:size");let Ht=class extends T{constructor(){super(...arguments),this.error=!1,this.errorText="",this.helperText="",this.disabled=!1,this.size="medium",this.orientation="vertical"}get classes(){return{container:!0,error:this.error,disabled:!!this.disabled,[this.size]:!0,[this.orientation]:!0}}render(){return c`
|
|
1947
|
+
<div
|
|
1948
|
+
data-testid="ds-radio-button-group-container"
|
|
1949
|
+
class=${y(this.classes)}
|
|
1950
|
+
.aria-invalid=${this.error}
|
|
1951
|
+
>
|
|
1952
|
+
<slot name="title"></slot>
|
|
1953
|
+
<slot name="description"></slot>
|
|
1954
|
+
<div class="radio-buttons-container">
|
|
1955
|
+
<slot></slot>
|
|
1956
|
+
</div>
|
|
1957
|
+
${!this.error&&this.helperText?c`<div class = 'helper-text' > ${this.helperText}</div>`:h}
|
|
1958
|
+
${this.error&&this.errorText?c`<div class="error-text">${this.errorText}</div>`:h}
|
|
1959
|
+
</div>
|
|
1960
|
+
`}};Ht.styles=[hc],ye([Ie({context:gn}),a({type:Boolean,converter:w})],Ht.prototype,"error",2),ye([Ie({context:vn}),a({type:String,attribute:"error-text"})],Ht.prototype,"errorText",2),ye([Ie({context:yn}),a({type:String,attribute:"helper-text"})],Ht.prototype,"helperText",2),ye([Ie({context:fn}),a({type:Boolean,converter:w})],Ht.prototype,"disabled",2),ye([Ie({context:bn}),a({type:String})],Ht.prototype,"size",2),ye([a({type:String,reflect:!0})],Ht.prototype,"orientation",2),Ht=ye([$("ds-radio-button-group")],Ht);const mc=f`
|
|
1961
|
+
:host {
|
|
1962
|
+
display: block;
|
|
1963
|
+
flex: 0 0 auto;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
:host:has(.disabled) {
|
|
1967
|
+
pointer-events: none;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
.container {
|
|
1971
|
+
cursor: pointer;
|
|
1972
|
+
display: flex;
|
|
1973
|
+
justify-content: flex-start;
|
|
1974
|
+
align-items: flex-start;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
::slotted([slot='input']) {
|
|
1978
|
+
cursor: inherit;
|
|
1979
|
+
appearance: none;
|
|
1980
|
+
background-color: transparent;
|
|
1981
|
+
margin: 0;
|
|
1982
|
+
font: inherit;
|
|
1983
|
+
border-radius: 100%;
|
|
1984
|
+
display: inline-flex;
|
|
1985
|
+
justify-content: center;
|
|
1986
|
+
align-items: center;
|
|
1987
|
+
border-style: solid;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
::slotted([slot='input'])::after {
|
|
1991
|
+
content: '';
|
|
1992
|
+
border-radius: 100%;
|
|
1993
|
+
transform: scale(0);
|
|
1994
|
+
transition: 200ms transform ease-in-out;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
::slotted([slot='input']:checked)::after {
|
|
1998
|
+
transform: scale(1);
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
::slotted([slot='label']) {
|
|
2002
|
+
cursor: pointer;
|
|
2003
|
+
}
|
|
2004
|
+
`;var fc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,st=(e,t,s,r)=>{for(var i=r>1?void 0:r?gc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&fc(t,s,i),i};let Z=class extends T{constructor(){super(...arguments),this.inputPlacement="left",this._size="medium",this.errorText="",this.helperText="",this._disabled=!1,this.handleChange=t=>{this.checkInputState(t.target)},this.handleClick=()=>{var t;(t=this.input[0])==null||t.click()}}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>{this.createContextConsumers([{context:gn,callback:t=>{this.errorGroup=t}},{context:vn,callback:t=>{this.errorTextGroup=t}},{context:fn,callback:t=>{this.disabledGroup=t}},{context:yn,callback:t=>{this.helperTextGroup=t}},{context:bn,callback:t=>{this.sizeGroup=t}}])})}firstUpdated(t){var s;super.firstUpdated(t);const r=(s=this.input)==null?void 0:s[0];r&&(r.addEventListener("change",this.handleChange),this.observeInputAttributes(),this.checkInputState(r),this.applyAriaAttributes())}createContextConsumers(t){t.forEach(({context:s,callback:r})=>{new Pi(this,{context:s,callback:r,subscribe:!0})})}disconnectedCallback(){var t;super.disconnectedCallback();const s=(t=this.input)==null?void 0:t[0];s&&(s.removeEventListener("change",this.handleChange),this.inputMutationObserver.disconnect())}checkInputState(t){this._disabled=this.disabledGroup??(t==null?void 0:t.disabled)}observeInputAttributes(){const t=new MutationObserver(()=>{this.checkInputState(this.input[0])});t.observe(this.input[0],{attributes:!0,attributeFilter:["required","disabled"]}),this.inputMutationObserver=t}updated(t){super.updated(t),(t.has("error")||t.has("errorText")||t.has("helperText"))&&this.applyAriaAttributes()}applyAriaAttributes(){var t;const s=(t=this.input)==null?void 0:t[0];if(!s)return;const r=!!this.error,i=r?this.errorText||this.errorTextGroup:this.helperText||this.helperTextGroup||null;s.setAttribute("aria-disabled",this.disabled?"true":"false"),s.setAttribute("aria-invalid",r?"true":"false"),i?s.setAttribute("aria-description",i):s.removeAttribute("aria-description")}get containerClasses(){return{container:!0,error:this.error,disabled:this.disabled,[this.size]:!0,[this.inputPlacement]:!0}}get error(){return this._error??this.errorGroup}get disabled(){return this.disabledGroup??this._disabled}get size(){return this.sizeGroup||this._size}render(){return c`
|
|
2005
|
+
<div @click=${this.handleClick} class=${y(this.containerClasses)}>
|
|
2006
|
+
<span class="input-container">
|
|
2007
|
+
<slot name="input"></slot>
|
|
2008
|
+
</span>
|
|
2009
|
+
<div class="text-container">
|
|
2010
|
+
<slot name="label"></slot>
|
|
2011
|
+
${!(this.error&&this.errorText)&&this.helperText?c`<div class="helper-text" > ${this.helperText}</div>`:h}
|
|
2012
|
+
${this.error&&this.errorText?c`<div class="error-text">${this.errorText}</div>`:h}
|
|
2013
|
+
</div>
|
|
2014
|
+
</div>
|
|
2015
|
+
`}};Z.styles=[mc],st([a({type:String,attribute:"input-placement"})],Z.prototype,"inputPlacement",2),st([a({type:String,attribute:"size"})],Z.prototype,"_size",2),st([a({type:Boolean,attribute:"error",converter:w})],Z.prototype,"_error",2),st([a({type:String,attribute:"error-text"})],Z.prototype,"errorText",2),st([a({type:String,attribute:"helper-text"})],Z.prototype,"helperText",2),st([k()],Z.prototype,"errorGroup",2),st([k()],Z.prototype,"errorTextGroup",2),st([k()],Z.prototype,"disabledGroup",2),st([k()],Z.prototype,"helperTextGroup",2),st([k()],Z.prototype,"sizeGroup",2),st([k()],Z.prototype,"_disabled",2),st([k()],Z.prototype,"inputMutationObserver",2),st([yt({slot:"input",selector:"input"})],Z.prototype,"input",2),Z=st([$("ds-radio-button")],Z);const vc=f`
|
|
2016
|
+
:host {
|
|
2017
|
+
display: flex;
|
|
2018
|
+
flex-direction: column;
|
|
2019
|
+
align-items: flex-start;
|
|
2020
|
+
width: 100%;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.container {
|
|
2024
|
+
padding: 0;
|
|
2025
|
+
border: none;
|
|
2026
|
+
display: contents;
|
|
2027
|
+
}
|
|
2028
|
+
`;var yc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,Ve=(e,t,s,r)=>{for(var i=r>1?void 0:r?bc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&yc(t,s,i),i};let te=class extends Js(Lt){constructor(){super(...arguments),this.mode="light",this.size="large"}updateRadioChecked(){requestAnimationFrame(()=>{this.radioElements.forEach(e=>{e.checked=e.value===this.value})})}setRadioProps(e){requestAnimationFrame(()=>{["name","size","mode"].forEach(t=>{e.has(t)&&this.radioElements.forEach(s=>{s[t]=this[t]})})})}updated(e){super.updated(e),this.setRadioProps(e)}firstUpdated(e){super.firstUpdated(e),this.updateRadioChecked(),this.setRadioProps(e)}handleChangeRadio(e){var t;this.value=(t=e.detail)==null?void 0:t.value}get classes(){return{container:!0}}render(){return c`
|
|
2029
|
+
<fieldset class=${y(this.classes)} @change=${this.handleChangeRadio}>
|
|
2030
|
+
<slot></slot>
|
|
2031
|
+
</fieldset>
|
|
2032
|
+
`}};te.styles=[vc],Ve([a({type:String})],te.prototype,"name",2),Ve([a({type:String,reflect:!0})],te.prototype,"value",2),Ve([a({type:String,reflect:!0})],te.prototype,"mode",2),Ve([a({type:String})],te.prototype,"size",2),Ve([yt({selector:"ds-radio"})],te.prototype,"radioElements",2),te=Ve([$("ds-radio-group",{skipTagAsComponentName:!0})],te);const xc=f`
|
|
2033
|
+
:host {
|
|
2034
|
+
display: inline-block;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
label {
|
|
2038
|
+
width: 100%;
|
|
2039
|
+
cursor: pointer;
|
|
2040
|
+
display: inline-flex;
|
|
2041
|
+
justify-content: center;
|
|
2042
|
+
align-items: center;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
label ::slotted(input) {
|
|
2046
|
+
cursor: inherit;
|
|
2047
|
+
appearance: none;
|
|
2048
|
+
background-color: transparent;
|
|
2049
|
+
margin: 0;
|
|
2050
|
+
font: inherit;
|
|
2051
|
+
border-radius: 100%;
|
|
2052
|
+
display: inline-flex;
|
|
2053
|
+
justify-content: center;
|
|
2054
|
+
align-items: center;
|
|
2055
|
+
border-style: solid;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
label ::slotted(input)::before {
|
|
2059
|
+
content: '';
|
|
2060
|
+
border-radius: 100%;
|
|
2061
|
+
transform: scale(0);
|
|
2062
|
+
transition: 200ms transform ease-in-out;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
label ::slotted(input:checked)::before {
|
|
2066
|
+
transform: scale(1);
|
|
2067
|
+
}
|
|
2068
|
+
`;var wc=Object.defineProperty,$c=Object.getOwnPropertyDescriptor,Wt=(e,t,s,r)=>{for(var i=r>1?void 0:r?$c(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&wc(t,s,i),i};let kt=class extends T{constructor(){super(...arguments),this.readonly=!1,this.checked=!1,this.disabled=!1,this.mode="light",this.size="large",this.handleClickInput=e=>{this.readonly&&e.preventDefault()},this.handleClickLabel=e=>{e.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("click",{bubbles:!0,composed:!0,detail:{value:this.value}})),this.readonly||(this.input.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}})))}}connectedCallback(){super.connectedCallback(),this.input=document.createElement("input"),this.input.type="radio",this.input.slot="radio",this.input.ariaLabel=this.value,this.input.addEventListener("click",this.handleClickInput),this.appendChild(this.input)}disconnectedCallback(){super.disconnectedCallback(),this.input.removeEventListener("click",this.handleClickInput)}updated(e){super.updated(e),["name","value"].forEach(t=>{e.has(t)&&(this.input[t]=this[t])}),e.has("checked")&&requestAnimationFrame(()=>{this.input.checked=this.checked}),e.has("disabled")&&(this.input.disabled=this.disabled)}get labelClasses(){return{disabled:this.disabled,[this.mode]:!!this.mode,[this.size]:!!this.size}}get styleTokens(){return M`
|
|
2069
|
+
<style>
|
|
2070
|
+
:host{
|
|
2071
|
+
color-scheme: ${this.mode};
|
|
2072
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
2073
|
+
}
|
|
2074
|
+
</style>
|
|
2075
|
+
`}render(){return c`
|
|
2076
|
+
${this.styleTokens}
|
|
2077
|
+
<label @click=${this.handleClickLabel} class=${y(this.labelClasses)}>
|
|
2078
|
+
<slot name="radio"></slot>
|
|
2079
|
+
<slot></slot>
|
|
2080
|
+
</label>
|
|
2081
|
+
`}};kt.styles=[xc],Wt([a({type:Boolean,converter:w,reflect:!0})],kt.prototype,"readonly",2),Wt([a({type:String,reflect:!0})],kt.prototype,"name",2),Wt([a({type:String})],kt.prototype,"value",2),Wt([a({type:Boolean,converter:w,reflect:!0})],kt.prototype,"checked",2),Wt([a({type:Boolean,converter:w,reflect:!0})],kt.prototype,"disabled",2),Wt([a({type:String,reflect:!0})],kt.prototype,"mode",2),Wt([a({type:String})],kt.prototype,"size",2),Wt([Fi({slot:"",flatten:!0})],kt.prototype,"_defaultSlotNodes",2),kt=Wt([$("ds-radio")],kt);const Sc=f`
|
|
2082
|
+
:host {
|
|
2083
|
+
display: contents;
|
|
2084
|
+
}
|
|
2085
|
+
`;var kc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Pt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Tc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&kc(t,s,i),i};let pt=class extends Zi(T){constructor(){super(...arguments),this.size="medium",this.variant="primary",this.loading=!1,this.helperText="",this.forcedError="",this.invalidError="",this.dataAriaLabelRemoveButton="",this.dataAriaLabelPositionButton="",this.withPositionButton=!0,this.handleRemove=()=>{this.nativeInput.value="",this.nativeInput.focus(),["input","change"].forEach(t=>this.nativeInput.dispatchEvent(new Event(t,{bubbles:!0,composed:!0})))},this.handleClickPositionButton=()=>{this.dispatchEvent(new Event("ds-search-input:click-position-button",{bubbles:!0,composed:!0}))}}get classes(){return{container:!0,error:!!this.forcedError,loading:this.loading,[this.size]:!!this.size,[this.variant]:!!this.variant,disabled:this.inputStates.disabled,filled:this.inputStates.filled,invalid:this.inputStates.invalid,focus:this.inputStates.focus,"focus-visible":this.inputStates.focusVisible}}render(){return c`
|
|
2086
|
+
<div part="container" class=${y(this.classes)}>
|
|
2087
|
+
<div part="input-container" class="input-container">
|
|
2088
|
+
${this.searchIconTemplate}
|
|
2089
|
+
<slot></slot>
|
|
2090
|
+
<span class="buttons-container">
|
|
2091
|
+
${this.removeTemplate}
|
|
2092
|
+
${this.positionTemplate}
|
|
2093
|
+
${this.loaderSpinnerTemplate}
|
|
2094
|
+
</span>
|
|
2095
|
+
</div>
|
|
2096
|
+
${this.footerTemplate}
|
|
2097
|
+
</div>
|
|
2098
|
+
`}get searchIconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":"magnifying-glass",variant:"standard"})}get removeTemplate(){var t,s,r;return!((s=(t=this.nativeInput)==null?void 0:t.value)!=null&&s.length)||this.loading?h:this.componentFactory.createIconButton({class:"remove-icon-button","icon-name":"cross",disabled:!!((r=this.nativeInput)!=null&&r.disabled),size:this.size,variant:"standard","@click":this.handleRemove,"data-aria-label":this.dataAriaLabelRemoveButton||"remove button"})}get positionTemplate(){var t;return this.loading||!this.withPositionButton?h:this.componentFactory.createIconButton({class:"position-icon-button","icon-name":"position",disabled:!!((t=this.nativeInput)!=null&&t.disabled),size:this.size,variant:"standard","@click":this.handleClickPositionButton,"data-aria-label":this.dataAriaLabelPositionButton||"position button"})}get loaderSpinnerTemplate(){return this.componentFactory.createLoaderSpinner({show:this.loading})}get footerTemplate(){var t,s;return!((t=this.helperText)!=null&&t.length)&&!this.forcedError&&(!this.inputStates.invalid||!this.invalidError)&&Number((s=this.nativeInput)==null?void 0:s.maxLength)<0?h:c`
|
|
2099
|
+
<div class="footer">
|
|
2100
|
+
${this.helperTextTemplate}
|
|
2101
|
+
${this.forcedErrorTemplate}
|
|
2102
|
+
${this.invalidErrorTemplate}
|
|
2103
|
+
${this.lengthTemplate}
|
|
2104
|
+
</div>
|
|
2105
|
+
`}get helperTextTemplate(){var t;return this.forcedError||this.inputStates.invalid&&this.invalidError||!((t=this.helperText)!=null&&t.length)?h:c`<span class="support-text helper-text">${this.helperText}</span>`}get forcedErrorTemplate(){return this.forcedError?c`<span class="support-text error-text forced-error">${this.forcedError}</span>`:h}get invalidErrorTemplate(){return this.forcedError||!this.inputStates.invalid||!this.invalidError?h:c`<span class="support-text error-text invalid-error">${this.invalidError}</span>`}get lengthTemplate(){var t,s,r;const i=(s=(t=this.nativeInput)==null?void 0:t.maxLength)==null?void 0:s.toString();return Qi(i)?c`<span class="char-counter">${((r=this.inputStates.currentValue)==null?void 0:r.length)||0}/${i}</span>`:h}};pt.styles=[Sc],Pt([a({type:String})],pt.prototype,"size",2),Pt([a({type:String})],pt.prototype,"variant",2),Pt([a({type:Boolean,converter:w})],pt.prototype,"loading",2),Pt([a({type:String,attribute:"helper-text"})],pt.prototype,"helperText",2),Pt([a({type:String,attribute:"forced-error"})],pt.prototype,"forcedError",2),Pt([a({type:String,attribute:"invalid-error"})],pt.prototype,"invalidError",2),Pt([a({type:String,attribute:"data-aria-label-remove-button"})],pt.prototype,"dataAriaLabelRemoveButton",2),Pt([a({type:String,attribute:"data-aria-label-position-button"})],pt.prototype,"dataAriaLabelPositionButton",2),Pt([a({type:Boolean,converter:w,attribute:"with-position-button"})],pt.prototype,"withPositionButton",2),pt=Pt([$("ds-search-input")],pt);const Cc=f`
|
|
2106
|
+
:host {
|
|
2107
|
+
display: block;
|
|
2108
|
+
width: 100%;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
.error-text,
|
|
2112
|
+
.helper-text {
|
|
2113
|
+
user-select: none;
|
|
2114
|
+
}
|
|
2115
|
+
`,Ec=f`
|
|
2116
|
+
.container {
|
|
2117
|
+
position: relative;
|
|
2118
|
+
}
|
|
2119
|
+
`,Oc=f`
|
|
2120
|
+
.input-field::-webkit-search-decoration,
|
|
2121
|
+
.input-field::-webkit-search-cancel-button,
|
|
2122
|
+
.input-field::-webkit-search-results-button,
|
|
2123
|
+
.input-field::-webkit-search-results-decoration,
|
|
2124
|
+
.input-field::-webkit-inner-spin-button,
|
|
2125
|
+
.input-field::-webkit-calendar-picker-indicator {
|
|
2126
|
+
display: none;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
.input-field {
|
|
2130
|
+
box-sizing: border-box;
|
|
2131
|
+
width: 100%;
|
|
2132
|
+
border: none;
|
|
2133
|
+
outline: none;
|
|
2134
|
+
background-color: transparent;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.input-field:focus {
|
|
2138
|
+
outline: none;
|
|
2139
|
+
}
|
|
2140
|
+
`,Ic=f`
|
|
2141
|
+
.helper-text {
|
|
2142
|
+
cursor: pointer;
|
|
2143
|
+
display: flex;
|
|
2144
|
+
justify-content: flex-start;
|
|
2145
|
+
align-items: center;
|
|
2146
|
+
}
|
|
2147
|
+
`,Ac=f`
|
|
2148
|
+
.input-container {
|
|
2149
|
+
align-items: center;
|
|
2150
|
+
justify-content: center;
|
|
2151
|
+
display: flex;
|
|
2152
|
+
position: relative;
|
|
2153
|
+
}
|
|
2154
|
+
`;var Pc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,Q=(e,t,s,r)=>{for(var i=r>1?void 0:r?zc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Pc(t,s,i),i};let K=class extends Js(T){constructor(){super(...arguments),this.initialValue="",this.label="",this.helperText="",this.errorText="",this.disabled=!1,this.success=!1,this.mode="light",this.size="large",this.name="",this.placeholder="",this.type="text",this.focused=!1,this.handleFocus=()=>{this.focused=!0},this.handleBlur=()=>{this.focused=!1},this.handleClickClearIcon=()=>{this._value="",this.dispatchEvent(new CustomEvent("ds-search:clear",{bubbles:!0,composed:!0}))},this.handleInput=t=>{const s=t.target;this._value=s.value||""},this.handleSuccess=t=>{this.dispatchEvent(new CustomEvent("ds-search:position-success",{bubbles:!0,composed:!0,detail:{position:t}}))},this.handleError=t=>{this.dispatchEvent(new CustomEvent("ds-search:position-error",{bubbles:!0,composed:!0,detail:{error:t}}))}}firstUpdated(){this._value=this.initialValue}get value(){return this._value}set value(t){this._value=t}get classes(){return{container:!0,focused:this.focused,error:!!this.errorText,success:this.success,disabled:this.disabled,[this.size]:!0,[this.mode]:!0}}get searchIconTemplate(){return c`
|
|
2155
|
+
${this.componentFactory.createIcon({class:"search-icon","icon-name":"magnifying-glass"})}
|
|
2156
|
+
`}get positionIconTemplate(){return c`
|
|
2157
|
+
${this.componentFactory.createIcon({class:"position-icon","icon-name":"position"})}
|
|
2158
|
+
`}get clearIconTemplate(){return c`
|
|
2159
|
+
${this.componentFactory.createIcon({class:"clear-icon","data-testid":"clear-icon","icon-name":"cross","@click":this.handleClickClearIcon})}
|
|
2160
|
+
`}get inputTemplate(){return c`
|
|
2161
|
+
<input
|
|
2162
|
+
class="input-field"
|
|
2163
|
+
type=${this.type}
|
|
2164
|
+
name=${this.name}
|
|
2165
|
+
maxlength=${this.maxLength}
|
|
2166
|
+
.placeholder=${this.placeholder}
|
|
2167
|
+
.value=${this._value}
|
|
2168
|
+
aria-label=${this._value}
|
|
2169
|
+
@focus=${this.handleFocus}
|
|
2170
|
+
@blur=${this.handleBlur}
|
|
2171
|
+
@input=${this.handleInput}
|
|
2172
|
+
?disabled=${this.disabled}
|
|
2173
|
+
/>
|
|
2174
|
+
`}get helperTextTemplate(){return this.helperText?c`
|
|
2175
|
+
<div class="helper-text" @click=${this.handleClickHelperText}>
|
|
2176
|
+
${this.positionIconTemplate}
|
|
2177
|
+
${this.helperText}
|
|
2178
|
+
</div>
|
|
2179
|
+
`:h}get errorTextTemplate(){return this.errorText?c`<div class="error-text">${this.errorText}</div>`:h}get styleTokens(){return M`
|
|
2180
|
+
<style>
|
|
2181
|
+
:host{
|
|
2182
|
+
color-scheme: ${this.mode};
|
|
2183
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
2184
|
+
}
|
|
2185
|
+
</style>
|
|
2186
|
+
`}handleClickHelperText(){navigator.geolocation.getCurrentPosition(this.handleSuccess,this.handleError)}render(){return c`
|
|
2187
|
+
${this.styleTokens}
|
|
2188
|
+
<div class=${y(this.classes)}>
|
|
2189
|
+
<div class="input-container">
|
|
2190
|
+
${this.searchIconTemplate}
|
|
2191
|
+
${this.inputTemplate}
|
|
2192
|
+
${this.clearIconTemplate}
|
|
2193
|
+
</div>
|
|
2194
|
+
${this.errorTextTemplate}
|
|
2195
|
+
${this.helperTextTemplate}
|
|
2196
|
+
</div>
|
|
2197
|
+
`}};K.styles=[Cc,Ec,Ic,Oc,Ac],Q([a({type:String,reflect:!0,attribute:"initial-value"})],K.prototype,"initialValue",2),Q([a({type:String})],K.prototype,"label",2),Q([a({type:String,attribute:"helper-text"})],K.prototype,"helperText",2),Q([a({type:String,attribute:"error-text"})],K.prototype,"errorText",2),Q([a({type:Boolean,converter:w})],K.prototype,"disabled",2),Q([a({type:Boolean,converter:w})],K.prototype,"success",2),Q([a({type:String,reflect:!0})],K.prototype,"mode",2),Q([a({type:String})],K.prototype,"size",2),Q([a({type:String})],K.prototype,"name",2),Q([a({type:String})],K.prototype,"placeholder",2),Q([a({type:String,attribute:"max-length"})],K.prototype,"maxLength",2),Q([a({type:String})],K.prototype,"type",2),Q([k()],K.prototype,"_value",2),Q([k()],K.prototype,"focused",2),Q([Et(".input-field")],K.prototype,"inputField",2),K=Q([$("ds-search")],K);const Nc=f`
|
|
2198
|
+
:host {
|
|
2199
|
+
display: contents;
|
|
2200
|
+
}
|
|
2201
|
+
`;var _c=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,zt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Bc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&_c(t,s,i),i};let mt=class extends Jt(T){constructor(){super(...arguments),this.dropdownButtonText="Menu",this.openItems=!1,this.openCtas=!1,this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScroll()}),this.handleScroll=()=>{var t,s,r,i;const n=((t=this.itemsContainer)==null?void 0:t.scrollLeft)+((s=this.itemsContainer)==null?void 0:s.clientWidth);this.hasScrollLeft=((r=this.itemsContainer)==null?void 0:r.scrollLeft)>0,this.hasScrollRight=n<((i=this.itemsContainer)==null?void 0:i.scrollWidth)}}updated(t){super.updated(t),t.has("viewport")&&this.updateCtas(),t.has("selectedIndex")&&this.updateSelectedItem()}firstUpdated(t){var s;super.firstUpdated(t),this.handleScroll(),this.resizeObserver.observe(this.itemsContainer),window.addEventListener("resize",this.handleScroll),(s=this.itemsContainer)==null||s.addEventListener("scroll",this.handleScroll)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener("resize",this.handleScroll)}get selectedItemText(){var t,s,r;return((r=(s=(t=this.items)==null?void 0:t[this.selectedIndex])==null?void 0:s.textContent)==null?void 0:r.trim())||this.dropdownButtonText}get classes(){return{nav:!0,"ds-blur":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}toggleItemsDropdown(){this.openItems=!this.openItems,this.openItems&&(this.openCtas=!1)}toggleActionsDropdown(){this.openCtas=!this.openCtas,this.openCtas&&(this.openItems=!1)}closeDropdowns(){this.openItems=!1,this.openCtas=!1}handleItemsSlotChange(){this.updateSelectedItem()}handleActionsSlotChange(){this.updateCtas()}updateSelectedItem(){var t;(t=this.items)==null||t.forEach((s,r)=>{r===this.selectedIndex?s.classList.add("selected"):s.classList.remove("selected")})}updateCtas(){var t;(t=this.ctas)==null||t.forEach(s=>{["xxl","xl"].includes(this.viewport)?s==null||s.setAttribute("size","large"):s==null||s.setAttribute("size","medium")})}handleItemClick(t){var s,r;const i=t.target,n=((s=this.items)==null?void 0:s.indexOf(i))??-1;if(n!==-1){this.selectedIndex=n,this.updateSelectedItem();const o=((r=i.textContent)==null?void 0:r.trim())||i.getAttribute("data-label")||"";this.dispatchEvent(new CustomEvent("ds-secondary-navigation:select",{detail:{index:n,label:o},bubbles:!0,composed:!0})),this.closeDropdowns()}}render(){return c`
|
|
2202
|
+
${this.backdropTemplate}
|
|
2203
|
+
<div class="container gutter">
|
|
2204
|
+
<nav data-testid="ds-secondary-navigation-container" class=${y(this.classes)}>
|
|
2205
|
+
${this.itemsTemplate}
|
|
2206
|
+
${this.itemsDropdownButtonTemplate}
|
|
2207
|
+
${this.actionsTemplate}
|
|
2208
|
+
${this.actionsDropdownButtonTemplate}
|
|
2209
|
+
</nav>
|
|
2210
|
+
${this.itemsDropdownTemplate}
|
|
2211
|
+
${this.actionsDropdownTemplate}
|
|
2212
|
+
</div>
|
|
2213
|
+
`}get itemsTemplate(){return["l","xl","xxl"].includes(this.viewport)?c`
|
|
2214
|
+
<div class="items-container">
|
|
2215
|
+
<div>
|
|
2216
|
+
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
2217
|
+
</div>
|
|
2218
|
+
</div>
|
|
2219
|
+
`:h}get actionsTemplate(){return["m","l","xl","xxl"].includes(this.viewport)?c`
|
|
2220
|
+
<div class="actions-container">
|
|
2221
|
+
<slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
2222
|
+
</div>
|
|
2223
|
+
`:h}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":this.openItems?"arrow-up":"arrow-down",size:20})}get itemsDropdownButtonTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?c`
|
|
2224
|
+
<button
|
|
2225
|
+
class="items-dropdown-button"
|
|
2226
|
+
@click=${this.toggleItemsDropdown}
|
|
2227
|
+
aria-expanded=${this.openItems}
|
|
2228
|
+
aria-haspopup="true"
|
|
2229
|
+
>
|
|
2230
|
+
<span>${this.selectedItemText}</span>
|
|
2231
|
+
${this.iconTemplate}
|
|
2232
|
+
</button>
|
|
2233
|
+
`:h}get itemsDropdownTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?c`
|
|
2234
|
+
<div
|
|
2235
|
+
class=${y({gutter:!0,"dropdown-container":!0,"items-dropdown":!0,open:this.openItems})}
|
|
2236
|
+
role="menu"
|
|
2237
|
+
aria-hidden=${!this.openItems}
|
|
2238
|
+
>
|
|
2239
|
+
<div
|
|
2240
|
+
class="dropdown ds-blur"
|
|
2241
|
+
>
|
|
2242
|
+
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
2243
|
+
</div>
|
|
2244
|
+
</div>
|
|
2245
|
+
`:h}get actionsDropdownButtonTemplate(){return["xxs","xs","s"].includes(this.viewport)?this.componentFactory.createIconButton({class:"nav-arrow","data-aria-label":"open actions dropdown","@click":this.toggleActionsDropdown,size:"medium","icon-name":"triple-dot-v"}):h}get actionsDropdownTemplate(){return["xxs","xs","s"].includes(this.viewport)?c`
|
|
2246
|
+
<div
|
|
2247
|
+
class=${y({gutter:!0,"dropdown-container":!0,"actions-dropdown":!0,open:this.openCtas})}
|
|
2248
|
+
role="menu"
|
|
2249
|
+
aria-hidden=${!this.openCtas}
|
|
2250
|
+
>
|
|
2251
|
+
<div
|
|
2252
|
+
class="dropdown ds-blur"
|
|
2253
|
+
|
|
2254
|
+
>
|
|
2255
|
+
<slot name="actions"></slot>
|
|
2256
|
+
</div>
|
|
2257
|
+
</div>
|
|
2258
|
+
`:h}get backdropTemplate(){return!this.openItems&&!this.openCtas?h:c`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};mt.styles=[Nc],zt([a({type:String,attribute:"dropdown-button-text"})],mt.prototype,"dropdownButtonText",2),zt([a({type:Number,attribute:"selected-index"})],mt.prototype,"selectedIndex",2),zt([k()],mt.prototype,"openItems",2),zt([k()],mt.prototype,"openCtas",2),zt([k()],mt.prototype,"hasScrollLeft",2),zt([k()],mt.prototype,"hasScrollRight",2),zt([yt({slot:"items"})],mt.prototype,"items",2),zt([yt({slot:"actions"})],mt.prototype,"ctas",2),zt([Et(".items-container")],mt.prototype,"itemsContainer",2),mt=zt([$("ds-secondary-navigation")],mt);const Lc=f`
|
|
2259
|
+
:host {
|
|
2260
|
+
display: flex;
|
|
2261
|
+
flex: 1 1 auto;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
.container {
|
|
2265
|
+
display: inline-flex;
|
|
2266
|
+
padding: 0;
|
|
2267
|
+
border: 0;
|
|
2268
|
+
background: gray;
|
|
2269
|
+
border-radius: 2em;
|
|
2270
|
+
flex: 0 0 auto;
|
|
2271
|
+
min-width: 0;
|
|
2272
|
+
max-width: 100%;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
.container.full-width {
|
|
2276
|
+
display: flex;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
::slotted(input) {
|
|
2280
|
+
position: absolute;
|
|
2281
|
+
opacity: 0;
|
|
2282
|
+
width: 0;
|
|
2283
|
+
height: 0;
|
|
2284
|
+
margin: 0;
|
|
2285
|
+
padding: 0;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
::slotted(label) {
|
|
2289
|
+
cursor: pointer;
|
|
2290
|
+
display: block;
|
|
2291
|
+
align-content: center;
|
|
2292
|
+
text-align: center;
|
|
2293
|
+
overflow: hidden;
|
|
2294
|
+
text-overflow: ellipsis;
|
|
2295
|
+
white-space: nowrap;
|
|
2296
|
+
flex: 1 1 auto;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
.full-width ::slotted(label) {
|
|
2300
|
+
flex: 1 1 content;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
::slotted(label.checked) {
|
|
2304
|
+
flex-shrink: 0;
|
|
2305
|
+
}
|
|
2306
|
+
`;var Dc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,ri=(e,t,s,r)=>{for(var i=r>1?void 0:r?Mc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Dc(t,s,i),i};let He=class extends T{constructor(){super(...arguments),this.size="medium",this.fullWidth=!1}get classes(){return{container:!0,[this.size]:!0,"full-width":this.fullWidth}}firstUpdated(){this.addEventListener("change",()=>this.updateCheckedStates()),this.addEventListener("focusin",t=>this.updateFocusState(t,!0)),this.addEventListener("focusout",t=>this.updateFocusState(t,!1)),this.updateCheckedStates()}updateCheckedStates(){this.slottedElements.forEach(t=>{if(t.tagName==="LABEL"){const s=t,r=this.querySelector(`#${s.htmlFor}`);r&&s.classList.toggle("checked",r.checked)}})}updateFocusState(t,s){const r=t.target,i=r.matches(":focus-visible"),n=this.slottedElements.find(o=>o.tagName==="LABEL"&&o.htmlFor===r.id);n&&n.classList.toggle("focused",i)}render(){return c`
|
|
2307
|
+
<fieldset class=${y(this.classes)}>
|
|
2308
|
+
<slot @slotchange=${this.updateCheckedStates}></slot>
|
|
2309
|
+
</fieldset>
|
|
2310
|
+
`}};He.styles=[Lc],ri([a({type:String})],He.prototype,"size",2),ri([a({type:Boolean,converter:w,attribute:"full-width"})],He.prototype,"fullWidth",2),ri([yt({slot:"",flatten:!0})],He.prototype,"slottedElements",2),He=ri([$("ds-segmented-control")],He);const er=class{static handleKeydownWhenOpen(t,s){switch(this.KEYS_WHEN_OPEN.has(t.key)&&t.preventDefault(),t.key){case" ":case"Enter":s.commit();break;case"ArrowDown":s.navigateNext();break;case"ArrowUp":s.navigatePrev();break;case"Home":s.navigateFirst();break;case"End":s.navigateLast();break;case"Escape":s.close();break}}static handleKeydownWhenClosed(t,s){this.KEYS_WHEN_CLOSED.has(t.key)&&(t.preventDefault(),s.open())}};er.KEYS_WHEN_OPEN=new Set(["ArrowDown","ArrowUp","Home","End","Enter","Escape"," "]),er.KEYS_WHEN_CLOSED=new Set(["ArrowDown","ArrowUp"," "]);let xn=er;const jc=f`
|
|
2311
|
+
:host {
|
|
2312
|
+
display: contents;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
::slotted(:not([slot])) {
|
|
2316
|
+
display: none;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
.disabled {
|
|
2320
|
+
pointer-events: none;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
.select,
|
|
2324
|
+
.option {
|
|
2325
|
+
cursor: pointer;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
.option.selected {
|
|
2329
|
+
pointer-events: none;
|
|
2330
|
+
}
|
|
2331
|
+
`;var Fc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,it=(e,t,s,r)=>{for(var i=r>1?void 0:r?Rc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Fc(t,s,i),i};let G=class extends T{constructor(){super(...arguments),this.mode="light",this.size="medium",this.variant="primary",this._open=!1,this.nativeSelect=null,this.nativeLabel=null,this.nativeOptions=[],this.activeIndex=-1,this.hasForcedError=!1,this.handleMutations=t=>{t.forEach(s=>{s.type==="childList"&&this.syncNativeOptions()}),this.requestUpdate()},this.syncNativeOptions=()=>{this.nativeOptions=Array.from(this.nativeSelect.options)},this.handleOpen=()=>{this._open=!0,this.activeIndex=this.findSelectedOptionIndex(),this.focusDisplaySelect()},this.handleClose=()=>{this._open=!1},this.handleClickDisplaySelect=()=>{this._open?this.handleClose():this.handleOpen()},this.handleKeydown=t=>{this._open?xn.handleKeydownWhenOpen(t,{commit:()=>this.commitSelection(),navigateNext:()=>this.advanceSelection(1),navigatePrev:()=>this.advanceSelection(-1),navigateFirst:()=>this.advanceToFirst(),navigateLast:()=>this.advanceToLast(),close:this.handleClose}):xn.handleKeydownWhenClosed(t,{open:this.handleOpen})}}firstUpdated(){this.initializeNativeSelect()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}initializeNativeSelect(){var t,s;this.nativeSelect=(t=this.nativeSelects)==null?void 0:t[0],this.nativeLabel=(s=this.nativeLabels)==null?void 0:s[0],this.nativeSelect&&(this.syncNativeOptions(),this.setupNativeElementsAttributes(),this.setupEventListeners())}handleChangeForcedError(){var t;this.hasForcedError=((t=this.forcedError)==null?void 0:t.length)>0}setupNativeElementsAttributes(){this.nativeSelect.setAttribute("aria-hidden","true"),this.nativeSelect.setAttribute("tabindex","-1")}setupEventListeners(){this.nativeSelect.addEventListener("change",this.syncNativeOptions),this.observer=new MutationObserver(this.handleMutations),this.observer.observe(this.nativeSelect,{childList:!0,subtree:!0,attributes:!0})}cleanup(){var t,s;(t=this.nativeSelect)==null||t.removeEventListener("change",this.syncNativeOptions),(s=this.observer)==null||s.disconnect()}findSelectedOptionIndex(){var t;const s=this.nativeOptions.findIndex(r=>r.value===this.nativeSelect.value);return(t=this.nativeOptions[s])!=null&&t.hidden?this.nativeOptions.findIndex(r=>!r.hidden):s}focusDisplaySelect(){this.updateComplete.then(()=>{var t;(t=this.displaySelect)==null||t.focus()})}advanceToFirst(){if(this.nativeOptions.length){const t=this.nativeOptions.findIndex(s=>!s.hidden);this.advanceSelection(t-this.activeIndex)}}advanceToLast(){if(this.nativeOptions.length){let t=-1;for(let s=this.nativeOptions.length-1;s>=0;s--)if(!this.nativeOptions[s].hidden){t=s;break}this.advanceSelection(t-this.activeIndex)}}advanceSelection(t){const s=this.nativeOptions.length;this.activeIndex=(this.activeIndex+t+s)%s,this.shouldSkipHiddenOption()?this.advanceSelection(Math.sign(t)):this.scrollToActive(this.nativeOptions[this.activeIndex])}shouldSkipHiddenOption(){return this.nativeOptions.some(t=>!t.hidden)&&this.nativeOptions[this.activeIndex].hidden}scrollToActive(t){var s;(s=t==null?void 0:t.scrollIntoView)==null||s.call(t,{block:"nearest"})}commitSelection(){this.handleClose();const t=this.nativeOptions[this.activeIndex];this.nativeSelect&&t!=null&&t.value&&this.updateNativeSelectValue(t.value)}updateNativeSelectValue(t){this.nativeSelect.value=t,["input","change"].forEach(s=>this.nativeSelect.dispatchEvent(new Event(s,{bubbles:!0,composed:!0})))}get containerClasses(){var t,s,r,i;return{container:!0,open:this._open,disabled:!!((t=this.nativeSelect)!=null&&t.disabled),filled:!!((r=(s=this.nativeOptions)==null?void 0:s.find(n=>n.selected&&!n.hidden))!=null&&r.selected),invalid:!((i=this.nativeSelect)!=null&&i.validity.valid),error:this.hasForcedError,[this.size]:!!this.size,[this.mode]:!!this.mode,[this.variant]:!!this.variant}}set open(t){this._open=t}get open(){return this._open}render(){return c`
|
|
2332
|
+
<slot @slotchange=${this.initializeNativeSelect}></slot>
|
|
2333
|
+
<div class=${y(this.containerClasses)}>
|
|
2334
|
+
${this.displaySelectTemplate}
|
|
2335
|
+
${this.optionsContainerTemplate}
|
|
2336
|
+
<slot name="helper-text"></slot>
|
|
2337
|
+
<slot name="forced-error" @slotchange=${this.handleChangeForcedError}></slot>
|
|
2338
|
+
<slot name="invalid-error"></slot>
|
|
2339
|
+
</div>
|
|
2340
|
+
`}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":this._open?"arrow-up":"arrow-down"})}get displaySelectTemplate(){var t,s,r;const i=this.nativeOptions.find(o=>o.selected),n=(t=Array.from((i==null?void 0:i.childNodes)||[]))==null?void 0:t.map(o=>{const l=o.cloneNode(!0);if(o.nodeType!==3)return l;if(o.textContent.trim()==="")return"";const d=document.createElement("span");return d.classList.add("text"),d.appendChild(l),d});return c`
|
|
2341
|
+
<div class="select-outline">
|
|
2342
|
+
<div class="select-container">
|
|
2343
|
+
<label id="display-label" class="label">${(s=this.nativeLabel)==null?void 0:s.innerText}</label>
|
|
2344
|
+
<div
|
|
2345
|
+
class="select"
|
|
2346
|
+
role="combobox"
|
|
2347
|
+
tabindex="0"
|
|
2348
|
+
aria-expanded="${this._open}"
|
|
2349
|
+
aria-activedescendant="${this.activeDescendantId}"
|
|
2350
|
+
aria-controls="options-container"
|
|
2351
|
+
aria-labelledby="display-label"
|
|
2352
|
+
aria-disabled=${!!((r=this.nativeSelect)!=null&&r.disabled)}
|
|
2353
|
+
@click=${this.handleClickDisplaySelect}
|
|
2354
|
+
@keydown=${this.handleKeydown}
|
|
2355
|
+
@blur=${this.handleClose}
|
|
2356
|
+
>
|
|
2357
|
+
<span class="select-content">${n}</span>
|
|
2358
|
+
${this.iconTemplate}
|
|
2359
|
+
</div>
|
|
2360
|
+
</div>
|
|
2361
|
+
</div>
|
|
2362
|
+
`}get activeDescendantId(){return this._open&&this.activeIndex>=0?`${G.ARIA_OPTION_PREFIX}${this.nativeOptions[this.activeIndex].value}`:""}get optionsContainerTemplate(){return c`
|
|
2363
|
+
<div id="options-container" class="options-container" role="listbox">
|
|
2364
|
+
${this.nativeOptions.map((t,s)=>t.hidden?h:this.renderOptionClone(t,s))}
|
|
2365
|
+
</div>
|
|
2366
|
+
`}renderOptionClone(t,s){const r=Array.from(t.childNodes).map(i=>i.cloneNode(!0));return c`
|
|
2367
|
+
<div
|
|
2368
|
+
id="${G.ARIA_OPTION_PREFIX}${t.value}"
|
|
2369
|
+
class=${y({option:!0,active:s===this.activeIndex,selected:t.value===this.nativeSelect.value})}
|
|
2370
|
+
role="option"
|
|
2371
|
+
aria-selected="${t.value===this.nativeSelect.value}"
|
|
2372
|
+
tabindex="-1"
|
|
2373
|
+
@mousedown=${()=>{this.activeIndex=s,this.commitSelection()}}
|
|
2374
|
+
>
|
|
2375
|
+
${r}
|
|
2376
|
+
</div>
|
|
2377
|
+
`}};G.styles=[jc],G.ARIA_OPTION_PREFIX="option-",it([a({type:String})],G.prototype,"mode",2),it([a({type:String})],G.prototype,"size",2),it([a({type:String})],G.prototype,"variant",2),it([k()],G.prototype,"_open",2),it([k()],G.prototype,"nativeSelect",2),it([k()],G.prototype,"nativeLabel",2),it([k()],G.prototype,"nativeOptions",2),it([k()],G.prototype,"activeIndex",2),it([k()],G.prototype,"hasForcedError",2),it([yt({slot:"",selector:"select",flatten:!0})],G.prototype,"nativeSelects",2),it([yt({slot:"",selector:"label",flatten:!0})],G.prototype,"nativeLabels",2),it([yt({slot:"forced-error",flatten:!0})],G.prototype,"forcedError",2),it([Et(".select")],G.prototype,"displaySelect",2),G=it([$("ds-select")],G);const Uc=f`
|
|
2378
|
+
:host {
|
|
2379
|
+
display: inline-block;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
.container {
|
|
2383
|
+
display: inline-block;
|
|
2384
|
+
cursor: pointer;
|
|
2385
|
+
}
|
|
2386
|
+
`;var Vc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,wn=(e,t,s,r)=>{for(var i=r>1?void 0:r?Hc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Vc(t,s,i),i};let ni=class extends T{get iconTemplate(){return this.componentFactory.createIcon({class:"icon",size:40,"icon-name":this.checked?"check":"plus"})}get classes(){return{container:!0,checked:this.checked}}handleClick(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}render(){return c`
|
|
2387
|
+
<span data-testid="ds-selection-container" class=${y(this.classes)} @click=${this.handleClick}>
|
|
2388
|
+
${this.iconTemplate}
|
|
2389
|
+
</span>
|
|
2390
|
+
`}};ni.styles=[Uc],wn([a({type:Boolean,converter:w})],ni.prototype,"checked",2),ni=wn([$("ds-selection")],ni);function sr({value:e,min:t,max:s}){return Math.min(Math.max(e,t),s)}const $n=(e,t,s=10)=>{const r=Math.pow(10,s),i=Math.round(e*r),n=Math.round(t*r);return(i+n)/r},Cs=({step:e=1,min:t=0,max:s=100,proposedValue:r,role:i,currentValues:n})=>{const o=i==="min"?1:2,l=r;let d,u=t,v=s;return Number.isFinite(l)?(Object.keys(n).forEach(p=>{if(Number(p)<o&&n[p]>=u){if(u=n[p],e===0)return;let g=t;for(;g<=u;)g=$n(g,e);u=g}if(Number(p)>o&&n[p]<=v){if(v=n[p],e===0)return;let g=t;for(;g+e<v;)g=$n(g,e);v=g}u=sr({value:u,min:t,max:s}),v=sr({value:v,min:t,max:s})}),l<=u||l>=v?(d=Math.max(u,Math.min(v,l)),{stepValue:d,minLimit:u,maxLimit:v}):e===0?{stepValue:l,minLimit:u,maxLimit:v}:(d=Math.round((l-u)/e)*e+u,d=l-d>v-l?v:d,d=sr({value:d,min:u,max:v}),{stepValue:d,minLimit:u,maxLimit:v})):{stepValue:n[String(o)],minLimit:u,maxLimit:v}},Wc=({value:e,fractionDigits:t})=>{const s=Math.pow(10,t);return Math.round(e*s)/s},qc=f`
|
|
2391
|
+
:host {
|
|
2392
|
+
display: block;
|
|
2393
|
+
}
|
|
2394
|
+
`,Gc=fe`
|
|
2395
|
+
.current-value-container {
|
|
2396
|
+
position: relative;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.current-value-text {
|
|
2400
|
+
display: inline-flex;
|
|
2401
|
+
position: absolute;
|
|
2402
|
+
}
|
|
2403
|
+
`,Kc=fe`
|
|
2404
|
+
.range-value-container {
|
|
2405
|
+
display: flex;
|
|
2406
|
+
justify-content: space-between;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
.range-value-text {
|
|
2410
|
+
display: inline-flex;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.range-value-label:after {
|
|
2414
|
+
content: ':';
|
|
2415
|
+
}
|
|
2416
|
+
`,Yc=fe`
|
|
2417
|
+
.track {
|
|
2418
|
+
position: relative;
|
|
2419
|
+
cursor: pointer;
|
|
2420
|
+
top: 0;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.track-range {
|
|
2424
|
+
z-index: 1;
|
|
2425
|
+
top: 50%;
|
|
2426
|
+
transform: translateY(-50%);
|
|
2427
|
+
position: absolute;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.track, .track-range {
|
|
2431
|
+
background-clip: content-box;
|
|
2432
|
+
}
|
|
2433
|
+
`,Xc=fe`
|
|
2434
|
+
.thumb {
|
|
2435
|
+
z-index: 2;
|
|
2436
|
+
position: absolute;
|
|
2437
|
+
}
|
|
2438
|
+
`;var Jc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,P=(e,t,s,r)=>{for(var i=r>1?void 0:r?Zc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Jc(t,s,i),i};let A=class extends Jt(T){constructor(){super(...arguments),this.min=0,this.max=100,this.minLabel="",this.maxLabel="",this.step=1,this.initialValueMin=0,this.mode="light",this.locale=void 0,this.localeMatcher="lookup",this.useGrouping=!0,this.minimumIntegerDigits=1,this.minimumFractionDigits=0,this.maximumFractionDigits=3,this.size="medium",this.disabled=!1,this.keyboardMode=!1,this.getNewValue=t=>{const{width:s,left:r}=this.track.getBoundingClientRect(),i=t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX,n=Math.min(Math.max(0,i-r),s)*100/s;return this.min+n*(this.max-this.min)/100},this.setActiveThumb=t=>{const s=this.getNewValue(t);typeof this.valueMax!="number"||s<=this.valueMin?this.activeThumb="min":s>=this.valueMax?this.activeThumb="max":s-this.valueMin<this.valueMax-s?this.activeThumb="min":this.activeThumb="max"},this.handleMouseMove=t=>{this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),this.animationFrameRequest=requestAnimationFrame(()=>{const s=this.getNewValue(t),r=this.activeThumb??"min",{stepValue:i}=Cs({step:this.step,min:this.min,max:this.max,proposedValue:s,role:r,currentValues:{1:this.valueMin,...typeof this.valueMax=="number"?{2:this.valueMax}:{}}});this.handleChange({value:i,role:r})})},this.handleMouseDown=t=>{var s;this.disabled||((s=t==null?void 0:t.preventDefault)==null||s.call(t),this.setActiveThumb(t),this.handleMouseMove(t),window==null||window.addEventListener("mousemove",this.handleMouseMove),window==null||window.addEventListener("touchmove",this.handleMouseMove),window==null||window.addEventListener("pointerup",this.handlePointerUp))},this.handlePointerUp=()=>{window==null||window.removeEventListener("mousemove",this.handleMouseMove),window==null||window.removeEventListener("touchmove",this.handleMouseMove),window==null||window.removeEventListener("pointerup",this.handlePointerUp)},this.handleKeydown=()=>{this.keyboardMode=!0},this.handlePointerOrMouseDown=()=>{this.keyboardMode=!1},this.onInputFocus=(t,s)=>{const r=t.currentTarget,i=s===1?"min":"max";this.editingField=i,r.type="number",r.step=String(this.step??1);const n=i==="min"?this.valueMin:this.valueMax;r.value=String(n??""),this.keyboardMode&&r.classList.add("focus-visible")},this.commitInputValue=(t,s)=>{const r=t.currentTarget,i=s===1?"min":"max",{stepValue:n}=Cs({step:this.step,min:this.min,max:this.max,proposedValue:Number(r.value),role:i,currentValues:{1:this.valueMin,...typeof this.valueMax=="number"?{2:this.valueMax}:{}}});this.handleChange({value:n,role:i}),r.value=String(n)},this.onInputBlur=t=>{var s;this.editingField=void 0;const r=t.currentTarget;(s=r==null?void 0:r.classList)==null||s.remove("focus-visible")},this.onInputKeyDown=(t,s)=>{t.key==="Enter"&&(t.preventDefault(),this.commitInputValue(t,s))},this.onThumbKeyDown=(t,s)=>{if(!this.disabled&&(t.key==="ArrowLeft"||t.key==="ArrowRight")){t.preventDefault();const r=this.step??1,i=t.key==="ArrowLeft"?-r:r,n=s===1?"min":"max",o=(n==="min"?this.valueMin:this.valueMax)+i,{stepValue:l}=Cs({step:this.step,min:this.min,max:this.max,proposedValue:o,role:n,currentValues:{1:this.valueMin,...typeof this.valueMax=="number"?{2:this.valueMax}:{}}});this.handleChange({value:l,role:n})}}}disconnectedCallback(){super.disconnectedCallback(),window==null||window.removeEventListener("mousemove",this.handleMouseMove),window==null||window.removeEventListener("touchmove",this.handleMouseMove),window==null||window.removeEventListener("pointerup",this.handlePointerUp),window==null||window.removeEventListener("keydown",this.handleKeydown),window==null||window.removeEventListener("mousedown",this.handlePointerOrMouseDown),window==null||window.removeEventListener("pointerdown",this.handlePointerOrMouseDown)}firstUpdated(t){super.firstUpdated(t),window==null||window.addEventListener("keydown",this.handleKeydown),window==null||window.addEventListener("mousedown",this.handlePointerOrMouseDown),window==null||window.addEventListener("pointerdown",this.handlePointerOrMouseDown),["min","max"].forEach(s=>{const r=this[s==="min"?"initialValueMin":"initialValueMax"];if(typeof r!="number")return;const{stepValue:i}=Cs({step:this.step,min:this.min,max:this.max,proposedValue:r,role:s,currentValues:{1:this.valueMin,...typeof this.valueMax=="number"?{2:this.valueMax}:{}}});this[s==="min"?"valueMin":"valueMax"]!==i&&this.handleChange({value:i,role:s})})}getTrackPct(t){const s=this.max-this.min;return s===0?0:(t-this.min)/s*100}handleChange({value:t,role:s}){const r=Wc({value:t,fractionDigits:this.maximumFractionDigits}),i=s==="min"?"valueMin":"valueMax";this[i]!==r&&(this[i]=r,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{role:s,value:r}})))}formatNumber(t){const s={value:t,locale:this.locale,...this.unitStyle&&{style:this.unitStyle},...this.currency&&{currency:this.currency},...this.unit&&{unit:this.unit},localeMatcher:this.localeMatcher,minimumIntegerDigits:this.minimumIntegerDigits,minimumFractionDigits:this.minimumFractionDigits,maximumFractionDigits:this.maximumFractionDigits,thousandSeparator:this.thousandSeparator,fractionSeparator:this.fractionSeparator,useGrouping:this.useGrouping};return an(s)}get rangeValuesTemplates(){const{formattedValue:t,unitSymbol:s,unitSymbolPosition:r}=this.formatNumber(this.min),i=this.unitSymbol??s,n=this.unitSymbolPosition??r,{formattedValue:o}=this.formatNumber(this.max);return c`
|
|
2439
|
+
<div class="range-value-text">
|
|
2440
|
+
${this.minLabel?c`<span class="range-value-label">${this.minLabel}</span>`:h}
|
|
2441
|
+
${n==="left"?c`<span>${i}</span>`:h}
|
|
2442
|
+
<span>${t}</span>
|
|
2443
|
+
${n==="right"?c`<span>${i}</span>`:h}
|
|
2444
|
+
</div>
|
|
2445
|
+
<div class="range-value-text">
|
|
2446
|
+
${this.maxLabel?c` <span class="range-value-label">${this.maxLabel}</span>`:h}
|
|
2447
|
+
${n==="left"?c`<span>${i}</span>`:h}
|
|
2448
|
+
<span>${o}</span>
|
|
2449
|
+
${n==="right"?c`<span>${i}</span>`:h}
|
|
2450
|
+
</div>
|
|
2451
|
+
`}getThumbTemplate(t){const s=t===1?"min":"max",r=s==="min"?this.valueMin:this.valueMax,{minLimit:i,maxLimit:n}=Cs({step:this.step,min:this.min,max:this.max,proposedValue:r,role:s,currentValues:{1:this.valueMin,...typeof this.valueMax=="number"?{2:this.valueMax}:{}}}),o=this.getTrackPct(r);return c`
|
|
2452
|
+
<style>
|
|
2453
|
+
.thumb${t} {
|
|
2454
|
+
left: ${o}%;
|
|
2455
|
+
}
|
|
2456
|
+
</style>
|
|
2457
|
+
<div
|
|
2458
|
+
class="thumb${t} thumb"
|
|
2459
|
+
@focus=${()=>{this.activeThumb=t===1?"min":"max"}}
|
|
2460
|
+
@keydown=${l=>this.onThumbKeyDown(l,t)}
|
|
2461
|
+
role="slider"
|
|
2462
|
+
tabindex=${this.disabled?-1:0}
|
|
2463
|
+
aria-disabled=${String(!!this.disabled)}
|
|
2464
|
+
aria-label=${t===1?"Minumum value":"Maximum Value"}
|
|
2465
|
+
aria-valuemin=${i}
|
|
2466
|
+
aria-valuemax=${n}
|
|
2467
|
+
aria-valuenow=${r}
|
|
2468
|
+
>
|
|
2469
|
+
<svg
|
|
2470
|
+
class="thumb-svg"
|
|
2471
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2472
|
+
viewBox="0 0 34 34"
|
|
2473
|
+
fill="none"
|
|
2474
|
+
>
|
|
2475
|
+
<circle cx="17" cy="17" r="16" class="thumb-circle" />
|
|
2476
|
+
</svg>
|
|
2477
|
+
</div>
|
|
2478
|
+
`}get thumbTemplates(){return c`
|
|
2479
|
+
${this.getThumbTemplate(1)}
|
|
2480
|
+
${typeof this.initialValueMax=="number"?this.getThumbTemplate(2):h}
|
|
2481
|
+
`}get trackRangeTemplate(){let t,s;return typeof this.initialValueMax!="number"?(t=0,s=this.getTrackPct(this.valueMin)):(t=this.getTrackPct(this.valueMin),s=this.getTrackPct(this.valueMax)-t),c`
|
|
2482
|
+
<style>
|
|
2483
|
+
.track-range {
|
|
2484
|
+
left: ${t}%;
|
|
2485
|
+
width: ${s}%;
|
|
2486
|
+
}
|
|
2487
|
+
</style>
|
|
2488
|
+
<div class="track-range" role="presentation"></div>
|
|
2489
|
+
`}getInputTemplate(t){const s=t===1?"min":"max",r=this.editingField===s,i=s==="min"?this.valueMin:this.valueMax,{formattedValue:n,unitSymbol:o,unitSymbolPosition:l}=this.formatNumber(i),d=this.unitSymbolPosition??l,u=this.unitSymbol??o,v=u?d==="left"?`${u} ${n}`:`${n} ${u}`:`${n}`,p=r?"number":"text",g=r?String(i??""):v,b=t===1?this.inputMinAriaLabel:this.inputMaxAriaLabel,S=typeof this.initialValueMax=="number"?t===1?"Start value":"End value":"Value",C=b??S;return c`
|
|
2490
|
+
<div class="input-wrapper">
|
|
2491
|
+
<input
|
|
2492
|
+
class="input-value input-value-${t}"
|
|
2493
|
+
type=${p}
|
|
2494
|
+
.value=${g}
|
|
2495
|
+
step=${String(this.step??1)}
|
|
2496
|
+
?disabled=${this.disabled}
|
|
2497
|
+
tabindex=${this.disabled?-1:0}
|
|
2498
|
+
aria-disabled=${String(!!this.disabled)}
|
|
2499
|
+
aria-label=${C}
|
|
2500
|
+
?readonly=${this.disabled}
|
|
2501
|
+
@focus=${I=>this.onInputFocus(I,t)}
|
|
2502
|
+
@blur=${this.onInputBlur}
|
|
2503
|
+
@change=${I=>this.commitInputValue(I,t)}
|
|
2504
|
+
@keydown=${I=>this.onInputKeyDown(I,t)}
|
|
2505
|
+
title=${g}
|
|
2506
|
+
/>
|
|
2507
|
+
</div>
|
|
2508
|
+
`}get inputsTemplate(){return c`
|
|
2509
|
+
<div class="inputs-container">
|
|
2510
|
+
${this.getInputTemplate(1)}
|
|
2511
|
+
${typeof this.initialValueMax=="number"?this.getInputTemplate(2):h}
|
|
2512
|
+
</div>
|
|
2513
|
+
`}get containerClasses(){var t;const s=typeof this.size=="string"?this.size:(t=this.size)==null?void 0:t[this.viewport];return{container:!0,[this.mode]:!!this.mode,[s]:!!s,disabled:!!this.disabled}}get styleTokens(){return M`
|
|
2514
|
+
<style>
|
|
2515
|
+
:host{
|
|
2516
|
+
color-scheme: ${this.mode};
|
|
2517
|
+
}
|
|
2518
|
+
</style>
|
|
2519
|
+
`}render(){return c`
|
|
2520
|
+
${this.styleTokens}
|
|
2521
|
+
<div class=${y(this.containerClasses)}>
|
|
2522
|
+
<div @touchstart=${this.handleMouseDown} @mousedown=${this.handleMouseDown} class="track" role="presentation">
|
|
2523
|
+
${this.thumbTemplates}
|
|
2524
|
+
${this.trackRangeTemplate}
|
|
2525
|
+
</div>
|
|
2526
|
+
<div class="range-value-container">${this.rangeValuesTemplates}</div>
|
|
2527
|
+
${this.inputsTemplate}
|
|
2528
|
+
</div>
|
|
2529
|
+
`}};A.styles=[qc,Yc,Xc,Gc,Kc],P([a({type:Number})],A.prototype,"min",2),P([a({type:Number})],A.prototype,"max",2),P([a({type:String,attribute:"min-label"})],A.prototype,"minLabel",2),P([a({type:String,attribute:"max-label"})],A.prototype,"maxLabel",2),P([a({type:Number})],A.prototype,"step",2),P([a({type:Number,attribute:"initial-value-min"})],A.prototype,"initialValueMin",2),P([a({type:Number,attribute:"initial-value-max"})],A.prototype,"initialValueMax",2),P([a({type:String,reflect:!0})],A.prototype,"mode",2),P([a({type:String,attribute:"locale"})],A.prototype,"locale",2),P([a({type:String,attribute:"locale-matcher"})],A.prototype,"localeMatcher",2),P([a({type:String,attribute:"unit-symbol"})],A.prototype,"unitSymbol",2),P([a({type:String,attribute:"unit-symbol-position"})],A.prototype,"unitSymbolPosition",2),P([a({type:String,attribute:"unit-style"})],A.prototype,"unitStyle",2),P([a({type:String,attribute:"currency"})],A.prototype,"currency",2),P([a({type:String,attribute:"unit"})],A.prototype,"unit",2),P([a({type:String,attribute:"use-grouping",converter:e=>e==="auto"?"auto":typeof e=="boolean"?e:e==="true"||e===""?!0:e!=="false"})],A.prototype,"useGrouping",2),P([a({type:Number,attribute:"minimum-integer-digits"})],A.prototype,"minimumIntegerDigits",2),P([a({type:Number,attribute:"minimum-fraction-digits"})],A.prototype,"minimumFractionDigits",2),P([a({type:Number,attribute:"maximum-fraction-digits"})],A.prototype,"maximumFractionDigits",2),P([a({type:String,attribute:"thousand-separator"})],A.prototype,"thousandSeparator",2),P([a({type:String,attribute:"fraction-separator"})],A.prototype,"fractionSeparator",2),P([a({type:String,converter:gs})],A.prototype,"size",2),P([a({type:Boolean,converter:w})],A.prototype,"disabled",2),P([a({type:String,attribute:"input-min-aria-label"})],A.prototype,"inputMinAriaLabel",2),P([a({type:String,attribute:"input-max-aria-label"})],A.prototype,"inputMaxAriaLabel",2),P([Et(".track")],A.prototype,"track",2),P([k()],A.prototype,"valueMin",2),P([k()],A.prototype,"valueMax",2),P([k()],A.prototype,"activeThumb",2),P([k()],A.prototype,"animationFrameRequest",2),P([k()],A.prototype,"editingField",2),P([k()],A.prototype,"keyboardMode",2),A=P([$("ds-slider")],A);const Qc=f`
|
|
2530
|
+
:host {
|
|
2531
|
+
display: block;
|
|
2532
|
+
width: 100%;
|
|
2533
|
+
}
|
|
2534
|
+
`,td=f`
|
|
2535
|
+
nav {
|
|
2536
|
+
display: flex;
|
|
2537
|
+
justify-content: flex-start;
|
|
2538
|
+
overflow-x: auto;
|
|
2539
|
+
scroll-behavior: smooth;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
nav::-webkit-scrollbar {
|
|
2543
|
+
display: none;
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
.nav-container {
|
|
2547
|
+
position: relative;
|
|
2548
|
+
display: flex;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
.nav-container.scroll-left nav {
|
|
2552
|
+
mask-image: linear-gradient(
|
|
2553
|
+
to left,
|
|
2554
|
+
rgba(0, 0, 0, 1) 0%,
|
|
2555
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2556
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
2557
|
+
rgba(0, 0, 0, 0) 100%
|
|
2558
|
+
);
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
.nav-container.scroll-right nav {
|
|
2562
|
+
mask-image: linear-gradient(
|
|
2563
|
+
to right,
|
|
2564
|
+
rgba(0, 0, 0, 1) 0%,
|
|
2565
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2566
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
2567
|
+
rgba(0, 0, 0, 0) 100%
|
|
2568
|
+
);
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
.nav-container.scroll-left.scroll-right nav {
|
|
2572
|
+
mask-image: linear-gradient(
|
|
2573
|
+
to right,
|
|
2574
|
+
rgba(0, 0, 0, 0) 0%,
|
|
2575
|
+
rgba(0, 0, 0, 0.5) 5%,
|
|
2576
|
+
rgba(0, 0, 0, 1) 10%,
|
|
2577
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2578
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
2579
|
+
rgba(0, 0, 0, 0) 100%
|
|
2580
|
+
);
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
.nav-arrow {
|
|
2584
|
+
visibility: hidden;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
.nav-container:hover .nav-arrow {
|
|
2588
|
+
visibility: visible;
|
|
2589
|
+
}
|
|
2590
|
+
`,ed=f`
|
|
2591
|
+
::slotted([slot='tab']) {
|
|
2592
|
+
white-space: nowrap;
|
|
2593
|
+
-webkit-user-select: none;
|
|
2594
|
+
-ms-user-select: none;
|
|
2595
|
+
user-select: none;
|
|
2596
|
+
cursor: pointer;
|
|
2597
|
+
flex: 0 1 auto;
|
|
2598
|
+
text-align: center;
|
|
2599
|
+
position: relative;
|
|
2600
|
+
display: flex;
|
|
2601
|
+
justify-content: center;
|
|
2602
|
+
align-items: center;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
::slotted([slot='tab'][selected]) {
|
|
2606
|
+
cursor: auto;
|
|
2607
|
+
}
|
|
2608
|
+
`,sd=f`
|
|
2609
|
+
::slotted([slot='panel']) {
|
|
2610
|
+
display: none;
|
|
2611
|
+
}
|
|
2612
|
+
::slotted([slot='panel'][selected]) {
|
|
2613
|
+
display: block;
|
|
2614
|
+
}
|
|
2615
|
+
`,id={cupra:{"icon-button-variant":"primary"},"cupra-diagonal":{"icon-button-variant":"standard"},seat:{"icon-button-variant":"primary"}};var rd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,ft=(e,t,s,r)=>{for(var i=r>1?void 0:r?nd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&rd(t,s,i),i};let rt=class extends T{constructor(){super(...arguments),this.selectedTab=0,this.mode="light",this.variant="primary",this.size="large",this.disabled=!1,this.focusedTabIndex=-1,this.handleKeyDown=t=>{var s,r,i,n;if(!(this.focusedTabIndex<0))switch(t.key){case"ArrowRight":case"Right":t.preventDefault(),this.focusedTabIndex+1<((s=this.tabs)==null?void 0:s.length)&&(this.focusedTabIndex+=1,(r=this.tabs[this.focusedTabIndex])==null||r.focus());break;case"ArrowLeft":case"Left":t.preventDefault(),this.focusedTabIndex-1>=0&&(this.focusedTabIndex-=1,(i=this.tabs[this.focusedTabIndex])==null||i.focus());break;case"Enter":case" ":t.preventDefault(),this.focusedTabIndex>=0&&this.focusedTabIndex<((n=this.tabs)==null?void 0:n.length)&&this.handleChangeSelectedTab(this.focusedTabIndex);break}},this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScrollNav()}),this.handleScrollNav=()=>{var t,s,r,i;const n=((t=this.nav)==null?void 0:t.scrollLeft)+((s=this.nav)==null?void 0:s.clientWidth);this.hasScrollLeft=((r=this.nav)==null?void 0:r.scrollLeft)>0,this.hasScrollRight=n<((i=this.nav)==null?void 0:i.scrollWidth)},this.handleScrollLeft=()=>{this.nav.scrollBy({left:-150,behavior:"smooth"})},this.handleScrollRight=()=>{this.nav.scrollBy({left:150,behavior:"smooth"})},this.handleFocus=t=>{var s;const r=t.target,i=((s=this.tabs)==null?void 0:s.findIndex(n=>n===r))??-1;if(i<0||this.disabled){t.preventDefault();return}this.focusedTabIndex=i},this.handleBlur=()=>{this.focusedTabIndex=-1}}connectedCallback(){super.connectedCallback(),this.tabs=Array.from(this.querySelectorAll("[slot=tab]")),this.panels=Array.from(this.querySelectorAll("[slot=panel]"))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener("resize",this.handleScrollNav)}getScrollButtonTemplate(t,s){var r;if(!this.theme||t==="left"&&!this.hasScrollLeft||t==="right"&&!this.hasScrollRight)return h;const i=`arrow-${t}`,n=(r=id[this.theme])==null?void 0:r["icon-button-variant"];return this.componentFactory.createIconButton({class:`nav-arrow ${t}`,"data-aria-label":`nav-arrow-${t}`,"@click":s,size:["xxsmall","xsmall","small"].includes(this.size)?"medium":"large","icon-name":i,mode:this.mode,variant:n})}firstUpdated(){this.handleScrollNav(),this.resizeObserver.observe(this.nav),this.tabs.forEach(t=>this.resizeObserver.observe(t)),window.addEventListener("resize",this.handleScrollNav),this.nav.addEventListener("scroll",this.handleScrollNav),this.setTabsFocusable()}updated(t){if(super.updated(t),t.has("selectedTab")&&this.selectTab(this.selectedTab),t.has("variant")){const s=this.variant==="secondary"||this.variant==="primary"?this.variant:"primary";this.variant!==s&&(this.variant=s)}this.setupTabAccessibility()}handleTabsSlotchange(t){this.tabs=t.target.assignedNodes({flatten:!0}),this.setTabsFocusable()}handlePanelSlotchange(t){this.panels=t.target.assignedNodes({flatten:!0}),this.setTabsFocusable()}setTabsFocusable(){var t;(t=this.tabs)==null||t.forEach(s=>{s.setAttribute("tabindex","0")})}selectTab(t){var s,r,i,n,o;(s=this.tabs)==null||s.forEach((d,u)=>{d.removeAttribute("selected"),d.setAttribute("aria-selected",u===t?"true":"false")}),(r=this.tabs[t])==null||r.setAttribute("selected",""),this.panels.forEach(d=>d.removeAttribute("selected")),(i=this.panels[t])==null||i.setAttribute("selected","");const l=(n=this.tabs)==null?void 0:n[this.selectedTab];this.nav.scrollLeft=(l==null?void 0:l.offsetLeft)-((o=this.nav)==null?void 0:o.offsetWidth)/2}setupTabAccessibility(){var t;(t=this.tabs)==null||t.forEach((s,r)=>{s.setAttribute("role","tab"),s.setAttribute("tabindex",r===this.selectedTab&&!this.disabled?"0":"-1"),s.addEventListener("focus",this.handleFocus),s.addEventListener("blur",this.handleBlur)})}handleChangeSelectedTab(t){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{selectedTab:t}})),this.selectedTab=t}handleSelect(t){let s;this.tabs.forEach((r,i)=>{(r===t.target||r.contains(t.target))&&(s=i)}),!(typeof s!="number"||s===this.selectedTab)&&this.handleChangeSelectedTab(s)}get classes(){return{container:!0,[this.size]:!0,[this.mode]:!0,[this.variant]:!0,disabled:this.disabled}}get navContainerClasses(){return{"nav-container":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}render(){return c`
|
|
2616
|
+
<div part="container" class=${y(this.classes)}>
|
|
2617
|
+
<div class=${y(this.navContainerClasses)}>
|
|
2618
|
+
${this.getScrollButtonTemplate("left",this.handleScrollLeft)}
|
|
2619
|
+
<nav tabindex="-1" role="tablist" @scroll=${this.handleScrollNav} @keydown=${this.handleKeyDown}>
|
|
2620
|
+
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
2621
|
+
</nav>
|
|
2622
|
+
${this.getScrollButtonTemplate("right",this.handleScrollRight)}
|
|
2623
|
+
</div>
|
|
2624
|
+
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
2625
|
+
</div>
|
|
2626
|
+
`}};rt.styles=[Qc,td,ed,sd],ft([a({type:Number,attribute:"selected-tab",reflect:!0})],rt.prototype,"selectedTab",2),ft([a({type:String,reflect:!0})],rt.prototype,"mode",2),ft([a({type:String,reflect:!0})],rt.prototype,"variant",2),ft([a({type:String})],rt.prototype,"size",2),ft([a({type:Boolean,converter:w})],rt.prototype,"disabled",2),ft([k()],rt.prototype,"focusedTabIndex",2),ft([Et("nav")],rt.prototype,"nav",2),ft([k()],rt.prototype,"tabs",2),ft([k()],rt.prototype,"panels",2),ft([k()],rt.prototype,"hasScrollLeft",2),ft([k()],rt.prototype,"hasScrollRight",2),rt=ft([$("ds-tabs")],rt);const od=fe`
|
|
2627
|
+
:host {
|
|
2628
|
+
display: inline-block;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
.container {
|
|
2632
|
+
display: inline-flex;
|
|
2633
|
+
justify-content: center;
|
|
2634
|
+
align-items: center;
|
|
2635
|
+
}
|
|
2636
|
+
`,ad=fe`
|
|
2637
|
+
.icon.clicable {
|
|
2638
|
+
cursor: pointer;
|
|
2639
|
+
}
|
|
2640
|
+
`;var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,be=(e,t,s,r)=>{for(var i=r>1?void 0:r?cd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ld(t,s,i),i};let qt=class extends T{constructor(){super(...arguments),this.show=!0,this.clickableIcon=!1,this.iconPosition="left",this.color="black"}get classes(){return{container:!0,[this.color]:!0}}get iconClasses(){return{icon:!0,clicable:!!this.clickableIcon}}handleClickIcon(){if(!this.clickableIcon)return;const e=new CustomEvent("clickicon",{bubbles:!0,composed:!0});this.dispatchEvent(e)}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:y(this.iconClasses),"icon-name":this.iconName,size:16,"@click":this.handleClickIcon}):h}render(){return this.show?c`
|
|
2641
|
+
<div class=${y(this.classes)}>
|
|
2642
|
+
${Ot(this.iconPosition==="left",()=>c`${this.iconTemplate}`)}
|
|
2643
|
+
<slot></slot>
|
|
2644
|
+
${Ot(this.iconPosition==="right",()=>c`${this.iconTemplate}`)}
|
|
2645
|
+
</div>
|
|
2646
|
+
`:h}};qt.styles=[od,ad],be([a({type:Boolean,converter:w})],qt.prototype,"show",2),be([a({type:Boolean,converter:w,attribute:"clickable-icon"})],qt.prototype,"clickableIcon",2),be([a({type:String,attribute:"icon-name"})],qt.prototype,"iconName",2),be([a({type:String,attribute:"icon-position"})],qt.prototype,"iconPosition",2),be([a({type:String,attribute:"color"})],qt.prototype,"color",2),be([k()],qt.prototype,"onClickHandler",2),qt=be([$("ds-tag")],qt);const dd=f`
|
|
2647
|
+
:host {
|
|
2648
|
+
display: contents;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
::slotted(*),
|
|
2652
|
+
.text {
|
|
2653
|
+
color: inherit;
|
|
2654
|
+
font-size: inherit;
|
|
2655
|
+
font-weight: inherit;
|
|
2656
|
+
line-height: inherit;
|
|
2657
|
+
margin: 0;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
.text + ::slotted(*) {
|
|
2661
|
+
display: none;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
.uppercase {
|
|
2665
|
+
text-transform: uppercase;
|
|
2666
|
+
}
|
|
2667
|
+
`;var hd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,Gt=(e,t,s,r)=>{for(var i=r>1?void 0:r?ud(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&hd(t,s,i),i};let Tt=class extends T{constructor(){super(...arguments),this.size="medium",this.weight="regular",this.variant="body",this.mode="light"}get classes(){return{container:!0,[`size-${this.size}`]:!!this.size,[`mode-${this.mode}`]:!!this.mode,[`weight-${this.weight}`]:!!this.weight,[`variant-${this.variant}`]:!!this.variant,uppercase:this.uppercase}}get customElementTemplate(){return!this.htmlTagName||!this.value?h:c`${Ks(`<${this.htmlTagName} class="text">${this.value}</${this.htmlTagName}>`)}`}get styles(){return M`
|
|
2668
|
+
<style>
|
|
2669
|
+
.container {
|
|
2670
|
+
color: ${this.color||"var(--ds-text-color)"}
|
|
2671
|
+
}
|
|
2672
|
+
</style>
|
|
2673
|
+
`}render(){return c`
|
|
2674
|
+
${this.styles}
|
|
2675
|
+
<div data-testid="ds-text-container" class=${y(this.classes)}>
|
|
2676
|
+
${this.customElementTemplate}
|
|
2677
|
+
<slot></slot>
|
|
2678
|
+
</div>
|
|
2679
|
+
`}};Tt.styles=[dd],Gt([a({type:String})],Tt.prototype,"size",2),Gt([a({type:String})],Tt.prototype,"weight",2),Gt([a({type:String})],Tt.prototype,"variant",2),Gt([a({type:String,attribute:"html-tag-name"})],Tt.prototype,"htmlTagName",2),Gt([a({type:String})],Tt.prototype,"value",2),Gt([a({type:String,reflect:!0})],Tt.prototype,"mode",2),Gt([a({type:String,reflect:!0})],Tt.prototype,"color",2),Gt([a({type:Boolean,converter:w,reflect:!0})],Tt.prototype,"uppercase",2),Tt=Gt([$("ds-text")],Tt);const pd=f`
|
|
2680
|
+
:host {
|
|
2681
|
+
display: contents;
|
|
2682
|
+
}
|
|
2683
|
+
`;var md=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,We=(e,t,s,r)=>{for(var i=r>1?void 0:r?fd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&md(t,s,i),i};let ee=class extends Zi(T){constructor(){super(...arguments),this.keyboardMode=!1,this.size="medium",this.helperText="",this.forcedError="",this.invalidError="",this.mode="light"}onInputReady(e){e.classList.add("ds-scroll")}get classes(){return{container:!0,error:!!this.forcedError,[this.size]:!!this.size,[this.mode]:!!this.mode,disabled:this.inputStates.disabled,filled:this.inputStates.filled,invalid:this.inputStates.invalid,focus:this.inputStates.focus,"focus-visible":this.inputStates.focusVisible}}render(){return c`
|
|
2684
|
+
<div class=${y(this.classes)}>
|
|
2685
|
+
<div class="input-container">
|
|
2686
|
+
<slot></slot>
|
|
2687
|
+
</div>
|
|
2688
|
+
<div class="footer">
|
|
2689
|
+
${this.helperTextTemplate}
|
|
2690
|
+
${this.forcedErrorTemplate}
|
|
2691
|
+
${this.invalidErrorTemplate}
|
|
2692
|
+
${this.lengthTemplate}
|
|
2693
|
+
</div>
|
|
2694
|
+
</div>
|
|
2695
|
+
`}get lengthTemplate(){var e,t,s;const r=(t=(e=this.nativeInput)==null?void 0:e.maxLength)==null?void 0:t.toString();return Qi(r)?c`<span class="char-counter">${((s=this.inputStates.currentValue)==null?void 0:s.length)||0}/${r}</span>`:h}get helperTextTemplate(){return this.forcedError||this.inputStates.invalid&&this.invalidError?h:c`<span class="support-text helper-text">${this.helperText}</span>`}get forcedErrorTemplate(){return this.forcedError?c`<span class="support-text error-text forced-error">${this.forcedError}</span>`:h}get invalidErrorTemplate(){return this.forcedError||!this.inputStates.invalid||!this.invalidError?h:c`<span class="support-text error-text invalid-error">${this.invalidError}</span>`}};ee.styles=[pd],We([a({type:String})],ee.prototype,"size",2),We([a({type:String,attribute:"helper-text"})],ee.prototype,"helperText",2),We([a({type:String,attribute:"forced-error"})],ee.prototype,"forcedError",2),We([a({type:String,attribute:"invalid-error"})],ee.prototype,"invalidError",2),We([a({type:String})],ee.prototype,"mode",2),ee=We([$("ds-textarea")],ee);const gd={cupra:{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},"cupra-diagonal":{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},seat:{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]}};var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,qe=(e,t,s,r)=>{for(var i=r>1?void 0:r?yd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&vd(t,s,i),i};let xe=class extends Lt{constructor(){super(...arguments),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has("theme")&&(Ae.publish("theme",this.theme),window.DS_THEME=this.theme,this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0}))}loadThemeFonts(){var e;(e=gd[this.theme])==null||e.fonts.forEach(t=>{this.loadThemeFont(t)})}async loadThemeFont({weight:e,name:t,file:s}){if(!this.loadFonts)return Promise.resolve();const r=`${t}-${e}`;if(this.loadedFonts.has(r))return;const i=new FontFace(t,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${s}.woff2') format('woff2'),
|
|
2696
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${s}.woff') format('woff'),
|
|
2697
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${s}.ttf') format('truetype'),
|
|
2698
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${s}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{const s="/1.0.0-canary.9",r=`https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{const i=`ui-kit-theme-${s}`,n=document.getElementById(i),o=document.createElement("link");o.id=i,o.rel="stylesheet",o.href=r,o.onload=()=>e(),o.onerror=()=>t(new Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),n==null||n.remove()}}):Promise.resolve()}render(){return this.cssLoaded?c`<slot></slot>`:h}};qe([a({type:Boolean,converter:w,attribute:"load-fonts"})],xe.prototype,"loadFonts",2),qe([a({type:Boolean,converter:w,attribute:"load-styles"})],xe.prototype,"loadStyles",2),qe([Ie({context:zi}),a({type:String})],xe.prototype,"theme",2),qe([k()],xe.prototype,"cssLoaded",2),qe([k()],xe.prototype,"loadedFonts",2),xe=qe([$("ds-theme-provider")],xe);const bd=f`
|
|
2699
|
+
:host {
|
|
2700
|
+
display: contents;
|
|
2701
|
+
}
|
|
2702
|
+
`;var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,Ge=(e,t,s,r)=>{for(var i=r>1?void 0:r?wd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&xd(t,s,i),i};let se=class extends T{constructor(){super(...arguments),this.status="default",this.dataId="",this.title="",this.text="",this.dataTemplate=!0}getIconName(){switch(this.status){case"success":return"check-mark-circle";case"error":return"cross-circle";case"warning":return"exclamation-mark-circle";case"info":return"info-circle";default:return"chat-bubble"}}handleClickCloseButton(){const e=new CustomEvent("toast:remove",{bubbles:!0,composed:!0,detail:{id:this.dataId}});this.dispatchEvent(e)}get toastMessageClasses(){return{container:!0,[this.status||"default"]:!0}}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":this.getIconName(),size:24})}get closeButtonTemplate(){return this.componentFactory.createIconButton({"data-aria-label":"close-button","@click":this.handleClickCloseButton,"icon-name":"cross",variant:"standard",size:"medium"})}render(){return this.dataTemplate?h:c`
|
|
2703
|
+
<div class=${y(this.toastMessageClasses)}>
|
|
2704
|
+
${this.iconTemplate}
|
|
2705
|
+
<div class="content">
|
|
2706
|
+
<div class="header">
|
|
2707
|
+
${Ot(this.title,()=>c`<div class="title">${this.title}</div>`)}
|
|
2708
|
+
${Ot(this.text,()=>c`<div class="message">${this.text}</div>`)}
|
|
2709
|
+
</div>
|
|
2710
|
+
<slot></slot>
|
|
2711
|
+
</div>
|
|
2712
|
+
${this.closeButtonTemplate}
|
|
2713
|
+
</div>
|
|
2714
|
+
`}};se.styles=[bd],Ge([a({type:String})],se.prototype,"status",2),Ge([a({type:String,attribute:"data-id",reflect:!0})],se.prototype,"dataId",2),Ge([a({type:String})],se.prototype,"title",2),Ge([a({type:String})],se.prototype,"text",2),Ge([a({type:Boolean,converter:w,attribute:"data-template",reflect:!0})],se.prototype,"dataTemplate",2),se=Ge([$("ds-toast-message")],se);const $d=1e4,Sd=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Math.random().toString(36).substring(2),Sn=(class Rs{constructor(){this.toasts=[],this.subscribers=[],this.defaultDuration=$d,this.handleAddToast=t=>{const{id:s=Sd(),status:r="default",duration:i=this.defaultDuration,...n}=t.detail||{},o={id:s,status:r,...n,exiting:!1};o.timeoutId=window.setTimeout(()=>{this.toasts.find(l=>l.id===s).exiting=!0,this.notifySubscribers()},i),this.toasts=[...this.toasts,o],this.notifySubscribers()},this.handleRemoveToast=t=>{const{id:s,referenceId:r}=t.detail||{};if(!s&&!r)return;let i;s?i=this.toasts.find(n=>n.id===s):r&&(i=this.toasts.find(n=>n.referenceId===r)),i&&(i!=null&&i.timeoutId&&window.clearTimeout(i.timeoutId),i.exiting=!0,this.notifySubscribers())},this.initialize()}initialize(){window.addEventListener("toast:add",this.handleAddToast),window.addEventListener("toast:remove",this.handleRemoveToast)}static getInstance(){return Rs.instance||(Rs.instance=new Rs),Rs.instance}removeToast(t){const s=this.toasts.find(r=>r.id===t);s!=null&&s.timeoutId&&window.clearTimeout(s.timeoutId),this.toasts=this.toasts.filter(r=>r.id!==t),this.notifySubscribers()}getToasts(){return[...this.toasts]}subscribe(t){return this.subscribers.push(t),()=>{this.subscribers=this.subscribers.filter(s=>s!==t)}}notifySubscribers(){const t=this.getToasts();this.subscribers.forEach(s=>s(t))}}).getInstance();/**
|
|
2715
|
+
* @license
|
|
2716
|
+
* Copyright 2020 Google LLC
|
|
2717
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2718
|
+
*/const{I:kd}=Xo,kn=()=>document.createComment(""),Es=(e,t,s)=>{var r;const i=e._$AA.parentNode,n=t===void 0?e._$AB:t._$AA;if(s===void 0){const o=i.insertBefore(kn(),n),l=i.insertBefore(kn(),n);s=new kd(o,l,e,e.options)}else{const o=s._$AB.nextSibling,l=s._$AM,d=l!==e;if(d){let u;(r=s._$AQ)==null||r.call(s,e),s._$AM=e,s._$AP!==void 0&&(u=e._$AU)!==l._$AU&&s._$AP(u)}if(o!==n||d){let u=s._$AA;for(;u!==o;){const v=u.nextSibling;i.insertBefore(u,n),u=v}}}return s},we=(e,t,s=e)=>(e._$AI(t,s),e),Td={},Cd=(e,t=Td)=>e._$AH=t,Ed=e=>e._$AH,ir=e=>{e._$AR(),e._$AA.remove()};/**
|
|
2719
|
+
* @license
|
|
2720
|
+
* Copyright 2017 Google LLC
|
|
2721
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2722
|
+
*/const Tn=(e,t,s)=>{const r=new Map;for(let i=t;i<=s;i++)r.set(e[i],i);return r},Od=Vi(class extends Hi{constructor(e){if(super(e),e.type!==Ui.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,s){let r;s===void 0?s=t:t!==void 0&&(r=t);const i=[],n=[];let o=0;for(const l of e)i[o]=r?r(l,o):o,n[o]=s(l,o),o++;return{values:n,keys:i}}render(e,t,s){return this.dt(e,t,s).values}update(e,[t,s,r]){const i=Ed(e),{values:n,keys:o}=this.dt(t,s,r);if(!Array.isArray(i))return this.ut=o,n;const l=this.ut??(this.ut=[]),d=[];let u,v,p=0,g=i.length-1,b=0,S=n.length-1;for(;p<=g&&b<=S;)if(i[p]===null)p++;else if(i[g]===null)g--;else if(l[p]===o[b])d[b]=we(i[p],n[b]),p++,b++;else if(l[g]===o[S])d[S]=we(i[g],n[S]),g--,S--;else if(l[p]===o[S])d[S]=we(i[p],n[S]),Es(e,d[S+1],i[p]),p++,S--;else if(l[g]===o[b])d[b]=we(i[g],n[b]),Es(e,i[p],i[g]),g--,b++;else if(u===void 0&&(u=Tn(o,b,S),v=Tn(l,p,g)),u.has(l[p]))if(u.has(l[g])){const C=v.get(o[b]),I=C!==void 0?i[C]:null;if(I===null){const N=Es(e,i[p]);we(N,n[b]),d[b]=N}else d[b]=we(I,n[b]),Es(e,i[p],I),i[C]=null;b++}else ir(i[g]),g--;else ir(i[p]),p++;for(;b<=S;){const C=Es(e,d[S+1]);we(C,n[b]),d[b++]=C}for(;p<=g;){const C=i[p++];C!==null&&ir(C)}return this.ut=o,Cd(e,d),Bt}}),Id=f`
|
|
2723
|
+
:host {
|
|
2724
|
+
display: contents;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
.toast-container {
|
|
2728
|
+
position: fixed;
|
|
2729
|
+
z-index: var(--ds-z-index-toast);
|
|
2730
|
+
display: flex;
|
|
2731
|
+
flex-direction: column-reverse;
|
|
2732
|
+
pointer-events: none;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
.toast-container.top-right {
|
|
2736
|
+
top: 1rem;
|
|
2737
|
+
right: 1rem;
|
|
2738
|
+
align-items: flex-end;
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
.toast-container.top-left {
|
|
2742
|
+
top: 1rem;
|
|
2743
|
+
left: 1rem;
|
|
2744
|
+
align-items: flex-start;
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
.toast-container.bottom-right,
|
|
2748
|
+
.toast-container.bottom-left {
|
|
2749
|
+
flex-direction: column;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
.toast-container.bottom-right {
|
|
2753
|
+
bottom: 1rem;
|
|
2754
|
+
right: 1rem;
|
|
2755
|
+
align-items: flex-end;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
.toast-container.bottom-left {
|
|
2759
|
+
bottom: 1rem;
|
|
2760
|
+
left: 1rem;
|
|
2761
|
+
align-items: flex-start;
|
|
2762
|
+
}
|
|
2763
|
+
`,Ad=f`
|
|
2764
|
+
.toast {
|
|
2765
|
+
margin-bottom: 1rem;
|
|
2766
|
+
animation: toast-in-top 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
|
|
2767
|
+
transform: translateY(-1rem);
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
.toast-container.bottom-left .toast,
|
|
2771
|
+
.toast-container.bottom-right .toast {
|
|
2772
|
+
animation: toast-in-bottom 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
|
|
2773
|
+
transform: translateY(1rem);
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
.toast-container.bottom-left .toast.exiting,
|
|
2777
|
+
.toast-container.top-left .toast.exiting {
|
|
2778
|
+
animation: toast-out-left 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
.toast-container.bottom-right .toast.exiting,
|
|
2782
|
+
.toast-container.top-right .toast.exiting {
|
|
2783
|
+
animation: toast-out-right 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
@keyframes toast-in-bottom {
|
|
2787
|
+
from {
|
|
2788
|
+
transform: translateY(1rem);
|
|
2789
|
+
}
|
|
2790
|
+
to {
|
|
2791
|
+
transform: translateY(0);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
@keyframes toast-in-top {
|
|
2796
|
+
from {
|
|
2797
|
+
transform: translateY(-1rem);
|
|
2798
|
+
}
|
|
2799
|
+
to {
|
|
2800
|
+
transform: translateY(0);
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
@keyframes toast-out-left {
|
|
2805
|
+
from {
|
|
2806
|
+
opacity: 1;
|
|
2807
|
+
transform: translateX(0);
|
|
2808
|
+
}
|
|
2809
|
+
to {
|
|
2810
|
+
opacity: 0;
|
|
2811
|
+
transform: translateX(-1rem);
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
@keyframes toast-out-right {
|
|
2816
|
+
from {
|
|
2817
|
+
opacity: 1;
|
|
2818
|
+
transform: translateX(0);
|
|
2819
|
+
}
|
|
2820
|
+
to {
|
|
2821
|
+
opacity: 0;
|
|
2822
|
+
transform: translateX(1rem);
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
`;var Pd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,rr=(e,t,s,r)=>{for(var i=r>1?void 0:r?zd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Pd(t,s,i),i};let Os=class extends T{constructor(){super(...arguments),this.position="top-right",this.toasts=[],this.unsubscribe=null}connectedCallback(){super.connectedCallback(),this.unsubscribe=Sn.subscribe(t=>{this.toasts=t})}disconnectedCallback(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null),super.disconnectedCallback()}handleAnimationEnd(t){const s=t.target;if(s.classList.contains("exiting")&&(t.animationName==="toast-out-left"||t.animationName==="toast-out-right")){const r=s.getAttribute("data-id");r&&Sn.removeToast(r)}}getToastMessageTemplate(t){const s={toast:!0,[t.status]:!0,exiting:t.exiting};let r=h;if(t.referenceId){const i=document.querySelector(`[data-id="${t.referenceId}"]`);if(i){const n=i.cloneNode(!0);n.setAttribute("data-template","false"),n.setAttribute("data-id",t.id),r=Ks(n.outerHTML)}}else r=this.componentFactory.createToastMessage({"data-id":t.id,"data-template":!1,title:t.title,text:t.text,status:t.status});return c`<div class=${y(s)} data-id="${t.id}">${r}</div>`}get containerClasses(){return{"toast-container":!0,[this.position]:!0}}render(){return c`
|
|
2826
|
+
<div
|
|
2827
|
+
part="toast-container"
|
|
2828
|
+
class=${y(this.containerClasses)}
|
|
2829
|
+
@animationend=${this.handleAnimationEnd}
|
|
2830
|
+
aria-live="polite"
|
|
2831
|
+
>
|
|
2832
|
+
${Od(this.toasts,t=>t.id,t=>this.getToastMessageTemplate(t))}
|
|
2833
|
+
</div>
|
|
2834
|
+
`}};Os.styles=[Id,Ad],rr([a({type:String})],Os.prototype,"position",2),rr([k()],Os.prototype,"toasts",2),Os=rr([$("ds-toast")],Os);var Nd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,Is=(e,t,s,r)=>{for(var i=r>1?void 0:r?_d(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Nd(t,s,i),i};let Ke=class extends H{constructor(){super(...arguments),this.checked=!1,this.checkedText="",this.uncheckedText="",this.rounded=!0}updated(t){super.updated(t),this.iconName=this.checked?"minus":"plus",this.variant=this.checked?"primary":"secondary"}handleClick(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}render(){var t;return c`
|
|
2835
|
+
<style>
|
|
2836
|
+
:host {
|
|
2837
|
+
pointer-events: ${this.disabled?"none":"visible"};
|
|
2838
|
+
}
|
|
2839
|
+
</style>
|
|
2840
|
+
${this.cssTokens}
|
|
2841
|
+
<button
|
|
2842
|
+
aria-label=${(t=this.textContent)==null?void 0:t.replace(/^\s+|\s+$/g,"")}
|
|
2843
|
+
class=${y(this.classes)}
|
|
2844
|
+
?disabled=${this.disabled}
|
|
2845
|
+
type=${this.type}
|
|
2846
|
+
@click=${this.handleClick}
|
|
2847
|
+
>
|
|
2848
|
+
${Ot(this.iconPosition==="left",()=>c`${this.iconTemplate}`)}
|
|
2849
|
+
${this.checked?this.checkedText:this.uncheckedText}
|
|
2850
|
+
${Ot(this.iconPosition==="right",()=>c`${this.iconTemplate}`)}
|
|
2851
|
+
</button>
|
|
2852
|
+
`}};Is([a({type:Boolean,converter:w,reflect:!0})],Ke.prototype,"checked",2),Is([a({type:String,attribute:"checked-text"})],Ke.prototype,"checkedText",2),Is([a({type:String,attribute:"unchecked-text"})],Ke.prototype,"uncheckedText",2),Is([a({type:Boolean,converter:w})],Ke.prototype,"rounded",2),Ke=Is([$("ds-toggle-button",{skipTagAsComponentName:!0,extendComponentNames:["ds-button"]})],Ke);const Bd=f`
|
|
2853
|
+
.container {
|
|
2854
|
+
display: flex;
|
|
2855
|
+
justify-content: flex-start;
|
|
2856
|
+
align-items: center;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
::slotted([slot='on']),
|
|
2860
|
+
::slotted([slot='off']) {
|
|
2861
|
+
cursor: pointer;
|
|
2862
|
+
transition: color 200ms ease-in-out;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
.track-container {
|
|
2866
|
+
display: inline-flex;
|
|
2867
|
+
justify-content: flex-start;
|
|
2868
|
+
align-items: center;
|
|
2869
|
+
position: relative;
|
|
2870
|
+
background: transparent;
|
|
2871
|
+
border: none;
|
|
2872
|
+
outline: none;
|
|
2873
|
+
padding: 0;
|
|
2874
|
+
cursor: pointer;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
.fill {
|
|
2878
|
+
transition: width 200ms ease-in-out;
|
|
2879
|
+
position: absolute;
|
|
2880
|
+
left: 0;
|
|
2881
|
+
top: 50%;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
.dot {
|
|
2885
|
+
border-radius: 100%;
|
|
2886
|
+
position: absolute;
|
|
2887
|
+
top: 0;
|
|
2888
|
+
left: 0;
|
|
2889
|
+
transition: left 200ms ease-in-out;
|
|
2890
|
+
}
|
|
2891
|
+
`;var Ld=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Ye=(e,t,s,r)=>{for(var i=r>1?void 0:r?Dd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ld(t,s,i),i};let ie=class extends T{constructor(){super(...arguments),this.size="medium",this.checked=!1,this.disabled=!1,this.mode="light"}handleClick(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}handleClickOff(){this.checked&&this.handleClick()}handleClickOn(){this.checked||this.handleClick()}get styleTokens(){return M`
|
|
2892
|
+
<style>
|
|
2893
|
+
:host {
|
|
2894
|
+
color-scheme: ${this.mode};
|
|
2895
|
+
}
|
|
2896
|
+
</style>
|
|
2897
|
+
`}get labelClasses(){return{container:!0,[this.size]:!!this.size,checked:this.checked,disabled:this.disabled,[this.mode]:!!this.mode}}render(){return c`
|
|
2898
|
+
${this.styleTokens}
|
|
2899
|
+
<div class=${y(this.labelClasses)} @click=${this.handleClick}>
|
|
2900
|
+
<slot name="off" @click=${this.handleClickOff}></slot>
|
|
2901
|
+
<slot name="label"></slot>
|
|
2902
|
+
<button
|
|
2903
|
+
class="track-container"
|
|
2904
|
+
type="button"
|
|
2905
|
+
role="switch"
|
|
2906
|
+
aria-checked=${this.checked}
|
|
2907
|
+
aria-label=${this.dataAriaLabel}
|
|
2908
|
+
data-action="aria-switch"
|
|
2909
|
+
?disabled=${this.disabled}
|
|
2910
|
+
>
|
|
2911
|
+
<span class="track"></span>
|
|
2912
|
+
<span class="fill"></span>
|
|
2913
|
+
<span class="dot"></span>
|
|
2914
|
+
</button>
|
|
2915
|
+
<slot name="on" @click=${this.handleClickOn}></slot>
|
|
2916
|
+
</div>
|
|
2917
|
+
`}};ie.styles=[Bd],Ye([a({type:String})],ie.prototype,"size",2),Ye([a({type:Boolean,converter:w,reflect:!0})],ie.prototype,"checked",2),Ye([a({type:Boolean,converter:w,reflect:!0})],ie.prototype,"disabled",2),Ye([a({type:String,reflect:!0})],ie.prototype,"mode",2),Ye([a({type:String,attribute:"data-aria-label"})],ie.prototype,"dataAriaLabel",2),ie=Ye([$("ds-toggle-switch")],ie);const Md=f`
|
|
2918
|
+
:host {
|
|
2919
|
+
position: relative;
|
|
2920
|
+
display: inline-block;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
.title {
|
|
2924
|
+
text-align: left;
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
.body {
|
|
2928
|
+
text-align: left;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
.buttons-container {
|
|
2932
|
+
display: grid;
|
|
2933
|
+
grid-template-columns: 1fr 1fr;
|
|
2934
|
+
justify-content: flex-end;
|
|
2935
|
+
}
|
|
2936
|
+
`,jd=f`
|
|
2937
|
+
.tooltip {
|
|
2938
|
+
width: max-content;
|
|
2939
|
+
white-space: normal;
|
|
2940
|
+
box-sizing: border-box;
|
|
2941
|
+
position: absolute;
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
.tooltip.complex {
|
|
2945
|
+
padding: 12px;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
.tooltip.top {
|
|
2949
|
+
bottom: 100%;
|
|
2950
|
+
margin-bottom: 13px;
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
.tooltip.bottom {
|
|
2954
|
+
top: 100%;
|
|
2955
|
+
margin-top: 13px;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
.tooltip.left {
|
|
2959
|
+
right: 100%;
|
|
2960
|
+
margin-right: 13px;
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
.tooltip.right {
|
|
2964
|
+
left: 100%;
|
|
2965
|
+
margin-left: 13px;
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
.tooltip.top.center,
|
|
2969
|
+
.tooltip.bottom.center {
|
|
2970
|
+
left: 50%;
|
|
2971
|
+
transform: translateX(-50%);
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
.tooltip.left.center,
|
|
2975
|
+
.tooltip.right.center {
|
|
2976
|
+
top: 50%;
|
|
2977
|
+
transform: translateY(-50%);
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
.tooltip.top.start,
|
|
2981
|
+
.tooltip.bottom.start {
|
|
2982
|
+
left: 0;
|
|
2983
|
+
transform: none;
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
.tooltip.left.start,
|
|
2987
|
+
.tooltip.right.start {
|
|
2988
|
+
top: 0;
|
|
2989
|
+
transform: none;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
.tooltip.top.end,
|
|
2993
|
+
.tooltip.bottom.end {
|
|
2994
|
+
left: auto;
|
|
2995
|
+
right: 0;
|
|
2996
|
+
transform: none;
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
.tooltip.left.end,
|
|
3000
|
+
.tooltip.right.end {
|
|
3001
|
+
top: auto;
|
|
3002
|
+
bottom: 0;
|
|
3003
|
+
transform: none;
|
|
3004
|
+
}
|
|
3005
|
+
`,Fd=f`
|
|
3006
|
+
.arrow {
|
|
3007
|
+
width: 0;
|
|
3008
|
+
height: 0;
|
|
3009
|
+
border-style: solid;
|
|
3010
|
+
position: absolute;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
.arrow.top {
|
|
3014
|
+
border-width: 5px 6px 0 6px;
|
|
3015
|
+
bottom: calc(100% + 9px);
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
.arrow.bottom {
|
|
3019
|
+
border-width: 0 6px 5px 6px;
|
|
3020
|
+
top: calc(100% + 9px);
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
.arrow.left {
|
|
3024
|
+
border-width: 6px 0 6px 5px;
|
|
3025
|
+
right: calc(100% + 9px);
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
.arrow.right {
|
|
3029
|
+
border-width: 6px 5px 6px 0;
|
|
3030
|
+
left: calc(100% + 9px);
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
.arrow.top,
|
|
3034
|
+
.arrow.bottom {
|
|
3035
|
+
left: 50%;
|
|
3036
|
+
transform: translateX(-50%);
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
.arrow.left,
|
|
3040
|
+
.arrow.right {
|
|
3041
|
+
top: 50%;
|
|
3042
|
+
transform: translateY(-50%);
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
.arrow.top.start.not-positionable,
|
|
3046
|
+
.arrow.bottom.start.not-positionable {
|
|
3047
|
+
left: 6px;
|
|
3048
|
+
transform: none;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
.arrow.top.end.not-positionable,
|
|
3052
|
+
.arrow.bottom.end.not-positionable {
|
|
3053
|
+
left: auto;
|
|
3054
|
+
right: 6px;
|
|
3055
|
+
transform: none;
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
.arrow.left.start.not-positionable,
|
|
3059
|
+
.arrow.right.start.not-positionable {
|
|
3060
|
+
top: 6px;
|
|
3061
|
+
transform: none;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
.arrow.left.end.not-positionable,
|
|
3065
|
+
.arrow.right.end.not-positionable {
|
|
3066
|
+
top: auto;
|
|
3067
|
+
bottom: 6px;
|
|
3068
|
+
transform: none;
|
|
3069
|
+
}
|
|
3070
|
+
`;var Rd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,ht=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ud(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Rd(t,s,i),i};let tt=class extends Jt(T){constructor(){super(...arguments),this.mode="light",this.titleText="",this.bodyText="",this.position="bottom",this.align="center",this.show=!1,this.zIndex=2e3,this.bodyWidth="unset",this.handleResize=Ai({func:()=>this.requestUpdate()}),this.handleClickOutside=t=>{var s;const r=t.target;r!==this&&!this.contains(r)&&!((s=this.shadowRoot)!=null&&s.contains(r))&&(this.show=!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}willUpdate(t){t.has("show")&&(this.show?document.addEventListener("click",this.handleClickOutside):document.removeEventListener("click",this.handleClickOutside))}get arrowClasses(){var t;return{arrow:!0,[this.position]:!0,[this.align]:!0,[this.mode]:!0,"not-positionable":(this==null?void 0:this.offsetWidth)>((t=this.tooltip)==null?void 0:t.offsetWidth)}}get tooltipClasses(){return{tooltip:!0,[this.position]:!0,[this.align]:!0,[this.mode]:!0,complex:this.cancelButtonText||this.confirmButtonText}}get buttonsTemplate(){if(!this.cancelButtonText&&!this.confirmButtonText)return h;const t=this.mode==="light"?"dark":"light";return c`
|
|
3071
|
+
<div class="buttons-container">
|
|
3072
|
+
${this.cancelButtonText?this.componentFactory.createButton({class:"cancel-button","@click":this.handleClickCancelButton,size:"small",variant:"secondary",mode:t,children:this.cancelButtonText}):h}
|
|
3073
|
+
${this.confirmButtonText?this.componentFactory.createButton({class:"confirm-button","@click":this.handleClickConfirmButton,size:"small",variant:"primary",mode:t,children:this.confirmButtonText}):h}
|
|
3074
|
+
</div>
|
|
3075
|
+
`}get tooltipTemplate(){return this.show?c`
|
|
3076
|
+
<div class=${y(this.arrowClasses)} @mouseout="${this.handleMouseOut}"></div>
|
|
3077
|
+
<div class=${y(this.tooltipClasses)} @mouseout=${this.handleMouseOut}>
|
|
3078
|
+
${this.titleText?c`<div class="title">${this.titleText}</div>`:h}
|
|
3079
|
+
${this.bodyText?c`<div class="body">${this.bodyText}</div>`:h}
|
|
3080
|
+
${this.buttonsTemplate}
|
|
3081
|
+
</div>
|
|
3082
|
+
`:h}getTooltipWidth(){const t=this.offsetLeft+this.scrollLeft+this.clientLeft,s=document.body.clientWidth-t-this.clientWidth;let r;return this.position==="left"?r=t-13:this.position==="right"?r=s-13:this.align==="center"?r=(t<s?t:s)*2+this.clientWidth:this.align==="start"?r=document.body.clientWidth-t:this.align==="end"&&(r=t+this.clientWidth),`${r-16-32}px`}get styleTokens(){return M`
|
|
3083
|
+
<style>
|
|
3084
|
+
:host {
|
|
3085
|
+
color-scheme: ${this.mode};
|
|
3086
|
+
}
|
|
3087
|
+
</style>
|
|
3088
|
+
`}render(){return c`
|
|
3089
|
+
<style>
|
|
3090
|
+
.tooltip {
|
|
3091
|
+
max-width: ${this.getTooltipWidth()};
|
|
3092
|
+
}
|
|
3093
|
+
.tooltip,
|
|
3094
|
+
.arrow {
|
|
3095
|
+
z-index: ${this.zIndex};
|
|
3096
|
+
}
|
|
3097
|
+
.body {
|
|
3098
|
+
max-width: ${this.bodyWidth};
|
|
3099
|
+
}
|
|
3100
|
+
</style>
|
|
3101
|
+
${this.styleTokens}
|
|
3102
|
+
<slot
|
|
3103
|
+
@mouseover="${this.handleMouseOver}"
|
|
3104
|
+
@mouseout="${this.handleMouseOut}"
|
|
3105
|
+
@click=${this.handleClickSlot}
|
|
3106
|
+
></slot>
|
|
3107
|
+
|
|
3108
|
+
${this.tooltipTemplate}
|
|
3109
|
+
`}handleClickSlot(){["xs","s","m"].includes(this.viewport)&&(this.show=!this.show)}handleMouseOver(){["xs","s","m"].includes(this.viewport)||(this.show=!0)}handleMouseOut(){["xs","s","m"].includes(this.viewport)||setTimeout(()=>{var t,s,r,i,n;!((s=(t=this.tooltip)==null?void 0:t.matches)!=null&&s.call(t,":hover"))&&!((i=(r=this.arrow)==null?void 0:r.matches)!=null&&i.call(r,":hover"))&&!((n=this==null?void 0:this.matches)!=null&&n.call(this,":hover"))&&(this.show=!1)},150)}handleClickCancelButton(){this.dispatchEvent(new CustomEvent("click-cancel-button",{bubbles:!0,composed:!0})),this.show=!1}handleClickConfirmButton(){this.dispatchEvent(new CustomEvent("click-confirm-button",{bubbles:!0,composed:!0}))}};tt.styles=[Md,jd,Fd],ht([a({type:String,reflect:!0})],tt.prototype,"mode",2),ht([a({type:String,attribute:"title-text"})],tt.prototype,"titleText",2),ht([a({type:String,attribute:"body-text"})],tt.prototype,"bodyText",2),ht([a({type:String})],tt.prototype,"position",2),ht([a({type:String})],tt.prototype,"align",2),ht([a({type:String,attribute:"cancel-button-text"})],tt.prototype,"cancelButtonText",2),ht([a({type:String,attribute:"confirm-button-text"})],tt.prototype,"confirmButtonText",2),ht([a({type:Boolean,reflect:!0,converter:w})],tt.prototype,"show",2),ht([a({type:Number,attribute:"z-index"})],tt.prototype,"zIndex",2),ht([a({type:String,attribute:"body-width"})],tt.prototype,"bodyWidth",2),ht([Et(".tooltip")],tt.prototype,"tooltip",2),ht([Et(".arrow")],tt.prototype,"arrow",2),tt=ht([$("ds-tooltip")],tt);const Vd=f`
|
|
3110
|
+
:host {
|
|
3111
|
+
display: contents;
|
|
3112
|
+
}
|
|
3113
|
+
`;var Hd=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,As=(e,t,s,r)=>{for(var i=r>1?void 0:r?Wd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Hd(t,s,i),i};let $e=class extends T{constructor(){super(...arguments),this.size="medium",this.disabled=!1}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":"user"})}get initialsTemplate(){const e=this.getInitialsFromName(this.name);return c`<span class="initials" aria-hidden="true">${e}</span>`}getInitialsFromName(e){return e?e.trim().split(/\s+/).filter(Boolean).slice(0,2).map(t=>t[0]).join("").toUpperCase():""}get classes(){return{container:!0,disabled:this.disabled,[this.size]:!0,[`mode-${this.mode}`]:!0}}get hasImage(){return Array.isArray(this.assignedImages)&&this.assignedImages.length>0}get mode(){var e;return this.hasImage?"media":(e=this.name)!=null&&e.trim()?"text":"icon"}handleSlotChange(){this.requestUpdate()}get styleTokens(){return M`
|
|
3114
|
+
<style>
|
|
3115
|
+
:host{
|
|
3116
|
+
pointer-events: ${this.disabled?"none":"auto"};
|
|
3117
|
+
}
|
|
3118
|
+
</style>
|
|
3119
|
+
`}handleKeyDown(e){this.disabled||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}render(){return c`
|
|
3120
|
+
${this.styleTokens}
|
|
3121
|
+
<div
|
|
3122
|
+
class=${y(this.classes)}
|
|
3123
|
+
title=${ot(this.name)}
|
|
3124
|
+
aria-label=${`Open ${this.name?this.name+"'s ":""}profile menu`}
|
|
3125
|
+
aria-disabled=${ot(this.disabled?"true":void 0)}
|
|
3126
|
+
role="button"
|
|
3127
|
+
tabindex=${this.disabled?-1:0}
|
|
3128
|
+
@keydown=${this.handleKeyDown}
|
|
3129
|
+
>
|
|
3130
|
+
${this.mode==="icon"?this.iconTemplate:h}
|
|
3131
|
+
${this.mode==="text"?this.initialsTemplate:h}
|
|
3132
|
+
<div class="media" aria-hidden=${String(this.mode!=="media")}><slot name="media" @slotchange=${this.handleSlotChange}></slot></div>
|
|
3133
|
+
</div>
|
|
3134
|
+
`}};$e.styles=[Vd],As([a({type:String})],$e.prototype,"size",2),As([a({type:String})],$e.prototype,"name",2),As([a({type:Boolean,converter:w,reflect:!0})],$e.prototype,"disabled",2),As([yt({slot:"media",selector:"img"})],$e.prototype,"assignedImages",2),$e=As([$("ds-avatar")],$e);const qd=f`
|
|
3135
|
+
:host {
|
|
3136
|
+
display: contents;
|
|
3137
|
+
}
|
|
3138
|
+
`;var Gd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,nr=(e,t,s,r)=>{for(var i=r>1?void 0:r?Kd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Gd(t,s,i),i};let Ps=class extends T{constructor(){super(...arguments),this.steps=0,this.currentStep=-1}get classes(){return{container:!0}}render(){if(!this.steps)return h;const t=Math.max(-1,Math.min(this.currentStep,this.steps));return c`
|
|
3139
|
+
<div
|
|
3140
|
+
data-testid="ds-stepper-container"
|
|
3141
|
+
class=${y(this.classes)}
|
|
3142
|
+
role="list"
|
|
3143
|
+
aria-label="Steps"
|
|
3144
|
+
>
|
|
3145
|
+
${Array.from({length:this.steps},(s,r)=>{const i=r<=t,n=r===t;return c`<span class=${y({step:!0,active:i,current:n})} role="listitem" aria-posinset=${r+1} aria-setsize=${this.steps} aria-current=${n?"step":"false"}></span>`})}
|
|
3146
|
+
</div>
|
|
3147
|
+
`}};Ps.styles=[qd],nr([a({type:Number,attribute:"steps",reflect:!0})],Ps.prototype,"steps",2),nr([a({type:Number,attribute:"current-step",reflect:!0})],Ps.prototype,"currentStep",2),Ps=nr([$("ds-stepper")],Ps);const Yd=f`
|
|
3148
|
+
:host {
|
|
3149
|
+
display: contents;
|
|
3150
|
+
}
|
|
3151
|
+
`;var Xd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,oi=(e,t,s,r)=>{for(var i=r>1?void 0:r?Jd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Xd(t,s,i),i};let Xe=class extends Jt(T){constructor(){super(...arguments),this.size="medium"}get classes(){const t=typeof this.size=="string"?this.size:this.size[this.viewport];return{container:!0,[t]:!!t}}get styleTokens(){var t,s;return M`
|
|
3152
|
+
<style>
|
|
3153
|
+
.header {
|
|
3154
|
+
display: ${((t=this.headerItems)==null?void 0:t.length)>0?"block":"none"};
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
.footer {
|
|
3158
|
+
display: ${((s=this.footerItems)==null?void 0:s.length)>0?"block":"none"};
|
|
3159
|
+
}
|
|
3160
|
+
</style>
|
|
3161
|
+
`}render(){return c`
|
|
3162
|
+
${this.styleTokens}
|
|
3163
|
+
<div part="container" data-testid="ds-static-box-container" class=${y(this.classes)}>
|
|
3164
|
+
<div class="body">
|
|
3165
|
+
<div part="header" class="header">
|
|
3166
|
+
<slot name="header"></slot>
|
|
3167
|
+
</div>
|
|
3168
|
+
<div part="main" class="main ds-scroll">
|
|
3169
|
+
<slot name="main"></slot>
|
|
3170
|
+
</div>
|
|
3171
|
+
</div>
|
|
3172
|
+
<div part="footer" class="footer">
|
|
3173
|
+
<slot name="footer"></slot>
|
|
3174
|
+
</div>
|
|
3175
|
+
</div>
|
|
3176
|
+
`}};Xe.styles=[Yd],oi([a({type:String,converter:gs})],Xe.prototype,"size",2),oi([Fi({slot:"header",flatten:!0})],Xe.prototype,"headerItems",2),oi([Fi({slot:"footer",flatten:!0})],Xe.prototype,"footerItems",2),Xe=oi([$("ds-static-box")],Xe);const Zd=f`
|
|
3177
|
+
:host {
|
|
3178
|
+
display: contents;
|
|
3179
|
+
}
|
|
3180
|
+
`;var Qd=Object.defineProperty,th=Object.getOwnPropertyDescriptor,ai=(e,t,s,r)=>{for(var i=r>1?void 0:r?th(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Qd(t,s,i),i};let Je=class extends T{constructor(){super(...arguments),this.size="medium",this.selected=!1,this.error=!1,this.handleClick=t=>{t.stopPropagation()}}get classes(){return{container:!0,selected:this.selected,[this.size]:!!this.size}}get errorClasses(){return{error:!0,selected:this.selected,[this.size]:!!this.size}}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":"cross-circle",size:24})}get contentTemplate(){return this.error?h:c`
|
|
3181
|
+
<div part="container" class=${y(this.classes)} data-testid="ds-interactive-card-container" tabindex="0">
|
|
3182
|
+
<header class="header" part="header">
|
|
3183
|
+
<div class="header-main">
|
|
3184
|
+
<slot name="title" class="title" part="title"></slot>
|
|
3185
|
+
<slot name="subtitle" class="subtitle" part="subtitle"></slot>
|
|
3186
|
+
</div>
|
|
3187
|
+
<div class="meta" part="meta"><slot name="meta"></slot></div>
|
|
3188
|
+
</header>
|
|
3189
|
+
<div data-testid="ds-interactive-card-content" class="content" part="content"><slot name="content"></slot></div>
|
|
3190
|
+
<footer @click=${this.handleClick} class="cta" part="cta"><slot name="cta"></slot></footer>
|
|
3191
|
+
</div>
|
|
3192
|
+
`}get errorTemplate(){return this.error?c`
|
|
3193
|
+
<div part="error" class=${y(this.errorClasses)}>
|
|
3194
|
+
${this.iconTemplate}
|
|
3195
|
+
<div class="error-content" part="error-text">
|
|
3196
|
+
<slot class="error-title" name="error-title"></slot>
|
|
3197
|
+
<slot class="error-text" name="error-text" data-testid="ds-interactive-card-error-text"></slot>
|
|
3198
|
+
</div>
|
|
3199
|
+
</div>
|
|
3200
|
+
`:h}render(){return c`
|
|
3201
|
+
${this.contentTemplate}
|
|
3202
|
+
${this.errorTemplate}
|
|
3203
|
+
`}};Je.styles=[Zd],ai([a({type:String})],Je.prototype,"size",2),ai([a({type:Boolean,converter:w})],Je.prototype,"selected",2),ai([a({type:Boolean,converter:w})],Je.prototype,"error",2),Je=ai([$("ds-interactive-card")],Je);const eh=f`
|
|
3204
|
+
:host {
|
|
3205
|
+
display: contents;
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
.container {
|
|
3209
|
+
width: 100%;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
.nav {
|
|
3213
|
+
position: absolute;
|
|
3214
|
+
left: 0;
|
|
3215
|
+
bottom: 0;
|
|
3216
|
+
width: 100%;
|
|
3217
|
+
display: flex;
|
|
3218
|
+
box-sizing: border-box;
|
|
3219
|
+
}
|
|
3220
|
+
`;var sh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,or=(e,t,s,r)=>{for(var i=r>1?void 0:r?ih(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&sh(t,s,i),i};let zs=class extends T{constructor(){super(...arguments),this.open=!1,this.toggleModal=()=>{this.open=!this.open},this.handleSlotChange=t=>{const s=t.target.assignedElements().find(r=>r.tagName==="DS-BUTTON");this.setMainCtaSize(s)},this.setMainCtaSize=t=>{t&&t.setAttribute("size",JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"}))}}firstUpdated(t){var s;super.firstUpdated(t);const r=(s=this.mainCtas)==null?void 0:s[0];r&&this.setMainCtaSize(r)}modalButtonTemplate(){return this.componentFactory.createIconButton({class:"modal-button","icon-name":this.open?"cross":"triple-dot-v","@click":this.toggleModal,"data-testid":"modal-button","data-aria-label":"more actions",size:JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"})})}classes(){return{container:!0,open:this.open}}render(){return c`
|
|
3221
|
+
<div class=${y(this.classes())}>
|
|
3222
|
+
<nav class="nav" part="bar">
|
|
3223
|
+
<div class="aside" part="aside">
|
|
3224
|
+
<slot name="aside-text"></slot>
|
|
3225
|
+
<span class="helper-text-container">
|
|
3226
|
+
<slot name="aside-icon"></slot>
|
|
3227
|
+
<slot name="aside-helper-text"></slot>
|
|
3228
|
+
</span>
|
|
3229
|
+
</div>
|
|
3230
|
+
<div class="actions-container" part="actions-container">
|
|
3231
|
+
<slot name="main-cta" @slotchange=${this.handleSlotChange}></slot>
|
|
3232
|
+
${this.modalButtonTemplate()}
|
|
3233
|
+
</div>
|
|
3234
|
+
</nav>
|
|
3235
|
+
<div part="modal" class="modal">
|
|
3236
|
+
<slot name="ctas"></slot>
|
|
3237
|
+
</div>
|
|
3238
|
+
</div>
|
|
3239
|
+
`}};zs.styles=[eh],or([k()],zs.prototype,"open",2),or([yt({slot:"main-cta",selector:"ds-button",flatten:!0})],zs.prototype,"mainCtas",2),zs=or([$("ds-sidebar-navigation")],zs);const ar=({children:e,...t})=>m.jsx("ds-accordion-react",{...t,children:e}),rh=({children:e})=>m.jsx("div",{slot:"title",children:e}),nh=({children:e})=>m.jsx("div",{slot:"content",children:e});ar.Title=rh,ar.Content=nh;const oh=({className:e,...t})=>m.jsx("ds-bullets-react",{class:e,...t}),lr=["xs","s","m","l","xl","xxl"];function Cn(){const e={};return lr.forEach((t,s)=>{const r=`(min-width: ${_t[t]}px)`;let i="";if(s<lr.length-1){const n=lr[s+1];i=` and (max-width: ${_t[n]-1}px)`}e[t]=window.matchMedia(r+i)}),e}const ah=()=>{const[e,t]=R.useState(()=>{const s=Cn();let r="";return Object.keys(s).forEach(i=>{s[i].matches&&(r=i)}),r});return R.useLayoutEffect(()=>{const s=Cn(),r=Object.keys(s).map(i=>{const n=o=>{o.matches&&t(i)};return s[i].addListener(n),()=>{s[i].removeListener(n)}});return()=>{r.forEach(i=>{i()})}},[]),e},lh=e=>{R.useEffect(()=>{const t=[];return e.forEach(s=>{const{eventName:r,handler:i,options:n,target:o=document}=s,l=u=>{i(u)};o.addEventListener(r,l,n);const d=()=>{o.removeEventListener(r,l,n)};t.push(d)}),()=>{t.forEach(s=>{s()})}},e.flatMap(({dependencies:t})=>t??[]))};function _(e){const t=R.useRef(null),s=R.useRef(e);return R.useEffect(()=>{s.current=e},[e]),R.useEffect(()=>{const r=t.current;if(!r)return;const i={};return Object.keys(s.current).forEach(n=>{const o=l=>{const d=s.current[n];d&&d(l)};i[n]=o,r.addEventListener(n,o)}),()=>{Object.keys(i).forEach(n=>{r.removeEventListener(n,i[n])})}},[]),{ref:t}}function ch(e){const{callback:t,element:s}=e;R.useEffect(()=>{if(!s)return;const r=new ResizeObserver(t);return r.observe(s),()=>{r==null||r.disconnect()}},[s,t])}function dh(e){const{className:t,children:s,onClick:r,size:i,...n}=e,{ref:o}=_({click:r});return m.jsx("ds-button-react",{ref:o,size:typeof i=="string"?i:JSON.stringify(i),class:t,...n,children:s})}function hh(e){const{className:t,children:s,...r}=e;return m.jsx("ds-carousel-indicator-react",{class:t,...r})}function uh({onChange:e,children:t,...s}){const{ref:r}=_({change:e});return m.jsx("ds-checkbox-react",{ref:r,...s,children:t})}function ph(e){const{className:t,children:s,...r}=e;return m.jsx("ds-chip-react",{class:t,...r,children:s})}function mh(e){const{className:t,children:s,onChange:r,...i}=e,{ref:n}=_({"ds-chips:change":r});return m.jsx("ds-chips-react",{ref:n,class:t,...i,children:s})}function fh(e){const{className:t,...s}=e;return m.jsx("ds-currency-react",{class:t,...s})}function gh(e){const{className:t,children:s,onClose:r,withPortal:i,...n}=e,{ref:o}=_({"ds-dialog:close":r});if(!n.open)return null;const l=m.jsx("ds-dialog-react",{ref:o,class:t,...n,children:s});return i?m.jsx("ds-portal-react",{style:{display:"none"},children:l}):l}function vh(e){const{className:t,children:s,...r}=e;return m.jsx("ds-dialog-body-react",{class:t,...r,children:s})}function yh(e){const{className:t,children:s,...r}=e;return m.jsx("ds-dialog-footer-react",{class:t,...r,children:s})}function bh(e){const{className:t,children:s,...r}=e;return m.jsx("ds-dialog-header-react",{class:t,...r,children:s})}function xh({className:e,...t}){return m.jsx("ds-divider-react",{class:e,...t})}function wh({children:e,onClick:t,...s}){const{ref:r}=_({click:t});return m.jsx("ds-hyperlink-react",{ref:r,...s,children:e})}function $h(e){const{"icon-name":t,className:s,...r}=e;return m.jsx("ds-icon-react",{"icon-name":t,class:s,...r})}function Sh(e){const{className:t,onClick:s,size:r,...i}=e,{ref:n}=_({click:s});return m.jsx("ds-icon-button-react",{ref:n,size:typeof r=="string"?r:JSON.stringify(r),class:t,...i})}const En=R.forwardRef(({className:e,onInput:t,onKeyDown:s,onChange:r,...i},n)=>{const{ref:o}=_({input:t,keydown:s,change:r});return R.useImperativeHandle(n,()=>o.current,[]),m.jsx("ds-input-react",{ref:o,class:e,...i})});En.displayName="Input";function kh({children:e,onClick:t,...s}){const{ref:r}=_({click:t});return m.jsx("ds-link-button-react",{ref:r,...s,children:e})}function On(e){return m.jsx("ds-loader-logo-react",{...e})}function Th(e){return m.jsx("ds-loader-bar-react",{...e})}function Ch(e){return m.jsx("ds-loader-dots-react",{...e})}function Eh(e){return m.jsx("ds-loader-spinner-react",{...e,children:e.text&&m.jsx("div",{slot:"text",children:e.text})})}const Oh={Logo:On,Bar:Th,Dots:Ch,Spinner:Eh};function Ih(e){const{className:t,children:s,...r}=e;return m.jsx("ds-logo-react",{class:t,...r})}function Ah({onChange:e,...t}){const{ref:s}=_({change:e});return m.jsx("ds-map-pin-react",{ref:s,...t})}var nt=function(){return nt=Object.assign||function(t){for(var s,r=1,i=arguments.length;r<i;r++){s=arguments[r];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},nt.apply(this,arguments)};function Ze(e,t,s){if(s||arguments.length===2)for(var r=0,i=t.length,n;r<i;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function Ph(e){var t=Object.create(null);return function(s){return t[s]===void 0&&(t[s]=e(s)),t[s]}}var zh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Nh=Ph(function(e){return zh.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),D="-ms-",Ns="-moz-",B="-webkit-",In="comm",li="rule",cr="decl",_h="@import",An="@keyframes",Bh="@layer",Pn=Math.abs,dr=String.fromCharCode,hr=Object.assign;function Lh(e,t){return Y(e,0)^45?(((t<<2^Y(e,0))<<2^Y(e,1))<<2^Y(e,2))<<2^Y(e,3):0}function zn(e){return e.trim()}function Kt(e,t){return(e=t.exec(e))?e[0]:e}function E(e,t,s){return e.replace(t,s)}function ci(e,t,s){return e.indexOf(t,s)}function Y(e,t){return e.charCodeAt(t)|0}function Qe(e,t,s){return e.slice(t,s)}function Nt(e){return e.length}function Nn(e){return e.length}function _s(e,t){return t.push(e),e}function Dh(e,t){return e.map(t).join("")}function _n(e,t){return e.filter(function(s){return!Kt(s,t)})}var di=1,ts=1,Bn=0,gt=0,W=0,es="";function hi(e,t,s,r,i,n,o,l){return{value:e,root:t,parent:s,type:r,props:i,children:n,line:di,column:ts,length:o,return:"",siblings:l}}function re(e,t){return hr(hi("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ss(e){for(;e.root;)e=re(e.root,{children:[e]});_s(e,e.siblings)}function Mh(){return W}function jh(){return W=gt>0?Y(es,--gt):0,ts--,W===10&&(ts=1,di--),W}function Ct(){return W=gt<Bn?Y(es,gt++):0,ts++,W===10&&(ts=1,di++),W}function Se(){return Y(es,gt)}function ui(){return gt}function pi(e,t){return Qe(es,e,t)}function ur(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Fh(e){return di=ts=1,Bn=Nt(es=e),gt=0,[]}function Rh(e){return es="",e}function pr(e){return zn(pi(gt-1,mr(e===91?e+2:e===40?e+1:e)))}function Uh(e){for(;(W=Se())&&W<33;)Ct();return ur(e)>2||ur(W)>3?"":" "}function Vh(e,t){for(;--t&&Ct()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return pi(e,ui()+(t<6&&Se()==32&&Ct()==32))}function mr(e){for(;Ct();)switch(W){case e:return gt;case 34:case 39:e!==34&&e!==39&&mr(W);break;case 40:e===41&&mr(e);break;case 92:Ct();break}return gt}function Hh(e,t){for(;Ct()&&e+W!==57;)if(e+W===84&&Se()===47)break;return"/*"+pi(t,gt-1)+"*"+dr(e===47?e:Ct())}function Wh(e){for(;!ur(Se());)Ct();return pi(e,gt)}function qh(e){return Rh(mi("",null,null,null,[""],e=Fh(e),0,[0],e))}function mi(e,t,s,r,i,n,o,l,d){for(var u=0,v=0,p=o,g=0,b=0,S=0,C=1,I=1,N=1,j=0,L="",F=i,U=n,z=r,O=L;I;)switch(S=j,j=Ct()){case 40:if(S!=108&&Y(O,p-1)==58){ci(O+=E(pr(j),"&","&\f"),"&\f",Pn(u?l[u-1]:0))!=-1&&(N=-1);break}case 34:case 39:case 91:O+=pr(j);break;case 9:case 10:case 13:case 32:O+=Uh(S);break;case 92:O+=Vh(ui()-1,7);continue;case 47:switch(Se()){case 42:case 47:_s(Gh(Hh(Ct(),ui()),t,s,d),d);break;default:O+="/"}break;case 123*C:l[u++]=Nt(O)*N;case 125*C:case 59:case 0:switch(j){case 0:case 125:I=0;case 59+v:N==-1&&(O=E(O,/\f/g,"")),b>0&&Nt(O)-p&&_s(b>32?Dn(O+";",r,s,p-1,d):Dn(E(O," ","")+";",r,s,p-2,d),d);break;case 59:O+=";";default:if(_s(z=Ln(O,t,s,u,v,i,l,L,F=[],U=[],p,n),n),j===123)if(v===0)mi(O,t,z,z,F,n,p,l,U);else switch(g===99&&Y(O,3)===110?100:g){case 100:case 108:case 109:case 115:mi(e,z,z,r&&_s(Ln(e,z,z,0,0,i,l,L,i,F=[],p,U),U),i,U,p,l,r?F:U);break;default:mi(O,z,z,z,[""],U,0,l,U)}}u=v=b=0,C=N=1,L=O="",p=o;break;case 58:p=1+Nt(O),b=S;default:if(C<1){if(j==123)--C;else if(j==125&&C++==0&&jh()==125)continue}switch(O+=dr(j),j*C){case 38:N=v>0?1:(O+="\f",-1);break;case 44:l[u++]=(Nt(O)-1)*N,N=1;break;case 64:Se()===45&&(O+=pr(Ct())),g=Se(),v=p=Nt(L=O+=Wh(ui())),j++;break;case 45:S===45&&Nt(O)==2&&(C=0)}}return n}function Ln(e,t,s,r,i,n,o,l,d,u,v,p){for(var g=i-1,b=i===0?n:[""],S=Nn(b),C=0,I=0,N=0;C<r;++C)for(var j=0,L=Qe(e,g+1,g=Pn(I=o[C])),F=e;j<S;++j)(F=zn(I>0?b[j]+" "+L:E(L,/&\f/g,b[j])))&&(d[N++]=F);return hi(e,t,s,i===0?li:l,d,u,v,p)}function Gh(e,t,s,r){return hi(e,t,s,In,dr(Mh()),Qe(e,2,-2),0,r)}function Dn(e,t,s,r,i){return hi(e,t,s,cr,Qe(e,0,r),Qe(e,r+1,-1),r,i)}function Mn(e,t,s){switch(Lh(e,t)){case 5103:return B+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return B+e+e;case 4789:return Ns+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return B+e+Ns+e+D+e+e;case 5936:switch(Y(e,t+11)){case 114:return B+e+D+E(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+D+E(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+D+E(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return B+e+D+e+e;case 6165:return B+e+D+"flex-"+e+e;case 5187:return B+e+E(e,/(\w+).+(:[^]+)/,B+"box-$1$2"+D+"flex-$1$2")+e;case 5443:return B+e+D+"flex-item-"+E(e,/flex-|-self/g,"")+(Kt(e,/flex-|baseline/)?"":D+"grid-row-"+E(e,/flex-|-self/g,""))+e;case 4675:return B+e+D+"flex-line-pack"+E(e,/align-content|flex-|-self/g,"")+e;case 5548:return B+e+D+E(e,"shrink","negative")+e;case 5292:return B+e+D+E(e,"basis","preferred-size")+e;case 6060:return B+"box-"+E(e,"-grow","")+B+e+D+E(e,"grow","positive")+e;case 4554:return B+E(e,/([^-])(transform)/g,"$1"+B+"$2")+e;case 6187:return E(E(E(e,/(zoom-|grab)/,B+"$1"),/(image-set)/,B+"$1"),e,"")+e;case 5495:case 3959:return E(e,/(image-set\([^]*)/,B+"$1$`$1");case 4968:return E(E(e,/(.+:)(flex-)?(.*)/,B+"box-pack:$3"+D+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+B+e+e;case 4200:if(!Kt(e,/flex-|baseline/))return D+"grid-column-align"+Qe(e,t)+e;break;case 2592:case 3360:return D+E(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(r,i){return t=i,Kt(r.props,/grid-\w+-end/)})?~ci(e+(s=s[t].value),"span",0)?e:D+E(e,"-start","")+e+D+"grid-row-span:"+(~ci(s,"span",0)?Kt(s,/\d+/):+Kt(s,/\d+/)-+Kt(e,/\d+/))+";":D+E(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(r){return Kt(r.props,/grid-\w+-start/)})?e:D+E(E(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return E(e,/(.+)-inline(.+)/,B+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nt(e)-1-t>6)switch(Y(e,t+1)){case 109:if(Y(e,t+4)!==45)break;case 102:return E(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+Ns+(Y(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ci(e,"stretch",0)?Mn(E(e,"stretch","fill-available"),t,s)+e:e}break;case 5152:case 5920:return E(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,n,o,l,d,u){return D+i+":"+n+u+(o?D+i+"-span:"+(l?d:+d-+n)+u:"")+e});case 4949:if(Y(e,t+6)===121)return E(e,":",":"+B)+e;break;case 6444:switch(Y(e,Y(e,14)===45?18:11)){case 120:return E(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+B+(Y(e,14)===45?"inline-":"")+"box$3$1"+B+"$2$3$1"+D+"$2box$3")+e;case 100:return E(e,":",":"+D)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return E(e,"scroll-","scroll-snap-")+e}return e}function fi(e,t){for(var s="",r=0;r<e.length;r++)s+=t(e[r],r,e,t)||"";return s}function Kh(e,t,s,r){switch(e.type){case Bh:if(e.children.length)break;case _h:case cr:return e.return=e.return||e.value;case In:return"";case An:return e.return=e.value+"{"+fi(e.children,r)+"}";case li:if(!Nt(e.value=e.props.join(",")))return""}return Nt(s=fi(e.children,r))?e.return=e.value+"{"+s+"}":""}function Yh(e){var t=Nn(e);return function(s,r,i,n){for(var o="",l=0;l<t;l++)o+=e[l](s,r,i,n)||"";return o}}function Xh(e){return function(t){t.root||(t=t.return)&&e(t)}}function Jh(e,t,s,r){if(e.length>-1&&!e.return)switch(e.type){case cr:e.return=Mn(e.value,e.length,s);return;case An:return fi([re(e,{value:E(e.value,"@","@"+B)})],r);case li:if(e.length)return Dh(s=e.props,function(i){switch(Kt(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ss(re(e,{props:[E(i,/:(read-\w+)/,":"+Ns+"$1")]})),ss(re(e,{props:[i]})),hr(e,{props:_n(s,r)});break;case"::placeholder":ss(re(e,{props:[E(i,/:(plac\w+)/,":"+B+"input-$1")]})),ss(re(e,{props:[E(i,/:(plac\w+)/,":"+Ns+"$1")]})),ss(re(e,{props:[E(i,/:(plac\w+)/,D+"input-$1")]})),ss(re(e,{props:[i]})),hr(e,{props:_n(s,r)});break}return""})}}var Zh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ke=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",jn="active",Fn="data-styled-version",gi="6.1.19",fr=`/*!sc*/
|
|
3240
|
+
`,vi=typeof window<"u"&&typeof document<"u",Qh=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),Rn=/invalid hook call/i,yi=new Set,tu=function(e,t){if(process.env.NODE_ENV!=="production"){var s=t?' with the id of "'.concat(t,'"'):"",r="The component ".concat(e).concat(s,` has been created dynamically.
|
|
3241
|
+
`)+`You may see this warning because you've called styled inside another component.
|
|
3242
|
+
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
3243
|
+
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
|
|
3244
|
+
`,i=console.error;try{var n=!0;console.error=function(o){for(var l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];Rn.test(o)?(n=!1,yi.delete(r)):i.apply(void 0,Ze([o],l,!1))},R.useRef(),n&&!yi.has(r)&&(console.warn(r),yi.add(r))}catch(o){Rn.test(o.message)&&yi.delete(r)}finally{console.error=i}}},bi=Object.freeze([]),is=Object.freeze({});function eu(e,t,s){return s===void 0&&(s=is),e.theme!==s.theme&&e.theme||t||s.theme}var gr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),su=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,iu=/(^-|-$)/g;function Un(e){return e.replace(su,"-").replace(iu,"")}var ru=/(a)(d)/gi,xi=52,Vn=function(e){return String.fromCharCode(e+(e>25?39:97))};function vr(e){var t,s="";for(t=Math.abs(e);t>xi;t=t/xi|0)s=Vn(t%xi)+s;return(Vn(t%xi)+s).replace(ru,"$1-$2")}var yr,Hn=5381,Te=function(e,t){for(var s=t.length;s;)e=33*e^t.charCodeAt(--s);return e},Wn=function(e){return Te(Hn,e)};function nu(e){return vr(Wn(e)>>>0)}function qn(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function br(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}var Gn=typeof Symbol=="function"&&Symbol.for,Kn=Gn?Symbol.for("react.memo"):60115,ou=Gn?Symbol.for("react.forward_ref"):60112,au={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},lu={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Yn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cu=((yr={})[ou]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yr[Kn]=Yn,yr);function Xn(e){return("type"in(t=e)&&t.type.$$typeof)===Kn?Yn:"$$typeof"in e?cu[e.$$typeof]:au;var t}var du=Object.defineProperty,hu=Object.getOwnPropertyNames,Jn=Object.getOwnPropertySymbols,uu=Object.getOwnPropertyDescriptor,pu=Object.getPrototypeOf,Zn=Object.prototype;function Qn(e,t,s){if(typeof t!="string"){if(Zn){var r=pu(t);r&&r!==Zn&&Qn(e,r,s)}var i=hu(t);Jn&&(i=i.concat(Jn(t)));for(var n=Xn(e),o=Xn(t),l=0;l<i.length;++l){var d=i[l];if(!(d in lu||s&&s[d]||o&&d in o||n&&d in n)){var u=uu(t,d);try{du(e,d,u)}catch{}}}}return e}function rs(e){return typeof e=="function"}function xr(e){return typeof e=="object"&&"styledComponentId"in e}function Ce(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function to(e,t){if(e.length===0)return"";for(var s=e[0],r=1;r<e.length;r++)s+=e[r];return s}function ns(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function wr(e,t,s){if(s===void 0&&(s=!1),!s&&!ns(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=wr(e[r],t[r]);else if(ns(t))for(var r in t)e[r]=wr(e[r],t[r]);return e}function $r(e,t){Object.defineProperty(e,"toString",{value:t})}var mu=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
3245
|
+
|
|
3246
|
+
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
3247
|
+
|
|
3248
|
+
- Are you trying to reuse it across renders?
|
|
3249
|
+
- Are you accidentally calling collectStyles twice?
|
|
3250
|
+
|
|
3251
|
+
`,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
3252
|
+
|
|
3253
|
+
`,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
3254
|
+
|
|
3255
|
+
- Does this error occur on the client and is your target falsy?
|
|
3256
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
3257
|
+
|
|
3258
|
+
`,5:`The clone method cannot be used on the client!
|
|
3259
|
+
|
|
3260
|
+
- Are you running in a client-like environment on the server?
|
|
3261
|
+
- Are you trying to run SSR on the client?
|
|
3262
|
+
|
|
3263
|
+
`,6:`Trying to insert a new style tag, but the given Node is unmounted!
|
|
3264
|
+
|
|
3265
|
+
- Are you using a custom target that isn't mounted?
|
|
3266
|
+
- Does your document not have a valid head element?
|
|
3267
|
+
- Have you accidentally removed a style tag manually?
|
|
3268
|
+
|
|
3269
|
+
`,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
|
|
3270
|
+
|
|
3271
|
+
`,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
3272
|
+
|
|
3273
|
+
`,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
3274
|
+
|
|
3275
|
+
`,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
3276
|
+
|
|
3277
|
+
`,14:`ThemeProvider: "theme" prop is required.
|
|
3278
|
+
|
|
3279
|
+
`,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
|
|
3280
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
3281
|
+
as for instance in your render method then you may be running into this limitation.
|
|
3282
|
+
|
|
3283
|
+
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
3284
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
3285
|
+
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function fu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var s=e[0],r=[],i=1,n=e.length;i<n;i+=1)r.push(e[i]);return r.forEach(function(o){s=s.replace(/%[a-z]/,o)}),s}function os(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(fu.apply(void 0,Ze([mu[e]],t,!1)).trim())}var gu=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var s=0,r=0;r<t;r++)s+=this.groupSizes[r];return s},e.prototype.insertRules=function(t,s){if(t>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,n=i;t>=n;)if((n<<=1)<0)throw os(16,"".concat(t));this.groupSizes=new Uint32Array(n),this.groupSizes.set(r),this.length=n;for(var o=i;o<n;o++)this.groupSizes[o]=0}for(var l=this.indexOfGroup(t+1),d=(o=0,s.length);o<d;o++)this.tag.insertRule(l,s[o])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var s=this.groupSizes[t],r=this.indexOfGroup(t),i=r+s;this.groupSizes[t]=0;for(var n=r;n<i;n++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(t){var s="";if(t>=this.length||this.groupSizes[t]===0)return s;for(var r=this.groupSizes[t],i=this.indexOfGroup(t),n=i+r,o=i;o<n;o++)s+="".concat(this.tag.getRule(o)).concat(fr);return s},e})(),vu=1<<30,wi=new Map,$i=new Map,Si=1,ki=function(e){if(wi.has(e))return wi.get(e);for(;$i.has(Si);)Si++;var t=Si++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>vu))throw os(16,"".concat(t));return wi.set(e,t),$i.set(t,e),t},yu=function(e,t){Si=t+1,wi.set(e,t),$i.set(t,e)},bu="style[".concat(ke,"][").concat(Fn,'="').concat(gi,'"]'),xu=new RegExp("^".concat(ke,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),wu=function(e,t,s){for(var r,i=s.split(","),n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},$u=function(e,t){for(var s,r=((s=t.textContent)!==null&&s!==void 0?s:"").split(fr),i=[],n=0,o=r.length;n<o;n++){var l=r[n].trim();if(l){var d=l.match(xu);if(d){var u=0|parseInt(d[1],10),v=d[2];u!==0&&(yu(v,u),wu(e,v,d[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(l)}}},eo=function(e){for(var t=document.querySelectorAll(bu),s=0,r=t.length;s<r;s++){var i=t[s];i&&i.getAttribute(ke)!==jn&&($u(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function Su(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var so=function(e){var t=document.head,s=e||t,r=document.createElement("style"),i=(function(l){var d=Array.from(l.querySelectorAll("style[".concat(ke,"]")));return d[d.length-1]})(s),n=i!==void 0?i.nextSibling:null;r.setAttribute(ke,jn),r.setAttribute(Fn,gi);var o=Su();return o&&r.setAttribute("nonce",o),s.insertBefore(r,n),r},ku=(function(){function e(t){this.element=so(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(s){if(s.sheet)return s.sheet;for(var r=document.styleSheets,i=0,n=r.length;i<n;i++){var o=r[i];if(o.ownerNode===s)return o}throw os(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,s){try{return this.sheet.insertRule(s,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var s=this.sheet.cssRules[t];return s&&s.cssText?s.cssText:""},e})(),Tu=(function(){function e(t){this.element=so(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,s){if(t<=this.length&&t>=0){var r=document.createTextNode(s);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),Cu=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,s){return t<=this.length&&(this.rules.splice(t,0,s),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),io=vi,Eu={isServer:!vi,useCSSOMInjection:!Qh},ro=(function(){function e(t,s,r){t===void 0&&(t=is),s===void 0&&(s={});var i=this;this.options=nt(nt({},Eu),t),this.gs=s,this.names=new Map(r),this.server=!!t.isServer,!this.server&&vi&&io&&(io=!1,eo(this)),$r(this,function(){return(function(n){for(var o=n.getTag(),l=o.length,d="",u=function(p){var g=(function(N){return $i.get(N)})(p);if(g===void 0)return"continue";var b=n.names.get(g),S=o.getGroup(p);if(b===void 0||!b.size||S.length===0)return"continue";var C="".concat(ke,".g").concat(p,'[id="').concat(g,'"]'),I="";b!==void 0&&b.forEach(function(N){N.length>0&&(I+="".concat(N,","))}),d+="".concat(S).concat(C,'{content:"').concat(I,'"}').concat(fr)},v=0;v<l;v++)u(v);return d})(i)})}return e.registerId=function(t){return ki(t)},e.prototype.rehydrate=function(){!this.server&&vi&&eo(this)},e.prototype.reconstructWithOptions=function(t,s){return s===void 0&&(s=!0),new e(nt(nt({},this.options),t),this.gs,s&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(s){var r=s.useCSSOMInjection,i=s.target;return s.isServer?new Cu(i):r?new ku(i):new Tu(i)})(this.options),new gu(t)));var t},e.prototype.hasNameForId=function(t,s){return this.names.has(t)&&this.names.get(t).has(s)},e.prototype.registerName=function(t,s){if(ki(t),this.names.has(t))this.names.get(t).add(s);else{var r=new Set;r.add(s),this.names.set(t,r)}},e.prototype.insertRules=function(t,s,r){this.registerName(t,s),this.getTag().insertRules(ki(t),r)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(ki(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Ou=/&/g,Iu=/^\s*\/\/.*$/gm;function no(e,t){return e.map(function(s){return s.type==="rule"&&(s.value="".concat(t," ").concat(s.value),s.value=s.value.replaceAll(",",",".concat(t," ")),s.props=s.props.map(function(r){return"".concat(t," ").concat(r)})),Array.isArray(s.children)&&s.type!=="@keyframes"&&(s.children=no(s.children,t)),s})}function Au(e){var t,s,r,i=is,n=i.options,o=n===void 0?is:n,l=i.plugins,d=l===void 0?bi:l,u=function(g,b,S){return S.startsWith(s)&&S.endsWith(s)&&S.replaceAll(s,"").length>0?".".concat(t):g},v=d.slice();v.push(function(g){g.type===li&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(Ou,s).replace(r,u))}),o.prefix&&v.push(Jh),v.push(Kh);var p=function(g,b,S,C){b===void 0&&(b=""),S===void 0&&(S=""),C===void 0&&(C="&"),t=C,s=b,r=new RegExp("\\".concat(s,"\\b"),"g");var I=g.replace(Iu,""),N=qh(S||b?"".concat(S," ").concat(b," { ").concat(I," }"):I);o.namespace&&(N=no(N,o.namespace));var j=[];return fi(N,Yh(v.concat(Xh(function(L){return j.push(L)})))),j};return p.hash=d.length?d.reduce(function(g,b){return b.name||os(15),Te(g,b.name)},Hn).toString():"",p}var Pu=new ro,Sr=Au(),oo=R.createContext({shouldForwardProp:void 0,styleSheet:Pu,stylis:Sr});oo.Consumer,R.createContext(void 0);function ao(){return R.useContext(oo)}var lo=(function(){function e(t,s){var r=this;this.inject=function(i,n){n===void 0&&(n=Sr);var o=r.name+n.hash;i.hasNameForId(r.id,o)||i.insertRules(r.id,o,n(r.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=s,$r(this,function(){throw os(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Sr),this.name+t.hash},e})(),zu=function(e){return e>="A"&&e<="Z"};function co(e){for(var t="",s=0;s<e.length;s++){var r=e[s];if(s===1&&r==="-"&&e[0]==="-")return e;zu(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var ho=function(e){return e==null||e===!1||e===""},uo=function(e){var t,s,r=[];for(var i in e){var n=e[i];e.hasOwnProperty(i)&&!ho(n)&&(Array.isArray(n)&&n.isCss||rs(n)?r.push("".concat(co(i),":"),n,";"):ns(n)?r.push.apply(r,Ze(Ze(["".concat(i," {")],uo(n),!1),["}"],!1)):r.push("".concat(co(i),": ").concat((t=i,(s=n)==null||typeof s=="boolean"||s===""?"":typeof s!="number"||s===0||t in Zh||t.startsWith("--")?String(s).trim():"".concat(s,"px")),";")))}return r};function Ee(e,t,s,r){if(ho(e))return[];if(xr(e))return[".".concat(e.styledComponentId)];if(rs(e)){if(!rs(n=e)||n.prototype&&n.prototype.isReactComponent||!t)return[e];var i=e(t);return process.env.NODE_ENV==="production"||typeof i!="object"||Array.isArray(i)||i instanceof lo||ns(i)||i===null||console.error("".concat(qn(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Ee(i,t,s,r)}var n;return e instanceof lo?s?(e.inject(s,r),[e.getName(r)]):[e]:ns(e)?uo(e):Array.isArray(e)?Array.prototype.concat.apply(bi,e.map(function(o){return Ee(o,t,s,r)})):[e.toString()]}function Nu(e){for(var t=0;t<e.length;t+=1){var s=e[t];if(rs(s)&&!xr(s))return!1}return!0}var _u=Wn(gi),Bu=(function(){function e(t,s,r){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&Nu(t),this.componentId=s,this.baseHash=Te(_u,s),this.baseStyle=r,ro.registerId(s)}return e.prototype.generateAndInjectStyles=function(t,s,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,s,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&s.hasNameForId(this.componentId,this.staticRulesId))i=Ce(i,this.staticRulesId);else{var n=to(Ee(this.rules,t,s,r)),o=vr(Te(this.baseHash,n)>>>0);if(!s.hasNameForId(this.componentId,o)){var l=r(n,".".concat(o),void 0,this.componentId);s.insertRules(this.componentId,o,l)}i=Ce(i,o),this.staticRulesId=o}else{for(var d=Te(this.baseHash,r.hash),u="",v=0;v<this.rules.length;v++){var p=this.rules[v];if(typeof p=="string")u+=p,process.env.NODE_ENV!=="production"&&(d=Te(d,p));else if(p){var g=to(Ee(p,t,s,r));d=Te(d,g+v),u+=g}}if(u){var b=vr(d>>>0);s.hasNameForId(this.componentId,b)||s.insertRules(this.componentId,b,r(u,".".concat(b),void 0,this.componentId)),i=Ce(i,b)}}return i},e})(),po=R.createContext(void 0);po.Consumer;var kr={},mo=new Set;function Lu(e,t,s){var r=xr(e),i=e,n=!br(e),o=t.attrs,l=o===void 0?bi:o,d=t.componentId,u=d===void 0?(function(F,U){var z=typeof F!="string"?"sc":Un(F);kr[z]=(kr[z]||0)+1;var O="".concat(z,"-").concat(nu(gi+z+kr[z]));return U?"".concat(U,"-").concat(O):O})(t.displayName,t.parentComponentId):d,v=t.displayName,p=v===void 0?(function(F){return br(F)?"styled.".concat(F):"Styled(".concat(qn(F),")")})(e):v,g=t.displayName&&t.componentId?"".concat(Un(t.displayName),"-").concat(t.componentId):t.componentId||u,b=r&&i.attrs?i.attrs.concat(l).filter(Boolean):l,S=t.shouldForwardProp;if(r&&i.shouldForwardProp){var C=i.shouldForwardProp;if(t.shouldForwardProp){var I=t.shouldForwardProp;S=function(F,U){return C(F,U)&&I(F,U)}}else S=C}var N=new Bu(s,g,r?i.componentStyle:void 0);function j(F,U){return(function(z,O,oe){var ls=z.attrs,wp=z.componentStyle,$p=z.defaultProps,Sp=z.foldedComponentIds,Eo=z.styledComponentId,kp=z.target,Tp=R.useContext(po),Cp=ao(),Pr=z.shouldForwardProp||Cp.shouldForwardProp;process.env.NODE_ENV!=="production"&&R.useDebugValue(Eo);var Oo=eu(O,Tp,$p)||is,Yt=(function(Ei,Ds,Oi){for(var cs,Oe=nt(nt({},Ds),{className:void 0,theme:Oi}),_r=0;_r<Ei.length;_r+=1){var Ii=rs(cs=Ei[_r])?cs(Oe):cs;for(var ae in Ii)Oe[ae]=ae==="className"?Ce(Oe[ae],Ii[ae]):ae==="style"?nt(nt({},Oe[ae]),Ii[ae]):Ii[ae]}return Ds.className&&(Oe.className=Ce(Oe.className,Ds.className)),Oe})(ls,O,Oo),Bs=Yt.as||kp,Ls={};for(var vt in Yt)Yt[vt]===void 0||vt[0]==="$"||vt==="as"||vt==="theme"&&Yt.theme===Oo||(vt==="forwardedAs"?Ls.as=Yt.forwardedAs:Pr&&!Pr(vt,Bs)||(Ls[vt]=Yt[vt],Pr||process.env.NODE_ENV!=="development"||Nh(vt)||mo.has(vt)||!gr.has(Bs)||(mo.add(vt),console.warn('styled-components: it looks like an unknown prop "'.concat(vt,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var zr=(function(Ei,Ds){var Oi=ao(),cs=Ei.generateAndInjectStyles(Ds,Oi.styleSheet,Oi.stylis);return process.env.NODE_ENV!=="production"&&R.useDebugValue(cs),cs})(wp,Yt);process.env.NODE_ENV!=="production"&&z.warnTooManyClasses&&z.warnTooManyClasses(zr);var Nr=Ce(Sp,Eo);return zr&&(Nr+=" "+zr),Yt.className&&(Nr+=" "+Yt.className),Ls[br(Bs)&&!gr.has(Bs)?"class":"className"]=Nr,oe&&(Ls.ref=oe),R.createElement(Bs,Ls)})(L,F,U)}j.displayName=p;var L=R.forwardRef(j);return L.attrs=b,L.componentStyle=N,L.displayName=p,L.shouldForwardProp=S,L.foldedComponentIds=r?Ce(i.foldedComponentIds,i.styledComponentId):"",L.styledComponentId=g,L.target=r?i.target:e,Object.defineProperty(L,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(F){this._foldedDefaultProps=r?(function(U){for(var z=[],O=1;O<arguments.length;O++)z[O-1]=arguments[O];for(var oe=0,ls=z;oe<ls.length;oe++)wr(U,ls[oe],!0);return U})({},i.defaultProps,F):F}}),process.env.NODE_ENV!=="production"&&(tu(p,g),L.warnTooManyClasses=(function(F,U){var z={},O=!1;return function(oe){if(!O&&(z[oe]=!0,Object.keys(z).length>=200)){var ls=U?' with the id of "'.concat(U,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(F).concat(ls,`.
|
|
3286
|
+
`)+`Consider using the attrs method, together with a style object for frequently changed styles.
|
|
3287
|
+
Example:
|
|
3288
|
+
const Component = styled.div.attrs(props => ({
|
|
3289
|
+
style: {
|
|
3290
|
+
background: props.background,
|
|
3291
|
+
},
|
|
3292
|
+
}))\`width: 100%;\`
|
|
3293
|
+
|
|
3294
|
+
<Component />`),O=!0,z={}}}})(p,g)),$r(L,function(){return".".concat(L.styledComponentId)}),n&&Qn(L,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),L}function fo(e,t){for(var s=[e[0]],r=0,i=t.length;r<i;r+=1)s.push(t[r],e[r+1]);return s}var go=function(e){return Object.assign(e,{isCss:!0})};function Du(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(rs(e)||ns(e))return go(Ee(fo(bi,Ze([e],t,!0))));var r=e;return t.length===0&&r.length===1&&typeof r[0]=="string"?Ee(r):go(Ee(fo(r,t)))}function Tr(e,t,s){if(s===void 0&&(s=is),!t)throw os(1,t);var r=function(i){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return e(t,s,Du.apply(void 0,Ze([i],n,!1)))};return r.attrs=function(i){return Tr(e,t,nt(nt({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)}))},r.withConfig=function(i){return Tr(e,t,nt(nt({},s),i))},r}var vo=function(e){return Tr(Lu,e)},Cr=vo;gr.forEach(function(e){Cr[e]=vo(e)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
3295
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
3296
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var Ti="__sc-".concat(ke,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[Ti]||(window[Ti]=0),window[Ti]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
3297
|
+
|
|
3298
|
+
See https://s-c.sh/2BAXzed for more info.`),window[Ti]+=1);function Er(){}const Mu=Cr.div`
|
|
3299
|
+
margin: 0;
|
|
3300
|
+
width: 100%;
|
|
3301
|
+
height: 100%;
|
|
3302
|
+
position: absolute;
|
|
3303
|
+
top: 50%;
|
|
3304
|
+
left: 50%;
|
|
3305
|
+
transform: translate(-50%, -50%);
|
|
3306
|
+
`;function Ci(e){const{children:t,onClickCloseButton:s=Er,onClickConfirmButton:r=Er,onClickCancelButton:i=Er,className:n,withPortal:o,...l}=e,{ref:d}=_({"click-close-button":s,"click-confirm-button":r,"click-cancel-button":i});if(!l.open)return null;const u=m.jsx("ds-modal-react",{ref:d,class:n,...l,children:t});return o?m.jsx("ds-portal-react",{style:{display:"none"},children:u}):u}function ju({children:e}){return m.jsx("div",{slot:"title",children:e})}function Fu({className:e="",children:t}){return m.jsx("div",{slot:"content",className:`ds-scroll ${e}`.trim(),children:t})}function Ru({children:e}){return m.jsx(Mu,{slot:"content",children:e})}Ci.Title=ju,Ci.Content=Fu,Ci.FullScreenContent=Ru;function Uu(e){const{className:t,children:s,onChange:r,onInput:i,inputId:n,placeHolder:o,value:l,label:d,required:u,disabled:v,pattern:p,maxLength:g,minLength:b,...S}=e,{ref:C}=_({change:r,input:i}),I={type:"password",...!!n&&{id:n},...!!o&&{placeholder:o},...!!l&&{value:l},...!!u&&{required:u},...!!v&&{disabled:v},...!!b&&{minLength:b},...!!g&&{maxLength:g},...!!p&&{pattern:p}};return m.jsxs("ds-password-input-react",{ref:C,class:t,...S,children:[m.jsx("label",{htmlFor:n,children:d}),m.jsx("input",{...I})]})}function Vu(e){const{className:t,children:s,onClick:r,size:i,...n}=e,{ref:o}=_({"ds-picker-item:click":r});return m.jsx("ds-picker-item-react",{ref:o,size:typeof i=="string"?i:JSON.stringify(i),class:t,...n,children:s})}const Hu={Group:({children:e,onChange:t,className:s,...r})=>{const{ref:i}=_({change:t});return m.jsx("ds-radio-group-react",{ref:i,class:s,...r,children:e})},Button:({children:e,className:t,...s})=>m.jsx("ds-radio-react",{class:t,...s,children:e})};function Wu(e){const{className:t,children:s,onChange:r,...i}=e,{ref:n}=_({change:r});return m.jsx("ds-radio-button-react",{ref:n,class:t,...i,children:s})}function qu(e){const{className:t,children:s,onChange:r,...i}=e,{ref:n}=_({change:r});return m.jsx("ds-radio-button-group-react",{ref:n,class:t,...i,children:s})}const yo=R.forwardRef(({onInput:e,className:t,...s},r)=>m.jsx("ds-search-react",{ref:r,class:t,onInput:e,...s}));yo.displayName="Search";function Gu(e){const{className:t,children:s,onChange:r,onInput:i,onClickPositionButton:n,placeHolder:o,type:l,value:d,label:u,required:v,disabled:p,pattern:g,maxLength:b,minLength:S,inputProps:C,...I}=e,{ref:N}=_({change:r,input:i,"ds-search-input:click-position-button":n});return m.jsx("ds-search-input-react",{ref:N,class:t,...I,children:m.jsx("input",{type:"text","aria-label":u,placeholder:o,value:d,required:v,disabled:p,minLength:S,maxLength:b,pattern:g,...C})})}function Or(e){const{className:t,children:s,onSelect:r,...i}=e,{ref:n}=_({"ds-secondary-navigation:select":r});return m.jsx("ds-secondary-navigation-react",{ref:n,class:t,...i,children:s})}const Ku=({children:e})=>m.jsx("div",{slot:"items",children:e}),Yu=({children:e})=>m.jsx("div",{slot:"actions",children:e});Or.Items=Ku,Or.Actions=Yu;function Xu(e){const{onChange:t,className:s,children:r,...i}=e,{ref:n}=_({change:t});return m.jsx("ds-segmented-control-react",{ref:n,class:s,...i,children:r})}const Ju=({children:e,...t})=>m.jsx("ds-select-react",{...t,children:e});function Zu(e){const{className:t,children:s,...r}=e;return m.jsx("ds-selection-react",{class:t,...r})}function Qu(e){const{className:t,children:s,size:r,...i}=e;return m.jsx("ds-slider-react",{size:typeof r=="string"?r:JSON.stringify(r),class:t,...i})}function Ir({children:e,onChange:t,...s}){const{ref:r}=_({change:t});return m.jsx("ds-tabs-react",{ref:r,...s,children:e})}function tp({children:e}){return m.jsx("div",{role:"tab",slot:"tab",children:e})}function ep({children:e}){return m.jsx("div",{role:"tabpanel",slot:"panel",children:e})}Ir.Tab=tp,Ir.Panel=ep;function sp(e){const{children:t,onClickIcon:s,className:r,...i}=e,{ref:n}=_({clickicon:s});return m.jsx("ds-tag-react",{ref:n,class:r,...i,children:t})}function ip(e){const{className:t,children:s,...r}=e;return m.jsx("ds-text-react",{class:t,...r,children:s})}function rp(e){const{className:t,children:s,onChange:r,onInput:i,onKeyDown:n,inputId:o,placeHolder:l,type:d,value:u,label:v,required:p,disabled:g,pattern:b,maxLength:S,minLength:C,...I}=e,{ref:N}=_({change:r,input:i,keydown:n});return m.jsxs("ds-text-input-react",{ref:N,class:t,...I,children:[m.jsx("label",{htmlFor:o,children:v}),m.jsx("input",{id:o,type:d||"text",placeholder:l,value:u,required:p,disabled:g,minLength:C,maxLength:S,pattern:b})]})}function np(e){const{className:t,children:s,onChange:r,onInput:i,textareaId:n,placeholder:o,value:l,label:d,required:u,disabled:v,minLength:p,maxLength:g,rows:b,cols:S,forcedError:C,helperText:I,invalidError:N,...j}=e,{ref:L}=_({change:r,input:i});return m.jsxs("ds-textarea-react",{ref:L,class:t,"forced-error":C,"helper-text":I,"invalid-error":N,...j,children:[m.jsx("label",{htmlFor:n,children:d}),m.jsx("textarea",{id:n,placeholder:o,value:l,required:u,disabled:v,minLength:p,maxLength:g,rows:b,cols:S})]})}const op=({children:e,...t})=>m.jsx("ds-theme-provider-react",{...t,children:e});function ap({onChange:e,...t}){const{ref:s}=_({change:e});return m.jsx("ds-toggle-button-react",{ref:s,...t})}function Ar({label:e,onChange:t,...s}){const{ref:r}=_({change:t});return m.jsxs("ds-toggle-switch-react",{ref:r,...s,children:[e&&m.jsx("div",{slot:"label",children:e}),s.children]})}function lp({children:e}){return m.jsx("div",{slot:"off",children:e})}function cp({children:e}){return m.jsx("div",{slot:"on",children:e})}Ar.Off=lp,Ar.On=cp;const dp=Cr.div`
|
|
3307
|
+
display: flex;
|
|
3308
|
+
align-items: center;
|
|
3309
|
+
`;function hp({children:e,onClickCancelButton:t,onClickConfirmButton:s,...r}){const{ref:i}=_({"click-cancel-button":t,"click-confirm-button":s});return m.jsx("ds-tooltip-react",{ref:i,...r,children:m.jsx(dp,{children:e})})}function bo(e){const{className:t,...s}=e;return m.jsx("ds-toast-react",{class:t,...s})}bo.add=e=>{window.dispatchEvent(new CustomEvent("toast:add",{detail:e}))};function up(e){const{className:t,children:s,onClose:r,...i}=e,{ref:n}=_({"toast:remove":r});return m.jsx("ds-toast-message-react",{ref:n,class:t,...i,children:s})}function pp(e){const{className:t,onClick:s,image:r,...i}=e,{ref:n}=_({click:s}),o=r&&R.isValidElement(r)?R.cloneElement(r,{slot:"media",...r.props}):null;return m.jsx("ds-avatar-react",{ref:n,class:t,...i,children:o})}function mp(e){const{className:t,children:s,size:r,...i}=e,{ref:n}=_({});return m.jsx("ds-static-box-react",{ref:n,size:typeof r=="string"?r:JSON.stringify(r),class:t,...i,children:s})}const fp=({className:e,...t})=>m.jsx("ds-stepper-react",{class:e,...t});function ne(e){const{className:t,children:s,onClick:r,...i}=e,{ref:n}=_({click:r});return m.jsx("ds-interactive-card-react",{ref:n,class:t,...i,children:s})}const xo=({children:e})=>m.jsx("div",{slot:"title",children:e}),wo=({children:e})=>m.jsx("div",{slot:"subtitle",children:e}),$o=({children:e})=>m.jsx("div",{slot:"meta",children:e}),So=({children:e})=>m.jsx("div",{slot:"content",children:e}),ko=({children:e})=>m.jsx("div",{slot:"cta",children:e}),To=({children:e})=>m.jsx("div",{slot:"error-title",children:e}),Co=({children:e})=>m.jsx("div",{slot:"error-text",children:e});ne.Title=xo,ne.Subtitle=wo,ne.Meta=$o,ne.Content=So,ne.Cta=ko,ne.ErrorTitle=To,ne.ErrorText=Co,xo.displayName="InteractiveCard.Title",wo.displayName="InteractiveCard.Subtitle",$o.displayName="InteractiveCard.Meta",So.displayName="InteractiveCard.Content",ko.displayName="InteractiveCard.Cta",To.displayName="InteractiveCard.ErrorTitle",Co.displayName="InteractiveCard.ErrorText";function as(e){const{className:t,children:s,...r}=e;return m.jsx("ds-sidebar-navigation-react",{class:t,...r,children:s})}const gp=({children:e})=>m.jsx("div",{slot:"aside-text",children:e}),vp=({children:e})=>m.jsx("div",{slot:"aside-icon",children:e}),yp=({children:e})=>m.jsx("div",{slot:"aside-helper-text",children:e}),bp=({children:e})=>m.jsx("div",{slot:"main-cta",children:e}),xp=({children:e})=>m.jsx("div",{slot:"ctas",children:e});as.AsideText=gp,as.AsideIcon=vp,as.AsideHelperText=yp,as.MainCta=bp,as.Ctas=xp,x.Accordion=ar,x.Avatar=pp,x.Bullets=oh,x.Button=dh,x.CarouselIndicator=hh,x.Checkbox=uh,x.Chip=ph,x.Chips=mh,x.Currency=fh,x.Dialog=gh,x.DialogBody=vh,x.DialogFooter=yh,x.DialogHeader=bh,x.Divider=xh,x.Hyperlink=wh,x.Icon=$h,x.IconButton=Sh,x.Input=En,x.InteractiveCard=ne,x.LinkButton=kh,x.Loader=Oh,x.LoaderLogo=On,x.Logo=Ih,x.MapPin=Ah,x.Modal=Ci,x.PasswordInput=Uu,x.PickerItem=Vu,x.Radio=Hu,x.RadioButton=Wu,x.RadioButtonGroup=qu,x.Search=yo,x.SearchInput=Gu,x.SecondaryNavigation=Or,x.SegmentedControl=Xu,x.Select=Ju,x.Selection=Zu,x.SidebarNavigation=as,x.Slider=Qu,x.StaticBox=mp,x.Stepper=fp,x.Tabs=Ir,x.Tag=sp,x.Text=ip,x.TextInput=rp,x.Textarea=np,x.ThemeProvider=op,x.Toast=bo,x.ToastMessage=up,x.ToggleButton=ap,x.ToggleSwitch=Ar,x.Tooltip=hp,x.useBreakpoint=ah,x.useEventListeners=lh,x.useHandleEvent=_,x.useResizeObserver=ch,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
|