@luxalgo/vela-ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/README.md +5 -2
- package/dist/badge.js +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/button.d.ts +18 -4
- package/dist/button.js +4 -3
- package/dist/calendar.d.ts +3 -1
- package/dist/calendar.js +1 -1
- package/dist/callout-bubble.d.ts +6 -1
- package/dist/callout-bubble.js +12 -8
- package/dist/card.d.ts +52 -0
- package/dist/card.js +179 -0
- package/dist/checkbox.js +5 -5
- package/dist/{chunk-X4YPSIW6.js → chunk-5BJV5FY5.js} +1 -1
- package/dist/{chunk-FCO3YZLT.js → chunk-ALAHGSLC.js} +1 -1
- package/dist/{chunk-5QHXOAZA.js → chunk-B2EZB5ZG.js} +4 -4
- package/dist/{chunk-G7IQLY3A.js → chunk-C3PXY2SW.js} +5 -0
- package/dist/chunk-DXDCKZ2M.js +117 -0
- package/dist/{chunk-6NXY62JS.js → chunk-FYVQO5TN.js} +1 -1
- package/dist/{chunk-V6TTTMTE.js → chunk-GVRX3UAV.js} +4 -1
- package/dist/{chunk-XJAPCCOJ.js → chunk-IOOYDSSK.js} +4 -4
- package/dist/{chunk-OBLIX3VN.js → chunk-KKS6NEGI.js} +2 -2
- package/dist/{chunk-SAPURP46.js → chunk-OJ2SEMN6.js} +3 -3
- package/dist/{chunk-2Q4JRINP.js → chunk-OQXFQMZM.js} +3 -3
- package/dist/{chunk-AJ2IYSOI.js → chunk-TBXUF5YX.js} +35 -3
- package/dist/{chunk-ZB3BZHSN.js → chunk-UEO6W37Z.js} +4 -4
- package/dist/{chunk-CH3DV6FD.js → chunk-WWHNUKSZ.js} +5 -5
- package/dist/chunk-XBEL4K33.js +142 -0
- package/dist/collapsible.d.ts +49 -0
- package/dist/collapsible.js +106 -0
- package/dist/color-picker.js +5 -5
- package/dist/context-menu.js +5 -5
- package/dist/css.d.ts +3 -1
- package/dist/css.js +1 -1
- package/dist/data-table.d.ts +39 -2
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +3 -3
- package/dist/dialog.d.ts +8 -0
- package/dist/dialog.js +15 -5
- package/dist/donut.js +1 -1
- package/dist/drawer.js +2 -2
- package/dist/dropdown-menu.js +4 -4
- package/dist/empty.js +2 -2
- package/dist/field.js +13 -13
- package/dist/glyph-select.js +5 -5
- package/dist/h-Bl37qUis.d.ts +24 -0
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.js +3 -3
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +3 -3
- package/dist/input-group.js +4 -3
- package/dist/input.js +2 -2
- package/dist/item.d.ts +72 -0
- package/dist/item.js +131 -0
- package/dist/kbd.js +2 -2
- package/dist/line-chart.js +1 -1
- package/dist/manifest.json +1336 -65
- package/dist/month-grid.d.ts +45 -0
- package/dist/month-grid.js +157 -0
- package/dist/number-input.js +5 -5
- package/dist/popover.js +3 -3
- package/dist/scatter-chart.js +1 -1
- package/dist/select.js +7 -7
- 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.js +1 -1
- package/dist/stat.js +1 -1
- package/dist/switch.js +3 -3
- package/dist/tabs.d.ts +3 -1
- package/dist/tabs.js +13 -8
- package/dist/text-area.js +2 -2
- package/dist/theme-Ct-q58xz.d.ts +341 -0
- package/dist/theme.d.ts +42 -181
- package/dist/theme.js +2 -2
- package/dist/theme.schema.json +541 -1
- package/dist/toast.d.ts +49 -0
- package/dist/toast.js +463 -0
- package/dist/toggle-group.js +4 -4
- package/dist/tooltip.js +2 -2
- package/dist/treemap.d.ts +80 -0
- package/dist/treemap.js +470 -0
- package/docs/theming.md +6 -0
- package/docs/writing-a-component.md +4 -1
- package/llms.txt +11 -3
- package/package.json +1 -1
- package/registry/button.ts +105 -21
- package/registry/callout-bubble.ts +14 -3
- package/registry/card.ts +379 -0
- package/registry/collapsible.ts +271 -0
- package/registry/dialog.ts +16 -0
- package/registry/dropdown-menu.ts +3 -3
- package/registry/item.ts +376 -0
- package/registry/month-grid.ts +328 -0
- package/registry/slider.ts +259 -0
- package/registry/sort-button.ts +189 -0
- package/registry/tabs.ts +38 -4
- package/registry/toast.ts +965 -0
- package/registry/treemap.ts +847 -0
- package/skills/using-vela-ui-components/SKILL.md +14 -9
- package/src/components/button.ts +105 -21
- package/src/components/callout-bubble.ts +14 -3
- package/src/components/card.ts +379 -0
- package/src/components/collapsible.ts +271 -0
- package/src/components/dialog.ts +16 -0
- package/src/components/dropdown-menu.ts +3 -3
- package/src/components/item.ts +376 -0
- package/src/components/month-grid.ts +328 -0
- package/src/components/slider.ts +259 -0
- package/src/components/sort-button.ts +189 -0
- package/src/components/tabs.ts +38 -4
- package/src/components/toast.ts +965 -0
- package/src/components/treemap.ts +847 -0
- package/src/lib/calendar.ts +5 -0
- package/src/lib/component-index.ts +34 -2
- package/src/lib/css.ts +6 -2
- package/src/lib/icons.ts +7 -0
- package/src/lib/scope.ts +135 -0
- package/src/lib/theme.ts +21 -5
- package/dist/chunk-EZQXTO6K.js +0 -89
- package/dist/chunk-IDA2BT7D.js +0 -29
- package/dist/data-table-DtU3FX9j.d.ts +0 -61
package/dist/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@luxalgo/vela-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"tokens": [
|
|
5
5
|
"space-1",
|
|
6
6
|
"space-2",
|
|
@@ -247,12 +247,13 @@
|
|
|
247
247
|
{
|
|
248
248
|
"name": "button",
|
|
249
249
|
"import": "@luxalgo/vela-ui/button",
|
|
250
|
-
"description": "Button: a <button> with optional icons before and after its text. `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). 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.",
|
|
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
251
|
"component": "button",
|
|
252
252
|
"declaration": "buttonDef",
|
|
253
253
|
"parts": {
|
|
254
254
|
"root": "button",
|
|
255
|
-
"icon": "button-icon"
|
|
255
|
+
"icon": "button-icon",
|
|
256
|
+
"keys": "button-keys"
|
|
256
257
|
},
|
|
257
258
|
"settings": {
|
|
258
259
|
"radius": {
|
|
@@ -290,7 +291,8 @@
|
|
|
290
291
|
"destructive",
|
|
291
292
|
"link",
|
|
292
293
|
"up",
|
|
293
|
-
"down"
|
|
294
|
+
"down",
|
|
295
|
+
"favorite"
|
|
294
296
|
],
|
|
295
297
|
"size": [
|
|
296
298
|
"default",
|
|
@@ -317,7 +319,13 @@
|
|
|
317
319
|
"name": "icon",
|
|
318
320
|
"type": "string",
|
|
319
321
|
"required": false,
|
|
320
|
-
"doc": "Icon id from the kit's registry, before the text (the icon of an `icon*` size)."
|
|
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`."
|
|
321
329
|
},
|
|
322
330
|
{
|
|
323
331
|
"name": "iconEnd",
|
|
@@ -325,6 +333,18 @@
|
|
|
325
333
|
"required": false,
|
|
326
334
|
"doc": "Icon id after the text (a menu trigger's chevron)."
|
|
327
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
|
+
},
|
|
328
348
|
{
|
|
329
349
|
"name": "label",
|
|
330
350
|
"type": "string",
|
|
@@ -335,7 +355,19 @@
|
|
|
335
355
|
"name": "pressed",
|
|
336
356
|
"type": "boolean",
|
|
337
357
|
"required": false,
|
|
338
|
-
"doc": "A toggle
|
|
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)."
|
|
339
371
|
},
|
|
340
372
|
{
|
|
341
373
|
"name": "disabled",
|
|
@@ -355,7 +387,7 @@
|
|
|
355
387
|
},
|
|
356
388
|
{
|
|
357
389
|
"name": "variant",
|
|
358
|
-
"type": "\"default\" | \"secondary\" | \"outline\" | \"destructive\" | \"up\" | \"down\" | \"ghost\" | \"link\"",
|
|
390
|
+
"type": "\"default\" | \"secondary\" | \"outline\" | \"destructive\" | \"up\" | \"down\" | \"ghost\" | \"link\" | \"favorite\"",
|
|
359
391
|
"required": false
|
|
360
392
|
},
|
|
361
393
|
{
|
|
@@ -388,6 +420,7 @@
|
|
|
388
420
|
"fg-muted",
|
|
389
421
|
"fg-on-fill",
|
|
390
422
|
"focus",
|
|
423
|
+
"highlight",
|
|
391
424
|
"hover",
|
|
392
425
|
"radius-md",
|
|
393
426
|
"radius-sm",
|
|
@@ -399,6 +432,7 @@
|
|
|
399
432
|
"attributes": [
|
|
400
433
|
"aria-expanded",
|
|
401
434
|
"data-icon",
|
|
435
|
+
"data-keys",
|
|
402
436
|
"data-pressed"
|
|
403
437
|
],
|
|
404
438
|
"example": "import { createButton } from '@luxalgo/vela-ui/button';\n\nconst button = createButton();\nhost.append(button.el);"
|
|
@@ -538,6 +572,8 @@
|
|
|
538
572
|
"CalloutBubbleProps",
|
|
539
573
|
"CALLOUT_STYLE_ID",
|
|
540
574
|
"CALLOUT_CSS",
|
|
575
|
+
"CalloutPanelPart",
|
|
576
|
+
"calloutPart",
|
|
541
577
|
"CalloutBubble",
|
|
542
578
|
"createCalloutBubble"
|
|
543
579
|
],
|
|
@@ -562,6 +598,171 @@
|
|
|
562
598
|
],
|
|
563
599
|
"example": "import { createCalloutBubble } from '@luxalgo/vela-ui/callout-bubble';\n\nconst calloutBubble = createCalloutBubble({ icon: /* string */, background: /* string */, label: /* string */ });\nhost.append(calloutBubble.el);"
|
|
564
600
|
},
|
|
601
|
+
{
|
|
602
|
+
"name": "card",
|
|
603
|
+
"import": "@luxalgo/vela-ui/card",
|
|
604
|
+
"description": "Card: a surface for one subject (a panel of figures, a chart, a summary): a header with an eyebrow over the title and a description under it, an action at its end (buttons, a toggle group), then the content and a footer past a line. `default` is a bordered surface, `inset` a sunken tile for figures inside another card; `sm` is tighter. The title is a heading, so a screen reader can move from card to card. With `onSelect` the whole card is clickable while a press on a control inside it stays that control's: to the keyboard and screen readers its title is the button (the card itself when it has no title), as a card often holds buttons of its own and a button cannot hold other buttons.",
|
|
605
|
+
"component": "card",
|
|
606
|
+
"declaration": "cardDef",
|
|
607
|
+
"parts": {
|
|
608
|
+
"root": "card",
|
|
609
|
+
"header": "card-header",
|
|
610
|
+
"heading": "card-heading",
|
|
611
|
+
"eyebrow": "card-eyebrow",
|
|
612
|
+
"title": "card-title",
|
|
613
|
+
"trigger": "card-trigger",
|
|
614
|
+
"description": "card-description",
|
|
615
|
+
"action": "card-action",
|
|
616
|
+
"content": "card-content",
|
|
617
|
+
"footer": "card-footer"
|
|
618
|
+
},
|
|
619
|
+
"settings": {
|
|
620
|
+
"radius": {
|
|
621
|
+
"default": "var(--vela-radius-lg)",
|
|
622
|
+
"token": "radius-lg"
|
|
623
|
+
},
|
|
624
|
+
"padding": {
|
|
625
|
+
"default": "16px"
|
|
626
|
+
},
|
|
627
|
+
"padding-sm": {
|
|
628
|
+
"default": "10px 12px"
|
|
629
|
+
},
|
|
630
|
+
"gap": {
|
|
631
|
+
"default": "12px"
|
|
632
|
+
},
|
|
633
|
+
"gap-sm": {
|
|
634
|
+
"default": "8px"
|
|
635
|
+
},
|
|
636
|
+
"background": {
|
|
637
|
+
"default": "var(--vela-surface)",
|
|
638
|
+
"token": "surface"
|
|
639
|
+
},
|
|
640
|
+
"border": {
|
|
641
|
+
"default": "var(--vela-border)",
|
|
642
|
+
"token": "border"
|
|
643
|
+
},
|
|
644
|
+
"inset-background": {
|
|
645
|
+
"default": "`color-mix(in srgb, ${t.fg.bright} 2.5%, ${t.surface})`"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"variants": {
|
|
649
|
+
"variant": [
|
|
650
|
+
"default",
|
|
651
|
+
"inset"
|
|
652
|
+
],
|
|
653
|
+
"size": [
|
|
654
|
+
"default",
|
|
655
|
+
"sm"
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
"factory": "createCard",
|
|
659
|
+
"returns": "CardHandle",
|
|
660
|
+
"propsType": "CardProps",
|
|
661
|
+
"props": [
|
|
662
|
+
{
|
|
663
|
+
"name": "eyebrow",
|
|
664
|
+
"type": "string | Node",
|
|
665
|
+
"required": false,
|
|
666
|
+
"doc": "Small capitals over the title: what kind of card it is (\"Market pulse\")."
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "title",
|
|
670
|
+
"type": "string | Node",
|
|
671
|
+
"required": false,
|
|
672
|
+
"doc": "The heading: text, or an element (a name with a badge after it)."
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "description",
|
|
676
|
+
"type": "string | Node",
|
|
677
|
+
"required": false,
|
|
678
|
+
"doc": "The muted line under the title."
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "action",
|
|
682
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
683
|
+
"required": false,
|
|
684
|
+
"doc": "At the header's end: its buttons, a toggle group."
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "content",
|
|
688
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
689
|
+
"required": false,
|
|
690
|
+
"doc": "The body. More can be appended to the handle's `content` later."
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "footer",
|
|
694
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
695
|
+
"required": false,
|
|
696
|
+
"doc": "Under the body, past a line: notes, a source, a time."
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "headingLevel",
|
|
700
|
+
"type": "6 | 2 | 3 | 4 | 5",
|
|
701
|
+
"required": false,
|
|
702
|
+
"doc": "The title's heading level (default 3)."
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "selected",
|
|
706
|
+
"type": "boolean",
|
|
707
|
+
"required": false,
|
|
708
|
+
"doc": "The current card (the one a detail view shows)."
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "disabled",
|
|
712
|
+
"type": "boolean",
|
|
713
|
+
"required": false
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"name": "onSelect",
|
|
717
|
+
"type": "(e: MouseEvent | KeyboardEvent) => void",
|
|
718
|
+
"required": false,
|
|
719
|
+
"doc": "Makes the card clickable: a click on it, or Enter or Space on its title, runs it."
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "className",
|
|
723
|
+
"type": "string",
|
|
724
|
+
"required": false,
|
|
725
|
+
"doc": "Extra class names (layout hooks)."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "variant",
|
|
729
|
+
"type": "\"default\" | \"inset\"",
|
|
730
|
+
"required": false
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"name": "size",
|
|
734
|
+
"type": "\"default\" | \"sm\"",
|
|
735
|
+
"required": false
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
"exports": [
|
|
739
|
+
"cardDef",
|
|
740
|
+
"cardVariants",
|
|
741
|
+
"CardVariant",
|
|
742
|
+
"CardSize",
|
|
743
|
+
"CardProps",
|
|
744
|
+
"CardHandle",
|
|
745
|
+
"createCard"
|
|
746
|
+
],
|
|
747
|
+
"tokens": [
|
|
748
|
+
"border",
|
|
749
|
+
"border-strong",
|
|
750
|
+
"dur-fast",
|
|
751
|
+
"fg",
|
|
752
|
+
"fg-bright",
|
|
753
|
+
"fg-muted",
|
|
754
|
+
"focus",
|
|
755
|
+
"radius-lg",
|
|
756
|
+
"radius-sm",
|
|
757
|
+
"surface"
|
|
758
|
+
],
|
|
759
|
+
"attributes": [
|
|
760
|
+
"data-clickable",
|
|
761
|
+
"data-disabled",
|
|
762
|
+
"data-selected"
|
|
763
|
+
],
|
|
764
|
+
"example": "import { createCard } from '@luxalgo/vela-ui/card';\n\nconst card = createCard();\nhost.append(card.el);"
|
|
765
|
+
},
|
|
565
766
|
{
|
|
566
767
|
"name": "checkbox",
|
|
567
768
|
"import": "@luxalgo/vela-ui/checkbox",
|
|
@@ -678,6 +879,124 @@
|
|
|
678
879
|
],
|
|
679
880
|
"example": "import { createCheckbox } from '@luxalgo/vela-ui/checkbox';\n\nconst checkbox = createCheckbox();\nhost.append(checkbox.el);"
|
|
680
881
|
},
|
|
882
|
+
{
|
|
883
|
+
"name": "collapsible",
|
|
884
|
+
"import": "@luxalgo/vela-ui/collapsible",
|
|
885
|
+
"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.",
|
|
886
|
+
"component": "collapsible",
|
|
887
|
+
"declaration": "collapsibleDef",
|
|
888
|
+
"parts": {
|
|
889
|
+
"root": "collapsible",
|
|
890
|
+
"trigger": "collapsible-trigger",
|
|
891
|
+
"icon": "collapsible-icon",
|
|
892
|
+
"title": "collapsible-title",
|
|
893
|
+
"count": "collapsible-count",
|
|
894
|
+
"chevron": "collapsible-chevron",
|
|
895
|
+
"content": "collapsible-content"
|
|
896
|
+
},
|
|
897
|
+
"settings": {
|
|
898
|
+
"trigger-height": {
|
|
899
|
+
"default": "36px"
|
|
900
|
+
},
|
|
901
|
+
"radius": {
|
|
902
|
+
"default": "var(--vela-radius-md)",
|
|
903
|
+
"token": "radius-md"
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"variants": {
|
|
907
|
+
"variant": [
|
|
908
|
+
"default",
|
|
909
|
+
"label"
|
|
910
|
+
]
|
|
911
|
+
},
|
|
912
|
+
"factory": "createCollapsible",
|
|
913
|
+
"returns": "CollapsibleHandle",
|
|
914
|
+
"propsType": "CollapsibleProps",
|
|
915
|
+
"props": [
|
|
916
|
+
{
|
|
917
|
+
"name": "title",
|
|
918
|
+
"type": "string",
|
|
919
|
+
"required": false,
|
|
920
|
+
"doc": "The header's text. Without `trigger`, the collapsible draws its header with it."
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"name": "count",
|
|
924
|
+
"type": "string | number",
|
|
925
|
+
"required": false,
|
|
926
|
+
"doc": "After the title, muted: a count, a total. Null shows none."
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "icon",
|
|
930
|
+
"type": "string",
|
|
931
|
+
"required": false,
|
|
932
|
+
"doc": "Icon id from the kit's registry, before the title."
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "trigger",
|
|
936
|
+
"type": "HTMLElement",
|
|
937
|
+
"required": false,
|
|
938
|
+
"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."
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"name": "content",
|
|
942
|
+
"type": "Node | ((content: HTMLElement) => void)",
|
|
943
|
+
"required": false,
|
|
944
|
+
"doc": "The content, or a function that fills the content element."
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"name": "defaultOpen",
|
|
948
|
+
"type": "boolean",
|
|
949
|
+
"required": false,
|
|
950
|
+
"doc": "Open when created (default closed)."
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"name": "onOpenChange",
|
|
954
|
+
"type": "(open: boolean) => void",
|
|
955
|
+
"required": false,
|
|
956
|
+
"doc": "Opened or closed by the user."
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
"name": "disabled",
|
|
960
|
+
"type": "boolean",
|
|
961
|
+
"required": false
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"name": "className",
|
|
965
|
+
"type": "string",
|
|
966
|
+
"required": false,
|
|
967
|
+
"doc": "Extra class names (layout hooks)."
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "variant",
|
|
971
|
+
"type": "\"default\" | \"label\"",
|
|
972
|
+
"required": false
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
"exports": [
|
|
976
|
+
"collapsibleDef",
|
|
977
|
+
"collapsibleVariants",
|
|
978
|
+
"CollapsibleVariant",
|
|
979
|
+
"CollapsibleProps",
|
|
980
|
+
"CollapsibleHandle",
|
|
981
|
+
"createCollapsible"
|
|
982
|
+
],
|
|
983
|
+
"tokens": [
|
|
984
|
+
"dur-fast",
|
|
985
|
+
"dur-med",
|
|
986
|
+
"fg",
|
|
987
|
+
"fg-bright",
|
|
988
|
+
"fg-faint",
|
|
989
|
+
"fg-muted",
|
|
990
|
+
"focus",
|
|
991
|
+
"hover",
|
|
992
|
+
"radius-md"
|
|
993
|
+
],
|
|
994
|
+
"attributes": [
|
|
995
|
+
"data-disabled",
|
|
996
|
+
"data-state"
|
|
997
|
+
],
|
|
998
|
+
"example": "import { createCollapsible } from '@luxalgo/vela-ui/collapsible';\n\nconst collapsible = createCollapsible();\nhost.append(collapsible.el);"
|
|
999
|
+
},
|
|
681
1000
|
{
|
|
682
1001
|
"name": "color-picker",
|
|
683
1002
|
"import": "@luxalgo/vela-ui/color-picker",
|
|
@@ -1203,6 +1522,12 @@
|
|
|
1203
1522
|
"required": false,
|
|
1204
1523
|
"doc": "Close when the backdrop itself is pressed (not when a portaled popover is)."
|
|
1205
1524
|
},
|
|
1525
|
+
{
|
|
1526
|
+
"name": "i18n",
|
|
1527
|
+
"type": "Translator",
|
|
1528
|
+
"required": false,
|
|
1529
|
+
"doc": "The translator of the close button's name (\"Close\"). Default: the kit build's, else English."
|
|
1530
|
+
},
|
|
1206
1531
|
{
|
|
1207
1532
|
"name": "modal",
|
|
1208
1533
|
"type": "boolean",
|
|
@@ -1626,9 +1951,6 @@
|
|
|
1626
1951
|
"createDropdownMenu"
|
|
1627
1952
|
],
|
|
1628
1953
|
"tokens": [
|
|
1629
|
-
"accent",
|
|
1630
|
-
"accent-bright",
|
|
1631
|
-
"bg",
|
|
1632
1954
|
"border",
|
|
1633
1955
|
"border-soft",
|
|
1634
1956
|
"border-strong",
|
|
@@ -1645,6 +1967,8 @@
|
|
|
1645
1967
|
"hover-strong",
|
|
1646
1968
|
"radius-md",
|
|
1647
1969
|
"radius-sm",
|
|
1970
|
+
"selected-bg",
|
|
1971
|
+
"selected-fg",
|
|
1648
1972
|
"shadow",
|
|
1649
1973
|
"surface",
|
|
1650
1974
|
"surface-overlay",
|
|
@@ -2281,46 +2605,198 @@
|
|
|
2281
2605
|
"example": "import { createInput } from '@luxalgo/vela-ui/input';\n\nconst input = createInput();\nhost.append(input.el);"
|
|
2282
2606
|
},
|
|
2283
2607
|
{
|
|
2284
|
-
"name": "
|
|
2285
|
-
"import": "@luxalgo/vela-ui/
|
|
2286
|
-
"description": "
|
|
2287
|
-
"component": "
|
|
2288
|
-
"declaration": "
|
|
2608
|
+
"name": "item",
|
|
2609
|
+
"import": "@luxalgo/vela-ui/item",
|
|
2610
|
+
"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`.",
|
|
2611
|
+
"component": "item",
|
|
2612
|
+
"declaration": "itemDef",
|
|
2289
2613
|
"parts": {
|
|
2290
|
-
"root": "
|
|
2614
|
+
"root": "item",
|
|
2615
|
+
"media": "item-media",
|
|
2616
|
+
"content": "item-content",
|
|
2617
|
+
"title": "item-title",
|
|
2618
|
+
"description": "item-description",
|
|
2619
|
+
"meta": "item-meta",
|
|
2620
|
+
"actions": "item-actions",
|
|
2621
|
+
"group": "item-group"
|
|
2291
2622
|
},
|
|
2292
2623
|
"settings": {
|
|
2293
2624
|
"radius": {
|
|
2294
|
-
"default": "
|
|
2625
|
+
"default": "var(--vela-radius-md)",
|
|
2626
|
+
"token": "radius-md"
|
|
2295
2627
|
},
|
|
2296
|
-
"
|
|
2297
|
-
"default": "
|
|
2628
|
+
"gap": {
|
|
2629
|
+
"default": "10px"
|
|
2298
2630
|
}
|
|
2299
2631
|
},
|
|
2300
|
-
"
|
|
2301
|
-
|
|
2302
|
-
|
|
2632
|
+
"variants": {
|
|
2633
|
+
"variant": [
|
|
2634
|
+
"default",
|
|
2635
|
+
"outline",
|
|
2636
|
+
"muted"
|
|
2637
|
+
],
|
|
2638
|
+
"size": [
|
|
2639
|
+
"default",
|
|
2640
|
+
"sm"
|
|
2641
|
+
]
|
|
2642
|
+
},
|
|
2643
|
+
"factory": "createItem",
|
|
2644
|
+
"returns": "ItemHandle",
|
|
2645
|
+
"propsType": "ItemProps",
|
|
2303
2646
|
"props": [
|
|
2304
2647
|
{
|
|
2305
|
-
"name": "
|
|
2306
|
-
"type": "string",
|
|
2648
|
+
"name": "title",
|
|
2649
|
+
"type": "string | Node",
|
|
2307
2650
|
"required": true,
|
|
2308
|
-
"doc": "The
|
|
2651
|
+
"doc": "The first line: text, or an element (a ticker with a chip after it)."
|
|
2309
2652
|
},
|
|
2310
2653
|
{
|
|
2311
|
-
"name": "
|
|
2312
|
-
"type": "string",
|
|
2654
|
+
"name": "description",
|
|
2655
|
+
"type": "string | Node",
|
|
2313
2656
|
"required": false,
|
|
2314
|
-
"doc": "
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2657
|
+
"doc": "The muted line under the title."
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"name": "media",
|
|
2661
|
+
"type": "string | Node",
|
|
2662
|
+
"required": false,
|
|
2663
|
+
"doc": "Before the text: an icon id from the kit's registry, or an element (a logo, an avatar, a favorite star)."
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
"name": "meta",
|
|
2667
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
2668
|
+
"required": false,
|
|
2669
|
+
"doc": "After the text, always shown: figures and badges (a price and its change)."
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
"name": "actions",
|
|
2673
|
+
"type": "string | number | false | Node | readonly Child[]",
|
|
2674
|
+
"required": false,
|
|
2675
|
+
"doc": "At the row's end: its buttons."
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"name": "revealActions",
|
|
2679
|
+
"type": "boolean",
|
|
2680
|
+
"required": false,
|
|
2681
|
+
"doc": "Show the actions only while the row is hovered or holds focus (on touch screens they always show). The meta stays."
|
|
2682
|
+
},
|
|
2683
|
+
{
|
|
2684
|
+
"name": "selected",
|
|
2685
|
+
"type": "boolean",
|
|
2686
|
+
"required": false,
|
|
2687
|
+
"doc": "The current row (the open symbol, the highlighted result)."
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
"name": "disabled",
|
|
2691
|
+
"type": "boolean",
|
|
2692
|
+
"required": false
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
"name": "onSelect",
|
|
2696
|
+
"type": "(e: MouseEvent | KeyboardEvent) => void",
|
|
2697
|
+
"required": false,
|
|
2698
|
+
"doc": "Makes the row clickable: a click, Enter or Space runs it."
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
"name": "role",
|
|
2702
|
+
"type": "string",
|
|
2703
|
+
"required": false,
|
|
2704
|
+
"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`."
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"name": "className",
|
|
2708
|
+
"type": "string",
|
|
2709
|
+
"required": false,
|
|
2710
|
+
"doc": "Extra class names (layout hooks)."
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"name": "variant",
|
|
2714
|
+
"type": "\"default\" | \"outline\" | \"muted\"",
|
|
2715
|
+
"required": false
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"name": "size",
|
|
2719
|
+
"type": "\"default\" | \"sm\"",
|
|
2720
|
+
"required": false
|
|
2721
|
+
}
|
|
2722
|
+
],
|
|
2723
|
+
"exports": [
|
|
2724
|
+
"itemDef",
|
|
2725
|
+
"itemVariants",
|
|
2726
|
+
"ItemVariant",
|
|
2727
|
+
"ItemSize",
|
|
2728
|
+
"ItemProps",
|
|
2729
|
+
"ItemHandle",
|
|
2730
|
+
"ItemGroupProps",
|
|
2731
|
+
"ItemGroupHandle",
|
|
2732
|
+
"createItem",
|
|
2733
|
+
"createItemGroup"
|
|
2734
|
+
],
|
|
2735
|
+
"tokens": [
|
|
2736
|
+
"active",
|
|
2737
|
+
"border",
|
|
2738
|
+
"border-faint",
|
|
2739
|
+
"dur-fast",
|
|
2740
|
+
"fg",
|
|
2741
|
+
"fg-bright",
|
|
2742
|
+
"fg-muted",
|
|
2743
|
+
"focus",
|
|
2744
|
+
"hover",
|
|
2745
|
+
"radius-md",
|
|
2746
|
+
"radius-sm",
|
|
2747
|
+
"surface-sunken"
|
|
2748
|
+
],
|
|
2749
|
+
"attributes": [
|
|
2750
|
+
"data-clickable",
|
|
2751
|
+
"data-disabled",
|
|
2752
|
+
"data-icon",
|
|
2753
|
+
"data-reveal-actions",
|
|
2754
|
+
"data-selected",
|
|
2755
|
+
"data-separated"
|
|
2756
|
+
],
|
|
2757
|
+
"example": "import { createItem } from '@luxalgo/vela-ui/item';\n\nconst item = createItem({ title: /* string | Node */ });\nhost.append(item.el);"
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
"name": "kbd",
|
|
2761
|
+
"import": "@luxalgo/vela-ui/kbd",
|
|
2762
|
+
"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.",
|
|
2763
|
+
"component": "kbd",
|
|
2764
|
+
"declaration": "kbdDef",
|
|
2765
|
+
"parts": {
|
|
2766
|
+
"root": "kbd"
|
|
2767
|
+
},
|
|
2768
|
+
"settings": {
|
|
2769
|
+
"radius": {
|
|
2770
|
+
"default": "5px"
|
|
2771
|
+
},
|
|
2772
|
+
"shadow": {
|
|
2773
|
+
"default": "`inset 0 -1px 0 ${t.border}`"
|
|
2774
|
+
}
|
|
2775
|
+
},
|
|
2776
|
+
"factory": "createKbd",
|
|
2777
|
+
"returns": "KbdHandle",
|
|
2778
|
+
"propsType": "KbdProps",
|
|
2779
|
+
"props": [
|
|
2780
|
+
{
|
|
2781
|
+
"name": "text",
|
|
2782
|
+
"type": "string",
|
|
2783
|
+
"required": true,
|
|
2784
|
+
"doc": "The key's label (`Alt`, `⌘`, `K`)."
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
"name": "className",
|
|
2788
|
+
"type": "string",
|
|
2789
|
+
"required": false,
|
|
2790
|
+
"doc": "Extra class names (layout hooks)."
|
|
2791
|
+
}
|
|
2792
|
+
],
|
|
2793
|
+
"exports": [
|
|
2794
|
+
"kbdDef",
|
|
2795
|
+
"KbdProps",
|
|
2796
|
+
"KbdHandle",
|
|
2797
|
+
"createKbd",
|
|
2798
|
+
"shortcutKeys"
|
|
2799
|
+
],
|
|
2324
2800
|
"tokens": [
|
|
2325
2801
|
"border",
|
|
2326
2802
|
"fg-bright",
|
|
@@ -2432,6 +2908,111 @@
|
|
|
2432
2908
|
],
|
|
2433
2909
|
"example": "import { createLineChart } from '@luxalgo/vela-ui/line-chart';\n\nconst lineChart = createLineChart();\nhost.append(lineChart.el);"
|
|
2434
2910
|
},
|
|
2911
|
+
{
|
|
2912
|
+
"name": "month-grid",
|
|
2913
|
+
"import": "@luxalgo/vela-ui/month-grid",
|
|
2914
|
+
"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).",
|
|
2915
|
+
"component": "month-grid",
|
|
2916
|
+
"declaration": "monthGridDef",
|
|
2917
|
+
"parts": {
|
|
2918
|
+
"root": "month-grid",
|
|
2919
|
+
"weekday": "month-grid-weekday",
|
|
2920
|
+
"day": "month-grid-day",
|
|
2921
|
+
"date": "month-grid-date",
|
|
2922
|
+
"value": "month-grid-value",
|
|
2923
|
+
"detail": "month-grid-detail",
|
|
2924
|
+
"blank": "month-grid-blank"
|
|
2925
|
+
},
|
|
2926
|
+
"settings": {
|
|
2927
|
+
"radius": {
|
|
2928
|
+
"default": "8px"
|
|
2929
|
+
},
|
|
2930
|
+
"day-height": {
|
|
2931
|
+
"default": "56px"
|
|
2932
|
+
},
|
|
2933
|
+
"gap": {
|
|
2934
|
+
"default": "4px"
|
|
2935
|
+
},
|
|
2936
|
+
"selected-ring": {
|
|
2937
|
+
"default": "`inset 0 0 0 1px ${t.selected.bg}`"
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
"factory": "createMonthGrid",
|
|
2941
|
+
"returns": "MonthGridHandle",
|
|
2942
|
+
"propsType": "MonthGridProps",
|
|
2943
|
+
"props": [
|
|
2944
|
+
{
|
|
2945
|
+
"name": "month",
|
|
2946
|
+
"type": "string",
|
|
2947
|
+
"required": true,
|
|
2948
|
+
"doc": "The month shown (`2026-11`)."
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"name": "days",
|
|
2952
|
+
"type": "Readonly<Record<string, MonthGridDay>>",
|
|
2953
|
+
"required": false,
|
|
2954
|
+
"doc": "The days with something to show, by date (`2026-11-06`)."
|
|
2955
|
+
},
|
|
2956
|
+
{
|
|
2957
|
+
"name": "selected",
|
|
2958
|
+
"type": "string",
|
|
2959
|
+
"required": false,
|
|
2960
|
+
"doc": "The selected day (`2026-11-06`), ringed."
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
"name": "today",
|
|
2964
|
+
"type": "string",
|
|
2965
|
+
"required": false,
|
|
2966
|
+
"doc": "Today (`2026-11-06`), its date bright and bold."
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"name": "onSelect",
|
|
2970
|
+
"type": "(date: string) => void",
|
|
2971
|
+
"required": false,
|
|
2972
|
+
"doc": "A day was chosen: a click, Enter or Space. Without it the days are not buttons."
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"name": "i18n",
|
|
2976
|
+
"type": "Translator",
|
|
2977
|
+
"required": false,
|
|
2978
|
+
"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."
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
"name": "className",
|
|
2982
|
+
"type": "string",
|
|
2983
|
+
"required": false,
|
|
2984
|
+
"doc": "Extra class names (layout hooks)."
|
|
2985
|
+
}
|
|
2986
|
+
],
|
|
2987
|
+
"exports": [
|
|
2988
|
+
"monthGridDef",
|
|
2989
|
+
"MonthGridTone",
|
|
2990
|
+
"MonthGridDay",
|
|
2991
|
+
"MonthGridProps",
|
|
2992
|
+
"MonthGridHandle",
|
|
2993
|
+
"createMonthGrid"
|
|
2994
|
+
],
|
|
2995
|
+
"tokens": [
|
|
2996
|
+
"border",
|
|
2997
|
+
"border-faint",
|
|
2998
|
+
"border-strong",
|
|
2999
|
+
"dur-fast",
|
|
3000
|
+
"fg-bright",
|
|
3001
|
+
"fg-muted",
|
|
3002
|
+
"focus",
|
|
3003
|
+
"hover",
|
|
3004
|
+
"loss",
|
|
3005
|
+
"profit",
|
|
3006
|
+
"selected-bg"
|
|
3007
|
+
],
|
|
3008
|
+
"attributes": [
|
|
3009
|
+
"data-checked",
|
|
3010
|
+
"data-date",
|
|
3011
|
+
"data-today",
|
|
3012
|
+
"data-tone"
|
|
3013
|
+
],
|
|
3014
|
+
"example": "import { createMonthGrid } from '@luxalgo/vela-ui/month-grid';\n\nconst monthGrid = createMonthGrid({ month: /* string */ });\nhost.append(monthGrid.el);"
|
|
3015
|
+
},
|
|
2435
3016
|
{
|
|
2436
3017
|
"name": "number-input",
|
|
2437
3018
|
"import": "@luxalgo/vela-ui/number-input",
|
|
@@ -3073,54 +3654,295 @@
|
|
|
3073
3654
|
"example": "import { createSelect } from '@luxalgo/vela-ui/select';\n\nconst select = createSelect({ options: /* readonly SelectOption[] */ });\nhost.append(select.el);"
|
|
3074
3655
|
},
|
|
3075
3656
|
{
|
|
3076
|
-
"name": "
|
|
3077
|
-
"import": "@luxalgo/vela-ui/
|
|
3078
|
-
"description": "
|
|
3079
|
-
"component": "
|
|
3080
|
-
"declaration": "
|
|
3657
|
+
"name": "slider",
|
|
3658
|
+
"import": "@luxalgo/vela-ui/slider",
|
|
3659
|
+
"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.",
|
|
3660
|
+
"component": "slider",
|
|
3661
|
+
"declaration": "sliderDef",
|
|
3081
3662
|
"parts": {
|
|
3082
|
-
"root": "
|
|
3083
|
-
"
|
|
3084
|
-
"
|
|
3085
|
-
"
|
|
3663
|
+
"root": "slider",
|
|
3664
|
+
"control": "slider-control",
|
|
3665
|
+
"track": "slider-track",
|
|
3666
|
+
"range": "slider-range",
|
|
3667
|
+
"thumb": "slider-thumb"
|
|
3086
3668
|
},
|
|
3087
3669
|
"settings": {
|
|
3088
|
-
"
|
|
3089
|
-
"default": "
|
|
3670
|
+
"track-height": {
|
|
3671
|
+
"default": "4px"
|
|
3672
|
+
},
|
|
3673
|
+
"thumb-size": {
|
|
3674
|
+
"default": "14px"
|
|
3675
|
+
},
|
|
3676
|
+
"radius": {
|
|
3677
|
+
"default": "999px"
|
|
3678
|
+
},
|
|
3679
|
+
"focus-ring": {
|
|
3680
|
+
"default": "`0 0 0 3px ${t.focus.soft}`"
|
|
3090
3681
|
}
|
|
3091
3682
|
},
|
|
3092
|
-
"factory": "
|
|
3093
|
-
"returns": "
|
|
3094
|
-
"propsType": "
|
|
3683
|
+
"factory": "createSlider",
|
|
3684
|
+
"returns": "SliderHandle",
|
|
3685
|
+
"propsType": "SliderProps",
|
|
3095
3686
|
"props": [
|
|
3096
3687
|
{
|
|
3097
|
-
"name": "
|
|
3098
|
-
"type": "
|
|
3099
|
-
"required":
|
|
3688
|
+
"name": "defaultValue",
|
|
3689
|
+
"type": "number",
|
|
3690
|
+
"required": false,
|
|
3691
|
+
"doc": "The value it starts with (default `min`)."
|
|
3100
3692
|
},
|
|
3101
3693
|
{
|
|
3102
|
-
"name": "
|
|
3694
|
+
"name": "min",
|
|
3103
3695
|
"type": "number",
|
|
3104
3696
|
"required": false,
|
|
3105
|
-
"doc": "
|
|
3697
|
+
"doc": "Default 0."
|
|
3106
3698
|
},
|
|
3107
3699
|
{
|
|
3108
|
-
"name": "
|
|
3700
|
+
"name": "max",
|
|
3109
3701
|
"type": "number",
|
|
3110
|
-
"required": false
|
|
3702
|
+
"required": false,
|
|
3703
|
+
"doc": "Default 100."
|
|
3111
3704
|
},
|
|
3112
3705
|
{
|
|
3113
|
-
"name": "
|
|
3706
|
+
"name": "step",
|
|
3707
|
+
"type": "number",
|
|
3708
|
+
"required": false,
|
|
3709
|
+
"doc": "Default 1."
|
|
3710
|
+
},
|
|
3711
|
+
{
|
|
3712
|
+
"name": "onValueChange",
|
|
3713
|
+
"type": "(value: number) => void",
|
|
3714
|
+
"required": false,
|
|
3715
|
+
"doc": "Every move: while dragging, and on each key."
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
"name": "onValueCommit",
|
|
3719
|
+
"type": "(value: number) => void",
|
|
3720
|
+
"required": false,
|
|
3721
|
+
"doc": "Once a move settles: the pointer lifted, or a key pressed."
|
|
3722
|
+
},
|
|
3723
|
+
{
|
|
3724
|
+
"name": "label",
|
|
3725
|
+
"type": "string",
|
|
3726
|
+
"required": false,
|
|
3727
|
+
"doc": "Its accessible name, when no `<label>` names it."
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"name": "valueText",
|
|
3731
|
+
"type": "(value: number) => string",
|
|
3732
|
+
"required": false,
|
|
3733
|
+
"doc": "What a screen reader says for a value (`11 Jun 2024`, `35%`). Default: the number."
|
|
3734
|
+
},
|
|
3735
|
+
{
|
|
3736
|
+
"name": "orientation",
|
|
3737
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
3738
|
+
"required": false,
|
|
3739
|
+
"doc": "Default `horizontal`. A vertical slider takes its height from its parent."
|
|
3740
|
+
},
|
|
3741
|
+
{
|
|
3742
|
+
"name": "dir",
|
|
3743
|
+
"type": "\"ltr\" | \"rtl\"",
|
|
3744
|
+
"required": false,
|
|
3745
|
+
"doc": "The text direction the keys and the track follow (default `ltr`)."
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"name": "disabled",
|
|
3114
3749
|
"type": "boolean",
|
|
3750
|
+
"required": false
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "name",
|
|
3754
|
+
"type": "string",
|
|
3115
3755
|
"required": false,
|
|
3116
|
-
"doc": "
|
|
3756
|
+
"doc": "Submitted with its form under this name."
|
|
3117
3757
|
},
|
|
3118
3758
|
{
|
|
3119
|
-
"name": "
|
|
3120
|
-
"type": "
|
|
3759
|
+
"name": "id",
|
|
3760
|
+
"type": "string",
|
|
3121
3761
|
"required": false,
|
|
3122
|
-
"doc": "
|
|
3123
|
-
}
|
|
3762
|
+
"doc": "The id of its thumb, so a `<label for>` reaches it."
|
|
3763
|
+
},
|
|
3764
|
+
{
|
|
3765
|
+
"name": "className",
|
|
3766
|
+
"type": "string",
|
|
3767
|
+
"required": false,
|
|
3768
|
+
"doc": "Extra class names (layout hooks)."
|
|
3769
|
+
}
|
|
3770
|
+
],
|
|
3771
|
+
"exports": [
|
|
3772
|
+
"sliderDef",
|
|
3773
|
+
"SliderProps",
|
|
3774
|
+
"SliderHandle",
|
|
3775
|
+
"createSlider"
|
|
3776
|
+
],
|
|
3777
|
+
"tokens": [
|
|
3778
|
+
"bg",
|
|
3779
|
+
"border",
|
|
3780
|
+
"dur-fast",
|
|
3781
|
+
"focus-soft",
|
|
3782
|
+
"selected-bg"
|
|
3783
|
+
],
|
|
3784
|
+
"attributes": [
|
|
3785
|
+
"data-disabled",
|
|
3786
|
+
"data-orientation"
|
|
3787
|
+
],
|
|
3788
|
+
"example": "import { createSlider } from '@luxalgo/vela-ui/slider';\n\nconst slider = createSlider();\nhost.append(slider.el);"
|
|
3789
|
+
},
|
|
3790
|
+
{
|
|
3791
|
+
"name": "sort-button",
|
|
3792
|
+
"import": "@luxalgo/vela-ui/sort-button",
|
|
3793
|
+
"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)`.",
|
|
3794
|
+
"component": "sort-button",
|
|
3795
|
+
"declaration": "sortButtonDef",
|
|
3796
|
+
"parts": {
|
|
3797
|
+
"root": "sort-button",
|
|
3798
|
+
"icon": "sort-button-icon",
|
|
3799
|
+
"state": "sort-button-state"
|
|
3800
|
+
},
|
|
3801
|
+
"settings": {
|
|
3802
|
+
"radius": {
|
|
3803
|
+
"default": "var(--vela-radius-sm)",
|
|
3804
|
+
"token": "radius-sm"
|
|
3805
|
+
}
|
|
3806
|
+
},
|
|
3807
|
+
"variants": {
|
|
3808
|
+
"align": [
|
|
3809
|
+
"start",
|
|
3810
|
+
"end"
|
|
3811
|
+
]
|
|
3812
|
+
},
|
|
3813
|
+
"factory": "createSortButton",
|
|
3814
|
+
"returns": "SortButtonHandle",
|
|
3815
|
+
"propsType": "SortButtonProps",
|
|
3816
|
+
"props": [
|
|
3817
|
+
{
|
|
3818
|
+
"name": "label",
|
|
3819
|
+
"type": "string",
|
|
3820
|
+
"required": true,
|
|
3821
|
+
"doc": "The column's name."
|
|
3822
|
+
},
|
|
3823
|
+
{
|
|
3824
|
+
"name": "direction",
|
|
3825
|
+
"type": "SortDirection",
|
|
3826
|
+
"required": false,
|
|
3827
|
+
"doc": "The sort it starts with (default none)."
|
|
3828
|
+
},
|
|
3829
|
+
{
|
|
3830
|
+
"name": "firstDirection",
|
|
3831
|
+
"type": "SortDirection",
|
|
3832
|
+
"required": false,
|
|
3833
|
+
"doc": "What the first press sorts by (default `desc`: the largest first)."
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"name": "clearable",
|
|
3837
|
+
"type": "boolean",
|
|
3838
|
+
"required": false,
|
|
3839
|
+
"doc": "A press after both directions clears the sort (default true)."
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
"name": "onSortChange",
|
|
3843
|
+
"type": "(direction: SortDirection | null) => void",
|
|
3844
|
+
"required": false,
|
|
3845
|
+
"doc": "A press changed the sort; null: unsorted."
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
"name": "title",
|
|
3849
|
+
"type": "string",
|
|
3850
|
+
"required": false,
|
|
3851
|
+
"doc": "A tooltip (`Sort by Last`)."
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"name": "disabled",
|
|
3855
|
+
"type": "boolean",
|
|
3856
|
+
"required": false
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
"name": "i18n",
|
|
3860
|
+
"type": "Translator",
|
|
3861
|
+
"required": false,
|
|
3862
|
+
"doc": "The translator of the words a screen reader hears (\"sorted ascending\"). Default: the kit build's, else English."
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
"name": "className",
|
|
3866
|
+
"type": "string",
|
|
3867
|
+
"required": false,
|
|
3868
|
+
"doc": "Extra class names (layout hooks)."
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
"name": "align",
|
|
3872
|
+
"type": "\"start\" | \"end\"",
|
|
3873
|
+
"required": false
|
|
3874
|
+
}
|
|
3875
|
+
],
|
|
3876
|
+
"exports": [
|
|
3877
|
+
"sortButtonDef",
|
|
3878
|
+
"sortButtonVariants",
|
|
3879
|
+
"SortDirection",
|
|
3880
|
+
"SortButtonProps",
|
|
3881
|
+
"SortButtonHandle",
|
|
3882
|
+
"createSortButton"
|
|
3883
|
+
],
|
|
3884
|
+
"tokens": [
|
|
3885
|
+
"dur-fast",
|
|
3886
|
+
"fg-bright",
|
|
3887
|
+
"fg-muted",
|
|
3888
|
+
"focus",
|
|
3889
|
+
"radius-sm"
|
|
3890
|
+
],
|
|
3891
|
+
"attributes": [
|
|
3892
|
+
"data-align",
|
|
3893
|
+
"data-direction"
|
|
3894
|
+
],
|
|
3895
|
+
"example": "import { createSortButton } from '@luxalgo/vela-ui/sort-button';\n\nconst sortButton = createSortButton({ label: /* string */ });\nhost.append(sortButton.el);"
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
"name": "sparkline",
|
|
3899
|
+
"import": "@luxalgo/vela-ui/sparkline",
|
|
3900
|
+
"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).",
|
|
3901
|
+
"component": "sparkline",
|
|
3902
|
+
"declaration": "sparklineDef",
|
|
3903
|
+
"parts": {
|
|
3904
|
+
"root": "sparkline",
|
|
3905
|
+
"area": "sparkline-area",
|
|
3906
|
+
"baseline": "sparkline-baseline",
|
|
3907
|
+
"line": "sparkline-line"
|
|
3908
|
+
},
|
|
3909
|
+
"settings": {
|
|
3910
|
+
"stroke-width": {
|
|
3911
|
+
"default": "1.25"
|
|
3912
|
+
}
|
|
3913
|
+
},
|
|
3914
|
+
"factory": "createSparkline",
|
|
3915
|
+
"returns": "SparklineHandle",
|
|
3916
|
+
"propsType": "SparklineProps",
|
|
3917
|
+
"props": [
|
|
3918
|
+
{
|
|
3919
|
+
"name": "values",
|
|
3920
|
+
"type": "readonly number[]",
|
|
3921
|
+
"required": true
|
|
3922
|
+
},
|
|
3923
|
+
{
|
|
3924
|
+
"name": "width",
|
|
3925
|
+
"type": "number",
|
|
3926
|
+
"required": false,
|
|
3927
|
+
"doc": "px (default 56 × 20)."
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
"name": "height",
|
|
3931
|
+
"type": "number",
|
|
3932
|
+
"required": false
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
"name": "area",
|
|
3936
|
+
"type": "boolean",
|
|
3937
|
+
"required": false,
|
|
3938
|
+
"doc": "A soft area under the line."
|
|
3939
|
+
},
|
|
3940
|
+
{
|
|
3941
|
+
"name": "baseline",
|
|
3942
|
+
"type": "number",
|
|
3943
|
+
"required": false,
|
|
3944
|
+
"doc": "A dotted line at this value; the tone compares the last value with it."
|
|
3945
|
+
}
|
|
3124
3946
|
],
|
|
3125
3947
|
"exports": [
|
|
3126
3948
|
"sparklineDef",
|
|
@@ -3348,7 +4170,7 @@
|
|
|
3348
4170
|
{
|
|
3349
4171
|
"name": "tabs",
|
|
3350
4172
|
"import": "@luxalgo/vela-ui/tabs",
|
|
3351
|
-
"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.",
|
|
4173
|
+
"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).",
|
|
3352
4174
|
"component": "tabs",
|
|
3353
4175
|
"declaration": "tabsDef",
|
|
3354
4176
|
"parts": {
|
|
@@ -3356,6 +4178,8 @@
|
|
|
3356
4178
|
"trigger": "tabs-trigger",
|
|
3357
4179
|
"icon": "tabs-icon",
|
|
3358
4180
|
"count": "tabs-count",
|
|
4181
|
+
"label": "tabs-label",
|
|
4182
|
+
"description": "tabs-description",
|
|
3359
4183
|
"content": "tabs-content"
|
|
3360
4184
|
},
|
|
3361
4185
|
"settings": {
|
|
@@ -3467,6 +4291,7 @@
|
|
|
3467
4291
|
"selected-fg"
|
|
3468
4292
|
],
|
|
3469
4293
|
"attributes": [
|
|
4294
|
+
"data-description",
|
|
3470
4295
|
"data-disabled",
|
|
3471
4296
|
"data-orientation",
|
|
3472
4297
|
"data-selected"
|
|
@@ -3592,6 +4417,256 @@
|
|
|
3592
4417
|
],
|
|
3593
4418
|
"example": "import { createTextArea } from '@luxalgo/vela-ui/text-area';\n\nconst textArea = createTextArea();\nhost.append(textArea.el);"
|
|
3594
4419
|
},
|
|
4420
|
+
{
|
|
4421
|
+
"name": "toast",
|
|
4422
|
+
"import": "@luxalgo/vela-ui/toast",
|
|
4423
|
+
"description": "Toast: short notices that stack in a corner and leave on their own, shaped after shadcn's toast (Sonner). `toast()` raises one from anywhere on the page, with `toast.success`, `.info`, `.warning`, `.error` and `.loading` for its kinds, `toast.promise` for a task's three states and `toast.dismiss` to take one or all away; calling it again with the same `id` updates the toast in place. A toaster shows them: `createToaster` mounts one where the notices belong, over the viewport or contained in a host. The newest toast is in front and the older ones fold behind it; hovering the stack (or Alt+T) spreads it out and pauses the timers, and a toast swipes away towards its edge. Positions name the corner on the writing direction's terms: `bottom-right` sits at the end side, mirrored right to left. The queue is page-wide, so a toast raised by another copy of the kit reaches this toaster.",
|
|
4424
|
+
"component": "toast",
|
|
4425
|
+
"declaration": "toastDef",
|
|
4426
|
+
"parts": {
|
|
4427
|
+
"root": "toast",
|
|
4428
|
+
"list": "toast-list",
|
|
4429
|
+
"item": "toast-item",
|
|
4430
|
+
"close": "toast-close",
|
|
4431
|
+
"icon": "toast-icon",
|
|
4432
|
+
"content": "toast-content",
|
|
4433
|
+
"title": "toast-title",
|
|
4434
|
+
"description": "toast-description",
|
|
4435
|
+
"cancel": "toast-cancel",
|
|
4436
|
+
"action": "toast-action"
|
|
4437
|
+
},
|
|
4438
|
+
"settings": {
|
|
4439
|
+
"width": {
|
|
4440
|
+
"default": "356px"
|
|
4441
|
+
},
|
|
4442
|
+
"radius": {
|
|
4443
|
+
"default": "var(--vela-radius-lg)",
|
|
4444
|
+
"token": "radius-lg"
|
|
4445
|
+
},
|
|
4446
|
+
"background": {
|
|
4447
|
+
"default": "var(--vela-surface-elev)",
|
|
4448
|
+
"token": "surface-elev"
|
|
4449
|
+
},
|
|
4450
|
+
"border": {
|
|
4451
|
+
"default": "var(--vela-border)",
|
|
4452
|
+
"token": "border"
|
|
4453
|
+
},
|
|
4454
|
+
"foreground": {
|
|
4455
|
+
"default": "var(--vela-fg-bright)",
|
|
4456
|
+
"token": "fg-bright"
|
|
4457
|
+
},
|
|
4458
|
+
"description-color": {
|
|
4459
|
+
"default": "var(--vela-fg-muted)",
|
|
4460
|
+
"token": "fg-muted"
|
|
4461
|
+
},
|
|
4462
|
+
"shadow": {
|
|
4463
|
+
"default": "var(--vela-shadow)",
|
|
4464
|
+
"token": "shadow"
|
|
4465
|
+
},
|
|
4466
|
+
"success": {
|
|
4467
|
+
"default": "var(--vela-profit)",
|
|
4468
|
+
"token": "profit"
|
|
4469
|
+
},
|
|
4470
|
+
"info": {
|
|
4471
|
+
"default": "var(--vela-accent)",
|
|
4472
|
+
"token": "accent"
|
|
4473
|
+
},
|
|
4474
|
+
"warning": {
|
|
4475
|
+
"default": "var(--vela-highlight)",
|
|
4476
|
+
"token": "highlight"
|
|
4477
|
+
},
|
|
4478
|
+
"error": {
|
|
4479
|
+
"default": "var(--vela-danger)",
|
|
4480
|
+
"token": "danger"
|
|
4481
|
+
}
|
|
4482
|
+
},
|
|
4483
|
+
"factory": "createToaster",
|
|
4484
|
+
"returns": "ToasterHandle",
|
|
4485
|
+
"propsType": "ToasterProps",
|
|
4486
|
+
"props": [
|
|
4487
|
+
{
|
|
4488
|
+
"name": "host",
|
|
4489
|
+
"type": "HTMLElement",
|
|
4490
|
+
"required": false,
|
|
4491
|
+
"doc": "Where the toaster mounts (default the document's body)."
|
|
4492
|
+
},
|
|
4493
|
+
{
|
|
4494
|
+
"name": "contained",
|
|
4495
|
+
"type": "boolean",
|
|
4496
|
+
"required": false,
|
|
4497
|
+
"doc": "Stack in the host's corners instead of the viewport's; the host must be positioned."
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
"name": "position",
|
|
4501
|
+
"type": "ToasterPosition",
|
|
4502
|
+
"required": false,
|
|
4503
|
+
"doc": "The corner the toasts stack in (default `bottom-right`)."
|
|
4504
|
+
},
|
|
4505
|
+
{
|
|
4506
|
+
"name": "expand",
|
|
4507
|
+
"type": "boolean",
|
|
4508
|
+
"required": false,
|
|
4509
|
+
"doc": "Keep the stack spread out instead of folding the older toasts behind the newest."
|
|
4510
|
+
},
|
|
4511
|
+
{
|
|
4512
|
+
"name": "richColors",
|
|
4513
|
+
"type": "boolean",
|
|
4514
|
+
"required": false,
|
|
4515
|
+
"doc": "Tint each toast with its kind's color."
|
|
4516
|
+
},
|
|
4517
|
+
{
|
|
4518
|
+
"name": "closeButton",
|
|
4519
|
+
"type": "boolean",
|
|
4520
|
+
"required": false,
|
|
4521
|
+
"doc": "A close button on every toast."
|
|
4522
|
+
},
|
|
4523
|
+
{
|
|
4524
|
+
"name": "invert",
|
|
4525
|
+
"type": "boolean",
|
|
4526
|
+
"required": false,
|
|
4527
|
+
"doc": "Swap the toasts' background and text colors."
|
|
4528
|
+
},
|
|
4529
|
+
{
|
|
4530
|
+
"name": "duration",
|
|
4531
|
+
"type": "number",
|
|
4532
|
+
"required": false,
|
|
4533
|
+
"doc": "How long a toast stays, in milliseconds (default 4000)."
|
|
4534
|
+
},
|
|
4535
|
+
{
|
|
4536
|
+
"name": "gap",
|
|
4537
|
+
"type": "number",
|
|
4538
|
+
"required": false,
|
|
4539
|
+
"doc": "Space between spread toasts, in pixels (default 14)."
|
|
4540
|
+
},
|
|
4541
|
+
{
|
|
4542
|
+
"name": "visibleToasts",
|
|
4543
|
+
"type": "number",
|
|
4544
|
+
"required": false,
|
|
4545
|
+
"doc": "How many toasts show at once (default 3)."
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
"name": "offset",
|
|
4549
|
+
"type": "ToastOffset",
|
|
4550
|
+
"required": false,
|
|
4551
|
+
"doc": "Distance from the edges: one value, or one per side (default 24px, 16px contained)."
|
|
4552
|
+
},
|
|
4553
|
+
{
|
|
4554
|
+
"name": "hotkey",
|
|
4555
|
+
"type": "string[]",
|
|
4556
|
+
"required": false,
|
|
4557
|
+
"doc": "The keys that spread the stack and focus it: event flags and codes (default `['altKey', 'KeyT']`)."
|
|
4558
|
+
},
|
|
4559
|
+
{
|
|
4560
|
+
"name": "dir",
|
|
4561
|
+
"type": "\"ltr\" | \"rtl\" | \"auto\"",
|
|
4562
|
+
"required": false,
|
|
4563
|
+
"doc": "The writing direction of the toasts (default the page's)."
|
|
4564
|
+
},
|
|
4565
|
+
{
|
|
4566
|
+
"name": "swipeDirections",
|
|
4567
|
+
"type": "SwipeDirection[]",
|
|
4568
|
+
"required": false,
|
|
4569
|
+
"doc": "Swipe directions that close a toast (default its corner's edges)."
|
|
4570
|
+
},
|
|
4571
|
+
{
|
|
4572
|
+
"name": "icons",
|
|
4573
|
+
"type": "Partial<Record<\"success\" | \"info\" | \"warning\" | \"error\" | \"loading\" | \"close\", string | Node>>",
|
|
4574
|
+
"required": false,
|
|
4575
|
+
"doc": "Icons in place of the kinds' own: registry ids or elements."
|
|
4576
|
+
},
|
|
4577
|
+
{
|
|
4578
|
+
"name": "toastOptions",
|
|
4579
|
+
"type": "Pick<ExternalToast, \"className\" | \"duration\" | \"closeButton\" | \"richColors\" | \"invert\" | \"dismissible\">",
|
|
4580
|
+
"required": false,
|
|
4581
|
+
"doc": "Defaults for every toast of this toaster."
|
|
4582
|
+
},
|
|
4583
|
+
{
|
|
4584
|
+
"name": "containerAriaLabel",
|
|
4585
|
+
"type": "string",
|
|
4586
|
+
"required": false,
|
|
4587
|
+
"doc": "The region's accessible name (default \"Notifications\")."
|
|
4588
|
+
},
|
|
4589
|
+
{
|
|
4590
|
+
"name": "id",
|
|
4591
|
+
"type": "string",
|
|
4592
|
+
"required": false,
|
|
4593
|
+
"doc": "Name the toaster, to show only the toasts raised with this `toasterId`."
|
|
4594
|
+
},
|
|
4595
|
+
{
|
|
4596
|
+
"name": "theme",
|
|
4597
|
+
"type": "UiTheme | ThemedChart",
|
|
4598
|
+
"required": false,
|
|
4599
|
+
"doc": "A kit theme, for a toaster mounted outside a themed host."
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
"name": "i18n",
|
|
4603
|
+
"type": "Translator",
|
|
4604
|
+
"required": false,
|
|
4605
|
+
"doc": "Translates the close button's and the region's names (default the kit's)."
|
|
4606
|
+
},
|
|
4607
|
+
{
|
|
4608
|
+
"name": "className",
|
|
4609
|
+
"type": "string",
|
|
4610
|
+
"required": false,
|
|
4611
|
+
"doc": "Extra class names on the region (layout hooks)."
|
|
4612
|
+
}
|
|
4613
|
+
],
|
|
4614
|
+
"exports": [
|
|
4615
|
+
"toastDef",
|
|
4616
|
+
"ToastType",
|
|
4617
|
+
"ToasterPosition",
|
|
4618
|
+
"SwipeDirection",
|
|
4619
|
+
"ToastId",
|
|
4620
|
+
"ToastContent",
|
|
4621
|
+
"ToastAction",
|
|
4622
|
+
"ExternalToast",
|
|
4623
|
+
"ToastT",
|
|
4624
|
+
"PromiseSource",
|
|
4625
|
+
"PromiseData",
|
|
4626
|
+
"ToastPromise",
|
|
4627
|
+
"ToastFunction",
|
|
4628
|
+
"toast",
|
|
4629
|
+
"ToastOffset",
|
|
4630
|
+
"ToasterProps",
|
|
4631
|
+
"ToasterHandle",
|
|
4632
|
+
"createToaster"
|
|
4633
|
+
],
|
|
4634
|
+
"tokens": [
|
|
4635
|
+
"accent",
|
|
4636
|
+
"border",
|
|
4637
|
+
"danger",
|
|
4638
|
+
"dur-fast",
|
|
4639
|
+
"dur-med",
|
|
4640
|
+
"ease",
|
|
4641
|
+
"fg-bright",
|
|
4642
|
+
"fg-muted",
|
|
4643
|
+
"focus",
|
|
4644
|
+
"font",
|
|
4645
|
+
"highlight",
|
|
4646
|
+
"profit",
|
|
4647
|
+
"radius-lg",
|
|
4648
|
+
"radius-sm",
|
|
4649
|
+
"shadow",
|
|
4650
|
+
"surface-elev",
|
|
4651
|
+
"surface-overlay",
|
|
4652
|
+
"z-popover"
|
|
4653
|
+
],
|
|
4654
|
+
"attributes": [
|
|
4655
|
+
"data-contained",
|
|
4656
|
+
"data-expanded",
|
|
4657
|
+
"data-front",
|
|
4658
|
+
"data-invert",
|
|
4659
|
+
"data-mounted",
|
|
4660
|
+
"data-removed",
|
|
4661
|
+
"data-rich-colors",
|
|
4662
|
+
"data-swiping",
|
|
4663
|
+
"data-type",
|
|
4664
|
+
"data-visible",
|
|
4665
|
+
"data-x",
|
|
4666
|
+
"data-y"
|
|
4667
|
+
],
|
|
4668
|
+
"example": "import { createToaster } from '@luxalgo/vela-ui/toast';\n\nconst toast = createToaster();\nhost.append(toast.el);"
|
|
4669
|
+
},
|
|
3595
4670
|
{
|
|
3596
4671
|
"name": "toggle-group",
|
|
3597
4672
|
"import": "@luxalgo/vela-ui/toggle-group",
|
|
@@ -3849,6 +4924,202 @@
|
|
|
3849
4924
|
"data-state"
|
|
3850
4925
|
],
|
|
3851
4926
|
"example": "import { createTooltip } from '@luxalgo/vela-ui/tooltip';\n\nconst tooltip = createTooltip({ trigger: /* HTMLElement */, content: /* string | Node | (() => Node) */ });\nhost.append(tooltip.el);"
|
|
4927
|
+
},
|
|
4928
|
+
{
|
|
4929
|
+
"name": "treemap",
|
|
4930
|
+
"import": "@luxalgo/vela-ui/treemap",
|
|
4931
|
+
"description": "Treemap: weighted items laid into a rectangle as tiles close to square, each tinted by its value on a diverging scale (up above zero, down below, stronger as the value grows) and labeled when it has room. Items with children are groups: their tiles share a block headed by the group's name and a figure of its values. With `drill`, a group's header zooms into it and a breadcrumb leads back. Values repaint without a new layout, and a tile keeps its element across layouts, so a resize or a zoom moves it instead of redrawing it.",
|
|
4932
|
+
"component": "treemap",
|
|
4933
|
+
"declaration": "treemapDef",
|
|
4934
|
+
"parts": {
|
|
4935
|
+
"root": "treemap",
|
|
4936
|
+
"crumbs": "treemap-crumbs",
|
|
4937
|
+
"crumb": "treemap-crumb",
|
|
4938
|
+
"map": "treemap-map",
|
|
4939
|
+
"group": "treemap-group",
|
|
4940
|
+
"group-name": "treemap-group-name",
|
|
4941
|
+
"group-value": "treemap-group-value",
|
|
4942
|
+
"tile": "treemap-tile",
|
|
4943
|
+
"tile-label": "treemap-tile-label",
|
|
4944
|
+
"tile-value": "treemap-tile-value",
|
|
4945
|
+
"legend": "treemap-legend",
|
|
4946
|
+
"legend-bar": "treemap-legend-bar",
|
|
4947
|
+
"tip": "treemap-tip"
|
|
4948
|
+
},
|
|
4949
|
+
"settings": {
|
|
4950
|
+
"radius": {
|
|
4951
|
+
"default": "var(--vela-radius-sm)",
|
|
4952
|
+
"token": "radius-sm"
|
|
4953
|
+
},
|
|
4954
|
+
"up": {
|
|
4955
|
+
"default": "var(--vela-up)",
|
|
4956
|
+
"token": "up"
|
|
4957
|
+
},
|
|
4958
|
+
"down": {
|
|
4959
|
+
"default": "var(--vela-down)",
|
|
4960
|
+
"token": "down"
|
|
4961
|
+
},
|
|
4962
|
+
"tile-bg": {
|
|
4963
|
+
"default": "`color-mix(in srgb, ${t.fg.bright} 2.5%, ${t.surface})`"
|
|
4964
|
+
},
|
|
4965
|
+
"tint-min": {
|
|
4966
|
+
"default": "3%"
|
|
4967
|
+
},
|
|
4968
|
+
"tint-max": {
|
|
4969
|
+
"default": "25%"
|
|
4970
|
+
},
|
|
4971
|
+
"hover-z": {
|
|
4972
|
+
"default": "1"
|
|
4973
|
+
},
|
|
4974
|
+
"tip-radius": {
|
|
4975
|
+
"default": "var(--vela-radius-md)",
|
|
4976
|
+
"token": "radius-md"
|
|
4977
|
+
},
|
|
4978
|
+
"tip-bg": {
|
|
4979
|
+
"default": "var(--vela-surface-elev)",
|
|
4980
|
+
"token": "surface-elev"
|
|
4981
|
+
},
|
|
4982
|
+
"tip-shadow": {
|
|
4983
|
+
"default": "var(--vela-shadow)",
|
|
4984
|
+
"token": "shadow"
|
|
4985
|
+
},
|
|
4986
|
+
"tip-z": {
|
|
4987
|
+
"default": "2"
|
|
4988
|
+
}
|
|
4989
|
+
},
|
|
4990
|
+
"factory": "createTreemap",
|
|
4991
|
+
"returns": "TreemapHandle",
|
|
4992
|
+
"propsType": "TreemapProps",
|
|
4993
|
+
"props": [
|
|
4994
|
+
{
|
|
4995
|
+
"name": "items",
|
|
4996
|
+
"type": "readonly TreemapItem[]",
|
|
4997
|
+
"required": false
|
|
4998
|
+
},
|
|
4999
|
+
{
|
|
5000
|
+
"name": "domain",
|
|
5001
|
+
"type": "number",
|
|
5002
|
+
"required": false,
|
|
5003
|
+
"doc": "The size of a value whose tint is full. Default: the largest one on the map."
|
|
5004
|
+
},
|
|
5005
|
+
{
|
|
5006
|
+
"name": "format",
|
|
5007
|
+
"type": "(value: number) => string",
|
|
5008
|
+
"required": false,
|
|
5009
|
+
"doc": "A value as the tiles, the headers, the readout and the legend write it. Default: signed, two decimals."
|
|
5010
|
+
},
|
|
5011
|
+
{
|
|
5012
|
+
"name": "groupValue",
|
|
5013
|
+
"type": "TreemapGroupValue",
|
|
5014
|
+
"required": false,
|
|
5015
|
+
"doc": "A group header's figure (default the median of its items' values)."
|
|
5016
|
+
},
|
|
5017
|
+
{
|
|
5018
|
+
"name": "tip",
|
|
5019
|
+
"type": "false | ((item: TreemapItem, path: readonly TreemapItem[]) => string | Node)",
|
|
5020
|
+
"required": false,
|
|
5021
|
+
"doc": "The readout beside a hovered or focused tile, or `false` for none. Default: its label, value and groups."
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
"name": "onSelect",
|
|
5025
|
+
"type": "(item: TreemapItem, path: readonly TreemapItem[]) => void",
|
|
5026
|
+
"required": false,
|
|
5027
|
+
"doc": "A tile's click, Enter or Space. `path` lists its groups, outermost first."
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
"name": "selected",
|
|
5031
|
+
"type": "string",
|
|
5032
|
+
"required": false,
|
|
5033
|
+
"doc": "The id of the tile drawn as selected."
|
|
5034
|
+
},
|
|
5035
|
+
{
|
|
5036
|
+
"name": "drill",
|
|
5037
|
+
"type": "boolean",
|
|
5038
|
+
"required": false,
|
|
5039
|
+
"doc": "Group headers zoom into their group, and a breadcrumb above the map leads back."
|
|
5040
|
+
},
|
|
5041
|
+
{
|
|
5042
|
+
"name": "onDrill",
|
|
5043
|
+
"type": "(path: readonly TreemapItem[]) => void",
|
|
5044
|
+
"required": false,
|
|
5045
|
+
"doc": "A zoom changed: `path` is the zoomed group's path (empty at the top)."
|
|
5046
|
+
},
|
|
5047
|
+
{
|
|
5048
|
+
"name": "rootLabel",
|
|
5049
|
+
"type": "string",
|
|
5050
|
+
"required": false,
|
|
5051
|
+
"doc": "The breadcrumb's first entry (default \"All\")."
|
|
5052
|
+
},
|
|
5053
|
+
{
|
|
5054
|
+
"name": "legend",
|
|
5055
|
+
"type": "boolean",
|
|
5056
|
+
"required": false,
|
|
5057
|
+
"doc": "A scale under the map, from the negative to the positive domain."
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
"name": "gap",
|
|
5061
|
+
"type": "number",
|
|
5062
|
+
"required": false,
|
|
5063
|
+
"doc": "Space between tiles, in pixels (default 3)."
|
|
5064
|
+
},
|
|
5065
|
+
{
|
|
5066
|
+
"name": "label",
|
|
5067
|
+
"type": "string",
|
|
5068
|
+
"required": false,
|
|
5069
|
+
"doc": "The map's accessible name."
|
|
5070
|
+
},
|
|
5071
|
+
{
|
|
5072
|
+
"name": "i18n",
|
|
5073
|
+
"type": "Translator",
|
|
5074
|
+
"required": false,
|
|
5075
|
+
"doc": "The translator of the treemap's own words. Default: the kit build's, else English."
|
|
5076
|
+
},
|
|
5077
|
+
{
|
|
5078
|
+
"name": "className",
|
|
5079
|
+
"type": "string",
|
|
5080
|
+
"required": false,
|
|
5081
|
+
"doc": "Extra class names (layout hooks)."
|
|
5082
|
+
}
|
|
5083
|
+
],
|
|
5084
|
+
"exports": [
|
|
5085
|
+
"treemapDef",
|
|
5086
|
+
"TreemapItem",
|
|
5087
|
+
"TreemapGroupValue",
|
|
5088
|
+
"TreemapProps",
|
|
5089
|
+
"TreemapHandle",
|
|
5090
|
+
"TreemapRect",
|
|
5091
|
+
"squarify",
|
|
5092
|
+
"createTreemap"
|
|
5093
|
+
],
|
|
5094
|
+
"tokens": [
|
|
5095
|
+
"accent",
|
|
5096
|
+
"border",
|
|
5097
|
+
"down",
|
|
5098
|
+
"dur-fast",
|
|
5099
|
+
"dur-med",
|
|
5100
|
+
"ease",
|
|
5101
|
+
"fg",
|
|
5102
|
+
"fg-bright",
|
|
5103
|
+
"fg-faint",
|
|
5104
|
+
"fg-muted",
|
|
5105
|
+
"focus",
|
|
5106
|
+
"font-size-sm",
|
|
5107
|
+
"hover",
|
|
5108
|
+
"radius-md",
|
|
5109
|
+
"radius-sm",
|
|
5110
|
+
"shadow",
|
|
5111
|
+
"surface",
|
|
5112
|
+
"surface-elev",
|
|
5113
|
+
"up"
|
|
5114
|
+
],
|
|
5115
|
+
"attributes": [
|
|
5116
|
+
"aria-current",
|
|
5117
|
+
"data-drill",
|
|
5118
|
+
"data-instant",
|
|
5119
|
+
"data-selected",
|
|
5120
|
+
"data-tone"
|
|
5121
|
+
],
|
|
5122
|
+
"example": "import { createTreemap } from '@luxalgo/vela-ui/treemap';\n\nconst treemap = createTreemap();\nhost.append(treemap.el);"
|
|
3852
5123
|
}
|
|
3853
5124
|
]
|
|
3854
5125
|
}
|