@descope/web-components-ui 1.0.238 → 1.0.239
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/cjs/index.cjs.js +132 -126
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +132 -126
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/descope-modal-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-modal/ModalClass.js +4 -1
- package/src/theme/components/modal.js +5 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4641],{958:(e,t,o)=>{o.r(t),o.d(t,{ModalClass:()=>n}),o(1932);var
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4641],{958:(e,t,o)=>{o.r(t),o.d(t,{ModalClass:()=>n}),o(1932);var r=o(2061),s=o(4567),a=o(1e3);const l=(0,s.iY)("modal"),n=(0,r.qC)((0,a.yk)({mappings:{overlayBackgroundColor:{property:()=>n.cssVarList.overlay.backgroundColor},overlayShadow:{property:()=>n.cssVarList.overlay.shadow},overlayWidth:{property:()=>n.cssVarList.overlay.width}}}),(0,a.Iw)({name:"overlay",selector:"",mappings:{hostDisplay:{selector:()=>":host(.descope-modal)",property:"display",important:!0},backgroundColor:[{selector:()=>"::part(content)",property:"background-color"},{selector:()=>"::part(overlay)",property:"background-color"}],width:{selector:()=>"::part(overlay)",property:"width"},shadow:{selector:()=>"::part(overlay)",property:"box-shadow"}},forward:{include:!1,attributes:["opened"]}}),a.e4,a.Ae,(e=>class extends e{get opened(){return"true"===this.getAttribute("opened")}handleOpened(){(0,s.oP)(this,this.baseElement,{includeAttrs:["opened"]}),this.opened?this.style.display="":this.style.display="none"}init(){super.init?.(),this.style.display="none",setTimeout((()=>{this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay").appendChild(document.createElement("slot")),this.#e(),this.handleOpened()}))}#e(){const e=this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay");e._attachOverlay=()=>{e.bringToFront(),this.baseElement.setAttribute("style","display:flex!important;")},e._detachOverlay=()=>{this.baseElement.style.display="none"},e._enterModalState=()=>{},e.close=()=>!1}}))((0,a.DM)({slots:[""],wrappedEleName:"vaadin-dialog",style:()=>"",excludeAttrsSync:["tabindex","opened"],componentName:l}));customElements.define(l,n)}}]);
|
package/package.json
CHANGED
@@ -86,7 +86,10 @@ export const ModalClass = compose(
|
|
86
86
|
property: 'display',
|
87
87
|
important: true,
|
88
88
|
},
|
89
|
-
backgroundColor:
|
89
|
+
backgroundColor: [
|
90
|
+
{ selector: () => '::part(content)', property: 'background-color' },
|
91
|
+
{ selector: () => '::part(overlay)', property: 'background-color' },
|
92
|
+
],
|
90
93
|
width: { selector: () => '::part(overlay)', property: 'width' },
|
91
94
|
shadow: { selector: () => '::part(overlay)', property: 'box-shadow' },
|
92
95
|
},
|
@@ -1,8 +1,13 @@
|
|
1
|
+
import globals from '../globals';
|
2
|
+
import { getThemeRefs } from '../../helpers/themeHelpers';
|
1
3
|
import { ModalClass } from '../../components/descope-modal/ModalClass';
|
2
4
|
|
5
|
+
const globalRefs = getThemeRefs(globals);
|
6
|
+
|
3
7
|
const compVars = ModalClass.cssVarList;
|
4
8
|
|
5
9
|
const modal = {
|
10
|
+
[compVars.overlayBackgroundColor]: globalRefs.colors.surface.light,
|
6
11
|
[compVars.overlayShadow]: 'none',
|
7
12
|
[compVars.overlayWidth]: '700px',
|
8
13
|
};
|