wj-elements 0.0.4 → 0.0.6

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 (71) hide show
  1. package/dist/animation-2266bd6e.js +103 -0
  2. package/dist/localize-762a9f0f.js +43 -0
  3. package/dist/wj-animation.js +6 -0
  4. package/dist/wj-aside.js +8 -10
  5. package/dist/wj-avatar.js +19 -21
  6. package/dist/wj-badge.js +16 -16
  7. package/dist/wj-breadcrumb.js +7 -11
  8. package/dist/wj-breadcrumbs.js +5 -7
  9. package/dist/wj-button-group.js +11 -13
  10. package/dist/wj-button.js +36 -39
  11. package/dist/wj-card-content.js +11 -13
  12. package/dist/wj-card-controls.js +6 -8
  13. package/dist/wj-card-header.js +11 -13
  14. package/dist/wj-card-subtitle.js +9 -11
  15. package/dist/wj-card-title.js +7 -9
  16. package/dist/wj-card.js +13 -15
  17. package/dist/wj-carousel-item.js +32 -0
  18. package/dist/wj-carousel.js +178 -0
  19. package/dist/wj-checkbox.js +11 -11
  20. package/dist/wj-chip.js +17 -17
  21. package/dist/wj-col.js +11 -12
  22. package/dist/wj-color-picker.js +192 -179
  23. package/dist/wj-container.js +7 -9
  24. package/dist/wj-copy-button.js +1 -3
  25. package/dist/wj-dialog.js +20 -22
  26. package/dist/wj-divider.js +7 -9
  27. package/dist/wj-dropdown.js +10 -14
  28. package/dist/wj-element.js +9 -9
  29. package/dist/wj-file-upload-item.js +63 -0
  30. package/dist/wj-file-upload.js +221 -0
  31. package/dist/wj-footer.js +9 -11
  32. package/dist/wj-form.js +6 -8
  33. package/dist/wj-format-digital.js +51 -0
  34. package/dist/wj-grid.js +9 -10
  35. package/dist/wj-header.js +9 -11
  36. package/dist/wj-icon-picker.js +78 -58
  37. package/dist/wj-icon.js +45 -48
  38. package/dist/wj-img-comparer.js +12 -14
  39. package/dist/wj-img.js +14 -16
  40. package/dist/wj-infinite-scroll.js +27 -22
  41. package/dist/wj-input-file.js +47 -0
  42. package/dist/wj-input.js +30 -23
  43. package/dist/wj-item.js +1 -3
  44. package/dist/wj-label.js +10 -10
  45. package/dist/wj-list.js +1 -3
  46. package/dist/wj-main.js +1 -3
  47. package/dist/wj-masonry.js +71518 -0
  48. package/dist/wj-master.js +287 -253
  49. package/dist/wj-menu-button.js +10 -12
  50. package/dist/wj-menu-item.js +49 -46
  51. package/dist/wj-menu-label.js +2 -2
  52. package/dist/wj-menu.js +8 -10
  53. package/dist/wj-popup.js +89 -88
  54. package/dist/wj-progress-bar.js +14 -16
  55. package/dist/wj-radio-group.js +5 -7
  56. package/dist/wj-radio.js +13 -15
  57. package/dist/wj-rate.js +127 -0
  58. package/dist/wj-relative-time.js +50 -0
  59. package/dist/wj-router-link.js +11 -13
  60. package/dist/wj-row.js +11 -12
  61. package/dist/wj-slider.js +6 -6
  62. package/dist/wj-split-view.js +1 -3
  63. package/dist/wj-textarea.js +17 -19
  64. package/dist/wj-thumbnail.js +12 -14
  65. package/dist/wj-toast.js +1 -1
  66. package/dist/wj-toggle.js +9 -9
  67. package/dist/wj-toolbar.js +13 -15
  68. package/dist/wj-tooltip.js +16 -18
  69. package/dist/wj-visually-hidden.js +6 -8
  70. package/package.json +1 -1
  71. package/dist/style.css +0 -3
@@ -1,16 +1,14 @@
1
- var a = Object.defineProperty;
2
- var d = (e, t, n) => t in e ? a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var s = (e, t, n) => (d(e, typeof t != "symbol" ? t + "" : t, n), n);
1
+ var s = Object.defineProperty;
2
+ var d = (e, t, o) => t in e ? s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var r = (e, t, o) => (d(e, typeof t != "symbol" ? t + "" : t, o), o);
4
4
  import i from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const m = `/*!
7
- * direction.scss
8
- */:host{--wj-card-padding: 0 1rem 1rem;display:block;padding:var(--wj-card-padding)}:host.no-padding .row{margin-left:0;margin-right:0}:host.no-bottom-padding{padding-bottom:0}:host.no-top-padding{padding-top:0}:host .title{margin-top:0}:host.scrollable{margin-bottom:20px}:host h3{line-height:34px;font-size:26px}
6
+ const m = `:host{--wj-card-padding: 0 1rem 1rem;display:block;padding:var(--wj-card-padding)}:host.no-padding .row{margin-left:0;margin-right:0}:host.no-bottom-padding{padding-bottom:0}:host.no-top-padding{padding-top:0}:host .title{margin-top:0}:host.scrollable{margin-bottom:20px}:host h3{line-height:34px;font-size:26px}
9
7
  `;
10
- class c extends i {
8
+ class p extends i {
11
9
  constructor() {
12
10
  super();
13
- s(this, "className", "CardContent");
11
+ r(this, "className", "CardContent");
14
12
  }
15
13
  static get cssStyleSheet() {
16
14
  return m;
@@ -18,12 +16,12 @@ class c extends i {
18
16
  setupAttributes() {
19
17
  this.isShadowRoot = "open";
20
18
  }
21
- draw(n, p, l) {
22
- let o = document.createDocumentFragment(), r = document.createElement("slot");
23
- return o.appendChild(r), o;
19
+ draw(o, c, l) {
20
+ let n = document.createDocumentFragment(), a = document.createElement("slot");
21
+ return n.appendChild(a), n;
24
22
  }
25
23
  }
26
- customElements.get("wj-card-content") || window.customElements.define("wj-card-content", c);
24
+ customElements.get("wj-card-content") || window.customElements.define("wj-card-content", p);
27
25
  export {
28
- c as CardContent
26
+ p as CardContent
29
27
  };
@@ -1,16 +1,14 @@
1
1
  var a = Object.defineProperty;
2
2
  var i = (e, t, o) => t in e ? a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var n = (e, t, o) => (i(e, typeof t != "symbol" ? t + "" : t, o), o);
3
+ var s = (e, t, o) => (i(e, typeof t != "symbol" ? t + "" : t, o), o);
4
4
  import l from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const c = `/*!
7
- * direction.scss
8
- */:host{--wj-color: #212529;--wj-card-subtitle-font-size: 28px;--wj-card-subtitle-font-family: Montserrat, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;font-family:var(--wj-card-subtitle-font-family);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-size:10.5px;font-weight:500;margin:0;padding:0;line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40);-webkit-transition:opacity .3s ease;transition:opacity .3s ease;position:absolute;right:1rem;top:.5rem}
6
+ const c = `:host{--wj-card-subtitle-font-size: 28px;--wj-card-subtitle-font-family: var(--wj-font-family-secondary);font-family:var(--wj-card-subtitle-font-family);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-size:10.5px;font-weight:500;margin:0;padding:0;line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40);transition:opacity .3s ease;position:absolute;right:1rem;top:.5rem}
9
7
  `;
10
8
  class m extends l {
11
9
  constructor() {
12
10
  super();
13
- n(this, "className", "CardControls");
11
+ s(this, "className", "CardControls");
14
12
  }
15
13
  static get cssStyleSheet() {
16
14
  return c;
@@ -18,9 +16,9 @@ class m extends l {
18
16
  setupAttributes() {
19
17
  this.isShadowRoot = "open";
20
18
  }
21
- draw(o, p, d) {
22
- let s = document.createDocumentFragment(), r = document.createElement("slot");
23
- return s.appendChild(r), s;
19
+ draw(o, d, p) {
20
+ let r = document.createDocumentFragment(), n = document.createElement("slot");
21
+ return r.appendChild(n), r;
24
22
  }
25
23
  }
26
24
  customElements.get("wj-card-controls") || window.customElements.define("wj-card-controls", m);
@@ -1,26 +1,24 @@
1
- var n = Object.defineProperty;
2
- var d = (t, e, r) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var o = (t, e, r) => (d(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import c from "./wj-element.js";
1
+ var d = Object.defineProperty;
2
+ var n = (t, e, r) => e in t ? d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var s = (t, e, r) => (n(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import i from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const i = `/*!
7
- * direction.scss
8
- */:host{background:transparent;border-radius:0;border-bottom:0;padding:1rem 1rem .5rem;position:relative;display:flex;flex-direction:column;color:var(--wj-color-contrast)}:host(.wj-separator):after{content:"";height:1px;background:rgba(0,0,0,.08);margin-top:.5rem}
6
+ const c = `:host{--wj-card-header-padding: 1rem 1rem .5rem;background:transparent;border-radius:0;border-bottom:0;padding:var(--wj-card-header-padding);position:relative;display:flex;flex-direction:column}:host(.wj-separator):after{content:"";height:1px;background:rgba(0,0,0,.08);margin-top:.5rem}
9
7
  `;
10
- class m extends c {
8
+ class m extends i {
11
9
  constructor() {
12
10
  super();
13
- o(this, "className", "CardHeader");
11
+ s(this, "className", "CardHeader");
14
12
  }
15
13
  static get cssStyleSheet() {
16
- return i;
14
+ return c;
17
15
  }
18
16
  setupAttributes() {
19
17
  this.isShadowRoot = "open";
20
18
  }
21
- draw(r, l, p) {
22
- let a = document.createDocumentFragment(), s = document.createElement("slot");
23
- return this.hasAttribute("separator") && this.classList.add("wj-separator"), a.appendChild(s), a;
19
+ draw(r, p, l) {
20
+ let a = document.createDocumentFragment(), o = document.createElement("slot");
21
+ return this.hasAttribute("separator") && this.classList.add("wj-separator"), a.appendChild(o), a;
24
22
  }
25
23
  }
26
24
  customElements.get("wj-card-header") || window.customElements.define("wj-card-header", m);
@@ -1,19 +1,17 @@
1
1
  var l = Object.defineProperty;
2
- var c = (s, t, e) => t in s ? l(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var n = (s, t, e) => (c(s, typeof t != "symbol" ? t + "" : t, e), e);
4
- import m from "./wj-element.js";
2
+ var c = (r, t, e) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var s = (r, t, e) => (c(r, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import d from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const d = `/*!
7
- * direction.scss
8
- */:host{--wj-card-subtitle-font-size: 10.5px;--wj-card-subtitle-font-family: Montserrat, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif}:host{-webkit-transition:opacity .3s ease;transition:opacity .3s ease;font-family:var(--wj-card-subtitle-font-family);font-size:var(--wj-card-subtitle-font-size);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-weight:500;margin:0;padding:0;line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40)}
6
+ const m = `:host{--wj-card-subtitle-font-size: 10.5px;--wj-card-subtitle-font-family: var(--wj-font-family-secondary);--wj-card-subtitle-padding: 0;transition:opacity .3s ease;font-family:var(--wj-card-subtitle-font-family);font-size:var(--wj-card-subtitle-font-size);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-weight:500;margin:0;padding:var(--wj-card-subtitle-padding);line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40)}
9
7
  `;
10
- class u extends m {
8
+ class u extends d {
11
9
  constructor() {
12
10
  super();
13
- n(this, "className", "CardTitle");
11
+ s(this, "className", "CardTitle");
14
12
  }
15
13
  static get cssStyleSheet() {
16
- return d;
14
+ return m;
17
15
  }
18
16
  static get observedAttributes() {
19
17
  return [];
@@ -21,9 +19,9 @@ class u extends m {
21
19
  setupAttributes() {
22
20
  this.isShadowRoot = "open";
23
21
  }
24
- beforeDraw(e, r, i) {
22
+ beforeDraw(e, i, n) {
25
23
  }
26
- draw(e, r, i) {
24
+ draw(e, i, n) {
27
25
  let a = document.createDocumentFragment(), o = document.createElement("slot");
28
26
  return a.appendChild(o), a;
29
27
  }
@@ -1,19 +1,17 @@
1
- var s = Object.defineProperty;
2
- var l = (e, t, i) => t in e ? s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var a = (e, t, i) => (l(e, typeof t != "symbol" ? t + "" : t, i), i);
4
- import o from "./wj-element.js";
1
+ var l = Object.defineProperty;
2
+ var s = (e, t, i) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var a = (e, t, i) => (s(e, typeof t != "symbol" ? t + "" : t, i), i);
4
+ import d from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const d = `/*!
7
- * direction.scss
8
- */:host{--wj-card-title-font-size: 24px;--wj-card-title-font-weight: 500;--wj-card-title-margin: 0;--wj-card-title-padding: 0;--wj-card-title-line-height: 1.2}:host{font-size:var(--wj-card-title-font-size);font-weight:var(--wj-card-title-font-weight);margin:var(--wj-card-title-margin);padding:var(--wj-card-title-padding);line-height:var(--wj-card-title-line-height);display:block;position:relative}
6
+ const o = `:host{--wj-card-title-font-size: 24px;--wj-card-title-font-weight: 500;--wj-card-title-margin: 0;--wj-card-title-padding: 0;--wj-card-title-line-height: 1.2;font-size:var(--wj-card-title-font-size);font-weight:var(--wj-card-title-font-weight);margin:var(--wj-card-title-margin);padding:var(--wj-card-title-padding);line-height:var(--wj-card-title-line-height);display:block;position:relative}
9
7
  `;
10
- class c extends o {
8
+ class c extends d {
11
9
  constructor() {
12
10
  super();
13
11
  a(this, "className", "CardTitle");
14
12
  }
15
13
  static get cssStyleSheet() {
16
- return d;
14
+ return o;
17
15
  }
18
16
  static get observedAttributes() {
19
17
  return [];
package/dist/wj-card.js CHANGED
@@ -1,29 +1,27 @@
1
- var c = Object.defineProperty;
2
- var d = (r, o, t) => o in r ? c(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
- var n = (r, o, t) => (d(r, typeof o != "symbol" ? o + "" : o, t), t);
4
- import i from "./wj-element.js";
1
+ var n = Object.defineProperty;
2
+ var l = (r, o, a) => o in r ? n(r, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[o] = a;
3
+ var e = (r, o, a) => (l(r, typeof o != "symbol" ? o + "" : o, a), a);
4
+ import d from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const l = `/*!
7
- * direction.scss
8
- */:host{--wj-card-margin-top: 0;--wj-card-margin-bottom: 1rem;--wj-card-margin-inline: 0;--wj-card-border-color: transparent;--wj-color-base: #fff;--wj-color-contrast: #4b4b4b}:host(.wj-color-primary){--wj-color-base: #7252D3 !important;--wj-color-contrast: #fff !important}:host(.wj-color-complete){--wj-color-base: #0072EC !important;--wj-color-contrast: #fff !important}:host(.wj-color-success){--wj-color-base: #19AD79 !important;--wj-color-contrast: #fff !important}:host(.wj-color-warning){--wj-color-base: #FFd945 !important;--wj-color-contrast: #4b4b4b !important}:host(.wj-color-danger){--wj-color-base: #D83C31 !important;--wj-color-contrast: #fff !important}:host(.wj-color-info){--wj-color-base: #3B4752 !important;--wj-color-contrast: #fff !important}:host(.wj-color-menu){--wj-color-base: #2b303b !important;--wj-color-contrast: #fff !important}:host{background-color:var(--wj-color-base, red);color:var(--wj-color-contrast);-webkit-transition:all .2s ease;transition:all .2s ease;margin-top:var(--wj-card-margin-top);margin-bottom:var(--wj-card-margin-bottom);margin-inline:var(--wj-card-margin-inline);box-shadow:#0000001f 0 4px 16px;border-color:var(--wj-border-color);border-style:var(--wj-border-style);border-width:var(--wj-border-size);border-radius:var(--wj-border-radius);font-family:var(--wj-font-family);font-size:var(--wj-font-size);line-height:var(--wj-line-height);position:relative;width:100%;word-wrap:normal;display:flex;flex-direction:column;contain:content;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host.card-collapsed .card-header .card-controls .card-icon-collapse:before{content:""}:host.card-maximized .card-header .card-controls .card-icon-maximize:before{content:""}:host.card-bordered{border:1px solid rgba(224,224,224,.7)}:host.card-borderless{border:none;box-shadow:none}:host.card-condensed .card-header{padding:9px 13px 0;min-height:32px}:host.card-condensed .card-header .card-title{opacity:.4}:host.card-condensed .card-body{padding:13px}:host.card-hover .card-header .card-title{opacity:.4}:host.card-hover:hover .card-header .card-title{opacity:1}:host.card-transparent{background:transparent;border:none;-webkit-box-shadow:none;box-shadow:none}:host.card-transparent .card-body{background:transparent}:host.full-height{height:100%}:host.full-height .card-body{height:auto;width:100%;height:100%}:host.card-featured{-webkit-box-shadow:-1px 1px 3px 0px rgba(121,129,135,.14);box-shadow:-1px 1px 3px #79818724;width:calc(100% - 50px);float:right}:host.card-featured .card-title h4{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:16px;text-transform:uppercase;color:inherit}:host.card-featured .card-body h3{line-height:34px;font-size:26px}:host.card-featured .footer .username{line-height:8px;padding-top:10px;font-size:16px}:host.card-featured .footer .buttons li{display:inline;list-style:none;font-weight:700;margin-left:20px}:host.card-featured .footer .buttons li:first-child{margin-left:0}:host.card-featured .footer .buttons .heart{color:#d83c31}:host.card-featured .footer .buttons .comment{color:#4b4b4b}:host.card-featured .ribbon{width:38px;height:38px;margin-left:-39px;float:left;-webkit-box-shadow:inset -3px 0px 3px 0px rgba(0,0,0,.14);box-shadow:inset -3px 0 3px #00000024}:host.card-featured .ribbon.green{background:#0072EC}:host.card-featured .ribbon.blue{background:#19AD79}:host.hover-fill:hover{background:#f4f4f4}:host.hover-stroke:hover{border:1px solid #e0e0e0}:host(.wj-color){background-color:var(--wj-color-base, red);color:var(--wj-color-contrast)}
6
+ const i = `:host{--wj-card-margin-top: 0;--wj-card-margin-bottom: 1rem;--wj-card-margin-inline: 0;--wj-card-border-color: transparent}:host(.wj-color-primary){--wj-card-background: var(--wj-color-primary)}:host(.wj-color-complete){--wj-card-background: var(--wj-color-complete)}:host(.wj-color-success){--wj-card-background: var(--wj-color-success)}:host(.wj-color-warning){--wj-card-background: var(--wj-color-warning)}:host(.wj-color-danger){--wj-card-background: var(--wj-color-danger)}:host(.wj-color-info){--wj-card-background: var(--wj-color-info)}:host(.wj-color-menu){--wj-card-background: var(--wj-color-menu)}:host(.wj-color-primary){--wj-card-color: var(--wj-color-white)}:host(.wj-color-complete){--wj-card-color: var(--wj-color-white)}:host(.wj-color-success){--wj-card-color: var(--wj-color-white)}:host(.wj-color-warning){--wj-card-color: var(--wj-color)}:host(.wj-color-danger){--wj-card-color: var(--wj-color-white)}:host(.wj-color-info){--wj-card-color: var(--wj-color-white)}:host(.wj-color-menu){--wj-card-color: var(--wj-color-white) !important}:host{background-color:var(--wj-card-background);color:var(--wj-card-color)!important;margin-top:var(--wj-card-margin-top);margin-bottom:var(--wj-card-margin-bottom);margin-inline:var(--wj-card-margin-inline);box-shadow:var(--wj-box-shadow-large);border-color:var(--wj-border-color);border-style:var(--wj-border-style);border-width:var(--wj-border-size);border-radius:var(--wj-border-radius-medium);font-family:var(--wj-font-family);font-size:var(--wj-font-size);line-height:var(--wj-line-height);position:relative;width:100%;word-wrap:normal;display:flex;flex-direction:column;contain:content;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host(.wj-color){background-color:var(--wj-card-background, #fff);color:var(--wj-card-color)}
9
7
  `;
10
- class h extends i {
8
+ class s extends d {
11
9
  constructor() {
12
10
  super();
13
- n(this, "className", "Card");
11
+ e(this, "className", "Card");
14
12
  }
15
13
  static get cssStyleSheet() {
16
- return l;
14
+ return i;
17
15
  }
18
16
  setupAttributes() {
19
17
  this.isShadowRoot = "open";
20
18
  }
21
- draw(t, b, e) {
22
- let a = document.createDocumentFragment(), s = document.createElement("slot");
23
- return e.color && this.classList.add("wj-color-" + e.color, "wj-color"), a.appendChild(s), a;
19
+ draw(a, j, c) {
20
+ let t = document.createDocumentFragment(), w = document.createElement("slot");
21
+ return c.color && this.classList.add("wj-color-" + c.color, "wj-color"), t.appendChild(w), t;
24
22
  }
25
23
  }
26
- customElements.get("wj-card") || window.customElements.define("wj-card", h);
24
+ customElements.get("wj-card") || window.customElements.define("wj-card", s);
27
25
  export {
28
- h as Card
26
+ s as Card
29
27
  };
@@ -0,0 +1,32 @@
1
+ var n = Object.defineProperty;
2
+ var l = (e, t, s) => t in e ? n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var r = (e, t, s) => (l(e, typeof t != "symbol" ? t + "" : t, s), s);
4
+ import c from "./wj-element.js";
5
+ import "./wj-store.js";
6
+ const m = `:host{--aspect-ratio: inherit;display:flex;align-items:center;justify-content:center;flex-direction:column;width:var(--wj-carousel-size, 100%);max-height:100%;aspect-ratio:var(--aspect-ratio);scroll-snap-align:center;scroll-snap-stop:always}.native-carousel-item{width:100%;height:100%;display:flex}::slotted(wj-img){width:100%!important;height:100%!important;object-fit:contain;display:flex}
7
+ `;
8
+ class d extends c {
9
+ constructor() {
10
+ super();
11
+ r(this, "className", "CarouselItem");
12
+ }
13
+ static get cssStyleSheet() {
14
+ return m;
15
+ }
16
+ static get observedAttributes() {
17
+ return [];
18
+ }
19
+ setupAttributes() {
20
+ this.isShadowRoot = "open";
21
+ }
22
+ draw(s, u, p) {
23
+ let i = document.createDocumentFragment(), a = document.createElement("div");
24
+ a.classList.add("native-carousel-item"), a.setAttribute("part", "native");
25
+ let o = document.createElement("slot");
26
+ return a.appendChild(o), i.appendChild(a), i;
27
+ }
28
+ }
29
+ customElements.get("wj-carousel-item") || window.customElements.define("wj-carousel-item", d);
30
+ export {
31
+ d as CarouselItem
32
+ };
@@ -0,0 +1,178 @@
1
+ var g = Object.defineProperty;
2
+ var p = (o, a, e) => a in o ? g(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
3
+ var u = (o, a, e) => (p(o, typeof a != "symbol" ? a + "" : a, e), e);
4
+ import v from "./wj-element.js";
5
+ import "./wj-store.js";
6
+ const b = `/*!
7
+ * direction.scss
8
+ */:host{--wj-scroll-hint: 0px;--wj-carousel-width: 100%;--wj-carousel-height: auto}.native-carousel{position:relative;width:var(--wj-carousel-width, 100%);height:var(--wj-carousel-height, 300px);scroll-behavior:smooth}.carousel-slides{display:flex;transition:transform .5s ease;align-items:center;justify-items:center;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;aspect-ratio:var(--wj-aspect-ratio, 4/3);scroll-snap-type:x mandatory;scroll-padding-inline:0;overflow-y:hidden;padding-inline:var(--wj-spacing-inline, 0);gap:.5rem}.carousel-slides::-webkit-scrollbar{display:none}::slotted(wj-carousel-item){flex:0 0 var(--wj-carousel-size, 100%);height:100%}wj-button{position:absolute;top:50%;border:none;cursor:pointer;z-index:2}.prev{left:-1rem;transform:translate(-100%,-50%)}.next{right:-.5rem;transform:translate(100%,-50%)}.pagination{position:absolute;bottom:-.5rem;left:50%;transform:translate(-50%,100%);display:flex;z-index:2}.pagination-item{cursor:pointer;height:15px;width:15px;margin:0 2px;background-color:var(--wj-color-contrast-4);display:inline-block;border-radius:50%}.pagination-item.active{background-color:var(--wj-color)}.thumbnails{display:flex;justify-content:center;align-items:center;overflow-x:auto;gap:.5rem;padding:0 .5rem;margin-top:.5rem;margin-bottom:.5rem;box-sizing:border-box;overflow-y:hidden}.thumbnails wj-thumbnail{--wj-thumbnail-width: 48px;--wj-thumbnail-height: 48px;--wj-thumbnail-border-radius: 0;cursor:pointer;border:1px solid transparent}.thumbnails .active{border:1px solid var(--wj-color-primary-11)}
9
+ `;
10
+ class f extends v {
11
+ constructor() {
12
+ super();
13
+ u(this, "className", "Carousel");
14
+ this.activeSlide = 0, this.slidePerPage = 1;
15
+ }
16
+ set activeSlide(e) {
17
+ this.setAttribute("active-slide", e);
18
+ }
19
+ get activeSlide() {
20
+ return +this.getAttribute("active-slide") || 0;
21
+ }
22
+ get pagination() {
23
+ return this.hasAttribute("pagination");
24
+ }
25
+ get navigation() {
26
+ return this.hasAttribute("navigation");
27
+ }
28
+ get thumbnails() {
29
+ return this.hasAttribute("thumbnails");
30
+ }
31
+ get loop() {
32
+ return this.hasAttribute("loop");
33
+ }
34
+ static get cssStyleSheet() {
35
+ return b;
36
+ }
37
+ static get observedAttributes() {
38
+ return ["active-slide"];
39
+ }
40
+ attributeChangedCallback(e, i, n) {
41
+ e === "active-slide" && (this.pagination && this.changePagination(), this.thumbnails && this.changeThumbnails());
42
+ }
43
+ setupAttributes() {
44
+ this.isShadowRoot = "open";
45
+ }
46
+ draw(e, i, n) {
47
+ let r = document.createDocumentFragment(), t = document.createElement("div");
48
+ t.classList.add("native-carousel");
49
+ let s = document.createElement("div");
50
+ s.classList.add("carousel-slides");
51
+ let l = document.createElement("slot");
52
+ return s.appendChild(l), t.appendChild(s), this.navigation && (t.appendChild(this.createPreviousButton()), t.appendChild(this.createNextButton())), this.pagination && t.appendChild(this.createPagination()), this.thumbnails && t.appendChild(this.createThumbnails()), r.appendChild(t), this.slides = s, this.cloneFirstAndLastItems(), r;
53
+ }
54
+ setIntersectionObserver() {
55
+ this.intersectionObserver = new IntersectionObserver((e) => {
56
+ e.forEach((i) => {
57
+ this.entriesMap.set(i.target, i);
58
+ });
59
+ }, {
60
+ root: this.context.querySelector(".carousel-slides"),
61
+ threshold: 0.5
62
+ }), this.entriesMap = /* @__PURE__ */ new Map(), this.records = this.intersectionObserver.takeRecords(), this.records.forEach((e) => {
63
+ this.entriesMap.set(e.target, e);
64
+ });
65
+ }
66
+ afterDraw() {
67
+ this.setIntersectionObserver(), this.getSlidesWithClones().forEach((i, n) => {
68
+ this.intersectionObserver.observe(i);
69
+ }), this.slidePerPage = this.getAttribute("slide-per-page") || 1;
70
+ let e = 100 / +this.slidePerPage;
71
+ this.style.setProperty("--wj-carousel-size", e + "%"), this.goToSlide(this.activeSlide, "auto"), this.slides.addEventListener("scrollend", (i) => {
72
+ const n = this.getSlides(), t = [...this.entriesMap.values()].find((s) => s.isIntersecting);
73
+ if (t != null && t.target.classList.contains("clone")) {
74
+ const s = t.target.getAttribute("clone-index");
75
+ this.activeSlide = s, this.goToSlide(+s, "auto");
76
+ } else if (t) {
77
+ let s = n.indexOf(t.target);
78
+ this.activeSlide = s;
79
+ }
80
+ });
81
+ }
82
+ goToSlide(e, i = "smooth", n = !0) {
83
+ const r = this.getSlides(), t = this.getSlidesWithClones();
84
+ t.forEach((m, S) => {
85
+ m.classList.remove("active");
86
+ });
87
+ let s = this.loop ? (e + r.length) % r.length : Math.min(Math.max(e, 0), r.length - 1);
88
+ this.activeSlide = s;
89
+ const l = Math.min(Math.max(e + (this.loop ? this.slidePerPage : 0), 0), t.length - 1), c = this.getSlidesWithClones()[l];
90
+ c.classList.add("active");
91
+ let d = c.getBoundingClientRect(), h = this.slides.getBoundingClientRect();
92
+ this.slides.scrollTo({
93
+ left: d.left - h.left + this.slides.scrollLeft,
94
+ top: d.top - h.top + this.slides.scrollTop,
95
+ behavior: i === "smooth" ? "smooth" : "auto"
96
+ });
97
+ }
98
+ cloneFirstAndLastItems() {
99
+ const e = this.getSlides();
100
+ if (e.length && this.loop) {
101
+ const i = e[0].cloneNode(!0);
102
+ i.classList.add("clone"), i.setAttribute("clone-index", 0), this.appendChild(i);
103
+ const n = e[e.length - 1].cloneNode(!0);
104
+ n.classList.add("clone"), n.setAttribute("clone-index", e.length - 1), this.insertBefore(n, this.firstChild);
105
+ }
106
+ }
107
+ removeActiveSlide() {
108
+ this.getSlidesWithClones().forEach((e, i) => {
109
+ e.classList.remove("active");
110
+ }), this.pagination && this.context.querySelectorAll(".pagination-item").forEach((e) => {
111
+ e.classList.remove("active");
112
+ }), this.thumbnails && this.context.querySelectorAll("wj-thumbnail").forEach((e) => {
113
+ e.classList.remove("active");
114
+ });
115
+ }
116
+ changePagination() {
117
+ this.pagination && (this.removeActiveSlide(), this.context.querySelectorAll(".pagination-item").forEach((e, i) => {
118
+ i === this.activeSlide && e.classList.add("active");
119
+ }));
120
+ }
121
+ changeThumbnails() {
122
+ this.thumbnails && (this.removeActiveSlide(), this.context.querySelectorAll("wj-thumbnail").forEach((e, i) => {
123
+ i === this.activeSlide && e.classList.add("active");
124
+ }));
125
+ }
126
+ createNextButton() {
127
+ const e = document.createElement("wj-button");
128
+ return e.classList.add("next"), e.innerHTML = '<wj-icon name="chevron-right" size="large"></wj-icon', e.setAttribute("circle", ""), e.setAttribute("fill", "link"), e.addEventListener("click", (i) => {
129
+ this.nextSlide();
130
+ }), e;
131
+ }
132
+ createPreviousButton() {
133
+ const e = document.createElement("wj-button");
134
+ return e.classList.add("prev"), e.innerHTML = '<wj-icon name="chevron-left" size="large"></wj-icon', e.setAttribute("circle", ""), e.setAttribute("fill", "link"), e.addEventListener("click", (i) => {
135
+ this.previousSlide();
136
+ }), e;
137
+ }
138
+ createPagination() {
139
+ const e = document.createElement("div");
140
+ return e.classList.add("pagination"), this.getSlides().forEach((n, r) => {
141
+ const t = document.createElement("div");
142
+ t.classList.add("pagination-item"), t.addEventListener("click", (s) => {
143
+ this.removeActiveSlide(), s.target.classList.add("active"), this.goToSlide(r);
144
+ }), e.appendChild(t);
145
+ }), e;
146
+ }
147
+ createThumbnails() {
148
+ const e = document.createElement("div");
149
+ return e.classList.add("thumbnails"), this.getSlides().forEach((n, r) => {
150
+ const t = document.createElement("wj-thumbnail");
151
+ t.innerHTML = `<img src="${n.querySelector("wj-img").getAttribute("src")}"></img>`, t.addEventListener("click", (s) => {
152
+ this.removeActiveSlide(), s.target.closest("wj-thumbnail").classList.add("active"), this.goToSlide(r);
153
+ }), e.appendChild(t);
154
+ }), e;
155
+ }
156
+ nextSlide() {
157
+ this.goToSlide(this.activeSlide + this.slidePerPage);
158
+ }
159
+ previousSlide() {
160
+ this.goToSlide(this.activeSlide - this.slidePerPage);
161
+ }
162
+ getSlides() {
163
+ return Array.from(this.querySelectorAll("wj-carousel-item:not(.clone)"));
164
+ }
165
+ getSlidesWithClones() {
166
+ return Array.from(this.querySelectorAll("wj-carousel-item"));
167
+ }
168
+ canGoNext() {
169
+ return this.querySelector(".native-carousel").scrollLeft < this.querySelector(".native-carousel").scrollWidth;
170
+ }
171
+ canGoPrevious() {
172
+ return this.querySelector(".native-carousel").scrollLeft > 0;
173
+ }
174
+ }
175
+ customElements.get("wj-carousel") || window.customElements.define("wj-carousel", f);
176
+ export {
177
+ f as Carousel
178
+ };
@@ -1,17 +1,17 @@
1
- var b = Object.defineProperty;
2
- var l = (c, t, e) => t in c ? b(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
3
- var n = (c, t, e) => (l(c, typeof t != "symbol" ? t + "" : t, e), e);
4
- import h, { event as r } from "./wj-element.js";
1
+ var l = Object.defineProperty;
2
+ var b = (c, t, e) => t in c ? l(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
3
+ var i = (c, t, e) => (b(c, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import h, { event as n } from "./wj-element.js";
5
5
  import "./wj-store.js";
6
6
  const s = `/*!
7
7
  * direction.scss
8
- */:host{--wj-checkbox-margin-top: 0;--wj-checkbox-margin-bottom: .5rem;--wj-checkbox-margin-inline: 0;--wj-checkbox-width: 16px;--wj-checkbox-height: 16px;display:block;margin-top:var(--wj-checkbox-margin-top);margin-bottom:var(--wj-checkbox-margin-bottom);margin-inline:var(--wj-checkbox-margin-inline);line-height:100%;padding-left:0}:host label{display:inline-block;cursor:pointer;position:relative;padding-left:25px;min-width:var(--wj-checkbox-width);min-height:var(--wj-checkbox-height);margin-bottom:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host label:before{content:"";position:absolute;width:16px;height:16px;left:0;-webkit-box-sizing:inherit;box-sizing:border-box;background-color:#fff;border:1px solid #c9c9c9}.native-checkbox label{transition:border .14s linear 0s,color .14s linear 0s,background-color .14s linear 0s}.native-checkbox label:hover{color:#212121}.native-checkbox label:before{border-radius:3px;transition:border .14s linear 0s,color .14s linear 0s,background-color .14s linear 0s}.native-checkbox input[type=checkbox]{position:absolute;margin:0;z-index:-1;width:16px;height:16px;opacity:0;display:none}.native-checkbox input[type=checkbox]+label:after{content:"";position:absolute;left:0;border-right:0 solid transparent;border-bottom:0 solid transparent;width:16px;height:16px;overflow:hidden}.native-checkbox.checkbox-circle label:after{border-radius:99px}.native-checkbox.checkbox-circle label:before{border-radius:99px}.native-checkbox input[type=checkbox]:checked+label:after{content:"";background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAQAgMAAADsa5zLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURUdwTHBwcG9vb3BwcBFjhIYAAAAEdFJOUwBG9tQE3MceAAAAVUlEQVQoz2NgGLKA0QGIDwDxBSCeAMEYgAWI2YCK2CagYgwgDcRSDhgYbAkKzsSKGdgakCyY6ADES7BiiCkgJ4PYyybgxAhQAsRZDrgxCpDEg4cAAAAp2ibhZRGLHgAAAABJRU5ErkJggg==) left center;background-size:160px 16px;background-repeat:no-repeat;animation-name:checkbox-check;animation-duration:.32s;animation-timing-function:steps(9);animation-fill-mode:forwards;animation-iteration-count:1}.native-checkbox input[type=checkbox]:hover:active:not(:checked)+label:before{background-color:#00000014}.native-checkbox input[type=checkbox]:focus+label{color:#212121}.native-checkbox input[type=checkbox]:focus+label:before{outline:none!important;box-shadow:0 0 #78c8fe}.native-checkbox input[type=checkbox][disabled]+label{cursor:not-allowed!important;color:#4b4b4b;opacity:.58}.native-checkbox input[type=checkbox][disabled]+label:before{cursor:not-allowed!important;background:#ececec}.native-checkbox input[type=checkbox]:indeterminate+label:after{background:none;background-color:#4b4b4b;width:10px;height:2px;top:6px;margin:3px;border-radius:2px}.native-checkbox.right label{padding-left:0;padding-right:26px}.native-checkbox.right label:before{right:0;left:auto}.native-checkbox.right input[type=checkbox]:checked+label{position:relative}.native-checkbox.right input[type=checkbox]:checked+label:after{position:absolute;right:0;left:auto}.success input[type=checkbox]:checked+label:before,.success input[type=checkbox]:indeterminate+label:before{border-color:#19ad79;background-color:#19ad79}.primary input[type=checkbox]:checked+label:before,.primary input[type=checkbox]:indeterminate+label:before{border-color:#7252d3;background-color:#7252d3}.complete input[type=checkbox]:checked+label:before,.complete input[type=checkbox]:indeterminate+label:before{border-color:#0072ec;background-color:#0072ec}.warning input[type=checkbox]:checked+label:before,.warning input[type=checkbox]:indeterminate+label:before{border-color:#ffd945;background-color:#ffd945}.danger input[type=checkbox]:checked+label:before,.danger input[type=checkbox]:indeterminate+label:before{border-color:#d83c31;background-color:#d83c31}.info input[type=checkbox]:checked+label:before,.info input[type=checkbox]:indeterminate+label:before{border-color:#3b4752;background-color:#3b4752}.info input[type=checkbox]:checked+label:after,.danger input[type=checkbox]:checked+label:after,.complete input[type=checkbox]:checked+label:after,.primary input[type=checkbox]:checked+label:after,.success input[type=checkbox]:checked+label:after{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAQAgMAAADsa5zLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURUdwTP///////////waf0AoAAAAEdFJOUwBG9tQE3MceAAAAVUlEQVQoz2NgGLKA0QGIDwDxBSCeAMEYgAWI2YCK2CagYgwgDcRSDhgYbAkKzsSKGdgakCyY6ADES7BiiCkgJ4PYyybgxAhQAsRZDrgxCpDEg4cAAAAp2ibhZRGLHgAAAABJRU5ErkJggg==) left center}.info input[type=checkbox]:indeterminate+label:after,.danger input[type=checkbox]:indeterminate+label:after,.complete input[type=checkbox]:indeterminate+label:after,.primary input[type=checkbox]:indeterminate+label:after,.success input[type=checkbox]:indeterminate+label:after{background-color:#fff}@keyframes shrink-bounce{0%{transform:scale(1)}33%{transform:scale(.85)}to{transform:scale(1)}}@keyframes checkbox-check{0%{background-position:0px}to{background-position:-144px}}.js-focus-visible .native-checkbox input[type=checkbox]:focus:not(.focus-visible)+label:before{box-shadow:none}input[type=checkbox]{accent-color:#7252D3!important;font-size:50px}
8
+ */:host{--wj-grey-check-icon: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAQAgMAAADsa5zLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURUdwTHBwcG9vb3BwcBFjhIYAAAAEdFJOUwBG9tQE3MceAAAAVUlEQVQoz2NgGLKA0QGIDwDxBSCeAMEYgAWI2YCK2CagYgwgDcRSDhgYbAkKzsSKGdgakCyY6ADES7BiiCkgJ4PYyybgxAhQAsRZDrgxCpDEg4cAAAAp2ibhZRGLHgAAAABJRU5ErkJggg==) left center;--wj-white-check-icon: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAQAgMAAADsa5zLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURUdwTP///////////waf0AoAAAAEdFJOUwBG9tQE3MceAAAAVUlEQVQoz2NgGLKA0QGIDwDxBSCeAMEYgAWI2YCK2CagYgwgDcRSDhgYbAkKzsSKGdgakCyY6ADES7BiiCkgJ4PYyybgxAhQAsRZDrgxCpDEg4cAAAAp2ibhZRGLHgAAAABJRU5ErkJggg==) left center;--wj-checkbox-margin-top: 0;--wj-checkbox-margin-bottom: .5rem;--wj-checkbox-margin-inline: 0;--wj-checkbox-width: 16px;--wj-checkbox-height: 16px;display:block;margin-top:var(--wj-checkbox-margin-top);margin-bottom:var(--wj-checkbox-margin-bottom);margin-inline:var(--wj-checkbox-margin-inline);line-height:100%;padding-left:0}:host label{display:inline-block;cursor:pointer;position:relative;padding-left:25px;min-width:var(--wj-checkbox-width);min-height:var(--wj-checkbox-height);margin-bottom:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host label:before{content:"";position:absolute;width:16px;height:16px;left:0;-webkit-box-sizing:inherit;box-sizing:border-box;background-color:var(--wj-color-contrast-lowest);border:1px solid var(--wj-border-color)}.native-checkbox label{transition:border .14s linear 0s,color .14s linear 0s,background-color .14s linear 0s}.native-checkbox label:hover{color:var(--wj-color-contrast-higher)}.native-checkbox label:before{border-radius:3px;transition:border .14s linear 0s,color .14s linear 0s,background-color .14s linear 0s}.native-checkbox input[type=checkbox]{position:absolute;margin:0;z-index:-1;width:16px;height:16px;opacity:0;display:none}.native-checkbox input[type=checkbox]+label:after{content:"";position:absolute;left:0;border-right:0 solid transparent;border-bottom:0 solid transparent;width:16px;height:16px;overflow:hidden}.native-checkbox.checkbox-circle label:after{border-radius:99px}.native-checkbox.checkbox-circle label:before{border-radius:99px}.native-checkbox input[type=checkbox]:checked+label:after{content:"";background:var(--wj-grey-check-icon);background-size:160px 16px;background-repeat:no-repeat;animation-name:checkbox-check;animation-duration:.32s;animation-timing-function:steps(9);animation-fill-mode:forwards;animation-iteration-count:1}.native-checkbox input[type=checkbox]:hover:active:not(:checked)+label:before{background-color:#00000014}.native-checkbox input[type=checkbox]:focus+label{color:var(--wj-color-contrast-higher)}.native-checkbox input[type=checkbox]:focus+label:before{outline:none!important;box-shadow:0 0 #78c8fe}.native-checkbox input[type=checkbox][disabled]+label{cursor:not-allowed!important;color:var(--wj-color-contrast-high);opacity:.58}.native-checkbox input[type=checkbox][disabled]+label:before{cursor:not-allowed!important;background:#ececec}.native-checkbox input[type=checkbox]:indeterminate+label:after{background:none;background-color:var(--wj-color-contrast-high);width:10px;height:2px;top:6px;margin:3px;border-radius:2px}.native-checkbox.right label{padding-left:0;padding-right:26px}.native-checkbox.right label:before{right:0;left:auto}.native-checkbox.right input[type=checkbox]:checked+label{position:relative}.native-checkbox.right input[type=checkbox]:checked+label:after{position:absolute;right:0;left:auto}.success input[type=checkbox]:checked+label:before,.success input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-success);background-color:var(--wj-color-success)}.primary input[type=checkbox]:checked+label:before,.primary input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-primary);background-color:var(--wj-color-primary)}.complete input[type=checkbox]:checked+label:before,.complete input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-complete);background-color:var(--wj-color-complete)}.warning input[type=checkbox]:checked+label:before,.warning input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-warning);background-color:var(--wj-color-warning)}.danger input[type=checkbox]:checked+label:before,.danger input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-danger);background-color:var(--wj-color-danger)}.info input[type=checkbox]:checked+label:before,.info input[type=checkbox]:indeterminate+label:before{border-color:var(--wj-color-info);background-color:var(--wj-color-info)}.info input[type=checkbox]:checked+label:after,.danger input[type=checkbox]:checked+label:after,.complete input[type=checkbox]:checked+label:after,.primary input[type=checkbox]:checked+label:after,.success input[type=checkbox]:checked+label:after{background:var(--wj-white-check-icon)}.info input[type=checkbox]:indeterminate+label:after,.danger input[type=checkbox]:indeterminate+label:after,.complete input[type=checkbox]:indeterminate+label:after,.primary input[type=checkbox]:indeterminate+label:after,.success input[type=checkbox]:indeterminate+label:after{background-color:var(--wj-color-contrast-lowest)}@keyframes shrink-bounce{0%{transform:scale(1)}33%{transform:scale(.85)}to{transform:scale(1)}}@keyframes checkbox-check{0%{background-position:0}to{background-position:-144px}}.js-focus-visible .native-checkbox input[type=checkbox]:focus:not(.focus-visible)+label:before{box-shadow:none}input[type=checkbox]{accent-color:var(--wj-color-primary)!important;font-size:50px}
9
9
  `;
10
10
  class d extends h {
11
11
  constructor() {
12
12
  super();
13
- n(this, "className", "Checkbox");
14
- n(this, "inputEvent", (e) => {
13
+ i(this, "className", "Checkbox");
14
+ i(this, "inputEvent", (e) => {
15
15
  this.checked = e.target.checked;
16
16
  });
17
17
  this._checked = !1;
@@ -34,14 +34,14 @@ class d extends h {
34
34
  draw(e, p, k) {
35
35
  let a = document.createDocumentFragment(), o = document.createElement("div");
36
36
  o.classList.add("native-checkbox"), this.variant === "circle" && o.classList.add("checkbox-circle"), this.color && o.classList.add(this.color), this.input = document.createElement("input"), this.input.type = "checkbox", this.input.id = "checkbox", this.input.name = this.name = "checkbox", this.input.checked = this.hasAttribute("checked"), this.input.disabled = this.hasAttribute("disabled"), this.input.indeterminate = this.hasAttribute("indeterminate");
37
- let i = document.createElement("label");
38
- return i.htmlFor = "checkbox", i.innerHTML = "<slot></slot>", o.appendChild(this.input), o.appendChild(i), a.appendChild(o), a;
37
+ let r = document.createElement("label");
38
+ return r.htmlFor = "checkbox", r.innerHTML = "<slot></slot>", o.appendChild(this.input), o.appendChild(r), a.appendChild(o), a;
39
39
  }
40
40
  afterDraw() {
41
- r.addListener(this, "click", "wj:checkbox:change"), r.addListener(this, "click", "wj:checkbox:input");
41
+ n.addListener(this, "click", "wj:checkbox:change"), n.addListener(this, "click", "wj:checkbox:input");
42
42
  }
43
43
  disconnectedCallback() {
44
- r.removeElement(this);
44
+ n.removeElement(this);
45
45
  }
46
46
  }
47
47
  customElements.get("wj-checkbox") || window.customElements.define("wj-checkbox", d);
package/dist/wj-chip.js CHANGED
@@ -1,36 +1,36 @@
1
1
  var l = Object.defineProperty;
2
- var d = (o, t, e) => t in o ? l(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var c = (o, t, e) => (d(o, typeof t != "symbol" ? t + "" : t, e), e);
4
- import p, { event as h } from "./wj-element.js";
2
+ var d = (r, o, t) => o in r ? l(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
+ var n = (r, o, t) => (d(r, typeof o != "symbol" ? o + "" : o, t), t);
4
+ import w, { event as h } from "./wj-element.js";
5
5
  import "./wj-store.js";
6
- const m = `/*!
6
+ const j = `/*!
7
7
  * direction.scss
8
- */:host(.wj-color-primary){--wj-color-base: #eae0fb !important;--wj-color-contrast: #845ae0 !important}:host(.wj-color-complete){--wj-color-base: #d3eeff !important;--wj-color-contrast: #0f8ff9 !important}:host(.wj-color-success){--wj-color-base: #d6f7f0 !important;--wj-color-contrast: #26bf93 !important}:host(.wj-color-warning){--wj-color-base: #fffde1 !important;--wj-color-contrast: #ffe858 !important}:host(.wj-color-danger){--wj-color-base: #fde2da !important;--wj-color-contrast: #e6533c !important}:host(.wj-color-info){--wj-color-base: #dbe6e8 !important;--wj-color-contrast: #475b6b !important}:host(.wj-color-menu){--wj-color-base: #f4f4f4 !important;--wj-color-contrast: #21252d !important}:host{--wj-chip-border-radius: 100px;--wj-chip-background: #e0e0e0;--wj-chip-color: #4b4b4b;--wj-chip-margin: 0;margin:var(--wj-chip-margin)}.native-chip{display:inline-flex;justify-content:center;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Inter UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:500;font-size:14px;letter-spacing:-.006em;margin:0;padding:.5rem .75rem;text-align:center;cursor:pointer;white-space:nowrap;background:var(--wj-chip-background);color:var(--wj-chip-color);text-shadow:none;box-shadow:none;border:0 none;line-height:14px;min-height:28px;height:28px;width:100%;max-width:fit-content;min-width:28px;position:relative;transition:width .15s cubic-bezier(.4,0,.2,1);border-radius:var(--wj-chip-border-radius);overflow:hidden;vertical-align:middle;box-sizing:border-box}:host(.focus){box-shadow:none}:host(:hover:not(.wj-active)) .native-chip{background:#f4f4f4;color:#4b4b4b}:host(.wj-active) .native-chip{background:red;border:1px solid rgba(33,33,33,.2);border-bottom:1px solid rgba(33,33,33,.29);color:#4b4b4b}:host(:focus,:active:focus,.wj-active:focus){outline:none!important;box-shadow:0 0 #78c8fe}.check{display:none}:host([active]) .check{display:block;margin-inline:4px 0}:host(.wj-disabled){background:#f4f4f4;color:#757575;border:0;pointer-events:none;cursor:not-allowed}::slotted(wj-avatar){width:22px;height:22px}::slotted(wj-avatar:first-child){margin-inline:-8px 8px;margin-top:-4px;margin-bottom:-4px}:host(.wj-color) .native-chip{background-color:var(--wj-color-base, red);color:var(--wj-color-contrast)}::slotted(wj-icon:first-child){margin:-4px 8px -4px -4px}::slotted(wj-icon:last-child){margin:-4px -4px -4px 8px}wj-button{--wj-button-border-radius: 50%;--wj-button-margin-inline: .25rem -.5rem;--wj-padding-top: .15rem;--wj-padding-start: .15rem;--wj-padding-end: .15rem;--wj-padding-bottom: .15rem}
8
+ */:host{--wj-chip-border-radius: 100px;--wj-chip-background: var();--wj-chip-color: #4b4b4b;--wj-chip-margin: 0;--wj-card-background: var(--wj-color-contrast-2);--wj-card-color: var(--wj-color);margin:var(--wj-chip-margin)}:host(.wj-color-primary){--wj-card-background: var(--wj-color-primary)}:host(.wj-color-complete){--wj-card-background: var(--wj-color-complete)}:host(.wj-color-success){--wj-card-background: var(--wj-color-success)}:host(.wj-color-warning){--wj-card-background: var(--wj-color-warning)}:host(.wj-color-danger){--wj-card-background: var(--wj-color-danger)}:host(.wj-color-info){--wj-card-background: var(--wj-color-info)}:host(.wj-color-menu){--wj-card-background: var(--wj-color-menu)}:host(.wj-color-primary){--wj-card-color: var(--wj-color-white)}:host(.wj-color-complete){--wj-card-color: var(--wj-color-white)}:host(.wj-color-success){--wj-card-color: var(--wj-color-white)}:host(.wj-color-warning){--wj-card-color: var(--wj-color)}:host(.wj-color-danger){--wj-card-color: var(--wj-color-white)}:host(.wj-color-info){--wj-card-color: var(--wj-color-white)}:host(.wj-color-menu){--wj-card-color: var(--wj-color-white) !important}.native-chip{display:inline-flex;justify-content:center;align-items:center;font-size:14px;letter-spacing:-.006em;margin:0;padding:.5rem .75rem;text-align:center;cursor:pointer;white-space:nowrap;background:var(--wj-chip-background);color:var(--wj-chip-color);text-shadow:none;box-shadow:none;border:0 none;line-height:14px;min-height:28px;height:28px;width:100%;max-width:fit-content;min-width:28px;position:relative;transition:width .15s cubic-bezier(.4,0,.2,1);border-radius:var(--wj-chip-border-radius);overflow:hidden;vertical-align:middle;box-sizing:border-box}:host(.focus){box-shadow:none}:host(:hover:not(.wj-active)) .native-chip{background:var(--wj-color-contrast-3);color:var(--wj-color)}:host(.wj-active) .native-chip{border:1px solid rgba(33,33,33,.2)}:host(:focus,:active:focus,.wj-active:focus){outline:none!important;box-shadow:0 0 #78c8fe}.check{display:none}:host([active]) .check{display:block;margin-inline:4px 0}:host(.wj-disabled){background:#f4f4f4;color:#757575;border:0;pointer-events:none;cursor:not-allowed}::slotted(wj-avatar){width:22px;height:22px}::slotted(wj-avatar:first-child){margin-inline:-8px 8px;margin-top:-4px;margin-bottom:-4px}:host .native-chip{background-color:var(--wj-card-background, #fff);color:var(--wj-card-color)}::slotted(wj-icon:first-child){margin:-4px 8px -4px -4px}::slotted(wj-icon:last-child){margin:-4px -4px -4px 8px}wj-button{--wj-button-border-radius: 50%;--wj-button-margin-inline: .25rem -.5rem;--wj-padding-top: .15rem;--wj-padding-start: .15rem;--wj-padding-end: .15rem;--wj-padding-bottom: .15rem}
9
9
  `;
10
- class w extends p {
10
+ class p extends w {
11
11
  constructor() {
12
12
  super();
13
- c(this, "className", "Chip");
13
+ n(this, "className", "Chip");
14
14
  }
15
15
  static get cssStyleSheet() {
16
- return m;
16
+ return j;
17
17
  }
18
18
  setupAttributes() {
19
19
  this.isShadowRoot = "open";
20
20
  }
21
- draw(e, b, j) {
22
- let a = document.createDocumentFragment(), r = document.createElement("div");
23
- r.classList.add("native-chip");
24
- let s = document.createElement("slot"), i = document.createElement("wj-button");
25
- i.setAttribute("part", "remove"), i.setAttribute("variant", "link"), i.innerHTML = '<wj-icon name="x"></wj-icon>';
26
- let n = document.createElement("wj-icon");
27
- return n.setAttribute("name", "check"), n.classList.add("check"), this.color && this.classList.add("wj-color-" + this.color, "wj-color"), this.disabled && this.classList.add("wj-disabled"), this.outline && this.classList.add("wj-outline"), r.appendChild(s), r.appendChild(n), this.hasAttribute("removable") && r.appendChild(i), a.appendChild(r), this.remove = i, a;
21
+ draw(t, m, u) {
22
+ let a = document.createDocumentFragment(), e = document.createElement("div");
23
+ e.classList.add("native-chip");
24
+ let s = document.createElement("slot"), c = document.createElement("wj-button");
25
+ c.setAttribute("part", "remove"), c.setAttribute("fill", "link"), c.innerHTML = '<wj-icon name="x"></wj-icon>';
26
+ let i = document.createElement("wj-icon");
27
+ return i.setAttribute("name", "check"), i.classList.add("check"), this.color && this.classList.add("wj-color-" + this.color, "wj-color"), this.disabled && this.classList.add("wj-disabled"), this.outline && this.classList.add("wj-outline"), e.appendChild(s), e.appendChild(i), this.hasAttribute("removable") && e.appendChild(c), a.appendChild(e), this.remove = c, a;
28
28
  }
29
29
  afterDraw() {
30
30
  h.addListener(this.remove, "click", "wj:chip-remove", null, { stopPropagation: !0 });
31
31
  }
32
32
  }
33
- customElements.get("wj-chip") || window.customElements.define("wj-chip", w);
33
+ customElements.get("wj-chip") || window.customElements.define("wj-chip", p);
34
34
  export {
35
- w as Chip
35
+ p as Chip
36
36
  };