basalt-ui 2.19.0 → 2.20.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 +50 -0
- package/MIGRATING.md +174 -12
- package/agent/rules/basalt-charts.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/agent/skills/basalt-app/SKILL.md +1 -1
- package/agent/skills/basalt-design/SKILL.md +1 -1
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/configs/oxlint-plugin.js +33 -19
- package/configs/oxlint-plugin.test.ts +32 -2
- package/dist/charts/ChartCard.d.ts +28 -3
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +33 -11
- package/dist/charts/Donut.d.ts.map +1 -1
- package/dist/charts/Donut.js +13 -1
- package/dist/charts/Heatmap.js +1 -1
- package/dist/charts/Sparkline.d.ts +7 -1
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +137 -18
- package/dist/charts/box.d.ts +2 -0
- package/dist/charts/box.d.ts.map +1 -1
- package/dist/charts/box.js +2 -0
- package/dist/charts/chart-box.module.css +30 -0
- package/dist/charts/chart-box.module.css.d.ts +1 -0
- package/dist/charts/chart-card.module.css +47 -0
- package/dist/charts/chart-card.module.css.d.ts +7 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +35 -8
- package/dist/charts/host.d.ts.map +1 -1
- package/dist/charts/host.js +2 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/sparkline.module.css +59 -0
- package/dist/charts/sparkline.module.css.d.ts +13 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +32 -4
- package/dist/charts/types.d.ts +6 -0
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/controls/sync-button.d.ts +3 -0
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/dashboard/bar-list.d.ts +15 -4
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +39 -15
- package/dist/dashboard/bar-list.module.css +77 -2
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/delta-badge.d.ts +8 -3
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +9 -2
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +19 -0
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +18 -1
- package/dist/dashboard/meter-parts.d.ts +5 -1
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +114 -74
- package/dist/dashboard/meter.d.ts +22 -1
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +4 -1
- package/dist/dashboard/meter.module.css +90 -12
- package/dist/dashboard/meter.module.css.d.ts +5 -0
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +14 -9
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +14 -25
- package/dist/dashboard/stat-card-parts.js +1 -1
- package/dist/dashboard/stat-card.d.ts +1 -1
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +3 -6
- package/dist/dashboard/stat-card.module.css +15 -7
- package/dist/dashboard/stat-group.d.ts +11 -2
- package/dist/dashboard/stat-group.d.ts.map +1 -1
- package/dist/dashboard/stat-group.js +9 -7
- package/dist/dashboard/stat-strip.d.ts +50 -0
- package/dist/dashboard/stat-strip.d.ts.map +1 -0
- package/dist/dashboard/stat-strip.js +85 -0
- package/dist/dashboard/stat-strip.module.css +208 -0
- package/dist/dashboard/stat-strip.module.css.d.ts +28 -0
- package/dist/dashboard/widget-header.d.ts +3 -3
- package/dist/dashboard/widget-header.module.css +10 -6
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +4 -3
- package/dist/format/shared.d.ts +6 -0
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/format/shared.js +6 -2
- package/dist/guard/index.d.ts +1 -1
- package/dist/guard/index.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/styles.css +6 -0
- package/dist/theme/card-inset.module.css +76 -0
- package/dist/theme/card-inset.module.css.d.ts +9 -0
- package/dist/theme/controls.module.css +3 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +23 -0
- package/dist/theme/nav-link.module.css +8 -10
- package/dist/theme/status-dot.d.ts +3 -2
- package/dist/theme/status-dot.d.ts.map +1 -1
- package/dist/theme/status-dot.js +12 -3
- package/dist/theme/status-verdict.d.ts +3 -2
- package/dist/theme/status-verdict.d.ts.map +1 -1
- package/dist/theme/status-verdict.js +3 -2
- package/dist/theme/status-verdict.module.css +4 -2
- package/llms.txt +30 -6
- package/package.json +1 -1
- package/src/charts/ChartCard.tsx +70 -4
- package/src/charts/Donut.tsx +9 -1
- package/src/charts/Heatmap.tsx +1 -1
- package/src/charts/Sparkline.tsx +180 -18
- package/src/charts/box.tsx +2 -0
- package/src/charts/chart-box.module.css +30 -0
- package/src/charts/chart-box.module.css.d.ts +1 -0
- package/src/charts/chart-card.module.css +47 -0
- package/src/charts/chart-card.module.css.d.ts +7 -0
- package/src/charts/compile.ts +42 -9
- package/src/charts/host.tsx +6 -3
- package/src/charts/index.ts +1 -1
- package/src/charts/sparkline.module.css +59 -0
- package/src/charts/sparkline.module.css.d.ts +13 -0
- package/src/charts/state.tsx +44 -4
- package/src/charts/types.ts +6 -0
- package/src/controls/sync-button.tsx +3 -0
- package/src/dashboard/bar-list.module.css +77 -2
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +86 -18
- package/src/dashboard/delta-badge.tsx +21 -5
- package/src/dashboard/index.ts +2 -0
- package/src/dashboard/meter-model.ts +35 -0
- package/src/dashboard/meter-parts.tsx +119 -23
- package/src/dashboard/meter.module.css +90 -12
- package/src/dashboard/meter.module.css.d.ts +5 -0
- package/src/dashboard/meter.tsx +26 -2
- package/src/dashboard/query-state.tsx +28 -19
- package/src/dashboard/settings-section.tsx +1 -8
- package/src/dashboard/stat-card-parts.tsx +1 -1
- package/src/dashboard/stat-card.module.css +15 -7
- package/src/dashboard/stat-card.tsx +5 -8
- package/src/dashboard/stat-group.tsx +19 -8
- package/src/dashboard/stat-strip.module.css +208 -0
- package/src/dashboard/stat-strip.module.css.d.ts +28 -0
- package/src/dashboard/stat-strip.tsx +183 -0
- package/src/dashboard/widget-header.module.css +10 -6
- package/src/dashboard/widget-header.tsx +3 -3
- package/src/format/date.ts +6 -3
- package/src/format/shared.ts +11 -2
- package/src/guard/index.ts +1 -1
- package/src/index.ts +7 -0
- package/src/styles.css +6 -0
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +168 -24
- package/src/theme/card-inset.module.css +76 -0
- package/src/theme/card-inset.module.css.d.ts +9 -0
- package/src/theme/controls.module.css +3 -0
- package/src/theme/index.ts +30 -0
- package/src/theme/nav-link.module.css +8 -10
- package/src/theme/status-dot.tsx +17 -5
- package/src/theme/status-verdict.module.css +4 -2
- package/src/theme/status-verdict.tsx +9 -4
package/dist/format/date.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dateFormat, NON_FINITE, numberFormat, toDate } from "./shared.js";
|
|
1
|
+
import { dateFormat, NON_FINITE, numberFormat, resolveLocale, toDate } from "./shared.js";
|
|
2
2
|
const CALENDAR_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
3
3
|
function calendarDate(value, utc) {
|
|
4
4
|
const match = CALENDAR_DATE.exec(value);
|
|
@@ -37,10 +37,11 @@ const RELATIVE_TIME_UNITS = [
|
|
|
37
37
|
const NEGATIVE_ZERO = -0;
|
|
38
38
|
const relativeTimeFormatterCache = /* @__PURE__ */ new Map();
|
|
39
39
|
function relativeTimeFormat(locale, style, numeric) {
|
|
40
|
-
const
|
|
40
|
+
const resolved = resolveLocale(locale);
|
|
41
|
+
const key = `${resolved ?? "\0"}|${style}|${numeric}`;
|
|
41
42
|
const cached = relativeTimeFormatterCache.get(key);
|
|
42
43
|
if (cached !== void 0) return cached;
|
|
43
|
-
const created = new Intl.RelativeTimeFormat(
|
|
44
|
+
const created = new Intl.RelativeTimeFormat(resolved, { style, numeric });
|
|
44
45
|
relativeTimeFormatterCache.set(key, created);
|
|
45
46
|
return created;
|
|
46
47
|
}
|
package/dist/format/shared.d.ts
CHANGED
|
@@ -32,6 +32,12 @@ export type FormatDefaults = {
|
|
|
32
32
|
export declare function defineFormat(next?: FormatDefaults): void;
|
|
33
33
|
/** Clears the {@link defineFormat} defaults back to the runtime's own locale and zone. */
|
|
34
34
|
export declare function resetFormatDefaults(): void;
|
|
35
|
+
/**
|
|
36
|
+
* The ONE locale resolution every formatter shares: the call's own tag, else the
|
|
37
|
+
* {@link defineFormat} default, else `undefined` (the runtime's own locale). Internal — not
|
|
38
|
+
* re-exported from the public barrel.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveLocale(locale?: string): string | undefined;
|
|
35
41
|
export declare function numberFormat(locale: string | undefined, options: Intl.NumberFormatOptions): Intl.NumberFormat;
|
|
36
42
|
export declare function dateFormat(locale: string | undefined, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
|
|
37
43
|
/** What every number/measure formatter accepts. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/format/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,eAAO,MAAM,UAAU,WAAM,CAAA;AAE7B,sDAAsD;AACtD,MAAM,MAAM,YAAY,GAAG;IACzB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC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memoize(caches, locale, options, create) {
|
|
|
38
38
|
cache.set(key, created);
|
|
39
39
|
return created;
|
|
40
40
|
}
|
|
41
|
+
function resolveLocale(locale) {
|
|
42
|
+
return locale ?? defaults.locale;
|
|
43
|
+
}
|
|
41
44
|
function numberFormat(locale, options) {
|
|
42
|
-
const resolved = locale
|
|
45
|
+
const resolved = resolveLocale(locale);
|
|
43
46
|
return memoize(numberCaches, resolved, options, () => new Intl.NumberFormat(resolved, options));
|
|
44
47
|
}
|
|
45
48
|
function dateFormat(locale, options) {
|
|
46
|
-
const resolved = locale
|
|
49
|
+
const resolved = resolveLocale(locale);
|
|
47
50
|
const withZone = options.timeZone === void 0 && defaults.timeZone !== void 0 ? { ...options, timeZone: defaults.timeZone } : options;
|
|
48
51
|
return memoize(dateCaches, resolved, withZone, () => new Intl.DateTimeFormat(resolved, withZone));
|
|
49
52
|
}
|
|
@@ -72,6 +75,7 @@ export {
|
|
|
72
75
|
isFiniteNumber,
|
|
73
76
|
numberFormat,
|
|
74
77
|
resetFormatDefaults,
|
|
78
|
+
resolveLocale,
|
|
75
79
|
scaleThousands,
|
|
76
80
|
toDate
|
|
77
81
|
};
|
package/dist/guard/index.d.ts
CHANGED
|
@@ -214,7 +214,7 @@ export declare const GUARD_RULES: {
|
|
|
214
214
|
readonly pattern: RegExp;
|
|
215
215
|
readonly enabled: (cfg: GuardConfig) => boolean;
|
|
216
216
|
readonly appliesTo: (relPath: string) => boolean;
|
|
217
|
-
readonly message: "withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset);
|
|
217
|
+
readonly message: "withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); the theme owns both, so write neither.";
|
|
218
218
|
};
|
|
219
219
|
readonly 'off-system-surface-var': {
|
|
220
220
|
readonly kind: "off-system-surface-var";
|
package/dist/guard/index.js
CHANGED
|
@@ -816,7 +816,7 @@ const GUARD_RULES = {
|
|
|
816
816
|
enabled: (cfg) => cfg.cardWithBorder,
|
|
817
817
|
// JSX-tag-shaped (`<Card withBorder>`) — never appears in CSS text.
|
|
818
818
|
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
819
|
-
message:
|
|
819
|
+
message: "withBorder on a Card/Paper double-draws the edge \u2014 card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) \u2014 and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); the theme owns both, so write neither."
|
|
820
820
|
},
|
|
821
821
|
"off-system-surface-var": {
|
|
822
822
|
kind: "off-system-surface-var",
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ export { defineNav, navGroup, navTarget, flattenNav, useBasaltNav, type NavItemI
|
|
|
12
12
|
export { scrollParentOf, useCoarsePointer, type Tone } from './common/index.js';
|
|
13
13
|
export { createBasaltTheme } from './theme/index.js';
|
|
14
14
|
export { ThemeToggle } from './theme/theme-toggle.js';
|
|
15
|
+
export { StatusDot, type StatusDotProps } from './theme/status-dot.js';
|
|
16
|
+
export { StatusVerdict, type StatusVerdictProps } from './theme/status-verdict.js';
|
|
15
17
|
export { BasaltShell, PageBar, PageAside, useSizeClass, PageTitle, type ShellBaseProps, type SidebarBlock, type SettingsMenuItem, } from './shell/index.js';
|
|
16
|
-
export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, BarList, type BarListProps, } from './dashboard/index.js';
|
|
18
|
+
export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, } from './dashboard/index.js';
|
|
17
19
|
export { unwrap } from './unwrap.js';
|
|
18
20
|
export type { BasaltRegister, SeriesKey } from './register.js';
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAA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tB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,OAAO,EACP,KAAK,YAAY,GAClB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAMjC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
import { scrollParentOf, useCoarsePointer } from "./common/index.js";
|
|
14
14
|
import { createBasaltTheme } from "./theme/index.js";
|
|
15
15
|
import { ThemeToggle } from "./theme/theme-toggle.js";
|
|
16
|
+
import { StatusDot } from "./theme/status-dot.js";
|
|
17
|
+
import { StatusVerdict } from "./theme/status-verdict.js";
|
|
16
18
|
import {
|
|
17
19
|
BasaltShell,
|
|
18
20
|
PageBar,
|
|
@@ -50,6 +52,8 @@ export {
|
|
|
50
52
|
SettingsSection,
|
|
51
53
|
StatCard,
|
|
52
54
|
StatGroup,
|
|
55
|
+
StatusDot,
|
|
56
|
+
StatusVerdict,
|
|
53
57
|
ThemeToggle,
|
|
54
58
|
WidgetHeader,
|
|
55
59
|
basaltRouterOptions,
|
package/dist/styles.css
CHANGED
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
'Hubot Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica,
|
|
47
47
|
Arial, sans-serif;
|
|
48
48
|
--basalt-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
49
|
+
/* Hero values, unit/count/delta text, bar-list and meter figures: proportional sans, lining
|
|
50
|
+
figures. Set to `var(--basalt-font-mono)` to restore the pre-Wave-35 mono numerals. */
|
|
51
|
+
--basalt-font-numeral: var(--basalt-font-sans);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -153,6 +156,9 @@
|
|
|
153
156
|
h6,
|
|
154
157
|
.mantine-Title-root {
|
|
155
158
|
font-stretch: var(--basalt-font-head-stretch, 88%);
|
|
159
|
+
/* Hubot Sans draws a slashed zero by default; a heading numeral is a figure, not code. */
|
|
160
|
+
font-feature-settings: 'zero' 0;
|
|
161
|
+
font-variant-numeric: lining-nums;
|
|
156
162
|
}
|
|
157
163
|
|
|
158
164
|
/* Scrollbars (docs/DESIGN-SPEC.md §5): 9px, ink-mix thumb (stronger on hover), radius 6,
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The theme owns the card inset (Wave 35, ledger rows 163/165). Mantine's own defaults miss the law:
|
|
3
|
+
* a bare `Card` is 16 px all round and a bare `Paper` is 0. Both resolve here to the density-scaled
|
|
4
|
+
* 12/16 tokens, so a consumer writes nothing.
|
|
5
|
+
*
|
|
6
|
+
* `--card-inset-y/x` are the one pair every part reads: the root's padding, a `Card.Section`'s
|
|
7
|
+
* negative margins (Mantine derives them from ONE `--card-padding`, which cannot express 12/16),
|
|
8
|
+
* and `variant="flush"`, which zeroes the pair — a flush card's sections then cancel nothing.
|
|
9
|
+
*
|
|
10
|
+
* Components that render a `Paper` of their own (Modal / Drawer content, Dialog, ActionBar,
|
|
11
|
+
* FloatingWindow) carry their padding on other parts; the `:not()` list keeps this off them. It sits in
|
|
12
|
+
* `:where()` so the rule stays (0,1,0) and a consumer's own class-based padding wins on source order.
|
|
13
|
+
*/
|
|
14
|
+
/* `--card-padding` is Mantine's: the class default is neutralised to the guaranteed-invalid value so
|
|
15
|
+
`var()` falls through to the token, while an inline `--card-padding` (what a Card `padding` prop
|
|
16
|
+
writes) is still seen and wins. Doubled class: it must out-rank Mantine's own `--card-padding`. */
|
|
17
|
+
.inset.inset {
|
|
18
|
+
--card-padding: initial;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.inset {
|
|
22
|
+
--card-inset-y: var(--card-padding, var(--vx-space-card-inset-y, 12px));
|
|
23
|
+
--card-inset-x: var(--card-padding, var(--vx-space-card-inset-x, 16px));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.inset[data-variant='flush'] {
|
|
27
|
+
--card-inset-y: 0px;
|
|
28
|
+
--card-inset-x: 0px;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.inset:where(
|
|
33
|
+
:not(
|
|
34
|
+
[data-variant='flush'],
|
|
35
|
+
[class*='mantine-Modal-'],
|
|
36
|
+
[class*='mantine-Drawer-'],
|
|
37
|
+
[class*='mantine-Dialog-'],
|
|
38
|
+
[class*='mantine-ActionBar-'],
|
|
39
|
+
[class*='mantine-FloatingWindow-']
|
|
40
|
+
)
|
|
41
|
+
) {
|
|
42
|
+
padding: var(--card-inset-y) var(--card-inset-x);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.section[data-orientation='vertical'] {
|
|
46
|
+
margin-inline: calc(var(--card-inset-x, 16px) * -1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.section[data-orientation='vertical']:first-child {
|
|
50
|
+
margin-top: calc(var(--card-inset-y, 12px) * -1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.section[data-orientation='vertical']:last-child {
|
|
54
|
+
margin-bottom: calc(var(--card-inset-y, 12px) * -1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.section[data-orientation='vertical'][data-inherit-padding] {
|
|
58
|
+
padding-inline: var(--card-inset-x, 16px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.section[data-orientation='horizontal'] {
|
|
62
|
+
margin-block: calc(var(--card-inset-y, 12px) * -1);
|
|
63
|
+
margin-inline: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.section[data-orientation='horizontal']:first-child {
|
|
67
|
+
margin-inline-start: calc(var(--card-inset-x, 16px) * -1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.section[data-orientation='horizontal']:last-child {
|
|
71
|
+
margin-inline-end: calc(var(--card-inset-x, 16px) * -1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.section[data-orientation='horizontal'][data-inherit-padding] {
|
|
75
|
+
padding-block: var(--card-inset-y, 12px);
|
|
76
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed CSS-module declaration (the S4 CSS-modules path). Named string props — not an index
|
|
3
|
+
* signature — so dot access stays verbatim under the package's strict flags.
|
|
4
|
+
*/
|
|
5
|
+
declare const classes: {
|
|
6
|
+
readonly inset: string
|
|
7
|
+
readonly section: string
|
|
8
|
+
}
|
|
9
|
+
export default classes
|
|
@@ -280,6 +280,9 @@ html .accordionItem {
|
|
|
280
280
|
*/
|
|
281
281
|
html[data-mantine-color-scheme] .tabsRoot {
|
|
282
282
|
--tab-border-color: var(--vx-divider);
|
|
283
|
+
/* Mantine's dark hover (dark-6) is the page itself, so a hovered tab read identical to rest. The
|
|
284
|
+
* ink-5% step is NavLink's inactive hover, and resolves per scheme. */
|
|
285
|
+
--tab-hover-color: color-mix(in srgb, var(--vx-ink) 5%, transparent);
|
|
283
286
|
}
|
|
284
287
|
|
|
285
288
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EA0CV,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAe,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAKpD,OAAO,KAAK,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D;;8FAE8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,oBACc,CAAA;AAEjD,kEAAkE;AAClE,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IAE9B;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAE1B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAYD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,EACrD,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAiCtB"}
|
package/dist/theme/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import { pxRem, TEXT_LINE, VX } from "../tokens/core.js";
|
|
|
18
18
|
import { CTL_HEIGHT_VARS } from "../tokens/ctl-vars.js";
|
|
19
19
|
import { SIZE_CLASS_BREAKPOINTS } from "../tokens/size-classes.js";
|
|
20
20
|
import { onColor, onColorFor, inkVars, tabsVars } from "./chrome-vars.js";
|
|
21
|
+
import cardInsetClasses from "./card-inset.module.css";
|
|
21
22
|
import controlsClasses from "./controls.module.css";
|
|
22
23
|
import floatingClasses from "./floating.module.css";
|
|
23
24
|
import navLinkClasses from "./nav-link.module.css";
|
|
@@ -229,7 +230,11 @@ function buildTheme(data, options = {}) {
|
|
|
229
230
|
// • radius → `--vx-radius-card` (10px).
|
|
230
231
|
// This is the single source the user's "strict surface across components" demands; the
|
|
231
232
|
// `raw-surface` guard then stops consumers re-overriding any of it inline.
|
|
233
|
+
// • inset → `card-inset.module.css`: the density-scaled 12/16 tokens, on Paper too (Mantine
|
|
234
|
+
// gives a bare Paper 0 and a bare Card 16); `variant="flush"` zeroes it and `Card.Section`
|
|
235
|
+
// cancels exactly it. A Card `padding` prop still wins (see the CSS).
|
|
232
236
|
Card: ext({
|
|
237
|
+
classNames: { root: cardInsetClasses.inset, section: cardInsetClasses.section },
|
|
233
238
|
styles: {
|
|
234
239
|
root: {
|
|
235
240
|
backgroundColor: "var(--vx-surface-panel)",
|
|
@@ -239,6 +244,7 @@ function buildTheme(data, options = {}) {
|
|
|
239
244
|
}
|
|
240
245
|
}),
|
|
241
246
|
Paper: ext({
|
|
247
|
+
classNames: { root: cardInsetClasses.inset },
|
|
242
248
|
styles: {
|
|
243
249
|
root: {
|
|
244
250
|
backgroundColor: "var(--vx-surface-panel)",
|
|
@@ -420,6 +426,7 @@ function buildTheme(data, options = {}) {
|
|
|
420
426
|
return {
|
|
421
427
|
root: {
|
|
422
428
|
"--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
|
|
429
|
+
"--button-padding-x": buttonPaddingX(props.size),
|
|
423
430
|
"--button-color": ink.color,
|
|
424
431
|
"--button-hover": ink.hover,
|
|
425
432
|
"--button-bg": ink.bg,
|
|
@@ -894,6 +901,22 @@ function familyBridge(data) {
|
|
|
894
901
|
}
|
|
895
902
|
return vars;
|
|
896
903
|
}
|
|
904
|
+
const BUTTON_PADDING_X = {
|
|
905
|
+
xs: "var(--vx-space-stack-md)",
|
|
906
|
+
sm: "var(--vx-space-stack-lg)",
|
|
907
|
+
md: "var(--vx-space-stack-lg) + var(--vx-space-stack-xs)",
|
|
908
|
+
lg: "var(--vx-space-stack-xl)",
|
|
909
|
+
xl: "var(--vx-space-stack-xl) + var(--vx-space-stack-sm)",
|
|
910
|
+
"compact-xs": "var(--vx-space-stack-sm)",
|
|
911
|
+
"compact-sm": "var(--vx-space-stack-sm)",
|
|
912
|
+
"compact-md": "var(--vx-space-stack-md)",
|
|
913
|
+
"compact-lg": "var(--vx-space-stack-md)",
|
|
914
|
+
"compact-xl": "var(--vx-space-stack-lg)"
|
|
915
|
+
};
|
|
916
|
+
function buttonPaddingX(size) {
|
|
917
|
+
const steps = BUTTON_PADDING_X[typeof size === "string" ? size : "sm"];
|
|
918
|
+
return steps === void 0 ? void 0 : `calc((${steps}) * var(--mantine-scale))`;
|
|
919
|
+
}
|
|
897
920
|
const CTL_PADDING_X = 10;
|
|
898
921
|
const CTL_INPUT_PADDING_Y = 4;
|
|
899
922
|
const CTL_SEGMENT_PADDING_Y = 2.5;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Active nav row =
|
|
3
|
-
* SELECTED rather than merely hovered (docs/DESIGN-SPEC.md §5).
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* an active row is a SELECTED ROW, not a raised control.
|
|
2
|
+
* Active nav row = a NEUTRAL ink fill (10%, twice the 5% inactive hover) plus heavier weight, so the
|
|
3
|
+
* row reads as SELECTED rather than merely hovered (docs/DESIGN-SPEC.md §5). Never the accent
|
|
4
|
+
* (DESIGN-CORE § Accent discipline, SPEC § 6.12): the accent stays on the focus ring, the filled
|
|
5
|
+
* primary and the active ICON below. NO depth: an active row is a SELECTED ROW, not a raised control.
|
|
7
6
|
*
|
|
8
7
|
* `[data-active]` is the ONLY style hook here — `use-nav.ts` already resolves exactly one winner
|
|
9
8
|
* per route and stamps `data-active` on it, so keying these selectors on `aria-current="page"` too
|
|
@@ -17,7 +16,7 @@
|
|
|
17
16
|
* there throws a React warning), so the state selectors live here.
|
|
18
17
|
*/
|
|
19
18
|
.root[data-active] {
|
|
20
|
-
background-color: color-mix(in srgb, var(--vx-
|
|
19
|
+
background-color: color-mix(in srgb, var(--vx-ink) 10%, transparent);
|
|
21
20
|
font-weight: 600;
|
|
22
21
|
}
|
|
23
22
|
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
* still reads as feedback rather than as a flat, unresponsive selection. */
|
|
33
32
|
@media (hover: hover) {
|
|
34
33
|
.root[data-active]:hover {
|
|
35
|
-
background-color: color-mix(in srgb, var(--vx-
|
|
34
|
+
background-color: color-mix(in srgb, var(--vx-ink) 14%, transparent);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -61,10 +60,9 @@
|
|
|
61
60
|
|
|
62
61
|
/*
|
|
63
62
|
* Inactive hover — the ink-5% ghost tint + ink text/icon (docs/DESIGN-SPEC.md §5; dropped from 6%
|
|
64
|
-
* so it reads clearly below the active row's
|
|
65
|
-
* ink fill). Lives here (not only in the shell module) so a consumer's `SidebarItem.Anchor` path
|
|
63
|
+
* so it reads clearly below the active row's 10% ink fill). Lives here (not only in the shell module) so a consumer's `SidebarItem.Anchor` path
|
|
66
64
|
* gets the same hover; Mantine's own hover fill uses `:where(scheme) .m_*:hover` (gray-0/dark-6),
|
|
67
|
-
* which this outranks on specificity. Active rows keep their
|
|
65
|
+
* which this outranks on specificity. Active rows keep their ink fill above, untouched here.
|
|
68
66
|
*/
|
|
69
67
|
@media (hover: hover) {
|
|
70
68
|
.root:not([data-active]):hover {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BasaltProps } from '../common/props.js';
|
|
2
|
+
export type StatusDotProps = BasaltProps & {
|
|
2
3
|
/** Any CSS colour; callers pass a `VX.status.*` token so it re-resolves per scheme. */
|
|
3
4
|
color: string;
|
|
4
5
|
};
|
|
5
|
-
export declare function StatusDot({ color }: StatusDotProps): import("react").JSX.Element;
|
|
6
|
+
export declare function StatusDot({ color, className, style }: StatusDotProps): import("react").JSX.Element;
|
|
6
7
|
//# sourceMappingURL=status-dot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/theme/status-dot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/theme/status-dot.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAID,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BAUpE"}
|
package/dist/theme/status-dot.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "../common/props.js";
|
|
2
3
|
import classes from "./status-dot.module.css";
|
|
3
|
-
function StatusDot({ color }) {
|
|
4
|
-
const
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
+
function StatusDot({ color, className, style }) {
|
|
5
|
+
const merged = { ...style, "--basalt-status-dot": color };
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
"span",
|
|
8
|
+
{
|
|
9
|
+
className: cx(classes.dot, className),
|
|
10
|
+
"data-basalt-status-dot": "",
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
style: merged
|
|
13
|
+
}
|
|
14
|
+
);
|
|
6
15
|
}
|
|
7
16
|
export {
|
|
8
17
|
StatusDot
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BasaltProps } from '../common/props.js';
|
|
2
|
+
export type StatusVerdictProps = BasaltProps & {
|
|
2
3
|
color: string;
|
|
3
4
|
/** The short visible word ("Over", "Error"). */
|
|
4
5
|
word: string;
|
|
5
6
|
/** A longer phrase for assistive tech, read in place of the word. */
|
|
6
7
|
phrase?: string;
|
|
7
8
|
};
|
|
8
|
-
export declare function StatusVerdict({ color, word, phrase }: StatusVerdictProps): import("react").JSX.Element;
|
|
9
|
+
export declare function StatusVerdict({ color, word, phrase, className, style }: StatusVerdictProps): import("react").JSX.Element;
|
|
9
10
|
//# sourceMappingURL=status-verdict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-verdict.d.ts","sourceRoot":"","sources":["../../src/theme/status-verdict.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status-verdict.d.ts","sourceRoot":"","sources":["../../src/theme/status-verdict.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIlD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAU1F"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "../common/props.js";
|
|
2
3
|
import { StatusDot } from "./status-dot.js";
|
|
3
4
|
import classes from "./status-verdict.module.css";
|
|
4
|
-
function StatusVerdict({ color, word, phrase }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("span", { className: classes.verdict, children: [
|
|
5
|
+
function StatusVerdict({ color, word, phrase, className, style }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs("span", { className: cx(classes.verdict, className), ...style !== void 0 && { style }, children: [
|
|
6
7
|
/* @__PURE__ */ jsx(StatusDot, { color }),
|
|
7
8
|
/* @__PURE__ */ jsx("span", { "data-verdict-word": "", ...phrase !== void 0 && { "aria-hidden": true }, children: word }),
|
|
8
9
|
phrase !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.hidden, children: phrase })
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* A status dot plus its word: the dot carries the colour, the word is muted ink. `flex: none` keeps
|
|
2
|
-
* it whole when a neighbouring caption or title truncates.
|
|
2
|
+
* it whole when a neighbouring caption or title truncates. The word is the proportional sans, at the
|
|
3
|
+
* micro size: it is a sentence fragment ("Blocked · Waits on the API change"), not an UPPERCASE
|
|
4
|
+
* caption, so it never takes the mono. */
|
|
3
5
|
.verdict {
|
|
4
6
|
display: inline-flex;
|
|
5
7
|
flex: none;
|
|
6
8
|
align-items: center;
|
|
7
9
|
gap: 5px;
|
|
8
|
-
font-family: var(--basalt-font-
|
|
10
|
+
font-family: var(--basalt-font-sans);
|
|
9
11
|
font-size: var(--vx-text-micro);
|
|
10
12
|
color: var(--vx-muted);
|
|
11
13
|
}
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v2.
|
|
1
|
+
# basalt-ui v2.20.0
|
|
2
2
|
# Opinionated framework for Mantine-based React apps — theme, app shell, TanStack Charts, toolchain presets
|
|
3
3
|
#
|
|
4
4
|
# Entry points: use the exact import specifier below; do not guess.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# A subpath's `Install:` line is its required peers; `OptionalPeers:` are import()-only, install on use.
|
|
14
14
|
|
|
15
15
|
Package: basalt-ui
|
|
16
|
-
Version: 2.
|
|
16
|
+
Version: 2.20.0
|
|
17
17
|
|
|
18
18
|
## basalt-ui
|
|
19
19
|
Import: import { ... } from 'basalt-ui'
|
|
@@ -25,8 +25,9 @@ Signature: BarList(props: BarListProps): JSX.Element
|
|
|
25
25
|
style?: CSSProperties
|
|
26
26
|
label: string
|
|
27
27
|
items: readonly BarListItem[]
|
|
28
|
-
format?: (value: number) => string
|
|
28
|
+
format?: (value: number, part: "value" | "max") => string
|
|
29
29
|
max?: number
|
|
30
|
+
variant?: "default" | "thin"
|
|
30
31
|
accentLeader?: boolean
|
|
31
32
|
loading?: boolean
|
|
32
33
|
loadingRows?: number
|
|
@@ -82,6 +83,7 @@ Signature: DeltaBadge(props: DeltaBadgeProps): JSX.Element
|
|
|
82
83
|
format?: (value: number) => string
|
|
83
84
|
withGlyph?: boolean
|
|
84
85
|
period?: string
|
|
86
|
+
periodPrefix?: string
|
|
85
87
|
Signature: EmptyState(props: EmptyStateProps): JSX.Element
|
|
86
88
|
className?: string
|
|
87
89
|
style?: CSSProperties
|
|
@@ -102,6 +104,9 @@ Signature: Meter(props: MeterProps): JSX.Element
|
|
|
102
104
|
emptyText?: string
|
|
103
105
|
shape?: "bar" | "ring"
|
|
104
106
|
target?: number [with segments | zones]
|
|
107
|
+
ticks?: readonly MeterTick[] [with segments | zones]
|
|
108
|
+
tone?: "muted" [with segments | zones]
|
|
109
|
+
size?: "row" [with segments | zones]
|
|
105
110
|
startCaption?: ReactNode [with segments | zones]
|
|
106
111
|
endCaption?: ReactNode [with segments | zones]
|
|
107
112
|
value?: number | null [with zones]
|
|
@@ -207,11 +212,26 @@ Signature: StatCard(props: StatCardProps): JSX.Element
|
|
|
207
212
|
actions?: ReactNode
|
|
208
213
|
tone?: Tone
|
|
209
214
|
Signature: StatGroup(props: StatGroupProps): JSX.Element
|
|
215
|
+
one of: variant="grid" | variant="strip"
|
|
210
216
|
className?: string
|
|
211
217
|
style?: CSSProperties
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
variant?: "grid" | "strip"
|
|
219
|
+
cols?: StatGroupCols | 2 | 3 | 4 | 5 | 6
|
|
220
|
+
divided?: boolean [with variant="grid"]
|
|
221
|
+
children: ReactNode [with variant="grid"]
|
|
222
|
+
label: string [with variant="strip"]
|
|
223
|
+
cells: readonly StatStripCell[] [with variant="strip"]
|
|
224
|
+
footer?: readonly { key: string; content: ReactNode; }[] [with variant="strip"]
|
|
225
|
+
Signature: StatusDot(props: StatusDotProps): JSX.Element
|
|
226
|
+
className?: string
|
|
227
|
+
style?: CSSProperties
|
|
228
|
+
color: string
|
|
229
|
+
Signature: StatusVerdict(props: StatusVerdictProps): JSX.Element
|
|
230
|
+
className?: string
|
|
231
|
+
style?: CSSProperties
|
|
232
|
+
color: string
|
|
233
|
+
word: string
|
|
234
|
+
phrase?: string
|
|
215
235
|
Signature: ThemeToggle(props: ThemeToggleProps): JSX.Element
|
|
216
236
|
className?: string
|
|
217
237
|
style?: CSSProperties
|
|
@@ -352,6 +372,7 @@ Signature: ChartCard(props: ChartCardProps): ReactElement<unknown, string | JSXE
|
|
|
352
372
|
placeholderHeight?: number | ResponsiveChartHeight
|
|
353
373
|
stateAction?: ReactNode
|
|
354
374
|
children?: ReactNode
|
|
375
|
+
facts: ChartFact | readonly ChartFact[]
|
|
355
376
|
Signature: Donut(props: DonutProps<K>): ReactElement<unknown, string | JSXElementConstructor<any>>
|
|
356
377
|
className?: string
|
|
357
378
|
style?: CSSProperties
|
|
@@ -460,6 +481,9 @@ Signature: Sparkline(props: SparklineProps): ReactElement<unknown, string | JSXE
|
|
|
460
481
|
emphasizeLast?: boolean
|
|
461
482
|
emphasisColor?: string
|
|
462
483
|
state?: ChartState
|
|
484
|
+
reference?: number | "mean"
|
|
485
|
+
format?: ((value: number) => string)
|
|
486
|
+
labels?: readonly string[]
|
|
463
487
|
Signature: StackedArea(props: StackedAreaProps<T, X>): ReactElement<unknown, string | JSXElementConstructor<any>>
|
|
464
488
|
className?: string
|
|
465
489
|
style?: CSSProperties
|