@classytic/fluid 0.1.1 → 0.1.2
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/index.d.ts +36 -20
- package/dist/index.js +270 -223
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { LucideIcon, LucideProps } from 'lucide-react';
|
|
|
7
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
8
|
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
import { FieldValues, Control, FieldPath, FieldError, Path } from 'react-hook-form';
|
|
10
|
+
export { Container, ContainerProps, Section, SectionProps } from './layout.js';
|
|
10
11
|
import 'clsx';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -1247,9 +1248,9 @@ interface SwitchInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1247
1248
|
declare function SwitchInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, required, disabled, orientation, value: propValue, onChange: propOnChange, onValueChange, className, labelClassName, switchClassName, }: SwitchInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1248
1249
|
|
|
1249
1250
|
type DateValue = Date | string | null | undefined;
|
|
1250
|
-
interface DateInputProps {
|
|
1251
|
-
control?: Control<
|
|
1252
|
-
name: string;
|
|
1251
|
+
interface DateInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1252
|
+
control?: Control<TFieldValues>;
|
|
1253
|
+
name: FieldPath<TFieldValues> | string;
|
|
1253
1254
|
label?: string;
|
|
1254
1255
|
placeholder?: string;
|
|
1255
1256
|
description?: string;
|
|
@@ -1283,7 +1284,7 @@ interface DateInputProps {
|
|
|
1283
1284
|
* />
|
|
1284
1285
|
* ```
|
|
1285
1286
|
*/
|
|
1286
|
-
declare function DateInput({ control, name, label, description, helperText, placeholder, required, disabled, className, labelClassName, inputClassName, minDate, maxDate, onValueChange, value: propValue, onChange: propOnChange, Icon, allowClear, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
1287
|
+
declare function DateInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, placeholder, required, disabled, className, labelClassName, inputClassName, minDate, maxDate, onValueChange, value: propValue, onChange: propOnChange, Icon, allowClear, }: DateInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1287
1288
|
|
|
1288
1289
|
interface TagInputProps {
|
|
1289
1290
|
control?: Control<FieldValues>;
|
|
@@ -1332,9 +1333,9 @@ interface TagChoiceItem {
|
|
|
1332
1333
|
label: string;
|
|
1333
1334
|
disabled?: boolean;
|
|
1334
1335
|
}
|
|
1335
|
-
interface TagChoiceInputProps {
|
|
1336
|
-
control?: Control<
|
|
1337
|
-
name
|
|
1336
|
+
interface TagChoiceInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1337
|
+
control?: Control<TFieldValues>;
|
|
1338
|
+
name: FieldPath<TFieldValues> | string;
|
|
1338
1339
|
label?: string;
|
|
1339
1340
|
placeholder?: string;
|
|
1340
1341
|
description?: string;
|
|
@@ -1362,7 +1363,7 @@ interface TagChoiceInputProps {
|
|
|
1362
1363
|
* />
|
|
1363
1364
|
* ```
|
|
1364
1365
|
*/
|
|
1365
|
-
declare function TagChoiceInput({ control, name, label, description, helperText, placeholder, required, disabled, className, items, value: propValue, onValueChange, }: TagChoiceInputProps): react_jsx_runtime.JSX.Element;
|
|
1366
|
+
declare function TagChoiceInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, placeholder, required, disabled, className, items, value: propValue, onValueChange, }: TagChoiceInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1366
1367
|
declare namespace TagChoiceInput {
|
|
1367
1368
|
var displayName: string;
|
|
1368
1369
|
}
|
|
@@ -1372,12 +1373,11 @@ interface ComboboxOption {
|
|
|
1372
1373
|
label: string;
|
|
1373
1374
|
disabled?: boolean;
|
|
1374
1375
|
}
|
|
1375
|
-
interface ComboboxInputProps {
|
|
1376
|
-
control?: Control<
|
|
1377
|
-
name: string;
|
|
1376
|
+
interface ComboboxInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1377
|
+
control?: Control<TFieldValues>;
|
|
1378
|
+
name: FieldPath<TFieldValues> | string;
|
|
1378
1379
|
label?: string;
|
|
1379
1380
|
placeholder?: string;
|
|
1380
|
-
searchPlaceholder?: string;
|
|
1381
1381
|
emptyText?: string;
|
|
1382
1382
|
description?: string;
|
|
1383
1383
|
helperText?: string;
|
|
@@ -1389,14 +1389,21 @@ interface ComboboxInputProps {
|
|
|
1389
1389
|
onValueChange?: (value: string) => void;
|
|
1390
1390
|
className?: string;
|
|
1391
1391
|
labelClassName?: string;
|
|
1392
|
-
|
|
1392
|
+
inputClassName?: string;
|
|
1393
1393
|
renderOption?: (option: ComboboxOption) => ReactNode;
|
|
1394
1394
|
}
|
|
1395
1395
|
/**
|
|
1396
|
-
* ComboboxInput - Searchable select with react-hook-form integration
|
|
1396
|
+
* ComboboxInput - Searchable select with react-hook-form integration using Base UI
|
|
1397
|
+
*
|
|
1398
|
+
* Features:
|
|
1399
|
+
* - Works with react-hook-form Controller
|
|
1400
|
+
* - Supports Base UI Combobox primitives
|
|
1401
|
+
* - Custom option rendering
|
|
1402
|
+
* - Can be used standalone without form
|
|
1397
1403
|
*
|
|
1398
1404
|
* @example
|
|
1399
1405
|
* ```tsx
|
|
1406
|
+
* // With react-hook-form
|
|
1400
1407
|
* <ComboboxInput
|
|
1401
1408
|
* control={form.control}
|
|
1402
1409
|
* name="country"
|
|
@@ -1405,11 +1412,20 @@ interface ComboboxInputProps {
|
|
|
1405
1412
|
* { value: "us", label: "United States" },
|
|
1406
1413
|
* { value: "uk", label: "United Kingdom" },
|
|
1407
1414
|
* ]}
|
|
1408
|
-
*
|
|
1415
|
+
* placeholder="Select a country..."
|
|
1416
|
+
* />
|
|
1417
|
+
*
|
|
1418
|
+
* // Standalone
|
|
1419
|
+
* <ComboboxInput
|
|
1420
|
+
* name="country"
|
|
1421
|
+
* label="Country"
|
|
1422
|
+
* items={items}
|
|
1423
|
+
* value={selectedCountry}
|
|
1424
|
+
* onValueChange={setSelectedCountry}
|
|
1409
1425
|
* />
|
|
1410
1426
|
* ```
|
|
1411
1427
|
*/
|
|
1412
|
-
declare function ComboboxInput({ control, name, label, placeholder,
|
|
1428
|
+
declare function ComboboxInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, placeholder, emptyText, description, helperText, required, disabled, items, className, labelClassName, inputClassName, onValueChange, renderOption, value: propValue, onChange: propOnChange, }: ComboboxInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1413
1429
|
|
|
1414
1430
|
interface SlugFieldProps {
|
|
1415
1431
|
control?: Control<FieldValues>;
|
|
@@ -1514,11 +1530,11 @@ interface DateRangeValue {
|
|
|
1514
1530
|
from?: Date | string;
|
|
1515
1531
|
to?: Date | string;
|
|
1516
1532
|
}
|
|
1517
|
-
interface DateRangeInputProps {
|
|
1533
|
+
interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1518
1534
|
/** React Hook Form control */
|
|
1519
|
-
control?: Control<
|
|
1535
|
+
control?: Control<TFieldValues>;
|
|
1520
1536
|
/** Field name for form registration */
|
|
1521
|
-
name
|
|
1537
|
+
name: FieldPath<TFieldValues> | string;
|
|
1522
1538
|
/** Field label */
|
|
1523
1539
|
label?: string;
|
|
1524
1540
|
/** Description text below the input */
|
|
@@ -1578,7 +1594,7 @@ interface DateRangeInputProps {
|
|
|
1578
1594
|
* />
|
|
1579
1595
|
* ```
|
|
1580
1596
|
*/
|
|
1581
|
-
declare function DateRangeInput({ control, name, label, description, placeholder, required, disabled, className, labelClassName, buttonClassName, calendarClassName, minDate, maxDate, disabledDates, disabledDays, onValueChange, validateDateRange, clearErrors, descriptionComponent, allowClear, showBadge, Icon, transform, }: DateRangeInputProps): react_jsx_runtime.JSX.Element;
|
|
1597
|
+
declare function DateRangeInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, placeholder, required, disabled, className, labelClassName, buttonClassName, calendarClassName, minDate, maxDate, disabledDates, disabledDays, onValueChange, validateDateRange, clearErrors, descriptionComponent, allowClear, showBadge, Icon, transform, }: DateRangeInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1582
1598
|
|
|
1583
1599
|
interface SearchRootProps {
|
|
1584
1600
|
children: ReactNode;
|