skeleton-webcomponent-loader 1.0.2 → 2.1.1

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 (43) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/{css-shim-b5b9a7c7.js → css-shim-b3e497ca.js} +1 -1
  3. package/dist/cjs/{index-b7b0a13e.js → index-b5d2dca0.js} +209 -138
  4. package/dist/cjs/loader.cjs.js +5 -5
  5. package/dist/cjs/nb-skeleton.cjs.entry.js +23 -77
  6. package/dist/cjs/skeleton-webcomponent.cjs.js +5 -5
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/skeleton/skeleton.js +71 -39
  9. package/dist/custom-elements/index.d.ts +10 -2
  10. package/dist/custom-elements/index.js +26 -79
  11. package/dist/esm/{css-shim-2bc9d17d.js → css-shim-2f04a37a.js} +1 -1
  12. package/dist/esm/{index-f5ca0f12.js → index-63fd3905.js} +193 -121
  13. package/dist/esm/loader.js +5 -5
  14. package/dist/esm/nb-skeleton.entry.js +23 -77
  15. package/dist/esm/polyfills/index.js +2 -2
  16. package/dist/esm/skeleton-webcomponent.js +5 -5
  17. package/dist/esm-es5/{css-shim-2bc9d17d.js → css-shim-2f04a37a.js} +0 -0
  18. package/dist/esm-es5/index-63fd3905.js +1 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/nb-skeleton.entry.js +1 -7
  21. package/dist/esm-es5/skeleton-webcomponent.js +1 -1
  22. package/dist/skeleton-webcomponent/p-12077897.js +1 -0
  23. package/dist/skeleton-webcomponent/{p-527e1426.system.js → p-16aec442.system.js} +0 -0
  24. package/dist/skeleton-webcomponent/p-63ed3b45.entry.js +1 -0
  25. package/dist/skeleton-webcomponent/p-7e96e5d4.js +1 -0
  26. package/dist/skeleton-webcomponent/p-8bef7229.system.js +1 -0
  27. package/dist/skeleton-webcomponent/p-dc1bf577.system.entry.js +1 -0
  28. package/dist/skeleton-webcomponent/p-f59432d4.system.js +1 -0
  29. package/dist/skeleton-webcomponent/skeleton-webcomponent.esm.js +1 -1
  30. package/dist/skeleton-webcomponent/skeleton-webcomponent.js +1 -1
  31. package/dist/types/components/skeleton/skeleton.d.ts +9 -1
  32. package/dist/types/components.d.ts +14 -2
  33. package/dist/types/stencil-public-runtime.d.ts +225 -195
  34. package/loader/index.d.ts +0 -1
  35. package/package.json +19 -7
  36. package/readme.md +7 -5
  37. package/dist/esm-es5/index-f5ca0f12.js +0 -1
  38. package/dist/skeleton-webcomponent/p-4be3ea66.system.entry.js +0 -7
  39. package/dist/skeleton-webcomponent/p-8715773a.entry.js +0 -7
  40. package/dist/skeleton-webcomponent/p-8f82881f.js +0 -1
  41. package/dist/skeleton-webcomponent/p-b131d02e.system.js +0 -1
  42. package/dist/skeleton-webcomponent/p-d9243289.js +0 -1
  43. package/dist/skeleton-webcomponent/p-fde56e0b.system.js +0 -1
@@ -2,17 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b7b0a13e.js');
5
+ const index = require('./index-b5d2dca0.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.0.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  // NOTE!! This fn cannot use async/await!
12
12
  // @ts-ignore
13
- if ( !(index.CSS && index.CSS.supports && index.CSS.supports('color', 'var(--c)'))) {
13
+ if (!(index.CSS && index.CSS.supports && index.CSS.supports('color', 'var(--c)'))) {
14
14
  // @ts-ignore
15
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-b5b9a7c7.js'); }).then(() => {
15
+ return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-b3e497ca.js'); }).then(() => {
16
16
  if ((index.plt.$cssShim$ = index.win.__cssshim)) {
17
17
  return index.plt.$cssShim$.i();
18
18
  }
@@ -28,7 +28,7 @@ const patchEsm = () => {
28
28
  const defineCustomElements = (win, options) => {
29
29
  if (typeof window === 'undefined') return Promise.resolve();
30
30
  return patchEsm().then(() => {
31
- return index.bootstrapLazy([["nb-skeleton.cjs",[[2,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]]]], options);
31
+ return index.bootstrapLazy([["nb-skeleton.cjs",[[1,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]]]], options);
32
32
  });
33
33
  };
34
34
 
@@ -2,76 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b7b0a13e.js');
6
-
7
- function createCommonjsModule(fn, basedir, module) {
8
- return module = {
9
- path: basedir,
10
- exports: {},
11
- require: function (path, base) {
12
- return commonjsRequire();
13
- }
14
- }, fn(module, module.exports), module.exports;
15
- }
16
-
17
- function commonjsRequire () {
18
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
19
- }
20
-
21
- var classnames = createCommonjsModule(function (module) {
22
- /*!
23
- Copyright (c) 2017 Jed Watson.
24
- Licensed under the MIT License (MIT), see
25
- http://jedwatson.github.io/classnames
26
- */
27
- /* global define */
28
-
29
- (function () {
30
-
31
- var hasOwn = {}.hasOwnProperty;
32
-
33
- function classNames () {
34
- var classes = [];
35
-
36
- for (var i = 0; i < arguments.length; i++) {
37
- var arg = arguments[i];
38
- if (!arg) continue;
39
-
40
- var argType = typeof arg;
41
-
42
- if (argType === 'string' || argType === 'number') {
43
- classes.push(arg);
44
- } else if (Array.isArray(arg) && arg.length) {
45
- var inner = classNames.apply(null, arg);
46
- if (inner) {
47
- classes.push(inner);
48
- }
49
- } else if (argType === 'object') {
50
- for (var key in arg) {
51
- if (hasOwn.call(arg, key) && arg[key]) {
52
- classes.push(key);
53
- }
54
- }
55
- }
56
- }
57
-
58
- return classes.join(' ');
59
- }
60
-
61
- if ( module.exports) {
62
- classNames.default = classNames;
63
- module.exports = classNames;
64
- } else {
65
- window.classNames = classNames;
66
- }
67
- }());
68
- });
5
+ const index = require('./index-b5d2dca0.js');
69
6
 
70
7
  const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
71
8
 
72
- const skeletonCss = ".skeleton.sc-nb-skeleton{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;overflow:hidden;position:relative;background:var(--skeleton-background, #eff1f6) no-repeat;border-radius:var(--skeleton-border-radius, 4px);width:var(--skeleton-width, 100%);height:var(--skeleton-height, 20px);display:inline-block;margin-bottom:var(--skeleton-margin-bottom, 10px);will-change:transform}.skeleton.sc-nb-skeleton:after,.skeleton.sc-nb-skeleton:before{-webkit-box-sizing:border-box;box-sizing:border-box}.skeleton.circle.sc-nb-skeleton{width:var(--skeleton-width, 40px);height:var(--skeleton-height, 40px);margin-bottom:var(--skeleton-margin-bottom, 5px);border-radius:var(--skeleton-border-radius, 50%)}.skeleton.rect.sc-nb-skeleton{border-radius:var(--skeleton-border-radius, 0px)}.skeleton.progress.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton{-webkit-animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;background-size:200px 100%}.skeleton.progress.sc-nb-skeleton{background-image:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(rgba(255, 255, 255, 0.6)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0))}.skeleton.progress-dark.sc-nb-skeleton{background-image:-webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(0, 0, 0, 0.2)), to(transparent));background-image:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent)}.skeleton.pulse.sc-nb-skeleton{-webkit-animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-webkit-animation-delay:0.5s;animation-delay:0.5s}@media (prefers-reduced-motion: reduce){.skeleton.pulse.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton,.skeleton.progress.sc-nb-skeleton{-webkit-animation:none;animation:none}.skeleton.progress.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton{background-image:none}}@-webkit-keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";
9
+ const skeletonCss = ".skeleton{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;overflow:hidden;position:relative;background:var(--skeleton-background, #eff1f6) no-repeat;border-radius:var(--skeleton-border-radius, 4px);width:var(--skeleton-width, 100%);height:var(--skeleton-height, 20px);display:inline-block;margin-bottom:var(--skeleton-margin-bottom, 10px);will-change:transform}.skeleton:after,.skeleton:before{-webkit-box-sizing:border-box;box-sizing:border-box}.skeleton.circle{width:var(--skeleton-width, 40px);height:var(--skeleton-height, 40px);margin-bottom:var(--skeleton-margin-bottom, 5px);border-radius:var(--skeleton-border-radius, 50%)}.skeleton.rect{border-radius:var(--skeleton-border-radius, 0px)}.skeleton.progress,.skeleton.progress-dark{-webkit-animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;background-size:200px 100%}.skeleton.progress{background-image:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(rgba(255, 255, 255, 0.6)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0))}.skeleton.progress-dark{background-image:-webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(0, 0, 0, 0.2)), to(transparent));background-image:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent)}.skeleton.pulse{-webkit-animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-webkit-animation-delay:0.5s;animation-delay:0.5s}@media (prefers-reduced-motion: reduce){.skeleton.pulse,.skeleton.progress-dark,.skeleton.progress{-webkit-animation:none;animation:none}.skeleton.progress,.skeleton.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";
73
10
 
74
- const Skeleton = class {
11
+ let Skeleton = class {
75
12
  constructor(hostRef) {
76
13
  index.registerInstance(this, hostRef);
77
14
  /**
@@ -102,6 +39,13 @@ const Skeleton = class {
102
39
  * @memberof Skeleton
103
40
  */
104
41
  this.height = null;
42
+ /**
43
+ * MarginBottom of the skeleton ex. 10px, 0 etc.
44
+ *
45
+ * @type {string}
46
+ * @memberof Skeleton
47
+ */
48
+ this.marginBottom = null;
105
49
  /**
106
50
  * Animation type
107
51
  *
@@ -153,7 +97,8 @@ const Skeleton = class {
153
97
  get style() {
154
98
  let dimenssionsStyles = {
155
99
  width: null,
156
- height: null
100
+ height: null,
101
+ marginBottom: null
157
102
  };
158
103
  if (this.width) {
159
104
  dimenssionsStyles.width = this.width;
@@ -161,21 +106,22 @@ const Skeleton = class {
161
106
  if (this.height) {
162
107
  dimenssionsStyles.height = this.height;
163
108
  }
109
+ if (this.marginBottom) {
110
+ dimenssionsStyles.marginBottom = this.marginBottom;
111
+ }
164
112
  const styles = typeof this.customStyles === 'object' ? this.customStyles : {};
165
113
  return Object.assign(Object.assign({}, dimenssionsStyles), styles);
166
114
  }
167
115
  render() {
168
116
  return this.items.map((_, index$1) => {
169
- return (index.h("span", { key: index$1, class: classnames([
170
- 'skeleton',
171
- {
172
- 'circle': this.variant === 'circle',
173
- 'rect': this.variant === 'rect',
174
- 'progress': this.animation === 'progress',
175
- 'progress-dark': this.animation === 'progress-dark',
176
- 'pulse': this.animation === 'pulse',
177
- },
178
- ]), "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
117
+ return (index.h("span", { key: index$1, class: {
118
+ circle: this.variant === 'circle',
119
+ rect: this.variant === 'rect',
120
+ progress: this.animation === 'progress',
121
+ 'progress-dark': this.animation === 'progress-dark',
122
+ pulse: this.animation === 'pulse',
123
+ skeleton: true
124
+ }, "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
179
125
  });
180
126
  }
181
127
  };
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-b7b0a13e.js');
3
+ const index = require('./index-b5d2dca0.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.0.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  {
@@ -11,13 +11,13 @@ const patchBrowser = () => {
11
11
  index.plt.$cssShim$ = index.win.__cssshim;
12
12
  }
13
13
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('skeleton-webcomponent.cjs.js', document.baseURI).href));
14
- const opts = {};
15
- if ( importMeta !== '') {
14
+ const opts = {};
15
+ if (importMeta !== '') {
16
16
  opts.resourcesUrl = new URL('.', importMeta).href;
17
17
  }
18
18
  return index.promiseResolve(opts);
19
19
  };
20
20
 
21
21
  patchBrowser().then(options => {
22
- return index.bootstrapLazy([["nb-skeleton.cjs",[[2,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]]]], options);
22
+ return index.bootstrapLazy([["nb-skeleton.cjs",[[1,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]]]], options);
23
23
  });
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.0.3",
8
- "typescriptVersion": "4.0.2"
7
+ "version": "2.13.0",
8
+ "typescriptVersion": "4.3.5"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,5 +1,4 @@
1
1
  import { Component, h, Prop } from '@stencil/core';
2
- import cn from 'classnames';
3
2
  import { ALLOWED_ANIMATIONS } from './skeleton.constants';
4
3
  export class Skeleton {
5
4
  constructor() {
@@ -31,6 +30,13 @@ export class Skeleton {
31
30
  * @memberof Skeleton
32
31
  */
33
32
  this.height = null;
33
+ /**
34
+ * MarginBottom of the skeleton ex. 10px, 0 etc.
35
+ *
36
+ * @type {string}
37
+ * @memberof Skeleton
38
+ */
39
+ this.marginBottom = null;
34
40
  /**
35
41
  * Animation type
36
42
  *
@@ -82,7 +88,8 @@ export class Skeleton {
82
88
  get style() {
83
89
  let dimenssionsStyles = {
84
90
  width: null,
85
- height: null
91
+ height: null,
92
+ marginBottom: null
86
93
  };
87
94
  if (this.width) {
88
95
  dimenssionsStyles.width = this.width;
@@ -90,25 +97,26 @@ export class Skeleton {
90
97
  if (this.height) {
91
98
  dimenssionsStyles.height = this.height;
92
99
  }
100
+ if (this.marginBottom) {
101
+ dimenssionsStyles.marginBottom = this.marginBottom;
102
+ }
93
103
  const styles = typeof this.customStyles === 'object' ? this.customStyles : {};
94
104
  return Object.assign(Object.assign({}, dimenssionsStyles), styles);
95
105
  }
96
106
  render() {
97
107
  return this.items.map((_, index) => {
98
- return (h("span", { key: index, class: cn([
99
- 'skeleton',
100
- {
101
- 'circle': this.variant === 'circle',
102
- 'rect': this.variant === 'rect',
103
- 'progress': this.animation === 'progress',
104
- 'progress-dark': this.animation === 'progress-dark',
105
- 'pulse': this.animation === 'pulse',
106
- },
107
- ]), "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
108
+ return (h("span", { key: index, class: {
109
+ circle: this.variant === 'circle',
110
+ rect: this.variant === 'rect',
111
+ progress: this.animation === 'progress',
112
+ 'progress-dark': this.animation === 'progress-dark',
113
+ pulse: this.animation === 'pulse',
114
+ skeleton: true
115
+ }, "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
108
116
  });
109
117
  }
110
118
  static get is() { return "nb-skeleton"; }
111
- static get encapsulation() { return "scoped"; }
119
+ static get encapsulation() { return "shadow"; }
112
120
  static get originalStyleUrls() { return {
113
121
  "$": ["skeleton.scss"]
114
122
  }; }
@@ -128,8 +136,8 @@ export class Skeleton {
128
136
  "optional": false,
129
137
  "docs": {
130
138
  "tags": [{
131
- "text": "Skeleton",
132
- "name": "memberof"
139
+ "name": "memberof",
140
+ "text": "Skeleton"
133
141
  }],
134
142
  "text": "Number of rows of current skeleton type"
135
143
  },
@@ -149,11 +157,11 @@ export class Skeleton {
149
157
  "optional": false,
150
158
  "docs": {
151
159
  "tags": [{
152
- "text": "{('circle' | '')}",
153
- "name": "type"
160
+ "name": "type",
161
+ "text": "{('circle' | '')}"
154
162
  }, {
155
- "text": "Skeleton",
156
- "name": "memberof"
163
+ "name": "memberof",
164
+ "text": "Skeleton"
157
165
  }],
158
166
  "text": "Variant of the skeleton - circle or row"
159
167
  },
@@ -173,11 +181,11 @@ export class Skeleton {
173
181
  "optional": false,
174
182
  "docs": {
175
183
  "tags": [{
176
- "text": "{string}",
177
- "name": "type"
184
+ "name": "type",
185
+ "text": "{string}"
178
186
  }, {
179
- "text": "Skeleton",
180
- "name": "memberof"
187
+ "name": "memberof",
188
+ "text": "Skeleton"
181
189
  }],
182
190
  "text": "Width of the skeleton ex. 100px, 100%, auto etc."
183
191
  },
@@ -197,11 +205,11 @@ export class Skeleton {
197
205
  "optional": false,
198
206
  "docs": {
199
207
  "tags": [{
200
- "text": "{string}",
201
- "name": "type"
208
+ "name": "type",
209
+ "text": "{string}"
202
210
  }, {
203
- "text": "Skeleton",
204
- "name": "memberof"
211
+ "name": "memberof",
212
+ "text": "Skeleton"
205
213
  }],
206
214
  "text": "Height of the skeleton ex. 100px, 100%, auto etc."
207
215
  },
@@ -209,6 +217,30 @@ export class Skeleton {
209
217
  "reflect": false,
210
218
  "defaultValue": "null"
211
219
  },
220
+ "marginBottom": {
221
+ "type": "string",
222
+ "mutable": false,
223
+ "complexType": {
224
+ "original": "string",
225
+ "resolved": "string",
226
+ "references": {}
227
+ },
228
+ "required": false,
229
+ "optional": false,
230
+ "docs": {
231
+ "tags": [{
232
+ "name": "type",
233
+ "text": "{string}"
234
+ }, {
235
+ "name": "memberof",
236
+ "text": "Skeleton"
237
+ }],
238
+ "text": "MarginBottom of the skeleton ex. 10px, 0 etc."
239
+ },
240
+ "attribute": "margin-bottom",
241
+ "reflect": false,
242
+ "defaultValue": "null"
243
+ },
212
244
  "animation": {
213
245
  "type": "string",
214
246
  "mutable": false,
@@ -221,11 +253,11 @@ export class Skeleton {
221
253
  "optional": false,
222
254
  "docs": {
223
255
  "tags": [{
224
- "text": "{('progress' | 'progress-dark' | 'pulse' | 'false')}",
225
- "name": "type"
256
+ "name": "type",
257
+ "text": "{('progress' | 'progress-dark' | 'pulse' | 'false')}"
226
258
  }, {
227
- "text": "Skeleton",
228
- "name": "memberof"
259
+ "name": "memberof",
260
+ "text": "Skeleton"
229
261
  }],
230
262
  "text": "Animation type"
231
263
  },
@@ -237,19 +269,19 @@ export class Skeleton {
237
269
  "type": "string",
238
270
  "mutable": false,
239
271
  "complexType": {
240
- "original": "{ [k: string]: string } | string",
241
- "resolved": "string | { [k: string]: string; }",
272
+ "original": "{ [key: string]: string } | string",
273
+ "resolved": "string | { [key: string]: string; }",
242
274
  "references": {}
243
275
  },
244
276
  "required": false,
245
277
  "optional": false,
246
278
  "docs": {
247
279
  "tags": [{
248
- "text": "{({[k: string]: string} | string)}",
249
- "name": "type"
280
+ "name": "type",
281
+ "text": "{({[k: string]: string} | string)}"
250
282
  }, {
251
- "text": "Skeleton",
252
- "name": "memberof"
283
+ "name": "memberof",
284
+ "text": "Skeleton"
253
285
  }],
254
286
  "text": "Custom css styles (background/margins/width/height etc.)"
255
287
  },
@@ -269,8 +301,8 @@ export class Skeleton {
269
301
  "optional": false,
270
302
  "docs": {
271
303
  "tags": [{
272
- "text": "Skeleton",
273
- "name": "memberof"
304
+ "name": "memberof",
305
+ "text": "Skeleton"
274
306
  }],
275
307
  "text": "Whether to show warnings for the wrong animation type/custom styles"
276
308
  },
@@ -1,6 +1,6 @@
1
1
  /* SkeletonWebcomponent custom elements bundle */
2
2
 
3
- import { Components, JSX } from "../types/components";
3
+ import type { Components, JSX } from "../types/components";
4
4
 
5
5
  interface NbSkeleton extends Components.NbSkeleton, HTMLElement {}
6
6
  export const NbSkeleton: {
@@ -32,6 +32,14 @@ export declare const defineCustomElements: (opts?: any) => void;
32
32
  */
33
33
  export declare const setAssetPath: (path: string) => void;
34
34
 
35
- export { Components, JSX };
35
+ export interface SetPlatformOptions {
36
+ raf?: (c: FrameRequestCallback) => number;
37
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
38
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
39
+ ce?: (eventName: string, opts?: any) => CustomEvent;
40
+ }
41
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
42
+
43
+ export type { Components, JSX };
36
44
 
37
45
  export * from '../types';
@@ -1,77 +1,15 @@
1
- import { h, proxyCustomElement } from '@stencil/core/internal/client';
2
- export { setAssetPath } from '@stencil/core/internal/client';
3
-
4
- function createCommonjsModule(fn, basedir, module) {
5
- return module = {
6
- path: basedir,
7
- exports: {},
8
- require: function (path, base) {
9
- return commonjsRequire();
10
- }
11
- }, fn(module, module.exports), module.exports;
12
- }
13
-
14
- function commonjsRequire () {
15
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
16
- }
17
-
18
- var classnames = createCommonjsModule(function (module) {
19
- /*!
20
- Copyright (c) 2017 Jed Watson.
21
- Licensed under the MIT License (MIT), see
22
- http://jedwatson.github.io/classnames
23
- */
24
- /* global define */
25
-
26
- (function () {
27
-
28
- var hasOwn = {}.hasOwnProperty;
29
-
30
- function classNames () {
31
- var classes = [];
32
-
33
- for (var i = 0; i < arguments.length; i++) {
34
- var arg = arguments[i];
35
- if (!arg) continue;
36
-
37
- var argType = typeof arg;
38
-
39
- if (argType === 'string' || argType === 'number') {
40
- classes.push(arg);
41
- } else if (Array.isArray(arg) && arg.length) {
42
- var inner = classNames.apply(null, arg);
43
- if (inner) {
44
- classes.push(inner);
45
- }
46
- } else if (argType === 'object') {
47
- for (var key in arg) {
48
- if (hasOwn.call(arg, key) && arg[key]) {
49
- classes.push(key);
50
- }
51
- }
52
- }
53
- }
54
-
55
- return classes.join(' ');
56
- }
57
-
58
- if ( module.exports) {
59
- classNames.default = classNames;
60
- module.exports = classNames;
61
- } else {
62
- window.classNames = classNames;
63
- }
64
- }());
65
- });
1
+ import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/client';
2
+ export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
66
3
 
67
4
  const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
68
5
 
69
- const skeletonCss = ".skeleton.sc-nb-skeleton{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;overflow:hidden;position:relative;background:var(--skeleton-background, #eff1f6) no-repeat;border-radius:var(--skeleton-border-radius, 4px);width:var(--skeleton-width, 100%);height:var(--skeleton-height, 20px);display:inline-block;margin-bottom:var(--skeleton-margin-bottom, 10px);will-change:transform}.skeleton.sc-nb-skeleton:after,.skeleton.sc-nb-skeleton:before{-webkit-box-sizing:border-box;box-sizing:border-box}.skeleton.circle.sc-nb-skeleton{width:var(--skeleton-width, 40px);height:var(--skeleton-height, 40px);margin-bottom:var(--skeleton-margin-bottom, 5px);border-radius:var(--skeleton-border-radius, 50%)}.skeleton.rect.sc-nb-skeleton{border-radius:var(--skeleton-border-radius, 0px)}.skeleton.progress.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton{-webkit-animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;background-size:200px 100%}.skeleton.progress.sc-nb-skeleton{background-image:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(rgba(255, 255, 255, 0.6)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0))}.skeleton.progress-dark.sc-nb-skeleton{background-image:-webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(0, 0, 0, 0.2)), to(transparent));background-image:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent)}.skeleton.pulse.sc-nb-skeleton{-webkit-animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-webkit-animation-delay:0.5s;animation-delay:0.5s}@media (prefers-reduced-motion: reduce){.skeleton.pulse.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton,.skeleton.progress.sc-nb-skeleton{-webkit-animation:none;animation:none}.skeleton.progress.sc-nb-skeleton,.skeleton.progress-dark.sc-nb-skeleton{background-image:none}}@-webkit-keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";
6
+ const skeletonCss = ".skeleton{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;overflow:hidden;position:relative;background:var(--skeleton-background, #eff1f6) no-repeat;border-radius:var(--skeleton-border-radius, 4px);width:var(--skeleton-width, 100%);height:var(--skeleton-height, 20px);display:inline-block;margin-bottom:var(--skeleton-margin-bottom, 10px);will-change:transform}.skeleton:after,.skeleton:before{-webkit-box-sizing:border-box;box-sizing:border-box}.skeleton.circle{width:var(--skeleton-width, 40px);height:var(--skeleton-height, 40px);margin-bottom:var(--skeleton-margin-bottom, 5px);border-radius:var(--skeleton-border-radius, 50%)}.skeleton.rect{border-radius:var(--skeleton-border-radius, 0px)}.skeleton.progress,.skeleton.progress-dark{-webkit-animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;background-size:200px 100%}.skeleton.progress{background-image:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(rgba(255, 255, 255, 0.6)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0))}.skeleton.progress-dark{background-image:-webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(0, 0, 0, 0.2)), to(transparent));background-image:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent)}.skeleton.pulse{-webkit-animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-webkit-animation-delay:0.5s;animation-delay:0.5s}@media (prefers-reduced-motion: reduce){.skeleton.pulse,.skeleton.progress-dark,.skeleton.progress{-webkit-animation:none;animation:none}.skeleton.progress,.skeleton.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";
70
7
 
71
- const Skeleton = class extends HTMLElement {
8
+ let Skeleton = class extends HTMLElement {
72
9
  constructor() {
73
10
  super();
74
11
  this.__registerHost();
12
+ this.__attachShadow();
75
13
  /**
76
14
  * Number of rows of current skeleton type
77
15
  *
@@ -100,6 +38,13 @@ const Skeleton = class extends HTMLElement {
100
38
  * @memberof Skeleton
101
39
  */
102
40
  this.height = null;
41
+ /**
42
+ * MarginBottom of the skeleton ex. 10px, 0 etc.
43
+ *
44
+ * @type {string}
45
+ * @memberof Skeleton
46
+ */
47
+ this.marginBottom = null;
103
48
  /**
104
49
  * Animation type
105
50
  *
@@ -151,7 +96,8 @@ const Skeleton = class extends HTMLElement {
151
96
  get style() {
152
97
  let dimenssionsStyles = {
153
98
  width: null,
154
- height: null
99
+ height: null,
100
+ marginBottom: null
155
101
  };
156
102
  if (this.width) {
157
103
  dimenssionsStyles.width = this.width;
@@ -159,27 +105,28 @@ const Skeleton = class extends HTMLElement {
159
105
  if (this.height) {
160
106
  dimenssionsStyles.height = this.height;
161
107
  }
108
+ if (this.marginBottom) {
109
+ dimenssionsStyles.marginBottom = this.marginBottom;
110
+ }
162
111
  const styles = typeof this.customStyles === 'object' ? this.customStyles : {};
163
112
  return Object.assign(Object.assign({}, dimenssionsStyles), styles);
164
113
  }
165
114
  render() {
166
115
  return this.items.map((_, index) => {
167
- return (h("span", { key: index, class: classnames([
168
- 'skeleton',
169
- {
170
- 'circle': this.variant === 'circle',
171
- 'rect': this.variant === 'rect',
172
- 'progress': this.animation === 'progress',
173
- 'progress-dark': this.animation === 'progress-dark',
174
- 'pulse': this.animation === 'pulse',
175
- },
176
- ]), "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
116
+ return (h("span", { key: index, class: {
117
+ circle: this.variant === 'circle',
118
+ rect: this.variant === 'rect',
119
+ progress: this.animation === 'progress',
120
+ 'progress-dark': this.animation === 'progress-dark',
121
+ pulse: this.animation === 'pulse',
122
+ skeleton: true
123
+ }, "aria-busy": "true", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
177
124
  });
178
125
  }
179
126
  static get style() { return skeletonCss; }
180
127
  };
181
128
 
182
- const NbSkeleton = /*@__PURE__*/proxyCustomElement(Skeleton, [2,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]);
129
+ const NbSkeleton = /*@__PURE__*/proxyCustomElement(Skeleton, [1,"nb-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1],"customStyles":[1,"custom-styles"],"showWarnings":[4,"show-warnings"]}]);
183
130
  const defineCustomElements = (opts) => {
184
131
  if (typeof customElements !== 'undefined') {
185
132
  [
@@ -1,4 +1,4 @@
1
1
  /*
2
- Stencil Client Patch Esm v2.0.3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);