@texturehq/edges 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.manifest.json +45 -43
- package/dist/generated/tailwind-tokens-dark.css +90 -0
- package/dist/generated/tailwind-tokens-light.css +90 -0
- package/dist/index.cjs +12 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +416 -101
- package/dist/index.d.ts +416 -101
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/neutral-dark-ULOPSLHN.png +0 -0
- package/dist/neutral-light-IAPUNYDO.png +0 -0
- package/dist/satelite-light-CU3QG3IP.png +0 -0
- package/dist/{server-DkP8PI1p.d.cts → server-C1hypeJ9.d.cts} +239 -75
- package/dist/{server-DkP8PI1p.d.ts → server-C1hypeJ9.d.ts} +239 -75
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/streets-dark-47NJZQUE.png +0 -0
- package/dist/streets-light-YXBEDGBR.png +0 -0
- package/dist/styles.css +282 -8
- package/dist/utilities.manifest.json +1984 -0
- package/package.json +2 -2
- package/scripts/generate-components-manifest.js +35 -9
- package/scripts/generate-utilities-manifest.js +369 -0
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-
|
|
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-
|
|
1
|
+
import { I as Icon, B as BaseDataPoint, Y as YFormatType, T as TooltipData, a as IconName$2 } from './server-C1hypeJ9.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-C1hypeJ9.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 as TabsProps$
|
|
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';
|
|
@@ -86,6 +86,34 @@ interface EnergyFormat extends BaseFormat {
|
|
|
86
86
|
autoScale?: boolean;
|
|
87
87
|
decimals?: number;
|
|
88
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
|
+
}
|
|
89
117
|
type TemperatureUnit = "C" | "F" | "K";
|
|
90
118
|
type TemperatureUnitString = "CELSIUS" | "FAHRENHEIT" | "KELVIN";
|
|
91
119
|
interface TemperatureFormat extends BaseFormat {
|
|
@@ -111,7 +139,7 @@ interface CustomFormat extends BaseFormat {
|
|
|
111
139
|
formatter: FormatterFunction;
|
|
112
140
|
options?: Record<string, unknown>;
|
|
113
141
|
}
|
|
114
|
-
type FieldFormat = TextFormat | NumberFormat | CurrencyFormat | DateFormat | BooleanFormat | EnergyFormat | TemperatureFormat | DistanceFormat | PhoneFormat | CustomFormat;
|
|
142
|
+
type FieldFormat = TextFormat | NumberFormat | CurrencyFormat | DateFormat | BooleanFormat | EnergyFormat | PowerFormat | VoltageFormat | CurrentFormat | ResistanceFormat | TemperatureFormat | DistanceFormat | PhoneFormat | CustomFormat;
|
|
115
143
|
|
|
116
144
|
/**
|
|
117
145
|
* Boolean formatting utilities
|
|
@@ -150,16 +178,120 @@ declare const parseBoolean: (value: FieldValue) => boolean | null;
|
|
|
150
178
|
*/
|
|
151
179
|
declare const formatBoolean: (value: FieldValue, format: BooleanFormat) => FormattedValue;
|
|
152
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
|
+
|
|
153
262
|
/**
|
|
154
263
|
* Date formatting utilities using Luxon
|
|
155
264
|
*/
|
|
156
265
|
|
|
157
266
|
/**
|
|
158
|
-
* Format date to string with
|
|
267
|
+
* Format date to a localized string with optional time and timezone.
|
|
268
|
+
*
|
|
269
|
+
* @param value - Date value (string, Date object, or timestamp)
|
|
270
|
+
* @param showTime - Whether to include time in the output (default: false)
|
|
271
|
+
* @param timezone - Optional timezone for display (e.g., "America/New_York")
|
|
272
|
+
* @returns Formatted date string or null
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* toDateString(new Date()); // "12/25/2023"
|
|
277
|
+
* toDateString(new Date(), true); // "12/25/2023, 3:30 PM"
|
|
278
|
+
* toDateString("2023-12-25T15:30:00Z", true, "America/New_York"); // "12/25/2023, 10:30 AM"
|
|
279
|
+
* ```
|
|
159
280
|
*/
|
|
160
281
|
declare const toDateString: (value: string | Date | number | null | undefined, showTime?: boolean, timezone?: string) => string | null;
|
|
161
282
|
/**
|
|
162
|
-
* Format date to relative time (e.g., "2 hours ago")
|
|
283
|
+
* Format date to relative time (e.g., "2 hours ago", "in 3 days").
|
|
284
|
+
* Automatically chooses the most appropriate unit.
|
|
285
|
+
*
|
|
286
|
+
* @param value - Date value (string, Date object, or timestamp)
|
|
287
|
+
* @returns Relative time string or null
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```typescript
|
|
291
|
+
* toRelativeTime(new Date(Date.now() - 3600000)); // "1 hour ago"
|
|
292
|
+
* toRelativeTime(new Date(Date.now() + 86400000)); // "in 1 day"
|
|
293
|
+
* toRelativeTime(new Date()); // "now"
|
|
294
|
+
* ```
|
|
163
295
|
*/
|
|
164
296
|
declare const toRelativeTime: (value: string | Date | number | null | undefined) => string | null;
|
|
165
297
|
/**
|
|
@@ -261,7 +393,9 @@ declare const autoScaleDistance: (value: number | null | undefined, metric?: boo
|
|
|
261
393
|
declare const formatDistance: (value: FieldValue, format: DistanceFormat) => FormattedValue;
|
|
262
394
|
|
|
263
395
|
/**
|
|
264
|
-
* Energy
|
|
396
|
+
* Energy formatting utilities (stored or consumed energy)
|
|
397
|
+
* For power (rate of energy), use power.ts
|
|
398
|
+
* For electrical units (voltage, current), use voltage.ts and current.ts
|
|
265
399
|
*/
|
|
266
400
|
|
|
267
401
|
/**
|
|
@@ -284,50 +418,10 @@ declare const toGWh: (value: number | null | undefined, decimals?: number) => st
|
|
|
284
418
|
* Auto-scale energy to the most appropriate unit
|
|
285
419
|
*/
|
|
286
420
|
declare const autoScaleEnergy: (value: number | null | undefined, decimals?: number) => string | null;
|
|
287
|
-
/**
|
|
288
|
-
* Format as Watts
|
|
289
|
-
*/
|
|
290
|
-
declare const toWatts: (value: number | null | undefined) => string | null;
|
|
291
|
-
/**
|
|
292
|
-
* Format as kilowatts
|
|
293
|
-
*/
|
|
294
|
-
declare const tokW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
295
|
-
/**
|
|
296
|
-
* Format as megawatts
|
|
297
|
-
*/
|
|
298
|
-
declare const toMW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
299
|
-
/**
|
|
300
|
-
* Auto-scale power to the most appropriate unit
|
|
301
|
-
*/
|
|
302
|
-
declare const autoScalePower: (value: number | null | undefined, decimals?: number) => string | null;
|
|
303
421
|
/**
|
|
304
422
|
* Format energy according to EnergyFormat specification
|
|
305
423
|
*/
|
|
306
424
|
declare const formatEnergy: (value: FieldValue, format: EnergyFormat) => FormattedValue;
|
|
307
|
-
/**
|
|
308
|
-
* Electrical units - Amperage
|
|
309
|
-
*/
|
|
310
|
-
declare const toAmps: (value: number | null | undefined, decimals?: number) => string | null;
|
|
311
|
-
/**
|
|
312
|
-
* Electrical units - Voltage
|
|
313
|
-
*/
|
|
314
|
-
declare const toVolts: (value: number | null | undefined) => string | null;
|
|
315
|
-
/**
|
|
316
|
-
* Electrical units - Millivolts
|
|
317
|
-
*/
|
|
318
|
-
declare const toMillivolts: (value: number | null | undefined) => string | null;
|
|
319
|
-
/**
|
|
320
|
-
* Electrical units - Kilovolts
|
|
321
|
-
*/
|
|
322
|
-
declare const toKilovolts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
323
|
-
/**
|
|
324
|
-
* Electrical units - Ohms (resistance)
|
|
325
|
-
*/
|
|
326
|
-
declare const toOhms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
327
|
-
/**
|
|
328
|
-
* Electrical units - Milliohms
|
|
329
|
-
*/
|
|
330
|
-
declare const toMilliohms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
331
425
|
|
|
332
426
|
/**
|
|
333
427
|
* Number and currency formatting utilities
|
|
@@ -395,6 +489,39 @@ declare const formatPhoneNumber: (phone: string | null | undefined) => string |
|
|
|
395
489
|
*/
|
|
396
490
|
declare const formatPhone: (value: FieldValue, format: PhoneFormat) => FormattedValue;
|
|
397
491
|
|
|
492
|
+
/**
|
|
493
|
+
* Power formatting utilities (rate of energy transfer)
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Format as Watts
|
|
498
|
+
*/
|
|
499
|
+
declare const toWatts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
500
|
+
/**
|
|
501
|
+
* Format as kilowatts
|
|
502
|
+
*/
|
|
503
|
+
declare const toKilowatts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
504
|
+
/**
|
|
505
|
+
* Format as megawatts
|
|
506
|
+
*/
|
|
507
|
+
declare const toMegawatts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
508
|
+
/**
|
|
509
|
+
* Format as gigawatts
|
|
510
|
+
*/
|
|
511
|
+
declare const toGigawatts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
512
|
+
/**
|
|
513
|
+
* Auto-scale power to the most appropriate unit
|
|
514
|
+
*/
|
|
515
|
+
declare const autoScalePower: (value: number | null | undefined, decimals?: number) => string | null;
|
|
516
|
+
/**
|
|
517
|
+
* Format power according to PowerFormat specification
|
|
518
|
+
*/
|
|
519
|
+
declare const formatPower: (value: FieldValue, format: PowerFormat) => FormattedValue;
|
|
520
|
+
declare const toW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
521
|
+
declare const toKW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
522
|
+
declare const toMW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
523
|
+
declare const toGW: (value: number | null | undefined, decimals?: number) => string | null;
|
|
524
|
+
|
|
398
525
|
/**
|
|
399
526
|
* FormatRegistry - A singleton pattern for managing formatters
|
|
400
527
|
* Allows registration and retrieval of formatting functions by key
|
|
@@ -439,6 +566,35 @@ declare class FormatRegistryClass {
|
|
|
439
566
|
}
|
|
440
567
|
declare const FormatRegistry: FormatRegistryClass;
|
|
441
568
|
|
|
569
|
+
/**
|
|
570
|
+
* Electrical resistance formatting utilities
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Format as milliohms
|
|
575
|
+
*/
|
|
576
|
+
declare const toMilliohms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
577
|
+
/**
|
|
578
|
+
* Format as ohms
|
|
579
|
+
*/
|
|
580
|
+
declare const toOhms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
581
|
+
/**
|
|
582
|
+
* Format as kilohms
|
|
583
|
+
*/
|
|
584
|
+
declare const toKilohms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
585
|
+
/**
|
|
586
|
+
* Format as megohms
|
|
587
|
+
*/
|
|
588
|
+
declare const toMegohms: (value: number | null | undefined, decimals?: number) => string | null;
|
|
589
|
+
/**
|
|
590
|
+
* Auto-scale resistance to the most appropriate unit
|
|
591
|
+
*/
|
|
592
|
+
declare const autoScaleResistance: (value: number | null | undefined, decimals?: number) => string | null;
|
|
593
|
+
/**
|
|
594
|
+
* Format resistance according to ResistanceFormat specification
|
|
595
|
+
*/
|
|
596
|
+
declare const formatResistance: (value: FieldValue, format: ResistanceFormat) => FormattedValue;
|
|
597
|
+
|
|
442
598
|
/**
|
|
443
599
|
* Temperature formatting utilities
|
|
444
600
|
*/
|
|
@@ -505,11 +661,32 @@ declare const toUpperCase: (text: string | null | undefined) => string;
|
|
|
505
661
|
*/
|
|
506
662
|
declare const toLowerCase: (text: string | null | undefined) => string;
|
|
507
663
|
/**
|
|
508
|
-
* Convert text to sentence case
|
|
664
|
+
* Convert text to sentence case (first letter capitalized, rest lowercase).
|
|
665
|
+
*
|
|
666
|
+
* @param text - Text to convert
|
|
667
|
+
* @returns Sentence-cased text
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* ```typescript
|
|
671
|
+
* toSentenceCase("HELLO WORLD"); // "Hello world"
|
|
672
|
+
* toSentenceCase("hello world"); // "Hello world"
|
|
673
|
+
* ```
|
|
509
674
|
*/
|
|
510
675
|
declare const toSentenceCase: (text: string | null | undefined) => string;
|
|
511
676
|
/**
|
|
512
|
-
* Convert text to title case
|
|
677
|
+
* Convert text to title case with proper handling of articles and prepositions.
|
|
678
|
+
* Capitalizes the first letter of each word except common articles/prepositions
|
|
679
|
+
* (unless they're the first word).
|
|
680
|
+
*
|
|
681
|
+
* @param text - Text to convert
|
|
682
|
+
* @returns Title-cased text
|
|
683
|
+
*
|
|
684
|
+
* @example
|
|
685
|
+
* ```typescript
|
|
686
|
+
* toTitleCase("the quick brown fox"); // "The Quick Brown Fox"
|
|
687
|
+
* toTitleCase("war and peace"); // "War and Peace"
|
|
688
|
+
* toTitleCase("to be or not to be"); // "To Be or Not to Be"
|
|
689
|
+
* ```
|
|
513
690
|
*/
|
|
514
691
|
declare const toTitleCase: (text: string | null | undefined) => string;
|
|
515
692
|
/**
|
|
@@ -553,6 +730,34 @@ declare const toSecret: (value: string | null | undefined) => string;
|
|
|
553
730
|
*/
|
|
554
731
|
declare const formatText: (value: FieldValue, format: TextFormat) => FormattedValue;
|
|
555
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Voltage formatting utilities (electrical potential)
|
|
735
|
+
*/
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Format as millivolts
|
|
739
|
+
*/
|
|
740
|
+
declare const toMillivolts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
741
|
+
/**
|
|
742
|
+
* Format as volts
|
|
743
|
+
*/
|
|
744
|
+
declare const toVolts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
745
|
+
/**
|
|
746
|
+
* Format as kilovolts
|
|
747
|
+
*/
|
|
748
|
+
declare const toKilovolts: (value: number | null | undefined, decimals?: number) => string | null;
|
|
749
|
+
/**
|
|
750
|
+
* Auto-scale voltage to the most appropriate unit
|
|
751
|
+
*/
|
|
752
|
+
declare const autoScaleVoltage: (value: number | null | undefined, decimals?: number) => string | null;
|
|
753
|
+
/**
|
|
754
|
+
* Format voltage according to VoltageFormat specification
|
|
755
|
+
*/
|
|
756
|
+
declare const formatVoltage: (value: FieldValue, format: VoltageFormat) => FormattedValue;
|
|
757
|
+
declare const toMV: (value: number | null | undefined, decimals?: number) => string | null;
|
|
758
|
+
declare const toV: (value: number | null | undefined, decimals?: number) => string | null;
|
|
759
|
+
declare const toKV: (value: number | null | undefined, decimals?: number) => string | null;
|
|
760
|
+
|
|
556
761
|
/**
|
|
557
762
|
* Comprehensive formatting utilities for the Edges design system
|
|
558
763
|
*
|
|
@@ -822,6 +1027,12 @@ interface AreaSeriesProps {
|
|
|
822
1027
|
label?: string;
|
|
823
1028
|
categoryColors?: Record<string, string>;
|
|
824
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* AreaSeries
|
|
1032
|
+
*
|
|
1033
|
+
* Chart component for rendering area charts with gradient fill.
|
|
1034
|
+
* Displays data as a filled area with optional line path, supporting animations and custom colors.
|
|
1035
|
+
*/
|
|
825
1036
|
declare const AreaSeries: React__default.FC<AreaSeriesProps>;
|
|
826
1037
|
|
|
827
1038
|
interface BarSeriesProps {
|
|
@@ -831,6 +1042,12 @@ interface BarSeriesProps {
|
|
|
831
1042
|
opacity?: number;
|
|
832
1043
|
categoryColors?: Record<string, string>;
|
|
833
1044
|
}
|
|
1045
|
+
/**
|
|
1046
|
+
* BarSeries
|
|
1047
|
+
*
|
|
1048
|
+
* Chart component for rendering bar/column charts.
|
|
1049
|
+
* Displays data as vertical bars with customizable colors, opacity, and category-based coloring.
|
|
1050
|
+
*/
|
|
834
1051
|
declare const BarSeries: React__default.FC<BarSeriesProps>;
|
|
835
1052
|
|
|
836
1053
|
interface AxisBottomProps {
|
|
@@ -843,6 +1060,12 @@ interface AxisLeftProps {
|
|
|
843
1060
|
scale: ScaleLinear<number, number>;
|
|
844
1061
|
yFormatType: YFormatType;
|
|
845
1062
|
}
|
|
1063
|
+
/**
|
|
1064
|
+
* ChartAxis
|
|
1065
|
+
*
|
|
1066
|
+
* Chart axis components for rendering X and Y axes.
|
|
1067
|
+
* Provides formatted bottom (time) and left (numeric) axes with customizable tick formatting.
|
|
1068
|
+
*/
|
|
846
1069
|
declare const ChartAxis: {
|
|
847
1070
|
Bottom: React__default.FC<AxisBottomProps>;
|
|
848
1071
|
Left: React__default.FC<AxisLeftProps>;
|
|
@@ -862,7 +1085,30 @@ interface ChartExportMetadata {
|
|
|
862
1085
|
timestamp?: boolean;
|
|
863
1086
|
}
|
|
864
1087
|
/**
|
|
865
|
-
* Main export function that handles all export types
|
|
1088
|
+
* Main export function that handles all chart export types.
|
|
1089
|
+
* Supports CSV, SVG, and PNG formats with automatic filename generation.
|
|
1090
|
+
*
|
|
1091
|
+
* @param type - Export format: "csv", "svg", or "png"
|
|
1092
|
+
* @param datasets - Chart data as single array or array of arrays for multi-series
|
|
1093
|
+
* @param metadata - Export metadata including labels and filename options
|
|
1094
|
+
* @param svgRef - Reference to the chart's SVG element
|
|
1095
|
+
* @returns Promise that resolves when export is complete
|
|
1096
|
+
*
|
|
1097
|
+
* @example
|
|
1098
|
+
* ```typescript
|
|
1099
|
+
* // Export single series as CSV
|
|
1100
|
+
* await exportChart("csv", data, {
|
|
1101
|
+
* xLabel: "Date",
|
|
1102
|
+
* yLabel: "Value",
|
|
1103
|
+
* filename: "sales-data"
|
|
1104
|
+
* }, svgRef);
|
|
1105
|
+
*
|
|
1106
|
+
* // Export multi-series chart as PNG
|
|
1107
|
+
* await exportChart("png", [series1, series2], {
|
|
1108
|
+
* seriesLabels: ["Revenue", "Profit"],
|
|
1109
|
+
* timestamp: false
|
|
1110
|
+
* }, svgRef);
|
|
1111
|
+
* ```
|
|
866
1112
|
*/
|
|
867
1113
|
declare function exportChart(type: ExportType, datasets: BaseDataPoint[][] | BaseDataPoint[], metadata: ChartExportMetadata | undefined, svgRef: React__default.RefObject<SVGSVGElement>): Promise<void>;
|
|
868
1114
|
/**
|
|
@@ -882,6 +1128,12 @@ interface ChartBottomBarProps {
|
|
|
882
1128
|
items: LegendItem[];
|
|
883
1129
|
onExport: (type: ExportType) => void | Promise<void>;
|
|
884
1130
|
}
|
|
1131
|
+
/**
|
|
1132
|
+
* ChartBottomBar
|
|
1133
|
+
*
|
|
1134
|
+
* Chart footer component with legend and export functionality.
|
|
1135
|
+
* Displays color-coded legend items and provides export options for CSV, SVG, and PNG formats.
|
|
1136
|
+
*/
|
|
885
1137
|
declare const ChartBottomBar: React__default.FC<ChartBottomBarProps>;
|
|
886
1138
|
|
|
887
1139
|
interface ChartContainerProps {
|
|
@@ -891,12 +1143,24 @@ interface ChartContainerProps {
|
|
|
891
1143
|
yFormatType?: YFormatType;
|
|
892
1144
|
isLoading?: boolean;
|
|
893
1145
|
}
|
|
1146
|
+
/**
|
|
1147
|
+
* ChartContainer
|
|
1148
|
+
*
|
|
1149
|
+
* Main chart wrapper component that provides context and layout for chart visualizations.
|
|
1150
|
+
* Handles scaling, tooltips, axes, and data management for area, line, and bar charts.
|
|
1151
|
+
*/
|
|
894
1152
|
declare const ChartContainer: React__default.FC<Omit<ChartContainerProps, "parentWidth" | "parentHeight">>;
|
|
895
1153
|
|
|
896
1154
|
interface ChartTooltipProps {
|
|
897
1155
|
data: TooltipData | null;
|
|
898
1156
|
formatType: YFormatType;
|
|
899
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* ChartTooltip
|
|
1160
|
+
*
|
|
1161
|
+
* Interactive tooltip component for charts.
|
|
1162
|
+
* Displays formatted data values at hover position with automatic positioning and animations.
|
|
1163
|
+
*/
|
|
900
1164
|
declare const ChartTooltip: React__default.FC<ChartTooltipProps>;
|
|
901
1165
|
|
|
902
1166
|
interface LineSeriesProps {
|
|
@@ -908,6 +1172,12 @@ interface LineSeriesProps {
|
|
|
908
1172
|
strokeDasharray?: string;
|
|
909
1173
|
categoryColors?: Record<string, string>;
|
|
910
1174
|
}
|
|
1175
|
+
/**
|
|
1176
|
+
* LineSeries
|
|
1177
|
+
*
|
|
1178
|
+
* Chart component for rendering line charts.
|
|
1179
|
+
* Displays data as a continuous line with customizable stroke width, color, and dash patterns.
|
|
1180
|
+
*/
|
|
911
1181
|
declare const LineSeries: React__default.FC<LineSeriesProps>;
|
|
912
1182
|
|
|
913
1183
|
type SortDirection = "asc" | "desc";
|
|
@@ -981,6 +1251,9 @@ interface DataTableProps<T> {
|
|
|
981
1251
|
"aria-label"?: string;
|
|
982
1252
|
}
|
|
983
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* Action configuration for ActionCell
|
|
1256
|
+
*/
|
|
984
1257
|
interface Action<T = any> {
|
|
985
1258
|
id: string;
|
|
986
1259
|
label?: string;
|
|
@@ -995,6 +1268,12 @@ interface ActionCellProps<T = any> extends CellComponentProps<T> {
|
|
|
995
1268
|
align?: "left" | "center" | "right";
|
|
996
1269
|
size?: "sm" | "md" | "lg";
|
|
997
1270
|
}
|
|
1271
|
+
/**
|
|
1272
|
+
* ActionCell
|
|
1273
|
+
*
|
|
1274
|
+
* DataTable cell component for rendering action buttons within table rows.
|
|
1275
|
+
* Supports multiple actions with icons, labels, and conditional visibility/disabled states.
|
|
1276
|
+
*/
|
|
998
1277
|
declare function ActionCell<T = any>({ row, context, actions, align, size, }: ActionCellProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
999
1278
|
|
|
1000
1279
|
interface BooleanCellProps<T = any> extends CellComponentProps<T> {
|
|
@@ -1007,6 +1286,12 @@ interface BooleanCellProps<T = any> extends CellComponentProps<T> {
|
|
|
1007
1286
|
align?: "left" | "center" | "right";
|
|
1008
1287
|
emphasis?: CellEmphasis;
|
|
1009
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* BooleanCell
|
|
1291
|
+
*
|
|
1292
|
+
* DataTable cell component for displaying boolean values.
|
|
1293
|
+
* Supports multiple display formats including icons, text, or badges with customizable true/false representations.
|
|
1294
|
+
*/
|
|
1010
1295
|
declare function BooleanCell<T = any>({ value, context, format, trueText, falseText, trueIcon, falseIcon, showFalse, align, emphasis, }: BooleanCellProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
1011
1296
|
|
|
1012
1297
|
/**
|
|
@@ -1065,6 +1350,12 @@ interface DateCellProps<T = any> extends CellComponentProps<T> {
|
|
|
1065
1350
|
href?: string | ((row: T) => string);
|
|
1066
1351
|
linkBehavior?: LinkBehavior;
|
|
1067
1352
|
}
|
|
1353
|
+
/**
|
|
1354
|
+
* DateCell
|
|
1355
|
+
*
|
|
1356
|
+
* DataTable cell component for displaying date and time values.
|
|
1357
|
+
* Supports multiple formats including relative time, with optional linking capabilities.
|
|
1358
|
+
*/
|
|
1068
1359
|
declare function DateCell<T = any>({ value, row, context, format, customFormat, emptyText, align, emphasis, href, linkBehavior, }: DateCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
1069
1360
|
|
|
1070
1361
|
interface NumberCellProps<T = any> extends CellComponentProps<T> {
|
|
@@ -1080,6 +1371,12 @@ interface NumberCellProps<T = any> extends CellComponentProps<T> {
|
|
|
1080
1371
|
showPositiveSign?: boolean;
|
|
1081
1372
|
colorCode?: boolean;
|
|
1082
1373
|
}
|
|
1374
|
+
/**
|
|
1375
|
+
* NumberCell
|
|
1376
|
+
*
|
|
1377
|
+
* DataTable cell component for displaying numeric values.
|
|
1378
|
+
* Supports currency, percentage, and compact formatting with optional color coding for positive/negative values.
|
|
1379
|
+
*/
|
|
1083
1380
|
declare function NumberCell<T = any>({ value, row, context, format, decimals, prefix, suffix, emptyText, align, emphasis, href, linkBehavior, showPositiveSign, colorCode, }: NumberCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
1084
1381
|
|
|
1085
1382
|
interface SelectCellProps<T = any> extends CellComponentProps<T> {
|
|
@@ -1088,6 +1385,12 @@ interface SelectCellProps<T = any> extends CellComponentProps<T> {
|
|
|
1088
1385
|
isDisabled?: boolean | ((row: T) => boolean);
|
|
1089
1386
|
align?: "left" | "center" | "right";
|
|
1090
1387
|
}
|
|
1388
|
+
/**
|
|
1389
|
+
* SelectCell
|
|
1390
|
+
*
|
|
1391
|
+
* DataTable cell component for row selection.
|
|
1392
|
+
* Renders a checkbox that allows users to select individual rows in the table.
|
|
1393
|
+
*/
|
|
1091
1394
|
declare function SelectCell<T = any>({ row, context, isSelected, onSelect, isDisabled, align, }: SelectCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
1092
1395
|
|
|
1093
1396
|
interface TextCellProps<T = any> extends CellComponentProps<T> {
|
|
@@ -1100,8 +1403,20 @@ interface TextCellProps<T = any> extends CellComponentProps<T> {
|
|
|
1100
1403
|
truncate?: boolean;
|
|
1101
1404
|
align?: "left" | "center" | "right";
|
|
1102
1405
|
}
|
|
1406
|
+
/**
|
|
1407
|
+
* TextCell
|
|
1408
|
+
*
|
|
1409
|
+
* DataTable cell component for displaying text content.
|
|
1410
|
+
* Supports prefixes, suffixes, truncation, and optional linking with customizable emphasis levels.
|
|
1411
|
+
*/
|
|
1103
1412
|
declare function TextCell<T = any>({ value, row, context, prefix, suffix, emptyText, href, linkBehavior, emphasis, truncate, align, }: TextCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
1104
1413
|
|
|
1414
|
+
/**
|
|
1415
|
+
* DataTable
|
|
1416
|
+
*
|
|
1417
|
+
* Advanced table component with sorting, filtering, pagination, and mobile-responsive views.
|
|
1418
|
+
* Supports custom cell renderers, column configurations, and multiple display densities.
|
|
1419
|
+
*/
|
|
1105
1420
|
declare function DataTable<T extends Record<string, unknown>>({ columns, data, className, density, width, height, maxHeight, layout, mobileRenderer, customMobileRowRender, mobileBreakpoint, isLoading, loadingRowCount, stickyHeader, onRowClick, getRowId, hideHeader, onSort, "aria-label": ariaLabel, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1106
1421
|
|
|
1107
1422
|
interface MobileRowProps<T> {
|
|
@@ -1204,12 +1519,18 @@ interface State {
|
|
|
1204
1519
|
hasError: boolean;
|
|
1205
1520
|
error?: Error;
|
|
1206
1521
|
}
|
|
1522
|
+
/**
|
|
1523
|
+
* ErrorBoundary
|
|
1524
|
+
*
|
|
1525
|
+
* React error boundary component for graceful error handling.
|
|
1526
|
+
* Catches JavaScript errors in child components and displays a fallback UI with retry option.
|
|
1527
|
+
*/
|
|
1207
1528
|
declare class ErrorBoundary extends Component<Props, State> {
|
|
1208
1529
|
state: State;
|
|
1209
1530
|
static getDerivedStateFromError(error: Error): State;
|
|
1210
1531
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
1211
1532
|
private handleRetry;
|
|
1212
|
-
render(): string | number | boolean | react_jsx_runtime.JSX.Element |
|
|
1533
|
+
render(): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1213
1534
|
}
|
|
1214
1535
|
|
|
1215
1536
|
interface InputStyleProps {
|
|
@@ -1498,6 +1819,7 @@ declare namespace Grid {
|
|
|
1498
1819
|
}
|
|
1499
1820
|
declare function GridItem({ span, className, children, }: GridItemProps): react_jsx_runtime.JSX.Element;
|
|
1500
1821
|
|
|
1822
|
+
type KpiFormatter = ComponentFormatter;
|
|
1501
1823
|
/**
|
|
1502
1824
|
* Kpi Component — Single metric display
|
|
1503
1825
|
*
|
|
@@ -1527,10 +1849,8 @@ interface KpiProps {
|
|
|
1527
1849
|
label: React__default.ReactNode;
|
|
1528
1850
|
/** Primary value - number for auto-formatting or string for custom display */
|
|
1529
1851
|
value: number | string;
|
|
1530
|
-
/**
|
|
1531
|
-
|
|
1532
|
-
/** Intl.NumberFormat options for numeric values */
|
|
1533
|
-
format?: Intl.NumberFormatOptions;
|
|
1852
|
+
/** Formatter using the unified formatting system */
|
|
1853
|
+
formatter?: KpiFormatter;
|
|
1534
1854
|
/** Change since prior period */
|
|
1535
1855
|
delta?: number;
|
|
1536
1856
|
/** Description of delta period (e.g., "vs last 7d") */
|
|
@@ -1567,7 +1887,7 @@ interface KpiProps {
|
|
|
1567
1887
|
/** Custom trend renderer */
|
|
1568
1888
|
renderTrend?: (points?: TrendPoint[]) => React__default.ReactNode;
|
|
1569
1889
|
}
|
|
1570
|
-
declare function Kpi({ label, value,
|
|
1890
|
+
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;
|
|
1571
1891
|
|
|
1572
1892
|
/**
|
|
1573
1893
|
* KpiGroup Component — Layout container for multiple KPIs
|
|
@@ -1847,19 +2167,20 @@ type PageFiltersProps = {
|
|
|
1847
2167
|
ariaLabel?: string;
|
|
1848
2168
|
};
|
|
1849
2169
|
declare function Filters({ children, className, ariaLabel }: PageFiltersProps): react_jsx_runtime.JSX.Element;
|
|
1850
|
-
type
|
|
2170
|
+
type PageLayoutTab = {
|
|
1851
2171
|
id: string;
|
|
1852
2172
|
label: React$1.ReactNode;
|
|
1853
2173
|
disabled?: boolean;
|
|
1854
2174
|
};
|
|
1855
|
-
type TabsProps = {
|
|
1856
|
-
tabs:
|
|
2175
|
+
type TabsProps$1 = {
|
|
2176
|
+
tabs: PageLayoutTab[];
|
|
1857
2177
|
value?: string;
|
|
1858
2178
|
defaultValue?: string;
|
|
1859
2179
|
onChange?: (id: string) => void;
|
|
1860
2180
|
className?: string;
|
|
2181
|
+
children?: React$1.ReactNode;
|
|
1861
2182
|
};
|
|
1862
|
-
declare function Tabs$1({ tabs, value, defaultValue, onChange, className }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
2183
|
+
declare function Tabs$1({ tabs, value, defaultValue, onChange, className, children }: TabsProps$1): react_jsx_runtime.JSX.Element;
|
|
1863
2184
|
type PageContentProps = {
|
|
1864
2185
|
children: React$1.ReactNode;
|
|
1865
2186
|
className?: string;
|
|
@@ -2067,6 +2388,12 @@ interface SkeletonProps {
|
|
|
2067
2388
|
className?: string;
|
|
2068
2389
|
"data-testid"?: string;
|
|
2069
2390
|
}
|
|
2391
|
+
/**
|
|
2392
|
+
* Skeleton
|
|
2393
|
+
*
|
|
2394
|
+
* Loading placeholder component that mimics content structure.
|
|
2395
|
+
* Supports various shapes, animations, and responsive configurations for skeleton screens.
|
|
2396
|
+
*/
|
|
2070
2397
|
declare const Skeleton: React__default.FC<SkeletonProps>;
|
|
2071
2398
|
|
|
2072
2399
|
interface SliderProps {
|
|
@@ -2139,44 +2466,16 @@ declare function Main({ className, children }: SplitPanePanelProps): react_jsx_r
|
|
|
2139
2466
|
declare function Aside({ className, children }: SplitPanePanelProps): react_jsx_runtime.JSX.Element;
|
|
2140
2467
|
|
|
2141
2468
|
/**
|
|
2142
|
-
* StatList
|
|
2143
|
-
*
|
|
2144
|
-
* Display a list of labeled statistics with formatting, status indicators,
|
|
2145
|
-
* and optional actions. Perfect for detail panels, inspectors, and spec sheets.
|
|
2469
|
+
* StatList — Compact key-value statistics display
|
|
2146
2470
|
*
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
2149
|
-
* <StatList
|
|
2150
|
-
* items={[
|
|
2151
|
-
* { id: "voltage", label: "Voltage", value: 241, unit: "V" },
|
|
2152
|
-
* { id: "status", label: "Status", value: "Online", tone: "success" },
|
|
2153
|
-
* { id: "updated", label: "Last Update", value: new Date() }
|
|
2154
|
-
* ]}
|
|
2155
|
-
* />
|
|
2156
|
-
* ```
|
|
2471
|
+
* Displays formatted statistics with status indicators and optional copy functionality.
|
|
2472
|
+
* Uses the unified formatting system for consistent data presentation.
|
|
2157
2473
|
*/
|
|
2158
2474
|
type StatTone = "neutral" | "success" | "warning" | "error" | "info";
|
|
2159
2475
|
type StatAlign = "start" | "end";
|
|
2160
2476
|
type StatLayout = "one-column" | "two-column";
|
|
2161
|
-
type StatValue =
|
|
2162
|
-
type StatFormatter =
|
|
2163
|
-
type: "number";
|
|
2164
|
-
options?: Intl.NumberFormatOptions;
|
|
2165
|
-
unit?: string;
|
|
2166
|
-
} | {
|
|
2167
|
-
type: "date";
|
|
2168
|
-
options?: Intl.DateTimeFormatOptions;
|
|
2169
|
-
} | {
|
|
2170
|
-
type: "duration";
|
|
2171
|
-
base?: "seconds" | "ms";
|
|
2172
|
-
} | {
|
|
2173
|
-
type: "bool";
|
|
2174
|
-
trueLabel?: string;
|
|
2175
|
-
falseLabel?: string;
|
|
2176
|
-
} | {
|
|
2177
|
-
type: "string";
|
|
2178
|
-
transform?: "uppercase" | "lowercase" | "capitalize";
|
|
2179
|
-
};
|
|
2477
|
+
type StatValue = FieldValue;
|
|
2478
|
+
type StatFormatter = ComponentFormatter;
|
|
2180
2479
|
interface StatThreshold {
|
|
2181
2480
|
when: (value: StatValue) => boolean;
|
|
2182
2481
|
tone: StatTone;
|
|
@@ -2190,8 +2489,6 @@ interface StatItem {
|
|
|
2190
2489
|
value: StatValue;
|
|
2191
2490
|
/** Custom formatter for the value */
|
|
2192
2491
|
formatter?: StatFormatter;
|
|
2193
|
-
/** Unit to append to formatted value */
|
|
2194
|
-
unit?: string;
|
|
2195
2492
|
/** Additional metadata below value */
|
|
2196
2493
|
meta?: React__default.ReactNode;
|
|
2197
2494
|
/** Explicit tone/status color */
|
|
@@ -2232,30 +2529,42 @@ interface StatListProps {
|
|
|
2232
2529
|
error?: string | React__default.ReactNode;
|
|
2233
2530
|
/** Additional CSS classes */
|
|
2234
2531
|
className?: string;
|
|
2235
|
-
/** Copy callback */
|
|
2236
|
-
onCopy?: (text: string, id: string) => void;
|
|
2237
2532
|
}
|
|
2238
|
-
declare function StatList({ items, layout, dense, valueAlign, showDividers, skeleton, empty, error, className,
|
|
2533
|
+
declare function StatList({ items, layout, dense, valueAlign, showDividers, skeleton, empty, error, className, }: StatListProps): react_jsx_runtime.JSX.Element;
|
|
2239
2534
|
|
|
2240
2535
|
interface SwitchProps extends Omit<SwitchProps$1, "children"> {
|
|
2241
2536
|
children: React__default.ReactNode;
|
|
2242
2537
|
}
|
|
2538
|
+
/**
|
|
2539
|
+
* Switch
|
|
2540
|
+
*
|
|
2541
|
+
* Toggle switch component for binary on/off states.
|
|
2542
|
+
* Provides an accessible alternative to checkboxes for settings and preferences.
|
|
2543
|
+
*/
|
|
2243
2544
|
declare function Switch({ children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
2244
2545
|
|
|
2546
|
+
type TabVariant = "default" | "accent";
|
|
2245
2547
|
type TabProps = TabProps$1 & {
|
|
2246
2548
|
isSelected?: boolean;
|
|
2247
2549
|
id?: string;
|
|
2248
2550
|
};
|
|
2551
|
+
type TabsProps = TabsProps$2 & {
|
|
2552
|
+
variant?: TabVariant;
|
|
2553
|
+
};
|
|
2554
|
+
type TabListProps<T extends object> = TabListProps$1<T> & {
|
|
2555
|
+
variant?: TabVariant;
|
|
2556
|
+
};
|
|
2249
2557
|
/**
|
|
2250
2558
|
* Tabs
|
|
2251
2559
|
*
|
|
2252
2560
|
* Tabbed interface with styled tabs and panels.
|
|
2561
|
+
* @param variant - "default" for gray styling, "accent" for brand color styling
|
|
2253
2562
|
*/
|
|
2254
|
-
declare function Tabs(props: TabsProps
|
|
2563
|
+
declare function Tabs({ variant, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
2255
2564
|
/**
|
|
2256
2565
|
* TabList container.
|
|
2257
2566
|
*/
|
|
2258
|
-
declare function TabList<T extends object>(props: TabListProps<T>): react_jsx_runtime.JSX.Element;
|
|
2567
|
+
declare function TabList<T extends object>({ variant, ...props }: TabListProps<T>): react_jsx_runtime.JSX.Element;
|
|
2259
2568
|
/**
|
|
2260
2569
|
* Tab trigger element.
|
|
2261
2570
|
*/
|
|
@@ -2312,6 +2621,12 @@ interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttribu
|
|
|
2312
2621
|
chipVariant?: "default" | "primary" | "secondary";
|
|
2313
2622
|
chipSize?: Size;
|
|
2314
2623
|
}
|
|
2624
|
+
/**
|
|
2625
|
+
* TextAreaWithChips
|
|
2626
|
+
*
|
|
2627
|
+
* Enhanced textarea component with chip/tag support.
|
|
2628
|
+
* Enables rich text input with embedded chips for mentions, tags, or structured data entry.
|
|
2629
|
+
*/
|
|
2315
2630
|
declare function TextAreaWithChips({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, isDisabled, className, validationResult, value, onChange, chips, onChipsChange, triggerPattern, onTriggerDetected, onTriggerDismissed, renderChip, chipVariant, chipSize, ...props }: TextAreaWithChipsProps): react_jsx_runtime.JSX.Element;
|
|
2316
2631
|
|
|
2317
2632
|
/**
|
|
@@ -2408,4 +2723,4 @@ interface ColorModeProviderProps {
|
|
|
2408
2723
|
}
|
|
2409
2724
|
declare const ColorModeProvider: React.FC<ColorModeProviderProps>;
|
|
2410
2725
|
|
|
2411
|
-
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, CopyToClipboard, type CurrencyFormat, 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, ProgressBar, Radio, RadioGroup, RangeCalendar, 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, type TemperatureFormat, type TemperatureUnit, type TemperatureUnitString, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, type TextFormat, type TextTransform, type TextTruncatePosition, TimeField, ToggleButton, Tooltip, TooltipData, type TrendPoint, YFormatType, autoScaleDistance, autoScaleEnergy, autoScalePower, camelCaseToWords, capitalize, celsiusToFahrenheit, celsiusToKelvin, centimetersToInches, createFormat, enumToSentenceCase, exportChart, fahrenheitToCelsius, fahrenheitToKelvin, feetToMeters, feetToMiles, formatBoolean, formatCurrency, formatDate, formatDistance, formatEmptyValue, formatEnergy, formatFieldValue, formatInternationalPhone, formatNumber, formatPhone, formatPhoneNumber, formatTemperature, formatText, formatUSPhone, 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, toActiveInactive, toAmps, toBoolean, toCelsius, toCentimeters, toCheckmark, toCompactNumber, toCurrency, toCustomDateFormat, toDateString, toEnabledDisabled, toFahrenheit, toFeet, toFloat, toFormattedNumber, toFullDateTime, toGWh, toISOString, toInches, toInteger, toKelvin, toKilometers, toKilovolts, toLowerCase, toMW, toMWh, toMeters, toMiles, toMillimeters, toMilliohms, toMillivolts, toNauticalMiles, toOhms, toOnOff, toPercentage, toRelativeTime, toScientificNotation, toSecret, toSentenceCase, toTemperature, toTitleCase, toTrueFalse, toUpperCase, toVolts, toWatts, toWh, toYards,
|
|
2726
|
+
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 };
|