@loccal/ui 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +38 -3
  4. package/dist/components/ui/accordion.d.ts +6 -0
  5. package/dist/components/ui/accordion.js +17 -0
  6. package/dist/components/ui/ai-panel.d.ts +47 -0
  7. package/dist/components/ui/ai-panel.js +74 -0
  8. package/dist/components/ui/alert-dialog.d.ts +18 -0
  9. package/dist/components/ui/alert-dialog.js +42 -0
  10. package/dist/components/ui/alert.d.ts +10 -0
  11. package/dist/components/ui/alert.js +27 -0
  12. package/dist/components/ui/avatar.d.ts +11 -0
  13. package/dist/components/ui/avatar.js +23 -0
  14. package/dist/components/ui/badge.d.ts +7 -0
  15. package/dist/components/ui/badge.js +36 -0
  16. package/dist/components/ui/breadcrumb.d.ts +10 -0
  17. package/dist/components/ui/breadcrumb.js +36 -0
  18. package/dist/components/ui/button-group.d.ts +10 -0
  19. package/dist/components/ui/button-group.js +36 -0
  20. package/dist/components/ui/button.d.ts +8 -0
  21. package/dist/components/ui/button.js +34 -0
  22. package/dist/components/ui/calendar.d.ts +10 -0
  23. package/dist/components/ui/calendar.js +76 -0
  24. package/dist/components/ui/card.d.ts +11 -0
  25. package/dist/components/ui/card.js +24 -0
  26. package/dist/components/ui/chart.d.ts +44 -0
  27. package/dist/components/ui/chart.js +132 -0
  28. package/dist/components/ui/checkbox.d.ts +3 -0
  29. package/dist/components/ui/checkbox.js +9 -0
  30. package/dist/components/ui/code-view.d.ts +31 -0
  31. package/dist/components/ui/code-view.js +62 -0
  32. package/dist/components/ui/collapsible.d.ts +5 -0
  33. package/dist/components/ui/collapsible.js +13 -0
  34. package/dist/components/ui/command-block.d.ts +28 -0
  35. package/dist/components/ui/command-block.js +58 -0
  36. package/dist/components/ui/command.d.ts +19 -0
  37. package/dist/components/ui/command.js +35 -0
  38. package/dist/components/ui/connection-status.d.ts +29 -0
  39. package/dist/components/ui/connection-status.js +26 -0
  40. package/dist/components/ui/context-menu.d.ts +29 -0
  41. package/dist/components/ui/context-menu.js +51 -0
  42. package/dist/components/ui/data-table.d.ts +49 -0
  43. package/dist/components/ui/data-table.js +100 -0
  44. package/dist/components/ui/dialog.d.ts +18 -0
  45. package/dist/components/ui/dialog.js +37 -0
  46. package/dist/components/ui/drawer.d.ts +16 -0
  47. package/dist/components/ui/drawer.js +75 -0
  48. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  49. package/dist/components/ui/dropdown-menu.js +51 -0
  50. package/dist/components/ui/dropzone.d.ts +11 -0
  51. package/dist/components/ui/dropzone.js +39 -0
  52. package/dist/components/ui/empty.d.ts +11 -0
  53. package/dist/components/ui/empty.js +33 -0
  54. package/dist/components/ui/field.d.ts +24 -0
  55. package/dist/components/ui/field.js +68 -0
  56. package/dist/components/ui/file-tree.d.ts +42 -0
  57. package/dist/components/ui/file-tree.js +88 -0
  58. package/dist/components/ui/file-type-icon.d.ts +16 -0
  59. package/dist/components/ui/file-type-icon.js +19 -0
  60. package/dist/components/ui/hash-chain.d.ts +43 -0
  61. package/dist/components/ui/hash-chain.js +34 -0
  62. package/dist/components/ui/history-palette.d.ts +37 -0
  63. package/dist/components/ui/history-palette.js +44 -0
  64. package/dist/components/ui/hover-card.d.ts +5 -0
  65. package/dist/components/ui/hover-card.js +14 -0
  66. package/dist/components/ui/icon-base.d.ts +15 -0
  67. package/dist/components/ui/icon-base.js +18 -0
  68. package/dist/components/ui/icon.d.ts +15 -0
  69. package/dist/components/ui/icon.js +32 -0
  70. package/dist/components/ui/icons-compat.d.ts +32 -0
  71. package/dist/components/ui/icons-compat.js +34 -0
  72. package/dist/components/ui/icons.d.ts +1048 -0
  73. package/dist/components/ui/icons.js +264 -0
  74. package/dist/components/ui/input-group.d.ts +18 -0
  75. package/dist/components/ui/input-group.js +57 -0
  76. package/dist/components/ui/input-otp.d.ts +11 -0
  77. package/dist/components/ui/input-otp.js +21 -0
  78. package/dist/components/ui/input.d.ts +3 -0
  79. package/dist/components/ui/input.js +7 -0
  80. package/dist/components/ui/kbd.d.ts +3 -0
  81. package/dist/components/ui/kbd.js +9 -0
  82. package/dist/components/ui/label.d.ts +3 -0
  83. package/dist/components/ui/label.js +7 -0
  84. package/dist/components/ui/locale-switch.d.ts +9 -0
  85. package/dist/components/ui/locale-switch.js +31 -0
  86. package/dist/components/ui/log-panel.d.ts +28 -0
  87. package/dist/components/ui/log-panel.js +59 -0
  88. package/dist/components/ui/menubar.d.ts +29 -0
  89. package/dist/components/ui/menubar.js +56 -0
  90. package/dist/components/ui/metric-grid.d.ts +20 -0
  91. package/dist/components/ui/metric-grid.js +14 -0
  92. package/dist/components/ui/model-list.d.ts +33 -0
  93. package/dist/components/ui/model-list.js +69 -0
  94. package/dist/components/ui/navigation-menu.d.ts +11 -0
  95. package/dist/components/ui/navigation-menu.js +31 -0
  96. package/dist/components/ui/number-field.d.ts +29 -0
  97. package/dist/components/ui/number-field.js +65 -0
  98. package/dist/components/ui/pagination.d.ts +17 -0
  99. package/dist/components/ui/pagination.js +26 -0
  100. package/dist/components/ui/pane-tree.d.ts +18 -0
  101. package/dist/components/ui/pane-tree.js +65 -0
  102. package/dist/components/ui/popover.d.ts +9 -0
  103. package/dist/components/ui/popover.js +23 -0
  104. package/dist/components/ui/progress.d.ts +7 -0
  105. package/dist/components/ui/progress.js +20 -0
  106. package/dist/components/ui/radio-group.d.ts +5 -0
  107. package/dist/components/ui/radio-group.js +12 -0
  108. package/dist/components/ui/resizable.d.ts +7 -0
  109. package/dist/components/ui/resizable.js +14 -0
  110. package/dist/components/ui/scroll-area.d.ts +5 -0
  111. package/dist/components/ui/scroll-area.js +11 -0
  112. package/dist/components/ui/select.d.ts +15 -0
  113. package/dist/components/ui/select.js +34 -0
  114. package/dist/components/ui/separator.d.ts +3 -0
  115. package/dist/components/ui/separator.js +8 -0
  116. package/dist/components/ui/settings-layout.d.ts +31 -0
  117. package/dist/components/ui/settings-layout.js +45 -0
  118. package/dist/components/ui/sheet.d.ts +14 -0
  119. package/dist/components/ui/sheet.js +37 -0
  120. package/dist/components/ui/shell-picker.d.ts +18 -0
  121. package/dist/components/ui/shell-picker.js +17 -0
  122. package/dist/components/ui/skeleton.d.ts +2 -0
  123. package/dist/components/ui/skeleton.js +6 -0
  124. package/dist/components/ui/slider.d.ts +3 -0
  125. package/dist/components/ui/slider.js +12 -0
  126. package/dist/components/ui/sonner.d.ts +3 -0
  127. package/dist/components/ui/sonner.js +25 -0
  128. package/dist/components/ui/spinner.d.ts +2 -0
  129. package/dist/components/ui/spinner.js +7 -0
  130. package/dist/components/ui/split-button.d.ts +21 -0
  131. package/dist/components/ui/split-button.js +14 -0
  132. package/dist/components/ui/stat.d.ts +10 -0
  133. package/dist/components/ui/stat.js +8 -0
  134. package/dist/components/ui/status-bar.d.ts +13 -0
  135. package/dist/components/ui/status-bar.js +15 -0
  136. package/dist/components/ui/stepper.d.ts +13 -0
  137. package/dist/components/ui/stepper.js +11 -0
  138. package/dist/components/ui/switch.d.ts +5 -0
  139. package/dist/components/ui/switch.js +8 -0
  140. package/dist/components/ui/table.d.ts +10 -0
  141. package/dist/components/ui/table.js +28 -0
  142. package/dist/components/ui/tabs.d.ts +10 -0
  143. package/dist/components/ui/tabs.js +29 -0
  144. package/dist/components/ui/terminal-tabs.d.ts +31 -0
  145. package/dist/components/ui/terminal-tabs.js +109 -0
  146. package/dist/components/ui/terminal-view.d.ts +51 -0
  147. package/dist/components/ui/terminal-view.js +189 -0
  148. package/dist/components/ui/textarea.d.ts +3 -0
  149. package/dist/components/ui/textarea.js +6 -0
  150. package/dist/components/ui/timeline.d.ts +9 -0
  151. package/dist/components/ui/timeline.js +18 -0
  152. package/dist/components/ui/toggle-group.d.ts +11 -0
  153. package/dist/components/ui/toggle-group.js +24 -0
  154. package/dist/components/ui/toggle.d.ts +8 -0
  155. package/dist/components/ui/toggle.js +26 -0
  156. package/dist/components/ui/tooltip.d.ts +6 -0
  157. package/dist/components/ui/tooltip.js +17 -0
  158. package/dist/components/ui/tree-view.d.ts +20 -0
  159. package/dist/components/ui/tree-view.js +41 -0
  160. package/dist/components/ui/window-frame.d.ts +35 -0
  161. package/dist/components/ui/window-frame.js +49 -0
  162. package/dist/lib/ai-markdown.d.ts +13 -0
  163. package/dist/lib/ai-markdown.js +46 -0
  164. package/dist/lib/command-risk.d.ts +6 -0
  165. package/dist/lib/command-risk.js +42 -0
  166. package/dist/lib/file-icons.d.ts +18 -0
  167. package/dist/lib/file-icons.js +136 -0
  168. package/dist/lib/file-kind.d.ts +10 -0
  169. package/dist/lib/file-kind.js +63 -0
  170. package/dist/lib/format.d.ts +9 -0
  171. package/dist/lib/format.js +30 -0
  172. package/dist/lib/i18n-core.d.ts +20 -0
  173. package/dist/lib/i18n-core.js +36 -0
  174. package/dist/lib/i18n.d.ts +15 -0
  175. package/dist/lib/i18n.js +68 -0
  176. package/dist/lib/icon-data.d.ts +276 -0
  177. package/dist/lib/icon-data.js +307 -0
  178. package/dist/lib/icon-shapes.d.ts +14 -0
  179. package/dist/lib/icon-shapes.js +47 -0
  180. package/dist/lib/log-filter.d.ts +23 -0
  181. package/dist/lib/log-filter.js +44 -0
  182. package/dist/lib/number-field.d.ts +11 -0
  183. package/dist/lib/number-field.js +30 -0
  184. package/dist/lib/pane-tree.d.ts +39 -0
  185. package/dist/lib/pane-tree.js +92 -0
  186. package/dist/lib/platform.d.ts +10 -0
  187. package/dist/lib/platform.js +24 -0
  188. package/dist/lib/shell-meta.d.ts +7 -0
  189. package/dist/lib/shell-meta.js +70 -0
  190. package/dist/lib/syntax.d.ts +16 -0
  191. package/dist/lib/syntax.js +540 -0
  192. package/dist/lib/tab-order.d.ts +6 -0
  193. package/dist/lib/tab-order.js +24 -0
  194. package/dist/lib/table-sort.d.ts +16 -0
  195. package/dist/lib/table-sort.js +66 -0
  196. package/dist/lib/terminal-themes.d.ts +30 -0
  197. package/dist/lib/terminal-themes.js +90 -0
  198. package/dist/lib/utils.d.ts +2 -0
  199. package/dist/lib/utils.js +5 -0
  200. package/dist-cdn/loccal-ui.css +971 -0
  201. package/dist-cdn/loccal-ui.min.js +1 -0
  202. package/dist-wc/base.d.ts +31 -0
  203. package/dist-wc/base.js +104 -0
  204. package/dist-wc/button.d.ts +12 -0
  205. package/dist-wc/button.js +47 -0
  206. package/dist-wc/calendar.d.ts +16 -0
  207. package/dist-wc/calendar.js +106 -0
  208. package/dist-wc/choice.d.ts +17 -0
  209. package/dist-wc/choice.js +76 -0
  210. package/dist-wc/command.d.ts +32 -0
  211. package/dist-wc/command.js +181 -0
  212. package/dist-wc/data-table.d.ts +22 -0
  213. package/dist-wc/data-table.js +128 -0
  214. package/dist-wc/dialog.d.ts +29 -0
  215. package/dist-wc/dialog.js +94 -0
  216. package/dist-wc/disclosure.d.ts +17 -0
  217. package/dist-wc/disclosure.js +91 -0
  218. package/dist-wc/fields2.d.ts +38 -0
  219. package/dist-wc/fields2.js +133 -0
  220. package/dist-wc/file-tree.d.ts +19 -0
  221. package/dist-wc/file-tree.js +97 -0
  222. package/dist-wc/floating.d.ts +32 -0
  223. package/dist-wc/floating.js +91 -0
  224. package/dist-wc/index.d.ts +23 -0
  225. package/dist-wc/index.js +24 -0
  226. package/dist-wc/input-otp.d.ts +14 -0
  227. package/dist-wc/input-otp.js +82 -0
  228. package/dist-wc/navigation-menu.d.ts +14 -0
  229. package/dist-wc/navigation-menu.js +75 -0
  230. package/dist-wc/number-field.d.ts +13 -0
  231. package/dist-wc/number-field.js +67 -0
  232. package/dist-wc/resizable.d.ts +14 -0
  233. package/dist-wc/resizable.js +57 -0
  234. package/dist-wc/select.d.ts +17 -0
  235. package/dist-wc/select.js +80 -0
  236. package/dist-wc/static.d.ts +1 -0
  237. package/dist-wc/static.js +175 -0
  238. package/dist-wc/status-bar.d.ts +11 -0
  239. package/dist-wc/status-bar.js +54 -0
  240. package/dist-wc/styles.css +971 -0
  241. package/dist-wc/tabs.d.ts +16 -0
  242. package/dist-wc/tabs.js +62 -0
  243. package/dist-wc/terminal-tabs.d.ts +16 -0
  244. package/dist-wc/terminal-tabs.js +79 -0
  245. package/dist-wc/toaster.d.ts +16 -0
  246. package/dist-wc/toaster.js +68 -0
  247. package/dist-wc/toggle.d.ts +30 -0
  248. package/dist-wc/toggle.js +101 -0
  249. package/dist-wc/tree.d.ts +17 -0
  250. package/dist-wc/tree.js +72 -0
  251. package/docs/ARQUITETURA-VANILLA.md +54 -0
  252. package/docs/VERSIONING.md +88 -0
  253. package/package.json +1078 -6
  254. package/styles.css +476 -0
@@ -0,0 +1,24 @@
1
+ // Registra todos os elementos. Para carregar so um: import "@loccal/ui/wc/dialog".
2
+ export { LoccalButton } from "./button.js";
3
+ export { LoccalDialog, LoccalSheet, LoccalDrawer, LoccalAlertDialog } from "./dialog.js";
4
+ export { LoccalSelect } from "./select.js";
5
+ export { LoccalTabs } from "./tabs.js";
6
+ export { LoccalTerminalTabs } from "./terminal-tabs.js";
7
+ export { LoccalStatusBar } from "./status-bar.js";
8
+ export { LoccalElement } from "./base.js";
9
+ export { STATIC_ELEMENTS } from "./static.js";
10
+ export { LoccalSwitch, LoccalCheckbox, LoccalToggle } from "./toggle.js";
11
+ export { LoccalAccordion, LoccalCollapsible } from "./disclosure.js";
12
+ export { LoccalRadioGroup, LoccalToggleGroup } from "./choice.js";
13
+ export { LoccalPopover, LoccalTooltip, LoccalHoverCard, LoccalDropdownMenu, LoccalContextMenu } from "./floating.js";
14
+ export { LoccalTreeView } from "./tree.js";
15
+ export { LoccalToaster, toast } from "./toaster.js";
16
+ export { LoccalNumberField } from "./number-field.js";
17
+ export { LoccalInputOtp } from "./input-otp.js";
18
+ export { LoccalResizable } from "./resizable.js";
19
+ export { LoccalLocaleSwitch, LoccalShellPicker, LoccalMenubar, LoccalDropzone } from "./fields2.js";
20
+ export { LoccalCommand, LoccalHistoryPalette } from "./command.js";
21
+ export { LoccalDataTable } from "./data-table.js";
22
+ export { LoccalCalendar } from "./calendar.js";
23
+ export { LoccalNavigationMenu } from "./navigation-menu.js";
24
+ export { LoccalFileTree } from "./file-tree.js";
@@ -0,0 +1,14 @@
1
+ import { LoccalElement } from "./base.ts";
2
+ /**
3
+ * `<loccal-input-otp length="6" value pattern="digits|alphanumeric|any" groups="3,3" disabled invalid aria-label>`: um input real
4
+ * (colar e preenchimento automatico funcionam) com slots visuais. Eventos: `loccal-change` { value }, `loccal-complete` { value }.
5
+ */
6
+ export declare class LoccalInputOtp extends LoccalElement {
7
+ #private;
8
+ static observedAttributes: string[];
9
+ get value(): string;
10
+ set value(v: string);
11
+ focus(): void;
12
+ protected setup(): void;
13
+ protected update(): void;
14
+ }
@@ -0,0 +1,82 @@
1
+ import { applyAttrs, bindOtp, createOtp, getOtpProps, getOtpSlots } from "@loccal/core";
2
+ import { define, el, LoccalElement } from "./base.js";
3
+ /**
4
+ * `<loccal-input-otp length="6" value pattern="digits|alphanumeric|any" groups="3,3" disabled invalid aria-label>`: um input real
5
+ * (colar e preenchimento automatico funcionam) com slots visuais. Eventos: `loccal-change` { value }, `loccal-complete` { value }.
6
+ */
7
+ export class LoccalInputOtp extends LoccalElement {
8
+ static observedAttributes = ["value", "length", "pattern", "groups", "disabled", "invalid", "aria-label"];
9
+ #machine = createOtp({}, {
10
+ onValueChange: (value) => {
11
+ this.setAttribute("value", value);
12
+ this.emit("loccal-change", { value });
13
+ },
14
+ onComplete: (value) => this.emit("loccal-complete", { value }),
15
+ });
16
+ #input;
17
+ #built = "";
18
+ get value() {
19
+ return this.#machine.state.value;
20
+ }
21
+ set value(v) {
22
+ this.setAttribute("value", v);
23
+ }
24
+ focus() {
25
+ this.#input?.focus();
26
+ }
27
+ setup() {
28
+ this.#input = this.querySelector("[data-part=input]") ?? el("input", { "data-part": "input" });
29
+ if (!this.#input.isConnected)
30
+ this.append(this.#input);
31
+ this.own(bindOtp(this.#input, this.#machine));
32
+ this.own(this.#machine.subscribe(() => this.#render()));
33
+ }
34
+ update() {
35
+ const length = Number(this.getAttribute("length") ?? 6) || 6;
36
+ this.#machine.patch({
37
+ length,
38
+ pattern: this.getAttribute("pattern") ?? "digits",
39
+ disabled: this.bool("disabled"),
40
+ invalid: this.bool("invalid"),
41
+ });
42
+ const value = this.getAttribute("value");
43
+ if (value !== null && value !== this.#machine.state.value)
44
+ this.#machine.send({ type: "INPUT", text: value });
45
+ this.#render();
46
+ }
47
+ #layout() {
48
+ const { length } = this.#machine.state;
49
+ const groups = (this.getAttribute("groups") ?? "").split(",").map((n) => Number(n)).filter((n) => n > 0);
50
+ return groups.reduce((a, b) => a + b, 0) === length ? groups : [length];
51
+ }
52
+ #render() {
53
+ const s = this.#machine.state;
54
+ applyAttrs(this, getOtpProps(s, "root"));
55
+ applyAttrs(this.#input, getOtpProps(s, "input", undefined, this.getAttribute("aria-label") ?? undefined));
56
+ if (this.#input.value !== s.value)
57
+ this.#input.value = s.value;
58
+ const layout = this.#layout();
59
+ const key = `${s.length}:${layout.join(",")}`;
60
+ if (key !== this.#built) {
61
+ this.#built = key;
62
+ this.querySelectorAll("[data-part=group], [data-part=separator]").forEach((n) => n.remove());
63
+ layout.forEach((n, gi) => {
64
+ if (gi > 0)
65
+ this.append(el("div", { "data-part": "separator", role: "separator" }));
66
+ const g = el("div", { "data-part": "group" });
67
+ for (let i = 0; i < n; i++)
68
+ g.append(el("div", { "data-part": "slot" }));
69
+ this.append(g);
70
+ });
71
+ }
72
+ const slots = getOtpSlots(s);
73
+ this.querySelectorAll("[data-part=slot]").forEach((node, i) => {
74
+ applyAttrs(node, getOtpProps(s, "slot", slots[i]));
75
+ const info = slots[i];
76
+ node.textContent = info.char;
77
+ if (info.caret)
78
+ node.append(el("span", { "data-part": "caret" }));
79
+ });
80
+ }
81
+ }
82
+ define("loccal-input-otp", LoccalInputOtp);
@@ -0,0 +1,14 @@
1
+ import { type NavMenuItem } from "@loccal/core";
2
+ import { LoccalElement } from "./base.ts";
3
+ /**
4
+ * `<loccal-navigation-menu>` com a propriedade `items` ({ id, label, href?, active?, title?, links?: [{ label, href, description?, active? }] }).
5
+ * Itens com `links` abrem um painel (clique, hover ou ArrowDown); setas movem entre itens, Esc fecha. Evento: `loccal-open-change` { open }.
6
+ */
7
+ export declare class LoccalNavigationMenu extends LoccalElement {
8
+ #private;
9
+ static observedAttributes: string[];
10
+ get items(): NavMenuItem[];
11
+ set items(v: NavMenuItem[]);
12
+ protected setup(): void;
13
+ protected update(): void;
14
+ }
@@ -0,0 +1,75 @@
1
+ import { applyAttrs, bindNavigationMenu, createNavigationMenu, getNavigationMenuProps, hasPanel, NAVIGATION_MENU_LABELS, resolveLabels } from "@loccal/core";
2
+ import { define, el, LoccalElement } from "./base.js";
3
+ /**
4
+ * `<loccal-navigation-menu>` com a propriedade `items` ({ id, label, href?, active?, title?, links?: [{ label, href, description?, active? }] }).
5
+ * Itens com `links` abrem um painel (clique, hover ou ArrowDown); setas movem entre itens, Esc fecha. Evento: `loccal-open-change` { open }.
6
+ */
7
+ export class LoccalNavigationMenu extends LoccalElement {
8
+ static observedAttributes = ["locale", "labels"];
9
+ #machine = createNavigationMenu();
10
+ #pending;
11
+ #last = null;
12
+ get items() {
13
+ return this.#machine.state.items;
14
+ }
15
+ set items(v) {
16
+ if (this.ready)
17
+ this.#machine.send({ type: "SET_ITEMS", items: v });
18
+ else
19
+ this.#pending = v;
20
+ }
21
+ setup() {
22
+ if (this.#pending)
23
+ this.#machine.send({ type: "SET_ITEMS", items: this.#pending });
24
+ this.own(bindNavigationMenu(this, this.#machine));
25
+ this.own(this.#machine.subscribe(() => this.#render()));
26
+ }
27
+ update() {
28
+ this.#render();
29
+ }
30
+ #render() {
31
+ const s = this.#machine.state;
32
+ const base = this.uid;
33
+ const l = resolveLabels(NAVIGATION_MENU_LABELS, this.locale, this.labels);
34
+ applyAttrs(this, getNavigationMenuProps(s, "root", base, { label: this.getAttribute("aria-label") ?? l.label }));
35
+ const focused = this.contains(document.activeElement) ? document.activeElement : null;
36
+ const focusKey = focused ? [focused.getAttribute("data-part"), focused.getAttribute("data-id"), focused.getAttribute("href")] : null;
37
+ const list = el("ul", {});
38
+ applyAttrs(list, getNavigationMenuProps(s, "list", base));
39
+ for (const item of s.items) {
40
+ const li = el("li", {});
41
+ applyAttrs(li, getNavigationMenuProps(s, "item", base, { item }));
42
+ if (hasPanel(item)) {
43
+ const trigger = el("button", {}, item.label, el("span", { "data-part": "chevron", "aria-hidden": "true" }, "▾"));
44
+ applyAttrs(trigger, getNavigationMenuProps(s, "trigger", base, { item }));
45
+ const panel = el("div", {});
46
+ applyAttrs(panel, getNavigationMenuProps(s, "panel", base, { item }));
47
+ if (item.title)
48
+ panel.append(el("div", { "data-part": "panel-title" }, item.title));
49
+ for (const link of item.links) {
50
+ const a = el("a", {}, el("span", { "data-part": "panel-link-label" }, link.label), ...(link.description ? [el("span", { "data-part": "panel-link-description" }, link.description)] : []));
51
+ applyAttrs(a, getNavigationMenuProps(s, "panel-link", base, { link }));
52
+ panel.append(a);
53
+ }
54
+ li.append(trigger, panel);
55
+ }
56
+ else {
57
+ const a = el("a", {}, item.label);
58
+ applyAttrs(a, getNavigationMenuProps(s, "link", base, { item }));
59
+ li.append(a);
60
+ }
61
+ list.append(li);
62
+ }
63
+ this.replaceChildren(list);
64
+ if (focusKey && (focusKey[0] === "panel-link" || focusKey[1] === s.active)) {
65
+ const [part, id, href] = focusKey;
66
+ const sel = part === "panel-link" ? `[data-part=panel-link][href="${href}"]` : `[data-part=${part}][data-id="${id}"]`;
67
+ this.querySelector(sel)?.focus();
68
+ }
69
+ if (s.open !== this.#last) {
70
+ this.#last = s.open;
71
+ this.emit("loccal-open-change", { open: s.open });
72
+ }
73
+ }
74
+ }
75
+ define("loccal-navigation-menu", LoccalNavigationMenu);
@@ -0,0 +1,13 @@
1
+ import { LoccalElement } from "./base.ts";
2
+ /**
3
+ * `<loccal-number-field value min max step fraction-digits unit disabled invalid aria-label>`: setas somam o passo (Shift e PageUp/PageDown x10),
4
+ * Home/End vao aos limites, aceita virgula decimal e confirma no blur ou Enter. Evento: `loccal-value-change` { value }.
5
+ */
6
+ export declare class LoccalNumberField extends LoccalElement {
7
+ #private;
8
+ static observedAttributes: string[];
9
+ get value(): number | null;
10
+ set value(v: number | null);
11
+ protected setup(): void;
12
+ protected update(): void;
13
+ }
@@ -0,0 +1,67 @@
1
+ import { applyAttrs, bindNumberField, createNumberField, getNumberFieldProps, loccalIcon, NUMBER_FIELD_LABELS, numberFieldText, resolveLabels } from "@loccal/core";
2
+ import { define, el, icon, LoccalElement } from "./base.js";
3
+ /**
4
+ * `<loccal-number-field value min max step fraction-digits unit disabled invalid aria-label>`: setas somam o passo (Shift e PageUp/PageDown x10),
5
+ * Home/End vao aos limites, aceita virgula decimal e confirma no blur ou Enter. Evento: `loccal-value-change` { value }.
6
+ */
7
+ export class LoccalNumberField extends LoccalElement {
8
+ static observedAttributes = ["value", "min", "max", "step", "fraction-digits", "unit", "disabled", "invalid", "aria-label", "locale", "labels"];
9
+ #machine = createNumberField({}, (value) => {
10
+ value === null ? this.removeAttribute("value") : this.setAttribute("value", String(value));
11
+ this.emit("loccal-value-change", { value });
12
+ });
13
+ #input;
14
+ get value() {
15
+ return this.#machine.state.value;
16
+ }
17
+ set value(v) {
18
+ this.#machine.send({ type: "SET", value: v });
19
+ }
20
+ #num(name) {
21
+ const v = this.getAttribute(name);
22
+ return v === null || v === "" || Number.isNaN(Number(v)) ? undefined : Number(v);
23
+ }
24
+ setup() {
25
+ if (!this.querySelector("[data-part=input]")) {
26
+ this.append(el("button", { "data-part": "decrease" }), el("input", { "data-part": "input" }), el("span", { "data-part": "unit" }), el("button", { "data-part": "increase" }));
27
+ this.querySelector("[data-part=decrease]").append(icon(loccalIcon("minus", 12)));
28
+ this.querySelector("[data-part=increase]").append(icon(loccalIcon("plus", 12)));
29
+ }
30
+ this.#input = this.querySelector("[data-part=input]");
31
+ this.own(bindNumberField(this, this.#machine));
32
+ this.own(this.#machine.subscribe(() => this.#render()));
33
+ }
34
+ update() {
35
+ const raw = this.getAttribute("value");
36
+ this.#machine.patch({
37
+ value: raw === null || raw === "" || Number.isNaN(Number(raw)) ? null : Number(raw),
38
+ min: this.#num("min"),
39
+ max: this.#num("max"),
40
+ step: this.#num("step") ?? 1,
41
+ fractionDigits: this.#num("fraction-digits"),
42
+ disabled: this.bool("disabled"),
43
+ invalid: this.bool("invalid"),
44
+ });
45
+ this.#render();
46
+ }
47
+ #render() {
48
+ const s = this.#machine.state;
49
+ const l = resolveLabels(NUMBER_FIELD_LABELS, this.locale, this.labels);
50
+ applyAttrs(this, getNumberFieldProps(s, "root"));
51
+ applyAttrs(this.#input, getNumberFieldProps(s, "input"));
52
+ const text = numberFieldText(s);
53
+ if (this.#input.value !== text)
54
+ this.#input.value = text;
55
+ const label = this.getAttribute("aria-label");
56
+ if (label)
57
+ this.#input.setAttribute("aria-label", label);
58
+ applyAttrs(this.querySelector("[data-part=decrease]"), getNumberFieldProps(s, "decrease", l));
59
+ applyAttrs(this.querySelector("[data-part=increase]"), getNumberFieldProps(s, "increase", l));
60
+ const unit = this.querySelector("[data-part=unit]");
61
+ if (unit) {
62
+ unit.textContent = this.getAttribute("unit") ?? "";
63
+ unit.hidden = !unit.textContent;
64
+ }
65
+ }
66
+ }
67
+ define("loccal-number-field", LoccalNumberField);
@@ -0,0 +1,14 @@
1
+ import { LoccalElement } from "./base.ts";
2
+ /**
3
+ * `<loccal-resizable orientation="horizontal" sizes="30,70" min="10" step="5">` com filhos `[data-part=panel]`. Os separadores sao
4
+ * criados entre os paineis se nao existirem. Arraste ou use setas, Home e End no separador. Evento: `loccal-resize` { sizes }.
5
+ */
6
+ export declare class LoccalResizable extends LoccalElement {
7
+ #private;
8
+ static deferWhenEmpty: boolean;
9
+ static observedAttributes: string[];
10
+ get sizes(): number[];
11
+ set sizes(v: number[]);
12
+ protected setup(): void;
13
+ protected update(): void;
14
+ }
@@ -0,0 +1,57 @@
1
+ import { applyAttrs, bindResizable, createResizable, equalSizes, getResizableGroupProps, getResizableHandleProps, getResizablePanelProps, getResizablePanelStyle } from "@loccal/core";
2
+ import { define, el, LoccalElement } from "./base.js";
3
+ /**
4
+ * `<loccal-resizable orientation="horizontal" sizes="30,70" min="10" step="5">` com filhos `[data-part=panel]`. Os separadores sao
5
+ * criados entre os paineis se nao existirem. Arraste ou use setas, Home e End no separador. Evento: `loccal-resize` { sizes }.
6
+ */
7
+ export class LoccalResizable extends LoccalElement {
8
+ static deferWhenEmpty = true;
9
+ static observedAttributes = ["orientation", "sizes", "min", "step"];
10
+ #machine = createResizable({}, (sizes) => {
11
+ this.setAttribute("sizes", sizes.join(","));
12
+ this.emit("loccal-resize", { sizes });
13
+ });
14
+ get sizes() {
15
+ return this.#machine.state.sizes;
16
+ }
17
+ set sizes(v) {
18
+ this.setAttribute("sizes", v.join(","));
19
+ }
20
+ #panels() {
21
+ return Array.from(this.children).filter((c) => c.getAttribute("data-part") === "panel");
22
+ }
23
+ setup() {
24
+ const panels = this.#panels();
25
+ panels.forEach((p, i) => {
26
+ if (i > 0 && !p.previousElementSibling?.matches("[data-part=handle]"))
27
+ p.before(el("div", { "data-part": "handle" }));
28
+ });
29
+ this.own(bindResizable(this, this.#machine));
30
+ this.own(this.#machine.subscribe(() => this.#render()));
31
+ }
32
+ update() {
33
+ const n = this.#panels().length;
34
+ const raw = (this.getAttribute("sizes") ?? "").split(",").map((x) => Number(x)).filter((x) => !Number.isNaN(x) && x > 0);
35
+ const orientation = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal";
36
+ this.#machine.patch({
37
+ sizes: raw.length === n ? raw : equalSizes(n),
38
+ orientation,
39
+ min: Number(this.getAttribute("min") ?? 10) || 10,
40
+ step: Number(this.getAttribute("step") ?? 5) || 5,
41
+ });
42
+ this.#render();
43
+ }
44
+ #render() {
45
+ const s = this.#machine.state;
46
+ applyAttrs(this, getResizableGroupProps(s));
47
+ this.#panels().forEach((p, i) => {
48
+ p.id ||= `${this.uid}-panel-${i}`;
49
+ applyAttrs(p, getResizablePanelProps(s, i, p.id));
50
+ Object.assign(p.style, getResizablePanelStyle(s, i));
51
+ });
52
+ this.querySelectorAll(":scope > [data-part=handle]").forEach((h, i) => {
53
+ applyAttrs(h, getResizableHandleProps(s, i, this.#panels()[i]?.id ?? ""));
54
+ });
55
+ }
56
+ }
57
+ define("loccal-resizable", LoccalResizable);
@@ -0,0 +1,17 @@
1
+ import { type SelectOption } from "@loccal/core";
2
+ import { LoccalElement } from "./base.ts";
3
+ /**
4
+ * `<loccal-select name value placeholder disabled>` com filhos `<option value>` (lidos uma vez) ou propriedade `options`.
5
+ * Gera trigger (combobox), listbox, opcoes e `<input type=hidden>` para formularios nativos.
6
+ * Eventos: `loccal-value-change` { value } e `change`.
7
+ */
8
+ export declare class LoccalSelect extends LoccalElement {
9
+ #private;
10
+ static observedAttributes: string[];
11
+ get options(): SelectOption[];
12
+ set options(options: SelectOption[]);
13
+ get value(): string | undefined;
14
+ set value(v: string | undefined);
15
+ protected setup(): void;
16
+ protected update(): void;
17
+ }
@@ -0,0 +1,80 @@
1
+ import { applyAttrs, bindSelect, createSelect, getSelectProps, loccalIcon, optionId, resolveLabels, selectedLabel, SELECT_LABELS } from "@loccal/core";
2
+ import { define, el, icon, LoccalElement } from "./base.js";
3
+ /**
4
+ * `<loccal-select name value placeholder disabled>` com filhos `<option value>` (lidos uma vez) ou propriedade `options`.
5
+ * Gera trigger (combobox), listbox, opcoes e `<input type=hidden>` para formularios nativos.
6
+ * Eventos: `loccal-value-change` { value } e `change`.
7
+ */
8
+ export class LoccalSelect extends LoccalElement {
9
+ static observedAttributes = ["value", "name", "placeholder", "disabled", "locale", "labels"];
10
+ #machine = createSelect({}, (value) => {
11
+ this.setAttribute("value", value);
12
+ this.emit("loccal-value-change", { value });
13
+ this.dispatchEvent(new Event("change", { bubbles: true }));
14
+ });
15
+ #trigger;
16
+ #valueEl;
17
+ #listbox;
18
+ #input;
19
+ #optionsKey = "";
20
+ #pending;
21
+ get options() {
22
+ return this.#machine.state.options;
23
+ }
24
+ set options(options) {
25
+ if (!this.ready)
26
+ this.#pending = options;
27
+ else
28
+ this.#machine.send({ type: "SET_OPTIONS", options });
29
+ }
30
+ get value() {
31
+ return this.#machine.state.value;
32
+ }
33
+ set value(v) {
34
+ v === undefined ? this.removeAttribute("value") : this.setAttribute("value", v);
35
+ }
36
+ get #ids() {
37
+ return { trigger: `${this.uid}-trigger`, listbox: `${this.uid}-listbox`, option: `${this.uid}-opt` };
38
+ }
39
+ setup() {
40
+ const fromDom = Array.from(this.querySelectorAll("option")).map((o) => ({ value: o.value, label: o.textContent?.trim() ?? o.value, disabled: o.disabled }));
41
+ const selected = this.querySelector("option[selected]")?.getAttribute("value") ?? undefined;
42
+ this.replaceChildren();
43
+ this.#valueEl = el("span", { "data-part": "value" });
44
+ this.#trigger = el("button", {}, this.#valueEl, icon(loccalIcon("chevron-down", 16)));
45
+ this.#listbox = el("div");
46
+ this.#input = el("input");
47
+ this.append(this.#trigger, this.#listbox, this.#input);
48
+ this.#machine.send({ type: "SET_OPTIONS", options: this.#pending ?? fromDom });
49
+ if (selected !== undefined && !this.hasAttribute("value"))
50
+ this.#machine.patch({ value: selected });
51
+ this.own(bindSelect({ trigger: this.#trigger, listbox: this.#listbox }, this.#machine));
52
+ this.own(this.#machine.subscribe(() => this.#render()));
53
+ }
54
+ update() {
55
+ const attrValue = this.getAttribute("value");
56
+ this.#machine.patch({ value: attrValue ?? this.#machine.state.value, disabled: this.hasAttribute("disabled") && this.getAttribute("disabled") !== "false" });
57
+ this.#render();
58
+ }
59
+ #render() {
60
+ const s = this.#machine.state;
61
+ const ids = this.#ids;
62
+ const labels = resolveLabels(SELECT_LABELS, this.locale, this.labels);
63
+ applyAttrs(this, getSelectProps(s, "root", ids));
64
+ applyAttrs(this.#trigger, getSelectProps(s, "trigger", ids));
65
+ applyAttrs(this.#listbox, getSelectProps(s, "listbox", ids));
66
+ applyAttrs(this.#input, getSelectProps(s, "input", ids, { name: this.getAttribute("name") ?? undefined }));
67
+ this.#valueEl.textContent = selectedLabel(s) ?? this.getAttribute("placeholder") ?? labels.placeholder;
68
+ const key = JSON.stringify([s.options, labels.empty]);
69
+ if (key !== this.#optionsKey) {
70
+ this.#optionsKey = key;
71
+ this.#listbox.replaceChildren(...s.options.map((o) => el("div", {}, el("span", { "data-part": "option-label" }, o.label), icon(loccalIcon("check", 14)))));
72
+ if (s.options.length === 0)
73
+ this.#listbox.append(el("div", { "data-part": "empty" }, labels.empty));
74
+ }
75
+ Array.from(this.#listbox.querySelectorAll("[data-part=option], :scope > div:not([data-part=empty])")).forEach((node, i) => applyAttrs(node, getSelectProps(s, "option", ids, { index: i })));
76
+ if (s.open && s.active >= 0)
77
+ this.querySelector(`#${CSS.escape(optionId(ids, s.active))}`)?.scrollIntoView?.({ block: "nearest" });
78
+ }
79
+ }
80
+ define("loccal-select", LoccalSelect);
@@ -0,0 +1 @@
1
+ export declare const STATIC_ELEMENTS: Record<string, CustomElementConstructor>;
@@ -0,0 +1,175 @@
1
+ // Custom elements da onda 1 (estaticos): um por entrada de STATIC_SPECS, gerados em loop.
2
+ // O elemento recebe `data-slot`/ARIA no proprio host (Light DOM); o CSS e o mesmo dos adaptadores.
3
+ import { applyAttrs, componentName, elementTag, getPartProps, getStaticProps, progressIndicatorStyle, STATIC_SPECS, staticEntries } from "@loccal/core";
4
+ import { define, LoccalElement } from "./base.js";
5
+ const TABLE_ROLES = {
6
+ table: "table",
7
+ "table-header": "rowgroup",
8
+ "table-body": "rowgroup",
9
+ "table-footer": "rowgroup",
10
+ "table-row": "row",
11
+ "table-head": "columnheader",
12
+ "table-cell": "cell",
13
+ "table-caption": "caption",
14
+ };
15
+ /** Papeis ARIA dos hosts cujo elemento nativo (ol, li, nav) nao existe em um custom element. */
16
+ const LIST_ROLES = {
17
+ breadcrumb: "navigation",
18
+ "breadcrumb-list": "list",
19
+ "breadcrumb-item": "listitem",
20
+ pagination: "navigation",
21
+ "pagination-content": "list",
22
+ "pagination-item": "listitem",
23
+ stepper: "list",
24
+ "hash-chain": "list",
25
+ "hash-chain-item": "listitem",
26
+ "model-list": "list",
27
+ "model-list-item": "listitem",
28
+ "stepper-item": "listitem",
29
+ timeline: "list",
30
+ "timeline-item": "listitem",
31
+ };
32
+ /** Atributos lidos do host (os mesmos nomes das props dos adaptadores). */
33
+ const OBSERVED = ["state", "variant", "size", "orientation", "decorative", "value", "max", "invalid", "locale", "labels"];
34
+ function make(slug, part) {
35
+ const key = part ? `${slug}-${part}` : slug;
36
+ return class extends LoccalElement {
37
+ static observedAttributes = OBSERVED;
38
+ setup() {
39
+ if (slug === "progress" && !part && !this.querySelector(":scope > [data-slot=progress-indicator]")) {
40
+ const bar = document.createElement("div");
41
+ applyAttrs(bar, getPartProps("progress", "indicator"));
42
+ this.append(bar);
43
+ }
44
+ }
45
+ update() {
46
+ const attrs = part
47
+ ? getPartProps(slug, part, { state: this.getAttribute("state") ?? undefined })
48
+ : getStaticProps(slug, {
49
+ variant: this.getAttribute("variant") ?? undefined,
50
+ size: this.getAttribute("size") ?? undefined,
51
+ orientation: this.getAttribute("orientation") ?? undefined,
52
+ decorative: this.hasAttribute("decorative") ? this.bool("decorative") : undefined,
53
+ value: this.hasAttribute("value") ? Number(this.getAttribute("value")) : undefined,
54
+ max: this.hasAttribute("max") ? Number(this.getAttribute("max")) : undefined,
55
+ invalid: this.bool("invalid"),
56
+ locale: this.locale,
57
+ labels: this.labels,
58
+ });
59
+ if (TABLE_ROLES[key])
60
+ attrs.role = TABLE_ROLES[key];
61
+ if (LIST_ROLES[key])
62
+ attrs.role = LIST_ROLES[key];
63
+ applyAttrs(this, attrs);
64
+ if (slug === "progress" && !part) {
65
+ const bar = this.querySelector(":scope > [data-slot=progress-indicator]");
66
+ const style = progressIndicatorStyle(this.hasAttribute("value") ? Number(this.getAttribute("value")) : undefined, this.hasAttribute("max") ? Number(this.getAttribute("max")) : undefined);
67
+ if (bar)
68
+ style ? bar.setAttribute("style", style) : bar.removeAttribute("style");
69
+ }
70
+ if (slug === "label" && !part)
71
+ this.style.cursor = "default";
72
+ }
73
+ };
74
+ }
75
+ /** Elementos de formulario nativos: o host envolve um `<input>`/`<textarea>` (formularios e teclado nativos). */
76
+ const FORWARD = ["type", "name", "placeholder", "disabled", "readonly", "required", "autocomplete", "min", "max", "step", "pattern", "minlength", "maxlength", "rows", "cols", "inputmode", "autofocus"];
77
+ function makeNative(slug) {
78
+ return class extends LoccalElement {
79
+ static observedAttributes = [...FORWARD, "value", "invalid"];
80
+ #inner;
81
+ get control() {
82
+ return this.#inner;
83
+ }
84
+ get value() {
85
+ return this.#inner?.value ?? this.getAttribute("value") ?? "";
86
+ }
87
+ set value(v) {
88
+ if (this.#inner)
89
+ this.#inner.value = v;
90
+ else
91
+ this.setAttribute("value", v);
92
+ }
93
+ focus(options) {
94
+ this.#inner ? this.#inner.focus(options) : super.focus(options);
95
+ }
96
+ setup() {
97
+ const tag = slug === "slider" ? "input" : slug;
98
+ const existing = this.querySelector(`:scope > ${tag}`);
99
+ this.#inner = existing ?? document.createElement(tag);
100
+ if (!existing)
101
+ this.append(this.#inner);
102
+ }
103
+ update() {
104
+ const inner = this.#inner;
105
+ for (const name of FORWARD) {
106
+ const v = this.getAttribute(name);
107
+ v === null || (name === "disabled" && v === "false") ? inner.removeAttribute(name) : inner.setAttribute(name, v);
108
+ }
109
+ if (this.hasAttribute("value") && inner.value !== this.getAttribute("value"))
110
+ inner.value = this.getAttribute("value");
111
+ applyAttrs(inner, getStaticProps(slug, { invalid: this.bool("invalid") }));
112
+ }
113
+ };
114
+ }
115
+ /** `<loccal-avatar-image src alt>`: cria o `<img>` e some quando a imagem falha, revelando o fallback. */
116
+ class LoccalAvatarImage extends LoccalElement {
117
+ static observedAttributes = ["src", "alt"];
118
+ #img;
119
+ setup() {
120
+ applyAttrs(this, { "data-slot": "avatar-image-host" });
121
+ const existing = this.querySelector(":scope > img");
122
+ this.#img = existing ?? document.createElement("img");
123
+ applyAttrs(this.#img, getPartProps("avatar", "image"));
124
+ this.#img.addEventListener("error", () => (this.#img.hidden = true));
125
+ this.#img.addEventListener("load", () => (this.#img.hidden = false));
126
+ if (!existing)
127
+ this.append(this.#img);
128
+ }
129
+ update() {
130
+ this.#img.alt = this.getAttribute("alt") ?? "";
131
+ const src = this.getAttribute("src");
132
+ if (src) {
133
+ this.#img.hidden = false;
134
+ this.#img.src = src;
135
+ }
136
+ else
137
+ this.#img.hidden = true;
138
+ }
139
+ }
140
+ /** Partes que sao link (`<a>`): o host envolve um `<a>` nativo com href, target, rel e aria-current. */
141
+ function makeAnchor(slug, part) {
142
+ return class extends LoccalElement {
143
+ static observedAttributes = ["href", "target", "rel", "aria-current", "download"];
144
+ #a;
145
+ get anchor() {
146
+ return this.#a;
147
+ }
148
+ setup() {
149
+ const existing = this.querySelector(":scope > a");
150
+ if (existing)
151
+ this.#a = existing;
152
+ else {
153
+ this.#a = document.createElement("a");
154
+ this.#a.append(...Array.from(this.childNodes));
155
+ this.append(this.#a);
156
+ }
157
+ }
158
+ update() {
159
+ applyAttrs(this.#a, getPartProps(slug, part));
160
+ for (const n of ["href", "target", "rel", "aria-current", "download"]) {
161
+ const v = this.getAttribute(n);
162
+ v === null ? this.#a.removeAttribute(n) : this.#a.setAttribute(n, v);
163
+ }
164
+ }
165
+ };
166
+ }
167
+ export const STATIC_ELEMENTS = {};
168
+ for (const { slug, part } of staticEntries()) {
169
+ const tag = elementTag(slug, part);
170
+ const spec = STATIC_SPECS[slug];
171
+ const isAnchor = !!part && spec.parts?.[part]?.tag === "a";
172
+ const ctor = isAnchor ? makeAnchor(slug, part) : slug === "avatar" && part === "image" ? LoccalAvatarImage : (slug === "input" || slug === "textarea" || slug === "slider") && !part ? makeNative(slug) : make(slug, part);
173
+ STATIC_ELEMENTS[componentName(slug, part)] = ctor;
174
+ define(tag, ctor);
175
+ }
@@ -0,0 +1,11 @@
1
+ import { type StatusItem } from "@loccal/core";
2
+ import { LoccalElement } from "./base.ts";
3
+ /** `<loccal-status-bar>` com propriedade `items: StatusItem[]`. Altura 24px, `tabular-nums`. Clique em item interativo: `loccal-item-click` { id }. */
4
+ export declare class LoccalStatusBar extends LoccalElement {
5
+ #private;
6
+ static observedAttributes: string[];
7
+ get items(): StatusItem[];
8
+ set items(items: StatusItem[]);
9
+ protected setup(): void;
10
+ protected update(): void;
11
+ }