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
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import "./icon-a2ABTJf-.js";
|
|
2
|
+
//#region src/components/checkbox/Checkbox.js
|
|
3
|
+
var e = class extends HTMLElement {
|
|
4
|
+
static get observedAttributes() {
|
|
5
|
+
return [
|
|
6
|
+
"checked",
|
|
7
|
+
"disabled",
|
|
8
|
+
"label",
|
|
9
|
+
"info",
|
|
10
|
+
"id",
|
|
11
|
+
"name",
|
|
12
|
+
"value"
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
constructor() {
|
|
16
|
+
super(), this._checkbox = null, this._checked = !1, this._clickHandler = null;
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-flex", "items-start", "gap-2");
|
|
20
|
+
let e = this.getAttribute("checked");
|
|
21
|
+
this._checked = e !== null && e !== "false", this.render();
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
this.removeEventListeners();
|
|
25
|
+
}
|
|
26
|
+
attributeChangedCallback(e, t, n) {
|
|
27
|
+
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());
|
|
28
|
+
}
|
|
29
|
+
get checked() {
|
|
30
|
+
return this._checked;
|
|
31
|
+
}
|
|
32
|
+
set checked(e) {
|
|
33
|
+
e ? this.setAttribute("checked", "") : this.removeAttribute("checked"), this._checked = !!e, this._checkbox && (this._checkbox.checked = this._checked), this.updateVisualState();
|
|
34
|
+
}
|
|
35
|
+
isDisabled() {
|
|
36
|
+
return this.hasAttribute("disabled");
|
|
37
|
+
}
|
|
38
|
+
getLabel() {
|
|
39
|
+
return this.getAttribute("label") || "";
|
|
40
|
+
}
|
|
41
|
+
getInfo() {
|
|
42
|
+
return this.getAttribute("info") || "";
|
|
43
|
+
}
|
|
44
|
+
getId() {
|
|
45
|
+
return this.getAttribute("id") || "";
|
|
46
|
+
}
|
|
47
|
+
getName() {
|
|
48
|
+
return this.getAttribute("name") || "";
|
|
49
|
+
}
|
|
50
|
+
getValue() {
|
|
51
|
+
return this.getAttribute("value") || "";
|
|
52
|
+
}
|
|
53
|
+
getCheckboxClasses() {
|
|
54
|
+
let e = [
|
|
55
|
+
"relative",
|
|
56
|
+
"inline-flex",
|
|
57
|
+
"items-center",
|
|
58
|
+
"justify-center",
|
|
59
|
+
"flex-shrink-0",
|
|
60
|
+
"w-5",
|
|
61
|
+
"h-5",
|
|
62
|
+
"rounded",
|
|
63
|
+
"border-2",
|
|
64
|
+
"transition-all",
|
|
65
|
+
"duration-200",
|
|
66
|
+
"outline-none",
|
|
67
|
+
"focus:outline-none",
|
|
68
|
+
"focus-visible:ring-2",
|
|
69
|
+
"focus-visible:ring-offset-2",
|
|
70
|
+
"focus-visible:ring-slate-500",
|
|
71
|
+
"dark:focus-visible:ring-slate-400",
|
|
72
|
+
"cursor-pointer",
|
|
73
|
+
"disabled:opacity-50",
|
|
74
|
+
"disabled:cursor-not-allowed"
|
|
75
|
+
], t = this._checked ? [
|
|
76
|
+
"bg-slate-800",
|
|
77
|
+
"dark:bg-slate-600",
|
|
78
|
+
"border-slate-800",
|
|
79
|
+
"dark:border-slate-600"
|
|
80
|
+
] : [
|
|
81
|
+
"bg-white",
|
|
82
|
+
"dark:bg-gray-700",
|
|
83
|
+
"border-gray-300",
|
|
84
|
+
"dark:border-gray-500"
|
|
85
|
+
];
|
|
86
|
+
return [...e, ...t].join(" ");
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
let e = this.getLabel(), t = this.getInfo(), n = this.isDisabled(), r = this.querySelector(".mint-checkbox-wrapper");
|
|
90
|
+
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();
|
|
91
|
+
let i = this.getId();
|
|
92
|
+
i ? this._checkbox.id = i : this._checkbox.removeAttribute("id");
|
|
93
|
+
let a = this.getName();
|
|
94
|
+
a ? this._checkbox.name = a : this._checkbox.removeAttribute("name");
|
|
95
|
+
let o = this.getValue();
|
|
96
|
+
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";
|
|
97
|
+
let s = r.querySelector("mint-icon");
|
|
98
|
+
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();
|
|
99
|
+
let c = this.querySelector(".mint-checkbox-label-container");
|
|
100
|
+
if (e || t) {
|
|
101
|
+
c || (c = document.createElement("div"), c.className = "mint-checkbox-label-container flex flex-col gap-0.5 flex-1", this.appendChild(c));
|
|
102
|
+
let r = c.querySelector(".mint-checkbox-label");
|
|
103
|
+
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();
|
|
104
|
+
let i = c.querySelector(".mint-checkbox-info");
|
|
105
|
+
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);
|
|
106
|
+
else {
|
|
107
|
+
c.style.cursor = "pointer";
|
|
108
|
+
let e = c._clickHandler;
|
|
109
|
+
e && c.removeEventListener("click", e), c._clickHandler = (e) => {
|
|
110
|
+
this._checkbox && (e.target === this._checkbox || this._checkbox.contains(e.target) || e.composedPath().includes(this._checkbox)) || this.toggle();
|
|
111
|
+
}, c.addEventListener("click", c._clickHandler);
|
|
112
|
+
}
|
|
113
|
+
} else c && c.remove();
|
|
114
|
+
}
|
|
115
|
+
setupEventListeners() {
|
|
116
|
+
this.removeEventListeners(), this._checkbox && (this._changeHandler = (e) => {
|
|
117
|
+
e.stopPropagation(), this._checked = this._checkbox.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState();
|
|
118
|
+
let t = new CustomEvent("change", {
|
|
119
|
+
detail: {
|
|
120
|
+
checked: this._checked,
|
|
121
|
+
value: this.getValue()
|
|
122
|
+
},
|
|
123
|
+
bubbles: !0,
|
|
124
|
+
cancelable: !0
|
|
125
|
+
});
|
|
126
|
+
this.dispatchEvent(t);
|
|
127
|
+
}, this._checkbox.addEventListener("change", this._changeHandler), this._mousedownHandler = (e) => {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
130
|
+
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)"));
|
|
131
|
+
}, this._mouseupHandler = (e) => {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
134
|
+
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
135
|
+
}, this._mouseleaveHandler = (e) => {
|
|
136
|
+
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
137
|
+
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
138
|
+
}, this._checkbox.addEventListener("mousedown", this._mousedownHandler), this._checkbox.addEventListener("mouseup", this._mouseupHandler), this._checkbox.addEventListener("mouseleave", this._mouseleaveHandler), this._touchstartHandler = (e) => {
|
|
139
|
+
e.stopPropagation();
|
|
140
|
+
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
141
|
+
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)"));
|
|
142
|
+
}, this._touchendHandler = (e) => {
|
|
143
|
+
e.stopPropagation();
|
|
144
|
+
let t = this.querySelector(".mint-checkbox-wrapper");
|
|
145
|
+
t && (t.classList.remove("mint-checkbox-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
146
|
+
}, this._checkbox.addEventListener("touchstart", this._touchstartHandler), this._checkbox.addEventListener("touchend", this._touchendHandler));
|
|
147
|
+
}
|
|
148
|
+
removeEventListeners() {
|
|
149
|
+
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));
|
|
150
|
+
}
|
|
151
|
+
updateVisualState() {
|
|
152
|
+
let e = this.querySelector(".mint-checkbox-wrapper"), t = e?.querySelector("mint-icon");
|
|
153
|
+
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 = ""));
|
|
154
|
+
}
|
|
155
|
+
toggle() {
|
|
156
|
+
if (this._checkbox && !this.isDisabled()) {
|
|
157
|
+
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();
|
|
158
|
+
let e = new CustomEvent("change", {
|
|
159
|
+
detail: { checked: this._checked },
|
|
160
|
+
bubbles: !0,
|
|
161
|
+
cancelable: !0
|
|
162
|
+
});
|
|
163
|
+
this.dispatchEvent(e);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
customElements.get("mint-checkbox") || customElements.define("mint-checkbox", e);
|
|
168
|
+
//#endregion
|
|
169
|
+
export { e as t };
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
//#region src/components/choice/Choice.js
|
|
2
|
+
var e = class extends HTMLElement {
|
|
3
|
+
static get observedAttributes() {
|
|
4
|
+
return [
|
|
5
|
+
"checked",
|
|
6
|
+
"disabled",
|
|
7
|
+
"label",
|
|
8
|
+
"info",
|
|
9
|
+
"id",
|
|
10
|
+
"name",
|
|
11
|
+
"value"
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
constructor() {
|
|
15
|
+
super(), this._radio = null, this._checked = !1;
|
|
16
|
+
}
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-flex", "items-start", "gap-2");
|
|
19
|
+
let e = this.getAttribute("checked");
|
|
20
|
+
this._checked = e !== null && e !== "false", this.render();
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
this.removeEventListeners();
|
|
24
|
+
}
|
|
25
|
+
attributeChangedCallback(e, t, n) {
|
|
26
|
+
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());
|
|
27
|
+
}
|
|
28
|
+
get checked() {
|
|
29
|
+
return this._checked;
|
|
30
|
+
}
|
|
31
|
+
set checked(e) {
|
|
32
|
+
e ? this.setAttribute("checked", "") : this.removeAttribute("checked"), this._checked = !!e, this._radio && (this._radio.checked = this._checked), this.updateVisualState();
|
|
33
|
+
}
|
|
34
|
+
isDisabled() {
|
|
35
|
+
return this.hasAttribute("disabled");
|
|
36
|
+
}
|
|
37
|
+
getLabel() {
|
|
38
|
+
return this.getAttribute("label") || "";
|
|
39
|
+
}
|
|
40
|
+
getInfo() {
|
|
41
|
+
return this.getAttribute("info") || "";
|
|
42
|
+
}
|
|
43
|
+
getId() {
|
|
44
|
+
return this.getAttribute("id") || "";
|
|
45
|
+
}
|
|
46
|
+
getName() {
|
|
47
|
+
return this.getAttribute("name") || "";
|
|
48
|
+
}
|
|
49
|
+
getValue() {
|
|
50
|
+
return this.getAttribute("value") || "";
|
|
51
|
+
}
|
|
52
|
+
getChoiceClasses() {
|
|
53
|
+
let e = [
|
|
54
|
+
"relative",
|
|
55
|
+
"inline-flex",
|
|
56
|
+
"items-center",
|
|
57
|
+
"justify-center",
|
|
58
|
+
"flex-shrink-0",
|
|
59
|
+
"w-5",
|
|
60
|
+
"h-5",
|
|
61
|
+
"rounded-full",
|
|
62
|
+
"border-2",
|
|
63
|
+
"transition-all",
|
|
64
|
+
"duration-200",
|
|
65
|
+
"outline-none",
|
|
66
|
+
"focus:outline-none",
|
|
67
|
+
"focus-visible:ring-2",
|
|
68
|
+
"focus-visible:ring-offset-2",
|
|
69
|
+
"focus-visible:ring-slate-500",
|
|
70
|
+
"dark:focus-visible:ring-slate-400",
|
|
71
|
+
"cursor-pointer",
|
|
72
|
+
"disabled:opacity-50",
|
|
73
|
+
"disabled:cursor-not-allowed"
|
|
74
|
+
], t = this._checked ? [
|
|
75
|
+
"bg-slate-800",
|
|
76
|
+
"dark:bg-slate-600",
|
|
77
|
+
"border-slate-800",
|
|
78
|
+
"dark:border-slate-600"
|
|
79
|
+
] : [
|
|
80
|
+
"bg-white",
|
|
81
|
+
"dark:bg-gray-700",
|
|
82
|
+
"border-gray-300",
|
|
83
|
+
"dark:border-gray-500"
|
|
84
|
+
];
|
|
85
|
+
return [...e, ...t].join(" ");
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
let e = this.getLabel(), t = this.getInfo(), n = this.isDisabled(), r = this.querySelector(".mint-choice-wrapper");
|
|
89
|
+
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();
|
|
90
|
+
let i = this.getId();
|
|
91
|
+
i ? this._radio.id = i : this._radio.removeAttribute("id");
|
|
92
|
+
let a = this.getName();
|
|
93
|
+
a ? this._radio.name = a : this._radio.removeAttribute("name");
|
|
94
|
+
let o = this.getValue();
|
|
95
|
+
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";
|
|
96
|
+
let s = r.querySelector(".mint-choice-indicator");
|
|
97
|
+
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();
|
|
98
|
+
let c = this.querySelector(".mint-choice-label-container");
|
|
99
|
+
if (e || t) {
|
|
100
|
+
c || (c = document.createElement("div"), c.className = "mint-choice-label-container flex flex-col gap-0.5 flex-1", this.appendChild(c));
|
|
101
|
+
let r = c.querySelector(".mint-choice-label");
|
|
102
|
+
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();
|
|
103
|
+
let i = c.querySelector(".mint-choice-info");
|
|
104
|
+
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);
|
|
105
|
+
else {
|
|
106
|
+
c.style.cursor = "pointer";
|
|
107
|
+
let e = c._clickHandler;
|
|
108
|
+
e && c.removeEventListener("click", e), c._clickHandler = (e) => {
|
|
109
|
+
this._radio && (e.target === this._radio || this._radio.contains(e.target) || e.composedPath().includes(this._radio)) || this.select();
|
|
110
|
+
}, c.addEventListener("click", c._clickHandler);
|
|
111
|
+
}
|
|
112
|
+
} else c && c.remove();
|
|
113
|
+
}
|
|
114
|
+
setupEventListeners() {
|
|
115
|
+
this.removeEventListeners(), this._radio && (this._changeHandler = (e) => {
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
let t = this._checked;
|
|
118
|
+
if (this._checked = this._radio.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState(), this._checked) {
|
|
119
|
+
let e = this._radio.name;
|
|
120
|
+
e && document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach((e) => {
|
|
121
|
+
if (e !== this._radio) {
|
|
122
|
+
let t = e.closest("mint-choice");
|
|
123
|
+
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (t !== this._checked) {
|
|
128
|
+
let e = new CustomEvent("change", {
|
|
129
|
+
detail: {
|
|
130
|
+
checked: this._checked,
|
|
131
|
+
value: this.getValue()
|
|
132
|
+
},
|
|
133
|
+
bubbles: !0,
|
|
134
|
+
cancelable: !0
|
|
135
|
+
});
|
|
136
|
+
this.dispatchEvent(e);
|
|
137
|
+
}
|
|
138
|
+
}, this._radio.addEventListener("change", this._changeHandler), this._groupChangeHandler = (e) => {
|
|
139
|
+
e.target !== this._radio && e.target.type === "radio" && e.target.name === this._radio.name && e.target.checked && setTimeout(() => {
|
|
140
|
+
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());
|
|
141
|
+
}, 0);
|
|
142
|
+
}, document.addEventListener("change", this._groupChangeHandler, !0), this._clickHandler = (e) => {
|
|
143
|
+
let t = this._radio.name;
|
|
144
|
+
t && document.querySelectorAll(`input[type="radio"][name="${t}"]`).forEach((e) => {
|
|
145
|
+
if (e !== this._radio) {
|
|
146
|
+
let t = e.closest("mint-choice");
|
|
147
|
+
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
148
|
+
}
|
|
149
|
+
}), requestAnimationFrame(() => {
|
|
150
|
+
this._checked = this._radio.checked, this.updateVisualState();
|
|
151
|
+
});
|
|
152
|
+
}, this._radio.addEventListener("click", this._clickHandler), this._mousedownHandler = (e) => {
|
|
153
|
+
e.stopPropagation();
|
|
154
|
+
let t = this.querySelector(".mint-choice-wrapper");
|
|
155
|
+
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)"));
|
|
156
|
+
}, this._mouseupHandler = (e) => {
|
|
157
|
+
e.stopPropagation();
|
|
158
|
+
let t = this.querySelector(".mint-choice-wrapper");
|
|
159
|
+
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
160
|
+
}, this._mouseleaveHandler = (e) => {
|
|
161
|
+
let t = this.querySelector(".mint-choice-wrapper");
|
|
162
|
+
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
163
|
+
}, this._radio.addEventListener("mousedown", this._mousedownHandler), this._radio.addEventListener("mouseup", this._mouseupHandler), this._radio.addEventListener("mouseleave", this._mouseleaveHandler), this._touchstartHandler = (e) => {
|
|
164
|
+
e.stopPropagation();
|
|
165
|
+
let t = this.querySelector(".mint-choice-wrapper");
|
|
166
|
+
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)"));
|
|
167
|
+
}, this._touchendHandler = (e) => {
|
|
168
|
+
e.stopPropagation();
|
|
169
|
+
let t = this.querySelector(".mint-choice-wrapper");
|
|
170
|
+
t && (t.classList.remove("mint-choice-active"), t.style.backgroundColor = "", t.style.boxShadow = "");
|
|
171
|
+
}, this._radio.addEventListener("touchstart", this._touchstartHandler), this._radio.addEventListener("touchend", this._touchendHandler));
|
|
172
|
+
}
|
|
173
|
+
removeEventListeners() {
|
|
174
|
+
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));
|
|
175
|
+
}
|
|
176
|
+
updateVisualState() {
|
|
177
|
+
let e = this.querySelector(".mint-choice-wrapper"), t = e?.querySelector(".mint-choice-indicator");
|
|
178
|
+
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 = ""));
|
|
179
|
+
}
|
|
180
|
+
select() {
|
|
181
|
+
if (this._radio && !this.isDisabled()) {
|
|
182
|
+
this._radio.checked = !0, this._radio.dispatchEvent(new Event("change", { bubbles: !0 })), this._checked = !0, this.hasAttribute("checked") || this.setAttribute("checked", "");
|
|
183
|
+
let e = this._radio.name;
|
|
184
|
+
e && document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach((e) => {
|
|
185
|
+
if (e !== this._radio) {
|
|
186
|
+
let t = e.closest("mint-choice");
|
|
187
|
+
t && t.updateVisualState && (t._checked = e.checked, e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.hasAttribute("checked") && t.removeAttribute("checked"), t.updateVisualState());
|
|
188
|
+
}
|
|
189
|
+
}), this.updateVisualState();
|
|
190
|
+
let t = new CustomEvent("change", {
|
|
191
|
+
detail: {
|
|
192
|
+
checked: this._checked,
|
|
193
|
+
value: this.getValue()
|
|
194
|
+
},
|
|
195
|
+
bubbles: !0,
|
|
196
|
+
cancelable: !0
|
|
197
|
+
});
|
|
198
|
+
this.dispatchEvent(t);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
customElements.get("mint-choice") || customElements.define("mint-choice", e);
|
|
203
|
+
//#endregion
|
|
204
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends HTMLElement{static get observedAttributes(){return[`checked`,`disabled`,`label`,`info`,`id`,`name`,`value`]}constructor(){super(),this._radio=null,this._checked=!1}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`inline-flex`,`items-start`,`gap-2`);let e=this.getAttribute(`checked`);this._checked=e!==null&&e!==`false`,this.render()}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){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())}get checked(){return this._checked}set checked(e){e?this.setAttribute(`checked`,``):this.removeAttribute(`checked`),this._checked=!!e,this._radio&&(this._radio.checked=this._checked),this.updateVisualState()}isDisabled(){return this.hasAttribute(`disabled`)}getLabel(){return this.getAttribute(`label`)||``}getInfo(){return this.getAttribute(`info`)||``}getId(){return this.getAttribute(`id`)||``}getName(){return this.getAttribute(`name`)||``}getValue(){return this.getAttribute(`value`)||``}getChoiceClasses(){let e=[`relative`,`inline-flex`,`items-center`,`justify-center`,`flex-shrink-0`,`w-5`,`h-5`,`rounded-full`,`border-2`,`transition-all`,`duration-200`,`outline-none`,`focus:outline-none`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`focus-visible:ring-slate-500`,`dark:focus-visible:ring-slate-400`,`cursor-pointer`,`disabled:opacity-50`,`disabled:cursor-not-allowed`],t=this._checked?[`bg-slate-800`,`dark:bg-slate-600`,`border-slate-800`,`dark:border-slate-600`]:[`bg-white`,`dark:bg-gray-700`,`border-gray-300`,`dark:border-gray-500`];return[...e,...t].join(` `)}render(){let e=this.getLabel(),t=this.getInfo(),n=this.isDisabled(),r=this.querySelector(`.mint-choice-wrapper`);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();let i=this.getId();i?this._radio.id=i:this._radio.removeAttribute(`id`);let a=this.getName();a?this._radio.name=a:this._radio.removeAttribute(`name`);let o=this.getValue();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`;let s=r.querySelector(`.mint-choice-indicator`);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();let c=this.querySelector(`.mint-choice-label-container`);if(e||t){c||(c=document.createElement(`div`),c.className=`mint-choice-label-container flex flex-col gap-0.5 flex-1`,this.appendChild(c));let r=c.querySelector(`.mint-choice-label`);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();let i=c.querySelector(`.mint-choice-info`);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);else{c.style.cursor=`pointer`;let e=c._clickHandler;e&&c.removeEventListener(`click`,e),c._clickHandler=e=>{this._radio&&(e.target===this._radio||this._radio.contains(e.target)||e.composedPath().includes(this._radio))||this.select()},c.addEventListener(`click`,c._clickHandler)}}else c&&c.remove()}setupEventListeners(){this.removeEventListeners(),this._radio&&(this._changeHandler=e=>{e.stopPropagation();let t=this._checked;if(this._checked=this._radio.checked,this._checked?this.hasAttribute(`checked`)||this.setAttribute(`checked`,``):this.hasAttribute(`checked`)&&this.removeAttribute(`checked`),this.updateVisualState(),this._checked){let e=this._radio.name;e&&document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach(e=>{if(e!==this._radio){let t=e.closest(`mint-choice`);t&&t.updateVisualState&&(t._checked=e.checked,e.checked?t.hasAttribute(`checked`)||t.setAttribute(`checked`,``):t.hasAttribute(`checked`)&&t.removeAttribute(`checked`),t.updateVisualState())}})}if(t!==this._checked){let e=new CustomEvent(`change`,{detail:{checked:this._checked,value:this.getValue()},bubbles:!0,cancelable:!0});this.dispatchEvent(e)}},this._radio.addEventListener(`change`,this._changeHandler),this._groupChangeHandler=e=>{e.target!==this._radio&&e.target.type===`radio`&&e.target.name===this._radio.name&&e.target.checked&&setTimeout(()=>{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())},0)},document.addEventListener(`change`,this._groupChangeHandler,!0),this._clickHandler=e=>{let t=this._radio.name;t&&document.querySelectorAll(`input[type="radio"][name="${t}"]`).forEach(e=>{if(e!==this._radio){let t=e.closest(`mint-choice`);t&&t.updateVisualState&&(t._checked=e.checked,e.checked?t.hasAttribute(`checked`)||t.setAttribute(`checked`,``):t.hasAttribute(`checked`)&&t.removeAttribute(`checked`),t.updateVisualState())}}),requestAnimationFrame(()=>{this._checked=this._radio.checked,this.updateVisualState()})},this._radio.addEventListener(`click`,this._clickHandler),this._mousedownHandler=e=>{e.stopPropagation();let t=this.querySelector(`.mint-choice-wrapper`);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)`))},this._mouseupHandler=e=>{e.stopPropagation();let t=this.querySelector(`.mint-choice-wrapper`);t&&(t.classList.remove(`mint-choice-active`),t.style.backgroundColor=``,t.style.boxShadow=``)},this._mouseleaveHandler=e=>{let t=this.querySelector(`.mint-choice-wrapper`);t&&(t.classList.remove(`mint-choice-active`),t.style.backgroundColor=``,t.style.boxShadow=``)},this._radio.addEventListener(`mousedown`,this._mousedownHandler),this._radio.addEventListener(`mouseup`,this._mouseupHandler),this._radio.addEventListener(`mouseleave`,this._mouseleaveHandler),this._touchstartHandler=e=>{e.stopPropagation();let t=this.querySelector(`.mint-choice-wrapper`);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)`))},this._touchendHandler=e=>{e.stopPropagation();let t=this.querySelector(`.mint-choice-wrapper`);t&&(t.classList.remove(`mint-choice-active`),t.style.backgroundColor=``,t.style.boxShadow=``)},this._radio.addEventListener(`touchstart`,this._touchstartHandler),this._radio.addEventListener(`touchend`,this._touchendHandler))}removeEventListeners(){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))}updateVisualState(){let e=this.querySelector(`.mint-choice-wrapper`),t=e?.querySelector(`.mint-choice-indicator`);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=``))}select(){if(this._radio&&!this.isDisabled()){this._radio.checked=!0,this._radio.dispatchEvent(new Event(`change`,{bubbles:!0})),this._checked=!0,this.hasAttribute(`checked`)||this.setAttribute(`checked`,``);let e=this._radio.name;e&&document.querySelectorAll(`input[type="radio"][name="${e}"]`).forEach(e=>{if(e!==this._radio){let t=e.closest(`mint-choice`);t&&t.updateVisualState&&(t._checked=e.checked,e.checked?t.hasAttribute(`checked`)||t.setAttribute(`checked`,``):t.hasAttribute(`checked`)&&t.removeAttribute(`checked`),t.updateVisualState())}}),this.updateVisualState();let t=new CustomEvent(`change`,{detail:{checked:this._checked,value:this.getValue()},bubbles:!0,cancelable:!0});this.dispatchEvent(t)}}};customElements.get(`mint-choice`)||customElements.define(`mint-choice`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends HTMLElement{static get observedAttributes(){return[`columns`,`sm`,`md`,`lg`,`xl`,`gap`]}constructor(){super()}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`block`),this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getColumns(){return this.getAttribute(`columns`)||`1`}getSm(){return this.getAttribute(`sm`)||null}getMd(){return this.getAttribute(`md`)||null}getLg(){return this.getAttribute(`lg`)||null}getXl(){return this.getAttribute(`xl`)||null}getGap(){return`3`}getGridClasses(){let e=[`grid`],t=this.getColumns();e.push(`grid-cols-${t}`);let n=this.getSm();n&&e.push(`sm:grid-cols-${n}`);let r=this.getMd();r&&e.push(`md:grid-cols-${r}`);let i=this.getLg();i&&e.push(`lg:grid-cols-${i}`);let a=this.getXl();a&&e.push(`xl:grid-cols-${a}`);let o=this.getGap();return e.push(`gap-${o}`),e}render(){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=>{e&&e!==`grid`&&this.classList.add(e)})}};customElements.get(`mint-grid`)||customElements.define(`mint-grid`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/components/grid/Grid.js
|
|
2
|
+
var e = class extends HTMLElement {
|
|
3
|
+
static get observedAttributes() {
|
|
4
|
+
return [
|
|
5
|
+
"columns",
|
|
6
|
+
"sm",
|
|
7
|
+
"md",
|
|
8
|
+
"lg",
|
|
9
|
+
"xl",
|
|
10
|
+
"gap"
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render();
|
|
18
|
+
}
|
|
19
|
+
attributeChangedCallback(e, t, n) {
|
|
20
|
+
t !== n && this.render();
|
|
21
|
+
}
|
|
22
|
+
getColumns() {
|
|
23
|
+
return this.getAttribute("columns") || "1";
|
|
24
|
+
}
|
|
25
|
+
getSm() {
|
|
26
|
+
return this.getAttribute("sm") || null;
|
|
27
|
+
}
|
|
28
|
+
getMd() {
|
|
29
|
+
return this.getAttribute("md") || null;
|
|
30
|
+
}
|
|
31
|
+
getLg() {
|
|
32
|
+
return this.getAttribute("lg") || null;
|
|
33
|
+
}
|
|
34
|
+
getXl() {
|
|
35
|
+
return this.getAttribute("xl") || null;
|
|
36
|
+
}
|
|
37
|
+
getGap() {
|
|
38
|
+
return "3";
|
|
39
|
+
}
|
|
40
|
+
getGridClasses() {
|
|
41
|
+
let e = ["grid"], t = this.getColumns();
|
|
42
|
+
e.push(`grid-cols-${t}`);
|
|
43
|
+
let n = this.getSm();
|
|
44
|
+
n && e.push(`sm:grid-cols-${n}`);
|
|
45
|
+
let r = this.getMd();
|
|
46
|
+
r && e.push(`md:grid-cols-${r}`);
|
|
47
|
+
let i = this.getLg();
|
|
48
|
+
i && e.push(`lg:grid-cols-${i}`);
|
|
49
|
+
let a = this.getXl();
|
|
50
|
+
a && e.push(`xl:grid-cols-${a}`);
|
|
51
|
+
let o = this.getGap();
|
|
52
|
+
return e.push(`gap-${o}`), e;
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
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) => {
|
|
56
|
+
e && e !== "grid" && this.classList.add(e);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
customElements.get("mint-grid") || customElements.define("mint-grid", e);
|
|
61
|
+
//#endregion
|
|
62
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./Icon-BTlX8dXa.js`);var t={name:`plus`,viewBox:`0 0 24 24`,path:`M12 4v16m8-8H4`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(t);var n={name:`user`,viewBox:`0 0 24 24`,path:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(n);var r={name:`trash`,viewBox:`0 0 24 24`,path:`M3 6h18m-2 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(r);var i={name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(i);var a={name:`home`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(a);var o={name:`search`,viewBox:`0 0 24 24`,path:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(o);var s={name:`notifications`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(s);var c={name:`chat`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(c);var l={name:`help`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(l);var u={name:`documentation`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(u);var d={name:`mail`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(d);var f={name:`settings`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(f);var p={name:`language`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(p);var m={name:`moon`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(m);var h={name:`sun`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(h);var g={name:`logout`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(g);var _={name:`login`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(_);var v={name:`user-add`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(v);var y={name:`calendar`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(y);var b={name:`clock`,viewBox:`0 0 24 24`,path:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(b);var x={name:`bookmark`,viewBox:`0 0 24 24`,path:`M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(x);var S={name:`star`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(S);var C={name:`pin`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(C);var w={name:`filter`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(w);var T={name:`sort`,viewBox:`0 0 24 24`,path:`M3 6h18M7 12h10m-7 6h4`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(T);var E={name:`refresh`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(E);var D={name:`share`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(D);var O={name:`upload`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(O);var k={name:`download`,viewBox:`0 0 24 24`,path:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(k);var A={name:`print`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(A);var j={name:`attach`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(j);var M={name:`edit`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(M);var N={name:`delete`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(N);var P={name:`save`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(P);var F={name:`duplicate`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(F);var I={name:`copy`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(I);var L={name:`paste`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(L);var R={name:`remove`,viewBox:`0 0 24 24`,path:`M20 12H4`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(R);var z={name:`check`,viewBox:`0 0 24 24`,path:`M5 13l4 4L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(z);var B={name:`close`,viewBox:`0 0 24 24`,path:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(B);var V={name:`warning`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(V);var H={name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(H);var U={name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(U);var W={name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(W);var G={name:`folder`,viewBox:`0 0 24 24`,path:`M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(G);var K={name:`file`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(K);var q={name:`archive`,viewBox:`0 0 24 24`,path:`M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(q);var J={name:`image`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(J);var Y={name:`video`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(Y);var X={name:`link`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(X);var Z={name:`external-link`,viewBox:`0 0 24 24`,path:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(Z);var Q={name:`grid`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(Q);var $={name:`list`,viewBox:`0 0 24 24`,path:`M8 6h13M5 6h.01M8 12h13M5 12h.01M8 18h13M5 18h.01`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a($);var ee={name:`menu`,viewBox:`0 0 24 24`,path:`M4 6h16M4 12h16M4 18h16`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ee);var te={name:`ellipsis`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(te);var ne={name:`arrow-right`,viewBox:`0 0 24 24`,path:`M14 5l7 7m0 0l-7 7m7-7H3`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ne);var re={name:`arrow-up`,viewBox:`0 0 24 24`,path:`M5 10l7-7m0 0l7 7m-7-7v18`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(re);var ie={name:`arrow-down`,viewBox:`0 0 24 24`,path:`M19 14l-7 7m0 0l-7-7m7 7V3`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ie);var ae={name:`caret-left`,viewBox:`0 0 24 24`,path:`M15 19l-7-7 7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ae);var oe={name:`caret-right`,viewBox:`0 0 24 24`,path:`M9 5l7 7-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(oe);var se={name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(se);var ce={name:`caret-down`,viewBox:`0 0 24 24`,path:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ce);var le={name:`lock`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(le);var ue={name:`unlock`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ue);var de={name:`users`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(de);var fe={name:`tag`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(fe);var pe={name:`qr-code`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(pe);var me={name:`barcode`,viewBox:`0 0 24 24`,path:`M3 4h1.5v16H3V4zM7 4h1v16H7V4zM11 4h1.5v16H11V4zM15.5 4h1v16h-1V4zM19.5 4h1.5v16h-1.5V4z`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(me);var he={name:`map`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(he);var ge={name:`location`,viewBox:`0 0 24 24`,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`,strokeLinecap:`round`,strokeLinejoin:`round`};e.a(ge),e.a(t),e.a(n),e.a(r),e.a(i),e.a(a),e.a(o),e.a(s),e.a(c),e.a(l),e.a(u),e.a(d),e.a(f),e.a(p),e.a(m),e.a(h),e.a(g),e.a(_),e.a(v),e.a(y),e.a(b),e.a(x),e.a(S),e.a(C),e.a(w),e.a(T),e.a(E),e.a(D),e.a(O),e.a(k),e.a(A),e.a(j),e.a(M),e.a(N),e.a(P),e.a(F),e.a(I),e.a(L),e.a(R),e.a(z),e.a(B),e.a(V),e.a(H),e.a(U),e.a(W),e.a(G),e.a(K),e.a(q),e.a(J),e.a(Y),e.a(X),e.a(Z),e.a(Q),e.a($),e.a(ee),e.a(te),e.a(ne),e.a(re),e.a(ie),e.a(ae),e.a(oe),e.a(se),e.a(ce),e.a(le),e.a(ue),e.a(de),e.a(fe),e.a(pe),e.a(me),e.a(he),e.a(ge);
|