@luxalgo/vela-ui 0.1.0 → 0.2.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 (122) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +5 -2
  3. package/dist/badge.js +2 -2
  4. package/dist/bar-chart.d.ts +1 -1
  5. package/dist/bar-chart.js +2 -2
  6. package/dist/button.d.ts +18 -4
  7. package/dist/button.js +4 -3
  8. package/dist/calendar.d.ts +3 -1
  9. package/dist/calendar.js +1 -1
  10. package/dist/callout-bubble.d.ts +7 -2
  11. package/dist/callout-bubble.js +12 -8
  12. package/dist/checkbox.js +4 -4
  13. package/dist/{chunk-SAPURP46.js → chunk-7VMN7NKJ.js} +3 -3
  14. package/dist/{chunk-OBLIX3VN.js → chunk-B5ZSRUDQ.js} +3 -3
  15. package/dist/{chunk-6NXY62JS.js → chunk-C3ICYMI3.js} +2 -2
  16. package/dist/chunk-CC3DDNFC.js +117 -0
  17. package/dist/{chunk-FCO3YZLT.js → chunk-E2FE6V2N.js} +2 -2
  18. package/dist/{chunk-V6TTTMTE.js → chunk-GVRX3UAV.js} +4 -1
  19. package/dist/{chunk-2Q4JRINP.js → chunk-MJ4RUGX7.js} +4 -4
  20. package/dist/{chunk-X4YPSIW6.js → chunk-U3EH42YY.js} +2 -2
  21. package/dist/{chunk-AJ2IYSOI.js → chunk-V2Q4MRMS.js} +23 -3
  22. package/dist/{chunk-XJAPCCOJ.js → chunk-WBGSYCV2.js} +3 -3
  23. package/dist/{chunk-5QHXOAZA.js → chunk-WGULXRWD.js} +4 -4
  24. package/dist/{chunk-ZB3BZHSN.js → chunk-WXH3EFV5.js} +3 -3
  25. package/dist/chunk-XBEL4K33.js +142 -0
  26. package/dist/{chunk-CH3DV6FD.js → chunk-Z5PINFQO.js} +4 -4
  27. package/dist/collapsible.d.ts +49 -0
  28. package/dist/collapsible.js +106 -0
  29. package/dist/color-picker.js +6 -6
  30. package/dist/context-menu.js +5 -5
  31. package/dist/css.d.ts +3 -1
  32. package/dist/css.js +1 -1
  33. package/dist/data-table.d.ts +39 -2
  34. package/dist/data-table.js +2 -2
  35. package/dist/date-picker.d.ts +1 -1
  36. package/dist/date-picker.js +3 -3
  37. package/dist/dialog.d.ts +1 -1
  38. package/dist/dialog.js +5 -5
  39. package/dist/donut.d.ts +1 -1
  40. package/dist/donut.js +2 -2
  41. package/dist/drawer.d.ts +1 -1
  42. package/dist/drawer.js +3 -3
  43. package/dist/dropdown-menu.d.ts +1 -1
  44. package/dist/dropdown-menu.js +4 -4
  45. package/dist/empty.d.ts +1 -1
  46. package/dist/empty.js +2 -2
  47. package/dist/field.js +12 -12
  48. package/dist/glyph-select.js +5 -5
  49. package/dist/h-Bl37qUis.d.ts +24 -0
  50. package/dist/hover-card.d.ts +1 -1
  51. package/dist/hover-card.js +3 -3
  52. package/dist/index.d.ts +7 -1
  53. package/dist/index.js +3 -3
  54. package/dist/input-group.d.ts +1 -1
  55. package/dist/input-group.js +4 -3
  56. package/dist/input.js +3 -3
  57. package/dist/item.d.ts +72 -0
  58. package/dist/item.js +131 -0
  59. package/dist/kbd.d.ts +1 -1
  60. package/dist/kbd.js +3 -3
  61. package/dist/line-chart.d.ts +1 -1
  62. package/dist/line-chart.js +2 -2
  63. package/dist/manifest.json +665 -11
  64. package/dist/month-grid.d.ts +45 -0
  65. package/dist/month-grid.js +157 -0
  66. package/dist/number-input.d.ts +1 -1
  67. package/dist/number-input.js +4 -4
  68. package/dist/popover.js +4 -4
  69. package/dist/scatter-chart.d.ts +1 -1
  70. package/dist/scatter-chart.js +2 -2
  71. package/dist/select.js +6 -6
  72. package/dist/slider.d.ts +46 -0
  73. package/dist/slider.js +111 -0
  74. package/dist/sort-button.d.ts +41 -0
  75. package/dist/sort-button.js +88 -0
  76. package/dist/sparkline.d.ts +1 -1
  77. package/dist/sparkline.js +2 -2
  78. package/dist/stat.d.ts +1 -1
  79. package/dist/stat.js +2 -2
  80. package/dist/switch.d.ts +1 -1
  81. package/dist/switch.js +3 -3
  82. package/dist/tabs.d.ts +3 -1
  83. package/dist/tabs.js +12 -7
  84. package/dist/text-area.d.ts +1 -1
  85. package/dist/text-area.js +3 -3
  86. package/dist/theme.d.ts +17 -6
  87. package/dist/theme.js +2 -2
  88. package/dist/theme.schema.json +250 -1
  89. package/dist/toggle-group.d.ts +1 -1
  90. package/dist/toggle-group.js +3 -3
  91. package/dist/tooltip.js +3 -3
  92. package/docs/theming.md +6 -0
  93. package/docs/writing-a-component.md +4 -1
  94. package/llms.txt +8 -3
  95. package/package.json +1 -1
  96. package/registry/button.ts +97 -21
  97. package/registry/callout-bubble.ts +14 -3
  98. package/registry/collapsible.ts +271 -0
  99. package/registry/dropdown-menu.ts +3 -3
  100. package/registry/item.ts +376 -0
  101. package/registry/month-grid.ts +328 -0
  102. package/registry/slider.ts +259 -0
  103. package/registry/sort-button.ts +189 -0
  104. package/registry/tabs.ts +38 -4
  105. package/skills/using-vela-ui-components/SKILL.md +12 -9
  106. package/src/components/button.ts +97 -21
  107. package/src/components/callout-bubble.ts +14 -3
  108. package/src/components/collapsible.ts +271 -0
  109. package/src/components/dropdown-menu.ts +3 -3
  110. package/src/components/item.ts +376 -0
  111. package/src/components/month-grid.ts +328 -0
  112. package/src/components/slider.ts +259 -0
  113. package/src/components/sort-button.ts +189 -0
  114. package/src/components/tabs.ts +38 -4
  115. package/src/lib/calendar.ts +5 -0
  116. package/src/lib/component-index.ts +22 -2
  117. package/src/lib/css.ts +6 -2
  118. package/src/lib/scope.ts +135 -0
  119. package/src/lib/theme.ts +15 -5
  120. package/dist/chunk-EZQXTO6K.js +0 -89
  121. package/dist/chunk-IDA2BT7D.js +0 -29
  122. package/dist/data-table-DtU3FX9j.d.ts +0 -61
@@ -1,29 +0,0 @@
1
- import { injectLayerOrder, injectStyles } from './chunk-2GQIZM5Z.js';
2
- import { pageState } from './chunk-X66RJAIS.js';
3
-
4
- // src/lib/css.ts
5
- var written = pageState("written-css@1", () => /* @__PURE__ */ new Set());
6
- function css(strings, ...values) {
7
- let out = strings[0] ?? "";
8
- for (let i = 0; i < values.length; i += 1) out += String(values[i]) + (strings[i + 1] ?? "");
9
- written.add(out);
10
- return out;
11
- }
12
- function isWrittenCss(text) {
13
- return written.has(text);
14
- }
15
- function acceptCss(text) {
16
- written.add(text);
17
- }
18
- function defineStyles(id, text) {
19
- const injected = /* @__PURE__ */ new WeakMap();
20
- return (root = document) => {
21
- if (injected.get(root)?.isConnected) return;
22
- injectLayerOrder(root);
23
- injectStyles(id, text, root);
24
- const sheet = root.getElementById?.(id) ?? (root instanceof Document ? null : root.querySelector(`#${CSS.escape(id)}`));
25
- if (sheet) injected.set(root, sheet);
26
- };
27
- }
28
-
29
- export { acceptCss, css, defineStyles, isWrittenCss };
@@ -1,61 +0,0 @@
1
- import { C as ComponentDef } from './define-D5u3F5Dj.js';
2
-
3
- type Child = Node | string | number | null | undefined | false | readonly Child[];
4
- type AttrValue = string | number | boolean | null | undefined;
5
- interface ElementProps {
6
- className?: string;
7
- /** The part's `data-slot` (take it from the component's `defineComponent`). */
8
- slot?: string;
9
- /** `data-*` attributes (`{ icon: 'inline-start' }` → `data-icon="inline-start"`). `true`
10
- * writes an empty value; `false`, `null` and `undefined` write nothing. */
11
- data?: Record<string, AttrValue>;
12
- /** Plain attributes, with the same value rules as `data`. */
13
- attrs?: Record<string, AttrValue>;
14
- style?: string;
15
- text?: string;
16
- on?: {
17
- [K in keyof HTMLElementEventMap]?: (e: HTMLElementEventMap[K]) => void;
18
- };
19
- }
20
- declare function h<K extends keyof HTMLElementTagNameMap>(tag: K, props?: ElementProps, ...children: Child[]): HTMLElementTagNameMap[K];
21
- declare function append(el: Node, children: readonly Child[]): void;
22
- /** Add a part to an element's slot, keeping the ones it has: a shell one component owns and
23
- * another builds on carries both (`data-slot="popover-content select-content"`). */
24
- declare function addSlot(el: Element, slot: string): void;
25
-
26
- declare const dataTableDef: ComponentDef<"data-table", "head" | "table" | "sort" | "root" | "actions" | "row" | "cell" | "empty", "row-height" | "head-height" | "head-z">;
27
- interface DataTableColumn<T> {
28
- id: string;
29
- header: string;
30
- /** What the header stands for, on hover (`MFE`: maximum favorable excursion). */
31
- title?: string;
32
- align?: 'start' | 'end' | 'center';
33
- width?: string;
34
- /** The cell's content; a string or a number renders as text. */
35
- cell(row: T): Child;
36
- /** The value the column sorts by; without it the column does not sort. */
37
- sort?(row: T): number | string;
38
- tone?(row: T): 'profit' | 'loss' | 'muted' | null;
39
- }
40
- interface DataTableProps<T> {
41
- columns: readonly DataTableColumn<T>[];
42
- rowKey(row: T): string;
43
- onRowClick?(row: T, e: MouseEvent): void;
44
- /** What shows when there are no rows. */
45
- empty?: () => HTMLElement;
46
- /** The initial sort. */
47
- sort?: {
48
- column: string;
49
- dir: 'asc' | 'desc';
50
- };
51
- /** Extra class names (layout hooks). */
52
- className?: string;
53
- }
54
- interface DataTableHandle<T> {
55
- readonly el: HTMLElement;
56
- setRows(rows: readonly T[]): void;
57
- destroy(): void;
58
- }
59
- declare function createDataTable<T>(props: DataTableProps<T>): DataTableHandle<T>;
60
-
61
- export { type Child as C, type DataTableColumn as D, type ElementProps as E, addSlot as a, append as b, type DataTableHandle as c, dataTableDef as d, type DataTableProps as e, createDataTable as f, h };