@luxalgo/vela-ui 0.0.0-stage → 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.
- package/CHANGELOG.md +91 -0
- package/LICENSE +201 -0
- package/NOTICE +28 -0
- package/README.md +86 -3
- package/cli/engine.mjs +282 -0
- package/cli/index.mjs +154 -0
- package/dist/badge.d.ts +26 -0
- package/dist/badge.js +44 -0
- package/dist/bar-chart.d.ts +40 -0
- package/dist/bar-chart.js +105 -0
- package/dist/button.d.ts +55 -0
- package/dist/button.js +11 -0
- package/dist/calendar.d.ts +24 -0
- package/dist/calendar.js +1 -0
- package/dist/callout-bubble.d.ts +103 -0
- package/dist/callout-bubble.js +177 -0
- package/dist/chart.d.ts +30 -0
- package/dist/chart.js +1 -0
- package/dist/checkbox.d.ts +60 -0
- package/dist/checkbox.js +12 -0
- package/dist/chunk-2GQIZM5Z.js +28 -0
- package/dist/chunk-3Q32K4PE.js +85 -0
- package/dist/chunk-6QCILIT2.js +52 -0
- package/dist/chunk-7VMN7NKJ.js +133 -0
- package/dist/chunk-A2FJ7Y7D.js +55 -0
- package/dist/chunk-A72NWYNP.js +26 -0
- package/dist/chunk-B5ZSRUDQ.js +227 -0
- package/dist/chunk-BXMWQIBO.js +66 -0
- package/dist/chunk-C3ICYMI3.js +25 -0
- package/dist/chunk-CC3DDNFC.js +117 -0
- package/dist/chunk-E2FE6V2N.js +81 -0
- package/dist/chunk-FN2BUFNM.js +10 -0
- package/dist/chunk-FVH6L7FM.js +18 -0
- package/dist/chunk-G7IQLY3A.js +183 -0
- package/dist/chunk-GVRX3UAV.js +82 -0
- package/dist/chunk-J2QJATCD.js +12 -0
- package/dist/chunk-LZWZV2ZS.js +18 -0
- package/dist/chunk-MJ4RUGX7.js +403 -0
- package/dist/chunk-MMTMOV6R.js +31 -0
- package/dist/chunk-P4MTEMT7.js +23 -0
- package/dist/chunk-Q6WTDVH6.js +31 -0
- package/dist/chunk-S7USVSYP.js +50 -0
- package/dist/chunk-TAKSIV57.js +90 -0
- package/dist/chunk-U3EH42YY.js +72 -0
- package/dist/chunk-V2Q4MRMS.js +573 -0
- package/dist/chunk-VMCR3S2A.js +22 -0
- package/dist/chunk-WBGSYCV2.js +101 -0
- package/dist/chunk-WGULXRWD.js +351 -0
- package/dist/chunk-WXH3EFV5.js +219 -0
- package/dist/chunk-X66RJAIS.js +14 -0
- package/dist/chunk-XBEL4K33.js +142 -0
- package/dist/chunk-Z5PINFQO.js +280 -0
- package/dist/collapsible.d.ts +49 -0
- package/dist/collapsible.js +106 -0
- package/dist/color-picker.d.ts +103 -0
- package/dist/color-picker.js +19 -0
- package/dist/color.d.ts +24 -0
- package/dist/color.js +1 -0
- package/dist/context-menu.d.ts +72 -0
- package/dist/context-menu.js +161 -0
- package/dist/css.d.ts +17 -0
- package/dist/css.js +4 -0
- package/dist/data-table.d.ts +40 -0
- package/dist/data-table.js +88 -0
- package/dist/date-picker.d.ts +90 -0
- package/dist/date-picker.js +257 -0
- package/dist/define-D5u3F5Dj.d.ts +21 -0
- package/dist/dialog.d.ts +89 -0
- package/dist/dialog.js +258 -0
- package/dist/dispose.d.ts +9 -0
- package/dist/dispose.js +2 -0
- package/dist/donut.d.ts +27 -0
- package/dist/donut.js +67 -0
- package/dist/drawer.d.ts +119 -0
- package/dist/drawer.js +326 -0
- package/dist/dropdown-menu.d.ts +114 -0
- package/dist/dropdown-menu.js +18 -0
- package/dist/empty.d.ts +21 -0
- package/dist/empty.js +38 -0
- package/dist/field.d.ts +147 -0
- package/dist/field.js +328 -0
- package/dist/glyph-select.d.ts +57 -0
- package/dist/glyph-select.js +17 -0
- package/dist/h-Bl37qUis.d.ts +24 -0
- package/dist/headless.d.ts +6 -0
- package/dist/headless.js +9 -0
- package/dist/hover-card.d.ts +43 -0
- package/dist/hover-card.js +97 -0
- package/dist/i18n.d.ts +20 -0
- package/dist/i18n.js +1 -0
- package/dist/icons.d.ts +20 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +13 -0
- package/dist/input-group.d.ts +57 -0
- package/dist/input-group.js +87 -0
- package/dist/input.d.ts +54 -0
- package/dist/input.js +9 -0
- package/dist/item.d.ts +72 -0
- package/dist/item.js +131 -0
- package/dist/kbd.d.ts +19 -0
- package/dist/kbd.js +8 -0
- package/dist/kit-text.d.ts +8 -0
- package/dist/kit-text.js +2 -0
- package/dist/line-chart.d.ts +32 -0
- package/dist/line-chart.js +120 -0
- package/dist/manifest.json +4508 -0
- package/dist/month-grid.d.ts +45 -0
- package/dist/month-grid.js +157 -0
- package/dist/number-input.d.ts +99 -0
- package/dist/number-input.js +14 -0
- package/dist/page.d.ts +7 -0
- package/dist/page.js +1 -0
- package/dist/palette.d.ts +55 -0
- package/dist/palette.js +1 -0
- package/dist/placement.d.ts +98 -0
- package/dist/placement.js +1 -0
- package/dist/popover.d.ts +107 -0
- package/dist/popover.js +15 -0
- package/dist/scatter-chart.d.ts +32 -0
- package/dist/scatter-chart.js +121 -0
- package/dist/select.d.ts +112 -0
- package/dist/select.js +19 -0
- package/dist/slider.d.ts +46 -0
- package/dist/slider.js +111 -0
- package/dist/sort-button.d.ts +41 -0
- package/dist/sort-button.js +88 -0
- package/dist/sparkline.d.ts +22 -0
- package/dist/sparkline.js +72 -0
- package/dist/stat.d.ts +29 -0
- package/dist/stat.js +41 -0
- package/dist/styles.d.ts +22 -0
- package/dist/styles.js +2 -0
- package/dist/surface-events.d.ts +17 -0
- package/dist/surface-events.js +1 -0
- package/dist/surface-exit.d.ts +25 -0
- package/dist/surface-exit.js +1 -0
- package/dist/switch.d.ts +54 -0
- package/dist/switch.js +92 -0
- package/dist/t.d.ts +89 -0
- package/dist/t.js +1 -0
- package/dist/tabs.d.ts +65 -0
- package/dist/tabs.js +155 -0
- package/dist/text-area.d.ts +54 -0
- package/dist/text-area.js +9 -0
- package/dist/theme.d.ts +199 -0
- package/dist/theme.js +8 -0
- package/dist/theme.schema.json +1994 -0
- package/dist/themes/dark.css +3 -0
- package/dist/themes/light.css +3 -0
- package/dist/toggle-group.d.ts +56 -0
- package/dist/toggle-group.js +130 -0
- package/dist/tokens.d.ts +16 -0
- package/dist/tokens.js +3 -0
- package/dist/tooltip.d.ts +47 -0
- package/dist/tooltip.js +74 -0
- package/dist/variants-B4stUBnY.d.ts +16 -0
- package/dist/zag.d.ts +19 -0
- package/dist/zag.js +2 -0
- package/docs/theming.md +217 -0
- package/docs/what-to-change.md +20 -0
- package/docs/writing-a-component.md +250 -0
- package/llms.txt +71 -0
- package/package.json +90 -6
- package/registry/badge.ts +119 -0
- package/registry/bar-chart.ts +215 -0
- package/registry/button.ts +379 -0
- package/registry/callout-bubble.ts +347 -0
- package/registry/checkbox.ts +234 -0
- package/registry/collapsible.ts +271 -0
- package/registry/color-picker.ts +582 -0
- package/registry/context-menu.ts +208 -0
- package/registry/data-table.ts +215 -0
- package/registry/date-picker.ts +483 -0
- package/registry/dialog.ts +535 -0
- package/registry/donut.ts +145 -0
- package/registry/drawer.ts +636 -0
- package/registry/dropdown-menu.ts +762 -0
- package/registry/empty.ts +91 -0
- package/registry/field.ts +585 -0
- package/registry/glyph-select.ts +268 -0
- package/registry/hover-card.ts +222 -0
- package/registry/input-group.ts +229 -0
- package/registry/input.ts +181 -0
- package/registry/item.ts +376 -0
- package/registry/kbd.ts +64 -0
- package/registry/line-chart.ts +218 -0
- package/registry/month-grid.ts +328 -0
- package/registry/number-input.ts +443 -0
- package/registry/popover.ts +368 -0
- package/registry/scatter-chart.ts +221 -0
- package/registry/select.ts +620 -0
- package/registry/slider.ts +259 -0
- package/registry/sort-button.ts +189 -0
- package/registry/sparkline.ts +114 -0
- package/registry/stat.ts +96 -0
- package/registry/switch.ts +205 -0
- package/registry/tabs.ts +426 -0
- package/registry/text-area.ts +186 -0
- package/registry/toggle-group.ts +295 -0
- package/registry/tooltip.ts +156 -0
- package/skills/theming-vela-ui/SKILL.md +137 -0
- package/skills/using-vela-ui-components/SKILL.md +137 -0
- package/skills/writing-vela-ui-components/SKILL.md +163 -0
- package/src/components/badge.ts +119 -0
- package/src/components/bar-chart.ts +215 -0
- package/src/components/button.ts +379 -0
- package/src/components/callout-bubble.ts +347 -0
- package/src/components/checkbox.ts +234 -0
- package/src/components/collapsible.ts +271 -0
- package/src/components/color-picker.ts +582 -0
- package/src/components/context-menu.ts +208 -0
- package/src/components/data-table.ts +215 -0
- package/src/components/date-picker.ts +483 -0
- package/src/components/dialog.ts +535 -0
- package/src/components/donut.ts +145 -0
- package/src/components/drawer.ts +636 -0
- package/src/components/dropdown-menu.ts +762 -0
- package/src/components/empty.ts +91 -0
- package/src/components/field.ts +585 -0
- package/src/components/glyph-select.ts +268 -0
- package/src/components/hover-card.ts +222 -0
- package/src/components/input-group.ts +229 -0
- package/src/components/input.ts +181 -0
- package/src/components/item.ts +376 -0
- package/src/components/kbd.ts +64 -0
- package/src/components/line-chart.ts +218 -0
- package/src/components/month-grid.ts +328 -0
- package/src/components/number-input.ts +443 -0
- package/src/components/popover.ts +368 -0
- package/src/components/scatter-chart.ts +221 -0
- package/src/components/select.ts +620 -0
- package/src/components/slider.ts +259 -0
- package/src/components/sort-button.ts +189 -0
- package/src/components/sparkline.ts +114 -0
- package/src/components/stat.ts +96 -0
- package/src/components/switch.ts +205 -0
- package/src/components/tabs.ts +426 -0
- package/src/components/text-area.ts +186 -0
- package/src/components/toggle-group.ts +295 -0
- package/src/components/tooltip.ts +156 -0
- package/src/index.ts +24 -0
- package/src/lib/calendar.ts +117 -0
- package/src/lib/chart.ts +72 -0
- package/src/lib/color.ts +89 -0
- package/src/lib/component-index.ts +151 -0
- package/src/lib/css.ts +48 -0
- package/src/lib/define.ts +45 -0
- package/src/lib/dispose.ts +36 -0
- package/src/lib/h.ts +55 -0
- package/src/lib/headless.ts +16 -0
- package/src/lib/i18n.ts +30 -0
- package/src/lib/icons.ts +237 -0
- package/src/lib/kit-text.ts +26 -0
- package/src/lib/page.ts +24 -0
- package/src/lib/palette.ts +81 -0
- package/src/lib/placement.ts +188 -0
- package/src/lib/scope.ts +135 -0
- package/src/lib/styles.ts +53 -0
- package/src/lib/surface-events.ts +31 -0
- package/src/lib/surface-exit.ts +87 -0
- package/src/lib/t.ts +68 -0
- package/src/lib/theme.ts +664 -0
- package/src/lib/tokens.ts +111 -0
- package/src/lib/variants.ts +32 -0
- package/src/lib/zag.ts +46 -0
- package/stylelint/index.mjs +60 -0
- package/stylelint/lint.mjs +81 -0
- package/stylelint/plugin.mjs +115 -0
|
@@ -0,0 +1,4508 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@luxalgo/vela-ui",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"tokens": [
|
|
5
|
+
"space-1",
|
|
6
|
+
"space-2",
|
|
7
|
+
"space-3",
|
|
8
|
+
"space-4",
|
|
9
|
+
"radius-sm",
|
|
10
|
+
"radius-md",
|
|
11
|
+
"radius-lg",
|
|
12
|
+
"z-tooltip",
|
|
13
|
+
"z-menu",
|
|
14
|
+
"z-dialog",
|
|
15
|
+
"z-popover",
|
|
16
|
+
"ease",
|
|
17
|
+
"dur-fast",
|
|
18
|
+
"dur-med",
|
|
19
|
+
"font-size-sm",
|
|
20
|
+
"font-size-md",
|
|
21
|
+
"font-size-lg",
|
|
22
|
+
"scroll-size",
|
|
23
|
+
"font",
|
|
24
|
+
"bg",
|
|
25
|
+
"fg",
|
|
26
|
+
"fg-muted",
|
|
27
|
+
"fg-faint",
|
|
28
|
+
"fg-bright",
|
|
29
|
+
"surface",
|
|
30
|
+
"surface-elev",
|
|
31
|
+
"surface-overlay",
|
|
32
|
+
"surface-sunken",
|
|
33
|
+
"border",
|
|
34
|
+
"border-strong",
|
|
35
|
+
"border-soft",
|
|
36
|
+
"border-faint",
|
|
37
|
+
"hover",
|
|
38
|
+
"active",
|
|
39
|
+
"hover-strong",
|
|
40
|
+
"focus",
|
|
41
|
+
"focus-soft",
|
|
42
|
+
"separator-hover-band",
|
|
43
|
+
"separator-hover-line",
|
|
44
|
+
"scroll",
|
|
45
|
+
"accent",
|
|
46
|
+
"accent-bright",
|
|
47
|
+
"highlight",
|
|
48
|
+
"selected-bg",
|
|
49
|
+
"selected-fg",
|
|
50
|
+
"fg-on-fill",
|
|
51
|
+
"up",
|
|
52
|
+
"down",
|
|
53
|
+
"profit",
|
|
54
|
+
"loss",
|
|
55
|
+
"danger",
|
|
56
|
+
"shadow",
|
|
57
|
+
"shadow-dialog",
|
|
58
|
+
"backdrop"
|
|
59
|
+
],
|
|
60
|
+
"components": [
|
|
61
|
+
{
|
|
62
|
+
"name": "badge",
|
|
63
|
+
"import": "@luxalgo/vela-ui/badge",
|
|
64
|
+
"description": "Badge: a short status label, or a round count. `default` is filled with the selection color, `secondary` a neutral tint, `outline` bordered, `destructive` tinted with the danger color, `up` and `down` with the market colors.",
|
|
65
|
+
"component": "badge",
|
|
66
|
+
"declaration": "badgeDef",
|
|
67
|
+
"parts": {
|
|
68
|
+
"root": "badge"
|
|
69
|
+
},
|
|
70
|
+
"settings": {
|
|
71
|
+
"radius": {
|
|
72
|
+
"default": "5px"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"variants": {
|
|
76
|
+
"variant": [
|
|
77
|
+
"default",
|
|
78
|
+
"secondary",
|
|
79
|
+
"outline",
|
|
80
|
+
"destructive",
|
|
81
|
+
"up",
|
|
82
|
+
"down"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"factory": "createBadge",
|
|
86
|
+
"returns": "BadgeHandle",
|
|
87
|
+
"propsType": "BadgeProps",
|
|
88
|
+
"props": [
|
|
89
|
+
{
|
|
90
|
+
"name": "text",
|
|
91
|
+
"type": "string",
|
|
92
|
+
"required": true
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "count",
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"required": false,
|
|
98
|
+
"doc": "A round count pill (`3`, `9+`) rather than a label."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "className",
|
|
102
|
+
"type": "string",
|
|
103
|
+
"required": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "variant",
|
|
107
|
+
"type": "\"default\" | \"secondary\" | \"outline\" | \"destructive\" | \"up\" | \"down\"",
|
|
108
|
+
"required": false
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"exports": [
|
|
112
|
+
"badgeDef",
|
|
113
|
+
"badgeVariants",
|
|
114
|
+
"BadgeVariant",
|
|
115
|
+
"BadgeProps",
|
|
116
|
+
"BadgeHandle",
|
|
117
|
+
"BADGE_STYLE_ID",
|
|
118
|
+
"BADGE_CSS",
|
|
119
|
+
"createBadge"
|
|
120
|
+
],
|
|
121
|
+
"tokens": [
|
|
122
|
+
"border-strong",
|
|
123
|
+
"danger",
|
|
124
|
+
"down",
|
|
125
|
+
"fg",
|
|
126
|
+
"fg-muted",
|
|
127
|
+
"hover",
|
|
128
|
+
"selected-bg",
|
|
129
|
+
"selected-fg",
|
|
130
|
+
"up"
|
|
131
|
+
],
|
|
132
|
+
"attributes": [
|
|
133
|
+
"data-count"
|
|
134
|
+
],
|
|
135
|
+
"example": "import { createBadge } from '@luxalgo/vela-ui/badge';\n\nconst badge = createBadge({ text: /* string */ });\nhost.append(badge.el);"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "bar-chart",
|
|
139
|
+
"import": "@luxalgo/vela-ui/bar-chart",
|
|
140
|
+
"description": "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.",
|
|
141
|
+
"component": "bar-chart",
|
|
142
|
+
"declaration": "barChartDef",
|
|
143
|
+
"parts": {
|
|
144
|
+
"root": "bar-chart",
|
|
145
|
+
"grid": "bar-chart-grid",
|
|
146
|
+
"label": "bar-chart-label",
|
|
147
|
+
"bar": "bar-chart-bar",
|
|
148
|
+
"marker": "bar-chart-marker",
|
|
149
|
+
"tip": "bar-chart-tip"
|
|
150
|
+
},
|
|
151
|
+
"settings": {
|
|
152
|
+
"tip-radius": {
|
|
153
|
+
"default": "3px"
|
|
154
|
+
},
|
|
155
|
+
"tip-shadow": {
|
|
156
|
+
"default": "var(--vela-shadow)",
|
|
157
|
+
"token": "shadow"
|
|
158
|
+
},
|
|
159
|
+
"tip-z": {
|
|
160
|
+
"default": "2"
|
|
161
|
+
},
|
|
162
|
+
"tip-bg": {
|
|
163
|
+
"default": "var(--vela-surface-elev)",
|
|
164
|
+
"token": "surface-elev"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"factory": "createBarChart",
|
|
168
|
+
"returns": "BarChartHandle",
|
|
169
|
+
"propsType": "BarChartProps",
|
|
170
|
+
"props": [
|
|
171
|
+
{
|
|
172
|
+
"name": "format",
|
|
173
|
+
"type": "(d: BarDatum) => string | Node",
|
|
174
|
+
"required": false,
|
|
175
|
+
"doc": "The hover readout of a bar."
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "labelEvery",
|
|
179
|
+
"type": "number",
|
|
180
|
+
"required": false,
|
|
181
|
+
"doc": "Label every Nth bar under the axis (default: as many as fit)."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "axes",
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"required": false,
|
|
187
|
+
"doc": "A value axis on the start side, with gridlines."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "axisTitle",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"required": false,
|
|
193
|
+
"doc": "The value axis's title, written up its side."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "slantLabels",
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"required": false,
|
|
199
|
+
"doc": "Slant the bar labels (long labels on many bars)."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "yFormat",
|
|
203
|
+
"type": "(v: number) => string",
|
|
204
|
+
"required": false
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "labelFormat",
|
|
208
|
+
"type": "(label: string) => string",
|
|
209
|
+
"required": false,
|
|
210
|
+
"doc": "What a bar's label reads under the axis (default: the label itself)."
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "className",
|
|
214
|
+
"type": "string",
|
|
215
|
+
"required": false,
|
|
216
|
+
"doc": "Extra class names (layout hooks)."
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"exports": [
|
|
220
|
+
"barChartDef",
|
|
221
|
+
"BarDatum",
|
|
222
|
+
"BarChartProps",
|
|
223
|
+
"BarChartHandle",
|
|
224
|
+
"createBarChart"
|
|
225
|
+
],
|
|
226
|
+
"tokens": [
|
|
227
|
+
"border",
|
|
228
|
+
"dur-fast",
|
|
229
|
+
"fg-bright",
|
|
230
|
+
"fg-faint",
|
|
231
|
+
"fg-muted",
|
|
232
|
+
"loss",
|
|
233
|
+
"profit",
|
|
234
|
+
"shadow",
|
|
235
|
+
"surface-elev"
|
|
236
|
+
],
|
|
237
|
+
"attributes": [
|
|
238
|
+
"data-base",
|
|
239
|
+
"data-instant",
|
|
240
|
+
"data-thin",
|
|
241
|
+
"data-title",
|
|
242
|
+
"data-tone",
|
|
243
|
+
"data-zero"
|
|
244
|
+
],
|
|
245
|
+
"example": "import { createBarChart } from '@luxalgo/vela-ui/bar-chart';\n\nconst barChart = createBarChart();\nhost.append(barChart.el);"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"name": "button",
|
|
249
|
+
"import": "@luxalgo/vela-ui/button",
|
|
250
|
+
"description": "Button: a <button> with optional icons and key caps before and after its text (`↵ Open`, `Esc Close` in a picker's footer). `default` is filled with the selection color (OK, Apply), `outline` bordered (the dialogs' Cancel), `secondary` a sunken fill, `ghost` bare until hovered (toolbar and header icons), `destructive` tinted with the danger color, `link` text that underlines on hover, `up` and `down` filled with the market's colors (buy and sell), `favorite` a bare star whose pressed state takes the favorites color. Heights: `xs` 26px, `sm` 30px (panels), `default` 34px (dialog footers), `lg` 40px (touch); the `icon*` sizes are the same heights, square, for an icon alone, which `label` names. A toggle button (`pressed`, `defaultPressed` or `onPressedChange`) says its state through `aria-pressed`; uncontrolled it flips on a press, given `pressed` it only asks, until `setPressed` moves it.",
|
|
251
|
+
"component": "button",
|
|
252
|
+
"declaration": "buttonDef",
|
|
253
|
+
"parts": {
|
|
254
|
+
"root": "button",
|
|
255
|
+
"icon": "button-icon",
|
|
256
|
+
"keys": "button-keys"
|
|
257
|
+
},
|
|
258
|
+
"settings": {
|
|
259
|
+
"radius": {
|
|
260
|
+
"default": "var(--vela-radius-md)",
|
|
261
|
+
"token": "radius-md"
|
|
262
|
+
},
|
|
263
|
+
"height": {
|
|
264
|
+
"default": "34px"
|
|
265
|
+
},
|
|
266
|
+
"height-xs": {
|
|
267
|
+
"default": "26px"
|
|
268
|
+
},
|
|
269
|
+
"height-sm": {
|
|
270
|
+
"default": "30px"
|
|
271
|
+
},
|
|
272
|
+
"height-lg": {
|
|
273
|
+
"default": "40px"
|
|
274
|
+
},
|
|
275
|
+
"font-size": {
|
|
276
|
+
"default": "14px"
|
|
277
|
+
},
|
|
278
|
+
"font-size-xs": {
|
|
279
|
+
"default": "12px"
|
|
280
|
+
},
|
|
281
|
+
"font-size-sm": {
|
|
282
|
+
"default": "13px"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"variants": {
|
|
286
|
+
"variant": [
|
|
287
|
+
"default",
|
|
288
|
+
"outline",
|
|
289
|
+
"secondary",
|
|
290
|
+
"ghost",
|
|
291
|
+
"destructive",
|
|
292
|
+
"link",
|
|
293
|
+
"up",
|
|
294
|
+
"down",
|
|
295
|
+
"favorite"
|
|
296
|
+
],
|
|
297
|
+
"size": [
|
|
298
|
+
"default",
|
|
299
|
+
"xs",
|
|
300
|
+
"sm",
|
|
301
|
+
"lg",
|
|
302
|
+
"icon",
|
|
303
|
+
"icon-xs",
|
|
304
|
+
"icon-sm",
|
|
305
|
+
"icon-lg"
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"factory": "createButton",
|
|
309
|
+
"returns": "ButtonHandle",
|
|
310
|
+
"propsType": "ButtonProps",
|
|
311
|
+
"props": [
|
|
312
|
+
{
|
|
313
|
+
"name": "text",
|
|
314
|
+
"type": "string",
|
|
315
|
+
"required": false,
|
|
316
|
+
"doc": "The visible text (the `icon*` sizes show none; `label` names them)."
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "icon",
|
|
320
|
+
"type": "string",
|
|
321
|
+
"required": false,
|
|
322
|
+
"doc": "Icon id from the kit's registry, before the text (the icon of an `icon*` size). `favorite` defaults to `star`."
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "iconPressed",
|
|
326
|
+
"type": "string",
|
|
327
|
+
"required": false,
|
|
328
|
+
"doc": "The icon while pressed (`star-filled` for `star`). `favorite` defaults to `star-filled`."
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "iconEnd",
|
|
332
|
+
"type": "string",
|
|
333
|
+
"required": false,
|
|
334
|
+
"doc": "Icon id after the text (a menu trigger's chevron)."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "keys",
|
|
338
|
+
"type": "readonly string[]",
|
|
339
|
+
"required": false,
|
|
340
|
+
"doc": "Key caps before the text, one per key (`['↑', '↓']`)."
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "keysEnd",
|
|
344
|
+
"type": "readonly string[]",
|
|
345
|
+
"required": false,
|
|
346
|
+
"doc": "Key caps after the text."
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"name": "label",
|
|
350
|
+
"type": "string",
|
|
351
|
+
"required": false,
|
|
352
|
+
"doc": "Accessible name; required for the `icon*` sizes, defaults to `text`."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "pressed",
|
|
356
|
+
"type": "boolean",
|
|
357
|
+
"required": false,
|
|
358
|
+
"doc": "A controlled toggle's state (`aria-pressed`): a press only calls `onPressedChange`, and `setPressed` moves it. Omitted with `defaultPressed` and `onPressedChange`: not a toggle."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "defaultPressed",
|
|
362
|
+
"type": "boolean",
|
|
363
|
+
"required": false,
|
|
364
|
+
"doc": "An uncontrolled toggle's first state: a press flips it and calls `onPressedChange`."
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "onPressedChange",
|
|
368
|
+
"type": "(pressed: boolean) => void",
|
|
369
|
+
"required": false,
|
|
370
|
+
"doc": "A press asked for this state (a toggle without `pressed` or `defaultPressed` starts unpressed)."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "disabled",
|
|
374
|
+
"type": "boolean",
|
|
375
|
+
"required": false
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "onClick",
|
|
379
|
+
"type": "(e: MouseEvent) => void",
|
|
380
|
+
"required": false
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "className",
|
|
384
|
+
"type": "string",
|
|
385
|
+
"required": false,
|
|
386
|
+
"doc": "Extra class names (layout hooks)."
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "variant",
|
|
390
|
+
"type": "\"default\" | \"secondary\" | \"outline\" | \"destructive\" | \"up\" | \"down\" | \"ghost\" | \"link\" | \"favorite\"",
|
|
391
|
+
"required": false
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "size",
|
|
395
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
396
|
+
"required": false
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"exports": [
|
|
400
|
+
"buttonDef",
|
|
401
|
+
"buttonVariants",
|
|
402
|
+
"ButtonVariant",
|
|
403
|
+
"ButtonSize",
|
|
404
|
+
"ButtonProps",
|
|
405
|
+
"ButtonHandle",
|
|
406
|
+
"BUTTON_STYLE_ID",
|
|
407
|
+
"BUTTON_CSS",
|
|
408
|
+
"createButton"
|
|
409
|
+
],
|
|
410
|
+
"tokens": [
|
|
411
|
+
"accent",
|
|
412
|
+
"active",
|
|
413
|
+
"border",
|
|
414
|
+
"border-strong",
|
|
415
|
+
"danger",
|
|
416
|
+
"down",
|
|
417
|
+
"dur-fast",
|
|
418
|
+
"fg",
|
|
419
|
+
"fg-bright",
|
|
420
|
+
"fg-muted",
|
|
421
|
+
"fg-on-fill",
|
|
422
|
+
"focus",
|
|
423
|
+
"highlight",
|
|
424
|
+
"hover",
|
|
425
|
+
"radius-md",
|
|
426
|
+
"radius-sm",
|
|
427
|
+
"selected-bg",
|
|
428
|
+
"selected-fg",
|
|
429
|
+
"surface-sunken",
|
|
430
|
+
"up"
|
|
431
|
+
],
|
|
432
|
+
"attributes": [
|
|
433
|
+
"aria-expanded",
|
|
434
|
+
"data-icon",
|
|
435
|
+
"data-keys",
|
|
436
|
+
"data-pressed"
|
|
437
|
+
],
|
|
438
|
+
"example": "import { createButton } from '@luxalgo/vela-ui/button';\n\nconst button = createButton();\nhost.append(button.el);"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "callout-bubble",
|
|
442
|
+
"import": "@luxalgo/vela-ui/callout-bubble",
|
|
443
|
+
"description": "CalloutBubble: a small tinted circle with a centered icon. When a panel is declared, clicking it deploys a popover of text and action buttons (below the bubble, flipping above near the bottom edge). Content is data, so contribution seams route it without handing over DOM. The bubble is a single element the caller places and decorates (tooltips stay the caller's: renderer chrome attaches its bare-chart tips, widget chrome the kit's).",
|
|
444
|
+
"component": "callout-bubble",
|
|
445
|
+
"declaration": "calloutBubbleDef",
|
|
446
|
+
"parts": {
|
|
447
|
+
"root": "callout-bubble",
|
|
448
|
+
"panel": "callout-bubble-panel",
|
|
449
|
+
"title": "callout-bubble-title",
|
|
450
|
+
"text": "callout-bubble-text",
|
|
451
|
+
"actions": "callout-bubble-actions",
|
|
452
|
+
"button": "callout-bubble-button"
|
|
453
|
+
},
|
|
454
|
+
"settings": {
|
|
455
|
+
"panel-radius": {
|
|
456
|
+
"default": "var(--vela-radius-md)",
|
|
457
|
+
"token": "radius-md"
|
|
458
|
+
},
|
|
459
|
+
"button-radius": {
|
|
460
|
+
"default": "5px"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"factory": "createCalloutBubble",
|
|
464
|
+
"returns": "CalloutBubble",
|
|
465
|
+
"propsType": "CalloutBubbleProps",
|
|
466
|
+
"props": [
|
|
467
|
+
{
|
|
468
|
+
"name": "size",
|
|
469
|
+
"type": "number",
|
|
470
|
+
"required": false,
|
|
471
|
+
"doc": "Bubble diameter in px (default 16; the icon renders 4px smaller)."
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "host",
|
|
475
|
+
"type": "HTMLElement",
|
|
476
|
+
"required": false,
|
|
477
|
+
"doc": "Where the deployed panel portals (default: the document body). Pass the chart or widget root so the panel lives inside the host's DOM."
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "theme",
|
|
481
|
+
"type": "() => ChartTheme",
|
|
482
|
+
"required": false,
|
|
483
|
+
"doc": "Live theme, for a panel deployed OUTSIDE a `.vela-ui` token host (renderer chrome on a bare chart passes its theme getter; widget chrome may omit it)."
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "boundary",
|
|
487
|
+
"type": "CollisionBoundary",
|
|
488
|
+
"required": false
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "icon",
|
|
492
|
+
"type": "string",
|
|
493
|
+
"required": true,
|
|
494
|
+
"doc": "Icon id in the icon registry (`registerIcon`), centered in the bubble."
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "background",
|
|
498
|
+
"type": "string",
|
|
499
|
+
"required": true,
|
|
500
|
+
"doc": "Bubble fill — any CSS color, token expressions included."
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "color",
|
|
504
|
+
"type": "string",
|
|
505
|
+
"required": false,
|
|
506
|
+
"doc": "Icon ink (default: `currentColor` inherited from the slot)."
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "label",
|
|
510
|
+
"type": "string",
|
|
511
|
+
"required": true,
|
|
512
|
+
"doc": "Accessible name. Callers typically show the same text in their own tooltip."
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "panel",
|
|
516
|
+
"type": "CalloutPanel",
|
|
517
|
+
"required": false,
|
|
518
|
+
"doc": "Deployed panel — presence makes the bubble clickable."
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"name": "side",
|
|
522
|
+
"type": "Side",
|
|
523
|
+
"required": false,
|
|
524
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "align",
|
|
528
|
+
"type": "Align",
|
|
529
|
+
"required": false,
|
|
530
|
+
"doc": "Its alignment along that side."
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "sideOffset",
|
|
534
|
+
"type": "number",
|
|
535
|
+
"required": false,
|
|
536
|
+
"doc": "Its distance from the trigger, in px."
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "alignOffset",
|
|
540
|
+
"type": "number",
|
|
541
|
+
"required": false,
|
|
542
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "avoidCollisions",
|
|
546
|
+
"type": "boolean",
|
|
547
|
+
"required": false,
|
|
548
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"name": "collisionPadding",
|
|
552
|
+
"type": "number",
|
|
553
|
+
"required": false,
|
|
554
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "collisionBoundary",
|
|
558
|
+
"type": "CollisionBoundary",
|
|
559
|
+
"required": false,
|
|
560
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"exports": [
|
|
564
|
+
"CalloutPanelItem",
|
|
565
|
+
"CalloutPanel",
|
|
566
|
+
"CalloutBubbleSpec",
|
|
567
|
+
"closesPanel",
|
|
568
|
+
"CalloutPanelRow",
|
|
569
|
+
"calloutPanelRows",
|
|
570
|
+
"calloutBubbleDef",
|
|
571
|
+
"CalloutBubbleOptions",
|
|
572
|
+
"CalloutBubbleProps",
|
|
573
|
+
"CALLOUT_STYLE_ID",
|
|
574
|
+
"CALLOUT_CSS",
|
|
575
|
+
"CalloutPanelPart",
|
|
576
|
+
"calloutPart",
|
|
577
|
+
"CalloutBubble",
|
|
578
|
+
"createCalloutBubble"
|
|
579
|
+
],
|
|
580
|
+
"tokens": [
|
|
581
|
+
"border",
|
|
582
|
+
"border-strong",
|
|
583
|
+
"dur-fast",
|
|
584
|
+
"fg",
|
|
585
|
+
"fg-bright",
|
|
586
|
+
"fg-muted",
|
|
587
|
+
"font",
|
|
588
|
+
"font-size-md",
|
|
589
|
+
"hover",
|
|
590
|
+
"radius-md",
|
|
591
|
+
"selected-bg",
|
|
592
|
+
"selected-fg",
|
|
593
|
+
"shadow",
|
|
594
|
+
"surface-elev"
|
|
595
|
+
],
|
|
596
|
+
"attributes": [
|
|
597
|
+
"data-primary"
|
|
598
|
+
],
|
|
599
|
+
"example": "import { createCalloutBubble } from '@luxalgo/vela-ui/callout-bubble';\n\nconst calloutBubble = createCalloutBubble({ icon: /* string */, background: /* string */, label: /* string */ });\nhost.append(calloutBubble.el);"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "checkbox",
|
|
603
|
+
"import": "@luxalgo/vela-ui/checkbox",
|
|
604
|
+
"description": "Checkbox: a square check toggle, filled with a check mark when on. `bright` fills with the bright foreground (the settings dialogs), `selected` with the selection color. Behavior, keyboard and ARIA come from Zag's switch machine: a label holding a hidden checkbox.",
|
|
605
|
+
"component": "checkbox",
|
|
606
|
+
"declaration": "checkboxDef",
|
|
607
|
+
"parts": {
|
|
608
|
+
"root": "checkbox",
|
|
609
|
+
"icon": "checkbox-icon"
|
|
610
|
+
},
|
|
611
|
+
"settings": {
|
|
612
|
+
"radius": {
|
|
613
|
+
"default": "5px"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"variants": {
|
|
617
|
+
"size": [
|
|
618
|
+
"md",
|
|
619
|
+
"sm"
|
|
620
|
+
],
|
|
621
|
+
"tone": [
|
|
622
|
+
"bright",
|
|
623
|
+
"selected"
|
|
624
|
+
]
|
|
625
|
+
},
|
|
626
|
+
"factory": "createCheckbox",
|
|
627
|
+
"returns": "Checkbox",
|
|
628
|
+
"propsType": "CheckboxProps",
|
|
629
|
+
"props": [
|
|
630
|
+
{
|
|
631
|
+
"name": "id",
|
|
632
|
+
"type": "string",
|
|
633
|
+
"required": false
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "name",
|
|
637
|
+
"type": "string",
|
|
638
|
+
"required": false,
|
|
639
|
+
"doc": "Submitted with its form under this name (`on` when checked)."
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "required",
|
|
643
|
+
"type": "boolean",
|
|
644
|
+
"required": false,
|
|
645
|
+
"doc": "A form does not submit while it is off."
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "checked",
|
|
649
|
+
"type": "boolean",
|
|
650
|
+
"required": false
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"name": "defaultChecked",
|
|
654
|
+
"type": "boolean",
|
|
655
|
+
"required": false,
|
|
656
|
+
"doc": "The state it starts in when `checked` is not given."
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "disabled",
|
|
660
|
+
"type": "boolean",
|
|
661
|
+
"required": false
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "size",
|
|
665
|
+
"type": "CheckboxSize",
|
|
666
|
+
"required": false
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "tone",
|
|
670
|
+
"type": "CheckboxTone",
|
|
671
|
+
"required": false
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "onCheckedChange",
|
|
675
|
+
"type": "(checked: boolean) => void",
|
|
676
|
+
"required": false,
|
|
677
|
+
"doc": "Called when the user toggles it."
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"name": "onChange",
|
|
681
|
+
"type": "(checked: boolean) => void",
|
|
682
|
+
"required": false
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
"exports": [
|
|
686
|
+
"CheckboxSize",
|
|
687
|
+
"CheckboxTone",
|
|
688
|
+
"CheckboxControllerOptions",
|
|
689
|
+
"CheckboxController",
|
|
690
|
+
"checkboxController",
|
|
691
|
+
"checkboxDef",
|
|
692
|
+
"checkboxVariants",
|
|
693
|
+
"CheckboxOptions",
|
|
694
|
+
"CheckboxProps",
|
|
695
|
+
"Checkbox",
|
|
696
|
+
"createCheckbox"
|
|
697
|
+
],
|
|
698
|
+
"tokens": [
|
|
699
|
+
"bg",
|
|
700
|
+
"border",
|
|
701
|
+
"border-strong",
|
|
702
|
+
"dur-fast",
|
|
703
|
+
"fg-bright",
|
|
704
|
+
"fg-muted",
|
|
705
|
+
"focus",
|
|
706
|
+
"selected-bg",
|
|
707
|
+
"selected-fg"
|
|
708
|
+
],
|
|
709
|
+
"attributes": [
|
|
710
|
+
"data-disabled",
|
|
711
|
+
"data-focus-visible",
|
|
712
|
+
"data-state",
|
|
713
|
+
"data-tone"
|
|
714
|
+
],
|
|
715
|
+
"example": "import { createCheckbox } from '@luxalgo/vela-ui/checkbox';\n\nconst checkbox = createCheckbox();\nhost.append(checkbox.el);"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "collapsible",
|
|
719
|
+
"import": "@luxalgo/vela-ui/collapsible",
|
|
720
|
+
"description": "Collapsible: a section that shows or hides its content. Its own trigger is a header (a title, an optional count, a chevron) that toggles it on a click, Enter or Space; or the host hands it a trigger of its own, such as a row's chevron button, and places the content where it likes. `default` is a section header with the chevron at its end (a panel's drawers), `label` a small uppercase group label with the chevron before it (a list's groups). The content is `hidden` while closed.",
|
|
721
|
+
"component": "collapsible",
|
|
722
|
+
"declaration": "collapsibleDef",
|
|
723
|
+
"parts": {
|
|
724
|
+
"root": "collapsible",
|
|
725
|
+
"trigger": "collapsible-trigger",
|
|
726
|
+
"icon": "collapsible-icon",
|
|
727
|
+
"title": "collapsible-title",
|
|
728
|
+
"count": "collapsible-count",
|
|
729
|
+
"chevron": "collapsible-chevron",
|
|
730
|
+
"content": "collapsible-content"
|
|
731
|
+
},
|
|
732
|
+
"settings": {
|
|
733
|
+
"trigger-height": {
|
|
734
|
+
"default": "36px"
|
|
735
|
+
},
|
|
736
|
+
"radius": {
|
|
737
|
+
"default": "var(--vela-radius-md)",
|
|
738
|
+
"token": "radius-md"
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
"variants": {
|
|
742
|
+
"variant": [
|
|
743
|
+
"default",
|
|
744
|
+
"label"
|
|
745
|
+
]
|
|
746
|
+
},
|
|
747
|
+
"factory": "createCollapsible",
|
|
748
|
+
"returns": "CollapsibleHandle",
|
|
749
|
+
"propsType": "CollapsibleProps",
|
|
750
|
+
"props": [
|
|
751
|
+
{
|
|
752
|
+
"name": "title",
|
|
753
|
+
"type": "string",
|
|
754
|
+
"required": false,
|
|
755
|
+
"doc": "The header's text. Without `trigger`, the collapsible draws its header with it."
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "count",
|
|
759
|
+
"type": "string | number",
|
|
760
|
+
"required": false,
|
|
761
|
+
"doc": "After the title, muted: a count, a total. Null shows none."
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "icon",
|
|
765
|
+
"type": "string",
|
|
766
|
+
"required": false,
|
|
767
|
+
"doc": "Icon id from the kit's registry, before the title."
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "trigger",
|
|
771
|
+
"type": "HTMLElement",
|
|
772
|
+
"required": false,
|
|
773
|
+
"doc": "A host element that toggles the content instead of the header (a row's chevron button): it gets `aria-expanded`, `aria-controls` and `data-state`, and a click on it toggles. The root then holds only the content."
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "content",
|
|
777
|
+
"type": "Node | ((content: HTMLElement) => void)",
|
|
778
|
+
"required": false,
|
|
779
|
+
"doc": "The content, or a function that fills the content element."
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "defaultOpen",
|
|
783
|
+
"type": "boolean",
|
|
784
|
+
"required": false,
|
|
785
|
+
"doc": "Open when created (default closed)."
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"name": "onOpenChange",
|
|
789
|
+
"type": "(open: boolean) => void",
|
|
790
|
+
"required": false,
|
|
791
|
+
"doc": "Opened or closed by the user."
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "disabled",
|
|
795
|
+
"type": "boolean",
|
|
796
|
+
"required": false
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"name": "className",
|
|
800
|
+
"type": "string",
|
|
801
|
+
"required": false,
|
|
802
|
+
"doc": "Extra class names (layout hooks)."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "variant",
|
|
806
|
+
"type": "\"default\" | \"label\"",
|
|
807
|
+
"required": false
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
"exports": [
|
|
811
|
+
"collapsibleDef",
|
|
812
|
+
"collapsibleVariants",
|
|
813
|
+
"CollapsibleVariant",
|
|
814
|
+
"CollapsibleProps",
|
|
815
|
+
"CollapsibleHandle",
|
|
816
|
+
"createCollapsible"
|
|
817
|
+
],
|
|
818
|
+
"tokens": [
|
|
819
|
+
"dur-fast",
|
|
820
|
+
"dur-med",
|
|
821
|
+
"fg",
|
|
822
|
+
"fg-bright",
|
|
823
|
+
"fg-faint",
|
|
824
|
+
"fg-muted",
|
|
825
|
+
"focus",
|
|
826
|
+
"hover",
|
|
827
|
+
"radius-md"
|
|
828
|
+
],
|
|
829
|
+
"attributes": [
|
|
830
|
+
"data-disabled",
|
|
831
|
+
"data-state"
|
|
832
|
+
],
|
|
833
|
+
"example": "import { createCollapsible } from '@luxalgo/vela-ui/collapsible';\n\nconst collapsible = createCollapsible();\nhost.append(collapsible.el);"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "color-picker",
|
|
837
|
+
"import": "@luxalgo/vela-ui/color-picker",
|
|
838
|
+
"description": "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. Colors travel as `#RRGGBB` / `#RRGGBBAA`.",
|
|
839
|
+
"component": "color-picker",
|
|
840
|
+
"declaration": "colorPickerDef",
|
|
841
|
+
"parts": {
|
|
842
|
+
"root": "color-picker",
|
|
843
|
+
"trigger": "color-picker-trigger",
|
|
844
|
+
"swatch": "color-picker-swatch",
|
|
845
|
+
"content": "color-picker-content"
|
|
846
|
+
},
|
|
847
|
+
"settings": {
|
|
848
|
+
"swatch-ring": {
|
|
849
|
+
"default": "inset 0 0 0 1px rgba(0, 0, 0, 0.25)"
|
|
850
|
+
},
|
|
851
|
+
"circle-swatch-radius": {
|
|
852
|
+
"default": "2px"
|
|
853
|
+
},
|
|
854
|
+
"content-radius": {
|
|
855
|
+
"default": "var(--vela-radius-lg)",
|
|
856
|
+
"token": "radius-lg"
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
"factory": "createColorField",
|
|
860
|
+
"returns": "ColorField",
|
|
861
|
+
"propsType": "ColorFieldProps",
|
|
862
|
+
"props": [
|
|
863
|
+
{
|
|
864
|
+
"name": "shape",
|
|
865
|
+
"type": "ColorFieldShape",
|
|
866
|
+
"required": false
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "theme",
|
|
870
|
+
"type": "ChartTheme",
|
|
871
|
+
"required": true
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "getVal",
|
|
875
|
+
"type": "() => string",
|
|
876
|
+
"required": true
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "onVal",
|
|
880
|
+
"type": "(v: string) => void",
|
|
881
|
+
"required": true
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "id",
|
|
885
|
+
"type": "string",
|
|
886
|
+
"required": false
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"name": "popover",
|
|
890
|
+
"type": "Pick<PopoverOptions, \"host\" | \"position\" | \"boundary\" | \"zIndex\" | \"gap\" | \"align\">",
|
|
891
|
+
"required": false,
|
|
892
|
+
"doc": "The picker's host, layer and positioning strategy. `gap`, `align` and `boundary` here are deprecated: the field's placement props replace them."
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"name": "commit",
|
|
896
|
+
"type": "ColorCommit",
|
|
897
|
+
"required": false,
|
|
898
|
+
"doc": "Opacity-drag commit policy of the popover picker (default `'live'`) — see {@link ColorCommit}."
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"name": "i18n",
|
|
902
|
+
"type": "Translator",
|
|
903
|
+
"required": false,
|
|
904
|
+
"doc": "The translator of the picker's labels (default: the kit build's, else English)."
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "side",
|
|
908
|
+
"type": "Side",
|
|
909
|
+
"required": false,
|
|
910
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"name": "align",
|
|
914
|
+
"type": "Align",
|
|
915
|
+
"required": false,
|
|
916
|
+
"doc": "Its alignment along that side."
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"name": "sideOffset",
|
|
920
|
+
"type": "number",
|
|
921
|
+
"required": false,
|
|
922
|
+
"doc": "Its distance from the trigger, in px."
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"name": "alignOffset",
|
|
926
|
+
"type": "number",
|
|
927
|
+
"required": false,
|
|
928
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"name": "avoidCollisions",
|
|
932
|
+
"type": "boolean",
|
|
933
|
+
"required": false,
|
|
934
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"name": "collisionPadding",
|
|
938
|
+
"type": "number",
|
|
939
|
+
"required": false,
|
|
940
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "collisionBoundary",
|
|
944
|
+
"type": "CollisionBoundary",
|
|
945
|
+
"required": false,
|
|
946
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
"exports": [
|
|
950
|
+
"splitColor",
|
|
951
|
+
"combineColor",
|
|
952
|
+
"blendOver",
|
|
953
|
+
"hslHex",
|
|
954
|
+
"buildPalette",
|
|
955
|
+
"transparencyChecker",
|
|
956
|
+
"ColorFieldShape",
|
|
957
|
+
"ColorPickerControllerOptions",
|
|
958
|
+
"ColorPickerController",
|
|
959
|
+
"colorPickerController",
|
|
960
|
+
"colorPickerDef",
|
|
961
|
+
"ColorCommit",
|
|
962
|
+
"ColorPickerOptions",
|
|
963
|
+
"buildColorPicker",
|
|
964
|
+
"ColorFieldOpts",
|
|
965
|
+
"ColorFieldProps",
|
|
966
|
+
"colorField",
|
|
967
|
+
"ColorField",
|
|
968
|
+
"createColorField",
|
|
969
|
+
"closeColorPopover"
|
|
970
|
+
],
|
|
971
|
+
"tokens": [
|
|
972
|
+
"border",
|
|
973
|
+
"border-strong",
|
|
974
|
+
"fg-muted",
|
|
975
|
+
"radius-lg",
|
|
976
|
+
"radius-sm",
|
|
977
|
+
"shadow",
|
|
978
|
+
"surface-overlay",
|
|
979
|
+
"surface-sunken"
|
|
980
|
+
],
|
|
981
|
+
"attributes": [
|
|
982
|
+
"data-shape"
|
|
983
|
+
],
|
|
984
|
+
"example": "import { createColorField } from '@luxalgo/vela-ui/color-picker';\n\nconst colorPicker = createColorField({ theme: /* ChartTheme */, getVal: /* () => string */, onVal: /* (v: string) => void */ });\nhost.append(colorPicker.el);"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "context-menu",
|
|
988
|
+
"import": "@luxalgo/vela-ui/context-menu",
|
|
989
|
+
"description": "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. The rows can depend on the spot: `items` may be a function of the event that opened the menu, asked at every opening. Its look is the dropdown menu's (a theme styles both through `dropdown-menu`), and the list is built on first open.",
|
|
990
|
+
"factory": "createContextMenu",
|
|
991
|
+
"returns": "ContextMenu",
|
|
992
|
+
"propsType": "ContextMenuProps",
|
|
993
|
+
"props": [
|
|
994
|
+
{
|
|
995
|
+
"name": "target",
|
|
996
|
+
"type": "HTMLElement",
|
|
997
|
+
"required": true,
|
|
998
|
+
"doc": "What a right-click, a long press or the context-menu key opens the menu on."
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"name": "items",
|
|
1002
|
+
"type": "ContextMenuItems",
|
|
1003
|
+
"required": true,
|
|
1004
|
+
"doc": "The rows, or a function asked with the event at every opening (rows that depend on the spot: a list's row, a chart's zone). A function returning null or no rows opens nothing and leaves the event to the page."
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"name": "onSelect",
|
|
1008
|
+
"type": "(id: string) => void",
|
|
1009
|
+
"required": false
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "onOpenChange",
|
|
1013
|
+
"type": "(open: boolean) => void",
|
|
1014
|
+
"required": false
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"name": "host",
|
|
1018
|
+
"type": "HTMLElement",
|
|
1019
|
+
"required": false,
|
|
1020
|
+
"doc": "Where the list mounts (default: the target's kit host, found when the menu first opens)."
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "longPress",
|
|
1024
|
+
"type": "boolean",
|
|
1025
|
+
"required": false,
|
|
1026
|
+
"doc": "Open on a long press on touch screens (default true). Turn it off where a long press already means something, like a chart's touch crosshair."
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "checkmarks",
|
|
1030
|
+
"type": "boolean",
|
|
1031
|
+
"required": false,
|
|
1032
|
+
"doc": "Checked rows show a leading ✓ (default true), see the dropdown menu's `checkmarks`."
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"name": "iconBadges",
|
|
1036
|
+
"type": "boolean",
|
|
1037
|
+
"required": false,
|
|
1038
|
+
"doc": "See the dropdown menu's `iconBadges`."
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "minWidth",
|
|
1042
|
+
"type": "string",
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"doc": "Override the list's min-width."
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "onFavorite",
|
|
1048
|
+
"type": "(id: string, on: boolean) => void",
|
|
1049
|
+
"required": false,
|
|
1050
|
+
"doc": "Star-toggle reports from rows carrying `favorite`."
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "collisionPadding",
|
|
1054
|
+
"type": "number",
|
|
1055
|
+
"required": false,
|
|
1056
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"name": "collisionBoundary",
|
|
1060
|
+
"type": "CollisionBoundary",
|
|
1061
|
+
"required": false,
|
|
1062
|
+
"doc": "The area the list stays inside (default: the viewport and the target's clipping containers)."
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"name": "i18n",
|
|
1066
|
+
"type": "Translator",
|
|
1067
|
+
"required": false,
|
|
1068
|
+
"doc": "The translator of the menu's own words (a star's name). Default: the kit build's, else English."
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"exports": [
|
|
1072
|
+
"ContextMenuItems",
|
|
1073
|
+
"ContextMenuProps",
|
|
1074
|
+
"ContextMenu",
|
|
1075
|
+
"createContextMenu"
|
|
1076
|
+
],
|
|
1077
|
+
"tokens": [],
|
|
1078
|
+
"attributes": [],
|
|
1079
|
+
"example": "import { createContextMenu } from '@luxalgo/vela-ui/context-menu';\n\nconst contextMenu = createContextMenu({ target: /* HTMLElement */, items: /* ContextMenuItems */ });\nhost.append(contextMenu.el);"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "data-table",
|
|
1083
|
+
"import": "@luxalgo/vela-ui/data-table",
|
|
1084
|
+
"description": "DataTable: a sortable table with a sticky header in its own scroller (positions, orders, trades). Columns say how to draw, sort and tone their cell; rows are replaced wholesale on `setRows`, which for tens to a few thousand rows is cheaper than diffing. A row's `actions` part (buttons in a cell) shows while the row is hovered or focused.",
|
|
1085
|
+
"component": "data-table",
|
|
1086
|
+
"declaration": "dataTableDef",
|
|
1087
|
+
"parts": {
|
|
1088
|
+
"root": "data-table",
|
|
1089
|
+
"table": "data-table-table",
|
|
1090
|
+
"head": "data-table-head",
|
|
1091
|
+
"sort": "data-table-sort",
|
|
1092
|
+
"row": "data-table-row",
|
|
1093
|
+
"cell": "data-table-cell",
|
|
1094
|
+
"actions": "data-table-actions",
|
|
1095
|
+
"empty": "data-table-empty"
|
|
1096
|
+
},
|
|
1097
|
+
"settings": {
|
|
1098
|
+
"row-height": {
|
|
1099
|
+
"default": "28px"
|
|
1100
|
+
},
|
|
1101
|
+
"head-height": {
|
|
1102
|
+
"default": "28px"
|
|
1103
|
+
},
|
|
1104
|
+
"head-z": {
|
|
1105
|
+
"default": "1"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
"factory": "createDataTable",
|
|
1109
|
+
"returns": "DataTableHandle<T>",
|
|
1110
|
+
"propsType": "DataTableProps",
|
|
1111
|
+
"props": [
|
|
1112
|
+
{
|
|
1113
|
+
"name": "columns",
|
|
1114
|
+
"type": "readonly DataTableColumn<T>[]",
|
|
1115
|
+
"required": true
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"name": "rowKey",
|
|
1119
|
+
"type": "(row: T) => string",
|
|
1120
|
+
"required": true
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"name": "onRowClick",
|
|
1124
|
+
"type": "(row: T, e: MouseEvent) => void",
|
|
1125
|
+
"required": false
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"name": "empty",
|
|
1129
|
+
"type": "() => HTMLElement",
|
|
1130
|
+
"required": false,
|
|
1131
|
+
"doc": "What shows when there are no rows."
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"name": "sort",
|
|
1135
|
+
"type": "{ column: string; dir: \"asc\" | \"desc\"; }",
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"doc": "The initial sort."
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"name": "className",
|
|
1141
|
+
"type": "string",
|
|
1142
|
+
"required": false,
|
|
1143
|
+
"doc": "Extra class names (layout hooks)."
|
|
1144
|
+
}
|
|
1145
|
+
],
|
|
1146
|
+
"exports": [
|
|
1147
|
+
"dataTableDef",
|
|
1148
|
+
"DataTableColumn",
|
|
1149
|
+
"DataTableProps",
|
|
1150
|
+
"DataTableHandle",
|
|
1151
|
+
"createDataTable"
|
|
1152
|
+
],
|
|
1153
|
+
"tokens": [
|
|
1154
|
+
"border-faint",
|
|
1155
|
+
"dur-fast",
|
|
1156
|
+
"fg",
|
|
1157
|
+
"fg-muted",
|
|
1158
|
+
"hover",
|
|
1159
|
+
"loss",
|
|
1160
|
+
"profit",
|
|
1161
|
+
"surface"
|
|
1162
|
+
],
|
|
1163
|
+
"attributes": [
|
|
1164
|
+
"data-align",
|
|
1165
|
+
"data-clickable",
|
|
1166
|
+
"data-sortable",
|
|
1167
|
+
"data-tone"
|
|
1168
|
+
],
|
|
1169
|
+
"example": "import { createDataTable } from '@luxalgo/vela-ui/data-table';\n\nconst dataTable = createDataTable({ columns: /* readonly DataTableColumn<T>[] */, rowKey: /* (row: T) => string */ });\nhost.append(dataTable.el);"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "date-picker",
|
|
1173
|
+
"import": "@luxalgo/vela-ui/date-picker",
|
|
1174
|
+
"description": "DatePicker: a month calendar with month and year panels behind its header. The header month and year switch to their panel; picking a year leads to its months and picking a month back to its days. Dates travel as local `YYYY-MM-DD` strings. Names, digits and the first day of the week follow the `i18n` translator's locale (English, weeks from Sunday, without one); the calendar is always Gregorian. The picker is content only: its host (a popover, a panel) owns the surface around it.",
|
|
1175
|
+
"component": "date-picker",
|
|
1176
|
+
"declaration": "datePickerDef",
|
|
1177
|
+
"parts": {
|
|
1178
|
+
"root": "date-picker",
|
|
1179
|
+
"head": "date-picker-head",
|
|
1180
|
+
"title": "date-picker-title",
|
|
1181
|
+
"switch": "date-picker-switch",
|
|
1182
|
+
"nav": "date-picker-nav",
|
|
1183
|
+
"week": "date-picker-week",
|
|
1184
|
+
"grid": "date-picker-grid",
|
|
1185
|
+
"cells": "date-picker-cells",
|
|
1186
|
+
"blank": "date-picker-blank",
|
|
1187
|
+
"day": "date-picker-day",
|
|
1188
|
+
"cell": "date-picker-cell"
|
|
1189
|
+
},
|
|
1190
|
+
"settings": {
|
|
1191
|
+
"radius": {
|
|
1192
|
+
"default": "var(--vela-radius-sm)",
|
|
1193
|
+
"token": "radius-sm"
|
|
1194
|
+
},
|
|
1195
|
+
"today-ring": {
|
|
1196
|
+
"default": "`inset 0 0 0 1px ${t.border.strong}`"
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"factory": "createDatePicker",
|
|
1200
|
+
"returns": "DatePicker",
|
|
1201
|
+
"propsType": "DatePickerProps",
|
|
1202
|
+
"props": [
|
|
1203
|
+
{
|
|
1204
|
+
"name": "onPick",
|
|
1205
|
+
"type": "(value: string) => void",
|
|
1206
|
+
"required": false,
|
|
1207
|
+
"doc": "A day was picked (`YYYY-MM-DD`)."
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "value",
|
|
1211
|
+
"type": "string",
|
|
1212
|
+
"required": false,
|
|
1213
|
+
"doc": "The selected date (`YYYY-MM-DD`); the calendar opens on its month."
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"name": "today",
|
|
1217
|
+
"type": "Date",
|
|
1218
|
+
"required": false,
|
|
1219
|
+
"doc": "\"Today\" for the today ring and the initial month when nothing is selected."
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"name": "i18n",
|
|
1223
|
+
"type": "Translator",
|
|
1224
|
+
"required": false,
|
|
1225
|
+
"doc": "The translator whose locale names the months and weekdays, picks the first day of the week and the digits: `chart.i18n` inside a chart, `createTranslator(...)` elsewhere. Default: English, weeks starting on Sunday."
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
"exports": [
|
|
1229
|
+
"DatePickerPanel",
|
|
1230
|
+
"DatePickerControllerOptions",
|
|
1231
|
+
"DatePickerCell",
|
|
1232
|
+
"DatePickerController",
|
|
1233
|
+
"isoDate",
|
|
1234
|
+
"normalizeDateInput",
|
|
1235
|
+
"datePickerController",
|
|
1236
|
+
"datePickerDef",
|
|
1237
|
+
"DatePickerOptions",
|
|
1238
|
+
"DatePickerProps",
|
|
1239
|
+
"DatePicker",
|
|
1240
|
+
"createDatePicker"
|
|
1241
|
+
],
|
|
1242
|
+
"tokens": [
|
|
1243
|
+
"border-strong",
|
|
1244
|
+
"fg",
|
|
1245
|
+
"fg-bright",
|
|
1246
|
+
"fg-muted",
|
|
1247
|
+
"font",
|
|
1248
|
+
"hover",
|
|
1249
|
+
"hover-strong",
|
|
1250
|
+
"radius-sm"
|
|
1251
|
+
],
|
|
1252
|
+
"attributes": [
|
|
1253
|
+
"data-checked",
|
|
1254
|
+
"data-outside",
|
|
1255
|
+
"data-today"
|
|
1256
|
+
],
|
|
1257
|
+
"example": "import { createDatePicker } from '@luxalgo/vela-ui/date-picker';\n\nconst datePicker = createDatePicker();\nhost.append(datePicker.el);"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "dialog",
|
|
1261
|
+
"import": "@luxalgo/vela-ui/dialog",
|
|
1262
|
+
"description": "Dialog: a backdrop and a panel with a header and a body, over Zag's dialog machine (focus trap, dismissal, ARIA). The body is the caller's: pass a Node, or fill `body` after creation. `settings` and `form` are the chart settings and the indicator / drawing settings looks. In a shell in the mobile layout every dialog fills the shell.",
|
|
1263
|
+
"component": "dialog",
|
|
1264
|
+
"declaration": "dialogDef",
|
|
1265
|
+
"parts": {
|
|
1266
|
+
"backdrop": "dialog-backdrop",
|
|
1267
|
+
"positioner": "dialog-positioner",
|
|
1268
|
+
"content": "dialog-content",
|
|
1269
|
+
"header": "dialog-header",
|
|
1270
|
+
"title": "dialog-title",
|
|
1271
|
+
"close": "dialog-close",
|
|
1272
|
+
"body": "dialog-body",
|
|
1273
|
+
"footer": "dialog-footer"
|
|
1274
|
+
},
|
|
1275
|
+
"settings": {
|
|
1276
|
+
"radius": {
|
|
1277
|
+
"default": "var(--vela-radius-lg)",
|
|
1278
|
+
"token": "radius-lg"
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"factory": "createDialog",
|
|
1282
|
+
"returns": "Dialog",
|
|
1283
|
+
"propsType": "DialogProps",
|
|
1284
|
+
"props": [
|
|
1285
|
+
{
|
|
1286
|
+
"name": "title",
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"required": false
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"name": "content",
|
|
1292
|
+
"type": "Node | ((body: HTMLElement) => void)",
|
|
1293
|
+
"required": false
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"name": "host",
|
|
1297
|
+
"type": "HTMLElement",
|
|
1298
|
+
"required": false
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "draggable",
|
|
1302
|
+
"type": "boolean",
|
|
1303
|
+
"required": false,
|
|
1304
|
+
"doc": "Drag the dialog by its header (the reference dialogs move; search stays fixed)."
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"name": "dimBackdrop",
|
|
1308
|
+
"type": "boolean",
|
|
1309
|
+
"required": false,
|
|
1310
|
+
"doc": "Darken the page behind the dialog (default false — the chart stays readable while dialogs edit live content). Pass true for a dimming scrim; the backdrop still catches interact-outside dismissal either way."
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"name": "align",
|
|
1314
|
+
"type": "\"top\" | \"center\"",
|
|
1315
|
+
"required": false,
|
|
1316
|
+
"doc": "Vertical placement of the card. Default `top` (current 10vh pad)."
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "contained",
|
|
1320
|
+
"type": "boolean",
|
|
1321
|
+
"required": false,
|
|
1322
|
+
"doc": "Pin the overlay to `host` (absolute) instead of the viewport (fixed)."
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "footer",
|
|
1326
|
+
"type": "Node | ((el: HTMLElement) => void)",
|
|
1327
|
+
"required": false,
|
|
1328
|
+
"doc": "Footer pinned below the scrollable body."
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"name": "headerStart",
|
|
1332
|
+
"type": "Node",
|
|
1333
|
+
"required": false,
|
|
1334
|
+
"doc": "Extra nodes before the title (e.g. a mobile section burger)."
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"name": "flush",
|
|
1338
|
+
"type": "boolean",
|
|
1339
|
+
"required": false,
|
|
1340
|
+
"doc": "Skip default body padding — the caller owns the body layout."
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"name": "variant",
|
|
1344
|
+
"type": "DialogVariant",
|
|
1345
|
+
"required": false,
|
|
1346
|
+
"doc": "`settings`: the chart settings card; `form`: the indicator and drawing settings card."
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "className",
|
|
1350
|
+
"type": "string",
|
|
1351
|
+
"required": false,
|
|
1352
|
+
"doc": "Extra class on the panel."
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"name": "closeOnBackdrop",
|
|
1356
|
+
"type": "boolean",
|
|
1357
|
+
"required": false,
|
|
1358
|
+
"doc": "Close when the backdrop itself is pressed (not when a portaled popover is)."
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "modal",
|
|
1362
|
+
"type": "boolean",
|
|
1363
|
+
"required": false,
|
|
1364
|
+
"doc": "Trap focus + backdrop (default true). Non-modal = floating panel."
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"name": "closeOnEscape",
|
|
1368
|
+
"type": "boolean",
|
|
1369
|
+
"required": false
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"name": "closeOnInteractOutside",
|
|
1373
|
+
"type": "boolean",
|
|
1374
|
+
"required": false
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
"name": "initialFocusEl",
|
|
1378
|
+
"type": "() => HTMLElement | null",
|
|
1379
|
+
"required": false,
|
|
1380
|
+
"doc": "Element to focus on open (default: the machine's first-tabbable pick)."
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"name": "onOpenChange",
|
|
1384
|
+
"type": "(open: boolean) => void",
|
|
1385
|
+
"required": false
|
|
1386
|
+
}
|
|
1387
|
+
],
|
|
1388
|
+
"exports": [
|
|
1389
|
+
"DialogControllerOptions",
|
|
1390
|
+
"DialogService",
|
|
1391
|
+
"DialogApi",
|
|
1392
|
+
"DialogController",
|
|
1393
|
+
"dialogController",
|
|
1394
|
+
"dialogDef",
|
|
1395
|
+
"DialogVariant",
|
|
1396
|
+
"DialogOptions",
|
|
1397
|
+
"DialogProps",
|
|
1398
|
+
"Dialog",
|
|
1399
|
+
"createDialog"
|
|
1400
|
+
],
|
|
1401
|
+
"tokens": [
|
|
1402
|
+
"backdrop",
|
|
1403
|
+
"border",
|
|
1404
|
+
"border-strong",
|
|
1405
|
+
"dur-med",
|
|
1406
|
+
"ease",
|
|
1407
|
+
"fg",
|
|
1408
|
+
"fg-bright",
|
|
1409
|
+
"fg-muted",
|
|
1410
|
+
"hover",
|
|
1411
|
+
"radius-lg",
|
|
1412
|
+
"radius-sm",
|
|
1413
|
+
"shadow-dialog",
|
|
1414
|
+
"space-2",
|
|
1415
|
+
"space-4",
|
|
1416
|
+
"surface",
|
|
1417
|
+
"z-dialog"
|
|
1418
|
+
],
|
|
1419
|
+
"attributes": [
|
|
1420
|
+
"data-align",
|
|
1421
|
+
"data-clear",
|
|
1422
|
+
"data-contained",
|
|
1423
|
+
"data-flush",
|
|
1424
|
+
"data-layout",
|
|
1425
|
+
"data-state"
|
|
1426
|
+
],
|
|
1427
|
+
"example": "import { createDialog } from '@luxalgo/vela-ui/dialog';\n\nconst dialog = createDialog();\nhost.append(dialog.el);"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"name": "donut",
|
|
1431
|
+
"import": "@luxalgo/vela-ui/donut",
|
|
1432
|
+
"description": "Donut: a ring split in segments with a figure in its middle (a win rate), and a legend of the segments beside it. Each segment names its ink: a token (`t.profit.var`) or a color.",
|
|
1433
|
+
"component": "donut",
|
|
1434
|
+
"declaration": "donutDef",
|
|
1435
|
+
"parts": {
|
|
1436
|
+
"root": "donut",
|
|
1437
|
+
"ring": "donut-ring",
|
|
1438
|
+
"track": "donut-track",
|
|
1439
|
+
"segment": "donut-segment",
|
|
1440
|
+
"figure": "donut-figure",
|
|
1441
|
+
"caption": "donut-caption",
|
|
1442
|
+
"legend": "donut-legend",
|
|
1443
|
+
"item": "donut-item",
|
|
1444
|
+
"swatch": "donut-swatch",
|
|
1445
|
+
"label": "donut-label",
|
|
1446
|
+
"value": "donut-value"
|
|
1447
|
+
},
|
|
1448
|
+
"settings": {
|
|
1449
|
+
"swatch-radius": {
|
|
1450
|
+
"default": "2px"
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1453
|
+
"factory": "createDonut",
|
|
1454
|
+
"returns": "DonutHandle",
|
|
1455
|
+
"propsType": "DonutProps",
|
|
1456
|
+
"props": [
|
|
1457
|
+
{
|
|
1458
|
+
"name": "segments",
|
|
1459
|
+
"type": "readonly DonutSegment[]",
|
|
1460
|
+
"required": true
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"name": "center",
|
|
1464
|
+
"type": "string",
|
|
1465
|
+
"required": true,
|
|
1466
|
+
"doc": "The figure in the middle."
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"name": "caption",
|
|
1470
|
+
"type": "string",
|
|
1471
|
+
"required": false,
|
|
1472
|
+
"doc": "A line under the figure."
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"name": "className",
|
|
1476
|
+
"type": "string",
|
|
1477
|
+
"required": false,
|
|
1478
|
+
"doc": "Extra class names (layout hooks)."
|
|
1479
|
+
}
|
|
1480
|
+
],
|
|
1481
|
+
"exports": [
|
|
1482
|
+
"donutDef",
|
|
1483
|
+
"DonutSegment",
|
|
1484
|
+
"DonutProps",
|
|
1485
|
+
"DonutHandle",
|
|
1486
|
+
"createDonut"
|
|
1487
|
+
],
|
|
1488
|
+
"tokens": [
|
|
1489
|
+
"fg-bright",
|
|
1490
|
+
"fg-muted",
|
|
1491
|
+
"hover",
|
|
1492
|
+
"profit"
|
|
1493
|
+
],
|
|
1494
|
+
"attributes": [],
|
|
1495
|
+
"example": "import { createDonut } from '@luxalgo/vela-ui/donut';\n\nconst donut = createDonut({ segments: /* readonly DonutSegment[] */, center: /* string */ });\nhost.append(donut.el);"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"name": "drawer",
|
|
1499
|
+
"import": "@luxalgo/vela-ui/drawer",
|
|
1500
|
+
"description": "Drawer: a bottom sheet. A dimmed backdrop, a panel that slides up from the host's bottom edge, and a grab handle with drag-to-dismiss; the body is the caller's. It rides Zag's dialog machine (focus trap, dismissal, ARIA) with drawer defaults: a backdrop tap dismisses. Built for the mobile chrome, but host-agnostic like every kit component.",
|
|
1501
|
+
"component": "drawer",
|
|
1502
|
+
"declaration": "drawerDef",
|
|
1503
|
+
"parts": {
|
|
1504
|
+
"backdrop": "drawer-backdrop",
|
|
1505
|
+
"positioner": "drawer-positioner",
|
|
1506
|
+
"content": "drawer-content",
|
|
1507
|
+
"grab": "drawer-grab",
|
|
1508
|
+
"title": "drawer-title",
|
|
1509
|
+
"body": "drawer-body"
|
|
1510
|
+
},
|
|
1511
|
+
"settings": {
|
|
1512
|
+
"radius": {
|
|
1513
|
+
"default": "14px 14px 0 0"
|
|
1514
|
+
},
|
|
1515
|
+
"edge-radius": {
|
|
1516
|
+
"default": "14px"
|
|
1517
|
+
},
|
|
1518
|
+
"side-width": {
|
|
1519
|
+
"default": "min(75%, 360px)"
|
|
1520
|
+
},
|
|
1521
|
+
"grab-radius": {
|
|
1522
|
+
"default": "2px"
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"factory": "createDrawer",
|
|
1526
|
+
"returns": "Drawer",
|
|
1527
|
+
"propsType": "DrawerProps",
|
|
1528
|
+
"props": [
|
|
1529
|
+
{
|
|
1530
|
+
"name": "direction",
|
|
1531
|
+
"type": "DrawerDirection",
|
|
1532
|
+
"required": false,
|
|
1533
|
+
"doc": "The edge it slides in from (default `'bottom'`, a bottom sheet). A drag toward that edge dismisses it."
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"name": "title",
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"required": false
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"name": "content",
|
|
1542
|
+
"type": "Node | ((body: HTMLElement) => void)",
|
|
1543
|
+
"required": false
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"name": "host",
|
|
1547
|
+
"type": "HTMLElement",
|
|
1548
|
+
"required": false
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "onSwipe",
|
|
1552
|
+
"type": "(dir: \"right\" | \"left\") => void",
|
|
1553
|
+
"required": false,
|
|
1554
|
+
"doc": "Horizontal swipe across the sheet (fires on release; `'left'` = the finger moved left). Gestures that start inside a horizontally scrollable strip (tabs, chip rows) keep their native scroll instead."
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"name": "closeOnEscape",
|
|
1558
|
+
"type": "boolean",
|
|
1559
|
+
"required": false
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"name": "closeOnInteractOutside",
|
|
1563
|
+
"type": "boolean",
|
|
1564
|
+
"required": false,
|
|
1565
|
+
"doc": "Tap outside (on the backdrop) dismisses — default true."
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "initialFocusEl",
|
|
1569
|
+
"type": "() => HTMLElement | null",
|
|
1570
|
+
"required": false,
|
|
1571
|
+
"doc": "Element to focus on open (default: the machine's first-tabbable pick). The view points this at the sheet itself so opening never focuses an input — on touch devices that would pop the on-screen keyboard over the sheet."
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"name": "onOpenChange",
|
|
1575
|
+
"type": "(open: boolean) => void",
|
|
1576
|
+
"required": false
|
|
1577
|
+
}
|
|
1578
|
+
],
|
|
1579
|
+
"exports": [
|
|
1580
|
+
"DrawerControllerOptions",
|
|
1581
|
+
"DrawerService",
|
|
1582
|
+
"DrawerApi",
|
|
1583
|
+
"DrawerController",
|
|
1584
|
+
"drawerController",
|
|
1585
|
+
"drawerDef",
|
|
1586
|
+
"DrawerProps",
|
|
1587
|
+
"DrawerDirection",
|
|
1588
|
+
"DrawerOptions",
|
|
1589
|
+
"dismissAxis",
|
|
1590
|
+
"classifyGesture",
|
|
1591
|
+
"dragDismisses",
|
|
1592
|
+
"swipeDirection",
|
|
1593
|
+
"Drawer",
|
|
1594
|
+
"createDrawer"
|
|
1595
|
+
],
|
|
1596
|
+
"tokens": [
|
|
1597
|
+
"backdrop",
|
|
1598
|
+
"border-strong",
|
|
1599
|
+
"dur-med",
|
|
1600
|
+
"ease",
|
|
1601
|
+
"fg",
|
|
1602
|
+
"fg-bright",
|
|
1603
|
+
"shadow-dialog",
|
|
1604
|
+
"space-3",
|
|
1605
|
+
"surface",
|
|
1606
|
+
"z-dialog"
|
|
1607
|
+
],
|
|
1608
|
+
"attributes": [
|
|
1609
|
+
"data-direction",
|
|
1610
|
+
"data-layout",
|
|
1611
|
+
"data-state"
|
|
1612
|
+
],
|
|
1613
|
+
"example": "import { createDrawer } from '@luxalgo/vela-ui/drawer';\n\nconst drawer = createDrawer();\nhost.append(drawer.el);"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"name": "dropdown-menu",
|
|
1617
|
+
"import": "@luxalgo/vela-ui/dropdown-menu",
|
|
1618
|
+
"description": "DropdownMenu: MenuItemDescriptor[] projected into a floating list over Zag's menu machine (keyboard navigation, typeahead and dismissal belong to the machine). Items are data descriptors, the plugin contribution currency. An item carrying `submenu` becomes a trigger row owning a nested machine and list, registered as this machine's child: Zag drives hover intent, arrow-key traversal and the dismiss chain across levels.",
|
|
1619
|
+
"component": "dropdown-menu",
|
|
1620
|
+
"declaration": "dropdownMenuDef",
|
|
1621
|
+
"parts": {
|
|
1622
|
+
"content": "dropdown-menu-content",
|
|
1623
|
+
"item": "dropdown-menu-item",
|
|
1624
|
+
"icon": "dropdown-menu-icon",
|
|
1625
|
+
"label": "dropdown-menu-label",
|
|
1626
|
+
"hint": "dropdown-menu-hint",
|
|
1627
|
+
"mark": "dropdown-menu-mark",
|
|
1628
|
+
"badge": "dropdown-menu-badge",
|
|
1629
|
+
"star": "dropdown-menu-star",
|
|
1630
|
+
"switch": "dropdown-menu-switch",
|
|
1631
|
+
"arrow": "dropdown-menu-arrow",
|
|
1632
|
+
"separator": "dropdown-menu-separator"
|
|
1633
|
+
},
|
|
1634
|
+
"settings": {
|
|
1635
|
+
"radius": {
|
|
1636
|
+
"default": "var(--vela-radius-md)",
|
|
1637
|
+
"token": "radius-md"
|
|
1638
|
+
},
|
|
1639
|
+
"switch-radius": {
|
|
1640
|
+
"default": "9px"
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
"factory": "createDropdownMenu",
|
|
1644
|
+
"returns": "DropdownMenu",
|
|
1645
|
+
"propsType": "DropdownMenuProps",
|
|
1646
|
+
"props": [
|
|
1647
|
+
{
|
|
1648
|
+
"name": "trigger",
|
|
1649
|
+
"type": "HTMLElement",
|
|
1650
|
+
"required": false,
|
|
1651
|
+
"doc": "Element that opens the menu on click (gets the machine's trigger props)."
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"name": "host",
|
|
1655
|
+
"type": "HTMLElement",
|
|
1656
|
+
"required": false
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"name": "minWidth",
|
|
1660
|
+
"type": "string",
|
|
1661
|
+
"required": false,
|
|
1662
|
+
"doc": "Override the root list's min-width (the stylesheet default suits full-word labels; compact lists like the timeframe dropdown pass something snug). Submenus keep the default."
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"name": "onFavorite",
|
|
1666
|
+
"type": "(id: string, on: boolean) => void",
|
|
1667
|
+
"required": false,
|
|
1668
|
+
"doc": "Star-toggle reports from items carrying `favorite` (the menu stays open — starring is a side action on a row, never a selection)."
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"name": "checkmarks",
|
|
1672
|
+
"type": "boolean",
|
|
1673
|
+
"required": false,
|
|
1674
|
+
"doc": "Mark checked items with a leading ✓ instead of the selected-row background wash — the shape for pointer-anchored action menus (right-click context menus), where a washed row reads as hover state. A level holding checkable rows reserves the mark column on all its rows so labels align; an all-action level keeps its natural left edge. Submenus inherit the mode. Dropdown menus (a trigger button opening a picker) keep the default wash."
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"name": "iconBadges",
|
|
1678
|
+
"type": "boolean",
|
|
1679
|
+
"required": false,
|
|
1680
|
+
"doc": "Sit each row's icon in a squared badge (a 24px rounded tile with a faint fill and a soft border) instead of a bare glyph: its glyph brightens on a hovered row, and the tile inverts on the selected one. A level where some rows carry an icon reserves the badge column on all its rows so labels align; a level with no icon keeps its natural left edge. With `checkmarks`, the mark column leads and the badge follows. Submenus inherit the mode."
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"name": "i18n",
|
|
1684
|
+
"type": "Translator",
|
|
1685
|
+
"required": false,
|
|
1686
|
+
"doc": "The translator of the menu's own words (a star's name). Default: the kit build's, else English."
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"name": "items",
|
|
1690
|
+
"type": "readonly MenuItemDescriptor[]",
|
|
1691
|
+
"required": true
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"name": "onSelect",
|
|
1695
|
+
"type": "(id: string) => void",
|
|
1696
|
+
"required": false
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"name": "placement",
|
|
1700
|
+
"type": "\"top\" | \"right\" | \"bottom\" | \"left\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\"",
|
|
1701
|
+
"required": false
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"name": "onOpenChange",
|
|
1705
|
+
"type": "(open: boolean) => void",
|
|
1706
|
+
"required": false
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"name": "getAnchorRect",
|
|
1710
|
+
"type": "() => { x: number; y: number; width: number; height: number; } | null",
|
|
1711
|
+
"required": false,
|
|
1712
|
+
"doc": "Pin the floating list to this rect (viewport coords). Used to keep an open menu still when its trigger moves — starring a timeframe adds a chip and would otherwise drag the list with the caret. `null` falls through to the live trigger."
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"name": "triggerId",
|
|
1716
|
+
"type": "string",
|
|
1717
|
+
"required": false,
|
|
1718
|
+
"doc": "Share the trigger's DOM id with other machines composed on the same element."
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"name": "id",
|
|
1722
|
+
"type": "string",
|
|
1723
|
+
"required": false,
|
|
1724
|
+
"doc": "Pin the machine's own id instead of taking a fresh one. A parent registers its submenus under this key, so rebuilding a branch replaces its entry rather than piling a new one on top."
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "side",
|
|
1728
|
+
"type": "Side",
|
|
1729
|
+
"required": false,
|
|
1730
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"name": "align",
|
|
1734
|
+
"type": "Align",
|
|
1735
|
+
"required": false,
|
|
1736
|
+
"doc": "Its alignment along that side."
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"name": "sideOffset",
|
|
1740
|
+
"type": "number",
|
|
1741
|
+
"required": false,
|
|
1742
|
+
"doc": "Its distance from the trigger, in px."
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "alignOffset",
|
|
1746
|
+
"type": "number",
|
|
1747
|
+
"required": false,
|
|
1748
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "avoidCollisions",
|
|
1752
|
+
"type": "boolean",
|
|
1753
|
+
"required": false,
|
|
1754
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"name": "collisionPadding",
|
|
1758
|
+
"type": "number",
|
|
1759
|
+
"required": false,
|
|
1760
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"name": "collisionBoundary",
|
|
1764
|
+
"type": "CollisionBoundary",
|
|
1765
|
+
"required": false,
|
|
1766
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
1767
|
+
}
|
|
1768
|
+
],
|
|
1769
|
+
"exports": [
|
|
1770
|
+
"MenuItemDescriptor",
|
|
1771
|
+
"DropdownMenuControllerOptions",
|
|
1772
|
+
"DropdownMenuService",
|
|
1773
|
+
"DropdownMenuApi",
|
|
1774
|
+
"DropdownMenuController",
|
|
1775
|
+
"dropdownMenuController",
|
|
1776
|
+
"dropdownMenuDef",
|
|
1777
|
+
"DropdownMenuProps",
|
|
1778
|
+
"DropdownMenuOptions",
|
|
1779
|
+
"DropdownMenu",
|
|
1780
|
+
"createDropdownMenu"
|
|
1781
|
+
],
|
|
1782
|
+
"tokens": [
|
|
1783
|
+
"border",
|
|
1784
|
+
"border-soft",
|
|
1785
|
+
"border-strong",
|
|
1786
|
+
"dur-fast",
|
|
1787
|
+
"dur-med",
|
|
1788
|
+
"ease",
|
|
1789
|
+
"fg",
|
|
1790
|
+
"fg-bright",
|
|
1791
|
+
"fg-faint",
|
|
1792
|
+
"fg-muted",
|
|
1793
|
+
"font-size-sm",
|
|
1794
|
+
"highlight",
|
|
1795
|
+
"hover",
|
|
1796
|
+
"hover-strong",
|
|
1797
|
+
"radius-md",
|
|
1798
|
+
"radius-sm",
|
|
1799
|
+
"selected-bg",
|
|
1800
|
+
"selected-fg",
|
|
1801
|
+
"shadow",
|
|
1802
|
+
"surface",
|
|
1803
|
+
"surface-overlay",
|
|
1804
|
+
"z-menu"
|
|
1805
|
+
],
|
|
1806
|
+
"attributes": [
|
|
1807
|
+
"data-badges",
|
|
1808
|
+
"data-checked",
|
|
1809
|
+
"data-checkmark",
|
|
1810
|
+
"data-disabled",
|
|
1811
|
+
"data-fav",
|
|
1812
|
+
"data-highlighted",
|
|
1813
|
+
"data-on",
|
|
1814
|
+
"data-state"
|
|
1815
|
+
],
|
|
1816
|
+
"example": "import { createDropdownMenu } from '@luxalgo/vela-ui/dropdown-menu';\n\nconst dropdownMenu = createDropdownMenu({ items: /* readonly MenuItemDescriptor[] */ });\nhost.append(dropdownMenu.el);"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "empty",
|
|
1820
|
+
"import": "@luxalgo/vela-ui/empty",
|
|
1821
|
+
"description": "Empty: what a panel shows when it has nothing to list: an icon in a tile, a title, a line saying why or what to do, and an optional action (a button that fills it).",
|
|
1822
|
+
"component": "empty",
|
|
1823
|
+
"declaration": "emptyDef",
|
|
1824
|
+
"parts": {
|
|
1825
|
+
"root": "empty",
|
|
1826
|
+
"icon": "empty-icon",
|
|
1827
|
+
"title": "empty-title",
|
|
1828
|
+
"description": "empty-description"
|
|
1829
|
+
},
|
|
1830
|
+
"settings": {
|
|
1831
|
+
"icon-radius": {
|
|
1832
|
+
"default": "9px"
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
"factory": "createEmpty",
|
|
1836
|
+
"returns": "EmptyHandle",
|
|
1837
|
+
"propsType": "EmptyProps",
|
|
1838
|
+
"props": [
|
|
1839
|
+
{
|
|
1840
|
+
"name": "icon",
|
|
1841
|
+
"type": "string",
|
|
1842
|
+
"required": false,
|
|
1843
|
+
"doc": "Icon id from the kit's registry, shown in a tile above the title."
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
"name": "title",
|
|
1847
|
+
"type": "string",
|
|
1848
|
+
"required": true
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"name": "description",
|
|
1852
|
+
"type": "string",
|
|
1853
|
+
"required": false
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"name": "action",
|
|
1857
|
+
"type": "HTMLElement",
|
|
1858
|
+
"required": false,
|
|
1859
|
+
"doc": "A control under the text (a button that adds the first item)."
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
"name": "className",
|
|
1863
|
+
"type": "string",
|
|
1864
|
+
"required": false,
|
|
1865
|
+
"doc": "Extra class names (layout hooks)."
|
|
1866
|
+
}
|
|
1867
|
+
],
|
|
1868
|
+
"exports": [
|
|
1869
|
+
"emptyDef",
|
|
1870
|
+
"EmptyProps",
|
|
1871
|
+
"EmptyHandle",
|
|
1872
|
+
"createEmpty"
|
|
1873
|
+
],
|
|
1874
|
+
"tokens": [
|
|
1875
|
+
"fg",
|
|
1876
|
+
"fg-bright",
|
|
1877
|
+
"fg-muted",
|
|
1878
|
+
"hover"
|
|
1879
|
+
],
|
|
1880
|
+
"attributes": [],
|
|
1881
|
+
"example": "import { createEmpty } from '@luxalgo/vela-ui/empty';\n\nconst empty = createEmpty({ title: /* string */ });\nhost.append(empty.el);"
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"name": "field",
|
|
1885
|
+
"import": "@luxalgo/vela-ui/field",
|
|
1886
|
+
"description": "Field: the label-and-control grid the settings dialogs lay their inputs out on: rows (a label and its control, an optional master toggle that dims the control, an optional info mark), full-width toggles, stacked and inline rows, section headings and separators, and a factory that builds a row's control from a descriptor. Rows use `display: contents`, so their label and control sit on the grid's own tracks.",
|
|
1887
|
+
"component": "field",
|
|
1888
|
+
"declaration": "fieldDef",
|
|
1889
|
+
"parts": {
|
|
1890
|
+
"grid": "field-grid",
|
|
1891
|
+
"row": "field-row",
|
|
1892
|
+
"span": "field-span",
|
|
1893
|
+
"label": "field-label",
|
|
1894
|
+
"cell": "field-cell",
|
|
1895
|
+
"bool": "field-bool",
|
|
1896
|
+
"stacked": "field-stacked",
|
|
1897
|
+
"stacked-head": "field-stacked-head",
|
|
1898
|
+
"inline": "field-inline",
|
|
1899
|
+
"inline-item": "field-inline-item",
|
|
1900
|
+
"toggle-label": "field-toggle-label",
|
|
1901
|
+
"section": "field-section",
|
|
1902
|
+
"sep": "field-sep"
|
|
1903
|
+
},
|
|
1904
|
+
"settings": {},
|
|
1905
|
+
"exports": [
|
|
1906
|
+
"FieldGridVariant",
|
|
1907
|
+
"FieldLabelSize",
|
|
1908
|
+
"FIELD_GAP_PX",
|
|
1909
|
+
"fieldGridColumns",
|
|
1910
|
+
"fieldDef",
|
|
1911
|
+
"FieldGridOptions",
|
|
1912
|
+
"fieldGrid",
|
|
1913
|
+
"FieldSectionOptions",
|
|
1914
|
+
"fieldSection",
|
|
1915
|
+
"fieldSeparator",
|
|
1916
|
+
"FieldToggleOpts",
|
|
1917
|
+
"FieldInlineItem",
|
|
1918
|
+
"FieldRowOptions",
|
|
1919
|
+
"fieldRow",
|
|
1920
|
+
"FieldControlHandle",
|
|
1921
|
+
"FieldControlDesc",
|
|
1922
|
+
"buildFieldControl"
|
|
1923
|
+
],
|
|
1924
|
+
"tokens": [
|
|
1925
|
+
"fg-muted",
|
|
1926
|
+
"font-size-sm"
|
|
1927
|
+
],
|
|
1928
|
+
"attributes": [
|
|
1929
|
+
"data-first",
|
|
1930
|
+
"data-mobile"
|
|
1931
|
+
]
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"name": "glyph-select",
|
|
1935
|
+
"import": "@luxalgo/vela-ui/glyph-select",
|
|
1936
|
+
"description": "GlyphSelect: a trigger showing the current option's glyph, and a list of glyph options on a popover. The settings dialogs' line-width field is one (`widthField`, 1–5 px).",
|
|
1937
|
+
"component": "glyph-select",
|
|
1938
|
+
"declaration": "glyphSelectDef",
|
|
1939
|
+
"parts": {
|
|
1940
|
+
"root": "glyph-select",
|
|
1941
|
+
"value": "glyph-select-value",
|
|
1942
|
+
"icon": "glyph-select-icon",
|
|
1943
|
+
"content": "glyph-select-content",
|
|
1944
|
+
"item": "glyph-select-item"
|
|
1945
|
+
},
|
|
1946
|
+
"settings": {
|
|
1947
|
+
"radius": {
|
|
1948
|
+
"default": "var(--vela-radius-md)",
|
|
1949
|
+
"token": "radius-md"
|
|
1950
|
+
},
|
|
1951
|
+
"content-radius": {
|
|
1952
|
+
"default": "var(--vela-radius-md)",
|
|
1953
|
+
"token": "radius-md"
|
|
1954
|
+
},
|
|
1955
|
+
"focus-ring": {
|
|
1956
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
"factory": "createGlyphSelect",
|
|
1960
|
+
"returns": "GlyphSelect<T>",
|
|
1961
|
+
"propsType": "GlyphSelectProps",
|
|
1962
|
+
"props": [
|
|
1963
|
+
{
|
|
1964
|
+
"name": "theme",
|
|
1965
|
+
"type": "ChartTheme",
|
|
1966
|
+
"required": true
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
"name": "title",
|
|
1970
|
+
"type": "string",
|
|
1971
|
+
"required": false
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"name": "get",
|
|
1975
|
+
"type": "() => T",
|
|
1976
|
+
"required": false
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "options",
|
|
1980
|
+
"type": "readonly GlyphOption<T>[]",
|
|
1981
|
+
"required": true
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
"name": "value",
|
|
1985
|
+
"type": "T",
|
|
1986
|
+
"required": true
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
"name": "onChange",
|
|
1990
|
+
"type": "(value: T) => void",
|
|
1991
|
+
"required": false
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"name": "side",
|
|
1995
|
+
"type": "Side",
|
|
1996
|
+
"required": false,
|
|
1997
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
"name": "align",
|
|
2001
|
+
"type": "Align",
|
|
2002
|
+
"required": false,
|
|
2003
|
+
"doc": "Its alignment along that side."
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"name": "sideOffset",
|
|
2007
|
+
"type": "number",
|
|
2008
|
+
"required": false,
|
|
2009
|
+
"doc": "Its distance from the trigger, in px."
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
"name": "alignOffset",
|
|
2013
|
+
"type": "number",
|
|
2014
|
+
"required": false,
|
|
2015
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
"name": "avoidCollisions",
|
|
2019
|
+
"type": "boolean",
|
|
2020
|
+
"required": false,
|
|
2021
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
"name": "collisionPadding",
|
|
2025
|
+
"type": "number",
|
|
2026
|
+
"required": false,
|
|
2027
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"name": "collisionBoundary",
|
|
2031
|
+
"type": "CollisionBoundary",
|
|
2032
|
+
"required": false,
|
|
2033
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
2034
|
+
}
|
|
2035
|
+
],
|
|
2036
|
+
"exports": [
|
|
2037
|
+
"GlyphOption",
|
|
2038
|
+
"GlyphSelectControllerOptions",
|
|
2039
|
+
"GlyphSelectController",
|
|
2040
|
+
"glyphSelectController",
|
|
2041
|
+
"WIDTH_FIELD_OPTIONS",
|
|
2042
|
+
"lineWidthGlyph",
|
|
2043
|
+
"widthFieldOptions",
|
|
2044
|
+
"glyphSelectDef",
|
|
2045
|
+
"GlyphSelectOptions",
|
|
2046
|
+
"GlyphSelectProps",
|
|
2047
|
+
"GlyphSelect",
|
|
2048
|
+
"createGlyphSelect",
|
|
2049
|
+
"widthField",
|
|
2050
|
+
"closeWidthPopover"
|
|
2051
|
+
],
|
|
2052
|
+
"tokens": [
|
|
2053
|
+
"bg",
|
|
2054
|
+
"border-strong",
|
|
2055
|
+
"dur-fast",
|
|
2056
|
+
"fg",
|
|
2057
|
+
"fg-bright",
|
|
2058
|
+
"fg-muted",
|
|
2059
|
+
"focus",
|
|
2060
|
+
"focus-soft",
|
|
2061
|
+
"font",
|
|
2062
|
+
"hover",
|
|
2063
|
+
"hover-strong",
|
|
2064
|
+
"radius-md",
|
|
2065
|
+
"radius-sm",
|
|
2066
|
+
"shadow"
|
|
2067
|
+
],
|
|
2068
|
+
"attributes": [
|
|
2069
|
+
"data-active"
|
|
2070
|
+
],
|
|
2071
|
+
"example": "import { createGlyphSelect } from '@luxalgo/vela-ui/glyph-select';\n\nconst glyphSelect = createGlyphSelect({ theme: /* ChartTheme */, options: /* readonly GlyphOption<T>[] */, value: /* T */ });\nhost.append(glyphSelect.el);"
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
"name": "hover-card",
|
|
2075
|
+
"import": "@luxalgo/vela-ui/hover-card",
|
|
2076
|
+
"description": "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. `attachHoverCard` wires a trigger; the card mounts on the host it is given (a themed shell root) and never takes the pointer.",
|
|
2077
|
+
"component": "hover-card",
|
|
2078
|
+
"declaration": "hoverCardDef",
|
|
2079
|
+
"parts": {
|
|
2080
|
+
"root": "hover-card",
|
|
2081
|
+
"heading": "hover-card-heading",
|
|
2082
|
+
"icon": "hover-card-icon",
|
|
2083
|
+
"title": "hover-card-title",
|
|
2084
|
+
"description": "hover-card-description",
|
|
2085
|
+
"body": "hover-card-body",
|
|
2086
|
+
"hint": "hover-card-hint"
|
|
2087
|
+
},
|
|
2088
|
+
"settings": {
|
|
2089
|
+
"radius": {
|
|
2090
|
+
"default": "var(--vela-radius-md)",
|
|
2091
|
+
"token": "radius-md"
|
|
2092
|
+
},
|
|
2093
|
+
"width": {
|
|
2094
|
+
"default": "240px"
|
|
2095
|
+
},
|
|
2096
|
+
"wide-width": {
|
|
2097
|
+
"default": "280px"
|
|
2098
|
+
},
|
|
2099
|
+
"icon-radius": {
|
|
2100
|
+
"default": "5px"
|
|
2101
|
+
},
|
|
2102
|
+
"shadow": {
|
|
2103
|
+
"default": "t.shadow.toString()"
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
"factory": "createHoverCard",
|
|
2107
|
+
"returns": "HoverCardHandle",
|
|
2108
|
+
"propsType": "HoverCardContent",
|
|
2109
|
+
"props": [
|
|
2110
|
+
{
|
|
2111
|
+
"name": "title",
|
|
2112
|
+
"type": "string",
|
|
2113
|
+
"required": true
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"name": "description",
|
|
2117
|
+
"type": "string",
|
|
2118
|
+
"required": false
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
"name": "icon",
|
|
2122
|
+
"type": "string",
|
|
2123
|
+
"required": false,
|
|
2124
|
+
"doc": "Icon id from the kit's registry, in a tile beside the title."
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
"name": "shortcut",
|
|
2128
|
+
"type": "string",
|
|
2129
|
+
"required": false,
|
|
2130
|
+
"doc": "A shortcut drawn as keycaps (`Alt+A`)."
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"name": "hint",
|
|
2134
|
+
"type": "string",
|
|
2135
|
+
"required": false,
|
|
2136
|
+
"doc": "A secondary line at the bottom (\"Shift-click to open alongside\")."
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"name": "body",
|
|
2140
|
+
"type": "Node",
|
|
2141
|
+
"required": false,
|
|
2142
|
+
"doc": "Rich content under the description (figures, a sparkline)."
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
"name": "wide",
|
|
2146
|
+
"type": "boolean",
|
|
2147
|
+
"required": false,
|
|
2148
|
+
"doc": "A wider card, for rich content."
|
|
2149
|
+
}
|
|
2150
|
+
],
|
|
2151
|
+
"exports": [
|
|
2152
|
+
"hoverCardDef",
|
|
2153
|
+
"HoverCardContent",
|
|
2154
|
+
"HoverCardSide",
|
|
2155
|
+
"HoverCardPlacement",
|
|
2156
|
+
"HoverCardHandle",
|
|
2157
|
+
"createHoverCard",
|
|
2158
|
+
"AttachHoverCardOptions",
|
|
2159
|
+
"attachHoverCard"
|
|
2160
|
+
],
|
|
2161
|
+
"tokens": [
|
|
2162
|
+
"border",
|
|
2163
|
+
"dur-med",
|
|
2164
|
+
"ease",
|
|
2165
|
+
"fg",
|
|
2166
|
+
"fg-bright",
|
|
2167
|
+
"fg-muted",
|
|
2168
|
+
"font",
|
|
2169
|
+
"hover",
|
|
2170
|
+
"radius-md",
|
|
2171
|
+
"shadow",
|
|
2172
|
+
"surface-elev",
|
|
2173
|
+
"z-tooltip"
|
|
2174
|
+
],
|
|
2175
|
+
"attributes": [
|
|
2176
|
+
"data-side",
|
|
2177
|
+
"data-wide"
|
|
2178
|
+
],
|
|
2179
|
+
"example": "import { createHoverCard } from '@luxalgo/vela-ui/hover-card';\n\nconst hoverCard = createHoverCard({ title: /* string */ });\nhost.append(hoverCard.el);"
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
"name": "input-group",
|
|
2183
|
+
"import": "@luxalgo/vela-ui/input-group",
|
|
2184
|
+
"description": "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). It reports every keystroke (`onValueChange`); its element is `input`, for a host's own keys. `md` matches Input; `sm` is the compact field.",
|
|
2185
|
+
"component": "input-group",
|
|
2186
|
+
"declaration": "inputGroupDef",
|
|
2187
|
+
"parts": {
|
|
2188
|
+
"root": "input-group",
|
|
2189
|
+
"control": "input-group-control",
|
|
2190
|
+
"addon": "input-group-addon",
|
|
2191
|
+
"text": "input-group-text"
|
|
2192
|
+
},
|
|
2193
|
+
"settings": {
|
|
2194
|
+
"radius": {
|
|
2195
|
+
"default": "var(--vela-radius-md)",
|
|
2196
|
+
"token": "radius-md"
|
|
2197
|
+
},
|
|
2198
|
+
"height": {
|
|
2199
|
+
"default": "34px"
|
|
2200
|
+
},
|
|
2201
|
+
"height-sm": {
|
|
2202
|
+
"default": "28px"
|
|
2203
|
+
},
|
|
2204
|
+
"focus-ring": {
|
|
2205
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
2206
|
+
}
|
|
2207
|
+
},
|
|
2208
|
+
"variants": {
|
|
2209
|
+
"size": [
|
|
2210
|
+
"md",
|
|
2211
|
+
"sm"
|
|
2212
|
+
]
|
|
2213
|
+
},
|
|
2214
|
+
"factory": "createInputGroup",
|
|
2215
|
+
"returns": "InputGroup",
|
|
2216
|
+
"propsType": "InputGroupProps",
|
|
2217
|
+
"props": [
|
|
2218
|
+
{
|
|
2219
|
+
"name": "addons",
|
|
2220
|
+
"type": "readonly InputGroupAddon[]",
|
|
2221
|
+
"required": false
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
"name": "type",
|
|
2225
|
+
"type": "InputGroupType",
|
|
2226
|
+
"required": false
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
"name": "value",
|
|
2230
|
+
"type": "string",
|
|
2231
|
+
"required": false
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"name": "defaultValue",
|
|
2235
|
+
"type": "string",
|
|
2236
|
+
"required": false,
|
|
2237
|
+
"doc": "The text it starts with when `value` is not given."
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
"name": "placeholder",
|
|
2241
|
+
"type": "string",
|
|
2242
|
+
"required": false
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
"name": "name",
|
|
2246
|
+
"type": "string",
|
|
2247
|
+
"required": false,
|
|
2248
|
+
"doc": "Submitted with its form under this name."
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"name": "required",
|
|
2252
|
+
"type": "boolean",
|
|
2253
|
+
"required": false
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
"name": "disabled",
|
|
2257
|
+
"type": "boolean",
|
|
2258
|
+
"required": false
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
"name": "id",
|
|
2262
|
+
"type": "string",
|
|
2263
|
+
"required": false,
|
|
2264
|
+
"doc": "The id of its input, so a `<label for>` reaches it."
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
"name": "size",
|
|
2268
|
+
"type": "InputGroupSize",
|
|
2269
|
+
"required": false
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"name": "label",
|
|
2273
|
+
"type": "string",
|
|
2274
|
+
"required": false,
|
|
2275
|
+
"doc": "Its accessible name, when no `<label>` names it."
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
"name": "onValueChange",
|
|
2279
|
+
"type": "(value: string) => void",
|
|
2280
|
+
"required": false,
|
|
2281
|
+
"doc": "Called on every keystroke."
|
|
2282
|
+
}
|
|
2283
|
+
],
|
|
2284
|
+
"exports": [
|
|
2285
|
+
"InputGroupSize",
|
|
2286
|
+
"InputGroupAlign",
|
|
2287
|
+
"InputGroupType",
|
|
2288
|
+
"InputGroupAddon",
|
|
2289
|
+
"inputGroupDef",
|
|
2290
|
+
"inputGroupVariants",
|
|
2291
|
+
"InputGroupProps",
|
|
2292
|
+
"InputGroup",
|
|
2293
|
+
"createInputGroup"
|
|
2294
|
+
],
|
|
2295
|
+
"tokens": [
|
|
2296
|
+
"border-strong",
|
|
2297
|
+
"dur-fast",
|
|
2298
|
+
"fg",
|
|
2299
|
+
"fg-bright",
|
|
2300
|
+
"fg-muted",
|
|
2301
|
+
"focus",
|
|
2302
|
+
"focus-soft",
|
|
2303
|
+
"radius-md",
|
|
2304
|
+
"radius-sm",
|
|
2305
|
+
"surface-elev"
|
|
2306
|
+
],
|
|
2307
|
+
"attributes": [
|
|
2308
|
+
"data-align",
|
|
2309
|
+
"data-block",
|
|
2310
|
+
"data-disabled",
|
|
2311
|
+
"data-end",
|
|
2312
|
+
"data-start"
|
|
2313
|
+
],
|
|
2314
|
+
"example": "import { createInputGroup } from '@luxalgo/vela-ui/input-group';\n\nconst inputGroup = createInputGroup();\nhost.append(inputGroup.el);"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"name": "input",
|
|
2318
|
+
"import": "@luxalgo/vela-ui/input",
|
|
2319
|
+
"description": "Input: a one-line text input that commits on blur or Enter. `md` fills its parent and matches the settings dialogs' inputs; `sm` is a compact 100px field.",
|
|
2320
|
+
"component": "input",
|
|
2321
|
+
"declaration": "inputDef",
|
|
2322
|
+
"parts": {
|
|
2323
|
+
"root": "input",
|
|
2324
|
+
"control": "input-control"
|
|
2325
|
+
},
|
|
2326
|
+
"settings": {
|
|
2327
|
+
"radius": {
|
|
2328
|
+
"default": "var(--vela-radius-md)",
|
|
2329
|
+
"token": "radius-md"
|
|
2330
|
+
},
|
|
2331
|
+
"focus-ring": {
|
|
2332
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
"variants": {
|
|
2336
|
+
"size": [
|
|
2337
|
+
"md",
|
|
2338
|
+
"sm"
|
|
2339
|
+
]
|
|
2340
|
+
},
|
|
2341
|
+
"factory": "createInput",
|
|
2342
|
+
"returns": "Input",
|
|
2343
|
+
"propsType": "InputProps",
|
|
2344
|
+
"props": [
|
|
2345
|
+
{
|
|
2346
|
+
"name": "type",
|
|
2347
|
+
"type": "InputType",
|
|
2348
|
+
"required": false,
|
|
2349
|
+
"doc": "The kind of text it takes (default `text`)."
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"name": "placeholder",
|
|
2353
|
+
"type": "string",
|
|
2354
|
+
"required": false
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"name": "name",
|
|
2358
|
+
"type": "string",
|
|
2359
|
+
"required": false,
|
|
2360
|
+
"doc": "Submitted with its form under this name."
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"name": "required",
|
|
2364
|
+
"type": "boolean",
|
|
2365
|
+
"required": false
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"name": "id",
|
|
2369
|
+
"type": "string",
|
|
2370
|
+
"required": false
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"name": "value",
|
|
2374
|
+
"type": "string",
|
|
2375
|
+
"required": false
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
"name": "defaultValue",
|
|
2379
|
+
"type": "string",
|
|
2380
|
+
"required": false,
|
|
2381
|
+
"doc": "The text it starts with when `value` is not given."
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"name": "size",
|
|
2385
|
+
"type": "InputSize",
|
|
2386
|
+
"required": false
|
|
2387
|
+
},
|
|
2388
|
+
{
|
|
2389
|
+
"name": "fill",
|
|
2390
|
+
"type": "boolean",
|
|
2391
|
+
"required": false
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"name": "disabled",
|
|
2395
|
+
"type": "boolean",
|
|
2396
|
+
"required": false
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
"name": "onChange",
|
|
2400
|
+
"type": "(value: string) => void",
|
|
2401
|
+
"required": false
|
|
2402
|
+
}
|
|
2403
|
+
],
|
|
2404
|
+
"exports": [
|
|
2405
|
+
"InputSize",
|
|
2406
|
+
"InputControllerOptions",
|
|
2407
|
+
"InputController",
|
|
2408
|
+
"inputController",
|
|
2409
|
+
"inputDef",
|
|
2410
|
+
"inputVariants",
|
|
2411
|
+
"InputType",
|
|
2412
|
+
"InputOptions",
|
|
2413
|
+
"InputProps",
|
|
2414
|
+
"TEXT_STYLE_ID",
|
|
2415
|
+
"TEXT_CSS",
|
|
2416
|
+
"Input",
|
|
2417
|
+
"createInput"
|
|
2418
|
+
],
|
|
2419
|
+
"tokens": [
|
|
2420
|
+
"border-strong",
|
|
2421
|
+
"dur-fast",
|
|
2422
|
+
"fg",
|
|
2423
|
+
"fg-bright",
|
|
2424
|
+
"fg-muted",
|
|
2425
|
+
"focus",
|
|
2426
|
+
"focus-soft",
|
|
2427
|
+
"radius-md",
|
|
2428
|
+
"radius-sm",
|
|
2429
|
+
"surface-elev"
|
|
2430
|
+
],
|
|
2431
|
+
"attributes": [
|
|
2432
|
+
"data-fill"
|
|
2433
|
+
],
|
|
2434
|
+
"example": "import { createInput } from '@luxalgo/vela-ui/input';\n\nconst input = createInput();\nhost.append(input.el);"
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
"name": "item",
|
|
2438
|
+
"import": "@luxalgo/vela-ui/item",
|
|
2439
|
+
"description": "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). With `onSelect` the whole row is clickable, while a press on a control inside it stays that control's. To the keyboard (Enter, Space) and to screen readers the row is a button; a row with actions makes its text the button instead, as a button cannot hold other buttons. `selected` marks the current row; `revealActions` keeps the actions out of sight until the row is hovered or holds focus, while the meta stays. `default` is bare until hovered, `outline` bordered, `muted` on a sunken fill; `sm` is the compact row of dense panels. ItemGroup stacks rows, with a line between them when `separated`.",
|
|
2440
|
+
"component": "item",
|
|
2441
|
+
"declaration": "itemDef",
|
|
2442
|
+
"parts": {
|
|
2443
|
+
"root": "item",
|
|
2444
|
+
"media": "item-media",
|
|
2445
|
+
"content": "item-content",
|
|
2446
|
+
"title": "item-title",
|
|
2447
|
+
"description": "item-description",
|
|
2448
|
+
"meta": "item-meta",
|
|
2449
|
+
"actions": "item-actions",
|
|
2450
|
+
"group": "item-group"
|
|
2451
|
+
},
|
|
2452
|
+
"settings": {
|
|
2453
|
+
"radius": {
|
|
2454
|
+
"default": "var(--vela-radius-md)",
|
|
2455
|
+
"token": "radius-md"
|
|
2456
|
+
},
|
|
2457
|
+
"gap": {
|
|
2458
|
+
"default": "10px"
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
"variants": {
|
|
2462
|
+
"variant": [
|
|
2463
|
+
"default",
|
|
2464
|
+
"outline",
|
|
2465
|
+
"muted"
|
|
2466
|
+
],
|
|
2467
|
+
"size": [
|
|
2468
|
+
"default",
|
|
2469
|
+
"sm"
|
|
2470
|
+
]
|
|
2471
|
+
},
|
|
2472
|
+
"factory": "createItem",
|
|
2473
|
+
"returns": "ItemHandle",
|
|
2474
|
+
"propsType": "ItemProps",
|
|
2475
|
+
"props": [
|
|
2476
|
+
{
|
|
2477
|
+
"name": "title",
|
|
2478
|
+
"type": "string | Node",
|
|
2479
|
+
"required": true,
|
|
2480
|
+
"doc": "The first line: text, or an element (a ticker with a chip after it)."
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"name": "description",
|
|
2484
|
+
"type": "string | Node",
|
|
2485
|
+
"required": false,
|
|
2486
|
+
"doc": "The muted line under the title."
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"name": "media",
|
|
2490
|
+
"type": "string | Node",
|
|
2491
|
+
"required": false,
|
|
2492
|
+
"doc": "Before the text: an icon id from the kit's registry, or an element (a logo, an avatar, a favorite star)."
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
"name": "meta",
|
|
2496
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
2497
|
+
"required": false,
|
|
2498
|
+
"doc": "After the text, always shown: figures and badges (a price and its change)."
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
"name": "actions",
|
|
2502
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
2503
|
+
"required": false,
|
|
2504
|
+
"doc": "At the row's end: its buttons."
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"name": "revealActions",
|
|
2508
|
+
"type": "boolean",
|
|
2509
|
+
"required": false,
|
|
2510
|
+
"doc": "Show the actions only while the row is hovered or holds focus (on touch screens they always show). The meta stays."
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"name": "selected",
|
|
2514
|
+
"type": "boolean",
|
|
2515
|
+
"required": false,
|
|
2516
|
+
"doc": "The current row (the open symbol, the highlighted result)."
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
"name": "disabled",
|
|
2520
|
+
"type": "boolean",
|
|
2521
|
+
"required": false
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
"name": "onSelect",
|
|
2525
|
+
"type": "(e: MouseEvent | KeyboardEvent) => void",
|
|
2526
|
+
"required": false,
|
|
2527
|
+
"doc": "Makes the row clickable: a click, Enter or Space runs it."
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"name": "role",
|
|
2531
|
+
"type": "string",
|
|
2532
|
+
"required": false,
|
|
2533
|
+
"doc": "The row's role (default `button` when it has `onSelect` and no actions, its text being the button when it has actions); `option` in a listbox, where `selected` is `aria-selected`."
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
"name": "className",
|
|
2537
|
+
"type": "string",
|
|
2538
|
+
"required": false,
|
|
2539
|
+
"doc": "Extra class names (layout hooks)."
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
"name": "variant",
|
|
2543
|
+
"type": "\"default\" | \"outline\" | \"muted\"",
|
|
2544
|
+
"required": false
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
"name": "size",
|
|
2548
|
+
"type": "\"default\" | \"sm\"",
|
|
2549
|
+
"required": false
|
|
2550
|
+
}
|
|
2551
|
+
],
|
|
2552
|
+
"exports": [
|
|
2553
|
+
"itemDef",
|
|
2554
|
+
"itemVariants",
|
|
2555
|
+
"ItemVariant",
|
|
2556
|
+
"ItemSize",
|
|
2557
|
+
"ItemProps",
|
|
2558
|
+
"ItemHandle",
|
|
2559
|
+
"ItemGroupProps",
|
|
2560
|
+
"ItemGroupHandle",
|
|
2561
|
+
"createItem",
|
|
2562
|
+
"createItemGroup"
|
|
2563
|
+
],
|
|
2564
|
+
"tokens": [
|
|
2565
|
+
"active",
|
|
2566
|
+
"border",
|
|
2567
|
+
"border-faint",
|
|
2568
|
+
"dur-fast",
|
|
2569
|
+
"fg",
|
|
2570
|
+
"fg-bright",
|
|
2571
|
+
"fg-muted",
|
|
2572
|
+
"focus",
|
|
2573
|
+
"hover",
|
|
2574
|
+
"radius-md",
|
|
2575
|
+
"radius-sm",
|
|
2576
|
+
"surface-sunken"
|
|
2577
|
+
],
|
|
2578
|
+
"attributes": [
|
|
2579
|
+
"data-clickable",
|
|
2580
|
+
"data-disabled",
|
|
2581
|
+
"data-icon",
|
|
2582
|
+
"data-reveal-actions",
|
|
2583
|
+
"data-selected",
|
|
2584
|
+
"data-separated"
|
|
2585
|
+
],
|
|
2586
|
+
"example": "import { createItem } from '@luxalgo/vela-ui/item';\n\nconst item = createItem({ title: /* string | Node */ });\nhost.append(item.el);"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"name": "kbd",
|
|
2590
|
+
"import": "@luxalgo/vela-ui/kbd",
|
|
2591
|
+
"description": "Kbd: one key of a shortcut, drawn as a keycap (`Alt`, `A`). A shortcut is a row of them; hover cards and menus show them beside the command they trigger.",
|
|
2592
|
+
"component": "kbd",
|
|
2593
|
+
"declaration": "kbdDef",
|
|
2594
|
+
"parts": {
|
|
2595
|
+
"root": "kbd"
|
|
2596
|
+
},
|
|
2597
|
+
"settings": {
|
|
2598
|
+
"radius": {
|
|
2599
|
+
"default": "5px"
|
|
2600
|
+
},
|
|
2601
|
+
"shadow": {
|
|
2602
|
+
"default": "`inset 0 -1px 0 ${t.border}`"
|
|
2603
|
+
}
|
|
2604
|
+
},
|
|
2605
|
+
"factory": "createKbd",
|
|
2606
|
+
"returns": "KbdHandle",
|
|
2607
|
+
"propsType": "KbdProps",
|
|
2608
|
+
"props": [
|
|
2609
|
+
{
|
|
2610
|
+
"name": "text",
|
|
2611
|
+
"type": "string",
|
|
2612
|
+
"required": true,
|
|
2613
|
+
"doc": "The key's label (`Alt`, `⌘`, `K`)."
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
"name": "className",
|
|
2617
|
+
"type": "string",
|
|
2618
|
+
"required": false,
|
|
2619
|
+
"doc": "Extra class names (layout hooks)."
|
|
2620
|
+
}
|
|
2621
|
+
],
|
|
2622
|
+
"exports": [
|
|
2623
|
+
"kbdDef",
|
|
2624
|
+
"KbdProps",
|
|
2625
|
+
"KbdHandle",
|
|
2626
|
+
"createKbd",
|
|
2627
|
+
"shortcutKeys"
|
|
2628
|
+
],
|
|
2629
|
+
"tokens": [
|
|
2630
|
+
"border",
|
|
2631
|
+
"fg-bright",
|
|
2632
|
+
"fg-muted",
|
|
2633
|
+
"hover"
|
|
2634
|
+
],
|
|
2635
|
+
"attributes": [],
|
|
2636
|
+
"example": "import { createKbd } from '@luxalgo/vela-ui/kbd';\n\nconst kbd = createKbd({ text: /* string */ });\nhost.append(kbd.el);"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"name": "line-chart",
|
|
2640
|
+
"import": "@luxalgo/vela-ui/line-chart",
|
|
2641
|
+
"description": "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.",
|
|
2642
|
+
"component": "line-chart",
|
|
2643
|
+
"declaration": "lineChartDef",
|
|
2644
|
+
"parts": {
|
|
2645
|
+
"root": "line-chart",
|
|
2646
|
+
"label": "line-chart-label",
|
|
2647
|
+
"area": "line-chart-area",
|
|
2648
|
+
"line": "line-chart-line",
|
|
2649
|
+
"dot": "line-chart-dot",
|
|
2650
|
+
"tip": "line-chart-tip"
|
|
2651
|
+
},
|
|
2652
|
+
"settings": {
|
|
2653
|
+
"tip-radius": {
|
|
2654
|
+
"default": "3px"
|
|
2655
|
+
},
|
|
2656
|
+
"tip-shadow": {
|
|
2657
|
+
"default": "var(--vela-shadow)",
|
|
2658
|
+
"token": "shadow"
|
|
2659
|
+
},
|
|
2660
|
+
"tip-z": {
|
|
2661
|
+
"default": "2"
|
|
2662
|
+
},
|
|
2663
|
+
"tip-bg": {
|
|
2664
|
+
"default": "var(--vela-surface-elev)",
|
|
2665
|
+
"token": "surface-elev"
|
|
2666
|
+
},
|
|
2667
|
+
"stroke-width": {
|
|
2668
|
+
"default": "2"
|
|
2669
|
+
}
|
|
2670
|
+
},
|
|
2671
|
+
"factory": "createLineChart",
|
|
2672
|
+
"returns": "LineChartHandle",
|
|
2673
|
+
"propsType": "LineChartProps",
|
|
2674
|
+
"props": [
|
|
2675
|
+
{
|
|
2676
|
+
"name": "axisFont",
|
|
2677
|
+
"type": "number",
|
|
2678
|
+
"required": false,
|
|
2679
|
+
"doc": "Axis label size in px (default 10)."
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
"name": "format",
|
|
2683
|
+
"type": "(p: LinePoint, index: number) => string | Node",
|
|
2684
|
+
"required": false,
|
|
2685
|
+
"doc": "The hover readout of a point."
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
"name": "baseline",
|
|
2689
|
+
"type": "number",
|
|
2690
|
+
"required": false,
|
|
2691
|
+
"doc": "The area fills down (or up) to this value (default 0)."
|
|
2692
|
+
},
|
|
2693
|
+
{
|
|
2694
|
+
"name": "axes",
|
|
2695
|
+
"type": "boolean",
|
|
2696
|
+
"required": false,
|
|
2697
|
+
"doc": "Label the x axis under the plot and the y axis beside it."
|
|
2698
|
+
},
|
|
2699
|
+
{
|
|
2700
|
+
"name": "xFormat",
|
|
2701
|
+
"type": "(x: number) => string",
|
|
2702
|
+
"required": false
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"name": "yFormat",
|
|
2706
|
+
"type": "(y: number) => string",
|
|
2707
|
+
"required": false
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"name": "className",
|
|
2711
|
+
"type": "string",
|
|
2712
|
+
"required": false,
|
|
2713
|
+
"doc": "Extra class names (layout hooks)."
|
|
2714
|
+
}
|
|
2715
|
+
],
|
|
2716
|
+
"exports": [
|
|
2717
|
+
"lineChartDef",
|
|
2718
|
+
"LinePoint",
|
|
2719
|
+
"LineChartProps",
|
|
2720
|
+
"LineChartHandle",
|
|
2721
|
+
"createLineChart"
|
|
2722
|
+
],
|
|
2723
|
+
"tokens": [
|
|
2724
|
+
"border",
|
|
2725
|
+
"dur-fast",
|
|
2726
|
+
"fg-bright",
|
|
2727
|
+
"fg-muted",
|
|
2728
|
+
"loss",
|
|
2729
|
+
"profit",
|
|
2730
|
+
"shadow",
|
|
2731
|
+
"surface-elev"
|
|
2732
|
+
],
|
|
2733
|
+
"attributes": [
|
|
2734
|
+
"data-instant",
|
|
2735
|
+
"data-on",
|
|
2736
|
+
"data-tone"
|
|
2737
|
+
],
|
|
2738
|
+
"example": "import { createLineChart } from '@luxalgo/vela-ui/line-chart';\n\nconst lineChart = createLineChart();\nhost.append(lineChart.el);"
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
"name": "month-grid",
|
|
2742
|
+
"import": "@luxalgo/vela-ui/month-grid",
|
|
2743
|
+
"description": "MonthGrid: a month of day cells, each with a figure: a trading journal's P&L by day. A day's tone tints its cell and colors its figure (profit, loss or neutral), and a line under the figure says more (`3 trades · 67%`). Weeks start on the translator's first day, under the weekdays' names; the cells outside the month are blank. With `onSelect` every day of the month is a button, and the arrow keys walk the days (Home and End: the week's ends).",
|
|
2744
|
+
"component": "month-grid",
|
|
2745
|
+
"declaration": "monthGridDef",
|
|
2746
|
+
"parts": {
|
|
2747
|
+
"root": "month-grid",
|
|
2748
|
+
"weekday": "month-grid-weekday",
|
|
2749
|
+
"day": "month-grid-day",
|
|
2750
|
+
"date": "month-grid-date",
|
|
2751
|
+
"value": "month-grid-value",
|
|
2752
|
+
"detail": "month-grid-detail",
|
|
2753
|
+
"blank": "month-grid-blank"
|
|
2754
|
+
},
|
|
2755
|
+
"settings": {
|
|
2756
|
+
"radius": {
|
|
2757
|
+
"default": "8px"
|
|
2758
|
+
},
|
|
2759
|
+
"day-height": {
|
|
2760
|
+
"default": "56px"
|
|
2761
|
+
},
|
|
2762
|
+
"gap": {
|
|
2763
|
+
"default": "4px"
|
|
2764
|
+
},
|
|
2765
|
+
"selected-ring": {
|
|
2766
|
+
"default": "`inset 0 0 0 1px ${t.selected.bg}`"
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
"factory": "createMonthGrid",
|
|
2770
|
+
"returns": "MonthGridHandle",
|
|
2771
|
+
"propsType": "MonthGridProps",
|
|
2772
|
+
"props": [
|
|
2773
|
+
{
|
|
2774
|
+
"name": "month",
|
|
2775
|
+
"type": "string",
|
|
2776
|
+
"required": true,
|
|
2777
|
+
"doc": "The month shown (`2026-11`)."
|
|
2778
|
+
},
|
|
2779
|
+
{
|
|
2780
|
+
"name": "days",
|
|
2781
|
+
"type": "Readonly<Record<string, MonthGridDay>>",
|
|
2782
|
+
"required": false,
|
|
2783
|
+
"doc": "The days with something to show, by date (`2026-11-06`)."
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
"name": "selected",
|
|
2787
|
+
"type": "string",
|
|
2788
|
+
"required": false,
|
|
2789
|
+
"doc": "The selected day (`2026-11-06`), ringed."
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
"name": "today",
|
|
2793
|
+
"type": "string",
|
|
2794
|
+
"required": false,
|
|
2795
|
+
"doc": "Today (`2026-11-06`), its date bright and bold."
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
"name": "onSelect",
|
|
2799
|
+
"type": "(date: string) => void",
|
|
2800
|
+
"required": false,
|
|
2801
|
+
"doc": "A day was chosen: a click, Enter or Space. Without it the days are not buttons."
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"name": "i18n",
|
|
2805
|
+
"type": "Translator",
|
|
2806
|
+
"required": false,
|
|
2807
|
+
"doc": "The translator whose locale names the weekdays, picks the first day of the week and the digits. Default: the kit build's, else English with weeks starting on Sunday."
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"name": "className",
|
|
2811
|
+
"type": "string",
|
|
2812
|
+
"required": false,
|
|
2813
|
+
"doc": "Extra class names (layout hooks)."
|
|
2814
|
+
}
|
|
2815
|
+
],
|
|
2816
|
+
"exports": [
|
|
2817
|
+
"monthGridDef",
|
|
2818
|
+
"MonthGridTone",
|
|
2819
|
+
"MonthGridDay",
|
|
2820
|
+
"MonthGridProps",
|
|
2821
|
+
"MonthGridHandle",
|
|
2822
|
+
"createMonthGrid"
|
|
2823
|
+
],
|
|
2824
|
+
"tokens": [
|
|
2825
|
+
"border",
|
|
2826
|
+
"border-faint",
|
|
2827
|
+
"border-strong",
|
|
2828
|
+
"dur-fast",
|
|
2829
|
+
"fg-bright",
|
|
2830
|
+
"fg-muted",
|
|
2831
|
+
"focus",
|
|
2832
|
+
"hover",
|
|
2833
|
+
"loss",
|
|
2834
|
+
"profit",
|
|
2835
|
+
"selected-bg"
|
|
2836
|
+
],
|
|
2837
|
+
"attributes": [
|
|
2838
|
+
"data-checked",
|
|
2839
|
+
"data-date",
|
|
2840
|
+
"data-today",
|
|
2841
|
+
"data-tone"
|
|
2842
|
+
],
|
|
2843
|
+
"example": "import { createMonthGrid } from '@luxalgo/vela-ui/month-grid';\n\nconst monthGrid = createMonthGrid({ month: /* string */ });\nhost.append(monthGrid.el);"
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
"name": "number-input",
|
|
2847
|
+
"import": "@luxalgo/vela-ui/number-input",
|
|
2848
|
+
"description": "NumberInput: a typed number field with optional steppers that show on hover and repeat while pressed. `blur` commit clamps on commit (the indicator dialog); `live` emits on every keystroke (chart settings). `md` fills its parent; `sm` is a compact field. The spinbutton (ARIA, arrow keys, the steppers' repeat) is Zag's number-input machine; the commit rules stay the field's own.",
|
|
2849
|
+
"component": "number-input",
|
|
2850
|
+
"declaration": "numberInputDef",
|
|
2851
|
+
"parts": {
|
|
2852
|
+
"root": "number-input",
|
|
2853
|
+
"input": "number-input-input",
|
|
2854
|
+
"steps": "number-input-steps",
|
|
2855
|
+
"step": "number-input-step"
|
|
2856
|
+
},
|
|
2857
|
+
"settings": {
|
|
2858
|
+
"radius": {
|
|
2859
|
+
"default": "var(--vela-radius-md)",
|
|
2860
|
+
"token": "radius-md"
|
|
2861
|
+
},
|
|
2862
|
+
"step-radius": {
|
|
2863
|
+
"default": "3px"
|
|
2864
|
+
},
|
|
2865
|
+
"focus-ring": {
|
|
2866
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
2867
|
+
}
|
|
2868
|
+
},
|
|
2869
|
+
"variants": {
|
|
2870
|
+
"size": [
|
|
2871
|
+
"md",
|
|
2872
|
+
"sm"
|
|
2873
|
+
]
|
|
2874
|
+
},
|
|
2875
|
+
"factory": "createNumberInput",
|
|
2876
|
+
"returns": "NumberInput",
|
|
2877
|
+
"propsType": "NumberInputProps",
|
|
2878
|
+
"props": [
|
|
2879
|
+
{
|
|
2880
|
+
"name": "id",
|
|
2881
|
+
"type": "string",
|
|
2882
|
+
"required": false
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"name": "title",
|
|
2886
|
+
"type": "string",
|
|
2887
|
+
"required": false
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
"name": "placeholder",
|
|
2891
|
+
"type": "string",
|
|
2892
|
+
"required": false,
|
|
2893
|
+
"doc": "Chart-settings placeholder mode: empty field means `emptyValue` (the default)."
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
"name": "emptyValue",
|
|
2897
|
+
"type": "number",
|
|
2898
|
+
"required": false
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
"name": "name",
|
|
2902
|
+
"type": "string",
|
|
2903
|
+
"required": false,
|
|
2904
|
+
"doc": "Submitted with its form under this name."
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
"name": "required",
|
|
2908
|
+
"type": "boolean",
|
|
2909
|
+
"required": false
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"name": "compact",
|
|
2913
|
+
"type": "boolean",
|
|
2914
|
+
"required": false
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
"name": "fill",
|
|
2918
|
+
"type": "boolean",
|
|
2919
|
+
"required": false,
|
|
2920
|
+
"doc": "Stretch to the parent. Defaults to on for `md`, off for `sm`. Chart settings passes `false` so the field stays a 100px kit column instead of filling the pane."
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
"name": "i18n",
|
|
2924
|
+
"type": "Translator",
|
|
2925
|
+
"required": false,
|
|
2926
|
+
"doc": "The translator of the steppers' names (default: the kit build's, else English)."
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
"name": "value",
|
|
2930
|
+
"type": "number",
|
|
2931
|
+
"required": true
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "min",
|
|
2935
|
+
"type": "number",
|
|
2936
|
+
"required": false
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
"name": "max",
|
|
2940
|
+
"type": "number",
|
|
2941
|
+
"required": false
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"name": "step",
|
|
2945
|
+
"type": "number",
|
|
2946
|
+
"required": false
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
"name": "integer",
|
|
2950
|
+
"type": "boolean",
|
|
2951
|
+
"required": false
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"name": "size",
|
|
2955
|
+
"type": "NumberSize",
|
|
2956
|
+
"required": false
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"name": "commit",
|
|
2960
|
+
"type": "NumberCommit",
|
|
2961
|
+
"required": false,
|
|
2962
|
+
"doc": "`blur` clamps on commit (indicator dialog). `live` emits on every keystroke (chart settings). Steppers default on for `blur`; pass `steppers: true` to keep them with live commit."
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
"name": "steppers",
|
|
2966
|
+
"type": "boolean",
|
|
2967
|
+
"required": false
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
"name": "clamp",
|
|
2971
|
+
"type": "boolean",
|
|
2972
|
+
"required": false
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"name": "disabled",
|
|
2976
|
+
"type": "boolean",
|
|
2977
|
+
"required": false
|
|
2978
|
+
},
|
|
2979
|
+
{
|
|
2980
|
+
"name": "onChange",
|
|
2981
|
+
"type": "(value: number) => void",
|
|
2982
|
+
"required": false
|
|
2983
|
+
}
|
|
2984
|
+
],
|
|
2985
|
+
"exports": [
|
|
2986
|
+
"NumberSize",
|
|
2987
|
+
"NumberCommit",
|
|
2988
|
+
"NumberInputControllerOptions",
|
|
2989
|
+
"clampNumber",
|
|
2990
|
+
"snapToStep",
|
|
2991
|
+
"NumberInputController",
|
|
2992
|
+
"numberInputController",
|
|
2993
|
+
"numberInputDef",
|
|
2994
|
+
"numberInputVariants",
|
|
2995
|
+
"NumberInputOptions",
|
|
2996
|
+
"NumberInputProps",
|
|
2997
|
+
"NUMBER_STYLE_ID",
|
|
2998
|
+
"NUMBER_CSS",
|
|
2999
|
+
"NumberInput",
|
|
3000
|
+
"createNumberInput"
|
|
3001
|
+
],
|
|
3002
|
+
"tokens": [
|
|
3003
|
+
"border-strong",
|
|
3004
|
+
"dur-fast",
|
|
3005
|
+
"fg",
|
|
3006
|
+
"fg-bright",
|
|
3007
|
+
"fg-muted",
|
|
3008
|
+
"focus",
|
|
3009
|
+
"focus-soft",
|
|
3010
|
+
"hover",
|
|
3011
|
+
"radius-md",
|
|
3012
|
+
"radius-sm",
|
|
3013
|
+
"surface-elev"
|
|
3014
|
+
],
|
|
3015
|
+
"attributes": [
|
|
3016
|
+
"data-compact",
|
|
3017
|
+
"data-fill",
|
|
3018
|
+
"data-steppers"
|
|
3019
|
+
],
|
|
3020
|
+
"example": "import { createNumberInput } from '@luxalgo/vela-ui/number-input';\n\nconst numberInput = createNumberInput({ value: /* number */ });\nhost.append(numberInput.el);"
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
"name": "popover",
|
|
3024
|
+
"import": "@luxalgo/vela-ui/popover",
|
|
3025
|
+
"description": "Popover: a positioned floating shell. Content is the caller's; the shell owns the portal, the placement (on a side of the trigger, flipping to the other near the clamp edge), the capture-phase outside dismissal and the single-open registry. A component built on it (a select list, a color picker) adds its own part to the shell's slot: `data-slot=\"popover-content select-content\"`, matched with `~=`.",
|
|
3026
|
+
"component": "popover",
|
|
3027
|
+
"declaration": "popoverDef",
|
|
3028
|
+
"parts": {
|
|
3029
|
+
"content": "popover-content"
|
|
3030
|
+
},
|
|
3031
|
+
"settings": {},
|
|
3032
|
+
"factory": "createPopover",
|
|
3033
|
+
"returns": "Popover",
|
|
3034
|
+
"propsType": "PopoverProps",
|
|
3035
|
+
"props": [
|
|
3036
|
+
{
|
|
3037
|
+
"name": "trigger",
|
|
3038
|
+
"type": "HTMLElement",
|
|
3039
|
+
"required": true
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"name": "content",
|
|
3043
|
+
"type": "Node | ((body: HTMLElement) => void)",
|
|
3044
|
+
"required": false
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"name": "host",
|
|
3048
|
+
"type": "HTMLElement",
|
|
3049
|
+
"required": false,
|
|
3050
|
+
"doc": "Portal target. Defaults to `document.body`. Drawing chrome passes the chart host."
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
|
+
"name": "theme",
|
|
3054
|
+
"type": "ChartTheme",
|
|
3055
|
+
"required": false
|
|
3056
|
+
},
|
|
3057
|
+
{
|
|
3058
|
+
"name": "className",
|
|
3059
|
+
"type": "string",
|
|
3060
|
+
"required": false
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
"name": "slot",
|
|
3064
|
+
"type": "string",
|
|
3065
|
+
"required": false,
|
|
3066
|
+
"doc": "The part a component built on the popover adds to the shell's slot."
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
"name": "zIndex",
|
|
3070
|
+
"type": "string | number",
|
|
3071
|
+
"required": false
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
"name": "collisionBoundary",
|
|
3075
|
+
"type": "CollisionBoundary",
|
|
3076
|
+
"required": false,
|
|
3077
|
+
"doc": "The area it stays inside: `'viewport'` (default), an element (dialog, chart host) or a rectangle read at each placement."
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
"name": "boundary",
|
|
3081
|
+
"type": "CollisionBoundary",
|
|
3082
|
+
"required": false
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
"name": "fadeMs",
|
|
3086
|
+
"type": "number",
|
|
3087
|
+
"required": false,
|
|
3088
|
+
"doc": "Fade the shell in on show and out on hide over this many ms (default 0 — instant)."
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"name": "gap",
|
|
3092
|
+
"type": "number",
|
|
3093
|
+
"required": false
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"name": "matchWidth",
|
|
3097
|
+
"type": "boolean",
|
|
3098
|
+
"required": false
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"name": "position",
|
|
3102
|
+
"type": "PopoverPosition",
|
|
3103
|
+
"required": false
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
"name": "boundaryInset",
|
|
3107
|
+
"type": "number",
|
|
3108
|
+
"required": false,
|
|
3109
|
+
"doc": "Room kept inside `collisionBoundary` (default 0; `collisionPadding` sets it too)."
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
"name": "viewportInset",
|
|
3113
|
+
"type": "number",
|
|
3114
|
+
"required": false,
|
|
3115
|
+
"doc": "Room kept from the viewport's edges (default 6; `collisionPadding` sets it too)."
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
"name": "onClose",
|
|
3119
|
+
"type": "() => void",
|
|
3120
|
+
"required": false
|
|
3121
|
+
},
|
|
3122
|
+
{
|
|
3123
|
+
"name": "align",
|
|
3124
|
+
"type": "Align",
|
|
3125
|
+
"required": false,
|
|
3126
|
+
"doc": "Its alignment along that side."
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
"name": "side",
|
|
3130
|
+
"type": "Side",
|
|
3131
|
+
"required": false,
|
|
3132
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
"name": "sideOffset",
|
|
3136
|
+
"type": "number",
|
|
3137
|
+
"required": false,
|
|
3138
|
+
"doc": "Its distance from the trigger, in px."
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
"name": "alignOffset",
|
|
3142
|
+
"type": "number",
|
|
3143
|
+
"required": false,
|
|
3144
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
3145
|
+
},
|
|
3146
|
+
{
|
|
3147
|
+
"name": "avoidCollisions",
|
|
3148
|
+
"type": "boolean",
|
|
3149
|
+
"required": false,
|
|
3150
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
3151
|
+
},
|
|
3152
|
+
{
|
|
3153
|
+
"name": "collisionPadding",
|
|
3154
|
+
"type": "number",
|
|
3155
|
+
"required": false,
|
|
3156
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
3157
|
+
}
|
|
3158
|
+
],
|
|
3159
|
+
"exports": [
|
|
3160
|
+
"PopoverAlign",
|
|
3161
|
+
"PopoverSide",
|
|
3162
|
+
"PopoverPosition",
|
|
3163
|
+
"PopoverControllerOptions",
|
|
3164
|
+
"PopoverController",
|
|
3165
|
+
"popoverController",
|
|
3166
|
+
"popoverDef",
|
|
3167
|
+
"PopoverBoundary",
|
|
3168
|
+
"PopoverOptions",
|
|
3169
|
+
"PopoverProps",
|
|
3170
|
+
"POPOVER_STYLE_ID",
|
|
3171
|
+
"POPOVER_CSS",
|
|
3172
|
+
"closeOpenPopovers",
|
|
3173
|
+
"isPopoverOpen",
|
|
3174
|
+
"openPopoverTrigger",
|
|
3175
|
+
"eventDismissedPopover",
|
|
3176
|
+
"Popover",
|
|
3177
|
+
"createPopover"
|
|
3178
|
+
],
|
|
3179
|
+
"tokens": [
|
|
3180
|
+
"z-popover"
|
|
3181
|
+
],
|
|
3182
|
+
"attributes": [
|
|
3183
|
+
"data-position"
|
|
3184
|
+
],
|
|
3185
|
+
"example": "import { createPopover } from '@luxalgo/vela-ui/popover';\n\nconst popover = createPopover({ trigger: /* HTMLElement */ });\nhost.append(popover.el);"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
"name": "scatter-chart",
|
|
3189
|
+
"import": "@luxalgo/vela-ui/scatter-chart",
|
|
3190
|
+
"description": "ScatterChart: dots on two value axes with an optional dashed trend line and a hover readout (a trade's P&L against its length). Each point names its ink: a token's `var()` or a color.",
|
|
3191
|
+
"component": "scatter-chart",
|
|
3192
|
+
"declaration": "scatterChartDef",
|
|
3193
|
+
"parts": {
|
|
3194
|
+
"root": "scatter-chart",
|
|
3195
|
+
"grid": "scatter-chart-grid",
|
|
3196
|
+
"label": "scatter-chart-label",
|
|
3197
|
+
"point": "scatter-chart-point",
|
|
3198
|
+
"trend": "scatter-chart-trend",
|
|
3199
|
+
"focus": "scatter-chart-focus",
|
|
3200
|
+
"tip": "scatter-chart-tip"
|
|
3201
|
+
},
|
|
3202
|
+
"settings": {
|
|
3203
|
+
"tip-radius": {
|
|
3204
|
+
"default": "3px"
|
|
3205
|
+
},
|
|
3206
|
+
"tip-shadow": {
|
|
3207
|
+
"default": "var(--vela-shadow)",
|
|
3208
|
+
"token": "shadow"
|
|
3209
|
+
},
|
|
3210
|
+
"tip-z": {
|
|
3211
|
+
"default": "2"
|
|
3212
|
+
},
|
|
3213
|
+
"tip-bg": {
|
|
3214
|
+
"default": "var(--vela-surface-elev)",
|
|
3215
|
+
"token": "surface-elev"
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
"factory": "createScatterChart",
|
|
3219
|
+
"returns": "ScatterChartHandle",
|
|
3220
|
+
"propsType": "ScatterChartProps",
|
|
3221
|
+
"props": [
|
|
3222
|
+
{
|
|
3223
|
+
"name": "xTitle",
|
|
3224
|
+
"type": "string",
|
|
3225
|
+
"required": false,
|
|
3226
|
+
"doc": "Written under the x axis."
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
"name": "yTitle",
|
|
3230
|
+
"type": "string",
|
|
3231
|
+
"required": false,
|
|
3232
|
+
"doc": "Written up the y axis."
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"name": "format",
|
|
3236
|
+
"type": "(p: ScatterPoint, index: number) => string | Node",
|
|
3237
|
+
"required": false,
|
|
3238
|
+
"doc": "The hover readout of a point."
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
"name": "className",
|
|
3242
|
+
"type": "string",
|
|
3243
|
+
"required": false,
|
|
3244
|
+
"doc": "Extra class names (layout hooks)."
|
|
3245
|
+
}
|
|
3246
|
+
],
|
|
3247
|
+
"exports": [
|
|
3248
|
+
"scatterChartDef",
|
|
3249
|
+
"ScatterPoint",
|
|
3250
|
+
"ScatterChartProps",
|
|
3251
|
+
"ScatterChartHandle",
|
|
3252
|
+
"createScatterChart"
|
|
3253
|
+
],
|
|
3254
|
+
"tokens": [
|
|
3255
|
+
"border",
|
|
3256
|
+
"dur-fast",
|
|
3257
|
+
"fg-bright",
|
|
3258
|
+
"fg-muted",
|
|
3259
|
+
"profit",
|
|
3260
|
+
"shadow",
|
|
3261
|
+
"surface-elev"
|
|
3262
|
+
],
|
|
3263
|
+
"attributes": [
|
|
3264
|
+
"data-base",
|
|
3265
|
+
"data-instant",
|
|
3266
|
+
"data-on",
|
|
3267
|
+
"data-title",
|
|
3268
|
+
"data-zero"
|
|
3269
|
+
],
|
|
3270
|
+
"example": "import { createScatterChart } from '@luxalgo/vela-ui/scatter-chart';\n\nconst scatterChart = createScatterChart();\nhost.append(scatterChart.el);"
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
"name": "select",
|
|
3274
|
+
"import": "@luxalgo/vela-ui/select",
|
|
3275
|
+
"description": "Select: a trigger button and a themed option list on a popover, with an overlay scrollbar for long lists. `md` is the shared 100px kit column and ellipsizes the trigger; `sm` is a compact toolbar select that hugs its widest option. The open list shows full labels.",
|
|
3276
|
+
"component": "select",
|
|
3277
|
+
"declaration": "selectDef",
|
|
3278
|
+
"parts": {
|
|
3279
|
+
"root": "select",
|
|
3280
|
+
"trigger": "select-trigger",
|
|
3281
|
+
"value": "select-value",
|
|
3282
|
+
"icon": "select-icon",
|
|
3283
|
+
"sizer": "select-sizer",
|
|
3284
|
+
"native": "select-native",
|
|
3285
|
+
"content": "select-content",
|
|
3286
|
+
"viewport": "select-viewport",
|
|
3287
|
+
"item": "select-item",
|
|
3288
|
+
"rail": "select-rail",
|
|
3289
|
+
"thumb": "select-thumb"
|
|
3290
|
+
},
|
|
3291
|
+
"settings": {
|
|
3292
|
+
"radius": {
|
|
3293
|
+
"default": "var(--vela-radius-md)",
|
|
3294
|
+
"token": "radius-md"
|
|
3295
|
+
},
|
|
3296
|
+
"content-radius": {
|
|
3297
|
+
"default": "var(--vela-radius-md)",
|
|
3298
|
+
"token": "radius-md"
|
|
3299
|
+
},
|
|
3300
|
+
"thumb-radius": {
|
|
3301
|
+
"default": "2px"
|
|
3302
|
+
},
|
|
3303
|
+
"focus-ring": {
|
|
3304
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
"variants": {
|
|
3308
|
+
"size": [
|
|
3309
|
+
"md",
|
|
3310
|
+
"sm"
|
|
3311
|
+
]
|
|
3312
|
+
},
|
|
3313
|
+
"factory": "createSelect",
|
|
3314
|
+
"returns": "Select",
|
|
3315
|
+
"propsType": "SelectProps",
|
|
3316
|
+
"props": [
|
|
3317
|
+
{
|
|
3318
|
+
"name": "id",
|
|
3319
|
+
"type": "string",
|
|
3320
|
+
"required": false
|
|
3321
|
+
},
|
|
3322
|
+
{
|
|
3323
|
+
"name": "name",
|
|
3324
|
+
"type": "string",
|
|
3325
|
+
"required": false,
|
|
3326
|
+
"doc": "Submitted with its form under this name: a hidden native select carries the value."
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
"name": "required",
|
|
3330
|
+
"type": "boolean",
|
|
3331
|
+
"required": false,
|
|
3332
|
+
"doc": "A form does not submit while no option is picked (with `placeholder`)."
|
|
3333
|
+
},
|
|
3334
|
+
{
|
|
3335
|
+
"name": "theme",
|
|
3336
|
+
"type": "ChartTheme",
|
|
3337
|
+
"required": false
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
"name": "list",
|
|
3341
|
+
"type": "SelectListPopoverOpts",
|
|
3342
|
+
"required": false,
|
|
3343
|
+
"doc": "The open list's other options (its host, layer, width). Its placement props are the select's own; set here, they give way to those."
|
|
3344
|
+
},
|
|
3345
|
+
{
|
|
3346
|
+
"name": "options",
|
|
3347
|
+
"type": "readonly SelectOption[]",
|
|
3348
|
+
"required": true
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
"name": "value",
|
|
3352
|
+
"type": "string",
|
|
3353
|
+
"required": false
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
"name": "defaultValue",
|
|
3357
|
+
"type": "string",
|
|
3358
|
+
"required": false,
|
|
3359
|
+
"doc": "The value it starts with when `value` is not given."
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
"name": "placeholder",
|
|
3363
|
+
"type": "string",
|
|
3364
|
+
"required": false,
|
|
3365
|
+
"doc": "Shown while no option is picked: the value stays `''` until the user picks one. Without it, the first option is picked to start with."
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
"name": "size",
|
|
3369
|
+
"type": "SelectSize",
|
|
3370
|
+
"required": false
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
"name": "fill",
|
|
3374
|
+
"type": "boolean",
|
|
3375
|
+
"required": false,
|
|
3376
|
+
"doc": "Stretch the trigger to its parent. Off: the shared 100px kit column (ellipsis)."
|
|
3377
|
+
},
|
|
3378
|
+
{
|
|
3379
|
+
"name": "disabled",
|
|
3380
|
+
"type": "boolean",
|
|
3381
|
+
"required": false
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
"name": "onValueChange",
|
|
3385
|
+
"type": "(value: string, label: string) => void",
|
|
3386
|
+
"required": false,
|
|
3387
|
+
"doc": "Called when the user picks an option."
|
|
3388
|
+
},
|
|
3389
|
+
{
|
|
3390
|
+
"name": "onChange",
|
|
3391
|
+
"type": "(value: string, label: string) => void",
|
|
3392
|
+
"required": false
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
"name": "side",
|
|
3396
|
+
"type": "Side",
|
|
3397
|
+
"required": false,
|
|
3398
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
3399
|
+
},
|
|
3400
|
+
{
|
|
3401
|
+
"name": "align",
|
|
3402
|
+
"type": "Align",
|
|
3403
|
+
"required": false,
|
|
3404
|
+
"doc": "Its alignment along that side."
|
|
3405
|
+
},
|
|
3406
|
+
{
|
|
3407
|
+
"name": "sideOffset",
|
|
3408
|
+
"type": "number",
|
|
3409
|
+
"required": false,
|
|
3410
|
+
"doc": "Its distance from the trigger, in px."
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
"name": "alignOffset",
|
|
3414
|
+
"type": "number",
|
|
3415
|
+
"required": false,
|
|
3416
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
3417
|
+
},
|
|
3418
|
+
{
|
|
3419
|
+
"name": "avoidCollisions",
|
|
3420
|
+
"type": "boolean",
|
|
3421
|
+
"required": false,
|
|
3422
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
3423
|
+
},
|
|
3424
|
+
{
|
|
3425
|
+
"name": "collisionPadding",
|
|
3426
|
+
"type": "number",
|
|
3427
|
+
"required": false,
|
|
3428
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
3429
|
+
},
|
|
3430
|
+
{
|
|
3431
|
+
"name": "collisionBoundary",
|
|
3432
|
+
"type": "CollisionBoundary",
|
|
3433
|
+
"required": false,
|
|
3434
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
3435
|
+
}
|
|
3436
|
+
],
|
|
3437
|
+
"exports": [
|
|
3438
|
+
"SelectSize",
|
|
3439
|
+
"SelectOption",
|
|
3440
|
+
"SelectControllerOptions",
|
|
3441
|
+
"SelectController",
|
|
3442
|
+
"selectController",
|
|
3443
|
+
"selectDef",
|
|
3444
|
+
"selectVariants",
|
|
3445
|
+
"SelectListPopoverOpts",
|
|
3446
|
+
"SelectOptions",
|
|
3447
|
+
"SelectProps",
|
|
3448
|
+
"SELECT_STYLE_ID",
|
|
3449
|
+
"SELECT_CSS",
|
|
3450
|
+
"fillSelectList",
|
|
3451
|
+
"decorateSelectScroll",
|
|
3452
|
+
"toggleSelectList",
|
|
3453
|
+
"openSelectList",
|
|
3454
|
+
"Select",
|
|
3455
|
+
"createSelect"
|
|
3456
|
+
],
|
|
3457
|
+
"tokens": [
|
|
3458
|
+
"bg",
|
|
3459
|
+
"border-strong",
|
|
3460
|
+
"dur-fast",
|
|
3461
|
+
"fg",
|
|
3462
|
+
"fg-bright",
|
|
3463
|
+
"fg-muted",
|
|
3464
|
+
"focus",
|
|
3465
|
+
"focus-soft",
|
|
3466
|
+
"font",
|
|
3467
|
+
"hover",
|
|
3468
|
+
"hover-strong",
|
|
3469
|
+
"radius-md",
|
|
3470
|
+
"radius-sm",
|
|
3471
|
+
"scroll",
|
|
3472
|
+
"shadow",
|
|
3473
|
+
"surface-elev",
|
|
3474
|
+
"surface-overlay"
|
|
3475
|
+
],
|
|
3476
|
+
"attributes": [
|
|
3477
|
+
"data-checked",
|
|
3478
|
+
"data-fill",
|
|
3479
|
+
"data-highlighted",
|
|
3480
|
+
"data-placeholder",
|
|
3481
|
+
"data-scroll"
|
|
3482
|
+
],
|
|
3483
|
+
"example": "import { createSelect } from '@luxalgo/vela-ui/select';\n\nconst select = createSelect({ options: /* readonly SelectOption[] */ });\nhost.append(select.el);"
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
"name": "slider",
|
|
3487
|
+
"import": "@luxalgo/vela-ui/slider",
|
|
3488
|
+
"description": "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. It reports every move through `onValueChange`, and through `onValueCommit` once a move settles (the pointer lifted, a key pressed): the moment for work too heavy to run while dragging, such as a replay's seek. `setValue` moves it from code without reporting.",
|
|
3489
|
+
"component": "slider",
|
|
3490
|
+
"declaration": "sliderDef",
|
|
3491
|
+
"parts": {
|
|
3492
|
+
"root": "slider",
|
|
3493
|
+
"control": "slider-control",
|
|
3494
|
+
"track": "slider-track",
|
|
3495
|
+
"range": "slider-range",
|
|
3496
|
+
"thumb": "slider-thumb"
|
|
3497
|
+
},
|
|
3498
|
+
"settings": {
|
|
3499
|
+
"track-height": {
|
|
3500
|
+
"default": "4px"
|
|
3501
|
+
},
|
|
3502
|
+
"thumb-size": {
|
|
3503
|
+
"default": "14px"
|
|
3504
|
+
},
|
|
3505
|
+
"radius": {
|
|
3506
|
+
"default": "999px"
|
|
3507
|
+
},
|
|
3508
|
+
"focus-ring": {
|
|
3509
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
3510
|
+
}
|
|
3511
|
+
},
|
|
3512
|
+
"factory": "createSlider",
|
|
3513
|
+
"returns": "SliderHandle",
|
|
3514
|
+
"propsType": "SliderProps",
|
|
3515
|
+
"props": [
|
|
3516
|
+
{
|
|
3517
|
+
"name": "defaultValue",
|
|
3518
|
+
"type": "number",
|
|
3519
|
+
"required": false,
|
|
3520
|
+
"doc": "The value it starts with (default `min`)."
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
"name": "min",
|
|
3524
|
+
"type": "number",
|
|
3525
|
+
"required": false,
|
|
3526
|
+
"doc": "Default 0."
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
"name": "max",
|
|
3530
|
+
"type": "number",
|
|
3531
|
+
"required": false,
|
|
3532
|
+
"doc": "Default 100."
|
|
3533
|
+
},
|
|
3534
|
+
{
|
|
3535
|
+
"name": "step",
|
|
3536
|
+
"type": "number",
|
|
3537
|
+
"required": false,
|
|
3538
|
+
"doc": "Default 1."
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
"name": "onValueChange",
|
|
3542
|
+
"type": "(value: number) => void",
|
|
3543
|
+
"required": false,
|
|
3544
|
+
"doc": "Every move: while dragging, and on each key."
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
"name": "onValueCommit",
|
|
3548
|
+
"type": "(value: number) => void",
|
|
3549
|
+
"required": false,
|
|
3550
|
+
"doc": "Once a move settles: the pointer lifted, or a key pressed."
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"name": "label",
|
|
3554
|
+
"type": "string",
|
|
3555
|
+
"required": false,
|
|
3556
|
+
"doc": "Its accessible name, when no `<label>` names it."
|
|
3557
|
+
},
|
|
3558
|
+
{
|
|
3559
|
+
"name": "valueText",
|
|
3560
|
+
"type": "(value: number) => string",
|
|
3561
|
+
"required": false,
|
|
3562
|
+
"doc": "What a screen reader says for a value (`11 Jun 2024`, `35%`). Default: the number."
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
"name": "orientation",
|
|
3566
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
3567
|
+
"required": false,
|
|
3568
|
+
"doc": "Default `horizontal`. A vertical slider takes its height from its parent."
|
|
3569
|
+
},
|
|
3570
|
+
{
|
|
3571
|
+
"name": "dir",
|
|
3572
|
+
"type": "\"ltr\" | \"rtl\"",
|
|
3573
|
+
"required": false,
|
|
3574
|
+
"doc": "The text direction the keys and the track follow (default `ltr`)."
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
"name": "disabled",
|
|
3578
|
+
"type": "boolean",
|
|
3579
|
+
"required": false
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
"name": "name",
|
|
3583
|
+
"type": "string",
|
|
3584
|
+
"required": false,
|
|
3585
|
+
"doc": "Submitted with its form under this name."
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"name": "id",
|
|
3589
|
+
"type": "string",
|
|
3590
|
+
"required": false,
|
|
3591
|
+
"doc": "The id of its thumb, so a `<label for>` reaches it."
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"name": "className",
|
|
3595
|
+
"type": "string",
|
|
3596
|
+
"required": false,
|
|
3597
|
+
"doc": "Extra class names (layout hooks)."
|
|
3598
|
+
}
|
|
3599
|
+
],
|
|
3600
|
+
"exports": [
|
|
3601
|
+
"sliderDef",
|
|
3602
|
+
"SliderProps",
|
|
3603
|
+
"SliderHandle",
|
|
3604
|
+
"createSlider"
|
|
3605
|
+
],
|
|
3606
|
+
"tokens": [
|
|
3607
|
+
"bg",
|
|
3608
|
+
"border",
|
|
3609
|
+
"dur-fast",
|
|
3610
|
+
"focus-soft",
|
|
3611
|
+
"selected-bg"
|
|
3612
|
+
],
|
|
3613
|
+
"attributes": [
|
|
3614
|
+
"data-disabled",
|
|
3615
|
+
"data-orientation"
|
|
3616
|
+
],
|
|
3617
|
+
"example": "import { createSlider } from '@luxalgo/vela-ui/slider';\n\nconst slider = createSlider();\nhost.append(slider.el);"
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
"name": "sort-button",
|
|
3621
|
+
"import": "@luxalgo/vela-ui/sort-button",
|
|
3622
|
+
"description": "SortButton: the header of a column that sorts a list which is not a table (a watchlist's Last and Day %). A press steps the sort: `firstDirection`, the other direction, then none when `clearable`. An arrow shows the direction, and a screen reader hears it after the label. Several of them sort one list: the host keeps one sorted and clears the others with `setDirection(null)`.",
|
|
3623
|
+
"component": "sort-button",
|
|
3624
|
+
"declaration": "sortButtonDef",
|
|
3625
|
+
"parts": {
|
|
3626
|
+
"root": "sort-button",
|
|
3627
|
+
"icon": "sort-button-icon",
|
|
3628
|
+
"state": "sort-button-state"
|
|
3629
|
+
},
|
|
3630
|
+
"settings": {
|
|
3631
|
+
"radius": {
|
|
3632
|
+
"default": "var(--vela-radius-sm)",
|
|
3633
|
+
"token": "radius-sm"
|
|
3634
|
+
}
|
|
3635
|
+
},
|
|
3636
|
+
"variants": {
|
|
3637
|
+
"align": [
|
|
3638
|
+
"start",
|
|
3639
|
+
"end"
|
|
3640
|
+
]
|
|
3641
|
+
},
|
|
3642
|
+
"factory": "createSortButton",
|
|
3643
|
+
"returns": "SortButtonHandle",
|
|
3644
|
+
"propsType": "SortButtonProps",
|
|
3645
|
+
"props": [
|
|
3646
|
+
{
|
|
3647
|
+
"name": "label",
|
|
3648
|
+
"type": "string",
|
|
3649
|
+
"required": true,
|
|
3650
|
+
"doc": "The column's name."
|
|
3651
|
+
},
|
|
3652
|
+
{
|
|
3653
|
+
"name": "direction",
|
|
3654
|
+
"type": "SortDirection",
|
|
3655
|
+
"required": false,
|
|
3656
|
+
"doc": "The sort it starts with (default none)."
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
"name": "firstDirection",
|
|
3660
|
+
"type": "SortDirection",
|
|
3661
|
+
"required": false,
|
|
3662
|
+
"doc": "What the first press sorts by (default `desc`: the largest first)."
|
|
3663
|
+
},
|
|
3664
|
+
{
|
|
3665
|
+
"name": "clearable",
|
|
3666
|
+
"type": "boolean",
|
|
3667
|
+
"required": false,
|
|
3668
|
+
"doc": "A press after both directions clears the sort (default true)."
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
"name": "onSortChange",
|
|
3672
|
+
"type": "(direction: SortDirection | null) => void",
|
|
3673
|
+
"required": false,
|
|
3674
|
+
"doc": "A press changed the sort; null: unsorted."
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "title",
|
|
3678
|
+
"type": "string",
|
|
3679
|
+
"required": false,
|
|
3680
|
+
"doc": "A tooltip (`Sort by Last`)."
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
"name": "disabled",
|
|
3684
|
+
"type": "boolean",
|
|
3685
|
+
"required": false
|
|
3686
|
+
},
|
|
3687
|
+
{
|
|
3688
|
+
"name": "i18n",
|
|
3689
|
+
"type": "Translator",
|
|
3690
|
+
"required": false,
|
|
3691
|
+
"doc": "The translator of the words a screen reader hears (\"sorted ascending\"). Default: the kit build's, else English."
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"name": "className",
|
|
3695
|
+
"type": "string",
|
|
3696
|
+
"required": false,
|
|
3697
|
+
"doc": "Extra class names (layout hooks)."
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"name": "align",
|
|
3701
|
+
"type": "\"start\" | \"end\"",
|
|
3702
|
+
"required": false
|
|
3703
|
+
}
|
|
3704
|
+
],
|
|
3705
|
+
"exports": [
|
|
3706
|
+
"sortButtonDef",
|
|
3707
|
+
"sortButtonVariants",
|
|
3708
|
+
"SortDirection",
|
|
3709
|
+
"SortButtonProps",
|
|
3710
|
+
"SortButtonHandle",
|
|
3711
|
+
"createSortButton"
|
|
3712
|
+
],
|
|
3713
|
+
"tokens": [
|
|
3714
|
+
"dur-fast",
|
|
3715
|
+
"fg-bright",
|
|
3716
|
+
"fg-muted",
|
|
3717
|
+
"focus",
|
|
3718
|
+
"radius-sm"
|
|
3719
|
+
],
|
|
3720
|
+
"attributes": [
|
|
3721
|
+
"data-align",
|
|
3722
|
+
"data-direction"
|
|
3723
|
+
],
|
|
3724
|
+
"example": "import { createSortButton } from '@luxalgo/vela-ui/sort-button';\n\nconst sortButton = createSortButton({ label: /* string */ });\nhost.append(sortButton.el);"
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
"name": "sparkline",
|
|
3728
|
+
"import": "@luxalgo/vela-ui/sparkline",
|
|
3729
|
+
"description": "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).",
|
|
3730
|
+
"component": "sparkline",
|
|
3731
|
+
"declaration": "sparklineDef",
|
|
3732
|
+
"parts": {
|
|
3733
|
+
"root": "sparkline",
|
|
3734
|
+
"area": "sparkline-area",
|
|
3735
|
+
"baseline": "sparkline-baseline",
|
|
3736
|
+
"line": "sparkline-line"
|
|
3737
|
+
},
|
|
3738
|
+
"settings": {
|
|
3739
|
+
"stroke-width": {
|
|
3740
|
+
"default": "1.25"
|
|
3741
|
+
}
|
|
3742
|
+
},
|
|
3743
|
+
"factory": "createSparkline",
|
|
3744
|
+
"returns": "SparklineHandle",
|
|
3745
|
+
"propsType": "SparklineProps",
|
|
3746
|
+
"props": [
|
|
3747
|
+
{
|
|
3748
|
+
"name": "values",
|
|
3749
|
+
"type": "readonly number[]",
|
|
3750
|
+
"required": true
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "width",
|
|
3754
|
+
"type": "number",
|
|
3755
|
+
"required": false,
|
|
3756
|
+
"doc": "px (default 56 × 20)."
|
|
3757
|
+
},
|
|
3758
|
+
{
|
|
3759
|
+
"name": "height",
|
|
3760
|
+
"type": "number",
|
|
3761
|
+
"required": false
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
"name": "area",
|
|
3765
|
+
"type": "boolean",
|
|
3766
|
+
"required": false,
|
|
3767
|
+
"doc": "A soft area under the line."
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
"name": "baseline",
|
|
3771
|
+
"type": "number",
|
|
3772
|
+
"required": false,
|
|
3773
|
+
"doc": "A dotted line at this value; the tone compares the last value with it."
|
|
3774
|
+
}
|
|
3775
|
+
],
|
|
3776
|
+
"exports": [
|
|
3777
|
+
"sparklineDef",
|
|
3778
|
+
"SparklineProps",
|
|
3779
|
+
"SparklineHandle",
|
|
3780
|
+
"createSparkline"
|
|
3781
|
+
],
|
|
3782
|
+
"tokens": [
|
|
3783
|
+
"fg-faint",
|
|
3784
|
+
"loss",
|
|
3785
|
+
"profit"
|
|
3786
|
+
],
|
|
3787
|
+
"attributes": [
|
|
3788
|
+
"data-tone"
|
|
3789
|
+
],
|
|
3790
|
+
"example": "import { createSparkline } from '@luxalgo/vela-ui/sparkline';\n\nconst sparkline = createSparkline({ values: /* readonly number[] */ });\nhost.append(sparkline.el);"
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "stat",
|
|
3794
|
+
"import": "@luxalgo/vela-ui/stat",
|
|
3795
|
+
"description": "Stat: a figure under its label (Net P&L, Win rate), with an optional line under it. Its tone colors a gain or a loss; `toneOf` reads one from a signed number.",
|
|
3796
|
+
"component": "stat",
|
|
3797
|
+
"declaration": "statDef",
|
|
3798
|
+
"parts": {
|
|
3799
|
+
"root": "stat",
|
|
3800
|
+
"label": "stat-label",
|
|
3801
|
+
"value": "stat-value",
|
|
3802
|
+
"sub": "stat-sub"
|
|
3803
|
+
},
|
|
3804
|
+
"settings": {},
|
|
3805
|
+
"variants": {
|
|
3806
|
+
"tone": [
|
|
3807
|
+
"neutral",
|
|
3808
|
+
"profit",
|
|
3809
|
+
"loss"
|
|
3810
|
+
]
|
|
3811
|
+
},
|
|
3812
|
+
"factory": "createStat",
|
|
3813
|
+
"returns": "StatHandle",
|
|
3814
|
+
"propsType": "StatProps",
|
|
3815
|
+
"props": [
|
|
3816
|
+
{
|
|
3817
|
+
"name": "label",
|
|
3818
|
+
"type": "string",
|
|
3819
|
+
"required": true
|
|
3820
|
+
},
|
|
3821
|
+
{
|
|
3822
|
+
"name": "value",
|
|
3823
|
+
"type": "string",
|
|
3824
|
+
"required": false,
|
|
3825
|
+
"doc": "The figure (default `—`)."
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"name": "sub",
|
|
3829
|
+
"type": "string",
|
|
3830
|
+
"required": false,
|
|
3831
|
+
"doc": "A line under the figure (a count, a percentage)."
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
"name": "className",
|
|
3835
|
+
"type": "string",
|
|
3836
|
+
"required": false,
|
|
3837
|
+
"doc": "Extra class names (layout hooks)."
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
"name": "tone",
|
|
3841
|
+
"type": "\"neutral\" | \"profit\" | \"loss\"",
|
|
3842
|
+
"required": false
|
|
3843
|
+
}
|
|
3844
|
+
],
|
|
3845
|
+
"exports": [
|
|
3846
|
+
"statDef",
|
|
3847
|
+
"statVariants",
|
|
3848
|
+
"StatTone",
|
|
3849
|
+
"StatProps",
|
|
3850
|
+
"StatHandle",
|
|
3851
|
+
"toneOf",
|
|
3852
|
+
"createStat"
|
|
3853
|
+
],
|
|
3854
|
+
"tokens": [
|
|
3855
|
+
"fg-bright",
|
|
3856
|
+
"fg-muted",
|
|
3857
|
+
"loss",
|
|
3858
|
+
"profit"
|
|
3859
|
+
],
|
|
3860
|
+
"attributes": [
|
|
3861
|
+
"data-tone"
|
|
3862
|
+
],
|
|
3863
|
+
"example": "import { createStat } from '@luxalgo/vela-ui/stat';\n\nconst stat = createStat({ label: /* string */ });\nhost.append(stat.el);"
|
|
3864
|
+
},
|
|
3865
|
+
{
|
|
3866
|
+
"name": "switch",
|
|
3867
|
+
"import": "@luxalgo/vela-ui/switch",
|
|
3868
|
+
"description": "Switch: a sliding on/off toggle, a track with a round thumb, for a setting that applies at once. `destructive` turns the track red while on (a kill switch); `sm` is a compact track. Given `checked`, it is controlled: a toggle only reports through `onCheckedChange`, and `setChecked` moves it. Behavior, keyboard and ARIA come from Zag's switch machine: a label holding a hidden checkbox.",
|
|
3869
|
+
"component": "switch",
|
|
3870
|
+
"declaration": "switchDef",
|
|
3871
|
+
"parts": {
|
|
3872
|
+
"root": "switch",
|
|
3873
|
+
"control": "switch-control",
|
|
3874
|
+
"thumb": "switch-thumb"
|
|
3875
|
+
},
|
|
3876
|
+
"settings": {
|
|
3877
|
+
"width": {
|
|
3878
|
+
"default": "32px"
|
|
3879
|
+
},
|
|
3880
|
+
"height": {
|
|
3881
|
+
"default": "18px"
|
|
3882
|
+
},
|
|
3883
|
+
"thumb-size": {
|
|
3884
|
+
"default": "14px"
|
|
3885
|
+
},
|
|
3886
|
+
"width-sm": {
|
|
3887
|
+
"default": "24px"
|
|
3888
|
+
},
|
|
3889
|
+
"height-sm": {
|
|
3890
|
+
"default": "14px"
|
|
3891
|
+
},
|
|
3892
|
+
"thumb-size-sm": {
|
|
3893
|
+
"default": "10px"
|
|
3894
|
+
}
|
|
3895
|
+
},
|
|
3896
|
+
"variants": {
|
|
3897
|
+
"size": [
|
|
3898
|
+
"default",
|
|
3899
|
+
"sm"
|
|
3900
|
+
],
|
|
3901
|
+
"variant": [
|
|
3902
|
+
"default",
|
|
3903
|
+
"destructive"
|
|
3904
|
+
]
|
|
3905
|
+
},
|
|
3906
|
+
"factory": "createSwitch",
|
|
3907
|
+
"returns": "Switch",
|
|
3908
|
+
"propsType": "SwitchProps",
|
|
3909
|
+
"props": [
|
|
3910
|
+
{
|
|
3911
|
+
"name": "checked",
|
|
3912
|
+
"type": "boolean",
|
|
3913
|
+
"required": false,
|
|
3914
|
+
"doc": "On or off. Given, the switch is controlled: it moves only through `setChecked`."
|
|
3915
|
+
},
|
|
3916
|
+
{
|
|
3917
|
+
"name": "defaultChecked",
|
|
3918
|
+
"type": "boolean",
|
|
3919
|
+
"required": false,
|
|
3920
|
+
"doc": "The state it starts in when `checked` is not given."
|
|
3921
|
+
},
|
|
3922
|
+
{
|
|
3923
|
+
"name": "onCheckedChange",
|
|
3924
|
+
"type": "(checked: boolean) => void",
|
|
3925
|
+
"required": false,
|
|
3926
|
+
"doc": "Called when the user toggles it, with the state asked for."
|
|
3927
|
+
},
|
|
3928
|
+
{
|
|
3929
|
+
"name": "disabled",
|
|
3930
|
+
"type": "boolean",
|
|
3931
|
+
"required": false
|
|
3932
|
+
},
|
|
3933
|
+
{
|
|
3934
|
+
"name": "name",
|
|
3935
|
+
"type": "string",
|
|
3936
|
+
"required": false,
|
|
3937
|
+
"doc": "Submitted with its form under this name while on."
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
"name": "value",
|
|
3941
|
+
"type": "string",
|
|
3942
|
+
"required": false,
|
|
3943
|
+
"doc": "What it submits while on (default `on`)."
|
|
3944
|
+
},
|
|
3945
|
+
{
|
|
3946
|
+
"name": "required",
|
|
3947
|
+
"type": "boolean",
|
|
3948
|
+
"required": false,
|
|
3949
|
+
"doc": "A form does not submit while it is off."
|
|
3950
|
+
},
|
|
3951
|
+
{
|
|
3952
|
+
"name": "id",
|
|
3953
|
+
"type": "string",
|
|
3954
|
+
"required": false,
|
|
3955
|
+
"doc": "The id of its focusable control, so a `<label for>` reaches it."
|
|
3956
|
+
},
|
|
3957
|
+
{
|
|
3958
|
+
"name": "label",
|
|
3959
|
+
"type": "string",
|
|
3960
|
+
"required": false,
|
|
3961
|
+
"doc": "Its accessible name, when no `<label>` names it."
|
|
3962
|
+
},
|
|
3963
|
+
{
|
|
3964
|
+
"name": "size",
|
|
3965
|
+
"type": "SwitchSize",
|
|
3966
|
+
"required": false
|
|
3967
|
+
},
|
|
3968
|
+
{
|
|
3969
|
+
"name": "variant",
|
|
3970
|
+
"type": "SwitchVariant",
|
|
3971
|
+
"required": false
|
|
3972
|
+
}
|
|
3973
|
+
],
|
|
3974
|
+
"exports": [
|
|
3975
|
+
"SwitchSize",
|
|
3976
|
+
"SwitchVariant",
|
|
3977
|
+
"switchDef",
|
|
3978
|
+
"switchVariants",
|
|
3979
|
+
"SwitchProps",
|
|
3980
|
+
"Switch",
|
|
3981
|
+
"createSwitch"
|
|
3982
|
+
],
|
|
3983
|
+
"tokens": [
|
|
3984
|
+
"danger",
|
|
3985
|
+
"dur-med",
|
|
3986
|
+
"fg-bright",
|
|
3987
|
+
"fg-on-fill",
|
|
3988
|
+
"focus",
|
|
3989
|
+
"selected-bg",
|
|
3990
|
+
"selected-fg"
|
|
3991
|
+
],
|
|
3992
|
+
"attributes": [
|
|
3993
|
+
"data-disabled",
|
|
3994
|
+
"data-focus-visible",
|
|
3995
|
+
"data-state"
|
|
3996
|
+
],
|
|
3997
|
+
"example": "import { createSwitch } from '@luxalgo/vela-ui/switch';\n\nconst switch = createSwitch();\nhost.append(switch.el);"
|
|
3998
|
+
},
|
|
3999
|
+
{
|
|
4000
|
+
"name": "tabs",
|
|
4001
|
+
"import": "@luxalgo/vela-ui/tabs",
|
|
4002
|
+
"description": "Tabs: a tab list over Zag's tabs machine (WAI-ARIA tabs: roving focus, the arrow keys along the orientation, Home/End, automatic or manual activation). Clicks and the arrow keys select; the caller shows what the selected tab stands for, through panels it attaches or as a filter of one view. `default` puts the tabs on one tinted track, `line` underlines the selected one (the indicator dialog), `filled` is the symbol picker's market strip, `soft` the drawings drawer's category strip, `nav` a vertical settings rail. A tab with a `description` reads on two lines, its label over it (a day strip: the weekday, then the date).",
|
|
4003
|
+
"component": "tabs",
|
|
4004
|
+
"declaration": "tabsDef",
|
|
4005
|
+
"parts": {
|
|
4006
|
+
"list": "tabs-list",
|
|
4007
|
+
"trigger": "tabs-trigger",
|
|
4008
|
+
"icon": "tabs-icon",
|
|
4009
|
+
"count": "tabs-count",
|
|
4010
|
+
"label": "tabs-label",
|
|
4011
|
+
"description": "tabs-description",
|
|
4012
|
+
"content": "tabs-content"
|
|
4013
|
+
},
|
|
4014
|
+
"settings": {
|
|
4015
|
+
"track-radius": {
|
|
4016
|
+
"default": "8px"
|
|
4017
|
+
},
|
|
4018
|
+
"trigger-radius": {
|
|
4019
|
+
"default": "var(--vela-radius-md)",
|
|
4020
|
+
"token": "radius-md"
|
|
4021
|
+
},
|
|
4022
|
+
"filled-radius": {
|
|
4023
|
+
"default": "5px"
|
|
4024
|
+
},
|
|
4025
|
+
"soft-radius": {
|
|
4026
|
+
"default": "8px"
|
|
4027
|
+
},
|
|
4028
|
+
"count-radius": {
|
|
4029
|
+
"default": "8px"
|
|
4030
|
+
}
|
|
4031
|
+
},
|
|
4032
|
+
"variants": {
|
|
4033
|
+
"variant": [
|
|
4034
|
+
"default",
|
|
4035
|
+
"line",
|
|
4036
|
+
"filled",
|
|
4037
|
+
"soft",
|
|
4038
|
+
"nav"
|
|
4039
|
+
]
|
|
4040
|
+
},
|
|
4041
|
+
"factory": "createTabs",
|
|
4042
|
+
"returns": "TabsHandle",
|
|
4043
|
+
"propsType": "TabsProps",
|
|
4044
|
+
"props": [
|
|
4045
|
+
{
|
|
4046
|
+
"name": "items",
|
|
4047
|
+
"type": "readonly TabItem[]",
|
|
4048
|
+
"required": true
|
|
4049
|
+
},
|
|
4050
|
+
{
|
|
4051
|
+
"name": "defaultValue",
|
|
4052
|
+
"type": "string",
|
|
4053
|
+
"required": false,
|
|
4054
|
+
"doc": "The selected tab (default: the first available one)."
|
|
4055
|
+
},
|
|
4056
|
+
{
|
|
4057
|
+
"name": "onValueChange",
|
|
4058
|
+
"type": "(value: string) => void",
|
|
4059
|
+
"required": false
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
"name": "orientation",
|
|
4063
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
4064
|
+
"required": false,
|
|
4065
|
+
"doc": "Default `horizontal` (`nav` reads best vertical)."
|
|
4066
|
+
},
|
|
4067
|
+
{
|
|
4068
|
+
"name": "activationMode",
|
|
4069
|
+
"type": "\"automatic\" | \"manual\"",
|
|
4070
|
+
"required": false,
|
|
4071
|
+
"doc": "`automatic` (default): moving focus with the arrow keys selects. `manual`: Enter or Space selects the focused tab."
|
|
4072
|
+
},
|
|
4073
|
+
{
|
|
4074
|
+
"name": "dir",
|
|
4075
|
+
"type": "\"ltr\" | \"rtl\"",
|
|
4076
|
+
"required": false,
|
|
4077
|
+
"doc": "The text direction the arrow keys follow (default `ltr`)."
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
"name": "className",
|
|
4081
|
+
"type": "string",
|
|
4082
|
+
"required": false,
|
|
4083
|
+
"doc": "Extra class names on the list (the host's layout of the strip)."
|
|
4084
|
+
},
|
|
4085
|
+
{
|
|
4086
|
+
"name": "triggerClassName",
|
|
4087
|
+
"type": "string",
|
|
4088
|
+
"required": false,
|
|
4089
|
+
"doc": "Extra class names on every trigger."
|
|
4090
|
+
},
|
|
4091
|
+
{
|
|
4092
|
+
"name": "variant",
|
|
4093
|
+
"type": "\"default\" | \"line\" | \"filled\" | \"soft\" | \"nav\"",
|
|
4094
|
+
"required": false
|
|
4095
|
+
}
|
|
4096
|
+
],
|
|
4097
|
+
"exports": [
|
|
4098
|
+
"tabsDef",
|
|
4099
|
+
"tabsVariants",
|
|
4100
|
+
"TabsVariant",
|
|
4101
|
+
"TabItem",
|
|
4102
|
+
"TabsProps",
|
|
4103
|
+
"TabsHandle",
|
|
4104
|
+
"tabAvailable",
|
|
4105
|
+
"TABS_STYLE_ID",
|
|
4106
|
+
"TABS_CSS",
|
|
4107
|
+
"createTabs"
|
|
4108
|
+
],
|
|
4109
|
+
"tokens": [
|
|
4110
|
+
"active",
|
|
4111
|
+
"border",
|
|
4112
|
+
"dur-fast",
|
|
4113
|
+
"fg",
|
|
4114
|
+
"fg-bright",
|
|
4115
|
+
"fg-muted",
|
|
4116
|
+
"focus",
|
|
4117
|
+
"hover",
|
|
4118
|
+
"radius-md",
|
|
4119
|
+
"selected-bg",
|
|
4120
|
+
"selected-fg"
|
|
4121
|
+
],
|
|
4122
|
+
"attributes": [
|
|
4123
|
+
"data-description",
|
|
4124
|
+
"data-disabled",
|
|
4125
|
+
"data-orientation",
|
|
4126
|
+
"data-selected"
|
|
4127
|
+
],
|
|
4128
|
+
"example": "import { createTabs } from '@luxalgo/vela-ui/tabs';\n\nconst tabs = createTabs({ items: /* readonly TabItem[] */ });\nhost.append(tabs.el);"
|
|
4129
|
+
},
|
|
4130
|
+
{
|
|
4131
|
+
"name": "text-area",
|
|
4132
|
+
"import": "@luxalgo/vela-ui/text-area",
|
|
4133
|
+
"description": "TextArea: a multi-line text input that commits on blur, and can grow with its content up to a number of lines before it scrolls.",
|
|
4134
|
+
"component": "text-area",
|
|
4135
|
+
"declaration": "textAreaDef",
|
|
4136
|
+
"parts": {
|
|
4137
|
+
"root": "text-area",
|
|
4138
|
+
"input": "text-area-input"
|
|
4139
|
+
},
|
|
4140
|
+
"settings": {
|
|
4141
|
+
"radius": {
|
|
4142
|
+
"default": "var(--vela-radius-md)",
|
|
4143
|
+
"token": "radius-md"
|
|
4144
|
+
},
|
|
4145
|
+
"focus-ring": {
|
|
4146
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
4147
|
+
}
|
|
4148
|
+
},
|
|
4149
|
+
"variants": {
|
|
4150
|
+
"size": [
|
|
4151
|
+
"md",
|
|
4152
|
+
"sm"
|
|
4153
|
+
]
|
|
4154
|
+
},
|
|
4155
|
+
"factory": "createTextArea",
|
|
4156
|
+
"returns": "TextArea",
|
|
4157
|
+
"propsType": "TextAreaProps",
|
|
4158
|
+
"props": [
|
|
4159
|
+
{
|
|
4160
|
+
"name": "name",
|
|
4161
|
+
"type": "string",
|
|
4162
|
+
"required": false,
|
|
4163
|
+
"doc": "Submitted with its form under this name."
|
|
4164
|
+
},
|
|
4165
|
+
{
|
|
4166
|
+
"name": "required",
|
|
4167
|
+
"type": "boolean",
|
|
4168
|
+
"required": false
|
|
4169
|
+
},
|
|
4170
|
+
{
|
|
4171
|
+
"name": "id",
|
|
4172
|
+
"type": "string",
|
|
4173
|
+
"required": false
|
|
4174
|
+
},
|
|
4175
|
+
{
|
|
4176
|
+
"name": "placeholder",
|
|
4177
|
+
"type": "string",
|
|
4178
|
+
"required": false
|
|
4179
|
+
},
|
|
4180
|
+
{
|
|
4181
|
+
"name": "autoGrow",
|
|
4182
|
+
"type": "boolean",
|
|
4183
|
+
"required": false,
|
|
4184
|
+
"doc": "Grow with content up to `maxLines`, then scroll."
|
|
4185
|
+
},
|
|
4186
|
+
{
|
|
4187
|
+
"name": "maxLines",
|
|
4188
|
+
"type": "number",
|
|
4189
|
+
"required": false
|
|
4190
|
+
},
|
|
4191
|
+
{
|
|
4192
|
+
"name": "value",
|
|
4193
|
+
"type": "string",
|
|
4194
|
+
"required": false
|
|
4195
|
+
},
|
|
4196
|
+
{
|
|
4197
|
+
"name": "defaultValue",
|
|
4198
|
+
"type": "string",
|
|
4199
|
+
"required": false,
|
|
4200
|
+
"doc": "The text it starts with when `value` is not given."
|
|
4201
|
+
},
|
|
4202
|
+
{
|
|
4203
|
+
"name": "size",
|
|
4204
|
+
"type": "TextAreaSize",
|
|
4205
|
+
"required": false
|
|
4206
|
+
},
|
|
4207
|
+
{
|
|
4208
|
+
"name": "rows",
|
|
4209
|
+
"type": "number",
|
|
4210
|
+
"required": false
|
|
4211
|
+
},
|
|
4212
|
+
{
|
|
4213
|
+
"name": "disabled",
|
|
4214
|
+
"type": "boolean",
|
|
4215
|
+
"required": false
|
|
4216
|
+
},
|
|
4217
|
+
{
|
|
4218
|
+
"name": "onChange",
|
|
4219
|
+
"type": "(value: string) => void",
|
|
4220
|
+
"required": false
|
|
4221
|
+
}
|
|
4222
|
+
],
|
|
4223
|
+
"exports": [
|
|
4224
|
+
"TextAreaSize",
|
|
4225
|
+
"TextAreaControllerOptions",
|
|
4226
|
+
"TextAreaController",
|
|
4227
|
+
"textAreaController",
|
|
4228
|
+
"textAreaDef",
|
|
4229
|
+
"textAreaVariants",
|
|
4230
|
+
"TextAreaOptions",
|
|
4231
|
+
"TextAreaProps",
|
|
4232
|
+
"TextArea",
|
|
4233
|
+
"createTextArea"
|
|
4234
|
+
],
|
|
4235
|
+
"tokens": [
|
|
4236
|
+
"border-strong",
|
|
4237
|
+
"dur-fast",
|
|
4238
|
+
"fg-bright",
|
|
4239
|
+
"fg-muted",
|
|
4240
|
+
"focus",
|
|
4241
|
+
"focus-soft",
|
|
4242
|
+
"radius-md"
|
|
4243
|
+
],
|
|
4244
|
+
"attributes": [
|
|
4245
|
+
"data-autogrow"
|
|
4246
|
+
],
|
|
4247
|
+
"example": "import { createTextArea } from '@luxalgo/vela-ui/text-area';\n\nconst textArea = createTextArea();\nhost.append(textArea.el);"
|
|
4248
|
+
},
|
|
4249
|
+
{
|
|
4250
|
+
"name": "toggle-group",
|
|
4251
|
+
"import": "@luxalgo/vela-ui/toggle-group",
|
|
4252
|
+
"description": "ToggleGroup: a few options side by side on one track, over Zag's toggle-group machine. `single` (default): one option is always chosen (a radio group, a segmented control); `multiple`: each option toggles on its own. The arrow keys move focus; Space and Enter press. The track and the chosen option are tints of the foreground, so both read on a dark and a light theme.",
|
|
4253
|
+
"component": "toggle-group",
|
|
4254
|
+
"declaration": "toggleGroupDef",
|
|
4255
|
+
"parts": {
|
|
4256
|
+
"root": "toggle-group",
|
|
4257
|
+
"item": "toggle-group-item",
|
|
4258
|
+
"icon": "toggle-group-icon"
|
|
4259
|
+
},
|
|
4260
|
+
"settings": {
|
|
4261
|
+
"radius": {
|
|
4262
|
+
"default": "8px"
|
|
4263
|
+
},
|
|
4264
|
+
"radius-sm": {
|
|
4265
|
+
"default": "7px"
|
|
4266
|
+
},
|
|
4267
|
+
"item-radius": {
|
|
4268
|
+
"default": "var(--vela-radius-md)",
|
|
4269
|
+
"token": "radius-md"
|
|
4270
|
+
},
|
|
4271
|
+
"item-radius-sm": {
|
|
4272
|
+
"default": "5px"
|
|
4273
|
+
}
|
|
4274
|
+
},
|
|
4275
|
+
"variants": {
|
|
4276
|
+
"size": [
|
|
4277
|
+
"default",
|
|
4278
|
+
"sm"
|
|
4279
|
+
]
|
|
4280
|
+
},
|
|
4281
|
+
"factory": "createToggleGroup",
|
|
4282
|
+
"returns": "ToggleGroupHandle",
|
|
4283
|
+
"propsType": "ToggleGroupProps",
|
|
4284
|
+
"props": [
|
|
4285
|
+
{
|
|
4286
|
+
"name": "type",
|
|
4287
|
+
"type": "\"single\" | \"multiple\"",
|
|
4288
|
+
"required": false
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"name": "defaultValue",
|
|
4292
|
+
"type": "string | readonly string[]",
|
|
4293
|
+
"required": false,
|
|
4294
|
+
"doc": "The chosen option (default: the first enabled one). The options turned on (default: none)."
|
|
4295
|
+
},
|
|
4296
|
+
{
|
|
4297
|
+
"name": "onValueChange",
|
|
4298
|
+
"type": "((value: string) => void) | ((value: string[]) => void)",
|
|
4299
|
+
"required": false
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"name": "items",
|
|
4303
|
+
"type": "readonly ToggleGroupItem[]",
|
|
4304
|
+
"required": true
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
"name": "label",
|
|
4308
|
+
"type": "string",
|
|
4309
|
+
"required": false,
|
|
4310
|
+
"doc": "Accessible name of the group."
|
|
4311
|
+
},
|
|
4312
|
+
{
|
|
4313
|
+
"name": "iconOnly",
|
|
4314
|
+
"type": "boolean",
|
|
4315
|
+
"required": false,
|
|
4316
|
+
"doc": "Options show their icon only; each label becomes its option's accessible name."
|
|
4317
|
+
},
|
|
4318
|
+
{
|
|
4319
|
+
"name": "dir",
|
|
4320
|
+
"type": "\"ltr\" | \"rtl\"",
|
|
4321
|
+
"required": false
|
|
4322
|
+
},
|
|
4323
|
+
{
|
|
4324
|
+
"name": "fill",
|
|
4325
|
+
"type": "boolean",
|
|
4326
|
+
"required": false,
|
|
4327
|
+
"doc": "Stretch across the parent, options sharing the width."
|
|
4328
|
+
},
|
|
4329
|
+
{
|
|
4330
|
+
"name": "className",
|
|
4331
|
+
"type": "string",
|
|
4332
|
+
"required": false
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
"name": "size",
|
|
4336
|
+
"type": "\"default\" | \"sm\"",
|
|
4337
|
+
"required": false
|
|
4338
|
+
}
|
|
4339
|
+
],
|
|
4340
|
+
"exports": [
|
|
4341
|
+
"toggleGroupDef",
|
|
4342
|
+
"toggleGroupVariants",
|
|
4343
|
+
"ToggleGroupItem",
|
|
4344
|
+
"ToggleGroupSingleProps",
|
|
4345
|
+
"ToggleGroupMultipleProps",
|
|
4346
|
+
"ToggleGroupProps",
|
|
4347
|
+
"ToggleGroupHandle",
|
|
4348
|
+
"TOGGLE_GROUP_STYLE_ID",
|
|
4349
|
+
"TOGGLE_GROUP_CSS",
|
|
4350
|
+
"createToggleGroup"
|
|
4351
|
+
],
|
|
4352
|
+
"tokens": [
|
|
4353
|
+
"down",
|
|
4354
|
+
"dur-fast",
|
|
4355
|
+
"fg-bright",
|
|
4356
|
+
"fg-muted",
|
|
4357
|
+
"fg-on-fill",
|
|
4358
|
+
"focus",
|
|
4359
|
+
"radius-md",
|
|
4360
|
+
"up"
|
|
4361
|
+
],
|
|
4362
|
+
"attributes": [
|
|
4363
|
+
"data-disabled",
|
|
4364
|
+
"data-fill",
|
|
4365
|
+
"data-icon-only",
|
|
4366
|
+
"data-state",
|
|
4367
|
+
"data-tone"
|
|
4368
|
+
],
|
|
4369
|
+
"example": "import { createToggleGroup } from '@luxalgo/vela-ui/toggle-group';\n\nconst toggleGroup = createToggleGroup({ items: /* readonly ToggleGroupItem[] */ });\nhost.append(toggleGroup.el);"
|
|
4370
|
+
},
|
|
4371
|
+
{
|
|
4372
|
+
"name": "tooltip",
|
|
4373
|
+
"import": "@luxalgo/vela-ui/tooltip",
|
|
4374
|
+
"description": "Tooltip: a floating label over Zag's tooltip machine (floating-ui placement). The floating layer mounts into `host` (default: the trigger's nearest `.vela-ui` ancestor, else <body>) so the design tokens inherit. The trigger is the host's own element and keeps its slot.",
|
|
4375
|
+
"component": "tooltip",
|
|
4376
|
+
"declaration": "tooltipDef",
|
|
4377
|
+
"parts": {
|
|
4378
|
+
"positioner": "tooltip-positioner",
|
|
4379
|
+
"content": "tooltip-content"
|
|
4380
|
+
},
|
|
4381
|
+
"settings": {
|
|
4382
|
+
"radius": {
|
|
4383
|
+
"default": "var(--vela-radius-md)",
|
|
4384
|
+
"token": "radius-md"
|
|
4385
|
+
}
|
|
4386
|
+
},
|
|
4387
|
+
"factory": "createTooltip",
|
|
4388
|
+
"returns": "Tooltip",
|
|
4389
|
+
"propsType": "TooltipProps",
|
|
4390
|
+
"props": [
|
|
4391
|
+
{
|
|
4392
|
+
"name": "trigger",
|
|
4393
|
+
"type": "HTMLElement",
|
|
4394
|
+
"required": true
|
|
4395
|
+
},
|
|
4396
|
+
{
|
|
4397
|
+
"name": "content",
|
|
4398
|
+
"type": "string | Node | (() => Node)",
|
|
4399
|
+
"required": true
|
|
4400
|
+
},
|
|
4401
|
+
{
|
|
4402
|
+
"name": "host",
|
|
4403
|
+
"type": "HTMLElement",
|
|
4404
|
+
"required": false
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
"name": "placement",
|
|
4408
|
+
"type": "Placement",
|
|
4409
|
+
"required": false
|
|
4410
|
+
},
|
|
4411
|
+
{
|
|
4412
|
+
"name": "openDelay",
|
|
4413
|
+
"type": "number",
|
|
4414
|
+
"required": false,
|
|
4415
|
+
"doc": "ms before opening on hover (default 0 — the reference tooltips are instant)."
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
"name": "closeDelay",
|
|
4419
|
+
"type": "number",
|
|
4420
|
+
"required": false
|
|
4421
|
+
},
|
|
4422
|
+
{
|
|
4423
|
+
"name": "interactive",
|
|
4424
|
+
"type": "boolean",
|
|
4425
|
+
"required": false,
|
|
4426
|
+
"doc": "Keep open while the pointer is over the content (rich tooltips)."
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
"name": "triggerId",
|
|
4430
|
+
"type": "string",
|
|
4431
|
+
"required": false,
|
|
4432
|
+
"doc": "Share the trigger's DOM id with other machines composed on the SAME element (each Zag machine otherwise stamps its own id — last one wins and breaks the rest)."
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
"name": "side",
|
|
4436
|
+
"type": "Side",
|
|
4437
|
+
"required": false,
|
|
4438
|
+
"doc": "The side of the trigger it opens on. With `avoidCollisions`, it flips to the opposite side when this one lacks room."
|
|
4439
|
+
},
|
|
4440
|
+
{
|
|
4441
|
+
"name": "align",
|
|
4442
|
+
"type": "Align",
|
|
4443
|
+
"required": false,
|
|
4444
|
+
"doc": "Its alignment along that side."
|
|
4445
|
+
},
|
|
4446
|
+
{
|
|
4447
|
+
"name": "sideOffset",
|
|
4448
|
+
"type": "number",
|
|
4449
|
+
"required": false,
|
|
4450
|
+
"doc": "Its distance from the trigger, in px."
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
"name": "alignOffset",
|
|
4454
|
+
"type": "number",
|
|
4455
|
+
"required": false,
|
|
4456
|
+
"doc": "A shift along the side, in px, away from the aligned edge (toward the middle for `start` and `end`)."
|
|
4457
|
+
},
|
|
4458
|
+
{
|
|
4459
|
+
"name": "avoidCollisions",
|
|
4460
|
+
"type": "boolean",
|
|
4461
|
+
"required": false,
|
|
4462
|
+
"doc": "Flip to the opposite side when there is no room, and stay inside the collision area (default true)."
|
|
4463
|
+
},
|
|
4464
|
+
{
|
|
4465
|
+
"name": "collisionPadding",
|
|
4466
|
+
"type": "number",
|
|
4467
|
+
"required": false,
|
|
4468
|
+
"doc": "Room kept from the collision area's edges, in px."
|
|
4469
|
+
},
|
|
4470
|
+
{
|
|
4471
|
+
"name": "collisionBoundary",
|
|
4472
|
+
"type": "CollisionBoundary",
|
|
4473
|
+
"required": false,
|
|
4474
|
+
"doc": "The area it stays inside (default: the viewport)."
|
|
4475
|
+
}
|
|
4476
|
+
],
|
|
4477
|
+
"exports": [
|
|
4478
|
+
"TooltipControllerOptions",
|
|
4479
|
+
"TooltipService",
|
|
4480
|
+
"TooltipApi",
|
|
4481
|
+
"TooltipController",
|
|
4482
|
+
"tooltipController",
|
|
4483
|
+
"tooltipDef",
|
|
4484
|
+
"TooltipOptions",
|
|
4485
|
+
"TooltipProps",
|
|
4486
|
+
"Tooltip",
|
|
4487
|
+
"createTooltip"
|
|
4488
|
+
],
|
|
4489
|
+
"tokens": [
|
|
4490
|
+
"bg",
|
|
4491
|
+
"border-soft",
|
|
4492
|
+
"dur-fast",
|
|
4493
|
+
"fg",
|
|
4494
|
+
"font-size-md",
|
|
4495
|
+
"radius-md",
|
|
4496
|
+
"shadow",
|
|
4497
|
+
"space-1",
|
|
4498
|
+
"space-2",
|
|
4499
|
+
"z-tooltip"
|
|
4500
|
+
],
|
|
4501
|
+
"attributes": [
|
|
4502
|
+
"data-interactive",
|
|
4503
|
+
"data-state"
|
|
4504
|
+
],
|
|
4505
|
+
"example": "import { createTooltip } from '@luxalgo/vela-ui/tooltip';\n\nconst tooltip = createTooltip({ trigger: /* HTMLElement */, content: /* string | Node | (() => Node) */ });\nhost.append(tooltip.el);"
|
|
4506
|
+
}
|
|
4507
|
+
]
|
|
4508
|
+
}
|