@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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
3
3
|
All notable changes to `@luxalgo/vela-ui`, newest first. Vela's own changes, including how it
|
|
4
4
|
uses the kit, are in [Vela's changelog](../../CHANGELOG.md).
|
|
5
5
|
|
|
6
|
+
## [0.2.0]
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **A slider.** `@luxalgo/vela-ui/slider` holds a value on a track, dragged or moved with the
|
|
11
|
+
arrow keys, Page Up/Down and Home/End. It reports every move, and once a drag ends it
|
|
12
|
+
reports the settled value through `onValueCommit`, the moment for costly work such as a
|
|
13
|
+
replay's seek.
|
|
14
|
+
- **Collapsible sections.** `@luxalgo/vela-ui/collapsible` shows and hides its content from a
|
|
15
|
+
header: a section header with a count (a panel's drawers) or a small group label (a list's
|
|
16
|
+
groups). A button of the host's, such as a row's chevron, can toggle it instead.
|
|
17
|
+
- **List rows.** `@luxalgo/vela-ui/item` is a row of a list (a watchlist, alerts, search
|
|
18
|
+
results): media, a title over a description, figures, and buttons that can stay hidden
|
|
19
|
+
until the row is hovered. A clickable row works with the keyboard and screen readers like
|
|
20
|
+
a button, while the buttons inside it keep their own presses; a row with actions makes its
|
|
21
|
+
text the button, as a button cannot hold other buttons. `createItemGroup` stacks rows, with
|
|
22
|
+
a line between them on request; a labelled group is a `group` to screen readers, or the
|
|
23
|
+
`role` you give it (`listbox` for option rows).
|
|
24
|
+
- **Sort buttons for lists that are not tables.** `@luxalgo/vela-ui/sort-button` is a column
|
|
25
|
+
header that steps through its sort directions on each press, shows the current one with an
|
|
26
|
+
arrow, and says it to screen readers.
|
|
27
|
+
- **A month grid.** `@luxalgo/vela-ui/month-grid` lays out a month of days with a figure each,
|
|
28
|
+
tinted by its tone (a trading journal's P&L by day). Weeks start on the locale's first day,
|
|
29
|
+
and the arrow keys walk the days.
|
|
30
|
+
- **Two-line tabs.** A tab's `description` puts a second line under its label, such as a day
|
|
31
|
+
strip's date under its weekday.
|
|
32
|
+
- **Key caps and favorite stars in buttons.** A button's `keys` and `keysEnd` show key caps
|
|
33
|
+
before or after its text (`↵ Open`). The `favorite` variant is a star that takes the
|
|
34
|
+
favorites color while pressed. A toggle button can now flip itself (`defaultPressed`,
|
|
35
|
+
`onPressedChange`) and show another icon while pressed (`iconPressed`).
|
|
36
|
+
- **A callout panel without a bubble.** `calloutPart(el, part)` makes an element a part of the
|
|
37
|
+
callout bubble's deployed panel (`panel`, `title`, `text`, `actions`, `button`) and gives it
|
|
38
|
+
that part's look, so a panel built elsewhere, such as a chart's timeline-mark popup, matches
|
|
39
|
+
the bubble's, and a theme's `callout-bubble` parts restyle both.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **What is on or chosen reads in the theme's selected colors.** A dropdown's switch rows, when
|
|
44
|
+
on, fill like the Switch (`selected.bg`, the knob in `selected.fg`) instead of the accent,
|
|
45
|
+
as does the slider's range and thumb, and a month grid marks today in bright, bold type:
|
|
46
|
+
white on a dark theme, black on a light one.
|
|
47
|
+
- **The kit's styles stay inside the kit.** Once a page created a kit component, the kit's
|
|
48
|
+
styles also reached the page's own components that use the same part names, such as a
|
|
49
|
+
shadcn/ui select, switch or button, and restyled them. A component's styles now apply only
|
|
50
|
+
inside kit hosts (`ensureUIHost`), the menus, dialogs and tooltips they open, and themed
|
|
51
|
+
hosts, so the page's own components keep their look. A component mounted outside any kit
|
|
52
|
+
host gets none of the kit's styles: mount it in one, as the README shows.
|
|
53
|
+
|
|
6
54
|
## [0.1.0]
|
|
7
55
|
|
|
8
56
|
### Added
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @luxalgo/vela-ui
|
|
2
2
|
|
|
3
3
|
The component kit of Vela: buttons, tabs, toggle groups, badges, dialogs, drawers, menus,
|
|
4
|
-
tooltips, popovers
|
|
4
|
+
tooltips, popovers, form controls, collapsible sections, list rows and data components (a
|
|
5
|
+
data table, sort buttons, a month grid, charts). One file per component, Zag state machines for
|
|
5
6
|
behavior, CSS in cascade layers over design tokens, and one typed theme config. It works
|
|
6
7
|
without the chart.
|
|
7
8
|
|
|
@@ -28,7 +29,9 @@ theme)` switches a host to another theme later.
|
|
|
28
29
|
stay behind. A destroyed dialog, drawer or popover releases its content itself.
|
|
29
30
|
- **Styles give way to yours.** Component CSS sits in the `vela.ui` cascade layer, so a
|
|
30
31
|
page's own CSS overrides it without `!important`. Every part carries a `data-slot`;
|
|
31
|
-
variants and sizes are `data-variant` and `data-size`.
|
|
32
|
+
variants and sizes are `data-variant` and `data-size`. The kit's CSS applies inside kit
|
|
33
|
+
hosts only, so the page's own components keep their look, even those that use the same
|
|
34
|
+
part names.
|
|
32
35
|
- **One theme config.** `createTheme` sets the brand color, radius and font, any token by
|
|
33
36
|
name, each component's settings, or a component's whole look; a wrong name fails the
|
|
34
37
|
typecheck. See [Theming](docs/theming.md) and [What to change, and where](docs/what-to-change.md).
|
package/dist/badge.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
3
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
4
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
5
|
-
import { css, defineStyles } from './chunk-
|
|
4
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
6
5
|
import './chunk-2GQIZM5Z.js';
|
|
7
6
|
import './chunk-BXMWQIBO.js';
|
|
8
7
|
import './chunk-X66RJAIS.js';
|
|
8
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
9
9
|
|
|
10
10
|
// src/components/badge.ts
|
|
11
11
|
var badgeDef = defineComponent({
|
package/dist/bar-chart.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 barChartDef: ComponentDef<"bar-chart", "
|
|
4
|
+
declare const barChartDef: ComponentDef<"bar-chart", "root" | "label" | "marker" | "grid" | "bar" | "tip", "tip-radius" | "tip-shadow" | "tip-z" | "tip-bg">;
|
|
5
5
|
interface BarDatum {
|
|
6
6
|
label: string;
|
|
7
7
|
value: number;
|
package/dist/bar-chart.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { chartFrame, showTip, valueAxis, compactNumber, escapeXml } from './chunk-A2FJ7Y7D.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/bar-chart.ts
|
|
10
10
|
var barChartDef = defineComponent({
|
package/dist/button.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ 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 buttonDef: ComponentDef<"button", "root" | "icon", "
|
|
5
|
+
declare const buttonDef: ComponentDef<"button", "root" | "keys" | "icon", "radius" | "font-size-sm" | "height" | "height-xs" | "height-sm" | "height-lg" | "font-size" | "font-size-xs">;
|
|
6
6
|
declare const buttonVariants: VariantFn<{
|
|
7
|
-
readonly variant: readonly ["default", "outline", "secondary", "ghost", "destructive", "link", "up", "down"];
|
|
7
|
+
readonly variant: readonly ["default", "outline", "secondary", "ghost", "destructive", "link", "up", "down", "favorite"];
|
|
8
8
|
readonly size: readonly ["default", "xs", "sm", "lg", "icon", "icon-xs", "icon-sm", "icon-lg"];
|
|
9
9
|
}>;
|
|
10
10
|
type ButtonVariant = (typeof buttonVariants.spec.variant)[number];
|
|
@@ -12,14 +12,27 @@ type ButtonSize = (typeof buttonVariants.spec.size)[number];
|
|
|
12
12
|
interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
13
13
|
/** The visible text (the `icon*` sizes show none; `label` names them). */
|
|
14
14
|
text?: string;
|
|
15
|
-
/** Icon id from the kit's registry, before the text (the icon of an `icon*` size).
|
|
15
|
+
/** Icon id from the kit's registry, before the text (the icon of an `icon*` size).
|
|
16
|
+
* `favorite` defaults to `star`. */
|
|
16
17
|
icon?: string;
|
|
18
|
+
/** The icon while pressed (`star-filled` for `star`). `favorite` defaults to `star-filled`. */
|
|
19
|
+
iconPressed?: string;
|
|
17
20
|
/** Icon id after the text (a menu trigger's chevron). */
|
|
18
21
|
iconEnd?: string;
|
|
22
|
+
/** Key caps before the text, one per key (`['↑', '↓']`). */
|
|
23
|
+
keys?: readonly string[];
|
|
24
|
+
/** Key caps after the text. */
|
|
25
|
+
keysEnd?: readonly string[];
|
|
19
26
|
/** Accessible name; required for the `icon*` sizes, defaults to `text`. */
|
|
20
27
|
label?: string;
|
|
21
|
-
/** A toggle
|
|
28
|
+
/** A controlled toggle's state (`aria-pressed`): a press only calls `onPressedChange`, and
|
|
29
|
+
* `setPressed` moves it. Omitted with `defaultPressed` and `onPressedChange`: not a toggle. */
|
|
22
30
|
pressed?: boolean;
|
|
31
|
+
/** An uncontrolled toggle's first state: a press flips it and calls `onPressedChange`. */
|
|
32
|
+
defaultPressed?: boolean;
|
|
33
|
+
/** A press asked for this state (a toggle without `pressed` or `defaultPressed` starts
|
|
34
|
+
* unpressed). */
|
|
35
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
23
36
|
disabled?: boolean;
|
|
24
37
|
onClick?: (e: MouseEvent) => void;
|
|
25
38
|
/** Extra class names (layout hooks). */
|
|
@@ -28,6 +41,7 @@ interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
|
28
41
|
interface ButtonHandle {
|
|
29
42
|
readonly el: HTMLButtonElement;
|
|
30
43
|
readonly pressed: boolean | undefined;
|
|
44
|
+
/** Show a toggle's state, without calling `onPressedChange`. */
|
|
31
45
|
setPressed(pressed: boolean): void;
|
|
32
46
|
setDisabled(disabled: boolean): void;
|
|
33
47
|
/** New text (or, for an `icon*` size, a new accessible name). */
|
package/dist/button.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { BUTTON_CSS, BUTTON_STYLE_ID, buttonDef, buttonVariants, createButton } from './chunk-
|
|
1
|
+
export { BUTTON_CSS, BUTTON_STYLE_ID, buttonDef, buttonVariants, createButton } from './chunk-CC3DDNFC.js';
|
|
2
|
+
import './chunk-C3ICYMI3.js';
|
|
2
3
|
import './chunk-LZWZV2ZS.js';
|
|
3
4
|
import './chunk-G7IQLY3A.js';
|
|
4
5
|
import './chunk-Q6WTDVH6.js';
|
|
5
|
-
import './chunk-6QCILIT2.js';
|
|
6
6
|
import './chunk-VMCR3S2A.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-XBEL4K33.js';
|
|
8
8
|
import './chunk-2GQIZM5Z.js';
|
|
9
9
|
import './chunk-BXMWQIBO.js';
|
|
10
10
|
import './chunk-X66RJAIS.js';
|
|
11
|
+
import './chunk-6QCILIT2.js';
|
package/dist/calendar.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare function calendarSettings(i18n: Translator | null | undefined): Calendar
|
|
|
12
12
|
declare function monthNames(settings: CalendarSettings, width: 'long' | 'short'): string[];
|
|
13
13
|
/** Seven short weekday names, Sunday first (index = `Date#getDay()`). */
|
|
14
14
|
declare function weekdayNames(settings: CalendarSettings): string[];
|
|
15
|
+
/** A day in words, for a screen reader (`Friday, November 6, 2026`). `month` counts from 0. */
|
|
16
|
+
declare function longDate(settings: CalendarSettings, year: number, month: number, day: number): string;
|
|
15
17
|
/** A year as a header label (`2026`, `2026年`). */
|
|
16
18
|
declare function yearLabel(settings: CalendarSettings, year: number): string;
|
|
17
19
|
/** An integer in the settings' digits, without grouping (`2026`, `٢٠٢٦`). */
|
|
@@ -19,4 +21,4 @@ declare function plainInteger(settings: CalendarSettings, n: number): string;
|
|
|
19
21
|
/** Whether the locale writes the year before the month (`2026年9月`, not `September 2026`). */
|
|
20
22
|
declare function yearBeforeMonth(settings: CalendarSettings): boolean;
|
|
21
23
|
|
|
22
|
-
export { type CalendarSettings, calendarSettings, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel };
|
|
24
|
+
export { type CalendarSettings, calendarSettings, longDate, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel };
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { calendarSettings, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel } from './chunk-
|
|
1
|
+
export { calendarSettings, longDate, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel } from './chunk-GVRX3UAV.js';
|
package/dist/callout-bubble.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ type CalloutPanelRow = {
|
|
|
55
55
|
* stand alone. Pure — unit-tested apart from the DOM.
|
|
56
56
|
*/
|
|
57
57
|
declare function calloutPanelRows(items: CalloutPanelItem[]): CalloutPanelRow[];
|
|
58
|
-
declare const calloutBubbleDef: ComponentDef<"callout-bubble", "
|
|
58
|
+
declare const calloutBubbleDef: ComponentDef<"callout-bubble", "root" | "text" | "button" | "title" | "panel" | "actions", "panel-radius" | "button-radius">;
|
|
59
59
|
/** The panel opens where the placement props say (default below and start-aligned, 6px away,
|
|
60
60
|
* flipping above near the bottom edge). */
|
|
61
61
|
interface CalloutBubbleOptions extends CalloutBubbleSpec, PlacementProps {
|
|
@@ -73,6 +73,11 @@ interface CalloutBubbleOptions extends CalloutBubbleSpec, PlacementProps {
|
|
|
73
73
|
type CalloutBubbleProps = CalloutBubbleOptions;
|
|
74
74
|
declare const CALLOUT_STYLE_ID = "vela-ui-callout-bubble";
|
|
75
75
|
declare const CALLOUT_CSS: string;
|
|
76
|
+
/** A part of the deployed panel, as {@link calloutPart} gives it. */
|
|
77
|
+
type CalloutPanelPart = Exclude<(typeof calloutBubbleDef.parts)[number], 'root'>;
|
|
78
|
+
/** Make `el` a part of a deployed panel, with the panel's look: for a panel built without a
|
|
79
|
+
* bubble, such as a chart's timeline-mark popup. Returns `el`. */
|
|
80
|
+
declare function calloutPart<E extends HTMLElement>(el: E, part: CalloutPanelPart): E;
|
|
76
81
|
declare class CalloutBubble {
|
|
77
82
|
readonly el: HTMLElement;
|
|
78
83
|
private spec;
|
|
@@ -95,4 +100,4 @@ declare class CalloutBubble {
|
|
|
95
100
|
}
|
|
96
101
|
declare function createCalloutBubble(props: CalloutBubbleProps): CalloutBubble;
|
|
97
102
|
|
|
98
|
-
export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, type CalloutBubbleOptions, type CalloutBubbleProps, type CalloutBubbleSpec, type CalloutPanel, type CalloutPanelItem, type CalloutPanelRow, calloutBubbleDef, calloutPanelRows, closesPanel, createCalloutBubble };
|
|
103
|
+
export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, type CalloutBubbleOptions, type CalloutBubbleProps, type CalloutBubbleSpec, type CalloutPanel, type CalloutPanelItem, type CalloutPanelPart, type CalloutPanelRow, calloutBubbleDef, calloutPanelRows, calloutPart, closesPanel, createCalloutBubble };
|
package/dist/callout-bubble.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Popover } from './chunk-OBLIX3VN.js';
|
|
2
1
|
import { iconAt } from './chunk-G7IQLY3A.js';
|
|
2
|
+
import { Popover } from './chunk-B5ZSRUDQ.js';
|
|
3
3
|
import './chunk-J2QJATCD.js';
|
|
4
4
|
import './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
9
|
import './chunk-A72NWYNP.js';
|
|
10
|
-
import './chunk-Q6WTDVH6.js';
|
|
11
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
10
|
+
import { addSlot } from './chunk-Q6WTDVH6.js';
|
|
12
11
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
13
|
-
import { css, defineStyles } from './chunk-
|
|
12
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
14
13
|
import './chunk-2GQIZM5Z.js';
|
|
15
14
|
import './chunk-BXMWQIBO.js';
|
|
16
15
|
import './chunk-X66RJAIS.js';
|
|
16
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
17
17
|
|
|
18
18
|
// src/components/callout-bubble.ts
|
|
19
19
|
function closesPanel(item) {
|
|
@@ -40,6 +40,11 @@ var calloutBubbleDef = defineComponent({
|
|
|
40
40
|
var CALLOUT_STYLE_ID = "vela-ui-callout-bubble";
|
|
41
41
|
var CALLOUT_CSS = css`@layer vela.ui{[data-slot=callout-bubble]{box-sizing:border-box;cursor:default;-webkit-user-select:none;user-select:none;border-radius:50%;flex:none;place-items:center;line-height:0}[data-slot=callout-bubble]:where(:not([hidden])){display:inline-grid}[data-slot=callout-bubble][role=button]{cursor:pointer}[data-slot=callout-bubble] svg{display:block}[data-slot=callout-bubble-panel]{box-sizing:border-box;background:${t.surface.elev};border:1px solid ${t.border.strong};border-radius:${calloutBubbleDef.vars["panel-radius"]};max-width:280px;box-shadow:${t.shadow};color:${t.fg};font:${t.fontSize.md} ${t.font};flex-direction:column;gap:8px;padding:10px 12px;display:flex}[data-slot=callout-bubble-title]{color:${t.fg.bright};font-weight:600}[data-slot=callout-bubble-text]{color:${t.fg.muted};white-space:pre-line;line-height:1.45}[data-slot=callout-bubble-actions]{flex-wrap:wrap;gap:8px;display:flex}[data-slot=callout-bubble-button]{cursor:pointer;border-radius:${calloutBubbleDef.vars["button-radius"]};border:1px solid ${t.border};height:26px;color:${t.fg};font-size:${t.fontSize.md};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 10px;font-family:inherit}[data-slot=callout-bubble-button]:where([data-primary]){border-color:${t.selected.bg};background:${t.selected.bg};color:${t.selected.fg}}[data-slot=callout-bubble-button]:hover{background:${t.hover};color:${t.fg.bright};border-color:${t.fg.muted}}[data-slot=callout-bubble-button]:where([data-primary]):hover{background:${t.selected.bg};color:${t.selected.fg};opacity:.85;border-color:${t.selected.bg}}}`;
|
|
42
42
|
var injectStyles = defineStyles(CALLOUT_STYLE_ID, CALLOUT_CSS);
|
|
43
|
+
function calloutPart(el, part) {
|
|
44
|
+
injectStyles(el.ownerDocument);
|
|
45
|
+
addSlot(el, calloutBubbleDef.slot(part));
|
|
46
|
+
return el;
|
|
47
|
+
}
|
|
43
48
|
var CalloutBubble = class {
|
|
44
49
|
constructor(opts) {
|
|
45
50
|
this.pop = null;
|
|
@@ -133,8 +138,7 @@ var CalloutBubble = class {
|
|
|
133
138
|
const part = (tag, className, name) => {
|
|
134
139
|
const el = doc.createElement(tag);
|
|
135
140
|
el.className = className;
|
|
136
|
-
el
|
|
137
|
-
return el;
|
|
141
|
+
return calloutPart(el, name);
|
|
138
142
|
};
|
|
139
143
|
const root = part("div", "vela-callout-panel", "panel");
|
|
140
144
|
if (panel.title) {
|
|
@@ -170,4 +174,4 @@ function createCalloutBubble(props) {
|
|
|
170
174
|
return new CalloutBubble(props);
|
|
171
175
|
}
|
|
172
176
|
|
|
173
|
-
export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, calloutBubbleDef, calloutPanelRows, closesPanel, createCalloutBubble };
|
|
177
|
+
export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, calloutBubbleDef, calloutPanelRows, calloutPart, closesPanel, createCalloutBubble };
|
package/dist/checkbox.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-
|
|
1
|
+
export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-WBGSYCV2.js';
|
|
2
2
|
import './chunk-LZWZV2ZS.js';
|
|
3
3
|
import './chunk-G7IQLY3A.js';
|
|
4
|
-
import './chunk-P4MTEMT7.js';
|
|
5
4
|
import './chunk-A72NWYNP.js';
|
|
5
|
+
import './chunk-P4MTEMT7.js';
|
|
6
6
|
import './chunk-Q6WTDVH6.js';
|
|
7
|
-
import './chunk-6QCILIT2.js';
|
|
8
7
|
import './chunk-VMCR3S2A.js';
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-XBEL4K33.js';
|
|
10
9
|
import './chunk-2GQIZM5Z.js';
|
|
11
10
|
import './chunk-BXMWQIBO.js';
|
|
12
11
|
import './chunk-X66RJAIS.js';
|
|
12
|
+
import './chunk-6QCILIT2.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-OBLIX3VN.js';
|
|
2
1
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
2
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-B5ZSRUDQ.js';
|
|
3
3
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
4
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
5
4
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
|
-
import { defineStyles, css } from './chunk-
|
|
5
|
+
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) {
|
|
@@ -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-V2Q4MRMS.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';
|
|
8
7
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
9
|
-
import { css, defineStyles } from './chunk-
|
|
8
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
10
9
|
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 = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
4
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
5
5
|
|
|
6
6
|
// src/components/kbd.ts
|
|
7
7
|
var kbdDef = defineComponent({
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { createKbd } from './chunk-C3ICYMI3.js';
|
|
2
|
+
import { variants } from './chunk-LZWZV2ZS.js';
|
|
3
|
+
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
4
|
+
import { h } from './chunk-Q6WTDVH6.js';
|
|
5
|
+
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
6
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
7
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
8
|
+
|
|
9
|
+
// src/components/button.ts
|
|
10
|
+
var buttonDef = defineComponent({
|
|
11
|
+
name: "button",
|
|
12
|
+
parts: ["root", "icon", "keys"],
|
|
13
|
+
settings: {
|
|
14
|
+
radius: t.radius.md,
|
|
15
|
+
height: "34px",
|
|
16
|
+
"height-xs": "26px",
|
|
17
|
+
"height-sm": "30px",
|
|
18
|
+
"height-lg": "40px",
|
|
19
|
+
"font-size": "14px",
|
|
20
|
+
"font-size-xs": "12px",
|
|
21
|
+
"font-size-sm": "13px"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var buttonVariants = variants({
|
|
25
|
+
variant: ["default", "outline", "secondary", "ghost", "destructive", "link", "up", "down", "favorite"],
|
|
26
|
+
size: ["default", "xs", "sm", "lg", "icon", "icon-xs", "icon-sm", "icon-lg"]
|
|
27
|
+
});
|
|
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}}}`;
|
|
30
|
+
var injectStyles = defineStyles(BUTTON_STYLE_ID, BUTTON_CSS);
|
|
31
|
+
var iconPart = (id, side) => {
|
|
32
|
+
const el = iconEl(id, document);
|
|
33
|
+
el.dataset.slot = buttonDef.slot("icon");
|
|
34
|
+
el.dataset.icon = side;
|
|
35
|
+
return el;
|
|
36
|
+
};
|
|
37
|
+
var keysPart = (keys, side) => keys?.length ? h("span", { slot: buttonDef.slot("keys"), data: { keys: side } }, ...keys.map((key) => createKbd({ text: key }).el)) : null;
|
|
38
|
+
var ButtonImpl = class {
|
|
39
|
+
constructor(props) {
|
|
40
|
+
injectStyles(document);
|
|
41
|
+
const { variant, size } = buttonVariants.resolve(props);
|
|
42
|
+
const favorite = variant === "favorite";
|
|
43
|
+
this.iconOnly = size.startsWith("icon");
|
|
44
|
+
this.label = props.label ?? props.text;
|
|
45
|
+
this.controlled = props.pressed !== void 0;
|
|
46
|
+
this.toggle = this.controlled || props.defaultPressed !== void 0 || props.onPressedChange !== void 0;
|
|
47
|
+
this.pressedState = props.pressed ?? props.defaultPressed ?? (this.toggle ? false : void 0);
|
|
48
|
+
this.icon = props.icon ?? (favorite ? "star" : void 0);
|
|
49
|
+
this.iconPressed = props.iconPressed ?? (favorite ? "star-filled" : void 0);
|
|
50
|
+
this.iconStart = this.icon ? iconPart(this.icon, "inline-start") : null;
|
|
51
|
+
this.shownIcon = this.icon;
|
|
52
|
+
this.textNode = !this.iconOnly && props.text !== void 0 ? document.createTextNode(props.text) : null;
|
|
53
|
+
const onClick = (e) => {
|
|
54
|
+
if (this.toggle) {
|
|
55
|
+
const next = !this.pressedState;
|
|
56
|
+
if (!this.controlled) this.setPressed(next);
|
|
57
|
+
props.onPressedChange?.(next);
|
|
58
|
+
}
|
|
59
|
+
props.onClick?.(e);
|
|
60
|
+
};
|
|
61
|
+
this.el = h(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
className: props.className ? `vela-btn ${props.className}` : "vela-btn",
|
|
65
|
+
slot: buttonDef.slot("root"),
|
|
66
|
+
attrs: { type: "button", ...buttonVariants({ variant, size }) },
|
|
67
|
+
on: this.toggle || props.onClick ? { click: onClick } : void 0
|
|
68
|
+
},
|
|
69
|
+
this.iconStart,
|
|
70
|
+
this.iconOnly ? null : keysPart(props.keys, "inline-start"),
|
|
71
|
+
this.textNode,
|
|
72
|
+
this.iconOnly ? null : keysPart(props.keysEnd, "inline-end"),
|
|
73
|
+
props.iconEnd && !this.iconOnly ? iconPart(props.iconEnd, "inline-end") : null
|
|
74
|
+
);
|
|
75
|
+
this.el.disabled = props.disabled ?? false;
|
|
76
|
+
this.paint();
|
|
77
|
+
}
|
|
78
|
+
get pressed() {
|
|
79
|
+
return this.pressedState;
|
|
80
|
+
}
|
|
81
|
+
setPressed(pressed) {
|
|
82
|
+
this.pressedState = pressed;
|
|
83
|
+
this.paint();
|
|
84
|
+
}
|
|
85
|
+
setDisabled(disabled) {
|
|
86
|
+
this.el.disabled = disabled;
|
|
87
|
+
}
|
|
88
|
+
setText(text) {
|
|
89
|
+
this.label = text;
|
|
90
|
+
if (this.textNode) this.textNode.data = text;
|
|
91
|
+
this.paint();
|
|
92
|
+
}
|
|
93
|
+
destroy() {
|
|
94
|
+
}
|
|
95
|
+
paint() {
|
|
96
|
+
const el = this.el;
|
|
97
|
+
if (this.iconStart && this.iconPressed) {
|
|
98
|
+
const icon = this.pressedState ? this.iconPressed : this.icon;
|
|
99
|
+
if (icon !== this.shownIcon) {
|
|
100
|
+
const next = iconPart(icon, "inline-start");
|
|
101
|
+
this.iconStart.replaceWith(next);
|
|
102
|
+
this.iconStart = next;
|
|
103
|
+
this.shownIcon = icon;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
el.toggleAttribute("data-pressed", this.pressedState === true);
|
|
107
|
+
if (this.pressedState === void 0) el.removeAttribute("aria-pressed");
|
|
108
|
+
else el.setAttribute("aria-pressed", String(this.pressedState));
|
|
109
|
+
if (this.iconOnly && this.label !== void 0) el.setAttribute("aria-label", this.label);
|
|
110
|
+
else el.removeAttribute("aria-label");
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
function createButton(props = {}) {
|
|
114
|
+
return new ButtonImpl(props);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { BUTTON_CSS, BUTTON_STYLE_ID, buttonDef, buttonVariants, createButton };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
3
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
4
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
5
|
-
import { defineStyles, css } from './chunk-
|
|
4
|
+
import { defineStyles, css } from './chunk-XBEL4K33.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
6
6
|
|
|
7
7
|
// src/components/text-area.ts
|
|
8
8
|
function textAreaController(opts = {}) {
|
|
@@ -56,6 +56,9 @@ function weekdayNames(settings) {
|
|
|
56
56
|
const dtf = dateFormat(settings, { weekday: "short" });
|
|
57
57
|
return Array.from({ length: 7 }, (_, d) => stripBidiMarks(dtf.format(Date.UTC(2e3, 0, 2 + d))));
|
|
58
58
|
}
|
|
59
|
+
function longDate(settings, year, month, day) {
|
|
60
|
+
return stripBidiMarks(dateFormat(settings, { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(Date.UTC(year, month, day)));
|
|
61
|
+
}
|
|
59
62
|
function yearLabel(settings, year) {
|
|
60
63
|
if (settings.english) return localizeDigits(String(year), settings);
|
|
61
64
|
return stripBidiMarks(dateFormat(settings, { year: "numeric" }).format(Date.UTC(year, 6, 1)));
|
|
@@ -76,4 +79,4 @@ function yearBeforeMonth(settings) {
|
|
|
76
79
|
return first;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
export { calendarSettings, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel };
|
|
82
|
+
export { calendarSettings, longDate, monthNames, plainInteger, weekdayNames, yearBeforeMonth, yearLabel };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-OBLIX3VN.js';
|
|
2
1
|
import { kitTranslator } from './chunk-FVH6L7FM.js';
|
|
3
2
|
import { msg, textOf } from './chunk-FN2BUFNM.js';
|
|
3
|
+
import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-B5ZSRUDQ.js';
|
|
4
4
|
import { ACCENT_BRIGHT, ACCENT, BULLISH, BEARISH, WARNING, NEUTRAL } from './chunk-MMTMOV6R.js';
|
|
5
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
6
5
|
import { ownTeardown, disposeWithin } 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 { defineStyles, css } from './chunk-
|
|
9
|
+
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,8 +1,8 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
3
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
4
3
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
5
|
-
import { css, defineStyles } from './chunk-
|
|
4
|
+
import { css, defineStyles } from './chunk-XBEL4K33.js';
|
|
5
|
+
import { t } from './chunk-6QCILIT2.js';
|
|
6
6
|
|
|
7
7
|
// src/components/input.ts
|
|
8
8
|
function inputController(opts = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { STATIC_TOKENS, themeTokens } from './chunk-TAKSIV57.js';
|
|
2
2
|
import { BEARISH, BULLISH } from './chunk-MMTMOV6R.js';
|
|
3
3
|
import { declaredComponents } from './chunk-VMCR3S2A.js';
|
|
4
|
-
import { acceptCss, isWrittenCss } from './chunk-
|
|
4
|
+
import { acceptCss, isWrittenCss } from './chunk-XBEL4K33.js';
|
|
5
5
|
import { injectLayerOrder, injectStyles } from './chunk-2GQIZM5Z.js';
|
|
6
6
|
import { parseRgb, contrastRatio, isDarkColor, mix } from './chunk-BXMWQIBO.js';
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ var KIT_COMPONENTS = {
|
|
|
16
16
|
settings: ["tip-radius", "tip-shadow", "tip-z", "tip-bg"]
|
|
17
17
|
},
|
|
18
18
|
button: {
|
|
19
|
-
parts: ["root", "icon"],
|
|
19
|
+
parts: ["root", "icon", "keys"],
|
|
20
20
|
settings: ["radius", "height", "height-xs", "height-sm", "height-lg", "font-size", "font-size-xs", "font-size-sm"]
|
|
21
21
|
},
|
|
22
22
|
"callout-bubble": {
|
|
@@ -27,6 +27,10 @@ var KIT_COMPONENTS = {
|
|
|
27
27
|
parts: ["root", "icon"],
|
|
28
28
|
settings: ["radius"]
|
|
29
29
|
},
|
|
30
|
+
collapsible: {
|
|
31
|
+
parts: ["root", "trigger", "icon", "title", "count", "chevron", "content"],
|
|
32
|
+
settings: ["trigger-height", "radius"]
|
|
33
|
+
},
|
|
30
34
|
"color-picker": {
|
|
31
35
|
parts: ["root", "trigger", "swatch", "content"],
|
|
32
36
|
settings: ["swatch-ring", "circle-swatch-radius", "content-radius"]
|
|
@@ -79,6 +83,10 @@ var KIT_COMPONENTS = {
|
|
|
79
83
|
parts: ["root", "control", "addon", "text"],
|
|
80
84
|
settings: ["radius", "height", "height-sm", "focus-ring"]
|
|
81
85
|
},
|
|
86
|
+
item: {
|
|
87
|
+
parts: ["root", "media", "content", "title", "description", "meta", "actions", "group"],
|
|
88
|
+
settings: ["radius", "gap"]
|
|
89
|
+
},
|
|
82
90
|
kbd: {
|
|
83
91
|
parts: ["root"],
|
|
84
92
|
settings: ["radius", "shadow"]
|
|
@@ -87,6 +95,10 @@ var KIT_COMPONENTS = {
|
|
|
87
95
|
parts: ["root", "label", "area", "line", "dot", "tip"],
|
|
88
96
|
settings: ["tip-radius", "tip-shadow", "tip-z", "tip-bg", "stroke-width"]
|
|
89
97
|
},
|
|
98
|
+
"month-grid": {
|
|
99
|
+
parts: ["root", "weekday", "day", "date", "value", "detail", "blank"],
|
|
100
|
+
settings: ["radius", "day-height", "gap", "selected-ring"]
|
|
101
|
+
},
|
|
90
102
|
"number-input": {
|
|
91
103
|
parts: ["root", "input", "steps", "step"],
|
|
92
104
|
settings: ["radius", "step-radius", "focus-ring"]
|
|
@@ -103,6 +115,14 @@ var KIT_COMPONENTS = {
|
|
|
103
115
|
parts: ["root", "trigger", "value", "icon", "sizer", "native", "content", "viewport", "item", "rail", "thumb"],
|
|
104
116
|
settings: ["radius", "content-radius", "thumb-radius", "focus-ring"]
|
|
105
117
|
},
|
|
118
|
+
slider: {
|
|
119
|
+
parts: ["root", "control", "track", "range", "thumb"],
|
|
120
|
+
settings: ["track-height", "thumb-size", "radius", "focus-ring"]
|
|
121
|
+
},
|
|
122
|
+
"sort-button": {
|
|
123
|
+
parts: ["root", "icon", "state"],
|
|
124
|
+
settings: ["radius"]
|
|
125
|
+
},
|
|
106
126
|
sparkline: {
|
|
107
127
|
parts: ["root", "area", "baseline", "line"],
|
|
108
128
|
settings: ["stroke-width"]
|
|
@@ -116,7 +136,7 @@ var KIT_COMPONENTS = {
|
|
|
116
136
|
settings: ["width", "height", "thumb-size", "width-sm", "height-sm", "thumb-size-sm"]
|
|
117
137
|
},
|
|
118
138
|
tabs: {
|
|
119
|
-
parts: ["list", "trigger", "icon", "count", "content"],
|
|
139
|
+
parts: ["list", "trigger", "icon", "count", "label", "description", "content"],
|
|
120
140
|
settings: ["track-radius", "trigger-radius", "filled-radius", "soft-radius", "count-radius"]
|
|
121
141
|
},
|
|
122
142
|
"text-area": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { variants } from './chunk-LZWZV2ZS.js';
|
|
2
2
|
import { iconEl } from './chunk-G7IQLY3A.js';
|
|
3
|
-
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
4
3
|
import { ownTeardown } from './chunk-A72NWYNP.js';
|
|
4
|
+
import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
|
|
5
5
|
import { h } from './chunk-Q6WTDVH6.js';
|
|
6
|
-
import { t } from './chunk-6QCILIT2.js';
|
|
7
6
|
import { defineComponent } from './chunk-VMCR3S2A.js';
|
|
8
|
-
import { defineStyles, css } from './chunk-
|
|
7
|
+
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 = {}) {
|