florixui 1.10.0 → 1.11.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/README.md +1 -1
- package/dist/components/custom/advanced-input.d.ts +24 -1
- package/dist/index.js +640 -551
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -199,7 +199,7 @@ A drop-in "three-dot" overflow menu. Pass a flat list of items (actions, labels,
|
|
|
199
199
|
|
|
200
200
|
### Advanced Input
|
|
201
201
|
|
|
202
|
-
A batteries-included input that bundles label, description, icons, affixes, password toggle, loading, error/helper text, and a
|
|
202
|
+
A batteries-included input that bundles label, description, icons, affixes, password toggle, loading, error/helper text, a textarea mode, and a multi-value tags mode into one component.
|
|
203
203
|
|
|
204
204
|
```tsx
|
|
205
205
|
<AdvancedInput
|
|
@@ -35,7 +35,30 @@ type InputProps = BaseProps & Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
35
35
|
type TextareaProps = BaseProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & {
|
|
36
36
|
as: "textarea";
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
type TagsProps = BaseProps & {
|
|
39
|
+
as: "tags";
|
|
40
|
+
/** Current tags. Controlled. */
|
|
41
|
+
value: string[];
|
|
42
|
+
/** Called with the new tags array. */
|
|
43
|
+
onChange: (tags: string[]) => void;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
className?: string;
|
|
47
|
+
id?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Where the chips render:
|
|
50
|
+
* - `inside` (default): chips sit inside the field, before the cursor.
|
|
51
|
+
* - `below`: the input stays single-line; chips render below it.
|
|
52
|
+
*/
|
|
53
|
+
badgePosition?: "inside" | "below";
|
|
54
|
+
/** Keys that commit the current text as a tag. Default `[",", "Enter"]`. */
|
|
55
|
+
separators?: string[];
|
|
56
|
+
/** Prevent duplicate tags (case-insensitive). Default `true`. */
|
|
57
|
+
dedupe?: boolean;
|
|
58
|
+
/** Max number of tags. */
|
|
59
|
+
maxTags?: number;
|
|
60
|
+
};
|
|
61
|
+
export type AdvancedInputProps = InputProps | TextareaProps | TagsProps;
|
|
39
62
|
export declare const AdvancedInput: React.ForwardRefExoticComponent<AdvancedInputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
40
63
|
export interface PhoneInputProps extends Omit<InputProps, "as" | "startItem" | "value" | "onChange" | "type" | "defaultValue"> {
|
|
41
64
|
/** Full phone value in E.164-ish form, e.g. "+919876543210". Controlled. */
|