@texturehq/edges 0.1.5 → 0.1.7
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 +126 -2
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -4
- package/dist/index.d.ts +67 -4
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +240 -81
- package/dist/theme.css +83 -83
- package/package.json +1 -1
- package/scripts/setup-cursor-rules-manual.js +1 -14
- package/scripts/setup-cursor-rules.js +24 -44
package/dist/index.d.cts
CHANGED
|
@@ -63,6 +63,7 @@ interface AutocompleteProps {
|
|
|
63
63
|
placeholder?: string;
|
|
64
64
|
renderItem?: (item: Item) => React__default.ReactNode;
|
|
65
65
|
renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
|
|
66
|
+
renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
|
|
66
67
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
67
68
|
description?: string;
|
|
68
69
|
size?: Size;
|
|
@@ -74,7 +75,7 @@ interface AutocompleteProps {
|
|
|
74
75
|
showErrors?: boolean;
|
|
75
76
|
autoFocus?: boolean;
|
|
76
77
|
}
|
|
77
|
-
declare function Autocomplete({ label, staticItems, sections, selectedKey, defaultSelectedKey, onSelectionChange, requestConfig, defaultFilter, placeholder, errorMessage, description, size, tooltip, isRequired, isDisabled, isInvalid, validationResult, showErrors, renderItem, renderLeftIcon, autoFocus, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
78
79
|
|
|
79
80
|
declare const iconMapping: {
|
|
80
81
|
readonly AppWindow: _phosphor_icons_react.Icon;
|
|
@@ -293,6 +294,32 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
|
293
294
|
}
|
|
294
295
|
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
295
296
|
|
|
297
|
+
interface ChipProps {
|
|
298
|
+
/** The content to display inside the chip */
|
|
299
|
+
children: React__default.ReactNode;
|
|
300
|
+
/** Callback when the remove button is clicked */
|
|
301
|
+
onRemove?: () => void;
|
|
302
|
+
/** Size variant of the chip */
|
|
303
|
+
size?: Size;
|
|
304
|
+
/** Visual variant of the chip */
|
|
305
|
+
variant?: "default" | "primary" | "secondary";
|
|
306
|
+
/** Whether the chip can be removed (shows X button) */
|
|
307
|
+
isRemovable?: boolean;
|
|
308
|
+
/** Whether the chip is disabled */
|
|
309
|
+
isDisabled?: boolean;
|
|
310
|
+
/** Additional CSS classes */
|
|
311
|
+
className?: string;
|
|
312
|
+
/** Click handler for the chip itself (not the remove button) */
|
|
313
|
+
onClick?: () => void;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Chip
|
|
317
|
+
*
|
|
318
|
+
* A compact element that represents an input, attribute, or action.
|
|
319
|
+
* Can be removable with an X button and supports different variants and sizes.
|
|
320
|
+
*/
|
|
321
|
+
declare function Chip({ children, onRemove, size, variant, isRemovable, isDisabled, className, onClick, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
322
|
+
|
|
296
323
|
interface CopyToClipboardProps {
|
|
297
324
|
/**
|
|
298
325
|
* The value to copy to clipboard. If not provided, will use the text content of children
|
|
@@ -347,6 +374,7 @@ declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
|
347
374
|
type BaseDialogHeaderProps = {
|
|
348
375
|
title?: string;
|
|
349
376
|
onClose: () => void;
|
|
377
|
+
hideCloseIcon?: boolean;
|
|
350
378
|
titleAlign?: "left" | "center";
|
|
351
379
|
headerContent?: React__default.ReactNode;
|
|
352
380
|
};
|
|
@@ -393,6 +421,8 @@ interface DrawerProps {
|
|
|
393
421
|
footerContent?: React__default.ReactNode;
|
|
394
422
|
/** Whether to include padding inside the content area. Defaults to true. */
|
|
395
423
|
contentPadding?: boolean;
|
|
424
|
+
/** Maximum width of the drawer. Defaults to "400px". Can be any valid CSS width value. */
|
|
425
|
+
maxWidth?: string;
|
|
396
426
|
}
|
|
397
427
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
398
428
|
|
|
@@ -813,7 +843,9 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
813
843
|
/** Size variant of the select */
|
|
814
844
|
size?: Size;
|
|
815
845
|
/** Render function for items or static children */
|
|
816
|
-
children
|
|
846
|
+
children?: React__default.ReactNode | ((item: T) => React__default.ReactNode);
|
|
847
|
+
/** Custom render function for individual items. When provided, items prop is used to render items automatically */
|
|
848
|
+
renderItem?: (item: T) => React__default.ReactNode;
|
|
817
849
|
/** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */
|
|
818
850
|
selectedKey?: Key;
|
|
819
851
|
/** Default selected item's id for uncontrolled usage */
|
|
@@ -831,7 +863,7 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
831
863
|
/** Whether to use transparent background */
|
|
832
864
|
transparent?: boolean;
|
|
833
865
|
}
|
|
834
|
-
declare function Select<T extends SelectItem>({ label, description, errorMessage, children, items, size, selectedKey: controlledSelectedKey, defaultSelectedKey, onSelectionChange, placeholder, showErrors, tooltip, isRequired, transparent, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
866
|
+
declare function Select<T extends SelectItem>({ label, description, errorMessage, children, items, renderItem, size, selectedKey: controlledSelectedKey, defaultSelectedKey, onSelectionChange, placeholder, showErrors, tooltip, isRequired, transparent, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
835
867
|
|
|
836
868
|
interface SkeletonProps {
|
|
837
869
|
width?: number | string;
|
|
@@ -894,6 +926,37 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
894
926
|
}
|
|
895
927
|
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
896
928
|
|
|
929
|
+
interface ChipData {
|
|
930
|
+
id: string;
|
|
931
|
+
label: string;
|
|
932
|
+
value: unknown;
|
|
933
|
+
}
|
|
934
|
+
interface TriggerInfo {
|
|
935
|
+
query: string;
|
|
936
|
+
position: number;
|
|
937
|
+
startIndex: number;
|
|
938
|
+
}
|
|
939
|
+
interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value" | "onChange">, BaseInputProps {
|
|
940
|
+
label?: string;
|
|
941
|
+
description?: string;
|
|
942
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
943
|
+
tooltip?: string;
|
|
944
|
+
size?: Size;
|
|
945
|
+
isInvalid?: boolean;
|
|
946
|
+
validationResult?: ValidationResult;
|
|
947
|
+
value?: string;
|
|
948
|
+
onChange?: (value: string) => void;
|
|
949
|
+
chips?: ChipData[];
|
|
950
|
+
onChipsChange?: (chips: ChipData[]) => void;
|
|
951
|
+
triggerPattern?: string | RegExp;
|
|
952
|
+
onTriggerDetected?: (triggerInfo: TriggerInfo) => void;
|
|
953
|
+
onTriggerDismissed?: () => void;
|
|
954
|
+
renderChip?: (chip: ChipData, onRemove: () => void) => React__default.ReactNode;
|
|
955
|
+
chipVariant?: "default" | "primary" | "secondary";
|
|
956
|
+
chipSize?: Size;
|
|
957
|
+
}
|
|
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;
|
|
959
|
+
|
|
897
960
|
/**
|
|
898
961
|
* TextField
|
|
899
962
|
*
|
|
@@ -1027,4 +1090,4 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
|
1027
1090
|
|
|
1028
1091
|
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
1029
1092
|
|
|
1030
|
-
export { Autocomplete, type BaseInputProps, type BaseProps, Button, Calendar, Card, Checkbox, 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, TextField, TextLink, TimeField, ToggleButton, Tooltip, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, useDebounce, useInputFocus };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ interface AutocompleteProps {
|
|
|
63
63
|
placeholder?: string;
|
|
64
64
|
renderItem?: (item: Item) => React__default.ReactNode;
|
|
65
65
|
renderLeftIcon?: (isLoading: boolean) => React__default.ReactNode;
|
|
66
|
+
renderSection?: (section: Section, children: React__default.ReactNode) => React__default.ReactNode;
|
|
66
67
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
67
68
|
description?: string;
|
|
68
69
|
size?: Size;
|
|
@@ -74,7 +75,7 @@ interface AutocompleteProps {
|
|
|
74
75
|
showErrors?: boolean;
|
|
75
76
|
autoFocus?: boolean;
|
|
76
77
|
}
|
|
77
|
-
declare function Autocomplete({ label, staticItems, sections, selectedKey, defaultSelectedKey, onSelectionChange, requestConfig, defaultFilter, placeholder, errorMessage, description, size, tooltip, isRequired, isDisabled, isInvalid, validationResult, showErrors, renderItem, renderLeftIcon, autoFocus, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
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;
|
|
78
79
|
|
|
79
80
|
declare const iconMapping: {
|
|
80
81
|
readonly AppWindow: _phosphor_icons_react.Icon;
|
|
@@ -293,6 +294,32 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
|
293
294
|
}
|
|
294
295
|
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
295
296
|
|
|
297
|
+
interface ChipProps {
|
|
298
|
+
/** The content to display inside the chip */
|
|
299
|
+
children: React__default.ReactNode;
|
|
300
|
+
/** Callback when the remove button is clicked */
|
|
301
|
+
onRemove?: () => void;
|
|
302
|
+
/** Size variant of the chip */
|
|
303
|
+
size?: Size;
|
|
304
|
+
/** Visual variant of the chip */
|
|
305
|
+
variant?: "default" | "primary" | "secondary";
|
|
306
|
+
/** Whether the chip can be removed (shows X button) */
|
|
307
|
+
isRemovable?: boolean;
|
|
308
|
+
/** Whether the chip is disabled */
|
|
309
|
+
isDisabled?: boolean;
|
|
310
|
+
/** Additional CSS classes */
|
|
311
|
+
className?: string;
|
|
312
|
+
/** Click handler for the chip itself (not the remove button) */
|
|
313
|
+
onClick?: () => void;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Chip
|
|
317
|
+
*
|
|
318
|
+
* A compact element that represents an input, attribute, or action.
|
|
319
|
+
* Can be removable with an X button and supports different variants and sizes.
|
|
320
|
+
*/
|
|
321
|
+
declare function Chip({ children, onRemove, size, variant, isRemovable, isDisabled, className, onClick, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
322
|
+
|
|
296
323
|
interface CopyToClipboardProps {
|
|
297
324
|
/**
|
|
298
325
|
* The value to copy to clipboard. If not provided, will use the text content of children
|
|
@@ -347,6 +374,7 @@ declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
|
347
374
|
type BaseDialogHeaderProps = {
|
|
348
375
|
title?: string;
|
|
349
376
|
onClose: () => void;
|
|
377
|
+
hideCloseIcon?: boolean;
|
|
350
378
|
titleAlign?: "left" | "center";
|
|
351
379
|
headerContent?: React__default.ReactNode;
|
|
352
380
|
};
|
|
@@ -393,6 +421,8 @@ interface DrawerProps {
|
|
|
393
421
|
footerContent?: React__default.ReactNode;
|
|
394
422
|
/** Whether to include padding inside the content area. Defaults to true. */
|
|
395
423
|
contentPadding?: boolean;
|
|
424
|
+
/** Maximum width of the drawer. Defaults to "400px". Can be any valid CSS width value. */
|
|
425
|
+
maxWidth?: string;
|
|
396
426
|
}
|
|
397
427
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
398
428
|
|
|
@@ -813,7 +843,9 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
813
843
|
/** Size variant of the select */
|
|
814
844
|
size?: Size;
|
|
815
845
|
/** Render function for items or static children */
|
|
816
|
-
children
|
|
846
|
+
children?: React__default.ReactNode | ((item: T) => React__default.ReactNode);
|
|
847
|
+
/** Custom render function for individual items. When provided, items prop is used to render items automatically */
|
|
848
|
+
renderItem?: (item: T) => React__default.ReactNode;
|
|
817
849
|
/** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */
|
|
818
850
|
selectedKey?: Key;
|
|
819
851
|
/** Default selected item's id for uncontrolled usage */
|
|
@@ -831,7 +863,7 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
831
863
|
/** Whether to use transparent background */
|
|
832
864
|
transparent?: boolean;
|
|
833
865
|
}
|
|
834
|
-
declare function Select<T extends SelectItem>({ label, description, errorMessage, children, items, size, selectedKey: controlledSelectedKey, defaultSelectedKey, onSelectionChange, placeholder, showErrors, tooltip, isRequired, transparent, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
866
|
+
declare function Select<T extends SelectItem>({ label, description, errorMessage, children, items, renderItem, size, selectedKey: controlledSelectedKey, defaultSelectedKey, onSelectionChange, placeholder, showErrors, tooltip, isRequired, transparent, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
835
867
|
|
|
836
868
|
interface SkeletonProps {
|
|
837
869
|
width?: number | string;
|
|
@@ -894,6 +926,37 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
894
926
|
}
|
|
895
927
|
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
896
928
|
|
|
929
|
+
interface ChipData {
|
|
930
|
+
id: string;
|
|
931
|
+
label: string;
|
|
932
|
+
value: unknown;
|
|
933
|
+
}
|
|
934
|
+
interface TriggerInfo {
|
|
935
|
+
query: string;
|
|
936
|
+
position: number;
|
|
937
|
+
startIndex: number;
|
|
938
|
+
}
|
|
939
|
+
interface TextAreaWithChipsProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value" | "onChange">, BaseInputProps {
|
|
940
|
+
label?: string;
|
|
941
|
+
description?: string;
|
|
942
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
943
|
+
tooltip?: string;
|
|
944
|
+
size?: Size;
|
|
945
|
+
isInvalid?: boolean;
|
|
946
|
+
validationResult?: ValidationResult;
|
|
947
|
+
value?: string;
|
|
948
|
+
onChange?: (value: string) => void;
|
|
949
|
+
chips?: ChipData[];
|
|
950
|
+
onChipsChange?: (chips: ChipData[]) => void;
|
|
951
|
+
triggerPattern?: string | RegExp;
|
|
952
|
+
onTriggerDetected?: (triggerInfo: TriggerInfo) => void;
|
|
953
|
+
onTriggerDismissed?: () => void;
|
|
954
|
+
renderChip?: (chip: ChipData, onRemove: () => void) => React__default.ReactNode;
|
|
955
|
+
chipVariant?: "default" | "primary" | "secondary";
|
|
956
|
+
chipSize?: Size;
|
|
957
|
+
}
|
|
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;
|
|
959
|
+
|
|
897
960
|
/**
|
|
898
961
|
* TextField
|
|
899
962
|
*
|
|
@@ -1027,4 +1090,4 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
|
1027
1090
|
|
|
1028
1091
|
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
1029
1092
|
|
|
1030
|
-
export { Autocomplete, type BaseInputProps, type BaseProps, Button, Calendar, Card, Checkbox, 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, TextField, TextLink, TimeField, ToggleButton, Tooltip, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, useDebounce, useInputFocus };
|
|
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 };
|