@descope/web-components-ui 1.35.0 → 1.37.0
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 +3816 -3784
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +716 -685
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1519.js +1 -1
- package/dist/umd/1519.js.map +1 -1
- package/dist/umd/2672.js +1 -1
- package/dist/umd/2672.js.map +1 -1
- package/dist/umd/6424.js +1 -1
- package/dist/umd/6424.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/{descope-button-index-js.js → descope-button.js} +3 -3
- package/dist/umd/descope-button.js.map +1 -0
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-icon.js +2 -0
- package/dist/umd/descope-icon.js.map +1 -0
- package/dist/umd/descope-modal-index-js.js +1 -1
- package/dist/umd/descope-modal-index-js.js.map +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/package.json +3 -3
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +1 -1
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/index.js +1 -1
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +1 -1
- package/src/components/descope-date-field/descope-calendar/index.js +1 -1
- package/src/components/descope-modal/ModalClass.js +15 -1
- package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +1 -1
- package/src/components/descope-third-party-app-logo/index.js +1 -1
- package/src/components/descope-upload-file/UploadFileClass.js +1 -1
- package/src/components/descope-upload-file/index.js +1 -1
- package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
- package/src/components/descope-user-attribute/index.js +1 -1
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +2 -2
- package/src/components/descope-user-auth-method/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/index.cjs.js +0 -1
- package/src/index.js +0 -2
- package/src/theme/components/index.js +2 -2
- package/dist/umd/descope-button-index-js.js.map +0 -1
- package/dist/umd/descope-icon-index-js.js +0 -2
- package/dist/umd/descope-icon-index-js.js.map +0 -1
- package/src/components/descope-button/ButtonClass.js +0 -163
- package/src/components/descope-button/clickableMixin.js +0 -10
- package/src/components/descope-button/index.js +0 -6
- package/src/components/descope-icon/IconClass.js +0 -98
- package/src/components/descope-icon/helpers.js +0 -51
- package/src/components/descope-icon/index.js +0 -5
- package/src/theme/components/button.js +0 -133
- package/src/theme/components/icon.js +0 -7
- /package/dist/umd/{descope-button-index-js.js.LICENSE.txt → descope-button.js.LICENSE.txt} +0 -0
package/dist/index.esm.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import '@vaadin/button';
|
2
1
|
import debounce from 'lodash.debounce';
|
3
2
|
import merge from 'lodash.merge';
|
4
3
|
import Color from 'color';
|
5
4
|
import 'element-internals-polyfill';
|
6
|
-
import DOMPurify from 'dompurify';
|
7
5
|
import '@vaadin/checkbox';
|
8
6
|
import '@vaadin/text-field';
|
9
7
|
import '@vaadin/combo-box';
|
8
|
+
import DOMPurify from 'dompurify';
|
9
|
+
import '@vaadin/button';
|
10
10
|
import '@vaadin/popover/src/vaadin-popover';
|
11
11
|
import '@vaadin/icons';
|
12
12
|
import '@vaadin/icon';
|
@@ -1813,6 +1813,8 @@ const composedProxyInputMixin$1 = (proxyInputMixinConfig) =>
|
|
1813
1813
|
// because of that, we are adding this separator that is also used as a differentiator
|
1814
1814
|
const DISPLAY_NAME_SEPARATOR$1 = '_';
|
1815
1815
|
|
1816
|
+
const sanitizeSelector$1 = (selector) => selector.replace(/[^\w\s]/gi, '');
|
1817
|
+
|
1816
1818
|
const withWaitForShadowRoot$1 = (getRootElementFn) => async (that) => {
|
1817
1819
|
const ele = await getRootElementFn(that);
|
1818
1820
|
|
@@ -1843,7 +1845,7 @@ const withWaitForShadowRoot$1 = (getRootElementFn) => async (that) => {
|
|
1843
1845
|
const portalMixin$1 =
|
1844
1846
|
({ name, selector, mappings = {}, forward: { attributes = [], include = true } = {} }) =>
|
1845
1847
|
(superclass) => {
|
1846
|
-
const eleDisplayName = name;
|
1848
|
+
const eleDisplayName = name || sanitizeSelector$1(selector);
|
1847
1849
|
|
1848
1850
|
const BaseClass = createStyleMixin$1({
|
1849
1851
|
mappings,
|
@@ -2264,455 +2266,146 @@ const externalInputMixin =
|
|
2264
2266
|
}
|
2265
2267
|
};
|
2266
2268
|
|
2267
|
-
const
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
const isBase64Svg = (src) => src.startsWith(base64Prefix);
|
2275
|
-
|
2276
|
-
const createImgEle = (src) => {
|
2277
|
-
const ele = document.createElement('img');
|
2278
|
-
ele.setAttribute('src', src);
|
2279
|
-
return ele;
|
2280
|
-
};
|
2281
|
-
|
2282
|
-
const createSvgEle = (text) => {
|
2283
|
-
// we want to purify the SVG to avoid XSS attacks
|
2284
|
-
const clean = DOMPurify.sanitize(text, { USE_PROFILES: { svg: true, svgFilters: true } });
|
2285
|
-
|
2286
|
-
const parser = new DOMParser();
|
2287
|
-
const ele = parser.parseFromString(clean, 'image/svg+xml').querySelector('svg');
|
2288
|
-
return ele;
|
2289
|
-
};
|
2290
|
-
|
2291
|
-
const createIcon = async (src) => {
|
2292
|
-
try {
|
2293
|
-
let ele;
|
2294
|
-
if (isBase64Svg(src)) {
|
2295
|
-
// handle base64 source
|
2296
|
-
const svgXml = atob(src.slice(base64Prefix.length));
|
2297
|
-
ele = createSvgEle(svgXml);
|
2298
|
-
} else if (getFileExtension(src) === 'svg') {
|
2299
|
-
// handle urls
|
2300
|
-
const fetchedSrc = await fetch(src);
|
2301
|
-
const text = await fetchedSrc.text();
|
2302
|
-
ele = createSvgEle(text);
|
2303
|
-
} else {
|
2304
|
-
// handle binary
|
2305
|
-
ele = createImgEle(src);
|
2306
|
-
}
|
2307
|
-
|
2308
|
-
ele.style.setProperty('max-width', '100%');
|
2309
|
-
ele.style.setProperty('max-height', '100%');
|
2269
|
+
const createBaseInputClass$1 = (...args) =>
|
2270
|
+
compose$1(
|
2271
|
+
inputValidationMixin$1,
|
2272
|
+
changeMixin$1,
|
2273
|
+
normalizeBooleanAttributesMixin$1,
|
2274
|
+
inputEventsDispatchingMixin$1
|
2275
|
+
)(createBaseClass$1(...args));
|
2310
2276
|
|
2311
|
-
|
2312
|
-
} catch {
|
2313
|
-
return null;
|
2314
|
-
}
|
2315
|
-
};
|
2277
|
+
const componentName$1b = getComponentName$1('boolean-field-internal');
|
2316
2278
|
|
2317
|
-
|
2279
|
+
const forwardAttributes$1 = ['disabled', 'label', 'invalid', 'readonly'];
|
2318
2280
|
|
2319
|
-
const
|
2281
|
+
const BaseInputClass$c = createBaseInputClass$1({ componentName: componentName$1b, baseSelector: 'div' });
|
2320
2282
|
|
2321
|
-
class
|
2283
|
+
class BooleanInputInternal extends BaseInputClass$c {
|
2322
2284
|
static get observedAttributes() {
|
2323
|
-
return ['
|
2285
|
+
return ['readonly'];
|
2324
2286
|
}
|
2325
2287
|
|
2326
|
-
#icon;
|
2327
|
-
|
2328
2288
|
constructor() {
|
2329
2289
|
super();
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2337
|
-
:host > slot {
|
2338
|
-
box-sizing: border-box;
|
2339
|
-
width: 100%;
|
2340
|
-
height: 100%;
|
2341
|
-
display: flex;
|
2342
|
-
overflow: hidden;
|
2343
|
-
}
|
2344
|
-
:host {
|
2345
|
-
display: inline-block;
|
2346
|
-
}
|
2347
|
-
`,
|
2348
|
-
this
|
2349
|
-
);
|
2290
|
+
this.innerHTML = `
|
2291
|
+
<div class="wrapper">
|
2292
|
+
<vaadin-checkbox></vaadin-checkbox>
|
2293
|
+
</div>
|
2294
|
+
`;
|
2295
|
+
this.wrapperEle = this.querySelector('div');
|
2296
|
+
this.checkbox = this.querySelector('vaadin-checkbox');
|
2350
2297
|
}
|
2351
2298
|
|
2352
|
-
|
2353
|
-
|
2354
|
-
this.toggleVisibility(this.src);
|
2299
|
+
get value() {
|
2300
|
+
return this.checkbox?.checked;
|
2355
2301
|
}
|
2356
2302
|
|
2357
|
-
|
2358
|
-
this.
|
2303
|
+
set value(val) {
|
2304
|
+
this.checkbox.checked = val;
|
2359
2305
|
}
|
2360
2306
|
|
2361
|
-
get
|
2362
|
-
return this.
|
2307
|
+
get checked() {
|
2308
|
+
return this.value;
|
2363
2309
|
}
|
2364
2310
|
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
updateFillColor(node) {
|
2369
|
-
// set fill to root node and all its relevant selectors
|
2370
|
-
const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];
|
2311
|
+
set checked(val) {
|
2312
|
+
this.value = val;
|
2313
|
+
}
|
2371
2314
|
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2315
|
+
init() {
|
2316
|
+
this.addEventListener('focus', (e) => {
|
2317
|
+
if (e.isTrusted) {
|
2318
|
+
this.checkbox.focus();
|
2319
|
+
}
|
2377
2320
|
});
|
2321
|
+
super.init?.();
|
2322
|
+
|
2323
|
+
forwardAttrs$1(this, this.checkbox, { includeAttrs: forwardAttributes$1 });
|
2324
|
+
syncAttrs$1(this, this.checkbox, { includeAttrs: ['checked'] });
|
2325
|
+
|
2326
|
+
// we need it in order to set the focus ring and trigger validation on descope-checkbox
|
2327
|
+
this.handleFocusEventsDispatching([this.checkbox]);
|
2378
2328
|
}
|
2379
2329
|
|
2380
2330
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
2381
2331
|
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
2382
2332
|
|
2383
|
-
if (
|
2333
|
+
if (attrName === 'readonly') {
|
2334
|
+
this.onReadOnlyChange(newValue !== null);
|
2335
|
+
}
|
2336
|
+
}
|
2384
2337
|
|
2385
|
-
|
2386
|
-
|
2338
|
+
onReadOnlyChange(val) {
|
2339
|
+
this.baseElement.setAttribute('inert', val);
|
2340
|
+
}
|
2387
2341
|
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
const clonedNode = res.cloneNode(true);
|
2392
|
-
this.updateFillColor(clonedNode);
|
2393
|
-
this.appendChild(clonedNode);
|
2394
|
-
}
|
2395
|
-
});
|
2342
|
+
getValidity() {
|
2343
|
+
if (this.isRequired && !this.value) {
|
2344
|
+
return { valueMissing: true };
|
2396
2345
|
}
|
2346
|
+
return {};
|
2397
2347
|
}
|
2398
2348
|
}
|
2399
2349
|
|
2400
|
-
const
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
},
|
2405
|
-
}),
|
2406
|
-
draggableMixin$1,
|
2407
|
-
componentNameValidationMixin$1
|
2408
|
-
)(RawIcon);
|
2350
|
+
const booleanFieldMixin = (superclass) =>
|
2351
|
+
class BooleanFieldMixinClass extends superclass {
|
2352
|
+
init() {
|
2353
|
+
super.init?.();
|
2409
2354
|
|
2410
|
-
const
|
2411
|
-
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2355
|
+
const template = document.createElement('template');
|
2356
|
+
template.innerHTML = `
|
2357
|
+
<${componentName$1b}
|
2358
|
+
tabindex="-1"
|
2359
|
+
slot="input"
|
2360
|
+
></${componentName$1b}>
|
2361
|
+
`;
|
2415
2362
|
|
2416
|
-
|
2417
|
-
this.
|
2363
|
+
this.baseElement.appendChild(template.content.cloneNode(true));
|
2364
|
+
this.inputElement = this.shadowRoot.querySelector(componentName$1b);
|
2365
|
+
this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
|
2366
|
+
|
2367
|
+
forwardAttrs$1(this, this.inputElement, {
|
2368
|
+
includeAttrs: [
|
2369
|
+
'required',
|
2370
|
+
'full-width',
|
2371
|
+
'size',
|
2372
|
+
'label',
|
2373
|
+
'invalid',
|
2374
|
+
'disabled',
|
2375
|
+
'readonly',
|
2376
|
+
],
|
2377
|
+
});
|
2378
|
+
|
2379
|
+
forwardProps$3(this.inputElement, this, ['checked']);
|
2380
|
+
syncAttrs$1(this, this.inputElement, { includeAttrs: ['checked'] });
|
2418
2381
|
}
|
2419
2382
|
};
|
2420
2383
|
|
2421
|
-
const
|
2384
|
+
const useHostExternalPadding = (cssVarList) => `
|
2385
|
+
:host {
|
2386
|
+
padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))
|
2387
|
+
}
|
2388
|
+
`;
|
2422
2389
|
|
2423
|
-
const
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
}
|
2428
|
-
vaadin-button::before,
|
2429
|
-
vaadin-button::after {
|
2430
|
-
opacity: 0;
|
2431
|
-
}
|
2432
|
-
vaadin-button {
|
2433
|
-
margin: 0;
|
2434
|
-
min-width: 0;
|
2435
|
-
width: 100%;
|
2436
|
-
height: auto;
|
2437
|
-
box-shadow: none;
|
2438
|
-
}
|
2439
|
-
vaadin-button::part(label) {
|
2440
|
-
padding: 0;
|
2441
|
-
width: 100%;
|
2442
|
-
}
|
2443
|
-
vaadin-button::part(prefix) {
|
2444
|
-
margin-left: 0;
|
2445
|
-
margin-right: 0;
|
2446
|
-
}
|
2390
|
+
const resetInputFieldUnderlayingBorder = (name) => `
|
2391
|
+
${name}::part(input-field)::after {
|
2392
|
+
border: none;
|
2393
|
+
}
|
2447
2394
|
`;
|
2448
2395
|
|
2449
|
-
const
|
2450
|
-
|
2451
|
-
|
2452
|
-
display: flex;
|
2453
|
-
align-items: center;
|
2396
|
+
const resetInitialHeight = (name) => `
|
2397
|
+
${name}::before {
|
2398
|
+
height: unset;
|
2454
2399
|
}
|
2455
2400
|
`;
|
2456
2401
|
|
2457
|
-
const
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
let loadingIndicatorStyles;
|
2466
|
-
|
2467
|
-
const ButtonClass = compose$1(
|
2468
|
-
createStyleMixin$1({
|
2469
|
-
mappings: {
|
2470
|
-
hostWidth: { property: 'width' },
|
2471
|
-
hostHeight: { property: 'height' },
|
2472
|
-
hostDirection: { ...host$q, property: 'direction' },
|
2473
|
-
fontSize: {},
|
2474
|
-
fontFamily: {},
|
2475
|
-
|
2476
|
-
cursor: {},
|
2477
|
-
backgroundColor: {},
|
2478
|
-
|
2479
|
-
outlineOffset: {},
|
2480
|
-
outlineColor: {},
|
2481
|
-
outlineStyle: {},
|
2482
|
-
outlineWidth: {},
|
2483
|
-
|
2484
|
-
borderRadius: {},
|
2485
|
-
borderColor: {},
|
2486
|
-
borderStyle: {},
|
2487
|
-
borderWidth: {},
|
2488
|
-
|
2489
|
-
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
2490
|
-
horizontalPadding: [
|
2491
|
-
{ property: 'padding-right', fallback: '0.875em' },
|
2492
|
-
{ property: 'padding-left', fallback: '0.875em' },
|
2493
|
-
],
|
2494
|
-
|
2495
|
-
labelTextColor: { property: 'color' },
|
2496
|
-
iconColor: {
|
2497
|
-
selector: () => `::slotted(*)`,
|
2498
|
-
property: IconClass.cssVarList.fill,
|
2499
|
-
},
|
2500
|
-
labelTextDecoration: { ...label$a, property: 'text-decoration' },
|
2501
|
-
labelSpacing: { ...label$a, property: 'gap' },
|
2502
|
-
textAlign: { ...label$a, property: 'justify-content', fallback: 'center' },
|
2503
|
-
|
2504
|
-
iconSize: [
|
2505
|
-
{ ...slottedIcon, property: 'width' },
|
2506
|
-
{ ...slottedIcon, property: 'height' },
|
2507
|
-
],
|
2508
|
-
},
|
2509
|
-
}),
|
2510
|
-
clickableMixin,
|
2511
|
-
draggableMixin$1,
|
2512
|
-
componentNameValidationMixin$1
|
2513
|
-
)(
|
2514
|
-
createProxy$1({
|
2515
|
-
slots: ['', 'prefix', 'label', 'suffix'],
|
2516
|
-
wrappedEleName: 'vaadin-button',
|
2517
|
-
style: () => `
|
2518
|
-
${resetStyles}
|
2519
|
-
${iconStyles}
|
2520
|
-
${loadingIndicatorStyles}
|
2521
|
-
${editorOverrides}
|
2522
|
-
:host {
|
2523
|
-
padding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));
|
2524
|
-
}
|
2525
|
-
:host([full-width="true"]) {
|
2526
|
-
width: var(${ButtonClass.cssVarList.hostWidth});
|
2527
|
-
}
|
2528
|
-
vaadin-button {
|
2529
|
-
height: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));
|
2530
|
-
}
|
2531
|
-
[square="true"]:not([full-width="true"]) {
|
2532
|
-
width: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));
|
2533
|
-
padding: 0;
|
2534
|
-
}
|
2535
|
-
`,
|
2536
|
-
excludeAttrsSync: ['tabindex'],
|
2537
|
-
componentName: componentName$1a,
|
2538
|
-
})
|
2539
|
-
);
|
2540
|
-
|
2541
|
-
const { color, fontSize } = ButtonClass.cssVarList;
|
2542
|
-
loadingIndicatorStyles = `
|
2543
|
-
@keyframes spin {
|
2544
|
-
0% { -webkit-transform: rotate(0deg); }
|
2545
|
-
100% { -webkit-transform: rotate(360deg); }
|
2546
|
-
}
|
2547
|
-
:host([loading="true"]) ::before {
|
2548
|
-
animation: spin 2s linear infinite;
|
2549
|
-
position: absolute;
|
2550
|
-
content: '';
|
2551
|
-
z-index: 1;
|
2552
|
-
box-sizing: border-box;
|
2553
|
-
border-radius: 50%;
|
2554
|
-
border-bottom-color: transparent;
|
2555
|
-
border-left-color: transparent;
|
2556
|
-
border-style: solid;
|
2557
|
-
color: var(${color});
|
2558
|
-
top: calc(50% - (var(${fontSize}) / 2));
|
2559
|
-
left: calc(50% - (var(${fontSize}) / 2));
|
2560
|
-
border-width: calc(var(${fontSize}) / 10);
|
2561
|
-
width: var(${fontSize});
|
2562
|
-
height: var(${fontSize});
|
2563
|
-
}
|
2564
|
-
:host([disabled="true"]),
|
2565
|
-
:host([loading="true"]) {
|
2566
|
-
pointer-events: none;
|
2567
|
-
}
|
2568
|
-
:host([loading="true"])::part(prefix),
|
2569
|
-
:host([loading="true"])::part(label) {
|
2570
|
-
visibility: hidden;
|
2571
|
-
}
|
2572
|
-
`;
|
2573
|
-
|
2574
|
-
customElements.define(componentName$1a, ButtonClass);
|
2575
|
-
|
2576
|
-
const createBaseInputClass$1 = (...args) =>
|
2577
|
-
compose$1(
|
2578
|
-
inputValidationMixin$1,
|
2579
|
-
changeMixin$1,
|
2580
|
-
normalizeBooleanAttributesMixin$1,
|
2581
|
-
inputEventsDispatchingMixin$1
|
2582
|
-
)(createBaseClass$1(...args));
|
2583
|
-
|
2584
|
-
const componentName$19 = getComponentName$1('boolean-field-internal');
|
2585
|
-
|
2586
|
-
const forwardAttributes$1 = ['disabled', 'label', 'invalid', 'readonly'];
|
2587
|
-
|
2588
|
-
const BaseInputClass$c = createBaseInputClass$1({ componentName: componentName$19, baseSelector: 'div' });
|
2589
|
-
|
2590
|
-
class BooleanInputInternal extends BaseInputClass$c {
|
2591
|
-
static get observedAttributes() {
|
2592
|
-
return ['readonly'];
|
2593
|
-
}
|
2594
|
-
|
2595
|
-
constructor() {
|
2596
|
-
super();
|
2597
|
-
this.innerHTML = `
|
2598
|
-
<div class="wrapper">
|
2599
|
-
<vaadin-checkbox></vaadin-checkbox>
|
2600
|
-
</div>
|
2601
|
-
`;
|
2602
|
-
this.wrapperEle = this.querySelector('div');
|
2603
|
-
this.checkbox = this.querySelector('vaadin-checkbox');
|
2604
|
-
}
|
2605
|
-
|
2606
|
-
get value() {
|
2607
|
-
return this.checkbox?.checked;
|
2608
|
-
}
|
2609
|
-
|
2610
|
-
set value(val) {
|
2611
|
-
this.checkbox.checked = val;
|
2612
|
-
}
|
2613
|
-
|
2614
|
-
get checked() {
|
2615
|
-
return this.value;
|
2616
|
-
}
|
2617
|
-
|
2618
|
-
set checked(val) {
|
2619
|
-
this.value = val;
|
2620
|
-
}
|
2621
|
-
|
2622
|
-
init() {
|
2623
|
-
this.addEventListener('focus', (e) => {
|
2624
|
-
if (e.isTrusted) {
|
2625
|
-
this.checkbox.focus();
|
2626
|
-
}
|
2627
|
-
});
|
2628
|
-
super.init?.();
|
2629
|
-
|
2630
|
-
forwardAttrs$1(this, this.checkbox, { includeAttrs: forwardAttributes$1 });
|
2631
|
-
syncAttrs$1(this, this.checkbox, { includeAttrs: ['checked'] });
|
2632
|
-
|
2633
|
-
// we need it in order to set the focus ring and trigger validation on descope-checkbox
|
2634
|
-
this.handleFocusEventsDispatching([this.checkbox]);
|
2635
|
-
}
|
2636
|
-
|
2637
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
2638
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
2639
|
-
|
2640
|
-
if (attrName === 'readonly') {
|
2641
|
-
this.onReadOnlyChange(newValue !== null);
|
2642
|
-
}
|
2643
|
-
}
|
2644
|
-
|
2645
|
-
onReadOnlyChange(val) {
|
2646
|
-
this.baseElement.setAttribute('inert', val);
|
2647
|
-
}
|
2648
|
-
|
2649
|
-
getValidity() {
|
2650
|
-
if (this.isRequired && !this.value) {
|
2651
|
-
return { valueMissing: true };
|
2652
|
-
}
|
2653
|
-
return {};
|
2654
|
-
}
|
2655
|
-
}
|
2656
|
-
|
2657
|
-
const booleanFieldMixin = (superclass) =>
|
2658
|
-
class BooleanFieldMixinClass extends superclass {
|
2659
|
-
init() {
|
2660
|
-
super.init?.();
|
2661
|
-
|
2662
|
-
const template = document.createElement('template');
|
2663
|
-
template.innerHTML = `
|
2664
|
-
<${componentName$19}
|
2665
|
-
tabindex="-1"
|
2666
|
-
slot="input"
|
2667
|
-
></${componentName$19}>
|
2668
|
-
`;
|
2669
|
-
|
2670
|
-
this.baseElement.appendChild(template.content.cloneNode(true));
|
2671
|
-
this.inputElement = this.shadowRoot.querySelector(componentName$19);
|
2672
|
-
this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
|
2673
|
-
|
2674
|
-
forwardAttrs$1(this, this.inputElement, {
|
2675
|
-
includeAttrs: [
|
2676
|
-
'required',
|
2677
|
-
'full-width',
|
2678
|
-
'size',
|
2679
|
-
'label',
|
2680
|
-
'invalid',
|
2681
|
-
'disabled',
|
2682
|
-
'readonly',
|
2683
|
-
],
|
2684
|
-
});
|
2685
|
-
|
2686
|
-
forwardProps$3(this.inputElement, this, ['checked']);
|
2687
|
-
syncAttrs$1(this, this.inputElement, { includeAttrs: ['checked'] });
|
2688
|
-
}
|
2689
|
-
};
|
2690
|
-
|
2691
|
-
const useHostExternalPadding = (cssVarList) => `
|
2692
|
-
:host {
|
2693
|
-
padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))
|
2694
|
-
}
|
2695
|
-
`;
|
2696
|
-
|
2697
|
-
const resetInputFieldUnderlayingBorder = (name) => `
|
2698
|
-
${name}::part(input-field)::after {
|
2699
|
-
border: none;
|
2700
|
-
}
|
2701
|
-
`;
|
2702
|
-
|
2703
|
-
const resetInitialHeight = (name) => `
|
2704
|
-
${name}::before {
|
2705
|
-
height: unset;
|
2706
|
-
}
|
2707
|
-
`;
|
2708
|
-
|
2709
|
-
const resetInputElement = (name) => `
|
2710
|
-
${name} > input {
|
2711
|
-
-webkit-mask-image: none;
|
2712
|
-
min-height: 0;
|
2713
|
-
box-sizing: border-box;
|
2714
|
-
}
|
2715
|
-
`;
|
2402
|
+
const resetInputElement = (name) => `
|
2403
|
+
${name} > input {
|
2404
|
+
-webkit-mask-image: none;
|
2405
|
+
min-height: 0;
|
2406
|
+
box-sizing: border-box;
|
2407
|
+
}
|
2408
|
+
`;
|
2716
2409
|
|
2717
2410
|
const resetInputContainer = (name) => `
|
2718
2411
|
${name} {
|
@@ -2882,10 +2575,10 @@ descope-boolean-field-internal {
|
|
2882
2575
|
}
|
2883
2576
|
`;
|
2884
2577
|
|
2885
|
-
const componentName$
|
2578
|
+
const componentName$1a = getComponentName$1('checkbox');
|
2886
2579
|
|
2887
2580
|
const {
|
2888
|
-
host: host$
|
2581
|
+
host: host$q,
|
2889
2582
|
component: component$1,
|
2890
2583
|
checkboxElement,
|
2891
2584
|
checkboxSurface,
|
@@ -2907,10 +2600,10 @@ const {
|
|
2907
2600
|
const CheckboxClass = compose$1(
|
2908
2601
|
createStyleMixin$1({
|
2909
2602
|
mappings: {
|
2910
|
-
hostWidth: { ...host$
|
2911
|
-
hostDirection: { ...host$
|
2603
|
+
hostWidth: { ...host$q, property: 'width' },
|
2604
|
+
hostDirection: { ...host$q, property: 'direction' },
|
2912
2605
|
|
2913
|
-
fontSize: [host$
|
2606
|
+
fontSize: [host$q, checkboxElement, checkboxLabel$1],
|
2914
2607
|
fontFamily: [checkboxLabel$1, helperText$a, errorMessage$d],
|
2915
2608
|
|
2916
2609
|
labelTextColor: { ...checkboxLabel$1, property: 'color' },
|
@@ -2999,18 +2692,18 @@ const CheckboxClass = compose$1(
|
|
2999
2692
|
}
|
3000
2693
|
`,
|
3001
2694
|
excludeAttrsSync: ['label', 'tabindex'],
|
3002
|
-
componentName: componentName$
|
2695
|
+
componentName: componentName$1a,
|
3003
2696
|
})
|
3004
2697
|
);
|
3005
2698
|
|
3006
|
-
customElements.define(componentName$
|
2699
|
+
customElements.define(componentName$1b, BooleanInputInternal);
|
3007
2700
|
|
3008
|
-
customElements.define(componentName$
|
2701
|
+
customElements.define(componentName$1a, CheckboxClass);
|
3009
2702
|
|
3010
|
-
const componentName$
|
2703
|
+
const componentName$19 = getComponentName$1('switch-toggle');
|
3011
2704
|
|
3012
2705
|
const {
|
3013
|
-
host: host$
|
2706
|
+
host: host$p,
|
3014
2707
|
component,
|
3015
2708
|
checkboxElement: track,
|
3016
2709
|
checkboxSurface: knob,
|
@@ -3032,8 +2725,8 @@ const {
|
|
3032
2725
|
const SwitchToggleClass = compose$1(
|
3033
2726
|
createStyleMixin$1({
|
3034
2727
|
mappings: {
|
3035
|
-
hostWidth: { ...host$
|
3036
|
-
hostDirection: { ...host$
|
2728
|
+
hostWidth: { ...host$p, property: 'width' },
|
2729
|
+
hostDirection: { ...host$p, property: 'direction' },
|
3037
2730
|
|
3038
2731
|
fontSize: [component, checkboxLabel, checkboxLabel],
|
3039
2732
|
fontFamily: [checkboxLabel, helperText$9, errorMessage$c],
|
@@ -3145,17 +2838,17 @@ const SwitchToggleClass = compose$1(
|
|
3145
2838
|
}
|
3146
2839
|
`,
|
3147
2840
|
excludeAttrsSync: ['label', 'tabindex'],
|
3148
|
-
componentName: componentName$
|
2841
|
+
componentName: componentName$19,
|
3149
2842
|
})
|
3150
2843
|
);
|
3151
2844
|
|
3152
|
-
customElements.define(componentName$
|
2845
|
+
customElements.define(componentName$19, SwitchToggleClass);
|
3153
2846
|
|
3154
|
-
const componentName$
|
2847
|
+
const componentName$18 = getComponentName$1('loader-linear');
|
3155
2848
|
|
3156
|
-
class RawLoaderLinear extends createBaseClass$1({ componentName: componentName$
|
2849
|
+
class RawLoaderLinear extends createBaseClass$1({ componentName: componentName$18, baseSelector: ':host > div' }) {
|
3157
2850
|
static get componentName() {
|
3158
|
-
return componentName$
|
2851
|
+
return componentName$18;
|
3159
2852
|
}
|
3160
2853
|
|
3161
2854
|
constructor() {
|
@@ -3195,18 +2888,18 @@ const selectors$2 = {
|
|
3195
2888
|
host: { selector: () => ':host' },
|
3196
2889
|
};
|
3197
2890
|
|
3198
|
-
const { after: after$1, host: host$
|
2891
|
+
const { after: after$1, host: host$o } = selectors$2;
|
3199
2892
|
|
3200
2893
|
const LoaderLinearClass = compose$1(
|
3201
2894
|
createStyleMixin$1({
|
3202
2895
|
mappings: {
|
3203
2896
|
hostDisplay: {},
|
3204
|
-
hostWidth: { ...host$
|
2897
|
+
hostWidth: { ...host$o, property: 'width' },
|
3205
2898
|
barHeight: [{ property: 'height' }, { ...after$1, property: 'height' }],
|
3206
2899
|
barBorderRadius: [{ property: 'border-radius' }, { ...after$1, property: 'border-radius' }],
|
3207
2900
|
verticalPadding: [
|
3208
|
-
{ ...host$
|
3209
|
-
{ ...host$
|
2901
|
+
{ ...host$o, property: 'padding-top' },
|
2902
|
+
{ ...host$o, property: 'padding-bottom' },
|
3210
2903
|
],
|
3211
2904
|
barBackgroundColor: { property: 'background-color' },
|
3212
2905
|
barColor: { ...after$1, property: 'background-color' },
|
@@ -3220,11 +2913,11 @@ const LoaderLinearClass = compose$1(
|
|
3220
2913
|
componentNameValidationMixin$1
|
3221
2914
|
)(RawLoaderLinear);
|
3222
2915
|
|
3223
|
-
customElements.define(componentName$
|
2916
|
+
customElements.define(componentName$18, LoaderLinearClass);
|
3224
2917
|
|
3225
|
-
const componentName$
|
2918
|
+
const componentName$17 = getComponentName$1('loader-radial');
|
3226
2919
|
|
3227
|
-
class RawLoaderRadial extends createBaseClass$1({ componentName: componentName$
|
2920
|
+
class RawLoaderRadial extends createBaseClass$1({ componentName: componentName$17, baseSelector: ':host > div' }) {
|
3228
2921
|
constructor() {
|
3229
2922
|
super();
|
3230
2923
|
|
@@ -3272,11 +2965,11 @@ const LoaderRadialClass = compose$1(
|
|
3272
2965
|
componentNameValidationMixin$1
|
3273
2966
|
)(RawLoaderRadial);
|
3274
2967
|
|
3275
|
-
customElements.define(componentName$
|
2968
|
+
customElements.define(componentName$17, LoaderRadialClass);
|
3276
2969
|
|
3277
|
-
const componentName$
|
2970
|
+
const componentName$16 = getComponentName$1('container');
|
3278
2971
|
|
3279
|
-
class RawContainer extends createBaseClass$1({ componentName: componentName$
|
2972
|
+
class RawContainer extends createBaseClass$1({ componentName: componentName$16, baseSelector: 'slot' }) {
|
3280
2973
|
constructor() {
|
3281
2974
|
super();
|
3282
2975
|
|
@@ -3339,7 +3032,7 @@ const ContainerClass = compose$1(
|
|
3339
3032
|
componentNameValidationMixin$1
|
3340
3033
|
)(RawContainer);
|
3341
3034
|
|
3342
|
-
customElements.define(componentName$
|
3035
|
+
customElements.define(componentName$16, ContainerClass);
|
3343
3036
|
|
3344
3037
|
const createCssVar = (varName, fallback) => `var(${varName}${fallback ? `, ${fallback}` : ''})`;
|
3345
3038
|
|
@@ -4512,6 +4205,9 @@ const composedProxyInputMixin = (proxyInputMixinConfig) =>
|
|
4512
4205
|
const DISPLAY_NAME_SEPARATOR = '_';
|
4513
4206
|
const PORTAL_THEME_PREFIX = '@';
|
4514
4207
|
|
4208
|
+
|
4209
|
+
const sanitizeSelector = (selector) => selector.replace(/[^\w\s]/gi, '');
|
4210
|
+
|
4515
4211
|
const withWaitForShadowRoot = (getRootElementFn) => async (that) => {
|
4516
4212
|
const ele = await getRootElementFn(that);
|
4517
4213
|
|
@@ -4542,7 +4238,7 @@ const withWaitForShadowRoot = (getRootElementFn) => async (that) => {
|
|
4542
4238
|
const portalMixin =
|
4543
4239
|
({ name, selector, mappings = {}, forward: { attributes = [], include = true } = {} }) =>
|
4544
4240
|
(superclass) => {
|
4545
|
-
const eleDisplayName = name;
|
4241
|
+
const eleDisplayName = name || sanitizeSelector(selector);
|
4546
4242
|
|
4547
4243
|
const BaseClass = createStyleMixin({
|
4548
4244
|
mappings,
|
@@ -4565,9 +4261,14 @@ const portalMixin =
|
|
4565
4261
|
// we cannot use "this" before calling "super"
|
4566
4262
|
const getRootElement = async (that) => {
|
4567
4263
|
const baseEle = (that.shadowRoot || that).querySelector(that.baseSelector);
|
4568
|
-
{
|
4264
|
+
if (!selector) {
|
4569
4265
|
return baseEle;
|
4570
4266
|
}
|
4267
|
+
|
4268
|
+
// in case we have a selector, we should first wait for the base element shadow root
|
4269
|
+
// and then look for the internal element
|
4270
|
+
const baseEleShadowRoot = await withWaitForShadowRoot(() => baseEle)(that);
|
4271
|
+
return baseEleShadowRoot.querySelector(selector);
|
4571
4272
|
};
|
4572
4273
|
|
4573
4274
|
const getPortalElement = withWaitForShadowRoot(getRootElement);
|
@@ -4673,7 +4374,7 @@ const connectorMixin =
|
|
4673
4374
|
}
|
4674
4375
|
};
|
4675
4376
|
|
4676
|
-
const componentName$
|
4377
|
+
const componentName$15 = getComponentName('combo-box');
|
4677
4378
|
|
4678
4379
|
const ComboBoxMixin = (superclass) =>
|
4679
4380
|
class ComboBoxMixinClass extends superclass {
|
@@ -5025,13 +4726,13 @@ const ComboBoxMixin = (superclass) =>
|
|
5025
4726
|
};
|
5026
4727
|
|
5027
4728
|
const {
|
5028
|
-
host: host$
|
4729
|
+
host: host$n,
|
5029
4730
|
inputField: inputField$6,
|
5030
4731
|
inputElement: inputElement$3,
|
5031
4732
|
placeholder: placeholder$3,
|
5032
4733
|
toggle: toggle$1,
|
5033
4734
|
clearButton: clearButton$1,
|
5034
|
-
label: label$
|
4735
|
+
label: label$a,
|
5035
4736
|
requiredIndicator: requiredIndicator$9,
|
5036
4737
|
helperText: helperText$8,
|
5037
4738
|
errorMessage: errorMessage$b,
|
@@ -5057,15 +4758,15 @@ const {
|
|
5057
4758
|
const ComboBoxClass = compose(
|
5058
4759
|
createStyleMixin({
|
5059
4760
|
mappings: {
|
5060
|
-
hostWidth: { ...host$
|
5061
|
-
hostDirection: { ...host$
|
4761
|
+
hostWidth: { ...host$n, property: 'width' },
|
4762
|
+
hostDirection: { ...host$n, property: 'direction' },
|
5062
4763
|
// we apply font-size also on the host so we can set its width with em
|
5063
|
-
fontSize: [{}, host$
|
5064
|
-
fontFamily: [label$
|
5065
|
-
labelFontSize: { ...label$
|
5066
|
-
labelFontWeight: { ...label$
|
4764
|
+
fontSize: [{}, host$n],
|
4765
|
+
fontFamily: [label$a, placeholder$3, inputField$6, helperText$8, errorMessage$b],
|
4766
|
+
labelFontSize: { ...label$a, property: 'font-size' },
|
4767
|
+
labelFontWeight: { ...label$a, property: 'font-weight' },
|
5067
4768
|
labelTextColor: [
|
5068
|
-
{ ...label$
|
4769
|
+
{ ...label$a, property: 'color' },
|
5069
4770
|
{ ...requiredIndicator$9, property: 'color' },
|
5070
4771
|
],
|
5071
4772
|
errorMessageTextColor: { ...errorMessage$b, property: 'color' },
|
@@ -5117,15 +4818,15 @@ const ComboBoxClass = compose(
|
|
5117
4818
|
{ ...inputElement$3, property: 'padding-right' },
|
5118
4819
|
],
|
5119
4820
|
|
5120
|
-
labelPosition: { ...label$
|
5121
|
-
labelTopPosition: { ...label$
|
4821
|
+
labelPosition: { ...label$a, property: 'position' },
|
4822
|
+
labelTopPosition: { ...label$a, property: 'top' },
|
5122
4823
|
labelHorizontalPosition: [
|
5123
|
-
{ ...label$
|
5124
|
-
{ ...label$
|
4824
|
+
{ ...label$a, property: 'left' },
|
4825
|
+
{ ...label$a, property: 'right' },
|
5125
4826
|
],
|
5126
|
-
inputTransformY: { ...label$
|
5127
|
-
inputTransition: { ...label$
|
5128
|
-
marginInlineStart: { ...label$
|
4827
|
+
inputTransformY: { ...label$a, property: 'transform' },
|
4828
|
+
inputTransition: { ...label$a, property: 'transition' },
|
4829
|
+
marginInlineStart: { ...label$a, property: 'margin-inline-start' },
|
5129
4830
|
placeholderOpacity: { ...placeholder$3, property: 'opacity' },
|
5130
4831
|
inputVerticalAlignment: { ...inputField$6, property: 'align-items' },
|
5131
4832
|
valueInputHeight: { ...inputElement$3, property: 'height' },
|
@@ -5321,12 +5022,321 @@ const ComboBoxClass = compose(
|
|
5321
5022
|
// and reset items to an empty array, and opening the list box with no items
|
5322
5023
|
// to display.
|
5323
5024
|
excludeAttrsSync: ['tabindex', 'size', 'data', 'loading'],
|
5324
|
-
componentName: componentName$
|
5025
|
+
componentName: componentName$15,
|
5325
5026
|
includeForwardProps: ['items', 'renderer', 'selectedItem'],
|
5326
5027
|
}),
|
5327
5028
|
);
|
5328
5029
|
|
5329
|
-
customElements.define(componentName$
|
5030
|
+
customElements.define(componentName$15, ComboBoxClass);
|
5031
|
+
|
5032
|
+
const getFileExtension = (path) => {
|
5033
|
+
const match = path.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);
|
5034
|
+
return match ? match[1] : null;
|
5035
|
+
};
|
5036
|
+
|
5037
|
+
const base64Prefix = 'data:image/svg+xml;base64,';
|
5038
|
+
|
5039
|
+
const isBase64Svg = (src) => src.startsWith(base64Prefix);
|
5040
|
+
|
5041
|
+
const createImgEle = (src) => {
|
5042
|
+
const ele = document.createElement('img');
|
5043
|
+
ele.setAttribute('src', src);
|
5044
|
+
return ele;
|
5045
|
+
};
|
5046
|
+
|
5047
|
+
const createSvgEle = (text) => {
|
5048
|
+
// we want to purify the SVG to avoid XSS attacks
|
5049
|
+
const clean = DOMPurify.sanitize(text, { USE_PROFILES: { svg: true, svgFilters: true } });
|
5050
|
+
|
5051
|
+
const parser = new DOMParser();
|
5052
|
+
const ele = parser.parseFromString(clean, 'image/svg+xml').querySelector('svg');
|
5053
|
+
return ele;
|
5054
|
+
};
|
5055
|
+
|
5056
|
+
const createIcon = async (src) => {
|
5057
|
+
try {
|
5058
|
+
let ele;
|
5059
|
+
if (isBase64Svg(src)) {
|
5060
|
+
// handle base64 source
|
5061
|
+
const svgXml = atob(src.slice(base64Prefix.length));
|
5062
|
+
ele = createSvgEle(svgXml);
|
5063
|
+
} else if (getFileExtension(src) === 'svg') {
|
5064
|
+
// handle urls
|
5065
|
+
const fetchedSrc = await fetch(src);
|
5066
|
+
const text = await fetchedSrc.text();
|
5067
|
+
ele = createSvgEle(text);
|
5068
|
+
} else {
|
5069
|
+
// handle binary
|
5070
|
+
ele = createImgEle(src);
|
5071
|
+
}
|
5072
|
+
|
5073
|
+
ele.style.setProperty('max-width', '100%');
|
5074
|
+
ele.style.setProperty('max-height', '100%');
|
5075
|
+
|
5076
|
+
return ele;
|
5077
|
+
} catch {
|
5078
|
+
return null;
|
5079
|
+
}
|
5080
|
+
};
|
5081
|
+
|
5082
|
+
/* eslint-disable no-use-before-define */
|
5083
|
+
|
5084
|
+
const componentName$14 = getComponentName('icon');
|
5085
|
+
|
5086
|
+
class RawIcon extends createBaseClass({ componentName: componentName$14, baseSelector: 'slot' }) {
|
5087
|
+
static get observedAttributes() {
|
5088
|
+
return ['src'];
|
5089
|
+
}
|
5090
|
+
|
5091
|
+
#icon;
|
5092
|
+
|
5093
|
+
constructor() {
|
5094
|
+
super();
|
5095
|
+
|
5096
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
5097
|
+
<slot></slot>
|
5098
|
+
`;
|
5099
|
+
|
5100
|
+
injectStyle(
|
5101
|
+
`
|
5102
|
+
:host > slot {
|
5103
|
+
box-sizing: border-box;
|
5104
|
+
width: 100%;
|
5105
|
+
height: 100%;
|
5106
|
+
display: flex;
|
5107
|
+
overflow: hidden;
|
5108
|
+
}
|
5109
|
+
:host {
|
5110
|
+
display: inline-block;
|
5111
|
+
}
|
5112
|
+
`,
|
5113
|
+
this
|
5114
|
+
);
|
5115
|
+
}
|
5116
|
+
|
5117
|
+
init() {
|
5118
|
+
super.init?.();
|
5119
|
+
this.toggleVisibility(this.src);
|
5120
|
+
}
|
5121
|
+
|
5122
|
+
toggleVisibility(isVisible) {
|
5123
|
+
this.style.display = isVisible ? '' : 'none';
|
5124
|
+
}
|
5125
|
+
|
5126
|
+
get src() {
|
5127
|
+
return this.getAttribute('src');
|
5128
|
+
}
|
5129
|
+
|
5130
|
+
// in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes
|
5131
|
+
// with the value from the `st-fill` attribute
|
5132
|
+
// eslint-disable-next-line class-methods-use-this
|
5133
|
+
updateFillColor(node) {
|
5134
|
+
// set fill to root node and all its relevant selectors
|
5135
|
+
const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];
|
5136
|
+
|
5137
|
+
elementsToReplace.forEach((ele) => {
|
5138
|
+
ele.setAttribute(
|
5139
|
+
'fill',
|
5140
|
+
`var(${IconClass.cssVarList.fill}, ${ele.getAttribute('fill') || "''"})`
|
5141
|
+
);
|
5142
|
+
});
|
5143
|
+
}
|
5144
|
+
|
5145
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
5146
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
5147
|
+
|
5148
|
+
if (oldValue === newValue) return;
|
5149
|
+
|
5150
|
+
if (attrName === 'src') {
|
5151
|
+
this.toggleVisibility(newValue);
|
5152
|
+
|
5153
|
+
createIcon(this.src).then((res) => {
|
5154
|
+
this.innerHTML = '';
|
5155
|
+
if (res) {
|
5156
|
+
const clonedNode = res.cloneNode(true);
|
5157
|
+
this.updateFillColor(clonedNode);
|
5158
|
+
this.appendChild(clonedNode);
|
5159
|
+
}
|
5160
|
+
});
|
5161
|
+
}
|
5162
|
+
}
|
5163
|
+
}
|
5164
|
+
|
5165
|
+
const IconClass = compose(
|
5166
|
+
createStyleMixin({
|
5167
|
+
mappings: {
|
5168
|
+
fill: {},
|
5169
|
+
},
|
5170
|
+
}),
|
5171
|
+
draggableMixin,
|
5172
|
+
componentNameValidationMixin
|
5173
|
+
)(RawIcon);
|
5174
|
+
|
5175
|
+
const clickableMixin = (superclass) =>
|
5176
|
+
class ClickableMixinClass extends superclass {
|
5177
|
+
get isLoading() {
|
5178
|
+
return this.getAttribute('loading') === 'true';
|
5179
|
+
}
|
5180
|
+
|
5181
|
+
click() {
|
5182
|
+
this.isLoading || super.click();
|
5183
|
+
}
|
5184
|
+
};
|
5185
|
+
|
5186
|
+
const componentName$13 = getComponentName('button');
|
5187
|
+
|
5188
|
+
const resetStyles = `
|
5189
|
+
:host {
|
5190
|
+
display: inline-block;
|
5191
|
+
box-sizing: border-box;
|
5192
|
+
}
|
5193
|
+
vaadin-button::before,
|
5194
|
+
vaadin-button::after {
|
5195
|
+
opacity: 0;
|
5196
|
+
}
|
5197
|
+
vaadin-button {
|
5198
|
+
margin: 0;
|
5199
|
+
min-width: 0;
|
5200
|
+
width: 100%;
|
5201
|
+
height: auto;
|
5202
|
+
box-shadow: none;
|
5203
|
+
}
|
5204
|
+
vaadin-button::part(label) {
|
5205
|
+
padding: 0;
|
5206
|
+
width: 100%;
|
5207
|
+
}
|
5208
|
+
vaadin-button::part(prefix) {
|
5209
|
+
margin-left: 0;
|
5210
|
+
margin-right: 0;
|
5211
|
+
}
|
5212
|
+
`;
|
5213
|
+
|
5214
|
+
const iconStyles = `
|
5215
|
+
vaadin-button::part(prefix),
|
5216
|
+
vaadin-button::part(label) {
|
5217
|
+
display: flex;
|
5218
|
+
align-items: center;
|
5219
|
+
}
|
5220
|
+
`;
|
5221
|
+
|
5222
|
+
const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
|
5223
|
+
|
5224
|
+
const { host: host$m, label: label$9, slottedIcon } = {
|
5225
|
+
host: { selector: () => ':host' },
|
5226
|
+
label: { selector: '::part(label)' },
|
5227
|
+
slottedIcon: { selector: () => '::slotted(descope-icon)' },
|
5228
|
+
};
|
5229
|
+
|
5230
|
+
let loadingIndicatorStyles;
|
5231
|
+
|
5232
|
+
const ButtonClass = compose(
|
5233
|
+
createStyleMixin({
|
5234
|
+
mappings: {
|
5235
|
+
hostWidth: { property: 'width' },
|
5236
|
+
hostHeight: { property: 'height' },
|
5237
|
+
hostDirection: { ...host$m, property: 'direction' },
|
5238
|
+
fontSize: {},
|
5239
|
+
fontFamily: {},
|
5240
|
+
|
5241
|
+
cursor: {},
|
5242
|
+
backgroundColor: {},
|
5243
|
+
|
5244
|
+
outlineOffset: {},
|
5245
|
+
outlineColor: {},
|
5246
|
+
outlineStyle: {},
|
5247
|
+
outlineWidth: {},
|
5248
|
+
|
5249
|
+
borderRadius: {},
|
5250
|
+
borderColor: {},
|
5251
|
+
borderStyle: {},
|
5252
|
+
borderWidth: {},
|
5253
|
+
|
5254
|
+
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
5255
|
+
horizontalPadding: [
|
5256
|
+
{ property: 'padding-right', fallback: '0.875em' },
|
5257
|
+
{ property: 'padding-left', fallback: '0.875em' },
|
5258
|
+
],
|
5259
|
+
|
5260
|
+
labelTextColor: { property: 'color' },
|
5261
|
+
iconColor: {
|
5262
|
+
selector: () => `::slotted(*)`,
|
5263
|
+
property: IconClass.cssVarList.fill,
|
5264
|
+
},
|
5265
|
+
labelTextDecoration: { ...label$9, property: 'text-decoration' },
|
5266
|
+
labelSpacing: { ...label$9, property: 'gap' },
|
5267
|
+
textAlign: { ...label$9, property: 'justify-content', fallback: 'center' },
|
5268
|
+
|
5269
|
+
iconSize: [
|
5270
|
+
{ ...slottedIcon, property: 'width' },
|
5271
|
+
{ ...slottedIcon, property: 'height' },
|
5272
|
+
],
|
5273
|
+
},
|
5274
|
+
}),
|
5275
|
+
clickableMixin,
|
5276
|
+
draggableMixin,
|
5277
|
+
componentNameValidationMixin
|
5278
|
+
)(
|
5279
|
+
createProxy({
|
5280
|
+
slots: ['', 'prefix', 'label', 'suffix'],
|
5281
|
+
wrappedEleName: 'vaadin-button',
|
5282
|
+
style: () => `
|
5283
|
+
${resetStyles}
|
5284
|
+
${iconStyles}
|
5285
|
+
${loadingIndicatorStyles}
|
5286
|
+
${editorOverrides}
|
5287
|
+
:host {
|
5288
|
+
padding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));
|
5289
|
+
}
|
5290
|
+
:host([full-width="true"]) {
|
5291
|
+
width: var(${ButtonClass.cssVarList.hostWidth});
|
5292
|
+
}
|
5293
|
+
vaadin-button {
|
5294
|
+
height: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));
|
5295
|
+
}
|
5296
|
+
[square="true"]:not([full-width="true"]) {
|
5297
|
+
width: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));
|
5298
|
+
padding: 0;
|
5299
|
+
}
|
5300
|
+
`,
|
5301
|
+
excludeAttrsSync: ['tabindex'],
|
5302
|
+
componentName: componentName$13,
|
5303
|
+
})
|
5304
|
+
);
|
5305
|
+
|
5306
|
+
const { color, fontSize } = ButtonClass.cssVarList;
|
5307
|
+
loadingIndicatorStyles = `
|
5308
|
+
@keyframes spin {
|
5309
|
+
0% { -webkit-transform: rotate(0deg); }
|
5310
|
+
100% { -webkit-transform: rotate(360deg); }
|
5311
|
+
}
|
5312
|
+
:host([loading="true"]) ::before {
|
5313
|
+
animation: spin 2s linear infinite;
|
5314
|
+
position: absolute;
|
5315
|
+
content: '';
|
5316
|
+
z-index: 1;
|
5317
|
+
box-sizing: border-box;
|
5318
|
+
border-radius: 50%;
|
5319
|
+
border-bottom-color: transparent;
|
5320
|
+
border-left-color: transparent;
|
5321
|
+
border-style: solid;
|
5322
|
+
color: var(${color});
|
5323
|
+
top: calc(50% - (var(${fontSize}) / 2));
|
5324
|
+
left: calc(50% - (var(${fontSize}) / 2));
|
5325
|
+
border-width: calc(var(${fontSize}) / 10);
|
5326
|
+
width: var(${fontSize});
|
5327
|
+
height: var(${fontSize});
|
5328
|
+
}
|
5329
|
+
:host([disabled="true"]),
|
5330
|
+
:host([loading="true"]) {
|
5331
|
+
pointer-events: none;
|
5332
|
+
}
|
5333
|
+
:host([loading="true"])::part(prefix),
|
5334
|
+
:host([loading="true"])::part(label) {
|
5335
|
+
visibility: hidden;
|
5336
|
+
}
|
5337
|
+
`;
|
5338
|
+
|
5339
|
+
customElements.define(componentName$13, ButtonClass);
|
5330
5340
|
|
5331
5341
|
const SUPPORTED_FORMATS = ['MM/DD/YYYY', 'DD/MM/YYYY', 'YYYY/MM/DD'];
|
5332
5342
|
|
@@ -5644,7 +5654,7 @@ const nextMonth = (timestamp) => {
|
|
5644
5654
|
|
5645
5655
|
const componentName$12 = getComponentName$1('calendar');
|
5646
5656
|
|
5647
|
-
const observedAttrs$
|
5657
|
+
const observedAttrs$5 = [
|
5648
5658
|
'initial-value',
|
5649
5659
|
'initial-year',
|
5650
5660
|
'initial-month',
|
@@ -5663,7 +5673,7 @@ const BaseInputClass$b = createBaseInputClass$1({ componentName: componentName$1
|
|
5663
5673
|
|
5664
5674
|
class RawCalendar extends BaseInputClass$b {
|
5665
5675
|
static get observedAttributes() {
|
5666
|
-
return [].concat(BaseInputClass$b.observedAttributes || [], observedAttrs$
|
5676
|
+
return [].concat(BaseInputClass$b.observedAttributes || [], observedAttrs$5, calendarUiAttrs);
|
5667
5677
|
}
|
5668
5678
|
|
5669
5679
|
// preview state timestamp
|
@@ -6436,12 +6446,12 @@ var textFieldMappings = {
|
|
6436
6446
|
|
6437
6447
|
const componentName$11 = getComponentName$1('text-field');
|
6438
6448
|
|
6439
|
-
const observedAttrs$
|
6449
|
+
const observedAttrs$4 = ['type', 'label-type', 'copy-to-clipboard'];
|
6440
6450
|
|
6441
6451
|
const customMixin$e = (superclass) =>
|
6442
6452
|
class TextFieldClass extends superclass {
|
6443
6453
|
static get observedAttributes() {
|
6444
|
-
return observedAttrs$
|
6454
|
+
return observedAttrs$4.concat(superclass.observedAttributes || []);
|
6445
6455
|
}
|
6446
6456
|
|
6447
6457
|
icon;
|
@@ -6702,7 +6712,7 @@ const BaseInputClass$a = createBaseInputClass$1({ componentName: componentName$1
|
|
6702
6712
|
|
6703
6713
|
const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly'];
|
6704
6714
|
const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
|
6705
|
-
const observedAttrs$
|
6715
|
+
const observedAttrs$3 = [...dateFieldAttrs, ...calendarAttrs];
|
6706
6716
|
|
6707
6717
|
class RawDateFieldClass extends BaseInputClass$a {
|
6708
6718
|
timestamp = '';
|
@@ -6718,7 +6728,7 @@ class RawDateFieldClass extends BaseInputClass$a {
|
|
6718
6728
|
];
|
6719
6729
|
|
6720
6730
|
static get observedAttributes() {
|
6721
|
-
return [].concat(BaseInputClass$a.observedAttributes || [], observedAttrs$
|
6731
|
+
return [].concat(BaseInputClass$a.observedAttributes || [], observedAttrs$3);
|
6722
6732
|
}
|
6723
6733
|
|
6724
6734
|
constructor() {
|
@@ -11049,6 +11059,7 @@ const {
|
|
11049
11059
|
} = {
|
11050
11060
|
host: { selector: () => ':host' },
|
11051
11061
|
label: { selector: '::part(label)' },
|
11062
|
+
placeholder: { selector: '> input:placeholder-shown' },
|
11052
11063
|
inputElement: { selector: 'input' },
|
11053
11064
|
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
11054
11065
|
inputField: { selector: () => 'vaadin-text-field::part(input-field)' },
|
@@ -14602,14 +14613,19 @@ customElements.define(componentName$s, BadgeClass);
|
|
14602
14613
|
|
14603
14614
|
const componentName$r = getComponentName$1('modal');
|
14604
14615
|
|
14616
|
+
const observedAttrs$2 = ['opened'];
|
14617
|
+
|
14605
14618
|
const customMixin$7 = (superclass) =>
|
14606
14619
|
class ModalMixinClass extends superclass {
|
14620
|
+
static get observedAttributes() {
|
14621
|
+
return [].concat(superclass.observedAttributes || [], observedAttrs$2);
|
14622
|
+
}
|
14623
|
+
|
14607
14624
|
get opened() {
|
14608
14625
|
return this.getAttribute('opened') === 'true';
|
14609
14626
|
}
|
14610
14627
|
|
14611
14628
|
handleOpened() {
|
14612
|
-
forwardAttrs$1(this, this.baseElement, { includeAttrs: ['opened'] });
|
14613
14629
|
if (this.opened) {
|
14614
14630
|
this.style.display = '';
|
14615
14631
|
} else {
|
@@ -14617,6 +14633,14 @@ const customMixin$7 = (superclass) =>
|
|
14617
14633
|
}
|
14618
14634
|
}
|
14619
14635
|
|
14636
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
14637
|
+
super.attributeChangedCallback?.(name, oldValue, newValue);
|
14638
|
+
|
14639
|
+
if (name === 'opened') {
|
14640
|
+
this.handleOpened();
|
14641
|
+
}
|
14642
|
+
}
|
14643
|
+
|
14620
14644
|
init() {
|
14621
14645
|
super.init?.();
|
14622
14646
|
this.style.display = 'none';
|
@@ -14633,6 +14657,7 @@ const customMixin$7 = (superclass) =>
|
|
14633
14657
|
.appendChild(document.createElement('slot'));
|
14634
14658
|
|
14635
14659
|
this.#overrideOverlaySettings();
|
14660
|
+
forwardAttrs$1(this, this.baseElement, { includeAttrs: ['opened'] });
|
14636
14661
|
|
14637
14662
|
// we need to always open the modal in `opened=false`
|
14638
14663
|
// to prevent it from rendering outside the dialog
|
@@ -14940,8 +14965,6 @@ const NotificationClass = compose$1(
|
|
14940
14965
|
|
14941
14966
|
customElements.define(componentName$p, NotificationClass);
|
14942
14967
|
|
14943
|
-
customElements.define(componentName$1b, IconClass);
|
14944
|
-
|
14945
14968
|
const componentName$o = getComponentName$1('mappings-field-internal');
|
14946
14969
|
|
14947
14970
|
const BaseInputClass$4 = createBaseInputClass$1({ componentName: componentName$o, baseSelector: 'div' });
|
@@ -17226,6 +17249,8 @@ const ThirdPartyAppLogoClass = compose$1(
|
|
17226
17249
|
componentNameValidationMixin$1
|
17227
17250
|
)(RawThirdPartyAppLogoClass);
|
17228
17251
|
|
17252
|
+
customElements.define(componentName$14, IconClass);
|
17253
|
+
|
17229
17254
|
customElements.define(componentName$a, ThirdPartyAppLogoClass);
|
17230
17255
|
|
17231
17256
|
const componentName$9 = getComponentName$1('security-questions-setup');
|
@@ -18268,19 +18293,196 @@ const genColor = (color, theme) => {
|
|
18268
18293
|
return res;
|
18269
18294
|
};
|
18270
18295
|
|
18271
|
-
const genColors = (colors) => {
|
18272
|
-
return Object.keys(colors).reduce((acc, colorName) => {
|
18273
|
-
const currentColor = colors[colorName];
|
18274
|
-
|
18275
|
-
return Object.assign(acc, {
|
18276
|
-
[colorName]: genColor(currentColor),
|
18277
|
-
});
|
18278
|
-
}, {});
|
18296
|
+
const genColors = (colors) => {
|
18297
|
+
return Object.keys(colors).reduce((acc, colorName) => {
|
18298
|
+
const currentColor = colors[colorName];
|
18299
|
+
|
18300
|
+
return Object.assign(acc, {
|
18301
|
+
[colorName]: genColor(currentColor),
|
18302
|
+
});
|
18303
|
+
}, {});
|
18304
|
+
};
|
18305
|
+
|
18306
|
+
const direction$1 = 'ltr';
|
18307
|
+
|
18308
|
+
const colors$2 = genColors({
|
18309
|
+
surface: {
|
18310
|
+
main: '#ffffff',
|
18311
|
+
dark: '#636c74',
|
18312
|
+
light: '#cfd3d7',
|
18313
|
+
highlight: '#f4f5f6',
|
18314
|
+
contrast: '#181a1c',
|
18315
|
+
},
|
18316
|
+
primary: {
|
18317
|
+
main: '#006af5',
|
18318
|
+
dark: '#004094',
|
18319
|
+
light: '#71aeff',
|
18320
|
+
highlight: '#f0f6ff',
|
18321
|
+
contrast: '#ffffff',
|
18322
|
+
},
|
18323
|
+
secondary: {
|
18324
|
+
main: '#802ed6',
|
18325
|
+
dark: '#6410bc',
|
18326
|
+
light: '#be89f5',
|
18327
|
+
highlight: '#ede7f6',
|
18328
|
+
contrast: '#ffffff',
|
18329
|
+
},
|
18330
|
+
success: {
|
18331
|
+
main: '#008000',
|
18332
|
+
dark: '#005700',
|
18333
|
+
light: '#8bc38b',
|
18334
|
+
highlight: '#f5faf5',
|
18335
|
+
contrast: '#ffffff',
|
18336
|
+
},
|
18337
|
+
error: {
|
18338
|
+
main: '#e21d12',
|
18339
|
+
dark: '#b3170f',
|
18340
|
+
light: '#f4807a',
|
18341
|
+
highlight: '#fef1f1',
|
18342
|
+
contrast: '#ffffff',
|
18343
|
+
},
|
18344
|
+
});
|
18345
|
+
|
18346
|
+
const fonts$1 = {
|
18347
|
+
font1: {
|
18348
|
+
family: [
|
18349
|
+
'Roboto',
|
18350
|
+
'ui-sans-serif',
|
18351
|
+
'system-ui',
|
18352
|
+
'-apple-system',
|
18353
|
+
'BlinkMacSystemFont',
|
18354
|
+
'Segoe UI',
|
18355
|
+
'Helvetica Neue',
|
18356
|
+
'Arial',
|
18357
|
+
'Noto Sans',
|
18358
|
+
'sans-serif',
|
18359
|
+
'Apple Color Emoji',
|
18360
|
+
'Segoe UI Emoji',
|
18361
|
+
'Segoe UI Symbol',
|
18362
|
+
'Noto Color Emoji',
|
18363
|
+
],
|
18364
|
+
label: 'Roboto',
|
18365
|
+
url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
|
18366
|
+
},
|
18367
|
+
font2: {
|
18368
|
+
family: [
|
18369
|
+
'ui-sans-serif',
|
18370
|
+
'system-ui',
|
18371
|
+
'-apple-system',
|
18372
|
+
'BlinkMacSystemFont',
|
18373
|
+
'Segoe UI',
|
18374
|
+
'Roboto',
|
18375
|
+
'Helvetica Neue',
|
18376
|
+
'Arial',
|
18377
|
+
'Noto Sans',
|
18378
|
+
'sans-serif',
|
18379
|
+
'Apple Color Emoji',
|
18380
|
+
'Segoe UI Emoji',
|
18381
|
+
'Segoe UI Symbol',
|
18382
|
+
'Noto Color Emoji',
|
18383
|
+
],
|
18384
|
+
label: 'Sans Serif',
|
18385
|
+
},
|
18386
|
+
};
|
18387
|
+
|
18388
|
+
const fontsRef$1 = getThemeRefs({ fonts: fonts$1 }).fonts;
|
18389
|
+
|
18390
|
+
const typography$1 = {
|
18391
|
+
h1: {
|
18392
|
+
font: fontsRef$1.font1.family,
|
18393
|
+
weight: '900',
|
18394
|
+
size: '48px',
|
18395
|
+
},
|
18396
|
+
h2: {
|
18397
|
+
font: fontsRef$1.font1.family,
|
18398
|
+
weight: '800',
|
18399
|
+
size: '38px',
|
18400
|
+
},
|
18401
|
+
h3: {
|
18402
|
+
font: fontsRef$1.font1.family,
|
18403
|
+
weight: '600',
|
18404
|
+
size: '28px',
|
18405
|
+
},
|
18406
|
+
subtitle1: {
|
18407
|
+
font: fontsRef$1.font2.family,
|
18408
|
+
weight: '500',
|
18409
|
+
size: '22px',
|
18410
|
+
},
|
18411
|
+
subtitle2: {
|
18412
|
+
font: fontsRef$1.font2.family,
|
18413
|
+
weight: '400',
|
18414
|
+
size: '20px',
|
18415
|
+
},
|
18416
|
+
body1: {
|
18417
|
+
font: fontsRef$1.font1.family,
|
18418
|
+
weight: '400',
|
18419
|
+
size: '16px',
|
18420
|
+
},
|
18421
|
+
body2: {
|
18422
|
+
font: fontsRef$1.font1.family,
|
18423
|
+
weight: '400',
|
18424
|
+
size: '14px',
|
18425
|
+
},
|
18426
|
+
};
|
18427
|
+
|
18428
|
+
const spacing$1 = {
|
18429
|
+
xs: '2px',
|
18430
|
+
sm: '4px',
|
18431
|
+
md: '8px',
|
18432
|
+
lg: '16px',
|
18433
|
+
xl: '32px',
|
18434
|
+
};
|
18435
|
+
|
18436
|
+
const border$1 = {
|
18437
|
+
xs: '1px',
|
18438
|
+
sm: '2px',
|
18439
|
+
md: '3px',
|
18440
|
+
lg: '4px',
|
18441
|
+
xl: '5px',
|
18442
|
+
};
|
18443
|
+
|
18444
|
+
const radius$1 = {
|
18445
|
+
xs: '5px',
|
18446
|
+
sm: '10px',
|
18447
|
+
md: '15px',
|
18448
|
+
lg: '20px',
|
18449
|
+
xl: '25px',
|
18450
|
+
'2xl': '30px',
|
18451
|
+
'3xl': '35px',
|
18452
|
+
};
|
18453
|
+
|
18454
|
+
const shadow$2 = {
|
18455
|
+
wide: {
|
18456
|
+
sm: '0 2px 3px -0.5px',
|
18457
|
+
md: '0 4px 6px -1px',
|
18458
|
+
lg: '0 10px 15px -3px',
|
18459
|
+
xl: '0 20px 25px -5px',
|
18460
|
+
'2xl': '0 25px 50px -12px',
|
18461
|
+
},
|
18462
|
+
narrow: {
|
18463
|
+
sm: '0 1px 2px -1px',
|
18464
|
+
md: '0 2px 4px -2px',
|
18465
|
+
lg: '0 4px 6px -4px',
|
18466
|
+
xl: '0 8px 10px -6px',
|
18467
|
+
'2xl': '0 16px 16px -8px',
|
18468
|
+
},
|
18469
|
+
};
|
18470
|
+
|
18471
|
+
const globals$1 = {
|
18472
|
+
colors: colors$2,
|
18473
|
+
typography: typography$1,
|
18474
|
+
spacing: spacing$1,
|
18475
|
+
border: border$1,
|
18476
|
+
radius: radius$1,
|
18477
|
+
shadow: shadow$2,
|
18478
|
+
fonts: fonts$1,
|
18479
|
+
direction: direction$1,
|
18279
18480
|
};
|
18481
|
+
const vars$X = getThemeVars(globals$1);
|
18280
18482
|
|
18281
|
-
const direction
|
18483
|
+
const direction = 'ltr';
|
18282
18484
|
|
18283
|
-
const colors$
|
18485
|
+
const colors$1 = genColors$1({
|
18284
18486
|
surface: {
|
18285
18487
|
main: '#ffffff',
|
18286
18488
|
dark: '#636c74',
|
@@ -18318,7 +18520,7 @@ const colors$2 = genColors({
|
|
18318
18520
|
},
|
18319
18521
|
});
|
18320
18522
|
|
18321
|
-
const fonts
|
18523
|
+
const fonts = {
|
18322
18524
|
font1: {
|
18323
18525
|
family: [
|
18324
18526
|
'Roboto',
|
@@ -18360,47 +18562,47 @@ const fonts$1 = {
|
|
18360
18562
|
},
|
18361
18563
|
};
|
18362
18564
|
|
18363
|
-
const fontsRef
|
18565
|
+
const fontsRef = getThemeRefs$1({ fonts }).fonts;
|
18364
18566
|
|
18365
|
-
const typography
|
18567
|
+
const typography = {
|
18366
18568
|
h1: {
|
18367
|
-
font: fontsRef
|
18569
|
+
font: fontsRef.font1.family,
|
18368
18570
|
weight: '900',
|
18369
18571
|
size: '48px',
|
18370
18572
|
},
|
18371
18573
|
h2: {
|
18372
|
-
font: fontsRef
|
18574
|
+
font: fontsRef.font1.family,
|
18373
18575
|
weight: '800',
|
18374
18576
|
size: '38px',
|
18375
18577
|
},
|
18376
18578
|
h3: {
|
18377
|
-
font: fontsRef
|
18579
|
+
font: fontsRef.font1.family,
|
18378
18580
|
weight: '600',
|
18379
18581
|
size: '28px',
|
18380
18582
|
},
|
18381
18583
|
subtitle1: {
|
18382
|
-
font: fontsRef
|
18584
|
+
font: fontsRef.font2.family,
|
18383
18585
|
weight: '500',
|
18384
18586
|
size: '22px',
|
18385
18587
|
},
|
18386
18588
|
subtitle2: {
|
18387
|
-
font: fontsRef
|
18589
|
+
font: fontsRef.font2.family,
|
18388
18590
|
weight: '400',
|
18389
18591
|
size: '20px',
|
18390
18592
|
},
|
18391
18593
|
body1: {
|
18392
|
-
font: fontsRef
|
18594
|
+
font: fontsRef.font1.family,
|
18393
18595
|
weight: '400',
|
18394
18596
|
size: '16px',
|
18395
18597
|
},
|
18396
18598
|
body2: {
|
18397
|
-
font: fontsRef
|
18599
|
+
font: fontsRef.font1.family,
|
18398
18600
|
weight: '400',
|
18399
18601
|
size: '14px',
|
18400
18602
|
},
|
18401
18603
|
};
|
18402
18604
|
|
18403
|
-
const spacing
|
18605
|
+
const spacing = {
|
18404
18606
|
xs: '2px',
|
18405
18607
|
sm: '4px',
|
18406
18608
|
md: '8px',
|
@@ -18408,7 +18610,7 @@ const spacing$1 = {
|
|
18408
18610
|
xl: '32px',
|
18409
18611
|
};
|
18410
18612
|
|
18411
|
-
const border
|
18613
|
+
const border = {
|
18412
18614
|
xs: '1px',
|
18413
18615
|
sm: '2px',
|
18414
18616
|
md: '3px',
|
@@ -18416,7 +18618,7 @@ const border$1 = {
|
|
18416
18618
|
xl: '5px',
|
18417
18619
|
};
|
18418
18620
|
|
18419
|
-
const radius
|
18621
|
+
const radius = {
|
18420
18622
|
xs: '5px',
|
18421
18623
|
sm: '10px',
|
18422
18624
|
md: '15px',
|
@@ -18426,7 +18628,7 @@ const radius$1 = {
|
|
18426
18628
|
'3xl': '35px',
|
18427
18629
|
};
|
18428
18630
|
|
18429
|
-
const shadow$
|
18631
|
+
const shadow$1 = {
|
18430
18632
|
wide: {
|
18431
18633
|
sm: '0 2px 3px -0.5px',
|
18432
18634
|
md: '0 4px 6px -1px',
|
@@ -18443,19 +18645,19 @@ const shadow$2 = {
|
|
18443
18645
|
},
|
18444
18646
|
};
|
18445
18647
|
|
18446
|
-
const globals
|
18447
|
-
colors: colors$
|
18448
|
-
typography
|
18449
|
-
spacing
|
18450
|
-
border
|
18451
|
-
radius
|
18452
|
-
shadow: shadow$
|
18453
|
-
fonts
|
18454
|
-
direction
|
18648
|
+
const globals = {
|
18649
|
+
colors: colors$1,
|
18650
|
+
typography,
|
18651
|
+
spacing,
|
18652
|
+
border,
|
18653
|
+
radius,
|
18654
|
+
shadow: shadow$1,
|
18655
|
+
fonts,
|
18656
|
+
direction,
|
18455
18657
|
};
|
18456
|
-
|
18658
|
+
getThemeVars$1(globals);
|
18457
18659
|
|
18458
|
-
const globalRefs$B = getThemeRefs(globals
|
18660
|
+
const globalRefs$B = getThemeRefs$1(globals);
|
18459
18661
|
const compVars$6 = ButtonClass.cssVarList;
|
18460
18662
|
|
18461
18663
|
const mode = {
|
@@ -18466,7 +18668,7 @@ const mode = {
|
|
18466
18668
|
surface: globalRefs$B.colors.surface,
|
18467
18669
|
};
|
18468
18670
|
|
18469
|
-
const [helperTheme$4, helperRefs$4, helperVars$4] = createHelperVars({ mode }, componentName$
|
18671
|
+
const [helperTheme$4, helperRefs$4, helperVars$4] = createHelperVars$1({ mode }, componentName$13);
|
18470
18672
|
|
18471
18673
|
const button = {
|
18472
18674
|
...helperTheme$4,
|
@@ -18495,7 +18697,7 @@ const button = {
|
|
18495
18697
|
[compVars$6.verticalPadding]: '1em',
|
18496
18698
|
[compVars$6.horizontalPadding]: '0.875em',
|
18497
18699
|
|
18498
|
-
[compVars$6.outlineWidth]: globals
|
18700
|
+
[compVars$6.outlineWidth]: globals.border.sm,
|
18499
18701
|
[compVars$6.outlineOffset]: '0px', // keep `px` unit for external calc
|
18500
18702
|
[compVars$6.outlineStyle]: 'solid',
|
18501
18703
|
[compVars$6.outlineColor]: 'transparent',
|
@@ -19126,7 +19328,7 @@ const [helperTheme$3, helperRefs$3, helperVars$3] = createHelperVars(
|
|
19126
19328
|
horizontalAlignment,
|
19127
19329
|
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
19128
19330
|
},
|
19129
|
-
componentName$
|
19331
|
+
componentName$16
|
19130
19332
|
);
|
19131
19333
|
|
19132
19334
|
const { shadowColor: shadowColor$3 } = helperRefs$3;
|
@@ -19268,183 +19470,6 @@ var notpImage = /*#__PURE__*/Object.freeze({
|
|
19268
19470
|
vars: vars$K
|
19269
19471
|
});
|
19270
19472
|
|
19271
|
-
const direction = 'ltr';
|
19272
|
-
|
19273
|
-
const colors$1 = genColors$1({
|
19274
|
-
surface: {
|
19275
|
-
main: '#ffffff',
|
19276
|
-
dark: '#636c74',
|
19277
|
-
light: '#cfd3d7',
|
19278
|
-
highlight: '#f4f5f6',
|
19279
|
-
contrast: '#181a1c',
|
19280
|
-
},
|
19281
|
-
primary: {
|
19282
|
-
main: '#006af5',
|
19283
|
-
dark: '#004094',
|
19284
|
-
light: '#71aeff',
|
19285
|
-
highlight: '#f0f6ff',
|
19286
|
-
contrast: '#ffffff',
|
19287
|
-
},
|
19288
|
-
secondary: {
|
19289
|
-
main: '#802ed6',
|
19290
|
-
dark: '#6410bc',
|
19291
|
-
light: '#be89f5',
|
19292
|
-
highlight: '#ede7f6',
|
19293
|
-
contrast: '#ffffff',
|
19294
|
-
},
|
19295
|
-
success: {
|
19296
|
-
main: '#008000',
|
19297
|
-
dark: '#005700',
|
19298
|
-
light: '#8bc38b',
|
19299
|
-
highlight: '#f5faf5',
|
19300
|
-
contrast: '#ffffff',
|
19301
|
-
},
|
19302
|
-
error: {
|
19303
|
-
main: '#e21d12',
|
19304
|
-
dark: '#b3170f',
|
19305
|
-
light: '#f4807a',
|
19306
|
-
highlight: '#fef1f1',
|
19307
|
-
contrast: '#ffffff',
|
19308
|
-
},
|
19309
|
-
});
|
19310
|
-
|
19311
|
-
const fonts = {
|
19312
|
-
font1: {
|
19313
|
-
family: [
|
19314
|
-
'Roboto',
|
19315
|
-
'ui-sans-serif',
|
19316
|
-
'system-ui',
|
19317
|
-
'-apple-system',
|
19318
|
-
'BlinkMacSystemFont',
|
19319
|
-
'Segoe UI',
|
19320
|
-
'Helvetica Neue',
|
19321
|
-
'Arial',
|
19322
|
-
'Noto Sans',
|
19323
|
-
'sans-serif',
|
19324
|
-
'Apple Color Emoji',
|
19325
|
-
'Segoe UI Emoji',
|
19326
|
-
'Segoe UI Symbol',
|
19327
|
-
'Noto Color Emoji',
|
19328
|
-
],
|
19329
|
-
label: 'Roboto',
|
19330
|
-
url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
|
19331
|
-
},
|
19332
|
-
font2: {
|
19333
|
-
family: [
|
19334
|
-
'ui-sans-serif',
|
19335
|
-
'system-ui',
|
19336
|
-
'-apple-system',
|
19337
|
-
'BlinkMacSystemFont',
|
19338
|
-
'Segoe UI',
|
19339
|
-
'Roboto',
|
19340
|
-
'Helvetica Neue',
|
19341
|
-
'Arial',
|
19342
|
-
'Noto Sans',
|
19343
|
-
'sans-serif',
|
19344
|
-
'Apple Color Emoji',
|
19345
|
-
'Segoe UI Emoji',
|
19346
|
-
'Segoe UI Symbol',
|
19347
|
-
'Noto Color Emoji',
|
19348
|
-
],
|
19349
|
-
label: 'Sans Serif',
|
19350
|
-
},
|
19351
|
-
};
|
19352
|
-
|
19353
|
-
const fontsRef = getThemeRefs$1({ fonts }).fonts;
|
19354
|
-
|
19355
|
-
const typography = {
|
19356
|
-
h1: {
|
19357
|
-
font: fontsRef.font1.family,
|
19358
|
-
weight: '900',
|
19359
|
-
size: '48px',
|
19360
|
-
},
|
19361
|
-
h2: {
|
19362
|
-
font: fontsRef.font1.family,
|
19363
|
-
weight: '800',
|
19364
|
-
size: '38px',
|
19365
|
-
},
|
19366
|
-
h3: {
|
19367
|
-
font: fontsRef.font1.family,
|
19368
|
-
weight: '600',
|
19369
|
-
size: '28px',
|
19370
|
-
},
|
19371
|
-
subtitle1: {
|
19372
|
-
font: fontsRef.font2.family,
|
19373
|
-
weight: '500',
|
19374
|
-
size: '22px',
|
19375
|
-
},
|
19376
|
-
subtitle2: {
|
19377
|
-
font: fontsRef.font2.family,
|
19378
|
-
weight: '400',
|
19379
|
-
size: '20px',
|
19380
|
-
},
|
19381
|
-
body1: {
|
19382
|
-
font: fontsRef.font1.family,
|
19383
|
-
weight: '400',
|
19384
|
-
size: '16px',
|
19385
|
-
},
|
19386
|
-
body2: {
|
19387
|
-
font: fontsRef.font1.family,
|
19388
|
-
weight: '400',
|
19389
|
-
size: '14px',
|
19390
|
-
},
|
19391
|
-
};
|
19392
|
-
|
19393
|
-
const spacing = {
|
19394
|
-
xs: '2px',
|
19395
|
-
sm: '4px',
|
19396
|
-
md: '8px',
|
19397
|
-
lg: '16px',
|
19398
|
-
xl: '32px',
|
19399
|
-
};
|
19400
|
-
|
19401
|
-
const border = {
|
19402
|
-
xs: '1px',
|
19403
|
-
sm: '2px',
|
19404
|
-
md: '3px',
|
19405
|
-
lg: '4px',
|
19406
|
-
xl: '5px',
|
19407
|
-
};
|
19408
|
-
|
19409
|
-
const radius = {
|
19410
|
-
xs: '5px',
|
19411
|
-
sm: '10px',
|
19412
|
-
md: '15px',
|
19413
|
-
lg: '20px',
|
19414
|
-
xl: '25px',
|
19415
|
-
'2xl': '30px',
|
19416
|
-
'3xl': '35px',
|
19417
|
-
};
|
19418
|
-
|
19419
|
-
const shadow$1 = {
|
19420
|
-
wide: {
|
19421
|
-
sm: '0 2px 3px -0.5px',
|
19422
|
-
md: '0 4px 6px -1px',
|
19423
|
-
lg: '0 10px 15px -3px',
|
19424
|
-
xl: '0 20px 25px -5px',
|
19425
|
-
'2xl': '0 25px 50px -12px',
|
19426
|
-
},
|
19427
|
-
narrow: {
|
19428
|
-
sm: '0 1px 2px -1px',
|
19429
|
-
md: '0 2px 4px -2px',
|
19430
|
-
lg: '0 4px 6px -4px',
|
19431
|
-
xl: '0 8px 10px -6px',
|
19432
|
-
'2xl': '0 16px 16px -8px',
|
19433
|
-
},
|
19434
|
-
};
|
19435
|
-
|
19436
|
-
const globals = {
|
19437
|
-
colors: colors$1,
|
19438
|
-
typography,
|
19439
|
-
spacing,
|
19440
|
-
border,
|
19441
|
-
radius,
|
19442
|
-
shadow: shadow$1,
|
19443
|
-
fonts,
|
19444
|
-
direction,
|
19445
|
-
};
|
19446
|
-
getThemeVars$1(globals);
|
19447
|
-
|
19448
19473
|
const globalRefs$v = getThemeRefs$1(globals);
|
19449
19474
|
const vars$J = TextClass.cssVarList;
|
19450
19475
|
|
@@ -19768,7 +19793,7 @@ const [helperTheme$1, helperRefs$1, helperVars$1] = createHelperVars(
|
|
19768
19793
|
},
|
19769
19794
|
},
|
19770
19795
|
},
|
19771
|
-
componentName$
|
19796
|
+
componentName$17
|
19772
19797
|
);
|
19773
19798
|
|
19774
19799
|
const loaderRadial = {
|
@@ -20791,6 +20816,7 @@ const globalRefs$a = getThemeRefs(globals$1);
|
|
20791
20816
|
const vars$g = CodeSnippetClass.cssVarList;
|
20792
20817
|
|
20793
20818
|
const light = {
|
20819
|
+
color1: '#fa0',
|
20794
20820
|
color2: '#d73a49',
|
20795
20821
|
color3: '#6f42c1',
|
20796
20822
|
color4: '#005cc5',
|
@@ -20800,10 +20826,13 @@ const light = {
|
|
20800
20826
|
color8: '#24292e',
|
20801
20827
|
color9: '#735c0f',
|
20802
20828
|
color10: '#f0fff4',
|
20829
|
+
color11: '#b31d28',
|
20830
|
+
color12: '#ffeef0',
|
20803
20831
|
color13: '#032f62',
|
20804
20832
|
};
|
20805
20833
|
|
20806
20834
|
const dark = {
|
20835
|
+
color1: '#c9d1d9',
|
20807
20836
|
color2: '#ff7b72',
|
20808
20837
|
color3: '#d2a8ff',
|
20809
20838
|
color4: '#79c0ff',
|
@@ -20813,6 +20842,8 @@ const dark = {
|
|
20813
20842
|
color8: '#c9d1d9',
|
20814
20843
|
color9: '#735c0f',
|
20815
20844
|
color10: '#f0fff4',
|
20845
|
+
color11: '#67060c',
|
20846
|
+
color12: '#ffeef0',
|
20816
20847
|
color13: '#a5d6ff',
|
20817
20848
|
};
|
20818
20849
|
|