storybook-addon-pseudo-states 1.5.0 → 1.8.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # v1.0.0 (Fri Mar 11 2022)
1
+ # v1.0.0 (Wed Apr 06 2022)
2
2
 
3
3
  #### 🚀 Enhancement
4
4
 
@@ -7,11 +7,13 @@
7
7
 
8
8
  #### 🐛 Bug Fix
9
9
 
10
+ - Add support for slotted lit elements [#23](https://github.com/chromaui/storybook-addon-pseudo-states/pull/23) ([@ilanus](https://github.com/ilanus))
10
11
  - Setup auto [#7](https://github.com/chromaui/storybook-addon-pseudo-states/pull/7) ([@ghengeveld](https://github.com/ghengeveld))
11
12
 
12
13
  #### ⚠️ Pushed to `main`
13
14
 
14
- - Another attempty at dealing with IE ([@ghengeveld](https://github.com/ghengeveld))
15
+ - [skip release] Revert back to disabling CustomElement stories ([@ghengeveld](https://github.com/ghengeveld))
16
+ - Another attempt at dealing with IE ([@ghengeveld](https://github.com/ghengeveld))
15
17
  - Don't disable stories, just ignore IE ([@ghengeveld](https://github.com/ghengeveld))
16
18
  - Fix missing parameter ([@ghengeveld](https://github.com/ghengeveld))
17
19
  - Disable snapshotting for CustomElements stories ([@ghengeveld](https://github.com/ghengeveld))
@@ -21,9 +23,10 @@
21
23
  - Upgrade Storybook ([@ghengeveld](https://github.com/ghengeveld))
22
24
  - Ignore .env file ([@ghengeveld](https://github.com/ghengeveld))
23
25
 
24
- #### Authors: 2
26
+ #### Authors: 3
25
27
 
26
28
  - Gert Hengeveld ([@ghengeveld](https://github.com/ghengeveld))
29
+ - Ilan ([@ilanus](https://github.com/ilanus))
27
30
  - Jeroen Zwartepoorte ([@jpzwarte](https://github.com/jpzwarte))
28
31
 
29
32
  ---
@@ -177,7 +177,7 @@ function rewriteStyleSheets(shadowRoot) {
177
177
  });
178
178
  var stateSelector;
179
179
 
180
- if (selector.startsWith(":host(")) {
180
+ if (selector.startsWith(":host(") || selector.startsWith("::slotted(")) {
181
181
  stateSelector = states.reduce(function (acc, state) {
182
182
  return acc.replaceAll(":".concat(state), ".pseudo-".concat(state));
183
183
  }, selector);
@@ -164,7 +164,7 @@ function rewriteStyleSheets(shadowRoot) {
164
164
  });
165
165
  var stateSelector;
166
166
 
167
- if (selector.startsWith(":host(")) {
167
+ if (selector.startsWith(":host(") || selector.startsWith("::slotted(")) {
168
168
  stateSelector = states.reduce(function (acc, state) {
169
169
  return acc.replaceAll(":".concat(state), ".pseudo-".concat(state));
170
170
  }, selector);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-addon-pseudo-states",
3
- "version": "1.5.0",
3
+ "version": "1.8.0",
4
4
  "description": "CSS pseudo states for Storybook",
5
5
  "keywords": [
6
6
  "storybook-addons",