@luxalgo/vela-ui 0.2.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 +41 -0
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +4 -4
- package/dist/callout-bubble.d.ts +1 -1
- package/dist/callout-bubble.js +4 -4
- package/dist/card.d.ts +52 -0
- package/dist/card.js +179 -0
- package/dist/checkbox.js +4 -4
- package/dist/{chunk-WGULXRWD.js → chunk-B2EZB5ZG.js} +3 -3
- package/dist/{chunk-G7IQLY3A.js → chunk-C3PXY2SW.js} +5 -0
- package/dist/{chunk-CC3DDNFC.js → chunk-DXDCKZ2M.js} +4 -4
- package/dist/{chunk-WBGSYCV2.js → chunk-IOOYDSSK.js} +3 -3
- package/dist/{chunk-B5ZSRUDQ.js → chunk-KKS6NEGI.js} +2 -2
- package/dist/{chunk-7VMN7NKJ.js → chunk-OJ2SEMN6.js} +3 -3
- package/dist/{chunk-MJ4RUGX7.js → chunk-OQXFQMZM.js} +2 -2
- package/dist/{chunk-V2Q4MRMS.js → chunk-TBXUF5YX.js} +12 -0
- package/dist/{chunk-WXH3EFV5.js → chunk-UEO6W37Z.js} +3 -3
- package/dist/{chunk-Z5PINFQO.js → chunk-WWHNUKSZ.js} +4 -4
- package/dist/collapsible.d.ts +1 -1
- package/dist/collapsible.js +3 -3
- package/dist/color-picker.js +4 -4
- package/dist/context-menu.js +4 -4
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +1 -1
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/dialog.d.ts +9 -1
- package/dist/dialog.js +14 -4
- package/dist/donut.d.ts +1 -1
- package/dist/donut.js +1 -1
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +1 -1
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +4 -4
- package/dist/empty.d.ts +1 -1
- package/dist/empty.js +2 -2
- package/dist/field.js +12 -12
- package/dist/glyph-select.js +5 -5
- 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 +3 -1
- package/dist/index.js +3 -3
- package/dist/input-group.d.ts +1 -1
- package/dist/input-group.js +4 -4
- package/dist/input.js +2 -2
- package/dist/item.d.ts +1 -1
- package/dist/item.js +2 -2
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js +2 -2
- package/dist/line-chart.d.ts +1 -1
- package/dist/line-chart.js +1 -1
- package/dist/manifest.json +618 -1
- package/dist/month-grid.js +1 -1
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +4 -4
- package/dist/popover.js +3 -3
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/scatter-chart.js +1 -1
- package/dist/select.js +6 -6
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +1 -1
- package/dist/sort-button.js +3 -3
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/stat.d.ts +1 -1
- package/dist/stat.js +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +2 -2
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +3 -3
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +2 -2
- package/dist/theme-Ct-q58xz.d.ts +341 -0
- package/dist/theme.d.ts +42 -192
- package/dist/theme.js +1 -1
- package/dist/theme.schema.json +292 -1
- package/dist/toast.d.ts +49 -0
- package/dist/toast.js +463 -0
- package/dist/toggle-group.d.ts +1 -1
- package/dist/toggle-group.js +3 -3
- package/dist/tooltip.js +1 -1
- package/dist/treemap.d.ts +80 -0
- package/dist/treemap.js +470 -0
- package/llms.txt +5 -2
- package/package.json +1 -1
- package/registry/button.ts +8 -0
- package/registry/card.ts +379 -0
- package/registry/dialog.ts +16 -0
- package/registry/toast.ts +965 -0
- package/registry/treemap.ts +847 -0
- package/skills/using-vela-ui-components/SKILL.md +4 -2
- package/src/components/button.ts +8 -0
- package/src/components/card.ts +379 -0
- package/src/components/dialog.ts +16 -0
- package/src/components/toast.ts +965 -0
- package/src/components/treemap.ts +847 -0
- package/src/lib/component-index.ts +12 -0
- package/src/lib/icons.ts +7 -0
- package/src/lib/theme.ts +6 -0
- package/dist/{chunk-U3EH42YY.js → chunk-5BJV5FY5.js} +1 -1
- package/dist/{chunk-E2FE6V2N.js → chunk-ALAHGSLC.js} +1 -1
- package/dist/{chunk-C3ICYMI3.js → chunk-FYVQO5TN.js} +1 -1
|
@@ -20,6 +20,10 @@ export const KIT_COMPONENTS: Readonly<Record<string, { readonly parts: readonly
|
|
|
20
20
|
parts: ['root', 'panel', 'title', 'text', 'actions', 'button'],
|
|
21
21
|
settings: ['panel-radius', 'button-radius'],
|
|
22
22
|
},
|
|
23
|
+
card: {
|
|
24
|
+
parts: ['root', 'header', 'heading', 'eyebrow', 'title', 'trigger', 'description', 'action', 'content', 'footer'],
|
|
25
|
+
settings: ['radius', 'padding', 'padding-sm', 'gap', 'gap-sm', 'background', 'border', 'inset-background'],
|
|
26
|
+
},
|
|
23
27
|
checkbox: {
|
|
24
28
|
parts: ['root', 'icon'],
|
|
25
29
|
settings: ['radius'],
|
|
@@ -140,6 +144,10 @@ export const KIT_COMPONENTS: Readonly<Record<string, { readonly parts: readonly
|
|
|
140
144
|
parts: ['root', 'input'],
|
|
141
145
|
settings: ['radius', 'focus-ring'],
|
|
142
146
|
},
|
|
147
|
+
toast: {
|
|
148
|
+
parts: ['root', 'list', 'item', 'close', 'icon', 'content', 'title', 'description', 'cancel', 'action'],
|
|
149
|
+
settings: ['width', 'radius', 'background', 'border', 'foreground', 'description-color', 'shadow', 'success', 'info', 'warning', 'error'],
|
|
150
|
+
},
|
|
143
151
|
'toggle-group': {
|
|
144
152
|
parts: ['root', 'item', 'icon'],
|
|
145
153
|
settings: ['radius', 'radius-sm', 'item-radius', 'item-radius-sm'],
|
|
@@ -148,4 +156,8 @@ export const KIT_COMPONENTS: Readonly<Record<string, { readonly parts: readonly
|
|
|
148
156
|
parts: ['positioner', 'content'],
|
|
149
157
|
settings: ['radius'],
|
|
150
158
|
},
|
|
159
|
+
treemap: {
|
|
160
|
+
parts: ['root', 'crumbs', 'crumb', 'map', 'group', 'group-name', 'group-value', 'tile', 'tile-label', 'tile-value', 'legend', 'legend-bar', 'tip'],
|
|
161
|
+
settings: ['radius', 'up', 'down', 'tile-bg', 'tint-min', 'tint-max', 'hover-z', 'tip-radius', 'tip-bg', 'tip-shadow', 'tip-z'],
|
|
162
|
+
},
|
|
151
163
|
};
|
package/src/lib/icons.ts
CHANGED
|
@@ -178,6 +178,13 @@ registerIcon('burger', S('<path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11"/>'));
|
|
|
178
178
|
registerIcon('info', S('<path d="M8 7.4v4.4"/><circle cx="8" cy="4.6" r="0.9" fill="currentColor" stroke="none"/>'));
|
|
179
179
|
registerIcon('reset', S('<path d="M2 8a6 6 0 1 0 6-6 6.5 6.5 0 0 0-4.5 1.83L2 5.33"/><path d="M2 2v3.33h3.33"/>'));
|
|
180
180
|
|
|
181
|
+
// ── status glyphs (toasts, notices) ──
|
|
182
|
+
registerIcon('circle-check', S('<circle cx="8" cy="8" r="6.2"/><path d="m5.4 8.2 1.8 1.8 3.4-3.7"/>'));
|
|
183
|
+
registerIcon('circle-info', S('<circle cx="8" cy="8" r="6.2"/><path d="M8 7.4v3.6"/><circle cx="8" cy="5.1" r="0.8" fill="currentColor" stroke="none"/>'));
|
|
184
|
+
registerIcon('triangle-alert', S('<path d="M7.1 2.6a1 1 0 0 1 1.8 0l5.3 9.6a1 1 0 0 1-.9 1.5H2.7a1 1 0 0 1-.9-1.5z"/><path d="M8 6.3v3.2"/><circle cx="8" cy="11.4" r="0.8" fill="currentColor" stroke="none"/>'));
|
|
185
|
+
registerIcon('circle-x', S('<circle cx="8" cy="8" r="6.2"/><path d="m5.9 5.9 4.2 4.2M10.1 5.9l-4.2 4.2"/>'));
|
|
186
|
+
registerIcon('loader', S('<path d="M8 1.8a6.2 6.2 0 1 0 6.2 6.2"/>'));
|
|
187
|
+
|
|
181
188
|
// ── pane chrome (stack order, collapse, maximize) ──
|
|
182
189
|
registerIcon('pane-collapse', S('<path d="M2.6 9.4h4v4M13.4 6.6h-4v-4"/><path d="m9.4 6.6 4.2-4.2M2.4 13.6l4.2-4.2"/>'));
|
|
183
190
|
registerIcon('pane-expand', S('<path d="M9.8 2.4h3.8v3.8M6.2 13.6H2.4V9.8"/><path d="m13.6 2.4-4.4 4.4M2.4 13.6l4.4-4.4"/>'));
|
package/src/lib/theme.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { badgeDef } from '../components/badge';
|
|
|
8
8
|
import type { barChartDef } from '../components/bar-chart';
|
|
9
9
|
import type { buttonDef } from '../components/button';
|
|
10
10
|
import type { calloutBubbleDef } from '../components/callout-bubble';
|
|
11
|
+
import type { cardDef } from '../components/card';
|
|
11
12
|
import type { colorPickerDef } from '../components/color-picker';
|
|
12
13
|
import type { dataTableDef } from '../components/data-table';
|
|
13
14
|
import type { datePickerDef } from '../components/date-picker';
|
|
@@ -38,8 +39,10 @@ import type { monthGridDef } from '../components/month-grid';
|
|
|
38
39
|
import type { sliderDef } from '../components/slider';
|
|
39
40
|
import type { sortButtonDef } from '../components/sort-button';
|
|
40
41
|
import type { switchDef } from '../components/switch';
|
|
42
|
+
import type { toastDef } from '../components/toast';
|
|
41
43
|
import type { toggleGroupDef } from '../components/toggle-group';
|
|
42
44
|
import type { tooltipDef } from '../components/tooltip';
|
|
45
|
+
import type { treemapDef } from '../components/treemap';
|
|
43
46
|
import { contrastRatio, isDarkColor, mix, parseRgb } from './color';
|
|
44
47
|
import { KIT_COMPONENTS } from './component-index';
|
|
45
48
|
import { acceptCss, injectLayerOrder, isWrittenCss } from './css';
|
|
@@ -141,6 +144,7 @@ export interface ComponentDefs {
|
|
|
141
144
|
'bar-chart': typeof barChartDef;
|
|
142
145
|
button: typeof buttonDef;
|
|
143
146
|
'callout-bubble': typeof calloutBubbleDef;
|
|
147
|
+
card: typeof cardDef;
|
|
144
148
|
checkbox: typeof checkboxDef;
|
|
145
149
|
collapsible: typeof collapsibleDef;
|
|
146
150
|
'color-picker': typeof colorPickerDef;
|
|
@@ -171,8 +175,10 @@ export interface ComponentDefs {
|
|
|
171
175
|
switch: typeof switchDef;
|
|
172
176
|
tabs: typeof tabsDef;
|
|
173
177
|
'text-area': typeof textAreaDef;
|
|
178
|
+
toast: typeof toastDef;
|
|
174
179
|
'toggle-group': typeof toggleGroupDef;
|
|
175
180
|
tooltip: typeof tooltipDef;
|
|
181
|
+
treemap: typeof treemapDef;
|
|
176
182
|
}
|
|
177
183
|
|
|
178
184
|
type SettingsOf<D> = D extends ComponentDef<string, string, infer S> ? S : never;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
3
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
3
4
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
4
5
|
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
5
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
6
6
|
|
|
7
7
|
// src/components/input.ts
|
|
8
8
|
function inputController(opts = {}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
3
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
3
4
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
4
5
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
5
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
6
6
|
|
|
7
7
|
// src/components/text-area.ts
|
|
8
8
|
function textAreaController(opts = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
2
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
2
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
3
4
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
4
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
5
5
|
|
|
6
6
|
// src/components/kbd.ts
|
|
7
7
|
var kbdDef = defineComponent({
|