wj-elements 0.1.46 → 0.1.48

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 (96) hide show
  1. package/package.json +1 -1
  2. package/dist/dark.css +0 -1
  3. package/dist/light.css +0 -1
  4. package/dist/localize.js +0 -45
  5. package/dist/popup.element-CWsSOxs2.js +0 -1072
  6. package/dist/router-links-FtZbFUto.js +0 -146
  7. package/dist/styles.css +0 -1
  8. package/dist/wje-accordion-item.js +0 -88
  9. package/dist/wje-accordion.js +0 -79
  10. package/dist/wje-animation.js +0 -121
  11. package/dist/wje-aside.js +0 -55
  12. package/dist/wje-avatar.js +0 -77
  13. package/dist/wje-badge.js +0 -50
  14. package/dist/wje-breadcrumb.js +0 -148
  15. package/dist/wje-breadcrumbs.js +0 -67
  16. package/dist/wje-button-group.js +0 -78
  17. package/dist/wje-button.js +0 -207
  18. package/dist/wje-card-content.js +0 -48
  19. package/dist/wje-card-controls.js +0 -48
  20. package/dist/wje-card-header.js +0 -47
  21. package/dist/wje-card-subtitle.js +0 -55
  22. package/dist/wje-card-title.js +0 -55
  23. package/dist/wje-card.js +0 -50
  24. package/dist/wje-carousel-item.js +0 -33
  25. package/dist/wje-carousel.js +0 -177
  26. package/dist/wje-checkbox.js +0 -96
  27. package/dist/wje-chip.js +0 -32
  28. package/dist/wje-col.js +0 -27
  29. package/dist/wje-color-picker.js +0 -953
  30. package/dist/wje-container.js +0 -57
  31. package/dist/wje-copy-button.js +0 -164
  32. package/dist/wje-dialog.js +0 -86
  33. package/dist/wje-divider.js +0 -53
  34. package/dist/wje-dropdown.js +0 -114
  35. package/dist/wje-element.js +0 -453
  36. package/dist/wje-fetchAndParseCSS.js +0 -40
  37. package/dist/wje-file-upload-item.js +0 -115
  38. package/dist/wje-file-upload.js +0 -297
  39. package/dist/wje-footer.js +0 -56
  40. package/dist/wje-form.js +0 -28
  41. package/dist/wje-format-digital.js +0 -85
  42. package/dist/wje-grid.js +0 -28
  43. package/dist/wje-header.js +0 -58
  44. package/dist/wje-icon-picker.js +0 -221
  45. package/dist/wje-icon.js +0 -119
  46. package/dist/wje-img-comparer.js +0 -111
  47. package/dist/wje-img.js +0 -58
  48. package/dist/wje-infinite-scroll.js +0 -201
  49. package/dist/wje-inline-edit.js +0 -145
  50. package/dist/wje-input-file.js +0 -85
  51. package/dist/wje-input.js +0 -334
  52. package/dist/wje-item.js +0 -45
  53. package/dist/wje-label.js +0 -67
  54. package/dist/wje-list.js +0 -53
  55. package/dist/wje-main.js +0 -56
  56. package/dist/wje-masonry.js +0 -218
  57. package/dist/wje-master.js +0 -423
  58. package/dist/wje-menu-button.js +0 -65
  59. package/dist/wje-menu-item.js +0 -230
  60. package/dist/wje-menu-label.js +0 -57
  61. package/dist/wje-menu.js +0 -74
  62. package/dist/wje-option.js +0 -99
  63. package/dist/wje-options.js +0 -63
  64. package/dist/wje-popup.js +0 -5
  65. package/dist/wje-progress-bar.js +0 -161
  66. package/dist/wje-qr-code.js +0 -2332
  67. package/dist/wje-radio-group.js +0 -101
  68. package/dist/wje-radio.js +0 -46
  69. package/dist/wje-rate.js +0 -260
  70. package/dist/wje-relative-time.js +0 -85
  71. package/dist/wje-reorder-dropzone.js +0 -27
  72. package/dist/wje-reorder-handle.js +0 -115
  73. package/dist/wje-reorder-item.js +0 -32
  74. package/dist/wje-reorder.js +0 -138
  75. package/dist/wje-route.js +0 -46
  76. package/dist/wje-router-link.js +0 -64
  77. package/dist/wje-router-outlet.js +0 -127
  78. package/dist/wje-routerx.js +0 -1088
  79. package/dist/wje-row.js +0 -58
  80. package/dist/wje-select.js +0 -242
  81. package/dist/wje-slider.js +0 -177
  82. package/dist/wje-sliding-container.js +0 -274
  83. package/dist/wje-split-view.js +0 -112
  84. package/dist/wje-status.js +0 -54
  85. package/dist/wje-store.js +0 -192
  86. package/dist/wje-tab-group.js +0 -107
  87. package/dist/wje-tab-panel.js +0 -52
  88. package/dist/wje-tab.js +0 -59
  89. package/dist/wje-textarea.js +0 -116
  90. package/dist/wje-thumbnail.js +0 -64
  91. package/dist/wje-toast.js +0 -76
  92. package/dist/wje-toggle.js +0 -94
  93. package/dist/wje-toolbar-action.js +0 -63
  94. package/dist/wje-toolbar.js +0 -61
  95. package/dist/wje-tooltip.js +0 -116
  96. package/dist/wje-visually-hidden.js +0 -56
@@ -1,161 +0,0 @@
1
- var A = Object.defineProperty;
2
- var j = (c, o, e) => o in c ? A(c, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[o] = e;
3
- var g = (c, o, e) => (j(c, typeof o != "symbol" ? o + "" : o, e), e);
4
- import k from "./wje-element.js";
5
- const v = ':host([color="primary"]){--wje-progress-bar-background-color: var(--wje-color-primary-2);--wje-progress-bar-color: var(--wje-color-primary-9)}:host([color="complete"]){--wje-progress-bar-background-color: var(--wje-color-complete-2);--wje-progress-bar-color: var(--wje-color-complete-9)}:host([color="success"]){--wje-progress-bar-background-color: var(--wje-color-success-2);--wje-progress-bar-color: var(--wje-color-success-9)}:host([color="warning"]){--wje-progress-bar-background-color: var(--wje-color-warning-2);--wje-progress-bar-color: var(--wje-color-warning-9)}:host([color="danger"]){--wje-progress-bar-background-color: var(--wje-color-danger-2);--wje-progress-bar-color: var(--wje-color-danger-9)}:host([color="info"]){--wje-progress-bar-background-color: var(--wje-color-info-2);--wje-progress-bar-color: var(--wje-color-info-9)}:host{--wje-progress-bar-background-color: var(--wje-color-contrast-2);--wje-progress-bar-color: var(--wje-color-contrast-6);--wje-progress-bar-text-size: .75rem;--wje-progress-bar-text-color: var(--wje-color);fill:var(--wje-progress-bar-background-color)}:host .progress{position:relative;display:flex;align-items:center}:host .slot-wrapper{display:flex;position:absolute;top:0;align-items:center;width:100%;height:100%;justify-content:center}:host #bar{fill:var(--wje-progress-bar-color)}:host text{transform:rotate(90deg);transform-origin:center;text-anchor:middle;dominant-baseline:middle;font-size:var(--wje-progress-bar-text-size);fill:var(--wje-progress-bar-text-color);stroke:var(--wje-progress-bar-text-color)}:host(.wje-color) #bar{fill:var(--wje-progress-bar-color)}::slotted([slot="start"]){margin-inline:0 1rem}::slotted([slot="end"]){margin-inline:1rem 0}';
6
- class w extends k {
7
- /**
8
- * Creates an instance of ProgressBar.
9
- *
10
- * @constructor
11
- */
12
- constructor() {
13
- super();
14
- g(this, "className", "ProgressBar");
15
- }
16
- /**
17
- * Sets the radius of the progress bar.
18
- *
19
- * @param {number} value - The value to set.
20
- */
21
- set radius(e) {
22
- this.setAttribute("radius", e);
23
- }
24
- /**
25
- * Gets the radius of the progress bar.
26
- *
27
- * @returns {number} The value of the radius.
28
- */
29
- get radius() {
30
- return +this.getAttribute("radius") || 70;
31
- }
32
- /**
33
- * Gets the diameter of the progress bar.
34
- *
35
- * @returns {number} The value of the diameter.
36
- */
37
- get diameter() {
38
- return this.radius * 2;
39
- }
40
- /**
41
- * Gets the diameter of the progress bar.
42
- *
43
- * @returns {number} The value of the diameter.
44
- */
45
- get containerSize() {
46
- return this.diameter + 2 * this.stroke;
47
- }
48
- /**
49
- * Sets the stroke of the progress bar.
50
- *
51
- * @param {number} value - The value to set.
52
- */
53
- set stroke(e) {
54
- this.setAttribute("stroke", e);
55
- }
56
- /**
57
- * Gets the stroke of the progress bar.
58
- *
59
- * @returns {number} The value of the stroke.
60
- */
61
- get stroke() {
62
- return +this.getAttribute("stroke") || 6;
63
- }
64
- /**
65
- * Gets the linecap of the progress bar.
66
- *
67
- * @returns {string} The value of the linecap.
68
- */
69
- get linecap() {
70
- return this.getAttribute("linecap") || "square";
71
- }
72
- /**
73
- * Returns the CSS styles for the component.
74
- *
75
- * @static
76
- * @returns {CSSStyleSheet}
77
- */
78
- static get cssStyleSheet() {
79
- return v;
80
- }
81
- /**
82
- * Returns the list of attributes to observe for changes.
83
- *
84
- * @static
85
- * @returns {Array<string>}
86
- */
87
- static get observedAttributes() {
88
- return ["progress"];
89
- }
90
- /**
91
- * Sets up the attributes for the component.
92
- */
93
- setupAttributes() {
94
- this.isShadowRoot = "open";
95
- }
96
- /**
97
- * Draws the component.
98
- *
99
- * @param {Object} context - The context for drawing.
100
- * @param {Object} store - The store for drawing.
101
- * @param {Object} params - The parameters for drawing.
102
- * @returns {DocumentFragment}
103
- */
104
- draw(e, a, u) {
105
- this.radius + this.stroke / 2;
106
- let n = document.createDocumentFragment();
107
- u.color && this.classList.add("wje-color");
108
- let i = document.createElement("div");
109
- i.classList.add("progress");
110
- let m = document.createElement("slot"), h = document.createElement("div");
111
- h.classList.add("slot-wrapper");
112
- let b = document.createElement("slot");
113
- b.setAttribute("name", "start");
114
- let p = document.createElement("slot");
115
- p.setAttribute("name", "end");
116
- const l = "http://www.w3.org/2000/svg";
117
- let s = document.createElementNS(l, "svg"), r, t;
118
- if ((this == null ? void 0 : this.type) === "circle") {
119
- s.setAttribute("width", this.containerSize), s.setAttribute("height", this.containerSize), s.setAttribute("viewBox", `0 0 ${this.containerSize} ${this.containerSize}`), s.setAttribute("style", "transform: rotate(-90deg)"), r = document.createElementNS(l, "circle"), r.setAttribute("stroke", "var(--wje-progress-bar-background-color)"), r.setAttribute("stroke-width", this.stroke), r.setAttribute("fill", "transparent"), r.setAttribute("r", this.radius), r.setAttribute("cx", this.containerSize / 2), r.setAttribute("cy", this.containerSize / 2), t = document.createElementNS(l, "circle"), t.setAttribute("stroke", "var(--wje-progress-bar-color)"), t.setAttribute("stroke-width", this.stroke), t.setAttribute("fill", "transparent"), t.setAttribute("r", this.radius), t.setAttribute("cx", this.containerSize / 2), t.setAttribute("cy", this.containerSize / 2), t.setAttribute("stroke-linecap", this.linecap);
120
- let d = document.createElementNS(l, "text");
121
- d.setAttribute("x", "50%"), d.setAttribute("y", "50%"), d.innerHTML = this.progress + "%", s.appendChild(d);
122
- } else
123
- s.setAttribute("width", "100%"), s.setAttribute("height", this.stroke), s.setAttribute("preserveAspectRatio", "none"), r = document.createElementNS(l, "rect"), r.setAttribute("x", 0), r.setAttribute("y", 0), r.setAttribute("width", "100%"), r.setAttribute("height", this.stroke), this.linecap === "round" && (r.setAttribute("rx", this.stroke / 2), r.setAttribute("ry", this.stroke / 2)), t = document.createElementNS(l, "rect"), t.setAttribute("x", 0), t.setAttribute("y", 0), t.setAttribute("width", this.progress + "%"), t.setAttribute("height", this.stroke), t.setAttribute("id", "bar"), this.linecap === "round" && (t.setAttribute("rx", this.stroke / 2), t.setAttribute("ry", this.stroke / 2));
124
- return s.appendChild(r), s.appendChild(t), h.appendChild(m), i.appendChild(b), i.appendChild(h), i.appendChild(s), i.appendChild(p), n.appendChild(i), this.background = r, this.bar = t, n;
125
- }
126
- /**
127
- * Adds event listeners after the component is drawn.
128
- */
129
- afterDraw(e, a, u) {
130
- this.type === "circle" && this.setCircleProgress(this.progress);
131
- }
132
- /**
133
- * Returns the dasharray for a circle with the given radius.
134
- *
135
- * @param {number} radius - The radius of the circle.
136
- * @returns {number} The dasharray value.
137
- */
138
- getCircleDasharray(e = 70) {
139
- return 2 * Math.PI * e;
140
- }
141
- /**
142
- * Returns the dashoffset for a circle with the given progress and radius.
143
- *
144
- * @param {number} progress - The progress of the circle.
145
- * @param {number} radius - The radius of the circle.
146
- * @returns {number} The dashoffset value.
147
- */
148
- getCircleDashoffset(e = 0, a) {
149
- return this.getCircleDasharray(a) * ((100 - e) / 100);
150
- }
151
- setCircleProgress(e) {
152
- const a = this.bar, u = a.r.baseVal.value, n = 2 * Math.PI * u;
153
- a.style.strokeDasharray = `${n}`;
154
- const i = n - e / 100 * n;
155
- a.style.strokeDashoffset = i;
156
- }
157
- }
158
- w.define("wje-progress-bar", w);
159
- export {
160
- w as default
161
- };