@luxalgo/vela-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/README.md +5 -2
- package/dist/badge.js +2 -2
- package/dist/bar-chart.d.ts +1 -1
- package/dist/bar-chart.js +2 -2
- 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 +7 -2
- package/dist/callout-bubble.js +12 -8
- package/dist/checkbox.js +4 -4
- package/dist/{chunk-SAPURP46.js → chunk-7VMN7NKJ.js} +3 -3
- package/dist/{chunk-OBLIX3VN.js → chunk-B5ZSRUDQ.js} +3 -3
- package/dist/{chunk-6NXY62JS.js → chunk-C3ICYMI3.js} +2 -2
- package/dist/chunk-CC3DDNFC.js +117 -0
- package/dist/{chunk-FCO3YZLT.js → chunk-E2FE6V2N.js} +2 -2
- package/dist/{chunk-V6TTTMTE.js → chunk-GVRX3UAV.js} +4 -1
- package/dist/{chunk-2Q4JRINP.js → chunk-MJ4RUGX7.js} +4 -4
- package/dist/{chunk-X4YPSIW6.js → chunk-U3EH42YY.js} +2 -2
- package/dist/{chunk-AJ2IYSOI.js → chunk-V2Q4MRMS.js} +23 -3
- package/dist/{chunk-XJAPCCOJ.js → chunk-WBGSYCV2.js} +3 -3
- package/dist/{chunk-5QHXOAZA.js → chunk-WGULXRWD.js} +4 -4
- package/dist/{chunk-ZB3BZHSN.js → chunk-WXH3EFV5.js} +3 -3
- package/dist/chunk-XBEL4K33.js +142 -0
- package/dist/{chunk-CH3DV6FD.js → chunk-Z5PINFQO.js} +4 -4
- package/dist/collapsible.d.ts +49 -0
- package/dist/collapsible.js +106 -0
- package/dist/color-picker.js +6 -6
- 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 +2 -2
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +3 -3
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +5 -5
- package/dist/donut.d.ts +1 -1
- package/dist/donut.js +2 -2
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +3 -3
- 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/h-Bl37qUis.d.ts +24 -0
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.js +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.js +3 -3
- package/dist/input-group.d.ts +1 -1
- package/dist/input-group.js +4 -3
- package/dist/input.js +3 -3
- package/dist/item.d.ts +72 -0
- package/dist/item.js +131 -0
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js +3 -3
- package/dist/line-chart.d.ts +1 -1
- package/dist/line-chart.js +2 -2
- package/dist/manifest.json +665 -11
- package/dist/month-grid.d.ts +45 -0
- package/dist/month-grid.js +157 -0
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +4 -4
- package/dist/popover.js +4 -4
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/scatter-chart.js +2 -2
- package/dist/select.js +6 -6
- package/dist/slider.d.ts +46 -0
- package/dist/slider.js +111 -0
- package/dist/sort-button.d.ts +41 -0
- package/dist/sort-button.js +88 -0
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +2 -2
- package/dist/stat.d.ts +1 -1
- package/dist/stat.js +2 -2
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +3 -3
- package/dist/tabs.d.ts +3 -1
- package/dist/tabs.js +12 -7
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +3 -3
- package/dist/theme.d.ts +17 -6
- package/dist/theme.js +2 -2
- package/dist/theme.schema.json +250 -1
- package/dist/toggle-group.d.ts +1 -1
- package/dist/toggle-group.js +3 -3
- package/dist/tooltip.js +3 -3
- package/docs/theming.md +6 -0
- package/docs/writing-a-component.md +4 -1
- package/llms.txt +8 -3
- package/package.json +1 -1
- package/registry/button.ts +97 -21
- package/registry/callout-bubble.ts +14 -3
- package/registry/collapsible.ts +271 -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/skills/using-vela-ui-components/SKILL.md +12 -9
- package/src/components/button.ts +97 -21
- package/src/components/callout-bubble.ts +14 -3
- package/src/components/collapsible.ts +271 -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/lib/calendar.ts +5 -0
- package/src/lib/component-index.ts +22 -2
- package/src/lib/css.ts +6 -2
- package/src/lib/scope.ts +135 -0
- package/src/lib/theme.ts +15 -5
- package/dist/chunk-EZQXTO6K.js +0 -89
- package/dist/chunk-IDA2BT7D.js +0 -29
- package/dist/data-table-DtU3FX9j.d.ts +0 -61
|
@@ -3,13 +3,13 @@ import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
|
3
3
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
4
4
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
5
5
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
6
|
-
import { floatingLayerHost } from './chunk-
|
|
6
|
+
import { floatingLayerHost } from './chunk-V2Q4MRMS.js';
|
|
7
7
|
import { zagPositioning, splitPlacement } from './chunk-3Q32K4PE.js';
|
|
8
8
|
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
|
|
9
9
|
import { addSlot } from './chunk-Q6WTDVH6.js';
|
|
10
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
11
10
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
12
|
-
import { defineStyles, css } from './chunk-
|
|
11
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
12
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
13
13
|
import * as zagMenu from '@zag-js/menu';
|
|
14
14
|
|
|
15
15
|
function dropdownMenuController(opts) {
|
|
@@ -35,7 +35,7 @@ var dropdownMenuDef = defineComponent({
|
|
|
35
35
|
});
|
|
36
36
|
var injectStyles = defineStyles(
|
|
37
37
|
"vela-ui-menu",
|
|
38
|
-
css`@layer vela.ui{[data-slot~=dropdown-menu-content]{background:${t.surface};color:${t.fg};border:1px solid ${t.border.strong};border-radius:${dropdownMenuDef.vars.radius};box-shadow:${t.shadow};min-width:180px;max-height:min(60vh, var(--available-height,60vh));z-index:${t.z.menu};outline:2px solid #0000;margin:0;padding:6px;font-size:13px;list-style:none;overflow-y:auto}[data-slot~=dropdown-menu-content][data-state=open]{animation:vela-menu-in ${t.dur.fast} ${t.ease}}@keyframes vela-menu-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}[data-slot~=dropdown-menu-item]{border-radius:${t.radius.sm};cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;align-items:center;gap:10px;padding:7px 10px;display:flex}[data-slot~=dropdown-menu-item][data-highlighted]{background:${t.hover}}[data-slot~=dropdown-menu-item][data-disabled]{opacity:.4;cursor:default}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-icon]{width:16px;height:16px;color:${t.fg.muted};justify-content:center;font-size:16px}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-label]{flex:auto}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-hint]{color:${t.fg.faint};font-size:${t.fontSize.sm}}[data-slot~=dropdown-menu-item][data-checked]{background:${t.hover.strong};color:${t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark]{flex:none;justify-content:center;align-items:center;width:14px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark] [data-slot~=dropdown-menu-icon]{width:14px;height:14px;color:${t.fg.bright};font-size:14px}[data-slot~=dropdown-menu-item][data-checkmark]{color:${t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]{box-sizing:border-box;border-radius:${t.radius.md};background:${t.hover};border:1px solid ${t.border};width:24px;height:24px;color:${t.fg.muted};transition:background ${t.dur.fast} ${t.ease}, border-color ${t.dur.fast} ${t.ease}, color ${t.dur.fast} ${t.ease};flex:none;justify-content:center;align-items:center;padding:3px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]:empty{background:0 0;border-color:#0000}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge] [data-slot~=dropdown-menu-icon]{color:inherit}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-badge]:not(:empty){color:${t.fg.bright}}[data-slot~=dropdown-menu-item][data-checked] [data-slot~=dropdown-menu-badge]:not(:empty),[data-slot~=dropdown-menu-item][data-checkmark] [data-slot~=dropdown-menu-badge]:not(:empty){background:color-mix(in srgb, ${t.fg.bright} 83%, ${t.surface});border-color:color-mix(in srgb, ${t.fg.bright} 40%, transparent);color:${t.surface}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]{border-radius:${t.radius.sm};opacity:0;width:26px;height:22px;transition:opacity ${t.dur.fast} ease, background ${t.dur.fast} ease;order:98;margin-block:-3px;margin-inline:0 -5px;padding:3px 5px}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-star]{opacity:.55}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]:hover{opacity:1;background:${t.hover.strong}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star][data-fav]{opacity:.95;color:${t.highlight}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-arrow]{width:12px;color:${t.fg.faint};flex:none;order:99;margin-inline-start:auto;font-size:11px}[data-slot~=dropdown-menu-item][data-state=open]{background:${t.hover}}[data-slot~=dropdown-menu-content][data-badges]>[data-slot~=dropdown-menu-item]{padding-block:5px;padding-inline:6px 10px}[data-slot~=dropdown-menu-switch]{border-radius:${dropdownMenuDef.vars["switch-radius"]};background:${t.surface.overlay};border:1px solid ${t.border.soft};width:34px;height:18px;transition:background ${t.dur.med} ease, border-color ${t.dur.med} ease;flex:none;order:99;margin-inline-start:auto;position:relative}[data-slot~=dropdown-menu-switch]:after{content:"";top:2px;background:${t.fg.muted};width:12px;height:12px;transition:transform ${t.dur.med} ease, background ${t.dur.med} ease;border-radius:50%;position:absolute;inset-inline-start:2px}[data-slot~=dropdown-menu-switch][data-on]{background
|
|
38
|
+
css`@layer vela.ui{[data-slot~=dropdown-menu-content]{background:${t.surface};color:${t.fg};border:1px solid ${t.border.strong};border-radius:${dropdownMenuDef.vars.radius};box-shadow:${t.shadow};min-width:180px;max-height:min(60vh, var(--available-height,60vh));z-index:${t.z.menu};outline:2px solid #0000;margin:0;padding:6px;font-size:13px;list-style:none;overflow-y:auto}[data-slot~=dropdown-menu-content][data-state=open]{animation:vela-menu-in ${t.dur.fast} ${t.ease}}@keyframes vela-menu-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}[data-slot~=dropdown-menu-item]{border-radius:${t.radius.sm};cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;align-items:center;gap:10px;padding:7px 10px;display:flex}[data-slot~=dropdown-menu-item][data-highlighted]{background:${t.hover}}[data-slot~=dropdown-menu-item][data-disabled]{opacity:.4;cursor:default}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-icon]{width:16px;height:16px;color:${t.fg.muted};justify-content:center;font-size:16px}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-label]{flex:auto}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-hint]{color:${t.fg.faint};font-size:${t.fontSize.sm}}[data-slot~=dropdown-menu-item][data-checked]{background:${t.hover.strong};color:${t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark]{flex:none;justify-content:center;align-items:center;width:14px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark] [data-slot~=dropdown-menu-icon]{width:14px;height:14px;color:${t.fg.bright};font-size:14px}[data-slot~=dropdown-menu-item][data-checkmark]{color:${t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]{box-sizing:border-box;border-radius:${t.radius.md};background:${t.hover};border:1px solid ${t.border};width:24px;height:24px;color:${t.fg.muted};transition:background ${t.dur.fast} ${t.ease}, border-color ${t.dur.fast} ${t.ease}, color ${t.dur.fast} ${t.ease};flex:none;justify-content:center;align-items:center;padding:3px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]:empty{background:0 0;border-color:#0000}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge] [data-slot~=dropdown-menu-icon]{color:inherit}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-badge]:not(:empty){color:${t.fg.bright}}[data-slot~=dropdown-menu-item][data-checked] [data-slot~=dropdown-menu-badge]:not(:empty),[data-slot~=dropdown-menu-item][data-checkmark] [data-slot~=dropdown-menu-badge]:not(:empty){background:color-mix(in srgb, ${t.fg.bright} 83%, ${t.surface});border-color:color-mix(in srgb, ${t.fg.bright} 40%, transparent);color:${t.surface}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]{border-radius:${t.radius.sm};opacity:0;width:26px;height:22px;transition:opacity ${t.dur.fast} ease, background ${t.dur.fast} ease;order:98;margin-block:-3px;margin-inline:0 -5px;padding:3px 5px}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-star]{opacity:.55}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]:hover{opacity:1;background:${t.hover.strong}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star][data-fav]{opacity:.95;color:${t.highlight}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-arrow]{width:12px;color:${t.fg.faint};flex:none;order:99;margin-inline-start:auto;font-size:11px}[data-slot~=dropdown-menu-item][data-state=open]{background:${t.hover}}[data-slot~=dropdown-menu-content][data-badges]>[data-slot~=dropdown-menu-item]{padding-block:5px;padding-inline:6px 10px}[data-slot~=dropdown-menu-switch]{border-radius:${dropdownMenuDef.vars["switch-radius"]};background:${t.surface.overlay};border:1px solid ${t.border.soft};width:34px;height:18px;transition:background ${t.dur.med} ease, border-color ${t.dur.med} ease;flex:none;order:99;margin-inline-start:auto;position:relative}[data-slot~=dropdown-menu-switch]:after{content:"";top:2px;background:${t.fg.muted};width:12px;height:12px;transition:transform ${t.dur.med} ease, background ${t.dur.med} ease;border-radius:50%;position:absolute;inset-inline-start:2px}[data-slot~=dropdown-menu-switch][data-on]{background:${t.selected.bg};border-color:${t.selected.bg}}[data-slot~=dropdown-menu-switch][data-on]:after{background:${t.selected.fg};transform:translate(16px)}[data-slot~=dropdown-menu-separator]{background:${t.border};height:1px;margin:4px 6px}}`
|
|
39
39
|
);
|
|
40
40
|
function menuIcon(id, doc) {
|
|
41
41
|
const el = iconEl(id, doc);
|
|
@@ -2,12 +2,12 @@ import { variants } from './chunk-LZWZV2ZS.js';
|
|
|
2
2
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
3
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
4
4
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
5
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
6
5
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
6
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
7
7
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
8
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
9
8
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
10
|
-
import { css, defineStyles } from './chunk-
|
|
9
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
10
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
import * as zagNumber from '@zag-js/number-input';
|
|
12
12
|
|
|
13
13
|
function clampNumber(n, opts) {
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { injectLayerOrder, injectStyles } from './chunk-2GQIZM5Z.js';
|
|
2
|
+
import { pageState } from './chunk-X66RJAIS.js';
|
|
3
|
+
|
|
4
|
+
// src/lib/scope.ts
|
|
5
|
+
var KIT_SCOPE = ":where(.vela-ui, .vela-ui *, .vela-ui-layer, .vela-ui-layer *, [data-vela-theme], [data-vela-theme] *)";
|
|
6
|
+
var GROUPING = /^@(?:layer|media|supports|container|scope|starting-style)\b/i;
|
|
7
|
+
var LEGACY_PSEUDO_ELEMENT = /^:(?:before|after|first-line|first-letter)(?![\w-])/i;
|
|
8
|
+
var SPACE = /\s/;
|
|
9
|
+
function skipOpaque(text, i) {
|
|
10
|
+
const c = text[i];
|
|
11
|
+
if (c === "\\") return i + 2;
|
|
12
|
+
if (c === '"' || c === "'") {
|
|
13
|
+
let j = i + 1;
|
|
14
|
+
while (j < text.length && text[j] !== c) j += text[j] === "\\" ? 2 : 1;
|
|
15
|
+
return j + 1;
|
|
16
|
+
}
|
|
17
|
+
if (c === "/" && text[i + 1] === "*") {
|
|
18
|
+
const end = text.indexOf("*/", i + 2);
|
|
19
|
+
return end < 0 ? text.length : end + 2;
|
|
20
|
+
}
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
function withoutComments(text) {
|
|
24
|
+
let out = "";
|
|
25
|
+
for (let i = 0; i < text.length; ) {
|
|
26
|
+
const next = skipOpaque(text, i);
|
|
27
|
+
if (next === i) out += text[i++];
|
|
28
|
+
else {
|
|
29
|
+
if (text[i] !== "/") out += text.slice(i, next);
|
|
30
|
+
i = next;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
function selectorsOf(list) {
|
|
36
|
+
const out = [];
|
|
37
|
+
let depth = 0;
|
|
38
|
+
let start = 0;
|
|
39
|
+
for (let i = 0; i < list.length; ) {
|
|
40
|
+
const next = skipOpaque(list, i);
|
|
41
|
+
if (next !== i) {
|
|
42
|
+
i = next;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const c = list[i];
|
|
46
|
+
if (c === "(" || c === "[") depth += 1;
|
|
47
|
+
else if (c === ")" || c === "]") depth -= 1;
|
|
48
|
+
else if (c === "," && depth === 0) {
|
|
49
|
+
out.push(list.slice(start, i).trim());
|
|
50
|
+
start = i + 1;
|
|
51
|
+
}
|
|
52
|
+
i += 1;
|
|
53
|
+
}
|
|
54
|
+
out.push(list.slice(start).trim());
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function scopeSelector(selector) {
|
|
58
|
+
if (!selector || /^[>+~]/.test(selector)) return selector;
|
|
59
|
+
let depth = 0;
|
|
60
|
+
let i = 0;
|
|
61
|
+
while (i < selector.length) {
|
|
62
|
+
const next = skipOpaque(selector, i);
|
|
63
|
+
if (next !== i) {
|
|
64
|
+
i = next;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const c = selector[i];
|
|
68
|
+
if (c === "(" || c === "[") depth += 1;
|
|
69
|
+
else if (c === ")" || c === "]") depth -= 1;
|
|
70
|
+
else if (depth === 0 && (SPACE.test(c) || c === ">" || c === "+" || c === "~")) break;
|
|
71
|
+
else if (depth === 0 && c === ":" && (selector[i + 1] === ":" || LEGACY_PSEUDO_ELEMENT.test(selector.slice(i)))) break;
|
|
72
|
+
i += 1;
|
|
73
|
+
}
|
|
74
|
+
return selector.slice(0, i) + KIT_SCOPE + selector.slice(i);
|
|
75
|
+
}
|
|
76
|
+
function scopeToKit(text) {
|
|
77
|
+
let out = "";
|
|
78
|
+
let copied = 0;
|
|
79
|
+
let start = 0;
|
|
80
|
+
let scoping = true;
|
|
81
|
+
const outer = [];
|
|
82
|
+
for (let i = 0; i < text.length; ) {
|
|
83
|
+
const next = skipOpaque(text, i);
|
|
84
|
+
if (next !== i) {
|
|
85
|
+
i = next;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const c = text[i];
|
|
89
|
+
if (c === ";") {
|
|
90
|
+
start = i + 1;
|
|
91
|
+
} else if (c === "{") {
|
|
92
|
+
const prelude = text.slice(start, i);
|
|
93
|
+
const head = withoutComments(prelude).trim();
|
|
94
|
+
outer.push(scoping);
|
|
95
|
+
if (head.startsWith("@")) {
|
|
96
|
+
scoping && (scoping = GROUPING.test(head));
|
|
97
|
+
} else {
|
|
98
|
+
if (scoping && head) {
|
|
99
|
+
const lead = /^\s*/.exec(prelude)[0];
|
|
100
|
+
const trail = /\s*$/.exec(prelude)[0];
|
|
101
|
+
out += text.slice(copied, start) + lead + selectorsOf(head).map(scopeSelector).join(", ") + trail;
|
|
102
|
+
copied = i;
|
|
103
|
+
}
|
|
104
|
+
scoping = false;
|
|
105
|
+
}
|
|
106
|
+
start = i + 1;
|
|
107
|
+
} else if (c === "}") {
|
|
108
|
+
scoping = outer.pop() ?? true;
|
|
109
|
+
start = i + 1;
|
|
110
|
+
}
|
|
111
|
+
i += 1;
|
|
112
|
+
}
|
|
113
|
+
return out + text.slice(copied);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// src/lib/css.ts
|
|
117
|
+
var written = pageState("written-css@1", () => /* @__PURE__ */ new Set());
|
|
118
|
+
function css(strings, ...values) {
|
|
119
|
+
let out = strings[0] ?? "";
|
|
120
|
+
for (let i = 0; i < values.length; i += 1) out += String(values[i]) + (strings[i + 1] ?? "");
|
|
121
|
+
written.add(out);
|
|
122
|
+
return out;
|
|
123
|
+
}
|
|
124
|
+
function isWrittenCss(text) {
|
|
125
|
+
return written.has(text);
|
|
126
|
+
}
|
|
127
|
+
function acceptCss(text) {
|
|
128
|
+
written.add(text);
|
|
129
|
+
}
|
|
130
|
+
function defineStyles(id, text) {
|
|
131
|
+
const injected = /* @__PURE__ */ new WeakMap();
|
|
132
|
+
let scoped;
|
|
133
|
+
return (root = document) => {
|
|
134
|
+
if (injected.get(root)?.isConnected) return;
|
|
135
|
+
injectLayerOrder(root);
|
|
136
|
+
injectStyles(id, scoped ?? (scoped = scopeToKit(text)), root);
|
|
137
|
+
const sheet = root.getElementById?.(id) ?? (root instanceof Document ? null : root.querySelector(`#${CSS.escape(id)}`));
|
|
138
|
+
if (sheet) injected.set(root, sheet);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { acceptCss, css, defineStyles, isWrittenCss };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
|
-
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-OBLIX3VN.js';
|
|
3
2
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
4
|
-
import {
|
|
3
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-B5ZSRUDQ.js';
|
|
5
4
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
5
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
6
6
|
import { addSlot, h } from './chunk-Q6WTDVH6.js';
|
|
7
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
8
7
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
9
|
-
import { css, defineStyles } from './chunk-
|
|
8
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
9
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
10
10
|
import * as zagListbox from '@zag-js/listbox';
|
|
11
11
|
|
|
12
12
|
function selectController(opts) {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { a as VariantProps, V as VariantFn } from './variants-B4stUBnY.js';
|
|
2
|
+
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
3
|
+
import './t.js';
|
|
4
|
+
|
|
5
|
+
declare const collapsibleDef: ComponentDef<"collapsible", "root" | "count" | "title" | "icon" | "trigger" | "content" | "chevron", "radius" | "trigger-height">;
|
|
6
|
+
declare const collapsibleVariants: VariantFn<{
|
|
7
|
+
readonly variant: readonly ["default", "label"];
|
|
8
|
+
}>;
|
|
9
|
+
type CollapsibleVariant = (typeof collapsibleVariants.spec.variant)[number];
|
|
10
|
+
interface CollapsibleProps extends VariantProps<typeof collapsibleVariants> {
|
|
11
|
+
/** The header's text. Without `trigger`, the collapsible draws its header with it. */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** After the title, muted: a count, a total. Null shows none. */
|
|
14
|
+
count?: string | number | null;
|
|
15
|
+
/** Icon id from the kit's registry, before the title. */
|
|
16
|
+
icon?: string;
|
|
17
|
+
/** A host element that toggles the content instead of the header (a row's chevron
|
|
18
|
+
* button): it gets `aria-expanded`, `aria-controls` and `data-state`, and a click on it
|
|
19
|
+
* toggles. The root then holds only the content. */
|
|
20
|
+
trigger?: HTMLElement;
|
|
21
|
+
/** The content, or a function that fills the content element. */
|
|
22
|
+
content?: Node | ((content: HTMLElement) => void);
|
|
23
|
+
/** Open when created (default closed). */
|
|
24
|
+
defaultOpen?: boolean;
|
|
25
|
+
/** Opened or closed by the user. */
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Extra class names (layout hooks). */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
interface CollapsibleHandle {
|
|
32
|
+
readonly el: HTMLElement;
|
|
33
|
+
/** What toggles it: its header, or the host's `trigger`. */
|
|
34
|
+
readonly trigger: HTMLElement;
|
|
35
|
+
/** The element that holds the content. */
|
|
36
|
+
readonly content: HTMLElement;
|
|
37
|
+
readonly open: boolean;
|
|
38
|
+
/** Open or close it without calling `onOpenChange`. */
|
|
39
|
+
setOpen(open: boolean): void;
|
|
40
|
+
/** A new header text (its own header only). */
|
|
41
|
+
setTitle(title: string): void;
|
|
42
|
+
/** A new count (its own header only); null hides it. */
|
|
43
|
+
setCount(count: string | number | null): void;
|
|
44
|
+
setDisabled(disabled: boolean): void;
|
|
45
|
+
destroy(): void;
|
|
46
|
+
}
|
|
47
|
+
declare function createCollapsible(props?: CollapsibleProps): CollapsibleHandle;
|
|
48
|
+
|
|
49
|
+
export { type CollapsibleHandle, type CollapsibleProps, type CollapsibleVariant, collapsibleDef, collapsibleVariants, createCollapsible };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
|
+
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
|
+
import { nextUid } from './chunk-P4MTEMT7.js';
|
|
4
|
+
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
+
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
7
|
+
import './chunk-2GQIZM5Z.js';
|
|
8
|
+
import './chunk-BXMWQIBO.js';
|
|
9
|
+
import './chunk-X66RJAIS.js';
|
|
10
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
11
|
+
|
|
12
|
+
// src/components/collapsible.ts
|
|
13
|
+
var collapsibleDef = defineComponent({
|
|
14
|
+
name: "collapsible",
|
|
15
|
+
parts: ["root", "trigger", "icon", "title", "count", "chevron", "content"],
|
|
16
|
+
settings: { "trigger-height": "36px", radius: t.radius.md }
|
|
17
|
+
});
|
|
18
|
+
var collapsibleVariants = variants({ variant: ["default", "label"] });
|
|
19
|
+
var injectStyles = defineStyles(
|
|
20
|
+
"vela-ui-collapsible",
|
|
21
|
+
css`@layer vela.ui{[data-slot=collapsible]{min-width:0}[data-slot=collapsible-trigger]:where(:not([hidden])){all:unset;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;align-items:center;gap:8px;width:100%;display:flex}[data-slot=collapsible-trigger]:where(:not([hidden])):focus-visible{outline:2px solid ${t.focus};outline-offset:-2px}[data-slot=collapsible-trigger]:where(:not([hidden]))[data-disabled]{cursor:default;opacity:.5}[data-slot=collapsible-trigger]:where(:not([hidden]))[data-variant=default]{min-height:${collapsibleDef.vars["trigger-height"]};border-radius:${collapsibleDef.vars.radius};color:${t.fg.bright};transition:background ${t.dur.fast} ease;padding:0 12px;font-size:13px;font-weight:600}[data-slot=collapsible-trigger]:where(:not([hidden]))[data-variant=default]:not([data-disabled]):hover{background:${t.hover}}[data-slot=collapsible-trigger]:where(:not([hidden]))[data-variant=label]{color:${t.fg.muted};letter-spacing:.08em;text-transform:uppercase;transition:color ${t.dur.fast} ease;gap:6px;padding:10px 4px 4px;font-size:10px;font-weight:700}[data-slot=collapsible-trigger]:where(:not([hidden]))[data-variant=label]:not([data-disabled]):hover{color:${t.fg}}[data-slot=collapsible-title]{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}[data-slot=collapsible-count]{color:${t.fg.muted};font-variant-numeric:tabular-nums;flex:none;font-size:12px;font-weight:400}[data-slot=collapsible-count]:is([data-variant=label]>*){color:${t.fg.faint};font-size:inherit;letter-spacing:0;font-weight:600}[data-slot~=collapsible-icon],[data-slot~=collapsible-chevron]{flex:none;width:1em;height:1em;font-size:16px;line-height:0}:is([data-slot~=collapsible-icon],[data-slot~=collapsible-chevron])>svg{width:100%;height:100%}[data-slot=collapsible-chevron]{color:${t.fg.muted};transition:transform ${t.dur.med} ease;font-size:14px}[data-slot=collapsible-chevron]:is([data-variant=default]>*){margin-inline-start:auto}[data-slot=collapsible-chevron]:is([data-variant=label]>*){color:inherit;font-size:12px}[data-slot=collapsible-chevron]:is([data-variant=default][data-state=open]>*){transform:rotate(180deg)}[data-slot=collapsible-chevron]:is([data-variant=label][data-state=closed]>*){transform:rotate(-90deg)}[data-slot=collapsible-chevron]:is([data-variant=label][data-state=closed]>*):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){transform:rotate(90deg)}}`
|
|
22
|
+
);
|
|
23
|
+
var CollapsibleImpl = class {
|
|
24
|
+
constructor(props) {
|
|
25
|
+
this.props = props;
|
|
26
|
+
this.countEl = null;
|
|
27
|
+
this.onClick = () => {
|
|
28
|
+
if (this.disabled) return;
|
|
29
|
+
this.paint(!this.isOpen);
|
|
30
|
+
this.props.onOpenChange?.(this.isOpen);
|
|
31
|
+
};
|
|
32
|
+
injectStyles(document);
|
|
33
|
+
const variant = collapsibleVariants.resolve(props).variant;
|
|
34
|
+
this.isOpen = props.defaultOpen ?? false;
|
|
35
|
+
this.disabled = props.disabled ?? false;
|
|
36
|
+
const id = nextUid("vela-collapsible");
|
|
37
|
+
this.content = h("div", { slot: collapsibleDef.slot("content"), attrs: { id } });
|
|
38
|
+
if (props.content instanceof Node) this.content.appendChild(props.content);
|
|
39
|
+
else props.content?.(this.content);
|
|
40
|
+
this.own = !props.trigger;
|
|
41
|
+
if (props.trigger) {
|
|
42
|
+
this.trigger = props.trigger;
|
|
43
|
+
this.titleEl = null;
|
|
44
|
+
} else {
|
|
45
|
+
let icon = null;
|
|
46
|
+
if (props.icon) {
|
|
47
|
+
icon = iconEl(props.icon, document);
|
|
48
|
+
icon.dataset.slot = collapsibleDef.slot("icon");
|
|
49
|
+
}
|
|
50
|
+
const chevron = iconEl("chevron-down", document);
|
|
51
|
+
chevron.dataset.slot = collapsibleDef.slot("chevron");
|
|
52
|
+
this.titleEl = h("span", { slot: collapsibleDef.slot("title"), text: props.title ?? "" });
|
|
53
|
+
this.trigger = h(
|
|
54
|
+
"button",
|
|
55
|
+
{ slot: collapsibleDef.slot("trigger"), data: { variant }, attrs: { type: "button" } },
|
|
56
|
+
variant === "label" ? chevron : null,
|
|
57
|
+
icon,
|
|
58
|
+
this.titleEl,
|
|
59
|
+
variant === "label" ? null : chevron
|
|
60
|
+
);
|
|
61
|
+
this.setCount(props.count ?? null);
|
|
62
|
+
}
|
|
63
|
+
this.trigger.setAttribute("aria-controls", id);
|
|
64
|
+
this.trigger.addEventListener("click", this.onClick);
|
|
65
|
+
this.el = h("div", { className: props.className, slot: collapsibleDef.slot("root"), data: { variant } }, this.own ? this.trigger : null, this.content);
|
|
66
|
+
this.paint(this.isOpen);
|
|
67
|
+
this.setDisabled(this.disabled);
|
|
68
|
+
}
|
|
69
|
+
get open() {
|
|
70
|
+
return this.isOpen;
|
|
71
|
+
}
|
|
72
|
+
setOpen(open) {
|
|
73
|
+
this.paint(open);
|
|
74
|
+
}
|
|
75
|
+
setTitle(title) {
|
|
76
|
+
if (this.titleEl) this.titleEl.textContent = title;
|
|
77
|
+
}
|
|
78
|
+
setCount(count) {
|
|
79
|
+
if (!this.own) return;
|
|
80
|
+
this.countEl?.remove();
|
|
81
|
+
this.countEl = count === null || count === "" ? null : h("span", { slot: collapsibleDef.slot("count"), text: String(count) });
|
|
82
|
+
if (this.countEl) this.titleEl.after(this.countEl);
|
|
83
|
+
}
|
|
84
|
+
setDisabled(disabled) {
|
|
85
|
+
this.disabled = disabled;
|
|
86
|
+
this.trigger.toggleAttribute("data-disabled", disabled);
|
|
87
|
+
if (this.trigger instanceof HTMLButtonElement) this.trigger.disabled = disabled;
|
|
88
|
+
else if (disabled) this.trigger.setAttribute("aria-disabled", "true");
|
|
89
|
+
else this.trigger.removeAttribute("aria-disabled");
|
|
90
|
+
}
|
|
91
|
+
destroy() {
|
|
92
|
+
this.trigger.removeEventListener("click", this.onClick);
|
|
93
|
+
}
|
|
94
|
+
paint(open) {
|
|
95
|
+
this.isOpen = open;
|
|
96
|
+
const state = open ? "open" : "closed";
|
|
97
|
+
this.trigger.setAttribute("aria-expanded", String(open));
|
|
98
|
+
for (const el of [this.trigger, this.content, this.el]) el?.setAttribute("data-state", state);
|
|
99
|
+
this.content.hidden = !open;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
function createCollapsible(props = {}) {
|
|
103
|
+
return new CollapsibleImpl(props);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { collapsibleDef, collapsibleVariants, createCollapsible };
|
package/dist/color-picker.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { ColorField, blendOver, buildColorPicker, buildPalette, closeColorPopover, colorField, colorPickerController, colorPickerDef, combineColor, createColorField, hslHex, splitColor, transparencyChecker } from './chunk-
|
|
2
|
-
import './chunk-OBLIX3VN.js';
|
|
1
|
+
export { ColorField, blendOver, buildColorPicker, buildPalette, closeColorPopover, colorField, colorPickerController, colorPickerDef, combineColor, createColorField, hslHex, splitColor, transparencyChecker } from './chunk-MJ4RUGX7.js';
|
|
3
2
|
import './chunk-FVH6L7FM.js';
|
|
4
3
|
import './chunk-FN2BUFNM.js';
|
|
4
|
+
import './chunk-B5ZSRUDQ.js';
|
|
5
5
|
import './chunk-J2QJATCD.js';
|
|
6
6
|
import './chunk-S7USVSYP.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-V2Q4MRMS.js';
|
|
8
8
|
import './chunk-TAKSIV57.js';
|
|
9
9
|
import './chunk-MMTMOV6R.js';
|
|
10
10
|
import './chunk-3Q32K4PE.js';
|
|
11
|
-
import './chunk-P4MTEMT7.js';
|
|
12
11
|
import './chunk-A72NWYNP.js';
|
|
12
|
+
import './chunk-P4MTEMT7.js';
|
|
13
13
|
import './chunk-Q6WTDVH6.js';
|
|
14
|
-
import './chunk-6QCILIT2.js';
|
|
15
14
|
import './chunk-VMCR3S2A.js';
|
|
16
|
-
import './chunk-
|
|
15
|
+
import './chunk-XBEL4K33.js';
|
|
17
16
|
import './chunk-2GQIZM5Z.js';
|
|
18
17
|
import './chunk-BXMWQIBO.js';
|
|
19
18
|
import './chunk-X66RJAIS.js';
|
|
19
|
+
import './chunk-6QCILIT2.js';
|
package/dist/context-menu.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { DropdownMenu } from './chunk-
|
|
1
|
+
import { DropdownMenu } from './chunk-WGULXRWD.js';
|
|
2
2
|
import './chunk-G7IQLY3A.js';
|
|
3
3
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
4
4
|
import './chunk-FN2BUFNM.js';
|
|
5
5
|
import './chunk-J2QJATCD.js';
|
|
6
6
|
import './chunk-S7USVSYP.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-V2Q4MRMS.js';
|
|
8
8
|
import './chunk-TAKSIV57.js';
|
|
9
9
|
import './chunk-MMTMOV6R.js';
|
|
10
10
|
import './chunk-3Q32K4PE.js';
|
|
11
|
-
import './chunk-P4MTEMT7.js';
|
|
12
11
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
12
|
+
import './chunk-P4MTEMT7.js';
|
|
13
13
|
import './chunk-Q6WTDVH6.js';
|
|
14
|
-
import './chunk-6QCILIT2.js';
|
|
15
14
|
import './chunk-VMCR3S2A.js';
|
|
16
|
-
import './chunk-
|
|
15
|
+
import './chunk-XBEL4K33.js';
|
|
17
16
|
import './chunk-2GQIZM5Z.js';
|
|
18
17
|
import './chunk-BXMWQIBO.js';
|
|
19
18
|
import './chunk-X66RJAIS.js';
|
|
19
|
+
import './chunk-6QCILIT2.js';
|
|
20
20
|
|
|
21
21
|
// src/components/context-menu.ts
|
|
22
22
|
var LONG_PRESS_MS = 500;
|
package/dist/css.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ declare function isWrittenCss(text: string): boolean;
|
|
|
9
9
|
/** Accept a CSS text from data as if code wrote it (a host's explicit `allowCss`). */
|
|
10
10
|
declare function acceptCss(text: string): void;
|
|
11
11
|
/** A component's stylesheet: call the result with the root it renders in, at creation, never
|
|
12
|
-
* at import (a component nobody creates injects nothing).
|
|
12
|
+
* at import (a component nobody creates injects nothing). Its rules apply inside kit hosts,
|
|
13
|
+
* their floating layers and themed hosts only: the page's own elements may carry the same
|
|
14
|
+
* part names. */
|
|
13
15
|
declare function defineStyles(id: string, text: string): (root?: Document | ShadowRoot) => void;
|
|
14
16
|
|
|
15
17
|
export { acceptCss, css, defineStyles, isWrittenCss };
|
package/dist/css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { acceptCss, css, defineStyles, isWrittenCss } from './chunk-
|
|
1
|
+
export { acceptCss, css, defineStyles, isWrittenCss } from './chunk-XBEL4K33.js';
|
|
2
2
|
export { LAYER_ORDER, injectLayerOrder } from './chunk-2GQIZM5Z.js';
|
|
3
3
|
import './chunk-BXMWQIBO.js';
|
|
4
4
|
import './chunk-X66RJAIS.js';
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import './define-D5u3F5Dj.js';
|
|
1
|
+
import { C as Child } from './h-Bl37qUis.js';
|
|
2
|
+
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
3
3
|
import './t.js';
|
|
4
|
+
|
|
5
|
+
declare const dataTableDef: ComponentDef<"data-table", "root" | "head" | "table" | "sort" | "actions" | "row" | "cell" | "empty", "row-height" | "head-height" | "head-z">;
|
|
6
|
+
interface DataTableColumn<T> {
|
|
7
|
+
id: string;
|
|
8
|
+
header: string;
|
|
9
|
+
/** What the header stands for, on hover (`MFE`: maximum favorable excursion). */
|
|
10
|
+
title?: string;
|
|
11
|
+
align?: 'start' | 'end' | 'center';
|
|
12
|
+
width?: string;
|
|
13
|
+
/** The cell's content; a string or a number renders as text. */
|
|
14
|
+
cell(row: T): Child;
|
|
15
|
+
/** The value the column sorts by; without it the column does not sort. */
|
|
16
|
+
sort?(row: T): number | string;
|
|
17
|
+
tone?(row: T): 'profit' | 'loss' | 'muted' | null;
|
|
18
|
+
}
|
|
19
|
+
interface DataTableProps<T> {
|
|
20
|
+
columns: readonly DataTableColumn<T>[];
|
|
21
|
+
rowKey(row: T): string;
|
|
22
|
+
onRowClick?(row: T, e: MouseEvent): void;
|
|
23
|
+
/** What shows when there are no rows. */
|
|
24
|
+
empty?: () => HTMLElement;
|
|
25
|
+
/** The initial sort. */
|
|
26
|
+
sort?: {
|
|
27
|
+
column: string;
|
|
28
|
+
dir: 'asc' | 'desc';
|
|
29
|
+
};
|
|
30
|
+
/** Extra class names (layout hooks). */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
interface DataTableHandle<T> {
|
|
34
|
+
readonly el: HTMLElement;
|
|
35
|
+
setRows(rows: readonly T[]): void;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
38
|
+
declare function createDataTable<T>(props: DataTableProps<T>): DataTableHandle<T>;
|
|
39
|
+
|
|
40
|
+
export { type DataTableColumn, type DataTableHandle, type DataTableProps, createDataTable, dataTableDef };
|
package/dist/data-table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h, append } from './chunk-Q6WTDVH6.js';
|
|
2
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
3
2
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
4
|
-
import { defineStyles, css } from './chunk-
|
|
3
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
5
4
|
import './chunk-2GQIZM5Z.js';
|
|
6
5
|
import './chunk-BXMWQIBO.js';
|
|
7
6
|
import './chunk-X66RJAIS.js';
|
|
7
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
8
8
|
|
|
9
9
|
// src/components/data-table.ts
|
|
10
10
|
var dataTableDef = defineComponent({
|
package/dist/date-picker.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare function isoDate(d: Date): string;
|
|
|
61
61
|
declare function normalizeDateInput(raw: string): string | null;
|
|
62
62
|
/** The calendar's panels, navigation and selection, without DOM. */
|
|
63
63
|
declare function datePickerController(opts?: DatePickerControllerOptions): DatePickerController;
|
|
64
|
-
declare const datePickerDef: ComponentDef<"date-picker", "
|
|
64
|
+
declare const datePickerDef: ComponentDef<"date-picker", "root" | "head" | "nav" | "title" | "switch" | "grid" | "cell" | "day" | "week" | "cells" | "blank", "radius" | "today-ring">;
|
|
65
65
|
interface DatePickerOptions extends DatePickerControllerOptions {
|
|
66
66
|
/** A day was picked (`YYYY-MM-DD`). */
|
|
67
67
|
onPick?: (value: string) => void;
|
package/dist/date-picker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { calendarSettings, monthNames, yearLabel, weekdayNames, yearBeforeMonth, plainInteger } from './chunk-
|
|
1
|
+
import { calendarSettings, monthNames, yearLabel, weekdayNames, yearBeforeMonth, plainInteger } from './chunk-GVRX3UAV.js';
|
|
2
2
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
3
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
4
4
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
6
5
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
7
|
-
import { defineStyles, css } from './chunk-
|
|
6
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
8
7
|
import './chunk-2GQIZM5Z.js';
|
|
9
8
|
import './chunk-BXMWQIBO.js';
|
|
10
9
|
import './chunk-X66RJAIS.js';
|
|
10
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
|
|
12
12
|
// src/components/date-picker.ts
|
|
13
13
|
var NAV = {
|
package/dist/dialog.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ interface DialogController {
|
|
|
20
20
|
}
|
|
21
21
|
/** Zag's dialog machine with the options mapped onto it, for any view layer. */
|
|
22
22
|
declare function dialogController(opts?: DialogControllerOptions): DialogController;
|
|
23
|
-
declare const dialogDef: ComponentDef<"dialog", "
|
|
23
|
+
declare const dialogDef: ComponentDef<"dialog", "backdrop" | "body" | "footer" | "header" | "title" | "close" | "content" | "positioner", "radius">;
|
|
24
24
|
type DialogVariant = 'default' | 'settings' | 'form';
|
|
25
25
|
interface DialogOptions extends DialogControllerOptions {
|
|
26
26
|
title?: string;
|
package/dist/dialog.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isPopoverOpen, eventDismissedPopover, closeOpenPopovers } from './chunk-OBLIX3VN.js';
|
|
2
1
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
2
|
+
import { isPopoverOpen, eventDismissedPopover, closeOpenPopovers } from './chunk-B5ZSRUDQ.js';
|
|
3
3
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
4
4
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-V2Q4MRMS.js';
|
|
6
6
|
import './chunk-TAKSIV57.js';
|
|
7
7
|
import './chunk-MMTMOV6R.js';
|
|
8
8
|
import './chunk-3Q32K4PE.js';
|
|
9
|
-
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
|
|
10
9
|
import { disposeWithin } from './chunk-A72NWYNP.js';
|
|
10
|
+
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
|
|
11
11
|
import './chunk-Q6WTDVH6.js';
|
|
12
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
13
12
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
14
|
-
import { defineStyles, css } from './chunk-
|
|
13
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
15
14
|
import { injectStyles } from './chunk-2GQIZM5Z.js';
|
|
16
15
|
import './chunk-BXMWQIBO.js';
|
|
17
16
|
import './chunk-X66RJAIS.js';
|
|
17
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
18
18
|
import * as dialog from '@zag-js/dialog';
|
|
19
19
|
|
|
20
20
|
function dialogController(opts = {}) {
|
package/dist/donut.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
2
2
|
import './t.js';
|
|
3
3
|
|
|
4
|
-
declare const donutDef: ComponentDef<"donut", "caption" | "figure" | "label" | "legend" | "track" | "
|
|
4
|
+
declare const donutDef: ComponentDef<"donut", "root" | "caption" | "figure" | "label" | "legend" | "track" | "swatch" | "value" | "ring" | "segment" | "item", "swatch-radius">;
|
|
5
5
|
interface DonutSegment {
|
|
6
6
|
value: number;
|
|
7
7
|
label: string;
|
package/dist/donut.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
2
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
3
2
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
4
|
-
import { defineStyles, css } from './chunk-
|
|
3
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
5
4
|
import './chunk-2GQIZM5Z.js';
|
|
6
5
|
import './chunk-BXMWQIBO.js';
|
|
7
6
|
import './chunk-X66RJAIS.js';
|
|
7
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
8
8
|
|
|
9
9
|
// src/components/donut.ts
|
|
10
10
|
var donutDef = defineComponent({
|
package/dist/drawer.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface DrawerController {
|
|
|
21
21
|
}
|
|
22
22
|
/** Zag's dialog machine with the drawer's defaults, for any view layer. */
|
|
23
23
|
declare function drawerController(opts?: DrawerControllerOptions): DrawerController;
|
|
24
|
-
declare const drawerDef: ComponentDef<"drawer", "
|
|
24
|
+
declare const drawerDef: ComponentDef<"drawer", "backdrop" | "body" | "title" | "content" | "positioner" | "grab", "radius" | "edge-radius" | "side-width" | "grab-radius">;
|
|
25
25
|
type DrawerProps = DrawerOptions;
|
|
26
26
|
type DrawerDirection = 'top' | 'right' | 'bottom' | 'left';
|
|
27
27
|
interface DrawerOptions extends DrawerControllerOptions {
|
package/dist/drawer.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
2
2
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
3
|
-
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
|
|
4
3
|
import { disposeWithin } from './chunk-A72NWYNP.js';
|
|
5
|
-
import {
|
|
4
|
+
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
|
|
6
5
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
7
|
-
import { defineStyles, css } from './chunk-
|
|
6
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
8
7
|
import './chunk-2GQIZM5Z.js';
|
|
9
8
|
import './chunk-BXMWQIBO.js';
|
|
10
9
|
import './chunk-X66RJAIS.js';
|
|
10
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
import * as dialog from '@zag-js/dialog';
|
|
12
12
|
|
|
13
13
|
function drawerController(opts = {}) {
|
package/dist/dropdown-menu.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ interface DropdownMenuController {
|
|
|
67
67
|
}
|
|
68
68
|
/** Zag's menu machine with the options mapped onto it, for any view layer. */
|
|
69
69
|
declare function dropdownMenuController(opts: DropdownMenuControllerOptions): DropdownMenuController;
|
|
70
|
-
declare const dropdownMenuDef: ComponentDef<"dropdown-menu", "
|
|
70
|
+
declare const dropdownMenuDef: ComponentDef<"dropdown-menu", "badge" | "label" | "mark" | "switch" | "star" | "icon" | "content" | "item" | "hint" | "arrow" | "separator", "radius" | "switch-radius">;
|
|
71
71
|
type DropdownMenuProps = DropdownMenuOptions;
|
|
72
72
|
interface DropdownMenuOptions extends DropdownMenuControllerOptions {
|
|
73
73
|
/** Element that opens the menu on click (gets the machine's trigger props). */
|