monobill-mintui 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/Button.d.ts +1 -0
- package/dist/components/button/Button.d.ts.map +10 -0
- package/dist/components/button/index.cjs +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.d.ts.map +10 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.d.ts.map +10 -0
- package/dist/components/card/index.cjs +1 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.d.ts.map +10 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +10 -0
- package/dist/components/checkbox/index.cjs +1 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.d.ts.map +10 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/choice/Choice.d.ts +1 -0
- package/dist/components/choice/Choice.d.ts.map +10 -0
- package/dist/components/choice/index.cjs +1 -0
- package/dist/components/choice/index.d.ts +1 -0
- package/dist/components/choice/index.d.ts.map +10 -0
- package/dist/components/choice/index.js +1 -0
- package/dist/components/chunks/Icon-BTlX8dXa.js +1 -0
- package/dist/components/chunks/Icon-xNhleOos.js +77 -0
- package/dist/components/chunks/button-4_r-rdhN.js +1 -0
- package/dist/components/chunks/button-DFs4DmfC.js +575 -0
- package/dist/components/chunks/card-D8FpQZBD.js +1 -0
- package/dist/components/chunks/card-DhRHTSkL.js +58 -0
- package/dist/components/chunks/checkbox-Bakjptcp.js +1 -0
- package/dist/components/chunks/checkbox-D95xYxXV.js +169 -0
- package/dist/components/chunks/choice-BlAkXCQN.js +204 -0
- package/dist/components/chunks/choice-C0EYGPxa.js +1 -0
- package/dist/components/chunks/grid-DVHtippr.js +1 -0
- package/dist/components/chunks/grid-DqlQrFkp.js +62 -0
- package/dist/components/chunks/icon-BZolpoyx.js +1 -0
- package/dist/components/chunks/icon-a2ABTJf-.js +701 -0
- package/dist/components/chunks/link-C49HKGxh.js +75 -0
- package/dist/components/chunks/link-S0yBi9n7.js +1 -0
- package/dist/components/chunks/modal-B2sNSV2Q.js +1 -0
- package/dist/components/chunks/modal-BQlup2Mw.js +98 -0
- package/dist/components/chunks/page-BiSPS1-l.js +1 -0
- package/dist/components/chunks/page-DFKYJekL.js +112 -0
- package/dist/components/chunks/popover-BkTNH5gb.js +181 -0
- package/dist/components/chunks/popover-DFCs6KnJ.js +1 -0
- package/dist/components/chunks/spinner-Ch8momJm.js +63 -0
- package/dist/components/chunks/spinner-zGnecx3W.js +111 -0
- package/dist/components/chunks/stack-BvgkqvMX.js +1 -0
- package/dist/components/chunks/stack-DzZy3iH1.js +114 -0
- package/dist/components/chunks/switch-C5FOAA64.js +1 -0
- package/dist/components/chunks/switch-CCyMw1-M.js +138 -0
- package/dist/components/chunks/text-B-qq-sZ2.js +111 -0
- package/dist/components/chunks/text-nTrVku3e.js +1 -0
- package/dist/components/grid/Grid.d.ts +1 -0
- package/dist/components/grid/Grid.d.ts.map +10 -0
- package/dist/components/grid/index.cjs +1 -0
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/grid/index.d.ts.map +10 -0
- package/dist/components/grid/index.js +2 -0
- package/dist/components/icon/Icon.d.ts +1 -0
- package/dist/components/icon/Icon.d.ts.map +10 -0
- package/dist/components/icon/index.cjs +1 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts.map +10 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/link/Link.d.ts +1 -0
- package/dist/components/link/Link.d.ts.map +10 -0
- package/dist/components/link/index.cjs +1 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.d.ts.map +10 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/modal/Modal.d.ts +1 -0
- package/dist/components/modal/Modal.d.ts.map +10 -0
- package/dist/components/modal/index.cjs +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/index.d.ts.map +10 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/page/Page.d.ts +1 -0
- package/dist/components/page/Page.d.ts.map +10 -0
- package/dist/components/page/index.cjs +1 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.d.ts.map +10 -0
- package/dist/components/page/index.js +2 -0
- package/dist/components/popover/Popover.d.ts +1 -0
- package/dist/components/popover/Popover.d.ts.map +10 -0
- package/dist/components/popover/index.cjs +1 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.d.ts.map +10 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/spinner/Spinner.d.ts +1 -0
- package/dist/components/spinner/Spinner.d.ts.map +10 -0
- package/dist/components/spinner/index.cjs +1 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.d.ts.map +10 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stack/Stack.d.ts +1 -0
- package/dist/components/stack/Stack.d.ts.map +10 -0
- package/dist/components/stack/index.cjs +1 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.d.ts.map +10 -0
- package/dist/components/stack/index.js +2 -0
- package/dist/components/switch/Switch.d.ts +1 -0
- package/dist/components/switch/Switch.d.ts.map +10 -0
- package/dist/components/switch/index.cjs +1 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.d.ts.map +10 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/text/Text.d.ts +1 -0
- package/dist/components/text/Text.d.ts.map +10 -0
- package/dist/components/text/index.cjs +1 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.d.ts.map +10 -0
- package/dist/components/text/index.js +2 -0
- package/dist/index.cjs +1 -63
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +10 -0
- package/dist/index.js +16 -2756
- package/dist/mintui-elements.d.ts +78 -0
- package/dist/mintui-elements.d.ts.map +10 -0
- package/dist/styles.css +1 -0
- package/package.json +51 -24
package/dist/index.js
CHANGED
|
@@ -1,2756 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
t !== n && this.render();
|
|
18
|
-
}
|
|
19
|
-
disconnectedCallback() {
|
|
20
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
21
|
-
}
|
|
22
|
-
_observeDarkMode() {
|
|
23
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
|
|
24
|
-
this.render();
|
|
25
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
26
|
-
attributes: !0,
|
|
27
|
-
attributeFilter: ["class"]
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
getSize() {
|
|
31
|
-
let e = this.getAttribute("size") || "default", t = {
|
|
32
|
-
default: "w-4 h-4",
|
|
33
|
-
large: "w-16 h-16"
|
|
34
|
-
};
|
|
35
|
-
return t[e] || t.default;
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
let e = this.getSize(), t = this.getAttribute("size") || "default", n = this.style.width && this.style.height, r = this.getAttribute("data-button-variant"), i = document.documentElement.classList.contains("dark"), a;
|
|
39
|
-
if (n) {
|
|
40
|
-
let e = this.getAttribute("data-button-tone") || "neutral";
|
|
41
|
-
a = r === "solid" ? e === "neutral" ? i ? "#ffffff" : "#0f172a" : "#ffffff" : i ? "#ffffff" : "#0f172a";
|
|
42
|
-
} else a = i ? "#e2e8f0" : "#0f172a";
|
|
43
|
-
let o = t === "large" ? "2" : "4", s = this.style.width && this.style.height;
|
|
44
|
-
this.innerHTML = `
|
|
45
|
-
<svg
|
|
46
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
47
|
-
fill="none"
|
|
48
|
-
viewBox="0 0 24 24"
|
|
49
|
-
class="mint-spinner-rotate ${s ? "" : e}"
|
|
50
|
-
style="${s ? `width: ${this.style.width}; height: ${this.style.height};` : ""} --mint-spinner-rotate-duration: 0.8s; --mint-spinner-dash-duration: 1.2s;"
|
|
51
|
-
>
|
|
52
|
-
<style>
|
|
53
|
-
@keyframes mint-spinner-rotate {
|
|
54
|
-
to { transform: rotate(360deg); }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes mint-spinner-dash-array {
|
|
58
|
-
0% { stroke-dasharray: 0 62.83; }
|
|
59
|
-
25% { stroke-dasharray: 15.7 47.13; }
|
|
60
|
-
50% { stroke-dasharray: 31.4 31.4; }
|
|
61
|
-
75% { stroke-dasharray: 15.7 47.13; }
|
|
62
|
-
100% { stroke-dasharray: 0 62.83; }
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes mint-spinner-dash-offset {
|
|
66
|
-
0% { stroke-dashoffset: 0; }
|
|
67
|
-
100% { stroke-dashoffset: -62.83; }
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.mint-spinner-rotate {
|
|
71
|
-
transform-origin: 50% 50%;
|
|
72
|
-
transform-box: fill-box;
|
|
73
|
-
animation: mint-spinner-rotate var(--mint-spinner-rotate-duration, 0.8s) linear infinite;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.mint-spinner-progress {
|
|
77
|
-
animation:
|
|
78
|
-
mint-spinner-dash-array var(--mint-spinner-dash-duration, 1.2s) ease-in-out infinite,
|
|
79
|
-
mint-spinner-dash-offset var(--mint-spinner-dash-duration, 1.2s) linear infinite;
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<circle
|
|
84
|
-
cx="12"
|
|
85
|
-
cy="12"
|
|
86
|
-
r="10"
|
|
87
|
-
stroke="${a}"
|
|
88
|
-
stroke-width="${o}"
|
|
89
|
-
opacity="0.25"
|
|
90
|
-
class="opacity-25"
|
|
91
|
-
></circle>
|
|
92
|
-
<circle
|
|
93
|
-
cx="12"
|
|
94
|
-
cy="12"
|
|
95
|
-
r="10"
|
|
96
|
-
stroke="${a}"
|
|
97
|
-
stroke-width="${o}"
|
|
98
|
-
stroke-linecap="round"
|
|
99
|
-
fill="none"
|
|
100
|
-
opacity="0.75"
|
|
101
|
-
stroke-dasharray="0 62.83"
|
|
102
|
-
stroke-dashoffset="0"
|
|
103
|
-
class="mint-spinner-progress"
|
|
104
|
-
/>
|
|
105
|
-
</svg>
|
|
106
|
-
`.trim();
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
customElements.get("mint-spinner") || customElements.define("mint-spinner", e);
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region src/components/icon/registry.js
|
|
112
|
-
var t = /* @__PURE__ */ new Map();
|
|
113
|
-
function n(e) {
|
|
114
|
-
t.set(e.name, e);
|
|
115
|
-
}
|
|
116
|
-
function r(e) {
|
|
117
|
-
return t.get(e);
|
|
118
|
-
}
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region src/components/icon/Icon.js
|
|
121
|
-
var i = class extends HTMLElement {
|
|
122
|
-
static get observedAttributes() {
|
|
123
|
-
return ["name"];
|
|
124
|
-
}
|
|
125
|
-
constructor() {
|
|
126
|
-
super(), this._darkModeObserver = null;
|
|
127
|
-
}
|
|
128
|
-
connectedCallback() {
|
|
129
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "inline-flex", "items-center", "leading-none"), this.render(), this._observeDarkMode();
|
|
130
|
-
}
|
|
131
|
-
attributeChangedCallback(e, t, n) {
|
|
132
|
-
t !== n && this.render();
|
|
133
|
-
}
|
|
134
|
-
disconnectedCallback() {
|
|
135
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
136
|
-
}
|
|
137
|
-
_observeDarkMode() {
|
|
138
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver((e) => {
|
|
139
|
-
for (let t of e) if (t.type === "attributes" && t.attributeName === "class") {
|
|
140
|
-
this.render();
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
144
|
-
attributes: !0,
|
|
145
|
-
attributeFilter: ["class"]
|
|
146
|
-
}));
|
|
147
|
-
}
|
|
148
|
-
getName() {
|
|
149
|
-
return this.getAttribute("name") || "";
|
|
150
|
-
}
|
|
151
|
-
getIconUrl() {
|
|
152
|
-
let e = document.documentElement.getAttribute("data-icon-base-url") || document.querySelector("meta[name=\"icon-base-url\"]")?.getAttribute("content");
|
|
153
|
-
return e ? `${e}/${this.getName()}.svg` : `/icons/${this.getName()}.svg`;
|
|
154
|
-
}
|
|
155
|
-
render() {
|
|
156
|
-
let e = this.getName();
|
|
157
|
-
if (!e) {
|
|
158
|
-
this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (!r(e)) {
|
|
162
|
-
console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import '@monobill-mintui/icon/icons/${e}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
let t = this.closest("mint-button") || this.parentElement?.closest("mint-button"), n = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), i;
|
|
166
|
-
i = n ? "w-3 h-3" : t ? "w-5 h-5" : "w-[1.3em] h-[1.3em]", this.classList.remove("w-4", "h-4", "w-5", "h-5", "w-[1em]", "h-[1em]"), i.split(" ").forEach((e) => {
|
|
167
|
-
e && this.classList.add(e);
|
|
168
|
-
});
|
|
169
|
-
let a = this.getIconUrl();
|
|
170
|
-
if (this.style.maskImage = `url(${a})`, this.style.webkitMaskImage = `url(${a})`, this.style.maskSize = "contain", this.style.webkitMaskSize = "contain", this.style.maskRepeat = "no-repeat", this.style.webkitMaskRepeat = "no-repeat", this.style.maskPosition = "center", this.style.webkitMaskPosition = "center", this.style.aspectRatio = "1 / 1", this.style.backgroundColor = "currentColor", n) this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
|
|
171
|
-
else if (t) this.classList.remove("text-gray-100", "text-gray-900");
|
|
172
|
-
else {
|
|
173
|
-
let e = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
|
|
174
|
-
this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(e);
|
|
175
|
-
}
|
|
176
|
-
this.innerHTML = "";
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
customElements.get("mint-icon") || customElements.define("mint-icon", i);
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/components/icon/icons/plus.js
|
|
182
|
-
var a = {
|
|
183
|
-
name: "plus",
|
|
184
|
-
viewBox: "0 0 24 24",
|
|
185
|
-
path: "M12 4v16m8-8H4",
|
|
186
|
-
strokeLinecap: "round",
|
|
187
|
-
strokeLinejoin: "round"
|
|
188
|
-
};
|
|
189
|
-
n(a);
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/components/icon/icons/user.js
|
|
192
|
-
var o = {
|
|
193
|
-
name: "user",
|
|
194
|
-
viewBox: "0 0 24 24",
|
|
195
|
-
path: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
|
|
196
|
-
strokeLinecap: "round",
|
|
197
|
-
strokeLinejoin: "round"
|
|
198
|
-
};
|
|
199
|
-
n(o);
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/components/icon/icons/trash.js
|
|
202
|
-
var s = {
|
|
203
|
-
name: "trash",
|
|
204
|
-
viewBox: "0 0 24 24",
|
|
205
|
-
path: "M3 6h18m-2 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2",
|
|
206
|
-
strokeLinecap: "round",
|
|
207
|
-
strokeLinejoin: "round"
|
|
208
|
-
};
|
|
209
|
-
n(s);
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region src/components/icon/icons/arrow-left.js
|
|
212
|
-
var c = {
|
|
213
|
-
name: "arrow-left",
|
|
214
|
-
viewBox: "0 0 24 24",
|
|
215
|
-
path: "M19 12H5m7-7l-7 7 7 7",
|
|
216
|
-
strokeLinecap: "round",
|
|
217
|
-
strokeLinejoin: "round"
|
|
218
|
-
};
|
|
219
|
-
n(c);
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/components/icon/icons/home.js
|
|
222
|
-
var ee = {
|
|
223
|
-
name: "home",
|
|
224
|
-
viewBox: "0 0 24 24",
|
|
225
|
-
path: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
|
|
226
|
-
strokeLinecap: "round",
|
|
227
|
-
strokeLinejoin: "round"
|
|
228
|
-
};
|
|
229
|
-
n(ee);
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/components/icon/icons/search.js
|
|
232
|
-
var te = {
|
|
233
|
-
name: "search",
|
|
234
|
-
viewBox: "0 0 24 24",
|
|
235
|
-
path: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
|
|
236
|
-
strokeLinecap: "round",
|
|
237
|
-
strokeLinejoin: "round"
|
|
238
|
-
};
|
|
239
|
-
n(te);
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/components/icon/icons/notifications.js
|
|
242
|
-
var l = {
|
|
243
|
-
name: "notifications",
|
|
244
|
-
viewBox: "0 0 24 24",
|
|
245
|
-
path: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
|
|
246
|
-
strokeLinecap: "round",
|
|
247
|
-
strokeLinejoin: "round"
|
|
248
|
-
};
|
|
249
|
-
n(l);
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region src/components/icon/icons/chat.js
|
|
252
|
-
var u = {
|
|
253
|
-
name: "chat",
|
|
254
|
-
viewBox: "0 0 24 24",
|
|
255
|
-
path: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
|
|
256
|
-
strokeLinecap: "round",
|
|
257
|
-
strokeLinejoin: "round"
|
|
258
|
-
};
|
|
259
|
-
n(u);
|
|
260
|
-
//#endregion
|
|
261
|
-
//#region src/components/icon/icons/help.js
|
|
262
|
-
var d = {
|
|
263
|
-
name: "help",
|
|
264
|
-
viewBox: "0 0 24 24",
|
|
265
|
-
path: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
266
|
-
strokeLinecap: "round",
|
|
267
|
-
strokeLinejoin: "round"
|
|
268
|
-
};
|
|
269
|
-
n(d);
|
|
270
|
-
//#endregion
|
|
271
|
-
//#region src/components/icon/icons/documentation.js
|
|
272
|
-
var f = {
|
|
273
|
-
name: "documentation",
|
|
274
|
-
viewBox: "0 0 24 24",
|
|
275
|
-
path: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
|
|
276
|
-
strokeLinecap: "round",
|
|
277
|
-
strokeLinejoin: "round"
|
|
278
|
-
};
|
|
279
|
-
n(f);
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region src/components/icon/icons/mail.js
|
|
282
|
-
var p = {
|
|
283
|
-
name: "mail",
|
|
284
|
-
viewBox: "0 0 24 24",
|
|
285
|
-
path: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",
|
|
286
|
-
strokeLinecap: "round",
|
|
287
|
-
strokeLinejoin: "round"
|
|
288
|
-
};
|
|
289
|
-
n(p);
|
|
290
|
-
//#endregion
|
|
291
|
-
//#region src/components/icon/icons/settings.js
|
|
292
|
-
var m = {
|
|
293
|
-
name: "settings",
|
|
294
|
-
viewBox: "0 0 24 24",
|
|
295
|
-
path: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
|
|
296
|
-
strokeLinecap: "round",
|
|
297
|
-
strokeLinejoin: "round"
|
|
298
|
-
};
|
|
299
|
-
n(m);
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region src/components/icon/icons/language.js
|
|
302
|
-
var h = {
|
|
303
|
-
name: "language",
|
|
304
|
-
viewBox: "0 0 24 24",
|
|
305
|
-
path: "M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129",
|
|
306
|
-
strokeLinecap: "round",
|
|
307
|
-
strokeLinejoin: "round"
|
|
308
|
-
};
|
|
309
|
-
n(h);
|
|
310
|
-
//#endregion
|
|
311
|
-
//#region src/components/icon/icons/moon.js
|
|
312
|
-
var g = {
|
|
313
|
-
name: "moon",
|
|
314
|
-
viewBox: "0 0 24 24",
|
|
315
|
-
path: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",
|
|
316
|
-
strokeLinecap: "round",
|
|
317
|
-
strokeLinejoin: "round"
|
|
318
|
-
};
|
|
319
|
-
n(g);
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region src/components/icon/icons/sun.js
|
|
322
|
-
var _ = {
|
|
323
|
-
name: "sun",
|
|
324
|
-
viewBox: "0 0 24 24",
|
|
325
|
-
path: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
|
|
326
|
-
strokeLinecap: "round",
|
|
327
|
-
strokeLinejoin: "round"
|
|
328
|
-
};
|
|
329
|
-
n(_);
|
|
330
|
-
//#endregion
|
|
331
|
-
//#region src/components/icon/icons/logout.js
|
|
332
|
-
var v = {
|
|
333
|
-
name: "logout",
|
|
334
|
-
viewBox: "0 0 24 24",
|
|
335
|
-
path: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",
|
|
336
|
-
strokeLinecap: "round",
|
|
337
|
-
strokeLinejoin: "round"
|
|
338
|
-
};
|
|
339
|
-
n(v);
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/components/icon/icons/login.js
|
|
342
|
-
var y = {
|
|
343
|
-
name: "login",
|
|
344
|
-
viewBox: "0 0 24 24",
|
|
345
|
-
path: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",
|
|
346
|
-
strokeLinecap: "round",
|
|
347
|
-
strokeLinejoin: "round"
|
|
348
|
-
};
|
|
349
|
-
n(y);
|
|
350
|
-
//#endregion
|
|
351
|
-
//#region src/components/icon/icons/user-add.js
|
|
352
|
-
var b = {
|
|
353
|
-
name: "user-add",
|
|
354
|
-
viewBox: "0 0 24 24",
|
|
355
|
-
path: "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",
|
|
356
|
-
strokeLinecap: "round",
|
|
357
|
-
strokeLinejoin: "round"
|
|
358
|
-
};
|
|
359
|
-
n(b);
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region src/components/icon/icons/calendar.js
|
|
362
|
-
var x = {
|
|
363
|
-
name: "calendar",
|
|
364
|
-
viewBox: "0 0 24 24",
|
|
365
|
-
path: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",
|
|
366
|
-
strokeLinecap: "round",
|
|
367
|
-
strokeLinejoin: "round"
|
|
368
|
-
};
|
|
369
|
-
n(x);
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/components/icon/icons/clock.js
|
|
372
|
-
var S = {
|
|
373
|
-
name: "clock",
|
|
374
|
-
viewBox: "0 0 24 24",
|
|
375
|
-
path: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
376
|
-
strokeLinecap: "round",
|
|
377
|
-
strokeLinejoin: "round"
|
|
378
|
-
};
|
|
379
|
-
n(S);
|
|
380
|
-
//#endregion
|
|
381
|
-
//#region src/components/icon/icons/bookmark.js
|
|
382
|
-
var C = {
|
|
383
|
-
name: "bookmark",
|
|
384
|
-
viewBox: "0 0 24 24",
|
|
385
|
-
path: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",
|
|
386
|
-
strokeLinecap: "round",
|
|
387
|
-
strokeLinejoin: "round"
|
|
388
|
-
};
|
|
389
|
-
n(C);
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/components/icon/icons/star.js
|
|
392
|
-
var w = {
|
|
393
|
-
name: "star",
|
|
394
|
-
viewBox: "0 0 24 24",
|
|
395
|
-
path: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",
|
|
396
|
-
strokeLinecap: "round",
|
|
397
|
-
strokeLinejoin: "round"
|
|
398
|
-
};
|
|
399
|
-
n(w);
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region src/components/icon/icons/pin.js
|
|
402
|
-
var T = {
|
|
403
|
-
name: "pin",
|
|
404
|
-
viewBox: "0 0 24 24",
|
|
405
|
-
path: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z",
|
|
406
|
-
strokeLinecap: "round",
|
|
407
|
-
strokeLinejoin: "round"
|
|
408
|
-
};
|
|
409
|
-
n(T);
|
|
410
|
-
//#endregion
|
|
411
|
-
//#region src/components/icon/icons/filter.js
|
|
412
|
-
var E = {
|
|
413
|
-
name: "filter",
|
|
414
|
-
viewBox: "0 0 24 24",
|
|
415
|
-
path: "M3 6h18M3 12h18M3 18h18M6 6a2 2 0 11-4 0 2 2 0 014 0zM12 12a2 2 0 11-4 0 2 2 0 014 0zM16 18a2 2 0 11-4 0 2 2 0 014 0z",
|
|
416
|
-
strokeLinecap: "round",
|
|
417
|
-
strokeLinejoin: "round"
|
|
418
|
-
};
|
|
419
|
-
n(E);
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region src/components/icon/icons/sort.js
|
|
422
|
-
var D = {
|
|
423
|
-
name: "sort",
|
|
424
|
-
viewBox: "0 0 24 24",
|
|
425
|
-
path: "M3 6h18M7 12h10m-7 6h4",
|
|
426
|
-
strokeLinecap: "round",
|
|
427
|
-
strokeLinejoin: "round"
|
|
428
|
-
};
|
|
429
|
-
n(D);
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region src/components/icon/icons/refresh.js
|
|
432
|
-
var O = {
|
|
433
|
-
name: "refresh",
|
|
434
|
-
viewBox: "0 0 24 24",
|
|
435
|
-
path: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",
|
|
436
|
-
strokeLinecap: "round",
|
|
437
|
-
strokeLinejoin: "round"
|
|
438
|
-
};
|
|
439
|
-
n(O);
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region src/components/icon/icons/share.js
|
|
442
|
-
var k = {
|
|
443
|
-
name: "share",
|
|
444
|
-
viewBox: "0 0 24 24",
|
|
445
|
-
path: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",
|
|
446
|
-
strokeLinecap: "round",
|
|
447
|
-
strokeLinejoin: "round"
|
|
448
|
-
};
|
|
449
|
-
n(k);
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region src/components/icon/icons/upload.js
|
|
452
|
-
var A = {
|
|
453
|
-
name: "upload",
|
|
454
|
-
viewBox: "0 0 24 24",
|
|
455
|
-
path: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",
|
|
456
|
-
strokeLinecap: "round",
|
|
457
|
-
strokeLinejoin: "round"
|
|
458
|
-
};
|
|
459
|
-
n(A);
|
|
460
|
-
//#endregion
|
|
461
|
-
//#region src/components/icon/icons/download.js
|
|
462
|
-
var j = {
|
|
463
|
-
name: "download",
|
|
464
|
-
viewBox: "0 0 24 24",
|
|
465
|
-
path: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",
|
|
466
|
-
strokeLinecap: "round",
|
|
467
|
-
strokeLinejoin: "round"
|
|
468
|
-
};
|
|
469
|
-
n(j);
|
|
470
|
-
//#endregion
|
|
471
|
-
//#region src/components/icon/icons/print.js
|
|
472
|
-
var M = {
|
|
473
|
-
name: "print",
|
|
474
|
-
viewBox: "0 0 24 24",
|
|
475
|
-
path: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",
|
|
476
|
-
strokeLinecap: "round",
|
|
477
|
-
strokeLinejoin: "round"
|
|
478
|
-
};
|
|
479
|
-
n(M);
|
|
480
|
-
//#endregion
|
|
481
|
-
//#region src/components/icon/icons/attach.js
|
|
482
|
-
var N = {
|
|
483
|
-
name: "attach",
|
|
484
|
-
viewBox: "0 0 24 24",
|
|
485
|
-
path: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",
|
|
486
|
-
strokeLinecap: "round",
|
|
487
|
-
strokeLinejoin: "round"
|
|
488
|
-
};
|
|
489
|
-
n(N);
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region src/components/icon/icons/edit.js
|
|
492
|
-
var P = {
|
|
493
|
-
name: "edit",
|
|
494
|
-
viewBox: "0 0 24 24",
|
|
495
|
-
path: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z",
|
|
496
|
-
strokeLinecap: "round",
|
|
497
|
-
strokeLinejoin: "round"
|
|
498
|
-
};
|
|
499
|
-
n(P);
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region src/components/icon/icons/delete.js
|
|
502
|
-
var F = {
|
|
503
|
-
name: "delete",
|
|
504
|
-
viewBox: "0 0 24 24",
|
|
505
|
-
path: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",
|
|
506
|
-
strokeLinecap: "round",
|
|
507
|
-
strokeLinejoin: "round"
|
|
508
|
-
};
|
|
509
|
-
n(F);
|
|
510
|
-
//#endregion
|
|
511
|
-
//#region src/components/icon/icons/save.js
|
|
512
|
-
var I = {
|
|
513
|
-
name: "save",
|
|
514
|
-
viewBox: "0 0 24 24",
|
|
515
|
-
path: "M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4",
|
|
516
|
-
strokeLinecap: "round",
|
|
517
|
-
strokeLinejoin: "round"
|
|
518
|
-
};
|
|
519
|
-
n(I);
|
|
520
|
-
//#endregion
|
|
521
|
-
//#region src/components/icon/icons/duplicate.js
|
|
522
|
-
var L = {
|
|
523
|
-
name: "duplicate",
|
|
524
|
-
viewBox: "0 0 24 24",
|
|
525
|
-
path: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",
|
|
526
|
-
strokeLinecap: "round",
|
|
527
|
-
strokeLinejoin: "round"
|
|
528
|
-
};
|
|
529
|
-
n(L);
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region src/components/icon/icons/copy.js
|
|
532
|
-
var R = {
|
|
533
|
-
name: "copy",
|
|
534
|
-
viewBox: "0 0 24 24",
|
|
535
|
-
path: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",
|
|
536
|
-
strokeLinecap: "round",
|
|
537
|
-
strokeLinejoin: "round"
|
|
538
|
-
};
|
|
539
|
-
n(R);
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/components/icon/icons/paste.js
|
|
542
|
-
var z = {
|
|
543
|
-
name: "paste",
|
|
544
|
-
viewBox: "0 0 24 24",
|
|
545
|
-
path: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
|
|
546
|
-
strokeLinecap: "round",
|
|
547
|
-
strokeLinejoin: "round"
|
|
548
|
-
};
|
|
549
|
-
n(z);
|
|
550
|
-
//#endregion
|
|
551
|
-
//#region src/components/icon/icons/remove.js
|
|
552
|
-
var B = {
|
|
553
|
-
name: "remove",
|
|
554
|
-
viewBox: "0 0 24 24",
|
|
555
|
-
path: "M20 12H4",
|
|
556
|
-
strokeLinecap: "round",
|
|
557
|
-
strokeLinejoin: "round"
|
|
558
|
-
};
|
|
559
|
-
n(B);
|
|
560
|
-
//#endregion
|
|
561
|
-
//#region src/components/icon/icons/check.js
|
|
562
|
-
var V = {
|
|
563
|
-
name: "check",
|
|
564
|
-
viewBox: "0 0 24 24",
|
|
565
|
-
path: "M5 13l4 4L19 7",
|
|
566
|
-
strokeLinecap: "round",
|
|
567
|
-
strokeLinejoin: "round"
|
|
568
|
-
};
|
|
569
|
-
n(V);
|
|
570
|
-
//#endregion
|
|
571
|
-
//#region src/components/icon/icons/close.js
|
|
572
|
-
var H = {
|
|
573
|
-
name: "close",
|
|
574
|
-
viewBox: "0 0 24 24",
|
|
575
|
-
path: "M6 18L18 6M6 6l12 12",
|
|
576
|
-
strokeLinecap: "round",
|
|
577
|
-
strokeLinejoin: "round"
|
|
578
|
-
};
|
|
579
|
-
n(H);
|
|
580
|
-
//#endregion
|
|
581
|
-
//#region src/components/icon/icons/warning.js
|
|
582
|
-
var U = {
|
|
583
|
-
name: "warning",
|
|
584
|
-
viewBox: "0 0 24 24",
|
|
585
|
-
path: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
|
|
586
|
-
strokeLinecap: "round",
|
|
587
|
-
strokeLinejoin: "round"
|
|
588
|
-
};
|
|
589
|
-
n(U);
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/components/icon/icons/error.js
|
|
592
|
-
var W = {
|
|
593
|
-
name: "error",
|
|
594
|
-
viewBox: "0 0 24 24",
|
|
595
|
-
path: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
596
|
-
strokeLinecap: "round",
|
|
597
|
-
strokeLinejoin: "round"
|
|
598
|
-
};
|
|
599
|
-
n(W);
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region src/components/icon/icons/success.js
|
|
602
|
-
var G = {
|
|
603
|
-
name: "success",
|
|
604
|
-
viewBox: "0 0 24 24",
|
|
605
|
-
path: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
606
|
-
strokeLinecap: "round",
|
|
607
|
-
strokeLinejoin: "round"
|
|
608
|
-
};
|
|
609
|
-
n(G);
|
|
610
|
-
//#endregion
|
|
611
|
-
//#region src/components/icon/icons/info.js
|
|
612
|
-
var K = {
|
|
613
|
-
name: "info",
|
|
614
|
-
viewBox: "0 0 24 24",
|
|
615
|
-
path: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
616
|
-
strokeLinecap: "round",
|
|
617
|
-
strokeLinejoin: "round"
|
|
618
|
-
};
|
|
619
|
-
n(K);
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region src/components/icon/icons/folder.js
|
|
622
|
-
var q = {
|
|
623
|
-
name: "folder",
|
|
624
|
-
viewBox: "0 0 24 24",
|
|
625
|
-
path: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",
|
|
626
|
-
strokeLinecap: "round",
|
|
627
|
-
strokeLinejoin: "round"
|
|
628
|
-
};
|
|
629
|
-
n(q);
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/components/icon/icons/file.js
|
|
632
|
-
var J = {
|
|
633
|
-
name: "file",
|
|
634
|
-
viewBox: "0 0 24 24",
|
|
635
|
-
path: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
|
|
636
|
-
strokeLinecap: "round",
|
|
637
|
-
strokeLinejoin: "round"
|
|
638
|
-
};
|
|
639
|
-
n(J);
|
|
640
|
-
//#endregion
|
|
641
|
-
//#region src/components/icon/icons/archive.js
|
|
642
|
-
var ne = {
|
|
643
|
-
name: "archive",
|
|
644
|
-
viewBox: "0 0 24 24",
|
|
645
|
-
path: "M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4",
|
|
646
|
-
strokeLinecap: "round",
|
|
647
|
-
strokeLinejoin: "round"
|
|
648
|
-
};
|
|
649
|
-
n(ne);
|
|
650
|
-
//#endregion
|
|
651
|
-
//#region src/components/icon/icons/image.js
|
|
652
|
-
var Y = {
|
|
653
|
-
name: "image",
|
|
654
|
-
viewBox: "0 0 24 24",
|
|
655
|
-
path: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
|
|
656
|
-
strokeLinecap: "round",
|
|
657
|
-
strokeLinejoin: "round"
|
|
658
|
-
};
|
|
659
|
-
n(Y);
|
|
660
|
-
//#endregion
|
|
661
|
-
//#region src/components/icon/icons/video.js
|
|
662
|
-
var X = {
|
|
663
|
-
name: "video",
|
|
664
|
-
viewBox: "0 0 24 24",
|
|
665
|
-
path: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",
|
|
666
|
-
strokeLinecap: "round",
|
|
667
|
-
strokeLinejoin: "round"
|
|
668
|
-
};
|
|
669
|
-
n(X);
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region src/components/icon/icons/link.js
|
|
672
|
-
var Z = {
|
|
673
|
-
name: "link",
|
|
674
|
-
viewBox: "0 0 24 24",
|
|
675
|
-
path: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
|
|
676
|
-
strokeLinecap: "round",
|
|
677
|
-
strokeLinejoin: "round"
|
|
678
|
-
};
|
|
679
|
-
n(Z);
|
|
680
|
-
//#endregion
|
|
681
|
-
//#region src/components/icon/icons/external-link.js
|
|
682
|
-
var re = {
|
|
683
|
-
name: "external-link",
|
|
684
|
-
viewBox: "0 0 24 24",
|
|
685
|
-
path: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
|
|
686
|
-
strokeLinecap: "round",
|
|
687
|
-
strokeLinejoin: "round"
|
|
688
|
-
};
|
|
689
|
-
n(re);
|
|
690
|
-
//#endregion
|
|
691
|
-
//#region src/components/icon/icons/grid.js
|
|
692
|
-
var ie = {
|
|
693
|
-
name: "grid",
|
|
694
|
-
viewBox: "0 0 24 24",
|
|
695
|
-
path: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",
|
|
696
|
-
strokeLinecap: "round",
|
|
697
|
-
strokeLinejoin: "round"
|
|
698
|
-
};
|
|
699
|
-
n(ie);
|
|
700
|
-
//#endregion
|
|
701
|
-
//#region src/components/icon/icons/list.js
|
|
702
|
-
var ae = {
|
|
703
|
-
name: "list",
|
|
704
|
-
viewBox: "0 0 24 24",
|
|
705
|
-
path: "M8 6h13M5 6h.01M8 12h13M5 12h.01M8 18h13M5 18h.01",
|
|
706
|
-
strokeLinecap: "round",
|
|
707
|
-
strokeLinejoin: "round"
|
|
708
|
-
};
|
|
709
|
-
n(ae);
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region src/components/icon/icons/menu.js
|
|
712
|
-
var oe = {
|
|
713
|
-
name: "menu",
|
|
714
|
-
viewBox: "0 0 24 24",
|
|
715
|
-
path: "M4 6h16M4 12h16M4 18h16",
|
|
716
|
-
strokeLinecap: "round",
|
|
717
|
-
strokeLinejoin: "round"
|
|
718
|
-
};
|
|
719
|
-
n(oe);
|
|
720
|
-
//#endregion
|
|
721
|
-
//#region src/components/icon/icons/ellipsis.js
|
|
722
|
-
var se = {
|
|
723
|
-
name: "ellipsis",
|
|
724
|
-
viewBox: "0 0 24 24",
|
|
725
|
-
path: "M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",
|
|
726
|
-
strokeLinecap: "round",
|
|
727
|
-
strokeLinejoin: "round"
|
|
728
|
-
};
|
|
729
|
-
n(se);
|
|
730
|
-
//#endregion
|
|
731
|
-
//#region src/components/icon/icons/arrow-right.js
|
|
732
|
-
var ce = {
|
|
733
|
-
name: "arrow-right",
|
|
734
|
-
viewBox: "0 0 24 24",
|
|
735
|
-
path: "M14 5l7 7m0 0l-7 7m7-7H3",
|
|
736
|
-
strokeLinecap: "round",
|
|
737
|
-
strokeLinejoin: "round"
|
|
738
|
-
};
|
|
739
|
-
n(ce);
|
|
740
|
-
//#endregion
|
|
741
|
-
//#region src/components/icon/icons/arrow-up.js
|
|
742
|
-
var le = {
|
|
743
|
-
name: "arrow-up",
|
|
744
|
-
viewBox: "0 0 24 24",
|
|
745
|
-
path: "M5 10l7-7m0 0l7 7m-7-7v18",
|
|
746
|
-
strokeLinecap: "round",
|
|
747
|
-
strokeLinejoin: "round"
|
|
748
|
-
};
|
|
749
|
-
n(le);
|
|
750
|
-
//#endregion
|
|
751
|
-
//#region src/components/icon/icons/arrow-down.js
|
|
752
|
-
var ue = {
|
|
753
|
-
name: "arrow-down",
|
|
754
|
-
viewBox: "0 0 24 24",
|
|
755
|
-
path: "M19 14l-7 7m0 0l-7-7m7 7V3",
|
|
756
|
-
strokeLinecap: "round",
|
|
757
|
-
strokeLinejoin: "round"
|
|
758
|
-
};
|
|
759
|
-
n(ue);
|
|
760
|
-
//#endregion
|
|
761
|
-
//#region src/components/icon/icons/caret-left.js
|
|
762
|
-
var de = {
|
|
763
|
-
name: "caret-left",
|
|
764
|
-
viewBox: "0 0 24 24",
|
|
765
|
-
path: "M15 19l-7-7 7-7",
|
|
766
|
-
strokeLinecap: "round",
|
|
767
|
-
strokeLinejoin: "round"
|
|
768
|
-
};
|
|
769
|
-
n(de);
|
|
770
|
-
//#endregion
|
|
771
|
-
//#region src/components/icon/icons/caret-right.js
|
|
772
|
-
var fe = {
|
|
773
|
-
name: "caret-right",
|
|
774
|
-
viewBox: "0 0 24 24",
|
|
775
|
-
path: "M9 5l7 7-7 7",
|
|
776
|
-
strokeLinecap: "round",
|
|
777
|
-
strokeLinejoin: "round"
|
|
778
|
-
};
|
|
779
|
-
n(fe);
|
|
780
|
-
//#endregion
|
|
781
|
-
//#region src/components/icon/icons/caret-up.js
|
|
782
|
-
var pe = {
|
|
783
|
-
name: "caret-up",
|
|
784
|
-
viewBox: "0 0 24 24",
|
|
785
|
-
path: "M5 15l7-7 7 7",
|
|
786
|
-
strokeLinecap: "round",
|
|
787
|
-
strokeLinejoin: "round"
|
|
788
|
-
};
|
|
789
|
-
n(pe);
|
|
790
|
-
//#endregion
|
|
791
|
-
//#region src/components/icon/icons/caret-down.js
|
|
792
|
-
var me = {
|
|
793
|
-
name: "caret-down",
|
|
794
|
-
viewBox: "0 0 24 24",
|
|
795
|
-
path: "M19 9l-7 7-7-7",
|
|
796
|
-
strokeLinecap: "round",
|
|
797
|
-
strokeLinejoin: "round"
|
|
798
|
-
};
|
|
799
|
-
n(me);
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region src/components/icon/icons/lock.js
|
|
802
|
-
var he = {
|
|
803
|
-
name: "lock",
|
|
804
|
-
viewBox: "0 0 24 24",
|
|
805
|
-
path: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",
|
|
806
|
-
strokeLinecap: "round",
|
|
807
|
-
strokeLinejoin: "round"
|
|
808
|
-
};
|
|
809
|
-
n(he);
|
|
810
|
-
//#endregion
|
|
811
|
-
//#region src/components/icon/icons/unlock.js
|
|
812
|
-
var ge = {
|
|
813
|
-
name: "unlock",
|
|
814
|
-
viewBox: "0 0 24 24",
|
|
815
|
-
path: "M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",
|
|
816
|
-
strokeLinecap: "round",
|
|
817
|
-
strokeLinejoin: "round"
|
|
818
|
-
};
|
|
819
|
-
n(ge);
|
|
820
|
-
//#endregion
|
|
821
|
-
//#region src/components/icon/icons/users.js
|
|
822
|
-
var _e = {
|
|
823
|
-
name: "users",
|
|
824
|
-
viewBox: "0 0 24 24",
|
|
825
|
-
path: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",
|
|
826
|
-
strokeLinecap: "round",
|
|
827
|
-
strokeLinejoin: "round"
|
|
828
|
-
};
|
|
829
|
-
n(_e);
|
|
830
|
-
//#endregion
|
|
831
|
-
//#region src/components/icon/icons/tag.js
|
|
832
|
-
var ve = {
|
|
833
|
-
name: "tag",
|
|
834
|
-
viewBox: "0 0 24 24",
|
|
835
|
-
path: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",
|
|
836
|
-
strokeLinecap: "round",
|
|
837
|
-
strokeLinejoin: "round"
|
|
838
|
-
};
|
|
839
|
-
n(ve);
|
|
840
|
-
//#endregion
|
|
841
|
-
//#region src/components/icon/icons/qr-code.js
|
|
842
|
-
var ye = {
|
|
843
|
-
name: "qr-code",
|
|
844
|
-
viewBox: "0 0 24 24",
|
|
845
|
-
path: "M4 3H9C10.1 3 11 3.9 11 5V10C11 11.1 10.1 12 9 12H4C2.9 12 2 11.1 2 10V5C2 3.9 2.9 3 4 3ZM4.75 4.5C4.34 4.5 4 4.84 4 5.25V9.75C4 10.16 4.34 10.5 4.75 10.5H8.25C8.66 10.5 9 10.16 9 9.75V5.25C9 4.84 8.66 4.5 8.25 4.5H4.75ZM15 3H20C21.1 3 22 3.9 22 5V10C22 11.1 21.1 12 20 12H15C13.9 12 13 11.1 13 10V5C13 3.9 13.9 3 15 3ZM15.75 4.5C15.34 4.5 15 4.84 15 5.25V9.75C15 10.16 15.34 10.5 15.75 10.5H19.25C19.66 10.5 20 10.16 20 9.75V5.25C20 4.84 19.66 4.5 19.25 4.5H15.75ZM4 13H9C10.1 13 11 13.9 11 15V20C11 21.1 10.1 22 9 22H4C2.9 22 2 21.1 2 20V15C2 13.9 2.9 13 4 13ZM4.75 14.5C4.34 14.5 4 14.84 4 15.25V19.75C4 20.16 4.34 20.5 4.75 20.5H8.25C8.66 20.5 9 20.16 9 19.75V15.25C9 14.84 8.66 14.5 8.25 14.5H4.75ZM13 13H16V16H19V19H16V22H13V19H16V16H13V13Z",
|
|
846
|
-
strokeLinecap: "round",
|
|
847
|
-
strokeLinejoin: "round"
|
|
848
|
-
};
|
|
849
|
-
n(ye);
|
|
850
|
-
//#endregion
|
|
851
|
-
//#region src/components/icon/icons/barcode.js
|
|
852
|
-
var be = {
|
|
853
|
-
name: "barcode",
|
|
854
|
-
viewBox: "0 0 24 24",
|
|
855
|
-
path: "M3 4h1.5v16H3V4zM7 4h1v16H7V4zM11 4h1.5v16H11V4zM15.5 4h1v16h-1V4zM19.5 4h1.5v16h-1.5V4z",
|
|
856
|
-
strokeLinecap: "round",
|
|
857
|
-
strokeLinejoin: "round"
|
|
858
|
-
};
|
|
859
|
-
n(be);
|
|
860
|
-
//#endregion
|
|
861
|
-
//#region src/components/icon/icons/map.js
|
|
862
|
-
var xe = {
|
|
863
|
-
name: "map",
|
|
864
|
-
viewBox: "0 0 24 24",
|
|
865
|
-
path: "M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",
|
|
866
|
-
strokeLinecap: "round",
|
|
867
|
-
strokeLinejoin: "round"
|
|
868
|
-
};
|
|
869
|
-
n(xe);
|
|
870
|
-
//#endregion
|
|
871
|
-
//#region src/components/icon/icons/location.js
|
|
872
|
-
var Se = {
|
|
873
|
-
name: "location",
|
|
874
|
-
viewBox: "0 0 24 24",
|
|
875
|
-
path: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",
|
|
876
|
-
strokeLinecap: "round",
|
|
877
|
-
strokeLinejoin: "round"
|
|
878
|
-
};
|
|
879
|
-
n(Se), n(a), n(o), n(s), n(c), n(ee), n(te), n(l), n(u), n(d), n(f), n(p), n(m), n(h), n(g), n(_), n(v), n(y), n(b), n(x), n(S), n(C), n(w), n(T), n(E), n(D), n(O), n(k), n(A), n(j), n(M), n(N), n(P), n(F), n(I), n(L), n(R), n(z), n(B), n(V), n(H), n(U), n(W), n(G), n(K), n(q), n(J), n(ne), n(Y), n(X), n(Z), n(re), n(ie), n(ae), n(oe), n(se), n(ce), n(le), n(ue), n(de), n(fe), n(pe), n(me), n(he), n(ge), n(_e), n(ve), n(ye), n(be), n(xe), n(Se);
|
|
880
|
-
//#endregion
|
|
881
|
-
//#region src/components/button/Button.js
|
|
882
|
-
var Q = class extends HTMLElement {
|
|
883
|
-
static get observedAttributes() {
|
|
884
|
-
return [
|
|
885
|
-
"variant",
|
|
886
|
-
"tone",
|
|
887
|
-
"disabled",
|
|
888
|
-
"loading",
|
|
889
|
-
"button-type",
|
|
890
|
-
"full-width",
|
|
891
|
-
"icon-position",
|
|
892
|
-
"icon"
|
|
893
|
-
];
|
|
894
|
-
}
|
|
895
|
-
constructor() {
|
|
896
|
-
super(), this._button = null, this._clickHandler = null, this._isHandlingClick = !1;
|
|
897
|
-
}
|
|
898
|
-
connectedCallback() {
|
|
899
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block"), this.render(), this._button && this.setupEventListeners(), this.isFullWidth() && this.classList.add("w-full");
|
|
900
|
-
}
|
|
901
|
-
disconnectedCallback() {
|
|
902
|
-
this.removeEventListeners();
|
|
903
|
-
}
|
|
904
|
-
attributeChangedCallback(e, t, n) {
|
|
905
|
-
t !== n && this.render();
|
|
906
|
-
}
|
|
907
|
-
getVariant() {
|
|
908
|
-
return this.getAttribute("variant") || "solid";
|
|
909
|
-
}
|
|
910
|
-
getTone() {
|
|
911
|
-
return this.getAttribute("tone") || "neutral";
|
|
912
|
-
}
|
|
913
|
-
isDisabled() {
|
|
914
|
-
return this.hasAttribute("disabled");
|
|
915
|
-
}
|
|
916
|
-
isLoading() {
|
|
917
|
-
return this.hasAttribute("loading");
|
|
918
|
-
}
|
|
919
|
-
getType() {
|
|
920
|
-
return (this.getAttribute("button-type") || "default") === "submit" ? "submit" : "button";
|
|
921
|
-
}
|
|
922
|
-
isFullWidth() {
|
|
923
|
-
return this.hasAttribute("full-width");
|
|
924
|
-
}
|
|
925
|
-
getIconPosition() {
|
|
926
|
-
return this.getAttribute("icon-position") || "left";
|
|
927
|
-
}
|
|
928
|
-
getIcon() {
|
|
929
|
-
return this.getAttribute("icon") || "";
|
|
930
|
-
}
|
|
931
|
-
isIconOnly() {
|
|
932
|
-
if (!(this.getIcon() || this._button?.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon"))) return !1;
|
|
933
|
-
let e = this._button?.querySelector(".mint-button-content");
|
|
934
|
-
if (e && e.textContent.trim()) return !1;
|
|
935
|
-
if (this._button) {
|
|
936
|
-
for (let e = this._button.firstChild; e; e = e.nextSibling) if (e.nodeType === Node.TEXT_NODE && e.textContent.trim() || e.nodeType === Node.ELEMENT_NODE && e.tagName !== "MINT-ICON" && e.tagName !== "MINT-SPINNER" && !e.querySelector?.("mint-spinner") && !e.hasAttribute?.("slot") && e.className !== "mint-button-icon" && !(e.className === "mr-2" && e.querySelector("mint-spinner")) && e.textContent.trim()) return !1;
|
|
937
|
-
}
|
|
938
|
-
return !0;
|
|
939
|
-
}
|
|
940
|
-
getButtonClasses() {
|
|
941
|
-
let e = this.isIconOnly(), t = this.getVariant(), n = [
|
|
942
|
-
"inline-flex",
|
|
943
|
-
"items-center",
|
|
944
|
-
"justify-center",
|
|
945
|
-
"font-medium",
|
|
946
|
-
"rounded-lg",
|
|
947
|
-
"box-border",
|
|
948
|
-
...e ? [
|
|
949
|
-
"p-1.5",
|
|
950
|
-
"aspect-square",
|
|
951
|
-
"w-[2rem]",
|
|
952
|
-
"h-[2rem]"
|
|
953
|
-
] : [
|
|
954
|
-
"px-3.5",
|
|
955
|
-
"py-1.5",
|
|
956
|
-
"min-h-[2rem]"
|
|
957
|
-
],
|
|
958
|
-
"text-sm",
|
|
959
|
-
"transition-all",
|
|
960
|
-
"duration-200",
|
|
961
|
-
"outline-none",
|
|
962
|
-
"focus:outline-none",
|
|
963
|
-
"focus-visible:ring-2",
|
|
964
|
-
"focus-visible:ring-offset-2",
|
|
965
|
-
"[&.mint-button-active>*]:scale-95",
|
|
966
|
-
"[&>*]:transition-transform",
|
|
967
|
-
"[&>*]:duration-100",
|
|
968
|
-
"disabled:opacity-50",
|
|
969
|
-
"disabled:cursor-not-allowed"
|
|
970
|
-
], r = this.getTone(), i = {
|
|
971
|
-
"solid-action": [
|
|
972
|
-
"bg-slate-800",
|
|
973
|
-
"dark:bg-slate-600",
|
|
974
|
-
"text-white",
|
|
975
|
-
"hover:bg-slate-950",
|
|
976
|
-
"dark:hover:bg-slate-700",
|
|
977
|
-
"active:bg-slate-900",
|
|
978
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
979
|
-
"dark:active:bg-slate-700",
|
|
980
|
-
"disabled:active:bg-slate-800",
|
|
981
|
-
"dark:disabled:active:bg-slate-600",
|
|
982
|
-
"disabled:active:shadow-none",
|
|
983
|
-
"focus-visible:ring-slate-500",
|
|
984
|
-
"dark:focus-visible:ring-slate-400",
|
|
985
|
-
"shadow-sm",
|
|
986
|
-
"hover:shadow",
|
|
987
|
-
"dark:shadow-gray-900/50",
|
|
988
|
-
"border-2",
|
|
989
|
-
"border-transparent"
|
|
990
|
-
],
|
|
991
|
-
"solid-neutral": [
|
|
992
|
-
"bg-white",
|
|
993
|
-
"dark:bg-gray-700",
|
|
994
|
-
"text-gray-900",
|
|
995
|
-
"dark:text-white",
|
|
996
|
-
"hover:bg-gray-50",
|
|
997
|
-
"dark:hover:bg-gray-600",
|
|
998
|
-
"active:bg-gray-100",
|
|
999
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1000
|
-
"dark:active:bg-gray-800",
|
|
1001
|
-
"disabled:active:bg-white",
|
|
1002
|
-
"dark:disabled:active:bg-gray-700",
|
|
1003
|
-
"disabled:active:shadow-none",
|
|
1004
|
-
"focus-visible:ring-gray-400",
|
|
1005
|
-
"dark:focus-visible:ring-gray-500",
|
|
1006
|
-
"shadow-sm",
|
|
1007
|
-
"hover:shadow",
|
|
1008
|
-
"dark:shadow-gray-900/50",
|
|
1009
|
-
"border-2",
|
|
1010
|
-
"border-gray-200",
|
|
1011
|
-
"dark:border-gray-600"
|
|
1012
|
-
],
|
|
1013
|
-
"solid-info": [
|
|
1014
|
-
"bg-blue-800",
|
|
1015
|
-
"dark:bg-blue-600",
|
|
1016
|
-
"text-white",
|
|
1017
|
-
"hover:bg-blue-950",
|
|
1018
|
-
"dark:hover:bg-blue-700",
|
|
1019
|
-
"active:bg-blue-900",
|
|
1020
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1021
|
-
"dark:active:bg-blue-700",
|
|
1022
|
-
"disabled:active:bg-blue-800",
|
|
1023
|
-
"dark:disabled:active:bg-blue-600",
|
|
1024
|
-
"disabled:active:shadow-none",
|
|
1025
|
-
"focus-visible:ring-blue-500",
|
|
1026
|
-
"dark:focus-visible:ring-blue-400",
|
|
1027
|
-
"shadow-sm",
|
|
1028
|
-
"hover:shadow",
|
|
1029
|
-
"dark:shadow-gray-900/50",
|
|
1030
|
-
"border-2",
|
|
1031
|
-
"border-transparent"
|
|
1032
|
-
],
|
|
1033
|
-
"solid-warning": [
|
|
1034
|
-
"bg-amber-800",
|
|
1035
|
-
"dark:bg-amber-600",
|
|
1036
|
-
"text-white",
|
|
1037
|
-
"hover:bg-amber-950",
|
|
1038
|
-
"dark:hover:bg-amber-700",
|
|
1039
|
-
"active:bg-amber-900",
|
|
1040
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1041
|
-
"dark:active:bg-amber-700",
|
|
1042
|
-
"disabled:active:bg-amber-800",
|
|
1043
|
-
"dark:disabled:active:bg-amber-600",
|
|
1044
|
-
"disabled:active:shadow-none",
|
|
1045
|
-
"focus-visible:ring-amber-500",
|
|
1046
|
-
"dark:focus-visible:ring-amber-400",
|
|
1047
|
-
"shadow-sm",
|
|
1048
|
-
"hover:shadow",
|
|
1049
|
-
"dark:shadow-gray-900/50",
|
|
1050
|
-
"border-2",
|
|
1051
|
-
"border-transparent"
|
|
1052
|
-
],
|
|
1053
|
-
"solid-danger": [
|
|
1054
|
-
"bg-red-800",
|
|
1055
|
-
"dark:bg-red-600",
|
|
1056
|
-
"text-white",
|
|
1057
|
-
"hover:bg-red-950",
|
|
1058
|
-
"dark:hover:bg-red-700",
|
|
1059
|
-
"active:bg-red-900",
|
|
1060
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1061
|
-
"dark:active:bg-red-700",
|
|
1062
|
-
"disabled:active:bg-red-800",
|
|
1063
|
-
"dark:disabled:active:bg-red-600",
|
|
1064
|
-
"disabled:active:shadow-none",
|
|
1065
|
-
"focus-visible:ring-red-500",
|
|
1066
|
-
"dark:focus-visible:ring-red-400",
|
|
1067
|
-
"shadow-sm",
|
|
1068
|
-
"hover:shadow",
|
|
1069
|
-
"dark:shadow-gray-900/50",
|
|
1070
|
-
"border-2",
|
|
1071
|
-
"border-transparent"
|
|
1072
|
-
],
|
|
1073
|
-
"outline-action": [
|
|
1074
|
-
"bg-transparent",
|
|
1075
|
-
"border-2",
|
|
1076
|
-
"border-slate-700",
|
|
1077
|
-
"dark:border-slate-500",
|
|
1078
|
-
"text-slate-800",
|
|
1079
|
-
"dark:text-slate-600",
|
|
1080
|
-
"hover:bg-slate-800",
|
|
1081
|
-
"dark:hover:bg-slate-600",
|
|
1082
|
-
"hover:text-white",
|
|
1083
|
-
"active:bg-slate-900",
|
|
1084
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1085
|
-
"dark:active:bg-slate-700",
|
|
1086
|
-
"disabled:active:bg-transparent",
|
|
1087
|
-
"dark:disabled:active:bg-transparent",
|
|
1088
|
-
"disabled:active:shadow-none",
|
|
1089
|
-
"focus-visible:ring-slate-500",
|
|
1090
|
-
"dark:focus-visible:ring-slate-400",
|
|
1091
|
-
"shadow-none",
|
|
1092
|
-
"hover:shadow-sm"
|
|
1093
|
-
],
|
|
1094
|
-
"outline-neutral": [
|
|
1095
|
-
"bg-transparent",
|
|
1096
|
-
"border-2",
|
|
1097
|
-
"border-gray-300",
|
|
1098
|
-
"dark:border-gray-500",
|
|
1099
|
-
"text-gray-700",
|
|
1100
|
-
"dark:text-gray-200",
|
|
1101
|
-
"hover:bg-white",
|
|
1102
|
-
"dark:hover:bg-gray-700",
|
|
1103
|
-
"hover:text-gray-900",
|
|
1104
|
-
"dark:hover:text-white",
|
|
1105
|
-
"active:bg-gray-50",
|
|
1106
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1107
|
-
"dark:active:bg-gray-800",
|
|
1108
|
-
"disabled:active:bg-transparent",
|
|
1109
|
-
"dark:disabled:active:bg-transparent",
|
|
1110
|
-
"disabled:active:shadow-none",
|
|
1111
|
-
"focus-visible:ring-gray-400",
|
|
1112
|
-
"dark:focus-visible:ring-gray-500",
|
|
1113
|
-
"shadow-none",
|
|
1114
|
-
"hover:shadow-sm"
|
|
1115
|
-
],
|
|
1116
|
-
"outline-info": [
|
|
1117
|
-
"bg-transparent",
|
|
1118
|
-
"border-2",
|
|
1119
|
-
"border-blue-700",
|
|
1120
|
-
"dark:border-blue-500",
|
|
1121
|
-
"text-blue-800",
|
|
1122
|
-
"dark:text-blue-600",
|
|
1123
|
-
"hover:bg-blue-800",
|
|
1124
|
-
"dark:hover:bg-blue-600",
|
|
1125
|
-
"hover:text-white",
|
|
1126
|
-
"active:bg-blue-900",
|
|
1127
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1128
|
-
"dark:active:bg-blue-700",
|
|
1129
|
-
"disabled:active:bg-transparent",
|
|
1130
|
-
"dark:disabled:active:bg-transparent",
|
|
1131
|
-
"disabled:active:shadow-none",
|
|
1132
|
-
"focus-visible:ring-blue-500",
|
|
1133
|
-
"dark:focus-visible:ring-blue-400",
|
|
1134
|
-
"shadow-none",
|
|
1135
|
-
"hover:shadow-sm"
|
|
1136
|
-
],
|
|
1137
|
-
"outline-warning": [
|
|
1138
|
-
"bg-transparent",
|
|
1139
|
-
"border-2",
|
|
1140
|
-
"border-amber-700",
|
|
1141
|
-
"dark:border-amber-500",
|
|
1142
|
-
"text-amber-800",
|
|
1143
|
-
"dark:text-amber-600",
|
|
1144
|
-
"hover:bg-amber-800",
|
|
1145
|
-
"dark:hover:bg-amber-600",
|
|
1146
|
-
"hover:text-white",
|
|
1147
|
-
"active:bg-amber-900",
|
|
1148
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1149
|
-
"dark:active:bg-amber-700",
|
|
1150
|
-
"disabled:active:bg-transparent",
|
|
1151
|
-
"dark:disabled:active:bg-transparent",
|
|
1152
|
-
"disabled:active:shadow-none",
|
|
1153
|
-
"focus-visible:ring-amber-500",
|
|
1154
|
-
"dark:focus-visible:ring-amber-400",
|
|
1155
|
-
"shadow-none",
|
|
1156
|
-
"hover:shadow-sm"
|
|
1157
|
-
],
|
|
1158
|
-
"outline-danger": [
|
|
1159
|
-
"bg-transparent",
|
|
1160
|
-
"border-2",
|
|
1161
|
-
"border-red-700",
|
|
1162
|
-
"dark:border-red-500",
|
|
1163
|
-
"text-red-800",
|
|
1164
|
-
"dark:text-red-600",
|
|
1165
|
-
"hover:bg-red-800",
|
|
1166
|
-
"dark:hover:bg-red-600",
|
|
1167
|
-
"hover:text-white",
|
|
1168
|
-
"active:bg-red-900",
|
|
1169
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1170
|
-
"dark:active:bg-red-700",
|
|
1171
|
-
"disabled:active:bg-transparent",
|
|
1172
|
-
"dark:disabled:active:bg-transparent",
|
|
1173
|
-
"disabled:active:shadow-none",
|
|
1174
|
-
"focus-visible:ring-red-500",
|
|
1175
|
-
"dark:focus-visible:ring-red-400",
|
|
1176
|
-
"shadow-none",
|
|
1177
|
-
"hover:shadow-sm"
|
|
1178
|
-
],
|
|
1179
|
-
"ghost-action": [
|
|
1180
|
-
"bg-transparent",
|
|
1181
|
-
"text-slate-800",
|
|
1182
|
-
"dark:text-slate-400",
|
|
1183
|
-
"active:bg-gray-100",
|
|
1184
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1185
|
-
"dark:active:bg-gray-800",
|
|
1186
|
-
"disabled:active:bg-transparent",
|
|
1187
|
-
"dark:disabled:active:bg-transparent",
|
|
1188
|
-
"disabled:active:shadow-none",
|
|
1189
|
-
"focus-visible:ring-gray-400",
|
|
1190
|
-
"dark:focus-visible:ring-gray-500",
|
|
1191
|
-
"shadow-none",
|
|
1192
|
-
"hover:shadow-none",
|
|
1193
|
-
"border-2",
|
|
1194
|
-
"border-transparent"
|
|
1195
|
-
],
|
|
1196
|
-
"ghost-neutral": [
|
|
1197
|
-
"bg-transparent",
|
|
1198
|
-
"text-gray-700",
|
|
1199
|
-
"dark:text-gray-200",
|
|
1200
|
-
"active:bg-gray-50",
|
|
1201
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1202
|
-
"dark:active:bg-gray-800",
|
|
1203
|
-
"active:text-gray-900",
|
|
1204
|
-
"dark:active:text-white",
|
|
1205
|
-
"disabled:active:bg-transparent",
|
|
1206
|
-
"dark:disabled:active:bg-transparent",
|
|
1207
|
-
"disabled:active:shadow-none",
|
|
1208
|
-
"focus-visible:ring-gray-400",
|
|
1209
|
-
"dark:focus-visible:ring-gray-500",
|
|
1210
|
-
"shadow-none",
|
|
1211
|
-
"hover:shadow-none",
|
|
1212
|
-
"border-2",
|
|
1213
|
-
"border-transparent"
|
|
1214
|
-
],
|
|
1215
|
-
"ghost-info": [
|
|
1216
|
-
"bg-transparent",
|
|
1217
|
-
"text-blue-800",
|
|
1218
|
-
"dark:text-blue-400",
|
|
1219
|
-
"active:bg-gray-100",
|
|
1220
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1221
|
-
"dark:active:bg-gray-800",
|
|
1222
|
-
"disabled:active:bg-transparent",
|
|
1223
|
-
"dark:disabled:active:bg-transparent",
|
|
1224
|
-
"disabled:active:shadow-none",
|
|
1225
|
-
"focus-visible:ring-gray-400",
|
|
1226
|
-
"dark:focus-visible:ring-gray-500",
|
|
1227
|
-
"shadow-none",
|
|
1228
|
-
"hover:shadow-none",
|
|
1229
|
-
"border-2",
|
|
1230
|
-
"border-transparent"
|
|
1231
|
-
],
|
|
1232
|
-
"ghost-warning": [
|
|
1233
|
-
"bg-transparent",
|
|
1234
|
-
"text-amber-800",
|
|
1235
|
-
"dark:text-amber-400",
|
|
1236
|
-
"active:bg-gray-100",
|
|
1237
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1238
|
-
"dark:active:bg-gray-800",
|
|
1239
|
-
"disabled:active:bg-transparent",
|
|
1240
|
-
"dark:disabled:active:bg-transparent",
|
|
1241
|
-
"disabled:active:shadow-none",
|
|
1242
|
-
"focus-visible:ring-gray-400",
|
|
1243
|
-
"dark:focus-visible:ring-gray-500",
|
|
1244
|
-
"shadow-none",
|
|
1245
|
-
"hover:shadow-none",
|
|
1246
|
-
"border-2",
|
|
1247
|
-
"border-transparent"
|
|
1248
|
-
],
|
|
1249
|
-
"ghost-danger": [
|
|
1250
|
-
"bg-transparent",
|
|
1251
|
-
"text-red-800",
|
|
1252
|
-
"dark:text-red-400",
|
|
1253
|
-
"active:bg-gray-100",
|
|
1254
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]",
|
|
1255
|
-
"dark:active:bg-gray-800",
|
|
1256
|
-
"disabled:active:bg-transparent",
|
|
1257
|
-
"dark:disabled:active:bg-transparent",
|
|
1258
|
-
"disabled:active:shadow-none",
|
|
1259
|
-
"focus-visible:ring-gray-400",
|
|
1260
|
-
"dark:focus-visible:ring-gray-500",
|
|
1261
|
-
"shadow-none",
|
|
1262
|
-
"hover:shadow-none",
|
|
1263
|
-
"border-2",
|
|
1264
|
-
"border-transparent"
|
|
1265
|
-
],
|
|
1266
|
-
"link-action": [
|
|
1267
|
-
"bg-transparent",
|
|
1268
|
-
"text-slate-800",
|
|
1269
|
-
"dark:text-slate-400",
|
|
1270
|
-
"hover:text-slate-950",
|
|
1271
|
-
"dark:hover:text-slate-200",
|
|
1272
|
-
"active:text-slate-900",
|
|
1273
|
-
"dark:active:text-slate-300",
|
|
1274
|
-
"disabled:active:bg-transparent",
|
|
1275
|
-
"dark:disabled:active:bg-transparent",
|
|
1276
|
-
"disabled:active:shadow-none",
|
|
1277
|
-
"focus-visible:ring-slate-500",
|
|
1278
|
-
"dark:focus-visible:ring-slate-400",
|
|
1279
|
-
"shadow-none",
|
|
1280
|
-
"hover:shadow-none",
|
|
1281
|
-
"border-2",
|
|
1282
|
-
"border-transparent"
|
|
1283
|
-
],
|
|
1284
|
-
"link-neutral": [
|
|
1285
|
-
"bg-transparent",
|
|
1286
|
-
"text-gray-700",
|
|
1287
|
-
"dark:text-gray-300",
|
|
1288
|
-
"hover:text-gray-900",
|
|
1289
|
-
"dark:hover:text-gray-100",
|
|
1290
|
-
"active:text-gray-950",
|
|
1291
|
-
"dark:active:text-gray-200",
|
|
1292
|
-
"disabled:active:bg-transparent",
|
|
1293
|
-
"dark:disabled:active:bg-transparent",
|
|
1294
|
-
"disabled:active:shadow-none",
|
|
1295
|
-
"focus-visible:ring-gray-400",
|
|
1296
|
-
"dark:focus-visible:ring-gray-500",
|
|
1297
|
-
"shadow-none",
|
|
1298
|
-
"hover:shadow-none",
|
|
1299
|
-
"border-2",
|
|
1300
|
-
"border-transparent"
|
|
1301
|
-
],
|
|
1302
|
-
"link-info": [
|
|
1303
|
-
"bg-transparent",
|
|
1304
|
-
"text-blue-800",
|
|
1305
|
-
"dark:text-blue-400",
|
|
1306
|
-
"hover:text-blue-950",
|
|
1307
|
-
"dark:hover:text-blue-300",
|
|
1308
|
-
"active:text-blue-900",
|
|
1309
|
-
"dark:active:text-blue-200",
|
|
1310
|
-
"disabled:active:bg-transparent",
|
|
1311
|
-
"dark:disabled:active:bg-transparent",
|
|
1312
|
-
"disabled:active:shadow-none",
|
|
1313
|
-
"focus-visible:ring-blue-500",
|
|
1314
|
-
"dark:focus-visible:ring-blue-400",
|
|
1315
|
-
"shadow-none",
|
|
1316
|
-
"hover:shadow-none",
|
|
1317
|
-
"border-2",
|
|
1318
|
-
"border-transparent"
|
|
1319
|
-
],
|
|
1320
|
-
"link-warning": [
|
|
1321
|
-
"bg-transparent",
|
|
1322
|
-
"text-amber-800",
|
|
1323
|
-
"dark:text-amber-400",
|
|
1324
|
-
"hover:text-amber-950",
|
|
1325
|
-
"dark:hover:text-amber-300",
|
|
1326
|
-
"active:text-amber-900",
|
|
1327
|
-
"dark:active:text-amber-200",
|
|
1328
|
-
"disabled:active:bg-transparent",
|
|
1329
|
-
"dark:disabled:active:bg-transparent",
|
|
1330
|
-
"disabled:active:shadow-none",
|
|
1331
|
-
"focus-visible:ring-amber-500",
|
|
1332
|
-
"dark:focus-visible:ring-amber-400",
|
|
1333
|
-
"shadow-none",
|
|
1334
|
-
"hover:shadow-none",
|
|
1335
|
-
"border-2",
|
|
1336
|
-
"border-transparent"
|
|
1337
|
-
],
|
|
1338
|
-
"link-danger": [
|
|
1339
|
-
"bg-transparent",
|
|
1340
|
-
"text-red-800",
|
|
1341
|
-
"dark:text-red-400",
|
|
1342
|
-
"hover:text-red-950",
|
|
1343
|
-
"dark:hover:text-red-300",
|
|
1344
|
-
"active:text-red-900",
|
|
1345
|
-
"dark:active:text-red-200",
|
|
1346
|
-
"disabled:active:bg-transparent",
|
|
1347
|
-
"dark:disabled:active:bg-transparent",
|
|
1348
|
-
"disabled:active:shadow-none",
|
|
1349
|
-
"focus-visible:ring-red-500",
|
|
1350
|
-
"dark:focus-visible:ring-red-400",
|
|
1351
|
-
"shadow-none",
|
|
1352
|
-
"hover:shadow-none",
|
|
1353
|
-
"border-2",
|
|
1354
|
-
"border-transparent"
|
|
1355
|
-
]
|
|
1356
|
-
}, a = i[`${t}-${r}`] || i["solid-neutral"], o = [...n, ...a];
|
|
1357
|
-
return this.isFullWidth() && o.push("w-full"), o.join(" ");
|
|
1358
|
-
}
|
|
1359
|
-
render() {
|
|
1360
|
-
let e = this.isDisabled() || this.isLoading(), t = this.getType();
|
|
1361
|
-
if (!this._button) {
|
|
1362
|
-
for (this._button = document.createElement("button"); this.firstChild;) this._button.appendChild(this.firstChild);
|
|
1363
|
-
this.appendChild(this._button), this.setupEventListeners();
|
|
1364
|
-
}
|
|
1365
|
-
this._button.type = t, this._button.disabled = e;
|
|
1366
|
-
let n = this._button.querySelector("mint-spinner");
|
|
1367
|
-
if (this.isLoading()) if (n) n.setAttribute("data-button-variant", this.getVariant()), n.setAttribute("data-button-tone", this.getTone()), n.render();
|
|
1368
|
-
else {
|
|
1369
|
-
let e = document.createElement("span");
|
|
1370
|
-
e.className = "mr-2 inline-flex items-center";
|
|
1371
|
-
let t = document.createElement("mint-spinner");
|
|
1372
|
-
t.setAttribute("size", "default"), t.setAttribute("data-button-variant", this.getVariant()), t.setAttribute("data-button-tone", this.getTone()), t.style.width = "0.875rem", t.style.height = "0.875rem", e.appendChild(t), this._button.insertBefore(e, this._button.firstChild);
|
|
1373
|
-
}
|
|
1374
|
-
else n && n.parentElement?.remove();
|
|
1375
|
-
for (; this.firstChild && this.firstChild !== this._button;) this._button.appendChild(this.firstChild);
|
|
1376
|
-
let r = this.getIcon(), i = this._button.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon");
|
|
1377
|
-
r ? (i && i.tagName !== "MINT-ICON" && (i.remove(), i = null), !i || i.tagName !== "MINT-ICON" ? (i = document.createElement("mint-icon"), i.setAttribute("name", r), i.className = "mint-button-icon") : i.setAttribute("name", r)) : i && i.tagName === "MINT-ICON" && (i.remove(), i = null), i ||= this._button.querySelector("[slot=\"icon\"], .mint-button-icon");
|
|
1378
|
-
let a = this.getIconPosition(), o = this._button.querySelector(".mint-button-content");
|
|
1379
|
-
if (o) {
|
|
1380
|
-
let e = i && i.tagName === "MINT-ICON";
|
|
1381
|
-
if (i && !i.parentElement) {
|
|
1382
|
-
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
1383
|
-
e || a === "left" ? t ? t.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o) : o.insertAdjacentElement("afterend", i);
|
|
1384
|
-
} else if (i && (e || a === "left") && i.nextSibling !== o) {
|
|
1385
|
-
i.remove();
|
|
1386
|
-
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
1387
|
-
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o);
|
|
1388
|
-
} else i && !e && a === "right" && i.previousSibling !== o && (i.remove(), o.insertAdjacentElement("afterend", i));
|
|
1389
|
-
} else {
|
|
1390
|
-
let e = [];
|
|
1391
|
-
for (let t = this._button.firstChild; t; t = t.nextSibling) t.tagName !== "MINT-SPINNER" && !t.querySelector?.("mint-spinner") && t !== i && !t.hasAttribute?.("slot") && !(t.className === "mr-2" && t.querySelector("mint-spinner")) && e.push(t);
|
|
1392
|
-
if (e.length > 0) {
|
|
1393
|
-
o = document.createElement("span"), o.className = "mint-button-content inline-flex items-center", e.forEach((e) => {
|
|
1394
|
-
o.appendChild(e);
|
|
1395
|
-
});
|
|
1396
|
-
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
1397
|
-
i && a === "left" ? t ? (t.insertAdjacentElement("afterend", i), i.insertAdjacentElement("afterend", o)) : (this._button.insertBefore(i, this._button.firstChild), i.insertAdjacentElement("afterend", o)) : i && a === "right" ? t ? (t.insertAdjacentElement("afterend", o), o.insertAdjacentElement("afterend", i)) : (this._button.insertBefore(o, this._button.firstChild), o.insertAdjacentElement("afterend", i)) : t ? t.insertAdjacentElement("afterend", o) : this._button.insertBefore(o, this._button.firstChild);
|
|
1398
|
-
} else if (i && i.tagName === "MINT-ICON" && !i.parentElement) {
|
|
1399
|
-
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
1400
|
-
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, this._button.firstChild);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
let s = this.isIconOnly();
|
|
1404
|
-
i && (i.classList.contains("mint-button-icon") || i.classList.add("mint-button-icon"), i.classList.remove("mr-1.5", "ml-1.5"), s ? i.tagName === "MINT-ICON" ? (i.style.width = "1rem", i.style.height = "1rem", i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0") : (i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0", i.tagName === "svg" && (i.style.width = "1rem", i.style.height = "1rem")) : a === "left" ? i.classList.add("mr-1.5") : i.classList.add("ml-1.5"));
|
|
1405
|
-
let c = this.getButtonClasses();
|
|
1406
|
-
this._button.className = c;
|
|
1407
|
-
}
|
|
1408
|
-
setupEventListeners() {
|
|
1409
|
-
this._button && !this._clickHandler && (this._clickHandler = this.handleClick.bind(this), this._button.addEventListener("click", this._clickHandler, !0), this._button.addEventListener("mousedown", this._handleMouseDown), this._button.addEventListener("mouseup", this._handleMouseUp), this._button.addEventListener("mouseleave", this._handleMouseLeave), this._button.addEventListener("touchstart", this._handleTouchStart), this._button.addEventListener("touchend", this._handleTouchEnd), this._button.addEventListener("touchcancel", this._handleTouchCancel));
|
|
1410
|
-
}
|
|
1411
|
-
removeEventListeners() {
|
|
1412
|
-
this._button && (this._clickHandler &&= (this._button.removeEventListener("click", this._clickHandler, !0), null), this._button.removeEventListener("mousedown", this._handleMouseDown), this._button.removeEventListener("mouseup", this._handleMouseUp), this._button.removeEventListener("mouseleave", this._handleMouseLeave), this._button.removeEventListener("touchstart", this._handleTouchStart), this._button.removeEventListener("touchend", this._handleTouchEnd), this._button.removeEventListener("touchcancel", this._handleTouchCancel));
|
|
1413
|
-
}
|
|
1414
|
-
_handleMouseDown = () => {
|
|
1415
|
-
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
1416
|
-
};
|
|
1417
|
-
_handleMouseUp = () => {
|
|
1418
|
-
this._button && this._button.classList.remove("mint-button-active");
|
|
1419
|
-
};
|
|
1420
|
-
_handleMouseLeave = () => {
|
|
1421
|
-
this._button && this._button.classList.remove("mint-button-active");
|
|
1422
|
-
};
|
|
1423
|
-
_handleTouchStart = () => {
|
|
1424
|
-
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
1425
|
-
};
|
|
1426
|
-
_handleTouchEnd = () => {
|
|
1427
|
-
this._button && this._button.classList.remove("mint-button-active");
|
|
1428
|
-
};
|
|
1429
|
-
_handleTouchCancel = () => {
|
|
1430
|
-
this._button && this._button.classList.remove("mint-button-active");
|
|
1431
|
-
};
|
|
1432
|
-
handleClick(e) {
|
|
1433
|
-
if (this.isDisabled() || this.isLoading()) {
|
|
1434
|
-
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
1435
|
-
return;
|
|
1436
|
-
}
|
|
1437
|
-
if (e.stopPropagation(), e.stopImmediatePropagation(), this._isHandlingClick) {
|
|
1438
|
-
e.preventDefault();
|
|
1439
|
-
return;
|
|
1440
|
-
}
|
|
1441
|
-
this._isHandlingClick = !0, e.preventDefault(), this.dispatchEvent(new CustomEvent("click", {
|
|
1442
|
-
detail: { originalEvent: e },
|
|
1443
|
-
bubbles: !0,
|
|
1444
|
-
cancelable: !0,
|
|
1445
|
-
composed: !0
|
|
1446
|
-
})), requestAnimationFrame(() => {
|
|
1447
|
-
this._isHandlingClick = !1;
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
};
|
|
1451
|
-
customElements.get("mint-button") || customElements.define("mint-button", Q);
|
|
1452
|
-
//#endregion
|
|
1453
|
-
//#region src/components/switch/Switch.js
|
|
1454
|
-
var Ce = class extends HTMLElement {
|
|
1455
|
-
static get observedAttributes() {
|
|
1456
|
-
return [
|
|
1457
|
-
"checked",
|
|
1458
|
-
"disabled",
|
|
1459
|
-
"label",
|
|
1460
|
-
"icon"
|
|
1461
|
-
];
|
|
1462
|
-
}
|
|
1463
|
-
constructor() {
|
|
1464
|
-
super(), this._button = null, this._checked = !1;
|
|
1465
|
-
}
|
|
1466
|
-
connectedCallback() {
|
|
1467
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block", "flex", "items-center"), this._checked = this.hasAttribute("checked"), this.render();
|
|
1468
|
-
}
|
|
1469
|
-
disconnectedCallback() {
|
|
1470
|
-
this.removeEventListeners();
|
|
1471
|
-
}
|
|
1472
|
-
attributeChangedCallback(e, t, n) {
|
|
1473
|
-
e === "checked" && (this._checked = n !== null), t !== n && this.render();
|
|
1474
|
-
}
|
|
1475
|
-
get checked() {
|
|
1476
|
-
return this._checked;
|
|
1477
|
-
}
|
|
1478
|
-
set checked(e) {
|
|
1479
|
-
e ? this.setAttribute("checked", "") : this.removeAttribute("checked"), this._checked = !!e, this.render();
|
|
1480
|
-
}
|
|
1481
|
-
isDisabled() {
|
|
1482
|
-
return this.hasAttribute("disabled");
|
|
1483
|
-
}
|
|
1484
|
-
getLabel() {
|
|
1485
|
-
return this.getAttribute("label") || "";
|
|
1486
|
-
}
|
|
1487
|
-
getIcon() {
|
|
1488
|
-
return this.getAttribute("icon") || "";
|
|
1489
|
-
}
|
|
1490
|
-
hasIcon() {
|
|
1491
|
-
return !!this.getIcon();
|
|
1492
|
-
}
|
|
1493
|
-
getSwitchClasses() {
|
|
1494
|
-
let e = [
|
|
1495
|
-
"relative",
|
|
1496
|
-
"inline-flex",
|
|
1497
|
-
"items-center",
|
|
1498
|
-
"rounded-full",
|
|
1499
|
-
"h-5",
|
|
1500
|
-
"w-10",
|
|
1501
|
-
"border",
|
|
1502
|
-
"transition-colors",
|
|
1503
|
-
"duration-200",
|
|
1504
|
-
"ease-in-out",
|
|
1505
|
-
"outline-none",
|
|
1506
|
-
"focus:outline-none",
|
|
1507
|
-
"focus-visible:ring-2",
|
|
1508
|
-
"focus-visible:ring-offset-2",
|
|
1509
|
-
"focus-visible:ring-slate-500",
|
|
1510
|
-
"dark:focus-visible:ring-slate-400",
|
|
1511
|
-
"active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]",
|
|
1512
|
-
"disabled:opacity-50",
|
|
1513
|
-
"disabled:cursor-not-allowed"
|
|
1514
|
-
], t = this._checked ? [
|
|
1515
|
-
"bg-slate-950",
|
|
1516
|
-
"dark:bg-slate-600",
|
|
1517
|
-
"border-slate-700",
|
|
1518
|
-
"dark:border-slate-500"
|
|
1519
|
-
] : [
|
|
1520
|
-
"bg-slate-200",
|
|
1521
|
-
"dark:bg-slate-400",
|
|
1522
|
-
"border-slate-300",
|
|
1523
|
-
"dark:border-slate-500"
|
|
1524
|
-
];
|
|
1525
|
-
return [...e, ...t].join(" ");
|
|
1526
|
-
}
|
|
1527
|
-
getThumbClasses() {
|
|
1528
|
-
let e = [
|
|
1529
|
-
"relative",
|
|
1530
|
-
"inline-block",
|
|
1531
|
-
"rounded-full",
|
|
1532
|
-
"bg-white",
|
|
1533
|
-
"dark:bg-gray-50",
|
|
1534
|
-
"h-4",
|
|
1535
|
-
"w-4",
|
|
1536
|
-
"shadow-lg",
|
|
1537
|
-
"transform",
|
|
1538
|
-
"transition-transform",
|
|
1539
|
-
"duration-200",
|
|
1540
|
-
"ease-in-out",
|
|
1541
|
-
"pointer-events-none",
|
|
1542
|
-
"overflow-hidden"
|
|
1543
|
-
], t = this._checked ? "translate-x-5" : "translate-x-0.5";
|
|
1544
|
-
return [...e, t].join(" ");
|
|
1545
|
-
}
|
|
1546
|
-
getIconClasses() {
|
|
1547
|
-
return [
|
|
1548
|
-
"absolute",
|
|
1549
|
-
"inset-0",
|
|
1550
|
-
"flex",
|
|
1551
|
-
"items-center",
|
|
1552
|
-
"justify-center",
|
|
1553
|
-
"pointer-events-none"
|
|
1554
|
-
].join(" ");
|
|
1555
|
-
}
|
|
1556
|
-
render() {
|
|
1557
|
-
let e = this.getSwitchClasses(), t = this.getThumbClasses(), n = this.getLabel(), r = this.getIcon();
|
|
1558
|
-
this._button || (this._button = document.createElement("button"), this.appendChild(this._button), this.setupEventListeners()), this._button.className = e, this._button.disabled = this.isDisabled(), this._button.setAttribute("aria-checked", this._checked), this._button.setAttribute("aria-label", n), this._button.setAttribute("role", "switch"), this._button.type = "button";
|
|
1559
|
-
let i = this._button.querySelector("span");
|
|
1560
|
-
i || (i = document.createElement("span"), this._button.appendChild(i)), i.className = t;
|
|
1561
|
-
let a = i.querySelector("span");
|
|
1562
|
-
if (r) {
|
|
1563
|
-
let e = a;
|
|
1564
|
-
e || (e = document.createElement("span"), e.className = this.getIconClasses(), i.appendChild(e));
|
|
1565
|
-
let t = e.querySelector("mint-icon");
|
|
1566
|
-
t || (t = document.createElement("mint-icon"), e.appendChild(t)), t.setAttribute("name", r);
|
|
1567
|
-
} else a && a.remove();
|
|
1568
|
-
}
|
|
1569
|
-
setupEventListeners() {
|
|
1570
|
-
this._button && this._button.addEventListener("click", this.handleToggle.bind(this));
|
|
1571
|
-
}
|
|
1572
|
-
removeEventListeners() {
|
|
1573
|
-
this._button && this._button.removeEventListener("click", this.handleToggle.bind(this));
|
|
1574
|
-
}
|
|
1575
|
-
handleToggle(e) {
|
|
1576
|
-
this.isDisabled() || (this.checked = !this._checked, this.dispatchEvent(new CustomEvent("change", {
|
|
1577
|
-
detail: { checked: this._checked },
|
|
1578
|
-
bubbles: !0,
|
|
1579
|
-
cancelable: !0
|
|
1580
|
-
})), this.dispatchEvent(new CustomEvent("toggle", {
|
|
1581
|
-
detail: { checked: this._checked },
|
|
1582
|
-
bubbles: !0,
|
|
1583
|
-
cancelable: !0
|
|
1584
|
-
})));
|
|
1585
|
-
}
|
|
1586
|
-
};
|
|
1587
|
-
customElements.get("mint-switch") || customElements.define("mint-switch", Ce);
|
|
1588
|
-
//#endregion
|
|
1589
|
-
//#region src/components/text/Text.js
|
|
1590
|
-
var $ = class extends HTMLElement {
|
|
1591
|
-
static get observedAttributes() {
|
|
1592
|
-
return [
|
|
1593
|
-
"variant",
|
|
1594
|
-
"size",
|
|
1595
|
-
"bold",
|
|
1596
|
-
"underline",
|
|
1597
|
-
"strike",
|
|
1598
|
-
"italic",
|
|
1599
|
-
"display"
|
|
1600
|
-
];
|
|
1601
|
-
}
|
|
1602
|
-
constructor() {
|
|
1603
|
-
super(), this._darkModeObserver = null, this._userClasses = /* @__PURE__ */ new Set();
|
|
1604
|
-
}
|
|
1605
|
-
connectedCallback() {
|
|
1606
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline"), this._captureUserClasses(), this.render(), this._observeDarkMode();
|
|
1607
|
-
}
|
|
1608
|
-
_captureUserClasses() {
|
|
1609
|
-
Array.from(this.classList).forEach((e) => this._userClasses.add(e));
|
|
1610
|
-
}
|
|
1611
|
-
attributeChangedCallback(e, t, n) {
|
|
1612
|
-
t !== n && this.render();
|
|
1613
|
-
}
|
|
1614
|
-
disconnectedCallback() {
|
|
1615
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
1616
|
-
}
|
|
1617
|
-
_observeDarkMode() {
|
|
1618
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
|
|
1619
|
-
this.render();
|
|
1620
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
1621
|
-
attributes: !0,
|
|
1622
|
-
attributeFilter: ["class"]
|
|
1623
|
-
}));
|
|
1624
|
-
}
|
|
1625
|
-
getVariant() {
|
|
1626
|
-
return this.getAttribute("variant") || "default";
|
|
1627
|
-
}
|
|
1628
|
-
getSize() {
|
|
1629
|
-
return this.getAttribute("size") || "regular";
|
|
1630
|
-
}
|
|
1631
|
-
isBold() {
|
|
1632
|
-
return this.hasAttribute("bold");
|
|
1633
|
-
}
|
|
1634
|
-
isUnderline() {
|
|
1635
|
-
return this.hasAttribute("underline");
|
|
1636
|
-
}
|
|
1637
|
-
isStrike() {
|
|
1638
|
-
return this.hasAttribute("strike");
|
|
1639
|
-
}
|
|
1640
|
-
isItalic() {
|
|
1641
|
-
return this.hasAttribute("italic");
|
|
1642
|
-
}
|
|
1643
|
-
getDisplay() {
|
|
1644
|
-
return this.hasAttribute("display") ? this.getAttribute("display") : this.getSize() === "regular" ? "inline-block" : "block";
|
|
1645
|
-
}
|
|
1646
|
-
getTextClasses() {
|
|
1647
|
-
let e = this.getSize(), t = this.getVariant(), n = document.documentElement.classList.contains("dark"), r = {
|
|
1648
|
-
heading: ["font-semibold"],
|
|
1649
|
-
"sub-heading": ["font-medium"],
|
|
1650
|
-
regular: []
|
|
1651
|
-
}, i = {
|
|
1652
|
-
default: n ? ["text-gray-100"] : ["text-gray-900"],
|
|
1653
|
-
muted: ["text-gray-400"],
|
|
1654
|
-
danger: n ? ["text-red-400"] : ["text-red-600"],
|
|
1655
|
-
success: n ? ["text-green-400"] : ["text-green-600"]
|
|
1656
|
-
}, a = [];
|
|
1657
|
-
this.isBold() && a.push("font-bold"), this.isUnderline() && a.push("underline"), this.isStrike() && a.push("line-through"), this.isItalic() && a.push("italic");
|
|
1658
|
-
let o = this.getDisplay();
|
|
1659
|
-
return [
|
|
1660
|
-
o === "block" ? "block" : o === "inline" ? "inline" : "inline-block",
|
|
1661
|
-
...r[e] || r.regular,
|
|
1662
|
-
...i[t] || i.default,
|
|
1663
|
-
...a
|
|
1664
|
-
].join(" ");
|
|
1665
|
-
}
|
|
1666
|
-
render() {
|
|
1667
|
-
let e = this.getSize(), t = [
|
|
1668
|
-
"text-gray-100",
|
|
1669
|
-
"text-gray-900",
|
|
1670
|
-
"text-gray-400",
|
|
1671
|
-
"text-red-400",
|
|
1672
|
-
"text-red-600",
|
|
1673
|
-
"text-green-400",
|
|
1674
|
-
"text-green-600"
|
|
1675
|
-
], n = [
|
|
1676
|
-
"text-2xl",
|
|
1677
|
-
"text-lg",
|
|
1678
|
-
"text-sm"
|
|
1679
|
-
];
|
|
1680
|
-
n.forEach((e) => {
|
|
1681
|
-
this.classList.remove(e), this._userClasses.delete(e);
|
|
1682
|
-
}), t.forEach((e) => {
|
|
1683
|
-
this.classList.remove(e), this._userClasses.delete(e);
|
|
1684
|
-
});
|
|
1685
|
-
let r = this.getTextClasses().split(" ").filter((e) => e.trim());
|
|
1686
|
-
Array.from(this.classList).forEach((e) => {
|
|
1687
|
-
!t.includes(e) && !n.includes(e) && this._userClasses.add(e);
|
|
1688
|
-
}), this.className = [...new Set([...r, ...Array.from(this._userClasses)])].join(" ");
|
|
1689
|
-
let i = {
|
|
1690
|
-
heading: "clamp(1.25rem, 2.5vw + 0.5rem, 1.5rem)",
|
|
1691
|
-
"sub-heading": "clamp(1rem, 1.5vw + 0.5rem, 1.125rem)",
|
|
1692
|
-
regular: "clamp(0.875rem, 1vw + 0.5rem, 0.875rem)"
|
|
1693
|
-
}, a = i[e] || i.regular;
|
|
1694
|
-
this.style.setProperty("font-size", a);
|
|
1695
|
-
}
|
|
1696
|
-
};
|
|
1697
|
-
customElements.get("mint-text") || customElements.define("mint-text", $);
|
|
1698
|
-
//#endregion
|
|
1699
|
-
//#region src/components/stack/Stack.js
|
|
1700
|
-
var we = class extends HTMLElement {
|
|
1701
|
-
static get observedAttributes() {
|
|
1702
|
-
return ["direction", "text-align"];
|
|
1703
|
-
}
|
|
1704
|
-
constructor() {
|
|
1705
|
-
super();
|
|
1706
|
-
}
|
|
1707
|
-
connectedCallback() {
|
|
1708
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render(), this.getTextAlign() && this._observeChildren();
|
|
1709
|
-
}
|
|
1710
|
-
attributeChangedCallback(e, t, n) {
|
|
1711
|
-
t !== n && (this.render(), e === "text-align" && this._observeChildren());
|
|
1712
|
-
}
|
|
1713
|
-
_observeChildren() {
|
|
1714
|
-
this._childObserver || (this._childObserver = new MutationObserver(() => {
|
|
1715
|
-
let e = this.getTextAlign();
|
|
1716
|
-
e && this._applyTextAlignToChildren(e);
|
|
1717
|
-
}), this._childObserver.observe(this, {
|
|
1718
|
-
childList: !0,
|
|
1719
|
-
subtree: !1
|
|
1720
|
-
}));
|
|
1721
|
-
}
|
|
1722
|
-
disconnectedCallback() {
|
|
1723
|
-
this._childObserver &&= (this._childObserver.disconnect(), null);
|
|
1724
|
-
}
|
|
1725
|
-
getDirection() {
|
|
1726
|
-
return (this.getAttribute("direction") || "vertical") === "horizontal" ? "horizontal" : "vertical";
|
|
1727
|
-
}
|
|
1728
|
-
getTextAlign() {
|
|
1729
|
-
let e = this.getAttribute("text-align") || "";
|
|
1730
|
-
return [
|
|
1731
|
-
"left",
|
|
1732
|
-
"center",
|
|
1733
|
-
"right",
|
|
1734
|
-
"justify"
|
|
1735
|
-
].includes(e) ? e : "";
|
|
1736
|
-
}
|
|
1737
|
-
getStackClasses() {
|
|
1738
|
-
let e = this.getDirection(), t = this.getTextAlign(), n = [
|
|
1739
|
-
"flex",
|
|
1740
|
-
e === "horizontal" ? "flex-row" : "flex-col",
|
|
1741
|
-
"gap-3"
|
|
1742
|
-
];
|
|
1743
|
-
return t && (n.push(`text-${t}`), n.push(`[&>*]:text-${t}`), n.push(`[&>*_.mint-button-content]:text-${t}`), t === "left" ? (n.push("[&>mint-button]:!justify-start"), n.push("[&>mint-button>button]:!justify-start")) : t === "right" ? (n.push("[&>mint-button]:!justify-end"), n.push("[&>mint-button>button]:!justify-end")) : t === "center" && (n.push("[&>mint-button]:!justify-center"), n.push("[&>mint-button>button]:!justify-center"))), n.join(" ");
|
|
1744
|
-
}
|
|
1745
|
-
render() {
|
|
1746
|
-
let e = this.getStackClasses(), t = this.getTextAlign();
|
|
1747
|
-
[
|
|
1748
|
-
"flex",
|
|
1749
|
-
"flex-row",
|
|
1750
|
-
"flex-col",
|
|
1751
|
-
"gap-1",
|
|
1752
|
-
"gap-2",
|
|
1753
|
-
"gap-3",
|
|
1754
|
-
"text-left",
|
|
1755
|
-
"text-center",
|
|
1756
|
-
"text-right",
|
|
1757
|
-
"text-justify",
|
|
1758
|
-
"[&>*]:text-left",
|
|
1759
|
-
"[&>*]:text-center",
|
|
1760
|
-
"[&>*]:text-right",
|
|
1761
|
-
"[&>*]:text-justify",
|
|
1762
|
-
"[&>*_.mint-button-content]:text-left",
|
|
1763
|
-
"[&>*_.mint-button-content]:text-center",
|
|
1764
|
-
"[&>*_.mint-button-content]:text-right",
|
|
1765
|
-
"[&>*_.mint-button-content]:text-justify",
|
|
1766
|
-
"[&>mint-button]:!justify-start",
|
|
1767
|
-
"[&>mint-button]:!justify-center",
|
|
1768
|
-
"[&>mint-button]:!justify-end",
|
|
1769
|
-
"[&>mint-button>button]:!justify-start",
|
|
1770
|
-
"[&>mint-button>button]:!justify-center",
|
|
1771
|
-
"[&>mint-button>button]:!justify-end"
|
|
1772
|
-
].forEach((e) => this.classList.remove(e)), e.split(" ").forEach((e) => {
|
|
1773
|
-
e && this.classList.add(e);
|
|
1774
|
-
}), [
|
|
1775
|
-
"box-border",
|
|
1776
|
-
"m-0",
|
|
1777
|
-
"p-0",
|
|
1778
|
-
"border-0",
|
|
1779
|
-
"align-baseline",
|
|
1780
|
-
"block"
|
|
1781
|
-
].forEach((e) => {
|
|
1782
|
-
this.classList.contains(e) || this.classList.add(e);
|
|
1783
|
-
}), t ? this._applyTextAlignToChildren(t) : this._removeTextAlignFromChildren();
|
|
1784
|
-
}
|
|
1785
|
-
_applyTextAlignToChildren(e) {
|
|
1786
|
-
Array.from(this.children).forEach((t) => {
|
|
1787
|
-
if (t.tagName === "MINT-BUTTON") {
|
|
1788
|
-
let n = t.querySelector("button");
|
|
1789
|
-
if (n) {
|
|
1790
|
-
n.classList.remove("justify-start", "justify-center", "justify-end"), e === "left" ? n.classList.add("justify-start") : e === "right" ? n.classList.add("justify-end") : e === "center" && n.classList.add("justify-center");
|
|
1791
|
-
let t = n.querySelector(".mint-button-content");
|
|
1792
|
-
t && (t.classList.remove("text-left", "text-center", "text-right", "text-justify"), t.classList.add(`text-${e}`));
|
|
1793
|
-
}
|
|
1794
|
-
} else t.classList.remove("text-left", "text-center", "text-right", "text-justify"), t.classList.add(`text-${e}`);
|
|
1795
|
-
});
|
|
1796
|
-
}
|
|
1797
|
-
_removeTextAlignFromChildren() {
|
|
1798
|
-
Array.from(this.children).forEach((e) => {
|
|
1799
|
-
if (e.tagName === "MINT-BUTTON") {
|
|
1800
|
-
let t = e.querySelector("button");
|
|
1801
|
-
if (t) {
|
|
1802
|
-
t.classList.remove("justify-start", "justify-end"), t.classList.add("justify-center");
|
|
1803
|
-
let e = t.querySelector(".mint-button-content");
|
|
1804
|
-
e && e.classList.remove("text-left", "text-center", "text-right", "text-justify");
|
|
1805
|
-
}
|
|
1806
|
-
} else e.classList.remove("text-left", "text-center", "text-right", "text-justify");
|
|
1807
|
-
});
|
|
1808
|
-
}
|
|
1809
|
-
};
|
|
1810
|
-
customElements.get("mint-stack") || customElements.define("mint-stack", we);
|
|
1811
|
-
//#endregion
|
|
1812
|
-
//#region src/components/card/Card.js
|
|
1813
|
-
var Te = class extends HTMLElement {
|
|
1814
|
-
static get observedAttributes() {
|
|
1815
|
-
return [];
|
|
1816
|
-
}
|
|
1817
|
-
constructor() {
|
|
1818
|
-
super();
|
|
1819
|
-
}
|
|
1820
|
-
connectedCallback() {
|
|
1821
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render();
|
|
1822
|
-
}
|
|
1823
|
-
attributeChangedCallback(e, t, n) {
|
|
1824
|
-
t !== n && this.render();
|
|
1825
|
-
}
|
|
1826
|
-
getCardClasses() {
|
|
1827
|
-
return [
|
|
1828
|
-
"rounded-lg",
|
|
1829
|
-
"shadow",
|
|
1830
|
-
"bg-white",
|
|
1831
|
-
"dark:bg-gray-800",
|
|
1832
|
-
"border",
|
|
1833
|
-
"border-gray-200",
|
|
1834
|
-
"dark:border-gray-700",
|
|
1835
|
-
"overflow-hidden",
|
|
1836
|
-
"transition-colors",
|
|
1837
|
-
"duration-200"
|
|
1838
|
-
].join(" ");
|
|
1839
|
-
}
|
|
1840
|
-
render() {
|
|
1841
|
-
let e = this.getCardClasses();
|
|
1842
|
-
[
|
|
1843
|
-
"rounded-lg",
|
|
1844
|
-
"shadow",
|
|
1845
|
-
"bg-white",
|
|
1846
|
-
"dark:bg-gray-800",
|
|
1847
|
-
"border",
|
|
1848
|
-
"border-gray-200",
|
|
1849
|
-
"dark:border-gray-700",
|
|
1850
|
-
"overflow-hidden",
|
|
1851
|
-
"transition-colors",
|
|
1852
|
-
"duration-200"
|
|
1853
|
-
].forEach((e) => this.classList.remove(e)), e.split(" ").forEach((e) => {
|
|
1854
|
-
e && this.classList.add(e);
|
|
1855
|
-
}), [
|
|
1856
|
-
"box-border",
|
|
1857
|
-
"m-0",
|
|
1858
|
-
"p-0",
|
|
1859
|
-
"border-0",
|
|
1860
|
-
"align-baseline",
|
|
1861
|
-
"block"
|
|
1862
|
-
].forEach((e) => {
|
|
1863
|
-
this.classList.contains(e) || this.classList.add(e);
|
|
1864
|
-
});
|
|
1865
|
-
}
|
|
1866
|
-
};
|
|
1867
|
-
customElements.get("mint-card") || customElements.define("mint-card", Te);
|
|
1868
|
-
//#endregion
|
|
1869
|
-
//#region src/components/link/Link.js
|
|
1870
|
-
var Ee = class extends HTMLElement {
|
|
1871
|
-
static get observedAttributes() {
|
|
1872
|
-
return ["href", "target"];
|
|
1873
|
-
}
|
|
1874
|
-
constructor() {
|
|
1875
|
-
super(), this._link = null;
|
|
1876
|
-
}
|
|
1877
|
-
connectedCallback() {
|
|
1878
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block"), this.render(), this._observeContent();
|
|
1879
|
-
}
|
|
1880
|
-
disconnectedCallback() {
|
|
1881
|
-
this._contentObserver &&= (this._contentObserver.disconnect(), null);
|
|
1882
|
-
}
|
|
1883
|
-
_observeContent() {
|
|
1884
|
-
this._contentObserver || (this._contentObserver = new MutationObserver(() => {
|
|
1885
|
-
this._link && this._link.querySelectorAll("mint-text").forEach((e) => {
|
|
1886
|
-
e.classList.contains("underline") || e.classList.add("underline");
|
|
1887
|
-
});
|
|
1888
|
-
}), this._contentObserver.observe(this, {
|
|
1889
|
-
childList: !0,
|
|
1890
|
-
subtree: !0
|
|
1891
|
-
}));
|
|
1892
|
-
}
|
|
1893
|
-
attributeChangedCallback(e, t, n) {
|
|
1894
|
-
t !== n && this.render();
|
|
1895
|
-
}
|
|
1896
|
-
getHref() {
|
|
1897
|
-
return this.getAttribute("href") || "#";
|
|
1898
|
-
}
|
|
1899
|
-
getTarget() {
|
|
1900
|
-
return this.getAttribute("target") || "";
|
|
1901
|
-
}
|
|
1902
|
-
hasIcon() {
|
|
1903
|
-
return !!this.querySelector("mint-icon") || !!this._link?.querySelector("mint-icon");
|
|
1904
|
-
}
|
|
1905
|
-
render() {
|
|
1906
|
-
let e = this.getHref(), t = this.getTarget();
|
|
1907
|
-
if (!this._link) {
|
|
1908
|
-
for (this._link = document.createElement("a"); this.firstChild;) this._link.appendChild(this.firstChild);
|
|
1909
|
-
this.appendChild(this._link);
|
|
1910
|
-
}
|
|
1911
|
-
this._link.href = e, t ? (this._link.target = t, t === "_blank" && (this._link.rel = "noopener noreferrer")) : (this._link.removeAttribute("target"), this._link.removeAttribute("rel"));
|
|
1912
|
-
let n = this.hasIcon(), r = [
|
|
1913
|
-
"text-slate-800",
|
|
1914
|
-
"dark:text-slate-200",
|
|
1915
|
-
"underline",
|
|
1916
|
-
"hover:text-slate-950",
|
|
1917
|
-
"dark:hover:text-slate-100",
|
|
1918
|
-
"transition-colors",
|
|
1919
|
-
"duration-200",
|
|
1920
|
-
"focus-visible:outline-none",
|
|
1921
|
-
"focus-visible:ring-2",
|
|
1922
|
-
"focus-visible:ring-offset-2",
|
|
1923
|
-
"focus-visible:ring-slate-500",
|
|
1924
|
-
"dark:focus-visible:ring-slate-400",
|
|
1925
|
-
"rounded"
|
|
1926
|
-
];
|
|
1927
|
-
n && r.push("inline-flex", "items-center", "gap-2"), this._link.className = r.join(" "), this._link.querySelectorAll("mint-text").forEach((e) => {
|
|
1928
|
-
e.classList.contains("underline") || e.classList.add("underline");
|
|
1929
|
-
}), [
|
|
1930
|
-
"box-border",
|
|
1931
|
-
"m-0",
|
|
1932
|
-
"p-0",
|
|
1933
|
-
"border-0",
|
|
1934
|
-
"align-baseline",
|
|
1935
|
-
"inline-block"
|
|
1936
|
-
].forEach((e) => {
|
|
1937
|
-
this.classList.contains(e) || this.classList.add(e);
|
|
1938
|
-
});
|
|
1939
|
-
}
|
|
1940
|
-
};
|
|
1941
|
-
customElements.get("mint-link") || customElements.define("mint-link", Ee);
|
|
1942
|
-
//#endregion
|
|
1943
|
-
//#region src/components/back-button/BackButton.js
|
|
1944
|
-
var De = class extends HTMLElement {
|
|
1945
|
-
static get observedAttributes() {
|
|
1946
|
-
return ["href", "fallback-href"];
|
|
1947
|
-
}
|
|
1948
|
-
constructor() {
|
|
1949
|
-
super(), this._historyDepth = 0, this._maxBackAttempts = 10, this._backAttempts = 0;
|
|
1950
|
-
}
|
|
1951
|
-
connectedCallback() {
|
|
1952
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block", "flex", "items-center", "justify-center"), this.render(), this._setupHistoryTracking();
|
|
1953
|
-
}
|
|
1954
|
-
attributeChangedCallback(e, t, n) {
|
|
1955
|
-
t !== n && this.render();
|
|
1956
|
-
}
|
|
1957
|
-
_setupHistoryTracking() {
|
|
1958
|
-
window.addEventListener("popstate", () => {
|
|
1959
|
-
this._backAttempts = 0;
|
|
1960
|
-
}), this._historyDepth = window.history.length;
|
|
1961
|
-
}
|
|
1962
|
-
getFallbackHref() {
|
|
1963
|
-
return this.getAttribute("fallback-href") || this.getAttribute("href") || "/";
|
|
1964
|
-
}
|
|
1965
|
-
handleClick(e) {
|
|
1966
|
-
if (e.preventDefault(), e.stopPropagation(), window.history.length > 1 && this._backAttempts < this._maxBackAttempts && this._backAttempts === 0) {
|
|
1967
|
-
this._backAttempts++;
|
|
1968
|
-
let e = window.location.href, t = Date.now();
|
|
1969
|
-
window.history.back(), setTimeout(() => {
|
|
1970
|
-
Date.now() - t, window.location.href === e ? this._navigateToFallback() : setTimeout(() => {
|
|
1971
|
-
this._backAttempts = 0;
|
|
1972
|
-
}, 500);
|
|
1973
|
-
}, 200);
|
|
1974
|
-
} else this._navigateToFallback();
|
|
1975
|
-
}
|
|
1976
|
-
_navigateToFallback() {
|
|
1977
|
-
let e = this.getFallbackHref();
|
|
1978
|
-
if (this._backAttempts = 0, e.startsWith("/") && !e.startsWith("//")) {
|
|
1979
|
-
let t = document.querySelector("#app").__vue_app__;
|
|
1980
|
-
if (t && t.config && t.config.globalProperties && t.config.globalProperties.$router) try {
|
|
1981
|
-
t.config.globalProperties.$router.push(e);
|
|
1982
|
-
return;
|
|
1983
|
-
} catch {}
|
|
1984
|
-
try {
|
|
1985
|
-
window.history.pushState({}, "", e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
1986
|
-
return;
|
|
1987
|
-
} catch {}
|
|
1988
|
-
}
|
|
1989
|
-
window.location.href = e;
|
|
1990
|
-
}
|
|
1991
|
-
render() {
|
|
1992
|
-
this._button || (this._button = document.createElement("mint-button"), this._button.setAttribute("variant", "neutral"), this._button.setAttribute("icon", "arrow-left"), this._button.addEventListener("click", (e) => this.handleClick(e)), this.appendChild(this._button));
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
customElements.get("mint-back-button") || customElements.define("mint-back-button", De);
|
|
1996
|
-
//#endregion
|
|
1997
|
-
//#region src/components/page/Page.js
|
|
1998
|
-
var Oe = class extends HTMLElement {
|
|
1999
|
-
static get observedAttributes() {
|
|
2000
|
-
return [
|
|
2001
|
-
"heading",
|
|
2002
|
-
"fallback-href",
|
|
2003
|
-
"show-back-button"
|
|
2004
|
-
];
|
|
2005
|
-
}
|
|
2006
|
-
constructor() {
|
|
2007
|
-
super(), this._pageContainer = null, this._header = null, this._titleElement = null, this._headingText = null, this._actionsSlot = null, this._bodySlot = null, this._darkModeObserver = null;
|
|
2008
|
-
}
|
|
2009
|
-
connectedCallback() {
|
|
2010
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render(), this._observeDarkMode();
|
|
2011
|
-
}
|
|
2012
|
-
disconnectedCallback() {
|
|
2013
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
2014
|
-
}
|
|
2015
|
-
getHeading() {
|
|
2016
|
-
return this.getAttribute("heading") || "";
|
|
2017
|
-
}
|
|
2018
|
-
getFallbackHref() {
|
|
2019
|
-
return this.getAttribute("fallback-href") || "/";
|
|
2020
|
-
}
|
|
2021
|
-
shouldShowBackButton() {
|
|
2022
|
-
return this.hasAttribute("show-back-button");
|
|
2023
|
-
}
|
|
2024
|
-
render() {
|
|
2025
|
-
let e = this.getHeading();
|
|
2026
|
-
this._pageContainer || (this._pageContainer = document.createElement("div"), this._pageContainer.className = "min-h-screen p-8 transition-colors duration-200", this.appendChild(this._pageContainer)), this._header || (this._header = document.createElement("div"), this._header.className = "flex justify-between mb-8", this._pageContainer.appendChild(this._header)), this._titleElement || (this._titleElement = document.createElement("div"), this._titleElement.className = "flex gap-4 min-w-0 flex-1", this._header.appendChild(this._titleElement));
|
|
2027
|
-
let t = this._titleElement.querySelector("mint-back-button");
|
|
2028
|
-
if (this.shouldShowBackButton()) {
|
|
2029
|
-
t || (t = document.createElement("mint-back-button"), this._titleElement.insertBefore(t, this._titleElement.firstChild));
|
|
2030
|
-
let e = this.getFallbackHref();
|
|
2031
|
-
t.setAttribute("fallback-href", e);
|
|
2032
|
-
} else t &&= (t.remove(), null);
|
|
2033
|
-
e ? (this._headingText ? (this._headingText.classList.add("truncate", "min-w-0"), t && t.parentElement === this._titleElement ? this._headingText.previousSibling !== t && this._titleElement.insertBefore(this._headingText, t.nextSibling) : this._headingText.previousSibling && this._titleElement.insertBefore(this._headingText, this._titleElement.firstChild)) : (this._headingText = document.createElement("mint-text"), this._headingText.setAttribute("size", "heading"), this._headingText.setAttribute("bold", ""), this._headingText.classList.add("truncate", "min-w-0"), t && t.parentElement === this._titleElement ? this._titleElement.insertBefore(this._headingText, t.nextSibling) : this._titleElement.insertBefore(this._headingText, this._titleElement.firstChild)), this._headingText.textContent = e) : this._headingText &&= (this._headingText.remove(), null), this._actionsSlot ? this._actionsSlot.classList.contains("ml-4") || this._actionsSlot.classList.add("ml-4") : (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "flex gap-2 items-center ml-4", this._actionsSlot.setAttribute("slot", "actions"), this._header.appendChild(this._actionsSlot)), Array.from(this.children).filter((e) => e !== this._pageContainer && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
|
|
2034
|
-
e.parentElement !== this._actionsSlot && this._actionsSlot.appendChild(e);
|
|
2035
|
-
}), this._bodySlot || (this._bodySlot = document.createElement("div"), this._pageContainer.appendChild(this._bodySlot)), Array.from(this.children).forEach((e) => {
|
|
2036
|
-
e !== this._pageContainer && e.getAttribute("slot") !== "actions" && e !== this._actionsSlot && e !== this._header && e !== this._bodySlot && e !== this._headingText && e.parentElement !== this._bodySlot && e.parentElement !== this._pageContainer && this._bodySlot.appendChild(e);
|
|
2037
|
-
}), this._updateBackgroundColor();
|
|
2038
|
-
}
|
|
2039
|
-
_updateBackgroundColor() {
|
|
2040
|
-
this._pageContainer && (document.documentElement.classList.contains("dark") ? (this._pageContainer.classList.remove("bg-gray-50"), this._pageContainer.classList.add("bg-gray-900")) : (this._pageContainer.classList.remove("bg-gray-900"), this._pageContainer.classList.add("bg-gray-50")));
|
|
2041
|
-
}
|
|
2042
|
-
_observeDarkMode() {
|
|
2043
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
|
|
2044
|
-
this._updateBackgroundColor();
|
|
2045
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
2046
|
-
attributes: !0,
|
|
2047
|
-
attributeFilter: ["class"]
|
|
2048
|
-
}));
|
|
2049
|
-
}
|
|
2050
|
-
};
|
|
2051
|
-
customElements.get("mint-page") || customElements.define("mint-page", Oe);
|
|
2052
|
-
//#endregion
|
|
2053
|
-
//#region src/components/grid/Grid.js
|
|
2054
|
-
var ke = class extends HTMLElement {
|
|
2055
|
-
static get observedAttributes() {
|
|
2056
|
-
return [
|
|
2057
|
-
"columns",
|
|
2058
|
-
"sm",
|
|
2059
|
-
"md",
|
|
2060
|
-
"lg",
|
|
2061
|
-
"xl",
|
|
2062
|
-
"gap"
|
|
2063
|
-
];
|
|
2064
|
-
}
|
|
2065
|
-
constructor() {
|
|
2066
|
-
super();
|
|
2067
|
-
}
|
|
2068
|
-
connectedCallback() {
|
|
2069
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render();
|
|
2070
|
-
}
|
|
2071
|
-
attributeChangedCallback(e, t, n) {
|
|
2072
|
-
t !== n && this.render();
|
|
2073
|
-
}
|
|
2074
|
-
getColumns() {
|
|
2075
|
-
return this.getAttribute("columns") || "1";
|
|
2076
|
-
}
|
|
2077
|
-
getSm() {
|
|
2078
|
-
return this.getAttribute("sm") || null;
|
|
2079
|
-
}
|
|
2080
|
-
getMd() {
|
|
2081
|
-
return this.getAttribute("md") || null;
|
|
2082
|
-
}
|
|
2083
|
-
getLg() {
|
|
2084
|
-
return this.getAttribute("lg") || null;
|
|
2085
|
-
}
|
|
2086
|
-
getXl() {
|
|
2087
|
-
return this.getAttribute("xl") || null;
|
|
2088
|
-
}
|
|
2089
|
-
getGap() {
|
|
2090
|
-
return "3";
|
|
2091
|
-
}
|
|
2092
|
-
getGridClasses() {
|
|
2093
|
-
let e = ["grid"], t = this.getColumns();
|
|
2094
|
-
e.push(`grid-cols-${t}`);
|
|
2095
|
-
let n = this.getSm();
|
|
2096
|
-
n && e.push(`sm:grid-cols-${n}`);
|
|
2097
|
-
let r = this.getMd();
|
|
2098
|
-
r && e.push(`md:grid-cols-${r}`);
|
|
2099
|
-
let i = this.getLg();
|
|
2100
|
-
i && e.push(`lg:grid-cols-${i}`);
|
|
2101
|
-
let a = this.getXl();
|
|
2102
|
-
a && e.push(`xl:grid-cols-${a}`);
|
|
2103
|
-
let o = this.getGap();
|
|
2104
|
-
return e.push(`gap-${o}`), e;
|
|
2105
|
-
}
|
|
2106
|
-
render() {
|
|
2107
|
-
Array.from(this.classList).filter((e) => e.startsWith("grid-cols-") || e.startsWith("sm:grid-cols-") || e.startsWith("md:grid-cols-") || e.startsWith("lg:grid-cols-") || e.startsWith("xl:grid-cols-") || e.startsWith("gap-")).forEach((e) => this.classList.remove(e)), this.classList.contains("grid") || this.classList.add("grid"), this.getGridClasses().forEach((e) => {
|
|
2108
|
-
e && e !== "grid" && this.classList.add(e);
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2111
|
-
};
|
|
2112
|
-
customElements.get("mint-grid") || customElements.define("mint-grid", ke);
|
|
2113
|
-
//#endregion
|
|
2114
|
-
//#region src/components/modal/Modal.js
|
|
2115
|
-
var Ae = class extends HTMLElement {
|
|
2116
|
-
static get observedAttributes() {
|
|
2117
|
-
return [
|
|
2118
|
-
"id",
|
|
2119
|
-
"heading",
|
|
2120
|
-
"open"
|
|
2121
|
-
];
|
|
2122
|
-
}
|
|
2123
|
-
constructor() {
|
|
2124
|
-
super(), this._overlay = null, this._modal = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null;
|
|
2125
|
-
}
|
|
2126
|
-
connectedCallback() {
|
|
2127
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode();
|
|
2128
|
-
}
|
|
2129
|
-
disconnectedCallback() {
|
|
2130
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
2131
|
-
}
|
|
2132
|
-
attributeChangedCallback(e, t, n) {
|
|
2133
|
-
t !== n && this.render();
|
|
2134
|
-
}
|
|
2135
|
-
getId() {
|
|
2136
|
-
return this.getAttribute("id") || "";
|
|
2137
|
-
}
|
|
2138
|
-
getHeading() {
|
|
2139
|
-
return this.getAttribute("heading") || "";
|
|
2140
|
-
}
|
|
2141
|
-
isOpen() {
|
|
2142
|
-
return this.hasAttribute("open");
|
|
2143
|
-
}
|
|
2144
|
-
open() {
|
|
2145
|
-
this.setAttribute("open", "");
|
|
2146
|
-
}
|
|
2147
|
-
close() {
|
|
2148
|
-
this.removeAttribute("open");
|
|
2149
|
-
}
|
|
2150
|
-
render() {
|
|
2151
|
-
let e = this.getId(), t = this.getHeading(), n = this.isOpen();
|
|
2152
|
-
if (e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "fixed inset-0 bg-black bg-opacity-50 transition-opacity duration-200 z-40", this._overlay.addEventListener("click", () => this.close()), this.appendChild(this._overlay)), this._modal || (this._modal = document.createElement("div"), this._modal.className = "fixed inset-0 flex items-center justify-center p-2 pointer-events-none z-50", this.appendChild(this._modal)), n) {
|
|
2153
|
-
let e = this._modal.querySelector(".modal-content");
|
|
2154
|
-
e || (e = document.createElement("div"), e.className = "modal-content bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] flex flex-col pointer-events-auto transition-all duration-200 ease-out transform", this._modal.appendChild(e)), this._animateEnter();
|
|
2155
|
-
} else this._animateExit();
|
|
2156
|
-
let r = this._modal.querySelector(".modal-content");
|
|
2157
|
-
r || (r = document.createElement("div"), r.className = "modal-content bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] flex flex-col pointer-events-auto transition-all duration-200 ease-out transform", this._modal.appendChild(r)), this._header || (this._header = document.createElement("div"), this._header.className = "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700", r.appendChild(this._header)), this._headingSlot || (this._headingSlot = document.createElement("div"), this._headingSlot.className = "flex-1", this._headingSlot.setAttribute("slot", "heading"), this._header.appendChild(this._headingSlot));
|
|
2158
|
-
let i = this._headingSlot.querySelector("mint-text");
|
|
2159
|
-
t ? (i || (i = document.createElement("mint-text"), i.setAttribute("size", "sub-heading"), i.setAttribute("bold", ""), this._headingSlot.appendChild(i)), i.textContent = t) : i && i.remove(), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._headingSlot && e.getAttribute("slot") === "heading").forEach((e) => {
|
|
2160
|
-
e.parentElement !== this._headingSlot && this._headingSlot.appendChild(e);
|
|
2161
|
-
}), this._closeButton || (this._closeButton = document.createElement("mint-button"), this._closeButton.setAttribute("variant", "ghost"), this._closeButton.setAttribute("icon", "close"), this._closeButton.addEventListener("click", () => this.close()), this._header.appendChild(this._closeButton)), this._bodySlot || (this._bodySlot = document.createElement("div"), this._bodySlot.className = "flex-1 overflow-y-auto p-4", this._bodySlot.setAttribute("slot", "body"), r.appendChild(this._bodySlot)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._bodySlot && e.getAttribute("slot") === "body").forEach((e) => {
|
|
2162
|
-
e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
2163
|
-
}), this._actionsSlot || (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "p-4 border-t border-gray-200 dark:border-gray-700", this._actionsSlot.setAttribute("slot", "actions"), r.appendChild(this._actionsSlot));
|
|
2164
|
-
let a = this._actionsSlot.querySelector("mint-stack");
|
|
2165
|
-
a || (a = document.createElement("mint-stack"), a.setAttribute("direction", "horizontal"), a.className = "justify-end", this._actionsSlot.appendChild(a)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._modal && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
|
|
2166
|
-
Array.from(e.children).forEach((e) => {
|
|
2167
|
-
e.parentElement !== a && a.appendChild(e);
|
|
2168
|
-
}), e.parentElement && e.remove();
|
|
2169
|
-
}), Array.from(this.children).forEach((e) => {
|
|
2170
|
-
e !== this._overlay && e !== this._modal && e.getAttribute("slot") !== "heading" && e.getAttribute("slot") !== "body" && e.getAttribute("slot") !== "actions" && e !== this._headingSlot && e !== this._bodySlot && e !== this._actionsSlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
2171
|
-
}), this._updateBackgroundColor();
|
|
2172
|
-
}
|
|
2173
|
-
_updateBackgroundColor() {
|
|
2174
|
-
if (!this._modal) return;
|
|
2175
|
-
let e = document.documentElement.classList.contains("dark"), t = this._modal.querySelector(".modal-content");
|
|
2176
|
-
t && (e ? (t.classList.remove("bg-white"), t.classList.add("bg-gray-800")) : (t.classList.remove("bg-gray-800"), t.classList.add("bg-white")));
|
|
2177
|
-
}
|
|
2178
|
-
_observeDarkMode() {
|
|
2179
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
|
|
2180
|
-
this._updateBackgroundColor();
|
|
2181
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
2182
|
-
attributes: !0,
|
|
2183
|
-
attributeFilter: ["class"]
|
|
2184
|
-
}));
|
|
2185
|
-
}
|
|
2186
|
-
_animateEnter() {
|
|
2187
|
-
let e = this._modal?.querySelector(".modal-content");
|
|
2188
|
-
e && (e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", e.style.transition = "all 200ms ease-out", this.classList.remove("hidden"), requestAnimationFrame(() => {
|
|
2189
|
-
requestAnimationFrame(() => {
|
|
2190
|
-
e.style.transform = "scale(1) translateY(0)", e.style.opacity = "1";
|
|
2191
|
-
});
|
|
2192
|
-
}));
|
|
2193
|
-
}
|
|
2194
|
-
_animateExit() {
|
|
2195
|
-
let e = this._modal?.querySelector(".modal-content");
|
|
2196
|
-
if (!e) {
|
|
2197
|
-
this.classList.add("hidden");
|
|
2198
|
-
return;
|
|
2199
|
-
}
|
|
2200
|
-
e.style.transition = "all 200ms ease-in", e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", setTimeout(() => {
|
|
2201
|
-
this.classList.add("hidden"), e.style.transform = "", e.style.opacity = "", e.style.transition = "";
|
|
2202
|
-
}, 200);
|
|
2203
|
-
}
|
|
2204
|
-
};
|
|
2205
|
-
customElements.get("mint-modal") || customElements.define("mint-modal", Ae);
|
|
2206
|
-
//#endregion
|
|
2207
|
-
//#region src/components/popover/Popover.js
|
|
2208
|
-
var je = class extends HTMLElement {
|
|
2209
|
-
static get observedAttributes() {
|
|
2210
|
-
return [
|
|
2211
|
-
"id",
|
|
2212
|
-
"direction",
|
|
2213
|
-
"open",
|
|
2214
|
-
"trigger-id"
|
|
2215
|
-
];
|
|
2216
|
-
}
|
|
2217
|
-
constructor() {
|
|
2218
|
-
super(), this._overlay = null, this._popover = null, this._triggerElement = null, this._darkModeObserver = null, this._clickOutsideHandler = null, this._triggerClickHandler = null, this._scrollHandler = null, this._resizeHandler = null;
|
|
2219
|
-
}
|
|
2220
|
-
connectedCallback() {
|
|
2221
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._setupTrigger(), this._observeDarkMode();
|
|
2222
|
-
}
|
|
2223
|
-
disconnectedCallback() {
|
|
2224
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler), null), this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler), this._triggerClickHandler = null), this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
|
|
2225
|
-
}
|
|
2226
|
-
attributeChangedCallback(e, t, n) {
|
|
2227
|
-
t !== n && (this.render(), e === "trigger-id" && this._setupTrigger());
|
|
2228
|
-
}
|
|
2229
|
-
getId() {
|
|
2230
|
-
return this.getAttribute("id") || "";
|
|
2231
|
-
}
|
|
2232
|
-
getDirection() {
|
|
2233
|
-
return this.getAttribute("direction") || "down";
|
|
2234
|
-
}
|
|
2235
|
-
getTriggerId() {
|
|
2236
|
-
return this.getAttribute("trigger-id") || "";
|
|
2237
|
-
}
|
|
2238
|
-
isOpen() {
|
|
2239
|
-
return this.hasAttribute("open");
|
|
2240
|
-
}
|
|
2241
|
-
open() {
|
|
2242
|
-
this.setAttribute("open", "");
|
|
2243
|
-
}
|
|
2244
|
-
close() {
|
|
2245
|
-
this.removeAttribute("open");
|
|
2246
|
-
}
|
|
2247
|
-
_setupTrigger() {
|
|
2248
|
-
let e = this.getTriggerId();
|
|
2249
|
-
this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler), this._triggerClickHandler = null), e && (this._triggerElement = document.getElementById(e), this._triggerElement ? this._attachTriggerListener() : setTimeout(() => {
|
|
2250
|
-
this._triggerElement = document.getElementById(e), this._triggerElement && this._attachTriggerListener();
|
|
2251
|
-
}, 10));
|
|
2252
|
-
}
|
|
2253
|
-
_attachTriggerListener() {
|
|
2254
|
-
if (this._triggerElement && !this._triggerClickHandler) {
|
|
2255
|
-
let e = this;
|
|
2256
|
-
this._triggerClickHandler = function(t) {
|
|
2257
|
-
t.stopImmediatePropagation(), t.preventDefault(), e.hasAttribute("open") ? e.removeAttribute("open") : e.setAttribute("open", "");
|
|
2258
|
-
}, this._triggerElement.addEventListener("click", this._triggerClickHandler, !0);
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
_calculatePosition() {
|
|
2262
|
-
if (!this._triggerElement || !this._popover) return {
|
|
2263
|
-
top: 0,
|
|
2264
|
-
left: 0,
|
|
2265
|
-
direction: "down"
|
|
2266
|
-
};
|
|
2267
|
-
let e = this._triggerElement.getBoundingClientRect(), t = this._popover.querySelector(".popover-content");
|
|
2268
|
-
if (!t) return {
|
|
2269
|
-
top: 0,
|
|
2270
|
-
left: 0,
|
|
2271
|
-
direction: "down"
|
|
2272
|
-
};
|
|
2273
|
-
this.classList.contains("hidden") && (this.classList.remove("hidden"), this._popover.style.visibility = "hidden");
|
|
2274
|
-
let n = t.getBoundingClientRect(), r = window.innerWidth, i = window.innerHeight, a = this.getDirection(), o = 0, s = 0;
|
|
2275
|
-
switch (a) {
|
|
2276
|
-
case "down":
|
|
2277
|
-
if (o = e.bottom + 8, s = e.left + e.width / 2 - n.width / 2, o + n.height > i) {
|
|
2278
|
-
let t = e.top - n.height - 8;
|
|
2279
|
-
t >= 0 ? (a = "up", o = t) : (o = Math.max(0, i - n.height - 8), o + n.height > i && (o = 0));
|
|
2280
|
-
}
|
|
2281
|
-
s < 0 && (s = 8), s + n.width > r && (s = Math.max(8, r - n.width - 8), s + n.width > r && (s = r - n.width));
|
|
2282
|
-
break;
|
|
2283
|
-
case "up":
|
|
2284
|
-
if (o = e.top - n.height - 8, s = e.left + e.width / 2 - n.width / 2, o < 0) {
|
|
2285
|
-
let t = e.bottom + 8;
|
|
2286
|
-
t + n.height <= i ? (a = "down", o = t) : (o = Math.min(i - n.height - 8, i - n.height), o < 0 && (o = i - n.height));
|
|
2287
|
-
}
|
|
2288
|
-
s < 0 && (s = 8), s + n.width > r && (s = Math.max(8, r - n.width - 8), s + n.width > r && (s = r - n.width));
|
|
2289
|
-
break;
|
|
2290
|
-
case "right":
|
|
2291
|
-
if (o = e.top + e.height / 2 - n.height / 2, s = e.right + 8, s + n.width > r) {
|
|
2292
|
-
let t = e.left - n.width - 8;
|
|
2293
|
-
t >= 0 ? (a = "left", s = t) : (s = Math.max(0, r - n.width - 8), s + n.width > r && (s = r - n.width));
|
|
2294
|
-
}
|
|
2295
|
-
o < 0 && (o = 8), o + n.height > i && (o = Math.max(8, i - n.height - 8), o + n.height > i && (o = i - n.height));
|
|
2296
|
-
break;
|
|
2297
|
-
case "left":
|
|
2298
|
-
if (o = e.top + e.height / 2 - n.height / 2, s = e.left - n.width - 8, s < 0) {
|
|
2299
|
-
let t = e.right + 8;
|
|
2300
|
-
t + n.width <= r ? (a = "right", s = t) : (s = Math.min(r - n.width - 8, r - n.width), s < 0 && (s = 0));
|
|
2301
|
-
}
|
|
2302
|
-
o < 0 && (o = 8), o + n.height > i && (o = Math.max(8, i - n.height - 8), o + n.height > i && (o = i - n.height));
|
|
2303
|
-
break;
|
|
2304
|
-
}
|
|
2305
|
-
return {
|
|
2306
|
-
top: o,
|
|
2307
|
-
left: s,
|
|
2308
|
-
direction: a
|
|
2309
|
-
};
|
|
2310
|
-
}
|
|
2311
|
-
render() {
|
|
2312
|
-
let e = this.getId(), t = this.isOpen();
|
|
2313
|
-
if (e && (this.id = e), t) {
|
|
2314
|
-
if (this.classList.remove("hidden"), this.style.pointerEvents = "auto", !this._clickOutsideHandler) {
|
|
2315
|
-
let e = this;
|
|
2316
|
-
this._clickOutsideHandler = function(t) {
|
|
2317
|
-
let n = t.target, r = e._popover?.querySelector(".popover-content"), i = r && (r.contains(n) || r === n), a = n.closest("button, a, [role=\"button\"], mint-button, mint-link") !== null;
|
|
2318
|
-
(!i || a) && e.close();
|
|
2319
|
-
}, setTimeout(() => {
|
|
2320
|
-
document.addEventListener("click", this._clickOutsideHandler, !1);
|
|
2321
|
-
}, 100);
|
|
2322
|
-
}
|
|
2323
|
-
} else this.classList.add("hidden"), this.style.pointerEvents = "none", this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler, !0), null);
|
|
2324
|
-
this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "fixed inset-0 pointer-events-none z-40", this.appendChild(this._overlay)), this._popover || (this._popover = document.createElement("div"), this._popover.className = "fixed z-50 pointer-events-auto", this.appendChild(this._popover));
|
|
2325
|
-
let n = this._popover.querySelector(".popover-content");
|
|
2326
|
-
n || (n = document.createElement("div"), n.className = "popover-content bg-white dark:bg-gray-800 rounded-lg shadow-xl p-4 transition-all duration-200 ease-out transform", this._popover.appendChild(n)), Array.from(this.children).forEach((e) => {
|
|
2327
|
-
e !== this._overlay && e !== this._popover && e.parentElement === this && n.appendChild(e);
|
|
2328
|
-
}), t ? (this._triggerElement || this._setupTrigger(), this._setupPositionListeners(), this.offsetHeight, this._triggerElement ? this._updatePosition(n) : (this._popover.style.top = "50%", this._popover.style.left = "50%", this._popover.style.transform = "translate(-50%, -50%)", this._popover.style.visibility = "visible", this._popover.style.display = "block", n.style.transform = "scale(0.97) translateY(10px)", n.style.opacity = "0", n.style.transition = "all 200ms ease-out", requestAnimationFrame(() => {
|
|
2329
|
-
requestAnimationFrame(() => {
|
|
2330
|
-
n.style.transform = "scale(1) translateY(0)", n.style.opacity = "1";
|
|
2331
|
-
});
|
|
2332
|
-
}))) : !t && n && (this._removePositionListeners(), n.style.opacity !== "0" && n.style.opacity !== "" && (n.style.transition = "all 200ms ease-in", n.style.transform = "scale(0.97) translateY(10px)", n.style.opacity = "0", setTimeout(() => {
|
|
2333
|
-
n.style.transform = "", n.style.opacity = "", n.style.transition = "", this._popover.style.visibility = "", this._popover.style.display = "";
|
|
2334
|
-
}, 200))), this._updateBackgroundColor();
|
|
2335
|
-
}
|
|
2336
|
-
_updateBackgroundColor() {
|
|
2337
|
-
if (!this._popover) return;
|
|
2338
|
-
let e = document.documentElement.classList.contains("dark"), t = this._popover.querySelector(".popover-content");
|
|
2339
|
-
t && (e ? (t.classList.remove("bg-white"), t.classList.add("bg-gray-800")) : (t.classList.remove("bg-gray-800"), t.classList.add("bg-white")));
|
|
2340
|
-
}
|
|
2341
|
-
_observeDarkMode() {
|
|
2342
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver(() => {
|
|
2343
|
-
this._updateBackgroundColor();
|
|
2344
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
2345
|
-
attributes: !0,
|
|
2346
|
-
attributeFilter: ["class"]
|
|
2347
|
-
}));
|
|
2348
|
-
}
|
|
2349
|
-
_updatePosition(e) {
|
|
2350
|
-
if (!this._triggerElement || !this._popover) return;
|
|
2351
|
-
let t = this._popover.style.visibility !== "hidden";
|
|
2352
|
-
t || (this._popover.style.visibility = "hidden", this._popover.style.display = "block", this._popover.style.top = "0", this._popover.style.left = "0"), this._popover.offsetHeight;
|
|
2353
|
-
let n = this._calculatePosition();
|
|
2354
|
-
this._popover.style.top = `${n.top}px`, this._popover.style.left = `${n.left}px`, t || (this._popover.style.visibility = "visible", e && (!e.style.opacity || e.style.opacity === "") && (e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", e.style.transition = "all 200ms ease-out", requestAnimationFrame(() => {
|
|
2355
|
-
requestAnimationFrame(() => {
|
|
2356
|
-
e.style.transform = "scale(1) translateY(0)", e.style.opacity = "1";
|
|
2357
|
-
});
|
|
2358
|
-
})));
|
|
2359
|
-
}
|
|
2360
|
-
_setupPositionListeners() {
|
|
2361
|
-
if (!this._scrollHandler && this.isOpen()) {
|
|
2362
|
-
let e = this;
|
|
2363
|
-
this._scrollHandler = function() {
|
|
2364
|
-
if (e.isOpen() && e._popover) {
|
|
2365
|
-
let t = e._popover.querySelector(".popover-content");
|
|
2366
|
-
e._updatePosition(t);
|
|
2367
|
-
}
|
|
2368
|
-
}, window.addEventListener("scroll", this._scrollHandler, !0);
|
|
2369
|
-
}
|
|
2370
|
-
if (!this._resizeHandler && this.isOpen()) {
|
|
2371
|
-
let e = this;
|
|
2372
|
-
this._resizeHandler = function() {
|
|
2373
|
-
if (e.isOpen() && e._popover) {
|
|
2374
|
-
let t = e._popover.querySelector(".popover-content");
|
|
2375
|
-
e._updatePosition(t);
|
|
2376
|
-
}
|
|
2377
|
-
}, window.addEventListener("resize", this._resizeHandler);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
_removePositionListeners() {
|
|
2381
|
-
this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
|
|
2382
|
-
}
|
|
2383
|
-
};
|
|
2384
|
-
customElements.get("mint-popover") || customElements.define("mint-popover", je);
|
|
2385
|
-
//#endregion
|
|
2386
|
-
//#region src/components/checkbox/Checkbox.js
|
|
2387
|
-
var Me = class extends HTMLElement {
|
|
2388
|
-
static get observedAttributes() {
|
|
2389
|
-
return [
|
|
2390
|
-
"checked",
|
|
2391
|
-
"disabled",
|
|
2392
|
-
"label",
|
|
2393
|
-
"info",
|
|
2394
|
-
"id",
|
|
2395
|
-
"name",
|
|
2396
|
-
"value"
|
|
2397
|
-
];
|
|
2398
|
-
}
|
|
2399
|
-
constructor() {
|
|
2400
|
-
super(), this._checkbox = null, this._checked = !1, this._clickHandler = null;
|
|
2401
|
-
}
|
|
2402
|
-
connectedCallback() {
|
|
2403
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-flex", "items-start", "gap-2");
|
|
2404
|
-
let e = this.getAttribute("checked");
|
|
2405
|
-
this._checked = e !== null && e !== "false", this.render();
|
|
2406
|
-
}
|
|
2407
|
-
disconnectedCallback() {
|
|
2408
|
-
this.removeEventListeners();
|
|
2409
|
-
}
|
|
2410
|
-
attributeChangedCallback(e, t, n) {
|
|
2411
|
-
e === "checked" && (this._checked = n !== null && n !== "false", this._checkbox && (this._checkbox.checked = this._checked)), t !== n && (this.render(), e === "checked" && this._checkbox && this.updateVisualState());
|
|
2412
|
-
}
|
|
2413
|
-
get checked() {
|
|
2414
|
-
return this._checked;
|
|
2415
|
-
}
|
|
2416
|
-
set checked(e) {
|
|
2417
|
-
e ? this.setAttribute("checked", "") : this.removeAttribute("checked"), this._checked = !!e, this._checkbox && (this._checkbox.checked = this._checked), this.updateVisualState();
|
|
2418
|
-
}
|
|
2419
|
-
isDisabled() {
|
|
2420
|
-
return this.hasAttribute("disabled");
|
|
2421
|
-
}
|
|
2422
|
-
getLabel() {
|
|
2423
|
-
return this.getAttribute("label") || "";
|
|
2424
|
-
}
|
|
2425
|
-
getInfo() {
|
|
2426
|
-
return this.getAttribute("info") || "";
|
|
2427
|
-
}
|
|
2428
|
-
getId() {
|
|
2429
|
-
return this.getAttribute("id") || "";
|
|
2430
|
-
}
|
|
2431
|
-
getName() {
|
|
2432
|
-
return this.getAttribute("name") || "";
|
|
2433
|
-
}
|
|
2434
|
-
getValue() {
|
|
2435
|
-
return this.getAttribute("value") || "";
|
|
2436
|
-
}
|
|
2437
|
-
getCheckboxClasses() {
|
|
2438
|
-
let e = [
|
|
2439
|
-
"relative",
|
|
2440
|
-
"inline-flex",
|
|
2441
|
-
"items-center",
|
|
2442
|
-
"justify-center",
|
|
2443
|
-
"flex-shrink-0",
|
|
2444
|
-
"w-5",
|
|
2445
|
-
"h-5",
|
|
2446
|
-
"rounded",
|
|
2447
|
-
"border-2",
|
|
2448
|
-
"transition-all",
|
|
2449
|
-
"duration-200",
|
|
2450
|
-
"outline-none",
|
|
2451
|
-
"focus:outline-none",
|
|
2452
|
-
"focus-visible:ring-2",
|
|
2453
|
-
"focus-visible:ring-offset-2",
|
|
2454
|
-
"focus-visible:ring-slate-500",
|
|
2455
|
-
"dark:focus-visible:ring-slate-400",
|
|
2456
|
-
"cursor-pointer",
|
|
2457
|
-
"disabled:opacity-50",
|
|
2458
|
-
"disabled:cursor-not-allowed"
|
|
2459
|
-
], t = this._checked ? [
|
|
2460
|
-
"bg-slate-800",
|
|
2461
|
-
"dark:bg-slate-600",
|
|
2462
|
-
"border-slate-800",
|
|
2463
|
-
"dark:border-slate-600"
|
|
2464
|
-
] : [
|
|
2465
|
-
"bg-white",
|
|
2466
|
-
"dark:bg-gray-700",
|
|
2467
|
-
"border-gray-300",
|
|
2468
|
-
"dark:border-gray-500"
|
|
2469
|
-
];
|
|
2470
|
-
return [...e, ...t].join(" ");
|
|
2471
|
-
}
|
|
2472
|
-
render() {
|
|
2473
|
-
let e = this.getLabel(), t = this.getInfo(), n = this.isDisabled(), r = this.querySelector(".mint-checkbox-wrapper");
|
|
2474
|
-
r || (r = document.createElement("div"), r.className = "mint-checkbox-wrapper", this.insertBefore(r, this.firstChild)), this._checkbox ? this._checkbox.parentElement !== r && r.appendChild(this._checkbox) : (this._checkbox = document.createElement("input"), this._checkbox.type = "checkbox", r.appendChild(this._checkbox), this.setupEventListeners()), this._checkbox.className = "absolute inset-0 w-full h-full opacity-0 cursor-pointer", this._checkbox.style.cssText = "position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; pointer-events: auto; margin: 0; padding: 0;", this._checkbox.checked = this._checked, this._checkbox.disabled = n, this._changeHandler || this.setupEventListeners();
|
|
2475
|
-
let i = this.getId();
|
|
2476
|
-
i ? this._checkbox.id = i : this._checkbox.removeAttribute("id");
|
|
2477
|
-
let a = this.getName();
|
|
2478
|
-
a ? this._checkbox.name = a : this._checkbox.removeAttribute("name");
|
|
2479
|
-
let o = this.getValue();
|
|
2480
|
-
o ? this._checkbox.value = o : this._checkbox.removeAttribute("value"), e ? this._checkbox.setAttribute("aria-label", e) : this._checkbox.removeAttribute("aria-label"), r.className = `mint-checkbox-wrapper ${this.getCheckboxClasses()}`, r.style.pointerEvents = "none", this._checkbox.style.pointerEvents = "auto";
|
|
2481
|
-
let s = r.querySelector("mint-icon");
|
|
2482
|
-
s || (s = document.createElement("mint-icon"), s.setAttribute("name", "check"), s.className = "w-3.5 h-3.5 text-white pointer-events-none absolute inset-0 m-auto", s.style.transition = "opacity 200ms ease-out, transform 200ms ease-out", s.style.zIndex = "1", r.appendChild(s)), this.updateVisualState();
|
|
2483
|
-
let c = this.querySelector(".mint-checkbox-label-container");
|
|
2484
|
-
if (e || t) {
|
|
2485
|
-
c || (c = document.createElement("div"), c.className = "mint-checkbox-label-container flex flex-col gap-0.5 flex-1", this.appendChild(c));
|
|
2486
|
-
let r = c.querySelector(".mint-checkbox-label");
|
|
2487
|
-
e ? (r || (r = document.createElement("span"), r.className = "mint-checkbox-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", c.insertBefore(r, c.firstChild)), r.textContent = e, n ? r.classList.add("opacity-50") : r.classList.remove("opacity-50")) : r && r.remove();
|
|
2488
|
-
let i = c.querySelector(".mint-checkbox-info");
|
|
2489
|
-
if (t ? (i || (i = document.createElement("span"), i.className = "mint-checkbox-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", c.appendChild(i)), i.textContent = t, n ? i.classList.add("opacity-50") : i.classList.remove("opacity-50")) : i && i.remove(), n) c.style.cursor = "default", c._clickHandler && (c.removeEventListener("click", c._clickHandler), c._clickHandler = null);
|
|
2490
|
-
else {
|
|
2491
|
-
c.style.cursor = "pointer";
|
|
2492
|
-
let e = c._clickHandler;
|
|
2493
|
-
e && c.removeEventListener("click", e), c._clickHandler = (e) => {
|
|
2494
|
-
this._checkbox && (e.target === this._checkbox || this._checkbox.contains(e.target) || e.composedPath().includes(this._checkbox)) || this.toggle();
|
|
2495
|
-
}, c.addEventListener("click", c._clickHandler);
|
|
2496
|
-
}
|
|
2497
|
-
} else c && c.remove();
|
|
2498
|
-
}
|
|
2499
|
-
setupEventListeners() {
|
|
2500
|
-
this.removeEventListeners(), this._checkbox && (this._changeHandler = (e) => {
|
|
2501
|
-
e.stopPropagation(), this._checked = this._checkbox.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState();
|
|
2502
|
-
let t = new CustomEvent("change", {
|
|
2503
|
-
detail: {
|
|
2504
|
-
checked: this._checked,
|
|
2505
|
-
value: this.getValue()
|
|
2506
|
-
},
|
|
2507
|
-
bubbles: !0,
|
|
2508
|
-
cancelable: !0
|
|
2509
|
-
});
|
|
2510
|
-
this.dispatchEvent(t);
|
|
2511
|
-
}, this._checkbox.addEventListener("change", this._changeHandler), this._mousedownHandler = (e) => {
|
|
2512
|
-
e.stopPropagation();
|
|
2513
|
-
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
2514
|
-
t && !this.isDisabled() && (t.classList.add("mint-checkbox-active"), this._checked ? (t.style.backgroundColor = "rgb(15 23 42)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.3)") : (t.style.backgroundColor = "rgb(243 244 246)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.1)"), document.documentElement.classList.contains("dark") && (this._checked ? t.style.backgroundColor = "rgb(51 65 85)" : t.style.backgroundColor = "rgb(31 41 55)"));
|
|
2515
|
-
}, this._mouseupHandler = (e) => {
|
|
2516
|
-
e.stopPropagation();
|
|
2517
|
-
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
2518
|
-
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2519
|
-
}, this._mouseleaveHandler = (e) => {
|
|
2520
|
-
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
2521
|
-
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2522
|
-
}, this._checkbox.addEventListener("mousedown", this._mousedownHandler), this._checkbox.addEventListener("mouseup", this._mouseupHandler), this._checkbox.addEventListener("mouseleave", this._mouseleaveHandler), this._touchstartHandler = (e) => {
|
|
2523
|
-
e.stopPropagation();
|
|
2524
|
-
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
2525
|
-
t && !this.isDisabled() && (t.classList.add("mint-checkbox-active"), this._checked ? (t.style.backgroundColor = "rgb(15 23 42)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.3)") : (t.style.backgroundColor = "rgb(243 244 246)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.1)"), document.documentElement.classList.contains("dark") && (this._checked ? t.style.backgroundColor = "rgb(51 65 85)" : t.style.backgroundColor = "rgb(31 41 55)"));
|
|
2526
|
-
}, this._touchendHandler = (e) => {
|
|
2527
|
-
e.stopPropagation();
|
|
2528
|
-
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
2529
|
-
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2530
|
-
}, this._checkbox.addEventListener("touchstart", this._touchstartHandler), this._checkbox.addEventListener("touchend", this._touchendHandler));
|
|
2531
|
-
}
|
|
2532
|
-
removeEventListeners() {
|
|
2533
|
-
this._checkbox && (this._changeHandler &&= (this._checkbox.removeEventListener("change", this._changeHandler), null), this._mousedownHandler &&= (this._checkbox.removeEventListener("mousedown", this._mousedownHandler), null), this._mouseupHandler &&= (this._checkbox.removeEventListener("mouseup", this._mouseupHandler), null), this._mouseleaveHandler &&= (this._checkbox.removeEventListener("mouseleave", this._mouseleaveHandler), null), this._touchstartHandler &&= (this._checkbox.removeEventListener("touchstart", this._touchstartHandler), null), this._touchendHandler &&= (this._checkbox.removeEventListener("touchend", this._touchendHandler), null));
|
|
2534
|
-
}
|
|
2535
|
-
updateVisualState() {
|
|
2536
|
-
let e = this.querySelector(".mint-checkbox-wrapper"), t = e?.querySelector("mint-icon");
|
|
2537
|
-
t && (t.style.opacity = this._checked ? "1" : "0", t.style.transform = this._checked ? "scale(1)" : "scale(0.8)"), e && (e.className = `mint-checkbox-wrapper ${this.getCheckboxClasses()}`, e.classList.contains("mint-checkbox-active") || (e.style.backgroundColor = "", e.style.boxShadow = ""));
|
|
2538
|
-
}
|
|
2539
|
-
toggle() {
|
|
2540
|
-
if (this._checkbox && !this.isDisabled()) {
|
|
2541
|
-
this._checkbox.checked = !this._checked, this._checked = this._checkbox.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState();
|
|
2542
|
-
let e = new CustomEvent("change", {
|
|
2543
|
-
detail: { checked: this._checked },
|
|
2544
|
-
bubbles: !0,
|
|
2545
|
-
cancelable: !0
|
|
2546
|
-
});
|
|
2547
|
-
this.dispatchEvent(e);
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
};
|
|
2551
|
-
customElements.get("mint-checkbox") || customElements.define("mint-checkbox", Me);
|
|
2552
|
-
//#endregion
|
|
2553
|
-
//#region src/components/choice/Choice.js
|
|
2554
|
-
var Ne = class extends HTMLElement {
|
|
2555
|
-
static get observedAttributes() {
|
|
2556
|
-
return [
|
|
2557
|
-
"checked",
|
|
2558
|
-
"disabled",
|
|
2559
|
-
"label",
|
|
2560
|
-
"info",
|
|
2561
|
-
"id",
|
|
2562
|
-
"name",
|
|
2563
|
-
"value"
|
|
2564
|
-
];
|
|
2565
|
-
}
|
|
2566
|
-
constructor() {
|
|
2567
|
-
super(), this._radio = null, this._checked = !1;
|
|
2568
|
-
}
|
|
2569
|
-
connectedCallback() {
|
|
2570
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-flex", "items-start", "gap-2");
|
|
2571
|
-
let e = this.getAttribute("checked");
|
|
2572
|
-
this._checked = e !== null && e !== "false", this.render();
|
|
2573
|
-
}
|
|
2574
|
-
disconnectedCallback() {
|
|
2575
|
-
this.removeEventListeners();
|
|
2576
|
-
}
|
|
2577
|
-
attributeChangedCallback(e, t, n) {
|
|
2578
|
-
e === "checked" && (this._checked = n !== null && n !== "false", this._radio && (this._radio.checked = this._checked)), t !== n && (this.render(), e === "checked" && this._radio && this.updateVisualState());
|
|
2579
|
-
}
|
|
2580
|
-
get checked() {
|
|
2581
|
-
return this._checked;
|
|
2582
|
-
}
|
|
2583
|
-
set checked(e) {
|
|
2584
|
-
e ? this.setAttribute("checked", "") : this.removeAttribute("checked"), this._checked = !!e, this._radio && (this._radio.checked = this._checked), this.updateVisualState();
|
|
2585
|
-
}
|
|
2586
|
-
isDisabled() {
|
|
2587
|
-
return this.hasAttribute("disabled");
|
|
2588
|
-
}
|
|
2589
|
-
getLabel() {
|
|
2590
|
-
return this.getAttribute("label") || "";
|
|
2591
|
-
}
|
|
2592
|
-
getInfo() {
|
|
2593
|
-
return this.getAttribute("info") || "";
|
|
2594
|
-
}
|
|
2595
|
-
getId() {
|
|
2596
|
-
return this.getAttribute("id") || "";
|
|
2597
|
-
}
|
|
2598
|
-
getName() {
|
|
2599
|
-
return this.getAttribute("name") || "";
|
|
2600
|
-
}
|
|
2601
|
-
getValue() {
|
|
2602
|
-
return this.getAttribute("value") || "";
|
|
2603
|
-
}
|
|
2604
|
-
getChoiceClasses() {
|
|
2605
|
-
let e = [
|
|
2606
|
-
"relative",
|
|
2607
|
-
"inline-flex",
|
|
2608
|
-
"items-center",
|
|
2609
|
-
"justify-center",
|
|
2610
|
-
"flex-shrink-0",
|
|
2611
|
-
"w-5",
|
|
2612
|
-
"h-5",
|
|
2613
|
-
"rounded-full",
|
|
2614
|
-
"border-2",
|
|
2615
|
-
"transition-all",
|
|
2616
|
-
"duration-200",
|
|
2617
|
-
"outline-none",
|
|
2618
|
-
"focus:outline-none",
|
|
2619
|
-
"focus-visible:ring-2",
|
|
2620
|
-
"focus-visible:ring-offset-2",
|
|
2621
|
-
"focus-visible:ring-slate-500",
|
|
2622
|
-
"dark:focus-visible:ring-slate-400",
|
|
2623
|
-
"cursor-pointer",
|
|
2624
|
-
"disabled:opacity-50",
|
|
2625
|
-
"disabled:cursor-not-allowed"
|
|
2626
|
-
], t = this._checked ? [
|
|
2627
|
-
"bg-slate-800",
|
|
2628
|
-
"dark:bg-slate-600",
|
|
2629
|
-
"border-slate-800",
|
|
2630
|
-
"dark:border-slate-600"
|
|
2631
|
-
] : [
|
|
2632
|
-
"bg-white",
|
|
2633
|
-
"dark:bg-gray-700",
|
|
2634
|
-
"border-gray-300",
|
|
2635
|
-
"dark:border-gray-500"
|
|
2636
|
-
];
|
|
2637
|
-
return [...e, ...t].join(" ");
|
|
2638
|
-
}
|
|
2639
|
-
render() {
|
|
2640
|
-
let e = this.getLabel(), t = this.getInfo(), n = this.isDisabled(), r = this.querySelector(".mint-choice-wrapper");
|
|
2641
|
-
r || (r = document.createElement("div"), r.className = "mint-choice-wrapper", this.insertBefore(r, this.firstChild)), this._radio ? this._radio.parentElement !== r && r.appendChild(this._radio) : (this._radio = document.createElement("input"), this._radio.type = "radio", r.appendChild(this._radio), this.setupEventListeners()), this._radio.className = "absolute inset-0 w-full h-full opacity-0 cursor-pointer", this._radio.style.cssText = "position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; pointer-events: auto; margin: 0; padding: 0;", this._radio.checked = this._checked, this._radio.disabled = n, this._changeHandler || this.setupEventListeners();
|
|
2642
|
-
let i = this.getId();
|
|
2643
|
-
i ? this._radio.id = i : this._radio.removeAttribute("id");
|
|
2644
|
-
let a = this.getName();
|
|
2645
|
-
a ? this._radio.name = a : this._radio.removeAttribute("name");
|
|
2646
|
-
let o = this.getValue();
|
|
2647
|
-
o ? this._radio.value = o : this._radio.removeAttribute("value"), e ? this._radio.setAttribute("aria-label", e) : this._radio.removeAttribute("aria-label"), r.className = `mint-choice-wrapper ${this.getChoiceClasses()}`, r.style.pointerEvents = "none", this._radio.style.pointerEvents = "auto";
|
|
2648
|
-
let s = r.querySelector(".mint-choice-indicator");
|
|
2649
|
-
s || (s = document.createElement("div"), s.className = "mint-choice-indicator w-2.5 h-2.5 rounded-full bg-white pointer-events-none absolute inset-0 m-auto", s.style.transition = "opacity 200ms ease-out, transform 200ms ease-out", s.style.zIndex = "1", r.appendChild(s)), s.style.opacity = this._checked ? "1" : "0", s.style.transform = this._checked ? "scale(1)" : "scale(0.8)", this.updateVisualState();
|
|
2650
|
-
let c = this.querySelector(".mint-choice-label-container");
|
|
2651
|
-
if (e || t) {
|
|
2652
|
-
c || (c = document.createElement("div"), c.className = "mint-choice-label-container flex flex-col gap-0.5 flex-1", this.appendChild(c));
|
|
2653
|
-
let r = c.querySelector(".mint-choice-label");
|
|
2654
|
-
e ? (r || (r = document.createElement("span"), r.className = "mint-choice-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", c.insertBefore(r, c.firstChild)), r.textContent = e, n ? r.classList.add("opacity-50") : r.classList.remove("opacity-50")) : r && r.remove();
|
|
2655
|
-
let i = c.querySelector(".mint-choice-info");
|
|
2656
|
-
if (t ? (i || (i = document.createElement("span"), i.className = "mint-choice-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", c.appendChild(i)), i.textContent = t, n ? i.classList.add("opacity-50") : i.classList.remove("opacity-50")) : i && i.remove(), n) c.style.cursor = "default", c._clickHandler && (c.removeEventListener("click", c._clickHandler), c._clickHandler = null);
|
|
2657
|
-
else {
|
|
2658
|
-
c.style.cursor = "pointer";
|
|
2659
|
-
let e = c._clickHandler;
|
|
2660
|
-
e && c.removeEventListener("click", e), c._clickHandler = (e) => {
|
|
2661
|
-
this._radio && (e.target === this._radio || this._radio.contains(e.target) || e.composedPath().includes(this._radio)) || this.select();
|
|
2662
|
-
}, c.addEventListener("click", c._clickHandler);
|
|
2663
|
-
}
|
|
2664
|
-
} else c && c.remove();
|
|
2665
|
-
}
|
|
2666
|
-
setupEventListeners() {
|
|
2667
|
-
this.removeEventListeners(), this._radio && (this._changeHandler = (e) => {
|
|
2668
|
-
e.stopPropagation();
|
|
2669
|
-
let t = this._checked;
|
|
2670
|
-
if (this._checked = this._radio.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState(), this._checked) {
|
|
2671
|
-
let e = this._radio.name;
|
|
2672
|
-
e && document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach((e) => {
|
|
2673
|
-
if (e !== this._radio) {
|
|
2674
|
-
let t = e.closest("mint-choice");
|
|
2675
|
-
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
2676
|
-
}
|
|
2677
|
-
});
|
|
2678
|
-
}
|
|
2679
|
-
if (t !== this._checked) {
|
|
2680
|
-
let e = new CustomEvent("change", {
|
|
2681
|
-
detail: {
|
|
2682
|
-
checked: this._checked,
|
|
2683
|
-
value: this.getValue()
|
|
2684
|
-
},
|
|
2685
|
-
bubbles: !0,
|
|
2686
|
-
cancelable: !0
|
|
2687
|
-
});
|
|
2688
|
-
this.dispatchEvent(e);
|
|
2689
|
-
}
|
|
2690
|
-
}, this._radio.addEventListener("change", this._changeHandler), this._groupChangeHandler = (e) => {
|
|
2691
|
-
e.target !== this._radio && e.target.type === "radio" && e.target.name === this._radio.name && e.target.checked && setTimeout(() => {
|
|
2692
|
-
this._radio && this._radio.checked !== this._checked && (this._checked = this._radio.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState());
|
|
2693
|
-
}, 0);
|
|
2694
|
-
}, document.addEventListener("change", this._groupChangeHandler, !0), this._clickHandler = (e) => {
|
|
2695
|
-
let t = this._radio.name;
|
|
2696
|
-
t && document.querySelectorAll(`input[type="radio"][name="${t}"]`).forEach((e) => {
|
|
2697
|
-
if (e !== this._radio) {
|
|
2698
|
-
let t = e.closest("mint-choice");
|
|
2699
|
-
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
2700
|
-
}
|
|
2701
|
-
}), requestAnimationFrame(() => {
|
|
2702
|
-
this._checked = this._radio.checked, this.updateVisualState();
|
|
2703
|
-
});
|
|
2704
|
-
}, this._radio.addEventListener("click", this._clickHandler), this._mousedownHandler = (e) => {
|
|
2705
|
-
e.stopPropagation();
|
|
2706
|
-
let t = this.querySelector(".mint-choice-wrapper");
|
|
2707
|
-
t && !this.isDisabled() && (t.classList.add("mint-choice-active"), this._checked ? (t.style.backgroundColor = "rgb(15 23 42)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.3)") : (t.style.backgroundColor = "rgb(243 244 246)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.1)"), document.documentElement.classList.contains("dark") && (this._checked ? t.style.backgroundColor = "rgb(51 65 85)" : t.style.backgroundColor = "rgb(31 41 55)"));
|
|
2708
|
-
}, this._mouseupHandler = (e) => {
|
|
2709
|
-
e.stopPropagation();
|
|
2710
|
-
let t = this.querySelector(".mint-choice-wrapper");
|
|
2711
|
-
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2712
|
-
}, this._mouseleaveHandler = (e) => {
|
|
2713
|
-
let t = this.querySelector(".mint-choice-wrapper");
|
|
2714
|
-
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2715
|
-
}, this._radio.addEventListener("mousedown", this._mousedownHandler), this._radio.addEventListener("mouseup", this._mouseupHandler), this._radio.addEventListener("mouseleave", this._mouseleaveHandler), this._touchstartHandler = (e) => {
|
|
2716
|
-
e.stopPropagation();
|
|
2717
|
-
let t = this.querySelector(".mint-choice-wrapper");
|
|
2718
|
-
t && !this.isDisabled() && (t.classList.add("mint-choice-active"), this._checked ? (t.style.backgroundColor = "rgb(15 23 42)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.3)") : (t.style.backgroundColor = "rgb(243 244 246)", t.style.boxShadow = "inset 0 2px 4px rgba(0, 0, 0, 0.1)"), document.documentElement.classList.contains("dark") && (this._checked ? t.style.backgroundColor = "rgb(51 65 85)" : t.style.backgroundColor = "rgb(31 41 55)"));
|
|
2719
|
-
}, this._touchendHandler = (e) => {
|
|
2720
|
-
e.stopPropagation();
|
|
2721
|
-
let t = this.querySelector(".mint-choice-wrapper");
|
|
2722
|
-
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
2723
|
-
}, this._radio.addEventListener("touchstart", this._touchstartHandler), this._radio.addEventListener("touchend", this._touchendHandler));
|
|
2724
|
-
}
|
|
2725
|
-
removeEventListeners() {
|
|
2726
|
-
this._radio && (this._changeHandler &&= (this._radio.removeEventListener("change", this._changeHandler), null), this._groupChangeHandler &&= (document.removeEventListener("change", this._groupChangeHandler), null), this._clickHandler &&= (this._radio.removeEventListener("click", this._clickHandler), null), this._mousedownHandler &&= (this._radio.removeEventListener("mousedown", this._mousedownHandler), null), this._mouseupHandler &&= (this._radio.removeEventListener("mouseup", this._mouseupHandler), null), this._mouseleaveHandler &&= (this._radio.removeEventListener("mouseleave", this._mouseleaveHandler), null), this._touchstartHandler &&= (this._radio.removeEventListener("touchstart", this._touchstartHandler), null), this._touchendHandler &&= (this._radio.removeEventListener("touchend", this._touchendHandler), null));
|
|
2727
|
-
}
|
|
2728
|
-
updateVisualState() {
|
|
2729
|
-
let e = this.querySelector(".mint-choice-wrapper"), t = e?.querySelector(".mint-choice-indicator");
|
|
2730
|
-
t && (t.style.opacity = this._checked ? "1" : "0", t.style.transform = this._checked ? "scale(1)" : "scale(0.8)"), e && (e.className = `mint-choice-wrapper ${this.getChoiceClasses()}`, e.classList.contains("mint-choice-active") || (e.style.backgroundColor = "", e.style.boxShadow = ""));
|
|
2731
|
-
}
|
|
2732
|
-
select() {
|
|
2733
|
-
if (this._radio && !this.isDisabled()) {
|
|
2734
|
-
this._radio.checked = !0, this._radio.dispatchEvent(new Event("change", { bubbles: !0 })), this._checked = !0, this.hasAttribute("checked") || this.setAttribute("checked", "");
|
|
2735
|
-
let e = this._radio.name;
|
|
2736
|
-
e && document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach((e) => {
|
|
2737
|
-
if (e !== this._radio) {
|
|
2738
|
-
let t = e.closest("mint-choice");
|
|
2739
|
-
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
2740
|
-
}
|
|
2741
|
-
}), this.updateVisualState();
|
|
2742
|
-
let t = new CustomEvent("change", {
|
|
2743
|
-
detail: {
|
|
2744
|
-
checked: this._checked,
|
|
2745
|
-
value: this.getValue()
|
|
2746
|
-
},
|
|
2747
|
-
bubbles: !0,
|
|
2748
|
-
cancelable: !0
|
|
2749
|
-
});
|
|
2750
|
-
this.dispatchEvent(t);
|
|
2751
|
-
}
|
|
2752
|
-
}
|
|
2753
|
-
};
|
|
2754
|
-
customElements.get("mint-choice") || customElements.define("mint-choice", Ne);
|
|
2755
|
-
//#endregion
|
|
2756
|
-
export { Q as Button, Q as default, Te as Card, Me as Checkbox, Ne as Choice, ke as Grid, i as Icon, Ee as Link, Ae as Modal, Oe as Page, je as Popover, e as Spinner, we as Stack, Ce as Switch, $ as Text };
|
|
1
|
+
import { t as e } from "./components/chunks/spinner-zGnecx3W.js";
|
|
2
|
+
import { t } from "./components/chunks/Icon-xNhleOos.js";
|
|
3
|
+
import "./components/chunks/icon-a2ABTJf-.js";
|
|
4
|
+
import { t as n } from "./components/chunks/button-DFs4DmfC.js";
|
|
5
|
+
import { t as r } from "./components/chunks/switch-CCyMw1-M.js";
|
|
6
|
+
import { t as i } from "./components/chunks/text-B-qq-sZ2.js";
|
|
7
|
+
import { t as a } from "./components/chunks/stack-DzZy3iH1.js";
|
|
8
|
+
import { t as o } from "./components/chunks/card-DhRHTSkL.js";
|
|
9
|
+
import { t as s } from "./components/chunks/link-C49HKGxh.js";
|
|
10
|
+
import { t as c } from "./components/chunks/page-DFKYJekL.js";
|
|
11
|
+
import { t as l } from "./components/chunks/grid-DqlQrFkp.js";
|
|
12
|
+
import { t as u } from "./components/chunks/modal-BQlup2Mw.js";
|
|
13
|
+
import { t as d } from "./components/chunks/popover-BkTNH5gb.js";
|
|
14
|
+
import { t as f } from "./components/chunks/checkbox-D95xYxXV.js";
|
|
15
|
+
import { t as p } from "./components/chunks/choice-BlAkXCQN.js";
|
|
16
|
+
export { n as Button, n as default, o as Card, f as Checkbox, p as Choice, l as Grid, t as Icon, s as Link, u as Modal, c as Page, d as Popover, e as Spinner, a as Stack, r as Switch, i as Text };
|