@ebrains/react 1.0.0 → 1.1.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 (59) hide show
  1. package/components-section.entry.esm.js +1 -1
  2. package/eds-accordion.entry.esm.js +9 -9
  3. package/eds-alert.entry.esm.js +2 -2
  4. package/{eds-avatar_34.entry.esm.js → eds-avatar_28.entry.esm.js} +676 -747
  5. package/eds-breadcrumb.entry.esm.js +179 -0
  6. package/eds-card-desc_2.entry.esm.js +85 -0
  7. package/eds-card-generic.entry.esm.js +114 -0
  8. package/eds-card-project.entry.esm.js +10 -10
  9. package/eds-card-tags.entry.esm.js +1 -1
  10. package/eds-card-tool.entry.esm.js +4 -4
  11. package/eds-code-block.entry.esm.js +7 -7
  12. package/eds-gauge.entry.esm.js +78 -0
  13. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  14. package/eds-icon-arrow-right.entry.esm.js +1 -1
  15. package/eds-icon-bluesky.entry.esm.js +1 -1
  16. package/eds-icon-bookmark.entry.esm.js +1 -1
  17. package/eds-icon-chevron-down.entry.esm.js +1 -1
  18. package/eds-icon-chevron-left.entry.esm.js +1 -1
  19. package/eds-icon-chevron-right.entry.esm.js +1 -1
  20. package/eds-icon-chevron-up.entry.esm.js +1 -1
  21. package/eds-icon-close.entry.esm.js +1 -1
  22. package/eds-icon-copy.entry.esm.js +1 -1
  23. package/eds-icon-eu.entry.esm.js +1 -1
  24. package/eds-icon-external.entry.esm.js +1 -1
  25. package/eds-icon-facebook.entry.esm.js +1 -1
  26. package/eds-icon-gitlab.entry.esm.js +1 -1
  27. package/eds-icon-linkedin.entry.esm.js +1 -1
  28. package/eds-icon-loader.entry.esm.js +1 -1
  29. package/eds-icon-mastodon.entry.esm.js +1 -1
  30. package/eds-icon-menu.entry.esm.js +1 -1
  31. package/eds-icon-minus.entry.esm.js +1 -1
  32. package/eds-icon-more.entry.esm.js +1 -1
  33. package/eds-icon-paper.entry.esm.js +1 -1
  34. package/eds-icon-plus.entry.esm.js +1 -1
  35. package/eds-icon-portal.entry.esm.js +1 -1
  36. package/eds-icon-private.entry.esm.js +1 -1
  37. package/eds-icon-public.entry.esm.js +1 -1
  38. package/eds-icon-search.entry.esm.js +1 -1
  39. package/eds-icon-star.entry.esm.js +1 -1
  40. package/eds-icon-success.entry.esm.js +1 -1
  41. package/eds-icon-thumbs-down.entry.esm.js +1 -1
  42. package/eds-icon-thumbs-up.entry.esm.js +1 -1
  43. package/eds-icon-tutorial.entry.esm.js +1 -1
  44. package/eds-icon-twitter.entry.esm.js +1 -1
  45. package/eds-icon-unknown.entry.esm.js +1 -1
  46. package/eds-icon-updown.entry.esm.js +1 -1
  47. package/eds-icon-user.entry.esm.js +1 -1
  48. package/eds-icon-youtube.entry.esm.js +1 -1
  49. package/eds-pie.entry.esm.js +131 -0
  50. package/eds-progress-bar.entry.esm.js +4 -4
  51. package/eds-rating.entry.esm.js +1 -1
  52. package/eds-section-core_2.entry.esm.js +5 -5
  53. package/eds-spinner.entry.esm.js +3 -3
  54. package/eds-switch.entry.esm.js +5 -5
  55. package/eds-tooltip.entry.esm.js +41 -0
  56. package/index.esm2.js +23 -5
  57. package/package.json +1 -1
  58. package/token-spacing.entry.esm.js +93 -0
  59. package/eds-pagination_2.entry.esm.js +0 -493
@@ -11,7 +11,7 @@ const EdsIconChevronUp = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'cc552d780188b225d16fd18ec33a22b0fbbd9660',
14
+ key: '40d18a840277f2aba5d314a36fca5c1f8fd99cc6',
15
15
  class: this.class,
16
16
  innerHTML: chevronUp
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconClose = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '907eaa5d70add8ad62e9f071aacce359682969fe',
14
+ key: '8e4dedef0fe684fdd6078db8005661e49207da55',
15
15
  class: this.class,
16
16
  innerHTML: close
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconCopy = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'e31c2cd317654999670526469111fff23f66a6b4',
14
+ key: 'ff014a9761d8380a9fd8c97d3dd483b8d6fc786c',
15
15
  class: this.class,
16
16
  innerHTML: copy
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconEu = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '94c3dbf77824b2e51627b8e2a2de9b7cfb1f24e0',
14
+ key: '3888f0338df2496c334d95dbcb52a0e39906362d',
15
15
  class: this.class,
16
16
  innerHTML: euSvg
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconExternal = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '099d0118c7a4bfa2d8b5c21f45162080b31a2f7c',
14
+ key: '58d51f84a7b6326ef117a905f2c50d4fff6369c5',
15
15
  class: this.class,
16
16
  innerHTML: arrowDiagonal
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconFacebook = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '72eb0709ccbfc7830ab146f936a2587407feb0bb',
14
+ key: '3ea80799436c93b1c02ad177bd48910409aebf51',
15
15
  class: this.class,
16
16
  innerHTML: facebook
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconGitlab = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '280eb778fd7028ef60305eee614213f8a39a35f2',
14
+ key: 'a2f423ed9227463e27c0c698e6b4bba44cdc6263',
15
15
  class: this.class,
16
16
  innerHTML: gitlabBlack
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconLinkedin = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '5388b5cef5d643984157e0bed9263e83934dc7e3',
14
+ key: '88852ca054a7e637efc7fe5b01f343a9b1798e41',
15
15
  class: this.class,
16
16
  innerHTML: linkedin
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconLoader = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '808ce738f7812024a52b4875ae3d9070bc75c02d',
14
+ key: '283c8842f0f755074521fdcbae46969d87b86312',
15
15
  class: this.class,
16
16
  innerHTML: loader
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconMastodon = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'b998a568e6f0f7811a4984817177c76842127298',
14
+ key: '5a5a90094c1f974dc7932654e97de04975e675bb',
15
15
  class: this.class,
16
16
  innerHTML: mastodon
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconMenu = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'f9dcfa2e4c9cc938f3fd994ca3637c80f0495028',
14
+ key: 'dc06f1a54b9542cb2c0165fb3bdff960ecd81cc0',
15
15
  class: this.class,
16
16
  innerHTML: menu
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconMinus = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '76fe78207051b486030fc1ef778d55ecfec2c3d2',
14
+ key: 'e76f56aaba4a67096e6314e61d53bc2512941552',
15
15
  class: this.class,
16
16
  innerHTML: minus
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconMore = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '546f5d7c76d57c07c34b6455cb1df4fea6c57302',
14
+ key: 'cb31d12146ff577195650b502f51005092404a30',
15
15
  class: this.class,
16
16
  innerHTML: more
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconPaper = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'e9baa8e9d467104fdeac600678b800787ef7d736',
14
+ key: 'abc728a23571f7cc24f6d9d1dc5c72c397983aa3',
15
15
  class: this.class,
16
16
  innerHTML: paper
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconPlus = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '7510fb2b948a83c216a375f2a84a16b10b38054e',
14
+ key: '35d8e069fbb1bdb01ae6f068c28edd19d299c7c3',
15
15
  class: this.class,
16
16
  innerHTML: plus
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconPortal = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'c9f384bf790dd2eef9b84e757403106209f05c04',
14
+ key: '9383784da3e52d22395288f8eba5b6f4ee826aa5',
15
15
  class: this.class,
16
16
  innerHTML: portal
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconPrivate = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'd03d51d5aee837edab83aa71cf82fd415a8c71c3',
14
+ key: '9466d1ce37e58f512579d63ec5049cc58e8b9836',
15
15
  class: this.class,
16
16
  innerHTML: privat
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconPublic = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '94970e6d7f414cde04a3dae305f3dda43f477e55',
14
+ key: 'e4815b72c160ae98d66dbfa877f82f1d2f7c50b3',
15
15
  class: this.class,
16
16
  innerHTML: pub
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconSearch = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '2c35a35b31a988ffa690816a8699d2aac43dd916',
14
+ key: '6a35ea0c0de4916a867f760eb058a3cbb1bc218e',
15
15
  class: this.class,
16
16
  innerHTML: search
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconStar = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'dc06f1a54b9542cb2c0165fb3bdff960ecd81cc0',
14
+ key: 'f7ebc68658fcf8c0df627871481cce90cd7800fb',
15
15
  class: this.class,
16
16
  innerHTML: star
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconSuccess = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '8b5d4cfeedf6d7e9bea48d7ba892527d484c858d',
14
+ key: 'd78b06493302958306d408d823f4a7703d9b9adc',
15
15
  class: this.class,
16
16
  innerHTML: success
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconThumbsDown = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'c60c3e5180cd900ce290448563fc476264ba1fe5',
14
+ key: '84e6d8cff80004a650c6d0fc6b9702cf1ca85ba2',
15
15
  class: this.class,
16
16
  innerHTML: thumbsDown
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconThumbsUp = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'eee2fdd0cdf1e9735e90f34c6bb090f3df67eb49',
14
+ key: '5f5198ad92684dc173d603499b485e7d0ca8811b',
15
15
  class: this.class,
16
16
  innerHTML: thumbsUp
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconTutorial = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '0e47e2af80487a28c96e8830dda102c23bff9e5c',
14
+ key: '8be08569144889cca6f801cdd31e4cc31fdc11e5',
15
15
  class: this.class,
16
16
  innerHTML: tutorial
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconTwitter = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '1a7ad8d7cbef70822ebda2f152d8b537df1eaf27',
14
+ key: 'c2ee643b5da517a53bd97ec6263161927ad229a7',
15
15
  class: this.class,
16
16
  innerHTML: twitter
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconUnknown = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'a9145c4e133746c314a1ee34d36a5f19f3686565',
14
+ key: '449cd62f697607ebb17bed06835ee9529d7e8999',
15
15
  class: this.class,
16
16
  innerHTML: unknown
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconUpdown = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'b97da1b406718c7611d1e17d7a9c6b4670600740',
14
+ key: '5b0e914205c9f3fb5e216e0ccb16e350a4449c02',
15
15
  class: this.class,
16
16
  innerHTML: upDonw
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconUser = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '4322703c9e449819dc30946118893d365fa20124',
14
+ key: '297e73664320032b2f78dd3c43aa0852545c0723',
15
15
  class: this.class,
16
16
  innerHTML: user
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconYoutube = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '2236f8f5ede15d7eef54f2fd4fe6ca81c996166f',
14
+ key: '0a6abd6b62e24c07b4338f0f1f6febbec876791f',
15
15
  class: this.class,
16
16
  innerHTML: youtube
17
17
  });
@@ -0,0 +1,131 @@
1
+ import { r as registerInstance, h, H as Host } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ const edsPieCss = ".relative{position:relative}.absolute{position:absolute}.inline-block{display:inline-block}.rounded-full{border-radius:9999px}.overflow-hidden{overflow:hidden}.bg-inverse{background-color:var(--white)}.bg-current{background-color:currentColor}.bg-dark{background-color:var(--grey-300)}.bg-darker{background-color:var(--grey-400)}.bg-default{background-color:var(--grey-200)}.bg-strong{background-color:var(--grey-700)}.bg-strongest{background-color:var(--black)}.inset-0{inset:0rem}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.text-default{color:var(--black)}.w-8{width:0.5rem}.h-8{height:0.5rem}.mr-4{margin-right:0.25rem}:host{display:block}.wrapper{display:flex;align-items:center;justify-content:center;height:100%}.pie-chart{overflow:visible}.slice-label{font-size:var(--font-size-chart-label);font-weight:var(--font-weight-chart-label);fill:var(--color-text);pointer-events:none}.legend{list-style:none;margin:0;padding:0 0 0 1rem}.legend-item{display:flex;align-items:center;margin-bottom:0.5rem;outline:none}.legend-item:focus{outline:2px dashed var(--color-primary)}.legend-swatch{width:1rem;height:1rem;border-radius:50%;margin-right:0.5rem}.legend-label{font-size:var(--font-size-base);color:var(--color-text)}";
7
+ const EdsPieStyle0 = edsPieCss;
8
+ const EdsPie = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.size = 200;
12
+ this.slices = [];
13
+ this.thickness = 1;
14
+ this.display = 'value';
15
+ this.legend = true;
16
+ this.colorScheme = 'semantic';
17
+ }
18
+ parseSlices() {
19
+ if (typeof this.slices === 'string') {
20
+ try {
21
+ return JSON.parse(this.slices);
22
+ } catch (_a) {
23
+ // eslint-disable-next-line
24
+ console.warn('eds-pie: invalid slices JSON');
25
+ }
26
+ }
27
+ return Array.isArray(this.slices) ? this.slices : [];
28
+ }
29
+ polarToCartesian(cx, cy, r, angle) {
30
+ const rad = (angle - 90) * (Math.PI / 180);
31
+ return {
32
+ x: cx + r * Math.cos(rad),
33
+ y: cy + r * Math.sin(rad)
34
+ };
35
+ }
36
+ describeArc(x, y, r, startAngle, endAngle) {
37
+ const start = this.polarToCartesian(x, y, r, endAngle);
38
+ const end = this.polarToCartesian(x, y, r, startAngle);
39
+ const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
40
+ return [`M ${start.x} ${start.y}`, `A ${r} ${r} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`, `L ${x} ${y}`, 'Z'].join(' ');
41
+ }
42
+ render() {
43
+ const raw = this.parseSlices();
44
+ if (raw.length > EdsPie.MAX_SLICES) {
45
+ // eslint-disable-next-line
46
+ console.warn(`eds-pie: too many slices (${raw.length}), results may overlap.`);
47
+ }
48
+ const total = raw.reduce((sum, s) => sum + s.value, 0) || 1;
49
+ const palette = [...EdsPie.PALETTES[this.colorScheme]];
50
+ const sorted = [...raw].sort((a, b) => b.value - a.value);
51
+ let cumulative = 0;
52
+ const processed = sorted.map(s => {
53
+ const angle = s.value / total * 360;
54
+ const start = cumulative,
55
+ end = cumulative + angle;
56
+ cumulative = end;
57
+ const color = s.color || palette.shift() || 'var(--color-chart-neutral-1)';
58
+ return Object.assign(Object.assign({}, s), {
59
+ start,
60
+ end,
61
+ color
62
+ });
63
+ });
64
+ const diameter = this.size;
65
+ const radius = diameter / 2;
66
+ // clamp into [0.5, 1]
67
+ const tClamped = Math.min(Math.max(this.thickness, 0.5), 1);
68
+ const innerRadius = radius * (1 - tClamped);
69
+ const outerRadius = radius;
70
+ // **replace** the previous labelRadius line with this:
71
+ const labelRadius = (radius + innerRadius) / 2;
72
+ // Build ARIA description
73
+ const ariaLabel = processed.map(s => `${s.label}: ${this.display === 'percent' ? `${Math.round(s.value / total * 100)}%` : s.value}`).join(', ');
74
+ return h(Host, null, h("div", {
75
+ class: "wrapper"
76
+ }, h("svg", {
77
+ width: diameter,
78
+ height: diameter,
79
+ role: "img",
80
+ "aria-label": `Pie chart: ${ariaLabel}`,
81
+ class: "pie-chart"
82
+ }, h("title", null, "Pie chart"), h("g", null, processed.map(s => h("path", {
83
+ key: s.id,
84
+ d: this.describeArc(radius, radius, outerRadius, s.start, s.end),
85
+ fill: s.color
86
+ })), innerRadius > 0 && h("circle", {
87
+ cx: radius,
88
+ cy: radius,
89
+ r: innerRadius,
90
+ fill: "var(--white)"
91
+ }), processed.map(s => {
92
+ const midAngle = s.start + (s.end - s.start) / 2;
93
+ const {
94
+ x,
95
+ y
96
+ } = this.polarToCartesian(radius, radius, labelRadius, midAngle);
97
+ const text = this.display === 'percent' ? `${Math.round(s.value / total * 100)}%` : String(s.value);
98
+ return h("text", {
99
+ key: s.id,
100
+ x: x,
101
+ y: y,
102
+ class: "f-ui-02",
103
+ "text-anchor": "middle",
104
+ "alignment-baseline": "middle"
105
+ }, text);
106
+ }))), this.legend && h("ul", {
107
+ class: "legend",
108
+ role: "list"
109
+ }, processed.map(s => h("li", {
110
+ key: s.id,
111
+ role: "listitem",
112
+ tabindex: "0",
113
+ class: "legend-item"
114
+ }, h("span", {
115
+ class: "legend-swatch",
116
+ style: {
117
+ backgroundColor: s.color
118
+ }
119
+ }), h("span", {
120
+ class: "legend-label"
121
+ }, s.label))))));
122
+ }
123
+ };
124
+ EdsPie.MAX_SLICES = 9;
125
+ EdsPie.PALETTES = {
126
+ semantic: ['var(--color-chart-accent)', 'var(--color-chart-strong)', 'var(--color-chart-accent-dark)', 'var(--color-chart-lighter)', 'var(--color-chart-accent-light)', 'var(--color-chart-lightest)', 'var(--color-chart-accent-lighter)', 'var(--color-chart-darker)', 'var(--color-chart-accent-lightest)'],
127
+ mono: ['var(--grey-700)', 'var(--grey-500)', 'var(--grey-300)', 'var(--grey-100)', 'var(--grey-800)', 'var(--grey-600)', 'var(--grey-400)', 'var(--grey-200)', 'var(--grey-900)']
128
+ };
129
+ EdsPie.style = EdsPieStyle0;
130
+
131
+ export { EdsPie as eds_pie };
@@ -25,7 +25,7 @@ const EdsProgressBar = class {
25
25
  // Fill bar classes (conditionally rounded only when >0)
26
26
  const fillClasses = ['inner', 'h-full', 'transition-all', 'duration-300', 'bg-accent', progressValue > 0 && this.rounded ? 'rounded-lg' : '', 'z-0'].filter(Boolean).join(' ');
27
27
  return h("div", {
28
- key: '8760afff9f85f05fec52b0a7fb668661e49dc06f',
28
+ key: '3360c1a9e61c83fee5312d007f6d2965a8983eba',
29
29
  role: "progressbar",
30
30
  "aria-valuemin": "0",
31
31
  "aria-valuemax": "100",
@@ -33,16 +33,16 @@ const EdsProgressBar = class {
33
33
  "aria-valuetext": `${progressValue}%`,
34
34
  class: outerClasses
35
35
  }, h("div", {
36
- key: '06165b69fe7e170f4f61d9f95b5a44342d4ee67a',
36
+ key: '7210dc5931f08626b286c30ae790a3a864533632',
37
37
  class: fillClasses,
38
38
  style: {
39
39
  width: `${progressValue}%`
40
40
  }
41
41
  }), h("div", {
42
- key: '0c48e65c5a6cb0b4dff7a7e3e248052cdc29957d',
42
+ key: '7586cd593b4e851f4605ad33b96781841ee0b1aa',
43
43
  class: "absolute inset-0 flex items-center justify-center pointer-events-none z-10"
44
44
  }, h("span", {
45
- key: 'fc6f7396cf741ba18d1b5d065bdd1b7bfff12abe',
45
+ key: '21fa3de543e5e717ed4fd76c689aa47c3fa6a853',
46
46
  class: "text-default f-body-02"
47
47
  }, progressValue, "%")));
48
48
  }
@@ -48,7 +48,7 @@ const EdsRating = class {
48
48
  }
49
49
  render() {
50
50
  return h("div", {
51
- key: '685ac01e4db577b07d00030b0c25e10b9b0defa8',
51
+ key: '6686575f0b8b9017bf19b105208f6adbfd46dabd',
52
52
  role: "radiogroup",
53
53
  class: "stars flex space-x-1 my-8"
54
54
  }, Array.from({
@@ -15,13 +15,13 @@ const EdsSectionCore = class {
15
15
  render() {
16
16
  const TagType = this.tag; // Set dynamic tag type (div or section)
17
17
  return h(TagType, {
18
- key: 'ff0b28dffb8aca2ad0ac1ee3eea7ebda75078f96'
18
+ key: '43f8d599041ae0c9761988fdec4872ec4a8ca037'
19
19
  }, h("eds-section-heading", {
20
- key: '23e9bb2b084c6b8a534dd310fbe10e0de0211187',
20
+ key: 'd120ddd851a0485e2edb43e2a6f508a661f35c07',
21
21
  headingLevel: this.headingLevel,
22
22
  sectionTitle: this.sectionTitle
23
23
  }), h("slot", {
24
- key: '9cae6378bdb5304191d393967025570f94fdcdb2'
24
+ key: '9818b82a3eebcb741f5bccc9781e4212f2c5fa3d'
25
25
  }));
26
26
  }
27
27
  };
@@ -52,7 +52,7 @@ const EdsSectionHeading = class {
52
52
  const TagType = this.tag; // Dynamically set tag type for the container
53
53
  const HeadingTag = this.headingLevel; // Dynamically set heading level
54
54
  return h(TagType, {
55
- key: 'bb32f87fd944ebf08ebcde3980c18cd4bed18783',
55
+ key: '740ed8b3208e07091a1f4c79888e172dec33773a',
56
56
  class: {
57
57
  'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
58
58
  container: this.withContainer,
@@ -60,7 +60,7 @@ const EdsSectionHeading = class {
60
60
  'pt-28': !this.spacingLarge
61
61
  }
62
62
  }, h(HeadingTag, {
63
- key: '0cd8ea8aada58e30675579c82ba130b40257c7c6',
63
+ key: '4d4ceef35b7cb06bfbff2fdae47e66dd7ac10c49',
64
64
  class: this.getHeadingClass()
65
65
  }, this.sectionTitle));
66
66
  }
@@ -50,13 +50,13 @@ const EdsSpinner = class {
50
50
  justifyContent: 'center'
51
51
  };
52
52
  return h(Host, {
53
- key: '214876a56949c147e74c1a7072406234c2fb1a02'
53
+ key: 'f687ccbbb05840b7699202f3758ec4a8d0de1bc4'
54
54
  }, h("div", {
55
- key: 'b75b639fa38aafaf13e1eb727e28c5e67f3edafe',
55
+ key: '4bb5c697f1ccd90d2d65d519fcfb3ec809b106ac',
56
56
  class: "spinner-overlay",
57
57
  style: overlayStyle
58
58
  }, h("span", {
59
- key: '87ba2ef7e1e9601ac0ae8132e9c891b4149a20b5',
59
+ key: 'a07722d9ee9c94d03d9766a4b297a498998c00be',
60
60
  class: "spinner",
61
61
  style: spinnerStyle
62
62
  })));
@@ -32,13 +32,13 @@ const EdsSwitch = class {
32
32
  // Compute an accessible name based on state.
33
33
  const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
34
34
  return h("div", {
35
- key: '442876be1bad7ea8c9e383bc68b192a2744c38f9',
35
+ key: '385c1463b11e83ff5b982218e0f28c54299210fd',
36
36
  class: "switch-container"
37
37
  }, this.labelOff && h("span", {
38
- key: 'e4a7b01c0188d26e5b6524741b1c8ef66e357e35',
38
+ key: 'f7e825a34487a1cec466b5172d77c2802029607c',
39
39
  class: "switch-label switch-label--off mr-8"
40
40
  }, this.labelOff), h("button", {
41
- key: 'f56b3762622671acf793568a96567193c38999c7',
41
+ key: 'fd1e8ffab675ee79edc6b99de4dfff42545d91af',
42
42
  type: "button",
43
43
  role: "switch",
44
44
  "aria-checked": this.checked ? 'true' : 'false',
@@ -52,10 +52,10 @@ const EdsSwitch = class {
52
52
  onClick: this.toggleSwitch,
53
53
  disabled: this.disabled
54
54
  }, h("span", {
55
- key: 'b76e89a1e37130542dd86ce3aed8c5690aeeda63',
55
+ key: '0d185957ffe2577ffc8798c298820c84c838a2a4',
56
56
  class: "switch-handle"
57
57
  })), this.labelOn && h("span", {
58
- key: '4e5d4f8a2f19bb612a17fa73e441e7e718b71508',
58
+ key: 'f12b752ff94a363bb9593bd00cf43e7110e4399e',
59
59
  class: "switch-label switch-label--on ml-8"
60
60
  }, this.labelOn));
61
61
  }
@@ -0,0 +1,41 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
3
+ import 'react';
4
+ import 'react/jsx-runtime';
5
+ import 'react-dom';
6
+
7
+ const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.inline-block{display:inline-block}.rounded-xs{border-radius:4px}.bg-strongest{background-color:var(--black)}.text-inverse{color:var(--white)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.pointer-events-none{pointer-events:none}.left-1\\/2{left:50%}.z-10{z-index:10}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.whitespace-nowrap{white-space:nowrap}.p-6{padding:0.375rem}.bottom-full{bottom:100%}.mb-2{margin-bottom:0.125rem}.opacity-0{opacity:0}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-150{transition-duration:150ms}.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.group:hover .group-hover\\:opacity-100{opacity:1}";
8
+ const EdsTooltipStyle0 = edsTooltipCss;
9
+ const EdsTooltip = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.content = undefined;
13
+ }
14
+ /** fire analytics on every hover */
15
+ handleHover() {
16
+ sendAnalytics({
17
+ category: 'ui-component',
18
+ tag: this.el.tagName.toLowerCase(),
19
+ name: this.content.toLowerCase(),
20
+ action: 'hover'
21
+ });
22
+ }
23
+ render() {
24
+ return h("div", {
25
+ key: 'cf17cd61cd5888d6ea12bf6be0fb8c841072b4d6',
26
+ class: "relative inline-block group"
27
+ }, h("slot", {
28
+ key: '7a41d90940fff4e8b887ec4a3240371466f219a5'
29
+ }), h("div", {
30
+ key: 'ccf06592f4c977030b0cf54cce48d13889c059f3',
31
+ class: "absolute bottom-full left-1/2 \n transform -translate-x-1/2 mb-2\n rounded-xs bg-strongest text-inverse \n f-ui-03-light pointer-events-none \n z-10 whitespace-nowrap p-6 opacity-0 transition-opacity duration-150 ease-in-out\n group-hover:opacity-100",
32
+ role: "tooltip"
33
+ }, this.content));
34
+ }
35
+ get el() {
36
+ return getElement(this);
37
+ }
38
+ };
39
+ EdsTooltip.style = EdsTooltipStyle0;
40
+
41
+ export { EdsTooltip as eds_tooltip };