@logosphere-ui/core 0.0.0-alpha.35 → 0.0.0-alpha.39
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/AGENTS.md +20 -15
- package/dist/AGENTS.md +20 -15
- package/dist/atoms/Checkbox/checkbox.d.ts +2 -1
- package/dist/{badge-BJqUgXZD.js → badge-DsDxWEHx.js} +1 -1
- package/dist/{badge-COTtd1jh.cjs → badge-DvaKpUHe.cjs} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{calendar-DtpJBtpq.cjs → calendar-CIgyrv3U.cjs} +1 -1
- package/dist/{calendar-B7bSuIt4.js → calendar-CZ_IN2TF.js} +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{card-BD8FkSTi.cjs → card-BOCW7gad.cjs} +1 -1
- package/dist/{card-CAAhjIjf.js → card-MDwFGplY.js} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{chatbot-8etAVHNx.cjs → chatbot-B-NiZIYK.cjs} +1 -1
- package/dist/{chatbot-p4CmxSdZ.js → chatbot-CHgiUY4h.js} +3 -3
- package/dist/chatbot.cjs +1 -1
- package/dist/chatbot.js +1 -1
- package/dist/checkbox-CX0LgsWP.js +148 -0
- package/dist/checkbox-DpbKHANK.cjs +53 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-BUL2H8rr.js +89 -0
- package/dist/chip-group-CpcjGoRm.cjs +26 -0
- package/dist/chip-group.cjs +1 -0
- package/dist/chip-group.js +4 -0
- package/dist/{combobox-BV4AKTqp.cjs → combobox-BmIFPk8X.cjs} +29 -23
- package/dist/{combobox-CTqEZUg6.js → combobox-jak7Ac1m.js} +192 -142
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{datepicker-tJbIvNpy.js → datepicker-BgysIOZI.js} +2 -2
- package/dist/{datepicker-BCNJROwD.cjs → datepicker-DOBmbxlo.cjs} +1 -1
- package/dist/datepicker.cjs +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/{drawer-g6mHdpjF.cjs → drawer-3nyjAkcS.cjs} +2 -2
- package/dist/{drawer-CRB8UUAo.js → drawer-CE9zzllI.js} +2 -2
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.js +1 -1
- package/dist/index.cjs +11 -7
- package/dist/index.d.ts +2 -0
- package/dist/index.js +182 -118
- package/dist/index.umd.js +137 -85
- package/dist/{input-Tkm7VBBl.cjs → input-CQS0LzF-.cjs} +1 -1
- package/dist/{input-BUX_2G5m.js → input-CeF3YJk-.js} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/left-menu.cjs +1 -1
- package/dist/left-menu.js +1 -1
- package/dist/{leftmenu-Cf2gC2J0.js → leftmenu-CmWvnA6L.js} +3 -3
- package/dist/{leftmenu-D0sRExqr.cjs → leftmenu-p9aR2QTy.cjs} +1 -1
- package/dist/{modal-Cfa0imdF.js → modal-DUIv_yoo.js} +2 -2
- package/dist/{modal-DFnpqdWX.cjs → modal-dUnnHe8u.cjs} +2 -2
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/molecules/Chip/chip-group.d.ts +29 -0
- package/dist/molecules/Chip/index.d.ts +2 -0
- package/dist/molecules/InputGroup/index.d.ts +1 -0
- package/dist/molecules/InputGroup/input-group.d.ts +40 -0
- package/dist/organisms/Combobox/combobox.d.ts +11 -0
- package/dist/organisms/Tab/tab.d.ts +13 -1
- package/dist/{pagination-BLNrwUSO.js → pagination-B7jknoOz.js} +2 -2
- package/dist/{pagination-AclB9qi1.cjs → pagination-BkqbWBOn.cjs} +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/{popover-DhEvLuOo.cjs → popover-CYDoeLKp.cjs} +1 -1
- package/dist/{popover-BSfKsQni.js → popover-DDaG8MSj.js} +27 -27
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/tab-CDMcFHvP.cjs +41 -0
- package/dist/tab-CuBCFGoO.js +204 -0
- package/dist/tab.cjs +1 -1
- package/dist/tab.js +1 -1
- package/dist/{text-area-coWx4Xn-.js → text-area-C73JxnqH.js} +1 -1
- package/dist/{text-area-DCBCDtJw.cjs → text-area-Cprb-azV.cjs} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{timepicker-WxA2Uo66.cjs → timepicker-CLJKWWGm.cjs} +1 -1
- package/dist/{timepicker-rNyKCfN3.js → timepicker-DMzGYd0p.js} +2 -2
- package/dist/timepicker.cjs +1 -1
- package/dist/timepicker.js +1 -1
- package/dist/{toast-container-B9E_mVk6.cjs → toast-container-6t6yEP9Y.cjs} +2 -2
- package/dist/{toast-container-Cb0MduXt.js → toast-container-B5v74b_5.js} +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.js +1 -1
- package/dist/{tree-menu-CufITiv_.js → tree-menu-CkOPxr-W.js} +1 -1
- package/dist/{tree-menu-DuJuy5pp.cjs → tree-menu-WNwZMreD.cjs} +1 -1
- package/dist/tree-menu.cjs +1 -1
- package/dist/tree-menu.js +1 -1
- package/dist/ui-icon-BMJNdIOq.js +71 -0
- package/dist/ui-icon-DIucAQC_.cjs +22 -0
- package/package.json +11 -1
- package/dist/checkbox-CdDTRdKV.cjs +0 -37
- package/dist/checkbox-g6kl2jGR.js +0 -119
- package/dist/tab-BmrITzOL.cjs +0 -40
- package/dist/tab-Ca_OyNqQ.js +0 -176
- package/dist/ui-icon-Ctn4nGFa.js +0 -70
- package/dist/ui-icon-jKyMV1zp.cjs +0 -22
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { unsafeCSS as _, css as u, LitElement as v, nothing as b, html as d } from "lit";
|
|
2
|
+
import { property as c, state as h, query as f, customElement as g } from "lit/decorators.js";
|
|
3
|
+
const m = ".tab{width:100%;font-family:var(--font-family-base)}.tab__list{display:flex;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--color-border);scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab__list::-webkit-scrollbar{display:none}.tab__button{display:inline-flex;flex-direction:row;align-items:center;gap:var(--spacing-2);padding:var(--spacing-3) var(--spacing-4);min-width:120px;position:relative;cursor:pointer;border:none;border-bottom:2px solid transparent;background:transparent;font-family:var(--font-family-base);white-space:nowrap;transition:background-color var(--transition-speed-base) var(--transition-timing),border-color var(--transition-speed-base) var(--transition-timing)}.tab__button:hover:not(.tab__button--disabled):not(.tab__button--active){background-color:var(--color-light)}.tab__button--active{border-bottom-color:var(--color-primary)}.tab__button--disabled{cursor:not-allowed;opacity:.4;pointer-events:none}.tab__icon{font-size:var(--font-size-xl);flex-shrink:0;color:inherit;line-height:1}.tab__content{display:flex;flex-direction:column;align-items:flex-start}.tab__label{font-weight:var(--font-weight-medium);font-size:var(--font-size-sm);color:var(--color-body-text)}.tab__label--inactive{color:var(--color-tertiary)}.tab__description{font-size:var(--font-size-xs);text-align:left;color:var(--color-tertiary)}.tab__description--active{color:var(--color-secondary)}.tab__panel{padding:var(--spacing-4);outline:none}.tab__panel--hidden{display:none}.tab--segmented .tab__list{display:inline-flex;position:relative;border-bottom:none;background-color:var(--color-light);border-radius:var(--radius-base);padding:0;gap:0;overflow:visible}.tab__segment-pill{position:absolute;top:0;bottom:0;left:0;width:0;background-color:var(--color-white, #ffffff);border:1px solid var(--color-border);border-radius:var(--radius-base);pointer-events:none;z-index:0;transition:transform .22s cubic-bezier(.35,0,.25,1),width .22s cubic-bezier(.35,0,.25,1)}.tab--segmented .tab__button{position:relative;z-index:1;min-width:unset;height:32px;padding:var(--spacing-1) var(--spacing-3);border:1px solid transparent;border-bottom:1px solid transparent;border-radius:var(--radius-base);background:transparent;transition:color var(--transition-speed-base) var(--transition-timing)}.tab--segmented .tab__button:hover:not(.tab__button--disabled):not(.tab__button--active){background-color:transparent}.tab--segmented .tab__button--active{background-color:transparent;border-color:transparent}.tab--segmented .tab__label{color:var(--color-secondary);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:20px;letter-spacing:-.14px}.tab--segmented .tab__label--inactive{color:var(--color-secondary)}.tab--segmented .tab__button--active .tab__label,.tab--segmented .tab__button--active .tab__label--inactive{color:var(--color-primary)}.tab--segmented .tab__icon{color:inherit;font-size:var(--font-size-base)}.tab--segmented .tab__panels{margin-top:var(--spacing-3)}.tab--segmented .tab__panel{padding:0}";
|
|
4
|
+
var y = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (t, i, e, a) => {
|
|
5
|
+
for (var s = a > 1 ? void 0 : a ? w(i, e) : i, o = t.length - 1, r; o >= 0; o--)
|
|
6
|
+
(r = t[o]) && (s = (a ? r(i, e, s) : r(s)) || s);
|
|
7
|
+
return a && s && y(i, e, s), s;
|
|
8
|
+
};
|
|
9
|
+
let n = class extends v {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.tabs = [], this.activeTab = "", this.lazy = !0, this.variant = "default", this._focusedIndex = 0, this._renderedTabs = /* @__PURE__ */ new Set(), this._pillInitialized = !1;
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
super.connectedCallback(), !this.activeTab && this.tabs.length > 0 && (this.activeTab = this.tabs[0].id);
|
|
15
|
+
}
|
|
16
|
+
disconnectedCallback() {
|
|
17
|
+
super.disconnectedCallback(), this._pillResizeObserver?.disconnect(), this._pillResizeObserver = void 0;
|
|
18
|
+
}
|
|
19
|
+
willUpdate(t) {
|
|
20
|
+
if (super.willUpdate(t), t.has("activeTab") && this.activeTab) {
|
|
21
|
+
this._renderedTabs.add(this.activeTab);
|
|
22
|
+
const i = this.tabs.findIndex((e) => e.id === this.activeTab);
|
|
23
|
+
i !== -1 && (this._focusedIndex = i);
|
|
24
|
+
}
|
|
25
|
+
t.has("tabs") && this.tabs.length > 0 && (this.tabs.some((e) => e.id === this.activeTab) || (this.activeTab = this.tabs[0].id), this._focusedIndex = this.tabs.findIndex((e) => e.id === this.activeTab));
|
|
26
|
+
}
|
|
27
|
+
// ==================== EVENTS ====================
|
|
28
|
+
handleTabClick(t, i) {
|
|
29
|
+
if (i) return;
|
|
30
|
+
const e = this.activeTab;
|
|
31
|
+
this.activeTab = t, this._focusedIndex = this.tabs.findIndex((a) => a.id === t), this.dispatchEvent(
|
|
32
|
+
new CustomEvent("tab-change", {
|
|
33
|
+
detail: { oldTab: e, newTab: t },
|
|
34
|
+
bubbles: !0,
|
|
35
|
+
composed: !0
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
handleKeyDown(t) {
|
|
40
|
+
const { tabs: i } = this;
|
|
41
|
+
if (i.filter((s) => !s.disabled).length === 0) return;
|
|
42
|
+
let e = this._focusedIndex;
|
|
43
|
+
const a = this._focusedIndex;
|
|
44
|
+
switch (t.key) {
|
|
45
|
+
case "ArrowLeft":
|
|
46
|
+
t.preventDefault();
|
|
47
|
+
do
|
|
48
|
+
e = e > 0 ? e - 1 : i.length - 1;
|
|
49
|
+
while (i[e]?.disabled && e !== a);
|
|
50
|
+
break;
|
|
51
|
+
case "ArrowRight":
|
|
52
|
+
t.preventDefault();
|
|
53
|
+
do
|
|
54
|
+
e = e < i.length - 1 ? e + 1 : 0;
|
|
55
|
+
while (i[e]?.disabled && e !== a);
|
|
56
|
+
break;
|
|
57
|
+
case "Home":
|
|
58
|
+
for (t.preventDefault(), e = 0; i[e]?.disabled && e < i.length - 1; ) e++;
|
|
59
|
+
break;
|
|
60
|
+
case "End":
|
|
61
|
+
for (t.preventDefault(), e = i.length - 1; i[e]?.disabled && e > 0; ) e--;
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (e !== this._focusedIndex && !i[e]?.disabled) {
|
|
67
|
+
const s = this.activeTab;
|
|
68
|
+
this._focusedIndex = e, this.activeTab = i[e].id, this.updateComplete.then(() => {
|
|
69
|
+
this.shadowRoot?.querySelector(
|
|
70
|
+
`[role="tab"][data-tab-id="${i[e].id}"]`
|
|
71
|
+
)?.focus();
|
|
72
|
+
}), this.dispatchEvent(
|
|
73
|
+
new CustomEvent("tab-change", {
|
|
74
|
+
detail: { oldTab: s, newTab: i[e].id },
|
|
75
|
+
bubbles: !0,
|
|
76
|
+
composed: !0
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
updated(t) {
|
|
82
|
+
super.updated(t), this.variant === "segmented" && (this._ensurePillObserver(), this._updateSegmentPill());
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Observe the tablist so the pill is repositioned whenever the list gains or
|
|
86
|
+
* changes size — this covers the cases where the first render happens while
|
|
87
|
+
* the tab is hidden (nested/lazy panels) or before web fonts load, when
|
|
88
|
+
* layout measurements would otherwise be 0 / stale.
|
|
89
|
+
*/
|
|
90
|
+
_ensurePillObserver() {
|
|
91
|
+
if (this._pillResizeObserver) return;
|
|
92
|
+
const t = this.shadowRoot?.querySelector(".tab__list");
|
|
93
|
+
!t || typeof ResizeObserver > "u" || (this._pillResizeObserver = new ResizeObserver(() => this._updateSegmentPill()), this._pillResizeObserver.observe(t));
|
|
94
|
+
}
|
|
95
|
+
_updateSegmentPill() {
|
|
96
|
+
const t = this.shadowRoot?.querySelector(".tab__segment-pill"), i = this.shadowRoot?.querySelector(".tab__button--active"), e = this.shadowRoot?.querySelector(".tab__list");
|
|
97
|
+
if (!t || !i || !e) return;
|
|
98
|
+
const a = e.getBoundingClientRect(), s = i.getBoundingClientRect();
|
|
99
|
+
if (s.width === 0) return;
|
|
100
|
+
const o = parseFloat(getComputedStyle(e).paddingLeft) || 0, r = s.left - a.left - e.clientLeft - o + e.scrollLeft, p = s.width;
|
|
101
|
+
this._pillInitialized ? (t.style.transform = `translateX(${r}px)`, t.style.width = `${p}px`) : (t.style.transition = "none", t.style.transform = `translateX(${r}px)`, t.style.width = `${p}px`, requestAnimationFrame(() => {
|
|
102
|
+
t.style.transition = "";
|
|
103
|
+
}), this._pillInitialized = !0);
|
|
104
|
+
}
|
|
105
|
+
scrollTabIntoView(t) {
|
|
106
|
+
this.updateComplete.then(() => {
|
|
107
|
+
const i = this.shadowRoot?.querySelector(
|
|
108
|
+
`[role="tab"][data-tab-id="${t}"]`
|
|
109
|
+
);
|
|
110
|
+
if (i && this.tablist) {
|
|
111
|
+
const e = this.tablist.getBoundingClientRect(), a = i.getBoundingClientRect();
|
|
112
|
+
a.left < e.left ? this.tablist.scrollLeft -= e.left - a.left + 16 : a.right > e.right && (this.tablist.scrollLeft += a.right - e.right + 16);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// ==================== RENDER ====================
|
|
117
|
+
renderTabButton(t, i) {
|
|
118
|
+
const e = this.activeTab === t.id, a = this._focusedIndex === i, s = [
|
|
119
|
+
"tab__button",
|
|
120
|
+
e ? "tab__button--active" : "",
|
|
121
|
+
t.disabled ? "tab__button--disabled" : ""
|
|
122
|
+
].filter(Boolean).join(" "), o = ["tab__label", e ? "" : "tab__label--inactive"].filter(Boolean).join(" "), r = ["tab__description", e ? "tab__description--active" : ""].filter(Boolean).join(" ");
|
|
123
|
+
return d`
|
|
124
|
+
<button
|
|
125
|
+
role="tab"
|
|
126
|
+
class=${s}
|
|
127
|
+
data-tab-id=${t.id}
|
|
128
|
+
aria-selected=${e ? "true" : "false"}
|
|
129
|
+
aria-controls="panel-${t.id}"
|
|
130
|
+
tabindex=${e || a ? "0" : "-1"}
|
|
131
|
+
?disabled=${t.disabled}
|
|
132
|
+
@click=${() => this.handleTabClick(t.id, t.disabled)}
|
|
133
|
+
@focus=${() => this.scrollTabIntoView(t.id)}
|
|
134
|
+
>
|
|
135
|
+
${t.icon ? d`<i class="${t.icon} tab__icon"></i>` : b}
|
|
136
|
+
<div class="tab__content">
|
|
137
|
+
<span class=${o}>${t.label}</span>
|
|
138
|
+
${t.description ? d`<span class=${r}>${t.description}</span>` : b}
|
|
139
|
+
</div>
|
|
140
|
+
</button>
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
renderTabPanel(t) {
|
|
144
|
+
const i = this.activeTab === t.id;
|
|
145
|
+
if (!(!this.lazy || this._renderedTabs.has(t.id))) return b;
|
|
146
|
+
const a = ["tab__panel", i ? "" : "tab__panel--hidden"].filter(Boolean).join(" ");
|
|
147
|
+
return d`
|
|
148
|
+
<div
|
|
149
|
+
role="tabpanel"
|
|
150
|
+
id="panel-${t.id}"
|
|
151
|
+
aria-labelledby="tab-${t.id}"
|
|
152
|
+
class=${a}
|
|
153
|
+
tabindex="0"
|
|
154
|
+
>
|
|
155
|
+
<slot name=${`panel-${t.id}`}>
|
|
156
|
+
${typeof t.content == "string" ? d`${t.content}` : b}
|
|
157
|
+
</slot>
|
|
158
|
+
</div>
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
return d`
|
|
163
|
+
<div class="tab tab--${this.variant}">
|
|
164
|
+
<div role="tablist" aria-label="Tabs" class="tab__list" @keydown=${this.handleKeyDown}>
|
|
165
|
+
${this.variant === "segmented" ? d`<span class="tab__segment-pill" aria-hidden="true"></span>` : b}
|
|
166
|
+
${this.tabs.map((t, i) => this.renderTabButton(t, i))}
|
|
167
|
+
</div>
|
|
168
|
+
<div class="tab__panels">${this.tabs.map((t) => this.renderTabPanel(t))}</div>
|
|
169
|
+
</div>
|
|
170
|
+
`;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
n.styles = [
|
|
174
|
+
u`
|
|
175
|
+
${_(m)}
|
|
176
|
+
`
|
|
177
|
+
];
|
|
178
|
+
l([
|
|
179
|
+
c({ type: Array })
|
|
180
|
+
], n.prototype, "tabs", 2);
|
|
181
|
+
l([
|
|
182
|
+
c({ type: String })
|
|
183
|
+
], n.prototype, "activeTab", 2);
|
|
184
|
+
l([
|
|
185
|
+
c({ type: Boolean })
|
|
186
|
+
], n.prototype, "lazy", 2);
|
|
187
|
+
l([
|
|
188
|
+
c({ type: String })
|
|
189
|
+
], n.prototype, "variant", 2);
|
|
190
|
+
l([
|
|
191
|
+
h()
|
|
192
|
+
], n.prototype, "_focusedIndex", 2);
|
|
193
|
+
l([
|
|
194
|
+
h()
|
|
195
|
+
], n.prototype, "_renderedTabs", 2);
|
|
196
|
+
l([
|
|
197
|
+
f('[role="tablist"]')
|
|
198
|
+
], n.prototype, "tablist", 2);
|
|
199
|
+
n = l([
|
|
200
|
+
g("logosphere-tab")
|
|
201
|
+
], n);
|
|
202
|
+
export {
|
|
203
|
+
n as L
|
|
204
|
+
};
|
package/dist/tab.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tab-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tab-CDMcFHvP.cjs");Object.defineProperty(exports,"LogosphereTab",{enumerable:!0,get:()=>e.LogosphereTab});
|
package/dist/tab.js
CHANGED
|
@@ -2,7 +2,7 @@ import { unsafeCSS as c, css as y, LitElement as m, nothing as n, html as u } fr
|
|
|
2
2
|
import { query as _, property as i, state as d, customElement as x } from "lit/decorators.js";
|
|
3
3
|
import { live as g } from "lit/directives/live.js";
|
|
4
4
|
import "./formfield-O327HYt0.js";
|
|
5
|
-
import "./ui-icon-
|
|
5
|
+
import "./ui-icon-BMJNdIOq.js";
|
|
6
6
|
const f = ".textarea__wrap{position:relative;flex:1;min-width:0}.textarea__field{display:block;width:100%;background:transparent;border:none;outline:none;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);box-sizing:border-box}.textarea__field::placeholder{color:var(--color-tertiary)}.textarea__field:disabled{cursor:not-allowed}.textarea__field--resize-none{resize:none}.textarea__field--resize-vertical{resize:vertical}.textarea__field--resize-horizontal{resize:horizontal}.textarea__field--resize-both{resize:both}.textarea__field--auto-resize{resize:none;overflow:hidden}.textarea__counter{position:absolute;bottom:5px;right:18px;font-size:11px;font-weight:var(--font-weight-medium);line-height:1rem;letter-spacing:-.11px;color:var(--color-secondary);background-color:var(--color-light-bg-2);border-radius:var(--radius-sm, 4px);padding:0 var(--spacing-1);white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none}.textarea__wrap--no-grip .textarea__counter{right:4px}.textarea__clear-btn{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;outline:none;line-height:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.textarea__clear-btn:hover{color:var(--color-body-text)}";
|
|
7
7
|
var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, r = (e, a, s, o) => {
|
|
8
8
|
for (var l = o > 1 ? void 0 : o ? b(a, s) : a, h = e.length - 1, p; h >= 0; h--)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("lit"),t=require("lit/decorators.js"),p=require("lit/directives/live.js");require("./formfield-CRcyUMvQ.cjs");require("./ui-icon-
|
|
1
|
+
"use strict";const i=require("lit"),t=require("lit/decorators.js"),p=require("lit/directives/live.js");require("./formfield-CRcyUMvQ.cjs");require("./ui-icon-DIucAQC_.cjs");const u=".textarea__wrap{position:relative;flex:1;min-width:0}.textarea__field{display:block;width:100%;background:transparent;border:none;outline:none;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);box-sizing:border-box}.textarea__field::placeholder{color:var(--color-tertiary)}.textarea__field:disabled{cursor:not-allowed}.textarea__field--resize-none{resize:none}.textarea__field--resize-vertical{resize:vertical}.textarea__field--resize-horizontal{resize:horizontal}.textarea__field--resize-both{resize:both}.textarea__field--auto-resize{resize:none;overflow:hidden}.textarea__counter{position:absolute;bottom:5px;right:18px;font-size:11px;font-weight:var(--font-weight-medium);line-height:1rem;letter-spacing:-.11px;color:var(--color-secondary);background-color:var(--color-light-bg-2);border-radius:var(--radius-sm, 4px);padding:0 var(--spacing-1);white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none}.textarea__wrap--no-grip .textarea__counter{right:4px}.textarea__clear-btn{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;outline:none;line-height:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.textarea__clear-btn:hover{color:var(--color-body-text)}";var d=Object.defineProperty,c=Object.getOwnPropertyDescriptor,r=(n,e,a,s)=>{for(var o=s>1?void 0:s?c(e,a):e,l=n.length-1,h;l>=0;l--)(h=n[l])&&(o=(s?h(e,a,o):h(o))||o);return s&&o&&d(e,a,o),o};exports.TextArea=class extends i.LitElement{constructor(){super(...arguments),this.value="",this.placeholder="",this.name="",this.autocomplete="",this.rows=3,this.maxRows=8,this.wrap="soft",this.resize="vertical",this.autoResize=!0,this.size="default",this.variant="default",this.label="",this.helper="",this.error="",this.required=!1,this.disabled=!1,this.readonly=!1,this._internalError="",this._charCount=0,this.handleInput=e=>{const a=e.target;this.value=a.value,this._charCount=this.value.length,this.autoResize&&this.adjustHeight(),this._internalError&&(this._internalError="",this._textareaElement.setCustomValidity("")),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}}))},this.handleChange=e=>{const a=e.target;this.value=a.value,a.checkValidity()||(this._internalError=a.validationMessage),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}}))},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("keydown",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleKeyUp=e=>{this.dispatchEvent(new CustomEvent("keyup",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleClear=()=>{this.value="",this._charCount=0,this._textareaElement&&(this._textareaElement.value="",this.autoResize&&this.adjustHeight()),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:"",originalEvent:null}}))}}get textareaElement(){return this._textareaElement}focus(){this._textareaElement?.focus()}blur(){this._textareaElement?.blur()}select(){this._textareaElement?.select()}setSelectionRange(e,a,s){this._textareaElement?.setSelectionRange(e,a,s)}checkValidity(){return this._textareaElement?.checkValidity()??!0}reportValidity(){return this._textareaElement?.reportValidity()??!0}setCustomValidity(e){this._textareaElement?.setCustomValidity(e),this._internalError=e,this.requestUpdate()}adjustHeight(){if(!this.autoResize||!this._textareaElement)return;const e=this._textareaElement;e.style.height="",e.style.overflow="hidden";const a=e.scrollHeight;if(a!==0){if(this.maxRows>0){const s=parseFloat(getComputedStyle(e).lineHeight)||20,o=Math.round(s*this.maxRows);if(a>=o){e.style.height=`${o}px`,e.style.overflow="auto";return}}e.style.height=`${a}px`}}getResizeClass(){return this.autoResize?"textarea__field--auto-resize":{none:"textarea__field--resize-none",vertical:"textarea__field--resize-vertical",horizontal:"textarea__field--resize-horizontal",both:"textarea__field--resize-both"}[this.resize]}firstUpdated(){this._charCount=this.value.length,this.autoResize&&requestAnimationFrame(()=>this.adjustHeight())}updated(e){super.updated(e),e.has("value")&&(this._charCount=this.value.length,this.autoResize&&this.adjustHeight())}getWrapClass(){return this.autoResize||this.resize==="none"?"textarea__wrap textarea__wrap--no-grip":"textarea__wrap"}render(){const e=this.error||this._internalError,a=!!this.value&&!this.disabled&&!this.readonly,s=this.maxlength!=null,o=`textarea__field ${this.getResizeClass()}`;return i.html`
|
|
2
2
|
<logosphere-formfield
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helper=${this.helper}
|
package/dist/textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text-area-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text-area-Cprb-azV.cjs");Object.defineProperty(exports,"TextArea",{enumerable:!0,get:()=>e.TextArea});
|
package/dist/textarea.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("lit"),t=require("lit/decorators.js"),l=require("@popperjs/core");require("./input-
|
|
1
|
+
"use strict";const a=require("lit"),t=require("lit/decorators.js"),l=require("@popperjs/core");require("./input-CQS0LzF-.cjs");require("./ui-icon-DIucAQC_.cjs");const u=":host{display:block;width:100%}.timepicker__reference{display:block;width:100%}.timepicker__trigger{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;height:100%;min-height:32px;outline:none;border-radius:0 var(--radius-base) var(--radius-base) 0;transition:color var(--transition-speed-fast) var(--transition-timing),background-color var(--transition-speed-fast) var(--transition-timing)}.timepicker__trigger:hover{color:var(--color-body-text);background-color:var(--color-body-bg-hover)}.timepicker__trigger--active{color:var(--color-body-text)}.timepicker__trigger:disabled{pointer-events:none;opacity:.4}.timepicker__popup[popover]{position:fixed;inset:unset;margin:0;padding:0;border:none;width:240px;background-color:var(--color-body-bg);border-radius:12px;box-shadow:0 4px 16px #7878783d;overflow:hidden;z-index:var(--z-index-dropdown, 1000)}.timepicker__spinner{display:flex;flex-direction:row;align-items:stretch;padding:var(--spacing-1) var(--spacing-2)}.timepicker__col{flex:1;display:flex;flex-direction:column;padding:0px var(--spacing-5)}.timepicker__col--left{align-items:flex-start}.timepicker__col--right{align-items:flex-end}.timepicker__col--sep{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 var(--spacing-1)}.timepicker__spin-btn{height:32px;display:flex;align-items:center;justify-content:center;border:none;padding:var(--spacing-2);background:transparent;color:var(--color-secondary);border-radius:var(--radius-base);cursor:pointer;outline:none;box-sizing:border-box;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__spin-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__spin-btn:active{background-color:var(--color-body-bg-active)}.timepicker__time-unit{height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);text-align:center;box-sizing:border-box;padding:var(--spacing-2)}.timepicker__colon{height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;font-family:var(--font-family-base);font-weight:var(--font-weight-medium);color:var(--color-secondary)}.timepicker__actions{display:flex;align-items:center;padding:var(--spacing-2);border-top:1px solid var(--color-border);gap:var(--spacing-1)}.timepicker__action-btn{flex:1 0 0;min-width:0;height:32px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-secondary);border-radius:var(--radius-full);cursor:pointer;padding:var(--spacing-2);outline:none;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__action-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__action-btn:active{background-color:var(--color-body-bg-active)}";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,i=(p,e,r,o)=>{for(var s=o>1?void 0:o?d(e,r):e,n=p.length-1,c;n>=0;n--)(c=p[n])&&(s=(o?c(e,r,s):c(s))||s);return o&&s&&h(e,r,s),s};exports.TimePicker=class extends a.LitElement{constructor(){super(...arguments),this.value="",this.label="",this.helper="",this.error="",this.placeholder="__:__",this.required=!1,this.disabled=!1,this.readonly=!1,this.size="default",this.variant="default",this._isOpen=!1,this._hour=0,this._minute=0,this._handleOutsideClick=e=>{this._isOpen&&!e.composedPath().includes(this)&&(this._isOpen=!1)},this._handleInputChange=e=>{e.stopPropagation();const r=e.detail?.value??"";if(/^\d{2}:\d{2}$/.test(r)){const[o,s]=this._parseValue(r);this._hour=o,this._minute=s;const n=`${this._pad(o)}:${this._pad(s)}`;this.value=n,this._emit(n)}},this._handleInputClear=e=>{e.stopPropagation(),this.value="",this._hour=0,this._minute=0,this._emit(""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this._isOpen=!1},this._incrementHour=()=>{this._hour=(this._hour+1)%24,this._syncValue()},this._decrementHour=()=>{this._hour=(this._hour-1+24)%24,this._syncValue()},this._incrementMinute=()=>{this._minute=(this._minute+1)%60,this._syncValue()},this._decrementMinute=()=>{this._minute=(this._minute-1+60)%60,this._syncValue()}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick),this._destroyPopper()}willUpdate(e){if(e.has("value")&&/^\d{1,2}:\d{2}$/.test(this.value)){const[r,o]=this._parseValue(this.value);this._hour=r,this._minute=o}}updated(e){e.has("_isOpen")&&(this._isOpen?this.updateComplete.then(()=>{this._showPopover(),this._updatePopper()}):(this._hidePopover(),this._destroyPopper()))}_parseValue(e){const r=e.match(/^(\d{1,2}):(\d{2})$/);return r?[Math.min(23,Math.max(0,parseInt(r[1],10))),Math.min(59,Math.max(0,parseInt(r[2],10)))]:[0,0]}_pad(e){return String(e).padStart(2,"0")}_updatePopper(){!this._referenceEl||!this._popupEl||(this._popperInstance=l.createPopper(this._referenceEl,this._popupEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start"]}},{name:"preventOverflow",options:{boundary:document.documentElement,padding:8}}]}))}_destroyPopper(){this._popperInstance?.destroy(),this._popperInstance=void 0}_showPopover(){this._popupEl?.showPopover?.()}_hidePopover(){const e=this._popupEl;try{e?.hidePopover?.()}catch{}}_togglePopup(){if(!(this.disabled||this.readonly))if(this._isOpen)this._isOpen=!1;else{const[e,r]=this._parseValue(this.value);this._hour=e,this._minute=r,this._isOpen=!0}}_clearValue(e){e?.stopPropagation(),this.value="",this._hour=0,this._minute=0,this._emit(""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this._isOpen=!1}_setNow(){const e=new Date;this._hour=e.getHours(),this._minute=e.getMinutes(),this._syncValue()}_emit(e){this.onChange?.(e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:e}}))}_syncValue(){const e=`${this._pad(this._hour)}:${this._pad(this._minute)}`;this.value=e,this._emit(e)}_startSpin(e){e(),this._spinInterval=setInterval(e,120)}_stopSpin(){clearInterval(this._spinInterval),this._spinInterval=void 0}_renderPopup(){return a.html`
|
|
2
2
|
<div data-timepicker-popup popover="manual" class="timepicker__popup">
|
|
3
3
|
<div class="timepicker__spinner">
|
|
4
4
|
<!-- Sol sütun: saat -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { unsafeCSS as d, css as _, LitElement as m, html as h } from "lit";
|
|
2
2
|
import { property as s, state as c, query as u, customElement as v } from "lit/decorators.js";
|
|
3
3
|
import { createPopper as b } from "@popperjs/core";
|
|
4
|
-
import "./input-
|
|
5
|
-
import "./ui-icon-
|
|
4
|
+
import "./input-CeF3YJk-.js";
|
|
5
|
+
import "./ui-icon-BMJNdIOq.js";
|
|
6
6
|
const g = ":host{display:block;width:100%}.timepicker__reference{display:block;width:100%}.timepicker__trigger{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;height:100%;min-height:32px;outline:none;border-radius:0 var(--radius-base) var(--radius-base) 0;transition:color var(--transition-speed-fast) var(--transition-timing),background-color var(--transition-speed-fast) var(--transition-timing)}.timepicker__trigger:hover{color:var(--color-body-text);background-color:var(--color-body-bg-hover)}.timepicker__trigger--active{color:var(--color-body-text)}.timepicker__trigger:disabled{pointer-events:none;opacity:.4}.timepicker__popup[popover]{position:fixed;inset:unset;margin:0;padding:0;border:none;width:240px;background-color:var(--color-body-bg);border-radius:12px;box-shadow:0 4px 16px #7878783d;overflow:hidden;z-index:var(--z-index-dropdown, 1000)}.timepicker__spinner{display:flex;flex-direction:row;align-items:stretch;padding:var(--spacing-1) var(--spacing-2)}.timepicker__col{flex:1;display:flex;flex-direction:column;padding:0px var(--spacing-5)}.timepicker__col--left{align-items:flex-start}.timepicker__col--right{align-items:flex-end}.timepicker__col--sep{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 var(--spacing-1)}.timepicker__spin-btn{height:32px;display:flex;align-items:center;justify-content:center;border:none;padding:var(--spacing-2);background:transparent;color:var(--color-secondary);border-radius:var(--radius-base);cursor:pointer;outline:none;box-sizing:border-box;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__spin-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__spin-btn:active{background-color:var(--color-body-bg-active)}.timepicker__time-unit{height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);text-align:center;box-sizing:border-box;padding:var(--spacing-2)}.timepicker__colon{height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;font-family:var(--font-family-base);font-weight:var(--font-weight-medium);color:var(--color-secondary)}.timepicker__actions{display:flex;align-items:center;padding:var(--spacing-2);border-top:1px solid var(--color-border);gap:var(--spacing-1)}.timepicker__action-btn{flex:1 0 0;min-width:0;height:32px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-secondary);border-radius:var(--radius-full);cursor:pointer;padding:var(--spacing-2);outline:none;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__action-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__action-btn:active{background-color:var(--color-body-bg-active)}";
|
|
7
7
|
var f = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (t, r, n, a) => {
|
|
8
8
|
for (var o = a > 1 ? void 0 : a ? y(r, n) : r, p = t.length - 1, l; p >= 0; p--)
|
package/dist/timepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./timepicker-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./timepicker-CLJKWWGm.cjs");Object.defineProperty(exports,"TimePicker",{enumerable:!0,get:()=>e.TimePicker});
|
package/dist/timepicker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("lit"),a=require("lit/decorators.js"),m=require("lit/directives/repeat.js");require("./ui-icon-
|
|
1
|
+
"use strict";const o=require("lit"),a=require("lit/decorators.js"),m=require("lit/directives/repeat.js");require("./ui-icon-DIucAQC_.cjs");require("./button-DRZ4sG4T.cjs");const d=".toast{position:relative;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;width:100%;box-sizing:border-box;border-radius:var(--radius-md);border-left:4px solid var(--toast-accent);background:#fff;box-shadow:var(--shadow-md);padding:var(--spacing-4);color:#3d3d3d;font-family:var(--font-family-base);animation:toast-enter .22s cubic-bezier(.2,.8,.2,1);transform-origin:top right}.toast__icon{display:inline-flex;margin-top:2px;color:var(--toast-accent)}.toast__content{min-width:0}.toast__title{margin:0;font-size:var(--font-size-lg);line-height:var(--line-height-tight);font-weight:var(--font-weight-semibold)}.toast__title--as-text{font-size:var(--font-size-base);line-height:var(--line-height-normal);font-weight:var(--font-weight-regular);color:#555}.toast__text{margin:4px 0 0;font-size:var(--font-size-base);line-height:var(--line-height-normal);color:#555}.toast__actions{display:flex;gap:10px;margin-top:12px}.toast__close{border:0;background:transparent;color:#5a5a5a;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;margin-top:2px}.toast__close:hover{color:#2f2f2f}.toast--success{--toast-accent: var(--color-success-active)}.toast--danger{--toast-accent: var(--color-danger-active)}.toast--warning{--toast-accent: var(--color-warning-active)}.toast--info{--toast-accent: var(--color-info-active)}.toast[data-closing=true]{pointer-events:none;animation:toast-exit .22s cubic-bezier(.4,0,1,1) forwards}@keyframes toast-enter{0%{opacity:0;transform:translate3d(18px,-8px,0) scale(.98)}to{opacity:1;transform:translateZ(0) scale(1)}}@keyframes toast-exit{0%{opacity:1;transform:translateZ(0) scale(1);max-height:240px;margin-bottom:0}to{opacity:0;transform:translate3d(20px,-6px,0) scale(.97);max-height:0;margin-bottom:-12px}}";var g=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(n,t,e,s)=>{for(var i=s>1?void 0:s?f(t,e):t,c=n.length-1,l;c>=0;c--)(l=n[c])&&(i=(s?l(t,e,i):l(i))||i);return s&&i&&g(t,e,i),i};const h=6e3,T=220,v={success:"uil-check-circle",danger:"uil-exclamation-octagon",warning:"uil-exclamation-triangle",info:"uil-info-circle"};exports.LogosphereToast=class extends o.LitElement{constructor(){super(...arguments),this.type="info",this.title="",this.text="",this.icon="",this.closeable=!0,this.duration=h,this.autoDismiss=!0,this.isClosing=!1,this.remainingMs=h,this.startedAt=0}connectedCallback(){super.connectedCallback(),this.remainingMs=this.duration,this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.clearTimer(),this.closeTimerId&&(clearTimeout(this.closeTimerId),this.closeTimerId=void 0)}updated(t){t.has("duration")&&(this.remainingMs=this.duration,this.restartTimer()),(t.has("action")||t.has("autoDismiss")||t.has("type"))&&this.restartTimer()}close(t="manual"){this.isClosing||(this.clearTimer(),this.isClosing=!0,this.closeTimerId=setTimeout(()=>{this.dispatchEvent(new CustomEvent("toast-close",{detail:{reason:t},bubbles:!0,composed:!0}))},T))}get canAutoDismiss(){return this.autoDismiss&&this.type!=="danger"&&!this.hasActions}get resolvedTitle(){return this.title||this.text}get resolvedText(){return this.title?this.text:""}get resolvedIcon(){return this.icon||v[this.type]}get hasActions(){return!!this.action}onActionClick(t){this.action&&(t==="okay"?this.action.onOkay?.():this.action.onCancel?.(),(this.action.closeOnAction??!0)&&this.close("manual"))}clearTimer(){this.timerId&&(clearTimeout(this.timerId),this.timerId=void 0)}startTimer(){this.clearTimer(),!(!this.canAutoDismiss||this.remainingMs<=0)&&(this.startedAt=Date.now(),this.timerId=setTimeout(()=>this.close("auto"),this.remainingMs))}pauseTimer(){this.timerId&&(this.clearTimer(),this.remainingMs=Math.max(0,this.remainingMs-(Date.now()-this.startedAt)))}resumeTimer(){this.canAutoDismiss&&this.startTimer()}restartTimer(){this.clearTimer(),this.startTimer()}render(){return o.html`
|
|
2
2
|
<article
|
|
3
3
|
class="toast toast--${this.type}"
|
|
4
4
|
data-closing=${this.isClosing?"true":"false"}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</article>
|
|
45
45
|
`}};exports.LogosphereToast.styles=[o.css`
|
|
46
46
|
${o.unsafeCSS(d)}
|
|
47
|
-
`];r([a.property({type:String})],exports.LogosphereToast.prototype,"type",2);r([a.property({type:String})],exports.LogosphereToast.prototype,"title",2);r([a.property({type:String})],exports.LogosphereToast.prototype,"text",2);r([a.property({type:String})],exports.LogosphereToast.prototype,"icon",2);r([a.property({type:Boolean})],exports.LogosphereToast.prototype,"closeable",2);r([a.property({type:Number})],exports.LogosphereToast.prototype,"duration",2);r([a.property({type:Boolean})],exports.LogosphereToast.prototype,"autoDismiss",2);r([a.property({attribute:!1})],exports.LogosphereToast.prototype,"action",2);r([a.state()],exports.LogosphereToast.prototype,"isClosing",2);exports.LogosphereToast=r([a.customElement("logosphere-toast")],exports.LogosphereToast);const b=":host{position:fixed;top:16px;right:16px;z-index:9999;width:min(420px,calc(100vw - 24px));box-sizing:border-box}.toast-container{display:flex;flex-direction:column;gap:12px}";var y=Object.defineProperty,x=Object.getOwnPropertyDescriptor,p=(n,t,e,s)=>{for(var i=s>1?void 0:s?x(t,e):t,c=n.length-1,l;c>=0;c--)(l=n[c])&&(i=(s?l(t,e,i):l(i))||i);return s&&i&&y(t,e,i),i};const u=4;exports.LogosphereToastContainer=class extends o.LitElement{constructor(){super(...arguments),this.visibleToasts=[],this.queuedToasts=[]}show(t){const e=this.toToast(t);return this.visibleToasts.length<u?(this.visibleToasts=[e,...this.visibleToasts],e.id):(this.queuedToasts.push(e),e.id)}close(t){const e=this.visibleToasts.findIndex(s=>s.id===t);if(e!==-1){const s=this.visibleToasts.slice();s.splice(e,1),this.visibleToasts=s,this.dequeue();return}this.queuedToasts=this.queuedToasts.filter(s=>s.id!==t)}clear(){this.visibleToasts=[],this.queuedToasts=[]}dequeue(){if(!this.queuedToasts.length||this.visibleToasts.length>=u)return;const t=this.queuedToasts.shift();t&&(this.visibleToasts=[t,...this.visibleToasts])}toToast(t){return{id:t.id||this.createId(),type:t.type||"info",title:t.title||"",text:t.text,icon:t.icon||"",closeable:t.closeable??!0,autoDismiss:t.autoDismiss??!0,duration:t.duration??6e3,action:t.action}}createId(){return`toast-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}render(){return o.html`
|
|
47
|
+
`];r([a.property({type:String})],exports.LogosphereToast.prototype,"type",2);r([a.property({type:String,attribute:"toast-title"})],exports.LogosphereToast.prototype,"title",2);r([a.property({type:String})],exports.LogosphereToast.prototype,"text",2);r([a.property({type:String})],exports.LogosphereToast.prototype,"icon",2);r([a.property({type:Boolean})],exports.LogosphereToast.prototype,"closeable",2);r([a.property({type:Number})],exports.LogosphereToast.prototype,"duration",2);r([a.property({type:Boolean})],exports.LogosphereToast.prototype,"autoDismiss",2);r([a.property({attribute:!1})],exports.LogosphereToast.prototype,"action",2);r([a.state()],exports.LogosphereToast.prototype,"isClosing",2);exports.LogosphereToast=r([a.customElement("logosphere-toast")],exports.LogosphereToast);const b=":host{position:fixed;top:16px;right:16px;z-index:9999;width:min(420px,calc(100vw - 24px));box-sizing:border-box}.toast-container{display:flex;flex-direction:column;gap:12px}";var y=Object.defineProperty,x=Object.getOwnPropertyDescriptor,p=(n,t,e,s)=>{for(var i=s>1?void 0:s?x(t,e):t,c=n.length-1,l;c>=0;c--)(l=n[c])&&(i=(s?l(t,e,i):l(i))||i);return s&&i&&y(t,e,i),i};const u=4;exports.LogosphereToastContainer=class extends o.LitElement{constructor(){super(...arguments),this.visibleToasts=[],this.queuedToasts=[]}show(t){const e=this.toToast(t);return this.visibleToasts.length<u?(this.visibleToasts=[e,...this.visibleToasts],e.id):(this.queuedToasts.push(e),e.id)}close(t){const e=this.visibleToasts.findIndex(s=>s.id===t);if(e!==-1){const s=this.visibleToasts.slice();s.splice(e,1),this.visibleToasts=s,this.dequeue();return}this.queuedToasts=this.queuedToasts.filter(s=>s.id!==t)}clear(){this.visibleToasts=[],this.queuedToasts=[]}dequeue(){if(!this.queuedToasts.length||this.visibleToasts.length>=u)return;const t=this.queuedToasts.shift();t&&(this.visibleToasts=[t,...this.visibleToasts])}toToast(t){return{id:t.id||this.createId(),type:t.type||"info",title:t.title||"",text:t.text,icon:t.icon||"",closeable:t.closeable??!0,autoDismiss:t.autoDismiss??!0,duration:t.duration??6e3,action:t.action}}createId(){return`toast-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}render(){return o.html`
|
|
48
48
|
<div class="toast-container" role="region" aria-label="Notifications">
|
|
49
49
|
${m.repeat(this.visibleToasts,t=>t.id,t=>o.html`
|
|
50
50
|
<logosphere-toast
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS as g, css as f, LitElement as v, nothing as p, html as h } from "lit";
|
|
2
2
|
import { property as n, state as b, customElement as T } from "lit/decorators.js";
|
|
3
3
|
import { repeat as y } from "lit/directives/repeat.js";
|
|
4
|
-
import "./ui-icon-
|
|
4
|
+
import "./ui-icon-BMJNdIOq.js";
|
|
5
5
|
import "./button-Uu9oaieg.js";
|
|
6
6
|
const _ = ".toast{position:relative;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;width:100%;box-sizing:border-box;border-radius:var(--radius-md);border-left:4px solid var(--toast-accent);background:#fff;box-shadow:var(--shadow-md);padding:var(--spacing-4);color:#3d3d3d;font-family:var(--font-family-base);animation:toast-enter .22s cubic-bezier(.2,.8,.2,1);transform-origin:top right}.toast__icon{display:inline-flex;margin-top:2px;color:var(--toast-accent)}.toast__content{min-width:0}.toast__title{margin:0;font-size:var(--font-size-lg);line-height:var(--line-height-tight);font-weight:var(--font-weight-semibold)}.toast__title--as-text{font-size:var(--font-size-base);line-height:var(--line-height-normal);font-weight:var(--font-weight-regular);color:#555}.toast__text{margin:4px 0 0;font-size:var(--font-size-base);line-height:var(--line-height-normal);color:#555}.toast__actions{display:flex;gap:10px;margin-top:12px}.toast__close{border:0;background:transparent;color:#5a5a5a;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;margin-top:2px}.toast__close:hover{color:#2f2f2f}.toast--success{--toast-accent: var(--color-success-active)}.toast--danger{--toast-accent: var(--color-danger-active)}.toast--warning{--toast-accent: var(--color-warning-active)}.toast--info{--toast-accent: var(--color-info-active)}.toast[data-closing=true]{pointer-events:none;animation:toast-exit .22s cubic-bezier(.4,0,1,1) forwards}@keyframes toast-enter{0%{opacity:0;transform:translate3d(18px,-8px,0) scale(.98)}to{opacity:1;transform:translateZ(0) scale(1)}}@keyframes toast-exit{0%{opacity:1;transform:translateZ(0) scale(1);max-height:240px;margin-bottom:0}to{opacity:0;transform:translate3d(20px,-6px,0) scale(.97);max-height:0;margin-bottom:-12px}}";
|
|
7
7
|
var $ = Object.defineProperty, w = Object.getOwnPropertyDescriptor, a = (t, e, s, r) => {
|
|
@@ -129,7 +129,7 @@ a([
|
|
|
129
129
|
n({ type: String })
|
|
130
130
|
], o.prototype, "type", 2);
|
|
131
131
|
a([
|
|
132
|
-
n({ type: String })
|
|
132
|
+
n({ type: String, attribute: "toast-title" })
|
|
133
133
|
], o.prototype, "title", 2);
|
|
134
134
|
a([
|
|
135
135
|
n({ type: String })
|
package/dist/toast.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./toast-container-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./toast-container-6t6yEP9Y.cjs");Object.defineProperty(exports,"LogosphereToast",{enumerable:!0,get:()=>e.LogosphereToast});Object.defineProperty(exports,"LogosphereToastContainer",{enumerable:!0,get:()=>e.LogosphereToastContainer});exports.ToastService=e.ToastService;
|
package/dist/toast.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS as p, css as _, LitElement as u, html as a, nothing as c } from "lit";
|
|
2
2
|
import { property as d, state as v, customElement as g } from "lit/decorators.js";
|
|
3
3
|
import { unsafeHTML as b } from "lit/directives/unsafe-html.js";
|
|
4
|
-
import "./ui-icon-
|
|
4
|
+
import "./ui-icon-BMJNdIOq.js";
|
|
5
5
|
const f = ".tree{width:100%;font-family:var(--font-family-base)}.tree__list,.tree__children{list-style:none;margin:0;padding:0}.tree__item{margin:0;padding:0}.tree__row{display:flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-2) var(--spacing-3);padding-left:calc(var(--spacing-3) + (var(--tree-level, 0) * 14px));border-radius:var(--radius-sm);color:var(--color-body-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.tree--icons .tree__row{justify-content:center;padding:0;width:44px;height:44px;min-height:44px;margin:0 auto}.tree__row:hover{background-color:var(--color-light)}.tree__row:focus-visible{outline:2px solid var(--color-secondary);outline-offset:1px}.tree__row--disabled{opacity:.5;cursor:not-allowed}.tree__row--active .tree__label,.tree__row--active .tree__icon{color:var(--color-primary)}.tree:not(.tree--icons) .tree__row--active{background-color:var(--color-light)}.tree__icon{width:20px;min-width:20px;display:inline-flex;align-items:center;justify-content:center;color:inherit}.tree--icons .tree__icon{width:20px;min-width:20px;height:20px}.tree--icons .tree__row--active{background-color:var(--color-primary)}.tree--icons .tree__row--active .tree__icon{color:#fff}.tree--icons .tree__row--active:hover{background-color:var(--color-primary-hover)}.tree__chevron-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;flex-shrink:0}.tree__chevron-btn--right{margin-left:auto}.tree__chevron{transform:rotate(-90deg);transition:transform var(--transition-speed-fast) var(--transition-timing)}.tree__chevron--open{transform:rotate(0)}.tree__chevron-spacer{width:20px;height:20px;flex-shrink:0}.tree__label{display:inline-flex;align-items:center;font-size:var(--font-size-sm);color:inherit}";
|
|
6
6
|
var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, l = (e, t, r, n) => {
|
|
7
7
|
for (var o = n > 1 ? void 0 : n ? x(t, r) : t, s = e.length - 1, h; s >= 0; s--)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("lit"),s=require("lit/decorators.js"),d=require("lit/directives/unsafe-html.js");require("./ui-icon-
|
|
1
|
+
"use strict";const r=require("lit"),s=require("lit/decorators.js"),d=require("lit/directives/unsafe-html.js");require("./ui-icon-DIucAQC_.cjs");const h=".tree{width:100%;font-family:var(--font-family-base)}.tree__list,.tree__children{list-style:none;margin:0;padding:0}.tree__item{margin:0;padding:0}.tree__row{display:flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-2) var(--spacing-3);padding-left:calc(var(--spacing-3) + (var(--tree-level, 0) * 14px));border-radius:var(--radius-sm);color:var(--color-body-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.tree--icons .tree__row{justify-content:center;padding:0;width:44px;height:44px;min-height:44px;margin:0 auto}.tree__row:hover{background-color:var(--color-light)}.tree__row:focus-visible{outline:2px solid var(--color-secondary);outline-offset:1px}.tree__row--disabled{opacity:.5;cursor:not-allowed}.tree__row--active .tree__label,.tree__row--active .tree__icon{color:var(--color-primary)}.tree:not(.tree--icons) .tree__row--active{background-color:var(--color-light)}.tree__icon{width:20px;min-width:20px;display:inline-flex;align-items:center;justify-content:center;color:inherit}.tree--icons .tree__icon{width:20px;min-width:20px;height:20px}.tree--icons .tree__row--active{background-color:var(--color-primary)}.tree--icons .tree__row--active .tree__icon{color:#fff}.tree--icons .tree__row--active:hover{background-color:var(--color-primary-hover)}.tree__chevron-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;flex-shrink:0}.tree__chevron-btn--right{margin-left:auto}.tree__chevron{transform:rotate(-90deg);transition:transform var(--transition-speed-fast) var(--transition-timing)}.tree__chevron--open{transform:rotate(0)}.tree__chevron-spacer{width:20px;height:20px;flex-shrink:0}.tree__label{display:inline-flex;align-items:center;font-size:var(--font-size-sm);color:inherit}";var p=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(c,e,t,n)=>{for(var i=n>1?void 0:n?_(e,t):e,l=c.length-1,o;l>=0;l--)(o=c[l])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&p(e,t,i),i};exports.TreeMenu=class extends r.LitElement{constructor(){super(...arguments),this.items=[],this.expandedIds=[],this.expandOnLabelClick=!0,this.chevronPosition="left",this.showLabels=!0,this.iconSize=16,this._expandedSet=new Set}willUpdate(e){e.has("expandedIds")&&(this._expandedSet=new Set(this.expandedIds??[]))}_isExpanded(e){return this._expandedSet.has(e)}_emitToggle(e,t){this.dispatchEvent(new CustomEvent("toggle",{detail:{item:e,expanded:t},bubbles:!0,composed:!0}))}_emitItemClick(e){this.dispatchEvent(new CustomEvent("item-click",{detail:{item:e},bubbles:!0,composed:!0}))}_emitNodeClick(e,t){this.dispatchEvent(new CustomEvent("node-click",{detail:{item:e,hasChildren:t},bubbles:!0,composed:!0}))}_setExpanded(e,t){t?this._expandedSet.add(e.id):this._expandedSet.delete(e.id),this.expandedIds=Array.from(this._expandedSet),this._emitToggle(e,t)}_toggle(e,t){t.stopPropagation(),!(e.disabled||!e.children?.length)&&this._setExpanded(e,!this._isExpanded(e.id))}_handleItemClick(e,t){if(t.stopPropagation(),e.disabled)return;const n=!!e.children?.length;if(this._emitNodeClick(e,n),n&&this.expandOnLabelClick){this._setExpanded(e,!this._isExpanded(e.id));return}n||(e.onClick?.(e),this._emitItemClick(e))}_handleRowKeydown(e,t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this._handleItemClick(e,t))}_renderIcon(e){return e.iconName?r.html`
|
|
2
2
|
<span class="tree__icon">
|
|
3
3
|
<ui-icon name=${e.iconName} .size=${this.iconSize}></ui-icon>
|
|
4
4
|
</span>
|
package/dist/tree-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tree-menu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tree-menu-WNwZMreD.cjs");Object.defineProperty(exports,"TreeMenu",{enumerable:!0,get:()=>e.TreeMenu});
|
package/dist/tree-menu.js
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { LitElement as w, css as g, html as l } from "lit";
|
|
2
|
+
import { unsafeHTML as o } from "lit/directives/unsafe-html.js";
|
|
3
|
+
const e = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"/></svg>', v = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.09814,12.63379,13,11.42285V7a1,1,0,0,0-2,0v5a.99985.99985,0,0,0,.5.86621l2.59814,1.5a1.00016,1.00016,0,1,0,1-1.73242ZM12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Z"/></svg>', n = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"/></svg>', h = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"/></svg>', i = '<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M12,19a1,1,0,1,0-1-1A1,1,0,0,0,12,19Zm5,0a1,1,0,1,0-1-1A1,1,0,0,0,17,19Zm0-4a1,1,0,1,0-1-1A1,1,0,0,0,17,15Zm-5,0a1,1,0,1,0-1-1A1,1,0,0,0,12,15ZM19,3H18V2a1,1,0,0,0-2,0V3H8V2A1,1,0,0,0,6,2V3H5A3,3,0,0,0,2,6V20a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V6A3,3,0,0,0,19,3Zm1,17a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V11H20ZM20,9H4V6A1,1,0,0,1,5,5H6V6A1,1,0,0,0,8,6V5h8V6a1,1,0,0,0,2,0V5h1a1,1,0,0,1,1,1ZM7,15a1,1,0,1,0-1-1A1,1,0,0,0,7,15Zm0,4a1,1,0,1,0-1-1A1,1,0,0,0,7,19Z"/></svg>', r = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,4H17V3a1,1,0,0,0-2,0V4H9V3A1,1,0,0,0,7,3V4H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V7A3,3,0,0,0,19,4Zm1,15a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V12H20Zm0-9H4V7A1,1,0,0,1,5,6H7V7A1,1,0,0,0,9,7V6h6V7a1,1,0,0,0,2,0V6h2a1,1,0,0,1,1,1Z"/></svg>', A = '<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17,11H9.41l3.3-3.29a1,1,0,1,0-1.42-1.42l-5,5a1,1,0,0,0-.21.33,1,1,0,0,0,0,.76,1,1,0,0,0,.21.33l5,5a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.41,13H17a1,1,0,0,0,0-2Z"/></svg>', p = '<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.92,11.62a1,1,0,0,0-.21-.33l-5-5a1,1,0,0,0-1.42,1.42L14.59,11H7a1,1,0,0,0,0,2h7.59l-3.3,3.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5-5a1,1,0,0,0,.21-.33A1,1,0,0,0,17.92,11.62Z"/></svg>', c = '<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.71,11.29l-5-5a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-5,5a1,1,0,0,0,1.42,1.42L11,9.41V17a1,1,0,0,0,2,0V9.41l3.29,3.3a1,1,0,0,0,1.42,0A1,1,0,0,0,17.71,11.29Z"/></svg>', m = '<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.71,11.29a1,1,0,0,0-1.42,0L13,14.59V7a1,1,0,0,0-2,0v7.59l-3.29-3.3a1,1,0,0,0-1.42,1.42l5,5a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l5-5A1,1,0,0,0,17.71,11.29Z"/></svg>', Z = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"/></svg>', x = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.29,12l3.54-3.54a1,1,0,0,0,0-1.41,1,1,0,0,0-1.42,0L9.17,11.29a1,1,0,0,0,0,1.42L13.41,17a1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41Z"/></svg>', H = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.83,11.29,10.59,7.05a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41L12.71,12,9.17,15.54a1,1,0,0,0,0,1.41,1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29l4.24-4.24A1,1,0,0,0,14.83,11.29Z"/></svg>', V = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.46,8.29a1,1,0,0,0-1.42,0l-3,3a1,1,0,0,0,0,1.42l3,3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.16,12l2.3-2.29A1,1,0,0,0,11.46,8.29ZM14.66,12,17,9.71a1,1,0,0,0-1.42-1.42l-3,3a1,1,0,0,0,0,1.42l3,3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"/></svg>', M = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.46,8.29A1,1,0,1,0,7,9.71L9.34,12,7,14.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l3-3a1,1,0,0,0,0-1.42Zm8.5,3-3-3a1,1,0,0,0-1.42,1.42L14.84,12l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l3-3A1,1,0,0,0,17,11.29Z"/></svg>', u = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20,6H16V5a3,3,0,0,0-3-3H11A3,3,0,0,0,8,5V6H4A1,1,0,0,0,4,8H5V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V8h1a1,1,0,0,0,0-2ZM10,5a1,1,0,0,1,1-1h2a1,1,0,0,1,1,1V6H10Zm7,14a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8H17Z"/></svg>', d = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.71,2.29a1,1,0,0,0-1.42,0L14.5,8.09V6.5a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54,1,1,0,0,0,.38.08h4a1,1,0,0,0,0-2H15.91l5.8-5.79A1,1,0,0,0,21.71,2.29ZM10.88,12.58a1,1,0,0,0-.38-.08h-4a1,1,0,0,0,0,2H8.09l-5.8,5.79a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5.79-5.8V17.5a1,1,0,0,0,2,0v-4a1,1,0,0,0-.08-.38A1,1,0,0,0,10.88,12.58Z"/></svg>', L = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.79,12.79,4,18.59V17a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54A1,1,0,0,0,3,22H7a1,1,0,0,0,0-2H5.41l5.8-5.79a1,1,0,0,0-1.42-1.42ZM21.92,2.62a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H17a1,1,0,0,0,0,2h1.59l-5.8,5.79a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V7a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z"/></svg>', B = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,8.94a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0A.88.88,0,0,0,14.05,2H10A3,3,0,0,0,7,5V6H6A3,3,0,0,0,3,9V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V18h1a3,3,0,0,0,3-3V9S21,9,21,8.94ZM15,5.41,17.59,8H16a1,1,0,0,1-1-1ZM15,19a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1V9A1,1,0,0,1,6,8H7v7a3,3,0,0,0,3,3h5Zm4-4a1,1,0,0,1-1,1H10a1,1,0,0,1-1-1V5a1,1,0,0,1,1-1h3V7a3,3,0,0,0,3,3h3Z"/></svg>', f = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.3,10.08A3,3,0,0,0,19,9H14.44L15,7.57A4.13,4.13,0,0,0,11.11,2a1,1,0,0,0-.91.59L7.35,9H5a3,3,0,0,0-3,3v7a3,3,0,0,0,3,3H17.73a3,3,0,0,0,2.95-2.46l1.27-7A3,3,0,0,0,21.3,10.08ZM7,20H5a1,1,0,0,1-1-1V12a1,1,0,0,1,1-1H7Zm13-7.82-1.27,7a1,1,0,0,1-1,.82H9V10.21l2.72-6.12A2.11,2.11,0,0,1,13.1,6.87L12.57,8.3A2,2,0,0,0,14.44,11H19a1,1,0,0,1,.77.36A1,1,0,0,1,20,12.18Z"/></svg>', y = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,2H6.27A3,3,0,0,0,3.32,4.46l-1.27,7A3,3,0,0,0,5,15H9.56L9,16.43A4.13,4.13,0,0,0,12.89,22a1,1,0,0,0,.91-.59L16.65,15H19a3,3,0,0,0,3-3V5A3,3,0,0,0,19,2ZM15,13.79l-2.72,6.12a2.13,2.13,0,0,1-1.38-2.78l.53-1.43A2,2,0,0,0,9.56,13H5a1,1,0,0,1-.77-.36A1,1,0,0,1,4,11.82l1.27-7a1,1,0,0,1,1-.82H15ZM20,12a1,1,0,0,1-1,1H17V4h2a1,1,0,0,1,1,1Z"/></svg>', C = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.71,12.71a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76,1,1,0,0,0-.21-.33l-3-3a1,1,0,0,0-1.42,1.42L12.59,11H9a1,1,0,0,0,0,2h3.59l-1.3,1.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0ZM22,12A10,10,0,1,0,12,22,10,10,0,0,0,22,12ZM4,12a8,8,0,1,1,8,8A8,8,0,0,1,4,12Z"/></svg>', b = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.92,11.6C19.9,6.91,16.1,4,12,4S4.1,6.91,2.08,11.6a1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20s7.9-2.91,9.92-7.6A1,1,0,0,0,21.92,11.6ZM12,18c-3.17,0-6.17-2.29-7.9-6C5.83,8.29,8.83,6,12,6s6.17,2.29,7.9,6C18.17,15.71,15.17,18,12,18ZM12,8a4,4,0,1,0,4,4A4,4,0,0,0,12,8Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14Z"/></svg>', k = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.94,6.08A6.93,6.93,0,0,1,12,6c3.18,0,6.17,2.29,7.91,6a15.23,15.23,0,0,1-.9,1.64,1,1,0,0,0-.16.55,1,1,0,0,0,1.86.5,15.77,15.77,0,0,0,1.21-2.3,1,1,0,0,0,0-.79C19.9,6.91,16.1,4,12,4a7.77,7.77,0,0,0-1.4.12,1,1,0,1,0,.34,2ZM3.71,2.29A1,1,0,0,0,2.29,3.71L5.39,6.8a14.62,14.62,0,0,0-3.31,4.8,1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20a9.26,9.26,0,0,0,5.05-1.54l3.24,3.25a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Zm6.36,9.19,2.45,2.45A1.81,1.81,0,0,1,12,14a2,2,0,0,1-2-2A1.81,1.81,0,0,1,10.07,11.48ZM12,18c-3.18,0-6.17-2.29-7.9-6A12.09,12.09,0,0,1,6.8,8.21L8.57,10A4,4,0,0,0,14,15.43L15.59,17A7.24,7.24,0,0,1,12,18Z"/></svg>', D = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"/></svg>', R = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,11H9.41l2.3-2.29a1,1,0,1,0-1.42-1.42l-4,4a1,1,0,0,0-.21.33,1,1,0,0,0,0,.76,1,1,0,0,0,.21.33l4,4a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.41,13H21a1,1,0,0,0,0-2ZM3,3A1,1,0,0,0,2,4V20a1,1,0,0,0,2,0V4A1,1,0,0,0,3,3Z"/></svg>', z = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.71,11.29l-4-4a1,1,0,1,0-1.42,1.42L14.59,11H3a1,1,0,0,0,0,2H14.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76A1,1,0,0,0,17.71,11.29ZM21,4a1,1,0,0,0-1,1V19a1,1,0,0,0,2,0V5A1,1,0,0,0,21,4Z"/></svg>', S = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.37,12.79a1,1,0,0,0-.74,1.86C17.09,15.23,18,16.13,18,17c0,1.42-2.46,3-6,3s-6-1.58-6-3c0-.87.91-1.77,2.37-2.35a1,1,0,0,0-.74-1.86C5.36,13.69,4,15.26,4,17c0,2.8,3.51,5,8,5s8-2.2,8-5C20,15.26,18.64,13.69,16.37,12.79ZM11,9.86V17a1,1,0,0,0,2,0V9.86a4,4,0,1,0-2,0ZM12,4a2,2,0,1,1-2,2A2,2,0,0,1,12,4Z"/></svg>', T = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.72,8.79l-4.29,4.3L8.78,11.44a1,1,0,1,0-1.41,1.41l2.35,2.36a1,1,0,0,0,.71.29,1,1,0,0,0,.7-.29l5-5a1,1,0,0,0,0-1.42A1,1,0,0,0,14.72,8.79ZM12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"/></svg>', E = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,16a1,1,0,1,0,1,1A1,1,0,0,0,12,16Zm10.67,1.47-8.05-14a3,3,0,0,0-5.24,0l-8,14A3,3,0,0,0,3.94,22H20.06a3,3,0,0,0,2.61-4.53Zm-1.73,2a1,1,0,0,1-.88.51H3.94a1,1,0,0,1-.88-.51,1,1,0,0,1,0-1l8-14a1,1,0,0,1,1.78,0l8.05,14A1,1,0,0,1,20.94,19.49ZM12,8a1,1,0,0,0-1,1v4a1,1,0,0,0,2,0V9A1,1,0,0,0,12,8Z"/></svg>', $ = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,7a1,1,0,0,0-1,1v4a1,1,0,0,0,2,0V8A1,1,0,0,0,12,7Zm0,8a1,1,0,1,0,1,1A1,1,0,0,0,12,15Zm9.71-7.44L16.44,2.29A1.05,1.05,0,0,0,15.73,2H8.27a1.05,1.05,0,0,0-.71.29L2.29,7.56A1.05,1.05,0,0,0,2,8.27v7.46a1.05,1.05,0,0,0,.29.71l5.27,5.27a1.05,1.05,0,0,0,.71.29h7.46a1.05,1.05,0,0,0,.71-.29l5.27-5.27a1.05,1.05,0,0,0,.29-.71V8.27A1.05,1.05,0,0,0,21.71,7.56ZM20,15.31,15.31,20H8.69L4,15.31V8.69L8.69,4h6.62L20,8.69Z"/></svg>', j = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Zm0-8.5a1,1,0,0,0-1,1v3a1,1,0,0,0,2,0v-3A1,1,0,0,0,12,11.5Zm0-4a1.25,1.25,0,1,0,1.25,1.25A1.25,1.25,0,0,0,12,7.5Z"/></svg>', N = {
|
|
4
|
+
"uil-times": e,
|
|
5
|
+
"uil-clock": v,
|
|
6
|
+
"uil-check": n,
|
|
7
|
+
"uil-plus": h,
|
|
8
|
+
"uil-calendar": r,
|
|
9
|
+
"uil-calendar-alt": i,
|
|
10
|
+
"uil-arrow-left": A,
|
|
11
|
+
"uil-arrow-right": p,
|
|
12
|
+
"uil-arrow-up": c,
|
|
13
|
+
"uil-arrow-down": m,
|
|
14
|
+
"uil-angle-down": Z,
|
|
15
|
+
"uil-angle-left": x,
|
|
16
|
+
"uil-angle-right": H,
|
|
17
|
+
"uil-angle-double-left": V,
|
|
18
|
+
"uil-angle-double-right": M,
|
|
19
|
+
"uil-trash": u,
|
|
20
|
+
"uil-compress-alt": d,
|
|
21
|
+
"uil-expand-alt": L,
|
|
22
|
+
"uil-copy": B,
|
|
23
|
+
"uil-thumbs-up": f,
|
|
24
|
+
"uil-thumbs-down": y,
|
|
25
|
+
"uil-arrow-circle-right": C,
|
|
26
|
+
"uil-eye": b,
|
|
27
|
+
"uil-eye-slash": k,
|
|
28
|
+
"uil-search": D,
|
|
29
|
+
"uil-left-arrow-to-left": R,
|
|
30
|
+
"uil-right-arrow-to-right": z,
|
|
31
|
+
"uil-pin": S,
|
|
32
|
+
"uil-check-circle": T,
|
|
33
|
+
"uil-exclamation-triangle": E,
|
|
34
|
+
"uil-exclamation-octagon": $,
|
|
35
|
+
"uil-info-circle": j
|
|
36
|
+
}, a = class a extends w {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments), this.name = "", this.size = 20;
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const s = N[this.name];
|
|
42
|
+
return s ? l`
|
|
43
|
+
<span
|
|
44
|
+
style="font-size: ${this.size}px;"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>
|
|
47
|
+
${o(s)}
|
|
48
|
+
</span>
|
|
49
|
+
` : l``;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
a.properties = {
|
|
53
|
+
name: { type: String },
|
|
54
|
+
size: { type: Number }
|
|
55
|
+
}, a.styles = g`
|
|
56
|
+
:host {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
line-height: 0;
|
|
61
|
+
color: inherit;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
svg {
|
|
65
|
+
width: 1em;
|
|
66
|
+
height: 1em;
|
|
67
|
+
fill: currentColor;
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
let t = a;
|
|
71
|
+
customElements.define("ui-icon", t);
|