@descope/web-components-ui 1.0.398 → 1.0.400
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 +27 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +27 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/4619.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/package.json +2 -2
- package/src/components/descope-container/ContainerClass.js +6 -0
- package/src/helpers/themeHelpers/index.js +8 -1
- package/src/mixins/externalInputMixin.js +5 -1
- package/src/theme/components/container.js +10 -2
package/dist/cjs/index.cjs.js
CHANGED
@@ -366,7 +366,14 @@ const themeToStyle = ({ globals, components }, themeName) => ({
|
|
366
366
|
components: createComponentsTheme(components),
|
367
367
|
});
|
368
368
|
|
369
|
-
|
369
|
+
// allows to generate css variables with nested fallbacks
|
370
|
+
const useVar = (...varNames) => {
|
371
|
+
return varNames.reduceRight((acc, value) => {
|
372
|
+
if (value.startsWith('--')) return `var(${value}${acc ? `, ${acc}` : acc})`;
|
373
|
+
|
374
|
+
return `${value}${acc ? `, ${acc}` : acc}`;
|
375
|
+
}, '');
|
376
|
+
};
|
370
377
|
|
371
378
|
const createHelperVars = (theme, prefix) => {
|
372
379
|
const res = transformTheme(theme, [], (path, value) => {
|
@@ -2770,13 +2777,17 @@ const externalInputMixin =
|
|
2770
2777
|
}
|
2771
2778
|
|
2772
2779
|
createExternalInput() {
|
2773
|
-
if (!this.isExternalInput) {
|
2780
|
+
if (!this.isExternalInput || this.isReadOnly || this.isDisabled) {
|
2774
2781
|
return null;
|
2775
2782
|
}
|
2776
2783
|
|
2777
2784
|
// use original input element as reference
|
2778
2785
|
const origInput = this.baseElement.querySelector('input');
|
2779
2786
|
|
2787
|
+
if (!origInput) {
|
2788
|
+
return null;
|
2789
|
+
}
|
2790
|
+
|
2780
2791
|
// to avoid focus loop between external-input and origInput
|
2781
2792
|
// we set origInput's tabindex to -1
|
2782
2793
|
// otherwise, shift-tab will never leave the component focus
|
@@ -5119,6 +5130,12 @@ const ContainerClass = compose(
|
|
5119
5130
|
flexWrap: {},
|
5120
5131
|
|
5121
5132
|
backgroundColor: {},
|
5133
|
+
backgroundImage: {},
|
5134
|
+
backgroundPositionX: {},
|
5135
|
+
backgroundPositionY: {},
|
5136
|
+
backgroundSize: {},
|
5137
|
+
backgroundRepeat: {},
|
5138
|
+
|
5122
5139
|
color: {},
|
5123
5140
|
borderRadius: {},
|
5124
5141
|
|
@@ -5166,7 +5183,15 @@ const container = {
|
|
5166
5183
|
[compVars$5.itemsGrow]: '0',
|
5167
5184
|
[compVars$5.hostWidth]: '100%',
|
5168
5185
|
[compVars$5.boxShadow]: 'none',
|
5186
|
+
|
5169
5187
|
[compVars$5.backgroundColor]: globalRefs$t.colors.surface.main,
|
5188
|
+
|
5189
|
+
[compVars$5.backgroundImage]: '', // we need to set a value to avoid inner containers from inheriting the parent's background image
|
5190
|
+
[compVars$5.backgroundPositionX]: 'center',
|
5191
|
+
[compVars$5.backgroundPositionY]: 'center',
|
5192
|
+
[compVars$5.backgroundSize]: 'cover',
|
5193
|
+
[compVars$5.backgroundRepeat]: 'no-repeat',
|
5194
|
+
|
5170
5195
|
[compVars$5.color]: globalRefs$t.colors.surface.contrast,
|
5171
5196
|
[compVars$5.borderRadius]: '0px',
|
5172
5197
|
[compVars$5.hostDirection]: globalRefs$t.direction,
|