@logosphere-ui/core 0.0.0-alpha.4 → 0.0.0-alpha.42
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 +1123 -0
- package/dist/AGENTS.md +1123 -0
- package/dist/atoms/Badge/badge.d.ts +1 -1
- package/dist/atoms/Button/button.d.ts +5 -3
- package/dist/atoms/Checkbox/checkbox.d.ts +2 -1
- package/dist/atoms/FormField/formfield.d.ts +10 -0
- package/dist/atoms/Slider/index.d.ts +1 -0
- package/dist/atoms/Slider/slider.d.ts +54 -0
- package/dist/badge-DsDxWEHx.js +72 -0
- package/dist/badge-DvaKpUHe.cjs +13 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{breadcrumb-B-4yqoJZ.js → breadcrumb-BB61Xt0s.js} +3 -3
- package/dist/breadcrumb.js +1 -1
- package/dist/button-DRZ4sG4T.cjs +10 -0
- package/dist/button-Uu9oaieg.js +58 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-CIgyrv3U.cjs +88 -0
- package/dist/calendar-CZ_IN2TF.js +652 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +4 -0
- package/dist/card-BOCW7gad.cjs +43 -0
- package/dist/{card-CUhlTJyJ.js → card-MDwFGplY.js} +27 -26
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/chatbot-B-NiZIYK.cjs +183 -0
- package/dist/chatbot-CHgiUY4h.js +564 -0
- package/dist/chatbot.cjs +1 -1
- package/dist/chatbot.js +2 -2
- 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-BmIFPk8X.cjs +113 -0
- package/dist/combobox-jak7Ac1m.js +437 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/datepicker-BgysIOZI.js +375 -0
- package/dist/datepicker-DOBmbxlo.cjs +85 -0
- package/dist/datepicker.cjs +1 -1
- package/dist/datepicker.js +2 -2
- package/dist/{download-manager-A4fOxGWJ.js → download-manager-BPg-6Qfg.js} +4 -4
- package/dist/download-manager-DDeTYRPs.cjs +97 -0
- package/dist/download-manager.cjs +1 -1
- package/dist/download-manager.js +1 -1
- package/dist/drawer-3nyjAkcS.cjs +32 -0
- package/dist/drawer-CE9zzllI.js +114 -0
- package/dist/drawer.cjs +1 -0
- package/dist/drawer.js +4 -0
- package/dist/formfield-CRcyUMvQ.cjs +33 -0
- package/dist/formfield-O327HYt0.js +154 -0
- package/dist/formfield.cjs +1 -1
- package/dist/formfield.js +1 -1
- package/dist/index.cjs +291 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.js +908 -32
- package/dist/index.umd.js +1544 -521
- package/dist/input-CQS0LzF-.cjs +59 -0
- package/dist/input-CeF3YJk-.js +257 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/left-menu.cjs +1 -0
- package/dist/left-menu.js +5 -0
- package/dist/leftmenu-CmWvnA6L.js +301 -0
- package/dist/leftmenu-p9aR2QTy.cjs +83 -0
- package/dist/modal-DUIv_yoo.js +250 -0
- package/dist/modal-dUnnHe8u.cjs +84 -0
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/molecules/Accordion/accordion.d.ts +42 -0
- package/dist/molecules/Accordion/index.d.ts +2 -0
- package/dist/molecules/Chip/chip-group.d.ts +29 -0
- package/dist/molecules/Chip/index.d.ts +2 -0
- package/dist/molecules/Collapse/collapse.d.ts +42 -0
- package/dist/molecules/Collapse/index.d.ts +2 -0
- package/dist/molecules/Input/input.d.ts +7 -1
- package/dist/molecules/InputGroup/index.d.ts +1 -0
- package/dist/molecules/InputGroup/input-group.d.ts +40 -0
- package/dist/molecules/Pagination/index.d.ts +1 -0
- package/dist/molecules/Pagination/pagination.d.ts +60 -0
- package/dist/molecules/Popover/popover.d.ts +1 -0
- package/dist/molecules/SplitButton/index.d.ts +2 -0
- package/dist/molecules/SplitButton/split-button.d.ts +53 -0
- package/dist/molecules/Stepper/index.d.ts +2 -0
- package/dist/molecules/Stepper/stepper.d.ts +34 -0
- package/dist/molecules/Textarea/text-area.d.ts +5 -2
- package/dist/molecules/TimePicker/index.d.ts +2 -0
- package/dist/molecules/TimePicker/timepicker.d.ts +62 -0
- package/dist/organisms/Calendar/calendar.d.ts +54 -0
- package/dist/organisms/Calendar/index.d.ts +1 -0
- package/dist/organisms/Calendar/shared.d.ts +9 -0
- package/dist/organisms/Chatbot/chatbot.d.ts +10 -1
- package/dist/organisms/Chatbot/index.d.ts +1 -1
- package/dist/organisms/Combobox/combobox.d.ts +30 -0
- package/dist/organisms/DatePicker/datepicker.d.ts +33 -33
- package/dist/organisms/Drawer/drawer.d.ts +30 -0
- package/dist/organisms/Drawer/index.d.ts +1 -0
- package/dist/organisms/LeftMenu/index.d.ts +2 -0
- package/dist/organisms/LeftMenu/leftmenu-item.d.ts +14 -0
- package/dist/organisms/LeftMenu/leftmenu.d.ts +45 -0
- package/dist/organisms/Modal/modal.d.ts +29 -4
- package/dist/organisms/Tab/tab.d.ts +13 -1
- package/dist/organisms/Toast/index.d.ts +2 -0
- package/dist/organisms/Toast/toast-container.d.ts +42 -0
- package/dist/organisms/Toast/toast.d.ts +48 -0
- package/dist/organisms/TreeMenu/index.d.ts +1 -0
- package/dist/organisms/TreeMenu/tree-menu.d.ts +41 -0
- package/dist/pagination-B7jknoOz.js +360 -0
- package/dist/pagination-BkqbWBOn.cjs +169 -0
- package/dist/pagination.cjs +1 -0
- package/dist/pagination.js +4 -0
- package/dist/popover-CYDoeLKp.cjs +30 -0
- package/dist/{popover-B7tCqk3R.js → popover-DDaG8MSj.js} +21 -18
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/shared/types/button.types.d.ts +7 -0
- package/dist/styles/main.css +186 -182
- package/dist/switch-8RGGesy5.cjs +17 -0
- package/dist/switch-DNqPqH-R.js +64 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.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-C73JxnqH.js +235 -0
- package/dist/text-area-Cprb-azV.cjs +51 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timepicker-CLJKWWGm.cjs +119 -0
- package/dist/timepicker-DMzGYd0p.js +316 -0
- package/dist/timepicker.cjs +1 -0
- package/dist/timepicker.js +4 -0
- package/dist/toast-container-6t6yEP9Y.cjs +64 -0
- package/dist/toast-container-B5v74b_5.js +274 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.js +6 -0
- package/dist/tree-menu-CkOPxr-W.js +154 -0
- package/dist/tree-menu-WNwZMreD.cjs +47 -0
- package/dist/tree-menu.cjs +1 -0
- package/dist/tree-menu.js +4 -0
- package/dist/ui-icon-BMJNdIOq.js +71 -0
- package/dist/ui-icon-DIucAQC_.cjs +22 -0
- package/package.json +99 -12
- package/dist/badge-BbhaO73N.cjs +0 -13
- package/dist/badge-DE7Tgd8Z.js +0 -71
- package/dist/button-C1EwOosO.js +0 -58
- package/dist/button-CDRccsk9.cjs +0 -10
- package/dist/card-n8ka8Zk-.cjs +0 -43
- package/dist/chatbot-Da_itUdJ.cjs +0 -160
- package/dist/chatbot-zkxngMRH.js +0 -481
- package/dist/checkbox-7Rb3WKGx.js +0 -119
- package/dist/checkbox-CdDTRdKV.cjs +0 -37
- package/dist/combobox-BJbI-Tgi.js +0 -268
- package/dist/combobox-pmE7bgEL.cjs +0 -99
- package/dist/datepicker-DFJx45C-.js +0 -750
- package/dist/datepicker-b9JGTTMx.cjs +0 -115
- package/dist/download-manager-BSIMTGaK.cjs +0 -97
- package/dist/formfield-D_7NFFoe.cjs +0 -27
- package/dist/formfield-d8fp9FTV.js +0 -118
- package/dist/input-BcnI1w3_.cjs +0 -46
- package/dist/input-Bj_7u8Iv.js +0 -192
- package/dist/modal-Bfc6WQSL.js +0 -110
- package/dist/modal-DQ8VFL-P.cjs +0 -39
- package/dist/popover-C2p5Pmts.cjs +0 -30
- package/dist/switch-Cpl53nRW.js +0 -64
- package/dist/switch-Rnnn10bn.cjs +0 -17
- package/dist/tab-BKdN4xAz.js +0 -176
- package/dist/tab-DcjAlXzU.cjs +0 -40
- package/dist/text-area-BkHdLnZj.cjs +0 -44
- package/dist/text-area-CC24lj8v.js +0 -204
package/dist/toast.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { unsafeCSS as p, css as _, LitElement as u, html as a, nothing as c } from "lit";
|
|
2
|
+
import { property as d, state as v, customElement as g } from "lit/decorators.js";
|
|
3
|
+
import { unsafeHTML as b } from "lit/directives/unsafe-html.js";
|
|
4
|
+
import "./ui-icon-BMJNdIOq.js";
|
|
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
|
+
var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, l = (e, t, r, n) => {
|
|
7
|
+
for (var o = n > 1 ? void 0 : n ? x(t, r) : t, s = e.length - 1, h; s >= 0; s--)
|
|
8
|
+
(h = e[s]) && (o = (n ? h(t, r, o) : h(o)) || o);
|
|
9
|
+
return n && o && w(t, r, o), o;
|
|
10
|
+
};
|
|
11
|
+
let i = class extends u {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.items = [], this.expandedIds = [], this.expandOnLabelClick = !0, this.chevronPosition = "left", this.showLabels = !0, this.iconSize = 16, this._expandedSet = /* @__PURE__ */ new Set();
|
|
14
|
+
}
|
|
15
|
+
willUpdate(e) {
|
|
16
|
+
e.has("expandedIds") && (this._expandedSet = new Set(this.expandedIds ?? []));
|
|
17
|
+
}
|
|
18
|
+
_isExpanded(e) {
|
|
19
|
+
return this._expandedSet.has(e);
|
|
20
|
+
}
|
|
21
|
+
_emitToggle(e, t) {
|
|
22
|
+
this.dispatchEvent(
|
|
23
|
+
new CustomEvent("toggle", {
|
|
24
|
+
detail: { item: e, expanded: t },
|
|
25
|
+
bubbles: !0,
|
|
26
|
+
composed: !0
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
_emitItemClick(e) {
|
|
31
|
+
this.dispatchEvent(
|
|
32
|
+
new CustomEvent("item-click", {
|
|
33
|
+
detail: { item: e },
|
|
34
|
+
bubbles: !0,
|
|
35
|
+
composed: !0
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
_emitNodeClick(e, t) {
|
|
40
|
+
this.dispatchEvent(
|
|
41
|
+
new CustomEvent("node-click", {
|
|
42
|
+
detail: { item: e, hasChildren: t },
|
|
43
|
+
bubbles: !0,
|
|
44
|
+
composed: !0
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
_setExpanded(e, t) {
|
|
49
|
+
t ? this._expandedSet.add(e.id) : this._expandedSet.delete(e.id), this.expandedIds = Array.from(this._expandedSet), this._emitToggle(e, t);
|
|
50
|
+
}
|
|
51
|
+
_toggle(e, t) {
|
|
52
|
+
t.stopPropagation(), !(e.disabled || !e.children?.length) && this._setExpanded(e, !this._isExpanded(e.id));
|
|
53
|
+
}
|
|
54
|
+
_handleItemClick(e, t) {
|
|
55
|
+
if (t.stopPropagation(), e.disabled) return;
|
|
56
|
+
const r = !!e.children?.length;
|
|
57
|
+
if (this._emitNodeClick(e, r), r && this.expandOnLabelClick) {
|
|
58
|
+
this._setExpanded(e, !this._isExpanded(e.id));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
r || (e.onClick?.(e), this._emitItemClick(e));
|
|
62
|
+
}
|
|
63
|
+
_handleRowKeydown(e, t) {
|
|
64
|
+
t.key !== "Enter" && t.key !== " " || (t.preventDefault(), this._handleItemClick(e, t));
|
|
65
|
+
}
|
|
66
|
+
_renderIcon(e) {
|
|
67
|
+
return e.iconName ? a`
|
|
68
|
+
<span class="tree__icon">
|
|
69
|
+
<ui-icon name=${e.iconName} .size=${this.iconSize}></ui-icon>
|
|
70
|
+
</span>
|
|
71
|
+
` : e.iconHtml ? a`<span class="tree__icon">${b(e.iconHtml)}</span>` : c;
|
|
72
|
+
}
|
|
73
|
+
_renderChevron(e, t) {
|
|
74
|
+
const r = !!e.children?.length;
|
|
75
|
+
return this.showLabels ? r ? a`
|
|
76
|
+
<button
|
|
77
|
+
type="button"
|
|
78
|
+
class="tree__chevron-btn ${this.chevronPosition === "right" ? "tree__chevron-btn--right" : ""}"
|
|
79
|
+
aria-label=${t ? "Collapse" : "Expand"}
|
|
80
|
+
@click=${(n) => this._toggle(e, n)}
|
|
81
|
+
>
|
|
82
|
+
<ui-icon
|
|
83
|
+
class="tree__chevron ${t ? "tree__chevron--open" : ""}"
|
|
84
|
+
name="uil-angle-down"
|
|
85
|
+
size="20"
|
|
86
|
+
></ui-icon>
|
|
87
|
+
</button>
|
|
88
|
+
` : a`<span class="tree__chevron-spacer"></span>` : c;
|
|
89
|
+
}
|
|
90
|
+
_renderNode(e, t) {
|
|
91
|
+
const r = !!e.children?.length, n = r ? this._isExpanded(e.id) : !1, o = this.showLabels ? `--tree-level:${t};` : "--tree-level:0;";
|
|
92
|
+
return a`
|
|
93
|
+
<li class="tree__item">
|
|
94
|
+
<div
|
|
95
|
+
class="tree__row ${e.disabled ? "tree__row--disabled" : ""} ${e.active ? "tree__row--active" : ""}"
|
|
96
|
+
style=${o}
|
|
97
|
+
role="button"
|
|
98
|
+
tabindex=${e.disabled ? -1 : 0}
|
|
99
|
+
@click=${(s) => this._handleItemClick(e, s)}
|
|
100
|
+
@keydown=${(s) => this._handleRowKeydown(e, s)}
|
|
101
|
+
title=${this.showLabels ? "" : e.label}
|
|
102
|
+
>
|
|
103
|
+
${this.chevronPosition === "left" ? this._renderChevron(e, n) : c}
|
|
104
|
+
${this._renderIcon(e)}
|
|
105
|
+
${this.showLabels ? a`<span class="tree__label">${e.label}</span>` : c}
|
|
106
|
+
${this.chevronPosition === "right" ? this._renderChevron(e, n) : c}
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
${this.showLabels && r && n ? a`
|
|
110
|
+
<ul class="tree__children">
|
|
111
|
+
${e.children.map((s) => this._renderNode(s, t + 1))}
|
|
112
|
+
</ul>
|
|
113
|
+
` : c}
|
|
114
|
+
</li>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return a`
|
|
119
|
+
<nav class="tree ${this.showLabels ? "" : "tree--icons"}" aria-label="Tree Menu">
|
|
120
|
+
<ul class="tree__list">
|
|
121
|
+
${this.items.map((e) => this._renderNode(e, 0))}
|
|
122
|
+
</ul>
|
|
123
|
+
</nav>
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
i.styles = [_`${p(f)}`];
|
|
128
|
+
l([
|
|
129
|
+
d({ attribute: !1 })
|
|
130
|
+
], i.prototype, "items", 2);
|
|
131
|
+
l([
|
|
132
|
+
d({ type: Array })
|
|
133
|
+
], i.prototype, "expandedIds", 2);
|
|
134
|
+
l([
|
|
135
|
+
d({ type: Boolean })
|
|
136
|
+
], i.prototype, "expandOnLabelClick", 2);
|
|
137
|
+
l([
|
|
138
|
+
d({ type: String })
|
|
139
|
+
], i.prototype, "chevronPosition", 2);
|
|
140
|
+
l([
|
|
141
|
+
d({ type: Boolean })
|
|
142
|
+
], i.prototype, "showLabels", 2);
|
|
143
|
+
l([
|
|
144
|
+
d({ type: Number })
|
|
145
|
+
], i.prototype, "iconSize", 2);
|
|
146
|
+
l([
|
|
147
|
+
v()
|
|
148
|
+
], i.prototype, "_expandedSet", 2);
|
|
149
|
+
i = l([
|
|
150
|
+
g("logosphere-tree-menu")
|
|
151
|
+
], i);
|
|
152
|
+
export {
|
|
153
|
+
i as T
|
|
154
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
<span class="tree__icon">
|
|
3
|
+
<ui-icon name=${e.iconName} .size=${this.iconSize}></ui-icon>
|
|
4
|
+
</span>
|
|
5
|
+
`:e.iconHtml?r.html`<span class="tree__icon">${d.unsafeHTML(e.iconHtml)}</span>`:r.nothing}_renderChevron(e,t){const n=!!e.children?.length;return this.showLabels?n?r.html`
|
|
6
|
+
<button
|
|
7
|
+
type="button"
|
|
8
|
+
class="tree__chevron-btn ${this.chevronPosition==="right"?"tree__chevron-btn--right":""}"
|
|
9
|
+
aria-label=${t?"Collapse":"Expand"}
|
|
10
|
+
@click=${i=>this._toggle(e,i)}
|
|
11
|
+
>
|
|
12
|
+
<ui-icon
|
|
13
|
+
class="tree__chevron ${t?"tree__chevron--open":""}"
|
|
14
|
+
name="uil-angle-down"
|
|
15
|
+
size="20"
|
|
16
|
+
></ui-icon>
|
|
17
|
+
</button>
|
|
18
|
+
`:r.html`<span class="tree__chevron-spacer"></span>`:r.nothing}_renderNode(e,t){const n=!!e.children?.length,i=n?this._isExpanded(e.id):!1,l=this.showLabels?`--tree-level:${t};`:"--tree-level:0;";return r.html`
|
|
19
|
+
<li class="tree__item">
|
|
20
|
+
<div
|
|
21
|
+
class="tree__row ${e.disabled?"tree__row--disabled":""} ${e.active?"tree__row--active":""}"
|
|
22
|
+
style=${l}
|
|
23
|
+
role="button"
|
|
24
|
+
tabindex=${e.disabled?-1:0}
|
|
25
|
+
@click=${o=>this._handleItemClick(e,o)}
|
|
26
|
+
@keydown=${o=>this._handleRowKeydown(e,o)}
|
|
27
|
+
title=${this.showLabels?"":e.label}
|
|
28
|
+
>
|
|
29
|
+
${this.chevronPosition==="left"?this._renderChevron(e,i):r.nothing}
|
|
30
|
+
${this._renderIcon(e)}
|
|
31
|
+
${this.showLabels?r.html`<span class="tree__label">${e.label}</span>`:r.nothing}
|
|
32
|
+
${this.chevronPosition==="right"?this._renderChevron(e,i):r.nothing}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
${this.showLabels&&n&&i?r.html`
|
|
36
|
+
<ul class="tree__children">
|
|
37
|
+
${e.children.map(o=>this._renderNode(o,t+1))}
|
|
38
|
+
</ul>
|
|
39
|
+
`:r.nothing}
|
|
40
|
+
</li>
|
|
41
|
+
`}render(){return r.html`
|
|
42
|
+
<nav class="tree ${this.showLabels?"":"tree--icons"}" aria-label="Tree Menu">
|
|
43
|
+
<ul class="tree__list">
|
|
44
|
+
${this.items.map(e=>this._renderNode(e,0))}
|
|
45
|
+
</ul>
|
|
46
|
+
</nav>
|
|
47
|
+
`}};exports.TreeMenu.styles=[r.css`${r.unsafeCSS(h)}`];a([s.property({attribute:!1})],exports.TreeMenu.prototype,"items",2);a([s.property({type:Array})],exports.TreeMenu.prototype,"expandedIds",2);a([s.property({type:Boolean})],exports.TreeMenu.prototype,"expandOnLabelClick",2);a([s.property({type:String})],exports.TreeMenu.prototype,"chevronPosition",2);a([s.property({type:Boolean})],exports.TreeMenu.prototype,"showLabels",2);a([s.property({type:Number})],exports.TreeMenu.prototype,"iconSize",2);a([s.state()],exports.TreeMenu.prototype,"_expandedSet",2);exports.TreeMenu=a([s.customElement("logosphere-tree-menu")],exports.TreeMenu);
|
|
@@ -0,0 +1 @@
|
|
|
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});
|
|
@@ -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);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";const a=require("lit"),w=require("lit/directives/unsafe-html.js"),g='<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>',e='<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>',o='<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>',v='<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>',n='<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>',h='<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>',i='<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>',r='<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>',A='<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>',c='<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>',p='<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>',m='<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>',Z='<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>',x='<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>',H='<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>',V='<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>',u='<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>',M='<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>',d='<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>',L='<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>',B='<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>',f='<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>',y='<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>',C='<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>',b='<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>',k='<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>',D='<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>',R='<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>',z='<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>',S='<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>',T='<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>',q={"uil-times":g,"uil-clock":e,"uil-check":o,"uil-plus":v,"uil-calendar":h,"uil-calendar-alt":n,"uil-arrow-left":i,"uil-arrow-right":r,"uil-arrow-up":A,"uil-arrow-down":c,"uil-angle-down":p,"uil-angle-left":m,"uil-angle-right":Z,"uil-angle-double-left":x,"uil-angle-double-right":H,"uil-trash":V,"uil-compress-alt":u,"uil-expand-alt":M,"uil-copy":d,"uil-thumbs-up":L,"uil-thumbs-down":B,"uil-arrow-circle-right":f,"uil-eye":y,"uil-eye-slash":C,"uil-search":b,"uil-left-arrow-to-left":k,"uil-right-arrow-to-right":D,"uil-pin":R,"uil-check-circle":z,"uil-exclamation-triangle":S,"uil-exclamation-octagon":T,"uil-info-circle":j},t=class t extends a.LitElement{constructor(){super(...arguments),this.name="",this.size=20}render(){const l=q[this.name];return l?a.html`
|
|
2
|
+
<span
|
|
3
|
+
style="font-size: ${this.size}px;"
|
|
4
|
+
aria-hidden="true"
|
|
5
|
+
>
|
|
6
|
+
${w.unsafeHTML(l)}
|
|
7
|
+
</span>
|
|
8
|
+
`:a.html``}};t.properties={name:{type:String},size:{type:Number}},t.styles=a.css`
|
|
9
|
+
:host {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
line-height: 0;
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
width: 1em;
|
|
19
|
+
height: 1em;
|
|
20
|
+
fill: currentColor;
|
|
21
|
+
}
|
|
22
|
+
`;let s=t;customElements.define("ui-icon",s);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logosphere-ui/core",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.42",
|
|
4
4
|
"description": "A modern, framework-agnostic UI component library built with Lit and Web Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
8
|
"files": [
|
|
10
9
|
"dist/**/*",
|
|
11
|
-
"README.md"
|
|
10
|
+
"README.md",
|
|
11
|
+
"AGENTS.md"
|
|
12
12
|
],
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
@@ -21,11 +21,21 @@
|
|
|
21
21
|
"import": "./dist/button.js",
|
|
22
22
|
"require": "./dist/button.cjs"
|
|
23
23
|
},
|
|
24
|
+
"./badge": {
|
|
25
|
+
"types": "./dist/atoms/Badge/index.d.ts",
|
|
26
|
+
"import": "./dist/badge.js",
|
|
27
|
+
"require": "./dist/badge.cjs"
|
|
28
|
+
},
|
|
24
29
|
"./modal": {
|
|
25
30
|
"types": "./dist/organisms/Modal/index.d.ts",
|
|
26
31
|
"import": "./dist/modal.js",
|
|
27
32
|
"require": "./dist/modal.cjs"
|
|
28
33
|
},
|
|
34
|
+
"./toast": {
|
|
35
|
+
"types": "./dist/organisms/Toast/index.d.ts",
|
|
36
|
+
"import": "./dist/toast.js",
|
|
37
|
+
"require": "./dist/toast.cjs"
|
|
38
|
+
},
|
|
29
39
|
"./checkbox": {
|
|
30
40
|
"types": "./dist/atoms/Checkbox/index.d.ts",
|
|
31
41
|
"import": "./dist/checkbox.js",
|
|
@@ -36,6 +46,11 @@
|
|
|
36
46
|
"import": "./dist/chatbot.js",
|
|
37
47
|
"require": "./dist/chatbot.cjs"
|
|
38
48
|
},
|
|
49
|
+
"./calendar": {
|
|
50
|
+
"types": "./dist/organisms/Calendar/index.d.ts",
|
|
51
|
+
"import": "./dist/calendar.js",
|
|
52
|
+
"require": "./dist/calendar.cjs"
|
|
53
|
+
},
|
|
39
54
|
"./popover": {
|
|
40
55
|
"types": "./dist/molecules/Popover/index.d.ts",
|
|
41
56
|
"import": "./dist/popover.js",
|
|
@@ -56,6 +71,16 @@
|
|
|
56
71
|
"import": "./dist/breadcrumb.js",
|
|
57
72
|
"require": "./dist/breadcrumb.cjs"
|
|
58
73
|
},
|
|
74
|
+
"./input": {
|
|
75
|
+
"types": "./dist/molecules/Input/index.d.ts",
|
|
76
|
+
"import": "./dist/input.js",
|
|
77
|
+
"require": "./dist/input.cjs"
|
|
78
|
+
},
|
|
79
|
+
"./pagination": {
|
|
80
|
+
"types": "./dist/molecules/Pagination/index.d.ts",
|
|
81
|
+
"import": "./dist/pagination.js",
|
|
82
|
+
"require": "./dist/pagination.cjs"
|
|
83
|
+
},
|
|
59
84
|
"./formfield": {
|
|
60
85
|
"types": "./dist/atoms/FormField/index.d.ts",
|
|
61
86
|
"import": "./dist/formfield.js",
|
|
@@ -66,6 +91,41 @@
|
|
|
66
91
|
"import": "./dist/combobox.js",
|
|
67
92
|
"require": "./dist/combobox.cjs"
|
|
68
93
|
},
|
|
94
|
+
"./slider": {
|
|
95
|
+
"types": "./dist/atoms/Slider/index.d.ts",
|
|
96
|
+
"import": "./dist/slider.js",
|
|
97
|
+
"require": "./dist/slider.cjs"
|
|
98
|
+
},
|
|
99
|
+
"./stepper": {
|
|
100
|
+
"types": "./dist/molecules/Stepper/index.d.ts",
|
|
101
|
+
"import": "./dist/stepper.js",
|
|
102
|
+
"require": "./dist/stepper.cjs"
|
|
103
|
+
},
|
|
104
|
+
"./split-button": {
|
|
105
|
+
"types": "./dist/molecules/SplitButton/index.d.ts",
|
|
106
|
+
"import": "./dist/split-button.js",
|
|
107
|
+
"require": "./dist/split-button.cjs"
|
|
108
|
+
},
|
|
109
|
+
"./collapse": {
|
|
110
|
+
"types": "./dist/molecules/Collapse/index.d.ts",
|
|
111
|
+
"import": "./dist/collapse.js",
|
|
112
|
+
"require": "./dist/collapse.cjs"
|
|
113
|
+
},
|
|
114
|
+
"./input-group": {
|
|
115
|
+
"types": "./dist/molecules/InputGroup/index.d.ts",
|
|
116
|
+
"import": "./dist/input-group.js",
|
|
117
|
+
"require": "./dist/input-group.cjs"
|
|
118
|
+
},
|
|
119
|
+
"./chip-group": {
|
|
120
|
+
"types": "./dist/molecules/Chip/index.d.ts",
|
|
121
|
+
"import": "./dist/chip-group.js",
|
|
122
|
+
"require": "./dist/chip-group.cjs"
|
|
123
|
+
},
|
|
124
|
+
"./accordion": {
|
|
125
|
+
"types": "./dist/molecules/Accordion/index.d.ts",
|
|
126
|
+
"import": "./dist/accordion.js",
|
|
127
|
+
"require": "./dist/accordion.cjs"
|
|
128
|
+
},
|
|
69
129
|
"./textarea": {
|
|
70
130
|
"types": "./dist/molecules/Textarea/index.d.ts",
|
|
71
131
|
"import": "./dist/textarea.js",
|
|
@@ -76,16 +136,36 @@
|
|
|
76
136
|
"import": "./dist/datepicker.js",
|
|
77
137
|
"require": "./dist/datepicker.cjs"
|
|
78
138
|
},
|
|
139
|
+
"./timepicker": {
|
|
140
|
+
"types": "./dist/molecules/TimePicker/index.d.ts",
|
|
141
|
+
"import": "./dist/timepicker.js",
|
|
142
|
+
"require": "./dist/timepicker.cjs"
|
|
143
|
+
},
|
|
144
|
+
"./drawer": {
|
|
145
|
+
"types": "./dist/organisms/Drawer/index.d.ts",
|
|
146
|
+
"import": "./dist/drawer.js",
|
|
147
|
+
"require": "./dist/drawer.cjs"
|
|
148
|
+
},
|
|
79
149
|
"./download-manager": {
|
|
80
150
|
"types": "./dist/organisms/DownloadManager/index.d.ts",
|
|
81
151
|
"import": "./dist/download-manager.js",
|
|
82
152
|
"require": "./dist/download-manager.cjs"
|
|
83
153
|
},
|
|
154
|
+
"./left-menu": {
|
|
155
|
+
"types": "./dist/organisms/LeftMenu/index.d.ts",
|
|
156
|
+
"import": "./dist/left-menu.js",
|
|
157
|
+
"require": "./dist/left-menu.cjs"
|
|
158
|
+
},
|
|
84
159
|
"./tab": {
|
|
85
160
|
"types": "./dist/organisms/Tab/index.d.ts",
|
|
86
161
|
"import": "./dist/tab.js",
|
|
87
162
|
"require": "./dist/tab.cjs"
|
|
88
163
|
},
|
|
164
|
+
"./tree-menu": {
|
|
165
|
+
"types": "./dist/organisms/TreeMenu/index.d.ts",
|
|
166
|
+
"import": "./dist/tree-menu.js",
|
|
167
|
+
"require": "./dist/tree-menu.cjs"
|
|
168
|
+
},
|
|
89
169
|
"./styles/main.css": "./dist/styles/main.css"
|
|
90
170
|
},
|
|
91
171
|
"keywords": [
|
|
@@ -112,7 +192,8 @@
|
|
|
112
192
|
},
|
|
113
193
|
"scripts": {
|
|
114
194
|
"dev": "vite",
|
|
115
|
-
"build": "npm run build:main && npm run build:umd && npm run build:types && npm run build:css",
|
|
195
|
+
"build": "npm run build:main && npm run build:umd && npm run build:types && npm run build:css && npm run build:docs",
|
|
196
|
+
"build:docs": "cp AGENTS.md dist/AGENTS.md",
|
|
116
197
|
"build:main": "vite build --config vite.build.config.ts",
|
|
117
198
|
"build:umd": "vite build --config vite.umd.config.ts",
|
|
118
199
|
"build:types": "tsc --emitDeclarationOnly --noEmit false --outDir dist",
|
|
@@ -122,6 +203,7 @@
|
|
|
122
203
|
"test:watch": "vitest --watch",
|
|
123
204
|
"test:coverage": "vitest run --coverage",
|
|
124
205
|
"test:unit": "vitest run src/**/*.test.ts",
|
|
206
|
+
"test:ssr": "vitest run --config vitest.ssr.config.ts",
|
|
125
207
|
"test:integration": "vitest run tests/integration/**/*.test.ts",
|
|
126
208
|
"preview": "vite preview",
|
|
127
209
|
"create-component": "node create-component.cjs",
|
|
@@ -150,15 +232,17 @@
|
|
|
150
232
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
151
233
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
152
234
|
"@babel/preset-env": "^7.28.3",
|
|
153
|
-
"@chromatic-com/storybook": "^
|
|
235
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
236
|
+
"@lit-labs/ssr": "^4.1.0",
|
|
237
|
+
"@lit-labs/ssr-dom-shim": "1.6.0",
|
|
154
238
|
"@open-wc/testing": "^4.0.0",
|
|
155
239
|
"@rollup/plugin-babel": "^6.1.0",
|
|
156
240
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
157
|
-
"@storybook/addon-a11y": "^10.
|
|
158
|
-
"@storybook/addon-docs": "^10.
|
|
159
|
-
"@storybook/addon-vitest": "^10.
|
|
160
|
-
"@storybook/builder-vite": "^10.
|
|
161
|
-
"@storybook/web-components-vite": "^10.
|
|
241
|
+
"@storybook/addon-a11y": "^10.3.6",
|
|
242
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
243
|
+
"@storybook/addon-vitest": "^10.3.6",
|
|
244
|
+
"@storybook/builder-vite": "^10.3.6",
|
|
245
|
+
"@storybook/web-components-vite": "^10.3.6",
|
|
162
246
|
"@testing-library/jest-dom": "^6.9.1",
|
|
163
247
|
"@types/jest": "^30.0.0",
|
|
164
248
|
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
@@ -169,17 +253,20 @@
|
|
|
169
253
|
"@web/test-runner-playwright": "^0.11.1",
|
|
170
254
|
"baseline-browser-mapping": "^2.9.12",
|
|
171
255
|
"eslint": "^9.34.0",
|
|
172
|
-
"eslint-plugin-storybook": "10.
|
|
256
|
+
"eslint-plugin-storybook": "10.3.6",
|
|
173
257
|
"globals": "^16.4.0",
|
|
174
258
|
"jsdom": "^27.0.1",
|
|
175
259
|
"playwright": "^1.54.1",
|
|
176
260
|
"prettier": "^3.6.2",
|
|
177
261
|
"rollup-plugin-copy": "^3.5.0",
|
|
178
|
-
"storybook": "^10.
|
|
262
|
+
"storybook": "^10.3.6",
|
|
179
263
|
"ts-node": "^10.9.2",
|
|
180
264
|
"typescript": "~5.8.3",
|
|
181
265
|
"vite": "^7.0.3",
|
|
182
266
|
"vite-plugin-string": "^1.2.3",
|
|
183
267
|
"vitest": "^3.2.4"
|
|
268
|
+
},
|
|
269
|
+
"overrides": {
|
|
270
|
+
"nth-check": "^2.1.1"
|
|
184
271
|
}
|
|
185
272
|
}
|
package/dist/badge-BbhaO73N.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("lit"),a=require("lit/decorators.js"),c=".badge{display:inline-flex;align-items:center;gap:var(--spacing-1);font-family:var(--font-family-base);font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);line-height:var(--line-height-normal);border-radius:var(--radius-base);white-space:nowrap;-webkit-user-select:none;user-select:none}.badge--default-size{padding:var(--spacing-1) var(--spacing-2)}.badge--small{padding:0 var(--spacing-1)}.badge--round{border-radius:var(--radius-md)}.badge--default{background-color:var(--color-tertiary-bg);color:var(--color-secondary)}.badge--warning{background-color:var(--color-warning-rgb);color:var(--color-warning-text-emphasis)}.badge--success{background-color:var(--color-success-rgb);color:var(--color-success)}.badge--info{background-color:var(--color-info-rgb);color:var(--color-info-text-emphasis)}.badge--danger{background-color:var(--color-danger-rgb);color:var(--color-danger)}.badge--purple{background-color:var(--color-purple-rgb);color:var(--color-purple)}.badge__close{display:inline-flex;align-items:center;justify-content:center;margin-left:var(--spacing-1);padding:0;background:none;border:none;cursor:pointer;color:inherit;opacity:.75;transition:opacity var(--transition-speed-fast) var(--transition-timing);line-height:1}.badge__close:hover{opacity:1}.badge__close:focus{outline:none;opacity:1}";var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(n,o,i,t)=>{for(var r=t>1?void 0:t?p(o,i):o,l=n.length-1,g;l>=0;l--)(g=n[l])&&(r=(t?g(o,i,r):g(r))||r);return t&&r&&d(o,i,r),r};exports.LogosphereBadge=class extends e.LitElement{constructor(){super(...arguments),this.variant="default",this.size="default",this.text="",this.closeable=!1,this.isRound=!1}handleClose(){this.onClose&&this.onClose(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}getBadgeClasses(){const o=["badge",`badge--${this.variant}`,this.size==="small"?"badge--small":"badge--default-size"];return this.isRound&&o.push("badge--round"),o.join(" ")}render(){return e.html`
|
|
2
|
-
<div class="${this.getBadgeClasses()}">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
${this.text?e.html`<span>${this.text}</span>`:e.nothing}
|
|
5
|
-
${this.closeable?e.html`
|
|
6
|
-
<button class="badge__close" @click=${this.handleClose} aria-label="Close">
|
|
7
|
-
<ui-icon name="uil-times"></ui-icon>
|
|
8
|
-
</button>
|
|
9
|
-
`:e.nothing}
|
|
10
|
-
</div>
|
|
11
|
-
`}};exports.LogosphereBadge.styles=[e.css`
|
|
12
|
-
${e.unsafeCSS(c)}
|
|
13
|
-
`];s([a.property({type:String})],exports.LogosphereBadge.prototype,"variant",2);s([a.property({type:String})],exports.LogosphereBadge.prototype,"size",2);s([a.property({type:String})],exports.LogosphereBadge.prototype,"text",2);s([a.property({type:Boolean})],exports.LogosphereBadge.prototype,"closeable",2);s([a.property({type:Boolean})],exports.LogosphereBadge.prototype,"isRound",2);s([a.property({attribute:!1})],exports.LogosphereBadge.prototype,"onClose",2);exports.LogosphereBadge=s([a.customElement("logosphere-badge")],exports.LogosphereBadge);
|