@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
package/dist/switch.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { variants } from './chunk-LZWZV2ZS.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
3
2
  import { ownTeardown } from './chunk-A72NWYNP.js';
3
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
4
4
  import { h } from './chunk-Q6WTDVH6.js';
5
- import { t } from './chunk-6QCILIT2.js';
6
5
  import { defineComponent } from './chunk-VMCR3S2A.js';
7
- import { defineStyles, css } from './chunk-IDA2BT7D.js';
6
+ import { defineStyles, css } from './chunk-XBEL4K33.js';
8
7
  import './chunk-2GQIZM5Z.js';
9
8
  import './chunk-BXMWQIBO.js';
10
9
  import './chunk-X66RJAIS.js';
10
+ import { t } from './chunk-6QCILIT2.js';
11
11
  import * as zagSwitch from '@zag-js/switch';
12
12
 
13
13
  var switchDef = defineComponent({
package/dist/tabs.d.ts CHANGED
@@ -2,7 +2,7 @@ import { a as VariantProps, V as VariantFn } from './variants-B4stUBnY.js';
2
2
  import { C as ComponentDef } from './define-D5u3F5Dj.js';
3
3
  import './t.js';
4
4
 
5
- declare const tabsDef: ComponentDef<"tabs", "count" | "icon" | "trigger" | "content" | "list", "track-radius" | "trigger-radius" | "filled-radius" | "soft-radius" | "count-radius">;
5
+ declare const tabsDef: ComponentDef<"tabs", "count" | "label" | "icon" | "trigger" | "content" | "description" | "list", "track-radius" | "trigger-radius" | "filled-radius" | "soft-radius" | "count-radius">;
6
6
  declare const tabsVariants: VariantFn<{
7
7
  readonly variant: readonly ["default", "line", "filled", "soft", "nav"];
8
8
  }>;
@@ -17,6 +17,8 @@ interface TabItem {
17
17
  icon?: string;
18
18
  /** A count after the label (open orders, trades); null shows none. */
19
19
  count?: number | null;
20
+ /** A second line under the label (a day strip's date under its weekday). */
21
+ description?: string;
20
22
  }
21
23
  interface TabsProps extends VariantProps<typeof tabsVariants> {
22
24
  items: readonly TabItem[];
package/dist/tabs.js CHANGED
@@ -1,26 +1,26 @@
1
1
  import { variants } from './chunk-LZWZV2ZS.js';
2
2
  import { iconEl } from './chunk-G7IQLY3A.js';
3
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
4
3
  import { ownTeardown } from './chunk-A72NWYNP.js';
4
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
5
5
  import { h } from './chunk-Q6WTDVH6.js';
6
- import { t } from './chunk-6QCILIT2.js';
7
6
  import { defineComponent } from './chunk-VMCR3S2A.js';
8
- import { css, defineStyles } from './chunk-IDA2BT7D.js';
7
+ import { css, defineStyles } from './chunk-XBEL4K33.js';
9
8
  import './chunk-2GQIZM5Z.js';
10
9
  import './chunk-BXMWQIBO.js';
11
10
  import './chunk-X66RJAIS.js';
11
+ import { t } from './chunk-6QCILIT2.js';
12
12
  import * as tabs from '@zag-js/tabs';
13
13
 
14
14
  var tabsDef = defineComponent({
15
15
  name: "tabs",
16
- parts: ["list", "trigger", "icon", "count", "content"],
16
+ parts: ["list", "trigger", "icon", "count", "label", "description", "content"],
17
17
  settings: { "track-radius": "8px", "trigger-radius": t.radius.md, "filled-radius": "5px", "soft-radius": "8px", "count-radius": "8px" }
18
18
  });
19
19
  var tabsVariants = variants({ variant: ["default", "line", "filled", "soft", "nav"] });
20
20
  var tabAvailable = (item) => !item.disabled && !item.hidden;
21
21
  var countEl = (count) => count == null ? null : h("span", { slot: tabsDef.slot("count"), text: String(count) });
22
22
  var TABS_STYLE_ID = "vela-ui-tabs";
23
- var TABS_CSS = css`@layer vela.ui{[data-slot=tabs-icon]{margin-inline-end:6px}[data-slot=tabs-count]{border-radius:${tabsDef.vars["count-radius"]};background:${t.hover};min-width:16px;height:16px;color:${t.fg.muted};font-variant-numeric:tabular-nums;margin-inline-start:6px;padding:0 5px;font-size:10px;font-weight:600}[data-slot=tabs-count]:where(:not([hidden])){justify-content:center;align-items:center;display:inline-flex}[data-slot=tabs-list]{display:flex}[data-slot=tabs-list][data-orientation=vertical]{flex-direction:column}[data-slot=tabs-list][data-variant=default]{box-sizing:border-box;border-radius:${tabsDef.vars["track-radius"]};background:color-mix(in srgb, ${t.fg.bright} 6%, transparent);gap:2px;padding:3px;display:inline-flex}[data-slot=tabs-list][data-variant=default][data-orientation=horizontal]{align-items:stretch;height:32px}[data-slot=tabs-list][data-variant=line]{border-bottom:1px solid ${t.border};gap:12px}[data-slot=tabs-list][data-variant=nav]{gap:2px}[data-slot=tabs-trigger]:where(:not([hidden])){all:unset;cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}[data-slot=tabs-trigger]:where(:not([hidden]))[data-disabled]{cursor:default;opacity:.45}[data-slot=tabs-trigger]:where(:not([hidden])):focus-visible{outline:2px solid ${t.focus};outline-offset:-2px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]{border-radius:${tabsDef.vars["trigger-radius"]};color:${t.fg.muted};transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease;justify-content:center;align-items:center;padding:0 10px;font-size:13px;font-weight:500;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-orientation=vertical]{justify-content:flex-start;padding:6px 10px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]:not([data-selected],[data-disabled]):hover{color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-selected]{background:color-mix(in srgb, ${t.fg.bright} 12%, transparent);color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]{color:${t.fg.muted};transition:color ${t.dur.fast} ease, border-color ${t.dur.fast} ease;border-bottom:2px solid #0000;margin-bottom:-1px;padding-bottom:8px;font-size:13px;font-weight:600;line-height:20px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]:not([data-selected],[data-disabled]):hover{color:${t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line][data-selected]{color:${t.fg};border-bottom-color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]{border-radius:${tabsDef.vars["filled-radius"]};color:${t.fg.muted};padding:3px 10px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]:not([data-selected],[data-disabled]):hover{color:${t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled][data-selected]{background:${t.selected.bg};color:${t.selected.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft]{border-radius:${tabsDef.vars["soft-radius"]};min-height:36px;color:${t.fg.muted};flex:none;align-items:center;padding:0 12px;font-size:13px;font-weight:600;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft][data-selected]{color:${t.fg.bright};background:${t.hover}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]{border-radius:${t.radius.md};color:${t.fg.muted};transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease;padding:9px 12px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]:not([data-selected],[data-disabled]):hover{background:${t.hover};color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav][data-selected]{background:${t.active};color:${t.fg.bright}}}`;
23
+ var TABS_CSS = css`@layer vela.ui{[data-slot=tabs-icon]{margin-inline-end:6px}[data-slot=tabs-count]{border-radius:${tabsDef.vars["count-radius"]};background:${t.hover};min-width:16px;height:16px;color:${t.fg.muted};font-variant-numeric:tabular-nums;margin-inline-start:6px;padding:0 5px;font-size:10px;font-weight:600}[data-slot=tabs-count]:where(:not([hidden])){justify-content:center;align-items:center;display:inline-flex}[data-slot=tabs-list]{display:flex}[data-slot=tabs-list][data-orientation=vertical]{flex-direction:column}[data-slot=tabs-list][data-variant=default]{box-sizing:border-box;border-radius:${tabsDef.vars["track-radius"]};background:color-mix(in srgb, ${t.fg.bright} 6%, transparent);gap:2px;padding:3px;display:inline-flex}[data-slot=tabs-list][data-variant=default][data-orientation=horizontal]{align-items:stretch;height:32px}[data-slot=tabs-list][data-variant=line]{border-bottom:1px solid ${t.border};gap:12px}[data-slot=tabs-list][data-variant=nav]{gap:2px}[data-slot=tabs-trigger]:where(:not([hidden])){all:unset;cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}[data-slot=tabs-trigger]:where(:not([hidden]))[data-disabled]{cursor:default;opacity:.45}[data-slot=tabs-trigger]:where(:not([hidden])):focus-visible{outline:2px solid ${t.focus};outline-offset:-2px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]{border-radius:${tabsDef.vars["trigger-radius"]};color:${t.fg.muted};transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease;justify-content:center;align-items:center;padding:0 10px;font-size:13px;font-weight:500;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-orientation=vertical]{justify-content:flex-start;padding:6px 10px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]:not([data-selected],[data-disabled]):hover{color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-selected]{background:color-mix(in srgb, ${t.fg.bright} 12%, transparent);color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]{color:${t.fg.muted};transition:color ${t.dur.fast} ease, border-color ${t.dur.fast} ease;border-bottom:2px solid #0000;margin-bottom:-1px;padding-bottom:8px;font-size:13px;font-weight:600;line-height:20px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]:not([data-selected],[data-disabled]):hover{color:${t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line][data-selected]{color:${t.fg};border-bottom-color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]{border-radius:${tabsDef.vars["filled-radius"]};color:${t.fg.muted};padding:3px 10px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]:not([data-selected],[data-disabled]):hover{color:${t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled][data-selected]{background:${t.selected.bg};color:${t.selected.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft]{border-radius:${tabsDef.vars["soft-radius"]};min-height:36px;color:${t.fg.muted};flex:none;align-items:center;padding:0 12px;font-size:13px;font-weight:600;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft][data-selected]{color:${t.fg.bright};background:${t.hover}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]{border-radius:${t.radius.md};color:${t.fg.muted};transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease;padding:9px 12px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]:not([data-selected],[data-disabled]):hover{background:${t.hover};color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav][data-selected]{background:${t.active};color:${t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-description]{flex-direction:column;justify-content:center;align-items:center;gap:2px;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-description]:not([data-variant=line]){padding-block:6px}[data-slot=tabs-list][data-variant=default]:has(>[data-description]){height:auto}[data-slot=tabs-label]{align-items:center;line-height:16px;display:inline-flex}[data-slot=tabs-description]{opacity:.85;font-size:11px;font-weight:400;line-height:14px}}`;
24
24
  var injectStyles = defineStyles(TABS_STYLE_ID, TABS_CSS);
25
25
  var TabsImpl = class {
26
26
  constructor(props) {
@@ -97,7 +97,7 @@ var TabsImpl = class {
97
97
  this.items = this.items.map((i) => i.value === value ? { ...i, count } : i);
98
98
  b.querySelector(`[data-slot="${tabsDef.slot("count")}"]`)?.remove();
99
99
  const el = countEl(count);
100
- if (el) b.appendChild(el);
100
+ if (el) (b.querySelector(`[data-slot="${tabsDef.slot("label")}"]`) ?? b).appendChild(el);
101
101
  }
102
102
  trigger(value) {
103
103
  return this.triggers.get(value) ?? null;
@@ -123,7 +123,12 @@ var TabsImpl = class {
123
123
  icon = iconEl(item.icon, document);
124
124
  icon.dataset.slot = tabsDef.slot("icon");
125
125
  }
126
- const b = h("button", { className, slot: tabsDef.slot("trigger"), data: { variant: this.variant } }, icon, item.label, countEl(item.count));
126
+ const b = item.description ? h(
127
+ "button",
128
+ { className, slot: tabsDef.slot("trigger"), data: { variant: this.variant, description: true } },
129
+ h("span", { slot: tabsDef.slot("label") }, icon, item.label, countEl(item.count)),
130
+ h("span", { slot: tabsDef.slot("description"), text: item.description })
131
+ ) : h("button", { className, slot: tabsDef.slot("trigger"), data: { variant: this.variant } }, icon, item.label, countEl(item.count));
127
132
  this.triggers.set(item.value, b);
128
133
  return b;
129
134
  })
@@ -22,7 +22,7 @@ interface TextAreaController {
22
22
  }
23
23
  /** The text area's last committed string, without DOM. */
24
24
  declare function textAreaController(opts?: TextAreaControllerOptions): TextAreaController;
25
- declare const textAreaDef: ComponentDef<"text-area", "input" | "root", "radius" | "focus-ring">;
25
+ declare const textAreaDef: ComponentDef<"text-area", "root" | "input", "radius" | "focus-ring">;
26
26
  declare const textAreaVariants: VariantFn<{
27
27
  readonly size: readonly ["md", "sm"];
28
28
  }>;
package/dist/text-area.js CHANGED
@@ -1,9 +1,9 @@
1
- export { TextArea, createTextArea, textAreaController, textAreaDef, textAreaVariants } from './chunk-FCO3YZLT.js';
1
+ export { TextArea, createTextArea, textAreaController, textAreaDef, textAreaVariants } from './chunk-E2FE6V2N.js';
2
2
  import './chunk-LZWZV2ZS.js';
3
3
  import './chunk-Q6WTDVH6.js';
4
- import './chunk-6QCILIT2.js';
5
4
  import './chunk-VMCR3S2A.js';
6
- import './chunk-IDA2BT7D.js';
5
+ import './chunk-XBEL4K33.js';
7
6
  import './chunk-2GQIZM5Z.js';
8
7
  import './chunk-BXMWQIBO.js';
9
8
  import './chunk-X66RJAIS.js';
9
+ import './chunk-6QCILIT2.js';
package/dist/theme.d.ts CHANGED
@@ -3,7 +3,7 @@ import { barChartDef } from './bar-chart.js';
3
3
  import { buttonDef } from './button.js';
4
4
  import { calloutBubbleDef } from './callout-bubble.js';
5
5
  import { colorPickerDef } from './color-picker.js';
6
- import { d as dataTableDef } from './data-table-DtU3FX9j.js';
6
+ import { dataTableDef } from './data-table.js';
7
7
  import { datePickerDef } from './date-picker.js';
8
8
  import { dialogDef } from './dialog.js';
9
9
  import { donutDef } from './donut.js';
@@ -22,10 +22,15 @@ import { selectDef } from './select.js';
22
22
  import { sparklineDef } from './sparkline.js';
23
23
  import { statDef } from './stat.js';
24
24
  import { checkboxDef } from './checkbox.js';
25
+ import { collapsibleDef } from './collapsible.js';
25
26
  import { tabsDef } from './tabs.js';
26
27
  import { textAreaDef } from './text-area.js';
27
28
  import { inputDef } from './input.js';
28
29
  import { inputGroupDef } from './input-group.js';
30
+ import { itemDef } from './item.js';
31
+ import { monthGridDef } from './month-grid.js';
32
+ import { sliderDef } from './slider.js';
33
+ import { sortButtonDef } from './sort-button.js';
29
34
  import { switchDef } from './switch.js';
30
35
  import { toggleGroupDef } from './toggle-group.js';
31
36
  import { tooltipDef } from './tooltip.js';
@@ -35,6 +40,7 @@ import './variants-B4stUBnY.js';
35
40
  import './t.js';
36
41
  import './placement.js';
37
42
  import './i18n.js';
43
+ import './h-Bl37qUis.js';
38
44
  import '@zag-js/dialog';
39
45
  import '@zag-js/menu';
40
46
  import '@zag-js/tooltip';
@@ -55,31 +61,36 @@ interface ComponentDefs {
55
61
  'bar-chart': typeof barChartDef;
56
62
  button: typeof buttonDef;
57
63
  'callout-bubble': typeof calloutBubbleDef;
64
+ checkbox: typeof checkboxDef;
65
+ collapsible: typeof collapsibleDef;
58
66
  'color-picker': typeof colorPickerDef;
59
67
  'data-table': typeof dataTableDef;
60
68
  'date-picker': typeof datePickerDef;
61
69
  dialog: typeof dialogDef;
62
70
  donut: typeof donutDef;
63
71
  drawer: typeof drawerDef;
72
+ 'dropdown-menu': typeof dropdownMenuDef;
64
73
  empty: typeof emptyDef;
65
74
  field: typeof fieldDef;
66
75
  'glyph-select': typeof glyphSelectDef;
67
76
  'hover-card': typeof hoverCardDef;
77
+ 'input-group': typeof inputGroupDef;
78
+ input: typeof inputDef;
79
+ item: typeof itemDef;
68
80
  kbd: typeof kbdDef;
69
81
  'line-chart': typeof lineChartDef;
70
- 'dropdown-menu': typeof dropdownMenuDef;
82
+ 'month-grid': typeof monthGridDef;
71
83
  'number-input': typeof numberInputDef;
72
84
  popover: typeof popoverDef;
73
85
  'scatter-chart': typeof scatterChartDef;
74
86
  select: typeof selectDef;
87
+ slider: typeof sliderDef;
88
+ 'sort-button': typeof sortButtonDef;
75
89
  sparkline: typeof sparklineDef;
76
90
  stat: typeof statDef;
77
- checkbox: typeof checkboxDef;
91
+ switch: typeof switchDef;
78
92
  tabs: typeof tabsDef;
79
93
  'text-area': typeof textAreaDef;
80
- input: typeof inputDef;
81
- 'input-group': typeof inputGroupDef;
82
- switch: typeof switchDef;
83
94
  'toggle-group': typeof toggleGroupDef;
84
95
  tooltip: typeof tooltipDef;
85
96
  }
package/dist/theme.js CHANGED
@@ -1,8 +1,8 @@
1
- export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyPlotOverlayTokens, applyTheme, applyThemeTokens, checkTheme, createTheme, ensureUIHost, floatingLayerHost, themeCss } from './chunk-AJ2IYSOI.js';
1
+ export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyPlotOverlayTokens, applyTheme, applyThemeTokens, checkTheme, createTheme, ensureUIHost, floatingLayerHost, themeCss } from './chunk-V2Q4MRMS.js';
2
2
  import './chunk-TAKSIV57.js';
3
3
  import './chunk-MMTMOV6R.js';
4
4
  import './chunk-VMCR3S2A.js';
5
- import './chunk-IDA2BT7D.js';
5
+ import './chunk-XBEL4K33.js';
6
6
  import './chunk-2GQIZM5Z.js';
7
7
  import './chunk-BXMWQIBO.js';
8
8
  import './chunk-X66RJAIS.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "@luxalgo/vela-ui 0.1.0 theme",
3
+ "title": "@luxalgo/vela-ui 0.2.0 theme",
4
4
  "description": "The input of createTheme. Every field is optional: an empty theme is the dark theme.",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
@@ -422,6 +422,10 @@
422
422
  "icon": {
423
423
  "type": "string",
424
424
  "description": "[data-slot~=\"button-icon\"]"
425
+ },
426
+ "keys": {
427
+ "type": "string",
428
+ "description": "[data-slot~=\"button-keys\"]"
425
429
  }
426
430
  }
427
431
  }
@@ -497,6 +501,55 @@
497
501
  }
498
502
  }
499
503
  },
504
+ "collapsible": {
505
+ "type": "object",
506
+ "additionalProperties": false,
507
+ "properties": {
508
+ "trigger-height": {
509
+ "type": "string",
510
+ "description": "--vela-collapsible-trigger-height, default 36px"
511
+ },
512
+ "radius": {
513
+ "type": "string",
514
+ "description": "--vela-collapsible-radius, default var(--vela-radius-md)"
515
+ },
516
+ "css": {
517
+ "type": "object",
518
+ "additionalProperties": false,
519
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
520
+ "properties": {
521
+ "root": {
522
+ "type": "string",
523
+ "description": "[data-slot~=\"collapsible\"]"
524
+ },
525
+ "trigger": {
526
+ "type": "string",
527
+ "description": "[data-slot~=\"collapsible-trigger\"]"
528
+ },
529
+ "icon": {
530
+ "type": "string",
531
+ "description": "[data-slot~=\"collapsible-icon\"]"
532
+ },
533
+ "title": {
534
+ "type": "string",
535
+ "description": "[data-slot~=\"collapsible-title\"]"
536
+ },
537
+ "count": {
538
+ "type": "string",
539
+ "description": "[data-slot~=\"collapsible-count\"]"
540
+ },
541
+ "chevron": {
542
+ "type": "string",
543
+ "description": "[data-slot~=\"collapsible-chevron\"]"
544
+ },
545
+ "content": {
546
+ "type": "string",
547
+ "description": "[data-slot~=\"collapsible-content\"]"
548
+ }
549
+ }
550
+ }
551
+ }
552
+ },
500
553
  "color-picker": {
501
554
  "type": "object",
502
555
  "additionalProperties": false,
@@ -1166,6 +1219,59 @@
1166
1219
  }
1167
1220
  }
1168
1221
  },
1222
+ "item": {
1223
+ "type": "object",
1224
+ "additionalProperties": false,
1225
+ "properties": {
1226
+ "radius": {
1227
+ "type": "string",
1228
+ "description": "--vela-item-radius, default var(--vela-radius-md)"
1229
+ },
1230
+ "gap": {
1231
+ "type": "string",
1232
+ "description": "--vela-item-gap, default 10px"
1233
+ },
1234
+ "css": {
1235
+ "type": "object",
1236
+ "additionalProperties": false,
1237
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1238
+ "properties": {
1239
+ "root": {
1240
+ "type": "string",
1241
+ "description": "[data-slot~=\"item\"]"
1242
+ },
1243
+ "media": {
1244
+ "type": "string",
1245
+ "description": "[data-slot~=\"item-media\"]"
1246
+ },
1247
+ "content": {
1248
+ "type": "string",
1249
+ "description": "[data-slot~=\"item-content\"]"
1250
+ },
1251
+ "title": {
1252
+ "type": "string",
1253
+ "description": "[data-slot~=\"item-title\"]"
1254
+ },
1255
+ "description": {
1256
+ "type": "string",
1257
+ "description": "[data-slot~=\"item-description\"]"
1258
+ },
1259
+ "meta": {
1260
+ "type": "string",
1261
+ "description": "[data-slot~=\"item-meta\"]"
1262
+ },
1263
+ "actions": {
1264
+ "type": "string",
1265
+ "description": "[data-slot~=\"item-actions\"]"
1266
+ },
1267
+ "group": {
1268
+ "type": "string",
1269
+ "description": "[data-slot~=\"item-group\"]"
1270
+ }
1271
+ }
1272
+ }
1273
+ }
1274
+ },
1169
1275
  "kbd": {
1170
1276
  "type": "object",
1171
1277
  "additionalProperties": false,
@@ -1248,6 +1354,63 @@
1248
1354
  }
1249
1355
  }
1250
1356
  },
1357
+ "month-grid": {
1358
+ "type": "object",
1359
+ "additionalProperties": false,
1360
+ "properties": {
1361
+ "radius": {
1362
+ "type": "string",
1363
+ "description": "--vela-month-grid-radius, default 8px"
1364
+ },
1365
+ "day-height": {
1366
+ "type": "string",
1367
+ "description": "--vela-month-grid-day-height, default 56px"
1368
+ },
1369
+ "gap": {
1370
+ "type": "string",
1371
+ "description": "--vela-month-grid-gap, default 4px"
1372
+ },
1373
+ "selected-ring": {
1374
+ "type": "string",
1375
+ "description": "--vela-month-grid-selected-ring, default `inset 0 0 0 1px ${t.selected.bg}`"
1376
+ },
1377
+ "css": {
1378
+ "type": "object",
1379
+ "additionalProperties": false,
1380
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1381
+ "properties": {
1382
+ "root": {
1383
+ "type": "string",
1384
+ "description": "[data-slot~=\"month-grid\"]"
1385
+ },
1386
+ "weekday": {
1387
+ "type": "string",
1388
+ "description": "[data-slot~=\"month-grid-weekday\"]"
1389
+ },
1390
+ "day": {
1391
+ "type": "string",
1392
+ "description": "[data-slot~=\"month-grid-day\"]"
1393
+ },
1394
+ "date": {
1395
+ "type": "string",
1396
+ "description": "[data-slot~=\"month-grid-date\"]"
1397
+ },
1398
+ "value": {
1399
+ "type": "string",
1400
+ "description": "[data-slot~=\"month-grid-value\"]"
1401
+ },
1402
+ "detail": {
1403
+ "type": "string",
1404
+ "description": "[data-slot~=\"month-grid-detail\"]"
1405
+ },
1406
+ "blank": {
1407
+ "type": "string",
1408
+ "description": "[data-slot~=\"month-grid-blank\"]"
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ },
1251
1414
  "number-input": {
1252
1415
  "type": "object",
1253
1416
  "additionalProperties": false,
@@ -1436,6 +1599,84 @@
1436
1599
  }
1437
1600
  }
1438
1601
  },
1602
+ "slider": {
1603
+ "type": "object",
1604
+ "additionalProperties": false,
1605
+ "properties": {
1606
+ "track-height": {
1607
+ "type": "string",
1608
+ "description": "--vela-slider-track-height, default 4px"
1609
+ },
1610
+ "thumb-size": {
1611
+ "type": "string",
1612
+ "description": "--vela-slider-thumb-size, default 14px"
1613
+ },
1614
+ "radius": {
1615
+ "type": "string",
1616
+ "description": "--vela-slider-radius, default 999px"
1617
+ },
1618
+ "focus-ring": {
1619
+ "type": "string",
1620
+ "description": "--vela-slider-focus-ring, default `0 0 0 3px ${t.focus.soft}`"
1621
+ },
1622
+ "css": {
1623
+ "type": "object",
1624
+ "additionalProperties": false,
1625
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1626
+ "properties": {
1627
+ "root": {
1628
+ "type": "string",
1629
+ "description": "[data-slot~=\"slider\"]"
1630
+ },
1631
+ "control": {
1632
+ "type": "string",
1633
+ "description": "[data-slot~=\"slider-control\"]"
1634
+ },
1635
+ "track": {
1636
+ "type": "string",
1637
+ "description": "[data-slot~=\"slider-track\"]"
1638
+ },
1639
+ "range": {
1640
+ "type": "string",
1641
+ "description": "[data-slot~=\"slider-range\"]"
1642
+ },
1643
+ "thumb": {
1644
+ "type": "string",
1645
+ "description": "[data-slot~=\"slider-thumb\"]"
1646
+ }
1647
+ }
1648
+ }
1649
+ }
1650
+ },
1651
+ "sort-button": {
1652
+ "type": "object",
1653
+ "additionalProperties": false,
1654
+ "properties": {
1655
+ "radius": {
1656
+ "type": "string",
1657
+ "description": "--vela-sort-button-radius, default var(--vela-radius-sm)"
1658
+ },
1659
+ "css": {
1660
+ "type": "object",
1661
+ "additionalProperties": false,
1662
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1663
+ "properties": {
1664
+ "root": {
1665
+ "type": "string",
1666
+ "description": "[data-slot~=\"sort-button\"]"
1667
+ },
1668
+ "icon": {
1669
+ "type": "string",
1670
+ "description": "[data-slot~=\"sort-button-icon\"]"
1671
+ },
1672
+ "state": {
1673
+ "type": "string",
1674
+ "description": "[data-slot~=\"sort-button-state\"]"
1675
+ }
1676
+ }
1677
+ }
1678
+ }
1679
+ },
1439
1680
  "sparkline": {
1440
1681
  "type": "object",
1441
1682
  "additionalProperties": false,
@@ -1592,6 +1833,14 @@
1592
1833
  "type": "string",
1593
1834
  "description": "[data-slot~=\"tabs-count\"]"
1594
1835
  },
1836
+ "label": {
1837
+ "type": "string",
1838
+ "description": "[data-slot~=\"tabs-label\"]"
1839
+ },
1840
+ "description": {
1841
+ "type": "string",
1842
+ "description": "[data-slot~=\"tabs-description\"]"
1843
+ },
1595
1844
  "content": {
1596
1845
  "type": "string",
1597
1846
  "description": "[data-slot~=\"tabs-content\"]"
@@ -2,7 +2,7 @@ import { a as VariantProps, V as VariantFn } from './variants-B4stUBnY.js';
2
2
  import { C as ComponentDef } from './define-D5u3F5Dj.js';
3
3
  import './t.js';
4
4
 
5
- declare const toggleGroupDef: ComponentDef<"toggle-group", "root" | "icon" | "item", "radius-sm" | "radius" | "item-radius" | "item-radius-sm">;
5
+ declare const toggleGroupDef: ComponentDef<"toggle-group", "root" | "icon" | "item", "radius" | "radius-sm" | "item-radius" | "item-radius-sm">;
6
6
  /** `default` = 32px; `sm` = 28px. */
7
7
  declare const toggleGroupVariants: VariantFn<{
8
8
  readonly size: readonly ["default", "sm"];
@@ -1,14 +1,14 @@
1
1
  import { variants } from './chunk-LZWZV2ZS.js';
2
2
  import { iconEl } from './chunk-G7IQLY3A.js';
3
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
4
3
  import { ownTeardown } from './chunk-A72NWYNP.js';
4
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
5
5
  import { h } from './chunk-Q6WTDVH6.js';
6
- import { t } from './chunk-6QCILIT2.js';
7
6
  import { defineComponent } from './chunk-VMCR3S2A.js';
8
- import { css, defineStyles } from './chunk-IDA2BT7D.js';
7
+ import { css, defineStyles } from './chunk-XBEL4K33.js';
9
8
  import './chunk-2GQIZM5Z.js';
10
9
  import './chunk-BXMWQIBO.js';
11
10
  import './chunk-X66RJAIS.js';
11
+ import { t } from './chunk-6QCILIT2.js';
12
12
  import * as toggleGroup from '@zag-js/toggle-group';
13
13
 
14
14
  var toggleGroupDef = defineComponent({
package/dist/tooltip.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { zagPositioning, splitPlacement } from './chunk-3Q32K4PE.js';
2
- import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
3
2
  import { ownTeardown } from './chunk-A72NWYNP.js';
3
+ import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
4
4
  import { h } from './chunk-Q6WTDVH6.js';
5
- import { t } from './chunk-6QCILIT2.js';
6
5
  import { defineComponent } from './chunk-VMCR3S2A.js';
7
- import { defineStyles, css } from './chunk-IDA2BT7D.js';
6
+ import { defineStyles, css } from './chunk-XBEL4K33.js';
8
7
  import './chunk-2GQIZM5Z.js';
9
8
  import './chunk-BXMWQIBO.js';
10
9
  import './chunk-X66RJAIS.js';
10
+ import { t } from './chunk-6QCILIT2.js';
11
11
  import * as tooltip from '@zag-js/tooltip';
12
12
 
13
13
  function tooltipController(opts = {}) {
package/docs/theming.md CHANGED
@@ -167,6 +167,10 @@ Unlayered CSS also reaches the kit when you did not mean it to: a global reset s
167
167
  fields. Scope such rules away from Vela (`button:where(:not(.vela-ui *)) { … }`), or move them
168
168
  into a layer declared before Vela's (`@layer reset;` first in your stylesheet).
169
169
 
170
+ The kit's CSS does not reach the other way: a component's styles apply inside kit hosts and
171
+ the floating layers they open only, so a page's own components keep their look, even those
172
+ that use the same part names (`data-slot="select-trigger"`).
173
+
170
174
  ## Overriding from a page's CSS
171
175
 
172
176
  The theme layer sits below every other style, so a page's own CSS overrides any token without
@@ -209,3 +213,5 @@ sets every token on the page root:
209
213
  ```
210
214
 
211
215
  Bundlers resolve `@luxalgo/vela-ui/themes/dark.css` and `@luxalgo/vela-ui/themes/light.css`.
216
+ The components still go in a kit host, which gives them their base styles: call
217
+ `ensureUIHost(el)` without a theme on the element that holds them.
@@ -127,7 +127,10 @@ change.
127
127
  - **`css`** marks a template as CSS (editors highlight it, stylelint checks it) and
128
128
  **`defineStyles(id, text)`** returns the injector a component calls at creation, never at
129
129
  import: it declares the layer order once per document or shadow root, then injects the
130
- sheet, id-guarded.
130
+ sheet, id-guarded. The sheet applies inside kit hosts, their floating layers and themed
131
+ hosts only: a `:where()` joins the first compound of each top-level selector, adding no
132
+ weight, so a page's own elements that carry the same `data-slot` names are never restyled.
133
+ Inject a component's CSS through it, never by hand.
131
134
  - **`t`** reads the design tokens: `${t.radius.md}` prints `var(--vela-radius-md)`, and a
132
135
  name that does not exist fails the typecheck. A test checks that `t` and the tokens the
133
136
  theme writes match in both directions.
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @luxalgo/vela-ui 0.1.0
1
+ # @luxalgo/vela-ui 0.2.0
2
2
 
3
3
  > The component kit of Vela: one file per component, Zag state machines for behavior, CSS in
4
4
  > cascade layers over design tokens, and one typed theme config.
@@ -11,7 +11,7 @@ kit host: `ensureUIHost(el, createTheme())` (`@luxalgo/vela-ui/theme`), or insid
11
11
  ## Skills (agent instructions in this package)
12
12
 
13
13
  - [theming-vela-ui](skills/theming-vela-ui/SKILL.md): Themes and restyles Vela charts and @luxalgo/vela-ui components with createTheme - brand colors, light, dark and custom themes, design tokens, component settings, part-by-part CSS restyles, scrollbars, cascade layers and theme JSON files checked with checkTheme.
14
- - [using-vela-ui-components](skills/using-vela-ui-components/SKILL.md): Builds interface pieces with @luxalgo/vela-ui, the component kit behind Vela charts - buttons, tabs, toggle groups, badges, dialogs, drawers, dropdown and context menus, tooltips, hover cards, popovers, form controls (checkbox, switch, input, select, number input, date and color pickers) and data components (data table, stat, sparkline, bar, line and scatter charts).
14
+ - [using-vela-ui-components](skills/using-vela-ui-components/SKILL.md): Builds interface pieces with @luxalgo/vela-ui, the component kit behind Vela charts - buttons, tabs, toggle groups, badges, dialogs, drawers, dropdown and context menus, tooltips, hover cards, popovers, collapsible sections, list rows, form controls (checkbox, switch, slider, input, select, number input, date and color pickers) and data components (data table, sort buttons, month grid, stat, sparkline, bar, line and scatter charts).
15
15
  - [writing-vela-ui-components](skills/writing-vela-ui-components/SKILL.md): Writes new UI components with the @luxalgo/vela-ui authoring helpers (defineComponent, h, css, defineStyles, variants, t), customizes a kit component's markup or behavior by copying its source with "vela-ui add --source", and adds components to the kit itself.
16
16
 
17
17
  Link them into a project's coding agent with `npx skills experimental_sync` once the package is
@@ -34,9 +34,10 @@ installed, or install them from the repository with `npx skills add LuxAlgo/Vela
34
34
 
35
35
  - createBadge (`@luxalgo/vela-ui/badge`): Badge: a short status label, or a round count.
36
36
  - createBarChart (`@luxalgo/vela-ui/bar-chart`): BarChart: vertical bars around a zero line with a hover readout (daily P&L, a distribution), in the profit tone above zero and the loss tone below unless a bar names its own; optionally a value axis with gridlines and a title, slanted labels, and dashed markers.
37
- - createButton (`@luxalgo/vela-ui/button`): Button: a <button> with optional icons before and after its text.
37
+ - createButton (`@luxalgo/vela-ui/button`): Button: a <button> with optional icons and key caps before and after its text (`↵ Open`, `Esc Close` in a picker's footer).
38
38
  - createCalloutBubble (`@luxalgo/vela-ui/callout-bubble`): CalloutBubble: a small tinted circle with a centered icon.
39
39
  - createCheckbox (`@luxalgo/vela-ui/checkbox`): Checkbox: a square check toggle, filled with a check mark when on.
40
+ - createCollapsible (`@luxalgo/vela-ui/collapsible`): Collapsible: a section that shows or hides its content.
40
41
  - createColorField (`@luxalgo/vela-ui/color-picker`): ColorPicker: a swatch grid (grays, then hue × shade), a recents row with a custom "+" chooser, and an opacity slider over a transparency checker; and ColorField, the swatch button that opens it on a popover.
41
42
  - createContextMenu (`@luxalgo/vela-ui/context-menu`): ContextMenu: the dropdown menu's list, opened where the user asks for it instead of from a button: a right-click on the target, a long press on a touch screen, or the keyboard's context-menu key on a focused target.
42
43
  - createDataTable (`@luxalgo/vela-ui/data-table`): DataTable: a sortable table with a sticky header in its own scroller (positions, orders, trades).
@@ -51,12 +52,16 @@ installed, or install them from the repository with `npx skills add LuxAlgo/Vela
51
52
  - createHoverCard (`@luxalgo/vela-ui/hover-card`): HoverCard: a card beside a control while the pointer rests on it, richer than a tooltip: a title with an icon tile and a shortcut drawn as keycaps, a description, rich content (figures, a sparkline) and a hint line.
52
53
  - createInputGroup (`@luxalgo/vela-ui/input-group`): InputGroup: an input with addons inside its border: an icon, a short text or a button, at its start or end, or in a row above or below it (a search field with its magnifier, an amount with its unit).
53
54
  - createInput (`@luxalgo/vela-ui/input`): Input: a one-line text input that commits on blur or Enter.
55
+ - createItem (`@luxalgo/vela-ui/item`): Item: one row of a list (a watchlist, a list of alerts, search results): media (an icon, a logo, an avatar, a star), a title over a description, then at its end the meta (figures, badges) and the actions (buttons).
54
56
  - createKbd (`@luxalgo/vela-ui/kbd`): Kbd: one key of a shortcut, drawn as a keycap (`Alt`, `A`).
55
57
  - createLineChart (`@luxalgo/vela-ui/line-chart`): LineChart: a compact area chart with a hover readout (equity curves, P&L over time): one line over a fading area, in the profit tone when its last point ends at or above the baseline and the loss tone below it, with optional axis labels under and beside the plot.
58
+ - createMonthGrid (`@luxalgo/vela-ui/month-grid`): MonthGrid: a month of day cells, each with a figure: a trading journal's P&L by day.
56
59
  - createNumberInput (`@luxalgo/vela-ui/number-input`): NumberInput: a typed number field with optional steppers that show on hover and repeat while pressed.
57
60
  - createPopover (`@luxalgo/vela-ui/popover`): Popover: a positioned floating shell.
58
61
  - createScatterChart (`@luxalgo/vela-ui/scatter-chart`): ScatterChart: dots on two value axes with an optional dashed trend line and a hover readout (a trade's P&L against its length).
59
62
  - createSelect (`@luxalgo/vela-ui/select`): Select: a trigger button and a themed option list on a popover, with an overlay scrollbar for long lists.
63
+ - createSlider (`@luxalgo/vela-ui/slider`): Slider: a value on a track, dragged by its thumb or moved with the arrow keys, Page Up/Down and Home/End, over Zag's slider machine.
64
+ - createSortButton (`@luxalgo/vela-ui/sort-button`): SortButton: the header of a column that sorts a list which is not a table (a watchlist's Last and Day %).
60
65
  - createSparkline (`@luxalgo/vela-ui/sparkline`): Sparkline: a tiny line of values (a watchlist row's day, an equity curve in a card), in the profit tone when it ends at or above where it started (or its baseline) and the loss tone below, with an optional soft area under it and a dotted baseline (the previous close).
61
66
  - createStat (`@luxalgo/vela-ui/stat`): Stat: a figure under its label (Net P&L, Win rate), with an optional line under it.
62
67
  - createSwitch (`@luxalgo/vela-ui/switch`): Switch: a sliding on/off toggle, a track with a round thumb, for a setting that applies at once.