@amboss/design-system 1.0.6 → 1.0.10

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/CHANGELOG.md CHANGED
@@ -1,3 +1,90 @@
1
+ # v1.0.10 (Tue Feb 15 2022)
2
+
3
+ ### Release Notes
4
+
5
+ #### Add CacheProvider and createCache as exports ([#421](https://github.com/amboss-mededu/amboss-design-system/pull/421))
6
+
7
+ Enable emotional DS components to work in the shadow-dom.
8
+ https://github.com/emotion-js/emotion/issues/1366
9
+ https://emotion.sh/docs/cache-provider
10
+ https://stackblitz.com/edit/emotion-shadow-dom-example?file=ShadowDomContainer.js
11
+ https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule
12
+
13
+ ---
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Add CacheProvider and createCache as exports [#421](https://github.com/amboss-mededu/amboss-design-system/pull/421) ([@AlexJeffcott](https://github.com/AlexJeffcott))
18
+
19
+ #### Authors: 1
20
+
21
+ - Alex ([@AlexJeffcott](https://github.com/AlexJeffcott))
22
+
23
+ ---
24
+
25
+ # v1.0.9 (Fri Feb 11 2022)
26
+
27
+ ### Release Notes
28
+
29
+ #### [LEAR-1458] add highlighted state and alignItems to Toggle ([#415](https://github.com/amboss-mededu/amboss-design-system/pull/415))
30
+
31
+ - Adds highlight state for Toggle
32
+ - Adds alignItems to Toggle
33
+ - Fixes cursor for Disabled Toggle (default instead of pointer)
34
+
35
+ ---
36
+
37
+ #### 🐛 Bug Fix
38
+
39
+ - [LEAR-1458] add highlighted state and alignItems to Toggle [#415](https://github.com/amboss-mededu/amboss-design-system/pull/415) ([@smooth-opperator](https://github.com/smooth-opperator))
40
+
41
+ #### Authors: 1
42
+
43
+ - Julie Oppermann ([@smooth-opperator](https://github.com/smooth-opperator))
44
+
45
+ ---
46
+
47
+ # v1.0.8 (Wed Jan 05 2022)
48
+
49
+ ### Release Notes
50
+
51
+ #### add font-weight 900 (black) text ([#410](https://github.com/amboss-mededu/amboss-design-system/pull/410))
52
+
53
+ adds font-weight: 900 ("black") version for Text component
54
+
55
+ ---
56
+
57
+ #### 🐛 Bug Fix
58
+
59
+ - add font-weight 900 (black) text [#410](https://github.com/amboss-mededu/amboss-design-system/pull/410) ([@smooth-opperator](https://github.com/smooth-opperator))
60
+
61
+ #### Authors: 1
62
+
63
+ - Julie Oppermann ([@smooth-opperator](https://github.com/smooth-opperator))
64
+
65
+ ---
66
+
67
+ # v1.0.7 (Thu Dec 23 2021)
68
+
69
+ ### Release Notes
70
+
71
+ #### [LEAR-2295] adjust progress bar colors ([#409](https://github.com/amboss-mededu/amboss-design-system/pull/409))
72
+
73
+ (Re)Updates the colors for the SegmentedProgressBar for accessibility
74
+ Lightens the green further, uses lighter version of red for SegmentedProgressBar
75
+
76
+ ---
77
+
78
+ #### 🐛 Bug Fix
79
+
80
+ - [LEAR-2295] adjust progress bar colors [#409](https://github.com/amboss-mededu/amboss-design-system/pull/409) ([@smooth-opperator](https://github.com/smooth-opperator))
81
+
82
+ #### Authors: 1
83
+
84
+ - Julie Oppermann ([@smooth-opperator](https://github.com/smooth-opperator))
85
+
86
+ ---
87
+
1
88
  # v1.0.6 (Thu Dec 23 2021)
2
89
 
3
90
  ### Release Notes
package/README.md CHANGED
@@ -255,3 +255,33 @@ export const Box = styled.div<BoxProps>(
255
255
  );
256
256
  ```
257
257
 
258
+ ## Shadow-DOM
259
+ In order to use emotion-enabled DS components in the shadow-dom, you need to take some steps to 'link' the styles in the light-dom (these are added by emotion using CSSStyleSheet.insertRule() which is why <style data-emotion> appears empty in the DOM).
260
+
261
+ emotion-js/emotion#1366
262
+ https://emotion.sh/docs/cache-provider
263
+ https://stackblitz.com/edit/emotion-shadow-dom-example?file=ShadowDomContainer.js
264
+ https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule
265
+
266
+ ```js
267
+ import { ThemeProvider, light, Card, H1, CacheProvider, createCache } from '@amboss/design-system';
268
+ class SuchShadow extends HTMLElement {
269
+ connectedCallback() {
270
+ const root = document.createElement('div');
271
+ this.attachShadow({ mode: 'open' });
272
+ this.emotionCache = createCache({ container: this.shadowRoot });
273
+ render(
274
+ <ThemeProvider theme={light}>
275
+ <CacheProvider value={this.emotionCache}>
276
+ <Card>
277
+ <H1>I love you shadow unicorn!!!</H1>
278
+ </Card>
279
+ </CacheProvider>
280
+ </ThemeProvider>,
281
+ root
282
+ );
283
+ }
284
+ }
285
+
286
+ customElements.define('shadow-element', SuchShadow);
287
+ ```
@@ -232,6 +232,7 @@ declare type AmbossTheme = {
232
232
  "toggle": {
233
233
  "default": string;
234
234
  "checked": string;
235
+ "highlighted": string;
235
236
  };
236
237
  "togglePoint": {
237
238
  "default": string;
@@ -371,6 +372,7 @@ declare type AmbossTheme = {
371
372
  "toggle": {
372
373
  "default": string;
373
374
  "checked": string;
375
+ "highlighted": string;
374
376
  "hover": string;
375
377
  };
376
378
  "badge": {