@descope/web-components-ui 1.0.242 → 1.0.244
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +74 -53
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +113 -66
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/descope-button-selection-group-descope-button-selection-group-internal-index-js.js +1 -1
- package/dist/umd/descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-loader-radial-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-button-selection-group/descope-button-selection-group-internal/index.js +0 -1
- package/src/components/descope-button-selection-group/index.js +1 -0
- package/src/components/descope-grid/descope-grid-custom-column/GridCustomColumnClass.js +1 -1
- package/src/components/descope-grid/descope-grid-selection-column/GridSelectionColumnClass.js +2 -1
- package/src/components/descope-passcode/PasscodeClass.js +9 -1
- package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +26 -2
- package/src/components/descope-passcode/index.js +1 -0
- package/src/index.cjs.js +1 -0
- package/src/index.js +1 -1
- package/src/theme/components/inputWrapper.js +2 -0
- package/src/theme/components/passcode.js +11 -0
package/dist/index.esm.js
CHANGED
@@ -2556,7 +2556,7 @@ const getSanitizedCharacters = (str) => {
|
|
2556
2556
|
|
2557
2557
|
const componentName$q = getComponentName('passcode-internal');
|
2558
2558
|
|
2559
|
-
const observedAttributes$5 = ['digits'];
|
2559
|
+
const observedAttributes$5 = ['digits', 'loading'];
|
2560
2560
|
|
2561
2561
|
const forwardAttributes = ['disabled', 'bordered', 'size', 'invalid', 'readonly'];
|
2562
2562
|
|
@@ -2572,21 +2572,34 @@ class PasscodeInternal extends BaseInputClass$4 {
|
|
2572
2572
|
|
2573
2573
|
this.innerHTML = `
|
2574
2574
|
<div class="wrapper"></div>
|
2575
|
+
<div class="loader-container">
|
2576
|
+
<descope-loader-radial size="xs" mode="primary"></descope-loader-radial>
|
2577
|
+
</div>
|
2575
2578
|
<style>
|
2576
2579
|
.wrapper {
|
2577
2580
|
display: flex;
|
2578
2581
|
width: 100%;
|
2579
2582
|
justify-content: space-between;
|
2580
2583
|
direction: ltr;
|
2584
|
+
position: relative;
|
2581
2585
|
}
|
2582
2586
|
|
2583
2587
|
descope-text-field {
|
2584
2588
|
direction: ltr;
|
2585
2589
|
}
|
2590
|
+
|
2591
|
+
.loader-container {
|
2592
|
+
display: none;
|
2593
|
+
position: absolute;
|
2594
|
+
top: 50%;
|
2595
|
+
left: 50%;
|
2596
|
+
transform: translate(-50%, -50%);
|
2597
|
+
}
|
2586
2598
|
</style>
|
2587
2599
|
`;
|
2588
2600
|
|
2589
|
-
this.wrapperEle = this.querySelector('
|
2601
|
+
this.wrapperEle = this.querySelector('.wrapper');
|
2602
|
+
this.loaderContainer = this.querySelector('.loader-container');
|
2590
2603
|
}
|
2591
2604
|
|
2592
2605
|
renderInputs() {
|
@@ -2608,6 +2621,14 @@ class PasscodeInternal extends BaseInputClass$4 {
|
|
2608
2621
|
this.initInputs();
|
2609
2622
|
}
|
2610
2623
|
|
2624
|
+
handleLoadingState(isLoading) {
|
2625
|
+
if (isLoading) {
|
2626
|
+
this.setAttribute('inert', 'true');
|
2627
|
+
} else {
|
2628
|
+
this.removeAttribute('inert');
|
2629
|
+
}
|
2630
|
+
}
|
2631
|
+
|
2611
2632
|
get digits() {
|
2612
2633
|
return Number.parseInt(this.getAttribute('digits'), 10) || 6;
|
2613
2634
|
}
|
@@ -2753,6 +2774,9 @@ class PasscodeInternal extends BaseInputClass$4 {
|
|
2753
2774
|
if (attrName === 'digits') {
|
2754
2775
|
this.renderInputs();
|
2755
2776
|
}
|
2777
|
+
if (attrName === 'loading') {
|
2778
|
+
this.handleLoadingState(newValue === 'true');
|
2779
|
+
}
|
2756
2780
|
}
|
2757
2781
|
}
|
2758
2782
|
}
|
@@ -2847,7 +2871,7 @@ const customMixin$5 = (superclass) =>
|
|
2847
2871
|
|
2848
2872
|
this.inputElement = this.shadowRoot.querySelector(componentName$q);
|
2849
2873
|
|
2850
|
-
forwardAttrs(this, this.inputElement, { includeAttrs: ['digits', 'size'] });
|
2874
|
+
forwardAttrs(this, this.inputElement, { includeAttrs: ['digits', 'size', 'loading'] });
|
2851
2875
|
}
|
2852
2876
|
|
2853
2877
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
@@ -2878,6 +2902,7 @@ const {
|
|
2878
2902
|
};
|
2879
2903
|
|
2880
2904
|
const textVars$2 = TextFieldClass.cssVarList;
|
2905
|
+
const loaderVars = LoaderRadialClass.cssVarList;
|
2881
2906
|
|
2882
2907
|
const PasscodeClass = compose(
|
2883
2908
|
createStyleMixin({
|
@@ -2908,6 +2933,8 @@ const PasscodeClass = compose(
|
|
2908
2933
|
digitOutlineWidth: { ...digitField, property: textVars$2.inputOutlineWidth },
|
2909
2934
|
|
2910
2935
|
focusedDigitFieldOutlineColor: { ...focusedDigitField, property: textVars$2.inputOutlineColor },
|
2936
|
+
overlayOpacity: { ...internalWrapper$1, property: 'opacity' },
|
2937
|
+
spinnerSize: { selector: LoaderRadialClass.componentName, property: loaderVars.spinnerSize },
|
2911
2938
|
},
|
2912
2939
|
}),
|
2913
2940
|
draggableMixin,
|
@@ -2932,6 +2959,10 @@ const PasscodeClass = compose(
|
|
2932
2959
|
background-color: transparent;
|
2933
2960
|
}
|
2934
2961
|
|
2962
|
+
:host([loading="true"]) descope-passcode-internal .loader-container {
|
2963
|
+
display: block;
|
2964
|
+
}
|
2965
|
+
|
2935
2966
|
descope-passcode-internal {
|
2936
2967
|
-webkit-mask-image: none;
|
2937
2968
|
padding: 0;
|
@@ -6699,8 +6730,6 @@ const ButtonSelectionGroupClass = compose(
|
|
6699
6730
|
|
6700
6731
|
customElements.define(componentName$b, ButtonSelectionGroupInternalClass);
|
6701
6732
|
|
6702
|
-
customElements.define(componentName$a, ButtonSelectionGroupClass);
|
6703
|
-
|
6704
6733
|
const componentName$9 = getComponentName('button-selection-group-item');
|
6705
6734
|
|
6706
6735
|
class RawSelectItem extends createBaseClass({
|
@@ -6804,6 +6833,8 @@ const ButtonSelectionGroupItemClass = compose(
|
|
6804
6833
|
|
6805
6834
|
customElements.define(componentName$9, ButtonSelectionGroupItemClass);
|
6806
6835
|
|
6836
|
+
customElements.define(componentName$a, ButtonSelectionGroupClass);
|
6837
|
+
|
6807
6838
|
class GridTextColumnClass extends GridSortColumn {
|
6808
6839
|
get sortable() {
|
6809
6840
|
return this.getAttribute('sortable') === 'true';
|
@@ -6836,7 +6867,7 @@ class GridCustomColumnClass extends GridTextColumnClass {
|
|
6836
6867
|
// we are going over the elements, and when finding an element which is pattern matches the data,
|
6837
6868
|
// we are cloning this element, and injecting the data as its child
|
6838
6869
|
const contentEle = Array.from(this.children).find((child) => {
|
6839
|
-
const pattern = child.getAttribute('pattern');
|
6870
|
+
const pattern = child.getAttribute('data-pattern');
|
6840
6871
|
if (!pattern) return true;
|
6841
6872
|
|
6842
6873
|
const regEx = new RegExp(pattern);
|
@@ -6871,7 +6902,8 @@ const createCheckboxEle = () => {
|
|
6871
6902
|
return checkbox;
|
6872
6903
|
};
|
6873
6904
|
|
6874
|
-
const getIsAllItemsSelected = (grid) =>
|
6905
|
+
const getIsAllItemsSelected = (grid) =>
|
6906
|
+
!!grid.items?.length && grid.selectedItems.length === grid.items.length;
|
6875
6907
|
|
6876
6908
|
class GridSelectionColumnClass extends GridSelectionColumn {
|
6877
6909
|
// eslint-disable-next-line class-methods-use-this
|
@@ -7170,6 +7202,58 @@ const GridClass = compose(
|
|
7170
7202
|
|
7171
7203
|
customElements.define(componentName$5, GridClass);
|
7172
7204
|
|
7205
|
+
const componentName$4 = getComponentName('badge');
|
7206
|
+
|
7207
|
+
class RawBadge extends createBaseClass({ componentName: componentName$4, baseSelector: ':host > div' }) {
|
7208
|
+
constructor() {
|
7209
|
+
super();
|
7210
|
+
|
7211
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
7212
|
+
<style>
|
7213
|
+
:host {
|
7214
|
+
display: inline-flex;
|
7215
|
+
}
|
7216
|
+
:host > div {
|
7217
|
+
width: 100%;
|
7218
|
+
}
|
7219
|
+
</style>
|
7220
|
+
<div>
|
7221
|
+
<slot></slot>
|
7222
|
+
</div>
|
7223
|
+
`;
|
7224
|
+
}
|
7225
|
+
}
|
7226
|
+
|
7227
|
+
const BadgeClass = compose(
|
7228
|
+
createStyleMixin({
|
7229
|
+
mappings: {
|
7230
|
+
hostWidth: [{ selector: () => ':host', property: 'width' }],
|
7231
|
+
hostDirection: { property: 'direction' },
|
7232
|
+
|
7233
|
+
fontFamily: {},
|
7234
|
+
fontSize: {},
|
7235
|
+
fontWeight: {},
|
7236
|
+
textTransform: {},
|
7237
|
+
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
7238
|
+
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
7239
|
+
|
7240
|
+
borderWidth: {},
|
7241
|
+
borderStyle: {},
|
7242
|
+
borderColor: {},
|
7243
|
+
borderRadius: {},
|
7244
|
+
|
7245
|
+
backgroundColor: {},
|
7246
|
+
|
7247
|
+
textColor: { property: 'color' },
|
7248
|
+
textAlign: {},
|
7249
|
+
},
|
7250
|
+
}),
|
7251
|
+
draggableMixin,
|
7252
|
+
componentNameValidationMixin
|
7253
|
+
)(RawBadge);
|
7254
|
+
|
7255
|
+
customElements.define(componentName$4, BadgeClass);
|
7256
|
+
|
7173
7257
|
const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
|
7174
7258
|
|
7175
7259
|
const transformTheme = (theme, path, getTransformation) => {
|
@@ -7621,7 +7705,7 @@ var button$1 = /*#__PURE__*/Object.freeze({
|
|
7621
7705
|
vars: vars$v
|
7622
7706
|
});
|
7623
7707
|
|
7624
|
-
const componentName$
|
7708
|
+
const componentName$3 = getComponentName('input-wrapper');
|
7625
7709
|
const globalRefs$h = getThemeRefs(globals);
|
7626
7710
|
|
7627
7711
|
const [theme$1, refs, vars$u] = createHelperVars(
|
@@ -7653,6 +7737,8 @@ const [theme$1, refs, vars$u] = createHelperVars(
|
|
7653
7737
|
|
7654
7738
|
direction: globalRefs$h.direction,
|
7655
7739
|
|
7740
|
+
overlayOpacity: '0.3',
|
7741
|
+
|
7656
7742
|
size: {
|
7657
7743
|
xs: { fontSize: '12px', chipFontSize: '10px' },
|
7658
7744
|
sm: { fontSize: '14px', chipFontSize: '12px' },
|
@@ -7688,7 +7774,7 @@ const [theme$1, refs, vars$u] = createHelperVars(
|
|
7688
7774
|
backgroundColor: globalRefs$h.colors.surface.main,
|
7689
7775
|
},
|
7690
7776
|
},
|
7691
|
-
componentName$
|
7777
|
+
componentName$3
|
7692
7778
|
);
|
7693
7779
|
|
7694
7780
|
var inputWrapper = /*#__PURE__*/Object.freeze({
|
@@ -8322,9 +8408,20 @@ const passcode = {
|
|
8322
8408
|
[vars$g.focusedDigitFieldOutlineColor]: refs.outlineColor,
|
8323
8409
|
[vars$g.digitSize]: refs.inputHeight,
|
8324
8410
|
|
8411
|
+
size: {
|
8412
|
+
xs: { [vars$g.spinnerSize]: '15px' },
|
8413
|
+
sm: { [vars$g.spinnerSize]: '20px' },
|
8414
|
+
md: { [vars$g.spinnerSize]: '20px' },
|
8415
|
+
lg: { [vars$g.spinnerSize]: '20px' },
|
8416
|
+
},
|
8417
|
+
|
8325
8418
|
_hideCursor: {
|
8326
8419
|
[vars$g.digitCaretTextColor]: 'transparent',
|
8327
8420
|
},
|
8421
|
+
|
8422
|
+
_loading: {
|
8423
|
+
[vars$g.overlayOpacity]: refs.overlayOpacity,
|
8424
|
+
},
|
8328
8425
|
};
|
8329
8426
|
|
8330
8427
|
var passcode$1 = /*#__PURE__*/Object.freeze({
|
@@ -8703,7 +8800,7 @@ var buttonSelectionGroup$1 = /*#__PURE__*/Object.freeze({
|
|
8703
8800
|
vars: vars$6
|
8704
8801
|
});
|
8705
8802
|
|
8706
|
-
const componentName$
|
8803
|
+
const componentName$2 = getComponentName('modal');
|
8707
8804
|
|
8708
8805
|
const customMixin = (superclass) =>
|
8709
8806
|
class ModalMixinClass extends superclass {
|
@@ -8802,7 +8899,7 @@ const ModalClass = compose(
|
|
8802
8899
|
wrappedEleName: 'vaadin-dialog',
|
8803
8900
|
style: () => ``,
|
8804
8901
|
excludeAttrsSync: ['tabindex', 'opened'],
|
8805
|
-
componentName: componentName$
|
8902
|
+
componentName: componentName$2,
|
8806
8903
|
})
|
8807
8904
|
);
|
8808
8905
|
|
@@ -8865,7 +8962,7 @@ var grid$1 = /*#__PURE__*/Object.freeze({
|
|
8865
8962
|
vars: vars$4
|
8866
8963
|
});
|
8867
8964
|
|
8868
|
-
const componentName$
|
8965
|
+
const componentName$1 = getComponentName('notification-card');
|
8869
8966
|
|
8870
8967
|
const notificationCardMixin = (superclass) =>
|
8871
8968
|
class NotificationCardMixinClass extends superclass {
|
@@ -8973,7 +9070,7 @@ const NotificationCardClass = compose(
|
|
8973
9070
|
}
|
8974
9071
|
`,
|
8975
9072
|
excludeAttrsSync: ['tabindex'],
|
8976
|
-
componentName: componentName$
|
9073
|
+
componentName: componentName$1,
|
8977
9074
|
})
|
8978
9075
|
);
|
8979
9076
|
|
@@ -9031,7 +9128,7 @@ var notificationCard = /*#__PURE__*/Object.freeze({
|
|
9031
9128
|
vars: vars$3
|
9032
9129
|
});
|
9033
9130
|
|
9034
|
-
const componentName
|
9131
|
+
const componentName = getComponentName('multi-select-combo-box');
|
9035
9132
|
|
9036
9133
|
const MultiSelectComboBoxMixin = (superclass) =>
|
9037
9134
|
class MultiSelectComboBoxMixinClass extends superclass {
|
@@ -9519,7 +9616,7 @@ const MultiSelectComboBoxClass = compose(
|
|
9519
9616
|
// Note: we exclude `placeholder` because the vaadin component observes it and
|
9520
9617
|
// tries to override it, causing us to lose the user set placeholder.
|
9521
9618
|
excludeAttrsSync: ['tabindex', 'size', 'data', 'placeholder'],
|
9522
|
-
componentName
|
9619
|
+
componentName,
|
9523
9620
|
includeForwardProps: ['items', 'renderer', 'selectedItems'],
|
9524
9621
|
})
|
9525
9622
|
);
|
@@ -9581,56 +9678,6 @@ var multiSelectComboBox$1 = /*#__PURE__*/Object.freeze({
|
|
9581
9678
|
vars: vars$2
|
9582
9679
|
});
|
9583
9680
|
|
9584
|
-
const componentName = getComponentName('badge');
|
9585
|
-
|
9586
|
-
class RawBadge extends createBaseClass({ componentName, baseSelector: ':host > div' }) {
|
9587
|
-
constructor() {
|
9588
|
-
super();
|
9589
|
-
|
9590
|
-
this.attachShadow({ mode: 'open' }).innerHTML = `
|
9591
|
-
<style>
|
9592
|
-
:host {
|
9593
|
-
display: inline-flex;
|
9594
|
-
}
|
9595
|
-
:host > div {
|
9596
|
-
width: 100%;
|
9597
|
-
}
|
9598
|
-
</style>
|
9599
|
-
<div>
|
9600
|
-
<slot></slot>
|
9601
|
-
</div>
|
9602
|
-
`;
|
9603
|
-
}
|
9604
|
-
}
|
9605
|
-
|
9606
|
-
const BadgeClass = compose(
|
9607
|
-
createStyleMixin({
|
9608
|
-
mappings: {
|
9609
|
-
hostWidth: [{ selector: () => ':host', property: 'width' }],
|
9610
|
-
hostDirection: { property: 'direction' },
|
9611
|
-
|
9612
|
-
fontFamily: {},
|
9613
|
-
fontSize: {},
|
9614
|
-
fontWeight: {},
|
9615
|
-
textTransform: {},
|
9616
|
-
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
9617
|
-
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
9618
|
-
|
9619
|
-
borderWidth: {},
|
9620
|
-
borderStyle: {},
|
9621
|
-
borderColor: {},
|
9622
|
-
borderRadius: {},
|
9623
|
-
|
9624
|
-
backgroundColor: {},
|
9625
|
-
|
9626
|
-
textColor: { property: 'color' },
|
9627
|
-
textAlign: {},
|
9628
|
-
},
|
9629
|
-
}),
|
9630
|
-
draggableMixin,
|
9631
|
-
componentNameValidationMixin
|
9632
|
-
)(RawBadge);
|
9633
|
-
|
9634
9681
|
const globalRefs = getThemeRefs(globals);
|
9635
9682
|
const vars$1 = BadgeClass.cssVarList;
|
9636
9683
|
|
@@ -9748,5 +9795,5 @@ const vars = Object.keys(components).reduce(
|
|
9748
9795
|
const defaultTheme = { globals, components: theme };
|
9749
9796
|
const themeVars = { globals: vars$w, components: vars };
|
9750
9797
|
|
9751
|
-
export { ButtonClass, ButtonSelectionGroupClass,
|
9798
|
+
export { BadgeClass, ButtonClass, ButtonSelectionGroupClass, CheckboxClass, ContainerClass, DividerClass, EmailFieldClass, GridClass, ImageClass, LinkClass, LoaderLinearClass, LoaderRadialClass, LogoClass, NewPasswordClass, NumberFieldClass, PasscodeClass, PasswordClass, PhoneFieldClass, PhoneFieldInputBoxClass, RecaptchaClass, SwitchToggleClass, TextAreaClass, TextClass, TextFieldClass, TotpImageClass, UploadFileClass, componentsThemeManager, createComponentsTheme, defaultTheme, genColor, globalsThemeToStyle, themeToStyle, themeVars };
|
9752
9799
|
//# sourceMappingURL=index.esm.js.map
|