@descope/web-components-ui 1.0.244 → 1.0.245
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 +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +2013 -2010
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.cjs.js +1 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
package/dist/index.esm.js
CHANGED
@@ -10,6 +10,7 @@ import '@vaadin/combo-box';
|
|
10
10
|
import '@vaadin/grid';
|
11
11
|
import { GridSortColumn } from '@vaadin/grid/vaadin-grid-sort-column';
|
12
12
|
import { GridSelectionColumn } from '@vaadin/grid/vaadin-grid-selection-column';
|
13
|
+
import '@vaadin/multi-select-combo-box';
|
13
14
|
import merge from 'lodash.merge';
|
14
15
|
import set from 'lodash.set';
|
15
16
|
import Color from 'color';
|
@@ -7202,2425 +7203,2427 @@ const GridClass = compose(
|
|
7202
7203
|
|
7203
7204
|
customElements.define(componentName$5, GridClass);
|
7204
7205
|
|
7205
|
-
const componentName$4 = getComponentName('
|
7206
|
+
const componentName$4 = getComponentName('multi-select-combo-box');
|
7206
7207
|
|
7207
|
-
|
7208
|
-
|
7209
|
-
|
7208
|
+
const MultiSelectComboBoxMixin = (superclass) =>
|
7209
|
+
class MultiSelectComboBoxMixinClass extends superclass {
|
7210
|
+
// eslint-disable-next-line class-methods-use-this
|
7211
|
+
#renderItem = ({ displayName, value, label }) => {
|
7212
|
+
return `<span data-name="${label}" data-id="${value}">${displayName || label}</span>`;
|
7213
|
+
};
|
7210
7214
|
|
7211
|
-
|
7212
|
-
|
7213
|
-
|
7214
|
-
|
7215
|
-
|
7216
|
-
|
7217
|
-
|
7215
|
+
#data;
|
7216
|
+
|
7217
|
+
get defaultValues() {
|
7218
|
+
const defaultValuesAttr = this.getAttribute('default-values');
|
7219
|
+
if (defaultValuesAttr) {
|
7220
|
+
try {
|
7221
|
+
const defaultValues = JSON.parse(defaultValuesAttr);
|
7222
|
+
if (this.isValidDataType(defaultValues)) {
|
7223
|
+
return defaultValues;
|
7224
|
+
}
|
7225
|
+
} catch (e) {
|
7226
|
+
// eslint-disable-next-line no-console
|
7227
|
+
console.error('could not parse data string from attribute "default-values" -', e.message);
|
7228
|
+
}
|
7218
7229
|
}
|
7219
|
-
|
7220
|
-
|
7221
|
-
<slot></slot>
|
7222
|
-
</div>
|
7223
|
-
`;
|
7224
|
-
}
|
7225
|
-
}
|
7230
|
+
return [];
|
7231
|
+
}
|
7226
7232
|
|
7227
|
-
|
7228
|
-
|
7229
|
-
|
7230
|
-
hostWidth: [{ selector: () => ':host', property: 'width' }],
|
7231
|
-
hostDirection: { property: 'direction' },
|
7233
|
+
get renderItem() {
|
7234
|
+
return this.#renderItem;
|
7235
|
+
}
|
7232
7236
|
|
7233
|
-
|
7234
|
-
|
7235
|
-
|
7236
|
-
|
7237
|
-
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
7238
|
-
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
7237
|
+
set renderItem(renderFn) {
|
7238
|
+
this.#renderItem = renderFn;
|
7239
|
+
this.renderItems();
|
7240
|
+
}
|
7239
7241
|
|
7240
|
-
|
7241
|
-
|
7242
|
-
borderColor: {},
|
7243
|
-
borderRadius: {},
|
7242
|
+
get data() {
|
7243
|
+
if (this.#data) return this.#data;
|
7244
7244
|
|
7245
|
-
|
7245
|
+
const dataAttr = this.getAttribute('data');
|
7246
7246
|
|
7247
|
-
|
7248
|
-
|
7249
|
-
|
7250
|
-
|
7251
|
-
|
7252
|
-
|
7253
|
-
|
7247
|
+
if (dataAttr) {
|
7248
|
+
try {
|
7249
|
+
const data = JSON.parse(dataAttr);
|
7250
|
+
if (this.isValidDataType(data)) {
|
7251
|
+
return data;
|
7252
|
+
}
|
7253
|
+
} catch (e) {
|
7254
|
+
// eslint-disable-next-line no-console
|
7255
|
+
console.error('could not parse data string from attribute "data" -', e.message);
|
7256
|
+
}
|
7257
|
+
}
|
7254
7258
|
|
7255
|
-
|
7259
|
+
return [];
|
7260
|
+
}
|
7256
7261
|
|
7257
|
-
|
7262
|
+
set data(data) {
|
7263
|
+
if (this.isValidDataType(data)) {
|
7264
|
+
this.#data = data;
|
7265
|
+
this.renderItems();
|
7266
|
+
}
|
7267
|
+
}
|
7258
7268
|
|
7259
|
-
|
7260
|
-
|
7261
|
-
if (val?.constructor !== Object) {
|
7262
|
-
return merge(acc, getTransformation(path.concat(key), val));
|
7269
|
+
get allowCustomValue() {
|
7270
|
+
return this.getAttribute('allow-custom-value') === 'true';
|
7263
7271
|
}
|
7264
|
-
return merge(acc, transformTheme(val, [...path, key], getTransformation));
|
7265
|
-
}, {});
|
7266
|
-
};
|
7267
7272
|
|
7268
|
-
|
7269
|
-
|
7273
|
+
get minItemsSelection() {
|
7274
|
+
return parseInt(this.getAttribute('min-items-selection'), 10) || 0;
|
7275
|
+
}
|
7270
7276
|
|
7271
|
-
|
7272
|
-
|
7273
|
-
|
7274
|
-
return stringifyArray(val);
|
7275
|
-
case isUrl(val):
|
7276
|
-
return `url(${val})`;
|
7277
|
-
default:
|
7278
|
-
return val;
|
7279
|
-
}
|
7280
|
-
};
|
7277
|
+
get maxItemsSelection() {
|
7278
|
+
return parseInt(this.getAttribute('max-items-selection'), 10) || 0;
|
7279
|
+
}
|
7281
7280
|
|
7282
|
-
|
7283
|
-
|
7284
|
-
|
7285
|
-
|
7281
|
+
// eslint-disable-next-line class-methods-use-this
|
7282
|
+
isValidDataType(data) {
|
7283
|
+
const isValid = Array.isArray(data);
|
7284
|
+
if (!isValid) {
|
7285
|
+
// eslint-disable-next-line no-console
|
7286
|
+
console.error('data and default-values must be an array, received:', data);
|
7287
|
+
}
|
7286
7288
|
|
7287
|
-
|
7288
|
-
|
7289
|
-
set({}, path, `var(${getVarName(prefix ? [prefix, ...path] : path)})`)
|
7290
|
-
);
|
7289
|
+
return isValid;
|
7290
|
+
}
|
7291
7291
|
|
7292
|
-
|
7293
|
-
|
7292
|
+
getItemsTemplate() {
|
7293
|
+
return this.data?.reduce?.((acc, item) => acc + (this.renderItem?.(item || {}) || ''), '');
|
7294
|
+
}
|
7294
7295
|
|
7295
|
-
|
7296
|
-
|
7297
|
-
|
7298
|
-
|
7299
|
-
);
|
7296
|
+
renderItems() {
|
7297
|
+
const template = this.getItemsTemplate();
|
7298
|
+
if (template) this.innerHTML = template;
|
7299
|
+
}
|
7300
7300
|
|
7301
|
-
|
7301
|
+
handleSelectedItems() {
|
7302
|
+
const currentSelected =
|
7303
|
+
this.baseElement.selectedItems?.map((item) => item.getAttribute('data-id')) || [];
|
7302
7304
|
|
7303
|
-
|
7304
|
-
};
|
7305
|
+
this.baseElement.selectedItems = [];
|
7305
7306
|
|
7306
|
-
|
7307
|
-
|
7308
|
-
|
7309
|
-
|
7310
|
-
const componentName = getComponentName(component);
|
7307
|
+
// if previously selected item ID exists in current children, set it as selected
|
7308
|
+
if (currentSelected.length > 0) {
|
7309
|
+
this.value = currentSelected;
|
7310
|
+
}
|
7311
7311
|
|
7312
|
-
|
7313
|
-
|
7314
|
-
|
7312
|
+
// otherwise, if default value is specified, set default value as selected item
|
7313
|
+
if (this.value.length === 0) {
|
7314
|
+
this.setDefaultValues();
|
7315
|
+
}
|
7315
7316
|
}
|
7316
7317
|
|
7317
|
-
//
|
7318
|
-
|
7319
|
-
|
7320
|
-
// we are generating a new theme
|
7321
|
-
let themeName = BASE_THEME_SECTION;
|
7322
|
-
|
7323
|
-
if (restPath[0] && restPath[0].startsWith(PORTAL_THEME_PREFIX)) {
|
7324
|
-
themeName = restPath.shift();
|
7318
|
+
// eslint-disable-next-line class-methods-use-this
|
7319
|
+
customValueTransformFn(val) {
|
7320
|
+
return val;
|
7325
7321
|
}
|
7326
7322
|
|
7327
|
-
//
|
7328
|
-
//
|
7329
|
-
|
7330
|
-
|
7331
|
-
|
7332
|
-
|
7323
|
+
// We want to override Vaadin's Combo Box value setter. This is needed since Vaadin couples between the
|
7324
|
+
// field that it searches the value, and the finaly display value of the input.
|
7325
|
+
// We provide a custom transform function to override that behavior.
|
7326
|
+
setComboBoxDescriptor() {
|
7327
|
+
const valueDescriptor = Object.getOwnPropertyDescriptor(
|
7328
|
+
this.inputElement.constructor.prototype,
|
7329
|
+
'value'
|
7330
|
+
);
|
7333
7331
|
|
7334
|
-
|
7335
|
-
// eslint-disable-next-line no-console
|
7336
|
-
console.error(
|
7337
|
-
'theme generator',
|
7338
|
-
`your theme structure is invalid, attribute "${section}" is followed by "${nextSection}" which is not allowed`
|
7339
|
-
);
|
7340
|
-
return acc;
|
7341
|
-
}
|
7332
|
+
const comboBox = this;
|
7342
7333
|
|
7343
|
-
|
7344
|
-
|
7334
|
+
Object.defineProperties(this.inputElement, {
|
7335
|
+
value: {
|
7336
|
+
...valueDescriptor,
|
7337
|
+
set(val) {
|
7338
|
+
const transformedValue = comboBox.customValueTransformFn(val) || '';
|
7345
7339
|
|
7346
|
-
|
7340
|
+
if (transformedValue === this.value) {
|
7341
|
+
return;
|
7342
|
+
}
|
7347
7343
|
|
7348
|
-
|
7349
|
-
[componentName]: {
|
7350
|
-
[themeName]: {
|
7351
|
-
[selector]: {
|
7352
|
-
[property]: getCssVarValue(val),
|
7344
|
+
valueDescriptor.set.call(this, transformedValue);
|
7353
7345
|
},
|
7354
7346
|
},
|
7355
|
-
}
|
7356
|
-
}
|
7357
|
-
});
|
7358
|
-
|
7359
|
-
const componentsThemeToStyle = (componentsTheme) =>
|
7360
|
-
Object.entries(componentsTheme).reduce(
|
7361
|
-
(acc, [selector, vars]) =>
|
7362
|
-
`${acc}${selector} { \n${Object.entries(vars)
|
7363
|
-
.map(([key, val]) => `${key}: ${val}`)
|
7364
|
-
.join(';\n')} \n}\n\n`,
|
7365
|
-
''
|
7366
|
-
);
|
7347
|
+
});
|
7348
|
+
}
|
7367
7349
|
|
7368
|
-
|
7369
|
-
|
7350
|
+
// vaadin api is to set props on their combo box node,
|
7351
|
+
// in order to avoid it, we are passing the children of this component
|
7352
|
+
// to the items & renderer props, so it will be used as the combo box items
|
7353
|
+
#onChildrenChange() {
|
7354
|
+
const items = Array.from(this.children);
|
7370
7355
|
|
7371
|
-
|
7372
|
-
|
7356
|
+
// we want the data-name attribute to be accessible as an object attribute
|
7357
|
+
if (items.length) {
|
7358
|
+
this.removeAttribute('has-no-options');
|
7373
7359
|
|
7374
|
-
|
7375
|
-
|
7376
|
-
|
7377
|
-
|
7378
|
-
|
7379
|
-
|
7380
|
-
|
7381
|
-
|
7382
|
-
|
7360
|
+
items.forEach((node) => {
|
7361
|
+
Object.defineProperty(node, 'data-name', {
|
7362
|
+
value: node.getAttribute('data-name'),
|
7363
|
+
configurable: true,
|
7364
|
+
writable: true,
|
7365
|
+
});
|
7366
|
+
Object.defineProperty(node, 'data-id', {
|
7367
|
+
value: node.getAttribute('data-id'),
|
7368
|
+
configurable: true,
|
7369
|
+
writable: true,
|
7370
|
+
});
|
7371
|
+
});
|
7383
7372
|
|
7384
|
-
|
7385
|
-
globals: globalsThemeToStyle(globals, themeName),
|
7386
|
-
components: createComponentsTheme(components),
|
7387
|
-
});
|
7373
|
+
this.baseElement.items = items;
|
7388
7374
|
|
7389
|
-
|
7375
|
+
setTimeout(() => {
|
7376
|
+
// set timeout to ensure this runs after customValueTransformFn had the chance to be overriden
|
7377
|
+
this.handleSelectedItems();
|
7378
|
+
}, 0);
|
7379
|
+
} else {
|
7380
|
+
this.baseElement.items = [];
|
7381
|
+
this.setAttribute('has-no-options', '');
|
7382
|
+
}
|
7390
7383
|
|
7391
|
-
|
7392
|
-
|
7393
|
-
|
7394
|
-
|
7395
|
-
|
7384
|
+
// use vaadin combobox custom renderer to render options as HTML
|
7385
|
+
// and not via default renderer, which renders only the data-name's value
|
7386
|
+
// in its own HTML template
|
7387
|
+
this.baseElement.renderer = (root, combo, model) => {
|
7388
|
+
// eslint-disable-next-line no-param-reassign
|
7389
|
+
root.innerHTML = model.item.outerHTML;
|
7390
|
+
};
|
7391
|
+
}
|
7396
7392
|
|
7397
|
-
|
7398
|
-
|
7393
|
+
// the default vaadin behavior is to attach the overlay to the body when opened
|
7394
|
+
// we do not want that because it's difficult to style the overlay in this way
|
7395
|
+
// so we override it to open inside the shadow DOM
|
7396
|
+
#overrideOverlaySettings() {
|
7397
|
+
const overlay = this.baseElement.shadowRoot
|
7398
|
+
.querySelector('vaadin-multi-select-combo-box-internal')
|
7399
|
+
.shadowRoot.querySelector('vaadin-multi-select-combo-box-overlay');
|
7400
|
+
overlay._attachOverlay = () => {
|
7401
|
+
overlay.bringToFront();
|
7402
|
+
};
|
7403
|
+
overlay._detachOverlay = () => {};
|
7404
|
+
overlay._enterModalState = () => {};
|
7405
|
+
}
|
7399
7406
|
|
7400
|
-
|
7401
|
-
|
7407
|
+
#handleCustomValues() {
|
7408
|
+
if (this.allowCustomValue) {
|
7409
|
+
this.baseElement.addEventListener('custom-value-set', (e) => {
|
7410
|
+
const newItemHtml = this.#renderItem({
|
7411
|
+
label: e.detail,
|
7412
|
+
displayName: e.detail,
|
7413
|
+
value: e.detail,
|
7414
|
+
});
|
7415
|
+
this.innerHTML += newItemHtml;
|
7416
|
+
// The value needs to be set with a timeout because it needs to execute after
|
7417
|
+
// the custom value is added to items by the children change observer
|
7418
|
+
setTimeout(() => {
|
7419
|
+
this.value = [...this.value, e.detail];
|
7420
|
+
}, 0);
|
7421
|
+
});
|
7422
|
+
}
|
7423
|
+
}
|
7402
7424
|
|
7403
|
-
|
7404
|
-
|
7425
|
+
setGetValidity() {
|
7426
|
+
// eslint-disable-next-line func-names
|
7427
|
+
this.getValidity = function () {
|
7428
|
+
if (this.isRequired && !this.value.length) {
|
7429
|
+
return {
|
7430
|
+
valueMissing: true,
|
7431
|
+
};
|
7432
|
+
}
|
7433
|
+
// If the field is not required, no minimum selection can be set
|
7434
|
+
if (
|
7435
|
+
this.isRequired &&
|
7436
|
+
this.minItemsSelection &&
|
7437
|
+
this.value.length < this.minItemsSelection
|
7438
|
+
) {
|
7439
|
+
return {
|
7440
|
+
rangeUnderflow: true,
|
7441
|
+
};
|
7442
|
+
}
|
7443
|
+
if (this.maxItemsSelection && this.value.length > this.maxItemsSelection) {
|
7444
|
+
return {
|
7445
|
+
rangeOverflow: true,
|
7446
|
+
};
|
7447
|
+
}
|
7448
|
+
return {};
|
7449
|
+
};
|
7450
|
+
}
|
7405
7451
|
|
7406
|
-
|
7407
|
-
|
7408
|
-
const genContrast = (c, percentage = 0.9) => {
|
7409
|
-
const isDark = c.isDark();
|
7410
|
-
return c
|
7411
|
-
.mix(Color(isDark ? 'white' : 'black'), percentage)
|
7412
|
-
.saturate(1)
|
7413
|
-
.hex();
|
7414
|
-
};
|
7452
|
+
init() {
|
7453
|
+
super.init?.();
|
7415
7454
|
|
7416
|
-
|
7417
|
-
const mainColor = new Color(color.main || color);
|
7455
|
+
this.setGetValidity();
|
7418
7456
|
|
7419
|
-
|
7420
|
-
main: mainColor.hex(),
|
7421
|
-
dark: color.dark || genDark(mainColor),
|
7422
|
-
light: color.light || genLight(mainColor),
|
7423
|
-
contrast: color.contrast || genContrast(mainColor),
|
7424
|
-
};
|
7425
|
-
};
|
7457
|
+
this.setComboBoxDescriptor();
|
7426
7458
|
|
7427
|
-
|
7428
|
-
return Object.keys(colors).reduce((acc, colorName) => {
|
7429
|
-
const currentColor = colors[colorName];
|
7459
|
+
this.#overrideOverlaySettings();
|
7430
7460
|
|
7431
|
-
|
7432
|
-
[colorName]: genColor(currentColor),
|
7433
|
-
});
|
7434
|
-
}, {});
|
7435
|
-
};
|
7461
|
+
this.#handleCustomValues();
|
7436
7462
|
|
7437
|
-
|
7463
|
+
this.renderItems();
|
7438
7464
|
|
7439
|
-
|
7440
|
-
surface: {
|
7441
|
-
main: 'lightgray',
|
7442
|
-
light: '#fff',
|
7443
|
-
dark: '#000',
|
7444
|
-
},
|
7445
|
-
primary: '#006af5',
|
7446
|
-
secondary: '#7D14EB',
|
7447
|
-
success: 'green',
|
7448
|
-
error: '#e21d12',
|
7449
|
-
});
|
7465
|
+
observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
|
7450
7466
|
|
7451
|
-
|
7452
|
-
font1: {
|
7453
|
-
family: [
|
7454
|
-
'Roboto',
|
7455
|
-
'ui-sans-serif',
|
7456
|
-
'system-ui',
|
7457
|
-
'-apple-system',
|
7458
|
-
'BlinkMacSystemFont',
|
7459
|
-
'Segoe UI',
|
7460
|
-
'Helvetica Neue',
|
7461
|
-
'Arial',
|
7462
|
-
'Noto Sans',
|
7463
|
-
'sans-serif',
|
7464
|
-
'Apple Color Emoji',
|
7465
|
-
'Segoe UI Emoji',
|
7466
|
-
'Segoe UI Symbol',
|
7467
|
-
'Noto Color Emoji',
|
7468
|
-
],
|
7469
|
-
label: 'Roboto',
|
7470
|
-
url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
|
7471
|
-
},
|
7472
|
-
font2: {
|
7473
|
-
family: [
|
7474
|
-
'ui-sans-serif',
|
7475
|
-
'system-ui',
|
7476
|
-
'-apple-system',
|
7477
|
-
'BlinkMacSystemFont',
|
7478
|
-
'Segoe UI',
|
7479
|
-
'Roboto',
|
7480
|
-
'Helvetica Neue',
|
7481
|
-
'Arial',
|
7482
|
-
'Noto Sans',
|
7483
|
-
'sans-serif',
|
7484
|
-
'Apple Color Emoji',
|
7485
|
-
'Segoe UI Emoji',
|
7486
|
-
'Segoe UI Symbol',
|
7487
|
-
'Noto Color Emoji',
|
7488
|
-
],
|
7489
|
-
label: 'Sans Serif',
|
7490
|
-
},
|
7491
|
-
};
|
7467
|
+
observeChildren(this, this.#onChildrenChange.bind(this));
|
7492
7468
|
|
7493
|
-
|
7469
|
+
// Note: we need to forward the `placeholder` because the vaadin component observes it and
|
7470
|
+
// tries to override it, causing us to lose the user set placeholder.
|
7471
|
+
forwardAttrs(this, this.baseElement, { includeAttrs: ['placeholder'] });
|
7494
7472
|
|
7495
|
-
|
7496
|
-
|
7497
|
-
font: fontsRef.font1.family,
|
7498
|
-
weight: '900',
|
7499
|
-
size: '48px',
|
7500
|
-
},
|
7501
|
-
h2: {
|
7502
|
-
font: fontsRef.font1.family,
|
7503
|
-
weight: '800',
|
7504
|
-
size: '38px',
|
7505
|
-
},
|
7506
|
-
h3: {
|
7507
|
-
font: fontsRef.font1.family,
|
7508
|
-
weight: '600',
|
7509
|
-
size: '28px',
|
7510
|
-
},
|
7511
|
-
subtitle1: {
|
7512
|
-
font: fontsRef.font2.family,
|
7513
|
-
weight: '500',
|
7514
|
-
size: '22px',
|
7515
|
-
},
|
7516
|
-
subtitle2: {
|
7517
|
-
font: fontsRef.font2.family,
|
7518
|
-
weight: '400',
|
7519
|
-
size: '20px',
|
7520
|
-
},
|
7521
|
-
body1: {
|
7522
|
-
font: fontsRef.font1.family,
|
7523
|
-
weight: '400',
|
7524
|
-
size: '16px',
|
7525
|
-
},
|
7526
|
-
body2: {
|
7527
|
-
font: fontsRef.font1.family,
|
7528
|
-
weight: '400',
|
7529
|
-
size: '14px',
|
7530
|
-
},
|
7531
|
-
};
|
7473
|
+
this.setDefaultValues();
|
7474
|
+
}
|
7532
7475
|
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7536
|
-
md: '8px',
|
7537
|
-
lg: '16px',
|
7538
|
-
xl: '32px',
|
7539
|
-
};
|
7476
|
+
setDefaultValues() {
|
7477
|
+
this.value = this.defaultValues;
|
7478
|
+
}
|
7540
7479
|
|
7541
|
-
|
7542
|
-
|
7543
|
-
|
7544
|
-
md: '3px',
|
7545
|
-
lg: '4px',
|
7546
|
-
xl: '5px',
|
7547
|
-
};
|
7480
|
+
set value(vals) {
|
7481
|
+
if (vals && vals.length > 0) {
|
7482
|
+
const children = this.baseElement.items?.filter((item) => vals.includes(item['data-id']));
|
7548
7483
|
|
7549
|
-
|
7550
|
-
|
7551
|
-
|
7552
|
-
|
7553
|
-
|
7554
|
-
|
7555
|
-
|
7556
|
-
'3xl': '35px',
|
7557
|
-
};
|
7558
|
-
|
7559
|
-
const shadow = {
|
7560
|
-
wide: {
|
7561
|
-
sm: '0 2px 3px -0.5px',
|
7562
|
-
md: '0 4px 6px -1px',
|
7563
|
-
lg: '0 10px 15px -3px',
|
7564
|
-
xl: '0 20px 25px -5px',
|
7565
|
-
'2xl': '0 25px 50px -12px',
|
7566
|
-
},
|
7567
|
-
narrow: {
|
7568
|
-
sm: '0 1px 2px -1px',
|
7569
|
-
md: '0 2px 4px -2px',
|
7570
|
-
lg: '0 4px 6px -4px',
|
7571
|
-
xl: '0 8px 10px -6px',
|
7572
|
-
'2xl': '0 16px 16px -8px',
|
7573
|
-
},
|
7574
|
-
};
|
7575
|
-
|
7576
|
-
const globals = {
|
7577
|
-
colors,
|
7578
|
-
typography,
|
7579
|
-
spacing,
|
7580
|
-
border,
|
7581
|
-
radius,
|
7582
|
-
shadow,
|
7583
|
-
fonts,
|
7584
|
-
direction,
|
7585
|
-
};
|
7586
|
-
const vars$w = getThemeVars(globals);
|
7587
|
-
|
7588
|
-
const globalRefs$i = getThemeRefs(globals);
|
7589
|
-
const compVars$4 = ButtonClass.cssVarList;
|
7590
|
-
|
7591
|
-
const mode = {
|
7592
|
-
primary: globalRefs$i.colors.primary,
|
7593
|
-
secondary: globalRefs$i.colors.secondary,
|
7594
|
-
success: globalRefs$i.colors.success,
|
7595
|
-
error: globalRefs$i.colors.error,
|
7596
|
-
surface: globalRefs$i.colors.surface,
|
7597
|
-
};
|
7598
|
-
|
7599
|
-
const [helperTheme$3, helperRefs$3, helperVars$3] = createHelperVars({ mode }, componentName$E);
|
7600
|
-
|
7601
|
-
const button = {
|
7602
|
-
...helperTheme$3,
|
7603
|
-
|
7604
|
-
[compVars$4.fontFamily]: globalRefs$i.fonts.font1.family,
|
7605
|
-
|
7606
|
-
[compVars$4.cursor]: 'pointer',
|
7607
|
-
[compVars$4.hostHeight]: '3em',
|
7608
|
-
[compVars$4.hostWidth]: 'auto',
|
7609
|
-
[compVars$4.hostDirection]: globalRefs$i.direction,
|
7610
|
-
|
7611
|
-
[compVars$4.borderRadius]: globalRefs$i.radius.sm,
|
7612
|
-
[compVars$4.borderWidth]: globalRefs$i.border.xs,
|
7613
|
-
[compVars$4.borderStyle]: 'solid',
|
7614
|
-
[compVars$4.borderColor]: 'transparent',
|
7615
|
-
|
7616
|
-
[compVars$4.labelSpacing]: '0.25em',
|
7617
|
-
|
7618
|
-
[compVars$4.verticalPadding]: '1em',
|
7619
|
-
|
7620
|
-
[compVars$4.outlineWidth]: globals.border.sm,
|
7621
|
-
[compVars$4.outlineOffset]: '0px', // keep `px` unit for external calc
|
7622
|
-
[compVars$4.outlineStyle]: 'solid',
|
7623
|
-
[compVars$4.outlineColor]: 'transparent',
|
7624
|
-
|
7625
|
-
size: {
|
7626
|
-
xs: { [compVars$4.fontSize]: '12px' },
|
7627
|
-
sm: { [compVars$4.fontSize]: '14px' },
|
7628
|
-
md: { [compVars$4.fontSize]: '16px' },
|
7629
|
-
lg: { [compVars$4.fontSize]: '18px' },
|
7630
|
-
},
|
7484
|
+
if (children?.length > 0) {
|
7485
|
+
this.baseElement.selectedItems = children;
|
7486
|
+
}
|
7487
|
+
} else {
|
7488
|
+
this.baseElement.selectedItems = [];
|
7489
|
+
}
|
7490
|
+
}
|
7631
7491
|
|
7632
|
-
|
7633
|
-
|
7634
|
-
|
7635
|
-
|
7636
|
-
},
|
7492
|
+
get value() {
|
7493
|
+
return this.baseElement.selectedItems.map((elem) => elem.getAttribute('data-id')) || [];
|
7494
|
+
}
|
7495
|
+
};
|
7637
7496
|
|
7638
|
-
|
7639
|
-
|
7497
|
+
const {
|
7498
|
+
host,
|
7499
|
+
inputField,
|
7500
|
+
inputElement,
|
7501
|
+
placeholder,
|
7502
|
+
toggle,
|
7503
|
+
label,
|
7504
|
+
requiredIndicator,
|
7505
|
+
helperText,
|
7506
|
+
errorMessage,
|
7507
|
+
chip,
|
7508
|
+
chipLabel,
|
7509
|
+
overflowChipFirstBorder,
|
7510
|
+
overflowChipSecondBorder,
|
7511
|
+
} = {
|
7512
|
+
host: { selector: () => ':host' },
|
7513
|
+
inputField: { selector: '::part(input-field)' },
|
7514
|
+
inputElement: { selector: 'input' },
|
7515
|
+
placeholder: { selector: '> input:placeholder-shown' },
|
7516
|
+
toggle: { selector: '::part(toggle-button)' },
|
7517
|
+
label: { selector: '::part(label)' },
|
7518
|
+
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
7519
|
+
helperText: { selector: '::part(helper-text)' },
|
7520
|
+
errorMessage: { selector: '::part(error-message)' },
|
7521
|
+
chip: { selector: 'vaadin-multi-select-combo-box-chip' },
|
7522
|
+
chipLabel: { selector: 'vaadin-multi-select-combo-box-chip::part(label)' },
|
7523
|
+
overflowChipFirstBorder: {
|
7524
|
+
selector: "vaadin-multi-select-combo-box-chip[slot='overflow']::before",
|
7640
7525
|
},
|
7641
|
-
|
7642
|
-
|
7643
|
-
[compVars$4.cursor]: 'wait',
|
7644
|
-
[compVars$4.labelTextColor]: helperRefs$3.main,
|
7526
|
+
overflowChipSecondBorder: {
|
7527
|
+
selector: "vaadin-multi-select-combo-box-chip[slot='overflow']::after",
|
7645
7528
|
},
|
7529
|
+
};
|
7646
7530
|
|
7647
|
-
|
7648
|
-
|
7649
|
-
|
7650
|
-
|
7651
|
-
|
7652
|
-
|
7531
|
+
const MultiSelectComboBoxClass = compose(
|
7532
|
+
createStyleMixin({
|
7533
|
+
mappings: {
|
7534
|
+
hostWidth: { ...host, property: 'width' },
|
7535
|
+
hostDirection: { ...host, property: 'direction' },
|
7536
|
+
// we apply font-size also on the host so we can set its width with em
|
7537
|
+
fontSize: [{}, host],
|
7538
|
+
chipFontSize: { ...chipLabel, property: 'font-size' },
|
7539
|
+
fontFamily: [label, placeholder, inputField, helperText, errorMessage, chipLabel],
|
7540
|
+
labelTextColor: [
|
7541
|
+
{ ...label, property: 'color' },
|
7542
|
+
{ ...requiredIndicator, property: 'color' },
|
7543
|
+
],
|
7544
|
+
errorMessageTextColor: { ...errorMessage, property: 'color' },
|
7545
|
+
inputHeight: { ...inputField, property: 'min-height' },
|
7546
|
+
inputBackgroundColor: { ...inputField, property: 'background-color' },
|
7547
|
+
inputBorderColor: { ...inputField, property: 'border-color' },
|
7548
|
+
inputBorderWidth: { ...inputField, property: 'border-width' },
|
7549
|
+
inputBorderStyle: { ...inputField, property: 'border-style' },
|
7550
|
+
inputBorderRadius: { ...inputField, property: 'border-radius' },
|
7551
|
+
labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
|
7552
|
+
inputValueTextColor: { ...inputField, property: 'color' },
|
7553
|
+
inputPlaceholderTextColor: { ...placeholder, property: 'color' },
|
7554
|
+
inputDropdownButtonCursor: { ...toggle, property: 'cursor' },
|
7555
|
+
inputDropdownButtonColor: { ...toggle, property: 'color' },
|
7556
|
+
inputDropdownButtonSize: { ...toggle, property: 'font-size' },
|
7557
|
+
inputDropdownButtonOffset: [
|
7558
|
+
{ ...toggle, property: 'margin-right' },
|
7559
|
+
{ ...toggle, property: 'margin-left' },
|
7560
|
+
],
|
7561
|
+
inputOutlineColor: { ...inputField, property: 'outline-color' },
|
7562
|
+
inputOutlineWidth: { ...inputField, property: 'outline-width' },
|
7563
|
+
inputOutlineStyle: { ...inputField, property: 'outline-style' },
|
7564
|
+
inputOutlineOffset: { ...inputField, property: 'outline-offset' },
|
7565
|
+
inputHorizontalPadding: [
|
7566
|
+
{ ...inputElement, property: 'padding-left' },
|
7567
|
+
{ ...inputElement, property: 'padding-right' },
|
7568
|
+
{ ...inputField, property: 'padding-inline-start' },
|
7569
|
+
],
|
7570
|
+
inputVerticalPadding: [
|
7571
|
+
{ ...inputField, property: 'padding-top' },
|
7572
|
+
{ ...inputField, property: 'padding-bottom' },
|
7573
|
+
],
|
7574
|
+
chipTextColor: { ...chipLabel, property: 'color' },
|
7575
|
+
chipBackgroundColor: [
|
7576
|
+
{ ...chip, property: 'background-color' },
|
7577
|
+
{ ...overflowChipFirstBorder, property: 'border-color' },
|
7578
|
+
{ ...overflowChipSecondBorder, property: 'border-color' },
|
7579
|
+
],
|
7653
7580
|
|
7654
|
-
|
7655
|
-
|
7656
|
-
|
7657
|
-
|
7658
|
-
|
7659
|
-
|
7660
|
-
_loading: {
|
7661
|
-
[compVars$4.backgroundColor]: helperRefs$3.main,
|
7662
|
-
},
|
7581
|
+
// we need to use the variables from the portal mixin
|
7582
|
+
// so we need to use an arrow function on the selector
|
7583
|
+
// for that to work, because ComboBox is not available
|
7584
|
+
// at this time.
|
7585
|
+
overlayBackground: {
|
7586
|
+
property: () => MultiSelectComboBoxClass.cssVarList.overlay.backgroundColor,
|
7663
7587
|
},
|
7664
|
-
|
7665
|
-
|
7588
|
+
overlayBorder: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.border },
|
7589
|
+
overlayFontSize: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontSize },
|
7590
|
+
overlayFontFamily: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontFamily },
|
7591
|
+
overlayCursor: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.cursor },
|
7592
|
+
overlayItemBoxShadow: {
|
7593
|
+
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemBoxShadow,
|
7666
7594
|
},
|
7667
|
-
|
7668
|
-
|
7669
|
-
outline: {
|
7670
|
-
[compVars$4.labelTextColor]: helperRefs$3.main,
|
7671
|
-
[compVars$4.borderColor]: 'currentColor',
|
7672
|
-
_hover: {
|
7673
|
-
[compVars$4.labelTextColor]: helperRefs$3.dark,
|
7595
|
+
overlayItemPaddingInlineStart: {
|
7596
|
+
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemPaddingInlineStart,
|
7674
7597
|
},
|
7675
|
-
|
7676
|
-
|
7598
|
+
overlayItemPaddingInlineEnd: {
|
7599
|
+
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemPaddingInlineEnd,
|
7677
7600
|
},
|
7678
7601
|
},
|
7679
|
-
|
7680
|
-
|
7681
|
-
|
7682
|
-
|
7683
|
-
|
7684
|
-
|
7602
|
+
}),
|
7603
|
+
draggableMixin,
|
7604
|
+
portalMixin({
|
7605
|
+
name: 'overlay',
|
7606
|
+
selector: 'vaadin-multi-select-combo-box-internal',
|
7607
|
+
mappings: {
|
7608
|
+
backgroundColor: { selector: 'vaadin-multi-select-combo-box-scroller' },
|
7609
|
+
minHeight: { selector: 'vaadin-multi-select-combo-box-overlay' },
|
7610
|
+
margin: { selector: 'vaadin-multi-select-combo-box-overlay' },
|
7611
|
+
cursor: { selector: 'vaadin-multi-select-combo-box-item' },
|
7612
|
+
fontFamily: { selector: 'vaadin-multi-select-combo-box-item' },
|
7613
|
+
fontSize: { selector: 'vaadin-multi-select-combo-box-item' },
|
7614
|
+
itemBoxShadow: { selector: 'vaadin-multi-select-combo-box-item', property: 'box-shadow' },
|
7615
|
+
itemPaddingInlineStart: {
|
7616
|
+
selector: 'vaadin-multi-select-combo-box-item',
|
7617
|
+
property: 'padding-inline-start',
|
7685
7618
|
},
|
7686
|
-
|
7687
|
-
|
7619
|
+
itemPaddingInlineEnd: {
|
7620
|
+
selector: 'vaadin-multi-select-combo-box-item',
|
7621
|
+
property: 'padding-inline-end',
|
7688
7622
|
},
|
7689
7623
|
},
|
7690
|
-
|
7691
|
-
|
7692
|
-
|
7693
|
-
|
7694
|
-
},
|
7695
|
-
}
|
7696
|
-
|
7697
|
-
|
7698
|
-
|
7699
|
-
|
7700
|
-
|
7701
|
-
|
7702
|
-
|
7703
|
-
|
7704
|
-
|
7705
|
-
|
7706
|
-
|
7707
|
-
|
7708
|
-
|
7709
|
-
|
7710
|
-
|
7711
|
-
|
7712
|
-
{
|
7713
|
-
labelTextColor: globalRefs$h.colors.surface.contrast,
|
7714
|
-
valueTextColor: globalRefs$h.colors.surface.contrast,
|
7715
|
-
placeholderTextColor: globalRefs$h.colors.surface.main,
|
7716
|
-
requiredIndicator: "'*'",
|
7717
|
-
errorMessageTextColor: globalRefs$h.colors.error.main,
|
7718
|
-
|
7719
|
-
borderWidth: globalRefs$h.border.xs,
|
7720
|
-
borderRadius: globalRefs$h.radius.xs,
|
7721
|
-
borderColor: 'transparent',
|
7722
|
-
|
7723
|
-
outlineWidth: globalRefs$h.border.sm,
|
7724
|
-
outlineStyle: 'solid',
|
7725
|
-
outlineColor: 'transparent',
|
7726
|
-
outlineOffset: '0px', // we need to keep the px unit even for 0 value, as this var is used for calc in different component classes
|
7727
|
-
|
7728
|
-
minWidth: '10em',
|
7729
|
-
toggleButtonSize: '1.5em',
|
7730
|
-
inputHeight: '3em',
|
7731
|
-
horizontalPadding: '0.5em',
|
7732
|
-
verticalPadding: '0.5em',
|
7733
|
-
|
7734
|
-
backgroundColor: globalRefs$h.colors.surface.light,
|
7735
|
-
|
7736
|
-
fontFamily: globalRefs$h.fonts.font1.family,
|
7624
|
+
forward: {
|
7625
|
+
include: false,
|
7626
|
+
attributes: ['size'],
|
7627
|
+
},
|
7628
|
+
}),
|
7629
|
+
composedProxyInputMixin({ proxyProps: ['selectionStart'], inputEvent: 'selected-items-changed' }),
|
7630
|
+
componentNameValidationMixin,
|
7631
|
+
MultiSelectComboBoxMixin
|
7632
|
+
)(
|
7633
|
+
createProxy({
|
7634
|
+
slots: ['', 'prefix'],
|
7635
|
+
wrappedEleName: 'vaadin-multi-select-combo-box',
|
7636
|
+
style: () => `
|
7637
|
+
:host {
|
7638
|
+
display: inline-flex;
|
7639
|
+
box-sizing: border-box;
|
7640
|
+
-webkit-mask-image: none;
|
7641
|
+
}
|
7642
|
+
${useHostExternalPadding(MultiSelectComboBoxClass.cssVarList)}
|
7643
|
+
${resetInputReadonlyStyle('vaadin-multi-select-combo-box')}
|
7644
|
+
${resetInputPlaceholder('vaadin-multi-select-combo-box')}
|
7645
|
+
${resetInputCursor('vaadin-multi-select-combo-box')}
|
7737
7646
|
|
7738
|
-
|
7647
|
+
vaadin-multi-select-combo-box {
|
7648
|
+
padding: 0;
|
7649
|
+
width: 100%;
|
7650
|
+
}
|
7651
|
+
vaadin-multi-select-combo-box::before {
|
7652
|
+
height: initial;
|
7653
|
+
}
|
7654
|
+
vaadin-multi-select-combo-box [slot="input"] {
|
7655
|
+
-webkit-mask-image: none;
|
7656
|
+
min-height: 0;
|
7657
|
+
align-self: center;
|
7658
|
+
box-sizing: border-box;
|
7659
|
+
}
|
7739
7660
|
|
7740
|
-
|
7661
|
+
::part(input-field) {
|
7662
|
+
padding: 0;
|
7663
|
+
box-shadow: none;
|
7664
|
+
}
|
7665
|
+
${resetInputLabelPosition('vaadin-multi-select-combo-box')}
|
7666
|
+
:host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {
|
7667
|
+
display: block;
|
7668
|
+
}
|
7741
7669
|
|
7742
|
-
|
7743
|
-
|
7744
|
-
|
7745
|
-
|
7746
|
-
|
7747
|
-
|
7670
|
+
vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::before,
|
7671
|
+
vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {
|
7672
|
+
left: -4px;
|
7673
|
+
right: -4px;
|
7674
|
+
border-left-width: 0;
|
7675
|
+
border-inline-start-style: solid;
|
7676
|
+
border-inline-start-width: 2px;
|
7677
|
+
}
|
7678
|
+
vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {
|
7679
|
+
left: -8px;
|
7680
|
+
right: -8px;
|
7681
|
+
}
|
7748
7682
|
|
7749
|
-
|
7750
|
-
|
7751
|
-
}
|
7683
|
+
:host([has-no-options][allow-custom-value='true']) ::part(toggle-button) {
|
7684
|
+
display: none;
|
7685
|
+
}
|
7686
|
+
`,
|
7687
|
+
// Note: we exclude `size` to avoid overriding Vaadin's ComboBox property
|
7688
|
+
// with the same name. Including it will cause Vaadin to calculate NaN size,
|
7689
|
+
// and reset items to an empty array, and opening the list box with no items
|
7690
|
+
// to display.
|
7691
|
+
// Note: we exclude `placeholder` because the vaadin component observes it and
|
7692
|
+
// tries to override it, causing us to lose the user set placeholder.
|
7693
|
+
excludeAttrsSync: ['tabindex', 'size', 'data', 'placeholder'],
|
7694
|
+
componentName: componentName$4,
|
7695
|
+
includeForwardProps: ['items', 'renderer', 'selectedItems'],
|
7696
|
+
})
|
7697
|
+
);
|
7752
7698
|
|
7753
|
-
|
7754
|
-
outlineColor: globalRefs$h.colors.surface.main,
|
7755
|
-
_invalid: {
|
7756
|
-
outlineColor: globalRefs$h.colors.error.main,
|
7757
|
-
},
|
7758
|
-
},
|
7699
|
+
customElements.define(componentName$4, MultiSelectComboBoxClass);
|
7759
7700
|
|
7760
|
-
|
7761
|
-
outlineWidth: globalRefs$h.border.xs,
|
7762
|
-
borderColor: globalRefs$h.colors.surface.main,
|
7763
|
-
borderStyle: 'solid',
|
7764
|
-
_invalid: {
|
7765
|
-
borderColor: globalRefs$h.colors.error.main,
|
7766
|
-
},
|
7767
|
-
},
|
7701
|
+
const componentName$3 = getComponentName('badge');
|
7768
7702
|
|
7769
|
-
|
7770
|
-
|
7771
|
-
|
7772
|
-
valueTextColor: globalRefs$h.colors.surface.dark,
|
7773
|
-
placeholderTextColor: globalRefs$h.colors.surface.dark,
|
7774
|
-
backgroundColor: globalRefs$h.colors.surface.main,
|
7775
|
-
},
|
7776
|
-
},
|
7777
|
-
componentName$3
|
7778
|
-
);
|
7703
|
+
class RawBadge extends createBaseClass({ componentName: componentName$3, baseSelector: ':host > div' }) {
|
7704
|
+
constructor() {
|
7705
|
+
super();
|
7779
7706
|
|
7780
|
-
|
7781
|
-
|
7782
|
-
|
7783
|
-
|
7784
|
-
|
7785
|
-
|
7707
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
7708
|
+
<style>
|
7709
|
+
:host {
|
7710
|
+
display: inline-flex;
|
7711
|
+
}
|
7712
|
+
:host > div {
|
7713
|
+
width: 100%;
|
7714
|
+
}
|
7715
|
+
</style>
|
7716
|
+
<div>
|
7717
|
+
<slot></slot>
|
7718
|
+
</div>
|
7719
|
+
`;
|
7720
|
+
}
|
7721
|
+
}
|
7786
7722
|
|
7787
|
-
const
|
7723
|
+
const BadgeClass = compose(
|
7724
|
+
createStyleMixin({
|
7725
|
+
mappings: {
|
7726
|
+
hostWidth: [{ selector: () => ':host', property: 'width' }],
|
7727
|
+
hostDirection: { property: 'direction' },
|
7788
7728
|
|
7789
|
-
|
7790
|
-
|
7791
|
-
|
7792
|
-
|
7793
|
-
|
7794
|
-
|
7795
|
-
[vars$t.labelTextColor]: refs.labelTextColor,
|
7796
|
-
[vars$t.labelRequiredIndicator]: refs.requiredIndicator,
|
7797
|
-
[vars$t.errorMessageTextColor]: refs.errorMessageTextColor,
|
7798
|
-
[vars$t.inputValueTextColor]: refs.valueTextColor,
|
7799
|
-
[vars$t.inputPlaceholderColor]: refs.placeholderTextColor,
|
7800
|
-
[vars$t.inputBorderWidth]: refs.borderWidth,
|
7801
|
-
[vars$t.inputBorderStyle]: refs.borderStyle,
|
7802
|
-
[vars$t.inputBorderColor]: refs.borderColor,
|
7803
|
-
[vars$t.inputBorderRadius]: refs.borderRadius,
|
7804
|
-
[vars$t.inputOutlineWidth]: refs.outlineWidth,
|
7805
|
-
[vars$t.inputOutlineStyle]: refs.outlineStyle,
|
7806
|
-
[vars$t.inputOutlineColor]: refs.outlineColor,
|
7807
|
-
[vars$t.inputOutlineOffset]: refs.outlineOffset,
|
7808
|
-
[vars$t.inputBackgroundColor]: refs.backgroundColor,
|
7809
|
-
[vars$t.inputHeight]: refs.inputHeight,
|
7810
|
-
[vars$t.inputHorizontalPadding]: refs.horizontalPadding,
|
7811
|
-
};
|
7729
|
+
fontFamily: {},
|
7730
|
+
fontSize: {},
|
7731
|
+
fontWeight: {},
|
7732
|
+
textTransform: {},
|
7733
|
+
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
7734
|
+
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
7812
7735
|
|
7813
|
-
|
7814
|
-
|
7815
|
-
|
7816
|
-
|
7817
|
-
vars: vars$t
|
7818
|
-
});
|
7736
|
+
borderWidth: {},
|
7737
|
+
borderStyle: {},
|
7738
|
+
borderColor: {},
|
7739
|
+
borderRadius: {},
|
7819
7740
|
|
7820
|
-
|
7821
|
-
const vars$s = PasswordClass.cssVarList;
|
7741
|
+
backgroundColor: {},
|
7822
7742
|
|
7823
|
-
|
7824
|
-
|
7825
|
-
|
7826
|
-
|
7827
|
-
|
7828
|
-
|
7829
|
-
|
7830
|
-
[vars$s.inputHorizontalPadding]: refs.horizontalPadding,
|
7831
|
-
[vars$s.inputHeight]: refs.inputHeight,
|
7832
|
-
[vars$s.inputBackgroundColor]: refs.backgroundColor,
|
7833
|
-
[vars$s.labelRequiredIndicator]: refs.requiredIndicator,
|
7834
|
-
[vars$s.inputValueTextColor]: refs.valueTextColor,
|
7835
|
-
[vars$s.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
7836
|
-
[vars$s.inputBorderWidth]: refs.borderWidth,
|
7837
|
-
[vars$s.inputBorderStyle]: refs.borderStyle,
|
7838
|
-
[vars$s.inputBorderColor]: refs.borderColor,
|
7839
|
-
[vars$s.inputBorderRadius]: refs.borderRadius,
|
7840
|
-
[vars$s.inputOutlineWidth]: refs.outlineWidth,
|
7841
|
-
[vars$s.inputOutlineStyle]: refs.outlineStyle,
|
7842
|
-
[vars$s.inputOutlineColor]: refs.outlineColor,
|
7843
|
-
[vars$s.inputOutlineOffset]: refs.outlineOffset,
|
7844
|
-
[vars$s.revealButtonOffset]: globalRefs$g.spacing.md,
|
7845
|
-
[vars$s.revealButtonSize]: refs.toggleButtonSize,
|
7846
|
-
};
|
7743
|
+
textColor: { property: 'color' },
|
7744
|
+
textAlign: {},
|
7745
|
+
},
|
7746
|
+
}),
|
7747
|
+
draggableMixin,
|
7748
|
+
componentNameValidationMixin
|
7749
|
+
)(RawBadge);
|
7847
7750
|
|
7848
|
-
|
7849
|
-
__proto__: null,
|
7850
|
-
default: password,
|
7851
|
-
vars: vars$s
|
7852
|
-
});
|
7751
|
+
customElements.define(componentName$3, BadgeClass);
|
7853
7752
|
|
7854
|
-
const
|
7753
|
+
const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
|
7855
7754
|
|
7856
|
-
const
|
7857
|
-
[
|
7858
|
-
|
7859
|
-
|
7860
|
-
|
7861
|
-
|
7862
|
-
|
7863
|
-
[vars$r.errorMessageTextColor]: refs.errorMessageTextColor,
|
7864
|
-
[vars$r.inputValueTextColor]: refs.valueTextColor,
|
7865
|
-
[vars$r.inputPlaceholderColor]: refs.placeholderTextColor,
|
7866
|
-
[vars$r.inputBorderWidth]: refs.borderWidth,
|
7867
|
-
[vars$r.inputBorderStyle]: refs.borderStyle,
|
7868
|
-
[vars$r.inputBorderColor]: refs.borderColor,
|
7869
|
-
[vars$r.inputBorderRadius]: refs.borderRadius,
|
7870
|
-
[vars$r.inputOutlineWidth]: refs.outlineWidth,
|
7871
|
-
[vars$r.inputOutlineStyle]: refs.outlineStyle,
|
7872
|
-
[vars$r.inputOutlineColor]: refs.outlineColor,
|
7873
|
-
[vars$r.inputOutlineOffset]: refs.outlineOffset,
|
7874
|
-
[vars$r.inputBackgroundColor]: refs.backgroundColor,
|
7875
|
-
[vars$r.labelRequiredIndicator]: refs.requiredIndicator,
|
7876
|
-
[vars$r.inputHorizontalPadding]: refs.horizontalPadding,
|
7877
|
-
[vars$r.inputHeight]: refs.inputHeight,
|
7755
|
+
const transformTheme = (theme, path, getTransformation) => {
|
7756
|
+
return Object.entries(theme).reduce((acc, [key, val]) => {
|
7757
|
+
if (val?.constructor !== Object) {
|
7758
|
+
return merge(acc, getTransformation(path.concat(key), val));
|
7759
|
+
}
|
7760
|
+
return merge(acc, transformTheme(val, [...path, key], getTransformation));
|
7761
|
+
}, {});
|
7878
7762
|
};
|
7879
7763
|
|
7880
|
-
|
7881
|
-
|
7882
|
-
default: numberField,
|
7883
|
-
vars: vars$r
|
7884
|
-
});
|
7885
|
-
|
7886
|
-
const vars$q = EmailFieldClass.cssVarList;
|
7764
|
+
const stringifyArray = (strArr) =>
|
7765
|
+
strArr.map((str) => (str.includes(' ') ? `"${str}"` : str)).join(', ');
|
7887
7766
|
|
7888
|
-
const
|
7889
|
-
|
7890
|
-
|
7891
|
-
|
7892
|
-
|
7893
|
-
|
7894
|
-
|
7895
|
-
|
7896
|
-
|
7897
|
-
[vars$q.labelRequiredIndicator]: refs.requiredIndicator,
|
7898
|
-
[vars$q.inputPlaceholderColor]: refs.placeholderTextColor,
|
7899
|
-
[vars$q.inputBorderWidth]: refs.borderWidth,
|
7900
|
-
[vars$q.inputBorderStyle]: refs.borderStyle,
|
7901
|
-
[vars$q.inputBorderColor]: refs.borderColor,
|
7902
|
-
[vars$q.inputBorderRadius]: refs.borderRadius,
|
7903
|
-
[vars$q.inputOutlineWidth]: refs.outlineWidth,
|
7904
|
-
[vars$q.inputOutlineStyle]: refs.outlineStyle,
|
7905
|
-
[vars$q.inputOutlineColor]: refs.outlineColor,
|
7906
|
-
[vars$q.inputOutlineOffset]: refs.outlineOffset,
|
7907
|
-
[vars$q.inputBackgroundColor]: refs.backgroundColor,
|
7908
|
-
[vars$q.inputHorizontalPadding]: refs.horizontalPadding,
|
7909
|
-
[vars$q.inputHeight]: refs.inputHeight,
|
7767
|
+
const getCssVarValue = (val) => {
|
7768
|
+
switch (true) {
|
7769
|
+
case Array.isArray(val):
|
7770
|
+
return stringifyArray(val);
|
7771
|
+
case isUrl(val):
|
7772
|
+
return `url(${val})`;
|
7773
|
+
default:
|
7774
|
+
return val;
|
7775
|
+
}
|
7910
7776
|
};
|
7911
7777
|
|
7912
|
-
|
7913
|
-
|
7914
|
-
|
7915
|
-
|
7916
|
-
});
|
7917
|
-
|
7918
|
-
const globalRefs$f = getThemeRefs(globals);
|
7919
|
-
const vars$p = TextAreaClass.cssVarList;
|
7778
|
+
const themeToCSSVarsObj = (theme) =>
|
7779
|
+
transformTheme(theme, [], (path, val) => ({
|
7780
|
+
[getVarName(path)]: getCssVarValue(val),
|
7781
|
+
}));
|
7920
7782
|
|
7921
|
-
const
|
7922
|
-
[
|
7923
|
-
|
7924
|
-
|
7925
|
-
[vars$p.fontSize]: refs.fontSize,
|
7926
|
-
[vars$p.fontFamily]: refs.fontFamily,
|
7927
|
-
[vars$p.labelTextColor]: refs.labelTextColor,
|
7928
|
-
[vars$p.labelRequiredIndicator]: refs.requiredIndicator,
|
7929
|
-
[vars$p.errorMessageTextColor]: refs.errorMessageTextColor,
|
7930
|
-
[vars$p.inputBackgroundColor]: refs.backgroundColor,
|
7931
|
-
[vars$p.inputValueTextColor]: refs.valueTextColor,
|
7932
|
-
[vars$p.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
7933
|
-
[vars$p.inputBorderRadius]: refs.borderRadius,
|
7934
|
-
[vars$p.inputBorderWidth]: refs.borderWidth,
|
7935
|
-
[vars$p.inputBorderStyle]: refs.borderStyle,
|
7936
|
-
[vars$p.inputBorderColor]: refs.borderColor,
|
7937
|
-
[vars$p.inputOutlineWidth]: refs.outlineWidth,
|
7938
|
-
[vars$p.inputOutlineStyle]: refs.outlineStyle,
|
7939
|
-
[vars$p.inputOutlineColor]: refs.outlineColor,
|
7940
|
-
[vars$p.inputOutlineOffset]: refs.outlineOffset,
|
7941
|
-
[vars$p.inputResizeType]: 'vertical',
|
7942
|
-
[vars$p.inputMinHeight]: '5em',
|
7783
|
+
const getThemeRefs = (theme, prefix) =>
|
7784
|
+
transformTheme(theme, [], (path) =>
|
7785
|
+
set({}, path, `var(${getVarName(prefix ? [prefix, ...path] : path)})`)
|
7786
|
+
);
|
7943
7787
|
|
7944
|
-
|
7945
|
-
|
7946
|
-
},
|
7788
|
+
const getThemeVars = (theme, prefix) =>
|
7789
|
+
transformTheme(theme, [], (path) => set({}, path, getVarName(prefix ? [prefix, ...path] : path)));
|
7947
7790
|
|
7948
|
-
|
7949
|
-
|
7950
|
-
|
7951
|
-
|
7791
|
+
const globalsThemeToStyle = (theme, themeName = '') => {
|
7792
|
+
const style = Object.entries(themeToCSSVarsObj(theme)).reduce(
|
7793
|
+
(acc, entry) => `${acc}${entry.join(':')};\n`,
|
7794
|
+
''
|
7795
|
+
);
|
7952
7796
|
|
7953
|
-
|
7954
|
-
__proto__: null,
|
7955
|
-
default: textArea,
|
7956
|
-
vars: vars$p
|
7957
|
-
});
|
7797
|
+
if (!themeName) return style;
|
7958
7798
|
|
7959
|
-
|
7960
|
-
|
7799
|
+
return `*[data-theme="${themeName}"] {${style}}`;
|
7800
|
+
};
|
7961
7801
|
|
7962
|
-
const
|
7963
|
-
[
|
7964
|
-
|
7965
|
-
|
7966
|
-
|
7967
|
-
[vars$o.labelTextColor]: refs.labelTextColor,
|
7968
|
-
[vars$o.labelRequiredIndicator]: refs.requiredIndicator,
|
7969
|
-
[vars$o.labelFontWeight]: '400',
|
7970
|
-
[vars$o.labelLineHeight]: checkboxSize,
|
7971
|
-
[vars$o.labelSpacing]: '1em',
|
7972
|
-
[vars$o.errorMessageTextColor]: refs.errorMessageTextColor,
|
7973
|
-
[vars$o.inputOutlineWidth]: refs.outlineWidth,
|
7974
|
-
[vars$o.inputOutlineOffset]: refs.outlineOffset,
|
7975
|
-
[vars$o.inputOutlineColor]: refs.outlineColor,
|
7976
|
-
[vars$o.inputOutlineStyle]: refs.outlineStyle,
|
7977
|
-
[vars$o.inputBorderRadius]: refs.borderRadius,
|
7978
|
-
[vars$o.inputBorderColor]: refs.borderColor,
|
7979
|
-
[vars$o.inputBorderWidth]: refs.borderWidth,
|
7980
|
-
[vars$o.inputBorderStyle]: refs.borderStyle,
|
7981
|
-
[vars$o.inputBackgroundColor]: refs.backgroundColor,
|
7982
|
-
[vars$o.inputSize]: checkboxSize,
|
7802
|
+
const componentsThemeToStyleObj = (componentsTheme) =>
|
7803
|
+
transformTheme(componentsTheme, [], (path, val) => {
|
7804
|
+
const [component, ...restPath] = path;
|
7805
|
+
const property = restPath.pop();
|
7806
|
+
const componentName = getComponentName(component);
|
7983
7807
|
|
7984
|
-
|
7985
|
-
|
7986
|
-
|
7808
|
+
if (property === 'undefined') {
|
7809
|
+
// eslint-disable-next-line no-console
|
7810
|
+
console.warn(componentName, `theme value: "${val}" is mapped to an invalid property`);
|
7811
|
+
}
|
7987
7812
|
|
7988
|
-
|
7989
|
-
|
7990
|
-
|
7991
|
-
|
7813
|
+
// we need a support for portal components theme (e.g. overlay)
|
7814
|
+
// this allows us to generate those themes under different sections
|
7815
|
+
// if the theme has root level attribute that starts with #
|
7816
|
+
// we are generating a new theme
|
7817
|
+
let themeName = BASE_THEME_SECTION;
|
7992
7818
|
|
7993
|
-
|
7994
|
-
|
7995
|
-
|
7996
|
-
vars: vars$o
|
7997
|
-
});
|
7819
|
+
if (restPath[0] && restPath[0].startsWith(PORTAL_THEME_PREFIX)) {
|
7820
|
+
themeName = restPath.shift();
|
7821
|
+
}
|
7998
7822
|
|
7999
|
-
|
8000
|
-
|
7823
|
+
// do not start with underscore -> key:value, must have 2 no underscore attrs in a row
|
7824
|
+
// starts with underscore -> attribute selector
|
7825
|
+
const attrsSelector = restPath.reduce((acc, section, idx) => {
|
7826
|
+
if (section.startsWith('_')) return `${acc}[${kebabCase(section.replace(/^_/, ''))}="true"]`;
|
8001
7827
|
|
8002
|
-
const
|
8003
|
-
const vars$n = SwitchToggleClass.cssVarList;
|
7828
|
+
const nextSection = restPath[idx + 1];
|
8004
7829
|
|
8005
|
-
|
8006
|
-
|
8007
|
-
|
8008
|
-
|
8009
|
-
|
7830
|
+
if (typeof nextSection !== 'string' || nextSection.startsWith('_')) {
|
7831
|
+
// eslint-disable-next-line no-console
|
7832
|
+
console.error(
|
7833
|
+
'theme generator',
|
7834
|
+
`your theme structure is invalid, attribute "${section}" is followed by "${nextSection}" which is not allowed`
|
7835
|
+
);
|
7836
|
+
return acc;
|
7837
|
+
}
|
8010
7838
|
|
8011
|
-
|
8012
|
-
|
8013
|
-
[vars$n.inputOutlineColor]: refs.outlineColor,
|
8014
|
-
[vars$n.inputOutlineStyle]: refs.outlineStyle,
|
7839
|
+
return `${acc}[${kebabCase(section)}="${restPath.splice(idx + 1, 1).join('')}"]`;
|
7840
|
+
}, '');
|
8015
7841
|
|
8016
|
-
|
8017
|
-
[vars$n.trackBorderWidth]: refs.borderWidth, // var `trackBorderWidth` used outside the theme for `left` margin calculation
|
8018
|
-
[vars$n.trackBorderColor]: refs.borderColor,
|
8019
|
-
[vars$n.trackBackgroundColor]: 'none',
|
8020
|
-
[vars$n.trackBorderRadius]: globalRefs$e.radius.md,
|
8021
|
-
[vars$n.trackWidth]: '2.5em', // var `trackWidth` used outside the theme for `left` margin calculation
|
8022
|
-
[vars$n.trackHeight]: checkboxHeight,
|
7842
|
+
const selector = `:host${attrsSelector ? `(${attrsSelector})` : ''}`;
|
8023
7843
|
|
8024
|
-
|
8025
|
-
|
8026
|
-
|
8027
|
-
|
8028
|
-
|
8029
|
-
|
7844
|
+
return {
|
7845
|
+
[componentName]: {
|
7846
|
+
[themeName]: {
|
7847
|
+
[selector]: {
|
7848
|
+
[property]: getCssVarValue(val),
|
7849
|
+
},
|
7850
|
+
},
|
7851
|
+
},
|
7852
|
+
};
|
7853
|
+
});
|
8030
7854
|
|
8031
|
-
|
8032
|
-
|
8033
|
-
|
8034
|
-
|
8035
|
-
|
8036
|
-
|
7855
|
+
const componentsThemeToStyle = (componentsTheme) =>
|
7856
|
+
Object.entries(componentsTheme).reduce(
|
7857
|
+
(acc, [selector, vars]) =>
|
7858
|
+
`${acc}${selector} { \n${Object.entries(vars)
|
7859
|
+
.map(([key, val]) => `${key}: ${val}`)
|
7860
|
+
.join(';\n')} \n}\n\n`,
|
7861
|
+
''
|
7862
|
+
);
|
8037
7863
|
|
8038
|
-
|
8039
|
-
|
8040
|
-
[vars$n.trackBackgroundColor]: refs.backgroundColor,
|
8041
|
-
[vars$n.knobLeftOffset]: `calc(100% - var(${vars$n.knobSize}) - ${knobMargin})`,
|
8042
|
-
[vars$n.knobColor]: refs.valueTextColor,
|
8043
|
-
[vars$n.knobTextColor]: refs.valueTextColor,
|
8044
|
-
},
|
7864
|
+
const createComponentsTheme = (componentsTheme) => {
|
7865
|
+
const styleObj = componentsThemeToStyleObj(componentsTheme);
|
8045
7866
|
|
8046
|
-
|
8047
|
-
[
|
8048
|
-
[vars$n.trackBorderColor]: globalRefs$e.colors.surface.main,
|
8049
|
-
[vars$n.trackBackgroundColor]: globalRefs$e.colors.surface.main,
|
8050
|
-
[vars$n.labelTextColor]: refs.labelTextColor,
|
8051
|
-
_checked: {
|
8052
|
-
[vars$n.knobColor]: globalRefs$e.colors.surface.light,
|
8053
|
-
[vars$n.trackBackgroundColor]: globalRefs$e.colors.surface.main,
|
8054
|
-
},
|
8055
|
-
},
|
7867
|
+
return Object.keys(styleObj).reduce((acc, componentName) => {
|
7868
|
+
const componentThemes = styleObj[componentName];
|
8056
7869
|
|
8057
|
-
|
8058
|
-
|
8059
|
-
|
8060
|
-
|
7870
|
+
return Object.assign(acc, {
|
7871
|
+
[componentName]: Object.keys(componentThemes).reduce(
|
7872
|
+
(res, theme) =>
|
7873
|
+
Object.assign(res, { [theme]: componentsThemeToStyle(componentThemes[theme]) }),
|
7874
|
+
{}
|
7875
|
+
),
|
7876
|
+
});
|
7877
|
+
}, {});
|
8061
7878
|
};
|
8062
7879
|
|
8063
|
-
|
8064
|
-
|
8065
|
-
|
8066
|
-
vars: vars$n
|
7880
|
+
const themeToStyle = ({ globals, components }, themeName) => ({
|
7881
|
+
globals: globalsThemeToStyle(globals, themeName),
|
7882
|
+
components: createComponentsTheme(components),
|
8067
7883
|
});
|
8068
7884
|
|
8069
|
-
const
|
7885
|
+
const useVar = (varName) => `var(${varName})`;
|
8070
7886
|
|
8071
|
-
const
|
7887
|
+
const createHelperVars = (theme, prefix) => {
|
7888
|
+
const res = transformTheme(theme, [], (path, value) => {
|
7889
|
+
const modifiedPath = [...path];
|
7890
|
+
const property = modifiedPath.splice(-1);
|
7891
|
+
const varName = getCssVarName(prefix, property);
|
8072
7892
|
|
8073
|
-
const
|
8074
|
-
|
8075
|
-
|
8076
|
-
|
7893
|
+
const vars = { [property]: varName };
|
7894
|
+
const useVars = { [property]: useVar(varName) };
|
7895
|
+
|
7896
|
+
return { theme: set({}, [...modifiedPath, varName], value), useVars, vars };
|
7897
|
+
});
|
7898
|
+
|
7899
|
+
return [res.theme, res.useVars, res.vars];
|
8077
7900
|
};
|
8078
7901
|
|
8079
|
-
const
|
8080
|
-
|
8081
|
-
|
8082
|
-
|
7902
|
+
const genDark = (c, percentage = 0.5) => c.darken(percentage).hex();
|
7903
|
+
const genLight = (c, percentage = 0.5) => c.lighten(percentage).hex();
|
7904
|
+
const genContrast = (c, percentage = 0.9) => {
|
7905
|
+
const isDark = c.isDark();
|
7906
|
+
return c
|
7907
|
+
.mix(Color(isDark ? 'white' : 'black'), percentage)
|
7908
|
+
.saturate(1)
|
7909
|
+
.hex();
|
8083
7910
|
};
|
8084
7911
|
|
8085
|
-
const
|
8086
|
-
|
8087
|
-
verticalAlignment,
|
8088
|
-
horizontalAlignment,
|
8089
|
-
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
8090
|
-
},
|
8091
|
-
componentName$y
|
8092
|
-
);
|
7912
|
+
const genColor = (color) => {
|
7913
|
+
const mainColor = new Color(color.main || color);
|
8093
7914
|
|
8094
|
-
|
7915
|
+
return {
|
7916
|
+
main: mainColor.hex(),
|
7917
|
+
dark: color.dark || genDark(mainColor),
|
7918
|
+
light: color.light || genLight(mainColor),
|
7919
|
+
contrast: color.contrast || genContrast(mainColor),
|
7920
|
+
};
|
7921
|
+
};
|
8095
7922
|
|
8096
|
-
const
|
8097
|
-
|
7923
|
+
const genColors = (colors) => {
|
7924
|
+
return Object.keys(colors).reduce((acc, colorName) => {
|
7925
|
+
const currentColor = colors[colorName];
|
8098
7926
|
|
8099
|
-
|
8100
|
-
|
8101
|
-
|
8102
|
-
|
8103
|
-
|
7927
|
+
return Object.assign(acc, {
|
7928
|
+
[colorName]: genColor(currentColor),
|
7929
|
+
});
|
7930
|
+
}, {});
|
7931
|
+
};
|
8104
7932
|
|
8105
|
-
|
8106
|
-
|
8107
|
-
|
8108
|
-
|
7933
|
+
const direction = 'ltr';
|
7934
|
+
|
7935
|
+
const colors = genColors({
|
7936
|
+
surface: {
|
7937
|
+
main: 'lightgray',
|
7938
|
+
light: '#fff',
|
7939
|
+
dark: '#000',
|
7940
|
+
},
|
7941
|
+
primary: '#006af5',
|
7942
|
+
secondary: '#7D14EB',
|
7943
|
+
success: 'green',
|
7944
|
+
error: '#e21d12',
|
7945
|
+
});
|
7946
|
+
|
7947
|
+
const fonts = {
|
7948
|
+
font1: {
|
7949
|
+
family: [
|
7950
|
+
'Roboto',
|
7951
|
+
'ui-sans-serif',
|
7952
|
+
'system-ui',
|
7953
|
+
'-apple-system',
|
7954
|
+
'BlinkMacSystemFont',
|
7955
|
+
'Segoe UI',
|
7956
|
+
'Helvetica Neue',
|
7957
|
+
'Arial',
|
7958
|
+
'Noto Sans',
|
7959
|
+
'sans-serif',
|
7960
|
+
'Apple Color Emoji',
|
7961
|
+
'Segoe UI Emoji',
|
7962
|
+
'Segoe UI Symbol',
|
7963
|
+
'Noto Color Emoji',
|
7964
|
+
],
|
7965
|
+
label: 'Roboto',
|
7966
|
+
url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
|
7967
|
+
},
|
7968
|
+
font2: {
|
7969
|
+
family: [
|
7970
|
+
'ui-sans-serif',
|
7971
|
+
'system-ui',
|
7972
|
+
'-apple-system',
|
7973
|
+
'BlinkMacSystemFont',
|
7974
|
+
'Segoe UI',
|
7975
|
+
'Roboto',
|
7976
|
+
'Helvetica Neue',
|
7977
|
+
'Arial',
|
7978
|
+
'Noto Sans',
|
7979
|
+
'sans-serif',
|
7980
|
+
'Apple Color Emoji',
|
7981
|
+
'Segoe UI Emoji',
|
7982
|
+
'Segoe UI Symbol',
|
7983
|
+
'Noto Color Emoji',
|
7984
|
+
],
|
7985
|
+
label: 'Sans Serif',
|
7986
|
+
},
|
7987
|
+
};
|
7988
|
+
|
7989
|
+
const fontsRef = getThemeRefs({ fonts }).fonts;
|
7990
|
+
|
7991
|
+
const typography = {
|
7992
|
+
h1: {
|
7993
|
+
font: fontsRef.font1.family,
|
7994
|
+
weight: '900',
|
7995
|
+
size: '48px',
|
7996
|
+
},
|
7997
|
+
h2: {
|
7998
|
+
font: fontsRef.font1.family,
|
7999
|
+
weight: '800',
|
8000
|
+
size: '38px',
|
8109
8001
|
},
|
8110
|
-
|
8111
|
-
|
8112
|
-
|
8113
|
-
|
8114
|
-
lg: { [compVars$3.horizontalPadding]: '20px' },
|
8002
|
+
h3: {
|
8003
|
+
font: fontsRef.font1.family,
|
8004
|
+
weight: '600',
|
8005
|
+
size: '28px',
|
8115
8006
|
},
|
8116
|
-
|
8117
|
-
|
8118
|
-
|
8119
|
-
|
8120
|
-
[compVars$3.alignItems]: helperRefs$2.verticalAlignment,
|
8121
|
-
[compVars$3.justifyContent]: helperRefs$2.horizontalAlignment,
|
8122
|
-
[compVars$3.flexWrap]: 'wrap',
|
8123
|
-
horizontalAlignment: {
|
8124
|
-
spaceBetween: {
|
8125
|
-
[helperVars$2.horizontalAlignment]: 'space-between',
|
8126
|
-
},
|
8127
|
-
},
|
8128
|
-
},
|
8129
|
-
column: {
|
8130
|
-
[compVars$3.flexDirection]: 'column',
|
8131
|
-
[compVars$3.alignItems]: helperRefs$2.horizontalAlignment,
|
8132
|
-
[compVars$3.justifyContent]: helperRefs$2.verticalAlignment,
|
8133
|
-
verticalAlignment: {
|
8134
|
-
spaceBetween: {
|
8135
|
-
[helperVars$2.verticalAlignment]: 'space-between',
|
8136
|
-
},
|
8137
|
-
},
|
8138
|
-
},
|
8007
|
+
subtitle1: {
|
8008
|
+
font: fontsRef.font2.family,
|
8009
|
+
weight: '500',
|
8010
|
+
size: '22px',
|
8139
8011
|
},
|
8140
|
-
|
8141
|
-
|
8142
|
-
|
8143
|
-
|
8144
|
-
lg: { [compVars$3.gap]: '30px' },
|
8012
|
+
subtitle2: {
|
8013
|
+
font: fontsRef.font2.family,
|
8014
|
+
weight: '400',
|
8015
|
+
size: '20px',
|
8145
8016
|
},
|
8146
|
-
|
8147
|
-
|
8148
|
-
|
8149
|
-
|
8150
|
-
},
|
8151
|
-
md: {
|
8152
|
-
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.md} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.md} ${shadowColor$1}`,
|
8153
|
-
},
|
8154
|
-
lg: {
|
8155
|
-
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.lg} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.lg} ${shadowColor$1}`,
|
8156
|
-
},
|
8157
|
-
xl: {
|
8158
|
-
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.xl} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.xl} ${shadowColor$1}`,
|
8159
|
-
},
|
8160
|
-
'2xl': {
|
8161
|
-
[helperVars$2.shadowColor]: '#00000050', // mimic daisyUI shadow settings
|
8162
|
-
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide['2xl']} ${shadowColor$1}`,
|
8163
|
-
},
|
8017
|
+
body1: {
|
8018
|
+
font: fontsRef.font1.family,
|
8019
|
+
weight: '400',
|
8020
|
+
size: '16px',
|
8164
8021
|
},
|
8165
|
-
|
8166
|
-
|
8167
|
-
|
8168
|
-
|
8169
|
-
lg: { [compVars$3.borderRadius]: globalRefs$d.radius.lg },
|
8170
|
-
xl: { [compVars$3.borderRadius]: globalRefs$d.radius.xl },
|
8171
|
-
'2xl': { [compVars$3.borderRadius]: globalRefs$d.radius['2xl'] },
|
8172
|
-
'3xl': { [compVars$3.borderRadius]: globalRefs$d.radius['3xl'] },
|
8022
|
+
body2: {
|
8023
|
+
font: fontsRef.font1.family,
|
8024
|
+
weight: '400',
|
8025
|
+
size: '14px',
|
8173
8026
|
},
|
8174
8027
|
};
|
8175
8028
|
|
8176
|
-
const
|
8177
|
-
|
8178
|
-
|
8029
|
+
const spacing = {
|
8030
|
+
xs: '2px',
|
8031
|
+
sm: '4px',
|
8032
|
+
md: '8px',
|
8033
|
+
lg: '16px',
|
8034
|
+
xl: '32px',
|
8179
8035
|
};
|
8180
8036
|
|
8181
|
-
|
8182
|
-
|
8183
|
-
|
8184
|
-
|
8185
|
-
|
8037
|
+
const border = {
|
8038
|
+
xs: '1px',
|
8039
|
+
sm: '2px',
|
8040
|
+
md: '3px',
|
8041
|
+
lg: '4px',
|
8042
|
+
xl: '5px',
|
8043
|
+
};
|
8186
8044
|
|
8187
|
-
const
|
8045
|
+
const radius = {
|
8046
|
+
xs: '5px',
|
8047
|
+
sm: '10px',
|
8048
|
+
md: '15px',
|
8049
|
+
lg: '20px',
|
8050
|
+
xl: '25px',
|
8051
|
+
'2xl': '30px',
|
8052
|
+
'3xl': '35px',
|
8053
|
+
};
|
8188
8054
|
|
8189
|
-
const
|
8190
|
-
|
8055
|
+
const shadow = {
|
8056
|
+
wide: {
|
8057
|
+
sm: '0 2px 3px -0.5px',
|
8058
|
+
md: '0 4px 6px -1px',
|
8059
|
+
lg: '0 10px 15px -3px',
|
8060
|
+
xl: '0 20px 25px -5px',
|
8061
|
+
'2xl': '0 25px 50px -12px',
|
8062
|
+
},
|
8063
|
+
narrow: {
|
8064
|
+
sm: '0 1px 2px -1px',
|
8065
|
+
md: '0 2px 4px -2px',
|
8066
|
+
lg: '0 4px 6px -4px',
|
8067
|
+
xl: '0 8px 10px -6px',
|
8068
|
+
'2xl': '0 16px 16px -8px',
|
8069
|
+
},
|
8191
8070
|
};
|
8192
8071
|
|
8193
|
-
|
8194
|
-
|
8195
|
-
|
8196
|
-
|
8197
|
-
|
8072
|
+
const globals = {
|
8073
|
+
colors,
|
8074
|
+
typography,
|
8075
|
+
spacing,
|
8076
|
+
border,
|
8077
|
+
radius,
|
8078
|
+
shadow,
|
8079
|
+
fonts,
|
8080
|
+
direction,
|
8081
|
+
};
|
8082
|
+
const vars$w = getThemeVars(globals);
|
8198
8083
|
|
8199
|
-
const
|
8084
|
+
const globalRefs$i = getThemeRefs(globals);
|
8085
|
+
const compVars$4 = ButtonClass.cssVarList;
|
8200
8086
|
|
8201
|
-
const
|
8202
|
-
|
8087
|
+
const mode = {
|
8088
|
+
primary: globalRefs$i.colors.primary,
|
8089
|
+
secondary: globalRefs$i.colors.secondary,
|
8090
|
+
success: globalRefs$i.colors.success,
|
8091
|
+
error: globalRefs$i.colors.error,
|
8092
|
+
surface: globalRefs$i.colors.surface,
|
8203
8093
|
};
|
8204
8094
|
|
8205
|
-
|
8206
|
-
__proto__: null,
|
8207
|
-
default: logo,
|
8208
|
-
vars: vars$k
|
8209
|
-
});
|
8095
|
+
const [helperTheme$3, helperRefs$3, helperVars$3] = createHelperVars({ mode }, componentName$E);
|
8210
8096
|
|
8211
|
-
const
|
8212
|
-
|
8097
|
+
const button = {
|
8098
|
+
...helperTheme$3,
|
8213
8099
|
|
8214
|
-
|
8215
|
-
[vars$j.hostDirection]: globalRefs$c.direction,
|
8216
|
-
[vars$j.textLineHeight]: '1.35em',
|
8217
|
-
[vars$j.textAlign]: 'left',
|
8218
|
-
[vars$j.textColor]: globalRefs$c.colors.surface.dark,
|
8219
|
-
variant: {
|
8220
|
-
h1: {
|
8221
|
-
[vars$j.fontSize]: globalRefs$c.typography.h1.size,
|
8222
|
-
[vars$j.fontWeight]: globalRefs$c.typography.h1.weight,
|
8223
|
-
[vars$j.fontFamily]: globalRefs$c.typography.h1.font,
|
8224
|
-
},
|
8225
|
-
h2: {
|
8226
|
-
[vars$j.fontSize]: globalRefs$c.typography.h2.size,
|
8227
|
-
[vars$j.fontWeight]: globalRefs$c.typography.h2.weight,
|
8228
|
-
[vars$j.fontFamily]: globalRefs$c.typography.h2.font,
|
8229
|
-
},
|
8230
|
-
h3: {
|
8231
|
-
[vars$j.fontSize]: globalRefs$c.typography.h3.size,
|
8232
|
-
[vars$j.fontWeight]: globalRefs$c.typography.h3.weight,
|
8233
|
-
[vars$j.fontFamily]: globalRefs$c.typography.h3.font,
|
8234
|
-
},
|
8235
|
-
subtitle1: {
|
8236
|
-
[vars$j.fontSize]: globalRefs$c.typography.subtitle1.size,
|
8237
|
-
[vars$j.fontWeight]: globalRefs$c.typography.subtitle1.weight,
|
8238
|
-
[vars$j.fontFamily]: globalRefs$c.typography.subtitle1.font,
|
8239
|
-
},
|
8240
|
-
subtitle2: {
|
8241
|
-
[vars$j.fontSize]: globalRefs$c.typography.subtitle2.size,
|
8242
|
-
[vars$j.fontWeight]: globalRefs$c.typography.subtitle2.weight,
|
8243
|
-
[vars$j.fontFamily]: globalRefs$c.typography.subtitle2.font,
|
8244
|
-
},
|
8245
|
-
body1: {
|
8246
|
-
[vars$j.fontSize]: globalRefs$c.typography.body1.size,
|
8247
|
-
[vars$j.fontWeight]: globalRefs$c.typography.body1.weight,
|
8248
|
-
[vars$j.fontFamily]: globalRefs$c.typography.body1.font,
|
8249
|
-
},
|
8250
|
-
body2: {
|
8251
|
-
[vars$j.fontSize]: globalRefs$c.typography.body2.size,
|
8252
|
-
[vars$j.fontWeight]: globalRefs$c.typography.body2.weight,
|
8253
|
-
[vars$j.fontFamily]: globalRefs$c.typography.body2.font,
|
8254
|
-
},
|
8255
|
-
},
|
8100
|
+
[compVars$4.fontFamily]: globalRefs$i.fonts.font1.family,
|
8256
8101
|
|
8257
|
-
|
8258
|
-
|
8259
|
-
|
8260
|
-
|
8261
|
-
secondary: {
|
8262
|
-
[vars$j.textColor]: globalRefs$c.colors.secondary.main,
|
8263
|
-
},
|
8264
|
-
error: {
|
8265
|
-
[vars$j.textColor]: globalRefs$c.colors.error.main,
|
8266
|
-
},
|
8267
|
-
success: {
|
8268
|
-
[vars$j.textColor]: globalRefs$c.colors.success.main,
|
8269
|
-
},
|
8270
|
-
},
|
8102
|
+
[compVars$4.cursor]: 'pointer',
|
8103
|
+
[compVars$4.hostHeight]: '3em',
|
8104
|
+
[compVars$4.hostWidth]: 'auto',
|
8105
|
+
[compVars$4.hostDirection]: globalRefs$i.direction,
|
8271
8106
|
|
8272
|
-
|
8273
|
-
|
8274
|
-
|
8275
|
-
|
8107
|
+
[compVars$4.borderRadius]: globalRefs$i.radius.sm,
|
8108
|
+
[compVars$4.borderWidth]: globalRefs$i.border.xs,
|
8109
|
+
[compVars$4.borderStyle]: 'solid',
|
8110
|
+
[compVars$4.borderColor]: 'transparent',
|
8111
|
+
|
8112
|
+
[compVars$4.labelSpacing]: '0.25em',
|
8113
|
+
|
8114
|
+
[compVars$4.verticalPadding]: '1em',
|
8115
|
+
|
8116
|
+
[compVars$4.outlineWidth]: globals.border.sm,
|
8117
|
+
[compVars$4.outlineOffset]: '0px', // keep `px` unit for external calc
|
8118
|
+
[compVars$4.outlineStyle]: 'solid',
|
8119
|
+
[compVars$4.outlineColor]: 'transparent',
|
8120
|
+
|
8121
|
+
size: {
|
8122
|
+
xs: { [compVars$4.fontSize]: '12px' },
|
8123
|
+
sm: { [compVars$4.fontSize]: '14px' },
|
8124
|
+
md: { [compVars$4.fontSize]: '16px' },
|
8125
|
+
lg: { [compVars$4.fontSize]: '18px' },
|
8276
8126
|
},
|
8277
8127
|
|
8278
|
-
|
8279
|
-
[
|
8128
|
+
_square: {
|
8129
|
+
[compVars$4.hostHeight]: '3em',
|
8130
|
+
[compVars$4.hostWidth]: '3em',
|
8131
|
+
[compVars$4.verticalPadding]: '0',
|
8280
8132
|
},
|
8281
8133
|
|
8282
|
-
|
8283
|
-
[
|
8134
|
+
_fullWidth: {
|
8135
|
+
[compVars$4.hostWidth]: '100%',
|
8284
8136
|
},
|
8285
8137
|
|
8286
|
-
|
8287
|
-
[
|
8138
|
+
_loading: {
|
8139
|
+
[compVars$4.cursor]: 'wait',
|
8140
|
+
[compVars$4.labelTextColor]: helperRefs$3.main,
|
8288
8141
|
},
|
8289
8142
|
|
8290
|
-
|
8291
|
-
[
|
8143
|
+
_disabled: {
|
8144
|
+
[helperVars$3.main]: globalRefs$i.colors.surface.main,
|
8145
|
+
[helperVars$3.dark]: globalRefs$i.colors.surface.dark,
|
8146
|
+
[helperVars$3.light]: globalRefs$i.colors.surface.light,
|
8147
|
+
[helperVars$3.contrast]: globalRefs$i.colors.surface.contrast,
|
8292
8148
|
},
|
8293
|
-
};
|
8294
|
-
|
8295
|
-
var text$1 = /*#__PURE__*/Object.freeze({
|
8296
|
-
__proto__: null,
|
8297
|
-
default: text,
|
8298
|
-
vars: vars$j
|
8299
|
-
});
|
8300
8149
|
|
8301
|
-
|
8302
|
-
|
8303
|
-
|
8304
|
-
|
8305
|
-
|
8306
|
-
|
8150
|
+
variant: {
|
8151
|
+
contained: {
|
8152
|
+
[compVars$4.labelTextColor]: helperRefs$3.contrast,
|
8153
|
+
[compVars$4.backgroundColor]: helperRefs$3.main,
|
8154
|
+
_hover: {
|
8155
|
+
[compVars$4.backgroundColor]: helperRefs$3.dark,
|
8156
|
+
_loading: {
|
8157
|
+
[compVars$4.backgroundColor]: helperRefs$3.main,
|
8158
|
+
},
|
8159
|
+
},
|
8160
|
+
_active: {
|
8161
|
+
[compVars$4.backgroundColor]: helperRefs$3.main,
|
8162
|
+
},
|
8163
|
+
},
|
8307
8164
|
|
8308
|
-
|
8165
|
+
outline: {
|
8166
|
+
[compVars$4.labelTextColor]: helperRefs$3.main,
|
8167
|
+
[compVars$4.borderColor]: 'currentColor',
|
8168
|
+
_hover: {
|
8169
|
+
[compVars$4.labelTextColor]: helperRefs$3.dark,
|
8170
|
+
},
|
8171
|
+
_active: {
|
8172
|
+
[compVars$4.labelTextColor]: helperRefs$3.main,
|
8173
|
+
},
|
8174
|
+
},
|
8309
8175
|
|
8310
|
-
|
8311
|
-
|
8312
|
-
|
8313
|
-
|
8176
|
+
link: {
|
8177
|
+
[compVars$4.labelTextColor]: helperRefs$3.main,
|
8178
|
+
_hover: {
|
8179
|
+
[compVars$4.labelTextColor]: helperRefs$3.dark,
|
8180
|
+
[compVars$4.labelTextDecoration]: 'underline',
|
8181
|
+
},
|
8182
|
+
_active: {
|
8183
|
+
[compVars$4.labelTextColor]: helperRefs$3.dark,
|
8184
|
+
},
|
8185
|
+
},
|
8314
8186
|
},
|
8315
8187
|
|
8316
|
-
|
8317
|
-
[
|
8188
|
+
_focused: {
|
8189
|
+
[compVars$4.outlineColor]: globalRefs$i.colors.surface.main,
|
8318
8190
|
},
|
8191
|
+
};
|
8319
8192
|
|
8320
|
-
|
8321
|
-
|
8322
|
-
|
8323
|
-
},
|
8324
|
-
secondary: {
|
8325
|
-
[vars$i.textColor]: globalRefs$b.colors.secondary.main,
|
8326
|
-
},
|
8327
|
-
error: {
|
8328
|
-
[vars$i.textColor]: globalRefs$b.colors.error.main,
|
8329
|
-
},
|
8330
|
-
success: {
|
8331
|
-
[vars$i.textColor]: globalRefs$b.colors.success.main,
|
8332
|
-
},
|
8333
|
-
},
|
8193
|
+
const vars$v = {
|
8194
|
+
...compVars$4,
|
8195
|
+
...helperVars$3,
|
8334
8196
|
};
|
8335
8197
|
|
8336
|
-
var
|
8198
|
+
var button$1 = /*#__PURE__*/Object.freeze({
|
8337
8199
|
__proto__: null,
|
8338
|
-
default:
|
8339
|
-
vars: vars$
|
8200
|
+
default: button,
|
8201
|
+
vars: vars$v
|
8340
8202
|
});
|
8341
8203
|
|
8342
|
-
const
|
8343
|
-
const
|
8204
|
+
const componentName$2 = getComponentName('input-wrapper');
|
8205
|
+
const globalRefs$h = getThemeRefs(globals);
|
8344
8206
|
|
8345
|
-
const [
|
8207
|
+
const [theme$1, refs, vars$u] = createHelperVars(
|
8346
8208
|
{
|
8347
|
-
|
8348
|
-
|
8349
|
-
|
8350
|
-
|
8351
|
-
|
8209
|
+
labelTextColor: globalRefs$h.colors.surface.contrast,
|
8210
|
+
valueTextColor: globalRefs$h.colors.surface.contrast,
|
8211
|
+
placeholderTextColor: globalRefs$h.colors.surface.main,
|
8212
|
+
requiredIndicator: "'*'",
|
8213
|
+
errorMessageTextColor: globalRefs$h.colors.error.main,
|
8352
8214
|
|
8353
|
-
|
8354
|
-
|
8215
|
+
borderWidth: globalRefs$h.border.xs,
|
8216
|
+
borderRadius: globalRefs$h.radius.xs,
|
8217
|
+
borderColor: 'transparent',
|
8355
8218
|
|
8356
|
-
|
8357
|
-
|
8358
|
-
|
8359
|
-
|
8360
|
-
[compVars$2.hostWidth]: '100%',
|
8361
|
-
[compVars$2.stripeColor]: globalRefs$a.colors.surface.main,
|
8362
|
-
[compVars$2.stripeColorOpacity]: '0.5',
|
8363
|
-
[compVars$2.stripeHorizontalThickness]: helperRefs$1.thickness,
|
8364
|
-
[compVars$2.labelTextWidth]: 'fit-content',
|
8365
|
-
[compVars$2.labelTextMaxWidth]: 'calc(100% - 100px)',
|
8366
|
-
[compVars$2.labelTextHorizontalSpacing]: helperRefs$1.spacing,
|
8367
|
-
[compVars$2.textAlign]: 'center',
|
8219
|
+
outlineWidth: globalRefs$h.border.sm,
|
8220
|
+
outlineStyle: 'solid',
|
8221
|
+
outlineColor: 'transparent',
|
8222
|
+
outlineOffset: '0px', // we need to keep the px unit even for 0 value, as this var is used for calc in different component classes
|
8368
8223
|
|
8369
|
-
|
8370
|
-
|
8371
|
-
|
8372
|
-
|
8373
|
-
|
8374
|
-
[compVars$2.stripeVerticalThickness]: helperRefs$1.thickness,
|
8375
|
-
[compVars$2.labelTextWidth]: 'fit-content',
|
8376
|
-
[compVars$2.labelTextMaxWidth]: '100%',
|
8377
|
-
[compVars$2.labelTextVerticalSpacing]: helperRefs$1.spacing,
|
8378
|
-
},
|
8379
|
-
};
|
8224
|
+
minWidth: '10em',
|
8225
|
+
toggleButtonSize: '1.5em',
|
8226
|
+
inputHeight: '3em',
|
8227
|
+
horizontalPadding: '0.5em',
|
8228
|
+
verticalPadding: '0.5em',
|
8380
8229
|
|
8381
|
-
|
8382
|
-
...compVars$2,
|
8383
|
-
...helperVars$1,
|
8384
|
-
};
|
8230
|
+
backgroundColor: globalRefs$h.colors.surface.light,
|
8385
8231
|
|
8386
|
-
|
8387
|
-
__proto__: null,
|
8388
|
-
default: divider,
|
8389
|
-
vars: vars$h
|
8390
|
-
});
|
8232
|
+
fontFamily: globalRefs$h.fonts.font1.family,
|
8391
8233
|
|
8392
|
-
|
8234
|
+
direction: globalRefs$h.direction,
|
8393
8235
|
|
8394
|
-
|
8395
|
-
[vars$g.hostDirection]: refs.direction,
|
8396
|
-
[vars$g.fontFamily]: refs.fontFamily,
|
8397
|
-
[vars$g.fontSize]: refs.fontSize,
|
8398
|
-
[vars$g.labelTextColor]: refs.labelTextColor,
|
8399
|
-
[vars$g.labelRequiredIndicator]: refs.requiredIndicator,
|
8400
|
-
[vars$g.errorMessageTextColor]: refs.errorMessageTextColor,
|
8401
|
-
[vars$g.digitValueTextColor]: refs.valueTextColor,
|
8402
|
-
[vars$g.digitPadding]: '0',
|
8403
|
-
[vars$g.digitTextAlign]: 'center',
|
8404
|
-
[vars$g.digitSpacing]: '4px',
|
8405
|
-
[vars$g.hostWidth]: refs.width,
|
8406
|
-
[vars$g.digitOutlineColor]: 'transparent',
|
8407
|
-
[vars$g.digitOutlineWidth]: refs.outlineWidth,
|
8408
|
-
[vars$g.focusedDigitFieldOutlineColor]: refs.outlineColor,
|
8409
|
-
[vars$g.digitSize]: refs.inputHeight,
|
8236
|
+
overlayOpacity: '0.3',
|
8410
8237
|
|
8411
|
-
|
8412
|
-
|
8413
|
-
|
8414
|
-
|
8415
|
-
|
8416
|
-
|
8238
|
+
size: {
|
8239
|
+
xs: { fontSize: '12px', chipFontSize: '10px' },
|
8240
|
+
sm: { fontSize: '14px', chipFontSize: '12px' },
|
8241
|
+
md: { fontSize: '16px', chipFontSize: '14px' },
|
8242
|
+
lg: { fontSize: '18px', chipFontSize: '16px' },
|
8243
|
+
},
|
8417
8244
|
|
8418
|
-
|
8419
|
-
|
8420
|
-
|
8245
|
+
_fullWidth: {
|
8246
|
+
width: '100%',
|
8247
|
+
},
|
8421
8248
|
|
8422
|
-
|
8423
|
-
|
8249
|
+
_focused: {
|
8250
|
+
outlineColor: globalRefs$h.colors.surface.main,
|
8251
|
+
_invalid: {
|
8252
|
+
outlineColor: globalRefs$h.colors.error.main,
|
8253
|
+
},
|
8254
|
+
},
|
8255
|
+
|
8256
|
+
_bordered: {
|
8257
|
+
outlineWidth: globalRefs$h.border.xs,
|
8258
|
+
borderColor: globalRefs$h.colors.surface.main,
|
8259
|
+
borderStyle: 'solid',
|
8260
|
+
_invalid: {
|
8261
|
+
borderColor: globalRefs$h.colors.error.main,
|
8262
|
+
},
|
8263
|
+
},
|
8264
|
+
|
8265
|
+
_disabled: {
|
8266
|
+
labelTextColor: globalRefs$h.colors.surface.main,
|
8267
|
+
borderColor: globalRefs$h.colors.surface.main,
|
8268
|
+
valueTextColor: globalRefs$h.colors.surface.dark,
|
8269
|
+
placeholderTextColor: globalRefs$h.colors.surface.dark,
|
8270
|
+
backgroundColor: globalRefs$h.colors.surface.main,
|
8271
|
+
},
|
8424
8272
|
},
|
8273
|
+
componentName$2
|
8274
|
+
);
|
8275
|
+
|
8276
|
+
var inputWrapper = /*#__PURE__*/Object.freeze({
|
8277
|
+
__proto__: null,
|
8278
|
+
default: theme$1,
|
8279
|
+
refs: refs,
|
8280
|
+
vars: vars$u
|
8281
|
+
});
|
8282
|
+
|
8283
|
+
const vars$t = TextFieldClass.cssVarList;
|
8284
|
+
|
8285
|
+
const textField = {
|
8286
|
+
[vars$t.hostWidth]: refs.width,
|
8287
|
+
[vars$t.hostMinWidth]: refs.minWidth,
|
8288
|
+
[vars$t.hostDirection]: refs.direction,
|
8289
|
+
[vars$t.fontSize]: refs.fontSize,
|
8290
|
+
[vars$t.fontFamily]: refs.fontFamily,
|
8291
|
+
[vars$t.labelTextColor]: refs.labelTextColor,
|
8292
|
+
[vars$t.labelRequiredIndicator]: refs.requiredIndicator,
|
8293
|
+
[vars$t.errorMessageTextColor]: refs.errorMessageTextColor,
|
8294
|
+
[vars$t.inputValueTextColor]: refs.valueTextColor,
|
8295
|
+
[vars$t.inputPlaceholderColor]: refs.placeholderTextColor,
|
8296
|
+
[vars$t.inputBorderWidth]: refs.borderWidth,
|
8297
|
+
[vars$t.inputBorderStyle]: refs.borderStyle,
|
8298
|
+
[vars$t.inputBorderColor]: refs.borderColor,
|
8299
|
+
[vars$t.inputBorderRadius]: refs.borderRadius,
|
8300
|
+
[vars$t.inputOutlineWidth]: refs.outlineWidth,
|
8301
|
+
[vars$t.inputOutlineStyle]: refs.outlineStyle,
|
8302
|
+
[vars$t.inputOutlineColor]: refs.outlineColor,
|
8303
|
+
[vars$t.inputOutlineOffset]: refs.outlineOffset,
|
8304
|
+
[vars$t.inputBackgroundColor]: refs.backgroundColor,
|
8305
|
+
[vars$t.inputHeight]: refs.inputHeight,
|
8306
|
+
[vars$t.inputHorizontalPadding]: refs.horizontalPadding,
|
8425
8307
|
};
|
8426
8308
|
|
8427
|
-
var
|
8309
|
+
var textField$1 = /*#__PURE__*/Object.freeze({
|
8428
8310
|
__proto__: null,
|
8429
|
-
default:
|
8430
|
-
|
8311
|
+
default: textField,
|
8312
|
+
textField: textField,
|
8313
|
+
vars: vars$t
|
8431
8314
|
});
|
8432
8315
|
|
8433
|
-
const globalRefs$
|
8434
|
-
const vars$
|
8316
|
+
const globalRefs$g = getThemeRefs(globals);
|
8317
|
+
const vars$s = PasswordClass.cssVarList;
|
8435
8318
|
|
8436
|
-
const
|
8437
|
-
[vars$
|
8438
|
-
[vars$
|
8319
|
+
const password = {
|
8320
|
+
[vars$s.hostWidth]: refs.width,
|
8321
|
+
[vars$s.hostDirection]: refs.direction,
|
8322
|
+
[vars$s.fontSize]: refs.fontSize,
|
8323
|
+
[vars$s.fontFamily]: refs.fontFamily,
|
8324
|
+
[vars$s.labelTextColor]: refs.labelTextColor,
|
8325
|
+
[vars$s.errorMessageTextColor]: refs.errorMessageTextColor,
|
8326
|
+
[vars$s.inputHorizontalPadding]: refs.horizontalPadding,
|
8327
|
+
[vars$s.inputHeight]: refs.inputHeight,
|
8328
|
+
[vars$s.inputBackgroundColor]: refs.backgroundColor,
|
8329
|
+
[vars$s.labelRequiredIndicator]: refs.requiredIndicator,
|
8330
|
+
[vars$s.inputValueTextColor]: refs.valueTextColor,
|
8331
|
+
[vars$s.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
8332
|
+
[vars$s.inputBorderWidth]: refs.borderWidth,
|
8333
|
+
[vars$s.inputBorderStyle]: refs.borderStyle,
|
8334
|
+
[vars$s.inputBorderColor]: refs.borderColor,
|
8335
|
+
[vars$s.inputBorderRadius]: refs.borderRadius,
|
8336
|
+
[vars$s.inputOutlineWidth]: refs.outlineWidth,
|
8337
|
+
[vars$s.inputOutlineStyle]: refs.outlineStyle,
|
8338
|
+
[vars$s.inputOutlineColor]: refs.outlineColor,
|
8339
|
+
[vars$s.inputOutlineOffset]: refs.outlineOffset,
|
8340
|
+
[vars$s.revealButtonOffset]: globalRefs$g.spacing.md,
|
8341
|
+
[vars$s.revealButtonSize]: refs.toggleButtonSize,
|
8342
|
+
};
|
8439
8343
|
|
8440
|
-
|
8441
|
-
|
8344
|
+
var password$1 = /*#__PURE__*/Object.freeze({
|
8345
|
+
__proto__: null,
|
8346
|
+
default: password,
|
8347
|
+
vars: vars$s
|
8348
|
+
});
|
8442
8349
|
|
8443
|
-
|
8444
|
-
[vars$f.barBorderRadius]: '4px',
|
8350
|
+
const vars$r = NumberFieldClass.cssVarList;
|
8445
8351
|
|
8446
|
-
|
8447
|
-
[vars$
|
8448
|
-
[vars$
|
8449
|
-
[vars$
|
8352
|
+
const numberField = {
|
8353
|
+
[vars$r.hostWidth]: refs.width,
|
8354
|
+
[vars$r.hostMinWidth]: refs.minWidth,
|
8355
|
+
[vars$r.hostDirection]: refs.direction,
|
8356
|
+
[vars$r.fontSize]: refs.fontSize,
|
8357
|
+
[vars$r.fontFamily]: refs.fontFamily,
|
8358
|
+
[vars$r.labelTextColor]: refs.labelTextColor,
|
8359
|
+
[vars$r.errorMessageTextColor]: refs.errorMessageTextColor,
|
8360
|
+
[vars$r.inputValueTextColor]: refs.valueTextColor,
|
8361
|
+
[vars$r.inputPlaceholderColor]: refs.placeholderTextColor,
|
8362
|
+
[vars$r.inputBorderWidth]: refs.borderWidth,
|
8363
|
+
[vars$r.inputBorderStyle]: refs.borderStyle,
|
8364
|
+
[vars$r.inputBorderColor]: refs.borderColor,
|
8365
|
+
[vars$r.inputBorderRadius]: refs.borderRadius,
|
8366
|
+
[vars$r.inputOutlineWidth]: refs.outlineWidth,
|
8367
|
+
[vars$r.inputOutlineStyle]: refs.outlineStyle,
|
8368
|
+
[vars$r.inputOutlineColor]: refs.outlineColor,
|
8369
|
+
[vars$r.inputOutlineOffset]: refs.outlineOffset,
|
8370
|
+
[vars$r.inputBackgroundColor]: refs.backgroundColor,
|
8371
|
+
[vars$r.labelRequiredIndicator]: refs.requiredIndicator,
|
8372
|
+
[vars$r.inputHorizontalPadding]: refs.horizontalPadding,
|
8373
|
+
[vars$r.inputHeight]: refs.inputHeight,
|
8374
|
+
};
|
8450
8375
|
|
8451
|
-
|
8452
|
-
|
8453
|
-
|
8454
|
-
|
8455
|
-
|
8456
|
-
},
|
8376
|
+
var numberField$1 = /*#__PURE__*/Object.freeze({
|
8377
|
+
__proto__: null,
|
8378
|
+
default: numberField,
|
8379
|
+
vars: vars$r
|
8380
|
+
});
|
8457
8381
|
|
8458
|
-
|
8459
|
-
primary: {
|
8460
|
-
[vars$f.barColor]: globalRefs$9.colors.primary.main,
|
8461
|
-
},
|
8462
|
-
secondary: {
|
8463
|
-
[vars$f.barColor]: globalRefs$9.colors.secondary.main,
|
8464
|
-
},
|
8465
|
-
},
|
8382
|
+
const vars$q = EmailFieldClass.cssVarList;
|
8466
8383
|
|
8467
|
-
|
8468
|
-
|
8469
|
-
|
8384
|
+
const emailField = {
|
8385
|
+
[vars$q.hostWidth]: refs.width,
|
8386
|
+
[vars$q.hostMinWidth]: refs.minWidth,
|
8387
|
+
[vars$q.hostDirection]: refs.direction,
|
8388
|
+
[vars$q.fontSize]: refs.fontSize,
|
8389
|
+
[vars$q.fontFamily]: refs.fontFamily,
|
8390
|
+
[vars$q.labelTextColor]: refs.labelTextColor,
|
8391
|
+
[vars$q.errorMessageTextColor]: refs.errorMessageTextColor,
|
8392
|
+
[vars$q.inputValueTextColor]: refs.valueTextColor,
|
8393
|
+
[vars$q.labelRequiredIndicator]: refs.requiredIndicator,
|
8394
|
+
[vars$q.inputPlaceholderColor]: refs.placeholderTextColor,
|
8395
|
+
[vars$q.inputBorderWidth]: refs.borderWidth,
|
8396
|
+
[vars$q.inputBorderStyle]: refs.borderStyle,
|
8397
|
+
[vars$q.inputBorderColor]: refs.borderColor,
|
8398
|
+
[vars$q.inputBorderRadius]: refs.borderRadius,
|
8399
|
+
[vars$q.inputOutlineWidth]: refs.outlineWidth,
|
8400
|
+
[vars$q.inputOutlineStyle]: refs.outlineStyle,
|
8401
|
+
[vars$q.inputOutlineColor]: refs.outlineColor,
|
8402
|
+
[vars$q.inputOutlineOffset]: refs.outlineOffset,
|
8403
|
+
[vars$q.inputBackgroundColor]: refs.backgroundColor,
|
8404
|
+
[vars$q.inputHorizontalPadding]: refs.horizontalPadding,
|
8405
|
+
[vars$q.inputHeight]: refs.inputHeight,
|
8470
8406
|
};
|
8471
8407
|
|
8472
|
-
var
|
8408
|
+
var emailField$1 = /*#__PURE__*/Object.freeze({
|
8473
8409
|
__proto__: null,
|
8474
|
-
default:
|
8475
|
-
vars: vars$
|
8410
|
+
default: emailField,
|
8411
|
+
vars: vars$q
|
8476
8412
|
});
|
8477
8413
|
|
8478
|
-
const globalRefs$
|
8479
|
-
const
|
8480
|
-
|
8481
|
-
const [helperTheme, helperRefs, helperVars] = createHelperVars(
|
8482
|
-
{
|
8483
|
-
spinnerColor: globalRefs$8.colors.surface.contrast,
|
8484
|
-
mode: {
|
8485
|
-
primary: {
|
8486
|
-
spinnerColor: globalRefs$8.colors.primary.main,
|
8487
|
-
},
|
8488
|
-
secondary: {
|
8489
|
-
spinnerColor: globalRefs$8.colors.secondary.main,
|
8490
|
-
},
|
8491
|
-
},
|
8492
|
-
},
|
8493
|
-
componentName$z
|
8494
|
-
);
|
8495
|
-
|
8496
|
-
const loaderRadial = {
|
8497
|
-
...helperTheme,
|
8414
|
+
const globalRefs$f = getThemeRefs(globals);
|
8415
|
+
const vars$p = TextAreaClass.cssVarList;
|
8498
8416
|
|
8499
|
-
|
8500
|
-
[
|
8501
|
-
[
|
8502
|
-
[
|
8503
|
-
[
|
8504
|
-
[
|
8505
|
-
[
|
8506
|
-
[
|
8507
|
-
[
|
8508
|
-
[
|
8417
|
+
const textArea = {
|
8418
|
+
[vars$p.hostWidth]: refs.width,
|
8419
|
+
[vars$p.hostMinWidth]: refs.minWidth,
|
8420
|
+
[vars$p.hostDirection]: refs.direction,
|
8421
|
+
[vars$p.fontSize]: refs.fontSize,
|
8422
|
+
[vars$p.fontFamily]: refs.fontFamily,
|
8423
|
+
[vars$p.labelTextColor]: refs.labelTextColor,
|
8424
|
+
[vars$p.labelRequiredIndicator]: refs.requiredIndicator,
|
8425
|
+
[vars$p.errorMessageTextColor]: refs.errorMessageTextColor,
|
8426
|
+
[vars$p.inputBackgroundColor]: refs.backgroundColor,
|
8427
|
+
[vars$p.inputValueTextColor]: refs.valueTextColor,
|
8428
|
+
[vars$p.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
8429
|
+
[vars$p.inputBorderRadius]: refs.borderRadius,
|
8430
|
+
[vars$p.inputBorderWidth]: refs.borderWidth,
|
8431
|
+
[vars$p.inputBorderStyle]: refs.borderStyle,
|
8432
|
+
[vars$p.inputBorderColor]: refs.borderColor,
|
8433
|
+
[vars$p.inputOutlineWidth]: refs.outlineWidth,
|
8434
|
+
[vars$p.inputOutlineStyle]: refs.outlineStyle,
|
8435
|
+
[vars$p.inputOutlineColor]: refs.outlineColor,
|
8436
|
+
[vars$p.inputOutlineOffset]: refs.outlineOffset,
|
8437
|
+
[vars$p.inputResizeType]: 'vertical',
|
8438
|
+
[vars$p.inputMinHeight]: '5em',
|
8509
8439
|
|
8510
|
-
|
8511
|
-
|
8512
|
-
sm: { [compVars$1.spinnerSize]: '30px' },
|
8513
|
-
md: { [compVars$1.spinnerSize]: '40px' },
|
8514
|
-
lg: { [compVars$1.spinnerSize]: '60px' },
|
8515
|
-
xl: { [compVars$1.spinnerSize]: '80px' },
|
8440
|
+
_disabled: {
|
8441
|
+
[vars$p.inputBackgroundColor]: globalRefs$f.colors.surface.light,
|
8516
8442
|
},
|
8517
8443
|
|
8518
|
-
|
8519
|
-
[
|
8444
|
+
_readonly: {
|
8445
|
+
[vars$p.inputResizeType]: 'none',
|
8520
8446
|
},
|
8521
8447
|
};
|
8522
|
-
const vars$e = {
|
8523
|
-
...compVars$1,
|
8524
|
-
...helperVars,
|
8525
|
-
};
|
8526
8448
|
|
8527
|
-
var
|
8449
|
+
var textArea$1 = /*#__PURE__*/Object.freeze({
|
8528
8450
|
__proto__: null,
|
8529
|
-
default:
|
8530
|
-
vars: vars$
|
8451
|
+
default: textArea,
|
8452
|
+
vars: vars$p
|
8531
8453
|
});
|
8532
8454
|
|
8533
|
-
const
|
8534
|
-
const
|
8455
|
+
const vars$o = CheckboxClass.cssVarList;
|
8456
|
+
const checkboxSize = '1.35em';
|
8535
8457
|
|
8536
|
-
const
|
8537
|
-
[vars$
|
8538
|
-
[vars$
|
8539
|
-
[vars$
|
8540
|
-
[vars$
|
8541
|
-
[vars$
|
8542
|
-
[vars$
|
8543
|
-
[vars$
|
8544
|
-
[vars$
|
8545
|
-
[vars$
|
8546
|
-
[vars$
|
8547
|
-
[vars$
|
8548
|
-
[vars$
|
8549
|
-
[vars$
|
8550
|
-
[vars$
|
8551
|
-
[vars$
|
8552
|
-
[vars$
|
8553
|
-
[vars$
|
8554
|
-
[vars$
|
8555
|
-
[vars$
|
8556
|
-
[vars$
|
8557
|
-
[vars$d.inputDropdownButtonColor]: globalRefs$7.colors.surface.contrast,
|
8558
|
-
[vars$d.inputDropdownButtonCursor]: 'pointer',
|
8559
|
-
[vars$d.inputDropdownButtonSize]: refs.toggleButtonSize,
|
8560
|
-
[vars$d.inputDropdownButtonOffset]: globalRefs$7.spacing.xs,
|
8561
|
-
[vars$d.overlayItemPaddingInlineStart]: globalRefs$7.spacing.xs,
|
8562
|
-
[vars$d.overlayItemPaddingInlineEnd]: globalRefs$7.spacing.lg,
|
8458
|
+
const checkbox = {
|
8459
|
+
[vars$o.hostWidth]: refs.width,
|
8460
|
+
[vars$o.hostDirection]: refs.direction,
|
8461
|
+
[vars$o.fontSize]: refs.fontSize,
|
8462
|
+
[vars$o.fontFamily]: refs.fontFamily,
|
8463
|
+
[vars$o.labelTextColor]: refs.labelTextColor,
|
8464
|
+
[vars$o.labelRequiredIndicator]: refs.requiredIndicator,
|
8465
|
+
[vars$o.labelFontWeight]: '400',
|
8466
|
+
[vars$o.labelLineHeight]: checkboxSize,
|
8467
|
+
[vars$o.labelSpacing]: '1em',
|
8468
|
+
[vars$o.errorMessageTextColor]: refs.errorMessageTextColor,
|
8469
|
+
[vars$o.inputOutlineWidth]: refs.outlineWidth,
|
8470
|
+
[vars$o.inputOutlineOffset]: refs.outlineOffset,
|
8471
|
+
[vars$o.inputOutlineColor]: refs.outlineColor,
|
8472
|
+
[vars$o.inputOutlineStyle]: refs.outlineStyle,
|
8473
|
+
[vars$o.inputBorderRadius]: refs.borderRadius,
|
8474
|
+
[vars$o.inputBorderColor]: refs.borderColor,
|
8475
|
+
[vars$o.inputBorderWidth]: refs.borderWidth,
|
8476
|
+
[vars$o.inputBorderStyle]: refs.borderStyle,
|
8477
|
+
[vars$o.inputBackgroundColor]: refs.backgroundColor,
|
8478
|
+
[vars$o.inputSize]: checkboxSize,
|
8563
8479
|
|
8564
|
-
|
8565
|
-
[vars$
|
8480
|
+
_checked: {
|
8481
|
+
[vars$o.inputValueTextColor]: refs.valueTextColor,
|
8566
8482
|
},
|
8567
8483
|
|
8568
|
-
|
8569
|
-
|
8570
|
-
|
8571
|
-
[vars$d.overlayCursor]: 'pointer',
|
8572
|
-
[vars$d.overlayItemBoxShadow]: 'none',
|
8573
|
-
|
8574
|
-
// Overlay direct theme:
|
8575
|
-
[vars$d.overlay.minHeight]: '400px',
|
8576
|
-
[vars$d.overlay.margin]: '0',
|
8484
|
+
_disabled: {
|
8485
|
+
[vars$o.labelTextColor]: refs.labelTextColor,
|
8486
|
+
},
|
8577
8487
|
};
|
8578
8488
|
|
8579
|
-
var
|
8489
|
+
var checkbox$1 = /*#__PURE__*/Object.freeze({
|
8580
8490
|
__proto__: null,
|
8581
|
-
|
8582
|
-
|
8583
|
-
vars: vars$d
|
8491
|
+
default: checkbox,
|
8492
|
+
vars: vars$o
|
8584
8493
|
});
|
8585
8494
|
|
8586
|
-
const
|
8495
|
+
const knobMargin = '2px';
|
8496
|
+
const checkboxHeight = '1.25em';
|
8587
8497
|
|
8588
|
-
const
|
8498
|
+
const globalRefs$e = getThemeRefs(globals);
|
8499
|
+
const vars$n = SwitchToggleClass.cssVarList;
|
8589
8500
|
|
8590
|
-
|
8591
|
-
|
8592
|
-
|
8593
|
-
vars:
|
8594
|
-
|
8501
|
+
const switchToggle = {
|
8502
|
+
[vars$n.hostWidth]: refs.width,
|
8503
|
+
[vars$n.hostDirection]: refs.direction,
|
8504
|
+
[vars$n.fontSize]: refs.fontSize,
|
8505
|
+
[vars$n.fontFamily]: refs.fontFamily,
|
8595
8506
|
|
8596
|
-
|
8507
|
+
[vars$n.inputOutlineWidth]: refs.outlineWidth,
|
8508
|
+
[vars$n.inputOutlineOffset]: refs.outlineOffset,
|
8509
|
+
[vars$n.inputOutlineColor]: refs.outlineColor,
|
8510
|
+
[vars$n.inputOutlineStyle]: refs.outlineStyle,
|
8597
8511
|
|
8598
|
-
|
8599
|
-
[vars$
|
8600
|
-
[vars$
|
8601
|
-
[vars$
|
8602
|
-
[vars$
|
8603
|
-
[vars$
|
8604
|
-
[vars$
|
8605
|
-
[vars$b.errorMessageTextColor]: refs.errorMessageTextColor,
|
8606
|
-
[vars$b.inputValueTextColor]: refs.valueTextColor,
|
8607
|
-
[vars$b.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
8608
|
-
[vars$b.inputBorderStyle]: refs.borderStyle,
|
8609
|
-
[vars$b.inputBorderWidth]: refs.borderWidth,
|
8610
|
-
[vars$b.inputBorderColor]: refs.borderColor,
|
8611
|
-
[vars$b.inputBorderRadius]: refs.borderRadius,
|
8612
|
-
[vars$b.inputOutlineStyle]: refs.outlineStyle,
|
8613
|
-
[vars$b.inputOutlineWidth]: refs.outlineWidth,
|
8614
|
-
[vars$b.inputOutlineColor]: refs.outlineColor,
|
8615
|
-
[vars$b.inputOutlineOffset]: refs.outlineOffset,
|
8616
|
-
[vars$b.phoneInputWidth]: refs.minWidth,
|
8617
|
-
[vars$b.countryCodeInputWidth]: '5em',
|
8618
|
-
[vars$b.countryCodeDropdownWidth]: '20em',
|
8512
|
+
[vars$n.trackBorderStyle]: refs.borderStyle,
|
8513
|
+
[vars$n.trackBorderWidth]: refs.borderWidth, // var `trackBorderWidth` used outside the theme for `left` margin calculation
|
8514
|
+
[vars$n.trackBorderColor]: refs.borderColor,
|
8515
|
+
[vars$n.trackBackgroundColor]: 'none',
|
8516
|
+
[vars$n.trackBorderRadius]: globalRefs$e.radius.md,
|
8517
|
+
[vars$n.trackWidth]: '2.5em', // var `trackWidth` used outside the theme for `left` margin calculation
|
8518
|
+
[vars$n.trackHeight]: checkboxHeight,
|
8619
8519
|
|
8620
|
-
|
8621
|
-
|
8622
|
-
|
8623
|
-
|
8520
|
+
[vars$n.knobSize]: `calc(1em - ${knobMargin})`,
|
8521
|
+
[vars$n.knobRadius]: '50%',
|
8522
|
+
[vars$n.knobTopOffset]: '1px',
|
8523
|
+
[vars$n.knobLeftOffset]: knobMargin,
|
8524
|
+
[vars$n.knobColor]: refs.valueTextColor,
|
8525
|
+
[vars$n.knobTransitionDuration]: '0.3s',
|
8624
8526
|
|
8625
|
-
|
8626
|
-
|
8627
|
-
|
8628
|
-
vars:
|
8629
|
-
|
8527
|
+
[vars$n.labelTextColor]: refs.labelTextColor,
|
8528
|
+
[vars$n.labelFontWeight]: '400',
|
8529
|
+
[vars$n.labelLineHeight]: '1.35em',
|
8530
|
+
[vars$n.labelSpacing]: '1em',
|
8531
|
+
[vars$n.labelRequiredIndicator]: refs.requiredIndicator,
|
8532
|
+
[vars$n.errorMessageTextColor]: refs.errorMessageTextColor,
|
8630
8533
|
|
8631
|
-
|
8534
|
+
_checked: {
|
8535
|
+
[vars$n.trackBorderColor]: refs.borderColor,
|
8536
|
+
[vars$n.trackBackgroundColor]: refs.backgroundColor,
|
8537
|
+
[vars$n.knobLeftOffset]: `calc(100% - var(${vars$n.knobSize}) - ${knobMargin})`,
|
8538
|
+
[vars$n.knobColor]: refs.valueTextColor,
|
8539
|
+
[vars$n.knobTextColor]: refs.valueTextColor,
|
8540
|
+
},
|
8632
8541
|
|
8633
|
-
|
8634
|
-
|
8635
|
-
|
8636
|
-
|
8637
|
-
|
8638
|
-
|
8639
|
-
|
8640
|
-
|
8641
|
-
|
8642
|
-
|
8643
|
-
|
8644
|
-
|
8645
|
-
|
8646
|
-
|
8647
|
-
[vars$a.inputBorderRadius]: refs.borderRadius,
|
8648
|
-
[vars$a.inputOutlineStyle]: refs.outlineStyle,
|
8649
|
-
[vars$a.inputOutlineWidth]: refs.outlineWidth,
|
8650
|
-
[vars$a.inputOutlineColor]: refs.outlineColor,
|
8651
|
-
[vars$a.inputOutlineOffset]: refs.outlineOffset,
|
8652
|
-
_fullWidth: {
|
8653
|
-
[vars$a.hostWidth]: refs.width,
|
8542
|
+
_disabled: {
|
8543
|
+
[vars$n.knobColor]: globalRefs$e.colors.surface.light,
|
8544
|
+
[vars$n.trackBorderColor]: globalRefs$e.colors.surface.main,
|
8545
|
+
[vars$n.trackBackgroundColor]: globalRefs$e.colors.surface.main,
|
8546
|
+
[vars$n.labelTextColor]: refs.labelTextColor,
|
8547
|
+
_checked: {
|
8548
|
+
[vars$n.knobColor]: globalRefs$e.colors.surface.light,
|
8549
|
+
[vars$n.trackBackgroundColor]: globalRefs$e.colors.surface.main,
|
8550
|
+
},
|
8551
|
+
},
|
8552
|
+
|
8553
|
+
_invalid: {
|
8554
|
+
[vars$n.trackBorderColor]: globalRefs$e.colors.error.main,
|
8555
|
+
[vars$n.knobColor]: globalRefs$e.colors.error.main,
|
8654
8556
|
},
|
8655
8557
|
};
|
8656
8558
|
|
8657
|
-
var
|
8559
|
+
var switchToggle$1 = /*#__PURE__*/Object.freeze({
|
8658
8560
|
__proto__: null,
|
8659
|
-
default:
|
8660
|
-
vars: vars$
|
8561
|
+
default: switchToggle,
|
8562
|
+
vars: vars$n
|
8661
8563
|
});
|
8662
8564
|
|
8663
|
-
const
|
8565
|
+
const globalRefs$d = getThemeRefs(globals);
|
8664
8566
|
|
8665
|
-
const
|
8666
|
-
[vars$9.hostWidth]: refs.width,
|
8667
|
-
[vars$9.hostMinWidth]: refs.minWidth,
|
8668
|
-
[vars$9.hostDirection]: refs.direction,
|
8669
|
-
[vars$9.fontSize]: refs.fontSize,
|
8670
|
-
[vars$9.fontFamily]: refs.fontFamily,
|
8671
|
-
[vars$9.spaceBetweenInputs]: '1em',
|
8672
|
-
[vars$9.errorMessageTextColor]: refs.errorMessageTextColor,
|
8567
|
+
const compVars$3 = ContainerClass.cssVarList;
|
8673
8568
|
|
8674
|
-
|
8675
|
-
|
8676
|
-
|
8677
|
-
|
8678
|
-
[vars$9.inputsRequiredIndicator]: refs.requiredIndicator, // used to populate required content for NewPassword input fields outside the theme
|
8679
|
-
},
|
8569
|
+
const verticalAlignment = {
|
8570
|
+
start: { verticalAlignment: 'start' },
|
8571
|
+
center: { verticalAlignment: 'safe center' },
|
8572
|
+
end: { verticalAlignment: 'end' },
|
8680
8573
|
};
|
8681
8574
|
|
8682
|
-
|
8683
|
-
|
8684
|
-
|
8685
|
-
|
8686
|
-
}
|
8687
|
-
|
8688
|
-
const vars$8 = UploadFileClass.cssVarList;
|
8575
|
+
const horizontalAlignment = {
|
8576
|
+
start: { horizontalAlignment: 'start' },
|
8577
|
+
center: { horizontalAlignment: 'safe center' },
|
8578
|
+
end: { horizontalAlignment: 'end' },
|
8579
|
+
};
|
8689
8580
|
|
8690
|
-
const
|
8691
|
-
|
8692
|
-
|
8693
|
-
|
8581
|
+
const [helperTheme$2, helperRefs$2, helperVars$2] = createHelperVars(
|
8582
|
+
{
|
8583
|
+
verticalAlignment,
|
8584
|
+
horizontalAlignment,
|
8585
|
+
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
8586
|
+
},
|
8587
|
+
componentName$y
|
8588
|
+
);
|
8694
8589
|
|
8695
|
-
|
8590
|
+
const { shadowColor: shadowColor$1 } = helperRefs$2;
|
8696
8591
|
|
8697
|
-
|
8698
|
-
|
8592
|
+
const container = {
|
8593
|
+
...helperTheme$2,
|
8699
8594
|
|
8700
|
-
[
|
8701
|
-
[
|
8702
|
-
[
|
8595
|
+
[compVars$3.hostWidth]: '100%',
|
8596
|
+
[compVars$3.boxShadow]: 'none',
|
8597
|
+
[compVars$3.backgroundColor]: globalRefs$d.colors.surface.light,
|
8598
|
+
[compVars$3.color]: globalRefs$d.colors.surface.contrast,
|
8599
|
+
[compVars$3.borderRadius]: '0px',
|
8703
8600
|
|
8704
|
-
|
8705
|
-
|
8706
|
-
|
8707
|
-
|
8601
|
+
verticalPadding: {
|
8602
|
+
sm: { [compVars$3.verticalPadding]: '5px' },
|
8603
|
+
md: { [compVars$3.verticalPadding]: '10px' },
|
8604
|
+
lg: { [compVars$3.verticalPadding]: '20px' },
|
8605
|
+
},
|
8708
8606
|
|
8709
|
-
|
8710
|
-
[
|
8607
|
+
horizontalPadding: {
|
8608
|
+
sm: { [compVars$3.horizontalPadding]: '5px' },
|
8609
|
+
md: { [compVars$3.horizontalPadding]: '10px' },
|
8610
|
+
lg: { [compVars$3.horizontalPadding]: '20px' },
|
8711
8611
|
},
|
8712
8612
|
|
8713
|
-
|
8714
|
-
|
8715
|
-
[
|
8716
|
-
[
|
8717
|
-
[
|
8718
|
-
[
|
8719
|
-
|
8613
|
+
direction: {
|
8614
|
+
row: {
|
8615
|
+
[compVars$3.flexDirection]: 'row',
|
8616
|
+
[compVars$3.alignItems]: helperRefs$2.verticalAlignment,
|
8617
|
+
[compVars$3.justifyContent]: helperRefs$2.horizontalAlignment,
|
8618
|
+
[compVars$3.flexWrap]: 'wrap',
|
8619
|
+
horizontalAlignment: {
|
8620
|
+
spaceBetween: {
|
8621
|
+
[helperVars$2.horizontalAlignment]: 'space-between',
|
8622
|
+
},
|
8623
|
+
},
|
8624
|
+
},
|
8625
|
+
column: {
|
8626
|
+
[compVars$3.flexDirection]: 'column',
|
8627
|
+
[compVars$3.alignItems]: helperRefs$2.horizontalAlignment,
|
8628
|
+
[compVars$3.justifyContent]: helperRefs$2.verticalAlignment,
|
8629
|
+
verticalAlignment: {
|
8630
|
+
spaceBetween: {
|
8631
|
+
[helperVars$2.verticalAlignment]: 'space-between',
|
8632
|
+
},
|
8633
|
+
},
|
8720
8634
|
},
|
8635
|
+
},
|
8636
|
+
|
8637
|
+
spaceBetween: {
|
8638
|
+
sm: { [compVars$3.gap]: '10px' },
|
8639
|
+
md: { [compVars$3.gap]: '20px' },
|
8640
|
+
lg: { [compVars$3.gap]: '30px' },
|
8641
|
+
},
|
8642
|
+
|
8643
|
+
shadow: {
|
8721
8644
|
sm: {
|
8722
|
-
[
|
8723
|
-
[vars$8.hostWidth]: '230px',
|
8724
|
-
[vars$8.titleFontSize]: '1em',
|
8725
|
-
[vars$8.descriptionFontSize]: '0.875em',
|
8726
|
-
[vars$8.lineHeight]: '1.25em',
|
8645
|
+
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.sm} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.sm} ${shadowColor$1}`,
|
8727
8646
|
},
|
8728
8647
|
md: {
|
8729
|
-
[
|
8730
|
-
[vars$8.hostWidth]: '312px',
|
8731
|
-
[vars$8.titleFontSize]: '1.125em',
|
8732
|
-
[vars$8.descriptionFontSize]: '1em',
|
8733
|
-
[vars$8.lineHeight]: '1.5em',
|
8648
|
+
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.md} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.md} ${shadowColor$1}`,
|
8734
8649
|
},
|
8735
8650
|
lg: {
|
8736
|
-
[
|
8737
|
-
|
8738
|
-
|
8739
|
-
[
|
8740
|
-
|
8651
|
+
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.lg} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.lg} ${shadowColor$1}`,
|
8652
|
+
},
|
8653
|
+
xl: {
|
8654
|
+
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide.xl} ${shadowColor$1}, ${globalRefs$d.shadow.narrow.xl} ${shadowColor$1}`,
|
8655
|
+
},
|
8656
|
+
'2xl': {
|
8657
|
+
[helperVars$2.shadowColor]: '#00000050', // mimic daisyUI shadow settings
|
8658
|
+
[compVars$3.boxShadow]: `${globalRefs$d.shadow.wide['2xl']} ${shadowColor$1}`,
|
8741
8659
|
},
|
8742
8660
|
},
|
8743
8661
|
|
8744
|
-
|
8745
|
-
[
|
8662
|
+
borderRadius: {
|
8663
|
+
sm: { [compVars$3.borderRadius]: globalRefs$d.radius.sm },
|
8664
|
+
md: { [compVars$3.borderRadius]: globalRefs$d.radius.md },
|
8665
|
+
lg: { [compVars$3.borderRadius]: globalRefs$d.radius.lg },
|
8666
|
+
xl: { [compVars$3.borderRadius]: globalRefs$d.radius.xl },
|
8667
|
+
'2xl': { [compVars$3.borderRadius]: globalRefs$d.radius['2xl'] },
|
8668
|
+
'3xl': { [compVars$3.borderRadius]: globalRefs$d.radius['3xl'] },
|
8746
8669
|
},
|
8747
8670
|
};
|
8748
8671
|
|
8749
|
-
|
8672
|
+
const vars$m = {
|
8673
|
+
...compVars$3,
|
8674
|
+
...helperVars$2,
|
8675
|
+
};
|
8676
|
+
|
8677
|
+
var container$1 = /*#__PURE__*/Object.freeze({
|
8750
8678
|
__proto__: null,
|
8751
|
-
default:
|
8752
|
-
vars: vars$
|
8679
|
+
default: container,
|
8680
|
+
vars: vars$m
|
8753
8681
|
});
|
8754
8682
|
|
8755
|
-
const
|
8756
|
-
|
8757
|
-
const vars$7 = ButtonSelectionGroupItemClass.cssVarList;
|
8758
|
-
|
8759
|
-
const buttonSelectionGroupItem = {
|
8760
|
-
[vars$7.hostDirection]: 'inherit',
|
8761
|
-
[vars$7.backgroundColor]: globalRefs$6.colors.surface.light,
|
8762
|
-
[vars$7.labelTextColor]: globalRefs$6.colors.surface.contrast,
|
8763
|
-
[vars$7.borderColor]: globalRefs$6.colors.surface.main,
|
8764
|
-
[vars$7.borderStyle]: 'solid',
|
8765
|
-
[vars$7.borderRadius]: globalRefs$6.radius.sm,
|
8766
|
-
|
8767
|
-
_hover: {
|
8768
|
-
[vars$7.backgroundColor]: '#f4f5f5', // can we take it from the palette?
|
8769
|
-
},
|
8683
|
+
const vars$l = LogoClass.cssVarList;
|
8770
8684
|
|
8771
|
-
|
8772
|
-
|
8773
|
-
[vars$7.backgroundColor]: globalRefs$6.colors.surface.contrast,
|
8774
|
-
[vars$7.labelTextColor]: globalRefs$6.colors.surface.light,
|
8775
|
-
},
|
8685
|
+
const logo$1 = {
|
8686
|
+
[vars$l.fallbackUrl]: 'url(https://imgs.descope.com/components/no-logo-placeholder.svg)',
|
8776
8687
|
};
|
8777
8688
|
|
8778
|
-
var
|
8689
|
+
var logo$2 = /*#__PURE__*/Object.freeze({
|
8779
8690
|
__proto__: null,
|
8780
|
-
default:
|
8781
|
-
vars: vars$
|
8691
|
+
default: logo$1,
|
8692
|
+
vars: vars$l
|
8782
8693
|
});
|
8783
8694
|
|
8784
|
-
const
|
8785
|
-
const vars$6 = ButtonSelectionGroupClass.cssVarList;
|
8695
|
+
const vars$k = TotpImageClass.cssVarList;
|
8786
8696
|
|
8787
|
-
const
|
8788
|
-
[vars$
|
8789
|
-
[vars$6.fontFamily]: refs.fontFamily,
|
8790
|
-
[vars$6.labelTextColor]: refs.labelTextColor,
|
8791
|
-
[vars$6.labelRequiredIndicator]: refs.requiredIndicator,
|
8792
|
-
[vars$6.errorMessageTextColor]: refs.errorMessageTextColor,
|
8793
|
-
[vars$6.itemsSpacing]: globalRefs$5.spacing.sm,
|
8794
|
-
[vars$6.hostWidth]: refs.width,
|
8697
|
+
const logo = {
|
8698
|
+
[vars$k.fallbackUrl]: 'url(https://imgs.descope.com/components/totp-placeholder.svg)',
|
8795
8699
|
};
|
8796
8700
|
|
8797
|
-
var
|
8701
|
+
var totpImage = /*#__PURE__*/Object.freeze({
|
8798
8702
|
__proto__: null,
|
8799
|
-
default:
|
8800
|
-
vars: vars$
|
8703
|
+
default: logo,
|
8704
|
+
vars: vars$k
|
8801
8705
|
});
|
8802
8706
|
|
8803
|
-
const
|
8804
|
-
|
8805
|
-
const customMixin = (superclass) =>
|
8806
|
-
class ModalMixinClass extends superclass {
|
8807
|
-
get opened() {
|
8808
|
-
return this.getAttribute('opened') === 'true';
|
8809
|
-
}
|
8810
|
-
|
8811
|
-
handleOpened() {
|
8812
|
-
forwardAttrs(this, this.baseElement, { includeAttrs: ['opened'] });
|
8813
|
-
if (this.opened) {
|
8814
|
-
this.style.display = '';
|
8815
|
-
} else {
|
8816
|
-
this.style.display = 'none';
|
8817
|
-
}
|
8818
|
-
}
|
8819
|
-
|
8820
|
-
init() {
|
8821
|
-
super.init?.();
|
8822
|
-
this.style.display = 'none';
|
8823
|
-
|
8824
|
-
// vaadin-dialog might not be loaded in time
|
8825
|
-
// in order to make sure it's loaded before this block is running
|
8826
|
-
// we are wrapping it with setTimeout
|
8827
|
-
setTimeout(() => {
|
8828
|
-
// we want to sync descope-modal content through vaadin-dialog into the overlay
|
8829
|
-
// so we are adding a slot to the overlay, which allows us to forward the content from
|
8830
|
-
// vaadin-dialog to vaadin-dialog-overlay
|
8831
|
-
this.baseElement.shadowRoot
|
8832
|
-
.querySelector('vaadin-dialog-overlay')
|
8833
|
-
.appendChild(document.createElement('slot'));
|
8834
|
-
|
8835
|
-
this.#overrideOverlaySettings();
|
8836
|
-
|
8837
|
-
// we need to always open the modal in `opened=false`
|
8838
|
-
// to prevent it from rendering outside the dialog
|
8839
|
-
// first, we have to run `overrideOverlaySettings` to setup
|
8840
|
-
// the component.
|
8841
|
-
this.handleOpened();
|
8842
|
-
});
|
8843
|
-
}
|
8844
|
-
|
8845
|
-
// the default vaadin behavior is to attach the overlay to the body when opened
|
8846
|
-
// we do not want that because it's difficult to style the overlay in this way
|
8847
|
-
// so we override it to open inside the shadow DOM
|
8848
|
-
#overrideOverlaySettings() {
|
8849
|
-
const overlay = this.baseElement.shadowRoot.querySelector('vaadin-dialog-overlay');
|
8850
|
-
|
8851
|
-
overlay._attachOverlay = () => {
|
8852
|
-
overlay.bringToFront();
|
8853
|
-
this.baseElement.setAttribute('style', 'display:flex!important;');
|
8854
|
-
};
|
8855
|
-
overlay._detachOverlay = () => {
|
8856
|
-
this.baseElement.style.display = 'none';
|
8857
|
-
};
|
8858
|
-
overlay._enterModalState = () => {};
|
8707
|
+
const globalRefs$c = getThemeRefs(globals);
|
8708
|
+
const vars$j = TextClass.cssVarList;
|
8859
8709
|
|
8860
|
-
|
8861
|
-
|
8862
|
-
|
8710
|
+
const text = {
|
8711
|
+
[vars$j.hostDirection]: globalRefs$c.direction,
|
8712
|
+
[vars$j.textLineHeight]: '1.35em',
|
8713
|
+
[vars$j.textAlign]: 'left',
|
8714
|
+
[vars$j.textColor]: globalRefs$c.colors.surface.dark,
|
8715
|
+
variant: {
|
8716
|
+
h1: {
|
8717
|
+
[vars$j.fontSize]: globalRefs$c.typography.h1.size,
|
8718
|
+
[vars$j.fontWeight]: globalRefs$c.typography.h1.weight,
|
8719
|
+
[vars$j.fontFamily]: globalRefs$c.typography.h1.font,
|
8720
|
+
},
|
8721
|
+
h2: {
|
8722
|
+
[vars$j.fontSize]: globalRefs$c.typography.h2.size,
|
8723
|
+
[vars$j.fontWeight]: globalRefs$c.typography.h2.weight,
|
8724
|
+
[vars$j.fontFamily]: globalRefs$c.typography.h2.font,
|
8725
|
+
},
|
8726
|
+
h3: {
|
8727
|
+
[vars$j.fontSize]: globalRefs$c.typography.h3.size,
|
8728
|
+
[vars$j.fontWeight]: globalRefs$c.typography.h3.weight,
|
8729
|
+
[vars$j.fontFamily]: globalRefs$c.typography.h3.font,
|
8730
|
+
},
|
8731
|
+
subtitle1: {
|
8732
|
+
[vars$j.fontSize]: globalRefs$c.typography.subtitle1.size,
|
8733
|
+
[vars$j.fontWeight]: globalRefs$c.typography.subtitle1.weight,
|
8734
|
+
[vars$j.fontFamily]: globalRefs$c.typography.subtitle1.font,
|
8735
|
+
},
|
8736
|
+
subtitle2: {
|
8737
|
+
[vars$j.fontSize]: globalRefs$c.typography.subtitle2.size,
|
8738
|
+
[vars$j.fontWeight]: globalRefs$c.typography.subtitle2.weight,
|
8739
|
+
[vars$j.fontFamily]: globalRefs$c.typography.subtitle2.font,
|
8740
|
+
},
|
8741
|
+
body1: {
|
8742
|
+
[vars$j.fontSize]: globalRefs$c.typography.body1.size,
|
8743
|
+
[vars$j.fontWeight]: globalRefs$c.typography.body1.weight,
|
8744
|
+
[vars$j.fontFamily]: globalRefs$c.typography.body1.font,
|
8745
|
+
},
|
8746
|
+
body2: {
|
8747
|
+
[vars$j.fontSize]: globalRefs$c.typography.body2.size,
|
8748
|
+
[vars$j.fontWeight]: globalRefs$c.typography.body2.weight,
|
8749
|
+
[vars$j.fontFamily]: globalRefs$c.typography.body2.font,
|
8750
|
+
},
|
8751
|
+
},
|
8863
8752
|
|
8864
|
-
|
8865
|
-
|
8866
|
-
|
8867
|
-
overlayBackgroundColor: { property: () => ModalClass.cssVarList.overlay.backgroundColor },
|
8868
|
-
overlayShadow: { property: () => ModalClass.cssVarList.overlay.shadow },
|
8869
|
-
overlayWidth: { property: () => ModalClass.cssVarList.overlay.width },
|
8753
|
+
mode: {
|
8754
|
+
primary: {
|
8755
|
+
[vars$j.textColor]: globalRefs$c.colors.primary.main,
|
8870
8756
|
},
|
8871
|
-
|
8872
|
-
|
8873
|
-
name: 'overlay',
|
8874
|
-
selector: '',
|
8875
|
-
mappings: {
|
8876
|
-
hostDisplay: {
|
8877
|
-
selector: () => ':host(.descope-modal)',
|
8878
|
-
property: 'display',
|
8879
|
-
important: true,
|
8880
|
-
},
|
8881
|
-
backgroundColor: [
|
8882
|
-
{ selector: () => '::part(content)', property: 'background-color' },
|
8883
|
-
{ selector: () => '::part(overlay)', property: 'background-color' },
|
8884
|
-
],
|
8885
|
-
width: { selector: () => '::part(overlay)', property: 'width' },
|
8886
|
-
shadow: { selector: () => '::part(overlay)', property: 'box-shadow' },
|
8757
|
+
secondary: {
|
8758
|
+
[vars$j.textColor]: globalRefs$c.colors.secondary.main,
|
8887
8759
|
},
|
8888
|
-
|
8889
|
-
|
8890
|
-
attributes: ['opened'],
|
8760
|
+
error: {
|
8761
|
+
[vars$j.textColor]: globalRefs$c.colors.error.main,
|
8891
8762
|
},
|
8892
|
-
|
8893
|
-
|
8894
|
-
|
8895
|
-
|
8896
|
-
)(
|
8897
|
-
createProxy({
|
8898
|
-
slots: [''],
|
8899
|
-
wrappedEleName: 'vaadin-dialog',
|
8900
|
-
style: () => ``,
|
8901
|
-
excludeAttrsSync: ['tabindex', 'opened'],
|
8902
|
-
componentName: componentName$2,
|
8903
|
-
})
|
8904
|
-
);
|
8763
|
+
success: {
|
8764
|
+
[vars$j.textColor]: globalRefs$c.colors.success.main,
|
8765
|
+
},
|
8766
|
+
},
|
8905
8767
|
|
8906
|
-
|
8768
|
+
textAlign: {
|
8769
|
+
right: { [vars$j.textAlign]: 'right' },
|
8770
|
+
left: { [vars$j.textAlign]: 'left' },
|
8771
|
+
center: { [vars$j.textAlign]: 'center' },
|
8772
|
+
},
|
8907
8773
|
|
8908
|
-
|
8774
|
+
_fullWidth: {
|
8775
|
+
[vars$j.hostWidth]: '100%',
|
8776
|
+
},
|
8909
8777
|
|
8910
|
-
|
8911
|
-
|
8912
|
-
|
8913
|
-
|
8914
|
-
|
8778
|
+
_italic: {
|
8779
|
+
[vars$j.fontStyle]: 'italic',
|
8780
|
+
},
|
8781
|
+
|
8782
|
+
_uppercase: {
|
8783
|
+
[vars$j.textTransform]: 'uppercase',
|
8784
|
+
},
|
8915
8785
|
|
8916
|
-
|
8917
|
-
|
8786
|
+
_lowercase: {
|
8787
|
+
[vars$j.textTransform]: 'lowercase',
|
8788
|
+
},
|
8918
8789
|
};
|
8919
8790
|
|
8920
|
-
var
|
8791
|
+
var text$1 = /*#__PURE__*/Object.freeze({
|
8921
8792
|
__proto__: null,
|
8922
|
-
default:
|
8923
|
-
vars: vars$
|
8793
|
+
default: text,
|
8794
|
+
vars: vars$j
|
8924
8795
|
});
|
8925
8796
|
|
8926
|
-
const globalRefs$
|
8927
|
-
const vars$
|
8928
|
-
|
8929
|
-
const grid = {
|
8930
|
-
[vars$4.hostWidth]: '100%',
|
8931
|
-
[vars$4.hostHeight]: '100%',
|
8932
|
-
[vars$4.hostMinHeight]: '400px',
|
8933
|
-
[vars$4.backgroundColor]: globalRefs$3.colors.surface.light,
|
8934
|
-
|
8935
|
-
[vars$4.fontSize]: refs.fontSize,
|
8936
|
-
[vars$4.fontFamily]: refs.fontFamily,
|
8797
|
+
const globalRefs$b = getThemeRefs(globals);
|
8798
|
+
const vars$i = LinkClass.cssVarList;
|
8937
8799
|
|
8938
|
-
|
8939
|
-
[vars$
|
8940
|
-
[vars$
|
8800
|
+
const link = {
|
8801
|
+
[vars$i.hostDirection]: globalRefs$b.direction,
|
8802
|
+
[vars$i.cursor]: 'pointer',
|
8941
8803
|
|
8942
|
-
[vars$
|
8943
|
-
[vars$4.inputBorderStyle]: refs.borderStyle,
|
8944
|
-
[vars$4.inputBorderRadius]: refs.borderRadius,
|
8945
|
-
[vars$4.inputBorderColor]: 'transparent',
|
8804
|
+
[vars$i.textColor]: globalRefs$b.colors.primary.main,
|
8946
8805
|
|
8947
|
-
|
8948
|
-
|
8806
|
+
textAlign: {
|
8807
|
+
right: { [vars$i.textAlign]: 'right' },
|
8808
|
+
left: { [vars$i.textAlign]: 'left' },
|
8809
|
+
center: { [vars$i.textAlign]: 'center' },
|
8810
|
+
},
|
8949
8811
|
|
8950
|
-
|
8951
|
-
|
8812
|
+
_fullWidth: {
|
8813
|
+
[vars$i.hostWidth]: '100%',
|
8814
|
+
},
|
8952
8815
|
|
8953
|
-
|
8954
|
-
|
8816
|
+
mode: {
|
8817
|
+
primary: {
|
8818
|
+
[vars$i.textColor]: globalRefs$b.colors.primary.main,
|
8819
|
+
},
|
8820
|
+
secondary: {
|
8821
|
+
[vars$i.textColor]: globalRefs$b.colors.secondary.main,
|
8822
|
+
},
|
8823
|
+
error: {
|
8824
|
+
[vars$i.textColor]: globalRefs$b.colors.error.main,
|
8825
|
+
},
|
8826
|
+
success: {
|
8827
|
+
[vars$i.textColor]: globalRefs$b.colors.success.main,
|
8828
|
+
},
|
8955
8829
|
},
|
8956
8830
|
};
|
8957
8831
|
|
8958
|
-
var
|
8832
|
+
var link$1 = /*#__PURE__*/Object.freeze({
|
8959
8833
|
__proto__: null,
|
8960
|
-
default:
|
8961
|
-
|
8962
|
-
vars: vars$4
|
8834
|
+
default: link,
|
8835
|
+
vars: vars$i
|
8963
8836
|
});
|
8964
8837
|
|
8965
|
-
const
|
8838
|
+
const globalRefs$a = getThemeRefs(globals);
|
8839
|
+
const compVars$2 = DividerClass.cssVarList;
|
8966
8840
|
|
8967
|
-
const
|
8968
|
-
|
8969
|
-
|
8970
|
-
|
8971
|
-
|
8972
|
-
|
8973
|
-
|
8974
|
-
// `card-closed` event.
|
8975
|
-
this.baseElement.addEventListener('animationend', () => {
|
8976
|
-
this.remove();
|
8977
|
-
this.dispatchEvent(new Event('card-closed'));
|
8978
|
-
});
|
8841
|
+
const [helperTheme$1, helperRefs$1, helperVars$1] = createHelperVars(
|
8842
|
+
{
|
8843
|
+
thickness: '2px',
|
8844
|
+
spacing: '10px',
|
8845
|
+
},
|
8846
|
+
componentName$w
|
8847
|
+
);
|
8979
8848
|
|
8980
|
-
|
8981
|
-
|
8849
|
+
const divider = {
|
8850
|
+
...helperTheme$1,
|
8982
8851
|
|
8983
|
-
|
8984
|
-
|
8852
|
+
[compVars$2.hostDirection]: globalRefs$a.direction,
|
8853
|
+
[compVars$2.alignItems]: 'center',
|
8854
|
+
[compVars$2.flexDirection]: 'row',
|
8855
|
+
[compVars$2.alignSelf]: 'stretch',
|
8856
|
+
[compVars$2.hostWidth]: '100%',
|
8857
|
+
[compVars$2.stripeColor]: globalRefs$a.colors.surface.main,
|
8858
|
+
[compVars$2.stripeColorOpacity]: '0.5',
|
8859
|
+
[compVars$2.stripeHorizontalThickness]: helperRefs$1.thickness,
|
8860
|
+
[compVars$2.labelTextWidth]: 'fit-content',
|
8861
|
+
[compVars$2.labelTextMaxWidth]: 'calc(100% - 100px)',
|
8862
|
+
[compVars$2.labelTextHorizontalSpacing]: helperRefs$1.spacing,
|
8863
|
+
[compVars$2.textAlign]: 'center',
|
8985
8864
|
|
8986
|
-
|
8987
|
-
|
8988
|
-
|
8989
|
-
|
8990
|
-
|
8991
|
-
|
8992
|
-
|
8993
|
-
|
8994
|
-
|
8995
|
-
|
8865
|
+
_vertical: {
|
8866
|
+
[compVars$2.minHeight]: '200px',
|
8867
|
+
[compVars$2.flexDirection]: 'column',
|
8868
|
+
[compVars$2.hostWidth]: 'fit-content',
|
8869
|
+
[compVars$2.hostPadding]: `0 calc(${helperRefs$1.thickness} * 3)`,
|
8870
|
+
[compVars$2.stripeVerticalThickness]: helperRefs$1.thickness,
|
8871
|
+
[compVars$2.labelTextWidth]: 'fit-content',
|
8872
|
+
[compVars$2.labelTextMaxWidth]: '100%',
|
8873
|
+
[compVars$2.labelTextVerticalSpacing]: helperRefs$1.spacing,
|
8874
|
+
},
|
8875
|
+
};
|
8996
8876
|
|
8997
|
-
|
8998
|
-
|
8877
|
+
const vars$h = {
|
8878
|
+
...compVars$2,
|
8879
|
+
...helperVars$1,
|
8880
|
+
};
|
8999
8881
|
|
9000
|
-
|
9001
|
-
|
8882
|
+
var divider$1 = /*#__PURE__*/Object.freeze({
|
8883
|
+
__proto__: null,
|
8884
|
+
default: divider,
|
8885
|
+
vars: vars$h
|
8886
|
+
});
|
9002
8887
|
|
9003
|
-
|
9004
|
-
this.close();
|
9005
|
-
};
|
9006
|
-
}
|
9007
|
-
};
|
8888
|
+
const vars$g = PasscodeClass.cssVarList;
|
9008
8889
|
|
9009
|
-
const
|
9010
|
-
|
9011
|
-
|
9012
|
-
|
8890
|
+
const passcode = {
|
8891
|
+
[vars$g.hostDirection]: refs.direction,
|
8892
|
+
[vars$g.fontFamily]: refs.fontFamily,
|
8893
|
+
[vars$g.fontSize]: refs.fontSize,
|
8894
|
+
[vars$g.labelTextColor]: refs.labelTextColor,
|
8895
|
+
[vars$g.labelRequiredIndicator]: refs.requiredIndicator,
|
8896
|
+
[vars$g.errorMessageTextColor]: refs.errorMessageTextColor,
|
8897
|
+
[vars$g.digitValueTextColor]: refs.valueTextColor,
|
8898
|
+
[vars$g.digitPadding]: '0',
|
8899
|
+
[vars$g.digitTextAlign]: 'center',
|
8900
|
+
[vars$g.digitSpacing]: '4px',
|
8901
|
+
[vars$g.hostWidth]: refs.width,
|
8902
|
+
[vars$g.digitOutlineColor]: 'transparent',
|
8903
|
+
[vars$g.digitOutlineWidth]: refs.outlineWidth,
|
8904
|
+
[vars$g.focusedDigitFieldOutlineColor]: refs.outlineColor,
|
8905
|
+
[vars$g.digitSize]: refs.inputHeight,
|
9013
8906
|
|
9014
|
-
|
9015
|
-
|
9016
|
-
|
9017
|
-
|
9018
|
-
|
9019
|
-
|
9020
|
-
backgroundColor: { selector: selectors.content },
|
9021
|
-
textColor: { property: 'color' },
|
9022
|
-
boxShadow: {},
|
9023
|
-
borderWidth: { selector: selectors.content, property: 'border-width' },
|
9024
|
-
borderColor: { selector: selectors.content, property: 'border-color' },
|
9025
|
-
borderStyle: { selector: selectors.content, property: 'border-style' },
|
9026
|
-
borderRadius: [
|
9027
|
-
{ selector: selectors.content, property: 'border-radius' },
|
9028
|
-
{ selector: selectors.overlay, property: 'border-radius' },
|
9029
|
-
],
|
9030
|
-
verticalPadding: [
|
9031
|
-
{ selector: selectors.content, property: 'padding-top' },
|
9032
|
-
{ selector: selectors.content, property: 'padding-bottom' },
|
9033
|
-
],
|
9034
|
-
horizontalPadding: [
|
9035
|
-
{ selector: selectors.content, property: 'padding-right' },
|
9036
|
-
{ selector: selectors.content, property: 'padding-left' },
|
9037
|
-
],
|
9038
|
-
},
|
9039
|
-
}),
|
9040
|
-
notificationCardMixin
|
9041
|
-
)(
|
9042
|
-
createProxy({
|
9043
|
-
slots: [],
|
9044
|
-
wrappedEleName: 'vaadin-notification-card',
|
9045
|
-
style: () => `
|
9046
|
-
vaadin-notification-card {
|
9047
|
-
box-shadow: none;
|
9048
|
-
}
|
9049
|
-
::part(overlay) {
|
9050
|
-
box-shadow: none;
|
9051
|
-
background: none;
|
9052
|
-
}
|
8907
|
+
size: {
|
8908
|
+
xs: { [vars$g.spinnerSize]: '15px' },
|
8909
|
+
sm: { [vars$g.spinnerSize]: '20px' },
|
8910
|
+
md: { [vars$g.spinnerSize]: '20px' },
|
8911
|
+
lg: { [vars$g.spinnerSize]: '20px' },
|
8912
|
+
},
|
9053
8913
|
|
9054
|
-
|
9055
|
-
|
9056
|
-
|
9057
|
-
}
|
8914
|
+
_hideCursor: {
|
8915
|
+
[vars$g.digitCaretTextColor]: 'transparent',
|
8916
|
+
},
|
9058
8917
|
|
9059
|
-
|
9060
|
-
|
9061
|
-
|
9062
|
-
|
9063
|
-
}
|
8918
|
+
_loading: {
|
8919
|
+
[vars$g.overlayOpacity]: refs.overlayOpacity,
|
8920
|
+
},
|
8921
|
+
};
|
9064
8922
|
|
9065
|
-
|
9066
|
-
|
9067
|
-
|
9068
|
-
|
9069
|
-
|
9070
|
-
}
|
9071
|
-
`,
|
9072
|
-
excludeAttrsSync: ['tabindex'],
|
9073
|
-
componentName: componentName$1,
|
9074
|
-
})
|
9075
|
-
);
|
8923
|
+
var passcode$1 = /*#__PURE__*/Object.freeze({
|
8924
|
+
__proto__: null,
|
8925
|
+
default: passcode,
|
8926
|
+
vars: vars$g
|
8927
|
+
});
|
9076
8928
|
|
9077
|
-
const globalRefs$
|
9078
|
-
const vars$
|
8929
|
+
const globalRefs$9 = getThemeRefs(globals);
|
8930
|
+
const vars$f = LoaderLinearClass.cssVarList;
|
8931
|
+
|
8932
|
+
const loaderLinear = {
|
8933
|
+
[vars$f.hostDisplay]: 'inline-block',
|
8934
|
+
[vars$f.hostWidth]: '100%',
|
9079
8935
|
|
9080
|
-
|
8936
|
+
[vars$f.barColor]: globalRefs$9.colors.surface.contrast,
|
8937
|
+
[vars$f.barWidth]: '20%',
|
9081
8938
|
|
9082
|
-
|
9083
|
-
[vars$
|
9084
|
-
[vars$3.fontFamily]: globalRefs$2.fonts.font1.family,
|
9085
|
-
[vars$3.fontSize]: globalRefs$2.typography.body1.size,
|
9086
|
-
[vars$3.backgroundColor]: globalRefs$2.colors.surface.main,
|
9087
|
-
[vars$3.textColor]: globalRefs$2.colors.surface.contrast,
|
9088
|
-
[vars$3.boxShadow]: `${globalRefs$2.shadow.wide.xl} ${shadowColor}, ${globalRefs$2.shadow.narrow.xl} ${shadowColor}`,
|
9089
|
-
[vars$3.verticalPadding]: '0.625em',
|
9090
|
-
[vars$3.horizontalPadding]: '1.5em',
|
9091
|
-
[vars$3.borderRadius]: globalRefs$2.radius.xs,
|
8939
|
+
[vars$f.barBackgroundColor]: globalRefs$9.colors.surface.main,
|
8940
|
+
[vars$f.barBorderRadius]: '4px',
|
9092
8941
|
|
9093
|
-
|
9094
|
-
|
9095
|
-
|
9096
|
-
|
9097
|
-
},
|
8942
|
+
[vars$f.animationDuration]: '2s',
|
8943
|
+
[vars$f.animationTimingFunction]: 'linear',
|
8944
|
+
[vars$f.animationIterationCount]: 'infinite',
|
8945
|
+
[vars$f.verticalPadding]: '0.25em',
|
9098
8946
|
|
9099
8947
|
size: {
|
9100
|
-
xs: { [vars$
|
9101
|
-
sm: { [vars$
|
9102
|
-
md: { [vars$
|
9103
|
-
lg: { [vars$
|
8948
|
+
xs: { [vars$f.barHeight]: '2px' },
|
8949
|
+
sm: { [vars$f.barHeight]: '4px' },
|
8950
|
+
md: { [vars$f.barHeight]: '6px' },
|
8951
|
+
lg: { [vars$f.barHeight]: '8px' },
|
9104
8952
|
},
|
9105
8953
|
|
9106
8954
|
mode: {
|
9107
8955
|
primary: {
|
9108
|
-
[vars$
|
9109
|
-
[vars$3.textColor]: globalRefs$2.colors.primary.contrast,
|
9110
|
-
[vars$3.borderColor]: globalRefs$2.colors.primary.light,
|
8956
|
+
[vars$f.barColor]: globalRefs$9.colors.primary.main,
|
9111
8957
|
},
|
9112
|
-
|
9113
|
-
[vars$
|
9114
|
-
[vars$3.textColor]: globalRefs$2.colors.success.contrast,
|
9115
|
-
[vars$3.borderColor]: globalRefs$2.colors.success.light,
|
8958
|
+
secondary: {
|
8959
|
+
[vars$f.barColor]: globalRefs$9.colors.secondary.main,
|
9116
8960
|
},
|
9117
|
-
|
9118
|
-
|
9119
|
-
|
9120
|
-
|
8961
|
+
},
|
8962
|
+
|
8963
|
+
_hidden: {
|
8964
|
+
[vars$f.hostDisplay]: 'none',
|
8965
|
+
},
|
8966
|
+
};
|
8967
|
+
|
8968
|
+
var loaderLinear$1 = /*#__PURE__*/Object.freeze({
|
8969
|
+
__proto__: null,
|
8970
|
+
default: loaderLinear,
|
8971
|
+
vars: vars$f
|
8972
|
+
});
|
8973
|
+
|
8974
|
+
const globalRefs$8 = getThemeRefs(globals);
|
8975
|
+
const compVars$1 = LoaderRadialClass.cssVarList;
|
8976
|
+
|
8977
|
+
const [helperTheme, helperRefs, helperVars] = createHelperVars(
|
8978
|
+
{
|
8979
|
+
spinnerColor: globalRefs$8.colors.surface.contrast,
|
8980
|
+
mode: {
|
8981
|
+
primary: {
|
8982
|
+
spinnerColor: globalRefs$8.colors.primary.main,
|
8983
|
+
},
|
8984
|
+
secondary: {
|
8985
|
+
spinnerColor: globalRefs$8.colors.secondary.main,
|
8986
|
+
},
|
9121
8987
|
},
|
9122
8988
|
},
|
8989
|
+
componentName$z
|
8990
|
+
);
|
8991
|
+
|
8992
|
+
const loaderRadial = {
|
8993
|
+
...helperTheme,
|
8994
|
+
|
8995
|
+
[compVars$1.animationDuration]: '2s',
|
8996
|
+
[compVars$1.animationTimingFunction]: 'linear',
|
8997
|
+
[compVars$1.animationIterationCount]: 'infinite',
|
8998
|
+
[compVars$1.spinnerBorderStyle]: 'solid',
|
8999
|
+
[compVars$1.spinnerBorderWidth]: '0.2em',
|
9000
|
+
[compVars$1.spinnerBorderRadius]: '50%',
|
9001
|
+
[compVars$1.spinnerQuadrant1Color]: helperRefs.spinnerColor,
|
9002
|
+
[compVars$1.spinnerQuadrant2Color]: 'transparent',
|
9003
|
+
[compVars$1.spinnerQuadrant3Color]: helperRefs.spinnerColor,
|
9004
|
+
[compVars$1.spinnerQuadrant4Color]: 'transparent',
|
9005
|
+
|
9006
|
+
size: {
|
9007
|
+
xs: { [compVars$1.spinnerSize]: '20px' },
|
9008
|
+
sm: { [compVars$1.spinnerSize]: '30px' },
|
9009
|
+
md: { [compVars$1.spinnerSize]: '40px' },
|
9010
|
+
lg: { [compVars$1.spinnerSize]: '60px' },
|
9011
|
+
xl: { [compVars$1.spinnerSize]: '80px' },
|
9012
|
+
},
|
9013
|
+
|
9014
|
+
_hidden: {
|
9015
|
+
[compVars$1.hostDisplay]: 'none',
|
9016
|
+
},
|
9017
|
+
};
|
9018
|
+
const vars$e = {
|
9019
|
+
...compVars$1,
|
9020
|
+
...helperVars,
|
9123
9021
|
};
|
9124
9022
|
|
9125
|
-
var
|
9023
|
+
var loaderRadial$1 = /*#__PURE__*/Object.freeze({
|
9126
9024
|
__proto__: null,
|
9127
|
-
default:
|
9128
|
-
vars: vars$
|
9025
|
+
default: loaderRadial,
|
9026
|
+
vars: vars$e
|
9129
9027
|
});
|
9130
9028
|
|
9131
|
-
const
|
9029
|
+
const globalRefs$7 = getThemeRefs(globals);
|
9030
|
+
const vars$d = ComboBoxClass.cssVarList;
|
9132
9031
|
|
9133
|
-
const
|
9134
|
-
|
9135
|
-
|
9136
|
-
|
9137
|
-
|
9138
|
-
|
9032
|
+
const comboBox = {
|
9033
|
+
[vars$d.hostWidth]: refs.width,
|
9034
|
+
[vars$d.hostDirection]: refs.direction,
|
9035
|
+
[vars$d.fontSize]: refs.fontSize,
|
9036
|
+
[vars$d.fontFamily]: refs.fontFamily,
|
9037
|
+
[vars$d.labelTextColor]: refs.labelTextColor,
|
9038
|
+
[vars$d.errorMessageTextColor]: refs.errorMessageTextColor,
|
9039
|
+
[vars$d.inputBorderColor]: refs.borderColor,
|
9040
|
+
[vars$d.inputBorderWidth]: refs.borderWidth,
|
9041
|
+
[vars$d.inputBorderStyle]: refs.borderStyle,
|
9042
|
+
[vars$d.inputBorderRadius]: refs.borderRadius,
|
9043
|
+
[vars$d.inputOutlineColor]: refs.outlineColor,
|
9044
|
+
[vars$d.inputOutlineOffset]: refs.outlineOffset,
|
9045
|
+
[vars$d.inputOutlineWidth]: refs.outlineWidth,
|
9046
|
+
[vars$d.inputOutlineStyle]: refs.outlineStyle,
|
9047
|
+
[vars$d.labelRequiredIndicator]: refs.requiredIndicator,
|
9048
|
+
[vars$d.inputValueTextColor]: refs.valueTextColor,
|
9049
|
+
[vars$d.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
9050
|
+
[vars$d.inputBackgroundColor]: refs.backgroundColor,
|
9051
|
+
[vars$d.inputHorizontalPadding]: refs.horizontalPadding,
|
9052
|
+
[vars$d.inputHeight]: refs.inputHeight,
|
9053
|
+
[vars$d.inputDropdownButtonColor]: globalRefs$7.colors.surface.contrast,
|
9054
|
+
[vars$d.inputDropdownButtonCursor]: 'pointer',
|
9055
|
+
[vars$d.inputDropdownButtonSize]: refs.toggleButtonSize,
|
9056
|
+
[vars$d.inputDropdownButtonOffset]: globalRefs$7.spacing.xs,
|
9057
|
+
[vars$d.overlayItemPaddingInlineStart]: globalRefs$7.spacing.xs,
|
9058
|
+
[vars$d.overlayItemPaddingInlineEnd]: globalRefs$7.spacing.lg,
|
9139
9059
|
|
9140
|
-
|
9060
|
+
_readonly: {
|
9061
|
+
[vars$d.inputDropdownButtonCursor]: 'default',
|
9062
|
+
},
|
9141
9063
|
|
9142
|
-
|
9143
|
-
|
9144
|
-
|
9145
|
-
|
9146
|
-
|
9147
|
-
if (this.isValidDataType(defaultValues)) {
|
9148
|
-
return defaultValues;
|
9149
|
-
}
|
9150
|
-
} catch (e) {
|
9151
|
-
// eslint-disable-next-line no-console
|
9152
|
-
console.error('could not parse data string from attribute "default-values" -', e.message);
|
9153
|
-
}
|
9154
|
-
}
|
9155
|
-
return [];
|
9156
|
-
}
|
9064
|
+
// Overlay theme exposed via the component:
|
9065
|
+
[vars$d.overlayFontSize]: refs.fontSize,
|
9066
|
+
[vars$d.overlayFontFamily]: refs.fontFamily,
|
9067
|
+
[vars$d.overlayCursor]: 'pointer',
|
9068
|
+
[vars$d.overlayItemBoxShadow]: 'none',
|
9157
9069
|
|
9158
|
-
|
9159
|
-
|
9160
|
-
|
9070
|
+
// Overlay direct theme:
|
9071
|
+
[vars$d.overlay.minHeight]: '400px',
|
9072
|
+
[vars$d.overlay.margin]: '0',
|
9073
|
+
};
|
9161
9074
|
|
9162
|
-
|
9163
|
-
|
9164
|
-
|
9165
|
-
|
9075
|
+
var comboBox$1 = /*#__PURE__*/Object.freeze({
|
9076
|
+
__proto__: null,
|
9077
|
+
comboBox: comboBox,
|
9078
|
+
default: comboBox,
|
9079
|
+
vars: vars$d
|
9080
|
+
});
|
9081
|
+
|
9082
|
+
const vars$c = ImageClass.cssVarList;
|
9083
|
+
|
9084
|
+
const image = {};
|
9085
|
+
|
9086
|
+
var image$1 = /*#__PURE__*/Object.freeze({
|
9087
|
+
__proto__: null,
|
9088
|
+
default: image,
|
9089
|
+
vars: vars$c
|
9090
|
+
});
|
9091
|
+
|
9092
|
+
const vars$b = PhoneFieldClass.cssVarList;
|
9093
|
+
|
9094
|
+
const phoneField = {
|
9095
|
+
[vars$b.hostWidth]: refs.width,
|
9096
|
+
[vars$b.hostDirection]: refs.direction,
|
9097
|
+
[vars$b.fontSize]: refs.fontSize,
|
9098
|
+
[vars$b.fontFamily]: refs.fontFamily,
|
9099
|
+
[vars$b.labelTextColor]: refs.labelTextColor,
|
9100
|
+
[vars$b.labelRequiredIndicator]: refs.requiredIndicator,
|
9101
|
+
[vars$b.errorMessageTextColor]: refs.errorMessageTextColor,
|
9102
|
+
[vars$b.inputValueTextColor]: refs.valueTextColor,
|
9103
|
+
[vars$b.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
9104
|
+
[vars$b.inputBorderStyle]: refs.borderStyle,
|
9105
|
+
[vars$b.inputBorderWidth]: refs.borderWidth,
|
9106
|
+
[vars$b.inputBorderColor]: refs.borderColor,
|
9107
|
+
[vars$b.inputBorderRadius]: refs.borderRadius,
|
9108
|
+
[vars$b.inputOutlineStyle]: refs.outlineStyle,
|
9109
|
+
[vars$b.inputOutlineWidth]: refs.outlineWidth,
|
9110
|
+
[vars$b.inputOutlineColor]: refs.outlineColor,
|
9111
|
+
[vars$b.inputOutlineOffset]: refs.outlineOffset,
|
9112
|
+
[vars$b.phoneInputWidth]: refs.minWidth,
|
9113
|
+
[vars$b.countryCodeInputWidth]: '5em',
|
9114
|
+
[vars$b.countryCodeDropdownWidth]: '20em',
|
9115
|
+
|
9116
|
+
// '@overlay': {
|
9117
|
+
// overlayItemBackgroundColor: 'red'
|
9118
|
+
// }
|
9119
|
+
};
|
9120
|
+
|
9121
|
+
var phoneField$1 = /*#__PURE__*/Object.freeze({
|
9122
|
+
__proto__: null,
|
9123
|
+
default: phoneField,
|
9124
|
+
vars: vars$b
|
9125
|
+
});
|
9126
|
+
|
9127
|
+
const vars$a = PhoneFieldInputBoxClass.cssVarList;
|
9128
|
+
|
9129
|
+
const phoneInputBoxField = {
|
9130
|
+
[vars$a.hostWidth]: '16em',
|
9131
|
+
[vars$a.hostMinWidth]: refs.minWidth,
|
9132
|
+
[vars$a.hostDirection]: refs.direction,
|
9133
|
+
[vars$a.fontSize]: refs.fontSize,
|
9134
|
+
[vars$a.fontFamily]: refs.fontFamily,
|
9135
|
+
[vars$a.labelTextColor]: refs.labelTextColor,
|
9136
|
+
[vars$a.labelRequiredIndicator]: refs.requiredIndicator,
|
9137
|
+
[vars$a.errorMessageTextColor]: refs.errorMessageTextColor,
|
9138
|
+
[vars$a.inputValueTextColor]: refs.valueTextColor,
|
9139
|
+
[vars$a.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
9140
|
+
[vars$a.inputBorderStyle]: refs.borderStyle,
|
9141
|
+
[vars$a.inputBorderWidth]: refs.borderWidth,
|
9142
|
+
[vars$a.inputBorderColor]: refs.borderColor,
|
9143
|
+
[vars$a.inputBorderRadius]: refs.borderRadius,
|
9144
|
+
[vars$a.inputOutlineStyle]: refs.outlineStyle,
|
9145
|
+
[vars$a.inputOutlineWidth]: refs.outlineWidth,
|
9146
|
+
[vars$a.inputOutlineColor]: refs.outlineColor,
|
9147
|
+
[vars$a.inputOutlineOffset]: refs.outlineOffset,
|
9148
|
+
_fullWidth: {
|
9149
|
+
[vars$a.hostWidth]: refs.width,
|
9150
|
+
},
|
9151
|
+
};
|
9166
9152
|
|
9167
|
-
|
9168
|
-
|
9153
|
+
var phoneInputBoxField$1 = /*#__PURE__*/Object.freeze({
|
9154
|
+
__proto__: null,
|
9155
|
+
default: phoneInputBoxField,
|
9156
|
+
vars: vars$a
|
9157
|
+
});
|
9169
9158
|
|
9170
|
-
|
9159
|
+
const vars$9 = NewPasswordClass.cssVarList;
|
9171
9160
|
|
9172
|
-
|
9173
|
-
|
9174
|
-
|
9175
|
-
|
9176
|
-
|
9177
|
-
|
9178
|
-
|
9179
|
-
|
9180
|
-
console.error('could not parse data string from attribute "data" -', e.message);
|
9181
|
-
}
|
9182
|
-
}
|
9161
|
+
const newPassword = {
|
9162
|
+
[vars$9.hostWidth]: refs.width,
|
9163
|
+
[vars$9.hostMinWidth]: refs.minWidth,
|
9164
|
+
[vars$9.hostDirection]: refs.direction,
|
9165
|
+
[vars$9.fontSize]: refs.fontSize,
|
9166
|
+
[vars$9.fontFamily]: refs.fontFamily,
|
9167
|
+
[vars$9.spaceBetweenInputs]: '1em',
|
9168
|
+
[vars$9.errorMessageTextColor]: refs.errorMessageTextColor,
|
9183
9169
|
|
9184
|
-
|
9185
|
-
|
9170
|
+
_required: {
|
9171
|
+
// NewPassword doesn't pass `required` attribute to its Password components.
|
9172
|
+
// That's why we fake the required indicator on each input.
|
9173
|
+
// We do that by injecting `::after` element, and populating it with requiredIndicator content.
|
9174
|
+
[vars$9.inputsRequiredIndicator]: refs.requiredIndicator, // used to populate required content for NewPassword input fields outside the theme
|
9175
|
+
},
|
9176
|
+
};
|
9186
9177
|
|
9187
|
-
|
9188
|
-
|
9189
|
-
|
9190
|
-
|
9191
|
-
|
9192
|
-
}
|
9178
|
+
var newPassword$1 = /*#__PURE__*/Object.freeze({
|
9179
|
+
__proto__: null,
|
9180
|
+
default: newPassword,
|
9181
|
+
vars: vars$9
|
9182
|
+
});
|
9193
9183
|
|
9194
|
-
|
9195
|
-
return this.getAttribute('allow-custom-value') === 'true';
|
9196
|
-
}
|
9184
|
+
const vars$8 = UploadFileClass.cssVarList;
|
9197
9185
|
|
9198
|
-
|
9199
|
-
|
9200
|
-
|
9186
|
+
const uploadFile = {
|
9187
|
+
[vars$8.hostDirection]: refs.direction,
|
9188
|
+
[vars$8.labelTextColor]: refs.labelTextColor,
|
9189
|
+
[vars$8.fontFamily]: refs.fontFamily,
|
9201
9190
|
|
9202
|
-
|
9203
|
-
return parseInt(this.getAttribute('max-items-selection'), 10) || 0;
|
9204
|
-
}
|
9191
|
+
[vars$8.iconSize]: '2em',
|
9205
9192
|
|
9206
|
-
|
9207
|
-
|
9208
|
-
const isValid = Array.isArray(data);
|
9209
|
-
if (!isValid) {
|
9210
|
-
// eslint-disable-next-line no-console
|
9211
|
-
console.error('data and default-values must be an array, received:', data);
|
9212
|
-
}
|
9193
|
+
[vars$8.hostPadding]: '0.75em',
|
9194
|
+
[vars$8.gap]: '0.5em',
|
9213
9195
|
|
9214
|
-
|
9215
|
-
|
9196
|
+
[vars$8.fontSize]: '16px',
|
9197
|
+
[vars$8.titleFontWeight]: '500',
|
9198
|
+
[vars$8.lineHeight]: '1em',
|
9216
9199
|
|
9217
|
-
|
9218
|
-
|
9219
|
-
|
9200
|
+
[vars$8.borderWidth]: refs.borderWidth,
|
9201
|
+
[vars$8.borderColor]: refs.borderColor,
|
9202
|
+
[vars$8.borderRadius]: refs.borderRadius,
|
9203
|
+
[vars$8.borderStyle]: 'dashed',
|
9220
9204
|
|
9221
|
-
|
9222
|
-
|
9223
|
-
|
9224
|
-
}
|
9205
|
+
_required: {
|
9206
|
+
[vars$8.requiredIndicator]: refs.requiredIndicator,
|
9207
|
+
},
|
9225
9208
|
|
9226
|
-
|
9227
|
-
|
9228
|
-
|
9209
|
+
size: {
|
9210
|
+
xs: {
|
9211
|
+
[vars$8.hostHeight]: '196px',
|
9212
|
+
[vars$8.hostWidth]: '200px',
|
9213
|
+
[vars$8.titleFontSize]: '0.875em',
|
9214
|
+
[vars$8.descriptionFontSize]: '0.875em',
|
9215
|
+
[vars$8.lineHeight]: '1.25em',
|
9216
|
+
},
|
9217
|
+
sm: {
|
9218
|
+
[vars$8.hostHeight]: '216px',
|
9219
|
+
[vars$8.hostWidth]: '230px',
|
9220
|
+
[vars$8.titleFontSize]: '1em',
|
9221
|
+
[vars$8.descriptionFontSize]: '0.875em',
|
9222
|
+
[vars$8.lineHeight]: '1.25em',
|
9223
|
+
},
|
9224
|
+
md: {
|
9225
|
+
[vars$8.hostHeight]: '256px',
|
9226
|
+
[vars$8.hostWidth]: '312px',
|
9227
|
+
[vars$8.titleFontSize]: '1.125em',
|
9228
|
+
[vars$8.descriptionFontSize]: '1em',
|
9229
|
+
[vars$8.lineHeight]: '1.5em',
|
9230
|
+
},
|
9231
|
+
lg: {
|
9232
|
+
[vars$8.hostHeight]: '280px',
|
9233
|
+
[vars$8.hostWidth]: '336px',
|
9234
|
+
[vars$8.titleFontSize]: '1.125em',
|
9235
|
+
[vars$8.descriptionFontSize]: '1.125em',
|
9236
|
+
[vars$8.lineHeight]: '1.75em',
|
9237
|
+
},
|
9238
|
+
},
|
9229
9239
|
|
9230
|
-
|
9240
|
+
_fullWidth: {
|
9241
|
+
[vars$8.hostWidth]: refs.width,
|
9242
|
+
},
|
9243
|
+
};
|
9231
9244
|
|
9232
|
-
|
9233
|
-
|
9234
|
-
|
9235
|
-
|
9245
|
+
var uploadFile$1 = /*#__PURE__*/Object.freeze({
|
9246
|
+
__proto__: null,
|
9247
|
+
default: uploadFile,
|
9248
|
+
vars: vars$8
|
9249
|
+
});
|
9236
9250
|
|
9237
|
-
|
9238
|
-
if (this.value.length === 0) {
|
9239
|
-
this.setDefaultValues();
|
9240
|
-
}
|
9241
|
-
}
|
9251
|
+
const globalRefs$6 = getThemeRefs(globals);
|
9242
9252
|
|
9243
|
-
|
9244
|
-
customValueTransformFn(val) {
|
9245
|
-
return val;
|
9246
|
-
}
|
9253
|
+
const vars$7 = ButtonSelectionGroupItemClass.cssVarList;
|
9247
9254
|
|
9248
|
-
|
9249
|
-
|
9250
|
-
|
9251
|
-
|
9252
|
-
|
9253
|
-
|
9254
|
-
|
9255
|
-
);
|
9255
|
+
const buttonSelectionGroupItem = {
|
9256
|
+
[vars$7.hostDirection]: 'inherit',
|
9257
|
+
[vars$7.backgroundColor]: globalRefs$6.colors.surface.light,
|
9258
|
+
[vars$7.labelTextColor]: globalRefs$6.colors.surface.contrast,
|
9259
|
+
[vars$7.borderColor]: globalRefs$6.colors.surface.main,
|
9260
|
+
[vars$7.borderStyle]: 'solid',
|
9261
|
+
[vars$7.borderRadius]: globalRefs$6.radius.sm,
|
9256
9262
|
|
9257
|
-
|
9263
|
+
_hover: {
|
9264
|
+
[vars$7.backgroundColor]: '#f4f5f5', // can we take it from the palette?
|
9265
|
+
},
|
9258
9266
|
|
9259
|
-
|
9260
|
-
|
9261
|
-
|
9262
|
-
|
9263
|
-
|
9267
|
+
_selected: {
|
9268
|
+
[vars$7.borderColor]: globalRefs$6.colors.surface.contrast,
|
9269
|
+
[vars$7.backgroundColor]: globalRefs$6.colors.surface.contrast,
|
9270
|
+
[vars$7.labelTextColor]: globalRefs$6.colors.surface.light,
|
9271
|
+
},
|
9272
|
+
};
|
9264
9273
|
|
9265
|
-
|
9266
|
-
|
9267
|
-
|
9274
|
+
var buttonSelectionGroupItem$1 = /*#__PURE__*/Object.freeze({
|
9275
|
+
__proto__: null,
|
9276
|
+
default: buttonSelectionGroupItem,
|
9277
|
+
vars: vars$7
|
9278
|
+
});
|
9268
9279
|
|
9269
|
-
|
9270
|
-
|
9271
|
-
},
|
9272
|
-
});
|
9273
|
-
}
|
9280
|
+
const globalRefs$5 = getThemeRefs(globals);
|
9281
|
+
const vars$6 = ButtonSelectionGroupClass.cssVarList;
|
9274
9282
|
|
9275
|
-
|
9276
|
-
|
9277
|
-
|
9278
|
-
|
9279
|
-
|
9283
|
+
const buttonSelectionGroup = {
|
9284
|
+
[vars$6.hostDirection]: refs.direction,
|
9285
|
+
[vars$6.fontFamily]: refs.fontFamily,
|
9286
|
+
[vars$6.labelTextColor]: refs.labelTextColor,
|
9287
|
+
[vars$6.labelRequiredIndicator]: refs.requiredIndicator,
|
9288
|
+
[vars$6.errorMessageTextColor]: refs.errorMessageTextColor,
|
9289
|
+
[vars$6.itemsSpacing]: globalRefs$5.spacing.sm,
|
9290
|
+
[vars$6.hostWidth]: refs.width,
|
9291
|
+
};
|
9280
9292
|
|
9281
|
-
|
9282
|
-
|
9283
|
-
|
9293
|
+
var buttonSelectionGroup$1 = /*#__PURE__*/Object.freeze({
|
9294
|
+
__proto__: null,
|
9295
|
+
default: buttonSelectionGroup,
|
9296
|
+
vars: vars$6
|
9297
|
+
});
|
9284
9298
|
|
9285
|
-
|
9286
|
-
Object.defineProperty(node, 'data-name', {
|
9287
|
-
value: node.getAttribute('data-name'),
|
9288
|
-
configurable: true,
|
9289
|
-
writable: true,
|
9290
|
-
});
|
9291
|
-
Object.defineProperty(node, 'data-id', {
|
9292
|
-
value: node.getAttribute('data-id'),
|
9293
|
-
configurable: true,
|
9294
|
-
writable: true,
|
9295
|
-
});
|
9296
|
-
});
|
9299
|
+
const componentName$1 = getComponentName('modal');
|
9297
9300
|
|
9298
|
-
|
9301
|
+
const customMixin = (superclass) =>
|
9302
|
+
class ModalMixinClass extends superclass {
|
9303
|
+
get opened() {
|
9304
|
+
return this.getAttribute('opened') === 'true';
|
9305
|
+
}
|
9299
9306
|
|
9300
|
-
|
9301
|
-
|
9302
|
-
|
9303
|
-
|
9307
|
+
handleOpened() {
|
9308
|
+
forwardAttrs(this, this.baseElement, { includeAttrs: ['opened'] });
|
9309
|
+
if (this.opened) {
|
9310
|
+
this.style.display = '';
|
9304
9311
|
} else {
|
9305
|
-
this.
|
9306
|
-
this.setAttribute('has-no-options', '');
|
9312
|
+
this.style.display = 'none';
|
9307
9313
|
}
|
9314
|
+
}
|
9315
|
+
|
9316
|
+
init() {
|
9317
|
+
super.init?.();
|
9318
|
+
this.style.display = 'none';
|
9319
|
+
|
9320
|
+
// vaadin-dialog might not be loaded in time
|
9321
|
+
// in order to make sure it's loaded before this block is running
|
9322
|
+
// we are wrapping it with setTimeout
|
9323
|
+
setTimeout(() => {
|
9324
|
+
// we want to sync descope-modal content through vaadin-dialog into the overlay
|
9325
|
+
// so we are adding a slot to the overlay, which allows us to forward the content from
|
9326
|
+
// vaadin-dialog to vaadin-dialog-overlay
|
9327
|
+
this.baseElement.shadowRoot
|
9328
|
+
.querySelector('vaadin-dialog-overlay')
|
9329
|
+
.appendChild(document.createElement('slot'));
|
9308
9330
|
|
9309
|
-
|
9310
|
-
|
9311
|
-
|
9312
|
-
|
9313
|
-
//
|
9314
|
-
|
9315
|
-
|
9331
|
+
this.#overrideOverlaySettings();
|
9332
|
+
|
9333
|
+
// we need to always open the modal in `opened=false`
|
9334
|
+
// to prevent it from rendering outside the dialog
|
9335
|
+
// first, we have to run `overrideOverlaySettings` to setup
|
9336
|
+
// the component.
|
9337
|
+
this.handleOpened();
|
9338
|
+
});
|
9316
9339
|
}
|
9317
9340
|
|
9318
9341
|
// the default vaadin behavior is to attach the overlay to the body when opened
|
9319
9342
|
// we do not want that because it's difficult to style the overlay in this way
|
9320
9343
|
// so we override it to open inside the shadow DOM
|
9321
9344
|
#overrideOverlaySettings() {
|
9322
|
-
const overlay = this.baseElement.shadowRoot
|
9323
|
-
|
9324
|
-
.shadowRoot.querySelector('vaadin-multi-select-combo-box-overlay');
|
9345
|
+
const overlay = this.baseElement.shadowRoot.querySelector('vaadin-dialog-overlay');
|
9346
|
+
|
9325
9347
|
overlay._attachOverlay = () => {
|
9326
9348
|
overlay.bringToFront();
|
9349
|
+
this.baseElement.setAttribute('style', 'display:flex!important;');
|
9350
|
+
};
|
9351
|
+
overlay._detachOverlay = () => {
|
9352
|
+
this.baseElement.style.display = 'none';
|
9327
9353
|
};
|
9328
|
-
overlay._detachOverlay = () => {};
|
9329
9354
|
overlay._enterModalState = () => {};
|
9330
|
-
}
|
9331
9355
|
|
9332
|
-
|
9333
|
-
if (this.allowCustomValue) {
|
9334
|
-
this.baseElement.addEventListener('custom-value-set', (e) => {
|
9335
|
-
const newItemHtml = this.#renderItem({
|
9336
|
-
label: e.detail,
|
9337
|
-
displayName: e.detail,
|
9338
|
-
value: e.detail,
|
9339
|
-
});
|
9340
|
-
this.innerHTML += newItemHtml;
|
9341
|
-
// The value needs to be set with a timeout because it needs to execute after
|
9342
|
-
// the custom value is added to items by the children change observer
|
9343
|
-
setTimeout(() => {
|
9344
|
-
this.value = [...this.value, e.detail];
|
9345
|
-
}, 0);
|
9346
|
-
});
|
9347
|
-
}
|
9356
|
+
overlay.close = () => false;
|
9348
9357
|
}
|
9358
|
+
};
|
9349
9359
|
|
9350
|
-
|
9351
|
-
|
9352
|
-
|
9353
|
-
|
9354
|
-
|
9355
|
-
|
9356
|
-
|
9357
|
-
|
9358
|
-
|
9359
|
-
|
9360
|
-
|
9361
|
-
|
9362
|
-
|
9363
|
-
)
|
9364
|
-
|
9365
|
-
|
9366
|
-
|
9367
|
-
|
9368
|
-
|
9369
|
-
|
9370
|
-
|
9371
|
-
|
9372
|
-
|
9373
|
-
|
9374
|
-
|
9375
|
-
|
9360
|
+
const ModalClass = compose(
|
9361
|
+
createStyleMixin({
|
9362
|
+
mappings: {
|
9363
|
+
overlayBackgroundColor: { property: () => ModalClass.cssVarList.overlay.backgroundColor },
|
9364
|
+
overlayShadow: { property: () => ModalClass.cssVarList.overlay.shadow },
|
9365
|
+
overlayWidth: { property: () => ModalClass.cssVarList.overlay.width },
|
9366
|
+
},
|
9367
|
+
}),
|
9368
|
+
portalMixin({
|
9369
|
+
name: 'overlay',
|
9370
|
+
selector: '',
|
9371
|
+
mappings: {
|
9372
|
+
hostDisplay: {
|
9373
|
+
selector: () => ':host(.descope-modal)',
|
9374
|
+
property: 'display',
|
9375
|
+
important: true,
|
9376
|
+
},
|
9377
|
+
backgroundColor: [
|
9378
|
+
{ selector: () => '::part(content)', property: 'background-color' },
|
9379
|
+
{ selector: () => '::part(overlay)', property: 'background-color' },
|
9380
|
+
],
|
9381
|
+
width: { selector: () => '::part(overlay)', property: 'width' },
|
9382
|
+
shadow: { selector: () => '::part(overlay)', property: 'box-shadow' },
|
9383
|
+
},
|
9384
|
+
forward: {
|
9385
|
+
include: false,
|
9386
|
+
attributes: ['opened'],
|
9387
|
+
},
|
9388
|
+
}),
|
9389
|
+
draggableMixin,
|
9390
|
+
componentNameValidationMixin,
|
9391
|
+
customMixin
|
9392
|
+
)(
|
9393
|
+
createProxy({
|
9394
|
+
slots: [''],
|
9395
|
+
wrappedEleName: 'vaadin-dialog',
|
9396
|
+
style: () => ``,
|
9397
|
+
excludeAttrsSync: ['tabindex', 'opened'],
|
9398
|
+
componentName: componentName$1,
|
9399
|
+
})
|
9400
|
+
);
|
9376
9401
|
|
9377
|
-
|
9378
|
-
super.init?.();
|
9402
|
+
const globalRefs$4 = getThemeRefs(globals);
|
9379
9403
|
|
9380
|
-
|
9404
|
+
const compVars = ModalClass.cssVarList;
|
9381
9405
|
|
9382
|
-
|
9406
|
+
const modal = {
|
9407
|
+
[compVars.overlayBackgroundColor]: globalRefs$4.colors.surface.light,
|
9408
|
+
[compVars.overlayShadow]: 'none',
|
9409
|
+
[compVars.overlayWidth]: '700px',
|
9410
|
+
};
|
9383
9411
|
|
9384
|
-
|
9412
|
+
const vars$5 = {
|
9413
|
+
...compVars,
|
9414
|
+
};
|
9385
9415
|
|
9386
|
-
|
9416
|
+
var modal$1 = /*#__PURE__*/Object.freeze({
|
9417
|
+
__proto__: null,
|
9418
|
+
default: modal,
|
9419
|
+
vars: vars$5
|
9420
|
+
});
|
9387
9421
|
|
9388
|
-
|
9422
|
+
const globalRefs$3 = getThemeRefs(globals);
|
9423
|
+
const vars$4 = GridClass.cssVarList;
|
9389
9424
|
|
9390
|
-
|
9425
|
+
const grid = {
|
9426
|
+
[vars$4.hostWidth]: '100%',
|
9427
|
+
[vars$4.hostHeight]: '100%',
|
9428
|
+
[vars$4.hostMinHeight]: '400px',
|
9429
|
+
[vars$4.backgroundColor]: globalRefs$3.colors.surface.light,
|
9391
9430
|
|
9392
|
-
|
9431
|
+
[vars$4.fontSize]: refs.fontSize,
|
9432
|
+
[vars$4.fontFamily]: refs.fontFamily,
|
9393
9433
|
|
9394
|
-
|
9395
|
-
|
9396
|
-
|
9434
|
+
[vars$4.sortIndicatorsColor]: globalRefs$3.colors.surface.main,
|
9435
|
+
[vars$4.activeSortIndicator]: globalRefs$3.colors.surface.dark,
|
9436
|
+
[vars$4.resizeHandleColor]: globalRefs$3.colors.surface.main,
|
9397
9437
|
|
9398
|
-
|
9399
|
-
|
9438
|
+
[vars$4.inputBorderWidth]: refs.borderWidth,
|
9439
|
+
[vars$4.inputBorderStyle]: refs.borderStyle,
|
9440
|
+
[vars$4.inputBorderRadius]: refs.borderRadius,
|
9441
|
+
[vars$4.inputBorderColor]: 'transparent',
|
9400
9442
|
|
9401
|
-
|
9402
|
-
|
9403
|
-
}
|
9443
|
+
[vars$4.headerRowTextColor]: globalRefs$3.colors.surface.dark,
|
9444
|
+
[vars$4.separatorColor]: globalRefs$3.colors.surface.main,
|
9404
9445
|
|
9405
|
-
|
9406
|
-
|
9407
|
-
const children = this.baseElement.items?.filter((item) => vals.includes(item['data-id']));
|
9446
|
+
[vars$4.valueTextColor]: globalRefs$3.colors.surface.contrast,
|
9447
|
+
[vars$4.selectedBackgroundColor]: globalRefs$3.colors.primary.contrast,
|
9408
9448
|
|
9409
|
-
|
9410
|
-
|
9411
|
-
|
9412
|
-
|
9413
|
-
|
9414
|
-
|
9449
|
+
_bordered: {
|
9450
|
+
[vars$4.inputBorderColor]: refs.borderColor,
|
9451
|
+
},
|
9452
|
+
};
|
9453
|
+
|
9454
|
+
var grid$1 = /*#__PURE__*/Object.freeze({
|
9455
|
+
__proto__: null,
|
9456
|
+
default: grid,
|
9457
|
+
grid: grid,
|
9458
|
+
vars: vars$4
|
9459
|
+
});
|
9460
|
+
|
9461
|
+
const componentName = getComponentName('notification-card');
|
9462
|
+
|
9463
|
+
const notificationCardMixin = (superclass) =>
|
9464
|
+
class NotificationCardMixinClass extends superclass {
|
9465
|
+
close() {
|
9466
|
+
// if animation is not applied to the element, the node will not be removed
|
9467
|
+
// from the DOM. We should avoid that. So, if in any case we allow
|
9468
|
+
// customizing the animation - we should check if animation is applied
|
9469
|
+
// and if it's not applied - remove the element from the DOM and dispatch
|
9470
|
+
// `card-closed` event.
|
9471
|
+
this.baseElement.addEventListener('animationend', () => {
|
9472
|
+
this.remove();
|
9473
|
+
this.dispatchEvent(new Event('card-closed'));
|
9474
|
+
});
|
9475
|
+
|
9476
|
+
this.setAttribute('opened', 'false');
|
9415
9477
|
}
|
9416
9478
|
|
9417
|
-
|
9418
|
-
|
9479
|
+
constructor() {
|
9480
|
+
super();
|
9481
|
+
|
9482
|
+
this.baseElement.innerHTML = `
|
9483
|
+
<div part="root">
|
9484
|
+
<div part="content">
|
9485
|
+
<slot></slot>
|
9486
|
+
</div>
|
9487
|
+
<div part="close">
|
9488
|
+
<slot name="close"></slot>
|
9489
|
+
</div>
|
9490
|
+
</div>
|
9491
|
+
`;
|
9492
|
+
|
9493
|
+
this.closeEle = this.shadowRoot.querySelector('[part="close"]');
|
9419
9494
|
}
|
9420
|
-
};
|
9421
9495
|
|
9422
|
-
|
9423
|
-
|
9424
|
-
|
9425
|
-
|
9426
|
-
|
9427
|
-
|
9428
|
-
|
9429
|
-
|
9430
|
-
|
9431
|
-
|
9432
|
-
|
9433
|
-
|
9434
|
-
overflowChipFirstBorder,
|
9435
|
-
overflowChipSecondBorder,
|
9436
|
-
} = {
|
9437
|
-
host: { selector: () => ':host' },
|
9438
|
-
inputField: { selector: '::part(input-field)' },
|
9439
|
-
inputElement: { selector: 'input' },
|
9440
|
-
placeholder: { selector: '> input:placeholder-shown' },
|
9441
|
-
toggle: { selector: '::part(toggle-button)' },
|
9442
|
-
label: { selector: '::part(label)' },
|
9443
|
-
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
9444
|
-
helperText: { selector: '::part(helper-text)' },
|
9445
|
-
errorMessage: { selector: '::part(error-message)' },
|
9446
|
-
chip: { selector: 'vaadin-multi-select-combo-box-chip' },
|
9447
|
-
chipLabel: { selector: 'vaadin-multi-select-combo-box-chip::part(label)' },
|
9448
|
-
overflowChipFirstBorder: {
|
9449
|
-
selector: "vaadin-multi-select-combo-box-chip[slot='overflow']::before",
|
9450
|
-
},
|
9451
|
-
overflowChipSecondBorder: {
|
9452
|
-
selector: "vaadin-multi-select-combo-box-chip[slot='overflow']::after",
|
9453
|
-
},
|
9496
|
+
init() {
|
9497
|
+
super.init?.();
|
9498
|
+
|
9499
|
+
this.closeEle.onclick = () => {
|
9500
|
+
this.close();
|
9501
|
+
};
|
9502
|
+
}
|
9503
|
+
};
|
9504
|
+
|
9505
|
+
const selectors = {
|
9506
|
+
content: () => 'vaadin-notification-card::part(content)',
|
9507
|
+
overlay: () => 'vaadin-notification-card::part(overlay)',
|
9454
9508
|
};
|
9455
9509
|
|
9456
|
-
const
|
9510
|
+
const NotificationCardClass = compose(
|
9457
9511
|
createStyleMixin({
|
9458
9512
|
mappings: {
|
9459
|
-
|
9460
|
-
|
9461
|
-
|
9462
|
-
|
9463
|
-
|
9464
|
-
|
9465
|
-
|
9466
|
-
|
9467
|
-
|
9468
|
-
|
9469
|
-
|
9470
|
-
|
9471
|
-
inputBackgroundColor: { ...inputField, property: 'background-color' },
|
9472
|
-
inputBorderColor: { ...inputField, property: 'border-color' },
|
9473
|
-
inputBorderWidth: { ...inputField, property: 'border-width' },
|
9474
|
-
inputBorderStyle: { ...inputField, property: 'border-style' },
|
9475
|
-
inputBorderRadius: { ...inputField, property: 'border-radius' },
|
9476
|
-
labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
|
9477
|
-
inputValueTextColor: { ...inputField, property: 'color' },
|
9478
|
-
inputPlaceholderTextColor: { ...placeholder, property: 'color' },
|
9479
|
-
inputDropdownButtonCursor: { ...toggle, property: 'cursor' },
|
9480
|
-
inputDropdownButtonColor: { ...toggle, property: 'color' },
|
9481
|
-
inputDropdownButtonSize: { ...toggle, property: 'font-size' },
|
9482
|
-
inputDropdownButtonOffset: [
|
9483
|
-
{ ...toggle, property: 'margin-right' },
|
9484
|
-
{ ...toggle, property: 'margin-left' },
|
9485
|
-
],
|
9486
|
-
inputOutlineColor: { ...inputField, property: 'outline-color' },
|
9487
|
-
inputOutlineWidth: { ...inputField, property: 'outline-width' },
|
9488
|
-
inputOutlineStyle: { ...inputField, property: 'outline-style' },
|
9489
|
-
inputOutlineOffset: { ...inputField, property: 'outline-offset' },
|
9490
|
-
inputHorizontalPadding: [
|
9491
|
-
{ ...inputElement, property: 'padding-left' },
|
9492
|
-
{ ...inputElement, property: 'padding-right' },
|
9493
|
-
{ ...inputField, property: 'padding-inline-start' },
|
9513
|
+
hostMinWidth: { selector: selectors.content, property: 'min-width' },
|
9514
|
+
fontFamily: {},
|
9515
|
+
fontSize: {},
|
9516
|
+
backgroundColor: { selector: selectors.content },
|
9517
|
+
textColor: { property: 'color' },
|
9518
|
+
boxShadow: {},
|
9519
|
+
borderWidth: { selector: selectors.content, property: 'border-width' },
|
9520
|
+
borderColor: { selector: selectors.content, property: 'border-color' },
|
9521
|
+
borderStyle: { selector: selectors.content, property: 'border-style' },
|
9522
|
+
borderRadius: [
|
9523
|
+
{ selector: selectors.content, property: 'border-radius' },
|
9524
|
+
{ selector: selectors.overlay, property: 'border-radius' },
|
9494
9525
|
],
|
9495
|
-
|
9496
|
-
{
|
9497
|
-
{
|
9526
|
+
verticalPadding: [
|
9527
|
+
{ selector: selectors.content, property: 'padding-top' },
|
9528
|
+
{ selector: selectors.content, property: 'padding-bottom' },
|
9498
9529
|
],
|
9499
|
-
|
9500
|
-
|
9501
|
-
{
|
9502
|
-
{ ...overflowChipFirstBorder, property: 'border-color' },
|
9503
|
-
{ ...overflowChipSecondBorder, property: 'border-color' },
|
9530
|
+
horizontalPadding: [
|
9531
|
+
{ selector: selectors.content, property: 'padding-right' },
|
9532
|
+
{ selector: selectors.content, property: 'padding-left' },
|
9504
9533
|
],
|
9505
|
-
|
9506
|
-
// we need to use the variables from the portal mixin
|
9507
|
-
// so we need to use an arrow function on the selector
|
9508
|
-
// for that to work, because ComboBox is not available
|
9509
|
-
// at this time.
|
9510
|
-
overlayBackground: {
|
9511
|
-
property: () => MultiSelectComboBoxClass.cssVarList.overlay.backgroundColor,
|
9512
|
-
},
|
9513
|
-
overlayBorder: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.border },
|
9514
|
-
overlayFontSize: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontSize },
|
9515
|
-
overlayFontFamily: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontFamily },
|
9516
|
-
overlayCursor: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.cursor },
|
9517
|
-
overlayItemBoxShadow: {
|
9518
|
-
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemBoxShadow,
|
9519
|
-
},
|
9520
|
-
overlayItemPaddingInlineStart: {
|
9521
|
-
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemPaddingInlineStart,
|
9522
|
-
},
|
9523
|
-
overlayItemPaddingInlineEnd: {
|
9524
|
-
property: () => MultiSelectComboBoxClass.cssVarList.overlay.itemPaddingInlineEnd,
|
9525
|
-
},
|
9526
|
-
},
|
9527
|
-
}),
|
9528
|
-
draggableMixin,
|
9529
|
-
portalMixin({
|
9530
|
-
name: 'overlay',
|
9531
|
-
selector: 'vaadin-multi-select-combo-box-internal',
|
9532
|
-
mappings: {
|
9533
|
-
backgroundColor: { selector: 'vaadin-multi-select-combo-box-scroller' },
|
9534
|
-
minHeight: { selector: 'vaadin-multi-select-combo-box-overlay' },
|
9535
|
-
margin: { selector: 'vaadin-multi-select-combo-box-overlay' },
|
9536
|
-
cursor: { selector: 'vaadin-multi-select-combo-box-item' },
|
9537
|
-
fontFamily: { selector: 'vaadin-multi-select-combo-box-item' },
|
9538
|
-
fontSize: { selector: 'vaadin-multi-select-combo-box-item' },
|
9539
|
-
itemBoxShadow: { selector: 'vaadin-multi-select-combo-box-item', property: 'box-shadow' },
|
9540
|
-
itemPaddingInlineStart: {
|
9541
|
-
selector: 'vaadin-multi-select-combo-box-item',
|
9542
|
-
property: 'padding-inline-start',
|
9543
|
-
},
|
9544
|
-
itemPaddingInlineEnd: {
|
9545
|
-
selector: 'vaadin-multi-select-combo-box-item',
|
9546
|
-
property: 'padding-inline-end',
|
9547
|
-
},
|
9548
|
-
},
|
9549
|
-
forward: {
|
9550
|
-
include: false,
|
9551
|
-
attributes: ['size'],
|
9552
9534
|
},
|
9553
9535
|
}),
|
9554
|
-
|
9555
|
-
componentNameValidationMixin,
|
9556
|
-
MultiSelectComboBoxMixin
|
9536
|
+
notificationCardMixin
|
9557
9537
|
)(
|
9558
9538
|
createProxy({
|
9559
|
-
slots: [
|
9560
|
-
wrappedEleName: 'vaadin-
|
9539
|
+
slots: [],
|
9540
|
+
wrappedEleName: 'vaadin-notification-card',
|
9561
9541
|
style: () => `
|
9562
|
-
|
9563
|
-
|
9564
|
-
|
9565
|
-
|
9566
|
-
|
9567
|
-
|
9568
|
-
${resetInputReadonlyStyle('vaadin-multi-select-combo-box')}
|
9569
|
-
${resetInputPlaceholder('vaadin-multi-select-combo-box')}
|
9570
|
-
${resetInputCursor('vaadin-multi-select-combo-box')}
|
9571
|
-
|
9572
|
-
vaadin-multi-select-combo-box {
|
9573
|
-
padding: 0;
|
9574
|
-
width: 100%;
|
9575
|
-
}
|
9576
|
-
vaadin-multi-select-combo-box::before {
|
9577
|
-
height: initial;
|
9578
|
-
}
|
9579
|
-
vaadin-multi-select-combo-box [slot="input"] {
|
9580
|
-
-webkit-mask-image: none;
|
9581
|
-
min-height: 0;
|
9582
|
-
align-self: center;
|
9583
|
-
box-sizing: border-box;
|
9584
|
-
}
|
9585
|
-
|
9586
|
-
::part(input-field) {
|
9587
|
-
padding: 0;
|
9588
|
-
box-shadow: none;
|
9589
|
-
}
|
9590
|
-
${resetInputLabelPosition('vaadin-multi-select-combo-box')}
|
9591
|
-
:host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {
|
9592
|
-
display: block;
|
9542
|
+
vaadin-notification-card {
|
9543
|
+
box-shadow: none;
|
9544
|
+
}
|
9545
|
+
::part(overlay) {
|
9546
|
+
box-shadow: none;
|
9547
|
+
background: none;
|
9593
9548
|
}
|
9594
9549
|
|
9595
|
-
|
9596
|
-
|
9597
|
-
|
9598
|
-
right: -4px;
|
9599
|
-
border-left-width: 0;
|
9600
|
-
border-inline-start-style: solid;
|
9601
|
-
border-inline-start-width: 2px;
|
9550
|
+
[part="close"] {
|
9551
|
+
cursor: pointer;
|
9552
|
+
display: flex;
|
9602
9553
|
}
|
9603
|
-
|
9604
|
-
|
9605
|
-
|
9554
|
+
|
9555
|
+
[part="content"] {
|
9556
|
+
display: flex;
|
9557
|
+
align-items: center;
|
9558
|
+
flex-grow: 1;
|
9606
9559
|
}
|
9607
9560
|
|
9608
|
-
|
9609
|
-
display:
|
9561
|
+
[part="root"] {
|
9562
|
+
display: flex;
|
9563
|
+
align-items: center;
|
9564
|
+
justify-content: space-between;
|
9565
|
+
width: 100%;
|
9610
9566
|
}
|
9611
|
-
|
9612
|
-
|
9613
|
-
// with the same name. Including it will cause Vaadin to calculate NaN size,
|
9614
|
-
// and reset items to an empty array, and opening the list box with no items
|
9615
|
-
// to display.
|
9616
|
-
// Note: we exclude `placeholder` because the vaadin component observes it and
|
9617
|
-
// tries to override it, causing us to lose the user set placeholder.
|
9618
|
-
excludeAttrsSync: ['tabindex', 'size', 'data', 'placeholder'],
|
9567
|
+
`,
|
9568
|
+
excludeAttrsSync: ['tabindex'],
|
9619
9569
|
componentName,
|
9620
|
-
includeForwardProps: ['items', 'renderer', 'selectedItems'],
|
9621
9570
|
})
|
9622
9571
|
);
|
9623
9572
|
|
9573
|
+
const globalRefs$2 = getThemeRefs(globals);
|
9574
|
+
const vars$3 = NotificationCardClass.cssVarList;
|
9575
|
+
|
9576
|
+
const shadowColor = '#00000020';
|
9577
|
+
|
9578
|
+
const notification = {
|
9579
|
+
[vars$3.hostMinWidth]: '415px',
|
9580
|
+
[vars$3.fontFamily]: globalRefs$2.fonts.font1.family,
|
9581
|
+
[vars$3.fontSize]: globalRefs$2.typography.body1.size,
|
9582
|
+
[vars$3.backgroundColor]: globalRefs$2.colors.surface.main,
|
9583
|
+
[vars$3.textColor]: globalRefs$2.colors.surface.contrast,
|
9584
|
+
[vars$3.boxShadow]: `${globalRefs$2.shadow.wide.xl} ${shadowColor}, ${globalRefs$2.shadow.narrow.xl} ${shadowColor}`,
|
9585
|
+
[vars$3.verticalPadding]: '0.625em',
|
9586
|
+
[vars$3.horizontalPadding]: '1.5em',
|
9587
|
+
[vars$3.borderRadius]: globalRefs$2.radius.xs,
|
9588
|
+
|
9589
|
+
_bordered: {
|
9590
|
+
[vars$3.borderWidth]: globalRefs$2.border.sm,
|
9591
|
+
[vars$3.borderStyle]: 'solid',
|
9592
|
+
[vars$3.borderColor]: 'transparent',
|
9593
|
+
},
|
9594
|
+
|
9595
|
+
size: {
|
9596
|
+
xs: { [vars$3.fontSize]: '12px' },
|
9597
|
+
sm: { [vars$3.fontSize]: '14px' },
|
9598
|
+
md: { [vars$3.fontSize]: '16px' },
|
9599
|
+
lg: { [vars$3.fontSize]: '18px' },
|
9600
|
+
},
|
9601
|
+
|
9602
|
+
mode: {
|
9603
|
+
primary: {
|
9604
|
+
[vars$3.backgroundColor]: globalRefs$2.colors.primary.main,
|
9605
|
+
[vars$3.textColor]: globalRefs$2.colors.primary.contrast,
|
9606
|
+
[vars$3.borderColor]: globalRefs$2.colors.primary.light,
|
9607
|
+
},
|
9608
|
+
success: {
|
9609
|
+
[vars$3.backgroundColor]: globalRefs$2.colors.success.main,
|
9610
|
+
[vars$3.textColor]: globalRefs$2.colors.success.contrast,
|
9611
|
+
[vars$3.borderColor]: globalRefs$2.colors.success.light,
|
9612
|
+
},
|
9613
|
+
error: {
|
9614
|
+
[vars$3.backgroundColor]: globalRefs$2.colors.error.main,
|
9615
|
+
[vars$3.textColor]: globalRefs$2.colors.error.contrast,
|
9616
|
+
[vars$3.borderColor]: globalRefs$2.colors.error.light,
|
9617
|
+
},
|
9618
|
+
},
|
9619
|
+
};
|
9620
|
+
|
9621
|
+
var notificationCard = /*#__PURE__*/Object.freeze({
|
9622
|
+
__proto__: null,
|
9623
|
+
default: notification,
|
9624
|
+
vars: vars$3
|
9625
|
+
});
|
9626
|
+
|
9624
9627
|
const globalRefs$1 = getThemeRefs(globals);
|
9625
9628
|
const vars$2 = MultiSelectComboBoxClass.cssVarList;
|
9626
9629
|
|
@@ -9795,5 +9798,5 @@ const vars = Object.keys(components).reduce(
|
|
9795
9798
|
const defaultTheme = { globals, components: theme };
|
9796
9799
|
const themeVars = { globals: vars$w, components: vars };
|
9797
9800
|
|
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 };
|
9801
|
+
export { BadgeClass, ButtonClass, ButtonSelectionGroupClass, CheckboxClass, ContainerClass, DividerClass, EmailFieldClass, GridClass, ImageClass, LinkClass, LoaderLinearClass, LoaderRadialClass, LogoClass, MultiSelectComboBoxClass, NewPasswordClass, NumberFieldClass, PasscodeClass, PasswordClass, PhoneFieldClass, PhoneFieldInputBoxClass, RecaptchaClass, SwitchToggleClass, TextAreaClass, TextClass, TextFieldClass, TotpImageClass, UploadFileClass, componentsThemeManager, createComponentsTheme, defaultTheme, genColor, globalsThemeToStyle, themeToStyle, themeVars };
|
9799
9802
|
//# sourceMappingURL=index.esm.js.map
|