@texturehq/edges 0.1.6 → 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 +122 -2
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -3
- package/dist/index.d.ts +64 -3
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +168 -22
- 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
|
@@ -294,6 +294,32 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
|
294
294
|
}
|
|
295
295
|
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
296
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
|
+
|
|
297
323
|
interface CopyToClipboardProps {
|
|
298
324
|
/**
|
|
299
325
|
* The value to copy to clipboard. If not provided, will use the text content of children
|
|
@@ -395,6 +421,8 @@ interface DrawerProps {
|
|
|
395
421
|
footerContent?: React__default.ReactNode;
|
|
396
422
|
/** Whether to include padding inside the content area. Defaults to true. */
|
|
397
423
|
contentPadding?: boolean;
|
|
424
|
+
/** Maximum width of the drawer. Defaults to "400px". Can be any valid CSS width value. */
|
|
425
|
+
maxWidth?: string;
|
|
398
426
|
}
|
|
399
427
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
400
428
|
|
|
@@ -815,7 +843,9 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
815
843
|
/** Size variant of the select */
|
|
816
844
|
size?: Size;
|
|
817
845
|
/** Render function for items or static children */
|
|
818
|
-
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;
|
|
819
849
|
/** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */
|
|
820
850
|
selectedKey?: Key;
|
|
821
851
|
/** Default selected item's id for uncontrolled usage */
|
|
@@ -833,7 +863,7 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
833
863
|
/** Whether to use transparent background */
|
|
834
864
|
transparent?: boolean;
|
|
835
865
|
}
|
|
836
|
-
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;
|
|
837
867
|
|
|
838
868
|
interface SkeletonProps {
|
|
839
869
|
width?: number | string;
|
|
@@ -896,6 +926,37 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
896
926
|
}
|
|
897
927
|
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
898
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
|
+
|
|
899
960
|
/**
|
|
900
961
|
* TextField
|
|
901
962
|
*
|
|
@@ -1029,4 +1090,4 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
|
1029
1090
|
|
|
1030
1091
|
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
1031
1092
|
|
|
1032
|
-
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
|
@@ -294,6 +294,32 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
|
294
294
|
}
|
|
295
295
|
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
296
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
|
+
|
|
297
323
|
interface CopyToClipboardProps {
|
|
298
324
|
/**
|
|
299
325
|
* The value to copy to clipboard. If not provided, will use the text content of children
|
|
@@ -395,6 +421,8 @@ interface DrawerProps {
|
|
|
395
421
|
footerContent?: React__default.ReactNode;
|
|
396
422
|
/** Whether to include padding inside the content area. Defaults to true. */
|
|
397
423
|
contentPadding?: boolean;
|
|
424
|
+
/** Maximum width of the drawer. Defaults to "400px". Can be any valid CSS width value. */
|
|
425
|
+
maxWidth?: string;
|
|
398
426
|
}
|
|
399
427
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
400
428
|
|
|
@@ -815,7 +843,9 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
815
843
|
/** Size variant of the select */
|
|
816
844
|
size?: Size;
|
|
817
845
|
/** Render function for items or static children */
|
|
818
|
-
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;
|
|
819
849
|
/** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */
|
|
820
850
|
selectedKey?: Key;
|
|
821
851
|
/** Default selected item's id for uncontrolled usage */
|
|
@@ -833,7 +863,7 @@ interface SelectProps<T extends SelectItem> extends Omit<SelectProps$1<T>, "chil
|
|
|
833
863
|
/** Whether to use transparent background */
|
|
834
864
|
transparent?: boolean;
|
|
835
865
|
}
|
|
836
|
-
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;
|
|
837
867
|
|
|
838
868
|
interface SkeletonProps {
|
|
839
869
|
width?: number | string;
|
|
@@ -896,6 +926,37 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
|
|
|
896
926
|
}
|
|
897
927
|
declare function TextArea({ label, description, errorMessage, size, tooltip, required, transparent, isInvalid, className, validationResult, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
898
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
|
+
|
|
899
960
|
/**
|
|
900
961
|
* TextField
|
|
901
962
|
*
|
|
@@ -1029,4 +1090,4 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
|
1029
1090
|
|
|
1030
1091
|
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
1031
1092
|
|
|
1032
|
-
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 };
|