@descope/web-components-ui 1.0.300 → 1.0.302
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 +287 -207
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +221 -141
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1612.js +1 -1
- package/dist/umd/1621.js +2 -2
- package/dist/umd/3951.js +1 -1
- package/dist/umd/4024.js +1 -1
- package/dist/umd/4052.js +1 -1
- package/dist/umd/4746.js +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/5806.js +1 -1
- package/dist/umd/6770.js +1 -1
- package/dist/umd/7056.js +1 -1
- package/dist/umd/7531.js +1 -1
- package/dist/umd/7911.js +1 -1
- package/dist/umd/9092.js +2 -2
- package/dist/umd/9314.js +1 -1
- package/dist/umd/9423.js +2 -2
- package/dist/umd/9562.js +1 -1
- package/dist/umd/9927.js +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-enriched-text-index-js.js +1 -0
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +1 -1
- package/dist/umd/descope-link-index-js.js +1 -1
- package/dist/umd/descope-text-index-js.js +1 -0
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/package.json +3 -3
- package/src/components/descope-divider/DividerClass.js +1 -1
- package/src/components/descope-divider/index.js +1 -1
- package/src/components/descope-enriched-text/EnrichedTextClass.js +162 -0
- package/src/components/descope-enriched-text/consts.js +74 -0
- package/src/components/descope-link/LinkClass.js +1 -1
- package/src/components/descope-link/index.js +1 -1
- package/src/components/descope-text/TextClass.js +62 -0
- package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
- package/src/components/descope-user-attribute/index.js +1 -1
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +1 -1
- package/src/components/descope-user-auth-method/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/helpers/componentHelpers.js +2 -2
- package/src/index.cjs.js +2 -2
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
- package/src/theme/components/enrichedText.js +4 -1
- package/src/theme/components/text.js +1 -1
- package/dist/umd/4569.js +0 -1
- package/dist/umd/text-components-descope-enriched-text-index-js.js +0 -1
- package/dist/umd/text-components-descope-text-index-js.js +0 -1
- package/src/components/text-components/createBaseTextClass.js +0 -26
- package/src/components/text-components/descope-enriched-text/EnrichedTextClass.js +0 -106
- package/src/components/text-components/descope-enriched-text/helpers.js +0 -41
- package/src/components/text-components/descope-text/TextClass.js +0 -34
- package/src/components/text-components/hideWhenEmptyMixin.js +0 -17
- /package/src/components/{text-components/descope-enriched-text → descope-enriched-text}/index.js +0 -0
- /package/src/components/{text-components/descope-text → descope-text}/index.js +0 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var merge = require('lodash.merge');
|
4
4
|
var Color = require('color');
|
5
|
-
var
|
5
|
+
var remarkable = require('remarkable');
|
6
6
|
|
7
7
|
const DESCOPE_PREFIX = 'descope';
|
8
8
|
const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
|
@@ -95,13 +95,13 @@ const observeChildren = (ele, callback) => {
|
|
95
95
|
|
96
96
|
const observer = new MutationObserver((mutationsList) => {
|
97
97
|
mutationsList.forEach((mutation) => {
|
98
|
-
if (mutation.type === 'childList') {
|
98
|
+
if (mutation.type === 'childList' || mutation.type === 'characterData') {
|
99
99
|
callback(mutation);
|
100
100
|
}
|
101
101
|
});
|
102
102
|
});
|
103
103
|
|
104
|
-
observer.observe(ele, { childList: true });
|
104
|
+
observer.observe(ele, { childList: true, characterData: true, subtree: true });
|
105
105
|
};
|
106
106
|
|
107
107
|
const createSyncAttrsCb =
|
@@ -4417,50 +4417,39 @@ var notpImage = /*#__PURE__*/Object.freeze({
|
|
4417
4417
|
vars: vars$s
|
4418
4418
|
});
|
4419
4419
|
|
4420
|
-
const
|
4421
|
-
class HideWhenEmptyMixinClass extends superclass {
|
4422
|
-
get hideWhenEmpty() {
|
4423
|
-
return this.getAttribute('hide-when-empty') === 'true';
|
4424
|
-
}
|
4425
|
-
|
4426
|
-
init() {
|
4427
|
-
super.init();
|
4428
|
-
|
4429
|
-
observeChildren(this, () => {
|
4430
|
-
const hasChildren = !!this.childNodes.length;
|
4431
|
-
this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';
|
4432
|
-
});
|
4433
|
-
}
|
4434
|
-
};
|
4435
|
-
|
4436
|
-
const createBaseTextClass = (componentName) => {
|
4437
|
-
class BaseText extends createBaseClass({ componentName, baseSelector: ':host > slot' }) {
|
4438
|
-
constructor() {
|
4439
|
-
super();
|
4420
|
+
const componentName$A = getComponentName('text');
|
4440
4421
|
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4444
|
-
display: inline-block;
|
4445
|
-
}
|
4446
|
-
:host > slot {
|
4447
|
-
width: 100%;
|
4448
|
-
display: inline-block;
|
4449
|
-
}
|
4450
|
-
</style>
|
4451
|
-
<slot part="text-wrapper"></slot>
|
4452
|
-
`;
|
4422
|
+
class RawText extends createBaseClass({ componentName: componentName$A, baseSelector: ':host > slot' }) {
|
4423
|
+
constructor() {
|
4424
|
+
super();
|
4453
4425
|
|
4454
|
-
|
4455
|
-
|
4426
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
4427
|
+
<style>
|
4428
|
+
:host {
|
4429
|
+
display: inline-block;
|
4430
|
+
}
|
4431
|
+
:host > slot {
|
4432
|
+
width: 100%;
|
4433
|
+
display: inline-block;
|
4434
|
+
}
|
4435
|
+
</style>
|
4436
|
+
<slot part="text-wrapper"></slot>
|
4437
|
+
`;
|
4456
4438
|
}
|
4457
4439
|
|
4458
|
-
|
4459
|
-
|
4440
|
+
get hideWhenEmpty() {
|
4441
|
+
return this.getAttribute('hide-when-empty') === 'true';
|
4442
|
+
}
|
4460
4443
|
|
4461
|
-
|
4444
|
+
init() {
|
4445
|
+
super.init();
|
4462
4446
|
|
4463
|
-
|
4447
|
+
observeChildren(this, () => {
|
4448
|
+
const hasChildren = !!this.childNodes.length;
|
4449
|
+
this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';
|
4450
|
+
});
|
4451
|
+
}
|
4452
|
+
}
|
4464
4453
|
|
4465
4454
|
const TextClass = compose(
|
4466
4455
|
createStyleMixin({
|
@@ -4483,9 +4472,8 @@ const TextClass = compose(
|
|
4483
4472
|
},
|
4484
4473
|
}),
|
4485
4474
|
draggableMixin,
|
4486
|
-
componentNameValidationMixin
|
4487
|
-
|
4488
|
-
)(BaseTextClass);
|
4475
|
+
componentNameValidationMixin
|
4476
|
+
)(RawText);
|
4489
4477
|
|
4490
4478
|
const globalRefs$j = getThemeRefs(globals);
|
4491
4479
|
const vars$r = TextClass.cssVarList;
|
@@ -4577,115 +4565,217 @@ var text$3 = /*#__PURE__*/Object.freeze({
|
|
4577
4565
|
vars: vars$r
|
4578
4566
|
});
|
4579
4567
|
|
4580
|
-
const
|
4581
|
-
|
4568
|
+
const ruleSet = {
|
4569
|
+
custom: ['image'],
|
4570
|
+
core: [
|
4571
|
+
'block',
|
4572
|
+
'inline',
|
4573
|
+
'abbr', // Parse abbreviation definitions, i.e. `*[abbr]: description`
|
4574
|
+
'abbr2', // Enclose abbreviations in <abbr> tags
|
4575
|
+
'references',
|
4576
|
+
'footnote_tail',
|
4577
|
+
'replacements', // Simple typographical replacements
|
4578
|
+
'smartquotes', // Convert straight quotation marks to typographic ones
|
4579
|
+
],
|
4580
|
+
inline: [
|
4581
|
+
'text',
|
4582
|
+
'newline', // Proceess '\n'
|
4583
|
+
'backticks', // Parse backticks
|
4584
|
+
'del', // Process ~~deleted text~~
|
4585
|
+
'emphasis', // Process *this* and _that_
|
4586
|
+
'sub', // Process ~subscript~
|
4587
|
+
'sup', // Process ^superscript^
|
4588
|
+
'links', // Process [links](<to> "stuff")
|
4589
|
+
'escape', // Proceess escaped chars and hardbreaks
|
4590
|
+
'ins', // Process ++inserted text++
|
4591
|
+
'mark', // Process ==highlighted text==
|
4592
|
+
'footnote_inline', // Process inline footnotes (^[...])
|
4593
|
+
'footnote_ref', // Process footnote references ([^...])
|
4594
|
+
'autolink', // Process autolinks '<protocol:...>'
|
4595
|
+
'htmltag', // Process html tags
|
4596
|
+
'entity', // Process html entity - {, ¯, ", ...
|
4597
|
+
],
|
4598
|
+
block: [
|
4599
|
+
'code', // Code block (4 spaces padded)
|
4600
|
+
'fences', // fences (``` lang, ~~~ lang)
|
4601
|
+
'blockquote', // Block quotes
|
4602
|
+
'list',
|
4603
|
+
'heading', // heading (#, ##, ...)
|
4604
|
+
'paragraph',
|
4605
|
+
'hr', // Horizontal rule
|
4606
|
+
'footnote', // Process footnote reference list
|
4607
|
+
'lheading', // lheading (---, ===)
|
4608
|
+
'htmlblock', // HTML block
|
4609
|
+
'table', // GFM table, non-standard
|
4610
|
+
'deflist', // Definition lists
|
4611
|
+
],
|
4582
4612
|
};
|
4583
4613
|
|
4584
|
-
const
|
4614
|
+
const textRuleSet = {
|
4615
|
+
core: ['block', 'inline'],
|
4616
|
+
inline: [
|
4617
|
+
'text',
|
4618
|
+
'newline', // Proceess '\n'
|
4619
|
+
'backticks', // Parse backticks
|
4620
|
+
'del', // Process ~~deleted text~~
|
4621
|
+
'emphasis', // Process *this* and _that_
|
4622
|
+
'sub', // Process ~subscript~
|
4623
|
+
'sup', // Process ^superscript^
|
4624
|
+
'links', // Process [links](<to> "stuff")
|
4625
|
+
'escape', // Proceess escaped chars and hardbreaks
|
4626
|
+
'ins', // Process ++inserted text++
|
4627
|
+
'footnote_inline', // Process inline footnotes (^[...])
|
4628
|
+
'footnote_ref', // Process footnote references ([^...])
|
4629
|
+
'autolink', // Process autolinks '<protocol:...>'
|
4630
|
+
],
|
4631
|
+
block: [
|
4632
|
+
'code', // Code block (4 spaces padded)
|
4633
|
+
'fences', // fences (``` lang, ~~~ lang)
|
4634
|
+
'blockquote', // Block quotes
|
4635
|
+
'list',
|
4636
|
+
'heading', // heading (#, ##, ...)
|
4637
|
+
'paragraph',
|
4638
|
+
'footnote', // Process footnote reference list
|
4639
|
+
'htmlblock', // HTML block
|
4640
|
+
],
|
4641
|
+
};
|
4585
4642
|
|
4586
|
-
const
|
4643
|
+
const componentName$z = getComponentName('enriched-text');
|
4587
4644
|
|
4588
|
-
|
4589
|
-
|
4590
|
-
const tag = getTokenTag(token);
|
4645
|
+
let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName: componentName$z, baseSelector: ':host > div' }) {
|
4646
|
+
#origImageRenderer;
|
4591
4647
|
|
4592
|
-
|
4593
|
-
|
4594
|
-
return {
|
4595
|
-
...token,
|
4596
|
-
tag,
|
4597
|
-
};
|
4598
|
-
}
|
4648
|
+
constructor() {
|
4649
|
+
super();
|
4599
4650
|
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4604
|
-
|
4605
|
-
|
4606
|
-
|
4651
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
4652
|
+
<style>
|
4653
|
+
:host {
|
4654
|
+
display: inline-block;
|
4655
|
+
}
|
4656
|
+
:host > slot {
|
4657
|
+
width: 100%;
|
4658
|
+
display: inline-block;
|
4659
|
+
}
|
4660
|
+
*, *:last-child {
|
4661
|
+
margin: 0;
|
4662
|
+
}
|
4663
|
+
h1,
|
4664
|
+
h2,
|
4665
|
+
h3,
|
4666
|
+
h4,
|
4667
|
+
h5,
|
4668
|
+
h6,
|
4669
|
+
p {
|
4670
|
+
margin-bottom: 1em;
|
4671
|
+
}
|
4672
|
+
a {
|
4673
|
+
text-decoration: none;
|
4674
|
+
cursor: pointer;
|
4675
|
+
}
|
4676
|
+
a:hover {
|
4677
|
+
text-decoration: underline;
|
4678
|
+
}
|
4679
|
+
blockquote {
|
4680
|
+
padding: 0 2em;
|
4681
|
+
}
|
4682
|
+
</style>
|
4683
|
+
<slot part="text-wrapper" style="display:none"></slot>
|
4684
|
+
<div class="content"></div>
|
4685
|
+
`;
|
4607
4686
|
|
4608
|
-
|
4609
|
-
...token,
|
4610
|
-
tag,
|
4611
|
-
};
|
4612
|
-
});
|
4687
|
+
this.textSlot = this.shadowRoot.querySelector('slot');
|
4613
4688
|
|
4614
|
-
|
4615
|
-
const selection = document.getSelection().toString();
|
4616
|
-
const clipdata = e.clipboardData || window.clipboardData;
|
4617
|
-
clipdata.setData('text/plain', selection);
|
4618
|
-
clipdata.setData('text/html', selection);
|
4619
|
-
e.preventDefault();
|
4620
|
-
};
|
4689
|
+
this.#initProcessor();
|
4621
4690
|
|
4622
|
-
|
4691
|
+
observeChildren(this, this.#parseChildren.bind(this));
|
4692
|
+
}
|
4693
|
+
|
4694
|
+
static get observedAttributes() {
|
4695
|
+
return ['readonly'];
|
4696
|
+
}
|
4623
4697
|
|
4624
|
-
|
4698
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
4699
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
4625
4700
|
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
|
4701
|
+
if (newValue !== oldValue) {
|
4702
|
+
if (attrName === 'readonly') {
|
4703
|
+
this.onReadOnlyChange(newValue === 'true');
|
4704
|
+
}
|
4630
4705
|
}
|
4706
|
+
}
|
4631
4707
|
|
4632
|
-
|
4633
|
-
|
4708
|
+
#disableAllRules() {
|
4709
|
+
if (!this.processor) {
|
4710
|
+
return;
|
4634
4711
|
}
|
4635
4712
|
|
4636
|
-
|
4637
|
-
|
4638
|
-
|
4713
|
+
ruleSet?.core && this.processor.core.ruler.disable(ruleSet.core);
|
4714
|
+
ruleSet?.inline && this.processor.inline.ruler.disable(ruleSet.inline);
|
4715
|
+
ruleSet?.block && this.processor.block.ruler.disable(ruleSet.block);
|
4639
4716
|
|
4640
|
-
|
4641
|
-
|
4642
|
-
|
4643
|
-
|
4717
|
+
this.processor.renderer.rules.image = () => {
|
4718
|
+
return '';
|
4719
|
+
};
|
4720
|
+
}
|
4721
|
+
|
4722
|
+
#enableCustomRules() {
|
4723
|
+
if (!this.processor) {
|
4724
|
+
return;
|
4644
4725
|
}
|
4645
4726
|
|
4646
|
-
|
4647
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
4727
|
+
const customRuleSet = textRuleSet;
|
4648
4728
|
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4652
|
-
this.#parseChildren();
|
4653
|
-
}
|
4654
|
-
}
|
4729
|
+
customRuleSet?.core && this.processor?.core.ruler.enable(customRuleSet?.core);
|
4730
|
+
customRuleSet?.inline && this.processor?.inline.ruler.enable(customRuleSet?.inline);
|
4731
|
+
customRuleSet?.block && this.processor?.block.ruler.enable(customRuleSet?.block);
|
4655
4732
|
|
4656
|
-
|
4657
|
-
|
4658
|
-
}
|
4733
|
+
if (customRuleSet?.custom?.includes('image')) {
|
4734
|
+
this.processor.renderer.rules.image = this.#origImageRenderer;
|
4659
4735
|
}
|
4736
|
+
}
|
4660
4737
|
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4738
|
+
#updateProcessorRules() {
|
4739
|
+
this.#disableAllRules();
|
4740
|
+
this.#enableCustomRules();
|
4741
|
+
}
|
4664
4742
|
|
4665
|
-
|
4666
|
-
|
4743
|
+
#initProcessor() {
|
4744
|
+
this.processor = new remarkable.Remarkable();
|
4745
|
+
this.#origImageRenderer = this.processor.renderer.rules.image;
|
4746
|
+
this.#updateProcessorRules();
|
4747
|
+
}
|
4667
4748
|
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4671
|
-
breaks: this.lineBreak,
|
4672
|
-
});
|
4749
|
+
get contentNode() {
|
4750
|
+
return this.shadowRoot.querySelector('.content');
|
4751
|
+
}
|
4673
4752
|
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
// eslint-disable-next-line no-use-before-define
|
4678
|
-
span.innerHTML = `${getStyleReset()}${result}`;
|
4679
|
-
span.addEventListener('copy', onClipboardCopy);
|
4680
|
-
node.parentNode.replaceChild(span, node);
|
4681
|
-
}
|
4682
|
-
}
|
4753
|
+
#parseChildren() {
|
4754
|
+
if (!this.processor) {
|
4755
|
+
return;
|
4683
4756
|
}
|
4684
4757
|
|
4685
|
-
|
4686
|
-
|
4758
|
+
let html = this.textContent;
|
4759
|
+
|
4760
|
+
try {
|
4761
|
+
const tokens = this.processor.parse(this.textContent);
|
4762
|
+
html = this.processor.renderer.render(tokens, { breaks: true });
|
4763
|
+
} catch (e) {
|
4764
|
+
// eslint-disable-next-line no-console
|
4765
|
+
console.warn('Not parsing invalid markdown token');
|
4687
4766
|
}
|
4688
|
-
|
4767
|
+
|
4768
|
+
this.contentNode.innerHTML = html;
|
4769
|
+
}
|
4770
|
+
|
4771
|
+
onReadOnlyChange(isReadOnly) {
|
4772
|
+
if (isReadOnly) {
|
4773
|
+
this.setAttribute('inert', isReadOnly);
|
4774
|
+
} else {
|
4775
|
+
this.removeAttribute('inert');
|
4776
|
+
}
|
4777
|
+
}
|
4778
|
+
};
|
4689
4779
|
|
4690
4780
|
const EnrichedTextClass = compose(
|
4691
4781
|
createStyleMixin({
|
@@ -4697,27 +4787,82 @@ const EnrichedTextClass = compose(
|
|
4697
4787
|
fontWeight: {},
|
4698
4788
|
textColor: { property: 'color' },
|
4699
4789
|
textLineHeight: { property: 'line-height' },
|
4700
|
-
marginReset: { selector: '*', property: 'margin' },
|
4701
4790
|
textAlign: {},
|
4791
|
+
linkColor: { selector: 'a', property: 'color' },
|
4702
4792
|
},
|
4703
4793
|
}),
|
4794
|
+
createStyleMixin({ componentNameOverride: getComponentName('link') }),
|
4704
4795
|
draggableMixin,
|
4705
|
-
componentNameValidationMixin
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4714
|
-
.
|
4715
|
-
|
4716
|
-
|
4717
|
-
|
4718
|
-
|
4796
|
+
componentNameValidationMixin
|
4797
|
+
)(EnrichedText$2);
|
4798
|
+
|
4799
|
+
const componentName$y = getComponentName('link');
|
4800
|
+
|
4801
|
+
class RawLink extends createBaseClass({ componentName: componentName$y, baseSelector: ':host a' }) {
|
4802
|
+
constructor() {
|
4803
|
+
super();
|
4804
|
+
|
4805
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
4806
|
+
<style>
|
4807
|
+
:host {
|
4808
|
+
display: inline-block;
|
4809
|
+
}
|
4810
|
+
:host a {
|
4811
|
+
display: inline;
|
4812
|
+
text-decoration: none;
|
4813
|
+
}
|
4814
|
+
:host a:hover {
|
4815
|
+
text-decoration: underline;
|
4816
|
+
}
|
4817
|
+
</style>
|
4818
|
+
<div>
|
4819
|
+
<descope-text>
|
4820
|
+
<a>
|
4821
|
+
<slot></slot>
|
4822
|
+
</a>
|
4823
|
+
</descope-text>
|
4824
|
+
</div>
|
4825
|
+
`;
|
4826
|
+
|
4827
|
+
forwardAttrs(this, this.shadowRoot.querySelector('a'), {
|
4828
|
+
includeAttrs: ['href', 'target', 'tooltip'],
|
4829
|
+
mapAttrs: {
|
4830
|
+
tooltip: 'title',
|
4831
|
+
},
|
4832
|
+
});
|
4833
|
+
|
4834
|
+
forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {
|
4835
|
+
includeAttrs: ['mode', 'variant'],
|
4836
|
+
});
|
4837
|
+
}
|
4719
4838
|
}
|
4720
4839
|
|
4840
|
+
const selectors$2 = {
|
4841
|
+
host: { selector: () => ':host' },
|
4842
|
+
anchor: {},
|
4843
|
+
wrapper: { selector: () => ':host > div' },
|
4844
|
+
text: { selector: () => TextClass.componentName },
|
4845
|
+
};
|
4846
|
+
|
4847
|
+
const { anchor, text: text$1, host: host$h, wrapper: wrapper$1 } = selectors$2;
|
4848
|
+
|
4849
|
+
const LinkClass = compose(
|
4850
|
+
createStyleMixin({
|
4851
|
+
mappings: {
|
4852
|
+
hostWidth: { ...host$h, property: 'width' },
|
4853
|
+
hostDirection: { ...text$1, property: 'direction' },
|
4854
|
+
textAlign: wrapper$1,
|
4855
|
+
textColor: [
|
4856
|
+
{ ...anchor, property: 'color' },
|
4857
|
+
{ ...text$1, property: TextClass.cssVarList.textColor },
|
4858
|
+
],
|
4859
|
+
cursor: anchor,
|
4860
|
+
},
|
4861
|
+
}),
|
4862
|
+
draggableMixin,
|
4863
|
+
componentNameValidationMixin
|
4864
|
+
)(RawLink);
|
4865
|
+
|
4721
4866
|
const globalRefs$i = getThemeRefs(globals);
|
4722
4867
|
const vars$q = EnrichedTextClass.cssVarList;
|
4723
4868
|
|
@@ -4732,6 +4877,8 @@ const EnrichedText = {
|
|
4732
4877
|
[vars$q.textAlign]: 'left',
|
4733
4878
|
[vars$q.textColor]: globalRefs$i.colors.surface.dark,
|
4734
4879
|
|
4880
|
+
[vars$q.linkColor]: `var(${LinkClass.cssVarList.textColor})`,
|
4881
|
+
|
4735
4882
|
mode: {
|
4736
4883
|
primary: {
|
4737
4884
|
[vars$q.textColor]: globalRefs$i.colors.surface.contrast,
|
@@ -4802,73 +4949,6 @@ var EnrichedText$1 = /*#__PURE__*/Object.freeze({
|
|
4802
4949
|
vars: vars$q
|
4803
4950
|
});
|
4804
4951
|
|
4805
|
-
const componentName$y = getComponentName('link');
|
4806
|
-
|
4807
|
-
class RawLink extends createBaseClass({ componentName: componentName$y, baseSelector: ':host a' }) {
|
4808
|
-
constructor() {
|
4809
|
-
super();
|
4810
|
-
|
4811
|
-
this.attachShadow({ mode: 'open' }).innerHTML = `
|
4812
|
-
<style>
|
4813
|
-
:host {
|
4814
|
-
display: inline-block;
|
4815
|
-
}
|
4816
|
-
:host a {
|
4817
|
-
display: inline;
|
4818
|
-
text-decoration: none;
|
4819
|
-
}
|
4820
|
-
:host a:hover {
|
4821
|
-
text-decoration: underline;
|
4822
|
-
}
|
4823
|
-
</style>
|
4824
|
-
<div>
|
4825
|
-
<descope-text>
|
4826
|
-
<a>
|
4827
|
-
<slot></slot>
|
4828
|
-
</a>
|
4829
|
-
</descope-text>
|
4830
|
-
</div>
|
4831
|
-
`;
|
4832
|
-
|
4833
|
-
forwardAttrs(this, this.shadowRoot.querySelector('a'), {
|
4834
|
-
includeAttrs: ['href', 'target', 'tooltip'],
|
4835
|
-
mapAttrs: {
|
4836
|
-
tooltip: 'title',
|
4837
|
-
},
|
4838
|
-
});
|
4839
|
-
|
4840
|
-
forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {
|
4841
|
-
includeAttrs: ['mode', 'variant'],
|
4842
|
-
});
|
4843
|
-
}
|
4844
|
-
}
|
4845
|
-
|
4846
|
-
const selectors$2 = {
|
4847
|
-
host: { selector: () => ':host' },
|
4848
|
-
anchor: {},
|
4849
|
-
wrapper: { selector: () => ':host > div' },
|
4850
|
-
text: { selector: () => TextClass.componentName },
|
4851
|
-
};
|
4852
|
-
|
4853
|
-
const { anchor, text: text$1, host: host$h, wrapper: wrapper$1 } = selectors$2;
|
4854
|
-
|
4855
|
-
const LinkClass = compose(
|
4856
|
-
createStyleMixin({
|
4857
|
-
mappings: {
|
4858
|
-
hostWidth: { ...host$h, property: 'width' },
|
4859
|
-
hostDirection: { ...text$1, property: 'direction' },
|
4860
|
-
textAlign: wrapper$1,
|
4861
|
-
textColor: [
|
4862
|
-
{ ...anchor, property: 'color' },
|
4863
|
-
{ ...text$1, property: TextClass.cssVarList.textColor },
|
4864
|
-
],
|
4865
|
-
cursor: anchor,
|
4866
|
-
},
|
4867
|
-
}),
|
4868
|
-
draggableMixin,
|
4869
|
-
componentNameValidationMixin
|
4870
|
-
)(RawLink);
|
4871
|
-
|
4872
4952
|
const globalRefs$h = getThemeRefs(globals);
|
4873
4953
|
const vars$p = LinkClass.cssVarList;
|
4874
4954
|
|