@texturehq/edges 1.18.1 → 1.19.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/FileUpload-DXTcfLIh.d.cts +348 -0
- package/dist/FileUpload-DXTcfLIh.d.ts +348 -0
- package/dist/TimeField-B4J8gA8E.d.ts +393 -0
- package/dist/TimeField-D2AOjQ1K.d.cts +393 -0
- package/dist/{colors-Kck1-4Zq.d.cts → colors-BUEmaPXY.d.ts} +4 -122
- package/dist/{colors-Kck1-4Zq.d.ts → colors-BniWNyzj.d.cts} +4 -122
- package/dist/components.manifest.json +13 -9
- package/dist/form/index.cjs +2 -0
- package/dist/form/index.cjs.map +1 -0
- package/dist/form/index.d.cts +3 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.js +2 -0
- package/dist/form/index.js.map +1 -0
- package/dist/generated/tailwind-tokens-dark.css +1 -0
- package/dist/generated/tailwind-tokens-light.css +1 -0
- package/dist/index-DKA9NMRw.d.cts +311 -0
- package/dist/index-DKA9NMRw.d.ts +311 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -794
- package/dist/index.d.ts +24 -794
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +2 -0
- package/dist/rhf/index.cjs.map +1 -0
- package/dist/rhf/index.d.cts +147 -0
- package/dist/rhf/index.d.ts +147 -0
- package/dist/rhf/index.js +2 -0
- package/dist/rhf/index.js.map +1 -0
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -1
- package/dist/server.d.ts +2 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/styles.css +92 -27
- package/dist/utilities.manifest.json +2 -2
- package/package.json +30 -3
- package/scripts/generate-edges-docs.js +43 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default, { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { Key, ValidationResult, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, CheckboxGroupProps as CheckboxGroupProps$1, TextFieldProps as TextFieldProps$1, NumberFieldProps as NumberFieldProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue } from 'react-aria-components';
|
|
4
|
+
import { S as Size, I as Icon, B as BaseInputProps } from './FileUpload-DXTcfLIh.cjs';
|
|
5
|
+
|
|
6
|
+
interface Item {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
interface Section {
|
|
11
|
+
name: string;
|
|
12
|
+
items: Item[];
|
|
13
|
+
}
|
|
14
|
+
type RequestMethod = "GET" | "POST";
|
|
15
|
+
interface BaseRequestConfig {
|
|
16
|
+
url: string;
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
transformResponse: (data: unknown) => Item[];
|
|
19
|
+
}
|
|
20
|
+
interface RestRequestConfig extends BaseRequestConfig {
|
|
21
|
+
requestType: "REST";
|
|
22
|
+
method?: RequestMethod;
|
|
23
|
+
queryKey?: string;
|
|
24
|
+
extraParams?: Record<string, string>;
|
|
25
|
+
shouldLoad?: (filterText: string) => boolean;
|
|
26
|
+
}
|
|
27
|
+
interface GraphQLRequestConfig extends BaseRequestConfig {
|
|
28
|
+
requestType: "GraphQL";
|
|
29
|
+
graphqlQuery: string;
|
|
30
|
+
variableKey?: string;
|
|
31
|
+
responsePath?: string;
|
|
32
|
+
shouldLoad?: (filterText: string) => boolean;
|
|
33
|
+
}
|
|
34
|
+
type AutocompleteRequestConfig = RestRequestConfig | GraphQLRequestConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Autocomplete
|
|
37
|
+
*
|
|
38
|
+
* Text input with typeahead suggestions and keyboard navigation.
|
|
39
|
+
*/
|
|
40
|
+
interface AutocompleteProps {
|
|
41
|
+
label?: string;
|
|
42
|
+
staticItems?: Item[];
|
|
43
|
+
sections?: Section[];
|
|
44
|
+
selectedKey?: Key | null;
|
|
45
|
+
defaultSelectedKey?: Key | null;
|
|
46
|
+
onSelectionChange?: (key: Key | null) => void;
|
|
47
|
+
requestConfig?: AutocompleteRequestConfig;
|
|
48
|
+
defaultFilter?: (textValue: string, inputValue: string) => boolean;
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
renderItem?: (item: Item) => React__default.ReactNode;
|
|
51
|
+
renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
|
|
52
|
+
renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
|
|
53
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
54
|
+
description?: string;
|
|
55
|
+
size?: Size;
|
|
56
|
+
tooltip?: string;
|
|
57
|
+
isRequired?: boolean;
|
|
58
|
+
isDisabled?: boolean;
|
|
59
|
+
isInvalid?: boolean;
|
|
60
|
+
validationResult?: ValidationResult;
|
|
61
|
+
showErrors?: boolean;
|
|
62
|
+
autoFocus?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to reserve space for error messages to prevent layout shift
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
reserveErrorSpace?: boolean;
|
|
68
|
+
}
|
|
69
|
+
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, reserveErrorSpace, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
type IconName = ComponentProps<typeof Icon>["name"];
|
|
72
|
+
type BaseButtonProps = Omit<ButtonProps$1, "className">;
|
|
73
|
+
/**
|
|
74
|
+
* Button
|
|
75
|
+
*
|
|
76
|
+
* A versatile action component that supports multiple visual variants, sizes,
|
|
77
|
+
* optional icons, a loading state, and badge indicators. Follows the Edges
|
|
78
|
+
* design system tokens and composes `react-aria-components` under the hood.
|
|
79
|
+
*
|
|
80
|
+
* Example usage:
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Button variant="brand" size="md" icon="Check">Save</Button>
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
interface ButtonProps extends BaseButtonProps {
|
|
86
|
+
variant?: "default" | "brand" | "secondary" | "destructive" | "icon" | "link" | "unstyled" | "ghost" | "primary";
|
|
87
|
+
size?: Size;
|
|
88
|
+
badgeNumber?: number;
|
|
89
|
+
badgeVariant?: "primary" | "destructive";
|
|
90
|
+
badgePosition?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
91
|
+
fullWidth?: boolean;
|
|
92
|
+
icon?: IconName;
|
|
93
|
+
iconWeight?: "thin" | "light" | "regular" | "bold" | "fill" | "duotone";
|
|
94
|
+
iconPosition?: "left" | "right";
|
|
95
|
+
isLoading?: boolean;
|
|
96
|
+
loadingText?: string;
|
|
97
|
+
loadingIndicator?: React.ReactNode;
|
|
98
|
+
className?: string;
|
|
99
|
+
href?: string;
|
|
100
|
+
target?: string;
|
|
101
|
+
rel?: string;
|
|
102
|
+
style?: React.CSSProperties;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Renders an Edges Button. When `href` is provided, renders a link-styled
|
|
106
|
+
* button using the same visual system.
|
|
107
|
+
*/
|
|
108
|
+
declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* CheckboxGroup
|
|
112
|
+
*
|
|
113
|
+
* Groups multiple checkboxes with shared label/description.
|
|
114
|
+
*/
|
|
115
|
+
interface CheckboxGroupProps extends Omit<CheckboxGroupProps$1, "children"> {
|
|
116
|
+
label?: string;
|
|
117
|
+
children?: ReactNode;
|
|
118
|
+
description?: string;
|
|
119
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Checkbox
|
|
123
|
+
*
|
|
124
|
+
* Single checkbox with Edges visuals.
|
|
125
|
+
*/
|
|
126
|
+
interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
127
|
+
children?: ReactNode | ((props: CheckboxRenderProps) => ReactNode);
|
|
128
|
+
/**
|
|
129
|
+
* Visual variant of the checkbox
|
|
130
|
+
* @default "default"
|
|
131
|
+
*/
|
|
132
|
+
variant?: "default" | "brand";
|
|
133
|
+
}
|
|
134
|
+
declare function CheckboxGroup(props: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* ColorField Props
|
|
139
|
+
*/
|
|
140
|
+
interface ColorFieldProps extends Omit<TextFieldProps$1, "isRequired" | "size" | "className">, BaseInputProps {
|
|
141
|
+
/** Label text displayed above the color field */
|
|
142
|
+
label?: string;
|
|
143
|
+
/** Helper text displayed below the color field */
|
|
144
|
+
description?: string;
|
|
145
|
+
/** Error message or function to generate error message */
|
|
146
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
147
|
+
/** Placeholder text for the input */
|
|
148
|
+
placeholder?: string;
|
|
149
|
+
/** Optional tooltip text to show next to the label */
|
|
150
|
+
tooltip?: string;
|
|
151
|
+
/** Whether the field is required */
|
|
152
|
+
isRequired?: boolean;
|
|
153
|
+
/** Additional CSS classes to apply */
|
|
154
|
+
className?: string;
|
|
155
|
+
/** Validation result object */
|
|
156
|
+
validationResult?: ValidationResult;
|
|
157
|
+
/** The current hex color value (controlled) */
|
|
158
|
+
value?: string;
|
|
159
|
+
/** Default hex color value (uncontrolled) */
|
|
160
|
+
defaultValue?: string;
|
|
161
|
+
/** Callback when the color changes */
|
|
162
|
+
onChange?: (color: string) => void;
|
|
163
|
+
/** Whether to show the color swatch preview */
|
|
164
|
+
showColorSwatch?: boolean;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* ColorField Component
|
|
168
|
+
*
|
|
169
|
+
* A form control that allows users to input hex color codes manually
|
|
170
|
+
* or select colors using a visual color picker. Integrates seamlessly
|
|
171
|
+
* with the Edges design system.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```tsx
|
|
175
|
+
* <ColorField
|
|
176
|
+
* label="Brand Color"
|
|
177
|
+
* value={color}
|
|
178
|
+
* onChange={setColor}
|
|
179
|
+
* description="Choose your primary brand color"
|
|
180
|
+
* />
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
declare function ColorField({ label, description, errorMessage, size, tooltip, isRequired, transparent, className, validationResult, value: controlledValue, defaultValue, onChange, placeholder, showColorSwatch, reserveErrorSpace, ...props }: ColorFieldProps): react_jsx_runtime.JSX.Element;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* NumberField
|
|
187
|
+
*
|
|
188
|
+
* Numeric input with stepper controls and validation.
|
|
189
|
+
*/
|
|
190
|
+
interface NumberFieldProps extends Omit<NumberFieldProps$1, "size" | "className">, BaseInputProps {
|
|
191
|
+
value?: number;
|
|
192
|
+
defaultValue?: number;
|
|
193
|
+
onChange?: (value: number) => void;
|
|
194
|
+
minValue?: number;
|
|
195
|
+
maxValue?: number;
|
|
196
|
+
step?: number;
|
|
197
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
198
|
+
id?: string;
|
|
199
|
+
label?: string;
|
|
200
|
+
description?: string;
|
|
201
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
202
|
+
tooltip?: string;
|
|
203
|
+
isRequired?: boolean;
|
|
204
|
+
className?: string;
|
|
205
|
+
validationResult?: ValidationResult;
|
|
206
|
+
}
|
|
207
|
+
declare function NumberField({ label, description, errorMessage, size, tooltip, isRequired, transparent, validationResult, reserveErrorSpace, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element;
|
|
208
|
+
|
|
209
|
+
interface RadioGroupProps extends Omit<RadioGroupProps$1, "children"> {
|
|
210
|
+
/** Label for the radio group */
|
|
211
|
+
label?: string;
|
|
212
|
+
/** Children elements */
|
|
213
|
+
children?: ReactNode;
|
|
214
|
+
/** Optional description for the radio group */
|
|
215
|
+
description?: string;
|
|
216
|
+
/** Error message to display when validation fails */
|
|
217
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
218
|
+
/** Validation result object for functional errorMessage */
|
|
219
|
+
validationResult?: ValidationResult;
|
|
220
|
+
/**
|
|
221
|
+
* Visual variant of the radio buttons
|
|
222
|
+
* @default "default"
|
|
223
|
+
*/
|
|
224
|
+
variant?: "default" | "brand";
|
|
225
|
+
}
|
|
226
|
+
declare function RadioGroup(props: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
227
|
+
declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Interface defining the shape of items in the Select component
|
|
231
|
+
*/
|
|
232
|
+
interface SelectItem<T = unknown> {
|
|
233
|
+
/** Unique identifier for the item */
|
|
234
|
+
id: string;
|
|
235
|
+
/** Display label for the item */
|
|
236
|
+
label: string;
|
|
237
|
+
/** Value associated with the item */
|
|
238
|
+
value: T;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Props for the Select component
|
|
242
|
+
* @template T - The type of the items, must extend SelectItem
|
|
243
|
+
*/
|
|
244
|
+
interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "children" | "onSelectionChange"> {
|
|
245
|
+
/** Label text displayed above the select */
|
|
246
|
+
label?: string;
|
|
247
|
+
/** Helper text displayed below the select */
|
|
248
|
+
description?: string;
|
|
249
|
+
/** Error message or function to generate error message */
|
|
250
|
+
errorMessage?: string | ((validation: ValidationResult) => React__default.ReactNode);
|
|
251
|
+
/** Collection of items to display in the select */
|
|
252
|
+
items?: Iterable<T>;
|
|
253
|
+
/** Size variant of the select */
|
|
254
|
+
size?: Size;
|
|
255
|
+
/** Render function for items or static children */
|
|
256
|
+
children?: React__default.ReactNode | ((item: T) => React__default.ReactNode);
|
|
257
|
+
/** Custom render function for individual items. When provided, items prop is used to render items automatically */
|
|
258
|
+
renderItem?: (item: T) => React__default.ReactNode;
|
|
259
|
+
/** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */
|
|
260
|
+
selectedKey?: Key;
|
|
261
|
+
/** Default selected item's id for uncontrolled usage */
|
|
262
|
+
defaultSelectedKey?: Key;
|
|
263
|
+
/** Callback when selection changes, provides the selected item's id */
|
|
264
|
+
onSelectionChange?: (key: Key) => void;
|
|
265
|
+
/** Whether to show error states */
|
|
266
|
+
showErrors?: boolean;
|
|
267
|
+
/** Tooltip text */
|
|
268
|
+
tooltip?: string;
|
|
269
|
+
/** Whether the field is required */
|
|
270
|
+
isRequired?: boolean;
|
|
271
|
+
/** Validation result object */
|
|
272
|
+
validationResult?: ValidationResult;
|
|
273
|
+
/** Whether to use transparent background */
|
|
274
|
+
transparent?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Whether to reserve space for error messages to prevent layout shift
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
reserveErrorSpace?: boolean;
|
|
280
|
+
/** Placement of the dropdown menu relative to the trigger. Defaults to "bottom start" */
|
|
281
|
+
placement?: "bottom" | "bottom left" | "bottom right" | "bottom start" | "bottom end" | "top" | "top left" | "top right" | "top start" | "top end" | "left" | "left top" | "left bottom" | "start" | "start top" | "start bottom" | "right" | "right top" | "right bottom" | "end" | "end top" | "end bottom";
|
|
282
|
+
/** Whether the menu should flip to the opposite side when there's not enough space. Defaults to true */
|
|
283
|
+
shouldFlip?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Controls the menu width behavior relative to the trigger.
|
|
286
|
+
* - "match": Menu width matches trigger width exactly (default)
|
|
287
|
+
* - "auto": Menu width grows to fit content, with minimum of trigger width
|
|
288
|
+
* @default "match"
|
|
289
|
+
*/
|
|
290
|
+
menuWidth?: "match" | "auto";
|
|
291
|
+
}
|
|
292
|
+
declare function Select<T extends SelectItem>({ label, description, errorMessage, children, items, renderItem, size, selectedKey: controlledSelectedKey, defaultSelectedKey, onSelectionChange, placeholder, showErrors, tooltip, isRequired, transparent, reserveErrorSpace, placement, shouldFlip, menuWidth, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
293
|
+
|
|
294
|
+
interface SwitchProps extends Omit<SwitchProps$1, "children"> {
|
|
295
|
+
children: React__default.ReactNode;
|
|
296
|
+
/**
|
|
297
|
+
* Visual variant of the switch
|
|
298
|
+
* @default "default"
|
|
299
|
+
*/
|
|
300
|
+
variant?: "default" | "brand";
|
|
301
|
+
/**
|
|
302
|
+
* Size of the switch
|
|
303
|
+
* @default "md"
|
|
304
|
+
*/
|
|
305
|
+
size?: Size;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Switch
|
|
309
|
+
*
|
|
310
|
+
* Toggle switch component for binary on/off states.
|
|
311
|
+
* Provides an accessible alternative to checkboxes for settings and preferences.
|
|
312
|
+
*/
|
|
313
|
+
declare function Switch({ children, variant, size, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* TextArea
|
|
317
|
+
*
|
|
318
|
+
* Multi-line text input with Edges styling, label, description, and error.
|
|
319
|
+
*/
|
|
320
|
+
interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "disabled">, BaseInputProps {
|
|
321
|
+
label?: string;
|
|
322
|
+
description?: string;
|
|
323
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
324
|
+
tooltip?: string;
|
|
325
|
+
size?: Size;
|
|
326
|
+
isInvalid?: boolean;
|
|
327
|
+
isDisabled?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Allow user resizing of the textarea. Defaults to false (non-resizable).
|
|
330
|
+
* When true, enables vertical resize.
|
|
331
|
+
*/
|
|
332
|
+
isResizable?: boolean;
|
|
333
|
+
validationResult?: ValidationResult;
|
|
334
|
+
}
|
|
335
|
+
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, isDisabled, isResizable, className, validationResult, reserveErrorSpace, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* TextField
|
|
339
|
+
*
|
|
340
|
+
* A controlled or uncontrolled text input with Edges styling, label,
|
|
341
|
+
* description, error messaging, and optional affordances like a search icon,
|
|
342
|
+
* clear button, and password visibility toggle. Wraps
|
|
343
|
+
* `react-aria-components` TextField for accessible behavior.
|
|
344
|
+
*/
|
|
345
|
+
interface TextFieldProps extends Omit<TextFieldProps$1, "isRequired" | "size" | "className">, BaseInputProps {
|
|
346
|
+
label?: string;
|
|
347
|
+
description?: string;
|
|
348
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
349
|
+
placeholder?: string;
|
|
350
|
+
tooltip?: string;
|
|
351
|
+
isRequired?: boolean;
|
|
352
|
+
className?: string;
|
|
353
|
+
validationResult?: ValidationResult;
|
|
354
|
+
/**
|
|
355
|
+
* Whether to reserve space for error messages to prevent layout shift
|
|
356
|
+
* @default true
|
|
357
|
+
*/
|
|
358
|
+
reserveErrorSpace?: boolean;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Renders an Edges TextField with label, description, validation states and
|
|
362
|
+
* optional search/clear/password affordances.
|
|
363
|
+
*/
|
|
364
|
+
declare function TextField({ label, description, errorMessage, size, tooltip, isRequired, transparent, showSearchIcon, isClearable, onClear, type, validationResult, reserveErrorSpace, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* TimeField
|
|
368
|
+
*
|
|
369
|
+
* A segmented time input with Edges styling. Matches the API and styling
|
|
370
|
+
* of TextField and DateField for consistency across form controls.
|
|
371
|
+
*/
|
|
372
|
+
interface TimeFieldProps extends Omit<TimeFieldProps$1<TimeValue>, "isRequired" | "size" | "className">, Omit<BaseInputProps, "transparent" | "isClearable" | "onClear"> {
|
|
373
|
+
label?: string;
|
|
374
|
+
description?: string;
|
|
375
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
376
|
+
placeholder?: string;
|
|
377
|
+
tooltip?: string;
|
|
378
|
+
isRequired?: boolean;
|
|
379
|
+
className?: string;
|
|
380
|
+
validationResult?: ValidationResult;
|
|
381
|
+
/**
|
|
382
|
+
* Whether to reserve space for error messages to prevent layout shift
|
|
383
|
+
* @default true
|
|
384
|
+
*/
|
|
385
|
+
reserveErrorSpace?: boolean;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Renders an Edges TimeField with label, description, validation states,
|
|
389
|
+
* and segmented time input.
|
|
390
|
+
*/
|
|
391
|
+
declare function TimeField({ label, description, errorMessage, size, tooltip, isRequired, isDisabled, isInvalid, reserveErrorSpace, validationResult, className, ...props }: TimeFieldProps): react_jsx_runtime.JSX.Element;
|
|
392
|
+
|
|
393
|
+
export { Autocomplete as A, Button as B, Checkbox as C, NumberField as N, RadioGroup as R, Select as S, TextArea as T, CheckboxGroup as a, ColorField as b, Switch as c, TextField as d, type TimeFieldProps as e, type ColorFieldProps as f, Radio as g, TimeField as h };
|
|
@@ -3,11 +3,10 @@ import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import {
|
|
6
|
+
import { c as IconName } from './FileUpload-DXTcfLIh.js';
|
|
7
7
|
import * as react_map_gl from 'react-map-gl';
|
|
8
8
|
import { ViewState, MapRef } from 'react-map-gl';
|
|
9
|
-
import
|
|
10
|
-
import { IconProps as IconProps$1 } from '@phosphor-icons/react';
|
|
9
|
+
import { MeterProps as MeterProps$1 } from 'react-aria-components';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Core types for the formatting system
|
|
@@ -273,47 +272,6 @@ declare function getYFormatSettings(formatter?: YFormatType): YFormatSettings;
|
|
|
273
272
|
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
274
273
|
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
275
274
|
|
|
276
|
-
type PhosphorIconName = keyof typeof PhosphorIcons;
|
|
277
|
-
type IconName = PhosphorIconName;
|
|
278
|
-
declare const sizePresets: {
|
|
279
|
-
readonly xs: 16;
|
|
280
|
-
readonly sm: 20;
|
|
281
|
-
readonly md: 24;
|
|
282
|
-
readonly lg: 32;
|
|
283
|
-
readonly xl: 40;
|
|
284
|
-
readonly "2xl": 48;
|
|
285
|
-
};
|
|
286
|
-
type SizePreset = keyof typeof sizePresets;
|
|
287
|
-
interface IconProps extends Omit<IconProps$1, "size"> {
|
|
288
|
-
/**
|
|
289
|
-
* The name of the Phosphor icon to render
|
|
290
|
-
* Any valid icon from @phosphor-icons/react
|
|
291
|
-
*/
|
|
292
|
-
name: PhosphorIconName;
|
|
293
|
-
/**
|
|
294
|
-
* Size of the icon - can be a preset or custom number
|
|
295
|
-
*/
|
|
296
|
-
size?: SizePreset | number;
|
|
297
|
-
/**
|
|
298
|
-
* Accessibility label (maps to aria-label)
|
|
299
|
-
*/
|
|
300
|
-
ariaLabel?: string;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Icon
|
|
304
|
-
*
|
|
305
|
-
* Phosphor icon wrapper component with standardized sizing and styling.
|
|
306
|
-
* Provides access to the full Phosphor icon library with tree-shaking support and design system presets.
|
|
307
|
-
* - TypeScript autocomplete for all icon names
|
|
308
|
-
*
|
|
309
|
-
* Usage:
|
|
310
|
-
* ```tsx
|
|
311
|
-
* <Icon name="House" size="md" />
|
|
312
|
-
* <Icon name="User" size={32} className="text-brand" />
|
|
313
|
-
* ```
|
|
314
|
-
*/
|
|
315
|
-
declare const Icon: React$1.MemoExoticComponent<({ name, size, color, weight, className, ariaLabel, ...props }: IconProps) => react_jsx_runtime.JSX.Element | null>;
|
|
316
|
-
|
|
317
275
|
interface ActionItem {
|
|
318
276
|
/**
|
|
319
277
|
* Unique identifier for the action
|
|
@@ -565,7 +523,7 @@ interface BadgeProps {
|
|
|
565
523
|
/** The content to display inside the badge */
|
|
566
524
|
children: React__default.ReactNode;
|
|
567
525
|
/** Visual variant of the badge */
|
|
568
|
-
variant?: "default" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "neutral" | DeviceState | GridState;
|
|
526
|
+
variant?: "default" | "success" | "error" | "warning" | "info" | "primary" | "brand" | "secondary" | "neutral" | DeviceState | GridState;
|
|
569
527
|
/** Size of the badge */
|
|
570
528
|
size?: "sm" | "md" | "lg";
|
|
571
529
|
/** Shape of the badge */
|
|
@@ -672,82 +630,6 @@ interface CodeEditorProps {
|
|
|
672
630
|
*/
|
|
673
631
|
declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
674
632
|
|
|
675
|
-
/**
|
|
676
|
-
* DateField
|
|
677
|
-
*
|
|
678
|
-
* Segmented date input with optional calendar popup.
|
|
679
|
-
*/
|
|
680
|
-
interface DateFieldProps<T extends DateValue> extends DateFieldProps$1<T> {
|
|
681
|
-
/**
|
|
682
|
-
* Label for the date field
|
|
683
|
-
*/
|
|
684
|
-
label?: string;
|
|
685
|
-
/**
|
|
686
|
-
* Description text to show below the field
|
|
687
|
-
*/
|
|
688
|
-
description?: string;
|
|
689
|
-
/**
|
|
690
|
-
* Error message to display
|
|
691
|
-
*/
|
|
692
|
-
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
693
|
-
/**
|
|
694
|
-
* Whether to show a calendar button for date selection
|
|
695
|
-
* @default false
|
|
696
|
-
*/
|
|
697
|
-
showCalendar?: boolean;
|
|
698
|
-
}
|
|
699
|
-
declare function DateField<T extends DateValue>({ label, description, errorMessage, showCalendar, ...props }: DateFieldProps<T>): react_jsx_runtime.JSX.Element;
|
|
700
|
-
|
|
701
|
-
interface FileUploadProps {
|
|
702
|
-
/**
|
|
703
|
-
* Current file URL or preview
|
|
704
|
-
*/
|
|
705
|
-
value?: string;
|
|
706
|
-
/**
|
|
707
|
-
* Callback when file is selected
|
|
708
|
-
*/
|
|
709
|
-
onChange?: (file: File | null, url?: string) => void;
|
|
710
|
-
/**
|
|
711
|
-
* Callback when file URL changes (for external upload handlers)
|
|
712
|
-
*/
|
|
713
|
-
onUrlChange?: (url: string) => void;
|
|
714
|
-
/**
|
|
715
|
-
* Accepted file types
|
|
716
|
-
*/
|
|
717
|
-
accept?: string;
|
|
718
|
-
/**
|
|
719
|
-
* Maximum file size in bytes
|
|
720
|
-
*/
|
|
721
|
-
maxSize?: number;
|
|
722
|
-
/**
|
|
723
|
-
* Whether the component is disabled
|
|
724
|
-
*/
|
|
725
|
-
isDisabled?: boolean;
|
|
726
|
-
/**
|
|
727
|
-
* Custom upload handler (e.g., for cloud storage)
|
|
728
|
-
*/
|
|
729
|
-
onUpload?: (file: File) => Promise<string>;
|
|
730
|
-
/**
|
|
731
|
-
* Additional CSS classes
|
|
732
|
-
*/
|
|
733
|
-
className?: string;
|
|
734
|
-
/**
|
|
735
|
-
* Show image preview for image files
|
|
736
|
-
*/
|
|
737
|
-
showPreview?: boolean;
|
|
738
|
-
/**
|
|
739
|
-
* Placeholder text
|
|
740
|
-
*/
|
|
741
|
-
placeholder?: string;
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* FileUpload
|
|
745
|
-
*
|
|
746
|
-
* A file upload component with drag-and-drop support.
|
|
747
|
-
* Supports image preview, custom upload handlers, and file validation.
|
|
748
|
-
*/
|
|
749
|
-
declare function FileUpload({ value, onChange, onUrlChange, accept, maxSize, isDisabled, onUpload, className, showPreview, placeholder, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
750
|
-
|
|
751
633
|
declare const sizeVariants: {
|
|
752
634
|
readonly xs: "text-lg font-semibold";
|
|
753
635
|
readonly sm: "text-xl font-semibold";
|
|
@@ -1922,4 +1804,4 @@ declare const isLightColor: (color: string) => boolean;
|
|
|
1922
1804
|
*/
|
|
1923
1805
|
declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
1924
1806
|
|
|
1925
|
-
export { type
|
|
1807
|
+
export { type CurrentFormat as $, type ActionItem as A, type BadgeProps as B, type CodeEditorProps as C, getResolvedColor as D, type EntityConfig as E, getThemeCategoricalColors as F, isLightColor as G, Heading as H, type InteractiveMapProps as I, type TooltipData as J, type TooltipSeries as K, Loader as L, type MapPoint as M, type BaseDataPoint as N, type ChartMargin as O, createXScale as P, createYScale as Q, type RichTextEditorProps as R, type StaticMapProps as S, TextLink as T, defaultMargin as U, getYFormatSettings as V, type YFormatSettings as W, type FieldValue as X, type YFormatType as Y, type BooleanFormat as Z, type FormattedValue as _, type ActionMenuProps as a, type DateFormat as a0, type DistanceFormat as a1, type EnergyFormat as a2, type CurrencyFormat as a3, type NumberFormat as a4, type PhoneFormat as a5, type PowerFormat as a6, type FormatterFunction as a7, type ResistanceFormat as a8, type TemperatureUnitString as a9, RichTextEditor as aA, SegmentedControl as aB, ChartContext as aC, useChartContext as aD, type ComponentFormatOptions as aE, formatComponentValue as aF, useComponentFormatter as aG, type BaseFormat as aH, type TextTransform as aI, type TextTruncatePosition as aJ, type PercentageFormat as aK, type DateFormatStyle as aL, type EnergyUnit as aM, type PowerUnit as aN, type VoltageUnit as aO, type CurrentUnit as aP, type ResistanceUnit as aQ, type DistanceUnit as aR, type CustomFormat as aS, type MetricFormat as aT, deviceStateMetricFormats as aU, activeDeviceStates as aV, deviceStateLabels as aW, isActiveState as aX, getDeviceStateLabel as aY, gridStateLabels as aZ, getGridStateLabel as a_, type TemperatureUnit as aa, type TemperatureFormat as ab, type TextFormat as ac, type VoltageFormat as ad, type FieldFormat as ae, type DeviceState as af, type GridState as ag, type ComponentFormatter as ah, type LayerSpec as ai, type CustomPinsSpec as aj, type GeoJsonLayerSpec as ak, type RasterLayerSpec as al, type VectorLayerSpec as am, type ClusteredVectorLayerSpec as an, ActionMenu as ao, Badge as ap, CodeEditor as aq, type ColorSpec as ar, type LayerFeature as as, type LayerStyle as at, type RenderType as au, type ZoomStops as av, InteractiveMap as aw, MAP_TYPES as ax, StaticMap as ay, Meter as az, AppShell as b, type AppShellProps as c, type AvatarProps as d, Avatar as e, type CodeLanguage as f, type CodeTheme as g, Logo as h, type MeterProps as i, type SegmentedControlProps as j, type SegmentOption as k, SideNav as l, type SideNavItem as m, type SideNavProps as n, TopNav as o, type TopNavProps as p, type EntityType as q, ENTITY_CONFIG as r, getEntityConfig as s, getEntityIcon as t, getEntityLabel as u, clearColorCache as v, createCategoryColorMap as w, getContrastingTextColor as x, getDefaultChartColor as y, getDefaultColors as z };
|