@luxalgo/vela-ui 0.2.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.
- package/CHANGELOG.md +153 -91
- package/LICENSE +201 -201
- package/NOTICE +28 -28
- package/README.md +86 -86
- package/cli/engine.mjs +282 -282
- package/cli/index.mjs +154 -154
- 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 +5 -5
- package/dist/{chunk-B5ZSRUDQ.js → chunk-BWSOMG3G.js} +2 -2
- package/dist/{chunk-G7IQLY3A.js → chunk-C3PXY2SW.js} +5 -0
- package/dist/{chunk-CC3DDNFC.js → chunk-DXDCKZ2M.js} +4 -4
- package/dist/chunk-GUIYFQ27.js +30 -0
- package/dist/{chunk-WGULXRWD.js → chunk-KUWTI2PE.js} +4 -4
- package/dist/{chunk-Z5PINFQO.js → chunk-QGWAN3EP.js} +5 -5
- package/dist/{chunk-V2Q4MRMS.js → chunk-RH53NQGE.js} +30 -4
- package/dist/{chunk-WBGSYCV2.js → chunk-SKFAYTDK.js} +4 -4
- package/dist/{chunk-MJ4RUGX7.js → chunk-TGJNHUYV.js} +3 -3
- package/dist/{chunk-WXH3EFV5.js → chunk-VC7SVSDK.js} +4 -4
- package/dist/{chunk-7VMN7NKJ.js → chunk-YT2BSP7O.js} +3 -3
- package/dist/collapsible.d.ts +1 -1
- package/dist/collapsible.js +3 -3
- package/dist/color-picker.js +5 -5
- package/dist/context-menu.js +5 -5
- 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 +15 -5
- package/dist/donut.d.ts +1 -1
- package/dist/donut.js +1 -1
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +2 -2
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +5 -5
- package/dist/empty.d.ts +1 -1
- package/dist/empty.js +2 -2
- package/dist/field.js +13 -13
- package/dist/{stat.d.ts → figure.d.ts} +9 -9
- package/dist/figure.js +41 -0
- 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 +4 -2
- 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 +691 -74
- package/dist/month-grid.js +1 -1
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +5 -5
- package/dist/popover.js +3 -3
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/scatter-chart.js +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +7 -7
- package/dist/slider.d.ts +1 -1
- package/dist/slider.js +2 -2
- package/dist/sort-button.js +4 -4
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +3 -3
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +4 -4
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +2 -2
- package/dist/theme-TefB8vtl.d.ts +341 -0
- package/dist/theme.d.ts +42 -192
- package/dist/theme.js +1 -1
- package/dist/theme.schema.json +321 -30
- 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 +4 -4
- package/dist/tooltip.js +2 -2
- package/dist/treemap.d.ts +80 -0
- package/dist/treemap.js +470 -0
- package/dist/zag.d.ts +11 -2
- package/dist/zag.js +1 -1
- package/docs/theming.md +217 -217
- package/docs/what-to-change.md +20 -20
- package/docs/writing-a-component.md +250 -250
- package/llms.txt +6 -3
- package/package.json +90 -90
- package/registry/badge.ts +119 -119
- package/registry/bar-chart.ts +215 -215
- package/registry/button.ts +387 -379
- package/registry/callout-bubble.ts +347 -347
- package/registry/card.ts +379 -0
- package/registry/checkbox.ts +234 -234
- package/registry/collapsible.ts +271 -271
- package/registry/color-picker.ts +582 -582
- package/registry/context-menu.ts +208 -208
- package/registry/data-table.ts +215 -215
- package/registry/date-picker.ts +483 -483
- package/registry/dialog.ts +551 -535
- package/registry/donut.ts +145 -145
- package/registry/drawer.ts +636 -636
- package/registry/dropdown-menu.ts +762 -762
- package/registry/empty.ts +91 -91
- package/registry/field.ts +584 -584
- package/registry/{stat.ts → figure.ts} +96 -96
- package/registry/glyph-select.ts +268 -268
- package/registry/hover-card.ts +222 -222
- package/registry/input-group.ts +229 -229
- package/registry/input.ts +181 -181
- package/registry/item.ts +376 -376
- package/registry/kbd.ts +64 -64
- package/registry/line-chart.ts +218 -218
- package/registry/month-grid.ts +328 -328
- package/registry/number-input.ts +443 -443
- package/registry/popover.ts +368 -368
- package/registry/scatter-chart.ts +221 -221
- package/registry/select.ts +620 -620
- package/registry/slider.ts +259 -259
- package/registry/sort-button.ts +189 -189
- package/registry/sparkline.ts +114 -114
- package/registry/switch.ts +205 -205
- package/registry/tabs.ts +426 -426
- package/registry/text-area.ts +186 -186
- package/registry/toast.ts +965 -0
- package/registry/toggle-group.ts +295 -295
- package/registry/tooltip.ts +156 -156
- package/registry/treemap.ts +847 -0
- package/skills/theming-vela-ui/SKILL.md +137 -137
- package/skills/using-vela-ui-components/SKILL.md +139 -137
- package/skills/writing-vela-ui-components/SKILL.md +163 -163
- package/src/components/badge.ts +119 -119
- package/src/components/bar-chart.ts +215 -215
- package/src/components/button.ts +387 -379
- package/src/components/callout-bubble.ts +347 -347
- package/src/components/card.ts +379 -0
- package/src/components/checkbox.ts +234 -234
- package/src/components/collapsible.ts +271 -271
- package/src/components/color-picker.ts +582 -582
- package/src/components/context-menu.ts +208 -208
- package/src/components/data-table.ts +215 -215
- package/src/components/date-picker.ts +483 -483
- package/src/components/dialog.ts +551 -535
- package/src/components/donut.ts +145 -145
- package/src/components/drawer.ts +636 -636
- package/src/components/dropdown-menu.ts +762 -762
- package/src/components/empty.ts +91 -91
- package/src/components/field.ts +584 -584
- package/src/components/{stat.ts → figure.ts} +96 -96
- package/src/components/glyph-select.ts +268 -268
- package/src/components/hover-card.ts +222 -222
- package/src/components/input-group.ts +229 -229
- package/src/components/input.ts +181 -181
- package/src/components/item.ts +376 -376
- package/src/components/kbd.ts +64 -64
- package/src/components/line-chart.ts +218 -218
- package/src/components/month-grid.ts +328 -328
- package/src/components/number-input.ts +443 -443
- package/src/components/popover.ts +368 -368
- package/src/components/scatter-chart.ts +221 -221
- package/src/components/select.ts +620 -620
- package/src/components/slider.ts +259 -259
- package/src/components/sort-button.ts +189 -189
- package/src/components/sparkline.ts +114 -114
- package/src/components/switch.ts +205 -205
- package/src/components/tabs.ts +426 -426
- package/src/components/text-area.ts +186 -186
- package/src/components/toast.ts +965 -0
- package/src/components/toggle-group.ts +295 -295
- package/src/components/tooltip.ts +156 -156
- package/src/components/treemap.ts +847 -0
- package/src/index.ts +24 -24
- package/src/lib/calendar.ts +117 -117
- package/src/lib/chart.ts +72 -72
- package/src/lib/color.ts +89 -89
- package/src/lib/component-index.ts +163 -151
- package/src/lib/css.ts +48 -48
- package/src/lib/define.ts +45 -45
- package/src/lib/dispose.ts +36 -36
- package/src/lib/h.ts +55 -55
- package/src/lib/headless.ts +16 -16
- package/src/lib/i18n.ts +30 -30
- package/src/lib/icons.ts +244 -237
- package/src/lib/kit-text.ts +26 -26
- package/src/lib/page.ts +24 -24
- package/src/lib/palette.ts +81 -81
- package/src/lib/placement.ts +188 -188
- package/src/lib/scope.ts +135 -135
- package/src/lib/styles.ts +53 -53
- package/src/lib/surface-events.ts +31 -31
- package/src/lib/surface-exit.ts +87 -87
- package/src/lib/t.ts +68 -68
- package/src/lib/theme.ts +684 -664
- package/src/lib/tokens.ts +110 -110
- package/src/lib/variants.ts +32 -32
- package/src/lib/zag.ts +61 -46
- package/stylelint/index.mjs +60 -60
- package/stylelint/lint.mjs +81 -81
- package/stylelint/plugin.mjs +115 -115
- package/dist/chunk-P4MTEMT7.js +0 -23
- package/dist/stat.js +0 -41
- 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
package/dist/checkbox.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-
|
|
2
|
-
import './chunk-LZWZV2ZS.js';
|
|
3
|
-
import './chunk-G7IQLY3A.js';
|
|
1
|
+
export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-SKFAYTDK.js';
|
|
4
2
|
import './chunk-A72NWYNP.js';
|
|
5
|
-
import './chunk-
|
|
3
|
+
import './chunk-GUIYFQ27.js';
|
|
4
|
+
import './chunk-C3PXY2SW.js';
|
|
5
|
+
import './chunk-LZWZV2ZS.js';
|
|
6
6
|
import './chunk-Q6WTDVH6.js';
|
|
7
|
+
import './chunk-6QCILIT2.js';
|
|
7
8
|
import './chunk-VMCR3S2A.js';
|
|
8
9
|
import './chunk-XBEL4K33.js';
|
|
9
10
|
import './chunk-2GQIZM5Z.js';
|
|
10
11
|
import './chunk-BXMWQIBO.js';
|
|
11
12
|
import './chunk-X66RJAIS.js';
|
|
12
|
-
import './chunk-6QCILIT2.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
2
2
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
3
|
-
import { floatingLayerHost, ensureUIHost } from './chunk-
|
|
3
|
+
import { floatingLayerHost, ensureUIHost } from './chunk-RH53NQGE.js';
|
|
4
4
|
import { viewportRect, insetRect, intersectRects, placePopover } from './chunk-3Q32K4PE.js';
|
|
5
5
|
import { disposeWithin } from './chunk-A72NWYNP.js';
|
|
6
6
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
7
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
7
8
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
8
9
|
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
9
10
|
import { pageState } from './chunk-X66RJAIS.js';
|
|
10
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
|
|
12
12
|
// src/components/popover.ts
|
|
13
13
|
function popoverController(opts = {}) {
|
|
@@ -127,6 +127,11 @@ registerIcon("kebab", S('<circle cx="8" cy="3.2" r="1.2"/><circle cx="8" cy="8"
|
|
|
127
127
|
registerIcon("burger", S('<path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11"/>'));
|
|
128
128
|
registerIcon("info", S('<path d="M8 7.4v4.4"/><circle cx="8" cy="4.6" r="0.9" fill="currentColor" stroke="none"/>'));
|
|
129
129
|
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"/>'));
|
|
130
|
+
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"/>'));
|
|
131
|
+
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"/>'));
|
|
132
|
+
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"/>'));
|
|
133
|
+
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"/>'));
|
|
134
|
+
registerIcon("loader", S('<path d="M8 1.8a6.2 6.2 0 1 0 6.2 6.2"/>'));
|
|
130
135
|
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"/>'));
|
|
131
136
|
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"/>'));
|
|
132
137
|
registerIcon("cursor", svg24('<path d="M5 3l6 16 2-6 6-2z"/>', 'fill="currentColor" stroke="none"'));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createKbd } from './chunk-
|
|
1
|
+
import { createKbd } from './chunk-FYVQO5TN.js';
|
|
2
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
2
3
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
3
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
4
4
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
5
6
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
7
|
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
7
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
8
8
|
|
|
9
9
|
// src/components/button.ts
|
|
10
10
|
var buttonDef = defineComponent({
|
|
@@ -26,7 +26,7 @@ var buttonVariants = variants({
|
|
|
26
26
|
size: ["default", "xs", "sm", "lg", "icon", "icon-xs", "icon-sm", "icon-lg"]
|
|
27
27
|
});
|
|
28
28
|
var BUTTON_STYLE_ID = "vela-ui-button";
|
|
29
|
-
var BUTTON_CSS = css`@layer vela.ui{[data-slot=button]{cursor:pointer;height:${buttonDef.vars.height};border-radius:${buttonDef.vars.radius};border:1px solid ${t.border.strong};color:${t.fg};font-weight:400;font-size:${buttonDef.vars["font-size"]};white-space:nowrap;transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease, opacity ${t.dur.fast} ease, border-color ${t.dur.fast} ease;background:0 0;padding:0 11px;font-family:inherit}[data-slot=button]:where(:not([hidden])){justify-content:center;align-items:center;gap:6px;display:inline-flex}[data-slot=button]>[data-icon]{flex:none;width:1em;height:1em;font-size:16px}[data-slot=button]>[data-icon]>svg{width:100%;height:100%}[data-slot=button][data-size=xs]>[data-icon],[data-slot=button][data-size=icon-xs]>[data-icon]{font-size:12px}[data-slot=button]>[data-keys]{flex:none;gap:2px}[data-slot=button]>[data-keys]:where(:not([hidden])){display:inline-flex}[data-slot=button][data-size=sm],[data-slot=button][data-size=icon-sm]{height:${buttonDef.vars["height-sm"]};font-size:${buttonDef.vars["font-size-sm"]}}[data-slot=button][data-size=xs],[data-slot=button][data-size=icon-xs]{height:${buttonDef.vars["height-xs"]};font-size:${buttonDef.vars["font-size-xs"]};border-radius:${t.radius.sm};padding:0 8px}[data-slot=button][data-size=lg],[data-slot=button][data-size=icon-lg]{height:${buttonDef.vars["height-lg"]};padding:0 14px}[data-slot=button][data-size=icon]{width:${buttonDef.vars.height};padding:0}[data-slot=button][data-size=icon-sm]{width:${buttonDef.vars["height-sm"]};padding:0}[data-slot=button][data-size=icon-xs]{width:${buttonDef.vars["height-xs"]};padding:0}[data-slot=button][data-size=icon-lg]{width:${buttonDef.vars["height-lg"]};padding:0}[data-slot=button]:disabled{cursor:default;opacity:.5}[data-slot=button]:focus-visible{outline:2px solid ${t.focus};outline-offset:1px}[data-slot=button]:not(:disabled):hover,[data-slot=button][aria-expanded=true]{background:${t.hover};color:${t.fg.bright};border-color:${t.fg.muted}}[data-slot=button][data-variant=default]{border-color:${t.selected.bg};background:${t.selected.bg};color:${t.selected.fg}}[data-slot=button][data-variant=default]:not(:disabled):hover,[data-slot=button][data-variant=default][aria-expanded=true]{background:${t.selected.bg};color:${t.selected.fg};opacity:.85;border-color:${t.selected.bg}}[data-slot=button][data-variant=secondary]{background:${t.surface.sunken};border-color:${t.border}}[data-slot=button][data-variant=secondary]:not(:disabled):hover,[data-slot=button][data-variant=secondary][aria-expanded=true]{border-color:${t.border.strong}}[data-slot=button][data-variant=ghost]{color:${t.fg.muted};border-color:#0000}[data-slot=button][data-variant=ghost]:not(:disabled):hover,[data-slot=button][data-variant=ghost][aria-expanded=true]{border-color:#0000}[data-slot=button][data-variant=destructive]{background:color-mix(in srgb, ${t.danger} 14%, transparent);color:${t.danger};border-color:#0000}[data-slot=button][data-variant=destructive]:not(:disabled):hover{background:color-mix(in srgb, ${t.danger} 24%, transparent);color:${t.danger};border-color:#0000}[data-slot=button][data-variant=link]{color:${t.accent};text-underline-offset:4px;background:0 0;border-color:#0000;padding-inline:0}[data-slot=button][data-variant=link]:not(:disabled):hover{color:${t.accent};background:0 0;border-color:#0000;text-decoration:underline}[data-slot=button][data-variant=up],[data-slot=button][data-variant=up]:not(:disabled):hover{background:${t.up};color:${t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=down],[data-slot=button][data-variant=down]:not(:disabled):hover{background:${t.down};color:${t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=up]:not(:disabled):hover,[data-slot=button][data-variant=down]:not(:disabled):hover{opacity:.88}[data-slot=button][data-pressed]{background:${t.active};color:${t.fg.bright}}[data-slot=button][data-variant=favorite]{color:${t.fg.muted};border-color:#0000}[data-slot=button][data-variant=favorite]:not(:disabled):hover{border-color:#0000}[data-slot=button][data-variant=favorite][data-pressed]{color:${t.highlight};background:0 0}[data-slot=button][data-variant=favorite][data-pressed]:where(:not(:disabled)):hover{background:${t.hover};color:${t.highlight}}}`;
|
|
29
|
+
var BUTTON_CSS = css`@layer vela.ui{[data-slot=button]{cursor:pointer;height:${buttonDef.vars.height};border-radius:${buttonDef.vars.radius};border:1px solid ${t.border.strong};color:${t.fg};font-weight:400;font-size:${buttonDef.vars["font-size"]};white-space:nowrap;transition:background ${t.dur.fast} ease, color ${t.dur.fast} ease, opacity ${t.dur.fast} ease, border-color ${t.dur.fast} ease;background:0 0;padding:0 11px;font-family:inherit}[data-slot=button]:where(:not([hidden])){justify-content:center;align-items:center;gap:6px;display:inline-flex}[data-slot=button]>[data-icon]{flex:none;width:1em;height:1em;font-size:16px}[data-slot=button]>[data-icon]>svg{width:100%;height:100%}[data-slot=button][data-size=xs]>[data-icon],[data-slot=button][data-size=icon-xs]>[data-icon]{font-size:12px}[data-slot=button]>[data-keys]{flex:none;gap:2px}[data-slot=button]>[data-keys]:where(:not([hidden])){display:inline-flex}[data-slot=button]>[data-keys]>[data-slot=kbd]{border-color:${t.border};color:inherit;box-shadow:none;background:0 0}[data-slot=button][data-size=sm],[data-slot=button][data-size=icon-sm]{height:${buttonDef.vars["height-sm"]};font-size:${buttonDef.vars["font-size-sm"]}}[data-slot=button][data-size=xs],[data-slot=button][data-size=icon-xs]{height:${buttonDef.vars["height-xs"]};font-size:${buttonDef.vars["font-size-xs"]};border-radius:${t.radius.sm};padding:0 8px}[data-slot=button][data-size=lg],[data-slot=button][data-size=icon-lg]{height:${buttonDef.vars["height-lg"]};padding:0 14px}[data-slot=button][data-size=icon]{width:${buttonDef.vars.height};padding:0}[data-slot=button][data-size=icon-sm]{width:${buttonDef.vars["height-sm"]};padding:0}[data-slot=button][data-size=icon-xs]{width:${buttonDef.vars["height-xs"]};padding:0}[data-slot=button][data-size=icon-lg]{width:${buttonDef.vars["height-lg"]};padding:0}[data-slot=button]:disabled{cursor:default;opacity:.5}[data-slot=button]:focus-visible{outline:2px solid ${t.focus};outline-offset:1px}[data-slot=button]:not(:disabled):hover,[data-slot=button][aria-expanded=true]{background:${t.hover};color:${t.fg.bright};border-color:${t.fg.muted}}[data-slot=button][data-variant=default]{border-color:${t.selected.bg};background:${t.selected.bg};color:${t.selected.fg}}[data-slot=button][data-variant=default]:not(:disabled):hover,[data-slot=button][data-variant=default][aria-expanded=true]{background:${t.selected.bg};color:${t.selected.fg};opacity:.85;border-color:${t.selected.bg}}[data-slot=button][data-variant=secondary]{background:${t.surface.sunken};border-color:${t.border}}[data-slot=button][data-variant=secondary]:not(:disabled):hover,[data-slot=button][data-variant=secondary][aria-expanded=true]{border-color:${t.border.strong}}[data-slot=button][data-variant=ghost]{color:${t.fg.muted};border-color:#0000}[data-slot=button][data-variant=ghost]:not(:disabled):hover,[data-slot=button][data-variant=ghost][aria-expanded=true]{border-color:#0000}[data-slot=button][data-variant=destructive]{background:color-mix(in srgb, ${t.danger} 14%, transparent);color:${t.danger};border-color:#0000}[data-slot=button][data-variant=destructive]:not(:disabled):hover{background:color-mix(in srgb, ${t.danger} 24%, transparent);color:${t.danger};border-color:#0000}[data-slot=button][data-variant=link]{color:${t.accent};text-underline-offset:4px;background:0 0;border-color:#0000;padding-inline:0}[data-slot=button][data-variant=link]:not(:disabled):hover{color:${t.accent};background:0 0;border-color:#0000;text-decoration:underline}[data-slot=button][data-variant=up],[data-slot=button][data-variant=up]:not(:disabled):hover{background:${t.up};color:${t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=down],[data-slot=button][data-variant=down]:not(:disabled):hover{background:${t.down};color:${t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=up]:not(:disabled):hover,[data-slot=button][data-variant=down]:not(:disabled):hover{opacity:.88}[data-slot=button][data-pressed]{background:${t.active};color:${t.fg.bright}}[data-slot=button][data-variant=favorite]{color:${t.fg.muted};border-color:#0000}[data-slot=button][data-variant=favorite]:not(:disabled):hover{border-color:#0000}[data-slot=button][data-variant=favorite][data-pressed]{color:${t.highlight};background:0 0}[data-slot=button][data-variant=favorite][data-pressed]:where(:not(:disabled)):hover{background:${t.hover};color:${t.highlight}}}`;
|
|
30
30
|
var injectStyles = defineStyles(BUTTON_STYLE_ID, BUTTON_CSS);
|
|
31
31
|
var iconPart = (id, side) => {
|
|
32
32
|
const el = iconEl(id, document);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { pageUid } from './chunk-X66RJAIS.js';
|
|
2
|
+
import { spreadProps as spreadProps$1, VanillaMachine } from '@zag-js/vanilla';
|
|
3
|
+
export { normalizeProps } from '@zag-js/vanilla';
|
|
4
|
+
|
|
5
|
+
function spreadProps(...[node, attrs, machineId]) {
|
|
6
|
+
const style = attrs["style"];
|
|
7
|
+
if (style === null || typeof style !== "object") return spreadProps$1(node, attrs, machineId);
|
|
8
|
+
const set = {};
|
|
9
|
+
for (const [key, value] of Object.entries(style)) if (value != null) set[key] = value;
|
|
10
|
+
return spreadProps$1(node, { ...attrs, style: set }, machineId);
|
|
11
|
+
}
|
|
12
|
+
function runMachine(machine, props, render) {
|
|
13
|
+
const m = new VanillaMachine(machine, props);
|
|
14
|
+
const unsub = m.subscribe(render);
|
|
15
|
+
m.start();
|
|
16
|
+
render(m.service);
|
|
17
|
+
return {
|
|
18
|
+
service: m.service,
|
|
19
|
+
flush: () => render(m.service),
|
|
20
|
+
stop: () => {
|
|
21
|
+
unsub();
|
|
22
|
+
m.stop();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function nextUid(prefix) {
|
|
27
|
+
return pageUid(prefix);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { nextUid, runMachine, spreadProps };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
2
1
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
3
2
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
4
3
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
5
4
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
6
|
-
import { floatingLayerHost } from './chunk-
|
|
5
|
+
import { floatingLayerHost } from './chunk-RH53NQGE.js';
|
|
7
6
|
import { zagPositioning, splitPlacement } from './chunk-3Q32K4PE.js';
|
|
8
|
-
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-
|
|
7
|
+
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
|
|
8
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
9
9
|
import { addSlot } from './chunk-Q6WTDVH6.js';
|
|
10
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
10
11
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
11
12
|
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) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
|
-
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-B5ZSRUDQ.js';
|
|
1
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
|
|
4
2
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
5
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-
|
|
3
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
|
|
4
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
5
|
+
import { variants } from './chunk-LZWZV2ZS.js';
|
|
6
6
|
import { addSlot, h } from './chunk-Q6WTDVH6.js';
|
|
7
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
7
8
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
8
9
|
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) {
|
|
@@ -23,6 +23,10 @@ var KIT_COMPONENTS = {
|
|
|
23
23
|
parts: ["root", "panel", "title", "text", "actions", "button"],
|
|
24
24
|
settings: ["panel-radius", "button-radius"]
|
|
25
25
|
},
|
|
26
|
+
card: {
|
|
27
|
+
parts: ["root", "header", "heading", "eyebrow", "title", "trigger", "description", "action", "content", "footer"],
|
|
28
|
+
settings: ["radius", "padding", "padding-sm", "gap", "gap-sm", "background", "border", "inset-background"]
|
|
29
|
+
},
|
|
26
30
|
checkbox: {
|
|
27
31
|
parts: ["root", "icon"],
|
|
28
32
|
settings: ["radius"]
|
|
@@ -67,6 +71,10 @@ var KIT_COMPONENTS = {
|
|
|
67
71
|
parts: ["grid", "row", "span", "label", "cell", "bool", "stacked", "stacked-head", "inline", "inline-item", "toggle-label", "section", "sep"],
|
|
68
72
|
settings: []
|
|
69
73
|
},
|
|
74
|
+
figure: {
|
|
75
|
+
parts: ["root", "label", "value", "sub"],
|
|
76
|
+
settings: []
|
|
77
|
+
},
|
|
70
78
|
"glyph-select": {
|
|
71
79
|
parts: ["root", "value", "icon", "content", "item"],
|
|
72
80
|
settings: ["radius", "content-radius", "focus-ring"]
|
|
@@ -127,10 +135,6 @@ var KIT_COMPONENTS = {
|
|
|
127
135
|
parts: ["root", "area", "baseline", "line"],
|
|
128
136
|
settings: ["stroke-width"]
|
|
129
137
|
},
|
|
130
|
-
stat: {
|
|
131
|
-
parts: ["root", "label", "value", "sub"],
|
|
132
|
-
settings: []
|
|
133
|
-
},
|
|
134
138
|
switch: {
|
|
135
139
|
parts: ["root", "control", "thumb"],
|
|
136
140
|
settings: ["width", "height", "thumb-size", "width-sm", "height-sm", "thumb-size-sm"]
|
|
@@ -143,6 +147,10 @@ var KIT_COMPONENTS = {
|
|
|
143
147
|
parts: ["root", "input"],
|
|
144
148
|
settings: ["radius", "focus-ring"]
|
|
145
149
|
},
|
|
150
|
+
toast: {
|
|
151
|
+
parts: ["root", "list", "item", "close", "icon", "content", "title", "description", "cancel", "action"],
|
|
152
|
+
settings: ["width", "radius", "background", "border", "foreground", "description-color", "shadow", "success", "info", "warning", "error"]
|
|
153
|
+
},
|
|
146
154
|
"toggle-group": {
|
|
147
155
|
parts: ["root", "item", "icon"],
|
|
148
156
|
settings: ["radius", "radius-sm", "item-radius", "item-radius-sm"]
|
|
@@ -150,6 +158,10 @@ var KIT_COMPONENTS = {
|
|
|
150
158
|
tooltip: {
|
|
151
159
|
parts: ["positioner", "content"],
|
|
152
160
|
settings: ["radius"]
|
|
161
|
+
},
|
|
162
|
+
treemap: {
|
|
163
|
+
parts: ["root", "crumbs", "crumb", "map", "group", "group-name", "group-value", "tile", "tile-label", "tile-value", "legend", "legend-bar", "tip"],
|
|
164
|
+
settings: ["radius", "up", "down", "tile-bg", "tint-min", "tint-max", "hover-z", "tip-radius", "tip-bg", "tip-shadow", "tip-z"]
|
|
153
165
|
}
|
|
154
166
|
};
|
|
155
167
|
|
|
@@ -527,6 +539,20 @@ ${STATIC_DECLS}
|
|
|
527
539
|
@supports not selector(::-webkit-scrollbar) {
|
|
528
540
|
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *) { scrollbar-width: thin; scrollbar-color: var(--vela-scroll) transparent; }
|
|
529
541
|
}
|
|
542
|
+
/* A search field's clear cross in the theme's ink: Chromium and Safari otherwise draw their own,
|
|
543
|
+
blue on some systems. */
|
|
544
|
+
:where(.vela-ui, .vela-ui-layer) :where(input[type='search'])::-webkit-search-cancel-button {
|
|
545
|
+
-webkit-appearance: none;
|
|
546
|
+
appearance: none;
|
|
547
|
+
flex: none;
|
|
548
|
+
width: 12px;
|
|
549
|
+
height: 12px;
|
|
550
|
+
margin-inline-start: 4px;
|
|
551
|
+
cursor: pointer;
|
|
552
|
+
background-color: var(--vela-fg-bright);
|
|
553
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
554
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
555
|
+
}
|
|
530
556
|
}
|
|
531
557
|
.vela-ui, .vela-ui-layer {
|
|
532
558
|
font-family: var(--vela-font, -apple-system, system-ui, sans-serif);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
1
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
4
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-
|
|
2
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
|
|
3
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
4
|
+
import { variants } from './chunk-LZWZV2ZS.js';
|
|
5
5
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
6
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
6
7
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
7
8
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
8
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
9
9
|
import * as zagSwitch from '@zag-js/switch';
|
|
10
10
|
|
|
11
11
|
function checkboxController(opts = {}) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
2
2
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
3
|
-
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-
|
|
3
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
|
|
4
4
|
import { ACCENT_BRIGHT, ACCENT, BULLISH, BEARISH, WARNING, NEUTRAL } from './chunk-MMTMOV6R.js';
|
|
5
5
|
import { ownTeardown, disposeWithin } from './chunk-A72NWYNP.js';
|
|
6
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-
|
|
6
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
|
|
7
7
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
8
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
8
9
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
9
10
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
10
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
import * as zagSlider from '@zag-js/slider';
|
|
12
12
|
|
|
13
13
|
function splitColor(color) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
1
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
4
2
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
5
3
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
6
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-
|
|
4
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
|
|
5
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
6
|
+
import { variants } from './chunk-LZWZV2ZS.js';
|
|
7
7
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
8
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
8
9
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
9
10
|
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) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
|
|
2
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
3
3
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
4
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
4
5
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
5
6
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
6
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
7
7
|
|
|
8
8
|
// src/components/glyph-select.ts
|
|
9
9
|
function glyphSelectController(opts) {
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { a as VariantProps, V as VariantFn } from './variants-B4stUBnY.js';
|
|
|
2
2
|
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
3
3
|
import './t.js';
|
|
4
4
|
|
|
5
|
-
declare const collapsibleDef: ComponentDef<"collapsible", "
|
|
5
|
+
declare const collapsibleDef: ComponentDef<"collapsible", "title" | "root" | "count" | "icon" | "trigger" | "content" | "chevron", "radius" | "trigger-height">;
|
|
6
6
|
declare const collapsibleVariants: VariantFn<{
|
|
7
7
|
readonly variant: readonly ["default", "label"];
|
|
8
8
|
}>;
|
package/dist/collapsible.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { nextUid } from './chunk-GUIYFQ27.js';
|
|
2
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
1
3
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
|
-
import { nextUid } from './chunk-P4MTEMT7.js';
|
|
4
4
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
5
6
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
7
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
7
8
|
import './chunk-2GQIZM5Z.js';
|
|
8
9
|
import './chunk-BXMWQIBO.js';
|
|
9
10
|
import './chunk-X66RJAIS.js';
|
|
10
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
11
11
|
|
|
12
12
|
// src/components/collapsible.ts
|
|
13
13
|
var collapsibleDef = defineComponent({
|
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-
|
|
1
|
+
export { ColorField, blendOver, buildColorPicker, buildPalette, closeColorPopover, colorField, colorPickerController, colorPickerDef, combineColor, createColorField, hslHex, splitColor, transparencyChecker } from './chunk-TGJNHUYV.js';
|
|
2
2
|
import './chunk-FVH6L7FM.js';
|
|
3
3
|
import './chunk-FN2BUFNM.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-BWSOMG3G.js';
|
|
5
5
|
import './chunk-J2QJATCD.js';
|
|
6
6
|
import './chunk-S7USVSYP.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-RH53NQGE.js';
|
|
8
8
|
import './chunk-TAKSIV57.js';
|
|
9
9
|
import './chunk-MMTMOV6R.js';
|
|
10
10
|
import './chunk-3Q32K4PE.js';
|
|
11
11
|
import './chunk-A72NWYNP.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-GUIYFQ27.js';
|
|
13
13
|
import './chunk-Q6WTDVH6.js';
|
|
14
|
+
import './chunk-6QCILIT2.js';
|
|
14
15
|
import './chunk-VMCR3S2A.js';
|
|
15
16
|
import './chunk-XBEL4K33.js';
|
|
16
17
|
import './chunk-2GQIZM5Z.js';
|
|
17
18
|
import './chunk-BXMWQIBO.js';
|
|
18
19
|
import './chunk-X66RJAIS.js';
|
|
19
|
-
import './chunk-6QCILIT2.js';
|
package/dist/context-menu.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { DropdownMenu } from './chunk-
|
|
2
|
-
import './chunk-G7IQLY3A.js';
|
|
1
|
+
import { DropdownMenu } from './chunk-KUWTI2PE.js';
|
|
3
2
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
4
3
|
import './chunk-FN2BUFNM.js';
|
|
5
4
|
import './chunk-J2QJATCD.js';
|
|
6
5
|
import './chunk-S7USVSYP.js';
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-RH53NQGE.js';
|
|
8
7
|
import './chunk-TAKSIV57.js';
|
|
9
8
|
import './chunk-MMTMOV6R.js';
|
|
10
9
|
import './chunk-3Q32K4PE.js';
|
|
11
10
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-GUIYFQ27.js';
|
|
12
|
+
import './chunk-C3PXY2SW.js';
|
|
13
13
|
import './chunk-Q6WTDVH6.js';
|
|
14
|
+
import './chunk-6QCILIT2.js';
|
|
14
15
|
import './chunk-VMCR3S2A.js';
|
|
15
16
|
import './chunk-XBEL4K33.js';
|
|
16
17
|
import './chunk-2GQIZM5Z.js';
|
|
17
18
|
import './chunk-BXMWQIBO.js';
|
|
18
19
|
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/data-table.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { C as Child } from './h-Bl37qUis.js';
|
|
|
2
2
|
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
3
3
|
import './t.js';
|
|
4
4
|
|
|
5
|
-
declare const dataTableDef: ComponentDef<"data-table", "
|
|
5
|
+
declare const dataTableDef: ComponentDef<"data-table", "head" | "table" | "sort" | "root" | "actions" | "row" | "cell" | "empty", "row-height" | "head-height" | "head-z">;
|
|
6
6
|
interface DataTableColumn<T> {
|
|
7
7
|
id: string;
|
|
8
8
|
header: string;
|
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';
|
|
2
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
3
4
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
4
5
|
import './chunk-2GQIZM5Z.js';
|
|
5
6
|
import './chunk-BXMWQIBO.js';
|
|
6
7
|
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", "head" | "nav" | "title" | "switch" | "root" | "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
1
|
import { calendarSettings, monthNames, yearLabel, weekdayNames, yearBeforeMonth, plainInteger } from './chunk-GVRX3UAV.js';
|
|
2
|
-
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
2
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
3
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
4
4
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
5
6
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
7
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
7
8
|
import './chunk-2GQIZM5Z.js';
|
|
8
9
|
import './chunk-BXMWQIBO.js';
|
|
9
10
|
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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { C as ComponentDef } from './define-D5u3F5Dj.js';
|
|
2
|
+
import { Translator } from './i18n.js';
|
|
2
3
|
import * as dialog from '@zag-js/dialog';
|
|
3
4
|
import './t.js';
|
|
4
5
|
|
|
@@ -20,7 +21,7 @@ interface DialogController {
|
|
|
20
21
|
}
|
|
21
22
|
/** Zag's dialog machine with the options mapped onto it, for any view layer. */
|
|
22
23
|
declare function dialogController(opts?: DialogControllerOptions): DialogController;
|
|
23
|
-
declare const dialogDef: ComponentDef<"dialog", "
|
|
24
|
+
declare const dialogDef: ComponentDef<"dialog", "close" | "body" | "footer" | "header" | "title" | "backdrop" | "content" | "positioner", "radius">;
|
|
24
25
|
type DialogVariant = 'default' | 'settings' | 'form';
|
|
25
26
|
interface DialogOptions extends DialogControllerOptions {
|
|
26
27
|
title?: string;
|
|
@@ -48,6 +49,9 @@ interface DialogOptions extends DialogControllerOptions {
|
|
|
48
49
|
className?: string;
|
|
49
50
|
/** Close when the backdrop itself is pressed (not when a portaled popover is). */
|
|
50
51
|
closeOnBackdrop?: boolean;
|
|
52
|
+
/** The translator of the close button's name ("Close"). Default: the kit build's, else
|
|
53
|
+
* English. */
|
|
54
|
+
i18n?: Translator;
|
|
51
55
|
}
|
|
52
56
|
type DialogProps = DialogOptions;
|
|
53
57
|
declare class Dialog {
|
|
@@ -58,6 +62,7 @@ declare class Dialog {
|
|
|
58
62
|
readonly positioner: HTMLElement;
|
|
59
63
|
readonly backdrop: HTMLElement;
|
|
60
64
|
readonly footer: HTMLElement | null;
|
|
65
|
+
private readonly closeButton;
|
|
61
66
|
private readonly handle;
|
|
62
67
|
private readonly ctrl;
|
|
63
68
|
constructor(opts?: DialogOptions);
|
|
@@ -78,6 +83,9 @@ declare class Dialog {
|
|
|
78
83
|
* teardown that outruns the machine's close notification). */
|
|
79
84
|
private restoreOpener;
|
|
80
85
|
private announce;
|
|
86
|
+
/** Speak the dialog's own words (the close button's name) through `i18n`, for a language
|
|
87
|
+
* that changes while the dialog lives; null is English. */
|
|
88
|
+
setI18n(i18n: Translator | null): void;
|
|
81
89
|
get open(): boolean;
|
|
82
90
|
show(): void;
|
|
83
91
|
hide(): void;
|
package/dist/dialog.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
2
|
+
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
3
|
+
import { isPopoverOpen, eventDismissedPopover, closeOpenPopovers } from './chunk-BWSOMG3G.js';
|
|
3
4
|
import { announceSurface } from './chunk-J2QJATCD.js';
|
|
4
5
|
import { holdForExit } from './chunk-S7USVSYP.js';
|
|
5
|
-
import './chunk-
|
|
6
|
+
import './chunk-RH53NQGE.js';
|
|
6
7
|
import './chunk-TAKSIV57.js';
|
|
7
8
|
import './chunk-MMTMOV6R.js';
|
|
8
9
|
import './chunk-3Q32K4PE.js';
|
|
9
10
|
import { disposeWithin } from './chunk-A72NWYNP.js';
|
|
10
|
-
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-
|
|
11
|
+
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
|
|
12
|
+
import { iconEl } from './chunk-C3PXY2SW.js';
|
|
11
13
|
import './chunk-Q6WTDVH6.js';
|
|
14
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
12
15
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
13
16
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
14
17
|
import { injectStyles } from './chunk-2GQIZM5Z.js';
|
|
15
18
|
import './chunk-BXMWQIBO.js';
|
|
16
19
|
import './chunk-X66RJAIS.js';
|
|
17
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
18
20
|
import * as dialog from '@zag-js/dialog';
|
|
19
21
|
|
|
20
22
|
function dialogController(opts = {}) {
|
|
@@ -36,6 +38,7 @@ var dialogDef = defineComponent({
|
|
|
36
38
|
parts: ["backdrop", "positioner", "content", "header", "title", "close", "body", "footer"],
|
|
37
39
|
settings: { radius: t.radius.lg }
|
|
38
40
|
});
|
|
41
|
+
var CLOSE = msg("ui.dialog.close", "Close");
|
|
39
42
|
var injectStyles2 = defineStyles(
|
|
40
43
|
"vela-ui-dialog-5",
|
|
41
44
|
css`@layer vela.ui{[data-slot=dialog-backdrop]{background:${t.backdrop};z-index:${t.z.dialog};position:fixed;inset:0}[data-slot=dialog-backdrop][data-clear]{background:0 0}[data-slot=dialog-backdrop][data-contained],[data-slot=dialog-backdrop]:is([data-layout=mobile] *){position:absolute}[data-slot=dialog-positioner]{z-index:${t.z.dialog};justify-content:center;align-items:flex-start;padding-top:10vh;display:flex;position:fixed;inset:0}[data-slot=dialog-positioner][data-contained]{position:absolute}[data-slot=dialog-positioner][data-align=center]{align-items:center;padding-top:0}[data-slot=dialog-positioner]:is([data-layout=mobile] *){align-items:stretch;padding:0;position:absolute}[data-slot=dialog-header]{border-bottom:1px solid ${t.border};-webkit-user-select:none;user-select:none;align-items:center;padding-block:9px;padding-inline:16px 9px;display:flex}[data-slot=dialog-title]{letter-spacing:.2px;color:${t.fg.bright};flex:1;font-size:17px;font-weight:600}[data-slot=dialog-close]{all:unset;cursor:pointer;border-radius:${t.radius.sm};width:30px;height:30px;color:${t.fg.muted};justify-content:center;align-items:center;font-size:15px;line-height:1;display:flex}[data-slot=dialog-close]:hover{background:${t.hover};color:${t.fg.bright}}[data-slot=dialog-close]:is([data-layout=mobile] *){width:40px;height:40px}[data-slot=dialog-body]{padding:${t.space[4]};flex:auto;min-height:0;overflow:auto}[data-slot=dialog-body][data-flush]{flex-direction:column;padding:0;display:flex;overflow:hidden}[data-slot=dialog-body]:is([data-layout=mobile] *){padding-bottom:calc(${t.space[4]} + env(safe-area-inset-bottom,0px))}[data-slot=dialog-footer]{flex:none}[data-slot=dialog-content]{background:${t.surface};color:${t.fg};border:1px solid ${t.border.strong};border-radius:${dialogDef.vars.radius};box-shadow:${t.shadow.dialog};outline:2px solid #0000;flex-direction:column;min-width:300px;max-width:min(92vw,560px);max-height:70vh;font-size:13px;display:flex;overflow:hidden}[data-slot=dialog-content][data-state=open]{animation:vela-dialog-in ${t.dur.med} ${t.ease}}[data-slot=dialog-content][data-variant=default] [data-slot=dialog-footer]{justify-content:flex-end;gap:${t.space[2]};padding:0 ${t.space[4]} ${t.space[4]};display:flex}[data-slot=dialog-content][data-variant=settings]{cursor:default;width:fit-content;min-width:min(560px,94vw);max-width:min(720px,94vw);max-height:70vh;font-size:13px}[data-slot=dialog-content][data-variant=form]{width:fit-content;min-width:min(380px,90%);max-width:min(640px,94%);max-height:82%;font-size:14px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-header]{border-bottom:none;align-items:flex-start;padding:16px 20px 20px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-title]{font-size:20px;line-height:28px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-footer]{border-top:1px solid ${t.border};justify-content:flex-end;gap:12px;padding:16px 20px;display:flex}[data-slot=dialog-content]:is([data-layout=mobile] *){border:none;border-radius:0;flex:auto;width:100%;min-width:0;max-width:none;max-height:none}@keyframes vela-dialog-in{0%{opacity:0;transform:translateY(6px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}}`
|
|
@@ -112,6 +115,8 @@ var Dialog = class {
|
|
|
112
115
|
this.titleEl = title;
|
|
113
116
|
const close = part(doc.createElement("button"), "close");
|
|
114
117
|
close.className = "vela-dialog-close";
|
|
118
|
+
this.closeButton = close;
|
|
119
|
+
this.setI18n(opts.i18n ?? kitTranslator());
|
|
115
120
|
close.appendChild(iconEl("close", doc));
|
|
116
121
|
header.append(title, close);
|
|
117
122
|
this.body = part(doc.createElement("div"), "body");
|
|
@@ -221,6 +226,11 @@ var Dialog = class {
|
|
|
221
226
|
const opener = this.opener === this.panel.ownerDocument.body ? null : this.opener;
|
|
222
227
|
announceSurface(this.panel, open, "dialog", opener);
|
|
223
228
|
}
|
|
229
|
+
/** Speak the dialog's own words (the close button's name) through `i18n`, for a language
|
|
230
|
+
* that changes while the dialog lives; null is English. */
|
|
231
|
+
setI18n(i18n) {
|
|
232
|
+
this.closeButton.setAttribute("aria-label", textOf(i18n, CLOSE));
|
|
233
|
+
}
|
|
224
234
|
get open() {
|
|
225
235
|
return this.ctrl.connect(this.handle.service).open;
|
|
226
236
|
}
|
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", "
|
|
4
|
+
declare const donutDef: ComponentDef<"donut", "caption" | "figure" | "label" | "legend" | "track" | "root" | "value" | "swatch" | "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';
|
|
2
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
3
4
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
4
5
|
import './chunk-2GQIZM5Z.js';
|
|
5
6
|
import './chunk-BXMWQIBO.js';
|
|
6
7
|
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", "body" | "title" | "backdrop" | "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
3
|
import { disposeWithin } from './chunk-A72NWYNP.js';
|
|
4
|
-
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-
|
|
4
|
+
import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
5
6
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
7
|
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
7
8
|
import './chunk-2GQIZM5Z.js';
|
|
8
9
|
import './chunk-BXMWQIBO.js';
|
|
9
10
|
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", "label" | "mark" | "switch" | "badge" | "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). */
|