@texturehq/edges 0.1.7 → 1.0.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 +556 -7
- package/dist/generated/tailwind-tokens-dark.css +190 -0
- package/dist/generated/tailwind-tokens-light.css +190 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1189 -129
- package/dist/index.d.ts +1189 -129
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/styles/animations.css +132 -0
- package/dist/styles/computed.css +137 -0
- package/dist/styles/utilities.css +13 -0
- package/dist/styles.css +1664 -661
- package/dist/theme.css +26 -1102
- package/package.json +44 -16
- package/scripts/validate-tokens.js +177 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,81 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ComponentProps,
|
|
4
|
-
import { Key, ValidationResult, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, DateFieldProps as DateFieldProps$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, 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, RadioGroupProps as RadioGroupProps$1, RadioProps } from 'react-aria-components';
|
|
3
|
+
import React__default, { ReactNode, ComponentProps, ComponentType, Component, ErrorInfo } from 'react';
|
|
5
4
|
import * as _phosphor_icons_react from '@phosphor-icons/react';
|
|
5
|
+
import { Key, ValidationResult, BreadcrumbProps, BreadcrumbsProps, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, DateFieldProps as DateFieldProps$1, DateRangePickerProps as DateRangePickerProps$1, DialogProps, TextProps, FormProps, ListBoxProps as ListBoxProps$1, ListBoxItemProps, MeterProps as MeterProps$1, 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
|
+
export { BreadcrumbProps, BreadcrumbsProps } from 'react-aria-components';
|
|
7
|
+
import * as d3_scale from 'd3-scale';
|
|
8
|
+
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
9
|
+
import { ViewState } from 'react-map-gl';
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
* Control-specific style utilities for form elements and interactive components.
|
|
9
|
-
* These styles use CSS variables defined in the theme for consistent sizing
|
|
10
|
-
* and spacing across all control elements.
|
|
11
|
-
*
|
|
12
|
-
* Text sizes follow the relationships defined in theme.css:
|
|
13
|
-
* sm: --control-text-sm (maps to --text-xs)
|
|
14
|
-
* md: --control-text-md (maps to --text-sm)
|
|
15
|
-
* lg: --control-text-lg (maps to --text-base)
|
|
16
|
-
* xl: --control-text-xl (maps to --text-lg)
|
|
17
|
-
*/
|
|
18
|
-
type Size = "sm" | "md" | "lg" | "xl";
|
|
19
|
-
|
|
20
|
-
interface Item {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
}
|
|
24
|
-
interface Section {
|
|
25
|
-
name: string;
|
|
26
|
-
items: Item[];
|
|
27
|
-
}
|
|
28
|
-
type RequestMethod = "GET" | "POST";
|
|
29
|
-
interface BaseRequestConfig {
|
|
30
|
-
url: string;
|
|
31
|
-
headers?: Record<string, string>;
|
|
32
|
-
transformResponse: (data: unknown) => Item[];
|
|
33
|
-
}
|
|
34
|
-
interface RestRequestConfig extends BaseRequestConfig {
|
|
35
|
-
requestType: "REST";
|
|
36
|
-
method?: RequestMethod;
|
|
37
|
-
queryKey?: string;
|
|
38
|
-
extraParams?: Record<string, string>;
|
|
39
|
-
shouldLoad?: (filterText: string) => boolean;
|
|
40
|
-
}
|
|
41
|
-
interface GraphQLRequestConfig extends BaseRequestConfig {
|
|
42
|
-
requestType: "GraphQL";
|
|
43
|
-
graphqlQuery: string;
|
|
44
|
-
variableKey?: string;
|
|
45
|
-
responsePath?: string;
|
|
46
|
-
shouldLoad?: (filterText: string) => boolean;
|
|
47
|
-
}
|
|
48
|
-
type AutocompleteRequestConfig = RestRequestConfig | GraphQLRequestConfig;
|
|
49
|
-
/**
|
|
50
|
-
* Autocomplete
|
|
51
|
-
*
|
|
52
|
-
* Text input with typeahead suggestions and keyboard navigation.
|
|
53
|
-
*/
|
|
54
|
-
interface AutocompleteProps {
|
|
55
|
-
label?: string;
|
|
56
|
-
staticItems?: Item[];
|
|
57
|
-
sections?: Section[];
|
|
58
|
-
selectedKey?: Key | null;
|
|
59
|
-
defaultSelectedKey?: Key | null;
|
|
60
|
-
onSelectionChange?: (key: Key | null) => void;
|
|
61
|
-
requestConfig?: AutocompleteRequestConfig;
|
|
62
|
-
defaultFilter?: (textValue: string, inputValue: string) => boolean;
|
|
63
|
-
placeholder?: string;
|
|
64
|
-
renderItem?: (item: Item) => React__default.ReactNode;
|
|
65
|
-
renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
|
|
66
|
-
renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
|
|
67
|
-
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
68
|
-
description?: string;
|
|
69
|
-
size?: Size;
|
|
70
|
-
tooltip?: string;
|
|
71
|
-
isRequired?: boolean;
|
|
72
|
-
isDisabled?: boolean;
|
|
73
|
-
isInvalid?: boolean;
|
|
74
|
-
validationResult?: ValidationResult;
|
|
75
|
-
showErrors?: boolean;
|
|
76
|
-
autoFocus?: boolean;
|
|
77
|
-
}
|
|
78
|
-
declare function Autocomplete({ label, staticItems, sections, selectedKey, defaultSelectedKey, onSelectionChange, requestConfig, defaultFilter, placeholder, errorMessage, description, size, tooltip, isRequired, isDisabled, isInvalid, validationResult, showErrors, renderItem, renderLeftIcon, renderSection, autoFocus, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
79
12
|
|
|
80
13
|
declare const iconMapping: {
|
|
81
14
|
readonly AppWindow: _phosphor_icons_react.Icon;
|
|
@@ -219,6 +152,251 @@ interface ExtendedIconProps {
|
|
|
219
152
|
}
|
|
220
153
|
declare const Icon: React$1.MemoExoticComponent<({ name, size, color, weight, className, title, ariaLabel, grow, variant, rounded, bgColor, ...props }: ExtendedIconProps) => react_jsx_runtime.JSX.Element | null>;
|
|
221
154
|
|
|
155
|
+
interface ActionItem {
|
|
156
|
+
/**
|
|
157
|
+
* Unique identifier for the action
|
|
158
|
+
*/
|
|
159
|
+
id: number | string;
|
|
160
|
+
/**
|
|
161
|
+
* Display name for the action
|
|
162
|
+
*/
|
|
163
|
+
name: string;
|
|
164
|
+
/**
|
|
165
|
+
* Visual variant of the action
|
|
166
|
+
*/
|
|
167
|
+
variant?: "default" | "destructive";
|
|
168
|
+
/**
|
|
169
|
+
* Icon to display with the action
|
|
170
|
+
*/
|
|
171
|
+
iconName?: IconName$2;
|
|
172
|
+
/**
|
|
173
|
+
* Whether the action is disabled
|
|
174
|
+
*/
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Handler for when the action is selected
|
|
178
|
+
*/
|
|
179
|
+
onAction?: () => void;
|
|
180
|
+
/**
|
|
181
|
+
* Test ID for testing
|
|
182
|
+
*/
|
|
183
|
+
testId?: string;
|
|
184
|
+
}
|
|
185
|
+
interface ActionMenuProps {
|
|
186
|
+
/**
|
|
187
|
+
* List of actions to display
|
|
188
|
+
*/
|
|
189
|
+
items: ActionItem[];
|
|
190
|
+
/**
|
|
191
|
+
* Trigger button component
|
|
192
|
+
*/
|
|
193
|
+
children: ReactNode;
|
|
194
|
+
/**
|
|
195
|
+
* Alignment of the popover
|
|
196
|
+
* @default "left"
|
|
197
|
+
*/
|
|
198
|
+
align?: "left" | "right";
|
|
199
|
+
/**
|
|
200
|
+
* Size of menu items
|
|
201
|
+
* @default "md"
|
|
202
|
+
*/
|
|
203
|
+
size?: "sm" | "md";
|
|
204
|
+
/**
|
|
205
|
+
* Text alignment within menu items
|
|
206
|
+
* @default "left"
|
|
207
|
+
*/
|
|
208
|
+
textAlign?: "left" | "right";
|
|
209
|
+
/**
|
|
210
|
+
* Additional CSS classes
|
|
211
|
+
*/
|
|
212
|
+
className?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Global action handler (called if item doesn't have its own onAction)
|
|
215
|
+
*/
|
|
216
|
+
onAction?: (item: ActionItem) => void;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* ActionMenu
|
|
220
|
+
*
|
|
221
|
+
* A dropdown menu for actions, typically triggered by a button.
|
|
222
|
+
* Supports icons, destructive actions, and flexible alignment.
|
|
223
|
+
*/
|
|
224
|
+
declare function ActionMenu({ children, items, className, align, textAlign, size, onAction, }: ActionMenuProps): react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Control-specific style utilities for form elements and interactive components.
|
|
228
|
+
* These styles use CSS variables defined in the theme for consistent sizing
|
|
229
|
+
* and spacing across all control elements.
|
|
230
|
+
*
|
|
231
|
+
* Text sizes follow the relationships defined in theme.css:
|
|
232
|
+
* sm: --control-text-sm (maps to --text-xs)
|
|
233
|
+
* md: --control-text-md (maps to --text-sm)
|
|
234
|
+
* lg: --control-text-lg (maps to --text-base)
|
|
235
|
+
* xl: --control-text-xl (maps to --text-lg)
|
|
236
|
+
*/
|
|
237
|
+
type Size = "sm" | "md" | "lg" | "xl";
|
|
238
|
+
|
|
239
|
+
interface Item {
|
|
240
|
+
id: string;
|
|
241
|
+
name: string;
|
|
242
|
+
}
|
|
243
|
+
interface Section {
|
|
244
|
+
name: string;
|
|
245
|
+
items: Item[];
|
|
246
|
+
}
|
|
247
|
+
type RequestMethod = "GET" | "POST";
|
|
248
|
+
interface BaseRequestConfig {
|
|
249
|
+
url: string;
|
|
250
|
+
headers?: Record<string, string>;
|
|
251
|
+
transformResponse: (data: unknown) => Item[];
|
|
252
|
+
}
|
|
253
|
+
interface RestRequestConfig extends BaseRequestConfig {
|
|
254
|
+
requestType: "REST";
|
|
255
|
+
method?: RequestMethod;
|
|
256
|
+
queryKey?: string;
|
|
257
|
+
extraParams?: Record<string, string>;
|
|
258
|
+
shouldLoad?: (filterText: string) => boolean;
|
|
259
|
+
}
|
|
260
|
+
interface GraphQLRequestConfig extends BaseRequestConfig {
|
|
261
|
+
requestType: "GraphQL";
|
|
262
|
+
graphqlQuery: string;
|
|
263
|
+
variableKey?: string;
|
|
264
|
+
responsePath?: string;
|
|
265
|
+
shouldLoad?: (filterText: string) => boolean;
|
|
266
|
+
}
|
|
267
|
+
type AutocompleteRequestConfig = RestRequestConfig | GraphQLRequestConfig;
|
|
268
|
+
/**
|
|
269
|
+
* Autocomplete
|
|
270
|
+
*
|
|
271
|
+
* Text input with typeahead suggestions and keyboard navigation.
|
|
272
|
+
*/
|
|
273
|
+
interface AutocompleteProps {
|
|
274
|
+
label?: string;
|
|
275
|
+
staticItems?: Item[];
|
|
276
|
+
sections?: Section[];
|
|
277
|
+
selectedKey?: Key | null;
|
|
278
|
+
defaultSelectedKey?: Key | null;
|
|
279
|
+
onSelectionChange?: (key: Key | null) => void;
|
|
280
|
+
requestConfig?: AutocompleteRequestConfig;
|
|
281
|
+
defaultFilter?: (textValue: string, inputValue: string) => boolean;
|
|
282
|
+
placeholder?: string;
|
|
283
|
+
renderItem?: (item: Item) => React__default.ReactNode;
|
|
284
|
+
renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
|
|
285
|
+
renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
|
|
286
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
287
|
+
description?: string;
|
|
288
|
+
size?: Size;
|
|
289
|
+
tooltip?: string;
|
|
290
|
+
isRequired?: boolean;
|
|
291
|
+
isDisabled?: boolean;
|
|
292
|
+
isInvalid?: boolean;
|
|
293
|
+
validationResult?: ValidationResult;
|
|
294
|
+
showErrors?: boolean;
|
|
295
|
+
autoFocus?: boolean;
|
|
296
|
+
}
|
|
297
|
+
declare function Autocomplete({ label, staticItems, sections, selectedKey, defaultSelectedKey, onSelectionChange, requestConfig, defaultFilter, placeholder, errorMessage, description, size, tooltip, isRequired, isDisabled, isInvalid, validationResult, showErrors, renderItem, renderLeftIcon, renderSection, autoFocus, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
interface AvatarProps {
|
|
300
|
+
/**
|
|
301
|
+
* URL of the avatar image
|
|
302
|
+
*/
|
|
303
|
+
src?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Alternative text for the image
|
|
306
|
+
*/
|
|
307
|
+
alt?: string;
|
|
308
|
+
/**
|
|
309
|
+
* First name for generating initials
|
|
310
|
+
*/
|
|
311
|
+
firstName?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Last name for generating initials
|
|
314
|
+
*/
|
|
315
|
+
lastName?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Full name (used as fallback for alt text)
|
|
318
|
+
*/
|
|
319
|
+
fullName?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Click handler
|
|
322
|
+
*/
|
|
323
|
+
onClick?: () => void;
|
|
324
|
+
/**
|
|
325
|
+
* Size of the avatar
|
|
326
|
+
* @default "md"
|
|
327
|
+
*/
|
|
328
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
329
|
+
/**
|
|
330
|
+
* Shape of the avatar
|
|
331
|
+
* @default "circle"
|
|
332
|
+
*/
|
|
333
|
+
shape?: "circle" | "square";
|
|
334
|
+
/**
|
|
335
|
+
* Visual variant
|
|
336
|
+
* @default "user"
|
|
337
|
+
*/
|
|
338
|
+
variant?: "user" | "team" | "organization";
|
|
339
|
+
/**
|
|
340
|
+
* Additional CSS classes
|
|
341
|
+
*/
|
|
342
|
+
className?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Status indicator
|
|
345
|
+
*/
|
|
346
|
+
status?: "online" | "offline" | "away" | "busy";
|
|
347
|
+
/**
|
|
348
|
+
* Whether to show a border
|
|
349
|
+
* @default false
|
|
350
|
+
*/
|
|
351
|
+
bordered?: boolean;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Avatar
|
|
355
|
+
*
|
|
356
|
+
* Display user, team, or organization avatars with support for images,
|
|
357
|
+
* initials, and fallback icons. Includes optional status indicators.
|
|
358
|
+
*/
|
|
359
|
+
declare function Avatar({ src, alt, firstName, lastName, fullName, onClick, size, shape, variant, className, status, bordered, }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
360
|
+
|
|
361
|
+
interface BadgeProps {
|
|
362
|
+
/** The content to display inside the badge */
|
|
363
|
+
children: React__default.ReactNode;
|
|
364
|
+
/** Visual variant of the badge */
|
|
365
|
+
variant?: "default" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "neutral";
|
|
366
|
+
/** Size of the badge */
|
|
367
|
+
size?: "sm" | "md" | "lg";
|
|
368
|
+
/** Shape of the badge */
|
|
369
|
+
shape?: "pill" | "rounded" | "square";
|
|
370
|
+
/** Whether to show a dot indicator */
|
|
371
|
+
dot?: boolean;
|
|
372
|
+
/** Position of the dot */
|
|
373
|
+
dotPosition?: "left" | "right";
|
|
374
|
+
/** Additional CSS classes */
|
|
375
|
+
className?: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Badge
|
|
379
|
+
*
|
|
380
|
+
* A non-interactive label for displaying status, counts, or categories.
|
|
381
|
+
* Use for read-only indicators. For interactive elements, use Chip instead.
|
|
382
|
+
*/
|
|
383
|
+
declare function Badge({ children, variant, size, shape, dot, dotPosition, className, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Breadcrumbs
|
|
387
|
+
*
|
|
388
|
+
* Navigation breadcrumbs that show the user's current location in the hierarchy
|
|
389
|
+
*/
|
|
390
|
+
declare function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>): react_jsx_runtime.JSX.Element;
|
|
391
|
+
/**
|
|
392
|
+
* Breadcrumb
|
|
393
|
+
*
|
|
394
|
+
* Individual breadcrumb item with optional link
|
|
395
|
+
*/
|
|
396
|
+
declare function Breadcrumb(props: BreadcrumbProps & {
|
|
397
|
+
href?: string;
|
|
398
|
+
}): react_jsx_runtime.JSX.Element;
|
|
399
|
+
|
|
222
400
|
type IconName$1 = ComponentProps<typeof Icon>["name"];
|
|
223
401
|
type BaseButtonProps = Omit<ButtonProps$1, "className">;
|
|
224
402
|
/**
|
|
@@ -320,6 +498,88 @@ interface ChipProps {
|
|
|
320
498
|
*/
|
|
321
499
|
declare function Chip({ children, onRemove, size, variant, isRemovable, isDisabled, className, onClick, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
322
500
|
|
|
501
|
+
type CodeLanguage = "json" | "javascript" | "typescript" | "html" | "css" | "markdown" | "yaml" | "xml" | "python" | "sql";
|
|
502
|
+
type CodeTheme = "github" | "github_dark";
|
|
503
|
+
interface CodeEditorProps {
|
|
504
|
+
/**
|
|
505
|
+
* The code content to display
|
|
506
|
+
*/
|
|
507
|
+
value: string;
|
|
508
|
+
/**
|
|
509
|
+
* Whether the editor is read-only
|
|
510
|
+
*/
|
|
511
|
+
readOnly?: boolean;
|
|
512
|
+
/**
|
|
513
|
+
* Callback when the content changes
|
|
514
|
+
*/
|
|
515
|
+
onChange?: (value: string) => void;
|
|
516
|
+
/**
|
|
517
|
+
* The programming language mode
|
|
518
|
+
* @default "json"
|
|
519
|
+
*/
|
|
520
|
+
language?: CodeLanguage;
|
|
521
|
+
/**
|
|
522
|
+
* The editor theme
|
|
523
|
+
* @default "github_dark"
|
|
524
|
+
*/
|
|
525
|
+
theme?: CodeTheme;
|
|
526
|
+
/**
|
|
527
|
+
* The height of the editor. If not provided, height will be calculated based on content.
|
|
528
|
+
*/
|
|
529
|
+
height?: string;
|
|
530
|
+
/**
|
|
531
|
+
* The width of the editor
|
|
532
|
+
* @default "100%"
|
|
533
|
+
*/
|
|
534
|
+
width?: string;
|
|
535
|
+
/**
|
|
536
|
+
* Additional className to apply
|
|
537
|
+
*/
|
|
538
|
+
className?: string;
|
|
539
|
+
/**
|
|
540
|
+
* Line height in pixels for auto-height calculation
|
|
541
|
+
* @default 19
|
|
542
|
+
*/
|
|
543
|
+
lineHeight?: number;
|
|
544
|
+
/**
|
|
545
|
+
* Minimum number of lines to show when auto-sizing
|
|
546
|
+
* @default 3
|
|
547
|
+
*/
|
|
548
|
+
minLines?: number;
|
|
549
|
+
/**
|
|
550
|
+
* Maximum number of lines to show when auto-sizing
|
|
551
|
+
* @default 50
|
|
552
|
+
*/
|
|
553
|
+
maxLines?: number;
|
|
554
|
+
/**
|
|
555
|
+
* Whether to show line numbers
|
|
556
|
+
* @default true
|
|
557
|
+
*/
|
|
558
|
+
showLineNumbers?: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* Whether to show the gutter
|
|
561
|
+
* @default true
|
|
562
|
+
*/
|
|
563
|
+
showGutter?: boolean;
|
|
564
|
+
/**
|
|
565
|
+
* Font size for the editor
|
|
566
|
+
* @default 14
|
|
567
|
+
*/
|
|
568
|
+
fontSize?: number;
|
|
569
|
+
/**
|
|
570
|
+
* Whether to wrap long lines
|
|
571
|
+
* @default false
|
|
572
|
+
*/
|
|
573
|
+
wrapEnabled?: boolean;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* CodeEditor
|
|
577
|
+
*
|
|
578
|
+
* A code editor component with syntax highlighting and various language support.
|
|
579
|
+
* Built on top of Ace Editor.
|
|
580
|
+
*/
|
|
581
|
+
declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
582
|
+
|
|
323
583
|
interface CopyToClipboardProps {
|
|
324
584
|
/**
|
|
325
585
|
* The value to copy to clipboard. If not provided, will use the text content of children
|
|
@@ -340,17 +600,393 @@ interface CopyToClipboardProps {
|
|
|
340
600
|
}
|
|
341
601
|
declare function CopyToClipboard({ value, children, className, size }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
342
602
|
|
|
603
|
+
type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
|
|
604
|
+
interface TooltipData {
|
|
605
|
+
xValue: Date;
|
|
606
|
+
series: TooltipSeries[];
|
|
607
|
+
x: number;
|
|
608
|
+
y: number;
|
|
609
|
+
position: "left" | "right";
|
|
610
|
+
}
|
|
611
|
+
interface TooltipSeries {
|
|
612
|
+
label: string;
|
|
613
|
+
value: number;
|
|
614
|
+
color: string;
|
|
615
|
+
type?: "area" | "line" | "bar";
|
|
616
|
+
}
|
|
617
|
+
interface ChartContextType {
|
|
618
|
+
xScale: ScaleTime<number, number>;
|
|
619
|
+
yScale: ScaleLinear<number, number>;
|
|
620
|
+
width: number;
|
|
621
|
+
height: number;
|
|
622
|
+
yFormatType: YFormatType;
|
|
623
|
+
animationSettings: {
|
|
624
|
+
duration: number;
|
|
625
|
+
ease: string;
|
|
626
|
+
};
|
|
627
|
+
tooltip: {
|
|
628
|
+
data: TooltipData | null;
|
|
629
|
+
show: (data: TooltipData) => void;
|
|
630
|
+
hide: () => void;
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
634
|
+
|
|
635
|
+
declare const useChartContext: () => ChartContextType;
|
|
636
|
+
|
|
637
|
+
interface BaseDataPoint {
|
|
638
|
+
xValue: Date;
|
|
639
|
+
yValue: number;
|
|
640
|
+
category?: string;
|
|
641
|
+
}
|
|
642
|
+
interface ChartMargin {
|
|
643
|
+
top: number;
|
|
644
|
+
right: number;
|
|
645
|
+
bottom: number;
|
|
646
|
+
left: number;
|
|
647
|
+
}
|
|
648
|
+
declare const defaultMargin: ChartMargin;
|
|
649
|
+
interface YFormatSettings {
|
|
650
|
+
format: (value: number) => string;
|
|
651
|
+
min?: number;
|
|
652
|
+
max?: number;
|
|
653
|
+
tickInterval?: number;
|
|
654
|
+
tickFormat?: (value: number) => string;
|
|
655
|
+
}
|
|
656
|
+
declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
|
|
657
|
+
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
658
|
+
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
659
|
+
|
|
660
|
+
interface AreaSeriesProps {
|
|
661
|
+
data: BaseDataPoint[];
|
|
662
|
+
color?: string;
|
|
663
|
+
label?: string;
|
|
664
|
+
categoryColors?: Record<string, string>;
|
|
665
|
+
}
|
|
666
|
+
declare const AreaSeries: React__default.FC<AreaSeriesProps>;
|
|
667
|
+
|
|
668
|
+
interface BarSeriesProps {
|
|
669
|
+
data: BaseDataPoint[];
|
|
670
|
+
color?: string;
|
|
671
|
+
label?: string;
|
|
672
|
+
opacity?: number;
|
|
673
|
+
categoryColors?: Record<string, string>;
|
|
674
|
+
}
|
|
675
|
+
declare const BarSeries: React__default.FC<BarSeriesProps>;
|
|
676
|
+
|
|
677
|
+
interface AxisBottomProps {
|
|
678
|
+
top: number;
|
|
679
|
+
scale: ScaleTime<number, number>;
|
|
680
|
+
width: number;
|
|
681
|
+
}
|
|
682
|
+
interface AxisLeftProps {
|
|
683
|
+
left: number;
|
|
684
|
+
scale: ScaleLinear<number, number>;
|
|
685
|
+
yFormatType: YFormatType;
|
|
686
|
+
}
|
|
687
|
+
declare const ChartAxis: {
|
|
688
|
+
Bottom: React__default.FC<AxisBottomProps>;
|
|
689
|
+
Left: React__default.FC<AxisLeftProps>;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Chart export utilities for CSV, SVG, and PNG formats
|
|
694
|
+
* Provides comprehensive export functionality for chart visualizations
|
|
695
|
+
*/
|
|
696
|
+
|
|
697
|
+
type ExportType = "csv" | "svg" | "png";
|
|
698
|
+
interface ChartExportMetadata {
|
|
699
|
+
xLabel?: string;
|
|
700
|
+
yLabel?: string;
|
|
701
|
+
seriesLabels?: string[];
|
|
702
|
+
filename?: string;
|
|
703
|
+
timestamp?: boolean;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Main export function that handles all export types
|
|
707
|
+
*/
|
|
708
|
+
declare function exportChart(type: ExportType, datasets: BaseDataPoint[][] | BaseDataPoint[], metadata: ChartExportMetadata | undefined, svgRef: React__default.RefObject<SVGSVGElement>): Promise<void>;
|
|
709
|
+
/**
|
|
710
|
+
* Utility to check if export is supported in the current environment
|
|
711
|
+
*/
|
|
712
|
+
declare function isExportSupported(type: ExportType): boolean;
|
|
713
|
+
/**
|
|
714
|
+
* Get human-readable export format name
|
|
715
|
+
*/
|
|
716
|
+
declare function getExportFormatName(type: ExportType): string;
|
|
717
|
+
|
|
718
|
+
interface LegendItem {
|
|
719
|
+
category: string;
|
|
720
|
+
fill: string;
|
|
721
|
+
}
|
|
722
|
+
interface ChartBottomBarProps {
|
|
723
|
+
items: LegendItem[];
|
|
724
|
+
onExport: (type: ExportType) => void | Promise<void>;
|
|
725
|
+
}
|
|
726
|
+
declare const ChartBottomBar: React__default.FC<ChartBottomBarProps>;
|
|
727
|
+
|
|
728
|
+
interface ChartContainerProps {
|
|
729
|
+
children: React__default.ReactNode;
|
|
730
|
+
parentWidth: number;
|
|
731
|
+
parentHeight: number;
|
|
732
|
+
yFormatType?: YFormatType;
|
|
733
|
+
isLoading?: boolean;
|
|
734
|
+
}
|
|
735
|
+
declare const ChartContainer: React__default.FC<Omit<ChartContainerProps, "parentWidth" | "parentHeight">>;
|
|
736
|
+
|
|
737
|
+
interface ChartTooltipProps {
|
|
738
|
+
data: TooltipData | null;
|
|
739
|
+
formatType: YFormatType;
|
|
740
|
+
}
|
|
741
|
+
declare const ChartTooltip: React__default.FC<ChartTooltipProps>;
|
|
742
|
+
|
|
743
|
+
interface LineSeriesProps {
|
|
744
|
+
data: BaseDataPoint[];
|
|
745
|
+
color?: string;
|
|
746
|
+
label?: string;
|
|
747
|
+
strokeWidth?: number;
|
|
748
|
+
/** CSS stroke-dasharray value (e.g. "4 2" for dotted, "8 4" for dashed) */
|
|
749
|
+
strokeDasharray?: string;
|
|
750
|
+
categoryColors?: Record<string, string>;
|
|
751
|
+
}
|
|
752
|
+
declare const LineSeries: React__default.FC<LineSeriesProps>;
|
|
753
|
+
|
|
754
|
+
type SortDirection = "asc" | "desc";
|
|
755
|
+
type CellAlignment = "left" | "center" | "right";
|
|
756
|
+
type TableDensity = "compact" | "default" | "relaxed";
|
|
757
|
+
type CellEmphasis = "high" | "normal" | "low";
|
|
758
|
+
type LinkBehavior = "none" | "hover" | "visible";
|
|
759
|
+
type TableLayout = "auto" | "fixed" | "responsive";
|
|
760
|
+
type TableWidth = "full" | "auto" | "contained";
|
|
761
|
+
type MobileRenderer = "auto" | "cards" | "custom" | "none";
|
|
762
|
+
type MobileBreakpoint = "sm" | "md" | "lg" | "xl";
|
|
763
|
+
interface SortConfig {
|
|
764
|
+
columnId: string;
|
|
765
|
+
direction: SortDirection;
|
|
766
|
+
}
|
|
767
|
+
interface CellContext {
|
|
768
|
+
isLoading: boolean;
|
|
769
|
+
isSelected?: boolean;
|
|
770
|
+
isHovered?: boolean;
|
|
771
|
+
rowIndex: number;
|
|
772
|
+
columnIndex: number;
|
|
773
|
+
density: TableDensity;
|
|
774
|
+
}
|
|
775
|
+
interface CellComponentProps<T = any> {
|
|
776
|
+
value: any;
|
|
777
|
+
row: T;
|
|
778
|
+
context: CellContext;
|
|
779
|
+
[key: string]: any;
|
|
780
|
+
}
|
|
781
|
+
type CellComponent<T = any> = ComponentType<CellComponentProps<T>>;
|
|
782
|
+
interface MobileConfig {
|
|
783
|
+
priority?: 1 | 2 | 3;
|
|
784
|
+
format?: "primary" | "secondary" | "badge" | "inline";
|
|
785
|
+
label?: boolean;
|
|
786
|
+
icon?: string;
|
|
787
|
+
}
|
|
788
|
+
interface Column<T> {
|
|
789
|
+
id: string;
|
|
790
|
+
label: string;
|
|
791
|
+
accessor?: keyof T | ((row: T) => any);
|
|
792
|
+
align?: CellAlignment;
|
|
793
|
+
width?: string | number;
|
|
794
|
+
minWidth?: string | number;
|
|
795
|
+
maxWidth?: string | number;
|
|
796
|
+
flex?: number;
|
|
797
|
+
cell?: CellComponent<T>;
|
|
798
|
+
cellProps?: Record<string, any> | ((value: any, row: T) => Record<string, any>);
|
|
799
|
+
render?: (value: any, row: T, context: CellContext) => ReactNode;
|
|
800
|
+
sortable?: boolean;
|
|
801
|
+
mobile?: MobileConfig | false;
|
|
802
|
+
}
|
|
803
|
+
interface DataTableProps<T> {
|
|
804
|
+
columns: Column<T>[];
|
|
805
|
+
data: T[];
|
|
806
|
+
className?: string;
|
|
807
|
+
density?: TableDensity;
|
|
808
|
+
width?: TableWidth;
|
|
809
|
+
height?: string | number;
|
|
810
|
+
maxHeight?: string | number;
|
|
811
|
+
layout?: TableLayout;
|
|
812
|
+
mobileRenderer?: MobileRenderer;
|
|
813
|
+
customMobileRowRender?: (row: T, index: number) => ReactNode;
|
|
814
|
+
mobileBreakpoint?: MobileBreakpoint;
|
|
815
|
+
isLoading?: boolean;
|
|
816
|
+
loadingRowCount?: number;
|
|
817
|
+
stickyHeader?: boolean;
|
|
818
|
+
onRowClick?: (row: T) => void;
|
|
819
|
+
getRowId?: (row: T) => string;
|
|
820
|
+
hideHeader?: boolean;
|
|
821
|
+
onSort?: (sortConfig: SortConfig | null) => void;
|
|
822
|
+
"aria-label"?: string;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
interface Action<T = any> {
|
|
826
|
+
id: string;
|
|
827
|
+
label?: string;
|
|
828
|
+
icon?: IconName$2;
|
|
829
|
+
onClick: (row: T) => void;
|
|
830
|
+
disabled?: boolean | ((row: T) => boolean);
|
|
831
|
+
hidden?: boolean | ((row: T) => boolean);
|
|
832
|
+
variant?: "primary" | "secondary" | "icon";
|
|
833
|
+
}
|
|
834
|
+
interface ActionCellProps<T = any> extends CellComponentProps<T> {
|
|
835
|
+
actions: Action<T>[];
|
|
836
|
+
align?: "left" | "center" | "right";
|
|
837
|
+
size?: "sm" | "md" | "lg";
|
|
838
|
+
}
|
|
839
|
+
declare function ActionCell<T = any>({ row, context, actions, align, size, }: ActionCellProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
840
|
+
|
|
841
|
+
interface BooleanCellProps<T = any> extends CellComponentProps<T> {
|
|
842
|
+
format?: "icon" | "text" | "badge";
|
|
843
|
+
trueText?: string;
|
|
844
|
+
falseText?: string;
|
|
845
|
+
trueIcon?: IconName$2;
|
|
846
|
+
falseIcon?: IconName$2;
|
|
847
|
+
showFalse?: boolean;
|
|
848
|
+
align?: "left" | "center" | "right";
|
|
849
|
+
emphasis?: CellEmphasis;
|
|
850
|
+
}
|
|
851
|
+
declare function BooleanCell<T = any>({ value, context, format, trueText, falseText, trueIcon, falseIcon, showFalse, align, emphasis, }: BooleanCellProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Get alignment classes for cell content
|
|
855
|
+
*/
|
|
856
|
+
declare function getCellAlignmentClasses(align?: CellAlignment): string;
|
|
857
|
+
/**
|
|
858
|
+
* Get text styling based on emphasis level
|
|
859
|
+
*/
|
|
860
|
+
declare function getCellTextClasses(emphasis?: CellEmphasis, isLink?: boolean): string;
|
|
861
|
+
/**
|
|
862
|
+
* Get container classes for cells
|
|
863
|
+
*/
|
|
864
|
+
declare function getCellContainerClasses(align?: CellAlignment, additionalClasses?: string): string;
|
|
865
|
+
/**
|
|
866
|
+
* Format empty/null values consistently
|
|
867
|
+
*/
|
|
868
|
+
declare function formatEmptyValue(value: unknown, emptyText?: string): string;
|
|
869
|
+
/**
|
|
870
|
+
* Common loading skeleton sizes
|
|
871
|
+
*/
|
|
872
|
+
declare const SKELETON_SIZES: {
|
|
873
|
+
readonly xs: "h-4 w-12";
|
|
874
|
+
readonly sm: "h-4 w-20";
|
|
875
|
+
readonly md: "h-4 w-24";
|
|
876
|
+
readonly lg: "h-4 w-32";
|
|
877
|
+
readonly xl: "h-4 w-40";
|
|
878
|
+
};
|
|
879
|
+
/**
|
|
880
|
+
* Get skeleton size based on emphasis level
|
|
881
|
+
*/
|
|
882
|
+
declare function getSkeletonSize(emphasis?: CellEmphasis): string;
|
|
883
|
+
/**
|
|
884
|
+
* Resolve a value that can be either static or dynamic (function)
|
|
885
|
+
*/
|
|
886
|
+
declare function resolveValue<T, R>(value: R | ((row: T) => R), row: T): R;
|
|
887
|
+
/**
|
|
888
|
+
* Common badge/chip styles for status indicators
|
|
889
|
+
*/
|
|
890
|
+
declare function getBadgeClasses(variant?: "success" | "error" | "warning" | "info" | "neutral", size?: "sm" | "md"): string;
|
|
891
|
+
/**
|
|
892
|
+
* Determine badge variant from boolean value
|
|
893
|
+
*/
|
|
894
|
+
declare function getBooleanBadgeVariant(value: boolean): "success" | "neutral";
|
|
895
|
+
/**
|
|
896
|
+
* Get color classes for numeric values
|
|
897
|
+
*/
|
|
898
|
+
declare function getNumericColorClasses(value: number, colorCode?: boolean): string;
|
|
899
|
+
|
|
900
|
+
interface DateCellProps<T = any> extends CellComponentProps<T> {
|
|
901
|
+
format?: "date" | "time" | "datetime" | "relative" | "custom";
|
|
902
|
+
customFormat?: Intl.DateTimeFormatOptions;
|
|
903
|
+
emptyText?: string;
|
|
904
|
+
align?: "left" | "center" | "right";
|
|
905
|
+
emphasis?: CellEmphasis;
|
|
906
|
+
href?: string | ((row: T) => string);
|
|
907
|
+
linkBehavior?: LinkBehavior;
|
|
908
|
+
}
|
|
909
|
+
declare function DateCell<T = any>({ value, row, context, format, customFormat, emptyText, align, emphasis, href, linkBehavior, }: DateCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
910
|
+
|
|
911
|
+
interface NumberCellProps<T = any> extends CellComponentProps<T> {
|
|
912
|
+
format?: "number" | "currency" | "percent" | "compact";
|
|
913
|
+
decimals?: number;
|
|
914
|
+
prefix?: string;
|
|
915
|
+
suffix?: string;
|
|
916
|
+
emptyText?: string;
|
|
917
|
+
align?: "left" | "center" | "right";
|
|
918
|
+
emphasis?: CellEmphasis;
|
|
919
|
+
href?: string | ((row: T) => string);
|
|
920
|
+
linkBehavior?: LinkBehavior;
|
|
921
|
+
showPositiveSign?: boolean;
|
|
922
|
+
colorCode?: boolean;
|
|
923
|
+
}
|
|
924
|
+
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;
|
|
925
|
+
|
|
926
|
+
interface SelectCellProps<T = any> extends CellComponentProps<T> {
|
|
927
|
+
isSelected?: boolean;
|
|
928
|
+
onSelect?: (row: T, checked: boolean) => void;
|
|
929
|
+
isDisabled?: boolean | ((row: T) => boolean);
|
|
930
|
+
align?: "left" | "center" | "right";
|
|
931
|
+
}
|
|
932
|
+
declare function SelectCell<T = any>({ row, context, isSelected, onSelect, isDisabled, align, }: SelectCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
933
|
+
|
|
934
|
+
interface TextCellProps<T = any> extends CellComponentProps<T> {
|
|
935
|
+
prefix?: string;
|
|
936
|
+
suffix?: string;
|
|
937
|
+
emptyText?: string;
|
|
938
|
+
href?: string | ((row: T) => string);
|
|
939
|
+
linkBehavior?: LinkBehavior;
|
|
940
|
+
emphasis?: CellEmphasis;
|
|
941
|
+
truncate?: boolean;
|
|
942
|
+
align?: "left" | "center" | "right";
|
|
943
|
+
}
|
|
944
|
+
declare function TextCell<T = any>({ value, row, context, prefix, suffix, emptyText, href, linkBehavior, emphasis, truncate, align, }: TextCellProps<T>): react_jsx_runtime.JSX.Element;
|
|
945
|
+
|
|
946
|
+
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;
|
|
947
|
+
|
|
948
|
+
interface MobileRowProps<T> {
|
|
949
|
+
row: T;
|
|
950
|
+
columns: Column<T>[];
|
|
951
|
+
density: "compact" | "default" | "relaxed";
|
|
952
|
+
isLoading?: boolean;
|
|
953
|
+
onClick?: () => void;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Automatic mobile card renderer
|
|
957
|
+
* Groups columns by priority and formats them appropriately
|
|
958
|
+
*/
|
|
959
|
+
declare function AutoMobileRenderer<T>({ row, columns, density, isLoading, onClick, }: MobileRowProps<T>): react_jsx_runtime.JSX.Element;
|
|
960
|
+
/**
|
|
961
|
+
* Simple card renderer - displays all columns in a simple stacked layout
|
|
962
|
+
*/
|
|
963
|
+
declare function CardMobileRenderer<T>({ row, columns, density, isLoading, onClick, }: MobileRowProps<T>): react_jsx_runtime.JSX.Element;
|
|
964
|
+
|
|
343
965
|
/**
|
|
344
966
|
* DateField
|
|
345
967
|
*
|
|
346
|
-
* Segmented date input with
|
|
968
|
+
* Segmented date input with optional calendar popup.
|
|
347
969
|
*/
|
|
348
970
|
interface DateFieldProps<T extends DateValue> extends DateFieldProps$1<T> {
|
|
971
|
+
/**
|
|
972
|
+
* Label for the date field
|
|
973
|
+
*/
|
|
349
974
|
label?: string;
|
|
975
|
+
/**
|
|
976
|
+
* Description text to show below the field
|
|
977
|
+
*/
|
|
350
978
|
description?: string;
|
|
979
|
+
/**
|
|
980
|
+
* Error message to display
|
|
981
|
+
*/
|
|
351
982
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
983
|
+
/**
|
|
984
|
+
* Whether to show a calendar button for date selection
|
|
985
|
+
* @default false
|
|
986
|
+
*/
|
|
987
|
+
showCalendar?: boolean;
|
|
352
988
|
}
|
|
353
|
-
declare function DateField<T extends DateValue>({ label, description, errorMessage, ...props }: DateFieldProps<T>): react_jsx_runtime.JSX.Element;
|
|
989
|
+
declare function DateField<T extends DateValue>({ label, description, errorMessage, showCalendar, ...props }: DateFieldProps<T>): react_jsx_runtime.JSX.Element;
|
|
354
990
|
|
|
355
991
|
/**
|
|
356
992
|
* DateRangePicker
|
|
@@ -512,7 +1148,7 @@ declare function useInputFocus(): {
|
|
|
512
1148
|
/**
|
|
513
1149
|
* Wrapper component for input containers
|
|
514
1150
|
*/
|
|
515
|
-
declare function InputWrapper({ children, className }: {
|
|
1151
|
+
declare function InputWrapper({ children, className, }: {
|
|
516
1152
|
children: React__default.ReactNode;
|
|
517
1153
|
className?: string;
|
|
518
1154
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -593,7 +1229,7 @@ declare function getFieldGroupStyles(props: FieldGroupProps): string;
|
|
|
593
1229
|
* </Label>
|
|
594
1230
|
* ```
|
|
595
1231
|
*/
|
|
596
|
-
declare function Label({ children, size, tooltip, isRequired, className, htmlFor }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
1232
|
+
declare function Label({ children, size, tooltip, isRequired, className, htmlFor, }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
597
1233
|
/**
|
|
598
1234
|
* Description component for providing additional context about a form field.
|
|
599
1235
|
*
|
|
@@ -629,18 +1265,68 @@ declare function FieldError({ children, size, className }: FieldErrorProps): rea
|
|
|
629
1265
|
*/
|
|
630
1266
|
declare function Input({ size, isInvalid, isDisabled, isFocused, transparent, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
631
1267
|
/**
|
|
632
|
-
* Container for grouping form elements with consistent styling.
|
|
633
|
-
* Useful for creating compound components like input with buttons.
|
|
1268
|
+
* Container for grouping form elements with consistent styling.
|
|
1269
|
+
* Useful for creating compound components like input with buttons.
|
|
1270
|
+
*
|
|
1271
|
+
* @example
|
|
1272
|
+
* ```tsx
|
|
1273
|
+
* <FieldGroup>
|
|
1274
|
+
* <Input placeholder="Search..." />
|
|
1275
|
+
* <Button>Search</Button>
|
|
1276
|
+
* </FieldGroup>
|
|
1277
|
+
* ```
|
|
1278
|
+
*/
|
|
1279
|
+
declare function FieldGroup(props: FieldGroupProps): react_jsx_runtime.JSX.Element;
|
|
1280
|
+
|
|
1281
|
+
interface FileUploadProps {
|
|
1282
|
+
/**
|
|
1283
|
+
* Current file URL or preview
|
|
1284
|
+
*/
|
|
1285
|
+
value?: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* Callback when file is selected
|
|
1288
|
+
*/
|
|
1289
|
+
onChange?: (file: File | null, url?: string) => void;
|
|
1290
|
+
/**
|
|
1291
|
+
* Callback when file URL changes (for external upload handlers)
|
|
1292
|
+
*/
|
|
1293
|
+
onUrlChange?: (url: string) => void;
|
|
1294
|
+
/**
|
|
1295
|
+
* Accepted file types
|
|
1296
|
+
*/
|
|
1297
|
+
accept?: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* Maximum file size in bytes
|
|
1300
|
+
*/
|
|
1301
|
+
maxSize?: number;
|
|
1302
|
+
/**
|
|
1303
|
+
* Whether the component is disabled
|
|
1304
|
+
*/
|
|
1305
|
+
isDisabled?: boolean;
|
|
1306
|
+
/**
|
|
1307
|
+
* Custom upload handler (e.g., for cloud storage)
|
|
1308
|
+
*/
|
|
1309
|
+
onUpload?: (file: File) => Promise<string>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Additional CSS classes
|
|
1312
|
+
*/
|
|
1313
|
+
className?: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Show image preview for image files
|
|
1316
|
+
*/
|
|
1317
|
+
showPreview?: boolean;
|
|
1318
|
+
/**
|
|
1319
|
+
* Placeholder text
|
|
1320
|
+
*/
|
|
1321
|
+
placeholder?: string;
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* FileUpload
|
|
634
1325
|
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
* <FieldGroup>
|
|
638
|
-
* <Input placeholder="Search..." />
|
|
639
|
-
* <Button>Search</Button>
|
|
640
|
-
* </FieldGroup>
|
|
641
|
-
* ```
|
|
1326
|
+
* A file upload component with drag-and-drop support.
|
|
1327
|
+
* Supports image preview, custom upload handlers, and file validation.
|
|
642
1328
|
*/
|
|
643
|
-
declare function
|
|
1329
|
+
declare function FileUpload({ value, onChange, onUrlChange, accept, maxSize, isDisabled, onUpload, className, showPreview, placeholder, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
644
1330
|
|
|
645
1331
|
/**
|
|
646
1332
|
* Form
|
|
@@ -673,7 +1359,7 @@ interface HeadingProps {
|
|
|
673
1359
|
className?: string;
|
|
674
1360
|
children?: React__default.ReactNode;
|
|
675
1361
|
}
|
|
676
|
-
declare function Heading({ tag: Tag, size, height, className, children }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
1362
|
+
declare function Heading({ tag: Tag, size, height, className, children, }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
677
1363
|
|
|
678
1364
|
/**
|
|
679
1365
|
* ListBox
|
|
@@ -721,6 +1407,263 @@ interface LogoProps {
|
|
|
721
1407
|
}
|
|
722
1408
|
declare const Logo: ({ className, showWordmark }: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
723
1409
|
|
|
1410
|
+
declare const MAPBOX_THEMES: {
|
|
1411
|
+
dark: string;
|
|
1412
|
+
light: string;
|
|
1413
|
+
streets: string;
|
|
1414
|
+
satellite: string;
|
|
1415
|
+
};
|
|
1416
|
+
interface StaticMapProps {
|
|
1417
|
+
/**
|
|
1418
|
+
* Map width
|
|
1419
|
+
* @default "100%"
|
|
1420
|
+
*/
|
|
1421
|
+
width?: number | string;
|
|
1422
|
+
/**
|
|
1423
|
+
* Map height
|
|
1424
|
+
* @default "100%"
|
|
1425
|
+
*/
|
|
1426
|
+
height?: number | string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Initial viewport configuration
|
|
1429
|
+
*/
|
|
1430
|
+
initialViewState?: {
|
|
1431
|
+
longitude: number;
|
|
1432
|
+
latitude: number;
|
|
1433
|
+
zoom: number;
|
|
1434
|
+
};
|
|
1435
|
+
/**
|
|
1436
|
+
* Show loading skeleton
|
|
1437
|
+
*/
|
|
1438
|
+
isLoading?: boolean;
|
|
1439
|
+
/**
|
|
1440
|
+
* Map theme
|
|
1441
|
+
* @default "streets"
|
|
1442
|
+
*/
|
|
1443
|
+
theme?: keyof typeof MAPBOX_THEMES;
|
|
1444
|
+
/**
|
|
1445
|
+
* Mapbox access token
|
|
1446
|
+
*/
|
|
1447
|
+
mapboxAccessToken?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Show marker at center
|
|
1450
|
+
* @default true
|
|
1451
|
+
*/
|
|
1452
|
+
showMarker?: boolean;
|
|
1453
|
+
/**
|
|
1454
|
+
* Additional CSS classes
|
|
1455
|
+
*/
|
|
1456
|
+
className?: string;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* StaticMap
|
|
1460
|
+
*
|
|
1461
|
+
* A non-interactive map component for displaying a location.
|
|
1462
|
+
* Perfect for showing addresses, store locations, or any single point of interest.
|
|
1463
|
+
*/
|
|
1464
|
+
declare function StaticMap({ width, height, initialViewState, isLoading, theme, mapboxAccessToken, showMarker, className, }: StaticMapProps): react_jsx_runtime.JSX.Element;
|
|
1465
|
+
|
|
1466
|
+
interface MapPoint {
|
|
1467
|
+
id: string;
|
|
1468
|
+
latitude: number;
|
|
1469
|
+
longitude: number;
|
|
1470
|
+
properties?: Record<string, unknown>;
|
|
1471
|
+
}
|
|
1472
|
+
interface InteractiveMapProps {
|
|
1473
|
+
/**
|
|
1474
|
+
* Array of points to display on the map
|
|
1475
|
+
*/
|
|
1476
|
+
data: MapPoint[];
|
|
1477
|
+
/**
|
|
1478
|
+
* Initial viewport configuration
|
|
1479
|
+
*/
|
|
1480
|
+
initialViewState?: ViewState;
|
|
1481
|
+
/**
|
|
1482
|
+
* Controlled viewport state
|
|
1483
|
+
*/
|
|
1484
|
+
viewState?: ViewState;
|
|
1485
|
+
/**
|
|
1486
|
+
* Callback when viewport changes
|
|
1487
|
+
*/
|
|
1488
|
+
onViewStateChange?: (viewState: ViewState) => void;
|
|
1489
|
+
/**
|
|
1490
|
+
* Callback when a point is clicked
|
|
1491
|
+
*/
|
|
1492
|
+
onPointClick?: (pointId: string) => void;
|
|
1493
|
+
/**
|
|
1494
|
+
* Currently selected point ID
|
|
1495
|
+
*/
|
|
1496
|
+
selectedPointId?: string | null;
|
|
1497
|
+
/**
|
|
1498
|
+
* Enable scroll zoom
|
|
1499
|
+
* @default true
|
|
1500
|
+
*/
|
|
1501
|
+
scrollEnabled?: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Additional CSS classes
|
|
1504
|
+
*/
|
|
1505
|
+
className?: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* Map theme
|
|
1508
|
+
* @default "streets"
|
|
1509
|
+
*/
|
|
1510
|
+
theme?: keyof typeof MAPBOX_THEMES;
|
|
1511
|
+
/**
|
|
1512
|
+
* Mapbox access token
|
|
1513
|
+
*/
|
|
1514
|
+
mapboxAccessToken?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Enable clustering for many points
|
|
1517
|
+
* @default true
|
|
1518
|
+
*/
|
|
1519
|
+
enableClustering?: boolean;
|
|
1520
|
+
/**
|
|
1521
|
+
* Custom marker component
|
|
1522
|
+
*/
|
|
1523
|
+
renderMarker?: (point: MapPoint, isSelected: boolean) => React__default.ReactNode;
|
|
1524
|
+
}
|
|
1525
|
+
/**
|
|
1526
|
+
* InteractiveMap
|
|
1527
|
+
*
|
|
1528
|
+
* An interactive map component for displaying multiple locations with clustering support.
|
|
1529
|
+
* Supports point selection, custom markers, and viewport control.
|
|
1530
|
+
*/
|
|
1531
|
+
declare function InteractiveMap({ data, initialViewState, viewState, onViewStateChange, onPointClick, selectedPointId, scrollEnabled, className, theme, mapboxAccessToken, enableClustering, renderMarker, }: InteractiveMapProps): react_jsx_runtime.JSX.Element;
|
|
1532
|
+
|
|
1533
|
+
interface MeterProps extends MeterProps$1 {
|
|
1534
|
+
/** Label displayed above the meter */
|
|
1535
|
+
label?: string;
|
|
1536
|
+
/** Size variant of the meter */
|
|
1537
|
+
size?: "sm" | "md" | "lg";
|
|
1538
|
+
/** Visual variant based on semantic meaning */
|
|
1539
|
+
variant?: "default" | "success" | "warning" | "error" | "info";
|
|
1540
|
+
/** Whether to show warning indicator at high values */
|
|
1541
|
+
showWarningIndicator?: boolean;
|
|
1542
|
+
/** Threshold percentage for showing warning (default: 80) */
|
|
1543
|
+
warningThreshold?: number;
|
|
1544
|
+
/** Additional CSS classes */
|
|
1545
|
+
className?: string;
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Meter
|
|
1549
|
+
*
|
|
1550
|
+
* Displays a measurement within a known range, with visual indicators for different value ranges.
|
|
1551
|
+
* Perfect for showing capacity, usage levels, scores, or any bounded measurement.
|
|
1552
|
+
*/
|
|
1553
|
+
declare function Meter({ label, size, variant, showWarningIndicator, warningThreshold, className, ...props }: MeterProps): react_jsx_runtime.JSX.Element;
|
|
1554
|
+
|
|
1555
|
+
type NoticeVariant = "success" | "error" | "warning" | "info";
|
|
1556
|
+
interface NoticeProps {
|
|
1557
|
+
/** Unique identifier for the notice */
|
|
1558
|
+
id: string;
|
|
1559
|
+
/** The message to display */
|
|
1560
|
+
message: string;
|
|
1561
|
+
/** Visual variant of the notice */
|
|
1562
|
+
variant?: NoticeVariant;
|
|
1563
|
+
/** Duration in milliseconds before auto-dismissal (0 = no auto-dismiss) */
|
|
1564
|
+
duration?: number;
|
|
1565
|
+
/** Whether the notice can be dismissed */
|
|
1566
|
+
dismissible?: boolean;
|
|
1567
|
+
/** Callback when the notice is dismissed */
|
|
1568
|
+
onDismiss?: () => void;
|
|
1569
|
+
/** Additional CSS classes */
|
|
1570
|
+
className?: string;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* Notice
|
|
1574
|
+
*
|
|
1575
|
+
* Individual notification component that displays a message with an icon.
|
|
1576
|
+
* Typically used within a NoticeProvider for managing multiple notifications.
|
|
1577
|
+
*/
|
|
1578
|
+
declare function Notice({ id: _id, message, variant, duration, dismissible, onDismiss, className, }: NoticeProps): react_jsx_runtime.JSX.Element;
|
|
1579
|
+
|
|
1580
|
+
interface NoticeData {
|
|
1581
|
+
id: string;
|
|
1582
|
+
message: string;
|
|
1583
|
+
variant: "success" | "error" | "warning" | "info";
|
|
1584
|
+
duration: number;
|
|
1585
|
+
dismissible: boolean;
|
|
1586
|
+
}
|
|
1587
|
+
interface NoticeContainerProps {
|
|
1588
|
+
/** Array of notices to display */
|
|
1589
|
+
notices: NoticeData[];
|
|
1590
|
+
/** Callback when a notice is dismissed */
|
|
1591
|
+
onDismiss: (id: string) => void;
|
|
1592
|
+
/** Position of the container on the screen */
|
|
1593
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
1594
|
+
/** Additional CSS classes */
|
|
1595
|
+
className?: string;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* NoticeContainer
|
|
1599
|
+
*
|
|
1600
|
+
* Container component that positions and animates notices.
|
|
1601
|
+
* Renders notices in a portal to ensure they appear above other content.
|
|
1602
|
+
*/
|
|
1603
|
+
declare function NoticeContainer({ notices, onDismiss, position, className, }: NoticeContainerProps): React$1.ReactPortal | null;
|
|
1604
|
+
|
|
1605
|
+
interface NoticeProviderProps {
|
|
1606
|
+
/** Child components */
|
|
1607
|
+
children: ReactNode;
|
|
1608
|
+
/** Position of the notice container */
|
|
1609
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
1610
|
+
/** Maximum number of notices to display at once */
|
|
1611
|
+
maxNotices?: number;
|
|
1612
|
+
/** Default duration for notices in milliseconds */
|
|
1613
|
+
defaultDuration?: number;
|
|
1614
|
+
/** Whether notices are dismissible by default */
|
|
1615
|
+
defaultDismissible?: boolean;
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* NoticeProvider
|
|
1619
|
+
*
|
|
1620
|
+
* Provides notice functionality to child components.
|
|
1621
|
+
* Manages the state of all active notices and renders them in a container.
|
|
1622
|
+
*/
|
|
1623
|
+
declare function NoticeProvider({ children, position, maxNotices, defaultDuration, defaultDismissible, }: NoticeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1624
|
+
|
|
1625
|
+
interface NoticeOptions {
|
|
1626
|
+
variant?: NoticeVariant;
|
|
1627
|
+
duration?: number;
|
|
1628
|
+
dismissible?: boolean;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* useNotice
|
|
1632
|
+
*
|
|
1633
|
+
* Hook to display notices from anywhere in the component tree.
|
|
1634
|
+
* Must be used within a NoticeProvider.
|
|
1635
|
+
*
|
|
1636
|
+
* @example
|
|
1637
|
+
* ```tsx
|
|
1638
|
+
* const notice = useNotice();
|
|
1639
|
+
*
|
|
1640
|
+
* // Show different types of notices
|
|
1641
|
+
* notice.success("Settings saved!");
|
|
1642
|
+
* notice.error("Failed to save settings");
|
|
1643
|
+
* notice.warning("Your session will expire soon");
|
|
1644
|
+
* notice.info("New features are available");
|
|
1645
|
+
*
|
|
1646
|
+
* // With custom options
|
|
1647
|
+
* notice.show("Custom notice", {
|
|
1648
|
+
* variant: "success",
|
|
1649
|
+
* duration: 10000,
|
|
1650
|
+
* dismissible: false
|
|
1651
|
+
* });
|
|
1652
|
+
*
|
|
1653
|
+
* // Clear all notices
|
|
1654
|
+
* notice.clear();
|
|
1655
|
+
* ```
|
|
1656
|
+
*/
|
|
1657
|
+
declare function useNotice(): {
|
|
1658
|
+
show: (message: string, options?: NoticeOptions) => string;
|
|
1659
|
+
success: (message: string, options?: Omit<NoticeOptions, "variant">) => string;
|
|
1660
|
+
error: (message: string, options?: Omit<NoticeOptions, "variant">) => string;
|
|
1661
|
+
warning: (message: string, options?: Omit<NoticeOptions, "variant">) => string;
|
|
1662
|
+
info: (message: string, options?: Omit<NoticeOptions, "variant">) => string;
|
|
1663
|
+
dismiss: (id: string) => void;
|
|
1664
|
+
clear: () => void;
|
|
1665
|
+
};
|
|
1666
|
+
|
|
724
1667
|
/**
|
|
725
1668
|
* NumberField
|
|
726
1669
|
*
|
|
@@ -806,6 +1749,21 @@ interface ProgressBarProps extends ProgressBarProps$1 {
|
|
|
806
1749
|
}
|
|
807
1750
|
declare function ProgressBar({ label, rightLabel, progressWidth, hideLabels, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
808
1751
|
|
|
1752
|
+
interface RadioGroupProps extends Omit<RadioGroupProps$1, "children"> {
|
|
1753
|
+
/** Label for the radio group */
|
|
1754
|
+
label?: string;
|
|
1755
|
+
/** Children elements */
|
|
1756
|
+
children?: ReactNode;
|
|
1757
|
+
/** Optional description for the radio group */
|
|
1758
|
+
description?: string;
|
|
1759
|
+
/** Error message to display when validation fails */
|
|
1760
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
1761
|
+
/** Validation result object for functional errorMessage */
|
|
1762
|
+
validationResult?: ValidationResult;
|
|
1763
|
+
}
|
|
1764
|
+
declare function RadioGroup(props: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
1765
|
+
declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
1766
|
+
|
|
809
1767
|
/**
|
|
810
1768
|
* RangeCalendar
|
|
811
1769
|
*
|
|
@@ -816,6 +1774,80 @@ interface RangeCalendarProps<T extends DateValue> extends Omit<RangeCalendarProp
|
|
|
816
1774
|
}
|
|
817
1775
|
declare function RangeCalendar<T extends DateValue>({ errorMessage, ...props }: RangeCalendarProps<T>): react_jsx_runtime.JSX.Element;
|
|
818
1776
|
|
|
1777
|
+
interface RichTextEditorProps {
|
|
1778
|
+
/**
|
|
1779
|
+
* The initial content of the editor
|
|
1780
|
+
*/
|
|
1781
|
+
initialContent?: string;
|
|
1782
|
+
/**
|
|
1783
|
+
* Callback when the content changes
|
|
1784
|
+
*/
|
|
1785
|
+
onChange?: (html: string) => void;
|
|
1786
|
+
/**
|
|
1787
|
+
* Additional className to apply to the editor
|
|
1788
|
+
*/
|
|
1789
|
+
className?: string;
|
|
1790
|
+
/**
|
|
1791
|
+
* Whether the editor is disabled
|
|
1792
|
+
*/
|
|
1793
|
+
isDisabled?: boolean;
|
|
1794
|
+
/**
|
|
1795
|
+
* Placeholder text when editor is empty
|
|
1796
|
+
*/
|
|
1797
|
+
placeholder?: string;
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* RichTextEditor
|
|
1801
|
+
*
|
|
1802
|
+
* A rich text editor with formatting capabilities including headings, bold, italic, lists, and links.
|
|
1803
|
+
* Built on top of TipTap/ProseMirror.
|
|
1804
|
+
*/
|
|
1805
|
+
declare function RichTextEditor({ initialContent, onChange, className, isDisabled, placeholder, }: RichTextEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
1806
|
+
|
|
1807
|
+
type SegmentOption = {
|
|
1808
|
+
id: string;
|
|
1809
|
+
label: string;
|
|
1810
|
+
icon?: IconName$2;
|
|
1811
|
+
};
|
|
1812
|
+
interface SegmentedControlProps {
|
|
1813
|
+
/**
|
|
1814
|
+
* Array of segment options
|
|
1815
|
+
*/
|
|
1816
|
+
options: SegmentOption[];
|
|
1817
|
+
/**
|
|
1818
|
+
* Currently selected value
|
|
1819
|
+
*/
|
|
1820
|
+
value: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* Callback when selection changes
|
|
1823
|
+
*/
|
|
1824
|
+
onChange: (value: string) => void;
|
|
1825
|
+
/**
|
|
1826
|
+
* Size of the control
|
|
1827
|
+
* @default "md"
|
|
1828
|
+
*/
|
|
1829
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
1830
|
+
/**
|
|
1831
|
+
* Additional CSS classes
|
|
1832
|
+
*/
|
|
1833
|
+
className?: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* Whether the control is disabled
|
|
1836
|
+
*/
|
|
1837
|
+
isDisabled?: boolean;
|
|
1838
|
+
/**
|
|
1839
|
+
* Aria label for accessibility
|
|
1840
|
+
*/
|
|
1841
|
+
"aria-label"?: string;
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* SegmentedControl
|
|
1845
|
+
*
|
|
1846
|
+
* A segmented control component for selecting between multiple options.
|
|
1847
|
+
* Similar to a radio group but with a more compact, button-like appearance.
|
|
1848
|
+
*/
|
|
1849
|
+
declare function SegmentedControl({ options, value, onChange, size, className, isDisabled, "aria-label": ariaLabel, }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
1850
|
+
|
|
819
1851
|
/**
|
|
820
1852
|
* Interface defining the shape of items in the Select component
|
|
821
1853
|
*/
|
|
@@ -882,6 +1914,25 @@ interface SkeletonProps {
|
|
|
882
1914
|
}
|
|
883
1915
|
declare const Skeleton: React__default.FC<SkeletonProps>;
|
|
884
1916
|
|
|
1917
|
+
interface SliderProps {
|
|
1918
|
+
label?: string;
|
|
1919
|
+
description?: string;
|
|
1920
|
+
tooltip?: string;
|
|
1921
|
+
errorMessage?: string;
|
|
1922
|
+
size?: Size;
|
|
1923
|
+
className?: string;
|
|
1924
|
+
value?: number;
|
|
1925
|
+
defaultValue?: number;
|
|
1926
|
+
onChange?: (value: number) => void;
|
|
1927
|
+
min?: number;
|
|
1928
|
+
max?: number;
|
|
1929
|
+
step?: number;
|
|
1930
|
+
disabled?: boolean;
|
|
1931
|
+
/** Show the current numeric value to the right of the track */
|
|
1932
|
+
showValue?: boolean;
|
|
1933
|
+
}
|
|
1934
|
+
declare function Slider({ label, description, tooltip, errorMessage, size, className, value, defaultValue, onChange, min, max, step, disabled, showValue, }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
1935
|
+
|
|
885
1936
|
interface SwitchProps extends Omit<SwitchProps$1, "children"> {
|
|
886
1937
|
children: React__default.ReactNode;
|
|
887
1938
|
}
|
|
@@ -915,16 +1966,17 @@ declare function TabPanel(props: TabPanelProps): react_jsx_runtime.JSX.Element;
|
|
|
915
1966
|
*
|
|
916
1967
|
* Multi-line text input with Edges styling, label, description, and error.
|
|
917
1968
|
*/
|
|
918
|
-
interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size">, BaseInputProps {
|
|
1969
|
+
interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "disabled">, BaseInputProps {
|
|
919
1970
|
label?: string;
|
|
920
1971
|
description?: string;
|
|
921
1972
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
922
1973
|
tooltip?: string;
|
|
923
1974
|
size?: Size;
|
|
924
1975
|
isInvalid?: boolean;
|
|
1976
|
+
isDisabled?: boolean;
|
|
925
1977
|
validationResult?: ValidationResult;
|
|
926
1978
|
}
|
|
927
|
-
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
1979
|
+
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, isDisabled, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
928
1980
|
|
|
929
1981
|
interface ChipData {
|
|
930
1982
|
id: string;
|
|
@@ -936,13 +1988,14 @@ interface TriggerInfo {
|
|
|
936
1988
|
position: number;
|
|
937
1989
|
startIndex: number;
|
|
938
1990
|
}
|
|
939
|
-
interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value" | "onChange">, BaseInputProps {
|
|
1991
|
+
interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value" | "onChange" | "disabled">, BaseInputProps {
|
|
940
1992
|
label?: string;
|
|
941
1993
|
description?: string;
|
|
942
1994
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
943
1995
|
tooltip?: string;
|
|
944
1996
|
size?: Size;
|
|
945
1997
|
isInvalid?: boolean;
|
|
1998
|
+
isDisabled?: boolean;
|
|
946
1999
|
validationResult?: ValidationResult;
|
|
947
2000
|
value?: string;
|
|
948
2001
|
onChange?: (value: string) => void;
|
|
@@ -955,7 +2008,7 @@ interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttribu
|
|
|
955
2008
|
chipVariant?: "default" | "primary" | "secondary";
|
|
956
2009
|
chipSize?: Size;
|
|
957
2010
|
}
|
|
958
|
-
declare function TextAreaWithChips({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, value, onChange, chips, onChipsChange, triggerPattern, onTriggerDetected, onTriggerDismissed, renderChip, chipVariant, chipSize, ...props }: TextAreaWithChipsProps): react_jsx_runtime.JSX.Element;
|
|
2011
|
+
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;
|
|
959
2012
|
|
|
960
2013
|
/**
|
|
961
2014
|
* TextField
|
|
@@ -1054,40 +2107,47 @@ interface TooltipProps extends Omit<TooltipProps$1, "children"> {
|
|
|
1054
2107
|
}
|
|
1055
2108
|
declare function Tooltip({ children, content, ...props }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
1056
2109
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
declare
|
|
1090
|
-
|
|
1091
|
-
|
|
2110
|
+
/**
|
|
2111
|
+
* Color utilities for the edges design system
|
|
2112
|
+
* Provides theme-aware color resolution and management
|
|
2113
|
+
*/
|
|
2114
|
+
/**
|
|
2115
|
+
* Resolves a CSS variable to its computed color value
|
|
2116
|
+
* Supports both var(--name) format and plain --name format
|
|
2117
|
+
*
|
|
2118
|
+
* @param variableName - CSS variable name (e.g., "--brand-primary" or "var(--brand-primary)")
|
|
2119
|
+
* @returns Resolved color value or fallback
|
|
2120
|
+
*/
|
|
2121
|
+
declare const getResolvedColor: (variableName: string, fallback?: string) => string;
|
|
2122
|
+
/**
|
|
2123
|
+
* Clears the color cache - useful when theme changes
|
|
2124
|
+
*/
|
|
2125
|
+
declare const clearColorCache: () => void;
|
|
2126
|
+
/**
|
|
2127
|
+
* Gets theme colors from CSS variables
|
|
2128
|
+
* Returns an array of resolved color values
|
|
2129
|
+
*/
|
|
2130
|
+
declare const getThemeCategoricalColors: () => string[];
|
|
2131
|
+
/**
|
|
2132
|
+
* Default color palette matching the edges design system
|
|
2133
|
+
*/
|
|
2134
|
+
declare const getDefaultColors: () => string[];
|
|
2135
|
+
/**
|
|
2136
|
+
* Gets the default chart color from theme
|
|
2137
|
+
*/
|
|
2138
|
+
declare const getDefaultChartColor: () => string;
|
|
2139
|
+
/**
|
|
2140
|
+
* Maps categories to colors based on a color scheme
|
|
2141
|
+
*/
|
|
2142
|
+
declare const createCategoryColorMap: (categories: string[], customColors?: Record<string, string>) => Record<string, string>;
|
|
2143
|
+
/**
|
|
2144
|
+
* Determines if a color is light or dark
|
|
2145
|
+
* Useful for determining text color on colored backgrounds
|
|
2146
|
+
*/
|
|
2147
|
+
declare const isLightColor: (color: string) => boolean;
|
|
2148
|
+
/**
|
|
2149
|
+
* Gets contrasting text color for a background
|
|
2150
|
+
*/
|
|
2151
|
+
declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
1092
2152
|
|
|
1093
|
-
export { Autocomplete, type BaseInputProps, type BaseProps, Button, Calendar, Card, Checkbox, Chip, ClearButton, CopyToClipboard, DateField, DateRangePicker, Description, type DescriptionProps, Dialog, DialogHeader, Drawer, ErrorBoundary, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, Form, Heading, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, Label, type LabelProps, ListBox, ListBoxItem, Loader, Logo, NumberField, PlaceSearch, Popover, ProgressBar, Radio, RadioGroup, RangeCalendar, Select, Skeleton, Slider, Switch, Tab, TabList, TabPanel, Tabs, TextArea, TextAreaWithChips, TextField, TextLink, TimeField, ToggleButton, Tooltip, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, useDebounce, useInputFocus };
|
|
2153
|
+
export { type Action, ActionCell, type ActionCellProps, type ActionItem, ActionMenu, type ActionMenuProps, AreaSeries, AutoMobileRenderer, Autocomplete, Avatar, type AvatarProps, Badge, type BadgeProps, BarSeries, type BaseDataPoint, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, Breadcrumb, Breadcrumbs, Button, Calendar, Card, CardMobileRenderer, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, ChartContext, type ChartExportMetadata, type ChartMargin, ChartTooltip, Checkbox, Chip, ClearButton, CodeEditor, type CodeEditorProps, type CodeLanguage, type CodeTheme, type Column, CopyToClipboard, DataTable, type DataTableProps, DateCell, type DateCellProps, DateField, type DateFieldProps, DateRangePicker, Description, type DescriptionProps, Dialog, DialogHeader, Drawer, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, FileUpload, type FileUploadProps, Form, Heading, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, InteractiveMap, type InteractiveMapProps, Label, type LabelProps, LineSeries, type LinkBehavior, ListBox, ListBoxItem, Loader, Logo, MAPBOX_THEMES, type MapPoint, Meter, type MeterProps, 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, RichTextEditor, type RichTextEditorProps, SKELETON_SIZES, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, type SortDirection, StaticMap, type StaticMapProps, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, TextLink, TimeField, ToggleButton, Tooltip, type TooltipData, type TooltipSeries, type YFormatSettings, type YFormatType, clearColorCache, createCategoryColorMap, createXScale, createYScale, defaultMargin, exportChart, formatEmptyValue, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getContrastingTextColor, getDefaultChartColor, getDefaultColors, getExportFormatName, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getResolvedColor, getSkeletonSize, getThemeCategoricalColors, getYFormatSettings, isExportSupported, isLightColor, resolveValue, useChartContext, useDebounce, useInputFocus, useNotice };
|