wj-elements 0.0.11 → 0.0.13

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 (79) hide show
  1. package/dist/localize-20081fd1.js +55 -0
  2. package/dist/router-links-26e4a166.js +204 -0
  3. package/dist/style.css +2243 -2
  4. package/dist/wj-animation.js +35 -23
  5. package/dist/wj-aside.js +22 -16
  6. package/dist/wj-avatar.js +49 -30
  7. package/dist/wj-badge.js +22 -18
  8. package/dist/wj-breadcrumb.js +102 -50
  9. package/dist/wj-breadcrumbs.js +36 -19
  10. package/dist/wj-button-group.js +36 -22
  11. package/dist/wj-button.js +104 -39
  12. package/dist/wj-card-content.js +18 -14
  13. package/dist/wj-card-controls.js +18 -14
  14. package/dist/wj-card-header.js +20 -14
  15. package/dist/wj-card-subtitle.js +19 -15
  16. package/dist/wj-card-title.js +18 -14
  17. package/dist/wj-card.js +20 -14
  18. package/dist/wj-carousel-item.js +22 -16
  19. package/dist/wj-carousel.js +169 -92
  20. package/dist/wj-checkbox.js +46 -24
  21. package/dist/wj-chip.js +39 -21
  22. package/dist/wj-col.js +31 -17
  23. package/dist/wj-color-picker.js +877 -509
  24. package/dist/wj-container.js +20 -16
  25. package/dist/wj-copy-button.js +112 -64
  26. package/dist/wj-dialog.js +68 -42
  27. package/dist/wj-divider.js +20 -14
  28. package/dist/wj-dropdown.js +29 -17
  29. package/dist/wj-element.js +415 -241
  30. package/dist/wj-fetchAndParseCSS.js +49 -32
  31. package/dist/wj-file-upload-item.js +64 -38
  32. package/dist/wj-file-upload.js +237 -137
  33. package/dist/wj-footer.js +18 -14
  34. package/dist/wj-form.js +18 -14
  35. package/dist/wj-format-digital.js +40 -25
  36. package/dist/wj-grid.js +20 -16
  37. package/dist/wj-header.js +22 -16
  38. package/dist/wj-icon-picker.js +122 -68
  39. package/dist/wj-icon.js +144 -64
  40. package/dist/wj-img-comparer.js +72 -41
  41. package/dist/wj-img.js +31 -19
  42. package/dist/wj-infinite-scroll.js +90 -52
  43. package/dist/wj-input-file.js +50 -27
  44. package/dist/wj-input.js +169 -70
  45. package/dist/wj-item.js +34 -17
  46. package/dist/wj-label.js +21 -19
  47. package/dist/wj-list.js +20 -15
  48. package/dist/wj-main.js +18 -14
  49. package/dist/wj-masonry.js +140 -83
  50. package/dist/wj-master.js +492 -350
  51. package/dist/wj-menu-button.js +19 -15
  52. package/dist/wj-menu-item.js +150 -64
  53. package/dist/wj-menu-label.js +21 -17
  54. package/dist/wj-menu.js +24 -18
  55. package/dist/wj-popup.js +1140 -712
  56. package/dist/wj-progress-bar.js +100 -40
  57. package/dist/wj-radio-group.js +38 -25
  58. package/dist/wj-radio.js +46 -22
  59. package/dist/wj-rate.js +121 -71
  60. package/dist/wj-relative-time.js +48 -24
  61. package/dist/wj-route.js +11 -8
  62. package/dist/wj-router-link.js +22 -17
  63. package/dist/wj-router-outlet.js +135 -71
  64. package/dist/wj-routerx.js +1124 -641
  65. package/dist/wj-row.js +21 -19
  66. package/dist/wj-slider.js +97 -55
  67. package/dist/wj-split-view.js +81 -43
  68. package/dist/wj-store.js +195 -110
  69. package/dist/wj-textarea.js +86 -37
  70. package/dist/wj-thumbnail.js +19 -15
  71. package/dist/wj-toast.js +87 -34
  72. package/dist/wj-toggle.js +42 -24
  73. package/dist/wj-toolbar-action.js +27 -16
  74. package/dist/wj-toolbar.js +26 -19
  75. package/dist/wj-tooltip.js +40 -24
  76. package/dist/wj-visually-hidden.js +18 -14
  77. package/package.json +1 -1
  78. package/dist/localize-762a9f0f.js +0 -43
  79. package/dist/router-links-e0087f84.js +0 -146
package/dist/wj-row.js CHANGED
@@ -1,33 +1,35 @@
1
- var m = Object.defineProperty;
2
- var w = (e, t, g) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: g }) : e[t] = g;
3
- var o = (e, t, g) => (w(e, typeof t != "symbol" ? t + "" : t, g), g);
4
- import l from "./wj-element.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import WJElement from "./wj-element.js";
5
8
  import "./wj-store.js";
6
- const u = `/*!
7
- * direction.scss
8
- */:host{display:flex;flex-wrap:wrap}:host(.wj-wrap){flex-wrap:wrap!important}:host{--wj-gutter-x: 1.5rem;--wj-gutter-y: 0;display:flex;flex-wrap:nowrap;margin-top:calc(var(--wj-gutter-y) * -1);margin-right:calc(var(--wj-gutter-x) * -.5);margin-left:calc(var(--wj-gutter-x) * -.5)}:host(.g-0),:host(.gx-0){--wj-gutter-x: 0}:host(.g-0),:host(.gy-0){--wj-gutter-y: 0}:host(.g-1),:host(.gx-1){--wj-gutter-x: .25rem}:host(.g-1),:host(.gy-1){--wj-gutter-y: .25rem}:host(.g-2),:host(.gx-2){--wj-gutter-x: .5rem}:host(.g-2),:host(.gy-2){--wj-gutter-y: .5rem}:host(.g-3),:host(.gx-3){--wj-gutter-x: 1rem}:host(.g-3),:host(.gy-3){--wj-gutter-y: 1rem}:host(.g-4),:host(.gx-4){--wj-gutter-x: 1.5rem}:host(.g-4),:host(.gy-4){--wj-gutter-y: 1.5rem}:host(.g-5),:host(.gx-5){--wj-gutter-x: 3rem}:host(.g-5),:host(.gy-5){--wj-gutter-y: 3rem}@media (min-width: 576px){:host(.g-sm-0),:host(.gx-sm-0){--wj-gutter-x: 0}:host(.g-sm-0),:host(.gy-sm-0){--wj-gutter-y: 0}:host(.g-sm-1),:host(.gx-sm-1){--wj-gutter-x: .25rem}:host(.g-sm-1),:host(.gy-sm-1){--wj-gutter-y: .25rem}:host(.g-sm-2),:host(.gx-sm-2){--wj-gutter-x: .5rem}:host(.g-sm-2),:host(.gy-sm-2){--wj-gutter-y: .5rem}:host(.g-sm-3),:host(.gx-sm-3){--wj-gutter-x: 1rem}:host(.g-sm-3),:host(.gy-sm-3){--wj-gutter-y: 1rem}:host(.g-sm-4),:host(.gx-sm-4){--wj-gutter-x: 1.5rem}:host(.g-sm-4),:host(.gy-sm-4){--wj-gutter-y: 1.5rem}:host(.g-sm-5),:host(.gx-sm-5){--wj-gutter-x: 3rem}:host(.g-sm-5),:host(.gy-sm-5){--wj-gutter-y: 3rem}}@media (min-width: 768px){:host(.g-md-0),:host(.gx-md-0){--wj-gutter-x: 0}:host(.g-md-0),:host(.gy-md-0){--wj-gutter-y: 0}:host(.g-md-1),:host(.gx-md-1){--wj-gutter-x: .25rem}:host(.g-md-1),:host(.gy-md-1){--wj-gutter-y: .25rem}:host(.g-md-2),:host(.gx-md-2){--wj-gutter-x: .5rem}:host(.g-md-2),:host(.gy-md-2){--wj-gutter-y: .5rem}:host(.g-md-3),:host(.gx-md-3){--wj-gutter-x: 1rem}:host(.g-md-3),:host(.gy-md-3){--wj-gutter-y: 1rem}:host(.g-md-4),:host(.gx-md-4){--wj-gutter-x: 1.5rem}:host(.g-md-4),:host(.gy-md-4){--wj-gutter-y: 1.5rem}:host(.g-md-5),:host(.gx-md-5){--wj-gutter-x: 3rem}:host(.g-md-5),:host(.gy-md-5){--wj-gutter-y: 3rem}}@media (min-width: 992px){:host(.g-lg-0),:host(.gx-lg-0){--wj-gutter-x: 0}:host(.g-lg-0),:host(.gy-lg-0){--wj-gutter-y: 0}:host(.g-lg-1),:host(.gx-lg-1){--wj-gutter-x: .25rem}:host(.g-lg-1),:host(.gy-lg-1){--wj-gutter-y: .25rem}:host(.g-lg-2),:host(.gx-lg-2){--wj-gutter-x: .5rem}:host(.g-lg-2),:host(.gy-lg-2){--wj-gutter-y: .5rem}:host(.g-lg-3),:host(.gx-lg-3){--wj-gutter-x: 1rem}:host(.g-lg-3),:host(.gy-lg-3){--wj-gutter-y: 1rem}:host(.g-lg-4),:host(.gx-lg-4){--wj-gutter-x: 1.5rem}:host(.g-lg-4),:host(.gy-lg-4){--wj-gutter-y: 1.5rem}:host(.g-lg-5),:host(.gx-lg-5){--wj-gutter-x: 3rem}:host(.g-lg-5),:host(.gy-lg-5){--wj-gutter-y: 3rem}}@media (min-width: 1200px){:host(.g-xl-0),:host(.gx-xl-0){--wj-gutter-x: 0}:host(.g-xl-0),:host(.gy-xl-0){--wj-gutter-y: 0}:host(.g-xl-1),:host(.gx-xl-1){--wj-gutter-x: .25rem}:host(.g-xl-1),:host(.gy-xl-1){--wj-gutter-y: .25rem}:host(.g-xl-2),:host(.gx-xl-2){--wj-gutter-x: .5rem}:host(.g-xl-2),:host(.gy-xl-2){--wj-gutter-y: .5rem}:host(.g-xl-3),:host(.gx-xl-3){--wj-gutter-x: 1rem}:host(.g-xl-3),:host(.gy-xl-3){--wj-gutter-y: 1rem}:host(.g-xl-4),:host(.gx-xl-4){--wj-gutter-x: 1.5rem}:host(.g-xl-4),:host(.gy-xl-4){--wj-gutter-y: 1.5rem}:host(.g-xl-5),:host(.gx-xl-5){--wj-gutter-x: 3rem}:host(.g-xl-5),:host(.gy-xl-5){--wj-gutter-y: 3rem}}@media (min-width: 1400px){:host(.g-xxl-0),:host(.gx-xxl-0){--wj-gutter-x: 0}:host(.g-xxl-0),:host(.gy-xxl-0){--wj-gutter-y: 0}:host(.g-xxl-1),:host(.gx-xxl-1){--wj-gutter-x: .25rem}:host(.g-xxl-1),:host(.gy-xxl-1){--wj-gutter-y: .25rem}:host(.g-xxl-2),:host(.gx-xxl-2){--wj-gutter-x: .5rem}:host(.g-xxl-2),:host(.gy-xxl-2){--wj-gutter-y: .5rem}:host(.g-xxl-3),:host(.gx-xxl-3){--wj-gutter-x: 1rem}:host(.g-xxl-3),:host(.gy-xxl-3){--wj-gutter-y: 1rem}:host(.g-xxl-4),:host(.gx-xxl-4){--wj-gutter-x: 1.5rem}:host(.g-xxl-4),:host(.gy-xxl-4){--wj-gutter-y: 1.5rem}:host(.g-xxl-5),:host(.gx-xxl-5){--wj-gutter-x: 3rem}:host(.g-xxl-5),:host(.gy-xxl-5){--wj-gutter-y: 3rem}}:host(.wj-justify-content-center){justify-content:center!important}:host(.wj-justify-content-end){justify-content:flex-end!important}:host(.wj-justify-content-between){justify-content:space-between!important}:host(.wj-justify-content-around){justify-content:space-around!important}:host(.wj-align-items-start){align-items:baseline!important}:host(.wj-align-items-center){align-items:center!important}:host(.wj-align-items-end){align-items:flex-end!important}
9
- `;
10
- class j extends l {
9
+ const styles = "/*!\n* direction.scss\n*/\n/* Skeleton Variables */\n/*\n[ Row ]\n*/\n:host {\n display: flex;\n flex-wrap: wrap;\n}\n:host(.wj-wrap) {\n flex-wrap: wrap !important;\n}\n:host {\n --wj-gutter-x: 1.5rem;\n --wj-gutter-y: 0;\n display: flex;\n flex-wrap: nowrap;\n margin-top: calc(var(--wj-gutter-y) * -1);\n margin-right: calc(var(--wj-gutter-x) * -0.5);\n margin-left: calc(var(--wj-gutter-x) * -0.5);\n}\n:host(.g-0),\n:host(.gx-0) {\n --wj-gutter-x: 0;\n}\n:host(.g-0),\n:host(.gy-0) {\n --wj-gutter-y: 0;\n}\n:host(.g-1),\n:host(.gx-1) {\n --wj-gutter-x: 0.25rem;\n}\n:host(.g-1),\n:host(.gy-1) {\n --wj-gutter-y: 0.25rem;\n}\n:host(.g-2),\n:host(.gx-2) {\n --wj-gutter-x: 0.5rem;\n}\n:host(.g-2),\n:host(.gy-2) {\n --wj-gutter-y: 0.5rem;\n}\n:host(.g-3),\n:host(.gx-3) {\n --wj-gutter-x: 1rem;\n}\n:host(.g-3),\n:host(.gy-3) {\n --wj-gutter-y: 1rem;\n}\n:host(.g-4),\n:host(.gx-4) {\n --wj-gutter-x: 1.5rem;\n}\n:host(.g-4),\n:host(.gy-4) {\n --wj-gutter-y: 1.5rem;\n}\n:host(.g-5),\n:host(.gx-5) {\n --wj-gutter-x: 3rem;\n}\n:host(.g-5),\n:host(.gy-5) {\n --wj-gutter-y: 3rem;\n}\n@media (min-width: 576px) {\n :host(.g-sm-0),\n :host(.gx-sm-0) {\n --wj-gutter-x: 0;\n }\n :host(.g-sm-0),\n :host(.gy-sm-0) {\n --wj-gutter-y: 0;\n }\n :host(.g-sm-1),\n :host(.gx-sm-1) {\n --wj-gutter-x: 0.25rem;\n }\n :host(.g-sm-1),\n :host(.gy-sm-1) {\n --wj-gutter-y: 0.25rem;\n }\n :host(.g-sm-2),\n :host(.gx-sm-2) {\n --wj-gutter-x: 0.5rem;\n }\n :host(.g-sm-2),\n :host(.gy-sm-2) {\n --wj-gutter-y: 0.5rem;\n }\n :host(.g-sm-3),\n :host(.gx-sm-3) {\n --wj-gutter-x: 1rem;\n }\n :host(.g-sm-3),\n :host(.gy-sm-3) {\n --wj-gutter-y: 1rem;\n }\n :host(.g-sm-4),\n :host(.gx-sm-4) {\n --wj-gutter-x: 1.5rem;\n }\n :host(.g-sm-4),\n :host(.gy-sm-4) {\n --wj-gutter-y: 1.5rem;\n }\n :host(.g-sm-5),\n :host(.gx-sm-5) {\n --wj-gutter-x: 3rem;\n }\n :host(.g-sm-5),\n :host(.gy-sm-5) {\n --wj-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n :host(.g-md-0),\n :host(.gx-md-0) {\n --wj-gutter-x: 0;\n }\n :host(.g-md-0),\n :host(.gy-md-0) {\n --wj-gutter-y: 0;\n }\n :host(.g-md-1),\n :host(.gx-md-1) {\n --wj-gutter-x: 0.25rem;\n }\n :host(.g-md-1),\n :host(.gy-md-1) {\n --wj-gutter-y: 0.25rem;\n }\n :host(.g-md-2),\n :host(.gx-md-2) {\n --wj-gutter-x: 0.5rem;\n }\n :host(.g-md-2),\n :host(.gy-md-2) {\n --wj-gutter-y: 0.5rem;\n }\n :host(.g-md-3),\n :host(.gx-md-3) {\n --wj-gutter-x: 1rem;\n }\n :host(.g-md-3),\n :host(.gy-md-3) {\n --wj-gutter-y: 1rem;\n }\n :host(.g-md-4),\n :host(.gx-md-4) {\n --wj-gutter-x: 1.5rem;\n }\n :host(.g-md-4),\n :host(.gy-md-4) {\n --wj-gutter-y: 1.5rem;\n }\n :host(.g-md-5),\n :host(.gx-md-5) {\n --wj-gutter-x: 3rem;\n }\n :host(.g-md-5),\n :host(.gy-md-5) {\n --wj-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n :host(.g-lg-0),\n :host(.gx-lg-0) {\n --wj-gutter-x: 0;\n }\n :host(.g-lg-0),\n :host(.gy-lg-0) {\n --wj-gutter-y: 0;\n }\n :host(.g-lg-1),\n :host(.gx-lg-1) {\n --wj-gutter-x: 0.25rem;\n }\n :host(.g-lg-1),\n :host(.gy-lg-1) {\n --wj-gutter-y: 0.25rem;\n }\n :host(.g-lg-2),\n :host(.gx-lg-2) {\n --wj-gutter-x: 0.5rem;\n }\n :host(.g-lg-2),\n :host(.gy-lg-2) {\n --wj-gutter-y: 0.5rem;\n }\n :host(.g-lg-3),\n :host(.gx-lg-3) {\n --wj-gutter-x: 1rem;\n }\n :host(.g-lg-3),\n :host(.gy-lg-3) {\n --wj-gutter-y: 1rem;\n }\n :host(.g-lg-4),\n :host(.gx-lg-4) {\n --wj-gutter-x: 1.5rem;\n }\n :host(.g-lg-4),\n :host(.gy-lg-4) {\n --wj-gutter-y: 1.5rem;\n }\n :host(.g-lg-5),\n :host(.gx-lg-5) {\n --wj-gutter-x: 3rem;\n }\n :host(.g-lg-5),\n :host(.gy-lg-5) {\n --wj-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n :host(.g-xl-0),\n :host(.gx-xl-0) {\n --wj-gutter-x: 0;\n }\n :host(.g-xl-0),\n :host(.gy-xl-0) {\n --wj-gutter-y: 0;\n }\n :host(.g-xl-1),\n :host(.gx-xl-1) {\n --wj-gutter-x: 0.25rem;\n }\n :host(.g-xl-1),\n :host(.gy-xl-1) {\n --wj-gutter-y: 0.25rem;\n }\n :host(.g-xl-2),\n :host(.gx-xl-2) {\n --wj-gutter-x: 0.5rem;\n }\n :host(.g-xl-2),\n :host(.gy-xl-2) {\n --wj-gutter-y: 0.5rem;\n }\n :host(.g-xl-3),\n :host(.gx-xl-3) {\n --wj-gutter-x: 1rem;\n }\n :host(.g-xl-3),\n :host(.gy-xl-3) {\n --wj-gutter-y: 1rem;\n }\n :host(.g-xl-4),\n :host(.gx-xl-4) {\n --wj-gutter-x: 1.5rem;\n }\n :host(.g-xl-4),\n :host(.gy-xl-4) {\n --wj-gutter-y: 1.5rem;\n }\n :host(.g-xl-5),\n :host(.gx-xl-5) {\n --wj-gutter-x: 3rem;\n }\n :host(.g-xl-5),\n :host(.gy-xl-5) {\n --wj-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n :host(.g-xxl-0),\n :host(.gx-xxl-0) {\n --wj-gutter-x: 0;\n }\n :host(.g-xxl-0),\n :host(.gy-xxl-0) {\n --wj-gutter-y: 0;\n }\n :host(.g-xxl-1),\n :host(.gx-xxl-1) {\n --wj-gutter-x: 0.25rem;\n }\n :host(.g-xxl-1),\n :host(.gy-xxl-1) {\n --wj-gutter-y: 0.25rem;\n }\n :host(.g-xxl-2),\n :host(.gx-xxl-2) {\n --wj-gutter-x: 0.5rem;\n }\n :host(.g-xxl-2),\n :host(.gy-xxl-2) {\n --wj-gutter-y: 0.5rem;\n }\n :host(.g-xxl-3),\n :host(.gx-xxl-3) {\n --wj-gutter-x: 1rem;\n }\n :host(.g-xxl-3),\n :host(.gy-xxl-3) {\n --wj-gutter-y: 1rem;\n }\n :host(.g-xxl-4),\n :host(.gx-xxl-4) {\n --wj-gutter-x: 1.5rem;\n }\n :host(.g-xxl-4),\n :host(.gy-xxl-4) {\n --wj-gutter-y: 1.5rem;\n }\n :host(.g-xxl-5),\n :host(.gx-xxl-5) {\n --wj-gutter-x: 3rem;\n }\n :host(.g-xxl-5),\n :host(.gy-xxl-5) {\n --wj-gutter-y: 3rem;\n }\n}\n:host(.wj-justify-content-center) {\n justify-content: center !important;\n}\n:host(.wj-justify-content-end) {\n justify-content: flex-end !important;\n}\n:host(.wj-justify-content-between) {\n justify-content: space-between !important;\n}\n:host(.wj-justify-content-around) {\n justify-content: space-around !important;\n}\n:host(.wj-align-items-start) {\n align-items: baseline !important;\n}\n:host(.wj-align-items-center) {\n align-items: center !important;\n}\n:host(.wj-align-items-end) {\n align-items: flex-end !important;\n}";
10
+ class Row extends WJElement {
11
11
  constructor() {
12
12
  super();
13
- o(this, "className", "Row");
13
+ __publicField(this, "className", "Row");
14
14
  }
15
15
  static get cssStyleSheet() {
16
- return u;
16
+ return styles;
17
17
  }
18
18
  setupAttributes() {
19
19
  this.isShadowRoot = "open";
20
20
  }
21
- beforeDraw(g, r, h) {
21
+ beforeDraw(context, store, params) {
22
22
  }
23
- draw(g, r, h) {
24
- let s = document.createDocumentFragment();
25
- this.hasAttribute("wrap") && this.classList.add("wj-wrap");
26
- let x = document.createElement("slot");
27
- return s.appendChild(x), s;
23
+ draw(context, store, params) {
24
+ let fragment = document.createDocumentFragment();
25
+ if (this.hasAttribute("wrap"))
26
+ this.classList.add("wj-wrap");
27
+ let element = document.createElement("slot");
28
+ fragment.appendChild(element);
29
+ return fragment;
28
30
  }
29
31
  }
30
- customElements.get("wj-row") || window.customElements.define("wj-row", j);
32
+ customElements.get("wj-row") || window.customElements.define("wj-row", Row);
31
33
  export {
32
- j as Row
34
+ Row
33
35
  };
package/dist/wj-slider.js CHANGED
@@ -1,50 +1,55 @@
1
- var b = Object.defineProperty;
2
- var c = (a, o, e) => o in a ? b(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
3
- var s = (a, o, e) => (c(a, typeof o != "symbol" ? o + "" : o, e), e);
4
- import w from "./wj-element.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import WJElement from "./wj-element.js";
5
8
  import "./wj-store.js";
6
- const p = `/*!
7
- * direction.scss
8
- */:host{--wj-slider-track-height: 4px;position:relative;display:flex;align-items:center;max-width:100%}:host .native-slider{display:flex;position:relative;flex-grow:1;align-items:center;height:inherit}:host .slider{display:flex;align-items:center;position:relative;flex:1 1 0%;width:100%;height:var(--height);contain:size layout style;cursor:grab;touch-action:pan-y}input[type=range]{-webkit-appearance:none;width:100%;height:var(--wj-slider-track-height);margin:0;border-radius:5px;background-size:70% 100%;background-repeat:no-repeat;--wj-slider-color: #7252D3;--wj-slider-thumb-color: #7252D3;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #7252D3),var(--wj-slider-color, #7252D3))}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:ew-resize;transition:background .3s ease-in-out}input[type=range]::-moz-range-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:pointer;transition:background .3s ease-in-out;border:0}input[type=range]::-ms-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:ew-resize;transition:background .3s ease-in-out}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range]::-moz-range-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range]::-ms-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range][color=primary]{--wj-slider-color: #7252D3;--wj-slider-thumb-color: #7252D3;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #7252D3),var(--wj-slider-color, #7252D3))}input[type=range][color=primary]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=success]{--wj-slider-color: #19AD79;--wj-slider-thumb-color: #19AD79;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #d6f7f0;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #19AD79),var(--wj-slider-color, #19AD79))}input[type=range][color=success]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=complete]{--wj-slider-color: #0072EC;--wj-slider-thumb-color: #0072EC;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #d3eeff;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #0072EC),var(--wj-slider-color, #0072EC))}input[type=range][color=complete]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=danger]{--wj-slider-color: #D83C31;--wj-slider-thumb-color: #D83C31;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #fde2da;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #D83C31),var(--wj-slider-color, #D83C31))}input[type=range][color=danger]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=warning]{--wj-slider-color: #FFd945;--wj-slider-thumb-color: #FFd945;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #fffde1;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #FFd945),var(--wj-slider-color, #FFd945))}input[type=range][color=warning]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=contrast]{--wj-slider-color: #fff;--wj-slider-thumb-color: #fff;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px white;--wj-slider-track-color: #757575;background-color:var(--wj-slider-track-color, #757575);background-image:linear-gradient(var(--wj-slider-color, #fff),var(--wj-slider-color, #fff))}input[type=range][color=contrast]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}datalist{display:flex;justify-content:space-between;height:auto;overflow:hidden;margin-top:16px}datalist option:before{content:"";display:block;width:0;height:auto;padding-left:3px;text-indent:0}output{position:absolute;background:var(--wj-color-contrast-11);color:var(--wj-color-contrast-0);top:-46px;padding:4px 8px;border-radius:4px}::slotted([slot=label]){margin-inline:0 1rem;font-size:var(--wj-font-size)}::slotted([slot=start]){margin-inline:0 1rem}::slotted([slot=end]){margin-inline:1rem 0}
9
- `;
10
- class m extends w {
9
+ const styles = '/*!\n* direction.scss\n*/\n/* Skeleton Variables */\n:host {\n --wj-slider-track-height: 4px;\n position: relative;\n display: flex;\n align-items: center;\n max-width: 100%;\n}\n:host .native-slider {\n display: flex;\n position: relative;\n flex-grow: 1;\n align-items: center;\n height: inherit;\n}\n:host .slider {\n display: flex;\n align-items: center;\n position: relative;\n flex: 1 1 0%;\n width: 100%;\n height: var(--height);\n contain: size layout style;\n cursor: grab;\n touch-action: pan-y;\n}\ninput[type=range] {\n -webkit-appearance: none;\n width: 100%;\n height: var(--wj-slider-track-height);\n margin: 0;\n border-radius: 5px;\n background-size: 70% 100%;\n background-repeat: no-repeat;\n /* Input Track */\n --wj-slider-color: #7252D3;\n --wj-slider-thumb-color: #7252D3;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #7252D3), var(--wj-slider-color, #7252D3));\n /* Input Thumb */\n}\ninput[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: ew-resize;\n transition: background 0.3s ease-in-out;\n}\ninput[type=range]::-moz-range-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: pointer;\n transition: background 0.3s ease-in-out;\n border: 0;\n}\ninput[type=range]::-ms-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: ew-resize;\n transition: background 0.3s ease-in-out;\n}\ninput[type=range]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range]::-moz-range-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range]::-ms-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range][color=primary] {\n --wj-slider-color: #7252D3;\n --wj-slider-thumb-color: #7252D3;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #7252D3), var(--wj-slider-color, #7252D3));\n /* Input Thumb */\n}\ninput[type=range][color=primary]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=success] {\n --wj-slider-color: #19AD79;\n --wj-slider-thumb-color: #19AD79;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #d6f7f0;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #19AD79), var(--wj-slider-color, #19AD79));\n /* Input Thumb */\n}\ninput[type=range][color=success]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=complete] {\n --wj-slider-color: #0072EC;\n --wj-slider-thumb-color: #0072EC;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #d3eeff;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #0072EC), var(--wj-slider-color, #0072EC));\n /* Input Thumb */\n}\ninput[type=range][color=complete]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=danger] {\n --wj-slider-color: #D83C31;\n --wj-slider-thumb-color: #D83C31;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #fde2da;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #D83C31), var(--wj-slider-color, #D83C31));\n /* Input Thumb */\n}\ninput[type=range][color=danger]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=warning] {\n --wj-slider-color: #FFd945;\n --wj-slider-thumb-color: #FFd945;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #fffde1;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #FFd945), var(--wj-slider-color, #FFd945));\n /* Input Thumb */\n}\ninput[type=range][color=warning]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=contrast] {\n --wj-slider-color: #fff;\n --wj-slider-thumb-color: #fff;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px white;\n --wj-slider-track-color: #757575;\n background-color: var(--wj-slider-track-color, #757575);\n background-image: linear-gradient(var(--wj-slider-color, #fff), var(--wj-slider-color, #fff));\n /* Input Thumb */\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ndatalist {\n display: flex;\n justify-content: space-between;\n height: auto;\n overflow: hidden;\n margin-top: 16px;\n}\ndatalist option:before {\n content: "";\n display: block;\n width: 0;\n height: auto;\n padding-left: 3px;\n text-indent: 0;\n}\noutput {\n position: absolute;\n background: var(--wj-color-contrast-11);\n color: var(--wj-color-contrast-0);\n top: -46px;\n padding: 4px 8px;\n border-radius: 4px;\n}\n::slotted([slot=label]) {\n margin-inline: 0 1rem;\n font-size: var(--wj-font-size);\n}\n::slotted([slot=start]) {\n margin-inline: 0 1rem;\n}\n::slotted([slot=end]) {\n margin-inline: 1rem 0;\n}';
10
+ class Slider extends WJElement {
11
11
  constructor() {
12
12
  super();
13
- s(this, "className", "Slider");
14
- s(this, "setHandlePosition", () => {
13
+ __publicField(this, "className", "Slider");
14
+ __publicField(this, "setHandlePosition", () => {
15
15
  this.input.style.backgroundSize = this.getPercentage(this.input.value, this.input.min, this.input.max) + "% 100%";
16
16
  });
17
- s(this, "setBubble", () => {
18
- let e = this.getPercentage(this.input.value, this.input.min, this.input.max);
19
- this.output.style.left = `calc(${e}% + (${8 - e * 0.15}px) - ${this.output.offsetWidth / 2}px)`, this.output.innerHTML = this.input.value;
17
+ __publicField(this, "setBubble", () => {
18
+ let newValue = this.getPercentage(this.input.value, this.input.min, this.input.max);
19
+ this.output.style.left = `calc(${newValue}% + (${8 - newValue * 0.15}px) - ${this.output.offsetWidth / 2}px)`;
20
+ this.output.innerHTML = this.input.value;
20
21
  });
21
22
  }
22
- set value(e) {
23
- this.setAttribute("value", e), this.input && (this.input.value = e, this.setHandlePosition());
23
+ set value(value) {
24
+ this.setAttribute("value", value);
25
+ if (this.input) {
26
+ this.input.value = value;
27
+ this.setHandlePosition();
28
+ }
24
29
  }
25
30
  get value() {
26
31
  return this.getAttribute("value") || 0;
27
32
  }
28
- set min(e) {
29
- this.setAttribute("min", e);
33
+ set min(value) {
34
+ this.setAttribute("min", value);
30
35
  }
31
36
  get min() {
32
37
  return this.getAttribute("min") || 0;
33
38
  }
34
- set max(e) {
35
- this.setAttribute("max", e);
39
+ set max(value) {
40
+ this.setAttribute("max", value);
36
41
  }
37
42
  get max() {
38
43
  return this.getAttribute("max") || 100;
39
44
  }
40
- set step(e) {
41
- this.setAttribute("step", e);
45
+ set step(value) {
46
+ this.setAttribute("step", value);
42
47
  }
43
48
  get step() {
44
49
  return this.getAttribute("step") || 1;
45
50
  }
46
51
  static get cssStyleSheet() {
47
- return p;
52
+ return styles;
48
53
  }
49
54
  static get observedAttributes() {
50
55
  return ["max", "value"];
@@ -53,68 +58,105 @@ class m extends w {
53
58
  this.isShadowRoot = "open";
54
59
  }
55
60
  draw() {
56
- let e = document.createDocumentFragment(), t = document.createElement("div");
57
- t.className = "native-slider";
58
- let i = document.createElement("div");
59
- i.className = "slider";
60
- let n = document.createElement("slot");
61
- n.name = "label";
62
- let l = document.createElement("slot");
63
- l.name = "start";
64
- let u = document.createElement("slot");
65
- u.name = "end";
66
- let d = document.createElement("output");
67
- d.setAttribute("for", "slider"), d.id = "output", d.setAttribute("hidden", "");
68
- let r = document.createElement("input");
69
- return r.type = "range", r.min = this.min, r.max = this.max, r.step = this.step, r.value = this.value, r.id = "slider", r.name = "slider", r.part = "slider", r.setAttribute("autocomplete", "off"), r.setAttribute("color", this.color || ""), r.addEventListener("input", (h) => {
70
- this.setHandlePosition(h.target);
71
- }), i.appendChild(r), this.hasAttribute("bubble") && i.appendChild(d), t.appendChild(n), t.appendChild(l), t.appendChild(i), t.appendChild(u), e.appendChild(t), this.input = r, this.output = d, e;
61
+ let fragment = document.createDocumentFragment();
62
+ let element = document.createElement("div");
63
+ element.className = "native-slider";
64
+ let slider = document.createElement("div");
65
+ slider.className = "slider";
66
+ let label = document.createElement("slot");
67
+ label.name = "label";
68
+ let start = document.createElement("slot");
69
+ start.name = "start";
70
+ let end = document.createElement("slot");
71
+ end.name = "end";
72
+ let output = document.createElement("output");
73
+ output.setAttribute("for", "slider");
74
+ output.id = "output";
75
+ output.setAttribute("hidden", "");
76
+ let input = document.createElement("input");
77
+ input.type = "range";
78
+ input.min = this.min;
79
+ input.max = this.max;
80
+ input.step = this.step;
81
+ input.value = this.value;
82
+ input.id = "slider";
83
+ input.name = "slider";
84
+ input.part = "slider";
85
+ input.setAttribute("autocomplete", "off");
86
+ input.setAttribute("color", this.color || "");
87
+ input.addEventListener("input", (e) => {
88
+ this.setHandlePosition(e.target);
89
+ });
90
+ slider.appendChild(input);
91
+ if (this.hasAttribute("bubble")) {
92
+ slider.appendChild(output);
93
+ }
94
+ element.appendChild(label);
95
+ element.appendChild(start);
96
+ element.appendChild(slider);
97
+ element.appendChild(end);
98
+ fragment.appendChild(element);
99
+ this.input = input;
100
+ this.output = output;
101
+ return fragment;
72
102
  }
73
103
  afterDraw() {
74
- this.setHandlePosition(), this.hasAttribute("bubble") && (this.output.innerHTML = this.input.value, this.output.removeAttribute("hidden"), setTimeout(this.setBubble, 50)), this.dispatchInit(this.input.value), this.input.addEventListener("input", (e) => {
75
- this.value = e.target.value, this.dispatchMove(this.value), this.hasAttribute("bubble") && this.setBubble();
76
- }), this.input.addEventListener("change", (e) => {
104
+ this.setHandlePosition();
105
+ if (this.hasAttribute("bubble")) {
106
+ this.output.innerHTML = this.input.value;
107
+ this.output.removeAttribute("hidden");
108
+ setTimeout(this.setBubble, 50);
109
+ }
110
+ this.dispatchInit(this.input.value);
111
+ this.input.addEventListener("input", (e) => {
112
+ this.value = e.target.value;
113
+ this.dispatchMove(this.value);
114
+ if (this.hasAttribute("bubble")) {
115
+ this.setBubble();
116
+ }
117
+ });
118
+ this.input.addEventListener("change", (e) => {
77
119
  this.dispatchChange(e.target.value);
78
120
  });
79
121
  }
80
- dispatchInit(e) {
122
+ dispatchInit(value) {
81
123
  this.dispatchEvent(
82
124
  new CustomEvent("wj:slider-init", {
83
- bubbles: !0,
125
+ bubbles: true,
84
126
  detail: {
85
- value: e,
127
+ value,
86
128
  output: this.output
87
129
  }
88
130
  })
89
131
  );
90
132
  }
91
- dispatchMove(e) {
133
+ dispatchMove(value) {
92
134
  this.dispatchEvent(
93
135
  new CustomEvent("wj:slider-move", {
94
- bubbles: !0,
136
+ bubbles: true,
95
137
  detail: {
96
- value: e,
138
+ value,
97
139
  output: this.output
98
140
  }
99
141
  })
100
142
  );
101
143
  }
102
- dispatchChange(e) {
144
+ dispatchChange(value) {
103
145
  this.dispatchEvent(
104
146
  new CustomEvent("wj:slider-change", {
105
- bubbles: !0,
147
+ bubbles: true,
106
148
  detail: {
107
- value: e,
149
+ value,
108
150
  output: this.output
109
151
  }
110
152
  })
111
153
  );
112
154
  }
113
- getPercentage(e = 0, t, i) {
114
- return Number((e - t) * 100 / (i - t)) || 0;
155
+ getPercentage(value = 0, min, max) {
156
+ return Number((value - min) * 100 / (max - min)) || 0;
115
157
  }
116
158
  }
117
- customElements.get("wj-slider") || customElements.define("wj-slider", m);
159
+ customElements.get("wj-slider") || customElements.define("wj-slider", Slider);
118
160
  export {
119
- m as Slider
161
+ Slider
120
162
  };
@@ -1,38 +1,58 @@
1
- var o = Object.defineProperty;
2
- var p = (s, e, t) => e in s ? o(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var c = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import h from "./wj-element.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import WJElement from "./wj-element.js";
5
8
  import "./wj-store.js";
6
- function m(s, e) {
7
- function t(n) {
8
- const r = s.getBoundingClientRect(), i = s.ownerDocument.defaultView, d = r.left + i.pageXOffset, v = r.top + i.pageYOffset, w = n.pageX - d, a = n.pageY - v;
9
- e != null && e.onMove && e.onMove(w, a);
9
+ function drag(container, options) {
10
+ function move(pointerEvent) {
11
+ const dims = container.getBoundingClientRect();
12
+ const defaultView = container.ownerDocument.defaultView;
13
+ const offsetX = dims.left + defaultView.pageXOffset;
14
+ const offsetY = dims.top + defaultView.pageYOffset;
15
+ const x = pointerEvent.pageX - offsetX;
16
+ const y = pointerEvent.pageY - offsetY;
17
+ if (options == null ? void 0 : options.onMove) {
18
+ options.onMove(x, y);
19
+ }
20
+ }
21
+ function stop() {
22
+ document.removeEventListener("pointermove", move);
23
+ document.removeEventListener("pointerup", stop);
24
+ if (options == null ? void 0 : options.onStop) {
25
+ options.onStop();
26
+ }
10
27
  }
11
- function l() {
12
- document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", l), e != null && e.onStop && e.onStop();
28
+ document.addEventListener("pointermove", move, { passive: true });
29
+ document.addEventListener("pointerup", stop);
30
+ if ((options == null ? void 0 : options.initialEvent) instanceof PointerEvent) {
31
+ move(options.initialEvent);
13
32
  }
14
- document.addEventListener("pointermove", t, { passive: !0 }), document.addEventListener("pointerup", l), (e == null ? void 0 : e.initialEvent) instanceof PointerEvent && t(e.initialEvent);
15
33
  }
16
- const u = `:host{--wj-split-view-divider-area: 12px;--wj-split-view-divider-width: 4px;--wj-split-view-min: 0%;--wj-split-view-max: 100%;--wj-split-view-calc-a: 50%;--wj-split-view-calc-b: 50%;--wj-split-view-clamp-a: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-a), var(--wj-split-view-max));--wj-split-view-clamp-b: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-b), var(--wj-split-view-max));--wj-split-view-divider-background: var(--wj-border-color);--wj-split-view-divider-size: 4px;height:100%;width:100%}::slotted([slot=start]),::slotted([slot=end]){width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}:host(:not([vertical])) ::slotted([slot=start]){width:var(--wj-split-view-clamp-a)}:host(:not([vertical])) ::slotted([slot=end]){width:var(--wj-split-view-clamp-b)}:host([vertical]) ::slotted([slot=start]){height:var(--wj-split-view-clamp-a);width:100%}:host([vertical]) ::slotted([slot=end]){height:var(--wj-split-view-clamp-b);width:100%}.native-split-view{height:100%;width:100%;display:flex;flex-direction:row;overflow:hidden;position:relative}:host([vertical]) .native-split-view{flex-direction:column}.wj-divider{display:flex;position:relative;align-items:center;justify-content:center;z-index:1;background-color:var(--wj-split-view-divider-background);height:100%;width:var(--wj-split-view-divider-size);cursor:col-resize}.wj-divider:after{display:flex;content:"";position:absolute;height:100%;left:calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);width:var(--wj-split-view-divider-area)}:host([vertical]) .wj-divider{height:var(--wj-split-view-divider-size);width:100%;cursor:row-resize}:host([vertical]) .wj-divider:after{width:100%;top:calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);height:var(--wj-split-view-divider-area)}
17
- `;
18
- class j extends h {
34
+ const styles = '/*\n[ WJ Split View ]\n*/\n:host {\n --wj-split-view-divider-area: 12px;\n --wj-split-view-divider-width: 4px;\n --wj-split-view-min: 0%;\n --wj-split-view-max: 100%;\n --wj-split-view-calc-a: 50%;\n --wj-split-view-calc-b: 50%;\n --wj-split-view-clamp-a: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-a), var(--wj-split-view-max));\n --wj-split-view-clamp-b: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-b), var(--wj-split-view-max));\n --wj-split-view-divider-background: var(--wj-border-color);\n --wj-split-view-divider-size: 4px;\n height: 100%;\n width: 100%;\n}\n\n::slotted([slot=start]), ::slotted([slot=end]) {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n:host(:not([vertical])) ::slotted([slot=start]) {\n width: var(--wj-split-view-clamp-a);\n}\n\n:host(:not([vertical])) ::slotted([slot=end]) {\n width: var(--wj-split-view-clamp-b);\n}\n\n:host([vertical]) ::slotted([slot=start]) {\n height: var(--wj-split-view-clamp-a);\n width: 100%;\n}\n\n:host([vertical]) ::slotted([slot=end]) {\n height: var(--wj-split-view-clamp-b);\n width: 100%;\n}\n\n.native-split-view {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: row;\n overflow: hidden;\n position: relative;\n}\n\n:host([vertical]) .native-split-view {\n flex-direction: column;\n}\n\n.wj-divider {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n z-index: 1;\n background-color: var(--wj-split-view-divider-background);\n height: 100%;\n width: var(--wj-split-view-divider-size);\n cursor: col-resize;\n}\n.wj-divider:after {\n display: flex;\n content: "";\n position: absolute;\n height: 100%;\n left: calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);\n width: var(--wj-split-view-divider-area);\n}\n\n:host([vertical]) .wj-divider {\n height: var(--wj-split-view-divider-size);\n width: 100%;\n cursor: row-resize;\n}\n:host([vertical]) .wj-divider:after {\n width: 100%;\n top: calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);\n height: var(--wj-split-view-divider-area);\n}';
35
+ class SplitView extends WJElement {
19
36
  constructor() {
20
37
  super();
21
- c(this, "className", "SplitView");
22
- c(this, "handleDrag", (t) => {
38
+ __publicField(this, "className", "SplitView");
39
+ __publicField(this, "handleDrag", (e) => {
23
40
  if (this.hasAttribute("disabled"))
24
- return !1;
25
- m(this, {
26
- onMove: (l, n) => {
27
- let r = this.hasAttribute("vertical") ? n : l, i = this.pixelsToPercentage(r), d = 100 - this.pixelsToPercentage(r);
28
- this.style.setProperty("--wj-split-view-calc-a", i + "%"), this.style.setProperty("--wj-split-view-calc-b", d + "%");
41
+ return false;
42
+ drag(this, {
43
+ onMove: (x, y) => {
44
+ let newPositionInPixels = this.hasAttribute("vertical") ? y : x;
45
+ let sizeA = this.pixelsToPercentage(newPositionInPixels);
46
+ let sizeB = 100 - this.pixelsToPercentage(newPositionInPixels);
47
+ this.style.setProperty("--wj-split-view-calc-a", sizeA + "%");
48
+ this.style.setProperty("--wj-split-view-calc-b", sizeB + "%");
29
49
  },
30
- initialEvent: t
50
+ initialEvent: e
31
51
  });
32
52
  });
33
53
  }
34
54
  static get cssStyleSheet() {
35
- return u;
55
+ return styles;
36
56
  }
37
57
  static get observedAttributes() {
38
58
  return [];
@@ -40,33 +60,51 @@ class j extends h {
40
60
  setupAttributes() {
41
61
  this.isShadowRoot = "open";
42
62
  }
43
- draw(t, l, n) {
44
- let r = document.createDocumentFragment(), i = document.createElement("div");
45
- i.classList.add("native-split-view");
46
- let d = document.createElement("slot");
47
- d.setAttribute("name", "start");
48
- let v = document.createElement("slot");
49
- v.setAttribute("name", "end");
50
- let w = document.createElement("slot");
51
- w.setAttribute("name", "divider");
52
- let a = document.createElement("div");
53
- return a.classList.add("wj-divider"), a.setAttribute("part", "divider"), a.appendChild(w), a.addEventListener("mousedown", this.handleDrag, !1), i.appendChild(d), i.appendChild(a), i.appendChild(v), r.appendChild(i), r;
63
+ draw(context, store, params) {
64
+ let fragment = document.createDocumentFragment();
65
+ let native = document.createElement("div");
66
+ native.classList.add("native-split-view");
67
+ let start = document.createElement("slot");
68
+ start.setAttribute("name", "start");
69
+ let end = document.createElement("slot");
70
+ end.setAttribute("name", "end");
71
+ let divider = document.createElement("slot");
72
+ divider.setAttribute("name", "divider");
73
+ let dividerElement = document.createElement("div");
74
+ dividerElement.classList.add("wj-divider");
75
+ dividerElement.setAttribute("part", "divider");
76
+ dividerElement.appendChild(divider);
77
+ dividerElement.addEventListener("mousedown", this.handleDrag, false);
78
+ native.appendChild(start);
79
+ native.appendChild(dividerElement);
80
+ native.appendChild(end);
81
+ fragment.appendChild(native);
82
+ return fragment;
54
83
  }
55
84
  afterDraw() {
56
- this.detectSize(), this.min && this.style.setProperty("--wj-split-view-min", this.pixelsToPercentage(this.min) + "%"), this.max && this.style.setProperty("--wj-split-view-max", 100 - this.pixelsToPercentage(this.max) + "%"), this.initial && (this.style.setProperty("--wj-split-view-calc-a", this.pixelsToPercentage(this.initial) + "%"), this.style.setProperty("--wj-split-view-calc-b", 100 - this.pixelsToPercentage(this.initial) + "%")), this.resizeObserver = new ResizeObserver((t) => this.handleResize(t));
85
+ this.detectSize();
86
+ if (this.min)
87
+ this.style.setProperty("--wj-split-view-min", this.pixelsToPercentage(this.min) + "%");
88
+ if (this.max)
89
+ this.style.setProperty("--wj-split-view-max", 100 - this.pixelsToPercentage(this.max) + "%");
90
+ if (this.initial) {
91
+ this.style.setProperty("--wj-split-view-calc-a", this.pixelsToPercentage(this.initial) + "%");
92
+ this.style.setProperty("--wj-split-view-calc-b", 100 - this.pixelsToPercentage(this.initial) + "%");
93
+ }
94
+ this.resizeObserver = new ResizeObserver((entries) => this.handleResize(entries));
57
95
  }
58
96
  detectSize() {
59
- const { width: t, height: l } = this.getBoundingClientRect();
60
- this.size = this.hasAttribute("vertical") ? l : t;
97
+ const { width, height } = this.getBoundingClientRect();
98
+ this.size = this.hasAttribute("vertical") ? height : width;
61
99
  }
62
- percentageToPixels(t) {
63
- return this.size * (t / 100);
100
+ percentageToPixels(value) {
101
+ return this.size * (value / 100);
64
102
  }
65
- pixelsToPercentage(t) {
66
- return t / this.size * 100;
103
+ pixelsToPercentage(value) {
104
+ return value / this.size * 100;
67
105
  }
68
106
  }
69
- customElements.get("wj-split-view") || window.customElements.define("wj-split-view", j);
107
+ customElements.get("wj-split-view") || window.customElements.define("wj-split-view", SplitView);
70
108
  export {
71
- j as SplitView
109
+ SplitView
72
110
  };