@texturehq/edges 1.0.2 → 1.1.1

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/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { I as Icon, B as BaseDataPoint, Y as YFormatType, T as TooltipData, a as IconName$2 } from './server-DmvMh5XJ.js';
2
- export { A as ActionItem, c as ActionMenu, b as ActionMenuProps, e as AppShell, d as AppShellProps, g as Avatar, f as AvatarProps, i as Badge, h as BadgeProps, C as Card, Q as ChartContext, V as ChartMargin, m as CodeEditor, j as CodeEditorProps, k as CodeLanguage, l as CodeTheme, n as DateField, D as DateFieldProps, o as FileUpload, F as FileUploadProps, H as Heading, r as InteractiveMap, q as InteractiveMapProps, L as Loader, p as Logo, s as MAPBOX_THEMES, M as MapPoint, v as Meter, u as MeterProps, w as RichTextEditor, R as RichTextEditorProps, y as SegmentOption, z as SegmentedControl, x as SegmentedControlProps, J as SideNav, E as SideNavItem, G as SideNavProps, t as StaticMap, S as StaticMapProps, K as TextLink, P as TooltipSeries, O as TopNav, N as TopNavProps, $ as YFormatSettings, a0 as clearColorCache, a1 as createCategoryColorMap, W as createXScale, X as createYScale, Z as defaultMargin, a2 as getContrastingTextColor, a3 as getDefaultChartColor, a4 as getDefaultColors, a5 as getResolvedColor, a6 as getThemeCategoricalColors, _ as getYFormatSettings, a7 as isLightColor, U as useChartContext } from './server-DmvMh5XJ.js';
1
+ import { I as Icon, B as BaseDataPoint, Y as YFormatType, T as TooltipData, a as IconName$2 } from './server-DkP8PI1p.js';
2
+ export { A as ActionItem, c as ActionMenu, b as ActionMenuProps, e as AppShell, d as AppShellProps, g as Avatar, f as AvatarProps, i as Badge, h as BadgeProps, k as Card, C as CardProps, j as CardVariant, V as ChartContext, X as ChartMargin, o as CodeEditor, l as CodeEditorProps, m as CodeLanguage, n as CodeTheme, p as DateField, D as DateFieldProps, q as FileUpload, F as FileUploadProps, H as Heading, t as InteractiveMap, s as InteractiveMapProps, L as Loader, r as Logo, u as MAPBOX_THEMES, M as MapPoint, x as Meter, w as MeterProps, y as RichTextEditor, R as RichTextEditorProps, E as SegmentOption, G as SegmentedControl, z as SegmentedControlProps, N as SideNav, J as SideNavItem, K as SideNavProps, v as StaticMap, S as StaticMapProps, O as TextLink, U as TooltipSeries, Q as TopNav, P as TopNavProps, a1 as YFormatSettings, a2 as clearColorCache, a3 as createCategoryColorMap, Z as createXScale, _ as createYScale, $ as defaultMargin, a4 as getContrastingTextColor, a5 as getDefaultChartColor, a6 as getDefaultColors, a7 as getResolvedColor, a8 as getThemeCategoricalColors, a0 as getYFormatSettings, a9 as isLightColor, W as useChartContext } from './server-DkP8PI1p.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { ComponentProps, ReactNode, ComponentType, Component, ErrorInfo } from 'react';
6
- import { Key, ValidationResult, BreadcrumbProps, BreadcrumbsProps, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, CheckboxGroupProps as CheckboxGroupProps$1, DateRangePickerProps as DateRangePickerProps$1, DialogProps, TextProps, FormProps, ListBoxProps as ListBoxProps$1, ListBoxItemProps, NumberFieldProps as NumberFieldProps$1, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, RangeCalendarProps as RangeCalendarProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps, TabPanelProps, TabsProps, TextFieldProps as TextFieldProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, TooltipProps as TooltipProps$1 } from 'react-aria-components';
6
+ import { Key, ValidationResult, BreadcrumbProps, BreadcrumbsProps, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, CheckboxGroupProps as CheckboxGroupProps$1, DateRangePickerProps as DateRangePickerProps$1, DialogProps, TextProps, FormProps, ListBoxProps as ListBoxProps$1, ListBoxItemProps, NumberFieldProps as NumberFieldProps$1, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, RangeCalendarProps as RangeCalendarProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps, TabsProps as TabsProps$2, TextFieldProps as TextFieldProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, TooltipProps as TooltipProps$1 } from 'react-aria-components';
7
7
  export { BreadcrumbProps, BreadcrumbsProps } from 'react-aria-components';
8
8
  import { ScaleTime, ScaleLinear } from 'd3-scale';
9
9
  import '@phosphor-icons/react';
@@ -19,6 +19,759 @@ declare function useDebounce<T>(value: T, delay?: number): T;
19
19
  */
20
20
  declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T | ((val: T) => T)) => void, () => void];
21
21
 
22
+ /**
23
+ * Core types for the formatting system
24
+ */
25
+ type FieldValue = string | number | boolean | Date | null | undefined;
26
+ type FormattedValue = string | null;
27
+ type FormatterFunction = (value: FieldValue, ...args: unknown[]) => FormattedValue;
28
+ interface BaseFormat {
29
+ nullText?: string;
30
+ emptyText?: string;
31
+ hideWhenNull?: boolean;
32
+ hideWhenZero?: boolean;
33
+ }
34
+ type TextTransform = "uppercase" | "lowercase" | "capitalize" | "titleCase" | "sentenceCase";
35
+ type TextTruncatePosition = "start" | "middle" | "end";
36
+ interface TextFormat extends BaseFormat {
37
+ type: "text";
38
+ transform?: TextTransform | TextTransform[];
39
+ truncate?: {
40
+ length: number;
41
+ position: TextTruncatePosition;
42
+ ellipsis?: string;
43
+ };
44
+ wrap?: "normal" | "nowrap" | "pre" | "pre-wrap";
45
+ highlight?: {
46
+ pattern: string | RegExp;
47
+ className?: string;
48
+ };
49
+ }
50
+ interface NumberFormat extends BaseFormat {
51
+ type: "number";
52
+ decimals?: number;
53
+ thousandsSeparator?: boolean;
54
+ notation?: "standard" | "scientific" | "compact" | "engineering";
55
+ compactDisplay?: "short" | "long";
56
+ sign?: "auto" | "never" | "always" | "exceptZero";
57
+ }
58
+ interface CurrencyFormat extends BaseFormat {
59
+ type: "currency";
60
+ currency?: string;
61
+ currencyDisplay?: "symbol" | "narrowSymbol" | "code" | "name";
62
+ minimumFractionDigits?: number;
63
+ maximumFractionDigits?: number;
64
+ thousandsSeparator?: boolean;
65
+ }
66
+ type DateFormatStyle = "short" | "medium" | "long" | "full";
67
+ interface DateFormat extends BaseFormat {
68
+ type: "date";
69
+ format?: string;
70
+ dateStyle?: DateFormatStyle;
71
+ timeStyle?: DateFormatStyle;
72
+ relative?: boolean;
73
+ timezone?: string;
74
+ }
75
+ interface BooleanFormat extends BaseFormat {
76
+ type: "boolean";
77
+ trueText?: string;
78
+ falseText?: string;
79
+ trueIcon?: string;
80
+ falseIcon?: string;
81
+ }
82
+ type EnergyUnit = "Wh" | "kWh" | "MWh" | "GWh";
83
+ interface EnergyFormat extends BaseFormat {
84
+ type: "energy";
85
+ unit?: EnergyUnit;
86
+ autoScale?: boolean;
87
+ decimals?: number;
88
+ }
89
+ type PowerUnit = "W" | "kW" | "MW" | "GW";
90
+ interface PowerFormat extends BaseFormat {
91
+ type: "power";
92
+ unit?: PowerUnit;
93
+ autoScale?: boolean;
94
+ decimals?: number;
95
+ }
96
+ type VoltageUnit = "mV" | "V" | "kV";
97
+ interface VoltageFormat extends BaseFormat {
98
+ type: "voltage";
99
+ unit?: VoltageUnit;
100
+ autoScale?: boolean;
101
+ decimals?: number;
102
+ }
103
+ type CurrentUnit = "mA" | "A" | "kA";
104
+ interface CurrentFormat extends BaseFormat {
105
+ type: "current";
106
+ unit?: CurrentUnit;
107
+ autoScale?: boolean;
108
+ decimals?: number;
109
+ }
110
+ type ResistanceUnit = "mΩ" | "Ω" | "kΩ" | "MΩ";
111
+ interface ResistanceFormat extends BaseFormat {
112
+ type: "resistance";
113
+ unit?: ResistanceUnit;
114
+ autoScale?: boolean;
115
+ decimals?: number;
116
+ }
117
+ type TemperatureUnit = "C" | "F" | "K";
118
+ type TemperatureUnitString = "CELSIUS" | "FAHRENHEIT" | "KELVIN";
119
+ interface TemperatureFormat extends BaseFormat {
120
+ type: "temperature";
121
+ unit?: TemperatureUnit | TemperatureUnitString;
122
+ decimals?: number;
123
+ showUnit?: boolean;
124
+ }
125
+ type DistanceUnit = "m" | "km" | "ft" | "mi" | "yd";
126
+ interface DistanceFormat extends BaseFormat {
127
+ type: "distance";
128
+ unit?: DistanceUnit;
129
+ autoScale?: boolean;
130
+ decimals?: number;
131
+ }
132
+ interface PhoneFormat extends BaseFormat {
133
+ type: "phone";
134
+ country?: string;
135
+ international?: boolean;
136
+ }
137
+ interface CustomFormat extends BaseFormat {
138
+ type: "custom";
139
+ formatter: FormatterFunction;
140
+ options?: Record<string, unknown>;
141
+ }
142
+ type FieldFormat = TextFormat | NumberFormat | CurrencyFormat | DateFormat | BooleanFormat | EnergyFormat | PowerFormat | VoltageFormat | CurrentFormat | ResistanceFormat | TemperatureFormat | DistanceFormat | PhoneFormat | CustomFormat;
143
+
144
+ /**
145
+ * Boolean formatting utilities
146
+ */
147
+
148
+ /**
149
+ * Format boolean value with custom text
150
+ */
151
+ declare const toBoolean: (value: boolean | null | undefined, trueText?: string, falseText?: string) => string | null;
152
+ /**
153
+ * Format boolean as enabled/disabled
154
+ */
155
+ declare const toEnabledDisabled: (value: boolean | null | undefined) => string | null;
156
+ /**
157
+ * Format boolean as on/off
158
+ */
159
+ declare const toOnOff: (value: boolean | null | undefined) => string | null;
160
+ /**
161
+ * Format boolean as active/inactive
162
+ */
163
+ declare const toActiveInactive: (value: boolean | null | undefined) => string | null;
164
+ /**
165
+ * Format boolean as true/false
166
+ */
167
+ declare const toTrueFalse: (value: boolean | null | undefined) => string | null;
168
+ /**
169
+ * Format boolean as checkmark/cross
170
+ */
171
+ declare const toCheckmark: (value: boolean | null | undefined) => string | null;
172
+ /**
173
+ * Parse various truthy/falsy values to boolean
174
+ */
175
+ declare const parseBoolean: (value: FieldValue) => boolean | null;
176
+ /**
177
+ * Format boolean according to BooleanFormat specification
178
+ */
179
+ declare const formatBoolean: (value: FieldValue, format: BooleanFormat) => FormattedValue;
180
+
181
+ /**
182
+ * Centralized formatting utility for UI components
183
+ * Used by Kpi, StatList, and other data display components
184
+ */
185
+
186
+ /**
187
+ * Common formatter type used by data display components
188
+ * Can be either a custom function or a FieldFormat object
189
+ */
190
+ type ComponentFormatter = ((value: FieldValue) => React__default.ReactNode) | FieldFormat;
191
+ /**
192
+ * Options for formatting values in components
193
+ */
194
+ interface ComponentFormatOptions {
195
+ /** The value to format */
196
+ value: FieldValue;
197
+ /** The formatter to apply */
198
+ formatter?: ComponentFormatter;
199
+ /** CSS class for null/empty values */
200
+ emptyClassName?: string;
201
+ /** Text to show for null/empty values */
202
+ emptyText?: React__default.ReactNode;
203
+ }
204
+ /**
205
+ * Format a value for display in a component
206
+ * Centralizes the logic used by Kpi, StatList, and similar components
207
+ *
208
+ * @example
209
+ * ```tsx
210
+ * // In a component
211
+ * const formatted = formatComponentValue({
212
+ * value: 1500,
213
+ * formatter: { type: "power" }
214
+ * });
215
+ * // Returns: "1.5 kW"
216
+ * ```
217
+ */
218
+ declare function formatComponentValue({ value, formatter, emptyClassName, emptyText, }: ComponentFormatOptions): React__default.ReactNode;
219
+ /**
220
+ * Hook for using the component formatter
221
+ * Provides memoization for better performance
222
+ *
223
+ * @example
224
+ * ```tsx
225
+ * function MyComponent({ value, formatter }) {
226
+ * const format = useComponentFormatter(formatter);
227
+ * const formatted = format(value);
228
+ * return <span>{formatted}</span>;
229
+ * }
230
+ * ```
231
+ */
232
+ declare function useComponentFormatter(formatter?: ComponentFormatter, emptyClassName?: string, emptyText?: React__default.ReactNode): (value: FieldValue) => React__default.ReactNode;
233
+
234
+ /**
235
+ * Electrical current formatting utilities (flow of electric charge)
236
+ */
237
+
238
+ /**
239
+ * Format as milliamps
240
+ */
241
+ declare const toMilliamps: (value: number | null | undefined, decimals?: number) => string | null;
242
+ /**
243
+ * Format as amperes
244
+ */
245
+ declare const toAmps: (value: number | null | undefined, decimals?: number) => string | null;
246
+ /**
247
+ * Format as kiloamps (rarely used but included for completeness)
248
+ */
249
+ declare const toKiloamps: (value: number | null | undefined, decimals?: number) => string | null;
250
+ /**
251
+ * Auto-scale current to the most appropriate unit
252
+ */
253
+ declare const autoScaleCurrent: (value: number | null | undefined, decimals?: number) => string | null;
254
+ /**
255
+ * Format current according to CurrentFormat specification
256
+ */
257
+ declare const formatCurrent: (value: FieldValue, format: CurrentFormat) => FormattedValue;
258
+ declare const toMA: (value: number | null | undefined, decimals?: number) => string | null;
259
+ declare const toA: (value: number | null | undefined, decimals?: number) => string | null;
260
+ declare const toKA: (value: number | null | undefined, decimals?: number) => string | null;
261
+
262
+ /**
263
+ * Date formatting utilities using Luxon
264
+ */
265
+
266
+ /**
267
+ * Format date to string with various options
268
+ */
269
+ declare const toDateString: (value: string | Date | number | null | undefined, showTime?: boolean, timezone?: string) => string | null;
270
+ /**
271
+ * Format date to relative time (e.g., "2 hours ago")
272
+ */
273
+ declare const toRelativeTime: (value: string | Date | number | null | undefined) => string | null;
274
+ /**
275
+ * Format date with full date and time including weekday
276
+ */
277
+ declare const toFullDateTime: (value: string | Date | number | null | undefined, timezone?: string) => string | null;
278
+ /**
279
+ * Format date to ISO string
280
+ */
281
+ declare const toISOString: (value: string | Date | number | null | undefined) => string | null;
282
+ /**
283
+ * Format date with custom format string
284
+ */
285
+ declare const toCustomDateFormat: (value: string | Date | number | null | undefined, format: string, timezone?: string) => string | null;
286
+ /**
287
+ * Get formatted date parts
288
+ */
289
+ declare const getDateParts: (value: string | Date | number | null | undefined) => {
290
+ year: number;
291
+ month: number;
292
+ day: number;
293
+ weekday: number;
294
+ hour: number;
295
+ minute: number;
296
+ second: number;
297
+ millisecond: number;
298
+ weekdayShort: string | null;
299
+ weekdayLong: string | null;
300
+ monthShort: string | null;
301
+ monthLong: string | null;
302
+ } | null;
303
+ /**
304
+ * Format date according to DateFormat specification
305
+ */
306
+ declare const formatDate: (value: FieldValue, format: DateFormat) => FormattedValue;
307
+
308
+ /**
309
+ * Distance and length formatting utilities
310
+ */
311
+
312
+ /**
313
+ * Format as meters
314
+ */
315
+ declare const toMeters: (value: number | null | undefined, decimals?: number) => string | null;
316
+ /**
317
+ * Format as centimeters
318
+ */
319
+ declare const toCentimeters: (value: number | null | undefined, decimals?: number) => string | null;
320
+ /**
321
+ * Format as millimeters
322
+ */
323
+ declare const toMillimeters: (value: number | null | undefined, decimals?: number) => string | null;
324
+ /**
325
+ * Format as kilometers
326
+ */
327
+ declare const toKilometers: (value: number | null | undefined, decimals?: number) => string | null;
328
+ /**
329
+ * Format as feet
330
+ */
331
+ declare const toFeet: (value: number | null | undefined, decimals?: number) => string | null;
332
+ /**
333
+ * Format as inches
334
+ */
335
+ declare const toInches: (value: number | null | undefined, decimals?: number) => string | null;
336
+ /**
337
+ * Format as miles
338
+ */
339
+ declare const toMiles: (value: number | null | undefined, decimals?: number) => string | null;
340
+ /**
341
+ * Format as yards
342
+ */
343
+ declare const toYards: (value: number | null | undefined, decimals?: number) => string | null;
344
+ /**
345
+ * Format as nautical miles
346
+ */
347
+ declare const toNauticalMiles: (value: number | null | undefined, decimals?: number) => string | null;
348
+ /**
349
+ * Conversion utilities
350
+ */
351
+ declare const metersToFeet: (meters: number) => number;
352
+ declare const feetToMeters: (feet: number) => number;
353
+ declare const milesToKilometers: (miles: number) => number;
354
+ declare const kilometersToMiles: (km: number) => number;
355
+ declare const feetToMiles: (feet: number) => number;
356
+ declare const milesToFeet: (miles: number) => number;
357
+ declare const metersToMiles: (meters: number) => number;
358
+ declare const milesToMeters: (miles: number) => number;
359
+ declare const yardsToMeters: (yards: number) => number;
360
+ declare const metersToYards: (meters: number) => number;
361
+ declare const inchesToCentimeters: (inches: number) => number;
362
+ declare const centimetersToInches: (cm: number) => number;
363
+ /**
364
+ * Auto-scale distance to the most appropriate unit
365
+ */
366
+ declare const autoScaleDistance: (value: number | null | undefined, metric?: boolean, decimals?: number) => string | null;
367
+ /**
368
+ * Format distance according to DistanceFormat specification
369
+ */
370
+ declare const formatDistance: (value: FieldValue, format: DistanceFormat) => FormattedValue;
371
+
372
+ /**
373
+ * Energy formatting utilities (stored or consumed energy)
374
+ * For power (rate of energy), use power.ts
375
+ * For electrical units (voltage, current), use voltage.ts and current.ts
376
+ */
377
+
378
+ /**
379
+ * Format as Watt-hours
380
+ */
381
+ declare const toWh: (value: number | null | undefined, decimals?: number) => string | null;
382
+ /**
383
+ * Format as kilowatt-hours
384
+ */
385
+ declare const tokWh: (value: number | null | undefined, decimals?: number) => string | null;
386
+ /**
387
+ * Format as megawatt-hours
388
+ */
389
+ declare const toMWh: (value: number | null | undefined, decimals?: number) => string | null;
390
+ /**
391
+ * Format as gigawatt-hours
392
+ */
393
+ declare const toGWh: (value: number | null | undefined, decimals?: number) => string | null;
394
+ /**
395
+ * Auto-scale energy to the most appropriate unit
396
+ */
397
+ declare const autoScaleEnergy: (value: number | null | undefined, decimals?: number) => string | null;
398
+ /**
399
+ * Format energy according to EnergyFormat specification
400
+ */
401
+ declare const formatEnergy: (value: FieldValue, format: EnergyFormat) => FormattedValue;
402
+
403
+ /**
404
+ * Number and currency formatting utilities
405
+ */
406
+
407
+ /**
408
+ * Check if a value is null or undefined
409
+ */
410
+ declare const isNil: (value: unknown) => value is null | undefined;
411
+ /**
412
+ * Format as percentage
413
+ */
414
+ declare const toPercentage: (value: number | null | undefined, decimals?: number) => string | null;
415
+ /**
416
+ * Format as integer
417
+ */
418
+ declare const toInteger: (value: number | null | undefined) => string | null;
419
+ /**
420
+ * Format as float with specified decimals
421
+ */
422
+ declare const toFloat: (value: number | null | undefined, decimals?: number) => string | null;
423
+ /**
424
+ * Format number with thousands separator
425
+ */
426
+ declare const toFormattedNumber: (value: number | null | undefined, decimals?: number, thousandsSeparator?: boolean) => string | null;
427
+ /**
428
+ * Format number with compact notation (1K, 1M, etc.)
429
+ */
430
+ declare const toCompactNumber: (value: number | null | undefined, display?: "short" | "long") => string | null;
431
+ /**
432
+ * Format number with scientific notation
433
+ */
434
+ declare const toScientificNotation: (value: number | null | undefined, decimals?: number) => string | null;
435
+ /**
436
+ * Format as currency
437
+ */
438
+ declare const toCurrency: (value: number | null | undefined, currency?: string, options?: Partial<CurrencyFormat>) => string | null;
439
+ /**
440
+ * Format number according to NumberFormat specification
441
+ */
442
+ declare const formatNumber: (value: FieldValue, format: NumberFormat) => FormattedValue;
443
+ /**
444
+ * Format currency according to CurrencyFormat specification
445
+ */
446
+ declare const formatCurrency: (value: FieldValue, format: CurrencyFormat) => FormattedValue;
447
+
448
+ /**
449
+ * Phone number formatting utilities
450
+ */
451
+
452
+ /**
453
+ * Format US phone number
454
+ */
455
+ declare const formatUSPhone: (phone: string | null | undefined) => string | null;
456
+ /**
457
+ * Format international phone number
458
+ */
459
+ declare const formatInternationalPhone: (phone: string | null | undefined) => string | null;
460
+ /**
461
+ * Format phone number with basic formatting
462
+ */
463
+ declare const formatPhoneNumber: (phone: string | null | undefined) => string | null;
464
+ /**
465
+ * Format phone according to PhoneFormat specification
466
+ */
467
+ declare const formatPhone: (value: FieldValue, format: PhoneFormat) => FormattedValue;
468
+
469
+ /**
470
+ * Power formatting utilities (rate of energy transfer)
471
+ */
472
+
473
+ /**
474
+ * Format as Watts
475
+ */
476
+ declare const toWatts: (value: number | null | undefined, decimals?: number) => string | null;
477
+ /**
478
+ * Format as kilowatts
479
+ */
480
+ declare const toKilowatts: (value: number | null | undefined, decimals?: number) => string | null;
481
+ /**
482
+ * Format as megawatts
483
+ */
484
+ declare const toMegawatts: (value: number | null | undefined, decimals?: number) => string | null;
485
+ /**
486
+ * Format as gigawatts
487
+ */
488
+ declare const toGigawatts: (value: number | null | undefined, decimals?: number) => string | null;
489
+ /**
490
+ * Auto-scale power to the most appropriate unit
491
+ */
492
+ declare const autoScalePower: (value: number | null | undefined, decimals?: number) => string | null;
493
+ /**
494
+ * Format power according to PowerFormat specification
495
+ */
496
+ declare const formatPower: (value: FieldValue, format: PowerFormat) => FormattedValue;
497
+ declare const toW: (value: number | null | undefined, decimals?: number) => string | null;
498
+ declare const toKW: (value: number | null | undefined, decimals?: number) => string | null;
499
+ declare const toMW: (value: number | null | undefined, decimals?: number) => string | null;
500
+ declare const toGW: (value: number | null | undefined, decimals?: number) => string | null;
501
+
502
+ /**
503
+ * FormatRegistry - A singleton pattern for managing formatters
504
+ * Allows registration and retrieval of formatting functions by key
505
+ */
506
+
507
+ declare class FormatRegistryClass {
508
+ private formatters;
509
+ /**
510
+ * Register a new formatter
511
+ * @param key - Unique identifier for the formatter
512
+ * @param formatter - The formatting function
513
+ */
514
+ register(key: string, formatter: FormatterFunction): void;
515
+ /**
516
+ * Format a value using a registered formatter
517
+ * @param key - The formatter key
518
+ * @param value - The value to format
519
+ * @param args - Additional arguments to pass to the formatter
520
+ * @returns The formatted value or null
521
+ */
522
+ format(key: string, value: FieldValue, ...args: unknown[]): FormattedValue;
523
+ /**
524
+ * Check if a formatter is registered
525
+ * @param key - The formatter key
526
+ * @returns True if the formatter exists
527
+ */
528
+ has(key: string): boolean;
529
+ /**
530
+ * Get all registered formatter keys
531
+ * @returns Array of formatter keys
532
+ */
533
+ keys(): string[];
534
+ /**
535
+ * Remove a formatter
536
+ * @param key - The formatter key to remove
537
+ */
538
+ unregister(key: string): void;
539
+ /**
540
+ * Clear all registered formatters
541
+ */
542
+ clear(): void;
543
+ }
544
+ declare const FormatRegistry: FormatRegistryClass;
545
+
546
+ /**
547
+ * Electrical resistance formatting utilities
548
+ */
549
+
550
+ /**
551
+ * Format as milliohms
552
+ */
553
+ declare const toMilliohms: (value: number | null | undefined, decimals?: number) => string | null;
554
+ /**
555
+ * Format as ohms
556
+ */
557
+ declare const toOhms: (value: number | null | undefined, decimals?: number) => string | null;
558
+ /**
559
+ * Format as kilohms
560
+ */
561
+ declare const toKilohms: (value: number | null | undefined, decimals?: number) => string | null;
562
+ /**
563
+ * Format as megohms
564
+ */
565
+ declare const toMegohms: (value: number | null | undefined, decimals?: number) => string | null;
566
+ /**
567
+ * Auto-scale resistance to the most appropriate unit
568
+ */
569
+ declare const autoScaleResistance: (value: number | null | undefined, decimals?: number) => string | null;
570
+ /**
571
+ * Format resistance according to ResistanceFormat specification
572
+ */
573
+ declare const formatResistance: (value: FieldValue, format: ResistanceFormat) => FormattedValue;
574
+
575
+ /**
576
+ * Temperature formatting utilities
577
+ */
578
+
579
+ /**
580
+ * Convert temperature unit string to symbol
581
+ */
582
+ declare const temperatureStringToSymbol: (unit: TemperatureUnitString) => TemperatureUnit;
583
+ /**
584
+ * Format as Fahrenheit
585
+ */
586
+ declare const toFahrenheit: (value: number | null | undefined, decimals?: number) => string | null;
587
+ /**
588
+ * Format as Celsius
589
+ */
590
+ declare const toCelsius: (value: number | null | undefined, fromFahrenheit?: boolean, decimals?: number) => string | null;
591
+ /**
592
+ * Format as Kelvin
593
+ */
594
+ declare const toKelvin: (value: number | null | undefined, fromFahrenheit?: boolean, decimals?: number) => string | null;
595
+ /**
596
+ * Convert Celsius to Fahrenheit
597
+ */
598
+ declare const celsiusToFahrenheit: (celsius: number) => number;
599
+ /**
600
+ * Convert Fahrenheit to Celsius
601
+ */
602
+ declare const fahrenheitToCelsius: (fahrenheit: number) => number;
603
+ /**
604
+ * Convert Celsius to Kelvin
605
+ */
606
+ declare const celsiusToKelvin: (celsius: number) => number;
607
+ /**
608
+ * Convert Kelvin to Celsius
609
+ */
610
+ declare const kelvinToCelsius: (kelvin: number) => number;
611
+ /**
612
+ * Convert Fahrenheit to Kelvin
613
+ */
614
+ declare const fahrenheitToKelvin: (fahrenheit: number) => number;
615
+ /**
616
+ * Convert Kelvin to Fahrenheit
617
+ */
618
+ declare const kelvinToFahrenheit: (kelvin: number) => number;
619
+ /**
620
+ * Format temperature with specified unit
621
+ */
622
+ declare const toTemperature: (value: number | null | undefined, unit?: TemperatureUnit | TemperatureUnitString, decimals?: number) => string | null;
623
+ /**
624
+ * Format temperature according to TemperatureFormat specification
625
+ */
626
+ declare const formatTemperature: (value: FieldValue, format: TemperatureFormat) => FormattedValue;
627
+
628
+ /**
629
+ * Text formatting utilities
630
+ */
631
+
632
+ /**
633
+ * Convert text to uppercase
634
+ */
635
+ declare const toUpperCase: (text: string | null | undefined) => string;
636
+ /**
637
+ * Convert text to lowercase
638
+ */
639
+ declare const toLowerCase: (text: string | null | undefined) => string;
640
+ /**
641
+ * Convert text to sentence case
642
+ */
643
+ declare const toSentenceCase: (text: string | null | undefined) => string;
644
+ /**
645
+ * Convert text to title case
646
+ */
647
+ declare const toTitleCase: (text: string | null | undefined) => string;
648
+ /**
649
+ * Capitalize first letter of each word
650
+ */
651
+ declare const capitalize: (text: string | null | undefined) => string;
652
+ /**
653
+ * Uppercase first letter only
654
+ */
655
+ declare const ucFirst: (text: string | null | undefined) => string;
656
+ /**
657
+ * Convert camelCase to words
658
+ */
659
+ declare const camelCaseToWords: (text: string | null | undefined) => string;
660
+ /**
661
+ * Convert snake_case to words
662
+ */
663
+ declare const snakeCaseToWords: (text: string | null | undefined) => string;
664
+ /**
665
+ * Convert enum-style text to sentence case
666
+ */
667
+ declare const enumToSentenceCase: (text: string | null | undefined) => string;
668
+ /**
669
+ * Truncate text in the middle
670
+ */
671
+ declare const truncateMiddle: (value: string | null | undefined, length?: number) => string;
672
+ /**
673
+ * Truncate text at the start
674
+ */
675
+ declare const truncateStart: (value: string | null | undefined, length?: number) => string;
676
+ /**
677
+ * Truncate text at the end
678
+ */
679
+ declare const truncateEnd: (value: string | null | undefined, length?: number, ellipsis?: string) => string;
680
+ /**
681
+ * Mask sensitive text (e.g., secrets, API keys)
682
+ */
683
+ declare const toSecret: (value: string | null | undefined) => string;
684
+ /**
685
+ * Format text according to TextFormat specification
686
+ */
687
+ declare const formatText: (value: FieldValue, format: TextFormat) => FormattedValue;
688
+
689
+ /**
690
+ * Voltage formatting utilities (electrical potential)
691
+ */
692
+
693
+ /**
694
+ * Format as millivolts
695
+ */
696
+ declare const toMillivolts: (value: number | null | undefined, decimals?: number) => string | null;
697
+ /**
698
+ * Format as volts
699
+ */
700
+ declare const toVolts: (value: number | null | undefined, decimals?: number) => string | null;
701
+ /**
702
+ * Format as kilovolts
703
+ */
704
+ declare const toKilovolts: (value: number | null | undefined, decimals?: number) => string | null;
705
+ /**
706
+ * Auto-scale voltage to the most appropriate unit
707
+ */
708
+ declare const autoScaleVoltage: (value: number | null | undefined, decimals?: number) => string | null;
709
+ /**
710
+ * Format voltage according to VoltageFormat specification
711
+ */
712
+ declare const formatVoltage: (value: FieldValue, format: VoltageFormat) => FormattedValue;
713
+ declare const toMV: (value: number | null | undefined, decimals?: number) => string | null;
714
+ declare const toV: (value: number | null | undefined, decimals?: number) => string | null;
715
+ declare const toKV: (value: number | null | undefined, decimals?: number) => string | null;
716
+
717
+ /**
718
+ * Comprehensive formatting utilities for the Edges design system
719
+ *
720
+ * This module provides a unified formatting system with support for:
721
+ * - Text formatting (case conversion, truncation, etc.)
722
+ * - Number formatting (decimals, thousands separators, compact notation)
723
+ * - Currency formatting (multiple currencies and display options)
724
+ * - Date formatting (relative time, custom formats, timezones)
725
+ * - Boolean formatting (custom true/false text)
726
+ * - Energy units (Wh, kWh, MWh, GWh with auto-scaling)
727
+ * - Temperature units (Celsius, Fahrenheit, Kelvin)
728
+ * - Distance units (meters, kilometers, miles, feet)
729
+ * - Phone number formatting (US and international)
730
+ * - Custom formatters via the FormatRegistry
731
+ */
732
+
733
+ /**
734
+ * Main formatting function that routes to the appropriate formatter
735
+ * based on the format type
736
+ *
737
+ * @param value - The value to format
738
+ * @param format - The format specification
739
+ * @returns The formatted value or null
740
+ *
741
+ * @example
742
+ * ```typescript
743
+ * // Format as currency
744
+ * formatFieldValue(1234.56, { type: "currency", currency: "USD" })
745
+ * // Returns: "$1,234.56"
746
+ *
747
+ * // Format as relative time
748
+ * formatFieldValue(new Date(), { type: "date", relative: true })
749
+ * // Returns: "just now"
750
+ *
751
+ * // Format with custom formatter
752
+ * formatFieldValue("hello", {
753
+ * type: "custom",
754
+ * formatter: (val) => String(val).toUpperCase()
755
+ * })
756
+ * // Returns: "HELLO"
757
+ * ```
758
+ */
759
+ declare const formatFieldValue: (value: FieldValue, format: FieldFormat) => FormattedValue;
760
+ /**
761
+ * Convenience function to create a format object
762
+ *
763
+ * @example
764
+ * ```typescript
765
+ * const currencyFormat = createFormat("currency", { currency: "EUR" });
766
+ * const dateFormat = createFormat("date", { relative: true });
767
+ * ```
768
+ */
769
+ declare const createFormat: <T extends FieldFormat["type"]>(type: T, options?: Omit<Extract<FieldFormat, {
770
+ type: T;
771
+ }>, "type">) => Extract<FieldFormat, {
772
+ type: T;
773
+ }>;
774
+
22
775
  /**
23
776
  * Control-specific style utilities for form elements and interactive components.
24
777
  * These styles use CSS variables defined in the theme for consistent sizing
@@ -36,7 +789,7 @@ interface Item {
36
789
  id: string;
37
790
  name: string;
38
791
  }
39
- interface Section {
792
+ interface Section$1 {
40
793
  name: string;
41
794
  items: Item[];
42
795
  }
@@ -69,7 +822,7 @@ type AutocompleteRequestConfig = RestRequestConfig | GraphQLRequestConfig;
69
822
  interface AutocompleteProps {
70
823
  label?: string;
71
824
  staticItems?: Item[];
72
- sections?: Section[];
825
+ sections?: Section$1[];
73
826
  selectedKey?: Key | null;
74
827
  defaultSelectedKey?: Key | null;
75
828
  onSelectionChange?: (key: Key | null) => void;
@@ -78,7 +831,7 @@ interface AutocompleteProps {
78
831
  placeholder?: string;
79
832
  renderItem?: (item: Item) => React__default.ReactNode;
80
833
  renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
81
- renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
834
+ renderSection?: (section: Section$1, children: React__default.ReactNode) => React__default.ReactNode;
82
835
  errorMessage?: string | ((validation: ValidationResult) => string);
83
836
  description?: string;
84
837
  size?: Size;
@@ -617,7 +1370,7 @@ declare class ErrorBoundary extends Component<Props, State> {
617
1370
  static getDerivedStateFromError(error: Error): State;
618
1371
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
619
1372
  private handleRetry;
620
- render(): string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<ReactNode> | null | undefined;
1373
+ render(): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
621
1374
  }
622
1375
 
623
1376
  interface InputStyleProps {
@@ -826,6 +1579,205 @@ declare function FieldGroup(props: FieldGroupProps): react_jsx_runtime.JSX.Eleme
826
1579
  */
827
1580
  declare function Form(props: FormProps): react_jsx_runtime.JSX.Element;
828
1581
 
1582
+ /**
1583
+ * Grid Component — Flexible layout system for dashboards
1584
+ *
1585
+ * A higher-level abstraction over CSS Grid that provides responsive columns,
1586
+ * consistent spacing, and span helpers for building complex dashboard layouts.
1587
+ *
1588
+ * Usage:
1589
+ * ```tsx
1590
+ * <Grid cols={{ base: 1, md: 2, lg: 4 }} gap="md">
1591
+ * <Grid.Item span={{ base: 1, lg: 2 }}>
1592
+ * <Card>Wide content</Card>
1593
+ * </Grid.Item>
1594
+ * <Grid.Item>
1595
+ * <Card>Regular content</Card>
1596
+ * </Grid.Item>
1597
+ * </Grid>
1598
+ * ```
1599
+ */
1600
+ type ResponsiveValue<T> = T | {
1601
+ base?: T;
1602
+ sm?: T;
1603
+ md?: T;
1604
+ lg?: T;
1605
+ xl?: T;
1606
+ "2xl"?: T;
1607
+ };
1608
+ type GridCols = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "none";
1609
+ type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
1610
+ type GridGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
1611
+ type GridAlign = "start" | "center" | "end" | "stretch" | "baseline";
1612
+ type GridJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
1613
+ type GridFlow = "row" | "col" | "dense" | "row-dense" | "col-dense";
1614
+ interface GridProps {
1615
+ /** Number of columns at different breakpoints */
1616
+ cols?: ResponsiveValue<GridCols>;
1617
+ /** Gap between grid items using design tokens */
1618
+ gap?: GridGap;
1619
+ /** Gap between rows specifically */
1620
+ gapY?: GridGap;
1621
+ /** Gap between columns specifically */
1622
+ gapX?: GridGap;
1623
+ /** Vertical alignment of items */
1624
+ align?: GridAlign;
1625
+ /** Horizontal justification of the grid */
1626
+ justify?: GridJustify;
1627
+ /** Grid flow direction */
1628
+ flow?: GridFlow;
1629
+ /** Auto-fit mode with minimum item width */
1630
+ autoFit?: string;
1631
+ /** Auto-fill mode with minimum item width */
1632
+ autoFill?: string;
1633
+ /** Additional CSS classes */
1634
+ className?: string;
1635
+ /** Child elements */
1636
+ children?: React__default.ReactNode;
1637
+ }
1638
+ interface GridItemProps {
1639
+ /** Column span at different breakpoints */
1640
+ span?: ResponsiveValue<GridSpan>;
1641
+ /** Column start position */
1642
+ colStart?: ResponsiveValue<number | "auto">;
1643
+ /** Column end position */
1644
+ colEnd?: ResponsiveValue<number | "auto">;
1645
+ /** Row span at different breakpoints */
1646
+ rowSpan?: ResponsiveValue<GridSpan>;
1647
+ /** Row start position */
1648
+ rowStart?: ResponsiveValue<number | "auto">;
1649
+ /** Row end position */
1650
+ rowEnd?: ResponsiveValue<number | "auto">;
1651
+ /** Additional CSS classes */
1652
+ className?: string;
1653
+ /** Child elements */
1654
+ children?: React__default.ReactNode;
1655
+ }
1656
+ declare function Grid({ cols, gap, gapX, gapY, align, justify, flow, autoFit, autoFill, className, children, }: GridProps): react_jsx_runtime.JSX.Element;
1657
+ declare namespace Grid {
1658
+ var Item: typeof GridItem;
1659
+ }
1660
+ declare function GridItem({ span, className, children, }: GridItemProps): react_jsx_runtime.JSX.Element;
1661
+
1662
+ type KpiFormatter = ComponentFormatter;
1663
+ /**
1664
+ * Kpi Component — Single metric display
1665
+ *
1666
+ * Displays a key performance indicator with value, delta, trend, and status.
1667
+ * Designed to work standalone or within a KpiGroup for dashboard layouts.
1668
+ *
1669
+ * Usage:
1670
+ * ```tsx
1671
+ * <Kpi
1672
+ * label="Active Sites"
1673
+ * value={2481}
1674
+ * delta={3.2}
1675
+ * deltaPeriodLabel="vs last 7d"
1676
+ * trend={dataPoints}
1677
+ * />
1678
+ * ```
1679
+ */
1680
+ type KpiStatus = "neutral" | "success" | "warning" | "error" | "info";
1681
+ type KpiSize = "sm" | "md" | "lg";
1682
+ type KpiOrientation = "vertical" | "horizontal";
1683
+ interface TrendPoint {
1684
+ x: number | string | Date;
1685
+ y: number;
1686
+ }
1687
+ interface KpiProps {
1688
+ /** Short label describing the metric */
1689
+ label: React__default.ReactNode;
1690
+ /** Primary value - number for auto-formatting or string for custom display */
1691
+ value: number | string;
1692
+ /** Formatter using the unified formatting system */
1693
+ formatter?: KpiFormatter;
1694
+ /** Change since prior period */
1695
+ delta?: number;
1696
+ /** Description of delta period (e.g., "vs last 7d") */
1697
+ deltaPeriodLabel?: string;
1698
+ /** How to interpret delta direction */
1699
+ deltaIntent?: "upIsGood" | "downIsGood";
1700
+ /** Mini trend data points */
1701
+ trend?: TrendPoint[];
1702
+ /** Status indicator */
1703
+ status?: {
1704
+ value: string;
1705
+ tone?: KpiStatus;
1706
+ };
1707
+ /** Help text or tooltip content */
1708
+ helpText?: React__default.ReactNode;
1709
+ /** Size variant */
1710
+ size?: KpiSize;
1711
+ /** Layout orientation */
1712
+ orientation?: KpiOrientation;
1713
+ /** Loading state */
1714
+ loading?: boolean;
1715
+ /** Empty state */
1716
+ empty?: boolean;
1717
+ /** Error state */
1718
+ error?: string | React__default.ReactNode;
1719
+ /** Click handler for drill-down */
1720
+ onClick?: () => void;
1721
+ /** Additional CSS classes */
1722
+ className?: string;
1723
+ /** Custom value renderer */
1724
+ renderValue?: (value: KpiProps["value"]) => React__default.ReactNode;
1725
+ /** Custom delta renderer */
1726
+ renderDelta?: (delta?: number) => React__default.ReactNode;
1727
+ /** Custom trend renderer */
1728
+ renderTrend?: (points?: TrendPoint[]) => React__default.ReactNode;
1729
+ }
1730
+ declare function Kpi({ label, value, formatter, delta, deltaPeriodLabel, deltaIntent, trend, status, helpText, size, orientation, loading, empty, error, onClick, className, renderValue, renderDelta, renderTrend, }: KpiProps): react_jsx_runtime.JSX.Element;
1731
+
1732
+ /**
1733
+ * KpiGroup Component — Layout container for multiple KPIs
1734
+ *
1735
+ * Provides consistent grid layout for KPI cards with responsive columns
1736
+ * and spacing. Perfect for dashboard metric rows and summary sections.
1737
+ *
1738
+ * Usage:
1739
+ * ```tsx
1740
+ * <KpiGroup cols={{ base: 1, md: 2, lg: 4 }}>
1741
+ * <Kpi label="Revenue" value={45231} />
1742
+ * <Kpi label="Users" value={1234} />
1743
+ * <Kpi label="Conversion" value={0.089} unit="%" />
1744
+ * <Kpi label="Avg Order" value={89.50} unit="$" />
1745
+ * </KpiGroup>
1746
+ * ```
1747
+ */
1748
+ type KpiGroupGap = "xs" | "sm" | "md" | "lg" | "xl";
1749
+ type KpiGroupAlign = "start" | "center" | "stretch";
1750
+ interface KpiGroupCols {
1751
+ base?: number;
1752
+ sm?: number;
1753
+ md?: number;
1754
+ lg?: number;
1755
+ xl?: number;
1756
+ "2xl"?: number;
1757
+ }
1758
+ interface KpiGroupProps {
1759
+ /** KPI components to display */
1760
+ children: React__default.ReactNode;
1761
+ /** Responsive column configuration */
1762
+ cols?: KpiGroupCols | number;
1763
+ /** Gap between items using spacing tokens */
1764
+ gap?: KpiGroupGap;
1765
+ /** Vertical alignment of items */
1766
+ align?: KpiGroupAlign;
1767
+ /** Force equal heights for all items */
1768
+ equalizeHeights?: boolean;
1769
+ /** Optional header content */
1770
+ header?: React__default.ReactNode;
1771
+ /** Loading state for all children */
1772
+ loading?: boolean;
1773
+ /** Additional CSS classes */
1774
+ className?: string;
1775
+ }
1776
+ declare function KpiGroup({ children, cols, gap, align, equalizeHeights, header, loading, className, }: KpiGroupProps): react_jsx_runtime.JSX.Element;
1777
+ declare namespace KpiGroup {
1778
+ var displayName: string;
1779
+ }
1780
+
829
1781
  /**
830
1782
  * ListBox
831
1783
  *
@@ -984,6 +1936,104 @@ interface NumberFieldProps extends Omit<NumberFieldProps$1, "size" | "className"
984
1936
  }
985
1937
  declare function NumberField({ label, description, errorMessage, size, tooltip, isRequired, transparent, validationResult, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element;
986
1938
 
1939
+ /**
1940
+ * PageLayout — opinionated, SSR-friendly page scaffold for dashboards.
1941
+ *
1942
+ * Structure:
1943
+ * <PageLayout>
1944
+ * <PageLayout.Header title="..." subtitle="..." breadcrumbs={[...]} />
1945
+ * <PageLayout.Actions primary={<Button/>} secondary={<Button/>} />
1946
+ * <PageLayout.Filters>...chips/search/time...</PageLayout.Filters>
1947
+ * <PageLayout.Tabs tabs={[...]} value=... onChange=... />
1948
+ * <PageLayout.Content>
1949
+ * <Grid cols={{ base: 1, lg: 4 }} gap="lg">
1950
+ * ...cards/tables/content...
1951
+ * </Grid>
1952
+ * </PageLayout.Content>
1953
+ * <PageLayout.Aside>...sticky insights/help...</PageLayout.Aside>
1954
+ * </PageLayout>
1955
+ *
1956
+ * Notes:
1957
+ * - Router-agnostic: Breadcrumbs accept either structured items with a Link component, or a custom ReactNode.
1958
+ * - Accessible: Header uses h1; Tabs are roving-`tablist`; Filters region has landmark role.
1959
+ * - Composable: Use with Grid component for layouts, Card for content containers.
1960
+ * - Styling: token-oriented utility classes (match to your Tailwind preset/tokens).
1961
+ */
1962
+ type BreadcrumbItem = {
1963
+ label: string;
1964
+ href?: string;
1965
+ };
1966
+ type PageLayoutProps = {
1967
+ children: React$1.ReactNode;
1968
+ /** Constrain width and apply default page rhythm */
1969
+ maxWidth?: number;
1970
+ paddingXClass?: string;
1971
+ paddingYClass?: string;
1972
+ className?: string;
1973
+ };
1974
+ declare function PageLayout({ children, maxWidth, paddingXClass, paddingYClass, className, }: PageLayoutProps): react_jsx_runtime.JSX.Element;
1975
+ declare namespace PageLayout {
1976
+ var Header: typeof Header;
1977
+ var Actions: typeof Actions;
1978
+ var Filters: typeof Filters;
1979
+ var Tabs: typeof Tabs$1;
1980
+ var Content: typeof Content;
1981
+ var Aside: typeof Aside$1;
1982
+ }
1983
+ type PageHeaderProps = {
1984
+ title: React$1.ReactNode;
1985
+ subtitle?: React$1.ReactNode;
1986
+ breadcrumbs?: BreadcrumbItem[];
1987
+ /** Custom breadcrumbs node if you don't want the built-in renderer */
1988
+ breadcrumbsNode?: React$1.ReactNode;
1989
+ /** Optional right-aligned meta area (badges, status, small stats) */
1990
+ meta?: React$1.ReactNode;
1991
+ /** Optional slot to replace the default heading element */
1992
+ headingAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
1993
+ className?: string;
1994
+ };
1995
+ declare function Header({ title, subtitle, breadcrumbs, breadcrumbsNode, meta, headingAs, className, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
1996
+ type PageActionsProps = {
1997
+ primary?: React$1.ReactNode;
1998
+ secondary?: React$1.ReactNode;
1999
+ children?: React$1.ReactNode;
2000
+ align?: "start" | "end";
2001
+ className?: string;
2002
+ };
2003
+ declare function Actions({ primary, secondary, children, align, className, }: PageActionsProps): react_jsx_runtime.JSX.Element;
2004
+ type PageFiltersProps = {
2005
+ children: React$1.ReactNode;
2006
+ className?: string;
2007
+ ariaLabel?: string;
2008
+ };
2009
+ declare function Filters({ children, className, ariaLabel }: PageFiltersProps): react_jsx_runtime.JSX.Element;
2010
+ type PageLayoutTab = {
2011
+ id: string;
2012
+ label: React$1.ReactNode;
2013
+ disabled?: boolean;
2014
+ };
2015
+ type TabsProps$1 = {
2016
+ tabs: PageLayoutTab[];
2017
+ value?: string;
2018
+ defaultValue?: string;
2019
+ onChange?: (id: string) => void;
2020
+ className?: string;
2021
+ children?: React$1.ReactNode;
2022
+ };
2023
+ declare function Tabs$1({ tabs, value, defaultValue, onChange, className, children }: TabsProps$1): react_jsx_runtime.JSX.Element;
2024
+ type PageContentProps = {
2025
+ children: React$1.ReactNode;
2026
+ className?: string;
2027
+ };
2028
+ declare function Content({ children, className }: PageContentProps): react_jsx_runtime.JSX.Element;
2029
+ type PageAsideProps = {
2030
+ children: React$1.ReactNode;
2031
+ /** Sticky aside on wide screens */
2032
+ sticky?: boolean;
2033
+ className?: string;
2034
+ };
2035
+ declare function Aside$1({ children, sticky, className }: PageAsideProps): react_jsx_runtime.JSX.Element;
2036
+
987
2037
  interface Place {
988
2038
  id: string;
989
2039
  place_name: string;
@@ -1070,6 +2120,50 @@ interface RangeCalendarProps<T extends DateValue> extends Omit<RangeCalendarProp
1070
2120
  }
1071
2121
  declare function RangeCalendar<T extends DateValue>({ errorMessage, ...props }: RangeCalendarProps<T>): react_jsx_runtime.JSX.Element;
1072
2122
 
2123
+ /**
2124
+ * Section Component — Semantic content grouping for dashboards
2125
+ *
2126
+ * A lightweight container that provides structure and hierarchy to page content.
2127
+ * Less heavy than a Card, more structured than a div. Perfect for organizing
2128
+ * related content with consistent spacing and optional headers.
2129
+ *
2130
+ * Usage:
2131
+ * ```tsx
2132
+ * <Section
2133
+ * title="Overview"
2134
+ * description="Key metrics and performance indicators"
2135
+ * actions={<Button variant="ghost" size="sm">Refresh</Button>}
2136
+ * >
2137
+ * <Grid cols={{ base: 1, lg: 3 }}>
2138
+ * <Card>...</Card>
2139
+ * </Grid>
2140
+ * </Section>
2141
+ * ```
2142
+ */
2143
+ type SectionVariant = "plain" | "contained" | "bordered";
2144
+ type SectionSpacing = "none" | "sm" | "md" | "lg";
2145
+ interface SectionProps {
2146
+ /** Section title */
2147
+ title?: React__default.ReactNode;
2148
+ /** Optional description/subtitle */
2149
+ description?: React__default.ReactNode;
2150
+ /** Actions slot (buttons, links, etc.) */
2151
+ actions?: React__default.ReactNode;
2152
+ /** Visual variant */
2153
+ variant?: SectionVariant;
2154
+ /** Vertical spacing around section */
2155
+ spacing?: SectionSpacing;
2156
+ /** Show divider under header */
2157
+ withDivider?: boolean;
2158
+ /** Heading level for accessibility */
2159
+ headingAs?: "h2" | "h3" | "h4";
2160
+ /** Additional CSS classes */
2161
+ className?: string;
2162
+ /** Section content */
2163
+ children?: React__default.ReactNode;
2164
+ }
2165
+ declare function Section({ title, description, actions, variant, spacing, withDivider, headingAs, className, children, }: SectionProps): react_jsx_runtime.JSX.Element;
2166
+
1073
2167
  /**
1074
2168
  * Interface defining the shape of items in the Select component
1075
2169
  */
@@ -1155,25 +2249,150 @@ interface SliderProps {
1155
2249
  }
1156
2250
  declare function Slider({ label, description, tooltip, errorMessage, size, className, value, defaultValue, onChange, min, max, step, disabled, showValue, }: SliderProps): react_jsx_runtime.JSX.Element;
1157
2251
 
2252
+ /**
2253
+ * SplitPane Component — Resizable two-panel layout
2254
+ *
2255
+ * A layout primitive for side-by-side content with a draggable divider.
2256
+ * Perfect for list/detail views, dashboards with inspectors, or any
2257
+ * main/aside layout that benefits from user-controlled sizing.
2258
+ *
2259
+ * Usage:
2260
+ * ```tsx
2261
+ * <SplitPane defaultSize={0.7} minSize={280} maxSize={480}>
2262
+ * <SplitPane.Main>
2263
+ * <DataTable />
2264
+ * </SplitPane.Main>
2265
+ * <SplitPane.Aside>
2266
+ * <Inspector />
2267
+ * </SplitPane.Aside>
2268
+ * </SplitPane>
2269
+ * ```
2270
+ */
2271
+ type SplitPaneOrientation = "horizontal" | "vertical";
2272
+ interface SplitPaneProps {
2273
+ /** Initial size of the main panel (0-1 for ratio, or px value) */
2274
+ defaultSize?: number;
2275
+ /** Minimum size of aside panel in pixels */
2276
+ minSize?: number;
2277
+ /** Maximum size of aside panel in pixels */
2278
+ maxSize?: number;
2279
+ /** Orientation of the split */
2280
+ orientation?: SplitPaneOrientation;
2281
+ /** Whether the divider is draggable */
2282
+ resizable?: boolean;
2283
+ /** Callback when resize occurs */
2284
+ onResize?: (size: number) => void;
2285
+ /** Additional CSS classes */
2286
+ className?: string;
2287
+ /** Child panels */
2288
+ children?: React__default.ReactNode;
2289
+ }
2290
+ interface SplitPanePanelProps {
2291
+ className?: string;
2292
+ children?: React__default.ReactNode;
2293
+ }
2294
+ declare function SplitPane({ defaultSize, minSize, maxSize, orientation, resizable, onResize, className, children, }: SplitPaneProps): react_jsx_runtime.JSX.Element;
2295
+ declare namespace SplitPane {
2296
+ var Main: typeof Main;
2297
+ var Aside: typeof Aside;
2298
+ }
2299
+ declare function Main({ className, children }: SplitPanePanelProps): react_jsx_runtime.JSX.Element;
2300
+ declare function Aside({ className, children }: SplitPanePanelProps): react_jsx_runtime.JSX.Element;
2301
+
2302
+ /**
2303
+ * StatList — Compact key-value statistics display
2304
+ *
2305
+ * Displays formatted statistics with status indicators and optional copy functionality.
2306
+ * Uses the unified formatting system for consistent data presentation.
2307
+ */
2308
+ type StatTone = "neutral" | "success" | "warning" | "error" | "info";
2309
+ type StatAlign = "start" | "end";
2310
+ type StatLayout = "one-column" | "two-column";
2311
+ type StatValue = FieldValue;
2312
+ type StatFormatter = ComponentFormatter;
2313
+ interface StatThreshold {
2314
+ when: (value: StatValue) => boolean;
2315
+ tone: StatTone;
2316
+ }
2317
+ interface StatItem {
2318
+ /** Unique identifier */
2319
+ id: string;
2320
+ /** Label for the statistic */
2321
+ label: React__default.ReactNode;
2322
+ /** Value to display */
2323
+ value: StatValue;
2324
+ /** Custom formatter for the value */
2325
+ formatter?: StatFormatter;
2326
+ /** Additional metadata below value */
2327
+ meta?: React__default.ReactNode;
2328
+ /** Explicit tone/status color */
2329
+ tone?: StatTone;
2330
+ /** Data-driven tone based on value */
2331
+ thresholds?: StatThreshold[];
2332
+ /** Enable copy to clipboard */
2333
+ copyable?: boolean | ((value: StatValue) => string);
2334
+ /** Optional link URL */
2335
+ href?: string;
2336
+ /** Click handler */
2337
+ onAction?: () => void;
2338
+ /** Icon before label */
2339
+ iconLeft?: React__default.ReactNode;
2340
+ /** Icon after value */
2341
+ iconRight?: React__default.ReactNode;
2342
+ /** Tooltip for additional info */
2343
+ tooltip?: React__default.ReactNode;
2344
+ /** Disabled state */
2345
+ disabled?: boolean;
2346
+ }
2347
+ interface StatListProps {
2348
+ /** Statistics to display */
2349
+ items: StatItem[];
2350
+ /** Layout mode */
2351
+ layout?: StatLayout;
2352
+ /** Compact spacing */
2353
+ dense?: boolean;
2354
+ /** Value alignment */
2355
+ valueAlign?: StatAlign;
2356
+ /** Show dividers between items */
2357
+ showDividers?: boolean;
2358
+ /** Loading state */
2359
+ skeleton?: boolean;
2360
+ /** Empty state */
2361
+ empty?: boolean;
2362
+ /** Error state */
2363
+ error?: string | React__default.ReactNode;
2364
+ /** Additional CSS classes */
2365
+ className?: string;
2366
+ }
2367
+ declare function StatList({ items, layout, dense, valueAlign, showDividers, skeleton, empty, error, className, }: StatListProps): react_jsx_runtime.JSX.Element;
2368
+
1158
2369
  interface SwitchProps extends Omit<SwitchProps$1, "children"> {
1159
2370
  children: React__default.ReactNode;
1160
2371
  }
1161
2372
  declare function Switch({ children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
1162
2373
 
2374
+ type TabVariant = "default" | "accent";
1163
2375
  type TabProps = TabProps$1 & {
1164
2376
  isSelected?: boolean;
1165
2377
  id?: string;
1166
2378
  };
2379
+ type TabsProps = TabsProps$2 & {
2380
+ variant?: TabVariant;
2381
+ };
2382
+ type TabListProps<T extends object> = TabListProps$1<T> & {
2383
+ variant?: TabVariant;
2384
+ };
1167
2385
  /**
1168
2386
  * Tabs
1169
2387
  *
1170
2388
  * Tabbed interface with styled tabs and panels.
2389
+ * @param variant - "default" for gray styling, "accent" for brand color styling
1171
2390
  */
1172
- declare function Tabs(props: TabsProps): react_jsx_runtime.JSX.Element;
2391
+ declare function Tabs({ variant, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
1173
2392
  /**
1174
2393
  * TabList container.
1175
2394
  */
1176
- declare function TabList<T extends object>(props: TabListProps<T>): react_jsx_runtime.JSX.Element;
2395
+ declare function TabList<T extends object>({ variant, ...props }: TabListProps<T>): react_jsx_runtime.JSX.Element;
1177
2396
  /**
1178
2397
  * Tab trigger element.
1179
2398
  */
@@ -1326,4 +2545,4 @@ interface ColorModeProviderProps {
1326
2545
  }
1327
2546
  declare const ColorModeProvider: React.FC<ColorModeProviderProps>;
1328
2547
 
1329
- export { type Action, ActionCell, type ActionCellProps, AreaSeries, AutoMobileRenderer, Autocomplete, BarSeries, BaseDataPoint, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, Breadcrumb, Breadcrumbs, Button, Calendar, CardMobileRenderer, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, ColorModeProvider, type Column, CopyToClipboard, DataTable, type DataTableProps, DateCell, type DateCellProps, DateRangePicker, Description, type DescriptionProps, Dialog, DialogHeader, Drawer, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, Form, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, Label, type LabelProps, LineSeries, type LinkBehavior, ListBox, ListBoxItem, type MobileBreakpoint, type MobileConfig, type MobileRenderer, Notice, NoticeContainer, type NoticeContainerProps, type NoticeOptions, type NoticeProps, NoticeProvider, type NoticeProviderProps, type NoticeVariant, NumberCell, type NumberCellProps, NumberField, PlaceSearch, Popover, ProgressBar, Radio, RadioGroup, RangeCalendar, SKELETON_SIZES, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, type SortDirection, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, TimeField, ToggleButton, Tooltip, TooltipData, YFormatType, exportChart, formatEmptyValue, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getExportFormatName, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getSkeletonSize, isExportSupported, resolveValue, useColorMode, useDebounce, useInputFocus, useLocalStorage, useNotice };
2548
+ export { type Action, ActionCell, type ActionCellProps, AreaSeries, AutoMobileRenderer, Autocomplete, BarSeries, BaseDataPoint, type BaseFormat, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, type BooleanFormat, Breadcrumb, type BreadcrumbItem, Breadcrumbs, Button, Calendar, CardMobileRenderer, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, ColorModeProvider, type Column, type ComponentFormatOptions, type ComponentFormatter, CopyToClipboard, type CurrencyFormat, type CurrentFormat, type CurrentUnit, type CustomFormat, DataTable, type DataTableProps, DateCell, type DateCellProps, type DateFormat, type DateFormatStyle, DateRangePicker, Description, type DescriptionProps, Dialog, DialogHeader, type DistanceFormat, type DistanceUnit, Drawer, type EnergyFormat, type EnergyUnit, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, type FieldFormat, FieldGroup, type FieldGroupProps, type FieldValue, Form, FormatRegistry, type FormattedValue, type FormatterFunction, Grid, type GridAlign, type GridCols, type GridFlow, type GridGap, type GridItemProps, type GridJustify, type GridProps, type GridSpan, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, Kpi, KpiGroup, type KpiGroupAlign, type KpiGroupCols, type KpiGroupGap, type KpiGroupProps, type KpiOrientation, type KpiProps, type KpiSize, type KpiStatus, Label, type LabelProps, LineSeries, type LinkBehavior, ListBox, ListBoxItem, type MobileBreakpoint, type MobileConfig, type MobileRenderer, Notice, NoticeContainer, type NoticeContainerProps, type NoticeOptions, type NoticeProps, NoticeProvider, type NoticeProviderProps, type NoticeVariant, NumberCell, type NumberCellProps, NumberField, type NumberFormat, type PageActionsProps, type PageAsideProps, type PageContentProps, type PageFiltersProps, type PageHeaderProps, PageLayout, type PageLayoutProps, type PhoneFormat, PlaceSearch, Popover, type PowerFormat, type PowerUnit, ProgressBar, Radio, RadioGroup, RangeCalendar, type ResistanceFormat, type ResistanceUnit, type ResponsiveValue, SKELETON_SIZES, Section, type SectionProps, type SectionSpacing, type SectionVariant, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, type SortDirection, SplitPane, type SplitPaneOrientation, type SplitPanePanelProps, type SplitPaneProps, type StatAlign, type StatFormatter, type StatItem, type StatLayout, StatList, type StatListProps, type StatThreshold, type StatTone, type StatValue, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, type TabsProps$1 as TabsProps, type TemperatureFormat, type TemperatureUnit, type TemperatureUnitString, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, type TextFormat, type TextTransform, type TextTruncatePosition, TimeField, ToggleButton, Tooltip, TooltipData, type TrendPoint, type VoltageFormat, type VoltageUnit, YFormatType, autoScaleCurrent, autoScaleDistance, autoScaleEnergy, autoScalePower, autoScaleResistance, autoScaleVoltage, camelCaseToWords, capitalize, celsiusToFahrenheit, celsiusToKelvin, centimetersToInches, createFormat, enumToSentenceCase, exportChart, fahrenheitToCelsius, fahrenheitToKelvin, feetToMeters, feetToMiles, formatBoolean, formatComponentValue, formatCurrency, formatCurrent, formatDate, formatDistance, formatEmptyValue, formatEnergy, formatFieldValue, formatInternationalPhone, formatNumber, formatPhone, formatPhoneNumber, formatPower, formatResistance, formatTemperature, formatText, formatUSPhone, formatVoltage, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getDateParts, getExportFormatName, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getSkeletonSize, inchesToCentimeters, isExportSupported, isNil, kelvinToCelsius, kelvinToFahrenheit, kilometersToMiles, metersToFeet, metersToMiles, metersToYards, milesToFeet, milesToKilometers, milesToMeters, parseBoolean, resolveValue, snakeCaseToWords, temperatureStringToSymbol, toA, toActiveInactive, toAmps, toBoolean, toCelsius, toCentimeters, toCheckmark, toCompactNumber, toCurrency, toCustomDateFormat, toDateString, toEnabledDisabled, toFahrenheit, toFeet, toFloat, toFormattedNumber, toFullDateTime, toGW, toGWh, toGigawatts, toISOString, toInches, toInteger, toKA, toKV, toKW, toKelvin, toKiloamps, toKilohms, toKilometers, toKilovolts, toKilowatts, toLowerCase, toMA, toMV, toMW, toMWh, toMegawatts, toMegohms, toMeters, toMiles, toMilliamps, toMillimeters, toMilliohms, toMillivolts, toNauticalMiles, toOhms, toOnOff, toPercentage, toRelativeTime, toScientificNotation, toSecret, toSentenceCase, toTemperature, toTitleCase, toTrueFalse, toUpperCase, toV, toVolts, toW, toWatts, toWh, toYards, tokWh, truncateEnd, truncateMiddle, truncateStart, ucFirst, useColorMode, useComponentFormatter, useDebounce, useInputFocus, useLocalStorage, useNotice, yardsToMeters };