@luxalgo/vela-ui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/CHANGELOG.md +153 -132
  2. package/LICENSE +201 -201
  3. package/NOTICE +28 -28
  4. package/README.md +86 -86
  5. package/cli/engine.mjs +282 -282
  6. package/cli/index.mjs +154 -154
  7. package/dist/callout-bubble.js +2 -2
  8. package/dist/checkbox.js +2 -2
  9. package/dist/{chunk-KKS6NEGI.js → chunk-BWSOMG3G.js} +1 -1
  10. package/dist/chunk-GUIYFQ27.js +30 -0
  11. package/dist/{chunk-B2EZB5ZG.js → chunk-KUWTI2PE.js} +2 -2
  12. package/dist/{chunk-WWHNUKSZ.js → chunk-QGWAN3EP.js} +2 -2
  13. package/dist/{chunk-TBXUF5YX.js → chunk-RH53NQGE.js} +18 -4
  14. package/dist/{chunk-IOOYDSSK.js → chunk-SKFAYTDK.js} +1 -1
  15. package/dist/{chunk-OQXFQMZM.js → chunk-TGJNHUYV.js} +2 -2
  16. package/dist/{chunk-UEO6W37Z.js → chunk-VC7SVSDK.js} +1 -1
  17. package/dist/{chunk-OJ2SEMN6.js → chunk-YT2BSP7O.js} +1 -1
  18. package/dist/collapsible.js +1 -1
  19. package/dist/color-picker.js +4 -4
  20. package/dist/context-menu.js +3 -3
  21. package/dist/dialog.js +3 -3
  22. package/dist/donut.d.ts +1 -1
  23. package/dist/drawer.js +1 -1
  24. package/dist/dropdown-menu.js +3 -3
  25. package/dist/field.js +8 -8
  26. package/dist/{stat.d.ts → figure.d.ts} +9 -9
  27. package/dist/figure.js +41 -0
  28. package/dist/glyph-select.js +3 -3
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +1 -1
  31. package/dist/manifest.json +74 -74
  32. package/dist/number-input.js +2 -2
  33. package/dist/popover.js +2 -2
  34. package/dist/select.d.ts +1 -1
  35. package/dist/select.js +4 -4
  36. package/dist/slider.js +1 -1
  37. package/dist/sort-button.js +1 -1
  38. package/dist/switch.js +1 -1
  39. package/dist/tabs.js +1 -1
  40. package/dist/{theme-Ct-q58xz.d.ts → theme-TefB8vtl.d.ts} +2 -2
  41. package/dist/theme.d.ts +2 -2
  42. package/dist/theme.js +1 -1
  43. package/dist/theme.schema.json +30 -30
  44. package/dist/toast.d.ts +2 -2
  45. package/dist/toast.js +1 -1
  46. package/dist/toggle-group.js +1 -1
  47. package/dist/tooltip.js +1 -1
  48. package/dist/zag.d.ts +11 -2
  49. package/dist/zag.js +1 -1
  50. package/docs/theming.md +217 -217
  51. package/docs/what-to-change.md +20 -20
  52. package/docs/writing-a-component.md +250 -250
  53. package/llms.txt +3 -3
  54. package/package.json +90 -90
  55. package/registry/badge.ts +119 -119
  56. package/registry/bar-chart.ts +215 -215
  57. package/registry/button.ts +387 -387
  58. package/registry/callout-bubble.ts +347 -347
  59. package/registry/card.ts +379 -379
  60. package/registry/checkbox.ts +234 -234
  61. package/registry/collapsible.ts +271 -271
  62. package/registry/color-picker.ts +582 -582
  63. package/registry/context-menu.ts +208 -208
  64. package/registry/data-table.ts +215 -215
  65. package/registry/date-picker.ts +483 -483
  66. package/registry/dialog.ts +551 -551
  67. package/registry/donut.ts +145 -145
  68. package/registry/drawer.ts +636 -636
  69. package/registry/dropdown-menu.ts +762 -762
  70. package/registry/empty.ts +91 -91
  71. package/registry/field.ts +584 -584
  72. package/registry/{stat.ts → figure.ts} +96 -96
  73. package/registry/glyph-select.ts +268 -268
  74. package/registry/hover-card.ts +222 -222
  75. package/registry/input-group.ts +229 -229
  76. package/registry/input.ts +181 -181
  77. package/registry/item.ts +376 -376
  78. package/registry/kbd.ts +64 -64
  79. package/registry/line-chart.ts +218 -218
  80. package/registry/month-grid.ts +328 -328
  81. package/registry/number-input.ts +443 -443
  82. package/registry/popover.ts +368 -368
  83. package/registry/scatter-chart.ts +221 -221
  84. package/registry/select.ts +620 -620
  85. package/registry/slider.ts +259 -259
  86. package/registry/sort-button.ts +189 -189
  87. package/registry/sparkline.ts +114 -114
  88. package/registry/switch.ts +205 -205
  89. package/registry/tabs.ts +426 -426
  90. package/registry/text-area.ts +186 -186
  91. package/registry/toast.ts +965 -965
  92. package/registry/toggle-group.ts +295 -295
  93. package/registry/tooltip.ts +156 -156
  94. package/registry/treemap.ts +847 -847
  95. package/skills/theming-vela-ui/SKILL.md +137 -137
  96. package/skills/using-vela-ui-components/SKILL.md +139 -139
  97. package/skills/writing-vela-ui-components/SKILL.md +163 -163
  98. package/src/components/badge.ts +119 -119
  99. package/src/components/bar-chart.ts +215 -215
  100. package/src/components/button.ts +387 -387
  101. package/src/components/callout-bubble.ts +347 -347
  102. package/src/components/card.ts +379 -379
  103. package/src/components/checkbox.ts +234 -234
  104. package/src/components/collapsible.ts +271 -271
  105. package/src/components/color-picker.ts +582 -582
  106. package/src/components/context-menu.ts +208 -208
  107. package/src/components/data-table.ts +215 -215
  108. package/src/components/date-picker.ts +483 -483
  109. package/src/components/dialog.ts +551 -551
  110. package/src/components/donut.ts +145 -145
  111. package/src/components/drawer.ts +636 -636
  112. package/src/components/dropdown-menu.ts +762 -762
  113. package/src/components/empty.ts +91 -91
  114. package/src/components/field.ts +584 -584
  115. package/src/components/{stat.ts → figure.ts} +96 -96
  116. package/src/components/glyph-select.ts +268 -268
  117. package/src/components/hover-card.ts +222 -222
  118. package/src/components/input-group.ts +229 -229
  119. package/src/components/input.ts +181 -181
  120. package/src/components/item.ts +376 -376
  121. package/src/components/kbd.ts +64 -64
  122. package/src/components/line-chart.ts +218 -218
  123. package/src/components/month-grid.ts +328 -328
  124. package/src/components/number-input.ts +443 -443
  125. package/src/components/popover.ts +368 -368
  126. package/src/components/scatter-chart.ts +221 -221
  127. package/src/components/select.ts +620 -620
  128. package/src/components/slider.ts +259 -259
  129. package/src/components/sort-button.ts +189 -189
  130. package/src/components/sparkline.ts +114 -114
  131. package/src/components/switch.ts +205 -205
  132. package/src/components/tabs.ts +426 -426
  133. package/src/components/text-area.ts +186 -186
  134. package/src/components/toast.ts +965 -965
  135. package/src/components/toggle-group.ts +295 -295
  136. package/src/components/tooltip.ts +156 -156
  137. package/src/components/treemap.ts +847 -847
  138. package/src/index.ts +24 -24
  139. package/src/lib/calendar.ts +117 -117
  140. package/src/lib/chart.ts +72 -72
  141. package/src/lib/color.ts +89 -89
  142. package/src/lib/component-index.ts +163 -163
  143. package/src/lib/css.ts +48 -48
  144. package/src/lib/define.ts +45 -45
  145. package/src/lib/dispose.ts +36 -36
  146. package/src/lib/h.ts +55 -55
  147. package/src/lib/headless.ts +16 -16
  148. package/src/lib/i18n.ts +30 -30
  149. package/src/lib/icons.ts +244 -244
  150. package/src/lib/kit-text.ts +26 -26
  151. package/src/lib/page.ts +24 -24
  152. package/src/lib/palette.ts +81 -81
  153. package/src/lib/placement.ts +188 -188
  154. package/src/lib/scope.ts +135 -135
  155. package/src/lib/styles.ts +53 -53
  156. package/src/lib/surface-events.ts +31 -31
  157. package/src/lib/surface-exit.ts +87 -87
  158. package/src/lib/t.ts +68 -68
  159. package/src/lib/theme.ts +684 -670
  160. package/src/lib/tokens.ts +110 -110
  161. package/src/lib/variants.ts +32 -32
  162. package/src/lib/zag.ts +61 -46
  163. package/stylelint/index.mjs +60 -60
  164. package/stylelint/lint.mjs +81 -81
  165. package/stylelint/plugin.mjs +115 -115
  166. package/dist/chunk-P4MTEMT7.js +0 -23
  167. package/dist/stat.js +0 -41
@@ -2,12 +2,12 @@ import { V as VariantFn, a as VariantProps } from './variants-B4stUBnY.js';
2
2
  import { C as ComponentDef } from './define-D5u3F5Dj.js';
3
3
  import './t.js';
4
4
 
5
- declare const statDef: ComponentDef<"stat", "label" | "sub" | "root" | "value", never>;
6
- declare const statVariants: VariantFn<{
5
+ declare const figureDef: ComponentDef<"figure", "label" | "sub" | "root" | "value", never>;
6
+ declare const figureVariants: VariantFn<{
7
7
  readonly tone: readonly ["neutral", "profit", "loss"];
8
8
  }>;
9
- type StatTone = (typeof statVariants.spec.tone)[number];
10
- interface StatProps extends VariantProps<typeof statVariants> {
9
+ type FigureTone = (typeof figureVariants.spec.tone)[number];
10
+ interface FigureProps extends VariantProps<typeof figureVariants> {
11
11
  label: string;
12
12
  /** The figure (default `—`). */
13
13
  value?: string;
@@ -16,14 +16,14 @@ interface StatProps extends VariantProps<typeof statVariants> {
16
16
  /** Extra class names (layout hooks). */
17
17
  className?: string;
18
18
  }
19
- interface StatHandle {
19
+ interface FigureHandle {
20
20
  readonly el: HTMLElement;
21
21
  /** A new figure, its tone and its line (`null` hides the line). */
22
- set(value: string, tone?: StatTone, sub?: string | null): void;
22
+ set(value: string, tone?: FigureTone, sub?: string | null): void;
23
23
  destroy(): void;
24
24
  }
25
25
  /** The tone of a signed figure: a gain, a loss, or neither. */
26
- declare function toneOf(n: number): StatTone;
27
- declare function createStat(props: StatProps): StatHandle;
26
+ declare function toneOf(n: number): FigureTone;
27
+ declare function createFigure(props: FigureProps): FigureHandle;
28
28
 
29
- export { type StatHandle, type StatProps, type StatTone, createStat, statDef, statVariants, toneOf };
29
+ export { type FigureHandle, type FigureProps, type FigureTone, createFigure, figureDef, figureVariants, toneOf };
package/dist/figure.js ADDED
@@ -0,0 +1,41 @@
1
+ import { variants } from './chunk-LZWZV2ZS.js';
2
+ import { h } from './chunk-Q6WTDVH6.js';
3
+ import { t } from './chunk-6QCILIT2.js';
4
+ import { defineComponent } from './chunk-VMCR3S2A.js';
5
+ import { defineStyles, css } from './chunk-XBEL4K33.js';
6
+ import './chunk-2GQIZM5Z.js';
7
+ import './chunk-BXMWQIBO.js';
8
+ import './chunk-X66RJAIS.js';
9
+
10
+ // src/components/figure.ts
11
+ var figureDef = defineComponent({
12
+ name: "figure",
13
+ parts: ["root", "label", "value", "sub"]
14
+ });
15
+ var figureVariants = variants({ tone: ["neutral", "profit", "loss"] });
16
+ function toneOf(n) {
17
+ return n > 0 ? "profit" : n < 0 ? "loss" : "neutral";
18
+ }
19
+ var injectStyles = defineStyles(
20
+ "vela-ui-figure",
21
+ css`@layer vela.ui{[data-slot=figure]:where(:not([hidden])){flex-direction:column;gap:3px;min-width:0;display:flex}[data-slot=figure-label]{color:${t.fg.muted};white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}[data-slot=figure-value]{color:${t.fg.bright};font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px;font-weight:600}[data-slot=figure-value]:is([data-tone=profit]>*){color:${t.profit}}[data-slot=figure-value]:is([data-tone=loss]>*){color:${t.loss}}[data-slot=figure-sub]{color:${t.fg.muted};font-variant-numeric:tabular-nums;font-size:11px}}`
22
+ );
23
+ function createFigure(props) {
24
+ injectStyles(document);
25
+ const value = h("span", { slot: figureDef.slot("value"), text: props.value ?? "\u2014" });
26
+ const sub = h("span", { slot: figureDef.slot("sub"), text: props.sub ?? "" });
27
+ sub.hidden = !props.sub;
28
+ const el = h("div", { className: props.className, slot: figureDef.slot("root"), attrs: figureVariants(props) }, h("span", { slot: figureDef.slot("label"), text: props.label }), value, sub);
29
+ return {
30
+ el,
31
+ set(next, tone = "neutral", line = null) {
32
+ value.textContent = next;
33
+ el.setAttribute("data-tone", tone);
34
+ sub.textContent = line ?? "";
35
+ sub.hidden = !line;
36
+ },
37
+ destroy: () => el.remove()
38
+ };
39
+ }
40
+
41
+ export { createFigure, figureDef, figureVariants, toneOf };
@@ -1,8 +1,8 @@
1
- export { GlyphSelect, WIDTH_FIELD_OPTIONS, closeWidthPopover, createGlyphSelect, glyphSelectController, glyphSelectDef, lineWidthGlyph, widthField, widthFieldOptions } from './chunk-OJ2SEMN6.js';
2
- import './chunk-KKS6NEGI.js';
1
+ export { GlyphSelect, WIDTH_FIELD_OPTIONS, closeWidthPopover, createGlyphSelect, glyphSelectController, glyphSelectDef, lineWidthGlyph, widthField, widthFieldOptions } from './chunk-YT2BSP7O.js';
2
+ import './chunk-BWSOMG3G.js';
3
3
  import './chunk-J2QJATCD.js';
4
4
  import './chunk-S7USVSYP.js';
5
- import './chunk-TBXUF5YX.js';
5
+ import './chunk-RH53NQGE.js';
6
6
  import './chunk-TAKSIV57.js';
7
7
  import './chunk-MMTMOV6R.js';
8
8
  import './chunk-3Q32K4PE.js';
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { V as VariantFn, a as VariantProps, b as VariantSpec, c as VariantValues
5
5
  export { C as ComponentDef, d as defineComponent } from './define-D5u3F5Dj.js';
6
6
  export { disposeWithin, ownTeardown } from './dispose.js';
7
7
  export { Align, CollisionBoundary, PlacementProps, Side, placePopover, zagPositioning } from './placement.js';
8
- export { C as ComponentDefs, a as ComponentSettings, b as CreateThemeOptions, D as DARK_CHART, L as LIGHT_CHART, T as TOKEN_NAMES, c as ThemeInput, d as ThemeSettings, e as ThemedChart, f as TokenName, U as UiTheme, g as applyTheme, h as checkTheme, i as createTheme } from './theme-Ct-q58xz.js';
8
+ export { C as ComponentDefs, a as ComponentSettings, b as CreateThemeOptions, D as DARK_CHART, L as LIGHT_CHART, T as TOKEN_NAMES, c as ThemeInput, d as ThemeSettings, e as ThemedChart, f as TokenName, U as UiTheme, g as applyTheme, h as checkTheme, i as createTheme } from './theme-TefB8vtl.js';
9
9
  export { ChartTheme } from './tokens.js';
10
10
  export { LAYER_ORDER, injectLayerOrder } from './styles.js';
11
11
  import './badge.js';
@@ -34,7 +34,7 @@ import '@zag-js/menu';
34
34
  import './number-input.js';
35
35
  import './scatter-chart.js';
36
36
  import './sparkline.js';
37
- import './stat.js';
37
+ import './figure.js';
38
38
  import './checkbox.js';
39
39
  import './collapsible.js';
40
40
  import './tabs.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyTheme, checkTheme, createTheme } from './chunk-TBXUF5YX.js';
1
+ export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyTheme, checkTheme, createTheme } from './chunk-RH53NQGE.js';
2
2
  import './chunk-TAKSIV57.js';
3
3
  import './chunk-MMTMOV6R.js';
4
4
  export { placePopover, zagPositioning } from './chunk-3Q32K4PE.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@luxalgo/vela-ui",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "tokens": [
5
5
  "space-1",
6
6
  "space-2",
@@ -2101,6 +2101,79 @@
2101
2101
  "data-mobile"
2102
2102
  ]
2103
2103
  },
2104
+ {
2105
+ "name": "figure",
2106
+ "import": "@luxalgo/vela-ui/figure",
2107
+ "description": "Figure: a value 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.",
2108
+ "component": "figure",
2109
+ "declaration": "figureDef",
2110
+ "parts": {
2111
+ "root": "figure",
2112
+ "label": "figure-label",
2113
+ "value": "figure-value",
2114
+ "sub": "figure-sub"
2115
+ },
2116
+ "settings": {},
2117
+ "variants": {
2118
+ "tone": [
2119
+ "neutral",
2120
+ "profit",
2121
+ "loss"
2122
+ ]
2123
+ },
2124
+ "factory": "createFigure",
2125
+ "returns": "FigureHandle",
2126
+ "propsType": "FigureProps",
2127
+ "props": [
2128
+ {
2129
+ "name": "label",
2130
+ "type": "string",
2131
+ "required": true
2132
+ },
2133
+ {
2134
+ "name": "value",
2135
+ "type": "string",
2136
+ "required": false,
2137
+ "doc": "The figure (default `—`)."
2138
+ },
2139
+ {
2140
+ "name": "sub",
2141
+ "type": "string",
2142
+ "required": false,
2143
+ "doc": "A line under the figure (a count, a percentage)."
2144
+ },
2145
+ {
2146
+ "name": "className",
2147
+ "type": "string",
2148
+ "required": false,
2149
+ "doc": "Extra class names (layout hooks)."
2150
+ },
2151
+ {
2152
+ "name": "tone",
2153
+ "type": "\"neutral\" | \"profit\" | \"loss\"",
2154
+ "required": false
2155
+ }
2156
+ ],
2157
+ "exports": [
2158
+ "figureDef",
2159
+ "figureVariants",
2160
+ "FigureTone",
2161
+ "FigureProps",
2162
+ "FigureHandle",
2163
+ "toneOf",
2164
+ "createFigure"
2165
+ ],
2166
+ "tokens": [
2167
+ "fg-bright",
2168
+ "fg-muted",
2169
+ "loss",
2170
+ "profit"
2171
+ ],
2172
+ "attributes": [
2173
+ "data-tone"
2174
+ ],
2175
+ "example": "import { createFigure } from '@luxalgo/vela-ui/figure';\n\nconst figure = createFigure({ label: /* string */ });\nhost.append(figure.el);"
2176
+ },
2104
2177
  {
2105
2178
  "name": "glyph-select",
2106
2179
  "import": "@luxalgo/vela-ui/glyph-select",
@@ -3960,79 +4033,6 @@
3960
4033
  ],
3961
4034
  "example": "import { createSparkline } from '@luxalgo/vela-ui/sparkline';\n\nconst sparkline = createSparkline({ values: /* readonly number[] */ });\nhost.append(sparkline.el);"
3962
4035
  },
3963
- {
3964
- "name": "stat",
3965
- "import": "@luxalgo/vela-ui/stat",
3966
- "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.",
3967
- "component": "stat",
3968
- "declaration": "statDef",
3969
- "parts": {
3970
- "root": "stat",
3971
- "label": "stat-label",
3972
- "value": "stat-value",
3973
- "sub": "stat-sub"
3974
- },
3975
- "settings": {},
3976
- "variants": {
3977
- "tone": [
3978
- "neutral",
3979
- "profit",
3980
- "loss"
3981
- ]
3982
- },
3983
- "factory": "createStat",
3984
- "returns": "StatHandle",
3985
- "propsType": "StatProps",
3986
- "props": [
3987
- {
3988
- "name": "label",
3989
- "type": "string",
3990
- "required": true
3991
- },
3992
- {
3993
- "name": "value",
3994
- "type": "string",
3995
- "required": false,
3996
- "doc": "The figure (default `—`)."
3997
- },
3998
- {
3999
- "name": "sub",
4000
- "type": "string",
4001
- "required": false,
4002
- "doc": "A line under the figure (a count, a percentage)."
4003
- },
4004
- {
4005
- "name": "className",
4006
- "type": "string",
4007
- "required": false,
4008
- "doc": "Extra class names (layout hooks)."
4009
- },
4010
- {
4011
- "name": "tone",
4012
- "type": "\"neutral\" | \"profit\" | \"loss\"",
4013
- "required": false
4014
- }
4015
- ],
4016
- "exports": [
4017
- "statDef",
4018
- "statVariants",
4019
- "StatTone",
4020
- "StatProps",
4021
- "StatHandle",
4022
- "toneOf",
4023
- "createStat"
4024
- ],
4025
- "tokens": [
4026
- "fg-bright",
4027
- "fg-muted",
4028
- "loss",
4029
- "profit"
4030
- ],
4031
- "attributes": [
4032
- "data-tone"
4033
- ],
4034
- "example": "import { createStat } from '@luxalgo/vela-ui/stat';\n\nconst stat = createStat({ label: /* string */ });\nhost.append(stat.el);"
4035
- },
4036
4036
  {
4037
4037
  "name": "switch",
4038
4038
  "import": "@luxalgo/vela-ui/switch",
@@ -1,8 +1,8 @@
1
- export { NUMBER_CSS, NUMBER_STYLE_ID, NumberInput, clampNumber, createNumberInput, numberInputController, numberInputDef, numberInputVariants, snapToStep } from './chunk-UEO6W37Z.js';
1
+ export { NUMBER_CSS, NUMBER_STYLE_ID, NumberInput, clampNumber, createNumberInput, numberInputController, numberInputDef, numberInputVariants, snapToStep } from './chunk-VC7SVSDK.js';
2
2
  import './chunk-FVH6L7FM.js';
3
3
  import './chunk-FN2BUFNM.js';
4
4
  import './chunk-A72NWYNP.js';
5
- import './chunk-P4MTEMT7.js';
5
+ import './chunk-GUIYFQ27.js';
6
6
  import './chunk-C3PXY2SW.js';
7
7
  import './chunk-LZWZV2ZS.js';
8
8
  import './chunk-Q6WTDVH6.js';
package/dist/popover.js CHANGED
@@ -1,7 +1,7 @@
1
- export { POPOVER_CSS, POPOVER_STYLE_ID, Popover, closeOpenPopovers, createPopover, eventDismissedPopover, isPopoverOpen, openPopoverTrigger, popoverController, popoverDef } from './chunk-KKS6NEGI.js';
1
+ export { POPOVER_CSS, POPOVER_STYLE_ID, Popover, closeOpenPopovers, createPopover, eventDismissedPopover, isPopoverOpen, openPopoverTrigger, popoverController, popoverDef } from './chunk-BWSOMG3G.js';
2
2
  import './chunk-J2QJATCD.js';
3
3
  import './chunk-S7USVSYP.js';
4
- import './chunk-TBXUF5YX.js';
4
+ import './chunk-RH53NQGE.js';
5
5
  import './chunk-TAKSIV57.js';
6
6
  import './chunk-MMTMOV6R.js';
7
7
  export { insetRect, intersectRects, placePopover, viewportRect } from './chunk-3Q32K4PE.js';
package/dist/select.d.ts CHANGED
@@ -42,7 +42,7 @@ interface SelectController {
42
42
  }
43
43
  /** The select's options and current value, without DOM. */
44
44
  declare function selectController(opts: SelectControllerOptions): SelectController;
45
- declare const selectDef: ComponentDef<"select", "root" | "viewport" | "icon" | "trigger" | "content" | "value" | "thumb" | "item" | "sizer" | "native" | "rail", "radius" | "content-radius" | "focus-ring" | "thumb-radius">;
45
+ declare const selectDef: ComponentDef<"select", "root" | "viewport" | "icon" | "trigger" | "content" | "value" | "item" | "sizer" | "native" | "rail" | "thumb", "radius" | "content-radius" | "focus-ring" | "thumb-radius">;
46
46
  declare const selectVariants: VariantFn<{
47
47
  readonly size: readonly ["md", "sm"];
48
48
  }>;
package/dist/select.js CHANGED
@@ -1,13 +1,13 @@
1
- export { SELECT_CSS, SELECT_STYLE_ID, Select, createSelect, decorateSelectScroll, fillSelectList, openSelectList, selectController, selectDef, selectVariants, toggleSelectList } from './chunk-WWHNUKSZ.js';
2
- import './chunk-KKS6NEGI.js';
1
+ export { SELECT_CSS, SELECT_STYLE_ID, Select, createSelect, decorateSelectScroll, fillSelectList, openSelectList, selectController, selectDef, selectVariants, toggleSelectList } from './chunk-QGWAN3EP.js';
2
+ import './chunk-BWSOMG3G.js';
3
3
  import './chunk-J2QJATCD.js';
4
4
  import './chunk-S7USVSYP.js';
5
- import './chunk-TBXUF5YX.js';
5
+ import './chunk-RH53NQGE.js';
6
6
  import './chunk-TAKSIV57.js';
7
7
  import './chunk-MMTMOV6R.js';
8
8
  import './chunk-3Q32K4PE.js';
9
9
  import './chunk-A72NWYNP.js';
10
- import './chunk-P4MTEMT7.js';
10
+ import './chunk-GUIYFQ27.js';
11
11
  import './chunk-C3PXY2SW.js';
12
12
  import './chunk-LZWZV2ZS.js';
13
13
  import './chunk-Q6WTDVH6.js';
package/dist/slider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ownTeardown } from './chunk-A72NWYNP.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
2
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
3
3
  import { h } from './chunk-Q6WTDVH6.js';
4
4
  import { t } from './chunk-6QCILIT2.js';
5
5
  import { defineComponent } from './chunk-VMCR3S2A.js';
@@ -1,6 +1,6 @@
1
1
  import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
- import { nextUid } from './chunk-P4MTEMT7.js';
3
+ import { nextUid } from './chunk-GUIYFQ27.js';
4
4
  import { iconEl } from './chunk-C3PXY2SW.js';
5
5
  import { variants } from './chunk-LZWZV2ZS.js';
6
6
  import { h } from './chunk-Q6WTDVH6.js';
package/dist/switch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ownTeardown } from './chunk-A72NWYNP.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
2
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
3
3
  import { variants } from './chunk-LZWZV2ZS.js';
4
4
  import { h } from './chunk-Q6WTDVH6.js';
5
5
  import { t } from './chunk-6QCILIT2.js';
package/dist/tabs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ownTeardown } from './chunk-A72NWYNP.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
2
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
3
3
  import { iconEl } from './chunk-C3PXY2SW.js';
4
4
  import { variants } from './chunk-LZWZV2ZS.js';
5
5
  import { h } from './chunk-Q6WTDVH6.js';
@@ -21,7 +21,7 @@ import { popoverDef } from './popover.js';
21
21
  import { scatterChartDef } from './scatter-chart.js';
22
22
  import { selectDef } from './select.js';
23
23
  import { sparklineDef } from './sparkline.js';
24
- import { statDef } from './stat.js';
24
+ import { figureDef } from './figure.js';
25
25
  import { checkboxDef } from './checkbox.js';
26
26
  import { collapsibleDef } from './collapsible.js';
27
27
  import { tabsDef } from './tabs.js';
@@ -212,6 +212,7 @@ interface ComponentDefs {
212
212
  'dropdown-menu': typeof dropdownMenuDef;
213
213
  empty: typeof emptyDef;
214
214
  field: typeof fieldDef;
215
+ figure: typeof figureDef;
215
216
  'glyph-select': typeof glyphSelectDef;
216
217
  'hover-card': typeof hoverCardDef;
217
218
  'input-group': typeof inputGroupDef;
@@ -227,7 +228,6 @@ interface ComponentDefs {
227
228
  slider: typeof sliderDef;
228
229
  'sort-button': typeof sortButtonDef;
229
230
  sparkline: typeof sparklineDef;
230
- stat: typeof statDef;
231
231
  switch: typeof switchDef;
232
232
  tabs: typeof tabsDef;
233
233
  'text-area': typeof textAreaDef;
package/dist/theme.d.ts CHANGED
@@ -21,7 +21,7 @@ import './popover.js';
21
21
  import './scatter-chart.js';
22
22
  import './select.js';
23
23
  import './sparkline.js';
24
- import './stat.js';
24
+ import './figure.js';
25
25
  import './checkbox.js';
26
26
  import './collapsible.js';
27
27
  import './tabs.js';
@@ -33,7 +33,7 @@ import './month-grid.js';
33
33
  import './slider.js';
34
34
  import './sort-button.js';
35
35
  import './switch.js';
36
- export { C as ComponentDefs, a as ComponentSettings, b as CreateThemeOptions, D as DARK_CHART, L as LIGHT_CHART, T as TOKEN_NAMES, c as ThemeInput, d as ThemeSettings, e as ThemedChart, f as TokenName, U as UiTheme, y as applyPlotOverlayTokens, g as applyTheme, z as applyThemeTokens, h as checkTheme, i as createTheme, A as ensureUIHost, B as floatingLayerHost, F as themeCss } from './theme-Ct-q58xz.js';
36
+ export { C as ComponentDefs, a as ComponentSettings, b as CreateThemeOptions, D as DARK_CHART, L as LIGHT_CHART, T as TOKEN_NAMES, c as ThemeInput, d as ThemeSettings, e as ThemedChart, f as TokenName, U as UiTheme, y as applyPlotOverlayTokens, g as applyTheme, z as applyThemeTokens, h as checkTheme, i as createTheme, A as ensureUIHost, B as floatingLayerHost, F as themeCss } from './theme-TefB8vtl.js';
37
37
  import './toggle-group.js';
38
38
  import './tooltip.js';
39
39
  import './treemap.js';
package/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyPlotOverlayTokens, applyTheme, applyThemeTokens, checkTheme, createTheme, ensureUIHost, floatingLayerHost, themeCss } from './chunk-TBXUF5YX.js';
1
+ export { DARK_CHART, LIGHT_CHART, TOKEN_NAMES, applyPlotOverlayTokens, applyTheme, applyThemeTokens, checkTheme, createTheme, ensureUIHost, floatingLayerHost, themeCss } from './chunk-RH53NQGE.js';
2
2
  import './chunk-TAKSIV57.js';
3
3
  import './chunk-MMTMOV6R.js';
4
4
  import './chunk-VMCR3S2A.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "@luxalgo/vela-ui 0.3.0 theme",
3
+ "title": "@luxalgo/vela-ui 0.4.0 theme",
4
4
  "description": "The input of createTheme. Every field is optional: an empty theme is the dark theme.",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
@@ -1124,6 +1124,35 @@
1124
1124
  }
1125
1125
  }
1126
1126
  },
1127
+ "figure": {
1128
+ "type": "object",
1129
+ "additionalProperties": false,
1130
+ "properties": {
1131
+ "css": {
1132
+ "type": "object",
1133
+ "additionalProperties": false,
1134
+ "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1135
+ "properties": {
1136
+ "root": {
1137
+ "type": "string",
1138
+ "description": "[data-slot~=\"figure\"]"
1139
+ },
1140
+ "label": {
1141
+ "type": "string",
1142
+ "description": "[data-slot~=\"figure-label\"]"
1143
+ },
1144
+ "value": {
1145
+ "type": "string",
1146
+ "description": "[data-slot~=\"figure-value\"]"
1147
+ },
1148
+ "sub": {
1149
+ "type": "string",
1150
+ "description": "[data-slot~=\"figure-sub\"]"
1151
+ }
1152
+ }
1153
+ }
1154
+ }
1155
+ },
1127
1156
  "glyph-select": {
1128
1157
  "type": "object",
1129
1158
  "additionalProperties": false,
@@ -1795,35 +1824,6 @@
1795
1824
  }
1796
1825
  }
1797
1826
  },
1798
- "stat": {
1799
- "type": "object",
1800
- "additionalProperties": false,
1801
- "properties": {
1802
- "css": {
1803
- "type": "object",
1804
- "additionalProperties": false,
1805
- "description": "CSS by part, applied after every layer of the kit. From a file, it applies only when the host passes { allowCss: true }.",
1806
- "properties": {
1807
- "root": {
1808
- "type": "string",
1809
- "description": "[data-slot~=\"stat\"]"
1810
- },
1811
- "label": {
1812
- "type": "string",
1813
- "description": "[data-slot~=\"stat-label\"]"
1814
- },
1815
- "value": {
1816
- "type": "string",
1817
- "description": "[data-slot~=\"stat-value\"]"
1818
- },
1819
- "sub": {
1820
- "type": "string",
1821
- "description": "[data-slot~=\"stat-sub\"]"
1822
- }
1823
- }
1824
- }
1825
- }
1826
- },
1827
1827
  "switch": {
1828
1828
  "type": "object",
1829
1829
  "additionalProperties": false,
package/dist/toast.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import './define-D5u3F5Dj.js';
2
- export { E as ExternalToast, P as PromiseData, j as PromiseSource, S as SwipeDirection, k as ToastAction, l as ToastContent, m as ToastFunction, n as ToastId, o as ToastOffset, p as ToastPromise, q as ToastT, r as ToastType, s as ToasterHandle, t as ToasterPosition, u as ToasterProps, v as createToaster, w as toast, x as toastDef } from './theme-Ct-q58xz.js';
2
+ export { E as ExternalToast, P as PromiseData, j as PromiseSource, S as SwipeDirection, k as ToastAction, l as ToastContent, m as ToastFunction, n as ToastId, o as ToastOffset, p as ToastPromise, q as ToastT, r as ToastType, s as ToasterHandle, t as ToasterPosition, u as ToasterProps, v as createToaster, w as toast, x as toastDef } from './theme-TefB8vtl.js';
3
3
  import './i18n.js';
4
4
  import './t.js';
5
5
  import './badge.js';
@@ -31,7 +31,7 @@ import '@zag-js/menu';
31
31
  import './number-input.js';
32
32
  import './scatter-chart.js';
33
33
  import './sparkline.js';
34
- import './stat.js';
34
+ import './figure.js';
35
35
  import './checkbox.js';
36
36
  import './collapsible.js';
37
37
  import './tabs.js';
package/dist/toast.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
- import { ensureUIHost } from './chunk-TBXUF5YX.js';
3
+ import { ensureUIHost } from './chunk-RH53NQGE.js';
4
4
  import './chunk-TAKSIV57.js';
5
5
  import './chunk-MMTMOV6R.js';
6
6
  import { iconEl } from './chunk-C3PXY2SW.js';
@@ -1,5 +1,5 @@
1
1
  import { ownTeardown } from './chunk-A72NWYNP.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
2
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
3
3
  import { iconEl } from './chunk-C3PXY2SW.js';
4
4
  import { variants } from './chunk-LZWZV2ZS.js';
5
5
  import { h } from './chunk-Q6WTDVH6.js';
package/dist/tooltip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { zagPositioning, splitPlacement } from './chunk-3Q32K4PE.js';
2
2
  import { ownTeardown } from './chunk-A72NWYNP.js';
3
- import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
3
+ import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
4
4
  import { h } from './chunk-Q6WTDVH6.js';
5
5
  import { t } from './chunk-6QCILIT2.js';
6
6
  import { defineComponent } from './chunk-VMCR3S2A.js';
package/dist/zag.d.ts CHANGED
@@ -1,6 +1,15 @@
1
- export { normalizeProps, spreadProps } from '@zag-js/vanilla';
1
+ import { spreadProps as spreadProps$1 } from '@zag-js/vanilla';
2
+ export { normalizeProps } from '@zag-js/vanilla';
2
3
  import { Machine, MachineSchema, Service } from '@zag-js/core';
3
4
 
5
+ /**
6
+ * Zag's `spreadProps`, without the style keys a part leaves unset. Zag's own spread removes
7
+ * those from the element, which wipes what Zag writes there itself: from 1.47 a positioner's
8
+ * style carries `zIndex: undefined` while the popper sets its z-index inline, so every
9
+ * re-render dropped an open menu under the page. A key the part set and then clears is still
10
+ * removed: that runs off the previous style.
11
+ */
12
+ declare function spreadProps(...[node, attrs, machineId]: Parameters<typeof spreadProps$1>): ReturnType<typeof spreadProps$1>;
4
13
  /** The MachineHandle for a given machine definition (package schemas aren't exported —
5
14
  * infer them from the machine value: `HandleOf<typeof tooltip.machine>`). */
6
15
  type HandleOf<M> = M extends Machine<infer T extends MachineSchema> ? MachineHandle<T> : never;
@@ -16,4 +25,4 @@ declare function runMachine<T extends MachineSchema>(machine: Machine<T>, props:
16
25
  /** Unique ids for machine instances (Zag keys its DOM lookups on them). */
17
26
  declare function nextUid(prefix: string): string;
18
27
 
19
- export { type HandleOf, type MachineHandle, nextUid, runMachine };
28
+ export { type HandleOf, type MachineHandle, nextUid, runMachine, spreadProps };
package/dist/zag.js CHANGED
@@ -1,2 +1,2 @@
1
- export { nextUid, normalizeProps, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
1
+ export { nextUid, normalizeProps, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
2
2
  import './chunk-X66RJAIS.js';