@ebrains/react 0.9.3-beta → 1.0.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 (51) hide show
  1. package/README.md +3 -3
  2. package/{analytics-44b1416b.esm.js → analytics-d99780e3.esm.js} +2 -2
  3. package/color-primary-palette_6.entry.esm.js +106 -106
  4. package/components-section.entry.esm.js +22 -16
  5. package/correct-use-of-colors.entry.esm.js +33 -33
  6. package/docs-palettes.entry.esm.js +1 -1
  7. package/docs-tokens.entry.esm.js +1 -1
  8. package/eds-accordion.entry.esm.js +2 -2
  9. package/eds-alert.entry.esm.js +1 -1
  10. package/eds-app-root.entry.esm.js +4 -4
  11. package/eds-avatar_34.entry.esm.js +3594 -0
  12. package/eds-card-project.entry.esm.js +130 -13
  13. package/eds-card-tool.entry.esm.js +5 -5
  14. package/eds-cookies-preference.entry.esm.js +2 -2
  15. package/eds-feedback.entry.esm.js +12 -7
  16. package/eds-frame.entry.esm.js +6 -6
  17. package/eds-matomo-notice.entry.esm.js +5 -8
  18. package/eds-pagination_2.entry.esm.js +10 -10
  19. package/eds-progress-bar.entry.esm.js +19 -8
  20. package/eds-rating.entry.esm.js +1 -1
  21. package/eds-section-core_2.entry.esm.js +5 -5
  22. package/eds-spinner.entry.esm.js +3 -3
  23. package/eds-splash-screen.entry.esm.js +87 -0
  24. package/eds-switch.entry.esm.js +21 -11
  25. package/eds-timeline.entry.esm.js +5 -5
  26. package/eds-toast-manager.entry.esm.js +33 -2
  27. package/eds-toast.entry.esm.js +4 -3
  28. package/eds-trl.entry.esm.js +2 -2
  29. package/incorrect-use-of-colors.entry.esm.js +11 -8
  30. package/index.esm.js +1 -1
  31. package/index.esm2.js +39 -314
  32. package/logo-space.entry.esm.js +9 -9
  33. package/logo-variations-horizontal_2.entry.esm.js +28 -28
  34. package/logo-variations-tabs.entry.esm.js +1 -1
  35. package/logo-wrong-usage.entry.esm.js +25 -25
  36. package/package.json +1 -1
  37. package/src/components.d.ts +2 -2
  38. package/src/generated/components.d.ts +1 -1
  39. package/svg-repository.entry.esm.js +2 -2
  40. package/token-list_3.entry.esm.js +5 -5
  41. package/token-ratios.entry.esm.js +3 -3
  42. package/token-typography.entry.esm.js +2 -2
  43. package/color-2554aad6.esm.js +0 -122
  44. package/eds-avatar_27.entry.esm.js +0 -332
  45. package/eds-card-desc_2.entry.esm.js +0 -86
  46. package/eds-card-generic.entry.esm.js +0 -114
  47. package/eds-card-wrapper.entry.esm.js +0 -39
  48. package/eds-login_2.entry.esm.js +0 -1828
  49. package/eds-tabs.entry.esm.js +0 -143
  50. package/eds-tooltip.entry.esm.js +0 -125
  51. package/toastManager-d9eee791.esm.js +0 -34
@@ -1,20 +1,27 @@
1
- import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
2
+ import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
2
3
  import 'react';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react-dom';
5
6
 
6
- const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-size:14px;margin:0 8px}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}";
7
+ const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}";
7
8
  const EdsSwitchStyle0 = edsSwitchCss;
8
9
  const EdsSwitch = class {
9
10
  constructor(hostRef) {
10
11
  registerInstance(this, hostRef);
11
- this.toggle = createEvent(this, "toggle", 7);
12
+ this.uiswitch = createEvent(this, "uiswitch", 7);
12
13
  this.toggleSwitch = () => {
13
14
  if (this.disabled) {
14
15
  return;
15
16
  }
16
17
  this.checked = !this.checked;
17
- this.toggle.emit(this.checked);
18
+ this.uiswitch.emit(this.checked);
19
+ sendAnalytics({
20
+ category: 'ui-component',
21
+ tag: this.el.tagName.toLowerCase(),
22
+ name: this.checked ? this.labelOn : this.labelOff || '',
23
+ action: 'checked'
24
+ });
18
25
  };
19
26
  this.checked = false;
20
27
  this.disabled = false;
@@ -25,13 +32,13 @@ const EdsSwitch = class {
25
32
  // Compute an accessible name based on state.
26
33
  const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
27
34
  return h("div", {
28
- key: 'ef70db7a5ed4f8e8db7e1a9e94334a3686ec1d0e',
35
+ key: '442876be1bad7ea8c9e383bc68b192a2744c38f9',
29
36
  class: "switch-container"
30
37
  }, this.labelOff && h("span", {
31
- key: '4a18de129ba0b4e643a0929b6fc797b7bc35cb4c',
32
- class: "switch-label switch-label--off"
38
+ key: 'e4a7b01c0188d26e5b6524741b1c8ef66e357e35',
39
+ class: "switch-label switch-label--off mr-8"
33
40
  }, this.labelOff), h("button", {
34
- key: '2d75656fadf36a38269d361fef176e243e1291c2',
41
+ key: 'f56b3762622671acf793568a96567193c38999c7',
35
42
  type: "button",
36
43
  role: "switch",
37
44
  "aria-checked": this.checked ? 'true' : 'false',
@@ -45,13 +52,16 @@ const EdsSwitch = class {
45
52
  onClick: this.toggleSwitch,
46
53
  disabled: this.disabled
47
54
  }, h("span", {
48
- key: '71bd3c8c042ac337c1392977c27e8f4ccde5e79f',
55
+ key: 'b76e89a1e37130542dd86ce3aed8c5690aeeda63',
49
56
  class: "switch-handle"
50
57
  })), this.labelOn && h("span", {
51
- key: '7cfa0b1f805271c9281853a872cedf93db7e07d8',
52
- class: "switch-label switch-label--on"
58
+ key: '4e5d4f8a2f19bb612a17fa73e441e7e718b71508',
59
+ class: "switch-label switch-label--on ml-8"
53
60
  }, this.labelOn));
54
61
  }
62
+ get el() {
63
+ return getElement(this);
64
+ }
55
65
  };
56
66
  EdsSwitch.style = EdsSwitchStyle0;
57
67