@descope/web-components-ui 1.0.229 → 1.0.231
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 +74 -47
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +65 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
- package/dist/umd/descope-notification-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-notification/NotificationClass.js +9 -24
- package/src/components/descope-notification/descope-notification-card/NotificationCardClass.js +61 -13
- package/src/theme/components/notificationCard.js +1 -4
package/dist/index.esm.js
CHANGED
|
@@ -13,7 +13,6 @@ import { GridSelectionColumn } from '@vaadin/grid/vaadin-grid-selection-column';
|
|
|
13
13
|
import merge from 'lodash.merge';
|
|
14
14
|
import set from 'lodash.set';
|
|
15
15
|
import Color from 'color';
|
|
16
|
-
import '@vaadin/notification';
|
|
17
16
|
|
|
18
17
|
const kebabCase = (str) =>
|
|
19
18
|
str
|
|
@@ -1919,12 +1918,12 @@ class RawLoaderLinear extends createBaseClass({ componentName: componentName$y,
|
|
|
1919
1918
|
}
|
|
1920
1919
|
}
|
|
1921
1920
|
|
|
1922
|
-
const selectors$
|
|
1921
|
+
const selectors$2 = {
|
|
1923
1922
|
after: { selector: '::after' },
|
|
1924
1923
|
host: { selector: () => ':host' },
|
|
1925
1924
|
};
|
|
1926
1925
|
|
|
1927
|
-
const { after: after$1, host: host$d } = selectors$
|
|
1926
|
+
const { after: after$1, host: host$d } = selectors$2;
|
|
1928
1927
|
|
|
1929
1928
|
const LoaderLinearClass = compose(
|
|
1930
1929
|
createStyleMixin({
|
|
@@ -2354,14 +2353,14 @@ class RawLink extends createBaseClass({ componentName: componentName$s, baseSele
|
|
|
2354
2353
|
}
|
|
2355
2354
|
}
|
|
2356
2355
|
|
|
2357
|
-
const selectors = {
|
|
2356
|
+
const selectors$1 = {
|
|
2358
2357
|
host: { selector: () => ':host' },
|
|
2359
2358
|
anchor: {},
|
|
2360
2359
|
wrapper: { selector: () => ':host > div' },
|
|
2361
2360
|
text: { selector: () => TextClass.componentName },
|
|
2362
2361
|
};
|
|
2363
2362
|
|
|
2364
|
-
const { anchor, text: text$2, host: host$a, wrapper: wrapper$1 } = selectors;
|
|
2363
|
+
const { anchor, text: text$2, host: host$a, wrapper: wrapper$1 } = selectors$1;
|
|
2365
2364
|
|
|
2366
2365
|
const LinkClass = compose(
|
|
2367
2366
|
createStyleMixin({
|
|
@@ -8691,7 +8690,7 @@ const notificationCardMixin = (superclass) =>
|
|
|
8691
8690
|
// if animation is not applied to the element, the node will not be removed
|
|
8692
8691
|
// from the DOM. We should avoid that. So, if in any case we allow
|
|
8693
8692
|
// customizing the animation - we should check if animation is applied
|
|
8694
|
-
// and if it's not applied - remove the
|
|
8693
|
+
// and if it's not applied - remove the element from the DOM and dispatch
|
|
8695
8694
|
// `card-closed` event.
|
|
8696
8695
|
this.baseElement.addEventListener('animationend', () => {
|
|
8697
8696
|
this.remove();
|
|
@@ -8700,38 +8699,68 @@ const notificationCardMixin = (superclass) =>
|
|
|
8700
8699
|
|
|
8701
8700
|
this.setAttribute('opened', 'false');
|
|
8702
8701
|
}
|
|
8702
|
+
|
|
8703
|
+
constructor() {
|
|
8704
|
+
super();
|
|
8705
|
+
|
|
8706
|
+
this.baseElement.innerHTML = `
|
|
8707
|
+
<div part="root">
|
|
8708
|
+
<div part="content">
|
|
8709
|
+
<slot></slot>
|
|
8710
|
+
</div>
|
|
8711
|
+
<div part="close">
|
|
8712
|
+
<slot name="close"></slot>
|
|
8713
|
+
</div>
|
|
8714
|
+
</div>
|
|
8715
|
+
`;
|
|
8716
|
+
|
|
8717
|
+
this.closeEle = this.shadowRoot.querySelector('[part="close"]');
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8720
|
+
init() {
|
|
8721
|
+
super.init?.();
|
|
8722
|
+
|
|
8723
|
+
this.closeEle.onclick = () => {
|
|
8724
|
+
this.close();
|
|
8725
|
+
};
|
|
8726
|
+
}
|
|
8703
8727
|
};
|
|
8704
8728
|
|
|
8729
|
+
const selectors = {
|
|
8730
|
+
content: () => 'vaadin-notification-card::part(content)',
|
|
8731
|
+
overlay: () => 'vaadin-notification-card::part(overlay)',
|
|
8732
|
+
};
|
|
8733
|
+
|
|
8705
8734
|
const NotificationCardClass = compose(
|
|
8706
8735
|
createStyleMixin({
|
|
8707
8736
|
mappings: {
|
|
8708
|
-
hostMinWidth: { selector:
|
|
8737
|
+
hostMinWidth: { selector: selectors.content, property: 'min-width' },
|
|
8709
8738
|
fontFamily: {},
|
|
8710
8739
|
fontSize: {},
|
|
8711
|
-
backgroundColor: { selector:
|
|
8740
|
+
backgroundColor: { selector: selectors.content },
|
|
8712
8741
|
textColor: { property: 'color' },
|
|
8713
8742
|
boxShadow: {},
|
|
8714
|
-
borderWidth: { selector:
|
|
8715
|
-
borderColor: { selector:
|
|
8716
|
-
borderStyle: { selector:
|
|
8743
|
+
borderWidth: { selector: selectors.content, property: 'border-width' },
|
|
8744
|
+
borderColor: { selector: selectors.content, property: 'border-color' },
|
|
8745
|
+
borderStyle: { selector: selectors.content, property: 'border-style' },
|
|
8717
8746
|
borderRadius: [
|
|
8718
|
-
{ selector:
|
|
8719
|
-
{ selector:
|
|
8747
|
+
{ selector: selectors.content, property: 'border-radius' },
|
|
8748
|
+
{ selector: selectors.overlay, property: 'border-radius' },
|
|
8720
8749
|
],
|
|
8721
8750
|
verticalPadding: [
|
|
8722
|
-
{ selector:
|
|
8723
|
-
{ selector:
|
|
8751
|
+
{ selector: selectors.content, property: 'padding-top' },
|
|
8752
|
+
{ selector: selectors.content, property: 'padding-bottom' },
|
|
8724
8753
|
],
|
|
8725
8754
|
horizontalPadding: [
|
|
8726
|
-
{ selector:
|
|
8727
|
-
{ selector:
|
|
8755
|
+
{ selector: selectors.content, property: 'padding-right' },
|
|
8756
|
+
{ selector: selectors.content, property: 'padding-left' },
|
|
8728
8757
|
],
|
|
8729
8758
|
},
|
|
8730
8759
|
}),
|
|
8731
8760
|
notificationCardMixin
|
|
8732
8761
|
)(
|
|
8733
8762
|
createProxy({
|
|
8734
|
-
slots: [
|
|
8763
|
+
slots: [],
|
|
8735
8764
|
wrappedEleName: 'vaadin-notification-card',
|
|
8736
8765
|
style: () => `
|
|
8737
8766
|
vaadin-notification-card {
|
|
@@ -8741,14 +8770,30 @@ const NotificationCardClass = compose(
|
|
|
8741
8770
|
box-shadow: none;
|
|
8742
8771
|
background: none;
|
|
8743
8772
|
}
|
|
8773
|
+
|
|
8774
|
+
[part="close"] {
|
|
8775
|
+
cursor: pointer;
|
|
8776
|
+
display: flex;
|
|
8777
|
+
}
|
|
8778
|
+
|
|
8779
|
+
[part="content"] {
|
|
8780
|
+
display: flex;
|
|
8781
|
+
align-items: center;
|
|
8782
|
+
flex-grow: 1;
|
|
8783
|
+
}
|
|
8784
|
+
|
|
8785
|
+
[part="root"] {
|
|
8786
|
+
display: flex;
|
|
8787
|
+
align-items: center;
|
|
8788
|
+
justify-content: space-between;
|
|
8789
|
+
width: 100%;
|
|
8790
|
+
}
|
|
8744
8791
|
`,
|
|
8745
8792
|
excludeAttrsSync: ['tabindex'],
|
|
8746
8793
|
componentName,
|
|
8747
8794
|
})
|
|
8748
8795
|
);
|
|
8749
8796
|
|
|
8750
|
-
customElements.define(componentName, NotificationCardClass);
|
|
8751
|
-
|
|
8752
8797
|
const globalRefs = getThemeRefs(globals);
|
|
8753
8798
|
const vars$1 = NotificationCardClass.cssVarList;
|
|
8754
8799
|
|
|
@@ -8763,10 +8808,7 @@ const notification = {
|
|
|
8763
8808
|
[vars$1.boxShadow]: `${globalRefs.shadow.wide.xl} ${shadowColor}, ${globalRefs.shadow.narrow.xl} ${shadowColor}`,
|
|
8764
8809
|
[vars$1.verticalPadding]: '0.45em',
|
|
8765
8810
|
[vars$1.horizontalPadding]: '1em',
|
|
8766
|
-
[vars$1.verticalMargin]: '1em',
|
|
8767
|
-
[vars$1.horizontalMargin]: '1em',
|
|
8768
8811
|
[vars$1.borderRadius]: globalRefs.radius.md,
|
|
8769
|
-
[vars$1.contentSpacing]: '0.5em',
|
|
8770
8812
|
|
|
8771
8813
|
_bordered: {
|
|
8772
8814
|
[vars$1.borderWidth]: globalRefs.border.sm,
|