florixui 1.10.0 → 1.12.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 +2 -2
- package/dist/components/custom/advanced-input.d.ts +24 -1
- package/dist/components/custom/data-table.d.ts +6 -1
- package/dist/index.js +768 -665
- 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
|
|
@@ -499,7 +499,7 @@ const navItems = [
|
|
|
499
499
|
|
|
500
500
|
### Data Table
|
|
501
501
|
|
|
502
|
-
A simple, column-driven table with the shadcn data-table look: badge cells, row selection, a row-actions menu, and empty/loading states — no sorting/pagination machinery.
|
|
502
|
+
A simple, column-driven table with the shadcn data-table look: badge cells, row selection (with disableable rows via isRowDisabled), a row-actions menu, and empty/loading states — no sorting/pagination machinery.
|
|
503
503
|
|
|
504
504
|
```tsx
|
|
505
505
|
const columns: DataTableColumn<Section>[] = [
|
|
@@ -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. */
|
|
@@ -20,6 +20,11 @@ export interface DataTableProps<TRow> {
|
|
|
20
20
|
data: TRow[];
|
|
21
21
|
/** Unique id per row; required for selection. Defaults to the row index. */
|
|
22
22
|
getRowId?: (row: TRow, index: number) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Mark a row as disabled: it's dimmed, can't be selected (or "select all"-ed),
|
|
25
|
+
* and ignores `onRowClick`. Row actions stay enabled.
|
|
26
|
+
*/
|
|
27
|
+
isRowDisabled?: (row: TRow, index: number) => boolean;
|
|
23
28
|
selectable?: boolean;
|
|
24
29
|
selectedIds?: string[];
|
|
25
30
|
onSelectionChange?: (ids: string[]) => void;
|
|
@@ -46,4 +51,4 @@ export interface DataTableProps<TRow> {
|
|
|
46
51
|
onRowClick?: (row: TRow) => void;
|
|
47
52
|
className?: string;
|
|
48
53
|
}
|
|
49
|
-
export declare function DataTable<TRow>({ columns, data, getRowId, selectable, selectedIds, onSelectionChange, rowActions, loading, emptyMessage, pagination, pageSize: pageSizeProp, pageSizeOptions, striped, stickyHeader, maxHeight, fillHeight, onRowClick, className, }: DataTableProps<TRow>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare function DataTable<TRow>({ columns, data, getRowId, isRowDisabled, selectable, selectedIds, onSelectionChange, rowActions, loading, emptyMessage, pagination, pageSize: pageSizeProp, pageSizeOptions, striped, stickyHeader, maxHeight, fillHeight, onRowClick, className, }: DataTableProps<TRow>): import("react/jsx-runtime").JSX.Element;
|