@descope/web-components-ui 1.105.0 → 1.107.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.
Files changed (38) hide show
  1. package/dist/cjs/index.cjs.js +224 -128
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +856 -760
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/DescopeDev.js +1 -1
  6. package/dist/umd/DescopeDev.js.map +1 -1
  7. package/dist/umd/descope-alert-index-js.js +1 -1
  8. package/dist/umd/descope-alert-index-js.js.map +1 -1
  9. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  10. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  11. package/dist/umd/descope-date-field-index-js.js +1 -1
  12. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  13. package/dist/umd/descope-enriched-text.js +2 -0
  14. package/dist/umd/descope-enriched-text.js.map +1 -0
  15. package/dist/umd/descope-link.js +2 -0
  16. package/dist/umd/descope-link.js.map +1 -0
  17. package/dist/umd/index.js +1 -1
  18. package/dist/umd/index.js.map +1 -1
  19. package/package.json +11 -10
  20. package/src/components/descope-alert/AlertClass.js +1 -1
  21. package/src/components/descope-alert/index.js +1 -1
  22. package/src/components/descope-date-field/DateFieldClass.js +94 -3
  23. package/src/components/descope-date-field/helpers.js +8 -0
  24. package/src/index.cjs.js +0 -2
  25. package/src/index.js +0 -2
  26. package/src/theme/components/index.js +2 -2
  27. package/dist/umd/descope-enriched-text-index-js.js +0 -2
  28. package/dist/umd/descope-enriched-text-index-js.js.map +0 -1
  29. package/dist/umd/descope-link-index-js.js +0 -2
  30. package/dist/umd/descope-link-index-js.js.map +0 -1
  31. package/src/components/descope-enriched-text/EnrichedTextClass.js +0 -209
  32. package/src/components/descope-enriched-text/consts.js +0 -14
  33. package/src/components/descope-enriched-text/helpers.js +0 -5
  34. package/src/components/descope-enriched-text/index.js +0 -5
  35. package/src/components/descope-link/LinkClass.js +0 -76
  36. package/src/components/descope-link/index.js +0 -6
  37. package/src/theme/components/enrichedText.js +0 -40
  38. package/src/theme/components/link.js +0 -36
@@ -1,76 +0,0 @@
1
- import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
2
- import { createBaseClass } from '../../baseClasses/createBaseClass';
3
- import { TextClass } from '@descope-ui/descope-text/class';
4
- import { compose } from '../../helpers';
5
- import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
6
- import { injectStyle } from '@descope-ui/common/components-helpers';
7
-
8
- export const componentName = getComponentName('link');
9
-
10
- class RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {
11
- constructor() {
12
- super();
13
-
14
- this.attachShadow({ mode: 'open' }).innerHTML = `
15
- <div>
16
- <descope-text>
17
- <a>
18
- <slot></slot>
19
- </a>
20
- </descope-text>
21
- </div>
22
- `;
23
-
24
- injectStyle(
25
- `
26
- :host {
27
- display: inline-block;
28
- line-height: 1em;
29
- }
30
- :host a {
31
- display: inline;
32
- }
33
- `,
34
- this
35
- );
36
-
37
- forwardAttrs(this, this.shadowRoot.querySelector('a'), {
38
- includeAttrs: ['href', 'target', 'tooltip'],
39
- mapAttrs: {
40
- tooltip: 'title',
41
- },
42
- });
43
-
44
- forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {
45
- includeAttrs: ['mode', 'variant'],
46
- });
47
- }
48
- }
49
-
50
- const selectors = {
51
- host: { selector: () => ':host' },
52
- link: { selector: () => ':host a' },
53
- anchor: {},
54
- wrapper: { selector: () => ':host > div' },
55
- text: { selector: () => TextClass.componentName },
56
- };
57
-
58
- const { anchor, text, host, wrapper, link } = selectors;
59
-
60
- export const LinkClass = compose(
61
- createStyleMixin({
62
- mappings: {
63
- hostWidth: { ...host, property: 'width' },
64
- hostDirection: { ...text, property: 'direction' },
65
- textAlign: wrapper,
66
- textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },
67
- textColor: [
68
- { ...anchor, property: 'color' },
69
- { ...text, property: TextClass.cssVarList.textColor },
70
- ],
71
- cursor: anchor,
72
- },
73
- }),
74
- draggableMixin,
75
- componentNameValidationMixin
76
- )(RawLink);
@@ -1,6 +0,0 @@
1
- import { componentName, LinkClass } from './LinkClass';
2
- import '@descope-ui/descope-text';
3
-
4
- customElements.define(componentName, LinkClass);
5
-
6
- export { LinkClass, componentName };
@@ -1,40 +0,0 @@
1
- import globals from '../globals';
2
- import { getThemeRefs, useVar } from '../../helpers/themeHelpers';
3
- import { EnrichedTextClass } from '../../components/descope-enriched-text/EnrichedTextClass';
4
- import { vars as textCompVars } from '@descope-ui/descope-text/theme';
5
- import { vars as linkCompVars } from './link';
6
-
7
- const globalRefs = getThemeRefs(globals);
8
- const vars = EnrichedTextClass.cssVarList;
9
-
10
- const enrichedText = {
11
- [vars.hostDirection]: globalRefs.direction,
12
- [vars.hostWidth]: useVar(textCompVars.hostWidth),
13
-
14
- [vars.textLineHeight]: useVar(textCompVars.textLineHeight),
15
- [vars.textColor]: useVar(textCompVars.textColor),
16
- [vars.textAlign]: useVar(textCompVars.textAlign),
17
-
18
- [vars.fontSize]: useVar(textCompVars.fontSize),
19
- [vars.fontWeight]: useVar(textCompVars.fontWeight),
20
- [vars.fontFamily]: useVar(textCompVars.fontFamily),
21
-
22
- [vars.linkColor]: useVar(linkCompVars.textColor),
23
- [vars.linkTextDecoration]: 'none',
24
- [vars.linkHoverTextDecoration]: 'underline',
25
-
26
- [vars.fontWeightBold]: '900',
27
- [vars.minWidth]: '0.25em',
28
- [vars.minHeight]: '1.35em',
29
-
30
- [vars.hostDisplay]: 'inline-block',
31
-
32
- _empty: {
33
- _hideWhenEmpty: {
34
- [vars.hostDisplay]: 'none',
35
- },
36
- },
37
- };
38
-
39
- export default enrichedText;
40
- export { vars };
@@ -1,36 +0,0 @@
1
- import globals from '../globals';
2
- import { getThemeRefs } from '../../helpers/themeHelpers';
3
- import { LinkClass } from '../../components/descope-link/LinkClass';
4
-
5
- const globalRefs = getThemeRefs(globals);
6
- const vars = LinkClass.cssVarList;
7
-
8
- const link = {
9
- [vars.hostDirection]: globalRefs.direction,
10
- [vars.cursor]: 'pointer',
11
-
12
- [vars.textColor]: globalRefs.colors.primary.main,
13
-
14
- textAlign: {
15
- right: { [vars.textAlign]: 'right' },
16
- left: { [vars.textAlign]: 'left' },
17
- center: { [vars.textAlign]: 'center' },
18
- },
19
-
20
- _fullWidth: {
21
- [vars.hostWidth]: '100%',
22
- },
23
-
24
- _hover: {
25
- [vars.textDecoration]: 'underline',
26
- },
27
-
28
- mode: {
29
- secondary: {
30
- [vars.textColor]: globalRefs.colors.secondary.main,
31
- },
32
- },
33
- };
34
-
35
- export default link;
36
- export { vars };