@descope/web-components-ui 2.1.17 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +494 -380
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14785 -14648
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1899.js +1 -1
- package/dist/umd/1899.js.map +1 -1
- package/dist/umd/4623.js +1 -1
- package/dist/umd/4623.js.map +1 -1
- package/dist/umd/4914.js +1 -1
- package/dist/umd/4914.js.map +1 -1
- package/dist/umd/5648.js +1 -1
- package/dist/umd/5648.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/9365.js +1 -1
- package/dist/umd/9365.js.map +1 -1
- package/dist/umd/9582.js +2 -0
- package/dist/umd/9582.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-apps-list.js +2 -2
- package/dist/umd/descope-apps-list.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-enriched-text.js +1 -1
- package/dist/umd/descope-enriched-text.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +28 -28
- package/src/components/boolean-fields/commonStyles.js +11 -1
- package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +32 -4
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +15 -2
- package/src/components/boolean-fields/descope-checkbox/index.js +1 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +5 -2
- package/src/components/boolean-fields/descope-switch-toggle/index.js +1 -0
- package/src/mixins/createStyleMixin/helpers.js +15 -2
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1446,16 +1446,25 @@ const globals = {
|
|
|
1446
1446
|
};
|
|
1447
1447
|
getThemeVars$1(globals);
|
|
1448
1448
|
|
|
1449
|
-
const
|
|
1449
|
+
const getOverrideCssVarName$1 = (origVarName) => `${origVarName}__override`;
|
|
1450
|
+
|
|
1451
|
+
const createCssVar$1 = (varName, fallback, createOverride = false) => {
|
|
1452
|
+
const ret = `var(${varName}${fallback ? `, ${fallback}` : ''})`;
|
|
1453
|
+
|
|
1454
|
+
if (!createOverride) return ret;
|
|
1455
|
+
|
|
1456
|
+
// we are generating an override css var to allow override with fallback to the default var
|
|
1457
|
+
const overrideVarName = getOverrideCssVarName$1(varName);
|
|
1458
|
+
return `var(${overrideVarName}, ${ret})`;
|
|
1459
|
+
};
|
|
1450
1460
|
|
|
1451
1461
|
const createCssSelector$1 = (baseSelector = '', relativeSelectorOrSelectorFn = '') =>
|
|
1452
1462
|
isFunction(relativeSelectorOrSelectorFn)
|
|
1453
1463
|
? relativeSelectorOrSelectorFn(baseSelector)
|
|
1454
|
-
: `${baseSelector}${
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
}`;
|
|
1464
|
+
: `${baseSelector}${/^[A-Za-z]/.test(relativeSelectorOrSelectorFn)
|
|
1465
|
+
? ` ${relativeSelectorOrSelectorFn}`
|
|
1466
|
+
: relativeSelectorOrSelectorFn
|
|
1467
|
+
}`;
|
|
1459
1468
|
|
|
1460
1469
|
let StyleBuilder$1 = class StyleBuilder {
|
|
1461
1470
|
constructor() {
|
|
@@ -1495,6 +1504,7 @@ const getFallbackVarName$1 = (origVarName, suffix = 'fallback') => kebabCaseJoin
|
|
|
1495
1504
|
|
|
1496
1505
|
const createStyle$1 = (componentName, baseSelector, mappings) => {
|
|
1497
1506
|
const style = new StyleBuilder$1();
|
|
1507
|
+
// we generate all the fallback vars recursively
|
|
1498
1508
|
const createFallbackVar = (fallback, origVarName) => {
|
|
1499
1509
|
if (!fallback) return '';
|
|
1500
1510
|
if (typeof fallback === 'string') return fallback;
|
|
@@ -1514,7 +1524,7 @@ const createStyle$1 = (componentName, baseSelector, mappings) => {
|
|
|
1514
1524
|
style.add(
|
|
1515
1525
|
createCssSelector$1(baseSelector, relativeSelectorOrSelectorFn),
|
|
1516
1526
|
isFunction(property) ? property() : property,
|
|
1517
|
-
createCssVar$1(cssVarName, fallbackValue) + (important ? '!important' : '')
|
|
1527
|
+
createCssVar$1(cssVarName, fallbackValue, true) + (important ? '!important' : '')
|
|
1518
1528
|
);
|
|
1519
1529
|
}
|
|
1520
1530
|
);
|
|
@@ -1541,6 +1551,8 @@ const createCssVarsList$1 = (componentName, mappings) =>
|
|
|
1541
1551
|
return Object.assign(
|
|
1542
1552
|
acc,
|
|
1543
1553
|
{ [attr]: varName },
|
|
1554
|
+
// we are exposing the override css var names, the convention is to add 'Override' suffix to the attribute name
|
|
1555
|
+
{ [attr + 'Override']: getOverrideCssVarName$1(varName) },
|
|
1544
1556
|
getFallbackVarsNames$1(attr, varName, mappings[attr])
|
|
1545
1557
|
);
|
|
1546
1558
|
}, {});
|
|
@@ -3451,7 +3463,17 @@ var button$1 = /*#__PURE__*/Object.freeze({
|
|
|
3451
3463
|
vars: vars$12
|
|
3452
3464
|
});
|
|
3453
3465
|
|
|
3454
|
-
const
|
|
3466
|
+
const getOverrideCssVarName = (origVarName) => `${origVarName}__override`;
|
|
3467
|
+
|
|
3468
|
+
const createCssVar = (varName, fallback, createOverride = false) => {
|
|
3469
|
+
const ret = `var(${varName}${fallback ? `, ${fallback}` : ''})`;
|
|
3470
|
+
|
|
3471
|
+
if (!createOverride) return ret;
|
|
3472
|
+
|
|
3473
|
+
// we are generating an override css var to allow override with fallback to the default var
|
|
3474
|
+
const overrideVarName = getOverrideCssVarName(varName);
|
|
3475
|
+
return `var(${overrideVarName}, ${ret})`;
|
|
3476
|
+
};
|
|
3455
3477
|
|
|
3456
3478
|
const createCssSelector = (baseSelector = '', relativeSelectorOrSelectorFn = '') =>
|
|
3457
3479
|
isFunction$1(relativeSelectorOrSelectorFn)
|
|
@@ -3500,6 +3522,7 @@ const getFallbackVarName = (origVarName, suffix = 'fallback') => kebabCaseJoin$1
|
|
|
3500
3522
|
|
|
3501
3523
|
const createStyle = (componentName, baseSelector, mappings) => {
|
|
3502
3524
|
const style = new StyleBuilder();
|
|
3525
|
+
// we generate all the fallback vars recursively
|
|
3503
3526
|
const createFallbackVar = (fallback, origVarName) => {
|
|
3504
3527
|
if (!fallback) return '';
|
|
3505
3528
|
if (typeof fallback === 'string') return fallback;
|
|
@@ -3519,7 +3542,7 @@ const createStyle = (componentName, baseSelector, mappings) => {
|
|
|
3519
3542
|
style.add(
|
|
3520
3543
|
createCssSelector(baseSelector, relativeSelectorOrSelectorFn),
|
|
3521
3544
|
isFunction$1(property) ? property() : property,
|
|
3522
|
-
createCssVar(cssVarName, fallbackValue) + (important ? '!important' : '')
|
|
3545
|
+
createCssVar(cssVarName, fallbackValue, true) + (important ? '!important' : '')
|
|
3523
3546
|
);
|
|
3524
3547
|
}
|
|
3525
3548
|
);
|
|
@@ -3546,6 +3569,8 @@ const createCssVarsList = (componentName, mappings) =>
|
|
|
3546
3569
|
return Object.assign(
|
|
3547
3570
|
acc,
|
|
3548
3571
|
{ [attr]: varName },
|
|
3572
|
+
// we are exposing the override css var names, the convention is to add 'Override' suffix to the attribute name
|
|
3573
|
+
{ [attr + 'Override']: getOverrideCssVarName(varName) },
|
|
3549
3574
|
getFallbackVarsNames(attr, varName, mappings[attr])
|
|
3550
3575
|
);
|
|
3551
3576
|
}, {});
|
|
@@ -6117,6 +6142,230 @@ var textArea$1 = /*#__PURE__*/Object.freeze({
|
|
|
6117
6142
|
vars: vars$Y
|
|
6118
6143
|
});
|
|
6119
6144
|
|
|
6145
|
+
const disableRules = [
|
|
6146
|
+
'blockquote',
|
|
6147
|
+
'list',
|
|
6148
|
+
'image',
|
|
6149
|
+
'table',
|
|
6150
|
+
'code',
|
|
6151
|
+
'hr',
|
|
6152
|
+
'backticks',
|
|
6153
|
+
'fence',
|
|
6154
|
+
'reference',
|
|
6155
|
+
'heading',
|
|
6156
|
+
'lheading',
|
|
6157
|
+
'html_block',
|
|
6158
|
+
];
|
|
6159
|
+
|
|
6160
|
+
const decodeHTML = (html) => {
|
|
6161
|
+
const textArea = document.createElement('textarea');
|
|
6162
|
+
textArea.innerHTML = html;
|
|
6163
|
+
return textArea.value;
|
|
6164
|
+
};
|
|
6165
|
+
|
|
6166
|
+
/* eslint-disable no-param-reassign */
|
|
6167
|
+
|
|
6168
|
+
|
|
6169
|
+
const componentName$16 = getComponentName('enriched-text');
|
|
6170
|
+
|
|
6171
|
+
class EnrichedText extends createBaseClass$1({ componentName: componentName$16, baseSelector: ':host > div' }) {
|
|
6172
|
+
#origLinkRenderer;
|
|
6173
|
+
|
|
6174
|
+
#origEmRenderer;
|
|
6175
|
+
|
|
6176
|
+
constructor() {
|
|
6177
|
+
super();
|
|
6178
|
+
|
|
6179
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
|
6180
|
+
<div class="content"></div>
|
|
6181
|
+
`;
|
|
6182
|
+
|
|
6183
|
+
injectStyle(
|
|
6184
|
+
`
|
|
6185
|
+
:host {
|
|
6186
|
+
line-height: 1em;
|
|
6187
|
+
word-break: break-word;
|
|
6188
|
+
}
|
|
6189
|
+
:host > slot {
|
|
6190
|
+
width: 100%;
|
|
6191
|
+
display: inline-block;
|
|
6192
|
+
}
|
|
6193
|
+
*, *:last-child {
|
|
6194
|
+
margin: 0;
|
|
6195
|
+
}
|
|
6196
|
+
h1,
|
|
6197
|
+
h2,
|
|
6198
|
+
h3,
|
|
6199
|
+
h4,
|
|
6200
|
+
h5,
|
|
6201
|
+
h6,
|
|
6202
|
+
p {
|
|
6203
|
+
margin-bottom: 1em;
|
|
6204
|
+
}
|
|
6205
|
+
a {
|
|
6206
|
+
cursor: pointer;
|
|
6207
|
+
}
|
|
6208
|
+
blockquote {
|
|
6209
|
+
padding: 0 2em;
|
|
6210
|
+
}
|
|
6211
|
+
u {
|
|
6212
|
+
text-decoration: underline
|
|
6213
|
+
}
|
|
6214
|
+
s {
|
|
6215
|
+
color: currentColor;
|
|
6216
|
+
}
|
|
6217
|
+
`,
|
|
6218
|
+
this
|
|
6219
|
+
);
|
|
6220
|
+
|
|
6221
|
+
this.#initProcessor();
|
|
6222
|
+
|
|
6223
|
+
observeChildren(this, this.#parseChildren.bind(this));
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6226
|
+
static get observedAttributes() {
|
|
6227
|
+
return ['readonly', 'link-target-blank'];
|
|
6228
|
+
}
|
|
6229
|
+
|
|
6230
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6231
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
|
6232
|
+
|
|
6233
|
+
if (newValue !== oldValue) {
|
|
6234
|
+
if (attrName === 'readonly') {
|
|
6235
|
+
this.onReadOnlyChange(newValue === 'true');
|
|
6236
|
+
}
|
|
6237
|
+
|
|
6238
|
+
if (attrName === 'link-target-blank') {
|
|
6239
|
+
this.#initProcessor();
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
// We're overriding the rule for em with single underscore to perform as underline. (_underline_)
|
|
6245
|
+
customUnderlineRenderer() {
|
|
6246
|
+
this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {
|
|
6247
|
+
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
6248
|
+
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
6249
|
+
};
|
|
6250
|
+
this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {
|
|
6251
|
+
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
6252
|
+
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
6253
|
+
};
|
|
6254
|
+
}
|
|
6255
|
+
|
|
6256
|
+
#customizeLinkRenderer() {
|
|
6257
|
+
if (this.linkTargetBlank) {
|
|
6258
|
+
this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
|
6259
|
+
// Add a new `target` attribute, or replace the value of the existing one.
|
|
6260
|
+
tokens[idx].attrSet('target', '_blank');
|
|
6261
|
+
// Pass the token to the default renderer.
|
|
6262
|
+
return this.#origLinkRenderer(tokens, idx, options, env, self);
|
|
6263
|
+
};
|
|
6264
|
+
} else {
|
|
6265
|
+
this.processor.renderer.rules.link_open = this.#origLinkRenderer;
|
|
6266
|
+
}
|
|
6267
|
+
}
|
|
6268
|
+
|
|
6269
|
+
#disableCustomRules() {
|
|
6270
|
+
if (!this.processor) {
|
|
6271
|
+
return;
|
|
6272
|
+
}
|
|
6273
|
+
this.processor.disable(disableRules);
|
|
6274
|
+
}
|
|
6275
|
+
|
|
6276
|
+
#updateProcessorRules() {
|
|
6277
|
+
this.#disableCustomRules();
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
#storeOrigRenderers() {
|
|
6281
|
+
const defaultLinkRenderer = (tokens, idx, options, _, self) =>
|
|
6282
|
+
self.renderToken(tokens, idx, options);
|
|
6283
|
+
this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;
|
|
6284
|
+
|
|
6285
|
+
const defaultStrongRenderer = (tokens, idx, options, _, self) =>
|
|
6286
|
+
self.renderToken(tokens, idx, options);
|
|
6287
|
+
this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;
|
|
6288
|
+
}
|
|
6289
|
+
|
|
6290
|
+
#initProcessor() {
|
|
6291
|
+
this.processor = new MarkdownIt('commonmark', { html: true });
|
|
6292
|
+
this.#storeOrigRenderers();
|
|
6293
|
+
this.#updateProcessorRules();
|
|
6294
|
+
this.#customizeLinkRenderer();
|
|
6295
|
+
this.customUnderlineRenderer();
|
|
6296
|
+
}
|
|
6297
|
+
|
|
6298
|
+
get linkTargetBlank() {
|
|
6299
|
+
return this.getAttribute('link-target-blank') === 'true';
|
|
6300
|
+
}
|
|
6301
|
+
|
|
6302
|
+
get contentNode() {
|
|
6303
|
+
return this.shadowRoot.querySelector('.content');
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6306
|
+
#parseChildren() {
|
|
6307
|
+
if (!this.processor) {
|
|
6308
|
+
return;
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6311
|
+
let html = decodeHTML(this.innerHTML);
|
|
6312
|
+
|
|
6313
|
+
if (!html?.trim() && this.isConnected) {
|
|
6314
|
+
this.setAttribute('empty', 'true');
|
|
6315
|
+
} else {
|
|
6316
|
+
this.removeAttribute('empty');
|
|
6317
|
+
}
|
|
6318
|
+
|
|
6319
|
+
try {
|
|
6320
|
+
const tokens = this.processor.parse(html, { references: undefined });
|
|
6321
|
+
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
|
6322
|
+
} catch (e) {
|
|
6323
|
+
// eslint-disable-next-line no-console
|
|
6324
|
+
console.warn('Not parsing invalid markdown token');
|
|
6325
|
+
}
|
|
6326
|
+
|
|
6327
|
+
this.contentNode.innerHTML = html;
|
|
6328
|
+
this.contentNode.firstChild?.setAttribute('part', 'content');
|
|
6329
|
+
}
|
|
6330
|
+
|
|
6331
|
+
onReadOnlyChange(isReadOnly) {
|
|
6332
|
+
if (isReadOnly) {
|
|
6333
|
+
this.contentNode.setAttribute('inert', isReadOnly);
|
|
6334
|
+
} else {
|
|
6335
|
+
this.contentNode.removeAttribute('inert');
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6340
|
+
const EnrichedTextClass = compose(
|
|
6341
|
+
createStyleMixin$1({
|
|
6342
|
+
mappings: {
|
|
6343
|
+
hostWidth: { selector: () => ':host', property: 'width' },
|
|
6344
|
+
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
|
6345
|
+
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
6346
|
+
fontSize: {},
|
|
6347
|
+
fontFamily: {},
|
|
6348
|
+
fontWeight: {},
|
|
6349
|
+
fontWeightBold: [
|
|
6350
|
+
{ selector: () => ':host strong', property: 'font-weight' },
|
|
6351
|
+
{ selector: () => ':host b', property: 'font-weight' },
|
|
6352
|
+
],
|
|
6353
|
+
textColor: { property: 'color' },
|
|
6354
|
+
textLineHeight: { property: 'line-height' },
|
|
6355
|
+
textAlign: {},
|
|
6356
|
+
linkColor: { selector: 'a', property: 'color' },
|
|
6357
|
+
linkTextDecoration: { selector: 'a', property: 'text-decoration' },
|
|
6358
|
+
linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },
|
|
6359
|
+
minHeight: {},
|
|
6360
|
+
minWidth: {},
|
|
6361
|
+
},
|
|
6362
|
+
}),
|
|
6363
|
+
createStyleMixin$1({ componentNameOverride: getComponentName('link') }),
|
|
6364
|
+
createStyleMixin$1({ componentNameOverride: getComponentName('text') }),
|
|
6365
|
+
draggableMixin$1,
|
|
6366
|
+
componentNameValidationMixin$1
|
|
6367
|
+
)(EnrichedText);
|
|
6368
|
+
|
|
6120
6369
|
const createBaseInputClass = (...args) =>
|
|
6121
6370
|
compose$1(
|
|
6122
6371
|
inputValidationMixin,
|
|
@@ -6125,9 +6374,9 @@ const createBaseInputClass = (...args) =>
|
|
|
6125
6374
|
inputEventsDispatchingMixin
|
|
6126
6375
|
)(createBaseClass(...args));
|
|
6127
6376
|
|
|
6128
|
-
const componentName$
|
|
6377
|
+
const componentName$15 = getComponentName$1('boolean-field-internal');
|
|
6129
6378
|
|
|
6130
|
-
createBaseInputClass({ componentName: componentName$
|
|
6379
|
+
createBaseInputClass({ componentName: componentName$15, baseSelector: 'div' });
|
|
6131
6380
|
|
|
6132
6381
|
const booleanFieldMixin = (superclass) =>
|
|
6133
6382
|
class BooleanFieldMixinClass extends superclass {
|
|
@@ -6136,14 +6385,14 @@ const booleanFieldMixin = (superclass) =>
|
|
|
6136
6385
|
|
|
6137
6386
|
const template = document.createElement('template');
|
|
6138
6387
|
template.innerHTML = `
|
|
6139
|
-
<${componentName$
|
|
6388
|
+
<${componentName$15}
|
|
6140
6389
|
tabindex="-1"
|
|
6141
6390
|
slot="input"
|
|
6142
|
-
></${componentName$
|
|
6391
|
+
></${componentName$15}>
|
|
6143
6392
|
`;
|
|
6144
6393
|
|
|
6145
6394
|
this.baseElement.appendChild(template.content.cloneNode(true));
|
|
6146
|
-
this.inputElement = this.shadowRoot.querySelector(componentName$
|
|
6395
|
+
this.inputElement = this.shadowRoot.querySelector(componentName$15);
|
|
6147
6396
|
this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
|
|
6148
6397
|
|
|
6149
6398
|
forwardAttrs$1(this, this.inputElement, {
|
|
@@ -6163,7 +6412,7 @@ const booleanFieldMixin = (superclass) =>
|
|
|
6163
6412
|
}
|
|
6164
6413
|
};
|
|
6165
6414
|
|
|
6166
|
-
var commonStyles = `
|
|
6415
|
+
var commonStyles = (cssVarList) => `
|
|
6167
6416
|
:host {
|
|
6168
6417
|
display: inline-flex;
|
|
6169
6418
|
}
|
|
@@ -6210,9 +6459,18 @@ descope-boolean-field-internal {
|
|
|
6210
6459
|
-webkit-mask-image: none;
|
|
6211
6460
|
min-height: initial;
|
|
6212
6461
|
}
|
|
6462
|
+
|
|
6463
|
+
descope-enriched-text[empty] {
|
|
6464
|
+
${EnrichedTextClass.cssVarList.hostDisplay}: none;
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
descope-enriched-text {
|
|
6468
|
+
${EnrichedTextClass.cssVarList.hostDirection}: var(${cssVarList.hostDirection});
|
|
6469
|
+
}
|
|
6470
|
+
|
|
6213
6471
|
`;
|
|
6214
6472
|
|
|
6215
|
-
const componentName$
|
|
6473
|
+
const componentName$14 = getComponentName$1('checkbox');
|
|
6216
6474
|
|
|
6217
6475
|
const {
|
|
6218
6476
|
host: host$s,
|
|
@@ -6225,7 +6483,9 @@ const {
|
|
|
6225
6483
|
errorMessage: errorMessage$a,
|
|
6226
6484
|
} = {
|
|
6227
6485
|
host: { selector: () => ':host' },
|
|
6228
|
-
requiredIndicator: {
|
|
6486
|
+
requiredIndicator: {
|
|
6487
|
+
selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after',
|
|
6488
|
+
},
|
|
6229
6489
|
component: { selector: 'vaadin-checkbox' },
|
|
6230
6490
|
checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
|
|
6231
6491
|
checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
|
|
@@ -6271,6 +6531,16 @@ const CheckboxClass = compose$1(
|
|
|
6271
6531
|
inputOutlineColor: { ...checkboxElement, property: 'outline-color' },
|
|
6272
6532
|
inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },
|
|
6273
6533
|
|
|
6534
|
+
inputContainerPadding: { ...component$1, property: 'padding' },
|
|
6535
|
+
inputContainerBorderRadius: { ...component$1, property: 'border-radius' },
|
|
6536
|
+
inputContainerBorderWidth: { ...component$1, property: 'border-width' },
|
|
6537
|
+
inputContainerBorderColor: { ...component$1, property: 'border-color' },
|
|
6538
|
+
inputContainerBorderStyle: { ...component$1, property: 'border-style' },
|
|
6539
|
+
inputContainerOutlineWidth: { ...component$1, property: 'outline-width' },
|
|
6540
|
+
inputContainerOutlineOffset: { ...component$1, property: 'outline-offset' },
|
|
6541
|
+
inputContainerOutlineColor: { ...component$1, property: 'outline-color' },
|
|
6542
|
+
inputContainerOutlineStyle: { ...component$1, property: 'outline-style' },
|
|
6543
|
+
|
|
6274
6544
|
inputSize: [
|
|
6275
6545
|
{ ...checkboxElement, property: 'width' },
|
|
6276
6546
|
{ ...checkboxElement, property: 'height' },
|
|
@@ -6288,7 +6558,7 @@ const CheckboxClass = compose$1(
|
|
|
6288
6558
|
slots: [],
|
|
6289
6559
|
wrappedEleName: 'vaadin-text-field',
|
|
6290
6560
|
style: () => `
|
|
6291
|
-
${commonStyles}
|
|
6561
|
+
${commonStyles(CheckboxClass.cssVarList)}
|
|
6292
6562
|
${useHostExternalPadding(CheckboxClass.cssVarList)}
|
|
6293
6563
|
|
|
6294
6564
|
:host {
|
|
@@ -6330,7 +6600,7 @@ const CheckboxClass = compose$1(
|
|
|
6330
6600
|
}
|
|
6331
6601
|
`,
|
|
6332
6602
|
excludeAttrsSync: ['label', 'tabindex', 'style'],
|
|
6333
|
-
componentName: componentName$
|
|
6603
|
+
componentName: componentName$14,
|
|
6334
6604
|
})
|
|
6335
6605
|
);
|
|
6336
6606
|
|
|
@@ -6375,7 +6645,7 @@ var checkbox$1 = /*#__PURE__*/Object.freeze({
|
|
|
6375
6645
|
vars: vars$X
|
|
6376
6646
|
});
|
|
6377
6647
|
|
|
6378
|
-
const componentName$
|
|
6648
|
+
const componentName$13 = getComponentName$1('switch-toggle');
|
|
6379
6649
|
|
|
6380
6650
|
const {
|
|
6381
6651
|
host: host$r,
|
|
@@ -6388,7 +6658,9 @@ const {
|
|
|
6388
6658
|
errorMessage: errorMessage$9,
|
|
6389
6659
|
} = {
|
|
6390
6660
|
host: { selector: () => ':host' },
|
|
6391
|
-
requiredIndicator: {
|
|
6661
|
+
requiredIndicator: {
|
|
6662
|
+
selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after',
|
|
6663
|
+
},
|
|
6392
6664
|
component: { selector: 'vaadin-checkbox' },
|
|
6393
6665
|
checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
|
|
6394
6666
|
checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
|
|
@@ -6461,7 +6733,7 @@ const SwitchToggleClass = compose$1(
|
|
|
6461
6733
|
slots: [],
|
|
6462
6734
|
wrappedEleName: 'vaadin-text-field',
|
|
6463
6735
|
style: () => `
|
|
6464
|
-
${commonStyles}
|
|
6736
|
+
${commonStyles(SwitchToggleClass.cssVarList)}
|
|
6465
6737
|
${useHostExternalPadding(SwitchToggleClass.cssVarList)}
|
|
6466
6738
|
|
|
6467
6739
|
:host {
|
|
@@ -6517,7 +6789,7 @@ const SwitchToggleClass = compose$1(
|
|
|
6517
6789
|
}
|
|
6518
6790
|
`,
|
|
6519
6791
|
excludeAttrsSync: ['label', 'tabindex', 'style'],
|
|
6520
|
-
componentName: componentName$
|
|
6792
|
+
componentName: componentName$13,
|
|
6521
6793
|
})
|
|
6522
6794
|
);
|
|
6523
6795
|
|
|
@@ -6598,9 +6870,9 @@ var switchToggle$1 = /*#__PURE__*/Object.freeze({
|
|
|
6598
6870
|
vars: vars$W
|
|
6599
6871
|
});
|
|
6600
6872
|
|
|
6601
|
-
const componentName$
|
|
6873
|
+
const componentName$12 = getComponentName$1('container');
|
|
6602
6874
|
|
|
6603
|
-
class RawContainer extends createBaseClass({ componentName: componentName$
|
|
6875
|
+
class RawContainer extends createBaseClass({ componentName: componentName$12, baseSelector: 'slot' }) {
|
|
6604
6876
|
constructor() {
|
|
6605
6877
|
super();
|
|
6606
6878
|
|
|
@@ -6685,7 +6957,7 @@ const [helperTheme$4, helperRefs$4, helperVars$4] = createHelperVars(
|
|
|
6685
6957
|
horizontalAlignment,
|
|
6686
6958
|
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
|
6687
6959
|
},
|
|
6688
|
-
componentName$
|
|
6960
|
+
componentName$12
|
|
6689
6961
|
);
|
|
6690
6962
|
|
|
6691
6963
|
const { shadowColor: shadowColor$4 } = helperRefs$4;
|
|
@@ -6850,10 +7122,10 @@ const createCssVarImageClass = ({ componentName, varName, fallbackVarName }) =>
|
|
|
6850
7122
|
return CssVarImageClass;
|
|
6851
7123
|
};
|
|
6852
7124
|
|
|
6853
|
-
const componentName$
|
|
7125
|
+
const componentName$11 = getComponentName$1('logo');
|
|
6854
7126
|
|
|
6855
7127
|
const LogoClass = createCssVarImageClass({
|
|
6856
|
-
componentName: componentName$
|
|
7128
|
+
componentName: componentName$11,
|
|
6857
7129
|
varName: 'url',
|
|
6858
7130
|
fallbackVarName: 'fallbackUrl',
|
|
6859
7131
|
});
|
|
@@ -6870,10 +7142,10 @@ var logo$3 = /*#__PURE__*/Object.freeze({
|
|
|
6870
7142
|
vars: vars$U
|
|
6871
7143
|
});
|
|
6872
7144
|
|
|
6873
|
-
const componentName$
|
|
7145
|
+
const componentName$10 = getComponentName$1('totp-image');
|
|
6874
7146
|
|
|
6875
7147
|
const TotpImageClass = createCssVarImageClass({
|
|
6876
|
-
componentName: componentName$
|
|
7148
|
+
componentName: componentName$10,
|
|
6877
7149
|
varName: 'url',
|
|
6878
7150
|
fallbackVarName: 'fallbackUrl',
|
|
6879
7151
|
});
|
|
@@ -6890,10 +7162,10 @@ var totpImage = /*#__PURE__*/Object.freeze({
|
|
|
6890
7162
|
vars: vars$T
|
|
6891
7163
|
});
|
|
6892
7164
|
|
|
6893
|
-
const componentName
|
|
7165
|
+
const componentName$$ = getComponentName$1('notp-image');
|
|
6894
7166
|
|
|
6895
7167
|
const NotpImageClass = createCssVarImageClass({
|
|
6896
|
-
componentName: componentName
|
|
7168
|
+
componentName: componentName$$,
|
|
6897
7169
|
varName: 'url',
|
|
6898
7170
|
fallbackVarName: 'fallbackUrl',
|
|
6899
7171
|
});
|
|
@@ -6910,10 +7182,10 @@ var notpImage = /*#__PURE__*/Object.freeze({
|
|
|
6910
7182
|
vars: vars$S
|
|
6911
7183
|
});
|
|
6912
7184
|
|
|
6913
|
-
const componentName
|
|
7185
|
+
const componentName$_ = getComponentName('text');
|
|
6914
7186
|
|
|
6915
7187
|
class RawText extends createBaseClass$1({
|
|
6916
|
-
componentName: componentName
|
|
7188
|
+
componentName: componentName$_,
|
|
6917
7189
|
baseSelector: ':host > slot',
|
|
6918
7190
|
}) {
|
|
6919
7191
|
constructor() {
|
|
@@ -6985,7 +7257,7 @@ const vars$R = TextClass.cssVarList;
|
|
|
6985
7257
|
const text$3 = {
|
|
6986
7258
|
[vars$R.hostDirection]: globalRefs$A.direction,
|
|
6987
7259
|
[vars$R.textLineHeight]: '1.35em',
|
|
6988
|
-
[vars$R.textAlign]: '
|
|
7260
|
+
[vars$R.textAlign]: 'start',
|
|
6989
7261
|
[vars$R.textColor]: globalRefs$A.colors.surface.dark,
|
|
6990
7262
|
|
|
6991
7263
|
variant: {
|
|
@@ -7082,229 +7354,6 @@ var text$4 = /*#__PURE__*/Object.freeze({
|
|
|
7082
7354
|
vars: vars$R
|
|
7083
7355
|
});
|
|
7084
7356
|
|
|
7085
|
-
const disableRules = [
|
|
7086
|
-
'blockquote',
|
|
7087
|
-
'list',
|
|
7088
|
-
'image',
|
|
7089
|
-
'table',
|
|
7090
|
-
'code',
|
|
7091
|
-
'hr',
|
|
7092
|
-
'backticks',
|
|
7093
|
-
'fence',
|
|
7094
|
-
'reference',
|
|
7095
|
-
'heading',
|
|
7096
|
-
'lheading',
|
|
7097
|
-
'html_block',
|
|
7098
|
-
];
|
|
7099
|
-
|
|
7100
|
-
const decodeHTML = (html) => {
|
|
7101
|
-
const textArea = document.createElement('textarea');
|
|
7102
|
-
textArea.innerHTML = html;
|
|
7103
|
-
return textArea.value;
|
|
7104
|
-
};
|
|
7105
|
-
|
|
7106
|
-
/* eslint-disable no-param-reassign */
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
const componentName$_ = getComponentName('enriched-text');
|
|
7110
|
-
|
|
7111
|
-
class EnrichedText extends createBaseClass$1({ componentName: componentName$_, baseSelector: ':host > div' }) {
|
|
7112
|
-
#origLinkRenderer;
|
|
7113
|
-
|
|
7114
|
-
#origEmRenderer;
|
|
7115
|
-
|
|
7116
|
-
constructor() {
|
|
7117
|
-
super();
|
|
7118
|
-
|
|
7119
|
-
this.attachShadow({ mode: 'open' }).innerHTML = `
|
|
7120
|
-
<div class="content"></div>
|
|
7121
|
-
`;
|
|
7122
|
-
|
|
7123
|
-
injectStyle(
|
|
7124
|
-
`
|
|
7125
|
-
:host {
|
|
7126
|
-
line-height: 1em;
|
|
7127
|
-
word-break: break-word;
|
|
7128
|
-
}
|
|
7129
|
-
:host > slot {
|
|
7130
|
-
width: 100%;
|
|
7131
|
-
display: inline-block;
|
|
7132
|
-
}
|
|
7133
|
-
*, *:last-child {
|
|
7134
|
-
margin: 0;
|
|
7135
|
-
}
|
|
7136
|
-
h1,
|
|
7137
|
-
h2,
|
|
7138
|
-
h3,
|
|
7139
|
-
h4,
|
|
7140
|
-
h5,
|
|
7141
|
-
h6,
|
|
7142
|
-
p {
|
|
7143
|
-
margin-bottom: 1em;
|
|
7144
|
-
}
|
|
7145
|
-
a {
|
|
7146
|
-
cursor: pointer;
|
|
7147
|
-
}
|
|
7148
|
-
blockquote {
|
|
7149
|
-
padding: 0 2em;
|
|
7150
|
-
}
|
|
7151
|
-
u {
|
|
7152
|
-
text-decoration: underline
|
|
7153
|
-
}
|
|
7154
|
-
s {
|
|
7155
|
-
color: currentColor;
|
|
7156
|
-
}
|
|
7157
|
-
`,
|
|
7158
|
-
this
|
|
7159
|
-
);
|
|
7160
|
-
|
|
7161
|
-
this.#initProcessor();
|
|
7162
|
-
|
|
7163
|
-
observeChildren(this, this.#parseChildren.bind(this));
|
|
7164
|
-
}
|
|
7165
|
-
|
|
7166
|
-
static get observedAttributes() {
|
|
7167
|
-
return ['readonly', 'link-target-blank'];
|
|
7168
|
-
}
|
|
7169
|
-
|
|
7170
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7171
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
|
7172
|
-
|
|
7173
|
-
if (newValue !== oldValue) {
|
|
7174
|
-
if (attrName === 'readonly') {
|
|
7175
|
-
this.onReadOnlyChange(newValue === 'true');
|
|
7176
|
-
}
|
|
7177
|
-
|
|
7178
|
-
if (attrName === 'link-target-blank') {
|
|
7179
|
-
this.#initProcessor();
|
|
7180
|
-
}
|
|
7181
|
-
}
|
|
7182
|
-
}
|
|
7183
|
-
|
|
7184
|
-
// We're overriding the rule for em with single underscore to perform as underline. (_underline_)
|
|
7185
|
-
customUnderlineRenderer() {
|
|
7186
|
-
this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {
|
|
7187
|
-
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
7188
|
-
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
7189
|
-
};
|
|
7190
|
-
this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {
|
|
7191
|
-
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
7192
|
-
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
7193
|
-
};
|
|
7194
|
-
}
|
|
7195
|
-
|
|
7196
|
-
#customizeLinkRenderer() {
|
|
7197
|
-
if (this.linkTargetBlank) {
|
|
7198
|
-
this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
|
7199
|
-
// Add a new `target` attribute, or replace the value of the existing one.
|
|
7200
|
-
tokens[idx].attrSet('target', '_blank');
|
|
7201
|
-
// Pass the token to the default renderer.
|
|
7202
|
-
return this.#origLinkRenderer(tokens, idx, options, env, self);
|
|
7203
|
-
};
|
|
7204
|
-
} else {
|
|
7205
|
-
this.processor.renderer.rules.link_open = this.#origLinkRenderer;
|
|
7206
|
-
}
|
|
7207
|
-
}
|
|
7208
|
-
|
|
7209
|
-
#disableCustomRules() {
|
|
7210
|
-
if (!this.processor) {
|
|
7211
|
-
return;
|
|
7212
|
-
}
|
|
7213
|
-
this.processor.disable(disableRules);
|
|
7214
|
-
}
|
|
7215
|
-
|
|
7216
|
-
#updateProcessorRules() {
|
|
7217
|
-
this.#disableCustomRules();
|
|
7218
|
-
}
|
|
7219
|
-
|
|
7220
|
-
#storeOrigRenderers() {
|
|
7221
|
-
const defaultLinkRenderer = (tokens, idx, options, _, self) =>
|
|
7222
|
-
self.renderToken(tokens, idx, options);
|
|
7223
|
-
this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;
|
|
7224
|
-
|
|
7225
|
-
const defaultStrongRenderer = (tokens, idx, options, _, self) =>
|
|
7226
|
-
self.renderToken(tokens, idx, options);
|
|
7227
|
-
this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;
|
|
7228
|
-
}
|
|
7229
|
-
|
|
7230
|
-
#initProcessor() {
|
|
7231
|
-
this.processor = new MarkdownIt('commonmark', { html: true });
|
|
7232
|
-
this.#storeOrigRenderers();
|
|
7233
|
-
this.#updateProcessorRules();
|
|
7234
|
-
this.#customizeLinkRenderer();
|
|
7235
|
-
this.customUnderlineRenderer();
|
|
7236
|
-
}
|
|
7237
|
-
|
|
7238
|
-
get linkTargetBlank() {
|
|
7239
|
-
return this.getAttribute('link-target-blank') === 'true';
|
|
7240
|
-
}
|
|
7241
|
-
|
|
7242
|
-
get contentNode() {
|
|
7243
|
-
return this.shadowRoot.querySelector('.content');
|
|
7244
|
-
}
|
|
7245
|
-
|
|
7246
|
-
#parseChildren() {
|
|
7247
|
-
if (!this.processor) {
|
|
7248
|
-
return;
|
|
7249
|
-
}
|
|
7250
|
-
|
|
7251
|
-
let html = decodeHTML(this.innerHTML);
|
|
7252
|
-
|
|
7253
|
-
if (!html?.trim() && this.isConnected) {
|
|
7254
|
-
this.setAttribute('empty', 'true');
|
|
7255
|
-
} else {
|
|
7256
|
-
this.removeAttribute('empty');
|
|
7257
|
-
}
|
|
7258
|
-
|
|
7259
|
-
try {
|
|
7260
|
-
const tokens = this.processor.parse(html, { references: undefined });
|
|
7261
|
-
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
|
7262
|
-
} catch (e) {
|
|
7263
|
-
// eslint-disable-next-line no-console
|
|
7264
|
-
console.warn('Not parsing invalid markdown token');
|
|
7265
|
-
}
|
|
7266
|
-
|
|
7267
|
-
this.contentNode.innerHTML = html;
|
|
7268
|
-
}
|
|
7269
|
-
|
|
7270
|
-
onReadOnlyChange(isReadOnly) {
|
|
7271
|
-
if (isReadOnly) {
|
|
7272
|
-
this.contentNode.setAttribute('inert', isReadOnly);
|
|
7273
|
-
} else {
|
|
7274
|
-
this.contentNode.removeAttribute('inert');
|
|
7275
|
-
}
|
|
7276
|
-
}
|
|
7277
|
-
}
|
|
7278
|
-
|
|
7279
|
-
const EnrichedTextClass = compose(
|
|
7280
|
-
createStyleMixin$1({
|
|
7281
|
-
mappings: {
|
|
7282
|
-
hostWidth: { selector: () => ':host', property: 'width' },
|
|
7283
|
-
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
|
7284
|
-
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
7285
|
-
fontSize: {},
|
|
7286
|
-
fontFamily: {},
|
|
7287
|
-
fontWeight: {},
|
|
7288
|
-
fontWeightBold: [
|
|
7289
|
-
{ selector: () => ':host strong', property: 'font-weight' },
|
|
7290
|
-
{ selector: () => ':host b', property: 'font-weight' },
|
|
7291
|
-
],
|
|
7292
|
-
textColor: { property: 'color' },
|
|
7293
|
-
textLineHeight: { property: 'line-height' },
|
|
7294
|
-
textAlign: {},
|
|
7295
|
-
linkColor: { selector: 'a', property: 'color' },
|
|
7296
|
-
linkTextDecoration: { selector: 'a', property: 'text-decoration' },
|
|
7297
|
-
linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },
|
|
7298
|
-
minHeight: {},
|
|
7299
|
-
minWidth: {},
|
|
7300
|
-
},
|
|
7301
|
-
}),
|
|
7302
|
-
createStyleMixin$1({ componentNameOverride: getComponentName('link') }),
|
|
7303
|
-
createStyleMixin$1({ componentNameOverride: getComponentName('text') }),
|
|
7304
|
-
draggableMixin$1,
|
|
7305
|
-
componentNameValidationMixin$1
|
|
7306
|
-
)(EnrichedText);
|
|
7307
|
-
|
|
7308
7357
|
const componentName$Z = getComponentName('link');
|
|
7309
7358
|
|
|
7310
7359
|
class RawLink extends createBaseClass$1({ componentName: componentName$Z, baseSelector: ':host a' }) {
|
|
@@ -18116,125 +18165,9 @@ var dateField$1 = /*#__PURE__*/Object.freeze({
|
|
|
18116
18165
|
vars: vars$l
|
|
18117
18166
|
});
|
|
18118
18167
|
|
|
18119
|
-
const componentName$n = getComponentName('
|
|
18120
|
-
|
|
18121
|
-
const itemRenderer$4 = ({ name, icon, url }, _, ref) => `
|
|
18122
|
-
<a ${url ? `href="${url}" title="${url}"` : ''} target="_blank">
|
|
18123
|
-
<descope-list-item>
|
|
18124
|
-
<descope-avatar
|
|
18125
|
-
${icon ? `img="${icon}"` : ''}
|
|
18126
|
-
${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
|
|
18127
|
-
size=${ref.size}
|
|
18128
|
-
></descope-avatar>
|
|
18129
|
-
<descope-text
|
|
18130
|
-
variant="body1"
|
|
18131
|
-
mode="primary"
|
|
18132
|
-
>${name}</descope-text>
|
|
18133
|
-
</descope-list-item>
|
|
18134
|
-
</a>
|
|
18135
|
-
`;
|
|
18168
|
+
const componentName$n = getComponentName('list-item');
|
|
18136
18169
|
|
|
18137
18170
|
const customMixin$3 = (superclass) =>
|
|
18138
|
-
class AppsListMixinClass extends superclass {
|
|
18139
|
-
get size() {
|
|
18140
|
-
return this.getAttribute('size') || 'sm';
|
|
18141
|
-
}
|
|
18142
|
-
};
|
|
18143
|
-
|
|
18144
|
-
const AppsListClass = compose(
|
|
18145
|
-
createStyleMixin$1({
|
|
18146
|
-
mappings: {
|
|
18147
|
-
maxHeight: { selector: () => ':host' },
|
|
18148
|
-
minHeight: { selector: () => ':host' },
|
|
18149
|
-
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
18150
|
-
itemsFontWeight: {
|
|
18151
|
-
selector: TextClass.componentName,
|
|
18152
|
-
property: TextClass.cssVarList.fontWeight,
|
|
18153
|
-
},
|
|
18154
|
-
itemsFontSize: {
|
|
18155
|
-
selector: TextClass.componentName,
|
|
18156
|
-
property: TextClass.cssVarList.fontSize,
|
|
18157
|
-
},
|
|
18158
|
-
itemsTextAlign: {
|
|
18159
|
-
selector: TextClass.componentName,
|
|
18160
|
-
property: TextClass.cssVarList.textAlign,
|
|
18161
|
-
},
|
|
18162
|
-
},
|
|
18163
|
-
}),
|
|
18164
|
-
createDynamicDataMixin$1({ itemRenderer: itemRenderer$4, rerenderAttrsList: ['size'] }),
|
|
18165
|
-
draggableMixin$1,
|
|
18166
|
-
componentNameValidationMixin$1,
|
|
18167
|
-
customMixin$3
|
|
18168
|
-
)(
|
|
18169
|
-
createProxy$1({
|
|
18170
|
-
slots: ['empty-state'],
|
|
18171
|
-
wrappedEleName: 'descope-list',
|
|
18172
|
-
excludeAttrsSync: ['tabindex', 'class', 'empty', 'style'],
|
|
18173
|
-
componentName: componentName$n,
|
|
18174
|
-
style: () => `
|
|
18175
|
-
:host {
|
|
18176
|
-
width: 100%;
|
|
18177
|
-
display: inline-flex;
|
|
18178
|
-
}
|
|
18179
|
-
|
|
18180
|
-
descope-text::part(text-wrapper) {
|
|
18181
|
-
display: -webkit-box;
|
|
18182
|
-
-webkit-line-clamp: 2;
|
|
18183
|
-
-webkit-box-orient: vertical;
|
|
18184
|
-
overflow: hidden;
|
|
18185
|
-
}
|
|
18186
|
-
|
|
18187
|
-
a {
|
|
18188
|
-
text-decoration: none;
|
|
18189
|
-
}
|
|
18190
|
-
|
|
18191
|
-
descope-text {
|
|
18192
|
-
${TextClass.cssVarList.hostDirection}: var(${AppsListClass.cssVarList.hostDirection});
|
|
18193
|
-
}
|
|
18194
|
-
`,
|
|
18195
|
-
})
|
|
18196
|
-
);
|
|
18197
|
-
|
|
18198
|
-
const vars$k = AppsListClass.cssVarList;
|
|
18199
|
-
const globalRefs$a = getThemeRefs$1(globals);
|
|
18200
|
-
|
|
18201
|
-
const defaultHeight = '400px';
|
|
18202
|
-
|
|
18203
|
-
const appsList = {
|
|
18204
|
-
[vars$k.itemsFontWeight]: 'normal',
|
|
18205
|
-
[vars$k.itemsTextAlign]: 'start',
|
|
18206
|
-
[vars$k.hostDirection]: globalRefs$a.direction,
|
|
18207
|
-
[vars$k.maxHeight]: defaultHeight,
|
|
18208
|
-
|
|
18209
|
-
_empty: {
|
|
18210
|
-
[vars$k.minHeight]: defaultHeight,
|
|
18211
|
-
},
|
|
18212
|
-
|
|
18213
|
-
size: {
|
|
18214
|
-
xs: {
|
|
18215
|
-
[vars$k.itemsFontSize]: '14px',
|
|
18216
|
-
},
|
|
18217
|
-
sm: {
|
|
18218
|
-
[vars$k.itemsFontSize]: '14px',
|
|
18219
|
-
},
|
|
18220
|
-
md: {
|
|
18221
|
-
[vars$k.itemsFontSize]: '16px',
|
|
18222
|
-
},
|
|
18223
|
-
lg: {
|
|
18224
|
-
[vars$k.itemsFontSize]: '20px',
|
|
18225
|
-
},
|
|
18226
|
-
},
|
|
18227
|
-
};
|
|
18228
|
-
|
|
18229
|
-
var appsList$1 = /*#__PURE__*/Object.freeze({
|
|
18230
|
-
__proto__: null,
|
|
18231
|
-
default: appsList,
|
|
18232
|
-
vars: vars$k
|
|
18233
|
-
});
|
|
18234
|
-
|
|
18235
|
-
const componentName$m = getComponentName('list-item');
|
|
18236
|
-
|
|
18237
|
-
const customMixin$2 = (superclass) =>
|
|
18238
18171
|
class ListItemMixinClass extends superclass {
|
|
18239
18172
|
constructor() {
|
|
18240
18173
|
super();
|
|
@@ -18287,14 +18220,14 @@ const ListItemClass = compose(
|
|
|
18287
18220
|
}),
|
|
18288
18221
|
draggableMixin$1,
|
|
18289
18222
|
componentNameValidationMixin$1,
|
|
18290
|
-
customMixin$
|
|
18223
|
+
customMixin$3,
|
|
18291
18224
|
activeableMixin,
|
|
18292
|
-
)(createBaseClass$1({ componentName: componentName$
|
|
18225
|
+
)(createBaseClass$1({ componentName: componentName$n, baseSelector: 'slot' }));
|
|
18293
18226
|
|
|
18294
|
-
const componentName$
|
|
18227
|
+
const componentName$m = getComponentName('list');
|
|
18295
18228
|
|
|
18296
18229
|
class RawList extends createBaseClass$1({
|
|
18297
|
-
componentName: componentName$
|
|
18230
|
+
componentName: componentName$m,
|
|
18298
18231
|
baseSelector: '.wrapper',
|
|
18299
18232
|
}) {
|
|
18300
18233
|
static get observedAttributes() {
|
|
@@ -18462,13 +18395,194 @@ const ListClass = compose(
|
|
|
18462
18395
|
componentNameValidationMixin$1,
|
|
18463
18396
|
)(RawList);
|
|
18464
18397
|
|
|
18398
|
+
const componentName$l = getComponentName('apps-list');
|
|
18399
|
+
|
|
18400
|
+
const itemRenderer$4 = ({ name, icon, url }, _, ref) => `
|
|
18401
|
+
<a ${url ? `href="${url}" title="${url}"` : ''} target="_blank">
|
|
18402
|
+
<descope-list-item>
|
|
18403
|
+
<descope-avatar
|
|
18404
|
+
${icon ? `img="${icon}"` : ''}
|
|
18405
|
+
${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
|
|
18406
|
+
size="${ref.logoSize || ref.size}"
|
|
18407
|
+
></descope-avatar>
|
|
18408
|
+
<descope-text
|
|
18409
|
+
variant="${ref.itemTextVariant}"
|
|
18410
|
+
mode="primary"
|
|
18411
|
+
>${name}</descope-text>
|
|
18412
|
+
</descope-list-item>
|
|
18413
|
+
</a>
|
|
18414
|
+
`;
|
|
18415
|
+
|
|
18416
|
+
const customMixin$2 = (superclass) =>
|
|
18417
|
+
class AppsListMixinClass extends superclass {
|
|
18418
|
+
// size controls both item logo size and font size
|
|
18419
|
+
get size() {
|
|
18420
|
+
return this.getAttribute('size') || 'sm';
|
|
18421
|
+
}
|
|
18422
|
+
|
|
18423
|
+
get itemTextVariant() {
|
|
18424
|
+
return this.getAttribute('item-text-variant') || 'body1';
|
|
18425
|
+
}
|
|
18426
|
+
|
|
18427
|
+
get logoSize() {
|
|
18428
|
+
return this.getAttribute('logo-size');
|
|
18429
|
+
}
|
|
18430
|
+
};
|
|
18431
|
+
|
|
18432
|
+
const AppsListClass = compose(
|
|
18433
|
+
createStyleMixin$1({
|
|
18434
|
+
mappings: {
|
|
18435
|
+
maxHeight: { selector: () => ':host' },
|
|
18436
|
+
minHeight: { selector: () => ':host' },
|
|
18437
|
+
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
18438
|
+
itemsFontWeight: {
|
|
18439
|
+
selector: TextClass.componentName,
|
|
18440
|
+
property: TextClass.cssVarList.fontWeightOverride,
|
|
18441
|
+
},
|
|
18442
|
+
itemsFontSize: {
|
|
18443
|
+
selector: TextClass.componentName,
|
|
18444
|
+
property: TextClass.cssVarList.fontSizeOverride,
|
|
18445
|
+
},
|
|
18446
|
+
itemsTextAlign: {
|
|
18447
|
+
selector: TextClass.componentName,
|
|
18448
|
+
property: TextClass.cssVarList.textAlign,
|
|
18449
|
+
},
|
|
18450
|
+
itemBackgroundColor: {
|
|
18451
|
+
selector: ListItemClass.componentName,
|
|
18452
|
+
property: ListItemClass.cssVarList.backgroundColor,
|
|
18453
|
+
},
|
|
18454
|
+
backgroundColor: {
|
|
18455
|
+
selector: ListClass.componentName,
|
|
18456
|
+
property: ListClass.cssVarList.backgroundColorOverride,
|
|
18457
|
+
},
|
|
18458
|
+
itemBorderStyle: {
|
|
18459
|
+
selector: ListItemClass.componentName,
|
|
18460
|
+
property: ListItemClass.cssVarList.borderStyleOverride,
|
|
18461
|
+
},
|
|
18462
|
+
itemBorderColor: {
|
|
18463
|
+
selector: ListItemClass.componentName,
|
|
18464
|
+
property: ListItemClass.cssVarList.borderColorOverride,
|
|
18465
|
+
},
|
|
18466
|
+
itemBorderWidth: {
|
|
18467
|
+
selector: ListItemClass.componentName,
|
|
18468
|
+
property: ListItemClass.cssVarList.borderWidthOverride,
|
|
18469
|
+
},
|
|
18470
|
+
itemVerticalPadding: {
|
|
18471
|
+
selector: ListItemClass.componentName,
|
|
18472
|
+
property: ListItemClass.cssVarList.verticalPaddingOverride,
|
|
18473
|
+
},
|
|
18474
|
+
itemHorizontalPadding: {
|
|
18475
|
+
selector: ListItemClass.componentName,
|
|
18476
|
+
property: ListItemClass.cssVarList.horizontalPaddingOverride,
|
|
18477
|
+
},
|
|
18478
|
+
itemAlignment: [
|
|
18479
|
+
{ selector: ListItemClass.componentName, property: ListItemClass.cssVarList.alignItemsOverride },
|
|
18480
|
+
{ selector: TextClass.componentName, property: TextClass.cssVarList.textAlign },
|
|
18481
|
+
]
|
|
18482
|
+
},
|
|
18483
|
+
}),
|
|
18484
|
+
createDynamicDataMixin$1({ itemRenderer: itemRenderer$4, rerenderAttrsList: ['size', 'item-text-variant', 'logo-size'] }),
|
|
18485
|
+
draggableMixin$1,
|
|
18486
|
+
componentNameValidationMixin$1,
|
|
18487
|
+
customMixin$2
|
|
18488
|
+
)(
|
|
18489
|
+
createProxy$1({
|
|
18490
|
+
slots: ['empty-state'],
|
|
18491
|
+
wrappedEleName: 'descope-list',
|
|
18492
|
+
excludeAttrsSync: ['tabindex', 'class', 'empty', 'style'],
|
|
18493
|
+
componentName: componentName$l,
|
|
18494
|
+
style: () => `
|
|
18495
|
+
:host {
|
|
18496
|
+
width: 100%;
|
|
18497
|
+
display: inline-flex;
|
|
18498
|
+
}
|
|
18499
|
+
|
|
18500
|
+
descope-text::part(text-wrapper) {
|
|
18501
|
+
display: -webkit-box;
|
|
18502
|
+
-webkit-line-clamp: 2;
|
|
18503
|
+
-webkit-box-orient: vertical;
|
|
18504
|
+
overflow: hidden;
|
|
18505
|
+
}
|
|
18506
|
+
|
|
18507
|
+
a {
|
|
18508
|
+
text-decoration: none;
|
|
18509
|
+
}
|
|
18510
|
+
|
|
18511
|
+
descope-text {
|
|
18512
|
+
${TextClass.cssVarList.hostDirection}: var(${AppsListClass.cssVarList.hostDirection});
|
|
18513
|
+
max-width: 100%;
|
|
18514
|
+
}
|
|
18515
|
+
`,
|
|
18516
|
+
})
|
|
18517
|
+
);
|
|
18518
|
+
|
|
18519
|
+
const vars$k = AppsListClass.cssVarList;
|
|
18520
|
+
const globalRefs$a = getThemeRefs$1(globals);
|
|
18521
|
+
|
|
18522
|
+
const defaultHeight = '400px';
|
|
18523
|
+
|
|
18524
|
+
const appsList = {
|
|
18525
|
+
[vars$k.itemsFontWeight]: 'normal',
|
|
18526
|
+
[vars$k.itemsTextAlign]: 'start',
|
|
18527
|
+
[vars$k.hostDirection]: globalRefs$a.direction,
|
|
18528
|
+
[vars$k.maxHeight]: defaultHeight,
|
|
18529
|
+
|
|
18530
|
+
_empty: {
|
|
18531
|
+
[vars$k.minHeight]: defaultHeight,
|
|
18532
|
+
},
|
|
18533
|
+
|
|
18534
|
+
size: {
|
|
18535
|
+
xs: {
|
|
18536
|
+
[vars$k.itemsFontSize]: '14px',
|
|
18537
|
+
},
|
|
18538
|
+
sm: {
|
|
18539
|
+
[vars$k.itemsFontSize]: '14px',
|
|
18540
|
+
},
|
|
18541
|
+
md: {
|
|
18542
|
+
[vars$k.itemsFontSize]: '16px',
|
|
18543
|
+
},
|
|
18544
|
+
lg: {
|
|
18545
|
+
[vars$k.itemsFontSize]: '20px',
|
|
18546
|
+
},
|
|
18547
|
+
},
|
|
18548
|
+
|
|
18549
|
+
itemPadding: {
|
|
18550
|
+
xs: {
|
|
18551
|
+
[vars$k.itemVerticalPadding]: globalRefs$a.spacing.xs,
|
|
18552
|
+
[vars$k.itemHorizontalPadding]: globalRefs$a.spacing.xs,
|
|
18553
|
+
},
|
|
18554
|
+
sm: {
|
|
18555
|
+
[vars$k.itemVerticalPadding]: globalRefs$a.spacing.sm,
|
|
18556
|
+
[vars$k.itemHorizontalPadding]: globalRefs$a.spacing.sm,
|
|
18557
|
+
},
|
|
18558
|
+
md: {
|
|
18559
|
+
[vars$k.itemVerticalPadding]: globalRefs$a.spacing.md,
|
|
18560
|
+
[vars$k.itemHorizontalPadding]: globalRefs$a.spacing.md,
|
|
18561
|
+
},
|
|
18562
|
+
lg: {
|
|
18563
|
+
[vars$k.itemVerticalPadding]: globalRefs$a.spacing.lg,
|
|
18564
|
+
[vars$k.itemHorizontalPadding]: globalRefs$a.spacing.lg,
|
|
18565
|
+
},
|
|
18566
|
+
xl: {
|
|
18567
|
+
[vars$k.itemVerticalPadding]: globalRefs$a.spacing.xl,
|
|
18568
|
+
[vars$k.itemHorizontalPadding]: globalRefs$a.spacing.xl,
|
|
18569
|
+
},
|
|
18570
|
+
},
|
|
18571
|
+
};
|
|
18572
|
+
|
|
18573
|
+
var appsList$1 = /*#__PURE__*/Object.freeze({
|
|
18574
|
+
__proto__: null,
|
|
18575
|
+
default: appsList,
|
|
18576
|
+
vars: vars$k
|
|
18577
|
+
});
|
|
18578
|
+
|
|
18465
18579
|
const globalRefs$9 = getThemeRefs$1(globals);
|
|
18466
18580
|
|
|
18467
18581
|
const compVars$3 = ListClass.cssVarList;
|
|
18468
18582
|
|
|
18469
18583
|
const [helperTheme$1, helperRefs$1, helperVars$1] = createHelperVars$1(
|
|
18470
18584
|
{ shadowColor: '#00000020' },
|
|
18471
|
-
componentName$
|
|
18585
|
+
componentName$m
|
|
18472
18586
|
);
|
|
18473
18587
|
|
|
18474
18588
|
const { shadowColor: shadowColor$1 } = helperRefs$1;
|